@6thbridge/hexa 0.0.101 → 0.0.105
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 +10 -15
- package/dist/index.d.ts +10 -15
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -3
- package/dist/index.mjs.map +1 -1
- package/dist/output.css +9 -5
- package/package.json +3 -3
- package/tsup.config.ts +11 -0
package/dist/index.d.mts
CHANGED
|
@@ -419,8 +419,11 @@ type DrawerPropsType = {
|
|
|
419
419
|
onOpenAutoFocus?: (e: Event) => void;
|
|
420
420
|
onCloseAutoFocus?: (e: Event) => void;
|
|
421
421
|
modal?: boolean;
|
|
422
|
+
size?: "default" | "full";
|
|
423
|
+
usePortal?: boolean;
|
|
424
|
+
showOverlay?: boolean;
|
|
422
425
|
};
|
|
423
|
-
declare const Drawer: ({ trigger, children, open, onOpenChange, hideCloseButton, footer, title, description, contentClassName, headerClassName, titleClassName, descriptionClassName, footerClassName, asChild, onOpenAutoFocus, drawerContentClassName, onCloseAutoFocus, id, modal, }: Omit<DrawerRootType, "value"> & DrawerPropsType) => React$1.JSX.Element;
|
|
426
|
+
declare const Drawer: ({ trigger, children, open, onOpenChange, hideCloseButton, footer, title, description, contentClassName, headerClassName, titleClassName, descriptionClassName, footerClassName, asChild, onOpenAutoFocus, drawerContentClassName, onCloseAutoFocus, id, modal, size, usePortal, showOverlay, }: Omit<DrawerRootType, "value"> & DrawerPropsType) => React$1.JSX.Element;
|
|
424
427
|
|
|
425
428
|
type LocaleOption = {
|
|
426
429
|
key: string;
|
|
@@ -455,11 +458,9 @@ type ResourcePermission = {
|
|
|
455
458
|
action: string;
|
|
456
459
|
};
|
|
457
460
|
type ResourcePermissions = ResourcePermission[];
|
|
461
|
+
type ResourcePermissionInput = ResourcePermission | ResourcePermission[];
|
|
458
462
|
type ResourcePermissionProps = {
|
|
459
|
-
permission?:
|
|
460
|
-
resource?: string;
|
|
461
|
-
action?: string;
|
|
462
|
-
};
|
|
463
|
+
permission?: ResourcePermissionInput;
|
|
463
464
|
children: ReactNode;
|
|
464
465
|
};
|
|
465
466
|
|
|
@@ -469,7 +470,7 @@ type SingleLinkType = {
|
|
|
469
470
|
isHidden?: boolean;
|
|
470
471
|
icon?: ReactNode;
|
|
471
472
|
badge?: ReactNode;
|
|
472
|
-
permission?:
|
|
473
|
+
permission?: ResourcePermissionInput;
|
|
473
474
|
key?: string;
|
|
474
475
|
id: string;
|
|
475
476
|
};
|
|
@@ -700,15 +701,9 @@ declare const PermissionsProvider: ({ permissions, children, }: {
|
|
|
700
701
|
}) => React$1.JSX.Element;
|
|
701
702
|
|
|
702
703
|
declare const usePermissions: () => ResourcePermissions | undefined;
|
|
703
|
-
declare const useHasPermission: (permission
|
|
704
|
-
resource?: string;
|
|
705
|
-
action?: string;
|
|
706
|
-
}) => {
|
|
704
|
+
declare const useHasPermission: (permission?: ResourcePermissionInput) => {
|
|
707
705
|
hasPermission: boolean;
|
|
708
|
-
validatePermission: (
|
|
709
|
-
resource?: string;
|
|
710
|
-
action?: string;
|
|
711
|
-
}) => boolean;
|
|
706
|
+
validatePermission: (permissionToCheck?: ResourcePermissionInput) => boolean;
|
|
712
707
|
};
|
|
713
708
|
|
|
714
709
|
declare const HasResourcePermission: ({ permission, children, }: ResourcePermissionProps) => React$1.JSX.Element;
|
|
@@ -981,4 +976,4 @@ declare const TagsInput: ({ value, onChange, options, label, error, placeholder,
|
|
|
981
976
|
|
|
982
977
|
declare function cn(...inputs: ClassValue[]): string;
|
|
983
978
|
|
|
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 };
|
|
979
|
+
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 ResourcePermissionInput, 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
|
@@ -419,8 +419,11 @@ type DrawerPropsType = {
|
|
|
419
419
|
onOpenAutoFocus?: (e: Event) => void;
|
|
420
420
|
onCloseAutoFocus?: (e: Event) => void;
|
|
421
421
|
modal?: boolean;
|
|
422
|
+
size?: "default" | "full";
|
|
423
|
+
usePortal?: boolean;
|
|
424
|
+
showOverlay?: boolean;
|
|
422
425
|
};
|
|
423
|
-
declare const Drawer: ({ trigger, children, open, onOpenChange, hideCloseButton, footer, title, description, contentClassName, headerClassName, titleClassName, descriptionClassName, footerClassName, asChild, onOpenAutoFocus, drawerContentClassName, onCloseAutoFocus, id, modal, }: Omit<DrawerRootType, "value"> & DrawerPropsType) => React$1.JSX.Element;
|
|
426
|
+
declare const Drawer: ({ trigger, children, open, onOpenChange, hideCloseButton, footer, title, description, contentClassName, headerClassName, titleClassName, descriptionClassName, footerClassName, asChild, onOpenAutoFocus, drawerContentClassName, onCloseAutoFocus, id, modal, size, usePortal, showOverlay, }: Omit<DrawerRootType, "value"> & DrawerPropsType) => React$1.JSX.Element;
|
|
424
427
|
|
|
425
428
|
type LocaleOption = {
|
|
426
429
|
key: string;
|
|
@@ -455,11 +458,9 @@ type ResourcePermission = {
|
|
|
455
458
|
action: string;
|
|
456
459
|
};
|
|
457
460
|
type ResourcePermissions = ResourcePermission[];
|
|
461
|
+
type ResourcePermissionInput = ResourcePermission | ResourcePermission[];
|
|
458
462
|
type ResourcePermissionProps = {
|
|
459
|
-
permission?:
|
|
460
|
-
resource?: string;
|
|
461
|
-
action?: string;
|
|
462
|
-
};
|
|
463
|
+
permission?: ResourcePermissionInput;
|
|
463
464
|
children: ReactNode;
|
|
464
465
|
};
|
|
465
466
|
|
|
@@ -469,7 +470,7 @@ type SingleLinkType = {
|
|
|
469
470
|
isHidden?: boolean;
|
|
470
471
|
icon?: ReactNode;
|
|
471
472
|
badge?: ReactNode;
|
|
472
|
-
permission?:
|
|
473
|
+
permission?: ResourcePermissionInput;
|
|
473
474
|
key?: string;
|
|
474
475
|
id: string;
|
|
475
476
|
};
|
|
@@ -700,15 +701,9 @@ declare const PermissionsProvider: ({ permissions, children, }: {
|
|
|
700
701
|
}) => React$1.JSX.Element;
|
|
701
702
|
|
|
702
703
|
declare const usePermissions: () => ResourcePermissions | undefined;
|
|
703
|
-
declare const useHasPermission: (permission
|
|
704
|
-
resource?: string;
|
|
705
|
-
action?: string;
|
|
706
|
-
}) => {
|
|
704
|
+
declare const useHasPermission: (permission?: ResourcePermissionInput) => {
|
|
707
705
|
hasPermission: boolean;
|
|
708
|
-
validatePermission: (
|
|
709
|
-
resource?: string;
|
|
710
|
-
action?: string;
|
|
711
|
-
}) => boolean;
|
|
706
|
+
validatePermission: (permissionToCheck?: ResourcePermissionInput) => boolean;
|
|
712
707
|
};
|
|
713
708
|
|
|
714
709
|
declare const HasResourcePermission: ({ permission, children, }: ResourcePermissionProps) => React$1.JSX.Element;
|
|
@@ -981,4 +976,4 @@ declare const TagsInput: ({ value, onChange, options, label, error, placeholder,
|
|
|
981
976
|
|
|
982
977
|
declare function cn(...inputs: ClassValue[]): string;
|
|
983
978
|
|
|
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 };
|
|
979
|
+
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 ResourcePermissionInput, 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 };
|