bonsaif-ui 0.1.37 → 0.1.39
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/README.md +28 -0
- package/dist/bonsaif-ui.js +218 -216
- package/dist/bonsaif-ui.umd.cjs +3 -3
- package/dist/components/ui/ConfirmDialog.d.ts +3 -1
- package/dist/components/ui/ConfirmDialog.d.ts.map +1 -1
- package/dist/components/ui/Modal.d.ts +2 -1
- package/dist/components/ui/Modal.d.ts.map +1 -1
- package/dist/components/ui/index.d.ts +2 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -333,6 +333,34 @@ How it works:
|
|
|
333
333
|
6. Choosing the discard action calls `onDiscardChanges` first, then calls `onClose`.
|
|
334
334
|
7. If `hasUnsavedChanges` is `false`, close actions call `onClose` immediately.
|
|
335
335
|
|
|
336
|
+
#### Modal Backdrop Close
|
|
337
|
+
|
|
338
|
+
Use `closeOnBackdrop={false}` when a modal must stay open after clicking outside the panel. The close button and Escape behavior remain controlled separately through `showCloseButton` and `closeOnEscape`.
|
|
339
|
+
|
|
340
|
+
```tsx
|
|
341
|
+
<Modal
|
|
342
|
+
open={open}
|
|
343
|
+
onClose={() => setOpen(false)}
|
|
344
|
+
title="Editar registro"
|
|
345
|
+
closeOnBackdrop={false}
|
|
346
|
+
>
|
|
347
|
+
<AccountForm />
|
|
348
|
+
</Modal>
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
`ConfirmDialog` accepts the same prop when a confirmation should only close through the explicit cancel or confirm actions.
|
|
352
|
+
|
|
353
|
+
```tsx
|
|
354
|
+
<ConfirmDialog
|
|
355
|
+
open={confirmOpen}
|
|
356
|
+
title="Confirmar accion"
|
|
357
|
+
description="Esta accion requiere una decision explicita."
|
|
358
|
+
closeOnBackdrop={false}
|
|
359
|
+
onConfirm={confirmAction}
|
|
360
|
+
onCancel={() => setConfirmOpen(false)}
|
|
361
|
+
/>
|
|
362
|
+
```
|
|
363
|
+
|
|
336
364
|
### Feedback And Data
|
|
337
365
|
|
|
338
366
|
- `Alert`, `StatusBadge`, `EmptyState`, `LoadingState`: visible states and feedback.
|