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,297 @@
1
+ import { Disclosure, Menu, Popover, Transition } from "@headlessui/react";
2
+ import { ShoppingBagIcon } from "@heroicons/react/24/outline";
3
+ import { storiesOf } from "@storybook/react";
4
+ import React, { useState } from "react";
5
+ import { Button } from "../../action/button";
6
+ import { ActionSection } from "../../design/actionSection";
7
+ import { FooterSection } from "../../design/footerSection";
8
+ import { HeroSection } from "../../design/heroSection";
9
+ import { Grid } from "../../display/grid";
10
+ import { List } from "../../display/list";
11
+ import { Rating } from "../../input/rating";
12
+ import { Header } from "../../navigation/header";
13
+ import { Container } from "../../structure/container";
14
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
15
+ const Logo = require("../../../assets/logo.png");
16
+
17
+ const stories = storiesOf("Template", module).addParameters({
18
+ docs: {
19
+ description: {
20
+ component:
21
+ "Full-page e-commerce templates combining multiple components into ready-to-use layouts. These templates demonstrate real-world compositions of Header, HeroSection, Grid, List, ActionSection, and FooterSection.",
22
+ },
23
+ },
24
+ });
25
+
26
+ const NAVIGATION = [
27
+ { name: "Home", href: "#" },
28
+ { name: "Headphones", href: "#" },
29
+ { name: "Speakers", href: "#" },
30
+ { name: "Accessories", href: "#" },
31
+ ];
32
+
33
+ const PRODUCTS = [
34
+ {
35
+ id: 1,
36
+ name: "Sony WH-1000XM5",
37
+ variant: "Noise Cancelling",
38
+ price: "RM 1,649",
39
+ rating: 4.5,
40
+ reviews: 9,
41
+ image:
42
+ "https://images.unsplash.com/photo-1505740420928-5e560c06d30e?w=400&h=400&fit=crop&q=80",
43
+ },
44
+ {
45
+ id: 2,
46
+ name: "Apple AirPods Pro",
47
+ variant: "2nd Generation",
48
+ price: "RM 1,149",
49
+ rating: 4,
50
+ reviews: 15,
51
+ image:
52
+ "https://images.unsplash.com/photo-1600294037681-c80b4cb5b434?w=400&h=400&fit=crop&q=80",
53
+ },
54
+ {
55
+ id: 3,
56
+ name: "Bose QuietComfort",
57
+ variant: "Ultra Headphones",
58
+ price: "RM 1,999",
59
+ rating: 4,
60
+ reviews: 21,
61
+ image:
62
+ "https://images.unsplash.com/photo-1546435770-a3e426bf472b?w=400&h=400&fit=crop&q=80",
63
+ },
64
+ {
65
+ id: 4,
66
+ name: "JBL Tune 770NC",
67
+ variant: "Wireless BT",
68
+ price: "RM 459",
69
+ rating: 3,
70
+ reviews: 40,
71
+ image:
72
+ "https://images.unsplash.com/photo-1583394838336-acd977736f90?w=400&h=400&fit=crop&q=80",
73
+ },
74
+ {
75
+ id: 5,
76
+ name: "Sennheiser Momentum 4",
77
+ variant: "Wireless ANC",
78
+ price: "RM 1,299",
79
+ rating: 4.5,
80
+ reviews: 7,
81
+ image:
82
+ "https://images.unsplash.com/photo-1484704849700-f032a568e944?w=400&h=400&fit=crop&q=80",
83
+ },
84
+ {
85
+ id: 6,
86
+ name: "Beats Studio Pro",
87
+ variant: "Wireless Headphones",
88
+ price: "RM 1,099",
89
+ rating: 4,
90
+ reviews: 33,
91
+ image:
92
+ "https://images.unsplash.com/photo-1613040809024-b4ef7ba99bc3?w=400&h=400&fit=crop&q=80",
93
+ },
94
+ ];
95
+
96
+ const REVIEWS = [
97
+ {
98
+ id: "1",
99
+ title: "Sarah L.",
100
+ img: "https://i.pravatar.cc/40?img=1",
101
+ product: "Sony WH-1000XM5",
102
+ rating: 5,
103
+ comment:
104
+ "Absolutely love these headphones. The noise cancellation is top-notch and battery life is incredible.",
105
+ },
106
+ {
107
+ id: "2",
108
+ title: "James T.",
109
+ img: "https://i.pravatar.cc/40?img=3",
110
+ product: "Apple AirPods Pro",
111
+ rating: 4,
112
+ comment:
113
+ "Great fit and sound quality. Transparency mode feels very natural. Worth every penny.",
114
+ },
115
+ {
116
+ id: "3",
117
+ title: "Priya M.",
118
+ img: "https://i.pravatar.cc/40?img=5",
119
+ product: "Bose QuietComfort Ultra",
120
+ rating: 5,
121
+ comment:
122
+ "Best headphones I've ever owned. Incredibly comfortable for long listening sessions.",
123
+ },
124
+ {
125
+ id: "4",
126
+ title: "Daniel K.",
127
+ img: "https://i.pravatar.cc/40?img=7",
128
+ product: "JBL Tune 770NC",
129
+ rating: 3,
130
+ comment:
131
+ "Good value for the price. Sound is decent but ANC could be stronger.",
132
+ },
133
+ ];
134
+
135
+ stories.add("Product Listing", () => {
136
+ const [cartCount, setCartCount] = useState(0);
137
+
138
+ const handleAddToCart = (e: React.MouseEvent) => {
139
+ e.stopPropagation();
140
+ setCartCount((c) => c + 1);
141
+ };
142
+
143
+ const gridData = PRODUCTS.map((product) => ({
144
+ id: String(product.id),
145
+ title: product.name,
146
+ description: product.variant,
147
+ imageUrl: product.image,
148
+ extra: (
149
+ <div className="flex flex-col gap-y-1">
150
+ <div className="flex items-center justify-between">
151
+ <Rating
152
+ id={`product-rating-${product.id}`}
153
+ label=""
154
+ value={product.rating}
155
+ total={5}
156
+ size="small"
157
+ />
158
+ <p className="text-sm font-medium text-gray-900">{product.price}</p>
159
+ </div>
160
+ <p className="text-xs text-gray-500">{product.reviews} reviews</p>
161
+ <div className="mt-2">
162
+ <Button
163
+ text="Add to Cart"
164
+ type="normal"
165
+ size="small"
166
+ className="w-full"
167
+ onClick={handleAddToCart}
168
+ />
169
+ </div>
170
+ </div>
171
+ ),
172
+ }));
173
+
174
+ return (
175
+ <div className="min-h-screen bg-white">
176
+ {/* Header */}
177
+ <Header
178
+ defaultNav="/"
179
+ page="Headphones"
180
+ logo={Logo}
181
+ navigation={NAVIGATION}
182
+ extra={
183
+ <div className="relative mr-4 cursor-pointer">
184
+ <ShoppingBagIcon className="h-6 w-6 text-gray-600" />
185
+ {cartCount > 0 && (
186
+ <span className="absolute -top-1.5 -right-1.5 flex h-4 w-4 items-center justify-center rounded-full bg-primary-500 text-[10px] font-medium text-white">
187
+ {cartCount}
188
+ </span>
189
+ )}
190
+ </div>
191
+ }
192
+ lib={{ Disclosure, Menu, Transition, Popover }}
193
+ />
194
+
195
+ {/* Hero */}
196
+ <HeroSection
197
+ size="large"
198
+ className="lg:py-48"
199
+ title="Premium Audio, Delivered"
200
+ content="Explore our curated collection of top-tier headphones. Free shipping on orders above RM 500."
201
+ backgroundImage="https://images.unsplash.com/photo-1487215078519-e21cc028cb29?w=1600&h=900&fit=crop&q=80"
202
+ backgroundPosition="center"
203
+ callToAction={
204
+ <Button text="Shop Now" type="normal" onClick={() => {}} />
205
+ }
206
+ backgroundImageOnly
207
+ darkMode
208
+ darkOverlay
209
+ />
210
+
211
+ {/* Product Grid */}
212
+ <Container bgColor="py-12 bg-white">
213
+ <div className="flex items-center justify-between mb-6">
214
+ <h2 className="text-2xl font-semibold text-gray-900">
215
+ Headphones ({PRODUCTS.length})
216
+ </h2>
217
+ <p className="text-sm text-gray-500">Sorted by: Featured</p>
218
+ </div>
219
+ <Grid
220
+ data={gridData}
221
+ loading={false}
222
+ hidePagination
223
+ gridColClassName="grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-x-6 gap-y-10"
224
+ itemClassName="shadow-none"
225
+ />
226
+ </Container>
227
+
228
+ {/* Customer Reviews */}
229
+ <Container bgColor="py-12 bg-gray-50">
230
+ <div className="flex flex-col gap-y-10">
231
+ <div>
232
+ <h2 className="text-2xl font-semibold text-gray-900 mb-6">
233
+ Customer Reviews
234
+ </h2>
235
+ <List
236
+ loading={false}
237
+ hidePagination
238
+ list={REVIEWS.map((review) => ({
239
+ id: review.id,
240
+ title: review.title,
241
+ img: review.img,
242
+ product: review.product,
243
+ comment: review.comment,
244
+ action: (
245
+ <Rating
246
+ id={`review-rating-${review.id}`}
247
+ label=""
248
+ value={review.rating}
249
+ total={5}
250
+ size="small"
251
+ />
252
+ ),
253
+ }))}
254
+ />
255
+ </div>
256
+ <div className="w-full">
257
+ <ActionSection
258
+ title={"Get 15% off your first order\nSign up for our newsletter"}
259
+ buttonText="Subscribe Now"
260
+ onClick={() => {}}
261
+ />
262
+ </div>
263
+ </div>
264
+ </Container>
265
+ {/* Footer */}
266
+ <FooterSection
267
+ caption="© 2026 SoundStore. All rights reserved."
268
+ footerList={[
269
+ {
270
+ title: "Shop",
271
+ subList: [
272
+ { name: "Headphones", link: "/headphones" },
273
+ { name: "Earbuds", link: "/earbuds" },
274
+ { name: "Accessories", link: "/accessories" },
275
+ ],
276
+ },
277
+ {
278
+ title: "Company",
279
+ subList: [
280
+ { name: "About Us", link: "/about" },
281
+ { name: "Careers", link: "/careers" },
282
+ { name: "Blog", link: "/blog" },
283
+ ],
284
+ },
285
+ {
286
+ title: "Support",
287
+ subList: [
288
+ { name: "Contact Us", link: "/contact" },
289
+ { name: "Privacy Policy", link: "/privacy" },
290
+ { name: "Terms of Service", link: "/terms" },
291
+ ],
292
+ },
293
+ ]}
294
+ />
295
+ </div>
296
+ );
297
+ });
@@ -0,0 +1,194 @@
1
+ import { HeartIcon } from "@heroicons/react/24/outline";
2
+ import { storiesOf } from "@storybook/react";
3
+ import { useState } from "react";
4
+ import { Button } from "../../action/button";
5
+ import { IconButton } from "../../action/iconButton";
6
+ import { Collapse } from "../../advanced/collapse";
7
+ import { FileGrid } from "../../design/fileGrid";
8
+ import { Rating } from "../../input/rating";
9
+ import { Container } from "../../structure/container";
10
+
11
+ const stories = storiesOf("Template", module).addParameters({
12
+ docs: {
13
+ description: {
14
+ component:
15
+ "Full-page e-commerce templates combining multiple components into ready-to-use layouts. These templates demonstrate real-world compositions of Container, FileGrid, Rating, Button, IconButton, and Collapse.",
16
+ },
17
+ },
18
+ });
19
+
20
+ const PRODUCT_IMAGES = [
21
+ {
22
+ file: "https://images.unsplash.com/photo-1559056199-641a0ac8b55e?w=600&h=600&fit=crop&q=80",
23
+ fileType: "image" as const,
24
+ },
25
+ {
26
+ file: "https://images.unsplash.com/photo-1611854779393-1b2da9d400fe?w=600&h=600&fit=crop&q=80",
27
+ fileType: "image" as const,
28
+ },
29
+ {
30
+ file: "https://images.unsplash.com/photo-1587049352851-8d4e89133924?w=600&h=600&fit=crop&q=80",
31
+ fileType: "image" as const,
32
+ },
33
+ {
34
+ file: "https://images.unsplash.com/photo-1514432324607-a09d9b4aefdd?w=600&h=600&fit=crop&q=80",
35
+ fileType: "image" as const,
36
+ },
37
+ {
38
+ file: "https://images.unsplash.com/photo-1514432324607-a09d9b4aefdd?w=600&h=600&fit=crop&q=80",
39
+ fileType: "image" as const,
40
+ },
41
+ ];
42
+
43
+ const COLORS = [
44
+ { id: "dark", hex: "#3b1f0a" },
45
+ { id: "medium", hex: "#7b4f2e" },
46
+ { id: "light", hex: "#c49a6c" },
47
+ ];
48
+
49
+ const FEATURES = [
50
+ "Single origin Ethiopian Yirgacheffe beans",
51
+ "Medium-dark roast profile",
52
+ "Notes of blueberry, jasmine, and dark chocolate",
53
+ "Freshly roasted within 48 hours of shipping",
54
+ "Available as whole bean or ground",
55
+ "Resealable kraft bag with one-way valve",
56
+ "250g per bag",
57
+ ];
58
+
59
+ const RATING = 4;
60
+
61
+ stories.add("Product Overview", () => {
62
+ const [selectedColor, setSelectedColor] = useState("dark");
63
+ const [wishlisted, setWishlisted] = useState(false);
64
+
65
+ return (
66
+ <Container bgColor="py-8 bg-white">
67
+ <h2 className="text-2xl font-semibold text-gray-900 mb-6">
68
+ Product Overview
69
+ </h2>
70
+ <div className="flex flex-col md:flex-row gap-10">
71
+ {/* Left: image gallery */}
72
+ <div className="flex flex-col gap-4 flex-shrink-0 md:w-[460px]">
73
+ <FileGrid
74
+ fileList={PRODUCT_IMAGES}
75
+ inlinePreview
76
+ inlinePreviewHeight="h-80 sm:h-[400px]"
77
+ thumbnailScroll
78
+ />
79
+ </div>
80
+
81
+ {/* Right: product details */}
82
+ <div className="flex-1">
83
+ <h1 className="text-2xl font-semibold text-gray-900">
84
+ Ethiopian Yirgacheffe
85
+ </h1>
86
+ <p className="text-2xl text-gray-900 mt-2">RM 24</p>
87
+
88
+ {/* Star rating */}
89
+ <div className="mt-2">
90
+ <Rating
91
+ id="product-rating"
92
+ label=""
93
+ value={RATING}
94
+ total={5}
95
+ size="small"
96
+ />
97
+ </div>
98
+
99
+ <p className="mt-4 text-sm text-gray-600 leading-relaxed">
100
+ A bright and complex single origin from the birthplace of coffee.
101
+ Grown at high altitude in the Yirgacheffe region of Ethiopia, this
102
+ medium-dark roast delivers vibrant notes of blueberry, jasmine, and
103
+ dark chocolate with a clean, lingering finish.
104
+ </p>
105
+
106
+ {/* Roast picker */}
107
+ <div className="mt-5">
108
+ <p className="text-sm text-gray-700 mb-2">Roast</p>
109
+ <div className="flex gap-2">
110
+ {COLORS.map((color) => (
111
+ <button
112
+ key={color.id}
113
+ onClick={() => setSelectedColor(color.id)}
114
+ className={`w-8 h-8 rounded-full border-2 focus:outline-none ${
115
+ selectedColor === color.id
116
+ ? "border-primary-600 ring-2 ring-primary-300"
117
+ : "border-gray-300"
118
+ }`}
119
+ style={{ backgroundColor: color.hex }}
120
+ aria-label={`Roast ${color.id}`}
121
+ />
122
+ ))}
123
+ </div>
124
+ </div>
125
+
126
+ {/* Add to bag + wishlist */}
127
+ <div className="flex items-center gap-3 mt-6">
128
+ <div className="flex-1">
129
+ <Button
130
+ text="Add to bag"
131
+ type="normal"
132
+ className="w-full sm:px-6"
133
+ onClick={() => {}}
134
+ size="small"
135
+ />
136
+ </div>
137
+ <IconButton
138
+ icon={
139
+ <HeartIcon
140
+ className={`w-6 h-6 ${
141
+ wishlisted ? "text-red-500 fill-red-500" : "text-gray-400"
142
+ }`}
143
+ />
144
+ }
145
+ onClick={() => setWishlisted((w) => !w)}
146
+ />
147
+ </div>
148
+
149
+ {/* Accordion sections */}
150
+ <div className="mt-8 divide-y border-t border-b">
151
+ <Collapse
152
+ title="Features"
153
+ defaultValue={true}
154
+ icon={<span />}
155
+ titleClassName="text-primary-600 font-medium"
156
+ iconClassName="w-5 h-5 text-primary-600"
157
+ collapseContainerCss="py-4 !border-0"
158
+ notCollapseContainerCss="py-4"
159
+ containerClassName="rounded-none"
160
+ content={
161
+ <ul className="px-4 pb-4 space-y-2">
162
+ {FEATURES.map((f) => (
163
+ <li
164
+ key={f}
165
+ className="flex items-center gap-2 text-sm text-gray-600"
166
+ >
167
+ - {f}
168
+ </li>
169
+ ))}
170
+ </ul>
171
+ }
172
+ />
173
+ {["Brew Guide", "Shipping", "Returns"].map((section) => (
174
+ <Collapse
175
+ key={section}
176
+ title={section}
177
+ icon={<span />}
178
+ titleClassName="text-gray-800 font-medium"
179
+ collapseContainerCss="py-4 !border-0"
180
+ notCollapseContainerCss="py-4"
181
+ containerClassName="rounded-none"
182
+ content={
183
+ <p className="px-4 pb-4 text-sm text-gray-500">
184
+ Details about {section.toLowerCase()} will appear here.
185
+ </p>
186
+ }
187
+ />
188
+ ))}
189
+ </div>
190
+ </div>
191
+ </div>
192
+ </Container>
193
+ );
194
+ });