reke-ui 0.1.2 → 0.2.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 (78) hide show
  1. package/README.md +21 -0
  2. package/cli/install-skills.mjs +169 -0
  3. package/custom-elements.json +405 -161
  4. package/dist/__type-checks__/no-lit-in-public-types.d.ts +2 -0
  5. package/dist/__type-checks__/no-lit-in-public-types.d.ts.map +1 -0
  6. package/dist/_virtual/_@oxc-project_runtime@0.137.0/helpers/esm/decorate.js +9 -0
  7. package/dist/components/reke-alert/reke-alert.d.ts.map +1 -1
  8. package/dist/components/reke-alert/reke-alert.js +32 -40
  9. package/dist/components/reke-alert/reke-alert.styles.js +7 -10
  10. package/dist/components/reke-badge/reke-badge.js +26 -40
  11. package/dist/components/reke-badge/reke-badge.styles.js +7 -10
  12. package/dist/components/reke-button/reke-button.d.ts.map +1 -1
  13. package/dist/components/reke-button/reke-button.js +41 -52
  14. package/dist/components/reke-button/reke-button.styles.js +7 -10
  15. package/dist/components/reke-card/reke-card.d.ts.map +1 -1
  16. package/dist/components/reke-card/reke-card.js +38 -58
  17. package/dist/components/reke-card/reke-card.styles.js +7 -10
  18. package/dist/components/reke-checkbox/reke-checkbox.js +40 -47
  19. package/dist/components/reke-checkbox/reke-checkbox.styles.d.ts.map +1 -1
  20. package/dist/components/reke-checkbox/reke-checkbox.styles.js +7 -9
  21. package/dist/components/reke-chip/reke-chip.d.ts.map +1 -1
  22. package/dist/components/reke-chip/reke-chip.js +42 -50
  23. package/dist/components/reke-chip/reke-chip.styles.d.ts.map +1 -1
  24. package/dist/components/reke-chip/reke-chip.styles.js +16 -13
  25. package/dist/components/reke-date-range/reke-date-range.d.ts.map +1 -1
  26. package/dist/components/reke-date-range/reke-date-range.js +240 -260
  27. package/dist/components/reke-date-range/reke-date-range.styles.d.ts.map +1 -1
  28. package/dist/components/reke-date-range/reke-date-range.styles.js +29 -16
  29. package/dist/components/reke-dialog/reke-dialog.d.ts.map +1 -1
  30. package/dist/components/reke-dialog/reke-dialog.js +52 -65
  31. package/dist/components/reke-dialog/reke-dialog.styles.d.ts.map +1 -1
  32. package/dist/components/reke-dialog/reke-dialog.styles.js +8 -10
  33. package/dist/components/reke-file-upload/reke-file-upload.d.ts.map +1 -1
  34. package/dist/components/reke-file-upload/reke-file-upload.js +62 -86
  35. package/dist/components/reke-file-upload/reke-file-upload.styles.js +7 -10
  36. package/dist/components/reke-input/reke-input.js +42 -61
  37. package/dist/components/reke-input/reke-input.styles.d.ts.map +1 -1
  38. package/dist/components/reke-input/reke-input.styles.js +8 -10
  39. package/dist/components/reke-select/reke-select.d.ts.map +1 -1
  40. package/dist/components/reke-select/reke-select.js +66 -89
  41. package/dist/components/reke-select/reke-select.styles.d.ts.map +1 -1
  42. package/dist/components/reke-select/reke-select.styles.js +9 -11
  43. package/dist/components/reke-table/reke-table.d.ts +134 -23
  44. package/dist/components/reke-table/reke-table.d.ts.map +1 -1
  45. package/dist/components/reke-table/reke-table.js +243 -143
  46. package/dist/components/reke-table/reke-table.styles.d.ts.map +1 -1
  47. package/dist/components/reke-table/reke-table.styles.js +67 -9
  48. package/dist/components/reke-textarea/reke-textarea.js +42 -61
  49. package/dist/components/reke-textarea/reke-textarea.styles.js +6 -9
  50. package/dist/components/reke-toast/reke-toast.d.ts.map +1 -1
  51. package/dist/components/reke-toast/reke-toast.js +50 -68
  52. package/dist/components/reke-toast/reke-toast.styles.d.ts.map +1 -1
  53. package/dist/components/reke-toast/reke-toast.styles.js +13 -12
  54. package/dist/components/reke-toggle/reke-toggle.js +36 -43
  55. package/dist/components/reke-toggle/reke-toggle.styles.js +7 -10
  56. package/dist/components/reke-tooltip/reke-tooltip.js +31 -47
  57. package/dist/components/reke-tooltip/reke-tooltip.styles.js +6 -9
  58. package/dist/index.d.ts +23 -23
  59. package/dist/index.d.ts.map +1 -1
  60. package/dist/index.js +15 -33
  61. package/dist/node_modules/lit/directives/ref.js +1 -0
  62. package/dist/node_modules/lit-html/async-directive.js +55 -0
  63. package/dist/node_modules/lit-html/directive-helpers.js +5 -0
  64. package/dist/node_modules/lit-html/directive.js +28 -0
  65. package/dist/node_modules/lit-html/directives/ref.js +30 -0
  66. package/dist/node_modules/lit-html/lit-html.js +234 -0
  67. package/dist/react-bridge/table.d.ts +58 -0
  68. package/dist/react-bridge/table.d.ts.map +1 -0
  69. package/dist/react-bridge/table.js +115 -0
  70. package/dist/react.d.ts +12 -26
  71. package/dist/react.d.ts.map +1 -1
  72. package/dist/react.js +110 -146
  73. package/dist/shared/base-element.js +13 -15
  74. package/dist/shared/tailwind-styles.js +6 -6
  75. package/dist/shared/tailwind.js +4 -0
  76. package/dist/tokens/reke-tokens.css +47 -0
  77. package/package.json +40 -20
  78. package/dist/shared/tailwind.css.js +0 -4
