@spark-ui/components 10.19.3 → 10.20.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/dist/{InputTrailingIcon-CZD9hydv.d.ts → Input-N8AWWSmt.d.mts} +10 -14
- package/dist/{InputTrailingIcon-DzmwLGtX.d.mts → Input-N8AWWSmt.d.ts} +10 -14
- package/dist/InputTrailingIcon-BBp7sE6D.d.mts +20 -0
- package/dist/InputTrailingIcon-ZZx8PoJy.d.ts +20 -0
- package/dist/docgen.json +893 -263
- package/dist/input/index.d.mts +4 -3
- package/dist/input/index.d.ts +4 -3
- package/dist/stepper/index.d.mts +54 -51
- package/dist/stepper/index.d.ts +54 -51
- package/dist/stepper/index.js +1677 -119
- package/dist/stepper/index.js.map +1 -1
- package/dist/stepper/index.mjs +201 -144
- 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 +7 -5
- package/dist/Input-g0LpWuv0.d.mts +0 -17
- package/dist/Input-g0LpWuv0.d.ts +0 -17
package/dist/input/index.d.mts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ComponentPropsWithoutRef, Ref } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
export {
|
|
3
|
+
import { b as InputGroup$1 } from '../Input-N8AWWSmt.mjs';
|
|
4
|
+
export { c as Input, I as InputGroupProps, a as InputProps } from '../Input-N8AWWSmt.mjs';
|
|
5
5
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
6
6
|
import { VariantProps } from 'class-variance-authority';
|
|
7
|
-
|
|
7
|
+
import { b as InputLeadingIcon, c as InputTrailingIcon } from '../InputTrailingIcon-BBp7sE6D.mjs';
|
|
8
|
+
export { I as InputLeadingIconProps, a as InputTrailingIconProps } from '../InputTrailingIcon-BBp7sE6D.mjs';
|
|
8
9
|
import '../icon/index.mjs';
|
|
9
10
|
|
|
10
11
|
interface InputClearButtonProps extends ComponentPropsWithoutRef<'button'> {
|
package/dist/input/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ComponentPropsWithoutRef, Ref } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
export {
|
|
3
|
+
import { b as InputGroup$1 } from '../Input-N8AWWSmt.js';
|
|
4
|
+
export { c as Input, I as InputGroupProps, a as InputProps } from '../Input-N8AWWSmt.js';
|
|
5
5
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
6
6
|
import { VariantProps } from 'class-variance-authority';
|
|
7
|
-
|
|
7
|
+
import { b as InputLeadingIcon, c as InputTrailingIcon } from '../InputTrailingIcon-ZZx8PoJy.js';
|
|
8
|
+
export { I as InputLeadingIconProps, a as InputTrailingIconProps } from '../InputTrailingIcon-ZZx8PoJy.js';
|
|
8
9
|
import '../icon/index.js';
|
|
9
10
|
|
|
10
11
|
interface InputClearButtonProps extends ComponentPropsWithoutRef<'button'> {
|
package/dist/stepper/index.d.mts
CHANGED
|
@@ -1,78 +1,81 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { RefObject, Ref, PropsWithChildren } from 'react';
|
|
3
|
+
import { AriaButtonOptions } from '@react-aria/button';
|
|
4
|
+
import { NumberFieldStateOptions } from '@react-stately/numberfield';
|
|
5
|
+
import { AriaNumberFieldProps } from '@react-types/numberfield';
|
|
4
6
|
import { IconButtonProps } from '../icon-button/index.mjs';
|
|
5
|
-
import { I as InputProps } from '../Input-
|
|
7
|
+
import { I as InputGroupProps, a as InputProps } from '../Input-N8AWWSmt.mjs';
|
|
6
8
|
import '../button/index.mjs';
|
|
7
9
|
import 'class-variance-authority/types';
|
|
8
10
|
import 'class-variance-authority';
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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;
|
|
12
|
+
/**
|
|
13
|
+
* As we're using React Spectrum library to build this component, we also want
|
|
14
|
+
* to build our typing uppon theirs.
|
|
15
|
+
* Still, we have to adapt it to avoid exposing useless props.
|
|
16
|
+
*/
|
|
17
|
+
type StepperButtonProps = Omit<IconButtonProps, 'shape' | 'size' | 'disabled' | 'asChild' | 'isLoading' | 'loadingLabel'> & Omit<AriaButtonOptions<'button'>, 'elementType' | 'href' | 'target' | 'isDisabled' | 'excludeFromTabOrder' | 'aria-label' | 'preventFocusOnPress'> & {
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
ref?: Ref<HTMLButtonElement>;
|
|
33
20
|
};
|
|
34
|
-
|
|
35
|
-
interface
|
|
36
|
-
|
|
21
|
+
type SpectrumNumberFieldPropsFilter = 'isDisabled' | 'isReadOnly' | 'isRequired' | 'isInvalid' | 'validationState' | 'validationBehavior' | 'validate' | 'label' | 'description' | 'errorMessage' | 'isWheelDisabled' | 'id' | 'onCopy' | 'onCut' | 'onPaste' | 'onCompositionStart' | 'onCompositionEnd' | 'onCompositionUpdate' | 'onSelect' | 'onBeforeInput' | 'onInput';
|
|
22
|
+
interface UseStepperArgs extends Omit<Omit<NumberFieldStateOptions, 'locale'> & Omit<AriaNumberFieldProps, 'incrementAriaLabel' | 'decrementAriaLabel'>, SpectrumNumberFieldPropsFilter> {
|
|
23
|
+
inputRef: RefObject<HTMLInputElement | null>;
|
|
37
24
|
/**
|
|
38
|
-
*
|
|
25
|
+
* Sets the component as interactive or not.
|
|
39
26
|
*/
|
|
40
|
-
|
|
27
|
+
disabled?: boolean;
|
|
41
28
|
/**
|
|
42
|
-
*
|
|
29
|
+
* Sets the component as editable or not.
|
|
43
30
|
*/
|
|
44
|
-
|
|
31
|
+
readOnly?: boolean;
|
|
45
32
|
/**
|
|
46
|
-
*
|
|
33
|
+
* Sets the component as mandatory for form validation.
|
|
47
34
|
*/
|
|
48
|
-
|
|
35
|
+
required?: boolean;
|
|
49
36
|
/**
|
|
50
|
-
*
|
|
37
|
+
* The [BCP47](https://www.ietf.org/rfc/bcp/bcp47.txt) language code for the locale.
|
|
38
|
+
* @default 'fr'
|
|
51
39
|
*/
|
|
52
|
-
|
|
40
|
+
locale?: string;
|
|
53
41
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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>;
|
|
42
|
+
type StepperProps = Omit<Omit<UseStepperArgs, 'inputRef' | 'aria-label'> & Omit<InputGroupProps, 'onClear'>, 'onChange'> & {
|
|
43
|
+
onValueChange?: (e: number) => void;
|
|
44
|
+
ref?: Ref<HTMLDivElement>;
|
|
62
45
|
};
|
|
63
46
|
type StepperInputProps = Omit<InputProps, 'asChild'> & {
|
|
64
47
|
ref?: Ref<HTMLInputElement>;
|
|
65
48
|
};
|
|
66
49
|
|
|
67
|
-
declare const
|
|
68
|
-
({ children,
|
|
50
|
+
declare const Stepper$1: {
|
|
51
|
+
({ children, formatOptions, minValue, maxValue, ref: forwardedRef, ...stepperProps }: PropsWithChildren<StepperProps>): react_jsx_runtime.JSX.Element;
|
|
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;
|
|
69
70
|
displayName: string;
|
|
71
|
+
} & {
|
|
72
|
+
id: string;
|
|
70
73
|
};
|
|
71
74
|
|
|
72
|
-
declare const Stepper: typeof
|
|
73
|
-
IncrementButton: typeof
|
|
74
|
-
DecrementButton: typeof
|
|
75
|
-
Input: typeof
|
|
75
|
+
declare const Stepper: typeof Stepper$1 & {
|
|
76
|
+
IncrementButton: typeof StepperIncrementButton;
|
|
77
|
+
DecrementButton: typeof StepperDecrementButton;
|
|
78
|
+
Input: typeof StepperInput;
|
|
76
79
|
};
|
|
77
80
|
|
|
78
81
|
export { Stepper, type StepperButtonProps, type StepperInputProps, type StepperProps };
|
package/dist/stepper/index.d.ts
CHANGED
|
@@ -1,78 +1,81 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { RefObject, Ref, PropsWithChildren } from 'react';
|
|
3
|
+
import { AriaButtonOptions } from '@react-aria/button';
|
|
4
|
+
import { NumberFieldStateOptions } from '@react-stately/numberfield';
|
|
5
|
+
import { AriaNumberFieldProps } from '@react-types/numberfield';
|
|
4
6
|
import { IconButtonProps } from '../icon-button/index.js';
|
|
5
|
-
import { I as InputProps } from '../Input-
|
|
7
|
+
import { I as InputGroupProps, a as InputProps } from '../Input-N8AWWSmt.js';
|
|
6
8
|
import '../button/index.js';
|
|
7
9
|
import 'class-variance-authority/types';
|
|
8
10
|
import 'class-variance-authority';
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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;
|
|
12
|
+
/**
|
|
13
|
+
* As we're using React Spectrum library to build this component, we also want
|
|
14
|
+
* to build our typing uppon theirs.
|
|
15
|
+
* Still, we have to adapt it to avoid exposing useless props.
|
|
16
|
+
*/
|
|
17
|
+
type StepperButtonProps = Omit<IconButtonProps, 'shape' | 'size' | 'disabled' | 'asChild' | 'isLoading' | 'loadingLabel'> & Omit<AriaButtonOptions<'button'>, 'elementType' | 'href' | 'target' | 'isDisabled' | 'excludeFromTabOrder' | 'aria-label' | 'preventFocusOnPress'> & {
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
ref?: Ref<HTMLButtonElement>;
|
|
33
20
|
};
|
|
34
|
-
|
|
35
|
-
interface
|
|
36
|
-
|
|
21
|
+
type SpectrumNumberFieldPropsFilter = 'isDisabled' | 'isReadOnly' | 'isRequired' | 'isInvalid' | 'validationState' | 'validationBehavior' | 'validate' | 'label' | 'description' | 'errorMessage' | 'isWheelDisabled' | 'id' | 'onCopy' | 'onCut' | 'onPaste' | 'onCompositionStart' | 'onCompositionEnd' | 'onCompositionUpdate' | 'onSelect' | 'onBeforeInput' | 'onInput';
|
|
22
|
+
interface UseStepperArgs extends Omit<Omit<NumberFieldStateOptions, 'locale'> & Omit<AriaNumberFieldProps, 'incrementAriaLabel' | 'decrementAriaLabel'>, SpectrumNumberFieldPropsFilter> {
|
|
23
|
+
inputRef: RefObject<HTMLInputElement | null>;
|
|
37
24
|
/**
|
|
38
|
-
*
|
|
25
|
+
* Sets the component as interactive or not.
|
|
39
26
|
*/
|
|
40
|
-
|
|
27
|
+
disabled?: boolean;
|
|
41
28
|
/**
|
|
42
|
-
*
|
|
29
|
+
* Sets the component as editable or not.
|
|
43
30
|
*/
|
|
44
|
-
|
|
31
|
+
readOnly?: boolean;
|
|
45
32
|
/**
|
|
46
|
-
*
|
|
33
|
+
* Sets the component as mandatory for form validation.
|
|
47
34
|
*/
|
|
48
|
-
|
|
35
|
+
required?: boolean;
|
|
49
36
|
/**
|
|
50
|
-
*
|
|
37
|
+
* The [BCP47](https://www.ietf.org/rfc/bcp/bcp47.txt) language code for the locale.
|
|
38
|
+
* @default 'fr'
|
|
51
39
|
*/
|
|
52
|
-
|
|
40
|
+
locale?: string;
|
|
53
41
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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>;
|
|
42
|
+
type StepperProps = Omit<Omit<UseStepperArgs, 'inputRef' | 'aria-label'> & Omit<InputGroupProps, 'onClear'>, 'onChange'> & {
|
|
43
|
+
onValueChange?: (e: number) => void;
|
|
44
|
+
ref?: Ref<HTMLDivElement>;
|
|
62
45
|
};
|
|
63
46
|
type StepperInputProps = Omit<InputProps, 'asChild'> & {
|
|
64
47
|
ref?: Ref<HTMLInputElement>;
|
|
65
48
|
};
|
|
66
49
|
|
|
67
|
-
declare const
|
|
68
|
-
({ children,
|
|
50
|
+
declare const Stepper$1: {
|
|
51
|
+
({ children, formatOptions, minValue, maxValue, ref: forwardedRef, ...stepperProps }: PropsWithChildren<StepperProps>): react_jsx_runtime.JSX.Element;
|
|
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;
|
|
69
70
|
displayName: string;
|
|
71
|
+
} & {
|
|
72
|
+
id: string;
|
|
70
73
|
};
|
|
71
74
|
|
|
72
|
-
declare const Stepper: typeof
|
|
73
|
-
IncrementButton: typeof
|
|
74
|
-
DecrementButton: typeof
|
|
75
|
-
Input: typeof
|
|
75
|
+
declare const Stepper: typeof Stepper$1 & {
|
|
76
|
+
IncrementButton: typeof StepperIncrementButton;
|
|
77
|
+
DecrementButton: typeof StepperDecrementButton;
|
|
78
|
+
Input: typeof StepperInput;
|
|
76
79
|
};
|
|
77
80
|
|
|
78
81
|
export { Stepper, type StepperButtonProps, type StepperInputProps, type StepperProps };
|