@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.
Files changed (130) hide show
  1. package/dist/cjs/index.js +1322 -1322
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/types/components/_internal/form-parts.d.ts +3 -3
  4. package/dist/cjs/types/components/avatar/avatar.d.ts +3 -2
  5. package/dist/cjs/types/components/button/button-icon.d.ts +1 -1
  6. package/dist/cjs/types/components/button/button-styles.d.ts +4 -2
  7. package/dist/cjs/types/components/button/button-types.d.ts +2 -1
  8. package/dist/cjs/types/components/button/button.d.ts +2 -2
  9. package/dist/cjs/types/components/checkbox/checkbox.d.ts +9 -1
  10. package/dist/cjs/types/components/display-text/display-text.d.ts +7 -6
  11. package/dist/cjs/types/components/dropdown-menu/dropdown-menu-content.d.ts +1 -1
  12. package/dist/cjs/types/components/dropdown-menu/dropdown-menu-divider.d.ts +2 -2
  13. package/dist/cjs/types/components/dropdown-menu/dropdown-menu-trigger.d.ts +2 -2
  14. package/dist/cjs/types/components/dropdown-menu/dropdown-menu.d.ts +3 -3
  15. package/dist/cjs/types/components/heading/heading.d.ts +6 -5
  16. package/dist/cjs/types/components/hint-box/hint-box.d.ts +4 -4
  17. package/dist/cjs/types/components/icon/icon.types.d.ts +3 -3
  18. package/dist/cjs/types/components/icon-button/icon-button-styles.d.ts +2 -0
  19. package/dist/cjs/types/components/icon-button/icon-button.d.ts +6 -5
  20. package/dist/cjs/types/components/index.d.ts +2 -0
  21. package/dist/cjs/types/components/label/label.d.ts +11 -9
  22. package/dist/cjs/types/components/link/link.d.ts +2 -2
  23. package/dist/cjs/types/components/loading-dots/loading-dots.d.ts +4 -2
  24. package/dist/cjs/types/components/paragraph/paragraph.d.ts +11 -6
  25. package/dist/cjs/types/components/primitives/input-base/input-base.d.ts +1 -1
  26. package/dist/cjs/types/components/primitives/select-base/select-base.d.ts +1 -1
  27. package/dist/cjs/types/components/primitives/textarea-base/textarea-base.d.ts +3 -3
  28. package/dist/cjs/types/components/radio-group/radio-group-context.d.ts +1 -1
  29. package/dist/cjs/types/components/radio-group/radio-group-label.d.ts +2 -2
  30. package/dist/cjs/types/components/radio-group/radio-group.d.ts +1 -1
  31. package/dist/cjs/types/components/radio-group/radio-indicator.d.ts +1 -1
  32. package/dist/cjs/types/components/select/select-option.d.ts +1 -1
  33. package/dist/cjs/types/components/select/select.d.ts +1 -1
  34. package/dist/cjs/types/components/spacer/spacer.d.ts +2 -1
  35. package/dist/cjs/types/components/stack/stack.d.ts +6 -5
  36. package/dist/cjs/types/components/stack/stack.types.d.ts +4 -4
  37. package/dist/cjs/types/components/switch/index.d.ts +1 -0
  38. package/dist/cjs/types/components/switch/switch.d.ts +35 -0
  39. package/dist/cjs/types/components/text-field/text-field.d.ts +1 -1
  40. package/dist/cjs/types/components/textarea/textarea.d.ts +1 -1
  41. package/dist/cjs/types/components/toast/toast-provider.d.ts +1 -1
  42. package/dist/cjs/types/components/toast/toast-store.d.ts +2 -2
  43. package/dist/cjs/types/components/toast/toast-styles.d.ts +2 -1
  44. package/dist/cjs/types/components/toast/toast.d.ts +2 -3
  45. package/dist/cjs/types/hooks/use-breakpoint-value.d.ts +3 -3
  46. package/dist/cjs/types/hooks/use-form-field.d.ts +4 -4
  47. package/dist/cjs/types/hooks/use-image.d.ts +1 -1
  48. package/dist/cjs/types/hooks/use-responsive-prop.d.ts +16 -0
  49. package/dist/cjs/types/i18n/locale-context.d.ts +1 -1
  50. package/dist/cjs/types/i18n/locales.d.ts +1 -1
  51. package/dist/cjs/types/i18n/use-translation.d.ts +1 -1
  52. package/dist/cjs/types/qds-provider.d.ts +1 -1
  53. package/dist/cjs/types/styles/common-styles.d.ts +1 -0
  54. package/dist/cjs/types/styles/css-reset.d.ts +1 -2
  55. package/dist/cjs/types/styles/css-utils.d.ts +3 -3
  56. package/dist/cjs/types/styles/global-styles.d.ts +1 -2
  57. package/dist/cjs/types/theme/foundations/index.d.ts +1 -0
  58. package/dist/cjs/types/theme/foundations/radius.d.ts +3 -1
  59. package/dist/cjs/types/theme/theme-tools.d.ts +3 -2
  60. package/dist/cjs/types/theme/theme.d.ts +2 -1
  61. package/dist/cjs/types/types.d.ts +4 -4
  62. package/dist/cjs/types/utils/html-attributes.d.ts +1 -1
  63. package/dist/cjs/types/utils/merge-refs.d.ts +2 -2
  64. package/dist/cjs/types/utils/polymorphic.d.ts +4 -4
  65. package/dist/esm/index.js +1322 -1322
  66. package/dist/esm/index.js.map +1 -1
  67. package/dist/esm/types/components/_internal/form-parts.d.ts +3 -3
  68. package/dist/esm/types/components/avatar/avatar.d.ts +3 -2
  69. package/dist/esm/types/components/button/button-icon.d.ts +1 -1
  70. package/dist/esm/types/components/button/button-styles.d.ts +4 -2
  71. package/dist/esm/types/components/button/button-types.d.ts +2 -1
  72. package/dist/esm/types/components/button/button.d.ts +2 -2
  73. package/dist/esm/types/components/checkbox/checkbox.d.ts +9 -1
  74. package/dist/esm/types/components/display-text/display-text.d.ts +7 -6
  75. package/dist/esm/types/components/dropdown-menu/dropdown-menu-content.d.ts +1 -1
  76. package/dist/esm/types/components/dropdown-menu/dropdown-menu-divider.d.ts +2 -2
  77. package/dist/esm/types/components/dropdown-menu/dropdown-menu-trigger.d.ts +2 -2
  78. package/dist/esm/types/components/dropdown-menu/dropdown-menu.d.ts +3 -3
  79. package/dist/esm/types/components/heading/heading.d.ts +6 -5
  80. package/dist/esm/types/components/hint-box/hint-box.d.ts +4 -4
  81. package/dist/esm/types/components/icon/icon.types.d.ts +3 -3
  82. package/dist/esm/types/components/icon-button/icon-button-styles.d.ts +2 -0
  83. package/dist/esm/types/components/icon-button/icon-button.d.ts +6 -5
  84. package/dist/esm/types/components/index.d.ts +2 -0
  85. package/dist/esm/types/components/label/label.d.ts +11 -9
  86. package/dist/esm/types/components/link/link.d.ts +2 -2
  87. package/dist/esm/types/components/loading-dots/loading-dots.d.ts +4 -2
  88. package/dist/esm/types/components/paragraph/paragraph.d.ts +11 -6
  89. package/dist/esm/types/components/primitives/input-base/input-base.d.ts +1 -1
  90. package/dist/esm/types/components/primitives/select-base/select-base.d.ts +1 -1
  91. package/dist/esm/types/components/primitives/textarea-base/textarea-base.d.ts +3 -3
  92. package/dist/esm/types/components/radio-group/radio-group-context.d.ts +1 -1
  93. package/dist/esm/types/components/radio-group/radio-group-label.d.ts +2 -2
  94. package/dist/esm/types/components/radio-group/radio-group.d.ts +1 -1
  95. package/dist/esm/types/components/radio-group/radio-indicator.d.ts +1 -1
  96. package/dist/esm/types/components/select/select-option.d.ts +1 -1
  97. package/dist/esm/types/components/select/select.d.ts +1 -1
  98. package/dist/esm/types/components/spacer/spacer.d.ts +2 -1
  99. package/dist/esm/types/components/stack/stack.d.ts +6 -5
  100. package/dist/esm/types/components/stack/stack.types.d.ts +4 -4
  101. package/dist/esm/types/components/switch/index.d.ts +1 -0
  102. package/dist/esm/types/components/switch/switch.d.ts +35 -0
  103. package/dist/esm/types/components/text-field/text-field.d.ts +1 -1
  104. package/dist/esm/types/components/textarea/textarea.d.ts +1 -1
  105. package/dist/esm/types/components/toast/toast-provider.d.ts +1 -1
  106. package/dist/esm/types/components/toast/toast-store.d.ts +2 -2
  107. package/dist/esm/types/components/toast/toast-styles.d.ts +2 -1
  108. package/dist/esm/types/components/toast/toast.d.ts +2 -3
  109. package/dist/esm/types/hooks/use-breakpoint-value.d.ts +3 -3
  110. package/dist/esm/types/hooks/use-form-field.d.ts +4 -4
  111. package/dist/esm/types/hooks/use-image.d.ts +1 -1
  112. package/dist/esm/types/hooks/use-responsive-prop.d.ts +16 -0
  113. package/dist/esm/types/i18n/locale-context.d.ts +1 -1
  114. package/dist/esm/types/i18n/locales.d.ts +1 -1
  115. package/dist/esm/types/i18n/use-translation.d.ts +1 -1
  116. package/dist/esm/types/qds-provider.d.ts +1 -1
  117. package/dist/esm/types/styles/common-styles.d.ts +1 -0
  118. package/dist/esm/types/styles/css-reset.d.ts +1 -2
  119. package/dist/esm/types/styles/css-utils.d.ts +3 -3
  120. package/dist/esm/types/styles/global-styles.d.ts +1 -2
  121. package/dist/esm/types/theme/foundations/index.d.ts +1 -0
  122. package/dist/esm/types/theme/foundations/radius.d.ts +3 -1
  123. package/dist/esm/types/theme/theme-tools.d.ts +3 -2
  124. package/dist/esm/types/theme/theme.d.ts +2 -1
  125. package/dist/esm/types/types.d.ts +4 -4
  126. package/dist/esm/types/utils/html-attributes.d.ts +1 -1
  127. package/dist/esm/types/utils/merge-refs.d.ts +2 -2
  128. package/dist/esm/types/utils/polymorphic.d.ts +4 -4
  129. package/dist/index.d.ts +187 -98
  130. package/package.json +22 -24
