framepexls-ui-lib 0.1.12 → 0.1.14

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 +1 -0
  2. package/dist/ActionIconButton.d.ts +1 -0
  3. package/dist/ActionIconButton.js +12 -9
  4. package/dist/ActionIconButton.mjs +13 -10
  5. package/dist/AppTopbar.d.mts +8 -9
  6. package/dist/AppTopbar.d.ts +8 -9
  7. package/dist/AppTopbar.js +31 -5
  8. package/dist/AppTopbar.mjs +21 -5
  9. package/dist/AvatarGroup.d.mts +14 -0
  10. package/dist/AvatarGroup.d.ts +14 -0
  11. package/dist/AvatarGroup.js +77 -0
  12. package/dist/AvatarGroup.mjs +47 -0
  13. package/dist/AvatarSquare.d.mts +2 -5
  14. package/dist/AvatarSquare.d.ts +2 -5
  15. package/dist/AvatarSquare.js +52 -3
  16. package/dist/AvatarSquare.mjs +52 -3
  17. package/dist/Badge.d.mts +2 -1
  18. package/dist/Badge.d.ts +2 -1
  19. package/dist/Badge.js +3 -1
  20. package/dist/Badge.mjs +3 -1
  21. package/dist/BadgeCluster.js +3 -3
  22. package/dist/BadgeCluster.mjs +3 -3
  23. package/dist/Button.d.mts +3 -4
  24. package/dist/Button.d.ts +3 -4
  25. package/dist/Button.js +97 -9
  26. package/dist/Button.mjs +87 -9
  27. package/dist/CalendarPanel.js +20 -3
  28. package/dist/CalendarPanel.mjs +10 -3
  29. package/dist/Card.d.mts +6 -0
  30. package/dist/Card.d.ts +6 -0
  31. package/dist/Card.js +52 -0
  32. package/dist/Card.mjs +22 -0
  33. package/dist/CheckboxPillsGroup.d.mts +2 -1
  34. package/dist/CheckboxPillsGroup.d.ts +2 -1
  35. package/dist/CheckboxPillsGroup.js +8 -4
  36. package/dist/CheckboxPillsGroup.mjs +8 -4
  37. package/dist/ColumnSelector.js +16 -2
  38. package/dist/ColumnSelector.mjs +6 -2
  39. package/dist/ComboSelect.d.mts +0 -2
  40. package/dist/ComboSelect.d.ts +0 -2
  41. package/dist/ComboSelect.js +8 -4
  42. package/dist/ComboSelect.mjs +8 -4
  43. package/dist/DateTimeField.d.mts +0 -5
  44. package/dist/DateTimeField.d.ts +0 -5
  45. package/dist/DateTimeField.js +17 -8
  46. package/dist/DateTimeField.mjs +17 -8
  47. package/dist/Dialog.d.mts +2 -5
  48. package/dist/Dialog.d.ts +2 -5
  49. package/dist/Dialog.js +21 -22
  50. package/dist/Dialog.mjs +21 -22
  51. package/dist/Drawer.d.mts +38 -0
  52. package/dist/Drawer.d.ts +38 -0
  53. package/dist/Drawer.js +139 -0
  54. package/dist/Drawer.mjs +102 -0
  55. package/dist/Dropdown.d.mts +0 -3
  56. package/dist/Dropdown.d.ts +0 -3
  57. package/dist/Dropdown.js +61 -42
  58. package/dist/Dropdown.mjs +51 -42
  59. package/dist/Input.d.mts +2 -0
  60. package/dist/Input.d.ts +2 -0
  61. package/dist/Input.js +20 -5
  62. package/dist/Input.mjs +20 -5
  63. package/dist/Link.d.mts +15 -0
  64. package/dist/Link.d.ts +15 -0
  65. package/dist/Link.js +93 -0
  66. package/dist/Link.mjs +63 -0
  67. package/dist/MediaCard.d.mts +15 -0
  68. package/dist/MediaCard.d.ts +15 -0
  69. package/dist/MediaCard.js +153 -0
  70. package/dist/MediaCard.mjs +123 -0
  71. package/dist/MediaSelector.d.mts +48 -0
  72. package/dist/MediaSelector.d.ts +48 -0
  73. package/dist/MediaSelector.js +225 -0
  74. package/dist/MediaSelector.mjs +195 -0
  75. package/dist/Money.d.mts +2 -1
  76. package/dist/Money.d.ts +2 -1
  77. package/dist/Money.js +26 -2
  78. package/dist/Money.mjs +26 -2
  79. package/dist/MultiComboSelect.js +6 -11
  80. package/dist/MultiComboSelect.mjs +6 -11
  81. package/dist/OrderButton.js +13 -1
  82. package/dist/OrderButton.mjs +3 -1
  83. package/dist/Pagination.d.mts +2 -1
  84. package/dist/Pagination.d.ts +2 -1
  85. package/dist/Pagination.js +40 -3
  86. package/dist/Pagination.mjs +30 -3
  87. package/dist/ReviewHistory.js +3 -9
  88. package/dist/ReviewHistory.mjs +3 -9
  89. package/dist/SearchInput.js +17 -42
  90. package/dist/SearchInput.mjs +17 -42
  91. package/dist/Select.js +5 -2
  92. package/dist/Select.mjs +5 -2
  93. package/dist/Sidebar.d.mts +2 -3
  94. package/dist/Sidebar.d.ts +2 -3
  95. package/dist/Sidebar.js +132 -24
  96. package/dist/Sidebar.mjs +132 -24
  97. package/dist/Steps.d.mts +0 -2
  98. package/dist/Steps.d.ts +0 -2
  99. package/dist/Steps.js +19 -6
  100. package/dist/Steps.mjs +9 -6
  101. package/dist/Table.js +3 -1
  102. package/dist/Table.mjs +3 -1
  103. package/dist/TimePanel.js +21 -7
  104. package/dist/TimePanel.mjs +11 -7
  105. package/dist/TimePopover.js +32 -15
  106. package/dist/TimePopover.mjs +32 -15
  107. package/dist/TimeRangeField.js +13 -6
  108. package/dist/TimeRangeField.mjs +13 -6
  109. package/dist/Toast.d.mts +53 -0
  110. package/dist/Toast.d.ts +53 -0
  111. package/dist/Toast.js +273 -0
  112. package/dist/Toast.mjs +238 -0
  113. package/dist/Tooltip.d.mts +15 -0
  114. package/dist/Tooltip.d.ts +15 -0
  115. package/dist/Tooltip.js +135 -0
  116. package/dist/Tooltip.mjs +105 -0
  117. package/dist/UploadCard.d.mts +27 -0
  118. package/dist/UploadCard.d.ts +27 -0
  119. package/dist/UploadCard.js +143 -0
  120. package/dist/UploadCard.mjs +113 -0
  121. package/dist/index.d.mts +10 -1
  122. package/dist/index.d.ts +10 -1
  123. package/dist/index.js +30 -1
  124. package/dist/index.mjs +58 -39
  125. package/package.json +1 -1
