@nextblock-cms/ecom 0.20.3 → 0.21.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 (317) hide show
  1. package/_virtual/_rolldown/runtime.cjs.js +1 -0
  2. package/index.cjs.js +1 -1
  3. package/index.es.js +38 -146
  4. package/lib/CurrencyProvider.cjs.js +1 -1
  5. package/lib/CurrencyProvider.d.ts +1 -1
  6. package/lib/CurrencyProvider.es.js +85 -95
  7. package/lib/PaymentReadinessProvider.cjs.js +1 -1
  8. package/lib/PaymentReadinessProvider.d.ts +1 -1
  9. package/lib/PaymentReadinessProvider.es.js +24 -27
  10. package/lib/cart-store.cjs.js +1 -1
  11. package/lib/cart-store.es.js +109 -121
  12. package/lib/components/AccountNavigationMenu.cjs.js +1 -1
  13. package/lib/components/AccountNavigationMenu.d.ts +1 -1
  14. package/lib/components/AccountNavigationMenu.es.js +36 -50
  15. package/lib/components/AddToCartButton.cjs.js +1 -1
  16. package/lib/components/AddToCartButton.d.ts +1 -1
  17. package/lib/components/AddToCartButton.es.js +94 -89
  18. package/lib/components/Cart.cjs.js +1 -1
  19. package/lib/components/Cart.d.ts +1 -1
  20. package/lib/components/Cart.es.js +261 -180
  21. package/lib/components/CartDrawer.cjs.js +1 -1
  22. package/lib/components/CartDrawer.d.ts +1 -1
  23. package/lib/components/CartDrawer.es.js +218 -148
  24. package/lib/components/CartIcon.cjs.js +1 -1
  25. package/lib/components/CartIcon.d.ts +1 -1
  26. package/lib/components/CartIcon.es.js +33 -35
  27. package/lib/components/Checkout.cjs.js +1 -1
  28. package/lib/components/Checkout.d.ts +1 -1
  29. package/lib/components/Checkout.es.js +1092 -1108
  30. package/lib/components/CouponForm.cjs.js +1 -1
  31. package/lib/components/CouponForm.d.ts +1 -1
  32. package/lib/components/CouponForm.es.js +136 -148
  33. package/lib/components/CurrencySwitcher.cjs.js +1 -1
  34. package/lib/components/CurrencySwitcher.d.ts +1 -1
  35. package/lib/components/CurrencySwitcher.es.js +22 -18
  36. package/lib/components/CustomerProfileForm.cjs.js +1 -1
  37. package/lib/components/CustomerProfileForm.es.js +454 -313
  38. package/lib/components/FeaturedProduct.cjs.js +1 -1
  39. package/lib/components/FeaturedProduct.d.ts +1 -1
  40. package/lib/components/FeaturedProduct.es.js +98 -83
  41. package/lib/components/FreemiusLicensePanel.cjs.js +1 -1
  42. package/lib/components/FreemiusLicensePanel.d.ts +1 -1
  43. package/lib/components/FreemiusLicensePanel.es.js +70 -65
  44. package/lib/components/InvoiceDocument.cjs.js +1 -1
  45. package/lib/components/InvoiceDocument.es.js +256 -192
  46. package/lib/components/InvoiceViewerShell.cjs.js +2 -2
  47. package/lib/components/InvoiceViewerShell.d.ts +1 -1
  48. package/lib/components/InvoiceViewerShell.es.js +75 -106
  49. package/lib/components/ProductCard.cjs.js +1 -1
  50. package/lib/components/ProductCard.d.ts +1 -1
  51. package/lib/components/ProductCard.es.js +186 -171
  52. package/lib/components/ProductDetailsLayout.cjs.js +1 -1
  53. package/lib/components/ProductDetailsLayout.es.js +405 -404
  54. package/lib/components/ProductGallery.cjs.js +1 -1
  55. package/lib/components/ProductGallery.d.ts +1 -1
  56. package/lib/components/ProductGallery.es.js +51 -54
  57. package/lib/components/ProductGrid.cjs.js +1 -1
  58. package/lib/components/ProductGrid.d.ts +1 -1
  59. package/lib/components/ProductGrid.es.js +23 -25
  60. package/lib/components/ShippingEstimator.cjs.js +1 -1
  61. package/lib/components/ShippingEstimator.d.ts +1 -1
  62. package/lib/components/ShippingEstimator.es.js +158 -153
  63. package/lib/components/ShortDescription.cjs.js +1 -1
  64. package/lib/components/ShortDescription.es.js +17 -17
  65. package/lib/components/SimpleTiptapRenderer.cjs.js +1 -1
  66. package/lib/components/SimpleTiptapRenderer.es.js +238 -211
  67. package/lib/components/SubscriptionSelector.cjs.js +1 -1
  68. package/lib/components/SubscriptionSelector.es.js +159 -154
  69. package/lib/countries.cjs.js +1 -1
  70. package/lib/countries.es.js +232 -75
  71. package/lib/coupon-server.cjs.js +1 -1
  72. package/lib/coupon-server.es.js +180 -224
  73. package/lib/coupons.cjs.js +1 -1
  74. package/lib/coupons.es.js +12 -14
  75. package/lib/currency-constants.cjs.js +1 -1
  76. package/lib/currency-constants.es.js +4 -4
  77. package/lib/currency-rest-client.cjs.js +1 -1
  78. package/lib/currency-rest-client.es.js +15 -22
  79. package/lib/currency-store.cjs.js +1 -1
  80. package/lib/currency-store.es.js +20 -27
  81. package/lib/currency-sync.cjs.js +1 -1
  82. package/lib/currency-sync.es.js +124 -170
  83. package/lib/currency.cjs.js +1 -1
  84. package/lib/currency.es.js +242 -310
  85. package/lib/customer-addresses.cjs.js +1 -1
  86. package/lib/customer-addresses.es.js +80 -109
  87. package/lib/customer-orders.cjs.js +1 -1
  88. package/lib/customer-orders.es.js +31 -43
  89. package/lib/customer.cjs.js +1 -1
  90. package/lib/customer.es.js +43 -52
  91. package/lib/export-helpers.cjs.js +1 -1
  92. package/lib/export-helpers.es.js +53 -52
  93. package/lib/factory.cjs.js +1 -1
  94. package/lib/factory.es.js +10 -7
  95. package/lib/freemius-coupons.cjs.js +1 -1
  96. package/lib/freemius-coupons.es.js +245 -262
  97. package/lib/freemius-license-claim.cjs.js +1 -1
  98. package/lib/freemius-license-claim.es.js +87 -71
  99. package/lib/freemius-license.cjs.js +1 -1
  100. package/lib/freemius-license.es.js +32 -39
  101. package/lib/freemius-order-sync.cjs.js +1 -1
  102. package/lib/freemius-order-sync.es.js +226 -290
  103. package/lib/freemius-trial-provision.cjs.js +1 -1
  104. package/lib/freemius-trial-provision.es.js +136 -130
  105. package/lib/inventory-settings.cjs.js +1 -1
  106. package/lib/inventory-settings.es.js +69 -77
  107. package/lib/invoice-server.cjs.js +3 -3
  108. package/lib/invoice-server.es.js +94 -141
  109. package/lib/invoice-ui.cjs.js +1 -1
  110. package/lib/invoice-ui.es.js +50 -66
  111. package/lib/invoice.cjs.js +1 -1
  112. package/lib/invoice.es.js +85 -94
  113. package/lib/order-inventory.cjs.js +25 -25
  114. package/lib/order-inventory.es.js +67 -79
  115. package/lib/order-tax-details.cjs.js +1 -1
  116. package/lib/order-tax-details.es.js +142 -153
  117. package/lib/pages/cms/coupons/CouponEditorForm.cjs.js +1 -1
  118. package/lib/pages/cms/coupons/CouponEditorForm.d.ts +1 -1
  119. package/lib/pages/cms/coupons/CouponEditorForm.es.js +227 -185
  120. package/lib/pages/cms/coupons/CouponsPage.cjs.js +2 -2
  121. package/lib/pages/cms/coupons/CouponsPage.d.ts +1 -1
  122. package/lib/pages/cms/coupons/CouponsPage.es.js +235 -166
  123. package/lib/pages/cms/coupons/CreateCouponDialog.cjs.js +1 -1
  124. package/lib/pages/cms/coupons/CreateCouponDialog.d.ts +1 -1
  125. package/lib/pages/cms/coupons/CreateCouponDialog.es.js +35 -34
  126. package/lib/pages/cms/coupons/EditCouponPage.cjs.js +1 -1
  127. package/lib/pages/cms/coupons/EditCouponPage.d.ts +1 -1
  128. package/lib/pages/cms/coupons/EditCouponPage.es.js +47 -47
  129. package/lib/pages/cms/coupons/ProductScopePicker.cjs.js +1 -1
  130. package/lib/pages/cms/coupons/ProductScopePicker.d.ts +1 -1
  131. package/lib/pages/cms/coupons/ProductScopePicker.es.js +128 -117
  132. package/lib/pages/cms/coupons/actions.cjs.js +1 -1
  133. package/lib/pages/cms/coupons/actions.es.js +112 -115
  134. package/lib/pages/cms/coupons/index.cjs.js +1 -0
  135. package/lib/pages/cms/coupons/index.es.js +3 -0
  136. package/lib/pages/cms/coupons/product-options.cjs.js +1 -1
  137. package/lib/pages/cms/coupons/product-options.es.js +21 -23
  138. package/lib/pages/cms/orders/ExportReportsDialog.cjs.js +1 -1
  139. package/lib/pages/cms/orders/ExportReportsDialog.es.js +135 -129
  140. package/lib/pages/cms/orders/MarkPaidButton.d.ts +1 -1
  141. package/lib/pages/cms/orders/OrderDetailPage.cjs.js +1 -1
  142. package/lib/pages/cms/orders/OrderDetailPage.d.ts +1 -1
  143. package/lib/pages/cms/orders/OrderDetailPage.es.js +186 -134
  144. package/lib/pages/cms/orders/OrderPrintButton.cjs.js +1 -1
  145. package/lib/pages/cms/orders/OrderPrintButton.d.ts +1 -1
  146. package/lib/pages/cms/orders/OrderPrintButton.es.js +15 -21
  147. package/lib/pages/cms/orders/OrderStatusForm.cjs.js +1 -1
  148. package/lib/pages/cms/orders/OrderStatusForm.d.ts +1 -1
  149. package/lib/pages/cms/orders/OrderStatusForm.es.js +85 -69
  150. package/lib/pages/cms/orders/OrdersPage.cjs.js +1 -1
  151. package/lib/pages/cms/orders/OrdersPage.d.ts +1 -1
  152. package/lib/pages/cms/orders/OrdersPage.es.js +170 -102
  153. package/lib/pages/cms/orders/actions.cjs.js +3 -3
  154. package/lib/pages/cms/orders/actions.es.js +53 -69
  155. package/lib/pages/cms/orders/export-actions.cjs.js +1 -1
  156. package/lib/pages/cms/orders/export-actions.es.js +23 -26
  157. package/lib/pages/cms/orders/index.cjs.js +1 -0
  158. package/lib/pages/cms/orders/index.es.js +6 -0
  159. package/lib/pages/cms/orders/server-actions.cjs.js +1 -1
  160. package/lib/pages/cms/orders/server-actions.es.js +60 -51
  161. package/lib/pages/cms/payments/PaymentsClient.cjs.js +1 -1
  162. package/lib/pages/cms/payments/PaymentsClient.d.ts +1 -1
  163. package/lib/pages/cms/payments/PaymentsClient.es.js +316 -346
  164. package/lib/pages/cms/payments/PaymentsPage.cjs.js +1 -1
  165. package/lib/pages/cms/payments/PaymentsPage.d.ts +1 -1
  166. package/lib/pages/cms/payments/PaymentsPage.es.js +29 -32
  167. package/lib/pages/cms/payments/actions.cjs.js +1 -1
  168. package/lib/pages/cms/payments/actions.es.js +38 -48
  169. package/lib/pages/cms/payments/index.cjs.js +1 -0
  170. package/lib/pages/cms/payments/index.es.js +3 -0
  171. package/lib/pages/cms/payments/queries.cjs.js +1 -1
  172. package/lib/pages/cms/payments/queries.es.js +38 -48
  173. package/lib/pages/cms/products/ProductsPage.cjs.js +1 -1
  174. package/lib/pages/cms/products/ProductsPage.d.ts +1 -1
  175. package/lib/pages/cms/products/ProductsPage.es.js +63 -66
  176. package/lib/pages/cms/products/[id]/edit/EditProductPage.d.ts +1 -1
  177. package/lib/pages/cms/products/_id_/edit/EditProductPage.cjs.js +1 -1
  178. package/lib/pages/cms/products/_id_/edit/EditProductPage.es.js +138 -155
  179. package/lib/pages/cms/products/actions.cjs.js +4 -4
  180. package/lib/pages/cms/products/actions.es.js +121 -162
  181. package/lib/pages/cms/products/attributes/AttributeManagementPage.cjs.js +1 -1
  182. package/lib/pages/cms/products/attributes/AttributeManagementPage.d.ts +1 -1
  183. package/lib/pages/cms/products/attributes/AttributeManagementPage.es.js +55 -47
  184. package/lib/pages/cms/products/attributes/components/AttributeManager.cjs.js +1 -1
  185. package/lib/pages/cms/products/attributes/components/AttributeManager.d.ts +1 -1
  186. package/lib/pages/cms/products/attributes/components/AttributeManager.es.js +285 -290
  187. package/lib/pages/cms/products/categories/CategoryManagementPage.cjs.js +1 -1
  188. package/lib/pages/cms/products/categories/CategoryManagementPage.d.ts +1 -1
  189. package/lib/pages/cms/products/categories/CategoryManagementPage.es.js +43 -35
  190. package/lib/pages/cms/products/categories/components/CategoryManager.cjs.js +1 -1
  191. package/lib/pages/cms/products/categories/components/CategoryManager.es.js +315 -262
  192. package/lib/pages/cms/products/components/CopyProductFromLanguage.cjs.js +1 -1
  193. package/lib/pages/cms/products/components/CopyProductFromLanguage.es.js +115 -113
  194. package/lib/pages/cms/products/components/CurrencyPriceFields.cjs.js +1 -1
  195. package/lib/pages/cms/products/components/CurrencyPriceFields.d.ts +1 -1
  196. package/lib/pages/cms/products/components/CurrencyPriceFields.es.js +136 -145
  197. package/lib/pages/cms/products/components/DeleteProductButton.cjs.js +1 -1
  198. package/lib/pages/cms/products/components/DeleteProductButton.d.ts +1 -1
  199. package/lib/pages/cms/products/components/DeleteProductButton.es.js +35 -47
  200. package/lib/pages/cms/products/components/FreemiusPricingDashboard.cjs.js +1 -1
  201. package/lib/pages/cms/products/components/FreemiusPricingDashboard.d.ts +1 -1
  202. package/lib/pages/cms/products/components/FreemiusPricingDashboard.es.js +106 -84
  203. package/lib/pages/cms/products/components/ProductCategorySelector.cjs.js +1 -1
  204. package/lib/pages/cms/products/components/ProductCategorySelector.es.js +156 -159
  205. package/lib/pages/cms/products/components/ProductForm.cjs.js +1 -1
  206. package/lib/pages/cms/products/components/ProductForm.es.js +872 -693
  207. package/lib/pages/cms/products/components/ProductMediaManager.cjs.js +1 -1
  208. package/lib/pages/cms/products/components/ProductMediaManager.es.js +106 -103
  209. package/lib/pages/cms/products/components/ProductsBulkTable.cjs.js +1 -1
  210. package/lib/pages/cms/products/components/ProductsBulkTable.d.ts +1 -1
  211. package/lib/pages/cms/products/components/ProductsBulkTable.es.js +303 -294
  212. package/lib/pages/cms/products/components/SaleScheduleFields.cjs.js +1 -1
  213. package/lib/pages/cms/products/components/SaleScheduleFields.d.ts +1 -1
  214. package/lib/pages/cms/products/components/SaleScheduleFields.es.js +111 -134
  215. package/lib/pages/cms/products/components/SyncFreemiusButton.cjs.js +1 -1
  216. package/lib/pages/cms/products/components/SyncFreemiusButton.d.ts +1 -1
  217. package/lib/pages/cms/products/components/SyncFreemiusButton.es.js +29 -35
  218. package/lib/pages/cms/products/components/SyncFreemiusPricingButton.cjs.js +2 -2
  219. package/lib/pages/cms/products/components/SyncFreemiusPricingButton.d.ts +1 -1
  220. package/lib/pages/cms/products/components/SyncFreemiusPricingButton.es.js +36 -48
  221. package/lib/pages/cms/products/components/SyncProductForm.d.ts +1 -1
  222. package/lib/pages/cms/products/components/VariationsEditor.cjs.js +1 -1
  223. package/lib/pages/cms/products/components/VariationsEditor.d.ts +1 -1
  224. package/lib/pages/cms/products/components/VariationsEditor.es.js +396 -405
  225. package/lib/pages/cms/products/index.cjs.js +1 -0
  226. package/lib/pages/cms/products/index.es.js +8 -0
  227. package/lib/pages/cms/products/inventory/InventoryPage.cjs.js +1 -1
  228. package/lib/pages/cms/products/inventory/InventoryPage.d.ts +1 -1
  229. package/lib/pages/cms/products/inventory/InventoryPage.es.js +21 -15
  230. package/lib/pages/cms/products/inventory/InventoryTableClient.cjs.js +2 -2
  231. package/lib/pages/cms/products/inventory/InventoryTableClient.d.ts +1 -1
  232. package/lib/pages/cms/products/inventory/InventoryTableClient.es.js +230 -209
  233. package/lib/pages/cms/products/inventory/actions.cjs.js +3 -3
  234. package/lib/pages/cms/products/inventory/actions.es.js +83 -91
  235. package/lib/pages/cms/products/new/NewProductPage.cjs.js +1 -1
  236. package/lib/pages/cms/products/new/NewProductPage.d.ts +1 -1
  237. package/lib/pages/cms/products/new/NewProductPage.es.js +58 -74
  238. package/lib/pages/cms/products/product-price-sync.cjs.js +1 -1
  239. package/lib/pages/cms/products/product-price-sync.es.js +74 -89
  240. package/lib/pages/cms/products/server-actions.cjs.js +1 -1
  241. package/lib/pages/cms/products/server-actions.es.js +250 -233
  242. package/lib/pages/cms/shipping/ShippingPage.cjs.js +2 -2
  243. package/lib/pages/cms/shipping/ShippingPage.es.js +287 -209
  244. package/lib/pages/cms/shipping/components/RateForm.cjs.js +1 -1
  245. package/lib/pages/cms/shipping/components/RateForm.d.ts +1 -1
  246. package/lib/pages/cms/shipping/components/RateForm.es.js +439 -436
  247. package/lib/pages/cms/shipping/components/ZoneForm.cjs.js +1 -1
  248. package/lib/pages/cms/shipping/components/ZoneForm.es.js +245 -224
  249. package/lib/pages/cms/shipping/index.cjs.js +1 -0
  250. package/lib/pages/cms/shipping/index.es.js +3 -0
  251. package/lib/pages/cms/shipping/server-actions.cjs.js +1 -1
  252. package/lib/pages/cms/shipping/server-actions.es.js +131 -149
  253. package/lib/pages/cms/taxes/TaxesPage.cjs.js +1 -1
  254. package/lib/pages/cms/taxes/TaxesPage.d.ts +1 -1
  255. package/lib/pages/cms/taxes/TaxesPage.es.js +211 -169
  256. package/lib/pages/cms/taxes/actions.cjs.js +1 -1
  257. package/lib/pages/cms/taxes/actions.es.js +41 -53
  258. package/lib/pages/cms/taxes/components/TaxRateForm.cjs.js +1 -1
  259. package/lib/pages/cms/taxes/components/TaxRateForm.d.ts +1 -1
  260. package/lib/pages/cms/taxes/components/TaxRateForm.es.js +112 -99
  261. package/lib/pages/cms/taxes/index.cjs.js +1 -0
  262. package/lib/pages/cms/taxes/index.es.js +3 -0
  263. package/lib/payment-config.cjs.js +1 -1
  264. package/lib/payment-config.es.js +110 -126
  265. package/lib/product-actions.cjs.js +4 -4
  266. package/lib/product-actions.es.js +289 -544
  267. package/lib/product-context.cjs.js +1 -1
  268. package/lib/product-context.es.js +13 -15
  269. package/lib/product-schema.cjs.js +1 -1
  270. package/lib/product-schema.es.js +99 -134
  271. package/lib/providers/freemius.cjs.js +1 -5
  272. package/lib/providers/freemius.es.js +446 -530
  273. package/lib/providers/stripe.cjs.js +1 -1
  274. package/lib/providers/stripe.es.js +417 -477
  275. package/lib/server-actions/coupon-actions.cjs.js +1 -1
  276. package/lib/server-actions/coupon-actions.es.js +22 -22
  277. package/lib/server-actions/customer-actions.cjs.js +1 -1
  278. package/lib/server-actions/customer-actions.es.js +26 -28
  279. package/lib/server-actions/product-actions.cjs.js +1 -1
  280. package/lib/server-actions/product-actions.es.js +9 -15
  281. package/lib/server-actions/shipping-actions.cjs.js +1 -1
  282. package/lib/server-actions/shipping-actions.es.js +27 -24
  283. package/lib/server-actions/tax-actions.cjs.js +1 -1
  284. package/lib/server-actions/tax-actions.es.js +33 -39
  285. package/lib/shared-inventory.cjs.js +2 -2
  286. package/lib/shared-inventory.es.js +111 -160
  287. package/lib/shipping/resolver.cjs.js +2 -2
  288. package/lib/shipping/resolver.es.js +44 -61
  289. package/lib/shipping-rate-currency.cjs.js +1 -1
  290. package/lib/shipping-rate-currency.es.js +52 -67
  291. package/lib/states.cjs.js +1 -1
  292. package/lib/states.es.js +333 -154
  293. package/lib/stripe/checkout.cjs.js +1 -1
  294. package/lib/stripe/checkout.es.js +125 -181
  295. package/lib/stripe/client.cjs.js +1 -1
  296. package/lib/stripe/client.es.js +14 -19
  297. package/lib/stripe/order-sync.cjs.js +1 -1
  298. package/lib/stripe/order-sync.es.js +106 -126
  299. package/lib/stripe/webhooks.cjs.js +1 -1
  300. package/lib/stripe/webhooks.es.js +37 -31
  301. package/lib/tax-calculation.cjs.js +1 -1
  302. package/lib/tax-calculation.es.js +84 -98
  303. package/lib/trials.cjs.js +1 -1
  304. package/lib/trials.es.js +24 -30
  305. package/lib/types.cjs.js +1 -1
  306. package/lib/types.es.js +21 -27
  307. package/lib/use-cart.cjs.js +1 -1
  308. package/lib/use-cart.es.js +38 -40
  309. package/lib/use-price-formatter.cjs.js +1 -1
  310. package/lib/use-price-formatter.es.js +10 -11
  311. package/lib/variation-utils.cjs.js +1 -1
  312. package/lib/variation-utils.es.js +199 -261
  313. package/lib/zod-config.cjs.js +1 -1
  314. package/lib/zod-config.es.js +5 -6
  315. package/package.json +16 -16
  316. package/server.cjs.js +1 -1
  317. package/server.es.js +56 -211
