@edux-design/forms 0.0.8 → 0.0.10
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 +1 -0
- package/dist/index.d.mts +30 -3
- package/dist/index.d.ts +30 -3
- package/dist/index.js +10508 -738
- package/dist/index.mjs +10518 -741
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -82,6 +82,7 @@ Every `Field` instance mounts a internal context. `Label`, `Input`, `Textarea`,
|
|
|
82
82
|
- Provides layout (`flex`, `gap-8`) and context wiring.
|
|
83
83
|
- Accepts any children; typically wraps `Label`, a control (`Input`, `Textarea`, `Radio`), and optional `Field.Feedback`.
|
|
84
84
|
- Set `orientation="horizontal"` when you need inline layouts (e.g., Switch + label) without affecting other form groups.
|
|
85
|
+
- Use `justify="between"` with `orientation="horizontal"` to align left labels and right controls across a column.
|
|
85
86
|
- Re-exports `Field.Feedback` for ergonomic composition.
|
|
86
87
|
|
|
87
88
|
### `<Label>`
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as react from 'react';
|
|
3
2
|
|
|
4
3
|
declare function Label({ children, hint, description, ...props }: {
|
|
@@ -21,6 +20,7 @@ declare function Label({ children, hint, description, ...props }: {
|
|
|
21
20
|
* clearable?: boolean,
|
|
22
21
|
* startIcon?: React.ReactNode,
|
|
23
22
|
* endIcon?: React.ReactNode|string,
|
|
23
|
+
* size?: "default"|"small",
|
|
24
24
|
* value?: any,
|
|
25
25
|
* onChange?: (e: React.ChangeEvent<HTMLInputElement> | { target: { value: string } }) => void,
|
|
26
26
|
* }} InputProps
|
|
@@ -49,6 +49,7 @@ type InputProps = React.InputHTMLAttributes<HTMLInputElement> & {
|
|
|
49
49
|
clearable?: boolean;
|
|
50
50
|
startIcon?: React.ReactNode;
|
|
51
51
|
endIcon?: React.ReactNode | string;
|
|
52
|
+
size?: "default" | "small";
|
|
52
53
|
value?: any;
|
|
53
54
|
onChange?: (e: React.ChangeEvent<HTMLInputElement> | {
|
|
54
55
|
target: {
|
|
@@ -57,7 +58,29 @@ type InputProps = React.InputHTMLAttributes<HTMLInputElement> & {
|
|
|
57
58
|
}) => void;
|
|
58
59
|
};
|
|
59
60
|
|
|
60
|
-
|
|
61
|
+
/**
|
|
62
|
+
* Minimal radio control wired to the surrounding Field context.
|
|
63
|
+
*
|
|
64
|
+
* @typedef {React.InputHTMLAttributes<HTMLInputElement> & {
|
|
65
|
+
* className?: string,
|
|
66
|
+
* }} RadioProps
|
|
67
|
+
*/
|
|
68
|
+
/**
|
|
69
|
+
* Radio component.
|
|
70
|
+
*
|
|
71
|
+
* Provides a styled radio input that integrates with the Field context and
|
|
72
|
+
* supports both controlled (`checked`) and uncontrolled (`defaultChecked`) use.
|
|
73
|
+
*
|
|
74
|
+
* @component
|
|
75
|
+
* @type {React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>}
|
|
76
|
+
*/
|
|
77
|
+
declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>;
|
|
78
|
+
/**
|
|
79
|
+
* Minimal radio control wired to the surrounding Field context.
|
|
80
|
+
*/
|
|
81
|
+
type RadioProps = React.InputHTMLAttributes<HTMLInputElement> & {
|
|
82
|
+
className?: string;
|
|
83
|
+
};
|
|
61
84
|
|
|
62
85
|
declare const Checkbox: react.ForwardRefExoticComponent<react.RefAttributes<any>>;
|
|
63
86
|
|
|
@@ -156,7 +179,10 @@ type TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement> & {
|
|
|
156
179
|
* @returns {React.ReactElement}
|
|
157
180
|
*/
|
|
158
181
|
declare function Feedback({ id, tone, children, className, ...rest }: FeedbackProps): React.ReactElement;
|
|
159
|
-
declare function Field({ children, orientation, className, }: FieldProps
|
|
182
|
+
declare function Field({ children, orientation, justify, className, }: FieldProps & {
|
|
183
|
+
orientation?: "vertical" | "horizontal";
|
|
184
|
+
justify?: "start" | "between";
|
|
185
|
+
}): React.ReactElement;
|
|
160
186
|
declare namespace Field {
|
|
161
187
|
export { Feedback };
|
|
162
188
|
}
|
|
@@ -220,6 +246,7 @@ declare const Option: react.ForwardRefExoticComponent<react.RefAttributes<any>>;
|
|
|
220
246
|
* @property {string} [contentClassName] - optional class for the popover content
|
|
221
247
|
* @property {string} [listClassName] - optional class for the list element
|
|
222
248
|
* @property {string} [optionClassName] - optional class for each option
|
|
249
|
+
* @property {"default"|"small"} [size="default"] - size variant for the combobox input
|
|
223
250
|
*/
|
|
224
251
|
declare const ComboboxRoot: react.ForwardRefExoticComponent<react.RefAttributes<any>>;
|
|
225
252
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as react from 'react';
|
|
3
2
|
|
|
4
3
|
declare function Label({ children, hint, description, ...props }: {
|
|
@@ -21,6 +20,7 @@ declare function Label({ children, hint, description, ...props }: {
|
|
|
21
20
|
* clearable?: boolean,
|
|
22
21
|
* startIcon?: React.ReactNode,
|
|
23
22
|
* endIcon?: React.ReactNode|string,
|
|
23
|
+
* size?: "default"|"small",
|
|
24
24
|
* value?: any,
|
|
25
25
|
* onChange?: (e: React.ChangeEvent<HTMLInputElement> | { target: { value: string } }) => void,
|
|
26
26
|
* }} InputProps
|
|
@@ -49,6 +49,7 @@ type InputProps = React.InputHTMLAttributes<HTMLInputElement> & {
|
|
|
49
49
|
clearable?: boolean;
|
|
50
50
|
startIcon?: React.ReactNode;
|
|
51
51
|
endIcon?: React.ReactNode | string;
|
|
52
|
+
size?: "default" | "small";
|
|
52
53
|
value?: any;
|
|
53
54
|
onChange?: (e: React.ChangeEvent<HTMLInputElement> | {
|
|
54
55
|
target: {
|
|
@@ -57,7 +58,29 @@ type InputProps = React.InputHTMLAttributes<HTMLInputElement> & {
|
|
|
57
58
|
}) => void;
|
|
58
59
|
};
|
|
59
60
|
|
|
60
|
-
|
|
61
|
+
/**
|
|
62
|
+
* Minimal radio control wired to the surrounding Field context.
|
|
63
|
+
*
|
|
64
|
+
* @typedef {React.InputHTMLAttributes<HTMLInputElement> & {
|
|
65
|
+
* className?: string,
|
|
66
|
+
* }} RadioProps
|
|
67
|
+
*/
|
|
68
|
+
/**
|
|
69
|
+
* Radio component.
|
|
70
|
+
*
|
|
71
|
+
* Provides a styled radio input that integrates with the Field context and
|
|
72
|
+
* supports both controlled (`checked`) and uncontrolled (`defaultChecked`) use.
|
|
73
|
+
*
|
|
74
|
+
* @component
|
|
75
|
+
* @type {React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>}
|
|
76
|
+
*/
|
|
77
|
+
declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>;
|
|
78
|
+
/**
|
|
79
|
+
* Minimal radio control wired to the surrounding Field context.
|
|
80
|
+
*/
|
|
81
|
+
type RadioProps = React.InputHTMLAttributes<HTMLInputElement> & {
|
|
82
|
+
className?: string;
|
|
83
|
+
};
|
|
61
84
|
|
|
62
85
|
declare const Checkbox: react.ForwardRefExoticComponent<react.RefAttributes<any>>;
|
|
63
86
|
|
|
@@ -156,7 +179,10 @@ type TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement> & {
|
|
|
156
179
|
* @returns {React.ReactElement}
|
|
157
180
|
*/
|
|
158
181
|
declare function Feedback({ id, tone, children, className, ...rest }: FeedbackProps): React.ReactElement;
|
|
159
|
-
declare function Field({ children, orientation, className, }: FieldProps
|
|
182
|
+
declare function Field({ children, orientation, justify, className, }: FieldProps & {
|
|
183
|
+
orientation?: "vertical" | "horizontal";
|
|
184
|
+
justify?: "start" | "between";
|
|
185
|
+
}): React.ReactElement;
|
|
160
186
|
declare namespace Field {
|
|
161
187
|
export { Feedback };
|
|
162
188
|
}
|
|
@@ -220,6 +246,7 @@ declare const Option: react.ForwardRefExoticComponent<react.RefAttributes<any>>;
|
|
|
220
246
|
* @property {string} [contentClassName] - optional class for the popover content
|
|
221
247
|
* @property {string} [listClassName] - optional class for the list element
|
|
222
248
|
* @property {string} [optionClassName] - optional class for each option
|
|
249
|
+
* @property {"default"|"small"} [size="default"] - size variant for the combobox input
|
|
223
250
|
*/
|
|
224
251
|
declare const ComboboxRoot: react.ForwardRefExoticComponent<react.RefAttributes<any>>;
|
|
225
252
|
|