@golemui/gui-lit 1.2.0 → 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.
Files changed (91) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/{accordion.element-BIgxl5e9.js → accordion.element-C9GzfKrY.js} +29 -30
  3. package/alert.element-CHn49Yaf.js +55 -0
  4. package/button.element-C9fHivSw.js +59 -0
  5. package/{calendar.element-Cv3RBphf.js → calendar.element-XkojKTJk.js} +30 -31
  6. package/checkbox.element-DU_tVMXu.js +66 -0
  7. package/currency.element-BmAH5KS_.js +73 -0
  8. package/date-picker.element-Bg3rF95F.js +94 -0
  9. package/{date-time-calendar.element-DlbWZjoe.js → date-time-calendar.element-sywQCeQQ.js} +24 -24
  10. package/date-time-picker.element-HHpwjWTQ.js +107 -0
  11. package/{date-time.element-CLLxM2nV.js → date-time.element-ucETvSTC.js} +26 -26
  12. package/{date.element-B8ZHK9KJ.js → date.element-BEHGxRFF.js} +27 -27
  13. package/default-list-item-renderer-CuPJ9jUD.js +24 -0
  14. package/{dropdown.element-DMZ7oL5n.js → dropdown.element-DUqG_p1x.js} +85 -84
  15. package/{flex.element-DG4Uaj_X.js → flex.element-pwba7621.js} +27 -28
  16. package/{grid.element-DCZsh-3J.js → grid.element-C8K7_Qi3.js} +29 -30
  17. package/index.js +1316 -3883
  18. package/index.umd.cjs +117 -2132
  19. package/{list.element-ADtUK2na.js → list.element-ZtEMKE2x.js} +41 -40
  20. package/markdown-text.element-DDm36qD0.js +54 -0
  21. package/markdown.element-DWz3U9rG.js +84 -0
  22. package/number.element-VkG5wScD.js +71 -0
  23. package/package.json +6 -6
  24. package/password.element-C5vQHq5P.js +72 -0
  25. package/radiogroup.element-CKdO9HwO.js +69 -0
  26. package/{range-calendar.element-D5eb2f7p.js → range-calendar.element-BznGrej5.js} +23 -24
  27. package/{range-date-input.element-C35grlYo.js → range-date-input.element-BloTHRDl.js} +24 -24
  28. package/range-date-picker.element-DKhwFasW.js +98 -0
  29. package/{range-date-time-calendar.element-BV0J96Gu.js → range-date-time-calendar.element-CZCET-sb.js} +26 -26
  30. package/{range-date-time-input.element-CzgRbR9F.js → range-date-time-input.element-Dr2VrYhG.js} +24 -24
  31. package/range-date-time-picker.element-CYeIMWLp.js +109 -0
  32. package/{range-time-input.element-BOHLUO8z.js → range-time-input.element-7OZhPQqx.js} +23 -23
  33. package/range-time-picker.element-D0mRFZkK.js +96 -0
  34. package/renderer.element-DbsFoBba.js +48 -0
  35. package/{repeater.element-Da8YN1Vy.js → repeater.element-DGEbwvhY.js} +54 -65
  36. package/select.element-Bb_9jAVB.js +76 -0
  37. package/{tabs.element-CvcIA8P3.js → tabs.element-BYDNF_pm.js} +49 -50
  38. package/tags.element-BSN3i9Gx.js +73 -0
  39. package/textarea.element-Dl1ZEOqO.js +71 -0
  40. package/textinput.element-C5Vbbkxq.js +68 -0
  41. package/{time-picker.element-C3oR0EkQ.js → time-picker.element-Crmj9YDy.js} +26 -26
  42. package/{time.element-X286nthD.js → time.element-DfSeAZp4.js} +29 -29
  43. package/toggle.element-ORsprZ2M.js +66 -0
  44. package/alert.element-DPWq9-0F.js +0 -56
  45. package/button.element-CJay43iR.js +0 -132
  46. package/calendar-DleRbmvP.js +0 -267
  47. package/checkbox.element-CpmrzdH0.js +0 -200
  48. package/currency.element-Cezgzbbs.js +0 -276
  49. package/date-DBuYpvcO.js +0 -849
  50. package/date-input-B3yHsn-g.js +0 -204
  51. package/date-picker.element-ByZefznr.js +0 -357
  52. package/date-time-calendar-CB5cNoOX.js +0 -374
  53. package/date-time-input-DrY68YDX.js +0 -246
  54. package/date-time-picker.element-CYwmumfq.js +0 -440
  55. package/day-status-ljexnwEO.js +0 -554
  56. package/errors-Bs_vYN-_.js +0 -110
  57. package/focus-leave.controller-2gV0pQd5.js +0 -73
  58. package/list-D730tmGN.js +0 -297
  59. package/markdown-text-X-BRJT6K.js +0 -30
  60. package/markdown-text.element-B8TfVLIO.js +0 -55
  61. package/markdown.element-D5zcxAUS.js +0 -693
  62. package/number.element-DEY5tR_y.js +0 -291
  63. package/numeric-jmOOKz30.js +0 -12
  64. package/one-of-anKkm7mD.js +0 -50
  65. package/part-templates-VORbpgs2.js +0 -691
  66. package/password.element-C1aQh_iz.js +0 -240
  67. package/pill-ranges-DpvWwP-3.js +0 -48
  68. package/pills-BDMO2NiR.js +0 -348
  69. package/popup.controller-B33OvX_y.js +0 -86
  70. package/radiogroup.element-B2G-XyGx.js +0 -235
  71. package/range-calendar-D7sG24Kx.js +0 -466
  72. package/range-commit-8-MmYUyo.js +0 -14
  73. package/range-date-input-BChaoBC1.js +0 -311
  74. package/range-date-picker.element-Do5YsL5V.js +0 -434
  75. package/range-date-time-calendar-DulGK2EQ.js +0 -734
  76. package/range-date-time-input-8ggqckP7.js +0 -353
  77. package/range-date-time-picker.element-hi5KdopZ.js +0 -472
  78. package/range-selection-CU3hxLJE.js +0 -25
  79. package/range-time-input-D7GFdDeA.js +0 -348
  80. package/range-time-picker.element-DDNQMA_u.js +0 -470
  81. package/renderer.element-CNyMn2Lu.js +0 -49
  82. package/select.element-SDxBhGjz.js +0 -266
  83. package/tabs-DzSCq_98.js +0 -13
  84. package/tags.element-Bnhfevp3.js +0 -369
  85. package/templates-Df7abEkB.js +0 -92
  86. package/textarea.element-Dx7eYEnl.js +0 -239
  87. package/textinput.element-BnIoDRmY.js +0 -205
  88. package/time-input-Kk4EX6at.js +0 -201
  89. package/time-list-DLcq8BAp.js +0 -217
  90. package/time-picker-DLj1rhOf.js +0 -299
  91. package/toggle.element-Dokdat_o.js +0 -203
