@golemui/gui-lit 0.0.2 → 0.12.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 (66) hide show
  1. package/README.md +17 -4
  2. package/{accordion.element-D1RfC2ew.js → accordion.element-81uTv6Ms.js} +29 -18
  3. package/{alert.element-B4rpyqGV.js → alert.element-DWrS5ggK.js} +17 -17
  4. package/button.element-hjhVBamJ.js +56 -0
  5. package/{calendar.element-D7mAbpAa.js → calendar.element-C1rLK7aY.js} +24 -18
  6. package/{checkbox.element--Kc7sWBx.js → checkbox.element-bu9_MvED.js} +8 -8
  7. package/{currency.element-D9dyGRBH.js → currency.element-Bxv2WxAx.js} +20 -19
  8. package/date-picker.element-GNC8f3Qi.js +157 -0
  9. package/{date.element-na_Uywms.js → date.element-Dzw-UJzC.js} +10 -10
  10. package/{dropdown.element-Cfj40aJz.js → dropdown.element-CebROj9s.js} +95 -78
  11. package/flex.element-BMqqfxjI.js +77 -0
  12. package/grid.element-CBMoOuLt.js +75 -0
  13. package/index.js +1104 -1031
  14. package/index.umd.cjs +319 -112
  15. package/lib/components/accordion.element.d.ts +1 -1
  16. package/lib/components/alert.element.d.ts +1 -1
  17. package/lib/components/button.element.d.ts +3 -2
  18. package/lib/components/calendar.element.d.ts +1 -0
  19. package/lib/components/checkbox.element.d.ts +1 -1
  20. package/lib/components/currency.element.d.ts +1 -1
  21. package/lib/components/date-picker.element.d.ts +4 -2
  22. package/lib/components/date.element.d.ts +1 -1
  23. package/lib/components/dropdown.element.d.ts +1 -1
  24. package/lib/components/flex.element.d.ts +1 -1
  25. package/lib/components/form.element.d.ts +6 -16
  26. package/lib/components/grid.element.d.ts +16 -0
  27. package/lib/components/list.element.d.ts +1 -1
  28. package/lib/components/markdown-text.element.d.ts +16 -0
  29. package/lib/components/markdown.element.d.ts +17 -0
  30. package/lib/components/number.element.d.ts +1 -1
  31. package/lib/components/password.element.d.ts +1 -1
  32. package/lib/components/radiogroup.element.d.ts +1 -1
  33. package/lib/components/range-calendar.element.d.ts +1 -0
  34. package/lib/components/range-date-input.element.d.ts +18 -0
  35. package/lib/components/range-date-picker.element.d.ts +30 -0
  36. package/lib/components/renderer.element.d.ts +1 -0
  37. package/lib/components/repeater.element.d.ts +5 -1
  38. package/lib/components/select.element.d.ts +1 -1
  39. package/lib/components/tabs.element.d.ts +1 -1
  40. package/lib/components/textarea.element.d.ts +1 -1
  41. package/lib/components/textinput.element.d.ts +1 -1
  42. package/lib/components/toggle.element.d.ts +1 -1
  43. package/lib/widget.loaders.d.ts +2 -2
  44. package/{list.element--aj6sNNU.js → list.element-DIIgN_Ww.js} +66 -59
  45. package/markdown-text.element-DY7b-dU5.js +53 -0
  46. package/markdown.element-ZD_n4ObO.js +73 -0
  47. package/{number.element-Bl5YReaL.js → number.element-B0E7W2TK.js} +20 -19
  48. package/package.json +11 -6
  49. package/{password.element-CKmcH8Gn.js → password.element-C4_eLdUO.js} +11 -10
  50. package/{radiogroup.element-Cn1lyyVE.js → radiogroup.element-BD8qBNoO.js} +8 -7
  51. package/{range-calendar.element-C2YUElqM.js → range-calendar.element-Bli9UfhN.js} +35 -27
  52. package/range-date-input.element-BwPvGk5F.js +72 -0
  53. package/range-date-picker.element-DJQOwDPh.js +170 -0
  54. package/renderer.element-B99qD2mz.js +48 -0
  55. package/repeater.element-AaifWsOB.js +136 -0
  56. package/{select.element-LWiqYxzA.js → select.element-BLxtqB0A.js} +9 -8
  57. package/{tabs.element-DYg1wAz9.js → tabs.element-k8JMNDXi.js} +18 -16
  58. package/{textarea.element-BXc-rLZE.js → textarea.element-DgDwfzYP.js} +14 -14
  59. package/{textinput.element-x9LYeW8B.js → textinput.element-DSLFDjfb.js} +17 -16
  60. package/{toggle.element-BP4YKWyR.js → toggle.element-BLu6F99u.js} +5 -5
  61. package/CHANGELOG.md +0 -529
  62. package/button.element-BnUBVNSH.js +0 -58
  63. package/date-picker.element-Dcs5OpxN.js +0 -136
  64. package/flex.element-BSMOum-h.js +0 -65
  65. package/renderer.element-B7AjPqr2.js +0 -43
  66. package/repeater.element-BfwzCooC.js +0 -83