@@ -1,14 +1,15 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import type { Theme } from '../../theme';
3
3
  import type * as Polymorphic from '../../utils/polymorphic';
4
+ import { type ResponsiveProp } from '../../hooks/use-responsive-prop';
4
5
  import type { AlignItems, FlexDirection, JustifyContent, FlexWrap } from './stack.types';
5
- declare type GapProp = keyof Theme['spacing'];
6
+ type GapProp = keyof Theme['spacing'];
6
7
  interface StackOptions {
7
8
  /**
8
9
  * The direction of the stack.
9
10
  * @default 'column'
10
11
  */
11
- direction?: FlexDirection;
12
+ direction?: ResponsiveProp<FlexDirection>;
12
13
  /**
13
14
  * The CSS `justify-content` property.
14
15
  * Controls the alignment of items on the main axis.
@@ -28,7 +29,7 @@ interface StackOptions {
28
29
  /**
29
30
  * The gap between each child element.
30
31
  */
31
- gap?: GapProp;
32
+ gap?: ResponsiveProp<GapProp>;
32
33
  /**
33
34
  * A divider element to be rendered between each child element.
34
35
  *
@@ -37,7 +38,7 @@ interface StackOptions {
37
38
  */
38
39
  divider?: ReactNode;
39
40
  }
