@spark-ui/components 10.17.12 → 10.18.0
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/Input-g0LpWuv0.d.mts +17 -0
- package/dist/Input-g0LpWuv0.d.ts +17 -0
- package/dist/{Input-N8AWWSmt.d.mts → InputTrailingIcon-CZD9hydv.d.ts} +14 -10
- package/dist/{Input-N8AWWSmt.d.ts → InputTrailingIcon-DzmwLGtX.d.mts} +14 -10
- package/dist/docgen.json +285 -915
- package/dist/input/index.d.mts +3 -4
- package/dist/input/index.d.ts +3 -4
- package/dist/stepper/index.d.mts +51 -54
- package/dist/stepper/index.d.ts +51 -54
- package/dist/stepper/index.js +113 -1679
- package/dist/stepper/index.js.map +1 -1
- package/dist/stepper/index.mjs +135 -201
- package/dist/stepper/index.mjs.map +1 -1
- package/dist/textarea/index.d.mts +2 -2
- package/dist/textarea/index.d.ts +2 -2
- package/package.json +5 -7
- package/dist/InputTrailingIcon-BBp7sE6D.d.mts +0 -20
- package/dist/InputTrailingIcon-ZZx8PoJy.d.ts +0 -20
package/dist/input/index.d.mts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ComponentPropsWithoutRef, Ref } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
export {
|
|
3
|
+
import { c as InputGroup$1, d as InputLeadingIcon, e as InputTrailingIcon } from '../InputTrailingIcon-DzmwLGtX.mjs';
|
|
4
|
+
export { I as InputGroupProps, a as InputLeadingIconProps, b as InputTrailingIconProps } from '../InputTrailingIcon-DzmwLGtX.mjs';
|
|
5
5
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
6
6
|
import { VariantProps } from 'class-variance-authority';
|
|
7
|
-
|
|
8
|
-
export { I as InputLeadingIconProps, a as InputTrailingIconProps } from '../InputTrailingIcon-BBp7sE6D.mjs';
|
|
7
|
+
export { a as Input, I as InputProps } from '../Input-g0LpWuv0.mjs';
|
|
9
8
|
import '../icon/index.mjs';
|
|
10
9
|
|
|
11
10
|
interface InputClearButtonProps extends ComponentPropsWithoutRef<'button'> {
|
package/dist/input/index.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ComponentPropsWithoutRef, Ref } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
export {
|
|
3
|
+
import { c as InputGroup$1, d as InputLeadingIcon, e as InputTrailingIcon } from '../InputTrailingIcon-CZD9hydv.js';
|
|
4
|
+
export { I as InputGroupProps, a as InputLeadingIconProps, b as InputTrailingIconProps } from '../InputTrailingIcon-CZD9hydv.js';
|
|
5
5
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
6
6
|
import { VariantProps } from 'class-variance-authority';
|
|
7
|
-
|
|
8
|
-
export { I as InputLeadingIconProps, a as InputTrailingIconProps } from '../InputTrailingIcon-ZZx8PoJy.js';
|
|
7
|
+
export { a as Input, I as InputProps } from '../Input-g0LpWuv0.js';
|
|
9
8
|
import '../icon/index.js';
|
|
10
9
|
|
|
11
10
|
interface InputClearButtonProps extends ComponentPropsWithoutRef<'button'> {
|
package/dist/stepper/index.d.mts
CHANGED
|
@@ -1,81 +1,78 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { NumberFieldStateOptions } from '@react-stately/numberfield';
|
|
5
|
-
import { AriaNumberFieldProps } from '@react-types/numberfield';
|
|
2
|
+
import { NumberField } from '@base-ui-components/react/number-field';
|
|
3
|
+
import { ComponentProps, ReactNode, Ref } from 'react';
|
|
6
4
|
import { IconButtonProps } from '../icon-button/index.mjs';
|
|
7
|
-
import { I as
|
|
5
|
+
import { I as InputProps } from '../Input-g0LpWuv0.mjs';
|
|
8
6
|
import '../button/index.mjs';
|
|
9
7
|
import 'class-variance-authority/types';
|
|
10
8
|
import 'class-variance-authority';
|
|
11
9
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
interface DecrementProps extends Omit<ComponentProps<typeof NumberField.Decrement>, 'render'> {
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
asChild?: boolean;
|
|
13
|
+
}
|
|
14
|
+
interface IncrementProps extends Omit<ComponentProps<typeof NumberField.Increment>, 'render'> {
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
asChild?: boolean;
|
|
17
|
+
}
|
|
18
|
+
declare const Decrement: {
|
|
19
|
+
({ children, className, asChild, ...props }: DecrementProps): react_jsx_runtime.JSX.Element;
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
22
|
+
declare const Increment: {
|
|
23
|
+
({ children, className, asChild, ...props }: IncrementProps): react_jsx_runtime.JSX.Element;
|
|
24
|
+
displayName: string;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
interface Props extends Omit<ComponentProps<typeof NumberField.Input>, 'render'> {
|
|
28
|
+
children?: ReactNode;
|
|
29
|
+
}
|
|
30
|
+
declare const Input: {
|
|
31
|
+
({ className, ...props }: Props): react_jsx_runtime.JSX.Element;
|
|
32
|
+
displayName: string;
|
|
20
33
|
};
|
|
21
|
-
|
|
22
|
-
interface
|
|
23
|
-
|
|
34
|
+
|
|
35
|
+
interface StepperProps extends Omit<ComponentProps<typeof NumberField.Root>, 'render' | 'min' | 'max' | 'format'> {
|
|
36
|
+
children: ReactNode;
|
|
24
37
|
/**
|
|
25
|
-
*
|
|
38
|
+
* Assign a specific state to the group, either `error`, `alert` or `success`. The outline styles will be updated.
|
|
26
39
|
*/
|
|
27
|
-
|
|
40
|
+
state?: 'error' | 'alert' | 'success';
|
|
28
41
|
/**
|
|
29
|
-
*
|
|
42
|
+
* The minimum value of the input element.
|
|
30
43
|
*/
|
|
31
|
-
|
|
44
|
+
minValue?: number;
|
|
32
45
|
/**
|
|
33
|
-
*
|
|
46
|
+
* The maximum value of the input element.
|
|
34
47
|
*/
|
|
35
|
-
|
|
48
|
+
maxValue?: number;
|
|
36
49
|
/**
|
|
37
|
-
*
|
|
38
|
-
* @default 'fr'
|
|
50
|
+
* Options to format the input value.
|
|
39
51
|
*/
|
|
40
|
-
|
|
52
|
+
formatOptions?: Intl.NumberFormatOptions;
|
|
41
53
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
54
|
+
/**
|
|
55
|
+
* As we're using React Spectrum library to build this component, we also want
|
|
56
|
+
* to build our typing uppon theirs.
|
|
57
|
+
* Still, we have to adapt it to avoid exposing useless props.
|
|
58
|
+
*/
|
|
59
|
+
type StepperButtonProps = Omit<IconButtonProps, 'shape' | 'size' | 'disabled' | 'asChild' | 'isLoading' | 'loadingLabel'> & {
|
|
60
|
+
disabled?: boolean;
|
|
61
|
+
ref?: Ref<HTMLButtonElement>;
|
|
45
62
|
};
|
|
46
63
|
type StepperInputProps = Omit<InputProps, 'asChild'> & {
|
|
47
64
|
ref?: Ref<HTMLInputElement>;
|
|
48
65
|
};
|
|
49
66
|
|
|
50
|
-
declare const
|
|
51
|
-
({ children,
|
|
52
|
-
displayName: string;
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
declare const StepperIncrementButton: {
|
|
56
|
-
({ children, design, intent, className, ref: forwardedRef, ...rest }: PropsWithChildren<StepperButtonProps>): react_jsx_runtime.JSX.Element;
|
|
57
|
-
displayName: string;
|
|
58
|
-
} & {
|
|
59
|
-
id: string;
|
|
60
|
-
};
|
|
61
|
-
declare const StepperDecrementButton: {
|
|
62
|
-
({ children, design, intent, className, ref: forwardedRef, ...rest }: PropsWithChildren<StepperButtonProps>): react_jsx_runtime.JSX.Element;
|
|
63
|
-
displayName: string;
|
|
64
|
-
} & {
|
|
65
|
-
id: string;
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
declare const StepperInput: {
|
|
69
|
-
({ ref: forwardedRef, ...props }: StepperInputProps): react_jsx_runtime.JSX.Element;
|
|
67
|
+
declare const Root: {
|
|
68
|
+
({ children, allowWheelScrub, state: stateProp, minValue, maxValue, formatOptions, step: stepProp, className, ...props }: StepperProps): react_jsx_runtime.JSX.Element;
|
|
70
69
|
displayName: string;
|
|
71
|
-
} & {
|
|
72
|
-
id: string;
|
|
73
70
|
};
|
|
74
71
|
|
|
75
|
-
declare const Stepper: typeof
|
|
76
|
-
IncrementButton: typeof
|
|
77
|
-
DecrementButton: typeof
|
|
78
|
-
Input: typeof
|
|
72
|
+
declare const Stepper: typeof Root & {
|
|
73
|
+
IncrementButton: typeof Increment;
|
|
74
|
+
DecrementButton: typeof Decrement;
|
|
75
|
+
Input: typeof Input;
|
|
79
76
|
};
|
|
80
77
|
|
|
81
78
|
export { Stepper, type StepperButtonProps, type StepperInputProps, type StepperProps };
|
package/dist/stepper/index.d.ts
CHANGED
|
@@ -1,81 +1,78 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { NumberFieldStateOptions } from '@react-stately/numberfield';
|
|
5
|
-
import { AriaNumberFieldProps } from '@react-types/numberfield';
|
|
2
|
+
import { NumberField } from '@base-ui-components/react/number-field';
|
|
3
|
+
import { ComponentProps, ReactNode, Ref } from 'react';
|
|
6
4
|
import { IconButtonProps } from '../icon-button/index.js';
|
|
7
|
-
import { I as
|
|
5
|
+
import { I as InputProps } from '../Input-g0LpWuv0.js';
|
|
8
6
|
import '../button/index.js';
|
|
9
7
|
import 'class-variance-authority/types';
|
|
10
8
|
import 'class-variance-authority';
|
|
11
9
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
interface DecrementProps extends Omit<ComponentProps<typeof NumberField.Decrement>, 'render'> {
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
asChild?: boolean;
|
|
13
|
+
}
|
|
14
|
+
interface IncrementProps extends Omit<ComponentProps<typeof NumberField.Increment>, 'render'> {
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
asChild?: boolean;
|
|
17
|
+
}
|
|
18
|
+
declare const Decrement: {
|
|
19
|
+
({ children, className, asChild, ...props }: DecrementProps): react_jsx_runtime.JSX.Element;
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
22
|
+
declare const Increment: {
|
|
23
|
+
({ children, className, asChild, ...props }: IncrementProps): react_jsx_runtime.JSX.Element;
|
|
24
|
+
displayName: string;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
interface Props extends Omit<ComponentProps<typeof NumberField.Input>, 'render'> {
|
|
28
|
+
children?: ReactNode;
|
|
29
|
+
}
|
|
30
|
+
declare const Input: {
|
|
31
|
+
({ className, ...props }: Props): react_jsx_runtime.JSX.Element;
|
|
32
|
+
displayName: string;
|
|
20
33
|
};
|
|
21
|
-
|
|
22
|
-
interface
|
|
23
|
-
|
|
34
|
+
|
|
35
|
+
interface StepperProps extends Omit<ComponentProps<typeof NumberField.Root>, 'render' | 'min' | 'max' | 'format'> {
|
|
36
|
+
children: ReactNode;
|
|
24
37
|
/**
|
|
25
|
-
*
|
|
38
|
+
* Assign a specific state to the group, either `error`, `alert` or `success`. The outline styles will be updated.
|
|
26
39
|
*/
|
|
27
|
-
|
|
40
|
+
state?: 'error' | 'alert' | 'success';
|
|
28
41
|
/**
|
|
29
|
-
*
|
|
42
|
+
* The minimum value of the input element.
|
|
30
43
|
*/
|
|
31
|
-
|
|
44
|
+
minValue?: number;
|
|
32
45
|
/**
|
|
33
|
-
*
|
|
46
|
+
* The maximum value of the input element.
|
|
34
47
|
*/
|
|
35
|
-
|
|
48
|
+
maxValue?: number;
|
|
36
49
|
/**
|
|
37
|
-
*
|
|
38
|
-
* @default 'fr'
|
|
50
|
+
* Options to format the input value.
|
|
39
51
|
*/
|
|
40
|
-
|
|
52
|
+
formatOptions?: Intl.NumberFormatOptions;
|
|
41
53
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
54
|
+
/**
|
|
55
|
+
* As we're using React Spectrum library to build this component, we also want
|
|
56
|
+
* to build our typing uppon theirs.
|
|
57
|
+
* Still, we have to adapt it to avoid exposing useless props.
|
|
58
|
+
*/
|
|
59
|
+
type StepperButtonProps = Omit<IconButtonProps, 'shape' | 'size' | 'disabled' | 'asChild' | 'isLoading' | 'loadingLabel'> & {
|
|
60
|
+
disabled?: boolean;
|
|
61
|
+
ref?: Ref<HTMLButtonElement>;
|
|
45
62
|
};
|
|
46
63
|
type StepperInputProps = Omit<InputProps, 'asChild'> & {
|
|
47
64
|
ref?: Ref<HTMLInputElement>;
|
|
48
65
|
};
|
|
49
66
|
|
|
50
|
-
declare const
|
|
51
|
-
({ children,
|
|
52
|
-
displayName: string;
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
declare const StepperIncrementButton: {
|
|
56
|
-
({ children, design, intent, className, ref: forwardedRef, ...rest }: PropsWithChildren<StepperButtonProps>): react_jsx_runtime.JSX.Element;
|
|
57
|
-
displayName: string;
|
|
58
|
-
} & {
|
|
59
|
-
id: string;
|
|
60
|
-
};
|
|
61
|
-
declare const StepperDecrementButton: {
|
|
62
|
-
({ children, design, intent, className, ref: forwardedRef, ...rest }: PropsWithChildren<StepperButtonProps>): react_jsx_runtime.JSX.Element;
|
|
63
|
-
displayName: string;
|
|
64
|
-
} & {
|
|
65
|
-
id: string;
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
declare const StepperInput: {
|
|
69
|
-
({ ref: forwardedRef, ...props }: StepperInputProps): react_jsx_runtime.JSX.Element;
|
|
67
|
+
declare const Root: {
|
|
68
|
+
({ children, allowWheelScrub, state: stateProp, minValue, maxValue, formatOptions, step: stepProp, className, ...props }: StepperProps): react_jsx_runtime.JSX.Element;
|
|
70
69
|
displayName: string;
|
|
71
|
-
} & {
|
|
72
|
-
id: string;
|
|
73
70
|
};
|
|
74
71
|
|
|
75
|
-
declare const Stepper: typeof
|
|
76
|
-
IncrementButton: typeof
|
|
77
|
-
DecrementButton: typeof
|
|
78
|
-
Input: typeof
|
|
72
|
+
declare const Stepper: typeof Root & {
|
|
73
|
+
IncrementButton: typeof Increment;
|
|
74
|
+
DecrementButton: typeof Decrement;
|
|
75
|
+
Input: typeof Input;
|
|
79
76
|
};
|
|
80
77
|
|
|
81
78
|
export { Stepper, type StepperButtonProps, type StepperInputProps, type StepperProps };
|