@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.
Files changed (37) hide show
  1. package/dist/components/button/DrawuiButton.d.ts +3 -0
  2. package/dist/components/button/DrawuiButton.types.d.ts +7 -0
  3. package/dist/components/button/index.d.ts +2 -0
  4. package/dist/components/card/DrawuiCard.d.ts +3 -0
  5. package/dist/components/card/DrawuiCard.types.d.ts +13 -0
  6. package/dist/components/card/index.d.ts +2 -0
  7. package/dist/components/collapse/DrawuiCollapse.d.ts +3 -0
  8. package/dist/components/collapse/DrawuiCollapse.types.d.ts +10 -0
  9. package/dist/components/collapse/index.d.ts +2 -0
  10. package/dist/components/divider/DrawuiDivider.d.ts +3 -0
  11. package/dist/components/divider/DrawuiDivider.types.d.ts +7 -0
  12. package/dist/components/divider/index.d.ts +2 -0
  13. package/dist/components/iconButton/DrawuiIconButton.d.ts +3 -0
  14. package/dist/components/iconButton/DrawuiIconButton.types.d.ts +8 -0
  15. package/dist/components/iconButton/index.d.ts +2 -0
  16. package/dist/components/index.d.ts +6 -0
  17. package/dist/components/input/DrawuiInput.d.ts +3 -0
  18. package/dist/components/input/DrawuiInput.types.d.ts +8 -0
  19. package/dist/components/input/index.d.ts +2 -0
  20. package/dist/icons/IconBell.d.ts +3 -0
  21. package/dist/icons/IconHome.d.ts +3 -0
  22. package/dist/icons/IconMinus.d.ts +3 -0
  23. package/dist/icons/IconPlus.d.ts +3 -0
  24. package/dist/icons/IconSearch.d.ts +3 -0
  25. package/dist/icons/IconSettings.d.ts +3 -0
  26. package/dist/icons/IconUser.d.ts +3 -0
  27. package/dist/icons/index.d.ts +7 -0
  28. package/dist/icons/types.d.ts +7 -0
  29. package/dist/index.d.ts +3 -0
  30. package/dist/theme/DrawuiThemeContext.d.ts +2 -0
  31. package/dist/theme/DrawuiThemeProvider.d.ts +6 -0
  32. package/dist/theme/defaultTheme.d.ts +2 -0
  33. package/dist/theme/index.d.ts +3 -0
  34. package/dist/theme/types.d.ts +31 -0
  35. package/dist/theme/useDrawuiTheme.d.ts +1 -0
  36. package/dist/utils/roughPaths.d.ts +1 -0
  37. package/package.json +32 -1
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { DrawuiButtonProps } from './DrawuiButton.types';
3
+ export declare const DrawuiButton: React.FC<DrawuiButtonProps>;
@@ -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,2 @@
1
+ export { DrawuiButton } from './DrawuiButton';
2
+ export * from './DrawuiButton.types';
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { DrawuiCardProps } from './DrawuiCard.types';
3
+ export declare const DrawuiCard: React.FC<DrawuiCardProps>;
@@ -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,2 @@
1
+ export { DrawuiCard } from './DrawuiCard';
2
+ export * from './DrawuiCard.types';
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { DrawuiCollapseProps } from './DrawuiCollapse.types';
3
+ export declare const DrawuiCollapse: React.FC<DrawuiCollapseProps>;
@@ -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,2 @@
1
+ export { DrawuiCollapse } from './DrawuiCollapse';
2
+ export * from './DrawuiCollapse.types';
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { DrawuiDividerProps } from './DrawuiDivider.types';
3
+ export declare const DrawuiDivider: React.FC<DrawuiDividerProps>;
@@ -0,0 +1,7 @@
1
+ import { StrokeWeight } from '../../theme/types';
2
+ export interface DrawuiDividerProps {
3
+ strokeWeight?: StrokeWeight;
4
+ width?: number | string;
5
+ vertical?: boolean;
6
+ className?: string;
7
+ }
@@ -0,0 +1,2 @@
1
+ export { DrawuiDivider } from './DrawuiDivider';
2
+ export * from './DrawuiDivider.types';
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { DrawuiIconButtonProps } from './DrawuiIconButton.types';
3
+ export declare const DrawuiIconButton: React.FC<DrawuiIconButtonProps>;
@@ -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,2 @@
1
+ export { DrawuiIconButton } from './DrawuiIconButton';
2
+ export * from './DrawuiIconButton.types';
@@ -0,0 +1,6 @@
1
+ export * from './button';
2
+ export * from './card';
3
+ export * from './collapse';
4
+ export * from './divider';
5
+ export * from './iconButton';
6
+ export * from './input';
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { DrawuiInputProps } from './DrawuiInput.types';
3
+ export declare const DrawuiInput: React.FC<DrawuiInputProps>;
@@ -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,2 @@
1
+ export { DrawuiInput } from './DrawuiInput';
2
+ export * from './DrawuiInput.types';
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { DrawuiIconProps } from './types';
3
+ export declare const IconBell: React.FC<DrawuiIconProps>;
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { DrawuiIconProps } from './types';
3
+ export declare const IconHome: React.FC<DrawuiIconProps>;
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { DrawuiIconProps } from './types';
3
+ export declare const IconMinus: React.FC<DrawuiIconProps>;
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { DrawuiIconProps } from './types';
3
+ export declare const IconPlus: React.FC<DrawuiIconProps>;
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { DrawuiIconProps } from './types';
3
+ export declare const IconSearch: React.FC<DrawuiIconProps>;
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { DrawuiIconProps } from './types';
3
+ export declare const IconSettings: React.FC<DrawuiIconProps>;
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { DrawuiIconProps } from './types';
3
+ export declare const IconUser: React.FC<DrawuiIconProps>;
@@ -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';
@@ -0,0 +1,7 @@
1
+ import { StrokeWeight } from '../theme/types';
2
+ export interface DrawuiIconProps {
3
+ size?: number;
4
+ strokeWeight?: StrokeWeight;
5
+ color?: string;
6
+ className?: string;
7
+ }
@@ -0,0 +1,3 @@
1
+ export * from './components';
2
+ export * from './icons';
3
+ export * from './theme';
@@ -0,0 +1,2 @@
1
+ import { DrawuiTheme } from './types';
2
+ export declare const DrawuiThemeContext: import('react').Context<DrawuiTheme>;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ import { DrawuiTheme } from './types';
3
+ export declare const DrawuiThemeProvider: React.FC<{
4
+ theme?: Partial<DrawuiTheme>;
5
+ children: React.ReactNode;
6
+ }>;
@@ -0,0 +1,2 @@
1
+ import { DrawuiTheme } from './types';
2
+ export declare const defaultDrawuiTheme: DrawuiTheme;
@@ -0,0 +1,3 @@
1
+ export { DrawuiThemeProvider } from './DrawuiThemeProvider';
2
+ export { useDrawuiTheme } from './useDrawuiTheme';
3
+ export * from './types';
@@ -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
- {"name":"@carandesign/drawui","version":"0.1.1","description":"Sketch-style React UI component library","type":"module","main":"dist/drawui.cjs.js","module":"dist/drawui.es.js","types":"dist/index.d.ts","files":["dist"],"sideEffects":false,"scripts":{"build":"vite build","prepublishOnly":"npm run build"},"peerDependencies":{"react":"^18 || ^19","react-dom":"^18 || ^19"},"dependencies":{"roughjs":"^4.6.6"},"devDependencies":{"@types/react":"^19.2.5","@types/react-dom":"^19.2.3","@vitejs/plugin-react":"^5.1.1","vite":"^7.2.4","vite-plugin-dts":"^4.5.4","typescript":"~5.9.3","eslint":"^9.39.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
+ }