framepexls-ui-lib 0.1.4

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 (125) hide show
  1. package/dist/ActionIconButton.d.mts +11 -0
  2. package/dist/ActionIconButton.d.ts +11 -0
  3. package/dist/ActionIconButton.js +71 -0
  4. package/dist/ActionIconButton.mjs +41 -0
  5. package/dist/AppTopbar.d.mts +17 -0
  6. package/dist/AppTopbar.d.ts +17 -0
  7. package/dist/AppTopbar.js +51 -0
  8. package/dist/AppTopbar.mjs +31 -0
  9. package/dist/AvatarSquare.d.mts +16 -0
  10. package/dist/AvatarSquare.d.ts +16 -0
  11. package/dist/AvatarSquare.js +82 -0
  12. package/dist/AvatarSquare.mjs +52 -0
  13. package/dist/Badge.d.mts +13 -0
  14. package/dist/Badge.d.ts +13 -0
  15. package/dist/Badge.js +65 -0
  16. package/dist/Badge.mjs +45 -0
  17. package/dist/BadgeCluster.d.mts +17 -0
  18. package/dist/BadgeCluster.d.ts +17 -0
  19. package/dist/BadgeCluster.js +125 -0
  20. package/dist/BadgeCluster.mjs +95 -0
  21. package/dist/Breadcrumb.d.mts +11 -0
  22. package/dist/Breadcrumb.d.ts +11 -0
  23. package/dist/Breadcrumb.js +42 -0
  24. package/dist/Breadcrumb.mjs +12 -0
  25. package/dist/Button.d.mts +15 -0
  26. package/dist/Button.d.ts +15 -0
  27. package/dist/Button.js +72 -0
  28. package/dist/Button.mjs +52 -0
  29. package/dist/CalendarPanel.d.mts +13 -0
  30. package/dist/CalendarPanel.d.ts +13 -0
  31. package/dist/CalendarPanel.js +110 -0
  32. package/dist/CalendarPanel.mjs +90 -0
  33. package/dist/ChartCard.d.mts +15 -0
  34. package/dist/ChartCard.d.ts +15 -0
  35. package/dist/ChartCard.js +44 -0
  36. package/dist/ChartCard.mjs +24 -0
  37. package/dist/CheckboxPillsGroup.d.mts +28 -0
  38. package/dist/CheckboxPillsGroup.d.ts +28 -0
  39. package/dist/CheckboxPillsGroup.js +186 -0
  40. package/dist/CheckboxPillsGroup.mjs +156 -0
  41. package/dist/ColumnSelector.d.mts +17 -0
  42. package/dist/ColumnSelector.d.ts +17 -0
  43. package/dist/ColumnSelector.js +74 -0
  44. package/dist/ColumnSelector.mjs +54 -0
  45. package/dist/ComboSelect.d.mts +46 -0
  46. package/dist/ComboSelect.d.ts +46 -0
  47. package/dist/ComboSelect.js +442 -0
  48. package/dist/ComboSelect.mjs +412 -0
  49. package/dist/DateTimeField.d.mts +22 -0
  50. package/dist/DateTimeField.d.ts +22 -0
  51. package/dist/DateTimeField.js +409 -0
  52. package/dist/DateTimeField.mjs +379 -0
  53. package/dist/Dialog.d.mts +82 -0
  54. package/dist/Dialog.d.ts +82 -0
  55. package/dist/Dialog.js +408 -0
  56. package/dist/Dialog.mjs +368 -0
  57. package/dist/Dropdown.d.mts +52 -0
  58. package/dist/Dropdown.d.ts +52 -0
  59. package/dist/Dropdown.js +333 -0
  60. package/dist/Dropdown.mjs +313 -0
  61. package/dist/EmptyState.d.mts +8 -0
  62. package/dist/EmptyState.d.ts +8 -0
  63. package/dist/EmptyState.js +35 -0
  64. package/dist/EmptyState.mjs +15 -0
  65. package/dist/InfoGrid.d.mts +20 -0
  66. package/dist/InfoGrid.d.ts +20 -0
  67. package/dist/InfoGrid.js +67 -0
  68. package/dist/InfoGrid.mjs +47 -0
  69. package/dist/Input.d.mts +20 -0
  70. package/dist/Input.d.ts +20 -0
  71. package/dist/Input.js +85 -0
  72. package/dist/Input.mjs +55 -0
  73. package/dist/Money.d.mts +8 -0
  74. package/dist/Money.d.ts +8 -0
  75. package/dist/Money.js +30 -0
  76. package/dist/Money.mjs +10 -0
  77. package/dist/OrderButton.d.mts +11 -0
  78. package/dist/OrderButton.d.ts +11 -0
  79. package/dist/OrderButton.js +39 -0
  80. package/dist/OrderButton.mjs +19 -0
  81. package/dist/Pagination.d.mts +12 -0
  82. package/dist/Pagination.d.ts +12 -0
  83. package/dist/Pagination.js +71 -0
  84. package/dist/Pagination.mjs +51 -0
  85. package/dist/SearchInput.d.mts +17 -0
  86. package/dist/SearchInput.d.ts +17 -0
  87. package/dist/SearchInput.js +116 -0
  88. package/dist/SearchInput.mjs +86 -0
  89. package/dist/Select.d.mts +31 -0
  90. package/dist/Select.d.ts +31 -0
  91. package/dist/Select.js +293 -0
  92. package/dist/Select.mjs +263 -0
  93. package/dist/StatCard.d.mts +15 -0
  94. package/dist/StatCard.d.ts +15 -0
  95. package/dist/StatCard.js +47 -0
  96. package/dist/StatCard.mjs +27 -0
  97. package/dist/Steps.d.mts +31 -0
  98. package/dist/Steps.d.ts +31 -0
  99. package/dist/Steps.js +123 -0
  100. package/dist/Steps.mjs +99 -0
  101. package/dist/Table.d.mts +31 -0
  102. package/dist/Table.d.ts +31 -0
  103. package/dist/Table.js +153 -0
  104. package/dist/Table.mjs +117 -0
  105. package/dist/TimeAgo.d.mts +12 -0
  106. package/dist/TimeAgo.d.ts +12 -0
  107. package/dist/TimeAgo.js +104 -0
  108. package/dist/TimeAgo.mjs +74 -0
  109. package/dist/TimePanel.d.mts +14 -0
  110. package/dist/TimePanel.d.ts +14 -0
  111. package/dist/TimePanel.js +145 -0
  112. package/dist/TimePanel.mjs +125 -0
  113. package/dist/TimePopover.d.mts +33 -0
  114. package/dist/TimePopover.d.ts +33 -0
  115. package/dist/TimePopover.js +441 -0
  116. package/dist/TimePopover.mjs +406 -0
  117. package/dist/iconos/index.d.mts +60 -0
  118. package/dist/iconos/index.d.ts +60 -0
  119. package/dist/iconos/index.js +621 -0
  120. package/dist/iconos/index.mjs +548 -0
  121. package/dist/index.d.mts +32 -0
  122. package/dist/index.d.ts +32 -0
  123. package/dist/index.js +141 -0
  124. package/dist/index.mjs +70 -0
  125. package/package.json +178 -0
