@golemui/gui-lit 1.1.0 → 1.1.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 (60) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/{button.element-3a7rRHbA.js → button.element-CJay43iR.js} +16 -13
  3. package/{calendar-BuJgwvZx.js → calendar-D31xNsxx.js} +72 -59
  4. package/{calendar.element-M5MPJmap.js → calendar.element-BhFrCsns.js} +22 -20
  5. package/{checkbox.element-CVskoXEc.js → checkbox.element-DAAVB651.js} +49 -49
  6. package/{currency.element-CfFrAtrr.js → currency.element-D8A2ObpM.js} +11 -10
  7. package/{date-Bj9mI3GU.js → date-DBuYpvcO.js} +35 -27
  8. package/{date-input-cJDkNnVw.js → date-input-DLiMreSS.js} +64 -44
  9. package/date-picker.element-DeUQtbLg.js +357 -0
  10. package/{date-time-calendar-BzRfkLKU.js → date-time-calendar-DzU-FtVl.js} +89 -76
  11. package/{date-time-calendar.element-DC4NK0y1.js → date-time-calendar.element-BLBcVsFu.js} +13 -11
  12. package/{date-time-input-BXxsfuyZ.js → date-time-input-DZaz2heD.js} +75 -43
  13. package/{date-time-picker.element-Dy-8cb-_.js → date-time-picker.element-BUbLdV6i.js} +125 -65
  14. package/{date-time.element-Bv4XdzMi.js → date-time.element-B5onfSBG.js} +31 -25
  15. package/{date.element-Consgsbb.js → date.element-BsKhLrEc.js} +22 -19
  16. package/{day-status-0-hJHrI7.js → day-status-CsWStVQV.js} +153 -129
  17. package/{dropdown.element-WsD61Qel.js → dropdown.element-CXpMwJsU.js} +19 -13
  18. package/{errors-QjKhr6mA.js → errors-Byb2dIhK.js} +3 -2
  19. package/index.js +1643 -1184
  20. package/index.umd.cjs +792 -399
  21. package/{list-CrLIL4by.js → list-D730tmGN.js} +115 -116
  22. package/{list.element-DV82YxnJ.js → list.element-eo3DIOrp.js} +2 -2
  23. package/{markdown.element-p-kC47D7.js → markdown.element-FbtwdnAv.js} +310 -218
  24. package/{number.element-CBr47IiY.js → number.element-BEpOCzXy.js} +76 -61
  25. package/package.json +6 -6
  26. package/{part-templates-Db871PS3.js → part-templates-VORbpgs2.js} +132 -118
  27. package/{password.element-n-R9RbkB.js → password.element-CBaB8h5b.js} +19 -17
  28. package/{pill-ranges-DCqDmpkk.js → pill-ranges-DpvWwP-3.js} +12 -12
  29. package/{pills-Be1UrLgq.js → pills-BDMO2NiR.js} +80 -58
  30. package/popup.controller-B33OvX_y.js +86 -0
  31. package/{radiogroup.element-CeQn623u.js → radiogroup.element-KWzBx8mx.js} +55 -51
  32. package/{range-calendar-CKPYeSGt.js → range-calendar-DO_woqcF.js} +101 -87
  33. package/{range-calendar.element-D6KYq18B.js → range-calendar.element-DHLZhpnj.js} +15 -13
  34. package/{range-date-input-D--AqBMv.js → range-date-input-Br7XqQPK.js} +90 -71
  35. package/{range-date-input.element-D4nIXJbw.js → range-date-input.element-BdD4SlB4.js} +15 -12
  36. package/{range-date-picker.element-dhxPAAE6.js → range-date-picker.element-DWRHiAoC.js} +97 -49
  37. package/{range-date-time-calendar-yksWrR7b.js → range-date-time-calendar-B3EMgN1E.js} +150 -136
  38. package/{range-date-time-calendar.element-C00aDefZ.js → range-date-time-calendar.element-Coea6RF4.js} +9 -7
  39. package/{range-date-time-input-B37TUoM3.js → range-date-time-input-Cu-T_nuC.js} +125 -94
  40. package/{range-date-time-input.element-DUnbv4ed.js → range-date-time-input.element-Cti44iuW.js} +31 -25
  41. package/{range-date-time-picker.element-Cbps6s_G.js → range-date-time-picker.element-CDN2RL1y.js} +107 -47
  42. package/{range-time-input-3lhqR1Ku.js → range-time-input-BP9ZL9O8.js} +85 -66
  43. package/{range-time-input.element-dU2iBdmJ.js → range-time-input.element-B7wtHJoQ.js} +14 -11
  44. package/{range-time-picker.element-v6nQsIPw.js → range-time-picker.element-CPIAiQPC.js} +92 -51
  45. package/{repeater.element-CtNgB4F5.js → repeater.element-BM1Keckd.js} +1 -1
  46. package/{select.element-C0V-Bv3L.js → select.element-eepcXTpL.js} +84 -78
  47. package/{tabs.element-BvAyI71N.js → tabs.element-CvcIA8P3.js} +1 -0
  48. package/{tags.element-DvwEpxpK.js → tags.element-CPHgotb0.js} +21 -14
  49. package/templates-Dmr34nwp.js +88 -0
  50. package/{textarea.element-HThYqdR_.js → textarea.element-CiNEy9uq.js} +8 -7
  51. package/{textinput.element-CkXNzMUg.js → textinput.element-AL2Nr768.js} +10 -9
  52. package/{time-input-BOhlBGJZ.js → time-input-5dkSm8UW.js} +67 -47
  53. package/{time-list-Czo48bZm.js → time-list-DLcq8BAp.js} +1 -1
  54. package/{time-picker-bFJ63ky8.js → time-picker-g337F8d0.js} +89 -51
  55. package/{time-picker.element-CYZVXgRS.js → time-picker.element-DLihegjg.js} +23 -19
  56. package/{time.element-fK3oLi49.js → time.element-BneqgMlQ.js} +22 -19
  57. package/{toggle.element-C1kCw5H8.js → toggle.element-Cz91CRdp.js} +44 -43
  58. package/date-picker.element-va_-LGZD.js +0 -312
  59. package/popup.controller-eUDxE6jD.js +0 -71
  60. package/templates-Dk1jxLwS.js +0 -75