@@ -37,6 +37,8 @@ module.exports = __toCommonJS(TimePopover_exports);
37
37
  var import_jsx_runtime = require("react/jsx-runtime");
38
38
  var React = __toESM(require("react"));
39
39
  var import_react_dom = require("react-dom");
40
+ var import_Button = __toESM(require("./Button"));
41
+ var import_Input = __toESM(require("./Input"));
40
42
  const pad2 = (n) => n < 10 ? `0${n}` : String(n);
41
43
  function TimePopover({
42
44
  anchorEl,
@@ -148,8 +150,9 @@ function TimePopover({
148
150
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid grid-cols-2 gap-2", children: [
149
151
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-col items-stretch gap-2", children: [
150
152
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
151
- "button",
153
+ import_Button.default,
152
154
  {
155
+ unstyled: true,
153
156
  type: "button",
154
157
  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",
155
158
  onClick: () => incH(1),
@@ -158,8 +161,9 @@ function TimePopover({
158
161
  }
159
162
  ),
160
163
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
161
- "input",
164
+ import_Input.default,
162
165
  {
166
+ unstyled: true,
163
167
  inputMode: "numeric",
164
168
  "aria-label": "Hora",
165
169
  value: pad2(is12h ? hour12 : H),
@@ -184,8 +188,9 @@ function TimePopover({
184
188
  }
185
189
  ),
186
190
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
187
- "button",
191
+ import_Button.default,
188
192
  {
193
+ unstyled: true,
189
194
  type: "button",
190
195
  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",
191
196
  onClick: () => incH(-1),
@@ -196,8 +201,9 @@ function TimePopover({
196
201
  ] }),
197
202
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-col items-stretch gap-2", children: [
198
203
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
199
- "button",
204
+ import_Button.default,
200
205
  {
206
+ unstyled: true,
201
207
  type: "button",
202
208
  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",
203
209
  onClick: () => incM(+step),
@@ -206,8 +212,9 @@ function TimePopover({
206
212
  }
207
213
  ),
208
214
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
209
- "input",
215
+ import_Input.default,
210
216
  {
217
+ unstyled: true,
211
218
  inputMode: "numeric",
212
219
  "aria-label": "Minutos",
213
220
  value: pad2(M),
@@ -223,8 +230,9 @@ function TimePopover({
223
230
  }
224
231
  ),
225
232
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
226
- "button",
233
+ import_Button.default,
227
234
  {
235
+ unstyled: true,
228
236
  type: "button",
229
237
  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",
230
238
  onClick: () => incM(-step),
@@ -240,8 +248,9 @@ function TimePopover({
240
248
  const light = active ? "bg-slate-900 text-white ring-slate-900" : "ring-slate-200 hover:bg-slate-50";
241
249
  const dark = active ? "dark:bg-white dark:text-slate-900 dark:ring-white" : "dark:ring-white/10 dark:hover:bg-white/10";
242
250
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
243
- "button",
251
+ import_Button.default,
244
252
  {
253
+ unstyled: true,
245
254
  type: "button",
246
255
  className: `${base} ${light} ${dark}`,
247
256
  "aria-pressed": active,
@@ -257,8 +266,9 @@ function TimePopover({
257
266
  }) }),
258
267
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "mt-3 flex items-center justify-between", children: [
259
268
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
260
- "button",
269
+ import_Button.default,
261
270
  {
271
+ unstyled: true,
262
272
  type: "button",
263
273
  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",
264
274
  onClick: () => {
@@ -270,8 +280,9 @@ function TimePopover({
270
280
  }
271
281
  ),
272
282
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
273
- "button",
283
+ import_Button.default,
274
284
  {
285
+ unstyled: true,
275
286
  type: "button",
276
287
  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",
277
288
  onClick: onClose,
@@ -342,8 +353,9 @@ function WeekPopover({ anchorEl, cursor, value, onCursorChange, onPick, onClose
342
353
  const body = /* @__PURE__ */ (0, import_jsx_runtime.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: [
343
354
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "mb-2 flex items-center justify-between", children: [
344
355
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
345
- "button",
356
+ import_Button.default,
346
357
  {
358
+ unstyled: true,
347
359
  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",
348
360
  onClick: () => onCursorChange(new Date(year, month - 1, 1)),
349
361
  children: "\u25C0"
@@ -351,8 +363,9 @@ function WeekPopover({ anchorEl, cursor, value, onCursorChange, onPick, onClose
351
363
  ),
352
364
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "text-sm font-semibold", children: cursor.toLocaleDateString("es-MX", { month: "long", year: "numeric" }) }),
353
365
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
354
- "button",
366
+ import_Button.default,
355
367
  {
368
+ unstyled: true,
356
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",
357
370
  onClick: () => onCursorChange(new Date(year, month + 1, 1)),
358
371
  children: "\u25B6"
@@ -362,8 +375,9 @@ function WeekPopover({ anchorEl, cursor, value, onCursorChange, onPick, onClose
362
375
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "grid gap-2", children: weeks.map((w, idx) => {
363
376
  const isSel = selFrom && selTo && sameDay(selFrom, w.from) && sameDay(selTo, w.to);
364
377
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
365
- "button",
378
+ import_Button.default,
366
379
  {
380
+ unstyled: true,
367
381
  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"}`,
368
382
  onClick: () => onPick(w.from, w.to),
369
383
  children: [
@@ -445,8 +459,9 @@ function MonthPopover({ anchorEl, cursor, value, onCursorChange, onPick, onClose
445
459
  const body = /* @__PURE__ */ (0, import_jsx_runtime.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: [
446
460
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "mb-2 flex items-center justify-between", children: [
447
461
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
448
- "button",
462
+ import_Button.default,
449
463
  {
464
+ unstyled: true,
450
465
  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",
451
466
  onClick: () => onCursorChange(new Date(year - 1, 0, 1)),
452
467
  children: "\u25C0"
@@ -454,8 +469,9 @@ function MonthPopover({ anchorEl, cursor, value, onCursorChange, onPick, onClose
454
469
  ),
455
470
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "text-sm font-semibold", children: year }),
456
471
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
457
- "button",
472
+ import_Button.default,
458
473
  {
474
+ unstyled: true,
459
475
  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",
460
476
  onClick: () => onCursorChange(new Date(year + 1, 0, 1)),
461
477
  children: "\u25B6"
@@ -468,8 +484,9 @@ function MonthPopover({ anchorEl, cursor, value, onCursorChange, onPick, onClose
468
484
  const light = isSel ? "bg-slate-900 text-white border-slate-900" : "border-slate-200 hover:bg-slate-100";
469
485
  const dark = isSel ? "dark:bg-white dark:text-slate-900 dark:border-white" : "dark:border-white/10 dark:hover:bg-white/10";
470
486
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
471
- "button",
487
+ import_Button.default,
472
488
  {
489
+ unstyled: true,
473
490
  className: `${base} ${light} ${dark}`,
474
491
  onClick: () => onPick(new Date(year, idx, 1)),
475
492
  children: m
@@ -2,6 +2,8 @@
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
4
  import { createPortal } from "react-dom";
5
+ import Button from "./Button";
6
+ import Input from "./Input";
5
7
  const pad2 = (n) => n < 10 ? `0${n}` : String(n);
6
8
  function TimePopover({
7
9
  anchorEl,
@@ -113,8 +115,9 @@ function TimePopover({
113
115
  /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-2", children: [
114
116
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-stretch gap-2", children: [
115
117
  /* @__PURE__ */ jsx(
116
- "button",
118
+ Button,
117
119
  {
120
+ unstyled: true,
118
121
  type: "button",
119
122
  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",
120
123
  onClick: () => incH(1),
@@ -123,8 +126,9 @@ function TimePopover({
123
126
  }
124
127
  ),
125
128
  /* @__PURE__ */ jsx(
126
- "input",
129
+ Input,
127
130
  {
131
+ unstyled: true,
128
132
  inputMode: "numeric",
129
133
  "aria-label": "Hora",
130
134
  value: pad2(is12h ? hour12 : H),
@@ -149,8 +153,9 @@ function TimePopover({
149
153
  }
150
154
  ),
151
155
  /* @__PURE__ */ jsx(
152
- "button",
156
+ Button,
153
157
  {
158
+ unstyled: true,
154
159
  type: "button",
155
160
  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",
156
161
  onClick: () => incH(-1),
@@ -161,8 +166,9 @@ function TimePopover({
161
166
  ] }),
162
167
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-stretch gap-2", children: [
163
168
  /* @__PURE__ */ jsx(
164
- "button",
169
+ Button,
165
170
  {
171
+ unstyled: true,
166
172
  type: "button",
167
173
  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",
168
174
  onClick: () => incM(+step),
@@ -171,8 +177,9 @@ function TimePopover({
171
177
  }
172
178
  ),
173
179
  /* @__PURE__ */ jsx(
174
- "input",
180
+ Input,
175
181
  {
182
+ unstyled: true,
176
183
  inputMode: "numeric",
177
184
  "aria-label": "Minutos",
178
185
  value: pad2(M),
@@ -188,8 +195,9 @@ function TimePopover({
188
195
  }
189
196
  ),
190
197
  /* @__PURE__ */ jsx(
191
- "button",
198
+ Button,
192
199
  {
200
+ unstyled: true,
193
201
  type: "button",
194
202
  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",
195
203
  onClick: () => incM(-step),
@@ -205,8 +213,9 @@ function TimePopover({
205
213
  const light = active ? "bg-slate-900 text-white ring-slate-900" : "ring-slate-200 hover:bg-slate-50";
206
214
  const dark = active ? "dark:bg-white dark:text-slate-900 dark:ring-white" : "dark:ring-white/10 dark:hover:bg-white/10";
207
215
  return /* @__PURE__ */ jsx(
208
- "button",
216
+ Button,
209
217
  {
218
+ unstyled: true,
210
219
  type: "button",
211
220
  className: `${base} ${light} ${dark}`,
212
221
  "aria-pressed": active,
@@ -222,8 +231,9 @@ function TimePopover({
222
231
  }) }),
223
232
  /* @__PURE__ */ jsxs("div", { className: "mt-3 flex items-center justify-between", children: [
224
233
  /* @__PURE__ */ jsx(
225
- "button",
234
+ Button,
226
235
  {
236
+ unstyled: true,
227
237
  type: "button",
228
238
  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",
229
239
  onClick: () => {
@@ -235,8 +245,9 @@ function TimePopover({
235
245
  }
236
246
  ),
237
247
  /* @__PURE__ */ jsx(
238
- "button",
248
+ Button,
239
249
  {
250
+ unstyled: true,
240
251
  type: "button",
241
252
  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",
242
253
  onClick: onClose,
@@ -307,8 +318,9 @@ function WeekPopover({ anchorEl, cursor, value, onCursorChange, onPick, onClose
307
318
  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: [
308
319
  /* @__PURE__ */ jsxs("div", { className: "mb-2 flex items-center justify-between", children: [
309
320
  /* @__PURE__ */ jsx(
310
- "button",
321
+ Button,
311
322
  {
323
+ unstyled: true,
312
324
  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",
313
325
  onClick: () => onCursorChange(new Date(year, month - 1, 1)),
314
326
  children: "\u25C0"
@@ -316,8 +328,9 @@ function WeekPopover({ anchorEl, cursor, value, onCursorChange, onPick, onClose
316
328
  ),
317
329
  /* @__PURE__ */ jsx("div", { className: "text-sm font-semibold", children: cursor.toLocaleDateString("es-MX", { month: "long", year: "numeric" }) }),
318
330
  /* @__PURE__ */ jsx(
319
- "button",
331
+ Button,
320
332
  {
333
+ unstyled: true,
321
334
  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",
322
335
  onClick: () => onCursorChange(new Date(year, month + 1, 1)),
323
336
  children: "\u25B6"
@@ -327,8 +340,9 @@ function WeekPopover({ anchorEl, cursor, value, onCursorChange, onPick, onClose
327
340
  /* @__PURE__ */ jsx("div", { className: "grid gap-2", children: weeks.map((w, idx) => {
328
341
  const isSel = selFrom && selTo && sameDay(selFrom, w.from) && sameDay(selTo, w.to);
329
342
  return /* @__PURE__ */ jsxs(
330
- "button",
343
+ Button,
331
344
  {
345
+ unstyled: true,
332
346
  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"}`,
333
347
  onClick: () => onPick(w.from, w.to),
334
348
  children: [
@@ -410,8 +424,9 @@ function MonthPopover({ anchorEl, cursor, value, onCursorChange, onPick, onClose
410
424
  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: [
411
425
  /* @__PURE__ */ jsxs("div", { className: "mb-2 flex items-center justify-between", children: [
412
426
  /* @__PURE__ */ jsx(
413
- "button",
427
+ Button,
414
428
  {
429
+ unstyled: true,
415
430
  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",
416
431
  onClick: () => onCursorChange(new Date(year - 1, 0, 1)),
417
432
  children: "\u25C0"
@@ -419,8 +434,9 @@ function MonthPopover({ anchorEl, cursor, value, onCursorChange, onPick, onClose
419
434
  ),
420
435
  /* @__PURE__ */ jsx("div", { className: "text-sm font-semibold", children: year }),
421
436
  /* @__PURE__ */ jsx(
422
- "button",
437
+ Button,
423
438
  {
439
+ unstyled: true,
424
440
  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",
425
441
  onClick: () => onCursorChange(new Date(year + 1, 0, 1)),
426
442
  children: "\u25B6"
@@ -433,8 +449,9 @@ function MonthPopover({ anchorEl, cursor, value, onCursorChange, onPick, onClose
433
449
  const light = isSel ? "bg-slate-900 text-white border-slate-900" : "border-slate-200 hover:bg-slate-100";
434
450
  const dark = isSel ? "dark:bg-white dark:text-slate-900 dark:border-white" : "dark:border-white/10 dark:hover:bg-white/10";
435
451
  return /* @__PURE__ */ jsx(
436
- "button",
452
+ Button,
437
453
  {
454
+ unstyled: true,
438
455
  className: `${base} ${light} ${dark}`,
439
456
  onClick: () => onPick(new Date(year, idx, 1)),
440
457
  children: m
@@ -36,6 +36,7 @@ var import_jsx_runtime = require("react/jsx-runtime");
36
36
  var import_react = require("react");
37
37
  var import_react_dom = require("react-dom");
38
38
  var import_Input = __toESM(require("./Input"));
39
+ var import_Button = __toESM(require("./Button"));
39
40
  var import_TimePopover = __toESM(require("./TimePopover"));
40
41
  const pad2 = (n) => n < 10 ? `0${n}` : String(n);
41
42
  function parseHHmm(v) {
@@ -149,8 +150,9 @@ function TimeRangeField({ value, onValueChange, portal = true, portalId, clearab
149
150
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between gap-2 px-3 py-2 text-sm", children: [
150
151
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "font-medium", children: "Selecciona horario" }),
151
152
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
152
- "button",
153
+ import_Button.default,
153
154
  {
155
+ unstyled: true,
154
156
  type: "button",
155
157
  className: "rounded-xl bg-slate-900 px-3 py-1.5 text-white hover:opacity-95 active:scale-[0.98] dark:bg-white dark:text-slate-900",
156
158
  onClick: () => setOpen(false),
@@ -162,8 +164,9 @@ function TimeRangeField({ value, onValueChange, portal = true, portalId, clearab
162
164
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
163
165
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "mb-1 text-xs text-slate-500 dark:text-slate-300", children: "Desde" }),
164
166
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
165
- "button",
167
+ import_Button.default,
166
168
  {
169
+ unstyled: true,
167
170
  type: "button",
168
171
  className: "rounded-xl ring-1 ring-slate-200 px-2.5 py-1.5 font-medium tracking-wide hover:bg-slate-50 active:scale-[0.98] dark:ring-white/10 dark:hover:bg-white/10",
169
172
  onClick: () => setShowFromPop((v) => !v),
@@ -172,8 +175,9 @@ function TimeRangeField({ value, onValueChange, portal = true, portalId, clearab
172
175
  }
173
176
  ),
174
177
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
175
- "button",
178
+ import_Button.default,
176
179
  {
180
+ unstyled: true,
177
181
  type: "button",
178
182
  className: "ml-2 rounded-xl ring-1 ring-slate-200 px-2.5 py-1.5 hover:bg-slate-50 active:scale-[0.98] dark:ring-white/10 dark:hover:bg-white/10",
179
183
  onClick: () => {
@@ -188,8 +192,9 @@ function TimeRangeField({ value, onValueChange, portal = true, portalId, clearab
188
192
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
189
193
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "mb-1 text-xs text-slate-500 dark:text-slate-300", children: "Hasta" }),
190
194
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
191
- "button",
195
+ import_Button.default,
192
196
  {
197
+ unstyled: true,
193
198
  type: "button",
194
199
  className: "rounded-xl ring-1 ring-slate-200 px-2.5 py-1.5 font-medium tracking-wide hover:bg-slate-50 active:scale-[0.98] dark:ring-white/10 dark:hover:bg-white/10",
195
200
  onClick: () => setShowToPop((v) => !v),
@@ -198,8 +203,9 @@ function TimeRangeField({ value, onValueChange, portal = true, portalId, clearab
198
203
  }
199
204
  ),
200
205
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
201
- "button",
206
+ import_Button.default,
202
207
  {
208
+ unstyled: true,
203
209
  type: "button",
204
210
  className: "ml-2 rounded-xl ring-1 ring-slate-200 px-2.5 py-1.5 hover:bg-slate-50 active:scale-[0.98] dark:ring-white/10 dark:hover:bg-white/10",
205
211
  onClick: () => {
@@ -229,8 +235,9 @@ function TimeRangeField({ value, onValueChange, portal = true, portalId, clearab
229
235
  },
230
236
  disabled,
231
237
  rightSlot: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
232
- "button",
238
+ import_Button.default,
233
239
  {
240
+ unstyled: true,
234
241
  type: "button",
235
242
  className: "pointer-events-auto inline-flex h-7 w-7 items-center justify-center rounded-lg border border-slate-200 bg-white text-slate-600 hover:bg-slate-50 active:scale-95 dark:border-white/10 dark:bg-white/5",
236
243
  onClick: (e) => {
@@ -3,6 +3,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { useEffect, useMemo, useRef, useState } from "react";
4
4
  import { createPortal } from "react-dom";
5
5
  import Input from "./Input";
6
+ import Button from "./Button";
6
7
  import TimePopover from "./TimePopover";
7
8
  const pad2 = (n) => n < 10 ? `0${n}` : String(n);
8
9
  function parseHHmm(v) {
@@ -116,8 +117,9 @@ function TimeRangeField({ value, onValueChange, portal = true, portalId, clearab
116
117
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2 px-3 py-2 text-sm", children: [
117
118
  /* @__PURE__ */ jsx("div", { className: "font-medium", children: "Selecciona horario" }),
118
119
  /* @__PURE__ */ jsx(
119
- "button",
120
+ Button,
120
121
  {
122
+ unstyled: true,
121
123
  type: "button",
122
124
  className: "rounded-xl bg-slate-900 px-3 py-1.5 text-white hover:opacity-95 active:scale-[0.98] dark:bg-white dark:text-slate-900",
123
125
  onClick: () => setOpen(false),
@@ -129,8 +131,9 @@ function TimeRangeField({ value, onValueChange, portal = true, portalId, clearab
129
131
  /* @__PURE__ */ jsxs("div", { children: [
130
132
  /* @__PURE__ */ jsx("div", { className: "mb-1 text-xs text-slate-500 dark:text-slate-300", children: "Desde" }),
131
133
  /* @__PURE__ */ jsx(
132
- "button",
134
+ Button,
133
135
  {
136
+ unstyled: true,
134
137
  type: "button",
135
138
  className: "rounded-xl ring-1 ring-slate-200 px-2.5 py-1.5 font-medium tracking-wide hover:bg-slate-50 active:scale-[0.98] dark:ring-white/10 dark:hover:bg-white/10",
136
139
  onClick: () => setShowFromPop((v) => !v),
@@ -139,8 +142,9 @@ function TimeRangeField({ value, onValueChange, portal = true, portalId, clearab
139
142
  }
140
143
  ),
141
144
  /* @__PURE__ */ jsx(
142
- "button",
145
+ Button,
143
146
  {
147
+ unstyled: true,
144
148
  type: "button",
145
149
  className: "ml-2 rounded-xl ring-1 ring-slate-200 px-2.5 py-1.5 hover:bg-slate-50 active:scale-[0.98] dark:ring-white/10 dark:hover:bg-white/10",
146
150
  onClick: () => {
@@ -155,8 +159,9 @@ function TimeRangeField({ value, onValueChange, portal = true, portalId, clearab
155
159
  /* @__PURE__ */ jsxs("div", { children: [
156
160
  /* @__PURE__ */ jsx("div", { className: "mb-1 text-xs text-slate-500 dark:text-slate-300", children: "Hasta" }),
157
161
  /* @__PURE__ */ jsx(
158
- "button",
162
+ Button,
159
163
  {
164
+ unstyled: true,
160
165
  type: "button",
161
166
  className: "rounded-xl ring-1 ring-slate-200 px-2.5 py-1.5 font-medium tracking-wide hover:bg-slate-50 active:scale-[0.98] dark:ring-white/10 dark:hover:bg-white/10",
162
167
  onClick: () => setShowToPop((v) => !v),
@@ -165,8 +170,9 @@ function TimeRangeField({ value, onValueChange, portal = true, portalId, clearab
165
170
  }
166
171
  ),
167
172
  /* @__PURE__ */ jsx(
168
- "button",
173
+ Button,
169
174
  {
175
+ unstyled: true,
170
176
  type: "button",
171
177
  className: "ml-2 rounded-xl ring-1 ring-slate-200 px-2.5 py-1.5 hover:bg-slate-50 active:scale-[0.98] dark:ring-white/10 dark:hover:bg-white/10",
172
178
  onClick: () => {
@@ -196,8 +202,9 @@ function TimeRangeField({ value, onValueChange, portal = true, portalId, clearab
196
202
  },
197
203
  disabled,
198
204
  rightSlot: /* @__PURE__ */ jsx(
199
- "button",
205
+ Button,
200
206
  {
207
+ unstyled: true,
201
208
  type: "button",
202
209
  className: "pointer-events-auto inline-flex h-7 w-7 items-center justify-center rounded-lg border border-slate-200 bg-white text-slate-600 hover:bg-slate-50 active:scale-95 dark:border-white/10 dark:bg-white/5",
203
210
  onClick: (e) => {
@@ -0,0 +1,53 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import React__default from 'react';
3
+
4
+ type ToastType = "default" | "success" | "error" | "warning" | "info";
5
+ type ToastPlacement = "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
6
+ type ToastAction = {
7
+ label: string;
8
+ onClick?: () => void;
9
+ };
10
+ type ToastInput = {
11
+ id?: string;
12
+ title?: string;
13
+ description?: React__default.ReactNode;
14
+ type?: ToastType;
15
+ duration?: number;
16
+ dismissible?: boolean;
17
+ icon?: React__default.ReactNode;
18
+ action?: ToastAction;
19
+ };
20
+ type ToastItem = {
21
+ id: string;
22
+ title?: string;
23
+ description?: React__default.ReactNode;
24
+ type: ToastType;
25
+ duration: number;
26
+ dismissible: boolean;
27
+ icon?: React__default.ReactNode;
28
+ action?: ToastAction;
29
+ createdAt: number;
30
+ };
31
+ type ToastContextValue = {
32
+ add: (t: ToastInput) => string;
33
+ remove: (id: string) => void;
34
+ clear: () => void;
35
+ update: (id: string, patch: Partial<ToastInput>) => void;
36
+ success: (msg: string | ToastInput, opts?: Omit<ToastInput, "description" | "type">) => string;
37
+ error: (msg: string | ToastInput, opts?: Omit<ToastInput, "description" | "type">) => string;
38
+ warning: (msg: string | ToastInput, opts?: Omit<ToastInput, "description" | "type">) => string;
39
+ info: (msg: string | ToastInput, opts?: Omit<ToastInput, "description" | "type">) => string;
40
+ };
41
+ declare function useToast(): ToastContextValue;
42
+ type ProviderProps = {
43
+ placement?: ToastPlacement;
44
+ max?: number;
45
+ duration?: number;
46
+ children?: React__default.ReactNode;
47
+ };
48
+ declare function ToastProvider({ placement, max, duration, children }: ProviderProps): react_jsx_runtime.JSX.Element;
49
+ declare const _default: {
50
+ Provider: typeof ToastProvider;
51
+ };
52
+
53
+ export { type ToastAction, type ToastInput, type ToastItem, type ToastPlacement, ToastProvider, type ToastType, _default as default, useToast };
@@ -0,0 +1,53 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import React__default from 'react';
3
+
4
+ type ToastType = "default" | "success" | "error" | "warning" | "info";
5
+ type ToastPlacement = "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
6
+ type ToastAction = {
7
+ label: string;
8
+ onClick?: () => void;
9
+ };
10
+ type ToastInput = {
11
+ id?: string;
12
+ title?: string;
13
+ description?: React__default.ReactNode;
14
+ type?: ToastType;
15
+ duration?: number;
16
+ dismissible?: boolean;
17
+ icon?: React__default.ReactNode;
18
+ action?: ToastAction;
19
+ };
20
+ type ToastItem = {
21
+ id: string;
22
+ title?: string;
23
+ description?: React__default.ReactNode;
24
+ type: ToastType;
25
+ duration: number;
26
+ dismissible: boolean;
27
+ icon?: React__default.ReactNode;
28
+ action?: ToastAction;
29
+ createdAt: number;
30
+ };
31
+ type ToastContextValue = {
32
+ add: (t: ToastInput) => string;
33
+ remove: (id: string) => void;
34
+ clear: () => void;
35
+ update: (id: string, patch: Partial<ToastInput>) => void;
36
+ success: (msg: string | ToastInput, opts?: Omit<ToastInput, "description" | "type">) => string;
37
+ error: (msg: string | ToastInput, opts?: Omit<ToastInput, "description" | "type">) => string;
38
+ warning: (msg: string | ToastInput, opts?: Omit<ToastInput, "description" | "type">) => string;
39
+ info: (msg: string | ToastInput, opts?: Omit<ToastInput, "description" | "type">) => string;
40
+ };
41
+ declare function useToast(): ToastContextValue;
42
+ type ProviderProps = {
43
+ placement?: ToastPlacement;
44
+ max?: number;
45
+ duration?: number;
46
+ children?: React__default.ReactNode;
47
+ };
48
+ declare function ToastProvider({ placement, max, duration, children }: ProviderProps): react_jsx_runtime.JSX.Element;
49
+ declare const _default: {
50
+ Provider: typeof ToastProvider;
51
+ };
52
+
53
+ export { type ToastAction, type ToastInput, type ToastItem, type ToastPlacement, ToastProvider, type ToastType, _default as default, useToast };