@qasa/qds-ui 0.10.0-next.9 → 0.10.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/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 +2 -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 +2 -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 +187 -98
- package/package.json +22 -24
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
3
|
import * as react from 'react';
|
|
3
4
|
import { ElementType, ComponentPropsWithoutRef, ReactNode, SVGAttributes, ReactElement, useLayoutEffect } from 'react';
|
|
4
5
|
import { Options } from '@emotion/cache';
|
|
@@ -9,6 +10,7 @@ import * as DropdownPrimitive from '@radix-ui/react-dropdown-menu';
|
|
|
9
10
|
import * as _emotion_styled from '@emotion/styled';
|
|
10
11
|
import { LucideIcon } from 'lucide-react';
|
|
11
12
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
13
|
+
import * as RadixSwitch from '@radix-ui/react-switch';
|
|
12
14
|
|
|
13
15
|
declare const theme: {
|
|
14
16
|
mediaQueries: {
|
|
@@ -210,6 +212,7 @@ declare const theme: {
|
|
|
210
212
|
md: string;
|
|
211
213
|
lg: string;
|
|
212
214
|
xl: string;
|
|
215
|
+
'2xl': string;
|
|
213
216
|
full: string;
|
|
214
217
|
};
|
|
215
218
|
shadows: {
|
|
@@ -409,21 +412,21 @@ declare const theme: {
|
|
|
409
412
|
};
|
|
410
413
|
};
|
|
411
414
|
};
|
|
412
|
-
|
|
415
|
+
type Theme = typeof theme;
|
|
413
416
|
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
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>;
|
|
418
421
|
|
|
419
|
-
|
|
422
|
+
type DeepPartial<T> = {
|
|
420
423
|
[P in keyof T]?: DeepPartial<T[P]>;
|
|
421
424
|
};
|
|
422
425
|
interface TypographyOverride {
|
|
423
426
|
fontFamily?: string;
|
|
424
427
|
fontWeight?: '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
|
|
425
428
|
}
|
|
426
|
-
|
|
429
|
+
type TypographyOverrides = PartialRecord<keyof Theme['typography'], TypographyOverride>;
|
|
427
430
|
interface ThemeOverrides {
|
|
428
431
|
colors?: DeepPartial<Theme['colors']>;
|
|
429
432
|
typography?: TypographyOverrides;
|
|
@@ -817,6 +820,7 @@ declare const overrideTheme: (overrides: ThemeOverrides) => {
|
|
|
817
820
|
md: string;
|
|
818
821
|
lg: string;
|
|
819
822
|
xl: string;
|
|
823
|
+
'2xl': string;
|
|
820
824
|
full: string;
|
|
821
825
|
};
|
|
822
826
|
shadows: {
|
|
@@ -829,7 +833,7 @@ declare const overrideTheme: (overrides: ThemeOverrides) => {
|
|
|
829
833
|
};
|
|
830
834
|
|
|
831
835
|
declare const SUPPORTED_LANGUAGE_CODES: readonly ["en", "sv", "fi", "fr"];
|
|
832
|
-
|
|
836
|
+
type LanguageCode = (typeof SUPPORTED_LANGUAGE_CODES)[number];
|
|
833
837
|
|
|
834
838
|
interface QdsProviderProps {
|
|
835
839
|
children: ReactNode;
|
|
@@ -837,7 +841,13 @@ interface QdsProviderProps {
|
|
|
837
841
|
cacheOptions?: Partial<Options>;
|
|
838
842
|
locale: LanguageCode;
|
|
839
843
|
}
|
|
840
|
-
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>;
|
|
841
851
|
|
|
842
852
|
declare const SIZE_MAP: {
|
|
843
853
|
xs: number;
|
|
@@ -847,7 +857,7 @@ declare const SIZE_MAP: {
|
|
|
847
857
|
xl: number;
|
|
848
858
|
'2xl': number;
|
|
849
859
|
};
|
|
850
|
-
|
|
860
|
+
type AvatarSize = keyof typeof SIZE_MAP;
|
|
851
861
|
interface AvatarOptions {
|
|
852
862
|
/**
|
|
853
863
|
* Source url of the image to display. If not passed
|
|
@@ -862,7 +872,7 @@ interface AvatarOptions {
|
|
|
862
872
|
* Size of the avatar
|
|
863
873
|
* @default 'md'
|
|
864
874
|
*/
|
|
865
|
-
size?: AvatarSize
|
|
875
|
+
size?: ResponsiveProp<AvatarSize>;
|
|
866
876
|
}
|
|
867
877
|
interface AvatarProps extends HTMLQdsProps<'span'>, AvatarOptions {
|
|
868
878
|
}
|
|
@@ -878,12 +888,12 @@ declare const Avatar: react.ForwardRefExoticComponent<AvatarProps & react.RefAtt
|
|
|
878
888
|
/**
|
|
879
889
|
* Infers the OwnProps if E is a ForwardRefExoticComponentWithAs
|
|
880
890
|
*/
|
|
881
|
-
|
|
891
|
+
type OwnProps<E> = E extends ForwardRefComponent<any, infer P> ? P : {};
|
|
882
892
|
/**
|
|
883
893
|
* Infers the JSX.IntrinsicElement if E is a ForwardRefExoticComponentWithAs
|
|
884
894
|
*/
|
|
885
|
-
|
|
886
|
-
|
|
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 & {
|
|
887
897
|
as?: E;
|
|
888
898
|
}>>;
|
|
889
899
|
interface ForwardRefComponent<IntrinsicElementString, OwnProps = {}> extends ForwardRefExoticComponent<IntrinsicElementString, OwnProps> {
|
|
@@ -906,10 +916,10 @@ interface ForwardRefComponent<IntrinsicElementString, OwnProps = {}> extends For
|
|
|
906
916
|
/**
|
|
907
917
|
* Infers the props of a React component
|
|
908
918
|
*/
|
|
909
|
-
|
|
919
|
+
type PropsOf<E> = E extends react.ComponentType<infer P> ? P : never;
|
|
910
920
|
|
|
911
|
-
|
|
912
|
-
|
|
921
|
+
type IconSize = 16 | 20 | 24 | 32;
|
|
922
|
+
type IconColor = keyof Theme['colors']['icon'] | 'currentColor';
|
|
913
923
|
interface IconOptions {
|
|
914
924
|
/**
|
|
915
925
|
* The size of the icon.
|
|
@@ -924,7 +934,7 @@ interface IconOptions {
|
|
|
924
934
|
*/
|
|
925
935
|
color?: IconColor;
|
|
926
936
|
}
|
|
927
|
-
|
|
937
|
+
type OmittedProps$8 = 'color' | 'onClick' | 'width' | 'height' | 'fontSize';
|
|
928
938
|
interface IconProps extends Omit<SVGAttributes<SVGElement>, OmittedProps$8>, IconOptions {
|
|
929
939
|
}
|
|
930
940
|
|
|
@@ -1016,10 +1026,10 @@ declare const XIcon: react.ForwardRefExoticComponent<IconProps & react.RefAttrib
|
|
|
1016
1026
|
/**
|
|
1017
1027
|
* Adds some global opinionated styles.
|
|
1018
1028
|
*/
|
|
1019
|
-
declare function GlobalStyles(): JSX.Element;
|
|
1029
|
+
declare function GlobalStyles(): react_jsx_runtime.JSX.Element;
|
|
1020
1030
|
|
|
1021
|
-
|
|
1022
|
-
|
|
1031
|
+
type NamedStyles = Record<string, CSSObject>;
|
|
1032
|
+
type StyleInterpolation<T> = (theme: Theme) => T;
|
|
1023
1033
|
/**
|
|
1024
1034
|
* Creates a collection of named style rules.
|
|
1025
1035
|
*/
|
|
@@ -1028,7 +1038,7 @@ declare function createStyleVariants<T extends NamedStyles>(styles: StyleInterpo
|
|
|
1028
1038
|
* Create a style object. Useful for creating styles that depend on the theme.
|
|
1029
1039
|
*/
|
|
1030
1040
|
declare function createStyle<T extends CSSObject>(styles: StyleInterpolation<T>): (theme: Theme) => T;
|
|
1031
|
-
|
|
1041
|
+
type VariantProps<T extends ReturnType<typeof createStyle | typeof createStyleVariants>> = keyof ReturnType<T>;
|
|
1032
1042
|
/**
|
|
1033
1043
|
* Converts css `px` unit to `rem`.
|
|
1034
1044
|
* Assumes the root font size is 16px.
|
|
@@ -1235,6 +1245,7 @@ declare const getFormFieldBaseStyles: (theme: {
|
|
|
1235
1245
|
md: string;
|
|
1236
1246
|
lg: string;
|
|
1237
1247
|
xl: string;
|
|
1248
|
+
'2xl': string;
|
|
1238
1249
|
full: string;
|
|
1239
1250
|
};
|
|
1240
1251
|
shadows: {
|
|
@@ -1680,6 +1691,7 @@ declare const getSizeStyles$4: (theme: {
|
|
|
1680
1691
|
md: string;
|
|
1681
1692
|
lg: string;
|
|
1682
1693
|
xl: string;
|
|
1694
|
+
'2xl': string;
|
|
1683
1695
|
full: string;
|
|
1684
1696
|
};
|
|
1685
1697
|
shadows: {
|
|
@@ -1930,7 +1942,7 @@ declare const getSizeStyles$4: (theme: {
|
|
|
1930
1942
|
paddingRight: string;
|
|
1931
1943
|
};
|
|
1932
1944
|
};
|
|
1933
|
-
|
|
1945
|
+
type ButtonSize = VariantProps<typeof getSizeStyles$4>;
|
|
1934
1946
|
declare const getVariantStyles$1: (theme: {
|
|
1935
1947
|
mediaQueries: {
|
|
1936
1948
|
readonly smUp: "@media(min-width: 480px)";
|
|
@@ -2131,6 +2143,7 @@ declare const getVariantStyles$1: (theme: {
|
|
|
2131
2143
|
md: string;
|
|
2132
2144
|
lg: string;
|
|
2133
2145
|
xl: string;
|
|
2146
|
+
'2xl': string;
|
|
2134
2147
|
full: string;
|
|
2135
2148
|
};
|
|
2136
2149
|
shadows: {
|
|
@@ -2373,14 +2386,14 @@ declare const getVariantStyles$1: (theme: {
|
|
|
2373
2386
|
};
|
|
2374
2387
|
};
|
|
2375
2388
|
};
|
|
2376
|
-
|
|
2389
|
+
type ButtonVariant = VariantProps<typeof getVariantStyles$1>;
|
|
2377
2390
|
|
|
2378
2391
|
interface ButtonOptions {
|
|
2379
2392
|
/**
|
|
2380
2393
|
* Sets the size of the button
|
|
2381
2394
|
* @default 'md'
|
|
2382
2395
|
*/
|
|
2383
|
-
size?: ButtonSize
|
|
2396
|
+
size?: ResponsiveProp<ButtonSize>;
|
|
2384
2397
|
/**
|
|
2385
2398
|
* Sets the style variant of the button
|
|
2386
2399
|
* @default 'secondary'
|
|
@@ -2416,10 +2429,37 @@ interface ButtonOptions {
|
|
|
2416
2429
|
type?: 'button' | 'submit' | 'reset';
|
|
2417
2430
|
}
|
|
2418
2431
|
|
|
2419
|
-
|
|
2420
|
-
|
|
2432
|
+
type PolymorphicButton = ForwardRefComponent<'button', ButtonOptions>;
|
|
2433
|
+
type ButtonProps = PropsOf<PolymorphicButton>;
|
|
2421
2434
|
declare const Button: PolymorphicButton;
|
|
2422
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
|
+
|
|
2423
2463
|
interface CheckboxOptions {
|
|
2424
2464
|
/**
|
|
2425
2465
|
* The label for the checkbox. Accepts a string, or a React component for rendering links within the label.
|
|
@@ -2441,6 +2481,10 @@ interface CheckboxOptions {
|
|
|
2441
2481
|
* ```
|
|
2442
2482
|
*/
|
|
2443
2483
|
label: string | ReactElement<unknown>;
|
|
2484
|
+
/**
|
|
2485
|
+
* Text that provides additional guidance to the user
|
|
2486
|
+
*/
|
|
2487
|
+
helperText?: string;
|
|
2444
2488
|
/**
|
|
2445
2489
|
* The checked state of the checkbox when it is initially rendered. Use when you do not need to control its checked state.
|
|
2446
2490
|
*/
|
|
@@ -2466,6 +2510,10 @@ interface CheckboxOptions {
|
|
|
2466
2510
|
* @default false
|
|
2467
2511
|
*/
|
|
2468
2512
|
isInvalid?: boolean;
|
|
2513
|
+
/**
|
|
2514
|
+
* The error message to display if `isInvalid` is `true`
|
|
2515
|
+
*/
|
|
2516
|
+
errorMessage?: string;
|
|
2469
2517
|
/**
|
|
2470
2518
|
* If `true` it prevents the user from interacting with the checkbox.
|
|
2471
2519
|
* @default false
|
|
@@ -2485,7 +2533,7 @@ interface CheckboxOptions {
|
|
|
2485
2533
|
*/
|
|
2486
2534
|
value?: string;
|
|
2487
2535
|
}
|
|
2488
|
-
|
|
2536
|
+
type CheckboxProps = Omit<CheckboxPrimitive.CheckboxProps, 'asChild' | 'children' | 'checked' | 'defaultChecked' | keyof CheckboxOptions> & CheckboxOptions;
|
|
2489
2537
|
declare const Checkbox: react.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps, "children" | "asChild" | keyof CheckboxOptions> & CheckboxOptions & react.RefAttributes<HTMLButtonElement>>;
|
|
2490
2538
|
|
|
2491
2539
|
interface DividerOptions {
|
|
@@ -2500,7 +2548,7 @@ interface DividerProps extends HTMLQdsProps<'span'>, DividerOptions {
|
|
|
2500
2548
|
}
|
|
2501
2549
|
declare const Divider: react.ForwardRefExoticComponent<DividerProps & react.RefAttributes<HTMLDivElement>>;
|
|
2502
2550
|
|
|
2503
|
-
|
|
2551
|
+
type PrimitiveContentProps = DropdownPrimitive.MenuContentProps;
|
|
2504
2552
|
interface DropdownMenuContentOptions {
|
|
2505
2553
|
/**
|
|
2506
2554
|
* Event handler called when focus moves to the trigger after closing.
|
|
@@ -2563,7 +2611,7 @@ interface DropdownMenuContentOptions {
|
|
|
2563
2611
|
interface DropdownMenuContentProps extends HTMLQdsProps<'div'>, DropdownMenuContentOptions {
|
|
2564
2612
|
}
|
|
2565
2613
|
|
|
2566
|
-
|
|
2614
|
+
type DropdownMenuDividerProps = HTMLQdsProps<'div'>;
|
|
2567
2615
|
|
|
2568
2616
|
interface DropdownMenuItemOptions {
|
|
2569
2617
|
/**
|
|
@@ -2589,8 +2637,8 @@ interface DropdownMenuItemOptions {
|
|
|
2589
2637
|
interface DropdownMenuItemProps extends Omit<DropdownPrimitive.DropdownMenuItemProps, 'asChild' | keyof DropdownMenuItemOptions>, DropdownMenuItemOptions {
|
|
2590
2638
|
}
|
|
2591
2639
|
|
|
2592
|
-
|
|
2593
|
-
|
|
2640
|
+
type DropdownTriggerComponent = ForwardRefComponent<'button'>;
|
|
2641
|
+
type DropdownMenuTriggerProps = PropsOf<DropdownTriggerComponent>;
|
|
2594
2642
|
|
|
2595
2643
|
interface DropdownMenuRootProps {
|
|
2596
2644
|
children: ReactNode;
|
|
@@ -2608,16 +2656,16 @@ interface DropdownMenuRootProps {
|
|
|
2608
2656
|
*/
|
|
2609
2657
|
onOpenChange?: (isOpen: boolean) => void;
|
|
2610
2658
|
}
|
|
2611
|
-
declare function DropdownMenuRoot(props: DropdownMenuRootProps): JSX.Element;
|
|
2659
|
+
declare function DropdownMenuRoot(props: DropdownMenuRootProps): react_jsx_runtime.JSX.Element;
|
|
2612
2660
|
declare const DropdownMenu: typeof DropdownMenuRoot & {
|
|
2613
2661
|
Trigger: ForwardRefComponent<"button", {}>;
|
|
2614
2662
|
Content: react.ForwardRefExoticComponent<DropdownMenuContentProps & react.RefAttributes<HTMLDivElement>>;
|
|
2615
2663
|
Item: react.ForwardRefExoticComponent<DropdownMenuItemProps & react.RefAttributes<HTMLDivElement>>;
|
|
2616
|
-
Divider: react.ForwardRefExoticComponent<
|
|
2664
|
+
Divider: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
2617
2665
|
};
|
|
2618
2666
|
|
|
2619
|
-
|
|
2620
|
-
|
|
2667
|
+
type HeadingSize = keyof Theme['typography']['title'];
|
|
2668
|
+
type HeadingColor = keyof Theme['colors']['text'];
|
|
2621
2669
|
interface HeadingOptions {
|
|
2622
2670
|
/**
|
|
2623
2671
|
* Sets the visual size of the heading.
|
|
@@ -2625,7 +2673,7 @@ interface HeadingOptions {
|
|
|
2625
2673
|
*
|
|
2626
2674
|
* @default 'md'
|
|
2627
2675
|
*/
|
|
2628
|
-
size?: HeadingSize
|
|
2676
|
+
size?: ResponsiveProp<HeadingSize>;
|
|
2629
2677
|
/**
|
|
2630
2678
|
* Sets the color of the heading
|
|
2631
2679
|
* @default 'default'
|
|
@@ -2641,16 +2689,16 @@ interface HeadingOptions {
|
|
|
2641
2689
|
*/
|
|
2642
2690
|
textAlign?: 'left' | 'center' | 'right';
|
|
2643
2691
|
}
|
|
2644
|
-
|
|
2645
|
-
|
|
2692
|
+
type HeadingComponent = ForwardRefComponent<'h2', HeadingOptions>;
|
|
2693
|
+
type HeadingProps = PropsOf<HeadingComponent>;
|
|
2646
2694
|
declare const Heading: HeadingComponent;
|
|
2647
2695
|
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
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>> & {
|
|
2651
2699
|
Title: _emotion_styled.StyledComponent<{
|
|
2652
2700
|
theme?: _emotion_react.Theme | undefined;
|
|
2653
|
-
as?: react.ElementType<any> | undefined;
|
|
2701
|
+
as?: react.ElementType<any, keyof react.JSX.IntrinsicElements> | undefined;
|
|
2654
2702
|
}, react.DetailedHTMLProps<react.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {}>;
|
|
2655
2703
|
};
|
|
2656
2704
|
|
|
@@ -2854,6 +2902,7 @@ declare const getSizeStyles$3: (theme: {
|
|
|
2854
2902
|
md: string;
|
|
2855
2903
|
lg: string;
|
|
2856
2904
|
xl: string;
|
|
2905
|
+
'2xl': string;
|
|
2857
2906
|
full: string;
|
|
2858
2907
|
};
|
|
2859
2908
|
shadows: {
|
|
@@ -3266,6 +3315,7 @@ declare const getVariantStyles: (theme: {
|
|
|
3266
3315
|
md: string;
|
|
3267
3316
|
lg: string;
|
|
3268
3317
|
xl: string;
|
|
3318
|
+
'2xl': string;
|
|
3269
3319
|
full: string;
|
|
3270
3320
|
};
|
|
3271
3321
|
shadows: {
|
|
@@ -3523,8 +3573,8 @@ declare const getVariantStyles: (theme: {
|
|
|
3523
3573
|
};
|
|
3524
3574
|
};
|
|
3525
3575
|
|
|
3526
|
-
|
|
3527
|
-
|
|
3576
|
+
type IconButtonSize = VariantProps<typeof getSizeStyles$3>;
|
|
3577
|
+
type IconButtonVariant = VariantProps<typeof getVariantStyles>;
|
|
3528
3578
|
interface IconButtonOptions {
|
|
3529
3579
|
icon: ElementType<IconProps>;
|
|
3530
3580
|
/**
|
|
@@ -3535,7 +3585,7 @@ interface IconButtonOptions {
|
|
|
3535
3585
|
/**
|
|
3536
3586
|
* Defines the size of the button
|
|
3537
3587
|
*/
|
|
3538
|
-
size?: IconButtonSize
|
|
3588
|
+
size?: ResponsiveProp<IconButtonSize>;
|
|
3539
3589
|
/**
|
|
3540
3590
|
* Sets the style variant of the button
|
|
3541
3591
|
*/
|
|
@@ -3545,8 +3595,8 @@ interface IconButtonOptions {
|
|
|
3545
3595
|
*/
|
|
3546
3596
|
isDisabled?: boolean;
|
|
3547
3597
|
}
|
|
3548
|
-
|
|
3549
|
-
|
|
3598
|
+
type IconButtonComponent = ForwardRefComponent<'button', IconButtonOptions>;
|
|
3599
|
+
type IconButtonProps = PropsOf<IconButtonComponent>;
|
|
3550
3600
|
declare const IconButton: IconButtonComponent;
|
|
3551
3601
|
|
|
3552
3602
|
interface InputBaseOptions {
|
|
@@ -3563,7 +3613,7 @@ interface InputBaseOptions {
|
|
|
3563
3613
|
*/
|
|
3564
3614
|
isRequired?: boolean;
|
|
3565
3615
|
}
|
|
3566
|
-
|
|
3616
|
+
type OmittedProps$7 = 'children' | 'readOnly' | 'size' | 'disabled' | 'required';
|
|
3567
3617
|
interface InputBaseProps extends Omit<HTMLQdsProps<'input'>, OmittedProps$7>, InputBaseOptions {
|
|
3568
3618
|
}
|
|
3569
3619
|
declare const InputBase: react.ForwardRefExoticComponent<InputBaseProps & react.RefAttributes<HTMLInputElement>>;
|
|
@@ -3592,7 +3642,7 @@ interface TextFieldOptions extends InputBaseOptions {
|
|
|
3592
3642
|
*/
|
|
3593
3643
|
suffix?: string;
|
|
3594
3644
|
}
|
|
3595
|
-
|
|
3645
|
+
type OmittedProps$6 = 'children' | 'readOnly' | 'size';
|
|
3596
3646
|
interface TextFieldProps extends Omit<HTMLQdsProps<'input'>, OmittedProps$6>, TextFieldOptions {
|
|
3597
3647
|
}
|
|
3598
3648
|
declare const TextField: react.ForwardRefExoticComponent<TextFieldProps & react.RefAttributes<HTMLInputElement>>;
|
|
@@ -3691,9 +3741,6 @@ declare const getSizeStyles$2: (theme: {
|
|
|
3691
3741
|
blue60: string;
|
|
3692
3742
|
blue50: string;
|
|
3693
3743
|
blue40: string;
|
|
3694
|
-
/**
|
|
3695
|
-
* Size of the label
|
|
3696
|
-
*/
|
|
3697
3744
|
blue30: string;
|
|
3698
3745
|
blue20: string;
|
|
3699
3746
|
blue10: string;
|
|
@@ -3800,6 +3847,7 @@ declare const getSizeStyles$2: (theme: {
|
|
|
3800
3847
|
md: string;
|
|
3801
3848
|
lg: string;
|
|
3802
3849
|
xl: string;
|
|
3850
|
+
'2xl': string;
|
|
3803
3851
|
full: string;
|
|
3804
3852
|
};
|
|
3805
3853
|
shadows: {
|
|
@@ -3838,7 +3886,10 @@ declare const getSizeStyles$2: (theme: {
|
|
|
3838
3886
|
lg: {
|
|
3839
3887
|
fontFamily: string;
|
|
3840
3888
|
fontWeight: string;
|
|
3841
|
-
fontSize: string;
|
|
3889
|
+
fontSize: string; /**
|
|
3890
|
+
* Sets the color of the label
|
|
3891
|
+
* @default 'default'
|
|
3892
|
+
*/
|
|
3842
3893
|
lineHeight: string;
|
|
3843
3894
|
letterSpacing: string;
|
|
3844
3895
|
fontFeatureSettings: string;
|
|
@@ -4014,21 +4065,21 @@ declare const getSizeStyles$2: (theme: {
|
|
|
4014
4065
|
letterSpacing: string;
|
|
4015
4066
|
};
|
|
4016
4067
|
};
|
|
4017
|
-
|
|
4018
|
-
|
|
4068
|
+
type LabelSize = VariantProps<typeof getSizeStyles$2>;
|
|
4069
|
+
type LabelColor = keyof Theme['colors']['text'];
|
|
4019
4070
|
interface LabelOptions {
|
|
4020
4071
|
/**
|
|
4021
4072
|
* Size of the label
|
|
4022
4073
|
*/
|
|
4023
|
-
size?: LabelSize
|
|
4074
|
+
size?: ResponsiveProp<LabelSize>;
|
|
4024
4075
|
/**
|
|
4025
4076
|
* Sets the color of the label
|
|
4026
4077
|
* @default 'default'
|
|
4027
4078
|
*/
|
|
4028
4079
|
color?: LabelColor;
|
|
4029
4080
|
}
|
|
4030
|
-
|
|
4031
|
-
|
|
4081
|
+
type LabelComponent = ForwardRefComponent<'label', LabelOptions>;
|
|
4082
|
+
type LabelProps = PropsOf<LabelComponent>;
|
|
4032
4083
|
declare const Label: LabelComponent;
|
|
4033
4084
|
|
|
4034
4085
|
interface LinkOptions {
|
|
@@ -4041,8 +4092,8 @@ interface LinkOptions {
|
|
|
4041
4092
|
*/
|
|
4042
4093
|
isExternal?: boolean;
|
|
4043
4094
|
}
|
|
4044
|
-
|
|
4045
|
-
|
|
4095
|
+
type LinkComponent = ForwardRefComponent<'a', LinkOptions>;
|
|
4096
|
+
type LinkProps = PropsOf<LinkComponent>;
|
|
4046
4097
|
declare const Link: LinkComponent;
|
|
4047
4098
|
|
|
4048
4099
|
declare const getSizeStyles$1: (theme: {
|
|
@@ -4245,6 +4296,7 @@ declare const getSizeStyles$1: (theme: {
|
|
|
4245
4296
|
md: string;
|
|
4246
4297
|
lg: string;
|
|
4247
4298
|
xl: string;
|
|
4299
|
+
'2xl': string;
|
|
4248
4300
|
full: string;
|
|
4249
4301
|
};
|
|
4250
4302
|
shadows: {
|
|
@@ -4451,9 +4503,9 @@ declare const getSizeStyles$1: (theme: {
|
|
|
4451
4503
|
fontSize: string;
|
|
4452
4504
|
};
|
|
4453
4505
|
};
|
|
4454
|
-
|
|
4506
|
+
type LoadingDotsSize = VariantProps<typeof getSizeStyles$1>;
|
|
4455
4507
|
interface LoadingDotsOptions {
|
|
4456
|
-
size?: LoadingDotsSize
|
|
4508
|
+
size?: ResponsiveProp<LoadingDotsSize>;
|
|
4457
4509
|
}
|
|
4458
4510
|
interface LoadingDotsProps extends HTMLQdsProps<'span'>, LoadingDotsOptions {
|
|
4459
4511
|
}
|
|
@@ -4659,6 +4711,7 @@ declare const getSizeStyles: (theme: {
|
|
|
4659
4711
|
md: string;
|
|
4660
4712
|
lg: string;
|
|
4661
4713
|
xl: string;
|
|
4714
|
+
'2xl': string;
|
|
4662
4715
|
full: string;
|
|
4663
4716
|
};
|
|
4664
4717
|
shadows: {
|
|
@@ -4705,7 +4758,10 @@ declare const getSizeStyles: (theme: {
|
|
|
4705
4758
|
md: {
|
|
4706
4759
|
fontFamily: string;
|
|
4707
4760
|
fontWeight: string;
|
|
4708
|
-
fontSize: string;
|
|
4761
|
+
fontSize: string; /**
|
|
4762
|
+
* Sets the visual size of the text
|
|
4763
|
+
* @default 'md'
|
|
4764
|
+
*/
|
|
4709
4765
|
lineHeight: string;
|
|
4710
4766
|
letterSpacing: string;
|
|
4711
4767
|
fontFeatureSettings: string;
|
|
@@ -4894,14 +4950,14 @@ declare const getSizeStyles: (theme: {
|
|
|
4894
4950
|
letterSpacing: string;
|
|
4895
4951
|
};
|
|
4896
4952
|
};
|
|
4897
|
-
|
|
4898
|
-
|
|
4953
|
+
type ParagraphSize = VariantProps<typeof getSizeStyles>;
|
|
4954
|
+
type ParagraphColor = keyof Theme['colors']['text'];
|
|
4899
4955
|
interface ParagraphOptions {
|
|
4900
4956
|
/**
|
|
4901
4957
|
* Sets the visual size of the text
|
|
4902
4958
|
* @default 'md'
|
|
4903
4959
|
*/
|
|
4904
|
-
size?: ParagraphSize
|
|
4960
|
+
size?: ResponsiveProp<ParagraphSize>;
|
|
4905
4961
|
/**
|
|
4906
4962
|
* Sets the color of the text
|
|
4907
4963
|
* @default 'normal'
|
|
@@ -4917,8 +4973,8 @@ interface ParagraphOptions {
|
|
|
4917
4973
|
*/
|
|
4918
4974
|
textAlign?: 'left' | 'center' | 'right';
|
|
4919
4975
|
}
|
|
4920
|
-
|
|
4921
|
-
|
|
4976
|
+
type ParagraphComponent = ForwardRefComponent<'p', ParagraphOptions>;
|
|
4977
|
+
type ParagraphProps = PropsOf<ParagraphComponent>;
|
|
4922
4978
|
declare const Paragraph: ParagraphComponent;
|
|
4923
4979
|
|
|
4924
4980
|
interface SelectBaseOptions {
|
|
@@ -4944,13 +5000,13 @@ interface SelectBaseOptions {
|
|
|
4944
5000
|
*/
|
|
4945
5001
|
isRequired?: boolean;
|
|
4946
5002
|
}
|
|
4947
|
-
|
|
5003
|
+
type OmittedProps$5 = 'readOnly' | 'size' | 'multiple' | 'disabled' | 'required';
|
|
4948
5004
|
interface SelectBaseProps extends Omit<HTMLQdsProps<'select'>, OmittedProps$5>, SelectBaseOptions {
|
|
4949
5005
|
}
|
|
4950
5006
|
declare const SelectBase: react.ForwardRefExoticComponent<SelectBaseProps & react.RefAttributes<HTMLSelectElement>>;
|
|
4951
5007
|
|
|
4952
|
-
|
|
4953
|
-
|
|
5008
|
+
type ResizeProp = 'none' | 'both' | 'horizontal' | 'vertical';
|
|
5009
|
+
type MinRowsProp = number;
|
|
4954
5010
|
interface TextareaBaseOptions {
|
|
4955
5011
|
/**
|
|
4956
5012
|
* If `true`, the textarea will be invalid
|
|
@@ -4978,7 +5034,7 @@ interface TextareaBaseOptions {
|
|
|
4978
5034
|
*/
|
|
4979
5035
|
minRows?: MinRowsProp;
|
|
4980
5036
|
}
|
|
4981
|
-
|
|
5037
|
+
type OmittedProps$4 = 'children' | 'readOnly' | 'size' | 'disabled' | 'required' | 'rows' | 'cols';
|
|
4982
5038
|
interface TextareaBaseProps extends Omit<HTMLQdsProps<'textarea'>, OmittedProps$4>, TextareaBaseOptions {
|
|
4983
5039
|
}
|
|
4984
5040
|
declare const TextareaBase: react.ForwardRefExoticComponent<TextareaBaseProps & react.RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -5006,7 +5062,7 @@ interface RadioCardOptions {
|
|
|
5006
5062
|
interface RadioCardProps extends Omit<RadioGroupPrimitive.RadioGroupItemProps, 'asChild' | keyof RadioCardOptions>, RadioCardOptions {
|
|
5007
5063
|
}
|
|
5008
5064
|
|
|
5009
|
-
|
|
5065
|
+
type RadioGroupLabelProps = HTMLQdsProps<'span'>;
|
|
5010
5066
|
|
|
5011
5067
|
interface RadioGroupOptions {
|
|
5012
5068
|
/**
|
|
@@ -5051,13 +5107,13 @@ interface RadioGroupProps extends Omit<RadioGroupPrimitive.RadioGroupProps, 'asC
|
|
|
5051
5107
|
}
|
|
5052
5108
|
declare const RadioGroup: react.ForwardRefExoticComponent<RadioGroupProps & react.RefAttributes<HTMLDivElement>> & {
|
|
5053
5109
|
Card: react.ForwardRefExoticComponent<RadioCardProps & react.RefAttributes<HTMLButtonElement>>;
|
|
5054
|
-
Label: react.ForwardRefExoticComponent<
|
|
5110
|
+
Label: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & react.RefAttributes<HTMLSpanElement>>;
|
|
5055
5111
|
};
|
|
5056
5112
|
|
|
5057
5113
|
interface SelectOptionOptions {
|
|
5058
5114
|
isDisabled?: boolean;
|
|
5059
5115
|
}
|
|
5060
|
-
|
|
5116
|
+
type OmittedProps$3 = 'disabled' | 'label';
|
|
5061
5117
|
interface SelectOptionProps extends Omit<HTMLQdsProps<'option'>, OmittedProps$3>, SelectOptionOptions {
|
|
5062
5118
|
}
|
|
5063
5119
|
|
|
@@ -5075,7 +5131,7 @@ interface SelectOptions extends SelectBaseOptions {
|
|
|
5075
5131
|
*/
|
|
5076
5132
|
helperText?: string;
|
|
5077
5133
|
}
|
|
5078
|
-
|
|
5134
|
+
type OmittedProps$2 = 'readOnly' | 'size';
|
|
5079
5135
|
interface SelectProps extends Omit<HTMLQdsProps<'select'>, OmittedProps$2>, SelectOptions {
|
|
5080
5136
|
}
|
|
5081
5137
|
declare const Select: react.ForwardRefExoticComponent<SelectProps & react.RefAttributes<HTMLSelectElement>> & {
|
|
@@ -5084,24 +5140,24 @@ declare const Select: react.ForwardRefExoticComponent<SelectProps & react.RefAtt
|
|
|
5084
5140
|
|
|
5085
5141
|
interface SpacerOptions {
|
|
5086
5142
|
axis?: 'x' | 'y';
|
|
5087
|
-
size: keyof Theme['spacing']
|
|
5143
|
+
size: ResponsiveProp<keyof Theme['spacing']>;
|
|
5088
5144
|
}
|
|
5089
5145
|
interface SpacerProps extends HTMLQdsProps<'span'>, SpacerOptions {
|
|
5090
5146
|
}
|
|
5091
5147
|
declare const Spacer: react.ForwardRefExoticComponent<SpacerProps & react.RefAttributes<HTMLSpanElement>>;
|
|
5092
5148
|
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
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';
|
|
5097
5153
|
|
|
5098
|
-
|
|
5154
|
+
type GapProp = keyof Theme['spacing'];
|
|
5099
5155
|
interface StackOptions {
|
|
5100
5156
|
/**
|
|
5101
5157
|
* The direction of the stack.
|
|
5102
5158
|
* @default 'column'
|
|
5103
5159
|
*/
|
|
5104
|
-
direction?: FlexDirection
|
|
5160
|
+
direction?: ResponsiveProp<FlexDirection>;
|
|
5105
5161
|
/**
|
|
5106
5162
|
* The CSS `justify-content` property.
|
|
5107
5163
|
* Controls the alignment of items on the main axis.
|
|
@@ -5121,7 +5177,7 @@ interface StackOptions {
|
|
|
5121
5177
|
/**
|
|
5122
5178
|
* The gap between each child element.
|
|
5123
5179
|
*/
|
|
5124
|
-
gap?: GapProp
|
|
5180
|
+
gap?: ResponsiveProp<GapProp>;
|
|
5125
5181
|
/**
|
|
5126
5182
|
* A divider element to be rendered between each child element.
|
|
5127
5183
|
*
|
|
@@ -5130,10 +5186,43 @@ interface StackOptions {
|
|
|
5130
5186
|
*/
|
|
5131
5187
|
divider?: ReactNode;
|
|
5132
5188
|
}
|
|
5133
|
-
|
|
5134
|
-
|
|
5189
|
+
type StackComponent = ForwardRefComponent<'div', StackOptions>;
|
|
5190
|
+
type StackProps = PropsOf<StackComponent>;
|
|
5135
5191
|
declare const Stack: StackComponent;
|
|
5136
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
|
+
|
|
5137
5226
|
interface TextareaOptions extends TextareaBaseOptions {
|
|
5138
5227
|
/**
|
|
5139
5228
|
* The label for the textarea field
|
|
@@ -5148,12 +5237,12 @@ interface TextareaOptions extends TextareaBaseOptions {
|
|
|
5148
5237
|
*/
|
|
5149
5238
|
helperText?: string;
|
|
5150
5239
|
}
|
|
5151
|
-
|
|
5240
|
+
type OmittedProps$1 = 'children' | 'readOnly' | 'size';
|
|
5152
5241
|
interface TextareaProps extends Omit<HTMLQdsProps<'textarea'>, OmittedProps$1>, TextareaOptions {
|
|
5153
5242
|
}
|
|
5154
5243
|
declare const Textarea: react.ForwardRefExoticComponent<TextareaProps & react.RefAttributes<HTMLTextAreaElement>>;
|
|
5155
5244
|
|
|
5156
|
-
|
|
5245
|
+
type Id = number | string;
|
|
5157
5246
|
interface ToastOptions {
|
|
5158
5247
|
/**
|
|
5159
5248
|
* Unique identifier for the toast (can be used for removing it prematurely). If a toast with this
|
|
@@ -5184,11 +5273,11 @@ declare function useBreakpoint(params?: UseBreakpointOptions): {
|
|
|
5184
5273
|
currentBreakpoint: "2xl" | "base" | "xl" | "lg" | "md" | "sm";
|
|
5185
5274
|
};
|
|
5186
5275
|
|
|
5187
|
-
|
|
5188
|
-
|
|
5276
|
+
type Breakpoints = Theme['breakpoints'];
|
|
5277
|
+
type BreakpointsConfig<T> = PartialRecord<keyof Breakpoints, T> & {
|
|
5189
5278
|
base: T;
|
|
5190
5279
|
};
|
|
5191
|
-
|
|
5280
|
+
type UseBreakpointValueProps<T> = BreakpointsConfig<T>;
|
|
5192
5281
|
/**
|
|
5193
5282
|
* Hook for getting a value based on the current breakpoint.
|
|
5194
5283
|
*
|
|
@@ -5197,7 +5286,7 @@ declare type UseBreakpointValueProps<T> = BreakpointsConfig<T>;
|
|
|
5197
5286
|
*/
|
|
5198
5287
|
declare function useBreakpointValue<T>(values: UseBreakpointValueProps<T>, options?: UseBreakpointOptions): T;
|
|
5199
5288
|
|
|
5200
|
-
|
|
5289
|
+
type LoadingStatus = 'loading' | 'loaded' | 'error' | 'pending';
|
|
5201
5290
|
interface UseImageProps {
|
|
5202
5291
|
src?: string;
|
|
5203
5292
|
loading?: HTMLQdsProps<'img'>['loading'];
|
|
@@ -5206,8 +5295,8 @@ declare const useImage: ({ src, loading }: UseImageProps) => {
|
|
|
5206
5295
|
loadingStatus: LoadingStatus;
|
|
5207
5296
|
};
|
|
5208
5297
|
|
|
5209
|
-
|
|
5210
|
-
|
|
5298
|
+
type FormFieldElement = 'input' | 'select' | 'textarea';
|
|
5299
|
+
type PropGetter<T extends ElementType = LegitimateAny> = (props?: HTMLQdsProps<T>) => Record<string, unknown>;
|
|
5211
5300
|
interface FormFieldOptions {
|
|
5212
5301
|
/**
|
|
5213
5302
|
* The label for the form field
|
|
@@ -5234,8 +5323,8 @@ interface FormFieldOptions {
|
|
|
5234
5323
|
*/
|
|
5235
5324
|
isRequired?: boolean;
|
|
5236
5325
|
}
|
|
5237
|
-
|
|
5238
|
-
|
|
5326
|
+
type OmittedProps = 'children' | 'readOnly' | 'size';
|
|
5327
|
+
type UseFormFieldProps<T extends FormFieldElement> = Omit<HTMLQdsProps<T>, OmittedProps> & FormFieldOptions;
|
|
5239
5328
|
/**
|
|
5240
5329
|
* Custom hook that returns props for a form field's label, input, helper text and error message.
|
|
5241
5330
|
* Meant to be used in conjunction with the `Input`, `Select` or `Textarea` component.
|
|
@@ -5267,4 +5356,4 @@ declare function useStableId(fixedId?: string | null): string;
|
|
|
5267
5356
|
*/
|
|
5268
5357
|
declare const useSafeLayoutEffect: typeof useLayoutEffect;
|
|
5269
5358
|
|
|
5270
|
-
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, 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 };
|