bonsaif-ui 0.1.105 → 0.1.118
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +59 -0
- package/README.md +21 -0
- package/dist/bonsaif-ui.js +7264 -6125
- package/dist/bonsaif-ui.umd.cjs +21 -21
- package/dist/components/layout/PageHeader.d.ts +1 -1
- package/dist/components/layout/PageHeader.d.ts.map +1 -1
- package/dist/components/ui/BonsaifWeekday.d.ts +4 -0
- package/dist/components/ui/BonsaifWeekday.d.ts.map +1 -0
- package/dist/components/ui/CalendarPicker.d.ts +2 -1
- package/dist/components/ui/CalendarPicker.d.ts.map +1 -1
- package/dist/components/ui/DataTable.d.ts +3 -1
- package/dist/components/ui/DataTable.d.ts.map +1 -1
- package/dist/components/ui/DateRangePicker.d.ts +7 -4
- package/dist/components/ui/DateRangePicker.d.ts.map +1 -1
- package/dist/components/ui/Drawer.d.ts +5 -2
- package/dist/components/ui/Drawer.d.ts.map +1 -1
- package/dist/components/ui/ImageLightbox.d.ts +55 -0
- package/dist/components/ui/ImageLightbox.d.ts.map +1 -0
- package/dist/components/ui/InteractiveDayButton.d.ts +9 -0
- package/dist/components/ui/InteractiveDayButton.d.ts.map +1 -0
- package/dist/components/ui/MultiDateCalendar.d.ts +27 -0
- package/dist/components/ui/MultiDateCalendar.d.ts.map +1 -0
- package/dist/components/ui/YearMultiDateCalendar.d.ts +19 -0
- package/dist/components/ui/YearMultiDateCalendar.d.ts.map +1 -0
- package/dist/components/ui/calendarDateUtils.d.ts +119 -0
- package/dist/components/ui/calendarDateUtils.d.ts.map +1 -0
- package/dist/components/ui/imageLightboxTypes.d.ts +12 -0
- package/dist/components/ui/imageLightboxTypes.d.ts.map +1 -0
- package/dist/components/ui/index.d.ts +9 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/openImageLightboxFromEvent.d.ts +4 -0
- package/dist/components/ui/openImageLightboxFromEvent.d.ts.map +1 -0
- package/dist/components/ui/useMultiDateInteraction.d.ts +25 -0
- package/dist/components/ui/useMultiDateInteraction.d.ts.map +1 -0
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,64 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.118 - 2026-08-14
|
|
4
|
+
|
|
5
|
+
- `ImageLightbox`: mueve `openImageLightboxFromEvent` a archivo aparte para corregir el warning `react-refresh/only-export-components`.
|
|
6
|
+
|
|
7
|
+
## 0.1.117 - 2026-08-14
|
|
8
|
+
|
|
9
|
+
- `ImageLightbox`: miniaturas del mismo tamaño (sin crecer); la activa solo a opacity 100%. `border-radius` uniforme (10px) en imagen principal y thumbs.
|
|
10
|
+
|
|
11
|
+
## 0.1.116 - 2026-08-14
|
|
12
|
+
|
|
13
|
+
- `ImageLightbox`: franja de miniaturas sin bordes (ni contenedor ni thumbs); la activa se distingue por opacidad y tamaño.
|
|
14
|
+
|
|
15
|
+
## 0.1.115 - 2026-08-14
|
|
16
|
+
|
|
17
|
+
- `ImageLightbox`: sin marco/matte detrás de la imagen (borde, padding y damero) para un look más limpio.
|
|
18
|
+
|
|
19
|
+
## 0.1.114 - 2026-08-14
|
|
20
|
+
|
|
21
|
+
- `ImageLightbox` / `ImageLightboxHost`: al cambiar de slide ya no se reanima el shrink hacia la miniatura original; el cierre solo hace FLIP de vuelta si sigues en la misma imagen que abriste (si no, fade).
|
|
22
|
+
- `ImageLightboxHost`: deja de resetear el índice a 0 al cerrar (`index=-1` + `Math.max`), que hacía que al cerrar desde otra slide la foto saltara/se minimizara en la primera.
|
|
23
|
+
|
|
24
|
+
## 0.1.113 - 2026-08-14
|
|
25
|
+
|
|
26
|
+
- `ImageLightbox`: el fondo translúcido usa el verde Bonsaif (`--bg-sidebar`, fallback `--primary`) en lugar de `--bg-main` (que en claro quedaba casi blanco).
|
|
27
|
+
|
|
28
|
+
## 0.1.112 - 2026-08-14
|
|
29
|
+
|
|
30
|
+
- `ImageLightbox`: chrome/backdrop/matte/miniaturas usan tokens de tema (`--bg-card`, `--bg-main`, `--border`, `--text-main`, `--primary`, etc.).
|
|
31
|
+
- `ImageLightbox`: animación de apertura/cierre desde `originRect` (FLIP): la imagen crece desde la miniatura clicada y se encoge al cerrar. `ImageLightboxHost` y `openImageLightboxFromEvent` capturan el `getBoundingClientRect()` automáticamente.
|
|
32
|
+
|
|
33
|
+
## 0.1.111 - 2026-08-14
|
|
34
|
+
|
|
35
|
+
- `ImageLightbox`: transición de slide direccional (slide + fade + blur suave) al cambiar de imagen, con loop.
|
|
36
|
+
|
|
37
|
+
## 0.1.110 - 2026-08-14
|
|
38
|
+
|
|
39
|
+
- `ImageLightbox`: `loop` (última → primera / primera → última) y `showThumbnails` (franja semitransparente inferior configurable). También en `ImageLightboxHost`.
|
|
40
|
+
|
|
41
|
+
## 0.1.109 - 2026-08-14
|
|
42
|
+
|
|
43
|
+
- `ImageLightbox`: botón para restablecer tamaño (centro + zoom 1×); animaciones más suaves al abrir/cerrar, zoom, cambio de slide y hover de controles.
|
|
44
|
+
|
|
45
|
+
## 0.1.108 - 2026-08-14
|
|
46
|
+
|
|
47
|
+
- `ImageLightbox`: controles siempre por encima de la imagen; backdrop con blur; botones frosted legibles en claro/oscuro; marco con damero para que la foto contraste sobre cualquier superficie.
|
|
48
|
+
- `ImageLightbox`: al reducir zoom (`-` / rueda) la imagen vuelve al centro; el pan se limita para que no se quede pegada a un borde.
|
|
49
|
+
|
|
50
|
+
## 0.1.107 - 2026-08-14
|
|
51
|
+
|
|
52
|
+
- `ImageLightbox` / `ImageLightboxHost`: lightbox de imágenes (portal) con zoom libre hasta `maxZoom` (default 8) aunque pixele, pan, rueda/pinch, contador y navegación entre slides. API cercana a yet-another-react-lightbox; el Host abre al hacer clic en `<img>` hijos (HTML enriquecido).
|
|
53
|
+
|
|
54
|
+
## 0.1.106 - 2026-08-12
|
|
55
|
+
|
|
56
|
+
- `PageHeader`: `subtitle` accepts `ReactNode` (not only `string`), so callers can render avatars or other rich greetings under the title.
|
|
57
|
+
|
|
58
|
+
## 0.1.105 - 2026-08-12
|
|
59
|
+
|
|
60
|
+
- `Drawer`: `loading` now enables the interaction-lock overlay automatically (spinner + `"Guardando…"` by default). Escape, backdrop, and form controls are blocked while saving; `disabled` still works for non-loading locks.
|
|
61
|
+
|
|
3
62
|
## 0.1.104 - 2026-08-10
|
|
4
63
|
|
|
5
64
|
- `Drawer`: when `disabled`, the lock overlay can show a centered spinner + status text (`disabledMessage`, or `"Guardando…"` automatically if `loading`). Escape/close are blocked while disabled.
|
package/README.md
CHANGED
|
@@ -40,6 +40,7 @@ For Next.js consumers using a local package or monorepo setup, add `transpilePac
|
|
|
40
40
|
| Search or filter a list | `SearchableSelect`, `CompactFilterSelect`, `CompactSearchInput` | Compact controls that work inside toolbars and table headers. |
|
|
41
41
|
| Show tabular records | `DataTable`, `Pagination` | Sorting, selection, loading, empty state, column width behavior, and paging. |
|
|
42
42
|
| Confirm or edit in context | `Drawer`, `Modal`, `ConfirmDialog` | Overlays with consistent chrome and guardrails for unsaved changes. |
|
|
43
|
+
| Preview images fullscreen | `ImageLightbox`, `ImageLightboxHost` | Free zoom (may pixelate), pan, counter, and multi-slide navigation. |
|
|
43
44
|
| Explain status | `Alert`, `StatusBadge`, `StatusSelect`, `EmptyState`, `LoadingState` | Clear operational feedback for data states and workflows. |
|
|
44
45
|
| Compose related modules | `DynamicDetailTabs` | Parent-detail layout with lazy loaded child modules. |
|
|
45
46
|
|
|
@@ -254,8 +255,28 @@ function AccountFormExample() {
|
|
|
254
255
|
- `DropdownMenu`: contextual action menu.
|
|
255
256
|
- `CopyButton`, `CopyLinkButton`: clipboard utilities.
|
|
256
257
|
- `Modal`, `Drawer`, `ConfirmDialog`: overlays and confirmations.
|
|
258
|
+
- `ImageLightbox`, `ImageLightboxHost`: fullscreen image viewer with theme tokens, free zoom (may pixelate), pan, optional `loop` / `showThumbnails`, and open/close FLIP animation from the clicked image (`originRect`).
|
|
257
259
|
- `MouseTooltip`: lightweight hover tooltip.
|
|
258
260
|
|
|
261
|
+
#### Image lightbox
|
|
262
|
+
|
|
263
|
+
```tsx
|
|
264
|
+
import { ImageLightbox, ImageLightboxHost } from "bonsaif-ui";
|
|
265
|
+
|
|
266
|
+
<ImageLightbox
|
|
267
|
+
open={open}
|
|
268
|
+
onClose={() => setOpen(false)}
|
|
269
|
+
index={index}
|
|
270
|
+
onIndexChange={setIndex}
|
|
271
|
+
slides={[{ src: "/photo.jpg", alt: "Foto" }]}
|
|
272
|
+
maxZoom={8}
|
|
273
|
+
/>
|
|
274
|
+
|
|
275
|
+
<ImageLightboxHost maxZoom={8}>
|
|
276
|
+
<div dangerouslySetInnerHTML={{ __html: html }} />
|
|
277
|
+
</ImageLightboxHost>
|
|
278
|
+
```
|
|
279
|
+
|
|
259
280
|
#### Drawer Unsaved Changes Guard
|
|
260
281
|
|
|
261
282
|
Use `hasUnsavedChanges` when a drawer edits data and must not close silently. When the prop is `true`, the drawer intercepts its own close controls: backdrop click, Escape, the X button, and the default Cancel button. It shows a confirmation modal and only calls `onClose` after the user confirms that unsaved data can be discarded.
|