create-brainerce-store 1.51.0 → 1.52.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 (173) hide show
  1. package/README.md +71 -0
  2. package/dist/index.js +24 -80
  3. package/messages/en.json +32 -0
  4. package/messages/he.json +32 -0
  5. package/package.json +1 -1
  6. package/templates/nextjs/base/.claude/commands/design.md +9 -0
  7. package/templates/nextjs/base/AI-GUIDE.md +52 -3
  8. package/templates/nextjs/base/CLAUDE.md +10 -0
  9. package/templates/nextjs/base/package.json.ejs +52 -39
  10. package/templates/nextjs/base/src/app/globals.css +36 -30
  11. package/templates/nextjs/base/src/components/checkout/payment-step.tsx +14 -10
  12. package/templates/nextjs/base/src/components/ui/accordion.tsx +53 -0
  13. package/templates/nextjs/base/src/components/ui/badge.tsx +32 -0
  14. package/templates/nextjs/base/src/components/ui/button.tsx +49 -0
  15. package/templates/nextjs/base/src/components/ui/card.tsx +55 -0
  16. package/templates/nextjs/base/src/components/ui/checkbox.tsx +28 -0
  17. package/templates/nextjs/base/src/components/ui/dialog.tsx +107 -0
  18. package/templates/nextjs/base/src/components/ui/input.tsx +22 -0
  19. package/templates/nextjs/base/src/components/ui/label.tsx +21 -0
  20. package/templates/nextjs/base/src/components/ui/radio-group.tsx +38 -0
  21. package/templates/nextjs/base/src/components/ui/select.tsx +153 -0
  22. package/templates/nextjs/base/src/components/ui/separator.tsx +26 -0
  23. package/templates/nextjs/base/src/components/ui/sheet.tsx +125 -0
  24. package/templates/nextjs/base/src/components/ui/skeleton.tsx +7 -0
  25. package/templates/nextjs/base/src/components/ui/tabs.tsx +55 -0
  26. package/templates/nextjs/base/src/components/ui/textarea.tsx +21 -0
  27. package/templates/nextjs/base/src/components/ui/tooltip.tsx +32 -0
  28. package/templates/nextjs/base/src/ui/cart/cart-bundle-offer.tsx +17 -11
  29. package/templates/nextjs/base/src/ui/cart/cart-item.tsx +2 -8
  30. package/templates/nextjs/base/src/ui/cart/cart-nudges.tsx +28 -39
  31. package/templates/nextjs/base/src/ui/cart/cart-summary.tsx +3 -1
  32. package/templates/nextjs/base/src/ui/cart/cart-upgrade-banner.tsx +8 -23
  33. package/templates/nextjs/base/src/ui/cart/cart-view.tsx +18 -27
  34. package/templates/nextjs/base/src/ui/cart/coupon-input.tsx +10 -21
  35. package/templates/nextjs/base/src/ui/cart/free-shipping-bar.tsx +2 -3
  36. package/templates/nextjs/base/src/ui/cart/reservation-countdown.tsx +95 -103
  37. package/templates/nextjs/base/src/ui/home/hero-section.tsx +4 -6
  38. package/templates/nextjs/base/src/ui/layout/announcement-bar.tsx.ejs +116 -125
  39. package/templates/nextjs/base/src/ui/layout/faq-section.tsx.ejs +90 -103
  40. package/templates/nextjs/base/src/ui/layout/header-account.tsx +2 -17
  41. package/templates/nextjs/base/src/ui/layout/language-switcher.tsx.ejs +80 -70
  42. package/templates/nextjs/base/src/ui/layout/site-footer.tsx.ejs +144 -164
  43. package/templates/nextjs/base/src/ui/layout/site-header.tsx.ejs +152 -182
  44. package/templates/nextjs/base/src/ui/product/customization-fields.tsx +456 -444
  45. package/templates/nextjs/base/src/ui/product/discount-badge.tsx +18 -22
  46. package/templates/nextjs/base/src/ui/product/frequently-bought-together.tsx +15 -27
  47. package/templates/nextjs/base/src/ui/product/modifier-group-selector.tsx +206 -175
  48. package/templates/nextjs/base/src/ui/product/price-display.tsx +3 -2
  49. package/templates/nextjs/base/src/ui/product/product-card.tsx +238 -271
  50. package/templates/nextjs/base/src/ui/product/product-client-section.tsx +455 -470
  51. package/templates/nextjs/base/src/ui/product/product-listing.tsx +96 -79
  52. package/templates/nextjs/base/src/ui/product/recommendation-section.tsx +102 -107
  53. package/templates/nextjs/base/src/ui/product/review-form.tsx +44 -43
  54. package/templates/nextjs/{designs/passepartout → base/src}/ui/product/reviews-section.tsx.ejs +108 -96
  55. package/templates/nextjs/base/src/ui/product/stock-badge.tsx +61 -63
  56. package/templates/nextjs/base/tailwind.config.ts +69 -42
  57. package/templates/nextjs/designs/{passepartout → atelier}/app-overlay/layout.tsx.ejs +23 -25
  58. package/templates/nextjs/designs/atelier/globals.css +396 -0
  59. package/templates/nextjs/designs/atelier/messages-patch/en.json +99 -0
  60. package/templates/nextjs/designs/atelier/messages-patch/he.json +99 -0
  61. package/templates/nextjs/designs/{passepartout → atelier}/ui/cart/cart-bundle-offer.tsx +110 -111
  62. package/templates/nextjs/designs/atelier/ui/cart/cart-drawer.tsx +163 -0
  63. package/templates/nextjs/designs/atelier/ui/cart/cart-item.tsx +140 -0
  64. package/templates/nextjs/designs/atelier/ui/cart/cart-nudges.tsx +34 -0
  65. package/templates/nextjs/designs/atelier/ui/cart/cart-summary.tsx +107 -0
  66. package/templates/nextjs/designs/{passepartout → atelier}/ui/cart/cart-upgrade-banner.tsx +123 -141
  67. package/templates/nextjs/designs/atelier/ui/cart/cart-view.tsx +147 -0
  68. package/templates/nextjs/designs/atelier/ui/cart/coupon-input.tsx +142 -0
  69. package/templates/nextjs/designs/{passepartout → atelier}/ui/cart/free-shipping-bar.tsx +77 -62
  70. package/templates/nextjs/designs/{passepartout → atelier}/ui/cart/reservation-countdown.tsx +89 -103
  71. package/templates/nextjs/designs/atelier/ui/home/benefits-band.tsx +34 -0
  72. package/templates/nextjs/designs/atelier/ui/home/category-tiles.tsx +148 -0
  73. package/templates/nextjs/designs/atelier/ui/home/discount-banner-strip.tsx +27 -0
  74. package/templates/nextjs/designs/atelier/ui/home/editorial-band.tsx +73 -0
  75. package/templates/nextjs/designs/atelier/ui/home/featured-products-section.tsx +36 -0
  76. package/templates/nextjs/designs/atelier/ui/home/hero-section.tsx +148 -0
  77. package/templates/nextjs/designs/atelier/ui/home/home-client.tsx +54 -0
  78. package/templates/nextjs/designs/atelier/ui/home/newsletter-section.tsx +78 -0
  79. package/templates/nextjs/designs/atelier/ui/home/testimonials-band.tsx +46 -0
  80. package/templates/nextjs/designs/atelier/ui/layout/announcement-bar.tsx +118 -0
  81. package/templates/nextjs/designs/atelier/ui/layout/faq-section.tsx +96 -0
  82. package/templates/nextjs/designs/atelier/ui/layout/header-account.tsx +36 -0
  83. package/templates/nextjs/designs/atelier/ui/layout/header-cart.tsx +36 -0
  84. package/templates/nextjs/designs/atelier/ui/layout/language-switcher.tsx.ejs +137 -0
  85. package/templates/nextjs/designs/atelier/ui/layout/nav-url.ts +14 -0
  86. package/templates/nextjs/designs/atelier/ui/layout/rich-text-block.tsx +34 -0
  87. package/templates/nextjs/designs/atelier/ui/layout/site-footer.tsx.ejs +141 -0
  88. package/templates/nextjs/designs/atelier/ui/layout/site-header.tsx.ejs +138 -0
  89. package/templates/nextjs/designs/atelier/ui/product/customization-fields.tsx +466 -0
  90. package/templates/nextjs/designs/{passepartout → atelier}/ui/product/discount-badge.tsx +17 -22
  91. package/templates/nextjs/designs/{passepartout → atelier}/ui/product/frequently-bought-together.tsx +196 -205
  92. package/templates/nextjs/designs/atelier/ui/product/modifier-group-selector.tsx +193 -0
  93. package/templates/nextjs/designs/atelier/ui/product/price-display.tsx +69 -0
  94. package/templates/nextjs/designs/atelier/ui/product/product-card.tsx +260 -0
  95. package/templates/nextjs/designs/atelier/ui/product/product-client-section.tsx +471 -0
  96. package/templates/nextjs/designs/atelier/ui/product/product-grid.tsx +47 -0
  97. package/templates/nextjs/designs/atelier/ui/product/product-listing.tsx +260 -0
  98. package/templates/nextjs/designs/atelier/ui/product/recommendation-section.tsx +95 -0
  99. package/templates/nextjs/designs/{passepartout → atelier}/ui/product/review-form.tsx +267 -294
  100. package/templates/nextjs/designs/atelier/ui/product/reviews-section.tsx.ejs +148 -0
  101. package/templates/nextjs/designs/atelier/ui/product/stock-badge.tsx +66 -0
  102. package/templates/nextjs/designs/atelier/ui/product/variant-selector.tsx +206 -0
  103. package/templates/nextjs/designs/atelier/ui/shared/cdn-image.tsx +29 -0
  104. package/templates/nextjs/designs/{passepartout → atelier}/ui/shared/fly-to-cart.ts +86 -85
  105. package/templates/nextjs/designs/atelier/ui/shared/icons.tsx +269 -0
  106. package/templates/nextjs/designs/atelier/ui/shared/loading-spinner.tsx +64 -0
  107. package/templates/nextjs/designs/atelier/ui/shared/reveal.tsx +71 -0
  108. package/templates/nextjs/designs/atelier/ui/shared/select-menu.tsx +125 -0
  109. package/templates/nextjs/ui-canvas/cart/cart-bundle-offer.tsx +2 -0
  110. package/templates/nextjs/ui-canvas/cart/cart-item.tsx +2 -0
  111. package/templates/nextjs/ui-canvas/cart/cart-nudges.tsx +2 -0
  112. package/templates/nextjs/ui-canvas/cart/cart-summary.tsx +2 -0
  113. package/templates/nextjs/ui-canvas/cart/cart-upgrade-banner.tsx +2 -0
  114. package/templates/nextjs/ui-canvas/cart/cart-view.tsx +2 -2
  115. package/templates/nextjs/ui-canvas/cart/coupon-input.tsx +2 -0
  116. package/templates/nextjs/ui-canvas/cart/free-shipping-bar.tsx +2 -0
  117. package/templates/nextjs/ui-canvas/cart/reservation-countdown.tsx +2 -0
  118. package/templates/nextjs/ui-canvas/home/discount-banner-strip.tsx +1 -1
  119. package/templates/nextjs/ui-canvas/home/featured-products-section.tsx +1 -1
  120. package/templates/nextjs/ui-canvas/home/hero-section.tsx +1 -1
  121. package/templates/nextjs/ui-canvas/home/home-client.tsx +1 -1
  122. package/templates/nextjs/ui-canvas/layout/announcement-bar.tsx.ejs +1 -1
  123. package/templates/nextjs/ui-canvas/layout/faq-section.tsx.ejs +2 -2
  124. package/templates/nextjs/ui-canvas/layout/header-account.tsx +1 -1
  125. package/templates/nextjs/ui-canvas/layout/language-switcher.tsx.ejs +2 -0
  126. package/templates/nextjs/ui-canvas/layout/rich-text-block.tsx.ejs +2 -0
  127. package/templates/nextjs/ui-canvas/layout/site-footer.tsx.ejs +2 -2
  128. package/templates/nextjs/ui-canvas/layout/site-header.tsx.ejs +2 -2
  129. package/templates/nextjs/ui-canvas/product/customization-fields.tsx +2 -0
  130. package/templates/nextjs/ui-canvas/product/discount-badge.tsx +2 -0
  131. package/templates/nextjs/ui-canvas/product/frequently-bought-together.tsx +2 -0
  132. package/templates/nextjs/ui-canvas/product/modifier-group-selector.tsx +2 -0
  133. package/templates/nextjs/ui-canvas/product/price-display.tsx +2 -0
  134. package/templates/nextjs/ui-canvas/product/product-card.tsx +1 -1
  135. package/templates/nextjs/ui-canvas/product/product-client-section.tsx +1 -1
  136. package/templates/nextjs/ui-canvas/product/product-grid.tsx +1 -1
  137. package/templates/nextjs/ui-canvas/product/product-listing.tsx +1 -1
  138. package/templates/nextjs/ui-canvas/product/recommendation-section.tsx +4 -0
  139. package/templates/nextjs/ui-canvas/product/review-form.tsx +29 -32
  140. package/templates/nextjs/ui-canvas/product/{reviews-section.tsx → reviews-section.tsx.ejs} +26 -8
  141. package/templates/nextjs/ui-canvas/product/stock-badge.tsx +2 -0
  142. package/templates/nextjs/ui-canvas/product/variant-selector.tsx +2 -0
  143. package/templates/nextjs/ui-canvas/shared/cdn-image.tsx +2 -0
  144. package/templates/nextjs/ui-canvas/shared/loading-spinner.tsx +2 -0
  145. package/templates/nextjs/base/src/ui/product/reviews-section.tsx +0 -85
  146. package/templates/nextjs/designs/passepartout/globals.css +0 -412
  147. package/templates/nextjs/designs/passepartout/messages-patch/en.json +0 -87
  148. package/templates/nextjs/designs/passepartout/messages-patch/he.json +0 -87
  149. package/templates/nextjs/designs/passepartout/ui/cart/cart-nudges.tsx +0 -39
  150. package/templates/nextjs/designs/passepartout/ui/cart/cart-view.tsx +0 -149
  151. package/templates/nextjs/designs/passepartout/ui/home/home-client.tsx +0 -401
  152. package/templates/nextjs/designs/passepartout/ui/layout/announcement-bar.tsx +0 -139
  153. package/templates/nextjs/designs/passepartout/ui/layout/cart-link.tsx +0 -45
  154. package/templates/nextjs/designs/passepartout/ui/layout/faq-section.tsx +0 -103
  155. package/templates/nextjs/designs/passepartout/ui/layout/site-footer.tsx +0 -159
  156. package/templates/nextjs/designs/passepartout/ui/layout/site-header.tsx.ejs +0 -155
  157. package/templates/nextjs/designs/passepartout/ui/layout/trust-icons.tsx +0 -60
  158. package/templates/nextjs/designs/passepartout/ui/layout/whatsapp-button.tsx +0 -34
  159. package/templates/nextjs/designs/passepartout/ui/product/price-display.tsx +0 -111
  160. package/templates/nextjs/designs/passepartout/ui/product/product-card.tsx +0 -265
  161. package/templates/nextjs/designs/passepartout/ui/product/product-client-section.tsx +0 -667
  162. package/templates/nextjs/designs/passepartout/ui/product/product-grid.tsx +0 -35
  163. package/templates/nextjs/designs/passepartout/ui/product/product-listing.tsx +0 -427
  164. package/templates/nextjs/designs/passepartout/ui/product/recommendation-section.tsx +0 -113
  165. package/templates/nextjs/designs/passepartout/ui/product/stock-badge.tsx +0 -52
  166. package/templates/nextjs/designs/passepartout/ui/product/variant-selector.tsx +0 -307
  167. package/templates/nextjs/designs/passepartout/ui/shared/loading-spinner.tsx +0 -33
  168. package/templates/nextjs/themes/luxury/globals.css +0 -399
  169. package/templates/nextjs/themes/luxury/theme.json +0 -23
  170. package/templates/nextjs/themes/minimal/globals.css +0 -30
  171. package/templates/nextjs/themes/minimal/theme.json +0 -23
  172. package/templates/nextjs/themes/playful/globals.css +0 -400
  173. package/templates/nextjs/themes/playful/theme.json +0 -23
