azero_resources 0.0.1
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/README.md +1 -0
- package/dist/azero-resources.css +2 -0
- package/dist/azero-resources.js +4614 -0
- package/dist/azero-resources.umd.cjs +6 -0
- package/dist/jest.config.d.ts +14 -0
- package/dist/src/ToastServices.d.ts +9 -0
- package/dist/src/components/Badge/Badge.d.ts +14 -0
- package/dist/src/components/Badge/index.d.ts +1 -0
- package/dist/src/components/Badge/index.stories.d.ts +29 -0
- package/dist/src/components/Box/Box.d.ts +17 -0
- package/dist/src/components/Box/index.d.ts +2 -0
- package/dist/src/components/Box/index.stories.d.ts +25 -0
- package/dist/src/components/Button/ButtonIcon/icons.d.ts +2 -0
- package/dist/src/components/Button/ButtonIcon/index.d.ts +1 -0
- package/dist/src/components/Button/DefaultButton/DefaultButton.d.ts +22 -0
- package/dist/src/components/Button/DefaultButton/index.d.ts +1 -0
- package/dist/src/components/Button/DefaultButton/index.stories.d.ts +18 -0
- package/dist/src/components/Button/GroupIconButton/GroupIconButton.d.ts +14 -0
- package/dist/src/components/Button/GroupIconButton/index.d.ts +1 -0
- package/dist/src/components/Button/GroupIconButton/index.stories.d.ts +9 -0
- package/dist/src/components/Button/SingleIconButton/SingleIconButton.d.ts +17 -0
- package/dist/src/components/Button/SingleIconButton/index.d.ts +1 -0
- package/dist/src/components/Button/SingleIconButton/index.stories.d.ts +7 -0
- package/dist/src/components/Button/index.d.ts +4 -0
- package/dist/src/components/Calendar/Calendar.d.ts +18 -0
- package/dist/src/components/Calendar/index.d.ts +1 -0
- package/dist/src/components/Calendar/index.stories.d.ts +9 -0
- package/dist/src/components/Calendar/utils.d.ts +13 -0
- package/dist/src/components/Divider/Divider.d.ts +15 -0
- package/dist/src/components/Divider/index.d.ts +2 -0
- package/dist/src/components/Divider/index.stories.d.ts +29 -0
- package/dist/src/components/ImagePopOver/ImagePopOver.d.ts +18 -0
- package/dist/src/components/ImagePopOver/index.d.ts +2 -0
- package/dist/src/components/ImagePopOver/index.stories.d.ts +17 -0
- package/dist/src/components/Input/Input.d.ts +21 -0
- package/dist/src/components/Input/index.d.ts +1 -0
- package/dist/src/components/Input/index.stories.d.ts +29 -0
- package/dist/src/components/InputOTP/InputOTP.d.ts +23 -0
- package/dist/src/components/InputOTP/index.d.ts +1 -0
- package/dist/src/components/InputOTP/index.stories.d.ts +21 -0
- package/dist/src/components/Pagination/Pagination.d.ts +25 -0
- package/dist/src/components/Pagination/index.d.ts +1 -0
- package/dist/src/components/Pagination/index.stories.d.ts +24 -0
- package/dist/src/components/ProfileCard/ProfileCard.d.ts +17 -0
- package/dist/src/components/ProfileCard/index.d.ts +1 -0
- package/dist/src/components/ProfileCard/index.stories.d.ts +25 -0
- package/dist/src/components/Select/Select.d.ts +54 -0
- package/dist/src/components/Select/index.d.ts +1 -0
- package/dist/src/components/Select/index.stories.d.ts +24 -0
- package/dist/src/components/Slider/Slider.d.ts +13 -0
- package/dist/src/components/Slider/index.d.ts +1 -0
- package/dist/src/components/Slider/index.stories.d.ts +17 -0
- package/dist/src/components/Switch/Switch.d.ts +14 -0
- package/dist/src/components/Switch/index.d.ts +1 -0
- package/dist/src/components/Switch/index.stories.d.ts +25 -0
- package/dist/src/components/Table/Table.d.ts +56 -0
- package/dist/src/components/Table/index.d.ts +2 -0
- package/dist/src/components/Table/index.stories.d.ts +45 -0
- package/dist/src/components/Tabs/Tabs.d.ts +34 -0
- package/dist/src/components/Tabs/index.d.ts +1 -0
- package/dist/src/components/Tabs/index.stories.d.ts +29 -0
- package/dist/src/components/Textarea/Textarea.d.ts +12 -0
- package/dist/src/components/Textarea/index.d.ts +1 -0
- package/dist/src/components/Textarea/index.stories.d.ts +29 -0
- package/dist/src/components/Toast/Toast.d.ts +13 -0
- package/dist/src/components/Toast/index.d.ts +1 -0
- package/dist/src/components/Toast/index.stories.d.ts +25 -0
- package/dist/src/components/Tooltip/Tooltip.d.ts +30 -0
- package/dist/src/components/Tooltip/index.d.ts +1 -0
- package/dist/src/components/Tooltip/index.stories.d.ts +21 -0
- package/dist/src/components/Upload/FileIcons.d.ts +6 -0
- package/dist/src/components/Upload/Upload.d.ts +38 -0
- package/dist/src/components/Upload/index.d.ts +2 -0
- package/dist/src/components/Upload/index.stories.d.ts +48 -0
- package/dist/src/components/index.d.ts +20 -0
- package/dist/src/components/types.d.ts +106 -0
- package/dist/src/index.d.ts +5 -0
- package/dist/src/utils/Constant.d.ts +2 -0
- package/dist/src/utils/colorThemes.d.ts +43 -0
- package/dist/src/utils/index.d.ts +3 -0
- package/dist/src/utils/style.d.ts +21 -0
- package/dist/src/utils/types/index.d.ts +30 -0
- package/package.json +91 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Toast';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Toast } from './Toast';
|
|
3
|
+
declare const meta: Meta<typeof Toast>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
/**
|
|
7
|
+
* Default Toast with title, description timestamp, and action button.
|
|
8
|
+
*/
|
|
9
|
+
export declare const Default: Story;
|
|
10
|
+
/**
|
|
11
|
+
* Simple message toast without title or action.
|
|
12
|
+
*/
|
|
13
|
+
export declare const Simple: Story;
|
|
14
|
+
/**
|
|
15
|
+
* Toast with alert title and description.
|
|
16
|
+
*/
|
|
17
|
+
export declare const WithTitle: Story;
|
|
18
|
+
/**
|
|
19
|
+
* Toast with alert title, description, and action button.
|
|
20
|
+
*/
|
|
21
|
+
export declare const WithAction: Story;
|
|
22
|
+
/**
|
|
23
|
+
* Destructive alert toast with action button.
|
|
24
|
+
*/
|
|
25
|
+
export declare const Destructive: Story;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { default as React, ComponentProps } from 'react';
|
|
2
|
+
export type TooltipSide = "top" | "bottom" | "left" | "right";
|
|
3
|
+
export type TooltipAlign = "start" | "center" | "end";
|
|
4
|
+
export interface TooltipProviderProps {
|
|
5
|
+
delayDuration?: number;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare const TooltipProvider: React.FC<TooltipProviderProps>;
|
|
9
|
+
export interface TooltipProps {
|
|
10
|
+
open?: boolean;
|
|
11
|
+
defaultOpen?: boolean;
|
|
12
|
+
onOpenChange?: (open: boolean) => void;
|
|
13
|
+
delayDuration?: number;
|
|
14
|
+
side?: TooltipSide;
|
|
15
|
+
align?: TooltipAlign;
|
|
16
|
+
sideOffset?: number;
|
|
17
|
+
children?: React.ReactNode;
|
|
18
|
+
content?: React.ReactNode;
|
|
19
|
+
}
|
|
20
|
+
export declare const Tooltip: React.FC<TooltipProps>;
|
|
21
|
+
export interface TooltipTriggerProps extends ComponentProps<"div"> {
|
|
22
|
+
asChild?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare const TooltipTrigger: React.ForwardRefExoticComponent<Omit<TooltipTriggerProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
+
export interface TooltipContentProps extends ComponentProps<"div"> {
|
|
26
|
+
side?: TooltipSide;
|
|
27
|
+
align?: TooltipAlign;
|
|
28
|
+
sideOffset?: number;
|
|
29
|
+
}
|
|
30
|
+
export declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Tooltip';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Tooltip } from './Tooltip';
|
|
3
|
+
declare const meta: Meta<typeof Tooltip>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
/**
|
|
7
|
+
* Standard button with hover tooltip.
|
|
8
|
+
*/
|
|
9
|
+
export declare const Default: Story;
|
|
10
|
+
/**
|
|
11
|
+
* Vertical icon navigation toolbar with right-side tooltips.
|
|
12
|
+
*/
|
|
13
|
+
export declare const SidebarIconNav: Story;
|
|
14
|
+
/**
|
|
15
|
+
* Tooltip positioning on all 4 sides (Top, Right, Bottom, Left).
|
|
16
|
+
*/
|
|
17
|
+
export declare const FourDirections: Story;
|
|
18
|
+
/**
|
|
19
|
+
* Visual design system overview matching the user's reference diagram.
|
|
20
|
+
*/
|
|
21
|
+
export declare const DesignSystemOverview: Story;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { default as React, ComponentProps } from 'react';
|
|
2
|
+
export { FileIcon } from './FileIcons';
|
|
3
|
+
export type { FileIconProps } from './FileIcons';
|
|
4
|
+
export interface UploadPictureProps extends Omit<ComponentProps<"div">, "onChange"> {
|
|
5
|
+
value?: string;
|
|
6
|
+
defaultValue?: string;
|
|
7
|
+
onChange?: (file: File | null, url?: string) => void;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
shape?: "square" | "circle";
|
|
10
|
+
size?: "sm" | "default" | "lg";
|
|
11
|
+
progress?: number;
|
|
12
|
+
errorMessage?: string;
|
|
13
|
+
label?: string;
|
|
14
|
+
onCancel?: () => void;
|
|
15
|
+
}
|
|
16
|
+
export declare const UploadPicture: React.ForwardRefExoticComponent<Omit<UploadPictureProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
export interface UploadFileItem {
|
|
18
|
+
id?: string;
|
|
19
|
+
name: string;
|
|
20
|
+
size?: string;
|
|
21
|
+
type?: string;
|
|
22
|
+
progress?: number;
|
|
23
|
+
error?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface UploadFileProps extends ComponentProps<"div"> {
|
|
26
|
+
file?: UploadFileItem;
|
|
27
|
+
onRemove?: () => void;
|
|
28
|
+
onRetry?: () => void;
|
|
29
|
+
onCancel?: () => void;
|
|
30
|
+
}
|
|
31
|
+
export declare const UploadFile: React.FC<UploadFileProps>;
|
|
32
|
+
export interface UploadDropzoneProps extends ComponentProps<"div"> {
|
|
33
|
+
onFilesSelected?: (files: FileList) => void;
|
|
34
|
+
accept?: string;
|
|
35
|
+
multiple?: boolean;
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
}
|
|
38
|
+
export declare const UploadDropzone: React.FC<UploadDropzoneProps>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: Meta;
|
|
3
|
+
export default meta;
|
|
4
|
+
type Story = StoryObj;
|
|
5
|
+
/**
|
|
6
|
+
* Empty Picture Upload Box with upload trigger.
|
|
7
|
+
*/
|
|
8
|
+
export declare const PictureDefault: Story;
|
|
9
|
+
/**
|
|
10
|
+
* Picture in uploading state with percentage indicator.
|
|
11
|
+
*/
|
|
12
|
+
export declare const PictureUploading: Story;
|
|
13
|
+
/**
|
|
14
|
+
* Uploaded picture preview with hover overlay.
|
|
15
|
+
*/
|
|
16
|
+
export declare const PictureUploaded: Story;
|
|
17
|
+
/**
|
|
18
|
+
* Circular avatar picture upload variant.
|
|
19
|
+
*/
|
|
20
|
+
export declare const PictureAvatar: Story;
|
|
21
|
+
/**
|
|
22
|
+
* Picture upload error state.
|
|
23
|
+
*/
|
|
24
|
+
export declare const PictureError: Story;
|
|
25
|
+
/**
|
|
26
|
+
* Collection of color-coded document & file icons.
|
|
27
|
+
*/
|
|
28
|
+
export declare const FileIconsGallery: Story;
|
|
29
|
+
/**
|
|
30
|
+
* File card in uploading progress state.
|
|
31
|
+
*/
|
|
32
|
+
export declare const FileUploadingCard: Story;
|
|
33
|
+
/**
|
|
34
|
+
* File card in completed uploaded state with remove action.
|
|
35
|
+
*/
|
|
36
|
+
export declare const FileUploadedCard: Story;
|
|
37
|
+
/**
|
|
38
|
+
* File card in error state with retry button.
|
|
39
|
+
*/
|
|
40
|
+
export declare const FileErrorCard: Story;
|
|
41
|
+
/**
|
|
42
|
+
* Wide banner drag & drop upload container.
|
|
43
|
+
*/
|
|
44
|
+
export declare const DropzoneBanner: Story;
|
|
45
|
+
/**
|
|
46
|
+
* Visual design system matrix overview matching reference documentation.
|
|
47
|
+
*/
|
|
48
|
+
export declare const DesignSystemOverview: Story;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export * from './Badge';
|
|
2
|
+
export * from './Box';
|
|
3
|
+
export * from './Button';
|
|
4
|
+
export * from './Calendar';
|
|
5
|
+
export * from './Divider';
|
|
6
|
+
export * from './ImagePopOver';
|
|
7
|
+
export * from './Input';
|
|
8
|
+
export * from './InputOTP';
|
|
9
|
+
export * from './Pagination';
|
|
10
|
+
export * from './ProfileCard';
|
|
11
|
+
export * from './Select';
|
|
12
|
+
export * from './Slider';
|
|
13
|
+
export * from './Switch';
|
|
14
|
+
export * from './Table';
|
|
15
|
+
export * from './Tabs';
|
|
16
|
+
export * from './Textarea';
|
|
17
|
+
export * from './Toast';
|
|
18
|
+
export * from './Tooltip';
|
|
19
|
+
export * from './Upload';
|
|
20
|
+
export * from './types';
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export declare enum ButtonVariant {
|
|
3
|
+
Default = "default",
|
|
4
|
+
Destructive = "destructive",
|
|
5
|
+
Cancel = "cancel",
|
|
6
|
+
Subtle = "subtle",
|
|
7
|
+
Ghost = "ghost",
|
|
8
|
+
Link = "link"
|
|
9
|
+
}
|
|
10
|
+
export declare enum ButtonDirection {
|
|
11
|
+
Row = "row",
|
|
12
|
+
Column = "column"
|
|
13
|
+
}
|
|
14
|
+
export declare enum ButtonSize {
|
|
15
|
+
Small = "sm",
|
|
16
|
+
Default = "default",
|
|
17
|
+
Large = "lg",
|
|
18
|
+
Icon = "icon"
|
|
19
|
+
}
|
|
20
|
+
export declare enum ButtonIconPosition {
|
|
21
|
+
Left = "left",
|
|
22
|
+
Right = "right"
|
|
23
|
+
}
|
|
24
|
+
export declare enum ColorVariant {
|
|
25
|
+
Default = "default",
|
|
26
|
+
Primary = "primary",
|
|
27
|
+
Secondary = "secondary",
|
|
28
|
+
Success = "success",
|
|
29
|
+
Warning = "warning",
|
|
30
|
+
Destructive = "destructive",
|
|
31
|
+
Info = "info",
|
|
32
|
+
Muted = "muted"
|
|
33
|
+
}
|
|
34
|
+
export declare enum ComponentSize {
|
|
35
|
+
ExtraSmall = "xs",
|
|
36
|
+
Small = "sm",
|
|
37
|
+
Default = "default",
|
|
38
|
+
Large = "lg",
|
|
39
|
+
ExtraLarge = "xl"
|
|
40
|
+
}
|
|
41
|
+
export declare enum ShapeVariant {
|
|
42
|
+
Square = "square",
|
|
43
|
+
Rounded = "rounded",
|
|
44
|
+
Pill = "pill",
|
|
45
|
+
Circle = "circle"
|
|
46
|
+
}
|
|
47
|
+
export declare enum Orientation {
|
|
48
|
+
Horizontal = "horizontal",
|
|
49
|
+
Vertical = "vertical"
|
|
50
|
+
}
|
|
51
|
+
export declare enum Position {
|
|
52
|
+
Top = "top",
|
|
53
|
+
Right = "right",
|
|
54
|
+
Bottom = "bottom",
|
|
55
|
+
Left = "left"
|
|
56
|
+
}
|
|
57
|
+
export declare enum Alignment {
|
|
58
|
+
Left = "left",
|
|
59
|
+
Center = "center",
|
|
60
|
+
Right = "right"
|
|
61
|
+
}
|
|
62
|
+
export declare enum TypographyVariant {
|
|
63
|
+
H1 = "h1",
|
|
64
|
+
H2 = "h2",
|
|
65
|
+
H3 = "h3",
|
|
66
|
+
H4 = "h4",
|
|
67
|
+
H5 = "h5",
|
|
68
|
+
H6 = "h6",
|
|
69
|
+
Subtitle1 = "subtitle1",
|
|
70
|
+
Subtitle2 = "subtitle2",
|
|
71
|
+
Body1 = "body1",
|
|
72
|
+
Body2 = "body2",
|
|
73
|
+
Caption = "caption",
|
|
74
|
+
Overline = "overline"
|
|
75
|
+
}
|
|
76
|
+
export declare enum StatusType {
|
|
77
|
+
Success = "success",
|
|
78
|
+
Warning = "warning",
|
|
79
|
+
Error = "error",
|
|
80
|
+
Info = "info"
|
|
81
|
+
}
|
|
82
|
+
export interface OptionType<T = string | number> {
|
|
83
|
+
label: string;
|
|
84
|
+
value: T;
|
|
85
|
+
disabled?: boolean;
|
|
86
|
+
icon?: ReactNode;
|
|
87
|
+
}
|
|
88
|
+
export type * from './Badge';
|
|
89
|
+
export type * from './Box';
|
|
90
|
+
export type * from './Button';
|
|
91
|
+
export type * from './Calendar';
|
|
92
|
+
export type * from './Divider';
|
|
93
|
+
export type * from './ImagePopOver';
|
|
94
|
+
export type * from './Input';
|
|
95
|
+
export type * from './InputOTP';
|
|
96
|
+
export type * from './Pagination';
|
|
97
|
+
export type * from './ProfileCard';
|
|
98
|
+
export type * from './Select';
|
|
99
|
+
export type * from './Slider';
|
|
100
|
+
export type * from './Switch';
|
|
101
|
+
export type * from './Table';
|
|
102
|
+
export type * from './Tabs';
|
|
103
|
+
export type * from './Textarea';
|
|
104
|
+
export type * from './Toast';
|
|
105
|
+
export type * from './Tooltip';
|
|
106
|
+
export type * from './Upload';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export declare const color: {
|
|
2
|
+
lightBrown: string;
|
|
3
|
+
brown: string;
|
|
4
|
+
lightGray: string;
|
|
5
|
+
gray: string;
|
|
6
|
+
lightBlack: string;
|
|
7
|
+
lightWhite: string;
|
|
8
|
+
darkBrown: string;
|
|
9
|
+
lighterGray: string;
|
|
10
|
+
lightBlue: string;
|
|
11
|
+
chocolate: string;
|
|
12
|
+
blue: string;
|
|
13
|
+
white: string;
|
|
14
|
+
whiteGray: string;
|
|
15
|
+
grayBlue: string;
|
|
16
|
+
cream: string;
|
|
17
|
+
blueGray: string;
|
|
18
|
+
lightCream: string;
|
|
19
|
+
lightGreen: string;
|
|
20
|
+
darkBlue: string;
|
|
21
|
+
light: string;
|
|
22
|
+
perpleWhite: string;
|
|
23
|
+
green500: string;
|
|
24
|
+
red500: string;
|
|
25
|
+
black: string;
|
|
26
|
+
plainWhite: string;
|
|
27
|
+
gray700: string;
|
|
28
|
+
gray200: string;
|
|
29
|
+
gray300: string;
|
|
30
|
+
gray800: string;
|
|
31
|
+
gray500: string;
|
|
32
|
+
gray100: string;
|
|
33
|
+
gray400: string;
|
|
34
|
+
perple60: string;
|
|
35
|
+
perple75: string;
|
|
36
|
+
blue500: string;
|
|
37
|
+
indigo500: string;
|
|
38
|
+
red700: string;
|
|
39
|
+
gray600: string;
|
|
40
|
+
yellow500: string;
|
|
41
|
+
pink800: string;
|
|
42
|
+
blue400: string;
|
|
43
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare enum Alignment {
|
|
2
|
+
Center = "center",
|
|
3
|
+
Left = "left",
|
|
4
|
+
Right = "right"
|
|
5
|
+
}
|
|
6
|
+
export declare enum TextWeight {
|
|
7
|
+
Bold = "bold",
|
|
8
|
+
Thin = "thin",
|
|
9
|
+
Medium = "medium",
|
|
10
|
+
Normal = "normal",
|
|
11
|
+
Semibold = "semibold",
|
|
12
|
+
Black = "black"
|
|
13
|
+
}
|
|
14
|
+
export declare enum TextSize {
|
|
15
|
+
Base = "base",
|
|
16
|
+
Small = "sm",
|
|
17
|
+
Large = "lg",
|
|
18
|
+
Xl = "xl",
|
|
19
|
+
XXl = "2xl",
|
|
20
|
+
XXXl = "3xl"
|
|
21
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type PropsOf<C extends keyof React.JSX.IntrinsicElements | React.JSXElementConstructor<unknown>> = React.JSX.LibraryManagedAttributes<C, React.ComponentPropsWithoutRef<C>>;
|
|
3
|
+
export type AsProp<C extends React.ElementType> = {
|
|
4
|
+
/**
|
|
5
|
+
* An override of the default HTML tag.
|
|
6
|
+
* Can also be another React component.
|
|
7
|
+
*/
|
|
8
|
+
as?: C;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Allows for extending a set of props (`ExtendedProps`) by an overriding set of props
|
|
12
|
+
* (`OverrideProps`), ensuring that any duplicates are overridden by the overriding
|
|
13
|
+
* set of props.
|
|
14
|
+
*/
|
|
15
|
+
export type ExtendableProps<ExtendedProps = {}, OverrideProps = {}> = OverrideProps & Omit<ExtendedProps, keyof OverrideProps>;
|
|
16
|
+
/**
|
|
17
|
+
* Allows for inheriting the props from the specified element type so that
|
|
18
|
+
* props like children, className & style work, as well as element-specific
|
|
19
|
+
* attributes like aria roles. The component (`C`) must be passed in.
|
|
20
|
+
*/
|
|
21
|
+
export type InheritableElementProps<C extends React.ElementType, Props = {}> = ExtendableProps<PropsOf<C>, Props>;
|
|
22
|
+
/**
|
|
23
|
+
* A more sophisticated version of `InheritableElementProps` where
|
|
24
|
+
* the passed in `as` prop will determine which props can be included
|
|
25
|
+
*/
|
|
26
|
+
export type PolymorphicComponentProps<C extends React.ElementType, Props = {}> = InheritableElementProps<C, Props & AsProp<C>>;
|
|
27
|
+
export type PolymorphicRef<C extends React.ElementType> = React.ComponentPropsWithRef<C>["ref"];
|
|
28
|
+
export type PolymorphicComponentPropsWithRef<C extends React.ElementType, Props = {}> = PolymorphicComponentProps<C, Props> & {
|
|
29
|
+
ref?: PolymorphicRef<C>;
|
|
30
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "azero_resources",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"files": [
|
|
6
|
+
"dist"
|
|
7
|
+
],
|
|
8
|
+
"main": "dist/azero-resources-umd.cjs",
|
|
9
|
+
"module": "dist/azero-resources.js",
|
|
10
|
+
"types": "dist/azero-resources.d.ts",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/azero-resources.d.ts",
|
|
14
|
+
"import": "./dist/azero-resources.js",
|
|
15
|
+
"require": "./dist/azero-resources-umd.cjs"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"scripts": {
|
|
19
|
+
"dev": "vite",
|
|
20
|
+
"build": "tsc && vite build",
|
|
21
|
+
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
22
|
+
"preview": "vite preview",
|
|
23
|
+
"storybook": "storybook dev -p 6007",
|
|
24
|
+
"build-storybook": "storybook build",
|
|
25
|
+
"tsc": "tsc",
|
|
26
|
+
"test": "jest",
|
|
27
|
+
"test01": "jest --config jest.config.ts",
|
|
28
|
+
"coverage": "jest --coverage",
|
|
29
|
+
"publish": "npm run build && npm publish"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@testing-library/react": "^16.3.3",
|
|
33
|
+
"@types/jest": "^30.0.0",
|
|
34
|
+
"class-variance-authority": "^0.7.1",
|
|
35
|
+
"clsx": "^2.1.1",
|
|
36
|
+
"identity-obj-proxy": "^3.0.0",
|
|
37
|
+
"jest": "^30.5.2",
|
|
38
|
+
"jest-dom": "^4.0.0",
|
|
39
|
+
"react": "^19.3.0",
|
|
40
|
+
"react-dom": "^19.3.0",
|
|
41
|
+
"react-icons": "^5.7.0",
|
|
42
|
+
"react-testing-library": "^8.0.1",
|
|
43
|
+
"react-toastify": "^11.1.0",
|
|
44
|
+
"single-spa": "^6.0.3",
|
|
45
|
+
"tailwind-merge": "^3.7.0",
|
|
46
|
+
"vite-plugin-dts": "^5.1.1",
|
|
47
|
+
"vite-tsconfig-paths": "^6.1.1"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@chromatic-com/storybook": "^3.2.7",
|
|
51
|
+
"@rollup/plugin-commonjs": "^29.0.3",
|
|
52
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
53
|
+
"@rollup/plugin-typescript": "^12.3.0",
|
|
54
|
+
"@storybook/addon-essentials": "^8.6.18",
|
|
55
|
+
"@storybook/addon-interactions": "^8.6.18",
|
|
56
|
+
"@storybook/addon-links": "^8.6.18",
|
|
57
|
+
"@storybook/addon-onboarding": "^8.6.18",
|
|
58
|
+
"@storybook/addon-storysource": "^8.6.18",
|
|
59
|
+
"@storybook/blocks": "^8.6.18",
|
|
60
|
+
"@storybook/react": "^8.6.18",
|
|
61
|
+
"@storybook/react-vite": "^8.6.18",
|
|
62
|
+
"@storybook/test": "^8.6.18",
|
|
63
|
+
"@tailwindcss/postcss": "^4.3.3",
|
|
64
|
+
"@testing-library/jest-dom": "^7.0.1",
|
|
65
|
+
"@types/react": "^19.3.0",
|
|
66
|
+
"@types/react-dom": "^19.3.0",
|
|
67
|
+
"@types/tough-cookie": "^4.0.5",
|
|
68
|
+
"@typescript-eslint/eslint-plugin": "^8.70.1",
|
|
69
|
+
"@typescript-eslint/parser": "^8.70.1",
|
|
70
|
+
"@vitejs/plugin-react": "^6.1.1",
|
|
71
|
+
"autoprefixer": "^10.6.1",
|
|
72
|
+
"eslint": "^10.11.0",
|
|
73
|
+
"eslint-plugin-react-hooks": "^7.1.1",
|
|
74
|
+
"eslint-plugin-react-refresh": "^0.5.7",
|
|
75
|
+
"eslint-plugin-storybook": "^0.8.0",
|
|
76
|
+
"jest-environment-jsdom": "^30.5.2",
|
|
77
|
+
"jest-transform-stub": "^2.0.0",
|
|
78
|
+
"postcss": "^8.5.28",
|
|
79
|
+
"rollup": "^4.63.4",
|
|
80
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
81
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
82
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
83
|
+
"rollup-plugin-typescript2": "^0.37.0",
|
|
84
|
+
"storybook": "^8.6.18",
|
|
85
|
+
"tailwindcss": "^4.3.3",
|
|
86
|
+
"ts-jest": "^29.4.13",
|
|
87
|
+
"ts-node": "^10.9.2",
|
|
88
|
+
"typescript": "^5.5.0",
|
|
89
|
+
"vite": "^8.3.0"
|
|
90
|
+
}
|
|
91
|
+
}
|