@@ -1,25 +1,25 @@
1
- import { InputWidgetAdapter as v, formContext as y, inputContext as T } from "@golemui/lit";
2
- import { LitElement as g, html as d, nothing as _ } from "lit";
3
- import { property as a, query as c, state as b, customElement as $ } from "lit/decorators.js";
1
+ import { InputWidgetAdapter as $, formContext as y, inputContext as v } from "@golemui/lit";
2
+ import { LitElement as g, html as m, nothing as T } from "lit";
3
+ import { property as a, query as _, state as c, customElement as b } from "lit/decorators.js";
4
4
  import { classMap as f } from "lit/directives/class-map.js";
5
- import "./range-time-input-3lhqR1Ku.js";
6
- import "./time-list-Czo48bZm.js";
7
- import { G as w } from "./popup.controller-eUDxE6jD.js";
8
- import { k as I, s as u, t as k } from "./part-templates-Db871PS3.js";
9
- import { a as L, b as S, c as M } from "./templates-Dk1jxLwS.js";
10
- import { I as C, a as A, b as x } from "./date-Bj9mI3GU.js";
11
- import { consume as E, provide as R } from "@lit/context";
5
+ import "./range-time-input-BP9ZL9O8.js";
6
+ import "./time-list-DLcq8BAp.js";
7
+ import { G as L } from "./popup.controller-B33OvX_y.js";
8
+ import { k as w, s as u, t as A } from "./part-templates-VORbpgs2.js";
9
+ import { a as S, b as k, c as I } from "./templates-Dmr34nwp.js";
10
+ import { I as C, b as M, e as x } from "./date-DBuYpvcO.js";
11
+ import { consume as E, provide as P } from "@lit/context";
12
12
  import "rxjs";
