blixify-ui-web-mcp 0.1.2 → 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/README.md +96 -110
- package/lib/components/chart/ganttChart/ganttChart.stories.tsx +135 -125
- package/lib/components/chart/heatmapChart/README.md +93 -82
- package/lib/components/chart/heatmapChart/heatmapChart.stories.tsx +122 -84
- 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/README.md +61 -79
- package/lib/components/chat/chatAnchor/chatAnchor.stories.tsx +13 -19
- package/lib/components/chat/chatBase/README.md +244 -196
- package/lib/components/chat/chatBase/chatBase.stories.tsx +828 -250
- package/lib/components/chat/chatDashboard/README.md +89 -129
- package/lib/components/chat/chatDashboard/chatDashboard.stories.tsx +406 -117
- package/lib/components/data/dataGraph/README.md +135 -1
- package/lib/components/data/dataGraph/dataGraph.stories.tsx +90 -77
- package/lib/components/data/dataReference/README.md +141 -43
- package/lib/components/data/dataReference/dataReference.stories.tsx +111 -45
- 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 +48 -46
- 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/README.md +90 -17
- package/lib/components/navigation/bars/bars.stories.tsx +128 -60
- package/lib/components/navigation/bottomTab/bottomTab.stories.tsx +5 -10
- package/lib/components/navigation/breadcrumb/README.md +40 -20
- package/lib/components/navigation/breadcrumb/breadcrumb.stories.tsx +34 -14
- package/lib/components/navigation/header/README.md +67 -108
- package/lib/components/navigation/header/header.stories.tsx +165 -49
- package/lib/components/navigation/leftNav/README.md +121 -66
- package/lib/components/navigation/leftNav/leftNav.stories.tsx +178 -91
- package/lib/components/navigation/tabs/tabs.stories.tsx +57 -39
- 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,15 +1,9 @@
|
|
|
1
|
-
import { storiesOf } from "@storybook/react";
|
|
2
1
|
import React from "react";
|
|
3
2
|
import { PriceItem, Pricing } from ".";
|
|
4
|
-
import README from "./README.md";
|
|
5
3
|
|
|
6
|
-
const
|
|
4
|
+
const meta = { title: "Design/Pricing" };
|
|
5
|
+
export default meta;
|
|
7
6
|
|
|
8
|
-
stories.addParameters({
|
|
9
|
-
readme: {
|
|
10
|
-
content: README,
|
|
11
|
-
},
|
|
12
|
-
});
|
|
13
7
|
|
|
14
8
|
const priceList: PriceItem[] = [
|
|
15
9
|
{
|
|
@@ -72,7 +66,7 @@ const priceList: PriceItem[] = [
|
|
|
72
66
|
},
|
|
73
67
|
];
|
|
74
68
|
|
|
75
|
-
|
|
69
|
+
export const PricingStory = () => {
|
|
76
70
|
return (
|
|
77
71
|
<Pricing
|
|
78
72
|
priceList={priceList}
|
|
@@ -83,4 +77,4 @@ stories.add("Pricing", () => {
|
|
|
83
77
|
}}
|
|
84
78
|
/>
|
|
85
79
|
);
|
|
86
|
-
}
|
|
80
|
+
}
|
|
@@ -1,22 +1,16 @@
|
|
|
1
|
-
import { storiesOf } from "@storybook/react";
|
|
2
1
|
import React from "react";
|
|
3
2
|
import { RightContent } from ".";
|
|
4
3
|
import { Button } from "../../action/button";
|
|
5
|
-
import README from "./README.md";
|
|
6
4
|
|
|
7
|
-
const
|
|
5
|
+
const meta = { title: "Design/Right Content" };
|
|
6
|
+
export default meta;
|
|
8
7
|
|
|
9
|
-
stories.addParameters({
|
|
10
|
-
readme: {
|
|
11
|
-
content: README,
|
|
12
|
-
},
|
|
13
|
-
});
|
|
14
8
|
|
|
15
9
|
const contentList = [
|
|
16
10
|
"MyVAC (Malaysia Vaccine Support Volunteers) is a dedicated volunteer management platform established to assist in the roll out of the government’s vaccination programme, by deploying willing individuals to be part of the vaccination team. This volunteer mobilisation program will be a crucial instrument to drive Malaysia’ vaccination campaign and achieve “Herd Immunity”.",
|
|
17
11
|
];
|
|
18
12
|
|
|
19
|
-
|
|
13
|
+
export const RightContentStory = () => {
|
|
20
14
|
return (
|
|
21
15
|
<RightContent
|
|
22
16
|
title="MyVac"
|
|
@@ -29,4 +23,4 @@ stories.add("Right Content", () => {
|
|
|
29
23
|
}
|
|
30
24
|
/>
|
|
31
25
|
);
|
|
32
|
-
}
|
|
26
|
+
}
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import { storiesOf } from "@storybook/react";
|
|
2
1
|
import React from "react";
|
|
3
2
|
import { SectionList } from ".";
|
|
4
|
-
import README from "./README.md";
|
|
5
3
|
|
|
6
|
-
const
|
|
4
|
+
const meta = { title: "Design/Section List" };
|
|
5
|
+
export default meta;
|
|
7
6
|
|
|
8
|
-
stories.addParameters({
|
|
9
|
-
readme: {
|
|
10
|
-
content: README,
|
|
11
|
-
},
|
|
12
|
-
});
|
|
13
7
|
|
|
14
8
|
const sectionContent = [
|
|
15
9
|
{
|
|
@@ -30,6 +24,6 @@ const sectionContent = [
|
|
|
30
24
|
},
|
|
31
25
|
];
|
|
32
26
|
|
|
33
|
-
|
|
27
|
+
export const SectionListStory = () => {
|
|
34
28
|
return <SectionList sectionContent={sectionContent} />;
|
|
35
|
-
}
|
|
29
|
+
}
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import { storiesOf } from "@storybook/react";
|
|
2
1
|
import React from "react";
|
|
3
2
|
import { Teams } from ".";
|
|
4
|
-
import README from "./README.md";
|
|
5
3
|
|
|
6
|
-
const
|
|
4
|
+
const meta = { title: "Design/Teams" };
|
|
5
|
+
export default meta;
|
|
7
6
|
|
|
8
|
-
stories.addParameters({
|
|
9
|
-
readme: {
|
|
10
|
-
content: README,
|
|
11
|
-
},
|
|
12
|
-
});
|
|
13
7
|
|
|
14
8
|
const people = [
|
|
15
9
|
{
|
|
@@ -56,6 +50,6 @@ const people = [
|
|
|
56
50
|
},
|
|
57
51
|
];
|
|
58
52
|
|
|
59
|
-
|
|
53
|
+
export const TeamsStory = () => {
|
|
60
54
|
return <Teams teams={people} />;
|
|
61
|
-
}
|
|
55
|
+
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { storiesOf } from "@storybook/react";
|
|
2
1
|
import React from "react";
|
|
3
2
|
import { Alert } from ".";
|
|
4
3
|
import {
|
|
@@ -6,17 +5,12 @@ import {
|
|
|
6
5
|
CheckCircleIcon,
|
|
7
6
|
CurrencyDollarIcon,
|
|
8
7
|
} from "@heroicons/react/20/solid";
|
|
9
|
-
import README from "./README.md";
|
|
10
8
|
|
|
11
|
-
const
|
|
9
|
+
const meta = { title: "Display/Alert" };
|
|
10
|
+
export default meta;
|
|
12
11
|
|
|
13
|
-
stories.addParameters({
|
|
14
|
-
readme: {
|
|
15
|
-
content: README,
|
|
16
|
-
},
|
|
17
|
-
});
|
|
18
12
|
|
|
19
|
-
|
|
13
|
+
export const AlertStory = () => {
|
|
20
14
|
return (
|
|
21
15
|
<>
|
|
22
16
|
<Alert
|
|
@@ -68,4 +62,4 @@ stories.add("Alert", () => {
|
|
|
68
62
|
/>
|
|
69
63
|
</>
|
|
70
64
|
);
|
|
71
|
-
}
|
|
65
|
+
}
|
|
@@ -82,6 +82,7 @@ Custom header title (week view):
|
|
|
82
82
|
| `handleMonthChange` | `(date: Date) => void` | — | Called with the new date when the user navigates |
|
|
83
83
|
| `handleViewChange` | `(view: string) => void` | — | Called with the current view type when the view changes |
|
|
84
84
|
| `handleCalendarResize` | `(ref: React.RefObject<any>, isMobileWidth: boolean) => void` | — | Override the default responsive resize behaviour. Receives the calendar ref and a mobile breakpoint flag |
|
|
85
|
+
| `eventColorRules` | `CalendarEventColorRule[]` | — | Maps a field+value on each event to an explicit color. First matching rule wins. Does not override `bgColor` set directly on the event. See CalendarEventColorRule below. |
|
|
85
86
|
|
|
86
87
|
##### EventAvailability
|
|
87
88
|
|
|
@@ -111,3 +112,51 @@ Built-in custom button keys: `backward`, `forward`, `current`, `monthView`, `wee
|
|
|
111
112
|
| ---------- | -------- | -------------------------------- |
|
|
112
113
|
| `view` | `"week"` | Only `"week"` is supported |
|
|
113
114
|
| `duration` | `number` | Number of weeks to display (1–4) |
|
|
115
|
+
|
|
116
|
+
##### CalendarEventColorRule
|
|
117
|
+
|
|
118
|
+
| Name | Type | Required | Description |
|
|
119
|
+
| ------------ | -------- | -------- | -------------------------------------------------------------------- |
|
|
120
|
+
| `field` | `string` | yes | Field name on the event object to match against (e.g. `"status"`) |
|
|
121
|
+
| `value` | `any` | yes | The value to match (e.g. `"Approved"`) |
|
|
122
|
+
| `color` | `string` | yes | Tailwind bg class for the event pill, e.g. `"bg-green-500"` |
|
|
123
|
+
| `hoverColor` | `string` | no | Tailwind hover class for the event pill, e.g. `"hover:bg-green-700"` |
|
|
124
|
+
| `textColor` | `string` | no | Tailwind text class for the event pill, e.g. `"text-white"` |
|
|
125
|
+
|
|
126
|
+
Example — color events by status:
|
|
127
|
+
|
|
128
|
+
```jsx
|
|
129
|
+
<Calendar
|
|
130
|
+
calendarView="dayGridMonth"
|
|
131
|
+
currentDate={currentDate}
|
|
132
|
+
renderEventAvailabilities={() => [
|
|
133
|
+
{ id: "1", title: "Kickoff", start: new Date(), status: "Approved" },
|
|
134
|
+
{ id: "2", title: "Review", start: new Date(), status: "Pending" },
|
|
135
|
+
{ id: "3", title: "Blocked", start: new Date(), status: "Rejected" },
|
|
136
|
+
]}
|
|
137
|
+
lib={{ moment }}
|
|
138
|
+
eventColorRules={[
|
|
139
|
+
{
|
|
140
|
+
field: "status",
|
|
141
|
+
value: "Approved",
|
|
142
|
+
color: "bg-green-500",
|
|
143
|
+
hoverColor: "hover:bg-green-700",
|
|
144
|
+
textColor: "text-white",
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
field: "status",
|
|
148
|
+
value: "Pending",
|
|
149
|
+
color: "bg-yellow-400",
|
|
150
|
+
hoverColor: "hover:bg-yellow-600",
|
|
151
|
+
textColor: "text-white",
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
field: "status",
|
|
155
|
+
value: "Rejected",
|
|
156
|
+
color: "bg-red-500",
|
|
157
|
+
hoverColor: "hover:bg-red-700",
|
|
158
|
+
textColor: "text-white",
|
|
159
|
+
},
|
|
160
|
+
]}
|
|
161
|
+
/>
|
|
162
|
+
```
|
|
@@ -1,55 +1,80 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
|
+
import dayjs from "../../dayjs";
|
|
3
|
+
import { useState } from "react";
|
|
4
4
|
import { Calendar } from ".";
|
|
5
|
-
import { StorySection } from "../../storyUtils";
|
|
6
5
|
import { InputDatePicker } from "../../input/datePicker";
|
|
7
|
-
import
|
|
6
|
+
import { StorySection } from "../../storyUtils";
|
|
8
7
|
|
|
9
|
-
const
|
|
8
|
+
const meta = { title: "Display/Calendar" };
|
|
9
|
+
export default meta;
|
|
10
10
|
|
|
11
|
-
stories.addParameters({
|
|
12
|
-
readme: {
|
|
13
|
-
content: README,
|
|
14
|
-
},
|
|
15
|
-
});
|
|
16
11
|
|
|
17
12
|
const sampleEvents = () => [
|
|
18
13
|
{
|
|
19
14
|
id: "1",
|
|
20
15
|
title: "Blixify Gantt Chart Updates",
|
|
21
|
-
start:
|
|
16
|
+
start: dayjs("2024/05/06 09:30", "YYYY/MM/DD HH:mm").toDate(),
|
|
17
|
+
status: "Approved",
|
|
22
18
|
},
|
|
23
19
|
{
|
|
24
20
|
id: "2",
|
|
25
21
|
title: "Verdant Summarize Updates",
|
|
26
|
-
start:
|
|
22
|
+
start: dayjs("2024/05/08 13:10", "YYYY/MM/DD HH:mm").toDate(),
|
|
23
|
+
status: "Pending",
|
|
27
24
|
},
|
|
28
25
|
{
|
|
29
26
|
id: "3",
|
|
30
27
|
title: "Tech Daily Sync",
|
|
31
|
-
start:
|
|
32
|
-
end:
|
|
28
|
+
start: dayjs("2024/05/08 09:30", "YYYY/MM/DD HH:mm").toDate(),
|
|
29
|
+
end: dayjs("2024/05/08 10:30", "YYYY/MM/DD HH:mm").toDate(),
|
|
30
|
+
status: "Rejected",
|
|
33
31
|
},
|
|
34
32
|
{
|
|
35
33
|
id: "4",
|
|
36
34
|
title: "Blixify UI Update Sync",
|
|
37
|
-
start:
|
|
35
|
+
start: dayjs().toDate(),
|
|
36
|
+
status: "Approved",
|
|
38
37
|
},
|
|
39
38
|
{
|
|
40
39
|
id: "5",
|
|
41
40
|
title: "Blood Donation Campaign",
|
|
42
|
-
start:
|
|
43
|
-
end:
|
|
41
|
+
start: dayjs().toDate(),
|
|
42
|
+
end: dayjs().add(2, "days").toDate(),
|
|
43
|
+
status: "Pending",
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
id: "6",
|
|
47
47
|
title: "Sprint Review",
|
|
48
|
-
start:
|
|
48
|
+
start: dayjs().toDate(),
|
|
49
|
+
status: "Rejected",
|
|
49
50
|
},
|
|
50
51
|
];
|
|
51
52
|
|
|
52
|
-
|
|
53
|
+
const statusColorRules = [
|
|
54
|
+
{
|
|
55
|
+
field: "status",
|
|
56
|
+
value: "Approved",
|
|
57
|
+
color: "bg-green-500",
|
|
58
|
+
hoverColor: "hover:bg-green-700",
|
|
59
|
+
textColor: "text-white",
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
field: "status",
|
|
63
|
+
value: "Pending",
|
|
64
|
+
color: "bg-yellow-400",
|
|
65
|
+
hoverColor: "hover:bg-yellow-600",
|
|
66
|
+
textColor: "text-white",
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
field: "status",
|
|
70
|
+
value: "Rejected",
|
|
71
|
+
color: "bg-red-500",
|
|
72
|
+
hoverColor: "hover:bg-red-700",
|
|
73
|
+
textColor: "text-white",
|
|
74
|
+
},
|
|
75
|
+
];
|
|
76
|
+
|
|
77
|
+
export const CalendarStory = () => {
|
|
53
78
|
const [currentDate, setCurrentDate] = useState<Date>(new Date());
|
|
54
79
|
|
|
55
80
|
return (
|
|
@@ -72,7 +97,7 @@ stories.add("Calendar", () => {
|
|
|
72
97
|
dayMaxEvents={5}
|
|
73
98
|
handleMonthChange={setCurrentDate}
|
|
74
99
|
renderEventAvailabilities={sampleEvents}
|
|
75
|
-
lib={{
|
|
100
|
+
lib={{ dayjs }}
|
|
76
101
|
height="700px"
|
|
77
102
|
/>
|
|
78
103
|
</div>
|
|
@@ -90,7 +115,7 @@ stories.add("Calendar", () => {
|
|
|
90
115
|
dayMaxEvents={5}
|
|
91
116
|
handleMonthChange={() => {}}
|
|
92
117
|
renderEventAvailabilities={sampleEvents}
|
|
93
|
-
lib={{
|
|
118
|
+
lib={{ dayjs }}
|
|
94
119
|
height="700px"
|
|
95
120
|
publicHolidays={{ enable: true, key: "", country: "malaysia" }}
|
|
96
121
|
/>
|
|
@@ -108,7 +133,7 @@ stories.add("Calendar", () => {
|
|
|
108
133
|
dayMaxEvents={3}
|
|
109
134
|
handleMonthChange={() => {}}
|
|
110
135
|
renderEventAvailabilities={sampleEvents}
|
|
111
|
-
lib={{
|
|
136
|
+
lib={{ dayjs }}
|
|
112
137
|
height="700px"
|
|
113
138
|
customView={{ view: "week", duration: 2 }}
|
|
114
139
|
enableCustomViewSelect
|
|
@@ -127,8 +152,26 @@ stories.add("Calendar", () => {
|
|
|
127
152
|
dayMaxEvents={5}
|
|
128
153
|
handleMonthChange={() => {}}
|
|
129
154
|
renderEventAvailabilities={sampleEvents}
|
|
130
|
-
lib={{
|
|
155
|
+
lib={{ dayjs }}
|
|
156
|
+
height="700px"
|
|
157
|
+
/>
|
|
158
|
+
</div>
|
|
159
|
+
</StorySection>
|
|
160
|
+
|
|
161
|
+
<StorySection
|
|
162
|
+
title="Event Color Rules"
|
|
163
|
+
description="Pass eventColorRules to color events based on a field value. Each rule maps a field+value pair to a bg/hover/text color. First matching rule wins."
|
|
164
|
+
>
|
|
165
|
+
<div className="w-full">
|
|
166
|
+
<Calendar
|
|
167
|
+
calendarView="dayGridMonth"
|
|
168
|
+
currentDate={new Date()}
|
|
169
|
+
dayMaxEvents={5}
|
|
170
|
+
handleMonthChange={() => {}}
|
|
171
|
+
renderEventAvailabilities={sampleEvents}
|
|
172
|
+
lib={{ dayjs }}
|
|
131
173
|
height="700px"
|
|
174
|
+
eventColorRules={statusColorRules}
|
|
132
175
|
/>
|
|
133
176
|
</div>
|
|
134
177
|
</StorySection>
|
|
@@ -144,11 +187,11 @@ stories.add("Calendar", () => {
|
|
|
144
187
|
dayMaxEvents={3}
|
|
145
188
|
handleMonthChange={() => {}}
|
|
146
189
|
renderEventAvailabilities={sampleEvents}
|
|
147
|
-
lib={{
|
|
190
|
+
lib={{ dayjs }}
|
|
148
191
|
height="700px"
|
|
149
192
|
customHeaderFn={(dateInfo) => {
|
|
150
|
-
const start =
|
|
151
|
-
const end =
|
|
193
|
+
const start = dayjs(dateInfo.start.marker).format("DD/MM/YYYY");
|
|
194
|
+
const end = dayjs(dateInfo.end.marker).format("DD/MM/YYYY");
|
|
152
195
|
return `${start} - ${end}`;
|
|
153
196
|
}}
|
|
154
197
|
/>
|
|
@@ -156,4 +199,4 @@ stories.add("Calendar", () => {
|
|
|
156
199
|
</StorySection>
|
|
157
200
|
</>
|
|
158
201
|
);
|
|
159
|
-
}
|
|
202
|
+
}
|
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
import { storiesOf } from "@storybook/react";
|
|
2
1
|
import React, { useState } from "react";
|
|
3
2
|
import { Clipboard } from ".";
|
|
4
|
-
import README from "./README.md";
|
|
5
3
|
|
|
6
|
-
const
|
|
4
|
+
const meta = { title: "Design/Clipboard" };
|
|
5
|
+
export default meta;
|
|
7
6
|
|
|
8
|
-
stories.addParameters({
|
|
9
|
-
readme: {
|
|
10
|
-
content: README,
|
|
11
|
-
},
|
|
12
|
-
});
|
|
13
7
|
|
|
14
|
-
|
|
8
|
+
export const ClipboardStory = () => {
|
|
15
9
|
const [copyCount, setCopyCount] = useState(0);
|
|
16
10
|
const [copiedText, setCopiedText] = useState("");
|
|
17
11
|
return (
|
|
@@ -29,4 +23,4 @@ stories.add("Clipboard", () => {
|
|
|
29
23
|
</div>
|
|
30
24
|
</div>
|
|
31
25
|
);
|
|
32
|
-
}
|
|
26
|
+
}
|
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
import { storiesOf } from "@storybook/react";
|
|
2
1
|
import React from "react";
|
|
3
2
|
import { DetailList } from ".";
|
|
4
|
-
import README from "./README.md";
|
|
5
3
|
import { Tag } from "../tag";
|
|
6
|
-
const stories = storiesOf("Display", module);
|
|
7
4
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
content: README,
|
|
11
|
-
},
|
|
12
|
-
});
|
|
5
|
+
const meta = { title: "Display/Detail List" };
|
|
6
|
+
export default meta;
|
|
13
7
|
|
|
14
|
-
|
|
8
|
+
|
|
9
|
+
export const DetailListStory = () => {
|
|
15
10
|
return (
|
|
16
11
|
<>
|
|
17
12
|
<DetailList
|
|
@@ -128,4 +123,4 @@ stories.add("Detail List", () => {
|
|
|
128
123
|
/>
|
|
129
124
|
</>
|
|
130
125
|
);
|
|
131
|
-
}
|
|
126
|
+
}
|
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { Drawer } from ".";
|
|
3
3
|
import { Button } from "../../action/button";
|
|
4
|
-
import README from "./README.md";
|
|
5
4
|
|
|
6
|
-
const
|
|
5
|
+
const meta = { title: "Display/Drawer" };
|
|
6
|
+
export default meta;
|
|
7
7
|
|
|
8
|
-
stories.addParameters({
|
|
9
|
-
readme: {
|
|
10
|
-
content: README,
|
|
11
|
-
},
|
|
12
|
-
});
|
|
13
8
|
|
|
14
|
-
|
|
9
|
+
export const DrawerStory = () => {
|
|
15
10
|
return (
|
|
16
11
|
<div className="flex flex-col gap-4">
|
|
17
12
|
<div className="flex gap-x-3">
|
|
@@ -63,4 +58,4 @@ stories.add("Drawer", () => {
|
|
|
63
58
|
</div>
|
|
64
59
|
</div>
|
|
65
60
|
);
|
|
66
|
-
}
|
|
61
|
+
}
|
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
import { InformationCircleIcon } from "@heroicons/react/24/outline";
|
|
2
|
-
import { storiesOf } from "@storybook/react";
|
|
3
2
|
import React from "react";
|
|
4
3
|
import { EmptyState } from ".";
|
|
5
|
-
import README from "./README.md";
|
|
6
4
|
|
|
7
|
-
const
|
|
5
|
+
const meta = { title: "Display/Empty State" };
|
|
6
|
+
export default meta;
|
|
8
7
|
|
|
9
|
-
stories.addParameters({
|
|
10
|
-
readme: {
|
|
11
|
-
content: README,
|
|
12
|
-
},
|
|
13
|
-
});
|
|
14
8
|
|
|
15
|
-
|
|
9
|
+
export const EmptyStateStory = () => {
|
|
16
10
|
return (
|
|
17
11
|
<EmptyState
|
|
18
12
|
text="There is no data to display"
|
|
19
13
|
icon={<InformationCircleIcon className="h-10 text-gray-600" />}
|
|
20
14
|
/>
|
|
21
15
|
);
|
|
22
|
-
}
|
|
16
|
+
}
|
|
@@ -3,20 +3,14 @@ import {
|
|
|
3
3
|
HandThumbUpIcon,
|
|
4
4
|
UserIcon,
|
|
5
5
|
} from "@heroicons/react/24/outline";
|
|
6
|
-
import { storiesOf } from "@storybook/react";
|
|
7
6
|
import React, { useState } from "react";
|
|
8
7
|
import { Feed, Feeds } from ".";
|
|
9
|
-
import README from "./README.md";
|
|
10
8
|
|
|
11
|
-
const
|
|
9
|
+
const meta = { title: "Display/Feeds" };
|
|
10
|
+
export default meta;
|
|
12
11
|
|
|
13
|
-
stories.addParameters({
|
|
14
|
-
readme: {
|
|
15
|
-
content: README,
|
|
16
|
-
},
|
|
17
|
-
});
|
|
18
12
|
|
|
19
|
-
|
|
13
|
+
export const FeedsStory = () => {
|
|
20
14
|
const [collapsedIds, setCollapsedIds] = useState<string[]>(["1"]);
|
|
21
15
|
|
|
22
16
|
const feeds: Feed[] = [
|
|
@@ -72,4 +66,4 @@ stories.add("Feeds", () => {
|
|
|
72
66
|
onChangeCollapse={(ids) => setCollapsedIds(ids)}
|
|
73
67
|
/>
|
|
74
68
|
);
|
|
75
|
-
}
|
|
69
|
+
}
|
|
@@ -120,13 +120,17 @@ const columns: DataStructure[] = [
|
|
|
120
120
|
|
|
121
121
|
##### FlexTableColumn
|
|
122
122
|
|
|
123
|
-
| Property
|
|
124
|
-
|
|
|
125
|
-
| `key`
|
|
126
|
-
| `title`
|
|
127
|
-
| `type`
|
|
128
|
-
| `width`
|
|
129
|
-
| `editable`
|
|
123
|
+
| Property | Type | Description |
|
|
124
|
+
| -------------------- | ------------------------------------------------------ | --------------------------------------------------------------------------------------------------------- |
|
|
125
|
+
| `key` | `string` | Unique column identifier |
|
|
126
|
+
| `title` | `string` | Column header label |
|
|
127
|
+
| `type` | `"text" \| "number" \| "textarea" \| "math" \| "list"` | Input type for the column |
|
|
128
|
+
| `width` | `string` | Tailwind width class, e.g. `"min-w-[200px]"` |
|
|
129
|
+
| `editable` | `boolean` | Whether the column cells can be edited |
|
|
130
|
+
| `listSelection` | `string[]` | Options for `type: "list"` columns. Automatically carried from `DataStructure.listSelection` |
|
|
131
|
+
| `listSelectionLabel` | `string[]` | Display labels for `listSelection` options. Automatically carried from `DataStructure.listSelectionLabel` |
|
|
132
|
+
|
|
133
|
+
> `type: "list"` columns render a `Select` dropdown with `portalDropdown` and `portalDropdownScrollOffset={false}` hardcoded — the dropdown always pops out above the table and is never clipped by `overflow: hidden`.
|
|
130
134
|
|
|
131
135
|
##### FlexMathQuery
|
|
132
136
|
|