@dalshenekuda/candy-ui 2.0.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 +86 -0
- package/build/style.css +2 -0
- package/build/ui-kit.js +40 -0
- package/build/ui-kit.js.map +1 -0
- package/package.json +111 -0
- package/tailwind.preset.js +151 -0
- package/types/components/Badge/Badge.d.ts +9 -0
- package/types/components/Button/Button.d.ts +11 -0
- package/types/components/Card/Card.d.ts +8 -0
- package/types/components/Chart/Chart.d.ts +62 -0
- package/types/components/Dialog/Dialog.d.ts +19 -0
- package/types/components/Text/Text.d.ts +12 -0
- package/types/index.d.ts +8 -0
- package/types/lib/utils.d.ts +2 -0
- package/types/tokens/colors/colors.d.ts +6 -0
- package/types/tokens/spacing/spacing.d.ts +6 -0
- package/types/tokens/typography/typography.d.ts +6 -0
package/package.json
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@dalshenekuda/candy-ui",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "A React UI components library with Tailwind CSS",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./build/ui-kit.js",
|
|
7
|
+
"types": "./types/index.d.ts",
|
|
8
|
+
"publishConfig": {
|
|
9
|
+
"access": "public"
|
|
10
|
+
},
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./types/index.d.ts",
|
|
14
|
+
"import": "./build/ui-kit.js"
|
|
15
|
+
},
|
|
16
|
+
"./style.css": "./build/style.css",
|
|
17
|
+
"./tailwind.preset": "./tailwind.preset.js"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"build",
|
|
21
|
+
"types",
|
|
22
|
+
"tailwind.preset.js"
|
|
23
|
+
],
|
|
24
|
+
"scripts": {
|
|
25
|
+
"dev": "vite",
|
|
26
|
+
"build": "vite build",
|
|
27
|
+
"preview": "vite preview",
|
|
28
|
+
"type-check": "tsc --noEmit",
|
|
29
|
+
"lint": "eslint \"src/**/*.{ts,tsx}\"",
|
|
30
|
+
"lint:fix": "eslint \"src/**/*.{ts,tsx}\" --fix",
|
|
31
|
+
"format": "prettier --write \"src/**/*.{ts,tsx,js,json,css}\"",
|
|
32
|
+
"format:check": "prettier --check \"src/**/*.{ts,tsx,js,json,css}\"",
|
|
33
|
+
"storybook": "storybook dev -p 6006",
|
|
34
|
+
"build-storybook": "storybook build",
|
|
35
|
+
"test": "vitest",
|
|
36
|
+
"test:ui": "vitest --ui",
|
|
37
|
+
"test:run": "vitest run",
|
|
38
|
+
"test:coverage": "vitest run --coverage",
|
|
39
|
+
"build:watch": "vite build --watch",
|
|
40
|
+
"changeset": "changeset",
|
|
41
|
+
"version-packages": "changeset version",
|
|
42
|
+
"release": "npm run build && changeset publish"
|
|
43
|
+
},
|
|
44
|
+
"keywords": [
|
|
45
|
+
"react",
|
|
46
|
+
"ui-kit",
|
|
47
|
+
"components",
|
|
48
|
+
"button",
|
|
49
|
+
"dialog",
|
|
50
|
+
"tailwindcss",
|
|
51
|
+
"design-system",
|
|
52
|
+
"accessible",
|
|
53
|
+
"typescript"
|
|
54
|
+
],
|
|
55
|
+
"engines": {
|
|
56
|
+
"node": ">=18.0.0 || >=20.0.0 || >=22.0.0",
|
|
57
|
+
"npm": ">=8.0.0"
|
|
58
|
+
},
|
|
59
|
+
"author": "",
|
|
60
|
+
"license": "ISC",
|
|
61
|
+
"peerDependencies": {
|
|
62
|
+
"react": ">=18.0.0",
|
|
63
|
+
"react-dom": ">=18.0.0"
|
|
64
|
+
},
|
|
65
|
+
"overrides": {
|
|
66
|
+
"minimatch": "^10.2.3",
|
|
67
|
+
"esbuild": ">=0.25.0"
|
|
68
|
+
},
|
|
69
|
+
"devDependencies": {
|
|
70
|
+
"@changesets/cli": "^2.31.0",
|
|
71
|
+
"@chromatic-com/storybook": "^5.0.1",
|
|
72
|
+
"@eslint/js": "^10.0.1",
|
|
73
|
+
"@storybook/addon-docs": "^10.3.6",
|
|
74
|
+
"@storybook/react-vite": "^10.3.6",
|
|
75
|
+
"@types/node": "^24.10.1",
|
|
76
|
+
"@typescript-eslint/parser": "^8.0.0",
|
|
77
|
+
"@vitejs/plugin-react": "^6.0.1",
|
|
78
|
+
"@vitest/ui": "^4.0.14",
|
|
79
|
+
"autoprefixer": "^10.4.22",
|
|
80
|
+
"eslint": "^10.0.2",
|
|
81
|
+
"eslint-config-prettier": "^10.1.0",
|
|
82
|
+
"jsdom": "^27.2.0",
|
|
83
|
+
"minimatch": "^10.2.3",
|
|
84
|
+
"postcss": "^8.5.6",
|
|
85
|
+
"prettier": "^3.0.0",
|
|
86
|
+
"rollup": "^4.59.0",
|
|
87
|
+
"sass": "^1.99.0",
|
|
88
|
+
"storybook": "^10.3.6",
|
|
89
|
+
"tailwindcss": "^3.4.18",
|
|
90
|
+
"tailwindcss-animate": "^1.0.7",
|
|
91
|
+
"terser": "^5.46.2",
|
|
92
|
+
"typescript": "^5.9.3",
|
|
93
|
+
"typescript-eslint": "^8.0.0",
|
|
94
|
+
"unplugin-dts": "^1.0.0",
|
|
95
|
+
"vite": "^8.0.10",
|
|
96
|
+
"vitest": "^4.0.14"
|
|
97
|
+
},
|
|
98
|
+
"dependencies": {
|
|
99
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
100
|
+
"@radix-ui/react-slot": "^1.2.4",
|
|
101
|
+
"@types/react": "^19.2.14",
|
|
102
|
+
"@types/react-dom": "^19.2.3",
|
|
103
|
+
"class-variance-authority": "^0.7.1",
|
|
104
|
+
"clsx": "^2.1.1",
|
|
105
|
+
"lucide-react": "^1.14.0",
|
|
106
|
+
"react": ">=18.0.0",
|
|
107
|
+
"react-dom": ">=18.0.0",
|
|
108
|
+
"recharts": "^2.15.4",
|
|
109
|
+
"tailwind-merge": "^3.5.0"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tailwind preset for candy-ui consumers.
|
|
3
|
+
*
|
|
4
|
+
* Import in your tailwind.config.js:
|
|
5
|
+
* import uiKitPreset from 'candy-ui/tailwind.preset';
|
|
6
|
+
* export default { presets: [uiKitPreset], content: [...] };
|
|
7
|
+
*
|
|
8
|
+
* All values reference CSS custom properties from src/tokens/*.css.
|
|
9
|
+
* Import src/styles/style.css once in your app entry — tokens won't work without it.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/** @type {import('tailwindcss').Config} */
|
|
13
|
+
export default {
|
|
14
|
+
darkMode: 'class',
|
|
15
|
+
theme: {
|
|
16
|
+
extend: {
|
|
17
|
+
screens: {
|
|
18
|
+
sm: '640px',
|
|
19
|
+
md: '768px',
|
|
20
|
+
lg: '1024px',
|
|
21
|
+
xl: '1280px',
|
|
22
|
+
'2xl': '1536px',
|
|
23
|
+
desktop: '992px', // matches --bp-desktop / typography breakpoint
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
spacing: {
|
|
27
|
+
none: 'var(--spacing-none)',
|
|
28
|
+
px: 'var(--spacing-px)',
|
|
29
|
+
'2xs': 'var(--spacing-2xs)',
|
|
30
|
+
xs: 'var(--spacing-xs)',
|
|
31
|
+
sm: 'var(--spacing-sm)',
|
|
32
|
+
md: 'var(--spacing-md)',
|
|
33
|
+
lg: 'var(--spacing-lg)',
|
|
34
|
+
xl: 'var(--spacing-xl)',
|
|
35
|
+
'2xl': 'var(--spacing-2xl)',
|
|
36
|
+
'3xl': 'var(--spacing-3xl)',
|
|
37
|
+
'4xl': 'var(--spacing-4xl)',
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
colors: {
|
|
41
|
+
// Semantic tokens — use these in components
|
|
42
|
+
bg: 'var(--color-bg)',
|
|
43
|
+
surface: 'var(--color-surface)',
|
|
44
|
+
'surface-raised': 'var(--color-surface-raised)',
|
|
45
|
+
|
|
46
|
+
text: {
|
|
47
|
+
DEFAULT: 'var(--color-text)',
|
|
48
|
+
muted: 'var(--color-text-muted)',
|
|
49
|
+
subtle: 'var(--color-text-subtle)',
|
|
50
|
+
'on-brand': 'var(--color-text-on-brand)',
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
brand: {
|
|
54
|
+
DEFAULT: 'var(--color-brand)',
|
|
55
|
+
dark: 'var(--color-brand-dark)',
|
|
56
|
+
light: 'var(--color-brand-light)',
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
accent: {
|
|
60
|
+
DEFAULT: 'var(--color-accent)',
|
|
61
|
+
dark: 'var(--color-accent-dark)',
|
|
62
|
+
light: 'var(--color-accent-light)',
|
|
63
|
+
warm: 'var(--color-accent-warm)',
|
|
64
|
+
},
|
|
65
|
+
|
|
66
|
+
border: {
|
|
67
|
+
DEFAULT: 'var(--color-border)',
|
|
68
|
+
subtle: 'var(--color-border-subtle)',
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
danger: 'var(--color-danger)',
|
|
72
|
+
success: 'var(--color-success)',
|
|
73
|
+
warning: 'var(--color-warning)',
|
|
74
|
+
|
|
75
|
+
// Palette primitives — for Storybook / design token docs
|
|
76
|
+
palette: {
|
|
77
|
+
'teal-900': 'var(--palette-teal-900)',
|
|
78
|
+
'teal-600': 'var(--palette-teal-600)',
|
|
79
|
+
'teal-400': 'var(--palette-teal-400)',
|
|
80
|
+
'teal-200': 'var(--palette-teal-200)',
|
|
81
|
+
'cream-ink': 'var(--palette-cream-ink)',
|
|
82
|
+
'cream-100': 'var(--palette-cream-100)',
|
|
83
|
+
'cream-50': 'var(--palette-cream-50)',
|
|
84
|
+
'grey-1000': 'var(--palette-grey-1000)',
|
|
85
|
+
'grey-900': 'var(--palette-grey-900)',
|
|
86
|
+
'grey-800': 'var(--palette-grey-800)',
|
|
87
|
+
'grey-700': 'var(--palette-grey-700)',
|
|
88
|
+
'grey-600': 'var(--palette-grey-600)',
|
|
89
|
+
'grey-500': 'var(--palette-grey-500)',
|
|
90
|
+
'grey-400': 'var(--palette-grey-400)',
|
|
91
|
+
'grey-300': 'var(--palette-grey-300)',
|
|
92
|
+
'grey-200': 'var(--palette-grey-200)',
|
|
93
|
+
'grey-100': 'var(--palette-grey-100)',
|
|
94
|
+
'coral-700': 'var(--palette-coral-700)',
|
|
95
|
+
'coral-500': 'var(--palette-coral-500)',
|
|
96
|
+
'coral-300': 'var(--palette-coral-300)',
|
|
97
|
+
'amber-500': 'var(--palette-amber-500)',
|
|
98
|
+
'olive-500': 'var(--palette-olive-500)',
|
|
99
|
+
'sage-500': 'var(--palette-sage-500)',
|
|
100
|
+
},
|
|
101
|
+
|
|
102
|
+
// White alpha scale
|
|
103
|
+
'white-alpha': {
|
|
104
|
+
10: 'var(--palette-white-10)',
|
|
105
|
+
20: 'var(--palette-white-20)',
|
|
106
|
+
30: 'var(--palette-white-30)',
|
|
107
|
+
40: 'var(--palette-white-40)',
|
|
108
|
+
50: 'var(--palette-white-50)',
|
|
109
|
+
60: 'var(--palette-white-60)',
|
|
110
|
+
70: 'var(--palette-white-70)',
|
|
111
|
+
80: 'var(--palette-white-80)',
|
|
112
|
+
90: 'var(--palette-white-90)',
|
|
113
|
+
100: 'var(--palette-white-100)',
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
|
|
117
|
+
borderRadius: {
|
|
118
|
+
none: 'var(--radius-none)',
|
|
119
|
+
xs: 'var(--radius-xs)',
|
|
120
|
+
sm: 'var(--radius-sm)',
|
|
121
|
+
md: 'var(--radius-md)',
|
|
122
|
+
lg: 'var(--radius-lg)',
|
|
123
|
+
xl: 'var(--radius-xl)',
|
|
124
|
+
'2xl': 'var(--radius-2xl)',
|
|
125
|
+
full: 'var(--radius-full)',
|
|
126
|
+
},
|
|
127
|
+
|
|
128
|
+
fontWeight: {
|
|
129
|
+
light: 'var(--font-weight-light)',
|
|
130
|
+
regular: 'var(--font-weight-regular)',
|
|
131
|
+
medium: 'var(--font-weight-medium)',
|
|
132
|
+
semibold: 'var(--font-weight-semibold)',
|
|
133
|
+
bold: 'var(--font-weight-bold)',
|
|
134
|
+
black: 'var(--font-weight-black)',
|
|
135
|
+
},
|
|
136
|
+
|
|
137
|
+
boxShadow: {
|
|
138
|
+
sm: 'var(--shadow-sm)',
|
|
139
|
+
md: 'var(--shadow-md)',
|
|
140
|
+
lg: 'var(--shadow-lg)',
|
|
141
|
+
xl: 'var(--shadow-xl)',
|
|
142
|
+
},
|
|
143
|
+
|
|
144
|
+
transitionDuration: {
|
|
145
|
+
fast: 'var(--transition-fast)',
|
|
146
|
+
base: 'var(--transition-base)',
|
|
147
|
+
slow: 'var(--transition-slow)',
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const badgeVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "success" | "warning" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
6
|
+
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
7
|
+
}
|
|
8
|
+
declare function Badge({ className, variant, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { Badge, badgeVariants };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const buttonVariants: (props?: ({
|
|
4
|
+
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
5
|
+
size?: "default" | "icon" | "sm" | "lg" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
7
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
3
|
+
declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as RechartsPrimitive from 'recharts';
|
|
3
|
+
declare const THEMES: {
|
|
4
|
+
readonly light: "";
|
|
5
|
+
readonly dark: ".dark";
|
|
6
|
+
};
|
|
7
|
+
export type ChartConfig = {
|
|
8
|
+
[k in string]: {
|
|
9
|
+
label?: React.ReactNode;
|
|
10
|
+
icon?: React.ComponentType;
|
|
11
|
+
} & ({
|
|
12
|
+
color?: string;
|
|
13
|
+
theme?: never;
|
|
14
|
+
} | {
|
|
15
|
+
color?: never;
|
|
16
|
+
theme: Record<keyof typeof THEMES, string>;
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
declare const ChartContainer: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
20
|
+
config: ChartConfig;
|
|
21
|
+
children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["children"];
|
|
22
|
+
}, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
declare const ChartStyle: ({ id, config }: {
|
|
24
|
+
id: string;
|
|
25
|
+
config: ChartConfig;
|
|
26
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
27
|
+
declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
|
|
28
|
+
declare const ChartTooltipContent: React.ForwardRefExoticComponent<Omit<RechartsPrimitive.DefaultTooltipContentProps<import('recharts/types/component/DefaultTooltipContent').ValueType, import('recharts/types/component/DefaultTooltipContent').NameType> & {
|
|
29
|
+
accessibilityLayer?: boolean;
|
|
30
|
+
active?: boolean | undefined;
|
|
31
|
+
includeHidden?: boolean | undefined;
|
|
32
|
+
allowEscapeViewBox?: import('recharts/types/util/types').AllowInDimension;
|
|
33
|
+
animationDuration?: import('recharts/types/util/types').AnimationDuration;
|
|
34
|
+
animationEasing?: import('recharts/types/util/types').AnimationTiming;
|
|
35
|
+
content?: import('recharts/types/component/Tooltip').ContentType<import('recharts/types/component/DefaultTooltipContent').ValueType, import('recharts/types/component/DefaultTooltipContent').NameType> | undefined;
|
|
36
|
+
coordinate?: Partial<import('recharts/types/util/types').Coordinate>;
|
|
37
|
+
cursor?: boolean | React.ReactElement | React.SVGProps<SVGElement>;
|
|
38
|
+
filterNull?: boolean;
|
|
39
|
+
defaultIndex?: number;
|
|
40
|
+
isAnimationActive?: boolean;
|
|
41
|
+
offset?: number;
|
|
42
|
+
payloadUniqBy?: import('recharts/types/util/payload/getUniqPayload').UniqueOption<import('recharts/types/component/DefaultTooltipContent').Payload<import('recharts/types/component/DefaultTooltipContent').ValueType, import('recharts/types/component/DefaultTooltipContent').NameType>> | undefined;
|
|
43
|
+
position?: Partial<import('recharts/types/util/types').Coordinate>;
|
|
44
|
+
reverseDirection?: import('recharts/types/util/types').AllowInDimension;
|
|
45
|
+
shared?: boolean;
|
|
46
|
+
trigger?: "hover" | "click";
|
|
47
|
+
useTranslate3d?: boolean;
|
|
48
|
+
viewBox?: import('recharts/types/util/types').CartesianViewBox;
|
|
49
|
+
wrapperStyle?: React.CSSProperties;
|
|
50
|
+
} & React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
51
|
+
hideLabel?: boolean;
|
|
52
|
+
hideIndicator?: boolean;
|
|
53
|
+
indicator?: "line" | "dot" | "dashed";
|
|
54
|
+
nameKey?: string;
|
|
55
|
+
labelKey?: string;
|
|
56
|
+
}, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
57
|
+
declare const ChartLegend: typeof RechartsPrimitive.Legend;
|
|
58
|
+
declare const ChartLegendContent: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & Pick<RechartsPrimitive.LegendProps, "payload" | "verticalAlign"> & {
|
|
59
|
+
hideIcon?: boolean;
|
|
60
|
+
nameKey?: string;
|
|
61
|
+
}, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
62
|
+
export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyle, };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
3
|
+
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
4
|
+
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
6
|
+
declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const DialogHeader: {
|
|
10
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
declare const DialogFooter: {
|
|
14
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
displayName: string;
|
|
16
|
+
};
|
|
17
|
+
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
18
|
+
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
19
|
+
export { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type TextVariant = 'heading-xl' | 'heading-lg' | 'heading-md' | 'heading-sm' | 'subtitle-lg' | 'subtitle-md' | 'body-lg' | 'body-md' | 'body-sm' | 'caption-md' | 'caption-sm' | 'overline';
|
|
3
|
+
export type FontWeight = 'light' | 'regular' | 'medium' | 'semibold' | 'bold' | 'black';
|
|
4
|
+
export type TextColor = 'color-text' | 'color-text-muted' | 'color-text-subtle' | 'color-text-on-brand' | 'color-brand' | 'color-brand-dark' | 'color-brand-light' | 'color-accent' | 'color-accent-dark' | 'color-accent-light' | 'color-accent-warm' | 'color-danger' | 'color-success' | 'color-warning';
|
|
5
|
+
export interface TextProps extends React.HTMLAttributes<HTMLElement> {
|
|
6
|
+
variant?: TextVariant;
|
|
7
|
+
as?: React.ElementType;
|
|
8
|
+
weight?: FontWeight;
|
|
9
|
+
color?: TextColor;
|
|
10
|
+
}
|
|
11
|
+
declare const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLElement>>;
|
|
12
|
+
export { Text };
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './components/Text/Text';
|
|
2
|
+
export * from './components/Button/Button';
|
|
3
|
+
export * from './components/Badge/Badge';
|
|
4
|
+
export * from './components/Card/Card';
|
|
5
|
+
export * from './components/Dialog/Dialog';
|
|
6
|
+
export * from './components/Chart/Chart';
|
|
7
|
+
/** Alias for Button — consumed by my-account-proxy and other apps as ActionButton */
|
|
8
|
+
export { Button as ActionButton } from './components/Button/Button';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Valid semantic color token names from src/tokens/theme-light.css and theme-dark.css.
|
|
3
|
+
* Use as: style.color = `var(--${color})` or color prop on Text component.
|
|
4
|
+
* No hex values here — colors resolve at runtime via CSS custom properties.
|
|
5
|
+
*/
|
|
6
|
+
export type TextColor = 'color-text' | 'color-text-muted' | 'color-text-subtle' | 'color-text-on-brand' | 'color-brand' | 'color-brand-dark' | 'color-brand-light' | 'color-accent' | 'color-accent-dark' | 'color-accent-light' | 'color-accent-warm' | 'color-danger' | 'color-success' | 'color-warning';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Spacing token names — match --spacing-* CSS custom properties
|
|
3
|
+
* defined in src/tokens/spacing.css.
|
|
4
|
+
* Usage: style.padding = `var(--spacing-${token})`
|
|
5
|
+
*/
|
|
6
|
+
export type SpacingToken = 'none' | 'px' | '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Font weight token names — match --font-weight-* CSS custom properties
|
|
3
|
+
* defined in src/tokens/typography-variables.scss.
|
|
4
|
+
* Usage: style.fontWeight = `var(--font-weight-${weight})`
|
|
5
|
+
*/
|
|
6
|
+
export type FontWeight = 'light' | 'regular' | 'medium' | 'semibold' | 'bold' | 'black';
|