@algorithm-shift/design-system 1.2.34 → 1.2.36

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.d.mts CHANGED
@@ -50,6 +50,10 @@ interface TextAreaProps extends ElementProps, InputProperties { }
50
50
  interface UrlInputProps extends ElementProps, InputProperties { }
51
51
  interface SearchInputProps extends ElementProps, InputProperties { }
52
52
  interface FileInputProps extends ElementProps, InputProperties { }
53
+ interface TextInputGroupProps extends ElementProps, InputProperties {
54
+ prepend?: string | React.ReactNode;
55
+ append?: string | React.ReactNode;
56
+ }
53
57
  interface CheckboxInputProps extends ElementProps, InputProperties {
54
58
  value?: boolean;
55
59
  onChange?: (value: boolean) => void;
@@ -96,6 +100,9 @@ interface TableProps extends ElementProps {
96
100
  itemsPerPage?: number;
97
101
  onPageChange?: (page: number) => void;
98
102
  loading?: boolean;
103
+ cellClickEnabled?: (cellData: Record<string, any>, columnId: string) => boolean;
104
+ onCellClick?: (cellData: Record<string, any>, columnId: string) => void;
105
+ getRowSelection?: (rowSelection: Record<string, boolean>) => void;
99
106
  }
100
107
 
101
108
  interface TabsProps extends ElementProps {
@@ -236,7 +243,9 @@ declare function DatePicker({ className, style, ...props }: DatePickerInputProps
236
243
 
237
244
  declare const DateRange: ({ className, style, ...props }: DateRangeInputProps) => react_jsx_runtime.JSX.Element;
238
245
 
239
- declare const Table: ({ columns, data, rowActions, className, style, pagination, itemsPerPage, onPageChange, loading }: TableProps) => react_jsx_runtime.JSX.Element;
246
+ declare const TextInputGroup: ({ className, style, prepend, append, ...props }: TextInputGroupProps) => react_jsx_runtime.JSX.Element;
247
+
248
+ declare const Table: ({ columns, data, rowActions, className, style, pagination, itemsPerPage, onPageChange, loading, ...props }: TableProps) => react_jsx_runtime.JSX.Element;
240
249
 
241
250
  interface CustomPaginationProps {
242
251
  totalPages: number;
@@ -266,6 +275,30 @@ declare const DonutChart: ({ className, style, ...props }: PieChartProps) => rea
266
275
 
267
276
  declare function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc, setShowBcc, cc, setCc, bcc, setBcc, subject, setSubject, body, setBody }: EmailComposerProps): react_jsx_runtime.JSX.Element;
268
277
 
278
+ type ToastVariant = 'default' | 'success' | 'error' | 'info' | 'warning';
279
+ type SonnerToastProps = {
280
+ title: string;
281
+ description?: string;
282
+ variant?: ToastVariant;
283
+ duration?: number;
284
+ actionLabel?: string;
285
+ onAction?: () => void;
286
+ };
287
+ declare function showSonnerToast({ title, description, variant, duration, actionLabel, onAction, }: SonnerToastProps): void;
288
+
289
+ declare function StateProvider({ children }: {
290
+ children: React$1.ReactNode;
291
+ }): react_jsx_runtime.JSX.Element;
292
+ declare function useAppState(): any;
293
+
294
+ type CanvasState = Record<string, any>;
295
+ type CanvasAction = {
296
+ type: 'SET_STATE';
297
+ key: string;
298
+ value: any;
299
+ };
300
+ declare function stateReducer(state: CanvasState, action: CanvasAction): CanvasState;
301
+
269
302
  declare function cn(...inputs: ClassValue[]): string;
270
303
 
271
- export { ChartComponent as BarChart, ButtonWrapper as Button, CheckboxInput as Checkbox, Container, DatePicker, DateRange, Dropdown, EmailInput as Email, EmailComposer, FileInput, Flex as FlexLayout, Grid as GridLayout, ImageControl as Image, Logo, Modal, MultiCheckbox, Navbar, Notification, NumberInput, CustomPagination as Pagination, PasswordInput as Password, PhoneInput as Phone, DonutChart as PieChart, Profile, RadioInput as RadioGroup, RichText, SearchInput as Search, Shape, Spacer, StagesComponent as Stages, SwitchToggle, Table, Tabs, TextInput as Text, Textarea, Typography, UrlInput as URL, cn };
304
+ export { ChartComponent as BarChart, ButtonWrapper as Button, CheckboxInput as Checkbox, Container, DatePicker, DateRange, Dropdown, EmailInput as Email, EmailComposer, FileInput, Flex as FlexLayout, Grid as GridLayout, ImageControl as Image, Logo, Modal, MultiCheckbox, Navbar, Notification, NumberInput, CustomPagination as Pagination, PasswordInput as Password, PhoneInput as Phone, DonutChart as PieChart, Profile, RadioInput as RadioGroup, RichText, SearchInput as Search, Shape, Spacer, StagesComponent as Stages, StateProvider, SwitchToggle, Table, Tabs, TextInput as Text, TextInputGroup, Textarea, Typography, UrlInput as URL, cn, showSonnerToast, stateReducer, useAppState };
package/dist/index.d.ts CHANGED
@@ -50,6 +50,10 @@ interface TextAreaProps extends ElementProps, InputProperties { }
50
50
  interface UrlInputProps extends ElementProps, InputProperties { }
51
51
  interface SearchInputProps extends ElementProps, InputProperties { }
52
52
  interface FileInputProps extends ElementProps, InputProperties { }
53
+ interface TextInputGroupProps extends ElementProps, InputProperties {
54
+ prepend?: string | React.ReactNode;
55
+ append?: string | React.ReactNode;
56
+ }
53
57
  interface CheckboxInputProps extends ElementProps, InputProperties {
54
58
  value?: boolean;
55
59
  onChange?: (value: boolean) => void;
@@ -96,6 +100,9 @@ interface TableProps extends ElementProps {
96
100
  itemsPerPage?: number;
97
101
  onPageChange?: (page: number) => void;
98
102
  loading?: boolean;
103
+ cellClickEnabled?: (cellData: Record<string, any>, columnId: string) => boolean;
104
+ onCellClick?: (cellData: Record<string, any>, columnId: string) => void;
105
+ getRowSelection?: (rowSelection: Record<string, boolean>) => void;
99
106
  }
100
107
 
101
108
  interface TabsProps extends ElementProps {
@@ -236,7 +243,9 @@ declare function DatePicker({ className, style, ...props }: DatePickerInputProps
236
243
 
237
244
  declare const DateRange: ({ className, style, ...props }: DateRangeInputProps) => react_jsx_runtime.JSX.Element;
238
245
 
239
- declare const Table: ({ columns, data, rowActions, className, style, pagination, itemsPerPage, onPageChange, loading }: TableProps) => react_jsx_runtime.JSX.Element;
246
+ declare const TextInputGroup: ({ className, style, prepend, append, ...props }: TextInputGroupProps) => react_jsx_runtime.JSX.Element;
247
+
248
+ declare const Table: ({ columns, data, rowActions, className, style, pagination, itemsPerPage, onPageChange, loading, ...props }: TableProps) => react_jsx_runtime.JSX.Element;
240
249
 
241
250
  interface CustomPaginationProps {
242
251
  totalPages: number;
@@ -266,6 +275,30 @@ declare const DonutChart: ({ className, style, ...props }: PieChartProps) => rea
266
275
 
267
276
  declare function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc, setShowBcc, cc, setCc, bcc, setBcc, subject, setSubject, body, setBody }: EmailComposerProps): react_jsx_runtime.JSX.Element;
268
277
 
278
+ type ToastVariant = 'default' | 'success' | 'error' | 'info' | 'warning';
279
+ type SonnerToastProps = {
280
+ title: string;
281
+ description?: string;
282
+ variant?: ToastVariant;
283
+ duration?: number;
284
+ actionLabel?: string;
285
+ onAction?: () => void;
286
+ };
287
+ declare function showSonnerToast({ title, description, variant, duration, actionLabel, onAction, }: SonnerToastProps): void;
288
+
289
+ declare function StateProvider({ children }: {
290
+ children: React$1.ReactNode;
291
+ }): react_jsx_runtime.JSX.Element;
292
+ declare function useAppState(): any;
293
+
294
+ type CanvasState = Record<string, any>;
295
+ type CanvasAction = {
296
+ type: 'SET_STATE';
297
+ key: string;
298
+ value: any;
299
+ };
300
+ declare function stateReducer(state: CanvasState, action: CanvasAction): CanvasState;
301
+
269
302
  declare function cn(...inputs: ClassValue[]): string;
270
303
 
271
- export { ChartComponent as BarChart, ButtonWrapper as Button, CheckboxInput as Checkbox, Container, DatePicker, DateRange, Dropdown, EmailInput as Email, EmailComposer, FileInput, Flex as FlexLayout, Grid as GridLayout, ImageControl as Image, Logo, Modal, MultiCheckbox, Navbar, Notification, NumberInput, CustomPagination as Pagination, PasswordInput as Password, PhoneInput as Phone, DonutChart as PieChart, Profile, RadioInput as RadioGroup, RichText, SearchInput as Search, Shape, Spacer, StagesComponent as Stages, SwitchToggle, Table, Tabs, TextInput as Text, Textarea, Typography, UrlInput as URL, cn };
304
+ export { ChartComponent as BarChart, ButtonWrapper as Button, CheckboxInput as Checkbox, Container, DatePicker, DateRange, Dropdown, EmailInput as Email, EmailComposer, FileInput, Flex as FlexLayout, Grid as GridLayout, ImageControl as Image, Logo, Modal, MultiCheckbox, Navbar, Notification, NumberInput, CustomPagination as Pagination, PasswordInput as Password, PhoneInput as Phone, DonutChart as PieChart, Profile, RadioInput as RadioGroup, RichText, SearchInput as Search, Shape, Spacer, StagesComponent as Stages, StateProvider, SwitchToggle, Table, Tabs, TextInput as Text, TextInputGroup, Textarea, Typography, UrlInput as URL, cn, showSonnerToast, stateReducer, useAppState };