@deepfuture/dui-components 0.0.12 → 0.0.14
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/center.js +2 -2
- package/_deprecated/hstack/hstack.js +79 -33
- package/_deprecated/page-inset/page-inset.js +104 -56
- package/_deprecated/vstack/vstack.js +61 -19
- package/accordion/accordion-item.js +217 -147
- package/accordion/accordion.js +214 -149
- package/alert-dialog/alert-dialog-close.js +2 -2
- package/alert-dialog/alert-dialog-popup.js +230 -166
- package/alert-dialog/alert-dialog-trigger.js +2 -2
- package/alert-dialog/alert-dialog.js +128 -73
- package/avatar/avatar.js +175 -115
- package/badge/badge.js +2 -2
- package/breadcrumb/breadcrumb-ellipsis.js +2 -2
- package/breadcrumb/breadcrumb-item.js +2 -2
- package/breadcrumb/breadcrumb-link.js +2 -2
- package/breadcrumb/breadcrumb-page.js +2 -2
- package/breadcrumb/breadcrumb-separator.js +2 -2
- package/breadcrumb/breadcrumb.js +2 -2
- package/button/button.js +109 -65
- package/calendar/calendar.js +368 -290
- package/checkbox/checkbox-group.js +146 -87
- package/checkbox/checkbox.js +232 -167
- package/collapsible/collapsible.js +210 -132
- package/combobox/combobox.js +318 -252
- package/command/command-empty.js +67 -25
- package/command/command-group.js +87 -47
- package/command/command-input.js +84 -44
- package/command/command-item.js +168 -124
- package/command/command-list.js +60 -18
- package/command/command-separator.js +2 -2
- package/command/command-shortcut.js +2 -2
- package/command/command.js +297 -232
- package/data-table/data-table.js +225 -153
- package/dialog/dialog-close.js +2 -2
- package/dialog/dialog-popup.js +247 -181
- package/dialog/dialog-trigger.js +2 -2
- package/dialog/dialog.js +128 -73
- package/dropzone/dropzone.js +310 -249
- package/icon/icon.js +2 -2
- package/input/input.js +204 -143
- package/link/link.js +62 -24
- package/menu/menu-item.js +66 -24
- package/menu/menu.js +189 -136
- package/menubar/menubar.js +142 -91
- package/number-field/number-field.js +277 -204
- package/package.json +2 -3
- package/popover/popover-close.js +2 -2
- package/popover/popover-popup.js +126 -76
- package/popover/popover-trigger.js +2 -2
- package/popover/popover.js +181 -120
- package/portal/portal.js +128 -86
- package/preview-card/preview-card-popup.js +114 -66
- package/preview-card/preview-card-trigger.js +2 -2
- package/preview-card/preview-card.js +211 -142
- package/progress/progress.js +91 -45
- package/radio/radio-group.js +153 -90
- package/radio/radio.js +137 -94
- package/scroll-area/scroll-area.js +382 -283
- package/select/select.js +260 -203
- package/separator/separator.js +60 -18
- package/sidebar/sidebar-content.js +2 -2
- package/sidebar/sidebar-footer.js +2 -2
- package/sidebar/sidebar-group-label.js +2 -2
- package/sidebar/sidebar-group.js +2 -2
- package/sidebar/sidebar-header.js +2 -2
- package/sidebar/sidebar-inset.js +2 -2
- package/sidebar/sidebar-menu-button.js +118 -74
- package/sidebar/sidebar-menu-item.js +2 -2
- package/sidebar/sidebar-menu.js +2 -2
- package/sidebar/sidebar-provider.js +202 -129
- package/sidebar/sidebar-separator.js +2 -2
- package/sidebar/sidebar-trigger.js +2 -2
- package/sidebar/sidebar.js +150 -85
- package/slider/slider.js +217 -159
- package/spinner/spinner.js +70 -28
- package/switch/switch.js +174 -111
- package/tabs/tab.js +89 -47
- package/tabs/tabs-indicator.js +2 -2
- package/tabs/tabs-list.js +92 -54
- package/tabs/tabs-panel.js +90 -44
- package/tabs/tabs.js +130 -71
- package/textarea/textarea.js +153 -95
- package/toggle/toggle-group.js +184 -125
- package/toggle/toggle.js +131 -76
- package/toolbar/toolbar.js +79 -33
- package/tooltip/tooltip-popup.js +108 -60
- package/tooltip/tooltip-trigger.js +93 -55
- package/tooltip/tooltip.js +225 -154
- package/trunc/trunc.js +78 -34
package/command/command-item.js
CHANGED
|
@@ -1,9 +1,37 @@
|
|
|
1
1
|
/** Ported from original DUI: deep-future-app/app/client/components/dui/command */
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
3
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
4
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
5
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
6
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
7
|
+
var _, done = false;
|
|
8
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
9
|
+
var context = {};
|
|
10
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
11
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
12
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
13
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
14
|
+
if (kind === "accessor") {
|
|
15
|
+
if (result === void 0) continue;
|
|
16
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
17
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
18
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
19
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
20
|
+
}
|
|
21
|
+
else if (_ = accept(result)) {
|
|
22
|
+
if (kind === "field") initializers.unshift(_);
|
|
23
|
+
else descriptor[key] = _;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
27
|
+
done = true;
|
|
28
|
+
};
|
|
29
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
30
|
+
var useValue = arguments.length > 2;
|
|
31
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
32
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
33
|
+
}
|
|
34
|
+
return useValue ? value : void 0;
|
|
7
35
|
};
|
|
8
36
|
import { css, html, LitElement } from "lit";
|
|
9
37
|
import { property } from "lit/decorators.js";
|
|
@@ -30,121 +58,147 @@ const styles = css `
|
|
|
30
58
|
outline: none;
|
|
31
59
|
}
|
|
32
60
|
`;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
this.#
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
61
|
+
let DuiCommandItem = (() => {
|
|
62
|
+
let _classSuper = LitElement;
|
|
63
|
+
let _value_decorators;
|
|
64
|
+
let _value_initializers = [];
|
|
65
|
+
let _value_extraInitializers = [];
|
|
66
|
+
let _keywords_decorators;
|
|
67
|
+
let _keywords_initializers = [];
|
|
68
|
+
let _keywords_extraInitializers = [];
|
|
69
|
+
let _disabled_decorators;
|
|
70
|
+
let _disabled_initializers = [];
|
|
71
|
+
let _disabled_extraInitializers = [];
|
|
72
|
+
let __ctx_decorators;
|
|
73
|
+
let __ctx_initializers = [];
|
|
74
|
+
let __ctx_extraInitializers = [];
|
|
75
|
+
return class DuiCommandItem extends _classSuper {
|
|
76
|
+
static {
|
|
77
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
78
|
+
_value_decorators = [property({ type: String })];
|
|
79
|
+
_keywords_decorators = [property({ type: Array, attribute: false })];
|
|
80
|
+
_disabled_decorators = [property({ type: Boolean })];
|
|
81
|
+
__ctx_decorators = [consume({ context: commandContext, subscribe: true })];
|
|
82
|
+
__esDecorate(this, null, _value_decorators, { kind: "accessor", name: "value", static: false, private: false, access: { has: obj => "value" in obj, get: obj => obj.value, set: (obj, value) => { obj.value = value; } }, metadata: _metadata }, _value_initializers, _value_extraInitializers);
|
|
83
|
+
__esDecorate(this, null, _keywords_decorators, { kind: "accessor", name: "keywords", static: false, private: false, access: { has: obj => "keywords" in obj, get: obj => obj.keywords, set: (obj, value) => { obj.keywords = value; } }, metadata: _metadata }, _keywords_initializers, _keywords_extraInitializers);
|
|
84
|
+
__esDecorate(this, null, _disabled_decorators, { kind: "accessor", name: "disabled", static: false, private: false, access: { has: obj => "disabled" in obj, get: obj => obj.disabled, set: (obj, value) => { obj.disabled = value; } }, metadata: _metadata }, _disabled_initializers, _disabled_extraInitializers);
|
|
85
|
+
__esDecorate(this, null, __ctx_decorators, { kind: "accessor", name: "_ctx", static: false, private: false, access: { has: obj => "_ctx" in obj, get: obj => obj._ctx, set: (obj, value) => { obj._ctx = value; } }, metadata: _metadata }, __ctx_initializers, __ctx_extraInitializers);
|
|
86
|
+
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
87
|
+
}
|
|
88
|
+
static tagName = "dui-command-item";
|
|
89
|
+
static styles = [base, styles];
|
|
90
|
+
#value_accessor_storage = __runInitializers(this, _value_initializers, "");
|
|
91
|
+
/** The value this item represents. */
|
|
92
|
+
get value() { return this.#value_accessor_storage; }
|
|
93
|
+
set value(value) { this.#value_accessor_storage = value; }
|
|
94
|
+
#keywords_accessor_storage = (__runInitializers(this, _value_extraInitializers), __runInitializers(this, _keywords_initializers, []));
|
|
95
|
+
/** Additional search keywords. */
|
|
96
|
+
get keywords() { return this.#keywords_accessor_storage; }
|
|
97
|
+
set keywords(value) { this.#keywords_accessor_storage = value; }
|
|
98
|
+
#disabled_accessor_storage = (__runInitializers(this, _keywords_extraInitializers), __runInitializers(this, _disabled_initializers, false));
|
|
99
|
+
/** Whether this item is disabled. */
|
|
100
|
+
get disabled() { return this.#disabled_accessor_storage; }
|
|
101
|
+
set disabled(value) { this.#disabled_accessor_storage = value; }
|
|
102
|
+
#_ctx_accessor_storage = (__runInitializers(this, _disabled_extraInitializers), __runInitializers(this, __ctx_initializers, void 0));
|
|
103
|
+
get _ctx() { return this.#_ctx_accessor_storage; }
|
|
104
|
+
set _ctx(value) { this.#_ctx_accessor_storage = value; }
|
|
105
|
+
#id = (__runInitializers(this, __ctx_extraInitializers), nextItemId());
|
|
106
|
+
// Track previous own-property values to avoid infinite update loops
|
|
107
|
+
#prevValue = undefined;
|
|
108
|
+
#prevKeywords = undefined;
|
|
109
|
+
#prevDisabled = undefined;
|
|
110
|
+
#registered = false;
|
|
111
|
+
get #isSelected() {
|
|
112
|
+
return this._ctx?.selectedItemId === this.#id;
|
|
113
|
+
}
|
|
114
|
+
get #isVisible() {
|
|
115
|
+
if (!this._ctx)
|
|
116
|
+
return true;
|
|
117
|
+
return this._ctx.getScore(this.#id) > 0;
|
|
118
|
+
}
|
|
119
|
+
#getGroupId() {
|
|
120
|
+
const groupHost = this.closest("[data-group-id]");
|
|
121
|
+
return groupHost?.getAttribute("data-group-id") ?? undefined;
|
|
122
|
+
}
|
|
123
|
+
#buildEntry() {
|
|
124
|
+
return {
|
|
125
|
+
id: this.#id,
|
|
126
|
+
value: this.value,
|
|
127
|
+
keywords: this.keywords,
|
|
128
|
+
textContent: this.textContent?.trim() ?? "",
|
|
129
|
+
disabled: this.disabled,
|
|
130
|
+
groupId: this.#getGroupId(),
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
connectedCallback() {
|
|
134
|
+
super.connectedCallback();
|
|
135
|
+
// Defer registration to next frame so context is available
|
|
136
|
+
requestAnimationFrame(() => {
|
|
137
|
+
if (!this.isConnected)
|
|
138
|
+
return;
|
|
139
|
+
this._ctx?.registerItem(this.#buildEntry());
|
|
140
|
+
this.#registered = true;
|
|
105
141
|
this.#prevValue = this.value;
|
|
106
142
|
this.#prevKeywords = this.keywords;
|
|
107
143
|
this.#prevDisabled = this.disabled;
|
|
108
|
-
}
|
|
144
|
+
});
|
|
109
145
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
146
|
+
disconnectedCallback() {
|
|
147
|
+
super.disconnectedCallback();
|
|
148
|
+
this._ctx?.unregisterItem(this.#id);
|
|
149
|
+
this.#registered = false;
|
|
150
|
+
}
|
|
151
|
+
willUpdate() {
|
|
152
|
+
// Only call updateItem when own properties change, not on every context update
|
|
153
|
+
if (this.#registered) {
|
|
154
|
+
const valueChanged = this.#prevValue !== this.value;
|
|
155
|
+
const keywordsChanged = this.#prevKeywords !== this.keywords;
|
|
156
|
+
const disabledChanged = this.#prevDisabled !== this.disabled;
|
|
157
|
+
if (valueChanged || keywordsChanged || disabledChanged) {
|
|
158
|
+
this._ctx?.updateItem(this.#buildEntry());
|
|
159
|
+
this.#prevValue = this.value;
|
|
160
|
+
this.#prevKeywords = this.keywords;
|
|
161
|
+
this.#prevDisabled = this.disabled;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
// Toggle data-hidden attribute
|
|
165
|
+
if (this._ctx?.shouldFilter) {
|
|
166
|
+
if (!this.#isVisible) {
|
|
167
|
+
this.setAttribute("data-hidden", "");
|
|
168
|
+
}
|
|
169
|
+
else {
|
|
170
|
+
this.removeAttribute("data-hidden");
|
|
171
|
+
}
|
|
114
172
|
}
|
|
115
173
|
else {
|
|
116
174
|
this.removeAttribute("data-hidden");
|
|
117
175
|
}
|
|
176
|
+
// Update selected attribute
|
|
177
|
+
if (this.#isSelected) {
|
|
178
|
+
this.setAttribute("data-selected", "");
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
this.removeAttribute("data-selected");
|
|
182
|
+
}
|
|
118
183
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
this.setAttribute("data-selected", "");
|
|
125
|
-
}
|
|
126
|
-
else {
|
|
127
|
-
this.removeAttribute("data-selected");
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
updated() {
|
|
131
|
-
// Scroll into view when selected
|
|
132
|
-
if (this.#isSelected) {
|
|
133
|
-
this.scrollIntoView({ block: "nearest" });
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
#handleMouseMove = () => {
|
|
137
|
-
if (!this.disabled && this._ctx?.selectedItemId !== this.#id) {
|
|
138
|
-
this._ctx?.selectItem(this.#id);
|
|
139
|
-
}
|
|
140
|
-
};
|
|
141
|
-
#handleClick = () => {
|
|
142
|
-
if (!this.disabled) {
|
|
143
|
-
this._ctx?.handleItemSelect(this.value);
|
|
184
|
+
updated() {
|
|
185
|
+
// Scroll into view when selected
|
|
186
|
+
if (this.#isSelected) {
|
|
187
|
+
this.scrollIntoView({ block: "nearest" });
|
|
188
|
+
}
|
|
144
189
|
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
190
|
+
#handleMouseMove = () => {
|
|
191
|
+
if (!this.disabled && this._ctx?.selectedItemId !== this.#id) {
|
|
192
|
+
this._ctx?.selectItem(this.#id);
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
#handleClick = () => {
|
|
196
|
+
if (!this.disabled) {
|
|
197
|
+
this._ctx?.handleItemSelect(this.value);
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
render() {
|
|
201
|
+
return html `
|
|
148
202
|
<div
|
|
149
203
|
class="Item"
|
|
150
204
|
role="option"
|
|
@@ -159,17 +213,7 @@ export class DuiCommandItem extends LitElement {
|
|
|
159
213
|
<slot></slot>
|
|
160
214
|
</div>
|
|
161
215
|
`;
|
|
162
|
-
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
], DuiCommandItem.prototype, "value", null);
|
|
167
|
-
__decorate([
|
|
168
|
-
property({ type: Array, attribute: false })
|
|
169
|
-
], DuiCommandItem.prototype, "keywords", null);
|
|
170
|
-
__decorate([
|
|
171
|
-
property({ type: Boolean })
|
|
172
|
-
], DuiCommandItem.prototype, "disabled", null);
|
|
173
|
-
__decorate([
|
|
174
|
-
consume({ context: commandContext, subscribe: true })
|
|
175
|
-
], DuiCommandItem.prototype, "_ctx", null);
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
})();
|
|
219
|
+
export { DuiCommandItem };
|
package/command/command-list.js
CHANGED
|
@@ -1,9 +1,37 @@
|
|
|
1
1
|
/** Ported from original DUI: deep-future-app/app/client/components/dui/command */
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
3
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
4
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
5
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
6
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
7
|
+
var _, done = false;
|
|
8
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
9
|
+
var context = {};
|
|
10
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
11
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
12
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
13
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
14
|
+
if (kind === "accessor") {
|
|
15
|
+
if (result === void 0) continue;
|
|
16
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
17
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
18
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
19
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
20
|
+
}
|
|
21
|
+
else if (_ = accept(result)) {
|
|
22
|
+
if (kind === "field") initializers.unshift(_);
|
|
23
|
+
else descriptor[key] = _;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
27
|
+
done = true;
|
|
28
|
+
};
|
|
29
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
30
|
+
var useValue = arguments.length > 2;
|
|
31
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
32
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
33
|
+
}
|
|
34
|
+
return useValue ? value : void 0;
|
|
7
35
|
};
|
|
8
36
|
import { css, html, LitElement } from "lit";
|
|
9
37
|
import { consume } from "@lit/context";
|
|
@@ -18,14 +46,25 @@ const styles = css `
|
|
|
18
46
|
overflow: hidden;
|
|
19
47
|
}
|
|
20
48
|
`;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
49
|
+
let DuiCommandList = (() => {
|
|
50
|
+
let _classSuper = LitElement;
|
|
51
|
+
let __ctx_decorators;
|
|
52
|
+
let __ctx_initializers = [];
|
|
53
|
+
let __ctx_extraInitializers = [];
|
|
54
|
+
return class DuiCommandList extends _classSuper {
|
|
55
|
+
static {
|
|
56
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
57
|
+
__ctx_decorators = [consume({ context: commandContext, subscribe: true })];
|
|
58
|
+
__esDecorate(this, null, __ctx_decorators, { kind: "accessor", name: "_ctx", static: false, private: false, access: { has: obj => "_ctx" in obj, get: obj => obj._ctx, set: (obj, value) => { obj._ctx = value; } }, metadata: _metadata }, __ctx_initializers, __ctx_extraInitializers);
|
|
59
|
+
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
60
|
+
}
|
|
61
|
+
static tagName = "dui-command-list";
|
|
62
|
+
static styles = [base, styles];
|
|
63
|
+
#_ctx_accessor_storage = __runInitializers(this, __ctx_initializers, void 0);
|
|
64
|
+
get _ctx() { return this.#_ctx_accessor_storage; }
|
|
65
|
+
set _ctx(value) { this.#_ctx_accessor_storage = value; }
|
|
66
|
+
render() {
|
|
67
|
+
return html `
|
|
29
68
|
<dui-scroll-area>
|
|
30
69
|
<div
|
|
31
70
|
class="List"
|
|
@@ -36,8 +75,11 @@ export class DuiCommandList extends LitElement {
|
|
|
36
75
|
</div>
|
|
37
76
|
</dui-scroll-area>
|
|
38
77
|
`;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
78
|
+
}
|
|
79
|
+
constructor() {
|
|
80
|
+
super(...arguments);
|
|
81
|
+
__runInitializers(this, __ctx_extraInitializers);
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
})();
|
|
85
|
+
export { DuiCommandList };
|
|
@@ -7,8 +7,8 @@ const styles = css `
|
|
|
7
7
|
}
|
|
8
8
|
`;
|
|
9
9
|
export class DuiCommandSeparator extends LitElement {
|
|
10
|
-
static
|
|
11
|
-
static
|
|
10
|
+
static tagName = "dui-command-separator";
|
|
11
|
+
static styles = [base, styles];
|
|
12
12
|
render() {
|
|
13
13
|
return html `<div class="Separator" role="separator"></div>`;
|
|
14
14
|
}
|
|
@@ -8,8 +8,8 @@ const styles = css `
|
|
|
8
8
|
}
|
|
9
9
|
`;
|
|
10
10
|
export class DuiCommandShortcut extends LitElement {
|
|
11
|
-
static
|
|
12
|
-
static
|
|
11
|
+
static tagName = "dui-command-shortcut";
|
|
12
|
+
static styles = [base, styles];
|
|
13
13
|
render() {
|
|
14
14
|
return html `<span class="Shortcut"><slot></slot></span>`;
|
|
15
15
|
}
|