@carandesign/drawui 0.1.1 → 0.1.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/dist/components/button/DrawuiButton.d.ts +3 -0
- package/dist/components/button/DrawuiButton.types.d.ts +7 -0
- package/dist/components/button/index.d.ts +2 -0
- package/dist/components/card/DrawuiCard.d.ts +3 -0
- package/dist/components/card/DrawuiCard.types.d.ts +13 -0
- package/dist/components/card/index.d.ts +2 -0
- package/dist/components/collapse/DrawuiCollapse.d.ts +3 -0
- package/dist/components/collapse/DrawuiCollapse.types.d.ts +10 -0
- package/dist/components/collapse/index.d.ts +2 -0
- package/dist/components/divider/DrawuiDivider.d.ts +3 -0
- package/dist/components/divider/DrawuiDivider.types.d.ts +7 -0
- package/dist/components/divider/index.d.ts +2 -0
- package/dist/components/iconButton/DrawuiIconButton.d.ts +3 -0
- package/dist/components/iconButton/DrawuiIconButton.types.d.ts +8 -0
- package/dist/components/iconButton/index.d.ts +2 -0
- package/dist/components/index.d.ts +6 -0
- package/dist/components/input/DrawuiInput.d.ts +3 -0
- package/dist/components/input/DrawuiInput.types.d.ts +8 -0
- package/dist/components/input/index.d.ts +2 -0
- package/dist/icons/IconBell.d.ts +3 -0
- package/dist/icons/IconHome.d.ts +3 -0
- package/dist/icons/IconMinus.d.ts +3 -0
- package/dist/icons/IconPlus.d.ts +3 -0
- package/dist/icons/IconSearch.d.ts +3 -0
- package/dist/icons/IconSettings.d.ts +3 -0
- package/dist/icons/IconUser.d.ts +3 -0
- package/dist/icons/index.d.ts +7 -0
- package/dist/icons/types.d.ts +7 -0
- package/dist/index.d.ts +3 -0
- package/dist/theme/DrawuiThemeContext.d.ts +2 -0
- package/dist/theme/DrawuiThemeProvider.d.ts +6 -0
- package/dist/theme/defaultTheme.d.ts +2 -0
- package/dist/theme/index.d.ts +3 -0
- package/dist/theme/types.d.ts +31 -0
- package/dist/theme/useDrawuiTheme.d.ts +1 -0
- package/dist/utils/roughPaths.d.ts +1 -0
- package/package.json +32 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { RadiusToken, SizeToken, StrokeWeight } from '../../theme/types';
|
|
2
|
+
export interface DrawuiButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
|
+
strokeWeight?: StrokeWeight;
|
|
4
|
+
size?: SizeToken;
|
|
5
|
+
radius?: RadiusToken;
|
|
6
|
+
backgroundColor?: string;
|
|
7
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { RadiusToken, StrokeWeight } from '../../theme/types';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export interface DrawuiCardProps {
|
|
4
|
+
strokeWeight?: StrokeWeight;
|
|
5
|
+
radius?: RadiusToken;
|
|
6
|
+
width?: number;
|
|
7
|
+
height?: number;
|
|
8
|
+
backgroundColor?: string;
|
|
9
|
+
header?: ReactNode;
|
|
10
|
+
footer?: ReactNode;
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { RadiusToken, StrokeWeight } from '../../theme/types';
|
|
3
|
+
export interface DrawuiCollapseProps {
|
|
4
|
+
header: ReactNode;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
strokeWeight?: StrokeWeight;
|
|
7
|
+
radius?: RadiusToken;
|
|
8
|
+
className?: string;
|
|
9
|
+
width?: number;
|
|
10
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RadiusToken, SizeToken, StrokeWeight } from '../../theme/types';
|
|
2
|
+
export interface DrawuiIconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
|
+
strokeWeight?: StrokeWeight;
|
|
4
|
+
size?: SizeToken;
|
|
5
|
+
icon: React.ReactNode;
|
|
6
|
+
radius?: RadiusToken;
|
|
7
|
+
backgroundColor?: string;
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { StrokeWeight, RadiusToken, SizeToken } from '../../theme/types';
|
|
2
|
+
import { InputHTMLAttributes } from 'react';
|
|
3
|
+
export interface DrawuiInputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
4
|
+
strokeWeight?: StrokeWeight;
|
|
5
|
+
radius?: RadiusToken;
|
|
6
|
+
inputSize: SizeToken;
|
|
7
|
+
backgroundColor?: string;
|
|
8
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { IconBell } from './IconBell';
|
|
2
|
+
export { IconHome } from './IconHome';
|
|
3
|
+
export { IconMinus } from './IconMinus';
|
|
4
|
+
export { IconPlus } from './IconPlus';
|
|
5
|
+
export { IconSearch } from './IconSearch';
|
|
6
|
+
export { IconSettings } from './IconSettings';
|
|
7
|
+
export { IconUser } from './IconUser';
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export type StrokeWeight = "thin" | "medium" | "thick";
|
|
2
|
+
export type RadiusToken = "none" | "sm" | "md" | "lg" | "full";
|
|
3
|
+
export type SizeToken = "sm" | "md" | "lg" | "xl";
|
|
4
|
+
export interface DrawuiButtonSize {
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
fontSize: number;
|
|
8
|
+
}
|
|
9
|
+
export interface DrawuiInputSize {
|
|
10
|
+
height: number;
|
|
11
|
+
fontSize: number;
|
|
12
|
+
paddingX: number;
|
|
13
|
+
}
|
|
14
|
+
export interface DrawuiStroke {
|
|
15
|
+
color: string;
|
|
16
|
+
width: number;
|
|
17
|
+
}
|
|
18
|
+
export interface DrawuiRoughness {
|
|
19
|
+
roughness: number;
|
|
20
|
+
bowing: number;
|
|
21
|
+
}
|
|
22
|
+
export interface DrawuiTheme {
|
|
23
|
+
stroke: Record<StrokeWeight, DrawuiStroke>;
|
|
24
|
+
roughness: DrawuiRoughness;
|
|
25
|
+
fill: {
|
|
26
|
+
background: string;
|
|
27
|
+
};
|
|
28
|
+
radius: Record<RadiusToken, number>;
|
|
29
|
+
buttonSize: Record<SizeToken, DrawuiButtonSize>;
|
|
30
|
+
inputSize: Record<SizeToken, DrawuiInputSize>;
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useDrawuiTheme: () => import('./types').DrawuiTheme;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const roundedRect: (x: number, y: number, width: number, height: number, r: number) => string;
|
package/package.json
CHANGED
|
@@ -1 +1,32 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"name": "@carandesign/drawui",
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "Sketch-style React UI component library",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/drawui.cjs.js",
|
|
7
|
+
"module": "dist/drawui.es.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "vite build",
|
|
14
|
+
"prepublishOnly": "npm run build"
|
|
15
|
+
},
|
|
16
|
+
"peerDependencies": {
|
|
17
|
+
"react": "^18 || ^19",
|
|
18
|
+
"react-dom": "^18 || ^19"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"roughjs": "^4.6.6"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@types/react": "^19.2.5",
|
|
25
|
+
"@types/react-dom": "^19.2.3",
|
|
26
|
+
"@vitejs/plugin-react": "^5.1.1",
|
|
27
|
+
"vite": "^7.2.4",
|
|
28
|
+
"vite-plugin-dts": "^4.5.4",
|
|
29
|
+
"typescript": "~5.9.3",
|
|
30
|
+
"eslint": "^9.39.1"
|
|
31
|
+
}
|
|
32
|
+
}
|