czero 0.2.0 → 0.2.5
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 +209 -209
- package/dist/cli/index.js +970 -72
- package/dist/components.css +2158 -1913
- package/dist/react/core/component-defaults.d.ts.map +1 -1
- package/dist/react/core/types/config.d.ts +161 -2
- package/dist/react/core/types/config.d.ts.map +1 -1
- package/dist/react/index.cjs +695 -12
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.ts +138 -11
- package/dist/react/index.js +693 -13
- package/dist/react/index.js.map +1 -1
- package/dist/react/react/components/button.d.ts +1 -0
- package/dist/react/react/components/button.d.ts.map +1 -1
- package/dist/react/react/components/data-table.d.ts +39 -0
- package/dist/react/react/components/data-table.d.ts.map +1 -0
- package/dist/react/react/components/input.d.ts +5 -2
- package/dist/react/react/components/input.d.ts.map +1 -1
- package/dist/react/react/components/modal.d.ts +44 -0
- package/dist/react/react/components/modal.d.ts.map +1 -0
- package/dist/react/react/components/search-input.d.ts +13 -0
- package/dist/react/react/components/search-input.d.ts.map +1 -0
- package/dist/react/react/components/status-badge.d.ts +11 -0
- package/dist/react/react/components/status-badge.d.ts.map +1 -0
- package/dist/react/react/components/tabs.d.ts +42 -7
- package/dist/react/react/components/tabs.d.ts.map +1 -1
- package/dist/react/react/index.d.ts +4 -1
- package/dist/react/react/index.d.ts.map +1 -1
- package/dist/reset.css +6 -15
- package/dist/styles.css +2244 -2008
- package/package.json +93 -92
- package/dist/cli-new/cli/build-css.d.ts +0 -19
- package/dist/cli-new/cli/build-css.js +0 -88
- package/dist/cli-new/cli/generators/button.d.ts +0 -9
- package/dist/cli-new/cli/generators/button.js +0 -224
- package/dist/cli-new/cli/generators/card.d.ts +0 -9
- package/dist/cli-new/cli/generators/card.js +0 -104
- package/dist/cli-new/cli/generators/checkbox.d.ts +0 -6
- package/dist/cli-new/cli/generators/checkbox.js +0 -163
- package/dist/cli-new/cli/generators/index.d.ts +0 -10
- package/dist/cli-new/cli/generators/index.js +0 -40
- package/dist/cli-new/cli/generators/input.d.ts +0 -9
- package/dist/cli-new/cli/generators/input.js +0 -231
- package/dist/cli-new/cli/generators/switch.d.ts +0 -6
- package/dist/cli-new/cli/generators/switch.js +0 -156
- package/dist/cli-new/cli/generators/utilities.d.ts +0 -9
- package/dist/cli-new/cli/generators/utilities.js +0 -150
- package/dist/cli-new/cli/index.d.ts +0 -8
- package/dist/cli-new/cli/index.js +0 -288
- package/dist/cli-new/cli/token-resolver.d.ts +0 -44
- package/dist/cli-new/cli/token-resolver.js +0 -137
- package/dist/cli-new/cli/utils/deep-merge.d.ts +0 -15
- package/dist/cli-new/cli/utils/deep-merge.js +0 -41
- package/dist/cli-new/cli/validate-config.d.ts +0 -19
- package/dist/cli-new/cli/validate-config.js +0 -151
- package/dist/cli-new/src/core/component-defaults.d.ts +0 -7
- package/dist/cli-new/src/core/component-defaults.js +0 -467
- package/dist/cli-new/src/core/types/config.d.ts +0 -489
- package/dist/cli-new/src/core/types/config.js +0 -5
- package/dist/cli-new/src/presets/index.d.ts +0 -44
- package/dist/cli-new/src/presets/index.js +0 -194
- package/dist/react/react/lib/cn.d.ts +0 -7
- package/dist/react/react/lib/cn.d.ts.map +0 -1
package/dist/react/index.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
20
20
|
variant?: "primary" | "secondary" | "outline" | "ghost" | "danger" | "link";
|
|
21
21
|
size?: "sm" | "md" | "lg" | "icon";
|
|
22
22
|
loading?: boolean;
|
|
23
|
+
fullWidth?: boolean;
|
|
23
24
|
asChild?: boolean;
|
|
24
25
|
}
|
|
25
26
|
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -27,11 +28,14 @@ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAtt
|
|
|
27
28
|
interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
28
29
|
label?: string;
|
|
29
30
|
description?: string;
|
|
30
|
-
error?: string;
|
|
31
|
-
size?: "sm" | "md" | "lg";
|
|
31
|
+
error?: boolean | string;
|
|
32
|
+
size?: "sm" | "md" | "lg" | "small" | "medium" | "large";
|
|
33
|
+
variant?: string;
|
|
34
|
+
icon?: React.ReactNode;
|
|
32
35
|
leftIcon?: React.ReactNode;
|
|
33
36
|
rightIcon?: React.ReactNode;
|
|
34
37
|
onClear?: () => void;
|
|
38
|
+
showPasswordToggle?: boolean;
|
|
35
39
|
}
|
|
36
40
|
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
37
41
|
|
|
@@ -52,6 +56,15 @@ interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
|
52
56
|
}
|
|
53
57
|
declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLSpanElement>>;
|
|
54
58
|
|
|
59
|
+
type StatusTone = "primary" | "success" | "danger" | "warning";
|
|
60
|
+
interface StatusBadgeProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "children"> {
|
|
61
|
+
status?: React.ReactNode;
|
|
62
|
+
children?: React.ReactNode;
|
|
63
|
+
tone?: StatusTone;
|
|
64
|
+
showDot?: boolean;
|
|
65
|
+
}
|
|
66
|
+
declare const StatusBadge: React.ForwardRefExoticComponent<StatusBadgeProps & React.RefAttributes<HTMLSpanElement>>;
|
|
67
|
+
|
|
55
68
|
interface TextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "size"> {
|
|
56
69
|
label?: string;
|
|
57
70
|
description?: string;
|
|
@@ -126,18 +139,53 @@ interface SkeletonProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
126
139
|
}
|
|
127
140
|
declare const Skeleton: React.ForwardRefExoticComponent<SkeletonProps & React.RefAttributes<HTMLDivElement>>;
|
|
128
141
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
142
|
+
type TabsValue = string | number | boolean;
|
|
143
|
+
type TabsVariant = "underline" | "pills" | "enclosed";
|
|
144
|
+
type TabsSize = "sm" | "md" | "lg" | "small" | "medium" | "large";
|
|
145
|
+
interface TabsItem {
|
|
146
|
+
value: TabsValue;
|
|
147
|
+
label: React.ReactNode;
|
|
148
|
+
icon?: React.ReactNode;
|
|
149
|
+
count?: React.ReactNode;
|
|
150
|
+
disabled?: boolean;
|
|
151
|
+
content?: React.ReactNode;
|
|
152
|
+
className?: string;
|
|
153
|
+
style?: React.CSSProperties;
|
|
154
|
+
}
|
|
155
|
+
interface TabsProps extends Omit<React.ComponentPropsWithoutRef<typeof TabsPrimitive.Root>, "value" | "defaultValue" | "onValueChange" | "onChange"> {
|
|
156
|
+
defaultValue?: TabsValue;
|
|
157
|
+
value?: TabsValue;
|
|
158
|
+
activeTab?: TabsValue;
|
|
132
159
|
onValueChange?: (value: string) => void;
|
|
160
|
+
onChange?: (value: TabsValue) => void;
|
|
161
|
+
setActiveTab?: (value: TabsValue) => void;
|
|
162
|
+
items?: TabsItem[];
|
|
163
|
+
tabs?: TabsItem[];
|
|
164
|
+
renderItem?: (item: TabsItem, state: {
|
|
165
|
+
isActive: boolean;
|
|
166
|
+
}) => React.ReactNode;
|
|
167
|
+
renderContent?: (item: TabsItem, state: {
|
|
168
|
+
isActive: boolean;
|
|
169
|
+
}) => React.ReactNode;
|
|
170
|
+
variant?: TabsVariant;
|
|
171
|
+
size?: TabsSize;
|
|
172
|
+
fullWidth?: boolean;
|
|
173
|
+
showBorder?: boolean;
|
|
174
|
+
disabled?: boolean;
|
|
175
|
+
listClassName?: string;
|
|
176
|
+
listStyle?: React.CSSProperties;
|
|
177
|
+
triggerClassName?: string;
|
|
178
|
+
triggerStyle?: React.CSSProperties;
|
|
133
179
|
}
|
|
134
180
|
interface TabsListProps extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.List> {
|
|
135
181
|
}
|
|
136
|
-
interface TabsTriggerProps extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger> {
|
|
137
|
-
value:
|
|
182
|
+
interface TabsTriggerProps extends Omit<React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>, "value"> {
|
|
183
|
+
value: TabsValue;
|
|
184
|
+
icon?: React.ReactNode;
|
|
185
|
+
count?: React.ReactNode;
|
|
138
186
|
}
|
|
139
|
-
interface TabsContentProps extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content> {
|
|
140
|
-
value:
|
|
187
|
+
interface TabsContentProps extends Omit<React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>, "value"> {
|
|
188
|
+
value: TabsValue;
|
|
141
189
|
}
|
|
142
190
|
declare const Tabs: React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<HTMLDivElement>> & {
|
|
143
191
|
List: React.ForwardRefExoticComponent<TabsListProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -171,6 +219,48 @@ declare const Dialog: React.FC<DialogProps> & {
|
|
|
171
219
|
Overlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
172
220
|
};
|
|
173
221
|
|
|
222
|
+
type ModalSize = "sm" | "md" | "lg" | "xl" | "full";
|
|
223
|
+
type ModalCloseButtonVariant = "icon" | "button";
|
|
224
|
+
interface ModalTabItem {
|
|
225
|
+
id: string;
|
|
226
|
+
name?: React.ReactNode;
|
|
227
|
+
label?: React.ReactNode;
|
|
228
|
+
icon?: React.ReactNode;
|
|
229
|
+
disabled?: boolean;
|
|
230
|
+
}
|
|
231
|
+
interface ModalProps extends Omit<React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>, "children" | "title"> {
|
|
232
|
+
open?: boolean;
|
|
233
|
+
defaultOpen?: boolean;
|
|
234
|
+
onOpenChange?: (open: boolean) => void;
|
|
235
|
+
isOpen?: boolean;
|
|
236
|
+
onClose?: () => void;
|
|
237
|
+
modal?: boolean;
|
|
238
|
+
trigger?: React.ReactNode;
|
|
239
|
+
title?: React.ReactNode;
|
|
240
|
+
description?: React.ReactNode;
|
|
241
|
+
children: React.ReactNode;
|
|
242
|
+
footer?: React.ReactNode;
|
|
243
|
+
tabs?: ModalTabItem[];
|
|
244
|
+
activeTab?: string;
|
|
245
|
+
onTabChange?: (tabId: string) => void;
|
|
246
|
+
hideTitle?: boolean;
|
|
247
|
+
size?: ModalSize;
|
|
248
|
+
width?: number | string;
|
|
249
|
+
minHeight?: number | string;
|
|
250
|
+
fullHeight?: boolean;
|
|
251
|
+
showCloseButton?: boolean;
|
|
252
|
+
closeButtonVariant?: ModalCloseButtonVariant;
|
|
253
|
+
closeButtonText?: string;
|
|
254
|
+
closeOnOverlay?: boolean;
|
|
255
|
+
closeOnEsc?: boolean;
|
|
256
|
+
portalContainer?: HTMLElement;
|
|
257
|
+
overlayClassName?: string;
|
|
258
|
+
headerClassName?: string;
|
|
259
|
+
bodyClassName?: string;
|
|
260
|
+
footerClassName?: string;
|
|
261
|
+
}
|
|
262
|
+
declare const Modal: React.ForwardRefExoticComponent<ModalProps & React.RefAttributes<HTMLDivElement>>;
|
|
263
|
+
|
|
174
264
|
interface SelectProps {
|
|
175
265
|
value?: string;
|
|
176
266
|
defaultValue?: string;
|
|
@@ -237,6 +327,43 @@ declare const Table: React.ForwardRefExoticComponent<TableProps & React.RefAttri
|
|
|
237
327
|
Cell: React.ForwardRefExoticComponent<TableCellProps & React.RefAttributes<HTMLTableCellElement>>;
|
|
238
328
|
};
|
|
239
329
|
|
|
330
|
+
type DataTableRow = Record<string, unknown>;
|
|
331
|
+
type DataTableRowId = string | number;
|
|
332
|
+
type DataTableSortDirection = "asc" | "desc";
|
|
333
|
+
type DataTableAlign = "left" | "center" | "right";
|
|
334
|
+
interface DataTableColumn {
|
|
335
|
+
key: string;
|
|
336
|
+
header: React.ReactNode;
|
|
337
|
+
render?: (row: DataTableRow, value: unknown) => React.ReactNode;
|
|
338
|
+
sortable?: boolean;
|
|
339
|
+
align?: DataTableAlign;
|
|
340
|
+
width?: React.CSSProperties["width"];
|
|
341
|
+
className?: string;
|
|
342
|
+
customHeaderRender?: () => React.ReactNode;
|
|
343
|
+
}
|
|
344
|
+
interface DataTableProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
345
|
+
data?: DataTableRow[];
|
|
346
|
+
columns?: DataTableColumn[];
|
|
347
|
+
selectable?: boolean;
|
|
348
|
+
selectedRows?: DataTableRowId[];
|
|
349
|
+
onSelectionChange?: (selectedRows: DataTableRowId[]) => void;
|
|
350
|
+
sortable?: boolean;
|
|
351
|
+
defaultSortKey?: string | null;
|
|
352
|
+
defaultSortDir?: DataTableSortDirection;
|
|
353
|
+
pagination?: boolean;
|
|
354
|
+
pageSize?: number;
|
|
355
|
+
currentPage?: number;
|
|
356
|
+
onPageChange?: (page: number) => void;
|
|
357
|
+
loading?: boolean;
|
|
358
|
+
isLoading?: boolean;
|
|
359
|
+
emptyState?: React.ReactNode;
|
|
360
|
+
emptyMessage?: string;
|
|
361
|
+
onRowClick?: (row: DataTableRow) => void;
|
|
362
|
+
getRowId?: (row: DataTableRow, index: number) => DataTableRowId;
|
|
363
|
+
variant?: "default" | "striped" | "bordered";
|
|
364
|
+
}
|
|
365
|
+
declare const DataTable: React.ForwardRefExoticComponent<DataTableProps & React.RefAttributes<HTMLDivElement>>;
|
|
366
|
+
|
|
240
367
|
interface AccordionSingleProps extends React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Root> {
|
|
241
368
|
type?: "single";
|
|
242
369
|
defaultValue?: string;
|
|
@@ -434,5 +561,5 @@ interface ThemeContextValue {
|
|
|
434
561
|
declare const ThemeProvider: React.FC<ThemeProviderProps>;
|
|
435
562
|
declare function useTheme(): ThemeContextValue;
|
|
436
563
|
|
|
437
|
-
export { Accordion, Alert, AspectRatio, Avatar, Badge, Breadcrumb, Button, Card, Checkbox, Code, Container, Dialog, DropdownMenu, Grid, Input, Kbd, Label, Progress, RadioGroup, ScrollArea, Select, Separator, Skeleton, Spinner, Stack, Switch, Table, Tabs, Tag, Textarea, ThemeProvider, Toast, ToastProvider, Toaster, Tooltip, TooltipProvider, VisuallyHidden, useTheme, useToast };
|
|
438
|
-
export type { AccordionContentProps, AccordionItemProps, AccordionProps, AccordionTriggerProps, AlertProps, AspectRatioProps, AvatarProps, BadgeProps, BreadcrumbItemProps, BreadcrumbLinkProps, BreadcrumbListProps, BreadcrumbPageProps, BreadcrumbProps, BreadcrumbSeparatorProps, ButtonProps, CardProps, CheckboxProps, CodeProps, ContainerProps, DialogContentProps, DialogFooterProps, DialogHeaderProps, DialogProps, DialogTriggerProps, DropdownMenuCheckboxItemProps, DropdownMenuContentProps, DropdownMenuItemProps, DropdownMenuProps, DropdownMenuTriggerProps, GridProps, InputProps, KbdProps, LabelProps, ProgressProps, RadioGroupItemProps, RadioGroupProps, ScrollAreaProps, SelectProps, SeparatorProps, SkeletonProps, SpinnerProps, StackProps, SwitchProps, TableBodyProps, TableCellProps, TableHeadProps, TableHeaderProps, TableProps, TableRowProps, TabsContentProps, TabsListProps, TabsProps, TabsTriggerProps, TagProps, TextareaProps, Theme, ThemeContextValue, ThemeProviderProps, ToastProps, ToasterProps, TooltipProps, VisuallyHiddenProps };
|
|
564
|
+
export { Accordion, Alert, AspectRatio, Avatar, Badge, Breadcrumb, Button, Card, Checkbox, Code, Container, DataTable, Dialog, DropdownMenu, Grid, Input, Kbd, Label, Modal, Progress, RadioGroup, ScrollArea, Select, Separator, Skeleton, Spinner, Stack, StatusBadge, Switch, Table, Tabs, Tag, Textarea, ThemeProvider, Toast, ToastProvider, Toaster, Tooltip, TooltipProvider, VisuallyHidden, useTheme, useToast };
|
|
565
|
+
export type { AccordionContentProps, AccordionItemProps, AccordionProps, AccordionTriggerProps, AlertProps, AspectRatioProps, AvatarProps, BadgeProps, BreadcrumbItemProps, BreadcrumbLinkProps, BreadcrumbListProps, BreadcrumbPageProps, BreadcrumbProps, BreadcrumbSeparatorProps, ButtonProps, CardProps, CheckboxProps, CodeProps, ContainerProps, DataTableAlign, DataTableColumn, DataTableProps, DataTableSortDirection, DialogContentProps, DialogFooterProps, DialogHeaderProps, DialogProps, DialogTriggerProps, DropdownMenuCheckboxItemProps, DropdownMenuContentProps, DropdownMenuItemProps, DropdownMenuProps, DropdownMenuTriggerProps, GridProps, InputProps, KbdProps, LabelProps, ModalCloseButtonVariant, ModalProps, ModalSize, ProgressProps, RadioGroupItemProps, RadioGroupProps, ScrollAreaProps, SelectProps, SeparatorProps, SkeletonProps, SpinnerProps, StackProps, StatusBadgeProps, SwitchProps, TableBodyProps, TableCellProps, TableHeadProps, TableHeaderProps, TableProps, TableRowProps, TabsContentProps, TabsItem, TabsListProps, TabsProps, TabsSize, TabsTriggerProps, TabsValue, TabsVariant, TagProps, TextareaProps, Theme, ThemeContextValue, ThemeProviderProps, ToastProps, ToasterProps, TooltipProps, VisuallyHiddenProps };
|