blixify-ui-web-mcp 0.1.3 → 0.1.18
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/lib/components/action/button/README.md +12 -11
- package/lib/components/action/button/button.stories.tsx +4 -10
- package/lib/components/action/buttonGroup/buttonGroup.stories.tsx +4 -10
- package/lib/components/action/iconButton/iconButton.stories.tsx +4 -10
- package/lib/components/action/radioList/radioList.stories.tsx +4 -10
- package/lib/components/action/slider/slider.stories.tsx +4 -10
- package/lib/components/action/textButton/textButton.stories.tsx +4 -10
- package/lib/components/action/toggle/toggle.stories.tsx +4 -10
- package/lib/components/advanced/collapse/collapse.stories.tsx +4 -10
- package/lib/components/advanced/infoWindow/infoWindow.stories.tsx +4 -10
- package/lib/components/advanced/popUp/README.md +21 -7
- package/lib/components/advanced/popUp/popUp.stories.tsx +4 -10
- package/lib/components/auth/bareSignIn/bareSignIn.stories.tsx +30 -10
- package/lib/components/auth/bareSignUp/bareSignUp.stories.tsx +4 -10
- package/lib/components/auth/signIn/signIn.stories.tsx +4 -10
- package/lib/components/auth/signUp/signUp.stories.tsx +4 -10
- package/lib/components/chart/areaChart/areaChart.stories.tsx +7 -13
- package/lib/components/chart/barChart/barChart.stories.tsx +7 -13
- package/lib/components/chart/boxPlotChart/boxPlotChart.stories.tsx +8 -14
- package/lib/components/chart/bubbleChart/bubbleChart.stories.tsx +8 -14
- package/lib/components/chart/card/card.stories.tsx +4 -10
- package/lib/components/chart/ganttChart/ganttChart.stories.tsx +4 -10
- package/lib/components/chart/heatmapChart/heatmapChart.stories.tsx +4 -10
- package/lib/components/chart/lineChart/lineChart.stories.tsx +4 -10
- package/lib/components/chart/pieChart/pieChart.stories.tsx +4 -10
- package/lib/components/chart/polarAreaChart/polarAreaChart.stories.tsx +8 -14
- package/lib/components/chart/radarChart/radarChart.stories.tsx +4 -10
- package/lib/components/chart/radialBar/radialChart.stories.tsx +4 -10
- package/lib/components/chart/rangeBarChart/rangeBarChart.stories.tsx +4 -10
- package/lib/components/chart/statsCard/statsCard.stories.tsx +4 -10
- package/lib/components/chart/treemapChart/treemapChart.stories.tsx +8 -14
- package/lib/components/chat/chatAnchor/chatAnchor.stories.tsx +13 -19
- package/lib/components/chat/chatBase/README.md +103 -22
- package/lib/components/chat/chatBase/chatBase.stories.tsx +652 -52
- package/lib/components/chat/chatDashboard/README.md +17 -15
- package/lib/components/chat/chatDashboard/chatDashboard.stories.tsx +356 -44
- package/lib/components/data/dataGraph/dataGraph.stories.tsx +4 -10
- package/lib/components/data/dataReference/dataReference.stories.tsx +4 -10
- package/lib/components/data/dataTemplate/README.md +88 -61
- package/lib/components/data/dataTemplate/dataModule.stories.tsx +4 -10
- package/lib/components/data/dataTemplate/dataTemplate.stories.tsx +4 -10
- package/lib/components/data/dataWrapper/README.md +46 -45
- package/lib/components/data/dataWrapper/dataWrapper.stories.tsx +258 -489
- package/lib/components/data/queryForm/queryForm.stories.tsx +4 -10
- package/lib/components/data/readQuery/readQuery.stories.tsx +4 -9
- package/lib/components/data/readQueryHoc/readQueryHoc.stories.tsx +4 -10
- package/lib/components/data/writeQuery/writeQuery.stories.tsx +4 -8
- package/lib/components/design/actionSection/actionSection.stories.tsx +6 -10
- package/lib/components/design/banner/banner.stories.tsx +4 -10
- package/lib/components/design/bannerAction/bannerAction.stories.tsx +4 -10
- package/lib/components/design/blogSection/blogSection.stories.tsx +4 -10
- package/lib/components/design/carouselSection/carouselSection.stories.tsx +4 -10
- package/lib/components/design/designList/designList.stories.tsx +4 -10
- package/lib/components/design/faq/faq.stories.tsx +4 -10
- package/lib/components/design/fileGrid/fileGrid.stories.tsx +4 -10
- package/lib/components/design/fileViewer/fileViewer.stories.tsx +4 -10
- package/lib/components/design/footerSection/footerSection.stories.tsx +4 -10
- package/lib/components/design/googleReview/googleReview.stories.tsx +4 -10
- package/lib/components/design/heroSection/heroSection.stories.tsx +4 -10
- package/lib/components/design/iconList/iconList.stories.tsx +4 -10
- package/lib/components/design/imageGallery/imageGallery.stories.tsx +4 -10
- package/lib/components/design/imageZoom/imageZoom.stories.tsx +4 -10
- package/lib/components/design/leftContent/leftContent.stories.tsx +4 -10
- package/lib/components/design/logoCloud/logoCloud.stories.tsx +4 -10
- package/lib/components/design/onboarding/onboarding.stories.tsx +4 -10
- package/lib/components/design/pricing/pricing.stories.tsx +4 -10
- package/lib/components/design/rightContent/rightContent.stories.tsx +4 -10
- package/lib/components/design/sectionList/sectionList.stories.tsx +4 -10
- package/lib/components/design/teams/teams.stories.tsx +4 -10
- package/lib/components/display/alert/alert.stories.tsx +4 -10
- package/lib/components/display/calendar/README.md +49 -0
- package/lib/components/display/calendar/calendar.stories.tsx +71 -28
- package/lib/components/display/clipboard/clipboard.stories.tsx +4 -10
- package/lib/components/display/detailList/detailList.stories.tsx +5 -10
- package/lib/components/display/drawer/drawer.stories.tsx +5 -10
- package/lib/components/display/emptyState/emptyState.stories.tsx +4 -10
- package/lib/components/display/feeds/feeds.stories.tsx +4 -10
- package/lib/components/display/flexTable/README.md +11 -7
- package/lib/components/display/flexTable/flexTable.stories.tsx +114 -11
- package/lib/components/display/grid/README.md +28 -27
- package/lib/components/display/grid/grid.stories.tsx +4 -10
- package/lib/components/display/kanban/kanban.stories.tsx +14 -20
- package/lib/components/display/list/README.md +30 -29
- package/lib/components/display/list/list.stories.tsx +4 -10
- package/lib/components/display/loading/loading.stories.tsx +5 -10
- package/lib/components/display/mapView/mapView.stories.tsx +4 -10
- package/lib/components/display/modal/modal.stories.tsx +4 -11
- package/lib/components/display/notification/notification.stories.tsx +4 -10
- package/lib/components/display/progress/progress.stories.tsx +5 -10
- package/lib/components/display/stepper/stepper.stories.tsx +5 -10
- package/lib/components/display/table/README.md +38 -37
- package/lib/components/display/table/table.stories.tsx +8 -14
- package/lib/components/display/tag/tag.stories.tsx +4 -10
- package/lib/components/input/address/address.stories.tsx +4 -10
- package/lib/components/input/canvas/canvas.stories.tsx +4 -10
- package/lib/components/input/checkbox/checkbox.stories.tsx +4 -10
- package/lib/components/input/datePicker/datePicker.stories.tsx +4 -10
- package/lib/components/input/form/form.stories.tsx +4 -10
- package/lib/components/input/markdown/markdown.stories.tsx +5 -10
- package/lib/components/input/monthYearPicker/monthYearPicker.stories.tsx +4 -10
- package/lib/components/input/netPromoterScore/netPromoterScore.stories.tsx +4 -10
- package/lib/components/input/rating/rating.stories.tsx +4 -10
- package/lib/components/input/select/README.md +30 -29
- package/lib/components/input/select/select.stories.tsx +4 -10
- package/lib/components/input/signature/signature.stories.tsx +4 -10
- package/lib/components/input/textArea/textArea.stories.tsx +4 -10
- package/lib/components/input/textInput/textinput.stories.tsx +4 -10
- package/lib/components/input/uploadInput/uploadInput.stories.tsx +135 -11
- package/lib/components/navigation/bars/bars.stories.tsx +4 -10
- package/lib/components/navigation/bottomTab/bottomTab.stories.tsx +5 -10
- package/lib/components/navigation/breadcrumb/breadcrumb.stories.tsx +4 -10
- package/lib/components/navigation/header/header.stories.tsx +24 -12
- package/lib/components/navigation/leftNav/leftNav.stories.tsx +4 -10
- package/lib/components/navigation/tabs/tabs.stories.tsx +4 -10
- package/lib/components/structure/column/column.stories.tsx +5 -10
- package/lib/components/structure/container/container.stories.tsx +5 -10
- package/lib/components/structure/link/link.stories.tsx +4 -10
- package/lib/components/structure/text/text.stories.tsx +5 -10
- package/lib/components/template/authPage/authPage.stories.tsx +6 -5
- package/lib/components/template/landingPage/landingPage.stories.tsx +8 -6
- package/lib/components/template/productListing/productListing.stories.tsx +7 -13
- package/lib/components/template/productOverview/productOverview.stories.tsx +5 -11
- package/lib/components/template/shoppingCart/shoppingCart.stories.tsx +6 -12
- package/lib/components/template/userHomePage/userHomePage.stories.tsx +7 -6
- package/lib/components/template/userRankingDashboard/userRankingDashboard.stories.tsx +5 -11
- package/package.json +1 -1
|
@@ -1,20 +1,14 @@
|
|
|
1
1
|
import { PencilIcon } from "@heroicons/react/24/outline";
|
|
2
|
-
import
|
|
3
|
-
import moment from "moment";
|
|
2
|
+
import dayjs from "../../dayjs";
|
|
4
3
|
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
|
5
4
|
import { BoxPlotChart } from ".";
|
|
6
5
|
import { RangeInterface } from "../DateRange";
|
|
7
|
-
import README from "./README.md";
|
|
8
6
|
|
|
9
|
-
const
|
|
7
|
+
const meta = { title: "Chart/Box Plot Chart" };
|
|
8
|
+
export default meta;
|
|
10
9
|
|
|
11
|
-
stories.addParameters({
|
|
12
|
-
readme: {
|
|
13
|
-
content: README,
|
|
14
|
-
},
|
|
15
|
-
});
|
|
16
10
|
|
|
17
|
-
|
|
11
|
+
export const BoxPlotChartStory = () => {
|
|
18
12
|
const [seriesData, setSeriesData] = useState<any[]>([]);
|
|
19
13
|
|
|
20
14
|
const chartDummyData = useMemo(() => {
|
|
@@ -59,7 +53,7 @@ stories.add("Box Plot Chart", () => {
|
|
|
59
53
|
}, [handleSetData]);
|
|
60
54
|
|
|
61
55
|
const sevenDaysAgo = new Date();
|
|
62
|
-
sevenDaysAgo.setDate(
|
|
56
|
+
sevenDaysAgo.setDate(dayjs().toDate().getDate() - 7);
|
|
63
57
|
|
|
64
58
|
return (
|
|
65
59
|
<>
|
|
@@ -72,7 +66,7 @@ stories.add("Box Plot Chart", () => {
|
|
|
72
66
|
dateRangeVisible={true}
|
|
73
67
|
customDate={{
|
|
74
68
|
startDate: sevenDaysAgo,
|
|
75
|
-
endDate:
|
|
69
|
+
endDate: dayjs().toDate(),
|
|
76
70
|
isDuration: true,
|
|
77
71
|
}}
|
|
78
72
|
onChangeDate={handleSetData}
|
|
@@ -90,7 +84,7 @@ stories.add("Box Plot Chart", () => {
|
|
|
90
84
|
dateRangeVisible={true}
|
|
91
85
|
customDate={{
|
|
92
86
|
startDate: sevenDaysAgo,
|
|
93
|
-
endDate:
|
|
87
|
+
endDate: dayjs().toDate(),
|
|
94
88
|
isDuration: true,
|
|
95
89
|
}}
|
|
96
90
|
onChangeDate={handleSetData}
|
|
@@ -101,4 +95,4 @@ stories.add("Box Plot Chart", () => {
|
|
|
101
95
|
/>
|
|
102
96
|
</>
|
|
103
97
|
);
|
|
104
|
-
}
|
|
98
|
+
}
|
|
@@ -1,20 +1,14 @@
|
|
|
1
1
|
import { PencilIcon } from "@heroicons/react/24/outline";
|
|
2
|
-
import
|
|
3
|
-
import moment from "moment";
|
|
2
|
+
import dayjs from "../../dayjs";
|
|
4
3
|
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
|
5
4
|
import { BubbleChart } from ".";
|
|
6
5
|
import { RangeInterface } from "../DateRange";
|
|
7
|
-
import README from "./README.md";
|
|
8
6
|
|
|
9
|
-
const
|
|
7
|
+
const meta = { title: "Chart/Bubble Chart" };
|
|
8
|
+
export default meta;
|
|
10
9
|
|
|
11
|
-
stories.addParameters({
|
|
12
|
-
readme: {
|
|
13
|
-
content: README,
|
|
14
|
-
},
|
|
15
|
-
});
|
|
16
10
|
|
|
17
|
-
|
|
11
|
+
export const BubbleChartStory = () => {
|
|
18
12
|
const [seriesData, setSeriesData] = useState<any[]>([]);
|
|
19
13
|
|
|
20
14
|
const chartDummyData = useMemo(() => {
|
|
@@ -99,7 +93,7 @@ stories.add("Bubble Chart", () => {
|
|
|
99
93
|
}, [handleSetData]);
|
|
100
94
|
|
|
101
95
|
const sevenDaysAgo = new Date();
|
|
102
|
-
sevenDaysAgo.setDate(
|
|
96
|
+
sevenDaysAgo.setDate(dayjs().toDate().getDate() - 7);
|
|
103
97
|
|
|
104
98
|
return (
|
|
105
99
|
<>
|
|
@@ -112,7 +106,7 @@ stories.add("Bubble Chart", () => {
|
|
|
112
106
|
dateRangeVisible={true}
|
|
113
107
|
customDate={{
|
|
114
108
|
startDate: sevenDaysAgo,
|
|
115
|
-
endDate:
|
|
109
|
+
endDate: dayjs().toDate(),
|
|
116
110
|
isDuration: true,
|
|
117
111
|
}}
|
|
118
112
|
onChangeDate={handleSetData}
|
|
@@ -130,7 +124,7 @@ stories.add("Bubble Chart", () => {
|
|
|
130
124
|
dateRangeVisible={true}
|
|
131
125
|
customDate={{
|
|
132
126
|
startDate: sevenDaysAgo,
|
|
133
|
-
endDate:
|
|
127
|
+
endDate: dayjs().toDate(),
|
|
134
128
|
isDuration: true,
|
|
135
129
|
}}
|
|
136
130
|
onChangeDate={handleSetData}
|
|
@@ -141,4 +135,4 @@ stories.add("Bubble Chart", () => {
|
|
|
141
135
|
/>
|
|
142
136
|
</>
|
|
143
137
|
);
|
|
144
|
-
}
|
|
138
|
+
}
|
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
import { PencilIcon, UserGroupIcon } from "@heroicons/react/24/outline";
|
|
2
|
-
import { storiesOf } from "@storybook/react";
|
|
3
2
|
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
|
4
3
|
import { Card } from ".";
|
|
5
4
|
import { RangeInterface } from "../DateRange";
|
|
6
|
-
import README from "./README.md";
|
|
7
5
|
|
|
8
|
-
const
|
|
6
|
+
const meta = { title: "Chart/Card" };
|
|
7
|
+
export default meta;
|
|
9
8
|
|
|
10
|
-
stories.addParameters({
|
|
11
|
-
readme: {
|
|
12
|
-
content: README,
|
|
13
|
-
},
|
|
14
|
-
});
|
|
15
9
|
|
|
16
|
-
|
|
10
|
+
export const CardStory = () => {
|
|
17
11
|
const [countData, setCountData] = useState<number>(0);
|
|
18
12
|
|
|
19
13
|
const stats = useMemo(() => {
|
|
@@ -86,4 +80,4 @@ stories.add("Card", () => {
|
|
|
86
80
|
darkModeBg="bg-gradient-to-r from-slate-700 to-gray-900"
|
|
87
81
|
/>
|
|
88
82
|
);
|
|
89
|
-
}
|
|
83
|
+
}
|
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
import { storiesOf } from "@storybook/react";
|
|
2
1
|
import React, { useState } from "react";
|
|
3
2
|
import { GanttChart } from ".";
|
|
4
3
|
import { StorySection } from "../../storyUtils";
|
|
5
|
-
import README from "./README.md";
|
|
6
4
|
|
|
7
|
-
const
|
|
5
|
+
const meta = { title: "Chart/Gantt Chart" };
|
|
6
|
+
export default meta;
|
|
8
7
|
|
|
9
|
-
stories.addParameters({
|
|
10
|
-
readme: {
|
|
11
|
-
content: README,
|
|
12
|
-
},
|
|
13
|
-
});
|
|
14
8
|
|
|
15
9
|
const today = new Date();
|
|
16
10
|
const day = 24 * 60 * 60 * 1000;
|
|
@@ -48,7 +42,7 @@ const baseTasks = [
|
|
|
48
42
|
},
|
|
49
43
|
];
|
|
50
44
|
|
|
51
|
-
|
|
45
|
+
export const GanttChartStory = () => {
|
|
52
46
|
const [tasks, setTasks] = useState(baseTasks);
|
|
53
47
|
|
|
54
48
|
return (
|
|
@@ -151,4 +145,4 @@ stories.add("Gantt Chart", () => {
|
|
|
151
145
|
</StorySection>
|
|
152
146
|
</>
|
|
153
147
|
);
|
|
154
|
-
}
|
|
148
|
+
}
|
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
import { storiesOf } from "@storybook/react";
|
|
2
1
|
import React, { useMemo } from "react";
|
|
3
2
|
import { HeatmapChart } from ".";
|
|
4
3
|
import { StorySection } from "../../storyUtils";
|
|
5
|
-
import README from "./README.md";
|
|
6
4
|
|
|
7
|
-
const
|
|
5
|
+
const meta = { title: "Chart/Heatmap Chart" };
|
|
6
|
+
export default meta;
|
|
8
7
|
|
|
9
|
-
stories.addParameters({
|
|
10
|
-
readme: {
|
|
11
|
-
content: README,
|
|
12
|
-
},
|
|
13
|
-
});
|
|
14
8
|
|
|
15
9
|
const categories = [
|
|
16
10
|
"Jan",
|
|
@@ -30,7 +24,7 @@ const categories = [
|
|
|
30
24
|
const rand = (min: number, max: number) =>
|
|
31
25
|
Math.floor(Math.random() * (max - min + 1)) + min;
|
|
32
26
|
|
|
33
|
-
|
|
27
|
+
export const HeatmapChartStory = () => {
|
|
34
28
|
const multiSeriesData = useMemo(
|
|
35
29
|
() => [
|
|
36
30
|
{ name: "Week 1", data: categories.map(() => rand(0, 90)) },
|
|
@@ -147,4 +141,4 @@ stories.add("Heatmap Chart", () => {
|
|
|
147
141
|
</StorySection>
|
|
148
142
|
</>
|
|
149
143
|
);
|
|
150
|
-
}
|
|
144
|
+
}
|
|
@@ -1,25 +1,19 @@
|
|
|
1
1
|
import { PencilIcon } from "@heroicons/react/24/outline";
|
|
2
|
-
import { storiesOf } from "@storybook/react";
|
|
3
2
|
import React, { useCallback, useEffect, useState } from "react";
|
|
4
3
|
import { LineChart } from ".";
|
|
5
4
|
import { RangeInterface } from "../DateRange";
|
|
6
|
-
import README from "./README.md";
|
|
7
5
|
import { StorySection } from "../../storyUtils";
|
|
8
6
|
|
|
9
|
-
const
|
|
7
|
+
const meta = { title: "Chart/Line Chart" };
|
|
8
|
+
export default meta;
|
|
10
9
|
|
|
11
|
-
stories.addParameters({
|
|
12
|
-
readme: {
|
|
13
|
-
content: README,
|
|
14
|
-
},
|
|
15
|
-
});
|
|
16
10
|
|
|
17
11
|
const multiLineSeries = [
|
|
18
12
|
{ name: "High - 2013", data: [-50, 29.1, 33.453, 60.09, 32, 32, 90] },
|
|
19
13
|
{ name: "Low - 2013", data: [12, 60, 14, 18, 17, 70, 13] },
|
|
20
14
|
];
|
|
21
15
|
|
|
22
|
-
|
|
16
|
+
export const LineChartStory = () => {
|
|
23
17
|
const [seriesData, setSeriesData] = useState([12, 60, 14, 18, 17]);
|
|
24
18
|
const [categoryData, setCategoryData] = useState<string[]>([
|
|
25
19
|
"JAN",
|
|
@@ -149,4 +143,4 @@ stories.add("Line Chart", () => {
|
|
|
149
143
|
</StorySection>
|
|
150
144
|
</div>
|
|
151
145
|
);
|
|
152
|
-
}
|
|
146
|
+
}
|
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
import { PencilIcon } from "@heroicons/react/24/outline";
|
|
2
|
-
import { storiesOf } from "@storybook/react";
|
|
3
2
|
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
|
4
3
|
import { PieChart } from ".";
|
|
5
4
|
import { StorySection } from "../../storyUtils";
|
|
6
5
|
import { RangeInterface } from "../DateRange";
|
|
7
|
-
import README from "./README.md";
|
|
8
6
|
|
|
9
|
-
const
|
|
7
|
+
const meta = { title: "Chart/Pie Chart" };
|
|
8
|
+
export default meta;
|
|
10
9
|
|
|
11
|
-
stories.addParameters({
|
|
12
|
-
readme: {
|
|
13
|
-
content: README,
|
|
14
|
-
},
|
|
15
|
-
});
|
|
16
10
|
|
|
17
11
|
const dummyData = [
|
|
18
12
|
{ label: "Apple", value: 10 },
|
|
@@ -25,7 +19,7 @@ const dummyData = [
|
|
|
25
19
|
const series = dummyData.map((d) => d.value);
|
|
26
20
|
const labels = dummyData.map((d) => d.label);
|
|
27
21
|
|
|
28
|
-
|
|
22
|
+
export const PieChartStory = () => {
|
|
29
23
|
const [seriesData, setSeriesData] = useState<number[]>([]);
|
|
30
24
|
const [labelData, setLabelData] = useState<string[]>([]);
|
|
31
25
|
|
|
@@ -177,4 +171,4 @@ stories.add("Pie Chart", () => {
|
|
|
177
171
|
</StorySection>
|
|
178
172
|
</>
|
|
179
173
|
);
|
|
180
|
-
}
|
|
174
|
+
}
|
|
@@ -1,20 +1,14 @@
|
|
|
1
1
|
import { PencilIcon } from "@heroicons/react/24/outline";
|
|
2
|
-
import
|
|
3
|
-
import moment from "moment";
|
|
2
|
+
import dayjs from "../../dayjs";
|
|
4
3
|
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
|
5
4
|
import { PolarAreaChart } from ".";
|
|
6
5
|
import { RangeInterface } from "../DateRange";
|
|
7
|
-
import README from "./README.md";
|
|
8
6
|
|
|
9
|
-
const
|
|
7
|
+
const meta = { title: "Chart/Polar Area Chart" };
|
|
8
|
+
export default meta;
|
|
10
9
|
|
|
11
|
-
stories.addParameters({
|
|
12
|
-
readme: {
|
|
13
|
-
content: README,
|
|
14
|
-
},
|
|
15
|
-
});
|
|
16
10
|
|
|
17
|
-
|
|
11
|
+
export const PolarAreaChartStory = () => {
|
|
18
12
|
const [seriesData, setSeriesData] = useState<any[]>([]);
|
|
19
13
|
|
|
20
14
|
const chartDummyData = useMemo(() => {
|
|
@@ -63,7 +57,7 @@ stories.add("Polar Area Chart", () => {
|
|
|
63
57
|
}, [handleSetData]);
|
|
64
58
|
|
|
65
59
|
const sevenDaysAgo = new Date();
|
|
66
|
-
sevenDaysAgo.setDate(
|
|
60
|
+
sevenDaysAgo.setDate(dayjs().toDate().getDate() - 7);
|
|
67
61
|
|
|
68
62
|
return (
|
|
69
63
|
<>
|
|
@@ -76,7 +70,7 @@ stories.add("Polar Area Chart", () => {
|
|
|
76
70
|
dateRangeVisible={true}
|
|
77
71
|
customDate={{
|
|
78
72
|
startDate: sevenDaysAgo,
|
|
79
|
-
endDate:
|
|
73
|
+
endDate: dayjs().toDate(),
|
|
80
74
|
isDuration: true,
|
|
81
75
|
}}
|
|
82
76
|
onChangeDate={handleSetData}
|
|
@@ -92,7 +86,7 @@ stories.add("Polar Area Chart", () => {
|
|
|
92
86
|
dateRangeVisible={true}
|
|
93
87
|
customDate={{
|
|
94
88
|
startDate: sevenDaysAgo,
|
|
95
|
-
endDate:
|
|
89
|
+
endDate: dayjs().toDate(),
|
|
96
90
|
isDuration: true,
|
|
97
91
|
}}
|
|
98
92
|
onChangeDate={handleSetData}
|
|
@@ -103,4 +97,4 @@ stories.add("Polar Area Chart", () => {
|
|
|
103
97
|
/>
|
|
104
98
|
</>
|
|
105
99
|
);
|
|
106
|
-
}
|
|
100
|
+
}
|
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
import { storiesOf } from "@storybook/react";
|
|
2
1
|
import React from "react";
|
|
3
2
|
import { RadarChart } from ".";
|
|
4
|
-
import README from "./README.md";
|
|
5
3
|
|
|
6
|
-
const
|
|
4
|
+
const meta = { title: "Chart/Radar Chart" };
|
|
5
|
+
export default meta;
|
|
7
6
|
|
|
8
|
-
stories.addParameters({
|
|
9
|
-
readme: {
|
|
10
|
-
content: README,
|
|
11
|
-
},
|
|
12
|
-
});
|
|
13
7
|
|
|
14
|
-
|
|
8
|
+
export const RadarChartStory = () => {
|
|
15
9
|
return (
|
|
16
10
|
<RadarChart
|
|
17
11
|
title={"Test Chart"}
|
|
@@ -33,4 +27,4 @@ stories.add("Radar Chart", () => {
|
|
|
33
27
|
onChangeDate={() => {}}
|
|
34
28
|
/>
|
|
35
29
|
);
|
|
36
|
-
}
|
|
30
|
+
}
|
|
@@ -1,20 +1,14 @@
|
|
|
1
1
|
import { PencilIcon } from "@heroicons/react/24/outline";
|
|
2
|
-
import { storiesOf } from "@storybook/react";
|
|
3
2
|
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
|
4
3
|
import { RadialBar } from ".";
|
|
5
4
|
import { RangeInterface } from "../DateRange";
|
|
6
|
-
import README from "./README.md";
|
|
7
5
|
import colors from "tailwindcss/colors";
|
|
8
6
|
|
|
9
|
-
const
|
|
7
|
+
const meta = { title: "Chart/Radial Chart" };
|
|
8
|
+
export default meta;
|
|
10
9
|
|
|
11
|
-
stories.addParameters({
|
|
12
|
-
readme: {
|
|
13
|
-
content: README,
|
|
14
|
-
},
|
|
15
|
-
});
|
|
16
10
|
|
|
17
|
-
|
|
11
|
+
export const RadialChart = () => {
|
|
18
12
|
const [seriesData, setSeriesData] = useState<number[]>([]);
|
|
19
13
|
const [labelData, setLabelData] = useState<string[]>([]);
|
|
20
14
|
|
|
@@ -133,4 +127,4 @@ stories.add("Radial Chart", () => {
|
|
|
133
127
|
/>
|
|
134
128
|
</div>
|
|
135
129
|
);
|
|
136
|
-
}
|
|
130
|
+
}
|
|
@@ -1,23 +1,17 @@
|
|
|
1
1
|
import { PencilIcon } from "@heroicons/react/24/outline";
|
|
2
|
-
import { storiesOf } from "@storybook/react";
|
|
3
2
|
import React, { useEffect, useMemo, useState } from "react";
|
|
4
3
|
import { RangeBarChart } from ".";
|
|
5
|
-
import README from "./README.md";
|
|
6
4
|
|
|
7
|
-
const
|
|
5
|
+
const meta = { title: "Chart/Range Bar Chart" };
|
|
6
|
+
export default meta;
|
|
8
7
|
|
|
9
|
-
stories.addParameters({
|
|
10
|
-
readme: {
|
|
11
|
-
content: README,
|
|
12
|
-
},
|
|
13
|
-
});
|
|
14
8
|
|
|
15
9
|
interface RangeData {
|
|
16
10
|
category: string;
|
|
17
11
|
value: [Date, Date];
|
|
18
12
|
}
|
|
19
13
|
|
|
20
|
-
|
|
14
|
+
export const RangeBarChartStory = () => {
|
|
21
15
|
const [rangeData, setRangeData] = useState<RangeData[]>([]);
|
|
22
16
|
|
|
23
17
|
const chartDummyData = useMemo((): RangeData[] => {
|
|
@@ -205,4 +199,4 @@ stories.add("Range Bar Chart", () => {
|
|
|
205
199
|
/>
|
|
206
200
|
</>
|
|
207
201
|
);
|
|
208
|
-
}
|
|
202
|
+
}
|
|
@@ -5,20 +5,14 @@ import {
|
|
|
5
5
|
PencilIcon,
|
|
6
6
|
UserGroupIcon,
|
|
7
7
|
} from "@heroicons/react/24/outline";
|
|
8
|
-
import { storiesOf } from "@storybook/react";
|
|
9
8
|
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
|
10
9
|
import { StatsCard } from ".";
|
|
11
10
|
import { StorySection } from "../../storyUtils";
|
|
12
11
|
import { RangeInterface } from "../DateRange";
|
|
13
|
-
import README from "./README.md";
|
|
14
12
|
|
|
15
|
-
const
|
|
13
|
+
const meta = { title: "Chart/Stats Card" };
|
|
14
|
+
export default meta;
|
|
16
15
|
|
|
17
|
-
stories.addParameters({
|
|
18
|
-
readme: {
|
|
19
|
-
content: README,
|
|
20
|
-
},
|
|
21
|
-
});
|
|
22
16
|
|
|
23
17
|
const baseStats = [
|
|
24
18
|
{
|
|
@@ -50,7 +44,7 @@ const baseStats = [
|
|
|
50
44
|
},
|
|
51
45
|
];
|
|
52
46
|
|
|
53
|
-
|
|
47
|
+
export const StatsCardStory = () => {
|
|
54
48
|
const chartDummyData = useMemo(() => {
|
|
55
49
|
const now = new Date();
|
|
56
50
|
const sevenDaysAgo = new Date();
|
|
@@ -180,4 +174,4 @@ stories.add("Stats Card", () => {
|
|
|
180
174
|
</StorySection>
|
|
181
175
|
</>
|
|
182
176
|
);
|
|
183
|
-
}
|
|
177
|
+
}
|
|
@@ -1,20 +1,14 @@
|
|
|
1
1
|
import { PencilIcon } from "@heroicons/react/24/outline";
|
|
2
|
-
import
|
|
3
|
-
import moment from "moment";
|
|
2
|
+
import dayjs from "../../dayjs";
|
|
4
3
|
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
|
5
4
|
import { TreemapChart } from ".";
|
|
6
5
|
import { RangeInterface } from "../DateRange";
|
|
7
|
-
import README from "./README.md";
|
|
8
6
|
|
|
9
|
-
const
|
|
7
|
+
const meta = { title: "Chart/Treemap Chart" };
|
|
8
|
+
export default meta;
|
|
10
9
|
|
|
11
|
-
stories.addParameters({
|
|
12
|
-
readme: {
|
|
13
|
-
content: README,
|
|
14
|
-
},
|
|
15
|
-
});
|
|
16
10
|
|
|
17
|
-
|
|
11
|
+
export const TreemapChartStory = () => {
|
|
18
12
|
const [seriesData, setSeriesData] = useState<any[]>([]);
|
|
19
13
|
|
|
20
14
|
const chartDummyData = useMemo(() => {
|
|
@@ -79,7 +73,7 @@ stories.add("Treemap Chart", () => {
|
|
|
79
73
|
}, [handleSetData]);
|
|
80
74
|
|
|
81
75
|
const sevenDaysAgo = new Date();
|
|
82
|
-
sevenDaysAgo.setDate(
|
|
76
|
+
sevenDaysAgo.setDate(dayjs().toDate().getDate() - 7);
|
|
83
77
|
|
|
84
78
|
return (
|
|
85
79
|
<>
|
|
@@ -92,7 +86,7 @@ stories.add("Treemap Chart", () => {
|
|
|
92
86
|
dateRangeVisible={true}
|
|
93
87
|
customDate={{
|
|
94
88
|
startDate: sevenDaysAgo,
|
|
95
|
-
endDate:
|
|
89
|
+
endDate: dayjs().toDate(),
|
|
96
90
|
isDuration: true,
|
|
97
91
|
}}
|
|
98
92
|
onChangeDate={handleSetData}
|
|
@@ -108,7 +102,7 @@ stories.add("Treemap Chart", () => {
|
|
|
108
102
|
dateRangeVisible={true}
|
|
109
103
|
customDate={{
|
|
110
104
|
startDate: sevenDaysAgo,
|
|
111
|
-
endDate:
|
|
105
|
+
endDate: dayjs().toDate(),
|
|
112
106
|
isDuration: true,
|
|
113
107
|
}}
|
|
114
108
|
onChangeDate={handleSetData}
|
|
@@ -119,4 +113,4 @@ stories.add("Treemap Chart", () => {
|
|
|
119
113
|
/>
|
|
120
114
|
</>
|
|
121
115
|
);
|
|
122
|
-
}
|
|
116
|
+
}
|
|
@@ -1,20 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import moment from "moment";
|
|
1
|
+
import dayjs from "../../dayjs";
|
|
3
2
|
import React, { useState } from "react";
|
|
4
3
|
import { ChatAnchor } from ".";
|
|
5
4
|
import Logo from "../../../assets/logo.png";
|
|
6
5
|
import { Conversation } from "../chatBase";
|
|
7
|
-
import README from "./README.md";
|
|
8
6
|
|
|
9
|
-
const
|
|
7
|
+
const meta = { title: "Chat/Chat Anchor" };
|
|
8
|
+
export default meta;
|
|
10
9
|
|
|
11
|
-
stories.addParameters({
|
|
12
|
-
readme: {
|
|
13
|
-
content: README,
|
|
14
|
-
},
|
|
15
|
-
});
|
|
16
10
|
|
|
17
|
-
|
|
11
|
+
export const ChatAnchorStory = () => {
|
|
18
12
|
const botUser = {
|
|
19
13
|
id: "1",
|
|
20
14
|
name: "Bot",
|
|
@@ -36,14 +30,14 @@ stories.add("Chat Anchor", () => {
|
|
|
36
30
|
{
|
|
37
31
|
sender: botUser,
|
|
38
32
|
messageBody: "Hi! How can I help you? 🤖",
|
|
39
|
-
createdAt:
|
|
33
|
+
createdAt: dayjs(
|
|
40
34
|
"Fri Nov 03 2023 12:21:14 GMT+0800 (Malaysia Time)"
|
|
41
35
|
).toDate(),
|
|
42
36
|
},
|
|
43
37
|
{
|
|
44
38
|
sender: currentUser,
|
|
45
39
|
messageBody: "Yo, my computer's acting up.",
|
|
46
|
-
createdAt:
|
|
40
|
+
createdAt: dayjs(
|
|
47
41
|
"Fri Nov 03 2023 13:21:14 GMT+0800 (Malaysia Time)"
|
|
48
42
|
).toDate(),
|
|
49
43
|
},
|
|
@@ -51,7 +45,7 @@ stories.add("Chat Anchor", () => {
|
|
|
51
45
|
sender: currentUser,
|
|
52
46
|
messageBody:
|
|
53
47
|
"It keeps saying 'Error 404: Coffee not found' when I start it up.",
|
|
54
|
-
createdAt:
|
|
48
|
+
createdAt: dayjs(
|
|
55
49
|
"Fri Nov 03 2023 14:21:14 GMT+0800 (Malaysia Time)"
|
|
56
50
|
).toDate(),
|
|
57
51
|
},
|
|
@@ -59,14 +53,14 @@ stories.add("Chat Anchor", () => {
|
|
|
59
53
|
sender: botUser,
|
|
60
54
|
messageBody:
|
|
61
55
|
"Sounds like a caffeine emergency! Have you tried offering it coffee?",
|
|
62
|
-
createdAt:
|
|
56
|
+
createdAt: dayjs(
|
|
63
57
|
"Fri Nov 03 2023 15:21:14 GMT+0800 (Malaysia Time)"
|
|
64
58
|
).toDate(),
|
|
65
59
|
},
|
|
66
60
|
{
|
|
67
61
|
sender: currentUser,
|
|
68
62
|
messageBody: "Seriously?",
|
|
69
|
-
createdAt:
|
|
63
|
+
createdAt: dayjs(
|
|
70
64
|
"Fri Nov 03 2023 16:21:14 GMT+0800 (Malaysia Time)"
|
|
71
65
|
).toDate(),
|
|
72
66
|
},
|
|
@@ -74,14 +68,14 @@ stories.add("Chat Anchor", () => {
|
|
|
74
68
|
sender: botUser,
|
|
75
69
|
messageBody:
|
|
76
70
|
"Well, computers do like a jolt of energy, but don't spill, that could be 'mocha-nical' trouble!",
|
|
77
|
-
createdAt:
|
|
71
|
+
createdAt: dayjs(
|
|
78
72
|
"Fri Nov 03 2023 17:21:14 GMT+0800 (Malaysia Time)"
|
|
79
73
|
).toDate(),
|
|
80
74
|
},
|
|
81
75
|
{
|
|
82
76
|
sender: currentUser,
|
|
83
77
|
messageBody: "Cringe. I'll give it a shot. Thanks.",
|
|
84
|
-
createdAt:
|
|
78
|
+
createdAt: dayjs(
|
|
85
79
|
"Fri Nov 03 2023 18:21:14 GMT+0800 (Malaysia Time)"
|
|
86
80
|
).toDate(),
|
|
87
81
|
},
|
|
@@ -89,7 +83,7 @@ stories.add("Chat Anchor", () => {
|
|
|
89
83
|
sender: botUser,
|
|
90
84
|
messageBody:
|
|
91
85
|
"Anytime! If it demands a donut, that's on me. Have a brew-tiful day!",
|
|
92
|
-
createdAt:
|
|
86
|
+
createdAt: dayjs(
|
|
93
87
|
"Fri Nov 03 2023 19:21:14 GMT+0800 (Malaysia Time)"
|
|
94
88
|
).toDate(),
|
|
95
89
|
},
|
|
@@ -153,4 +147,4 @@ stories.add("Chat Anchor", () => {
|
|
|
153
147
|
/>
|
|
154
148
|
</div>
|
|
155
149
|
);
|
|
156
|
-
}
|
|
150
|
+
}
|