@@ -1,214 +1,234 @@
1
- import { html as _, nothing as y } from "lit";
2
- import { property as c, state as u, customElement as w } from "lit/decorators.js";
3
- import { classMap as f } from "lit/directives/class-map.js";
4
- import { RekeElement as D } from "../../shared/base-element.js";
5
- import { styles as S } from "./reke-date-range.styles.js";
6
- var M = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, o = (e, t, i, s) => {
7
- for (var a = s > 1 ? void 0 : s ? $(t, i) : t, n = e.length - 1, h; n >= 0; n--)
8
- (h = e[n]) && (a = (s ? h(t, i, a) : h(a)) || a);
9
- return s && a && M(t, i, a), a;
10
- };
11
- const k = [
12
- "Enero",
13
- "Febrero",
14
- "Marzo",
15
- "Abril",
16
- "Mayo",
17
- "Junio",
18
- "Julio",
19
- "Agosto",
20
- "Septiembre",
21
- "Octubre",
22
- "Noviembre",
23
- "Diciembre"
24
- ], x = ["Lu", "Ma", "Mi", "Ju", "Vi", "Sa", "Do"];
25
- function l(e) {
26
- if (!e) return null;
27
- const [t, i, s] = e.split("-").map(Number);
28
- return !t || !i || !s ? null : new Date(t, i - 1, s);
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
- const t = e.getFullYear(), i = String(e.getMonth() + 1).padStart(2, "0"), s = String(e.getDate()).padStart(2, "0");
32
- return `${t}-${i}-${s}`;
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 m(e) {
35
- const t = String(e.getDate()).padStart(2, "0"), i = String(e.getMonth() + 1).padStart(2, "0");
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, t) {
39
- return e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate();
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 Y(e, t) {
42
- let s = new Date(e, t, 1).getDay() - 1;
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
- let r = class extends D {
52
- constructor() {
53
- super(...arguments), 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) => {
54
- if (e.key === "Escape" && this._open) {
55
- if (this._rangeSelecting && this.from) {
56
- this.to = this.from, this._rangeSelecting = !1, this._open = !1, this.emit("reke-change", { from: this.from, to: this.to });
57
- return;
58
- }
59
- this._open = !1, this._rangeSelecting = !1;
60
- }
61
- };
62
- }
63
- connectedCallback() {
64
- super.connectedCallback(), document.addEventListener("click", this._boundOutsideClick, !0), document.addEventListener("keydown", this._onKeyDown);
65
- }
66
- disconnectedCallback() {
67
- super.disconnectedCallback(), document.removeEventListener("click", this._boundOutsideClick, !0), document.removeEventListener("keydown", this._onKeyDown);
68
- }
69
- _onOutsideClick(e) {
70
- if (!this._open) return;
71
- if (!e.composedPath().includes(this)) {
72
- if (this._rangeSelecting && this.from) {
73
- this.to = this.from, this._rangeSelecting = !1, this._open = !1, this.emit("reke-change", { from: this.from, to: this.to });
74
- return;
75
- }
76
- this._open = !1, this._rangeSelecting = !1;
77
- }
78
- }
79
- _toggleOpen() {
80
- if (!this.disabled)
81
- if (this._open = !this._open, this._open)
82
- this._syncView();
83
- else {
84
- if (this._rangeSelecting && this.from) {
85
- this.to = this.from, this._rangeSelecting = !1, this.emit("reke-change", { from: this.from, to: this.to });
86
- return;
87
- }
88
- this._rangeSelecting = !1;
89
- }
90
- }
91
- /** Sync calendar view to the current selection. */
92
- _syncView() {
93
- let e = null;
94
- if (this.mode === "single" ? e = l(this.value) : e = l(this.from), e)
95
- this._viewYear = e.getFullYear(), this._viewMonth = e.getMonth();
96
- else {
97
- const t = /* @__PURE__ */ new Date();
98
- this._viewYear = t.getFullYear(), this._viewMonth = t.getMonth();
99
- }
100
- }
101
- _prevYear() {
102
- this._viewYear--;
103
- }
104
- _nextYear() {
105
- this._viewYear++;
106
- }
107
- _prevMonth() {
108
- this._viewMonth === 0 ? (this._viewMonth = 11, this._viewYear--) : this._viewMonth--;
109
- }
110
- _nextMonth() {
111
- this._viewMonth === 11 ? (this._viewMonth = 0, this._viewYear++) : this._viewMonth++;
112
- }
113
- _isDisabledDate(e) {
114
- const t = l(this.min), i = l(this.max);
115
- return !!(t && e < t || i && e > i);
116
- }
117
- _selectDay(e) {
118
- if (!this._isDisabledDate(e.date)) {
119
- if (this.mode === "single") {
120
- this.value = d(e.date), this._open = !1, this.emit("reke-change", { value: this.value });
121
- return;
122
- }
123
- if (!this._rangeSelecting)
124
- this.from = d(e.date), this.to = "", this._rangeSelecting = !0;
125
- else {
126
- let t = l(this.from), i = e.date;
127
- i < t && ([t, i] = [i, t]), this.from = d(t), this.to = d(i), this._rangeSelecting = !1, this._open = !1, this.emit("reke-change", { from: this.from, to: this.to });
128
- }
129
- }
130
- }
131
- _goToday() {
132
- const e = /* @__PURE__ */ new Date(), t = d(e);
133
- if (this._viewYear = e.getFullYear(), this._viewMonth = e.getMonth(), this.mode === "single")
134
- this.value = t, this._open = !1, this.emit("reke-change", { value: this.value });
135
- else if (this._rangeSelecting && this.from) {
136
- let i = l(this.from), s = e;
137
- s < i && ([i, s] = [s, i]), this.from = d(i), this.to = d(s), this._rangeSelecting = !1, this._open = !1, this.emit("reke-change", { from: this.from, to: this.to });
138
- } else
139
- this.from = t, this.to = t, this._rangeSelecting = !1, this._open = !1, this.emit("reke-change", { from: this.from, to: this.to });
140
- }
141
- _clear() {
142
- this.mode === "single" ? (this.value = "", this.emit("reke-change", { value: "" })) : (this.from = "", this.to = "", this._rangeSelecting = !1, this.emit("reke-change", { from: "", to: "" })), this._open = !1;
143
- }
144
- _getDayClasses(e) {
145
- const t = /* @__PURE__ */ new Date(), i = p(e.date, t), s = this._isDisabledDate(e.date);
146
- if (this.mode === "single") {
147
- const v = l(this.value);
148
- return {
149
- calendar__day: !0,
150
- "calendar__day--other": e.otherMonth,
151
- "calendar__day--today": i,
152
- "calendar__day--selected": !!v && p(e.date, v),
153
- "calendar__day--disabled": s
154
- };
155
- }
156
- const a = l(this.from), n = l(this.to), h = !!a && p(e.date, a), g = !!n && p(e.date, n), b = !!a && !!n && e.date > a && e.date < n;
157
- return {
158
- calendar__day: !0,
159
- "calendar__day--other": e.otherMonth,
160
- "calendar__day--today": i && !h && !g,
161
- "calendar__day--selected": (this.mode === "range", !1),
162
- "calendar__day--in-range": b,
163
- "calendar__day--range-start": h,
164
- "calendar__day--range-end": g,
165
- "calendar__day--disabled": s
166
- };
167
- }
168
- _getDisplayText() {
169
- if (this.mode === "single") {
170
- const a = l(this.value);
171
- return a ? m(a) : this.placeholder || "Seleccionar fecha";
172
- }
173
- const e = l(this.from), t = l(this.to);
174
- if (!e && !t)
175
- return this.placeholder || "Seleccionar rango";
176
- const i = e ? m(e) : "", s = t ? m(t) : "—";
177
- return _`${i} <span class="trigger__separator">→</span> ${s}`;
178
- }
179
- _hasValue() {
180
- return this.mode === "single" ? !!this.value : !!(this.from || this.to);
181
- }
182
- _renderCalendarIcon() {
183
- return _`
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
- _renderChevron() {
190
- return _`
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
- render() {
197
- const e = Y(this._viewYear, this._viewMonth), t = !this._hasValue(), i = `${k[this._viewMonth]} ${this._viewYear}`, s = {
198
- trigger: !0,
199
- "trigger--open": this._open,
200
- "trigger--error": this.error,
201
- "trigger--placeholder": t
202
- }, a = {
203
- label: !0,
204
- "label--active": this._open
205
- };
206
- return _`
207
- ${this.label ? _`<span class=${f(a)}>${this.label}</span>` : y}
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=${f(s)}
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">${i}</span>
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
- ${x.map(
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=${f(this._getDayClasses(n))}
290
+ class=${c(this._getDayClasses(e))}
274
291
  type="button"
275
- @click=${() => this._selectDay(n)}
276
- ?disabled=${this._isDisabledDate(n.date)}
277
- aria-label="${n.date.toLocaleDateString("es-ES", { day: "numeric", month: "long", year: "numeric" })}"
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
- ${n.day}
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
- ` : y}
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,2BA4TlB,CAAC"}
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"}