welcome-ui 1.0.0-beta.2 → 1.0.0-beta.3
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/dist/Accordion.js +89 -0
- package/dist/Accordion.mjs +579 -0
- package/dist/Alert.js +1 -0
- package/dist/Alert.mjs +7 -0
- package/dist/AspectRatio.js +29 -0
- package/dist/AspectRatio.mjs +41 -0
- package/dist/Avatar.js +5 -0
- package/dist/Avatar.mjs +55 -0
- package/dist/Badge.js +17 -0
- package/dist/Badge.mjs +53 -0
- package/dist/{box.js → Box.js} +1 -1
- package/dist/Box.mjs +8 -0
- package/dist/Breadcrumb.js +54 -0
- package/dist/Breadcrumb.mjs +439 -0
- package/dist/Flex.js +1 -0
- package/dist/Flex.mjs +26 -0
- package/dist/{system.mjs → System.mjs} +5 -5
- package/dist/X5NMLKT6-BC1Q56kB.mjs +1258 -0
- package/dist/X5NMLKT6-vrNG8i_R.js +14 -0
- package/dist/index-0MPAX4B5.mjs +320 -0
- package/dist/index-BNA_A0oa.js +155 -0
- package/dist/index-BXJQXgy9.js +13 -0
- package/dist/index-Bwrtxit1.mjs +84 -0
- package/dist/index-Ct2FOeyM.js +17 -0
- package/dist/index-DRNn5iIc.js +142 -0
- package/dist/index-Du8Nrf16.mjs +128 -0
- package/dist/index-MifIgNHW.mjs +47 -0
- package/dist/index-V28zHt_Z.js +68 -0
- package/dist/index-WmqrMIzg.mjs +19070 -0
- package/dist/index.js +147 -5
- package/dist/index.mjs +770 -219
- package/dist/types/components/Accordion/index.d.ts +16 -0
- package/dist/types/components/Accordion/styles.d.ts +6 -0
- package/dist/types/components/Accordion/theme.d.ts +10 -0
- package/dist/types/components/Alert/Title.d.ts +7 -0
- package/dist/types/components/Alert/index.d.ts +24 -0
- package/dist/types/components/Alert/styles.d.ts +6 -0
- package/dist/types/components/Alert/theme.d.ts +15 -0
- package/dist/types/components/AspectRatio/index.d.ts +6 -0
- package/dist/types/components/AspectRatio/styles.d.ts +2 -0
- package/dist/types/components/Avatar/index.d.ts +16 -0
- package/dist/types/components/Avatar/styles.d.ts +2 -0
- package/dist/types/components/Avatar/theme.d.ts +9 -0
- package/dist/types/components/Avatar/utils.d.ts +3 -0
- package/dist/types/components/Badge/index.d.ts +11 -0
- package/dist/types/components/Badge/styles.d.ts +8 -0
- package/dist/types/components/Badge/theme.d.ts +18 -0
- package/dist/types/components/Breadcrumb/Item.d.ts +13 -0
- package/dist/types/components/Breadcrumb/Item.styles.d.ts +2 -0
- package/dist/types/components/Breadcrumb/index.d.ts +18 -0
- package/dist/types/components/Breadcrumb/styles.d.ts +6 -0
- package/dist/types/components/Breadcrumb/theme.d.ts +12 -0
- package/dist/types/components/Button/index.d.ts +21 -0
- package/dist/types/components/Button/styles.d.ts +2 -0
- package/dist/types/components/Button/theme.d.ts +13 -0
- package/dist/types/components/ButtonGroup/index.d.ts +15 -0
- package/dist/types/components/ButtonGroup/styles.d.ts +1 -0
- package/dist/types/components/Card/Cover.d.ts +10 -0
- package/dist/types/components/Card/Cover.styles.d.ts +1 -0
- package/dist/types/components/Card/index.d.ts +8 -0
- package/dist/types/components/Card/styles.d.ts +2 -0
- package/dist/types/components/Card/theme.d.ts +6 -0
- package/dist/types/components/ClearButton/index.d.ts +5 -0
- package/dist/types/components/ClearButton/styles.d.ts +1 -0
- package/dist/types/components/CloseButton/index.d.ts +3 -0
- package/dist/types/components/CloseButton/styles.d.ts +1 -0
- package/dist/types/components/Flex/index.d.ts +19 -0
- package/dist/types/components/index.d.ts +12 -0
- package/dist/types/theme/index.d.ts +12 -0
- package/package.json +9 -4
- package/dist/box.mjs +0 -8
- /package/dist/{system.js → System.js} +0 -0
- /package/dist/{wui-provider.js → WuiProvider.js} +0 -0
- /package/dist/{wui-provider.mjs → WuiProvider.mjs} +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CreateWuiProps } from '../System';
|
|
2
|
+
import * as Ariakit from '@ariakit/react';
|
|
3
|
+
export interface AccordionOptions {
|
|
4
|
+
icon?: JSX.Element;
|
|
5
|
+
/**
|
|
6
|
+
* store from useAccordion()
|
|
7
|
+
*/
|
|
8
|
+
store: UseAccordion;
|
|
9
|
+
title: string | JSX.Element;
|
|
10
|
+
}
|
|
11
|
+
export type AccordionProps = CreateWuiProps<'div', AccordionOptions>;
|
|
12
|
+
export declare const Accordion: import('../System').CreateWuiComponent<"div", AccordionProps>;
|
|
13
|
+
export type UseAccordion = Ariakit.DisclosureStore;
|
|
14
|
+
export type UseAccordionProps = Ariakit.DisclosureStoreProps;
|
|
15
|
+
export type UseAccordionState = Ariakit.DisclosureStoreState;
|
|
16
|
+
export declare function useAccordion(options?: UseAccordionProps): UseAccordion;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as Ariakit from '@ariakit/react';
|
|
2
|
+
export declare const Accordion: import('styled-components').StyledComponent<string, import('@xstyled/system').Theme, {}, never>;
|
|
3
|
+
export declare const Icon: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, import('@xstyled/system').SystemProps<import('@xstyled/system').Theme>, never>;
|
|
4
|
+
export declare const Disclosure: import('styled-components').StyledComponent<(props: Ariakit.DisclosureProps) => import('react').ReactElement<any, string | import('react').JSXElementConstructor<any>>, import('@xstyled/system').Theme, {}, never>;
|
|
5
|
+
export declare const Content: import('styled-components').StyledComponent<({ unmountOnHide, ...props }: Ariakit.DisclosureContentProps) => import("react/jsx-runtime").JSX.Element | null, import('@xstyled/system').Theme, {}, never>;
|
|
6
|
+
export declare const ContentChild: import('styled-components').StyledComponent<string, import('@xstyled/system').Theme, {}, never>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CSSObject } from '@xstyled/styled-components';
|
|
2
|
+
import { ThemeValues } from '../../theme';
|
|
3
|
+
export type ThemeAccordions = {
|
|
4
|
+
content: CSSObject;
|
|
5
|
+
icon: CSSObject;
|
|
6
|
+
padding: string;
|
|
7
|
+
title: CSSObject;
|
|
8
|
+
wrapper: CSSObject;
|
|
9
|
+
};
|
|
10
|
+
export declare const getAccordions: (theme: ThemeValues) => ThemeAccordions;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ButtonProps } from '@welcome-ui/button';
|
|
3
|
+
import { CreateWuiProps } from '../System';
|
|
4
|
+
type Size = 'sm' | 'md';
|
|
5
|
+
type Variant = 'danger' | 'success' | 'warning' | 'info' | 'default' | 'beige';
|
|
6
|
+
export interface AlertOptions {
|
|
7
|
+
closeButtonDataTestId?: string;
|
|
8
|
+
cta?: JSX.Element;
|
|
9
|
+
/**
|
|
10
|
+
* @description add a close button with an onclick handleClose function
|
|
11
|
+
*/
|
|
12
|
+
handleClose?: () => void;
|
|
13
|
+
icon?: JSX.Element | null;
|
|
14
|
+
isFullWidth?: boolean;
|
|
15
|
+
size?: Size;
|
|
16
|
+
variant?: Variant;
|
|
17
|
+
}
|
|
18
|
+
export type AlertProps = CreateWuiProps<'div', AlertOptions>;
|
|
19
|
+
export declare const Alert: import('../System').CreateWuiComponent<"div", AlertProps> & {
|
|
20
|
+
Title: React.FC<import('./Title').AlertTitleProps>;
|
|
21
|
+
Button: import('../System').CreateWuiComponent<"button", Omit<ButtonProps, "variant" | "size">>;
|
|
22
|
+
SecondaryButton: import('../System').CreateWuiComponent<"button", Omit<ButtonProps, "variant" | "size">>;
|
|
23
|
+
};
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AlertTitleProps } from './Title';
|
|
2
|
+
import { AlertOptions } from './index';
|
|
3
|
+
export declare const Content: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, import('@xstyled/system').SystemProps<import('@xstyled/system').Theme>, never>;
|
|
4
|
+
export declare const Icon: import('styled-components').StyledComponent<import('@welcome-ui/system').CreateWuiComponent<"div", import('@welcome-ui/variant-icon').VariantIconProps>, import('@xstyled/system').Theme, {}, never>;
|
|
5
|
+
export declare const Alert: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, import('@xstyled/system').SystemProps<import('@xstyled/system').Theme> & AlertOptions, never>;
|
|
6
|
+
export declare const Title: import('styled-components').StyledComponent<import('@welcome-ui/system').CreateWuiComponent<"p", import('@welcome-ui/text').TextProps>, import('@xstyled/system').Theme, AlertTitleProps, never>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CSSObject } from '@xstyled/styled-components';
|
|
2
|
+
import { ThemeValues } from '../../theme';
|
|
3
|
+
type State = 'default' | 'danger' | 'warning' | 'info' | 'success' | 'beige';
|
|
4
|
+
type Sizes = 'sm' | 'md';
|
|
5
|
+
type AttributesState = CSSObject;
|
|
6
|
+
export type ThemeAlerts = {
|
|
7
|
+
default: CSSObject;
|
|
8
|
+
sizes: Record<Sizes, CSSObject>;
|
|
9
|
+
title: {
|
|
10
|
+
default: CSSObject;
|
|
11
|
+
sizes: Record<Sizes, CSSObject>;
|
|
12
|
+
};
|
|
13
|
+
} & Record<State, AttributesState>;
|
|
14
|
+
export declare const getAlerts: (theme: ThemeValues) => ThemeAlerts;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CreateWuiProps } from '../System';
|
|
2
|
+
export interface AspectRatioOptions {
|
|
3
|
+
ratio?: number;
|
|
4
|
+
}
|
|
5
|
+
export type AspectRatioProps = CreateWuiProps<'div', AspectRatioOptions>;
|
|
6
|
+
export declare const AspectRatio: import('../System').CreateWuiComponent<"div", AspectRatioProps>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ShapeOptions } from '@welcome-ui/shape';
|
|
3
|
+
import { Theme } from '@xstyled/styled-components';
|
|
4
|
+
import { CreateWuiProps } from '../System';
|
|
5
|
+
type SubColor = Theme['colors'];
|
|
6
|
+
type Size = 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
7
|
+
export interface AvatarOptions {
|
|
8
|
+
color?: string | SubColor;
|
|
9
|
+
getInitials?: (name: string) => string;
|
|
10
|
+
name: string;
|
|
11
|
+
size?: Size;
|
|
12
|
+
src?: string;
|
|
13
|
+
}
|
|
14
|
+
export type AvatarProps = CreateWuiProps<'div', AvatarOptions & ShapeOptions>;
|
|
15
|
+
export declare const Avatar: React.FC<AvatarProps>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const Avatar: import('styled-components').StyledComponent<import('@welcome-ui/system').CreateWuiComponent<"div", import('@welcome-ui/shape').ShapeProps>, import('@xstyled/system').Theme, {}, never>;
|
|
2
|
+
export declare const Text: import('styled-components').StyledComponent<import('@welcome-ui/system').CreateWuiComponent<"p", import('@welcome-ui/text').TextProps>, import('@xstyled/system').Theme, {}, never>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CSSObject } from '@xstyled/styled-components';
|
|
2
|
+
import { ThemeValues } from '../../theme';
|
|
3
|
+
type Size = 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
4
|
+
export type ThemeAvatars = {
|
|
5
|
+
sizes: Record<Size, string>;
|
|
6
|
+
text: CSSObject;
|
|
7
|
+
};
|
|
8
|
+
export declare const getAvatars: (theme: ThemeValues) => ThemeAvatars;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CreateWuiProps } from '../System';
|
|
3
|
+
export type BadgeOptions = {
|
|
4
|
+
children: React.ReactElement | string | number;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
size?: 'sm' | 'md';
|
|
7
|
+
variant?: 'default' | 'primary';
|
|
8
|
+
withNumberAbbreviation?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export type BadgeProps = CreateWuiProps<'div', BadgeOptions>;
|
|
11
|
+
export declare const Badge: import('../System').CreateWuiComponent<"div", BadgeProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { WuiProps } from '@welcome-ui/system';
|
|
2
|
+
import { BadgeOptions } from '.';
|
|
3
|
+
export type StyledBadgeProps = Pick<BadgeOptions, 'disabled' | 'size' | 'variant'> & {
|
|
4
|
+
length: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const Badge: import('styled-components').StyledComponent<string, import('@xstyled/system').Theme, Pick<BadgeOptions, "variant" | "disabled" | "size"> & {
|
|
7
|
+
length: number;
|
|
8
|
+
} & WuiProps, never>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CSSObject } from '@xstyled/styled-components';
|
|
2
|
+
import { ThemeValues } from '../../theme';
|
|
3
|
+
export type ThemeBadges = {
|
|
4
|
+
default: CSSObject;
|
|
5
|
+
disabled: {
|
|
6
|
+
default: CSSObject;
|
|
7
|
+
primary: CSSObject;
|
|
8
|
+
};
|
|
9
|
+
sizes: {
|
|
10
|
+
md: CSSObject;
|
|
11
|
+
sm: CSSObject;
|
|
12
|
+
};
|
|
13
|
+
variants: {
|
|
14
|
+
default: CSSObject;
|
|
15
|
+
primary: CSSObject;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export declare const getBadges: (theme: ThemeValues) => ThemeBadges;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CreateWuiProps } from '../System';
|
|
3
|
+
export interface ItemOptions {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
isActive?: boolean;
|
|
6
|
+
separator?: string | React.ReactNode;
|
|
7
|
+
to?: string;
|
|
8
|
+
}
|
|
9
|
+
export type ItemProps = CreateWuiProps<'a', ItemOptions>;
|
|
10
|
+
/**
|
|
11
|
+
* @name Breadcrumb.Item
|
|
12
|
+
*/
|
|
13
|
+
export declare const Item: import('../System').CreateWuiComponent<"a", ItemProps>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const Item: import('styled-components').StyledComponent<"a", import('@xstyled/system').Theme, import('@xstyled/system').SystemProps<import('@xstyled/system').Theme>, never>;
|
|
2
|
+
export declare const Separator: import('styled-components').StyledComponent<"span", import('@xstyled/system').Theme, import('@xstyled/system').SystemProps<import('@xstyled/system').Theme>, never>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Theme } from '@xstyled/styled-components';
|
|
3
|
+
import { CreateWuiProps } from '../System';
|
|
4
|
+
type Colors = Theme['colors'];
|
|
5
|
+
export interface BreadcrumbOptions {
|
|
6
|
+
children: React.ReactNode | React.ReactNode[];
|
|
7
|
+
/** color from theme, add for scroll gradient on mobile */
|
|
8
|
+
gradientBackground?: Colors;
|
|
9
|
+
/** set clickable or not the last child */
|
|
10
|
+
lastChildNotClickable?: boolean;
|
|
11
|
+
separator?: string | React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export type BreadcrumbProps = CreateWuiProps<'div', BreadcrumbOptions>;
|
|
14
|
+
export declare const BreadcrumbComponent: import('../System').CreateWuiComponent<"div", BreadcrumbProps>;
|
|
15
|
+
export declare const Breadcrumb: import('../System').CreateWuiComponent<"div", BreadcrumbProps> & {
|
|
16
|
+
Item: import('../System').CreateWuiComponent<"a", import('./Item').ItemProps>;
|
|
17
|
+
};
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Theme } from '@xstyled/styled-components';
|
|
2
|
+
import { BreadcrumbOptions } from './index';
|
|
3
|
+
export declare const StartGradient: import('styled-components').StyledComponent<"span", Theme, import('@xstyled/system').SystemProps<Theme> & Pick<BreadcrumbOptions, "gradientBackground">, never>;
|
|
4
|
+
export declare const EndGradient: import('styled-components').StyledComponent<"span", Theme, import('@xstyled/system').SystemProps<Theme> & Pick<BreadcrumbOptions, "gradientBackground">, never>;
|
|
5
|
+
export declare const Breadcrumb: import('styled-components').StyledComponent<"div", Theme, import('@xstyled/system').SystemProps<Theme>, never>;
|
|
6
|
+
export declare const List: import('styled-components').StyledComponent<"ol", Theme, import('@xstyled/system').SystemProps<Theme>, never>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CSSObject } from '@xstyled/styled-components';
|
|
2
|
+
import { ThemeValues } from '../../theme';
|
|
3
|
+
export type ThemeBreadcrumbs = {
|
|
4
|
+
item: {
|
|
5
|
+
active: CSSObject;
|
|
6
|
+
default: CSSObject;
|
|
7
|
+
hover: CSSObject;
|
|
8
|
+
};
|
|
9
|
+
list: CSSObject;
|
|
10
|
+
separator: CSSObject;
|
|
11
|
+
};
|
|
12
|
+
export declare const getBreadcrumbs: (theme: ThemeValues) => ThemeBreadcrumbs;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CreateWuiProps } from '../System';
|
|
3
|
+
type Shape = 'circle' | 'square';
|
|
4
|
+
type Size = 'xs' | 'sm' | 'md' | 'lg';
|
|
5
|
+
type Variant = 'primary' | 'secondary' | 'tertiary' | 'ghost' | 'disabled';
|
|
6
|
+
export interface ButtonOptions {
|
|
7
|
+
/** Danger button with 3 variants: primary / tertiary / ghost */
|
|
8
|
+
danger?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
isLoading?: boolean;
|
|
11
|
+
shape?: Shape;
|
|
12
|
+
size?: Size;
|
|
13
|
+
variant?: Variant;
|
|
14
|
+
}
|
|
15
|
+
export type ButtonProps = CreateWuiProps<'button', ButtonOptions>;
|
|
16
|
+
/**
|
|
17
|
+
* @tag button
|
|
18
|
+
*/
|
|
19
|
+
export declare const Button: import('../System').CreateWuiComponent<"button", ButtonProps>;
|
|
20
|
+
export declare const StyledButton: import('styled-components').StyledComponent<(props: import('@ariakit/react').ButtonProps) => import('react').ReactElement<any, string | import('react').JSXElementConstructor<any>>, import('@xstyled/system').Theme, ButtonOptions, never>;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { ButtonOptions } from './index';
|
|
2
|
+
export declare const Button: import('styled-components').StyledComponent<(props: import('@ariakit/react').ButtonProps) => import('react').ReactElement<any, string | import('react').JSXElementConstructor<any>>, import('@xstyled/system').Theme, ButtonOptions, never>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CSSObject } from '@xstyled/styled-components';
|
|
2
|
+
import { ThemeValues } from '../../theme';
|
|
3
|
+
import { ThemeFocus } from '../../theme/focus';
|
|
4
|
+
type CommonAttributesButton = CSSObject;
|
|
5
|
+
type SizeAttributesButton = CSSObject;
|
|
6
|
+
type Variant = 'primary' | 'secondary' | 'tertiary' | 'ghost';
|
|
7
|
+
type Size = 'xs' | 'sm' | 'md' | 'lg';
|
|
8
|
+
type Icon = 'only' | 'default';
|
|
9
|
+
export type ThemeButtons = Record<Variant | 'danger', CommonAttributesButton> & Record<'hover', Record<Variant | 'danger', CommonAttributesButton>> & Record<'focus', Record<Variant | 'danger', unknown>> & Record<'active', Record<Variant | 'danger', CommonAttributesButton>> & Record<'disabled', CommonAttributesButton & {
|
|
10
|
+
'&:focus': ReturnType<ThemeFocus>;
|
|
11
|
+
}> & Record<'sizes', Record<Size, SizeAttributesButton>> & Record<'icon', Record<Icon, Record<Size, string>>>;
|
|
12
|
+
export declare const getButtons: (theme: ThemeValues) => ThemeButtons;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CreateWuiProps } from '../System';
|
|
3
|
+
import { Button, ButtonProps } from '../Button';
|
|
4
|
+
type ChildType = React.ReactElement<typeof Button> | null | undefined | boolean;
|
|
5
|
+
type ChildrenProps = ChildType | ChildType[];
|
|
6
|
+
export interface ButtonGroupOptions {
|
|
7
|
+
children: ChildrenProps;
|
|
8
|
+
/** Disable all your buttons components */
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
size?: ButtonProps['size'];
|
|
11
|
+
variant?: ButtonProps['variant'];
|
|
12
|
+
}
|
|
13
|
+
export type ButtonGroupProps = CreateWuiProps<'div', ButtonGroupOptions>;
|
|
14
|
+
export declare const ButtonGroup: import('../System').CreateWuiComponent<"div", ButtonGroupProps>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ButtonGroup: import('styled-components').StyledComponent<string, import('@xstyled/system').Theme, import('@xstyled/util').Props<import('@xstyled/system').Theme> & import('@xstyled/system').SystemProps<import('@xstyled/system').Theme>, never>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ShapeProps } from '@welcome-ui/shape';
|
|
3
|
+
export interface CoverOptions {
|
|
4
|
+
src: string;
|
|
5
|
+
}
|
|
6
|
+
export type CoverProps = CoverOptions & ShapeProps;
|
|
7
|
+
/**
|
|
8
|
+
* @name Card.Cover
|
|
9
|
+
*/
|
|
10
|
+
export declare const Cover: React.FC<CoverProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Cover: import('styled-components').StyledComponent<import('@welcome-ui/system').CreateWuiComponent<"div", import('@welcome-ui/shape').ShapeProps>, import('@xstyled/system').Theme, {}, never>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CreateWuiProps } from '../System';
|
|
3
|
+
export type CardProps = CreateWuiProps<'div'>;
|
|
4
|
+
export declare const CardComponent: import('../System').CreateWuiComponent<"div", CardProps>;
|
|
5
|
+
export declare const Card: import('../System').CreateWuiComponent<"div", CardProps> & {
|
|
6
|
+
Body: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, import('@xstyled/system').SystemProps<import('@xstyled/system').Theme>, never>;
|
|
7
|
+
Cover: React.FC<import('./Cover').CoverProps>;
|
|
8
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const Card: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, import('@xstyled/system').SystemProps<import('@xstyled/system').Theme>, never>;
|
|
2
|
+
export declare const Body: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, import('@xstyled/system').SystemProps<import('@xstyled/system').Theme>, never>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ButtonOptions } from '../Button';
|
|
2
|
+
import { CreateWuiProps } from '../System';
|
|
3
|
+
export type ClearButtonProps = CreateWuiProps<'button', Omit<ButtonOptions, 'shape' | 'title' | 'variant'>>;
|
|
4
|
+
export declare const ClearButton: import('../System').CreateWuiComponent<"button", ClearButtonProps>;
|
|
5
|
+
export declare const StyledClearButton: import('styled-components').StyledComponent<import('../System').CreateWuiComponent<"button", import('../Button').ButtonProps>, import('@xstyled/system').Theme, {}, never>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ClearButton: import('styled-components').StyledComponent<import('..').CreateWuiComponent<"button", import('../Button').ButtonProps>, import('@xstyled/system').Theme, {}, never>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CloseButton: import('styled-components').StyledComponent<import('..').CreateWuiComponent<"button", import('../Button').ButtonProps>, import('@xstyled/system').Theme, {}, never>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CreateWuiProps, WuiProps } from '../System';
|
|
2
|
+
export interface FlexOptions {
|
|
3
|
+
/** same as alignItems */
|
|
4
|
+
align?: WuiProps['alignItems'];
|
|
5
|
+
/** same as flexBasis */
|
|
6
|
+
basis?: WuiProps['flexBasis'];
|
|
7
|
+
/** same as flexDirection */
|
|
8
|
+
direction?: WuiProps['flexDirection'];
|
|
9
|
+
/** same as flexGrow */
|
|
10
|
+
grow?: WuiProps['flexGrow'];
|
|
11
|
+
/** same as justifyContent */
|
|
12
|
+
justify?: WuiProps['justifyContent'];
|
|
13
|
+
/** same as flexShrink */
|
|
14
|
+
shrink?: WuiProps['flexShrink'];
|
|
15
|
+
/** same as flexWrap */
|
|
16
|
+
wrap?: WuiProps['flexWrap'];
|
|
17
|
+
}
|
|
18
|
+
export type FlexProps = CreateWuiProps<'div', FlexOptions>;
|
|
19
|
+
export declare const Flex: import('../System').CreateWuiComponent<"div", FlexProps>;
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
export * from './Accordion';
|
|
2
|
+
export * from './Alert';
|
|
3
|
+
export * from './AspectRatio';
|
|
4
|
+
export * from './Avatar';
|
|
5
|
+
export * from './Badge';
|
|
1
6
|
export * from './Box';
|
|
7
|
+
export * from './Breadcrumb';
|
|
8
|
+
export * from './Button';
|
|
9
|
+
export * from './ButtonGroup';
|
|
10
|
+
export * from './Card';
|
|
11
|
+
export * from './ClearButton';
|
|
12
|
+
export * from './CloseButton';
|
|
13
|
+
export * from './Flex';
|
|
2
14
|
export * from './System';
|
|
3
15
|
export * from './WuiProvider';
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { CSSScalar, ITheme as StyledComponentDefaultTheme, DefaultTheme as XStyledDefaultTheme } from '@xstyled/styled-components';
|
|
2
|
+
import { ThemeAccordions } from '../components/Accordion/theme';
|
|
3
|
+
import { ThemeAlerts } from '../components/Alert/theme';
|
|
4
|
+
import { ThemeAvatars } from '../components/Avatar/theme';
|
|
5
|
+
import { ThemeBadges } from '../components/Badge/theme';
|
|
6
|
+
import { ThemeBreadcrumbs } from '../components/Breadcrumb/theme';
|
|
7
|
+
import { ThemeCards } from '../components/Card/theme';
|
|
2
8
|
import { darkTheme } from './dark';
|
|
3
9
|
import { ThemeColors } from './colors';
|
|
4
10
|
import { ThemeFontFaces } from './fonts';
|
|
@@ -16,7 +22,13 @@ type OverrideKeys = 'colors' | 'radii' | 'borderWidths' | 'fontSizes' | 'lineHei
|
|
|
16
22
|
type XStyledTheme = Omit<XStyledDefaultTheme, OverrideKeys>;
|
|
17
23
|
type StyledComponentsTheme = Omit<StyledComponentDefaultTheme, OverrideKeys>;
|
|
18
24
|
export interface ThemeValues extends XStyledTheme, StyledComponentsTheme {
|
|
25
|
+
accordions: ThemeAccordions;
|
|
26
|
+
alert: ThemeAlerts;
|
|
27
|
+
avatars: ThemeAvatars;
|
|
28
|
+
badges: ThemeBadges;
|
|
19
29
|
borderWidths: ThemeBorderWidths;
|
|
30
|
+
breadcrumbs: ThemeBreadcrumbs;
|
|
31
|
+
cards: ThemeCards;
|
|
20
32
|
colors: ThemeColors;
|
|
21
33
|
defaultLetterSpacing: string;
|
|
22
34
|
defaultLineHeight: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "welcome-ui",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.3",
|
|
4
4
|
"description": "Customizable design system with react • styled-components • styled-system and ariakit.",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -15,8 +15,9 @@
|
|
|
15
15
|
"require": "./dist/index.js"
|
|
16
16
|
},
|
|
17
17
|
"./*": {
|
|
18
|
-
"
|
|
19
|
-
"
|
|
18
|
+
"types": "./dist/types/components/*/index.d.ts",
|
|
19
|
+
"import": "./dist/*.mjs",
|
|
20
|
+
"require": "./dist/*.js"
|
|
20
21
|
}
|
|
21
22
|
},
|
|
22
23
|
"scripts": {
|
|
@@ -48,14 +49,18 @@
|
|
|
48
49
|
"@ariakit/react": "0.4.15"
|
|
49
50
|
},
|
|
50
51
|
"devDependencies": {
|
|
52
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
53
|
+
"@testing-library/react": "^16.1.0",
|
|
54
|
+
"@testing-library/user-event": "^14.5.2",
|
|
51
55
|
"@types/react": "^18.3.12",
|
|
52
56
|
"@xstyled/styled-components": "^3.7.3",
|
|
53
57
|
"react": "^18.0.0",
|
|
58
|
+
"react-docgen-typescript": "^2.2.2",
|
|
54
59
|
"rollup-preserve-directives": "^1.1.3",
|
|
55
60
|
"styled-components": "^5.3.9",
|
|
56
61
|
"typescript": "^5.6.3",
|
|
57
|
-
"vite-plugin-dts": "^4.3.0",
|
|
58
62
|
"vite": "^5.4.10",
|
|
63
|
+
"vite-plugin-dts": "^4.3.0",
|
|
59
64
|
"wttj-config": "^3.0.1"
|
|
60
65
|
},
|
|
61
66
|
"peerDependencies": {
|
package/dist/box.mjs
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|