@qasa/qds-ui 0.10.0-next.14 → 0.10.0-next.16
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/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/_internal/form-parts.d.ts +3 -3
- package/dist/cjs/types/components/avatar/avatar.d.ts +1 -1
- package/dist/cjs/types/components/button/button-icon.d.ts +1 -1
- package/dist/cjs/types/components/button/button-styles.d.ts +4 -2
- package/dist/cjs/types/components/button/button.d.ts +2 -2
- package/dist/cjs/types/components/checkbox/checkbox.d.ts +1 -1
- package/dist/cjs/types/components/display-text/display-text.d.ts +5 -5
- package/dist/cjs/types/components/dropdown-menu/dropdown-menu-content.d.ts +1 -1
- package/dist/cjs/types/components/dropdown-menu/dropdown-menu-divider.d.ts +2 -2
- package/dist/cjs/types/components/dropdown-menu/dropdown-menu-trigger.d.ts +2 -2
- package/dist/cjs/types/components/dropdown-menu/dropdown-menu.d.ts +3 -3
- package/dist/cjs/types/components/heading/heading.d.ts +4 -4
- package/dist/cjs/types/components/hint-box/hint-box.d.ts +4 -4
- package/dist/cjs/types/components/icon/icon.types.d.ts +3 -3
- package/dist/cjs/types/components/icon-button/icon-button-styles.d.ts +2 -0
- package/dist/cjs/types/components/icon-button/icon-button.d.ts +4 -4
- package/dist/cjs/types/components/label/label.d.ts +5 -4
- package/dist/cjs/types/components/link/link.d.ts +2 -2
- package/dist/cjs/types/components/loading-dots/loading-dots.d.ts +2 -1
- package/dist/cjs/types/components/paragraph/paragraph.d.ts +5 -4
- package/dist/cjs/types/components/primitives/input-base/input-base.d.ts +1 -1
- package/dist/cjs/types/components/primitives/select-base/select-base.d.ts +1 -1
- package/dist/cjs/types/components/primitives/textarea-base/textarea-base.d.ts +3 -3
- package/dist/cjs/types/components/radio-group/radio-group-context.d.ts +1 -1
- package/dist/cjs/types/components/radio-group/radio-group-label.d.ts +2 -2
- package/dist/cjs/types/components/radio-group/radio-group.d.ts +1 -1
- package/dist/cjs/types/components/radio-group/radio-indicator.d.ts +1 -1
- package/dist/cjs/types/components/select/select-option.d.ts +1 -1
- package/dist/cjs/types/components/select/select.d.ts +1 -1
- package/dist/cjs/types/components/spacer/spacer.d.ts +2 -1
- package/dist/cjs/types/components/stack/stack.d.ts +3 -3
- package/dist/cjs/types/components/stack/stack.types.d.ts +4 -4
- package/dist/cjs/types/components/text-field/text-field.d.ts +1 -1
- package/dist/cjs/types/components/textarea/textarea.d.ts +1 -1
- package/dist/cjs/types/components/toast/toast-provider.d.ts +1 -1
- package/dist/cjs/types/components/toast/toast-store.d.ts +2 -2
- package/dist/cjs/types/components/toast/toast-styles.d.ts +2 -1
- package/dist/cjs/types/components/toast/toast.d.ts +2 -3
- package/dist/cjs/types/hooks/use-breakpoint-value.d.ts +3 -3
- package/dist/cjs/types/hooks/use-form-field.d.ts +4 -4
- package/dist/cjs/types/hooks/use-image.d.ts +1 -1
- package/dist/cjs/types/hooks/use-responsive-prop.d.ts +3 -3
- package/dist/cjs/types/i18n/locale-context.d.ts +1 -1
- package/dist/cjs/types/i18n/locales.d.ts +1 -1
- package/dist/cjs/types/i18n/use-translation.d.ts +1 -1
- package/dist/cjs/types/qds-provider.d.ts +1 -1
- package/dist/cjs/types/styles/common-styles.d.ts +1 -0
- package/dist/cjs/types/styles/css-reset.d.ts +1 -2
- package/dist/cjs/types/styles/css-utils.d.ts +3 -3
- package/dist/cjs/types/styles/global-styles.d.ts +1 -2
- package/dist/cjs/types/theme/foundations/index.d.ts +1 -0
- package/dist/cjs/types/theme/foundations/radius.d.ts +2 -0
- package/dist/cjs/types/theme/theme-tools.d.ts +3 -2
- package/dist/cjs/types/theme/theme.d.ts +2 -1
- package/dist/cjs/types/types.d.ts +4 -4
- package/dist/cjs/types/utils/html-attributes.d.ts +1 -1
- package/dist/cjs/types/utils/merge-refs.d.ts +2 -2
- package/dist/cjs/types/utils/polymorphic.d.ts +4 -4
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/_internal/form-parts.d.ts +3 -3
- package/dist/esm/types/components/avatar/avatar.d.ts +1 -1
- package/dist/esm/types/components/button/button-icon.d.ts +1 -1
- package/dist/esm/types/components/button/button-styles.d.ts +4 -2
- package/dist/esm/types/components/button/button.d.ts +2 -2
- package/dist/esm/types/components/checkbox/checkbox.d.ts +1 -1
- package/dist/esm/types/components/display-text/display-text.d.ts +5 -5
- package/dist/esm/types/components/dropdown-menu/dropdown-menu-content.d.ts +1 -1
- package/dist/esm/types/components/dropdown-menu/dropdown-menu-divider.d.ts +2 -2
- package/dist/esm/types/components/dropdown-menu/dropdown-menu-trigger.d.ts +2 -2
- package/dist/esm/types/components/dropdown-menu/dropdown-menu.d.ts +3 -3
- package/dist/esm/types/components/heading/heading.d.ts +4 -4
- package/dist/esm/types/components/hint-box/hint-box.d.ts +4 -4
- package/dist/esm/types/components/icon/icon.types.d.ts +3 -3
- package/dist/esm/types/components/icon-button/icon-button-styles.d.ts +2 -0
- package/dist/esm/types/components/icon-button/icon-button.d.ts +4 -4
- package/dist/esm/types/components/label/label.d.ts +5 -4
- package/dist/esm/types/components/link/link.d.ts +2 -2
- package/dist/esm/types/components/loading-dots/loading-dots.d.ts +2 -1
- package/dist/esm/types/components/paragraph/paragraph.d.ts +5 -4
- package/dist/esm/types/components/primitives/input-base/input-base.d.ts +1 -1
- package/dist/esm/types/components/primitives/select-base/select-base.d.ts +1 -1
- package/dist/esm/types/components/primitives/textarea-base/textarea-base.d.ts +3 -3
- package/dist/esm/types/components/radio-group/radio-group-context.d.ts +1 -1
- package/dist/esm/types/components/radio-group/radio-group-label.d.ts +2 -2
- package/dist/esm/types/components/radio-group/radio-group.d.ts +1 -1
- package/dist/esm/types/components/radio-group/radio-indicator.d.ts +1 -1
- package/dist/esm/types/components/select/select-option.d.ts +1 -1
- package/dist/esm/types/components/select/select.d.ts +1 -1
- package/dist/esm/types/components/spacer/spacer.d.ts +2 -1
- package/dist/esm/types/components/stack/stack.d.ts +3 -3
- package/dist/esm/types/components/stack/stack.types.d.ts +4 -4
- package/dist/esm/types/components/text-field/text-field.d.ts +1 -1
- package/dist/esm/types/components/textarea/textarea.d.ts +1 -1
- package/dist/esm/types/components/toast/toast-provider.d.ts +1 -1
- package/dist/esm/types/components/toast/toast-store.d.ts +2 -2
- package/dist/esm/types/components/toast/toast-styles.d.ts +2 -1
- package/dist/esm/types/components/toast/toast.d.ts +2 -3
- package/dist/esm/types/hooks/use-breakpoint-value.d.ts +3 -3
- package/dist/esm/types/hooks/use-form-field.d.ts +4 -4
- package/dist/esm/types/hooks/use-image.d.ts +1 -1
- package/dist/esm/types/hooks/use-responsive-prop.d.ts +3 -3
- package/dist/esm/types/i18n/locale-context.d.ts +1 -1
- package/dist/esm/types/i18n/locales.d.ts +1 -1
- package/dist/esm/types/i18n/use-translation.d.ts +1 -1
- package/dist/esm/types/qds-provider.d.ts +1 -1
- package/dist/esm/types/styles/common-styles.d.ts +1 -0
- package/dist/esm/types/styles/css-reset.d.ts +1 -2
- package/dist/esm/types/styles/css-utils.d.ts +3 -3
- package/dist/esm/types/styles/global-styles.d.ts +1 -2
- package/dist/esm/types/theme/foundations/index.d.ts +1 -0
- package/dist/esm/types/theme/foundations/radius.d.ts +2 -0
- package/dist/esm/types/theme/theme-tools.d.ts +3 -2
- package/dist/esm/types/theme/theme.d.ts +2 -1
- package/dist/esm/types/types.d.ts +4 -4
- package/dist/esm/types/utils/html-attributes.d.ts +1 -1
- package/dist/esm/types/utils/merge-refs.d.ts +2 -2
- package/dist/esm/types/utils/polymorphic.d.ts +4 -4
- package/dist/index.d.ts +102 -91
- package/package.json +19 -22
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { PropsWithChildren } from 'react';
|
|
2
|
-
export declare function FormField({ children }: PropsWithChildren): JSX.Element;
|
|
2
|
+
export declare function FormField({ children }: PropsWithChildren): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export declare const ErrorMessage: import("@emotion/styled").StyledComponent<{
|
|
4
4
|
theme?: import("@emotion/react").Theme | undefined;
|
|
5
|
-
as?: import("react").ElementType<any> | undefined;
|
|
5
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
6
6
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
7
7
|
export declare const HelperText: import("@emotion/styled").StyledComponent<{
|
|
8
8
|
theme?: import("@emotion/react").Theme | undefined;
|
|
9
|
-
as?: import("react").ElementType<any> | undefined;
|
|
9
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
10
10
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
@@ -6,5 +6,5 @@ interface ButtonIconProps {
|
|
|
6
6
|
icon: ElementType<IconProps>;
|
|
7
7
|
placement: 'left' | 'right';
|
|
8
8
|
}
|
|
9
|
-
export declare function ButtonIcon({ buttonSize, icon: Icon, placement }: ButtonIconProps): JSX.Element;
|
|
9
|
+
export declare function ButtonIcon({ buttonSize, icon: Icon, placement }: ButtonIconProps): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -199,6 +199,7 @@ export declare const getSizeStyles: (theme: {
|
|
|
199
199
|
md: string;
|
|
200
200
|
lg: string;
|
|
201
201
|
xl: string;
|
|
202
|
+
'2xl': string;
|
|
202
203
|
full: string;
|
|
203
204
|
};
|
|
204
205
|
shadows: {
|
|
@@ -449,7 +450,7 @@ export declare const getSizeStyles: (theme: {
|
|
|
449
450
|
paddingRight: string;
|
|
450
451
|
};
|
|
451
452
|
};
|
|
452
|
-
export
|
|
453
|
+
export type ButtonSize = VariantProps<typeof getSizeStyles>;
|
|
453
454
|
export declare const getVariantStyles: (theme: {
|
|
454
455
|
mediaQueries: {
|
|
455
456
|
readonly smUp: "@media(min-width: 480px)";
|
|
@@ -650,6 +651,7 @@ export declare const getVariantStyles: (theme: {
|
|
|
650
651
|
md: string;
|
|
651
652
|
lg: string;
|
|
652
653
|
xl: string;
|
|
654
|
+
'2xl': string;
|
|
653
655
|
full: string;
|
|
654
656
|
};
|
|
655
657
|
shadows: {
|
|
@@ -892,4 +894,4 @@ export declare const getVariantStyles: (theme: {
|
|
|
892
894
|
};
|
|
893
895
|
};
|
|
894
896
|
};
|
|
895
|
-
export
|
|
897
|
+
export type ButtonVariant = VariantProps<typeof getVariantStyles>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as Polymorphic from '../../utils/polymorphic';
|
|
2
2
|
import type { ButtonOptions } from './button-types';
|
|
3
|
-
|
|
4
|
-
export
|
|
3
|
+
type PolymorphicButton = Polymorphic.ForwardRefComponent<'button', ButtonOptions>;
|
|
4
|
+
export type ButtonProps = Polymorphic.PropsOf<PolymorphicButton>;
|
|
5
5
|
export declare const Button: PolymorphicButton;
|
|
6
6
|
export {};
|
|
@@ -73,6 +73,6 @@ interface CheckboxOptions {
|
|
|
73
73
|
*/
|
|
74
74
|
value?: string;
|
|
75
75
|
}
|
|
76
|
-
export
|
|
76
|
+
export type CheckboxProps = Omit<CheckboxPrimitive.CheckboxProps, 'asChild' | 'children' | 'checked' | 'defaultChecked' | keyof CheckboxOptions> & CheckboxOptions;
|
|
77
77
|
export declare const Checkbox: import("react").ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps, "children" | "asChild" | keyof CheckboxOptions> & CheckboxOptions & import("react").RefAttributes<HTMLButtonElement>>;
|
|
78
78
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type * as Polymorphic from '../../utils/polymorphic';
|
|
2
2
|
import type { Theme } from '../../theme';
|
|
3
3
|
import { type ResponsiveProp } from '../../hooks/use-responsive-prop';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
type DisplaySize = keyof Theme['typography']['display'];
|
|
5
|
+
type DisplayTextAlign = 'left' | 'center' | 'right';
|
|
6
|
+
type DisplayTextWrap = 'pretty' | 'balance' | 'wrap' | 'nowrap' | 'stable';
|
|
7
7
|
interface DisplayTextOptions {
|
|
8
8
|
/**
|
|
9
9
|
* Sets the visual size of the display text.
|
|
@@ -24,7 +24,7 @@ interface DisplayTextOptions {
|
|
|
24
24
|
*/
|
|
25
25
|
textWrap?: DisplayTextWrap;
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
export
|
|
27
|
+
type DisplayTextComponent = Polymorphic.ForwardRefComponent<'h2', DisplayTextOptions>;
|
|
28
|
+
export type DisplayTextProps = Polymorphic.PropsOf<DisplayTextComponent>;
|
|
29
29
|
export declare const DisplayText: DisplayTextComponent;
|
|
30
30
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import * as DropdownPrimitive from '@radix-ui/react-dropdown-menu';
|
|
3
3
|
import type { HTMLQdsProps } from '../../types';
|
|
4
|
-
|
|
4
|
+
type PrimitiveContentProps = DropdownPrimitive.MenuContentProps;
|
|
5
5
|
interface DropdownMenuContentOptions {
|
|
6
6
|
/**
|
|
7
7
|
* Event handler called when focus moves to the trigger after closing.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { HTMLQdsProps } from '../../types';
|
|
3
|
-
export
|
|
4
|
-
export declare const DropdownMenuDivider: import("react").ForwardRefExoticComponent<
|
|
3
|
+
export type DropdownMenuDividerProps = HTMLQdsProps<'div'>;
|
|
4
|
+
export declare const DropdownMenuDivider: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as Polymorphic from '../../utils/polymorphic';
|
|
2
|
-
|
|
3
|
-
export
|
|
2
|
+
type DropdownTriggerComponent = Polymorphic.ForwardRefComponent<'button'>;
|
|
3
|
+
export type DropdownMenuTriggerProps = Polymorphic.PropsOf<DropdownTriggerComponent>;
|
|
4
4
|
export declare const DropdownMenuTrigger: DropdownTriggerComponent;
|
|
5
5
|
export {};
|
|
@@ -19,11 +19,11 @@ interface DropdownMenuRootProps {
|
|
|
19
19
|
*/
|
|
20
20
|
onOpenChange?: (isOpen: boolean) => void;
|
|
21
21
|
}
|
|
22
|
-
declare function DropdownMenuRoot(props: DropdownMenuRootProps): JSX.Element;
|
|
22
|
+
declare function DropdownMenuRoot(props: DropdownMenuRootProps): import("react/jsx-runtime").JSX.Element;
|
|
23
23
|
export declare const DropdownMenu: typeof DropdownMenuRoot & {
|
|
24
|
-
Trigger: import("
|
|
24
|
+
Trigger: import("../..").ForwardRefComponent<"button", {}>;
|
|
25
25
|
Content: import("react").ForwardRefExoticComponent<DropdownMenuContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
26
26
|
Item: import("react").ForwardRefExoticComponent<DropdownMenuItemProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
27
|
-
Divider: import("react").ForwardRefExoticComponent<
|
|
27
|
+
Divider: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
28
28
|
};
|
|
29
29
|
export type { DropdownMenuRootProps, DropdownMenuTriggerProps, DropdownMenuContentProps, DropdownMenuItemProps, DropdownMenuDividerProps, };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type * as Polymorphic from '../../utils/polymorphic';
|
|
2
2
|
import type { Theme } from '../../theme';
|
|
3
3
|
import { type ResponsiveProp } from '../../hooks/use-responsive-prop';
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
type HeadingSize = keyof Theme['typography']['title'];
|
|
5
|
+
type HeadingColor = keyof Theme['colors']['text'];
|
|
6
6
|
interface HeadingOptions {
|
|
7
7
|
/**
|
|
8
8
|
* Sets the visual size of the heading.
|
|
@@ -26,7 +26,7 @@ interface HeadingOptions {
|
|
|
26
26
|
*/
|
|
27
27
|
textAlign?: 'left' | 'center' | 'right';
|
|
28
28
|
}
|
|
29
|
-
|
|
30
|
-
export
|
|
29
|
+
type HeadingComponent = Polymorphic.ForwardRefComponent<'h2', HeadingOptions>;
|
|
30
|
+
export type HeadingProps = Polymorphic.PropsOf<HeadingComponent>;
|
|
31
31
|
export declare const Heading: HeadingComponent;
|
|
32
32
|
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { HTMLQdsProps } from '../../types';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export declare const HintBox: import("react").ForwardRefExoticComponent<
|
|
3
|
+
export type HintBoxTitleProps = HTMLQdsProps<'span'>;
|
|
4
|
+
export type HintBoxProps = HTMLQdsProps<'aside'>;
|
|
5
|
+
export declare const HintBox: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>> & {
|
|
6
6
|
Title: import("@emotion/styled").StyledComponent<{
|
|
7
7
|
theme?: import("@emotion/react").Theme | undefined;
|
|
8
|
-
as?: import("react").ElementType<any> | undefined;
|
|
8
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
9
9
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {}>;
|
|
10
10
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { SVGAttributes } from 'react';
|
|
2
2
|
import type { Theme } from '../../theme';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type IconSize = 16 | 20 | 24 | 32;
|
|
4
|
+
type IconColor = keyof Theme['colors']['icon'] | 'currentColor';
|
|
5
5
|
export interface IconOptions {
|
|
6
6
|
/**
|
|
7
7
|
* The size of the icon.
|
|
@@ -16,7 +16,7 @@ export interface IconOptions {
|
|
|
16
16
|
*/
|
|
17
17
|
color?: IconColor;
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
type OmittedProps = 'color' | 'onClick' | 'width' | 'height' | 'fontSize';
|
|
20
20
|
export interface IconProps extends Omit<SVGAttributes<SVGElement>, OmittedProps>, IconOptions {
|
|
21
21
|
}
|
|
22
22
|
export {};
|
|
@@ -198,6 +198,7 @@ export declare const getSizeStyles: (theme: {
|
|
|
198
198
|
md: string;
|
|
199
199
|
lg: string;
|
|
200
200
|
xl: string;
|
|
201
|
+
'2xl': string;
|
|
201
202
|
full: string;
|
|
202
203
|
};
|
|
203
204
|
shadows: {
|
|
@@ -610,6 +611,7 @@ export declare const getVariantStyles: (theme: {
|
|
|
610
611
|
md: string;
|
|
611
612
|
lg: string;
|
|
612
613
|
xl: string;
|
|
614
|
+
'2xl': string;
|
|
613
615
|
full: string;
|
|
614
616
|
};
|
|
615
617
|
shadows: {
|
|
@@ -4,8 +4,8 @@ import type { IconProps } from '../icon';
|
|
|
4
4
|
import type * as Polymorphic from '../../utils/polymorphic';
|
|
5
5
|
import { type ResponsiveProp } from '../../hooks/use-responsive-prop';
|
|
6
6
|
import { getSizeStyles, getVariantStyles } from './icon-button-styles';
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
type IconButtonSize = VariantProps<typeof getSizeStyles>;
|
|
8
|
+
type IconButtonVariant = VariantProps<typeof getVariantStyles>;
|
|
9
9
|
interface IconButtonOptions {
|
|
10
10
|
icon: ElementType<IconProps>;
|
|
11
11
|
/**
|
|
@@ -26,7 +26,7 @@ interface IconButtonOptions {
|
|
|
26
26
|
*/
|
|
27
27
|
isDisabled?: boolean;
|
|
28
28
|
}
|
|
29
|
-
|
|
30
|
-
export
|
|
29
|
+
type IconButtonComponent = Polymorphic.ForwardRefComponent<'button', IconButtonOptions>;
|
|
30
|
+
export type IconButtonProps = Polymorphic.PropsOf<IconButtonComponent>;
|
|
31
31
|
export declare const IconButton: IconButtonComponent;
|
|
32
32
|
export {};
|
|
@@ -202,6 +202,7 @@ declare const getSizeStyles: (theme: {
|
|
|
202
202
|
md: string;
|
|
203
203
|
lg: string;
|
|
204
204
|
xl: string;
|
|
205
|
+
'2xl': string;
|
|
205
206
|
full: string;
|
|
206
207
|
};
|
|
207
208
|
shadows: {
|
|
@@ -419,8 +420,8 @@ declare const getSizeStyles: (theme: {
|
|
|
419
420
|
letterSpacing: string;
|
|
420
421
|
};
|
|
421
422
|
};
|
|
422
|
-
|
|
423
|
-
|
|
423
|
+
type LabelSize = VariantProps<typeof getSizeStyles>;
|
|
424
|
+
type LabelColor = keyof Theme['colors']['text'];
|
|
424
425
|
interface LabelOptions {
|
|
425
426
|
/**
|
|
426
427
|
* Size of the label
|
|
@@ -432,7 +433,7 @@ interface LabelOptions {
|
|
|
432
433
|
*/
|
|
433
434
|
color?: LabelColor;
|
|
434
435
|
}
|
|
435
|
-
|
|
436
|
-
export
|
|
436
|
+
type LabelComponent = Polymorphic.ForwardRefComponent<'label', LabelOptions>;
|
|
437
|
+
export type LabelProps = Polymorphic.PropsOf<LabelComponent>;
|
|
437
438
|
export declare const Label: LabelComponent;
|
|
438
439
|
export {};
|
|
@@ -9,7 +9,7 @@ interface LinkOptions {
|
|
|
9
9
|
*/
|
|
10
10
|
isExternal?: boolean;
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
export
|
|
12
|
+
type LinkComponent = Polymorphic.ForwardRefComponent<'a', LinkOptions>;
|
|
13
|
+
export type LinkProps = Polymorphic.PropsOf<LinkComponent>;
|
|
14
14
|
export declare const Link: LinkComponent;
|
|
15
15
|
export {};
|
|
@@ -202,6 +202,7 @@ declare const getSizeStyles: (theme: {
|
|
|
202
202
|
md: string;
|
|
203
203
|
lg: string;
|
|
204
204
|
xl: string;
|
|
205
|
+
'2xl': string;
|
|
205
206
|
full: string;
|
|
206
207
|
};
|
|
207
208
|
shadows: {
|
|
@@ -408,7 +409,7 @@ declare const getSizeStyles: (theme: {
|
|
|
408
409
|
fontSize: string;
|
|
409
410
|
};
|
|
410
411
|
};
|
|
411
|
-
|
|
412
|
+
type LoadingDotsSize = VariantProps<typeof getSizeStyles>;
|
|
412
413
|
interface LoadingDotsOptions {
|
|
413
414
|
size?: ResponsiveProp<LoadingDotsSize>;
|
|
414
415
|
}
|
|
@@ -202,6 +202,7 @@ declare const getSizeStyles: (theme: {
|
|
|
202
202
|
md: string;
|
|
203
203
|
lg: string;
|
|
204
204
|
xl: string;
|
|
205
|
+
'2xl': string;
|
|
205
206
|
full: string;
|
|
206
207
|
};
|
|
207
208
|
shadows: {
|
|
@@ -440,8 +441,8 @@ declare const getSizeStyles: (theme: {
|
|
|
440
441
|
letterSpacing: string;
|
|
441
442
|
};
|
|
442
443
|
};
|
|
443
|
-
|
|
444
|
-
|
|
444
|
+
type ParagraphSize = VariantProps<typeof getSizeStyles>;
|
|
445
|
+
type ParagraphColor = keyof Theme['colors']['text'];
|
|
445
446
|
interface ParagraphOptions {
|
|
446
447
|
/**
|
|
447
448
|
* Sets the visual size of the text
|
|
@@ -463,7 +464,7 @@ interface ParagraphOptions {
|
|
|
463
464
|
*/
|
|
464
465
|
textAlign?: 'left' | 'center' | 'right';
|
|
465
466
|
}
|
|
466
|
-
|
|
467
|
-
export
|
|
467
|
+
type ParagraphComponent = Polymorphic.ForwardRefComponent<'p', ParagraphOptions>;
|
|
468
|
+
export type ParagraphProps = Polymorphic.PropsOf<ParagraphComponent>;
|
|
468
469
|
export declare const Paragraph: ParagraphComponent;
|
|
469
470
|
export {};
|
|
@@ -14,7 +14,7 @@ export interface InputBaseOptions {
|
|
|
14
14
|
*/
|
|
15
15
|
isRequired?: boolean;
|
|
16
16
|
}
|
|
17
|
-
|
|
17
|
+
type OmittedProps = 'children' | 'readOnly' | 'size' | 'disabled' | 'required';
|
|
18
18
|
export interface InputBaseProps extends Omit<HTMLQdsProps<'input'>, OmittedProps>, InputBaseOptions {
|
|
19
19
|
}
|
|
20
20
|
export declare const InputBase: import("react").ForwardRefExoticComponent<InputBaseProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -23,7 +23,7 @@ export interface SelectBaseOptions {
|
|
|
23
23
|
*/
|
|
24
24
|
isRequired?: boolean;
|
|
25
25
|
}
|
|
26
|
-
|
|
26
|
+
type OmittedProps = 'readOnly' | 'size' | 'multiple' | 'disabled' | 'required';
|
|
27
27
|
interface SelectBaseProps extends Omit<HTMLQdsProps<'select'>, OmittedProps>, SelectBaseOptions {
|
|
28
28
|
}
|
|
29
29
|
export declare const SelectBase: import("react").ForwardRefExoticComponent<SelectBaseProps & import("react").RefAttributes<HTMLSelectElement>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { HTMLQdsProps } from '../../../types';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type ResizeProp = 'none' | 'both' | 'horizontal' | 'vertical';
|
|
4
|
+
type MinRowsProp = number;
|
|
5
5
|
export interface TextareaBaseOptions {
|
|
6
6
|
/**
|
|
7
7
|
* If `true`, the textarea will be invalid
|
|
@@ -29,7 +29,7 @@ export interface TextareaBaseOptions {
|
|
|
29
29
|
*/
|
|
30
30
|
minRows?: MinRowsProp;
|
|
31
31
|
}
|
|
32
|
-
|
|
32
|
+
type OmittedProps = 'children' | 'readOnly' | 'size' | 'disabled' | 'required' | 'rows' | 'cols';
|
|
33
33
|
export interface TextareaBaseProps extends Omit<HTMLQdsProps<'textarea'>, OmittedProps>, TextareaBaseOptions {
|
|
34
34
|
}
|
|
35
35
|
export declare const TextareaBase: import("react").ForwardRefExoticComponent<TextareaBaseProps & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -8,7 +8,7 @@ interface RadioGroupProviderProps {
|
|
|
8
8
|
value: RadioGroupContextValue;
|
|
9
9
|
children: React.ReactNode;
|
|
10
10
|
}
|
|
11
|
-
export declare function RadioGroupProvider({ value, children }: RadioGroupProviderProps): JSX.Element;
|
|
11
|
+
export declare function RadioGroupProvider({ value, children }: RadioGroupProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
interface UseRadioGroupContextProps {
|
|
13
13
|
consumerName: string;
|
|
14
14
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { HTMLQdsProps } from '../../types';
|
|
3
|
-
export
|
|
4
|
-
export declare const RadioGroupLabel: import("react").ForwardRefExoticComponent<
|
|
3
|
+
export type RadioGroupLabelProps = HTMLQdsProps<'span'>;
|
|
4
|
+
export declare const RadioGroupLabel: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
@@ -45,6 +45,6 @@ export interface RadioGroupProps extends Omit<RadioGroupPrimitive.RadioGroupProp
|
|
|
45
45
|
}
|
|
46
46
|
export declare const RadioGroup: import("react").ForwardRefExoticComponent<RadioGroupProps & import("react").RefAttributes<HTMLDivElement>> & {
|
|
47
47
|
Card: import("react").ForwardRefExoticComponent<RadioCardProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
48
|
-
Label: import("react").ForwardRefExoticComponent<
|
|
48
|
+
Label: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
49
49
|
};
|
|
50
50
|
export type { RadioGroupLabelProps, RadioCardProps };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
3
|
-
|
|
3
|
+
type RadioIndicatorProps = Omit<RadioGroupPrimitive.RadioGroupIndicatorProps, 'asChild' | 'forceMount'>;
|
|
4
4
|
/**
|
|
5
5
|
* Styled Radix `RadioIndicator` component.
|
|
6
6
|
* @see Docs https://www.radix-ui.com/primitives/docs/components/radio-group#indicator
|
|
@@ -3,7 +3,7 @@ import type { HTMLQdsProps } from '../../types';
|
|
|
3
3
|
interface SelectOptionOptions {
|
|
4
4
|
isDisabled?: boolean;
|
|
5
5
|
}
|
|
6
|
-
|
|
6
|
+
type OmittedProps = 'disabled' | 'label';
|
|
7
7
|
export interface SelectOptionProps extends Omit<HTMLQdsProps<'option'>, OmittedProps>, SelectOptionOptions {
|
|
8
8
|
}
|
|
9
9
|
export declare const SelectOption: import("react").ForwardRefExoticComponent<SelectOptionProps & import("react").RefAttributes<HTMLOptionElement>>;
|
|
@@ -16,7 +16,7 @@ interface SelectOptions extends SelectBaseOptions {
|
|
|
16
16
|
*/
|
|
17
17
|
helperText?: string;
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
type OmittedProps = 'readOnly' | 'size';
|
|
20
20
|
export interface SelectProps extends Omit<HTMLQdsProps<'select'>, OmittedProps>, SelectOptions {
|
|
21
21
|
}
|
|
22
22
|
export declare const Select: import("react").ForwardRefExoticComponent<SelectProps & import("react").RefAttributes<HTMLSelectElement>> & {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { Theme } from '../../theme';
|
|
3
3
|
import type { HTMLQdsProps } from '../../types';
|
|
4
|
+
import { type ResponsiveProp } from '../../hooks/use-responsive-prop';
|
|
4
5
|
interface SpacerOptions {
|
|
5
6
|
axis?: 'x' | 'y';
|
|
6
|
-
size: keyof Theme['spacing']
|
|
7
|
+
size: ResponsiveProp<keyof Theme['spacing']>;
|
|
7
8
|
}
|
|
8
9
|
export interface SpacerProps extends HTMLQdsProps<'span'>, SpacerOptions {
|
|
9
10
|
}
|
|
@@ -3,7 +3,7 @@ import type { Theme } from '../../theme';
|
|
|
3
3
|
import type * as Polymorphic from '../../utils/polymorphic';
|
|
4
4
|
import { type ResponsiveProp } from '../../hooks/use-responsive-prop';
|
|
5
5
|
import type { AlignItems, FlexDirection, JustifyContent, FlexWrap } from './stack.types';
|
|
6
|
-
|
|
6
|
+
type GapProp = keyof Theme['spacing'];
|
|
7
7
|
interface StackOptions {
|
|
8
8
|
/**
|
|
9
9
|
* The direction of the stack.
|
|
@@ -38,7 +38,7 @@ interface StackOptions {
|
|
|
38
38
|
*/
|
|
39
39
|
divider?: ReactNode;
|
|
40
40
|
}
|
|
41
|
-
|
|
42
|
-
export
|
|
41
|
+
type StackComponent = Polymorphic.ForwardRefComponent<'div', StackOptions>;
|
|
42
|
+
export type StackProps = Polymorphic.PropsOf<StackComponent>;
|
|
43
43
|
export declare const Stack: StackComponent;
|
|
44
44
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
1
|
+
export type AlignItems = 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline';
|
|
2
|
+
export type JustifyContent = 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly';
|
|
3
|
+
export type FlexDirection = 'row' | 'row-reverse' | 'column' | 'column-reverse';
|
|
4
|
+
export type FlexWrap = 'wrap' | 'nowrap' | 'wrap-reverse';
|
|
@@ -25,7 +25,7 @@ interface TextFieldOptions extends InputBaseOptions {
|
|
|
25
25
|
*/
|
|
26
26
|
suffix?: string;
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
type OmittedProps = 'children' | 'readOnly' | 'size';
|
|
29
29
|
export interface TextFieldProps extends Omit<HTMLQdsProps<'input'>, OmittedProps>, TextFieldOptions {
|
|
30
30
|
}
|
|
31
31
|
export declare const TextField: import("react").ForwardRefExoticComponent<TextFieldProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -15,7 +15,7 @@ interface TextareaOptions extends TextareaBaseOptions {
|
|
|
15
15
|
*/
|
|
16
16
|
helperText?: string;
|
|
17
17
|
}
|
|
18
|
-
|
|
18
|
+
type OmittedProps = 'children' | 'readOnly' | 'size';
|
|
19
19
|
export interface TextareaProps extends Omit<HTMLQdsProps<'textarea'>, OmittedProps>, TextareaOptions {
|
|
20
20
|
}
|
|
21
21
|
export declare const Textarea: import("react").ForwardRefExoticComponent<TextareaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ToastVariant } from './toast-styles';
|
|
2
|
-
|
|
2
|
+
type Id = number | string;
|
|
3
3
|
interface Toast {
|
|
4
4
|
id: Id;
|
|
5
5
|
/**
|
|
@@ -20,7 +20,7 @@ interface ToastOptions {
|
|
|
20
20
|
*/
|
|
21
21
|
id?: Id;
|
|
22
22
|
}
|
|
23
|
-
|
|
23
|
+
type Subscriber = () => void;
|
|
24
24
|
declare class ToastStore {
|
|
25
25
|
toasts: Toast[];
|
|
26
26
|
subscribers: Subscriber[];
|
|
@@ -199,6 +199,7 @@ export declare const getVariantStyles: (theme: {
|
|
|
199
199
|
md: string;
|
|
200
200
|
lg: string;
|
|
201
201
|
xl: string;
|
|
202
|
+
'2xl': string;
|
|
202
203
|
full: string;
|
|
203
204
|
};
|
|
204
205
|
shadows: {
|
|
@@ -407,4 +408,4 @@ export declare const getVariantStyles: (theme: {
|
|
|
407
408
|
color: string;
|
|
408
409
|
};
|
|
409
410
|
};
|
|
410
|
-
export
|
|
411
|
+
export type ToastVariant = VariantProps<typeof getVariantStyles>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import * as ToastPrimitive from '@radix-ui/react-toast';
|
|
3
2
|
import type { HTMLQdsProps } from '../../types';
|
|
4
3
|
import type { ToastVariant } from './toast-styles';
|
|
@@ -6,8 +5,8 @@ interface ToastOptions {
|
|
|
6
5
|
text: string;
|
|
7
6
|
variant?: ToastVariant;
|
|
8
7
|
}
|
|
9
|
-
|
|
8
|
+
type OmittedProps = 'children';
|
|
10
9
|
interface ToastProps extends Omit<HTMLQdsProps<'div'>, OmittedProps>, ToastOptions {
|
|
11
10
|
}
|
|
12
|
-
export declare function Toast(props: ToastProps & ToastPrimitive.ToastProps): JSX.Element;
|
|
11
|
+
export declare function Toast(props: ToastProps & ToastPrimitive.ToastProps): import("react/jsx-runtime").JSX.Element;
|
|
13
12
|
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { Theme } from '../theme';
|
|
2
2
|
import type { PartialRecord } from '../types';
|
|
3
3
|
import type { UseBreakpointOptions } from './use-breakpoint';
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
type Breakpoints = Theme['breakpoints'];
|
|
5
|
+
type BreakpointsConfig<T> = PartialRecord<keyof Breakpoints, T> & {
|
|
6
6
|
base: T;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export type UseBreakpointValueProps<T> = BreakpointsConfig<T>;
|
|
9
9
|
/**
|
|
10
10
|
* Hook for getting a value based on the current breakpoint.
|
|
11
11
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ElementType } from 'react';
|
|
2
2
|
import type { HTMLQdsProps, LegitimateAny } from '../types';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type FormFieldElement = 'input' | 'select' | 'textarea';
|
|
4
|
+
type PropGetter<T extends ElementType = LegitimateAny> = (props?: HTMLQdsProps<T>) => Record<string, unknown>;
|
|
5
5
|
interface FormFieldOptions {
|
|
6
6
|
/**
|
|
7
7
|
* The label for the form field
|
|
@@ -28,8 +28,8 @@ interface FormFieldOptions {
|
|
|
28
28
|
*/
|
|
29
29
|
isRequired?: boolean;
|
|
30
30
|
}
|
|
31
|
-
|
|
32
|
-
export
|
|
31
|
+
type OmittedProps = 'children' | 'readOnly' | 'size';
|
|
32
|
+
export type UseFormFieldProps<T extends FormFieldElement> = Omit<HTMLQdsProps<T>, OmittedProps> & FormFieldOptions;
|
|
33
33
|
/**
|
|
34
34
|
* Custom hook that returns props for a form field's label, input, helper text and error message.
|
|
35
35
|
* Meant to be used in conjunction with the `Input`, `Select` or `Textarea` component.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HTMLQdsProps } from '../types';
|
|
2
|
-
|
|
2
|
+
type LoadingStatus = 'loading' | 'loaded' | 'error' | 'pending';
|
|
3
3
|
export interface UseImageProps {
|
|
4
4
|
src?: string;
|
|
5
5
|
loading?: HTMLQdsProps<'img'>['loading'];
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type Theme } from '../theme';
|
|
2
2
|
import { type PartialRecord } from '../types';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type Breakpoints = Theme['breakpoints'];
|
|
4
|
+
type BreakpointsConfig<T> = PartialRecord<keyof Breakpoints, T> & {
|
|
5
5
|
base: T;
|
|
6
6
|
};
|
|
7
|
-
export
|
|
7
|
+
export type ResponsiveProp<T> = T | BreakpointsConfig<T>;
|
|
8
8
|
/**
|
|
9
9
|
* Hook for responsive props that returns correct value for current breakpoint or static value
|
|
10
10
|
* if user didn't input responsive options
|