@@ -0,0 +1,136 @@
1
+ import * as c from "@golemui/lit";
2
+ import { getItemKey as l } from "@golemui/gui-shared";
3
+ import { consume as h, provide as m } from "@lit/context";
4
+ import { LitElement as g, nothing as n, html as s } from "lit";
5
+ import { repeat as b } from "lit-html/directives/repeat.js";
6
+ import { property as $, state as v, query as f, customElement as _ } from "lit/decorators.js";
7
+ var I = Object.defineProperty, w = Object.getOwnPropertyDescriptor, u = (e, t, a, r) => {
8
+ for (var i = r > 1 ? void 0 : r ? w(t, a) : t, d = e.length - 1, p; d >= 0; d--)
9
+ (p = e[d]) && (i = (r ? p(t, a, i) : p(i)) || i);
10
+ return r && i && I(t, a, i), i;
11
+ };
12
+ let C = 0;
13
+ const y = () => C++;
14
+ let o = class extends g {
15
+ constructor() {
16
+ super(...arguments), this.adapter = new c.InputWidgetAdapter(), this.isFocused = !1, this.subscriptions = [];
17
+ }
18
+ createRenderRoot() {
19
+ return this;
20
+ }
21
+ updated(e) {
22
+ super.updated(e);
23
+ const t = this.adapter.templateData.size;
24
+ t ? this.style.flex = String(t) : this.style.removeProperty("flex");
25
+ }
26
+ connectedCallback() {
27
+ super.connectedCallback(), this.classList.add("gui-repeater", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
28
+ this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
29
+ );
30
+ }
31
+ onFocusIn(e) {
32
+ e.stopPropagation(), this.isFocused = !0;
33
+ }
34
+ onFocusOut(e) {
35
+ e.stopPropagation(), this.adapter.onBlur(), this.isFocused = !1;
36
+ }
37
+ render() {
38
+ const e = this.adapter.templateData, t = e.touched && e.errors && e.errors.length > 0;
39
+ return s`
40
+ <div
41
+ id=${this.widget.uid}
42
+ class=${`gui-repeater__main-card gui-repeater__card ${this.isFocused ? "gui-repeater__card--focused" : ""}`}
43
+ @focusin=${this.onFocusIn}
44
+ @focusout=${this.onFocusOut}
45
+ >
46
+ <gui-label
47
+ .targetElement=${[this._repeaterRef]}
48
+ .uid=${this.widget.uid}
49
+ .label=${e.label}
50
+ .errors=${e.errors}
51
+ .touched=${e.touched}
52
+ .required=${e.validator?.required}
53
+ .native=${!1}
54
+ ></gui-label>
55
+ ${e.value ? b(
56
+ e.value,
57
+ (a) => l(a, y),
58
+ (a, r) => s`
59
+ <div class="gui-repeater__card">
60
+ <div class="gui-repeater__card-header">
61
+ ${e.title ? s`<span class="gui-repeater__card-title"
62
+ >${e.title} ${r + 1}</span
63
+ >` : n}
64
+ <button
65
+ type="button"
66
+ tabindex="0"
67
+ class="gui-button gui-button--sm gui-repeater__remove-btn"
68
+ @click=${() => this.removeItem(r)}
69
+ >
70
+ ${e.removeButtonIcon ? s`<span
71
+ class="gui-widget-icon gui-button-icon ${e.removeButtonIcon}"
72
+ data-icon=${e.removeButtonIcon}
73
+ ></span>` : n}
74
+ ${e.removeLabel ?? "Remove"}
75
+ </button>
76
+ </div>
77
+ <gui-repeater-widget
78
+ .repeaterIndex=${r}
79
+ .widget=${e.template}
80
+ ></gui-repeater-widget>
81
+ </div>
82
+ `
83
+ ) : n}
84
+
85
+ <button
86
+ type="button"
87
+ tabindex="0"
88
+ class="gui-button gui-repeater__add-btn"
89
+ @click=${() => this.addItem()}
90
+ ?disabled=${!!(e.limit && e.limit === e.value?.length)}
91
+ >
92
+ ${e.addButtonIcon ? s`<span
93
+ class="gui-widget-icon gui-button-icon ${e.addButtonIcon}"
94
+ data-icon=${e.addButtonIcon}
95
+ ></span>` : n}
96
+ ${e.addLabel ?? "Add"}
97
+ </button>
98
+ </div>
99
+ ${t ? s`<gui-errors
100
+ .uid=${this.widget.uid}
101
+ .errors=${e.errors}
102
+ .touched=${e.touched}
103
+ ></gui-errors>` : n}
104
+ `;
105
+ }
106
+ disconnectedCallback() {
107
+ super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((e) => e.unsubscribe());
108
+ }
109
+ addItem() {
110
+ const e = [...this.adapter.templateData.value ?? [], {}];
111
+ this.adapter.valueChanged(e), this.requestUpdate();
112
+ }
113
+ removeItem(e) {
114
+ const t = (this.adapter.templateData.value ?? []).filter((a, r) => e !== r);
115
+ "structuredClone" in window ? this.adapter.valueChanged(structuredClone(t)) : this.adapter.valueChanged(JSON.parse(JSON.stringify(t))), this.requestUpdate();
116
+ }
117
+ };
118
+ u([
119
+ h({ context: c.formContext }),
120
+ $({ attribute: !1 })
121
+ ], o.prototype, "formContext", 2);
122
+ u([
123
+ m({ context: c.inputContext })
124
+ ], o.prototype, "adapter", 2);
125
+ u([
126
+ v()
127
+ ], o.prototype, "isFocused", 2);
128
+ u([
129
+ f(".gui-repeater__main-card")
130
+ ], o.prototype, "_repeaterRef", 2);
131
+ o = u([
132
+ _("gui-repeater-input")
133
+ ], o);
134
+ export {
135
+ o as RepeaterElement
136
+ };
@@ -2,10 +2,10 @@ import * as d from "@golemui/lit";
2
2
  import { consume as n, provide as u } from "@lit/context";
