@vtex/faststore 0.0.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 (538) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/LICENSE +21 -0
  3. package/README.md +95 -0
  4. package/dist/actions.json +334 -0
  5. package/dist/catalog.json +6615 -0
  6. package/dist/client.d.ts +17 -0
  7. package/dist/client.js +8 -0
  8. package/dist/components.d.ts +87 -0
  9. package/dist/components.js +87 -0
  10. package/dist/content-types.json +684 -0
  11. package/dist/core/dist/actions/mock-action.d.ts +24 -0
  12. package/dist/core/dist/actions/mock-action.js +28 -0
  13. package/dist/core/dist/actions/mock-action.js.map +1 -0
  14. package/dist/core/dist/actions/registry.d.ts +24 -0
  15. package/dist/core/dist/actions/registry.js +28 -0
  16. package/dist/core/dist/actions/registry.js.map +1 -0
  17. package/dist/core/dist/define-component.d.ts +100 -0
  18. package/dist/core/dist/define-component.js +8 -0
  19. package/dist/core/dist/define-component.js.map +1 -0
  20. package/dist/core/dist/define-content-type.d.ts +95 -0
  21. package/dist/core/dist/define-content-type.js +283 -0
  22. package/dist/core/dist/define-content-type.js.map +1 -0
  23. package/dist/core/dist/index.d.ts +7 -0
  24. package/dist/core/dist/index.js +5 -0
  25. package/dist/core/dist/schema/generated/schema.d.ts +28 -0
  26. package/dist/core/dist/types.d.ts +1 -0
  27. package/dist/docs/access-code-field.md +100 -0
  28. package/dist/docs/access-code-sign-in.md +174 -0
  29. package/dist/docs/account-entry-point.md +155 -0
  30. package/dist/docs/address-summary.md +50 -0
  31. package/dist/docs/buy-button.md +162 -0
  32. package/dist/docs/carousel.md +105 -0
  33. package/dist/docs/cart-item.md +162 -0
  34. package/dist/docs/cart-totalizer.md +197 -0
  35. package/dist/docs/cart.md +495 -0
  36. package/dist/docs/client-preferences.md +184 -0
  37. package/dist/docs/client-profile-form.md +192 -0
  38. package/dist/docs/client-profile.md +117 -0
  39. package/dist/docs/container.md +97 -0
  40. package/dist/docs/document-field.md +97 -0
  41. package/dist/docs/email-field.md +93 -0
  42. package/dist/docs/email-identification.md +102 -0
  43. package/dist/docs/footer-copyright.md +112 -0
  44. package/dist/docs/footer-link-group.md +162 -0
  45. package/dist/docs/footer-root.md +145 -0
  46. package/dist/docs/footer-social.md +151 -0
  47. package/dist/docs/free-shipping-progress.md +87 -0
  48. package/dist/docs/gallery.md +84 -0
  49. package/dist/docs/header-root.md +150 -0
  50. package/dist/docs/identity-edit.md +88 -0
  51. package/dist/docs/identity-summary.md +106 -0
  52. package/dist/docs/incentives.md +151 -0
  53. package/dist/docs/logo.md +135 -0
  54. package/dist/docs/meter.md +67 -0
  55. package/dist/docs/navigation-link-list.md +171 -0
  56. package/dist/docs/navigation-link.md +163 -0
  57. package/dist/docs/navigation-menu.md +264 -0
  58. package/dist/docs/payment-methods.md +139 -0
  59. package/dist/docs/phone-field.md +106 -0
  60. package/dist/docs/postal-code-field.md +126 -0
  61. package/dist/docs/pricing.md +499 -0
  62. package/dist/docs/product-gallery.md +409 -0
  63. package/dist/docs/product-information.md +295 -0
  64. package/dist/docs/product-list.md +170 -0
  65. package/dist/docs/product-quantity.md +88 -0
  66. package/dist/docs/product-shelf.md +141 -0
  67. package/dist/docs/promotion.md +109 -0
  68. package/dist/docs/region.md +225 -0
  69. package/dist/docs/session.md +123 -0
  70. package/dist/docs/shipping-address.md +390 -0
  71. package/dist/docs/shipping-simulator.md +147 -0
  72. package/dist/docs/sign-in-form.md +117 -0
  73. package/dist/docs/tabs.md +176 -0
  74. package/dist/docs/toast.md +124 -0
  75. package/dist/docs/variant-selector.md +450 -0
  76. package/dist/graphql/define-subgraph.d.ts +12 -0
  77. package/dist/graphql/define-subgraph.js +15 -0
  78. package/dist/graphql/define-subgraph.js.map +1 -0
  79. package/dist/graphql/gql.d.ts +10 -0
  80. package/dist/graphql/gql.js +16 -0
  81. package/dist/graphql/gql.js.map +1 -0
  82. package/dist/graphql/types.d.ts +88 -0
  83. package/dist/graphql.d.ts +4 -0
  84. package/dist/graphql.js +3 -0
  85. package/dist/index.d.ts +19 -0
  86. package/dist/index.js +5 -0
  87. package/dist/internal/client.d.ts +24 -0
  88. package/dist/internal/client.js +23 -0
  89. package/dist/internal/content.d.ts +2 -0
  90. package/dist/internal/content.js +2 -0
  91. package/dist/internal/server.d.ts +7 -0
  92. package/dist/internal/server.js +6 -0
  93. package/dist/matter/access-code-sign-in/access-code-sign-in.d.ts +111 -0
  94. package/dist/matter/access-code-sign-in/access-code-sign-in.js +387 -0
  95. package/dist/matter/access-code-sign-in/access-code-sign-in.js.map +1 -0
  96. package/dist/matter/account-entry-point/account-entry-point.d.ts +64 -0
  97. package/dist/matter/account-entry-point/account-entry-point.js +151 -0
  98. package/dist/matter/account-entry-point/account-entry-point.js.map +1 -0
  99. package/dist/matter/breadcrumb/breadcrumb.d.ts +40 -0
  100. package/dist/matter/breadcrumb/breadcrumb.js +155 -0
  101. package/dist/matter/breadcrumb/breadcrumb.js.map +1 -0
  102. package/dist/matter/buy-button/buy-button.d.ts +95 -0
  103. package/dist/matter/buy-button/buy-button.js +259 -0
  104. package/dist/matter/buy-button/buy-button.js.map +1 -0
  105. package/dist/matter/cart/cart-namespace.d.ts +48 -0
  106. package/dist/matter/cart/cart-namespace.js +50 -0
  107. package/dist/matter/cart/cart-namespace.js.map +1 -0
  108. package/dist/matter/cart/cart.d.ts +312 -0
  109. package/dist/matter/cart/cart.js +1034 -0
  110. package/dist/matter/cart/cart.js.map +1 -0
  111. package/dist/matter/cart-item/cart-item.d.ts +103 -0
  112. package/dist/matter/cart-item/cart-item.js +672 -0
  113. package/dist/matter/cart-item/cart-item.js.map +1 -0
  114. package/dist/matter/cart-item-compositions/cart-item-compositions.d.ts +49 -0
  115. package/dist/matter/cart-item-compositions/cart-item-compositions.js +165 -0
  116. package/dist/matter/cart-item-compositions/cart-item-compositions.js.map +1 -0
  117. package/dist/matter/cart-item-customizations/cart-item-customizations.d.ts +28 -0
  118. package/dist/matter/cart-item-customizations/cart-item-customizations.js +73 -0
  119. package/dist/matter/cart-item-customizations/cart-item-customizations.js.map +1 -0
  120. package/dist/matter/cart-item-discounts/cart-item-discounts.d.ts +33 -0
  121. package/dist/matter/cart-item-discounts/cart-item-discounts.js +70 -0
  122. package/dist/matter/cart-item-discounts/cart-item-discounts.js.map +1 -0
  123. package/dist/matter/cart-item-seller-info/cart-item-seller-info.d.ts +24 -0
  124. package/dist/matter/cart-item-seller-info/cart-item-seller-info.js +54 -0
  125. package/dist/matter/cart-item-seller-info/cart-item-seller-info.js.map +1 -0
  126. package/dist/matter/cart-item-variations/cart-item-variations.d.ts +27 -0
  127. package/dist/matter/cart-item-variations/cart-item-variations.js +69 -0
  128. package/dist/matter/cart-item-variations/cart-item-variations.js.map +1 -0
  129. package/dist/matter/cart-totalizer/cart-totalizer.d.ts +78 -0
  130. package/dist/matter/cart-totalizer/cart-totalizer.js +220 -0
  131. package/dist/matter/cart-totalizer/cart-totalizer.js.map +1 -0
  132. package/dist/matter/client-preferences/client-preferences.d.ts +50 -0
  133. package/dist/matter/client-preferences/client-preferences.js +206 -0
  134. package/dist/matter/client-preferences/client-preferences.js.map +1 -0
  135. package/dist/matter/client-profile/client-profile.d.ts +59 -0
  136. package/dist/matter/client-profile/client-profile.js +185 -0
  137. package/dist/matter/client-profile/client-profile.js.map +1 -0
  138. package/dist/matter/client-profile-form/client-profile-form.d.ts +126 -0
  139. package/dist/matter/client-profile-form/client-profile-form.js +660 -0
  140. package/dist/matter/client-profile-form/client-profile-form.js.map +1 -0
  141. package/dist/matter/delivery-options/delivery-options-accordion.d.ts +30 -0
  142. package/dist/matter/delivery-options/delivery-options-accordion.js +189 -0
  143. package/dist/matter/delivery-options/delivery-options-accordion.js.map +1 -0
  144. package/dist/matter/delivery-options/delivery-options-controller.d.ts +49 -0
  145. package/dist/matter/delivery-options/delivery-options-controller.js +203 -0
  146. package/dist/matter/delivery-options/delivery-options-controller.js.map +1 -0
  147. package/dist/matter/delivery-options/delivery-options.d.ts +31 -0
  148. package/dist/matter/delivery-options/delivery-options.js +103 -0
  149. package/dist/matter/delivery-options/delivery-options.js.map +1 -0
  150. package/dist/matter/delivery-options/use-delivery-option-selection.d.ts +9 -0
  151. package/dist/matter/delivery-options/use-delivery-option-selection.js +76 -0
  152. package/dist/matter/delivery-options/use-delivery-option-selection.js.map +1 -0
  153. package/dist/matter/email-identification/email-identification.d.ts +37 -0
  154. package/dist/matter/email-identification/email-identification.js +111 -0
  155. package/dist/matter/email-identification/email-identification.js.map +1 -0
  156. package/dist/matter/free-shipping-progress/free-shipping-progress.d.ts +44 -0
  157. package/dist/matter/free-shipping-progress/free-shipping-progress.js +170 -0
  158. package/dist/matter/free-shipping-progress/free-shipping-progress.js.map +1 -0
  159. package/dist/matter/identity-edit/identity-edit.d.ts +52 -0
  160. package/dist/matter/identity-edit/identity-edit.js +148 -0
  161. package/dist/matter/identity-edit/identity-edit.js.map +1 -0
  162. package/dist/matter/identity-summary/identity-summary.d.ts +128 -0
  163. package/dist/matter/identity-summary/identity-summary.js +344 -0
  164. package/dist/matter/identity-summary/identity-summary.js.map +1 -0
  165. package/dist/matter/pricing/pricing.d.ts +162 -0
  166. package/dist/matter/pricing/pricing.js +793 -0
  167. package/dist/matter/pricing/pricing.js.map +1 -0
  168. package/dist/matter/product-gallery/product-gallery.d.ts +23 -0
  169. package/dist/matter/product-gallery/product-gallery.js +188 -0
  170. package/dist/matter/product-gallery/product-gallery.js.map +1 -0
  171. package/dist/matter/product-information/product-information.d.ts +61 -0
  172. package/dist/matter/product-information/product-information.js +355 -0
  173. package/dist/matter/product-information/product-information.js.map +1 -0
  174. package/dist/matter/product-list/product-list.d.ts +86 -0
  175. package/dist/matter/product-list/product-list.js +342 -0
  176. package/dist/matter/product-list/product-list.js.map +1 -0
  177. package/dist/matter/product-quantity/product-quantity.d.ts +50 -0
  178. package/dist/matter/product-quantity/product-quantity.js +111 -0
  179. package/dist/matter/product-quantity/product-quantity.js.map +1 -0
  180. package/dist/matter/product-shelf/product-shelf.d.ts +125 -0
  181. package/dist/matter/product-shelf/product-shelf.js +376 -0
  182. package/dist/matter/product-shelf/product-shelf.js.map +1 -0
  183. package/dist/matter/region/region.d.ts +211 -0
  184. package/dist/matter/region/region.js +579 -0
  185. package/dist/matter/region/region.js.map +1 -0
  186. package/dist/matter/session/session.d.ts +58 -0
  187. package/dist/matter/session/session.js +112 -0
  188. package/dist/matter/session/session.js.map +1 -0
  189. package/dist/matter/shipping-address/country-descriptors.js +101 -0
  190. package/dist/matter/shipping-address/country-descriptors.js.map +1 -0
  191. package/dist/matter/shipping-address/shipping-address.d.ts +284 -0
  192. package/dist/matter/shipping-address/shipping-address.js +1036 -0
  193. package/dist/matter/shipping-address/shipping-address.js.map +1 -0
  194. package/dist/matter/shipping-simulator/shipping-simulator.d.ts +143 -0
  195. package/dist/matter/shipping-simulator/shipping-simulator.js +644 -0
  196. package/dist/matter/shipping-simulator/shipping-simulator.js.map +1 -0
  197. package/dist/matter/sign-in-form/sign-in-form.d.ts +79 -0
  198. package/dist/matter/sign-in-form/sign-in-form.js +226 -0
  199. package/dist/matter/sign-in-form/sign-in-form.js.map +1 -0
  200. package/dist/matter/variant-selector/variant-selector.d.ts +183 -0
  201. package/dist/matter/variant-selector/variant-selector.js +840 -0
  202. package/dist/matter/variant-selector/variant-selector.js.map +1 -0
  203. package/dist/message-locales.json +7 -0
  204. package/dist/particles/access-code-field/access-code-field.d.ts +33 -0
  205. package/dist/particles/access-code-field/access-code-field.js +95 -0
  206. package/dist/particles/access-code-field/access-code-field.js.map +1 -0
  207. package/dist/particles/accordion/accordion.d.ts +45 -0
  208. package/dist/particles/accordion/accordion.js +156 -0
  209. package/dist/particles/accordion/accordion.js.map +1 -0
  210. package/dist/particles/address-summary/address-summary.d.ts +50 -0
  211. package/dist/particles/address-summary/address-summary.js +129 -0
  212. package/dist/particles/address-summary/address-summary.js.map +1 -0
  213. package/dist/particles/badge/badge.d.ts +10 -0
  214. package/dist/particles/badge/badge.js +27 -0
  215. package/dist/particles/badge/badge.js.map +1 -0
  216. package/dist/particles/button/button.d.ts +18 -0
  217. package/dist/particles/button/button.js +37 -0
  218. package/dist/particles/button/button.js.map +1 -0
  219. package/dist/particles/carousel/carousel.d.ts +60 -0
  220. package/dist/particles/carousel/carousel.js +335 -0
  221. package/dist/particles/carousel/carousel.js.map +1 -0
  222. package/dist/particles/checkbox/checkbox.d.ts +40 -0
  223. package/dist/particles/checkbox/checkbox.js +82 -0
  224. package/dist/particles/checkbox/checkbox.js.map +1 -0
  225. package/dist/particles/container/container.d.ts +20 -0
  226. package/dist/particles/container/container.js +36 -0
  227. package/dist/particles/container/container.js.map +1 -0
  228. package/dist/particles/dialog/dialog.d.ts +54 -0
  229. package/dist/particles/dialog/dialog.js +192 -0
  230. package/dist/particles/dialog/dialog.js.map +1 -0
  231. package/dist/particles/document-field/document-field.d.ts +61 -0
  232. package/dist/particles/document-field/document-field.js +146 -0
  233. package/dist/particles/document-field/document-field.js.map +1 -0
  234. package/dist/particles/drawer/drawer.d.ts +52 -0
  235. package/dist/particles/drawer/drawer.js +183 -0
  236. package/dist/particles/drawer/drawer.js.map +1 -0
  237. package/dist/particles/email-field/email-field.d.ts +37 -0
  238. package/dist/particles/email-field/email-field.js +106 -0
  239. package/dist/particles/email-field/email-field.js.map +1 -0
  240. package/dist/particles/field/field.d.ts +50 -0
  241. package/dist/particles/field/field.js +133 -0
  242. package/dist/particles/field/field.js.map +1 -0
  243. package/dist/particles/fieldset/fieldset.d.ts +16 -0
  244. package/dist/particles/fieldset/fieldset.js +52 -0
  245. package/dist/particles/fieldset/fieldset.js.map +1 -0
  246. package/dist/particles/footer-copyright/footer-copyright.d.ts +32 -0
  247. package/dist/particles/footer-copyright/footer-copyright.js +50 -0
  248. package/dist/particles/footer-copyright/footer-copyright.js.map +1 -0
  249. package/dist/particles/footer-link-group/footer-link-group.d.ts +66 -0
  250. package/dist/particles/footer-link-group/footer-link-group.js +154 -0
  251. package/dist/particles/footer-link-group/footer-link-group.js.map +1 -0
  252. package/dist/particles/footer-root/footer-root.d.ts +21 -0
  253. package/dist/particles/footer-root/footer-root.js +38 -0
  254. package/dist/particles/footer-root/footer-root.js.map +1 -0
  255. package/dist/particles/footer-social/footer-social.d.ts +79 -0
  256. package/dist/particles/footer-social/footer-social.js +176 -0
  257. package/dist/particles/footer-social/footer-social.js.map +1 -0
  258. package/dist/particles/gallery/gallery.d.ts +181 -0
  259. package/dist/particles/gallery/gallery.js +920 -0
  260. package/dist/particles/gallery/gallery.js.map +1 -0
  261. package/dist/particles/header-root/header-root.d.ts +21 -0
  262. package/dist/particles/header-root/header-root.js +38 -0
  263. package/dist/particles/header-root/header-root.js.map +1 -0
  264. package/dist/particles/icon/icon.d.ts +22 -0
  265. package/dist/particles/icon/icon.js +48 -0
  266. package/dist/particles/icon/icon.js.map +1 -0
  267. package/dist/particles/image/image.d.ts +13 -0
  268. package/dist/particles/image/image.js +59 -0
  269. package/dist/particles/image/image.js.map +1 -0
  270. package/dist/particles/incentives/incentives.d.ts +85 -0
  271. package/dist/particles/incentives/incentives.js +200 -0
  272. package/dist/particles/incentives/incentives.js.map +1 -0
  273. package/dist/particles/input/input.d.ts +9 -0
  274. package/dist/particles/input/input.js +28 -0
  275. package/dist/particles/input/input.js.map +1 -0
  276. package/dist/particles/logo/logo.d.ts +55 -0
  277. package/dist/particles/logo/logo.js +96 -0
  278. package/dist/particles/logo/logo.js.map +1 -0
  279. package/dist/particles/menu/menu.d.ts +103 -0
  280. package/dist/particles/menu/menu.js +409 -0
  281. package/dist/particles/menu/menu.js.map +1 -0
  282. package/dist/particles/menubar/menubar.d.ts +18 -0
  283. package/dist/particles/menubar/menubar.js +42 -0
  284. package/dist/particles/menubar/menubar.js.map +1 -0
  285. package/dist/particles/meter/meter.d.ts +36 -0
  286. package/dist/particles/meter/meter.js +132 -0
  287. package/dist/particles/meter/meter.js.map +1 -0
  288. package/dist/particles/navigation-link/navigation-link.d.ts +43 -0
  289. package/dist/particles/navigation-link/navigation-link.js +82 -0
  290. package/dist/particles/navigation-link/navigation-link.js.map +1 -0
  291. package/dist/particles/navigation-link-list/navigation-link-list.d.ts +59 -0
  292. package/dist/particles/navigation-link-list/navigation-link-list.js +103 -0
  293. package/dist/particles/navigation-link-list/navigation-link-list.js.map +1 -0
  294. package/dist/particles/navigation-menu/navigation-menu.d.ts +78 -0
  295. package/dist/particles/navigation-menu/navigation-menu.js +295 -0
  296. package/dist/particles/navigation-menu/navigation-menu.js.map +1 -0
  297. package/dist/particles/number-field/number-field.d.ts +46 -0
  298. package/dist/particles/number-field/number-field.js +169 -0
  299. package/dist/particles/number-field/number-field.js.map +1 -0
  300. package/dist/particles/password-field/password-field.d.ts +31 -0
  301. package/dist/particles/password-field/password-field.js +109 -0
  302. package/dist/particles/password-field/password-field.js.map +1 -0
  303. package/dist/particles/payment-methods/payment-methods.d.ts +72 -0
  304. package/dist/particles/payment-methods/payment-methods.js +151 -0
  305. package/dist/particles/payment-methods/payment-methods.js.map +1 -0
  306. package/dist/particles/phone-field/phone-field.d.ts +67 -0
  307. package/dist/particles/phone-field/phone-field.js +250 -0
  308. package/dist/particles/phone-field/phone-field.js.map +1 -0
  309. package/dist/particles/popover/popover.d.ts +68 -0
  310. package/dist/particles/popover/popover.js +284 -0
  311. package/dist/particles/popover/popover.js.map +1 -0
  312. package/dist/particles/postal-code-field/postal-code-field.d.ts +75 -0
  313. package/dist/particles/postal-code-field/postal-code-field.js +169 -0
  314. package/dist/particles/postal-code-field/postal-code-field.js.map +1 -0
  315. package/dist/particles/promotion/promotion.d.ts +46 -0
  316. package/dist/particles/promotion/promotion.js +78 -0
  317. package/dist/particles/promotion/promotion.js.map +1 -0
  318. package/dist/particles/quantity-selector/quantity-selector.d.ts +30 -0
  319. package/dist/particles/quantity-selector/quantity-selector.js +116 -0
  320. package/dist/particles/quantity-selector/quantity-selector.js.map +1 -0
  321. package/dist/particles/radio/radio.d.ts +36 -0
  322. package/dist/particles/radio/radio.js +76 -0
  323. package/dist/particles/radio/radio.js.map +1 -0
  324. package/dist/particles/scroll-area/scroll-area.d.ts +36 -0
  325. package/dist/particles/scroll-area/scroll-area.js +145 -0
  326. package/dist/particles/scroll-area/scroll-area.js.map +1 -0
  327. package/dist/particles/select/select.d.ts +125 -0
  328. package/dist/particles/select/select.js +478 -0
  329. package/dist/particles/select/select.js.map +1 -0
  330. package/dist/particles/separator/separator.d.ts +12 -0
  331. package/dist/particles/separator/separator.js +33 -0
  332. package/dist/particles/separator/separator.js.map +1 -0
  333. package/dist/particles/shared/input-mask.d.ts +5 -0
  334. package/dist/particles/shared/input-mask.js +58 -0
  335. package/dist/particles/shared/input-mask.js.map +1 -0
  336. package/dist/particles/spinner/spinner.d.ts +13 -0
  337. package/dist/particles/spinner/spinner.js +31 -0
  338. package/dist/particles/spinner/spinner.js.map +1 -0
  339. package/dist/particles/switch/switch.d.ts +27 -0
  340. package/dist/particles/switch/switch.js +59 -0
  341. package/dist/particles/switch/switch.js.map +1 -0
  342. package/dist/particles/tabs/tabs.d.ts +45 -0
  343. package/dist/particles/tabs/tabs.js +164 -0
  344. package/dist/particles/tabs/tabs.js.map +1 -0
  345. package/dist/particles/text/text.d.ts +24 -0
  346. package/dist/particles/text/text.js +40 -0
  347. package/dist/particles/text/text.js.map +1 -0
  348. package/dist/particles/toast/toast.d.ts +83 -0
  349. package/dist/particles/toast/toast.js +194 -0
  350. package/dist/particles/toast/toast.js.map +1 -0
  351. package/dist/particles/toggle/toggle.d.ts +26 -0
  352. package/dist/particles/toggle/toggle.js +61 -0
  353. package/dist/particles/toggle/toggle.js.map +1 -0
  354. package/dist/particles/tooltip/tooltip.d.ts +61 -0
  355. package/dist/particles/tooltip/tooltip.js +240 -0
  356. package/dist/particles/tooltip/tooltip.js.map +1 -0
  357. package/dist/schema.graphql +2953 -0
  358. package/dist/sdk/actions/cart-action-provider.d.ts +19 -0
  359. package/dist/sdk/actions/cart-action-provider.js +23 -0
  360. package/dist/sdk/actions/cart-action-provider.js.map +1 -0
  361. package/dist/sdk/actions/identity-action-provider.d.ts +15 -0
  362. package/dist/sdk/actions/identity-action-provider.js +19 -0
  363. package/dist/sdk/actions/identity-action-provider.js.map +1 -0
  364. package/dist/sdk/actions/index.d.ts +7 -0
  365. package/dist/sdk/actions/index.js +6 -0
  366. package/dist/sdk/actions/inject-actions.d.ts +14 -0
  367. package/dist/sdk/actions/inject-actions.js +36 -0
  368. package/dist/sdk/actions/inject-actions.js.map +1 -0
  369. package/dist/sdk/actions/region-action-provider.d.ts +15 -0
  370. package/dist/sdk/actions/region-action-provider.js +19 -0
  371. package/dist/sdk/actions/region-action-provider.js.map +1 -0
  372. package/dist/sdk/actions/session-action-provider.d.ts +15 -0
  373. package/dist/sdk/actions/session-action-provider.js +19 -0
  374. package/dist/sdk/actions/session-action-provider.js.map +1 -0
  375. package/dist/sdk/actions/shipping-action-provider.d.ts +15 -0
  376. package/dist/sdk/actions/shipping-action-provider.js +19 -0
  377. package/dist/sdk/actions/shipping-action-provider.js.map +1 -0
  378. package/dist/sdk/actions/types.d.ts +21 -0
  379. package/dist/sdk/cache/storefront-cache.js +35 -0
  380. package/dist/sdk/cache/storefront-cache.js.map +1 -0
  381. package/dist/sdk/cart/operations.d.ts +31 -0
  382. package/dist/sdk/cart/operations.js +215 -0
  383. package/dist/sdk/cart/operations.js.map +1 -0
  384. package/dist/sdk/cart/optimistic.d.ts +24 -0
  385. package/dist/sdk/cart/optimistic.js +164 -0
  386. package/dist/sdk/cart/optimistic.js.map +1 -0
  387. package/dist/sdk/cart/use-cart-actions.d.ts +56 -0
  388. package/dist/sdk/cart/use-cart-actions.js +348 -0
  389. package/dist/sdk/cart/use-cart-actions.js.map +1 -0
  390. package/dist/sdk/cart/use-cart-validate-on-open.js +50 -0
  391. package/dist/sdk/cart/use-cart-validate-on-open.js.map +1 -0
  392. package/dist/sdk/cart/write-gate.js +54 -0
  393. package/dist/sdk/cart/write-gate.js.map +1 -0
  394. package/dist/sdk/client/assert-api-url.js +20 -0
  395. package/dist/sdk/client/assert-api-url.js.map +1 -0
  396. package/dist/sdk/client/create-client.d.ts +23 -0
  397. package/dist/sdk/client/create-client.js +46 -0
  398. package/dist/sdk/client/create-client.js.map +1 -0
  399. package/dist/sdk/client/fetch-page-data.d.ts +39 -0
  400. package/dist/sdk/client/fetch-page-data.js +33 -0
  401. package/dist/sdk/client/fetch-page-data.js.map +1 -0
  402. package/dist/sdk/client/register-preload-query.d.ts +24 -0
  403. package/dist/sdk/client/register-preload-query.js +33 -0
  404. package/dist/sdk/client/register-preload-query.js.map +1 -0
  405. package/dist/sdk/content/create-content-runtime.d.ts +68 -0
  406. package/dist/sdk/content/create-content-runtime.js +503 -0
  407. package/dist/sdk/content/create-content-runtime.js.map +1 -0
  408. package/dist/sdk/context/headers.d.ts +15 -0
  409. package/dist/sdk/context/headers.js +21 -0
  410. package/dist/sdk/context/headers.js.map +1 -0
  411. package/dist/sdk/context/storefront-context.d.ts +11 -0
  412. package/dist/sdk/context/storefront-context.js +29 -0
  413. package/dist/sdk/context/storefront-context.js.map +1 -0
  414. package/dist/sdk/data/data-override-context.d.ts +12 -0
  415. package/dist/sdk/data/data-override-context.js +19 -0
  416. package/dist/sdk/data/data-override-context.js.map +1 -0
  417. package/dist/sdk/data/entity-subscriber.js +28 -0
  418. package/dist/sdk/data/entity-subscriber.js.map +1 -0
  419. package/dist/sdk/data/hot-data-provider.d.ts +19 -0
  420. package/dist/sdk/data/hot-data-provider.js +33 -0
  421. package/dist/sdk/data/hot-data-provider.js.map +1 -0
  422. package/dist/sdk/data/index.d.ts +8 -0
  423. package/dist/sdk/data/index.js +8 -0
  424. package/dist/sdk/data/list-item-ref-context.d.ts +20 -0
  425. package/dist/sdk/data/list-item-ref-context.js +11 -0
  426. package/dist/sdk/data/list-item-ref-context.js.map +1 -0
  427. package/dist/sdk/data/multiple-reactive-data-provider.d.ts +32 -0
  428. package/dist/sdk/data/multiple-reactive-data-provider.js +20 -0
  429. package/dist/sdk/data/multiple-reactive-data-provider.js.map +1 -0
  430. package/dist/sdk/data/page-reactive-data-root.d.ts +53 -0
  431. package/dist/sdk/data/page-reactive-data-root.js +153 -0
  432. package/dist/sdk/data/page-reactive-data-root.js.map +1 -0
  433. package/dist/sdk/data/reactive-data-provider.d.ts +25 -0
  434. package/dist/sdk/data/reactive-data-provider.js +24 -0
  435. package/dist/sdk/data/reactive-data-provider.js.map +1 -0
  436. package/dist/sdk/data/reactive-list-item-data-provider.d.ts +26 -0
  437. package/dist/sdk/data/reactive-list-item-data-provider.js +42 -0
  438. package/dist/sdk/data/reactive-list-item-data-provider.js.map +1 -0
  439. package/dist/sdk/data/use-reactive-entity.js +40 -0
  440. package/dist/sdk/data/use-reactive-entity.js.map +1 -0
  441. package/dist/sdk/format/client.d.ts +12 -0
  442. package/dist/sdk/format/client.js +20 -0
  443. package/dist/sdk/format/client.js.map +1 -0
  444. package/dist/sdk/format/formatters.d.ts +32 -0
  445. package/dist/sdk/format/formatters.js +45 -0
  446. package/dist/sdk/format/formatters.js.map +1 -0
  447. package/dist/sdk/generated/fragment-types.js +23 -0
  448. package/dist/sdk/generated/fragment-types.js.map +1 -0
  449. package/dist/sdk/generated/gql.js +51 -0
  450. package/dist/sdk/generated/gql.js.map +1 -0
  451. package/dist/sdk/generated/graphql.d.ts +622 -0
  452. package/dist/sdk/generated/graphql.js +11917 -0
  453. package/dist/sdk/generated/graphql.js.map +1 -0
  454. package/dist/sdk/graphql-tag.d.ts +10 -0
  455. package/dist/sdk/graphql-tag.js +21 -0
  456. package/dist/sdk/graphql-tag.js.map +1 -0
  457. package/dist/sdk/i18n/client.d.ts +4 -0
  458. package/dist/sdk/i18n/client.js +4 -0
  459. package/dist/sdk/i18n/locales.d.ts +8 -0
  460. package/dist/sdk/i18n/locales.js +57 -0
  461. package/dist/sdk/i18n/locales.js.map +1 -0
  462. package/dist/sdk/i18n/messages/en-US.js +24 -0
  463. package/dist/sdk/i18n/messages/en-US.js.map +1 -0
  464. package/dist/sdk/i18n/messages/en-US.json +19 -0
  465. package/dist/sdk/i18n/messages/en-US.json.d.ts +23 -0
  466. package/dist/sdk/i18n/messages/es-ES.js +24 -0
  467. package/dist/sdk/i18n/messages/es-ES.js.map +1 -0
  468. package/dist/sdk/i18n/messages/es-ES.json +19 -0
  469. package/dist/sdk/i18n/messages/pt-BR.js +24 -0
  470. package/dist/sdk/i18n/messages/pt-BR.js.map +1 -0
  471. package/dist/sdk/i18n/messages/pt-BR.json +19 -0
  472. package/dist/sdk/i18n/provider.d.ts +1 -0
  473. package/dist/sdk/i18n/provider.js +30 -0
  474. package/dist/sdk/i18n/provider.js.map +1 -0
  475. package/dist/sdk/i18n/server.d.ts +28 -0
  476. package/dist/sdk/i18n/server.js +59 -0
  477. package/dist/sdk/i18n/server.js.map +1 -0
  478. package/dist/sdk/identity/operations.d.ts +34 -0
  479. package/dist/sdk/identity/operations.js +78 -0
  480. package/dist/sdk/identity/operations.js.map +1 -0
  481. package/dist/sdk/identity/use-identity-actions.d.ts +62 -0
  482. package/dist/sdk/identity/use-identity-actions.js +180 -0
  483. package/dist/sdk/identity/use-identity-actions.js.map +1 -0
  484. package/dist/sdk/provider/index.d.ts +2 -0
  485. package/dist/sdk/provider/index.js +2 -0
  486. package/dist/sdk/provider/storefront-provider.d.ts +32 -0
  487. package/dist/sdk/provider/storefront-provider.js +111 -0
  488. package/dist/sdk/provider/storefront-provider.js.map +1 -0
  489. package/dist/sdk/region/operations.d.ts +6 -0
  490. package/dist/sdk/region/region-operations.d.ts +30 -0
  491. package/dist/sdk/region/region-operations.js +23 -0
  492. package/dist/sdk/region/region-operations.js.map +1 -0
  493. package/dist/sdk/region/use-region-actions.d.ts +23 -0
  494. package/dist/sdk/region/use-region-actions.js +66 -0
  495. package/dist/sdk/region/use-region-actions.js.map +1 -0
  496. package/dist/sdk/seller.js +11 -0
  497. package/dist/sdk/seller.js.map +1 -0
  498. package/dist/sdk/session/auth-operations.d.ts +47 -0
  499. package/dist/sdk/session/auth-operations.js +79 -0
  500. package/dist/sdk/session/auth-operations.js.map +1 -0
  501. package/dist/sdk/session/operations.d.ts +6 -0
  502. package/dist/sdk/session/use-session-actions.d.ts +27 -0
  503. package/dist/sdk/session/use-session-actions.js +126 -0
  504. package/dist/sdk/session/use-session-actions.js.map +1 -0
  505. package/dist/sdk/shipping/cart-operations.d.ts +3 -0
  506. package/dist/sdk/shipping/cart-operations.js +33 -0
  507. package/dist/sdk/shipping/cart-operations.js.map +1 -0
  508. package/dist/sdk/shipping/operations.d.ts +3 -0
  509. package/dist/sdk/shipping/operations.js +33 -0
  510. package/dist/sdk/shipping/operations.js.map +1 -0
  511. package/dist/sdk/shipping/option-select-operations.d.ts +24 -0
  512. package/dist/sdk/shipping/option-select-operations.js +45 -0
  513. package/dist/sdk/shipping/option-select-operations.js.map +1 -0
  514. package/dist/sdk/shipping/request-timeout.js +41 -0
  515. package/dist/sdk/shipping/request-timeout.js.map +1 -0
  516. package/dist/sdk/shipping/shipping-operations.d.ts +38 -0
  517. package/dist/sdk/shipping/shipping-operations.js +77 -0
  518. package/dist/sdk/shipping/shipping-operations.js.map +1 -0
  519. package/dist/sdk/shipping/use-cart-shipping-simulation.d.ts +7 -0
  520. package/dist/sdk/shipping/use-cart-shipping-simulation.js +72 -0
  521. package/dist/sdk/shipping/use-cart-shipping-simulation.js.map +1 -0
  522. package/dist/sdk/shipping/use-shipping-actions.d.ts +27 -0
  523. package/dist/sdk/shipping/use-shipping-actions.js +113 -0
  524. package/dist/sdk/shipping/use-shipping-actions.js.map +1 -0
  525. package/dist/sdk/shipping/use-shipping-simulation.d.ts +7 -0
  526. package/dist/sdk/shipping/use-shipping-simulation.js +72 -0
  527. package/dist/sdk/shipping/use-shipping-simulation.js.map +1 -0
  528. package/dist/sdk/state/cart.d.ts +42 -0
  529. package/dist/sdk/state/cart.js +64 -0
  530. package/dist/sdk/state/cart.js.map +1 -0
  531. package/dist/sdk/state/index.js +3 -0
  532. package/dist/sdk/state/variant-selector.d.ts +17 -0
  533. package/dist/sdk/state/variant-selector.js +14 -0
  534. package/dist/sdk/state/variant-selector.js.map +1 -0
  535. package/dist/utils/safe-href.js +63 -0
  536. package/dist/utils/safe-href.js.map +1 -0
  537. package/package.json +84 -0
  538. package/src/styles/tailwind.css +32 -0
