@golemui/gui-lit 1.1.1-rc.3 → 1.2.1-rc.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 +23 -0
- package/{accordion.element-BIgxl5e9.js → accordion.element-C9GzfKrY.js} +29 -30
- package/alert.element-CHn49Yaf.js +55 -0
- package/button.element-C9fHivSw.js +59 -0
- package/{calendar.element-Cv3RBphf.js → calendar.element-XkojKTJk.js} +30 -31
- package/checkbox.element-DU_tVMXu.js +66 -0
- package/currency.element-BmAH5KS_.js +73 -0
- package/date-picker.element-Bg3rF95F.js +94 -0
- package/{date-time-calendar.element-DlbWZjoe.js → date-time-calendar.element-sywQCeQQ.js} +24 -24
- package/date-time-picker.element-HHpwjWTQ.js +107 -0
- package/{date-time.element-CLLxM2nV.js → date-time.element-ucETvSTC.js} +26 -26
- package/{date.element-B8ZHK9KJ.js → date.element-BEHGxRFF.js} +27 -27
- package/default-list-item-renderer-CuPJ9jUD.js +24 -0
- package/{dropdown.element-DMZ7oL5n.js → dropdown.element-DUqG_p1x.js} +85 -84
- package/{flex.element-DG4Uaj_X.js → flex.element-pwba7621.js} +27 -28
- package/{grid.element-DCZsh-3J.js → grid.element-C8K7_Qi3.js} +29 -30
- package/index.js +1316 -3883
- package/index.umd.cjs +117 -2132
- package/{list.element-ADtUK2na.js → list.element-ZtEMKE2x.js} +41 -40
- package/markdown-text.element-DDm36qD0.js +54 -0
- package/markdown.element-DWz3U9rG.js +84 -0
- package/number.element-VkG5wScD.js +71 -0
- package/package.json +6 -6
- package/password.element-C5vQHq5P.js +72 -0
- package/radiogroup.element-CKdO9HwO.js +69 -0
- package/{range-calendar.element-D5eb2f7p.js → range-calendar.element-BznGrej5.js} +23 -24
- package/{range-date-input.element-C35grlYo.js → range-date-input.element-BloTHRDl.js} +24 -24
- package/range-date-picker.element-DKhwFasW.js +98 -0
- package/{range-date-time-calendar.element-BV0J96Gu.js → range-date-time-calendar.element-CZCET-sb.js} +26 -26
- package/{range-date-time-input.element-CzgRbR9F.js → range-date-time-input.element-Dr2VrYhG.js} +24 -24
- package/range-date-time-picker.element-CYeIMWLp.js +109 -0
- package/{range-time-input.element-BOHLUO8z.js → range-time-input.element-7OZhPQqx.js} +23 -23
- package/range-time-picker.element-D0mRFZkK.js +96 -0
- package/renderer.element-DbsFoBba.js +48 -0
- package/{repeater.element-Da8YN1Vy.js → repeater.element-DGEbwvhY.js} +54 -65
- package/select.element-Bb_9jAVB.js +76 -0
- package/{tabs.element-CvcIA8P3.js → tabs.element-BYDNF_pm.js} +49 -50
- package/tags.element-BSN3i9Gx.js +73 -0
- package/textarea.element-Dl1ZEOqO.js +71 -0
- package/textinput.element-C5Vbbkxq.js +68 -0
- package/{time-picker.element-C3oR0EkQ.js → time-picker.element-Crmj9YDy.js} +26 -26
- package/{time.element-X286nthD.js → time.element-DfSeAZp4.js} +29 -29
- package/toggle.element-ORsprZ2M.js +66 -0
- package/alert.element-DPWq9-0F.js +0 -56
- package/button.element-CJay43iR.js +0 -132
- package/calendar-DleRbmvP.js +0 -267
- package/checkbox.element-CpmrzdH0.js +0 -200
- package/currency.element-Cezgzbbs.js +0 -276
- package/date-DBuYpvcO.js +0 -849
- package/date-input-B3yHsn-g.js +0 -204
- package/date-picker.element-ByZefznr.js +0 -357
- package/date-time-calendar-CB5cNoOX.js +0 -374
- package/date-time-input-DrY68YDX.js +0 -246
- package/date-time-picker.element-CYwmumfq.js +0 -440
- package/day-status-ljexnwEO.js +0 -554
- package/errors-Bs_vYN-_.js +0 -110
- package/focus-leave.controller-2gV0pQd5.js +0 -73
- package/list-D730tmGN.js +0 -297
- package/markdown-text-X-BRJT6K.js +0 -30
- package/markdown-text.element-B8TfVLIO.js +0 -55
- package/markdown.element-D5zcxAUS.js +0 -693
- package/number.element-DEY5tR_y.js +0 -291
- package/numeric-jmOOKz30.js +0 -12
- package/one-of-anKkm7mD.js +0 -50
- package/part-templates-VORbpgs2.js +0 -691
- package/password.element-C1aQh_iz.js +0 -240
- package/pill-ranges-DpvWwP-3.js +0 -48
- package/pills-BDMO2NiR.js +0 -348
- package/popup.controller-B33OvX_y.js +0 -86
- package/radiogroup.element-B2G-XyGx.js +0 -235
- package/range-calendar-D7sG24Kx.js +0 -466
- package/range-commit-8-MmYUyo.js +0 -14
- package/range-date-input-BChaoBC1.js +0 -311
- package/range-date-picker.element-Do5YsL5V.js +0 -434
- package/range-date-time-calendar-DulGK2EQ.js +0 -734
- package/range-date-time-input-8ggqckP7.js +0 -353
- package/range-date-time-picker.element-hi5KdopZ.js +0 -472
- package/range-selection-CU3hxLJE.js +0 -25
- package/range-time-input-D7GFdDeA.js +0 -348
- package/range-time-picker.element-DDNQMA_u.js +0 -470
- package/renderer.element-CNyMn2Lu.js +0 -49
- package/select.element-SDxBhGjz.js +0 -266
- package/tabs-DzSCq_98.js +0 -13
- package/tags.element-Bnhfevp3.js +0 -369
- package/templates-Df7abEkB.js +0 -92
- package/textarea.element-Dx7eYEnl.js +0 -239
- package/textinput.element-BnIoDRmY.js +0 -205
- package/time-input-Kk4EX6at.js +0 -201
- package/time-list-DLcq8BAp.js +0 -217
- package/time-picker-DLj1rhOf.js +0 -299
- package/toggle.element-Dokdat_o.js +0 -203
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
## 1.2.0 (2026-08-04)
|
|
2
|
+
|
|
3
|
+
### 🩹 Fixes
|
|
4
|
+
|
|
5
|
+
- make tabpanels focusable and drop redundant tabindex on native buttons ([fa08ed35](https://github.com/golemui/golemui/commit/fa08ed35))
|
|
6
|
+
- **components:** use role toolbar in markdown editor and pass missing titles ([88488312](https://github.com/golemui/golemui/commit/88488312))
|
|
7
|
+
- **components:** focusable, named password visibility toggle ([f87de7e2](https://github.com/golemui/golemui/commit/f87de7e2))
|
|
8
|
+
- **components:** announce calendar month changes and label the year selector ([eca6ad26](https://github.com/golemui/golemui/commit/eca6ad26))
|
|
9
|
+
- **components:** move aria to host in list component ([b1a6b368](https://github.com/golemui/golemui/commit/b1a6b368))
|
|
10
|
+
- **components:** accessible date/time pickers ([7e13a999](https://github.com/golemui/golemui/commit/7e13a999))
|
|
11
|
+
- **components:** expose segment aria-label props for date/time parts ([3e80ef30](https://github.com/golemui/golemui/commit/3e80ef30))
|
|
12
|
+
- **components:** expose aria-required and fix required attribute binding ([3c347517](https://github.com/golemui/golemui/commit/3c347517))
|
|
13
|
+
- **core:** make WithWidget and WidgetLoaders public-only ([#228](https://github.com/golemui/golemui/pull/228))
|
|
14
|
+
|
|
15
|
+
### ❤️ Thank You
|
|
16
|
+
|
|
17
|
+
- Mud Scientist @mudscientist
|
|
18
|
+
- Raúl Jiménez @Elecash
|
|
19
|
+
|
|
20
|
+
## 1.1.1-rc.3 (2026-08-04)
|
|
21
|
+
|
|
22
|
+
This was a version bump only for gui-lit to align it with other projects, there were no code changes.
|
|
23
|
+
|
|
1
24
|
## 1.1.1-rc.2 (2026-08-03)
|
|
2
25
|
|
|
3
26
|
This was a version bump only for gui-lit to align it with other projects, there were no code changes.
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { LayoutWidgetAdapter as l, formContext as
|
|
1
|
+
import { LayoutWidgetAdapter as l, formContext as h, layoutContext as u } from "@golemui/lit";
|
|
2
2
|
import { consume as g, provide as m } from "@lit/context";
|
|
3
|
-
import { LitElement as
|
|
4
|
-
import { property as
|
|
3
|
+
import { LitElement as f, html as s, nothing as c } from "lit";
|
|
4
|
+
import { property as v } from "lit/decorators.js";
|
|
5
|
+
import { safeDefine as b } from "@golemui/lit/internals";
|
|
5
6
|
import "rxjs";
|
|
6
7
|
import { repeat as w } from "lit-html/directives/repeat.js";
|
|
7
|
-
import { classMap as
|
|
8
|
-
var
|
|
9
|
-
for (var
|
|
10
|
-
(
|
|
11
|
-
return
|
|
8
|
+
import { classMap as $ } from "lit/directives/class-map.js";
|
|
9
|
+
var _ = Object.defineProperty, p = (r, t, e, a) => {
|
|
10
|
+
for (var i = void 0, o = r.length - 1, d; o >= 0; o--)
|
|
11
|
+
(d = r[o]) && (i = d(t, e, i) || i);
|
|
12
|
+
return i && _(t, e, i), i;
|
|
12
13
|
};
|
|
13
|
-
|
|
14
|
+
class n extends f {
|
|
14
15
|
constructor() {
|
|
15
16
|
super(...arguments), this.activeSections = {}, this.adapter = new l(), this.subscriptions = [];
|
|
16
17
|
}
|
|
@@ -30,21 +31,21 @@ let o = class extends v {
|
|
|
30
31
|
);
|
|
31
32
|
}
|
|
32
33
|
onClickButton(t) {
|
|
33
|
-
this.widget.props.singleOpen && Object.keys(this.activeSections).filter((
|
|
34
|
-
this.activeSections[
|
|
34
|
+
this.widget.props.singleOpen && Object.keys(this.activeSections).filter((a) => a !== t).forEach((a) => {
|
|
35
|
+
this.activeSections[a] = !1;
|
|
35
36
|
}), this.activeSections[t] = !this.activeSections[t], this.adapter.change(this.activeSections), this.requestUpdate();
|
|
36
37
|
}
|
|
37
38
|
getChild(t) {
|
|
38
39
|
return this.widget.children.find((e) => e.uid === t);
|
|
39
40
|
}
|
|
40
41
|
render() {
|
|
41
|
-
return this.adapter.templateData ?
|
|
42
|
+
return this.adapter.templateData ? s`
|
|
42
43
|
<div class="gui-widget" id=${this.widget.uid}>
|
|
43
44
|
${this.adapter.templateData.sections ? w(
|
|
44
45
|
this.adapter.templateData.sections,
|
|
45
46
|
(t) => t.uid,
|
|
46
47
|
(t) => {
|
|
47
|
-
const e = this.activeSections[t.uid] || this.adapter.templateData.renderMode !== "activeOnly" ?
|
|
48
|
+
const e = this.activeSections[t.uid] || this.adapter.templateData.renderMode !== "activeOnly" ? s`<section
|
|
48
49
|
class="gui-widget"
|
|
49
50
|
role="region"
|
|
50
51
|
id=${`accordion_section_${t.uid}`}
|
|
@@ -52,12 +53,12 @@ let o = class extends v {
|
|
|
52
53
|
aria-labelledby=${`accordion_button_${t.uid}`}
|
|
53
54
|
>
|
|
54
55
|
<gui-widget .widget=${this.getChild(t.uid)}></gui-widget>
|
|
55
|
-
</section>` :
|
|
56
|
-
return
|
|
56
|
+
</section>` : c;
|
|
57
|
+
return s`<div class="gui-accordion__section">
|
|
57
58
|
<button
|
|
58
59
|
type="button"
|
|
59
60
|
tabindex="0"
|
|
60
|
-
class=${
|
|
61
|
+
class=${$({
|
|
61
62
|
active: this.activeSections[t.uid]
|
|
62
63
|
})}
|
|
63
64
|
id=${`accordion_button_${t.uid}`}
|
|
@@ -81,24 +82,22 @@ let o = class extends v {
|
|
|
81
82
|
${e}
|
|
82
83
|
</div>`;
|
|
83
84
|
}
|
|
84
|
-
) :
|
|
85
|
+
) : c}
|
|
85
86
|
</div>
|
|
86
|
-
` :
|
|
87
|
+
` : s``;
|
|
87
88
|
}
|
|
88
89
|
disconnectedCallback() {
|
|
89
90
|
super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((t) => t.unsubscribe());
|
|
90
91
|
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
g({ context:
|
|
94
|
-
|
|
95
|
-
],
|
|
96
|
-
|
|
97
|
-
m({ context:
|
|
98
|
-
],
|
|
99
|
-
|
|
100
|
-
b("gui-accordion-layout")
|
|
101
|
-
], o);
|
|
92
|
+
}
|
|
93
|
+
p([
|
|
94
|
+
g({ context: h }),
|
|
95
|
+
v({ attribute: !1 })
|
|
96
|
+
], n.prototype, "formContext");
|
|
97
|
+
p([
|
|
98
|
+
m({ context: u })
|
|
99
|
+
], n.prototype, "adapter");
|
|
100
|
+
b("gui-accordion-layout", n);
|
|
102
101
|
export {
|
|
103
|
-
|
|
102
|
+
n as AccordionElement
|
|
104
103
|
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { LitElement as p, html as n } from "lit";
|
|
2
|
+
import { property as l } from "lit/decorators.js";
|
|
3
|
+
import { safeDefine as c } from "@golemui/lit/internals";
|
|
4
|
+
import { consume as u, provide as f } from "@lit/context";
|
|
5
|
+
import { DisplayWidgetAdapter as h, formContext as m, displayWidgetContext as g } from "@golemui/lit";
|
|
6
|
+
import "rxjs";
|
|
7
|
+
var b = Object.defineProperty, d = (r, t, i, v) => {
|
|
8
|
+
for (var e = void 0, a = r.length - 1, o; a >= 0; a--)
|
|
9
|
+
(o = r[a]) && (e = o(t, i, e) || e);
|
|
10
|
+
return e && b(t, i, e), e;
|
|
11
|
+
};
|
|
12
|
+
class s extends p {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments), this.adapter = new h(), this.subscriptions = [];
|
|
15
|
+
}
|
|
16
|
+
createRenderRoot() {
|
|
17
|
+
return this;
|
|
18
|
+
}
|
|
19
|
+
updated(t) {
|
|
20
|
+
super.updated(t);
|
|
21
|
+
const i = this.adapter.templateData.size;
|
|
22
|
+
i ? this.style.flex = String(i) : this.style.removeProperty("flex");
|
|
23
|
+
}
|
|
24
|
+
connectedCallback() {
|
|
25
|
+
super.connectedCallback(), this.classList.add("gui-alert", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
|
|
26
|
+
this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
render() {
|
|
30
|
+
return n`
|
|
31
|
+
<div class="gui-widget" id=${this.widget.uid}>
|
|
32
|
+
<div
|
|
33
|
+
role="alert"
|
|
34
|
+
class="gui-alert-notification gui-alert-notification--${this.adapter.templateData.level || "default"}"
|
|
35
|
+
>
|
|
36
|
+
${this.adapter.templateData.text}
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
`;
|
|
40
|
+
}
|
|
41
|
+
disconnectedCallback() {
|
|
42
|
+
super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((t) => t.unsubscribe());
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
d([
|
|
46
|
+
u({ context: m }),
|
|
47
|
+
l({ attribute: !1 })
|
|
48
|
+
], s.prototype, "formContext");
|
|
49
|
+
d([
|
|
50
|
+
f({ context: g })
|
|
51
|
+
], s.prototype, "adapter");
|
|
52
|
+
c("gui-alert-display", s);
|
|
53
|
+
export {
|
|
54
|
+
s as AlertElement
|
|
55
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { ActionWidgetAdapter as p, formContext as d, actionContext as l } from "@golemui/lit";
|
|
2
|
+
import { consume as c, provide as u } from "@lit/context";
|
|
3
|
+
import { LitElement as h, html as m } from "lit";
|
|
4
|
+
import { property as b } from "lit/decorators.js";
|
|
5
|
+
import { safeDefine as f } from "@golemui/lit/internals";
|
|
6
|
+
import "rxjs";
|
|
7
|
+
import "@golemui/gui-components/button";
|
|
8
|
+
var v = Object.defineProperty, n = (i, t, a, g) => {
|
|
9
|
+
for (var e = void 0, r = i.length - 1, o; r >= 0; r--)
|
|
10
|
+
(o = i[r]) && (e = o(t, a, e) || e);
|
|
11
|
+
return e && v(t, a, e), e;
|
|
12
|
+
};
|
|
13
|
+
class s extends h {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments), this.adapter = new p(), this.subscriptions = [];
|
|
16
|
+
}
|
|
17
|
+
createRenderRoot() {
|
|
18
|
+
return this;
|
|
19
|
+
}
|
|
20
|
+
updated(t) {
|
|
21
|
+
super.updated(t);
|
|
22
|
+
const a = this.adapter.templateData.size;
|
|
23
|
+
a ? this.style.flex = String(a) : this.style.removeProperty("flex");
|
|
24
|
+
}
|
|
25
|
+
connectedCallback() {
|
|
26
|
+
super.connectedCallback(), this.classList.add("gui-button", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
|
|
27
|
+
this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
render() {
|
|
31
|
+
return m`
|
|
32
|
+
<gui-button
|
|
33
|
+
.uid=${this.widget.uid}
|
|
34
|
+
.actionType=${this.adapter.templateData.actionType ?? "button"}
|
|
35
|
+
.label=${this.adapter.templateData.label}
|
|
36
|
+
?disabled=${this.adapter.templateData.disabled === !0}
|
|
37
|
+
?invalid=${this.adapter.templateData.invalid === !0}
|
|
38
|
+
.variant=${this.adapter.templateData.variant}
|
|
39
|
+
.icon=${this.adapter.templateData.icon}
|
|
40
|
+
.iconPosition=${this.adapter.templateData.iconPosition}
|
|
41
|
+
@click=${() => this.adapter.click()}
|
|
42
|
+
></gui-button>
|
|
43
|
+
`;
|
|
44
|
+
}
|
|
45
|
+
disconnectedCallback() {
|
|
46
|
+
super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((t) => t.unsubscribe());
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
n([
|
|
50
|
+
c({ context: d }),
|
|
51
|
+
b({ attribute: !1 })
|
|
52
|
+
], s.prototype, "formContext");
|
|
53
|
+
n([
|
|
54
|
+
u({ context: l })
|
|
55
|
+
], s.prototype, "adapter");
|
|
56
|
+
f("gui-button-interactive", s);
|
|
57
|
+
export {
|
|
58
|
+
s as ButtonElement
|
|
59
|
+
};
|
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
import { InputWidgetAdapter as n, formContext as
|
|
2
|
-
import "
|
|
3
|
-
import { consume as
|
|
4
|
-
import { LitElement as
|
|
5
|
-
import { property as
|
|
1
|
+
import { InputWidgetAdapter as n, formContext as l, inputContext as o } from "@golemui/lit";
|
|
2
|
+
import "@golemui/gui-components/calendar";
|
|
3
|
+
import { consume as h, provide as m } from "@lit/context";
|
|
4
|
+
import { LitElement as u, html as c } from "lit";
|
|
5
|
+
import { property as b } from "lit/decorators.js";
|
|
6
|
+
import { safeDefine as D } from "@golemui/lit/internals";
|
|
6
7
|
import "rxjs";
|
|
7
|
-
var
|
|
8
|
-
for (var
|
|
9
|
-
(
|
|
10
|
-
return
|
|
8
|
+
var $ = Object.defineProperty, d = (r, t, a, f) => {
|
|
9
|
+
for (var e = void 0, i = r.length - 1, p; i >= 0; i--)
|
|
10
|
+
(p = r[i]) && (e = p(t, a, e) || e);
|
|
11
|
+
return e && $(t, a, e), e;
|
|
11
12
|
};
|
|
12
|
-
|
|
13
|
+
class s extends u {
|
|
13
14
|
constructor() {
|
|
14
15
|
super(...arguments), this.adapter = new n(), this.subscriptions = [];
|
|
15
16
|
}
|
|
16
17
|
createRenderRoot() {
|
|
17
18
|
return this;
|
|
18
19
|
}
|
|
19
|
-
updated(
|
|
20
|
-
super.updated(
|
|
21
|
-
const
|
|
22
|
-
|
|
20
|
+
updated(t) {
|
|
21
|
+
super.updated(t);
|
|
22
|
+
const a = this.adapter.templateData.size;
|
|
23
|
+
a ? this.style.flex = String(a) : this.style.removeProperty("flex");
|
|
23
24
|
}
|
|
24
25
|
connectedCallback() {
|
|
25
26
|
super.connectedCallback(), this.classList.add("gui-calendar", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
|
|
@@ -27,7 +28,7 @@ let i = class extends c {
|
|
|
27
28
|
);
|
|
28
29
|
}
|
|
29
30
|
render() {
|
|
30
|
-
return super.render(),
|
|
31
|
+
return super.render(), c`
|
|
31
32
|
<gui-calendar
|
|
32
33
|
.uid=${this.widget.uid}
|
|
33
34
|
.label=${this.adapter.templateData.label}
|
|
@@ -57,24 +58,22 @@ let i = class extends c {
|
|
|
57
58
|
></gui-calendar>
|
|
58
59
|
`;
|
|
59
60
|
}
|
|
60
|
-
valueChanged(
|
|
61
|
-
const
|
|
62
|
-
this.adapter.valueChanged(
|
|
61
|
+
valueChanged(t) {
|
|
62
|
+
const a = t?.target;
|
|
63
|
+
this.adapter.valueChanged(a.value);
|
|
63
64
|
}
|
|
64
65
|
disconnectedCallback() {
|
|
65
|
-
super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((
|
|
66
|
+
super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((t) => t.unsubscribe());
|
|
66
67
|
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
],
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
],
|
|
75
|
-
|
|
76
|
-
$("gui-calendar-input")
|
|
77
|
-
], i);
|
|
68
|
+
}
|
|
69
|
+
d([
|
|
70
|
+
h({ context: l }),
|
|
71
|
+
b({ attribute: !1 })
|
|
72
|
+
], s.prototype, "formContext");
|
|
73
|
+
d([
|
|
74
|
+
m({ context: o })
|
|
75
|
+
], s.prototype, "adapter");
|
|
76
|
+
D("gui-calendar-input", s);
|
|
78
77
|
export {
|
|
79
|
-
|
|
78
|
+
s as CalendarElement
|
|
80
79
|
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { InputWidgetAdapter as p, formContext as n, inputContext as l } from "@golemui/lit";
|
|
2
|
+
import "@golemui/gui-components/checkbox";
|
|
3
|
+
import { consume as h, provide as u } from "@lit/context";
|
|
4
|
+
import { LitElement as c, html as m } from "lit";
|
|
5
|
+
import { property as b } from "lit/decorators.js";
|
|
6
|
+
import { safeDefine as f } from "@golemui/lit/internals";
|
|
7
|
+
import "rxjs";
|
|
8
|
+
var x = Object.defineProperty, d = (r, t, e, g) => {
|
|
9
|
+
for (var a = void 0, i = r.length - 1, o; i >= 0; i--)
|
|
10
|
+
(o = r[i]) && (a = o(t, e, a) || a);
|
|
11
|
+
return a && x(t, e, a), a;
|
|
12
|
+
};
|
|
13
|
+
class s extends c {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments), this.adapter = new p(), this.subscriptions = [];
|
|
16
|
+
}
|
|
17
|
+
createRenderRoot() {
|
|
18
|
+
return this;
|
|
19
|
+
}
|
|
20
|
+
updated(t) {
|
|
21
|
+
super.updated(t);
|
|
22
|
+
const e = this.adapter.templateData.size;
|
|
23
|
+
e ? this.style.flex = String(e) : this.style.removeProperty("flex");
|
|
24
|
+
}
|
|
25
|
+
connectedCallback() {
|
|
26
|
+
super.connectedCallback(), this.classList.add("gui-checkbox", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
|
|
27
|
+
this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
render() {
|
|
31
|
+
return super.render(), m`
|
|
32
|
+
<gui-checkbox
|
|
33
|
+
.uid=${this.widget.uid}
|
|
34
|
+
.label=${this.adapter.templateData.label}
|
|
35
|
+
.errors=${this.adapter.templateData.errors}
|
|
36
|
+
?touched=${this.adapter.templateData.touched}
|
|
37
|
+
?required=${this.adapter.templateData.validator?.required}
|
|
38
|
+
?disabled=${this.adapter.templateData.disabled}
|
|
39
|
+
?readonly=${this.adapter.templateData.readonly}
|
|
40
|
+
.value=${this.adapter.templateData.value}
|
|
41
|
+
.hint=${this.adapter.templateData.hint}
|
|
42
|
+
.checkboxPosition=${this.adapter.templateData.checkboxPosition}
|
|
43
|
+
@change=${this.valueChanged}
|
|
44
|
+
@blur=${() => this.adapter.onBlur()}
|
|
45
|
+
></gui-checkbox>
|
|
46
|
+
`;
|
|
47
|
+
}
|
|
48
|
+
valueChanged(t) {
|
|
49
|
+
const e = t.detail.value;
|
|
50
|
+
this.adapter.valueChanged(e);
|
|
51
|
+
}
|
|
52
|
+
disconnectedCallback() {
|
|
53
|
+
super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((t) => t.unsubscribe());
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
d([
|
|
57
|
+
h({ context: n }),
|
|
58
|
+
b({ attribute: !1 })
|
|
59
|
+
], s.prototype, "formContext");
|
|
60
|
+
d([
|
|
61
|
+
u({ context: l })
|
|
62
|
+
], s.prototype, "adapter");
|
|
63
|
+
f("gui-checkbox-input", s);
|
|
64
|
+
export {
|
|
65
|
+
s as CheckboxElement
|
|
66
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { InputWidgetAdapter as l, formContext as n, inputContext as o } from "@golemui/lit";
|
|
2
|
+
import "@golemui/gui-components/currency";
|
|
3
|
+
import { consume as u, provide as c } from "@lit/context";
|
|
4
|
+
import { LitElement as m, html as h } from "lit";
|
|
5
|
+
import { property as D } from "lit/decorators.js";
|
|
6
|
+
import { safeDefine as f } from "@golemui/lit/internals";
|
|
7
|
+
import "rxjs";
|
|
8
|
+
var $ = Object.defineProperty, d = (r, t, e, g) => {
|
|
9
|
+
for (var a = void 0, i = r.length - 1, p; i >= 0; i--)
|
|
10
|
+
(p = r[i]) && (a = p(t, e, a) || a);
|
|
11
|
+
return a && $(t, e, a), a;
|
|
12
|
+
};
|
|
13
|
+
class s extends m {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments), this.adapter = new l(), this.subscriptions = [];
|
|
16
|
+
}
|
|
17
|
+
createRenderRoot() {
|
|
18
|
+
return this;
|
|
19
|
+
}
|
|
20
|
+
updated(t) {
|
|
21
|
+
super.updated(t);
|
|
22
|
+
const e = this.adapter.templateData.size;
|
|
23
|
+
e ? this.style.flex = String(e) : this.style.removeProperty("flex");
|
|
24
|
+
}
|
|
25
|
+
connectedCallback() {
|
|
26
|
+
super.connectedCallback(), this.classList.add("gui-currency", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
|
|
27
|
+
this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
render() {
|
|
31
|
+
return super.render(), h`
|
|
32
|
+
<gui-currency
|
|
33
|
+
.uid=${this.widget.uid}
|
|
34
|
+
.label=${this.adapter.templateData.label}
|
|
35
|
+
.hint=${this.adapter.templateData.hint}
|
|
36
|
+
.errors=${this.adapter.templateData.errors}
|
|
37
|
+
?touched=${this.adapter.templateData.touched}
|
|
38
|
+
?required=${this.adapter.templateData.validator?.required}
|
|
39
|
+
?disabled=${this.adapter.templateData.disabled}
|
|
40
|
+
?readonly=${this.adapter.templateData.readonly}
|
|
41
|
+
.value=${this.adapter.templateData.value}
|
|
42
|
+
.currency=${this.adapter.templateData.currency}
|
|
43
|
+
.step=${this.adapter.templateData.step}
|
|
44
|
+
.maximumFractionDigits=${this.adapter.templateData.maximumFractionDigits}
|
|
45
|
+
.minimumFractionDigits=${this.adapter.templateData.minimumFractionDigits}
|
|
46
|
+
.icon=${this.adapter.templateData.icon}
|
|
47
|
+
.placeholder=${this.adapter.templateData.placeholder}
|
|
48
|
+
.autocomplete=${this.adapter.templateData.autocomplete}
|
|
49
|
+
.localeId=${this.adapter.templateData.lang}
|
|
50
|
+
@input=${this.valueChanged}
|
|
51
|
+
@blur=${() => this.adapter.onBlur()}
|
|
52
|
+
></gui-currency>
|
|
53
|
+
`;
|
|
54
|
+
}
|
|
55
|
+
valueChanged(t) {
|
|
56
|
+
const e = t.detail.value;
|
|
57
|
+
this.adapter.valueChanged(e);
|
|
58
|
+
}
|
|
59
|
+
disconnectedCallback() {
|
|
60
|
+
super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((t) => t.unsubscribe());
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
d([
|
|
64
|
+
u({ context: n }),
|
|
65
|
+
D({ attribute: !1 })
|
|
66
|
+
], s.prototype, "formContext");
|
|
67
|
+
d([
|
|
68
|
+
c({ context: o })
|
|
69
|
+
], s.prototype, "adapter");
|
|
70
|
+
f("gui-currency-input", s);
|
|
71
|
+
export {
|
|
72
|
+
s as CurrencyElement
|
|
73
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { InputWidgetAdapter as d, formContext as l, inputContext as p } from "@golemui/lit";
|
|
2
|
+
import "@golemui/gui-components/date-picker";
|
|
3
|
+
import { consume as u, provide as h } from "@lit/context";
|
|
4
|
+
import { LitElement as c, html as m } from "lit";
|
|
5
|
+
import { property as b } from "lit/decorators.js";
|
|
6
|
+
import { safeDefine as $ } from "@golemui/lit/internals";
|
|
7
|
+
import "rxjs";
|
|
8
|
+
var g = Object.defineProperty, o = (r, e, a, f) => {
|
|
9
|
+
for (var t = void 0, i = r.length - 1, n; i >= 0; i--)
|
|
10
|
+
(n = r[i]) && (t = n(e, a, t) || t);
|
|
11
|
+
return t && g(e, a, t), t;
|
|
12
|
+
};
|
|
13
|
+
class s extends c {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments), this.adapter = new d(), this.subscriptions = [];
|
|
16
|
+
}
|
|
17
|
+
createRenderRoot() {
|
|
18
|
+
return this;
|
|
19
|
+
}
|
|
20
|
+
updated(e) {
|
|
21
|
+
super.updated(e);
|
|
22
|
+
const a = this.adapter.templateData.size;
|
|
23
|
+
a ? this.style.flex = String(a) : this.style.removeProperty("flex");
|
|
24
|
+
}
|
|
25
|
+
connectedCallback() {
|
|
26
|
+
super.connectedCallback(), this.classList.add("gui-date-picker", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
|
|
27
|
+
this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
render() {
|
|
31
|
+
super.render();
|
|
32
|
+
const e = this.adapter.templateData;
|
|
33
|
+
return m`
|
|
34
|
+
<gui-date-picker
|
|
35
|
+
.uid=${this.widget.uid}
|
|
36
|
+
.label=${e.label}
|
|
37
|
+
.hint=${e.hint}
|
|
38
|
+
.errors=${e.errors}
|
|
39
|
+
?touched=${e.touched}
|
|
40
|
+
?required=${e.validator?.required}
|
|
41
|
+
?disabled=${e.disabled}
|
|
42
|
+
?readonly=${e.readonly}
|
|
43
|
+
.value=${e.value}
|
|
44
|
+
.icon=${e.icon}
|
|
45
|
+
.localeId=${e.lang}
|
|
46
|
+
.toggleAriaLabel=${e.toggleAriaLabel}
|
|
47
|
+
.dayAriaLabel=${e.dayAriaLabel}
|
|
48
|
+
.monthAriaLabel=${e.monthAriaLabel}
|
|
49
|
+
.yearAriaLabel=${e.yearAriaLabel}
|
|
50
|
+
.prevMonthIcon=${e.prevMonthIcon}
|
|
51
|
+
.nextMonthIcon=${e.nextMonthIcon}
|
|
52
|
+
.prevMonthAriaLabel=${e.prevMonthAriaLabel}
|
|
53
|
+
.nextMonthAriaLabel=${e.nextMonthAriaLabel}
|
|
54
|
+
.selectYearAriaLabel=${e.selectYearAriaLabel}
|
|
55
|
+
.yearGridAriaLabel=${e.yearGridAriaLabel}
|
|
56
|
+
.dayFormat=${e.dayFormat}
|
|
57
|
+
.weekdayFormat=${e.weekdayFormat}
|
|
58
|
+
.monthFormat=${e.monthFormat}
|
|
59
|
+
.minDate=${e.minDate}
|
|
60
|
+
.maxDate=${e.maxDate}
|
|
61
|
+
.disabledRanges=${e.disabledRanges}
|
|
62
|
+
.numberOfMonths=${e.numberOfMonths}
|
|
63
|
+
.invalidDateMessage=${e.invalidDateMessage}
|
|
64
|
+
.minDateMessage=${e.minDateMessage}
|
|
65
|
+
.maxDateMessage=${e.maxDateMessage}
|
|
66
|
+
.disabledDateRangeMessage=${e.disabledDateRangeMessage}
|
|
67
|
+
.incompleteMessage=${e.incompleteMessage}
|
|
68
|
+
@inputError=${this.onInputError}
|
|
69
|
+
@blur=${() => this.adapter.onBlur()}
|
|
70
|
+
@change=${this.valueChanged}
|
|
71
|
+
></gui-date-picker>
|
|
72
|
+
`;
|
|
73
|
+
}
|
|
74
|
+
valueChanged(e) {
|
|
75
|
+
this.adapter.injectValidationIssues(null), this.adapter.valueChanged(e.detail.value);
|
|
76
|
+
}
|
|
77
|
+
onInputError(e) {
|
|
78
|
+
this.adapter.injectValidationIssues([e.detail.message]);
|
|
79
|
+
}
|
|
80
|
+
disconnectedCallback() {
|
|
81
|
+
super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((e) => e.unsubscribe());
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
o([
|
|
85
|
+
u({ context: l }),
|
|
86
|
+
b({ attribute: !1 })
|
|
87
|
+
], s.prototype, "formContext");
|
|
88
|
+
o([
|
|
89
|
+
h({ context: p })
|
|
90
|
+
], s.prototype, "adapter");
|
|
91
|
+
$("gui-date-picker-input", s);
|
|
92
|
+
export {
|
|
93
|
+
s as DatePickerElement
|
|
94
|
+
};
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { InputWidgetAdapter as d, formContext as
|
|
2
|
-
import "
|
|
3
|
-
import { consume as
|
|
4
|
-
import { LitElement as
|
|
5
|
-
import { property as
|
|
1
|
+
import { InputWidgetAdapter as d, formContext as l, inputContext as m } from "@golemui/lit";
|
|
2
|
+
import "@golemui/gui-components/date-time-calendar";
|
|
3
|
+
import { consume as p, provide as u } from "@lit/context";
|
|
4
|
+
import { LitElement as h, html as c } from "lit";
|
|
5
|
+
import { property as $ } from "lit/decorators.js";
|
|
6
|
+
import { safeDefine as b } from "@golemui/lit/internals";
|
|
6
7
|
import "rxjs";
|
|
7
|
-
var
|
|
8
|
-
for (var
|
|
9
|
-
(
|
|
10
|
-
return
|
|
8
|
+
var g = Object.defineProperty, o = (i, e, a, f) => {
|
|
9
|
+
for (var t = void 0, r = i.length - 1, n; r >= 0; r--)
|
|
10
|
+
(n = i[r]) && (t = n(e, a, t) || t);
|
|
11
|
+
return t && g(e, a, t), t;
|
|
11
12
|
};
|
|
12
|
-
|
|
13
|
+
class s extends h {
|
|
13
14
|
constructor() {
|
|
14
15
|
super(...arguments), this.adapter = new d(), this.subscriptions = [];
|
|
15
16
|
}
|
|
@@ -18,8 +19,8 @@ let i = class extends c {
|
|
|
18
19
|
}
|
|
19
20
|
updated(e) {
|
|
20
21
|
super.updated(e);
|
|
21
|
-
const
|
|
22
|
-
|
|
22
|
+
const a = this.adapter.templateData.size;
|
|
23
|
+
a ? this.style.flex = String(a) : this.style.removeProperty("flex");
|
|
23
24
|
}
|
|
24
25
|
connectedCallback() {
|
|
25
26
|
super.connectedCallback(), this.classList.add("gui-date-time-calendar", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
|
|
@@ -29,7 +30,7 @@ let i = class extends c {
|
|
|
29
30
|
render() {
|
|
30
31
|
super.render();
|
|
31
32
|
const e = this.adapter.templateData;
|
|
32
|
-
return
|
|
33
|
+
return c`
|
|
33
34
|
<gui-date-time-calendar
|
|
34
35
|
.uid=${this.widget.uid}
|
|
35
36
|
.label=${e.label}
|
|
@@ -64,6 +65,7 @@ let i = class extends c {
|
|
|
64
65
|
.maxTimeMessage=${e.maxTimeMessage}
|
|
65
66
|
.disabledTimeRangeMessage=${e.disabledTimeRangeMessage}
|
|
66
67
|
.noAvailableTimesMessage=${e.noAvailableTimesMessage}
|
|
68
|
+
.incompleteMessage=${e.incompleteMessage}
|
|
67
69
|
@change=${this.valueChanged}
|
|
68
70
|
@inputError=${this.onInputError}
|
|
69
71
|
@blur=${() => this.adapter.onBlur()}
|
|
@@ -79,17 +81,15 @@ let i = class extends c {
|
|
|
79
81
|
disconnectedCallback() {
|
|
80
82
|
super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((e) => e.unsubscribe());
|
|
81
83
|
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
84
|
+
}
|
|
85
|
+
o([
|
|
86
|
+
p({ context: l }),
|
|
85
87
|
$({ attribute: !1 })
|
|
86
|
-
],
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
],
|
|
90
|
-
|
|
91
|
-
g("gui-date-time-calendar-input")
|
|
92
|
-
], i);
|
|
88
|
+
], s.prototype, "formContext");
|
|
89
|
+
o([
|
|
90
|
+
u({ context: m })
|
|
91
|
+
], s.prototype, "adapter");
|
|
92
|
+
b("gui-date-time-calendar-input", s);
|
|
93
93
|
export {
|
|
94
|
-
|
|
94
|
+
s as DateTimeCalendarElement
|
|
95
95
|
};
|