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.
Files changed (135) hide show
  1. package/lib/components/action/button/README.md +12 -11
  2. package/lib/components/action/button/button.stories.tsx +4 -10
  3. package/lib/components/action/buttonGroup/buttonGroup.stories.tsx +4 -10
  4. package/lib/components/action/iconButton/iconButton.stories.tsx +4 -10
  5. package/lib/components/action/radioList/radioList.stories.tsx +4 -10
  6. package/lib/components/action/slider/slider.stories.tsx +4 -10
  7. package/lib/components/action/textButton/textButton.stories.tsx +4 -10
  8. package/lib/components/action/toggle/toggle.stories.tsx +4 -10
  9. package/lib/components/advanced/collapse/collapse.stories.tsx +4 -10
  10. package/lib/components/advanced/infoWindow/infoWindow.stories.tsx +4 -10
  11. package/lib/components/advanced/popUp/README.md +21 -7
  12. package/lib/components/advanced/popUp/popUp.stories.tsx +4 -10
  13. package/lib/components/auth/bareSignIn/bareSignIn.stories.tsx +30 -10
  14. package/lib/components/auth/bareSignUp/bareSignUp.stories.tsx +4 -10
  15. package/lib/components/auth/signIn/signIn.stories.tsx +4 -10
  16. package/lib/components/auth/signUp/signUp.stories.tsx +4 -10
  17. package/lib/components/chart/areaChart/areaChart.stories.tsx +7 -13
  18. package/lib/components/chart/barChart/barChart.stories.tsx +7 -13
  19. package/lib/components/chart/boxPlotChart/boxPlotChart.stories.tsx +8 -14
  20. package/lib/components/chart/bubbleChart/bubbleChart.stories.tsx +8 -14
  21. package/lib/components/chart/card/card.stories.tsx +4 -10
  22. package/lib/components/chart/ganttChart/README.md +96 -110
  23. package/lib/components/chart/ganttChart/ganttChart.stories.tsx +135 -125
  24. package/lib/components/chart/heatmapChart/README.md +93 -82
  25. package/lib/components/chart/heatmapChart/heatmapChart.stories.tsx +122 -84
  26. package/lib/components/chart/lineChart/lineChart.stories.tsx +4 -10
  27. package/lib/components/chart/pieChart/pieChart.stories.tsx +4 -10
  28. package/lib/components/chart/polarAreaChart/polarAreaChart.stories.tsx +8 -14
  29. package/lib/components/chart/radarChart/radarChart.stories.tsx +4 -10
  30. package/lib/components/chart/radialBar/radialChart.stories.tsx +4 -10
  31. package/lib/components/chart/rangeBarChart/rangeBarChart.stories.tsx +4 -10
  32. package/lib/components/chart/statsCard/statsCard.stories.tsx +4 -10
  33. package/lib/components/chart/treemapChart/treemapChart.stories.tsx +8 -14
  34. package/lib/components/chat/chatAnchor/README.md +61 -79
  35. package/lib/components/chat/chatAnchor/chatAnchor.stories.tsx +13 -19
  36. package/lib/components/chat/chatBase/README.md +244 -196
  37. package/lib/components/chat/chatBase/chatBase.stories.tsx +828 -250
  38. package/lib/components/chat/chatDashboard/README.md +89 -129
  39. package/lib/components/chat/chatDashboard/chatDashboard.stories.tsx +406 -117
  40. package/lib/components/data/dataGraph/README.md +135 -1
  41. package/lib/components/data/dataGraph/dataGraph.stories.tsx +90 -77
  42. package/lib/components/data/dataReference/README.md +141 -43
  43. package/lib/components/data/dataReference/dataReference.stories.tsx +111 -45
  44. package/lib/components/data/dataTemplate/README.md +88 -61
  45. package/lib/components/data/dataTemplate/dataModule.stories.tsx +4 -10
  46. package/lib/components/data/dataTemplate/dataTemplate.stories.tsx +4 -10
  47. package/lib/components/data/dataWrapper/README.md +48 -46
  48. package/lib/components/data/dataWrapper/dataWrapper.stories.tsx +258 -489
  49. package/lib/components/data/queryForm/queryForm.stories.tsx +4 -10
  50. package/lib/components/data/readQuery/readQuery.stories.tsx +4 -9
  51. package/lib/components/data/readQueryHoc/readQueryHoc.stories.tsx +4 -10
  52. package/lib/components/data/writeQuery/writeQuery.stories.tsx +4 -8
  53. package/lib/components/design/actionSection/actionSection.stories.tsx +6 -10
  54. package/lib/components/design/banner/banner.stories.tsx +4 -10
  55. package/lib/components/design/bannerAction/bannerAction.stories.tsx +4 -10
  56. package/lib/components/design/blogSection/blogSection.stories.tsx +4 -10
  57. package/lib/components/design/carouselSection/carouselSection.stories.tsx +4 -10
  58. package/lib/components/design/designList/designList.stories.tsx +4 -10
  59. package/lib/components/design/faq/faq.stories.tsx +4 -10
  60. package/lib/components/design/fileGrid/fileGrid.stories.tsx +4 -10
  61. package/lib/components/design/fileViewer/fileViewer.stories.tsx +4 -10
  62. package/lib/components/design/footerSection/footerSection.stories.tsx +4 -10
  63. package/lib/components/design/googleReview/googleReview.stories.tsx +4 -10
  64. package/lib/components/design/heroSection/heroSection.stories.tsx +4 -10
  65. package/lib/components/design/iconList/iconList.stories.tsx +4 -10
  66. package/lib/components/design/imageGallery/imageGallery.stories.tsx +4 -10
  67. package/lib/components/design/imageZoom/imageZoom.stories.tsx +4 -10
  68. package/lib/components/design/leftContent/leftContent.stories.tsx +4 -10
  69. package/lib/components/design/logoCloud/logoCloud.stories.tsx +4 -10
  70. package/lib/components/design/onboarding/onboarding.stories.tsx +4 -10
  71. package/lib/components/design/pricing/pricing.stories.tsx +4 -10
  72. package/lib/components/design/rightContent/rightContent.stories.tsx +4 -10
  73. package/lib/components/design/sectionList/sectionList.stories.tsx +4 -10
  74. package/lib/components/design/teams/teams.stories.tsx +4 -10
  75. package/lib/components/display/alert/alert.stories.tsx +4 -10
  76. package/lib/components/display/calendar/README.md +49 -0
  77. package/lib/components/display/calendar/calendar.stories.tsx +71 -28
  78. package/lib/components/display/clipboard/clipboard.stories.tsx +4 -10
  79. package/lib/components/display/detailList/detailList.stories.tsx +5 -10
  80. package/lib/components/display/drawer/drawer.stories.tsx +5 -10
  81. package/lib/components/display/emptyState/emptyState.stories.tsx +4 -10
  82. package/lib/components/display/feeds/feeds.stories.tsx +4 -10
  83. package/lib/components/display/flexTable/README.md +11 -7
  84. package/lib/components/display/flexTable/flexTable.stories.tsx +114 -11
  85. package/lib/components/display/grid/README.md +28 -27
  86. package/lib/components/display/grid/grid.stories.tsx +4 -10
  87. package/lib/components/display/kanban/kanban.stories.tsx +14 -20
  88. package/lib/components/display/list/README.md +30 -29
  89. package/lib/components/display/list/list.stories.tsx +4 -10
  90. package/lib/components/display/loading/loading.stories.tsx +5 -10
  91. package/lib/components/display/mapView/mapView.stories.tsx +4 -10
  92. package/lib/components/display/modal/modal.stories.tsx +4 -11
  93. package/lib/components/display/notification/notification.stories.tsx +4 -10
  94. package/lib/components/display/progress/progress.stories.tsx +5 -10
  95. package/lib/components/display/stepper/stepper.stories.tsx +5 -10
  96. package/lib/components/display/table/README.md +38 -37
  97. package/lib/components/display/table/table.stories.tsx +8 -14
  98. package/lib/components/display/tag/tag.stories.tsx +4 -10
  99. package/lib/components/input/address/address.stories.tsx +4 -10
  100. package/lib/components/input/canvas/canvas.stories.tsx +4 -10
  101. package/lib/components/input/checkbox/checkbox.stories.tsx +4 -10
  102. package/lib/components/input/datePicker/datePicker.stories.tsx +4 -10
  103. package/lib/components/input/form/form.stories.tsx +4 -10
  104. package/lib/components/input/markdown/markdown.stories.tsx +5 -10
  105. package/lib/components/input/monthYearPicker/monthYearPicker.stories.tsx +4 -10
  106. package/lib/components/input/netPromoterScore/netPromoterScore.stories.tsx +4 -10
  107. package/lib/components/input/rating/rating.stories.tsx +4 -10
  108. package/lib/components/input/select/README.md +30 -29
  109. package/lib/components/input/select/select.stories.tsx +4 -10
  110. package/lib/components/input/signature/signature.stories.tsx +4 -10
  111. package/lib/components/input/textArea/textArea.stories.tsx +4 -10
  112. package/lib/components/input/textInput/textinput.stories.tsx +4 -10
  113. package/lib/components/input/uploadInput/uploadInput.stories.tsx +135 -11
  114. package/lib/components/navigation/bars/README.md +90 -17
  115. package/lib/components/navigation/bars/bars.stories.tsx +128 -60
  116. package/lib/components/navigation/bottomTab/bottomTab.stories.tsx +5 -10
  117. package/lib/components/navigation/breadcrumb/README.md +40 -20
  118. package/lib/components/navigation/breadcrumb/breadcrumb.stories.tsx +34 -14
  119. package/lib/components/navigation/header/README.md +67 -108
  120. package/lib/components/navigation/header/header.stories.tsx +165 -49
  121. package/lib/components/navigation/leftNav/README.md +121 -66
  122. package/lib/components/navigation/leftNav/leftNav.stories.tsx +178 -91
  123. package/lib/components/navigation/tabs/tabs.stories.tsx +57 -39
  124. package/lib/components/structure/column/column.stories.tsx +5 -10
  125. package/lib/components/structure/container/container.stories.tsx +5 -10
  126. package/lib/components/structure/link/link.stories.tsx +4 -10
  127. package/lib/components/structure/text/text.stories.tsx +5 -10
  128. package/lib/components/template/authPage/authPage.stories.tsx +6 -5
  129. package/lib/components/template/landingPage/landingPage.stories.tsx +8 -6
  130. package/lib/components/template/productListing/productListing.stories.tsx +7 -13
  131. package/lib/components/template/productOverview/productOverview.stories.tsx +5 -11
  132. package/lib/components/template/shoppingCart/shoppingCart.stories.tsx +6 -12
  133. package/lib/components/template/userHomePage/userHomePage.stories.tsx +7 -6
  134. package/lib/components/template/userRankingDashboard/userRankingDashboard.stories.tsx +5 -11
  135. 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 stories = storiesOf("Design", module);
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
- stories.add("Pricing", () => {
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 stories = storiesOf("Design", module);
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
- stories.add("Right Content", () => {
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 stories = storiesOf("Design", module);
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
- stories.add("Section List", () => {
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 stories = storiesOf("Design", module);
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
- stories.add("Teams", () => {
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 stories = storiesOf("Display", module);
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
- stories.add("Alert", () => {
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 { storiesOf } from "@storybook/react";
2
- import moment from "moment";
3
- import React, { useState } from "react";
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 README from "./README.md";
6
+ import { StorySection } from "../../storyUtils";
8
7
 
9
- const stories = storiesOf("Display", module);
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: moment("2024/05/06 09:30", "YYYY/MM/DD HH:mm").toDate(),
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: moment("2024/05/08 13:10", "YYYY/MM/DD HH:mm").toDate(),
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: moment("2024/05/08 09:30", "YYYY/MM/DD HH:mm").toDate(),
32
- end: moment("2024/05/08 10:30", "YYYY/MM/DD HH:mm").toDate(),
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: moment().toDate(),
35
+ start: dayjs().toDate(),
36
+ status: "Approved",
38
37
  },
39
38
  {
40
39
  id: "5",
41
40
  title: "Blood Donation Campaign",
42
- start: moment().toDate(),
43
- end: moment().add(2, "days").toDate(),
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: moment().toDate(),
48
+ start: dayjs().toDate(),
49
+ status: "Rejected",
49
50
  },
50
51
  ];
51
52
 
52
- stories.add("Calendar", () => {
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={{ moment }}
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={{ moment }}
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={{ moment }}
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={{ moment }}
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={{ moment }}
190
+ lib={{ dayjs }}
148
191
  height="700px"
149
192
  customHeaderFn={(dateInfo) => {
150
- const start = moment(dateInfo.start.marker).format("DD/MM/YYYY");
151
- const end = moment(dateInfo.end.marker).format("DD/MM/YYYY");
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 stories = storiesOf("Design", module);
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
- stories.add("Clipboard", () => {
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
- stories.addParameters({
9
- readme: {
10
- content: README,
11
- },
12
- });
5
+ const meta = { title: "Display/Detail List" };
6
+ export default meta;
13
7
 
14
- stories.add("Detail List", () => {
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 { storiesOf } from "@storybook/react";
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 stories = storiesOf("Display", module);
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
- stories.add("Drawer", () => {
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 stories = storiesOf("Display", module);
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
- stories.add("Empty State", () => {
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 stories = storiesOf("Display", module);
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
- stories.add("Feeds", () => {
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 | 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 |
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