@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
|
@@ -25,8 +25,8 @@ const styles = css `
|
|
|
25
25
|
* @csspart root - The centering container element.
|
|
26
26
|
*/
|
|
27
27
|
export class DuiCenter extends LitElement {
|
|
28
|
-
static
|
|
29
|
-
static
|
|
28
|
+
static tagName = "dui-center";
|
|
29
|
+
static styles = [base, styles];
|
|
30
30
|
render() {
|
|
31
31
|
return html `
|
|
32
32
|
<div part="root">
|
|
@@ -1,9 +1,37 @@
|
|
|
1
1
|
/** Ported from original DUI: deep-future-app/app/client/components/dui/hstack */
|
|
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";
|
|
@@ -107,35 +135,53 @@ const styles = css `
|
|
|
107
135
|
* @cssprop --hstack-align - Override align-items.
|
|
108
136
|
* @cssprop --hstack-justify - Override justify-content.
|
|
109
137
|
*/
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
138
|
+
let DuiHstack = (() => {
|
|
139
|
+
let _classSuper = LitElement;
|
|
140
|
+
let _gap_decorators;
|
|
141
|
+
let _gap_initializers = [];
|
|
142
|
+
let _gap_extraInitializers = [];
|
|
143
|
+
let _align_decorators;
|
|
144
|
+
let _align_initializers = [];
|
|
145
|
+
let _align_extraInitializers = [];
|
|
146
|
+
let _justify_decorators;
|
|
147
|
+
let _justify_initializers = [];
|
|
148
|
+
let _justify_extraInitializers = [];
|
|
149
|
+
return class DuiHstack extends _classSuper {
|
|
150
|
+
static {
|
|
151
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
152
|
+
_gap_decorators = [property({ reflect: true })];
|
|
153
|
+
_align_decorators = [property({ reflect: true })];
|
|
154
|
+
_justify_decorators = [property({ reflect: true })];
|
|
155
|
+
__esDecorate(this, null, _gap_decorators, { kind: "accessor", name: "gap", static: false, private: false, access: { has: obj => "gap" in obj, get: obj => obj.gap, set: (obj, value) => { obj.gap = value; } }, metadata: _metadata }, _gap_initializers, _gap_extraInitializers);
|
|
156
|
+
__esDecorate(this, null, _align_decorators, { kind: "accessor", name: "align", static: false, private: false, access: { has: obj => "align" in obj, get: obj => obj.align, set: (obj, value) => { obj.align = value; } }, metadata: _metadata }, _align_initializers, _align_extraInitializers);
|
|
157
|
+
__esDecorate(this, null, _justify_decorators, { kind: "accessor", name: "justify", static: false, private: false, access: { has: obj => "justify" in obj, get: obj => obj.justify, set: (obj, value) => { obj.justify = value; } }, metadata: _metadata }, _justify_initializers, _justify_extraInitializers);
|
|
158
|
+
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
159
|
+
}
|
|
160
|
+
static tagName = "dui-hstack";
|
|
161
|
+
static styles = [base, styles];
|
|
162
|
+
#gap_accessor_storage = __runInitializers(this, _gap_initializers, "4");
|
|
163
|
+
/** Gap between stack items. Maps to space tokens. */
|
|
164
|
+
get gap() { return this.#gap_accessor_storage; }
|
|
165
|
+
set gap(value) { this.#gap_accessor_storage = value; }
|
|
166
|
+
#align_accessor_storage = (__runInitializers(this, _gap_extraInitializers), __runInitializers(this, _align_initializers, "center"));
|
|
167
|
+
/** Alignment of items on the cross axis. */
|
|
168
|
+
get align() { return this.#align_accessor_storage; }
|
|
169
|
+
set align(value) { this.#align_accessor_storage = value; }
|
|
170
|
+
#justify_accessor_storage = (__runInitializers(this, _align_extraInitializers), __runInitializers(this, _justify_initializers, "stretch"));
|
|
171
|
+
/** Justification of items on the main axis. */
|
|
172
|
+
get justify() { return this.#justify_accessor_storage; }
|
|
173
|
+
set justify(value) { this.#justify_accessor_storage = value; }
|
|
174
|
+
render() {
|
|
175
|
+
return html `
|
|
127
176
|
<div part="root">
|
|
128
177
|
<slot></slot>
|
|
129
178
|
</div>
|
|
130
179
|
`;
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
__decorate([
|
|
140
|
-
property({ reflect: true })
|
|
141
|
-
], DuiHstack.prototype, "justify", null);
|
|
180
|
+
}
|
|
181
|
+
constructor() {
|
|
182
|
+
super(...arguments);
|
|
183
|
+
__runInitializers(this, _justify_extraInitializers);
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
})();
|
|
187
|
+
export { DuiHstack };
|
|
@@ -1,9 +1,37 @@
|
|
|
1
1
|
/** Ported from original DUI: deep-future-app/app/client/components/dui/page-inset */
|
|
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";
|
|
@@ -44,60 +72,80 @@ const styles = css `
|
|
|
44
72
|
* @cssprop --page-inset-max-width - Max width of inner content (default: 48rem).
|
|
45
73
|
* @cssprop --page-inset-min-width - Min width of inner content (default: auto).
|
|
46
74
|
*/
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
this.
|
|
69
|
-
|
|
70
|
-
this.
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
75
|
+
let DuiPageInset = (() => {
|
|
76
|
+
let _classSuper = LitElement;
|
|
77
|
+
let _maxWidth_decorators;
|
|
78
|
+
let _maxWidth_initializers = [];
|
|
79
|
+
let _maxWidth_extraInitializers = [];
|
|
80
|
+
let _minWidth_decorators;
|
|
81
|
+
let _minWidth_initializers = [];
|
|
82
|
+
let _minWidth_extraInitializers = [];
|
|
83
|
+
let _padX_decorators;
|
|
84
|
+
let _padX_initializers = [];
|
|
85
|
+
let _padX_extraInitializers = [];
|
|
86
|
+
let _padY_decorators;
|
|
87
|
+
let _padY_initializers = [];
|
|
88
|
+
let _padY_extraInitializers = [];
|
|
89
|
+
return class DuiPageInset extends _classSuper {
|
|
90
|
+
static {
|
|
91
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
92
|
+
_maxWidth_decorators = [property({ attribute: "max-width" })];
|
|
93
|
+
_minWidth_decorators = [property({ attribute: "min-width" })];
|
|
94
|
+
_padX_decorators = [property({ attribute: "pad-x" })];
|
|
95
|
+
_padY_decorators = [property({ attribute: "pad-y" })];
|
|
96
|
+
__esDecorate(this, null, _maxWidth_decorators, { kind: "accessor", name: "maxWidth", static: false, private: false, access: { has: obj => "maxWidth" in obj, get: obj => obj.maxWidth, set: (obj, value) => { obj.maxWidth = value; } }, metadata: _metadata }, _maxWidth_initializers, _maxWidth_extraInitializers);
|
|
97
|
+
__esDecorate(this, null, _minWidth_decorators, { kind: "accessor", name: "minWidth", static: false, private: false, access: { has: obj => "minWidth" in obj, get: obj => obj.minWidth, set: (obj, value) => { obj.minWidth = value; } }, metadata: _metadata }, _minWidth_initializers, _minWidth_extraInitializers);
|
|
98
|
+
__esDecorate(this, null, _padX_decorators, { kind: "accessor", name: "padX", static: false, private: false, access: { has: obj => "padX" in obj, get: obj => obj.padX, set: (obj, value) => { obj.padX = value; } }, metadata: _metadata }, _padX_initializers, _padX_extraInitializers);
|
|
99
|
+
__esDecorate(this, null, _padY_decorators, { kind: "accessor", name: "padY", static: false, private: false, access: { has: obj => "padY" in obj, get: obj => obj.padY, set: (obj, value) => { obj.padY = value; } }, metadata: _metadata }, _padY_initializers, _padY_extraInitializers);
|
|
100
|
+
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
101
|
+
}
|
|
102
|
+
static tagName = "dui-page-inset";
|
|
103
|
+
static styles = [base, styles];
|
|
104
|
+
#maxWidth_accessor_storage = __runInitializers(this, _maxWidth_initializers, void 0);
|
|
105
|
+
/** Maximum width of the inner content area. Overrides --page-inset-max-width. */
|
|
106
|
+
get maxWidth() { return this.#maxWidth_accessor_storage; }
|
|
107
|
+
set maxWidth(value) { this.#maxWidth_accessor_storage = value; }
|
|
108
|
+
#minWidth_accessor_storage = (__runInitializers(this, _maxWidth_extraInitializers), __runInitializers(this, _minWidth_initializers, void 0));
|
|
109
|
+
/** Minimum width of the inner content area. Overrides --page-inset-min-width. */
|
|
110
|
+
get minWidth() { return this.#minWidth_accessor_storage; }
|
|
111
|
+
set minWidth(value) { this.#minWidth_accessor_storage = value; }
|
|
112
|
+
#padX_accessor_storage = (__runInitializers(this, _minWidth_extraInitializers), __runInitializers(this, _padX_initializers, void 0));
|
|
113
|
+
/** Horizontal padding. Overrides --page-inset-pad-x. */
|
|
114
|
+
get padX() { return this.#padX_accessor_storage; }
|
|
115
|
+
set padX(value) { this.#padX_accessor_storage = value; }
|
|
116
|
+
#padY_accessor_storage = (__runInitializers(this, _padX_extraInitializers), __runInitializers(this, _padY_initializers, void 0));
|
|
117
|
+
/** Vertical padding. Overrides --page-inset-pad-y. */
|
|
118
|
+
get padY() { return this.#padY_accessor_storage; }
|
|
119
|
+
set padY(value) { this.#padY_accessor_storage = value; }
|
|
120
|
+
#setOrRemove(prop, value) {
|
|
121
|
+
if (value)
|
|
122
|
+
this.style.setProperty(prop, value);
|
|
123
|
+
else
|
|
124
|
+
this.style.removeProperty(prop);
|
|
125
|
+
}
|
|
126
|
+
willUpdate(changed) {
|
|
127
|
+
if (changed.has("maxWidth"))
|
|
128
|
+
this.#setOrRemove("--page-inset-max-width", this.maxWidth);
|
|
129
|
+
if (changed.has("minWidth"))
|
|
130
|
+
this.#setOrRemove("--page-inset-min-width", this.minWidth);
|
|
131
|
+
if (changed.has("padX"))
|
|
132
|
+
this.#setOrRemove("--page-inset-pad-x", this.padX);
|
|
133
|
+
if (changed.has("padY"))
|
|
134
|
+
this.#setOrRemove("--page-inset-pad-y", this.padY);
|
|
135
|
+
}
|
|
136
|
+
render() {
|
|
137
|
+
return html `
|
|
84
138
|
<div part="root">
|
|
85
139
|
<div part="inner">
|
|
86
140
|
<slot></slot>
|
|
87
141
|
</div>
|
|
88
142
|
</div>
|
|
89
143
|
`;
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
__decorate([
|
|
99
|
-
property({ attribute: "pad-x" })
|
|
100
|
-
], DuiPageInset.prototype, "padX", null);
|
|
101
|
-
__decorate([
|
|
102
|
-
property({ attribute: "pad-y" })
|
|
103
|
-
], DuiPageInset.prototype, "padY", null);
|
|
144
|
+
}
|
|
145
|
+
constructor() {
|
|
146
|
+
super(...arguments);
|
|
147
|
+
__runInitializers(this, _padY_extraInitializers);
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
})();
|
|
151
|
+
export { DuiPageInset };
|
|
@@ -1,9 +1,37 @@
|
|
|
1
1
|
/** Ported from original DUI: deep-future-app/app/client/components/dui/vstack */
|
|
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";
|
|
@@ -63,21 +91,35 @@ const styles = css `
|
|
|
63
91
|
* @csspart root - The stack container.
|
|
64
92
|
* @cssprop --vstack-gap - Override gap between items.
|
|
65
93
|
*/
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
94
|
+
let DuiVstack = (() => {
|
|
95
|
+
let _classSuper = LitElement;
|
|
96
|
+
let _gap_decorators;
|
|
97
|
+
let _gap_initializers = [];
|
|
98
|
+
let _gap_extraInitializers = [];
|
|
99
|
+
return class DuiVstack extends _classSuper {
|
|
100
|
+
static {
|
|
101
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
102
|
+
_gap_decorators = [property({ reflect: true })];
|
|
103
|
+
__esDecorate(this, null, _gap_decorators, { kind: "accessor", name: "gap", static: false, private: false, access: { has: obj => "gap" in obj, get: obj => obj.gap, set: (obj, value) => { obj.gap = value; } }, metadata: _metadata }, _gap_initializers, _gap_extraInitializers);
|
|
104
|
+
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
105
|
+
}
|
|
106
|
+
static tagName = "dui-vstack";
|
|
107
|
+
static styles = [base, styles];
|
|
108
|
+
#gap_accessor_storage = __runInitializers(this, _gap_initializers, "4");
|
|
109
|
+
/** Gap between stack items. Maps to space tokens. */
|
|
110
|
+
get gap() { return this.#gap_accessor_storage; }
|
|
111
|
+
set gap(value) { this.#gap_accessor_storage = value; }
|
|
112
|
+
render() {
|
|
113
|
+
return html `
|
|
75
114
|
<div part="root">
|
|
76
115
|
<slot></slot>
|
|
77
116
|
</div>
|
|
78
117
|
`;
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
118
|
+
}
|
|
119
|
+
constructor() {
|
|
120
|
+
super(...arguments);
|
|
121
|
+
__runInitializers(this, _gap_extraInitializers);
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
})();
|
|
125
|
+
export { DuiVstack };
|