@ecomiq/storefront 2.1.4 → 3.0.0

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 (310) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +150 -103
  3. package/dist/account-Dx4e3syi.js +258 -0
  4. package/dist/account-forms-AVk71ko7.js +39 -0
  5. package/dist/account-forms.d.ts +13 -0
  6. package/dist/account.d.ts +240 -0
  7. package/dist/address-defaults-BqjRhS82.js +14 -0
  8. package/dist/address-defaults.d.ts +11 -0
  9. package/dist/analytics/analytics-CG1Qagwl.js +148 -0
  10. package/dist/analytics/analytics.d.ts +1 -0
  11. package/dist/analytics/config-DJr-GRhs.js +62 -0
  12. package/dist/analytics/config.d.ts +22 -0
  13. package/dist/analytics/consent-B13rBpBs.js +57 -0
  14. package/dist/analytics/consent-banner-9QvRRy8v.js +239 -0
  15. package/dist/analytics/consent-banner.d.ts +20 -0
  16. package/dist/analytics/cookies-pLozllyB.js +100 -0
  17. package/dist/analytics/cookies.d.ts +6 -0
  18. package/dist/analytics/destinations-iECrlLIr.js +144 -0
  19. package/dist/analytics/events-Dt81tIp1.js +102 -0
  20. package/dist/analytics/events.d.ts +51 -0
  21. package/dist/analytics/tracker-p4yaoOyk.js +51 -0
  22. package/dist/api-cache-DsuIn5hX.js +159 -0
  23. package/dist/bank-accounts-DlEczQQ5.js +81 -0
  24. package/dist/bank-accounts.d.ts +4 -0
  25. package/dist/captcha-DAqaIx8m.js +117 -0
  26. package/dist/captcha.d.ts +34 -0
  27. package/dist/cart-D7DxZ2lD.js +30 -0
  28. package/dist/cart-actions-Bsub_FFG.js +116 -0
  29. package/dist/cart-actions.d.ts +15 -0
  30. package/dist/cart-drawer-B7PPsR69.js +22 -0
  31. package/dist/cart-drawer.d.ts +9 -0
  32. package/dist/cart-form-y9P1r_EX.js +81 -0
  33. package/dist/cart-form.d.ts +24 -0
  34. package/dist/cart-summary-ur2VWKr-.js +89 -0
  35. package/dist/cart-summary.d.ts +31 -0
  36. package/dist/cart.d.ts +4 -0
  37. package/dist/catalog-7gJ-l5hW.js +67 -0
  38. package/dist/catalog-hooks-B7ZP4wYY.js +312 -0
  39. package/dist/catalog-hooks.d.ts +111 -0
  40. package/dist/catalog.d.ts +5 -0
  41. package/dist/checkout-DVWSXANi.js +474 -0
  42. package/dist/checkout-form-CbOIdENC.js +131 -0
  43. package/dist/checkout-form.d.ts +20 -0
  44. package/dist/checkout.d.ts +86 -0
  45. package/dist/complaint-book-BvwLvfx0.js +117 -0
  46. package/dist/complaint-book.d.ts +62 -0
  47. package/dist/culqi-authentication-BGr20vAJ.js +204 -0
  48. package/dist/culqi-authentication.d.ts +15 -0
  49. package/dist/culqi-checkout-CTXpKgp_.js +55 -0
  50. package/dist/culqi-three-ds-HP3mfrvV.js +33 -0
  51. package/dist/culqi-three-ds.d.ts +29 -0
  52. package/dist/customer-avatar-CJXSDroK.js +12 -0
  53. package/dist/customer-avatar.d.ts +5 -0
  54. package/dist/customer-cookies-DHOgFAMV.js +45 -0
  55. package/dist/customer-csrf-C1oDX-Py.js +17 -0
  56. package/dist/customer-csrf.d.ts +3 -0
  57. package/dist/customer-document-fields-C1K-_DAD.js +70 -0
  58. package/dist/customer-document-fields.d.ts +9 -0
  59. package/dist/customer-login-form-C7AC6vXd.js +144 -0
  60. package/dist/customer-login-form.d.ts +17 -0
  61. package/dist/customer-registration-form-BEm_NEfP.js +93 -0
  62. package/dist/customer-registration-form.d.ts +8 -0
  63. package/dist/document-url-CGsAl5Tf.js +9 -0
  64. package/dist/documents-T1mzc_j8.js +38 -0
  65. package/dist/documents.d.ts +16 -0
  66. package/dist/entries/account.d.ts +11 -0
  67. package/dist/entries/account.js +10 -0
  68. package/dist/entries/analytics.d.ts +6 -0
  69. package/dist/entries/analytics.js +5 -0
  70. package/dist/entries/cart.d.ts +8 -0
  71. package/dist/entries/cart.js +7 -0
  72. package/dist/entries/checkout.d.ts +12 -0
  73. package/dist/entries/checkout.js +11 -0
  74. package/dist/entries/order.d.ts +11 -0
  75. package/dist/entries/order.js +11 -0
  76. package/dist/favicon-YpyhVJ9H.js +28 -0
  77. package/dist/favicon.d.ts +4 -0
  78. package/dist/form-BtQcbXlJ.js +18 -0
  79. package/dist/form-contracts-BNpHaTGJ.js +166 -0
  80. package/dist/form-contracts.d.ts +42 -0
  81. package/dist/form.d.ts +3 -0
  82. package/dist/hidden-CCWtOWKR.js +3 -0
  83. package/dist/hidden.d.ts +4 -0
  84. package/dist/index.d.ts +50 -0
  85. package/dist/index.js +50 -0
  86. package/dist/invoice-fields-BG0HjL6T.js +103 -0
  87. package/dist/invoice-fields.d.ts +39 -0
  88. package/dist/links-kFxBZfdb.js +96 -0
  89. package/dist/links.d.ts +21 -0
  90. package/dist/mercadopago-checkout-DC7RXa8k.js +27 -0
  91. package/dist/mercadopago-dialog-UTQev0MG.js +180 -0
  92. package/dist/mercadopago-dialog.d.ts +21 -0
  93. package/dist/money-DtGOtDri.js +32 -0
  94. package/dist/money.d.ts +1 -0
  95. package/dist/optimistic-cart-BveVOHuh.js +53 -0
  96. package/dist/optimistic-cart.d.ts +16 -0
  97. package/dist/order-display-DTt5WBbc.js +112 -0
  98. package/dist/order-display.d.ts +20 -0
  99. package/dist/order-draft-DxV1Uhm3.js +38 -0
  100. package/dist/order-draft.d.ts +16 -0
  101. package/dist/order-pages-Dm6l5m0m.js +38 -0
  102. package/dist/order-pages.d.ts +12 -0
  103. package/dist/order-payment-continuation-D_d5PGA4.js +212 -0
  104. package/dist/order-payment-continuation.d.ts +10 -0
  105. package/dist/order-payment-in-review-x4gdLFHZ.js +65 -0
  106. package/dist/order-payment-in-review.d.ts +5 -0
  107. package/dist/order-status-BJXLJwxq.js +162 -0
  108. package/dist/order-status.d.ts +89 -0
  109. package/dist/order-view-9IlBg5AF.js +62 -0
  110. package/dist/order-view.d.ts +12 -0
  111. package/dist/page-action-Ctkf4xC6.js +7 -0
  112. package/dist/page-seo-a5FJl8x5.js +262 -0
  113. package/dist/page-seo.d.ts +34 -0
  114. package/dist/pages-Ca_Gt6mq.js +150 -0
  115. package/dist/pages.d.ts +45 -0
  116. package/dist/payment-dialog-frame-B-Q_xQ94.js +57 -0
  117. package/dist/payment-logo-BoPaGJc_.js +46 -0
  118. package/dist/payment-logo-svgs-By9lDTLK.js +20 -0
  119. package/dist/payment-logo.d.ts +11 -0
  120. package/dist/payment-logos-BYvdwYyJ.js +23 -0
  121. package/dist/payment-methods-B8ocTgFZ.js +73 -0
  122. package/dist/payment-methods.d.ts +58 -0
  123. package/dist/payment-return-5cjypwIw.js +7 -0
  124. package/dist/place-CmW4hBWY.js +13 -0
  125. package/dist/place.d.ts +4 -0
  126. package/dist/preview-BiIBif3C.js +427 -0
  127. package/dist/preview-address-Cf0sJ-9p.js +21 -0
  128. package/dist/preview-cart-Dg2CVktS.js +376 -0
  129. package/dist/product-preview-BspMAecJ.js +51 -0
  130. package/dist/product-preview.d.ts +5 -0
  131. package/dist/product-variants-BNDHvs1y.js +46 -0
  132. package/dist/product-variants.d.ts +12 -0
  133. package/dist/public-pages-XtwlaLwt.js +194 -0
  134. package/dist/public-pages.d.ts +67 -0
  135. package/dist/registration-CpDcv8ql.js +91 -0
  136. package/dist/registration.d.ts +12 -0
  137. package/dist/request-security-CRsRMgwj.js +76 -0
  138. package/dist/rich-text-M-Ju8RL4.js +9 -0
  139. package/dist/rich-text.d.ts +5 -0
  140. package/dist/route-text-DcJw2SsK.js +9 -0
  141. package/dist/route-text.d.ts +4 -0
  142. package/dist/section-preview-CmsMl3yu.js +83 -0
  143. package/dist/section-preview.d.ts +12 -0
  144. package/dist/sections/account-addresses.d.ts +18 -0
  145. package/dist/sections/account-addresses.js +375 -0
  146. package/dist/sections/account-order.d.ts +12 -0
  147. package/dist/sections/account-order.js +592 -0
  148. package/dist/sections/account-orders.d.ts +8 -0
  149. package/dist/sections/account-orders.js +359 -0
  150. package/dist/sections/account-profile.d.ts +16 -0
  151. package/dist/sections/account-profile.js +123 -0
  152. package/dist/sections/checkout.d.ts +24 -0
  153. package/dist/sections/checkout.js +963 -0
  154. package/dist/sections/complaint-book.d.ts +8 -0
  155. package/dist/sections/complaint-book.js +538 -0
  156. package/dist/sections/design-system.d.ts +1 -0
  157. package/dist/sections/design-system.js +310 -0
  158. package/dist/sections/draft-invoice.d.ts +20 -0
  159. package/dist/sections/draft-invoice.js +158 -0
  160. package/dist/sections/order-tracking.d.ts +19 -0
  161. package/dist/sections/order-tracking.js +141 -0
  162. package/dist/sections-CNUMWTF_.js +77 -0
  163. package/dist/sections.d.ts +19 -0
  164. package/dist/seo-GpDRhAAA.js +78 -0
  165. package/dist/session-CKvmFJyg.js +379 -0
  166. package/dist/session.d.ts +24 -0
  167. package/dist/settings-B0NO2A6Y.js +78 -0
  168. package/dist/settings.d.ts +51 -0
  169. package/dist/source-marker-DhqSkW7n.js +4 -0
  170. package/dist/sources-B-3JFJfb.js +46 -0
  171. package/dist/sources.d.ts +7 -0
  172. package/dist/store-8Q-_LFrQ.js +152 -0
  173. package/dist/store-contact--hY6CoFb.js +19 -0
  174. package/dist/store-contact.d.ts +6 -0
  175. package/dist/store.d.ts +17 -0
  176. package/dist/storefront-language-DrMjVbmk.js +29 -0
  177. package/dist/storefront-language.d.ts +14 -0
  178. package/dist/storefront-text-D25ae1qf.js +11 -0
  179. package/dist/storefront-text-en-ljjjSS4q.js +1030 -0
  180. package/dist/storefront-text-pt-BtHaJLcp.js +1030 -0
  181. package/dist/storefront-text.d.ts +4 -0
  182. package/dist/stripe-dialog-Ev9s3Z62.js +396 -0
  183. package/dist/stripe-dialog.d.ts +30 -0
  184. package/dist/telemetry-HuZXWBPi.js +114 -0
  185. package/dist/telemetry.d.ts +10 -0
  186. package/dist/templates-CAqoNyTW.js +40 -0
  187. package/dist/templates.d.ts +15 -0
  188. package/dist/urls-CpGQPxvf.js +71 -0
  189. package/dist/urls.d.ts +18 -0
  190. package/dist/use-checkout-CZcxXJXi.js +42 -0
  191. package/dist/use-checkout-payment-9R-zacrJ.js +80 -0
  192. package/dist/use-checkout-payment.d.ts +18 -0
  193. package/dist/use-checkout.d.ts +36 -0
  194. package/dist/use-culqi-checkout-CrjLAipU.js +109 -0
  195. package/dist/use-order-payment-BKIz_IO0.js +45 -0
  196. package/dist/use-order-payment.d.ts +18 -0
  197. package/dist/use-payment-token-CErx-tN-.js +105 -0
  198. package/dist/vite-payment-logos-kziu7wKb.js +27 -0
  199. package/dist/vite-payment-logos.d.ts +24 -0
  200. package/dist/vite-public-assets-DW2fgtVb.js +209 -0
  201. package/dist/vite-public-assets.d.ts +29 -0
  202. package/dist/vite-sections-DTBr0-Kg.js +464 -0
  203. package/dist/vite-sections.d.ts +21 -0
  204. package/dist/vite-theme-ui-BMO-CDi3.js +41 -0
  205. package/dist/vite-theme-ui.d.ts +10 -0
  206. package/dist/vite.d.ts +36 -0
  207. package/dist/vite.js +127 -0
  208. package/dist/voucher-payment-CVFDZ1L8.js +66 -0
  209. package/dist/worker-CNi-gzCu.js +86 -0
  210. package/dist/worker.d.ts +27 -0
  211. package/package.json +100 -76
  212. package/src/sections/account-addresses.tsx +215 -0
  213. package/src/sections/account-order.tsx +424 -0
  214. package/src/sections/account-orders.tsx +259 -0
  215. package/src/sections/account-profile.tsx +70 -0
  216. package/src/sections/checkout.tsx +586 -0
  217. package/src/sections/complaint-book.tsx +325 -0
  218. package/src/sections/design-system.tsx +146 -0
  219. package/src/sections/draft-invoice.tsx +105 -0
  220. package/src/sections/order-tracking.tsx +81 -0
  221. package/src/vite-client.d.ts +4 -0
  222. package/bin/ecomiq.mjs +0 -179
  223. package/public/design-bridge.js +0 -318
  224. package/src/api-proxy.ts +0 -194
  225. package/src/auth/create-storefront-auth.ts +0 -94
  226. package/src/auth/ecomiq-oauth-password-client.ts +0 -26
  227. package/src/auth/ecomiq-oauth-password-constants.ts +0 -24
  228. package/src/auth/ecomiq-oauth-password-plugin.ts +0 -294
  229. package/src/auth/ecomiq-oauth-password-types.ts +0 -24
  230. package/src/auth/ecomiq-storefront-sign-in.ts +0 -44
  231. package/src/auth/env.ts +0 -7
  232. package/src/auth/secure-cookies.ts +0 -23
  233. package/src/auth/storefront-auth-base-url.ts +0 -117
  234. package/src/auth/storefront-auth.ts +0 -7
  235. package/src/cart-session.ts +0 -239
  236. package/src/client.ts +0 -48
  237. package/src/codegen.mjs +0 -801
  238. package/src/components/account/customer-addresses-panel.tsx +0 -678
  239. package/src/components/account/customer-order-detail-panel.tsx +0 -285
  240. package/src/components/account/customer-orders-panel.tsx +0 -192
  241. package/src/components/account/customer-profile-panel.tsx +0 -379
  242. package/src/components/checkout/cart-sync.ts +0 -143
  243. package/src/components/checkout/checkout-contact-section.tsx +0 -76
  244. package/src/components/checkout/checkout-external-update-banner.tsx +0 -15
  245. package/src/components/checkout/checkout-form-controls.tsx +0 -139
  246. package/src/components/checkout/checkout-line-items.tsx +0 -43
  247. package/src/components/checkout/checkout-order-summary.tsx +0 -165
  248. package/src/components/checkout/checkout-payment-section.tsx +0 -212
  249. package/src/components/checkout/checkout-session-view.tsx +0 -564
  250. package/src/components/checkout/checkout-shipping-address-section.tsx +0 -400
  251. package/src/components/checkout/checkout-shipping-section.tsx +0 -98
  252. package/src/components/checkout/checkout-states.tsx +0 -73
  253. package/src/components/checkout/checkout-step-card.tsx +0 -101
  254. package/src/components/checkout/checkout-steps.ts +0 -111
  255. package/src/components/checkout/form-schema.ts +0 -281
  256. package/src/components/checkout/format.ts +0 -15
  257. package/src/components/checkout/index.ts +0 -5
  258. package/src/components/checkout/map-customer-to-checkout.ts +0 -188
  259. package/src/components/checkout/types.ts +0 -41
  260. package/src/components/checkout/use-checkout-customer-prefill.ts +0 -409
  261. package/src/components/checkout/use-checkout-geo.ts +0 -50
  262. package/src/components/checkout/use-checkout-session.ts +0 -640
  263. package/src/components/hero.tsx +0 -291
  264. package/src/config.d.ts +0 -94
  265. package/src/config.mjs +0 -146
  266. package/src/format-money.ts +0 -31
  267. package/src/health.ts +0 -90
  268. package/src/hooks/index.ts +0 -9
  269. package/src/hooks/recently-viewed.ts +0 -125
  270. package/src/index.ts +0 -349
  271. package/src/link.tsx +0 -2
  272. package/src/pages/account/account-page-skeleton.tsx +0 -69
  273. package/src/pages/account/account-page-view.tsx +0 -270
  274. package/src/pages/account/account-shell.tsx +0 -101
  275. package/src/pages/account/parse-account-route.ts +0 -36
  276. package/src/pages/account.tsx +0 -16
  277. package/src/pages/api.$.ts +0 -20
  278. package/src/pages/api.auth.$.ts +0 -16
  279. package/src/pages/checkout.$checkoutId.tsx +0 -60
  280. package/src/pages/checkout.tsx +0 -31
  281. package/src/pages/pages.$pageSlug.tsx +0 -74
  282. package/src/pages/thank-you.tsx +0 -53
  283. package/src/providers/auth.tsx +0 -96
  284. package/src/providers/cart.tsx +0 -275
  285. package/src/providers/ecomiq.ts +0 -137
  286. package/src/providers/index.ts +0 -26
  287. package/src/proxy-api.ts +0 -20
  288. package/src/public-config.ts +0 -24
  289. package/src/review-submission.ts +0 -89
  290. package/src/runtime/context.ts +0 -2
  291. package/src/runtime/default-layout.tsx +0 -64
  292. package/src/runtime/head.ts +0 -149
  293. package/src/runtime/page.tsx +0 -143
  294. package/src/runtime/postcss-browser-stub.mjs +0 -5
  295. package/src/server-config-store.ts +0 -35
  296. package/src/server.ts +0 -286
  297. package/src/styles.css +0 -76
  298. package/src/ui/badge.tsx +0 -32
  299. package/src/ui/button.tsx +0 -31
  300. package/src/ui/card.tsx +0 -31
  301. package/src/ui/carousel.tsx +0 -218
  302. package/src/ui/cn.ts +0 -6
  303. package/src/ui/index.ts +0 -8
  304. package/src/ui/separator.tsx +0 -6
  305. package/src/ui/skeleton.tsx +0 -6
  306. package/src/ui/storefront-error.tsx +0 -49
  307. package/src/utils.ts +0 -36
  308. package/src/vite-inline.mjs +0 -263
  309. package/templates/__root.tsx +0 -83
  310. package/templates/router.tsx +0 -19
