@xqmsg/ui-core 0.8.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/LICENSE +21 -0
- package/README.md +181 -0
- package/dist/components/banner/Banner.stories.d.ts +5 -0
- package/dist/components/banner/index.d.ts +12 -0
- package/dist/components/breadcrumbs/Breadcrumbs.stories.d.ts +5 -0
- package/dist/components/breadcrumbs/components/icon/index.d.ts +9 -0
- package/dist/components/breadcrumbs/components/label/index.d.ts +8 -0
- package/dist/components/breadcrumbs/index.d.ts +14 -0
- package/dist/components/button/Button.stories.d.ts +5 -0
- package/dist/components/button/google/GoogleButton.stories.d.ts +5 -0
- package/dist/components/button/google/index.d.ts +8 -0
- package/dist/components/button/index.d.ts +20 -0
- package/dist/components/button/spinner/SpinnerButton.stories.d.ts +5 -0
- package/dist/components/button/spinner/index.d.ts +9 -0
- package/dist/components/form/Form.stories.d.ts +8 -0
- package/dist/components/form/FormTypes.d.ts +16 -0
- package/dist/components/form/hooks/useFormHandler.d.ts +10 -0
- package/dist/components/form/index.d.ts +12 -0
- package/dist/components/form/section/FormSection.stories.d.ts +9 -0
- package/dist/components/form/section/index.d.ts +28 -0
- package/dist/components/form/utils/formErrors.d.ts +6 -0
- package/dist/components/input/Input.stories.d.ts +8 -0
- package/dist/components/input/InputTypes.d.ts +27 -0
- package/dist/components/input/StackedCheckbox/StackedCheckboxGroup.d.ts +10 -0
- package/dist/components/input/StackedInput/StackedInput.d.ts +13 -0
- package/dist/components/input/StackedMultiSelect/components/MultiValue/index.d.ts +10 -0
- package/dist/components/input/StackedMultiSelect/index.d.ts +13 -0
- package/dist/components/input/StackedPilledInput/index.d.ts +12 -0
- package/dist/components/input/StackedRadio/StackedRadioGroup.d.ts +11 -0
- package/dist/components/input/StackedSelect/StackedSelect.d.ts +10 -0
- package/dist/components/input/StackedSwitch/index.d.ts +9 -0
- package/dist/components/input/StackedTextarea/StackedTextarea.d.ts +9 -0
- package/dist/components/input/components/InputTag/index.d.ts +7 -0
- package/dist/components/input/index.d.ts +26 -0
- package/dist/components/layout/BorderedBox/index.d.ts +9 -0
- package/dist/components/layout/Layout.stories.d.ts +5 -0
- package/dist/components/layout/index.d.ts +11 -0
- package/dist/components/loading/LoadingIndicator.stories.d.ts +5 -0
- package/dist/components/loading/index.d.ts +12 -0
- package/dist/components/table/Table.stories.d.ts +6 -0
- package/dist/components/table/TableTypes.d.ts +11 -0
- package/dist/components/table/index.d.ts +17 -0
- package/dist/components/table/loading/index.d.ts +10 -0
- package/dist/components/table/utils/generateTableColumns.d.ts +6 -0
- package/dist/components/tabs/TabsWrapper.stories.d.ts +6 -0
- package/dist/components/tabs/index.d.ts +10 -0
- package/dist/components/text/Text.stories.d.ts +5 -0
- package/dist/components/text/index.d.ts +19 -0
- package/dist/hooks/useDeepEffect.d.ts +5 -0
- package/dist/hooks/useDidMountEffect.d.ts +2 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +8 -0
- package/dist/theme/components/alert.d.ts +46 -0
- package/dist/theme/components/badge.d.ts +32 -0
- package/dist/theme/components/button.d.ts +231 -0
- package/dist/theme/components/code.d.ts +27 -0
- package/dist/theme/components/form-error.d.ts +16 -0
- package/dist/theme/components/form-label.d.ts +15 -0
- package/dist/theme/components/form.d.ts +16 -0
- package/dist/theme/components/input.d.ts +182 -0
- package/dist/theme/components/link.d.ts +97 -0
- package/dist/theme/components/menu.d.ts +48 -0
- package/dist/theme/components/modal.d.ts +242 -0
- package/dist/theme/components/select.d.ts +191 -0
- package/dist/theme/components/switch.d.ts +76 -0
- package/dist/theme/components/tabs.d.ts +219 -0
- package/dist/theme/components/text.d.ts +1373 -0
- package/dist/theme/components/textarea.d.ts +137 -0
- package/dist/theme/customXQChakraTheme.d.ts +3 -0
- package/dist/theme/foundations/breakpoints.d.ts +3 -0
- package/dist/theme/foundations/colors.d.ts +126 -0
- package/dist/theme/foundations/shadows.d.ts +17 -0
- package/dist/theme/foundations/typography.d.ts +56 -0
- package/dist/theme/provider/index.d.ts +6 -0
- package/dist/theme/styles.d.ts +20 -0
- package/dist/ui-core.cjs.development.js +3034 -0
- package/dist/ui-core.cjs.development.js.map +1 -0
- package/dist/ui-core.cjs.production.min.js +2 -0
- package/dist/ui-core.cjs.production.min.js.map +1 -0
- package/dist/ui-core.esm.js +3013 -0
- package/dist/ui-core.esm.js.map +1 -0
- package/package.json +113 -0
- package/src/components/banner/Banner.stories.tsx +68 -0
- package/src/components/banner/assets/svg/error.svg +3 -0
- package/src/components/banner/assets/svg/neutral.svg +3 -0
- package/src/components/banner/assets/svg/positive.svg +3 -0
- package/src/components/banner/assets/svg/warning.svg +3 -0
- package/src/components/banner/index.tsx +63 -0
- package/src/components/breadcrumbs/Breadcrumbs.stories.tsx +66 -0
- package/src/components/breadcrumbs/components/icon/index.tsx +40 -0
- package/src/components/breadcrumbs/components/label/index.tsx +20 -0
- package/src/components/breadcrumbs/index.tsx +47 -0
- package/src/components/button/Button.stories.tsx +46 -0
- package/src/components/button/google/GoogleButton.stories.tsx +23 -0
- package/src/components/button/google/assets/GoogleLogo.svg +13 -0
- package/src/components/button/google/index.tsx +32 -0
- package/src/components/button/index.tsx +54 -0
- package/src/components/button/spinner/SpinnerButton.stories.tsx +60 -0
- package/src/components/button/spinner/index.tsx +42 -0
- package/src/components/form/Form.stories.tsx +62 -0
- package/src/components/form/FormTypes.ts +18 -0
- package/src/components/form/hooks/useFormHandler.tsx +74 -0
- package/src/components/form/index.tsx +25 -0
- package/src/components/form/section/FormSection.stories.tsx +109 -0
- package/src/components/form/section/index.tsx +81 -0
- package/src/components/form/utils/formErrors.ts +34 -0
- package/src/components/input/Input.stories.tsx +171 -0
- package/src/components/input/InputTypes.ts +71 -0
- package/src/components/input/StackedCheckbox/StackedCheckboxGroup.tsx +29 -0
- package/src/components/input/StackedInput/StackedInput.tsx +30 -0
- package/src/components/input/StackedMultiSelect/components/MultiValue/index.tsx +21 -0
- package/src/components/input/StackedMultiSelect/index.tsx +145 -0
- package/src/components/input/StackedPilledInput/index.tsx +169 -0
- package/src/components/input/StackedRadio/StackedRadioGroup.tsx +38 -0
- package/src/components/input/StackedSelect/StackedSelect.tsx +33 -0
- package/src/components/input/StackedSwitch/index.tsx +28 -0
- package/src/components/input/StackedTextarea/StackedTextarea.tsx +17 -0
- package/src/components/input/components/InputTag/index.tsx +24 -0
- package/src/components/input/index.tsx +271 -0
- package/src/components/layout/BorderedBox/index.tsx +30 -0
- package/src/components/layout/Layout.stories.tsx +40 -0
- package/src/components/layout/index.tsx +100 -0
- package/src/components/loading/LoadingIndicator.stories.tsx +45 -0
- package/src/components/loading/index.tsx +45 -0
- package/src/components/table/Table.stories.tsx +73 -0
- package/src/components/table/TableTypes.ts +35 -0
- package/src/components/table/index.tsx +88 -0
- package/src/components/table/loading/index.tsx +42 -0
- package/src/components/table/utils/generateTableColumns.ts +9 -0
- package/src/components/tabs/TabsWrapper.stories.tsx +85 -0
- package/src/components/tabs/index.tsx +39 -0
- package/src/components/text/Text.stories.tsx +59 -0
- package/src/components/text/index.tsx +45 -0
- package/src/hooks/useDeepEffect.tsx +22 -0
- package/src/hooks/useDidMountEffect.tsx +13 -0
- package/src/index.tsx +48 -0
- package/src/theme/components/alert.ts +60 -0
- package/src/theme/components/badge.ts +59 -0
- package/src/theme/components/button.ts +211 -0
- package/src/theme/components/code.ts +16 -0
- package/src/theme/components/form-error.ts +32 -0
- package/src/theme/components/form-label.ts +16 -0
- package/src/theme/components/form.ts +32 -0
- package/src/theme/components/input.ts +213 -0
- package/src/theme/components/link.ts +117 -0
- package/src/theme/components/menu.ts +70 -0
- package/src/theme/components/modal.ts +216 -0
- package/src/theme/components/select.ts +41 -0
- package/src/theme/components/switch.ts +89 -0
- package/src/theme/components/tabs.ts +255 -0
- package/src/theme/components/text.ts +46 -0
- package/src/theme/components/textarea.ts +54 -0
- package/src/theme/customXQChakraTheme.ts +52 -0
- package/src/theme/foundations/breakpoints.ts +18 -0
- package/src/theme/foundations/colors.ts +136 -0
- package/src/theme/foundations/shadows.ts +23 -0
- package/src/theme/foundations/typography.ts +62 -0
- package/src/theme/provider/index.tsx +16 -0
- package/src/theme/styles.ts +19 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react';
|
|
2
|
+
import { LoadingIndicatorProps } from '.';
|
|
3
|
+
declare const meta: Meta<LoadingIndicatorProps>;
|
|
4
|
+
export default meta;
|
|
5
|
+
export declare const Default: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, LoadingIndicatorProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface LoadingIndicatorProps {
|
|
3
|
+
size?: 'sm' | 'md' | 'lg' | 'xs' | 'xl';
|
|
4
|
+
text?: string;
|
|
5
|
+
thickness?: string;
|
|
6
|
+
speed?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* A functional React component utilized to render the `LoadingIndicator` component
|
|
11
|
+
*/
|
|
12
|
+
export declare const LoadingIndicator: React.FC<LoadingIndicatorProps>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react';
|
|
2
|
+
import { TableProps } from '.';
|
|
3
|
+
declare const tableColumns: string[];
|
|
4
|
+
declare const meta: Meta<TableProps<typeof tableColumns>>;
|
|
5
|
+
export default meta;
|
|
6
|
+
export declare const Default: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, TableProps<string[]>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export declare type TableColumns = string[];
|
|
3
|
+
export declare type ReadonlyTableColumns = Readonly<TableColumns>;
|
|
4
|
+
export declare type TableHeaders<K extends ReadonlyTableColumns> = {
|
|
5
|
+
[k in K[number]]: ReactNode;
|
|
6
|
+
};
|
|
7
|
+
export declare type TableRow<K extends ReadonlyTableColumns> = {
|
|
8
|
+
[k in K[number]]: ReactNode;
|
|
9
|
+
};
|
|
10
|
+
export declare type TableBody<R extends ReadonlyTableColumns> = TableRow<R>[];
|
|
11
|
+
export declare type TableColorScheme = 'blue' | 'cyan' | 'gray' | 'green' | 'orange' | 'pink' | 'purple' | 'red' | 'teal' | 'yellow' | 'whiteAlpha' | 'blackAlpha' | 'linkedin' | 'facebook' | 'messenger' | 'whatsapp' | 'twitter' | 'telegram';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ReadonlyTableColumns, TableBody, TableColorScheme, TableColumns, TableHeaders } from './TableTypes';
|
|
3
|
+
export interface TableProps<T extends ReadonlyTableColumns> {
|
|
4
|
+
columns: TableColumns;
|
|
5
|
+
headers: TableHeaders<T>;
|
|
6
|
+
body: TableBody<T>;
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
variant: 'simple' | 'striped' | 'unstyled';
|
|
9
|
+
colorScheme?: TableColorScheme;
|
|
10
|
+
borderTopRadius?: boolean;
|
|
11
|
+
loadMore?: () => void;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* A React component utilized to render the `Table` component
|
|
16
|
+
*/
|
|
17
|
+
export declare function Table<T extends ReadonlyTableColumns>({ columns, headers, body, placeholder, loading, variant, colorScheme, borderTopRadius, loadMore, }: TableProps<T>): JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface TableLoadingRowsProps {
|
|
3
|
+
isLoading: boolean;
|
|
4
|
+
onLoadMore: () => void;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* A loading spinner rendered after the table to indicate more rows are being loaded.
|
|
8
|
+
*/
|
|
9
|
+
export declare const TableLoadingRows: React.FC<TableLoadingRowsProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TableColumns } from '../TableTypes';
|
|
2
|
+
/**
|
|
3
|
+
* This function is responsible for returning an array as a const, so the generic type `TableBody`
|
|
4
|
+
* may accept it as an argument and use the elements of the array as keys.
|
|
5
|
+
*/
|
|
6
|
+
export declare function generateTableColumnsAsConst<T extends TableColumns>(arr: T): readonly string[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react';
|
|
2
|
+
import { TableProps } from '../table';
|
|
3
|
+
import { TabsWrapperProps } from '.';
|
|
4
|
+
declare const meta: Meta<TabsWrapperProps>;
|
|
5
|
+
export default meta;
|
|
6
|
+
export declare const Default: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, TableProps<string[]>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React, { PropsWithChildren, ReactNode } from 'react';
|
|
2
|
+
export interface TabsWrapperProps extends PropsWithChildren {
|
|
3
|
+
navIndex: number;
|
|
4
|
+
setNavIndex: (index: number) => void;
|
|
5
|
+
navItems: ReactNode[];
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* A functional React component utilized to render the `TableNavWrapper` component
|
|
9
|
+
*/
|
|
10
|
+
export declare const TabsWrapper: React.FC<TabsWrapperProps>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
|
+
import { TypographyProps } from '@chakra-ui/react';
|
|
3
|
+
import textTheme from '../../theme/components/text';
|
|
4
|
+
import typography from '../../theme/foundations/typography';
|
|
5
|
+
export interface TextProps extends PropsWithChildren, TypographyProps {
|
|
6
|
+
variant: keyof typeof textTheme.variants;
|
|
7
|
+
color?: string;
|
|
8
|
+
fontSize?: keyof typeof typography.fontSizes;
|
|
9
|
+
lineHeight?: keyof typeof typography.lineHeights;
|
|
10
|
+
letterSpacing?: keyof typeof typography.letterSpacings;
|
|
11
|
+
fontWeight?: keyof typeof typography.fontWeights;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* A functional React component utilized to render the `Text` component. The component is mainly
|
|
16
|
+
* controlled by by the `variant` prop which determines `fontSize`, `fontWeight`, etc.
|
|
17
|
+
* Also extends `TypographyProps`.
|
|
18
|
+
*/
|
|
19
|
+
export declare const Text: React.FC<TextProps>;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from './components/banner';
|
|
2
|
+
export * from './components/breadcrumbs';
|
|
3
|
+
export * from './components/button';
|
|
4
|
+
export * from './components/button/google';
|
|
5
|
+
export * from './components/button/spinner';
|
|
6
|
+
export * from './components/form';
|
|
7
|
+
export * from './components/form/section';
|
|
8
|
+
export * from './components/input';
|
|
9
|
+
export * from './components/layout';
|
|
10
|
+
export * from './components/loading';
|
|
11
|
+
export * from './components/table';
|
|
12
|
+
export * from './components/tabs';
|
|
13
|
+
export * from './components/text';
|
|
14
|
+
export * from './theme/provider';
|
|
15
|
+
export * from './components/form/utils/formErrors';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
declare function variantPositive(): {
|
|
2
|
+
container: {
|
|
3
|
+
bg: string;
|
|
4
|
+
};
|
|
5
|
+
};
|
|
6
|
+
declare function variantWarning(): {
|
|
7
|
+
container: {
|
|
8
|
+
bg: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
declare function variantError(): {
|
|
12
|
+
container: {
|
|
13
|
+
bg: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
declare function variantNeutral(): {
|
|
17
|
+
container: {
|
|
18
|
+
bg: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
declare const _default: {
|
|
22
|
+
parts: string[];
|
|
23
|
+
baseStyle: {
|
|
24
|
+
container: {
|
|
25
|
+
px: string;
|
|
26
|
+
py: string;
|
|
27
|
+
};
|
|
28
|
+
description: {
|
|
29
|
+
width: string;
|
|
30
|
+
fontSize: string;
|
|
31
|
+
textAlign: string;
|
|
32
|
+
color: string;
|
|
33
|
+
lineHeight: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
variants: {
|
|
37
|
+
positive: typeof variantPositive;
|
|
38
|
+
warning: typeof variantWarning;
|
|
39
|
+
error: typeof variantError;
|
|
40
|
+
neutral: typeof variantNeutral;
|
|
41
|
+
};
|
|
42
|
+
defaultProps: {
|
|
43
|
+
variant: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
export default _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
declare type Dict = Record<string, any>;
|
|
2
|
+
declare function variantSolid(props: Dict): {
|
|
3
|
+
bg: string;
|
|
4
|
+
color: string;
|
|
5
|
+
};
|
|
6
|
+
declare function variantSubtle(props: Dict): {
|
|
7
|
+
bg: string;
|
|
8
|
+
color: string;
|
|
9
|
+
};
|
|
10
|
+
declare function variantOutline(props: Dict): {
|
|
11
|
+
color: any;
|
|
12
|
+
boxShadow: string;
|
|
13
|
+
};
|
|
14
|
+
declare const _default: {
|
|
15
|
+
baseStyle: {
|
|
16
|
+
px: number;
|
|
17
|
+
textTransform: string;
|
|
18
|
+
fontSize: string;
|
|
19
|
+
borderRadius: string;
|
|
20
|
+
fontWeight: string;
|
|
21
|
+
};
|
|
22
|
+
variants: {
|
|
23
|
+
solid: typeof variantSolid;
|
|
24
|
+
subtle: typeof variantSubtle;
|
|
25
|
+
outline: typeof variantOutline;
|
|
26
|
+
};
|
|
27
|
+
defaultProps: {
|
|
28
|
+
variant: string;
|
|
29
|
+
colorScheme: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export default _default;
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
declare type Dict = Record<string, any>;
|
|
2
|
+
declare function variantGhost(props: Dict): {
|
|
3
|
+
color: string;
|
|
4
|
+
_hover: {
|
|
5
|
+
bg: string;
|
|
6
|
+
};
|
|
7
|
+
_active: {
|
|
8
|
+
bg: string;
|
|
9
|
+
};
|
|
10
|
+
_focus: {
|
|
11
|
+
boxShadow: string;
|
|
12
|
+
};
|
|
13
|
+
bg?: undefined;
|
|
14
|
+
} | {
|
|
15
|
+
color: string;
|
|
16
|
+
bg: string;
|
|
17
|
+
_hover: {
|
|
18
|
+
bg: string;
|
|
19
|
+
};
|
|
20
|
+
_active: {
|
|
21
|
+
bg: string;
|
|
22
|
+
};
|
|
23
|
+
_focus: {
|
|
24
|
+
boxShadow: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
declare function variantOutline(props: Dict): {
|
|
28
|
+
color: string;
|
|
29
|
+
_hover: {
|
|
30
|
+
bg: string;
|
|
31
|
+
};
|
|
32
|
+
_active: {
|
|
33
|
+
bg: string;
|
|
34
|
+
};
|
|
35
|
+
_focus: {
|
|
36
|
+
boxShadow: string;
|
|
37
|
+
};
|
|
38
|
+
bg?: undefined;
|
|
39
|
+
border: string;
|
|
40
|
+
borderColor: string;
|
|
41
|
+
} | {
|
|
42
|
+
color: string;
|
|
43
|
+
bg: string;
|
|
44
|
+
_hover: {
|
|
45
|
+
bg: string;
|
|
46
|
+
};
|
|
47
|
+
_active: {
|
|
48
|
+
bg: string;
|
|
49
|
+
};
|
|
50
|
+
_focus: {
|
|
51
|
+
boxShadow: string;
|
|
52
|
+
};
|
|
53
|
+
border: string;
|
|
54
|
+
borderColor: string;
|
|
55
|
+
};
|
|
56
|
+
declare function variantSolid(props: Dict): {
|
|
57
|
+
color: string;
|
|
58
|
+
bg: string;
|
|
59
|
+
_hover: {
|
|
60
|
+
bg: string;
|
|
61
|
+
};
|
|
62
|
+
_active: {
|
|
63
|
+
bg: string;
|
|
64
|
+
};
|
|
65
|
+
_focus?: undefined;
|
|
66
|
+
} | {
|
|
67
|
+
bg: string;
|
|
68
|
+
color: string;
|
|
69
|
+
_hover: {
|
|
70
|
+
bg: string;
|
|
71
|
+
};
|
|
72
|
+
_active: {
|
|
73
|
+
bg: string;
|
|
74
|
+
};
|
|
75
|
+
_focus: {
|
|
76
|
+
boxShadow: string;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* A variant that displays a solid variant when an active CSS class is
|
|
81
|
+
* detected, otherwise display a ghost variant. This is useful for pill nav filters.
|
|
82
|
+
*/
|
|
83
|
+
declare function variantActiveSolid(props: Dict): {
|
|
84
|
+
'&.active': {
|
|
85
|
+
color: string;
|
|
86
|
+
bg: string;
|
|
87
|
+
_hover: {
|
|
88
|
+
bg: string;
|
|
89
|
+
};
|
|
90
|
+
_active: {
|
|
91
|
+
bg: string;
|
|
92
|
+
};
|
|
93
|
+
_focus?: undefined;
|
|
94
|
+
} | {
|
|
95
|
+
bg: string;
|
|
96
|
+
color: string;
|
|
97
|
+
_hover: {
|
|
98
|
+
bg: string;
|
|
99
|
+
};
|
|
100
|
+
_active: {
|
|
101
|
+
bg: string;
|
|
102
|
+
};
|
|
103
|
+
_focus: {
|
|
104
|
+
boxShadow: string;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
color: string;
|
|
108
|
+
_hover: {
|
|
109
|
+
bg: string;
|
|
110
|
+
};
|
|
111
|
+
_active: {
|
|
112
|
+
bg: string;
|
|
113
|
+
};
|
|
114
|
+
_focus: {
|
|
115
|
+
boxShadow: string;
|
|
116
|
+
};
|
|
117
|
+
bg?: undefined;
|
|
118
|
+
} | {
|
|
119
|
+
'&.active': {
|
|
120
|
+
color: string;
|
|
121
|
+
bg: string;
|
|
122
|
+
_hover: {
|
|
123
|
+
bg: string;
|
|
124
|
+
};
|
|
125
|
+
_active: {
|
|
126
|
+
bg: string;
|
|
127
|
+
};
|
|
128
|
+
_focus?: undefined;
|
|
129
|
+
} | {
|
|
130
|
+
bg: string;
|
|
131
|
+
color: string;
|
|
132
|
+
_hover: {
|
|
133
|
+
bg: string;
|
|
134
|
+
};
|
|
135
|
+
_active: {
|
|
136
|
+
bg: string;
|
|
137
|
+
};
|
|
138
|
+
_focus: {
|
|
139
|
+
boxShadow: string;
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
color: string;
|
|
143
|
+
bg: string;
|
|
144
|
+
_hover: {
|
|
145
|
+
bg: string;
|
|
146
|
+
};
|
|
147
|
+
_active: {
|
|
148
|
+
bg: string;
|
|
149
|
+
};
|
|
150
|
+
_focus: {
|
|
151
|
+
boxShadow: string;
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
declare function variantLink(props: Dict): {
|
|
155
|
+
padding: number;
|
|
156
|
+
height: string;
|
|
157
|
+
lineHeight: string;
|
|
158
|
+
color: string;
|
|
159
|
+
_hover: {
|
|
160
|
+
textDecoration: string;
|
|
161
|
+
};
|
|
162
|
+
_active: {
|
|
163
|
+
color: string;
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
declare const _default: {
|
|
167
|
+
baseStyle: {
|
|
168
|
+
lineHeight: number;
|
|
169
|
+
borderRadius: string;
|
|
170
|
+
fontWeight: string;
|
|
171
|
+
_focus: {
|
|
172
|
+
boxShadow: string;
|
|
173
|
+
};
|
|
174
|
+
_disabled: {
|
|
175
|
+
opacity: number;
|
|
176
|
+
cursor: string;
|
|
177
|
+
boxShadow: string;
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
variants: {
|
|
181
|
+
ghost: typeof variantGhost;
|
|
182
|
+
outline: typeof variantOutline;
|
|
183
|
+
solid: typeof variantSolid;
|
|
184
|
+
activeSolid: typeof variantActiveSolid;
|
|
185
|
+
link: typeof variantLink;
|
|
186
|
+
unstyled: {
|
|
187
|
+
bg: string;
|
|
188
|
+
color: string;
|
|
189
|
+
display: string;
|
|
190
|
+
lineHeight: string;
|
|
191
|
+
m: number;
|
|
192
|
+
p: number;
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
sizes: {
|
|
196
|
+
lg: {
|
|
197
|
+
borderRadius: string;
|
|
198
|
+
h: number;
|
|
199
|
+
minW: number;
|
|
200
|
+
fontSize: string;
|
|
201
|
+
px: number;
|
|
202
|
+
};
|
|
203
|
+
md: {
|
|
204
|
+
borderRadius: string;
|
|
205
|
+
h: number;
|
|
206
|
+
minW: number;
|
|
207
|
+
fontSize: string;
|
|
208
|
+
px: number;
|
|
209
|
+
};
|
|
210
|
+
sm: {
|
|
211
|
+
borderRadius: string;
|
|
212
|
+
h: number;
|
|
213
|
+
minW: number;
|
|
214
|
+
fontSize: string;
|
|
215
|
+
px: number;
|
|
216
|
+
};
|
|
217
|
+
xs: {
|
|
218
|
+
borderRadius: string;
|
|
219
|
+
h: number;
|
|
220
|
+
minW: number;
|
|
221
|
+
fontSize: string;
|
|
222
|
+
px: number;
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
defaultProps: {
|
|
226
|
+
variant: string;
|
|
227
|
+
size: string;
|
|
228
|
+
colorScheme: string;
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
export default _default;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
baseStyle: {
|
|
3
|
+
fontFamily: string;
|
|
4
|
+
fontSize: string;
|
|
5
|
+
px: string;
|
|
6
|
+
borderRadius: string;
|
|
7
|
+
};
|
|
8
|
+
variants: {
|
|
9
|
+
solid: (props: Record<string, any>) => {
|
|
10
|
+
bg: string;
|
|
11
|
+
color: string;
|
|
12
|
+
};
|
|
13
|
+
subtle: (props: Record<string, any>) => {
|
|
14
|
+
bg: string;
|
|
15
|
+
color: string;
|
|
16
|
+
};
|
|
17
|
+
outline: (props: Record<string, any>) => {
|
|
18
|
+
color: any;
|
|
19
|
+
boxShadow: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
defaultProps: {
|
|
23
|
+
variant: string;
|
|
24
|
+
colorScheme: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
parts: string[];
|
|
3
|
+
baseStyle: (props: Record<string, any>) => {
|
|
4
|
+
text: {
|
|
5
|
+
color: string;
|
|
6
|
+
mt: number;
|
|
7
|
+
lineHeight: string;
|
|
8
|
+
fontSize: string;
|
|
9
|
+
};
|
|
10
|
+
icon: {
|
|
11
|
+
mr: string;
|
|
12
|
+
color: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
parts: string[];
|
|
3
|
+
baseStyle: (props: Record<string, any>) => {
|
|
4
|
+
requiredIndicator: {
|
|
5
|
+
ml: number;
|
|
6
|
+
color: string;
|
|
7
|
+
};
|
|
8
|
+
helperText: {
|
|
9
|
+
mt: number;
|
|
10
|
+
color: string;
|
|
11
|
+
lineHeight: string;
|
|
12
|
+
fontSize: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export default _default;
|