13
- var O = Object.defineProperty, P = Object.getOwnPropertyDescriptor, i = (e, s, o, n) => {
14
- for (var r = n > 1 ? void 0 : n ? P(s, o) : s, l = e.length - 1, p; l >= 0; l--)
13
+ var O = Object.defineProperty, R = Object.getOwnPropertyDescriptor, i = (e, s, o, n) => {
14
+ for (var r = n > 1 ? void 0 : n ? R(s, o) : s, l = e.length - 1, p; l >= 0; l--)
15
15
  (p = e[l]) && (r = (n ? p(s, o, r) : p(r)) || r);
16
16
  return n && r && O(s, o, r), r;
17
17
  };
18
18
  let t = class extends g {
19
19
  constructor() {
20
- super(...arguments), this.uid = void 0, this.label = void 0, this.hint = void 0, this.icon = "", this.errors = [], this.showErrors = !0, this.touched = !1, this.required = !1, this.disabled = !1, this.readOnly = !1, this.localeId = void 0, this.value = [], this.separator = void 0, this.removePillAriaLabel = void 0, this.startTimeAriaLabel = void 0, this.endTimeAriaLabel = void 0, this.startTimeLabel = void 0, this.endTimeLabel = void 0, this.hourFormat = void 0, this.minuteStep = void 0, this.minTime = void 0, this.maxTime = void 0, this.disabledRanges = void 0, this.allowCustomTime = !1, this.height = void 0, this.itemHeight = void 0, this.minTimeMessage = void 0, this.maxTimeMessage = void 0, this.rangeOrderMessage = void 0, this.disabledRangeMessage = void 0, this.noAvailableTimesMessage = void 0, this._workingIn = void 0, this._workingOut = void 0, this._popup = new w(this, {
21
- getInteriorElements: () => [this._inputRef, this._panelRef],
20
+ super(...arguments), this.uid = void 0, this.label = void 0, this.hint = void 0, this.icon = "", this.toggleAriaLabel = void 0, this.hourAriaLabel = void 0, this.minuteAriaLabel = void 0, this.dayPeriodAriaLabel = void 0, this.errors = [], this.showErrors = !0, this.touched = !1, this.required = !1, this.disabled = !1, this.readOnly = !1, this.localeId = void 0, this.value = [], this.separator = void 0, this.removePillAriaLabel = void 0, this.startTimeAriaLabel = void 0, this.endTimeAriaLabel = void 0, this.startTimeLabel = void 0, this.endTimeLabel = void 0, this.hourFormat = void 0, this.minuteStep = void 0, this.minTime = void 0, this.maxTime = void 0, this.disabledRanges = void 0, this.allowCustomTime = !1, this.height = void 0, this.itemHeight = void 0, this.minTimeMessage = void 0, this.maxTimeMessage = void 0, this.rangeOrderMessage = void 0, this.disabledRangeMessage = void 0, this.noAvailableTimesMessage = void 0, this._workingIn = void 0, this._workingOut = void 0, this._popup = new L(this, {
22
21
  focusRestoreSelector: "gui-range-time input, gui-range-time button",
22
+ focusPopupSelector: '.gui-time-list__option[tabindex="0"]',
23
23
  isDisabled: () => !!this.disabled,
24
24
  clickIntent: (e) => e.closest(".gui-time-list__option") ? "ignore" : e.closest(".gui-range-time-input__part") || e.closest(".gui-range-time-picker__panel") ? "open" : "toggle",
25
25
  keyToggleMode: "openClose",
@@ -31,6 +31,8 @@ let t = class extends g {
31
31
  }
32
32
  }), this.onDropdownToggle = (e) => {
33
33
  e.detail?.open && this._popup.open && this._popup.close();
34
+ }, this.onToggleClick = (e) => {
35
+ e.stopPropagation(), this._popup.open ? this._popup.close() : this._popup.openAndFocus();
34
36
  };
35
37
  }
36
38
  createRenderRoot() {
@@ -50,11 +52,16 @@ let t = class extends g {
50
52
  */
51
53
  get outListBounds() {
52
54
  if (!this._workingIn) return { minTime: this.minTime, maxTime: this.maxTime };
53
- const e = I(this._workingIn, this.minuteStep);
55
+ const e = w(this._workingIn, this.minuteStep);
54
56
  return e ? { minTime: e, maxTime: this.maxTime } : { minTime: "23:59:59", maxTime: "00:00:00" };
55
57
  }
56
58
  render() {
57
- const e = L("rangeTimePicker", { icon: this.icon }), s = this.outListBounds, o = this.startTimeLabel ?? "Start time", n = this.endTimeLabel ?? "End time", r = this._popup.open ? d`<div class="gui-range-time-picker__panel" id="list-panel" role="group">
59
+ const e = S("rangeTimePicker", { icon: this.icon }), s = this.outListBounds, o = this.startTimeLabel ?? "Start time", n = this.endTimeLabel ?? "End time", r = this._popup.open ? m`<div
60
+ class="gui-range-time-picker__panel"
61
+ id=${`${this.uid}_popup`}
62
+ role="dialog"
63
+ aria-label=${this.label ?? "Time list"}
64
+ >
58
65
  <div class="gui-range-time-picker__column">
59
66
  <span class="gui-range-time-picker__column-label">${o}</span>
60
67
  <gui-time-list
@@ -97,20 +104,22 @@ let t = class extends g {
97
104
  @change=${this.onOutListChange}
98
105
  ></gui-time-list>
99
106
  </div>
100
- </div>` : _;
101
- return d`
102
- ${S(this.uid ?? "", {
103
- label: this.label,
104
- hint: this.hint,
105
- required: this.required
106
- })}
107
+ </div>` : T;
108
+ return m`
109
+ ${k(
110
+ this.uid ?? "",
111
+ {
112
+ label: this.label,
113
+ hint: this.hint,
114
+ required: this.required
115
+ },
116
+ !1,
117
+ void 0,
118
+ !1
119
+ )}
107
120
 
108
121
  <div
109
- role="button"
110
- tabindex="-1"
111
122
  class="gui-widget"
112
- aria-expanded=${this._popup.open}
113
- @keyup=${this._popup.onAnchorKeyUp}
114
123
  @keydown=${this._popup.onAnchorKeyDown}
115
124
  @click=${this._popup.onAnchorClick}
116
125
  >
@@ -142,23 +151,42 @@ let t = class extends g {
142
151
  .removePillAriaLabel=${this.removePillAriaLabel}
143
152
  .startTimeAriaLabel=${this.startTimeAriaLabel}
144
153
  .endTimeAriaLabel=${this.endTimeAriaLabel}
154
+ .hourAriaLabel=${this.hourAriaLabel}
155
+ .minuteAriaLabel=${this.minuteAriaLabel}
156
+ .dayPeriodAriaLabel=${this.dayPeriodAriaLabel}
145
157
  @blur=${this.onInputBlur}
146
158
  @focus=${this._popup.show}
147
159
  @change=${this.onInputChange}
148
160
  @partsChange=${this.onPartsChange}
149
161
  @pillClick=${this.onPillClick}
150
162
  ></gui-range-time>
151
- <span class="gui-range-time-picker__arrow"
152
- ><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 256 256">
163
+ <button
164
+ type="button"
165
+ class="gui-range-time-picker__arrow"
166
+ aria-label=${this.toggleAriaLabel ?? "Show time list"}
167
+ aria-haspopup="dialog"
168
+ aria-expanded=${this._popup.open ? "true" : "false"}
169
+ aria-controls=${`${this.uid}_popup`}
170
+ ?disabled=${this.disabled}
171
+ @click=${this.onToggleClick}
172
+ >
173
+ <svg
174
+ xmlns="http://www.w3.org/2000/svg"
175
+ width="16"
176
+ height="16"
177
+ viewBox="0 0 256 256"
178
+ aria-hidden="true"
179
+ >
153
180
  <path
154
181
  d="M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"
155
- ></path></svg
156
- ></span>
182
+ ></path>
183
+ </svg>
184
+ </button>
157
185
 
158
186
  ${r}
159
187
  </div>
160
188
 
161
- ${this.showErrors ? M(this.uid ?? "", { errors: this.errors, touched: this.touched }) : ""}
189
+ ${this.showErrors ? I(this.uid ?? "", { errors: this.errors, touched: this.touched }) : ""}
162
190
  `;
163
191
  }
164
192
  onInputChange(e) {
@@ -218,9 +246,9 @@ let t = class extends g {
218
246
  if (this.minTime && u(o, this.minTime) < 0)
219
247
  return this.minTimeMessage ?? C;
220
248
  if (this.maxTime && u(o, this.maxTime) > 0)
221
- return this.maxTimeMessage ?? A;
249
+ return this.maxTimeMessage ?? M;
222
250
  }
223
- if (k(s.start, s.end, this.disabledRanges))
251
+ if (A(s.start, s.end, this.disabledRanges))
224
252
  return this.disabledRangeMessage ?? x;
225
253
  }
226
254
  return null;
@@ -244,6 +272,18 @@ i([
244
272
  i([
245
273
  a({ type: String })
246
274
  ], t.prototype, "icon", 2);
275
+ i([
276
+ a({ type: String, attribute: "toggle-aria-label" })
277
+ ], t.prototype, "toggleAriaLabel", 2);
278
+ i([
279
+ a({ type: String })
280
+ ], t.prototype, "hourAriaLabel", 2);
281
+ i([
282
+ a({ type: String })
283
+ ], t.prototype, "minuteAriaLabel", 2);
284
+ i([
285
+ a({ type: String })
286
+ ], t.prototype, "dayPeriodAriaLabel", 2);
247
287
  i([
248
288
  a({ type: Array })
249
289
  ], t.prototype, "errors", 2);
@@ -326,19 +366,16 @@ i([
326
366
  a({ type: String, attribute: "no-available-times-message" })
327
367
  ], t.prototype, "noAvailableTimesMessage", 2);
328
368
  i([
329
- c("#time-input")
369
+ _("#time-input")
330
370
  ], t.prototype, "_inputRef", 2);
331
371
  i([
332
- c("#list-panel")
333
- ], t.prototype, "_panelRef", 2);
334
- i([
335
- b()
372
+ c()
336
373
  ], t.prototype, "_workingIn", 2);
337
374
  i([
338
- b()
375
+ c()
339
376
  ], t.prototype, "_workingOut", 2);
340
377
  t = i([
341
- $("gui-range-time-picker")
378
+ b("gui-range-time-picker")
342
379
  ], t);
343
380
  typeof customElements < "u" && !customElements.get("gui-range-time-picker") && customElements.define("gui-range-time-picker", t);
344
381
  var D = Object.defineProperty, B = Object.getOwnPropertyDescriptor, h = (e, s, o, n) => {
@@ -346,9 +383,9 @@ var D = Object.defineProperty, B = Object.getOwnPropertyDescriptor, h = (e, s, o
346
383
  (p = e[l]) && (r = (n ? p(s, o, r) : p(r)) || r);
347
384
  return n && r && D(s, o, r), r;
348
385
  };
349
- let m = class extends g {
386
+ let d = class extends g {
350
387
  constructor() {
351
- super(...arguments), this.adapter = new v(), this.subscriptions = [];
388
+ super(...arguments), this.adapter = new $(), this.subscriptions = [];
352
389
  }
353
390
  createRenderRoot() {
354
391
  return this;
@@ -366,7 +403,7 @@ let m = class extends g {
366
403
  render() {
367
404
  super.render();
368
405
  const e = this.adapter.templateData;
369
- return d`
406
+ return m`
370
407
  <gui-range-time-picker
371
408
  .uid=${this.widget.uid}
372
409
  .label=${e.label}
@@ -379,6 +416,10 @@ let m = class extends g {
379
416
  .value=${e.value}
380
417
  .icon=${e.icon}
381
418
  .localeId=${e.lang}
419
+ .toggleAriaLabel=${e.toggleAriaLabel}
420
+ .hourAriaLabel=${e.hourAriaLabel}
421
+ .minuteAriaLabel=${e.minuteAriaLabel}
422
+ .dayPeriodAriaLabel=${e.dayPeriodAriaLabel}
382
423
  .separator=${e.separator}
383
424
  .removePillAriaLabel=${e.removePillAriaLabel}
384
425
  .startTimeAriaLabel=${e.startTimeAriaLabel}
@@ -417,13 +458,13 @@ let m = class extends g {
417
458
  h([
418
459
  E({ context: y }),
419
460
  a({ attribute: !1 })
420
- ], m.prototype, "formContext", 2);
461
+ ], d.prototype, "formContext", 2);
421
462
  h([
422
- R({ context: T })
423
- ], m.prototype, "adapter", 2);
424
- m = h([
425
- $("gui-range-time-picker-input")
426
- ], m);
463
+ P({ context: v })
464
+ ], d.prototype, "adapter", 2);
465
+ d = h([
466
+ b("gui-range-time-picker-input")
467
+ ], d);
427
468
  export {
428
- m as RangeTimePickerElement
469
+ d as RangeTimePickerElement
429
470
  };
@@ -6,7 +6,7 @@ import { LitElement as b, nothing as n, html as s } from "lit";
6
6
  import { repeat as f } from "lit-html/directives/repeat.js";
7
7
  import { property as _, state as $, query as v, customElement as I } from "lit/decorators.js";
8
8
  import "rxjs";
9
- import "./errors-QjKhr6mA.js";
9
+ import "./errors-Byb2dIhK.js";
10
10
  function w(e, t) {
11
11
  if (e != null && typeof e == "object" && "__rid" in e)
12
12
  return e.__rid;
@@ -1,18 +1,18 @@
1
1
  import { InputWidgetAdapter as m, formContext as b, inputContext as y } from "@golemui/lit";
2
2
  import { LitElement as v, html as n, nothing as u } from "lit";
3
3
  import { repeat as f } from "lit-html/directives/repeat.js";
4
- import { property as i, customElement as g } from "lit/decorators.js";
4
+ import { property as a, customElement as g } from "lit/decorators.js";
5
5
  import { classMap as $ } from "lit/directives/class-map.js";
6
- import { G as C, a as D, b as w, c as O } from "./templates-Dk1jxLwS.js";
6
+ import { G as C, a as D, b as w, c as O } from "./templates-Dmr34nwp.js";
7
7
  import { u as E, i as S } from "./one-of-C0ur6b_n.js";
8
- import { consume as F, provide as x } from "@lit/context";
8
+ import { consume as F, provide as _ } from "@lit/context";
9
9
  import "rxjs";
10
- var _ = Object.defineProperty, M = Object.getOwnPropertyDescriptor, s = (t, a, r, l) => {
11
- for (var o = l > 1 ? void 0 : l ? M(a, r) : a, p = t.length - 1, d; p >= 0; p--)
12
- (d = t[p]) && (o = (l ? d(a, r, o) : d(o)) || o);
13
- return l && o && _(a, r, o), o;
10
+ var x = Object.defineProperty, q = Object.getOwnPropertyDescriptor, s = (e, i, r, l) => {
11
+ for (var o = l > 1 ? void 0 : l ? q(i, r) : i, d = e.length - 1, p; d >= 0; d--)
12
+ (p = e[d]) && (o = (l ? p(i, r, o) : p(o)) || o);
13
+ return l && o && x(i, r, o), o;
14
14
  };
15
- let e = class extends v {
15
+ let t = class extends v {
16
16
  constructor() {
17
17
  super(...arguments), this.uid = void 0, this.label = void 0, this.localeId = "en", this.errors = [], this.touched = !1, this.required = !1, this.disabled = !1, this.readOnly = !1, this.value = void 0, this.hint = void 0, this.icon = void 0, this.autocomplete = void 0, this.options = [], this.placeholder = void 0, this.invalidOptionMessage = void 0, this.labelField = void 0, this.valueField = void 0, this.optionsLoading = !1, this.hasMatchingValue = !1, this.ariaController = new C(this, {
18
18
  getTargets: () => this.querySelectorAll(`select[id="${this.uid}"]`),
@@ -23,7 +23,8 @@ let e = class extends v {
23
23
  errors: this.errors,
24
24
  readonly: this.readOnly,
25
25
  disabled: this.disabled,
26
- touched: this.touched
26
+ touched: this.touched,
27
+ required: this.required
27
28
  }
28
29
  })
29
30
  });
@@ -36,7 +37,7 @@ let e = class extends v {
36
37
  }
37
38
  render() {
38
39
  super.render();
39
- const t = {
40
+ const e = {
40
41
  uid: this.uid,
41
42
  label: this.label,
42
43
  errors: this.errors,
@@ -52,7 +53,7 @@ let e = class extends v {
52
53
  placeholder: this.placeholder,
53
54
  labelField: this.labelField,
54
55
  valueField: this.valueField
55
- }, a = D("select", t);
56
+ }, i = D("select", e);
56
57
  this.options = E(this.options, {
57
58
  labelField: this.labelField,
58
59
  valueField: this.valueField
@@ -73,16 +74,15 @@ let e = class extends v {
73
74
  )}
74
75
  `;
75
76
  return n`
76
- ${w(this.uid, t)}
77
+ ${w(this.uid, e)}
77
78
 
78
79
  <div class="gui-widget">
79
80
  <select
80
81
  id=${this.uid}
81
- tabindex="0"
82
82
  data-cy=${`${this.uid}_select`}
83
- class=${$({ "gui-widget-input": !0, ...a.widgetClasses })}
84
- ?required=${t.required}
85
- ?disabled=${t.disabled || t.readonly}
83
+ class=${$({ "gui-widget-input": !0, ...i.widgetClasses })}
84
+ ?required=${e.required}
85
+ ?disabled=${e.disabled || e.readonly}
86
86
  autocomplete=${this.autocomplete || u}
87
87
  @change=${this.valueChanged}
88
88
  @blur=${this.onBlur}
@@ -90,19 +90,25 @@ let e = class extends v {
90
90
  ${r}
91
91
  </select>
92
92
  <span class="gui-select__arrow"
93
- ><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 256 256">
93
+ ><svg
94
+ xmlns="http://www.w3.org/2000/svg"
95
+ width="16"
96
+ height="16"
97
+ viewBox="0 0 256 256"
98
+ aria-hidden="true"
99
+ >
94
100
  <path
95
101
  d="M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"
96
102
  ></path></svg
97
103
  ></span>
98
- ${a.html}
104
+ ${i.html}
99
105
  </div>
100
106
 
101
- ${O(this.uid, t)}
107
+ ${O(this.uid, e)}
102
108
  `;
103
109
  }
104
- updated(t) {
105
- t.has("value") && !this.hasMatchingValue && this.value && this.dispatchEvent(
110
+ updated(e) {
111
+ e.has("value") && !this.hasMatchingValue && this.value && this.dispatchEvent(
106
112
  new CustomEvent("inputError", {
107
113
  detail: {
108
114
  message: (this.invalidOptionMessage ?? "Invalid selection: '{value}' is not a valid option.").replace("{value}", String(this.value))
@@ -111,12 +117,12 @@ let e = class extends v {
111
117
  })
112
118
  );
113
119
  }
114
- valueChanged(t) {
115
- if (t.stopPropagation(), !this.readOnly) {
116
- const a = t.target;
120
+ valueChanged(e) {
121
+ if (e.stopPropagation(), !this.readOnly) {
122
+ const i = e.target;
117
123
  this.dispatchEvent(
118
124
  new CustomEvent("change", {
119
- detail: { value: S(a.value, this.options) },
125
+ detail: { value: S(i.value, this.options) },
120
126
  bubbles: !0,
121
127
  composed: !0
122
128
  })
@@ -133,64 +139,64 @@ let e = class extends v {
133
139
  }
134
140
  };
135
141
  s([
136
- i({ type: String })
137
- ], e.prototype, "uid", 2);
142
+ a({ type: String })
143
+ ], t.prototype, "uid", 2);
138
144
  s([
139
- i({ type: String })
140
- ], e.prototype, "label", 2);
145
+ a({ type: String })
146
+ ], t.prototype, "label", 2);
141
147
  s([
142
- i({ type: String, attribute: "locale-id" })
143
- ], e.prototype, "localeId", 2);
148
+ a({ type: String, attribute: "locale-id" })
149
+ ], t.prototype, "localeId", 2);
144
150
  s([
145
- i({ type: Array })
146
- ], e.prototype, "errors", 2);
151
+ a({ type: Array })
152
+ ], t.prototype, "errors", 2);
147
153
  s([
148
- i({ type: Boolean })
149
- ], e.prototype, "touched", 2);
154
+ a({ type: Boolean })
155
+ ], t.prototype, "touched", 2);
150
156
  s([
151
- i({ type: Boolean })
152
- ], e.prototype, "required", 2);
157
+ a({ type: Boolean })
158
+ ], t.prototype, "required", 2);
153
159
  s([
154
- i({ type: Boolean })
155
- ], e.prototype, "disabled", 2);
160
+ a({ type: Boolean })
161
+ ], t.prototype, "disabled", 2);
156
162
  s([
157
- i({ type: Boolean, attribute: "readonly" })
158
- ], e.prototype, "readOnly", 2);
163
+ a({ type: Boolean, attribute: "readonly" })
164
+ ], t.prototype, "readOnly", 2);
159
165
  s([
160
- i({ type: String })
161
- ], e.prototype, "value", 2);
166
+ a({ type: String })
167
+ ], t.prototype, "value", 2);
162
168
  s([
163
- i({ type: String })
164
- ], e.prototype, "hint", 2);
169
+ a({ type: String })
170
+ ], t.prototype, "hint", 2);
165
171
  s([
166
- i({ type: String })
167
- ], e.prototype, "icon", 2);
172
+ a({ type: String })
173
+ ], t.prototype, "icon", 2);
168
174
  s([
169
- i({ type: String })
170
- ], e.prototype, "autocomplete", 2);
175
+ a({ type: String })
176
+ ], t.prototype, "autocomplete", 2);
171
177
  s([
172
- i({ type: Array })
173
- ], e.prototype, "options", 2);
178
+ a({ type: Array })
179
+ ], t.prototype, "options", 2);
174
180
  s([
175
- i({ type: String })
176
- ], e.prototype, "placeholder", 2);
181
+ a({ type: String })
182
+ ], t.prototype, "placeholder", 2);
177
183
  s([
178
- i({ type: String, attribute: "invalid-option-message" })
179
- ], e.prototype, "invalidOptionMessage", 2);
184
+ a({ type: String, attribute: "invalid-option-message" })
185
+ ], t.prototype, "invalidOptionMessage", 2);
180
186
  s([
181
- i({ type: String })
182
- ], e.prototype, "labelField", 2);
187
+ a({ type: String })
188
+ ], t.prototype, "labelField", 2);
183
189
  s([
184
- i({ type: String })
185
- ], e.prototype, "valueField", 2);
186
- e = s([
190
+ a({ type: String })
191
+ ], t.prototype, "valueField", 2);
192
+ t = s([
187
193
  g("gui-select")
188
- ], e);
189
- typeof customElements < "u" && !customElements.get("gui-select") && customElements.define("gui-select", e);
190
- var q = Object.defineProperty, I = Object.getOwnPropertyDescriptor, c = (t, a, r, l) => {
191
- for (var o = l > 1 ? void 0 : l ? I(a, r) : a, p = t.length - 1, d; p >= 0; p--)
192
- (d = t[p]) && (o = (l ? d(a, r, o) : d(o)) || o);
193
- return l && o && q(a, r, o), o;
194
+ ], t);
195
+ typeof customElements < "u" && !customElements.get("gui-select") && customElements.define("gui-select", t);
196
+ var M = Object.defineProperty, I = Object.getOwnPropertyDescriptor, c = (e, i, r, l) => {
197
+ for (var o = l > 1 ? void 0 : l ? I(i, r) : i, d = e.length - 1, p; d >= 0; d--)
198
+ (p = e[d]) && (o = (l ? p(i, r, o) : p(o)) || o);
199
+ return l && o && M(i, r, o), o;
194
200
  };
