@golemui/gui-lit 0.12.2 → 0.13.0
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/CHANGELOG.md +4 -0
- package/abstract-calendar-YDgwwbqe.js +528 -0
- package/{accordion.element-81uTv6Ms.js → accordion.element-ChLmV6QT.js} +24 -22
- package/{alert.element-DWrS5ggK.js → alert.element-9QFlqjj9.js} +23 -21
- package/button.element-ATNRRDN3.js +121 -0
- package/calendar-P9DzVryu.js +96 -0
- package/{calendar.element-C1rLK7aY.js → calendar.element-O2of7VBr.js} +25 -22
- package/checkbox.element-DMmer4Jw.js +199 -0
- package/currency.element-C7SZkoPP.js +266 -0
- package/date-CG1562vW.js +786 -0
- package/date-input-VJG8lMVN.js +266 -0
- package/{date-picker.element-GNC8f3Qi.js → date-picker.element-Bcyhc0fb.js} +29 -25
- package/{date.element-Dzw-UJzC.js → date.element-DfXmcgZi.js} +25 -22
- package/{dropdown.element-CebROj9s.js → dropdown.element-DCUI5Y7I.js} +24 -22
- package/errors-QjKhr6mA.js +109 -0
- package/{flex.element-BMqqfxjI.js → flex.element-B0sG0YT1.js} +24 -22
- package/{grid.element-CBMoOuLt.js → grid.element-Bf5aEjkj.js} +24 -22
- package/index.js +2708 -1174
- package/index.umd.cjs +982 -108
- package/lib/components/accordion.element.d.ts +7 -7
- package/lib/components/alert.element.d.ts +6 -6
- package/lib/components/button.element.d.ts +6 -6
- package/lib/components/calendar.element.d.ts +6 -6
- package/lib/components/checkbox.element.d.ts +6 -6
- package/lib/components/currency.element.d.ts +6 -6
- package/lib/components/date-picker.element.d.ts +6 -6
- package/lib/components/date.element.d.ts +6 -6
- package/lib/components/dropdown.element.d.ts +6 -6
- package/lib/components/flex.element.d.ts +6 -6
- package/lib/components/grid.element.d.ts +6 -6
- package/lib/components/list.element.d.ts +6 -6
- package/lib/components/markdown-text.element.d.ts +6 -6
- package/lib/components/markdown.element.d.ts +6 -6
- package/lib/components/number.element.d.ts +6 -6
- package/lib/components/password.element.d.ts +6 -6
- package/lib/components/radiogroup.element.d.ts +6 -6
- package/lib/components/range-calendar.element.d.ts +6 -6
- package/lib/components/range-date-input.element.d.ts +6 -6
- package/lib/components/range-date-picker.element.d.ts +6 -6
- package/lib/components/renderer.element.d.ts +6 -6
- package/lib/components/repeater.element.d.ts +6 -6
- package/lib/components/select.element.d.ts +6 -6
- package/lib/components/tabs.element.d.ts +6 -6
- package/lib/components/textarea.element.d.ts +6 -6
- package/lib/components/textinput.element.d.ts +6 -6
- package/lib/components/toggle.element.d.ts +6 -6
- package/lib/widget.loaders.d.ts +2 -2
- package/list-CtFsv7GB.js +284 -0
- package/{list.element-DIIgN_Ww.js → list.element-G8RNRZXU.js} +30 -27
- package/markdown-text-X-BRJT6K.js +30 -0
- package/{markdown-text.element-DY7b-dU5.js → markdown-text.element-C_1OqrGa.js} +23 -20
- package/markdown.element-CT1JOOM3.js +596 -0
- package/number.element-HaXEg_7U.js +282 -0
- package/one-of-DifUsEYY.js +48 -0
- package/package.json +6 -6
- package/password.element-B4-0SCe4.js +238 -0
- package/radiogroup.element-DzHLgRh1.js +232 -0
- package/range-calendar-qpakwAba.js +326 -0
- package/{range-calendar.element-Bli9UfhN.js → range-calendar.element-C-4qqRGK.js} +20 -17
- package/range-date-input-CrNpOVHt.js +507 -0
- package/{range-date-input.element-BwPvGk5F.js → range-date-input.element-Iq5Y7uLQ.js} +20 -17
- package/{range-date-picker.element-DJQOwDPh.js → range-date-picker.element-4bg4Uraq.js} +29 -25
- package/{renderer.element-B99qD2mz.js → renderer.element-DMsheQGi.js} +19 -17
- package/{repeater.element-AaifWsOB.js → repeater.element-Ry8HyMfW.js} +41 -27
- package/select.element-DuGZjlZY.js +257 -0
- package/tabs-DzSCq_98.js +13 -0
- package/{tabs.element-k8JMNDXi.js → tabs.element-VLrtF1j5.js} +31 -29
- package/templates-Dk1jxLwS.js +75 -0
- package/textarea.element-C8yx2u0o.js +237 -0
- package/textinput.element-DKuplF1A.js +204 -0
- package/toggle.element-NXRrhALB.js +201 -0
- package/button.element-hjhVBamJ.js +0 -56
- package/checkbox.element-bu9_MvED.js +0 -65
- package/currency.element-Bxv2WxAx.js +0 -72
- package/default-list-item-renderer-DNVEjKSX.js +0 -23
- package/markdown.element-ZD_n4ObO.js +0 -73
- package/number.element-B0E7W2TK.js +0 -70
- package/password.element-C4_eLdUO.js +0 -71
- package/radiogroup.element-BD8qBNoO.js +0 -68
- package/select.element-BLxtqB0A.js +0 -74
- package/textarea.element-DgDwfzYP.js +0 -70
- package/textinput.element-DSLFDjfb.js +0 -67
- package/toggle.element-BLu6F99u.js +0 -65
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { LayoutWidgetAdapter as o, formContext as u, layoutContext as g } from "@golemui/lit";
|
|
2
|
+
import "@golemui/gui-shared";
|
|
3
|
+
import { consume as c, provide as m } from "@lit/context";
|
|
4
|
+
import { LitElement as f, html as n } from "lit";
|
|
5
|
+
import { property as h, customElement as _ } from "lit/decorators.js";
|
|
6
|
+
import "rxjs";
|
|
7
|
+
import { repeat as x } from "lit-html/directives/repeat.js";
|
|
8
|
+
import { classMap as w } from "lit/directives/class-map.js";
|
|
9
|
+
var D = Object.defineProperty, y = Object.getOwnPropertyDescriptor, d = (e, t, s, i) => {
|
|
10
|
+
for (var a = i > 1 ? void 0 : i ? y(t, s) : t, p = e.length - 1, l; p >= 0; p--)
|
|
9
11
|
(l = e[p]) && (a = (i ? l(t, s, a) : l(a)) || a);
|
|
10
|
-
return i && a &&
|
|
12
|
+
return i && a && D(t, s, a), a;
|
|
11
13
|
};
|
|
12
|
-
let r = class extends
|
|
14
|
+
let r = class extends f {
|
|
13
15
|
constructor() {
|
|
14
|
-
super(...arguments), this.adapter = new
|
|
16
|
+
super(...arguments), this.adapter = new o(), this.subscriptions = [];
|
|
15
17
|
}
|
|
16
18
|
createRenderRoot() {
|
|
17
19
|
return this;
|
|
@@ -44,16 +46,16 @@ let r = class extends c {
|
|
|
44
46
|
"gui-flex__widget--align-space-around": this.adapter.templateData.align === "space-around",
|
|
45
47
|
"gui-flex__widget--align-space-evenly": this.adapter.templateData.align === "space-evenly"
|
|
46
48
|
};
|
|
47
|
-
return
|
|
49
|
+
return n`
|
|
48
50
|
<div
|
|
49
|
-
class=${
|
|
51
|
+
class=${w(e)}
|
|
50
52
|
id=${this.widget?.uid}
|
|
51
53
|
style=${this.adapter.templateData.gap ? `gap: ${this.adapter.templateData.gap}px` : ""}
|
|
52
54
|
>
|
|
53
|
-
${
|
|
55
|
+
${x(
|
|
54
56
|
this.adapter.templateData.children || [],
|
|
55
57
|
(t) => t?.uid,
|
|
56
|
-
(t) =>
|
|
58
|
+
(t) => n`<gui-widget .widget=${t}></gui-widget>`
|
|
57
59
|
)}
|
|
58
60
|
</div>
|
|
59
61
|
`;
|
|
@@ -62,15 +64,15 @@ let r = class extends c {
|
|
|
62
64
|
super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((e) => e.unsubscribe());
|
|
63
65
|
}
|
|
64
66
|
};
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
67
|
+
d([
|
|
68
|
+
c({ context: u }),
|
|
69
|
+
h({ attribute: !1 })
|
|
68
70
|
], r.prototype, "formContext", 2);
|
|
69
|
-
|
|
70
|
-
|
|
71
|
+
d([
|
|
72
|
+
m({ context: g })
|
|
71
73
|
], r.prototype, "adapter", 2);
|
|
72
|
-
r =
|
|
73
|
-
|
|
74
|
+
r = d([
|
|
75
|
+
_("gui-flex-layout")
|
|
74
76
|
], r);
|
|
75
77
|
export {
|
|
76
78
|
r as FlexElement
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { LayoutWidgetAdapter as l, formContext as o, layoutContext as u } from "@golemui/lit";
|
|
2
|
+
import "@golemui/gui-shared";
|
|
3
|
+
import { consume as c, provide as m } from "@lit/context";
|
|
4
|
+
import { LitElement as h, html as g } from "lit";
|
|
5
|
+
import { property as _, customElement as f } from "lit/decorators.js";
|
|
6
|
+
import "rxjs";
|
|
7
|
+
import { repeat as w } from "lit-html/directives/repeat.js";
|
|
8
|
+
import { classMap as y } from "lit/directives/class-map.js";
|
|
9
|
+
var D = Object.defineProperty, b = Object.getOwnPropertyDescriptor, n = (a, e, s, r) => {
|
|
10
|
+
for (var t = r > 1 ? void 0 : r ? b(e, s) : e, i = a.length - 1, p; i >= 0; i--)
|
|
9
11
|
(p = a[i]) && (t = (r ? p(e, s, t) : p(t)) || t);
|
|
10
|
-
return r && t &&
|
|
12
|
+
return r && t && D(e, s, t), t;
|
|
11
13
|
};
|
|
12
|
-
let d = class extends
|
|
14
|
+
let d = class extends h {
|
|
13
15
|
constructor() {
|
|
14
|
-
super(...arguments), this.adapter = new
|
|
16
|
+
super(...arguments), this.adapter = new l(), this.subscriptions = [];
|
|
15
17
|
}
|
|
16
18
|
createRenderRoot() {
|
|
17
19
|
return this;
|
|
@@ -44,12 +46,12 @@ let d = class extends c {
|
|
|
44
46
|
"gui-grid__widget--justify-end": this.adapter.templateData.justify === "end",
|
|
45
47
|
"gui-grid__widget--justify-stretch": this.adapter.templateData.justify === "stretch"
|
|
46
48
|
}, t = [];
|
|
47
|
-
return this.adapter.templateData.columnGap !== void 0 && t.push(`column-gap: ${this.adapter.templateData.columnGap}px`), this.adapter.templateData.rowGap !== void 0 && t.push(`row-gap: ${this.adapter.templateData.rowGap}px`),
|
|
48
|
-
<div class=${
|
|
49
|
-
${
|
|
49
|
+
return this.adapter.templateData.columnGap !== void 0 && t.push(`column-gap: ${this.adapter.templateData.columnGap}px`), this.adapter.templateData.rowGap !== void 0 && t.push(`row-gap: ${this.adapter.templateData.rowGap}px`), g`
|
|
50
|
+
<div class=${y(r)} id=${this.widget?.uid} style=${t.join("; ")}>
|
|
51
|
+
${w(
|
|
50
52
|
this.adapter.templateData.children || [],
|
|
51
53
|
(i) => i?.uid,
|
|
52
|
-
(i) =>
|
|
54
|
+
(i) => g`<div class="gui-grid__cell" style="grid-column: span ${i.size || 1}">
|
|
53
55
|
<gui-widget .widget=${i}></gui-widget>
|
|
54
56
|
</div>`
|
|
55
57
|
)}
|
|
@@ -60,15 +62,15 @@ let d = class extends c {
|
|
|
60
62
|
super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((a) => a.unsubscribe());
|
|
61
63
|
}
|
|
62
64
|
};
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
65
|
+
n([
|
|
66
|
+
c({ context: o }),
|
|
67
|
+
_({ attribute: !1 })
|
|
66
68
|
], d.prototype, "formContext", 2);
|
|
67
|
-
|
|
68
|
-
|
|
69
|
+
n([
|
|
70
|
+
m({ context: u })
|
|
69
71
|
], d.prototype, "adapter", 2);
|
|
70
|
-
d =
|
|
71
|
-
|
|
72
|
+
d = n([
|
|
73
|
+
f("gui-grid-layout")
|
|
72
74
|
], d);
|
|
73
75
|
export {
|
|
74
76
|
d as GridElement
|