@herca/r-kit 0.0.51 → 0.0.52
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/clients.cjs +243 -8
- package/dist/clients.cjs.map +1 -1
- package/dist/clients.d.cts +64 -14
- package/dist/clients.d.ts +64 -14
- package/dist/clients.js +238 -8
- package/dist/clients.js.map +1 -1
- package/package.json +1 -1
package/dist/clients.d.cts
CHANGED
|
@@ -12,8 +12,8 @@ import { d as TextVariant, a as ButtonProps } from './button-DEGM0SCk.cjs';
|
|
|
12
12
|
import { DragHandleProps } from '@tiptap/extension-drag-handle-react';
|
|
13
13
|
import { Editor } from '@tiptap/core';
|
|
14
14
|
|
|
15
|
-
type SizeType$
|
|
16
|
-
type ColorType$
|
|
15
|
+
type SizeType$2 = 'sm' | 'md' | 'lg';
|
|
16
|
+
type ColorType$2 = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'orange' | 'purple' | 'gray';
|
|
17
17
|
type IconType = 'check' | 'minus';
|
|
18
18
|
interface CheckboxProps {
|
|
19
19
|
id?: string;
|
|
@@ -22,8 +22,8 @@ interface CheckboxProps {
|
|
|
22
22
|
defaultChecked?: boolean;
|
|
23
23
|
disabled?: boolean;
|
|
24
24
|
required?: boolean;
|
|
25
|
-
size?: SizeType$
|
|
26
|
-
color?: ColorType$
|
|
25
|
+
size?: SizeType$2;
|
|
26
|
+
color?: ColorType$2;
|
|
27
27
|
icon?: IconType;
|
|
28
28
|
onCheckedChange?: (checked: boolean) => void;
|
|
29
29
|
className?: string;
|
|
@@ -35,8 +35,8 @@ interface CheckboxGroupProps {
|
|
|
35
35
|
disabled?: boolean;
|
|
36
36
|
required?: boolean;
|
|
37
37
|
name?: string;
|
|
38
|
-
size?: SizeType$
|
|
39
|
-
color?: ColorType$
|
|
38
|
+
size?: SizeType$2;
|
|
39
|
+
color?: ColorType$2;
|
|
40
40
|
icon?: IconType;
|
|
41
41
|
className?: string;
|
|
42
42
|
children?: React.ReactNode;
|
|
@@ -46,8 +46,8 @@ interface CheckboxGroupContextValue {
|
|
|
46
46
|
onValueChange?: (value: string[]) => void;
|
|
47
47
|
disabled?: boolean;
|
|
48
48
|
name?: string;
|
|
49
|
-
size?: SizeType$
|
|
50
|
-
color?: ColorType$
|
|
49
|
+
size?: SizeType$2;
|
|
50
|
+
color?: ColorType$2;
|
|
51
51
|
icon?: 'check' | 'minus';
|
|
52
52
|
}
|
|
53
53
|
|
|
@@ -767,8 +767,8 @@ interface TextareaProps extends react.ComponentProps<'textarea'> {
|
|
|
767
767
|
}
|
|
768
768
|
declare function Textarea({ label, hint, description, errorMessages, className, required, ...props }: TextareaProps): react_jsx_runtime.JSX.Element;
|
|
769
769
|
|
|
770
|
-
type SizeType = 'sm' | 'md' | 'lg';
|
|
771
|
-
type ColorType = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'orange' | 'purple' | 'gray';
|
|
770
|
+
type SizeType$1 = 'sm' | 'md' | 'lg';
|
|
771
|
+
type ColorType$1 = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'orange' | 'purple' | 'gray';
|
|
772
772
|
interface SwitchProps {
|
|
773
773
|
id?: string;
|
|
774
774
|
checked?: boolean;
|
|
@@ -777,8 +777,8 @@ interface SwitchProps {
|
|
|
777
777
|
disabled?: boolean;
|
|
778
778
|
required?: boolean;
|
|
779
779
|
name?: string;
|
|
780
|
-
size?: SizeType;
|
|
781
|
-
color?: ColorType;
|
|
780
|
+
size?: SizeType$1;
|
|
781
|
+
color?: ColorType$1;
|
|
782
782
|
className?: string;
|
|
783
783
|
}
|
|
784
784
|
|
|
@@ -908,6 +908,7 @@ type BaseSelectProps<Extra extends object = object> = {
|
|
|
908
908
|
triggerClassName?: string;
|
|
909
909
|
required?: boolean;
|
|
910
910
|
isSelectOpen?: boolean;
|
|
911
|
+
searchOptions?: string;
|
|
911
912
|
onSearchOptions?: (value: string) => void;
|
|
912
913
|
onOptionsChange?: (value: SelectOption<Extra>[]) => void;
|
|
913
914
|
onOpenChange?: (value: boolean) => void;
|
|
@@ -925,7 +926,7 @@ type SelectPropsWithDefaultBehavior<Extra extends object = EmptyObject> = {
|
|
|
925
926
|
};
|
|
926
927
|
type SelectProps<Extra extends object = object> = BaseSelectProps<Extra> & (SelectPropsWithCustomRender<Extra> | SelectPropsWithDefaultBehavior<Extra>);
|
|
927
928
|
|
|
928
|
-
declare function Select<Extra extends object = object>({ options, value, onChange, isMulti, placeholder, isSearchable, isClearable, isDisabled, renderOption, renderValue, className, label, description, hint, errorMessages, isLoadingMore, onLoadMore, treshold, trigger, triggerClassName, renderOptions, onSearchOptions, onOptionsChange, required, isSelectOpen, onOpenChange, searchPlaceholder, }: SelectProps<Extra>): react_jsx_runtime.JSX.Element;
|
|
929
|
+
declare function Select<Extra extends object = object>({ options, value, onChange, isMulti, placeholder, isSearchable, isClearable, isDisabled, renderOption, renderValue, className, label, description, hint, errorMessages, isLoadingMore, onLoadMore, treshold, trigger, triggerClassName, renderOptions, onSearchOptions, onOptionsChange, required, isSelectOpen, onOpenChange, searchOptions, searchPlaceholder, }: SelectProps<Extra>): react_jsx_runtime.JSX.Element;
|
|
929
930
|
|
|
930
931
|
interface TabsProps {
|
|
931
932
|
defaultValue?: string;
|
|
@@ -1066,4 +1067,53 @@ interface AttachmentField {
|
|
|
1066
1067
|
|
|
1067
1068
|
declare function TextEditor({ ui, field, toolbar, editor: editorProps, onDownload, }: TextEditorProps): react_jsx_runtime.JSX.Element | null;
|
|
1068
1069
|
|
|
1069
|
-
|
|
1070
|
+
type SizeType = 'sm' | 'md' | 'lg';
|
|
1071
|
+
type ColorType = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'orange' | 'purple' | 'gray';
|
|
1072
|
+
interface RadioProps {
|
|
1073
|
+
id?: string;
|
|
1074
|
+
name?: string;
|
|
1075
|
+
value: string;
|
|
1076
|
+
checked?: boolean;
|
|
1077
|
+
disabled?: boolean;
|
|
1078
|
+
required?: boolean;
|
|
1079
|
+
size?: SizeType;
|
|
1080
|
+
color?: ColorType;
|
|
1081
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
1082
|
+
className?: string;
|
|
1083
|
+
}
|
|
1084
|
+
interface RadioGroupProps {
|
|
1085
|
+
value?: string;
|
|
1086
|
+
defaultValue?: string;
|
|
1087
|
+
onValueChange?: (value: string) => void;
|
|
1088
|
+
disabled?: boolean;
|
|
1089
|
+
required?: boolean;
|
|
1090
|
+
name?: string;
|
|
1091
|
+
size?: SizeType;
|
|
1092
|
+
color?: ColorType;
|
|
1093
|
+
className?: string;
|
|
1094
|
+
children: React.ReactNode;
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
declare const RadioGroup: react__default.FC<RadioGroupProps & {
|
|
1098
|
+
label?: string;
|
|
1099
|
+
hint?: string;
|
|
1100
|
+
description?: string;
|
|
1101
|
+
errorMessages?: string | string[];
|
|
1102
|
+
direction?: 'horizontal' | 'vertical';
|
|
1103
|
+
}>;
|
|
1104
|
+
declare const BaseRadio: react__default.FC<RadioProps>;
|
|
1105
|
+
declare const Radio: react__default.FC<RadioProps & {
|
|
1106
|
+
label?: string;
|
|
1107
|
+
description?: string;
|
|
1108
|
+
}>;
|
|
1109
|
+
|
|
1110
|
+
declare const RadioVariants: (props?: ({
|
|
1111
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
1112
|
+
color?: "primary" | "secondary" | "success" | "danger" | "warning" | "info" | "orange" | "purple" | "gray" | null | undefined;
|
|
1113
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1114
|
+
declare const RadioIndicatorVariants: (props?: ({
|
|
1115
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
1116
|
+
color?: "primary" | "secondary" | "success" | "danger" | "warning" | "info" | "orange" | "purple" | "gray" | null | undefined;
|
|
1117
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1118
|
+
|
|
1119
|
+
export { type AttachmentField, BaseCheckbox, type BaseOption, BaseRadio, BaseSwitch, ButtonDropdown, type ButtonDropdownProps, ButtonGroup, ButtonGroupItem, type ButtonGroupProps, type ButtonIconProps, ButtonNavigator, Calendar, type CalendarBaseProps, type CalendarDay, type CalendarDayConfig, type CalendarDayItemProps, type CalendarEvent, type CalendarGridProps, type CalendarOverrideProps, type CalendarProps, type CalendarRangeOverrideProps, type CalendarState, type CalendarStyleConfig, type CalendarTypes, Checkbox, CheckboxGroup, type CheckboxGroupContextValue, type CheckboxGroupProps, CheckboxIndicatorVariants, type CheckboxProps, CheckboxVariants, Chip, type ChipArrayProps, ChipContext, type ChipContextValue, ChipGroup, type ChipOptionProps, type ChipProps, type ChipSelectedProps, type ChipValue, type ChipVariants, Collapsible, CollapsibleContent, CollapsibleTrigger, type ColorPickerButtonProps, type ColorType$2 as ColorType, type ColorVariantType, Counter, type CounterControllerProps, type CounterProps, type DateFormat, DatePicker, type DatePickerMode, type DatePickerProps, type DateRange, type DateRangeProps, type DotConfig, Dropdown, DropdownContent, DropdownItem, type DropdownState, DropdownTrigger, type FileItem, FormDescription, type FormDescriptionProps, FormErrorMessage, type FormErrorMessageProps, FormErrorMessages, type FormErrorMessagesProps, FormField, type FormFieldProps, FormHint, type FormHintProps, FormLabel, type FormLabelProps, type FormSizeType, type GetCalendarDaysProps, type HeadingLevel, type IconType, type ImageForm, Input, InputFile, type InputFileProps, type InputFileRef, InputOTP, type InputOTPProps, type InputProps, type InputVariantProps, ItemDropdown, type ListItemType, Modal, ModalBody, ModalDescription, ModalFooter, ModalHeader, ModalPreviewAttachment, ModalTitle, type PlayerProps, PreviewItem, type PreviewItemProps, Radio, RadioGroup, RadioIndicatorVariants, RadioVariants, Select, type SelectOption, type SelectProps, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarContext, type SidebarContextProps, SidebarFooter, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuGroup, SidebarMenuItem, SidebarProvider, SidebarTrigger, type SizeType$2 as SizeType, Switch, SwitchThumbVariants, SwitchVariants, Table, type TableAction, TableBody, type TableBodyProps, TableCell, TableCellHead, type TableCellHeadProps, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TablePagination, type TablePaginationProps, type TableRootProps, TableRow, type TableRowProps, Tabs, TabsContent, TabsList, TabsTrigger, type TextAlignValue, TextEditor, type TextEditorProps, Textarea, type TextareaProps, ToastProvider, type ToolbarButtonProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UploadConfig, type UploadStatus, type UploadedFile, chipVariants, formatDateLocal, formatDateToString, generatePages, getCalendarDays, getFormatConfig, getWeekEventSegments, handleDecrement, handleIncrement, handleInputChange, handleKeyDown, inputVariants, isSameDate, isToday, monthsFull, monthsShort, normalize, parseLocalDate, parseMonthName, toDateOnly, useCopy, useIsMobile, useSidebar, useToast };
|
package/dist/clients.d.ts
CHANGED
|
@@ -12,8 +12,8 @@ import { d as TextVariant, a as ButtonProps } from './button-DEGM0SCk.js';
|
|
|
12
12
|
import { DragHandleProps } from '@tiptap/extension-drag-handle-react';
|
|
13
13
|
import { Editor } from '@tiptap/core';
|
|
14
14
|
|
|
15
|
-
type SizeType$
|
|
16
|
-
type ColorType$
|
|
15
|
+
type SizeType$2 = 'sm' | 'md' | 'lg';
|
|
16
|
+
type ColorType$2 = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'orange' | 'purple' | 'gray';
|
|
17
17
|
type IconType = 'check' | 'minus';
|
|
18
18
|
interface CheckboxProps {
|
|
19
19
|
id?: string;
|
|
@@ -22,8 +22,8 @@ interface CheckboxProps {
|
|
|
22
22
|
defaultChecked?: boolean;
|
|
23
23
|
disabled?: boolean;
|
|
24
24
|
required?: boolean;
|
|
25
|
-
size?: SizeType$
|
|
26
|
-
color?: ColorType$
|
|
25
|
+
size?: SizeType$2;
|
|
26
|
+
color?: ColorType$2;
|
|
27
27
|
icon?: IconType;
|
|
28
28
|
onCheckedChange?: (checked: boolean) => void;
|
|
29
29
|
className?: string;
|
|
@@ -35,8 +35,8 @@ interface CheckboxGroupProps {
|
|
|
35
35
|
disabled?: boolean;
|
|
36
36
|
required?: boolean;
|
|
37
37
|
name?: string;
|
|
38
|
-
size?: SizeType$
|
|
39
|
-
color?: ColorType$
|
|
38
|
+
size?: SizeType$2;
|
|
39
|
+
color?: ColorType$2;
|
|
40
40
|
icon?: IconType;
|
|
41
41
|
className?: string;
|
|
42
42
|
children?: React.ReactNode;
|
|
@@ -46,8 +46,8 @@ interface CheckboxGroupContextValue {
|
|
|
46
46
|
onValueChange?: (value: string[]) => void;
|
|
47
47
|
disabled?: boolean;
|
|
48
48
|
name?: string;
|
|
49
|
-
size?: SizeType$
|
|
50
|
-
color?: ColorType$
|
|
49
|
+
size?: SizeType$2;
|
|
50
|
+
color?: ColorType$2;
|
|
51
51
|
icon?: 'check' | 'minus';
|
|
52
52
|
}
|
|
53
53
|
|
|
@@ -767,8 +767,8 @@ interface TextareaProps extends react.ComponentProps<'textarea'> {
|
|
|
767
767
|
}
|
|
768
768
|
declare function Textarea({ label, hint, description, errorMessages, className, required, ...props }: TextareaProps): react_jsx_runtime.JSX.Element;
|
|
769
769
|
|
|
770
|
-
type SizeType = 'sm' | 'md' | 'lg';
|
|
771
|
-
type ColorType = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'orange' | 'purple' | 'gray';
|
|
770
|
+
type SizeType$1 = 'sm' | 'md' | 'lg';
|
|
771
|
+
type ColorType$1 = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'orange' | 'purple' | 'gray';
|
|
772
772
|
interface SwitchProps {
|
|
773
773
|
id?: string;
|
|
774
774
|
checked?: boolean;
|
|
@@ -777,8 +777,8 @@ interface SwitchProps {
|
|
|
777
777
|
disabled?: boolean;
|
|
778
778
|
required?: boolean;
|
|
779
779
|
name?: string;
|
|
780
|
-
size?: SizeType;
|
|
781
|
-
color?: ColorType;
|
|
780
|
+
size?: SizeType$1;
|
|
781
|
+
color?: ColorType$1;
|
|
782
782
|
className?: string;
|
|
783
783
|
}
|
|
784
784
|
|
|
@@ -908,6 +908,7 @@ type BaseSelectProps<Extra extends object = object> = {
|
|
|
908
908
|
triggerClassName?: string;
|
|
909
909
|
required?: boolean;
|
|
910
910
|
isSelectOpen?: boolean;
|
|
911
|
+
searchOptions?: string;
|
|
911
912
|
onSearchOptions?: (value: string) => void;
|
|
912
913
|
onOptionsChange?: (value: SelectOption<Extra>[]) => void;
|
|
913
914
|
onOpenChange?: (value: boolean) => void;
|
|
@@ -925,7 +926,7 @@ type SelectPropsWithDefaultBehavior<Extra extends object = EmptyObject> = {
|
|
|
925
926
|
};
|
|
926
927
|
type SelectProps<Extra extends object = object> = BaseSelectProps<Extra> & (SelectPropsWithCustomRender<Extra> | SelectPropsWithDefaultBehavior<Extra>);
|
|
927
928
|
|
|
928
|
-
declare function Select<Extra extends object = object>({ options, value, onChange, isMulti, placeholder, isSearchable, isClearable, isDisabled, renderOption, renderValue, className, label, description, hint, errorMessages, isLoadingMore, onLoadMore, treshold, trigger, triggerClassName, renderOptions, onSearchOptions, onOptionsChange, required, isSelectOpen, onOpenChange, searchPlaceholder, }: SelectProps<Extra>): react_jsx_runtime.JSX.Element;
|
|
929
|
+
declare function Select<Extra extends object = object>({ options, value, onChange, isMulti, placeholder, isSearchable, isClearable, isDisabled, renderOption, renderValue, className, label, description, hint, errorMessages, isLoadingMore, onLoadMore, treshold, trigger, triggerClassName, renderOptions, onSearchOptions, onOptionsChange, required, isSelectOpen, onOpenChange, searchOptions, searchPlaceholder, }: SelectProps<Extra>): react_jsx_runtime.JSX.Element;
|
|
929
930
|
|
|
930
931
|
interface TabsProps {
|
|
931
932
|
defaultValue?: string;
|
|
@@ -1066,4 +1067,53 @@ interface AttachmentField {
|
|
|
1066
1067
|
|
|
1067
1068
|
declare function TextEditor({ ui, field, toolbar, editor: editorProps, onDownload, }: TextEditorProps): react_jsx_runtime.JSX.Element | null;
|
|
1068
1069
|
|
|
1069
|
-
|
|
1070
|
+
type SizeType = 'sm' | 'md' | 'lg';
|
|
1071
|
+
type ColorType = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'orange' | 'purple' | 'gray';
|
|
1072
|
+
interface RadioProps {
|
|
1073
|
+
id?: string;
|
|
1074
|
+
name?: string;
|
|
1075
|
+
value: string;
|
|
1076
|
+
checked?: boolean;
|
|
1077
|
+
disabled?: boolean;
|
|
1078
|
+
required?: boolean;
|
|
1079
|
+
size?: SizeType;
|
|
1080
|
+
color?: ColorType;
|
|
1081
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
1082
|
+
className?: string;
|
|
1083
|
+
}
|
|
1084
|
+
interface RadioGroupProps {
|
|
1085
|
+
value?: string;
|
|
1086
|
+
defaultValue?: string;
|
|
1087
|
+
onValueChange?: (value: string) => void;
|
|
1088
|
+
disabled?: boolean;
|
|
1089
|
+
required?: boolean;
|
|
1090
|
+
name?: string;
|
|
1091
|
+
size?: SizeType;
|
|
1092
|
+
color?: ColorType;
|
|
1093
|
+
className?: string;
|
|
1094
|
+
children: React.ReactNode;
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
declare const RadioGroup: react__default.FC<RadioGroupProps & {
|
|
1098
|
+
label?: string;
|
|
1099
|
+
hint?: string;
|
|
1100
|
+
description?: string;
|
|
1101
|
+
errorMessages?: string | string[];
|
|
1102
|
+
direction?: 'horizontal' | 'vertical';
|
|
1103
|
+
}>;
|
|
1104
|
+
declare const BaseRadio: react__default.FC<RadioProps>;
|
|
1105
|
+
declare const Radio: react__default.FC<RadioProps & {
|
|
1106
|
+
label?: string;
|
|
1107
|
+
description?: string;
|
|
1108
|
+
}>;
|
|
1109
|
+
|
|
1110
|
+
declare const RadioVariants: (props?: ({
|
|
1111
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
1112
|
+
color?: "primary" | "secondary" | "success" | "danger" | "warning" | "info" | "orange" | "purple" | "gray" | null | undefined;
|
|
1113
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1114
|
+
declare const RadioIndicatorVariants: (props?: ({
|
|
1115
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
1116
|
+
color?: "primary" | "secondary" | "success" | "danger" | "warning" | "info" | "orange" | "purple" | "gray" | null | undefined;
|
|
1117
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1118
|
+
|
|
1119
|
+
export { type AttachmentField, BaseCheckbox, type BaseOption, BaseRadio, BaseSwitch, ButtonDropdown, type ButtonDropdownProps, ButtonGroup, ButtonGroupItem, type ButtonGroupProps, type ButtonIconProps, ButtonNavigator, Calendar, type CalendarBaseProps, type CalendarDay, type CalendarDayConfig, type CalendarDayItemProps, type CalendarEvent, type CalendarGridProps, type CalendarOverrideProps, type CalendarProps, type CalendarRangeOverrideProps, type CalendarState, type CalendarStyleConfig, type CalendarTypes, Checkbox, CheckboxGroup, type CheckboxGroupContextValue, type CheckboxGroupProps, CheckboxIndicatorVariants, type CheckboxProps, CheckboxVariants, Chip, type ChipArrayProps, ChipContext, type ChipContextValue, ChipGroup, type ChipOptionProps, type ChipProps, type ChipSelectedProps, type ChipValue, type ChipVariants, Collapsible, CollapsibleContent, CollapsibleTrigger, type ColorPickerButtonProps, type ColorType$2 as ColorType, type ColorVariantType, Counter, type CounterControllerProps, type CounterProps, type DateFormat, DatePicker, type DatePickerMode, type DatePickerProps, type DateRange, type DateRangeProps, type DotConfig, Dropdown, DropdownContent, DropdownItem, type DropdownState, DropdownTrigger, type FileItem, FormDescription, type FormDescriptionProps, FormErrorMessage, type FormErrorMessageProps, FormErrorMessages, type FormErrorMessagesProps, FormField, type FormFieldProps, FormHint, type FormHintProps, FormLabel, type FormLabelProps, type FormSizeType, type GetCalendarDaysProps, type HeadingLevel, type IconType, type ImageForm, Input, InputFile, type InputFileProps, type InputFileRef, InputOTP, type InputOTPProps, type InputProps, type InputVariantProps, ItemDropdown, type ListItemType, Modal, ModalBody, ModalDescription, ModalFooter, ModalHeader, ModalPreviewAttachment, ModalTitle, type PlayerProps, PreviewItem, type PreviewItemProps, Radio, RadioGroup, RadioIndicatorVariants, RadioVariants, Select, type SelectOption, type SelectProps, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarContext, type SidebarContextProps, SidebarFooter, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuGroup, SidebarMenuItem, SidebarProvider, SidebarTrigger, type SizeType$2 as SizeType, Switch, SwitchThumbVariants, SwitchVariants, Table, type TableAction, TableBody, type TableBodyProps, TableCell, TableCellHead, type TableCellHeadProps, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TablePagination, type TablePaginationProps, type TableRootProps, TableRow, type TableRowProps, Tabs, TabsContent, TabsList, TabsTrigger, type TextAlignValue, TextEditor, type TextEditorProps, Textarea, type TextareaProps, ToastProvider, type ToolbarButtonProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UploadConfig, type UploadStatus, type UploadedFile, chipVariants, formatDateLocal, formatDateToString, generatePages, getCalendarDays, getFormatConfig, getWeekEventSegments, handleDecrement, handleIncrement, handleInputChange, handleKeyDown, inputVariants, isSameDate, isToday, monthsFull, monthsShort, normalize, parseLocalDate, parseMonthName, toDateOnly, useCopy, useIsMobile, useSidebar, useToast };
|
package/dist/clients.js
CHANGED
|
@@ -11979,10 +11979,10 @@ var InputFile = forwardRef2(
|
|
|
11979
11979
|
/* @__PURE__ */ jsxs71(
|
|
11980
11980
|
"label",
|
|
11981
11981
|
{
|
|
11982
|
-
onDragEnter: variant === "large" ? handleDragEnter : void 0,
|
|
11983
|
-
onDragLeave: variant === "large" ? handleDragLeave : void 0,
|
|
11984
|
-
onDragOver: variant === "large" ? handleDragOver : void 0,
|
|
11985
|
-
onDrop: variant === "large" ? handleDrop : void 0,
|
|
11982
|
+
onDragEnter: variant === "large" || variant === "medium" ? handleDragEnter : void 0,
|
|
11983
|
+
onDragLeave: variant === "large" || variant === "medium" ? handleDragLeave : void 0,
|
|
11984
|
+
onDragOver: variant === "large" || variant === "medium" ? handleDragOver : void 0,
|
|
11985
|
+
onDrop: variant === "large" || variant === "medium" ? handleDrop : void 0,
|
|
11986
11986
|
className: cn(
|
|
11987
11987
|
inputFileVariants({ variant }),
|
|
11988
11988
|
"group relative flex items-center gap-2 rounded-lg border px-3 py-2 transition-all",
|
|
@@ -11993,7 +11993,7 @@ var InputFile = forwardRef2(
|
|
|
11993
11993
|
variant === "large" && internalErrorMessage !== void 0 && "border-danger-500",
|
|
11994
11994
|
//prettier-ignore
|
|
11995
11995
|
variant === "large" && "flex-col items-center p-5!",
|
|
11996
|
-
variant === "large" && isDragging && "border-primary-500 bg-primary-50",
|
|
11996
|
+
(variant === "large" || variant === "medium") && isDragging && "border-primary-500 bg-primary-50",
|
|
11997
11997
|
//prettier-ignore
|
|
11998
11998
|
disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"
|
|
11999
11999
|
),
|
|
@@ -12021,7 +12021,7 @@ var InputFile = forwardRef2(
|
|
|
12021
12021
|
Text,
|
|
12022
12022
|
{
|
|
12023
12023
|
as: "p",
|
|
12024
|
-
value: variant === "large" && !isDragging && !hint ? `Klik atau drag & drop file disini` : hint,
|
|
12024
|
+
value: (variant === "large" || variant === "medium") && !isDragging && !hint ? `Klik atau drag & drop file disini` : hint,
|
|
12025
12025
|
className: "text-gray-600!"
|
|
12026
12026
|
}
|
|
12027
12027
|
)
|
|
@@ -15286,6 +15286,7 @@ function Select({
|
|
|
15286
15286
|
required,
|
|
15287
15287
|
isSelectOpen,
|
|
15288
15288
|
onOpenChange,
|
|
15289
|
+
searchOptions,
|
|
15289
15290
|
searchPlaceholder = "Search..."
|
|
15290
15291
|
}) {
|
|
15291
15292
|
const [isOpen, setIsOpen] = useState14(false);
|
|
@@ -15420,6 +15421,11 @@ function Select({
|
|
|
15420
15421
|
useEffect10(() => {
|
|
15421
15422
|
onOpenChange?.(isOpen);
|
|
15422
15423
|
}, [isOpen]);
|
|
15424
|
+
useEffect10(() => {
|
|
15425
|
+
if (searchOptions !== void 0) {
|
|
15426
|
+
setSearchTerm(searchOptions);
|
|
15427
|
+
}
|
|
15428
|
+
}, [searchOptions]);
|
|
15423
15429
|
const getDisplayValue = () => {
|
|
15424
15430
|
const isEmpty = value == null || isMulti && asArray(value).length === 0;
|
|
15425
15431
|
if (isEmpty) {
|
|
@@ -34451,7 +34457,7 @@ function TableGroup({
|
|
|
34451
34457
|
{
|
|
34452
34458
|
title: "Delete Row",
|
|
34453
34459
|
icon: "table-delete-row",
|
|
34454
|
-
onClick: () => editor.chain().focus().
|
|
34460
|
+
onClick: () => editor.chain().focus().deleteRow().run(),
|
|
34455
34461
|
requiresTable: false,
|
|
34456
34462
|
disabled
|
|
34457
34463
|
}
|
|
@@ -34467,7 +34473,7 @@ function TableGroup({
|
|
|
34467
34473
|
{
|
|
34468
34474
|
title: "Delete Column",
|
|
34469
34475
|
icon: "table-delete-column",
|
|
34470
|
-
onClick: () => editor.chain().focus().
|
|
34476
|
+
onClick: () => editor.chain().focus().deleteColumn().run(),
|
|
34471
34477
|
requiresTable: false,
|
|
34472
34478
|
disabled
|
|
34473
34479
|
}
|
|
@@ -34781,8 +34787,228 @@ function TextEditor({
|
|
|
34781
34787
|
}
|
|
34782
34788
|
);
|
|
34783
34789
|
}
|
|
34790
|
+
|
|
34791
|
+
// src/components/radio/radio.tsx
|
|
34792
|
+
import React368, { createContext as createContext7, useContext as useContext7, useId as useId5 } from "react";
|
|
34793
|
+
|
|
34794
|
+
// src/components/radio/radio-variants.ts
|
|
34795
|
+
import { cva as cva13 } from "class-variance-authority";
|
|
34796
|
+
var RadioVariants = cva13(
|
|
34797
|
+
"flex items-center justify-center rounded-full border transition-all focus-visible:ring-1 focus-visible:ring-offset-0 focus-visible:outline-none",
|
|
34798
|
+
{
|
|
34799
|
+
variants: {
|
|
34800
|
+
size: {
|
|
34801
|
+
sm: "h-4 w-4",
|
|
34802
|
+
md: "h-5 w-5",
|
|
34803
|
+
lg: "h-6 w-6"
|
|
34804
|
+
},
|
|
34805
|
+
color: {
|
|
34806
|
+
primary: "border-primary-1000 focus-visible:ring-primary-900",
|
|
34807
|
+
secondary: "border-gray-600 focus-visible:ring-gray-500",
|
|
34808
|
+
success: "border-success-500 focus-visible:ring-success-400",
|
|
34809
|
+
danger: "border-danger-500 focus-visible:ring-danger-400",
|
|
34810
|
+
warning: "border-warning-500 focus-visible:ring-warning-400",
|
|
34811
|
+
info: "border-info-500 focus-visible:ring-info-400",
|
|
34812
|
+
orange: "border-orange-500 focus-visible:ring-orange-400",
|
|
34813
|
+
purple: "border-purple-500 focus-visible:ring-purple-400",
|
|
34814
|
+
gray: "border-gray-600 focus-visible:ring-gray-500"
|
|
34815
|
+
}
|
|
34816
|
+
},
|
|
34817
|
+
defaultVariants: {
|
|
34818
|
+
size: "md",
|
|
34819
|
+
color: "primary"
|
|
34820
|
+
}
|
|
34821
|
+
}
|
|
34822
|
+
);
|
|
34823
|
+
var RadioIndicatorVariants = cva13("rounded-full transition-all", {
|
|
34824
|
+
variants: {
|
|
34825
|
+
size: {
|
|
34826
|
+
sm: "h-2 w-2",
|
|
34827
|
+
md: "h-2.5 w-2.5",
|
|
34828
|
+
lg: "h-3 w-3"
|
|
34829
|
+
},
|
|
34830
|
+
color: {
|
|
34831
|
+
primary: "bg-primary-1000",
|
|
34832
|
+
secondary: "bg-gray-600",
|
|
34833
|
+
success: "bg-success-500",
|
|
34834
|
+
danger: "bg-danger-500",
|
|
34835
|
+
warning: "bg-warning-500",
|
|
34836
|
+
info: "bg-info-500",
|
|
34837
|
+
orange: "bg-orange-500",
|
|
34838
|
+
purple: "bg-purple-500",
|
|
34839
|
+
gray: "bg-gray-600"
|
|
34840
|
+
}
|
|
34841
|
+
},
|
|
34842
|
+
defaultVariants: {
|
|
34843
|
+
size: "md",
|
|
34844
|
+
color: "primary"
|
|
34845
|
+
}
|
|
34846
|
+
});
|
|
34847
|
+
|
|
34848
|
+
// src/components/radio/radio.tsx
|
|
34849
|
+
import { jsx as jsx412, jsxs as jsxs97 } from "react/jsx-runtime";
|
|
34850
|
+
var RadioGroupContext = createContext7(
|
|
34851
|
+
void 0
|
|
34852
|
+
);
|
|
34853
|
+
var RadioGroup = ({
|
|
34854
|
+
value,
|
|
34855
|
+
defaultValue,
|
|
34856
|
+
onValueChange,
|
|
34857
|
+
disabled = false,
|
|
34858
|
+
required = false,
|
|
34859
|
+
name,
|
|
34860
|
+
size = "md",
|
|
34861
|
+
color = "primary",
|
|
34862
|
+
className,
|
|
34863
|
+
label,
|
|
34864
|
+
hint,
|
|
34865
|
+
description,
|
|
34866
|
+
errorMessages,
|
|
34867
|
+
direction = "vertical",
|
|
34868
|
+
children
|
|
34869
|
+
}) => {
|
|
34870
|
+
const [internalValue, setInternalValue] = React368.useState(
|
|
34871
|
+
defaultValue ?? value ?? ""
|
|
34872
|
+
);
|
|
34873
|
+
const currentValue = value !== void 0 ? value : internalValue;
|
|
34874
|
+
const handleValueChange = (newValue) => {
|
|
34875
|
+
if (value === void 0) {
|
|
34876
|
+
setInternalValue(newValue);
|
|
34877
|
+
}
|
|
34878
|
+
onValueChange?.(newValue);
|
|
34879
|
+
};
|
|
34880
|
+
return /* @__PURE__ */ jsx412(
|
|
34881
|
+
RadioGroupContext.Provider,
|
|
34882
|
+
{
|
|
34883
|
+
value: {
|
|
34884
|
+
value: currentValue,
|
|
34885
|
+
onValueChange: handleValueChange,
|
|
34886
|
+
disabled,
|
|
34887
|
+
name,
|
|
34888
|
+
size,
|
|
34889
|
+
color
|
|
34890
|
+
},
|
|
34891
|
+
children: /* @__PURE__ */ jsx412(
|
|
34892
|
+
FormField,
|
|
34893
|
+
{
|
|
34894
|
+
label,
|
|
34895
|
+
hint,
|
|
34896
|
+
description,
|
|
34897
|
+
errorMessages,
|
|
34898
|
+
className,
|
|
34899
|
+
required,
|
|
34900
|
+
size,
|
|
34901
|
+
children: /* @__PURE__ */ jsx412(
|
|
34902
|
+
"div",
|
|
34903
|
+
{
|
|
34904
|
+
role: "radiogroup",
|
|
34905
|
+
"aria-required": required,
|
|
34906
|
+
className: cn(
|
|
34907
|
+
"flex gap-4",
|
|
34908
|
+
direction === "vertical" ? "flex-col" : "flex-row flex-wrap"
|
|
34909
|
+
),
|
|
34910
|
+
children
|
|
34911
|
+
}
|
|
34912
|
+
)
|
|
34913
|
+
}
|
|
34914
|
+
)
|
|
34915
|
+
}
|
|
34916
|
+
);
|
|
34917
|
+
};
|
|
34918
|
+
var BaseRadio = ({
|
|
34919
|
+
id: providedId,
|
|
34920
|
+
value,
|
|
34921
|
+
checked,
|
|
34922
|
+
disabled: disabledProp = false,
|
|
34923
|
+
required = false,
|
|
34924
|
+
size: sizeProp,
|
|
34925
|
+
color: colorProp,
|
|
34926
|
+
onCheckedChange,
|
|
34927
|
+
className
|
|
34928
|
+
}) => {
|
|
34929
|
+
const generatedId = useId5();
|
|
34930
|
+
const id = providedId ?? generatedId;
|
|
34931
|
+
const context = useContext7(RadioGroupContext);
|
|
34932
|
+
const isChecked = context ? context.value === value : checked ?? false;
|
|
34933
|
+
const disabled = disabledProp ?? context?.disabled ?? false;
|
|
34934
|
+
const name = context?.name;
|
|
34935
|
+
const size = sizeProp ?? context?.size ?? "md";
|
|
34936
|
+
const color = colorProp ?? context?.color ?? "primary";
|
|
34937
|
+
const handleChange = () => {
|
|
34938
|
+
if (disabled) return;
|
|
34939
|
+
if (context) {
|
|
34940
|
+
context.onValueChange?.(value);
|
|
34941
|
+
} else {
|
|
34942
|
+
onCheckedChange?.(!isChecked);
|
|
34943
|
+
}
|
|
34944
|
+
};
|
|
34945
|
+
return /* @__PURE__ */ jsxs97(
|
|
34946
|
+
"button",
|
|
34947
|
+
{
|
|
34948
|
+
type: "button",
|
|
34949
|
+
role: "radio",
|
|
34950
|
+
id,
|
|
34951
|
+
"aria-checked": isChecked,
|
|
34952
|
+
"aria-required": required,
|
|
34953
|
+
disabled,
|
|
34954
|
+
onClick: handleChange,
|
|
34955
|
+
className: cn(
|
|
34956
|
+
RadioVariants({ size, color }),
|
|
34957
|
+
!isChecked && "border-gray-300",
|
|
34958
|
+
disabled && "cursor-not-allowed opacity-50",
|
|
34959
|
+
!disabled && "hover:border-opacity-80 cursor-pointer",
|
|
34960
|
+
"bg-white",
|
|
34961
|
+
className
|
|
34962
|
+
),
|
|
34963
|
+
children: [
|
|
34964
|
+
Boolean(name) && /* @__PURE__ */ jsx412(
|
|
34965
|
+
"input",
|
|
34966
|
+
{
|
|
34967
|
+
type: "radio",
|
|
34968
|
+
name,
|
|
34969
|
+
value,
|
|
34970
|
+
checked: isChecked,
|
|
34971
|
+
onChange: () => {
|
|
34972
|
+
},
|
|
34973
|
+
className: "sr-only",
|
|
34974
|
+
disabled,
|
|
34975
|
+
required
|
|
34976
|
+
}
|
|
34977
|
+
),
|
|
34978
|
+
/* @__PURE__ */ jsx412(
|
|
34979
|
+
"span",
|
|
34980
|
+
{
|
|
34981
|
+
className: cn(
|
|
34982
|
+
RadioIndicatorVariants({ size, color }),
|
|
34983
|
+
isChecked ? "scale-100" : "scale-0 bg-transparent"
|
|
34984
|
+
)
|
|
34985
|
+
}
|
|
34986
|
+
)
|
|
34987
|
+
]
|
|
34988
|
+
}
|
|
34989
|
+
);
|
|
34990
|
+
};
|
|
34991
|
+
var Radio = ({ label, description, className, size: sizeProp, ...props }) => {
|
|
34992
|
+
const generatedId = useId5();
|
|
34993
|
+
const id = props?.id ?? generatedId;
|
|
34994
|
+
const context = useContext7(RadioGroupContext);
|
|
34995
|
+
const size = sizeProp ?? context?.size ?? "md";
|
|
34996
|
+
const labelSizeClasses = {
|
|
34997
|
+
sm: "text-xs",
|
|
34998
|
+
md: "text-sm",
|
|
34999
|
+
lg: "text-base"
|
|
35000
|
+
};
|
|
35001
|
+
return /* @__PURE__ */ jsxs97("div", { className: cn("inline-flex items-center gap-2", className), children: [
|
|
35002
|
+
/* @__PURE__ */ jsx412(BaseRadio, { ...props, id, size }),
|
|
35003
|
+
/* @__PURE__ */ jsxs97("div", { className: "flex flex-col", children: [
|
|
35004
|
+
Boolean(label) && /* @__PURE__ */ jsx412(FormLabel, { htmlFor: id, className: labelSizeClasses[size], children: label }),
|
|
35005
|
+
Boolean(description) && /* @__PURE__ */ jsx412(FormDescription, { children: description })
|
|
35006
|
+
] })
|
|
35007
|
+
] });
|
|
35008
|
+
};
|
|
34784
35009
|
export {
|
|
34785
35010
|
BaseCheckbox,
|
|
35011
|
+
BaseRadio,
|
|
34786
35012
|
BaseSwitch,
|
|
34787
35013
|
ButtonDropdown,
|
|
34788
35014
|
ButtonGroup,
|
|
@@ -34823,6 +35049,10 @@ export {
|
|
|
34823
35049
|
ModalPreviewAttachment,
|
|
34824
35050
|
ModalTitle,
|
|
34825
35051
|
PreviewItem,
|
|
35052
|
+
Radio,
|
|
35053
|
+
RadioGroup,
|
|
35054
|
+
RadioIndicatorVariants,
|
|
35055
|
+
RadioVariants,
|
|
34826
35056
|
Select,
|
|
34827
35057
|
Sheet,
|
|
34828
35058
|
SheetClose,
|