reke-ui 0.1.1 → 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 (86) hide show
  1. package/README.md +23 -0
  2. package/cli/install-skills.mjs +169 -0
  3. package/custom-elements.json +472 -128
  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 +45 -0
  9. package/dist/components/reke-alert/reke-alert.styles.d.ts.map +1 -1
  10. package/dist/components/reke-alert/reke-alert.styles.js +103 -0
  11. package/dist/components/reke-badge/reke-badge.d.ts +4 -2
  12. package/dist/components/reke-badge/reke-badge.d.ts.map +1 -1
  13. package/dist/components/reke-badge/reke-badge.js +30 -0
  14. package/dist/components/reke-badge/reke-badge.styles.d.ts.map +1 -1
  15. package/dist/components/reke-badge/reke-badge.styles.js +92 -0
  16. package/dist/components/reke-button/reke-button.d.ts.map +1 -1
  17. package/dist/components/reke-button/reke-button.js +53 -0
  18. package/dist/components/reke-button/reke-button.styles.d.ts.map +1 -1
  19. package/dist/components/reke-button/reke-button.styles.js +226 -0
  20. package/dist/components/reke-card/reke-card.d.ts +7 -0
  21. package/dist/components/reke-card/reke-card.d.ts.map +1 -1
  22. package/dist/components/reke-card/reke-card.js +50 -0
  23. package/dist/components/reke-card/reke-card.styles.d.ts.map +1 -1
  24. package/dist/components/reke-card/reke-card.styles.js +147 -0
  25. package/dist/components/reke-checkbox/reke-checkbox.js +57 -0
  26. package/dist/components/reke-checkbox/reke-checkbox.styles.d.ts.map +1 -1
  27. package/dist/components/reke-checkbox/reke-checkbox.styles.js +79 -0
  28. package/dist/components/reke-chip/reke-chip.d.ts.map +1 -1
  29. package/dist/components/reke-chip/reke-chip.js +62 -0
  30. package/dist/components/reke-chip/reke-chip.styles.d.ts.map +1 -1
  31. package/dist/components/reke-chip/reke-chip.styles.js +128 -0
  32. package/dist/components/reke-date-range/reke-date-range.d.ts.map +1 -1
  33. package/dist/components/reke-date-range/reke-date-range.js +326 -0
  34. package/dist/components/reke-date-range/reke-date-range.styles.d.ts.map +1 -1
  35. package/dist/components/reke-date-range/reke-date-range.styles.js +335 -0
  36. package/dist/components/reke-dialog/reke-dialog.d.ts.map +1 -1
  37. package/dist/components/reke-dialog/reke-dialog.js +77 -0
  38. package/dist/components/reke-dialog/reke-dialog.styles.d.ts.map +1 -1
  39. package/dist/components/reke-dialog/reke-dialog.styles.js +132 -0
  40. package/dist/components/reke-file-upload/reke-file-upload.d.ts.map +1 -1
  41. package/dist/components/reke-file-upload/reke-file-upload.js +84 -0
  42. package/dist/components/reke-file-upload/reke-file-upload.styles.js +104 -0
  43. package/dist/components/reke-input/reke-input.js +54 -0
  44. package/dist/components/reke-input/reke-input.styles.d.ts.map +1 -1
  45. package/dist/components/reke-input/reke-input.styles.js +78 -0
  46. package/dist/components/reke-select/reke-select.d.ts.map +1 -1
  47. package/dist/components/reke-select/reke-select.js +89 -0
  48. package/dist/components/reke-select/reke-select.styles.d.ts.map +1 -1
  49. package/dist/components/reke-select/reke-select.styles.js +120 -0
  50. package/dist/components/reke-table/reke-table.d.ts +144 -13
  51. package/dist/components/reke-table/reke-table.d.ts.map +1 -1
  52. package/dist/components/reke-table/reke-table.js +291 -0
  53. package/dist/components/reke-table/reke-table.styles.d.ts.map +1 -1
  54. package/dist/components/reke-table/reke-table.styles.js +265 -0
  55. package/dist/components/reke-textarea/reke-textarea.js +54 -0
  56. package/dist/components/reke-textarea/reke-textarea.styles.js +73 -0
  57. package/dist/components/reke-toast/reke-toast.d.ts.map +1 -1
  58. package/dist/components/reke-toast/reke-toast.js +74 -0
  59. package/dist/components/reke-toast/reke-toast.styles.d.ts.map +1 -1
  60. package/dist/components/reke-toast/reke-toast.styles.js +183 -0
  61. package/dist/components/reke-toggle/reke-toggle.js +50 -0
  62. package/dist/components/reke-toggle/reke-toggle.styles.js +68 -0
  63. package/dist/components/reke-tooltip/reke-tooltip.js +51 -0
  64. package/dist/components/reke-tooltip/reke-tooltip.styles.js +64 -0
  65. package/dist/index.d.ts +23 -23
  66. package/dist/index.d.ts.map +1 -1
  67. package/dist/index.js +18 -0
  68. package/dist/node_modules/lit/directives/ref.js +1 -0
  69. package/dist/node_modules/lit-html/async-directive.js +55 -0
  70. package/dist/node_modules/lit-html/directive-helpers.js +5 -0
  71. package/dist/node_modules/lit-html/directive.js +28 -0
  72. package/dist/node_modules/lit-html/directives/ref.js +30 -0
  73. package/dist/node_modules/lit-html/lit-html.js +234 -0
  74. package/dist/react-bridge/table.d.ts +58 -0
  75. package/dist/react-bridge/table.d.ts.map +1 -0
  76. package/dist/react-bridge/table.js +115 -0
  77. package/dist/react.d.ts +12 -26
  78. package/dist/react.d.ts.map +1 -1
  79. package/dist/react.js +111 -132
  80. package/dist/shared/base-element.js +14 -0
  81. package/dist/shared/tailwind-styles.js +6 -0
  82. package/dist/shared/tailwind.js +4 -0
  83. package/dist/tokens/reke-tokens.css +70 -0
  84. package/package.json +43 -23
  85. package/dist/reke-chip-DexKxhxn.js +0 -3358
  86. package/dist/reke-ui.js +0 -20
