@jameskabz/nextcraft-ui 0.3.0 → 0.4.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/dist/index.cjs +1188 -29
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +220 -1
- package/dist/index.d.ts +220 -1
- package/dist/index.js +1163 -29
- package/dist/index.js.map +1 -1
- package/dist/styles.css +649 -37
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -50,9 +50,228 @@ declare const CraftInput: React$1.ForwardRefExoticComponent<Omit<React$1.InputHT
|
|
|
50
50
|
icon?: React$1.ReactNode;
|
|
51
51
|
} & React$1.RefAttributes<HTMLInputElement>>;
|
|
52
52
|
|
|
53
|
+
type CraftTextareaProps = React$1.TextareaHTMLAttributes<HTMLTextAreaElement> & {
|
|
54
|
+
tone?: ThemeName;
|
|
55
|
+
};
|
|
56
|
+
declare const CraftTextarea: React$1.ForwardRefExoticComponent<React$1.TextareaHTMLAttributes<HTMLTextAreaElement> & {
|
|
57
|
+
tone?: ThemeName;
|
|
58
|
+
} & React$1.RefAttributes<HTMLTextAreaElement>>;
|
|
59
|
+
|
|
60
|
+
type CraftSelectProps = React$1.SelectHTMLAttributes<HTMLSelectElement> & {
|
|
61
|
+
tone?: ThemeName;
|
|
62
|
+
};
|
|
63
|
+
declare const CraftSelect: React$1.ForwardRefExoticComponent<React$1.SelectHTMLAttributes<HTMLSelectElement> & {
|
|
64
|
+
tone?: ThemeName;
|
|
65
|
+
} & React$1.RefAttributes<HTMLSelectElement>>;
|
|
66
|
+
|
|
67
|
+
type CraftCheckboxProps = Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "type"> & {
|
|
68
|
+
tone?: ThemeName;
|
|
69
|
+
label?: React$1.ReactNode;
|
|
70
|
+
description?: React$1.ReactNode;
|
|
71
|
+
};
|
|
72
|
+
declare const CraftCheckbox: React$1.ForwardRefExoticComponent<Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "type"> & {
|
|
73
|
+
tone?: ThemeName;
|
|
74
|
+
label?: React$1.ReactNode;
|
|
75
|
+
description?: React$1.ReactNode;
|
|
76
|
+
} & React$1.RefAttributes<HTMLInputElement>>;
|
|
77
|
+
|
|
78
|
+
type CraftSwitchProps = Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "type"> & {
|
|
79
|
+
tone?: ThemeName;
|
|
80
|
+
label?: React$1.ReactNode;
|
|
81
|
+
};
|
|
82
|
+
declare const CraftSwitch: React$1.ForwardRefExoticComponent<Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "type"> & {
|
|
83
|
+
tone?: ThemeName;
|
|
84
|
+
label?: React$1.ReactNode;
|
|
85
|
+
} & React$1.RefAttributes<HTMLInputElement>>;
|
|
86
|
+
|
|
87
|
+
type CraftBadgeVariant = "solid" | "soft" | "outline";
|
|
88
|
+
type CraftBadgeProps = React$1.HTMLAttributes<HTMLSpanElement> & {
|
|
89
|
+
variant?: CraftBadgeVariant;
|
|
90
|
+
tone?: ThemeName;
|
|
91
|
+
};
|
|
92
|
+
declare function CraftBadge({ className, variant, tone, ...props }: CraftBadgeProps): react_jsx_runtime.JSX.Element;
|
|
93
|
+
|
|
94
|
+
type CraftCardProps = React$1.HTMLAttributes<HTMLDivElement> & {
|
|
95
|
+
tone?: ThemeName;
|
|
96
|
+
elevated?: boolean;
|
|
97
|
+
};
|
|
98
|
+
declare function CraftCard({ className, tone, elevated, ...props }: CraftCardProps): react_jsx_runtime.JSX.Element;
|
|
99
|
+
|
|
100
|
+
type CraftModalProps = {
|
|
101
|
+
open?: boolean;
|
|
102
|
+
defaultOpen?: boolean;
|
|
103
|
+
onOpenChange?: (open: boolean) => void;
|
|
104
|
+
tone?: ThemeName;
|
|
105
|
+
title?: React$1.ReactNode;
|
|
106
|
+
description?: React$1.ReactNode;
|
|
107
|
+
children?: React$1.ReactNode;
|
|
108
|
+
trigger?: React$1.ReactNode;
|
|
109
|
+
footer?: React$1.ReactNode;
|
|
110
|
+
className?: string;
|
|
111
|
+
};
|
|
112
|
+
declare function CraftModal({ open, defaultOpen, onOpenChange, tone, title, description, children, trigger, footer, className, }: CraftModalProps): react_jsx_runtime.JSX.Element;
|
|
113
|
+
|
|
114
|
+
type CraftDrawerProps = {
|
|
115
|
+
open?: boolean;
|
|
116
|
+
defaultOpen?: boolean;
|
|
117
|
+
onOpenChange?: (open: boolean) => void;
|
|
118
|
+
tone?: ThemeName;
|
|
119
|
+
side?: "right" | "left";
|
|
120
|
+
title?: React$1.ReactNode;
|
|
121
|
+
children?: React$1.ReactNode;
|
|
122
|
+
trigger?: React$1.ReactNode;
|
|
123
|
+
footer?: React$1.ReactNode;
|
|
124
|
+
className?: string;
|
|
125
|
+
};
|
|
126
|
+
declare function CraftDrawer({ open, defaultOpen, onOpenChange, tone, side, title, children, trigger, footer, className, }: CraftDrawerProps): react_jsx_runtime.JSX.Element;
|
|
127
|
+
|
|
128
|
+
type CraftTabsProps = {
|
|
129
|
+
value?: string;
|
|
130
|
+
defaultValue?: string;
|
|
131
|
+
onValueChange?: (value: string) => void;
|
|
132
|
+
tone?: ThemeName;
|
|
133
|
+
tabs: Array<{
|
|
134
|
+
value: string;
|
|
135
|
+
label: React$1.ReactNode;
|
|
136
|
+
}>;
|
|
137
|
+
panels: Record<string, React$1.ReactNode>;
|
|
138
|
+
className?: string;
|
|
139
|
+
};
|
|
140
|
+
declare function CraftTabs({ value, defaultValue, onValueChange, tone, tabs, panels, className, }: CraftTabsProps): react_jsx_runtime.JSX.Element;
|
|
141
|
+
|
|
142
|
+
type CraftTooltipProps = {
|
|
143
|
+
content: React$1.ReactNode;
|
|
144
|
+
tone?: ThemeName;
|
|
145
|
+
children: React$1.ReactElement;
|
|
146
|
+
side?: "top" | "bottom" | "left" | "right";
|
|
147
|
+
};
|
|
148
|
+
declare function CraftTooltip({ content, tone, children, side }: CraftTooltipProps): react_jsx_runtime.JSX.Element;
|
|
149
|
+
|
|
150
|
+
type CraftToastVariant = "info" | "success" | "warning" | "error";
|
|
151
|
+
type CraftToast = {
|
|
152
|
+
id: string;
|
|
153
|
+
title: string;
|
|
154
|
+
description?: string;
|
|
155
|
+
variant?: CraftToastVariant;
|
|
156
|
+
};
|
|
157
|
+
declare function useCraftToast(): {
|
|
158
|
+
toasts: CraftToast[];
|
|
159
|
+
push: (toast: Omit<CraftToast, "id">) => string;
|
|
160
|
+
remove: (id: string) => void;
|
|
161
|
+
};
|
|
162
|
+
type CraftToastHostProps = {
|
|
163
|
+
toasts: CraftToast[];
|
|
164
|
+
onDismiss: (id: string) => void;
|
|
165
|
+
tone?: ThemeName;
|
|
166
|
+
};
|
|
167
|
+
declare function CraftToastHost({ toasts, onDismiss, tone }: CraftToastHostProps): react_jsx_runtime.JSX.Element;
|
|
168
|
+
|
|
169
|
+
type CraftSkeletonProps = React$1.HTMLAttributes<HTMLDivElement> & {
|
|
170
|
+
tone?: ThemeName;
|
|
171
|
+
};
|
|
172
|
+
declare function CraftSkeleton({ className, tone, ...props }: CraftSkeletonProps): react_jsx_runtime.JSX.Element;
|
|
173
|
+
|
|
174
|
+
type CraftEmptyStateProps = React$1.HTMLAttributes<HTMLDivElement> & {
|
|
175
|
+
tone?: ThemeName;
|
|
176
|
+
title: string;
|
|
177
|
+
description?: string;
|
|
178
|
+
icon?: React$1.ReactNode;
|
|
179
|
+
action?: React$1.ReactNode;
|
|
180
|
+
};
|
|
181
|
+
declare function CraftEmptyState({ className, tone, title, description, icon, action, ...props }: CraftEmptyStateProps): react_jsx_runtime.JSX.Element;
|
|
182
|
+
|
|
183
|
+
type CraftDatePickerProps = {
|
|
184
|
+
value?: string;
|
|
185
|
+
defaultValue?: string;
|
|
186
|
+
onChange?: (value: string) => void;
|
|
187
|
+
tone?: ThemeName;
|
|
188
|
+
min?: string;
|
|
189
|
+
max?: string;
|
|
190
|
+
placeholder?: string;
|
|
191
|
+
className?: string;
|
|
192
|
+
};
|
|
193
|
+
declare function CraftDatePicker({ value, defaultValue, onChange, tone, min, max, placeholder, className, }: CraftDatePickerProps): react_jsx_runtime.JSX.Element;
|
|
194
|
+
|
|
195
|
+
type CraftNumberInputProps = React$1.InputHTMLAttributes<HTMLInputElement> & {
|
|
196
|
+
tone?: ThemeName;
|
|
197
|
+
};
|
|
198
|
+
declare const CraftNumberInput: React$1.ForwardRefExoticComponent<React$1.InputHTMLAttributes<HTMLInputElement> & {
|
|
199
|
+
tone?: ThemeName;
|
|
200
|
+
} & React$1.RefAttributes<HTMLInputElement>>;
|
|
201
|
+
|
|
202
|
+
type CraftCurrencyInputProps = Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "type"> & {
|
|
203
|
+
tone?: ThemeName;
|
|
204
|
+
currencySymbol?: string;
|
|
205
|
+
};
|
|
206
|
+
declare const CraftCurrencyInput: React$1.ForwardRefExoticComponent<Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "type"> & {
|
|
207
|
+
tone?: ThemeName;
|
|
208
|
+
currencySymbol?: string;
|
|
209
|
+
} & React$1.RefAttributes<HTMLInputElement>>;
|
|
210
|
+
|
|
211
|
+
type AppShellProps = React$1.HTMLAttributes<HTMLDivElement> & {
|
|
212
|
+
sidebar?: React$1.ReactNode;
|
|
213
|
+
topNav?: React$1.ReactNode;
|
|
214
|
+
};
|
|
215
|
+
declare function AppShell({ className, sidebar, topNav, children, ...props }: AppShellProps): react_jsx_runtime.JSX.Element;
|
|
216
|
+
|
|
217
|
+
type SidebarItem = {
|
|
218
|
+
label: React$1.ReactNode;
|
|
219
|
+
href?: string;
|
|
220
|
+
icon?: React$1.ReactNode;
|
|
221
|
+
active?: boolean;
|
|
222
|
+
};
|
|
223
|
+
type SidebarProps = React$1.HTMLAttributes<HTMLElement> & {
|
|
224
|
+
title?: React$1.ReactNode;
|
|
225
|
+
items: SidebarItem[];
|
|
226
|
+
footer?: React$1.ReactNode;
|
|
227
|
+
};
|
|
228
|
+
declare function Sidebar({ className, title, items, footer, ...props }: SidebarProps): react_jsx_runtime.JSX.Element;
|
|
229
|
+
|
|
230
|
+
type TopNavProps = React$1.HTMLAttributes<HTMLElement> & {
|
|
231
|
+
title?: React$1.ReactNode;
|
|
232
|
+
actions?: React$1.ReactNode;
|
|
233
|
+
breadcrumb?: React$1.ReactNode;
|
|
234
|
+
};
|
|
235
|
+
declare function TopNav({ className, title, actions, breadcrumb, ...props }: TopNavProps): react_jsx_runtime.JSX.Element;
|
|
236
|
+
|
|
237
|
+
type PageHeaderProps = React$1.HTMLAttributes<HTMLDivElement> & {
|
|
238
|
+
title: React$1.ReactNode;
|
|
239
|
+
description?: React$1.ReactNode;
|
|
240
|
+
actions?: React$1.ReactNode;
|
|
241
|
+
};
|
|
242
|
+
declare function PageHeader({ className, title, description, actions, ...props }: PageHeaderProps): react_jsx_runtime.JSX.Element;
|
|
243
|
+
|
|
244
|
+
type BreadcrumbItem = {
|
|
245
|
+
label: React$1.ReactNode;
|
|
246
|
+
href?: string;
|
|
247
|
+
};
|
|
248
|
+
type BreadcrumbsProps = React$1.HTMLAttributes<HTMLElement> & {
|
|
249
|
+
items: BreadcrumbItem[];
|
|
250
|
+
};
|
|
251
|
+
declare function Breadcrumbs({ className, items, ...props }: BreadcrumbsProps): react_jsx_runtime.JSX.Element;
|
|
252
|
+
|
|
253
|
+
type AuthLayoutProps = React$1.HTMLAttributes<HTMLDivElement> & {
|
|
254
|
+
title?: React$1.ReactNode;
|
|
255
|
+
description?: React$1.ReactNode;
|
|
256
|
+
footer?: React$1.ReactNode;
|
|
257
|
+
graphic?: React$1.ReactNode;
|
|
258
|
+
};
|
|
259
|
+
declare function AuthLayout({ className, title, description, footer, graphic, children, ...props }: AuthLayoutProps): react_jsx_runtime.JSX.Element;
|
|
260
|
+
|
|
261
|
+
type ContainerProps = React$1.HTMLAttributes<HTMLDivElement> & {
|
|
262
|
+
size?: "sm" | "md" | "lg" | "xl";
|
|
263
|
+
};
|
|
264
|
+
declare function Container({ className, size, ...props }: ContainerProps): react_jsx_runtime.JSX.Element;
|
|
265
|
+
|
|
266
|
+
type GridProps = React$1.HTMLAttributes<HTMLDivElement> & {
|
|
267
|
+
columns?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
268
|
+
gap?: "sm" | "md" | "lg" | "xl";
|
|
269
|
+
};
|
|
270
|
+
declare function Grid({ className, columns, gap, ...props }: GridProps): react_jsx_runtime.JSX.Element;
|
|
271
|
+
|
|
53
272
|
type ThemeSwitcherProps = React$1.HTMLAttributes<HTMLDivElement> & {
|
|
54
273
|
showLabels?: boolean;
|
|
55
274
|
};
|
|
56
275
|
declare function ThemeSwitcher({ className, showLabels, ...props }: ThemeSwitcherProps): react_jsx_runtime.JSX.Element;
|
|
57
276
|
|
|
58
|
-
export { CraftButton, type CraftButtonProps, CraftInput, type CraftInputProps, GlassCard, type GlassCardProps, type ThemeMode, type ThemeName, ThemeProvider, ThemeSwitcher, type ThemeSwitcherProps, useTheme };
|
|
277
|
+
export { AppShell, type AppShellProps, AuthLayout, type AuthLayoutProps, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Container, type ContainerProps, CraftBadge, type CraftBadgeProps, CraftButton, type CraftButtonProps, CraftCard, type CraftCardProps, CraftCheckbox, type CraftCheckboxProps, CraftCurrencyInput, type CraftCurrencyInputProps, CraftDatePicker, type CraftDatePickerProps, CraftDrawer, type CraftDrawerProps, CraftEmptyState, type CraftEmptyStateProps, CraftInput, type CraftInputProps, CraftModal, type CraftModalProps, CraftNumberInput, type CraftNumberInputProps, CraftSelect, type CraftSelectProps, CraftSkeleton, type CraftSkeletonProps, CraftSwitch, type CraftSwitchProps, CraftTabs, type CraftTabsProps, CraftTextarea, type CraftTextareaProps, type CraftToast, CraftToastHost, type CraftToastHostProps, CraftTooltip, type CraftTooltipProps, GlassCard, type GlassCardProps, Grid, type GridProps, PageHeader, type PageHeaderProps, Sidebar, type SidebarItem, type SidebarProps, type ThemeMode, type ThemeName, ThemeProvider, ThemeSwitcher, type ThemeSwitcherProps, TopNav, type TopNavProps, useCraftToast, useTheme };
|