zaravand-ui 1.0.2 → 1.0.3

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.
Files changed (64) hide show
  1. package/dist/components/Button/Button.d.ts +4 -0
  2. package/dist/components/Button/Button.interface.d.ts +13 -0
  3. package/dist/components/Button/Button.variant.d.ts +12 -0
  4. package/dist/components/Checkbox/Checkbox.d.ts +4 -0
  5. package/dist/components/Checkbox/Checkbox.interface.d.ts +19 -0
  6. package/dist/components/Checkbox/Checkbox.variant.d.ts +8 -0
  7. package/dist/components/DatePicker/DatePicker.d.ts +8 -0
  8. package/dist/components/DatePicker/DatePicker.interface.d.ts +44 -0
  9. package/dist/components/DatePicker/DatePicker.variant.d.ts +19 -0
  10. package/dist/components/Dialog/Dialog.d.ts +3 -0
  11. package/dist/components/Dialog/Dialog.interface.d.ts +21 -0
  12. package/dist/components/Dialog/Dialog.variant.d.ts +7 -0
  13. package/dist/components/Input/Input.d.ts +3 -0
  14. package/dist/components/Input/Input.interface.d.ts +24 -0
  15. package/dist/components/Input/Input.variant.d.ts +4 -0
  16. package/dist/components/Pagination/Pagination.d.ts +3 -0
  17. package/dist/components/Pagination/Pagination.interface.d.ts +12 -0
  18. package/dist/components/Pagination/Pagination.variant.d.ts +11 -0
  19. package/dist/components/RadioGroup/RadioGroup.d.ts +6 -0
  20. package/dist/components/RadioGroup/RadioGroup.interface.d.ts +34 -0
  21. package/dist/components/RadioGroup/RadioGroup.variant.d.ts +21 -0
  22. package/dist/components/Select/Select.d.ts +20 -0
  23. package/dist/components/Select/Select.filter.d.ts +8 -0
  24. package/dist/components/Select/Select.interface.d.ts +44 -0
  25. package/dist/components/Select/Select.variant.d.ts +13 -0
  26. package/dist/components/Sheet/Sheet.d.ts +3 -0
  27. package/dist/components/Sheet/Sheet.interface.d.ts +23 -0
  28. package/dist/components/Sheet/Sheet.variant.d.ts +10 -0
  29. package/dist/components/Skeleton/Skeleton.d.ts +3 -0
  30. package/dist/components/Skeleton/Skeleton.interface.d.ts +5 -0
  31. package/dist/components/Skeleton/Skeleton.variant.d.ts +2 -0
  32. package/dist/components/Spinner/Spinner.d.ts +3 -0
  33. package/dist/components/Spinner/Spinner.interface.d.ts +6 -0
  34. package/dist/components/Spinner/Spinner.variant.d.ts +10 -0
  35. package/dist/components/Table/Table.constants.d.ts +36 -0
  36. package/dist/components/Table/Table.d.ts +32 -0
  37. package/dist/components/Table/Table.interface.d.ts +142 -0
  38. package/dist/components/Table/Table.utils.d.ts +11 -0
  39. package/dist/components/Table/Table.variant.d.ts +11 -0
  40. package/dist/components/Table/TableEmptyState.d.ts +2 -0
  41. package/dist/components/Table/TablePaginationControls.d.ts +2 -0
  42. package/dist/components/Table/hooks/useTablePagination.d.ts +37 -0
  43. package/dist/components/Table/hooks/useTableSearch.d.ts +18 -0
  44. package/dist/components/Textarea/Textarea.d.ts +3 -0
  45. package/dist/components/Textarea/Textarea.interface.d.ts +23 -0
  46. package/dist/components/Textarea/Textarea.variant.d.ts +4 -0
  47. package/dist/components/Toast/Toast.d.ts +13 -0
  48. package/dist/components/Toast/Toast.interface.d.ts +6 -0
  49. package/dist/components/Toast/Toast.variant.d.ts +9 -0
  50. package/dist/components/Toast/ToastHost.d.ts +2 -0
  51. package/dist/components/Toast/function/showToast.d.ts +17 -0
  52. package/dist/components/Toast/function/toastVisual.d.ts +10 -0
  53. package/dist/components/Tooltip/Tooltip.d.ts +3 -0
  54. package/dist/components/Tooltip/Tooltip.interface.d.ts +13 -0
  55. package/dist/components/Tooltip/Tooltip.variant.d.ts +2 -0
  56. package/dist/components/shared/fieldStyles.d.ts +3 -0
  57. package/dist/index.cjs +3 -3
  58. package/dist/index.css +1 -1
  59. package/dist/index.d.ts +39 -0
  60. package/dist/index.js +30 -30
  61. package/dist/lib/utils.d.ts +5 -0
  62. package/dist/services/convertToPersianDigits/convertToPersianDigits.d.ts +5 -0
  63. package/dist/shared/theme.d.ts +26 -0
  64. package/package.json +1 -1
