ddingdong-design-system 0.1.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/README.md +1 -0
- package/dist/App.d.ts +1 -0
- package/dist/ddingdong-design-system.es.js +2940 -0
- package/dist/ddingdong-design-system.es.js.map +1 -0
- package/dist/ddingdong-design-system.umd.js +2 -0
- package/dist/ddingdong-design-system.umd.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/shared/constants/motion.d.ts +40 -0
- package/dist/shared/hooks/usePortal.d.ts +5 -0
- package/dist/shared/index.d.ts +21 -0
- package/dist/shared/lib/colors.d.ts +46 -0
- package/dist/shared/lib/core.d.ts +2 -0
- package/dist/shared/ui/Accordion/Accordion.d.ts +29 -0
- package/dist/shared/ui/Accordion/index.d.ts +2 -0
- package/dist/shared/ui/Badge/Badge.d.ts +13 -0
- package/dist/shared/ui/Badge/index.d.ts +1 -0
- package/dist/shared/ui/Button/Button.d.ts +40 -0
- package/dist/shared/ui/Button/index.d.ts +1 -0
- package/dist/shared/ui/Card/Card.d.ts +13 -0
- package/dist/shared/ui/Card/index.d.ts +1 -0
- package/dist/shared/ui/DoubleButton/DoubleButton.d.ts +12 -0
- package/dist/shared/ui/DoubleButton/index.d.ts +1 -0
- package/dist/shared/ui/Drawer/Drawer.d.ts +12 -0
- package/dist/shared/ui/Drawer/index.d.ts +1 -0
- package/dist/shared/ui/Flex/Flex.d.ts +71 -0
- package/dist/shared/ui/Flex/index.d.ts +1 -0
- package/dist/shared/ui/Icon/Icon.d.ts +21 -0
- package/dist/shared/ui/Icon/index.d.ts +1 -0
- package/dist/shared/ui/Modal/Modal.d.ts +20 -0
- package/dist/shared/ui/Modal/index.d.ts +1 -0
- package/dist/shared/ui/NavBack/NavBack.d.ts +16 -0
- package/dist/shared/ui/NavBack/index.d.ts +1 -0
- package/dist/shared/ui/Pagination/Pagination.d.ts +20 -0
- package/dist/shared/ui/Pagination/index.d.ts +1 -0
- package/dist/shared/ui/Portal/Portal.d.ts +12 -0
- package/dist/shared/ui/Portal/index.d.ts +1 -0
- package/dist/shared/ui/Select/Option.d.ts +10 -0
- package/dist/shared/ui/Select/OptionGroupName.d.ts +5 -0
- package/dist/shared/ui/Select/OptionList.d.ts +9 -0
- package/dist/shared/ui/Select/Select.context.d.ts +12 -0
- package/dist/shared/ui/Select/SelectButton.d.ts +8 -0
- package/dist/shared/ui/Select/SelectMain.d.ts +26 -0
- package/dist/shared/ui/Select/index.d.ts +16 -0
- package/dist/shared/ui/Skeleton/Skeleton.d.ts +20 -0
- package/dist/shared/ui/Skeleton/index.d.ts +2 -0
- package/dist/shared/ui/Switch/Switch.d.ts +11 -0
- package/dist/shared/ui/Switch/index.d.ts +1 -0
- package/dist/shared/ui/Tabs/Tabs.context.d.ts +5 -0
- package/dist/shared/ui/Tabs/TabsItem.d.ts +12 -0
- package/dist/shared/ui/Tabs/TabsRoot.d.ts +12 -0
- package/dist/shared/ui/Tabs/index.d.ts +2 -0
- package/dist/shared/ui/Typography/Typography.d.ts +39 -0
- package/dist/shared/ui/Typography/index.d.ts +1 -0
- package/dist/shared/ui/assets/index.d.ts +22 -0
- package/package.json +111 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
type TypographyVariant = 'Title1' | 'Title2' | 'Title3' | 'Body1' | 'Body2' | 'Body3' | 'Caption1';
|
|
3
|
+
type FontWeight = 'normal' | 'medium' | 'semibold' | 'bold';
|
|
4
|
+
type AllowedTag = 'p' | 'div' | 'label' | 'span';
|
|
5
|
+
type TypographyProps<T extends AllowedTag> = {
|
|
6
|
+
/**
|
|
7
|
+
* The HTML element to use for the typography component.
|
|
8
|
+
*/
|
|
9
|
+
as?: T;
|
|
10
|
+
/**
|
|
11
|
+
* The variant of the typography component.
|
|
12
|
+
* @default 'Body1'
|
|
13
|
+
*/
|
|
14
|
+
variant?: TypographyVariant;
|
|
15
|
+
/**
|
|
16
|
+
* The font weight of the typography component.
|
|
17
|
+
* @default 'medium'
|
|
18
|
+
*/
|
|
19
|
+
weight?: FontWeight;
|
|
20
|
+
/**
|
|
21
|
+
* Additional CSS classes to apply to the typography component.
|
|
22
|
+
*/
|
|
23
|
+
className?: string;
|
|
24
|
+
/**
|
|
25
|
+
* The content of the typography component.
|
|
26
|
+
*/
|
|
27
|
+
children?: ReactNode;
|
|
28
|
+
} & Omit<ComponentPropsWithoutRef<T>, 'as' | 'className' | 'children'>;
|
|
29
|
+
export declare function Typography<T extends AllowedTag = 'p'>({ as, weight, className, children, ...props }: TypographyProps<T>): import('react').ReactElement<{
|
|
30
|
+
className: string;
|
|
31
|
+
} & Omit<TypographyProps<T>, "className" | "children" | "as" | "weight">, string | import('react').JSXElementConstructor<any>>;
|
|
32
|
+
export declare const Title1: <T extends AllowedTag = "p">(props: Omit<TypographyProps<T>, "variant">) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export declare const Title2: <T extends AllowedTag = "p">(props: Omit<TypographyProps<T>, "variant">) => import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export declare const Title3: <T extends AllowedTag = "p">(props: Omit<TypographyProps<T>, "variant">) => import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export declare const Body1: <T extends AllowedTag = "p">(props: Omit<TypographyProps<T>, "variant">) => import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export declare const Body2: <T extends AllowedTag = "p">(props: Omit<TypographyProps<T>, "variant">) => import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
export declare const Body3: <T extends AllowedTag = "p">(props: Omit<TypographyProps<T>, "variant">) => import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
export declare const Caption1: <T extends AllowedTag = "p">(props: Omit<TypographyProps<T>, "variant">) => import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Title1, Title2, Title3, Caption1, Body1, Body2, Body3 } from './Typography';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const Icons: {
|
|
2
|
+
add: string;
|
|
3
|
+
arrowDown: string;
|
|
4
|
+
arrowUp: string;
|
|
5
|
+
arrowLeft: string;
|
|
6
|
+
arrowRight: string;
|
|
7
|
+
check: string;
|
|
8
|
+
close: string;
|
|
9
|
+
download: string;
|
|
10
|
+
etc: string;
|
|
11
|
+
list: string;
|
|
12
|
+
navbarArrow: string;
|
|
13
|
+
new: string;
|
|
14
|
+
pin: string;
|
|
15
|
+
trash: string;
|
|
16
|
+
write: string;
|
|
17
|
+
loading: string;
|
|
18
|
+
instagram: string;
|
|
19
|
+
youtube: string;
|
|
20
|
+
};
|
|
21
|
+
export type IconName = keyof typeof Icons;
|
|
22
|
+
export declare const iconNames: IconName[];
|
package/package.json
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ddingdong-design-system",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"react",
|
|
7
|
+
"ui",
|
|
8
|
+
"components",
|
|
9
|
+
"design-system"
|
|
10
|
+
],
|
|
11
|
+
"author": "ddingdong-fe",
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"homepage": "https://github.com/COW-dev/ddingdong2.0#readme",
|
|
14
|
+
"main": "./dist/ddingdong-design-system.js",
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"README.md"
|
|
19
|
+
],
|
|
20
|
+
"exports": {
|
|
21
|
+
".": {
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"import": "./dist/ddingdong-design-system.es.js",
|
|
24
|
+
"require": "./dist/ddingdong-design-system.umd.js"
|
|
25
|
+
},
|
|
26
|
+
"./styles.css": "./dist/ddingdong-design-system.css"
|
|
27
|
+
},
|
|
28
|
+
"scripts": {
|
|
29
|
+
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
30
|
+
"dev": "vite",
|
|
31
|
+
"build": "vite build",
|
|
32
|
+
"preview": "vite preview",
|
|
33
|
+
"storybook": "storybook dev -p 6006",
|
|
34
|
+
"build-storybook": "storybook build",
|
|
35
|
+
"prepare": "husky && husky install"
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"class-variance-authority": "^0.7.1",
|
|
39
|
+
"clsx": "^2.1.1",
|
|
40
|
+
"tailwind-merge": "^2.6.0"
|
|
41
|
+
},
|
|
42
|
+
"peerDependencies": {
|
|
43
|
+
"@radix-ui/react-accordion": "^1.0.0",
|
|
44
|
+
"@radix-ui/react-switch": "^1.0.0",
|
|
45
|
+
"framer-motion": "^11.0.0",
|
|
46
|
+
"react": "^19.0.0",
|
|
47
|
+
"react-dom": "^19.0.0",
|
|
48
|
+
"tailwindcss": "^4.1.12"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@chromatic-com/storybook": "^3.2.3",
|
|
52
|
+
"@eslint/eslintrc": "^3.2.0",
|
|
53
|
+
"@radix-ui/react-accordion": "^1.2.2",
|
|
54
|
+
"@radix-ui/react-switch": "^1.1.2",
|
|
55
|
+
"@storybook/addon-a11y": "^8.6.14",
|
|
56
|
+
"@storybook/addon-essentials": "^8.6.14",
|
|
57
|
+
"@storybook/addon-interactions": "^8.6.14",
|
|
58
|
+
"@storybook/addon-onboarding": "^8.6.14",
|
|
59
|
+
"@storybook/blocks": "^8.6.14",
|
|
60
|
+
"@storybook/react": "^8.6.14",
|
|
61
|
+
"@storybook/react-vite": "^8.6.14",
|
|
62
|
+
"@storybook/test": "^8.6.14",
|
|
63
|
+
"@svgr/webpack": "^8.1.0",
|
|
64
|
+
"@tailwindcss/postcss": "^4.1.12",
|
|
65
|
+
"@types/node": "^20",
|
|
66
|
+
"@types/react": "^19",
|
|
67
|
+
"@types/react-dom": "^19",
|
|
68
|
+
"@typescript-eslint/eslint-plugin": "^8.19.0",
|
|
69
|
+
"@typescript-eslint/parser": "^8.19.0",
|
|
70
|
+
"@vitejs/plugin-react-swc": "^3.11.0",
|
|
71
|
+
"autoprefixer": "^10.4.20",
|
|
72
|
+
"chromatic": "^11.22.0",
|
|
73
|
+
"eslint": "^8.57.1",
|
|
74
|
+
"eslint-config-prettier": "^9.1.0",
|
|
75
|
+
"eslint-import-resolver-typescript": "^3.7.0",
|
|
76
|
+
"eslint-plugin-import": "^2.31.0",
|
|
77
|
+
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
78
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
79
|
+
"eslint-plugin-react": "^7.37.3",
|
|
80
|
+
"eslint-plugin-react-refresh": "^0.4.16",
|
|
81
|
+
"eslint-plugin-storybook": "^0.11.2",
|
|
82
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
83
|
+
"eslint-plugin-vitest-globals": "^1.5.0",
|
|
84
|
+
"framer-motion": "^11.18.2",
|
|
85
|
+
"husky": "^9.1.7",
|
|
86
|
+
"lint-staged": "^15.3.0",
|
|
87
|
+
"postcss": "^8.5.6",
|
|
88
|
+
"prettier": "^3.4.2",
|
|
89
|
+
"prettier-plugin-tailwindcss": "^0.6.9",
|
|
90
|
+
"react": "^19.0.0",
|
|
91
|
+
"react-dom": "^19.0.0",
|
|
92
|
+
"storybook": "^8.6.14",
|
|
93
|
+
"typescript": "^5",
|
|
94
|
+
"vite": "^6.3.5",
|
|
95
|
+
"vite-plugin-svgr": "^4.3.0",
|
|
96
|
+
"vite-tsconfig-paths": "^5.1.4",
|
|
97
|
+
"vite-plugin-dts": "^4.5.4"
|
|
98
|
+
},
|
|
99
|
+
"eslintConfig": {
|
|
100
|
+
"extends": [
|
|
101
|
+
"plugin:storybook/recommended"
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
"lint-staged": {
|
|
105
|
+
"src/**/*.{js,jsx,ts,tsx}": [
|
|
106
|
+
"eslint --ext .tsx --ext .ts src/",
|
|
107
|
+
"prettier --write"
|
|
108
|
+
],
|
|
109
|
+
"*.js": "eslint --cache --fix"
|
|
110
|
+
}
|
|
111
|
+
}
|