@golemui/gui-lit 0.16.1 → 0.17.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 (23) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/{abstract-calendar-YDgwwbqe.js → abstract-calendar-s67Qu3Nt.js} +32 -32
  3. package/{button.element-DxwYDdu6.js → button.element-DoQmGWze.js} +42 -37
  4. package/{calendar-P9DzVryu.js → calendar-aXb9yz-6.js} +1 -1
  5. package/{calendar.element-O2of7VBr.js → calendar.element-D7OF4QVV.js} +1 -1
  6. package/{date-input-D_Swskk4.js → date-input-5Heujc5X.js} +4 -1
  7. package/{date-picker.element-CP2_u_ZE.js → date-picker.element-DStQrD4x.js} +14 -8
  8. package/{date.element-p6aB6OGd.js → date.element-DymfLrlq.js} +1 -1
  9. package/index.js +12 -12
  10. package/index.umd.cjs +72 -78
  11. package/lib/components/date-picker.element.d.ts +1 -0
  12. package/{markdown.element-1IF3G5KX.js → markdown.element-BiAglcXP.js} +109 -105
  13. package/{number.element-zgd4L5hn.js → number.element-DlpxcOBs.js} +23 -39
  14. package/package.json +6 -6
  15. package/{pills-D0yyi-op.js → pills-B66qz_KX.js} +6 -6
  16. package/{radiogroup.element-DzHLgRh1.js → radiogroup.element-tdHrN9V5.js} +1 -1
  17. package/{range-calendar-CZGBBOzO.js → range-calendar-DUoIqmOA.js} +3 -5
  18. package/{range-calendar.element-DQZXvd-L.js → range-calendar.element-D6FO7HpL.js} +1 -1
  19. package/{range-date-input-CcPYH7P3.js → range-date-input-CoFG7Qem.js} +2 -4
  20. package/{range-date-input.element-v71P-oUp.js → range-date-input.element-Cjl1vZfr.js} +1 -1
  21. package/{range-date-picker.element-CA-KcQhA.js → range-date-picker.element-DqjOBKoT.js} +2 -2
  22. package/{select.element-CjWqp9dd.js → select.element-Y9i1tsl-.js} +4 -4
  23. package/{tags.element-ed1_51GA.js → tags.element-B3JP4m0z.js} +2 -4
@@ -18,6 +18,7 @@ export declare class DatePickerElement extends LitElement implements WithWidget
18
18
  connectedCallback(): void;
19
19
  render(): import('lit-html').TemplateResult<1>;
20
20
  valueChanged(event: CustomEvent): void;
21
+ onCalendarChange(event: CustomEvent): void;
21
22
  onBlurCalendar(): void;
22
23
  onInputError(event: CustomEvent): void;
23
24
  onKeyUp(event: Event): void;
@@ -1,22 +1,22 @@
1
- import { InputWidgetAdapter as O, formContext as S, inputContext as V } from "@golemui/lit";
1
+ import { InputWidgetAdapter as S, formContext as V, inputContext as T } from "@golemui/lit";
2
2
  import "@golemui/gui-shared";
3
- import { LitElement as H, html as u, nothing as $ } from "lit";
4
- import { property as l, state as L, customElement as A } from "lit/decorators.js";
3
+ import { LitElement as L, html as u, nothing as $ } from "lit";
4
+ import { property as l, state as A, customElement as C } from "lit/decorators.js";
5
5
  import { classMap as y } from "lit/directives/class-map.js";
6
- import { G as T, b as I, c as M } from "./templates-Dk1jxLwS.js";
7
- import { styleMap as B } from "lit-html/directives/style-map.js";
6
+ import { G as I, b as M, c as _ } from "./templates-Dk1jxLwS.js";
7
+ import { styleMap as H } from "lit-html/directives/style-map.js";
8
8
  import { ifDefined as x } from "lit/directives/if-defined.js";
9
9
  import "./markdown-text-X-BRJT6K.js";
10
- import { consume as _, provide as F } from "@lit/context";
10
+ import { consume as B, provide as F } from "@lit/context";
11
11
  import "rxjs";