@@ -1,149 +1,219 @@
1
- 'use client';
2
- import { jsx as t, jsxs as r, Fragment as x } from "react/jsx-runtime";
3
- import { Sheet as C, SheetContent as k, SheetHeader as j, SheetTitle as q, SheetDescription as S } from "@nextblock-cms/ui/sheet";
4
- import { Badge as F } from "@nextblock-cms/ui/badge";
5
- import { Button as d } from "@nextblock-cms/ui/button";
6
- import b from "next/link";
7
- import { useRef as D } from "react";
8
- import { Minus as P, Plus as R, Trash2 as A } from "lucide-react";
9
- import { useCartSubtotal as O, getCartItemActivePrice as Q } from "../cart-store.es.js";
10
- import { useCart as T } from "../use-cart.es.js";
11
- import { useTranslations as I } from "@nextblock-cms/utils";
12
- import { usePriceFormatter as $ } from "../use-price-formatter.es.js";
13
- import { isDigitalItem as g } from "../types.es.js";
14
- import { useCurrency as B } from "../CurrencyProvider.es.js";
15
- import { getTrialSummary as L } from "../trials.es.js";
16
- import { CouponForm as z } from "./CouponForm.es.js";
17
- const ne = () => {
18
- const u = $(), f = T((e) => e), v = O(), { t: n } = I(), h = D(null), l = (e, s, c) => {
19
- const a = n(e, c);
20
- return a === e ? s : a;
21
- }, { activeCurrencyCode: o, currencies: y } = B();
22
- if (!f) return null;
23
- const { isOpen: N, setIsOpen: m, items: i, updateQuantity: p, removeItem: w } = f, _ = (e) => i.reduce((s, c) => g(c) || c.sku !== e ? s : s + c.quantity, 0);
24
- return /* @__PURE__ */ t(C, { open: N, onOpenChange: m, children: /* @__PURE__ */ r(
25
- k,
26
- {
27
- className: "flex w-full flex-col pr-0 sm:max-w-lg",
28
- onOpenAutoFocus: () => {
29
- h.current = document.activeElement;
30
- },
31
- onCloseAutoFocus: (e) => {
32
- e.preventDefault(), h.current?.focus();
33
- },
34
- children: [
35
- /* @__PURE__ */ r(j, { className: "px-1 text-left", children: [
36
- /* @__PURE__ */ r(q, { children: [
37
- n("ecommerce.shopping_cart"),
38
- " (",
39
- i.length,
40
- ")"
41
- ] }),
42
- /* @__PURE__ */ t(S, { className: "sr-only", children: n("ecommerce.shopping_cart") })
43
- ] }),
44
- i.length > 0 ? /* @__PURE__ */ t("div", { className: "flex flex-1 flex-col gap-5 overflow-y-auto overscroll-contain p-1 pr-6 pt-4", children: i.map((e) => {
45
- const s = _(e.sku);
46
- return /* @__PURE__ */ t("div", { className: "flex gap-4", children: (() => {
47
- const c = Q(e, {
48
- currencyCode: o,
49
- currencies: y
50
- }), a = L(e, n);
51
- return /* @__PURE__ */ r(x, { children: [
52
- e.image_url ? /* @__PURE__ */ t("div", { className: "relative aspect-square h-20 w-20 min-w-fit overflow-hidden rounded border bg-neutral-100", children: /* @__PURE__ */ t(
53
- "img",
54
- {
55
- src: e.image_url,
56
- alt: "",
57
- width: 80,
58
- height: 80,
59
- loading: "lazy",
60
- decoding: "async",
61
- className: "h-full w-full object-cover"
62
- }
63
- ) }) : /* @__PURE__ */ t("div", { className: "flex h-20 w-20 items-center justify-center rounded bg-secondary", children: /* @__PURE__ */ t("span", { className: "text-xs text-muted-foreground", children: n("ecommerce.no_image") }) }),
64
- /* @__PURE__ */ r("div", { className: "flex min-w-0 flex-1 flex-col justify-between", children: [
65
- /* @__PURE__ */ r("div", { className: "flex justify-between gap-2", children: [
66
- /* @__PURE__ */ r("div", { className: "min-w-0", children: [
67
- /* @__PURE__ */ t("span", { className: "line-clamp-2 text-sm font-medium leading-tight", children: e.title }),
68
- e.variant_label && /* @__PURE__ */ t("div", { className: "mt-1 text-xs text-muted-foreground", children: e.variant_label }),
69
- a && /* @__PURE__ */ r("div", { className: "mt-1 text-xs font-medium text-emerald-700", children: [
70
- a.label,
71
- " - ",
72
- a.paymentRequirementLabel
73
- ] })
74
- ] }),
75
- /* @__PURE__ */ r("span", { className: "text-sm font-semibold tabular-nums", children: [
76
- c.sale_price && /* @__PURE__ */ r(x, { children: [
77
- /* @__PURE__ */ r("span", { className: "sr-only", children: [
78
- l("ecommerce.regular_price", "Regular price"),
79
- " "
80
- ] }),
81
- /* @__PURE__ */ t("s", { className: "mr-1.5 text-xs font-normal text-muted-foreground", children: u(c.price, o) }),
82
- /* @__PURE__ */ r("span", { className: "sr-only", children: [
83
- l("ecommerce.sale_price", "Sale price"),
84
- " "
85
- ] })
86
- ] }),
87
- u(c.sale_price ?? c.price, o)
88
- ] })
89
- ] }),
90
- /* @__PURE__ */ r("div", { className: "flex items-center justify-between text-sm", children: [
91
- g(e) ? /* @__PURE__ */ t(F, { variant: "secondary", className: "font-normal text-xs", children: l("ecommerce.license_count_one", "1 license", { count: 1 }) }) : /* @__PURE__ */ r("div", { role: "group", "aria-label": `${l("ecommerce.quantity", "Quantity")}: ${e.title}`, className: "flex items-center rounded-md border text-xs", children: [
92
- /* @__PURE__ */ t(
93
- "button",
94
- {
95
- onClick: () => p(e.id, e.quantity - 1),
96
- className: "flex h-7 w-7 items-center justify-center rounded-l-md border-r focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring",
97
- type: "button",
98
- "aria-label": l("ecommerce.decrease_quantity", "Decrease quantity"),
99
- children: /* @__PURE__ */ t(P, { className: "h-3 w-3" })
100
- }
101
- ),
102
- /* @__PURE__ */ t("span", { "aria-live": "polite", "aria-atomic": "true", className: "flex h-7 w-8 items-center justify-center tabular-nums", children: e.quantity }),
103
- /* @__PURE__ */ t(
104
- "button",
105
- {
106
- onClick: () => p(e.id, e.quantity + 1),
107
- className: "flex h-7 w-7 items-center justify-center rounded-r-md border-l focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring",
108
- type: "button",
109
- "aria-label": l("ecommerce.increase_quantity", "Increase quantity"),
110
- disabled: typeof e.stock == "number" && s >= e.stock,
111
- children: /* @__PURE__ */ t(R, { className: "h-3 w-3" })
112
- }
113
- )
114
- ] }),
115
- /* @__PURE__ */ t(
116
- "button",
117
- {
118
- onClick: () => w(e.id),
119
- className: "inline-flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:text-destructive focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring",
120
- type: "button",
121
- "aria-label": l("ecommerce.remove_item", `Remove ${e.title} from cart`, { item: e.title }),
122
- children: /* @__PURE__ */ t(A, { className: "h-4 w-4" })
123
- }
124
- )
125
- ] })
126
- ] })
127
- ] });
128
- })() }, e.id);
129
- }) }) : /* @__PURE__ */ r("div", { className: "flex h-full flex-col items-center justify-center space-y-2", children: [
130
- /* @__PURE__ */ t("span", { className: "text-muted-foreground", children: n("ecommerce.cart_empty") }),
131
- /* @__PURE__ */ t(d, { variant: "outline", onClick: () => m(!1), children: n("ecommerce.continue_shopping") })
132
- ] }),
133
- i.length > 0 && /* @__PURE__ */ r("div", { className: "border-t pr-6 pt-4", children: [
134
- /* @__PURE__ */ r("div", { className: "flex items-center justify-between text-base font-medium", children: [
135
- /* @__PURE__ */ t("span", { children: n("ecommerce.subtotal") }),
136
- /* @__PURE__ */ t("span", { children: u(v, o) })
137
- ] }),
138
- /* @__PURE__ */ t("p", { className: "mb-4 mt-1 text-xs text-muted-foreground", children: n("ecommerce.shipping_taxes_calculated") }),
139
- /* @__PURE__ */ t("div", { className: "mb-4", children: /* @__PURE__ */ t(z, { items: i, currencyCode: o, compact: !0 }) }),
140
- /* @__PURE__ */ t(d, { asChild: !0, variant: "outline", className: "w-full mb-3", children: /* @__PURE__ */ t(b, { href: "/cart", onClick: () => m(!1), children: n("ecommerce.view_full_cart") }) }),
141
- /* @__PURE__ */ t(d, { asChild: !0, className: "w-full", children: /* @__PURE__ */ t(b, { href: "/checkout", onClick: () => m(!1), children: n("ecommerce.ready_to_checkout") }) })
142
- ] })
143
- ]
144
- }
145
- ) });
146
- };
147
- export {
148
- ne as CartDrawer
1
+ "use client";
2
+ import { isDigitalItem as e } from "../types.es.js";
3
+ import { useCurrency as t } from "../CurrencyProvider.es.js";
4
+ import { getCartItemActivePrice as n, useCartSubtotal as r } from "../cart-store.es.js";
5
+ import { useCart as i } from "../use-cart.es.js";
6
+ import { usePriceFormatter as a } from "../use-price-formatter.es.js";
7
+ import { getTrialSummary as o } from "../trials.es.js";
8
+ import { CouponForm as s } from "./CouponForm.es.js";
9
+ import { Sheet as c, SheetContent as l, SheetDescription as u, SheetHeader as d, SheetTitle as f } from "@nextblock-cms/ui/sheet";
10
+ import { Badge as p } from "@nextblock-cms/ui/badge";
11
+ import { Button as m } from "@nextblock-cms/ui/button";
12
+ import h from "next/link";
13
+ import { useRef as g } from "react";
14
+ import { Minus as _, Plus as v, Trash2 as y } from "lucide-react";
15
+ import { useTranslations as b } from "@nextblock-cms/utils";
16
+ import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
17
+ //#region libs/ecommerce/src/lib/components/CartDrawer.tsx
18
+ var w = () => {
19
+ let w = a(), T = i((e) => e), E = r(), { t: D } = b(), O = g(null), k = (e, t, n) => {
20
+ let r = D(e, n);
21
+ return r === e ? t : r;
22
+ }, { activeCurrencyCode: A, currencies: j } = t();
23
+ if (!T) return null;
24
+ let { isOpen: M, setIsOpen: N, items: P, updateQuantity: F, removeItem: I } = T, L = (t) => P.reduce((n, r) => e(r) || r.sku !== t ? n : n + r.quantity, 0);
25
+ return /* @__PURE__ */ S(c, {
26
+ open: M,
27
+ onOpenChange: N,
28
+ children: /* @__PURE__ */ C(l, {
29
+ className: "flex w-full flex-col pr-0 sm:max-w-lg",
30
+ onOpenAutoFocus: () => {
31
+ O.current = document.activeElement;
32
+ },
33
+ onCloseAutoFocus: (e) => {
34
+ e.preventDefault(), O.current?.focus();
35
+ },
36
+ children: [
37
+ /* @__PURE__ */ C(d, {
38
+ className: "px-1 text-left",
39
+ children: [/* @__PURE__ */ C(f, { children: [
40
+ D("ecommerce.shopping_cart"),
41
+ " (",
42
+ P.length,
43
+ ")"
44
+ ] }), /* @__PURE__ */ S(u, {
45
+ className: "sr-only",
46
+ children: D("ecommerce.shopping_cart")
47
+ })]
48
+ }),
49
+ P.length > 0 ? /* @__PURE__ */ S("div", {
50
+ className: "flex flex-1 flex-col gap-5 overflow-y-auto overscroll-contain p-1 pr-6 pt-4",
51
+ children: P.map((t) => {
52
+ let r = L(t.sku);
53
+ return /* @__PURE__ */ S("div", {
54
+ className: "flex gap-4",
55
+ children: (() => {
56
+ let i = n(t, {
57
+ currencyCode: A,
58
+ currencies: j
59
+ }), a = o(t, D);
60
+ return /* @__PURE__ */ C(x, { children: [t.image_url ? /* @__PURE__ */ S("div", {
61
+ className: "relative aspect-square h-20 w-20 min-w-fit overflow-hidden rounded border bg-neutral-100",
62
+ children: /* @__PURE__ */ S("img", {
63
+ src: t.image_url,
64
+ alt: "",
65
+ width: 80,
66
+ height: 80,
67
+ loading: "lazy",
68
+ decoding: "async",
69
+ className: "h-full w-full object-cover"
70
+ })
71
+ }) : /* @__PURE__ */ S("div", {
72
+ className: "flex h-20 w-20 items-center justify-center rounded bg-secondary",
73
+ children: /* @__PURE__ */ S("span", {
74
+ className: "text-xs text-muted-foreground",
75
+ children: D("ecommerce.no_image")
76
+ })
77
+ }), /* @__PURE__ */ C("div", {
78
+ className: "flex min-w-0 flex-1 flex-col justify-between",
79
+ children: [/* @__PURE__ */ C("div", {
80
+ className: "flex justify-between gap-2",
81
+ children: [/* @__PURE__ */ C("div", {
82
+ className: "min-w-0",
83
+ children: [
84
+ /* @__PURE__ */ S("span", {
85
+ className: "line-clamp-2 text-sm font-medium leading-tight",
86
+ children: t.title
87
+ }),
88
+ t.variant_label && /* @__PURE__ */ S("div", {
89
+ className: "mt-1 text-xs text-muted-foreground",
90
+ children: t.variant_label
91
+ }),
92
+ a && /* @__PURE__ */ C("div", {
93
+ className: "mt-1 text-xs font-medium text-emerald-700",
94
+ children: [
95
+ a.label,
96
+ " - ",
97
+ a.paymentRequirementLabel
98
+ ]
99
+ })
100
+ ]
101
+ }), /* @__PURE__ */ C("span", {
102
+ className: "text-sm font-semibold tabular-nums",
103
+ children: [i.sale_price && /* @__PURE__ */ C(x, { children: [
104
+ /* @__PURE__ */ C("span", {
105
+ className: "sr-only",
106
+ children: [k("ecommerce.regular_price", "Regular price"), " "]
107
+ }),
108
+ /* @__PURE__ */ S("s", {
109
+ className: "mr-1.5 text-xs font-normal text-muted-foreground",
110
+ children: w(i.price, A)
111
+ }),
112
+ /* @__PURE__ */ C("span", {
113
+ className: "sr-only",
114
+ children: [k("ecommerce.sale_price", "Sale price"), " "]
115
+ })
116
+ ] }), w(i.sale_price ?? i.price, A)]
117
+ })]
118
+ }), /* @__PURE__ */ C("div", {
119
+ className: "flex items-center justify-between text-sm",
120
+ children: [e(t) ? /* @__PURE__ */ S(p, {
121
+ variant: "secondary",
122
+ className: "font-normal text-xs",
123
+ children: k("ecommerce.license_count_one", "1 license", { count: 1 })
124
+ }) : /* @__PURE__ */ C("div", {
125
+ role: "group",
126
+ "aria-label": `${k("ecommerce.quantity", "Quantity")}: ${t.title}`,
127
+ className: "flex items-center rounded-md border text-xs",
128
+ children: [
129
+ /* @__PURE__ */ S("button", {
130
+ onClick: () => F(t.id, t.quantity - 1),
131
+ className: "flex h-7 w-7 items-center justify-center rounded-l-md border-r focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring",
132
+ type: "button",
133
+ "aria-label": k("ecommerce.decrease_quantity", "Decrease quantity"),
134
+ children: /* @__PURE__ */ S(_, { className: "h-3 w-3" })
135
+ }),
136
+ /* @__PURE__ */ S("span", {
137
+ "aria-live": "polite",
138
+ "aria-atomic": "true",
139
+ className: "flex h-7 w-8 items-center justify-center tabular-nums",
140
+ children: t.quantity
141
+ }),
142
+ /* @__PURE__ */ S("button", {
143
+ onClick: () => F(t.id, t.quantity + 1),
144
+ className: "flex h-7 w-7 items-center justify-center rounded-r-md border-l focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring",
145
+ type: "button",
146
+ "aria-label": k("ecommerce.increase_quantity", "Increase quantity"),
147
+ disabled: typeof t.stock == "number" && r >= t.stock,
148
+ children: /* @__PURE__ */ S(v, { className: "h-3 w-3" })
149
+ })
150
+ ]
151
+ }), /* @__PURE__ */ S("button", {
152
+ onClick: () => I(t.id),
153
+ className: "inline-flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:text-destructive focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring",
154
+ type: "button",
155
+ "aria-label": k("ecommerce.remove_item", `Remove ${t.title} from cart`, { item: t.title }),
156
+ children: /* @__PURE__ */ S(y, { className: "h-4 w-4" })
157
+ })]
158
+ })]
159
+ })] });
160
+ })()
161
+ }, t.id);
162
+ })
163
+ }) : /* @__PURE__ */ C("div", {
164
+ className: "flex h-full flex-col items-center justify-center space-y-2",
165
+ children: [/* @__PURE__ */ S("span", {
166
+ className: "text-muted-foreground",
167
+ children: D("ecommerce.cart_empty")
168
+ }), /* @__PURE__ */ S(m, {
169
+ variant: "outline",
170
+ onClick: () => N(!1),
171
+ children: D("ecommerce.continue_shopping")
172
+ })]
173
+ }),
174
+ P.length > 0 && /* @__PURE__ */ C("div", {
175
+ className: "border-t pr-6 pt-4",
176
+ children: [
177
+ /* @__PURE__ */ C("div", {
178
+ className: "flex items-center justify-between text-base font-medium",
179
+ children: [/* @__PURE__ */ S("span", { children: D("ecommerce.subtotal") }), /* @__PURE__ */ S("span", { children: w(E, A) })]
180
+ }),
181
+ /* @__PURE__ */ S("p", {
182
+ className: "mb-4 mt-1 text-xs text-muted-foreground",
183
+ children: D("ecommerce.shipping_taxes_calculated")
184
+ }),
185
+ /* @__PURE__ */ S("div", {
186
+ className: "mb-4",
187
+ children: /* @__PURE__ */ S(s, {
188
+ items: P,
189
+ currencyCode: A,
190
+ compact: !0
191
+ })
192
+ }),
193
+ /* @__PURE__ */ S(m, {
194
+ asChild: !0,
195
+ variant: "outline",
196
+ className: "w-full mb-3",
197
+ children: /* @__PURE__ */ S(h, {
198
+ href: "/cart",
199
+ onClick: () => N(!1),
200
+ children: D("ecommerce.view_full_cart")
201
+ })
202
+ }),
203
+ /* @__PURE__ */ S(m, {
204
+ asChild: !0,
205
+ className: "w-full",
206
+ children: /* @__PURE__ */ S(h, {
207
+ href: "/checkout",
208
+ onClick: () => N(!1),
209
+ children: D("ecommerce.ready_to_checkout")
210
+ })
211
+ })
212
+ ]
213
+ })
214
+ ]
215
+ })
216
+ });
149
217
  };
218
+ //#endregion
219
+ export { w as CartDrawer };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),p=require("@nextblock-cms/ui/badge"),o=require("@nextblock-cms/ui/button"),n=require("lucide-react"),g=require("@nextblock-cms/utils"),c=require("../cart-store.cjs.js"),d=require("../use-cart.cjs.js"),m=()=>{const i=c.useCartStore(a=>a.toggleCart),t=c.useCartTotalItems(),l=d.useCart(a=>a.isOpen)!==void 0,{t:u}=g.useTranslations(),r=u("ecommerce.open_cart_count",{count:t}),s=r==="ecommerce.open_cart_count"?`Open cart (${t} items)`:r;return l?e.jsxs(o.Button,{variant:"ghost",size:"icon",className:"relative",onClick:i,"aria-label":s,"aria-haspopup":"dialog",children:[e.jsx(n.ShoppingBag,{className:"h-5 w-5"}),t>0&&e.jsx(p.Badge,{variant:"destructive",className:"absolute -right-1 -top-1 h-4 w-4 items-center justify-center p-0 text-[10px]",children:t})]}):e.jsx(o.Button,{variant:"ghost",size:"icon",className:"relative","aria-label":s,"aria-haspopup":"dialog",children:e.jsx(n.ShoppingBag,{className:"h-5 w-5"})})};exports.CartIcon=m;
1
+ "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../cart-store.cjs.js"),t=require("../use-cart.cjs.js");let n=require("@nextblock-cms/ui/badge"),r=require("@nextblock-cms/ui/button"),i=require("lucide-react"),a=require("@nextblock-cms/utils"),o=require("react/jsx-runtime");var s=()=>{let s=e.useCartStore(e=>e.toggleCart),c=e.useCartTotalItems(),l=t.useCart(e=>e.isOpen)!==void 0,{t:u}=(0,a.useTranslations)(),d=u(`ecommerce.open_cart_count`,{count:c}),f=d===`ecommerce.open_cart_count`?`Open cart (${c} items)`:d;return l?(0,o.jsxs)(r.Button,{variant:`ghost`,size:`icon`,className:`relative`,onClick:s,"aria-label":f,"aria-haspopup":`dialog`,children:[(0,o.jsx)(i.ShoppingBag,{className:`h-5 w-5`}),c>0&&(0,o.jsx)(n.Badge,{variant:`destructive`,className:`absolute -right-1 -top-1 h-4 w-4 items-center justify-center p-0 text-[10px]`,children:c})]}):(0,o.jsx)(r.Button,{variant:`ghost`,size:`icon`,className:`relative`,"aria-label":f,"aria-haspopup":`dialog`,children:(0,o.jsx)(i.ShoppingBag,{className:`h-5 w-5`})})};exports.CartIcon=s;
@@ -1 +1 @@
1
- export declare const CartIcon: () => import("react").JSX.Element;
1
+ export declare const CartIcon: () => import('react').JSX.Element;
@@ -1,36 +1,34 @@
1
- 'use client';
2
- import { jsx as a, jsxs as l } from "react/jsx-runtime";
3
- import { Badge as p } from "@nextblock-cms/ui/badge";
4
- import { Button as s } from "@nextblock-cms/ui/button";
5
- import { ShoppingBag as i } from "lucide-react";
6
- import { useTranslations as u } from "@nextblock-cms/utils";
7
- import { useCartStore as h, useCartTotalItems as g } from "../cart-store.es.js";
8
- import { useCart as d } from "../use-cart.es.js";
9
- const j = () => {
10
- const n = h((e) => e.toggleCart), t = g(), c = d((e) => e.isOpen) !== void 0, { t: m } = u(), o = m("ecommerce.open_cart_count", { count: t }), r = o === "ecommerce.open_cart_count" ? `Open cart (${t} items)` : o;
11
- return c ? /* @__PURE__ */ l(
12
- s,
13
- {
14
- variant: "ghost",
15
- size: "icon",
16
- className: "relative",
17
- onClick: n,
18
- "aria-label": r,
19
- "aria-haspopup": "dialog",
20
- children: [
21
- /* @__PURE__ */ a(i, { className: "h-5 w-5" }),
22
- t > 0 && /* @__PURE__ */ a(
23
- p,
24
- {
25
- variant: "destructive",
26
- className: "absolute -right-1 -top-1 h-4 w-4 items-center justify-center p-0 text-[10px]",
27
- children: t
28
- }
29
- )
30
- ]
31
- }
32
- ) : /* @__PURE__ */ a(s, { variant: "ghost", size: "icon", className: "relative", "aria-label": r, "aria-haspopup": "dialog", children: /* @__PURE__ */ a(i, { className: "h-5 w-5" }) });
33
- };
34
- export {
35
- j as CartIcon
1
+ "use client";
2
+ import { useCartStore as e, useCartTotalItems as t } from "../cart-store.es.js";
3
+ import { useCart as n } from "../use-cart.es.js";
4
+ import { Badge as r } from "@nextblock-cms/ui/badge";
5
+ import { Button as i } from "@nextblock-cms/ui/button";
6
+ import { ShoppingBag as a } from "lucide-react";
7
+ import { useTranslations as o } from "@nextblock-cms/utils";
8
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
9
+ //#region libs/ecommerce/src/lib/components/CartIcon.tsx
10
+ var l = () => {
11
+ let l = e((e) => e.toggleCart), u = t(), d = n((e) => e.isOpen) !== void 0, { t: f } = o(), p = f("ecommerce.open_cart_count", { count: u }), m = p === "ecommerce.open_cart_count" ? `Open cart (${u} items)` : p;
12
+ return d ? /* @__PURE__ */ c(i, {
13
+ variant: "ghost",
14
+ size: "icon",
15
+ className: "relative",
16
+ onClick: l,
17
+ "aria-label": m,
18
+ "aria-haspopup": "dialog",
19
+ children: [/* @__PURE__ */ s(a, { className: "h-5 w-5" }), u > 0 && /* @__PURE__ */ s(r, {
20
+ variant: "destructive",
21
+ className: "absolute -right-1 -top-1 h-4 w-4 items-center justify-center p-0 text-[10px]",
22
+ children: u
23
+ })]
24
+ }) : /* @__PURE__ */ s(i, {
25
+ variant: "ghost",
26
+ size: "icon",
27
+ className: "relative",
28
+ "aria-label": m,
29
+ "aria-haspopup": "dialog",
30
+ children: /* @__PURE__ */ s(a, { className: "h-5 w-5" })
31
+ });
36
32
  };
33
+ //#endregion
34
+ export { l as CartIcon };