@qasa/qds-ui 0.12.0 → 0.13.0-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (229) hide show
  1. package/dist/index.d.mts +5416 -0
  2. package/dist/index.d.ts +1 -2
  3. package/dist/index.js +819 -0
  4. package/dist/index.js.map +1 -0
  5. package/dist/index.mjs +703 -0
  6. package/dist/index.mjs.map +1 -0
  7. package/package.json +14 -14
  8. package/dist/cjs/index.js +0 -9236
  9. package/dist/cjs/index.js.map +0 -1
  10. package/dist/cjs/types/components/_internal/form-parts.d.ts +0 -10
  11. package/dist/cjs/types/components/_internal/index.d.ts +0 -1
  12. package/dist/cjs/types/components/avatar/avatar.d.ts +0 -33
  13. package/dist/cjs/types/components/avatar/index.d.ts +0 -1
  14. package/dist/cjs/types/components/button/button-icon.d.ts +0 -10
  15. package/dist/cjs/types/components/button/button-styles.d.ts +0 -909
  16. package/dist/cjs/types/components/button/button-types.d.ts +0 -44
  17. package/dist/cjs/types/components/button/button.d.ts +0 -6
  18. package/dist/cjs/types/components/button/index.d.ts +0 -1
  19. package/dist/cjs/types/components/checkbox/checkbox.d.ts +0 -78
  20. package/dist/cjs/types/components/checkbox/index.d.ts +0 -1
  21. package/dist/cjs/types/components/display-text/display-text.d.ts +0 -30
  22. package/dist/cjs/types/components/display-text/index.d.ts +0 -1
  23. package/dist/cjs/types/components/divider/divider.d.ts +0 -14
  24. package/dist/cjs/types/components/divider/index.d.ts +0 -1
  25. package/dist/cjs/types/components/dropdown-menu/dropdown-menu-content.d.ts +0 -67
  26. package/dist/cjs/types/components/dropdown-menu/dropdown-menu-divider.d.ts +0 -4
  27. package/dist/cjs/types/components/dropdown-menu/dropdown-menu-item.d.ts +0 -28
  28. package/dist/cjs/types/components/dropdown-menu/dropdown-menu-trigger.d.ts +0 -5
  29. package/dist/cjs/types/components/dropdown-menu/dropdown-menu.d.ts +0 -29
  30. package/dist/cjs/types/components/dropdown-menu/index.d.ts +0 -1
  31. package/dist/cjs/types/components/heading/heading.d.ts +0 -32
  32. package/dist/cjs/types/components/heading/index.d.ts +0 -1
  33. package/dist/cjs/types/components/hint-box/hint-box.d.ts +0 -10
  34. package/dist/cjs/types/components/hint-box/index.d.ts +0 -1
  35. package/dist/cjs/types/components/icon/create-icon.d.ts +0 -41
  36. package/dist/cjs/types/components/icon/create-lucide-icon.d.ts +0 -4
  37. package/dist/cjs/types/components/icon/icon.types.d.ts +0 -22
  38. package/dist/cjs/types/components/icon/icons.d.ts +0 -48
  39. package/dist/cjs/types/components/icon/index.d.ts +0 -4
  40. package/dist/cjs/types/components/icon-button/icon-button-styles.d.ts +0 -882
  41. package/dist/cjs/types/components/icon-button/icon-button.d.ts +0 -32
  42. package/dist/cjs/types/components/icon-button/index.d.ts +0 -1
  43. package/dist/cjs/types/components/index.d.ts +0 -23
  44. package/dist/cjs/types/components/label/index.d.ts +0 -1
  45. package/dist/cjs/types/components/label/label.d.ts +0 -445
  46. package/dist/cjs/types/components/link/index.d.ts +0 -1
  47. package/dist/cjs/types/components/link/link.d.ts +0 -15
  48. package/dist/cjs/types/components/loading-dots/index.d.ts +0 -1
  49. package/dist/cjs/types/components/loading-dots/loading-dots.d.ts +0 -425
  50. package/dist/cjs/types/components/paragraph/index.d.ts +0 -1
  51. package/dist/cjs/types/components/paragraph/paragraph.d.ts +0 -476
  52. package/dist/cjs/types/components/primitives/index.d.ts +0 -3
  53. package/dist/cjs/types/components/primitives/input-base/index.d.ts +0 -1
  54. package/dist/cjs/types/components/primitives/input-base/input-base.d.ts +0 -21
  55. package/dist/cjs/types/components/primitives/select-base/index.d.ts +0 -1
  56. package/dist/cjs/types/components/primitives/select-base/select-base.d.ts +0 -30
  57. package/dist/cjs/types/components/primitives/textarea-base/index.d.ts +0 -1
  58. package/dist/cjs/types/components/primitives/textarea-base/textarea-base.d.ts +0 -36
  59. package/dist/cjs/types/components/radio-group/index.d.ts +0 -1
  60. package/dist/cjs/types/components/radio-group/radio-card.d.ts +0 -26
  61. package/dist/cjs/types/components/radio-group/radio-group-context.d.ts +0 -16
  62. package/dist/cjs/types/components/radio-group/radio-group-label.d.ts +0 -4
  63. package/dist/cjs/types/components/radio-group/radio-group.d.ts +0 -50
  64. package/dist/cjs/types/components/radio-group/radio-indicator.d.ts +0 -10
  65. package/dist/cjs/types/components/select/index.d.ts +0 -1
  66. package/dist/cjs/types/components/select/select-option.d.ts +0 -10
  67. package/dist/cjs/types/components/select/select.d.ts +0 -25
  68. package/dist/cjs/types/components/spacer/index.d.ts +0 -1
  69. package/dist/cjs/types/components/spacer/spacer.d.ts +0 -12
  70. package/dist/cjs/types/components/stack/index.d.ts +0 -1
  71. package/dist/cjs/types/components/stack/stack.d.ts +0 -44
  72. package/dist/cjs/types/components/stack/stack.types.d.ts +0 -4
  73. package/dist/cjs/types/components/stack/stack.utils.d.ts +0 -6
  74. package/dist/cjs/types/components/switch/index.d.ts +0 -1
  75. package/dist/cjs/types/components/switch/switch.d.ts +0 -35
  76. package/dist/cjs/types/components/text-field/index.d.ts +0 -1
  77. package/dist/cjs/types/components/text-field/text-field.d.ts +0 -32
  78. package/dist/cjs/types/components/textarea/index.d.ts +0 -1
  79. package/dist/cjs/types/components/textarea/textarea.d.ts +0 -27
  80. package/dist/cjs/types/components/toast/index.d.ts +0 -1
  81. package/dist/cjs/types/components/toast/toast-provider.d.ts +0 -4
  82. package/dist/cjs/types/components/toast/toast-store.d.ts +0 -44
  83. package/dist/cjs/types/components/toast/toast-styles.d.ts +0 -417
  84. package/dist/cjs/types/components/toast/toast.d.ts +0 -12
  85. package/dist/cjs/types/hooks/index.d.ts +0 -5
  86. package/dist/cjs/types/hooks/use-breakpoint-value.d.ts +0 -16
  87. package/dist/cjs/types/hooks/use-breakpoint.d.ts +0 -15
  88. package/dist/cjs/types/hooks/use-form-field.d.ts +0 -49
  89. package/dist/cjs/types/hooks/use-responsive-prop.d.ts +0 -16
  90. package/dist/cjs/types/hooks/use-safe-layout-effect.d.ts +0 -9
  91. package/dist/cjs/types/hooks/use-stable-id.d.ts +0 -4
  92. package/dist/cjs/types/i18n/locale-context.d.ts +0 -12
  93. package/dist/cjs/types/i18n/locales.d.ts +0 -8
  94. package/dist/cjs/types/i18n/use-translation.d.ts +0 -6
  95. package/dist/cjs/types/index.d.ts +0 -6
  96. package/dist/cjs/types/qds-provider.d.ts +0 -12
  97. package/dist/cjs/types/styles/common-styles.d.ts +0 -451
  98. package/dist/cjs/types/styles/css-reset.d.ts +0 -4
  99. package/dist/cjs/types/styles/css-utils.d.ts +0 -19
  100. package/dist/cjs/types/styles/global-styles.d.ts +0 -4
  101. package/dist/cjs/types/styles/index.d.ts +0 -3
  102. package/dist/cjs/types/theme/foundations/breakpoints.d.ts +0 -8
  103. package/dist/cjs/types/theme/foundations/colors.d.ts +0 -117
  104. package/dist/cjs/types/theme/foundations/index.d.ts +0 -411
  105. package/dist/cjs/types/theme/foundations/radius.d.ts +0 -20
  106. package/dist/cjs/types/theme/foundations/shadows.d.ts +0 -7
  107. package/dist/cjs/types/theme/foundations/sizes.d.ts +0 -34
  108. package/dist/cjs/types/theme/foundations/spacing.d.ts +0 -30
  109. package/dist/cjs/types/theme/foundations/typography.d.ts +0 -189
  110. package/dist/cjs/types/theme/foundations/z-index.d.ts +0 -28
  111. package/dist/cjs/types/theme/index.d.ts +0 -2
  112. package/dist/cjs/types/theme/theme-tools.d.ts +0 -421
  113. package/dist/cjs/types/theme/theme.d.ts +0 -407
  114. package/dist/cjs/types/types.d.ts +0 -5
  115. package/dist/cjs/types/utils/html-attributes.d.ts +0 -4
  116. package/dist/cjs/types/utils/merge-refs.d.ts +0 -5
  117. package/dist/cjs/types/utils/object.d.ts +0 -1
  118. package/dist/cjs/types/utils/polymorphic.d.ts +0 -41
  119. package/dist/esm/index.js +0 -9236
  120. package/dist/esm/index.js.map +0 -1
  121. package/dist/esm/types/components/_internal/form-parts.d.ts +0 -10
  122. package/dist/esm/types/components/_internal/index.d.ts +0 -1
  123. package/dist/esm/types/components/avatar/avatar.d.ts +0 -33
  124. package/dist/esm/types/components/avatar/index.d.ts +0 -1
  125. package/dist/esm/types/components/button/button-icon.d.ts +0 -10
  126. package/dist/esm/types/components/button/button-styles.d.ts +0 -909
  127. package/dist/esm/types/components/button/button-types.d.ts +0 -44
  128. package/dist/esm/types/components/button/button.d.ts +0 -6
  129. package/dist/esm/types/components/button/index.d.ts +0 -1
  130. package/dist/esm/types/components/checkbox/checkbox.d.ts +0 -78
  131. package/dist/esm/types/components/checkbox/index.d.ts +0 -1
  132. package/dist/esm/types/components/display-text/display-text.d.ts +0 -30
  133. package/dist/esm/types/components/display-text/index.d.ts +0 -1
  134. package/dist/esm/types/components/divider/divider.d.ts +0 -14
  135. package/dist/esm/types/components/divider/index.d.ts +0 -1
  136. package/dist/esm/types/components/dropdown-menu/dropdown-menu-content.d.ts +0 -67
  137. package/dist/esm/types/components/dropdown-menu/dropdown-menu-divider.d.ts +0 -4
  138. package/dist/esm/types/components/dropdown-menu/dropdown-menu-item.d.ts +0 -28
  139. package/dist/esm/types/components/dropdown-menu/dropdown-menu-trigger.d.ts +0 -5
  140. package/dist/esm/types/components/dropdown-menu/dropdown-menu.d.ts +0 -29
  141. package/dist/esm/types/components/dropdown-menu/index.d.ts +0 -1
  142. package/dist/esm/types/components/heading/heading.d.ts +0 -32
  143. package/dist/esm/types/components/heading/index.d.ts +0 -1
  144. package/dist/esm/types/components/hint-box/hint-box.d.ts +0 -10
  145. package/dist/esm/types/components/hint-box/index.d.ts +0 -1
  146. package/dist/esm/types/components/icon/create-icon.d.ts +0 -41
  147. package/dist/esm/types/components/icon/create-lucide-icon.d.ts +0 -4
  148. package/dist/esm/types/components/icon/icon.types.d.ts +0 -22
  149. package/dist/esm/types/components/icon/icons.d.ts +0 -48
  150. package/dist/esm/types/components/icon/index.d.ts +0 -4
  151. package/dist/esm/types/components/icon-button/icon-button-styles.d.ts +0 -882
  152. package/dist/esm/types/components/icon-button/icon-button.d.ts +0 -32
  153. package/dist/esm/types/components/icon-button/index.d.ts +0 -1
  154. package/dist/esm/types/components/index.d.ts +0 -23
  155. package/dist/esm/types/components/label/index.d.ts +0 -1
  156. package/dist/esm/types/components/label/label.d.ts +0 -445
  157. package/dist/esm/types/components/link/index.d.ts +0 -1
  158. package/dist/esm/types/components/link/link.d.ts +0 -15
  159. package/dist/esm/types/components/loading-dots/index.d.ts +0 -1
  160. package/dist/esm/types/components/loading-dots/loading-dots.d.ts +0 -425
  161. package/dist/esm/types/components/paragraph/index.d.ts +0 -1
  162. package/dist/esm/types/components/paragraph/paragraph.d.ts +0 -476
  163. package/dist/esm/types/components/primitives/index.d.ts +0 -3
  164. package/dist/esm/types/components/primitives/input-base/index.d.ts +0 -1
  165. package/dist/esm/types/components/primitives/input-base/input-base.d.ts +0 -21
  166. package/dist/esm/types/components/primitives/select-base/index.d.ts +0 -1
  167. package/dist/esm/types/components/primitives/select-base/select-base.d.ts +0 -30
  168. package/dist/esm/types/components/primitives/textarea-base/index.d.ts +0 -1
  169. package/dist/esm/types/components/primitives/textarea-base/textarea-base.d.ts +0 -36
  170. package/dist/esm/types/components/radio-group/index.d.ts +0 -1
  171. package/dist/esm/types/components/radio-group/radio-card.d.ts +0 -26
  172. package/dist/esm/types/components/radio-group/radio-group-context.d.ts +0 -16
  173. package/dist/esm/types/components/radio-group/radio-group-label.d.ts +0 -4
  174. package/dist/esm/types/components/radio-group/radio-group.d.ts +0 -50
  175. package/dist/esm/types/components/radio-group/radio-indicator.d.ts +0 -10
  176. package/dist/esm/types/components/select/index.d.ts +0 -1
  177. package/dist/esm/types/components/select/select-option.d.ts +0 -10
  178. package/dist/esm/types/components/select/select.d.ts +0 -25
  179. package/dist/esm/types/components/spacer/index.d.ts +0 -1
  180. package/dist/esm/types/components/spacer/spacer.d.ts +0 -12
  181. package/dist/esm/types/components/stack/index.d.ts +0 -1
  182. package/dist/esm/types/components/stack/stack.d.ts +0 -44
  183. package/dist/esm/types/components/stack/stack.types.d.ts +0 -4
  184. package/dist/esm/types/components/stack/stack.utils.d.ts +0 -6
  185. package/dist/esm/types/components/switch/index.d.ts +0 -1
  186. package/dist/esm/types/components/switch/switch.d.ts +0 -35
  187. package/dist/esm/types/components/text-field/index.d.ts +0 -1
  188. package/dist/esm/types/components/text-field/text-field.d.ts +0 -32
  189. package/dist/esm/types/components/textarea/index.d.ts +0 -1
  190. package/dist/esm/types/components/textarea/textarea.d.ts +0 -27
  191. package/dist/esm/types/components/toast/index.d.ts +0 -1
  192. package/dist/esm/types/components/toast/toast-provider.d.ts +0 -4
  193. package/dist/esm/types/components/toast/toast-store.d.ts +0 -44
  194. package/dist/esm/types/components/toast/toast-styles.d.ts +0 -417
  195. package/dist/esm/types/components/toast/toast.d.ts +0 -12
  196. package/dist/esm/types/hooks/index.d.ts +0 -5
  197. package/dist/esm/types/hooks/use-breakpoint-value.d.ts +0 -16
  198. package/dist/esm/types/hooks/use-breakpoint.d.ts +0 -15
  199. package/dist/esm/types/hooks/use-form-field.d.ts +0 -49
  200. package/dist/esm/types/hooks/use-responsive-prop.d.ts +0 -16
  201. package/dist/esm/types/hooks/use-safe-layout-effect.d.ts +0 -9
  202. package/dist/esm/types/hooks/use-stable-id.d.ts +0 -4
  203. package/dist/esm/types/i18n/locale-context.d.ts +0 -12
  204. package/dist/esm/types/i18n/locales.d.ts +0 -8
  205. package/dist/esm/types/i18n/use-translation.d.ts +0 -6
  206. package/dist/esm/types/index.d.ts +0 -6
  207. package/dist/esm/types/qds-provider.d.ts +0 -12
  208. package/dist/esm/types/styles/common-styles.d.ts +0 -451
  209. package/dist/esm/types/styles/css-reset.d.ts +0 -4
  210. package/dist/esm/types/styles/css-utils.d.ts +0 -19
  211. package/dist/esm/types/styles/global-styles.d.ts +0 -4
  212. package/dist/esm/types/styles/index.d.ts +0 -3
  213. package/dist/esm/types/theme/foundations/breakpoints.d.ts +0 -8
  214. package/dist/esm/types/theme/foundations/colors.d.ts +0 -117
  215. package/dist/esm/types/theme/foundations/index.d.ts +0 -411
  216. package/dist/esm/types/theme/foundations/radius.d.ts +0 -20
  217. package/dist/esm/types/theme/foundations/shadows.d.ts +0 -7
  218. package/dist/esm/types/theme/foundations/sizes.d.ts +0 -34
  219. package/dist/esm/types/theme/foundations/spacing.d.ts +0 -30
  220. package/dist/esm/types/theme/foundations/typography.d.ts +0 -189
  221. package/dist/esm/types/theme/foundations/z-index.d.ts +0 -28
  222. package/dist/esm/types/theme/index.d.ts +0 -2
  223. package/dist/esm/types/theme/theme-tools.d.ts +0 -421
  224. package/dist/esm/types/theme/theme.d.ts +0 -407
  225. package/dist/esm/types/types.d.ts +0 -5
  226. package/dist/esm/types/utils/html-attributes.d.ts +0 -4
  227. package/dist/esm/types/utils/merge-refs.d.ts +0 -5
  228. package/dist/esm/types/utils/object.d.ts +0 -1
  229. package/dist/esm/types/utils/polymorphic.d.ts +0 -41