12
- var Z = Object.defineProperty, D = Object.getOwnPropertyDescriptor, r = (t, e, i, o) => {
13
- for (var s = o > 1 ? void 0 : o ? D(e, i) : e, a = t.length - 1, d; a >= 0; a--)
14
- (d = t[a]) && (s = (o ? d(e, i, s) : d(s)) || s);
15
- return o && s && Z(e, i, s), s;
12
+ var Z = Object.defineProperty, D = Object.getOwnPropertyDescriptor, r = (t, e, i, n) => {
13
+ for (var s = n > 1 ? void 0 : n ? D(e, i) : e, a = t.length - 1, d; a >= 0; a--)
14
+ (d = t[a]) && (s = (n ? d(e, i, s) : d(s)) || s);
15
+ return n && s && Z(e, i, s), s;
16
16
  };
17
- let n = class extends H {
17
+ let o = class extends L {
18
18
  constructor() {
19
- 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.tools = void 0, this.placeholder = void 0, this.autocomplete = void 0, this.minimumHeight = void 0, this.autoGrow = !1, this.defaultOpenPreview = void 0, this.maxLength = void 0, this.headingTitle = void 0, this.boldTitle = void 0, this.italicTitle = void 0, this.strikethroughTitle = void 0, this.quoteTitle = void 0, this.linkTitle = void 0, this.orderedListTitle = void 0, this.unorderedListTitle = void 0, this.splitViewTitle = void 0, this.dependencies = void 0, this.splitViewActive = !1, this.activeFormats = {}, this.splitViewInitialized = !1, this.ariaController = new T(this, {
19
+ 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.tools = void 0, this.placeholder = void 0, this.autocomplete = void 0, this.minimumHeight = void 0, this.autoGrow = !1, this.defaultOpenPreview = void 0, this.maxLength = void 0, this.headingTitle = void 0, this.boldTitle = void 0, this.italicTitle = void 0, this.strikethroughTitle = void 0, this.quoteTitle = void 0, this.linkTitle = void 0, this.orderedListTitle = void 0, this.unorderedListTitle = void 0, this.splitViewTitle = void 0, this.dependencies = void 0, this.splitViewActive = !1, this.activeFormats = {}, this.splitViewInitialized = !1, this.ariaController = new I(this, {
20
20
  getTargets: () => this.querySelectorAll(`textarea[id="${this.uid}"]`),
21
21
  getState: () => ({
22
22
  uid: this.uid,
@@ -76,11 +76,11 @@ let n = class extends H {
76
76
  <span> / ${t.maxLength}</span>
77
77
  </div>`;
78
78
  }
79
- const o = {
79
+ const n = {
80
80
  "min-height": `${t.minimumHeight}px`
81
81
  };
82
82
  return u`
83
- ${I(this.uid, t)}
83
+ ${M(this.uid, t)}
84
84
 
85
85
  <div
86
86
  class=${y({
@@ -118,37 +118,41 @@ let n = class extends H {
118
118
  </li>
119
119
  </ul>
120
120
  </nav>
121
- <textarea
122
- id=${x(this.uid)}
123
- class=${y(e)}
124
- style=${B(o)}
125
- ?required=${t.required}
126
- ?disabled=${t.disabled}
127
- ?readonly=${t.readonly}
128
- placeholder=${x(t.placeholder)}
129
- autocomplete=${this.autocomplete || $}
130
- .value=${this.value || ""}
131
- @input=${this.valueChanged}
132
- @keyup=${this.detectFormats}
133
- @mouseup=${this.detectFormats}
134
- @blur=${this.onBlur}
135
- ></textarea>
136
121
 
137
- ${this.splitViewActive ? u`
138
- <section
139
- data-cy=${x(this.uid ? `${this.uid}_markdown` : $)}
140
- class="gui-markdown__preview"
141
- >
142
- <gui-markdown-text
143
- .md=${this.value || ""}
144
- .dependencies=${this.dependencies}
145
- ></gui-markdown-text>
146
- </section>
147
- ` : $}
122
+ <div class="gui-markdown__container">
123
+ <textarea
124
+ id=${x(this.uid)}
125
+ class=${y(e)}
126
+ style=${H(n)}
127
+ ?required=${t.required}
128
+ ?disabled=${t.disabled}
129
+ ?readonly=${t.readonly}
130
+ placeholder=${x(t.placeholder)}
131
+ autocomplete=${this.autocomplete || $}
132
+ .value=${this.value || ""}
133
+ @input=${this.valueChanged}
134
+ @keyup=${this.detectFormats}
135
+ @mouseup=${this.detectFormats}
136
+ @blur=${this.onBlur}
137
+ ></textarea>
138
+
139
+ ${this.splitViewActive ? u`
140
+ <section
141
+ data-cy=${x(this.uid ? `${this.uid}_markdown` : $)}
142
+ class="gui-markdown__preview"
143
+ style=${H(n)}
144
+ >
145
+ <gui-markdown-text
146
+ .md=${this.value || ""}
147
+ .dependencies=${this.dependencies}
148
+ ></gui-markdown-text>
149
+ </section>
150
+ ` : $}
151
+ </div>
148
152
  </div>
149
153
 
150
154
  <div class="gui-markdown--validation">
151
- <div>${M(this.uid, t)}</div>
155
+ <div>${_(this.uid, t)}</div>
152
156
  ${i}
153
157
  </div>
154
158
  `;
@@ -157,7 +161,7 @@ let n = class extends H {
157
161
  if (!this.autoGrow) return;
158
162
  const t = this.querySelector(`textarea[id="${this.uid}"]`);
159
163
  if (!t) return;
160
- const e = window.getComputedStyle(t), i = parseFloat(e.paddingTop), o = parseFloat(e.paddingBottom), s = i + o;
164
+ const e = window.getComputedStyle(t), i = parseFloat(e.paddingTop), n = parseFloat(e.paddingBottom), s = i + n;
161
165
  t.style.height = "auto", t.style.height = `${Math.max(this.minimumHeight ?? 120, t.scrollHeight - s)}px`;
162
166
  }
163
167
  splitView() {
@@ -314,9 +318,9 @@ let n = class extends H {
314
318
  detectFormats() {
315
319
  const t = this.querySelector(`textarea[id="${this.uid}"]`);
316
320
  if (!t) return;
317
- const { selectionStart: e, value: i } = t, o = i.lastIndexOf(`
321
+ const { selectionStart: e, value: i } = t, n = i.lastIndexOf(`
318
322
  `, e - 1) + 1, s = i.indexOf(`
319
- `, e), a = i.substring(o, s === -1 ? i.length : s);
323
+ `, e), a = i.substring(n, s === -1 ? i.length : s);
320
324
  this.activeFormats = {
321
325
  heading: /^#{1,6}\s/.test(a),
322
326
  bold: this.isInsideInlineFormat(i, e, "**"),
@@ -329,9 +333,9 @@ let n = class extends H {
329
333
  };
330
334
  }
331
335
  isInsideInlineFormat(t, e, i) {
332
- const o = t.lastIndexOf(`
336
+ const n = t.lastIndexOf(`
333
337
  `, e - 1) + 1, s = t.indexOf(`
334
- `, e), a = t.substring(o, s === -1 ? t.length : s), d = e - o;
338
+ `, e), a = t.substring(n, s === -1 ? t.length : s), d = e - n;
335
339
  let h = 0;
336
340
  for (; h < a.length; ) {
337
341
  const g = a.indexOf(i, h);
@@ -346,8 +350,8 @@ let n = class extends H {
346
350
  }
347
351
  isInsideLink(t, e) {
348
352
  const i = t.lastIndexOf(`
349
- `, e - 1) + 1, o = t.indexOf(`
350
- `, e), s = t.substring(i, o === -1 ? t.length : o), a = e - i, d = /\[[^\]]*\]\([^)]*\)/g;
353
+ `, e - 1) + 1, n = t.indexOf(`
354
+ `, e), s = t.substring(i, n === -1 ? t.length : n), a = e - i, d = /\[[^\]]*\]\([^)]*\)/g;
351
355
  let h;
352
356
  for (; (h = d.exec(s)) !== null; )
353
357
  if (a >= h.index && a <= h.index + h[0].length)
@@ -356,24 +360,24 @@ let n = class extends H {
356
360
  }
357
361
  applyFormat(t, e = "", i = "") {
358
362
  return () => {
359
- const o = this.querySelector(`textarea[id="${this.uid}"]`);
360
- if (o) {
363
+ const n = this.querySelector(`textarea[id="${this.uid}"]`);
364
+ if (n) {
361
365
  if (i && this.activeFormats[i])
362
- this.removeFormat(o, t, e, i);
366
+ this.removeFormat(n, t, e, i);
363
367
  else {
364
- const { selectionStart: s, selectionEnd: a, value: d } = o, h = d.substring(s, a), g = d.substring(0, s), p = d.substring(a);
365
- o.value = `${g}${t}${h}${e}${p}`, o.selectionStart = s + t.length, o.selectionEnd = s + t.length + h.length;
368
+ const { selectionStart: s, selectionEnd: a, value: d } = n, h = d.substring(s, a), g = d.substring(0, s), p = d.substring(a);
369
+ n.value = `${g}${t}${h}${e}${p}`, n.selectionStart = s + t.length, n.selectionEnd = s + t.length + h.length;
366
370
  }
367
- o.focus(), o.dispatchEvent(new Event("input", { bubbles: !0 })), this.detectFormats();
371
+ n.focus(), n.dispatchEvent(new Event("input", { bubbles: !0 })), this.detectFormats();
368
372
  }
369
373
  };
370
374
  }
371
- removeFormat(t, e, i, o) {
375
+ removeFormat(t, e, i, n) {
372
376
  const { selectionStart: s, value: a } = t, d = a.lastIndexOf(`
373
377
  `, s - 1) + 1, h = a.indexOf(`
374
378
  `, s), g = a.substring(d, h === -1 ? a.length : h);
375
379
  if (i)
376
- if (o === "link") {
380
+ if (n === "link") {
377
381
  const p = s - d, w = /\[([^\]]*)\]\([^)]*\)/g;
378
382
  let c;
379
383
  for (; (c = w.exec(g)) !== null; )
@@ -391,8 +395,8 @@ let n = class extends H {
391
395
  const v = g.indexOf(i, c + e.length);
392
396
  if (v === -1) break;
393
397
  if (p >= c && p <= v + i.length) {
394
- const m = g.substring(c + e.length, v), b = d + c, C = d + v + i.length;
395
- t.value = `${a.substring(0, b)}${m}${a.substring(C)}`, t.selectionStart = b, t.selectionEnd = b + m.length;
398
+ const m = g.substring(c + e.length, v), b = d + c, O = d + v + i.length;
399
+ t.value = `${a.substring(0, b)}${m}${a.substring(O)}`, t.selectionStart = b, t.selectionEnd = b + m.length;
396
400
  break;
397
401
  }
398
402
  w = v + i.length;
@@ -400,10 +404,10 @@ let n = class extends H {
400
404
  }
401
405
  else {
402
406
  let p = e;
403
- if (o === "heading") {
407
+ if (n === "heading") {
404
408
  const m = g.match(/^#{1,6}\s/);
405
409
  m && (p = m[0]);
406
- } else if (o === "orderedList") {
410
+ } else if (n === "orderedList") {
407
411
  const m = g.match(/^\d+\.\s/);
408
412
  m && (p = m[0]);
409
413
  }
@@ -434,106 +438,106 @@ let n = class extends H {
434
438
  };
435
439
  r([
436
440
  l({ type: String })
437
- ], n.prototype, "uid", 2);
441
+ ], o.prototype, "uid", 2);
438
442
  r([
439
443
  l({ type: String })
440
- ], n.prototype, "label", 2);
444
+ ], o.prototype, "label", 2);
441
445
  r([
442
446
  l({ type: String, attribute: "locale-id" })
443
- ], n.prototype, "localeId", 2);
447
+ ], o.prototype, "localeId", 2);
444
448
  r([
445
449
  l({ type: Array })
446
- ], n.prototype, "errors", 2);
450
+ ], o.prototype, "errors", 2);
447
451
  r([
448
452
  l({ type: Boolean })
449
- ], n.prototype, "touched", 2);
453
+ ], o.prototype, "touched", 2);
450
454
  r([
451
455
  l({ type: Boolean })
452
- ], n.prototype, "required", 2);
456
+ ], o.prototype, "required", 2);
453
457
  r([
454
458
  l({ type: Boolean })
455
- ], n.prototype, "disabled", 2);
459
+ ], o.prototype, "disabled", 2);
456
460
  r([
457
461
  l({ type: Boolean, attribute: "readonly" })
458
- ], n.prototype, "readOnly", 2);
462
+ ], o.prototype, "readOnly", 2);
459
463
  r([
460
464
  l({ type: String })
461
- ], n.prototype, "value", 2);
465
+ ], o.prototype, "value", 2);
462
466
  r([
463
467
  l({ type: String })
464
- ], n.prototype, "hint", 2);
468
+ ], o.prototype, "hint", 2);
465
469
  r([
466
470
  l({ type: Array })
467
- ], n.prototype, "tools", 2);
471
+ ], o.prototype, "tools", 2);
468
472
  r([
469
473
  l({ type: String })
470
- ], n.prototype, "placeholder", 2);
474
+ ], o.prototype, "placeholder", 2);
471
475
  r([
472
476
  l({ type: String })
473
- ], n.prototype, "autocomplete", 2);
477
+ ], o.prototype, "autocomplete", 2);
474
478
  r([
475
479
  l({ type: String, attribute: "countermode" })
476
- ], n.prototype, "counterMode", 2);
480
+ ], o.prototype, "counterMode", 2);
477
481
  r([
478
482
  l({ type: Number, attribute: "minimumheight" })
479
- ], n.prototype, "minimumHeight", 2);
483
+ ], o.prototype, "minimumHeight", 2);
480
484
  r([
481
485
  l({ type: Boolean, attribute: "autogrow" })
482
- ], n.prototype, "autoGrow", 2);
486
+ ], o.prototype, "autoGrow", 2);
483
487
  r([
484
488
  l({ type: Boolean, attribute: "defaultopenpreview" })
485
- ], n.prototype, "defaultOpenPreview", 2);
489
+ ], o.prototype, "defaultOpenPreview", 2);
486
490
  r([
487
491
  l({ type: Number, attribute: "maxlength" })
488
- ], n.prototype, "maxLength", 2);
492
+ ], o.prototype, "maxLength", 2);
489
493
  r([
490
494
  l({ type: String })
491
- ], n.prototype, "headingTitle", 2);
495
+ ], o.prototype, "headingTitle", 2);
492
496
  r([
493
497
  l({ type: String })
494
- ], n.prototype, "boldTitle", 2);
498
+ ], o.prototype, "boldTitle", 2);
495
499
  r([
496
500
  l({ type: String })
497
- ], n.prototype, "italicTitle", 2);
501
+ ], o.prototype, "italicTitle", 2);
498
502
  r([
499
503
  l({ type: String })
500
- ], n.prototype, "strikethroughTitle", 2);
504
+ ], o.prototype, "strikethroughTitle", 2);
501
505
  r([
502
506
  l({ type: String })
503
- ], n.prototype, "quoteTitle", 2);
507
+ ], o.prototype, "quoteTitle", 2);
504
508
  r([
505
509
  l({ type: String })
506
- ], n.prototype, "linkTitle", 2);
510
+ ], o.prototype, "linkTitle", 2);
507
511
  r([
508
512
  l({ type: String })
509
- ], n.prototype, "orderedListTitle", 2);
513
+ ], o.prototype, "orderedListTitle", 2);
510
514
  r([
511
515
  l({ type: String })
512
- ], n.prototype, "unorderedListTitle", 2);
516
+ ], o.prototype, "unorderedListTitle", 2);
513
517
  r([
514
518
  l({ type: String })
515
- ], n.prototype, "splitViewTitle", 2);
519
+ ], o.prototype, "splitViewTitle", 2);
516
520
  r([
517
521
  l({ type: Object })
518
- ], n.prototype, "dependencies", 2);
522
+ ], o.prototype, "dependencies", 2);
519
523
  r([
520
- L()
521
- ], n.prototype, "splitViewActive", 2);
524
+ A()
525
+ ], o.prototype, "splitViewActive", 2);
522
526
  r([
523
- L()
524
- ], n.prototype, "activeFormats", 2);
525
- n = r([
526
- A("gui-markdown")
527
- ], n);
528
- typeof customElements < "u" && !customElements.get("gui-markdown") && customElements.define("gui-markdown", n);
529
- var E = Object.defineProperty, q = Object.getOwnPropertyDescriptor, k = (t, e, i, o) => {
530
- for (var s = o > 1 ? void 0 : o ? q(e, i) : e, a = t.length - 1, d; a >= 0; a--)
531
- (d = t[a]) && (s = (o ? d(e, i, s) : d(s)) || s);
532
- return o && s && E(e, i, s), s;
527
+ A()
528
+ ], o.prototype, "activeFormats", 2);
529
+ o = r([
530
+ C("gui-markdown")
531
+ ], o);
532
+ typeof customElements < "u" && !customElements.get("gui-markdown") && customElements.define("gui-markdown", o);
533
+ var E = Object.defineProperty, q = Object.getOwnPropertyDescriptor, k = (t, e, i, n) => {
534
+ for (var s = n > 1 ? void 0 : n ? q(e, i) : e, a = t.length - 1, d; a >= 0; a--)
535
+ (d = t[a]) && (s = (n ? d(e, i, s) : d(s)) || s);
536
+ return n && s && E(e, i, s), s;
533
537
  };