195
201
  let h = class extends v {
196
202
  constructor() {
@@ -199,10 +205,10 @@ let h = class extends v {
199
205
  createRenderRoot() {
200
206
  return this;
201
207
  }
202
- updated(t) {
203
- super.updated(t);
204
- const a = this.adapter.templateData.size;
205
- a ? this.style.flex = String(a) : this.style.removeProperty("flex");
208
+ updated(e) {
209
+ super.updated(e);
210
+ const i = this.adapter.templateData.size;
211
+ i ? this.style.flex = String(i) : this.style.removeProperty("flex");
206
212
  }
207
213
  connectedCallback() {
208
214
  super.connectedCallback(), this.classList.add("gui-select", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
@@ -234,23 +240,23 @@ let h = class extends v {
234
240
  ></gui-select>
235
241
  `;
236
242
  }
237
- valueChanged(t) {
238
- const a = t.detail.value;
239
- this.adapter.valueChanged(a);
243
+ valueChanged(e) {
244
+ const i = e.detail.value;
245
+ this.adapter.valueChanged(i);
240
246
  }
241
- onInputError(t) {
242
- this.adapter.injectValidationIssues([t.detail.message]);
247
+ onInputError(e) {
248
+ this.adapter.injectValidationIssues([e.detail.message]);
243
249
  }
244
250
  disconnectedCallback() {
245
- super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((t) => t.unsubscribe());
251
+ super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((e) => e.unsubscribe());
246
252
  }
247
253
  };
248
254
  c([
249
255
  F({ context: b }),
250
- i({ attribute: !1 })
256
+ a({ attribute: !1 })
251
257
  ], h.prototype, "formContext", 2);
252
258
  c([
253
- x({ context: y })
259
+ _({ context: y })
254
260
  ], h.prototype, "adapter", 2);
255
261
  h = c([
256
262
  g("gui-select-input")
@@ -89,6 +89,7 @@ let n = class extends y {
89
89
  (e) => e?.uid,
90
90
  (e, t) => d`<section
91
91
  role="tabpanel"
92
+ tabindex="0"
92
93
  data-cy=${`tabpanel_${this.widget.uid}_${t}`}
93
94
  id=${`tabpanel_${this.widget.uid}_${t}`}
94
95
  ?hidden=${e.uid !== this.activeTab && this.adapter.templateData.renderMode !== "activeOnly"}
@@ -1,16 +1,16 @@
1
1
  import { InputWidgetAdapter as D, formContext as w, inputContext as C } from "@golemui/lit";
2
2
  import { LitElement as y, nothing as c, html as m } from "lit";
3
- import { property as o, customElement as v } from "lit/decorators.js";
3
+ import { property as o, customElement as b } from "lit/decorators.js";
4
4
  import { classMap as f } from "lit/directives/class-map.js";
5
- import { G as A, b as P, c as S } from "./templates-Dk1jxLwS.js";
6
- import "./pills-Be1UrLgq.js";
5
+ import { G as A, b as P, c as S } from "./templates-Dmr34nwp.js";
6
+ import "./pills-BDMO2NiR.js";
7
7
  import { styleMap as _ } from "lit-html/directives/style-map.js";
8
- import { consume as E, provide as O } from "@lit/context";
8
+ import { consume as E, provide as L } from "@lit/context";
9
9
  import "rxjs";
10
- var I = Object.defineProperty, L = Object.getOwnPropertyDescriptor, n = (t, e, r, a) => {
11
- for (var i = a > 1 ? void 0 : a ? L(e, r) : e, s = t.length - 1, p; s >= 0; s--)
10
+ var O = Object.defineProperty, I = Object.getOwnPropertyDescriptor, n = (t, e, r, a) => {
11
+ for (var i = a > 1 ? void 0 : a ? I(e, r) : e, s = t.length - 1, p; s >= 0; s--)
12
12
  (p = t[s]) && (i = (a ? p(e, r, i) : p(i)) || i);
13
- return a && i && I(e, r, i), i;
13
+ return a && i && O(e, r, i), i;
14
14
  };
15
15
  const x = ["Enter", ",", "Tab", "blur"];
16
16
  let l = class extends y {
@@ -24,7 +24,8 @@ let l = class extends y {
24
24
  errors: this.errors,
25
25
  readonly: this.readOnly,
26
26
  disabled: this.disabled,
27
- touched: this.touched
27
+ touched: this.touched,
28
+ required: this.required
28
29
  }
29
30
  })
30
31
  }), this.onPillRemove = (t) => {
@@ -87,11 +88,17 @@ let l = class extends y {
87
88
  role="group"
88
89
  aria-label=${this.label ?? "Tags input"}
89
90
  >
90
- ${this.icon ? m`<span class=${f(r)} data-icon=${this.icon}></span>` : c}
91
+ ${this.icon ? m`<span
92
+ class=${f(r)}
93
+ data-icon=${this.icon}
94
+ aria-hidden="true"
95
+ ></span>` : c}
91
96
 
92
97
  <gui-pills
93
98
  class="gui-tags__pills"
94
99
  style=${_(a.length ? {} : { "min-width": 0 })}
100
+ .uid=${this.uid}
101
+ .toolbarAriaLabel=${"Selected tags"}
95
102
  .items=${a}
96
103
  .removable=${!0}
97
104
  .clickable=${!1}
@@ -179,8 +186,8 @@ let l = class extends y {
179
186
  );
180
187
  if (!i.test(e)) return;
181
188
  t.preventDefault();
182
- const s = t.target instanceof HTMLInputElement ? t.target : null, d = ((s?.value ?? "") + e).split(i), b = d.slice(0, -1), $ = d[d.length - 1] ?? "";
183
- this.commitDraftBatch(b) && s && (s.value = $);
189
+ const s = t.target instanceof HTMLInputElement ? t.target : null, d = ((s?.value ?? "") + e).split(i), v = d.slice(0, -1), $ = d[d.length - 1] ?? "";
190
+ this.commitDraftBatch(v) && s && (s.value = $);
184
191
  }
185
192
  commitDraft(t) {
186
193
  const e = this.trim ? t.trim() : t;
@@ -289,7 +296,7 @@ n([
289
296
  o({ type: String, attribute: "remove-icon" })
290
297
  ], l.prototype, "removeIcon", 2);
291
298
  l = n([
292
- v("gui-tags")
299
+ b("gui-tags")
293
300
  ], l);
294
301
  typeof customElements < "u" && !customElements.get("gui-tags") && customElements.define("gui-tags", l);
295
302
  var q = Object.defineProperty, R = Object.getOwnPropertyDescriptor, g = (t, e, r, a) => {
@@ -352,10 +359,10 @@ g([
352
359
  o({ attribute: !1 })
353
360
  ], h.prototype, "formContext", 2);
354
361
  g([
355
- O({ context: C })
362
+ L({ context: C })
356
363
  ], h.prototype, "adapter", 2);
357
364
  h = g([
358
- v("gui-tags-input")
365
+ b("gui-tags-input")
359
366
  ], h);
360
367
  export {
361
368
  h as TagsElement