@deepfuture/dui-components 0.0.9 → 0.0.11
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/_deprecated/center/index.d.ts +1 -0
- package/_deprecated/center/index.js +1 -0
- package/_deprecated/center/register.d.ts +1 -0
- package/_deprecated/center/register.js +4 -0
- package/_deprecated/hstack/index.d.ts +2 -0
- package/_deprecated/hstack/index.js +1 -0
- package/_deprecated/hstack/register.d.ts +1 -0
- package/_deprecated/hstack/register.js +4 -0
- package/_deprecated/page-inset/index.d.ts +1 -0
- package/_deprecated/page-inset/index.js +1 -0
- package/_deprecated/page-inset/register.d.ts +1 -0
- package/_deprecated/page-inset/register.js +4 -0
- package/_deprecated/vstack/index.d.ts +1 -0
- package/_deprecated/vstack/index.js +1 -0
- package/_deprecated/vstack/register.d.ts +1 -0
- package/_deprecated/vstack/register.js +4 -0
- package/accordion/index.d.ts +2 -5
- package/accordion/index.js +2 -5
- package/accordion/register.d.ts +1 -0
- package/accordion/register.js +8 -0
- package/alert-dialog/alert-dialog.d.ts +2 -0
- package/alert-dialog/alert-dialog.js +12 -6
- package/alert-dialog/index.d.ts +4 -9
- package/alert-dialog/index.js +4 -9
- package/alert-dialog/register.d.ts +1 -0
- package/alert-dialog/register.js +16 -0
- package/all.d.ts +16 -64
- package/all.js +132 -144
- package/avatar/index.d.ts +1 -3
- package/avatar/index.js +1 -3
- package/avatar/register.d.ts +1 -0
- package/avatar/register.js +4 -0
- package/badge/index.d.ts +1 -3
- package/badge/index.js +1 -3
- package/badge/register.d.ts +1 -0
- package/badge/register.js +4 -0
- package/breadcrumb/index.d.ts +6 -13
- package/breadcrumb/index.js +6 -13
- package/breadcrumb/register.d.ts +1 -0
- package/breadcrumb/register.js +14 -0
- package/button/index.d.ts +1 -3
- package/button/index.js +1 -3
- package/button/register.d.ts +1 -0
- package/button/register.js +4 -0
- package/calendar/index.d.ts +1 -3
- package/calendar/index.js +1 -3
- package/calendar/register.d.ts +1 -0
- package/calendar/register.js +4 -0
- package/checkbox/checkbox-group.d.ts +2 -0
- package/checkbox/checkbox-group.js +12 -6
- package/checkbox/checkbox.d.ts +2 -0
- package/checkbox/checkbox.js +17 -11
- package/checkbox/index.d.ts +2 -5
- package/checkbox/index.js +2 -5
- package/checkbox/register.d.ts +1 -0
- package/checkbox/register.js +8 -0
- package/collapsible/index.d.ts +1 -3
- package/collapsible/index.js +1 -3
- package/collapsible/register.d.ts +1 -0
- package/collapsible/register.js +4 -0
- package/combobox/index.d.ts +1 -3
- package/combobox/index.js +1 -3
- package/combobox/register.d.ts +1 -0
- package/combobox/register.js +4 -0
- package/command/index.d.ts +8 -17
- package/command/index.js +8 -17
- package/command/register.d.ts +1 -0
- package/command/register.js +22 -0
- package/data-table/index.d.ts +1 -3
- package/data-table/index.js +1 -3
- package/data-table/register.d.ts +1 -0
- package/data-table/register.js +4 -0
- package/dialog/dialog.d.ts +2 -0
- package/dialog/dialog.js +12 -6
- package/dialog/index.d.ts +4 -9
- package/dialog/index.js +4 -9
- package/dialog/register.d.ts +1 -0
- package/dialog/register.js +16 -0
- package/dropzone/index.d.ts +1 -3
- package/dropzone/index.js +1 -3
- package/dropzone/register.d.ts +1 -0
- package/dropzone/register.js +4 -0
- package/global.d.ts +0 -8
- package/icon/index.d.ts +1 -3
- package/icon/index.js +1 -3
- package/icon/register.d.ts +1 -0
- package/icon/register.js +4 -0
- package/input/index.d.ts +1 -3
- package/input/index.js +1 -3
- package/input/input.d.ts +2 -0
- package/input/input.js +24 -18
- package/input/register.d.ts +1 -0
- package/input/register.js +4 -0
- package/link/index.d.ts +1 -3
- package/link/index.js +1 -3
- package/link/register.d.ts +1 -0
- package/link/register.js +4 -0
- package/menu/index.d.ts +2 -5
- package/menu/index.js +2 -5
- package/menu/register.d.ts +1 -0
- package/menu/register.js +8 -0
- package/menubar/index.d.ts +1 -3
- package/menubar/index.js +1 -3
- package/menubar/menubar.d.ts +2 -0
- package/menubar/menubar.js +11 -5
- package/menubar/register.d.ts +1 -0
- package/menubar/register.js +4 -0
- package/number-field/index.d.ts +1 -3
- package/number-field/index.js +1 -3
- package/number-field/number-field.d.ts +2 -0
- package/number-field/number-field.js +18 -12
- package/number-field/register.d.ts +1 -0
- package/number-field/register.js +4 -0
- package/package.json +4 -21
- package/popover/index.d.ts +4 -9
- package/popover/index.js +4 -9
- package/popover/popover.d.ts +2 -1
- package/popover/popover.js +14 -8
- package/popover/register.d.ts +1 -0
- package/popover/register.js +16 -0
- package/portal/index.d.ts +1 -3
- package/portal/index.js +1 -3
- package/portal/register.d.ts +1 -0
- package/portal/register.js +4 -0
- package/preview-card/index.d.ts +3 -7
- package/preview-card/index.js +3 -7
- package/preview-card/preview-card.d.ts +2 -1
- package/preview-card/preview-card.js +14 -8
- package/preview-card/register.d.ts +1 -0
- package/preview-card/register.js +12 -0
- package/progress/index.d.ts +1 -3
- package/progress/index.js +1 -3
- package/progress/register.d.ts +1 -0
- package/progress/register.js +4 -0
- package/radio/index.d.ts +2 -5
- package/radio/index.js +2 -5
- package/radio/radio-group.d.ts +2 -0
- package/radio/radio-group.js +12 -6
- package/radio/radio.d.ts +2 -0
- package/radio/radio.js +15 -9
- package/radio/register.d.ts +1 -0
- package/radio/register.js +8 -0
- package/scroll-area/index.d.ts +1 -3
- package/scroll-area/index.js +1 -3
- package/scroll-area/register.d.ts +1 -0
- package/scroll-area/register.js +4 -0
- package/scroll-area/scroll-area.js +0 -7
- package/select/index.d.ts +1 -3
- package/select/index.js +1 -3
- package/select/register.d.ts +1 -0
- package/select/register.js +4 -0
- package/select/select.d.ts +2 -0
- package/select/select.js +19 -13
- package/separator/index.d.ts +1 -3
- package/separator/index.js +1 -3
- package/separator/register.d.ts +1 -0
- package/separator/register.js +4 -0
- package/sidebar/index.d.ts +13 -27
- package/sidebar/index.js +13 -32
- package/sidebar/register.d.ts +1 -0
- package/sidebar/register.js +52 -0
- package/sidebar/sidebar-provider.d.ts +2 -0
- package/sidebar/sidebar-provider.js +12 -6
- package/slider/index.d.ts +1 -3
- package/slider/index.js +1 -3
- package/slider/register.d.ts +1 -0
- package/slider/register.js +4 -0
- package/spinner/index.d.ts +1 -3
- package/spinner/index.js +1 -3
- package/spinner/register.d.ts +1 -0
- package/spinner/register.js +4 -0
- package/switch/index.d.ts +1 -3
- package/switch/index.js +1 -3
- package/switch/register.d.ts +1 -0
- package/switch/register.js +4 -0
- package/switch/switch.d.ts +2 -0
- package/switch/switch.js +15 -9
- package/tabs/index.d.ts +5 -11
- package/tabs/index.js +5 -11
- package/tabs/register.d.ts +1 -0
- package/tabs/register.js +10 -0
- package/textarea/index.d.ts +1 -3
- package/textarea/index.js +1 -3
- package/textarea/register.d.ts +1 -0
- package/textarea/register.js +4 -0
- package/toggle/index.d.ts +2 -5
- package/toggle/index.js +2 -5
- package/toggle/register.d.ts +1 -0
- package/toggle/register.js +8 -0
- package/toggle/toggle-group.d.ts +2 -0
- package/toggle/toggle-group.js +12 -6
- package/toggle/toggle.d.ts +2 -0
- package/toggle/toggle.js +15 -9
- package/toolbar/index.d.ts +1 -3
- package/toolbar/index.js +1 -3
- package/toolbar/register.d.ts +1 -0
- package/toolbar/register.js +4 -0
- package/tooltip/index.d.ts +3 -7
- package/tooltip/index.js +3 -7
- package/tooltip/register.d.ts +1 -0
- package/tooltip/register.js +12 -0
- package/tooltip/tooltip.d.ts +2 -1
- package/tooltip/tooltip.js +14 -8
- package/trunc/index.d.ts +1 -3
- package/trunc/index.js +1 -3
- package/trunc/register.d.ts +1 -0
- package/trunc/register.js +4 -0
- package/README.md +0 -191
- package/center/index.d.ts +0 -3
- package/center/index.js +0 -3
- package/hstack/index.d.ts +0 -4
- package/hstack/index.js +0 -3
- package/page-inset/index.d.ts +0 -3
- package/page-inset/index.js +0 -3
- package/vstack/index.d.ts +0 -3
- package/vstack/index.js +0 -3
- /package/{center → _deprecated/center}/center.d.ts +0 -0
- /package/{center → _deprecated/center}/center.js +0 -0
- /package/{hstack → _deprecated/hstack}/hstack.d.ts +0 -0
- /package/{hstack → _deprecated/hstack}/hstack.js +0 -0
- /package/{page-inset → _deprecated/page-inset}/page-inset.d.ts +0 -0
- /package/{page-inset → _deprecated/page-inset}/page-inset.js +0 -0
- /package/{vstack → _deprecated/vstack}/vstack.d.ts +0 -0
- /package/{vstack → _deprecated/vstack}/vstack.js +0 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DuiCheckbox } from "./checkbox.js";
|
|
2
|
+
import { DuiCheckboxGroup } from "./checkbox-group.js";
|
|
3
|
+
if (!customElements.get(DuiCheckbox.tagName)) {
|
|
4
|
+
customElements.define(DuiCheckbox.tagName, DuiCheckbox);
|
|
5
|
+
}
|
|
6
|
+
if (!customElements.get(DuiCheckboxGroup.tagName)) {
|
|
7
|
+
customElements.define(DuiCheckboxGroup.tagName, DuiCheckboxGroup);
|
|
8
|
+
}
|
package/collapsible/index.d.ts
CHANGED
package/collapsible/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/combobox/index.d.ts
CHANGED
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export { DuiCombobox, valueChangeEvent, valuesChangeEvent, };
|
|
3
|
-
export declare const comboboxFamily: (typeof DuiCombobox)[];
|
|
1
|
+
export { DuiCombobox, valueChangeEvent, valuesChangeEvent, } from "./combobox.js";
|
|
4
2
|
export type { SelectOption, ComboboxValueChangeDetail, ComboboxValuesChangeDetail, } from "./combobox.js";
|
package/combobox/index.js
CHANGED
|
@@ -1,3 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { DuiCombobox, valueChangeEvent, valuesChangeEvent, };
|
|
3
|
-
export const comboboxFamily = [DuiCombobox];
|
|
1
|
+
export { DuiCombobox, valueChangeEvent, valuesChangeEvent, } from "./combobox.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/command/index.d.ts
CHANGED
|
@@ -1,19 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
|
|
4
|
-
export {
|
|
5
|
-
|
|
6
|
-
export {
|
|
7
|
-
|
|
8
|
-
export {
|
|
9
|
-
import { DuiCommandItem } from "./command-item.js";
|
|
10
|
-
export { DuiCommandItem };
|
|
11
|
-
import { DuiCommandEmpty } from "./command-empty.js";
|
|
12
|
-
export { DuiCommandEmpty };
|
|
13
|
-
import { DuiCommandSeparator } from "./command-separator.js";
|
|
14
|
-
export { DuiCommandSeparator };
|
|
15
|
-
import { DuiCommandShortcut } from "./command-shortcut.js";
|
|
16
|
-
export { DuiCommandShortcut };
|
|
1
|
+
export { DuiCommand } from "./command.js";
|
|
2
|
+
export { DuiCommandInput } from "./command-input.js";
|
|
3
|
+
export { DuiCommandList } from "./command-list.js";
|
|
4
|
+
export { DuiCommandGroup } from "./command-group.js";
|
|
5
|
+
export { DuiCommandItem } from "./command-item.js";
|
|
6
|
+
export { DuiCommandEmpty } from "./command-empty.js";
|
|
7
|
+
export { DuiCommandSeparator } from "./command-separator.js";
|
|
8
|
+
export { DuiCommandShortcut } from "./command-shortcut.js";
|
|
17
9
|
export type { CommandContext, CommandItemEntry } from "./command-context.js";
|
|
18
10
|
export { commandScore } from "./command-score.js";
|
|
19
|
-
export declare const commandFamily: (typeof DuiCommand | typeof DuiCommandInput | typeof DuiCommandList | typeof DuiCommandGroup | typeof DuiCommandItem | typeof DuiCommandEmpty | typeof DuiCommandSeparator | typeof DuiCommandShortcut)[];
|
package/command/index.js
CHANGED
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
|
|
4
|
-
export {
|
|
5
|
-
|
|
6
|
-
export {
|
|
7
|
-
|
|
8
|
-
export {
|
|
9
|
-
import { DuiCommandItem } from "./command-item.js";
|
|
10
|
-
export { DuiCommandItem };
|
|
11
|
-
import { DuiCommandEmpty } from "./command-empty.js";
|
|
12
|
-
export { DuiCommandEmpty };
|
|
13
|
-
import { DuiCommandSeparator } from "./command-separator.js";
|
|
14
|
-
export { DuiCommandSeparator };
|
|
15
|
-
import { DuiCommandShortcut } from "./command-shortcut.js";
|
|
16
|
-
export { DuiCommandShortcut };
|
|
1
|
+
export { DuiCommand } from "./command.js";
|
|
2
|
+
export { DuiCommandInput } from "./command-input.js";
|
|
3
|
+
export { DuiCommandList } from "./command-list.js";
|
|
4
|
+
export { DuiCommandGroup } from "./command-group.js";
|
|
5
|
+
export { DuiCommandItem } from "./command-item.js";
|
|
6
|
+
export { DuiCommandEmpty } from "./command-empty.js";
|
|
7
|
+
export { DuiCommandSeparator } from "./command-separator.js";
|
|
8
|
+
export { DuiCommandShortcut } from "./command-shortcut.js";
|
|
17
9
|
export { commandScore } from "./command-score.js";
|
|
18
|
-
export const commandFamily = [DuiCommand, DuiCommandInput, DuiCommandList, DuiCommandGroup, DuiCommandItem, DuiCommandEmpty, DuiCommandSeparator, DuiCommandShortcut];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { DuiCommand } from "./command.js";
|
|
2
|
+
import { DuiCommandInput } from "./command-input.js";
|
|
3
|
+
import { DuiCommandList } from "./command-list.js";
|
|
4
|
+
import { DuiCommandGroup } from "./command-group.js";
|
|
5
|
+
import { DuiCommandItem } from "./command-item.js";
|
|
6
|
+
import { DuiCommandEmpty } from "./command-empty.js";
|
|
7
|
+
import { DuiCommandSeparator } from "./command-separator.js";
|
|
8
|
+
import { DuiCommandShortcut } from "./command-shortcut.js";
|
|
9
|
+
for (const C of [
|
|
10
|
+
DuiCommand,
|
|
11
|
+
DuiCommandInput,
|
|
12
|
+
DuiCommandList,
|
|
13
|
+
DuiCommandGroup,
|
|
14
|
+
DuiCommandItem,
|
|
15
|
+
DuiCommandEmpty,
|
|
16
|
+
DuiCommandSeparator,
|
|
17
|
+
DuiCommandShortcut,
|
|
18
|
+
]) {
|
|
19
|
+
if (!customElements.get(C.tagName)) {
|
|
20
|
+
customElements.define(C.tagName, C);
|
|
21
|
+
}
|
|
22
|
+
}
|
package/data-table/index.d.ts
CHANGED
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export { DuiDataTable };
|
|
1
|
+
export { DuiDataTable } from "./data-table.js";
|
|
3
2
|
export type { ColumnDef, SortDirection, SortState, PageState } from "./data-table.js";
|
|
4
|
-
export declare const dataTableFamily: (typeof DuiDataTable)[];
|
package/data-table/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dialog/dialog.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** Ported from original DUI: deep-future-app/app/client/components/dui/dialog */
|
|
2
2
|
import { LitElement, type TemplateResult } from "lit";
|
|
3
|
+
import { type DialogContext } from "./dialog-context.js";
|
|
3
4
|
export type DialogOpenChangeDetail = {
|
|
4
5
|
open: boolean;
|
|
5
6
|
};
|
|
@@ -24,6 +25,7 @@ export declare class DuiDialog extends LitElement {
|
|
|
24
25
|
accessor open: boolean | undefined;
|
|
25
26
|
/** Initial open state for uncontrolled mode. */
|
|
26
27
|
accessor defaultOpen: boolean;
|
|
28
|
+
accessor _ctx: DialogContext;
|
|
27
29
|
connectedCallback(): void;
|
|
28
30
|
willUpdate(): void;
|
|
29
31
|
render(): TemplateResult;
|
package/dialog/dialog.js
CHANGED
|
@@ -6,9 +6,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
8
|
import { css, html, LitElement } from "lit";
|
|
9
|
-
import { property } from "lit/decorators.js";
|
|
9
|
+
import { property, state } from "lit/decorators.js";
|
|
10
|
+
import { provide } from "@lit/context";
|
|
10
11
|
import { base } from "@deepfuture/dui-core/base";
|
|
11
12
|
import { customEvent } from "@deepfuture/dui-core/event";
|
|
13
|
+
import { dialogContext } from "./dialog-context.js";
|
|
12
14
|
export const openChangeEvent = customEvent("open-change", { bubbles: true, composed: true });
|
|
13
15
|
const hostStyles = css `
|
|
14
16
|
:host {
|
|
@@ -61,9 +63,9 @@ export class DuiDialog extends LitElement {
|
|
|
61
63
|
}
|
|
62
64
|
this.dispatchEvent(openChangeEvent({ open: false }));
|
|
63
65
|
};
|
|
64
|
-
#
|
|
65
|
-
get
|
|
66
|
-
set
|
|
66
|
+
#_ctx_accessor_storage = this.#buildContext();
|
|
67
|
+
get _ctx() { return this.#_ctx_accessor_storage; }
|
|
68
|
+
set _ctx(value) { this.#_ctx_accessor_storage = value; }
|
|
67
69
|
#buildContext() {
|
|
68
70
|
return {
|
|
69
71
|
open: this.#isOpen,
|
|
@@ -80,10 +82,10 @@ export class DuiDialog extends LitElement {
|
|
|
80
82
|
if (this.open === undefined && this.defaultOpen) {
|
|
81
83
|
this.#internalOpen = true;
|
|
82
84
|
}
|
|
83
|
-
this
|
|
85
|
+
this._ctx = this.#buildContext();
|
|
84
86
|
}
|
|
85
87
|
willUpdate() {
|
|
86
|
-
this
|
|
88
|
+
this._ctx = this.#buildContext();
|
|
87
89
|
}
|
|
88
90
|
render() {
|
|
89
91
|
return html `<slot></slot>`;
|
|
@@ -95,3 +97,7 @@ __decorate([
|
|
|
95
97
|
__decorate([
|
|
96
98
|
property({ type: Boolean, attribute: "default-open" })
|
|
97
99
|
], DuiDialog.prototype, "defaultOpen", null);
|
|
100
|
+
__decorate([
|
|
101
|
+
provide({ context: dialogContext }),
|
|
102
|
+
state()
|
|
103
|
+
], DuiDialog.prototype, "_ctx", null);
|
package/dialog/index.d.ts
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
export { DuiDialog, openChangeEvent };
|
|
1
|
+
export { DuiDialog, openChangeEvent } from "./dialog.js";
|
|
3
2
|
export type { DialogOpenChangeDetail } from "./dialog.js";
|
|
4
|
-
|
|
5
|
-
export {
|
|
6
|
-
|
|
7
|
-
export { DuiDialogPopup };
|
|
8
|
-
import { DuiDialogClose } from "./dialog-close.js";
|
|
9
|
-
export { DuiDialogClose };
|
|
3
|
+
export { DuiDialogTrigger } from "./dialog-trigger.js";
|
|
4
|
+
export { DuiDialogPopup } from "./dialog-popup.js";
|
|
5
|
+
export { DuiDialogClose } from "./dialog-close.js";
|
|
10
6
|
export type { DialogContext } from "./dialog-context.js";
|
|
11
|
-
export declare const dialogFamily: (typeof DuiDialog | typeof DuiDialogTrigger | typeof DuiDialogPopup | typeof DuiDialogClose)[];
|
package/dialog/index.js
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
|
|
4
|
-
export {
|
|
5
|
-
import { DuiDialogPopup } from "./dialog-popup.js";
|
|
6
|
-
export { DuiDialogPopup };
|
|
7
|
-
import { DuiDialogClose } from "./dialog-close.js";
|
|
8
|
-
export { DuiDialogClose };
|
|
9
|
-
export const dialogFamily = [DuiDialog, DuiDialogTrigger, DuiDialogPopup, DuiDialogClose];
|
|
1
|
+
export { DuiDialog, openChangeEvent } from "./dialog.js";
|
|
2
|
+
export { DuiDialogTrigger } from "./dialog-trigger.js";
|
|
3
|
+
export { DuiDialogPopup } from "./dialog-popup.js";
|
|
4
|
+
export { DuiDialogClose } from "./dialog-close.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DuiDialog } from "./dialog.js";
|
|
2
|
+
import { DuiDialogTrigger } from "./dialog-trigger.js";
|
|
3
|
+
import { DuiDialogPopup } from "./dialog-popup.js";
|
|
4
|
+
import { DuiDialogClose } from "./dialog-close.js";
|
|
5
|
+
if (!customElements.get(DuiDialog.tagName)) {
|
|
6
|
+
customElements.define(DuiDialog.tagName, DuiDialog);
|
|
7
|
+
}
|
|
8
|
+
if (!customElements.get(DuiDialogTrigger.tagName)) {
|
|
9
|
+
customElements.define(DuiDialogTrigger.tagName, DuiDialogTrigger);
|
|
10
|
+
}
|
|
11
|
+
if (!customElements.get(DuiDialogPopup.tagName)) {
|
|
12
|
+
customElements.define(DuiDialogPopup.tagName, DuiDialogPopup);
|
|
13
|
+
}
|
|
14
|
+
if (!customElements.get(DuiDialogClose.tagName)) {
|
|
15
|
+
customElements.define(DuiDialogClose.tagName, DuiDialogClose);
|
|
16
|
+
}
|
package/dropzone/index.d.ts
CHANGED
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export { DuiDropzone, dropzoneDropEvent, dropAcceptedEvent, dropRejectedEvent, dropzoneErrorEvent };
|
|
1
|
+
export { DuiDropzone, dropzoneDropEvent, dropAcceptedEvent, dropRejectedEvent, dropzoneErrorEvent } from "./dropzone.js";
|
|
3
2
|
export type { DropzoneErrorCode, DropzoneRejectionCode, FileRejectionError, RejectedFile, DropzoneDropDetail, DropzoneAcceptedDetail, DropzoneRejectedDetail, DropzoneErrorDetail, } from "./dropzone.js";
|
|
4
|
-
export declare const dropzoneFamily: (typeof DuiDropzone)[];
|
package/dropzone/index.js
CHANGED
|
@@ -1,3 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { DuiDropzone, dropzoneDropEvent, dropAcceptedEvent, dropRejectedEvent, dropzoneErrorEvent };
|
|
3
|
-
export const dropzoneFamily = [DuiDropzone];
|
|
1
|
+
export { DuiDropzone, dropzoneDropEvent, dropAcceptedEvent, dropRejectedEvent, dropzoneErrorEvent } from "./dropzone.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/global.d.ts
CHANGED
|
@@ -22,7 +22,6 @@ import type { DuiBreadcrumbSeparator } from "./breadcrumb/breadcrumb-separator.j
|
|
|
22
22
|
import type { DuiBreadcrumbEllipsis } from "./breadcrumb/breadcrumb-ellipsis.js";
|
|
23
23
|
import type { DuiButton } from "./button/button.js";
|
|
24
24
|
import type { DuiCalendar } from "./calendar/calendar.js";
|
|
25
|
-
import type { DuiCenter } from "./center/center.js";
|
|
26
25
|
import type { DuiCheckbox } from "./checkbox/checkbox.js";
|
|
27
26
|
import type { DuiCheckboxGroup } from "./checkbox/checkbox-group.js";
|
|
28
27
|
import type { DuiCollapsible } from "./collapsible/collapsible.js";
|
|
@@ -41,7 +40,6 @@ import type { DuiDialogTrigger } from "./dialog/dialog-trigger.js";
|
|
|
41
40
|
import type { DuiDialogPopup } from "./dialog/dialog-popup.js";
|
|
42
41
|
import type { DuiDialogClose } from "./dialog/dialog-close.js";
|
|
43
42
|
import type { DuiDropzone } from "./dropzone/dropzone.js";
|
|
44
|
-
import type { DuiHstack } from "./hstack/hstack.js";
|
|
45
43
|
import type { DuiIcon } from "./icon/icon.js";
|
|
46
44
|
import type { DuiInput } from "./input/input.js";
|
|
47
45
|
import type { DuiLink } from "./link/link.js";
|
|
@@ -49,7 +47,6 @@ import type { DuiMenu } from "./menu/menu.js";
|
|
|
49
47
|
import type { DuiMenuItem } from "./menu/menu-item.js";
|
|
50
48
|
import type { DuiMenubar } from "./menubar/menubar.js";
|
|
51
49
|
import type { DuiNumberField } from "./number-field/number-field.js";
|
|
52
|
-
import type { DuiPageInset } from "./page-inset/page-inset.js";
|
|
53
50
|
import type { DuiPopover } from "./popover/popover.js";
|
|
54
51
|
import type { DuiPopoverTrigger } from "./popover/popover-trigger.js";
|
|
55
52
|
import type { DuiPopoverPopup } from "./popover/popover-popup.js";
|
|
@@ -93,7 +90,6 @@ import type { DuiTooltip } from "./tooltip/tooltip.js";
|
|
|
93
90
|
import type { DuiTooltipTrigger } from "./tooltip/tooltip-trigger.js";
|
|
94
91
|
import type { DuiTooltipPopup } from "./tooltip/tooltip-popup.js";
|
|
95
92
|
import type { DuiTrunc } from "./trunc/trunc.js";
|
|
96
|
-
import type { DuiVstack } from "./vstack/vstack.js";
|
|
97
93
|
|
|
98
94
|
declare global {
|
|
99
95
|
interface HTMLElementTagNameMap {
|
|
@@ -113,7 +109,6 @@ declare global {
|
|
|
113
109
|
"dui-breadcrumb-ellipsis": DuiBreadcrumbEllipsis;
|
|
114
110
|
"dui-button": DuiButton;
|
|
115
111
|
"dui-calendar": DuiCalendar;
|
|
116
|
-
"dui-center": DuiCenter;
|
|
117
112
|
"dui-checkbox": DuiCheckbox;
|
|
118
113
|
"dui-checkbox-group": DuiCheckboxGroup;
|
|
119
114
|
"dui-collapsible": DuiCollapsible;
|
|
@@ -132,7 +127,6 @@ declare global {
|
|
|
132
127
|
"dui-dialog-popup": DuiDialogPopup;
|
|
133
128
|
"dui-dialog-close": DuiDialogClose;
|
|
134
129
|
"dui-dropzone": DuiDropzone;
|
|
135
|
-
"dui-hstack": DuiHstack;
|
|
136
130
|
"dui-icon": DuiIcon;
|
|
137
131
|
"dui-input": DuiInput;
|
|
138
132
|
"dui-link": DuiLink;
|
|
@@ -140,7 +134,6 @@ declare global {
|
|
|
140
134
|
"dui-menu-item": DuiMenuItem;
|
|
141
135
|
"dui-menubar": DuiMenubar;
|
|
142
136
|
"dui-number-field": DuiNumberField;
|
|
143
|
-
"dui-page-inset": DuiPageInset;
|
|
144
137
|
"dui-popover": DuiPopover;
|
|
145
138
|
"dui-popover-trigger": DuiPopoverTrigger;
|
|
146
139
|
"dui-popover-popup": DuiPopoverPopup;
|
|
@@ -184,6 +177,5 @@ declare global {
|
|
|
184
177
|
"dui-tooltip-trigger": DuiTooltipTrigger;
|
|
185
178
|
"dui-tooltip-popup": DuiTooltipPopup;
|
|
186
179
|
"dui-trunc": DuiTrunc;
|
|
187
|
-
"dui-vstack": DuiVstack;
|
|
188
180
|
}
|
|
189
181
|
}
|
package/icon/index.d.ts
CHANGED
package/icon/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/icon/register.js
ADDED
package/input/index.d.ts
CHANGED
package/input/index.js
CHANGED
package/input/input.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** Ported from original DUI: deep-future-app/app/client/components/dui/input */
|
|
2
2
|
import { LitElement, type TemplateResult } from "lit";
|
|
3
|
+
import { type FieldContext } from "@deepfuture/dui-components/field";
|
|
3
4
|
export declare const inputChangeEvent: (detail: {
|
|
4
5
|
value: string;
|
|
5
6
|
}) => CustomEvent<{
|
|
@@ -42,6 +43,7 @@ export declare class DuiInput extends LitElement {
|
|
|
42
43
|
accessor autocomplete: string | undefined;
|
|
43
44
|
/** Whether the input should receive focus on mount. */
|
|
44
45
|
accessor autofocus: boolean;
|
|
46
|
+
accessor _fieldCtx: FieldContext;
|
|
45
47
|
firstUpdated(): void;
|
|
46
48
|
render(): TemplateResult;
|
|
47
49
|
}
|
package/input/input.js
CHANGED
|
@@ -6,10 +6,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
8
|
import { css, html, LitElement } from "lit";
|
|
9
|
-
import { property } from "lit/decorators.js";
|
|
9
|
+
import { property, state } from "lit/decorators.js";
|
|
10
|
+
import { consume } from "@lit/context";
|
|
10
11
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
11
12
|
import { live } from "lit/directives/live.js";
|
|
12
13
|
import { base } from "@deepfuture/dui-core/base";
|
|
14
|
+
import { fieldContext } from "@deepfuture/dui-components/field";
|
|
13
15
|
import { customEvent } from "@deepfuture/dui-core/event";
|
|
14
16
|
export const inputChangeEvent = customEvent("input-change", {
|
|
15
17
|
bubbles: true,
|
|
@@ -94,23 +96,23 @@ export class DuiInput extends LitElement {
|
|
|
94
96
|
/** Whether the input should receive focus on mount. */
|
|
95
97
|
get autofocus() { return this.#autofocus_accessor_storage; }
|
|
96
98
|
set autofocus(value) { this.#autofocus_accessor_storage = value; }
|
|
97
|
-
#
|
|
98
|
-
get
|
|
99
|
-
set
|
|
99
|
+
#_fieldCtx_accessor_storage;
|
|
100
|
+
get _fieldCtx() { return this.#_fieldCtx_accessor_storage; }
|
|
101
|
+
set _fieldCtx(value) { this.#_fieldCtx_accessor_storage = value; }
|
|
100
102
|
get #controlId() {
|
|
101
|
-
return this
|
|
103
|
+
return this._fieldCtx?.controlId ?? "";
|
|
102
104
|
}
|
|
103
105
|
get #descriptionId() {
|
|
104
|
-
return this
|
|
106
|
+
return this._fieldCtx?.descriptionId;
|
|
105
107
|
}
|
|
106
108
|
get #errorId() {
|
|
107
|
-
return this
|
|
109
|
+
return this._fieldCtx?.errorId;
|
|
108
110
|
}
|
|
109
111
|
get #isDisabled() {
|
|
110
|
-
return this.disabled || (this
|
|
112
|
+
return this.disabled || (this._fieldCtx?.disabled ?? false);
|
|
111
113
|
}
|
|
112
114
|
get #isInvalid() {
|
|
113
|
-
return this
|
|
115
|
+
return this._fieldCtx?.invalid ?? false;
|
|
114
116
|
}
|
|
115
117
|
firstUpdated() {
|
|
116
118
|
if (this.autofocus) {
|
|
@@ -120,16 +122,16 @@ export class DuiInput extends LitElement {
|
|
|
120
122
|
#onInput = (event) => {
|
|
121
123
|
const target = event.target;
|
|
122
124
|
this.value = target.value;
|
|
123
|
-
this
|
|
124
|
-
this
|
|
125
|
+
this._fieldCtx?.markDirty();
|
|
126
|
+
this._fieldCtx?.setFilled(this.value.length > 0);
|
|
125
127
|
this.dispatchEvent(inputChangeEvent({ value: this.value }));
|
|
126
128
|
};
|
|
127
129
|
#onFocus = () => {
|
|
128
|
-
this
|
|
130
|
+
this._fieldCtx?.setFocused(true);
|
|
129
131
|
};
|
|
130
132
|
#onBlur = () => {
|
|
131
|
-
this
|
|
132
|
-
this
|
|
133
|
+
this._fieldCtx?.setFocused(false);
|
|
134
|
+
this._fieldCtx?.markTouched();
|
|
133
135
|
};
|
|
134
136
|
render() {
|
|
135
137
|
const describedBy = [this.#descriptionId, this.#isInvalid ? this.#errorId : undefined]
|
|
@@ -155,10 +157,10 @@ export class DuiInput extends LitElement {
|
|
|
155
157
|
?data-disabled="${this.#isDisabled}"
|
|
156
158
|
?data-invalid="${this.#isInvalid}"
|
|
157
159
|
?data-valid="${!this.#isInvalid}"
|
|
158
|
-
?data-dirty="${this
|
|
159
|
-
?data-touched="${this
|
|
160
|
-
?data-filled="${this
|
|
161
|
-
?data-focused="${this
|
|
160
|
+
?data-dirty="${this._fieldCtx?.dirty}"
|
|
161
|
+
?data-touched="${this._fieldCtx?.touched}"
|
|
162
|
+
?data-filled="${this._fieldCtx?.filled}"
|
|
163
|
+
?data-focused="${this._fieldCtx?.focused}"
|
|
162
164
|
@input="${this.#onInput}"
|
|
163
165
|
@focus="${this.#onFocus}"
|
|
164
166
|
@blur="${this.#onBlur}"
|
|
@@ -202,3 +204,7 @@ __decorate([
|
|
|
202
204
|
__decorate([
|
|
203
205
|
property({ type: Boolean })
|
|
204
206
|
], DuiInput.prototype, "autofocus", null);
|
|
207
|
+
__decorate([
|
|
208
|
+
consume({ context: fieldContext, subscribe: true }),
|
|
209
|
+
state()
|
|
210
|
+
], DuiInput.prototype, "_fieldCtx", null);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/link/index.d.ts
CHANGED
package/link/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/link/register.js
ADDED
package/menu/index.d.ts
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
import { DuiMenuItem } from "./menu-item.js";
|
|
4
|
-
export { DuiMenuItem };
|
|
5
|
-
export declare const menuFamily: (typeof DuiMenuItem | typeof DuiMenu)[];
|
|
1
|
+
export { DuiMenu } from "./menu.js";
|
|
2
|
+
export { DuiMenuItem } from "./menu-item.js";
|
package/menu/index.js
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
import { DuiMenuItem } from "./menu-item.js";
|
|
4
|
-
export { DuiMenuItem };
|
|
5
|
-
export const menuFamily = [DuiMenu, DuiMenuItem];
|
|
1
|
+
export { DuiMenu } from "./menu.js";
|
|
2
|
+
export { DuiMenuItem } from "./menu-item.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/menu/register.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DuiMenu } from "./menu.js";
|
|
2
|
+
import { DuiMenuItem } from "./menu-item.js";
|
|
3
|
+
if (!customElements.get(DuiMenu.tagName)) {
|
|
4
|
+
customElements.define(DuiMenu.tagName, DuiMenu);
|
|
5
|
+
}
|
|
6
|
+
if (!customElements.get(DuiMenuItem.tagName)) {
|
|
7
|
+
customElements.define(DuiMenuItem.tagName, DuiMenuItem);
|
|
8
|
+
}
|
package/menubar/index.d.ts
CHANGED
package/menubar/index.js
CHANGED
package/menubar/menubar.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LitElement, type TemplateResult } from "lit";
|
|
2
|
+
import { type MenubarContext } from "./menubar-context.js";
|
|
2
3
|
/**
|
|
3
4
|
* `<dui-menubar>` — A horizontal bar of menus with coordinated open/close.
|
|
4
5
|
*
|
|
@@ -14,6 +15,7 @@ export declare class DuiMenubar extends LitElement {
|
|
|
14
15
|
static styles: import("lit").CSSResult[];
|
|
15
16
|
accessor loop: boolean;
|
|
16
17
|
accessor orientation: "horizontal" | "vertical";
|
|
18
|
+
accessor _ctx: MenubarContext;
|
|
17
19
|
willUpdate(): void;
|
|
18
20
|
render(): TemplateResult;
|
|
19
21
|
}
|