@qasa/qds-ui 0.1.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 (217) hide show
  1. package/README.md +17 -0
  2. package/dist/cjs/index.js +2 -0
  3. package/dist/cjs/index.js.map +1 -0
  4. package/dist/cjs/types/components/_internal/form-parts.d.ts +13 -0
  5. package/dist/cjs/types/components/_internal/index.d.ts +1 -0
  6. package/dist/cjs/types/components/avatar/avatar.d.ts +30 -0
  7. package/dist/cjs/types/components/avatar/index.d.ts +1 -0
  8. package/dist/cjs/types/components/button/button-styles.d.ts +755 -0
  9. package/dist/cjs/types/components/button/button.d.ts +41 -0
  10. package/dist/cjs/types/components/button/index.d.ts +1 -0
  11. package/dist/cjs/types/components/divider/divider.d.ts +14 -0
  12. package/dist/cjs/types/components/divider/index.d.ts +1 -0
  13. package/dist/cjs/types/components/heading/heading.d.ts +403 -0
  14. package/dist/cjs/types/components/heading/index.d.ts +1 -0
  15. package/dist/cjs/types/components/icon/create-icon.d.ts +409 -0
  16. package/dist/cjs/types/components/icon/icons/arrow-down.d.ts +2 -0
  17. package/dist/cjs/types/components/icon/icons/arrow-left.d.ts +2 -0
  18. package/dist/cjs/types/components/icon/icons/arrow-right.d.ts +2 -0
  19. package/dist/cjs/types/components/icon/icons/arrow-up.d.ts +2 -0
  20. package/dist/cjs/types/components/icon/icons/bell-slash.d.ts +2 -0
  21. package/dist/cjs/types/components/icon/icons/bell.d.ts +2 -0
  22. package/dist/cjs/types/components/icon/icons/calendar.d.ts +2 -0
  23. package/dist/cjs/types/components/icon/icons/check.d.ts +2 -0
  24. package/dist/cjs/types/components/icon/icons/chevron-down.d.ts +2 -0
  25. package/dist/cjs/types/components/icon/icons/chevron-left.d.ts +2 -0
  26. package/dist/cjs/types/components/icon/icons/chevron-right.d.ts +2 -0
  27. package/dist/cjs/types/components/icon/icons/chevron-up.d.ts +2 -0
  28. package/dist/cjs/types/components/icon/icons/ellipsis-vertical.d.ts +2 -0
  29. package/dist/cjs/types/components/icon/icons/ellipsis.d.ts +2 -0
  30. package/dist/cjs/types/components/icon/icons/heart-filled.d.ts +2 -0
  31. package/dist/cjs/types/components/icon/icons/heart.d.ts +2 -0
  32. package/dist/cjs/types/components/icon/icons/image.d.ts +2 -0
  33. package/dist/cjs/types/components/icon/icons/index.d.ts +27 -0
  34. package/dist/cjs/types/components/icon/icons/location-dot.d.ts +2 -0
  35. package/dist/cjs/types/components/icon/icons/map.d.ts +2 -0
  36. package/dist/cjs/types/components/icon/icons/plus.d.ts +2 -0
  37. package/dist/cjs/types/components/icon/icons/search.d.ts +2 -0
  38. package/dist/cjs/types/components/icon/icons/settings.d.ts +2 -0
  39. package/dist/cjs/types/components/icon/icons/star-filled.d.ts +2 -0
  40. package/dist/cjs/types/components/icon/icons/star.d.ts +2 -0
  41. package/dist/cjs/types/components/icon/icons/trash.d.ts +2 -0
  42. package/dist/cjs/types/components/icon/icons/user.d.ts +2 -0
  43. package/dist/cjs/types/components/icon/icons/xmark.d.ts +2 -0
  44. package/dist/cjs/types/components/icon/index.d.ts +2 -0
  45. package/dist/cjs/types/components/icon-button/icon-button-styles.d.ts +735 -0
  46. package/dist/cjs/types/components/icon-button/icon-button.d.ts +31 -0
  47. package/dist/cjs/types/components/icon-button/index.d.ts +1 -0
  48. package/dist/cjs/types/components/image/image.d.ts +16 -0
  49. package/dist/cjs/types/components/image/index.d.ts +1 -0
  50. package/dist/cjs/types/components/index.d.ts +17 -0
  51. package/dist/cjs/types/components/label/index.d.ts +1 -0
  52. package/dist/cjs/types/components/label/label.d.ts +358 -0
  53. package/dist/cjs/types/components/link/index.d.ts +1 -0
  54. package/dist/cjs/types/components/link/link.d.ts +15 -0
  55. package/dist/cjs/types/components/loading-dots/index.d.ts +1 -0
  56. package/dist/cjs/types/components/loading-dots/loading-dots.d.ts +348 -0
  57. package/dist/cjs/types/components/paragraph/index.d.ts +1 -0
  58. package/dist/cjs/types/components/paragraph/paragraph.d.ts +402 -0
  59. package/dist/cjs/types/components/primitives/index.d.ts +3 -0
  60. package/dist/cjs/types/components/primitives/input-base/index.d.ts +1 -0
  61. package/dist/cjs/types/components/primitives/input-base/input-base.d.ts +21 -0
  62. package/dist/cjs/types/components/primitives/select-base/index.d.ts +1 -0
  63. package/dist/cjs/types/components/primitives/select-base/select-base.d.ts +30 -0
  64. package/dist/cjs/types/components/primitives/textarea-base/index.d.ts +1 -0
  65. package/dist/cjs/types/components/primitives/textarea-base/textarea-base.d.ts +36 -0
  66. package/dist/cjs/types/components/select/index.d.ts +1 -0
  67. package/dist/cjs/types/components/select/select-option.d.ts +10 -0
  68. package/dist/cjs/types/components/select/select.d.ts +25 -0
  69. package/dist/cjs/types/components/spacer/index.d.ts +1 -0
  70. package/dist/cjs/types/components/spacer/spacer.d.ts +11 -0
  71. package/dist/cjs/types/components/stack/index.d.ts +1 -0
  72. package/dist/cjs/types/components/stack/stack.d.ts +17 -0
  73. package/dist/cjs/types/components/stack/stack.types.d.ts +4 -0
  74. package/dist/cjs/types/components/stack/stack.utils.d.ts +6 -0
  75. package/dist/cjs/types/components/text-field/index.d.ts +1 -0
  76. package/dist/cjs/types/components/text-field/text-field.d.ts +22 -0
  77. package/dist/cjs/types/components/textarea/index.d.ts +1 -0
  78. package/dist/cjs/types/components/textarea/textarea.d.ts +22 -0
  79. package/dist/cjs/types/hooks/index.d.ts +6 -0
  80. package/dist/cjs/types/hooks/use-breakpoint-value.d.ts +16 -0
  81. package/dist/cjs/types/hooks/use-breakpoint.d.ts +17 -0
  82. package/dist/cjs/types/hooks/use-form-field.d.ts +49 -0
  83. package/dist/cjs/types/hooks/use-image.d.ts +10 -0
  84. package/dist/cjs/types/hooks/use-safe-layout-effect.d.ts +9 -0
  85. package/dist/cjs/types/hooks/use-stable-id.d.ts +4 -0
  86. package/dist/cjs/types/index.d.ts +6 -0
  87. package/dist/cjs/types/qds-provider.d.ts +8 -0
  88. package/dist/cjs/types/styles/common-styles.d.ts +369 -0
  89. package/dist/cjs/types/styles/css-reset.d.ts +5 -0
  90. package/dist/cjs/types/styles/css-utils.d.ts +19 -0
  91. package/dist/cjs/types/styles/global-styles.d.ts +5 -0
  92. package/dist/cjs/types/styles/index.d.ts +3 -0
  93. package/dist/cjs/types/theme/foundations/breakpoints.d.ts +8 -0
  94. package/dist/cjs/types/theme/foundations/colors.d.ts +107 -0
  95. package/dist/cjs/types/theme/foundations/index.d.ts +335 -0
  96. package/dist/cjs/types/theme/foundations/radius.d.ts +9 -0
  97. package/dist/cjs/types/theme/foundations/shadows.d.ts +7 -0
  98. package/dist/cjs/types/theme/foundations/sizes.d.ts +32 -0
  99. package/dist/cjs/types/theme/foundations/spacing.d.ts +14 -0
  100. package/dist/cjs/types/theme/foundations/typography.d.ts +131 -0
  101. package/dist/cjs/types/theme/foundations/z-index.d.ts +15 -0
  102. package/dist/cjs/types/theme/index.d.ts +2 -0
  103. package/dist/cjs/types/theme/theme-tools.d.ts +345 -0
  104. package/dist/cjs/types/theme/theme.d.ts +331 -0
  105. package/dist/cjs/types/types.d.ts +5 -0
  106. package/dist/cjs/types/utils/object.d.ts +1 -0
  107. package/dist/cjs/types/utils/polymorphic.d.ts +41 -0
  108. package/dist/cjs/types/utils/test-utils.d.ts +14 -0
  109. package/dist/esm/index.js +2 -0
  110. package/dist/esm/index.js.map +1 -0
  111. package/dist/esm/types/components/_internal/form-parts.d.ts +13 -0
  112. package/dist/esm/types/components/_internal/index.d.ts +1 -0
  113. package/dist/esm/types/components/avatar/avatar.d.ts +30 -0
  114. package/dist/esm/types/components/avatar/index.d.ts +1 -0
  115. package/dist/esm/types/components/button/button-styles.d.ts +755 -0
  116. package/dist/esm/types/components/button/button.d.ts +41 -0
  117. package/dist/esm/types/components/button/index.d.ts +1 -0
  118. package/dist/esm/types/components/divider/divider.d.ts +14 -0
  119. package/dist/esm/types/components/divider/index.d.ts +1 -0
  120. package/dist/esm/types/components/heading/heading.d.ts +403 -0
  121. package/dist/esm/types/components/heading/index.d.ts +1 -0
  122. package/dist/esm/types/components/icon/create-icon.d.ts +409 -0
  123. package/dist/esm/types/components/icon/icons/arrow-down.d.ts +2 -0
  124. package/dist/esm/types/components/icon/icons/arrow-left.d.ts +2 -0
  125. package/dist/esm/types/components/icon/icons/arrow-right.d.ts +2 -0
  126. package/dist/esm/types/components/icon/icons/arrow-up.d.ts +2 -0
  127. package/dist/esm/types/components/icon/icons/bell-slash.d.ts +2 -0
  128. package/dist/esm/types/components/icon/icons/bell.d.ts +2 -0
  129. package/dist/esm/types/components/icon/icons/calendar.d.ts +2 -0
  130. package/dist/esm/types/components/icon/icons/check.d.ts +2 -0
  131. package/dist/esm/types/components/icon/icons/chevron-down.d.ts +2 -0
  132. package/dist/esm/types/components/icon/icons/chevron-left.d.ts +2 -0
  133. package/dist/esm/types/components/icon/icons/chevron-right.d.ts +2 -0
  134. package/dist/esm/types/components/icon/icons/chevron-up.d.ts +2 -0
  135. package/dist/esm/types/components/icon/icons/ellipsis-vertical.d.ts +2 -0
  136. package/dist/esm/types/components/icon/icons/ellipsis.d.ts +2 -0
  137. package/dist/esm/types/components/icon/icons/heart-filled.d.ts +2 -0
  138. package/dist/esm/types/components/icon/icons/heart.d.ts +2 -0
  139. package/dist/esm/types/components/icon/icons/image.d.ts +2 -0
  140. package/dist/esm/types/components/icon/icons/index.d.ts +27 -0
  141. package/dist/esm/types/components/icon/icons/location-dot.d.ts +2 -0
  142. package/dist/esm/types/components/icon/icons/map.d.ts +2 -0
  143. package/dist/esm/types/components/icon/icons/plus.d.ts +2 -0
  144. package/dist/esm/types/components/icon/icons/search.d.ts +2 -0
  145. package/dist/esm/types/components/icon/icons/settings.d.ts +2 -0
  146. package/dist/esm/types/components/icon/icons/star-filled.d.ts +2 -0
  147. package/dist/esm/types/components/icon/icons/star.d.ts +2 -0
  148. package/dist/esm/types/components/icon/icons/trash.d.ts +2 -0
  149. package/dist/esm/types/components/icon/icons/user.d.ts +2 -0
  150. package/dist/esm/types/components/icon/icons/xmark.d.ts +2 -0
  151. package/dist/esm/types/components/icon/index.d.ts +2 -0
  152. package/dist/esm/types/components/icon-button/icon-button-styles.d.ts +735 -0
  153. package/dist/esm/types/components/icon-button/icon-button.d.ts +31 -0
  154. package/dist/esm/types/components/icon-button/index.d.ts +1 -0
  155. package/dist/esm/types/components/image/image.d.ts +16 -0
  156. package/dist/esm/types/components/image/index.d.ts +1 -0
  157. package/dist/esm/types/components/index.d.ts +17 -0
  158. package/dist/esm/types/components/label/index.d.ts +1 -0
  159. package/dist/esm/types/components/label/label.d.ts +358 -0
  160. package/dist/esm/types/components/link/index.d.ts +1 -0
  161. package/dist/esm/types/components/link/link.d.ts +15 -0
  162. package/dist/esm/types/components/loading-dots/index.d.ts +1 -0
  163. package/dist/esm/types/components/loading-dots/loading-dots.d.ts +348 -0
  164. package/dist/esm/types/components/paragraph/index.d.ts +1 -0
  165. package/dist/esm/types/components/paragraph/paragraph.d.ts +402 -0
  166. package/dist/esm/types/components/primitives/index.d.ts +3 -0
  167. package/dist/esm/types/components/primitives/input-base/index.d.ts +1 -0
  168. package/dist/esm/types/components/primitives/input-base/input-base.d.ts +21 -0
  169. package/dist/esm/types/components/primitives/select-base/index.d.ts +1 -0
  170. package/dist/esm/types/components/primitives/select-base/select-base.d.ts +30 -0
  171. package/dist/esm/types/components/primitives/textarea-base/index.d.ts +1 -0
  172. package/dist/esm/types/components/primitives/textarea-base/textarea-base.d.ts +36 -0
  173. package/dist/esm/types/components/select/index.d.ts +1 -0
  174. package/dist/esm/types/components/select/select-option.d.ts +10 -0
  175. package/dist/esm/types/components/select/select.d.ts +25 -0
  176. package/dist/esm/types/components/spacer/index.d.ts +1 -0
  177. package/dist/esm/types/components/spacer/spacer.d.ts +11 -0
  178. package/dist/esm/types/components/stack/index.d.ts +1 -0
  179. package/dist/esm/types/components/stack/stack.d.ts +17 -0
  180. package/dist/esm/types/components/stack/stack.types.d.ts +4 -0
  181. package/dist/esm/types/components/stack/stack.utils.d.ts +6 -0
  182. package/dist/esm/types/components/text-field/index.d.ts +1 -0
  183. package/dist/esm/types/components/text-field/text-field.d.ts +22 -0
  184. package/dist/esm/types/components/textarea/index.d.ts +1 -0
  185. package/dist/esm/types/components/textarea/textarea.d.ts +22 -0
  186. package/dist/esm/types/hooks/index.d.ts +6 -0
  187. package/dist/esm/types/hooks/use-breakpoint-value.d.ts +16 -0
  188. package/dist/esm/types/hooks/use-breakpoint.d.ts +17 -0
  189. package/dist/esm/types/hooks/use-form-field.d.ts +49 -0
  190. package/dist/esm/types/hooks/use-image.d.ts +10 -0
  191. package/dist/esm/types/hooks/use-safe-layout-effect.d.ts +9 -0
  192. package/dist/esm/types/hooks/use-stable-id.d.ts +4 -0
  193. package/dist/esm/types/index.d.ts +6 -0
  194. package/dist/esm/types/qds-provider.d.ts +8 -0
  195. package/dist/esm/types/styles/common-styles.d.ts +369 -0
  196. package/dist/esm/types/styles/css-reset.d.ts +5 -0
  197. package/dist/esm/types/styles/css-utils.d.ts +19 -0
  198. package/dist/esm/types/styles/global-styles.d.ts +5 -0
  199. package/dist/esm/types/styles/index.d.ts +3 -0
  200. package/dist/esm/types/theme/foundations/breakpoints.d.ts +8 -0
  201. package/dist/esm/types/theme/foundations/colors.d.ts +107 -0
  202. package/dist/esm/types/theme/foundations/index.d.ts +335 -0
  203. package/dist/esm/types/theme/foundations/radius.d.ts +9 -0
  204. package/dist/esm/types/theme/foundations/shadows.d.ts +7 -0
  205. package/dist/esm/types/theme/foundations/sizes.d.ts +32 -0
  206. package/dist/esm/types/theme/foundations/spacing.d.ts +14 -0
  207. package/dist/esm/types/theme/foundations/typography.d.ts +131 -0
  208. package/dist/esm/types/theme/foundations/z-index.d.ts +15 -0
  209. package/dist/esm/types/theme/index.d.ts +2 -0
  210. package/dist/esm/types/theme/theme-tools.d.ts +345 -0
  211. package/dist/esm/types/theme/theme.d.ts +331 -0
  212. package/dist/esm/types/types.d.ts +5 -0
  213. package/dist/esm/types/utils/object.d.ts +1 -0
  214. package/dist/esm/types/utils/polymorphic.d.ts +41 -0
  215. package/dist/esm/types/utils/test-utils.d.ts +14 -0
  216. package/dist/index.d.ts +4978 -0
  217. package/package.json +103 -0