@@ -0,0 +1,171 @@
1
+ # NavigationLinkList
2
+
3
+ **Category:** navigation
4
+ **Purpose:** The navigation's whole link list as one CMS-editable collection — a merchant adds, removes and reorders links without a deployment. The list arrives through the compiler-injected `$content` prop, backed by the `navigation-link-list` content model declared next to the component; the `links` prop is the authored fallback for stores with no CMS binding. It owns its own `<ul>`, so one element renders the entire list and takes no children.
5
+
6
+ ---
7
+
8
+ ## Visual cues (how to identify in an image)
9
+
10
+ The image is the source of truth for layout. A NavigationLinkList is present when you see:
11
+
12
+ - A **horizontal row of plain text links** in a header band — *Ofertas*, *Novidades*, *Marcas*, *Atendimento* — with no thumbnails and no price.
13
+ - The **same set of links stacked vertically** inside a slide-in panel behind a hamburger button, on a narrow screen.
14
+ - Links that are **siblings of equal weight**, not a heading over a list — that distinguishes it from [[footer-link-group]].
15
+ - **No chevrons or dropdown arrows** on the items. A row whose items open panels on hover is `NavigationMenu` composing its flyout parts instead.
16
+
17
+ ---
18
+
19
+ ## When to use
20
+
21
+ - The header's main navigation, on both the desktop bar and the mobile drawer panel.
22
+ - Any list of navigation links whose *membership* a merchant must control from the CMS.
23
+ - One element for the whole list. Four links in the image is still one `NavigationLinkList`.
24
+
25
+ ## When NOT to use
26
+
27
+ - A **single** link — a logo link, an account link, one call to action → use `NavigationLink`.
28
+ - A **headed** list of institutional links in a footer → use [[footer-link-group]]; it carries the heading and the mobile accordion with it.
29
+ - A navigation whose items **open flyout panels** → compose `NavigationMenu` with `NavigationMenuTrigger` and `NavigationMenuContent`; this list has no panels.
30
+ - A row of **social or payment icons** → use [[footer-social]] or `PaymentMethods`; those carry glyphs, not text labels.
31
+ - A list whose links need **individually different styling or placement** → author one `NavigationLink` element each. Membership then costs a deployment, which is the trade.
32
+
33
+ ---
34
+
35
+ ## Composition
36
+
37
+ `NavigationLinkList` is a leaf in the schema — no sub-components, no children. The links are content, not child elements.
38
+
39
+ It renders one `<ul>` and nothing above it, which is what lets the same element serve both header surfaces:
40
+
41
+ ```
42
+ layout-header
43
+ ├─ nav-desktop (Container, $desktop-only)
44
+ │ └─ NavigationMenuRoot
45
+ │ └─ NavigationLinkList ← the shared element: nav > ul > li
46
+ └─ nav-mobile (Container, $mobile-only)
47
+ └─ DrawerRoot
48
+ ├─ DrawerTrigger
49
+ └─ DrawerPortal
50
+ └─ DrawerPopup
51
+ └─ NavigationLinkList ← the same element id: ul > li, no second landmark
52
+ ```
53
+
54
+ **Reference one element from both parents.** A layout is a flat map of id to element and `children` holds ids, so the same `NavigationLinkList` id belongs in the desktop subtree and in the drawer's. The element id is the CMS content key, so sharing gives **one entry, one edit, both surfaces**. Authoring two elements also compiles and is the mistake to avoid: it makes two entries a merchant must keep in sync for one list a shopper sees once.
55
+
56
+ **Do not wrap it in `NavigationMenuList`.** That part is Base UI's own `<ul>`, so nesting produces `<ul><ul>`. Compose this list directly under `NavigationMenuRoot`, which supplies the `nav` landmark. `NavigationMenuList` and `NavigationMenuItem` belong to the hand-authored form, where one `NavigationLink` element is composed per item.
57
+
58
+ **Content, then prop.** The list resolves from the CMS entry first and the `links` prop second. An entry supplying an empty list wins over an authored list — a merchant who cleared the links cleared them. The Admin form itself asks for at least one link (`minItems: 1`), so that empty list arrives from a host that authors the entry directly rather than from a save; nothing enforces the bound at read time. When no renderable link survives, the component renders `null`, leaving the surrounding `nav` landmark empty rather than throwing. Non-compiler hosts (Storybook, tests) pass a typed `$content` fixture directly.
59
+
60
+ **A malformed link costs the whole list.** Each link's `label` and `href` are required, so the content runtime omits this component — before any prop is consulted — when the entry holds a link missing either field. Worth knowing when the navigation disappears right after a CMS save. `links` itself is not required, so an entry that has not been filled in yet falls back to the authored list instead of omitting the navigation.
61
+
62
+ ---
63
+
64
+ ## Components
65
+
66
+ ### NavigationLinkList
67
+
68
+ | Prop | Type | Required | Notes |
69
+ |-------|------|----------|-------|
70
+ | `links` | array | no | Authored fallback list of `{ label, href, target? }`. Ignored when a CMS entry supplies `links` |
71
+
72
+ Content model (`navigation-link-list`) fields, edited in the CMS:
73
+
74
+ | Field | Type | Required | Notes |
75
+ |-------|------|----------|-------|
76
+ | `links` | array | no | Ordered links. Adding, removing or reordering here changes the navigation with no deployment. Optional so an unfilled entry falls back to the authored list |
77
+ | `links[].label` | string | yes | Link text. A blank label drops that link — an anchor with no name is unusable |
78
+ | `links[].href` | string | yes | Destination. `http:`, `https:`, `mailto:`, `tel:`, or a path starting with a single `/` |
79
+ | `links[].target` | `_self` \| `_blank` | no | `_blank` opens a new tab and adds `rel="noopener noreferrer"` automatically. Write an "(opens in new tab)" cue into the label — the component announces nothing on its own |
80
+
81
+ ---
82
+
83
+ ## Canonical schema example
84
+
85
+ One element, referenced from both surfaces:
86
+
87
+ ```json
88
+ {
89
+ "nav-desktop": { "type": "Container", "style": ["$desktop-only"], "children": ["nav-menu"] },
90
+ "nav-menu": {
91
+ "type": "NavigationMenuRoot",
92
+ "props": { "orientation": "horizontal" },
93
+ "children": ["nav-links"]
94
+ },
95
+ "nav-links": {
96
+ "type": "NavigationLinkList",
97
+ "props": {
98
+ "links": [
99
+ { "label": "Ofertas", "href": "/collection/ofertas" },
100
+ { "label": "Novidades", "href": "/collection/novidades" }
101
+ ]
102
+ },
103
+ "style": ["flex", "items-center", "gap-[24px]", "list-none", "m-0", "p-0"]
104
+ },
105
+ "nav-mobile": { "type": "Container", "style": ["$mobile-only"], "children": ["nav-drawer"] },
106
+ "nav-drawer": {
107
+ "type": "DrawerRoot",
108
+ "props": { "swipeDirection": "left", "modal": true },
109
+ "children": ["nav-trigger", "nav-portal"]
110
+ },
111
+ "nav-trigger": { "type": "DrawerTrigger", "props": { "children": "Menu" } },
112
+ "nav-portal": { "type": "DrawerPortal", "children": ["nav-popup"] },
113
+ "nav-popup": { "type": "DrawerPopup", "children": ["nav-links"] }
114
+ }
115
+ ```
116
+
117
+ `nav-links` appears in two `children` arrays and is defined once. The element id is the content key, so name it for the navigation rather than for either surface — renaming it orphans the merchant's entry.
118
+
119
+ ---
120
+
121
+ ## Common mistakes
122
+
123
+ - **One element per link.** This component is the whole list; the links are content, which is what makes adding one a CMS save instead of a deployment. Per-link elements are the other form, built from `NavigationLink`.
124
+ - **`NavigationLinks`, `NavigationList`, `NavLinkList`, `NavigationMenuLinks`.** The correct name is `NavigationLinkList`.
125
+ - **Nesting it in `NavigationMenuList`.** It brings its own `<ul>`; put it directly under `NavigationMenuRoot`.
126
+ - **Authoring it twice, once per surface.** Reference one element id from both `children` arrays instead, or the merchant edits two entries for one list.
127
+ - **Putting it in the drawer under a second `NavigationMenuRoot`.** That adds a second `nav` landmark. The drawer panel wants the bare list.
128
+ - **Looking for a `direction`, `orientation` or `isMobile` prop.** There is none: the row and the stack are the store's swatches on the same markup.
129
+ - **Giving it children.** It is a leaf and ignores them.
130
+ - **Passing `rel` yourself for a new-tab link.** `target: "_blank"` already adds `rel="noopener noreferrer"`.
131
+ - **Expecting a bare `#anchor`, a query-only `?q=1`, or a relative `ofertas` to link.** Only the four schemes and single-slash paths above become anchors; anything else keeps its label and renders as plain text.
132
+
133
+ ---
134
+
135
+ ## Styling
136
+
137
+ The component ships no list reset, so `list-none m-0 p-0` on the list hook is the store's to supply in both surfaces.
138
+
139
+ | Component | What you style | Plausible classes |
140
+ |---|---|---|
141
+ | `NavigationLinkList` | The `<ul>`: direction, gap and the list reset | `flex items-center gap-[24px] list-none m-0 p-0` |
142
+ | `data-fs-navigation-link-list-item` | The box one link occupies | `shrink-0` |
143
+ | `data-fs-navigation-link-list` `[data-fs-navigation-link]` | A link's typography | `text-[13px] font-medium uppercase no-underline hover:underline` |
144
+ | `data-fs-navigation-link-list-text` | A refused destination, rendered as text | `text-[13px] text-[#999999]` |
145
+
146
+ **The two surfaces style one element.** A shared element carries a single `style` array, so where the bar and the panel need different looks the *ancestor* reaches in with a descendant variant rather than the list carrying both:
147
+
148
+ ```json
149
+ "nav-popup": {
150
+ "type": "DrawerPopup",
151
+ "style": [
152
+ "[&_[data-fs-navigation-link-list]]:flex-col",
153
+ "[&_[data-fs-navigation-link-list]]:gap-[8px]",
154
+ "[&_[data-fs-navigation-link]]:block",
155
+ "[&_[data-fs-navigation-link]]:px-[20px]",
156
+ "[&_[data-fs-navigation-link]]:py-[12px]"
157
+ ],
158
+ "children": ["nav-links"]
159
+ }
160
+ ```
161
+
162
+ The list itself then authors the desktop look, and the drawer overrides the axis and spacing for its copy.
163
+
164
+ ---
165
+
166
+ ## Related
167
+
168
+ - `NavigationLink` — one link on its own, and the particle each item here renders. Use it directly when a link needs its own placement or styling.
169
+ - `NavigationMenu` — the hover/focus menu primitive. `NavigationMenuRoot` supplies the `nav` landmark this list sits in; its `List` and `Item` parts belong to the per-link form instead.
170
+ - [[footer-link-group]] — the footer's equivalent: same `$content` collection mechanics and the same link check, plus a heading and its own mobile accordion.
171
+ - `Drawer` — the panel primitive the mobile surface composes. It carries no `.md` of its own; read its schema from `catalog.json`.
@@ -0,0 +1,163 @@
1
+ # NavigationLink
2
+
3
+ **Category:** navigation
4
+ **Purpose:** Client-side navigation link built on Next.js Link. Renders a single `<a>` and moves the shopper between routes without a full-page reload. Carries no commerce data of its own.
5
+
6
+ ---
7
+
8
+ ## Visual cues (how to identify in an image)
9
+
10
+ `NavigationLink` is a leaf: one piece of clickable text pointing somewhere else. The image is the source of truth for layout.
11
+
12
+ Reach for it when the image shows:
13
+
14
+ - A **text label styled differently from the surrounding copy** — a different color, an underline, or a weight that marks it as clickable.
15
+ - A **row or column of such labels** acting as a menu: a header nav bar, a footer link column, a sidebar list of categories.
16
+ - A **standalone call to action that reads as navigation** rather than a button, such as "continue shopping" or "see all".
17
+ - A label followed by an **external-link glyph or an "(opens in new tab)" cue**, which signals `target: "_blank"`.
18
+
19
+ A label drawn as a filled or outlined rectangle is a button, not a link. Judge by how it is drawn, not by what it says.
20
+
21
+ ---
22
+
23
+ ## When to use
24
+
25
+ - Any route-to-route navigation inside the store: header menu items, footer links, category shortcuts, "continue shopping" on a cart page.
26
+ - Links to destinations outside the store, paired with `target: "_blank"`.
27
+
28
+ ## When NOT to use
29
+
30
+ - **Links inside a `NavigationMenu` flyout panel** — use `NavigationMenuLink`. It closes the open menu as it navigates, which this particle does not do; a `NavigationLink` inside `NavigationMenuContent` leaves the panel hanging open over the destination.
31
+ - **Breadcrumb trail items** — use `BreadcrumbLink`, which reads its label and URL from the breadcrumb data instead of from authored props.
32
+ - **Wrapping a brand logo** — use `Logo`, which already composes this particle around the image. Wrapping it in another link nests one anchor inside another, which is invalid HTML.
33
+ - **Anything that changes state** (add to cart, apply a coupon, submit a form) — a link navigates and never mutates. Use `Button` with the matching `$actions.*` call.
34
+ - **Closing a drawer or dialog** — use `DrawerClose` / `DialogClose`. Those dismiss an overlay; they do not navigate.
35
+ - **Switching panels inside the same page** — that is `TabsTab`. A link changes the route; a tab does not.
36
+
37
+ ---
38
+
39
+ ## Composition
40
+
41
+ `NavigationLink` is a leaf. It has no required parent, no children elements, and provides no context. The link text is authored as a **string `children` prop**, not as a child element.
42
+
43
+ ```text
44
+ Container
45
+ ├── NavigationLink ← label comes from props.children
46
+ ├── NavigationLink
47
+ └── NavigationLink
48
+ ```
49
+
50
+ Sibling links share the same `children` array on the parent, and their order reflects the visual order of the group.
51
+
52
+ ---
53
+
54
+ ## Components
55
+
56
+ ### NavigationLink
57
+
58
+ | Prop | Type | Default | Notes |
59
+ |------|------|---------|-------|
60
+ | `href` | `string` | — | Destination. An internal path (`/collection/sale`) keeps client-side navigation; an absolute URL (`https://…`) leaves the store. |
61
+ | `target` | `_self` \| `_blank` | `_self` | `_blank` opens the destination in a new tab. The component then adds `noopener` and `noreferrer` to the anchor's `rel` on its own. |
62
+ | `children` | `string` | — | The link text. This is also the link's accessible name, so it has to describe the destination on its own. |
63
+
64
+ `rel` is deliberately not authorable. The tab-nabbing defense is the component's responsibility, not the author's.
65
+
66
+ Content model (`navigation-link`) fields, edited in the CMS:
67
+
68
+ | Field | Type | Required | Notes |
69
+ |-------|------|----------|-------|
70
+ | `text` | string | yes | The link label |
71
+ | `href` | string | no | Cleared, absent, or outside the allowlist keeps the authored `href` |
72
+ | `target` | `_self` \| `_blank` | no | Absent keeps the authored `target` |
73
+
74
+ **Props and content both work.** The props stay the authoring surface, and a CMS entry overrides them field by field, so a merchant can retitle a link or repoint it without a deploy. A store with no CMS binding receives no `$content` and renders from the props alone. The safety `rel` follows the *resolved* target, so a `_blank` that arrives from the CMS is defended exactly like an authored one — but the "(opens in new tab)" cue lives in the label, which means a merchant who switches a link to `_blank` has to write that cue into `text` themselves.
75
+
76
+ The model constrains `href` as a `uri-reference` rather than a `uri`, which would reject the root-relative paths (`/collection/sale`) most navigation destinations are. That constraint and its pattern are author-time guidance for the Admin form; the pattern also admits an empty value, so clearing the field to fall back on the authored `href` stays valid.
77
+
78
+ **A destination from the CMS that is not a plain web address is refused.** Only `http:`, `https:`, `mailto:`, `tel:`, and single-slash site-relative paths reach the anchor; anything else — a `javascript:` URL, a protocol-relative `//host` — falls back to the authored `href` and logs the reason. No read-time validator enforces a URL pattern, so this is the only gate on the value the CMS supplied. The `href` prop is not gated: it comes from the store's own source, not from the Admin.
79
+
80
+ ---
81
+
82
+ ## Canonical schema example
83
+
84
+ A group of store links — three internal, one external opening in a new tab. `Container` here is the generic wrapper that groups the links inside the page's centered column; it is not a menu bar component, and the links are plain siblings in its `children` array:
85
+
86
+ ```json
87
+ {
88
+ "link-group": {
89
+ "type": "Container",
90
+ "children": ["nav-sale", "nav-new", "nav-brands", "nav-partner"]
91
+ },
92
+ "nav-sale": { "type": "NavigationLink", "props": { "href": "/collection/sale", "children": "Sale" } },
93
+ "nav-new": { "type": "NavigationLink", "props": { "href": "/collection/new-in", "children": "New in" } },
94
+ "nav-brands": { "type": "NavigationLink", "props": { "href": "/collection/brands", "children": "Brands" } },
95
+ "nav-partner": {
96
+ "type": "NavigationLink",
97
+ "props": {
98
+ "href": "https://partner.example/loyalty",
99
+ "target": "_blank",
100
+ "children": "Loyalty program (opens in new tab)"
101
+ }
102
+ }
103
+ }
104
+ ```
105
+
106
+ When you author `target: "_blank"`, write the "(opens in new tab)" cue into `children` as shown. The component adds no announcement of its own, so the link text is the only warning a shopper gets before the store disappears behind a new tab.
107
+
108
+ ---
109
+
110
+ ## Common mistakes
111
+
112
+ - **`Link`, `Anchor`, `NavLink`, or `MenuLink`.** The correct name is `NavigationLink`.
113
+ - **Confusing it with `NavigationMenuLink`.** The names are one word apart and the components are not interchangeable: `NavigationMenuLink` belongs inside `NavigationMenuContent` and dismisses the flyout on navigation, while `NavigationLink` is the standalone link used everywhere else.
114
+ - **Authoring a `rel` prop.** It is not part of the schema. For `target: "_blank"` the component already emits `noopener noreferrer`.
115
+ - **Authoring `$content` in the schema.** `$content` is compiler-injected from the page's or layout's content entry; naming it in `props` fails the build.
116
+ - **Authoring `target: "_blank"` with a bare label.** Add the "(opens in new tab)" cue to `children`; without it the change of context is silent.
117
+ - **Using `NavigationLink` for breadcrumb items.** The breadcrumb trail composes `BreadcrumbLink`, which is fed by breadcrumb data.
118
+ - **Wrapping the label in a `Text` child.** The label is a string prop: `"props": { "children": "Sale" }`, not a nested `Text` element.
119
+ - **Using a link to trigger a cart action.** Navigation is not a mutation.
120
+
121
+ ---
122
+
123
+ ## Styling
124
+
125
+ `NavigationLink` renders one `<a>`, so there is a single element to style: the label itself. Read the color, size, and weight off the image, and add the hover treatment the design implies.
126
+
127
+ | Component | What you style | Plausible classes |
128
+ |---|---|---|
129
+ | `NavigationLink` | The label — typography, color, and hover affordance | `text-[14px] leading-[1.4] font-medium text-[#1A1A1A] no-underline hover:underline` |
130
+
131
+ The spacing between links belongs to the parent that groups them, not to the link. Give that parent the `flex` and `gap-[*]` classes and keep each link to typography and color.
132
+
133
+ Styled example of a row of links:
134
+
135
+ ```json
136
+ {
137
+ "link-group": {
138
+ "type": "Container",
139
+ "children": ["nav-sale", "nav-new"],
140
+ "style": ["flex", "flex-row", "items-center", "gap-[24px]"]
141
+ },
142
+ "nav-sale": {
143
+ "type": "NavigationLink",
144
+ "props": { "href": "/collection/sale", "children": "Sale" },
145
+ "style": ["text-[14px]", "leading-[1.4]", "font-medium", "text-[#1A1A1A]", "no-underline", "hover:underline"]
146
+ },
147
+ "nav-new": {
148
+ "type": "NavigationLink",
149
+ "props": { "href": "/collection/new-in", "children": "New in" },
150
+ "style": ["text-[14px]", "leading-[1.4]", "font-medium", "text-[#1A1A1A]", "no-underline", "hover:underline"]
151
+ }
152
+ }
153
+ ```
154
+
155
+ ---
156
+
157
+ ## Related
158
+
159
+ - `NavigationMenuLink` — the anchor for links inside a `NavigationMenu` flyout; it dismisses the panel on navigation, which this particle does not.
160
+ - `BreadcrumbLink` — the trail variant, built on this particle but fed by breadcrumb data rather than authored props.
161
+ - [[logo]] — the brand mark that composes this particle internally; use it for the header logo instead of linking an image by hand.
162
+ - [[cart]] — `CartGoCheckout` is the checkout link built on this particle; on a cart page a plain `NavigationLink` is what sends the shopper back to browsing.
163
+ - [[tabs]] — switches panels within one page, where this particle changes the route.
@@ -0,0 +1,264 @@
1
+ # NavigationMenu
2
+
3
+ **Category:** layout
4
+ **Purpose:** Site navigation primitive. Wraps Base UI's NavigationMenu to give a `nav` landmark, list semantics, keyboard support, and optional animated flyout panels. Composes in two shapes: a **flat bar** of links, or a **flyout menu** with panels per entry.
5
+
6
+ ---
7
+
8
+ ## Visual cues (how to identify in an image)
9
+
10
+ A NavigationMenu is present when you see a **set of navigation labels grouped as a bar or column**, usually in the header, pointing at categories or institutional pages.
11
+
12
+ Which shape to compose depends on one thing only — **does an entry reveal a panel?**
13
+
14
+ - **Flat bar** — the labels are plain text with nothing attached. No chevrons, no dropdown shadow, no hint of a panel. This is the common storefront header: `Sale`, `New in`, `Brands`.
15
+ - **Flyout menu** — at least one label carries a **chevron / caret**, or the image shows an **open panel** below or beside a label holding sub-links, columns, or promotional tiles.
16
+
17
+ If the image shows no panel and no chevron, compose the flat bar. Adding the flyout parts "just in case" ships a menu that never opens.
18
+
19
+ ---
20
+
21
+ ## When to use
22
+
23
+ - The store's main navigation: a header bar of category links, with or without panels.
24
+ - A vertical navigation column that behaves as site navigation (set `orientation: "vertical"`).
25
+
26
+ ## When NOT to use
27
+
28
+ - **A single link on its own** — use `NavigationLink`. The landmark and list semantics only earn their keep for a group.
29
+ - **Switching panels inside one page** — that is [[tabs]]. Navigation changes the route; a tab does not.
30
+ - **The mobile menu panel** — use the `Drawer` particle with the same links inside. Desktop bar and mobile drawer are two compositions selected by a responsive class, not one component with a mode prop.
31
+ - **The breadcrumb trail** — use `BreadcrumbLink`, fed by breadcrumb data.
32
+ - **A menu of actions** (sort, filter, account actions) — those mutate or filter rather than navigate.
33
+
34
+ ---
35
+
36
+ ## Composition
37
+
38
+ `NavigationMenuRoot` renders the `<nav>` landmark. Everything else is optional depending on the shape.
39
+
40
+ **Flat bar** — three parts, nothing else:
41
+
42
+ ```text
43
+ NavigationMenuRoot
44
+ └── NavigationMenuList (the <ul>)
45
+ └── NavigationMenuItem (one <li> per entry)
46
+ └── NavigationLink (the anchor; client-side navigation)
47
+ ```
48
+
49
+ **Flyout menu** — the list gains a trigger and content per entry, and the Portal chain frames the panel:
50
+
51
+ ```text
52
+ NavigationMenuRoot
53
+ ├── NavigationMenuList
54
+ │ └── NavigationMenuItem (unique `value` per entry)
55
+ │ ├── NavigationMenuTrigger (the button that opens the panel)
56
+ │ │ └── NavigationMenuIcon (optional chevron; rotates via data-open)
57
+ │ └── NavigationMenuContent (the panel body — inside Item, not Portal)
58
+ │ └── NavigationMenuLink (anchors that dismiss the panel as they navigate)
59
+ └── NavigationMenuPortal (sibling of List, teleports to <body>)
60
+ └── NavigationMenuPositioner
61
+ └── NavigationMenuPopup
62
+ ├── NavigationMenuArrow (optional)
63
+ └── NavigationMenuViewport
64
+ ```
65
+
66
+ **Composition rules:**
67
+
68
+ - `NavigationMenuContent` goes inside `NavigationMenuItem`, alongside its `NavigationMenuTrigger`. The Portal does **not** hold the content; it renders the animated Popup that frames whichever content is active.
69
+ - All panels share one `NavigationMenuViewport`, which is what animates smoothly between entries.
70
+ - The Portal chain is only needed when at least one entry has content. The flat bar omits it entirely.
71
+ - Child order reflects visual order.
72
+
73
+ ---
74
+
75
+ ## Components
76
+
77
+ ### NavigationMenuRoot
78
+
79
+ Renders the `<nav>` landmark and manages hover/focus open state across entries.
80
+
81
+ | Prop | Type | Default | Notes |
82
+ |------|------|---------|-------|
83
+ | `orientation` | `'horizontal' \| 'vertical'` | `"horizontal"` | Arrow-key axis and layout direction |
84
+ | `delay` | number | `50` | Milliseconds before a hovered entry opens |
85
+ | `closeDelay` | number | `50` | Milliseconds before an unhovered panel closes |
86
+
87
+ **This part takes no `style`.** It accepts no `className` and emits no `data-fs-*` attribute, so there is no hook to attach a swatch to. Put the bar's layout classes on the `NavigationMenuList`. Responsive visibility belongs on a `Container` wrapping the whole root, never on the list: hiding the list leaves the `nav` landmark rendered and announced with nothing inside it.
88
+
89
+ ### NavigationMenuList
90
+
91
+ The `<ul>` holding every entry. Owns the bar's own layout — direction, gap, alignment.
92
+
93
+ No schema props. Styleable via `data-fs-navigation-menu-list`.
94
+
95
+ ### NavigationMenuItem
96
+
97
+ One `<li>` per entry.
98
+
99
+ | Prop | Type | Default | Notes |
100
+ |------|------|---------|-------|
101
+ | `value` | string | — | Keys the open panel. Optional: Base UI generates an id when it is omitted |
102
+
103
+ Author a `value` anyway. It keeps the emitted markup deterministic instead of carrying a generated id the schema does not control, and a flyout entry needs a stable key.
104
+
105
+ ### NavigationMenuTrigger
106
+
107
+ The `<button>` that opens an entry's panel. Only for the flyout shape — a flat bar has no trigger, because there is nothing to open.
108
+
109
+ ### NavigationMenuIcon
110
+
111
+ Decorative chevron inside a trigger. Rotates via `data-open`, so animate it with the `data-[open]` attribute selector.
112
+
113
+ ### NavigationMenuContent
114
+
115
+ An entry's panel body. Lives inside `NavigationMenuItem`; rendered into the Viewport through the Portal.
116
+
117
+ ### NavigationMenuLink
118
+
119
+ Anchor **for links inside a panel**. It dismisses the open panel as it navigates, which a plain link does not — a `NavigationLink` inside a panel leaves it hanging open over the destination.
120
+
121
+ It is a plain `<a>`, so it costs a full-page reload. In a flat bar, where there is no panel to dismiss, use `NavigationLink` instead for client-side navigation and its `target` support.
122
+
123
+ ### NavigationMenuPortal
124
+
125
+ Teleports the positioner to `<body>`. Wraps `NavigationMenuPositioner`. Takes only children.
126
+
127
+ ### NavigationMenuPositioner
128
+
129
+ Places the popup relative to the active entry.
130
+
131
+ | Prop | Type | Default | Notes |
132
+ |------|------|---------|-------|
133
+ | `side` | `'top' \| 'bottom' \| 'left' \| 'right'` | `"bottom"` | Which edge of the trigger the popup sits on |
134
+ | `align` | `'start' \| 'center' \| 'end'` | `"center"` | Alignment along that edge |
135
+ | `sideOffset` | number | `0` | Gap in pixels between trigger and popup |
136
+
137
+ ### NavigationMenuPopup
138
+
139
+ The animated container that frames the viewport. Where the panel's background, border, radius and shadow go.
140
+
141
+ ### NavigationMenuArrow
142
+
143
+ Optional pointer tying the popup to its trigger.
144
+
145
+ ### NavigationMenuViewport
146
+
147
+ Shared animation container inside the popup. Every entry's content renders through it, which is what makes moving between entries animate rather than cut.
148
+
149
+ ---
150
+
151
+ ## Canonical schema example
152
+
153
+ The storefront header's desktop bar — the flat shape. Note what is absent: no trigger, no content, no portal chain.
154
+
155
+ ```json
156
+ {
157
+ "nav-desktop": {
158
+ "type": "NavigationMenuRoot",
159
+ "children": ["nav-list"]
160
+ },
161
+ "nav-list": {
162
+ "type": "NavigationMenuList",
163
+ "style": ["flex", "flex-row", "items-center", "gap-[24px]", "list-none", "m-0", "p-0"],
164
+ "children": ["nav-item-sale", "nav-item-new"]
165
+ },
166
+ "nav-item-sale": { "type": "NavigationMenuItem", "props": { "value": "sale" }, "children": ["nav-link-sale"] },
167
+ "nav-item-new": { "type": "NavigationMenuItem", "props": { "value": "new-in" }, "children": ["nav-link-new"] },
168
+ "nav-link-sale": {
169
+ "type": "NavigationLink",
170
+ "props": { "href": "/collection/sale", "children": "Sale" },
171
+ "style": ["text-[14px]", "font-medium", "text-[#1A1A1A]", "no-underline", "hover:underline"]
172
+ },
173
+ "nav-link-new": {
174
+ "type": "NavigationLink",
175
+ "props": { "href": "/collection/new-in", "children": "New in" },
176
+ "style": ["text-[14px]", "font-medium", "text-[#1A1A1A]", "no-underline", "hover:underline"]
177
+ }
178
+ }
179
+ ```
180
+
181
+ ### Flyout variant (one entry with a panel)
182
+
183
+ ```json
184
+ {
185
+ "nav-root": { "type": "NavigationMenuRoot", "children": ["nav-list", "nav-portal"] },
186
+ "nav-list": {
187
+ "type": "NavigationMenuList",
188
+ "style": ["flex", "flex-row", "items-center", "gap-[24px]", "list-none", "m-0", "p-0"],
189
+ "children": ["nav-item-clothing"]
190
+ },
191
+ "nav-item-clothing": {
192
+ "type": "NavigationMenuItem",
193
+ "props": { "value": "clothing" },
194
+ "children": ["nav-trigger-clothing", "nav-content-clothing"]
195
+ },
196
+ "nav-trigger-clothing": {
197
+ "type": "NavigationMenuTrigger",
198
+ "props": { "children": "Clothing" },
199
+ "style": ["flex", "items-center", "gap-[4px]", "text-[14px]"],
200
+ "children": ["nav-icon-clothing"]
201
+ },
202
+ "nav-icon-clothing": { "type": "NavigationMenuIcon", "style": ["data-[open]:rotate-180"] },
203
+ "nav-content-clothing": {
204
+ "type": "NavigationMenuContent",
205
+ "style": ["grid", "grid-cols-2", "gap-[12px]", "p-[16px]", "w-[320px]"],
206
+ "children": ["nav-panel-shirts", "nav-panel-jeans"]
207
+ },
208
+ "nav-panel-shirts": {
209
+ "type": "NavigationMenuLink",
210
+ "props": { "href": "/collection/shirts", "children": "Shirts" },
211
+ "style": ["block", "text-[14px]"]
212
+ },
213
+ "nav-panel-jeans": {
214
+ "type": "NavigationMenuLink",
215
+ "props": { "href": "/collection/jeans", "children": "Jeans" },
216
+ "style": ["block", "text-[14px]"]
217
+ },
218
+ "nav-portal": { "type": "NavigationMenuPortal", "children": ["nav-positioner"] },
219
+ "nav-positioner": { "type": "NavigationMenuPositioner", "props": { "sideOffset": 8 }, "children": ["nav-popup"] },
220
+ "nav-popup": {
221
+ "type": "NavigationMenuPopup",
222
+ "style": ["bg-white", "border", "border-[#E5E5E5]", "rounded-[8px]", "shadow-lg", "overflow-hidden"],
223
+ "children": ["nav-viewport"]
224
+ },
225
+ "nav-viewport": { "type": "NavigationMenuViewport" }
226
+ }
227
+ ```
228
+
229
+ ---
230
+
231
+ ## Common mistakes
232
+
233
+ - **Styling `NavigationMenuRoot`.** It takes no `className` and emits no `data-fs-*` hook. Put the bar's layout on `NavigationMenuList`, and anything that has to style or hide the whole block on a wrapping `Container`.
234
+ - **Composing the flyout parts for a plain bar.** A `Trigger`, `Portal`, `Positioner`, `Popup` and `Viewport` with no `Content` build a menu that can never open. If the image shows no panel, stop at `Item > NavigationLink`.
235
+ - **Putting `NavigationMenuContent` inside the Portal.** Content belongs inside its `NavigationMenuItem`, next to the trigger. The Portal holds the Popup that frames it.
236
+ - **Using `NavigationLink` inside a panel.** Use `NavigationMenuLink` there; it dismisses the panel as it navigates. Conversely, using `NavigationMenuLink` in a flat bar costs a full-page reload for no benefit.
237
+ - **Duplicate `value` across items in one root.** Each entry needs its own; opening one would otherwise open both.
238
+ - **A `Viewport` per entry.** There is one shared viewport inside the popup. Per-entry viewports break the transition between entries.
239
+ - **Inventing `Navbar`, `NavMenu`, `NavigationBar` or `NavigationMenuListItem`.** The names are exactly `NavigationMenuRoot`, `NavigationMenuList`, `NavigationMenuItem`, and so on. There is no Navbar component — the bar *is* this composition.
240
+ - **Reaching for this particle to hold the mobile menu.** The mobile panel is a `Drawer`; both shapes wrap the same links.
241
+
242
+ ---
243
+
244
+ ## Styling
245
+
246
+ | Component | What you style | Plausible classes |
247
+ |---|---|---|
248
+ | `NavigationMenuList` | The bar itself — direction, gap, alignment, list reset | `flex flex-row items-center gap-[24px] list-none m-0 p-0` |
249
+ | `NavigationMenuItem` | Rarely styled; per-entry spacing if the gap is uneven | `shrink-0` |
250
+ | `NavigationMenuTrigger` | The label and its hit area | `flex items-center gap-[4px] px-[12px] py-[8px] text-[14px]` |
251
+ | `NavigationMenuIcon` | The chevron and its open-state rotation | `text-[10px] transition-transform data-[open]:rotate-180` |
252
+ | `NavigationMenuContent` | The panel's internal layout | `grid grid-cols-2 gap-[12px] p-[16px] w-[320px]` |
253
+ | `NavigationMenuPopup` | The panel's frame — background, border, radius, shadow | `bg-white border border-[#E5E5E5] rounded-[8px] shadow-lg` |
254
+
255
+ The link labels themselves are styled on the links, not here. `NavigationMenuRoot` has no styling surface at all.
256
+
257
+ ---
258
+
259
+ ## Related
260
+
261
+ - [[navigation-link]] — the anchor the flat bar composes; gives client-side navigation, `target` support, and a CMS-editable label.
262
+ - `Drawer` — the mobile counterpart. The header pairs a flat bar with a drawer holding the same links, switching between them by responsive class. It has no doc of its own yet; read its `catalog.json` guideline strings.
263
+ - [[tabs]] — switches panels within one page, where this particle changes the route.
264
+ - [[container]] — the generic wrapper used when the whole navigation block needs styling or responsive visibility, which the root cannot take.