@@ -0,0 +1,326 @@
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
+ function d(e) {
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);
34
+ }
35
+ function f(e) {
36
+ return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
37
+ }
38
+ function p(e) {
39
+ return `${String(e.getDate()).padStart(2, "0")}/${String(e.getMonth() + 1).padStart(2, "0")}/${e.getFullYear()}`;
40
+ }
41
+ function m(e, t) {
42
+ return e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate();
43
+ }
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`
204
+ <span class="trigger__icon" aria-hidden="true">
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>
206
+ </span>
207
+ `;
208
+ }
209
+ _renderChevron() {
210
+ return r`
211
+ <span class="trigger__chevron" aria-hidden="true">
212
+ <svg viewBox="0 0 24 24"><polyline points="6 9 12 15 18 9"/></svg>
213
+ </span>
214
+ `;
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}
228
+
229
+ <button
230
+ part="trigger"
231
+ class=${c(a)}
232
+ type="button"
233
+ @click=${this._toggleOpen}
234
+ aria-haspopup="dialog"
235
+ aria-expanded=${this._open}
236
+ ?disabled=${this.disabled}
237
+ >
238
+ ${this._renderCalendarIcon()}
239
+ <span class="trigger__text">${this._getDisplayText()}</span>
240
+ ${this._renderChevron()}
241
+ </button>
242
+
243
+ ${this._open ? r`
244
+ <div part="calendar" class="calendar" role="dialog" aria-label="Calendar">
245
+ <div class="calendar__header">
246
+ <span class="calendar__title">${n}</span>
247
+ <div class="calendar__nav">
248
+ <button
249
+ class="calendar__nav-btn"
250
+ type="button"
251
+ @click=${this._prevYear}
252
+ aria-label="Previous year"
253
+ >
254
+ <svg viewBox="0 0 24 24"><polyline points="17 18 11 12 17 6"/><polyline points="11 18 5 12 11 6"/></svg>
255
+ </button>
256
+ <button
257
+ class="calendar__nav-btn"
258
+ type="button"
259
+ @click=${this._prevMonth}
260
+ aria-label="Previous month"
261
+ >
262
+ <svg viewBox="0 0 24 24"><polyline points="15 18 9 12 15 6"/></svg>
263
+ </button>
264
+ <button
265
+ class="calendar__nav-btn"
266
+ type="button"
267
+ @click=${this._nextMonth}
268
+ aria-label="Next month"
269
+ >
270
+ <svg viewBox="0 0 24 24"><polyline points="9 6 15 12 9 18"/></svg>
271
+ </button>
272
+ <button
273
+ class="calendar__nav-btn"
274
+ type="button"
275
+ @click=${this._nextYear}
276
+ aria-label="Next year"
277
+ >
278
+ <svg viewBox="0 0 24 24"><polyline points="7 6 13 12 7 18"/><polyline points="13 6 19 12 13 18"/></svg>
279
+ </button>
280
+ </div>
281
+ </div>
282
+
283
+ <div class="calendar__weekdays">
284
+ ${u.map((e) => r`<span class="calendar__weekday">${e}</span>`)}
285
+ </div>
286
+
287
+ <div class="calendar__grid">
288
+ ${e.map((e) => r`
289
+ <button
290
+ class=${c(this._getDayClasses(e))}
291
+ type="button"
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
+ })}"
299
+ >
300
+ ${e.day}
301
+ </button>
302
+ `)}
303
+ </div>
304
+
305
+ <div class="calendar__footer">
306
+ <button class="calendar__action calendar__action--today" type="button" @click=${this._goToday}>
307
+ Hoy
308
+ </button>
309
+ <button class="calendar__action calendar__action--clear" type="button" @click=${this._clear}>
310
+ Limpiar
311
+ </button>
312
+ </div>
313
+ </div>
314
+ ` : i}
315
+ `;
316
+ }
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"}
@@ -0,0 +1,335 @@
1
+ import { tailwindStyles as e } from "../../shared/tailwind-styles.js";
2
+ import { css as t } from "lit";
3
+ //#region src/components/reke-date-range/reke-date-range.styles.ts
4
+ var n = [e, t`
5
+ :host {
6
+ display: inline-block;
7
+ position: relative;
8
+ font-family: var(--reke-font-mono, 'JetBrains Mono', ui-monospace, monospace);
9
+ }
10
+
11
+ :host([disabled]) {
12
+ pointer-events: none;
13
+ opacity: 0.5;
14
+ }
15
+
16
+ /* === Label === */
17
+
18
+ .label {
19
+ display: block;
20
+ margin-bottom: 6px;
21
+ font-size: 12px;
22
+ color: var(--reke-color-text-ghost, #7A7A7A);
23
+ transition: color 0.15s ease;
24
+ }
25
+
26
+ .label--active {
27
+ color: var(--reke-color-primary, #22C55E);
28
+ }
29
+
30
+ /* === Trigger === */
31
+
32
+ .trigger {
33
+ display: inline-flex;
34
+ align-items: center;
35
+ gap: 8px;
36
+ padding: 10px 16px;
37
+ background: var(--reke-color-surface, #1A1A1A);
38
+ border: 1px solid var(--reke-color-border, #252525);
39
+ border-radius: var(--reke-radius, 4px);
40
+ color: var(--reke-color-text, #E5E5E5);
41
+ font-family: inherit;
42
+ font-size: 13px;
43
+ cursor: pointer;
44
+ transition: border-color 0.15s ease;
45
+ min-width: 200px;
46
+ box-sizing: border-box;
47
+ }
48
+
49
+ .trigger:hover {
50
+ border-color: var(--reke-color-border-hover, #3A3A3A);
51
+ }
52
+
53
+ .trigger--open {
54
+ border-color: var(--reke-color-primary, #22C55E);
55
+ }
56
+
57
+ .trigger--error {
58
+ border-color: var(--reke-color-danger, #EF4444);
59
+ }
60
+
61
+ .trigger--placeholder {
62
+ color: var(--reke-color-text-muted, #525252);
63
+ }
64
+
65
+ .trigger__icon {
66
+ display: inline-flex;
67
+ width: 16px;
68
+ height: 16px;
69
+ color: var(--reke-color-text-muted, #525252);
70
+ transition: color 0.15s ease;
71
+ }
72
+
73
+ .trigger--open .trigger__icon {
74
+ color: var(--reke-color-primary, #22C55E);
75
+ }
76
+
77
+ .trigger__icon svg {
78
+ width: 16px;
79
+ height: 16px;
80
+ fill: none;
81
+ stroke: currentColor;
82
+ stroke-width: 2;
83
+ stroke-linecap: round;
84
+ stroke-linejoin: round;
85
+ }
86
+
87
+ .trigger__text {
88
+ flex: 1;
89
+ white-space: nowrap;
90
+ overflow: hidden;
91
+ text-overflow: ellipsis;
92
+ }
93
+
94
+ .trigger__separator {
95
+ color: var(--reke-color-text-disabled, #3B3B3B);
96
+ }
97
+
98
+ .trigger__chevron {
99
+ display: inline-flex;
100
+ width: 16px;
101
+ height: 16px;
102
+ color: var(--reke-color-text-muted, #525252);
103
+ transition: transform 0.15s ease, color 0.15s ease;
104
+ }
105
+
106
+ .trigger--open .trigger__chevron {
107
+ transform: rotate(180deg);
108
+ color: var(--reke-color-primary, #22C55E);
109
+ }
110
+
111
+ .trigger__chevron svg {
112
+ width: 16px;
113
+ height: 16px;
114
+ fill: none;
115
+ stroke: currentColor;
116
+ stroke-width: 2;
117
+ stroke-linecap: round;
118
+ stroke-linejoin: round;
119
+ }
120
+
121
+ /* === Calendar dropdown === */
122
+
123
+ .calendar {
124
+ position: absolute;
125
+ top: 100%;
126
+ left: 0;
127
+ z-index: 50;
128
+ margin-top: 4px;
129
+ padding: 16px;
130
+ background: var(--reke-color-surface, #1A1A1A);
131
+ border: 1px solid var(--reke-color-border, #252525);
132
+ border-radius: 8px;
133
+ box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.6);
134
+ min-width: 280px;
135
+ }
136
+
137
+ /* === Calendar header (month/year + nav) === */
138
+
139
+ .calendar__header {
140
+ display: flex;
141
+ align-items: center;
142
+ justify-content: space-between;
143
+ margin-bottom: 12px;
144
+ }
145
+
146
+ .calendar__title {
147
+ font-size: 12px;
148
+ font-weight: 600;
149
+ color: var(--reke-color-text, #E5E5E5);
150
+ }
151
+
152
+ .calendar__nav {
153
+ display: flex;
154
+ gap: 4px;
155
+ }
156
+
157
+ .calendar__nav-btn {
158
+ display: inline-flex;
159
+ align-items: center;
160
+ justify-content: center;
161
+ width: 24px;
162
+ height: 24px;
163
+ padding: 0;
164
+ border: none;
165
+ border-radius: var(--reke-radius, 4px);
166
+ background: transparent;
167
+ color: var(--reke-color-text-ghost, #7A7A7A);
168
+ cursor: pointer;
169
+ font-family: inherit;
170
+ }
171
+
172
+ .calendar__nav-btn:hover {
173
+ color: var(--reke-color-text, #E5E5E5);
174
+ background: color-mix(in srgb, var(--reke-color-surface, #1A1A1A) 75%, var(--reke-color-border, #252525));
175
+ }
176
+
177
+ .calendar__nav-btn:focus-visible {
178
+ outline: 2px solid var(--reke-color-primary, #22C55E);
179
+ outline-offset: 2px;
180
+ }
181
+
182
+ .calendar__nav-btn svg {
183
+ width: 14px;
184
+ height: 14px;
185
+ fill: none;
186
+ stroke: currentColor;
187
+ stroke-width: 2;
188
+ stroke-linecap: round;
189
+ stroke-linejoin: round;
190
+ }
191
+
192
+ /* === Weekday header === */
193
+
194
+ .calendar__weekdays {
195
+ display: grid;
196
+ grid-template-columns: repeat(7, 1fr);
197
+ margin-bottom: 4px;
198
+ }
199
+
200
+ .calendar__weekday {
201
+ text-align: center;
202
+ font-size: 9px;
203
+ font-weight: 600;
204
+ color: var(--reke-color-text-label, #8A8A8A);
205
+ padding: 4px 0;
206
+ text-transform: uppercase;
207
+ }
208
+
209
+ /* === Day grid === */
210
+
211
+ .calendar__grid {
212
+ display: grid;
213
+ grid-template-columns: repeat(7, 1fr);
214
+ gap: 2px;
215
+ }
216
+
217
+ .calendar__day {
218
+ display: flex;
219
+ align-items: center;
220
+ justify-content: center;
221
+ height: 28px;
222
+ font-size: 11px;
223
+ border: none;
224
+ border-radius: var(--reke-radius, 4px);
225
+ background: transparent;
226
+ color: var(--reke-color-text, #E5E5E5);
227
+ cursor: pointer;
228
+ padding: 0;
229
+ font-family: inherit;
230
+ transition: background-color 0.1s ease;
231
+ }
232
+
233
+ .calendar__day:hover {
234
+ background: color-mix(in srgb, var(--reke-color-surface, #1A1A1A) 70%, var(--reke-color-border, #252525));
235
+ }
236
+
237
+ .calendar__day:focus-visible {
238
+ outline: 2px solid var(--reke-color-primary, #22C55E);
239
+ outline-offset: -2px;
240
+ }
241
+
242
+ .calendar__day--other {
243
+ color: var(--reke-color-text-ghost, #7A7A7A);
244
+ }
245
+
246
+ .calendar__day--today {
247
+ font-weight: 600;
248
+ color: var(--reke-color-primary, #22C55E);
249
+ }
250
+
251
+ .calendar__day--selected {
252
+ background: var(--reke-color-primary, #22C55E);
253
+ color: var(--reke-color-on-primary, #0A0A0B);
254
+ font-weight: 600;
255
+ border-radius: 14px;
256
+ }
257
+
258
+ .calendar__day--selected:hover {
259
+ background: color-mix(in srgb, var(--reke-color-primary, #22C55E) 85%, black);
260
+ }
261
+
262
+ .calendar__day--in-range {
263
+ background: color-mix(in srgb, var(--reke-color-primary, #22C55E) 10%, transparent);
264
+ border-radius: var(--reke-radius, 4px);
265
+ }
266
+
267
+ .calendar__day--range-start {
268
+ background: var(--reke-color-primary, #22C55E);
269
+ color: var(--reke-color-on-primary, #0A0A0B);
270
+ font-weight: 600;
271
+ border-radius: 14px 4px 4px 14px;
272
+ }
273
+
274
+ .calendar__day--range-end {
275
+ background: var(--reke-color-primary, #22C55E);
276
+ color: var(--reke-color-on-primary, #0A0A0B);
277
+ font-weight: 600;
278
+ border-radius: 4px 14px 14px 4px;
279
+ }
280
+
281
+ .calendar__day--range-start.calendar__day--range-end {
282
+ border-radius: 14px;
283
+ }
284
+
285
+ .calendar__day--disabled {
286
+ color: var(--reke-color-text-disabled, #3B3B3B);
287
+ cursor: default;
288
+ pointer-events: none;
289
+ }
290
+
291
+ /* === Calendar footer === */
292
+
293
+ .calendar__footer {
294
+ display: flex;
295
+ justify-content: space-between;
296
+ align-items: center;
297
+ margin-top: 8px;
298
+ padding-top: 8px;
299
+ }
300
+
301
+ .calendar__action {
302
+ font-family: inherit;
303
+ font-size: 11px;
304
+ font-weight: 600;
305
+ border: none;
306
+ background: none;
307
+ cursor: pointer;
308
+ padding: 0;
309
+ }
310
+
311
+ .calendar__action--today {
312
+ color: var(--reke-color-primary, #22C55E);
313
+ }
314
+
315
+ .calendar__action--today:hover {
316
+ text-decoration: underline;
317
+ }
318
+
319
+ .calendar__action--today:focus-visible,
320
+ .calendar__action--clear:focus-visible {
321
+ outline: 2px solid var(--reke-color-primary, #22C55E);
322
+ outline-offset: 2px;
323
+ }
324
+
325
+ .calendar__action--clear {
326
+ color: var(--reke-color-text-label, #8A8A8A);
327
+ font-weight: 400;
328
+ }
329
+
330
+ .calendar__action--clear:hover {
331
+ color: var(--reke-color-text, #E5E5E5);
332
+ }
333
+ `];
334
+ //#endregion
335
+ export { n as styles };
@@ -1 +1 @@
1
- {"version":3,"file":"reke-dialog.d.ts","sourceRoot":"","sources":["../../../src/components/reke-dialog/reke-dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,OAAO,EAAE,MAAM,KAAK,CAAC;AAGpC,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAG3D,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,QAAQ,CAAC;AAC/C,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,MAAM,CAAC;AAE9C;;;;;;;;;;;;;;GAcG;AACH,qBACa,UAAW,SAAQ,WAAW;IACzC,OAAgB,MAAM,4BAAU;IAGhC,IAAI,UAAS;IAGb,OAAO,SAAM;IAGb,OAAO,EAAE,aAAa,CAAW;IAEjC,kEAAkE;IAElE,QAAQ,EAAE,cAAc,CAAW;IAEnC,OAAO,CAAC,cAAc,CAIpB;IAEO,iBAAiB;IAKjB,oBAAoB;IAK7B,IAAI;IAIJ,KAAK;IAKI,MAAM;CAkDhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,UAAU,CAAC;KAC3B;CACF"}
1
+ {"version":3,"file":"reke-dialog.d.ts","sourceRoot":"","sources":["../../../src/components/reke-dialog/reke-dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,OAAO,EAAE,MAAM,KAAK,CAAC;AAGpC,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAG3D,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,QAAQ,CAAC;AAC/C,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,MAAM,CAAC;AAE9C;;;;;;;;;;;;;;GAcG;AACH,qBACa,UAAW,SAAQ,WAAW;IACzC,OAAgB,MAAM,4BAAU;IAGhC,IAAI,UAAS;IAGb,OAAO,SAAM;IAGb,OAAO,EAAE,aAAa,CAAW;IAEjC,kEAAkE;IAElE,QAAQ,EAAE,cAAc,CAAW;IAEnC,OAAO,CAAC,cAAc,CAIpB;IAEO,iBAAiB;IAKjB,oBAAoB;IAK7B,IAAI;IAIJ,KAAK;IAKI,MAAM;CAoDhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,UAAU,CAAC;KAC3B;CACF"}