@@ -0,0 +1,17 @@
1
+ export interface UseBreakpointOptions {
2
+ /**
3
+ * If `true` the intital value will be `base` instead of the current breakpoint.
4
+ * This is to support hydration when using SSR.
5
+ *
6
+ * If you're creating a client-side rendered app, you can pass `false` to get the correct value on the first render.
7
+ *
8
+ * @default true
9
+ */
10
+ ssr?: boolean;
11
+ }
12
+ /**
13
+ * Hook for getting the current breakpoint.
14
+ */
15
+ export declare function useBreakpoint(params?: UseBreakpointOptions): {
16
+ currentBreakpoint: "2xl" | "base" | "lg" | "md" | "sm" | "xl";
17
+ };
@@ -0,0 +1,49 @@
1
+ import type { ElementType } from 'react';
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>;
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
+ declare type OmittedProps = 'children' | 'readOnly' | 'size';
32
+ declare type UseFormFieldProps<T extends FormFieldElement> = Omit<HTMLQdsProps<T>, OmittedProps> & FormFieldOptions;
33
+ /**
34
+ * Custom hook that returns props for a form field's label, inpu, 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 {};
@@ -0,0 +1,10 @@
1
+ import type { HTMLQdsProps } from '../types';
2
+ declare type LoadingStatus = 'loading' | 'loaded' | 'error' | 'pending';
3
+ export interface UseImageProps {
4
+ src?: string;
5
+ loading?: HTMLQdsProps<'img'>['loading'];
6
+ }
7
+ export declare const useImage: ({ src, loading }: UseImageProps) => {
8
+ loadingStatus: LoadingStatus;
9
+ };
10
+ export {};
@@ -0,0 +1,9 @@
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;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Returns a stable ID that is unique to the component instance.
3
+ */
4
+ export declare function useStableId(fixedId?: string | null): string;
@@ -0,0 +1,6 @@
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';
@@ -0,0 +1,8 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { ThemeOverrides } from './theme';
3
+ interface QdsProviderProps {
4
+ children: ReactNode;
5
+ themeOverrides?: ThemeOverrides;
6
+ }
7
+ export declare function QdsProvider({ children, themeOverrides }: QdsProviderProps): JSX.Element;
8
+ export {};
@@ -0,0 +1,369 @@
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
+ '12x': string;
19
+ '16x': string;
20
+ '20x': string;
21
+ '24x': string;
22
+ };
23
+ breakpoints: {
24
+ readonly base: 0;
25
+ readonly sm: 480;
26
+ readonly md: 768;
27
+ readonly lg: 1024;
28
+ readonly xl: 1280;
29
+ readonly '2xl': 1536;
30
+ };
31
+ zIndices: {
32
+ hide: number;
33
+ auto: string;
34
+ base: number;
35
+ docked: number;
36
+ dropdown: number;
37
+ sticky: number;
38
+ banner: number;
39
+ overlay: number;
40
+ modal: number;
41
+ popover: number;
42
+ skipLink: number;
43
+ toast: number;
44
+ tooltip: number;
45
+ };
46
+ colors: {
47
+ core: {
48
+ black: string;
49
+ white: string;
50
+ gray90: string;
51
+ gray80: string;
52
+ gray70: string;
53
+ gray60: string;
54
+ gray50: string;
55
+ gray40: string;
56
+ gray30: string;
57
+ gray20: string;
58
+ gray10: string;
59
+ brand90: string;
60
+ brand80: string;
61
+ brand70: string;
62
+ brand60: string;
63
+ brand50: string;
64
+ brand40: string;
65
+ brand30: string;
66
+ brand20: string;
67
+ brand10: string;
68
+ red10: string;
69
+ red20: string;
70
+ red30: string;
71
+ red40: string;
72
+ red50: string;
73
+ red60: string;
74
+ red70: string;
75
+ red80: string;
76
+ red90: string;
77
+ green90: string;
78
+ green80: string;
79
+ green70: string;
80
+ green60: string;
81
+ green50: string;
82
+ green40: string;
83
+ green30: string;
84
+ green20: string;
85
+ green10: string;
86
+ blue90: string;
87
+ blue80: string;
88
+ blue70: string;
89
+ blue60: string;
90
+ blue50: string;
91
+ blue40: string;
92
+ blue30: string;
93
+ blue20: string;
94
+ blue10: string;
95
+ yellow90: string;
96
+ yellow80: string;
97
+ yellow70: string;
98
+ yellow60: string;
99
+ yellow50: string;
100
+ yellow40: string;
101
+ yellow30: string;
102
+ yellow20: string;
103
+ yellow10: string;
104
+ blackAlpha20: string;
105
+ };
106
+ bg: {
107
+ default: string;
108
+ brandPrimary: string;
109
+ brandPrimaryHover: string;
110
+ brandPrimaryActive: string;
111
+ brandSecondary: string;
112
+ brandSecondaryHover: string;
113
+ brandSecondaryActive: string;
114
+ negative: string;
115
+ warning: string;
116
+ positive: string;
117
+ inset: string;
118
+ backdrop: string;
119
+ };
120
+ text: {
121
+ strong: string;
122
+ default: string;
123
+ subtle: string;
124
+ disabled: string;
125
+ negative: string;
126
+ warning: string;
127
+ positive: string;
128
+ onColor: string;
129
+ };
130
+ icon: {
131
+ default: string;
132
+ strong: string;
133
+ subtle: string;
134
+ disabled: string;
135
+ negative: string;
136
+ warning: string;
137
+ success: string;
138
+ onColor: string;
139
+ };
140
+ border: {
141
+ default: string;
142
+ defaultHover: string;
143
+ defaultSelected: string;
144
+ strong: string;
145
+ subtle: string;
146
+ negative: string;
147
+ warning: string;
148
+ success: string;
149
+ };
150
+ };
151
+ sizes: {
152
+ 112: string;
153
+ 128: string;
154
+ 144: string;
155
+ 160: string;
156
+ 176: string;
157
+ 192: string;
158
+ 224: string;
159
+ 256: string;
160
+ 288: string;
161
+ 320: string;
162
+ 384: string;
163
+ 448: string;
164
+ 512: string;
165
+ 576: string;
166
+ 672: string;
167
+ 768: string;
168
+ 896: string;
169
+ 1024: string;
170
+ '0x': string;
171
+ '1x': string;
172
+ '2x': string;
173
+ '3x': string;
174
+ '4x': string;
175
+ '5x': string;
176
+ '6x': string;
177
+ '8x': string;
178
+ '12x': string;
179
+ '16x': string;
180
+ '20x': string;
181
+ '24x': string;
182
+ };
183
+ radii: {
184
+ none: string;
185
+ xs: string;
186
+ sm: string;
187
+ md: string;
188
+ lg: string;
189
+ xl: string;
190
+ full: string;
191
+ };
192
+ shadows: {
193
+ none: string;
194
+ sm: string;
195
+ md: string;
196
+ lg: string;
197
+ xl: string;
198
+ };
199
+ typography: {
200
+ display: {
201
+ lg: {
202
+ fontFamily: string;
203
+ fontWeight: string;
204
+ fontSize: string;
205
+ lineHeight: string;
206
+ letterSpacing: string;
207
+ };
208
+ md: {
209
+ fontFamily: string;
210
+ fontWeight: string;
211
+ fontSize: string;
212
+ lineHeight: string;
213
+ letterSpacing: string;
214
+ };
215
+ };
216
+ title: {
217
+ lg: {
218
+ fontFamily: string;
219
+ fontWeight: string;
220
+ fontSize: string;
221
+ lineHeight: string;
222
+ letterSpacing: string;
223
+ };
224
+ md: {
225
+ fontFamily: string;
226
+ fontWeight: string;
227
+ fontSize: string;
228
+ lineHeight: string;
229
+ letterSpacing: string;
230
+ };
231
+ sm: {
232
+ fontFamily: string;
233
+ fontWeight: string;
234
+ fontSize: string;
235
+ lineHeight: string;
236
+ letterSpacing: string;
237
+ };
238
+ xs: {
239
+ fontFamily: string;
240
+ fontWeight: string;
241
+ fontSize: string;
242
+ lineHeight: string;
243
+ letterSpacing: string;
244
+ };
245
+ '2xs': {
246
+ fontFamily: string;
247
+ fontWeight: string;
248
+ fontSize: string;
249
+ lineHeight: string;
250
+ letterSpacing: string;
251
+ };
252
+ '3xs': {
253
+ fontFamily: string;
254
+ fontWeight: string;
255
+ fontSize: string;
256
+ lineHeight: string;
257
+ letterSpacing: string;
258
+ };
259
+ };
260
+ body: {
261
+ xl: {
262
+ fontFamily: string;
263
+ fontWeight: string;
264
+ fontSize: string;
265
+ lineHeight: string;
266
+ letterSpacing: string;
267
+ };
268
+ lg: {
269
+ fontFamily: string;
270
+ fontWeight: string;
271
+ fontSize: string;
272
+ lineHeight: string;
273
+ letterSpacing: string;
274
+ };
275
+ md: {
276
+ fontFamily: string;
277
+ fontWeight: string;
278
+ fontSize: string;
279
+ lineHeight: string;
280
+ letterSpacing: string;
281
+ };
282
+ sm: {
283
+ fontFamily: string;
284
+ fontWeight: string;
285
+ fontSize: string;
286
+ lineHeight: string;
287
+ letterSpacing: string;
288
+ };
289
+ xs: {
290
+ fontFamily: string;
291
+ fontWeight: string;
292
+ fontSize: string;
293
+ lineHeight: string;
294
+ letterSpacing: string;
295
+ };
296
+ };
297
+ label: {
298
+ md: {
299
+ fontFamily: string;
300
+ fontWeight: string;
301
+ fontSize: string;
302
+ lineHeight: string;
303
+ letterSpacing: string;
304
+ };
305
+ sm: {
306
+ fontFamily: string;
307
+ fontWeight: string;
308
+ fontSize: string;
309
+ lineHeight: string;
310
+ letterSpacing: string;
311
+ };
312
+ };
313
+ caption: {
314
+ md: {
315
+ fontFamily: string;
316
+ fontWeight: string;
317
+ fontSize: string;
318
+ lineHeight: string;
319
+ letterSpacing: string;
320
+ };
321
+ sm: {
322
+ fontFamily: string;
323
+ fontWeight: string;
324
+ fontSize: string;
325
+ lineHeight: string;
326
+ letterSpacing: string;
327
+ };
328
+ };
329
+ };
330
+ }) => {
331
+ '&::placeholder': {
332
+ color: string;
333
+ };
334
+ '&:hover': {
335
+ borderColor: string;
336
+ };
337
+ '&:focus': {
338
+ outline: number;
339
+ borderColor: string;
340
+ boxShadow: `0 0 0 1px ${string}`;
341
+ };
342
+ '&[aria-invalid=true]': {
343
+ borderColor: string;
344
+ '&:focus': {
345
+ boxShadow: `0 0 0 1px ${string}`;
346
+ };
347
+ };
348
+ '&[disabled]': {
349
+ opacity: number;
350
+ };
351
+ transitionProperty: "opacity, border-color, box-shadow";
352
+ transitionDuration: "120ms";
353
+ transitionTimingFunction: "ease";
354
+ fontFamily: string;
355
+ fontWeight: string;
356
+ fontSize: string;
357
+ lineHeight: string;
358
+ letterSpacing: string;
359
+ width: string;
360
+ minWidth: number;
361
+ appearance: "none";
362
+ paddingLeft: string;
363
+ paddingRight: string;
364
+ border: string;
365
+ borderRadius: string;
366
+ backgroundColor: string;
367
+ color: string;
368
+ alignItems: "center";
369
+ };
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ /**
3
+ * A CSS Reset (opinionated)
4
+ */
5
+ export declare function CSSReset(): JSX.Element;
@@ -0,0 +1,19 @@
1
+ import type { CSSObject } from '@emotion/react';
2
+ import type { Theme } from '../theme';
3
+ declare type NamedStyles = Record<string, CSSObject>;
4
+ declare 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 declare 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 {};
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ /**
3
+ * Adds some global opinionated styles.
4
+ */
5
+ export declare function GlobalStyles(): JSX.Element;
@@ -0,0 +1,3 @@
1
+ export * from './global-styles';
2
+ export * from './css-utils';
3
+ export * from './common-styles';
@@ -0,0 +1,8 @@
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
+ };
@@ -0,0 +1,107 @@
1
+ export declare const colors: {
2
+ core: {
3
+ black: string;
4
+ white: string;
5
+ gray90: string;
6
+ gray80: string;
7
+ gray70: string;
8
+ gray60: string;
9
+ gray50: string;
10
+ gray40: string;
11
+ gray30: string;
12
+ gray20: string;
13
+ gray10: string;
14
+ brand90: string;
15
+ brand80: string;
16
+ brand70: string;
17
+ brand60: string;
18
+ brand50: string;
19
+ brand40: string;
20
+ brand30: string;
21
+ brand20: string;
22
+ brand10: string;
23
+ red10: string;
24
+ red20: string;
25
+ red30: string;
26
+ red40: string;
27
+ red50: string;
28
+ red60: string;
29
+ red70: string;
30
+ red80: string;
31
+ red90: string;
32
+ green90: string;
33
+ green80: string;
34
+ green70: string;
35
+ green60: string;
36
+ green50: string;
37
+ green40: string;
38
+ green30: string;
39
+ green20: string;
40
+ green10: string;
41
+ blue90: string;
42
+ blue80: string;
43
+ blue70: string;
44
+ blue60: string;
45
+ blue50: string;
46
+ blue40: string;
47
+ blue30: string;
48
+ blue20: string;
49
+ blue10: string;
50
+ yellow90: string;
51
+ yellow80: string;
52
+ yellow70: string;
53
+ yellow60: string;
54
+ yellow50: string;
55
+ yellow40: string;
56
+ yellow30: string;
57
+ yellow20: string;
58
+ yellow10: string;
59
+ blackAlpha20: string;
60
+ };
61
+ bg: {
62
+ default: string;
63
+ brandPrimary: string;
64
+ brandPrimaryHover: string;
65
+ brandPrimaryActive: string;
66
+ brandSecondary: string;
67
+ brandSecondaryHover: string;
68
+ brandSecondaryActive: string;
69
+ negative: string;
70
+ warning: string;
71
+ positive: string;
72
+ inset: string;
73
+ backdrop: string;
74
+ };
75
+ text: {
76
+ strong: string;
77
+ default: string;
78
+ subtle: string;
79
+ disabled: string;
80
+ negative: string;
81
+ warning: string;
82
+ positive: string;
83
+ /** For usage on colored/darker backgrounds */
84
+ onColor: string;
85
+ };
86
+ icon: {
87
+ default: string;
88
+ strong: string;
89
+ subtle: string;
90
+ disabled: string;
91
+ negative: string;
92
+ warning: string;
93
+ success: string;
94
+ /** For usage on colored/darker backgrounds */
95
+ onColor: string;
96
+ };
97
+ border: {
98
+ default: string;
99
+ defaultHover: string;
100
+ defaultSelected: string;
101
+ strong: string;
102
+ subtle: string;
103
+ negative: string;
104
+ warning: string;
105
+ success: string;
106
+ };
107
+ };