@allxsmith/bestax-bulma 5.45.0 → 5.45.1
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.
|
@@ -9,7 +9,14 @@ export interface ModalProps extends Omit<React.HTMLAttributes<HTMLDivElement>, '
|
|
|
9
9
|
active?: boolean;
|
|
10
10
|
/** Alias for `active`. Whether the modal is open/visible. */
|
|
11
11
|
isActive?: boolean;
|
|
12
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* Called to ask for the modal to close. The props form calls it from the
|
|
14
|
+
* background and the close button it renders. In the compound form,
|
|
15
|
+
* `Modal.Close` calls it unless you give it an `onClick` of your own, and
|
|
16
|
+
* `Modal.Background` doesn't call it on its own: pass it
|
|
17
|
+
* `onClick={onClose}` for a click on the background to close the modal.
|
|
18
|
+
* Escape calls it in both forms unless `closeOnEscape` is `false`.
|
|
19
|
+
*/
|
|
13
20
|
onClose?: () => void;
|
|
14
21
|
/** Additional CSS classes for the modal. */
|
|
15
22
|
className?: string;
|
|
@@ -61,6 +68,7 @@ export interface ModalProps extends Omit<React.HTMLAttributes<HTMLDivElement>, '
|
|
|
61
68
|
}
|
|
62
69
|
/**
|
|
63
70
|
* Props for Modal.Background component.
|
|
71
|
+
* @extraProp {React.MouseEventHandler<HTMLDivElement>} [onClick] - Called when the background is clicked. The background doesn't call the modal's `onClose` on its own, so pass `onClick={onClose}` for a click on it to close the modal.
|
|
64
72
|
*/
|
|
65
73
|
export interface ModalBackgroundProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
66
74
|
/** Additional CSS classes. */
|
|
@@ -112,6 +120,7 @@ export interface ModalCardFootProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
112
120
|
* Props for Modal.Close component.
|
|
113
121
|
* @extraProp {'button' | 'submit' | 'reset'} [type='button'] - Button type. Defaults to `'button'`, so a close button inside a form does not submit it. Pass `'submit'` or `'reset'` and yours is used; any other value, or a spread carrying `type: undefined`, renders `'button'`.
|
|
114
122
|
* @extraProp {string} [aria-label='close'] - Accessible name. Pass your own to replace it. An empty one, or a spread carrying `'aria-label': undefined`, keeps the default rather than leaving the button unnamed.
|
|
123
|
+
* @extraProp {React.MouseEventHandler<HTMLButtonElement>} [onClick] - Called when the button is clicked. Without one, the button calls the `onClose` of the `Modal` around it. Yours replaces that rather than running before it, so call `onClose` from it if the button should still close the modal.
|
|
115
124
|
*/
|
|
116
125
|
export interface ModalCloseProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
117
126
|
/** Additional CSS classes. */
|
|
@@ -9,7 +9,14 @@ export interface ModalProps extends Omit<React.HTMLAttributes<HTMLDivElement>, '
|
|
|
9
9
|
active?: boolean;
|
|
10
10
|
/** Alias for `active`. Whether the modal is open/visible. */
|
|
11
11
|
isActive?: boolean;
|
|
12
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* Called to ask for the modal to close. The props form calls it from the
|
|
14
|
+
* background and the close button it renders. In the compound form,
|
|
15
|
+
* `Modal.Close` calls it unless you give it an `onClick` of your own, and
|
|
16
|
+
* `Modal.Background` doesn't call it on its own: pass it
|
|
17
|
+
* `onClick={onClose}` for a click on the background to close the modal.
|
|
18
|
+
* Escape calls it in both forms unless `closeOnEscape` is `false`.
|
|
19
|
+
*/
|
|
13
20
|
onClose?: () => void;
|
|
14
21
|
/** Additional CSS classes for the modal. */
|
|
15
22
|
className?: string;
|
|
@@ -61,6 +68,7 @@ export interface ModalProps extends Omit<React.HTMLAttributes<HTMLDivElement>, '
|
|
|
61
68
|
}
|
|
62
69
|
/**
|
|
63
70
|
* Props for Modal.Background component.
|
|
71
|
+
* @extraProp {React.MouseEventHandler<HTMLDivElement>} [onClick] - Called when the background is clicked. The background doesn't call the modal's `onClose` on its own, so pass `onClick={onClose}` for a click on it to close the modal.
|
|
64
72
|
*/
|
|
65
73
|
export interface ModalBackgroundProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
66
74
|
/** Additional CSS classes. */
|
|
@@ -112,6 +120,7 @@ export interface ModalCardFootProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
112
120
|
* Props for Modal.Close component.
|
|
113
121
|
* @extraProp {'button' | 'submit' | 'reset'} [type='button'] - Button type. Defaults to `'button'`, so a close button inside a form does not submit it. Pass `'submit'` or `'reset'` and yours is used; any other value, or a spread carrying `type: undefined`, renders `'button'`.
|
|
114
122
|
* @extraProp {string} [aria-label='close'] - Accessible name. Pass your own to replace it. An empty one, or a spread carrying `'aria-label': undefined`, keeps the default rather than leaving the button unnamed.
|
|
123
|
+
* @extraProp {React.MouseEventHandler<HTMLButtonElement>} [onClick] - Called when the button is clicked. Without one, the button calls the `onClose` of the `Modal` around it. Yours replaces that rather than running before it, so call `onClose` from it if the button should still close the modal.
|
|
115
124
|
*/
|
|
116
125
|
export interface ModalCloseProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
117
126
|
/** Additional CSS classes. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allxsmith/bestax-bulma",
|
|
3
|
-
"version": "5.45.
|
|
3
|
+
"version": "5.45.1",
|
|
4
4
|
"description": "A fully-typed React component library for the Bulma CSS framework. Build modern UIs quickly with reusable, accessible, and customizable Bulma-based React components.",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.esm.js",
|