@altimateai/ui-components 0.0.17 → 0.0.19
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/CoachForm.js +2 -2
- package/dist/Tooltip.js +5 -5
- package/dist/assets/icons/index.d.ts +9 -1
- package/dist/assets/icons/index.js +31 -27
- package/dist/index2.js +173 -169
- package/dist/lineage/index.js +2 -2
- package/dist/main.js +82 -82
- package/dist/shadcn/index.d.ts +10 -2
- package/dist/shadcn/index.js +2208 -2073
- package/dist/storybook/Alert.stories.tsx +42 -2
- package/dist/storybook/drag-and-drop-file-upload.stories.tsx +99 -0
- package/package.json +1 -1
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { Meta, StoryFn } from "@storybook/react";
|
|
2
2
|
import { Alert, AlertTitle, AlertDescription } from "../shadcn";
|
|
3
|
-
import { InfoCircleIcon } from "@ac-assets/icons";
|
|
3
|
+
import { InfoCircleIcon, PassIcon, WarningIcon } from "@ac-assets/icons";
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
6
|
title: "Shadcn/Components/Alert",
|
|
7
7
|
component: Alert,
|
|
8
|
+
tags: ["autodocs"],
|
|
8
9
|
argTypes: {
|
|
9
10
|
variant: {
|
|
10
11
|
control: "select",
|
|
11
|
-
options: ["default", "destructive"],
|
|
12
|
+
options: ["default", "destructive", "warning", "success", "info"],
|
|
12
13
|
},
|
|
13
14
|
},
|
|
14
15
|
} as Meta;
|
|
@@ -59,3 +60,42 @@ export const DescriptionOnly: StoryFn = () => (
|
|
|
59
60
|
<AlertDescription>Simple Alert with Description Only</AlertDescription>
|
|
60
61
|
</Alert>
|
|
61
62
|
);
|
|
63
|
+
|
|
64
|
+
export const Warning = Template.bind({});
|
|
65
|
+
Warning.args = {
|
|
66
|
+
variant: "warning",
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export const Success = Template.bind({});
|
|
70
|
+
Success.args = {
|
|
71
|
+
variant: "success",
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export const Info = Template.bind({});
|
|
75
|
+
Info.args = {
|
|
76
|
+
variant: "info",
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export const WarningWithIcon: StoryFn = () => (
|
|
80
|
+
<Alert variant="warning">
|
|
81
|
+
<WarningIcon className="al-h-4 al-w-4" />
|
|
82
|
+
<AlertTitle>Warning Alert</AlertTitle>
|
|
83
|
+
<AlertDescription>This is a warning message. Please review your action.</AlertDescription>
|
|
84
|
+
</Alert>
|
|
85
|
+
);
|
|
86
|
+
|
|
87
|
+
export const SuccessWithIcon: StoryFn = () => (
|
|
88
|
+
<Alert variant="success">
|
|
89
|
+
<PassIcon className="al-h-4 al-w-4" />
|
|
90
|
+
<AlertTitle>Success Alert</AlertTitle>
|
|
91
|
+
<AlertDescription>Operation completed successfully!</AlertDescription>
|
|
92
|
+
</Alert>
|
|
93
|
+
);
|
|
94
|
+
|
|
95
|
+
export const InfoWithIcon: StoryFn = () => (
|
|
96
|
+
<Alert variant="info">
|
|
97
|
+
<InfoCircleIcon className="al-h-4 al-w-4" />
|
|
98
|
+
<AlertTitle>Information Alert</AlertTitle>
|
|
99
|
+
<AlertDescription>Here's some helpful information for you.</AlertDescription>
|
|
100
|
+
</Alert>
|
|
101
|
+
);
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { DragAndDropFileUpload } from "@ac-uicore/shadcn";
|
|
3
|
+
|
|
4
|
+
const meta = {
|
|
5
|
+
title: "shadcn/Components/DragAndDropFileUpload",
|
|
6
|
+
component: DragAndDropFileUpload,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: "centered",
|
|
9
|
+
},
|
|
10
|
+
decorators: [
|
|
11
|
+
Story => (
|
|
12
|
+
<div className="al-w-[600px]">
|
|
13
|
+
<Story />
|
|
14
|
+
</div>
|
|
15
|
+
),
|
|
16
|
+
],
|
|
17
|
+
tags: ["autodocs"],
|
|
18
|
+
argTypes: {
|
|
19
|
+
onFilesSelected: {
|
|
20
|
+
action: "files selected",
|
|
21
|
+
},
|
|
22
|
+
acceptedFileTypes: {
|
|
23
|
+
control: "object",
|
|
24
|
+
description: "Array of accepted file types (e.g., ['.pdf', '.jpg', 'image/*'])",
|
|
25
|
+
},
|
|
26
|
+
maxFiles: {
|
|
27
|
+
control: "number",
|
|
28
|
+
description: "Maximum number of files allowed",
|
|
29
|
+
},
|
|
30
|
+
className: {
|
|
31
|
+
control: "text",
|
|
32
|
+
description: "Additional CSS classes",
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
} satisfies Meta<typeof DragAndDropFileUpload>;
|
|
36
|
+
|
|
37
|
+
export default meta;
|
|
38
|
+
type Story = StoryObj<typeof DragAndDropFileUpload>;
|
|
39
|
+
|
|
40
|
+
export const Default: Story = {
|
|
41
|
+
args: {
|
|
42
|
+
onFilesSelected: files => console.log("Files selected:", files),
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export const SingleImageFile: Story = {
|
|
47
|
+
args: {
|
|
48
|
+
onFilesSelected: files => console.log("Image files selected:", files),
|
|
49
|
+
acceptedFileTypes: ["image/*"],
|
|
50
|
+
maxFiles: 1,
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export const MultiplePDFFiles: Story = {
|
|
55
|
+
args: {
|
|
56
|
+
onFilesSelected: files => console.log("PDF files selected:", files),
|
|
57
|
+
acceptedFileTypes: [".pdf"],
|
|
58
|
+
maxFiles: 5,
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export const MultipleFiles: Story = {
|
|
63
|
+
args: {
|
|
64
|
+
onFilesSelected: files => console.log("Multiple files selected:", files),
|
|
65
|
+
maxFiles: 10,
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export const SpecificFileTypes: Story = {
|
|
70
|
+
args: {
|
|
71
|
+
onFilesSelected: files => console.log("Document files selected:", files),
|
|
72
|
+
acceptedFileTypes: [".pdf", ".doc", ".docx", ".txt"],
|
|
73
|
+
maxFiles: 3,
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export const ImageAndVideoFiles: Story = {
|
|
78
|
+
args: {
|
|
79
|
+
onFilesSelected: files => console.log("Media files selected:", files),
|
|
80
|
+
acceptedFileTypes: ["image/*", "video/*"],
|
|
81
|
+
maxFiles: 5,
|
|
82
|
+
},
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export const WithCustomStyling: Story = {
|
|
86
|
+
args: {
|
|
87
|
+
onFilesSelected: files => console.log("Styled files selected:", files),
|
|
88
|
+
className: "al-max-w-md",
|
|
89
|
+
maxFiles: 3,
|
|
90
|
+
},
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export const CSVFiles: Story = {
|
|
94
|
+
args: {
|
|
95
|
+
onFilesSelected: files => console.log("CSV files selected:", files),
|
|
96
|
+
acceptedFileTypes: [".csv", ".xlsx", ".xls"],
|
|
97
|
+
maxFiles: 1,
|
|
98
|
+
},
|
|
99
|
+
};
|