@golemui/gui-lit 0.12.1 → 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.
Files changed (83) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/abstract-calendar-YDgwwbqe.js +528 -0
  3. package/{accordion.element-81uTv6Ms.js → accordion.element-ChLmV6QT.js} +24 -22
  4. package/{alert.element-DWrS5ggK.js → alert.element-9QFlqjj9.js} +23 -21
  5. package/button.element-ATNRRDN3.js +121 -0
  6. package/calendar-P9DzVryu.js +96 -0
  7. package/{calendar.element-C1rLK7aY.js → calendar.element-O2of7VBr.js} +25 -22
  8. package/checkbox.element-DMmer4Jw.js +199 -0
  9. package/currency.element-C7SZkoPP.js +266 -0
  10. package/date-CG1562vW.js +786 -0
  11. package/date-input-VJG8lMVN.js +266 -0
  12. package/{date-picker.element-GNC8f3Qi.js → date-picker.element-Bcyhc0fb.js} +29 -25
  13. package/{date.element-Dzw-UJzC.js → date.element-DfXmcgZi.js} +25 -22
  14. package/{dropdown.element-CebROj9s.js → dropdown.element-DCUI5Y7I.js} +24 -22
  15. package/errors-QjKhr6mA.js +109 -0
  16. package/{flex.element-BMqqfxjI.js → flex.element-B0sG0YT1.js} +24 -22
  17. package/{grid.element-CBMoOuLt.js → grid.element-Bf5aEjkj.js} +24 -22
  18. package/index.js +2708 -1174
  19. package/index.umd.cjs +982 -108
  20. package/lib/components/accordion.element.d.ts +7 -7
  21. package/lib/components/alert.element.d.ts +6 -6
  22. package/lib/components/button.element.d.ts +6 -6
  23. package/lib/components/calendar.element.d.ts +6 -6
  24. package/lib/components/checkbox.element.d.ts +6 -6
  25. package/lib/components/currency.element.d.ts +6 -6
  26. package/lib/components/date-picker.element.d.ts +6 -6
  27. package/lib/components/date.element.d.ts +6 -6
  28. package/lib/components/dropdown.element.d.ts +6 -6
  29. package/lib/components/flex.element.d.ts +6 -6
  30. package/lib/components/grid.element.d.ts +6 -6
  31. package/lib/components/list.element.d.ts +6 -6
  32. package/lib/components/markdown-text.element.d.ts +6 -6
  33. package/lib/components/markdown.element.d.ts +6 -6
  34. package/lib/components/number.element.d.ts +6 -6
  35. package/lib/components/password.element.d.ts +6 -6
  36. package/lib/components/radiogroup.element.d.ts +6 -6
  37. package/lib/components/range-calendar.element.d.ts +6 -6
  38. package/lib/components/range-date-input.element.d.ts +6 -6
  39. package/lib/components/range-date-picker.element.d.ts +6 -6
  40. package/lib/components/renderer.element.d.ts +6 -6
  41. package/lib/components/repeater.element.d.ts +6 -6
  42. package/lib/components/select.element.d.ts +6 -6
  43. package/lib/components/tabs.element.d.ts +6 -6
  44. package/lib/components/textarea.element.d.ts +6 -6
  45. package/lib/components/textinput.element.d.ts +6 -6
  46. package/lib/components/toggle.element.d.ts +6 -6
  47. package/lib/widget.loaders.d.ts +2 -2
  48. package/list-CtFsv7GB.js +284 -0
  49. package/{list.element-DIIgN_Ww.js → list.element-G8RNRZXU.js} +30 -27
  50. package/markdown-text-X-BRJT6K.js +30 -0
  51. package/{markdown-text.element-DY7b-dU5.js → markdown-text.element-C_1OqrGa.js} +23 -20
  52. package/markdown.element-CT1JOOM3.js +596 -0
  53. package/number.element-HaXEg_7U.js +282 -0
  54. package/one-of-DifUsEYY.js +48 -0
  55. package/package.json +6 -6
  56. package/password.element-B4-0SCe4.js +238 -0
  57. package/radiogroup.element-DzHLgRh1.js +232 -0
  58. package/range-calendar-qpakwAba.js +326 -0
  59. package/{range-calendar.element-Bli9UfhN.js → range-calendar.element-C-4qqRGK.js} +20 -17
  60. package/range-date-input-CrNpOVHt.js +507 -0
  61. package/{range-date-input.element-BwPvGk5F.js → range-date-input.element-Iq5Y7uLQ.js} +20 -17
  62. package/{range-date-picker.element-DJQOwDPh.js → range-date-picker.element-4bg4Uraq.js} +29 -25
  63. package/{renderer.element-B99qD2mz.js → renderer.element-DMsheQGi.js} +19 -17
  64. package/{repeater.element-AaifWsOB.js → repeater.element-Ry8HyMfW.js} +41 -27
  65. package/select.element-DuGZjlZY.js +257 -0
  66. package/tabs-DzSCq_98.js +13 -0
  67. package/{tabs.element-k8JMNDXi.js → tabs.element-VLrtF1j5.js} +31 -29
  68. package/templates-Dk1jxLwS.js +75 -0
  69. package/textarea.element-C8yx2u0o.js +237 -0
  70. package/textinput.element-DKuplF1A.js +204 -0
  71. package/toggle.element-NXRrhALB.js +201 -0
  72. package/button.element-hjhVBamJ.js +0 -56
  73. package/checkbox.element-bu9_MvED.js +0 -65
  74. package/currency.element-Bxv2WxAx.js +0 -72
  75. package/default-list-item-renderer-DNVEjKSX.js +0 -23
  76. package/markdown.element-ZD_n4ObO.js +0 -73
  77. package/number.element-B0E7W2TK.js +0 -70
  78. package/password.element-C4_eLdUO.js +0 -71
  79. package/radiogroup.element-BD8qBNoO.js +0 -68
  80. package/select.element-BLxtqB0A.js +0 -74
  81. package/textarea.element-DgDwfzYP.js +0 -70
  82. package/textinput.element-DSLFDjfb.js +0 -67
  83. package/toggle.element-BLu6F99u.js +0 -65
