@6thbridge/hexa 0.0.63 → 0.0.65

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
@@ -13,6 +13,7 @@ import * as PopoverPrimitive from '@radix-ui/react-popover';
13
13
  import { Drawer as Drawer$1 } from 'vaul';
14
14
  import { RowData, Row, Table as Table$1 } from '@tanstack/react-table';
15
15
  import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
16
+ import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
16
17
  import dayjs from 'dayjs';
17
18
  import { ClassValue } from 'clsx';
18
19
 
@@ -159,6 +160,7 @@ interface SelectProps {
159
160
  showAsterisk?: boolean;
160
161
  description?: React.ReactNode;
161
162
  error?: string;
163
+ id?: string;
162
164
  }
163
165
  declare const Select: ({ showAsterisk, label, description, error, hideSearch, status, ...props }: SelectProps) => react_jsx_runtime.JSX.Element;
164
166
 
@@ -231,9 +233,10 @@ type PopoverPropsType = {
231
233
  onOpenAutoFocus?: (e: Event) => void;
232
234
  onCloseAutoFocus?: (e: Event) => void;
233
235
  portal?: boolean;
236
+ id?: string;
234
237
  };
235
238
  declare const Popover: {
236
- ({ trigger, children, open, onOpenChange, contentClassName, asChild, align, side, alignOffset, triggerClassName, sideOffset, onOpenAutoFocus, onCloseAutoFocus, portal, ...props }: React$1.ComponentPropsWithoutRef<typeof PopoverPrimitive.Root> & PopoverPropsType): react_jsx_runtime.JSX.Element;
239
+ ({ trigger, children, open, onOpenChange, contentClassName, asChild, align, side, alignOffset, triggerClassName, sideOffset, onOpenAutoFocus, onCloseAutoFocus, portal, id, ...props }: React$1.ComponentPropsWithoutRef<typeof PopoverPrimitive.Root> & PopoverPropsType): react_jsx_runtime.JSX.Element;
237
240
  displayName: string | undefined;
238
241
  };
239
242
 
@@ -259,6 +262,8 @@ interface CopyableLabelProps {
259
262
  iconsPosition?: "left" | "right";
260
263
  clampText?: boolean;
261
264
  textClassName?: string;
265
+ clampMode?: "truncate" | "wrap";
266
+ isLink?: boolean;
262
267
  }
263
268
  declare const CopyableLabel: React.FC<CopyableLabelProps>;
264
269
 
@@ -283,7 +288,9 @@ type Props = {
283
288
  };
284
289
  declare const DevBanner: (props: Props) => react_jsx_runtime.JSX.Element | null;
285
290
 
