@6thbridge/hexa 0.0.47 → 0.0.49

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.
@@ -1,5 +1,5 @@
1
1
   WARN  Issue while reading "/Users/joachim/.nvm/versions/node/v20.17.0/lib/node_modules/npmrc". EISDIR: illegal operation on a directory, read
2
2
 
3
- > @6thbridge/hexa@0.0.43 lint /Users/joachim/Documents/dev/payfusion/payfusion-component-library/packages/6thbridge-hexa
3
+ > @6thbridge/hexa@0.0.48 lint /Users/joachim/Documents/dev/payfusion/payfusion-component-library/packages/6thbridge-hexa
4
4
  > eslint . --max-warnings 0
5
5
 
package/dist/index.d.mts CHANGED
@@ -9,8 +9,8 @@ import * as DialogPrimitive from '@radix-ui/react-dialog';
9
9
  import { DialogCloseProps } from '@radix-ui/react-dialog';
10
10
  import { OTPInputProps as OTPInputProps$1 } from 'react-otp-input';
11
11
  import * as PopoverPrimitive from '@radix-ui/react-popover';
12
- import { RowData, Row, Table as Table$1 } from '@tanstack/react-table';
13
12
  import { Drawer as Drawer$1 } from 'vaul';
13
+ import { RowData, Row, Table as Table$1 } from '@tanstack/react-table';
14
14
  import dayjs from 'dayjs';
15
15
  import { ClassValue } from 'clsx';
16
16
 
@@ -212,6 +212,21 @@ declare const Popover: {
212
212
  displayName: string | undefined;
213
213
  };
214
214
 
