@qasa/qds-ui 0.10.0-next.8 → 0.10.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/cjs/index.js +1322 -1322
- 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 +3 -2
- 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-types.d.ts +2 -1
- package/dist/cjs/types/components/button/button.d.ts +2 -2
- package/dist/cjs/types/components/checkbox/checkbox.d.ts +9 -1
- package/dist/cjs/types/components/display-text/display-text.d.ts +7 -6
- 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 +6 -5
- 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 +6 -5
- package/dist/cjs/types/components/index.d.ts +3 -0
- package/dist/cjs/types/components/label/label.d.ts +11 -9
- package/dist/cjs/types/components/link/link.d.ts +2 -2
- package/dist/cjs/types/components/loading-dots/loading-dots.d.ts +4 -2
- package/dist/cjs/types/components/paragraph/paragraph.d.ts +11 -6
- 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 +6 -5
- package/dist/cjs/types/components/stack/stack.types.d.ts +4 -4
- package/dist/cjs/types/components/switch/index.d.ts +1 -0
- package/dist/cjs/types/components/switch/switch.d.ts +35 -0
- 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 +16 -0
- 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 +3 -1
- 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 +1322 -1322
- 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 +3 -2
- 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-types.d.ts +2 -1
- package/dist/esm/types/components/button/button.d.ts +2 -2
- package/dist/esm/types/components/checkbox/checkbox.d.ts +9 -1
- package/dist/esm/types/components/display-text/display-text.d.ts +7 -6
- 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 +6 -5
- 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 +6 -5
- package/dist/esm/types/components/index.d.ts +3 -0
- package/dist/esm/types/components/label/label.d.ts +11 -9
- package/dist/esm/types/components/link/link.d.ts +2 -2
- package/dist/esm/types/components/loading-dots/loading-dots.d.ts +4 -2
- package/dist/esm/types/components/paragraph/paragraph.d.ts +11 -6
- 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 +6 -5
- package/dist/esm/types/components/stack/stack.types.d.ts +4 -4
- package/dist/esm/types/components/switch/index.d.ts +1 -0
- package/dist/esm/types/components/switch/switch.d.ts +35 -0
- 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 +16 -0
- 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 +3 -1
- 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 +256 -98
- package/package.json +22 -24
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
3
|
import * as react from 'react';
|
|
3
|
-
import { ElementType, ComponentPropsWithoutRef, ReactNode, SVGAttributes, useLayoutEffect } from 'react';
|
|
4
|
+
import { ElementType, ComponentPropsWithoutRef, ReactNode, SVGAttributes, ReactElement, useLayoutEffect } from 'react';
|
|
4
5
|
import { Options } from '@emotion/cache';
|
|
5
6
|
import * as _emotion_react from '@emotion/react';
|
|
6
7
|
import { CSSObject } from '@emotion/react';
|
|
8
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
7
9
|
import * as DropdownPrimitive from '@radix-ui/react-dropdown-menu';
|
|
8
10
|
import * as _emotion_styled from '@emotion/styled';
|
|
9
11
|
import { LucideIcon } from 'lucide-react';
|
|
10
12
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
13
|
+
import * as RadixSwitch from '@radix-ui/react-switch';
|
|
11
14
|
|
|
12
15
|
declare const theme: {
|
|
13
16
|
mediaQueries: {
|
|
@@ -209,6 +212,7 @@ declare const theme: {
|
|
|
209
212
|
md: string;
|
|
210
213
|
lg: string;
|
|
211
214
|
xl: string;
|
|
215
|
+
'2xl': string;
|
|
212
216
|
full: string;
|
|
213
217
|
};
|
|
214
218
|
shadows: {
|
|
@@ -408,21 +412,21 @@ declare const theme: {
|
|
|
408
412
|
};
|
|
409
413
|
};
|
|
410
414
|
};
|
|
411
|
-
|
|
415
|
+
type Theme = typeof theme;
|
|
412
416
|
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
+
type LegitimateAny = any;
|
|
418
|
+
type PartialRecord<K extends string | number | symbol, T> = Partial<Record<K, T>>;
|
|
419
|
+
type Merge<P1 = {}, P2 = {}> = Omit<P1, keyof P2> & P2;
|
|
420
|
+
type HTMLQdsProps<T extends ElementType> = ComponentPropsWithoutRef<T>;
|
|
417
421
|
|
|
418
|
-
|
|
422
|
+
type DeepPartial<T> = {
|
|
419
423
|
[P in keyof T]?: DeepPartial<T[P]>;
|
|
420
424
|
};
|
|
421
425
|
interface TypographyOverride {
|
|
422
426
|
fontFamily?: string;
|
|
423
427
|
fontWeight?: '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
|
|
424
428
|
}
|
|
425
|
-
|
|
429
|
+
type TypographyOverrides = PartialRecord<keyof Theme['typography'], TypographyOverride>;
|
|
426
430
|
interface ThemeOverrides {
|
|
427
431
|
colors?: DeepPartial<Theme['colors']>;
|
|
428
432
|
typography?: TypographyOverrides;
|
|
@@ -816,6 +820,7 @@ declare const overrideTheme: (overrides: ThemeOverrides) => {
|
|
|
816
820
|
md: string;
|
|
817
821
|
lg: string;
|
|
818
822
|
xl: string;
|
|
823
|
+
'2xl': string;
|
|
819
824
|
full: string;
|
|
820
825
|
};
|
|
821
826
|
shadows: {
|
|
@@ -828,7 +833,7 @@ declare const overrideTheme: (overrides: ThemeOverrides) => {
|
|
|
828
833
|
};
|
|
829
834
|
|
|
830
835
|
declare const SUPPORTED_LANGUAGE_CODES: readonly ["en", "sv", "fi", "fr"];
|
|
831
|
-
|
|
836
|
+
type LanguageCode = (typeof SUPPORTED_LANGUAGE_CODES)[number];
|
|
832
837
|
|
|
833
838
|
interface QdsProviderProps {
|
|
834
839
|
children: ReactNode;
|
|
@@ -836,7 +841,13 @@ interface QdsProviderProps {
|
|
|
836
841
|
cacheOptions?: Partial<Options>;
|
|
837
842
|
locale: LanguageCode;
|
|
838
843
|
}
|
|
839
|
-
declare function QdsProvider({ children, themeOverrides, cacheOptions, locale }: QdsProviderProps): JSX.Element;
|
|
844
|
+
declare function QdsProvider({ children, themeOverrides, cacheOptions, locale }: QdsProviderProps): react_jsx_runtime.JSX.Element;
|
|
845
|
+
|
|
846
|
+
type Breakpoints$1 = Theme['breakpoints'];
|
|
847
|
+
type BreakpointsConfig$1<T> = PartialRecord<keyof Breakpoints$1, T> & {
|
|
848
|
+
base: T;
|
|
849
|
+
};
|
|
850
|
+
type ResponsiveProp<T> = T | BreakpointsConfig$1<T>;
|
|
840
851
|
|
|
841
852
|
declare const SIZE_MAP: {
|
|
842
853
|
xs: number;
|
|
@@ -846,7 +857,7 @@ declare const SIZE_MAP: {
|
|
|
846
857
|
xl: number;
|
|
847
858
|
'2xl': number;
|
|
848
859
|
};
|
|
849
|
-
|
|
860
|
+
type AvatarSize = keyof typeof SIZE_MAP;
|
|
850
861
|
interface AvatarOptions {
|
|
851
862
|
/**
|
|
852
863
|
* Source url of the image to display. If not passed
|
|
@@ -861,7 +872,7 @@ interface AvatarOptions {
|
|
|
861
872
|
* Size of the avatar
|
|
862
873
|
* @default 'md'
|
|
863
874
|
*/
|
|
864
|
-
size?: AvatarSize
|
|
875
|
+
size?: ResponsiveProp<AvatarSize>;
|
|
865
876
|
}
|
|
866
877
|
interface AvatarProps extends HTMLQdsProps<'span'>, AvatarOptions {
|
|
867
878
|
}
|
|
@@ -877,12 +888,12 @@ declare const Avatar: react.ForwardRefExoticComponent<AvatarProps & react.RefAtt
|
|
|
877
888
|
/**
|
|
878
889
|
* Infers the OwnProps if E is a ForwardRefExoticComponentWithAs
|
|
879
890
|
*/
|
|
880
|
-
|
|
891
|
+
type OwnProps<E> = E extends ForwardRefComponent<any, infer P> ? P : {};
|
|
881
892
|
/**
|
|
882
893
|
* Infers the JSX.IntrinsicElement if E is a ForwardRefExoticComponentWithAs
|
|
883
894
|
*/
|
|
884
|
-
|
|
885
|
-
|
|
895
|
+
type IntrinsicElement<E> = E extends ForwardRefComponent<infer I, any> ? I : never;
|
|
896
|
+
type ForwardRefExoticComponent<E, OwnProps> = react.ForwardRefExoticComponent<Merge<E extends react.ElementType ? react.ComponentPropsWithRef<E> : never, OwnProps & {
|
|
886
897
|
as?: E;
|
|
887
898
|
}>>;
|
|
888
899
|
interface ForwardRefComponent<IntrinsicElementString, OwnProps = {}> extends ForwardRefExoticComponent<IntrinsicElementString, OwnProps> {
|
|
@@ -905,10 +916,10 @@ interface ForwardRefComponent<IntrinsicElementString, OwnProps = {}> extends For
|
|
|
905
916
|
/**
|
|
906
917
|
* Infers the props of a React component
|
|
907
918
|
*/
|
|
908
|
-
|
|
919
|
+
type PropsOf<E> = E extends react.ComponentType<infer P> ? P : never;
|
|
909
920
|
|
|
910
|
-
|
|
911
|
-
|
|
921
|
+
type IconSize = 16 | 20 | 24 | 32;
|
|
922
|
+
type IconColor = keyof Theme['colors']['icon'] | 'currentColor';
|
|
912
923
|
interface IconOptions {
|
|
913
924
|
/**
|
|
914
925
|
* The size of the icon.
|
|
@@ -923,7 +934,7 @@ interface IconOptions {
|
|
|
923
934
|
*/
|
|
924
935
|
color?: IconColor;
|
|
925
936
|
}
|
|
926
|
-
|
|
937
|
+
type OmittedProps$8 = 'color' | 'onClick' | 'width' | 'height' | 'fontSize';
|
|
927
938
|
interface IconProps extends Omit<SVGAttributes<SVGElement>, OmittedProps$8>, IconOptions {
|
|
928
939
|
}
|
|
929
940
|
|
|
@@ -1015,10 +1026,10 @@ declare const XIcon: react.ForwardRefExoticComponent<IconProps & react.RefAttrib
|
|
|
1015
1026
|
/**
|
|
1016
1027
|
* Adds some global opinionated styles.
|
|
1017
1028
|
*/
|
|
1018
|
-
declare function GlobalStyles(): JSX.Element;
|
|
1029
|
+
declare function GlobalStyles(): react_jsx_runtime.JSX.Element;
|
|
1019
1030
|
|
|
1020
|
-
|
|
1021
|
-
|
|
1031
|
+
type NamedStyles = Record<string, CSSObject>;
|
|
1032
|
+
type StyleInterpolation<T> = (theme: Theme) => T;
|
|
1022
1033
|
/**
|
|
1023
1034
|
* Creates a collection of named style rules.
|
|
1024
1035
|
*/
|
|
@@ -1027,7 +1038,7 @@ declare function createStyleVariants<T extends NamedStyles>(styles: StyleInterpo
|
|
|
1027
1038
|
* Create a style object. Useful for creating styles that depend on the theme.
|
|
1028
1039
|
*/
|
|
1029
1040
|
declare function createStyle<T extends CSSObject>(styles: StyleInterpolation<T>): (theme: Theme) => T;
|
|
1030
|
-
|
|
1041
|
+
type VariantProps<T extends ReturnType<typeof createStyle | typeof createStyleVariants>> = keyof ReturnType<T>;
|
|
1031
1042
|
/**
|
|
1032
1043
|
* Converts css `px` unit to `rem`.
|
|
1033
1044
|
* Assumes the root font size is 16px.
|
|
@@ -1234,6 +1245,7 @@ declare const getFormFieldBaseStyles: (theme: {
|
|
|
1234
1245
|
md: string;
|
|
1235
1246
|
lg: string;
|
|
1236
1247
|
xl: string;
|
|
1248
|
+
'2xl': string;
|
|
1237
1249
|
full: string;
|
|
1238
1250
|
};
|
|
1239
1251
|
shadows: {
|
|
@@ -1679,6 +1691,7 @@ declare const getSizeStyles$4: (theme: {
|
|
|
1679
1691
|
md: string;
|
|
1680
1692
|
lg: string;
|
|
1681
1693
|
xl: string;
|
|
1694
|
+
'2xl': string;
|
|
1682
1695
|
full: string;
|
|
1683
1696
|
};
|
|
1684
1697
|
shadows: {
|
|
@@ -1929,7 +1942,7 @@ declare const getSizeStyles$4: (theme: {
|
|
|
1929
1942
|
paddingRight: string;
|
|
1930
1943
|
};
|
|
1931
1944
|
};
|
|
1932
|
-
|
|
1945
|
+
type ButtonSize = VariantProps<typeof getSizeStyles$4>;
|
|
1933
1946
|
declare const getVariantStyles$1: (theme: {
|
|
1934
1947
|
mediaQueries: {
|
|
1935
1948
|
readonly smUp: "@media(min-width: 480px)";
|
|
@@ -2130,6 +2143,7 @@ declare const getVariantStyles$1: (theme: {
|
|
|
2130
2143
|
md: string;
|
|
2131
2144
|
lg: string;
|
|
2132
2145
|
xl: string;
|
|
2146
|
+
'2xl': string;
|
|
2133
2147
|
full: string;
|
|
2134
2148
|
};
|
|
2135
2149
|
shadows: {
|
|
@@ -2372,14 +2386,14 @@ declare const getVariantStyles$1: (theme: {
|
|
|
2372
2386
|
};
|
|
2373
2387
|
};
|
|
2374
2388
|
};
|
|
2375
|
-
|
|
2389
|
+
type ButtonVariant = VariantProps<typeof getVariantStyles$1>;
|
|
2376
2390
|
|
|
2377
2391
|
interface ButtonOptions {
|
|
2378
2392
|
/**
|
|
2379
2393
|
* Sets the size of the button
|
|
2380
2394
|
* @default 'md'
|
|
2381
2395
|
*/
|
|
2382
|
-
size?: ButtonSize
|
|
2396
|
+
size?: ResponsiveProp<ButtonSize>;
|
|
2383
2397
|
/**
|
|
2384
2398
|
* Sets the style variant of the button
|
|
2385
2399
|
* @default 'secondary'
|
|
@@ -2415,10 +2429,113 @@ interface ButtonOptions {
|
|
|
2415
2429
|
type?: 'button' | 'submit' | 'reset';
|
|
2416
2430
|
}
|
|
2417
2431
|
|
|
2418
|
-
|
|
2419
|
-
|
|
2432
|
+
type PolymorphicButton = ForwardRefComponent<'button', ButtonOptions>;
|
|
2433
|
+
type ButtonProps = PropsOf<PolymorphicButton>;
|
|
2420
2434
|
declare const Button: PolymorphicButton;
|
|
2421
2435
|
|
|
2436
|
+
type DisplaySize = keyof Theme['typography']['display'];
|
|
2437
|
+
type DisplayTextAlign = 'left' | 'center' | 'right';
|
|
2438
|
+
type DisplayTextWrap = 'pretty' | 'balance' | 'wrap' | 'nowrap' | 'stable';
|
|
2439
|
+
interface DisplayTextOptions {
|
|
2440
|
+
/**
|
|
2441
|
+
* Sets the visual size of the display text.
|
|
2442
|
+
* To override the rendered tag, use the `as` prop.
|
|
2443
|
+
*
|
|
2444
|
+
* @default 'md'
|
|
2445
|
+
*/
|
|
2446
|
+
size?: ResponsiveProp<DisplaySize>;
|
|
2447
|
+
/**
|
|
2448
|
+
* Sets the text alignment
|
|
2449
|
+
* @default 'left'
|
|
2450
|
+
*/
|
|
2451
|
+
textAlign?: DisplayTextAlign;
|
|
2452
|
+
/**
|
|
2453
|
+
* Sets the text wrapping
|
|
2454
|
+
* @default 'pretty'
|
|
2455
|
+
* Read more on [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/text-wrap)
|
|
2456
|
+
*/
|
|
2457
|
+
textWrap?: DisplayTextWrap;
|
|
2458
|
+
}
|
|
2459
|
+
type DisplayTextComponent = ForwardRefComponent<'h2', DisplayTextOptions>;
|
|
2460
|
+
type DisplayTextProps = PropsOf<DisplayTextComponent>;
|
|
2461
|
+
declare const DisplayText: DisplayTextComponent;
|
|
2462
|
+
|
|
2463
|
+
interface CheckboxOptions {
|
|
2464
|
+
/**
|
|
2465
|
+
* The label for the checkbox. Accepts a string, or a React component for rendering links within the label.
|
|
2466
|
+
*
|
|
2467
|
+
* @example
|
|
2468
|
+
* ```jsx
|
|
2469
|
+
* <Checkbox label="I agree to the terms and conditions" />
|
|
2470
|
+
* ```
|
|
2471
|
+
*
|
|
2472
|
+
* @example
|
|
2473
|
+
* ```jsx
|
|
2474
|
+
* <Checkbox
|
|
2475
|
+
* label={
|
|
2476
|
+
* <>
|
|
2477
|
+
* I agree to <Link href="/terms">the terms and conditions</Link>
|
|
2478
|
+
* </>
|
|
2479
|
+
* }
|
|
2480
|
+
* />
|
|
2481
|
+
* ```
|
|
2482
|
+
*/
|
|
2483
|
+
label: string | ReactElement<unknown>;
|
|
2484
|
+
/**
|
|
2485
|
+
* Text that provides additional guidance to the user
|
|
2486
|
+
*/
|
|
2487
|
+
helperText?: string;
|
|
2488
|
+
/**
|
|
2489
|
+
* The checked state of the checkbox when it is initially rendered. Use when you do not need to control its checked state.
|
|
2490
|
+
*/
|
|
2491
|
+
isDefaultChecked?: boolean;
|
|
2492
|
+
/**
|
|
2493
|
+
* The checked state of the checkbox when it is initially rendered. Use when you do not need to control its checked state.
|
|
2494
|
+
*/
|
|
2495
|
+
defaultChecked?: boolean;
|
|
2496
|
+
/**
|
|
2497
|
+
* The controlled checked state of the checkbox. Must be used in conjunction with `onCheckedChange`.
|
|
2498
|
+
*/
|
|
2499
|
+
isChecked?: boolean;
|
|
2500
|
+
/**
|
|
2501
|
+
* The controlled checked state of the checkbox. Must be used in conjunction with `onCheckedChange`.
|
|
2502
|
+
*/
|
|
2503
|
+
checked?: boolean;
|
|
2504
|
+
/**
|
|
2505
|
+
* Event handler called when the checked state of the checkbox changes.
|
|
2506
|
+
*/
|
|
2507
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
2508
|
+
/**
|
|
2509
|
+
* If `true` the checkbox will render in its invalid state.
|
|
2510
|
+
* @default false
|
|
2511
|
+
*/
|
|
2512
|
+
isInvalid?: boolean;
|
|
2513
|
+
/**
|
|
2514
|
+
* The error message to display if `isInvalid` is `true`
|
|
2515
|
+
*/
|
|
2516
|
+
errorMessage?: string;
|
|
2517
|
+
/**
|
|
2518
|
+
* If `true` it prevents the user from interacting with the checkbox.
|
|
2519
|
+
* @default false
|
|
2520
|
+
*/
|
|
2521
|
+
isDisabled?: boolean;
|
|
2522
|
+
/**
|
|
2523
|
+
* If `true` the user must check the checkbox before the owning form can be submitted.
|
|
2524
|
+
* @default false
|
|
2525
|
+
*/
|
|
2526
|
+
isRequired?: boolean;
|
|
2527
|
+
/**
|
|
2528
|
+
* The name of the checkbox. Submitted with its owning form as part of a name/value pair.
|
|
2529
|
+
*/
|
|
2530
|
+
name?: string;
|
|
2531
|
+
/**
|
|
2532
|
+
* The value given as data when submitted with a `name`.
|
|
2533
|
+
*/
|
|
2534
|
+
value?: string;
|
|
2535
|
+
}
|
|
2536
|
+
type CheckboxProps = Omit<CheckboxPrimitive.CheckboxProps, 'asChild' | 'children' | 'checked' | 'defaultChecked' | keyof CheckboxOptions> & CheckboxOptions;
|
|
2537
|
+
declare const Checkbox: react.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps, "children" | "asChild" | keyof CheckboxOptions> & CheckboxOptions & react.RefAttributes<HTMLButtonElement>>;
|
|
2538
|
+
|
|
2422
2539
|
interface DividerOptions {
|
|
2423
2540
|
/**
|
|
2424
2541
|
* The orientation of the divider.
|
|
@@ -2431,7 +2548,7 @@ interface DividerProps extends HTMLQdsProps<'span'>, DividerOptions {
|
|
|
2431
2548
|
}
|
|
2432
2549
|
declare const Divider: react.ForwardRefExoticComponent<DividerProps & react.RefAttributes<HTMLDivElement>>;
|
|
2433
2550
|
|
|
2434
|
-
|
|
2551
|
+
type PrimitiveContentProps = DropdownPrimitive.MenuContentProps;
|
|
2435
2552
|
interface DropdownMenuContentOptions {
|
|
2436
2553
|
/**
|
|
2437
2554
|
* Event handler called when focus moves to the trigger after closing.
|
|
@@ -2494,7 +2611,7 @@ interface DropdownMenuContentOptions {
|
|
|
2494
2611
|
interface DropdownMenuContentProps extends HTMLQdsProps<'div'>, DropdownMenuContentOptions {
|
|
2495
2612
|
}
|
|
2496
2613
|
|
|
2497
|
-
|
|
2614
|
+
type DropdownMenuDividerProps = HTMLQdsProps<'div'>;
|
|
2498
2615
|
|
|
2499
2616
|
interface DropdownMenuItemOptions {
|
|
2500
2617
|
/**
|
|
@@ -2520,8 +2637,8 @@ interface DropdownMenuItemOptions {
|
|
|
2520
2637
|
interface DropdownMenuItemProps extends Omit<DropdownPrimitive.DropdownMenuItemProps, 'asChild' | keyof DropdownMenuItemOptions>, DropdownMenuItemOptions {
|
|
2521
2638
|
}
|
|
2522
2639
|
|
|
2523
|
-
|
|
2524
|
-
|
|
2640
|
+
type DropdownTriggerComponent = ForwardRefComponent<'button'>;
|
|
2641
|
+
type DropdownMenuTriggerProps = PropsOf<DropdownTriggerComponent>;
|
|
2525
2642
|
|
|
2526
2643
|
interface DropdownMenuRootProps {
|
|
2527
2644
|
children: ReactNode;
|
|
@@ -2539,16 +2656,16 @@ interface DropdownMenuRootProps {
|
|
|
2539
2656
|
*/
|
|
2540
2657
|
onOpenChange?: (isOpen: boolean) => void;
|
|
2541
2658
|
}
|
|
2542
|
-
declare function DropdownMenuRoot(props: DropdownMenuRootProps): JSX.Element;
|
|
2659
|
+
declare function DropdownMenuRoot(props: DropdownMenuRootProps): react_jsx_runtime.JSX.Element;
|
|
2543
2660
|
declare const DropdownMenu: typeof DropdownMenuRoot & {
|
|
2544
2661
|
Trigger: ForwardRefComponent<"button", {}>;
|
|
2545
2662
|
Content: react.ForwardRefExoticComponent<DropdownMenuContentProps & react.RefAttributes<HTMLDivElement>>;
|
|
2546
2663
|
Item: react.ForwardRefExoticComponent<DropdownMenuItemProps & react.RefAttributes<HTMLDivElement>>;
|
|
2547
|
-
Divider: react.ForwardRefExoticComponent<
|
|
2664
|
+
Divider: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
2548
2665
|
};
|
|
2549
2666
|
|
|
2550
|
-
|
|
2551
|
-
|
|
2667
|
+
type HeadingSize = keyof Theme['typography']['title'];
|
|
2668
|
+
type HeadingColor = keyof Theme['colors']['text'];
|
|
2552
2669
|
interface HeadingOptions {
|
|
2553
2670
|
/**
|
|
2554
2671
|
* Sets the visual size of the heading.
|
|
@@ -2556,7 +2673,7 @@ interface HeadingOptions {
|
|
|
2556
2673
|
*
|
|
2557
2674
|
* @default 'md'
|
|
2558
2675
|
*/
|
|
2559
|
-
size?: HeadingSize
|
|
2676
|
+
size?: ResponsiveProp<HeadingSize>;
|
|
2560
2677
|
/**
|
|
2561
2678
|
* Sets the color of the heading
|
|
2562
2679
|
* @default 'default'
|
|
@@ -2572,16 +2689,16 @@ interface HeadingOptions {
|
|
|
2572
2689
|
*/
|
|
2573
2690
|
textAlign?: 'left' | 'center' | 'right';
|
|
2574
2691
|
}
|
|
2575
|
-
|
|
2576
|
-
|
|
2692
|
+
type HeadingComponent = ForwardRefComponent<'h2', HeadingOptions>;
|
|
2693
|
+
type HeadingProps = PropsOf<HeadingComponent>;
|
|
2577
2694
|
declare const Heading: HeadingComponent;
|
|
2578
2695
|
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
declare const HintBox: react.ForwardRefExoticComponent<
|
|
2696
|
+
type HintBoxTitleProps = HTMLQdsProps<'span'>;
|
|
2697
|
+
type HintBoxProps = HTMLQdsProps<'aside'>;
|
|
2698
|
+
declare const HintBox: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & react.RefAttributes<HTMLElement>> & {
|
|
2582
2699
|
Title: _emotion_styled.StyledComponent<{
|
|
2583
2700
|
theme?: _emotion_react.Theme | undefined;
|
|
2584
|
-
as?: react.ElementType<any> | undefined;
|
|
2701
|
+
as?: react.ElementType<any, keyof react.JSX.IntrinsicElements> | undefined;
|
|
2585
2702
|
}, react.DetailedHTMLProps<react.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {}>;
|
|
2586
2703
|
};
|
|
2587
2704
|
|
|
@@ -2785,6 +2902,7 @@ declare const getSizeStyles$3: (theme: {
|
|
|
2785
2902
|
md: string;
|
|
2786
2903
|
lg: string;
|
|
2787
2904
|
xl: string;
|
|
2905
|
+
'2xl': string;
|
|
2788
2906
|
full: string;
|
|
2789
2907
|
};
|
|
2790
2908
|
shadows: {
|
|
@@ -3197,6 +3315,7 @@ declare const getVariantStyles: (theme: {
|
|
|
3197
3315
|
md: string;
|
|
3198
3316
|
lg: string;
|
|
3199
3317
|
xl: string;
|
|
3318
|
+
'2xl': string;
|
|
3200
3319
|
full: string;
|
|
3201
3320
|
};
|
|
3202
3321
|
shadows: {
|
|
@@ -3454,8 +3573,8 @@ declare const getVariantStyles: (theme: {
|
|
|
3454
3573
|
};
|
|
3455
3574
|
};
|
|
3456
3575
|
|
|
3457
|
-
|
|
3458
|
-
|
|
3576
|
+
type IconButtonSize = VariantProps<typeof getSizeStyles$3>;
|
|
3577
|
+
type IconButtonVariant = VariantProps<typeof getVariantStyles>;
|
|
3459
3578
|
interface IconButtonOptions {
|
|
3460
3579
|
icon: ElementType<IconProps>;
|
|
3461
3580
|
/**
|
|
@@ -3466,7 +3585,7 @@ interface IconButtonOptions {
|
|
|
3466
3585
|
/**
|
|
3467
3586
|
* Defines the size of the button
|
|
3468
3587
|
*/
|
|
3469
|
-
size?: IconButtonSize
|
|
3588
|
+
size?: ResponsiveProp<IconButtonSize>;
|
|
3470
3589
|
/**
|
|
3471
3590
|
* Sets the style variant of the button
|
|
3472
3591
|
*/
|
|
@@ -3476,8 +3595,8 @@ interface IconButtonOptions {
|
|
|
3476
3595
|
*/
|
|
3477
3596
|
isDisabled?: boolean;
|
|
3478
3597
|
}
|
|
3479
|
-
|
|
3480
|
-
|
|
3598
|
+
type IconButtonComponent = ForwardRefComponent<'button', IconButtonOptions>;
|
|
3599
|
+
type IconButtonProps = PropsOf<IconButtonComponent>;
|
|
3481
3600
|
declare const IconButton: IconButtonComponent;
|
|
3482
3601
|
|
|
3483
3602
|
interface InputBaseOptions {
|
|
@@ -3494,7 +3613,7 @@ interface InputBaseOptions {
|
|
|
3494
3613
|
*/
|
|
3495
3614
|
isRequired?: boolean;
|
|
3496
3615
|
}
|
|
3497
|
-
|
|
3616
|
+
type OmittedProps$7 = 'children' | 'readOnly' | 'size' | 'disabled' | 'required';
|
|
3498
3617
|
interface InputBaseProps extends Omit<HTMLQdsProps<'input'>, OmittedProps$7>, InputBaseOptions {
|
|
3499
3618
|
}
|
|
3500
3619
|
declare const InputBase: react.ForwardRefExoticComponent<InputBaseProps & react.RefAttributes<HTMLInputElement>>;
|
|
@@ -3523,7 +3642,7 @@ interface TextFieldOptions extends InputBaseOptions {
|
|
|
3523
3642
|
*/
|
|
3524
3643
|
suffix?: string;
|
|
3525
3644
|
}
|
|
3526
|
-
|
|
3645
|
+
type OmittedProps$6 = 'children' | 'readOnly' | 'size';
|
|
3527
3646
|
interface TextFieldProps extends Omit<HTMLQdsProps<'input'>, OmittedProps$6>, TextFieldOptions {
|
|
3528
3647
|
}
|
|
3529
3648
|
declare const TextField: react.ForwardRefExoticComponent<TextFieldProps & react.RefAttributes<HTMLInputElement>>;
|
|
@@ -3622,9 +3741,6 @@ declare const getSizeStyles$2: (theme: {
|
|
|
3622
3741
|
blue60: string;
|
|
3623
3742
|
blue50: string;
|
|
3624
3743
|
blue40: string;
|
|
3625
|
-
/**
|
|
3626
|
-
* Size of the label
|
|
3627
|
-
*/
|
|
3628
3744
|
blue30: string;
|
|
3629
3745
|
blue20: string;
|
|
3630
3746
|
blue10: string;
|
|
@@ -3731,6 +3847,7 @@ declare const getSizeStyles$2: (theme: {
|
|
|
3731
3847
|
md: string;
|
|
3732
3848
|
lg: string;
|
|
3733
3849
|
xl: string;
|
|
3850
|
+
'2xl': string;
|
|
3734
3851
|
full: string;
|
|
3735
3852
|
};
|
|
3736
3853
|
shadows: {
|
|
@@ -3769,7 +3886,10 @@ declare const getSizeStyles$2: (theme: {
|
|
|
3769
3886
|
lg: {
|
|
3770
3887
|
fontFamily: string;
|
|
3771
3888
|
fontWeight: string;
|
|
3772
|
-
fontSize: string;
|
|
3889
|
+
fontSize: string; /**
|
|
3890
|
+
* Sets the color of the label
|
|
3891
|
+
* @default 'default'
|
|
3892
|
+
*/
|
|
3773
3893
|
lineHeight: string;
|
|
3774
3894
|
letterSpacing: string;
|
|
3775
3895
|
fontFeatureSettings: string;
|
|
@@ -3945,21 +4065,21 @@ declare const getSizeStyles$2: (theme: {
|
|
|
3945
4065
|
letterSpacing: string;
|
|
3946
4066
|
};
|
|
3947
4067
|
};
|
|
3948
|
-
|
|
3949
|
-
|
|
4068
|
+
type LabelSize = VariantProps<typeof getSizeStyles$2>;
|
|
4069
|
+
type LabelColor = keyof Theme['colors']['text'];
|
|
3950
4070
|
interface LabelOptions {
|
|
3951
4071
|
/**
|
|
3952
4072
|
* Size of the label
|
|
3953
4073
|
*/
|
|
3954
|
-
size?: LabelSize
|
|
4074
|
+
size?: ResponsiveProp<LabelSize>;
|
|
3955
4075
|
/**
|
|
3956
4076
|
* Sets the color of the label
|
|
3957
4077
|
* @default 'default'
|
|
3958
4078
|
*/
|
|
3959
4079
|
color?: LabelColor;
|
|
3960
4080
|
}
|
|
3961
|
-
|
|
3962
|
-
|
|
4081
|
+
type LabelComponent = ForwardRefComponent<'label', LabelOptions>;
|
|
4082
|
+
type LabelProps = PropsOf<LabelComponent>;
|
|
3963
4083
|
declare const Label: LabelComponent;
|
|
3964
4084
|
|
|
3965
4085
|
interface LinkOptions {
|
|
@@ -3972,8 +4092,8 @@ interface LinkOptions {
|
|
|
3972
4092
|
*/
|
|
3973
4093
|
isExternal?: boolean;
|
|
3974
4094
|
}
|
|
3975
|
-
|
|
3976
|
-
|
|
4095
|
+
type LinkComponent = ForwardRefComponent<'a', LinkOptions>;
|
|
4096
|
+
type LinkProps = PropsOf<LinkComponent>;
|
|
3977
4097
|
declare const Link: LinkComponent;
|
|
3978
4098
|
|
|
3979
4099
|
declare const getSizeStyles$1: (theme: {
|
|
@@ -4176,6 +4296,7 @@ declare const getSizeStyles$1: (theme: {
|
|
|
4176
4296
|
md: string;
|
|
4177
4297
|
lg: string;
|
|
4178
4298
|
xl: string;
|
|
4299
|
+
'2xl': string;
|
|
4179
4300
|
full: string;
|
|
4180
4301
|
};
|
|
4181
4302
|
shadows: {
|
|
@@ -4382,9 +4503,9 @@ declare const getSizeStyles$1: (theme: {
|
|
|
4382
4503
|
fontSize: string;
|
|
4383
4504
|
};
|
|
4384
4505
|
};
|
|
4385
|
-
|
|
4506
|
+
type LoadingDotsSize = VariantProps<typeof getSizeStyles$1>;
|
|
4386
4507
|
interface LoadingDotsOptions {
|
|
4387
|
-
size?: LoadingDotsSize
|
|
4508
|
+
size?: ResponsiveProp<LoadingDotsSize>;
|
|
4388
4509
|
}
|
|
4389
4510
|
interface LoadingDotsProps extends HTMLQdsProps<'span'>, LoadingDotsOptions {
|
|
4390
4511
|
}
|
|
@@ -4590,6 +4711,7 @@ declare const getSizeStyles: (theme: {
|
|
|
4590
4711
|
md: string;
|
|
4591
4712
|
lg: string;
|
|
4592
4713
|
xl: string;
|
|
4714
|
+
'2xl': string;
|
|
4593
4715
|
full: string;
|
|
4594
4716
|
};
|
|
4595
4717
|
shadows: {
|
|
@@ -4636,7 +4758,10 @@ declare const getSizeStyles: (theme: {
|
|
|
4636
4758
|
md: {
|
|
4637
4759
|
fontFamily: string;
|
|
4638
4760
|
fontWeight: string;
|
|
4639
|
-
fontSize: string;
|
|
4761
|
+
fontSize: string; /**
|
|
4762
|
+
* Sets the visual size of the text
|
|
4763
|
+
* @default 'md'
|
|
4764
|
+
*/
|
|
4640
4765
|
lineHeight: string;
|
|
4641
4766
|
letterSpacing: string;
|
|
4642
4767
|
fontFeatureSettings: string;
|
|
@@ -4825,14 +4950,14 @@ declare const getSizeStyles: (theme: {
|
|
|
4825
4950
|
letterSpacing: string;
|
|
4826
4951
|
};
|
|
4827
4952
|
};
|
|
4828
|
-
|
|
4829
|
-
|
|
4953
|
+
type ParagraphSize = VariantProps<typeof getSizeStyles>;
|
|
4954
|
+
type ParagraphColor = keyof Theme['colors']['text'];
|
|
4830
4955
|
interface ParagraphOptions {
|
|
4831
4956
|
/**
|
|
4832
4957
|
* Sets the visual size of the text
|
|
4833
4958
|
* @default 'md'
|
|
4834
4959
|
*/
|
|
4835
|
-
size?: ParagraphSize
|
|
4960
|
+
size?: ResponsiveProp<ParagraphSize>;
|
|
4836
4961
|
/**
|
|
4837
4962
|
* Sets the color of the text
|
|
4838
4963
|
* @default 'normal'
|
|
@@ -4848,8 +4973,8 @@ interface ParagraphOptions {
|
|
|
4848
4973
|
*/
|
|
4849
4974
|
textAlign?: 'left' | 'center' | 'right';
|
|
4850
4975
|
}
|
|
4851
|
-
|
|
4852
|
-
|
|
4976
|
+
type ParagraphComponent = ForwardRefComponent<'p', ParagraphOptions>;
|
|
4977
|
+
type ParagraphProps = PropsOf<ParagraphComponent>;
|
|
4853
4978
|
declare const Paragraph: ParagraphComponent;
|
|
4854
4979
|
|
|
4855
4980
|
interface SelectBaseOptions {
|
|
@@ -4875,13 +5000,13 @@ interface SelectBaseOptions {
|
|
|
4875
5000
|
*/
|
|
4876
5001
|
isRequired?: boolean;
|
|
4877
5002
|
}
|
|
4878
|
-
|
|
5003
|
+
type OmittedProps$5 = 'readOnly' | 'size' | 'multiple' | 'disabled' | 'required';
|
|
4879
5004
|
interface SelectBaseProps extends Omit<HTMLQdsProps<'select'>, OmittedProps$5>, SelectBaseOptions {
|
|
4880
5005
|
}
|
|
4881
5006
|
declare const SelectBase: react.ForwardRefExoticComponent<SelectBaseProps & react.RefAttributes<HTMLSelectElement>>;
|
|
4882
5007
|
|
|
4883
|
-
|
|
4884
|
-
|
|
5008
|
+
type ResizeProp = 'none' | 'both' | 'horizontal' | 'vertical';
|
|
5009
|
+
type MinRowsProp = number;
|
|
4885
5010
|
interface TextareaBaseOptions {
|
|
4886
5011
|
/**
|
|
4887
5012
|
* If `true`, the textarea will be invalid
|
|
@@ -4909,7 +5034,7 @@ interface TextareaBaseOptions {
|
|
|
4909
5034
|
*/
|
|
4910
5035
|
minRows?: MinRowsProp;
|
|
4911
5036
|
}
|
|
4912
|
-
|
|
5037
|
+
type OmittedProps$4 = 'children' | 'readOnly' | 'size' | 'disabled' | 'required' | 'rows' | 'cols';
|
|
4913
5038
|
interface TextareaBaseProps extends Omit<HTMLQdsProps<'textarea'>, OmittedProps$4>, TextareaBaseOptions {
|
|
4914
5039
|
}
|
|
4915
5040
|
declare const TextareaBase: react.ForwardRefExoticComponent<TextareaBaseProps & react.RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -4937,7 +5062,7 @@ interface RadioCardOptions {
|
|
|
4937
5062
|
interface RadioCardProps extends Omit<RadioGroupPrimitive.RadioGroupItemProps, 'asChild' | keyof RadioCardOptions>, RadioCardOptions {
|
|
4938
5063
|
}
|
|
4939
5064
|
|
|
4940
|
-
|
|
5065
|
+
type RadioGroupLabelProps = HTMLQdsProps<'span'>;
|
|
4941
5066
|
|
|
4942
5067
|
interface RadioGroupOptions {
|
|
4943
5068
|
/**
|
|
@@ -4982,13 +5107,13 @@ interface RadioGroupProps extends Omit<RadioGroupPrimitive.RadioGroupProps, 'asC
|
|
|
4982
5107
|
}
|
|
4983
5108
|
declare const RadioGroup: react.ForwardRefExoticComponent<RadioGroupProps & react.RefAttributes<HTMLDivElement>> & {
|
|
4984
5109
|
Card: react.ForwardRefExoticComponent<RadioCardProps & react.RefAttributes<HTMLButtonElement>>;
|
|
4985
|
-
Label: react.ForwardRefExoticComponent<
|
|
5110
|
+
Label: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & react.RefAttributes<HTMLSpanElement>>;
|
|
4986
5111
|
};
|
|
4987
5112
|
|
|
4988
5113
|
interface SelectOptionOptions {
|
|
4989
5114
|
isDisabled?: boolean;
|
|
4990
5115
|
}
|
|
4991
|
-
|
|
5116
|
+
type OmittedProps$3 = 'disabled' | 'label';
|
|
4992
5117
|
interface SelectOptionProps extends Omit<HTMLQdsProps<'option'>, OmittedProps$3>, SelectOptionOptions {
|
|
4993
5118
|
}
|
|
4994
5119
|
|
|
@@ -5006,7 +5131,7 @@ interface SelectOptions extends SelectBaseOptions {
|
|
|
5006
5131
|
*/
|
|
5007
5132
|
helperText?: string;
|
|
5008
5133
|
}
|
|
5009
|
-
|
|
5134
|
+
type OmittedProps$2 = 'readOnly' | 'size';
|
|
5010
5135
|
interface SelectProps extends Omit<HTMLQdsProps<'select'>, OmittedProps$2>, SelectOptions {
|
|
5011
5136
|
}
|
|
5012
5137
|
declare const Select: react.ForwardRefExoticComponent<SelectProps & react.RefAttributes<HTMLSelectElement>> & {
|
|
@@ -5015,24 +5140,24 @@ declare const Select: react.ForwardRefExoticComponent<SelectProps & react.RefAtt
|
|
|
5015
5140
|
|
|
5016
5141
|
interface SpacerOptions {
|
|
5017
5142
|
axis?: 'x' | 'y';
|
|
5018
|
-
size: keyof Theme['spacing']
|
|
5143
|
+
size: ResponsiveProp<keyof Theme['spacing']>;
|
|
5019
5144
|
}
|
|
5020
5145
|
interface SpacerProps extends HTMLQdsProps<'span'>, SpacerOptions {
|
|
5021
5146
|
}
|
|
5022
5147
|
declare const Spacer: react.ForwardRefExoticComponent<SpacerProps & react.RefAttributes<HTMLSpanElement>>;
|
|
5023
5148
|
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5149
|
+
type AlignItems = 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline';
|
|
5150
|
+
type JustifyContent = 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly';
|
|
5151
|
+
type FlexDirection = 'row' | 'row-reverse' | 'column' | 'column-reverse';
|
|
5152
|
+
type FlexWrap = 'wrap' | 'nowrap' | 'wrap-reverse';
|
|
5028
5153
|
|
|
5029
|
-
|
|
5154
|
+
type GapProp = keyof Theme['spacing'];
|
|
5030
5155
|
interface StackOptions {
|
|
5031
5156
|
/**
|
|
5032
5157
|
* The direction of the stack.
|
|
5033
5158
|
* @default 'column'
|
|
5034
5159
|
*/
|
|
5035
|
-
direction?: FlexDirection
|
|
5160
|
+
direction?: ResponsiveProp<FlexDirection>;
|
|
5036
5161
|
/**
|
|
5037
5162
|
* The CSS `justify-content` property.
|
|
5038
5163
|
* Controls the alignment of items on the main axis.
|
|
@@ -5052,7 +5177,7 @@ interface StackOptions {
|
|
|
5052
5177
|
/**
|
|
5053
5178
|
* The gap between each child element.
|
|
5054
5179
|
*/
|
|
5055
|
-
gap?: GapProp
|
|
5180
|
+
gap?: ResponsiveProp<GapProp>;
|
|
5056
5181
|
/**
|
|
5057
5182
|
* A divider element to be rendered between each child element.
|
|
5058
5183
|
*
|
|
@@ -5061,10 +5186,43 @@ interface StackOptions {
|
|
|
5061
5186
|
*/
|
|
5062
5187
|
divider?: ReactNode;
|
|
5063
5188
|
}
|
|
5064
|
-
|
|
5065
|
-
|
|
5189
|
+
type StackComponent = ForwardRefComponent<'div', StackOptions>;
|
|
5190
|
+
type StackProps = PropsOf<StackComponent>;
|
|
5066
5191
|
declare const Stack: StackComponent;
|
|
5067
5192
|
|
|
5193
|
+
interface SwitchOptions {
|
|
5194
|
+
/**
|
|
5195
|
+
* The label for the switch
|
|
5196
|
+
*/
|
|
5197
|
+
label: string;
|
|
5198
|
+
/**
|
|
5199
|
+
* The text that appears below the label
|
|
5200
|
+
* to provide additional guidance to the user
|
|
5201
|
+
*/
|
|
5202
|
+
helperText?: string;
|
|
5203
|
+
/**
|
|
5204
|
+
* The checked state of the checkbox when it is initially rendered. Use when you do not need to control its checked state.
|
|
5205
|
+
*/
|
|
5206
|
+
isDefaultChecked?: boolean;
|
|
5207
|
+
/**
|
|
5208
|
+
* If `true`, the switch will be checked
|
|
5209
|
+
*/
|
|
5210
|
+
isChecked?: boolean;
|
|
5211
|
+
/**
|
|
5212
|
+
* If `true`, the switch will be disabled and
|
|
5213
|
+
* cannot be interacted with
|
|
5214
|
+
*/
|
|
5215
|
+
isDisabled?: boolean;
|
|
5216
|
+
/**
|
|
5217
|
+
* If `true`, indicates that the switch is required
|
|
5218
|
+
*/
|
|
5219
|
+
isRequired?: boolean;
|
|
5220
|
+
onCheckedChange?: (isChecked: boolean) => void;
|
|
5221
|
+
}
|
|
5222
|
+
interface SwitchProps extends Omit<RadixSwitch.SwitchProps, 'asChild' | keyof SwitchOptions>, SwitchOptions {
|
|
5223
|
+
}
|
|
5224
|
+
declare const Switch: react.ForwardRefExoticComponent<SwitchProps & react.RefAttributes<HTMLButtonElement>>;
|
|
5225
|
+
|
|
5068
5226
|
interface TextareaOptions extends TextareaBaseOptions {
|
|
5069
5227
|
/**
|
|
5070
5228
|
* The label for the textarea field
|
|
@@ -5079,12 +5237,12 @@ interface TextareaOptions extends TextareaBaseOptions {
|
|
|
5079
5237
|
*/
|
|
5080
5238
|
helperText?: string;
|
|
5081
5239
|
}
|
|
5082
|
-
|
|
5240
|
+
type OmittedProps$1 = 'children' | 'readOnly' | 'size';
|
|
5083
5241
|
interface TextareaProps extends Omit<HTMLQdsProps<'textarea'>, OmittedProps$1>, TextareaOptions {
|
|
5084
5242
|
}
|
|
5085
5243
|
declare const Textarea: react.ForwardRefExoticComponent<TextareaProps & react.RefAttributes<HTMLTextAreaElement>>;
|
|
5086
5244
|
|
|
5087
|
-
|
|
5245
|
+
type Id = number | string;
|
|
5088
5246
|
interface ToastOptions {
|
|
5089
5247
|
/**
|
|
5090
5248
|
* Unique identifier for the toast (can be used for removing it prematurely). If a toast with this
|
|
@@ -5115,11 +5273,11 @@ declare function useBreakpoint(params?: UseBreakpointOptions): {
|
|
|
5115
5273
|
currentBreakpoint: "2xl" | "base" | "xl" | "lg" | "md" | "sm";
|
|
5116
5274
|
};
|
|
5117
5275
|
|
|
5118
|
-
|
|
5119
|
-
|
|
5276
|
+
type Breakpoints = Theme['breakpoints'];
|
|
5277
|
+
type BreakpointsConfig<T> = PartialRecord<keyof Breakpoints, T> & {
|
|
5120
5278
|
base: T;
|
|
5121
5279
|
};
|
|
5122
|
-
|
|
5280
|
+
type UseBreakpointValueProps<T> = BreakpointsConfig<T>;
|
|
5123
5281
|
/**
|
|
5124
5282
|
* Hook for getting a value based on the current breakpoint.
|
|
5125
5283
|
*
|
|
@@ -5128,7 +5286,7 @@ declare type UseBreakpointValueProps<T> = BreakpointsConfig<T>;
|
|
|
5128
5286
|
*/
|
|
5129
5287
|
declare function useBreakpointValue<T>(values: UseBreakpointValueProps<T>, options?: UseBreakpointOptions): T;
|
|
5130
5288
|
|
|
5131
|
-
|
|
5289
|
+
type LoadingStatus = 'loading' | 'loaded' | 'error' | 'pending';
|
|
5132
5290
|
interface UseImageProps {
|
|
5133
5291
|
src?: string;
|
|
5134
5292
|
loading?: HTMLQdsProps<'img'>['loading'];
|
|
@@ -5137,8 +5295,8 @@ declare const useImage: ({ src, loading }: UseImageProps) => {
|
|
|
5137
5295
|
loadingStatus: LoadingStatus;
|
|
5138
5296
|
};
|
|
5139
5297
|
|
|
5140
|
-
|
|
5141
|
-
|
|
5298
|
+
type FormFieldElement = 'input' | 'select' | 'textarea';
|
|
5299
|
+
type PropGetter<T extends ElementType = LegitimateAny> = (props?: HTMLQdsProps<T>) => Record<string, unknown>;
|
|
5142
5300
|
interface FormFieldOptions {
|
|
5143
5301
|
/**
|
|
5144
5302
|
* The label for the form field
|
|
@@ -5165,8 +5323,8 @@ interface FormFieldOptions {
|
|
|
5165
5323
|
*/
|
|
5166
5324
|
isRequired?: boolean;
|
|
5167
5325
|
}
|
|
5168
|
-
|
|
5169
|
-
|
|
5326
|
+
type OmittedProps = 'children' | 'readOnly' | 'size';
|
|
5327
|
+
type UseFormFieldProps<T extends FormFieldElement> = Omit<HTMLQdsProps<T>, OmittedProps> & FormFieldOptions;
|
|
5170
5328
|
/**
|
|
5171
5329
|
* Custom hook that returns props for a form field's label, input, helper text and error message.
|
|
5172
5330
|
* Meant to be used in conjunction with the `Input`, `Select` or `Textarea` component.
|
|
@@ -5198,4 +5356,4 @@ declare function useStableId(fixedId?: string | null): string;
|
|
|
5198
5356
|
*/
|
|
5199
5357
|
declare const useSafeLayoutEffect: typeof useLayoutEffect;
|
|
5200
5358
|
|
|
5201
|
-
export { AlertCircleIcon, AlertTriangleIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, Avatar, AvatarProps, BellIcon, BellOffIcon, BookmarkIcon, Button, ButtonProps, CalendarIcon, CameraIcon, CheckCircleIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CreateIconOptions, Divider, DividerProps, DropdownMenu, DropdownMenuContentProps, DropdownMenuDividerProps, DropdownMenuItemProps, DropdownMenuRootProps, DropdownMenuTriggerProps, ForwardRefComponent, GlobalStyles, GlobeIcon, Heading, HeadingProps, HeartFilledIcon, HeartIcon, HelpCircleIcon, HintBox, HintBoxProps, HintBoxTitleProps, HistoryIcon, HomeIcon, IconButton, IconButtonProps, IconProps, ImageIcon, InputBase, InputBaseOptions, InputBaseProps, IntrinsicElement, Label, LabelProps, Link, LinkProps, ListFilterIcon, ListIcon, LoadingDots, LoadingDotsProps, LogOutIcon, MapIcon, MapPinIcon, MenuIcon, MessageCircleIcon, MinusIcon, MoreHorizontalIcon, MoreVerticalIcon, OwnProps, Paragraph, ParagraphProps, PenIcon, PlusIcon, PropsOf, QdsProvider, RadioCardProps, RadioGroup, RadioGroupLabelProps, RadioGroupProps, SearchIcon, Select, SelectBase, SelectBaseOptions, SelectOptionProps, SelectProps, SettingsIcon, ShareIcon, SlidersIcon, Spacer, SpacerProps, Stack, StackProps, StarFilledIcon, StarIcon, TextField, TextFieldProps, Textarea, TextareaBase, TextareaBaseOptions, TextareaBaseProps, TextareaProps, Theme, ThemeOverrides, TrashIcon, UseBreakpointOptions, UseBreakpointValueProps, UseFormFieldProps, UseImageProps, UserIcon, VariantProps, XCircleIcon, XIcon, createIcon, createLucideIcon, createStyle, createStyleVariants, getFormFieldBaseStyles, overrideTheme, pxToRem, theme, toast, useBreakpoint, useBreakpointValue, useFormField, useImage, useSafeLayoutEffect, useStableId };
|
|
5359
|
+
export { AlertCircleIcon, AlertTriangleIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, Avatar, AvatarProps, BellIcon, BellOffIcon, BookmarkIcon, Button, ButtonProps, CalendarIcon, CameraIcon, CheckCircleIcon, CheckIcon, Checkbox, CheckboxProps, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CreateIconOptions, DisplayText, DisplayTextProps, Divider, DividerProps, DropdownMenu, DropdownMenuContentProps, DropdownMenuDividerProps, DropdownMenuItemProps, DropdownMenuRootProps, DropdownMenuTriggerProps, ForwardRefComponent, GlobalStyles, GlobeIcon, Heading, HeadingProps, HeartFilledIcon, HeartIcon, HelpCircleIcon, HintBox, HintBoxProps, HintBoxTitleProps, HistoryIcon, HomeIcon, IconButton, IconButtonProps, IconProps, ImageIcon, InputBase, InputBaseOptions, InputBaseProps, IntrinsicElement, Label, LabelProps, Link, LinkProps, ListFilterIcon, ListIcon, LoadingDots, LoadingDotsProps, LogOutIcon, MapIcon, MapPinIcon, MenuIcon, MessageCircleIcon, MinusIcon, MoreHorizontalIcon, MoreVerticalIcon, OwnProps, Paragraph, ParagraphProps, PenIcon, PlusIcon, PropsOf, QdsProvider, RadioCardProps, RadioGroup, RadioGroupLabelProps, RadioGroupProps, SearchIcon, Select, SelectBase, SelectBaseOptions, SelectOptionProps, SelectProps, SettingsIcon, ShareIcon, SlidersIcon, Spacer, SpacerProps, Stack, StackProps, StarFilledIcon, StarIcon, Switch, TextField, TextFieldProps, Textarea, TextareaBase, TextareaBaseOptions, TextareaBaseProps, TextareaProps, Theme, ThemeOverrides, TrashIcon, UseBreakpointOptions, UseBreakpointValueProps, UseFormFieldProps, UseImageProps, UserIcon, VariantProps, XCircleIcon, XIcon, createIcon, createLucideIcon, createStyle, createStyleVariants, getFormFieldBaseStyles, overrideTheme, pxToRem, theme, toast, useBreakpoint, useBreakpointValue, useFormField, useImage, useSafeLayoutEffect, useStableId };
|