@6thbridge/hexa 0.0.92 → 0.0.94
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 +57 -20
- package/dist/index.d.ts +57 -20
- package/dist/index.js +3 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -8
- package/dist/index.mjs.map +1 -1
- package/dist/output.css +36 -29
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import dayjs from 'dayjs';
|
|
1
2
|
import * as React$1 from 'react';
|
|
2
3
|
import React__default, { DetailedHTMLProps, ButtonHTMLAttributes, ReactNode } from 'react';
|
|
3
4
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
@@ -15,9 +16,36 @@ import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
|
15
16
|
import * as zustand from 'zustand';
|
|
16
17
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
17
18
|
import { Extension } from '@tiptap/react';
|
|
18
|
-
import dayjs from 'dayjs';
|
|
19
19
|
import { ClassValue } from 'clsx';
|
|
20
20
|
|
|
21
|
+
declare const CurrencySymbolMap: Record<string, string>;
|
|
22
|
+
interface FormatCurrencyOptions {
|
|
23
|
+
convertToMajorCurrency?: boolean;
|
|
24
|
+
locale?: string;
|
|
25
|
+
}
|
|
26
|
+
declare class AmountAction {
|
|
27
|
+
static getCurrencyLocaleMap(currency: string): string;
|
|
28
|
+
static koboToNaira(amount: number | string): number;
|
|
29
|
+
static nairaToKobo(amount: number | string): number;
|
|
30
|
+
static getCurrencySymbol(currency: string): string;
|
|
31
|
+
static formatAmountAndCurrency: (currency: string, value: number | string, options: FormatCurrencyOptions) => string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
declare class DateAction {
|
|
35
|
+
static getDateLibrary(): dayjs.Dayjs;
|
|
36
|
+
static formatTimestampToDate(timestamp: number, dateFormat?: string): string;
|
|
37
|
+
static formatDateToTimestamp(date: string): number;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
declare class StringAction {
|
|
41
|
+
static capitalizeFirstWord(string: string): string;
|
|
42
|
+
static capitalizeEachWord(string: string): string;
|
|
43
|
+
static sanitizeString: ({ str, allowedChars, }: {
|
|
44
|
+
str: string;
|
|
45
|
+
allowedChars?: string[];
|
|
46
|
+
}) => string;
|
|
47
|
+
}
|
|
48
|
+
|
|
21
49
|
declare const TooltipProvider: React$1.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
22
50
|
declare const TooltipRoot: React$1.FC<TooltipPrimitive.TooltipProps>;
|
|
23
51
|
declare const TooltipTrigger: React$1.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
@@ -683,7 +711,7 @@ type TabsProps = {
|
|
|
683
711
|
declare function Tabs({ tabs, defaultValue, onChange }: TabsProps): React$1.JSX.Element;
|
|
684
712
|
|
|
685
713
|
declare const featureBannerVariants: (props?: ({
|
|
686
|
-
variant?: "
|
|
714
|
+
variant?: "default" | "success" | "pending" | "danger" | null | undefined;
|
|
687
715
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
688
716
|
|
|
689
717
|
type FeatureBannerActionVariant = "primary" | "outlined";
|
|
@@ -798,25 +826,34 @@ type RichTextEditorProps = {
|
|
|
798
826
|
*/
|
|
799
827
|
declare const RichTextEditor: ({ label, helpText, error, value, onChange, optional, isRequired, extensions, editorClassName, wrapperClassName, controls, extraMenuNodes, placeholder, }: RichTextEditorProps) => React$1.JSX.Element | null;
|
|
800
828
|
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
829
|
+
type TagInputVariant = "success" | "failed" | "pending" | "default";
|
|
830
|
+
type TagOption = {
|
|
831
|
+
value: string;
|
|
832
|
+
label: string;
|
|
833
|
+
variant?: TagInputVariant;
|
|
834
|
+
disabled?: boolean;
|
|
835
|
+
[key: string]: unknown;
|
|
836
|
+
};
|
|
837
|
+
interface TagsInputProps {
|
|
838
|
+
value: TagOption[];
|
|
839
|
+
onChange: (value: TagOption[]) => void;
|
|
840
|
+
options?: TagOption[];
|
|
841
|
+
label?: string;
|
|
842
|
+
error?: string;
|
|
843
|
+
placeholder?: string;
|
|
844
|
+
description?: React$1.ReactNode;
|
|
845
|
+
showAsterisk?: boolean;
|
|
846
|
+
disabled?: boolean;
|
|
847
|
+
isLoading?: boolean;
|
|
848
|
+
allowCreate?: boolean;
|
|
849
|
+
renderTag?: (tag: TagOption) => React$1.ReactNode;
|
|
850
|
+
renderOption?: (option: TagOption, selected: boolean) => React$1.ReactNode;
|
|
851
|
+
validateTag?: (input: string) => boolean;
|
|
852
|
+
onCreate?: (input: string) => TagOption;
|
|
853
|
+
maxTags?: number;
|
|
818
854
|
}
|
|
855
|
+
declare const TagsInput: ({ value, onChange, options, label, error, placeholder, description, showAsterisk, disabled, isLoading, allowCreate, renderTag, renderOption, validateTag, onCreate, maxTags, }: TagsInputProps) => React$1.JSX.Element;
|
|
819
856
|
|
|
820
857
|
declare function cn(...inputs: ClassValue[]): string;
|
|
821
858
|
|
|
822
|
-
export { AmountAction, Banner, Button, CalendarInput, CopyableLabel, Country, CurrencySymbolMap, DateAction, DebouncedInput, DevBanner, Dialog, Drawer, DrawerClose, type DrawerPropsType, DrawerRoot, FeatureBanner, 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, Table, type TableBulkRowActionsProps, type TablePaginationProps, Tabs, TextOverflow, type TextOverflowProps, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipRoot, TooltipTrigger, buttonVariants, cn, useFilterStore, useHasPermission, usePermissions };
|
|
859
|
+
export { AmountAction, Banner, Button, CalendarInput, CopyableLabel, Country, CurrencySymbolMap, DateAction, DebouncedInput, DevBanner, Dialog, Drawer, DrawerClose, type DrawerPropsType, DrawerRoot, FeatureBanner, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import dayjs from 'dayjs';
|
|
1
2
|
import * as React$1 from 'react';
|
|
2
3
|
import React__default, { DetailedHTMLProps, ButtonHTMLAttributes, ReactNode } from 'react';
|
|
3
4
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
@@ -15,9 +16,36 @@ import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
|
15
16
|
import * as zustand from 'zustand';
|
|
16
17
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
17
18
|
import { Extension } from '@tiptap/react';
|
|
18
|
-
import dayjs from 'dayjs';
|
|
19
19
|
import { ClassValue } from 'clsx';
|
|
20
20
|
|
|
21
|
+
declare const CurrencySymbolMap: Record<string, string>;
|
|
22
|
+
interface FormatCurrencyOptions {
|
|
23
|
+
convertToMajorCurrency?: boolean;
|
|
24
|
+
locale?: string;
|
|
25
|
+
}
|
|
26
|
+
declare class AmountAction {
|
|
27
|
+
static getCurrencyLocaleMap(currency: string): string;
|
|
28
|
+
static koboToNaira(amount: number | string): number;
|
|
29
|
+
static nairaToKobo(amount: number | string): number;
|
|
30
|
+
static getCurrencySymbol(currency: string): string;
|
|
31
|
+
static formatAmountAndCurrency: (currency: string, value: number | string, options: FormatCurrencyOptions) => string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
declare class DateAction {
|
|
35
|
+
static getDateLibrary(): dayjs.Dayjs;
|
|
36
|
+
static formatTimestampToDate(timestamp: number, dateFormat?: string): string;
|
|
37
|
+
static formatDateToTimestamp(date: string): number;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
declare class StringAction {
|
|
41
|
+
static capitalizeFirstWord(string: string): string;
|
|
42
|
+
static capitalizeEachWord(string: string): string;
|
|
43
|
+
static sanitizeString: ({ str, allowedChars, }: {
|
|
44
|
+
str: string;
|
|
45
|
+
allowedChars?: string[];
|
|
46
|
+
}) => string;
|
|
47
|
+
}
|
|
48
|
+
|
|
21
49
|
declare const TooltipProvider: React$1.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
22
50
|
declare const TooltipRoot: React$1.FC<TooltipPrimitive.TooltipProps>;
|
|
23
51
|
declare const TooltipTrigger: React$1.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
@@ -683,7 +711,7 @@ type TabsProps = {
|
|
|
683
711
|
declare function Tabs({ tabs, defaultValue, onChange }: TabsProps): React$1.JSX.Element;
|
|
684
712
|
|
|
685
713
|
declare const featureBannerVariants: (props?: ({
|
|
686
|
-
variant?: "
|
|
714
|
+
variant?: "default" | "success" | "pending" | "danger" | null | undefined;
|
|
687
715
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
688
716
|
|
|
689
717
|
type FeatureBannerActionVariant = "primary" | "outlined";
|
|
@@ -798,25 +826,34 @@ type RichTextEditorProps = {
|
|
|
798
826
|
*/
|
|
799
827
|
declare const RichTextEditor: ({ label, helpText, error, value, onChange, optional, isRequired, extensions, editorClassName, wrapperClassName, controls, extraMenuNodes, placeholder, }: RichTextEditorProps) => React$1.JSX.Element | null;
|
|
800
828
|
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
829
|
+
type TagInputVariant = "success" | "failed" | "pending" | "default";
|
|
830
|
+
type TagOption = {
|
|
831
|
+
value: string;
|
|
832
|
+
label: string;
|
|
833
|
+
variant?: TagInputVariant;
|
|
834
|
+
disabled?: boolean;
|
|
835
|
+
[key: string]: unknown;
|
|
836
|
+
};
|
|
837
|
+
interface TagsInputProps {
|
|
838
|
+
value: TagOption[];
|
|
839
|
+
onChange: (value: TagOption[]) => void;
|
|
840
|
+
options?: TagOption[];
|
|
841
|
+
label?: string;
|
|
842
|
+
error?: string;
|
|
843
|
+
placeholder?: string;
|
|
844
|
+
description?: React$1.ReactNode;
|
|
845
|
+
showAsterisk?: boolean;
|
|
846
|
+
disabled?: boolean;
|
|
847
|
+
isLoading?: boolean;
|
|
848
|
+
allowCreate?: boolean;
|
|
849
|
+
renderTag?: (tag: TagOption) => React$1.ReactNode;
|
|
850
|
+
renderOption?: (option: TagOption, selected: boolean) => React$1.ReactNode;
|
|
851
|
+
validateTag?: (input: string) => boolean;
|
|
852
|
+
onCreate?: (input: string) => TagOption;
|
|
853
|
+
maxTags?: number;
|
|
818
854
|
}
|
|
855
|
+
declare const TagsInput: ({ value, onChange, options, label, error, placeholder, description, showAsterisk, disabled, isLoading, allowCreate, renderTag, renderOption, validateTag, onCreate, maxTags, }: TagsInputProps) => React$1.JSX.Element;
|
|
819
856
|
|
|
820
857
|
declare function cn(...inputs: ClassValue[]): string;
|
|
821
858
|
|
|
822
|
-
export { AmountAction, Banner, Button, CalendarInput, CopyableLabel, Country, CurrencySymbolMap, DateAction, DebouncedInput, DevBanner, Dialog, Drawer, DrawerClose, type DrawerPropsType, DrawerRoot, FeatureBanner, 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, Table, type TableBulkRowActionsProps, type TablePaginationProps, Tabs, TextOverflow, type TextOverflowProps, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipRoot, TooltipTrigger, buttonVariants, cn, useFilterStore, useHasPermission, usePermissions };
|
|
859
|
+
export { AmountAction, Banner, Button, CalendarInput, CopyableLabel, Country, CurrencySymbolMap, DateAction, DebouncedInput, DevBanner, Dialog, Drawer, DrawerClose, type DrawerPropsType, DrawerRoot, FeatureBanner, 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 };
|