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,19 +1,12 @@
1
- import { storiesOf } from "@storybook/react";
2
1
  import React, { useRef, useState } from "react";
3
2
  import { FlexTable, FlexTableItem } from ".";
4
3
  import { StorySection } from "../../storyUtils";
5
4
  import { Button } from "../../action/button";
6
5
  import { DataStructure, FlexMathQuery } from "../../data/dataTemplate/model";
7
6
  import { Form } from "../../input/form";
8
- import README from "./README.md";
9
7
 
10
- const stories = storiesOf("Display", module);
11
-
12
- stories.addParameters({
13
- readme: {
14
- content: README,
15
- },
16
- });
8
+ const meta = { title: "Display/FlexTable" };
9
+ export default meta;
17
10
 
18
11
  const researchCategories = [
19
12
  {
@@ -136,6 +129,57 @@ const columnsWithMath: DataStructure[] = [
136
129
  },
137
130
  ];
138
131
 
132
+ // INFO: columns for image and time picker demo
133
+ const mediaColumns: DataStructure[] = [
134
+ { id: "photo", name: "Photo", type: "image" },
135
+ { id: "photos", name: "Photos", type: "multipleImage" },
136
+ { id: "startTime", name: "Start Time", type: "date", hideShowDate: true },
137
+ { id: "endTime", name: "End Time", type: "date", hideShowDate: true },
138
+ ];
139
+
140
+ const sampleMediaData: FlexTableItem[] = [
141
+ {
142
+ id: "m1",
143
+ title: "Session A",
144
+ category: null,
145
+ photo: {
146
+ data: [
147
+ {
148
+ token: "photo-m1-a",
149
+ fileName: "https://placehold.co/56x56/3B82F6/FFFFFF.jpg",
150
+ },
151
+ ],
152
+ upload: [],
153
+ remove: [],
154
+ },
155
+ photos: {
156
+ data: [
157
+ {
158
+ token: "photos-m1-1",
159
+ fileName: "https://placehold.co/56x56/10B981/FFFFFF.jpg",
160
+ },
161
+ {
162
+ token: "photos-m1-2",
163
+ fileName: "https://placehold.co/56x56/F59E0B/FFFFFF.jpg",
164
+ },
165
+ ],
166
+ upload: [],
167
+ remove: [],
168
+ },
169
+ startTime: new Date("2026-06-08T09:00:00").toISOString(),
170
+ endTime: new Date("2026-06-08T11:30:00").toISOString(),
171
+ },
172
+ {
173
+ id: "m2",
174
+ title: "Session B",
175
+ category: null,
176
+ photo: { data: [], upload: [], remove: [] },
177
+ photos: { data: [], upload: [], remove: [] },
178
+ startTime: new Date("2026-06-08T13:00:00").toISOString(),
179
+ endTime: null,
180
+ },
181
+ ];
182
+
139
183
  const flexMathQueries: FlexMathQuery[] = [
140
184
  { type: "categoryPercentage", targetCategory: "Test 2", maxPercentage: 50 },
141
185
  {
@@ -146,9 +190,10 @@ const flexMathQueries: FlexMathQuery[] = [
146
190
  },
147
191
  ];
148
192
 
149
- stories.add("FlexTable", () => {
193
+ export const FlexTableStory = () => {
150
194
  const [data, setData] = useState<FlexTableItem[]>(sampleData);
151
195
  const [viewOnlyData] = useState<FlexTableItem[]>(sampleData);
196
+ const [mediaData, setMediaData] = useState<FlexTableItem[]>(sampleMediaData);
152
197
 
153
198
  const formRef = useRef<any>(null);
154
199
  const tableRef = useRef<any>(null);
@@ -308,6 +353,64 @@ stories.add("FlexTable", () => {
308
353
  />
309
354
  </div>
310
355
  </StorySection>
356
+
357
+ <StorySection
358
+ title="Image & Multiple Image Columns"
359
+ description="type='image' stores a single URL; type='multipleImage' stores an array. multipleImage supports selecting multiple files at once. Click any thumbnail to open it in the zoom/rotate/download preview modal."
360
+ >
361
+ <div className="w-full">
362
+ <FlexTable
363
+ label="Media Table (Editable)"
364
+ data={mediaData}
365
+ columns={mediaColumns}
366
+ hideCategory={true}
367
+ onChangeData={setMediaData}
368
+ />
369
+ </div>
370
+ </StorySection>
371
+
372
+ <StorySection
373
+ title="Image Columns (Read Only)"
374
+ description="disabled=true renders thumbnails inline with no upload controls. Thumbnails are still clickable to open the zoom preview."
375
+ >
376
+ <div className="w-full">
377
+ <FlexTable
378
+ label="Media Table (Read Only)"
379
+ data={mediaData}
380
+ columns={mediaColumns}
381
+ hideCategory={true}
382
+ disabled={true}
383
+ />
384
+ </div>
385
+ </StorySection>
386
+
387
+ <StorySection
388
+ title="Time Picker Columns"
389
+ description="A DataStructure column with type='date' and hideShowDate=true maps to a timePicker cell. Values are stored as ISO strings and displayed as HH:MM in read mode."
390
+ >
391
+ <div className="w-full">
392
+ <FlexTable
393
+ label="Schedule (Editable)"
394
+ data={mediaData}
395
+ columns={[
396
+ {
397
+ id: "startTime",
398
+ name: "Start Time",
399
+ type: "date",
400
+ hideShowDate: true,
401
+ },
402
+ {
403
+ id: "endTime",
404
+ name: "End Time",
405
+ type: "date",
406
+ hideShowDate: true,
407
+ },
408
+ ]}
409
+ hideCategory={true}
410
+ onChangeData={setMediaData}
411
+ />
412
+ </div>
413
+ </StorySection>
311
414
  </>
312
415
  );
313
- });
416
+ };
@@ -79,33 +79,34 @@ Custom ribbon on card image:
79
79
 
80
80
  ##### Optional props
81
81
 
82
- | Name | Type | Default | Description |
83
- | ----------------------- | ------------------------------------------ | ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
84
- | `paginationType` | `"cursor" \| "page"` | — | Enables pagination. `"cursor"` for token-based, `"page"` for numbered pages |
85
- | `limit` | `number` | `5` | Cards per page. Required when `paginationType` is set |
86
- | `pageIndex` | `number` | — | Current page index (0-based). Required when `paginationType` is set |
87
- | `cursor` | `any` | — | Pass a truthy value while more pages exist; falsy on the last page. Required when `paginationType="cursor"` |
88
- | `size` | `number` | — | Total record count. Required when `paginationType="page"` to calculate page count |
89
- | `hidePagination` | `boolean` | `false` | Hide the pagination bar |
90
- | `horizontalScroll` | `boolean` | `false` | Render cards in a horizontally scrollable row instead of a grid |
91
- | `infinityScroll` | `boolean` | `false` | Auto-load the next page when the user scrolls to the end. Requires `horizontalScroll=true` and `paginationType="cursor"` |
92
- | `gridColClassName` | `string` | `"sm:grid-cols-2 sm:gap-x-6 lg:grid-cols-3 lg:gap-x-8"` | Tailwind grid column classes |
93
- | `className` | `string` | — | Tailwind classes for the outer container |
94
- | `itemClassName` | `string` | — | Tailwind classes applied to each card, e.g. `"shadow-md rounded"` |
95
- | `selectedItemClassName` | `string` | — | Tailwind classes applied to cards whose id is in `selectedItemsId` |
96
- | `selectedItemsId` | `string[]` | — | IDs of cards to highlight with `selectedItemClassName` |
97
- | `customGridItems` | `{ [id: string]: ReactElement }` | — | Replace a specific card with custom JSX. The key must match the item's `id` in `data` |
98
- | `imgContain` | `boolean` | `false` | Use `object-contain` instead of `object-cover` for card images |
99
- | `darkMode` | `boolean` | `false` | Enable dark mode card styling |
100
- | `darkModeBg` | `string` | — | Tailwind bg class for dark mode cards, e.g. `"bg-gray-800"` |
101
- | `newTabUrl` | `string` | — | Prepends a link to each card. The card `id` is appended to this URL |
102
- | `addNewTabUrl` | `string` | — | URL appended to the add-card action link |
103
- | `draggable` | `boolean` | `false` | Enable drag-and-drop reordering of cards |
104
- | `droppable` | `boolean` | `false` | Allow cards to be dropped onto other cards |
105
- | `renderImgRibbon` | `(id: string) => ReactElement \| null` | — | Return a ReactElement to overlay on the card image (e.g. a ribbon badge), or `null` for no ribbon |
106
- | `onClickData` | `(id: string) => void` | — | Called with the card id when a card is clicked |
107
- | `onDropData` | `(dragId: string, dropId: string) => void` | — | Called when a card is dropped onto another card |
108
- | `handleUpdatePageIndex` | `(value: string \| number) => void` | — | Called with `"next"`, `"prev"`, or a page number when the user navigates |
82
+ | Name | Type | Default | Description |
83
+ | ----------------------- | ------------------------------------------ | ------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
84
+ | `paginationType` | `"cursor" \| "page"` | — | Enables pagination. `"cursor"` for token-based, `"page"` for numbered pages |
85
+ | `limit` | `number` | `5` | Cards per page. Required when `paginationType` is set |
86
+ | `pageIndex` | `number` | — | Current page index (0-based). Required when `paginationType` is set |
87
+ | `cursor` | `any` | — | Pass a truthy value while more pages exist; falsy on the last page. Required when `paginationType="cursor"` |
88
+ | `size` | `number` | — | Total record count. Required when `paginationType="page"` to calculate page count |
89
+ | `hidePagination` | `boolean` | `false` | Hide the pagination bar |
90
+ | `customPaginationSize` | `number` | — | Overrides the count shown in `Showing X result(s)`. When provided, replaces `size` (page mode) or `data.length` (cursor mode) |
91
+ | `horizontalScroll` | `boolean` | `false` | Render cards in a horizontally scrollable row instead of a grid |
92
+ | `infinityScroll` | `boolean` | `false` | Auto-load the next page when the user scrolls to the end. Requires `horizontalScroll=true` and `paginationType="cursor"` |
93
+ | `gridColClassName` | `string` | `"sm:grid-cols-2 sm:gap-x-6 lg:grid-cols-3 lg:gap-x-8"` | Tailwind grid column classes |
94
+ | `className` | `string` | — | Tailwind classes for the outer container |
95
+ | `itemClassName` | `string` | — | Tailwind classes applied to each card, e.g. `"shadow-md rounded"` |
96
+ | `selectedItemClassName` | `string` | — | Tailwind classes applied to cards whose id is in `selectedItemsId` |
97
+ | `selectedItemsId` | `string[]` | — | IDs of cards to highlight with `selectedItemClassName` |
98
+ | `customGridItems` | `{ [id: string]: ReactElement }` | — | Replace a specific card with custom JSX. The key must match the item's `id` in `data` |
99
+ | `imgContain` | `boolean` | `false` | Use `object-contain` instead of `object-cover` for card images |
100
+ | `darkMode` | `boolean` | `false` | Enable dark mode card styling |
101
+ | `darkModeBg` | `string` | — | Tailwind bg class for dark mode cards, e.g. `"bg-gray-800"` |
102
+ | `newTabUrl` | `string` | — | Prepends a link to each card. The card `id` is appended to this URL |
103
+ | `addNewTabUrl` | `string` | — | URL appended to the add-card action link |
104
+ | `draggable` | `boolean` | `false` | Enable drag-and-drop reordering of cards |
105
+ | `droppable` | `boolean` | `false` | Allow cards to be dropped onto other cards |
106
+ | `renderImgRibbon` | `(id: string) => ReactElement \| null` | — | Return a ReactElement to overlay on the card image (e.g. a ribbon badge), or `null` for no ribbon |
107
+ | `onClickData` | `(id: string) => void` | — | Called with the card id when a card is clicked |
108
+ | `onDropData` | `(dragId: string, dropId: string) => void` | — | Called when a card is dropped onto another card |
109
+ | `handleUpdatePageIndex` | `(value: string \| number) => void` | — | Called with `"next"`, `"prev"`, or a page number when the user navigates |
109
110
 
110
111
  ##### GridClass
111
112
 
@@ -1,16 +1,10 @@
1
- import { storiesOf } from "@storybook/react";
2
1
  import React, { useState } from "react";
3
2
  import { Grid, GridClass } from ".";
4
3
  import { StorySection } from "../../storyUtils";
5
- import README from "./README.md";
6
4
 
7
- const stories = storiesOf("Display", module);
5
+ const meta = { title: "Display/Grid" };
6
+ export default meta;
8
7
 
9
- stories.addParameters({
10
- readme: {
11
- content: README,
12
- },
13
- });
14
8
 
15
9
  const data: GridClass[] = [
16
10
  {
@@ -83,7 +77,7 @@ const renderImgRibbon = (id: string) => {
83
77
  return null;
84
78
  };
85
79
 
86
- stories.add("Grid", () => {
80
+ export const GridStory = () => {
87
81
  const [pageIndex, setPageIndex] = useState(0);
88
82
  const limit = 5;
89
83
  const cursor = true;
@@ -231,4 +225,4 @@ stories.add("Grid", () => {
231
225
  </StorySection>
232
226
  </>
233
227
  );
234
- });
228
+ }
@@ -1,17 +1,11 @@
1
- import { storiesOf } from "@storybook/react";
2
- import moment from "moment";
1
+ import dayjs from "../../dayjs";
3
2
  import React, { useState } from "react";
4
3
  import { Kanban } from ".";
5
4
  import { GridClass } from "../grid";
6
- import README from "./README.md";
7
5
 
8
- const stories = storiesOf("Display", module);
6
+ const meta = { title: "Display/Kanban" };
7
+ export default meta;
9
8
 
10
- stories.addParameters({
11
- readme: {
12
- content: README,
13
- },
14
- });
15
9
 
16
10
  const initialData = [
17
11
  {
@@ -20,7 +14,7 @@ const initialData = [
20
14
  description: "Desc",
21
15
  groupBy: "Open",
22
16
  tags: ["Sports", "Promotions"],
23
- createdAt: moment("12/24/2020").toDate(),
17
+ createdAt: dayjs("12/24/2020").toDate(),
24
18
  },
25
19
  {
26
20
  id: "2",
@@ -29,7 +23,7 @@ const initialData = [
29
23
  "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore.",
30
24
  groupBy: "In progress",
31
25
  tags: ["Sports", "Promotions"],
32
- createdAt: moment("12/24/2020").toDate(),
26
+ createdAt: dayjs("12/24/2020").toDate(),
33
27
  },
34
28
  {
35
29
  id: "3",
@@ -37,48 +31,48 @@ const initialData = [
37
31
  description: "test",
38
32
  groupBy: "To be tested",
39
33
  tags: ["Sports", "Promotions"],
40
- createdAt: moment("12/24/2020").toDate(),
34
+ createdAt: dayjs("12/24/2020").toDate(),
41
35
  },
42
36
  {
43
37
  id: "4",
44
38
  title: "DC-4",
45
39
  description: "test",
46
40
  groupBy: "Reopen",
47
- createdAt: moment("12/24/2020").toDate(),
41
+ createdAt: dayjs("12/24/2020").toDate(),
48
42
  },
49
43
  {
50
44
  id: "5",
51
45
  title: "DC-5",
52
46
  description: "test",
53
47
  groupBy: "Reopen",
54
- createdAt: moment("12/24/2020").toDate(),
48
+ createdAt: dayjs("12/24/2020").toDate(),
55
49
  },
56
50
  {
57
51
  id: "6",
58
52
  title: "DC-6",
59
53
  description: "test",
60
54
  groupBy: "Open",
61
- createdAt: moment("12/24/2020").toDate(),
55
+ createdAt: dayjs("12/24/2020").toDate(),
62
56
  },
63
57
  {
64
58
  id: "7",
65
59
  title: "DC-7",
66
60
  description: "test",
67
61
  groupBy: "Open",
68
- createdAt: moment("12/24/2020").toDate(),
62
+ createdAt: dayjs("12/24/2020").toDate(),
69
63
  },
70
64
  {
71
65
  id: "8",
72
66
  title: "DC-8",
73
67
  description: "test",
74
68
  groupBy: "Open",
75
- createdAt: moment("12/24/2020").toDate(),
69
+ createdAt: dayjs("12/24/2020").toDate(),
76
70
  },
77
71
  {
78
72
  id: "9",
79
73
  title: "DC-9",
80
74
  description: "test",
81
- createdAt: moment("12/24/2020").toDate(),
75
+ createdAt: dayjs("12/24/2020").toDate(),
82
76
  },
83
77
  ];
84
78
 
@@ -90,7 +84,7 @@ const groupClusters = [
90
84
  },
91
85
  ];
92
86
 
93
- stories.add("Kanban", () => {
87
+ export const KanbanStory = () => {
94
88
  const [data, setData] = useState<GridClass[]>(initialData);
95
89
 
96
90
  return (
@@ -130,4 +124,4 @@ stories.add("Kanban", () => {
130
124
  </div>
131
125
  </div>
132
126
  );
133
- });
127
+ }
@@ -61,35 +61,36 @@ const handlePagination = (value) => {
61
61
 
62
62
  ### Optional props
63
63
 
64
- | Name | Type | Default | Description |
65
- | ----------------------- | -------------------------------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------ |
66
- | `paginationType` | `"cursor"` \| `"page"` | — | Enables pagination controls |
67
- | `limit` | `number` | `10` | Items per page — required when `paginationType` is set |
68
- | `pageIndex` | `number` | `0` | Current page index — required when `paginationType` is set |
69
- | `cursor` | `any` | — | Last fetched cursor value (string or Date). Required for `paginationType="cursor"` to enable the next button beyond local data |
70
- | `size` | `number` | — | Total record count. Required for `paginationType="page"` to calculate page numbers |
71
- | `hidePagination` | `boolean` | `false` | Hides the pagination row entirely |
72
- | `groupId` | `string` | — | Key on `ListClass` items to group by. Renders a Tabs bar to filter the list by unique values |
73
- | `imgContain` | `boolean` | `false` | Uses `object-contain` instead of `object-cover` for item images |
74
- | `actionMobile` | `boolean` | `false` | Moves the `action` element to a new line on mobile |
75
- | `noTruncate` | `boolean` | `false` | Removes CSS truncation from item titles |
76
- | `showId` | `boolean` | `false` | Includes the `id` field in the rendered key/value pairs |
77
- | `newTabUrl` | `string` | — | Base URL for row links e.g. `"https://example.com/items?id="` |
78
- | `addNewTabUrl` | `string` | — | Suffix appended after the id in the link URL e.g. `"?type=view"` |
79
- | `darkMode` | `boolean` | `false` | Applies dark colour scheme |
80
- | `darkModeBg` | `tailwind class` | `"bg-gray-900"` | Background class used in dark mode |
81
- | `checkbox` | `boolean` | `false` | Adds a checkbox to each row for multi-select |
82
- | `selectedIds` | `string[]` | — | Array of selected item ids — required when `checkbox` is `true` |
83
- | `selectAll` | `boolean` | `false` | When `true`, treats all items across all pages as selected |
84
- | `selectAllText` | `string` | — | Text appended to "All" in the selected count label |
85
- | `disableSelectFullData` | `boolean` | `false` | Hides the "Select All in List / Unselect All in List" popup |
86
- | `multiActionButton` | `ReactElement` | — | Action buttons shown in the selection header when items are selected |
87
- | `className` | `tailwind class` | — | Class applied to the outer container |
88
- | `onClickRow` | `(id: string, index?: number) => void` | — | Called when a row is clicked |
89
- | `handleUpdatePageIndex` | `(value: string \| number) => void` | — | Called on pagination. Receives `"prev"`, `"next"`, or a page number |
90
- | `handleSelectedIds` | `(value: string[]) => void` | — | Called when the selected ids change |
91
- | `handleSelectAll` | `(value: boolean) => void` | — | Called when select-all state changes |
92
- | `linkProps` | `LinkProps` | — | Refer to Link component documentation |
64
+ | Name | Type | Default | Description |
65
+ | ----------------------- | -------------------------------------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
66
+ | `paginationType` | `"cursor"` \| `"page"` | — | Enables pagination controls |
67
+ | `limit` | `number` | `10` | Items per page — required when `paginationType` is set |
68
+ | `pageIndex` | `number` | `0` | Current page index — required when `paginationType` is set |
69
+ | `cursor` | `any` | — | Last fetched cursor value (string or Date). Required for `paginationType="cursor"` to enable the next button beyond local data |
70
+ | `size` | `number` | — | Total record count. Required for `paginationType="page"` to calculate page numbers |
71
+ | `hidePagination` | `boolean` | `false` | Hides the pagination row entirely |
72
+ | `customPaginationSize` | `number` | — | Overrides the count shown in `Showing X result(s)`. When provided, replaces `size` (page mode) or the filtered list length (cursor mode) |
73
+ | `groupId` | `string` | — | Key on `ListClass` items to group by. Renders a Tabs bar to filter the list by unique values |
74
+ | `imgContain` | `boolean` | `false` | Uses `object-contain` instead of `object-cover` for item images |
75
+ | `actionMobile` | `boolean` | `false` | Moves the `action` element to a new line on mobile |
76
+ | `noTruncate` | `boolean` | `false` | Removes CSS truncation from item titles |
77
+ | `showId` | `boolean` | `false` | Includes the `id` field in the rendered key/value pairs |
78
+ | `newTabUrl` | `string` | — | Base URL for row links e.g. `"https://example.com/items?id="` |
79
+ | `addNewTabUrl` | `string` | — | Suffix appended after the id in the link URL e.g. `"?type=view"` |
80
+ | `darkMode` | `boolean` | `false` | Applies dark colour scheme |
81
+ | `darkModeBg` | `tailwind class` | `"bg-gray-900"` | Background class used in dark mode |
82
+ | `checkbox` | `boolean` | `false` | Adds a checkbox to each row for multi-select |
83
+ | `selectedIds` | `string[]` | — | Array of selected item ids — required when `checkbox` is `true` |
84
+ | `selectAll` | `boolean` | `false` | When `true`, treats all items across all pages as selected |
85
+ | `selectAllText` | `string` | — | Text appended to "All" in the selected count label |
86
+ | `disableSelectFullData` | `boolean` | `false` | Hides the "Select All in List / Unselect All in List" popup |
87
+ | `multiActionButton` | `ReactElement` | — | Action buttons shown in the selection header when items are selected |
88
+ | `className` | `tailwind class` | — | Class applied to the outer container |
89
+ | `onClickRow` | `(id: string, index?: number) => void` | — | Called when a row is clicked |
90
+ | `handleUpdatePageIndex` | `(value: string \| number) => void` | — | Called on pagination. Receives `"prev"`, `"next"`, or a page number |
91
+ | `handleSelectedIds` | `(value: string[]) => void` | — | Called when the selected ids change |
92
+ | `handleSelectAll` | `(value: boolean) => void` | — | Called when select-all state changes |
93
+ | `linkProps` | `LinkProps` | — | Refer to Link component documentation |
93
94
 
94
95
  ### ListClass
95
96
 
@@ -1,16 +1,10 @@
1
- import { storiesOf } from "@storybook/react";
2
1
  import React, { useState } from "react";
3
2
  import { List, ListClass } from ".";
4
3
  import { StorySection } from "../../storyUtils";
5
- import README from "./README.md";
6
4
 
7
- const stories = storiesOf("Display", module);
5
+ const meta = { title: "Display/List" };
6
+ export default meta;
8
7
 
9
- stories.addParameters({
10
- readme: {
11
- content: README,
12
- },
13
- });
14
8
 
15
9
  const baseLists: ListClass[] = [
16
10
  {
@@ -59,7 +53,7 @@ const groupedLists: ListClass[] = baseLists.map((item) => ({
59
53
  groupId: item.tag,
60
54
  }));
61
55
 
62
- stories.add("List", () => {
56
+ export const ListStory = () => {
63
57
  const [pageIndex, setPageIndex] = useState(0);
64
58
  const [limit] = useState(2);
65
59
  const [cursor] = useState("");
@@ -185,4 +179,4 @@ stories.add("List", () => {
185
179
  </StorySection>
186
180
  </>
187
181
  );
188
- });
182
+ }
@@ -1,15 +1,10 @@
1
- import { storiesOf } from "@storybook/react";
2
1
  import React from "react";
3
2
  import { Loading } from ".";
4
- import README from "./README.md";
5
- const stories = storiesOf("Display", module);
6
3
 
7
- stories.addParameters({
8
- readme: {
9
- content: README,
10
- },
11
- });
4
+ const meta = { title: "Display/Loading" };
5
+ export default meta;
12
6
 
13
- stories.add("Loading", () => {
7
+
8
+ export const LoadingStory = () => {
14
9
  return <Loading />;
15
- });
10
+ }
@@ -1,16 +1,10 @@
1
- import { storiesOf } from "@storybook/react";
2
1
  import React, { useEffect, useState } from "react";
3
2
  import { MapMarker, MapView } from ".";
4
3
  import { StorySection } from "../../storyUtils";
5
- import README from "./README.md";
6
4
 
7
- const stories = storiesOf("Display", module);
5
+ const meta = { title: "Display/MapView" };
6
+ export default meta;
8
7
 
9
- stories.addParameters({
10
- readme: {
11
- content: README,
12
- },
13
- });
14
8
 
15
9
  const baseMarkers: MapMarker[] = [
16
10
  {
@@ -63,7 +57,7 @@ const handleInjectGoogleMaps = (onReady: () => void) => {
63
57
  }, 500);
64
58
  };
65
59
 
66
- stories.add("MapView", () => {
60
+ export const MapViewStory = () => {
67
61
  const [loading, setLoading] = useState(true);
68
62
  const [markers, setMarkers] = useState<MapMarker[]>(baseMarkers);
69
63
 
@@ -222,4 +216,4 @@ stories.add("MapView", () => {
222
216
  </StorySection>
223
217
  </>
224
218
  );
225
- });
219
+ }
@@ -1,21 +1,14 @@
1
1
  import { Transition } from "@headlessui/react";
2
2
  import { CheckCircleIcon } from "@heroicons/react/24/outline";
3
- import { storiesOf } from "@storybook/react";
4
3
  import React, { useState } from "react";
5
4
  import { Modal } from ".";
6
5
  import { DataTemplateWrapper } from "../../data/dataWrapper";
7
6
  import { Notification } from "../notification";
8
- import README from "./README.md";
9
7
 
10
- const stories = storiesOf("Display", module);
8
+ const meta = { title: "Display/Modal" };
9
+ export default meta;
11
10
 
12
- stories.addParameters({
13
- readme: {
14
- content: README,
15
- },
16
- });
17
-
18
- stories.add("Modal", () => {
11
+ export const ModalStory = () => {
19
12
  const [open, setOpen] = useState(true);
20
13
  const notification = (
21
14
  <Notification
@@ -78,4 +71,4 @@ stories.add("Modal", () => {
78
71
  }}
79
72
  />
80
73
  );
81
- });
74
+ };
@@ -1,19 +1,13 @@
1
1
  import { Transition } from "@headlessui/react";
2
2
  import { CheckCircleIcon } from "@heroicons/react/24/outline";
3
- import { storiesOf } from "@storybook/react";
4
3
  import React from "react";
5
4
  import { Notification } from ".";
6
- import README from "./README.md";
7
5
 
8
- const stories = storiesOf("Display", module);
6
+ const meta = { title: "Display/Notification" };
7
+ export default meta;
9
8
 
10
- stories.addParameters({
11
- readme: {
12
- content: README,
13
- },
14
- });
15
9
 
16
- stories.add("Notification", () => {
10
+ export const NotificationStory = () => {
17
11
  return (
18
12
  <Notification
19
13
  icon={<CheckCircleIcon className="w-10 h-10 text-primary-600" />}
@@ -27,4 +21,4 @@ stories.add("Notification", () => {
27
21
  }}
28
22
  />
29
23
  );
30
- });
24
+ }