@vespiario-thailand/design-system 0.0.1

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.
@@ -0,0 +1,35 @@
1
+ /** lib */
2
+ import { ButtonHTMLAttributes } from 'react'
3
+
4
+ /** constance */
5
+ import { ButtonSizeList, ButtonVariantList } from '../../constance/Button'
6
+
7
+ /** type */
8
+ import { IconType } from '../Icon'
9
+
10
+ type ButtonVariantType = typeof ButtonVariantList[number]
11
+ type ButtonSizeType = typeof ButtonSizeList[number]
12
+
13
+ type CommonButtonType = ButtonHTMLAttributes<HTMLButtonElement> & {
14
+ sizes?: ButtonSizeType
15
+ variants: ButtonVariantType
16
+ iconLeft?: IconType
17
+ isLoading?: boolean
18
+ }
19
+
20
+ type ConditionButtonIconType =
21
+ | {
22
+ onlyIcon?: never
23
+ iconRight?: IconType
24
+ }
25
+ | {
26
+ onlyIcon?: boolean
27
+ iconRight?: never
28
+ }
29
+
30
+ export type {
31
+ ButtonSizeType,
32
+ ButtonVariantType,
33
+ CommonButtonType,
34
+ ConditionButtonIconType,
35
+ }
@@ -0,0 +1,11 @@
1
+ import { IconLists, IconSizes, IconColors } from '../../constance/Icon'
2
+
3
+ type IconType = typeof IconLists[number]
4
+ type IconSizeType = typeof IconSizes[number]
5
+ type IconColorType = typeof IconColors[number]
6
+
7
+ export type {
8
+ IconType,
9
+ IconSizeType,
10
+ IconColorType
11
+ }
@@ -0,0 +1,27 @@
1
+ type HTMLTagType =
2
+ | 'h1'
3
+ | 'h2'
4
+ | 'h3'
5
+ | 'h4'
6
+ | 'h5'
7
+ | 'h6'
8
+ | 'p'
9
+ | 'span'
10
+ type TextSizeType =
11
+ | 'title-large'
12
+ | 'title-medium'
13
+ | 'title-small'
14
+ | 'title-small-alt'
15
+ | 'body-large'
16
+ | 'body'
17
+ | 'body-small'
18
+ | 'caption'
19
+ type TextStyleType = 'italic' | 'normal'
20
+ type TextWeightType = 'bold' | 'normal'
21
+
22
+ export type {
23
+ HTMLTagType,
24
+ TextSizeType,
25
+ TextStyleType,
26
+ TextWeightType
27
+ }