@@ -0,0 +1,310 @@
1
+ import { useStorefrontText } from "../storefront-language-DrMjVbmk.js";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { Button } from "@theme/ui/button";
4
+ import { Input } from "@theme/ui/input";
5
+ import { Textarea } from "@theme/ui/textarea";
6
+ import { Badge } from "@theme/ui/badge";
7
+ import { Checkbox } from "@theme/ui/checkbox";
8
+ import { Label } from "@theme/ui/label";
9
+ // src/sections/design-system.tsx
10
+ const COLORS = [
11
+ {
12
+ token: "primary",
13
+ name: "Principal"
14
+ },
15
+ {
16
+ token: "primary-foreground",
17
+ name: "Sobre principal"
18
+ },
19
+ {
20
+ token: "background",
21
+ name: "Fondo"
22
+ },
23
+ {
24
+ token: "foreground",
25
+ name: "Texto"
26
+ },
27
+ {
28
+ token: "secondary",
29
+ name: "Secundario"
30
+ },
31
+ {
32
+ token: "muted",
33
+ name: "Suave"
34
+ },
35
+ {
36
+ token: "muted-foreground",
37
+ name: "Texto suave"
38
+ },
39
+ {
40
+ token: "accent",
41
+ name: "Acento"
42
+ },
43
+ {
44
+ token: "border",
45
+ name: "Borde"
46
+ },
47
+ {
48
+ token: "destructive",
49
+ name: "Error"
50
+ }
51
+ ];
52
+ const SCHEMES = [
53
+ {
54
+ scheme: "claro",
55
+ name: "Claro"
56
+ },
57
+ {
58
+ scheme: "oscuro",
59
+ name: "Oscuro"
60
+ },
61
+ {
62
+ scheme: "marca",
63
+ name: "Marca"
64
+ }
65
+ ];
66
+ const CORNERS = [
67
+ {
68
+ className: "rounded-none",
69
+ name: "Sin redondeo"
70
+ },
71
+ {
72
+ className: "rounded-sm",
73
+ name: "Pequeño"
74
+ },
75
+ {
76
+ className: "rounded-md",
77
+ name: "Mediano"
78
+ },
79
+ {
80
+ className: "rounded-lg",
81
+ name: "Grande"
82
+ },
83
+ {
84
+ className: "rounded-xl",
85
+ name: "Muy grande"
86
+ },
87
+ {
88
+ className: "rounded-full",
89
+ name: "Círculo"
90
+ }
91
+ ];
92
+ function Group({ title, children }) {
93
+ return /* @__PURE__ */ jsxs("section", {
94
+ className: "flex flex-col gap-4",
95
+ children: [/* @__PURE__ */ jsx("h2", {
96
+ className: "font-body text-xs font-medium uppercase tracking-wide text-muted-foreground",
97
+ children: title
98
+ }), children]
99
+ });
100
+ }
101
+ function DesignSystem() {
102
+ const storefrontTranslate = useStorefrontText();
103
+ return /* @__PURE__ */ jsx("div", {
104
+ "data-ecomiq-design": "",
105
+ className: "fixed inset-0 z-[100] overflow-y-auto bg-background text-foreground",
106
+ children: /* @__PURE__ */ jsxs("div", {
107
+ className: "mx-auto flex max-w-5xl flex-col gap-12 px-6 py-10",
108
+ children: [
109
+ /* @__PURE__ */ jsxs("header", {
110
+ className: "flex flex-col gap-1",
111
+ children: [/* @__PURE__ */ jsx("h1", {
112
+ className: "font-heading text-3xl",
113
+ children: "Sistema de diseño"
114
+ }), /* @__PURE__ */ jsx("p", {
115
+ className: "text-sm text-muted-foreground",
116
+ children: "Colores, letras y piezas de tu tema. Los cambios del panel Tema se ven aquí al instante."
117
+ })]
118
+ }),
119
+ /* @__PURE__ */ jsx(Group, {
120
+ title: "Colores",
121
+ children: /* @__PURE__ */ jsx("div", {
122
+ className: "grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-5",
123
+ children: COLORS.map((color) => /* @__PURE__ */ jsxs("div", {
124
+ className: "flex flex-col gap-2",
125
+ children: [/* @__PURE__ */ jsx("div", {
126
+ className: "h-16 rounded-md border border-border",
127
+ style: { background: `var(--${color.token})` }
128
+ }), /* @__PURE__ */ jsxs("div", {
129
+ className: "flex flex-col",
130
+ children: [/* @__PURE__ */ jsx("span", {
131
+ className: "text-sm font-medium",
132
+ children: color.name
133
+ }), /* @__PURE__ */ jsxs("code", {
134
+ className: "text-xs text-muted-foreground",
135
+ children: ["--", color.token]
136
+ })]
137
+ })]
138
+ }, color.token))
139
+ })
140
+ }),
141
+ /* @__PURE__ */ jsx(Group, {
142
+ title: "Esquemas",
143
+ children: /* @__PURE__ */ jsx("div", {
144
+ className: "grid gap-3 md:grid-cols-3",
145
+ children: SCHEMES.map((item) => /* @__PURE__ */ jsxs("div", {
146
+ "data-scheme": item.scheme,
147
+ className: "flex flex-col gap-3 rounded-lg border border-border p-5",
148
+ children: [
149
+ /* @__PURE__ */ jsx("span", {
150
+ className: "text-xs text-muted-foreground",
151
+ children: item.name
152
+ }),
153
+ /* @__PURE__ */ jsx("p", {
154
+ className: "font-heading text-xl",
155
+ children: "Nueva colección"
156
+ }),
157
+ /* @__PURE__ */ jsx("p", {
158
+ className: "text-sm text-muted-foreground",
159
+ children: "Piezas hechas para durar."
160
+ }),
161
+ /* @__PURE__ */ jsx(Button, {
162
+ size: "sm",
163
+ className: "self-start",
164
+ children: storefrontTranslate("Comprar")
165
+ })
166
+ ]
167
+ }, item.scheme))
168
+ })
169
+ }),
170
+ /* @__PURE__ */ jsx(Group, {
171
+ title: "Tipografía",
172
+ children: /* @__PURE__ */ jsxs("div", {
173
+ className: "flex flex-col gap-3",
174
+ children: [
175
+ /* @__PURE__ */ jsx("p", {
176
+ className: "font-heading text-5xl leading-tight",
177
+ children: "Títulos que se recuerdan"
178
+ }),
179
+ /* @__PURE__ */ jsx("p", {
180
+ className: "font-heading text-3xl",
181
+ children: "Subtítulo de sección"
182
+ }),
183
+ /* @__PURE__ */ jsx("p", {
184
+ className: "font-heading text-xl",
185
+ children: "Título de tarjeta"
186
+ }),
187
+ /* @__PURE__ */ jsx("p", {
188
+ className: "max-w-2xl text-base",
189
+ children: "Este es el texto de tu tienda: descripciones de productos, políticas y todo lo que lee tu cliente antes de comprar."
190
+ }),
191
+ /* @__PURE__ */ jsx("p", {
192
+ className: "text-sm text-muted-foreground",
193
+ children: "Texto pequeño para notas y ayudas."
194
+ })
195
+ ]
196
+ })
197
+ }),
198
+ /* @__PURE__ */ jsxs(Group, {
199
+ title: "Botones",
200
+ children: [/* @__PURE__ */ jsxs("div", {
201
+ className: "flex flex-wrap items-center gap-3",
202
+ children: [
203
+ /* @__PURE__ */ jsx(Button, { children: storefrontTranslate("Principal") }),
204
+ /* @__PURE__ */ jsx(Button, {
205
+ variant: "secondary",
206
+ children: "Secundario"
207
+ }),
208
+ /* @__PURE__ */ jsx(Button, {
209
+ variant: "outline",
210
+ children: "Con borde"
211
+ }),
212
+ /* @__PURE__ */ jsx(Button, {
213
+ variant: "ghost",
214
+ children: "Sin fondo"
215
+ }),
216
+ /* @__PURE__ */ jsx(Button, {
217
+ variant: "link",
218
+ children: "Enlace"
219
+ })
220
+ ]
221
+ }), /* @__PURE__ */ jsxs("div", {
222
+ className: "flex flex-wrap items-center gap-3",
223
+ children: [
224
+ /* @__PURE__ */ jsx(Button, {
225
+ size: "sm",
226
+ children: "Pequeño"
227
+ }),
228
+ /* @__PURE__ */ jsx(Button, { children: "Normal" }),
229
+ /* @__PURE__ */ jsx(Button, {
230
+ size: "lg",
231
+ children: "Grande"
232
+ })
233
+ ]
234
+ })]
235
+ }),
236
+ /* @__PURE__ */ jsx(Group, {
237
+ title: "Campos",
238
+ children: /* @__PURE__ */ jsxs("div", {
239
+ className: "grid max-w-2xl gap-4 sm:grid-cols-2",
240
+ children: [
241
+ /* @__PURE__ */ jsxs("div", {
242
+ className: "flex flex-col gap-2",
243
+ children: [/* @__PURE__ */ jsx(Label, {
244
+ htmlFor: "ecomiq-design-email",
245
+ children: storefrontTranslate("Correo")
246
+ }), /* @__PURE__ */ jsx(Input, {
247
+ id: "ecomiq-design-email",
248
+ placeholder: storefrontTranslate("tu@correo.com")
249
+ })]
250
+ }),
251
+ /* @__PURE__ */ jsxs("div", {
252
+ className: "flex flex-col gap-2",
253
+ children: [/* @__PURE__ */ jsx(Label, {
254
+ htmlFor: "ecomiq-design-note",
255
+ children: "Nota"
256
+ }), /* @__PURE__ */ jsx(Textarea, {
257
+ id: "ecomiq-design-note",
258
+ placeholder: "Escribe aquí",
259
+ rows: 2
260
+ })]
261
+ }),
262
+ /* @__PURE__ */ jsxs("div", {
263
+ className: "flex items-center gap-2",
264
+ children: [/* @__PURE__ */ jsx(Checkbox, {
265
+ id: "ecomiq-design-news",
266
+ defaultChecked: true
267
+ }), /* @__PURE__ */ jsx(Label, {
268
+ htmlFor: "ecomiq-design-news",
269
+ children: "Quiero recibir novedades"
270
+ })]
271
+ }),
272
+ /* @__PURE__ */ jsxs("div", {
273
+ className: "flex flex-wrap items-center gap-2",
274
+ children: [
275
+ /* @__PURE__ */ jsx(Badge, { children: "Nuevo" }),
276
+ /* @__PURE__ */ jsx(Badge, {
277
+ variant: "secondary",
278
+ children: "Envío gratis"
279
+ }),
280
+ /* @__PURE__ */ jsx(Badge, {
281
+ variant: "outline",
282
+ children: storefrontTranslate("Agotado")
283
+ }),
284
+ /* @__PURE__ */ jsx(Badge, {
285
+ variant: "destructive",
286
+ children: "-20 %"
287
+ })
288
+ ]
289
+ })
290
+ ]
291
+ })
292
+ }),
293
+ /* @__PURE__ */ jsx(Group, {
294
+ title: "Esquinas",
295
+ children: /* @__PURE__ */ jsx("div", {
296
+ className: "flex flex-wrap gap-4",
297
+ children: CORNERS.map((corner) => /* @__PURE__ */ jsxs("div", {
298
+ className: "flex flex-col items-center gap-2",
299
+ children: [/* @__PURE__ */ jsx("div", { className: `size-16 border border-border bg-muted ${corner.className}` }), /* @__PURE__ */ jsx("span", {
300
+ className: "text-xs text-muted-foreground",
301
+ children: corner.name
302
+ })]
303
+ }, corner.className))
304
+ })
305
+ })
306
+ ]
307
+ })
308
+ });
309
+ }
310
+ export { DesignSystem };
@@ -0,0 +1,20 @@
1
+ import { OrderDraftActionData, OrderDraftData } from "../order-draft.js";
2
+ import "../index.js";
3
+ import { SectionCatalog, SectionRoot } from "../settings.js";
4
+ import "../entries/order.js";
5
+ export declare const catalog: SectionCatalog;
6
+ export declare const settings: {
7
+ invoice: {
8
+ eyebrow: string;
9
+ title: string;
10
+ description: string;
11
+ pay: string;
12
+ note: string;
13
+ split: string;
14
+ closed: string;
15
+ };
16
+ };
17
+ export declare function DraftInvoice({ loaderData, actionData, ...root }: {
18
+ loaderData: OrderDraftData;
19
+ actionData?: OrderDraftActionData;
20
+ } & SectionRoot): import("react").JSX.Element;
@@ -0,0 +1,158 @@
1
+ import { useStorefrontText } from "../storefront-language-DrMjVbmk.js";
2
+ import { CustomerCsrfField } from "../customer-csrf-C1oDX-Py.js";
3
+ import { money } from "../money-DtGOtDri.js";
4
+ import { setting } from "../settings-B0NO2A6Y.js";
5
+ import { orderSummaryLines } from "../cart-summary-ur2VWKr-.js";
6
+ import { Form, Link, useNavigation } from "react-router";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+ import { Button } from "@theme/ui/button";
9
+ // src/sections/draft-invoice.tsx
10
+ const catalog = {
11
+ name: "Pedido por pagar",
12
+ description: "Productos y totales de un pedido por pagar, con el botón para pagarlo."
13
+ };
14
+ const settings = { invoice: {
15
+ eyebrow: setting.text("Factura", "Antetítulo"),
16
+ title: setting.text("Tu pedido", "Título"),
17
+ description: setting.text("Revisa los productos y paga cuando quieras.", "Descripción"),
18
+ pay: setting.text("Pagar pedido", "Botón"),
19
+ note: setting.text("Se respetarán los importes y el envío de este pedido.", "Nota"),
20
+ split: setting.text("Tu compra se dividió en varios pedidos. Revisa y paga cada uno.", "Pedidos separados"),
21
+ closed: setting.text("Este pedido ya no está disponible para pagar. Escríbenos si necesitas ayuda.", "Pedido cerrado")
22
+ } };
23
+ function DraftInvoice({ loaderData, actionData, ...root }) {
24
+ const storefrontTranslate = useStorefrontText();
25
+ const { draft, payable, language } = loaderData;
26
+ const orderPaths = actionData?.orderPaths ?? loaderData.orderPaths;
27
+ const busy = useNavigation().state !== "idle";
28
+ const price = (value) => money(value, draft.currencyCode, language);
29
+ return /* @__PURE__ */ jsxs("section", {
30
+ ...root,
31
+ className: "mx-auto flex w-full max-w-2xl flex-col gap-8 px-4 py-12 md:py-20",
32
+ children: [
33
+ /* @__PURE__ */ jsxs("div", {
34
+ className: "flex flex-col gap-3",
35
+ children: [
36
+ /* @__PURE__ */ jsxs("p", {
37
+ className: "text-xs font-medium tracking-widest text-muted-foreground uppercase",
38
+ children: [
39
+ settings.invoice.eyebrow,
40
+ " ",
41
+ draft.draftNumber
42
+ ]
43
+ }),
44
+ /* @__PURE__ */ jsx("h1", {
45
+ className: "text-4xl leading-tight md:text-5xl",
46
+ children: settings.invoice.title
47
+ }),
48
+ /* @__PURE__ */ jsx("p", {
49
+ className: "text-muted-foreground",
50
+ children: settings.invoice.description
51
+ })
52
+ ]
53
+ }),
54
+ /* @__PURE__ */ jsx("ul", {
55
+ className: "divide-y rounded-lg border bg-card text-card-foreground",
56
+ children: draft.items.map((item) => /* @__PURE__ */ jsxs("li", {
57
+ className: "flex items-center gap-4 p-4",
58
+ children: [
59
+ /* @__PURE__ */ jsx("span", {
60
+ className: "block w-16 shrink-0 overflow-hidden rounded-md bg-muted",
61
+ children: item.thumbnail ? /* @__PURE__ */ jsx("img", {
62
+ src: item.thumbnail,
63
+ alt: "",
64
+ width: 64,
65
+ height: 80,
66
+ loading: "lazy",
67
+ decoding: "async",
68
+ className: "aspect-[4/5] w-full object-cover"
69
+ }) : /* @__PURE__ */ jsx("span", { className: "block aspect-[4/5]" })
70
+ }),
71
+ /* @__PURE__ */ jsxs("span", {
72
+ className: "flex flex-1 flex-col gap-0.5",
73
+ children: [
74
+ /* @__PURE__ */ jsx("span", {
75
+ className: "font-medium",
76
+ children: item.title
77
+ }),
78
+ item.subtitle ? /* @__PURE__ */ jsx("span", {
79
+ className: "text-sm text-muted-foreground",
80
+ children: item.subtitle
81
+ }) : null,
82
+ /* @__PURE__ */ jsxs("span", {
83
+ className: "text-sm text-muted-foreground tabular-nums",
84
+ children: ["×", item.quantity]
85
+ })
86
+ ]
87
+ }),
88
+ /* @__PURE__ */ jsx("span", {
89
+ className: "font-medium tabular-nums",
90
+ children: price(item.total)
91
+ })
92
+ ]
93
+ }, item.id))
94
+ }),
95
+ /* @__PURE__ */ jsx("dl", {
96
+ className: "flex flex-col gap-2.5 rounded-lg border bg-card p-6 text-sm text-card-foreground",
97
+ children: orderSummaryLines(draft, { discount: "Descuento" }).map((line) => line.key === "total" ? /* @__PURE__ */ jsxs("div", {
98
+ className: "flex items-baseline justify-between border-t pt-3 font-medium",
99
+ children: [/* @__PURE__ */ jsx("dt", { children: storefrontTranslate(line.label) }), /* @__PURE__ */ jsx("dd", {
100
+ className: "font-heading text-xl tabular-nums",
101
+ children: price(line.amount ?? 0)
102
+ })]
103
+ }, line.key) : /* @__PURE__ */ jsxs("div", {
104
+ className: "flex justify-between",
105
+ children: [/* @__PURE__ */ jsx("dt", {
106
+ className: "text-muted-foreground",
107
+ children: storefrontTranslate(line.label)
108
+ }), /* @__PURE__ */ jsx("dd", {
109
+ className: "tabular-nums",
110
+ children: line.amount === null ? storefrontTranslate(line.text ?? "") : price(line.amount)
111
+ })]
112
+ }, line.key))
113
+ }),
114
+ orderPaths.length > 0 ? /* @__PURE__ */ jsxs("nav", {
115
+ "aria-label": storefrontTranslate("Pedidos para pagar"),
116
+ className: "flex flex-col gap-3 rounded-lg border p-5",
117
+ children: [/* @__PURE__ */ jsx("p", { children: settings.invoice.split }), /* @__PURE__ */ jsx("ul", {
118
+ className: "flex flex-col gap-3",
119
+ children: orderPaths.map((path, index) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(Link, {
120
+ to: path,
121
+ className: "font-medium underline underline-offset-4",
122
+ children: [
123
+ storefrontTranslate("Ver y pagar pedido"),
124
+ " ",
125
+ index + 1
126
+ ]
127
+ }) }, path))
128
+ })]
129
+ }) : payable ? /* @__PURE__ */ jsxs(Form, {
130
+ method: "post",
131
+ className: "flex flex-col gap-3",
132
+ children: [
133
+ /* @__PURE__ */ jsx(CustomerCsrfField, {}),
134
+ actionData?.error ? /* @__PURE__ */ jsx("p", {
135
+ role: "alert",
136
+ className: "text-sm text-destructive",
137
+ children: storefrontTranslate(actionData.error)
138
+ }) : null,
139
+ /* @__PURE__ */ jsx(Button, {
140
+ type: "submit",
141
+ size: "lg",
142
+ disabled: busy,
143
+ children: busy ? storefrontTranslate("Preparando…") : settings.invoice.pay
144
+ }),
145
+ /* @__PURE__ */ jsx("p", {
146
+ className: "text-center text-xs text-muted-foreground",
147
+ children: settings.invoice.note
148
+ })
149
+ ]
150
+ }) : /* @__PURE__ */ jsx("p", {
151
+ role: "status",
152
+ className: "rounded-md bg-muted px-4 py-3 text-sm",
153
+ children: settings.invoice.closed
154
+ })
155
+ ]
156
+ });
157
+ }
158
+ export { DraftInvoice, catalog, settings };
@@ -0,0 +1,19 @@
1
+ import { TrackingData } from "../public-pages.js";
2
+ import { SectionCatalog, SectionRoot } from "../settings.js";
3
+ import "../index.js";
4
+ export declare const catalog: SectionCatalog;
5
+ export declare const settings: {
6
+ tracking: {
7
+ eyebrow: string;
8
+ title: string;
9
+ description: string;
10
+ field: string;
11
+ button: string;
12
+ missing: string;
13
+ shipment: string;
14
+ carrier: string;
15
+ };
16
+ };
17
+ export declare function OrderTracking({ loaderData, ...root }: {
18
+ loaderData: TrackingData;
19
+ } & SectionRoot): import("react").JSX.Element;
@@ -0,0 +1,141 @@
1
+ import { setting } from "../settings-B0NO2A6Y.js";
2
+ import { Form } from "react-router";
3
+ import { formatTrackingStatus } from "@ecomiq/core";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { Button } from "@theme/ui/button";
6
+ import { Input } from "@theme/ui/input";
7
+ // src/sections/order-tracking.tsx
8
+ const catalog = {
9
+ name: "Seguimiento",
10
+ description: "Buscador por código para seguir el envío de un pedido."
11
+ };
12
+ const settings = { tracking: {
13
+ eyebrow: setting.text("Envíos", "Antetítulo"),
14
+ title: setting.text("Sigue tu pedido", "Título"),
15
+ description: setting.text("Ingresa el código de seguimiento que te enviamos por correo.", "Descripción"),
16
+ field: setting.text("Código de seguimiento", "Campo"),
17
+ button: setting.text("Buscar", "Botón"),
18
+ missing: setting.text("No encontramos ese código. Revísalo e intenta de nuevo.", "Código no encontrado"),
19
+ shipment: setting.text("Envío", "Envío sin courier"),
20
+ carrier: setting.text("Ver en el courier", "Enlace al courier")
21
+ } };
22
+ function OrderTracking({ loaderData, ...root }) {
23
+ const { code, tracking, missing, language, timeZone } = loaderData;
24
+ const date = new Intl.DateTimeFormat(language, {
25
+ day: "numeric",
26
+ month: "short",
27
+ hour: "2-digit",
28
+ minute: "2-digit",
29
+ timeZone
30
+ });
31
+ return /* @__PURE__ */ jsxs("section", {
32
+ ...root,
33
+ className: "mx-auto flex w-full max-w-2xl flex-col gap-8 px-4 py-12 md:py-20",
34
+ children: [
35
+ /* @__PURE__ */ jsxs("div", {
36
+ className: "flex flex-col gap-3",
37
+ children: [
38
+ /* @__PURE__ */ jsx("p", {
39
+ className: "text-xs font-medium tracking-widest text-muted-foreground uppercase",
40
+ children: settings.tracking.eyebrow
41
+ }),
42
+ /* @__PURE__ */ jsx("h1", {
43
+ className: "text-4xl leading-tight md:text-5xl",
44
+ children: settings.tracking.title
45
+ }),
46
+ /* @__PURE__ */ jsx("p", {
47
+ className: "text-muted-foreground",
48
+ children: settings.tracking.description
49
+ })
50
+ ]
51
+ }),
52
+ /* @__PURE__ */ jsxs(Form, {
53
+ method: "get",
54
+ action: "/track",
55
+ className: "flex flex-col gap-2 sm:flex-row",
56
+ children: [/* @__PURE__ */ jsx(Input, {
57
+ name: "code",
58
+ defaultValue: code,
59
+ placeholder: settings.tracking.field,
60
+ "aria-label": settings.tracking.field,
61
+ required: true
62
+ }), /* @__PURE__ */ jsx(Button, {
63
+ type: "submit",
64
+ children: settings.tracking.button
65
+ })]
66
+ }),
67
+ missing ? /* @__PURE__ */ jsx("p", {
68
+ role: "alert",
69
+ className: "rounded-md bg-destructive/10 px-4 py-3 text-sm text-destructive",
70
+ children: settings.tracking.missing
71
+ }) : null,
72
+ tracking ? /* @__PURE__ */ jsxs("div", {
73
+ className: "flex flex-col gap-6 rounded-lg border bg-card p-6 text-card-foreground md:p-8",
74
+ children: [
75
+ /* @__PURE__ */ jsxs("div", {
76
+ className: "flex flex-wrap items-start justify-between gap-3",
77
+ children: [/* @__PURE__ */ jsxs("div", {
78
+ className: "flex flex-col gap-1",
79
+ children: [/* @__PURE__ */ jsxs("p", {
80
+ className: "text-sm text-muted-foreground",
81
+ children: [
82
+ tracking.carrierName ?? settings.tracking.shipment,
83
+ " · ",
84
+ tracking.trackingNumber
85
+ ]
86
+ }), /* @__PURE__ */ jsx("p", {
87
+ className: "font-heading text-3xl",
88
+ children: formatTrackingStatus(tracking.status)
89
+ })]
90
+ }), tracking.trackingLink ? /* @__PURE__ */ jsx("a", {
91
+ href: tracking.trackingLink,
92
+ target: "_blank",
93
+ rel: "noopener noreferrer",
94
+ className: "text-sm font-medium underline underline-offset-4",
95
+ children: settings.tracking.carrier
96
+ }) : null]
97
+ }),
98
+ tracking.message ? /* @__PURE__ */ jsx("p", {
99
+ className: "text-sm text-muted-foreground",
100
+ children: tracking.message
101
+ }) : null,
102
+ /* @__PURE__ */ jsx("ol", {
103
+ className: "flex flex-col",
104
+ children: tracking.events.map((event, index) => /* @__PURE__ */ jsxs("li", {
105
+ className: "relative flex gap-4 pb-6 text-sm last:pb-0",
106
+ children: [
107
+ index < tracking.events.length - 1 ? /* @__PURE__ */ jsx("span", {
108
+ "aria-hidden": "true",
109
+ className: "absolute top-4 left-[5px] h-full w-px bg-border"
110
+ }) : null,
111
+ /* @__PURE__ */ jsx("span", {
112
+ "aria-hidden": "true",
113
+ className: "relative mt-1.5 size-2.5 shrink-0 rounded-full bg-primary"
114
+ }),
115
+ /* @__PURE__ */ jsxs("span", {
116
+ className: "flex flex-col gap-0.5",
117
+ children: [
118
+ /* @__PURE__ */ jsx("span", {
119
+ className: "font-medium",
120
+ children: event.name
121
+ }),
122
+ event.description ? /* @__PURE__ */ jsx("span", {
123
+ className: "text-muted-foreground",
124
+ children: event.description
125
+ }) : null,
126
+ event.date ? /* @__PURE__ */ jsx("time", {
127
+ dateTime: event.date,
128
+ className: "text-xs text-muted-foreground",
129
+ children: date.format(new Date(event.date))
130
+ }) : null
131
+ ]
132
+ })
133
+ ]
134
+ }, `${event.name}-${index}`))
135
+ })
136
+ ]
137
+ }) : null
138
+ ]
139
+ });
140
+ }
141
+ export { OrderTracking, catalog, settings };