@golemui/gui-lit 1.0.3 → 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 +26 -0
- package/{button.element-3a7rRHbA.js → button.element-CJay43iR.js} +16 -13
- package/calendar-D31xNsxx.js +267 -0
- package/{range-calendar.element-_1bHW_c1.js → calendar.element-BhFrCsns.js} +16 -16
- package/{checkbox.element-CVskoXEc.js → checkbox.element-DAAVB651.js} +49 -49
- package/{currency.element-5GSakkxF.js → currency.element-D8A2ObpM.js} +15 -11
- package/{date-CDUlLuYy.js → date-DBuYpvcO.js} +88 -29
- package/date-input-DLiMreSS.js +204 -0
- package/date-picker.element-DeUQtbLg.js +357 -0
- package/date-time-calendar-DzU-FtVl.js +374 -0
- package/date-time-calendar.element-BLBcVsFu.js +95 -0
- package/date-time-input-DZaz2heD.js +246 -0
- package/date-time-picker.element-BUbLdV6i.js +440 -0
- package/date-time.element-B5onfSBG.js +93 -0
- package/{date.element-BZO0UQez.js → date.element-BsKhLrEc.js} +27 -19
- package/day-status-CsWStVQV.js +554 -0
- package/{dropdown.element-CyJbVAA5.js → dropdown.element-CXpMwJsU.js} +53 -37
- package/{errors-QjKhr6mA.js → errors-Byb2dIhK.js} +3 -2
- package/focus-leave.controller-2gV0pQd5.js +73 -0
- package/index.js +1635 -948
- package/index.umd.cjs +2046 -601
- package/lib/components/date-picker.element.d.ts +0 -11
- package/lib/components/date-time-calendar.element.d.ts +18 -0
- package/lib/components/date-time-picker.element.d.ts +18 -0
- package/lib/components/date-time.element.d.ts +18 -0
- package/lib/components/dropdown.element.d.ts +2 -0
- package/lib/components/range-calendar.element.d.ts +2 -1
- package/lib/components/range-date-picker.element.d.ts +0 -15
- package/lib/components/range-date-time-calendar.element.d.ts +18 -0
- package/lib/components/range-date-time-input.element.d.ts +18 -0
- package/lib/components/range-date-time-picker.element.d.ts +18 -0
- package/lib/components/range-time-input.element.d.ts +18 -0
- package/lib/components/range-time-picker.element.d.ts +18 -0
- package/lib/components/time-picker.element.d.ts +18 -0
- package/lib/components/time.element.d.ts +18 -0
- package/list-D730tmGN.js +297 -0
- package/{list.element-Co3V3Cn5.js → list.element-eo3DIOrp.js} +23 -23
- 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-VORbpgs2.js +691 -0
- package/{password.element-n-R9RbkB.js → password.element-CBaB8h5b.js} +19 -17
- package/pill-ranges-DpvWwP-3.js +48 -0
- package/{pills-B66qz_KX.js → pills-BDMO2NiR.js} +84 -59
- package/popup.controller-B33OvX_y.js +86 -0
- package/{radiogroup.element-CeQn623u.js → radiogroup.element-KWzBx8mx.js} +55 -51
- package/range-calendar-DO_woqcF.js +466 -0
- package/{calendar.element-DcnTyvfg.js → range-calendar.element-DHLZhpnj.js} +37 -29
- package/range-commit-8-MmYUyo.js +14 -0
- package/range-date-input-Br7XqQPK.js +311 -0
- package/{range-date-input.element-BqzAF0O3.js → range-date-input.element-BdD4SlB4.js} +12 -8
- package/range-date-picker.element-DWRHiAoC.js +434 -0
- package/range-date-time-calendar-B3EMgN1E.js +734 -0
- package/range-date-time-calendar.element-Coea6RF4.js +97 -0
- package/range-date-time-input-Cu-T_nuC.js +353 -0
- package/range-date-time-input.element-Cti44iuW.js +87 -0
- package/range-date-time-picker.element-CDN2RL1y.js +472 -0
- package/range-selection-CU3hxLJE.js +25 -0
- package/range-time-input-BP9ZL9O8.js +348 -0
- package/range-time-input.element-B7wtHJoQ.js +84 -0
- package/range-time-picker.element-CPIAiQPC.js +470 -0
- package/{repeater.element-CtNgB4F5.js → repeater.element-BM1Keckd.js} +1 -1
- package/{select.element-jcDF1h-g.js → select.element-eepcXTpL.js} +117 -107
- package/{tabs.element-BvAyI71N.js → tabs.element-CvcIA8P3.js} +1 -0
- package/{tags.element-CX3vQL8L.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-5dkSm8UW.js +201 -0
- package/time-list-DLcq8BAp.js +217 -0
- package/time-picker-g337F8d0.js +299 -0
- package/time-picker.element-DLihegjg.js +89 -0
- package/time.element-BneqgMlQ.js +85 -0
- package/{toggle.element-C1kCw5H8.js → toggle.element-Cz91CRdp.js} +44 -43
- package/abstract-calendar-D0-077XJ.js +0 -545
- package/calendar-BclCC9VJ.js +0 -96
- package/date-input-DCdGWRio.js +0 -268
- package/date-picker.element-k7AJFQ5W.js +0 -168
- package/list-D1oKnH89.js +0 -283
- package/range-calendar-CBINu84w.js +0 -255
- package/range-date-input-BYXzqnr1.js +0 -395
- package/range-date-picker.element-BCBefgvY.js +0 -182
- package/templates-Dk1jxLwS.js +0 -75
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,29 @@
|
|
|
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
|
+
|
|
16
|
+
## 1.0.3 (2026-07-02)
|
|
17
|
+
|
|
18
|
+
### 🩹 Fixes
|
|
19
|
+
|
|
20
|
+
- firefox issues with date inputs, numeric inputs and dropdown ([#215](https://github.com/golemui/golemui/pull/215))
|
|
21
|
+
|
|
22
|
+
### ❤️ Thank You
|
|
23
|
+
|
|
24
|
+
- Mud Scientist @mudscientist
|
|
25
|
+
- Raúl Jiménez @Elecash
|
|
26
|
+
|
|
1
27
|
## 1.0.2 (2026-06-26)
|
|
2
28
|
|
|
3
29
|
This was a version bump only for gui-lit to align it with other projects, there were no code changes.
|
|
@@ -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"}
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
import { LitElement as p, nothing as d, html as y } from "lit";
|
|
2
|
+
import { property as i, customElement as b } from "lit/decorators.js";
|
|
3
|
+
import { classMap as v } from "lit/directives/class-map.js";
|
|
4
|
+
import { G as m } from "./templates-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
|
+
};
|
|
13
|
+
let r = class extends p {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments), this.uid = void 0, this.label = void 0, this.hint = void 0, this.localeId = void 0, this.errors = [], this.touched = void 0, this.required = !1, this.disabled = !1, this.readOnly = !1, this.prevMonthIcon = "", this.nextMonthIcon = "", this.prevMonthAriaLabel = "", this.nextMonthAriaLabel = "", this.selectYearAriaLabel = void 0, this.yearGridAriaLabel = void 0, this.dayFormat = "numeric", this.weekdayFormat = "narrow", this.monthFormat = "long", this.minDate = void 0, this.maxDate = void 0, this.disabledRanges = void 0, this.numberOfMonths = 1, this.value = void 0, this._nav = new g(this, {
|
|
16
|
+
getMinDate: () => this.minDate,
|
|
17
|
+
getMaxDate: () => this.maxDate,
|
|
18
|
+
getNumberOfMonths: () => this.numberOfMonths,
|
|
19
|
+
getDisabledRanges: () => this.disabledRanges,
|
|
20
|
+
onYearSelectorToggled: () => this._keyboard.onYearGridToggled()
|
|
21
|
+
}), this.ariaController = new m(this, {
|
|
22
|
+
getTargets: () => this.querySelectorAll(".gui-calendar-input"),
|
|
23
|
+
getState: () => ({
|
|
24
|
+
uid: this.uid,
|
|
25
|
+
templateData: {
|
|
26
|
+
hint: this.hint,
|
|
27
|
+
errors: this.errors,
|
|
28
|
+
readonly: this.readOnly,
|
|
29
|
+
disabled: this.disabled,
|
|
30
|
+
touched: this.touched,
|
|
31
|
+
required: this.required
|
|
32
|
+
}
|
|
33
|
+
})
|
|
34
|
+
}), this._keyboard = new D(this, {
|
|
35
|
+
canGoPrev: () => this._nav.canGoPrev(),
|
|
36
|
+
canGoNext: () => this._nav.canGoNext(),
|
|
37
|
+
goPrev: () => this._nav.prevMonth(),
|
|
38
|
+
goNext: () => this._nav.nextMonth(),
|
|
39
|
+
onActivateDay: (e) => {
|
|
40
|
+
const t = c(e);
|
|
41
|
+
this.selectDate({
|
|
42
|
+
date: t,
|
|
43
|
+
dayLabel: O(this.localeId, t),
|
|
44
|
+
isCurrentMonth: !0,
|
|
45
|
+
isToday: L(t),
|
|
46
|
+
isSelected: !1,
|
|
47
|
+
isFocusable: !0,
|
|
48
|
+
isDisabled: this.isDisabled(t)
|
|
49
|
+
});
|
|
50
|
+
},
|
|
51
|
+
onSelectYear: (e) => this._nav.selectYear(e),
|
|
52
|
+
onCloseYearGrid: () => this._nav.closeYearSelector(),
|
|
53
|
+
isYearGridOpen: () => this._nav.yearSelectorOpen
|
|
54
|
+
}), this._focusLeave = new I(this, {
|
|
55
|
+
onLeave: () => {
|
|
56
|
+
this.dispatchEvent(new CustomEvent("blur", { bubbles: !0, composed: !0 }));
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
/** The nav controller's month cursor, kept under its historical name. */
|
|
61
|
+
get _currentDate() {
|
|
62
|
+
return this._nav.currentDate;
|
|
63
|
+
}
|
|
64
|
+
set _currentDate(e) {
|
|
65
|
+
this._nav.currentDate = e;
|
|
66
|
+
}
|
|
67
|
+
createRenderRoot() {
|
|
68
|
+
return this;
|
|
69
|
+
}
|
|
70
|
+
connectedCallback() {
|
|
71
|
+
super.connectedCallback(), this.classList.add("gui-field");
|
|
72
|
+
}
|
|
73
|
+
willUpdate(e) {
|
|
74
|
+
e.has("value") && this.value && this._nav.navigateToDate(c(this.value));
|
|
75
|
+
}
|
|
76
|
+
render() {
|
|
77
|
+
return M({
|
|
78
|
+
uid: this.uid,
|
|
79
|
+
label: this.label,
|
|
80
|
+
hint: this.hint,
|
|
81
|
+
errors: this.errors,
|
|
82
|
+
touched: this.touched,
|
|
83
|
+
required: this.required,
|
|
84
|
+
disabled: this.disabled,
|
|
85
|
+
numberOfMonths: this.numberOfMonths,
|
|
86
|
+
localeId: this.localeId,
|
|
87
|
+
currentDate: this._nav.currentDate,
|
|
88
|
+
prevMonthIcon: this.prevMonthIcon,
|
|
89
|
+
nextMonthIcon: this.nextMonthIcon,
|
|
90
|
+
prevMonthAriaLabel: this.prevMonthAriaLabel,
|
|
91
|
+
nextMonthAriaLabel: this.nextMonthAriaLabel,
|
|
92
|
+
canGoPrev: this._nav.canGoPrev(),
|
|
93
|
+
canGoNext: this._nav.canGoNext(),
|
|
94
|
+
onPrevMonthClick: this._keyboard.onPrevMonthClick,
|
|
95
|
+
onNextMonthClick: this._keyboard.onNextMonthClick,
|
|
96
|
+
onFocusOut: this._focusLeave.onFocusOut,
|
|
97
|
+
renderAboveCalendar: () => d,
|
|
98
|
+
renderMonthPanel: (e) => f({
|
|
99
|
+
currentDate: this._nav.currentDate,
|
|
100
|
+
offset: e,
|
|
101
|
+
localeId: this.localeId,
|
|
102
|
+
monthFormat: this.monthFormat,
|
|
103
|
+
yearSelectorOpen: this._nav.yearSelectorOpen,
|
|
104
|
+
selectYearAriaLabel: this.selectYearAriaLabel,
|
|
105
|
+
onToggleYearSelector: () => this._nav.toggleYearSelector(),
|
|
106
|
+
renderPanelBody: (t) => this.renderPanelBody(t)
|
|
107
|
+
})
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* The panel content below the header: the year grid replaces the days grid
|
|
112
|
+
* of the first panel while the year selector is open. Subclasses can swap
|
|
113
|
+
* in other bodies (e.g. the date-time calendar's time grid).
|
|
114
|
+
*/
|
|
115
|
+
renderPanelBody(e) {
|
|
116
|
+
return _({
|
|
117
|
+
offset: e,
|
|
118
|
+
yearSelectorOpen: this._nav.yearSelectorOpen,
|
|
119
|
+
years: this._nav.yearList,
|
|
120
|
+
currentYear: this._nav.currentDate.getFullYear(),
|
|
121
|
+
onSelectYear: (t) => this._keyboard.selectYear(t),
|
|
122
|
+
onYearKeydown: this._keyboard.handleYearKeydown,
|
|
123
|
+
localeId: this.localeId,
|
|
124
|
+
currentDate: this._nav.currentDate,
|
|
125
|
+
yearGridAriaLabel: this.yearGridAriaLabel,
|
|
126
|
+
getDays: (t) => this.getDaysInMonth(t),
|
|
127
|
+
renderDay: (t) => this.renderDay(t)
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
renderDay(e) {
|
|
131
|
+
const t = {
|
|
132
|
+
"gui-calendar__day-button": !0,
|
|
133
|
+
today: e.isToday,
|
|
134
|
+
selected: e.isSelected,
|
|
135
|
+
disabled: e.isDisabled,
|
|
136
|
+
"other-month": !e.isCurrentMonth
|
|
137
|
+
};
|
|
138
|
+
return y`
|
|
139
|
+
<button
|
|
140
|
+
type="button"
|
|
141
|
+
role="gridcell"
|
|
142
|
+
class=${v(t)}
|
|
143
|
+
tabindex=${e.isFocusable ? 0 : -1}
|
|
144
|
+
?disabled=${!e.isCurrentMonth}
|
|
145
|
+
aria-disabled=${e.isCurrentMonth && e.isDisabled ? "true" : d}
|
|
146
|
+
aria-label=${x(this.localeId, e.date)}
|
|
147
|
+
aria-current=${e.isToday ? "date" : d}
|
|
148
|
+
data-date=${u(e.date)}
|
|
149
|
+
@click=${() => this.selectDate(e)}
|
|
150
|
+
@keydown=${(o) => this._keyboard.handleDayKeydown(o)}
|
|
151
|
+
aria-selected=${e.isSelected}
|
|
152
|
+
>
|
|
153
|
+
${e.dayLabel}
|
|
154
|
+
</button>
|
|
155
|
+
`;
|
|
156
|
+
}
|
|
157
|
+
getDaysInMonth(e) {
|
|
158
|
+
const t = this.value;
|
|
159
|
+
return S({
|
|
160
|
+
currentDate: this._currentDate,
|
|
161
|
+
offset: e,
|
|
162
|
+
localeId: this.localeId,
|
|
163
|
+
numberOfMonths: this.numberOfMonths ?? 1,
|
|
164
|
+
isDisabled: (o) => this.isDisabled(o),
|
|
165
|
+
toDay: (o) => {
|
|
166
|
+
const n = C(o.date, { selectedISO: t }).isSelected;
|
|
167
|
+
return {
|
|
168
|
+
date: o.date,
|
|
169
|
+
dayLabel: o.dayLabel,
|
|
170
|
+
isCurrentMonth: o.isCurrentMonth,
|
|
171
|
+
isToday: o.isToday,
|
|
172
|
+
isDisabled: o.isDisabled,
|
|
173
|
+
isSelected: n,
|
|
174
|
+
isFocusable: (n || o.isToday) && o.isCurrentMonth
|
|
175
|
+
};
|
|
176
|
+
},
|
|
177
|
+
focusFallbackDates: [t ? c(t) : /* @__PURE__ */ new Date()]
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
selectDate(e) {
|
|
181
|
+
if (!e.isCurrentMonth || e.isDisabled || this.disabled || this.readOnly) return;
|
|
182
|
+
const t = u(e.date);
|
|
183
|
+
this.value = t, this.dispatchEvent(
|
|
184
|
+
new CustomEvent("change", {
|
|
185
|
+
detail: { value: t },
|
|
186
|
+
bubbles: !0,
|
|
187
|
+
composed: !0
|
|
188
|
+
})
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
isDisabled(e) {
|
|
192
|
+
return this._nav.isDisabled(e);
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
a([
|
|
196
|
+
i({ type: String })
|
|
197
|
+
], r.prototype, "uid", 2);
|
|
198
|
+
a([
|
|
199
|
+
i({ type: String })
|
|
200
|
+
], r.prototype, "label", 2);
|
|
201
|
+
a([
|
|
202
|
+
i({ type: String })
|
|
203
|
+
], r.prototype, "hint", 2);
|
|
204
|
+
a([
|
|
205
|
+
i({ type: String, attribute: "locale-id" })
|
|
206
|
+
], r.prototype, "localeId", 2);
|
|
207
|
+
a([
|
|
208
|
+
i({ type: Array })
|
|
209
|
+
], r.prototype, "errors", 2);
|
|
210
|
+
a([
|
|
211
|
+
i({ type: Boolean })
|
|
212
|
+
], r.prototype, "touched", 2);
|
|
213
|
+
a([
|
|
214
|
+
i({ type: Boolean })
|
|
215
|
+
], r.prototype, "required", 2);
|
|
216
|
+
a([
|
|
217
|
+
i({ type: Boolean })
|
|
218
|
+
], r.prototype, "disabled", 2);
|
|
219
|
+
a([
|
|
220
|
+
i({ type: Boolean, attribute: "readonly" })
|
|
221
|
+
], r.prototype, "readOnly", 2);
|
|
222
|
+
a([
|
|
223
|
+
i({ type: String, attribute: "prev-month-icon" })
|
|
224
|
+
], r.prototype, "prevMonthIcon", 2);
|
|
225
|
+
a([
|
|
226
|
+
i({ type: String, attribute: "next-month-icon" })
|
|
227
|
+
], r.prototype, "nextMonthIcon", 2);
|
|
228
|
+
a([
|
|
229
|
+
i({ type: String, attribute: "prev-month-aria-label" })
|
|
230
|
+
], r.prototype, "prevMonthAriaLabel", 2);
|
|
231
|
+
a([
|
|
232
|
+
i({ type: String, attribute: "next-month-aria-label" })
|
|
233
|
+
], r.prototype, "nextMonthAriaLabel", 2);
|
|
234
|
+
a([
|
|
235
|
+
i({ type: String, attribute: "select-year-aria-label" })
|
|
236
|
+
], r.prototype, "selectYearAriaLabel", 2);
|
|
237
|
+
a([
|
|
238
|
+
i({ type: String, attribute: "year-grid-aria-label" })
|
|
239
|
+
], r.prototype, "yearGridAriaLabel", 2);
|
|
240
|
+
a([
|
|
241
|
+
i({ type: String })
|
|
242
|
+
], r.prototype, "dayFormat", 2);
|
|
243
|
+
a([
|
|
244
|
+
i({ type: String })
|
|
245
|
+
], r.prototype, "weekdayFormat", 2);
|
|
246
|
+
a([
|
|
247
|
+
i({ type: String })
|
|
248
|
+
], r.prototype, "monthFormat", 2);
|
|
249
|
+
a([
|
|
250
|
+
i({ type: String })
|
|
251
|
+
], r.prototype, "minDate", 2);
|
|
252
|
+
a([
|
|
253
|
+
i({ type: String })
|
|
254
|
+
], r.prototype, "maxDate", 2);
|
|
255
|
+
a([
|
|
256
|
+
i({ type: Array })
|
|
257
|
+
], r.prototype, "disabledRanges", 2);
|
|
258
|
+
a([
|
|
259
|
+
i({ type: Number })
|
|
260
|
+
], r.prototype, "numberOfMonths", 2);
|
|
261
|
+
a([
|
|
262
|
+
i({ type: String })
|
|
263
|
+
], r.prototype, "value", 2);
|
|
264
|
+
r = a([
|
|
265
|
+
b("gui-calendar")
|
|
266
|
+
], r);
|
|
267
|
+
typeof customElements < "u" && !customElements.get("gui-calendar") && customElements.define("gui-calendar", r);
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { InputWidgetAdapter as
|
|
2
|
-
import "./
|
|
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
4
|
import { LitElement as c, html as b } from "lit";
|
|
5
5
|
import { property as D, customElement as $ } from "lit/decorators.js";
|
|
6
6
|
import "rxjs";
|
|
7
|
-
var
|
|
8
|
-
for (var a = r > 1 ? void 0 : r ?
|
|
9
|
-
(
|
|
10
|
-
return r && a &&
|
|
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
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;
|
|
@@ -28,7 +28,7 @@ let i = class extends c {
|
|
|
28
28
|
}
|
|
29
29
|
render() {
|
|
30
30
|
return super.render(), b`
|
|
31
|
-
<gui-
|
|
31
|
+
<gui-calendar
|
|
32
32
|
.uid=${this.widget.uid}
|
|
33
33
|
.label=${this.adapter.templateData.label}
|
|
34
34
|
.hint=${this.adapter.templateData.hint}
|
|
@@ -42,6 +42,8 @@ let i = 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}
|
|
@@ -49,12 +51,10 @@ let i = class extends c {
|
|
|
49
51
|
.maxDate=${this.adapter.templateData.maxDate}
|
|
50
52
|
.disabledRanges=${this.adapter.templateData.disabledRanges}
|
|
51
53
|
.numberOfMonths=${this.adapter.templateData.numberOfMonths}
|
|
52
|
-
.hidePills=${!1}
|
|
53
|
-
.removePillAriaLabel=${this.adapter.templateData.removePillAriaLabel}
|
|
54
54
|
.localeId=${this.adapter.templateData.lang}
|
|
55
55
|
@change=${this.valueChanged}
|
|
56
56
|
@blur=${() => this.adapter.onBlur()}
|
|
57
|
-
></gui-
|
|
57
|
+
></gui-calendar>
|
|
58
58
|
`;
|
|
59
59
|
}
|
|
60
60
|
valueChanged(e) {
|
|
@@ -65,16 +65,16 @@ let i = class extends c {
|
|
|
65
65
|
super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((e) => e.unsubscribe());
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
|
-
|
|
68
|
+
l([
|
|
69
69
|
m({ context: o }),
|
|
70
70
|
D({ attribute: !1 })
|
|
71
71
|
], i.prototype, "formContext", 2);
|
|
72
|
-
|
|
72
|
+
l([
|
|
73
73
|
u({ context: h })
|
|
74
74
|
], i.prototype, "adapter", 2);
|
|
75
|
-
i =
|
|
76
|
-
$("gui-
|
|
75
|
+
i = l([
|
|
76
|
+
$("gui-calendar-input")
|
|
77
77
|
], i);
|
|
78
78
|
export {
|
|
79
|
-
i as
|
|
79
|
+
i as CalendarElement
|
|
80
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>
|
|
@@ -122,7 +123,10 @@ let i = class extends m {
|
|
|
122
123
|
formatCurrency(t) {
|
|
123
124
|
if (t === "" || t === void 0 || t === null || isNaN(t)) return "";
|
|
124
125
|
try {
|
|
125
|
-
const e = this.maximumFractionDigits ?? Math.max(this.minimumFractionDigits ?? 2, 2), o = Math.min(
|
|
126
|
+
const e = this.maximumFractionDigits ?? Math.max(this.minimumFractionDigits ?? 2, 2), o = Math.min(
|
|
127
|
+
this.minimumFractionDigits ?? 2,
|
|
128
|
+
e
|
|
129
|
+
);
|
|
126
130
|
return new Intl.NumberFormat(this.localeId ?? "en", {
|
|
127
131
|
style: "currency",
|
|
128
132
|
currency: this.currency ?? "USD",
|
|
@@ -202,10 +206,10 @@ i = r([
|
|
|
202
206
|
y("gui-currency")
|
|
203
207
|
], i);
|
|
204
208
|
typeof customElements < "u" && !customElements.get("gui-currency") && customElements.define("gui-currency", i);
|
|
205
|
-
var
|
|
209
|
+
var N = Object.defineProperty, P = Object.getOwnPropertyDescriptor, h = (t, e, o, n) => {
|
|
206
210
|
for (var s = n > 1 ? void 0 : n ? P(e, o) : e, l = t.length - 1, u; l >= 0; l--)
|
|
207
211
|
(u = t[l]) && (s = (n ? u(e, o, s) : u(s)) || s);
|
|
208
|
-
return n && s &&
|
|
212
|
+
return n && s && N(e, o, s), s;
|
|
209
213
|
};
|
|
210
214
|
let c = class extends m {
|
|
211
215
|
constructor() {
|