@@ -1,65 +0,0 @@
1
- import * as d from "@golemui/lit";
2
- import { consume as n, provide as h } from "@lit/context";
3
- import { LitElement as c, html as u } from "lit";
4
- import { property as m, customElement as b } from "lit/decorators.js";
5
- var f = Object.defineProperty, x = Object.getOwnPropertyDescriptor, l = (e, t, i, r) => {
6
- for (var a = r > 1 ? void 0 : r ? x(t, i) : t, o = e.length - 1, p; o >= 0; o--)
7
- (p = e[o]) && (a = (r ? p(t, i, a) : p(a)) || a);
8
- return r && a && f(t, i, a), a;
9
- };
10
- let s = class extends c {
11
- constructor() {
12
- super(...arguments), this.adapter = new d.InputWidgetAdapter(), this.subscriptions = [];
13
- }
14
- createRenderRoot() {
15
- return this;
16
- }
17
- updated(e) {
18
- super.updated(e);
19
- const t = this.adapter.templateData.size;
20
- t ? this.style.flex = String(t) : this.style.removeProperty("flex");
21
- }
22
- connectedCallback() {
23
- super.connectedCallback(), this.classList.add("gui-checkbox", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
24
- this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
25
- );
26
- }
27
- render() {
28
- return super.render(), u`
29
- <gui-checkbox
30
- .uid=${this.widget.uid}
31
- .label=${this.adapter.templateData.label}
32
- .errors=${this.adapter.templateData.errors}
33
- ?touched=${this.adapter.templateData.touched}
34
- ?required=${this.adapter.templateData.validator?.required}
35
- ?disabled=${this.adapter.templateData.disabled}
36
- ?readonly=${this.adapter.templateData.readonly}
37
- .value=${this.adapter.templateData.value}
38
- .hint=${this.adapter.templateData.hint}
39
- .checkboxPosition=${this.adapter.templateData.checkboxPosition}
40
- @change=${this.valueChanged}
41
- @blur=${() => this.adapter.onBlur()}
42
- ></gui-checkbox>
43
- `;
44
- }
45
- valueChanged(e) {
46
- const t = e.detail.value;
47
- this.adapter.valueChanged(t);
48
- }
49
- disconnectedCallback() {
50
- super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((e) => e.unsubscribe());
51
- }
52
- };
53
- l([
54
- n({ context: d.formContext }),
55
- m({ attribute: !1 })
56
- ], s.prototype, "formContext", 2);
57
- l([
58
- h({ context: d.inputContext })
59
- ], s.prototype, "adapter", 2);
60
- s = l([
61
- b("gui-checkbox-input")
62
- ], s);
63
- export {
64
- s as CheckboxElement
65
- };
@@ -1,72 +0,0 @@
1
- import * as d from "@golemui/lit";
2
- import { consume as o, provide as u } from "@lit/context";
3
- import { LitElement as c, html as m } from "lit";
4
- import { property as h, customElement as D } from "lit/decorators.js";
5
- var $ = Object.defineProperty, b = Object.getOwnPropertyDescriptor, n = (e, t, s, r) => {
6
- for (var a = r > 1 ? void 0 : r ? b(t, s) : t, p = e.length - 1, l; p >= 0; p--)
7
- (l = e[p]) && (a = (r ? l(t, s, a) : l(a)) || a);
8
- return r && a && $(t, s, a), a;
9
- };
10
- let i = class extends c {
11
- constructor() {
12
- super(...arguments), this.adapter = new d.InputWidgetAdapter(), this.subscriptions = [];
13
- }
14
- createRenderRoot() {
15
- return this;
16
- }
17
- updated(e) {
18
- super.updated(e);
19
- const t = this.adapter.templateData.size;
20
- t ? this.style.flex = String(t) : this.style.removeProperty("flex");
21
- }
22
- connectedCallback() {
23
- super.connectedCallback(), this.classList.add("gui-currency", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
24
- this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
25
- );
26
- }
27
- render() {
28
- return super.render(), m`
29
- <gui-currency
30
- .uid=${this.widget.uid}
31
- .label=${this.adapter.templateData.label}
32
- .hint=${this.adapter.templateData.hint}
33
- .errors=${this.adapter.templateData.errors}
34
- ?touched=${this.adapter.templateData.touched}
35
- ?required=${this.adapter.templateData.validator?.required}
36
- ?disabled=${this.adapter.templateData.disabled}
37
- ?readonly=${this.adapter.templateData.readonly}
38
- .value=${this.adapter.templateData.value}
39
- .currency=${this.adapter.templateData.currency}
40
- .step=${this.adapter.templateData.step}
41
- .maximumFractionDigits=${this.adapter.templateData.maximumFractionDigits}
42
- .minimumFractionDigits=${this.adapter.templateData.minimumFractionDigits}
43
- .icon=${this.adapter.templateData.icon}
44
- .placeholder=${this.adapter.templateData.placeholder}
45
- .autocomplete=${this.adapter.templateData.autocomplete}
46
- .localeId=${this.adapter.templateData.lang}
47
- @input=${this.valueChanged}
48
- @blur=${() => this.adapter.onBlur()}
49
- ></gui-currency>
50
- `;
51
- }
52
- valueChanged(e) {
53
- const t = e.detail.value;
54
- this.adapter.valueChanged(t);
55
- }
56
- disconnectedCallback() {
57
- super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((e) => e.unsubscribe());
58
- }
59
- };
60
- n([
61
- o({ context: d.formContext }),
62
- h({ attribute: !1 })
63
- ], i.prototype, "formContext", 2);
64
- n([
65
- u({ context: d.inputContext })
66
- ], i.prototype, "adapter", 2);
67
- i = n([
68
- D("gui-currency-input")
69
- ], i);
70
- export {
71
- i as CurrencyElement
72
- };
@@ -1,23 +0,0 @@
1
- import { html as i } from "lit";
2
- import { classMap as t } from "lit/directives/class-map.js";
3
- const a = (e) => {
4
- const s = {
5
- "gui-list__item": !0,
6
- "gui-list__item-selected": !!e.selected,
7
- "gui-list__item-focused": !!e.focused,
8
- "gui-list__item-disabled": !!e.disabled
9
- };
10
- return i`
11
- <div
12
- role="option"
13
- class=${t(s)}
14
- aria-selected=${e.selected ? "true" : "false"}
15
- aria-disabled=${e.disabled ? "true" : "false"}
16
- >
17
- ${e.template}
18
- </div>
19
- `;
20
- };
21
- export {
22
- a as d
23
- };
@@ -1,73 +0,0 @@
1
- import * as o from "@golemui/lit";
2
- import { consume as n, provide as u } from "@lit/context";
3
- import { LitElement as h, html as m } from "lit";
4
- import { property as c, customElement as D } from "lit/decorators.js";
5
- var $ = Object.defineProperty, f = Object.getOwnPropertyDescriptor, l = (e, t, s, r) => {
6
- for (var a = r > 1 ? void 0 : r ? f(t, s) : t, p = e.length - 1, d; p >= 0; p--)
7
- (d = e[p]) && (a = (r ? d(t, s, a) : d(a)) || a);
8
- return r && a && $(t, s, a), a;
9
- };
10
- let i = class extends h {
11
- constructor() {
12
- super(...arguments), this.adapter = new o.InputWidgetAdapter(), this.subscriptions = [];
13
- }
14
- createRenderRoot() {
15
- return this;
16
- }
17
- updated(e) {
18
- super.updated(e);
19
- const t = this.adapter.templateData.size;
20
- t ? this.style.flex = String(t) : this.style.removeProperty("flex");
21
- }
22
- connectedCallback() {
23
- super.connectedCallback(), this.classList.add("gui-markdown", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
24
- this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
25
- );
26
- }
27
- render() {
28
- return super.render(), m`
29
- <gui-markdown
30
- .uid=${this.widget.uid}
31
- .label=${this.adapter.templateData.label}
32
- .errors=${this.adapter.templateData.errors}
33
- ?touched=${this.adapter.templateData.touched}
34
- ?required=${this.adapter.templateData.validator?.required}
35
- ?disabled=${this.adapter.templateData.disabled}
36
- ?readonly=${this.adapter.templateData.readonly}
37
- .value=${this.adapter.templateData.value}
38
- .hint=${this.adapter.templateData.hint}
39
- .placeholder=${this.adapter.templateData.placeholder}
40
- .autocomplete=${this.adapter.templateData.autocomplete}
41
- .counterMode=${this.adapter.templateData.counterMode}
42
- .minimumHeight=${this.adapter.templateData.minimumHeight}
43
- .autoGrow=${this.adapter.templateData.autoGrow}
44
- .tools=${this.adapter.templateData.tools}
45
- .defaultOpenPreview=${this.adapter.templateData.defaultOpenPreview}
46
- .maxLength=${this.adapter.templateData.validator?.maxLength}
47
- .dependencies=${this.adapter.templateData.deps}
48
- @input=${this.valueChanged}
49
- @blur=${() => this.adapter.onBlur()}
50
- ></gui-markdown>
51
- `;
52
- }
53
- valueChanged(e) {
54
- const t = e.detail.value;
55
- this.adapter.valueChanged(t);
56
- }
57
- disconnectedCallback() {
58
- super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((e) => e.unsubscribe());
59
- }
60
- };
61
- l([
62
- n({ context: o.formContext }),
63
- c({ attribute: !1 })
64
- ], i.prototype, "formContext", 2);
65
- l([
66
- u({ context: o.inputContext })
67
- ], i.prototype, "adapter", 2);
68
- i = l([
69
- D("gui-markdown-input")
70
- ], i);
71
- export {
72
- i as MarkdownElement
73
- };
@@ -1,70 +0,0 @@
1
- import * as d from "@golemui/lit";
2
- import { consume as u, provide as n } from "@lit/context";
3
- import { LitElement as m, html as h } from "lit";
4
- import { property as c, customElement as b } from "lit/decorators.js";
5
- var f = Object.defineProperty, D = Object.getOwnPropertyDescriptor, o = (e, t, s, r) => {
6
- for (var a = r > 1 ? void 0 : r ? D(t, s) : t, p = e.length - 1, l; p >= 0; p--)
7
- (l = e[p]) && (a = (r ? l(t, s, a) : l(a)) || a);
8
- return r && a && f(t, s, a), a;
9
- };
10
- let i = class extends m {
11
- constructor() {
12
- super(...arguments), this.adapter = new d.InputWidgetAdapter(), this.subscriptions = [];
13
- }
14
- createRenderRoot() {
15
- return this;
16
- }
17
- updated(e) {
18
- super.updated(e);
19
- const t = this.adapter.templateData.size;
20
- t ? this.style.flex = String(t) : this.style.removeProperty("flex");
21
- }
22
- connectedCallback() {
23
- super.connectedCallback(), this.classList.add("gui-number", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
24
- this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
25
- );
26
- }
27
- render() {
28
- return super.render(), h`
29
- <gui-number
30
- .uid=${this.widget.uid}
31
- .label=${this.adapter.templateData.label}
32
- .hint=${this.adapter.templateData.hint}
33
- .errors=${this.adapter.templateData.errors}
34
- ?touched=${this.adapter.templateData.touched}
35
- ?required=${this.adapter.templateData.validator?.required}
36
- ?disabled=${this.adapter.templateData.disabled}
37
- ?readonly=${this.adapter.templateData.readonly}
38
- .value=${this.adapter.templateData.value}
39
- .step=${this.adapter.templateData.step}
40
- .minimum=${this.adapter.templateData.minimum}
41
- .maximum=${this.adapter.templateData.maximum}
42
- .autoGrow=${this.adapter.templateData.autoGrow}
43
- .placeholder=${this.adapter.templateData.placeholder}
44
- .autocomplete=${this.adapter.templateData.autocomplete}
45
- @input=${this.valueChanged}
46
- @blur=${() => this.adapter.onBlur()}
47
- ></gui-number>
48
- `;
49
- }
50
- valueChanged(e) {
51
- const t = e.detail.value;
52
- this.adapter.valueChanged(t);
53
- }
54
- disconnectedCallback() {
55
- super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((e) => e.unsubscribe());
56
- }
57
- };
58
- o([
59
- u({ context: d.formContext }),
60
- c({ attribute: !1 })
61
- ], i.prototype, "formContext", 2);
62
- o([
63
- n({ context: d.inputContext })
64
- ], i.prototype, "adapter", 2);
65
- i = o([
66
- b("gui-number-input")
67
- ], i);
68
- export {
69
- i as NumberElement
70
- };
@@ -1,71 +0,0 @@
1
- import * as o from "@golemui/lit";
2
- import { consume as h, provide as n } from "@lit/context";
3
- import { LitElement as u, html as c } from "lit";
4
- import { property as m, customElement as b } from "lit/decorators.js";
5
- var w = Object.defineProperty, D = Object.getOwnPropertyDescriptor, l = (e, t, i, s) => {
6
- for (var a = s > 1 ? void 0 : s ? D(t, i) : t, p = e.length - 1, d; p >= 0; p--)
7
- (d = e[p]) && (a = (s ? d(t, i, a) : d(a)) || a);
8
- return s && a && w(t, i, a), a;
9
- };
10
- let r = class extends u {
11
- constructor() {
12
- super(...arguments), this.adapter = new o.InputWidgetAdapter(), this.subscriptions = [];
13
- }
14
- createRenderRoot() {
15
- return this;
16
- }
17
- updated(e) {
18
- super.updated(e);
19
- const t = this.adapter.templateData.size;
20
- t ? this.style.flex = String(t) : this.style.removeProperty("flex");
21
- }
22
- connectedCallback() {
23
- super.connectedCallback(), this.classList.add("gui-password", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
24
- this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
25
- );
26
- }
27
- render() {
28
- return super.render(), c`
29
- <gui-password
30
- .uid=${this.widget.uid}
31
- .label=${this.adapter.templateData.label}
32
- .hint=${this.adapter.templateData.hint}
33
- .errors=${this.adapter.templateData.errors}
34
- ?touched=${this.adapter.templateData.touched}
35
- ?required=${this.adapter.templateData.validator?.required}
36
- ?disabled=${this.adapter.templateData.disabled}
37
- ?readonly=${this.adapter.templateData.readonly}
38
- .value=${this.adapter.templateData.value}
39
- .icon=${this.adapter.templateData.icon}
40
- .placeholder=${this.adapter.templateData.placeholder}
41
- .autocomplete=${this.adapter.templateData.autocomplete}
42
- .showPasswordIcon=${this.adapter.templateData.showPasswordIcon}
43
- .hidePasswordIcon=${this.adapter.templateData.hidePasswordIcon}
44
- .showPasswordLabel=${this.adapter.templateData.showPasswordLabel}
45
- .hidePasswordLabel=${this.adapter.templateData.hidePasswordLabel}
46
- @input=${this.valueChanged}
47
- @blur=${() => this.adapter.onBlur()}
48
- ></gui-password>
49
- `;
50
- }
51
- valueChanged(e) {
52
- const t = e.detail.value;
53
- this.adapter.valueChanged(t);
54
- }
55
- disconnectedCallback() {
56
- super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((e) => e.unsubscribe());
57
- }
58
- };
59
- l([
60
- h({ context: o.formContext }),
61
- m({ attribute: !1 })
62
- ], r.prototype, "formContext", 2);
63
- l([
64
- n({ context: o.inputContext })
65
- ], r.prototype, "adapter", 2);
66
- r = l([
67
- b("gui-password-input")
68
- ], r);
69
- export {
70
- r as PasswordElement
71
- };
@@ -1,68 +0,0 @@
1
- import * as o from "@golemui/lit";
2
- import { consume as n, provide as u } from "@lit/context";
3
- import { LitElement as h, html as c } from "lit";
4
- import { property as m, customElement as b } from "lit/decorators.js";
5
- var g = Object.defineProperty, f = Object.getOwnPropertyDescriptor, l = (e, t, s, r) => {
6
- for (var a = r > 1 ? void 0 : r ? f(t, s) : t, p = e.length - 1, d; p >= 0; p--)
7
- (d = e[p]) && (a = (r ? d(t, s, a) : d(a)) || a);
8
- return r && a && g(t, s, a), a;
9
- };
10
- let i = class extends h {
11
- constructor() {
12
- super(...arguments), this.adapter = new o.InputWidgetAdapter(), this.subscriptions = [];
13
- }
14
- createRenderRoot() {
15
- return this;
16
- }
17
- updated(e) {
18
- super.updated(e);
19
- const t = this.adapter.templateData.size;
20
- t ? this.style.flex = String(t) : this.style.removeProperty("flex");
21
- }
22
- connectedCallback() {
23
- super.connectedCallback(), this.classList.add("gui-radiogroup", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
24
- this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
25
- );
26
- }
27
- render() {
28
- return super.render(), c`
29
- <gui-radiogroup
30
- .uid=${this.widget.uid}
31
- .label=${this.adapter.templateData.label}
32
- .errors=${this.adapter.templateData.errors}
33
- ?touched=${this.adapter.templateData.touched}
34
- ?required=${this.adapter.templateData.validator?.required}
35
- ?disabled=${this.adapter.templateData.disabled}
36
- ?readonly=${this.adapter.templateData.readonly}
37
- .value=${this.adapter.templateData.value}
38
- .hint=${this.adapter.templateData.hint}
39
- .options=${this.adapter.templateData.options}
40
- .labelField=${this.adapter.templateData.labelField}
41
- .valueField=${this.adapter.templateData.valueField}
42
- .direction=${this.adapter.templateData.direction}
43
- @change=${this.valueChanged}
44
- @blur=${() => this.adapter.onBlur()}
45
- ></gui-radiogroup>
46
- `;
47
- }
48
- valueChanged(e) {
49
- const t = e.detail.value;
50
- this.adapter.valueChanged(t);
51
- }
52
- disconnectedCallback() {
53
- super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((e) => e.unsubscribe());
54
- }
55
- };
56
- l([
57
- n({ context: o.formContext }),
58
- m({ attribute: !1 })
59
- ], i.prototype, "formContext", 2);
60
- l([
61
- u({ context: o.inputContext })
62
- ], i.prototype, "adapter", 2);
63
- i = l([
64
- b("gui-radiogroup-input")
65
- ], i);
66
- export {
67
- i as RadiogroupElement
68
- };
@@ -1,74 +0,0 @@
1
- import * as d from "@golemui/lit";
2
- import { consume as n, provide as u } from "@lit/context";
3
- import { LitElement as h, html as c } from "lit";
4
- import { property as m, customElement as b } from "lit/decorators.js";
5
- var $ = Object.defineProperty, f = Object.getOwnPropertyDescriptor, o = (t, e, i, r) => {
6
- for (var a = r > 1 ? void 0 : r ? f(e, i) : e, l = t.length - 1, p; l >= 0; l--)
7
- (p = t[l]) && (a = (r ? p(e, i, a) : p(a)) || a);
8
- return r && a && $(e, i, a), a;
9
- };
10
- let s = class extends h {
11
- constructor() {
12
- super(...arguments), this.adapter = new d.InputWidgetAdapter(), this.subscriptions = [];
13
- }
14
- createRenderRoot() {
15
- return this;
16
- }
17
- updated(t) {
18
- super.updated(t);
19
- const e = this.adapter.templateData.size;
20
- e ? this.style.flex = String(e) : this.style.removeProperty("flex");
21
- }
22
- connectedCallback() {
23
- super.connectedCallback(), this.classList.add("gui-select", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
24
- this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
25
- );
26
- }
27
- render() {
28
- return super.render(), c`
29
- <gui-select
30
- .uid=${this.widget.uid}
31
- .label=${this.adapter.templateData.label}
32
- .errors=${this.adapter.templateData.errors}
33
- ?touched=${this.adapter.templateData.touched}
34
- ?required=${this.adapter.templateData.validator?.required}
35
- ?disabled=${this.adapter.templateData.disabled}
36
- ?readonly=${this.adapter.templateData.readonly}
37
- .value=${this.adapter.templateData.value}
38
- .hint=${this.adapter.templateData.hint}
39
- .icon=${this.adapter.templateData.icon}
40
- .placeholder=${this.adapter.templateData.placeholder}
41
- .autocomplete=${this.adapter.templateData.autocomplete}
42
- .options=${this.adapter.templateData.options}
43
- .labelField=${this.adapter.templateData.labelField}
44
- .valueField=${this.adapter.templateData.valueField}
45
- @change=${this.valueChanged}
46
- @inputError=${this.onInputError}
47
- @blur=${() => this.adapter.onBlur()}
48
- ></gui-select>
49
- `;
50
- }
51
- valueChanged(t) {
52
- const e = t.detail.value;
53
- this.adapter.valueChanged(e);
54
- }
55
- onInputError(t) {
56
- this.adapter.injectValidationIssues([t.detail.message]);
57
- }
58
- disconnectedCallback() {
59
- super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((t) => t.unsubscribe());
60
- }
61
- };
62
- o([
63
- n({ context: d.formContext }),
64
- m({ attribute: !1 })
65
- ], s.prototype, "formContext", 2);
66
- o([
67
- u({ context: d.inputContext })
68
- ], s.prototype, "adapter", 2);
69
- s = o([
70
- b("gui-select-input")
71
- ], s);
72
- export {
73
- s as SelectElement
74
- };
@@ -1,70 +0,0 @@
1
- import * as d from "@golemui/lit";
2
- import { consume as n, provide as u } from "@lit/context";
3
- import { LitElement as h, html as m } from "lit";
4
- import { property as c, customElement as b } from "lit/decorators.js";
5
- var f = Object.defineProperty, g = Object.getOwnPropertyDescriptor, l = (e, t, s, r) => {
6
- for (var a = r > 1 ? void 0 : r ? g(t, s) : t, p = e.length - 1, o; p >= 0; p--)
7
- (o = e[p]) && (a = (r ? o(t, s, a) : o(a)) || a);
8
- return r && a && f(t, s, a), a;
9
- };
10
- let i = class extends h {
11
- constructor() {
12
- super(...arguments), this.adapter = new d.InputWidgetAdapter(), this.subscriptions = [];
13
- }
14
- createRenderRoot() {
15
- return this;
16
- }
17
- updated(e) {
18
- super.updated(e);
19
- const t = this.adapter.templateData.size;
20
- t ? this.style.flex = String(t) : this.style.removeProperty("flex");
21
- }
22
- connectedCallback() {
23
- super.connectedCallback(), this.classList.add("gui-textarea", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
24
- this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
25
- );
26
- }
27
- render() {
28
- return super.render(), m`
29
- <gui-textarea
30
- .uid=${this.widget.uid}
31
- .label=${this.adapter.templateData.label}
32
- .errors=${this.adapter.templateData.errors}
33
- ?touched=${this.adapter.templateData.touched}
34
- ?required=${this.adapter.templateData.validator?.required}
35
- ?disabled=${this.adapter.templateData.disabled}
36
- ?readonly=${this.adapter.templateData.readonly}
37
- .value=${this.adapter.templateData.value}
38
- .hint=${this.adapter.templateData.hint}
39
- .placeholder=${this.adapter.templateData.placeholder}
40
- .autocomplete=${this.adapter.templateData.autocomplete}
41
- .counterMode=${this.adapter.templateData.counterMode}
42
- .minimumHeight=${this.adapter.templateData.minimumHeight}
43
- .autoGrow=${this.adapter.templateData.autoGrow}
44
- .maxLength=${this.adapter.templateData.validator?.maxLength}
45
- @input=${this.valueChanged}
46
- @blur=${() => this.adapter.onBlur()}
47
- ></gui-textarea>
48
- `;
49
- }
50
- valueChanged(e) {
51
- const t = e.detail.value;
52
- this.adapter.valueChanged(t);
53
- }
54
- disconnectedCallback() {
55
- super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((e) => e.unsubscribe());
56
- }
57
- };
58
- l([
59
- n({ context: d.formContext }),
60
- c({ attribute: !1 })
61
- ], i.prototype, "formContext", 2);
62
- l([
63
- u({ context: d.inputContext })
64
- ], i.prototype, "adapter", 2);
65
- i = l([
66
- b("gui-textarea-input")
67
- ], i);
68
- export {
69
- i as TextareaElement
70
- };
@@ -1,67 +0,0 @@
1
- import * as d from "@golemui/lit";
2
- import { consume as n, provide as u } from "@lit/context";
3
- import { LitElement as h, html as c } from "lit";
4
- import { property as m, customElement as b } from "lit/decorators.js";
5
- var f = Object.defineProperty, v = Object.getOwnPropertyDescriptor, o = (e, t, s, r) => {
6
- for (var a = r > 1 ? void 0 : r ? v(t, s) : t, p = e.length - 1, l; p >= 0; p--)
7
- (l = e[p]) && (a = (r ? l(t, s, a) : l(a)) || a);
8
- return r && a && f(t, s, a), a;
9
- };
10
- let i = class extends h {
11
- constructor() {
12
- super(...arguments), this.adapter = new d.InputWidgetAdapter(), this.subscriptions = [];
13
- }
14
- createRenderRoot() {
15
- return this;
16
- }
17
- updated(e) {
18
- super.updated(e);
19
- const t = this.adapter.templateData.size;
20
- t ? this.style.flex = String(t) : this.style.removeProperty("flex");
21
- }
22
- connectedCallback() {
23
- super.connectedCallback(), this.classList.add("gui-textinput", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
24
- this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
25
- );
26
- }
27
- render() {
28
- return super.render(), c`
29
- <gui-textinput
30
- .uid=${this.widget.uid}
31
- .label=${this.adapter.templateData.label}
32
- .hint=${this.adapter.templateData.hint}
33
- .errors=${this.adapter.templateData.errors}
34
- ?touched=${this.adapter.templateData.touched}
35
- ?required=${this.adapter.templateData.validator?.required}
36
- ?disabled=${this.adapter.templateData.disabled}
37
- ?readonly=${this.adapter.templateData.readonly}
38
- .value=${this.adapter.templateData.value}
39
- .icon=${this.adapter.templateData.icon}
40
- .placeholder=${this.adapter.templateData.placeholder}
41
- .autocomplete=${this.adapter.templateData.autocomplete}
42
- @input=${this.valueChanged}
43
- @blur=${() => this.adapter.onBlur()}
44
- ></gui-textinput>
45
- `;
46
- }
47
- valueChanged(e) {
48
- const t = e.detail.value;
49
- this.adapter.valueChanged(t);
50
- }
51
- disconnectedCallback() {
52
- super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((e) => e.unsubscribe());
53
- }
54
- };
55
- o([
56
- n({ context: d.formContext }),
57
- m({ attribute: !1 })
58
- ], i.prototype, "formContext", 2);
59
- o([
60
- u({ context: d.inputContext })
61
- ], i.prototype, "adapter", 2);
62
- i = o([
63
- b("gui-textinput-input")
64
- ], i);
65
- export {
66
- i as TextinputElement
67
- };