@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,17 @@
|
|
|
1
|
+
/** Ported from original DUI: deep-future-app/app/client/components/dui/sidebar */
|
|
2
|
+
import { LitElement, type TemplateResult } from "lit";
|
|
3
|
+
/**
|
|
4
|
+
* `<dui-sidebar-group-label>` — Heading for a sidebar group.
|
|
5
|
+
*
|
|
6
|
+
* Automatically hides (with opacity transition) when the sidebar is
|
|
7
|
+
* in icon-collapsed mode.
|
|
8
|
+
*
|
|
9
|
+
* @slot - Label text.
|
|
10
|
+
*/
|
|
11
|
+
export declare class DuiSidebarGroupLabel extends LitElement {
|
|
12
|
+
#private;
|
|
13
|
+
static tagName: "dui-sidebar-group-label";
|
|
14
|
+
static styles: import("lit").CSSResult[];
|
|
15
|
+
updated(): void;
|
|
16
|
+
render(): TemplateResult;
|
|
17
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/** Ported from original DUI: deep-future-app/app/client/components/dui/sidebar */
|
|
2
|
+
import { css, html, LitElement } from "lit";
|
|
3
|
+
import { ContextConsumer } from "@lit/context";
|
|
4
|
+
import { base } from "@deepfuture/dui-core/base";
|
|
5
|
+
import { sidebarContext } from "./sidebar-context.js";
|
|
6
|
+
const styles = css `
|
|
7
|
+
:host {
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
white-space: nowrap;
|
|
12
|
+
text-overflow: ellipsis;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:host([data-icon-collapsed]) {
|
|
16
|
+
opacity: 0;
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
19
|
+
/**
|
|
20
|
+
* `<dui-sidebar-group-label>` — Heading for a sidebar group.
|
|
21
|
+
*
|
|
22
|
+
* Automatically hides (with opacity transition) when the sidebar is
|
|
23
|
+
* in icon-collapsed mode.
|
|
24
|
+
*
|
|
25
|
+
* @slot - Label text.
|
|
26
|
+
*/
|
|
27
|
+
export class DuiSidebarGroupLabel extends LitElement {
|
|
28
|
+
static { this.tagName = "dui-sidebar-group-label"; }
|
|
29
|
+
static { this.styles = [base, styles]; }
|
|
30
|
+
#ctx = new ContextConsumer(this, {
|
|
31
|
+
context: sidebarContext,
|
|
32
|
+
subscribe: true,
|
|
33
|
+
});
|
|
34
|
+
get #isIconCollapsed() {
|
|
35
|
+
const ctx = this.#ctx.value;
|
|
36
|
+
return ctx?.collapsible === "icon" && ctx?.state === "collapsed";
|
|
37
|
+
}
|
|
38
|
+
updated() {
|
|
39
|
+
if (this.#isIconCollapsed) {
|
|
40
|
+
this.setAttribute("data-icon-collapsed", "");
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
this.removeAttribute("data-icon-collapsed");
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
render() {
|
|
47
|
+
return html `<slot></slot>`;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Ported from original DUI: deep-future-app/app/client/components/dui/sidebar */
|
|
2
|
+
import { LitElement, type TemplateResult } from "lit";
|
|
3
|
+
/**
|
|
4
|
+
* `<dui-sidebar-group>` — Section container within the sidebar.
|
|
5
|
+
*
|
|
6
|
+
* Groups related menu items with an optional label.
|
|
7
|
+
*
|
|
8
|
+
* @slot label - Optional group label (use `<dui-sidebar-group-label>`).
|
|
9
|
+
* @slot - Default slot for group content (menus, items, etc.).
|
|
10
|
+
*/
|
|
11
|
+
export declare class DuiSidebarGroup extends LitElement {
|
|
12
|
+
static tagName: "dui-sidebar-group";
|
|
13
|
+
static styles: import("lit").CSSResult[];
|
|
14
|
+
render(): TemplateResult;
|
|
15
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** Ported from original DUI: deep-future-app/app/client/components/dui/sidebar */
|
|
2
|
+
import { css, html, LitElement } from "lit";
|
|
3
|
+
import { base } from "@deepfuture/dui-core/base";
|
|
4
|
+
const styles = css `
|
|
5
|
+
:host {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
position: relative;
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
}
|
|
11
|
+
`;
|
|
12
|
+
/**
|
|
13
|
+
* `<dui-sidebar-group>` — Section container within the sidebar.
|
|
14
|
+
*
|
|
15
|
+
* Groups related menu items with an optional label.
|
|
16
|
+
*
|
|
17
|
+
* @slot label - Optional group label (use `<dui-sidebar-group-label>`).
|
|
18
|
+
* @slot - Default slot for group content (menus, items, etc.).
|
|
19
|
+
*/
|
|
20
|
+
export class DuiSidebarGroup extends LitElement {
|
|
21
|
+
static { this.tagName = "dui-sidebar-group"; }
|
|
22
|
+
static { this.styles = [base, styles]; }
|
|
23
|
+
render() {
|
|
24
|
+
return html `
|
|
25
|
+
<slot name="label"></slot>
|
|
26
|
+
<slot></slot>
|
|
27
|
+
`;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Ported from original DUI: deep-future-app/app/client/components/dui/sidebar */
|
|
2
|
+
import { LitElement, type TemplateResult } from "lit";
|
|
3
|
+
/**
|
|
4
|
+
* `<dui-sidebar-header>` — Top section of the sidebar.
|
|
5
|
+
*
|
|
6
|
+
* @slot - Default slot for header content (logo, title, etc.).
|
|
7
|
+
*/
|
|
8
|
+
export declare class DuiSidebarHeader extends LitElement {
|
|
9
|
+
static tagName: "dui-sidebar-header";
|
|
10
|
+
static styles: import("lit").CSSResult[];
|
|
11
|
+
render(): TemplateResult;
|
|
12
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** Ported from original DUI: deep-future-app/app/client/components/dui/sidebar */
|
|
2
|
+
import { css, html, LitElement } from "lit";
|
|
3
|
+
import { base } from "@deepfuture/dui-core/base";
|
|
4
|
+
const styles = css `
|
|
5
|
+
:host {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
}
|
|
9
|
+
`;
|
|
10
|
+
/**
|
|
11
|
+
* `<dui-sidebar-header>` — Top section of the sidebar.
|
|
12
|
+
*
|
|
13
|
+
* @slot - Default slot for header content (logo, title, etc.).
|
|
14
|
+
*/
|
|
15
|
+
export class DuiSidebarHeader extends LitElement {
|
|
16
|
+
static { this.tagName = "dui-sidebar-header"; }
|
|
17
|
+
static { this.styles = [base, styles]; }
|
|
18
|
+
render() {
|
|
19
|
+
return html `<slot></slot>`;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Ported from original DUI: deep-future-app/app/client/components/dui/sidebar */
|
|
2
|
+
import { LitElement, type TemplateResult } from "lit";
|
|
3
|
+
/**
|
|
4
|
+
* `<dui-sidebar-inset>` — Content wrapper adjacent to the sidebar.
|
|
5
|
+
*
|
|
6
|
+
* Fills the remaining space next to the sidebar. Provides a container
|
|
7
|
+
* query context for responsive content.
|
|
8
|
+
*
|
|
9
|
+
* @slot - Default slot for main page content.
|
|
10
|
+
*/
|
|
11
|
+
export declare class DuiSidebarInset extends LitElement {
|
|
12
|
+
static tagName: "dui-sidebar-inset";
|
|
13
|
+
static styles: import("lit").CSSResult[];
|
|
14
|
+
render(): TemplateResult;
|
|
15
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** Ported from original DUI: deep-future-app/app/client/components/dui/sidebar */
|
|
2
|
+
import { css, html, LitElement } from "lit";
|
|
3
|
+
import { base } from "@deepfuture/dui-core/base";
|
|
4
|
+
const styles = css `
|
|
5
|
+
:host {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
flex: 1;
|
|
9
|
+
min-width: 0;
|
|
10
|
+
position: relative;
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
container-type: size;
|
|
13
|
+
}
|
|
14
|
+
`;
|
|
15
|
+
/**
|
|
16
|
+
* `<dui-sidebar-inset>` — Content wrapper adjacent to the sidebar.
|
|
17
|
+
*
|
|
18
|
+
* Fills the remaining space next to the sidebar. Provides a container
|
|
19
|
+
* query context for responsive content.
|
|
20
|
+
*
|
|
21
|
+
* @slot - Default slot for main page content.
|
|
22
|
+
*/
|
|
23
|
+
export class DuiSidebarInset extends LitElement {
|
|
24
|
+
static { this.tagName = "dui-sidebar-inset"; }
|
|
25
|
+
static { this.styles = [base, styles]; }
|
|
26
|
+
render() {
|
|
27
|
+
return html `<slot></slot>`;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** Ported from original DUI: deep-future-app/app/client/components/dui/sidebar */
|
|
2
|
+
import { LitElement, type TemplateResult } from "lit";
|
|
3
|
+
export type SidebarMenuButtonSize = "default" | "sm" | "lg";
|
|
4
|
+
/**
|
|
5
|
+
* `<dui-sidebar-menu-button>` — Interactive button or link within a sidebar menu.
|
|
6
|
+
*
|
|
7
|
+
* Renders as a `<button>` by default, or an `<a>` when `href` is set.
|
|
8
|
+
* Supports icon-collapsed mode where only the icon is visible, with an
|
|
9
|
+
* optional tooltip.
|
|
10
|
+
*
|
|
11
|
+
* @slot icon - Icon slot, shown before the label.
|
|
12
|
+
* @slot - Default slot for label text.
|
|
13
|
+
* @slot suffix - Suffix slot, shown after the label.
|
|
14
|
+
* @fires spa-navigate - Fired on normal link clicks. Detail: { href: string }
|
|
15
|
+
*/
|
|
16
|
+
export declare class DuiSidebarMenuButton extends LitElement {
|
|
17
|
+
#private;
|
|
18
|
+
static tagName: "dui-sidebar-menu-button";
|
|
19
|
+
static styles: import("lit").CSSResult[];
|
|
20
|
+
/** Size variant for the button. */
|
|
21
|
+
accessor size: SidebarMenuButtonSize;
|
|
22
|
+
/** Whether the button is in active/selected state. */
|
|
23
|
+
accessor active: boolean;
|
|
24
|
+
/** Whether the button is disabled. */
|
|
25
|
+
accessor disabled: boolean;
|
|
26
|
+
/** Tooltip text shown when sidebar is icon-collapsed. */
|
|
27
|
+
accessor tooltip: string;
|
|
28
|
+
/** When set, renders as an anchor tag instead of a button. */
|
|
29
|
+
accessor href: string | undefined;
|
|
30
|
+
render(): TemplateResult;
|
|
31
|
+
}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
/** Ported from original DUI: deep-future-app/app/client/components/dui/sidebar */
|
|
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 { sidebarContext } from "./sidebar-context.js";
|
|
13
|
+
const styles = css `
|
|
14
|
+
:host {
|
|
15
|
+
display: block;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.Row {
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
overflow: hidden;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.Button {
|
|
25
|
+
box-sizing: border-box;
|
|
26
|
+
display: flex;
|
|
27
|
+
flex: 1;
|
|
28
|
+
min-width: 0;
|
|
29
|
+
align-items: center;
|
|
30
|
+
height: 100%;
|
|
31
|
+
border: none;
|
|
32
|
+
border-radius: 0;
|
|
33
|
+
background: transparent;
|
|
34
|
+
text-align: left;
|
|
35
|
+
text-decoration: none;
|
|
36
|
+
white-space: nowrap;
|
|
37
|
+
overflow: hidden;
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
user-select: none;
|
|
40
|
+
font: inherit;
|
|
41
|
+
color: inherit;
|
|
42
|
+
padding: 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.Button:focus-visible {
|
|
46
|
+
outline: none;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.Label {
|
|
50
|
+
flex: 1;
|
|
51
|
+
overflow: hidden;
|
|
52
|
+
text-overflow: ellipsis;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.Suffix {
|
|
56
|
+
flex-shrink: 0;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.Row[data-icon-collapsed] {
|
|
60
|
+
justify-content: center;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.Row[data-icon-collapsed] .Label,
|
|
64
|
+
.Row[data-icon-collapsed] .Suffix {
|
|
65
|
+
display: none;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:host([disabled]) .Button {
|
|
69
|
+
pointer-events: none;
|
|
70
|
+
}
|
|
71
|
+
`;
|
|
72
|
+
/**
|
|
73
|
+
* `<dui-sidebar-menu-button>` — Interactive button or link within a sidebar menu.
|
|
74
|
+
*
|
|
75
|
+
* Renders as a `<button>` by default, or an `<a>` when `href` is set.
|
|
76
|
+
* Supports icon-collapsed mode where only the icon is visible, with an
|
|
77
|
+
* optional tooltip.
|
|
78
|
+
*
|
|
79
|
+
* @slot icon - Icon slot, shown before the label.
|
|
80
|
+
* @slot - Default slot for label text.
|
|
81
|
+
* @slot suffix - Suffix slot, shown after the label.
|
|
82
|
+
* @fires spa-navigate - Fired on normal link clicks. Detail: { href: string }
|
|
83
|
+
*/
|
|
84
|
+
export class DuiSidebarMenuButton extends LitElement {
|
|
85
|
+
static { this.tagName = "dui-sidebar-menu-button"; }
|
|
86
|
+
static { this.styles = [base, styles]; }
|
|
87
|
+
#size_accessor_storage = "default";
|
|
88
|
+
/** Size variant for the button. */
|
|
89
|
+
get size() { return this.#size_accessor_storage; }
|
|
90
|
+
set size(value) { this.#size_accessor_storage = value; }
|
|
91
|
+
#active_accessor_storage = false;
|
|
92
|
+
/** Whether the button is in active/selected state. */
|
|
93
|
+
get active() { return this.#active_accessor_storage; }
|
|
94
|
+
set active(value) { this.#active_accessor_storage = value; }
|
|
95
|
+
#disabled_accessor_storage = false;
|
|
96
|
+
/** Whether the button is disabled. */
|
|
97
|
+
get disabled() { return this.#disabled_accessor_storage; }
|
|
98
|
+
set disabled(value) { this.#disabled_accessor_storage = value; }
|
|
99
|
+
#tooltip_accessor_storage = "";
|
|
100
|
+
/** Tooltip text shown when sidebar is icon-collapsed. */
|
|
101
|
+
get tooltip() { return this.#tooltip_accessor_storage; }
|
|
102
|
+
set tooltip(value) { this.#tooltip_accessor_storage = value; }
|
|
103
|
+
#href_accessor_storage = undefined;
|
|
104
|
+
/** When set, renders as an anchor tag instead of a button. */
|
|
105
|
+
get href() { return this.#href_accessor_storage; }
|
|
106
|
+
set href(value) { this.#href_accessor_storage = value; }
|
|
107
|
+
#ctx = new ContextConsumer(this, {
|
|
108
|
+
context: sidebarContext,
|
|
109
|
+
subscribe: true,
|
|
110
|
+
});
|
|
111
|
+
get #isIconCollapsed() {
|
|
112
|
+
const ctx = this.#ctx.value;
|
|
113
|
+
return ctx?.collapsible === "icon" && ctx?.state === "collapsed";
|
|
114
|
+
}
|
|
115
|
+
#onLinkClick = (event) => {
|
|
116
|
+
if (this.disabled) {
|
|
117
|
+
event.preventDefault();
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
if (this.href &&
|
|
121
|
+
!(event.metaKey || event.ctrlKey || event.shiftKey || event.altKey)) {
|
|
122
|
+
event.preventDefault();
|
|
123
|
+
this.dispatchEvent(new CustomEvent("spa-navigate", {
|
|
124
|
+
detail: { href: this.href },
|
|
125
|
+
bubbles: true,
|
|
126
|
+
composed: true,
|
|
127
|
+
}));
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
#renderButton() {
|
|
131
|
+
return html `
|
|
132
|
+
<button
|
|
133
|
+
class="Button"
|
|
134
|
+
?disabled=${this.disabled}
|
|
135
|
+
?data-active=${this.active}
|
|
136
|
+
>
|
|
137
|
+
<slot name="icon"></slot>
|
|
138
|
+
<span class="Label"><slot></slot></span>
|
|
139
|
+
<span class="Suffix"><slot name="suffix"></slot></span>
|
|
140
|
+
</button>
|
|
141
|
+
`;
|
|
142
|
+
}
|
|
143
|
+
#renderLink() {
|
|
144
|
+
return html `
|
|
145
|
+
<a
|
|
146
|
+
class="Button"
|
|
147
|
+
href=${this.href ?? nothing}
|
|
148
|
+
aria-disabled=${this.disabled || nothing}
|
|
149
|
+
?data-active=${this.active}
|
|
150
|
+
@click=${this.#onLinkClick}
|
|
151
|
+
>
|
|
152
|
+
<slot name="icon"></slot>
|
|
153
|
+
<span class="Label"><slot></slot></span>
|
|
154
|
+
<span class="Suffix"><slot name="suffix"></slot></span>
|
|
155
|
+
</a>
|
|
156
|
+
`;
|
|
157
|
+
}
|
|
158
|
+
#renderContent() {
|
|
159
|
+
const iconCollapsed = this.#isIconCollapsed;
|
|
160
|
+
return html `
|
|
161
|
+
<div
|
|
162
|
+
class="Row"
|
|
163
|
+
?data-icon-collapsed=${iconCollapsed}
|
|
164
|
+
?data-active=${this.active}
|
|
165
|
+
>
|
|
166
|
+
${this.href !== undefined ? this.#renderLink() : this.#renderButton()}
|
|
167
|
+
</div>
|
|
168
|
+
`;
|
|
169
|
+
}
|
|
170
|
+
render() {
|
|
171
|
+
const iconCollapsed = this.#isIconCollapsed;
|
|
172
|
+
if (iconCollapsed && this.tooltip) {
|
|
173
|
+
return html `
|
|
174
|
+
<dui-tooltip>
|
|
175
|
+
<dui-tooltip-trigger>
|
|
176
|
+
${this.#renderContent()}
|
|
177
|
+
</dui-tooltip-trigger>
|
|
178
|
+
<dui-tooltip-popup side="right">
|
|
179
|
+
${this.tooltip}
|
|
180
|
+
</dui-tooltip-popup>
|
|
181
|
+
</dui-tooltip>
|
|
182
|
+
`;
|
|
183
|
+
}
|
|
184
|
+
return this.#renderContent();
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
__decorate([
|
|
188
|
+
property({ reflect: true })
|
|
189
|
+
], DuiSidebarMenuButton.prototype, "size", null);
|
|
190
|
+
__decorate([
|
|
191
|
+
property({ type: Boolean, reflect: true })
|
|
192
|
+
], DuiSidebarMenuButton.prototype, "active", null);
|
|
193
|
+
__decorate([
|
|
194
|
+
property({ type: Boolean, reflect: true })
|
|
195
|
+
], DuiSidebarMenuButton.prototype, "disabled", null);
|
|
196
|
+
__decorate([
|
|
197
|
+
property()
|
|
198
|
+
], DuiSidebarMenuButton.prototype, "tooltip", null);
|
|
199
|
+
__decorate([
|
|
200
|
+
property()
|
|
201
|
+
], DuiSidebarMenuButton.prototype, "href", null);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Ported from original DUI: deep-future-app/app/client/components/dui/sidebar */
|
|
2
|
+
import { LitElement, type TemplateResult } from "lit";
|
|
3
|
+
/**
|
|
4
|
+
* `<dui-sidebar-menu-item>` — Individual navigation item in a sidebar menu.
|
|
5
|
+
*
|
|
6
|
+
* @slot - Default slot for a `<dui-sidebar-menu-button>` or other content.
|
|
7
|
+
*/
|
|
8
|
+
export declare class DuiSidebarMenuItem extends LitElement {
|
|
9
|
+
static tagName: "dui-sidebar-menu-item";
|
|
10
|
+
static styles: import("lit").CSSResult[];
|
|
11
|
+
render(): TemplateResult;
|
|
12
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** Ported from original DUI: deep-future-app/app/client/components/dui/sidebar */
|
|
2
|
+
import { css, html, LitElement } from "lit";
|
|
3
|
+
import { base } from "@deepfuture/dui-core/base";
|
|
4
|
+
const styles = css `
|
|
5
|
+
:host {
|
|
6
|
+
display: list-item;
|
|
7
|
+
}
|
|
8
|
+
`;
|
|
9
|
+
/**
|
|
10
|
+
* `<dui-sidebar-menu-item>` — Individual navigation item in a sidebar menu.
|
|
11
|
+
*
|
|
12
|
+
* @slot - Default slot for a `<dui-sidebar-menu-button>` or other content.
|
|
13
|
+
*/
|
|
14
|
+
export class DuiSidebarMenuItem extends LitElement {
|
|
15
|
+
static { this.tagName = "dui-sidebar-menu-item"; }
|
|
16
|
+
static { this.styles = [base, styles]; }
|
|
17
|
+
render() {
|
|
18
|
+
return html `<slot></slot>`;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** Ported from original DUI: deep-future-app/app/client/components/dui/sidebar */
|
|
2
|
+
import { LitElement, type TemplateResult } from "lit";
|
|
3
|
+
/**
|
|
4
|
+
* `<dui-sidebar-menu>` — Navigation list within a sidebar group.
|
|
5
|
+
*
|
|
6
|
+
* Renders a semantic `<ul>` for menu items.
|
|
7
|
+
*
|
|
8
|
+
* @slot - Default slot for `<dui-sidebar-menu-item>` elements.
|
|
9
|
+
*/
|
|
10
|
+
export declare class DuiSidebarMenu extends LitElement {
|
|
11
|
+
static tagName: "dui-sidebar-menu";
|
|
12
|
+
static styles: import("lit").CSSResult[];
|
|
13
|
+
render(): TemplateResult;
|
|
14
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/** Ported from original DUI: deep-future-app/app/client/components/dui/sidebar */
|
|
2
|
+
import { css, html, LitElement } from "lit";
|
|
3
|
+
import { base } from "@deepfuture/dui-core/base";
|
|
4
|
+
const styles = css `
|
|
5
|
+
.Menu {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
list-style: none;
|
|
9
|
+
margin: 0;
|
|
10
|
+
padding: 0;
|
|
11
|
+
}
|
|
12
|
+
`;
|
|
13
|
+
/**
|
|
14
|
+
* `<dui-sidebar-menu>` — Navigation list within a sidebar group.
|
|
15
|
+
*
|
|
16
|
+
* Renders a semantic `<ul>` for menu items.
|
|
17
|
+
*
|
|
18
|
+
* @slot - Default slot for `<dui-sidebar-menu-item>` elements.
|
|
19
|
+
*/
|
|
20
|
+
export class DuiSidebarMenu extends LitElement {
|
|
21
|
+
static { this.tagName = "dui-sidebar-menu"; }
|
|
22
|
+
static { this.styles = [base, styles]; }
|
|
23
|
+
render() {
|
|
24
|
+
return html `
|
|
25
|
+
<ul class="Menu" role="list">
|
|
26
|
+
<slot></slot>
|
|
27
|
+
</ul>
|
|
28
|
+
`;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/** Ported from original DUI: deep-future-app/app/client/components/dui/sidebar */
|
|
2
|
+
import { LitElement, type TemplateResult } from "lit";
|
|
3
|
+
export type SidebarOpenChangeDetail = {
|
|
4
|
+
open: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare const openChangeEvent: (detail: SidebarOpenChangeDetail) => CustomEvent<SidebarOpenChangeDetail>;
|
|
7
|
+
/**
|
|
8
|
+
* `<dui-sidebar-provider>` — Root state manager for the sidebar compound component.
|
|
9
|
+
*
|
|
10
|
+
* Manages open/close state, mobile detection, and provides context to all
|
|
11
|
+
* sidebar sub-components. Wraps the entire layout (sidebar + main content).
|
|
12
|
+
*
|
|
13
|
+
* @slot - Default slot for sidebar and content areas.
|
|
14
|
+
* @fires open-change - Fired when the sidebar opens or closes. Detail: { open: boolean }
|
|
15
|
+
*/
|
|
16
|
+
export declare class DuiSidebarProvider extends LitElement {
|
|
17
|
+
#private;
|
|
18
|
+
static tagName: "dui-sidebar-provider";
|
|
19
|
+
static styles: import("lit").CSSResult[];
|
|
20
|
+
/** Controls the sidebar open state (controlled mode). */
|
|
21
|
+
accessor open: boolean | undefined;
|
|
22
|
+
/** Initial open state for uncontrolled mode. Defaults to true. */
|
|
23
|
+
accessor defaultOpen: boolean;
|
|
24
|
+
/** Which side the sidebar appears on. */
|
|
25
|
+
accessor side: "left" | "right";
|
|
26
|
+
/** Visual variant of the sidebar. */
|
|
27
|
+
accessor variant: "sidebar" | "floating" | "inset";
|
|
28
|
+
/** How the sidebar collapses. */
|
|
29
|
+
accessor collapsible: "offcanvas" | "icon" | "none";
|
|
30
|
+
connectedCallback(): void;
|
|
31
|
+
disconnectedCallback(): void;
|
|
32
|
+
willUpdate(): void;
|
|
33
|
+
render(): TemplateResult;
|
|
34
|
+
}
|