@uxuissk/design-system 0.5.0 → 0.7.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/ai-rules.json +84 -0
- package/dist/ai-rules.md +163 -0
- package/dist/header-main.svg +92 -0
- package/dist/header-sub.svg +76 -0
- package/dist/sellsuki-ds.css +1 -1
- package/dist/sellsuki-ds.js +2254 -1587
- package/dist/sellsuki-ds.js.map +1 -1
- package/dist/sellsuki-ds.umd.cjs +75 -75
- package/dist/sellsuki-ds.umd.cjs.map +1 -1
- package/dist/sidebar-ref.svg +161 -0
- package/dist/types/index.d.ts +163 -1
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -48,6 +48,79 @@ export declare interface AccordionProps {
|
|
|
48
48
|
|
|
49
49
|
export declare type AccordionType = "single" | "multiple";
|
|
50
50
|
|
|
51
|
+
export declare interface AdvancedColumn<T = Record<string, any>> {
|
|
52
|
+
/** Unique column key — matches field name in data row */
|
|
53
|
+
key: string;
|
|
54
|
+
/** Column header label */
|
|
55
|
+
header: string;
|
|
56
|
+
/** Enable server-side sort click */
|
|
57
|
+
sortable?: boolean;
|
|
58
|
+
/** Fixed pixel or CSS width */
|
|
59
|
+
width?: number | string;
|
|
60
|
+
/** Minimum width in px (default 80) */
|
|
61
|
+
minWidth?: number;
|
|
62
|
+
/** Text alignment */
|
|
63
|
+
align?: "left" | "center" | "right";
|
|
64
|
+
/** Stick to left edge (frozen column) */
|
|
65
|
+
frozen?: boolean;
|
|
66
|
+
/** Allow hiding via column toggle. Default true */
|
|
67
|
+
hideable?: boolean;
|
|
68
|
+
/** Start hidden */
|
|
69
|
+
defaultHidden?: boolean;
|
|
70
|
+
/** Custom cell renderer */
|
|
71
|
+
render?: (value: any, row: T, index: number) => default_2.ReactNode;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export declare function AdvancedDataTable<T extends Record<string, any>>({ columns, data, rowKey, pagination, sortBy, sortOrder, onPageChange, onSortChange, selectable, selectedRows: controlledSelected, onSelectionChange, bulkActions, onRowClick, expandedRowRender, loading, loadingRows, error, emptyMessage, emptyDescription, showColumnToggle, size, stickyHeader, className, }: AdvancedDataTableProps<T>): JSX.Element;
|
|
75
|
+
|
|
76
|
+
export declare interface AdvancedDataTableProps<T = Record<string, any>> {
|
|
77
|
+
/** Column definitions */
|
|
78
|
+
columns: AdvancedColumn<T>[];
|
|
79
|
+
/** Row data */
|
|
80
|
+
data: T[];
|
|
81
|
+
/** Field to use as unique row key (default: "id") */
|
|
82
|
+
rowKey?: string;
|
|
83
|
+
/** Server pagination metadata */
|
|
84
|
+
pagination?: PaginationMeta;
|
|
85
|
+
/** Currently sorted column key */
|
|
86
|
+
sortBy?: string;
|
|
87
|
+
/** Current sort direction */
|
|
88
|
+
sortOrder?: SortOrder;
|
|
89
|
+
/** Called when user changes page or page size */
|
|
90
|
+
onPageChange?: (page: number, pageSize: number) => void;
|
|
91
|
+
/** Called when user clicks a sortable column */
|
|
92
|
+
onSortChange?: (sortBy: string, sortOrder: SortOrder) => void;
|
|
93
|
+
/** Enable row checkboxes */
|
|
94
|
+
selectable?: boolean;
|
|
95
|
+
/** Controlled selection (set of rowKey values) */
|
|
96
|
+
selectedRows?: Set<string | number>;
|
|
97
|
+
/** Called when selection changes */
|
|
98
|
+
onSelectionChange?: (selected: Set<string | number>, rows: T[]) => void;
|
|
99
|
+
/** Actions shown in bulk action bar when rows are selected */
|
|
100
|
+
bulkActions?: BulkAction[];
|
|
101
|
+
/** Called when a row is clicked */
|
|
102
|
+
onRowClick?: (row: T) => void;
|
|
103
|
+
/** Render function for expanded row content */
|
|
104
|
+
expandedRowRender?: (row: T) => default_2.ReactNode;
|
|
105
|
+
/** Show skeleton loading rows */
|
|
106
|
+
loading?: boolean;
|
|
107
|
+
/** Number of skeleton rows to show while loading */
|
|
108
|
+
loadingRows?: number;
|
|
109
|
+
/** Error message — renders error state instead of table body */
|
|
110
|
+
error?: string;
|
|
111
|
+
/** Custom empty state message */
|
|
112
|
+
emptyMessage?: string;
|
|
113
|
+
/** Custom empty state description */
|
|
114
|
+
emptyDescription?: string;
|
|
115
|
+
/** Show column visibility toggle button */
|
|
116
|
+
showColumnToggle?: boolean;
|
|
117
|
+
size?: AdvancedTableSize;
|
|
118
|
+
stickyHeader?: boolean;
|
|
119
|
+
className?: string;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export declare type AdvancedTableSize = "sm" | "md" | "lg";
|
|
123
|
+
|
|
51
124
|
export declare function Alert({ variant, title, children, dismissible, onDismiss, action, icon, className }: AlertProps): JSX.Element | null;
|
|
52
125
|
|
|
53
126
|
declare interface AlertProps {
|
|
@@ -144,6 +217,13 @@ export declare type BreadcrumbSeparator = "chevron" | "slash" | "dot";
|
|
|
144
217
|
|
|
145
218
|
export declare type BreadcrumbSize = "sm" | "md" | "lg";
|
|
146
219
|
|
|
220
|
+
export declare interface BulkAction {
|
|
221
|
+
label: string;
|
|
222
|
+
icon?: default_2.ReactNode;
|
|
223
|
+
variant?: "default" | "destructive";
|
|
224
|
+
onClick: (selectedKeys: Array<string | number>) => void;
|
|
225
|
+
}
|
|
226
|
+
|
|
147
227
|
export declare function ButtonGroup({ children, className, }: {
|
|
148
228
|
children: default_2.ReactNode;
|
|
149
229
|
className?: string;
|
|
@@ -523,6 +603,46 @@ export declare interface FileUploadProps {
|
|
|
523
603
|
|
|
524
604
|
export declare type FileUploadVariant = "dropzone" | "button" | "avatar";
|
|
525
605
|
|
|
606
|
+
export declare function FilterBar({ filters, searchPlaceholder, showSearch, value, onFilterChange, className, }: FilterBarProps): JSX.Element;
|
|
607
|
+
|
|
608
|
+
export declare interface FilterBarProps {
|
|
609
|
+
/** Filter definitions */
|
|
610
|
+
filters?: FilterConfig[];
|
|
611
|
+
/** Search placeholder */
|
|
612
|
+
searchPlaceholder?: string;
|
|
613
|
+
/** Show search field */
|
|
614
|
+
showSearch?: boolean;
|
|
615
|
+
/** Controlled value */
|
|
616
|
+
value?: FilterBarValue;
|
|
617
|
+
/** Callback when any filter/search changes */
|
|
618
|
+
onFilterChange?: (value: FilterBarValue) => void;
|
|
619
|
+
/** Additional className */
|
|
620
|
+
className?: string;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
export declare interface FilterBarValue {
|
|
624
|
+
search?: string;
|
|
625
|
+
filters: Record<string, FilterValue>;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
export declare interface FilterConfig {
|
|
629
|
+
/** Unique key for this filter */
|
|
630
|
+
key: string;
|
|
631
|
+
/** Display label for the filter button */
|
|
632
|
+
label: string;
|
|
633
|
+
/** single = one value at a time, multi = multiple values */
|
|
634
|
+
type: "single" | "multi";
|
|
635
|
+
/** Available options */
|
|
636
|
+
options: FilterOption[];
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
export declare interface FilterOption {
|
|
640
|
+
label: string;
|
|
641
|
+
value: string;
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
export declare type FilterValue = string | string[] | [Date | null, Date | null] | null;
|
|
645
|
+
|
|
526
646
|
export declare function FormError({ message, className }: FormErrorProps): JSX.Element | null;
|
|
527
647
|
|
|
528
648
|
export declare interface FormErrorProps {
|
|
@@ -530,13 +650,15 @@ export declare interface FormErrorProps {
|
|
|
530
650
|
className?: string;
|
|
531
651
|
}
|
|
532
652
|
|
|
533
|
-
export declare function FormField({ name, label, required, error, helperText, children, className, }: FormFieldProps): JSX.Element;
|
|
653
|
+
export declare function FormField({ name, label, required, error, successMessage, helperText, layout, labelWidth, children, className, }: FormFieldProps): JSX.Element;
|
|
534
654
|
|
|
535
655
|
declare interface FormFieldContextValue {
|
|
536
656
|
name: string;
|
|
537
657
|
error?: string;
|
|
538
658
|
}
|
|
539
659
|
|
|
660
|
+
export declare type FormFieldLayout = "vertical" | "horizontal";
|
|
661
|
+
|
|
540
662
|
export declare interface FormFieldProps {
|
|
541
663
|
/** Field name — used for htmlFor on label */
|
|
542
664
|
name: string;
|
|
@@ -546,8 +668,14 @@ export declare interface FormFieldProps {
|
|
|
546
668
|
required?: boolean;
|
|
547
669
|
/** Error message to display */
|
|
548
670
|
error?: string;
|
|
671
|
+
/** Success message to display (overrides helperText when present) */
|
|
672
|
+
successMessage?: string;
|
|
549
673
|
/** Helper/description text below the field */
|
|
550
674
|
helperText?: string;
|
|
675
|
+
/** Layout direction: vertical (default) or horizontal (label left, input right) */
|
|
676
|
+
layout?: FormFieldLayout;
|
|
677
|
+
/** Label width when layout="horizontal" (default: "160px") */
|
|
678
|
+
labelWidth?: string;
|
|
551
679
|
/** Field content (input, select, etc.) */
|
|
552
680
|
children: default_2.ReactNode;
|
|
553
681
|
/** Additional className */
|
|
@@ -570,6 +698,13 @@ export declare interface FormLabelProps {
|
|
|
570
698
|
className?: string;
|
|
571
699
|
}
|
|
572
700
|
|
|
701
|
+
export declare function FormSuccess({ message, className }: FormSuccessProps): JSX.Element | null;
|
|
702
|
+
|
|
703
|
+
export declare interface FormSuccessProps {
|
|
704
|
+
message?: string;
|
|
705
|
+
className?: string;
|
|
706
|
+
}
|
|
707
|
+
|
|
573
708
|
export declare const IconButton: default_2.ForwardRefExoticComponent<IconButtonProps & default_2.RefAttributes<HTMLButtonElement>>;
|
|
574
709
|
|
|
575
710
|
export declare interface IconButtonProps extends default_2.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
@@ -740,8 +875,33 @@ export declare interface OTPInputProps {
|
|
|
740
875
|
|
|
741
876
|
export declare type OTPInputSize = "sm" | "md" | "lg";
|
|
742
877
|
|
|
878
|
+
export declare function PageHeader({ title, subtitle, breadcrumb, actions, tabs, sticky, className, }: PageHeaderProps): JSX.Element;
|
|
879
|
+
|
|
880
|
+
export declare interface PageHeaderProps {
|
|
881
|
+
/** Main page title (required) */
|
|
882
|
+
title: string;
|
|
883
|
+
/** Optional subtitle below the title */
|
|
884
|
+
subtitle?: string;
|
|
885
|
+
/** Breadcrumb content — pass a <Breadcrumb /> component */
|
|
886
|
+
breadcrumb?: default_2.ReactNode;
|
|
887
|
+
/** Action buttons — right-aligned (pass DSButton components) */
|
|
888
|
+
actions?: default_2.ReactNode;
|
|
889
|
+
/** Tab navigation below the header — pass a <Tabs /> component */
|
|
890
|
+
tabs?: default_2.ReactNode;
|
|
891
|
+
/** Stick to top of viewport while scrolling */
|
|
892
|
+
sticky?: boolean;
|
|
893
|
+
/** Additional className */
|
|
894
|
+
className?: string;
|
|
895
|
+
}
|
|
896
|
+
|
|
743
897
|
export declare function Pagination({ currentPage, totalPages, onPageChange, siblingCount, showFirstLast, showPrevNext, showPageSize, pageSizeOptions, pageSize, onPageSizeChange, totalItems, size, variant, disabled, showPageInfo, showItemsInfo, prevLabel, nextLabel, }: PaginationProps): JSX.Element;
|
|
744
898
|
|
|
899
|
+
export declare interface PaginationMeta {
|
|
900
|
+
page: number;
|
|
901
|
+
pageSize: number;
|
|
902
|
+
totalCount: number;
|
|
903
|
+
}
|
|
904
|
+
|
|
745
905
|
export declare interface PaginationProps {
|
|
746
906
|
/** Current active page (1-indexed) */
|
|
747
907
|
currentPage: number;
|
|
@@ -960,6 +1120,8 @@ export declare function SkeletonTable(): JSX.Element;
|
|
|
960
1120
|
|
|
961
1121
|
export declare type SkeletonVariant = "text" | "rectangular" | "circular" | "rounded";
|
|
962
1122
|
|
|
1123
|
+
export declare type SortOrder = "asc" | "desc";
|
|
1124
|
+
|
|
963
1125
|
export declare function Spinner({ size, color, className }: SpinnerProps): JSX.Element;
|
|
964
1126
|
|
|
965
1127
|
export declare namespace Spinner {
|