40
- declare type StackComponent = Polymorphic.ForwardRefComponent<'div', StackOptions>;
41
- export declare type StackProps = Polymorphic.PropsOf<StackComponent>;
41
+ type StackComponent = Polymorphic.ForwardRefComponent<'div', StackOptions>;
42
+ export type StackProps = Polymorphic.PropsOf<StackComponent>;
42
43
  export declare const Stack: StackComponent;
43
44
  export {};
@@ -1,4 +1,4 @@
1
- export declare type AlignItems = 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline';
2
- export declare type JustifyContent = 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly';
3
- export declare type FlexDirection = 'row' | 'row-reverse' | 'column' | 'column-reverse';
4
- export declare type FlexWrap = 'wrap' | 'nowrap' | 'wrap-reverse';
1
+ export type AlignItems = 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline';
2
+ export type JustifyContent = 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly';
3
+ export type FlexDirection = 'row' | 'row-reverse' | 'column' | 'column-reverse';
4
+ export type FlexWrap = 'wrap' | 'nowrap' | 'wrap-reverse';
@@ -0,0 +1 @@
1
+ export * from './switch';
@@ -0,0 +1,35 @@
1
+ /// <reference types="react" />
2
+ import * as RadixSwitch from '@radix-ui/react-switch';
3
+ interface SwitchOptions {
4
+ /**
5
+ * The label for the switch
6
+ */
7
+ label: string;
8
+ /**
9
+ * The text that appears below the label
10
+ * to provide additional guidance to the user
11
+ */
12
+ helperText?: string;
13
+ /**
14
+ * The checked state of the checkbox when it is initially rendered. Use when you do not need to control its checked state.
15
+ */
16
+ isDefaultChecked?: boolean;
17
+ /**
18
+ * If `true`, the switch will be checked
19
+ */
20
+ isChecked?: boolean;
21
+ /**
22
+ * If `true`, the switch will be disabled and
23
+ * cannot be interacted with
24
+ */
25
+ isDisabled?: boolean;
26
+ /**
27
+ * If `true`, indicates that the switch is required
28
+ */
29
+ isRequired?: boolean;
30
+ onCheckedChange?: (isChecked: boolean) => void;
31
+ }
32
+ interface SwitchProps extends Omit<RadixSwitch.SwitchProps, 'asChild' | keyof SwitchOptions>, SwitchOptions {
33
+ }
34
+ export declare const Switch: import("react").ForwardRefExoticComponent<SwitchProps & import("react").RefAttributes<HTMLButtonElement>>;
35
+ export {};
@@ -25,7 +25,7 @@ interface TextFieldOptions extends InputBaseOptions {
25
25
  */
26
26
  suffix?: string;
27
27
  }
