@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.
- package/README.md +17 -0
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/types/components/_internal/form-parts.d.ts +13 -0
- package/dist/cjs/types/components/_internal/index.d.ts +1 -0
- package/dist/cjs/types/components/avatar/avatar.d.ts +30 -0
- package/dist/cjs/types/components/avatar/index.d.ts +1 -0
- package/dist/cjs/types/components/button/button-styles.d.ts +755 -0
- package/dist/cjs/types/components/button/button.d.ts +41 -0
- package/dist/cjs/types/components/button/index.d.ts +1 -0
- package/dist/cjs/types/components/divider/divider.d.ts +14 -0
- package/dist/cjs/types/components/divider/index.d.ts +1 -0
- package/dist/cjs/types/components/heading/heading.d.ts +403 -0
- package/dist/cjs/types/components/heading/index.d.ts +1 -0
- package/dist/cjs/types/components/icon/create-icon.d.ts +409 -0
- package/dist/cjs/types/components/icon/icons/arrow-down.d.ts +2 -0
- package/dist/cjs/types/components/icon/icons/arrow-left.d.ts +2 -0
- package/dist/cjs/types/components/icon/icons/arrow-right.d.ts +2 -0
- package/dist/cjs/types/components/icon/icons/arrow-up.d.ts +2 -0
- package/dist/cjs/types/components/icon/icons/bell-slash.d.ts +2 -0
- package/dist/cjs/types/components/icon/icons/bell.d.ts +2 -0
- package/dist/cjs/types/components/icon/icons/calendar.d.ts +2 -0
- package/dist/cjs/types/components/icon/icons/check.d.ts +2 -0
- package/dist/cjs/types/components/icon/icons/chevron-down.d.ts +2 -0
- package/dist/cjs/types/components/icon/icons/chevron-left.d.ts +2 -0
- package/dist/cjs/types/components/icon/icons/chevron-right.d.ts +2 -0
- package/dist/cjs/types/components/icon/icons/chevron-up.d.ts +2 -0
- package/dist/cjs/types/components/icon/icons/ellipsis-vertical.d.ts +2 -0
- package/dist/cjs/types/components/icon/icons/ellipsis.d.ts +2 -0
- package/dist/cjs/types/components/icon/icons/heart-filled.d.ts +2 -0
- package/dist/cjs/types/components/icon/icons/heart.d.ts +2 -0
- package/dist/cjs/types/components/icon/icons/image.d.ts +2 -0
- package/dist/cjs/types/components/icon/icons/index.d.ts +27 -0
- package/dist/cjs/types/components/icon/icons/location-dot.d.ts +2 -0
- package/dist/cjs/types/components/icon/icons/map.d.ts +2 -0
- package/dist/cjs/types/components/icon/icons/plus.d.ts +2 -0
- package/dist/cjs/types/components/icon/icons/search.d.ts +2 -0
- package/dist/cjs/types/components/icon/icons/settings.d.ts +2 -0
- package/dist/cjs/types/components/icon/icons/star-filled.d.ts +2 -0
- package/dist/cjs/types/components/icon/icons/star.d.ts +2 -0
- package/dist/cjs/types/components/icon/icons/trash.d.ts +2 -0
- package/dist/cjs/types/components/icon/icons/user.d.ts +2 -0
- package/dist/cjs/types/components/icon/icons/xmark.d.ts +2 -0
- package/dist/cjs/types/components/icon/index.d.ts +2 -0
- package/dist/cjs/types/components/icon-button/icon-button-styles.d.ts +735 -0
- package/dist/cjs/types/components/icon-button/icon-button.d.ts +31 -0
- package/dist/cjs/types/components/icon-button/index.d.ts +1 -0
- package/dist/cjs/types/components/image/image.d.ts +16 -0
- package/dist/cjs/types/components/image/index.d.ts +1 -0
- package/dist/cjs/types/components/index.d.ts +17 -0
- package/dist/cjs/types/components/label/index.d.ts +1 -0
- package/dist/cjs/types/components/label/label.d.ts +358 -0
- package/dist/cjs/types/components/link/index.d.ts +1 -0
- package/dist/cjs/types/components/link/link.d.ts +15 -0
- package/dist/cjs/types/components/loading-dots/index.d.ts +1 -0
- package/dist/cjs/types/components/loading-dots/loading-dots.d.ts +348 -0
- package/dist/cjs/types/components/paragraph/index.d.ts +1 -0
- package/dist/cjs/types/components/paragraph/paragraph.d.ts +402 -0
- package/dist/cjs/types/components/primitives/index.d.ts +3 -0
- package/dist/cjs/types/components/primitives/input-base/index.d.ts +1 -0
- package/dist/cjs/types/components/primitives/input-base/input-base.d.ts +21 -0
- package/dist/cjs/types/components/primitives/select-base/index.d.ts +1 -0
- package/dist/cjs/types/components/primitives/select-base/select-base.d.ts +30 -0
- package/dist/cjs/types/components/primitives/textarea-base/index.d.ts +1 -0
- package/dist/cjs/types/components/primitives/textarea-base/textarea-base.d.ts +36 -0
- package/dist/cjs/types/components/select/index.d.ts +1 -0
- package/dist/cjs/types/components/select/select-option.d.ts +10 -0
- package/dist/cjs/types/components/select/select.d.ts +25 -0
- package/dist/cjs/types/components/spacer/index.d.ts +1 -0
- package/dist/cjs/types/components/spacer/spacer.d.ts +11 -0
- package/dist/cjs/types/components/stack/index.d.ts +1 -0
- package/dist/cjs/types/components/stack/stack.d.ts +17 -0
- package/dist/cjs/types/components/stack/stack.types.d.ts +4 -0
- package/dist/cjs/types/components/stack/stack.utils.d.ts +6 -0
- package/dist/cjs/types/components/text-field/index.d.ts +1 -0
- package/dist/cjs/types/components/text-field/text-field.d.ts +22 -0
- package/dist/cjs/types/components/textarea/index.d.ts +1 -0
- package/dist/cjs/types/components/textarea/textarea.d.ts +22 -0
- package/dist/cjs/types/hooks/index.d.ts +6 -0
- package/dist/cjs/types/hooks/use-breakpoint-value.d.ts +16 -0
- package/dist/cjs/types/hooks/use-breakpoint.d.ts +17 -0
- package/dist/cjs/types/hooks/use-form-field.d.ts +49 -0
- package/dist/cjs/types/hooks/use-image.d.ts +10 -0
- package/dist/cjs/types/hooks/use-safe-layout-effect.d.ts +9 -0
- package/dist/cjs/types/hooks/use-stable-id.d.ts +4 -0
- package/dist/cjs/types/index.d.ts +6 -0
- package/dist/cjs/types/qds-provider.d.ts +8 -0
- package/dist/cjs/types/styles/common-styles.d.ts +369 -0
- package/dist/cjs/types/styles/css-reset.d.ts +5 -0
- package/dist/cjs/types/styles/css-utils.d.ts +19 -0
- package/dist/cjs/types/styles/global-styles.d.ts +5 -0
- package/dist/cjs/types/styles/index.d.ts +3 -0
- package/dist/cjs/types/theme/foundations/breakpoints.d.ts +8 -0
- package/dist/cjs/types/theme/foundations/colors.d.ts +107 -0
- package/dist/cjs/types/theme/foundations/index.d.ts +335 -0
- package/dist/cjs/types/theme/foundations/radius.d.ts +9 -0
- package/dist/cjs/types/theme/foundations/shadows.d.ts +7 -0
- package/dist/cjs/types/theme/foundations/sizes.d.ts +32 -0
- package/dist/cjs/types/theme/foundations/spacing.d.ts +14 -0
- package/dist/cjs/types/theme/foundations/typography.d.ts +131 -0
- package/dist/cjs/types/theme/foundations/z-index.d.ts +15 -0
- package/dist/cjs/types/theme/index.d.ts +2 -0
- package/dist/cjs/types/theme/theme-tools.d.ts +345 -0
- package/dist/cjs/types/theme/theme.d.ts +331 -0
- package/dist/cjs/types/types.d.ts +5 -0
- package/dist/cjs/types/utils/object.d.ts +1 -0
- package/dist/cjs/types/utils/polymorphic.d.ts +41 -0
- package/dist/cjs/types/utils/test-utils.d.ts +14 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/types/components/_internal/form-parts.d.ts +13 -0
- package/dist/esm/types/components/_internal/index.d.ts +1 -0
- package/dist/esm/types/components/avatar/avatar.d.ts +30 -0
- package/dist/esm/types/components/avatar/index.d.ts +1 -0
- package/dist/esm/types/components/button/button-styles.d.ts +755 -0
- package/dist/esm/types/components/button/button.d.ts +41 -0
- package/dist/esm/types/components/button/index.d.ts +1 -0
- package/dist/esm/types/components/divider/divider.d.ts +14 -0
- package/dist/esm/types/components/divider/index.d.ts +1 -0
- package/dist/esm/types/components/heading/heading.d.ts +403 -0
- package/dist/esm/types/components/heading/index.d.ts +1 -0
- package/dist/esm/types/components/icon/create-icon.d.ts +409 -0
- package/dist/esm/types/components/icon/icons/arrow-down.d.ts +2 -0
- package/dist/esm/types/components/icon/icons/arrow-left.d.ts +2 -0
- package/dist/esm/types/components/icon/icons/arrow-right.d.ts +2 -0
- package/dist/esm/types/components/icon/icons/arrow-up.d.ts +2 -0
- package/dist/esm/types/components/icon/icons/bell-slash.d.ts +2 -0
- package/dist/esm/types/components/icon/icons/bell.d.ts +2 -0
- package/dist/esm/types/components/icon/icons/calendar.d.ts +2 -0
- package/dist/esm/types/components/icon/icons/check.d.ts +2 -0
- package/dist/esm/types/components/icon/icons/chevron-down.d.ts +2 -0
- package/dist/esm/types/components/icon/icons/chevron-left.d.ts +2 -0
- package/dist/esm/types/components/icon/icons/chevron-right.d.ts +2 -0
- package/dist/esm/types/components/icon/icons/chevron-up.d.ts +2 -0
- package/dist/esm/types/components/icon/icons/ellipsis-vertical.d.ts +2 -0
- package/dist/esm/types/components/icon/icons/ellipsis.d.ts +2 -0
- package/dist/esm/types/components/icon/icons/heart-filled.d.ts +2 -0
- package/dist/esm/types/components/icon/icons/heart.d.ts +2 -0
- package/dist/esm/types/components/icon/icons/image.d.ts +2 -0
- package/dist/esm/types/components/icon/icons/index.d.ts +27 -0
- package/dist/esm/types/components/icon/icons/location-dot.d.ts +2 -0
- package/dist/esm/types/components/icon/icons/map.d.ts +2 -0
- package/dist/esm/types/components/icon/icons/plus.d.ts +2 -0
- package/dist/esm/types/components/icon/icons/search.d.ts +2 -0
- package/dist/esm/types/components/icon/icons/settings.d.ts +2 -0
- package/dist/esm/types/components/icon/icons/star-filled.d.ts +2 -0
- package/dist/esm/types/components/icon/icons/star.d.ts +2 -0
- package/dist/esm/types/components/icon/icons/trash.d.ts +2 -0
- package/dist/esm/types/components/icon/icons/user.d.ts +2 -0
- package/dist/esm/types/components/icon/icons/xmark.d.ts +2 -0
- package/dist/esm/types/components/icon/index.d.ts +2 -0
- package/dist/esm/types/components/icon-button/icon-button-styles.d.ts +735 -0
- package/dist/esm/types/components/icon-button/icon-button.d.ts +31 -0
- package/dist/esm/types/components/icon-button/index.d.ts +1 -0
- package/dist/esm/types/components/image/image.d.ts +16 -0
- package/dist/esm/types/components/image/index.d.ts +1 -0
- package/dist/esm/types/components/index.d.ts +17 -0
- package/dist/esm/types/components/label/index.d.ts +1 -0
- package/dist/esm/types/components/label/label.d.ts +358 -0
- package/dist/esm/types/components/link/index.d.ts +1 -0
- package/dist/esm/types/components/link/link.d.ts +15 -0
- package/dist/esm/types/components/loading-dots/index.d.ts +1 -0
- package/dist/esm/types/components/loading-dots/loading-dots.d.ts +348 -0
- package/dist/esm/types/components/paragraph/index.d.ts +1 -0
- package/dist/esm/types/components/paragraph/paragraph.d.ts +402 -0
- package/dist/esm/types/components/primitives/index.d.ts +3 -0
- package/dist/esm/types/components/primitives/input-base/index.d.ts +1 -0
- package/dist/esm/types/components/primitives/input-base/input-base.d.ts +21 -0
- package/dist/esm/types/components/primitives/select-base/index.d.ts +1 -0
- package/dist/esm/types/components/primitives/select-base/select-base.d.ts +30 -0
- package/dist/esm/types/components/primitives/textarea-base/index.d.ts +1 -0
- package/dist/esm/types/components/primitives/textarea-base/textarea-base.d.ts +36 -0
- package/dist/esm/types/components/select/index.d.ts +1 -0
- package/dist/esm/types/components/select/select-option.d.ts +10 -0
- package/dist/esm/types/components/select/select.d.ts +25 -0
- package/dist/esm/types/components/spacer/index.d.ts +1 -0
- package/dist/esm/types/components/spacer/spacer.d.ts +11 -0
- package/dist/esm/types/components/stack/index.d.ts +1 -0
- package/dist/esm/types/components/stack/stack.d.ts +17 -0
- package/dist/esm/types/components/stack/stack.types.d.ts +4 -0
- package/dist/esm/types/components/stack/stack.utils.d.ts +6 -0
- package/dist/esm/types/components/text-field/index.d.ts +1 -0
- package/dist/esm/types/components/text-field/text-field.d.ts +22 -0
- package/dist/esm/types/components/textarea/index.d.ts +1 -0
- package/dist/esm/types/components/textarea/textarea.d.ts +22 -0
- package/dist/esm/types/hooks/index.d.ts +6 -0
- package/dist/esm/types/hooks/use-breakpoint-value.d.ts +16 -0
- package/dist/esm/types/hooks/use-breakpoint.d.ts +17 -0
- package/dist/esm/types/hooks/use-form-field.d.ts +49 -0
- package/dist/esm/types/hooks/use-image.d.ts +10 -0
- package/dist/esm/types/hooks/use-safe-layout-effect.d.ts +9 -0
- package/dist/esm/types/hooks/use-stable-id.d.ts +4 -0
- package/dist/esm/types/index.d.ts +6 -0
- package/dist/esm/types/qds-provider.d.ts +8 -0
- package/dist/esm/types/styles/common-styles.d.ts +369 -0
- package/dist/esm/types/styles/css-reset.d.ts +5 -0
- package/dist/esm/types/styles/css-utils.d.ts +19 -0
- package/dist/esm/types/styles/global-styles.d.ts +5 -0
- package/dist/esm/types/styles/index.d.ts +3 -0
- package/dist/esm/types/theme/foundations/breakpoints.d.ts +8 -0
- package/dist/esm/types/theme/foundations/colors.d.ts +107 -0
- package/dist/esm/types/theme/foundations/index.d.ts +335 -0
- package/dist/esm/types/theme/foundations/radius.d.ts +9 -0
- package/dist/esm/types/theme/foundations/shadows.d.ts +7 -0
- package/dist/esm/types/theme/foundations/sizes.d.ts +32 -0
- package/dist/esm/types/theme/foundations/spacing.d.ts +14 -0
- package/dist/esm/types/theme/foundations/typography.d.ts +131 -0
- package/dist/esm/types/theme/foundations/z-index.d.ts +15 -0
- package/dist/esm/types/theme/index.d.ts +2 -0
- package/dist/esm/types/theme/theme-tools.d.ts +345 -0
- package/dist/esm/types/theme/theme.d.ts +331 -0
- package/dist/esm/types/types.d.ts +5 -0
- package/dist/esm/types/utils/object.d.ts +1 -0
- package/dist/esm/types/utils/polymorphic.d.ts +41 -0
- package/dist/esm/types/utils/test-utils.d.ts +14 -0
- package/dist/index.d.ts +4978 -0
- 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,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,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,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
|
+
};
|