215
+ interface BannerTypes {
216
+ type?: "gray" | "info" | "warning" | "success" | "danger";
217
+ }
218
+ interface BannerProps extends BannerTypes {
219
+ title?: React.ReactNode;
220
+ description?: React.ReactNode;
221
+ showIcon?: boolean;
222
+ showCloseButton?: boolean;
223
+ bottomNode?: React.ReactNode;
224
+ sideNode?: React.ReactNode;
225
+ open: boolean;
226
+ onClose?: () => void;
227
+ }
228
+ declare const Banner: ({ type, title, description, open, showCloseButton, bottomNode, sideNode, onClose, showIcon, }: BannerProps) => react_jsx_runtime.JSX.Element | null;
229
+
215
230
  interface CopyableLabelProps {
216
231
  text: string;
217
232
  textToCopy?: string;
@@ -230,6 +245,60 @@ type DebouncedInputProps = {
230
245
  } & Omit<BaseInnerInputProps, "onChange" | "size">;
231
246
  declare const DebouncedInput: ({ value: initialValue, onChange, debounce, addon, ...props }: DebouncedInputProps) => react_jsx_runtime.JSX.Element;
232
247
 
248
+ type Props = {
249
+ environment: "staging" | "sandbox" | "production";
250
+ branch: string;
251
+ version: string;
252
+ deployTime: string;
253
+ onClose: () => void;
254
+ showBanner: boolean;
255
+ initDefault: () => void;
256
+ removeFromStorage: () => void;
257
+ syncLocalStorageToState: () => void;
258
+ };
259
+ declare const DevBanner: (props: Props) => react_jsx_runtime.JSX.Element | null;
260
+
261
+ type DrawerRootType = React$1.ComponentProps<typeof Drawer$1.Root>;
262
+ declare const DrawerRoot: {
263
+ ({ shouldScaleBackground, ...props }: DrawerRootType): react_jsx_runtime.JSX.Element;
264
+ displayName: string;
265
+ };
266
+ declare const DrawerClose: React$1.ForwardRefExoticComponent<DialogCloseProps & React$1.RefAttributes<HTMLButtonElement>>;
267
+ type DrawerPropsType = {
268
+ trigger?: React$1.ReactNode;
269
+ children: React$1.ReactNode;
270
+ title?: React$1.ReactNode;
271
+ description?: React$1.ReactNode;
272
+ footer?: React$1.ReactNode;
273
+ hideCloseButton?: boolean;
274
+ contentClassName?: string;
275
+ headerClassName?: string;
276
+ titleClassName?: string;
277
+ descriptionClassName?: string;
278
+ footerClassName?: string;
279
+ asChild?: boolean;
280
+ onOpenAutoFocus?: (e: Event) => void;
281
+ onCloseAutoFocus?: (e: Event) => void;
282
+ };
283
+ declare const Drawer: ({ trigger, children, open, onOpenChange, hideCloseButton, footer, title, description, contentClassName, headerClassName, titleClassName, descriptionClassName, footerClassName, asChild, onOpenAutoFocus, onCloseAutoFocus, }: Omit<DrawerRootType, "value"> & DrawerPropsType) => react_jsx_runtime.JSX.Element;
284
+
285
+ type LocaleOption = {
286
+ key: string;
287
+ label: string;
288
+ };
289
+ declare const LocaleSelector: ({ locale, onChange, locales, }: {
290
+ locale?: string;
291
+ onChange?: (locale: string) => void;
292
+ locales?: LocaleOption[];
293
+ }) => react_jsx_runtime.JSX.Element;
294
+
295
+ type Variant = "success" | "failed" | "pending" | "abandoned";
296
+ declare const Status: ({ status, variant, className, }: {
297
+ status: string;
298
+ variant: Variant;
299
+ className?: string;
300
+ }) => react_jsx_runtime.JSX.Element;
301
+
233
302
  type PaginationProps = {
234
303
  currentPage?: number;
235
304
  totalPages?: number;
@@ -237,6 +306,14 @@ type PaginationProps = {
237
306
  totalItems?: number;
238
307
  itemsPerPage?: number;
239
308
  };
309
+ /**
310
+ * Pagination component for displaying pagination controls.
311
+ * @param {number} currentPage - The current page number.
312
+ * @param {number} totalPages - The total number of pages.
313
+ * @param {function} onPageChange - Callback function to handle page change.
314
+ * @param {number | undefined} itemsPerPage - The number of items per page.
315
+ */
316
+ declare const Pagination: ({ currentPage, totalPages, onPageChange, itemsPerPage, totalItems, }: PaginationProps) => react_jsx_runtime.JSX.Element;
240
317
 
241
318
  type TableSearchProps = {
242
319
  enabled: boolean;
@@ -270,74 +347,16 @@ type TableProps<T extends RowData> = {
270
347
  };
271
348
  declare const Table: <T extends RowData>({ table, isMobile, onRowClick, id, onRefetch, isRefetching, FilterMenu, ExtraNode, onExport, search, download, isLoading, pagination, }: TableProps<T>) => react_jsx_runtime.JSX.Element;
272
349
 
273
- type Variant = "success" | "failed" | "pending" | "abandoned";
274
- declare const Status: ({ status, variant, className, }: {
275
- status: string;
276
- variant: Variant;
277
- className?: string;
278
- }) => react_jsx_runtime.JSX.Element;
279
-
280
- type Props = {
281
- environment: "staging" | "sandbox" | "production";
282
- branch: string;
283
- version: string;
284
- deployTime: string;
285
- onClose: () => void;
286
- showBanner: boolean;
287
- initDefault: () => void;
288
- removeFromStorage: () => void;
289
- syncLocalStorageToState: () => void;
290
- };
291
- declare const DevBanner: (props: Props) => react_jsx_runtime.JSX.Element | null;
292
-
293
- interface BannerTypes {
294
- type?: "gray" | "info" | "warning" | "success" | "danger";
295
- }
296
- interface BannerProps extends BannerTypes {
297
- title?: React.ReactNode;
298
- description?: React.ReactNode;
299
- showIcon?: boolean;
300
- showCloseButton?: boolean;
301
- bottomNode?: React.ReactNode;
302
- sideNode?: React.ReactNode;
303
- open: boolean;
304
- onClose?: () => void;
305
- }
306
- declare const Banner: ({ type, title, description, open, showCloseButton, bottomNode, sideNode, onClose, showIcon, }: BannerProps) => react_jsx_runtime.JSX.Element | null;
307
-
308
- type LocaleOption = {
309
- key: string;
310
- label: string;
311
- };
312
- declare const LocaleSelector: ({ locale, onChange, locales, }: {
313
- locale?: string;
314
- onChange?: (locale: string) => void;
315
- locales?: LocaleOption[];
316
- }) => react_jsx_runtime.JSX.Element;
317
-
318
- type DrawerRootType = React$1.ComponentProps<typeof Drawer$1.Root>;
319
- declare const DrawerRoot: {
320
- ({ shouldScaleBackground, ...props }: DrawerRootType): react_jsx_runtime.JSX.Element;
321
- displayName: string;
322
- };
323
- declare const DrawerClose: React$1.ForwardRefExoticComponent<DialogCloseProps & React$1.RefAttributes<HTMLButtonElement>>;
324
- type DrawerPropsType = {
325
- trigger?: React$1.ReactNode;
326
- children: React$1.ReactNode;
327
- title?: React$1.ReactNode;
328
- description?: React$1.ReactNode;
329
- footer?: React$1.ReactNode;
330
- hideCloseButton?: boolean;
331
- contentClassName?: string;
332
- headerClassName?: string;
333
- titleClassName?: string;
334
- descriptionClassName?: string;
335
- footerClassName?: string;
336
- asChild?: boolean;
337
- onOpenAutoFocus?: (e: Event) => void;
338
- onCloseAutoFocus?: (e: Event) => void;
350
+ type PageDataToolbarProps = {
351
+ onRefetch?: () => void;
352
+ search?: TableSearchProps;
353
+ FilterMenu?: ReactNode;
354
+ ExtraNode?: ReactNode;
355
+ onExport?: () => void;
356
+ download?: TableDownloadProps;
357
+ isRefetching?: boolean;
339
358
  };
340
- declare const Drawer: ({ trigger, children, open, onOpenChange, hideCloseButton, footer, title, description, contentClassName, headerClassName, titleClassName, descriptionClassName, footerClassName, asChild, onOpenAutoFocus, onCloseAutoFocus, }: Omit<DrawerRootType, "value"> & DrawerPropsType) => react_jsx_runtime.JSX.Element;
359
+ declare const PageDataToolbar: ({ onRefetch, search, FilterMenu, ExtraNode, onExport, download, isRefetching, }: PageDataToolbarProps) => react_jsx_runtime.JSX.Element;
341
360
 
342
361
  declare const CurrencySymbolMap: Record<string, string>;
343
362
  interface FormatCurrencyOptions {
@@ -360,4 +379,4 @@ declare class DateAction {
360
379
 
361
380
  declare function cn(...inputs: ClassValue[]): string;
362
381
 
363
- export { AmountAction, Banner, Button, CopyableLabel, Country, CurrencySymbolMap, DateAction, DebouncedInput, DevBanner, Dialog, Drawer, DrawerClose, type DrawerPropsType, DrawerRoot, FlagComponent, FormLabel, type FormatCurrencyOptions, Input, Loader, LocaleSelector, OTPInput, PasswordInput, PhoneInput, Popover, PopoverContent, PopoverRoot, PopoverTrigger, Select, Status, Table, type TablePaginationProps, Textarea, buttonVariants, cn };
382
+ export { AmountAction, Banner, Button, CopyableLabel, Country, CurrencySymbolMap, DateAction, DebouncedInput, DevBanner, Dialog, Drawer, DrawerClose, type DrawerPropsType, DrawerRoot, FlagComponent, FormLabel, type FormatCurrencyOptions, Input, Loader, LocaleSelector, OTPInput, PageDataToolbar, Pagination, PasswordInput, PhoneInput, Popover, PopoverContent, PopoverRoot, PopoverTrigger, Select, Status, Table, type TablePaginationProps, Textarea, buttonVariants, cn };
package/dist/index.d.ts CHANGED
@@ -9,8 +9,8 @@ import * as DialogPrimitive from '@radix-ui/react-dialog';
9
9
  import { DialogCloseProps } from '@radix-ui/react-dialog';
10
10
  import { OTPInputProps as OTPInputProps$1 } from 'react-otp-input';
11
11
  import * as PopoverPrimitive from '@radix-ui/react-popover';
12
- import { RowData, Row, Table as Table$1 } from '@tanstack/react-table';
13
12
  import { Drawer as Drawer$1 } from 'vaul';
13
+ import { RowData, Row, Table as Table$1 } from '@tanstack/react-table';
14
14
  import dayjs from 'dayjs';
15
15
  import { ClassValue } from 'clsx';
16
16
 
@@ -212,6 +212,21 @@ declare const Popover: {
212
212
  displayName: string | undefined;
213
213
  };
214
214
 
215
+ interface BannerTypes {
216
+ type?: "gray" | "info" | "warning" | "success" | "danger";
217
+ }
218
+ interface BannerProps extends BannerTypes {
219
+ title?: React.ReactNode;
220
+ description?: React.ReactNode;
221
+ showIcon?: boolean;
222
+ showCloseButton?: boolean;
223
+ bottomNode?: React.ReactNode;
224
+ sideNode?: React.ReactNode;
225
+ open: boolean;
226
+ onClose?: () => void;
227
+ }
228
+ declare const Banner: ({ type, title, description, open, showCloseButton, bottomNode, sideNode, onClose, showIcon, }: BannerProps) => react_jsx_runtime.JSX.Element | null;
229
+
215
230
  interface CopyableLabelProps {
216
231
  text: string;
217
232
  textToCopy?: string;
@@ -230,6 +245,60 @@ type DebouncedInputProps = {
230
245
  } & Omit<BaseInnerInputProps, "onChange" | "size">;
231
246
  declare const DebouncedInput: ({ value: initialValue, onChange, debounce, addon, ...props }: DebouncedInputProps) => react_jsx_runtime.JSX.Element;
232
247
 
248
+ type Props = {
249
+ environment: "staging" | "sandbox" | "production";
250
+ branch: string;
251
+ version: string;
252
+ deployTime: string;
253
+ onClose: () => void;
254
+ showBanner: boolean;
255
+ initDefault: () => void;
256
+ removeFromStorage: () => void;
257
+ syncLocalStorageToState: () => void;
258
+ };
259
+ declare const DevBanner: (props: Props) => react_jsx_runtime.JSX.Element | null;
260
+
261
+ type DrawerRootType = React$1.ComponentProps<typeof Drawer$1.Root>;
262
+ declare const DrawerRoot: {
263
+ ({ shouldScaleBackground, ...props }: DrawerRootType): react_jsx_runtime.JSX.Element;
264
+ displayName: string;
265
+ };
266
+ declare const DrawerClose: React$1.ForwardRefExoticComponent<DialogCloseProps & React$1.RefAttributes<HTMLButtonElement>>;
267
+ type DrawerPropsType = {
268
+ trigger?: React$1.ReactNode;
269
+ children: React$1.ReactNode;
270
+ title?: React$1.ReactNode;
271
+ description?: React$1.ReactNode;
272
+ footer?: React$1.ReactNode;
273
+ hideCloseButton?: boolean;
274
+ contentClassName?: string;
275
+ headerClassName?: string;
276
+ titleClassName?: string;
277
+ descriptionClassName?: string;
278
+ footerClassName?: string;
279
+ asChild?: boolean;
280
+ onOpenAutoFocus?: (e: Event) => void;
281
+ onCloseAutoFocus?: (e: Event) => void;
282
+ };
283
+ declare const Drawer: ({ trigger, children, open, onOpenChange, hideCloseButton, footer, title, description, contentClassName, headerClassName, titleClassName, descriptionClassName, footerClassName, asChild, onOpenAutoFocus, onCloseAutoFocus, }: Omit<DrawerRootType, "value"> & DrawerPropsType) => react_jsx_runtime.JSX.Element;
284
+
285
+ type LocaleOption = {
286
+ key: string;
287
+ label: string;
288
+ };
289
+ declare const LocaleSelector: ({ locale, onChange, locales, }: {
290
+ locale?: string;
291
+ onChange?: (locale: string) => void;
292
+ locales?: LocaleOption[];
293
+ }) => react_jsx_runtime.JSX.Element;
294
+
295
+ type Variant = "success" | "failed" | "pending" | "abandoned";
296
+ declare const Status: ({ status, variant, className, }: {
297
+ status: string;
298
+ variant: Variant;
299
+ className?: string;
300
+ }) => react_jsx_runtime.JSX.Element;
301
+
233
302
  type PaginationProps = {
234
303
  currentPage?: number;
235
304
  totalPages?: number;
@@ -237,6 +306,14 @@ type PaginationProps = {
237
306
  totalItems?: number;
238
307
  itemsPerPage?: number;
239
308
  };
309
+ /**
310
+ * Pagination component for displaying pagination controls.
311
+ * @param {number} currentPage - The current page number.
312
+ * @param {number} totalPages - The total number of pages.
313
+ * @param {function} onPageChange - Callback function to handle page change.
314
+ * @param {number | undefined} itemsPerPage - The number of items per page.
315
+ */
316
+ declare const Pagination: ({ currentPage, totalPages, onPageChange, itemsPerPage, totalItems, }: PaginationProps) => react_jsx_runtime.JSX.Element;
240
317
 
241
318
  type TableSearchProps = {
242
319
  enabled: boolean;
@@ -270,74 +347,16 @@ type TableProps<T extends RowData> = {
270
347
  };
271
348
  declare const Table: <T extends RowData>({ table, isMobile, onRowClick, id, onRefetch, isRefetching, FilterMenu, ExtraNode, onExport, search, download, isLoading, pagination, }: TableProps<T>) => react_jsx_runtime.JSX.Element;
272
349
 
273
- type Variant = "success" | "failed" | "pending" | "abandoned";
274
- declare const Status: ({ status, variant, className, }: {
275
- status: string;
276
- variant: Variant;
277
- className?: string;
278
- }) => react_jsx_runtime.JSX.Element;
279
-
280
- type Props = {
281
- environment: "staging" | "sandbox" | "production";
282
- branch: string;
283
- version: string;
284
- deployTime: string;
285
- onClose: () => void;
286
- showBanner: boolean;
287
- initDefault: () => void;
288
- removeFromStorage: () => void;
289
- syncLocalStorageToState: () => void;
290
- };
291
- declare const DevBanner: (props: Props) => react_jsx_runtime.JSX.Element | null;
292
-
293
- interface BannerTypes {
294
- type?: "gray" | "info" | "warning" | "success" | "danger";
295
- }
296
- interface BannerProps extends BannerTypes {
297
- title?: React.ReactNode;
298
- description?: React.ReactNode;
299
- showIcon?: boolean;
300
- showCloseButton?: boolean;
301
- bottomNode?: React.ReactNode;
302
- sideNode?: React.ReactNode;
303
- open: boolean;
304
- onClose?: () => void;
305
- }
306
- declare const Banner: ({ type, title, description, open, showCloseButton, bottomNode, sideNode, onClose, showIcon, }: BannerProps) => react_jsx_runtime.JSX.Element | null;
307
-
308
- type LocaleOption = {
309
- key: string;
310
- label: string;
311
- };
312
- declare const LocaleSelector: ({ locale, onChange, locales, }: {
313
- locale?: string;
314
- onChange?: (locale: string) => void;
315
- locales?: LocaleOption[];
316
- }) => react_jsx_runtime.JSX.Element;
317
-
318
- type DrawerRootType = React$1.ComponentProps<typeof Drawer$1.Root>;
319
- declare const DrawerRoot: {
320
- ({ shouldScaleBackground, ...props }: DrawerRootType): react_jsx_runtime.JSX.Element;
321
- displayName: string;
322
- };
323
- declare const DrawerClose: React$1.ForwardRefExoticComponent<DialogCloseProps & React$1.RefAttributes<HTMLButtonElement>>;
324
- type DrawerPropsType = {
325
- trigger?: React$1.ReactNode;
326
- children: React$1.ReactNode;
327
- title?: React$1.ReactNode;
328
- description?: React$1.ReactNode;
329
- footer?: React$1.ReactNode;
330
- hideCloseButton?: boolean;
331
- contentClassName?: string;
332
- headerClassName?: string;
333
- titleClassName?: string;
334
- descriptionClassName?: string;
335
- footerClassName?: string;
336
- asChild?: boolean;
337
- onOpenAutoFocus?: (e: Event) => void;
338
- onCloseAutoFocus?: (e: Event) => void;
350
+ type PageDataToolbarProps = {
351
+ onRefetch?: () => void;
352
+ search?: TableSearchProps;
353
+ FilterMenu?: ReactNode;
354
+ ExtraNode?: ReactNode;
355
+ onExport?: () => void;
356
+ download?: TableDownloadProps;
357
+ isRefetching?: boolean;
339
358
  };
340
- declare const Drawer: ({ trigger, children, open, onOpenChange, hideCloseButton, footer, title, description, contentClassName, headerClassName, titleClassName, descriptionClassName, footerClassName, asChild, onOpenAutoFocus, onCloseAutoFocus, }: Omit<DrawerRootType, "value"> & DrawerPropsType) => react_jsx_runtime.JSX.Element;
359
+ declare const PageDataToolbar: ({ onRefetch, search, FilterMenu, ExtraNode, onExport, download, isRefetching, }: PageDataToolbarProps) => react_jsx_runtime.JSX.Element;
341
360
 
342
361
  declare const CurrencySymbolMap: Record<string, string>;
343
362
  interface FormatCurrencyOptions {
@@ -360,4 +379,4 @@ declare class DateAction {
360
379
 
361
380
  declare function cn(...inputs: ClassValue[]): string;
362
381
 
363
- export { AmountAction, Banner, Button, CopyableLabel, Country, CurrencySymbolMap, DateAction, DebouncedInput, DevBanner, Dialog, Drawer, DrawerClose, type DrawerPropsType, DrawerRoot, FlagComponent, FormLabel, type FormatCurrencyOptions, Input, Loader, LocaleSelector, OTPInput, PasswordInput, PhoneInput, Popover, PopoverContent, PopoverRoot, PopoverTrigger, Select, Status, Table, type TablePaginationProps, Textarea, buttonVariants, cn };
382
+ export { AmountAction, Banner, Button, CopyableLabel, Country, CurrencySymbolMap, DateAction, DebouncedInput, DevBanner, Dialog, Drawer, DrawerClose, type DrawerPropsType, DrawerRoot, FlagComponent, FormLabel, type FormatCurrencyOptions, Input, Loader, LocaleSelector, OTPInput, PageDataToolbar, Pagination, PasswordInput, PhoneInput, Popover, PopoverContent, PopoverRoot, PopoverTrigger, Select, Status, Table, type TablePaginationProps, Textarea, buttonVariants, cn };