@@ -0,0 +1,269 @@
1
+ /**
2
+ * Inline icon set — minimal 24px-grid stroke icons (lucide-style).
3
+ * The project ships no icon dependency; every icon in the storefront comes
4
+ * from here so sizing (16/20/24) and stroke weight stay consistent.
5
+ * All icons are decorative by default (aria-hidden) — pair with sr-only text.
6
+ */
7
+ import * as React from 'react';
8
+
9
+ export type IconProps = {
10
+ size?: 16 | 18 | 20 | 24 | 28 | 32;
11
+ className?: string;
12
+ /** stroke width — 1.75 default matches the light, jewelry-grade look */
13
+ strokeWidth?: number;
14
+ };
15
+
16
+ function Base({
17
+ size = 20,
18
+ className,
19
+ strokeWidth = 1.75,
20
+ children,
21
+ fill = 'none',
22
+ }: IconProps & { children: React.ReactNode; fill?: string }) {
23
+ return (
24
+ <svg
25
+ width={size}
26
+ height={size}
27
+ viewBox="0 0 24 24"
28
+ fill={fill}
29
+ stroke="currentColor"
30
+ strokeWidth={strokeWidth}
31
+ strokeLinecap="round"
32
+ strokeLinejoin="round"
33
+ aria-hidden="true"
34
+ className={className}
35
+ >
36
+ {children}
37
+ </svg>
38
+ );
39
+ }
40
+
41
+ export function IconBag(p: IconProps) {
42
+ return (
43
+ <Base {...p}>
44
+ <path d="M6 7h12l1.2 12.2a1.8 1.8 0 0 1-1.8 1.8H6.6a1.8 1.8 0 0 1-1.8-1.8L6 7Z" />
45
+ <path d="M9 10V6a3 3 0 0 1 6 0v4" />
46
+ </Base>
47
+ );
48
+ }
49
+
50
+ export function IconUser(p: IconProps) {
51
+ return (
52
+ <Base {...p}>
53
+ <circle cx="12" cy="8" r="3.5" />
54
+ <path d="M5 20c1.4-3 4-4.5 7-4.5s5.6 1.5 7 4.5" />
55
+ </Base>
56
+ );
57
+ }
58
+
59
+ export function IconMenu(p: IconProps) {
60
+ return (
61
+ <Base {...p}>
62
+ <path d="M4 7h16M4 12h16M4 17h16" />
63
+ </Base>
64
+ );
65
+ }
66
+
67
+ export function IconX(p: IconProps) {
68
+ return (
69
+ <Base {...p}>
70
+ <path d="M6 6l12 12M18 6L6 18" />
71
+ </Base>
72
+ );
73
+ }
74
+
75
+ export function IconPlus(p: IconProps) {
76
+ return (
77
+ <Base {...p}>
78
+ <path d="M12 5v14M5 12h14" />
79
+ </Base>
80
+ );
81
+ }
82
+
83
+ export function IconMinus(p: IconProps) {
84
+ return (
85
+ <Base {...p}>
86
+ <path d="M5 12h14" />
87
+ </Base>
88
+ );
89
+ }
90
+
91
+ export function IconTrash(p: IconProps) {
92
+ return (
93
+ <Base {...p}>
94
+ <path d="M4 7h16M10 11v6M14 11v6M6 7l1 13a1.5 1.5 0 0 0 1.5 1.3h7A1.5 1.5 0 0 0 17 20l1-13M9 7V5a1.5 1.5 0 0 1 1.5-1.5h3A1.5 1.5 0 0 1 15 5v2" />
95
+ </Base>
96
+ );
97
+ }
98
+
99
+ export function IconCheck(p: IconProps) {
100
+ return (
101
+ <Base {...p}>
102
+ <path d="M5 12.5 10 17.5 19 7" />
103
+ </Base>
104
+ );
105
+ }
106
+
107
+ export function IconStar({ filled = true, ...p }: IconProps & { filled?: boolean }) {
108
+ return (
109
+ <Base {...p} fill={filled ? 'currentColor' : 'none'} strokeWidth={filled ? 0 : 1.5}>
110
+ <path d="M12 3.2 14.7 8.7 20.8 9.6 16.4 13.9 17.4 20 12 17.1 6.6 20 7.6 13.9 3.2 9.6 9.3 8.7 12 3.2Z" />
111
+ </Base>
112
+ );
113
+ }
114
+
115
+ export function IconTruck(p: IconProps) {
116
+ return (
117
+ <Base {...p}>
118
+ <path d="M3 6.5h11v10H3zM14 10h3.5l3 3v3.5h-3" />
119
+ <circle cx="7" cy="17.5" r="1.8" />
120
+ <circle cx="17" cy="17.5" r="1.8" />
121
+ </Base>
122
+ );
123
+ }
124
+
125
+ export function IconShield(p: IconProps) {
126
+ return (
127
+ <Base {...p}>
128
+ <path d="M12 3.5 19 6v5.5c0 4.5-3 7.7-7 9-4-1.3-7-4.5-7-9V6l7-2.5Z" />
129
+ <path d="m9 11.8 2.2 2.2L15.5 9.5" />
130
+ </Base>
131
+ );
132
+ }
133
+
134
+ export function IconGem(p: IconProps) {
135
+ return (
136
+ <Base {...p}>
137
+ <path d="M7 4h10l3.5 5L12 20.5 1.5 9 5 4Z M1.5 9h21M9.5 4 12 9l2.5-5M12 20.5 9.5 9M12 20.5 14.5 9" strokeWidth={1.4} />
138
+ </Base>
139
+ );
140
+ }
141
+
142
+ export function IconReturn(p: IconProps) {
143
+ return (
144
+ <Base {...p}>
145
+ <path d="M4 9h11a5 5 0 0 1 0 10H8" />
146
+ <path d="M8 5 4 9l4 4" />
147
+ </Base>
148
+ );
149
+ }
150
+
151
+ export function IconChevronDown(p: IconProps) {
152
+ return (
153
+ <Base {...p}>
154
+ <path d="m6 9 6 6 6-6" />
155
+ </Base>
156
+ );
157
+ }
158
+
159
+ /** Points toward the inline-end (reading direction). Add className="rtl-flip". */
160
+ export function IconArrowEnd(p: IconProps) {
161
+ return (
162
+ <Base {...p}>
163
+ <path d="M4 12h16M14 6l6 6-6 6" />
164
+ </Base>
165
+ );
166
+ }
167
+
168
+ export function IconSparkle(p: IconProps) {
169
+ return (
170
+ <Base {...p}>
171
+ <path d="M12 4c.7 3.6 2.4 5.3 6 6-3.6.7-5.3 2.4-6 6-.7-3.6-2.4-5.3-6-6 3.6-.7 5.3-2.4 6-6Z" />
172
+ <path d="M19 15.5c.3 1.5 1 2.2 2.5 2.5-1.5.3-2.2 1-2.5 2.5-.3-1.5-1-2.2-2.5-2.5 1.5-.3 2.2-1 2.5-2.5Z" strokeWidth={1.4} />
173
+ </Base>
174
+ );
175
+ }
176
+
177
+ export function IconQuote(p: IconProps) {
178
+ return (
179
+ <Base {...p} fill="currentColor" strokeWidth={0}>
180
+ <path d="M5 6.5A4.5 4.5 0 0 0 3 11v6.5h6.5V11H6a3 3 0 0 1 2.5-3V6.5H5Zm10 0A4.5 4.5 0 0 0 13 11v6.5h6.5V11H16a3 3 0 0 1 2.5-3V6.5H15Z" />
181
+ </Base>
182
+ );
183
+ }
184
+
185
+ export function IconMail(p: IconProps) {
186
+ return (
187
+ <Base {...p}>
188
+ <rect x="3" y="5.5" width="18" height="13" rx="2" />
189
+ <path d="m4 7.5 8 6 8-6" />
190
+ </Base>
191
+ );
192
+ }
193
+
194
+ export function IconClock(p: IconProps) {
195
+ return (
196
+ <Base {...p}>
197
+ <circle cx="12" cy="12" r="8.5" />
198
+ <path d="M12 7.5V12l3 2" />
199
+ </Base>
200
+ );
201
+ }
202
+
203
+ export function IconTag(p: IconProps) {
204
+ return (
205
+ <Base {...p}>
206
+ <path d="m3.5 12.5 8-8H20v8.5l-8 8a1.7 1.7 0 0 1-2.4 0l-6.1-6.1a1.7 1.7 0 0 1 0-2.4Z" />
207
+ <circle cx="15.5" cy="8.5" r="1.4" />
208
+ </Base>
209
+ );
210
+ }
211
+
212
+ export function IconDownload(p: IconProps) {
213
+ return (
214
+ <Base {...p}>
215
+ <path d="M12 4v11M7 10.5 12 15.5l5-5M5 19.5h14" />
216
+ </Base>
217
+ );
218
+ }
219
+
220
+ /** Social glyphs for the footer (filled, single-color). */
221
+ export function IconSocial({ platform, ...p }: IconProps & { platform: string }) {
222
+ const key = platform.toLowerCase();
223
+ if (key.includes('instagram')) {
224
+ return (
225
+ <Base {...p} strokeWidth={1.6}>
226
+ <rect x="3.5" y="3.5" width="17" height="17" rx="4.5" />
227
+ <circle cx="12" cy="12" r="4" />
228
+ <circle cx="17.2" cy="6.8" r="0.6" fill="currentColor" stroke="none" />
229
+ </Base>
230
+ );
231
+ }
232
+ if (key.includes('facebook')) {
233
+ return (
234
+ <Base {...p} fill="currentColor" strokeWidth={0}>
235
+ <path d="M13.5 21v-7h2.4l.4-3h-2.8V9.1c0-.9.3-1.5 1.6-1.5h1.3V4.9c-.2 0-1-.1-1.9-.1-1.9 0-3.3 1.2-3.3 3.4V11H8.5v3h2.7v7h2.3Z" />
236
+ </Base>
237
+ );
238
+ }
239
+ if (key.includes('tiktok')) {
240
+ return (
241
+ <Base {...p} fill="currentColor" strokeWidth={0}>
242
+ <path d="M16.6 3c.3 2 1.5 3.3 3.4 3.6v2.8c-1.3 0-2.5-.4-3.4-1.1v5.9a5.6 5.6 0 1 1-5.6-5.6c.3 0 .6 0 .9.1v2.9a2.7 2.7 0 1 0 1.9 2.6V3h2.8Z" />
243
+ </Base>
244
+ );
245
+ }
246
+ if (key.includes('whatsapp')) {
247
+ return (
248
+ <Base {...p} strokeWidth={1.6}>
249
+ <path d="M12 3.5a8.5 8.5 0 0 0-7.3 12.8L3.5 20.5l4.3-1.1A8.5 8.5 0 1 0 12 3.5Z" />
250
+ <path d="M9 8.8c-.3 2.5 3.7 6.5 6.2 6.2l.6-1.5-2-1-.8.6c-.8-.4-1.7-1.3-2.1-2.1l.6-.8-1-2-1.5.6Z" strokeWidth={1.3} />
251
+ </Base>
252
+ );
253
+ }
254
+ if (key.includes('youtube')) {
255
+ return (
256
+ <Base {...p} strokeWidth={1.6}>
257
+ <rect x="2.5" y="6" width="19" height="12" rx="3" />
258
+ <path d="m10 9.5 5 2.5-5 2.5v-5Z" fill="currentColor" stroke="none" />
259
+ </Base>
260
+ );
261
+ }
262
+ // Fallback: globe
263
+ return (
264
+ <Base {...p} strokeWidth={1.6}>
265
+ <circle cx="12" cy="12" r="8.5" />
266
+ <path d="M3.5 12h17M12 3.5c-4.7 4.7-4.7 12.3 0 17 4.7-4.7 4.7-12.3 0-17Z" />
267
+ </Base>
268
+ );
269
+ }
@@ -0,0 +1,64 @@
1
+ 'use client';
2
+
3
+ import { useTranslations } from '@/core/lib/translations';
4
+ import { cn } from '@/core/lib/utils';
5
+ import { IconGem } from '@/ui/shared/icons';
6
+
7
+ interface LoadingSpinnerProps {
8
+ size?: 'sm' | 'md' | 'lg';
9
+ className?: string;
10
+ }
11
+
12
+ const RING_SIZE: Record<'sm' | 'md', string> = {
13
+ sm: 'h-4 w-4 border-2',
14
+ md: 'h-7 w-7 border-2',
15
+ };
16
+
17
+ /**
18
+ * Loading indicator. `sm`/`md` stay quiet ring spinners for buttons and
19
+ * inline waits; `lg` (the full-page state) is the Atelier "polishing" mark —
20
+ * a gem resting inside a ring band with a light orbiting around it, plus the
21
+ * visible loading line. Static under prefers-reduced-motion.
22
+ * Keeps `role="status"` and the sm/md/lg `size` contract.
23
+ */
24
+ export function LoadingSpinner({ size = 'md', className }: LoadingSpinnerProps) {
25
+ const t = useTranslations('common');
26
+
27
+ if (size === 'lg') {
28
+ return (
29
+ <span
30
+ role="status"
31
+ data-size={size}
32
+ className={cn(
33
+ 'flex min-h-[40vh] w-full flex-col items-center justify-center gap-4',
34
+ className
35
+ )}
36
+ >
37
+ <span aria-hidden="true" className="loader-orbit">
38
+ <span className="loader-orbit-dot" />
39
+ <IconGem size={20} className="text-primary/80" />
40
+ </span>
41
+ <span className="loader-text font-display text-sm italic text-muted-foreground">
42
+ {t('loading')}
43
+ </span>
44
+ </span>
45
+ );
46
+ }
47
+
48
+ return (
49
+ <span
50
+ role="status"
51
+ data-size={size}
52
+ className={cn('inline-flex items-center justify-center', className)}
53
+ >
54
+ <span
55
+ aria-hidden="true"
56
+ className={cn(
57
+ 'spin inline-block rounded-full border-primary/25 border-t-primary',
58
+ RING_SIZE[size]
59
+ )}
60
+ />
61
+ <span className="sr-only">{t('loading')}</span>
62
+ </span>
63
+ );
64
+ }
@@ -0,0 +1,71 @@
1
+ 'use client';
2
+
3
+ /**
4
+ * Scroll-reveal wrapper — adds `.is-visible` when the block enters the
5
+ * viewport. The animation itself lives in globals.css strictly inside a
6
+ * `prefers-reduced-motion: no-preference` guard, so with reduced motion the
7
+ * content is simply visible (the base .reveal-scroll styles are also inside
8
+ * the guard — no hidden content ever).
9
+ */
10
+ import * as React from 'react';
11
+ import { cn } from '@/core/lib/utils';
12
+
13
+ export function Reveal({
14
+ children,
15
+ className,
16
+ /** transition-delay in ms for stagger */
17
+ delay = 0,
18
+ as: Tag = 'div',
19
+ }: {
20
+ children: React.ReactNode;
21
+ className?: string;
22
+ delay?: number;
23
+ as?: 'div' | 'section' | 'li' | 'span';
24
+ }) {
25
+ const ref = React.useRef<HTMLElement | null>(null);
26
+ const [visible, setVisible] = React.useState(false);
27
+
28
+ React.useEffect(() => {
29
+ const el = ref.current;
30
+ if (!el) return;
31
+ if (
32
+ typeof window === 'undefined' ||
33
+ !('IntersectionObserver' in window) ||
34
+ window.matchMedia('(prefers-reduced-motion: reduce)').matches
35
+ ) {
36
+ setVisible(true);
37
+ return;
38
+ }
39
+ const io = new IntersectionObserver(
40
+ (entries) => {
41
+ for (const entry of entries) {
42
+ if (entry.isIntersecting) {
43
+ setVisible(true);
44
+ io.disconnect();
45
+ break;
46
+ }
47
+ }
48
+ },
49
+ { rootMargin: '0px 0px -10% 0px', threshold: 0.08 }
50
+ );
51
+ io.observe(el);
52
+ // Safety net: never leave content hidden if the observer misfires
53
+ // (embedded webviews, print, prerender snapshots).
54
+ const failSafe = window.setTimeout(() => setVisible(true), 2000);
55
+ return () => {
56
+ io.disconnect();
57
+ window.clearTimeout(failSafe);
58
+ };
59
+ }, []);
60
+
61
+ const Comp = Tag as React.ElementType;
62
+ return (
63
+ <Comp
64
+ ref={ref}
65
+ className={cn('reveal-scroll', visible && 'is-visible', className)}
66
+ style={delay ? { transitionDelay: `${delay}ms` } : undefined}
67
+ >
68
+ {children}
69
+ </Comp>
70
+ );
71
+ }
@@ -0,0 +1,125 @@
1
+ 'use client';
2
+
3
+ /**
4
+ * Styled replacement for toolbar `<select>`s — same popover language as the
5
+ * header's language switcher (pill trigger, rotating chevron, rounded menu,
6
+ * check on the selected row) so every dropdown in the store speaks one
7
+ * dialect. Closes on outside click / Escape; arrows move focus in the list.
8
+ */
9
+ import { useEffect, useRef, useState } from 'react';
10
+ import { cn } from '@/core/lib/utils';
11
+ import { IconCheck, IconChevronDown } from '@/ui/shared/icons';
12
+
13
+ export interface SelectMenuOption {
14
+ value: string;
15
+ label: string;
16
+ }
17
+
18
+ interface SelectMenuProps {
19
+ value: string;
20
+ options: SelectMenuOption[];
21
+ onChange: (value: string) => void;
22
+ ariaLabel: string;
23
+ className?: string;
24
+ }
25
+
26
+ export function SelectMenu({ value, options, onChange, ariaLabel, className }: SelectMenuProps) {
27
+ const [open, setOpen] = useState(false);
28
+ const rootRef = useRef<HTMLDivElement>(null);
29
+ const listRef = useRef<HTMLUListElement>(null);
30
+ const triggerRef = useRef<HTMLButtonElement>(null);
31
+
32
+ useEffect(() => {
33
+ if (!open) return;
34
+ function onDown(e: MouseEvent) {
35
+ if (rootRef.current && !rootRef.current.contains(e.target as Node)) setOpen(false);
36
+ }
37
+ function onKey(e: KeyboardEvent) {
38
+ if (e.key === 'Escape') {
39
+ setOpen(false);
40
+ triggerRef.current?.focus();
41
+ }
42
+ }
43
+ document.addEventListener('mousedown', onDown);
44
+ document.addEventListener('keydown', onKey);
45
+ return () => {
46
+ document.removeEventListener('mousedown', onDown);
47
+ document.removeEventListener('keydown', onKey);
48
+ };
49
+ }, [open]);
50
+
51
+ // Focus the selected row when the menu opens so keyboard users land in place.
52
+ useEffect(() => {
53
+ if (!open) return;
54
+ const el =
55
+ listRef.current?.querySelector<HTMLButtonElement>('[aria-selected="true"]') ??
56
+ listRef.current?.querySelector('button');
57
+ el?.focus();
58
+ }, [open]);
59
+
60
+ const selected = options.find((o) => o.value === value);
61
+
62
+ function onListKeyDown(e: React.KeyboardEvent) {
63
+ if (e.key !== 'ArrowDown' && e.key !== 'ArrowUp') return;
64
+ e.preventDefault();
65
+ const items = Array.from(listRef.current?.querySelectorAll('button') ?? []);
66
+ const idx = items.indexOf(document.activeElement as HTMLButtonElement);
67
+ const next = e.key === 'ArrowDown' ? Math.min(items.length - 1, idx + 1) : Math.max(0, idx - 1);
68
+ items[next]?.focus();
69
+ }
70
+
71
+ return (
72
+ <div ref={rootRef} className={cn('relative', className)}>
73
+ <button
74
+ ref={triggerRef}
75
+ type="button"
76
+ aria-label={ariaLabel}
77
+ aria-expanded={open}
78
+ aria-haspopup="listbox"
79
+ onClick={() => setOpen((v) => !v)}
80
+ className="inline-flex h-10 items-center gap-2 rounded-full border bg-background px-4 text-sm font-medium text-foreground transition-colors hover:bg-secondary/60"
81
+ >
82
+ {selected?.label ?? ariaLabel}
83
+ <IconChevronDown
84
+ size={16}
85
+ className={cn('shrink-0 text-foreground/60 transition-transform', open && 'rotate-180')}
86
+ />
87
+ </button>
88
+
89
+ {open && (
90
+ <ul
91
+ ref={listRef}
92
+ role="listbox"
93
+ aria-label={ariaLabel}
94
+ onKeyDown={onListKeyDown}
95
+ className="absolute start-0 top-full z-50 mt-2 max-h-72 min-w-full overflow-y-auto rounded-xl border border-border/60 bg-background py-1 shadow-lg"
96
+ >
97
+ {options.map((opt) => {
98
+ const isSelected = opt.value === value;
99
+ return (
100
+ <li key={opt.value}>
101
+ <button
102
+ type="button"
103
+ role="option"
104
+ aria-selected={isSelected}
105
+ onClick={() => {
106
+ setOpen(false);
107
+ triggerRef.current?.focus();
108
+ if (!isSelected) onChange(opt.value);
109
+ }}
110
+ className={cn(
111
+ 'flex w-full items-center justify-between gap-3 whitespace-nowrap px-4 py-2 text-sm transition-colors hover:bg-secondary/70',
112
+ isSelected ? 'font-semibold text-primary' : 'text-foreground/80'
113
+ )}
114
+ >
115
+ {opt.label}
116
+ {isSelected && <IconCheck size={16} />}
117
+ </button>
118
+ </li>
119
+ );
120
+ })}
121
+ </ul>
122
+ )}
123
+ </div>
124
+ );
125
+ }
@@ -19,6 +19,8 @@ interface CartBundleOfferCardProps {
19
19
  * DESIGN ME — bundle offer card on the cart page: offered products with
20
20
  * original vs. discounted prices + add-bundle button; offers come from
21
21
  * useCartPage().bundles.
22
+ *
23
+ * Building blocks: shadcn/ui primitives in src/components/ui (Button, Card, Badge, Input, Select, Accordion, Dialog, Skeleton, ...) + lucide-react icons are installed and ready to compose with.
22
24
  */
23
25
  export function CartBundleOfferCard({ offer, cartId, onAdd, className }: CartBundleOfferCardProps) {
24
26
  const t = useTranslations('cart');
@@ -19,6 +19,8 @@ interface CartItemProps {
19
19
  /**
20
20
  * DESIGN ME — single cart line: image, name, variant, unit price, quantity
21
21
  * controls, remove, line total; the `item` prop comes from useCartPage().cart.
22
+ *
23
+ * Building blocks: shadcn/ui primitives in src/components/ui (Button, Card, Badge, Input, Select, Accordion, Dialog, Skeleton, ...) + lucide-react icons are installed and ready to compose with.
22
24
  */
23
25
  export function CartItem({ item, onUpdate, className }: CartItemProps) {
24
26
  const t = useTranslations('common');
@@ -11,6 +11,8 @@ interface CartNudgesProps {
11
11
  /**
12
12
  * DESIGN ME — discount-rule nudges on the cart page ("add X more for Y");
13
13
  * texts come from useCartPage().cart.nudges.
14
+ *
15
+ * Building blocks: shadcn/ui primitives in src/components/ui (Button, Card, Badge, Input, Select, Accordion, Dialog, Skeleton, ...) + lucide-react icons are installed and ready to compose with.
14
16
  */
15
17
  export function CartNudges({ nudges, className }: CartNudgesProps) {
16
18
  if (nudges.length === 0) return null;
@@ -14,6 +14,8 @@ interface CartSummaryProps {
14
14
  * DESIGN ME — order summary (subtotal, rule/coupon discounts, shipping, tax
15
15
  * note, total); all figures come from useCart().totals and useCart().cart.
16
16
  * Keep every discount branch — merchants rely on the per-rule breakdown.
17
+ *
18
+ * Building blocks: shadcn/ui primitives in src/components/ui (Button, Card, Badge, Input, Select, Accordion, Dialog, Skeleton, ...) + lucide-react icons are installed and ready to compose with.
17
19
  */
18
20
  export function CartSummary({ className }: CartSummaryProps) {
19
21
  const t = useTranslations('cart');
@@ -20,6 +20,8 @@ interface CartUpgradeBannerProps {
20
20
  * DESIGN ME — per-line upgrade suggestion under a cart item ("upgrade to X
21
21
  * for +Y"); the suggestion comes from useCartPage().upgrades keyed by
22
22
  * productId. Keep the session-scoped dismiss and the swap logic.
23
+ *
24
+ * Building blocks: shadcn/ui primitives in src/components/ui (Button, Card, Badge, Input, Select, Accordion, Dialog, Skeleton, ...) + lucide-react icons are installed and ready to compose with.
23
25
  */
24
26
  export function CartUpgradeBanner({
25
27
  suggestion,
@@ -27,7 +27,7 @@ export function CartView() {
27
27
  if (!cart || cart.items.length === 0) {
28
28
  return (
29
29
  <section>
30
- {/* DESIGN ME — empty-cart state: message + continue-shopping CTA; state comes from useCartPage() */}
30
+ {/* DESIGN ME — empty-cart state: message + continue-shopping CTA; state comes from useCartPage(). Compose with the shadcn/ui primitives in src/components/ui (Button, Card, Badge, Input, Select, Accordion, Dialog, Skeleton, ...) + lucide-react icons. */}
31
31
  <h1>{t('emptyTitle')}</h1>
32
32
  <p>{t('emptySubtitle')}</p>
33
33
  <Link href="/products">{tc('continueShopping')}</Link>
@@ -37,7 +37,7 @@ export function CartView() {
37
37
 
38
38
  return (
39
39
  <section>
40
- {/* DESIGN ME — cart page: items list, upgrade/bundle offers, coupon, summary sidebar, checkout CTA, cross-sells; everything comes from useCartPage() */}
40
+ {/* DESIGN ME — cart page: items list, upgrade/bundle offers, coupon, summary sidebar, checkout CTA, cross-sells; everything comes from useCartPage(). Compose with the shadcn/ui primitives in src/components/ui (Button, Card, Badge, Input, Select, Accordion, Dialog, Skeleton, ...) + lucide-react icons. */}
41
41
  <h1>
42
42
  {t('title')} ({itemCount} {itemCount === 1 ? tc('item') : tc('items')})
43
43
  </h1>
@@ -20,6 +20,8 @@ interface CouponInputProps {
20
20
  * DESIGN ME — coupon apply/remove control used on the cart page AND the
21
21
  * checkout page (via `checkoutId`); the `cart` prop comes from useCartPage().
22
22
  * Keep the applied-coupon state and the error message.
23
+ *
24
+ * Building blocks: shadcn/ui primitives in src/components/ui (Button, Card, Badge, Input, Select, Accordion, Dialog, Skeleton, ...) + lucide-react icons are installed and ready to compose with.
23
25
  */
24
26
  export function CouponInput({ cart, checkoutId, onUpdate, className }: CouponInputProps) {
25
27
  const t = useTranslations('coupon');
@@ -15,6 +15,8 @@ interface FreeShippingBarProps {
15
15
  * shipping"); threshold from useStoreInfo().upsell, subtotal from
16
16
  * useCart().totals. The semantic <progress> is a placeholder — build your own
17
17
  * meter.
18
+ *
19
+ * Building blocks: shadcn/ui primitives in src/components/ui (Button, Card, Badge, Input, Select, Accordion, Dialog, Skeleton, ...) + lucide-react icons are installed and ready to compose with.
18
20
  */
19
21
  export function FreeShippingBar({ className }: FreeShippingBarProps) {
20
22
  // Hooks must be called unconditionally and in the same order on every
@@ -14,6 +14,8 @@ interface ReservationCountdownProps {
14
14
  * DESIGN ME — stock-reservation countdown on the cart/checkout pages; the
15
15
  * `reservation` prop comes from useCartPage().cart.reservation. Keep the
16
16
  * ticking logic and the expired/urgent states (exposed via data-state).
17
+ *
18
+ * Building blocks: shadcn/ui primitives in src/components/ui (Button, Card, Badge, Input, Select, Accordion, Dialog, Skeleton, ...) + lucide-react icons are installed and ready to compose with.
17
19
  */
18
20
  export function ReservationCountdown({ reservation, className }: ReservationCountdownProps) {
19
21
  const t = useTranslations('reservation');
@@ -8,7 +8,7 @@ export function DiscountBannerStrip({ banners }: { banners: DiscountBanner[] })
8
8
 
9
9
  return (
10
10
  <div role="region" aria-label="Promotions">
11
- {/* DESIGN ME — discount banner strip: active discount-rule texts; banners come from useHomeData() in the parent */}
11
+ {/* DESIGN ME — discount banner strip: active discount-rule texts; banners come from useHomeData() in the parent. Compose with the shadcn/ui primitives in src/components/ui (Button, Card, Badge, Input, Select, Accordion, Dialog, Skeleton, ...) + lucide-react icons. */}
12
12
  <ul className="flex items-center gap-4">
13
13
  {banners.map((banner) => (
14
14
  <li key={banner.ruleId}>{banner.text}</li>
@@ -12,7 +12,7 @@ export function FeaturedProductsSection({ products }: { products: Product[] }) {
12
12
 
13
13
  return (
14
14
  <section>
15
- {/* DESIGN ME — homepage featured products: heading + view-all link + product grid; products come from useHomeData() in the parent */}
15
+ {/* DESIGN ME — homepage featured products: heading + view-all link + product grid; products come from useHomeData() in the parent. Compose with the shadcn/ui primitives in src/components/ui (Button, Card, Badge, Input, Select, Accordion, Dialog, Skeleton, ...) + lucide-react icons. */}
16
16
  <div className="flex items-center justify-between">
17
17
  <h2>{t('featuredProducts')}</h2>
18
18
  <Link href="/products">{tc('viewAll')}</Link>
@@ -10,7 +10,7 @@ export function HeroSection({ storeName }: { storeName?: string | null }) {
10
10
 
11
11
  return (
12
12
  <section>
13
- {/* DESIGN ME — homepage hero: headline + subtitle + shop-now CTA; store name via useStoreInfo() in the parent, copy via the `home`/`common` translation namespaces */}
13
+ {/* DESIGN ME — homepage hero: headline + subtitle + shop-now CTA; store name via useStoreInfo() in the parent, copy via the `home`/`common` translation namespaces. Compose with the shadcn/ui primitives in src/components/ui (Button, Card, Badge, Input, Select, Accordion, Dialog, Skeleton, ...) + lucide-react icons. */}
14
14
  <h1>
15
15
  {t('welcomeTo')} {storeName || tc('store')}
16
16
  </h1>
@@ -17,7 +17,7 @@ export function HomeClient() {
17
17
 
18
18
  return (
19
19
  <div>
20
- {/* DESIGN ME — homepage composition: discount banners + hero + featured products; data via useHomeData() and useStoreInfo(). Add/remove/reorder sections freely. */}
20
+ {/* DESIGN ME — homepage composition: discount banners + hero + featured products; data via useHomeData() and useStoreInfo(). Add/remove/reorder sections freely. Compose with the shadcn/ui primitives in src/components/ui (Button, Card, Badge, Input, Select, Accordion, Dialog, Skeleton, ...) + lucide-react icons. */}
21
21
  <DiscountBannerStrip banners={banners} />
22
22
  <HeroSection storeName={storeInfo?.name} />
23
23
  <FeaturedProductsSection products={products} />