design-zystem 1.0.208 → 1.0.210
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 +39 -13
- package/dist/index.d.ts +39 -13
- package/dist/index.js +533 -356
- package/dist/index.mjs +475 -300
- package/package.json +2 -1
package/dist/index.d.mts
CHANGED
|
@@ -292,10 +292,11 @@ interface ButtonProps extends HTMLAttributes<HTMLButtonElement> {
|
|
|
292
292
|
fontWeight?: string;
|
|
293
293
|
onClick?: () => void;
|
|
294
294
|
disabled?: boolean;
|
|
295
|
+
noHover?: boolean;
|
|
295
296
|
style?: CSSProperties;
|
|
296
297
|
className?: string;
|
|
297
298
|
}
|
|
298
|
-
declare const Button: ({ label, children, iconLeft, iconRight, iconColor, variant, outline, size, width, isLoading, fontWeight, onClick, disabled, ...rest }: ButtonProps) => react_jsx_runtime.JSX.Element;
|
|
299
|
+
declare const Button: ({ label, children, iconLeft, iconRight, iconColor, variant, outline, size, width, isLoading, fontWeight, onClick, disabled, noHover, ...rest }: ButtonProps) => react_jsx_runtime.JSX.Element;
|
|
299
300
|
|
|
300
301
|
interface SelectOption<T> {
|
|
301
302
|
value: T;
|
|
@@ -419,6 +420,20 @@ interface ColorPickerProps {
|
|
|
419
420
|
}
|
|
420
421
|
declare const ColorPicker: react.ForwardRefExoticComponent<ColorPickerProps & react.RefAttributes<HTMLInputElement>>;
|
|
421
422
|
|
|
423
|
+
interface SliderInputProps {
|
|
424
|
+
value?: number;
|
|
425
|
+
onChange?: (value: number, e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
426
|
+
min?: number;
|
|
427
|
+
max?: number;
|
|
428
|
+
step?: number;
|
|
429
|
+
disabled?: boolean;
|
|
430
|
+
label?: string;
|
|
431
|
+
showValue?: boolean;
|
|
432
|
+
formatValue?: (value: number) => string;
|
|
433
|
+
id?: string;
|
|
434
|
+
}
|
|
435
|
+
declare const SliderInput: react.ForwardRefExoticComponent<SliderInputProps & react.RefAttributes<HTMLInputElement>>;
|
|
436
|
+
|
|
422
437
|
interface ListProps extends HTMLAttributes<HTMLDivElement> {
|
|
423
438
|
children?: ReactNode;
|
|
424
439
|
width?: string;
|
|
@@ -582,19 +597,13 @@ interface OptionsProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>
|
|
|
582
597
|
}
|
|
583
598
|
declare const Options: ({ icon, options, value, defaultId, onChange, disabled, }: OptionsProps) => react_jsx_runtime.JSX.Element;
|
|
584
599
|
|
|
585
|
-
interface StepperStep {
|
|
586
|
-
label: string;
|
|
587
|
-
icon?: string;
|
|
588
|
-
onClick?: (index: number) => void;
|
|
589
|
-
}
|
|
590
600
|
interface StepperProps extends HTMLAttributes<HTMLElement> {
|
|
591
|
-
|
|
601
|
+
numberOfSteps: number;
|
|
592
602
|
current?: number;
|
|
593
603
|
size?: number;
|
|
594
|
-
spacing?: number;
|
|
595
604
|
className?: string;
|
|
596
605
|
}
|
|
597
|
-
declare const Stepper: ({
|
|
606
|
+
declare const Stepper: ({ numberOfSteps, current, size, className, }: StepperProps) => react_jsx_runtime.JSX.Element;
|
|
598
607
|
|
|
599
608
|
interface TabItem {
|
|
600
609
|
id: string | number;
|
|
@@ -670,6 +679,17 @@ interface PopoverProps {
|
|
|
670
679
|
}
|
|
671
680
|
declare const Popover: ({ items, children }: PopoverProps) => react_jsx_runtime.JSX.Element;
|
|
672
681
|
|
|
682
|
+
interface MetricCardProps {
|
|
683
|
+
icon: string;
|
|
684
|
+
title: string;
|
|
685
|
+
value: string | number;
|
|
686
|
+
valueColor?: string;
|
|
687
|
+
iconBackgroundColor?: string;
|
|
688
|
+
iconColor?: string;
|
|
689
|
+
contentLayout?: 'col' | 'row';
|
|
690
|
+
}
|
|
691
|
+
declare const MetricCard: ({ icon, title, value, valueColor, iconBackgroundColor, iconColor, contentLayout, }: MetricCardProps) => react_jsx_runtime.JSX.Element;
|
|
692
|
+
|
|
673
693
|
interface TooltipProps {
|
|
674
694
|
children?: ReactNode;
|
|
675
695
|
backgroundColor?: string;
|
|
@@ -693,6 +713,10 @@ declare const Pagination: ({ currentPage, totalItems, itemsPerPage, onPageChange
|
|
|
693
713
|
interface FileUploadZoneProps {
|
|
694
714
|
/** Called with the validated File when the user drops/selects a file */
|
|
695
715
|
onSave?: (file: File) => void;
|
|
716
|
+
/** Accept multiple files at once. When true, onSave receives File[] instead of File. */
|
|
717
|
+
multiple?: boolean;
|
|
718
|
+
/** Called with validated File[] when multiple=true */
|
|
719
|
+
onSaveMultiple?: (files: File[]) => void;
|
|
696
720
|
/** Called when the user clicks the remove button (preview mode) */
|
|
697
721
|
onRemove?: () => void;
|
|
698
722
|
/** Called with an error message when validation fails — use for toastr etc. */
|
|
@@ -712,9 +736,11 @@ interface FileUploadZoneProps {
|
|
|
712
736
|
/** Disables the drop zone */
|
|
713
737
|
disabled?: boolean;
|
|
714
738
|
/** When true, shows built-in preview after file selection. Defaults to true.
|
|
715
|
-
* Set to false when the parent handles preview (e.g. cropping flow).
|
|
739
|
+
* Set to false when the parent handles preview (e.g. cropping flow).
|
|
740
|
+
* Ignored when multiple=true (preview is always skipped in multi mode). */
|
|
716
741
|
showPreview?: boolean;
|
|
717
|
-
/** Controlled preview URL — when provided, the component shows preview mode
|
|
742
|
+
/** Controlled preview URL — when provided, the component shows preview mode.
|
|
743
|
+
* Ignored when multiple=true. */
|
|
718
744
|
previewUrl?: string;
|
|
719
745
|
/** Makes the component stretch to 100% width */
|
|
720
746
|
fullWidth?: boolean;
|
|
@@ -725,7 +751,7 @@ interface FileUploadZoneProps {
|
|
|
725
751
|
/** Shows the selected file name below the drop zone after upload */
|
|
726
752
|
showFileName?: boolean;
|
|
727
753
|
}
|
|
728
|
-
declare const FileUploadZone: ({ onSave, onRemove, onError, accept, acceptOnlyPdf, maxSizeMB, label, sublabel, browseLabel, disabled, showPreview, previewUrl: controlledPreviewUrl, fullWidth, compact, icon, showFileName, }: FileUploadZoneProps) => react_jsx_runtime.JSX.Element;
|
|
754
|
+
declare const FileUploadZone: ({ onSave, multiple, onSaveMultiple, onRemove, onError, accept, acceptOnlyPdf, maxSizeMB, label, sublabel, browseLabel, disabled, showPreview, previewUrl: controlledPreviewUrl, fullWidth, compact, icon, showFileName, }: FileUploadZoneProps) => react_jsx_runtime.JSX.Element;
|
|
729
755
|
|
|
730
756
|
interface SpinnerProps {
|
|
731
757
|
size?: 's' | 'm' | 'l';
|
|
@@ -825,4 +851,4 @@ declare const colors: {
|
|
|
825
851
|
readonly light_blue: "#F1F5F9";
|
|
826
852
|
};
|
|
827
853
|
|
|
828
|
-
export { Accordion, type AccordionItem, Box, Bubble, Bulk, Button, CardSkeleton, Checkbox, Col, ColorPicker, DatePicker, Divider, Drawer, FileUploadZone, Grid, Icon, IconTabs, Image, Input, Link, List, ListItem, Modal, ModalConfirmation, MultiSelect, NewModal, Options, PageContainer, Pagination, Popover, Radio, Row, Select, type SelectOption, type SelectProps, SkeletonRow, Spinner, Stepper, Switch, Table, TableBody, TableCell, TableFooter, TableFooterCell, TableFooterRow, TableHeader, TableHeaderCell, TableHeaderRow, TableRow, Tabs, TagBubble, Text, Tooltip, colors, formatDate, formatDistance, formatDuration, truncateFileName, truncateText };
|
|
854
|
+
export { Accordion, type AccordionItem, Box, Bubble, Bulk, Button, CardSkeleton, Checkbox, Col, ColorPicker, DatePicker, Divider, Drawer, FileUploadZone, Grid, Icon, IconTabs, Image, Input, Link, List, ListItem, MetricCard, Modal, ModalConfirmation, MultiSelect, NewModal, Options, PageContainer, Pagination, Popover, Radio, Row, Select, type SelectOption, type SelectProps, SkeletonRow, SliderInput, Spinner, Stepper, Switch, Table, TableBody, TableCell, TableFooter, TableFooterCell, TableFooterRow, TableHeader, TableHeaderCell, TableHeaderRow, TableRow, Tabs, TagBubble, Text, Tooltip, colors, formatDate, formatDistance, formatDuration, truncateFileName, truncateText };
|
package/dist/index.d.ts
CHANGED
|
@@ -292,10 +292,11 @@ interface ButtonProps extends HTMLAttributes<HTMLButtonElement> {
|
|
|
292
292
|
fontWeight?: string;
|
|
293
293
|
onClick?: () => void;
|
|
294
294
|
disabled?: boolean;
|
|
295
|
+
noHover?: boolean;
|
|
295
296
|
style?: CSSProperties;
|
|
296
297
|
className?: string;
|
|
297
298
|
}
|
|
298
|
-
declare const Button: ({ label, children, iconLeft, iconRight, iconColor, variant, outline, size, width, isLoading, fontWeight, onClick, disabled, ...rest }: ButtonProps) => react_jsx_runtime.JSX.Element;
|
|
299
|
+
declare const Button: ({ label, children, iconLeft, iconRight, iconColor, variant, outline, size, width, isLoading, fontWeight, onClick, disabled, noHover, ...rest }: ButtonProps) => react_jsx_runtime.JSX.Element;
|
|
299
300
|
|
|
300
301
|
interface SelectOption<T> {
|
|
301
302
|
value: T;
|
|
@@ -419,6 +420,20 @@ interface ColorPickerProps {
|
|
|
419
420
|
}
|
|
420
421
|
declare const ColorPicker: react.ForwardRefExoticComponent<ColorPickerProps & react.RefAttributes<HTMLInputElement>>;
|
|
421
422
|
|
|
423
|
+
interface SliderInputProps {
|
|
424
|
+
value?: number;
|
|
425
|
+
onChange?: (value: number, e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
426
|
+
min?: number;
|
|
427
|
+
max?: number;
|
|
428
|
+
step?: number;
|
|
429
|
+
disabled?: boolean;
|
|
430
|
+
label?: string;
|
|
431
|
+
showValue?: boolean;
|
|
432
|
+
formatValue?: (value: number) => string;
|
|
433
|
+
id?: string;
|
|
434
|
+
}
|
|
435
|
+
declare const SliderInput: react.ForwardRefExoticComponent<SliderInputProps & react.RefAttributes<HTMLInputElement>>;
|
|
436
|
+
|
|
422
437
|
interface ListProps extends HTMLAttributes<HTMLDivElement> {
|
|
423
438
|
children?: ReactNode;
|
|
424
439
|
width?: string;
|
|
@@ -582,19 +597,13 @@ interface OptionsProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>
|
|
|
582
597
|
}
|
|
583
598
|
declare const Options: ({ icon, options, value, defaultId, onChange, disabled, }: OptionsProps) => react_jsx_runtime.JSX.Element;
|
|
584
599
|
|
|
585
|
-
interface StepperStep {
|
|
586
|
-
label: string;
|
|
587
|
-
icon?: string;
|
|
588
|
-
onClick?: (index: number) => void;
|
|
589
|
-
}
|
|
590
600
|
interface StepperProps extends HTMLAttributes<HTMLElement> {
|
|
591
|
-
|
|
601
|
+
numberOfSteps: number;
|
|
592
602
|
current?: number;
|
|
593
603
|
size?: number;
|
|
594
|
-
spacing?: number;
|
|
595
604
|
className?: string;
|
|
596
605
|
}
|
|
597
|
-
declare const Stepper: ({
|
|
606
|
+
declare const Stepper: ({ numberOfSteps, current, size, className, }: StepperProps) => react_jsx_runtime.JSX.Element;
|
|
598
607
|
|
|
599
608
|
interface TabItem {
|
|
600
609
|
id: string | number;
|
|
@@ -670,6 +679,17 @@ interface PopoverProps {
|
|
|
670
679
|
}
|
|
671
680
|
declare const Popover: ({ items, children }: PopoverProps) => react_jsx_runtime.JSX.Element;
|
|
672
681
|
|
|
682
|
+
interface MetricCardProps {
|
|
683
|
+
icon: string;
|
|
684
|
+
title: string;
|
|
685
|
+
value: string | number;
|
|
686
|
+
valueColor?: string;
|
|
687
|
+
iconBackgroundColor?: string;
|
|
688
|
+
iconColor?: string;
|
|
689
|
+
contentLayout?: 'col' | 'row';
|
|
690
|
+
}
|
|
691
|
+
declare const MetricCard: ({ icon, title, value, valueColor, iconBackgroundColor, iconColor, contentLayout, }: MetricCardProps) => react_jsx_runtime.JSX.Element;
|
|
692
|
+
|
|
673
693
|
interface TooltipProps {
|
|
674
694
|
children?: ReactNode;
|
|
675
695
|
backgroundColor?: string;
|
|
@@ -693,6 +713,10 @@ declare const Pagination: ({ currentPage, totalItems, itemsPerPage, onPageChange
|
|
|
693
713
|
interface FileUploadZoneProps {
|
|
694
714
|
/** Called with the validated File when the user drops/selects a file */
|
|
695
715
|
onSave?: (file: File) => void;
|
|
716
|
+
/** Accept multiple files at once. When true, onSave receives File[] instead of File. */
|
|
717
|
+
multiple?: boolean;
|
|
718
|
+
/** Called with validated File[] when multiple=true */
|
|
719
|
+
onSaveMultiple?: (files: File[]) => void;
|
|
696
720
|
/** Called when the user clicks the remove button (preview mode) */
|
|
697
721
|
onRemove?: () => void;
|
|
698
722
|
/** Called with an error message when validation fails — use for toastr etc. */
|
|
@@ -712,9 +736,11 @@ interface FileUploadZoneProps {
|
|
|
712
736
|
/** Disables the drop zone */
|
|
713
737
|
disabled?: boolean;
|
|
714
738
|
/** When true, shows built-in preview after file selection. Defaults to true.
|
|
715
|
-
* Set to false when the parent handles preview (e.g. cropping flow).
|
|
739
|
+
* Set to false when the parent handles preview (e.g. cropping flow).
|
|
740
|
+
* Ignored when multiple=true (preview is always skipped in multi mode). */
|
|
716
741
|
showPreview?: boolean;
|
|
717
|
-
/** Controlled preview URL — when provided, the component shows preview mode
|
|
742
|
+
/** Controlled preview URL — when provided, the component shows preview mode.
|
|
743
|
+
* Ignored when multiple=true. */
|
|
718
744
|
previewUrl?: string;
|
|
719
745
|
/** Makes the component stretch to 100% width */
|
|
720
746
|
fullWidth?: boolean;
|
|
@@ -725,7 +751,7 @@ interface FileUploadZoneProps {
|
|
|
725
751
|
/** Shows the selected file name below the drop zone after upload */
|
|
726
752
|
showFileName?: boolean;
|
|
727
753
|
}
|
|
728
|
-
declare const FileUploadZone: ({ onSave, onRemove, onError, accept, acceptOnlyPdf, maxSizeMB, label, sublabel, browseLabel, disabled, showPreview, previewUrl: controlledPreviewUrl, fullWidth, compact, icon, showFileName, }: FileUploadZoneProps) => react_jsx_runtime.JSX.Element;
|
|
754
|
+
declare const FileUploadZone: ({ onSave, multiple, onSaveMultiple, onRemove, onError, accept, acceptOnlyPdf, maxSizeMB, label, sublabel, browseLabel, disabled, showPreview, previewUrl: controlledPreviewUrl, fullWidth, compact, icon, showFileName, }: FileUploadZoneProps) => react_jsx_runtime.JSX.Element;
|
|
729
755
|
|
|
730
756
|
interface SpinnerProps {
|
|
731
757
|
size?: 's' | 'm' | 'l';
|
|
@@ -825,4 +851,4 @@ declare const colors: {
|
|
|
825
851
|
readonly light_blue: "#F1F5F9";
|
|
826
852
|
};
|
|
827
853
|
|
|
828
|
-
export { Accordion, type AccordionItem, Box, Bubble, Bulk, Button, CardSkeleton, Checkbox, Col, ColorPicker, DatePicker, Divider, Drawer, FileUploadZone, Grid, Icon, IconTabs, Image, Input, Link, List, ListItem, Modal, ModalConfirmation, MultiSelect, NewModal, Options, PageContainer, Pagination, Popover, Radio, Row, Select, type SelectOption, type SelectProps, SkeletonRow, Spinner, Stepper, Switch, Table, TableBody, TableCell, TableFooter, TableFooterCell, TableFooterRow, TableHeader, TableHeaderCell, TableHeaderRow, TableRow, Tabs, TagBubble, Text, Tooltip, colors, formatDate, formatDistance, formatDuration, truncateFileName, truncateText };
|
|
854
|
+
export { Accordion, type AccordionItem, Box, Bubble, Bulk, Button, CardSkeleton, Checkbox, Col, ColorPicker, DatePicker, Divider, Drawer, FileUploadZone, Grid, Icon, IconTabs, Image, Input, Link, List, ListItem, MetricCard, Modal, ModalConfirmation, MultiSelect, NewModal, Options, PageContainer, Pagination, Popover, Radio, Row, Select, type SelectOption, type SelectProps, SkeletonRow, SliderInput, Spinner, Stepper, Switch, Table, TableBody, TableCell, TableFooter, TableFooterCell, TableFooterRow, TableHeader, TableHeaderCell, TableHeaderRow, TableRow, Tabs, TagBubble, Text, Tooltip, colors, formatDate, formatDistance, formatDuration, truncateFileName, truncateText };
|