@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.
- package/CHANGELOG.md +15 -0
- package/{button.element-3a7rRHbA.js → button.element-CJay43iR.js} +16 -13
- package/{calendar-BuJgwvZx.js → calendar-D31xNsxx.js} +72 -59
- package/{calendar.element-M5MPJmap.js → calendar.element-BhFrCsns.js} +22 -20
- package/{checkbox.element-CVskoXEc.js → checkbox.element-DAAVB651.js} +49 -49
- package/{currency.element-CfFrAtrr.js → currency.element-D8A2ObpM.js} +11 -10
- package/{date-Bj9mI3GU.js → date-DBuYpvcO.js} +35 -27
- package/{date-input-cJDkNnVw.js → date-input-DLiMreSS.js} +64 -44
- package/date-picker.element-DeUQtbLg.js +357 -0
- package/{date-time-calendar-BzRfkLKU.js → date-time-calendar-DzU-FtVl.js} +89 -76
- package/{date-time-calendar.element-DC4NK0y1.js → date-time-calendar.element-BLBcVsFu.js} +13 -11
- package/{date-time-input-BXxsfuyZ.js → date-time-input-DZaz2heD.js} +75 -43
- package/{date-time-picker.element-Dy-8cb-_.js → date-time-picker.element-BUbLdV6i.js} +125 -65
- package/{date-time.element-Bv4XdzMi.js → date-time.element-B5onfSBG.js} +31 -25
- package/{date.element-Consgsbb.js → date.element-BsKhLrEc.js} +22 -19
- package/{day-status-0-hJHrI7.js → day-status-CsWStVQV.js} +153 -129
- package/{dropdown.element-WsD61Qel.js → dropdown.element-CXpMwJsU.js} +19 -13
- package/{errors-QjKhr6mA.js → errors-Byb2dIhK.js} +3 -2
- package/index.js +1643 -1184
- package/index.umd.cjs +792 -399
- package/{list-CrLIL4by.js → list-D730tmGN.js} +115 -116
- package/{list.element-DV82YxnJ.js → list.element-eo3DIOrp.js} +2 -2
- package/{markdown.element-p-kC47D7.js → markdown.element-FbtwdnAv.js} +310 -218
- package/{number.element-CBr47IiY.js → number.element-BEpOCzXy.js} +76 -61
- package/package.json +6 -6
- package/{part-templates-Db871PS3.js → part-templates-VORbpgs2.js} +132 -118
- package/{password.element-n-R9RbkB.js → password.element-CBaB8h5b.js} +19 -17
- package/{pill-ranges-DCqDmpkk.js → pill-ranges-DpvWwP-3.js} +12 -12
- package/{pills-Be1UrLgq.js → pills-BDMO2NiR.js} +80 -58
- package/popup.controller-B33OvX_y.js +86 -0
- package/{radiogroup.element-CeQn623u.js → radiogroup.element-KWzBx8mx.js} +55 -51
- package/{range-calendar-CKPYeSGt.js → range-calendar-DO_woqcF.js} +101 -87
- package/{range-calendar.element-D6KYq18B.js → range-calendar.element-DHLZhpnj.js} +15 -13
- package/{range-date-input-D--AqBMv.js → range-date-input-Br7XqQPK.js} +90 -71
- package/{range-date-input.element-D4nIXJbw.js → range-date-input.element-BdD4SlB4.js} +15 -12
- package/{range-date-picker.element-dhxPAAE6.js → range-date-picker.element-DWRHiAoC.js} +97 -49
- package/{range-date-time-calendar-yksWrR7b.js → range-date-time-calendar-B3EMgN1E.js} +150 -136
- package/{range-date-time-calendar.element-C00aDefZ.js → range-date-time-calendar.element-Coea6RF4.js} +9 -7
- package/{range-date-time-input-B37TUoM3.js → range-date-time-input-Cu-T_nuC.js} +125 -94
- package/{range-date-time-input.element-DUnbv4ed.js → range-date-time-input.element-Cti44iuW.js} +31 -25
- package/{range-date-time-picker.element-Cbps6s_G.js → range-date-time-picker.element-CDN2RL1y.js} +107 -47
- package/{range-time-input-3lhqR1Ku.js → range-time-input-BP9ZL9O8.js} +85 -66
- package/{range-time-input.element-dU2iBdmJ.js → range-time-input.element-B7wtHJoQ.js} +14 -11
- package/{range-time-picker.element-v6nQsIPw.js → range-time-picker.element-CPIAiQPC.js} +92 -51
- package/{repeater.element-CtNgB4F5.js → repeater.element-BM1Keckd.js} +1 -1
- package/{select.element-C0V-Bv3L.js → select.element-eepcXTpL.js} +84 -78
- package/{tabs.element-BvAyI71N.js → tabs.element-CvcIA8P3.js} +1 -0
- package/{tags.element-DvwEpxpK.js → tags.element-CPHgotb0.js} +21 -14
- package/templates-Dmr34nwp.js +88 -0
- package/{textarea.element-HThYqdR_.js → textarea.element-CiNEy9uq.js} +8 -7
- package/{textinput.element-CkXNzMUg.js → textinput.element-AL2Nr768.js} +10 -9
- package/{time-input-BOhlBGJZ.js → time-input-5dkSm8UW.js} +67 -47
- package/{time-list-Czo48bZm.js → time-list-DLcq8BAp.js} +1 -1
- package/{time-picker-bFJ63ky8.js → time-picker-g337F8d0.js} +89 -51
- package/{time-picker.element-CYZVXgRS.js → time-picker.element-DLihegjg.js} +23 -19
- package/{time.element-fK3oLi49.js → time.element-BneqgMlQ.js} +22 -19
- package/{toggle.element-C1kCw5H8.js → toggle.element-Cz91CRdp.js} +44 -43
- package/date-picker.element-va_-LGZD.js +0 -312
- package/popup.controller-eUDxE6jD.js +0 -71
- package/templates-Dk1jxLwS.js +0 -75
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
## 1.1.0 (2026-07-21)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- `$fn` host functions for reactive expressions ([#227](https://github.com/golemui/golemui/pull/227))
|
|
6
|
+
- range time and range date time inputs ([#225](https://github.com/golemui/golemui/pull/225))
|
|
7
|
+
- add time and date-time inputs and input error localizable messages ([#220](https://github.com/golemui/golemui/pull/220))
|
|
8
|
+
- add date time input ([#218](https://github.com/golemui/golemui/pull/218))
|
|
9
|
+
- add time input ([#217](https://github.com/golemui/golemui/pull/217))
|
|
10
|
+
|
|
11
|
+
### ❤️ Thank You
|
|
12
|
+
|
|
13
|
+
- Mud Scientist @mudscientist
|
|
14
|
+
- Raúl Jiménez @Elecash
|
|
15
|
+
|
|
1
16
|
## 1.0.3 (2026-07-02)
|
|
2
17
|
|
|
3
18
|
### 🩹 Fixes
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ActionWidgetAdapter as f, formContext as g, actionContext as v } from "@golemui/lit";
|
|
2
2
|
import { consume as y, provide as $ } from "@lit/context";
|
|
3
|
-
import { LitElement as b, html as
|
|
3
|
+
import { LitElement as b, html as c, nothing as u } from "lit";
|
|
4
4
|
import { property as s, customElement as m } from "lit/decorators.js";
|
|
5
5
|
import "rxjs";
|
|
6
6
|
import { classMap as P } from "lit/directives/class-map.js";
|
|
7
|
-
var C = Object.defineProperty,
|
|
8
|
-
for (var e = o > 1 ? void 0 : o ?
|
|
7
|
+
var C = Object.defineProperty, D = Object.getOwnPropertyDescriptor, r = (i, t, n, o) => {
|
|
8
|
+
for (var e = o > 1 ? void 0 : o ? D(t, n) : t, p = i.length - 1, l; p >= 0; p--)
|
|
9
9
|
(l = i[p]) && (e = (o ? l(t, n, e) : l(e)) || e);
|
|
10
10
|
return o && e && C(t, n, e), e;
|
|
11
11
|
};
|
|
@@ -26,20 +26,23 @@ let a = class extends b {
|
|
|
26
26
|
"gui-button--outlined": this.variant === "outlined",
|
|
27
27
|
"gui-button--link": this.variant === "link",
|
|
28
28
|
"gui-button--invalid": this.invalid && this.actionType === "submit"
|
|
29
|
-
}, o = i ?
|
|
30
|
-
|
|
29
|
+
}, o = i ? c`<span
|
|
30
|
+
class="gui-widget-icon gui-button-icon ${i}"
|
|
31
|
+
data-icon=${i}
|
|
32
|
+
aria-hidden="true"
|
|
33
|
+
></span>` : u;
|
|
34
|
+
return c`
|
|
31
35
|
<div class="gui-widget">
|
|
32
36
|
<button
|
|
33
37
|
type=${this.actionType ?? "button"}
|
|
34
|
-
tabindex="0"
|
|
35
38
|
id=${this.uid}
|
|
36
39
|
class=${P(n)}
|
|
37
40
|
data-cy=${`${this.uid}_button`}
|
|
38
41
|
?disabled=${this.disabled}
|
|
39
42
|
>
|
|
40
|
-
${t === "left" ? o :
|
|
41
|
-
${this.label ?
|
|
42
|
-
${t === "right" ? o :
|
|
43
|
+
${t === "left" ? o : u}
|
|
44
|
+
${this.label ? c`<span>${this.label}</span>` : u}
|
|
45
|
+
${t === "right" ? o : u}
|
|
43
46
|
</button>
|
|
44
47
|
</div>
|
|
45
48
|
`;
|
|
@@ -73,10 +76,10 @@ a = r([
|
|
|
73
76
|
m("gui-button")
|
|
74
77
|
], a);
|
|
75
78
|
typeof customElements < "u" && !customElements.get("gui-button") && customElements.define("gui-button", a);
|
|
76
|
-
var
|
|
77
|
-
for (var e = o > 1 ? void 0 : o ?
|
|
79
|
+
var _ = Object.defineProperty, x = Object.getOwnPropertyDescriptor, h = (i, t, n, o) => {
|
|
80
|
+
for (var e = o > 1 ? void 0 : o ? x(t, n) : t, p = i.length - 1, l; p >= 0; p--)
|
|
78
81
|
(l = i[p]) && (e = (o ? l(t, n, e) : l(e)) || e);
|
|
79
|
-
return o && e &&
|
|
82
|
+
return o && e && _(t, n, e), e;
|
|
80
83
|
};
|
|
81
84
|
let d = class extends b {
|
|
82
85
|
constructor() {
|
|
@@ -96,7 +99,7 @@ let d = class extends b {
|
|
|
96
99
|
);
|
|
97
100
|
}
|
|
98
101
|
render() {
|
|
99
|
-
return
|
|
102
|
+
return c`
|
|
100
103
|
<gui-button
|
|
101
104
|
.uid=${this.widget.uid}
|
|
102
105
|
.actionType=${this.adapter.templateData.actionType ?? "button"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { LitElement as
|
|
2
|
-
import { property as
|
|
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
3
|
import { classMap as v } from "lit/directives/class-map.js";
|
|
4
|
-
import { G as m } from "./templates-
|
|
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-
|
|
6
|
-
import { G as
|
|
7
|
-
import { p as
|
|
8
|
-
var
|
|
9
|
-
for (var s =
|
|
10
|
-
(h = e[l]) && (s = (
|
|
11
|
-
return
|
|
4
|
+
import { G as m } from "./templates-Dmr34nwp.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-CsWStVQV.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
12
|
};
|
|
13
|
-
let r = class extends
|
|
13
|
+
let r = class extends p {
|
|
14
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.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, {
|
|
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
16
|
getMinDate: () => this.minDate,
|
|
17
17
|
getMaxDate: () => this.maxDate,
|
|
18
18
|
getNumberOfMonths: () => this.numberOfMonths,
|
|
@@ -27,7 +27,8 @@ let r = class extends u {
|
|
|
27
27
|
errors: this.errors,
|
|
28
28
|
readonly: this.readOnly,
|
|
29
29
|
disabled: this.disabled,
|
|
30
|
-
touched: this.touched
|
|
30
|
+
touched: this.touched,
|
|
31
|
+
required: this.required
|
|
31
32
|
}
|
|
32
33
|
})
|
|
33
34
|
}), this._keyboard = new D(this, {
|
|
@@ -35,24 +36,22 @@ let r = class extends u {
|
|
|
35
36
|
canGoNext: () => this._nav.canGoNext(),
|
|
36
37
|
goPrev: () => this._nav.prevMonth(),
|
|
37
38
|
goNext: () => this._nav.nextMonth(),
|
|
38
|
-
// Enter/Space can only fire on a focused (hence enabled, in-month) day
|
|
39
|
-
// button; the `disabled`/`readOnly` host guards stay inside `selectDate`.
|
|
40
39
|
onActivateDay: (e) => {
|
|
41
|
-
const t =
|
|
40
|
+
const t = c(e);
|
|
42
41
|
this.selectDate({
|
|
43
42
|
date: t,
|
|
44
|
-
dayLabel:
|
|
43
|
+
dayLabel: O(this.localeId, t),
|
|
45
44
|
isCurrentMonth: !0,
|
|
46
|
-
isToday:
|
|
45
|
+
isToday: L(t),
|
|
47
46
|
isSelected: !1,
|
|
48
47
|
isFocusable: !0,
|
|
49
|
-
isDisabled:
|
|
48
|
+
isDisabled: this.isDisabled(t)
|
|
50
49
|
});
|
|
51
50
|
},
|
|
52
51
|
onSelectYear: (e) => this._nav.selectYear(e),
|
|
53
52
|
onCloseYearGrid: () => this._nav.closeYearSelector(),
|
|
54
53
|
isYearGridOpen: () => this._nav.yearSelectorOpen
|
|
55
|
-
}), this._focusLeave = new
|
|
54
|
+
}), this._focusLeave = new I(this, {
|
|
56
55
|
onLeave: () => {
|
|
57
56
|
this.dispatchEvent(new CustomEvent("blur", { bubbles: !0, composed: !0 }));
|
|
58
57
|
}
|
|
@@ -72,7 +71,7 @@ let r = class extends u {
|
|
|
72
71
|
super.connectedCallback(), this.classList.add("gui-field");
|
|
73
72
|
}
|
|
74
73
|
willUpdate(e) {
|
|
75
|
-
e.has("value") && this.value && this._nav.navigateToDate(
|
|
74
|
+
e.has("value") && this.value && this._nav.navigateToDate(c(this.value));
|
|
76
75
|
}
|
|
77
76
|
render() {
|
|
78
77
|
return M({
|
|
@@ -84,6 +83,8 @@ let r = class extends u {
|
|
|
84
83
|
required: this.required,
|
|
85
84
|
disabled: this.disabled,
|
|
86
85
|
numberOfMonths: this.numberOfMonths,
|
|
86
|
+
localeId: this.localeId,
|
|
87
|
+
currentDate: this._nav.currentDate,
|
|
87
88
|
prevMonthIcon: this.prevMonthIcon,
|
|
88
89
|
nextMonthIcon: this.nextMonthIcon,
|
|
89
90
|
prevMonthAriaLabel: this.prevMonthAriaLabel,
|
|
@@ -93,13 +94,14 @@ let r = class extends u {
|
|
|
93
94
|
onPrevMonthClick: this._keyboard.onPrevMonthClick,
|
|
94
95
|
onNextMonthClick: this._keyboard.onNextMonthClick,
|
|
95
96
|
onFocusOut: this._focusLeave.onFocusOut,
|
|
96
|
-
renderAboveCalendar: () =>
|
|
97
|
+
renderAboveCalendar: () => d,
|
|
97
98
|
renderMonthPanel: (e) => f({
|
|
98
99
|
currentDate: this._nav.currentDate,
|
|
99
100
|
offset: e,
|
|
100
101
|
localeId: this.localeId,
|
|
101
102
|
monthFormat: this.monthFormat,
|
|
102
103
|
yearSelectorOpen: this._nav.yearSelectorOpen,
|
|
104
|
+
selectYearAriaLabel: this.selectYearAriaLabel,
|
|
103
105
|
onToggleYearSelector: () => this._nav.toggleYearSelector(),
|
|
104
106
|
renderPanelBody: (t) => this.renderPanelBody(t)
|
|
105
107
|
})
|
|
@@ -119,6 +121,8 @@ let r = class extends u {
|
|
|
119
121
|
onSelectYear: (t) => this._keyboard.selectYear(t),
|
|
120
122
|
onYearKeydown: this._keyboard.handleYearKeydown,
|
|
121
123
|
localeId: this.localeId,
|
|
124
|
+
currentDate: this._nav.currentDate,
|
|
125
|
+
yearGridAriaLabel: this.yearGridAriaLabel,
|
|
122
126
|
getDays: (t) => this.getDaysInMonth(t),
|
|
123
127
|
renderDay: (t) => this.renderDay(t)
|
|
124
128
|
});
|
|
@@ -131,16 +135,19 @@ let r = class extends u {
|
|
|
131
135
|
disabled: e.isDisabled,
|
|
132
136
|
"other-month": !e.isCurrentMonth
|
|
133
137
|
};
|
|
134
|
-
return
|
|
138
|
+
return y`
|
|
135
139
|
<button
|
|
136
140
|
type="button"
|
|
137
141
|
role="gridcell"
|
|
138
142
|
class=${v(t)}
|
|
139
143
|
tabindex=${e.isFocusable ? 0 : -1}
|
|
140
|
-
?disabled=${!e.isCurrentMonth
|
|
141
|
-
|
|
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)}
|
|
142
149
|
@click=${() => this.selectDate(e)}
|
|
143
|
-
@keydown=${(
|
|
150
|
+
@keydown=${(o) => this._keyboard.handleDayKeydown(o)}
|
|
144
151
|
aria-selected=${e.isSelected}
|
|
145
152
|
>
|
|
146
153
|
${e.dayLabel}
|
|
@@ -154,25 +161,25 @@ let r = class extends u {
|
|
|
154
161
|
offset: e,
|
|
155
162
|
localeId: this.localeId,
|
|
156
163
|
numberOfMonths: this.numberOfMonths ?? 1,
|
|
157
|
-
isDisabled: (
|
|
158
|
-
toDay: (
|
|
159
|
-
const
|
|
164
|
+
isDisabled: (o) => this.isDisabled(o),
|
|
165
|
+
toDay: (o) => {
|
|
166
|
+
const n = C(o.date, { selectedISO: t }).isSelected;
|
|
160
167
|
return {
|
|
161
|
-
date:
|
|
162
|
-
dayLabel:
|
|
163
|
-
isCurrentMonth:
|
|
164
|
-
isToday:
|
|
165
|
-
isDisabled:
|
|
166
|
-
isSelected:
|
|
167
|
-
isFocusable: (
|
|
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
|
|
168
175
|
};
|
|
169
176
|
},
|
|
170
|
-
focusFallbackDates: [t ?
|
|
177
|
+
focusFallbackDates: [t ? c(t) : /* @__PURE__ */ new Date()]
|
|
171
178
|
});
|
|
172
179
|
}
|
|
173
180
|
selectDate(e) {
|
|
174
181
|
if (!e.isCurrentMonth || e.isDisabled || this.disabled || this.readOnly) return;
|
|
175
|
-
const t =
|
|
182
|
+
const t = u(e.date);
|
|
176
183
|
this.value = t, this.dispatchEvent(
|
|
177
184
|
new CustomEvent("change", {
|
|
178
185
|
detail: { value: t },
|
|
@@ -186,67 +193,73 @@ let r = class extends u {
|
|
|
186
193
|
}
|
|
187
194
|
};
|
|
188
195
|
a([
|
|
189
|
-
|
|
196
|
+
i({ type: String })
|
|
190
197
|
], r.prototype, "uid", 2);
|
|
191
198
|
a([
|
|
192
|
-
|
|
199
|
+
i({ type: String })
|
|
193
200
|
], r.prototype, "label", 2);
|
|
194
201
|
a([
|
|
195
|
-
|
|
202
|
+
i({ type: String })
|
|
196
203
|
], r.prototype, "hint", 2);
|
|
197
204
|
a([
|
|
198
|
-
|
|
205
|
+
i({ type: String, attribute: "locale-id" })
|
|
199
206
|
], r.prototype, "localeId", 2);
|
|
200
207
|
a([
|
|
201
|
-
|
|
208
|
+
i({ type: Array })
|
|
202
209
|
], r.prototype, "errors", 2);
|
|
203
210
|
a([
|
|
204
|
-
|
|
211
|
+
i({ type: Boolean })
|
|
205
212
|
], r.prototype, "touched", 2);
|
|
206
213
|
a([
|
|
207
|
-
|
|
214
|
+
i({ type: Boolean })
|
|
208
215
|
], r.prototype, "required", 2);
|
|
209
216
|
a([
|
|
210
|
-
|
|
217
|
+
i({ type: Boolean })
|
|
211
218
|
], r.prototype, "disabled", 2);
|
|
212
219
|
a([
|
|
213
|
-
|
|
220
|
+
i({ type: Boolean, attribute: "readonly" })
|
|
214
221
|
], r.prototype, "readOnly", 2);
|
|
215
222
|
a([
|
|
216
|
-
|
|
223
|
+
i({ type: String, attribute: "prev-month-icon" })
|
|
217
224
|
], r.prototype, "prevMonthIcon", 2);
|
|
218
225
|
a([
|
|
219
|
-
|
|
226
|
+
i({ type: String, attribute: "next-month-icon" })
|
|
220
227
|
], r.prototype, "nextMonthIcon", 2);
|
|
221
228
|
a([
|
|
222
|
-
|
|
229
|
+
i({ type: String, attribute: "prev-month-aria-label" })
|
|
223
230
|
], r.prototype, "prevMonthAriaLabel", 2);
|
|
224
231
|
a([
|
|
225
|
-
|
|
232
|
+
i({ type: String, attribute: "next-month-aria-label" })
|
|
226
233
|
], r.prototype, "nextMonthAriaLabel", 2);
|
|
227
234
|
a([
|
|
228
|
-
|
|
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 })
|
|
229
242
|
], r.prototype, "dayFormat", 2);
|
|
230
243
|
a([
|
|
231
|
-
|
|
244
|
+
i({ type: String })
|
|
232
245
|
], r.prototype, "weekdayFormat", 2);
|
|
233
246
|
a([
|
|
234
|
-
|
|
247
|
+
i({ type: String })
|
|
235
248
|
], r.prototype, "monthFormat", 2);
|
|
236
249
|
a([
|
|
237
|
-
|
|
250
|
+
i({ type: String })
|
|
238
251
|
], r.prototype, "minDate", 2);
|
|
239
252
|
a([
|
|
240
|
-
|
|
253
|
+
i({ type: String })
|
|
241
254
|
], r.prototype, "maxDate", 2);
|
|
242
255
|
a([
|
|
243
|
-
|
|
256
|
+
i({ type: Array })
|
|
244
257
|
], r.prototype, "disabledRanges", 2);
|
|
245
258
|
a([
|
|
246
|
-
|
|
259
|
+
i({ type: Number })
|
|
247
260
|
], r.prototype, "numberOfMonths", 2);
|
|
248
261
|
a([
|
|
249
|
-
|
|
262
|
+
i({ type: String })
|
|
250
263
|
], r.prototype, "value", 2);
|
|
251
264
|
r = a([
|
|
252
265
|
b("gui-calendar")
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { InputWidgetAdapter as
|
|
2
|
-
import "./calendar-
|
|
1
|
+
import { InputWidgetAdapter as n, formContext as o, inputContext as h } from "@golemui/lit";
|
|
2
|
+
import "./calendar-D31xNsxx.js";
|
|
3
3
|
import { consume as m, provide as u } from "@lit/context";
|
|
4
|
-
import { LitElement as c, html as
|
|
5
|
-
import { property as
|
|
4
|
+
import { LitElement as c, html as b } from "lit";
|
|
5
|
+
import { property as D, customElement as $ } from "lit/decorators.js";
|
|
6
6
|
import "rxjs";
|
|
7
|
-
var f = Object.defineProperty, g = Object.getOwnPropertyDescriptor,
|
|
8
|
-
for (var a = r > 1 ? void 0 : r ? g(t,
|
|
9
|
-
(
|
|
10
|
-
return r && a && f(t,
|
|
7
|
+
var f = Object.defineProperty, g = Object.getOwnPropertyDescriptor, l = (e, t, s, r) => {
|
|
8
|
+
for (var a = r > 1 ? void 0 : r ? g(t, s) : t, p = e.length - 1, d; p >= 0; p--)
|
|
9
|
+
(d = e[p]) && (a = (r ? d(t, s, a) : d(a)) || a);
|
|
10
|
+
return r && a && f(t, s, a), a;
|
|
11
11
|
};
|
|
12
|
-
let
|
|
12
|
+
let i = class extends c {
|
|
13
13
|
constructor() {
|
|
14
|
-
super(...arguments), this.adapter = new
|
|
14
|
+
super(...arguments), this.adapter = new n(), this.subscriptions = [];
|
|
15
15
|
}
|
|
16
16
|
createRenderRoot() {
|
|
17
17
|
return this;
|
|
@@ -27,7 +27,7 @@ let s = class extends c {
|
|
|
27
27
|
);
|
|
28
28
|
}
|
|
29
29
|
render() {
|
|
30
|
-
return super.render(),
|
|
30
|
+
return super.render(), b`
|
|
31
31
|
<gui-calendar
|
|
32
32
|
.uid=${this.widget.uid}
|
|
33
33
|
.label=${this.adapter.templateData.label}
|
|
@@ -42,6 +42,8 @@ let s = class extends c {
|
|
|
42
42
|
.nextMonthIcon=${this.adapter.templateData.nextMonthIcon}
|
|
43
43
|
.prevMonthAriaLabel=${this.adapter.templateData.prevMonthAriaLabel}
|
|
44
44
|
.nextMonthAriaLabel=${this.adapter.templateData.nextMonthAriaLabel}
|
|
45
|
+
.selectYearAriaLabel=${this.adapter.templateData.selectYearAriaLabel}
|
|
46
|
+
.yearGridAriaLabel=${this.adapter.templateData.yearGridAriaLabel}
|
|
45
47
|
.dayFormat=${this.adapter.templateData.dayFormat}
|
|
46
48
|
.weekdayFormat=${this.adapter.templateData.weekdayFormat}
|
|
47
49
|
.monthFormat=${this.adapter.templateData.monthFormat}
|
|
@@ -63,16 +65,16 @@ let s = class extends c {
|
|
|
63
65
|
super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((e) => e.unsubscribe());
|
|
64
66
|
}
|
|
65
67
|
};
|
|
66
|
-
|
|
67
|
-
m({ context:
|
|
68
|
-
|
|
69
|
-
],
|
|
70
|
-
|
|
68
|
+
l([
|
|
69
|
+
m({ context: o }),
|
|
70
|
+
D({ attribute: !1 })
|
|
71
|
+
], i.prototype, "formContext", 2);
|
|
72
|
+
l([
|
|
71
73
|
u({ context: h })
|
|
72
|
-
],
|
|
73
|
-
|
|
74
|
+
], i.prototype, "adapter", 2);
|
|
75
|
+
i = l([
|
|
74
76
|
$("gui-calendar-input")
|
|
75
|
-
],
|
|
77
|
+
], i);
|
|
76
78
|
export {
|
|
77
|
-
|
|
79
|
+
i as CalendarElement
|
|
78
80
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { InputWidgetAdapter as g, formContext as m, inputContext as y } from "@golemui/lit";
|
|
2
|
-
import { G as v,
|
|
3
|
-
import { LitElement as
|
|
4
|
-
import { property as
|
|
5
|
-
import { consume as
|
|
2
|
+
import { G as v, r as f, c as $ } from "./templates-Dmr34nwp.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
6
|
import "rxjs";
|
|
7
|
-
var
|
|
8
|
-
for (var i = o > 1 ? void 0 : o ?
|
|
9
|
-
(h = e[
|
|
10
|
-
return o && i &&
|
|
7
|
+
var _ = Object.defineProperty, D = Object.getOwnPropertyDescriptor, s = (e, t, d, o) => {
|
|
8
|
+
for (var i = o > 1 ? void 0 : o ? D(t, d) : t, l = e.length - 1, h; l >= 0; l--)
|
|
9
|
+
(h = e[l]) && (i = (o ? h(t, d, i) : h(i)) || i);
|
|
10
|
+
return o && i && _(t, d, i), i;
|
|
11
11
|
};
|
|
12
|
-
let
|
|
12
|
+
let r = class extends c {
|
|
13
13
|
constructor() {
|
|
14
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
15
|
getTargets: () => this.querySelectorAll(`input[id="${this.uid}"]`),
|
|
@@ -21,7 +21,8 @@ let a = class extends u {
|
|
|
21
21
|
touched: this.touched,
|
|
22
22
|
// Checkboxes can't have aria-readonly
|
|
23
23
|
readonly: !1,
|
|
24
|
-
disabled: !1
|
|
24
|
+
disabled: !1,
|
|
25
|
+
required: this.required
|
|
25
26
|
}
|
|
26
27
|
})
|
|
27
28
|
});
|
|
@@ -56,7 +57,6 @@ let a = class extends u {
|
|
|
56
57
|
<div class="gui-widget gui-widget--horizontal">
|
|
57
58
|
<input
|
|
58
59
|
type="checkbox"
|
|
59
|
-
tabindex="0"
|
|
60
60
|
id=${this.uid}
|
|
61
61
|
data-cy=${`${this.uid}_checkbox`}
|
|
62
62
|
?checked=${this.value}
|
|
@@ -68,12 +68,12 @@ let a = class extends u {
|
|
|
68
68
|
</div>
|
|
69
69
|
|
|
70
70
|
<span class="gui-label__container">
|
|
71
|
-
${e.label
|
|
71
|
+
${e.label}${f(e.required)}
|
|
72
72
|
</span>
|
|
73
73
|
</label>
|
|
74
74
|
|
|
75
75
|
<div class="gui-widget-hint" id=${`${e.uid}_hint`}>
|
|
76
|
-
${e.hint ??
|
|
76
|
+
${e.hint ?? x} ${$(this.uid, e)}
|
|
77
77
|
</div>
|
|
78
78
|
`;
|
|
79
79
|
}
|
|
@@ -99,48 +99,48 @@ let a = class extends u {
|
|
|
99
99
|
}
|
|
100
100
|
};
|
|
101
101
|
s([
|
|
102
|
-
|
|
103
|
-
],
|
|
102
|
+
a({ type: String })
|
|
103
|
+
], r.prototype, "uid", 2);
|
|
104
104
|
s([
|
|
105
|
-
|
|
106
|
-
],
|
|
105
|
+
a({ type: String })
|
|
106
|
+
], r.prototype, "label", 2);
|
|
107
107
|
s([
|
|
108
|
-
|
|
109
|
-
],
|
|
108
|
+
a({ type: String, attribute: "locale-id" })
|
|
109
|
+
], r.prototype, "localeId", 2);
|
|
110
110
|
s([
|
|
111
|
-
|
|
112
|
-
],
|
|
111
|
+
a({ type: Array })
|
|
112
|
+
], r.prototype, "errors", 2);
|
|
113
113
|
s([
|
|
114
|
-
|
|
115
|
-
],
|
|
114
|
+
a({ type: Boolean })
|
|
115
|
+
], r.prototype, "touched", 2);
|
|
116
116
|
s([
|
|
117
|
-
|
|
118
|
-
],
|
|
117
|
+
a({ type: Boolean })
|
|
118
|
+
], r.prototype, "required", 2);
|
|
119
119
|
s([
|
|
120
|
-
|
|
121
|
-
],
|
|
120
|
+
a({ type: Boolean })
|
|
121
|
+
], r.prototype, "disabled", 2);
|
|
122
122
|
s([
|
|
123
|
-
|
|
124
|
-
],
|
|
123
|
+
a({ type: Boolean, attribute: "readonly" })
|
|
124
|
+
], r.prototype, "readOnly", 2);
|
|
125
125
|
s([
|
|
126
|
-
|
|
127
|
-
],
|
|
126
|
+
a({ type: String })
|
|
127
|
+
], r.prototype, "value", 2);
|
|
128
128
|
s([
|
|
129
|
-
|
|
130
|
-
],
|
|
129
|
+
a({ type: String })
|
|
130
|
+
], r.prototype, "hint", 2);
|
|
131
131
|
s([
|
|
132
|
-
|
|
133
|
-
],
|
|
134
|
-
|
|
132
|
+
a({ type: String })
|
|
133
|
+
], r.prototype, "checkboxPosition", 2);
|
|
134
|
+
r = s([
|
|
135
135
|
b("gui-checkbox")
|
|
136
|
-
],
|
|
137
|
-
typeof customElements < "u" && !customElements.get("gui-checkbox") && customElements.define("gui-checkbox",
|
|
138
|
-
var
|
|
139
|
-
for (var i = o > 1 ? void 0 : o ?
|
|
140
|
-
(h = e[
|
|
141
|
-
return o && i &&
|
|
136
|
+
], r);
|
|
137
|
+
typeof customElements < "u" && !customElements.get("gui-checkbox") && customElements.define("gui-checkbox", r);
|
|
138
|
+
var P = Object.defineProperty, q = Object.getOwnPropertyDescriptor, u = (e, t, d, o) => {
|
|
139
|
+
for (var i = o > 1 ? void 0 : o ? q(t, d) : t, l = e.length - 1, h; l >= 0; l--)
|
|
140
|
+
(h = e[l]) && (i = (o ? h(t, d, i) : h(i)) || i);
|
|
141
|
+
return o && i && P(t, d, i), i;
|
|
142
142
|
};
|
|
143
|
-
let n = class extends
|
|
143
|
+
let n = class extends c {
|
|
144
144
|
constructor() {
|
|
145
145
|
super(...arguments), this.adapter = new g(), this.subscriptions = [];
|
|
146
146
|
}
|
|
@@ -183,14 +183,14 @@ let n = class extends u {
|
|
|
183
183
|
super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((e) => e.unsubscribe());
|
|
184
184
|
}
|
|
185
185
|
};
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
186
|
+
u([
|
|
187
|
+
C({ context: m }),
|
|
188
|
+
a({ attribute: !1 })
|
|
189
189
|
], n.prototype, "formContext", 2);
|
|
190
|
-
|
|
191
|
-
|
|
190
|
+
u([
|
|
191
|
+
k({ context: y })
|
|
192
192
|
], n.prototype, "adapter", 2);
|
|
193
|
-
n =
|
|
193
|
+
n = u([
|
|
194
194
|
b("gui-checkbox-input")
|
|
195
195
|
], n);
|
|
196
196
|
export {
|
|
@@ -2,12 +2,12 @@ import { InputWidgetAdapter as g, formContext as b, inputContext as v } from "@g
|
|
|
2
2
|
import { LitElement as m, nothing as p, html as d } from "lit";
|
|
3
3
|
import { property as a, state as f, query as $, customElement as y } from "lit/decorators.js";
|
|
4
4
|
import { classMap as D } from "lit/directives/class-map.js";
|
|
5
|
-
import { G as C, a as x, b as F, c as w } from "./templates-
|
|
5
|
+
import { G as C, a as x, b as F, c as w } from "./templates-Dmr34nwp.js";
|
|
6
6
|
import { b as S, a as _ } from "./numeric-jmOOKz30.js";
|
|
7
7
|
import { consume as E, provide as I } from "@lit/context";
|
|
8
8
|
import "rxjs";
|
|
9
|
-
var O = Object.defineProperty,
|
|
10
|
-
for (var s = n > 1 ? void 0 : n ?
|
|
9
|
+
var O = Object.defineProperty, q = Object.getOwnPropertyDescriptor, r = (t, e, o, n) => {
|
|
10
|
+
for (var s = n > 1 ? void 0 : n ? q(e, o) : e, l = t.length - 1, u; l >= 0; l--)
|
|
11
11
|
(u = t[l]) && (s = (n ? u(e, o, s) : u(s)) || s);
|
|
12
12
|
return n && s && O(e, o, s), s;
|
|
13
13
|
};
|
|
@@ -22,7 +22,8 @@ let i = class extends m {
|
|
|
22
22
|
errors: this.errors,
|
|
23
23
|
readonly: this.readOnly,
|
|
24
24
|
disabled: this.disabled,
|
|
25
|
-
touched: this.touched
|
|
25
|
+
touched: this.touched,
|
|
26
|
+
required: this.required
|
|
26
27
|
}
|
|
27
28
|
})
|
|
28
29
|
});
|
|
@@ -72,7 +73,7 @@ let i = class extends m {
|
|
|
72
73
|
class=${D(o)}
|
|
73
74
|
step=${this.step && this.step > 0 ? this.step : p}
|
|
74
75
|
.value=${this.value ?? ""}
|
|
75
|
-
?required=${this.
|
|
76
|
+
?required=${this.required}
|
|
76
77
|
?disabled=${this.disabled}
|
|
77
78
|
?readonly=${this.readOnly}
|
|
78
79
|
placeholder=${this.placeholder || p}
|
|
@@ -83,10 +84,10 @@ let i = class extends m {
|
|
|
83
84
|
@focus=${this.handleFocus}
|
|
84
85
|
@blur=${this.handleBlur}
|
|
85
86
|
/>
|
|
86
|
-
${this.displayValue ? d`<
|
|
87
|
-
|
|
87
|
+
${this.displayValue ? d`<span
|
|
88
|
+
aria-hidden="true"
|
|
88
89
|
class="gui-currency__format-value ${this.icon ? "gui-currency__format-value--icon" : ""}"
|
|
89
|
-
>${this.displayValue}</
|
|
90
|
+
>${this.displayValue}</span
|
|
90
91
|
>` : p}
|
|
91
92
|
${e.html}
|
|
92
93
|
</div>
|
|
@@ -205,10 +206,10 @@ i = r([
|
|
|
205
206
|
y("gui-currency")
|
|
206
207
|
], i);
|
|
207
208
|
typeof customElements < "u" && !customElements.get("gui-currency") && customElements.define("gui-currency", i);
|
|
208
|
-
var
|
|
209
|
+
var N = Object.defineProperty, P = Object.getOwnPropertyDescriptor, h = (t, e, o, n) => {
|
|
209
210
|
for (var s = n > 1 ? void 0 : n ? P(e, o) : e, l = t.length - 1, u; l >= 0; l--)
|
|
210
211
|
(u = t[l]) && (s = (n ? u(e, o, s) : u(s)) || s);
|
|
211
|
-
return n && s &&
|
|
212
|
+
return n && s && N(e, o, s), s;
|
|
212
213
|
};
|
|
213
214
|
let c = class extends m {
|
|
214
215
|
constructor() {
|