@@ -0,0 +1,4 @@
1
+ import "./Button.css";
2
+ import type { ButtonProps } from "./Button.interface";
3
+ declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
4
+ export default Button;
@@ -0,0 +1,13 @@
1
+ import type * as React from "react";
2
+ export interface ButtonProps {
3
+ size?: "sm" | "default" | "lg";
4
+ variant?: "primary" | "secondary";
5
+ kind?: "confirm" | "cancel";
6
+ disabled?: boolean;
7
+ isLoading?: boolean;
8
+ label?: React.ReactNode;
9
+ icon?: React.ReactNode;
10
+ ariaLabel?: string;
11
+ type?: "button" | "submit" | "reset";
12
+ onClick?: React.MouseEventHandler<HTMLButtonElement>;
13
+ }
@@ -0,0 +1,12 @@
1
+ import type { ButtonProps } from "./Button.interface";
2
+ type ButtonVariant = NonNullable<ButtonProps["variant"]>;
3
+ type ButtonKind = NonNullable<ButtonProps["kind"]>;
4
+ type ButtonSize = NonNullable<ButtonProps["size"]>;
5
+ type ButtonVariantOptions = {
6
+ size?: ButtonSize;
7
+ variant?: ButtonVariant;
8
+ kind?: ButtonKind;
9
+ disabled?: boolean;
10
+ };
11
+ declare function buttonVariants(options?: ButtonVariantOptions): string;
12
+ export { buttonVariants };
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ import type { CheckboxProps } from "./Checkbox.interface";
3
+ declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLButtonElement>>;
4
+ export default Checkbox;
@@ -0,0 +1,19 @@
1
+ import type * as React from "react";
2
+ import type { VariantProps } from "class-variance-authority";
3
+ import type { CheckedState } from "@radix-ui/react-checkbox";
4
+ import { checkboxVariants } from "./Checkbox.variant";
5
+ export interface CheckboxProps extends VariantProps<typeof checkboxVariants> {
6
+ checked?: CheckedState;
7
+ defaultChecked?: CheckedState;
8
+ onCheckedChange?: (checked: CheckedState) => void;
9
+ required?: boolean;
10
+ name?: string;
11
+ value?: string | number | readonly string[];
12
+ form?: string;
13
+ id?: string;
14
+ className?: string;
15
+ "aria-label"?: string;
16
+ disabled?: boolean;
17
+ onClick?: React.MouseEventHandler<HTMLButtonElement>;
18
+ onInvalid?: React.FormEventHandler<HTMLButtonElement>;
19
+ }
@@ -0,0 +1,8 @@
1
+ declare const checkboxVariants: (props?: ({
2
+ size?: "sm" | "default" | "lg" | null | undefined;
3
+ disabled?: boolean | null | undefined;
4
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
5
+ declare const checkboxIndicatorVariants: (props?: ({
6
+ size?: "sm" | "default" | "lg" | null | undefined;
7
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
+ export { checkboxVariants, checkboxIndicatorVariants };
@@ -0,0 +1,8 @@
1
+ import { type DateRange } from "react-day-picker";
2
+ import { type DatePickerDateExportType, type DatePickerDateOutputType, type DatePickerOnChangeValue, type DatePickerProps } from "./DatePicker.interface";
3
+ type DatePickerValue = Date | DateRange | undefined;
4
+ export declare function formatDatePickerOnChangeValue<TOutput extends DatePickerDateOutputType>(nextValue: DatePickerValue, mode: "single" | "range", typeDateExport: DatePickerDateExportType, typeDateOutput: TOutput): DatePickerOnChangeValue<TOutput>;
5
+ export declare function formatPersianDate(date: Date): string;
6
+ export declare function formatPersianDateRangeLabel(dateRange: DateRange | undefined): string | null;
7
+ declare function DatePicker<TOutput extends DatePickerDateOutputType = "object">({ className, size, title, required, placeholder, mode, value, defaultValue, onChange, typeDateExport, typeDateOutput, fromDate, toDate, disabledDates, numberOfMonths, calendarSystem, defaultCalendarSystem, onCalendarSystemChange, open, onOpenChange, onInvalid, disabled, id, }: DatePickerProps<TOutput>): import("react/jsx-runtime").JSX.Element;
8
+ export default DatePicker;
@@ -0,0 +1,44 @@
1
+ import type * as React from "react";
2
+ import type { DateRange, Matcher } from "react-day-picker";
3
+ export type DatePickerCalendarSystem = "shamsi" | "miladi";
4
+ export type DatePickerDateExportType = "shamsi" | "miladi";
5
+ export type DatePickerDateOutputType = "string" | "object";
6
+ export type DatePickerDateObjectOutput = {
7
+ year: number;
8
+ month: number;
9
+ day: number;
10
+ };
11
+ type DatePickerOutputString = "string";
12
+ type DatePickerOutputObject = "object";
13
+ export type DatePickerPrimitiveChangeValue<TOutput extends DatePickerDateOutputType = DatePickerOutputObject> = TOutput extends DatePickerOutputString ? string : DatePickerDateObjectOutput;
14
+ export type DatePickerRangeChangeValue<TOutput extends DatePickerDateOutputType = DatePickerOutputObject> = {
15
+ from?: DatePickerPrimitiveChangeValue<TOutput>;
16
+ to?: DatePickerPrimitiveChangeValue<TOutput>;
17
+ };
18
+ export type DatePickerOnChangeValue<TOutput extends DatePickerDateOutputType = DatePickerOutputObject> = DatePickerPrimitiveChangeValue<TOutput> | DatePickerRangeChangeValue<TOutput> | undefined;
19
+ export interface DatePickerProps<TOutput extends DatePickerDateOutputType = DatePickerOutputObject> {
20
+ id?: string;
21
+ className?: string;
22
+ size?: "sm" | "default" | "lg";
23
+ title?: string;
24
+ required?: boolean;
25
+ placeholder?: string;
26
+ mode?: "single" | "range";
27
+ value?: Date | DateRange | undefined;
28
+ defaultValue?: Date | DateRange | undefined;
29
+ onChange?: (value: DatePickerOnChangeValue<TOutput>) => void;
30
+ typeDateExport?: DatePickerDateExportType;
31
+ typeDateOutput?: TOutput;
32
+ fromDate?: Date;
33
+ toDate?: Date;
34
+ disabledDates?: Matcher | Matcher[];
35
+ numberOfMonths?: number;
36
+ calendarSystem?: DatePickerCalendarSystem;
37
+ defaultCalendarSystem?: DatePickerCalendarSystem;
38
+ onCalendarSystemChange?: (calendarSystem: DatePickerCalendarSystem) => void;
39
+ open?: boolean;
40
+ onOpenChange?: (open: boolean) => void;
41
+ onInvalid?: React.FormEventHandler<HTMLInputElement>;
42
+ disabled?: boolean;
43
+ }
44
+ export {};
@@ -0,0 +1,19 @@
1
+ declare const datePickerTriggerVariants: (props?: ({
2
+ size?: "sm" | "default" | "lg" | null | undefined;
3
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
4
+ declare const datePickerPopoverContentVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
5
+ declare const datePickerNavigationButtonVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
6
+ declare const datePickerHeaderVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
7
+ declare const datePickerSwitchGroupVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
8
+ declare const datePickerSwitchButtonVariants: (props?: ({
9
+ active?: boolean | null | undefined;
10
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
11
+ declare const datePickerCalendarSwitchButtonVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
12
+ declare const datePickerPanelHintVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
13
+ declare const datePickerPanelGridVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
14
+ declare const datePickerPanelItemButtonVariants: (props?: ({
15
+ active?: boolean | null | undefined;
16
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
17
+ declare const datePickerWeekdayVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
18
+ declare const datePickerDayButtonVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
19
+ export { datePickerDayButtonVariants, datePickerCalendarSwitchButtonVariants, datePickerHeaderVariants, datePickerNavigationButtonVariants, datePickerPanelGridVariants, datePickerPanelHintVariants, datePickerPanelItemButtonVariants, datePickerPopoverContentVariants, datePickerSwitchButtonVariants, datePickerSwitchGroupVariants, datePickerTriggerVariants, datePickerWeekdayVariants, };
@@ -0,0 +1,3 @@
1
+ import type { DialogProps } from "./Dialog.interface";
2
+ declare function Dialog({ open, defaultOpen, onOpenChange, modal, dir, title, description, content, child, triggerLabel, triggerAriaLabel, closeLabel, closeAriaLabel, showCloseButton, closeIcon, triggerClassName, className, overlayClassName, }: DialogProps): import("react/jsx-runtime").JSX.Element;
3
+ export default Dialog;
@@ -0,0 +1,21 @@
1
+ import type * as React from "react";
2
+ export interface DialogProps {
3
+ open?: boolean;
4
+ defaultOpen?: boolean;
5
+ onOpenChange?: (open: boolean) => void;
6
+ modal?: boolean;
7
+ dir?: "rtl" | "ltr";
8
+ title?: React.ReactNode;
9
+ description?: React.ReactNode;
10
+ content?: React.ReactNode;
11
+ child?: React.ReactNode;
12
+ triggerLabel?: React.ReactNode;
13
+ triggerAriaLabel?: string;
14
+ closeLabel?: React.ReactNode;
15
+ closeAriaLabel?: string;
16
+ showCloseButton?: boolean;
17
+ closeIcon?: boolean;
18
+ triggerClassName?: string;
19
+ className?: string;
20
+ overlayClassName?: string;
21
+ }
@@ -0,0 +1,7 @@
1
+ declare const dialogOverlayVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
2
+ declare const dialogContentVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
3
+ declare const dialogHeaderVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
4
+ declare const dialogFooterVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
5
+ declare const dialogTitleVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
6
+ declare const dialogDescriptionVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
7
+ export { dialogContentVariants, dialogDescriptionVariants, dialogFooterVariants, dialogHeaderVariants, dialogOverlayVariants, dialogTitleVariants, };
@@ -0,0 +1,3 @@
1
+ import type { InputProps } from "./Input.interface";
2
+ declare function Input({ className, size, type, title, required, characterLimit, placeholder, onChange, onBlur, onFocus, onInvalid, id, name, disabled, readOnly, autoComplete, "aria-label": ariaLabel, value, defaultValue, maxLength, }: InputProps): import("react/jsx-runtime").JSX.Element;
3
+ export default Input;
@@ -0,0 +1,24 @@
1
+ import type * as React from "react";
2
+ import type { VariantProps } from "class-variance-authority";
3
+ import { inputVariants } from "./Input.variant";
4
+ export interface InputProps extends VariantProps<typeof inputVariants> {
5
+ type?: "number" | "password" | "text" | "search";
6
+ title?: string;
7
+ required?: boolean;
8
+ characterLimit?: number;
9
+ placeholder?: string;
10
+ id?: string;
11
+ name?: string;
12
+ disabled?: boolean;
13
+ readOnly?: boolean;
14
+ autoComplete?: string;
15
+ className?: string;
16
+ value?: string | number | readonly string[];
17
+ defaultValue?: string | number | readonly string[];
18
+ maxLength?: number;
19
+ "aria-label"?: string;
20
+ onChange?: React.ChangeEventHandler<HTMLInputElement>;
21
+ onBlur?: React.FocusEventHandler<HTMLInputElement>;
22
+ onFocus?: React.FocusEventHandler<HTMLInputElement>;
23
+ onInvalid?: React.FormEventHandler<HTMLInputElement>;
24
+ }
@@ -0,0 +1,4 @@
1
+ declare const inputVariants: (props?: ({
2
+ size?: "sm" | "default" | "lg" | null | undefined;
3
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
4
+ export { inputVariants };
@@ -0,0 +1,3 @@
1
+ import type { PaginationProps } from "./Pagination.interface";
2
+ declare function Pagination({ totalPages, page, defaultPage, siblingCount, showControls, previousLabel, nextLabel, dir, className, onPageChange, }: PaginationProps): import("react/jsx-runtime").JSX.Element;
3
+ export default Pagination;
@@ -0,0 +1,12 @@
1
+ export interface PaginationProps {
2
+ totalPages?: number;
3
+ page?: number;
4
+ defaultPage?: number;
5
+ siblingCount?: number;
6
+ showControls?: boolean;
7
+ previousLabel?: string;
8
+ nextLabel?: string;
9
+ dir?: "rtl" | "ltr";
10
+ className?: string;
11
+ onPageChange?: (page: number) => void;
12
+ }
@@ -0,0 +1,11 @@
1
+ declare const paginationVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
2
+ declare const paginationContentVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
3
+ declare const paginationItemVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
4
+ declare const paginationLinkVariants: (props?: ({
5
+ size?: "default" | "icon" | null | undefined;
6
+ active?: boolean | null | undefined;
7
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
+ declare const paginationPreviousVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
9
+ declare const paginationNextVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
10
+ declare const paginationEllipsisVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
11
+ export { paginationVariants, paginationContentVariants, paginationItemVariants, paginationLinkVariants, paginationPreviousVariants, paginationNextVariants, paginationEllipsisVariants, };
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ import type { RadioGroupItemProps, RadioGroupProps } from "./RadioGroup.interface";
3
+ declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
4
+ declare const RadioGroupItem: React.ForwardRefExoticComponent<RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>>;
5
+ export { RadioGroupItem };
6
+ export default RadioGroup;
@@ -0,0 +1,34 @@
1
+ import type * as React from "react";
2
+ import type { VariantProps } from "class-variance-authority";
3
+ import { radioGroupItemVariants, radioGroupOptionVariants } from "./RadioGroup.variant";
4
+ export interface RadioGroupProps {
5
+ value?: string;
6
+ defaultValue?: string;
7
+ onValueChange?: (value: string) => void;
8
+ name?: string;
9
+ required?: boolean;
10
+ id?: string;
11
+ title?: React.ReactNode;
12
+ children?: React.ReactNode;
13
+ "aria-label"?: string;
14
+ className?: string;
15
+ orientation?: "vertical" | "horizontal";
16
+ gap?: "sm" | "default" | "lg";
17
+ dir?: "rtl" | "ltr";
18
+ disabled?: boolean;
19
+ onInvalid?: React.FormEventHandler<HTMLDivElement>;
20
+ }
21
+ export interface RadioGroupItemProps extends VariantProps<typeof radioGroupItemVariants>, VariantProps<typeof radioGroupOptionVariants> {
22
+ value: string;
23
+ id?: string;
24
+ disabled?: boolean;
25
+ label?: React.ReactNode;
26
+ description?: React.ReactNode;
27
+ className?: string;
28
+ optionClassName?: string;
29
+ labelClassName?: string;
30
+ descriptionClassName?: string;
31
+ indicatorClassName?: string;
32
+ onFocus?: React.FocusEventHandler<HTMLButtonElement>;
33
+ onBlur?: React.FocusEventHandler<HTMLButtonElement>;
34
+ }
@@ -0,0 +1,21 @@
1
+ declare const radioGroupVariants: (props?: ({
2
+ orientation?: "vertical" | "horizontal" | null | undefined;
3
+ gap?: "sm" | "default" | "lg" | null | undefined;
4
+ disabled?: boolean | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
+ declare const radioGroupItemVariants: (props?: ({
7
+ size?: "sm" | "default" | "lg" | null | undefined;
8
+ disabled?: boolean | null | undefined;
9
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
10
+ declare const radioGroupIndicatorVariants: (props?: ({
11
+ size?: "sm" | "default" | "lg" | null | undefined;
12
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
13
+ declare const radioGroupOptionVariants: (props?: ({
14
+ direction?: "rtl" | "ltr" | null | undefined;
15
+ disabled?: boolean | null | undefined;
16
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
17
+ declare const radioGroupLabelVariants: (props?: ({
18
+ disabled?: boolean | null | undefined;
19
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
20
+ declare const radioGroupDescriptionVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
21
+ export { radioGroupVariants, radioGroupItemVariants, radioGroupIndicatorVariants, radioGroupOptionVariants, radioGroupLabelVariants, radioGroupDescriptionVariants, };
@@ -0,0 +1,20 @@
1
+ import * as React from "react";
2
+ import type { VariantProps } from "class-variance-authority";
3
+ import * as SelectPrimitive from "@radix-ui/react-select";
4
+ import type { SelectProps } from "./Select.interface";
5
+ import { selectTriggerVariants } from "./Select.variant";
6
+ type SelectTriggerProps = React.ComponentProps<typeof SelectPrimitive.Trigger> & VariantProps<typeof selectTriggerVariants>;
7
+ type SelectValueProps = React.ComponentProps<typeof SelectPrimitive.Value>;
8
+ type SelectContentProps = React.ComponentProps<typeof SelectPrimitive.Content> & {
9
+ position?: "item-aligned" | "popper";
10
+ };
11
+ declare function Select({ type: selectType, title, required, placeholder, options, remoteOptions, isSearch, size, disabled, disable, onValueChange, onChange, onInvalid, onOpenChange, open, defaultOpen, id, value, defaultValue, children, selectAllLabel, selectedCountLabel, ...props }: SelectProps): import("react/jsx-runtime").JSX.Element;
12
+ declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectTriggerProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
13
+ declare function SelectValue({ className, placeholder, children, ...props }: SelectValueProps): import("react/jsx-runtime").JSX.Element;
14
+ declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
15
+ declare function SelectGroup(props: React.ComponentProps<typeof SelectPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
16
+ declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
17
+ declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
18
+ declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
19
+ export { SelectTrigger, SelectValue, SelectContent, SelectGroup, SelectLabel, SelectItem, SelectSeparator, };
20
+ export default Select;
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ type SelectFilterElementTypes = {
3
+ group: unknown;
4
+ item: unknown;
5
+ separator: unknown;
6
+ };
7
+ export declare function filterSelectChildrenByQuery(children: React.ReactNode, query: string, elementTypes: SelectFilterElementTypes): React.ReactNode[];
8
+ export {};
@@ -0,0 +1,44 @@
1
+ import type * as React from "react";
2
+ import type { VariantProps } from "class-variance-authority";
3
+ import type * as SelectPrimitive from "@radix-ui/react-select";
4
+ import { selectTriggerVariants } from "./Select.variant";
5
+ export interface SelectProps extends Omit<React.ComponentProps<typeof SelectPrimitive.Root>, "required" | "onValueChange" | "value" | "defaultValue"> {
6
+ type?: "single" | "multi";
7
+ value?: string | string[];
8
+ defaultValue?: string | string[];
9
+ onValueChange?: ((value: string) => void) | ((value: string[]) => void);
10
+ onChange?: ((value: string) => void) | ((value: string[]) => void);
11
+ onInvalid?: React.FormEventHandler<HTMLInputElement>;
12
+ title?: string;
13
+ required?: boolean;
14
+ placeholder?: string;
15
+ options?: Array<{
16
+ value: string;
17
+ label: string;
18
+ disabled?: boolean;
19
+ }>;
20
+ remoteOptions?: {
21
+ loadOptions: (input: {
22
+ page: number;
23
+ pageSize: number;
24
+ search: string;
25
+ }) => Promise<{
26
+ options: Array<{
27
+ value: string;
28
+ label: string;
29
+ disabled?: boolean;
30
+ }>;
31
+ totalItems?: number;
32
+ hasMore?: boolean;
33
+ nextPage?: number | null;
34
+ }>;
35
+ pageSize?: number;
36
+ enabled?: boolean;
37
+ };
38
+ isSearch?: boolean;
39
+ size?: VariantProps<typeof selectTriggerVariants>["size"];
40
+ disable?: boolean;
41
+ id?: string;
42
+ selectAllLabel?: string;
43
+ selectedCountLabel?: (count: number) => string;
44
+ }
@@ -0,0 +1,13 @@
1
+ declare const selectTriggerVariants: (props?: ({
2
+ size?: "sm" | "default" | "lg" | null | undefined;
3
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
4
+ declare const selectContentVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
5
+ declare const selectViewportVariants: (props?: ({
6
+ hasSearch?: boolean | null | undefined;
7
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
+ declare const selectItemVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
9
+ declare const selectLabelVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
10
+ declare const selectSeparatorVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
11
+ declare const selectScrollButtonVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
12
+ declare const selectSearchInputVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
13
+ export { selectTriggerVariants, selectContentVariants, selectViewportVariants, selectItemVariants, selectLabelVariants, selectSeparatorVariants, selectScrollButtonVariants, selectSearchInputVariants, };
@@ -0,0 +1,3 @@
1
+ import type { SheetProps } from "./Sheet.interface";
2
+ declare function Sheet({ open, defaultOpen, onOpenChange, modal, dir, side, whatOpen, title, description, content, child, triggerLabel, triggerAriaLabel, closeLabel, closeAriaLabel, showCloseButton, showCloseIcon, triggerClassName, className, overlayClassName, }: SheetProps): import("react/jsx-runtime").JSX.Element;
3
+ export default Sheet;
@@ -0,0 +1,23 @@
1
+ import type * as React from "react";
2
+ export interface SheetProps {
3
+ open?: boolean;
4
+ defaultOpen?: boolean;
5
+ onOpenChange?: (open: boolean) => void;
6
+ modal?: boolean;
7
+ dir?: "rtl" | "ltr";
8
+ side?: "left" | "right" | "top" | "bottom";
9
+ whatOpen?: "left" | "right" | "top" | "bottom";
10
+ title?: React.ReactNode;
11
+ description?: React.ReactNode;
12
+ content?: React.ReactNode;
13
+ child?: React.ReactNode;
14
+ triggerLabel?: React.ReactNode;
15
+ triggerAriaLabel?: string;
16
+ closeLabel?: React.ReactNode;
17
+ closeAriaLabel?: string;
18
+ showCloseButton?: boolean;
19
+ showCloseIcon?: boolean;
20
+ triggerClassName?: string;
21
+ className?: string;
22
+ overlayClassName?: string;
23
+ }
@@ -0,0 +1,10 @@
1
+ declare const sheetOverlayVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
2
+ declare const sheetContentVariants: (props?: ({
3
+ side?: "top" | "right" | "bottom" | "left" | null | undefined;
4
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
5
+ declare const sheetCloseVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
6
+ declare const sheetHeaderVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
7
+ declare const sheetFooterVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
8
+ declare const sheetTitleVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
9
+ declare const sheetDescriptionVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
10
+ export { sheetCloseVariants, sheetContentVariants, sheetDescriptionVariants, sheetFooterVariants, sheetHeaderVariants, sheetOverlayVariants, sheetTitleVariants, };
@@ -0,0 +1,3 @@
1
+ import type { SkeletonProps } from "./Skeleton.interface";
2
+ declare function Skeleton({ className, ...props }: SkeletonProps): import("react/jsx-runtime").JSX.Element;
3
+ export default Skeleton;
@@ -0,0 +1,5 @@
1
+ import type * as React from "react";
2
+ import type { VariantProps } from "class-variance-authority";
3
+ import { skeletonVariants } from "./Skeleton.variant";
4
+ export interface SkeletonProps extends React.ComponentProps<"div">, VariantProps<typeof skeletonVariants> {
5
+ }
@@ -0,0 +1,2 @@
1
+ declare const skeletonVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
2
+ export { skeletonVariants };
@@ -0,0 +1,3 @@
1
+ import type { SpinnerProps } from "./Spinner.interface";
2
+ declare function Spinner({ className, size, variant, }: SpinnerProps): import("react/jsx-runtime").JSX.Element;
3
+ export default Spinner;
@@ -0,0 +1,6 @@
1
+ export interface SpinnerProps {
2
+ size?: "xs" | "sm" | "default" | "lg" | "xl" | number;
3
+ variant?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | "white" | "black";
4
+ className?: string;
5
+ children?: never;
6
+ }
@@ -0,0 +1,10 @@
1
+ import type { SpinnerProps } from "./Spinner.interface";
2
+ type SpinnerVariant = NonNullable<SpinnerProps["variant"]>;
3
+ type SpinnerNamedSize = Exclude<NonNullable<SpinnerProps["size"]>, number>;
4
+ type SpinnerVariantOptions = {
5
+ variant?: SpinnerVariant;
6
+ size?: SpinnerNamedSize;
7
+ className?: string;
8
+ };
9
+ declare function spinnerVariants(options?: SpinnerVariantOptions): string;
10
+ export { spinnerVariants };
@@ -0,0 +1,36 @@
1
+ export declare const defaultPlaceholder = "---";
2
+ export declare const emptyDataMessage = "\u062F\u0627\u062F\u0647\u200C\u0627\u06CC \u0628\u0631\u0627\u06CC \u0646\u0645\u0627\u06CC\u0634 \u0648\u062C\u0648\u062F \u0646\u062F\u0627\u0631\u062F.";
3
+ export declare const emptyColumnsMessage = "\u0633\u062A\u0648\u0646 \u0642\u0627\u0628\u0644\u200C\u0646\u0645\u0627\u06CC\u0634\u06CC \u062A\u0639\u0631\u06CC\u0641 \u0646\u0634\u062F\u0647 \u0627\u0633\u062A.";
4
+ export declare const noSearchResultMessage = "\u062F\u0627\u062F\u0647\u200C\u0627\u06CC \u0645\u0637\u0627\u0628\u0642 \u062C\u0633\u062A\u062C\u0648 \u067E\u06CC\u062F\u0627 \u0646\u0634\u062F.";
5
+ export declare const actionsColumnLabel = "\u0639\u0645\u0644\u06CC\u0627\u062A";
6
+ export declare const rowNumberColumnLabel = "\u0631\u062F\u06CC\u0641";
7
+ export declare const addButtonLabel = "\u0627\u0641\u0632\u0648\u062F\u0646";
8
+ export declare const editButtonLabel = "\u0648\u06CC\u0631\u0627\u06CC\u0634";
9
+ export declare const deleteButtonLabel = "\u062D\u0630\u0641";
10
+ export declare const actionIconClassName = "zui:size-4";
11
+ export declare const pagingToggleIconClassName = "zui:size-6";
12
+ export declare const rowActionButtonClassName = "zui:border-0 zui:bg-transparent zui:shadow-none zui:hover:bg-transparent zui:hover:shadow-none zui:active:bg-transparent zui:focus-visible:ring-0";
13
+ export declare const actionsColumnClassName = "zui:w-32 zui:px-3 zui:text-center";
14
+ export declare const rowNumberColumnClassName = "zui:w-16 zui:px-3 zui:text-center";
15
+ export declare const searchInputPlaceholder = "\u062C\u0633\u062A\u062C\u0648 \u06A9\u0646\u06CC\u062F";
16
+ export declare const searchInputAriaLabel = "\u062C\u0633\u062A\u062C\u0648\u06CC \u062C\u062F\u0648\u0644";
17
+ export declare const switchToInfiniteModeLabel = "\u062A\u063A\u06CC\u06CC\u0631 \u0628\u0647 \u067E\u06CC\u0645\u0627\u06CC\u0634 \u0628\u06CC\u200C\u0646\u0647\u0627\u06CC\u062A";
18
+ export declare const switchToPaginationModeLabel = "\u062A\u063A\u06CC\u06CC\u0631 \u0628\u0647 \u0635\u0641\u062D\u0647\u200C\u0628\u0646\u062F\u06CC";
19
+ export declare const previousPageLabel = "\u0635\u0641\u062D\u0647 \u0642\u0628\u0644";
20
+ export declare const nextPageLabel = "\u0635\u0641\u062D\u0647 \u0628\u0639\u062F";
21
+ export declare const firstPageNumber = 1;
22
+ export declare const fallbackPageSize = 10;
23
+ export declare const tableHeaderRowHeightPx = 54;
24
+ export declare const tableBodyRowHeightPx = 52;
25
+ export declare const infiniteModeViewportVisibleRows = 12;
26
+ export declare const maxRowsBeforeInternalScroll = 20;
27
+ export declare const infiniteAppendSkeletonRowsFallback = 3;
28
+ export declare const stickyHeaderCellClassName = "zui:sticky zui:top-0 zui:z-20 zui:bg-[var(--zui-color-primary)]";
29
+ export declare const infiniteScrollViewportPrefetchDistancePx: number;
30
+ export declare const infiniteObserverRootMargin = "208px 0px";
31
+ export declare const infiniteLoadingStatusLabel = "\u062F\u0631 \u062D\u0627\u0644 \u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC \u0631\u062F\u06CC\u0641\u200C\u0647\u0627\u06CC \u0628\u06CC\u0634\u062A\u0631...";
32
+ export declare const infiniteReadyStatusLabel = "\u0628\u0631\u0627\u06CC \u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC \u0628\u06CC\u0634\u062A\u0631 \u0628\u0647 \u067E\u0627\u06CC\u06CC\u0646 \u0627\u0633\u06A9\u0631\u0648\u0644 \u06A9\u0646\u06CC\u062F.";
33
+ export declare const infiniteCompletedStatusLabel = "\u0647\u0645\u0647 \u0631\u062F\u06CC\u0641\u200C\u0647\u0627 \u0646\u0645\u0627\u06CC\u0634 \u062F\u0627\u062F\u0647 \u0634\u062F.";
34
+ export declare const defaultLoadingRowsCount = 6;
35
+ export declare const maxLoadingRowsCount = 12;
36
+ export declare const tablePersianDateFormatter: Intl.DateTimeFormat;
@@ -0,0 +1,32 @@
1
+ import * as React from 'react';
2
+ import type { TableProps } from './Table.interface';
3
+ declare const Table: React.ForwardRefExoticComponent<TableProps & React.RefAttributes<HTMLTableElement>>;
4
+ declare const TableHeader: React.ForwardRefExoticComponent<{
5
+ className?: string;
6
+ children?: React.ReactNode;
7
+ } & React.RefAttributes<HTMLTableSectionElement>>;
8
+ declare const TableBody: React.ForwardRefExoticComponent<{
9
+ className?: string;
10
+ children?: React.ReactNode;
11
+ } & React.RefAttributes<HTMLTableSectionElement>>;
12
+ declare const TableFooter: React.ForwardRefExoticComponent<{
13
+ className?: string;
14
+ children?: React.ReactNode;
15
+ } & React.RefAttributes<HTMLTableSectionElement>>;
16
+ declare const TableRow: React.ForwardRefExoticComponent<{
17
+ className?: string;
18
+ children?: React.ReactNode;
19
+ } & {
20
+ state?: import("./Table.interface").TableRowState;
21
+ slot?: "table-row" | "table-loading-row";
22
+ } & React.RefAttributes<HTMLTableRowElement>>;
23
+ declare const TableHead: React.ForwardRefExoticComponent<{
24
+ className?: string;
25
+ children?: React.ReactNode;
26
+ } & React.RefAttributes<HTMLTableCellElement>>;
27
+ declare const TableCell: React.ForwardRefExoticComponent<{
28
+ className?: string;
29
+ children?: React.ReactNode;
30
+ } & React.RefAttributes<HTMLTableCellElement>>;
31
+ export { TableBody, TableCell, TableFooter, TableHead, TableHeader, TableRow, };
32
+ export default Table;