3
3
  import { LitElement as h, html as c } from "lit";
4
4
  import { property as m, customElement as b } from "lit/decorators.js";
5
- var v = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, o = (t, e, i, r) => {
6
- for (var a = r > 1 ? void 0 : r ? $(e, i) : e, l = t.length - 1, p; l >= 0; l--)
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
7
  (p = t[l]) && (a = (r ? p(e, i, a) : p(a)) || a);
8
- return r && a && v(e, i, a), a;
8
+ return r && a && $(e, i, a), a;
9
9
  };
10
10
  let s = class extends h {
11
11
  constructor() {
@@ -14,16 +14,16 @@ let s = class extends h {
14
14
  createRenderRoot() {
15
15
  return this;
16
16
  }
17
- connectedCallback() {
18
- super.connectedCallback(), this.classList.add("gui-select"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
19
- this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
20
- );
21
- }
22
17
  updated(t) {
23
18
  super.updated(t);
24
19
  const e = this.adapter.templateData.size;
25
20
  e ? this.style.flex = String(e) : this.style.removeProperty("flex");
26
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
27
  render() {
28
28
  return super.render(), c`
29
29
  <gui-select
@@ -38,6 +38,7 @@ let s = class extends h {
38
38
  .hint=${this.adapter.templateData.hint}
39
39
  .icon=${this.adapter.templateData.icon}
40
40
  .placeholder=${this.adapter.templateData.placeholder}
41
+ .autocomplete=${this.adapter.templateData.autocomplete}
41
42
  .options=${this.adapter.templateData.options}
42
43
  .labelField=${this.adapter.templateData.labelField}
43
44
  .valueField=${this.adapter.templateData.valueField}
@@ -3,13 +3,12 @@ import { createIntersectionObserver as p } from "@golemui/gui-components";
3
3
  import { consume as m, provide as v } from "@lit/context";
4
4
  import { LitElement as w, html as d, nothing as $ } from "lit";
5
5
  import { repeat as u } from "lit-html/directives/repeat.js";
6
- import { query as b, state as g, queryAll as y, property as f, customElement as T } from "lit/decorators.js";
6
+ import { query as b, state as g, queryAll as y, property as f, customElement as _ } from "lit/decorators.js";
7
7
  import { classMap as h } from "lit/directives/class-map.js";
8
- import { ifDefined as _ } from "lit-html/directives/if-defined.js";
9
- var x = Object.defineProperty, C = Object.getOwnPropertyDescriptor, o = (s, i, e, t) => {
10
- for (var r = t > 1 ? void 0 : t ? C(i, e) : i, a = s.length - 1, l; a >= 0; a--)
8
+ var T = Object.defineProperty, x = Object.getOwnPropertyDescriptor, o = (s, i, e, t) => {
9
+ for (var r = t > 1 ? void 0 : t ? x(i, e) : i, a = s.length - 1, l; a >= 0; a--)
11
10
  (l = s[a]) && (r = (t ? l(i, e, r) : l(r)) || r);
12
- return t && r && x(i, e, r), r;
11
+ return t && r && T(i, e, r), r;
13
12
  };
14
13
  let n = class extends w {
15
14
  constructor() {
@@ -18,8 +17,13 @@ let n = class extends w {
18
17
  createRenderRoot() {
19
18
  return this;
20
19
  }
20
+ updated(s) {
21
+ super.updated(s);
22
+ const i = this.adapter.templateData.size;
23
+ i ? this.style.flex = String(i) : this.style.removeProperty("flex");
24
+ }
21
25
  connectedCallback() {
22
- super.connectedCallback(), this.classList.add("gui-tabs");
26
+ super.connectedCallback(), this.classList.add("gui-tabs", "gui-field");
23
27
  const s = this.widget.props;
24
28
  this.adapter.context = this.formContext, this.adapter.init(this.widget), this.activeTab = s.defaultOpen ?? s.tabs[0].uid, this.subscriptions.push(
25
29
  this.adapter.templateDataChanged$.subscribe(() => {
@@ -27,11 +31,6 @@ let n = class extends w {
27
31
  })
28
32
  );
29
33
  }
30
- updated(s) {
31
- super.updated(s);
32
- const i = this.adapter.templateData.size;
33
- i ? this.style.flex = String(i) : this.style.removeProperty("flex");
34
- }
35
34
  firstUpdated(s) {
36
35
  this.startObserver = p(
37
36
  this.startSentinel,
@@ -41,7 +40,7 @@ let n = class extends w {
41
40
  (t) => this.isEndVisible = t
42
41
  );
43
42
  const e = this.widget.props.tabs.findIndex((t) => t.uid === this.activeTab);
44
- this.tabButtons[e].scrollIntoView();
43
+ this.tabButtons[e].scrollIntoView({ block: "nearest", inline: "nearest" });
45
44
  }
46
45
  render() {
47
46
  if (!this.adapter.templateData) return d``;
@@ -63,7 +62,7 @@ let n = class extends w {
63
62
  <button
64
63
  type="button"
65
64
  role="tab"
66
- tabindex=${_(e.uid === this.activeTab ? void 0 : -1)}
65
+ tabindex=${e.uid === this.activeTab ? "0" : "-1"}
67
66
  data-cy=${`tab_${this.widget.uid}_${t}`}
68
67
  id=${`tab_${this.widget.uid}_${t}`}
69
68
  aria-controls=${`tabpanel_${this.widget.uid}_${t}`}
@@ -71,14 +70,17 @@ let n = class extends w {
71
70
  class=${h({ active: e.uid === this.activeTab })}
72
71
  @click=${() => this.onClickTab(e.uid)}
73
72
  @keydown=${this.onKeyDown}
74
- @focus=${(r) => r.target.scrollIntoView()}
73
+ @focus=${(r) => r.target.scrollIntoView({
74
+ block: "nearest",
75
+ inline: "nearest"
76
+ })}
75
77
  >
76
78
  ${e.label}
77
79
  </button>
78
80
  </li>
79
81
  `
80
82
  ) : $}
81
- <li role="presentation" id="end-sentinel" class="gui-sentinel"></li>
83
+ <li role="presentation" id="end-sentinel" class="gui-sentinel gui-sentinel__end"></li>
82
84
  </ul>
83
85
  </nav>
84
86
  ${u(
@@ -151,7 +153,7 @@ o([
151
153
  v({ context: c.layoutContext })
152
154
  ], n.prototype, "adapter", 2);
153
155
  n = o([
154
- T("gui-tabs-layout")
156
+ _("gui-tabs-layout")
155
157
  ], n);
156
158
  export {
157
159
  n as TabsElement
@@ -1,29 +1,29 @@
1
- import * as o from "@golemui/lit";
1
+ import * as d from "@golemui/lit";
2
2
  import { consume as n, provide as u } from "@lit/context";
3
3
  import { LitElement as h, html as m } from "lit";
4
4
  import { property as c, customElement as b } from "lit/decorators.js";
5
- var x = Object.defineProperty, D = Object.getOwnPropertyDescriptor, l = (e, t, s, r) => {
6
- for (var a = r > 1 ? void 0 : r ? D(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 && x(t, s, a), a;
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
9
  };
10
10
  let i = class extends h {
11
11
  constructor() {
12
- super(...arguments), this.adapter = new o.InputWidgetAdapter(), this.subscriptions = [];
12
+ super(...arguments), this.adapter = new d.InputWidgetAdapter(), this.subscriptions = [];
13
13
  }
14
14
  createRenderRoot() {
15
15
  return this;
16
16
  }
17
- connectedCallback() {
18
- super.connectedCallback(), this.classList.add("gui-textarea"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
19
- this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
20
- );
21
- }
22
17
  updated(e) {
23
18
  super.updated(e);
24
19
  const t = this.adapter.templateData.size;
25
20
  t ? this.style.flex = String(t) : this.style.removeProperty("flex");
26
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
27
  render() {
28
28
  return super.render(), m`
29
29
  <gui-textarea
@@ -37,7 +37,7 @@ let i = class extends h {
37
37
  .value=${this.adapter.templateData.value}
38
38
  .hint=${this.adapter.templateData.hint}
39
39
  .placeholder=${this.adapter.templateData.placeholder}
40
- .icon=${this.adapter.templateData.icon}
40
+ .autocomplete=${this.adapter.templateData.autocomplete}
41
41
  .counterMode=${this.adapter.templateData.counterMode}
42
42
  .minimumHeight=${this.adapter.templateData.minimumHeight}
43
43
  .autoGrow=${this.adapter.templateData.autoGrow}
@@ -56,11 +56,11 @@ let i = class extends h {
56
56
  }
57
57
  };
58
58
  l([
59
- n({ context: o.formContext }),
59
+ n({ context: d.formContext }),
60
60
  c({ attribute: !1 })
61
61
  ], i.prototype, "formContext", 2);
62
62
  l([
63
- u({ context: o.inputContext })
63
+ u({ context: d.inputContext })
64
64
  ], i.prototype, "adapter", 2);
65
65
  i = l([
66
66
  b("gui-textarea-input")
@@ -1,29 +1,29 @@
1
- import * as l from "@golemui/lit";
2
- import { consume as o, provide as u } from "@lit/context";
1
+ import * as d from "@golemui/lit";
2
+ import { consume as n, provide as u } from "@lit/context";
3
3
  import { LitElement as h, html as c } from "lit";
4
4
  import { property as m, customElement as b } from "lit/decorators.js";
5
- var f = Object.defineProperty, v = Object.getOwnPropertyDescriptor, n = (e, t, s, r) => {
6
- for (var a = r > 1 ? void 0 : r ? v(t, s) : t, p = e.length - 1, d; p >= 0; p--)
7
- (d = e[p]) && (a = (r ? d(t, s, a) : d(a)) || a);
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
8
  return r && a && f(t, s, a), a;
9
9
  };
10
10
  let i = class extends h {
11
11
  constructor() {
12
- super(...arguments), this.adapter = new l.InputWidgetAdapter(), this.subscriptions = [];
12
+ super(...arguments), this.adapter = new d.InputWidgetAdapter(), this.subscriptions = [];
13
13
  }
14
14
  createRenderRoot() {
15
15
  return this;
16
16
  }
17
- connectedCallback() {
18
- super.connectedCallback(), this.classList.add("gui-textinput"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
19
- this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
20
- );
21
- }
22
17
  updated(e) {
23
18
  super.updated(e);
24
19
  const t = this.adapter.templateData.size;
25
20
  t ? this.style.flex = String(t) : this.style.removeProperty("flex");
26
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
27
  render() {
28
28
  return super.render(), c`
29
29
  <gui-textinput
@@ -38,6 +38,7 @@ let i = class extends h {
38
38
  .value=${this.adapter.templateData.value}
39
39
  .icon=${this.adapter.templateData.icon}
40
40
  .placeholder=${this.adapter.templateData.placeholder}
41
+ .autocomplete=${this.adapter.templateData.autocomplete}
41
42
  @input=${this.valueChanged}
42
43
  @blur=${() => this.adapter.onBlur()}
43
44
  ></gui-textinput>
@@ -51,14 +52,14 @@ let i = class extends h {
51
52
  super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((e) => e.unsubscribe());
52
53
  }
53
54
  };
54
- n([
55
- o({ context: l.formContext }),
55
+ o([
56
+ n({ context: d.formContext }),
56
57
  m({ attribute: !1 })
57
58
  ], i.prototype, "formContext", 2);
58
- n([
59
- u({ context: l.inputContext })
59
+ o([
60
+ u({ context: d.inputContext })
60
61
  ], i.prototype, "adapter", 2);
61
- i = n([
62
+ i = o([
62
63
  b("gui-textinput-input")
63
64
  ], i);
64
65
  export {
@@ -14,16 +14,16 @@ let s = class extends h {
14
14
  createRenderRoot() {
15
15
  return this;
16
16
  }
17
- connectedCallback() {
18
- super.connectedCallback(), this.classList.add("gui-toggle"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
19
- this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
20
- );
21
- }
22
17
  updated(e) {
23
18
  super.updated(e);
24
19
  const t = this.adapter.templateData.size;
25
20
  t ? this.style.flex = String(t) : this.style.removeProperty("flex");
26
21
  }
22
+ connectedCallback() {
23
+ super.connectedCallback(), this.classList.add("gui-toggle", "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
27
  render() {
28
28
  return super.render(), c`
29
29
  <gui-toggle