534
- let f = class extends H {
538
+ let f = class extends L {
535
539
  constructor() {
536
- super(...arguments), this.adapter = new O(), this.subscriptions = [];
540
+ super(...arguments), this.adapter = new S(), this.subscriptions = [];
537
541
  }
538
542
  createRenderRoot() {
539
543
  return this;
@@ -583,14 +587,14 @@ let f = class extends H {
583
587
  }
584
588
  };
585
589
  k([
586
- _({ context: S }),
590
+ B({ context: V }),
587
591
  l({ attribute: !1 })
588
592
  ], f.prototype, "formContext", 2);
589
593
  k([
590
- F({ context: V })
594
+ F({ context: T })
591
595
  ], f.prototype, "adapter", 2);
592
596
  f = k([
593
- A("gui-markdown-input")
597
+ C("gui-markdown-input")
594
598
  ], f);
595
599
  export {
596
600
  f as MarkdownElement
@@ -1,19 +1,19 @@
1
- import { InputWidgetAdapter as y, formContext as v, inputContext as $ } from "@golemui/lit";
1
+ import { InputWidgetAdapter as v, formContext as y, inputContext as g } from "@golemui/lit";
2
2
  import "@golemui/gui-shared";
3
- import { LitElement as m, nothing as n, html as c } from "lit";
3
+ import { LitElement as m, nothing as h, html as c } from "lit";
4
4
  import { property as s, customElement as b } from "lit/decorators.js";
5
- import { G as g, b as f, c as w } from "./templates-Dk1jxLwS.js";
5
+ import { G as f, b as w, c as $ } from "./templates-Dk1jxLwS.js";
6
6
  import { styleMap as x } from "lit-html/directives/style-map.js";
7
7
  import { consume as D, provide as C } from "@lit/context";
8
8
  import "rxjs";
9
- var N = Object.defineProperty, E = Object.getOwnPropertyDescriptor, r = (t, i, e, o) => {
10
- for (var u = o > 1 ? void 0 : o ? E(i, e) : i, l = t.length - 1, p; l >= 0; l--)
9
+ var N = Object.defineProperty, A = Object.getOwnPropertyDescriptor, r = (t, i, e, o) => {
10
+ for (var u = o > 1 ? void 0 : o ? A(i, e) : i, l = t.length - 1, p; l >= 0; l--)
11
11
  (p = t[l]) && (u = (o ? p(i, e, u) : p(u)) || u);
12
12
  return o && u && N(i, e, u), u;
13
13
  };
14
14
  let a = class extends m {
15
15
  constructor() {
16
- super(...arguments), this.uid = void 0, this.label = void 0, this.hint = void 0, this.localeId = "en", this.errors = [], this.touched = !1, this.required = !1, this.disabled = !1, this.readOnly = !1, this.value = void 0, this.step = void 0, this.placeholder = void 0, this.autocomplete = void 0, this.minimum = void 0, this.maximum = void 0, this.autoGrow = !1, this.ariaController = new g(this, {
16
+ super(...arguments), this.uid = void 0, this.label = void 0, this.hint = void 0, this.localeId = "en", this.errors = [], this.touched = !1, this.required = !1, this.disabled = !1, this.readOnly = !1, this.value = void 0, this.step = void 0, this.placeholder = void 0, this.autocomplete = void 0, this.minimum = void 0, this.maximum = void 0, this.autoGrow = !1, this.ariaController = new f(this, {
17
17
  getTargets: () => this.querySelectorAll(`input[id="${this.uid}"]`),
18
18
  getState: () => ({
19
19
  uid: this.uid,
@@ -60,19 +60,9 @@ let a = class extends m {
60
60
  autocomplete: this.autocomplete
61
61
  };
62
62
  return c`
63
- ${f(this.uid, e)}
63
+ ${w(this.uid, e)}
64
64
 
65
65
  <div class="gui-widget">
66
- <button
67
- type="button"
68
- tabindex="-1"
69
- class="gui-button gui-number__minus"
70
- ?disabled=${this.value <= this.minimum || this.disabled}
71
- @click=${this.minus}
72
- >
73
- -
74
- </button>
75
-
76
66
  <input
77
67
  type="number"
78
68
  inputmode="decimal"
@@ -84,26 +74,20 @@ let a = class extends m {
84
74
  ?required=${this.required}
85
75
  ?disabled=${this.disabled}
86
76
  ?readonly=${this.readOnly}
87
- step=${typeof this.step == "number" ? this.step : n}
88
- placeholder=${this.placeholder || n}
89
- autocomplete=${this.autocomplete || n}
77
+ step=${typeof this.step == "number" ? this.step : h}
78
+ placeholder=${this.placeholder || h}
79
+ autocomplete=${this.autocomplete || h}
90
80
  @input=${this.valueChanged}
91
81
  @keydown=${this.keyDown}
92
82
  @blur=${this.onBlur}
93
83
  />
94
-
95
- <button
96
- type="button"
97
- tabindex="-1"
98
- class="gui-button gui-number__plus"
99
- ?disabled=${this.value >= this.maximum || this.disabled}
100
- @click=${this.plus}
101
- >
102
- +
103
- </button>
84
+ <span class="gui-number__decoration">
85
+ <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 256 256"><path d="M213.66,165.66a8,8,0,0,1-11.32,0L128,91.31,53.66,165.66a8,8,0,0,1-11.32-11.32l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,213.66,165.66Z"></path></svg>
86
+ <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 256 256"><path 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"></path></svg>
87
+ </span>
104
88
  </div>
105
89
 
106
- ${w(this.uid, e)}
90
+ ${$(this.uid, e)}
107
91
  `;
108
92
  }
109
93
  keyDown(t) {
@@ -215,14 +199,14 @@ a = r([
215
199
  b("gui-number")
216
200
  ], a);
217
201
  typeof customElements < "u" && !customElements.get("gui-number") && customElements.define("gui-number", a);
218
- var _ = Object.defineProperty, O = Object.getOwnPropertyDescriptor, h = (t, i, e, o) => {
202
+ var E = Object.defineProperty, O = Object.getOwnPropertyDescriptor, n = (t, i, e, o) => {
219
203
  for (var u = o > 1 ? void 0 : o ? O(i, e) : i, l = t.length - 1, p; l >= 0; l--)
220
204
  (p = t[l]) && (u = (o ? p(i, e, u) : p(u)) || u);
221
- return o && u && _(i, e, u), u;
205
+ return o && u && E(i, e, u), u;
222
206
  };
223
207
  let d = class extends m {
224
208
  constructor() {
225
- super(...arguments), this.adapter = new y(), this.subscriptions = [];
209
+ super(...arguments), this.adapter = new v(), this.subscriptions = [];
226
210
  }
227
211
  createRenderRoot() {
228
212
  return this;
@@ -268,14 +252,14 @@ let d = class extends m {
268
252
  super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((t) => t.unsubscribe());
269
253
  }
270
254
  };
271
- h([
272
- D({ context: v }),
255
+ n([
256
+ D({ context: y }),
273
257
  s({ attribute: !1 })
274
258
  ], d.prototype, "formContext", 2);
275
- h([
276
- C({ context: $ })
259
+ n([
260
+ C({ context: g })
277
261
  ], d.prototype, "adapter", 2);
278
- d = h([
262
+ d = n([
279
263
  b("gui-number-input")
280
264
  ], d);
281
265
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@golemui/gui-lit",
3
- "version": "0.16.1",
3
+ "version": "0.17.0",
4
4
  "type": "module",
5
5
  "main": "./index.umd.cjs",
6
6
  "module": "./index.js",
@@ -21,11 +21,11 @@
21
21
  "*.md"
22
22
  ],
23
23
  "peerDependencies": {
24
- "@golemui/lit": "0.16.1",
25
- "@golemui/core": "0.16.1",
26
- "@golemui/gui-components": "0.16.1",
27
- "@golemui/gui-shared": "0.16.1",
28
- "@golemui/gui-validators": "0.16.1",
24
+ "@golemui/lit": "0.17.0",
25
+ "@golemui/core": "0.17.0",
26
+ "@golemui/gui-components": "0.17.0",
27
+ "@golemui/gui-shared": "0.17.0",
28
+ "@golemui/gui-validators": "0.17.0",
29
29
  "@lit/context": "^1.1.6",
30
30
  "lit-html": "^3.3.1",
31
31
  "lit": "^3.3.1",
@@ -45,8 +45,7 @@ let r = class extends m {
45
45
  render() {
46
46
  const e = this.items.length;
47
47
  return e === 0 ? p : d`
48
- ${this.renderStrip()}
49
- ${this.bubble ? this.renderCompact(e) : p}
48
+ ${this.renderStrip()} ${this.bubble ? this.renderCompact(e) : p}
50
49
  ${this.bubble && this._showDropdown ? this.renderDropdown() : p}
51
50
  `;
52
51
  }
@@ -135,7 +134,10 @@ let r = class extends m {
135
134
  t.stopPropagation(), this.emitRemove(e.key, this.items.indexOf(e));
136
135
  }}
137
136
  >
138
- ${this.removeIcon ? d`<span class=${`gui-widget-icon ${this.removeIcon}`} data-icon=${this.removeIcon}></span>` : d`<svg
137
+ ${this.removeIcon ? d`<span
138
+ class=${`gui-widget-icon ${this.removeIcon}`}
139
+ data-icon=${this.removeIcon}
140
+ ></span>` : d`<svg
139
141
  xmlns="http://www.w3.org/2000/svg"
140
142
  width="16"
141
143
  height="16"
@@ -243,9 +245,7 @@ let r = class extends m {
243
245
  composed: !0
244
246
  })
245
247
  ), requestAnimationFrame(() => {
246
- this.addOutsideListeners(), this.querySelector(
247
- ".gui-pills__dropdown .gui-pills__pill"
248
- )?.focus();
248
+ this.addOutsideListeners(), this.querySelector(".gui-pills__dropdown .gui-pills__pill")?.focus();
249
249
  }));
250
250
  }
251
251
  closeDropdown() {
@@ -151,7 +151,7 @@ o([
151
151
  s({ type: String })
152
152
  ], r.prototype, "hint", 2);
153
153
  o([
154
- s({ type: String })
154
+ s({ type: Array })
155
155
  ], r.prototype, "options", 2);
156
156
  o([
157
157
  s({ type: String })
@@ -2,8 +2,8 @@ import { html as v, nothing as b } from "lit";
2
2
  import { property as D, state as f, customElement as $ } from "lit/decorators.js";
3
3
  import { classMap as w } from "lit/directives/class-map.js";
4
4
  import { i as g, a as S, b as m, g as M, m as O, c as p } from "./date-CG1562vW.js";
5
- import { A } from "./abstract-calendar-YDgwwbqe.js";
6
- import "./pills-D0yyi-op.js";
5
+ import { A } from "./abstract-calendar-s67Qu3Nt.js";
6
+ import "./pills-B66qz_KX.js";
7
7
  import "@golemui/gui-shared";
8
8
  var E = Object.defineProperty, P = Object.getOwnPropertyDescriptor, u = (e, i, s, n) => {
9
9
  for (var a = n > 1 ? void 0 : n ? P(i, s) : i, t = e.length - 1, r; t >= 0; t--)
@@ -29,9 +29,7 @@ let c = class extends A {
29
29
  })
30
30
  );
31
31
  }, this.onPillClickEvent = (e) => {
32
- const s = this.getSortedPills().find(
33
- (n) => `${n.start}-${n.end ?? n.start}` === e.detail.key
34
- );
32
+ const s = this.getSortedPills().find((n) => `${n.start}-${n.end ?? n.start}` === e.detail.key);
35
33
  s && this.navigateToDate(s.start);
36
34
  };
37
35
  }
@@ -1,6 +1,6 @@
1
1
  import { InputWidgetAdapter as d, formContext as o, inputContext as h } from "@golemui/lit";
2
2
  import "@golemui/gui-shared";
3
- import "./range-calendar-CZGBBOzO.js";
3
+ import "./range-calendar-DUoIqmOA.js";
4
4
  import { consume as m, provide as u } from "@lit/context";
5
5
  import { LitElement as c, html as b } from "lit";
6
6
  import { property as D, customElement as $ } from "lit/decorators.js";
@@ -6,7 +6,7 @@ import { classMap as _ } from "lit/directives/class-map.js";
6
6
  import { live as $ } from "lit/directives/live.js";
7
7
  import { G as I, b as A, c as w } from "./templates-Dk1jxLwS.js";
8
8
  import { t as m, m as P } from "./date-CG1562vW.js";
9
- import "./pills-D0yyi-op.js";
9
+ import "./pills-B66qz_KX.js";
10
10
  import { styleMap as E } from "lit-html/directives/style-map.js";
11
11
  var S = Object.defineProperty, M = Object.getOwnPropertyDescriptor, d = (t, e, s, a) => {
12
12
  for (var r = a > 1 ? void 0 : a ? M(e, s) : e, i = t.length - 1, l; i >= 0; i--)
@@ -48,9 +48,7 @@ let o = class extends v {
48
48
  )?.focus();
49
49
  });
50
50
  }, this.onPillClickEvent = (t) => {
51
- const s = this.getSortedPills().find(
52
- (a) => `${a.start}-${a.end ?? a.start}` === t.detail.key
53
- );
51
+ const s = this.getSortedPills().find((a) => `${a.start}-${a.end ?? a.start}` === t.detail.key);
54
52
  s && this.onPillClick(s);
55
53
  };
56
54
  }
@@ -1,6 +1,6 @@
1
1
  import { InputWidgetAdapter as n, formContext as o, inputContext as u } from "@golemui/lit";
2
2
  import "@golemui/gui-shared";
3
- import "./range-date-input-CcPYH7P3.js";
3
+ import "./range-date-input-CoFG7Qem.js";
4
4
  import { consume as h, provide as m } from "@lit/context";
5
5
  import { LitElement as c, html as b } from "lit";
6
6
  import { property as D, customElement as g } from "lit/decorators.js";
@@ -1,8 +1,8 @@
1
1
  import { InputWidgetAdapter as c, formContext as u, inputContext as m } from "@golemui/lit";
2
2
  import { a as g, b as D, c as C } from "./templates-Dk1jxLwS.js";
3
3
  import "@golemui/gui-shared";
4
- import "./range-calendar-CZGBBOzO.js";
5
- import "./range-date-input-CcPYH7P3.js";
4
+ import "./range-calendar-DUoIqmOA.js";
5
+ import "./range-date-input-CoFG7Qem.js";
6
6
  import { consume as $, provide as f } from "@lit/context";
7
7
  import { LitElement as v, html as d, nothing as b } from "lit";
8
8
  import { property as w, query as p, state as h, customElement as y } from "lit/decorators.js";