@@ -1,267 +0,0 @@
1
- import { LitElement as p, nothing as d, html as y } from "lit";
2
- import { property as i, customElement as b } from "lit/decorators.js";
3
- import { classMap as v } from "lit/directives/class-map.js";
4
- import { G as m } from "./templates-Df7abEkB.js";
5
- import { G as g, a as D, r as M, c as _, d as S, b as f, e as C } from "./day-status-ljexnwEO.js";
6
- import { G as I } from "./focus-leave.controller-2gV0pQd5.js";
7
- import { p as c, h as L, j as O, g as x, t as u } from "./date-DBuYpvcO.js";
8
- var G = Object.defineProperty, A = Object.getOwnPropertyDescriptor, a = (e, t, o, n) => {
9
- for (var s = n > 1 ? void 0 : n ? A(t, o) : t, l = e.length - 1, h; l >= 0; l--)
10
- (h = e[l]) && (s = (n ? h(t, o, s) : h(s)) || s);
11
- return n && s && G(t, o, s), s;
12
- };
13
- let r = class extends p {
14
- constructor() {
15
- super(...arguments), this.uid = void 0, this.label = void 0, this.hint = void 0, this.localeId = void 0, this.errors = [], this.touched = void 0, this.required = !1, this.disabled = !1, this.readOnly = !1, this.prevMonthIcon = "", this.nextMonthIcon = "", this.prevMonthAriaLabel = "", this.nextMonthAriaLabel = "", this.selectYearAriaLabel = void 0, this.yearGridAriaLabel = void 0, this.dayFormat = "numeric", this.weekdayFormat = "narrow", this.monthFormat = "long", this.minDate = void 0, this.maxDate = void 0, this.disabledRanges = void 0, this.numberOfMonths = 1, this.value = void 0, this._nav = new g(this, {
16
- getMinDate: () => this.minDate,
17
- getMaxDate: () => this.maxDate,
18
- getNumberOfMonths: () => this.numberOfMonths,
19
- getDisabledRanges: () => this.disabledRanges,
20
- onYearSelectorToggled: () => this._keyboard.onYearGridToggled()
21
- }), this.ariaController = new m(this, {
22
- getTargets: () => this.querySelectorAll(".gui-calendar-input"),
23
- getState: () => ({
24
- uid: this.uid,
25
- templateData: {
26
- hint: this.hint,
27
- errors: this.errors,
28
- readonly: this.readOnly,
29
- disabled: this.disabled,
30
- touched: this.touched,
31
- required: this.required
32
- }
33
- })
34
- }), this._keyboard = new D(this, {
35
- canGoPrev: () => this._nav.canGoPrev(),
36
- canGoNext: () => this._nav.canGoNext(),
37
- goPrev: () => this._nav.prevMonth(),
38
- goNext: () => this._nav.nextMonth(),
39
- onActivateDay: (e) => {
40
- const t = c(e);
41
- this.selectDate({
42
- date: t,
43
- dayLabel: O(this.localeId, t),
44
- isCurrentMonth: !0,
45
- isToday: L(t),
46
- isSelected: !1,
47
- isFocusable: !0,
48
- isDisabled: this.isDisabled(t)
49
- });
50
- },
51
- onSelectYear: (e) => this._nav.selectYear(e),
52
- onCloseYearGrid: () => this._nav.closeYearSelector(),
53
- isYearGridOpen: () => this._nav.yearSelectorOpen
54
- }), this._focusLeave = new I(this, {
55
- onLeave: () => {
56
- this.dispatchEvent(new CustomEvent("blur", { bubbles: !0, composed: !0 }));
57
- }
58
- });
59
- }
60
- /** The nav controller's month cursor, kept under its historical name. */
61
- get _currentDate() {
62
- return this._nav.currentDate;
63
- }
64
- set _currentDate(e) {
65
- this._nav.currentDate = e;
66
- }
67
- createRenderRoot() {
68
- return this;
69
- }
70
- connectedCallback() {
71
- super.connectedCallback(), this.classList.add("gui-field");
72
- }
73
- willUpdate(e) {
74
- e.has("value") && this.value && this._nav.navigateToDate(c(this.value));
75
- }
76
- render() {
77
- return M({
78
- uid: this.uid,
79
- label: this.label,
80
- hint: this.hint,
81
- errors: this.errors,
82
- touched: this.touched,
83
- required: this.required,
84
- disabled: this.disabled,
85
- numberOfMonths: this.numberOfMonths,
86
- localeId: this.localeId,
87
- currentDate: this._nav.currentDate,
88
- prevMonthIcon: this.prevMonthIcon,
89
- nextMonthIcon: this.nextMonthIcon,
90
- prevMonthAriaLabel: this.prevMonthAriaLabel,
91
- nextMonthAriaLabel: this.nextMonthAriaLabel,
92
- canGoPrev: this._nav.canGoPrev(),
93
- canGoNext: this._nav.canGoNext(),
94
- onPrevMonthClick: this._keyboard.onPrevMonthClick,
95
- onNextMonthClick: this._keyboard.onNextMonthClick,
96
- onFocusOut: this._focusLeave.onFocusOut,
97
- renderAboveCalendar: () => d,
98
- renderMonthPanel: (e) => f({
99
- currentDate: this._nav.currentDate,
100
- offset: e,
101
- localeId: this.localeId,
102
- monthFormat: this.monthFormat,
103
- yearSelectorOpen: this._nav.yearSelectorOpen,
104
- selectYearAriaLabel: this.selectYearAriaLabel,
105
- onToggleYearSelector: () => this._nav.toggleYearSelector(),
106
- renderPanelBody: (t) => this.renderPanelBody(t)
107
- })
108
- });
109
- }
110
- /**
111
- * The panel content below the header: the year grid replaces the days grid
112
- * of the first panel while the year selector is open. Subclasses can swap
113
- * in other bodies (e.g. the date-time calendar's time grid).
114
- */
115
- renderPanelBody(e) {
116
- return _({
117
- offset: e,
118
- yearSelectorOpen: this._nav.yearSelectorOpen,
119
- years: this._nav.yearList,
120
- currentYear: this._nav.currentDate.getFullYear(),
121
- onSelectYear: (t) => this._keyboard.selectYear(t),
122
- onYearKeydown: this._keyboard.handleYearKeydown,
123
- localeId: this.localeId,
124
- currentDate: this._nav.currentDate,
125
- yearGridAriaLabel: this.yearGridAriaLabel,
126
- getDays: (t) => this.getDaysInMonth(t),
127
- renderDay: (t) => this.renderDay(t)
128
- });
129
- }
130
- renderDay(e) {
131
- const t = {
132
- "gui-calendar__day-button": !0,
133
- today: e.isToday,
134
- selected: e.isSelected,
135
- disabled: e.isDisabled,
136
- "other-month": !e.isCurrentMonth
137
- };
138
- return y`
139
- <button
140
- type="button"
141
- role="gridcell"
142
- class=${v(t)}
143
- tabindex=${e.isFocusable ? 0 : -1}
144
- ?disabled=${!e.isCurrentMonth}
145
- aria-disabled=${e.isCurrentMonth && e.isDisabled ? "true" : d}
146
- aria-label=${x(this.localeId, e.date)}
147
- aria-current=${e.isToday ? "date" : d}
148
- data-date=${u(e.date)}
149
- @click=${() => this.selectDate(e)}
150
- @keydown=${(o) => this._keyboard.handleDayKeydown(o)}
151
- aria-selected=${e.isSelected}
152
- >
153
- ${e.dayLabel}
154
- </button>
155
- `;
156
- }
157
- getDaysInMonth(e) {
158
- const t = this.value;
159
- return S({
160
- currentDate: this._currentDate,
161
- offset: e,
162
- localeId: this.localeId,
163
- numberOfMonths: this.numberOfMonths ?? 1,
164
- isDisabled: (o) => this.isDisabled(o),
165
- toDay: (o) => {
166
- const n = C(o.date, { selectedISO: t }).isSelected;
167
- return {
168
- date: o.date,
169
- dayLabel: o.dayLabel,
170
- isCurrentMonth: o.isCurrentMonth,
171
- isToday: o.isToday,
172
- isDisabled: o.isDisabled,
173
- isSelected: n,
174
- isFocusable: (n || o.isToday) && o.isCurrentMonth
175
- };
176
- },
177
- focusFallbackDates: [t ? c(t) : /* @__PURE__ */ new Date()]
178
- });
179
- }
180
- selectDate(e) {
181
- if (!e.isCurrentMonth || e.isDisabled || this.disabled || this.readOnly) return;
182
- const t = u(e.date);
183
- this.value = t, this.dispatchEvent(
184
- new CustomEvent("change", {
185
- detail: { value: t },
186
- bubbles: !0,
187
- composed: !0
188
- })
189
- );
190
- }
191
- isDisabled(e) {
192
- return this._nav.isDisabled(e);
193
- }
194
- };
195
- a([
196
- i({ type: String })
197
- ], r.prototype, "uid", 2);
198
- a([
199
- i({ type: String })
200
- ], r.prototype, "label", 2);
201
- a([
202
- i({ type: String })
203
- ], r.prototype, "hint", 2);
204
- a([
205
- i({ type: String, attribute: "locale-id" })
206
- ], r.prototype, "localeId", 2);
207
- a([
208
- i({ type: Array })
209
- ], r.prototype, "errors", 2);
210
- a([
211
- i({ type: Boolean })
212
- ], r.prototype, "touched", 2);
213
- a([
214
- i({ type: Boolean })
215
- ], r.prototype, "required", 2);
216
- a([
217
- i({ type: Boolean })
218
- ], r.prototype, "disabled", 2);
219
- a([
220
- i({ type: Boolean, attribute: "readonly" })
221
- ], r.prototype, "readOnly", 2);
222
- a([
223
- i({ type: String, attribute: "prev-month-icon" })
224
- ], r.prototype, "prevMonthIcon", 2);
225
- a([
226
- i({ type: String, attribute: "next-month-icon" })
227
- ], r.prototype, "nextMonthIcon", 2);
228
- a([
229
- i({ type: String, attribute: "prev-month-aria-label" })
230
- ], r.prototype, "prevMonthAriaLabel", 2);
231
- a([
232
- i({ type: String, attribute: "next-month-aria-label" })
233
- ], r.prototype, "nextMonthAriaLabel", 2);
234
- a([
235
- i({ type: String, attribute: "select-year-aria-label" })
236
- ], r.prototype, "selectYearAriaLabel", 2);
237
- a([
238
- i({ type: String, attribute: "year-grid-aria-label" })
239
- ], r.prototype, "yearGridAriaLabel", 2);
240
- a([
241
- i({ type: String })
242
- ], r.prototype, "dayFormat", 2);
243
- a([
244
- i({ type: String })
245
- ], r.prototype, "weekdayFormat", 2);
246
- a([
247
- i({ type: String })
248
- ], r.prototype, "monthFormat", 2);
249
- a([
250
- i({ type: String })
251
- ], r.prototype, "minDate", 2);
252
- a([
253
- i({ type: String })
254
- ], r.prototype, "maxDate", 2);
255
- a([
256
- i({ type: Array })
257
- ], r.prototype, "disabledRanges", 2);
258
- a([
259
- i({ type: Number })
260
- ], r.prototype, "numberOfMonths", 2);
261
- a([
262
- i({ type: String })
263
- ], r.prototype, "value", 2);
264
- r = a([
265
- b("gui-calendar")
266
- ], r);
267
- typeof customElements < "u" && !customElements.get("gui-calendar") && customElements.define("gui-calendar", r);
@@ -1,200 +0,0 @@
1
- import { InputWidgetAdapter as g, formContext as m, inputContext as y } from "@golemui/lit";
2
- import { G as v, r as f, c as $ } from "./templates-Df7abEkB.js";
3
- import { LitElement as c, nothing as x, html as p } from "lit";
4
- import { property as a, customElement as b } from "lit/decorators.js";
5
- import { consume as C, provide as k } from "@lit/context";
6
- import "rxjs";
7
- var _ = Object.defineProperty, D = Object.getOwnPropertyDescriptor, s = (e, t, l, o) => {
8
- for (var i = o > 1 ? void 0 : o ? D(t, l) : t, d = e.length - 1, h; d >= 0; d--)
9
- (h = e[d]) && (i = (o ? h(t, l, i) : h(i)) || i);
10
- return o && i && _(t, l, i), i;
11
- };
12
- let r = class extends c {
13
- constructor() {
14
- super(...arguments), this.uid = void 0, this.label = void 0, this.localeId = "en", this.errors = [], this.touched = void 0, this.required = void 0, this.disabled = !1, this.readOnly = !1, this.value = void 0, this.hint = void 0, this.checkboxPosition = "left", this.ariaController = new v(this, {
15
- getTargets: () => this.querySelectorAll(`input[id="${this.uid}"]`),
16
- getState: () => ({
17
- uid: this.uid,
18
- templateData: {
19
- hint: this.hint,
20
- errors: this.errors,
21
- touched: this.touched,
22
- // Checkboxes can't have aria-readonly
23
- readonly: !1,
24
- disabled: !1,
25
- required: this.required
26
- }
27
- })
28
- });
29
- }
30
- createRenderRoot() {
31
- return this;
32
- }
33
- connectedCallback() {
34
- super.connectedCallback(), this.classList.add("gui-field");
35
- }
36
- render() {
37
- super.render();
38
- const e = {
39
- uid: this.uid,
40
- label: this.label,
41
- hint: this.hint,
42
- errors: this.errors,
43
- touched: this.touched,
44
- required: this.required,
45
- disabled: this.disabled,
46
- readonly: this.readOnly,
47
- value: this.value,
48
- checkboxPosition: this.checkboxPosition
49
- };
50
- return e.checkboxPosition === "right" ? this.classList.add("gui-checkbox--right") : this.classList.contains("gui-checkbox--right") && this.classList.remove("gui-checkbox--right"), p`
51
- <label
52
- class="gui-label"
53
- for=${this.uid}
54
- data-cy=${`${this.uid}_label`}
55
- id=${`${this.uid}_label`}
56
- >
57
- <div class="gui-widget gui-widget--horizontal">
58
- <input
59
- type="checkbox"
60
- id=${this.uid}
61
- data-cy=${`${this.uid}_checkbox`}
62
- ?checked=${this.value}
63
- ?required=${this.required}
64
- ?disabled=${this.disabled || this.readOnly}
65
- @change=${this.valueChanged}
66
- @blur=${this.onBlur}
67
- />
68
- </div>
69
-
70
- <span class="gui-label__container">
71
- <span class="gui-label__text"
72
- >${e.label}${f(e.required)}</span
73
- >
74
- </span>
75
- </label>
76
-
77
- <div class="gui-widget-hint" id=${`${e.uid}_hint`}>
78
- ${e.hint ?? x} ${$(this.uid, e)}
79
- </div>
80
- `;
81
- }
82
- valueChanged(e) {
83
- if (e.stopPropagation(), !this.readOnly) {
84
- const t = e.target;
85
- this.dispatchEvent(
86
- new CustomEvent("change", {
87
- detail: { value: t.checked },
88
- bubbles: !0,
89
- composed: !0
90
- })
91
- );
92
- }
93
- }
94
- onBlur() {
95
- this.dispatchEvent(
96
- new CustomEvent("blur", {
97
- bubbles: !0,
98
- composed: !0
99
- })
100
- );
101
- }
102
- };
103
- s([
104
- a({ type: String })
105
- ], r.prototype, "uid", 2);
106
- s([
107
- a({ type: String })
108
- ], r.prototype, "label", 2);
109
- s([
110
- a({ type: String, attribute: "locale-id" })
111
- ], r.prototype, "localeId", 2);
112
- s([
113
- a({ type: Array })
114
- ], r.prototype, "errors", 2);
115
- s([
116
- a({ type: Boolean })
117
- ], r.prototype, "touched", 2);
118
- s([
119
- a({ type: Boolean })
120
- ], r.prototype, "required", 2);
121
- s([
122
- a({ type: Boolean })
123
- ], r.prototype, "disabled", 2);
124
- s([
125
- a({ type: Boolean, attribute: "readonly" })
126
- ], r.prototype, "readOnly", 2);
127
- s([
128
- a({ type: String })
129
- ], r.prototype, "value", 2);
130
- s([
131
- a({ type: String })
132
- ], r.prototype, "hint", 2);
133
- s([
134
- a({ type: String })
135
- ], r.prototype, "checkboxPosition", 2);
136
- r = s([
137
- b("gui-checkbox")
138
- ], r);
139
- typeof customElements < "u" && !customElements.get("gui-checkbox") && customElements.define("gui-checkbox", r);
140
- var P = Object.defineProperty, q = Object.getOwnPropertyDescriptor, u = (e, t, l, o) => {
141
- for (var i = o > 1 ? void 0 : o ? q(t, l) : t, d = e.length - 1, h; d >= 0; d--)
142
- (h = e[d]) && (i = (o ? h(t, l, i) : h(i)) || i);
143
- return o && i && P(t, l, i), i;
144
- };
145
- let n = class extends c {
146
- constructor() {
147
- super(...arguments), this.adapter = new g(), this.subscriptions = [];
148
- }
149
- createRenderRoot() {
150
- return this;
151
- }
152
- updated(e) {
153
- super.updated(e);
154
- const t = this.adapter.templateData.size;
155
- t ? this.style.flex = String(t) : this.style.removeProperty("flex");
156
- }
157
- connectedCallback() {
158
- super.connectedCallback(), this.classList.add("gui-checkbox", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
159
- this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
160
- );
161
- }
162
- render() {
163
- return super.render(), p`
164
- <gui-checkbox
165
- .uid=${this.widget.uid}
166
- .label=${this.adapter.templateData.label}
167
- .errors=${this.adapter.templateData.errors}
168
- ?touched=${this.adapter.templateData.touched}
169
- ?required=${this.adapter.templateData.validator?.required}
170
- ?disabled=${this.adapter.templateData.disabled}
171
- ?readonly=${this.adapter.templateData.readonly}
172
- .value=${this.adapter.templateData.value}
173
- .hint=${this.adapter.templateData.hint}
174
- .checkboxPosition=${this.adapter.templateData.checkboxPosition}
175
- @change=${this.valueChanged}
176
- @blur=${() => this.adapter.onBlur()}
177
- ></gui-checkbox>
178
- `;
179
- }
180
- valueChanged(e) {
181
- const t = e.detail.value;
182
- this.adapter.valueChanged(t);
183
- }
184
- disconnectedCallback() {
185
- super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((e) => e.unsubscribe());
186
- }
187
- };
188
- u([
189
- C({ context: m }),
190
- a({ attribute: !1 })
191
- ], n.prototype, "formContext", 2);
192
- u([
193
- k({ context: y })
194
- ], n.prototype, "adapter", 2);
195
- n = u([
196
- b("gui-checkbox-input")
197
- ], n);
198
- export {
199
- n as CheckboxElement
200
- };