28
- declare type OmittedProps = 'children' | 'readOnly' | 'size';
28
+ type OmittedProps = 'children' | 'readOnly' | 'size';
29
29
  export interface TextFieldProps extends Omit<HTMLQdsProps<'input'>, OmittedProps>, TextFieldOptions {
30
30
  }
31
31
  export declare const TextField: import("react").ForwardRefExoticComponent<TextFieldProps & import("react").RefAttributes<HTMLInputElement>>;
@@ -15,7 +15,7 @@ interface TextareaOptions extends TextareaBaseOptions {
15
15
  */
16
16
  helperText?: string;
17
17
  }
18
- declare type OmittedProps = 'children' | 'readOnly' | 'size';
18
+ type OmittedProps = 'children' | 'readOnly' | 'size';
19
19
  export interface TextareaProps extends Omit<HTMLQdsProps<'textarea'>, OmittedProps>, TextareaOptions {
20
20
  }
21
21
  export declare const Textarea: import("react").ForwardRefExoticComponent<TextareaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
@@ -1,4 +1,4 @@
1
1
  import type { ReactNode } from 'react';
2
2
  export declare function ToastProvider({ children }: {
3
3
  children: ReactNode;
4
- }): JSX.Element;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import type { ToastVariant } from './toast-styles';
2
- declare type Id = number | string;
2
+ type Id = number | string;
3
3
  interface Toast {
4
4
  id: Id;
5
5
  /**
@@ -20,7 +20,7 @@ interface ToastOptions {
20
20
  */
21
21
  id?: Id;
22
22
  }
