@allxsmith/bestax-bulma 5.27.6 → 5.27.7
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/dist/bestax.css +1 -1
- package/dist/bestax.css.map +1 -1
- package/dist/esm/elements/Notification.js +1 -0
- package/dist/esm/elements/Notification.js.map +1 -1
- package/dist/esm/form/DateRangeInputBase.js +18 -3
- package/dist/esm/form/DateRangeInputBase.js.map +1 -1
- package/dist/esm/form/Field.js +3 -2
- package/dist/esm/form/Field.js.map +1 -1
- package/dist/esm/form/FormContext.js +3 -2
- package/dist/esm/form/FormContext.js.map +1 -1
- package/dist/extras.css +1 -1
- package/dist/extras.css.map +1 -1
- package/dist/index.cjs +24 -7
- package/dist/index.cjs.map +1 -1
- package/dist/types/elements/Notification.d.ts +5 -0
- package/dist/types/form/DateRangeInputBase.d.ts +5 -0
- package/dist/types/form/Field.d.ts +1 -1
- package/dist/types/form/FormContext.d.ts +3 -2
- package/dist/types-cjs/elements/Notification.d.ts +5 -0
- package/dist/types-cjs/form/DateRangeInputBase.d.ts +5 -0
- package/dist/types-cjs/form/Field.d.ts +1 -1
- package/dist/types-cjs/form/FormContext.d.ts +3 -2
- package/dist/versions/bestax-no-dark-mode.css +1 -1
- package/dist/versions/bestax-no-dark-mode.css.map +1 -1
- package/dist/versions/bestax-no-helpers-prefixed.css +1 -1
- package/dist/versions/bestax-no-helpers-prefixed.css.map +1 -1
- package/dist/versions/bestax-no-helpers.css +1 -1
- package/dist/versions/bestax-no-helpers.css.map +1 -1
- package/dist/versions/bestax-prefixed.css +1 -1
- package/dist/versions/bestax-prefixed.css.map +1 -1
- package/package.json +1 -1
- package/src/scss/elements/_index.scss +1 -0
- package/src/scss/elements/_notification.scss +69 -0
|
@@ -23,6 +23,11 @@ export interface NotificationProps extends React.HTMLAttributes<HTMLDivElement>,
|
|
|
23
23
|
/**
|
|
24
24
|
* Shows a close (delete) button in the notification. It renders
|
|
25
25
|
* `type="button"`, so it does not submit a form around it.
|
|
26
|
+
*
|
|
27
|
+
* The notification also takes `has-delete`, which pads its end by
|
|
28
|
+
* `--bulma-notification-delete-padding-inline-end` so the text clears the
|
|
29
|
+
* button. That rule ships in bestax's stylesheets, not Bulma's, so an app
|
|
30
|
+
* styled by Bulma's CSS alone keeps Bulma's padding.
|
|
26
31
|
*/
|
|
27
32
|
hasDelete?: boolean;
|
|
28
33
|
/** Callback fired when the delete button is clicked. */
|
|
@@ -163,6 +163,11 @@ export interface DateRangeInputBaseProps extends Omit<React.HTMLAttributes<HTMLD
|
|
|
163
163
|
/**
|
|
164
164
|
* Raw DateRangeInput: the two inputs and the popover calendar without
|
|
165
165
|
* Field/Control wrapping. Use `DateRangeInput` for the convenience wrapper.
|
|
166
|
+
* Composed in a labeled `Field`, its `role="group"` root points
|
|
167
|
+
* `aria-labelledby` at that `Field`'s label, `inline` too, as the wrapper's
|
|
168
|
+
* does, and each input keeps its own name. An `aria-label` or
|
|
169
|
+
* `aria-labelledby` you give it wins over the label, and an `aria-labelledby`
|
|
170
|
+
* key counts even when undefined, since it is spread over the group's own.
|
|
166
171
|
*
|
|
167
172
|
* @function
|
|
168
173
|
* @param {DateRangeInputBaseProps} props
|
|
@@ -12,7 +12,7 @@ export interface FieldProps extends React.HTMLAttributes<HTMLDivElement>, Omit<B
|
|
|
12
12
|
hasAddons?: boolean | 'centered' | 'right';
|
|
13
13
|
/** Constrains the field to its content's width (used inside horizontal field bodies). */
|
|
14
14
|
narrow?: boolean;
|
|
15
|
-
/** Field label, rendered above the widget. Automatically names the one control the Field holds: a composed `InputBase`, `SelectBase`, `TextAreaBase`, `DateInputBase`, `TimeInputBase` or `DateTimeInputBase` (an `inline` picker has no input, so it takes nothing), or a bestax input that renders a single input of its own (`Input`, `Select`, `TextArea`, `Numberinput`, `Slider`, `DateInput`, `TimeInput`, `DateTimeInput`, `Autocomplete`, `Taginput`, `File`), adopts a generated id that the label's `htmlFor` points at, and a group (`Radios`, `Checkboxes`, `Rate`, `DateRangeInput`) points `aria-labelledby` at the label's own id unless you gave the group an `aria-label` or `aria-labelledby`. A range `Slider` takes the id on its low thumb and also starts each thumb's name with the label through `aria-labelledby`, unless its `ariaLabel` names that thumb or its own `aria-label` or `aria-labelledby` takes the label's place. An `Autocomplete` also names its open suggestion list after the label through `aria-labelledby`. Nothing else takes the label: `Checkbox`, `Radio` and `Switch` are named by their own children. Only the single inputs take the `htmlFor`, so with a group or any other content it matches nothing. Pass `labelProps={{ htmlFor }}` to wire your own `id`, or `labelProps={{ htmlFor: undefined }}` to opt out. Skipped for `grouped`/`hasAddons` fields (multiple controls), and a nested `Field` starts its own scope, so a horizontal Field whose body holds an inner `Field` names the control there only when you wire it. Two controls in one plain labeled Field would both adopt the id, so give each an `id` of its own. */
|
|
15
|
+
/** Field label, rendered above the widget. Automatically names the one control the Field holds: a composed `InputBase`, `SelectBase`, `TextAreaBase`, `DateInputBase`, `TimeInputBase` or `DateTimeInputBase` (an `inline` picker has no input, so it takes nothing), or a bestax input that renders a single input of its own (`Input`, `Select`, `TextArea`, `Numberinput`, `Slider`, `DateInput`, `TimeInput`, `DateTimeInput`, `Autocomplete`, `Taginput`, `File`), adopts a generated id that the label's `htmlFor` points at, and a group (`Radios`, `Checkboxes`, `Rate`, `DateRangeInput`, or a composed `DateRangeInputBase`, `inline` or not) points `aria-labelledby` at the label's own id unless you gave the group an `aria-label` or `aria-labelledby`. A range `Slider` takes the id on its low thumb and also starts each thumb's name with the label through `aria-labelledby`, unless its `ariaLabel` names that thumb or its own `aria-label` or `aria-labelledby` takes the label's place. An `Autocomplete` also names its open suggestion list after the label through `aria-labelledby`. Nothing else takes the label: `Checkbox`, `Radio` and `Switch` are named by their own children. Only the single inputs take the `htmlFor`, so with a group or any other content it matches nothing. Pass `labelProps={{ htmlFor }}` to wire your own `id`, or `labelProps={{ htmlFor: undefined }}` to opt out. Skipped for `grouped`/`hasAddons` fields (multiple controls), and a nested `Field` starts its own scope, so a horizontal Field whose body holds an inner `Field` names the control there only when you wire it. Two controls in one plain labeled Field would both adopt the id, so give each an `id` of its own. */
|
|
16
16
|
label?: React.ReactNode;
|
|
17
17
|
/** Size for the label. */
|
|
18
18
|
labelSize?: 'small' | 'normal' | 'medium' | 'large';
|
|
@@ -115,8 +115,9 @@ export declare const useFieldLabelId: () => string | undefined;
|
|
|
115
115
|
export declare const FieldLabelIdProvider: React.Provider<string | undefined>;
|
|
116
116
|
/**
|
|
117
117
|
* The id of a labeled Field's own `<label>`, for a group control (Radios,
|
|
118
|
-
* Checkboxes, Rate, DateRangeInput) to point
|
|
119
|
-
* the label's `htmlFor`
|
|
118
|
+
* Checkboxes, Rate, DateRangeInput and DateRangeInputBase) to point
|
|
119
|
+
* `aria-labelledby` at, since a group cannot take the label's `htmlFor`
|
|
120
|
+
* (#939, #1005). Set under the same conditions as
|
|
120
121
|
* {@link useFieldLabelId}. Consumed through `useAutoLabelledBy`.
|
|
121
122
|
* Internal; not part of the public API.
|
|
122
123
|
*/
|
|
@@ -23,6 +23,11 @@ export interface NotificationProps extends React.HTMLAttributes<HTMLDivElement>,
|
|
|
23
23
|
/**
|
|
24
24
|
* Shows a close (delete) button in the notification. It renders
|
|
25
25
|
* `type="button"`, so it does not submit a form around it.
|
|
26
|
+
*
|
|
27
|
+
* The notification also takes `has-delete`, which pads its end by
|
|
28
|
+
* `--bulma-notification-delete-padding-inline-end` so the text clears the
|
|
29
|
+
* button. That rule ships in bestax's stylesheets, not Bulma's, so an app
|
|
30
|
+
* styled by Bulma's CSS alone keeps Bulma's padding.
|
|
26
31
|
*/
|
|
27
32
|
hasDelete?: boolean;
|
|
28
33
|
/** Callback fired when the delete button is clicked. */
|
|
@@ -163,6 +163,11 @@ export interface DateRangeInputBaseProps extends Omit<React.HTMLAttributes<HTMLD
|
|
|
163
163
|
/**
|
|
164
164
|
* Raw DateRangeInput: the two inputs and the popover calendar without
|
|
165
165
|
* Field/Control wrapping. Use `DateRangeInput` for the convenience wrapper.
|
|
166
|
+
* Composed in a labeled `Field`, its `role="group"` root points
|
|
167
|
+
* `aria-labelledby` at that `Field`'s label, `inline` too, as the wrapper's
|
|
168
|
+
* does, and each input keeps its own name. An `aria-label` or
|
|
169
|
+
* `aria-labelledby` you give it wins over the label, and an `aria-labelledby`
|
|
170
|
+
* key counts even when undefined, since it is spread over the group's own.
|
|
166
171
|
*
|
|
167
172
|
* @function
|
|
168
173
|
* @param {DateRangeInputBaseProps} props
|
|
@@ -12,7 +12,7 @@ export interface FieldProps extends React.HTMLAttributes<HTMLDivElement>, Omit<B
|
|
|
12
12
|
hasAddons?: boolean | 'centered' | 'right';
|
|
13
13
|
/** Constrains the field to its content's width (used inside horizontal field bodies). */
|
|
14
14
|
narrow?: boolean;
|
|
15
|
-
/** Field label, rendered above the widget. Automatically names the one control the Field holds: a composed `InputBase`, `SelectBase`, `TextAreaBase`, `DateInputBase`, `TimeInputBase` or `DateTimeInputBase` (an `inline` picker has no input, so it takes nothing), or a bestax input that renders a single input of its own (`Input`, `Select`, `TextArea`, `Numberinput`, `Slider`, `DateInput`, `TimeInput`, `DateTimeInput`, `Autocomplete`, `Taginput`, `File`), adopts a generated id that the label's `htmlFor` points at, and a group (`Radios`, `Checkboxes`, `Rate`, `DateRangeInput`) points `aria-labelledby` at the label's own id unless you gave the group an `aria-label` or `aria-labelledby`. A range `Slider` takes the id on its low thumb and also starts each thumb's name with the label through `aria-labelledby`, unless its `ariaLabel` names that thumb or its own `aria-label` or `aria-labelledby` takes the label's place. An `Autocomplete` also names its open suggestion list after the label through `aria-labelledby`. Nothing else takes the label: `Checkbox`, `Radio` and `Switch` are named by their own children. Only the single inputs take the `htmlFor`, so with a group or any other content it matches nothing. Pass `labelProps={{ htmlFor }}` to wire your own `id`, or `labelProps={{ htmlFor: undefined }}` to opt out. Skipped for `grouped`/`hasAddons` fields (multiple controls), and a nested `Field` starts its own scope, so a horizontal Field whose body holds an inner `Field` names the control there only when you wire it. Two controls in one plain labeled Field would both adopt the id, so give each an `id` of its own. */
|
|
15
|
+
/** Field label, rendered above the widget. Automatically names the one control the Field holds: a composed `InputBase`, `SelectBase`, `TextAreaBase`, `DateInputBase`, `TimeInputBase` or `DateTimeInputBase` (an `inline` picker has no input, so it takes nothing), or a bestax input that renders a single input of its own (`Input`, `Select`, `TextArea`, `Numberinput`, `Slider`, `DateInput`, `TimeInput`, `DateTimeInput`, `Autocomplete`, `Taginput`, `File`), adopts a generated id that the label's `htmlFor` points at, and a group (`Radios`, `Checkboxes`, `Rate`, `DateRangeInput`, or a composed `DateRangeInputBase`, `inline` or not) points `aria-labelledby` at the label's own id unless you gave the group an `aria-label` or `aria-labelledby`. A range `Slider` takes the id on its low thumb and also starts each thumb's name with the label through `aria-labelledby`, unless its `ariaLabel` names that thumb or its own `aria-label` or `aria-labelledby` takes the label's place. An `Autocomplete` also names its open suggestion list after the label through `aria-labelledby`. Nothing else takes the label: `Checkbox`, `Radio` and `Switch` are named by their own children. Only the single inputs take the `htmlFor`, so with a group or any other content it matches nothing. Pass `labelProps={{ htmlFor }}` to wire your own `id`, or `labelProps={{ htmlFor: undefined }}` to opt out. Skipped for `grouped`/`hasAddons` fields (multiple controls), and a nested `Field` starts its own scope, so a horizontal Field whose body holds an inner `Field` names the control there only when you wire it. Two controls in one plain labeled Field would both adopt the id, so give each an `id` of its own. */
|
|
16
16
|
label?: React.ReactNode;
|
|
17
17
|
/** Size for the label. */
|
|
18
18
|
labelSize?: 'small' | 'normal' | 'medium' | 'large';
|
|
@@ -115,8 +115,9 @@ export declare const useFieldLabelId: () => string | undefined;
|
|
|
115
115
|
export declare const FieldLabelIdProvider: React.Provider<string | undefined>;
|
|
116
116
|
/**
|
|
117
117
|
* The id of a labeled Field's own `<label>`, for a group control (Radios,
|
|
118
|
-
* Checkboxes, Rate, DateRangeInput) to point
|
|
119
|
-
* the label's `htmlFor`
|
|
118
|
+
* Checkboxes, Rate, DateRangeInput and DateRangeInputBase) to point
|
|
119
|
+
* `aria-labelledby` at, since a group cannot take the label's `htmlFor`
|
|
120
|
+
* (#939, #1005). Set under the same conditions as
|
|
120
121
|
* {@link useFieldLabelId}. Consumed through `useAutoLabelledBy`.
|
|
121
122
|
* Internal; not part of the public API.
|
|
122
123
|
*/
|