@6thbridge/hexa 0.0.99 → 0.0.101

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -5,6 +5,7 @@ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
5
5
  import * as LabelPrimitive from '@radix-ui/react-label';
6
6
  import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
7
7
  import { VariantProps } from 'class-variance-authority';
8
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
8
9
  import * as RPNInput from 'react-phone-number-input';
9
10
  import * as DialogPrimitive from '@radix-ui/react-dialog';
10
11
  import { DialogCloseProps } from '@radix-ui/react-dialog';
@@ -96,6 +97,38 @@ interface ButtonProps extends DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonE
96
97
  }
97
98
  declare const Button: React$1.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
98
99
 
100
+ type SplitButtonSize = VariantProps<typeof buttonVariants>["size"];
101
+ type SplitButtonItem = {
102
+ value?: string;
103
+ label: React$1.ReactNode;
104
+ icon?: React$1.ReactNode;
105
+ onSelect?: () => void;
106
+ disabled?: boolean;
107
+ destructive?: boolean;
108
+ separatorBefore?: boolean;
109
+ };
110
+ interface SplitButtonProps extends Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, "onSelect"> {
111
+ items: SplitButtonItem[];
112
+ variant?: ButtonVariant;
113
+ size?: SplitButtonSize;
114
+ isLoading?: boolean;
115
+ leftNode?: React$1.ReactNode;
116
+ menuAlign?: DropdownMenuPrimitive.DropdownMenuContentProps["align"];
117
+ menuSide?: DropdownMenuPrimitive.DropdownMenuContentProps["side"];
118
+ menuTriggerLabel?: string;
119
+ buttonClassName?: string;
120
+ triggerClassName?: string;
121
+ contentClassName?: string;
122
+ open?: boolean;
123
+ onOpenChange?: (open: boolean) => void;
124
+ modal?: boolean;
125
+ id?: string;
126
+ }
127
+ declare const SplitButton: {
128
+ ({ items, variant, size, isLoading, leftNode, children, disabled, className, buttonClassName, triggerClassName, contentClassName, menuAlign, menuSide, menuTriggerLabel, open, onOpenChange, modal, id, ...props }: SplitButtonProps): React$1.JSX.Element;
129
+ displayName: string;
130
+ };
131
+
99
132
  declare const inputVariants: (props?: ({
100
133
  status?: "default" | "error" | "neutral" | "loading" | "prefilled" | null | undefined;
101
134
  } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
@@ -159,7 +192,7 @@ type CountrySelectOption$1 = {
159
192
  internetCountryCode?: string;
160
193
  countryName?: string;
161
194
  };
162
- interface CountryProps {
195
+ interface CountryCommonProps {
163
196
  modal?: boolean;
164
197
  hideSearch?: boolean;
165
198
  loading?: boolean;
@@ -167,19 +200,28 @@ interface CountryProps {
167
200
  onInputValueChange?: (arg: string) => void;
168
201
  disabled?: boolean;
169
202
  placeholder?: string;
170
- value?: SearchableDataType;
171
- optionComponent?: (arg: SearchableDataType) => React.ReactNode;
203
+ optionComponent?: (arg: SearchableDataType) => React$1.ReactNode;
172
204
  className?: string;
173
205
  containerClassName?: string;
174
- onChange: (value: SearchableDataType) => void;
175
206
  status?: CountryPropsStatus;
176
207
  label?: string;
177
208
  showAsterisk?: boolean;
178
- description?: React.ReactNode;
209
+ description?: React$1.ReactNode;
179
210
  error?: string;
180
211
  countryOptions?: CountrySelectOption$1[];
181
212
  }
182
- declare const Country: ({ hideSearch, showAsterisk, label, description, error, countryOptions, ...props }: CountryProps) => React$1.JSX.Element;
213
+ interface CountrySingleSelectProps extends CountryCommonProps {
214
+ multiSelect?: false;
215
+ value?: SearchableDataType;
216
+ onChange: (value: SearchableDataType) => void;
217
+ }
218
+ interface CountryMultiSelectProps extends CountryCommonProps {
219
+ multiSelect: true;
220
+ value?: CountrySelectOption$1[];
221
+ onChange: (value: CountrySelectOption$1[]) => void;
222
+ }
223
+ type CountryProps = CountrySingleSelectProps | CountryMultiSelectProps;
224
+ declare const Country: (props: CountryProps) => React$1.JSX.Element;
183
225
 
184
226
  type SelectPropsStatus = VariantProps<typeof inputContainerVariants>["status"];
185
227
  interface SelectProps {
@@ -939,4 +981,4 @@ declare const TagsInput: ({ value, onChange, options, label, error, placeholder,
939
981
 
940
982
  declare function cn(...inputs: ClassValue[]): string;
941
983
 
942
- export { Accordion, type AccordionItemType, type AccordionProps, AmountAction, Banner, Button, CalendarInput, CopyableLabel, Country, CurrencySymbolMap, DateAction, DebouncedInput, DevBanner, Dialog, Drawer, DrawerClose, type DrawerPropsType, DrawerRoot, FeatureBanner, type FilterFieldProps, type FilterListItem, type FilterListOptions, FilterPopover, FlagComponent, FormLabel, type FormatCurrencyOptions, HasResourcePermission, Input, Loader, LocaleSelector, MultiSelect, type MultiSelectDataType, MultiSelectTrigger, OTPInput, PageDataToolbar, Pagination, PasswordInput, PermissionsContext, PermissionsProvider, PhoneInput, Popover, PopoverContent, PopoverRoot, PopoverTrigger, RadioGroup, RadioGroupItem, type ResourcePermission, type ResourcePermissionProps, type ResourcePermissions, RichTextEditor, ScrollArea, Select, Sidebar, Status, StringAction, Table, type TableBulkRowActionsProps, type TablePaginationProps, Tabs, type TagOption, TagsInput, type TagsInputProps, TextOverflow, type TextOverflowProps, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipRoot, TooltipTrigger, buttonVariants, cn, useFilterStore, useHasPermission, usePermissions };
984
+ export { Accordion, type AccordionItemType, type AccordionProps, AmountAction, Banner, Button, CalendarInput, CopyableLabel, Country, type CountryProps, type CountrySelectOption$1 as CountrySelectOption, CurrencySymbolMap, DateAction, DebouncedInput, DevBanner, Dialog, Drawer, DrawerClose, type DrawerPropsType, DrawerRoot, FeatureBanner, type FilterFieldProps, type FilterListItem, type FilterListOptions, FilterPopover, FlagComponent, FormLabel, type FormatCurrencyOptions, HasResourcePermission, Input, Loader, LocaleSelector, MultiSelect, type MultiSelectDataType, MultiSelectTrigger, OTPInput, PageDataToolbar, Pagination, PasswordInput, PermissionsContext, PermissionsProvider, PhoneInput, Popover, PopoverContent, PopoverRoot, PopoverTrigger, RadioGroup, RadioGroupItem, type ResourcePermission, type ResourcePermissionProps, type ResourcePermissions, RichTextEditor, ScrollArea, Select, Sidebar, SplitButton, type SplitButtonItem, type SplitButtonProps, Status, StringAction, Table, type TableBulkRowActionsProps, type TablePaginationProps, Tabs, type TagOption, TagsInput, type TagsInputProps, TextOverflow, type TextOverflowProps, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipRoot, TooltipTrigger, buttonVariants, cn, useFilterStore, useHasPermission, usePermissions };
package/dist/index.d.ts CHANGED
@@ -5,6 +5,7 @@ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
5
5
  import * as LabelPrimitive from '@radix-ui/react-label';
6
6
  import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
7
7
  import { VariantProps } from 'class-variance-authority';
8
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
8
9
  import * as RPNInput from 'react-phone-number-input';
9
10
  import * as DialogPrimitive from '@radix-ui/react-dialog';
10
11
  import { DialogCloseProps } from '@radix-ui/react-dialog';
@@ -96,6 +97,38 @@ interface ButtonProps extends DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonE
96
97
  }
97
98
  declare const Button: React$1.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
98
99
 
100
+ type SplitButtonSize = VariantProps<typeof buttonVariants>["size"];
101
+ type SplitButtonItem = {
102
+ value?: string;
103
+ label: React$1.ReactNode;
104
+ icon?: React$1.ReactNode;
105
+ onSelect?: () => void;
106
+ disabled?: boolean;
107
+ destructive?: boolean;
108
+ separatorBefore?: boolean;
109
+ };
110
+ interface SplitButtonProps extends Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, "onSelect"> {
111
+ items: SplitButtonItem[];
112
+ variant?: ButtonVariant;
113
+ size?: SplitButtonSize;
114
+ isLoading?: boolean;
115
+ leftNode?: React$1.ReactNode;
116
+ menuAlign?: DropdownMenuPrimitive.DropdownMenuContentProps["align"];
117
+ menuSide?: DropdownMenuPrimitive.DropdownMenuContentProps["side"];
118
+ menuTriggerLabel?: string;
119
+ buttonClassName?: string;
120
+ triggerClassName?: string;
121
+ contentClassName?: string;
122
+ open?: boolean;
123
+ onOpenChange?: (open: boolean) => void;
124
+ modal?: boolean;
125
+ id?: string;
126
+ }
127
+ declare const SplitButton: {
128
+ ({ items, variant, size, isLoading, leftNode, children, disabled, className, buttonClassName, triggerClassName, contentClassName, menuAlign, menuSide, menuTriggerLabel, open, onOpenChange, modal, id, ...props }: SplitButtonProps): React$1.JSX.Element;
129
+ displayName: string;
130
+ };
131
+
99
132
  declare const inputVariants: (props?: ({
100
133
  status?: "default" | "error" | "neutral" | "loading" | "prefilled" | null | undefined;
101
134
  } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
@@ -159,7 +192,7 @@ type CountrySelectOption$1 = {
159
192
  internetCountryCode?: string;
160
193
  countryName?: string;
161
194
  };
162
- interface CountryProps {
195
+ interface CountryCommonProps {
163
196
  modal?: boolean;
164
197
  hideSearch?: boolean;
165
198
  loading?: boolean;
@@ -167,19 +200,28 @@ interface CountryProps {
167
200
  onInputValueChange?: (arg: string) => void;
168
201
  disabled?: boolean;
169
202
  placeholder?: string;
170
- value?: SearchableDataType;
171
- optionComponent?: (arg: SearchableDataType) => React.ReactNode;
203
+ optionComponent?: (arg: SearchableDataType) => React$1.ReactNode;
172
204
  className?: string;
173
205
  containerClassName?: string;
174
- onChange: (value: SearchableDataType) => void;
175
206
  status?: CountryPropsStatus;
176
207
  label?: string;
177
208
  showAsterisk?: boolean;
178
- description?: React.ReactNode;
209
+ description?: React$1.ReactNode;
179
210
  error?: string;
180
211
  countryOptions?: CountrySelectOption$1[];
181
212
  }
182
- declare const Country: ({ hideSearch, showAsterisk, label, description, error, countryOptions, ...props }: CountryProps) => React$1.JSX.Element;
213
+ interface CountrySingleSelectProps extends CountryCommonProps {
214
+ multiSelect?: false;
215
+ value?: SearchableDataType;
216
+ onChange: (value: SearchableDataType) => void;
217
+ }
218
+ interface CountryMultiSelectProps extends CountryCommonProps {
219
+ multiSelect: true;
220
+ value?: CountrySelectOption$1[];
221
+ onChange: (value: CountrySelectOption$1[]) => void;
222
+ }
223
+ type CountryProps = CountrySingleSelectProps | CountryMultiSelectProps;
224
+ declare const Country: (props: CountryProps) => React$1.JSX.Element;
183
225
 
184
226
  type SelectPropsStatus = VariantProps<typeof inputContainerVariants>["status"];
185
227
  interface SelectProps {
@@ -939,4 +981,4 @@ declare const TagsInput: ({ value, onChange, options, label, error, placeholder,
939
981
 
940
982
  declare function cn(...inputs: ClassValue[]): string;
941
983
 
942
- export { Accordion, type AccordionItemType, type AccordionProps, AmountAction, Banner, Button, CalendarInput, CopyableLabel, Country, CurrencySymbolMap, DateAction, DebouncedInput, DevBanner, Dialog, Drawer, DrawerClose, type DrawerPropsType, DrawerRoot, FeatureBanner, type FilterFieldProps, type FilterListItem, type FilterListOptions, FilterPopover, FlagComponent, FormLabel, type FormatCurrencyOptions, HasResourcePermission, Input, Loader, LocaleSelector, MultiSelect, type MultiSelectDataType, MultiSelectTrigger, OTPInput, PageDataToolbar, Pagination, PasswordInput, PermissionsContext, PermissionsProvider, PhoneInput, Popover, PopoverContent, PopoverRoot, PopoverTrigger, RadioGroup, RadioGroupItem, type ResourcePermission, type ResourcePermissionProps, type ResourcePermissions, RichTextEditor, ScrollArea, Select, Sidebar, Status, StringAction, Table, type TableBulkRowActionsProps, type TablePaginationProps, Tabs, type TagOption, TagsInput, type TagsInputProps, TextOverflow, type TextOverflowProps, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipRoot, TooltipTrigger, buttonVariants, cn, useFilterStore, useHasPermission, usePermissions };
984
+ export { Accordion, type AccordionItemType, type AccordionProps, AmountAction, Banner, Button, CalendarInput, CopyableLabel, Country, type CountryProps, type CountrySelectOption$1 as CountrySelectOption, CurrencySymbolMap, DateAction, DebouncedInput, DevBanner, Dialog, Drawer, DrawerClose, type DrawerPropsType, DrawerRoot, FeatureBanner, type FilterFieldProps, type FilterListItem, type FilterListOptions, FilterPopover, FlagComponent, FormLabel, type FormatCurrencyOptions, HasResourcePermission, Input, Loader, LocaleSelector, MultiSelect, type MultiSelectDataType, MultiSelectTrigger, OTPInput, PageDataToolbar, Pagination, PasswordInput, PermissionsContext, PermissionsProvider, PhoneInput, Popover, PopoverContent, PopoverRoot, PopoverTrigger, RadioGroup, RadioGroupItem, type ResourcePermission, type ResourcePermissionProps, type ResourcePermissions, RichTextEditor, ScrollArea, Select, Sidebar, SplitButton, type SplitButtonItem, type SplitButtonProps, Status, StringAction, Table, type TableBulkRowActionsProps, type TablePaginationProps, Tabs, type TagOption, TagsInput, type TagsInputProps, TextOverflow, type TextOverflowProps, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipRoot, TooltipTrigger, buttonVariants, cn, useFilterStore, useHasPermission, usePermissions };