blixify-ui-web-mcp 0.1.1

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 (245) hide show
  1. package/README.md +5 -0
  2. package/lib/components/action/button/README.md +75 -0
  3. package/lib/components/action/button/button.stories.tsx +138 -0
  4. package/lib/components/action/buttonGroup/README.md +79 -0
  5. package/lib/components/action/buttonGroup/buttonGroup.stories.tsx +104 -0
  6. package/lib/components/action/iconButton/README.md +39 -0
  7. package/lib/components/action/iconButton/iconButton.stories.tsx +22 -0
  8. package/lib/components/action/radioList/README.md +98 -0
  9. package/lib/components/action/radioList/radioList.stories.tsx +181 -0
  10. package/lib/components/action/slider/README.md +86 -0
  11. package/lib/components/action/slider/slider.stories.tsx +133 -0
  12. package/lib/components/action/textButton/README.md +34 -0
  13. package/lib/components/action/textButton/textButton.stories.tsx +16 -0
  14. package/lib/components/action/toggle/README.md +39 -0
  15. package/lib/components/action/toggle/toggle.stories.tsx +23 -0
  16. package/lib/components/advanced/collapse/README.md +106 -0
  17. package/lib/components/advanced/collapse/collapse.stories.tsx +165 -0
  18. package/lib/components/advanced/infoWindow/README.md +69 -0
  19. package/lib/components/advanced/infoWindow/infoWindow.stories.tsx +112 -0
  20. package/lib/components/advanced/popUp/README.md +95 -0
  21. package/lib/components/advanced/popUp/popUp.stories.tsx +189 -0
  22. package/lib/components/auth/bareSignIn/README.md +78 -0
  23. package/lib/components/auth/bareSignIn/bareSignIn.stories.tsx +141 -0
  24. package/lib/components/auth/bareSignUp/README.md +130 -0
  25. package/lib/components/auth/bareSignUp/bareSignUp.stories.tsx +159 -0
  26. package/lib/components/auth/signIn/README.md +53 -0
  27. package/lib/components/auth/signIn/signIn.stories.tsx +120 -0
  28. package/lib/components/auth/signUp/README.md +136 -0
  29. package/lib/components/auth/signUp/signUp.stories.tsx +193 -0
  30. package/lib/components/chart/README.md +13 -0
  31. package/lib/components/chart/areaChart/README.md +133 -0
  32. package/lib/components/chart/areaChart/areaChart.stories.tsx +199 -0
  33. package/lib/components/chart/barChart/README.md +193 -0
  34. package/lib/components/chart/barChart/barChart.stories.tsx +318 -0
  35. package/lib/components/chart/boxPlotChart/README.md +124 -0
  36. package/lib/components/chart/boxPlotChart/boxPlotChart.stories.tsx +104 -0
  37. package/lib/components/chart/bubbleChart/README.md +166 -0
  38. package/lib/components/chart/bubbleChart/bubbleChart.stories.tsx +144 -0
  39. package/lib/components/chart/card/README.md +107 -0
  40. package/lib/components/chart/card/card.stories.tsx +89 -0
  41. package/lib/components/chart/ganttChart/README.md +142 -0
  42. package/lib/components/chart/ganttChart/ganttChart.stories.tsx +138 -0
  43. package/lib/components/chart/heatmapChart/README.md +125 -0
  44. package/lib/components/chart/heatmapChart/heatmapChart.stories.tsx +106 -0
  45. package/lib/components/chart/lineChart/README.md +140 -0
  46. package/lib/components/chart/lineChart/lineChart.stories.tsx +152 -0
  47. package/lib/components/chart/pieChart/README.md +117 -0
  48. package/lib/components/chart/pieChart/pieChart.stories.tsx +180 -0
  49. package/lib/components/chart/polarAreaChart/README.md +126 -0
  50. package/lib/components/chart/polarAreaChart/polarAreaChart.stories.tsx +106 -0
  51. package/lib/components/chart/radarChart/README.md +57 -0
  52. package/lib/components/chart/radarChart/radarChart.stories.tsx +36 -0
  53. package/lib/components/chart/radialBar/README.md +152 -0
  54. package/lib/components/chart/radialBar/radialChart.stories.tsx +136 -0
  55. package/lib/components/chart/rangeBarChart/README.md +323 -0
  56. package/lib/components/chart/rangeBarChart/rangeBarChart.stories.tsx +208 -0
  57. package/lib/components/chart/statsCard/README.md +97 -0
  58. package/lib/components/chart/statsCard/statsCard.stories.tsx +183 -0
  59. package/lib/components/chart/treemapChart/README.md +142 -0
  60. package/lib/components/chart/treemapChart/treemapChart.stories.tsx +122 -0
  61. package/lib/components/chat/chatAnchor/README.md +113 -0
  62. package/lib/components/chat/chatAnchor/chatAnchor.stories.tsx +156 -0
  63. package/lib/components/chat/chatBase/README.md +223 -0
  64. package/lib/components/chat/chatBase/chatBase.stories.tsx +306 -0
  65. package/lib/components/chat/chatDashboard/README.md +161 -0
  66. package/lib/components/chat/chatDashboard/chatDashboard.stories.tsx +154 -0
  67. package/lib/components/data/dataGraph/README.md +13 -0
  68. package/lib/components/data/dataGraph/dataGraph.stories.tsx +84 -0
  69. package/lib/components/data/dataReference/README.md +62 -0
  70. package/lib/components/data/dataReference/dataReference.stories.tsx +53 -0
  71. package/lib/components/data/dataTemplate/README.md +903 -0
  72. package/lib/components/data/dataTemplate/dataModule.stories.tsx +196 -0
  73. package/lib/components/data/dataTemplate/dataTemplate.stories.tsx +337 -0
  74. package/lib/components/data/dataWrapper/README.md +1077 -0
  75. package/lib/components/data/dataWrapper/dataWrapper.stories.tsx +831 -0
  76. package/lib/components/data/queryForm/README.md +56 -0
  77. package/lib/components/data/queryForm/queryForm.stories.tsx +85 -0
  78. package/lib/components/data/readQuery/README.md +282 -0
  79. package/lib/components/data/readQuery/readQuery.stories.tsx +256 -0
  80. package/lib/components/data/readQueryHoc/README.md +89 -0
  81. package/lib/components/data/readQueryHoc/readQueryHoc.stories.tsx +33 -0
  82. package/lib/components/data/writeQuery/README.md +178 -0
  83. package/lib/components/data/writeQuery/writeQuery.stories.tsx +209 -0
  84. package/lib/components/design/actionSection/README.md +47 -0
  85. package/lib/components/design/actionSection/actionSection.stories.tsx +74 -0
  86. package/lib/components/design/banner/README.md +43 -0
  87. package/lib/components/design/banner/banner.stories.tsx +34 -0
  88. package/lib/components/design/bannerAction/README.md +44 -0
  89. package/lib/components/design/bannerAction/bannerAction.stories.tsx +25 -0
  90. package/lib/components/design/blogSection/README.md +111 -0
  91. package/lib/components/design/blogSection/blogSection.stories.tsx +72 -0
  92. package/lib/components/design/carouselSection/README.md +82 -0
  93. package/lib/components/design/carouselSection/carouselSection.stories.tsx +52 -0
  94. package/lib/components/design/designList/README.md +60 -0
  95. package/lib/components/design/designList/designList.stories.tsx +44 -0
  96. package/lib/components/design/faq/README.md +121 -0
  97. package/lib/components/design/faq/faq.stories.tsx +103 -0
  98. package/lib/components/design/fileGrid/README.md +87 -0
  99. package/lib/components/design/fileGrid/fileGrid.stories.tsx +110 -0
  100. package/lib/components/design/fileViewer/README.md +40 -0
  101. package/lib/components/design/fileViewer/fileViewer.stories.tsx +28 -0
  102. package/lib/components/design/footerSection/README.md +62 -0
  103. package/lib/components/design/footerSection/footerSection.stories.tsx +84 -0
  104. package/lib/components/design/googleReview/README.md +45 -0
  105. package/lib/components/design/googleReview/googleReview.stories.tsx +33 -0
  106. package/lib/components/design/heroSection/README.md +48 -0
  107. package/lib/components/design/heroSection/heroSection.stories.tsx +85 -0
  108. package/lib/components/design/iconList/README.md +60 -0
  109. package/lib/components/design/iconList/iconList.stories.tsx +41 -0
  110. package/lib/components/design/imageGallery/README.md +56 -0
  111. package/lib/components/design/imageGallery/imageGallery.stories.tsx +45 -0
  112. package/lib/components/design/imageZoom/README.md +47 -0
  113. package/lib/components/design/imageZoom/imageZoom.stories.tsx +30 -0
  114. package/lib/components/design/leftContent/README.md +47 -0
  115. package/lib/components/design/leftContent/leftContent.stories.tsx +32 -0
  116. package/lib/components/design/logoCloud/README.md +42 -0
  117. package/lib/components/design/logoCloud/logoCloud.stories.tsx +44 -0
  118. package/lib/components/design/onboarding/README.md +100 -0
  119. package/lib/components/design/onboarding/onboarding.stories.tsx +113 -0
  120. package/lib/components/design/pricing/README.md +112 -0
  121. package/lib/components/design/pricing/pricing.stories.tsx +86 -0
  122. package/lib/components/design/rightContent/README.md +47 -0
  123. package/lib/components/design/rightContent/rightContent.stories.tsx +32 -0
  124. package/lib/components/design/sectionList/README.md +51 -0
  125. package/lib/components/design/sectionList/sectionList.stories.tsx +35 -0
  126. package/lib/components/design/teams/README.md +62 -0
  127. package/lib/components/design/teams/teams.stories.tsx +61 -0
  128. package/lib/components/display/alert/README.md +82 -0
  129. package/lib/components/display/alert/alert.stories.tsx +71 -0
  130. package/lib/components/display/calendar/README.md +113 -0
  131. package/lib/components/display/calendar/calendar.stories.tsx +159 -0
  132. package/lib/components/display/clipboard/README.md +36 -0
  133. package/lib/components/display/clipboard/clipboard.stories.tsx +32 -0
  134. package/lib/components/display/detailList/README.md +61 -0
  135. package/lib/components/display/detailList/detailList.stories.tsx +131 -0
  136. package/lib/components/display/drawer/README.md +74 -0
  137. package/lib/components/display/drawer/drawer.stories.tsx +66 -0
  138. package/lib/components/display/emptyState/README.md +38 -0
  139. package/lib/components/display/emptyState/emptyState.stories.tsx +22 -0
  140. package/lib/components/display/feeds/README.md +80 -0
  141. package/lib/components/display/feeds/feeds.stories.tsx +75 -0
  142. package/lib/components/display/flexTable/README.md +160 -0
  143. package/lib/components/display/flexTable/flexTable.stories.tsx +313 -0
  144. package/lib/components/display/grid/README.md +121 -0
  145. package/lib/components/display/grid/grid.stories.tsx +234 -0
  146. package/lib/components/display/kanban/README.md +78 -0
  147. package/lib/components/display/kanban/kanban.stories.tsx +133 -0
  148. package/lib/components/display/list/README.md +109 -0
  149. package/lib/components/display/list/list.stories.tsx +188 -0
  150. package/lib/components/display/loading/README.md +25 -0
  151. package/lib/components/display/loading/loading.stories.tsx +15 -0
  152. package/lib/components/display/mapView/README.md +99 -0
  153. package/lib/components/display/mapView/mapView.stories.tsx +225 -0
  154. package/lib/components/display/modal/README.md +43 -0
  155. package/lib/components/display/modal/modal.stories.tsx +81 -0
  156. package/lib/components/display/notification/README.md +43 -0
  157. package/lib/components/display/notification/notification.stories.tsx +30 -0
  158. package/lib/components/display/progress/README.md +25 -0
  159. package/lib/components/display/progress/progress.stories.tsx +15 -0
  160. package/lib/components/display/stepper/README.md +96 -0
  161. package/lib/components/display/stepper/stepper.stories.tsx +175 -0
  162. package/lib/components/display/table/README.md +176 -0
  163. package/lib/components/display/table/table.stories.tsx +330 -0
  164. package/lib/components/display/tag/README.md +74 -0
  165. package/lib/components/display/tag/tag.stories.tsx +79 -0
  166. package/lib/components/input/address/README.md +132 -0
  167. package/lib/components/input/address/address.stories.tsx +147 -0
  168. package/lib/components/input/canvas/README.md +131 -0
  169. package/lib/components/input/canvas/canvas.stories.tsx +165 -0
  170. package/lib/components/input/checkbox/README.md +61 -0
  171. package/lib/components/input/checkbox/checkbox.stories.tsx +30 -0
  172. package/lib/components/input/datePicker/README.md +124 -0
  173. package/lib/components/input/datePicker/datePicker.stories.tsx +197 -0
  174. package/lib/components/input/form/README.md +55 -0
  175. package/lib/components/input/form/form.stories.tsx +143 -0
  176. package/lib/components/input/markdown/README.md +146 -0
  177. package/lib/components/input/markdown/markdown.stories.tsx +40 -0
  178. package/lib/components/input/monthYearPicker/README.md +69 -0
  179. package/lib/components/input/monthYearPicker/monthYearPicker.stories.tsx +47 -0
  180. package/lib/components/input/netPromoterScore/README.md +52 -0
  181. package/lib/components/input/netPromoterScore/netPromoterScore.stories.tsx +30 -0
  182. package/lib/components/input/rating/README.md +51 -0
  183. package/lib/components/input/rating/rating.stories.tsx +30 -0
  184. package/lib/components/input/select/README.md +108 -0
  185. package/lib/components/input/select/select.stories.tsx +286 -0
  186. package/lib/components/input/signature/README.md +106 -0
  187. package/lib/components/input/signature/signature.stories.tsx +188 -0
  188. package/lib/components/input/textArea/README.md +55 -0
  189. package/lib/components/input/textArea/textArea.stories.tsx +30 -0
  190. package/lib/components/input/textInput/README.md +81 -0
  191. package/lib/components/input/textInput/textinput.stories.tsx +231 -0
  192. package/lib/components/input/uploadInput/README.md +134 -0
  193. package/lib/components/input/uploadInput/uploadInput.stories.tsx +193 -0
  194. package/lib/components/navigation/bars/README.md +40 -0
  195. package/lib/components/navigation/bars/bars.stories.tsx +85 -0
  196. package/lib/components/navigation/bottomTab/README.md +53 -0
  197. package/lib/components/navigation/bottomTab/bottomTab.stories.tsx +32 -0
  198. package/lib/components/navigation/breadcrumb/README.md +48 -0
  199. package/lib/components/navigation/breadcrumb/breadcrumb.stories.tsx +27 -0
  200. package/lib/components/navigation/header/README.md +149 -0
  201. package/lib/components/navigation/header/header.stories.tsx +107 -0
  202. package/lib/components/navigation/leftNav/README.md +91 -0
  203. package/lib/components/navigation/leftNav/leftNav.stories.tsx +106 -0
  204. package/lib/components/navigation/tabs/README.md +75 -0
  205. package/lib/components/navigation/tabs/tabs.stories.tsx +60 -0
  206. package/lib/components/structure/column/README.md +40 -0
  207. package/lib/components/structure/column/column.stories.tsx +26 -0
  208. package/lib/components/structure/container/README.md +34 -0
  209. package/lib/components/structure/container/container.stories.tsx +19 -0
  210. package/lib/components/structure/link/README.md +55 -0
  211. package/lib/components/structure/link/link.stories.tsx +30 -0
  212. package/lib/components/structure/text/README.md +42 -0
  213. package/lib/components/structure/text/text.stories.tsx +39 -0
  214. package/lib/components/template/authPage/authPage.stories.tsx +68 -0
  215. package/lib/components/template/landingPage/landingPage.stories.tsx +288 -0
  216. package/lib/components/template/productListing/productListing.stories.tsx +297 -0
  217. package/lib/components/template/productOverview/productOverview.stories.tsx +194 -0
  218. package/lib/components/template/shoppingCart/shoppingCart.stories.tsx +252 -0
  219. package/lib/components/template/userHomePage/userHomePage.stories.tsx +605 -0
  220. package/lib/components/template/userRankingDashboard/userRankingDashboard.stories.tsx +481 -0
  221. package/lib/mcp/server.d.ts +2 -0
  222. package/lib/mcp/server.d.ts.map +1 -0
  223. package/lib/mcp/server.js +33 -0
  224. package/lib/mcp/server.js.map +1 -0
  225. package/lib/mcp/tools/getBackendComponent.d.ts +13 -0
  226. package/lib/mcp/tools/getBackendComponent.d.ts.map +1 -0
  227. package/lib/mcp/tools/getBackendComponent.js +119 -0
  228. package/lib/mcp/tools/getBackendComponent.js.map +1 -0
  229. package/lib/mcp/tools/getComponent.d.ts +17 -0
  230. package/lib/mcp/tools/getComponent.d.ts.map +1 -0
  231. package/lib/mcp/tools/getComponent.js +118 -0
  232. package/lib/mcp/tools/getComponent.js.map +1 -0
  233. package/lib/mcp/tools/listComponents.d.ts +13 -0
  234. package/lib/mcp/tools/listComponents.d.ts.map +1 -0
  235. package/lib/mcp/tools/listComponents.js +113 -0
  236. package/lib/mcp/tools/listComponents.js.map +1 -0
  237. package/lib/mcp/tools/listTemplates.d.ts +13 -0
  238. package/lib/mcp/tools/listTemplates.d.ts.map +1 -0
  239. package/lib/mcp/tools/listTemplates.js +68 -0
  240. package/lib/mcp/tools/listTemplates.js.map +1 -0
  241. package/lib/mcp/tools/suggestTemplate.d.ts +17 -0
  242. package/lib/mcp/tools/suggestTemplate.d.ts.map +1 -0
  243. package/lib/mcp/tools/suggestTemplate.js +212 -0
  244. package/lib/mcp/tools/suggestTemplate.js.map +1 -0
  245. package/package.json +23 -0
