@algorithm-shift/design-system 1.2.40 → 1.2.42
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.css +79 -9
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +35 -27
- package/dist/index.d.ts +35 -27
- package/dist/index.js +750 -531
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +746 -528
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import React$1 from 'react';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
+
import { UseFormReturn } from 'react-hook-form';
|
|
4
5
|
import { ClassValue } from 'clsx';
|
|
5
6
|
|
|
6
7
|
interface ElementProps {
|
|
@@ -110,6 +111,8 @@ interface TabsProps extends ElementProps {
|
|
|
110
111
|
tabs?: Record<string, any>;
|
|
111
112
|
pathname?: string;
|
|
112
113
|
LinkComponent?: React.ComponentType<any>;
|
|
114
|
+
verticalMenu?: boolean;
|
|
115
|
+
canvasMode?: 'desktop' | 'tablet' | 'mobile';
|
|
113
116
|
}
|
|
114
117
|
|
|
115
118
|
interface StagesProps extends ElementProps {
|
|
@@ -118,23 +121,6 @@ interface StagesProps extends ElementProps {
|
|
|
118
121
|
buttonText?: string;
|
|
119
122
|
}
|
|
120
123
|
|
|
121
|
-
interface ProfileProps extends ElementProps {
|
|
122
|
-
profileType?: 'avatar' | 'initial';
|
|
123
|
-
showName?: boolean;
|
|
124
|
-
userName?: string;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
interface NotificationProps extends ElementProps {
|
|
128
|
-
badgeType?: 'number' | 'dot';
|
|
129
|
-
badgeCount?: number;
|
|
130
|
-
hideBadgeWhenZero?: boolean;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
interface LogoProps extends ElementProps {
|
|
134
|
-
imageUrl?: string;
|
|
135
|
-
altText?: string;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
124
|
type ButtonProps = ElementProps & React.ComponentProps<"button"> & {
|
|
139
125
|
textContent?: string;
|
|
140
126
|
type?: 'button' | 'submit';
|
|
@@ -189,6 +175,19 @@ interface NavbarProps extends ElementProps {
|
|
|
189
175
|
canvasMode?: 'desktop' | 'tablet' | 'mobile';
|
|
190
176
|
LinkComponent?: React.ComponentType<any>;
|
|
191
177
|
ImageComponent?: React.ComponentType<any>;
|
|
178
|
+
list?: Record<string, any>;
|
|
179
|
+
userName?: string;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
interface BreadcrumbProps extends ElementProps {
|
|
183
|
+
list?: Record<string, any>;
|
|
184
|
+
LinkComponent?: React.ComponentType<any>;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
interface ButtonGroupProps extends ElementProps {
|
|
188
|
+
textContent?: string;
|
|
189
|
+
list?: Record<string, any>;
|
|
190
|
+
LinkComponent?: React.ComponentType<any>;
|
|
192
191
|
}
|
|
193
192
|
|
|
194
193
|
declare const Modal: ({ children, onClose, label, className, style }: ModalProps) => react_jsx_runtime.JSX.Element;
|
|
@@ -210,6 +209,10 @@ declare const Typography: ({ className, style, tagName, textContent, }: Typograp
|
|
|
210
209
|
className: string;
|
|
211
210
|
}, HTMLElement>;
|
|
212
211
|
|
|
212
|
+
declare const Breadcrumb: ({ list, className, style, LinkComponent }: BreadcrumbProps) => react_jsx_runtime.JSX.Element;
|
|
213
|
+
|
|
214
|
+
declare function SplitButton({ style, textContent, className, list, LinkComponent }: ButtonGroupProps): react_jsx_runtime.JSX.Element;
|
|
215
|
+
|
|
213
216
|
declare const TextInput: ({ className, style, ...props }: TextInputProps) => react_jsx_runtime.JSX.Element;
|
|
214
217
|
|
|
215
218
|
declare const NumberInput: ({ className, style, ...props }: NumberInputProps) => react_jsx_runtime.JSX.Element;
|
|
@@ -256,19 +259,13 @@ interface CustomPaginationProps {
|
|
|
256
259
|
}
|
|
257
260
|
declare const CustomPagination: ({ totalPages, currentPage, onPageChange, maxVisiblePages, }: CustomPaginationProps) => react_jsx_runtime.JSX.Element;
|
|
258
261
|
|
|
259
|
-
declare const Tabs: ({ tabs,
|
|
262
|
+
declare const Tabs: ({ className, style, tabs, verticalMenu, LinkComponent, pathname, canvasMode }: TabsProps) => react_jsx_runtime.JSX.Element;
|
|
260
263
|
|
|
261
264
|
declare const StagesComponent: ({ stages, isShowBtn, buttonText, className, style }: StagesProps) => react_jsx_runtime.JSX.Element;
|
|
262
265
|
|
|
263
266
|
declare const Spacer: ({ className, style }: ElementProps) => react_jsx_runtime.JSX.Element;
|
|
264
267
|
|
|
265
|
-
declare
|
|
266
|
-
|
|
267
|
-
declare const Notification: ({ className, style, badgeType, badgeCount, hideBadgeWhenZero }: NotificationProps) => react_jsx_runtime.JSX.Element;
|
|
268
|
-
|
|
269
|
-
declare const Logo: ({ className, style, imageUrl, altText, }: LogoProps) => react_jsx_runtime.JSX.Element;
|
|
270
|
-
|
|
271
|
-
declare function Navbar({ style, badgeType, badgeCount, hideBadgeWhenZero, profileType, showName, imageUrl, altText, canvasMode, LinkComponent, ImageComponent }: NavbarProps): react_jsx_runtime.JSX.Element;
|
|
268
|
+
declare function Navbar({ style, badgeType, badgeCount, hideBadgeWhenZero, profileType, showName, imageUrl, altText, canvasMode, LinkComponent, ImageComponent, list, userName }: NavbarProps): react_jsx_runtime.JSX.Element;
|
|
272
269
|
|
|
273
270
|
declare const ChartComponent: ({ className, style, ...props }: BarChartProps) => react_jsx_runtime.JSX.Element;
|
|
274
271
|
|
|
@@ -300,7 +297,7 @@ type CanvasAction = {
|
|
|
300
297
|
};
|
|
301
298
|
declare function stateReducer(state: CanvasState, action: CanvasAction): CanvasState;
|
|
302
299
|
|
|
303
|
-
interface
|
|
300
|
+
interface FormProps<T extends z.ZodObject<any>> {
|
|
304
301
|
validation?: any[];
|
|
305
302
|
formName?: string;
|
|
306
303
|
defaultValues?: Partial<z.infer<T>> | any;
|
|
@@ -308,8 +305,19 @@ interface FormWrapperProps<T extends z.ZodObject<any>> {
|
|
|
308
305
|
onSubmit?: (data: z.infer<T>) => void;
|
|
309
306
|
onReset?: () => void;
|
|
310
307
|
}
|
|
308
|
+
declare const Form: <T extends z.ZodObject<any>>({ validation, defaultValues, children, onSubmit, onReset, }: FormProps<T>) => react_jsx_runtime.JSX.Element;
|
|
309
|
+
|
|
310
|
+
interface FormWrapperProps<T extends z.ZodObject<any>> {
|
|
311
|
+
validation?: any[];
|
|
312
|
+
formName?: string;
|
|
313
|
+
defaultValues?: Partial<z.infer<T>> | any;
|
|
314
|
+
children?: React$1.ReactNode | ((form: UseFormReturn<z.infer<T>>) => React$1.ReactNode);
|
|
315
|
+
onSubmit?: (data: z.infer<T>) => void;
|
|
316
|
+
onReset?: () => void;
|
|
317
|
+
}
|
|
311
318
|
declare const FormWrapper: <T extends z.ZodObject<any>>({ validation, defaultValues, children, onSubmit, onReset, }: FormWrapperProps<T>) => react_jsx_runtime.JSX.Element;
|
|
312
319
|
|
|
313
320
|
declare function cn(...inputs: ClassValue[]): string;
|
|
321
|
+
declare function getInitials(name: string): string;
|
|
314
322
|
|
|
315
|
-
export { ChartComponent as BarChart, ButtonWrapper as Button, CheckboxInput as Checkbox, Container, DatePicker, DateRange, Dropdown, EmailInput as Email, EmailComposer, FileInput, Flex as FlexLayout,
|
|
323
|
+
export { ChartComponent as BarChart, Breadcrumb, ButtonWrapper as Button, SplitButton as ButtonGroup, CheckboxInput as Checkbox, Container, DatePicker, DateRange, Dropdown, EmailInput as Email, EmailComposer, FileInput, Flex as FlexLayout, Form, FormWrapper, Grid as GridLayout, ImageControl as Image, Modal, MultiCheckbox, Navbar, NumberInput, CustomPagination as Pagination, PasswordInput as Password, PhoneInput as Phone, DonutChart as PieChart, 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, getInitials, showSonnerToast, stateReducer, useAppState };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import React$1 from 'react';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
+
import { UseFormReturn } from 'react-hook-form';
|
|
4
5
|
import { ClassValue } from 'clsx';
|
|
5
6
|
|
|
6
7
|
interface ElementProps {
|
|
@@ -110,6 +111,8 @@ interface TabsProps extends ElementProps {
|
|
|
110
111
|
tabs?: Record<string, any>;
|
|
111
112
|
pathname?: string;
|
|
112
113
|
LinkComponent?: React.ComponentType<any>;
|
|
114
|
+
verticalMenu?: boolean;
|
|
115
|
+
canvasMode?: 'desktop' | 'tablet' | 'mobile';
|
|
113
116
|
}
|
|
114
117
|
|
|
115
118
|
interface StagesProps extends ElementProps {
|
|
@@ -118,23 +121,6 @@ interface StagesProps extends ElementProps {
|
|
|
118
121
|
buttonText?: string;
|
|
119
122
|
}
|
|
120
123
|
|
|
121
|
-
interface ProfileProps extends ElementProps {
|
|
122
|
-
profileType?: 'avatar' | 'initial';
|
|
123
|
-
showName?: boolean;
|
|
124
|
-
userName?: string;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
interface NotificationProps extends ElementProps {
|
|
128
|
-
badgeType?: 'number' | 'dot';
|
|
129
|
-
badgeCount?: number;
|
|
130
|
-
hideBadgeWhenZero?: boolean;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
interface LogoProps extends ElementProps {
|
|
134
|
-
imageUrl?: string;
|
|
135
|
-
altText?: string;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
124
|
type ButtonProps = ElementProps & React.ComponentProps<"button"> & {
|
|
139
125
|
textContent?: string;
|
|
140
126
|
type?: 'button' | 'submit';
|
|
@@ -189,6 +175,19 @@ interface NavbarProps extends ElementProps {
|
|
|
189
175
|
canvasMode?: 'desktop' | 'tablet' | 'mobile';
|
|
190
176
|
LinkComponent?: React.ComponentType<any>;
|
|
191
177
|
ImageComponent?: React.ComponentType<any>;
|
|
178
|
+
list?: Record<string, any>;
|
|
179
|
+
userName?: string;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
interface BreadcrumbProps extends ElementProps {
|
|
183
|
+
list?: Record<string, any>;
|
|
184
|
+
LinkComponent?: React.ComponentType<any>;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
interface ButtonGroupProps extends ElementProps {
|
|
188
|
+
textContent?: string;
|
|
189
|
+
list?: Record<string, any>;
|
|
190
|
+
LinkComponent?: React.ComponentType<any>;
|
|
192
191
|
}
|
|
193
192
|
|
|
194
193
|
declare const Modal: ({ children, onClose, label, className, style }: ModalProps) => react_jsx_runtime.JSX.Element;
|
|
@@ -210,6 +209,10 @@ declare const Typography: ({ className, style, tagName, textContent, }: Typograp
|
|
|
210
209
|
className: string;
|
|
211
210
|
}, HTMLElement>;
|
|
212
211
|
|
|
212
|
+
declare const Breadcrumb: ({ list, className, style, LinkComponent }: BreadcrumbProps) => react_jsx_runtime.JSX.Element;
|
|
213
|
+
|
|
214
|
+
declare function SplitButton({ style, textContent, className, list, LinkComponent }: ButtonGroupProps): react_jsx_runtime.JSX.Element;
|
|
215
|
+
|
|
213
216
|
declare const TextInput: ({ className, style, ...props }: TextInputProps) => react_jsx_runtime.JSX.Element;
|
|
214
217
|
|
|
215
218
|
declare const NumberInput: ({ className, style, ...props }: NumberInputProps) => react_jsx_runtime.JSX.Element;
|
|
@@ -256,19 +259,13 @@ interface CustomPaginationProps {
|
|
|
256
259
|
}
|
|
257
260
|
declare const CustomPagination: ({ totalPages, currentPage, onPageChange, maxVisiblePages, }: CustomPaginationProps) => react_jsx_runtime.JSX.Element;
|
|
258
261
|
|
|
259
|
-
declare const Tabs: ({ tabs,
|
|
262
|
+
declare const Tabs: ({ className, style, tabs, verticalMenu, LinkComponent, pathname, canvasMode }: TabsProps) => react_jsx_runtime.JSX.Element;
|
|
260
263
|
|
|
261
264
|
declare const StagesComponent: ({ stages, isShowBtn, buttonText, className, style }: StagesProps) => react_jsx_runtime.JSX.Element;
|
|
262
265
|
|
|
263
266
|
declare const Spacer: ({ className, style }: ElementProps) => react_jsx_runtime.JSX.Element;
|
|
264
267
|
|
|
265
|
-
declare
|
|
266
|
-
|
|
267
|
-
declare const Notification: ({ className, style, badgeType, badgeCount, hideBadgeWhenZero }: NotificationProps) => react_jsx_runtime.JSX.Element;
|
|
268
|
-
|
|
269
|
-
declare const Logo: ({ className, style, imageUrl, altText, }: LogoProps) => react_jsx_runtime.JSX.Element;
|
|
270
|
-
|
|
271
|
-
declare function Navbar({ style, badgeType, badgeCount, hideBadgeWhenZero, profileType, showName, imageUrl, altText, canvasMode, LinkComponent, ImageComponent }: NavbarProps): react_jsx_runtime.JSX.Element;
|
|
268
|
+
declare function Navbar({ style, badgeType, badgeCount, hideBadgeWhenZero, profileType, showName, imageUrl, altText, canvasMode, LinkComponent, ImageComponent, list, userName }: NavbarProps): react_jsx_runtime.JSX.Element;
|
|
272
269
|
|
|
273
270
|
declare const ChartComponent: ({ className, style, ...props }: BarChartProps) => react_jsx_runtime.JSX.Element;
|
|
274
271
|
|
|
@@ -300,7 +297,7 @@ type CanvasAction = {
|
|
|
300
297
|
};
|
|
301
298
|
declare function stateReducer(state: CanvasState, action: CanvasAction): CanvasState;
|
|
302
299
|
|
|
303
|
-
interface
|
|
300
|
+
interface FormProps<T extends z.ZodObject<any>> {
|
|
304
301
|
validation?: any[];
|
|
305
302
|
formName?: string;
|
|
306
303
|
defaultValues?: Partial<z.infer<T>> | any;
|
|
@@ -308,8 +305,19 @@ interface FormWrapperProps<T extends z.ZodObject<any>> {
|
|
|
308
305
|
onSubmit?: (data: z.infer<T>) => void;
|
|
309
306
|
onReset?: () => void;
|
|
310
307
|
}
|
|
308
|
+
declare const Form: <T extends z.ZodObject<any>>({ validation, defaultValues, children, onSubmit, onReset, }: FormProps<T>) => react_jsx_runtime.JSX.Element;
|
|
309
|
+
|
|
310
|
+
interface FormWrapperProps<T extends z.ZodObject<any>> {
|
|
311
|
+
validation?: any[];
|
|
312
|
+
formName?: string;
|
|
313
|
+
defaultValues?: Partial<z.infer<T>> | any;
|
|
314
|
+
children?: React$1.ReactNode | ((form: UseFormReturn<z.infer<T>>) => React$1.ReactNode);
|
|
315
|
+
onSubmit?: (data: z.infer<T>) => void;
|
|
316
|
+
onReset?: () => void;
|
|
317
|
+
}
|
|
311
318
|
declare const FormWrapper: <T extends z.ZodObject<any>>({ validation, defaultValues, children, onSubmit, onReset, }: FormWrapperProps<T>) => react_jsx_runtime.JSX.Element;
|
|
312
319
|
|
|
313
320
|
declare function cn(...inputs: ClassValue[]): string;
|
|
321
|
+
declare function getInitials(name: string): string;
|
|
314
322
|
|
|
315
|
-
export { ChartComponent as BarChart, ButtonWrapper as Button, CheckboxInput as Checkbox, Container, DatePicker, DateRange, Dropdown, EmailInput as Email, EmailComposer, FileInput, Flex as FlexLayout,
|
|
323
|
+
export { ChartComponent as BarChart, Breadcrumb, ButtonWrapper as Button, SplitButton as ButtonGroup, CheckboxInput as Checkbox, Container, DatePicker, DateRange, Dropdown, EmailInput as Email, EmailComposer, FileInput, Flex as FlexLayout, Form, FormWrapper, Grid as GridLayout, ImageControl as Image, Modal, MultiCheckbox, Navbar, NumberInput, CustomPagination as Pagination, PasswordInput as Password, PhoneInput as Phone, DonutChart as PieChart, 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, getInitials, showSonnerToast, stateReducer, useAppState };
|