@@ -0,0 +1,406 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { createPortal } from "react-dom";
5
+ const pad2 = (n) => n < 10 ? `0${n}` : String(n);
6
+ function TimePopover({
7
+ anchorEl,
8
+ hh,
9
+ mm,
10
+ onChange,
11
+ onClose,
12
+ step = 5
13
+ }) {
14
+ const popRef = React.useRef(null);
15
+ const [pos, setPos] = React.useState({ top: -9999, left: -9999 });
16
+ const [H, setH] = React.useState(hh);
17
+ const [M, setM] = React.useState(mm);
18
+ React.useEffect(() => {
19
+ setH(hh);
20
+ }, [hh]);
21
+ React.useEffect(() => {
22
+ setM(mm);
23
+ }, [mm]);
24
+ const commit = (h, m) => {
25
+ setH(h);
26
+ setM(m);
27
+ onChange(h, m);
28
+ };
29
+ const place = React.useCallback(() => {
30
+ const a = anchorEl == null ? void 0 : anchorEl.getBoundingClientRect();
31
+ if (!a) return;
32
+ const W = 220, Hh = 128, GAP = 8, MARGIN = 8;
33
+ let left = Math.min(a.left, window.innerWidth - W - MARGIN);
34
+ left = Math.max(MARGIN, left);
35
+ let top = a.bottom + GAP;
36
+ if (top + Hh > window.innerHeight) top = Math.max(MARGIN, a.top - GAP - Hh);
37
+ setPos({ top, left });
38
+ }, [anchorEl]);
39
+ React.useEffect(() => {
40
+ place();
41
+ const onDown = (e) => {
42
+ var _a;
43
+ const t = e.target;
44
+ if ((_a = popRef.current) == null ? void 0 : _a.contains(t)) return;
45
+ if (anchorEl && t instanceof Node && anchorEl.contains(t)) return;
46
+ onClose();
47
+ };
48
+ const onKey = (e) => {
49
+ if (e.key === "Escape") onClose();
50
+ };
51
+ const onScroll = () => place();
52
+ window.addEventListener("pointerdown", onDown, true);
53
+ window.addEventListener("keydown", onKey);
54
+ window.addEventListener("scroll", onScroll, true);
55
+ window.addEventListener("resize", onScroll);
56
+ return () => {
57
+ window.removeEventListener("pointerdown", onDown, true);
58
+ window.removeEventListener("keydown", onKey);
59
+ window.removeEventListener("scroll", onScroll, true);
60
+ window.removeEventListener("resize", onScroll);
61
+ };
62
+ }, [place, onClose, anchorEl]);
63
+ const incH = (d) => commit((H + d + 24) % 24, M);
64
+ const incM = (d) => {
65
+ const t = (H * 60 + M + d + 24 * 60) % (24 * 60);
66
+ commit(Math.floor(t / 60), t % 60);
67
+ };
68
+ const onKeyDown = (e) => {
69
+ if (e.key === "ArrowUp") {
70
+ e.preventDefault();
71
+ incH(1);
72
+ } else if (e.key === "ArrowDown") {
73
+ e.preventDefault();
74
+ incH(-1);
75
+ } else if (e.key === "ArrowRight") {
76
+ e.preventDefault();
77
+ incM(+step);
78
+ } else if (e.key === "ArrowLeft") {
79
+ e.preventDefault();
80
+ incM(-step);
81
+ } else if (e.key === "Enter") onClose();
82
+ };
83
+ const body = /* @__PURE__ */ jsxs(
84
+ "div",
85
+ {
86
+ ref: popRef,
87
+ role: "dialog",
88
+ "aria-label": "Selector de hora",
89
+ tabIndex: 0,
90
+ "data-dtf-pop": true,
91
+ onPointerDownCapture: (e) => e.stopPropagation(),
92
+ onKeyDown,
93
+ style: { position: "fixed", top: pos.top, left: pos.left, zIndex: 1e5 },
94
+ className: "w-64 rounded-2xl border border-slate-200 bg-white p-3 shadow-xl dark:border-white/10 dark:bg-[#0e0d0e]",
95
+ children: [
96
+ /* @__PURE__ */ jsx("div", { className: "mb-2 text-sm font-medium text-slate-700 dark:text-slate-200", children: "Selecciona hora" }),
97
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-2", children: [
98
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-stretch gap-2", children: [
99
+ /* @__PURE__ */ jsx(
100
+ "button",
101
+ {
102
+ type: "button",
103
+ className: "h-8 rounded-lg ring-1 ring-slate-200 hover:bg-slate-50 active:scale-95 dark:ring-white/10 dark:hover:bg-white/10",
104
+ onClick: () => incH(1),
105
+ "aria-label": "Aumentar hora",
106
+ children: "+"
107
+ }
108
+ ),
109
+ /* @__PURE__ */ jsx(
110
+ "input",
111
+ {
112
+ inputMode: "numeric",
113
+ "aria-label": "Hora",
114
+ value: pad2(H),
115
+ onChange: (e) => {
116
+ const v = e.target.value.replace(/\D/g, "").slice(-2);
117
+ if (!v) return;
118
+ let n = parseInt(v, 10);
119
+ if (Number.isNaN(n)) return;
120
+ if (n > 23) n = 23;
121
+ commit(n, M);
122
+ },
123
+ className: "h-10 rounded-lg text-center text-lg ring-1 ring-slate-200 outline-none focus:ring-2 focus:ring-slate-300 dark:ring-white/10 dark:bg-white/5"
124
+ }
125
+ ),
126
+ /* @__PURE__ */ jsx(
127
+ "button",
128
+ {
129
+ type: "button",
130
+ className: "h-8 rounded-lg ring-1 ring-slate-200 hover:bg-slate-50 active:scale-95 dark:ring-white/10 dark:hover:bg-white/10",
131
+ onClick: () => incH(-1),
132
+ "aria-label": "Disminuir hora",
133
+ children: "\u2212"
134
+ }
135
+ )
136
+ ] }),
137
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-stretch gap-2", children: [
138
+ /* @__PURE__ */ jsx(
139
+ "button",
140
+ {
141
+ type: "button",
142
+ className: "h-8 rounded-lg ring-1 ring-slate-200 hover:bg-slate-50 active:scale-95 dark:ring-white/10 dark:hover:bg-white/10",
143
+ onClick: () => incM(+step),
144
+ "aria-label": "Aumentar minutos",
145
+ children: "+"
146
+ }
147
+ ),
148
+ /* @__PURE__ */ jsx(
149
+ "input",
150
+ {
151
+ inputMode: "numeric",
152
+ "aria-label": "Minutos",
153
+ value: pad2(M),
154
+ onChange: (e) => {
155
+ const v = e.target.value.replace(/\D/g, "").slice(-2);
156
+ if (!v) return;
157
+ let n = parseInt(v, 10);
158
+ if (Number.isNaN(n)) return;
159
+ if (n > 59) n = 59;
160
+ commit(H, n);
161
+ },
162
+ className: "h-10 rounded-lg text-center text-lg ring-1 ring-slate-200 outline-none focus:ring-2 focus:ring-slate-300 dark:ring-white/10 dark:bg-white/5"
163
+ }
164
+ ),
165
+ /* @__PURE__ */ jsx(
166
+ "button",
167
+ {
168
+ type: "button",
169
+ className: "h-8 rounded-lg ring-1 ring-slate-200 hover:bg-slate-50 active:scale-95 dark:ring-white/10 dark:hover:bg-white/10",
170
+ onClick: () => incM(-step),
171
+ "aria-label": "Disminuir minutos",
172
+ children: "\u2212"
173
+ }
174
+ )
175
+ ] })
176
+ ] }),
177
+ /* @__PURE__ */ jsxs("div", { className: "mt-3 flex items-center justify-between", children: [
178
+ /* @__PURE__ */ jsx(
179
+ "button",
180
+ {
181
+ type: "button",
182
+ className: "rounded-xl px-2.5 py-1.5 text-sm ring-1 ring-slate-200 hover:bg-slate-50 active:scale-[0.98] dark:ring-white/10 dark:hover:bg-white/10",
183
+ onClick: () => {
184
+ const t = /* @__PURE__ */ new Date();
185
+ const rounded = Math.round(t.getMinutes() / step) * step % 60;
186
+ commit(t.getHours(), rounded);
187
+ },
188
+ children: "Ahora"
189
+ }
190
+ ),
191
+ /* @__PURE__ */ jsx(
192
+ "button",
193
+ {
194
+ type: "button",
195
+ className: "rounded-xl bg-slate-900 px-3 py-1.5 text-sm text-white hover:opacity-95 active:scale-[0.98] dark:bg-white dark:text-slate-900",
196
+ onClick: onClose,
197
+ children: "Listo"
198
+ }
199
+ )
200
+ ] })
201
+ ]
202
+ }
203
+ );
204
+ return createPortal(body, document.body);
205
+ }
206
+ function WeekPopover({ anchorEl, cursor, value, onCursorChange, onPick, onClose }) {
207
+ var _a, _b;
208
+ const popRef = React.useRef(null);
209
+ const [pos, setPos] = React.useState({ top: -9999, left: -9999 });
210
+ const place = React.useCallback(() => {
211
+ const a = anchorEl == null ? void 0 : anchorEl.getBoundingClientRect();
212
+ if (!a) return;
213
+ const W = 360, H = 320, GAP = 8, M = 8;
214
+ let left = Math.min(a.left, window.innerWidth - W - M);
215
+ left = Math.max(M, left);
216
+ let top = a.bottom + GAP;
217
+ if (top + H > window.innerHeight) top = Math.max(M, a.top - GAP - H);
218
+ setPos({ top, left });
219
+ }, [anchorEl]);
220
+ React.useEffect(() => {
221
+ place();
222
+ const onDown = (e) => {
223
+ var _a2;
224
+ const t = e.target;
225
+ if ((_a2 = popRef.current) == null ? void 0 : _a2.contains(t)) return;
226
+ if (anchorEl && anchorEl.contains(t)) return;
227
+ onClose();
228
+ };
229
+ const onScroll = () => place();
230
+ const onKey = (e) => {
231
+ if (e.key === "Escape") onClose();
232
+ };
233
+ window.addEventListener("pointerdown", onDown, true);
234
+ window.addEventListener("scroll", onScroll, true);
235
+ window.addEventListener("resize", onScroll);
236
+ window.addEventListener("keydown", onKey);
237
+ return () => {
238
+ window.removeEventListener("pointerdown", onDown, true);
239
+ window.removeEventListener("scroll", onScroll, true);
240
+ window.removeEventListener("resize", onScroll);
241
+ window.removeEventListener("keydown", onKey);
242
+ };
243
+ }, [place, onClose, anchorEl]);
244
+ const year = cursor.getFullYear();
245
+ const month = cursor.getMonth();
246
+ const firstOfMonth = new Date(year, month, 1);
247
+ const start = new Date(firstOfMonth);
248
+ start.setDate(firstOfMonth.getDate() - firstOfMonth.getDay());
249
+ const lastOfMonth = new Date(year, month + 1, 0);
250
+ const end = new Date(lastOfMonth);
251
+ end.setDate(lastOfMonth.getDate() + (6 - lastOfMonth.getDay()));
252
+ const weeks = [];
253
+ for (let d = new Date(start); d <= end; d.setDate(d.getDate() + 7)) {
254
+ const from = new Date(d);
255
+ const to = new Date(d);
256
+ to.setDate(to.getDate() + 6);
257
+ weeks.push({ from, to });
258
+ }
259
+ const selFrom = (_a = value == null ? void 0 : value.from) != null ? _a : null;
260
+ const selTo = (_b = value == null ? void 0 : value.to) != null ? _b : null;
261
+ const body = /* @__PURE__ */ jsxs("div", { ref: popRef, style: { position: "fixed", top: pos.top, left: pos.left, zIndex: 1e5 }, className: "w-[340px] rounded-2xl border border-slate-200 bg-white p-3 shadow-xl dark:border-white/10 dark:bg-[#0e0d0e]", children: [
262
+ /* @__PURE__ */ jsxs("div", { className: "mb-2 flex items-center justify-between", children: [
263
+ /* @__PURE__ */ jsx(
264
+ "button",
265
+ {
266
+ className: "rounded-lg border border-slate-200 px-2 py-1 text-sm hover:bg-slate-50 dark:border-white/10 dark:hover:bg-white/10",
267
+ onClick: () => onCursorChange(new Date(year, month - 1, 1)),
268
+ children: "\u25C0"
269
+ }
270
+ ),
271
+ /* @__PURE__ */ jsx("div", { className: "text-sm font-semibold", children: cursor.toLocaleDateString("es-MX", { month: "long", year: "numeric" }) }),
272
+ /* @__PURE__ */ jsx(
273
+ "button",
274
+ {
275
+ className: "rounded-lg border border-slate-200 px-2 py-1 text-sm hover:bg-slate-50 dark:border-white/10 dark:hover:bg-white/10",
276
+ onClick: () => onCursorChange(new Date(year, month + 1, 1)),
277
+ children: "\u25B6"
278
+ }
279
+ )
280
+ ] }),
281
+ /* @__PURE__ */ jsx("div", { className: "grid gap-2", children: weeks.map((w, idx) => {
282
+ const isSel = selFrom && selTo && sameDay(selFrom, w.from) && sameDay(selTo, w.to);
283
+ return /* @__PURE__ */ jsxs(
284
+ "button",
285
+ {
286
+ className: `flex items-center justify-between rounded-xl border px-3 py-2 text-sm ${isSel ? "bg-slate-900 text-white border-slate-900 dark:bg-white dark:text-slate-900 dark:border-white" : "border-slate-200 hover:bg-slate-100 dark:border-white/10 dark:hover:bg-white/10"}`,
287
+ onClick: () => onPick(w.from, w.to),
288
+ children: [
289
+ /* @__PURE__ */ jsxs("span", { children: [
290
+ "Semana ",
291
+ idx + 1
292
+ ] }),
293
+ /* @__PURE__ */ jsx("span", { className: "text-xs opacity-80", children: formatWeekLabel(w.from, w.to) })
294
+ ]
295
+ },
296
+ `${w.from.toISOString()}-${w.to.toISOString()}`
297
+ );
298
+ }) })
299
+ ] });
300
+ return createPortal(body, document.body);
301
+ }
302
+ function sameDay(a, b) {
303
+ return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
304
+ }
305
+ function formatWeekLabel(from, to) {
306
+ const opts = { day: "2-digit", month: "short" };
307
+ try {
308
+ const f = from.toLocaleDateString("es-MX", opts);
309
+ const t = to.toLocaleDateString("es-MX", opts);
310
+ return `${f} \u2013 ${t}`;
311
+ } catch {
312
+ return `${from.getDate()}/${from.getMonth() + 1} \u2013 ${to.getDate()}/${to.getMonth() + 1}`;
313
+ }
314
+ }
315
+ function MonthPopover({ anchorEl, cursor, value, onCursorChange, onPick, onClose }) {
316
+ var _a;
317
+ const popRef = React.useRef(null);
318
+ const [pos, setPos] = React.useState({ top: -9999, left: -9999 });
319
+ const place = React.useCallback(() => {
320
+ const a = anchorEl == null ? void 0 : anchorEl.getBoundingClientRect();
321
+ if (!a) return;
322
+ const W = 320, H = 360, GAP = 8, M = 8;
323
+ let left = Math.min(a.left, window.innerWidth - W - M);
324
+ left = Math.max(M, left);
325
+ let top = a.bottom + GAP;
326
+ if (top + H > window.innerHeight) top = Math.max(M, a.top - GAP - H);
327
+ setPos({ top, left });
328
+ }, [anchorEl]);
329
+ React.useEffect(() => {
330
+ place();
331
+ const onDown = (e) => {
332
+ var _a2;
333
+ const t = e.target;
334
+ if ((_a2 = popRef.current) == null ? void 0 : _a2.contains(t)) return;
335
+ if (anchorEl && anchorEl.contains(t)) return;
336
+ onClose();
337
+ };
338
+ const onScroll = () => place();
339
+ const onKey = (e) => {
340
+ if (e.key === "Escape") onClose();
341
+ };
342
+ window.addEventListener("pointerdown", onDown, true);
343
+ window.addEventListener("scroll", onScroll, true);
344
+ window.addEventListener("resize", onScroll);
345
+ window.addEventListener("keydown", onKey);
346
+ return () => {
347
+ window.removeEventListener("pointerdown", onDown, true);
348
+ window.removeEventListener("scroll", onScroll, true);
349
+ window.removeEventListener("resize", onScroll);
350
+ window.removeEventListener("keydown", onKey);
351
+ };
352
+ }, [place, onClose, anchorEl]);
353
+ const year = cursor.getFullYear();
354
+ const months = ["Ene", "Feb", "Mar", "Abr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dic"];
355
+ let selYear = null;
356
+ let selMonthIdx = null;
357
+ if (value) {
358
+ const parts = value.split("-").map(Number);
359
+ if (parts.length >= 2 && Number.isFinite(parts[0]) && Number.isFinite(parts[1])) {
360
+ selYear = parts[0];
361
+ selMonthIdx = ((_a = parts[1]) != null ? _a : 1) - 1;
362
+ }
363
+ }
364
+ const body = /* @__PURE__ */ jsxs("div", { ref: popRef, style: { position: "fixed", top: pos.top, left: pos.left, zIndex: 1e5 }, className: "w-[300px] rounded-2xl border border-slate-200 bg-white p-3 shadow-xl dark:border-white/10 dark:bg-[#0e0d0e]", children: [
365
+ /* @__PURE__ */ jsxs("div", { className: "mb-2 flex items-center justify-between", children: [
366
+ /* @__PURE__ */ jsx(
367
+ "button",
368
+ {
369
+ className: "rounded-lg border border-slate-200 px-2 py-1 text-sm hover:bg-slate-50 dark:border-white/10 dark:hover:bg-white/10",
370
+ onClick: () => onCursorChange(new Date(year - 1, 0, 1)),
371
+ children: "\u25C0"
372
+ }
373
+ ),
374
+ /* @__PURE__ */ jsx("div", { className: "text-sm font-semibold", children: year }),
375
+ /* @__PURE__ */ jsx(
376
+ "button",
377
+ {
378
+ className: "rounded-lg border border-slate-200 px-2 py-1 text-sm hover:bg-slate-50 dark:border-white/10 dark:hover:bg-white/10",
379
+ onClick: () => onCursorChange(new Date(year + 1, 0, 1)),
380
+ children: "\u25B6"
381
+ }
382
+ )
383
+ ] }),
384
+ /* @__PURE__ */ jsx("div", { className: "grid grid-cols-3 gap-2", children: months.map((m, idx) => {
385
+ const isSel = selYear === year && selMonthIdx === idx;
386
+ const base = "rounded-xl border px-2 py-2 text-sm ";
387
+ const light = isSel ? "bg-slate-900 text-white border-slate-900" : "border-slate-200 hover:bg-slate-100";
388
+ const dark = isSel ? "dark:bg-white dark:text-slate-900 dark:border-white" : "dark:border-white/10 dark:hover:bg-white/10";
389
+ return /* @__PURE__ */ jsx(
390
+ "button",
391
+ {
392
+ className: `${base} ${light} ${dark}`,
393
+ onClick: () => onPick(new Date(year, idx, 1)),
394
+ children: m
395
+ },
396
+ idx
397
+ );
398
+ }) })
399
+ ] });
400
+ return createPortal(body, document.body);
401
+ }
402
+ export {
403
+ MonthPopover,
404
+ WeekPopover,
405
+ TimePopover as default
406
+ };
@@ -0,0 +1,60 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ declare const FlechaAbajo: ({ props }: any) => react_jsx_runtime.JSX.Element;
4
+ declare const FlechaArriba: ({ props }: any) => react_jsx_runtime.JSX.Element;
5
+ declare const CirculoPeligro: () => react_jsx_runtime.JSX.Element;
6
+ declare const CirculoPorDefecto: () => react_jsx_runtime.JSX.Element;
7
+ declare const CirculoExito: () => react_jsx_runtime.JSX.Element;
8
+ declare const CirculoAdvertencia: () => react_jsx_runtime.JSX.Element;
9
+ declare const Borrar: (props: any) => react_jsx_runtime.JSX.Element;
10
+ declare const Ojo: (props: any) => react_jsx_runtime.JSX.Element;
11
+ declare const Editar: (props: any) => react_jsx_runtime.JSX.Element;
12
+ declare const Sobre: ({ fill, filled, size, height, width, ...props }: any) => react_jsx_runtime.JSX.Element;
13
+ declare const Nota: ({ fill, filled, size, height, width, ...props }: any) => react_jsx_runtime.JSX.Element;
14
+ declare const LlamadaTelefonica: ({ fill, filled, size, height, width, ...props }: any) => react_jsx_runtime.JSX.Element;
15
+ declare const Tarea: ({ fill, filled, size, height, width, ...props }: any) => react_jsx_runtime.JSX.Element;
16
+ declare const Usuarios: ({ fill, filled, size, height, width, ...props }: any) => react_jsx_runtime.JSX.Element;
17
+ declare const Tickets: ({ fill, filled, size, height, width, ...props }: any) => react_jsx_runtime.JSX.Element;
18
+ declare const Edificio: ({ fill, filled, size, height, width, ...props }: any) => react_jsx_runtime.JSX.Element;
19
+ declare const Cajas: ({ fill, filled, size, height, width, ...props }: any) => react_jsx_runtime.JSX.Element;
20
+ declare const Cotizaciones: ({ fill, filled, size, height, width, ...props }: any) => react_jsx_runtime.JSX.Element;
21
+ declare const CajaDeMano: ({ fill, filled, size, height, width, ...props }: any) => react_jsx_runtime.JSX.Element;
22
+ declare const Directorio: ({ fill, filled, size, height, width, ...props }: any) => react_jsx_runtime.JSX.Element;
23
+ declare const Tablero: ({ fill, filled, size, height, width, ...props }: any) => react_jsx_runtime.JSX.Element;
24
+ declare const AuditarDocumento: ({ fill, size, height, width, ...props }: any) => react_jsx_runtime.JSX.Element;
25
+ declare const RolesIcon: ({ fill }: any) => react_jsx_runtime.JSX.Element;
26
+ declare const PermsIcon: ({ fill }: any) => react_jsx_runtime.JSX.Element;
27
+ declare const OrdersIcon: ({ fill }: any) => react_jsx_runtime.JSX.Element;
28
+ declare const PromoIcon: ({ fill }: any) => react_jsx_runtime.JSX.Element;
29
+ declare const ProductsIcon: ({ fill }: any) => react_jsx_runtime.JSX.Element;
30
+ declare const ClientsIcon: ({ fill }: any) => react_jsx_runtime.JSX.Element;
31
+ declare const EyeIcon: () => react_jsx_runtime.JSX.Element;
32
+ declare const PencilIcon: () => react_jsx_runtime.JSX.Element;
33
+ declare const TrashIcon: ({ clase }: {
34
+ clase: string;
35
+ }) => react_jsx_runtime.JSX.Element;
36
+ declare const DashboardIcon: () => react_jsx_runtime.JSX.Element;
37
+ declare const UserIcon: () => react_jsx_runtime.JSX.Element;
38
+ declare const UsersIcon: () => react_jsx_runtime.JSX.Element;
39
+ declare const LogoutIcon: () => react_jsx_runtime.JSX.Element;
40
+ declare const MenuIcon: () => react_jsx_runtime.JSX.Element;
41
+ declare const CloseIcon: () => react_jsx_runtime.JSX.Element;
42
+ declare const ChevronLeftRightIcon: ({ collapsed }: {
43
+ collapsed?: boolean;
44
+ }) => react_jsx_runtime.JSX.Element;
45
+ declare const MenuPuntosVerticalIcon: () => react_jsx_runtime.JSX.Element;
46
+ declare const ContraseniaDeEmailIcon: () => react_jsx_runtime.JSX.Element;
47
+ declare const UsuarioProhibidoIcon: ({ clase }: {
48
+ clase: string;
49
+ }) => react_jsx_runtime.JSX.Element;
50
+ declare const MarketingDigital: ({ fill }: any) => react_jsx_runtime.JSX.Element;
51
+ declare const Retroalimentacion: ({ fill }: any) => react_jsx_runtime.JSX.Element;
52
+ declare const Calendario: ({ fill }: any) => react_jsx_runtime.JSX.Element;
53
+ declare const MediosDeComunicacionSocial: ({ fill }: any) => react_jsx_runtime.JSX.Element;
54
+ declare const Imagenes: ({ fill }: any) => react_jsx_runtime.JSX.Element;
55
+ declare const EscaneoFacial: ({ fill }: any) => react_jsx_runtime.JSX.Element;
56
+ declare const Empresa: ({ fill }: any) => react_jsx_runtime.JSX.Element;
57
+ declare const TrabajoEnEquipo: ({ fill }: any) => react_jsx_runtime.JSX.Element;
58
+ declare const Aficionados: ({ fill }: any) => react_jsx_runtime.JSX.Element;
59
+
60
+ export { Aficionados, AuditarDocumento, Borrar, CajaDeMano, Cajas, Calendario, ChevronLeftRightIcon, CirculoAdvertencia, CirculoExito, CirculoPeligro, CirculoPorDefecto, ClientsIcon, CloseIcon, ContraseniaDeEmailIcon, Cotizaciones, DashboardIcon, Directorio, Edificio, Editar, Empresa, EscaneoFacial, EyeIcon, FlechaAbajo, FlechaArriba, Imagenes, LlamadaTelefonica, LogoutIcon, MarketingDigital, MediosDeComunicacionSocial, MenuIcon, MenuPuntosVerticalIcon, Nota, Ojo, OrdersIcon, PencilIcon, PermsIcon, ProductsIcon, PromoIcon, Retroalimentacion, RolesIcon, Sobre, Tablero, Tarea, Tickets, TrabajoEnEquipo, TrashIcon, UserIcon, UsersIcon, UsuarioProhibidoIcon, Usuarios };
@@ -0,0 +1,60 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ declare const FlechaAbajo: ({ props }: any) => react_jsx_runtime.JSX.Element;
4
+ declare const FlechaArriba: ({ props }: any) => react_jsx_runtime.JSX.Element;
5
+ declare const CirculoPeligro: () => react_jsx_runtime.JSX.Element;
6
+ declare const CirculoPorDefecto: () => react_jsx_runtime.JSX.Element;
7
+ declare const CirculoExito: () => react_jsx_runtime.JSX.Element;
8
+ declare const CirculoAdvertencia: () => react_jsx_runtime.JSX.Element;
9
+ declare const Borrar: (props: any) => react_jsx_runtime.JSX.Element;
10
+ declare const Ojo: (props: any) => react_jsx_runtime.JSX.Element;
11
+ declare const Editar: (props: any) => react_jsx_runtime.JSX.Element;
12
+ declare const Sobre: ({ fill, filled, size, height, width, ...props }: any) => react_jsx_runtime.JSX.Element;
13
+ declare const Nota: ({ fill, filled, size, height, width, ...props }: any) => react_jsx_runtime.JSX.Element;
14
+ declare const LlamadaTelefonica: ({ fill, filled, size, height, width, ...props }: any) => react_jsx_runtime.JSX.Element;
15
+ declare const Tarea: ({ fill, filled, size, height, width, ...props }: any) => react_jsx_runtime.JSX.Element;
16
+ declare const Usuarios: ({ fill, filled, size, height, width, ...props }: any) => react_jsx_runtime.JSX.Element;
17
+ declare const Tickets: ({ fill, filled, size, height, width, ...props }: any) => react_jsx_runtime.JSX.Element;
18
+ declare const Edificio: ({ fill, filled, size, height, width, ...props }: any) => react_jsx_runtime.JSX.Element;
19
+ declare const Cajas: ({ fill, filled, size, height, width, ...props }: any) => react_jsx_runtime.JSX.Element;
20
+ declare const Cotizaciones: ({ fill, filled, size, height, width, ...props }: any) => react_jsx_runtime.JSX.Element;
21
+ declare const CajaDeMano: ({ fill, filled, size, height, width, ...props }: any) => react_jsx_runtime.JSX.Element;
22
+ declare const Directorio: ({ fill, filled, size, height, width, ...props }: any) => react_jsx_runtime.JSX.Element;
23
+ declare const Tablero: ({ fill, filled, size, height, width, ...props }: any) => react_jsx_runtime.JSX.Element;
24
+ declare const AuditarDocumento: ({ fill, size, height, width, ...props }: any) => react_jsx_runtime.JSX.Element;
25
+ declare const RolesIcon: ({ fill }: any) => react_jsx_runtime.JSX.Element;
26
+ declare const PermsIcon: ({ fill }: any) => react_jsx_runtime.JSX.Element;
27
+ declare const OrdersIcon: ({ fill }: any) => react_jsx_runtime.JSX.Element;
28
+ declare const PromoIcon: ({ fill }: any) => react_jsx_runtime.JSX.Element;
29
+ declare const ProductsIcon: ({ fill }: any) => react_jsx_runtime.JSX.Element;
30
+ declare const ClientsIcon: ({ fill }: any) => react_jsx_runtime.JSX.Element;
31
+ declare const EyeIcon: () => react_jsx_runtime.JSX.Element;
32
+ declare const PencilIcon: () => react_jsx_runtime.JSX.Element;
33
+ declare const TrashIcon: ({ clase }: {
34
+ clase: string;
35
+ }) => react_jsx_runtime.JSX.Element;
36
+ declare const DashboardIcon: () => react_jsx_runtime.JSX.Element;
37
+ declare const UserIcon: () => react_jsx_runtime.JSX.Element;
38
+ declare const UsersIcon: () => react_jsx_runtime.JSX.Element;
39
+ declare const LogoutIcon: () => react_jsx_runtime.JSX.Element;
40
+ declare const MenuIcon: () => react_jsx_runtime.JSX.Element;
41
+ declare const CloseIcon: () => react_jsx_runtime.JSX.Element;
42
+ declare const ChevronLeftRightIcon: ({ collapsed }: {
43
+ collapsed?: boolean;
44
+ }) => react_jsx_runtime.JSX.Element;
45
+ declare const MenuPuntosVerticalIcon: () => react_jsx_runtime.JSX.Element;
46
+ declare const ContraseniaDeEmailIcon: () => react_jsx_runtime.JSX.Element;
47
+ declare const UsuarioProhibidoIcon: ({ clase }: {
48
+ clase: string;
49
+ }) => react_jsx_runtime.JSX.Element;
50
+ declare const MarketingDigital: ({ fill }: any) => react_jsx_runtime.JSX.Element;
51
+ declare const Retroalimentacion: ({ fill }: any) => react_jsx_runtime.JSX.Element;
52
+ declare const Calendario: ({ fill }: any) => react_jsx_runtime.JSX.Element;
53
+ declare const MediosDeComunicacionSocial: ({ fill }: any) => react_jsx_runtime.JSX.Element;
54
+ declare const Imagenes: ({ fill }: any) => react_jsx_runtime.JSX.Element;
55
+ declare const EscaneoFacial: ({ fill }: any) => react_jsx_runtime.JSX.Element;
56
+ declare const Empresa: ({ fill }: any) => react_jsx_runtime.JSX.Element;
57
+ declare const TrabajoEnEquipo: ({ fill }: any) => react_jsx_runtime.JSX.Element;
58
+ declare const Aficionados: ({ fill }: any) => react_jsx_runtime.JSX.Element;
59
+
60
+ export { Aficionados, AuditarDocumento, Borrar, CajaDeMano, Cajas, Calendario, ChevronLeftRightIcon, CirculoAdvertencia, CirculoExito, CirculoPeligro, CirculoPorDefecto, ClientsIcon, CloseIcon, ContraseniaDeEmailIcon, Cotizaciones, DashboardIcon, Directorio, Edificio, Editar, Empresa, EscaneoFacial, EyeIcon, FlechaAbajo, FlechaArriba, Imagenes, LlamadaTelefonica, LogoutIcon, MarketingDigital, MediosDeComunicacionSocial, MenuIcon, MenuPuntosVerticalIcon, Nota, Ojo, OrdersIcon, PencilIcon, PermsIcon, ProductsIcon, PromoIcon, Retroalimentacion, RolesIcon, Sobre, Tablero, Tarea, Tickets, TrabajoEnEquipo, TrashIcon, UserIcon, UsersIcon, UsuarioProhibidoIcon, Usuarios };