blixify-ui-web-mcp 0.1.3 → 0.1.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. package/lib/components/action/button/README.md +12 -11
  2. package/lib/components/action/button/button.stories.tsx +38 -27
  3. package/lib/components/action/buttonGroup/buttonGroup.stories.tsx +82 -16
  4. package/lib/components/action/iconButton/README.md +1 -0
  5. package/lib/components/action/iconButton/iconButton.stories.tsx +6 -12
  6. package/lib/components/action/radioList/radioList.stories.tsx +10 -16
  7. package/lib/components/action/slider/slider.stories.tsx +9 -15
  8. package/lib/components/action/textButton/textButton.stories.tsx +6 -12
  9. package/lib/components/action/toggle/toggle.stories.tsx +6 -12
  10. package/lib/components/advanced/collapse/collapse.stories.tsx +240 -24
  11. package/lib/components/advanced/infoWindow/infoWindow.stories.tsx +10 -16
  12. package/lib/components/advanced/popUp/README.md +33 -7
  13. package/lib/components/advanced/popUp/popUp.stories.tsx +9 -15
  14. package/lib/components/auth/bareSignIn/bareSignIn.stories.tsx +36 -16
  15. package/lib/components/auth/bareSignUp/bareSignUp.stories.tsx +7 -13
  16. package/lib/components/auth/signIn/signIn.stories.tsx +4 -10
  17. package/lib/components/auth/signUp/signUp.stories.tsx +4 -10
  18. package/lib/components/chart/areaChart/areaChart.stories.tsx +12 -18
  19. package/lib/components/chart/barChart/barChart.stories.tsx +12 -18
  20. package/lib/components/chart/boxPlotChart/boxPlotChart.stories.tsx +11 -17
  21. package/lib/components/chart/bubbleChart/bubbleChart.stories.tsx +11 -17
  22. package/lib/components/chart/card/card.stories.tsx +172 -38
  23. package/lib/components/chart/ganttChart/ganttChart.stories.tsx +10 -16
  24. package/lib/components/chart/heatmapChart/heatmapChart.stories.tsx +11 -17
  25. package/lib/components/chart/lineChart/lineChart.stories.tsx +8 -14
  26. package/lib/components/chart/pieChart/pieChart.stories.tsx +11 -17
  27. package/lib/components/chart/polarAreaChart/polarAreaChart.stories.tsx +11 -17
  28. package/lib/components/chart/radarChart/radarChart.stories.tsx +6 -12
  29. package/lib/components/chart/radialBar/radialChart.stories.tsx +4 -10
  30. package/lib/components/chart/rangeBarChart/rangeBarChart.stories.tsx +8 -14
  31. package/lib/components/chart/statsCard/statsCard.stories.tsx +12 -18
  32. package/lib/components/chart/treemapChart/treemapChart.stories.tsx +11 -17
  33. package/lib/components/chat/chatAnchor/README.md +7 -0
  34. package/lib/components/chat/chatAnchor/chatAnchor.stories.tsx +15 -21
  35. package/lib/components/chat/chatBase/README.md +103 -22
  36. package/lib/components/chat/chatBase/chatBase.stories.tsx +657 -57
  37. package/lib/components/chat/chatDashboard/README.md +17 -15
  38. package/lib/components/chat/chatDashboard/chatDashboard.stories.tsx +358 -46
  39. package/lib/components/data/dataGraph/dataGraph.stories.tsx +8 -14
  40. package/lib/components/data/dataReference/dataReference.stories.tsx +9 -15
  41. package/lib/components/data/dataTemplate/README.md +443 -129
  42. package/lib/components/data/dataTemplate/dataModule.stories.tsx +10 -15
  43. package/lib/components/data/dataTemplate/dataTemplate.stories.tsx +20 -34
  44. package/lib/components/data/dataWrapper/README.md +207 -84
  45. package/lib/components/data/dataWrapper/dataWrapper.consumer.stories.tsx +2125 -0
  46. package/lib/components/data/dataWrapper/dataWrapper.edit.stories.tsx +607 -0
  47. package/lib/components/data/dataWrapper/dataWrapper.utils.stories.tsx +576 -0
  48. package/lib/components/data/dataWrapper/dataWrapper.view.stories.tsx +1273 -0
  49. package/lib/components/data/flexFilter/flexFilter.stories.tsx +171 -0
  50. package/lib/components/data/queryForm/queryForm.stories.tsx +6 -12
  51. package/lib/components/data/readQuery/readQuery.stories.tsx +6 -11
  52. package/lib/components/data/readQueryHoc/readQueryHoc.stories.tsx +6 -12
  53. package/lib/components/data/writeQuery/README.md +21 -10
  54. package/lib/components/data/writeQuery/writeQuery.stories.tsx +6 -10
  55. package/lib/components/design/actionSection/actionSection.stories.tsx +10 -14
  56. package/lib/components/design/banner/banner.stories.tsx +6 -12
  57. package/lib/components/design/bannerAction/bannerAction.stories.tsx +100 -21
  58. package/lib/components/design/blogSection/blogSection.stories.tsx +6 -12
  59. package/lib/components/design/carouselSection/carouselSection.stories.tsx +6 -12
  60. package/lib/components/design/designList/designList.stories.tsx +6 -12
  61. package/lib/components/design/faq/faq.stories.tsx +53 -31
  62. package/lib/components/design/fileGrid/fileGrid.stories.tsx +10 -16
  63. package/lib/components/design/fileViewer/fileViewer.stories.tsx +6 -12
  64. package/lib/components/design/footerSection/footerSection.stories.tsx +6 -12
  65. package/lib/components/design/googleReview/googleReview.stories.tsx +6 -12
  66. package/lib/components/design/heroSection/heroSection.stories.tsx +10 -16
  67. package/lib/components/design/iconList/iconList.stories.tsx +6 -12
  68. package/lib/components/design/imageGallery/imageGallery.stories.tsx +6 -12
  69. package/lib/components/design/imageZoom/imageZoom.stories.tsx +6 -12
  70. package/lib/components/design/leftContent/leftContent.stories.tsx +6 -12
  71. package/lib/components/design/logoCloud/logoCloud.stories.tsx +6 -12
  72. package/lib/components/design/onboarding/onboarding.stories.tsx +8 -14
  73. package/lib/components/design/pricing/pricing.stories.tsx +6 -12
  74. package/lib/components/design/rightContent/rightContent.stories.tsx +6 -12
  75. package/lib/components/design/sectionList/sectionList.stories.tsx +6 -12
  76. package/lib/components/design/teams/teams.stories.tsx +6 -12
  77. package/lib/components/display/alert/alert.stories.tsx +8 -14
  78. package/lib/components/display/calendar/README.md +49 -0
  79. package/lib/components/display/calendar/calendar.stories.tsx +78 -35
  80. package/lib/components/display/clipboard/clipboard.stories.tsx +6 -12
  81. package/lib/components/display/detailList/detailList.stories.tsx +172 -48
  82. package/lib/components/display/drawer/README.md +44 -11
  83. package/lib/components/display/drawer/drawer.stories.tsx +71 -16
  84. package/lib/components/display/emptyState/emptyState.stories.tsx +47 -15
  85. package/lib/components/display/feeds/feeds.stories.tsx +6 -12
  86. package/lib/components/display/flexTable/README.md +11 -7
  87. package/lib/components/display/flexTable/flexTable.stories.tsx +318 -20
  88. package/lib/components/display/grid/README.md +29 -30
  89. package/lib/components/display/grid/grid.stories.tsx +16 -23
  90. package/lib/components/display/kanban/kanban.stories.tsx +17 -23
  91. package/lib/components/display/list/README.md +30 -29
  92. package/lib/components/display/list/list.stories.tsx +11 -17
  93. package/lib/components/display/loading/loading.stories.tsx +7 -12
  94. package/lib/components/display/mapView/mapView.stories.tsx +9 -15
  95. package/lib/components/display/modal/modal.stories.tsx +6 -13
  96. package/lib/components/display/newCalendar/README.md +163 -0
  97. package/lib/components/display/newCalendar/newCalendar.stories.tsx +292 -0
  98. package/lib/components/display/newFeeds/README.md +53 -0
  99. package/lib/components/display/newFeeds/newFeeds.stories.tsx +104 -0
  100. package/lib/components/display/newKanban/README.md +25 -0
  101. package/lib/components/display/newKanban/newKanban.stories.tsx +131 -0
  102. package/lib/components/display/newList/README.md +30 -0
  103. package/lib/components/display/newList/newList.stories.tsx +231 -0
  104. package/lib/components/display/newPagination/README.md +15 -0
  105. package/lib/components/display/newTable/README.md +121 -0
  106. package/lib/components/display/newTable/newTable.stories.tsx +551 -0
  107. package/lib/components/display/notification/notification.stories.tsx +6 -12
  108. package/lib/components/display/progress/progress.stories.tsx +7 -12
  109. package/lib/components/display/stepper/README.md +4 -0
  110. package/lib/components/display/stepper/stepper.stories.tsx +70 -23
  111. package/lib/components/display/table/README.md +38 -37
  112. package/lib/components/display/table/table.stories.tsx +34 -36
  113. package/lib/components/display/tag/tag.stories.tsx +34 -40
  114. package/lib/components/input/address/address.stories.tsx +12 -18
  115. package/lib/components/input/canvas/canvas.stories.tsx +12 -18
  116. package/lib/components/input/checkbox/checkbox.stories.tsx +7 -13
  117. package/lib/components/input/datePicker/datePicker.stories.tsx +41 -11
  118. package/lib/components/input/form/form.stories.tsx +11 -17
  119. package/lib/components/input/markdown/README.md +80 -2
  120. package/lib/components/input/markdown/markdown.stories.tsx +83 -32
  121. package/lib/components/input/monthYearPicker/monthYearPicker.stories.tsx +52 -24
  122. package/lib/components/input/netPromoterScore/netPromoterScore.stories.tsx +6 -12
  123. package/lib/components/input/rating/rating.stories.tsx +6 -12
  124. package/lib/components/input/select/README.md +31 -29
  125. package/lib/components/input/select/select.stories.tsx +33 -39
  126. package/lib/components/input/signature/signature.stories.tsx +12 -18
  127. package/lib/components/input/textArea/textArea.stories.tsx +6 -12
  128. package/lib/components/input/textInput/textinput.stories.tsx +14 -20
  129. package/lib/components/input/uploadInput/uploadInput.stories.tsx +143 -19
  130. package/lib/components/navigation/bars/README.md +27 -0
  131. package/lib/components/navigation/bars/bars.stories.tsx +56 -19
  132. package/lib/components/navigation/bottomTab/bottomTab.stories.tsx +7 -12
  133. package/lib/components/navigation/breadcrumb/breadcrumb.stories.tsx +8 -14
  134. package/lib/components/navigation/header/header.stories.tsx +33 -21
  135. package/lib/components/navigation/leftNav/leftNav.stories.tsx +10 -16
  136. package/lib/components/navigation/tabs/tabs.stories.tsx +10 -16
  137. package/lib/components/structure/column/column.stories.tsx +10 -15
  138. package/lib/components/structure/container/container.stories.tsx +8 -13
  139. package/lib/components/structure/link/link.stories.tsx +11 -17
  140. package/lib/components/structure/text/text.stories.tsx +12 -17
  141. package/lib/components/template/authPage/authPage.stories.tsx +6 -5
  142. package/lib/components/template/calendarView/calendarView.stories.tsx +726 -0
  143. package/lib/components/template/chatDashboard/chatDashboard.stories.tsx +497 -0
  144. package/lib/components/template/landingPage/landingPage.stories.tsx +10 -7
  145. package/lib/components/template/mapLayout/mapLayout.stories.tsx +519 -0
  146. package/lib/components/template/productListing/productListing.stories.tsx +7 -13
  147. package/lib/components/template/productOverview/productOverview.stories.tsx +5 -11
  148. package/lib/components/template/shoppingCart/shoppingCart.stories.tsx +6 -12
  149. package/lib/components/template/userHomePage/userHomePage.stories.tsx +384 -524
  150. package/lib/components/template/userRankingDashboard/userRankingDashboard.stories.tsx +145 -75
  151. package/lib/mcp/tools/componentsRoot.d.ts +2 -0
  152. package/lib/mcp/tools/componentsRoot.d.ts.map +1 -0
  153. package/lib/mcp/tools/componentsRoot.js +59 -0
  154. package/lib/mcp/tools/componentsRoot.js.map +1 -0
  155. package/lib/mcp/tools/getBackendComponent.d.ts.map +1 -1
  156. package/lib/mcp/tools/getBackendComponent.js +2 -5
  157. package/lib/mcp/tools/getBackendComponent.js.map +1 -1
  158. package/lib/mcp/tools/getComponent.d.ts.map +1 -1
  159. package/lib/mcp/tools/getComponent.js +2 -5
  160. package/lib/mcp/tools/getComponent.js.map +1 -1
  161. package/lib/mcp/tools/listComponents.d.ts.map +1 -1
  162. package/lib/mcp/tools/listComponents.js +15 -10
  163. package/lib/mcp/tools/listComponents.js.map +1 -1
  164. package/lib/mcp/tools/suggestTemplate.d.ts.map +1 -1
  165. package/lib/mcp/tools/suggestTemplate.js +107 -21
  166. package/lib/mcp/tools/suggestTemplate.js.map +1 -1
  167. package/package.json +1 -1
  168. package/lib/components/data/dataWrapper/dataWrapper.stories.tsx +0 -831