23
- declare type Subscriber = () => void;
23
+ type Subscriber = () => void;
24
24
  declare class ToastStore {
25
25
  toasts: Toast[];
26
26
  subscribers: Subscriber[];
@@ -199,6 +199,7 @@ export declare const getVariantStyles: (theme: {
199
199
  md: string;
200
200
  lg: string;
201
201
  xl: string;
202
+ '2xl': string;
202
203
  full: string;
203
204
  };
204
205
  shadows: {
@@ -407,4 +408,4 @@ export declare const getVariantStyles: (theme: {
407
408
  color: string;
408
409
  };
409
410
  };
410
- export declare type ToastVariant = VariantProps<typeof getVariantStyles>;
411
+ export type ToastVariant = VariantProps<typeof getVariantStyles>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import * as ToastPrimitive from '@radix-ui/react-toast';
3
2
  import type { HTMLQdsProps } from '../../types';
4
3
  import type { ToastVariant } from './toast-styles';
@@ -6,8 +5,8 @@ interface ToastOptions {
6
5
  text: string;
7
6
  variant?: ToastVariant;
8
7
  }
9
- declare type OmittedProps = 'children';
8
+ type OmittedProps = 'children';
10
9
  interface ToastProps extends Omit<HTMLQdsProps<'div'>, OmittedProps>, ToastOptions {
11
10
  }
12
- export declare function Toast(props: ToastProps & ToastPrimitive.ToastProps): JSX.Element;
11
+ export declare function Toast(props: ToastProps & ToastPrimitive.ToastProps): import("react/jsx-runtime").JSX.Element;
13
12
  export {};
@@ -1,11 +1,11 @@
1
1
  import type { Theme } from '../theme';
2
2
  import type { PartialRecord } from '../types';
3
3
  import type { UseBreakpointOptions } from './use-breakpoint';
4
- declare type Breakpoints = Theme['breakpoints'];
5
- declare type BreakpointsConfig<T> = PartialRecord<keyof Breakpoints, T> & {
4
+ type Breakpoints = Theme['breakpoints'];
5
+ type BreakpointsConfig<T> = PartialRecord<keyof Breakpoints, T> & {
6
6
  base: T;
7
7
  };
8
- export declare type UseBreakpointValueProps<T> = BreakpointsConfig<T>;
8
+ export type UseBreakpointValueProps<T> = BreakpointsConfig<T>;
9
9
  /**
10
10
  * Hook for getting a value based on the current breakpoint.
11
11
  *
@@ -1,7 +1,7 @@
1
1
  import type { ElementType } from 'react';
2
2
  import type { HTMLQdsProps, LegitimateAny } from '../types';
3
- declare type FormFieldElement = 'input' | 'select' | 'textarea';
4
- declare type PropGetter<T extends ElementType = LegitimateAny> = (props?: HTMLQdsProps<T>) => Record<string, unknown>;
3
+ type FormFieldElement = 'input' | 'select' | 'textarea';
4
+ type PropGetter<T extends ElementType = LegitimateAny> = (props?: HTMLQdsProps<T>) => Record<string, unknown>;
5
5
  interface FormFieldOptions {
6
6
  /**
7
7
  * The label for the form field
@@ -28,8 +28,8 @@ interface FormFieldOptions {
28
28
  */
29
29
  isRequired?: boolean;
30
30
  }
31
- declare type OmittedProps = 'children' | 'readOnly' | 'size';
32
- export declare type UseFormFieldProps<T extends FormFieldElement> = Omit<HTMLQdsProps<T>, OmittedProps> & FormFieldOptions;
31
+ type OmittedProps = 'children' | 'readOnly' | 'size';
32
+ export type UseFormFieldProps<T extends FormFieldElement> = Omit<HTMLQdsProps<T>, OmittedProps> & FormFieldOptions;
33
33
  /**
34
34
  * Custom hook that returns props for a form field's label, input, helper text and error message.
35
35
  * Meant to be used in conjunction with the `Input`, `Select` or `Textarea` component.
@@ -1,5 +1,5 @@
1
1
  import type { HTMLQdsProps } from '../types';
2
- declare type LoadingStatus = 'loading' | 'loaded' | 'error' | 'pending';
2
+ type LoadingStatus = 'loading' | 'loaded' | 'error' | 'pending';
3
3
  export interface UseImageProps {
4
4
  src?: string;
5
5
  loading?: HTMLQdsProps<'img'>['loading'];
@@ -0,0 +1,16 @@
1
+ import { type Theme } from '../theme';
2
+ import { type PartialRecord } from '../types';
3
+ type Breakpoints = Theme['breakpoints'];
4
+ type BreakpointsConfig<T> = PartialRecord<keyof Breakpoints, T> & {
5
+ base: T;
6
+ };
7
+ export type ResponsiveProp<T> = T | BreakpointsConfig<T>;
8
+ /**
9
+ * Hook for responsive props that returns correct value for current breakpoint or static value
10
+ * if user didn't input responsive options
11
+ *
12
+ * @example
13
+ * const size = useResponsiveProp({ base: 'sm', md: 'lg' })
14
+ */
15
+ export declare function useResponsiveProp<T>(prop: ResponsiveProp<T>): T | (undefined & T);
16
+ export {};
@@ -7,6 +7,6 @@ interface LocaleProviderProps {
7
7
  language: LanguageCode;
8
8
  children: React.ReactNode;
9
9
  }
10
- export declare function LocaleProvider({ language, children }: LocaleProviderProps): JSX.Element;
10
+ export declare function LocaleProvider({ language, children }: LocaleProviderProps): import("react/jsx-runtime").JSX.Element;
11
11
  export declare function useLocale(): LocaleContextValue;
12
12
  export {};
@@ -1,5 +1,5 @@
1
1
  declare const SUPPORTED_LANGUAGE_CODES: readonly ["en", "sv", "fi", "fr"];
2
- export declare type LanguageCode = typeof SUPPORTED_LANGUAGE_CODES[number];
2
+ export type LanguageCode = (typeof SUPPORTED_LANGUAGE_CODES)[number];
3
3
  export interface Resource {
4
4
  close: string;
5
5
  optional: string;
@@ -1,5 +1,5 @@
1
1
  import type { Resource } from './locales';
2
- declare type I18nKey = keyof Resource;
2
+ type I18nKey = keyof Resource;
3
3
  export declare function useTranslation(): {
4
4
  t: (key: I18nKey) => string;
5
5
  };
@@ -8,5 +8,5 @@ interface QdsProviderProps {
8
8
  cacheOptions?: Partial<EmotionCacheOptions>;
9
9
  locale: LanguageCode;
10
10
  }
11
- export declare function QdsProvider({ children, themeOverrides, cacheOptions, locale }: QdsProviderProps): JSX.Element;
11
+ export declare function QdsProvider({ children, themeOverrides, cacheOptions, locale }: QdsProviderProps): import("react/jsx-runtime").JSX.Element;
12
12
  export {};
@@ -198,6 +198,7 @@ export declare const getFormFieldBaseStyles: (theme: {
198
198
  md: string;
199
199
  lg: string;
200
200
  xl: string;
201
+ '2xl': string;
201
202
  full: string;
202
203
  };
203
204
  shadows: {
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * A CSS Reset (opinionated)
4
3
  */
5
- export declare function CSSReset(): JSX.Element;
4
+ export declare function CSSReset(): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import type { CSSObject } from '@emotion/react';
2
2
  import type { Theme } from '../theme';
3
- declare type NamedStyles = Record<string, CSSObject>;
4
- declare type StyleInterpolation<T> = (theme: Theme) => T;
3
+ type NamedStyles = Record<string, CSSObject>;
4
+ type StyleInterpolation<T> = (theme: Theme) => T;
5
5
  /**
6
6
  * Creates a collection of named style rules.
7
7
  */
@@ -10,7 +10,7 @@ export declare function createStyleVariants<T extends NamedStyles>(styles: Style
10
10
  * Create a style object. Useful for creating styles that depend on the theme.
11
11
  */
12
12
  export declare function createStyle<T extends CSSObject>(styles: StyleInterpolation<T>): (theme: Theme) => T;
13
- export declare type VariantProps<T extends ReturnType<typeof createStyle | typeof createStyleVariants>> = keyof ReturnType<T>;
13
+ export type VariantProps<T extends ReturnType<typeof createStyle | typeof createStyleVariants>> = keyof ReturnType<T>;
14
14
  /**
15
15
  * Converts css `px` unit to `rem`.
16
16
  * Assumes the root font size is 16px.
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * Adds some global opinionated styles.
4
3
  */
5
- export declare function GlobalStyles(): JSX.Element;
4
+ export declare function GlobalStyles(): import("react/jsx-runtime").JSX.Element;
@@ -203,6 +203,7 @@ export declare const foundations: {
203
203
  md: string;
204
204
  lg: string;
205
205
  xl: string;
206
+ '2xl': string;
206
207
  full: string;
207
208
  };
208
209
  shadows: {
@@ -1,7 +1,7 @@
1
1
  export declare const radii: {
2
2
  /** 0px */
3
3
  none: string;
4
- /** 4px */
4
+ /** 6px */
5
5
  '2xs': string;
6
6
  /** 8px */
7
7
  xs: string;
@@ -13,6 +13,8 @@ export declare const radii: {
13
13
  lg: string;
14
14
  /** 32px */
15
15
  xl: string;
16
+ /** 48px */
17
+ '2xl': string;
16
18
  /** 9999px */
17
19
  full: string;
18
20
  };
@@ -1,13 +1,13 @@
1
1
  import type { PartialRecord } from '../types';
2
2
  import type { Theme } from './theme';
3
- declare type DeepPartial<T> = {
3
+ type DeepPartial<T> = {
4
4
  [P in keyof T]?: DeepPartial<T[P]>;
5
5
  };
6
6
  interface TypographyOverride {
7
7
  fontFamily?: string;
8
8
  fontWeight?: '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
9
9
  }
10
- declare type TypographyOverrides = PartialRecord<keyof Theme['typography'], TypographyOverride>;
10
+ type TypographyOverrides = PartialRecord<keyof Theme['typography'], TypographyOverride>;
11
11
  export interface ThemeOverrides {
12
12
  colors?: DeepPartial<Theme['colors']>;
13
13
  typography?: TypographyOverrides;
@@ -401,6 +401,7 @@ export declare const overrideTheme: (overrides: ThemeOverrides) => {
401
401
  md: string;
402
402
  lg: string;
403
403
  xl: string;
404
+ '2xl': string;
404
405
  full: string;
405
406
  };
406
407
  shadows: {
@@ -198,6 +198,7 @@ export declare const theme: {
198
198
  md: string;
199
199
  lg: string;
200
200
  xl: string;
201
+ '2xl': string;
201
202
  full: string;
202
203
  };
203
204
  shadows: {
@@ -397,4 +398,4 @@ export declare const theme: {
397
398
  };
398
399
  };
399
400
  };
400
- export declare type Theme = typeof theme;
401
+ export type Theme = typeof theme;
@@ -1,5 +1,5 @@
1
1
  import type { ComponentPropsWithoutRef, ElementType } from 'react';
2
- export declare type LegitimateAny = any;
3
- export declare type PartialRecord<K extends string | number | symbol, T> = Partial<Record<K, T>>;
4
- export declare type Merge<P1 = {}, P2 = {}> = Omit<P1, keyof P2> & P2;
5
- export declare type HTMLQdsProps<T extends ElementType> = ComponentPropsWithoutRef<T>;
2
+ export type LegitimateAny = any;
3
+ export type PartialRecord<K extends string | number | symbol, T> = Partial<Record<K, T>>;
4
+ export type Merge<P1 = {}, P2 = {}> = Omit<P1, keyof P2> & P2;
5
+ export type HTMLQdsProps<T extends ElementType> = ComponentPropsWithoutRef<T>;
@@ -1,4 +1,4 @@
1
- declare type Booleanish = boolean | 'true' | 'false';
1
+ type Booleanish = boolean | 'true' | 'false';
2
2
  export declare const dataAttr: (condition: boolean | undefined) => Booleanish;
3
3
  export declare const ariaAttr: (condition: boolean | undefined) => Booleanish;
4
4
  export {};
@@ -1,5 +1,5 @@
1
1
  import type { MutableRefObject, RefCallback } from 'react';
2
- declare type ReactRef<T> = RefCallback<T> | MutableRefObject<T>;
3
- declare type Maybe<T> = T | null | undefined;
2
+ type ReactRef<T> = RefCallback<T> | MutableRefObject<T>;
3
+ type Maybe<T> = T | null | undefined;
4
4
  export declare const mergeRefs: <T>(...refs: Maybe<ReactRef<T>>[]) => (node: T | null) => void;
5
5
  export {};
@@ -9,12 +9,12 @@ import type { Merge } from '../types';
9
9
  /**
10
10
  * Infers the OwnProps if E is a ForwardRefExoticComponentWithAs
11
11
  */
12
- declare type OwnProps<E> = E extends ForwardRefComponent<any, infer P> ? P : {};
12
+ type OwnProps<E> = E extends ForwardRefComponent<any, infer P> ? P : {};
13
13
  /**
14
14
  * Infers the JSX.IntrinsicElement if E is a ForwardRefExoticComponentWithAs
15
15
  */
16
- declare type IntrinsicElement<E> = E extends ForwardRefComponent<infer I, any> ? I : never;
17
- declare type ForwardRefExoticComponent<E, OwnProps> = React.ForwardRefExoticComponent<Merge<E extends React.ElementType ? React.ComponentPropsWithRef<E> : never, OwnProps & {
16
+ type IntrinsicElement<E> = E extends ForwardRefComponent<infer I, any> ? I : never;
17
+ type ForwardRefExoticComponent<E, OwnProps> = React.ForwardRefExoticComponent<Merge<E extends React.ElementType ? React.ComponentPropsWithRef<E> : never, OwnProps & {
18
18
  as?: E;
19
19
  }>>;
20
20
  interface ForwardRefComponent<IntrinsicElementString, OwnProps = {}> extends ForwardRefExoticComponent<IntrinsicElementString, OwnProps> {
@@ -37,5 +37,5 @@ interface ForwardRefComponent<IntrinsicElementString, OwnProps = {}> extends For
37
37
  /**
38
38
  * Infers the props of a React component
39
39
  */
40
- declare type PropsOf<E> = E extends React.ComponentType<infer P> ? P : never;
40
+ type PropsOf<E> = E extends React.ComponentType<infer P> ? P : never;
41
41
  export type { ForwardRefComponent, OwnProps, IntrinsicElement, PropsOf };