@allxsmith/bestax-bulma 5.8.4 → 5.9.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.
- package/AGENTS.md +15 -0
- package/CLAUDE.md +15 -0
- package/dist/index.cjs.js +61 -13
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +61 -13
- package/dist/index.esm.js.map +1 -1
- package/dist/types/elements/LinkButton.d.ts +1 -1
- package/dist/types/form/Field.d.ts +2 -2
- package/dist/types/form/FormContext.d.ts +10 -0
- package/dist/types/form/Input.d.ts +2 -2
- package/dist/types/form/Select.d.ts +2 -2
- package/dist/types/form/TextArea.d.ts +2 -2
- package/dist/types/form/useAutoLabelId.d.ts +3 -2
- package/llms.txt +1 -0
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import { ButtonProps } from './Button';
|
|
|
4
4
|
* Props for the LinkButton component.
|
|
5
5
|
*/
|
|
6
6
|
export interface LinkButtonProps extends Omit<ButtonProps, 'color' | 'isOutlined' | 'isInverted' | 'isLight'> {
|
|
7
|
-
/** Display mode. `text` has no underline; `ghost` uses default text color. */
|
|
7
|
+
/** Display mode. `text` has no underline and highlights its background on hover; `ghost` uses the default text color and underlines on hover; `underline` drops the button chrome entirely (transparent background and border) and underlines on hover or focus. */
|
|
8
8
|
variant?: 'text' | 'ghost' | 'underline';
|
|
9
9
|
/** Text color override for the button. */
|
|
10
10
|
color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger' | 'white' | 'light' | 'dark' | 'black';
|
|
@@ -12,11 +12,11 @@ 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. `
|
|
15
|
+
/** Field label, rendered above the widget. Automatically associated with a single composed `InputBase`, `SelectBase`, or `TextAreaBase` via a generated id and `htmlFor`. Pass `labelProps={{ htmlFor }}` to wire your own `id`, or `labelProps={{ htmlFor: undefined }}` to opt out. Skipped for `grouped`/`hasAddons` fields (multiple controls). */
|
|
16
16
|
label?: React.ReactNode;
|
|
17
17
|
/** Size for the label. */
|
|
18
18
|
labelSize?: 'small' | 'normal' | 'medium' | 'large';
|
|
19
|
-
/** Props for the label element
|
|
19
|
+
/** Props for the label element. An explicit `htmlFor` key — even set to `undefined` — takes over the association. */
|
|
20
20
|
labelProps?: React.LabelHTMLAttributes<HTMLLabelElement> & {
|
|
21
21
|
[key: string]: unknown;
|
|
22
22
|
};
|
|
@@ -12,6 +12,16 @@ export declare const useInsideControl: () => boolean;
|
|
|
12
12
|
export declare const FieldProvider: import("react").Provider<boolean>;
|
|
13
13
|
/** Provider for Control context — used internally by Control component. */
|
|
14
14
|
export declare const ControlProvider: import("react").Provider<boolean>;
|
|
15
|
+
/**
|
|
16
|
+
* The id a labeled Field wants its single composed control to adopt (#495).
|
|
17
|
+
* `undefined` outside a Field, in unlabeled/grouped/addons Fields, or when the
|
|
18
|
+
* user took over the association with an explicit `labelProps.htmlFor`.
|
|
19
|
+
* Consumed only by the single-control bases (InputBase, SelectBase,
|
|
20
|
+
* TextAreaBase). Internal; not part of the public API.
|
|
21
|
+
*/
|
|
22
|
+
export declare const useFieldLabelId: () => string | undefined;
|
|
23
|
+
/** Provider for the Field label-target id — used internally by Field. */
|
|
24
|
+
export declare const FieldLabelIdProvider: import("react").Provider<string | undefined>;
|
|
15
25
|
/**
|
|
16
26
|
* Shape of the Radios group context. The group provides:
|
|
17
27
|
* - `name`: shared form field name (Stage 1)
|
|
@@ -10,11 +10,11 @@ import { InputBaseProps } from './InputBase';
|
|
|
10
10
|
* Control-level (icons, loading) props.
|
|
11
11
|
*/
|
|
12
12
|
export interface InputProps extends InputBaseProps {
|
|
13
|
-
/** Field label. Automatically associated with the input via `htmlFor` — uses your `id` when provided, otherwise a generated one. Dropped inside an outer `Field
|
|
13
|
+
/** Field label. Automatically associated with the input via `htmlFor` — uses your `id` when provided, otherwise a generated one. Dropped inside an outer `Field`, whose own label associates instead when that `Field` generates a target id (not `grouped`/`hasAddons`, no explicit `labelProps.htmlFor`). */
|
|
14
14
|
label?: React.ReactNode;
|
|
15
15
|
/** Size for the label. */
|
|
16
16
|
labelSize?: FieldProps['labelSize'];
|
|
17
|
-
/** Props for the label element. An explicit `htmlFor`
|
|
17
|
+
/** Props for the label element when the component renders its own `Field`; dropped inside an outer `Field` (use that `Field`'s `labelProps` instead). An explicit `htmlFor` key — even `undefined` — overrides the automatic association and no id is generated. */
|
|
18
18
|
labelProps?: FieldProps['labelProps'];
|
|
19
19
|
/** Horizontal field layout. */
|
|
20
20
|
horizontal?: boolean;
|
|
@@ -10,11 +10,11 @@ import { SelectBaseProps } from './SelectBase';
|
|
|
10
10
|
* Control-level (icons, loading) props.
|
|
11
11
|
*/
|
|
12
12
|
export interface SelectProps extends SelectBaseProps {
|
|
13
|
-
/** Field label. Automatically associated with the select via `htmlFor` — uses your `id` when provided, otherwise a generated one. Dropped inside an outer `Field
|
|
13
|
+
/** Field label. Automatically associated with the select via `htmlFor` — uses your `id` when provided, otherwise a generated one. Dropped inside an outer `Field`, whose own label associates instead when that `Field` generates a target id (not `grouped`/`hasAddons`, no explicit `labelProps.htmlFor`). */
|
|
14
14
|
label?: React.ReactNode;
|
|
15
15
|
/** Size for the label. */
|
|
16
16
|
labelSize?: FieldProps['labelSize'];
|
|
17
|
-
/** Props for the label element. An explicit `htmlFor`
|
|
17
|
+
/** Props for the label element when the component renders its own `Field`; dropped inside an outer `Field` (use that `Field`'s `labelProps` instead). An explicit `htmlFor` key — even `undefined` — overrides the automatic association and no id is generated. */
|
|
18
18
|
labelProps?: FieldProps['labelProps'];
|
|
19
19
|
/** Horizontal field layout. */
|
|
20
20
|
horizontal?: boolean;
|
|
@@ -10,11 +10,11 @@ import { TextAreaBaseProps } from './TextAreaBase';
|
|
|
10
10
|
* Control-level (loading) props.
|
|
11
11
|
*/
|
|
12
12
|
export interface TextAreaProps extends TextAreaBaseProps {
|
|
13
|
-
/** Field label. Automatically associated with the textarea via `htmlFor` — uses your `id` when provided, otherwise a generated one. Dropped inside an outer `Field
|
|
13
|
+
/** Field label. Automatically associated with the textarea via `htmlFor` — uses your `id` when provided, otherwise a generated one. Dropped inside an outer `Field`, whose own label associates instead when that `Field` generates a target id (not `grouped`/`hasAddons`, no explicit `labelProps.htmlFor`). */
|
|
14
14
|
label?: React.ReactNode;
|
|
15
15
|
/** Size for the label. */
|
|
16
16
|
labelSize?: FieldProps['labelSize'];
|
|
17
|
-
/** Props for the label element. An explicit `htmlFor`
|
|
17
|
+
/** Props for the label element when the component renders its own `Field`; dropped inside an outer `Field` (use that `Field`'s `labelProps` instead). An explicit `htmlFor` key — even `undefined` — overrides the automatic association and no id is generated. */
|
|
18
18
|
labelProps?: FieldProps['labelProps'];
|
|
19
19
|
/** Horizontal field layout. */
|
|
20
20
|
horizontal?: boolean;
|
|
@@ -18,8 +18,9 @@ interface UseAutoLabelIdOptions {
|
|
|
18
18
|
* Associates the convenience `label` prop with its control (#368): generates
|
|
19
19
|
* an id for the control and returns labelProps carrying a matching `htmlFor`.
|
|
20
20
|
* A user-supplied `id` is used as the target instead of the generated one, and
|
|
21
|
-
* an explicit `
|
|
22
|
-
*
|
|
21
|
+
* an explicit `htmlFor` key in labelProps — even set to `undefined` — disables
|
|
22
|
+
* generation entirely: the user has taken over the association (#495 presence
|
|
23
|
+
* semantics). Internal; not part of the public API.
|
|
23
24
|
*/
|
|
24
25
|
export declare function useAutoLabelId({ label, id, labelProps, rendersLabel, }: UseAutoLabelIdOptions): {
|
|
25
26
|
controlId: string | undefined;
|
package/llms.txt
CHANGED
|
@@ -7,3 +7,4 @@ React components for Bulma v1.
|
|
|
7
7
|
- Any docs page as markdown: append .md (e.g. https://bestax.io/docs/api/elements/button.md)
|
|
8
8
|
- LLM guide: https://bestax.io/docs/guides/llms
|
|
9
9
|
- Agent skills: https://bestax.io/docs/skills/intro
|
|
10
|
+
- MCP server: `npx bestax-mcp` — setup at https://bestax.io/docs/guides/llms#mcp-server
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allxsmith/bestax-bulma",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.9.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.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|