@qasa/qds-ui 0.10.0-next.14 → 0.10.0-next.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/_internal/form-parts.d.ts +3 -3
- package/dist/cjs/types/components/avatar/avatar.d.ts +1 -1
- package/dist/cjs/types/components/button/button-icon.d.ts +1 -1
- package/dist/cjs/types/components/button/button-styles.d.ts +4 -2
- package/dist/cjs/types/components/button/button.d.ts +2 -2
- package/dist/cjs/types/components/checkbox/checkbox.d.ts +1 -1
- package/dist/cjs/types/components/display-text/display-text.d.ts +5 -5
- package/dist/cjs/types/components/dropdown-menu/dropdown-menu-content.d.ts +1 -1
- package/dist/cjs/types/components/dropdown-menu/dropdown-menu-divider.d.ts +2 -2
- package/dist/cjs/types/components/dropdown-menu/dropdown-menu-trigger.d.ts +2 -2
- package/dist/cjs/types/components/dropdown-menu/dropdown-menu.d.ts +3 -3
- package/dist/cjs/types/components/heading/heading.d.ts +4 -4
- package/dist/cjs/types/components/hint-box/hint-box.d.ts +4 -4
- package/dist/cjs/types/components/icon/icon.types.d.ts +3 -3
- package/dist/cjs/types/components/icon-button/icon-button-styles.d.ts +2 -0
- package/dist/cjs/types/components/icon-button/icon-button.d.ts +4 -4
- package/dist/cjs/types/components/label/label.d.ts +5 -4
- package/dist/cjs/types/components/link/link.d.ts +2 -2
- package/dist/cjs/types/components/loading-dots/loading-dots.d.ts +2 -1
- package/dist/cjs/types/components/paragraph/paragraph.d.ts +5 -4
- package/dist/cjs/types/components/primitives/input-base/input-base.d.ts +1 -1
- package/dist/cjs/types/components/primitives/select-base/select-base.d.ts +1 -1
- package/dist/cjs/types/components/primitives/textarea-base/textarea-base.d.ts +3 -3
- package/dist/cjs/types/components/radio-group/radio-group-context.d.ts +1 -1
- package/dist/cjs/types/components/radio-group/radio-group-label.d.ts +2 -2
- package/dist/cjs/types/components/radio-group/radio-group.d.ts +1 -1
- package/dist/cjs/types/components/radio-group/radio-indicator.d.ts +1 -1
- package/dist/cjs/types/components/select/select-option.d.ts +1 -1
- package/dist/cjs/types/components/select/select.d.ts +1 -1
- package/dist/cjs/types/components/spacer/spacer.d.ts +2 -1
- package/dist/cjs/types/components/stack/stack.d.ts +3 -3
- package/dist/cjs/types/components/stack/stack.types.d.ts +4 -4
- package/dist/cjs/types/components/text-field/text-field.d.ts +1 -1
- package/dist/cjs/types/components/textarea/textarea.d.ts +1 -1
- package/dist/cjs/types/components/toast/toast-provider.d.ts +1 -1
- package/dist/cjs/types/components/toast/toast-store.d.ts +2 -2
- package/dist/cjs/types/components/toast/toast-styles.d.ts +2 -1
- package/dist/cjs/types/components/toast/toast.d.ts +2 -3
- package/dist/cjs/types/hooks/use-breakpoint-value.d.ts +3 -3
- package/dist/cjs/types/hooks/use-form-field.d.ts +4 -4
- package/dist/cjs/types/hooks/use-image.d.ts +1 -1
- package/dist/cjs/types/hooks/use-responsive-prop.d.ts +3 -3
- package/dist/cjs/types/i18n/locale-context.d.ts +1 -1
- package/dist/cjs/types/i18n/locales.d.ts +1 -1
- package/dist/cjs/types/i18n/use-translation.d.ts +1 -1
- package/dist/cjs/types/qds-provider.d.ts +1 -1
- package/dist/cjs/types/styles/common-styles.d.ts +1 -0
- package/dist/cjs/types/styles/css-reset.d.ts +1 -2
- package/dist/cjs/types/styles/css-utils.d.ts +3 -3
- package/dist/cjs/types/styles/global-styles.d.ts +1 -2
- package/dist/cjs/types/theme/foundations/index.d.ts +1 -0
- package/dist/cjs/types/theme/foundations/radius.d.ts +2 -0
- package/dist/cjs/types/theme/theme-tools.d.ts +3 -2
- package/dist/cjs/types/theme/theme.d.ts +2 -1
- package/dist/cjs/types/types.d.ts +4 -4
- package/dist/cjs/types/utils/html-attributes.d.ts +1 -1
- package/dist/cjs/types/utils/merge-refs.d.ts +2 -2
- package/dist/cjs/types/utils/polymorphic.d.ts +4 -4
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/_internal/form-parts.d.ts +3 -3
- package/dist/esm/types/components/avatar/avatar.d.ts +1 -1
- package/dist/esm/types/components/button/button-icon.d.ts +1 -1
- package/dist/esm/types/components/button/button-styles.d.ts +4 -2
- package/dist/esm/types/components/button/button.d.ts +2 -2
- package/dist/esm/types/components/checkbox/checkbox.d.ts +1 -1
- package/dist/esm/types/components/display-text/display-text.d.ts +5 -5
- package/dist/esm/types/components/dropdown-menu/dropdown-menu-content.d.ts +1 -1
- package/dist/esm/types/components/dropdown-menu/dropdown-menu-divider.d.ts +2 -2
- package/dist/esm/types/components/dropdown-menu/dropdown-menu-trigger.d.ts +2 -2
- package/dist/esm/types/components/dropdown-menu/dropdown-menu.d.ts +3 -3
- package/dist/esm/types/components/heading/heading.d.ts +4 -4
- package/dist/esm/types/components/hint-box/hint-box.d.ts +4 -4
- package/dist/esm/types/components/icon/icon.types.d.ts +3 -3
- package/dist/esm/types/components/icon-button/icon-button-styles.d.ts +2 -0
- package/dist/esm/types/components/icon-button/icon-button.d.ts +4 -4
- package/dist/esm/types/components/label/label.d.ts +5 -4
- package/dist/esm/types/components/link/link.d.ts +2 -2
- package/dist/esm/types/components/loading-dots/loading-dots.d.ts +2 -1
- package/dist/esm/types/components/paragraph/paragraph.d.ts +5 -4
- package/dist/esm/types/components/primitives/input-base/input-base.d.ts +1 -1
- package/dist/esm/types/components/primitives/select-base/select-base.d.ts +1 -1
- package/dist/esm/types/components/primitives/textarea-base/textarea-base.d.ts +3 -3
- package/dist/esm/types/components/radio-group/radio-group-context.d.ts +1 -1
- package/dist/esm/types/components/radio-group/radio-group-label.d.ts +2 -2
- package/dist/esm/types/components/radio-group/radio-group.d.ts +1 -1
- package/dist/esm/types/components/radio-group/radio-indicator.d.ts +1 -1
- package/dist/esm/types/components/select/select-option.d.ts +1 -1
- package/dist/esm/types/components/select/select.d.ts +1 -1
- package/dist/esm/types/components/spacer/spacer.d.ts +2 -1
- package/dist/esm/types/components/stack/stack.d.ts +3 -3
- package/dist/esm/types/components/stack/stack.types.d.ts +4 -4
- package/dist/esm/types/components/text-field/text-field.d.ts +1 -1
- package/dist/esm/types/components/textarea/textarea.d.ts +1 -1
- package/dist/esm/types/components/toast/toast-provider.d.ts +1 -1
- package/dist/esm/types/components/toast/toast-store.d.ts +2 -2
- package/dist/esm/types/components/toast/toast-styles.d.ts +2 -1
- package/dist/esm/types/components/toast/toast.d.ts +2 -3
- package/dist/esm/types/hooks/use-breakpoint-value.d.ts +3 -3
- package/dist/esm/types/hooks/use-form-field.d.ts +4 -4
- package/dist/esm/types/hooks/use-image.d.ts +1 -1
- package/dist/esm/types/hooks/use-responsive-prop.d.ts +3 -3
- package/dist/esm/types/i18n/locale-context.d.ts +1 -1
- package/dist/esm/types/i18n/locales.d.ts +1 -1
- package/dist/esm/types/i18n/use-translation.d.ts +1 -1
- package/dist/esm/types/qds-provider.d.ts +1 -1
- package/dist/esm/types/styles/common-styles.d.ts +1 -0
- package/dist/esm/types/styles/css-reset.d.ts +1 -2
- package/dist/esm/types/styles/css-utils.d.ts +3 -3
- package/dist/esm/types/styles/global-styles.d.ts +1 -2
- package/dist/esm/types/theme/foundations/index.d.ts +1 -0
- package/dist/esm/types/theme/foundations/radius.d.ts +2 -0
- package/dist/esm/types/theme/theme-tools.d.ts +3 -2
- package/dist/esm/types/theme/theme.d.ts +2 -1
- package/dist/esm/types/types.d.ts +4 -4
- package/dist/esm/types/utils/html-attributes.d.ts +1 -1
- package/dist/esm/types/utils/merge-refs.d.ts +2 -2
- package/dist/esm/types/utils/polymorphic.d.ts +4 -4
- package/dist/index.d.ts +102 -91
- package/package.json +19 -22
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';
|
|
@@ -211,6 +212,7 @@ declare const theme: {
|
|
|
211
212
|
md: string;
|
|
212
213
|
lg: string;
|
|
213
214
|
xl: string;
|
|
215
|
+
'2xl': string;
|
|
214
216
|
full: string;
|
|
215
217
|
};
|
|
216
218
|
shadows: {
|
|
@@ -410,21 +412,21 @@ declare const theme: {
|
|
|
410
412
|
};
|
|
411
413
|
};
|
|
412
414
|
};
|
|
413
|
-
|
|
415
|
+
type Theme = typeof theme;
|
|
414
416
|
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
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>;
|
|
419
421
|
|
|
420
|
-
|
|
422
|
+
type DeepPartial<T> = {
|
|
421
423
|
[P in keyof T]?: DeepPartial<T[P]>;
|
|
422
424
|
};
|
|
423
425
|
interface TypographyOverride {
|
|
424
426
|
fontFamily?: string;
|
|
425
427
|
fontWeight?: '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
|
|
426
428
|
}
|
|
427
|
-
|
|
429
|
+
type TypographyOverrides = PartialRecord<keyof Theme['typography'], TypographyOverride>;
|
|
428
430
|
interface ThemeOverrides {
|
|
429
431
|
colors?: DeepPartial<Theme['colors']>;
|
|
430
432
|
typography?: TypographyOverrides;
|
|
@@ -818,6 +820,7 @@ declare const overrideTheme: (overrides: ThemeOverrides) => {
|
|
|
818
820
|
md: string;
|
|
819
821
|
lg: string;
|
|
820
822
|
xl: string;
|
|
823
|
+
'2xl': string;
|
|
821
824
|
full: string;
|
|
822
825
|
};
|
|
823
826
|
shadows: {
|
|
@@ -830,7 +833,7 @@ declare const overrideTheme: (overrides: ThemeOverrides) => {
|
|
|
830
833
|
};
|
|
831
834
|
|
|
832
835
|
declare const SUPPORTED_LANGUAGE_CODES: readonly ["en", "sv", "fi", "fr"];
|
|
833
|
-
|
|
836
|
+
type LanguageCode = (typeof SUPPORTED_LANGUAGE_CODES)[number];
|
|
834
837
|
|
|
835
838
|
interface QdsProviderProps {
|
|
836
839
|
children: ReactNode;
|
|
@@ -838,13 +841,13 @@ interface QdsProviderProps {
|
|
|
838
841
|
cacheOptions?: Partial<Options>;
|
|
839
842
|
locale: LanguageCode;
|
|
840
843
|
}
|
|
841
|
-
declare function QdsProvider({ children, themeOverrides, cacheOptions, locale }: QdsProviderProps): JSX.Element;
|
|
844
|
+
declare function QdsProvider({ children, themeOverrides, cacheOptions, locale }: QdsProviderProps): react_jsx_runtime.JSX.Element;
|
|
842
845
|
|
|
843
|
-
|
|
844
|
-
|
|
846
|
+
type Breakpoints$1 = Theme['breakpoints'];
|
|
847
|
+
type BreakpointsConfig$1<T> = PartialRecord<keyof Breakpoints$1, T> & {
|
|
845
848
|
base: T;
|
|
846
849
|
};
|
|
847
|
-
|
|
850
|
+
type ResponsiveProp<T> = T | BreakpointsConfig$1<T>;
|
|
848
851
|
|
|
849
852
|
declare const SIZE_MAP: {
|
|
850
853
|
xs: number;
|
|
@@ -854,7 +857,7 @@ declare const SIZE_MAP: {
|
|
|
854
857
|
xl: number;
|
|
855
858
|
'2xl': number;
|
|
856
859
|
};
|
|
857
|
-
|
|
860
|
+
type AvatarSize = keyof typeof SIZE_MAP;
|
|
858
861
|
interface AvatarOptions {
|
|
859
862
|
/**
|
|
860
863
|
* Source url of the image to display. If not passed
|
|
@@ -885,12 +888,12 @@ declare const Avatar: react.ForwardRefExoticComponent<AvatarProps & react.RefAtt
|
|
|
885
888
|
/**
|
|
886
889
|
* Infers the OwnProps if E is a ForwardRefExoticComponentWithAs
|
|
887
890
|
*/
|
|
888
|
-
|
|
891
|
+
type OwnProps<E> = E extends ForwardRefComponent<any, infer P> ? P : {};
|
|
889
892
|
/**
|
|
890
893
|
* Infers the JSX.IntrinsicElement if E is a ForwardRefExoticComponentWithAs
|
|
891
894
|
*/
|
|
892
|
-
|
|
893
|
-
|
|
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 & {
|
|
894
897
|
as?: E;
|
|
895
898
|
}>>;
|
|
896
899
|
interface ForwardRefComponent<IntrinsicElementString, OwnProps = {}> extends ForwardRefExoticComponent<IntrinsicElementString, OwnProps> {
|
|
@@ -913,10 +916,10 @@ interface ForwardRefComponent<IntrinsicElementString, OwnProps = {}> extends For
|
|
|
913
916
|
/**
|
|
914
917
|
* Infers the props of a React component
|
|
915
918
|
*/
|
|
916
|
-
|
|
919
|
+
type PropsOf<E> = E extends react.ComponentType<infer P> ? P : never;
|
|
917
920
|
|
|
918
|
-
|
|
919
|
-
|
|
921
|
+
type IconSize = 16 | 20 | 24 | 32;
|
|
922
|
+
type IconColor = keyof Theme['colors']['icon'] | 'currentColor';
|
|
920
923
|
interface IconOptions {
|
|
921
924
|
/**
|
|
922
925
|
* The size of the icon.
|
|
@@ -931,7 +934,7 @@ interface IconOptions {
|
|
|
931
934
|
*/
|
|
932
935
|
color?: IconColor;
|
|
933
936
|
}
|
|
934
|
-
|
|
937
|
+
type OmittedProps$8 = 'color' | 'onClick' | 'width' | 'height' | 'fontSize';
|
|
935
938
|
interface IconProps extends Omit<SVGAttributes<SVGElement>, OmittedProps$8>, IconOptions {
|
|
936
939
|
}
|
|
937
940
|
|
|
@@ -1023,10 +1026,10 @@ declare const XIcon: react.ForwardRefExoticComponent<IconProps & react.RefAttrib
|
|
|
1023
1026
|
/**
|
|
1024
1027
|
* Adds some global opinionated styles.
|
|
1025
1028
|
*/
|
|
1026
|
-
declare function GlobalStyles(): JSX.Element;
|
|
1029
|
+
declare function GlobalStyles(): react_jsx_runtime.JSX.Element;
|
|
1027
1030
|
|
|
1028
|
-
|
|
1029
|
-
|
|
1031
|
+
type NamedStyles = Record<string, CSSObject>;
|
|
1032
|
+
type StyleInterpolation<T> = (theme: Theme) => T;
|
|
1030
1033
|
/**
|
|
1031
1034
|
* Creates a collection of named style rules.
|
|
1032
1035
|
*/
|
|
@@ -1035,7 +1038,7 @@ declare function createStyleVariants<T extends NamedStyles>(styles: StyleInterpo
|
|
|
1035
1038
|
* Create a style object. Useful for creating styles that depend on the theme.
|
|
1036
1039
|
*/
|
|
1037
1040
|
declare function createStyle<T extends CSSObject>(styles: StyleInterpolation<T>): (theme: Theme) => T;
|
|
1038
|
-
|
|
1041
|
+
type VariantProps<T extends ReturnType<typeof createStyle | typeof createStyleVariants>> = keyof ReturnType<T>;
|
|
1039
1042
|
/**
|
|
1040
1043
|
* Converts css `px` unit to `rem`.
|
|
1041
1044
|
* Assumes the root font size is 16px.
|
|
@@ -1242,6 +1245,7 @@ declare const getFormFieldBaseStyles: (theme: {
|
|
|
1242
1245
|
md: string;
|
|
1243
1246
|
lg: string;
|
|
1244
1247
|
xl: string;
|
|
1248
|
+
'2xl': string;
|
|
1245
1249
|
full: string;
|
|
1246
1250
|
};
|
|
1247
1251
|
shadows: {
|
|
@@ -1687,6 +1691,7 @@ declare const getSizeStyles$4: (theme: {
|
|
|
1687
1691
|
md: string;
|
|
1688
1692
|
lg: string;
|
|
1689
1693
|
xl: string;
|
|
1694
|
+
'2xl': string;
|
|
1690
1695
|
full: string;
|
|
1691
1696
|
};
|
|
1692
1697
|
shadows: {
|
|
@@ -1937,7 +1942,7 @@ declare const getSizeStyles$4: (theme: {
|
|
|
1937
1942
|
paddingRight: string;
|
|
1938
1943
|
};
|
|
1939
1944
|
};
|
|
1940
|
-
|
|
1945
|
+
type ButtonSize = VariantProps<typeof getSizeStyles$4>;
|
|
1941
1946
|
declare const getVariantStyles$1: (theme: {
|
|
1942
1947
|
mediaQueries: {
|
|
1943
1948
|
readonly smUp: "@media(min-width: 480px)";
|
|
@@ -2138,6 +2143,7 @@ declare const getVariantStyles$1: (theme: {
|
|
|
2138
2143
|
md: string;
|
|
2139
2144
|
lg: string;
|
|
2140
2145
|
xl: string;
|
|
2146
|
+
'2xl': string;
|
|
2141
2147
|
full: string;
|
|
2142
2148
|
};
|
|
2143
2149
|
shadows: {
|
|
@@ -2380,7 +2386,7 @@ declare const getVariantStyles$1: (theme: {
|
|
|
2380
2386
|
};
|
|
2381
2387
|
};
|
|
2382
2388
|
};
|
|
2383
|
-
|
|
2389
|
+
type ButtonVariant = VariantProps<typeof getVariantStyles$1>;
|
|
2384
2390
|
|
|
2385
2391
|
interface ButtonOptions {
|
|
2386
2392
|
/**
|
|
@@ -2423,13 +2429,13 @@ interface ButtonOptions {
|
|
|
2423
2429
|
type?: 'button' | 'submit' | 'reset';
|
|
2424
2430
|
}
|
|
2425
2431
|
|
|
2426
|
-
|
|
2427
|
-
|
|
2432
|
+
type PolymorphicButton = ForwardRefComponent<'button', ButtonOptions>;
|
|
2433
|
+
type ButtonProps = PropsOf<PolymorphicButton>;
|
|
2428
2434
|
declare const Button: PolymorphicButton;
|
|
2429
2435
|
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2436
|
+
type DisplaySize = keyof Theme['typography']['display'];
|
|
2437
|
+
type DisplayTextAlign = 'left' | 'center' | 'right';
|
|
2438
|
+
type DisplayTextWrap = 'pretty' | 'balance' | 'wrap' | 'nowrap' | 'stable';
|
|
2433
2439
|
interface DisplayTextOptions {
|
|
2434
2440
|
/**
|
|
2435
2441
|
* Sets the visual size of the display text.
|
|
@@ -2450,8 +2456,8 @@ interface DisplayTextOptions {
|
|
|
2450
2456
|
*/
|
|
2451
2457
|
textWrap?: DisplayTextWrap;
|
|
2452
2458
|
}
|
|
2453
|
-
|
|
2454
|
-
|
|
2459
|
+
type DisplayTextComponent = ForwardRefComponent<'h2', DisplayTextOptions>;
|
|
2460
|
+
type DisplayTextProps = PropsOf<DisplayTextComponent>;
|
|
2455
2461
|
declare const DisplayText: DisplayTextComponent;
|
|
2456
2462
|
|
|
2457
2463
|
interface CheckboxOptions {
|
|
@@ -2527,7 +2533,7 @@ interface CheckboxOptions {
|
|
|
2527
2533
|
*/
|
|
2528
2534
|
value?: string;
|
|
2529
2535
|
}
|
|
2530
|
-
|
|
2536
|
+
type CheckboxProps = Omit<CheckboxPrimitive.CheckboxProps, 'asChild' | 'children' | 'checked' | 'defaultChecked' | keyof CheckboxOptions> & CheckboxOptions;
|
|
2531
2537
|
declare const Checkbox: react.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps, "children" | "asChild" | keyof CheckboxOptions> & CheckboxOptions & react.RefAttributes<HTMLButtonElement>>;
|
|
2532
2538
|
|
|
2533
2539
|
interface DividerOptions {
|
|
@@ -2542,7 +2548,7 @@ interface DividerProps extends HTMLQdsProps<'span'>, DividerOptions {
|
|
|
2542
2548
|
}
|
|
2543
2549
|
declare const Divider: react.ForwardRefExoticComponent<DividerProps & react.RefAttributes<HTMLDivElement>>;
|
|
2544
2550
|
|
|
2545
|
-
|
|
2551
|
+
type PrimitiveContentProps = DropdownPrimitive.MenuContentProps;
|
|
2546
2552
|
interface DropdownMenuContentOptions {
|
|
2547
2553
|
/**
|
|
2548
2554
|
* Event handler called when focus moves to the trigger after closing.
|
|
@@ -2605,7 +2611,7 @@ interface DropdownMenuContentOptions {
|
|
|
2605
2611
|
interface DropdownMenuContentProps extends HTMLQdsProps<'div'>, DropdownMenuContentOptions {
|
|
2606
2612
|
}
|
|
2607
2613
|
|
|
2608
|
-
|
|
2614
|
+
type DropdownMenuDividerProps = HTMLQdsProps<'div'>;
|
|
2609
2615
|
|
|
2610
2616
|
interface DropdownMenuItemOptions {
|
|
2611
2617
|
/**
|
|
@@ -2631,8 +2637,8 @@ interface DropdownMenuItemOptions {
|
|
|
2631
2637
|
interface DropdownMenuItemProps extends Omit<DropdownPrimitive.DropdownMenuItemProps, 'asChild' | keyof DropdownMenuItemOptions>, DropdownMenuItemOptions {
|
|
2632
2638
|
}
|
|
2633
2639
|
|
|
2634
|
-
|
|
2635
|
-
|
|
2640
|
+
type DropdownTriggerComponent = ForwardRefComponent<'button'>;
|
|
2641
|
+
type DropdownMenuTriggerProps = PropsOf<DropdownTriggerComponent>;
|
|
2636
2642
|
|
|
2637
2643
|
interface DropdownMenuRootProps {
|
|
2638
2644
|
children: ReactNode;
|
|
@@ -2650,16 +2656,16 @@ interface DropdownMenuRootProps {
|
|
|
2650
2656
|
*/
|
|
2651
2657
|
onOpenChange?: (isOpen: boolean) => void;
|
|
2652
2658
|
}
|
|
2653
|
-
declare function DropdownMenuRoot(props: DropdownMenuRootProps): JSX.Element;
|
|
2659
|
+
declare function DropdownMenuRoot(props: DropdownMenuRootProps): react_jsx_runtime.JSX.Element;
|
|
2654
2660
|
declare const DropdownMenu: typeof DropdownMenuRoot & {
|
|
2655
2661
|
Trigger: ForwardRefComponent<"button", {}>;
|
|
2656
2662
|
Content: react.ForwardRefExoticComponent<DropdownMenuContentProps & react.RefAttributes<HTMLDivElement>>;
|
|
2657
2663
|
Item: react.ForwardRefExoticComponent<DropdownMenuItemProps & react.RefAttributes<HTMLDivElement>>;
|
|
2658
|
-
Divider: react.ForwardRefExoticComponent<
|
|
2664
|
+
Divider: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
2659
2665
|
};
|
|
2660
2666
|
|
|
2661
|
-
|
|
2662
|
-
|
|
2667
|
+
type HeadingSize = keyof Theme['typography']['title'];
|
|
2668
|
+
type HeadingColor = keyof Theme['colors']['text'];
|
|
2663
2669
|
interface HeadingOptions {
|
|
2664
2670
|
/**
|
|
2665
2671
|
* Sets the visual size of the heading.
|
|
@@ -2683,16 +2689,16 @@ interface HeadingOptions {
|
|
|
2683
2689
|
*/
|
|
2684
2690
|
textAlign?: 'left' | 'center' | 'right';
|
|
2685
2691
|
}
|
|
2686
|
-
|
|
2687
|
-
|
|
2692
|
+
type HeadingComponent = ForwardRefComponent<'h2', HeadingOptions>;
|
|
2693
|
+
type HeadingProps = PropsOf<HeadingComponent>;
|
|
2688
2694
|
declare const Heading: HeadingComponent;
|
|
2689
2695
|
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
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>> & {
|
|
2693
2699
|
Title: _emotion_styled.StyledComponent<{
|
|
2694
2700
|
theme?: _emotion_react.Theme | undefined;
|
|
2695
|
-
as?: react.ElementType<any> | undefined;
|
|
2701
|
+
as?: react.ElementType<any, keyof react.JSX.IntrinsicElements> | undefined;
|
|
2696
2702
|
}, react.DetailedHTMLProps<react.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {}>;
|
|
2697
2703
|
};
|
|
2698
2704
|
|
|
@@ -2896,6 +2902,7 @@ declare const getSizeStyles$3: (theme: {
|
|
|
2896
2902
|
md: string;
|
|
2897
2903
|
lg: string;
|
|
2898
2904
|
xl: string;
|
|
2905
|
+
'2xl': string;
|
|
2899
2906
|
full: string;
|
|
2900
2907
|
};
|
|
2901
2908
|
shadows: {
|
|
@@ -3308,6 +3315,7 @@ declare const getVariantStyles: (theme: {
|
|
|
3308
3315
|
md: string;
|
|
3309
3316
|
lg: string;
|
|
3310
3317
|
xl: string;
|
|
3318
|
+
'2xl': string;
|
|
3311
3319
|
full: string;
|
|
3312
3320
|
};
|
|
3313
3321
|
shadows: {
|
|
@@ -3565,8 +3573,8 @@ declare const getVariantStyles: (theme: {
|
|
|
3565
3573
|
};
|
|
3566
3574
|
};
|
|
3567
3575
|
|
|
3568
|
-
|
|
3569
|
-
|
|
3576
|
+
type IconButtonSize = VariantProps<typeof getSizeStyles$3>;
|
|
3577
|
+
type IconButtonVariant = VariantProps<typeof getVariantStyles>;
|
|
3570
3578
|
interface IconButtonOptions {
|
|
3571
3579
|
icon: ElementType<IconProps>;
|
|
3572
3580
|
/**
|
|
@@ -3587,8 +3595,8 @@ interface IconButtonOptions {
|
|
|
3587
3595
|
*/
|
|
3588
3596
|
isDisabled?: boolean;
|
|
3589
3597
|
}
|
|
3590
|
-
|
|
3591
|
-
|
|
3598
|
+
type IconButtonComponent = ForwardRefComponent<'button', IconButtonOptions>;
|
|
3599
|
+
type IconButtonProps = PropsOf<IconButtonComponent>;
|
|
3592
3600
|
declare const IconButton: IconButtonComponent;
|
|
3593
3601
|
|
|
3594
3602
|
interface InputBaseOptions {
|
|
@@ -3605,7 +3613,7 @@ interface InputBaseOptions {
|
|
|
3605
3613
|
*/
|
|
3606
3614
|
isRequired?: boolean;
|
|
3607
3615
|
}
|
|
3608
|
-
|
|
3616
|
+
type OmittedProps$7 = 'children' | 'readOnly' | 'size' | 'disabled' | 'required';
|
|
3609
3617
|
interface InputBaseProps extends Omit<HTMLQdsProps<'input'>, OmittedProps$7>, InputBaseOptions {
|
|
3610
3618
|
}
|
|
3611
3619
|
declare const InputBase: react.ForwardRefExoticComponent<InputBaseProps & react.RefAttributes<HTMLInputElement>>;
|
|
@@ -3634,7 +3642,7 @@ interface TextFieldOptions extends InputBaseOptions {
|
|
|
3634
3642
|
*/
|
|
3635
3643
|
suffix?: string;
|
|
3636
3644
|
}
|
|
3637
|
-
|
|
3645
|
+
type OmittedProps$6 = 'children' | 'readOnly' | 'size';
|
|
3638
3646
|
interface TextFieldProps extends Omit<HTMLQdsProps<'input'>, OmittedProps$6>, TextFieldOptions {
|
|
3639
3647
|
}
|
|
3640
3648
|
declare const TextField: react.ForwardRefExoticComponent<TextFieldProps & react.RefAttributes<HTMLInputElement>>;
|
|
@@ -3839,6 +3847,7 @@ declare const getSizeStyles$2: (theme: {
|
|
|
3839
3847
|
md: string;
|
|
3840
3848
|
lg: string;
|
|
3841
3849
|
xl: string;
|
|
3850
|
+
'2xl': string;
|
|
3842
3851
|
full: string;
|
|
3843
3852
|
};
|
|
3844
3853
|
shadows: {
|
|
@@ -4056,8 +4065,8 @@ declare const getSizeStyles$2: (theme: {
|
|
|
4056
4065
|
letterSpacing: string;
|
|
4057
4066
|
};
|
|
4058
4067
|
};
|
|
4059
|
-
|
|
4060
|
-
|
|
4068
|
+
type LabelSize = VariantProps<typeof getSizeStyles$2>;
|
|
4069
|
+
type LabelColor = keyof Theme['colors']['text'];
|
|
4061
4070
|
interface LabelOptions {
|
|
4062
4071
|
/**
|
|
4063
4072
|
* Size of the label
|
|
@@ -4069,8 +4078,8 @@ interface LabelOptions {
|
|
|
4069
4078
|
*/
|
|
4070
4079
|
color?: LabelColor;
|
|
4071
4080
|
}
|
|
4072
|
-
|
|
4073
|
-
|
|
4081
|
+
type LabelComponent = ForwardRefComponent<'label', LabelOptions>;
|
|
4082
|
+
type LabelProps = PropsOf<LabelComponent>;
|
|
4074
4083
|
declare const Label: LabelComponent;
|
|
4075
4084
|
|
|
4076
4085
|
interface LinkOptions {
|
|
@@ -4083,8 +4092,8 @@ interface LinkOptions {
|
|
|
4083
4092
|
*/
|
|
4084
4093
|
isExternal?: boolean;
|
|
4085
4094
|
}
|
|
4086
|
-
|
|
4087
|
-
|
|
4095
|
+
type LinkComponent = ForwardRefComponent<'a', LinkOptions>;
|
|
4096
|
+
type LinkProps = PropsOf<LinkComponent>;
|
|
4088
4097
|
declare const Link: LinkComponent;
|
|
4089
4098
|
|
|
4090
4099
|
declare const getSizeStyles$1: (theme: {
|
|
@@ -4287,6 +4296,7 @@ declare const getSizeStyles$1: (theme: {
|
|
|
4287
4296
|
md: string;
|
|
4288
4297
|
lg: string;
|
|
4289
4298
|
xl: string;
|
|
4299
|
+
'2xl': string;
|
|
4290
4300
|
full: string;
|
|
4291
4301
|
};
|
|
4292
4302
|
shadows: {
|
|
@@ -4493,7 +4503,7 @@ declare const getSizeStyles$1: (theme: {
|
|
|
4493
4503
|
fontSize: string;
|
|
4494
4504
|
};
|
|
4495
4505
|
};
|
|
4496
|
-
|
|
4506
|
+
type LoadingDotsSize = VariantProps<typeof getSizeStyles$1>;
|
|
4497
4507
|
interface LoadingDotsOptions {
|
|
4498
4508
|
size?: ResponsiveProp<LoadingDotsSize>;
|
|
4499
4509
|
}
|
|
@@ -4701,6 +4711,7 @@ declare const getSizeStyles: (theme: {
|
|
|
4701
4711
|
md: string;
|
|
4702
4712
|
lg: string;
|
|
4703
4713
|
xl: string;
|
|
4714
|
+
'2xl': string;
|
|
4704
4715
|
full: string;
|
|
4705
4716
|
};
|
|
4706
4717
|
shadows: {
|
|
@@ -4939,8 +4950,8 @@ declare const getSizeStyles: (theme: {
|
|
|
4939
4950
|
letterSpacing: string;
|
|
4940
4951
|
};
|
|
4941
4952
|
};
|
|
4942
|
-
|
|
4943
|
-
|
|
4953
|
+
type ParagraphSize = VariantProps<typeof getSizeStyles>;
|
|
4954
|
+
type ParagraphColor = keyof Theme['colors']['text'];
|
|
4944
4955
|
interface ParagraphOptions {
|
|
4945
4956
|
/**
|
|
4946
4957
|
* Sets the visual size of the text
|
|
@@ -4962,8 +4973,8 @@ interface ParagraphOptions {
|
|
|
4962
4973
|
*/
|
|
4963
4974
|
textAlign?: 'left' | 'center' | 'right';
|
|
4964
4975
|
}
|
|
4965
|
-
|
|
4966
|
-
|
|
4976
|
+
type ParagraphComponent = ForwardRefComponent<'p', ParagraphOptions>;
|
|
4977
|
+
type ParagraphProps = PropsOf<ParagraphComponent>;
|
|
4967
4978
|
declare const Paragraph: ParagraphComponent;
|
|
4968
4979
|
|
|
4969
4980
|
interface SelectBaseOptions {
|
|
@@ -4989,13 +5000,13 @@ interface SelectBaseOptions {
|
|
|
4989
5000
|
*/
|
|
4990
5001
|
isRequired?: boolean;
|
|
4991
5002
|
}
|
|
4992
|
-
|
|
5003
|
+
type OmittedProps$5 = 'readOnly' | 'size' | 'multiple' | 'disabled' | 'required';
|
|
4993
5004
|
interface SelectBaseProps extends Omit<HTMLQdsProps<'select'>, OmittedProps$5>, SelectBaseOptions {
|
|
4994
5005
|
}
|
|
4995
5006
|
declare const SelectBase: react.ForwardRefExoticComponent<SelectBaseProps & react.RefAttributes<HTMLSelectElement>>;
|
|
4996
5007
|
|
|
4997
|
-
|
|
4998
|
-
|
|
5008
|
+
type ResizeProp = 'none' | 'both' | 'horizontal' | 'vertical';
|
|
5009
|
+
type MinRowsProp = number;
|
|
4999
5010
|
interface TextareaBaseOptions {
|
|
5000
5011
|
/**
|
|
5001
5012
|
* If `true`, the textarea will be invalid
|
|
@@ -5023,7 +5034,7 @@ interface TextareaBaseOptions {
|
|
|
5023
5034
|
*/
|
|
5024
5035
|
minRows?: MinRowsProp;
|
|
5025
5036
|
}
|
|
5026
|
-
|
|
5037
|
+
type OmittedProps$4 = 'children' | 'readOnly' | 'size' | 'disabled' | 'required' | 'rows' | 'cols';
|
|
5027
5038
|
interface TextareaBaseProps extends Omit<HTMLQdsProps<'textarea'>, OmittedProps$4>, TextareaBaseOptions {
|
|
5028
5039
|
}
|
|
5029
5040
|
declare const TextareaBase: react.ForwardRefExoticComponent<TextareaBaseProps & react.RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -5051,7 +5062,7 @@ interface RadioCardOptions {
|
|
|
5051
5062
|
interface RadioCardProps extends Omit<RadioGroupPrimitive.RadioGroupItemProps, 'asChild' | keyof RadioCardOptions>, RadioCardOptions {
|
|
5052
5063
|
}
|
|
5053
5064
|
|
|
5054
|
-
|
|
5065
|
+
type RadioGroupLabelProps = HTMLQdsProps<'span'>;
|
|
5055
5066
|
|
|
5056
5067
|
interface RadioGroupOptions {
|
|
5057
5068
|
/**
|
|
@@ -5096,13 +5107,13 @@ interface RadioGroupProps extends Omit<RadioGroupPrimitive.RadioGroupProps, 'asC
|
|
|
5096
5107
|
}
|
|
5097
5108
|
declare const RadioGroup: react.ForwardRefExoticComponent<RadioGroupProps & react.RefAttributes<HTMLDivElement>> & {
|
|
5098
5109
|
Card: react.ForwardRefExoticComponent<RadioCardProps & react.RefAttributes<HTMLButtonElement>>;
|
|
5099
|
-
Label: react.ForwardRefExoticComponent<
|
|
5110
|
+
Label: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & react.RefAttributes<HTMLSpanElement>>;
|
|
5100
5111
|
};
|
|
5101
5112
|
|
|
5102
5113
|
interface SelectOptionOptions {
|
|
5103
5114
|
isDisabled?: boolean;
|
|
5104
5115
|
}
|
|
5105
|
-
|
|
5116
|
+
type OmittedProps$3 = 'disabled' | 'label';
|
|
5106
5117
|
interface SelectOptionProps extends Omit<HTMLQdsProps<'option'>, OmittedProps$3>, SelectOptionOptions {
|
|
5107
5118
|
}
|
|
5108
5119
|
|
|
@@ -5120,7 +5131,7 @@ interface SelectOptions extends SelectBaseOptions {
|
|
|
5120
5131
|
*/
|
|
5121
5132
|
helperText?: string;
|
|
5122
5133
|
}
|
|
5123
|
-
|
|
5134
|
+
type OmittedProps$2 = 'readOnly' | 'size';
|
|
5124
5135
|
interface SelectProps extends Omit<HTMLQdsProps<'select'>, OmittedProps$2>, SelectOptions {
|
|
5125
5136
|
}
|
|
5126
5137
|
declare const Select: react.ForwardRefExoticComponent<SelectProps & react.RefAttributes<HTMLSelectElement>> & {
|
|
@@ -5129,18 +5140,18 @@ declare const Select: react.ForwardRefExoticComponent<SelectProps & react.RefAtt
|
|
|
5129
5140
|
|
|
5130
5141
|
interface SpacerOptions {
|
|
5131
5142
|
axis?: 'x' | 'y';
|
|
5132
|
-
size: keyof Theme['spacing']
|
|
5143
|
+
size: ResponsiveProp<keyof Theme['spacing']>;
|
|
5133
5144
|
}
|
|
5134
5145
|
interface SpacerProps extends HTMLQdsProps<'span'>, SpacerOptions {
|
|
5135
5146
|
}
|
|
5136
5147
|
declare const Spacer: react.ForwardRefExoticComponent<SpacerProps & react.RefAttributes<HTMLSpanElement>>;
|
|
5137
5148
|
|
|
5138
|
-
|
|
5139
|
-
|
|
5140
|
-
|
|
5141
|
-
|
|
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';
|
|
5142
5153
|
|
|
5143
|
-
|
|
5154
|
+
type GapProp = keyof Theme['spacing'];
|
|
5144
5155
|
interface StackOptions {
|
|
5145
5156
|
/**
|
|
5146
5157
|
* The direction of the stack.
|
|
@@ -5175,8 +5186,8 @@ interface StackOptions {
|
|
|
5175
5186
|
*/
|
|
5176
5187
|
divider?: ReactNode;
|
|
5177
5188
|
}
|
|
5178
|
-
|
|
5179
|
-
|
|
5189
|
+
type StackComponent = ForwardRefComponent<'div', StackOptions>;
|
|
5190
|
+
type StackProps = PropsOf<StackComponent>;
|
|
5180
5191
|
declare const Stack: StackComponent;
|
|
5181
5192
|
|
|
5182
5193
|
interface SwitchOptions {
|
|
@@ -5226,12 +5237,12 @@ interface TextareaOptions extends TextareaBaseOptions {
|
|
|
5226
5237
|
*/
|
|
5227
5238
|
helperText?: string;
|
|
5228
5239
|
}
|
|
5229
|
-
|
|
5240
|
+
type OmittedProps$1 = 'children' | 'readOnly' | 'size';
|
|
5230
5241
|
interface TextareaProps extends Omit<HTMLQdsProps<'textarea'>, OmittedProps$1>, TextareaOptions {
|
|
5231
5242
|
}
|
|
5232
5243
|
declare const Textarea: react.ForwardRefExoticComponent<TextareaProps & react.RefAttributes<HTMLTextAreaElement>>;
|
|
5233
5244
|
|
|
5234
|
-
|
|
5245
|
+
type Id = number | string;
|
|
5235
5246
|
interface ToastOptions {
|
|
5236
5247
|
/**
|
|
5237
5248
|
* Unique identifier for the toast (can be used for removing it prematurely). If a toast with this
|
|
@@ -5262,11 +5273,11 @@ declare function useBreakpoint(params?: UseBreakpointOptions): {
|
|
|
5262
5273
|
currentBreakpoint: "2xl" | "base" | "xl" | "lg" | "md" | "sm";
|
|
5263
5274
|
};
|
|
5264
5275
|
|
|
5265
|
-
|
|
5266
|
-
|
|
5276
|
+
type Breakpoints = Theme['breakpoints'];
|
|
5277
|
+
type BreakpointsConfig<T> = PartialRecord<keyof Breakpoints, T> & {
|
|
5267
5278
|
base: T;
|
|
5268
5279
|
};
|
|
5269
|
-
|
|
5280
|
+
type UseBreakpointValueProps<T> = BreakpointsConfig<T>;
|
|
5270
5281
|
/**
|
|
5271
5282
|
* Hook for getting a value based on the current breakpoint.
|
|
5272
5283
|
*
|
|
@@ -5275,7 +5286,7 @@ declare type UseBreakpointValueProps<T> = BreakpointsConfig<T>;
|
|
|
5275
5286
|
*/
|
|
5276
5287
|
declare function useBreakpointValue<T>(values: UseBreakpointValueProps<T>, options?: UseBreakpointOptions): T;
|
|
5277
5288
|
|
|
5278
|
-
|
|
5289
|
+
type LoadingStatus = 'loading' | 'loaded' | 'error' | 'pending';
|
|
5279
5290
|
interface UseImageProps {
|
|
5280
5291
|
src?: string;
|
|
5281
5292
|
loading?: HTMLQdsProps<'img'>['loading'];
|
|
@@ -5284,8 +5295,8 @@ declare const useImage: ({ src, loading }: UseImageProps) => {
|
|
|
5284
5295
|
loadingStatus: LoadingStatus;
|
|
5285
5296
|
};
|
|
5286
5297
|
|
|
5287
|
-
|
|
5288
|
-
|
|
5298
|
+
type FormFieldElement = 'input' | 'select' | 'textarea';
|
|
5299
|
+
type PropGetter<T extends ElementType = LegitimateAny> = (props?: HTMLQdsProps<T>) => Record<string, unknown>;
|
|
5289
5300
|
interface FormFieldOptions {
|
|
5290
5301
|
/**
|
|
5291
5302
|
* The label for the form field
|
|
@@ -5312,8 +5323,8 @@ interface FormFieldOptions {
|
|
|
5312
5323
|
*/
|
|
5313
5324
|
isRequired?: boolean;
|
|
5314
5325
|
}
|
|
5315
|
-
|
|
5316
|
-
|
|
5326
|
+
type OmittedProps = 'children' | 'readOnly' | 'size';
|
|
5327
|
+
type UseFormFieldProps<T extends FormFieldElement> = Omit<HTMLQdsProps<T>, OmittedProps> & FormFieldOptions;
|
|
5317
5328
|
/**
|
|
5318
5329
|
* Custom hook that returns props for a form field's label, input, helper text and error message.
|
|
5319
5330
|
* Meant to be used in conjunction with the `Input`, `Select` or `Textarea` component.
|