@vespiario-thailand/design-system 0.0.1 → 0.0.2
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/Button/index.d.ts +17 -1
- package/dist/components/ButtonCross/index.d.ts +11 -0
- package/dist/components/Chip/index.d.ts +5 -5
- package/dist/components/Dialog/index.d.ts +5 -6
- package/dist/components/Icon/index.d.ts +11 -9
- package/dist/components/ImagePlaceholder/index.d.ts +11 -0
- package/dist/components/Logo/index.d.ts +13 -0
- package/dist/components/NumberSwitch/NumberSwitchButton.d.ts +6 -0
- package/dist/components/NumberSwitch/NumberSwitchInput.d.ts +5 -0
- package/dist/components/NumberSwitch/index.d.ts +15 -0
- package/dist/components/Popover/index.d.ts +12 -0
- package/dist/components/Select/SelectContent.d.ts +3 -0
- package/dist/components/Select/SelectItem.d.ts +3 -0
- package/dist/components/Select/SelectTrigger.d.ts +3 -0
- package/dist/components/Select/index.d.ts +11 -0
- package/dist/components/Slider/index.d.ts +2 -0
- package/dist/components/Stack/index.d.ts +2 -2
- package/dist/components/Switch/index.d.ts +9 -0
- package/dist/components/TextArea/index.d.ts +10 -0
- package/dist/components/TextField/index.d.ts +10 -0
- package/dist/components/TextFieldGroup/TextFieldGroupLeftElement.d.ts +5 -0
- package/dist/components/TextFieldGroup/TextFieldGroupRightElement.d.ts +5 -0
- package/dist/components/TextFieldGroup/index.d.ts +12 -0
- package/dist/components/TextFieldSlug/TextFieldSlugInput.d.ts +7 -0
- package/dist/components/TextFieldSlug/TextFieldSlugPrefix.d.ts +9 -0
- package/dist/components/TextFieldSlug/index.d.ts +23 -0
- package/dist/components/Tooltip/index.d.ts +14 -0
- package/dist/components/TouchPoint/TouchPointLabel.d.ts +9 -0
- package/dist/components/TouchPoint/index.d.ts +6 -0
- package/dist/components/Typo/index.d.ts +4 -6
- 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 +5 -0
- package/dist/custom-theme.cjs +21 -9
- package/dist/functions/index.d.ts +4 -0
- package/dist/hooks/hooks/useClickOutside.ts +2 -1
- package/dist/hooks/hooks/useIsClient.ts +1 -1
- package/dist/hooks/hooks/useIsomorphicLayoutEffect.ts +1 -1
- package/dist/hooks/hooks/useMergeRefs.ts +2 -2
- package/dist/hooks/useIsomorphicLayoutEffect.d.ts +2 -2
- package/dist/hooks/useMergeRefs.d.ts +2 -2
- package/dist/index.d.ts +30 -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 +8 -26
- package/dist/vespa-design-system.cjs +83 -83
- package/dist/vespa-design-system.js +14722 -11290
- 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 +33 -10
- 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/main.d.ts +0 -1
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.
|
|
@@ -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
20
|
declare const Button: import("react").ForwardRefExoticComponent<ButtonPropType & import("react").RefAttributes<HTMLButtonElement>>;
|
|
5
21
|
export default Button;
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
declare const ButtonCross: import("react").ForwardRefExoticComponent<ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
9
|
+
variant?: "reset-input" | undefined;
|
|
10
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
export default ButtonCross;
|
|
@@ -1,11 +1,11 @@
|
|
|
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
8
|
declare const Chip: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLSpanElement> & {
|
|
9
|
-
|
|
9
|
+
variant?: "light" | "dark" | undefined;
|
|
10
10
|
} & import("react").RefAttributes<HTMLSpanElement>>;
|
|
11
11
|
export default Chip;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
Trigger: import("react").ForwardRefExoticComponent<RadixDialog.DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
1
|
+
import * as PrimitiveDialog from '@radix-ui/react-dialog';
|
|
2
|
+
declare const CompoundDialog: ((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
7
|
export default CompoundDialog;
|
|
@@ -1,15 +1,17 @@
|
|
|
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
|
-
|
|
11
|
+
declare const Icon: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLSpanElement> & {
|
|
12
|
+
icon?: "pause" | "play" | "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" | "stop" | "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" | 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>>;
|
|
15
17
|
export default Icon;
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
declare const ImagePlaceholder: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
9
|
+
aspectRatio?: "1/1" | "3/4" | "4/3" | "16/9" | undefined;
|
|
10
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export default ImagePlaceholder;
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
declare const Logo: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLImageElement> & {
|
|
10
|
+
logoColors?: "light" | "dark" | "default" | undefined;
|
|
11
|
+
alt?: string | undefined;
|
|
12
|
+
} & import("react").RefAttributes<HTMLImageElement>>;
|
|
13
|
+
export default Logo;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** libs */
|
|
2
|
+
import { ButtonHTMLAttributes } from 'react';
|
|
3
|
+
declare const NumberSwitchButton: import("react").ForwardRefExoticComponent<ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
4
|
+
variant?: "decrease" | "increase" | undefined;
|
|
5
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
export default NumberSwitchButton;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** libs */
|
|
2
|
+
import { InputHTMLAttributes } from 'react';
|
|
3
|
+
type NumberSwitchInputProps = InputHTMLAttributes<HTMLInputElement>;
|
|
4
|
+
declare const NumberSwitchInput: import("react").ForwardRefExoticComponent<NumberSwitchInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
5
|
+
export default NumberSwitchInput;
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
declare const CompoundNumberSwitch: 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
|
+
};
|
|
15
|
+
export default CompoundNumberSwitch;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as PrimitivePopover from '@radix-ui/react-popover';
|
|
2
|
+
declare const CompoundPopover: {
|
|
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
|
+
};
|
|
12
|
+
export default CompoundPopover;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
2
|
+
/** type */
|
|
3
|
+
export type SelectProps = SelectPrimitive.SelectProps & {
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
};
|
|
6
|
+
declare const CompoundSelect: import("react").ForwardRefExoticComponent<SelectPrimitive.SelectProps & {
|
|
7
|
+
placeholder?: string | undefined;
|
|
8
|
+
} & import("react").RefAttributes<HTMLButtonElement>> & {
|
|
9
|
+
Item: import("react").ForwardRefExoticComponent<SelectPrimitive.SelectItemProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
10
|
+
};
|
|
11
|
+
export default CompoundSelect;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
declare const Stack: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
3
|
-
direction
|
|
4
|
-
gap
|
|
3
|
+
direction?: "vertical" | "horizon" | undefined;
|
|
4
|
+
gap?: 0 | 4 | 8 | 16 | 12 | 20 | 24 | 32 | 40 | undefined;
|
|
5
5
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
6
|
export default Stack;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
2
|
+
/** types */
|
|
3
|
+
export type SwitchProps = SwitchPrimitive.SwitchProps & {
|
|
4
|
+
isError?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const Switch: import("react").ForwardRefExoticComponent<SwitchPrimitive.SwitchProps & {
|
|
7
|
+
isError?: boolean | undefined;
|
|
8
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
export default Switch;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** libs */
|
|
2
|
+
import { TextareaHTMLAttributes } from 'react';
|
|
3
|
+
/** types */
|
|
4
|
+
export type TextAreaProps = TextareaHTMLAttributes<HTMLTextAreaElement> & {
|
|
5
|
+
isError?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const TextArea: import("react").ForwardRefExoticComponent<TextareaHTMLAttributes<HTMLTextAreaElement> & {
|
|
8
|
+
isError?: boolean | undefined;
|
|
9
|
+
} & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
10
|
+
export default TextArea;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** libs */
|
|
2
|
+
import { InputHTMLAttributes } from 'react';
|
|
3
|
+
/** types */
|
|
4
|
+
export type TextFieldProps = InputHTMLAttributes<HTMLInputElement> & {
|
|
5
|
+
isError?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const TextField: import("react").ForwardRefExoticComponent<InputHTMLAttributes<HTMLInputElement> & {
|
|
8
|
+
isError?: boolean | undefined;
|
|
9
|
+
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
10
|
+
export default TextField;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** libs */
|
|
2
|
+
import { HTMLAttributes } from 'react';
|
|
3
|
+
export type TextFieldGroupLeftElementProps = HTMLAttributes<HTMLDivElement>;
|
|
4
|
+
declare const TextFieldGroupLeftElement: import("react").ForwardRefExoticComponent<TextFieldGroupLeftElementProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
|
+
export default TextFieldGroupLeftElement;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** libs */
|
|
2
|
+
import { HTMLAttributes } from 'react';
|
|
3
|
+
export type TextFieldGroupRightElementProps = HTMLAttributes<HTMLDivElement>;
|
|
4
|
+
declare const TextFieldGroupRightElement: import("react").ForwardRefExoticComponent<TextFieldGroupRightElementProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
|
+
export default TextFieldGroupRightElement;
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
declare const CompoundTextFieldGroup: 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
|
+
};
|
|
12
|
+
export default CompoundTextFieldGroup;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** components */
|
|
2
|
+
import { TextFieldProps } from '../TextField';
|
|
3
|
+
export type TextFieldSlugInputProps = TextFieldProps;
|
|
4
|
+
declare const TextFieldSlugInput: import("react").ForwardRefExoticComponent<import("react").InputHTMLAttributes<HTMLInputElement> & {
|
|
5
|
+
isError?: boolean | undefined;
|
|
6
|
+
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
7
|
+
export default TextFieldSlugInput;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** components */
|
|
2
|
+
import { TextFieldGroupLeftElementProps } from '../TextFieldGroup';
|
|
3
|
+
export type TextFieldSlugPrefixProps = TextFieldGroupLeftElementProps & {
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const TextFieldSlugPrefix: import("react").ForwardRefExoticComponent<TextFieldGroupLeftElementProps & {
|
|
7
|
+
disabled?: boolean | undefined;
|
|
8
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
|
+
export default TextFieldSlugPrefix;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** components */
|
|
2
|
+
import { 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
|
+
declare const CompoundTextFieldSlug: 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
|
+
};
|
|
23
|
+
export default CompoundTextFieldSlug;
|
|
@@ -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
|
+
declare const CompoundTooltip: ((props: PrimitiveTooltip.TooltipProps) => JSX.Element) & {
|
|
8
|
+
Content: import("react").ForwardRefExoticComponent<PrimitiveTooltip.TooltipContentProps & {
|
|
9
|
+
variant?: "light" | "dark" | undefined;
|
|
10
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
11
|
+
Portal: import("react").FC<PrimitiveTooltip.TooltipPortalProps>;
|
|
12
|
+
Trigger: import("react").ForwardRefExoticComponent<PrimitiveTooltip.TooltipTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
13
|
+
};
|
|
14
|
+
export default CompoundTooltip;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** libs */
|
|
2
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
3
|
+
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>>;
|
|
9
|
+
export default TouchPointLabel;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** libs */
|
|
2
|
+
import { ButtonHTMLAttributes } from 'react';
|
|
3
|
+
/** types */
|
|
4
|
+
export type TouchPointType = ButtonHTMLAttributes<HTMLButtonElement>;
|
|
5
|
+
declare const TouchPoint: import("react").ForwardRefExoticComponent<TouchPointType & import("react").RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
export default TouchPoint;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
/** libs */
|
|
2
2
|
import React from 'react';
|
|
3
|
-
/** types */
|
|
4
|
-
import { HTMLTagType, TextSizeType, TextStyleType, TextWeightType } from '../../types/Typo';
|
|
5
3
|
type TypoForwardRefType = HTMLHeadingElement & HTMLParagraphElement & HTMLSpanElement;
|
|
6
4
|
declare const Typo: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement & HTMLParagraphElement & HTMLSpanElement> & {
|
|
7
|
-
as
|
|
8
|
-
size
|
|
9
|
-
textStyle
|
|
10
|
-
weight
|
|
5
|
+
as?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "span" | undefined;
|
|
6
|
+
size?: "body" | "caption" | "title-large" | "title-medium" | "title-small" | "title-small-alt" | "body-large" | "body-small" | undefined;
|
|
7
|
+
textStyle?: "italic" | "normal" | undefined;
|
|
8
|
+
weight?: "bold" | "normal" | undefined;
|
|
11
9
|
} & React.RefAttributes<TypoForwardRefType>>;
|
|
12
10
|
export default Typo;
|
|
@@ -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,5 @@
|
|
|
1
|
+
declare const htmlTags: readonly ["h1", "h2", "h3", "h4", "h5", "h6", "p", "span"];
|
|
2
|
+
declare const textSizes: readonly ["title-large", "title-medium", "title-small", "title-small-alt", "body-large", "body", "body-small", "caption"];
|
|
3
|
+
declare const textStyles: readonly ["italic", "normal"];
|
|
4
|
+
declare const textWeights: readonly ["bold", "normal"];
|
|
5
|
+
export { htmlTags, 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,8 +1,9 @@
|
|
|
1
1
|
/** libs */
|
|
2
|
-
import
|
|
2
|
+
import { useEffect, useCallback, RefObject } from 'react'
|
|
3
3
|
|
|
4
4
|
type Event = MouseEvent | TouchEvent
|
|
5
5
|
|
|
6
|
+
// eslint-disable-next-line no-unused-vars
|
|
6
7
|
const useClickOutside = (refs: RefObject<Element | null>[], handler: (event: Event) => void): void => {
|
|
7
8
|
const listener = useCallback(
|
|
8
9
|
(event: Event) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { MutableRefObject, LegacyRef, RefCallback } from 'react'
|
|
2
2
|
|
|
3
|
-
const useMergeRefs = <T =
|
|
3
|
+
const useMergeRefs = <T = unknown>(refs: Array<LegacyRef<T> | MutableRefObject<T>>): RefCallback<T> => {
|
|
4
4
|
return (value) => {
|
|
5
5
|
refs?.forEach((ref) => {
|
|
6
6
|
if (typeof ref === 'function') {
|
|
@@ -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;
|