@vespiario-thailand/design-system 0.0.1 → 0.0.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/README.md +24 -1
- package/dist/components/Breadcrumb/BreadcrumbItem.d.ts +5 -0
- package/dist/components/Breadcrumb/BreadcrumbLink.d.ts +5 -0
- package/dist/components/Breadcrumb/index.d.ts +8 -0
- package/dist/components/Button/index.d.ts +19 -3
- package/dist/components/ButtonCross/index.d.ts +10 -0
- package/dist/components/Chip/index.d.ts +6 -7
- package/dist/components/Dialog/index.d.ts +5 -7
- package/dist/components/Icon/index.d.ts +11 -10
- package/dist/components/ImagePlaceholder/index.d.ts +10 -0
- package/dist/components/Logo/index.d.ts +12 -0
- package/dist/components/NumberSwitch/NumberSwitchButton.d.ts +8 -0
- package/dist/components/NumberSwitch/NumberSwitchInput.d.ts +5 -0
- package/dist/components/NumberSwitch/index.d.ts +14 -0
- package/dist/components/Popover/index.d.ts +11 -0
- package/dist/components/Select/SelectContent.d.ts +2 -0
- package/dist/components/Select/SelectItem.d.ts +2 -0
- package/dist/components/Select/SelectTrigger.d.ts +2 -0
- package/dist/components/Select/index.d.ts +16 -0
- package/dist/components/Slider/index.d.ts +2 -0
- package/dist/components/Stack/index.d.ts +3 -4
- package/dist/components/Switch/index.d.ts +8 -0
- package/dist/components/TextArea/index.d.ts +9 -0
- package/dist/components/TextField/index.d.ts +9 -0
- package/dist/components/TextFieldGroup/TextFieldGroupLeftElement.d.ts +4 -0
- package/dist/components/TextFieldGroup/TextFieldGroupRightElement.d.ts +4 -0
- package/dist/components/TextFieldGroup/index.d.ts +11 -0
- package/dist/components/TextFieldSlug/TextFieldSlugInput.d.ts +6 -0
- package/dist/components/TextFieldSlug/TextFieldSlugPrefix.d.ts +8 -0
- package/dist/components/TextFieldSlug/index.d.ts +22 -0
- package/dist/components/Tooltip/index.d.ts +14 -0
- package/dist/components/TouchPoint/TouchPointLabel.d.ts +8 -0
- package/dist/components/TouchPoint/index.d.ts +5 -0
- package/dist/components/Typo/index.d.ts +14 -10
- package/dist/constants/Button/index.d.ts +3 -0
- package/dist/constants/ButtonCross/index.d.ts +2 -0
- package/dist/constants/Chip/index.d.ts +2 -0
- package/dist/constants/Icon/index.d.ts +4 -0
- package/dist/constants/ImagePlaceholder/index.d.ts +2 -0
- package/dist/constants/Logo/index.d.ts +2 -0
- package/dist/constants/Paginate/index.d.ts +2 -0
- package/dist/constants/Stack/index.d.ts +3 -0
- package/dist/constants/Tooltip/index.d.ts +2 -0
- package/dist/constants/TouchPoint/index.d.ts +3 -0
- package/dist/constants/Typo/index.d.ts +4 -0
- package/dist/custom-theme.cjs +21 -9
- package/dist/functions/index.d.ts +4 -0
- package/dist/hooks/useIsomorphicLayoutEffect.d.ts +2 -2
- package/dist/hooks/useMergeRefs.d.ts +2 -2
- package/dist/index.d.ts +31 -17
- package/dist/style.css +1 -1
- package/dist/types/Button/index.d.ts +6 -32
- package/dist/types/ButtonCross/index.d.ts +6 -0
- package/dist/types/Chip/index.d.ts +6 -0
- package/dist/types/Icon/index.d.ts +6 -9
- package/dist/types/ImagePlaceholder/index.d.ts +5 -0
- package/dist/types/Logo/index.d.ts +3 -0
- package/dist/types/Paginate/index.d.ts +6 -0
- package/dist/types/Stack/index.d.ts +7 -0
- package/dist/types/Tooltip/index.d.ts +6 -0
- package/dist/types/TouchPoint/index.d.ts +6 -0
- package/dist/types/Typo/index.d.ts +7 -26
- package/dist/vespa-design-system.cjs +83 -83
- package/dist/vespa-design-system.js.gz +0 -0
- package/dist/vespa-design-system.umd.cjs +83 -83
- package/dist/vespa-logo-dark.svg +3 -0
- package/dist/vespa-logo-light.svg +3 -0
- package/dist/vespa-logo.svg +3 -0
- package/dist/vite-env.d.ts +1 -1
- package/package.json +37 -12
- package/dist/components/Label/index.d.ts +0 -8
- package/dist/constance/Button/index.d.ts +0 -3
- package/dist/constance/Icon/index.d.ts +0 -4
- package/dist/hooks/hooks/index.ts +0 -5
- package/dist/hooks/hooks/useClickOutside.ts +0 -33
- package/dist/hooks/hooks/useIsClient.ts +0 -13
- package/dist/hooks/hooks/useIsMounted.ts +0 -17
- package/dist/hooks/hooks/useIsomorphicLayoutEffect.ts +0 -5
- package/dist/hooks/hooks/useMergeRefs.ts +0 -15
- package/dist/main.d.ts +0 -1
- package/dist/vespa-design-system.js +0 -21779
package/README.md
CHANGED
|
@@ -1 +1,24 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Vespiario Thailand
|
|
2
|
+
|
|
3
|
+
## vespa-design-system
|
|
4
|
+
|
|
5
|
+
This project was created with
|
|
6
|
+
|
|
7
|
+
- [Vite js](https://vitejs.dev/).
|
|
8
|
+
- [Storybook](https://storybook.js.org/).
|
|
9
|
+
- [TailwindCSS](https://tailwindcss.com/).
|
|
10
|
+
|
|
11
|
+
### `yarn build`
|
|
12
|
+
|
|
13
|
+
Builds the app for production to the `dist` folder.\
|
|
14
|
+
Use this for publishing to npm package `@VespiarioThailand/design-system`.
|
|
15
|
+
|
|
16
|
+
### `yarn storybook`
|
|
17
|
+
|
|
18
|
+
Runs the app in the storybook development mode.\
|
|
19
|
+
Open [http://localhost:6006](http://localhost:6006) to view it in the browser.
|
|
20
|
+
|
|
21
|
+
### `yarn build-storybook`
|
|
22
|
+
|
|
23
|
+
Builds the app for production to the `storybook-static` folder.\
|
|
24
|
+
Use this for deploying to staging site.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** libs */
|
|
2
|
+
import React, { LiHTMLAttributes } from 'react';
|
|
3
|
+
/** types */
|
|
4
|
+
export type BreadcrumbItemProps = LiHTMLAttributes<HTMLLIElement>;
|
|
5
|
+
export declare const BreadcrumbItem: React.ForwardRefExoticComponent<BreadcrumbItemProps & React.RefAttributes<HTMLLIElement>>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** libs */
|
|
2
|
+
import React, { AnchorHTMLAttributes } from 'react';
|
|
3
|
+
/** types */
|
|
4
|
+
export type BreadcrumbLinkProps = AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
5
|
+
export declare const BreadcrumbLink: React.ForwardRefExoticComponent<BreadcrumbLinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** libs */
|
|
2
|
+
import React, { HTMLAttributes } from 'react';
|
|
3
|
+
/** types */
|
|
4
|
+
export type BreadcrumbProps = HTMLAttributes<HTMLDivElement>;
|
|
5
|
+
export declare const Breadcrumb: React.ForwardRefExoticComponent<BreadcrumbProps & React.RefAttributes<HTMLDivElement>> & {
|
|
6
|
+
Item: React.ForwardRefExoticComponent<import("./BreadcrumbItem").BreadcrumbItemProps & React.RefAttributes<HTMLLIElement>>;
|
|
7
|
+
Link: React.ForwardRefExoticComponent<import("./BreadcrumbLink").BreadcrumbLinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
8
|
+
};
|
|
@@ -1,5 +1,21 @@
|
|
|
1
|
+
/** libs */
|
|
2
|
+
import { ButtonHTMLAttributes } from 'react';
|
|
1
3
|
/** types */
|
|
2
|
-
import {
|
|
4
|
+
import { ButtonSizeType, ButtonVariantType } from '../../types/Button';
|
|
5
|
+
import { IconType } from '../../types/Icon';
|
|
6
|
+
type CommonButtonType = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
7
|
+
sizes?: ButtonSizeType;
|
|
8
|
+
variant?: ButtonVariantType;
|
|
9
|
+
iconLeft?: IconType;
|
|
10
|
+
isLoading?: boolean;
|
|
11
|
+
};
|
|
12
|
+
type ConditionButtonIconType = {
|
|
13
|
+
onlyIcon?: never;
|
|
14
|
+
iconRight?: IconType;
|
|
15
|
+
} | {
|
|
16
|
+
onlyIcon?: boolean;
|
|
17
|
+
iconRight?: never;
|
|
18
|
+
};
|
|
3
19
|
export type ButtonPropType = CommonButtonType & ConditionButtonIconType;
|
|
4
|
-
declare const Button: import("react").ForwardRefExoticComponent<ButtonPropType & import("react").RefAttributes<HTMLButtonElement>>;
|
|
5
|
-
export
|
|
20
|
+
export declare const Button: import("react").ForwardRefExoticComponent<ButtonPropType & import("react").RefAttributes<HTMLButtonElement>>;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** libs */
|
|
2
|
+
import { ButtonHTMLAttributes } from 'react';
|
|
3
|
+
/** types */
|
|
4
|
+
import { ButtonCrossVariantsType } from '../../types/ButtonCross';
|
|
5
|
+
export type ButtonCrossProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
6
|
+
variant?: ButtonCrossVariantsType;
|
|
7
|
+
};
|
|
8
|
+
export declare const ButtonCross: import("react").ForwardRefExoticComponent<ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
9
|
+
variant?: "reset-input" | undefined;
|
|
10
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** libs */
|
|
2
2
|
import { HTMLAttributes } from 'react';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
/** types */
|
|
4
|
+
import { ChipVariantsType } from '../../types/Chip';
|
|
5
5
|
export type ChipProps = HTMLAttributes<HTMLSpanElement> & {
|
|
6
|
-
|
|
6
|
+
variant?: ChipVariantsType;
|
|
7
7
|
};
|
|
8
|
-
declare const Chip: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLSpanElement> & {
|
|
9
|
-
|
|
8
|
+
export declare const Chip: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLSpanElement> & {
|
|
9
|
+
variant?: "light" | "dark" | undefined;
|
|
10
10
|
} & import("react").RefAttributes<HTMLSpanElement>>;
|
|
11
|
-
export default Chip;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
Trigger: import("react").ForwardRefExoticComponent<RadixDialog.DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
1
|
+
import * as PrimitiveDialog from '@radix-ui/react-dialog';
|
|
2
|
+
export declare const Dialog: ((props: PrimitiveDialog.DialogProps) => JSX.Element) & {
|
|
3
|
+
Confirm: (props: PrimitiveDialog.DialogCloseProps) => JSX.Element;
|
|
4
|
+
Content: import("react").ForwardRefExoticComponent<PrimitiveDialog.DialogContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
|
+
Trigger: import("react").ForwardRefExoticComponent<PrimitiveDialog.DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
7
6
|
};
|
|
8
|
-
export default CompoundDialog;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** libs */
|
|
2
2
|
import { HTMLAttributes } from 'react';
|
|
3
|
-
/**
|
|
3
|
+
/** types */
|
|
4
4
|
import { IconColorType, IconSizeType, IconType } from '../../types/Icon';
|
|
5
|
-
export type IconProps = HTMLAttributes<
|
|
6
|
-
icon
|
|
5
|
+
export type IconProps = HTMLAttributes<HTMLSpanElement> & {
|
|
6
|
+
icon?: IconType;
|
|
7
7
|
size?: IconSizeType;
|
|
8
8
|
color?: IconColorType;
|
|
9
|
+
iconClassName?: string;
|
|
9
10
|
};
|
|
10
|
-
declare const Icon: import("react").ForwardRefExoticComponent<HTMLAttributes<
|
|
11
|
-
icon
|
|
12
|
-
size?: "
|
|
13
|
-
color?: "blue" | "green" | "light-green" | "yellow" | "dark" | "light" | "shade-dark" | "shade-light" | undefined;
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
export declare const Icon: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLSpanElement> & {
|
|
12
|
+
icon?: "pause" | "play" | "stop" | "list" | "arrowhead-sm-right" | "null-1" | "null-2" | "arrowhead-top" | "arrowhead-left" | "arrowhead-right" | "arrowhead-bottom" | "arrowhead-sm-top" | "arrowhead-sm-left" | "arrowhead-sm-bottom" | "round-arrow-top" | "round-arrow-left" | "round-arrow-right" | "round-arrow-bottom" | "round-solid-arrow-top" | "round-solid-arrow-left" | "round-solid-arrow-right" | "round-solid-arrow-bottom" | "cross" | "plus" | "bar" | "double-bar" | "bow-tie" | "first" | "last" | "globe" | "tako" | "kebab" | "cheese" | "veggie" | "meatball" | "hamburger" | "vespa" | "check" | "align-left" | "align-center" | "align-justify-center" | "align-justify-full" | "align-justify-left" | "align-justify-right" | "align-object-bottom" | "align-object-center" | "align-object-left" | "align-object-middle" | "align-object-right" | "align-object-top" | "align-right" | "bag-1" | "bag-2" | "bag-3" | "bag-4" | "download-1" | "download-2" | "grid-1" | "grid-2" | "cloud-error" | "cloud-upload" | "cloud-download" | "cloud" | "star-1" | "star-2" | "star-3" | "star-4" | "star-5" | "upload-1" | "upload-2" | "clipboard" | undefined;
|
|
13
|
+
size?: "16" | "12" | "20" | "24" | "32" | "40" | "48" | "56" | "60" | "72" | "80" | undefined;
|
|
14
|
+
color?: "blue-500" | "green-500" | "light-green-500" | "yellow-500" | "dark-100" | "light-100" | "light-300" | "shade-dark-500" | "shade-light-500" | undefined;
|
|
15
|
+
iconClassName?: string | undefined;
|
|
16
|
+
} & import("react").RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** libs */
|
|
2
|
+
import { HTMLAttributes } from 'react';
|
|
3
|
+
/** types */
|
|
4
|
+
import { AspectRatioType } from '../../types/ImagePlaceholder';
|
|
5
|
+
export type ImagePlaceholderProps = HTMLAttributes<HTMLDivElement> & {
|
|
6
|
+
aspectRatio?: AspectRatioType;
|
|
7
|
+
};
|
|
8
|
+
export declare const ImagePlaceholder: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
9
|
+
aspectRatio?: "1/1" | "3/4" | "4/3" | "16/9" | undefined;
|
|
10
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** libs */
|
|
2
|
+
import { HTMLAttributes } from 'react';
|
|
3
|
+
/** types */
|
|
4
|
+
import { LogoColorsType } from '../../types/Logo';
|
|
5
|
+
export type LogoProps = HTMLAttributes<HTMLImageElement> & {
|
|
6
|
+
logoColors?: LogoColorsType;
|
|
7
|
+
alt?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const Logo: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLImageElement> & {
|
|
10
|
+
logoColors?: "light" | "dark" | "default" | undefined;
|
|
11
|
+
alt?: string | undefined;
|
|
12
|
+
} & import("react").RefAttributes<HTMLImageElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** libs */
|
|
2
|
+
import { ButtonHTMLAttributes } from 'react';
|
|
3
|
+
export type NumberSwitchButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
4
|
+
variant?: 'decrease' | 'increase';
|
|
5
|
+
};
|
|
6
|
+
export declare const NumberSwitchButton: import("react").ForwardRefExoticComponent<ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
7
|
+
variant?: "decrease" | "increase" | undefined;
|
|
8
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** libs */
|
|
2
|
+
import { InputHTMLAttributes } from 'react';
|
|
3
|
+
type NumberSwitchInputProps = InputHTMLAttributes<HTMLInputElement>;
|
|
4
|
+
export declare const NumberSwitchInput: import("react").ForwardRefExoticComponent<NumberSwitchInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** libs */
|
|
2
|
+
import { HTMLAttributes } from 'react';
|
|
3
|
+
export type NumberSwitchCtxType = {
|
|
4
|
+
isError?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare const NumberSwitchCtx: import("react").Context<NumberSwitchCtxType>;
|
|
7
|
+
export declare const NumberSwitch: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
8
|
+
isError?: boolean | undefined;
|
|
9
|
+
} & import("react").RefAttributes<HTMLInputElement>> & {
|
|
10
|
+
Button: import("react").ForwardRefExoticComponent<import("react").ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
11
|
+
variant?: "decrease" | "increase" | undefined;
|
|
12
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
13
|
+
Input: import("react").ForwardRefExoticComponent<import("react").InputHTMLAttributes<HTMLInputElement> & import("react").RefAttributes<HTMLInputElement>>;
|
|
14
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as PrimitivePopover from '@radix-ui/react-popover';
|
|
2
|
+
export declare const Popover: {
|
|
3
|
+
(props: PrimitivePopover.PopoverProps): JSX.Element;
|
|
4
|
+
displayName: string;
|
|
5
|
+
} & {
|
|
6
|
+
Content: import("react").ForwardRefExoticComponent<PrimitivePopover.PopoverContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
+
Anchor: import("react").ForwardRefExoticComponent<PrimitivePopover.PopoverAnchorProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
|
+
Portal: import("react").FC<PrimitivePopover.PopoverPortalProps>;
|
|
9
|
+
Trigger: import("react").ForwardRefExoticComponent<PrimitivePopover.PopoverTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
Close: import("react").ForwardRefExoticComponent<PrimitivePopover.PopoverCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** libs */
|
|
2
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
3
|
+
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
4
|
+
export type SelectCtxType = {
|
|
5
|
+
contentWidth?: number | null;
|
|
6
|
+
setContentWidth?: Dispatch<SetStateAction<number | null>>;
|
|
7
|
+
};
|
|
8
|
+
export declare const SelectCtx: import("react").Context<SelectCtxType>;
|
|
9
|
+
export declare const Select: {
|
|
10
|
+
(props: SelectPrimitive.SelectProps): JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
} & {
|
|
13
|
+
Trigger: import("react").ForwardRefExoticComponent<SelectPrimitive.SelectTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
14
|
+
Content: import("react").ForwardRefExoticComponent<SelectPrimitive.SelectContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
15
|
+
Item: import("react").ForwardRefExoticComponent<SelectPrimitive.SelectItemProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
16
|
+
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
declare const Stack: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
3
|
-
direction
|
|
4
|
-
gap
|
|
2
|
+
export declare const Stack: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
3
|
+
direction?: "vertical" | "horizon" | undefined;
|
|
4
|
+
gap?: 0 | 4 | 8 | 16 | 12 | 20 | 24 | 32 | 40 | undefined;
|
|
5
5
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
|
-
export default Stack;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
2
|
+
/** types */
|
|
3
|
+
export type SwitchProps = SwitchPrimitive.SwitchProps & {
|
|
4
|
+
isError?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare const Switch: import("react").ForwardRefExoticComponent<SwitchPrimitive.SwitchProps & {
|
|
7
|
+
isError?: boolean | undefined;
|
|
8
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** libs */
|
|
2
|
+
import { TextareaHTMLAttributes } from 'react';
|
|
3
|
+
/** types */
|
|
4
|
+
export type TextAreaProps = TextareaHTMLAttributes<HTMLTextAreaElement> & {
|
|
5
|
+
isError?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare const TextArea: import("react").ForwardRefExoticComponent<TextareaHTMLAttributes<HTMLTextAreaElement> & {
|
|
8
|
+
isError?: boolean | undefined;
|
|
9
|
+
} & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** libs */
|
|
2
|
+
import { InputHTMLAttributes } from 'react';
|
|
3
|
+
/** types */
|
|
4
|
+
export type TextFieldProps = InputHTMLAttributes<HTMLInputElement> & {
|
|
5
|
+
isError?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare const TextField: import("react").ForwardRefExoticComponent<InputHTMLAttributes<HTMLInputElement> & {
|
|
8
|
+
isError?: boolean | undefined;
|
|
9
|
+
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** libs */
|
|
2
|
+
import { HTMLAttributes } from 'react';
|
|
3
|
+
export type TextFieldGroupLeftElementProps = HTMLAttributes<HTMLDivElement>;
|
|
4
|
+
export declare const TextFieldGroupLeftElement: import("react").ForwardRefExoticComponent<TextFieldGroupLeftElementProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** libs */
|
|
2
|
+
import { HTMLAttributes } from 'react';
|
|
3
|
+
export type TextFieldGroupRightElementProps = HTMLAttributes<HTMLDivElement>;
|
|
4
|
+
export declare const TextFieldGroupRightElement: import("react").ForwardRefExoticComponent<TextFieldGroupRightElementProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** libs */
|
|
2
|
+
import { HTMLAttributes } from 'react';
|
|
3
|
+
/** components */
|
|
4
|
+
import { TextFieldGroupLeftElementProps } from './TextFieldGroupLeftElement';
|
|
5
|
+
import { TextFieldGroupRightElementProps } from './TextFieldGroupRightElement';
|
|
6
|
+
export type { TextFieldGroupLeftElementProps, TextFieldGroupRightElementProps };
|
|
7
|
+
export type TextFieldGroupProps = HTMLAttributes<HTMLDivElement>;
|
|
8
|
+
export declare const TextFieldGroup: import("react").ForwardRefExoticComponent<TextFieldGroupProps & import("react").RefAttributes<HTMLDivElement>> & {
|
|
9
|
+
LeftElement: import("react").ForwardRefExoticComponent<TextFieldGroupLeftElementProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
10
|
+
RightElement: import("react").ForwardRefExoticComponent<TextFieldGroupRightElementProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
11
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** components */
|
|
2
|
+
import { TextFieldProps } from '../TextField';
|
|
3
|
+
export type TextFieldSlugInputProps = TextFieldProps;
|
|
4
|
+
export declare const TextFieldSlugInput: import("react").ForwardRefExoticComponent<import("react").InputHTMLAttributes<HTMLInputElement> & {
|
|
5
|
+
isError?: boolean | undefined;
|
|
6
|
+
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** components */
|
|
2
|
+
import { TextFieldGroupLeftElementProps } from '../TextFieldGroup';
|
|
3
|
+
export type TextFieldSlugPrefixProps = TextFieldGroupLeftElementProps & {
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare const TextFieldSlugPrefix: import("react").ForwardRefExoticComponent<TextFieldGroupLeftElementProps & {
|
|
7
|
+
disabled?: boolean | undefined;
|
|
8
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** components */
|
|
2
|
+
import { type TextFieldGroupProps } from '../TextFieldGroup';
|
|
3
|
+
export type TextFieldSlugCtxType = {
|
|
4
|
+
isError?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare const TextFieldSlugCtx: import("react").Context<TextFieldSlugCtxType>;
|
|
8
|
+
export type TextFieldSlugProps = TextFieldGroupProps & {
|
|
9
|
+
isError?: boolean;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare const TextFieldSlug: import("react").ForwardRefExoticComponent<TextFieldGroupProps & {
|
|
13
|
+
isError?: boolean | undefined;
|
|
14
|
+
disabled?: boolean | undefined;
|
|
15
|
+
} & import("react").RefAttributes<HTMLDivElement>> & {
|
|
16
|
+
Prefix: import("react").ForwardRefExoticComponent<import("../TextFieldGroup").TextFieldGroupLeftElementProps & {
|
|
17
|
+
disabled?: boolean | undefined;
|
|
18
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
19
|
+
Input: import("react").ForwardRefExoticComponent<import("react").InputHTMLAttributes<HTMLInputElement> & {
|
|
20
|
+
isError?: boolean | undefined;
|
|
21
|
+
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
22
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as PrimitiveTooltip from '@radix-ui/react-tooltip';
|
|
2
|
+
/** types */
|
|
3
|
+
import { TooltipVariantsType } from '../../types/Tooltip';
|
|
4
|
+
export type TooltipProps = PrimitiveTooltip.TooltipContentProps & {
|
|
5
|
+
variant?: TooltipVariantsType;
|
|
6
|
+
};
|
|
7
|
+
export declare const TooltipProvider: import("react").FC<PrimitiveTooltip.TooltipProviderProps>;
|
|
8
|
+
export declare const Tooltip: ((props: PrimitiveTooltip.TooltipProps) => JSX.Element) & {
|
|
9
|
+
Content: import("react").ForwardRefExoticComponent<PrimitiveTooltip.TooltipContentProps & {
|
|
10
|
+
variant?: "light" | "dark" | undefined;
|
|
11
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
|
+
Portal: import("react").FC<PrimitiveTooltip.TooltipPortalProps>;
|
|
13
|
+
Trigger: import("react").ForwardRefExoticComponent<PrimitiveTooltip.TooltipTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
14
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** libs */
|
|
2
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
3
|
+
export declare const TouchPointLabel: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
4
|
+
isBorder?: boolean | undefined;
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
size?: "small" | "medium" | "large" | undefined;
|
|
7
|
+
shadow?: "none" | "100" | "200" | "300" | "400" | undefined;
|
|
8
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** libs */
|
|
2
|
+
import { ButtonHTMLAttributes } from 'react';
|
|
3
|
+
/** types */
|
|
4
|
+
export type TouchPointType = ButtonHTMLAttributes<HTMLButtonElement>;
|
|
5
|
+
export declare const TouchPoint: import("react").ForwardRefExoticComponent<TouchPointType & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
/** libs */
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import React, { HTMLAttributes, ElementType } from 'react';
|
|
3
3
|
/** types */
|
|
4
|
-
import {
|
|
5
|
-
type
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
import { TextSizeType, TextStyleType, TextWeightType } from '../../types/Typo';
|
|
5
|
+
export type TypoProps = HTMLAttributes<HTMLElement> & {
|
|
6
|
+
as?: ElementType;
|
|
7
|
+
size?: TextSizeType;
|
|
8
|
+
textStyle?: TextStyleType;
|
|
9
|
+
weight?: TextWeightType;
|
|
10
|
+
};
|
|
11
|
+
export declare const Typo: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & {
|
|
12
|
+
as?: React.ElementType<any> | undefined;
|
|
13
|
+
size?: "body" | "caption" | "title-large" | "title-medium" | "title-small" | "title-small-alt" | "body-large" | "body-small" | undefined;
|
|
14
|
+
textStyle?: "normal" | "italic" | undefined;
|
|
15
|
+
weight?: "bold" | "normal" | undefined;
|
|
16
|
+
} & React.RefAttributes<HTMLElement>>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare const iconLists: readonly ["null-1", "null-2", "arrowhead-top", "arrowhead-left", "arrowhead-right", "arrowhead-bottom", "arrowhead-sm-top", "arrowhead-sm-left", "arrowhead-sm-right", "arrowhead-sm-bottom", "round-arrow-top", "round-arrow-left", "round-arrow-right", "round-arrow-bottom", "round-solid-arrow-top", "round-solid-arrow-left", "round-solid-arrow-right", "round-solid-arrow-bottom", "cross", "plus", "bar", "double-bar", "bow-tie", "play", "stop", "pause", "first", "last", "globe", "tako", "kebab", "cheese", "veggie", "meatball", "hamburger", "vespa", "check", "align-left", "align-center", "align-justify-center", "align-justify-full", "align-justify-left", "align-justify-right", "align-object-bottom", "align-object-center", "align-object-left", "align-object-middle", "align-object-right", "align-object-top", "align-right", "bag-1", "bag-2", "bag-3", "bag-4", "download-1", "download-2", "grid-1", "grid-2", "list", "cloud-error", "cloud-upload", "cloud-download", "cloud", "star-1", "star-2", "star-3", "star-4", "star-5", "upload-1", "upload-2", "clipboard"];
|
|
2
|
+
declare const iconColors: readonly ["blue-500", "green-500", "light-green-500", "yellow-500", "dark-100", "light-100", "light-300", "shade-dark-500", "shade-light-500"];
|
|
3
|
+
declare const iconSizes: readonly ["12", "16", "20", "24", "32", "40", "48", "56", "60", "72", "80"];
|
|
4
|
+
export { iconColors, iconLists, iconSizes };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare const textSizes: readonly ["title-large", "title-medium", "title-small", "title-small-alt", "body-large", "body", "body-small", "caption"];
|
|
2
|
+
declare const textStyles: readonly ["italic", "normal"];
|
|
3
|
+
declare const textWeights: readonly ["bold", "normal"];
|
|
4
|
+
export { textSizes, textStyles, textWeights };
|
package/dist/custom-theme.cjs
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
module.exports = {
|
|
4
4
|
theme: {
|
|
5
|
+
aspectRatio: {
|
|
6
|
+
'1/1': '1 / 1',
|
|
7
|
+
'3/4': '3 / 4',
|
|
8
|
+
'4/3': '4 / 3',
|
|
9
|
+
'16/9': '16 / 9',
|
|
10
|
+
},
|
|
5
11
|
boxShadow: {
|
|
6
12
|
100: '0px 4px 4px -1px rgba(0, 0, 0, 0.25)',
|
|
7
13
|
200: '0px 8px 8px -2px rgba(0, 0, 0, 0.25)',
|
|
@@ -24,7 +30,7 @@ module.exports = {
|
|
|
24
30
|
},
|
|
25
31
|
fontFamily: {
|
|
26
32
|
'vespa-thai': ['Vespiario Thai', 'system-ui', 'sans-serif'],
|
|
27
|
-
'vespa-thai-italic': ['Vespiario Condensed Italic',
|
|
33
|
+
'vespa-thai-italic': ['Vespiario Condensed Italic', 'system-ui', 'sans-serif'],
|
|
28
34
|
},
|
|
29
35
|
fontSize: {
|
|
30
36
|
/** name: [fontSize, lineHeight] */
|
|
@@ -45,11 +51,17 @@ module.exports = {
|
|
|
45
51
|
},
|
|
46
52
|
spacing: {
|
|
47
53
|
0: '0',
|
|
54
|
+
2: '2px',
|
|
48
55
|
4: '4px',
|
|
56
|
+
6: '6px',
|
|
49
57
|
8: '8px',
|
|
58
|
+
10: '10px',
|
|
50
59
|
12: '12px',
|
|
60
|
+
14: '14px',
|
|
51
61
|
16: '16px',
|
|
62
|
+
18: '18px',
|
|
52
63
|
20: '20px',
|
|
64
|
+
22: '22px',
|
|
53
65
|
24: '24px',
|
|
54
66
|
32: '32px',
|
|
55
67
|
40: '40px',
|
|
@@ -157,18 +169,18 @@ module.exports = {
|
|
|
157
169
|
keyframes: {
|
|
158
170
|
overlayShow: {
|
|
159
171
|
from: { opacity: 0 },
|
|
160
|
-
to: { opacity: 1 }
|
|
172
|
+
to: { opacity: 1 },
|
|
161
173
|
},
|
|
162
174
|
contentShow: {
|
|
163
175
|
from: {
|
|
164
176
|
opacity: 0,
|
|
165
|
-
transform: 'translate(-50%, -48%) scale(0.96)'
|
|
177
|
+
transform: 'translate(-50%, -48%) scale(0.96)',
|
|
166
178
|
},
|
|
167
179
|
to: {
|
|
168
180
|
opacity: 1,
|
|
169
|
-
transform: 'translate(-50%, -50%) scale(1)'
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
181
|
+
transform: 'translate(-50%, -50%) scale(1)',
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
declare const useIsomorphicLayoutEffect: typeof
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
declare const useIsomorphicLayoutEffect: typeof useEffect;
|
|
3
3
|
export default useIsomorphicLayoutEffect;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
declare const useMergeRefs: <T =
|
|
1
|
+
import { MutableRefObject, LegacyRef, RefCallback } from 'react';
|
|
2
|
+
declare const useMergeRefs: <T = unknown>(refs: (LegacyRef<T> | MutableRefObject<T>)[]) => (instance: T | null) => void;
|
|
3
3
|
export default useMergeRefs;
|