@@ -0,0 +1,225 @@
1
+ import { storiesOf } from "@storybook/react";
2
+ import React, { useEffect, useState } from "react";
3
+ import { MapMarker, MapView } from ".";
4
+ import { StorySection } from "../../storyUtils";
5
+ import README from "./README.md";
6
+
7
+ const stories = storiesOf("Display", module);
8
+
9
+ stories.addParameters({
10
+ readme: {
11
+ content: README,
12
+ },
13
+ });
14
+
15
+ const baseMarkers: MapMarker[] = [
16
+ {
17
+ id: "1",
18
+ coord: { lat: 5.41192, lng: 100.3146 },
19
+ data: {
20
+ name: "Place A",
21
+ description: "1st test desc",
22
+ group: "Pet Friendly",
23
+ },
24
+ color: "yellow",
25
+ },
26
+ {
27
+ id: "2",
28
+ coord: { lat: 5.41192, lng: 100.3146 },
29
+ data: {
30
+ name: "Place B",
31
+ description: "4th test desc",
32
+ group: "Pet Friendly",
33
+ },
34
+ color: "yellow",
35
+ },
36
+ {
37
+ id: "3",
38
+ coord: { lat: 5.41192, lng: 100.3146 },
39
+ data: {
40
+ name: "Place C",
41
+ description: "3rd test desc",
42
+ group: "Vegetarian",
43
+ },
44
+ color: "blue",
45
+ },
46
+ ];
47
+
48
+ const handleInjectGoogleMaps = (onReady: () => void) => {
49
+ const interval = setInterval(() => {
50
+ try {
51
+ if (!document.getElementById("googleMaps")) {
52
+ const script = document.createElement("script");
53
+ script.id = "googleMaps";
54
+ script.type = "text/javascript";
55
+ script.src = `https://maps.googleapis.com/maps/api/js?key=&libraries=places,drawing,geometry`;
56
+ document.head.appendChild(script);
57
+ }
58
+ if (window.google && window.google.maps) {
59
+ onReady();
60
+ clearInterval(interval);
61
+ }
62
+ } catch (err) {}
63
+ }, 500);
64
+ };
65
+
66
+ stories.add("MapView", () => {
67
+ const [loading, setLoading] = useState(true);
68
+ const [markers, setMarkers] = useState<MapMarker[]>(baseMarkers);
69
+
70
+ useEffect(() => {
71
+ handleInjectGoogleMaps(() => setLoading(false));
72
+ }, []);
73
+
74
+ // Simulate async marker update
75
+ useEffect(() => {
76
+ const timer = setTimeout(() => {
77
+ setMarkers((prev) => [
78
+ ...prev,
79
+ {
80
+ id: "4",
81
+ coord: { lat: 5.41492, lng: 100.3256 },
82
+ data: {
83
+ name: "Place D",
84
+ description: "5th test desc",
85
+ group: "Vegetarian",
86
+ },
87
+ color: "green",
88
+ },
89
+ {
90
+ id: "5",
91
+ coord: { lat: 5.41092, lng: 100.2856 },
92
+ data: {
93
+ name: "Place E",
94
+ description: "5th test desc",
95
+ group: "Vegetarian",
96
+ },
97
+ color: "orange",
98
+ },
99
+ {
100
+ id: "6",
101
+ coord: { lat: 5.41792, lng: 100.3356 },
102
+ data: {
103
+ name: "Place F",
104
+ description: "5th test desc",
105
+ group: "Vegetarian",
106
+ },
107
+ color: "purple",
108
+ },
109
+ ]);
110
+ }, 3000);
111
+ return () => clearTimeout(timer);
112
+ }, []);
113
+
114
+ if (loading)
115
+ return <p className="text-gray-500 p-4">Loading Google Maps...</p>;
116
+
117
+ return (
118
+ <>
119
+ <StorySection
120
+ title="Default Map with Markers"
121
+ description="Renders markers with color-coded pins. Markers with a data.group are grouped in the color legend. Click a marker to open its info window. autoFitToMarkers adjusts the viewport to show all markers."
122
+ >
123
+ <div className="h-[500px] w-full">
124
+ <MapView
125
+ markerList={markers}
126
+ enableMapControl={true}
127
+ autoFitToMarkers
128
+ hideColorLegend={false}
129
+ infoWindowHeaderComponent={(id, data) => (
130
+ <h1 className="text-primary-500 font-semibold text-lg">
131
+ {data.name}
132
+ </h1>
133
+ )}
134
+ infoWindowComponent={(id, data) => (
135
+ <div key={id}>
136
+ <p className="text-base">{data.description}</p>
137
+ </div>
138
+ )}
139
+ handleUpdateOnClick={() => {}}
140
+ handleDeleteOnClick={() => {}}
141
+ />
142
+ </div>
143
+ </StorySection>
144
+
145
+ <StorySection
146
+ title="Polygon Select"
147
+ description="enablePolygonSelect adds a drawing manager toolbar. Draw a polygon to select markers within it. The selection panel shows a count and update/delete action buttons."
148
+ >
149
+ <div className="h-[500px] w-full">
150
+ <MapView
151
+ markerList={baseMarkers}
152
+ enableMapControl={true}
153
+ enablePolygonSelect
154
+ autoFitToMarkers
155
+ infoWindowHeaderComponent={(id, data) => (
156
+ <h1 className="text-primary-500 font-semibold text-lg">
157
+ {data.name}
158
+ </h1>
159
+ )}
160
+ infoWindowComponent={(id, data) => (
161
+ <div key={id}>
162
+ <p className="text-base">{data.description}</p>
163
+ </div>
164
+ )}
165
+ handleSelectPolygon={() => {}}
166
+ handleUpdateOnClick={() => {}}
167
+ handleDeleteOnClick={() => {}}
168
+ />
169
+ </div>
170
+ </StorySection>
171
+
172
+ <StorySection
173
+ title="With Polygon Overlay"
174
+ description="Pass polygonList to render static circles or polygons on the map. Circles use coord + radius (in km). Polygons use a path array of lat/lng points."
175
+ >
176
+ <div className="h-[500px] w-full">
177
+ <MapView
178
+ markerList={baseMarkers}
179
+ polygonList={[
180
+ {
181
+ id: "polygon-1",
182
+ coord: { lat: 5.41392, lng: 100.3146 },
183
+ type: "circle",
184
+ radius: 1,
185
+ color: "blue",
186
+ },
187
+ ]}
188
+ enableMapControl={true}
189
+ autoFitToMarkers
190
+ hideColorLegend
191
+ infoWindowComponent={(id, data) => (
192
+ <div key={id}>
193
+ <p className="text-base">{data.description}</p>
194
+ </div>
195
+ )}
196
+ handleUpdateOnClick={() => {}}
197
+ handleDeleteOnClick={() => {}}
198
+ />
199
+ </div>
200
+ </StorySection>
201
+
202
+ <StorySection
203
+ title="Marker Clustering"
204
+ description="enableCluster groups nearby markers into a cluster pin. Useful when many markers overlap at the same coordinates."
205
+ >
206
+ <div className="h-[500px] w-full">
207
+ <MapView
208
+ markerList={markers}
209
+ enableMapControl={true}
210
+ enableCluster
211
+ autoFitToMarkers
212
+ hideColorLegend
213
+ infoWindowComponent={(id, data) => (
214
+ <div key={id}>
215
+ <p className="text-base">{data.description}</p>
216
+ </div>
217
+ )}
218
+ handleUpdateOnClick={() => {}}
219
+ handleDeleteOnClick={() => {}}
220
+ />
221
+ </div>
222
+ </StorySection>
223
+ </>
224
+ );
225
+ });
@@ -0,0 +1,43 @@
1
+ # Modal
2
+
3
+ <!-- STORY -->
4
+
5
+ <hr>
6
+
7
+ Modal to overlay content
8
+
9
+ ##### Import
10
+
11
+ ```js
12
+ import { Overlay } from "blixify-ui-web/components/display/overlay";
13
+ ```
14
+
15
+ ##### Usage
16
+
17
+ ```jsx
18
+ <Modal
19
+ title="Modal Title"
20
+ open={true}
21
+ lib={{
22
+ Dialog,
23
+ Transition,
24
+ }}
25
+ />
26
+ ```
27
+
28
+ ##### Required props
29
+
30
+ | Name | Type | Description |
31
+ | ------ | --------- | --------------------- |
32
+ | `open` | `boolean` | Boolean to open modal |
33
+
34
+ ##### Optional props
35
+
36
+ | Name | Type | Default | Description |
37
+ | ---------------- | --------------- | ---------- | --------------------------------------------------------------------------------------------------- |
38
+ | `title` | `string` | "" | |
39
+ | `notification` | `React Element` | "" | |
40
+ | `maxWidth` | `lg/xl/2xl/3xl` | "" | |
41
+ | `renderContent` | `function` | `() => {}` | |
42
+ | `onClose` | `function` | `() => {}` | Called upon modal overlay is clicked |
43
+ | `overflowScroll` | `boolean` | `false` | If `true`, modal height is limited to 75vh on mobile, title stays sticky, and content is scrollable |
@@ -0,0 +1,81 @@
1
+ import { Transition } from "@headlessui/react";
2
+ import { CheckCircleIcon } from "@heroicons/react/24/outline";
3
+ import { storiesOf } from "@storybook/react";
4
+ import React, { useState } from "react";
5
+ import { Modal } from ".";
6
+ import { DataTemplateWrapper } from "../../data/dataWrapper";
7
+ import { Notification } from "../notification";
8
+ import README from "./README.md";
9
+
10
+ const stories = storiesOf("Display", module);
11
+
12
+ stories.addParameters({
13
+ readme: {
14
+ content: README,
15
+ },
16
+ });
17
+
18
+ stories.add("Modal", () => {
19
+ const [open, setOpen] = useState(true);
20
+ const notification = (
21
+ <Notification
22
+ icon={<CheckCircleIcon className="w-10 h-10 text-primary-600" />}
23
+ notificationAttribute={{
24
+ title: "Notification Title",
25
+ desc: "Lorem Ipsum",
26
+ visible: true,
27
+ }}
28
+ lib={{
29
+ Transition,
30
+ }}
31
+ />
32
+ );
33
+
34
+ return (
35
+ <Modal
36
+ title="Modal Title"
37
+ open={open}
38
+ notification={notification}
39
+ renderContent={() => {
40
+ return (
41
+ <DataTemplateWrapper
42
+ title={""}
43
+ type={"update"}
44
+ id={"new"}
45
+ collectionId={"modal-updates"}
46
+ schema={[
47
+ { id: "title", type: "string", name: "Title" },
48
+ {
49
+ id: "status",
50
+ type: "list",
51
+ name: "Status",
52
+ listSelection: ["Not Completed", "Completed"],
53
+ },
54
+ { id: "startDate", type: "date", name: "Clock In" },
55
+ ]}
56
+ workspace={{
57
+ apiEndpoint: "http://localhost:3000/api/data",
58
+ assetEndpoint:
59
+ "https://firebasestorage.googleapis.com/v0/b/esh-web-dev.appspot.com/o/",
60
+ }}
61
+ additionalQuery={[]}
62
+ organise={{
63
+ breadcrumbType: "button",
64
+ }}
65
+ sort={{ sortId: "startDate", type: "desc" }}
66
+ edit={{
67
+ allEditable: true,
68
+ deleteBtn: true,
69
+ }}
70
+ bareSettings={{
71
+ bareUpdateActionBottom: true,
72
+ }}
73
+ />
74
+ );
75
+ }}
76
+ onClose={() => {
77
+ setOpen(!open);
78
+ }}
79
+ />
80
+ );
81
+ });
@@ -0,0 +1,43 @@
1
+ # Notification
2
+
3
+ <!-- STORY -->
4
+
5
+ <hr>
6
+
7
+ Notification to display performed actions
8
+
9
+ ##### Import
10
+
11
+ ```js
12
+ import { Notification } from "blixify-ui-web/components/display/notification";
13
+ ```
14
+
15
+ ##### Usage
16
+
17
+ ```jsx
18
+ <Notification
19
+ icon={<CheckCircleIcon className="w-10 h-10 text-primary-600" />}
20
+ notificationAttribute={{
21
+ title: "Notification Title",
22
+ desc: "Lorem Ipsum",
23
+ visible: true,
24
+ }}
25
+ lib={{
26
+ Transition,
27
+ }}
28
+ />
29
+ ```
30
+
31
+ ##### Required props
32
+
33
+ | Name | Type | Description |
34
+ | ----------------------- | ------------------------ | ----------------------------- |
35
+ | `icon` | `React Element` | Hero Icons |
36
+ | `notificationAttribute` | `Notification Attribute` | Determine title & description |
37
+ | `lib` | `class` | Class |
38
+
39
+ ##### Optional props
40
+
41
+ | Name | Type | Default | Description |
42
+ | --------- | ---------- | ---------- | ----------- |
43
+ | `onClose` | `function` | `() => {}` |
@@ -0,0 +1,30 @@
1
+ import { Transition } from "@headlessui/react";
2
+ import { CheckCircleIcon } from "@heroicons/react/24/outline";
3
+ import { storiesOf } from "@storybook/react";
4
+ import React from "react";
5
+ import { Notification } from ".";
6
+ import README from "./README.md";
7
+
8
+ const stories = storiesOf("Display", module);
9
+
10
+ stories.addParameters({
11
+ readme: {
12
+ content: README,
13
+ },
14
+ });
15
+
16
+ stories.add("Notification", () => {
17
+ return (
18
+ <Notification
19
+ icon={<CheckCircleIcon className="w-10 h-10 text-primary-600" />}
20
+ notificationAttribute={{
21
+ title: "Notification Title",
22
+ desc: "Lorem Ipsum",
23
+ visible: true,
24
+ }}
25
+ lib={{
26
+ Transition,
27
+ }}
28
+ />
29
+ );
30
+ });
@@ -0,0 +1,25 @@
1
+ # Progress
2
+
3
+ <!-- STORY -->
4
+
5
+ <hr>
6
+
7
+ Progress Bar
8
+
9
+ ##### Import
10
+
11
+ ```js
12
+ import { Progress } from "blixify-ui-web/components/display/progress";
13
+ ```
14
+
15
+ ##### Usage
16
+
17
+ ```jsx
18
+ <Progress percentage={20} />
19
+ ```
20
+
21
+ ##### Props
22
+
23
+ | Name | Type | Default | Description |
24
+ | ------------ | -------- | ------- | ----------- |
25
+ | `percentage` | `number` | "" | |
@@ -0,0 +1,15 @@
1
+ import { storiesOf } from "@storybook/react";
2
+ import React from "react";
3
+ import { Progress } from ".";
4
+ import README from "./README.md";
5
+ const stories = storiesOf("Display", module);
6
+
7
+ stories.addParameters({
8
+ readme: {
9
+ content: README,
10
+ },
11
+ });
12
+
13
+ stories.add("Progress", () => {
14
+ return <Progress percentage={90} />;
15
+ });
@@ -0,0 +1,96 @@
1
+ # Stepper
2
+
3
+ <!-- STORY -->
4
+
5
+ <hr>
6
+
7
+ Stepper to display content step by step
8
+
9
+ ##### Import
10
+
11
+ ```js
12
+ import { Stepper } from "blixify-ui-web/components/display/stepper";
13
+ ```
14
+
15
+ ##### Usage
16
+
17
+ ```jsx
18
+ const [stepIndex, setStepIndex] = useState(0);
19
+ const steps = [
20
+ {
21
+ title: "Create account",
22
+ description: "Vitae sed mi luctus laoreet.",
23
+ },
24
+ {
25
+ title: "Profile information",
26
+ description: "Cursus semper viverra facilisis et et some more.",
27
+ },
28
+ {
29
+ title: "Business information",
30
+ description: "Penatibus eu quis ante.",
31
+ },
32
+ {
33
+ title: "Theme",
34
+ description: "Faucibus nec enim leo et.",
35
+ },
36
+ {
37
+ title: "Preview",
38
+ description: "Iusto et officia maiores porro ad non quas.",
39
+ icon: (
40
+ <Tag tagText={stepIndex < 4 ? "Pending" : "In Progress"} size="small" />
41
+ ),
42
+ },
43
+ ];
44
+ return (
45
+ <>
46
+ <div className="font-medium"> Vertical Stepper</div>
47
+ <Stepper
48
+ steps={steps}
49
+ className="mt-5"
50
+ stepIndex={stepIndex}
51
+ onChange={(index, title, id) => {
52
+ setStepIndex(index);
53
+ // title and id are also available if needed
54
+ }}
55
+ />
56
+ <div className="mt-5 font-medium"> Horizontal Stepper</div>
57
+ <Stepper
58
+ steps={steps}
59
+ className="mt-5"
60
+ horizontal={true}
61
+ stepIndex={stepIndex}
62
+ onChange={(index, title, id) => {
63
+ setStepIndex(index);
64
+ // title and id are also available if needed
65
+ }}
66
+ />
67
+ </>
68
+ );
69
+ ```
70
+
71
+ ##### Required props
72
+
73
+ | Name | Type | Description |
74
+ | ----------- | ----------------- | ---------------------------------------------------- |
75
+ | `stepIndex` | `number` | Current index of steps |
76
+ | `steps` | `Step Class List` | Determine title & description |
77
+ | `onChange` | `function` | `(index: number, title: string, id?: string) => {}` |
78
+
79
+ ##### Optional props
80
+
81
+ | Name | Type | Default | Description |
82
+ | ------------ | ---------------- | ------- | -------------------------------------- |
83
+ | `horizontal` | `boolean` | null | Whether it is horizontal or vertical |
84
+ | `disabled` | `boolean` | null | Whether the stepper is disabled or not |
85
+ | `light` | `boolean` | null | Whether stepper is in dark background |
86
+ | `className` | `tailwind class` | "" | |
87
+
88
+ ##### Step Class
89
+
90
+ | Name | Type | Required | Description |
91
+ | ------------- | --------------- | -------- | ------------------------------------------------------------------- |
92
+ | `title` | `string` | Yes | |
93
+ | `description` | `string` | | |
94
+ | `icon` | `React Element` | | Add Icon right of title (Vertical), Override Step Icon (Horizontal) |
95
+ | `skip` | `boolean` | | Greyed out Minus Icon |
96
+ | `id` | `string` | | Optional id identifier for the step, passed to onChange callback |