286
- type DrawerRootType = React$1.ComponentProps<typeof Drawer$1.Root>;
291
+ type DrawerRootType = React$1.ComponentProps<typeof Drawer$1.Root> & {
292
+ id?: string;
293
+ };
287
294
  declare const DrawerRoot: {
288
295
  ({ shouldScaleBackground, ...props }: DrawerRootType): react_jsx_runtime.JSX.Element;
289
296
  displayName: string;
@@ -306,7 +313,7 @@ type DrawerPropsType = {
306
313
  onOpenAutoFocus?: (e: Event) => void;
307
314
  onCloseAutoFocus?: (e: Event) => void;
308
315
  };
309
- declare const Drawer: ({ trigger, children, open, onOpenChange, hideCloseButton, footer, title, description, contentClassName, headerClassName, titleClassName, descriptionClassName, footerClassName, asChild, onOpenAutoFocus, drawerContentClassName, onCloseAutoFocus, }: Omit<DrawerRootType, "value"> & DrawerPropsType) => react_jsx_runtime.JSX.Element;
316
+ declare const Drawer: ({ trigger, children, open, onOpenChange, hideCloseButton, footer, title, description, contentClassName, headerClassName, titleClassName, descriptionClassName, footerClassName, asChild, onOpenAutoFocus, drawerContentClassName, onCloseAutoFocus, id, }: Omit<DrawerRootType, "value"> & DrawerPropsType) => react_jsx_runtime.JSX.Element;
310
317
 
311
318
  type LocaleOption = {
312
319
  key: string;
@@ -394,6 +401,7 @@ type PaginationProps = {
394
401
  onPageChange?: (page: number) => void;
395
402
  totalItems?: number;
396
403
  itemsPerPage?: number;
404
+ id?: string;
397
405
  };
398
406
  /**
399
407
  * Pagination component for displaying pagination controls.
@@ -402,7 +410,7 @@ type PaginationProps = {
402
410
  * @param {function} onPageChange - Callback function to handle page change.
403
411
  * @param {number | undefined} itemsPerPage - The number of items per page.
404
412
  */
405
- declare const Pagination: ({ currentPage, totalPages, onPageChange, itemsPerPage, totalItems, }: PaginationProps) => react_jsx_runtime.JSX.Element;
413
+ declare const Pagination: ({ currentPage, totalPages, onPageChange, itemsPerPage, totalItems, id, }: PaginationProps) => react_jsx_runtime.JSX.Element;
406
414
 
407
415
  type SelectOption = {
408
416
  value: string;
@@ -430,6 +438,7 @@ type FilterContentProps = {
430
438
  filters: FilterListItem[];
431
439
  values?: Record<string, any>;
432
440
  setAppliedFilters?: (values: Record<string, any>) => void;
441
+ id?: string;
433
442
  };
434
443
  type FilterListOptions = FilterListItem[];
435
444
 
@@ -486,8 +495,9 @@ type PageDataToolbarProps = {
486
495
  isRefetching?: boolean;
487
496
  setAppliedFilters?: (values: Record<string, any>) => void;
488
497
  filterListOptions?: FilterListItem[];
498
+ id?: string;
489
499
  };
490
- declare const PageDataToolbar: ({ onRefetch, search, FilterMenu, ExtraNode, onExport, download, isRefetching, filterListOptions, setAppliedFilters, }: PageDataToolbarProps) => react_jsx_runtime.JSX.Element;
500
+ declare const PageDataToolbar: ({ onRefetch, search, FilterMenu, ExtraNode, onExport, download, isRefetching, filterListOptions, setAppliedFilters, id, }: PageDataToolbarProps) => react_jsx_runtime.JSX.Element;
491
501
 
492
502
  type ResourcePermission = {
493
503
  resource: string;
@@ -522,12 +532,6 @@ declare const useHasPermission: (permission: {
522
532
 
523
533
  declare const HasResourcePermission: ({ permission, children, }: ResourcePermissionProps) => react_jsx_runtime.JSX.Element;
524
534
 
525
- type FilterPopoverProps = FilterContentProps & {
526
- isOpen?: boolean;
527
- trigger?: ReactNode;
528
- };
529
- declare const FilterPopover: ({ filters, setAppliedFilters, isOpen, }: FilterPopoverProps) => react_jsx_runtime.JSX.Element | null;
530
-
531
535
  type CalendarInputProps = {
532
536
  label?: string;
533
537
  helpText?: string | React$1.ReactNode;
@@ -545,6 +549,39 @@ declare const RadioGroupItem: React$1.ForwardRefExoticComponent<Omit<RadioGroupP
545
549
  className?: string;
546
550
  } & React$1.RefAttributes<HTMLButtonElement>>;
547
551
 
552
+ type FilterPopoverProps = FilterContentProps & {
553
+ isOpen?: boolean;
554
+ trigger?: ReactNode;
555
+ id?: string;
556
+ };
557
+ declare const FilterPopover: ({ filters, setAppliedFilters, isOpen, id, }: FilterPopoverProps) => react_jsx_runtime.JSX.Element | null;
558
+
559
+ interface TextOverflowProps extends React__default.HTMLAttributes<HTMLElement> {
560
+ children: React__default.ReactNode;
561
+ mode?: "wrap" | "truncate" | "overflow";
562
+ as?: React__default.ElementType;
563
+ href?: string;
564
+ }
565
+ /**
566
+ * TextOverflow is a React component that controls how text overflows its container.
567
+ *
568
+ * Props:
569
+ * - children: ReactNode - The content to display.
570
+ * - mode: "truncate" | "wrap" | "overflow" (default: "truncate")
571
+ * - "truncate": Single line, truncated with ellipsis.
572
+ * - "wrap": Allows text to wrap onto multiple lines.
573
+ * - "overflow": No special overflow handling.
574
+ * - as: React.ElementType - The HTML element or React component to render as the container (default: "div").
575
+ * - href: string (optional) - If provided and 'as' is an anchor, sets the link target to "_blank".
576
+ * - className: string (optional) - Additional CSS classes for the container.
577
+ * - ...rest: Other HTML attributes passed to the container.
578
+ */
579
+ declare const TextOverflow: ({ children, mode, className, as: Component, ...rest }: TextOverflowProps) => react_jsx_runtime.JSX.Element;
580
+
581
+ declare const ScrollArea: React$1.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
582
+ viewPortClassName?: string;
583
+ } & React$1.RefAttributes<HTMLDivElement>>;
584
+
548
585
  declare const CurrencySymbolMap: Record<string, string>;
549
586
  interface FormatCurrencyOptions {
550
587
  convertToMajorCurrency?: boolean;
@@ -566,4 +603,4 @@ declare class DateAction {
566
603
 
567
604
  declare function cn(...inputs: ClassValue[]): string;
568
605
 
569
- export { AmountAction, Banner, Button, CalendarInput, CopyableLabel, Country, CurrencySymbolMap, DateAction, DebouncedInput, DevBanner, Dialog, Drawer, DrawerClose, type DrawerPropsType, DrawerRoot, type FilterListItem, type FilterListOptions, FilterPopover, FlagComponent, FormLabel, type FormatCurrencyOptions, HasResourcePermission, Input, Loader, LocaleSelector, OTPInput, PageDataToolbar, Pagination, PasswordInput, PermissionsContext, PermissionsProvider, PhoneInput, Popover, PopoverContent, PopoverRoot, PopoverTrigger, RadioGroup, RadioGroupItem, type ResourcePermission, type ResourcePermissionProps, type ResourcePermissions, Select, Sidebar, Status, Table, type TablePaginationProps, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipRoot, TooltipTrigger, buttonVariants, cn, useHasPermission, usePermissions };
606
+ export { AmountAction, Banner, Button, CalendarInput, CopyableLabel, Country, CurrencySymbolMap, DateAction, DebouncedInput, DevBanner, Dialog, Drawer, DrawerClose, type DrawerPropsType, DrawerRoot, type FilterListItem, type FilterListOptions, FilterPopover, FlagComponent, FormLabel, type FormatCurrencyOptions, HasResourcePermission, Input, Loader, LocaleSelector, OTPInput, PageDataToolbar, Pagination, PasswordInput, PermissionsContext, PermissionsProvider, PhoneInput, Popover, PopoverContent, PopoverRoot, PopoverTrigger, RadioGroup, RadioGroupItem, type ResourcePermission, type ResourcePermissionProps, type ResourcePermissions, ScrollArea, Select, Sidebar, Status, Table, type TablePaginationProps, TextOverflow, type TextOverflowProps, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipRoot, TooltipTrigger, buttonVariants, cn, useHasPermission, usePermissions };
package/dist/index.d.ts CHANGED
@@ -13,6 +13,7 @@ import * as PopoverPrimitive from '@radix-ui/react-popover';
13
13
  import { Drawer as Drawer$1 } from 'vaul';
14
14
  import { RowData, Row, Table as Table$1 } from '@tanstack/react-table';
15
15
  import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
16
+ import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
16
17
  import dayjs from 'dayjs';
17
18
  import { ClassValue } from 'clsx';
18
19
 
@@ -159,6 +160,7 @@ interface SelectProps {
159
160
  showAsterisk?: boolean;
160
161
  description?: React.ReactNode;
161
162
  error?: string;
163
+ id?: string;
162
164
  }
163
165
  declare const Select: ({ showAsterisk, label, description, error, hideSearch, status, ...props }: SelectProps) => react_jsx_runtime.JSX.Element;
164
166
 
@@ -231,9 +233,10 @@ type PopoverPropsType = {
231
233
  onOpenAutoFocus?: (e: Event) => void;
232
234
  onCloseAutoFocus?: (e: Event) => void;
233
235
  portal?: boolean;
236
+ id?: string;
234
237
  };
235
238
  declare const Popover: {
236
- ({ trigger, children, open, onOpenChange, contentClassName, asChild, align, side, alignOffset, triggerClassName, sideOffset, onOpenAutoFocus, onCloseAutoFocus, portal, ...props }: React$1.ComponentPropsWithoutRef<typeof PopoverPrimitive.Root> & PopoverPropsType): react_jsx_runtime.JSX.Element;
239
+ ({ trigger, children, open, onOpenChange, contentClassName, asChild, align, side, alignOffset, triggerClassName, sideOffset, onOpenAutoFocus, onCloseAutoFocus, portal, id, ...props }: React$1.ComponentPropsWithoutRef<typeof PopoverPrimitive.Root> & PopoverPropsType): react_jsx_runtime.JSX.Element;
237
240
  displayName: string | undefined;
238
241
  };
239
242
 
@@ -259,6 +262,8 @@ interface CopyableLabelProps {
259
262
  iconsPosition?: "left" | "right";
260
263
  clampText?: boolean;
261
264
  textClassName?: string;
265
+ clampMode?: "truncate" | "wrap";
266
+ isLink?: boolean;
262
267
  }
263
268
  declare const CopyableLabel: React.FC<CopyableLabelProps>;
264
269
 
@@ -283,7 +288,9 @@ type Props = {
283
288
  };
284
289
  declare const DevBanner: (props: Props) => react_jsx_runtime.JSX.Element | null;
285
290
 
286
- type DrawerRootType = React$1.ComponentProps<typeof Drawer$1.Root>;
291
+ type DrawerRootType = React$1.ComponentProps<typeof Drawer$1.Root> & {
292
+ id?: string;
293
+ };
287
294
  declare const DrawerRoot: {
288
295
  ({ shouldScaleBackground, ...props }: DrawerRootType): react_jsx_runtime.JSX.Element;
289
296
  displayName: string;
@@ -306,7 +313,7 @@ type DrawerPropsType = {
306
313
  onOpenAutoFocus?: (e: Event) => void;
307
314
  onCloseAutoFocus?: (e: Event) => void;
308
315
  };
309
- declare const Drawer: ({ trigger, children, open, onOpenChange, hideCloseButton, footer, title, description, contentClassName, headerClassName, titleClassName, descriptionClassName, footerClassName, asChild, onOpenAutoFocus, drawerContentClassName, onCloseAutoFocus, }: Omit<DrawerRootType, "value"> & DrawerPropsType) => react_jsx_runtime.JSX.Element;
316
+ declare const Drawer: ({ trigger, children, open, onOpenChange, hideCloseButton, footer, title, description, contentClassName, headerClassName, titleClassName, descriptionClassName, footerClassName, asChild, onOpenAutoFocus, drawerContentClassName, onCloseAutoFocus, id, }: Omit<DrawerRootType, "value"> & DrawerPropsType) => react_jsx_runtime.JSX.Element;
310
317
 
311
318
  type LocaleOption = {
312
319
  key: string;
@@ -394,6 +401,7 @@ type PaginationProps = {
394
401
  onPageChange?: (page: number) => void;
395
402
  totalItems?: number;
396
403
  itemsPerPage?: number;
404
+ id?: string;
397
405
  };
398
406
  /**
399
407
  * Pagination component for displaying pagination controls.
@@ -402,7 +410,7 @@ type PaginationProps = {
402
410
  * @param {function} onPageChange - Callback function to handle page change.
403
411
  * @param {number | undefined} itemsPerPage - The number of items per page.
404
412
  */
405
- declare const Pagination: ({ currentPage, totalPages, onPageChange, itemsPerPage, totalItems, }: PaginationProps) => react_jsx_runtime.JSX.Element;
413
+ declare const Pagination: ({ currentPage, totalPages, onPageChange, itemsPerPage, totalItems, id, }: PaginationProps) => react_jsx_runtime.JSX.Element;
406
414
 
407
415
  type SelectOption = {
408
416
  value: string;
@@ -430,6 +438,7 @@ type FilterContentProps = {
430
438
  filters: FilterListItem[];
431
439
  values?: Record<string, any>;
432
440
  setAppliedFilters?: (values: Record<string, any>) => void;
441
+ id?: string;
433
442
  };
434
443
  type FilterListOptions = FilterListItem[];
435
444
 
@@ -486,8 +495,9 @@ type PageDataToolbarProps = {
486
495
  isRefetching?: boolean;
487
496
  setAppliedFilters?: (values: Record<string, any>) => void;
488
497
  filterListOptions?: FilterListItem[];
498
+ id?: string;
489
499
  };
490
- declare const PageDataToolbar: ({ onRefetch, search, FilterMenu, ExtraNode, onExport, download, isRefetching, filterListOptions, setAppliedFilters, }: PageDataToolbarProps) => react_jsx_runtime.JSX.Element;
500
+ declare const PageDataToolbar: ({ onRefetch, search, FilterMenu, ExtraNode, onExport, download, isRefetching, filterListOptions, setAppliedFilters, id, }: PageDataToolbarProps) => react_jsx_runtime.JSX.Element;
491
501
 
492
502
  type ResourcePermission = {
493
503
  resource: string;
@@ -522,12 +532,6 @@ declare const useHasPermission: (permission: {
522
532
 
523
533
  declare const HasResourcePermission: ({ permission, children, }: ResourcePermissionProps) => react_jsx_runtime.JSX.Element;
524
534
 
525
- type FilterPopoverProps = FilterContentProps & {
526
- isOpen?: boolean;
527
- trigger?: ReactNode;
528
- };
529
- declare const FilterPopover: ({ filters, setAppliedFilters, isOpen, }: FilterPopoverProps) => react_jsx_runtime.JSX.Element | null;
530
-
531
535
  type CalendarInputProps = {
532
536
  label?: string;
533
537
  helpText?: string | React$1.ReactNode;
@@ -545,6 +549,39 @@ declare const RadioGroupItem: React$1.ForwardRefExoticComponent<Omit<RadioGroupP
545
549
  className?: string;
546
550
  } & React$1.RefAttributes<HTMLButtonElement>>;
547
551
 
552
+ type FilterPopoverProps = FilterContentProps & {
553
+ isOpen?: boolean;
554
+ trigger?: ReactNode;
555
+ id?: string;
556
+ };
557
+ declare const FilterPopover: ({ filters, setAppliedFilters, isOpen, id, }: FilterPopoverProps) => react_jsx_runtime.JSX.Element | null;
558
+
559
+ interface TextOverflowProps extends React__default.HTMLAttributes<HTMLElement> {
560
+ children: React__default.ReactNode;
561
+ mode?: "wrap" | "truncate" | "overflow";
562
+ as?: React__default.ElementType;
563
+ href?: string;
564
+ }
565
+ /**
566
+ * TextOverflow is a React component that controls how text overflows its container.
567
+ *
568
+ * Props:
569
+ * - children: ReactNode - The content to display.
570
+ * - mode: "truncate" | "wrap" | "overflow" (default: "truncate")
571
+ * - "truncate": Single line, truncated with ellipsis.
572
+ * - "wrap": Allows text to wrap onto multiple lines.
573
+ * - "overflow": No special overflow handling.
574
+ * - as: React.ElementType - The HTML element or React component to render as the container (default: "div").
575
+ * - href: string (optional) - If provided and 'as' is an anchor, sets the link target to "_blank".
576
+ * - className: string (optional) - Additional CSS classes for the container.
577
+ * - ...rest: Other HTML attributes passed to the container.
578
+ */
579
+ declare const TextOverflow: ({ children, mode, className, as: Component, ...rest }: TextOverflowProps) => react_jsx_runtime.JSX.Element;
580
+
581
+ declare const ScrollArea: React$1.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
582
+ viewPortClassName?: string;
583
+ } & React$1.RefAttributes<HTMLDivElement>>;
584
+
548
585
  declare const CurrencySymbolMap: Record<string, string>;
549
586
  interface FormatCurrencyOptions {
550
587
  convertToMajorCurrency?: boolean;
@@ -566,4 +603,4 @@ declare class DateAction {
566
603
 
567
604
  declare function cn(...inputs: ClassValue[]): string;
568
605
 
569
- export { AmountAction, Banner, Button, CalendarInput, CopyableLabel, Country, CurrencySymbolMap, DateAction, DebouncedInput, DevBanner, Dialog, Drawer, DrawerClose, type DrawerPropsType, DrawerRoot, type FilterListItem, type FilterListOptions, FilterPopover, FlagComponent, FormLabel, type FormatCurrencyOptions, HasResourcePermission, Input, Loader, LocaleSelector, OTPInput, PageDataToolbar, Pagination, PasswordInput, PermissionsContext, PermissionsProvider, PhoneInput, Popover, PopoverContent, PopoverRoot, PopoverTrigger, RadioGroup, RadioGroupItem, type ResourcePermission, type ResourcePermissionProps, type ResourcePermissions, Select, Sidebar, Status, Table, type TablePaginationProps, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipRoot, TooltipTrigger, buttonVariants, cn, useHasPermission, usePermissions };
606
+ export { AmountAction, Banner, Button, CalendarInput, CopyableLabel, Country, CurrencySymbolMap, DateAction, DebouncedInput, DevBanner, Dialog, Drawer, DrawerClose, type DrawerPropsType, DrawerRoot, type FilterListItem, type FilterListOptions, FilterPopover, FlagComponent, FormLabel, type FormatCurrencyOptions, HasResourcePermission, Input, Loader, LocaleSelector, OTPInput, PageDataToolbar, Pagination, PasswordInput, PermissionsContext, PermissionsProvider, PhoneInput, Popover, PopoverContent, PopoverRoot, PopoverTrigger, RadioGroup, RadioGroupItem, type ResourcePermission, type ResourcePermissionProps, type ResourcePermissions, ScrollArea, Select, Sidebar, Status, Table, type TablePaginationProps, TextOverflow, type TextOverflowProps, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipRoot, TooltipTrigger, buttonVariants, cn, useHasPermission, usePermissions };