@@ -1,12 +0,0 @@
1
- import * as ToastPrimitive from '@radix-ui/react-toast';
2
- import type { HTMLQdsProps } from '../../types';
3
- import type { ToastVariant } from './toast-styles';
4
- interface ToastOptions {
5
- text: string;
6
- variant?: ToastVariant;
7
- }
8
- type OmittedProps = 'children';
9
- interface ToastProps extends Omit<HTMLQdsProps<'div'>, OmittedProps>, ToastOptions {
10
- }
11
- export declare function Toast(props: ToastProps & ToastPrimitive.ToastProps): import("react/jsx-runtime").JSX.Element;
12
- export {};
@@ -1,5 +0,0 @@
1
- export * from './use-breakpoint';
2
- export * from './use-breakpoint-value';
3
- export * from './use-form-field';
4
- export * from './use-stable-id';
5
- export * from './use-safe-layout-effect';
@@ -1,16 +0,0 @@
1
- import type { Theme } from '../theme';
2
- import type { PartialRecord } from '../types';
3
- import type { UseBreakpointOptions } from './use-breakpoint';
4
- type Breakpoints = Theme['breakpoints'];
5
- type BreakpointsConfig<T> = PartialRecord<keyof Breakpoints, T> & {
6
- base: T;
7
- };
8
- export type UseBreakpointValueProps<T> = BreakpointsConfig<T>;
9
- /**
10
- * Hook for getting a value based on the current breakpoint.
11
- *
12
- * @example
13
- * const width = useBreakpointValue({ base: '150px', md: '250px' })
14
- */
15
- export declare function useBreakpointValue<T>(values: UseBreakpointValueProps<T>, options?: UseBreakpointOptions): T;
16
- export {};
@@ -1,15 +0,0 @@
1
- export interface UseBreakpointOptions {
2
- /**
3
- * If `true` the initial value will be `base` instead of the current breakpoint.
4
- * This is to support hydration when using server side rendering.
5
- *
6
- * @default false
7
- */
8
- ssr?: boolean;
9
- }
10
- /**
11
- * Hook for getting the current breakpoint.
12
- */
13
- export declare function useBreakpoint(params?: UseBreakpointOptions): {
14
- currentBreakpoint: "2xl" | "base" | "xl" | "lg" | "md" | "sm";
15
- };
@@ -1,49 +0,0 @@
1
- import type { ElementType } from 'react';
2
- import type { HTMLQdsProps, LegitimateAny } from '../types';
3
- type FormFieldElement = 'input' | 'select' | 'textarea';
4
- type PropGetter<T extends ElementType = LegitimateAny> = (props?: HTMLQdsProps<T>) => Record<string, unknown>;
5
- interface FormFieldOptions {
6
- /**
7
- * The label for the form field
8
- */
9
- label: string;
10
- /**
11
- * The error message to display if `isInvalid` is `true`
12
- */
13
- errorMessage?: string;
14
- /**
15
- * Text that provides additional guidance to the user
16
- */
17
- helperText?: string;
18
- /**
19
- * If `true`, the form field will be invalid
20
- */
21
- isInvalid?: boolean;
22
- /**
23
- * If `true`, the form field will be disabled
24
- */
25
- isDisabled?: boolean;
26
- /**
27
- * If `true` the form field will be required
28
- */
29
- isRequired?: boolean;
30
- }
31
- type OmittedProps = 'children' | 'readOnly' | 'size';
32
- export type UseFormFieldProps<T extends FormFieldElement> = Omit<HTMLQdsProps<T>, OmittedProps> & FormFieldOptions;
33
- /**
34
- * Custom hook that returns props for a form field's label, input, helper text and error message.
35
- * Meant to be used in conjunction with the `Input`, `Select` or `Textarea` component.
36
- *
37
- * Used internally by `TextField`, `Select` and `Textarea`.
38
- */
39
- export declare const useFormField: <T extends FormFieldElement>(props: UseFormFieldProps<T>) => {
40
- getLabelProps: PropGetter<"label">;
41
- /**
42
- * Props to be spread on the input, select or textarea element.
43
- * Function accepts an optional object of props to be merged with the returned props.
44
- */
45
- getFieldProps: PropGetter<T>;
46
- getHelperTextProps: PropGetter<"div">;
47
- getErrorMessageProps: PropGetter<"div">;
48
- };
49
- export {};
@@ -1,16 +0,0 @@
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 {};
@@ -1,9 +0,0 @@
1
- import { useLayoutEffect } from 'react';
2
- /**
3
- * On the server, React emits a warning when calling `useLayoutEffect`.
4
- * This is because neither `useLayoutEffect` nor `useEffect` run on the server.
5
- * We use this safe version which suppresses the warning by replacing it with a noop on the server.
6
- *
7
- * See: https://reactjs.org/docs/hooks-reference.html#uselayouteffect
8
- */
9
- export declare const useSafeLayoutEffect: typeof useLayoutEffect;
@@ -1,4 +0,0 @@
1
- /**
2
- * Returns a stable ID that is unique to the component instance.
3
- */
4
- export declare function useStableId(fixedId?: string | null): string;
@@ -1,12 +0,0 @@
1
- /// <reference types="react" />
2
- import type { LanguageCode } from './locales';
3
- interface LocaleContextValue {
4
- currentLanguage: LanguageCode;
5
- }
6
- interface LocaleProviderProps {
7
- language: LanguageCode;
8
- children: React.ReactNode;
9
- }
10
- export declare function LocaleProvider({ language, children }: LocaleProviderProps): import("react/jsx-runtime").JSX.Element;
11
- export declare function useLocale(): LocaleContextValue;
12
- export {};
@@ -1,8 +0,0 @@
1
- declare const SUPPORTED_LANGUAGE_CODES: readonly ["en", "sv", "fi", "fr"];
2
- export type LanguageCode = (typeof SUPPORTED_LANGUAGE_CODES)[number];
3
- export interface Resource {
4
- close: string;
5
- optional: string;
6
- }
7
- export declare const locales: Record<LanguageCode, Resource>;
8
- export {};
@@ -1,6 +0,0 @@
1
- import type { Resource } from './locales';
2
- type I18nKey = keyof Resource;
3
- export declare function useTranslation(): {
4
- t: (key: I18nKey) => string;
5
- };
6
- export {};
@@ -1,6 +0,0 @@
1
- export { QdsProvider } from './qds-provider';
2
- export * from './components';
3
- export * from './styles';
4
- export * from './theme';
5
- export * from './hooks';
6
- export * from './utils/polymorphic';
@@ -1,12 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- import type { Options as EmotionCacheOptions } from '@emotion/cache';
3
- import type { ThemeOverrides } from './theme';
4
- import type { LanguageCode } from './i18n/locales';
5
- interface QdsProviderProps {
6
- children: ReactNode;
7
- themeOverrides?: ThemeOverrides;
8
- cacheOptions?: Partial<EmotionCacheOptions>;
9
- locale: LanguageCode;
10
- }
11
- export declare function QdsProvider({ children, themeOverrides, cacheOptions, locale }: QdsProviderProps): import("react/jsx-runtime").JSX.Element;
12
- export {};
@@ -1,451 +0,0 @@
1
- export declare const getFormFieldBaseStyles: (theme: {
2
- mediaQueries: {
3
- readonly smUp: "@media(min-width: 480px)";
4
- readonly mdUp: "@media(min-width: 768px)";
5
- readonly lgUp: "@media(min-width: 1024px)";
6
- readonly xlUp: "@media(min-width: 1280px)";
7
- readonly '2xlUp': "@media(min-width: 1536px)";
8
- };
9
- spacing: {
10
- '0x': string;
11
- '1x': string;
12
- '2x': string;
13
- '3x': string;
14
- '4x': string;
15
- '5x': string;
16
- '6x': string;
17
- '8x': string;
18
- '10x': string;
19
- '12x': string;
20
- '14x': string;
21
- '16x': string;
22
- '20x': string;
23
- '24x': string;
24
- };
25
- breakpoints: {
26
- readonly base: 0;
27
- readonly sm: 480;
28
- readonly md: 768;
29
- readonly lg: 1024;
30
- readonly xl: 1280;
31
- readonly '2xl': 1536;
32
- };
33
- zIndices: {
34
- hide: number;
35
- auto: string;
36
- base: number;
37
- docked: number;
38
- dropdown: number;
39
- sticky: number;
40
- banner: number;
41
- overlay: number;
42
- modal: number;
43
- popover: number;
44
- skipLink: number;
45
- toast: number;
46
- tooltip: number;
47
- };
48
- colors: {
49
- core: {
50
- black: string;
51
- white: string;
52
- gray90: string;
53
- gray80: string;
54
- gray70: string;
55
- gray60: string;
56
- gray50: string;
57
- gray40: string;
58
- gray30: string;
59
- gray20: string;
60
- gray10: string;
61
- pink: string;
62
- uiPink: string;
63
- uiPinkDark: string;
64
- uiPinkLight: string;
65
- brown: string;
66
- brownDark: string;
67
- brownLight: string;
68
- offWhite: string;
69
- offWhiteDark: string;
70
- offWhiteLight: string;
71
- softPink: string;
72
- warmYellow: string;
73
- softYellow: string;
74
- red90: string;
75
- red80: string;
76
- red70: string;
77
- red60: string;
78
- red50: string;
79
- red40: string;
80
- red30: string;
81
- red20: string;
82
- red10: string;
83
- green90: string;
84
- green80: string;
85
- green70: string;
86
- green60: string;
87
- green50: string;
88
- green40: string;
89
- green30: string;
90
- green20: string;
91
- green10: string;
92
- blue90: string;
93
- blue80: string;
94
- blue70: string;
95
- blue60: string;
96
- blue50: string;
97
- blue40: string;
98
- blue30: string;
99
- blue20: string;
100
- blue10: string;
101
- yellow90: string;
102
- yellow80: string;
103
- yellow70: string;
104
- yellow60: string;
105
- yellow50: string;
106
- yellow40: string;
107
- yellow30: string;
108
- yellow20: string;
109
- yellow10: string;
110
- blackAlpha5: string;
111
- blackAlpha20: string;
112
- };
113
- bg: {
114
- default: string;
115
- brandPrimary: string;
116
- brandPrimaryHover: string;
117
- brandPrimaryActive: string;
118
- brandSecondary: string;
119
- brandSecondaryHover: string;
120
- brandSecondaryActive: string;
121
- brandTertiary: string;
122
- brandTertiaryHover: string;
123
- brandTertiaryActive: string;
124
- negative: string;
125
- warning: string;
126
- positive: string;
127
- inset: string;
128
- backdrop: string;
129
- };
130
- text: {
131
- strong: string;
132
- default: string;
133
- subtle: string;
134
- disabled: string;
135
- negative: string;
136
- warning: string;
137
- positive: string;
138
- onBrandPrimary: string;
139
- onBrandSecondary: string;
140
- onBrandTertiary: string;
141
- };
142
- icon: {
143
- default: string;
144
- strong: string;
145
- subtle: string;
146
- disabled: string;
147
- negative: string;
148
- warning: string;
149
- positive: string;
150
- onBrandPrimary: string;
151
- onBrandSecondary: string;
152
- onBrandTertiary: string;
153
- };
154
- border: {
155
- default: string;
156
- defaultHover: string;
157
- defaultSelected: string;
158
- strong: string;
159
- subtle: string;
160
- negative: string;
161
- warning: string;
162
- positive: string;
163
- };
164
- };
165
- sizes: {
166
- 112: string;
167
- 128: string;
168
- 144: string;
169
- 160: string;
170
- 176: string;
171
- 192: string;
172
- 224: string;
173
- 256: string;
174
- 288: string;
175
- 320: string;
176
- 384: string;
177
- 448: string;
178
- 512: string;
179
- 576: string;
180
- 672: string;
181
- 768: string;
182
- 896: string;
183
- 1024: string;
184
- '0x': string;
185
- '1x': string;
186
- '2x': string;
187
- '3x': string;
188
- '4x': string;
189
- '5x': string;
190
- '6x': string;
191
- '8x': string;
192
- '10x': string;
193
- '12x': string;
194
- '14x': string;
195
- '16x': string;
196
- '20x': string;
197
- '24x': string;
198
- };
199
- radii: {
200
- none: string;
201
- '2xs': string;
202
- xs: string;
203
- sm: string;
204
- md: string;
205
- lg: string;
206
- xl: string;
207
- '2xl': string;
208
- full: string;
209
- };
210
- shadows: {
211
- none: string;
212
- sm: string;
213
- md: string;
214
- lg: string;
215
- xl: string;
216
- };
217
- typography: {
218
- display: {
219
- '3xl': {
220
- fontFamily: string;
221
- fontWeight: string;
222
- fontSize: string;
223
- lineHeight: string;
224
- letterSpacing: string;
225
- fontFeatureSettings: string;
226
- };
227
- '2xl': {
228
- fontFamily: string;
229
- fontWeight: string;
230
- fontSize: string;
231
- lineHeight: string;
232
- letterSpacing: string;
233
- fontFeatureSettings: string;
234
- };
235
- xl: {
236
- fontFamily: string;
237
- fontWeight: string;
238
- fontSize: string;
239
- lineHeight: string;
240
- letterSpacing: string;
241
- fontFeatureSettings: string;
242
- };
243
- lg: {
244
- fontFamily: string;
245
- fontWeight: string;
246
- fontSize: string;
247
- lineHeight: string;
248
- letterSpacing: string;
249
- fontFeatureSettings: string;
250
- };
251
- md: {
252
- fontFamily: string;
253
- fontWeight: string;
254
- fontSize: string;
255
- lineHeight: string;
256
- letterSpacing: string;
257
- fontFeatureSettings: string;
258
- };
259
- sm: {
260
- fontFamily: string;
261
- fontWeight: string;
262
- fontSize: string;
263
- lineHeight: string;
264
- letterSpacing: string;
265
- fontFeatureSettings: string;
266
- };
267
- xs: {
268
- fontFamily: string;
269
- fontWeight: string;
270
- fontSize: string;
271
- lineHeight: string;
272
- letterSpacing: string;
273
- fontFeatureSettings: string;
274
- };
275
- };
276
- title: {
277
- lg: {
278
- fontFamily: string;
279
- fontWeight: string;
280
- fontSize: string;
281
- lineHeight: string;
282
- letterSpacing: string;
283
- };
284
- md: {
285
- fontFamily: string;
286
- fontWeight: string;
287
- fontSize: string;
288
- lineHeight: string;
289
- letterSpacing: string;
290
- };
291
- sm: {
292
- fontFamily: string;
293
- fontWeight: string;
294
- fontSize: string;
295
- lineHeight: string;
296
- letterSpacing: string;
297
- };
298
- xs: {
299
- fontFamily: string;
300
- fontWeight: string;
301
- fontSize: string;
302
- lineHeight: string;
303
- letterSpacing: string;
304
- };
305
- '2xs': {
306
- fontFamily: string;
307
- fontWeight: string;
308
- fontSize: string;
309
- lineHeight: string;
310
- letterSpacing: string;
311
- };
312
- '3xs': {
313
- fontFamily: string;
314
- fontWeight: string;
315
- fontSize: string;
316
- lineHeight: string;
317
- letterSpacing: string;
318
- };
319
- };
320
- body: {
321
- xl: {
322
- fontFamily: string;
323
- fontWeight: string;
324
- fontSize: string;
325
- lineHeight: string;
326
- letterSpacing: string;
327
- };
328
- lg: {
329
- fontFamily: string;
330
- fontWeight: string;
331
- fontSize: string;
332
- lineHeight: string;
333
- letterSpacing: string;
334
- };
335
- md: {
336
- fontFamily: string;
337
- fontWeight: string;
338
- fontSize: string;
339
- lineHeight: string;
340
- letterSpacing: string;
341
- };
342
- sm: {
343
- fontFamily: string;
344
- fontWeight: string;
345
- fontSize: string;
346
- lineHeight: string;
347
- letterSpacing: string;
348
- };
349
- xs: {
350
- fontFamily: string;
351
- fontWeight: string;
352
- fontSize: string;
353
- lineHeight: string;
354
- letterSpacing: string;
355
- };
356
- };
357
- label: {
358
- md: {
359
- fontFamily: string;
360
- fontWeight: string;
361
- fontSize: string;
362
- lineHeight: string;
363
- letterSpacing: string;
364
- };
365
- sm: {
366
- fontFamily: string;
367
- fontWeight: string;
368
- fontSize: string;
369
- lineHeight: string;
370
- letterSpacing: string;
371
- };
372
- };
373
- button: {
374
- md: {
375
- fontFamily: string;
376
- fontWeight: string;
377
- fontSize: string;
378
- lineHeight: string;
379
- letterSpacing: string;
380
- };
381
- sm: {
382
- fontFamily: string;
383
- fontWeight: string;
384
- fontSize: string;
385
- lineHeight: string;
386
- letterSpacing: string;
387
- };
388
- };
389
- caption: {
390
- md: {
391
- fontFamily: string;
392
- fontWeight: string;
393
- fontSize: string;
394
- lineHeight: string;
395
- letterSpacing: string;
396
- };
397
- sm: {
398
- fontFamily: string;
399
- fontWeight: string;
400
- fontSize: string;
401
- lineHeight: string;
402
- letterSpacing: string;
403
- };
404
- };
405
- };
406
- }) => {
407
- '&::placeholder': {
408
- color: string;
409
- };
410
- '&:hover': {
411
- borderColor: string;
412
- };
413
- '&:focus': {
414
- outline: number;
415
- borderColor: string;
416
- boxShadow: `0 0 0 1px ${string}`;
417
- };
418
- '&[aria-invalid="true"]': {
419
- borderColor: string;
420
- '&:focus': {
421
- boxShadow: `0 0 0 1px ${string}`;
422
- };
423
- };
424
- '&[disabled], &:disabled, &[data-disabled]': {
425
- opacity: number;
426
- borderColor: string;
427
- };
428
- transitionProperty: "opacity, border-color, box-shadow";
429
- transitionDuration: "120ms";
430
- transitionTimingFunction: "ease";
431
- fontFamily: string;
432
- fontWeight: string;
433
- fontSize: string;
434
- lineHeight: string;
435
- letterSpacing: string;
436
- width: string;
437
- minWidth: number;
438
- appearance: "none";
439
- paddingLeft: string;
440
- paddingRight: string;
441
- border: string;
442
- borderRadius: string;
443
- backgroundColor: string;
444
- color: string;
445
- WebkitTouchCallout: "none";
446
- WebkitTapHighlightColor: "transparent";
447
- '&::-webkit-date-and-time-value': {
448
- textAlign: "left";
449
- };
450
- alignItems: "center";
451
- };
@@ -1,4 +0,0 @@
1
- /**
2
- * A CSS Reset (opinionated)
3
- */
4
- export declare function CSSReset(): import("react/jsx-runtime").JSX.Element;
@@ -1,19 +0,0 @@
1
- import type { CSSObject } from '@emotion/react';
2
- import type { Theme } from '../theme';
3
- type NamedStyles = Record<string, CSSObject>;
4
- type StyleInterpolation<T> = (theme: Theme) => T;
5
- /**
6
- * Creates a collection of named style rules.
7
- */
8
- export declare function createStyleVariants<T extends NamedStyles>(styles: StyleInterpolation<T>): (theme: Theme) => T;
9
- /**
10
- * Create a style object. Useful for creating styles that depend on the theme.
11
- */
12
- export declare function createStyle<T extends CSSObject>(styles: StyleInterpolation<T>): (theme: Theme) => T;
13
- export type VariantProps<T extends ReturnType<typeof createStyle | typeof createStyleVariants>> = keyof ReturnType<T>;
14
- /**
15
- * Converts css `px` unit to `rem`.
16
- * Assumes the root font size is 16px.
17
- */
18
- export declare const pxToRem: (px: number) => string;
19
- export {};
@@ -1,4 +0,0 @@
1
- /**
2
- * Adds some global opinionated styles.
3
- */
4
- export declare function GlobalStyles(): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +0,0 @@
1
- export * from './global-styles';
2
- export * from './css-utils';
3
- export * from './common-styles';
@@ -1,8 +0,0 @@
1
- export declare const breakpoints: {
2
- readonly base: 0;
3
- readonly sm: 480;
4
- readonly md: 768;
5
- readonly lg: 1024;
6
- readonly xl: 1280;
7
- readonly '2xl': 1536;
8
- };