reke-ui 0.1.2 → 0.2.1
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/README.md +21 -0
- package/cli/install-skills.mjs +169 -0
- package/custom-elements.json +272 -28
- package/dist/__type-checks__/no-lit-in-public-types.d.ts +2 -0
- package/dist/__type-checks__/no-lit-in-public-types.d.ts.map +1 -0
- package/dist/_virtual/_@oxc-project_runtime@0.137.0/helpers/esm/decorate.js +9 -0
- package/dist/components/reke-alert/reke-alert.d.ts.map +1 -1
- package/dist/components/reke-alert/reke-alert.js +32 -40
- package/dist/components/reke-alert/reke-alert.styles.js +7 -10
- package/dist/components/reke-badge/reke-badge.js +26 -40
- package/dist/components/reke-badge/reke-badge.styles.js +7 -10
- package/dist/components/reke-button/reke-button.d.ts.map +1 -1
- package/dist/components/reke-button/reke-button.js +41 -52
- package/dist/components/reke-button/reke-button.styles.js +7 -10
- package/dist/components/reke-card/reke-card.d.ts.map +1 -1
- package/dist/components/reke-card/reke-card.js +38 -58
- package/dist/components/reke-card/reke-card.styles.js +7 -10
- package/dist/components/reke-checkbox/reke-checkbox.js +40 -47
- package/dist/components/reke-checkbox/reke-checkbox.styles.d.ts.map +1 -1
- package/dist/components/reke-checkbox/reke-checkbox.styles.js +7 -9
- package/dist/components/reke-chip/reke-chip.d.ts.map +1 -1
- package/dist/components/reke-chip/reke-chip.js +42 -50
- package/dist/components/reke-chip/reke-chip.styles.d.ts.map +1 -1
- package/dist/components/reke-chip/reke-chip.styles.js +16 -13
- package/dist/components/reke-date-range/reke-date-range.d.ts.map +1 -1
- package/dist/components/reke-date-range/reke-date-range.js +240 -260
- package/dist/components/reke-date-range/reke-date-range.styles.d.ts.map +1 -1
- package/dist/components/reke-date-range/reke-date-range.styles.js +29 -16
- package/dist/components/reke-dialog/reke-dialog.d.ts.map +1 -1
- package/dist/components/reke-dialog/reke-dialog.js +52 -65
- package/dist/components/reke-dialog/reke-dialog.styles.d.ts.map +1 -1
- package/dist/components/reke-dialog/reke-dialog.styles.js +8 -10
- package/dist/components/reke-file-upload/reke-file-upload.d.ts.map +1 -1
- package/dist/components/reke-file-upload/reke-file-upload.js +62 -86
- package/dist/components/reke-file-upload/reke-file-upload.styles.js +7 -10
- package/dist/components/reke-input/reke-input.js +42 -61
- package/dist/components/reke-input/reke-input.styles.d.ts.map +1 -1
- package/dist/components/reke-input/reke-input.styles.js +8 -10
- package/dist/components/reke-select/reke-select.d.ts.map +1 -1
- package/dist/components/reke-select/reke-select.js +66 -89
- package/dist/components/reke-select/reke-select.styles.d.ts.map +1 -1
- package/dist/components/reke-select/reke-select.styles.js +9 -11
- package/dist/components/reke-table/reke-table.d.ts +134 -23
- package/dist/components/reke-table/reke-table.d.ts.map +1 -1
- package/dist/components/reke-table/reke-table.js +242 -143
- package/dist/components/reke-table/reke-table.styles.d.ts.map +1 -1
- package/dist/components/reke-table/reke-table.styles.js +67 -9
- package/dist/components/reke-textarea/reke-textarea.js +42 -61
- package/dist/components/reke-textarea/reke-textarea.styles.js +6 -9
- package/dist/components/reke-toast/reke-toast.d.ts.map +1 -1
- package/dist/components/reke-toast/reke-toast.js +50 -68
- package/dist/components/reke-toast/reke-toast.styles.d.ts.map +1 -1
- package/dist/components/reke-toast/reke-toast.styles.js +13 -12
- package/dist/components/reke-toggle/reke-toggle.js +36 -43
- package/dist/components/reke-toggle/reke-toggle.styles.js +7 -10
- package/dist/components/reke-tooltip/reke-tooltip.js +31 -47
- package/dist/components/reke-tooltip/reke-tooltip.styles.js +6 -9
- package/dist/index.d.ts +23 -23
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -33
- package/dist/react-bridge/table.d.ts +58 -0
- package/dist/react-bridge/table.d.ts.map +1 -0
- package/dist/react-bridge/table.js +115 -0
- package/dist/react.d.ts +12 -26
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +110 -146
- package/dist/shared/base-element.js +13 -15
- package/dist/shared/tailwind-styles.js +6 -6
- package/dist/shared/tailwind.js +4 -0
- package/dist/tokens/reke-tokens.css +47 -0
- package/package.json +40 -20
- package/dist/shared/tailwind.css.js +0 -4
|
@@ -1,214 +1,234 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
1
|
+
import { RekeElement as e } from "../../shared/base-element.js";
|
|
2
|
+
import { __decorate as t } from "../../_virtual/_@oxc-project_runtime@0.137.0/helpers/esm/decorate.js";
|
|
3
|
+
import { styles as n } from "./reke-date-range.styles.js";
|
|
4
|
+
import { html as r, nothing as i } from "lit";
|
|
5
|
+
import { customElement as a, property as o, state as s } from "lit/decorators.js";
|
|
6
|
+
import { classMap as c } from "lit/directives/class-map.js";
|
|
7
|
+
//#region src/components/reke-date-range/reke-date-range.ts
|
|
8
|
+
var l = [
|
|
9
|
+
"Enero",
|
|
10
|
+
"Febrero",
|
|
11
|
+
"Marzo",
|
|
12
|
+
"Abril",
|
|
13
|
+
"Mayo",
|
|
14
|
+
"Junio",
|
|
15
|
+
"Julio",
|
|
16
|
+
"Agosto",
|
|
17
|
+
"Septiembre",
|
|
18
|
+
"Octubre",
|
|
19
|
+
"Noviembre",
|
|
20
|
+
"Diciembre"
|
|
21
|
+
], u = [
|
|
22
|
+
"Lu",
|
|
23
|
+
"Ma",
|
|
24
|
+
"Mi",
|
|
25
|
+
"Ju",
|
|
26
|
+
"Vi",
|
|
27
|
+
"Sa",
|
|
28
|
+
"Do"
|
|
29
|
+
];
|
|
30
30
|
function d(e) {
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
if (!e) return null;
|
|
32
|
+
let [t, n, r] = e.split("-").map(Number);
|
|
33
|
+
return !t || !n || !r ? null : new Date(t, n - 1, r);
|
|
33
34
|
}
|
|
34
|
-
function
|
|
35
|
-
|
|
36
|
-
return `${t}/${i}/${e.getFullYear()}`;
|
|
35
|
+
function f(e) {
|
|
36
|
+
return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
|
|
37
37
|
}
|
|
38
|
-
function p(e
|
|
39
|
-
|
|
38
|
+
function p(e) {
|
|
39
|
+
return `${String(e.getDate()).padStart(2, "0")}/${String(e.getMonth() + 1).padStart(2, "0")}/${e.getFullYear()}`;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
|
|
43
|
-
s < 0 && (s = 6);
|
|
44
|
-
const a = new Date(e, t, 1 - s), n = [];
|
|
45
|
-
for (let h = 0; h < 42; h++) {
|
|
46
|
-
const g = new Date(a.getFullYear(), a.getMonth(), a.getDate() + h);
|
|
47
|
-
n.push({ date: g, day: g.getDate(), otherMonth: g.getMonth() !== t });
|
|
48
|
-
}
|
|
49
|
-
return n;
|
|
41
|
+
function m(e, t) {
|
|
42
|
+
return e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate();
|
|
50
43
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
44
|
+
function h(e, t) {
|
|
45
|
+
let n = new Date(e, t, 1).getDay() - 1;
|
|
46
|
+
n < 0 && (n = 6);
|
|
47
|
+
let r = new Date(e, t, 1 - n), i = [];
|
|
48
|
+
for (let e = 0; e < 42; e++) {
|
|
49
|
+
let n = new Date(r.getFullYear(), r.getMonth(), r.getDate() + e);
|
|
50
|
+
i.push({
|
|
51
|
+
date: n,
|
|
52
|
+
day: n.getDate(),
|
|
53
|
+
otherMonth: n.getMonth() !== t
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
return i;
|
|
57
|
+
}
|
|
58
|
+
var g = class extends e {
|
|
59
|
+
constructor(...e) {
|
|
60
|
+
super(...e), this.mode = "range", this.value = "", this.from = "", this.to = "", this.label = "", this.placeholder = "", this.min = "", this.max = "", this.disabled = !1, this.error = !1, this._open = !1, this._viewYear = (/* @__PURE__ */ new Date()).getFullYear(), this._viewMonth = (/* @__PURE__ */ new Date()).getMonth(), this._rangeSelecting = !1, this._boundOutsideClick = this._onOutsideClick.bind(this), this._onKeyDown = (e) => {
|
|
61
|
+
if (e.key === "Escape" && this._open) {
|
|
62
|
+
if (this._rangeSelecting && this.from) {
|
|
63
|
+
this.to = this.from, this._rangeSelecting = !1, this._open = !1, this.emit("reke-change", {
|
|
64
|
+
from: this.from,
|
|
65
|
+
to: this.to
|
|
66
|
+
});
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
this._open = !1, this._rangeSelecting = !1;
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
static {
|
|
74
|
+
this.styles = n;
|
|
75
|
+
}
|
|
76
|
+
connectedCallback() {
|
|
77
|
+
super.connectedCallback(), document.addEventListener("click", this._boundOutsideClick, !0), document.addEventListener("keydown", this._onKeyDown);
|
|
78
|
+
}
|
|
79
|
+
disconnectedCallback() {
|
|
80
|
+
super.disconnectedCallback(), document.removeEventListener("click", this._boundOutsideClick, !0), document.removeEventListener("keydown", this._onKeyDown);
|
|
81
|
+
}
|
|
82
|
+
_onOutsideClick(e) {
|
|
83
|
+
if (this._open && !e.composedPath().includes(this)) {
|
|
84
|
+
if (this._rangeSelecting && this.from) {
|
|
85
|
+
this.to = this.from, this._rangeSelecting = !1, this._open = !1, this.emit("reke-change", {
|
|
86
|
+
from: this.from,
|
|
87
|
+
to: this.to
|
|
88
|
+
});
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
this._open = !1, this._rangeSelecting = !1;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
_toggleOpen() {
|
|
95
|
+
if (!this.disabled) if (this._open = !this._open, this._open) this._syncView();
|
|
96
|
+
else {
|
|
97
|
+
if (this._rangeSelecting && this.from) {
|
|
98
|
+
this.to = this.from, this._rangeSelecting = !1, this.emit("reke-change", {
|
|
99
|
+
from: this.from,
|
|
100
|
+
to: this.to
|
|
101
|
+
});
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
this._rangeSelecting = !1;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
_syncView() {
|
|
108
|
+
let e = null;
|
|
109
|
+
if (e = this.mode === "single" ? d(this.value) : d(this.from), e) this._viewYear = e.getFullYear(), this._viewMonth = e.getMonth();
|
|
110
|
+
else {
|
|
111
|
+
let e = /* @__PURE__ */ new Date();
|
|
112
|
+
this._viewYear = e.getFullYear(), this._viewMonth = e.getMonth();
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
_prevYear() {
|
|
116
|
+
this._viewYear--;
|
|
117
|
+
}
|
|
118
|
+
_nextYear() {
|
|
119
|
+
this._viewYear++;
|
|
120
|
+
}
|
|
121
|
+
_prevMonth() {
|
|
122
|
+
this._viewMonth === 0 ? (this._viewMonth = 11, this._viewYear--) : this._viewMonth--;
|
|
123
|
+
}
|
|
124
|
+
_nextMonth() {
|
|
125
|
+
this._viewMonth === 11 ? (this._viewMonth = 0, this._viewYear++) : this._viewMonth++;
|
|
126
|
+
}
|
|
127
|
+
_isDisabledDate(e) {
|
|
128
|
+
let t = d(this.min), n = d(this.max);
|
|
129
|
+
return !!(t && e < t || n && e > n);
|
|
130
|
+
}
|
|
131
|
+
_selectDay(e) {
|
|
132
|
+
if (!this._isDisabledDate(e.date)) {
|
|
133
|
+
if (this.mode === "single") {
|
|
134
|
+
this.value = f(e.date), this._open = !1, this.emit("reke-change", { value: this.value });
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
if (!this._rangeSelecting) this.from = f(e.date), this.to = "", this._rangeSelecting = !0;
|
|
138
|
+
else {
|
|
139
|
+
let t = d(this.from), n = e.date;
|
|
140
|
+
n < t && ([t, n] = [n, t]), this.from = f(t), this.to = f(n), this._rangeSelecting = !1, this._open = !1, this.emit("reke-change", {
|
|
141
|
+
from: this.from,
|
|
142
|
+
to: this.to
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
_goToday() {
|
|
148
|
+
let e = /* @__PURE__ */ new Date(), t = f(e);
|
|
149
|
+
if (this._viewYear = e.getFullYear(), this._viewMonth = e.getMonth(), this.mode === "single") this.value = t, this._open = !1, this.emit("reke-change", { value: this.value });
|
|
150
|
+
else if (this._rangeSelecting && this.from) {
|
|
151
|
+
let t = d(this.from), n = e;
|
|
152
|
+
n < t && ([t, n] = [n, t]), this.from = f(t), this.to = f(n), this._rangeSelecting = !1, this._open = !1, this.emit("reke-change", {
|
|
153
|
+
from: this.from,
|
|
154
|
+
to: this.to
|
|
155
|
+
});
|
|
156
|
+
} else this.from = t, this.to = t, this._rangeSelecting = !1, this._open = !1, this.emit("reke-change", {
|
|
157
|
+
from: this.from,
|
|
158
|
+
to: this.to
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
_clear() {
|
|
162
|
+
this.mode === "single" ? (this.value = "", this.emit("reke-change", { value: "" })) : (this.from = "", this.to = "", this._rangeSelecting = !1, this.emit("reke-change", {
|
|
163
|
+
from: "",
|
|
164
|
+
to: ""
|
|
165
|
+
})), this._open = !1;
|
|
166
|
+
}
|
|
167
|
+
_getDayClasses(e) {
|
|
168
|
+
let t = /* @__PURE__ */ new Date(), n = m(e.date, t), r = this._isDisabledDate(e.date);
|
|
169
|
+
if (this.mode === "single") {
|
|
170
|
+
let t = d(this.value);
|
|
171
|
+
return {
|
|
172
|
+
calendar__day: !0,
|
|
173
|
+
"calendar__day--other": e.otherMonth,
|
|
174
|
+
"calendar__day--today": n,
|
|
175
|
+
"calendar__day--selected": !!t && m(e.date, t),
|
|
176
|
+
"calendar__day--disabled": r
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
let i = d(this.from), a = d(this.to), o = !!i && m(e.date, i), s = !!a && m(e.date, a), c = !!i && !!a && e.date > i && e.date < a;
|
|
180
|
+
return {
|
|
181
|
+
calendar__day: !0,
|
|
182
|
+
"calendar__day--other": e.otherMonth,
|
|
183
|
+
"calendar__day--today": n && !o && !s,
|
|
184
|
+
"calendar__day--selected": !1,
|
|
185
|
+
"calendar__day--in-range": c,
|
|
186
|
+
"calendar__day--range-start": o,
|
|
187
|
+
"calendar__day--range-end": s,
|
|
188
|
+
"calendar__day--disabled": r
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
_getDisplayText() {
|
|
192
|
+
if (this.mode === "single") {
|
|
193
|
+
let e = d(this.value);
|
|
194
|
+
return e ? p(e) : this.placeholder || "Seleccionar fecha";
|
|
195
|
+
}
|
|
196
|
+
let e = d(this.from), t = d(this.to);
|
|
197
|
+
return !e && !t ? this.placeholder || "Seleccionar rango" : r`${e ? p(e) : "—"} <span class="trigger__separator">→</span> ${t ? p(t) : "—"}`;
|
|
198
|
+
}
|
|
199
|
+
_hasValue() {
|
|
200
|
+
return this.mode === "single" ? !!this.value : !!(this.from || this.to);
|
|
201
|
+
}
|
|
202
|
+
_renderCalendarIcon() {
|
|
203
|
+
return r`
|
|
184
204
|
<span class="trigger__icon" aria-hidden="true">
|
|
185
205
|
<svg viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg>
|
|
186
206
|
</span>
|
|
187
207
|
`;
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
208
|
+
}
|
|
209
|
+
_renderChevron() {
|
|
210
|
+
return r`
|
|
191
211
|
<span class="trigger__chevron" aria-hidden="true">
|
|
192
212
|
<svg viewBox="0 0 24 24"><polyline points="6 9 12 15 18 9"/></svg>
|
|
193
213
|
</span>
|
|
194
214
|
`;
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
${this.label ?
|
|
215
|
+
}
|
|
216
|
+
render() {
|
|
217
|
+
let e = h(this._viewYear, this._viewMonth), t = !this._hasValue(), n = `${l[this._viewMonth]} ${this._viewYear}`, a = {
|
|
218
|
+
trigger: !0,
|
|
219
|
+
"trigger--open": this._open,
|
|
220
|
+
"trigger--error": this.error,
|
|
221
|
+
"trigger--placeholder": t
|
|
222
|
+
}, o = {
|
|
223
|
+
label: !0,
|
|
224
|
+
"label--active": this._open
|
|
225
|
+
};
|
|
226
|
+
return r`
|
|
227
|
+
${this.label ? r`<span class=${c(o)}>${this.label}</span>` : i}
|
|
208
228
|
|
|
209
229
|
<button
|
|
210
230
|
part="trigger"
|
|
211
|
-
class=${
|
|
231
|
+
class=${c(a)}
|
|
212
232
|
type="button"
|
|
213
233
|
@click=${this._toggleOpen}
|
|
214
234
|
aria-haspopup="dialog"
|
|
@@ -220,10 +240,10 @@ let r = class extends D {
|
|
|
220
240
|
${this._renderChevron()}
|
|
221
241
|
</button>
|
|
222
242
|
|
|
223
|
-
${this._open ?
|
|
243
|
+
${this._open ? r`
|
|
224
244
|
<div part="calendar" class="calendar" role="dialog" aria-label="Calendar">
|
|
225
245
|
<div class="calendar__header">
|
|
226
|
-
<span class="calendar__title">${
|
|
246
|
+
<span class="calendar__title">${n}</span>
|
|
227
247
|
<div class="calendar__nav">
|
|
228
248
|
<button
|
|
229
249
|
class="calendar__nav-btn"
|
|
@@ -261,25 +281,25 @@ let r = class extends D {
|
|
|
261
281
|
</div>
|
|
262
282
|
|
|
263
283
|
<div class="calendar__weekdays">
|
|
264
|
-
${
|
|
265
|
-
(n) => _`<span class="calendar__weekday">${n}</span>`
|
|
266
|
-
)}
|
|
284
|
+
${u.map((e) => r`<span class="calendar__weekday">${e}</span>`)}
|
|
267
285
|
</div>
|
|
268
286
|
|
|
269
287
|
<div class="calendar__grid">
|
|
270
|
-
${e.map(
|
|
271
|
-
(n) => _`
|
|
288
|
+
${e.map((e) => r`
|
|
272
289
|
<button
|
|
273
|
-
class=${
|
|
290
|
+
class=${c(this._getDayClasses(e))}
|
|
274
291
|
type="button"
|
|
275
|
-
@click=${() => this._selectDay(
|
|
276
|
-
?disabled=${this._isDisabledDate(
|
|
277
|
-
aria-label="${
|
|
292
|
+
@click=${() => this._selectDay(e)}
|
|
293
|
+
?disabled=${this._isDisabledDate(e.date)}
|
|
294
|
+
aria-label="${e.date.toLocaleDateString("es-ES", {
|
|
295
|
+
day: "numeric",
|
|
296
|
+
month: "long",
|
|
297
|
+
year: "numeric"
|
|
298
|
+
})}"
|
|
278
299
|
>
|
|
279
|
-
${
|
|
300
|
+
${e.day}
|
|
280
301
|
</button>
|
|
281
|
-
`
|
|
282
|
-
)}
|
|
302
|
+
`)}
|
|
283
303
|
</div>
|
|
284
304
|
|
|
285
305
|
<div class="calendar__footer">
|
|
@@ -291,56 +311,16 @@ let r = class extends D {
|
|
|
291
311
|
</button>
|
|
292
312
|
</div>
|
|
293
313
|
</div>
|
|
294
|
-
` :
|
|
314
|
+
` : i}
|
|
295
315
|
`;
|
|
296
|
-
|
|
297
|
-
};
|
|
298
|
-
r.styles = S;
|
|
299
|
-
o([
|
|
300
|
-
c({ reflect: !0 })
|
|
301
|
-
], r.prototype, "mode", 2);
|
|
302
|
-
o([
|
|
303
|
-
c()
|
|
304
|
-
], r.prototype, "value", 2);
|
|
305
|
-
o([
|
|
306
|
-
c()
|
|
307
|
-
], r.prototype, "from", 2);
|
|
308
|
-
o([
|
|
309
|
-
c()
|
|
310
|
-
], r.prototype, "to", 2);
|
|
311
|
-
o([
|
|
312
|
-
c()
|
|
313
|
-
], r.prototype, "label", 2);
|
|
314
|
-
o([
|
|
315
|
-
c()
|
|
316
|
-
], r.prototype, "placeholder", 2);
|
|
317
|
-
o([
|
|
318
|
-
c()
|
|
319
|
-
], r.prototype, "min", 2);
|
|
320
|
-
o([
|
|
321
|
-
c()
|
|
322
|
-
], r.prototype, "max", 2);
|
|
323
|
-
o([
|
|
324
|
-
c({ type: Boolean, reflect: !0 })
|
|
325
|
-
], r.prototype, "disabled", 2);
|
|
326
|
-
o([
|
|
327
|
-
c({ type: Boolean, reflect: !0 })
|
|
328
|
-
], r.prototype, "error", 2);
|
|
329
|
-
o([
|
|
330
|
-
u()
|
|
331
|
-
], r.prototype, "_open", 2);
|
|
332
|
-
o([
|
|
333
|
-
u()
|
|
334
|
-
], r.prototype, "_viewYear", 2);
|
|
335
|
-
o([
|
|
336
|
-
u()
|
|
337
|
-
], r.prototype, "_viewMonth", 2);
|
|
338
|
-
o([
|
|
339
|
-
u()
|
|
340
|
-
], r.prototype, "_rangeSelecting", 2);
|
|
341
|
-
r = o([
|
|
342
|
-
w("reke-date-range")
|
|
343
|
-
], r);
|
|
344
|
-
export {
|
|
345
|
-
r as RekeDateRange
|
|
316
|
+
}
|
|
346
317
|
};
|
|
318
|
+
t([o({ reflect: !0 })], g.prototype, "mode", void 0), t([o()], g.prototype, "value", void 0), t([o()], g.prototype, "from", void 0), t([o()], g.prototype, "to", void 0), t([o()], g.prototype, "label", void 0), t([o()], g.prototype, "placeholder", void 0), t([o()], g.prototype, "min", void 0), t([o()], g.prototype, "max", void 0), t([o({
|
|
319
|
+
type: Boolean,
|
|
320
|
+
reflect: !0
|
|
321
|
+
})], g.prototype, "disabled", void 0), t([o({
|
|
322
|
+
type: Boolean,
|
|
323
|
+
reflect: !0
|
|
324
|
+
})], g.prototype, "error", void 0), t([s()], g.prototype, "_open", void 0), t([s()], g.prototype, "_viewYear", void 0), t([s()], g.prototype, "_viewMonth", void 0), t([s()], g.prototype, "_rangeSelecting", void 0), g = t([a("reke-date-range")], g);
|
|
325
|
+
//#endregion
|
|
326
|
+
export { g as RekeDateRange };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reke-date-range.styles.d.ts","sourceRoot":"","sources":["../../../src/components/reke-date-range/reke-date-range.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"reke-date-range.styles.d.ts","sourceRoot":"","sources":["../../../src/components/reke-date-range/reke-date-range.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM,2BA4UlB,CAAC"}
|