@@ -1,16 +1,10 @@
1
- import { storiesOf } from "@storybook/react";
2
1
  import React, { useState } from "react";
3
- import { GanttChart } from ".";
2
+ import { GanttChart as GanttChartImpl } from ".";
4
3
  import { StorySection } from "../../storyUtils";
5
- import README from "./README.md";
6
4
 
7
- const stories = storiesOf("Chart", module);
5
+ const meta = { title: "Chart/Gantt Chart" };
6
+ export default meta;
8
7
 
9
- stories.addParameters({
10
- readme: {
11
- content: README,
12
- },
13
- });
14
8
 
15
9
  const today = new Date();
16
10
  const day = 24 * 60 * 60 * 1000;
@@ -48,7 +42,7 @@ const baseTasks = [
48
42
  },
49
43
  ];
50
44
 
51
- stories.add("Gantt Chart", () => {
45
+ export const GanttChart = () => {
52
46
  const [tasks, setTasks] = useState(baseTasks);
53
47
 
54
48
  return (
@@ -58,7 +52,7 @@ stories.add("Gantt Chart", () => {
58
52
  description="Default display mode. Renders a horizontal range bar chart. Each task in the tasks array becomes one bar. colors are applied per task in order."
59
53
  >
60
54
  <div className="w-full">
61
- <GanttChart
55
+ <GanttChartImpl
62
56
  title="Project Timeline"
63
57
  tasks={tasks}
64
58
  showGrid={true}
@@ -78,7 +72,7 @@ stories.add("Gantt Chart", () => {
78
72
  description="mode='write' renders an editable table above the chart. Tasks can be added, edited inline, and deleted. onTaskChange is called with the updated task array on every change."
79
73
  >
80
74
  <div className="w-full">
81
- <GanttChart
75
+ <GanttChartImpl
82
76
  title="Project Timeline"
83
77
  label="Tasks"
84
78
  tasks={tasks}
@@ -100,7 +94,7 @@ stories.add("Gantt Chart", () => {
100
94
  description="dateRangeVisible=true shows a date range picker below the chart. Pass customDate to pre-select a range and onChangeDate to handle updates."
101
95
  >
102
96
  <div className="w-full">
103
- <GanttChart
97
+ <GanttChartImpl
104
98
  title="Project Timeline"
105
99
  tasks={tasks}
106
100
  dateRangeVisible={true}
@@ -118,7 +112,7 @@ stories.add("Gantt Chart", () => {
118
112
  dark
119
113
  >
120
114
  <div className="w-full">
121
- <GanttChart
115
+ <GanttChartImpl
122
116
  title="Development Sprint"
123
117
  tasks={tasks.slice(1, 4)}
124
118
  darkMode={true}
@@ -137,7 +131,7 @@ stories.add("Gantt Chart", () => {
137
131
  description="chartOnly=true strips the card wrapper and renders just the chart. Use containerStyle to control the dimensions."
138
132
  >
139
133
  <div className="w-full h-64">
140
- <GanttChart
134
+ <GanttChartImpl
141
135
  title="Minimal"
142
136
  tasks={tasks.slice(0, 3)}
143
137
  chartOnly={true}
@@ -151,4 +145,4 @@ stories.add("Gantt Chart", () => {
151
145
  </StorySection>
152
146
  </>
153
147
  );
154
- });
148
+ }
@@ -1,16 +1,10 @@
1
- import { storiesOf } from "@storybook/react";
2
1
  import React, { useMemo } from "react";
3
- import { HeatmapChart } from ".";
2
+ import { HeatmapChart as HeatmapChartImpl } from ".";
4
3
  import { StorySection } from "../../storyUtils";
5
- import README from "./README.md";
6
4
 
7
- const stories = storiesOf("Chart", module);
5
+ const meta = { title: "Chart/Heatmap Chart" };
6
+ export default meta;
8
7
 
9
- stories.addParameters({
10
- readme: {
11
- content: README,
12
- },
13
- });
14
8
 
15
9
  const categories = [
16
10
  "Jan",
@@ -30,7 +24,7 @@ const categories = [
30
24
  const rand = (min: number, max: number) =>
31
25
  Math.floor(Math.random() * (max - min + 1)) + min;
32
26
 
33
- stories.add("Heatmap Chart", () => {
27
+ export const HeatmapChart = () => {
34
28
  const multiSeriesData = useMemo(
35
29
  () => [
36
30
  { name: "Week 1", data: categories.map(() => rand(0, 90)) },
@@ -58,7 +52,7 @@ stories.add("Heatmap Chart", () => {
58
52
  description="Each SeriesItem becomes a row. Values are colour-coded by the built-in scale: green (0–10), blue (11–50), amber (51–100), red (101–200). showDataLabel shows the numeric value inside each cell."
59
53
  >
60
54
  <div className="w-full">
61
- <HeatmapChart
55
+ <HeatmapChartImpl
62
56
  title="Monthly Activity"
63
57
  multiSeriesData={multiSeriesData}
64
58
  categories={categories}
@@ -72,7 +66,7 @@ stories.add("Heatmap Chart", () => {
72
66
  description="Values spanning all four ranges (0–200) show the complete built-in colour scale in one chart."
73
67
  >
74
68
  <div className="w-full">
75
- <HeatmapChart
69
+ <HeatmapChartImpl
76
70
  title="Full Range Metrics"
77
71
  multiSeriesData={wideSeriesData}
78
72
  categories={categories}
@@ -87,7 +81,7 @@ stories.add("Heatmap Chart", () => {
87
81
  description="dateRangeVisible=true shows a date range picker below the chart. onChangeDate is called when the range changes."
88
82
  >
89
83
  <div className="w-full">
90
- <HeatmapChart
84
+ <HeatmapChartImpl
91
85
  title="Activity Over Time"
92
86
  multiSeriesData={multiSeriesData}
93
87
  categories={categories}
@@ -103,7 +97,7 @@ stories.add("Heatmap Chart", () => {
103
97
  description="newTabUrl wraps the chart title in a link. Useful for navigating to a detail page from a dashboard."
104
98
  >
105
99
  <div className="w-full">
106
- <HeatmapChart
100
+ <HeatmapChartImpl
107
101
  title="Activity (click title)"
108
102
  multiSeriesData={multiSeriesData}
109
103
  categories={categories}
@@ -119,7 +113,7 @@ stories.add("Heatmap Chart", () => {
119
113
  dark
120
114
  >
121
115
  <div className="w-full">
122
- <HeatmapChart
116
+ <HeatmapChartImpl
123
117
  title="Activity Distribution"
124
118
  multiSeriesData={multiSeriesData}
125
119
  categories={categories}
@@ -135,7 +129,7 @@ stories.add("Heatmap Chart", () => {
135
129
  description="chartOnly=true strips the card wrapper and renders just the chart. Use containerStyle to control dimensions."
136
130
  >
137
131
  <div className="w-full h-64">
138
- <HeatmapChart
132
+ <HeatmapChartImpl
139
133
  title="Minimal"
140
134
  multiSeriesData={multiSeriesData}
141
135
  categories={categories}
@@ -147,4 +141,4 @@ stories.add("Heatmap Chart", () => {
147
141
  </StorySection>
148
142
  </>
149
143
  );
150
- });
144
+ }
@@ -1,25 +1,19 @@
1
1
  import { PencilIcon } from "@heroicons/react/24/outline";
2
- import { storiesOf } from "@storybook/react";
3
2
  import React, { useCallback, useEffect, useState } from "react";
4
- import { LineChart } from ".";
3
+ import { LineChart as LineChartImpl } from ".";
5
4
  import { RangeInterface } from "../DateRange";
6
- import README from "./README.md";
7
5
  import { StorySection } from "../../storyUtils";
8
6
 
9
- const stories = storiesOf("Chart", module);
7
+ const meta = { title: "Chart/Line Chart" };
8
+ export default meta;
10
9
 
11
- stories.addParameters({
12
- readme: {
13
- content: README,
14
- },
15
- });
16
10
 
17
11
  const multiLineSeries = [
18
12
  { name: "High - 2013", data: [-50, 29.1, 33.453, 60.09, 32, 32, 90] },
19
13
  { name: "Low - 2013", data: [12, 60, 14, 18, 17, 70, 13] },
20
14
  ];
21
15
 
22
- stories.add("Line Chart", () => {
16
+ export const LineChart = () => {
23
17
  const [seriesData, setSeriesData] = useState([12, 60, 14, 18, 17]);
24
18
  const [categoryData, setCategoryData] = useState<string[]>([
25
19
  "JAN",
@@ -64,7 +58,7 @@ stories.add("Line Chart", () => {
64
58
  </>
65
59
  }
66
60
  >
67
- <LineChart
61
+ <LineChartImpl
68
62
  title="Sales of the Year"
69
63
  categories={categoryData}
70
64
  seriesData={seriesData}
@@ -105,7 +99,7 @@ stories.add("Line Chart", () => {
105
99
  </>
106
100
  }
107
101
  >
108
- <LineChart
102
+ <LineChartImpl
109
103
  title="Temperature of the Year"
110
104
  categories={["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug"]}
111
105
  multiLineSeries={multiLineSeries}
@@ -135,7 +129,7 @@ stories.add("Line Chart", () => {
135
129
  </>
136
130
  }
137
131
  >
138
- <LineChart
132
+ <LineChartImpl
139
133
  title="Revenue Trend"
140
134
  categories={["Jan", "Feb", "Mar", "Apr", "May", "Jun"]}
141
135
  seriesData={[30, 45, 38, 60, 55, 72]}
@@ -149,4 +143,4 @@ stories.add("Line Chart", () => {
149
143
  </StorySection>
150
144
  </div>
151
145
  );
152
- });
146
+ }
@@ -1,18 +1,12 @@
1
1
  import { PencilIcon } from "@heroicons/react/24/outline";
2
- import { storiesOf } from "@storybook/react";
3
2
  import React, { useCallback, useEffect, useMemo, useState } from "react";
4
- import { PieChart } from ".";
3
+ import { PieChart as PieChartImpl } from ".";
5
4
  import { StorySection } from "../../storyUtils";
6
5
  import { RangeInterface } from "../DateRange";
7
- import README from "./README.md";
8
6
 
9
- const stories = storiesOf("Chart", module);
7
+ const meta = { title: "Chart/Pie Chart" };
8
+ export default meta;
10
9
 
11
- stories.addParameters({
12
- readme: {
13
- content: README,
14
- },
15
- });
16
10
 
17
11
  const dummyData = [
18
12
  { label: "Apple", value: 10 },
@@ -25,7 +19,7 @@ const dummyData = [
25
19
  const series = dummyData.map((d) => d.value);
26
20
  const labels = dummyData.map((d) => d.label);
27
21
 
28
- stories.add("Pie Chart", () => {
22
+ export const PieChart = () => {
29
23
  const [seriesData, setSeriesData] = useState<number[]>([]);
30
24
  const [labelData, setLabelData] = useState<string[]>([]);
31
25
 
@@ -85,7 +79,7 @@ stories.add("Pie Chart", () => {
85
79
  description="Default chart type is donut. Legend shows truncated labels (max 10 chars); tooltip shows the full label."
86
80
  >
87
81
  <div className="w-full">
88
- <PieChart
82
+ <PieChartImpl
89
83
  title="Sales"
90
84
  series={seriesData}
91
85
  labels={labelData}
@@ -102,7 +96,7 @@ stories.add("Pie Chart", () => {
102
96
  description='Pass type="pie" to render a filled pie chart instead of a donut.'
103
97
  >
104
98
  <div className="w-full">
105
- <PieChart
99
+ <PieChartImpl
106
100
  title="Sales (Pie)"
107
101
  series={series}
108
102
  labels={labels}
@@ -117,7 +111,7 @@ stories.add("Pie Chart", () => {
117
111
  description='By default labels show percentages. Pass valueType="value" to show raw numbers instead.'
118
112
  >
119
113
  <div className="w-full">
120
- <PieChart
114
+ <PieChartImpl
121
115
  title="Sales by Value"
122
116
  series={series}
123
117
  labels={labels}
@@ -132,7 +126,7 @@ stories.add("Pie Chart", () => {
132
126
  description='legendPos controls where the legend is rendered. legendAlign controls horizontal alignment. Defaults: legendPos="top", legendAlign="right".'
133
127
  >
134
128
  <div className="w-full">
135
- <PieChart
129
+ <PieChartImpl
136
130
  title="Legend Bottom Center"
137
131
  series={series}
138
132
  labels={labels}
@@ -149,7 +143,7 @@ stories.add("Pie Chart", () => {
149
143
  dark
150
144
  >
151
145
  <div className="w-full">
152
- <PieChart
146
+ <PieChartImpl
153
147
  title="Sales"
154
148
  series={series}
155
149
  labels={labels}
@@ -166,7 +160,7 @@ stories.add("Pie Chart", () => {
166
160
  description="chartOnly=true removes the title, tool, and date range bar — renders just the chart canvas."
167
161
  >
168
162
  <div className="w-full">
169
- <PieChart
163
+ <PieChartImpl
170
164
  title="Sales"
171
165
  series={series}
172
166
  labels={labels}
@@ -177,4 +171,4 @@ stories.add("Pie Chart", () => {
177
171
  </StorySection>
178
172
  </>
179
173
  );
180
- });
174
+ }
@@ -1,20 +1,14 @@
1
1
  import { PencilIcon } from "@heroicons/react/24/outline";
2
- import { storiesOf } from "@storybook/react";
3
- import moment from "moment";
2
+ import dayjs from "../../dayjs";
4
3
  import React, { useCallback, useEffect, useMemo, useState } from "react";
5
- import { PolarAreaChart } from ".";
4
+ import { PolarAreaChart as PolarAreaChartImpl } from ".";
6
5
  import { RangeInterface } from "../DateRange";
7
- import README from "./README.md";
8
6
 
9
- const stories = storiesOf("Chart", module);
7
+ const meta = { title: "Chart/Polar Area Chart" };
8
+ export default meta;
10
9
 
11
- stories.addParameters({
12
- readme: {
13
- content: README,
14
- },
15
- });
16
10
 
17
- stories.add("Polar Area Chart", () => {
11
+ export const PolarAreaChart = () => {
18
12
  const [seriesData, setSeriesData] = useState<any[]>([]);
19
13
 
20
14
  const chartDummyData = useMemo(() => {
@@ -63,12 +57,12 @@ stories.add("Polar Area Chart", () => {
63
57
  }, [handleSetData]);
64
58
 
65
59
  const sevenDaysAgo = new Date();
66
- sevenDaysAgo.setDate(moment().toDate().getDate() - 7);
60
+ sevenDaysAgo.setDate(dayjs().toDate().getDate() - 7);
67
61
 
68
62
  return (
69
63
  <>
70
64
  <div className="font-medium mb-5">Polar Area Chart</div>
71
- <PolarAreaChart
65
+ <PolarAreaChartImpl
72
66
  title="Data Distribution"
73
67
  seriesName="Values"
74
68
  seriesData={seriesData}
@@ -76,7 +70,7 @@ stories.add("Polar Area Chart", () => {
76
70
  dateRangeVisible={true}
77
71
  customDate={{
78
72
  startDate: sevenDaysAgo,
79
- endDate: moment().toDate(),
73
+ endDate: dayjs().toDate(),
80
74
  isDuration: true,
81
75
  }}
82
76
  onChangeDate={handleSetData}
@@ -84,7 +78,7 @@ stories.add("Polar Area Chart", () => {
84
78
  newTabUrl="https://www.google.com/"
85
79
  />
86
80
  <div className="font-medium my-5">Dark Mode Polar Area Chart</div>
87
- <PolarAreaChart
81
+ <PolarAreaChartImpl
88
82
  title="Performance Metrics"
89
83
  seriesName="Metrics"
90
84
  seriesData={seriesData}
@@ -92,7 +86,7 @@ stories.add("Polar Area Chart", () => {
92
86
  dateRangeVisible={true}
93
87
  customDate={{
94
88
  startDate: sevenDaysAgo,
95
- endDate: moment().toDate(),
89
+ endDate: dayjs().toDate(),
96
90
  isDuration: true,
97
91
  }}
98
92
  onChangeDate={handleSetData}
@@ -103,4 +97,4 @@ stories.add("Polar Area Chart", () => {
103
97
  />
104
98
  </>
105
99
  );
106
- });
100
+ }
@@ -1,19 +1,13 @@
1
- import { storiesOf } from "@storybook/react";
2
1
  import React from "react";
3
- import { RadarChart } from ".";
4
- import README from "./README.md";
2
+ import { RadarChart as RadarChartImpl } from ".";
5
3
 
6
- const stories = storiesOf("Chart", module);
4
+ const meta = { title: "Chart/Radar Chart" };
5
+ export default meta;
7
6
 
8
- stories.addParameters({
9
- readme: {
10
- content: README,
11
- },
12
- });
13
7
 
14
- stories.add("Radar Chart", () => {
8
+ export const RadarChart = () => {
15
9
  return (
16
- <RadarChart
10
+ <RadarChartImpl
17
11
  title={"Test Chart"}
18
12
  darkMode={true}
19
13
  data={[
@@ -33,4 +27,4 @@ stories.add("Radar Chart", () => {
33
27
  onChangeDate={() => {}}
34
28
  />
35
29
  );
36
- });
30
+ }
@@ -1,20 +1,14 @@
1
1
  import { PencilIcon } from "@heroicons/react/24/outline";
2
- import { storiesOf } from "@storybook/react";
3
2
  import React, { useCallback, useEffect, useMemo, useState } from "react";
4
3
  import { RadialBar } from ".";
5
4
  import { RangeInterface } from "../DateRange";
6
- import README from "./README.md";
7
5
  import colors from "tailwindcss/colors";
8
6
 
9
- const stories = storiesOf("Chart", module);
7
+ const meta = { title: "Chart/Radial Chart" };
8
+ export default meta;
10
9
 
11
- stories.addParameters({
12
- readme: {
13
- content: README,
14
- },
15
- });
16
10
 
17
- stories.add("Radial Chart", () => {
11
+ export const RadialChart = () => {
18
12
  const [seriesData, setSeriesData] = useState<number[]>([]);
19
13
  const [labelData, setLabelData] = useState<string[]>([]);
20
14
 
@@ -133,4 +127,4 @@ stories.add("Radial Chart", () => {
133
127
  />
134
128
  </div>
135
129
  );
136
- });
130
+ }
@@ -1,23 +1,17 @@
1
1
  import { PencilIcon } from "@heroicons/react/24/outline";
2
- import { storiesOf } from "@storybook/react";
3
2
  import React, { useEffect, useMemo, useState } from "react";
4
- import { RangeBarChart } from ".";
5
- import README from "./README.md";
3
+ import { RangeBarChart as RangeBarChartImpl } from ".";
6
4
 
7
- const stories = storiesOf("Chart", module);
5
+ const meta = { title: "Chart/Range Bar Chart" };
6
+ export default meta;
8
7
 
9
- stories.addParameters({
10
- readme: {
11
- content: README,
12
- },
13
- });
14
8
 
15
9
  interface RangeData {
16
10
  category: string;
17
11
  value: [Date, Date];
18
12
  }
19
13
 
20
- stories.add("Range Bar Chart", () => {
14
+ export const RangeBarChart = () => {
21
15
  const [rangeData, setRangeData] = useState<RangeData[]>([]);
22
16
 
23
17
  const chartDummyData = useMemo((): RangeData[] => {
@@ -68,7 +62,7 @@ stories.add("Range Bar Chart", () => {
68
62
  return (
69
63
  <>
70
64
  <div className="font-medium mb-5">Sleep/Awake Timeline</div>
71
- <RangeBarChart
65
+ <RangeBarChartImpl
72
66
  title="Daily Sleep Schedule"
73
67
  seriesName="Status"
74
68
  data={rangeData}
@@ -78,7 +72,7 @@ stories.add("Range Bar Chart", () => {
78
72
  />
79
73
 
80
74
  <div className="font-medium my-5">Dark Mode Sleep/Awake Timeline</div>
81
- <RangeBarChart
75
+ <RangeBarChartImpl
82
76
  title="Daily Sleep Schedule"
83
77
  seriesName="Status"
84
78
  data={rangeData}
@@ -89,7 +83,7 @@ stories.add("Range Bar Chart", () => {
89
83
  />
90
84
 
91
85
  <div className="font-medium my-5">Multi-Color Range Bar Chart</div>
92
- <RangeBarChart
86
+ <RangeBarChartImpl
93
87
  title="Activity Schedule"
94
88
  seriesName="Activities"
95
89
  data={[
@@ -205,4 +199,4 @@ stories.add("Range Bar Chart", () => {
205
199
  />
206
200
  </>
207
201
  );
208
- });
202
+ }
@@ -5,20 +5,14 @@ import {
5
5
  PencilIcon,
6
6
  UserGroupIcon,
7
7
  } from "@heroicons/react/24/outline";
8
- import { storiesOf } from "@storybook/react";
9
8
  import React, { useCallback, useEffect, useMemo, useState } from "react";
10
- import { StatsCard } from ".";
9
+ import { StatsCard as StatsCardImpl } from ".";
11
10
  import { StorySection } from "../../storyUtils";
12
11
  import { RangeInterface } from "../DateRange";
13
- import README from "./README.md";
14
12
 
15
- const stories = storiesOf("Chart", module);
13
+ const meta = { title: "Chart/Stats Card" };
14
+ export default meta;
16
15
 
17
- stories.addParameters({
18
- readme: {
19
- content: README,
20
- },
21
- });
22
16
 
23
17
  const baseStats = [
24
18
  {
@@ -50,7 +44,7 @@ const baseStats = [
50
44
  },
51
45
  ];
52
46
 
53
- stories.add("Stats Card", () => {
47
+ export const StatsCard = () => {
54
48
  const chartDummyData = useMemo(() => {
55
49
  const now = new Date();
56
50
  const sevenDaysAgo = new Date();
@@ -108,7 +102,7 @@ stories.add("Stats Card", () => {
108
102
  description="When gridSize is omitted the component defaults to a 4-column grid on large screens. Each card shows a name, stat value, optional previous stat, and an optional change badge."
109
103
  >
110
104
  <div className="w-full">
111
- <StatsCard
105
+ <StatsCardImpl
112
106
  stats={seriesData}
113
107
  dateRangeVisible={true}
114
108
  onChangeDate={handleSetData}
@@ -121,7 +115,7 @@ stories.add("Stats Card", () => {
121
115
  description="gridSize=3 renders a 3-column grid on large screens (2-column on medium)."
122
116
  >
123
117
  <div className="w-full">
124
- <StatsCard stats={baseStats} gridSize={3} />
118
+ <StatsCardImpl stats={baseStats} gridSize={3} />
125
119
  </div>
126
120
  </StorySection>
127
121
 
@@ -130,7 +124,7 @@ stories.add("Stats Card", () => {
130
124
  description="gridSize=2 renders a 2-column grid."
131
125
  >
132
126
  <div className="w-full">
133
- <StatsCard stats={baseStats.slice(0, 2)} gridSize={2} />
127
+ <StatsCardImpl stats={baseStats.slice(0, 2)} gridSize={2} />
134
128
  </div>
135
129
  </StorySection>
136
130
 
@@ -139,7 +133,7 @@ stories.add("Stats Card", () => {
139
133
  description="gridSize=1 renders a single-column layout."
140
134
  >
141
135
  <div className="w-full">
142
- <StatsCard stats={baseStats.slice(0, 1)} gridSize={1} />
136
+ <StatsCardImpl stats={baseStats.slice(0, 1)} gridSize={1} />
143
137
  </div>
144
138
  </StorySection>
145
139
 
@@ -148,7 +142,7 @@ stories.add("Stats Card", () => {
148
142
  description="minGridSize=2 forces a 2-column minimum on small screens (default is 1-column on mobile)."
149
143
  >
150
144
  <div className="w-full">
151
- <StatsCard stats={baseStats} minGridSize={2} />
145
+ <StatsCardImpl stats={baseStats} minGridSize={2} />
152
146
  </div>
153
147
  </StorySection>
154
148
 
@@ -157,7 +151,7 @@ stories.add("Stats Card", () => {
157
151
  description="Pass icon to render a small icon in the top-right corner of the card group."
158
152
  >
159
153
  <div className="w-full">
160
- <StatsCard
154
+ <StatsCardImpl
161
155
  stats={baseStats}
162
156
  icon={<PencilIcon className="w-4 h-4 text-primary-600" />}
163
157
  />
@@ -170,7 +164,7 @@ stories.add("Stats Card", () => {
170
164
  dark
171
165
  >
172
166
  <div className="w-full">
173
- <StatsCard
167
+ <StatsCardImpl
174
168
  stats={baseStats}
175
169
  darkMode={true}
176
170
  darkModeBg="bg-gradient-to-r from-gray-900 to-slate-700"
@@ -180,4 +174,4 @@ stories.add("Stats Card", () => {
180
174
  </StorySection>
181
175
  </>
182
176
  );
183
- });
177
+ }
@@ -1,20 +1,14 @@
1
1
  import { PencilIcon } from "@heroicons/react/24/outline";
2
- import { storiesOf } from "@storybook/react";
3
- import moment from "moment";
2
+ import dayjs from "../../dayjs";
4
3
  import React, { useCallback, useEffect, useMemo, useState } from "react";
5
- import { TreemapChart } from ".";
4
+ import { TreemapChart as TreemapChartImpl } from ".";
6
5
  import { RangeInterface } from "../DateRange";
7
- import README from "./README.md";
8
6
 
9
- const stories = storiesOf("Chart", module);
7
+ const meta = { title: "Chart/Treemap Chart" };
8
+ export default meta;
10
9
 
11
- stories.addParameters({
12
- readme: {
13
- content: README,
14
- },
15
- });
16
10
 
17
- stories.add("Treemap Chart", () => {
11
+ export const TreemapChart = () => {
18
12
  const [seriesData, setSeriesData] = useState<any[]>([]);
19
13
 
20
14
  const chartDummyData = useMemo(() => {
@@ -79,12 +73,12 @@ stories.add("Treemap Chart", () => {
79
73
  }, [handleSetData]);
80
74
 
81
75
  const sevenDaysAgo = new Date();
82
- sevenDaysAgo.setDate(moment().toDate().getDate() - 7);
76
+ sevenDaysAgo.setDate(dayjs().toDate().getDate() - 7);
83
77
 
84
78
  return (
85
79
  <>
86
80
  <div className="font-medium mb-5">Treemap Chart</div>
87
- <TreemapChart
81
+ <TreemapChartImpl
88
82
  title="Page Views Distribution"
89
83
  seriesName="Pages"
90
84
  seriesData={seriesData}
@@ -92,7 +86,7 @@ stories.add("Treemap Chart", () => {
92
86
  dateRangeVisible={true}
93
87
  customDate={{
94
88
  startDate: sevenDaysAgo,
95
- endDate: moment().toDate(),
89
+ endDate: dayjs().toDate(),
96
90
  isDuration: true,
97
91
  }}
98
92
  onChangeDate={handleSetData}
@@ -100,7 +94,7 @@ stories.add("Treemap Chart", () => {
100
94
  newTabUrl="https://www.google.com/"
101
95
  />
102
96
  <div className="font-medium my-5">Dark Mode Treemap Chart</div>
103
- <TreemapChart
97
+ <TreemapChartImpl
104
98
  title="Data Categories"
105
99
  seriesName="Categories"
106
100
  seriesData={seriesData}
@@ -108,7 +102,7 @@ stories.add("Treemap Chart", () => {
108
102
  dateRangeVisible={true}
109
103
  customDate={{
110
104
  startDate: sevenDaysAgo,
111
- endDate: moment().toDate(),
105
+ endDate: dayjs().toDate(),
112
106
  isDuration: true,
113
107
  }}
114
108
  onChangeDate={handleSetData}
@@ -119,4 +113,4 @@ stories.add("Treemap Chart", () => {
119
113
  />
120
114
  </>
121
115
  );
122
- });
116
+ }