@vtex/faststore 0.0.4 → 0.0.6

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 (306) hide show
  1. package/CHANGELOG.md +67 -0
  2. package/dist/actions.json +181 -0
  3. package/dist/catalog.json +1595 -481
  4. package/dist/client.d.ts +2 -1
  5. package/dist/client.js +2 -1
  6. package/dist/components.d.ts +31 -7
  7. package/dist/components.js +35 -13
  8. package/dist/content-types.json +73 -0
  9. package/dist/docs/access-code-sign-in.md +1 -1
  10. package/dist/docs/account-access-gate.md +153 -0
  11. package/dist/docs/account-entry-point.md +1 -2
  12. package/dist/docs/account-menu.md +164 -0
  13. package/dist/docs/address-summary.md +24 -3
  14. package/dist/docs/alert-dialog.md +204 -0
  15. package/dist/docs/billing-address.md +284 -0
  16. package/dist/docs/buy-button.md +1 -1
  17. package/dist/docs/card-entry.md +250 -0
  18. package/dist/docs/cardholder-document.md +142 -0
  19. package/dist/docs/cart.md +1 -1
  20. package/dist/docs/client-preferences-fieldset.md +148 -0
  21. package/dist/docs/client-preferences.md +2 -1
  22. package/dist/docs/client-profile-fieldset.md +184 -0
  23. package/dist/docs/client-profile.md +1 -1
  24. package/dist/docs/document-field.md +58 -4
  25. package/dist/docs/field.md +317 -0
  26. package/dist/docs/form.md +307 -0
  27. package/dist/docs/identity-edit.md +6 -6
  28. package/dist/docs/identity-summary.md +5 -5
  29. package/dist/docs/installments.md +248 -0
  30. package/dist/docs/my-account-profile.md +1 -0
  31. package/dist/docs/order-placed-payment-summary.md +138 -0
  32. package/dist/docs/payment-method-badges.md +232 -0
  33. package/dist/docs/payment-methods.md +1 -0
  34. package/dist/docs/payment.md +218 -0
  35. package/dist/docs/phone-field.md +58 -4
  36. package/dist/docs/place-order.md +157 -0
  37. package/dist/docs/save-card.md +186 -0
  38. package/dist/docs/saved-cards.md +218 -0
  39. package/dist/docs/select.md +465 -0
  40. package/dist/docs/session.md +1 -1
  41. package/dist/docs/shipping-address.md +110 -258
  42. package/dist/docs/sign-in-redirect.md +1 -1
  43. package/dist/index.d.ts +4 -1
  44. package/dist/internal/client.d.ts +3 -1
  45. package/dist/internal/client.js +3 -1
  46. package/dist/matter/access-code-sign-in/access-code-sign-in.js +9 -8
  47. package/dist/matter/access-code-sign-in/access-code-sign-in.js.map +1 -1
  48. package/dist/matter/account-access-gate/account-access-gate.d.ts +86 -0
  49. package/dist/matter/account-access-gate/account-access-gate.js +283 -0
  50. package/dist/matter/account-access-gate/account-access-gate.js.map +1 -0
  51. package/dist/matter/account-access-gate/sign-out-intent.d.ts +17 -0
  52. package/dist/matter/account-access-gate/sign-out-intent.js +62 -0
  53. package/dist/matter/account-access-gate/sign-out-intent.js.map +1 -0
  54. package/dist/matter/account-entry-point/account-entry-point.js +2 -2
  55. package/dist/matter/account-entry-point/account-entry-point.js.map +1 -1
  56. package/dist/matter/account-menu/account-menu.d.ts +88 -0
  57. package/dist/matter/account-menu/account-menu.js +246 -0
  58. package/dist/matter/account-menu/account-menu.js.map +1 -0
  59. package/dist/matter/billing-address/billing-address.d.ts +165 -0
  60. package/dist/matter/billing-address/billing-address.js +408 -0
  61. package/dist/matter/billing-address/billing-address.js.map +1 -0
  62. package/dist/matter/card-entry/card-capture.d.ts +25 -0
  63. package/dist/matter/card-entry/card-capture.js +25 -0
  64. package/dist/matter/card-entry/card-capture.js.map +1 -0
  65. package/dist/matter/card-entry/card-entry.d.ts +120 -0
  66. package/dist/matter/card-entry/card-entry.js +832 -0
  67. package/dist/matter/card-entry/card-entry.js.map +1 -0
  68. package/dist/matter/cardholder-document/cardholder-document.d.ts +45 -0
  69. package/dist/matter/cardholder-document/cardholder-document.js +70 -0
  70. package/dist/matter/cardholder-document/cardholder-document.js.map +1 -0
  71. package/dist/matter/cart/cart.d.ts +1 -1
  72. package/dist/matter/cart/cart.js +2 -2
  73. package/dist/matter/cart/cart.js.map +1 -1
  74. package/dist/matter/client-preferences/client-preferences-fieldset.d.ts +77 -0
  75. package/dist/matter/client-preferences/client-preferences-fieldset.js +299 -0
  76. package/dist/matter/client-preferences/client-preferences-fieldset.js.map +1 -0
  77. package/dist/matter/client-preferences/client-preferences.d.ts +3 -5
  78. package/dist/matter/client-preferences/client-preferences.js +6 -6
  79. package/dist/matter/client-preferences/client-preferences.js.map +1 -1
  80. package/dist/matter/client-profile/client-profile.d.ts +4 -6
  81. package/dist/matter/client-profile/client-profile.js +9 -6
  82. package/dist/matter/client-profile/client-profile.js.map +1 -1
  83. package/dist/matter/client-profile-form/client-profile-fieldset.d.ts +119 -0
  84. package/dist/matter/client-profile-form/client-profile-fieldset.js +488 -0
  85. package/dist/matter/client-profile-form/client-profile-fieldset.js.map +1 -0
  86. package/dist/matter/delivery-options/delivery-options.js.map +1 -1
  87. package/dist/matter/identity-edit/identity-edit.js +2 -2
  88. package/dist/matter/identity-edit/identity-edit.js.map +1 -1
  89. package/dist/matter/identity-summary/identity-summary.js +2 -2
  90. package/dist/matter/identity-summary/identity-summary.js.map +1 -1
  91. package/dist/matter/installments/installments-select.d.ts +42 -0
  92. package/dist/matter/installments/installments-select.js +167 -0
  93. package/dist/matter/installments/installments-select.js.map +1 -0
  94. package/dist/matter/installments/installments.d.ts +58 -0
  95. package/dist/matter/installments/installments.js +176 -0
  96. package/dist/matter/installments/installments.js.map +1 -0
  97. package/dist/matter/installments/use-installments-selection.d.ts +29 -0
  98. package/dist/matter/installments/use-installments-selection.js +95 -0
  99. package/dist/matter/installments/use-installments-selection.js.map +1 -0
  100. package/dist/matter/my-account-profile/my-account-profile.js +5 -5
  101. package/dist/matter/my-account-profile/my-account-profile.js.map +1 -1
  102. package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.d.ts +63 -0
  103. package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.js +305 -0
  104. package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.js.map +1 -0
  105. package/dist/matter/payment/payment-card-capture.d.ts +19 -0
  106. package/dist/matter/payment/payment-card-capture.js +129 -0
  107. package/dist/matter/payment/payment-card-capture.js.map +1 -0
  108. package/dist/matter/payment/payment-controller.d.ts +24 -0
  109. package/dist/matter/payment/payment-controller.js +107 -0
  110. package/dist/matter/payment/payment-controller.js.map +1 -0
  111. package/dist/matter/payment/payment-method-badges.d.ts +57 -0
  112. package/dist/matter/payment/payment-method-badges.js +192 -0
  113. package/dist/matter/payment/payment-method-badges.js.map +1 -0
  114. package/dist/matter/payment/payment.d.ts +89 -0
  115. package/dist/matter/payment/payment.js +263 -0
  116. package/dist/matter/payment/payment.js.map +1 -0
  117. package/dist/matter/payment/use-payment-method-selection.d.ts +302 -0
  118. package/dist/matter/payment/use-payment-method-selection.js +458 -0
  119. package/dist/matter/payment/use-payment-method-selection.js.map +1 -0
  120. package/dist/matter/payment/use-payment-submit-gate.d.ts +111 -0
  121. package/dist/matter/payment/use-payment-submit-gate.js +144 -0
  122. package/dist/matter/payment/use-payment-submit-gate.js.map +1 -0
  123. package/dist/matter/place-order/place-order.d.ts +74 -0
  124. package/dist/matter/place-order/place-order.js +379 -0
  125. package/dist/matter/place-order/place-order.js.map +1 -0
  126. package/dist/matter/product-list/product-list.d.ts +1 -0
  127. package/dist/matter/product-list/product-list.js.map +1 -1
  128. package/dist/matter/product-shelf/product-shelf.d.ts +1 -0
  129. package/dist/matter/product-shelf/product-shelf.js +2 -0
  130. package/dist/matter/product-shelf/product-shelf.js.map +1 -1
  131. package/dist/matter/region/region.js +1 -1
  132. package/dist/matter/region/region.js.map +1 -1
  133. package/dist/matter/save-card/save-card.d.ts +49 -0
  134. package/dist/matter/save-card/save-card.js +188 -0
  135. package/dist/matter/save-card/save-card.js.map +1 -0
  136. package/dist/matter/saved-cards/saved-cards.d.ts +79 -0
  137. package/dist/matter/saved-cards/saved-cards.js +387 -0
  138. package/dist/matter/saved-cards/saved-cards.js.map +1 -0
  139. package/dist/matter/shipping-address/country-descriptors.js +20 -10
  140. package/dist/matter/shipping-address/country-descriptors.js.map +1 -1
  141. package/dist/matter/shipping-address/shipping-address.d.ts +113 -174
  142. package/dist/matter/shipping-address/shipping-address.js +481 -792
  143. package/dist/matter/shipping-address/shipping-address.js.map +1 -1
  144. package/dist/matter/shipping-simulator/shipping-simulator.js.map +1 -1
  145. package/dist/matter/variant-selector/variant-selector.js +1 -1
  146. package/dist/particles/address-summary/address-summary.d.ts +24 -0
  147. package/dist/particles/address-summary/address-summary.js +83 -2
  148. package/dist/particles/address-summary/address-summary.js.map +1 -1
  149. package/dist/particles/alert-dialog/alert-dialog.d.ts +68 -0
  150. package/dist/particles/alert-dialog/alert-dialog.js +187 -0
  151. package/dist/particles/alert-dialog/alert-dialog.js.map +1 -0
  152. package/dist/particles/checkbox/checkbox.d.ts +7 -3
  153. package/dist/particles/checkbox/checkbox.js +4 -1
  154. package/dist/particles/checkbox/checkbox.js.map +1 -1
  155. package/dist/particles/document-field/document-field.d.ts +48 -5
  156. package/dist/particles/document-field/document-field.js +189 -32
  157. package/dist/particles/document-field/document-field.js.map +1 -1
  158. package/dist/particles/field/bound-field-registry.js +52 -0
  159. package/dist/particles/field/bound-field-registry.js.map +1 -0
  160. package/dist/particles/field/field.d.ts +116 -0
  161. package/dist/particles/field/field.js +497 -6
  162. package/dist/particles/field/field.js.map +1 -1
  163. package/dist/particles/fieldset/fieldset.js +2 -2
  164. package/dist/particles/fieldset/fieldset.js.map +1 -1
  165. package/dist/particles/footer-social/footer-social.js +1 -1
  166. package/dist/particles/form/form.d.ts +104 -0
  167. package/dist/particles/form/form.js +485 -0
  168. package/dist/particles/form/form.js.map +1 -0
  169. package/dist/particles/incentives/incentives.js +1 -1
  170. package/dist/particles/phone-field/phone-field.d.ts +38 -10
  171. package/dist/particles/phone-field/phone-field.js +183 -39
  172. package/dist/particles/phone-field/phone-field.js.map +1 -1
  173. package/dist/particles/postal-code-field/postal-code-field.js +2 -2
  174. package/dist/particles/postal-code-field/postal-code-field.js.map +1 -1
  175. package/dist/particles/select/field-select.d.ts +43 -0
  176. package/dist/particles/select/field-select.js +150 -0
  177. package/dist/particles/select/field-select.js.map +1 -0
  178. package/dist/particles/select/select.d.ts +2 -0
  179. package/dist/particles/select/select.js.map +1 -1
  180. package/dist/particles/shared/compose-refs.js +21 -0
  181. package/dist/particles/shared/compose-refs.js.map +1 -0
  182. package/dist/schema.graphql +701 -2
  183. package/dist/sdk/actions/analytics-action-provider.d.ts +15 -0
  184. package/dist/sdk/actions/analytics-action-provider.js +19 -0
  185. package/dist/sdk/actions/analytics-action-provider.js.map +1 -0
  186. package/dist/sdk/actions/cart-action-provider.d.ts +1 -1
  187. package/dist/sdk/actions/cart-action-provider.js +1 -1
  188. package/dist/sdk/actions/cart-action-provider.js.map +1 -1
  189. package/dist/sdk/actions/index.d.ts +3 -1
  190. package/dist/sdk/actions/index.js +3 -1
  191. package/dist/sdk/actions/payment-action-provider.d.ts +22 -0
  192. package/dist/sdk/actions/payment-action-provider.js +26 -0
  193. package/dist/sdk/actions/payment-action-provider.js.map +1 -0
  194. package/dist/sdk/actions/session-action-provider.d.ts +1 -1
  195. package/dist/sdk/actions/session-action-provider.js +1 -1
  196. package/dist/sdk/actions/session-action-provider.js.map +1 -1
  197. package/dist/sdk/actions/shipping-action-provider.d.ts +1 -1
  198. package/dist/sdk/actions/shipping-action-provider.js +1 -1
  199. package/dist/sdk/actions/shipping-action-provider.js.map +1 -1
  200. package/dist/sdk/actions/types.d.ts +6 -2
  201. package/dist/sdk/analytics/analytics-destination.d.ts +43 -0
  202. package/dist/sdk/analytics/analytics-destination.js +90 -0
  203. package/dist/sdk/analytics/analytics-destination.js.map +1 -0
  204. package/dist/sdk/analytics/use-analytics-actions.d.ts +57 -0
  205. package/dist/sdk/analytics/use-analytics-actions.js +108 -0
  206. package/dist/sdk/analytics/use-analytics-actions.js.map +1 -0
  207. package/dist/sdk/cache/storefront-cache.js +1 -1
  208. package/dist/sdk/cache/storefront-cache.js.map +1 -1
  209. package/dist/sdk/cart/operations.d.ts +4 -4
  210. package/dist/sdk/cart/operations.js +1 -1
  211. package/dist/sdk/cart/operations.js.map +1 -1
  212. package/dist/sdk/cart/optimistic.js +1 -1
  213. package/dist/sdk/cart/optimistic.js.map +1 -1
  214. package/dist/sdk/cart/use-cart-actions.d.ts +1 -1
  215. package/dist/sdk/cart/use-cart-actions.js +4 -4
  216. package/dist/sdk/cart/use-cart-actions.js.map +1 -1
  217. package/dist/sdk/cart/use-cart-validate-on-open.js +1 -1
  218. package/dist/sdk/cart/use-cart-validate-on-open.js.map +1 -1
  219. package/dist/sdk/cart/write-gate.js +1 -1
  220. package/dist/sdk/cart/write-gate.js.map +1 -1
  221. package/dist/sdk/data/entity-resolution-context.js +31 -0
  222. package/dist/sdk/data/entity-resolution-context.js.map +1 -0
  223. package/dist/sdk/data/entity-subscriber.js +18 -8
  224. package/dist/sdk/data/entity-subscriber.js.map +1 -1
  225. package/dist/sdk/data/index.js +1 -0
  226. package/dist/sdk/data/page-reactive-data-root.d.ts +38 -2
  227. package/dist/sdk/data/page-reactive-data-root.js +4 -2
  228. package/dist/sdk/data/page-reactive-data-root.js.map +1 -1
  229. package/dist/sdk/data/reactive-data-provider.d.ts +1 -1
  230. package/dist/sdk/data/reactive-data-provider.js +8 -4
  231. package/dist/sdk/data/reactive-data-provider.js.map +1 -1
  232. package/dist/sdk/data/reactive-list-item-data-provider.d.ts +1 -1
  233. package/dist/sdk/data/reactive-list-item-data-provider.js +13 -5
  234. package/dist/sdk/data/reactive-list-item-data-provider.js.map +1 -1
  235. package/dist/sdk/data/use-reactive-data-settled.js +39 -0
  236. package/dist/sdk/data/use-reactive-data-settled.js.map +1 -0
  237. package/dist/sdk/data/use-reactive-entity.js +6 -2
  238. package/dist/sdk/data/use-reactive-entity.js.map +1 -1
  239. package/dist/sdk/generated/fragment-types.js +2 -0
  240. package/dist/sdk/generated/fragment-types.js.map +1 -1
  241. package/dist/sdk/generated/gql.js +2 -1
  242. package/dist/sdk/generated/gql.js.map +1 -1
  243. package/dist/sdk/generated/graphql.js +85 -1
  244. package/dist/sdk/generated/graphql.js.map +1 -1
  245. package/dist/sdk/i18n/messages/en-US.js +3 -0
  246. package/dist/sdk/i18n/messages/en-US.json +3 -0
  247. package/dist/sdk/i18n/messages/en-US.json.d.ts +3 -0
  248. package/dist/sdk/i18n/messages/es-ES.js +3 -0
  249. package/dist/sdk/i18n/messages/es-ES.json +3 -0
  250. package/dist/sdk/i18n/messages/pt-BR.js +3 -0
  251. package/dist/sdk/i18n/messages/pt-BR.json +3 -0
  252. package/dist/sdk/identity/operations.js.map +1 -1
  253. package/dist/sdk/identity/use-identity-actions.d.ts +1 -1
  254. package/dist/sdk/identity/use-identity-actions.js +3 -2
  255. package/dist/sdk/identity/use-identity-actions.js.map +1 -1
  256. package/dist/sdk/payment/gateway-origin.js +35 -0
  257. package/dist/sdk/payment/gateway-origin.js.map +1 -0
  258. package/dist/sdk/payment/gateway.d.ts +85 -0
  259. package/dist/sdk/payment/gateway.js +183 -0
  260. package/dist/sdk/payment/gateway.js.map +1 -0
  261. package/dist/sdk/payment/operations.d.ts +52 -0
  262. package/dist/sdk/payment/operations.js +223 -0
  263. package/dist/sdk/payment/operations.js.map +1 -0
  264. package/dist/sdk/payment/security-code-mask.js +71 -0
  265. package/dist/sdk/payment/security-code-mask.js.map +1 -0
  266. package/dist/sdk/payment/submission-registry.d.ts +33 -0
  267. package/dist/sdk/payment/submission-registry.js +58 -0
  268. package/dist/sdk/payment/submission-registry.js.map +1 -0
  269. package/dist/sdk/payment/use-payment-actions.d.ts +78 -0
  270. package/dist/sdk/payment/use-payment-actions.js +276 -0
  271. package/dist/sdk/payment/use-payment-actions.js.map +1 -0
  272. package/dist/sdk/payment/use-place-order.d.ts +65 -0
  273. package/dist/sdk/payment/use-place-order.js +640 -0
  274. package/dist/sdk/payment/use-place-order.js.map +1 -0
  275. package/dist/sdk/session/auth-operations.d.ts +1 -1
  276. package/dist/sdk/session/auth-operations.js.map +1 -1
  277. package/dist/sdk/session/use-session-actions.d.ts +1 -1
  278. package/dist/sdk/session/use-session-actions.js.map +1 -1
  279. package/dist/sdk/session/use-session-revalidation.js +65 -0
  280. package/dist/sdk/session/use-session-revalidation.js.map +1 -0
  281. package/dist/sdk/shipping/option-select-operations.d.ts +1 -1
  282. package/dist/sdk/shipping/option-select-operations.js.map +1 -1
  283. package/dist/sdk/shipping/request-timeout.js +1 -1
  284. package/dist/sdk/shipping/request-timeout.js.map +1 -1
  285. package/dist/sdk/shipping/shipping-operations.d.ts +1 -1
  286. package/dist/sdk/shipping/shipping-operations.js.map +1 -1
  287. package/dist/sdk/shipping/use-shipping-actions.d.ts +2 -2
  288. package/dist/sdk/shipping/use-shipping-actions.js +1 -1
  289. package/dist/sdk/shipping/use-shipping-actions.js.map +1 -1
  290. package/dist/sdk/state/cart.d.ts +3 -4
  291. package/dist/sdk/state/cart.js +6 -7
  292. package/dist/sdk/state/cart.js.map +1 -1
  293. package/dist/utils/loggable-error-name.js +49 -0
  294. package/dist/utils/loggable-error-name.js.map +1 -0
  295. package/dist/utils/resolve-authored-copy.js +18 -0
  296. package/dist/utils/resolve-authored-copy.js.map +1 -0
  297. package/dist/utils/safe-href.js +3 -3
  298. package/dist/utils/safe-href.js.map +1 -1
  299. package/dist/utils/substitute-template.js +33 -0
  300. package/dist/utils/substitute-template.js.map +1 -0
  301. package/package.json +2 -1
  302. package/src/styles/tailwind.css +34 -0
  303. package/dist/docs/client-profile-form.md +0 -192
  304. package/dist/matter/client-profile-form/client-profile-form.d.ts +0 -126
  305. package/dist/matter/client-profile-form/client-profile-form.js +0 -662
  306. package/dist/matter/client-profile-form/client-profile-form.js.map +0 -1
@@ -12,6 +12,7 @@ import { ReactNode } from "react";
12
12
  */
13
13
  export type AddressSummaryFields = Readonly<{
14
14
  recipientName?: string | null;
15
+ name?: string | null;
15
16
  street?: string | null;
16
17
  number?: string | null;
17
18
  complement?: string | null;
@@ -19,7 +20,10 @@ export type AddressSummaryFields = Readonly<{
19
20
  city?: string | null;
20
21
  state?: string | null;
21
22
  postalCode?: string | null;
23
+ country?: string | null;
24
+ reference?: string | null;
22
25
  }>;
26
+ export type AddressSummaryFieldKey = keyof AddressSummaryFields;
23
27
  export type AddressSummaryRootProps = {
24
28
  /** The address fields provided to descendant presentational components via context. */
25
29
  address: AddressSummaryFields;
@@ -33,11 +37,25 @@ export type AddressSummaryProps = {
33
37
  export type AddressSummaryLineProps = {
34
38
  className?: string;
35
39
  };
40
+ export type AddressSummaryNameProps = Readonly<AddressSummaryLineProps>;
41
+ export type AddressSummaryCountryProps = Readonly<AddressSummaryLineProps>;
42
+ export type AddressSummaryFieldProps = Readonly<{
43
+ /** Which address field to render inline. */
44
+ field: AddressSummaryFieldKey;
45
+ className?: string;
46
+ }>;
36
47
  export declare const AddressSummaryRootDefinition: ComponentDefinition<AddressSummaryRootProps>;
37
48
  export declare const AddressSummaryDefinition: ComponentDefinition<AddressSummaryProps>;
38
49
  export declare const AddressSummaryRecipientDefinition: ComponentDefinition<AddressSummaryLineProps>;
39
50
  export declare const AddressSummaryStreetDefinition: ComponentDefinition<AddressSummaryLineProps>;
40
51
  export declare const AddressSummaryLocalityDefinition: ComponentDefinition<AddressSummaryLineProps>;
52
+ export declare const AddressSummaryNameDefinition: ComponentDefinition<Readonly<AddressSummaryLineProps>>;
53
+ export declare const AddressSummaryCountryDefinition: ComponentDefinition<Readonly<AddressSummaryLineProps>>;
54
+ export declare const AddressSummaryFieldDefinition: ComponentDefinition<Readonly<{
55
+ /** Which address field to render inline. */
56
+ field: AddressSummaryFieldKey;
57
+ className?: string;
58
+ }>>;
41
59
  export declare function AddressSummaryRoot({ address, children }: AddressSummaryRootProps): import("react/jsx-runtime").JSX.Element;
42
60
  export declare function AddressSummary({ className, children }: AddressSummaryProps): import("react/jsx-runtime").JSX.Element;
43
61
  /** Who the delivery is addressed to. Renders nothing when the address carries no recipient. */
@@ -46,5 +64,11 @@ export declare function AddressSummaryRecipient({ className }: AddressSummaryLin
46
64
  export declare function AddressSummaryStreet({ className }: AddressSummaryLineProps): import("react/jsx-runtime").JSX.Element | null;
47
65
  /** Neighborhood, city, state and postal code on one line. Renders nothing when all are absent. */
48
66
  export declare function AddressSummaryLocality({ className }: AddressSummaryLineProps): import("react/jsx-runtime").JSX.Element | null;
67
+ /** The shopper's own label for the address. Renders nothing when the address carries no name. */
68
+ export declare function AddressSummaryName({ className }: AddressSummaryNameProps): import("react/jsx-runtime").JSX.Element | null;
69
+ /** The address's country, shown as provided. Renders nothing when the address carries no country. */
70
+ export declare function AddressSummaryCountry({ className }: AddressSummaryCountryProps): import("react/jsx-runtime").JSX.Element | null;
71
+ /** One address field, rendered inline. Renders nothing when that field is absent. */
72
+ export declare function AddressSummaryField({ field, className }: AddressSummaryFieldProps): import("react/jsx-runtime").JSX.Element | null;
49
73
  //#endregion
50
74
  //# sourceMappingURL=address-summary.d.ts.map
@@ -32,7 +32,7 @@ const AddressSummaryDefinition = defineComponent({
32
32
  category: "content"
33
33
  },
34
34
  schema: {},
35
- guideline: "The address block: recipient, street line, locality line, in that order by default. Compose AddressSummaryRecipient / Street / Locality as children to choose the order or drop a line; the wrapper, and any styling on it, is the same either way. Must be a descendant of AddressSummaryRoot."
35
+ guideline: "The address block: recipient, street line, locality line, in that order by default. Compose AddressSummaryRecipient / Street / Locality as children to choose the order or drop a line; the wrapper, and any styling on it, is the same either way. AddressSummaryName, AddressSummaryCountry and AddressSummaryField are also available for a custom composition — none of them join the default. Must be a descendant of AddressSummaryRoot."
36
36
  });
37
37
  const AddressSummaryRecipientDefinition = defineComponent({
38
38
  name: "AddressSummaryRecipient",
@@ -70,6 +70,57 @@ const AddressSummaryLocalityDefinition = defineComponent({
70
70
  schema: {},
71
71
  guideline: "Neighborhood, city, state and postal code on one line, or nothing when all are absent. Must be a descendant of AddressSummaryRoot."
72
72
  });
73
+ const AddressSummaryNameDefinition = defineComponent({
74
+ name: "AddressSummaryName",
75
+ importPath: "@vtex/faststore/components",
76
+ component: AddressSummaryName,
77
+ requiresContext: "address-summary",
78
+ editor: {
79
+ label: "Address Summary Name",
80
+ category: "content"
81
+ },
82
+ schema: {},
83
+ guideline: "The shopper's own label for the address, or nothing when there is none. An unnamed address is identified by its contents. Must be a descendant of AddressSummaryRoot."
84
+ });
85
+ const AddressSummaryCountryDefinition = defineComponent({
86
+ name: "AddressSummaryCountry",
87
+ importPath: "@vtex/faststore/components",
88
+ component: AddressSummaryCountry,
89
+ requiresContext: "address-summary",
90
+ editor: {
91
+ label: "Address Summary Country",
92
+ category: "content"
93
+ },
94
+ schema: {},
95
+ guideline: "The address's country, shown exactly as provided, or nothing when there is none. Provide a display name, not a raw code: the address stores an ISO alpha-3 code, which Intl.DisplayNames rejects. Must be a descendant of AddressSummaryRoot."
96
+ });
97
+ const AddressSummaryFieldDefinition = defineComponent({
98
+ name: "AddressSummaryField",
99
+ importPath: "@vtex/faststore/components",
100
+ component: AddressSummaryField,
101
+ requiresContext: "address-summary",
102
+ editor: {
103
+ label: "Address Summary Field",
104
+ category: "content"
105
+ },
106
+ schema: { field: {
107
+ type: [
108
+ "recipientName",
109
+ "name",
110
+ "street",
111
+ "number",
112
+ "complement",
113
+ "neighborhood",
114
+ "city",
115
+ "state",
116
+ "postalCode",
117
+ "country",
118
+ "reference"
119
+ ],
120
+ label: "Field"
121
+ } },
122
+ guideline: "One address field, rendered inline, or nothing when it is empty. Compose several to build a line in a country's own order (e.g. number before street), with the separators the composition supplies; a separator beside a field that turns out empty is the composition's to drop. Must be a descendant of AddressSummaryRoot."
123
+ });
73
124
  function AddressSummaryRoot({ address, children }) {
74
125
  return /* @__PURE__ */ jsx(AddressSummaryContext.Provider, {
75
126
  value: address,
@@ -123,7 +174,37 @@ function AddressSummaryLocality({ className }) {
123
174
  children: line
124
175
  });
125
176
  }
177
+ /** The shopper's own label for the address. Renders nothing when the address carries no name. */
178
+ function AddressSummaryName({ className }) {
179
+ const { name } = useAddressSummary();
180
+ if (!name) return null;
181
+ return /* @__PURE__ */ jsx("p", {
182
+ className,
183
+ "data-fs-address-summary-name": "",
184
+ children: name
185
+ });
186
+ }
187
+ /** The address's country, shown as provided. Renders nothing when the address carries no country. */
188
+ function AddressSummaryCountry({ className }) {
189
+ const { country } = useAddressSummary();
190
+ if (!country) return null;
191
+ return /* @__PURE__ */ jsx("p", {
192
+ className,
193
+ "data-fs-address-summary-country": "",
194
+ children: country
195
+ });
196
+ }
197
+ /** One address field, rendered inline. Renders nothing when that field is absent. */
198
+ function AddressSummaryField({ field, className }) {
199
+ const value = useAddressSummary()[field];
200
+ if (!value) return null;
201
+ return /* @__PURE__ */ jsx("span", {
202
+ className,
203
+ "data-fs-address-summary-field": field,
204
+ children: value
205
+ });
206
+ }
126
207
  //#endregion
127
- export { AddressSummary, AddressSummaryDefinition, AddressSummaryLocality, AddressSummaryLocalityDefinition, AddressSummaryRecipient, AddressSummaryRecipientDefinition, AddressSummaryRoot, AddressSummaryRootDefinition, AddressSummaryStreet, AddressSummaryStreetDefinition, useAddressSummary };
208
+ export { AddressSummary, AddressSummaryCountry, AddressSummaryCountryDefinition, AddressSummaryDefinition, AddressSummaryField, AddressSummaryFieldDefinition, AddressSummaryLocality, AddressSummaryLocalityDefinition, AddressSummaryName, AddressSummaryNameDefinition, AddressSummaryRecipient, AddressSummaryRecipientDefinition, AddressSummaryRoot, AddressSummaryRootDefinition, AddressSummaryStreet, AddressSummaryStreetDefinition, useAddressSummary };
128
209
 
129
210
  //# sourceMappingURL=address-summary.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"address-summary.js","names":[],"sources":["../../../src/particles/address-summary/address-summary.tsx"],"sourcesContent":["'use client';\n\nimport { defineComponent } from '@vtex/fs-core';\nimport { createContext, type ReactNode, useContext } from 'react';\n\n/**\n * AddressSummary particle (no business coupling — ADR-0001): a presentational display for a\n * postal address, driven entirely by AddressSummaryRoot's context rather than props. Any matter\n * component that owns address data (e.g. ShippingAddressSelectedSummary, ShippingAddressSavedOption)\n * provides it via AddressSummaryRoot; AddressSummary reads and renders it. A future alternative\n * presentation (e.g. a \"LeanAddressSummary\") would read the same context and could be composed in\n * its place — swapping the presentation is a composition change, not a new data-binding.\n */\n\nexport type AddressSummaryFields = Readonly<{\n recipientName?: string | null;\n street?: string | null;\n number?: string | null;\n complement?: string | null;\n neighborhood?: string | null;\n city?: string | null;\n state?: string | null;\n postalCode?: string | null;\n}>;\n\nconst AddressSummaryContext = createContext<AddressSummaryFields | null>(null);\n\nexport function useAddressSummary(): AddressSummaryFields {\n const ctx = useContext(AddressSummaryContext);\n if (!ctx) throw new Error('AddressSummary must be used inside AddressSummaryRoot.');\n return ctx;\n}\n\nexport type AddressSummaryRootProps = {\n /** The address fields provided to descendant presentational components via context. */\n address: AddressSummaryFields;\n children?: ReactNode;\n};\n\nexport type AddressSummaryProps = {\n className?: string;\n /** The lines to render, in order. Defaults to recipient, street, locality when omitted. */\n children?: ReactNode;\n};\n\nexport type AddressSummaryLineProps = {\n className?: string;\n};\n\nexport const AddressSummaryRootDefinition = defineComponent<AddressSummaryRootProps>({\n name: 'AddressSummaryRoot',\n importPath: '@vtex/faststore/components',\n component: AddressSummaryRoot,\n providesContext: 'address-summary',\n editor: { label: 'Address Summary Root', category: 'content' },\n schema: {},\n guideline:\n 'Provides a postal address to descendant presentational components via context (no business coupling). Compose a matter component that owns address data as the source of the address prop, and AddressSummary (or a future alternative presentation reading the same context) as the child that renders it.',\n});\n\nexport const AddressSummaryDefinition = defineComponent<AddressSummaryProps>({\n name: 'AddressSummary',\n importPath: '@vtex/faststore/components',\n component: AddressSummary,\n requiresContext: 'address-summary',\n editor: { label: 'Address Summary', category: 'content' },\n schema: {},\n guideline:\n 'The address block: recipient, street line, locality line, in that order by default. Compose AddressSummaryRecipient / Street / Locality as children to choose the order or drop a line; the wrapper, and any styling on it, is the same either way. Must be a descendant of AddressSummaryRoot.',\n});\n\nexport const AddressSummaryRecipientDefinition = defineComponent<AddressSummaryLineProps>({\n name: 'AddressSummaryRecipient',\n importPath: '@vtex/faststore/components',\n component: AddressSummaryRecipient,\n requiresContext: 'address-summary',\n editor: { label: 'Address Summary Recipient', category: 'content' },\n schema: {},\n guideline:\n 'Who the delivery is addressed to, or nothing when the address carries no recipient. Place it in whatever order the summary should read. Must be a descendant of AddressSummaryRoot.',\n});\n\nexport const AddressSummaryStreetDefinition = defineComponent<AddressSummaryLineProps>({\n name: 'AddressSummaryStreet',\n importPath: '@vtex/faststore/components',\n component: AddressSummaryStreet,\n requiresContext: 'address-summary',\n editor: { label: 'Address Summary Street', category: 'content' },\n schema: {},\n guideline:\n 'Street, number and complement on one line, or nothing when all three are absent. Must be a descendant of AddressSummaryRoot.',\n});\n\nexport const AddressSummaryLocalityDefinition = defineComponent<AddressSummaryLineProps>({\n name: 'AddressSummaryLocality',\n importPath: '@vtex/faststore/components',\n component: AddressSummaryLocality,\n requiresContext: 'address-summary',\n editor: { label: 'Address Summary Locality', category: 'content' },\n schema: {},\n guideline:\n 'Neighborhood, city, state and postal code on one line, or nothing when all are absent. Must be a descendant of AddressSummaryRoot.',\n});\n\nexport function AddressSummaryRoot({ address, children }: AddressSummaryRootProps) {\n return <AddressSummaryContext.Provider value={address}>{children}</AddressSummaryContext.Provider>;\n}\n\nexport function AddressSummary({ className, children }: AddressSummaryProps) {\n return (\n <div className={className} data-fs-address-summary=\"\">\n {children ?? (\n <>\n <AddressSummaryRecipient />\n <AddressSummaryStreet />\n <AddressSummaryLocality />\n </>\n )}\n </div>\n );\n}\n\n/** Who the delivery is addressed to. Renders nothing when the address carries no recipient. */\nexport function AddressSummaryRecipient({ className }: AddressSummaryLineProps) {\n const { recipientName } = useAddressSummary();\n if (!recipientName) return null;\n return (\n <p className={className} data-fs-address-summary-recipient=\"\">\n {recipientName}\n </p>\n );\n}\n\n/** Street, number and complement on one line. Renders nothing when all three are absent. */\nexport function AddressSummaryStreet({ className }: AddressSummaryLineProps) {\n const { street, number, complement } = useAddressSummary();\n const line = [[street, number].filter(Boolean).join(', '), complement].filter(Boolean).join(' - ');\n if (!line) return null;\n return (\n <p className={className} data-fs-address-summary-address=\"\">\n {line}\n </p>\n );\n}\n\n/** Neighborhood, city, state and postal code on one line. Renders nothing when all are absent. */\nexport function AddressSummaryLocality({ className }: AddressSummaryLineProps) {\n const { neighborhood, city, state, postalCode } = useAddressSummary();\n const line = [neighborhood, [city, state].filter(Boolean).join(' - '), postalCode].filter(Boolean).join(', ');\n if (!line) return null;\n return (\n <p className={className} data-fs-address-summary-locality=\"\">\n {line}\n </p>\n );\n}\n"],"mappings":";;;;;;AAyBA,MAAM,wBAAwB,cAA2C,IAAI;AAE7E,SAAgB,oBAA0C;CACxD,MAAM,MAAM,WAAW,qBAAqB;CAC5C,IAAI,CAAC,KAAK,MAAM,IAAI,MAAM,wDAAwD;CAClF,OAAO;AACT;AAkBA,MAAa,+BAA+B,gBAAyC;CACnF,MAAM;CACN,YAAY;CACZ,WAAW;CACX,iBAAiB;CACjB,QAAQ;EAAE,OAAO;EAAwB,UAAU;CAAU;CAC7D,QAAQ,CAAC;CACT,WACE;AACJ,CAAC;AAED,MAAa,2BAA2B,gBAAqC;CAC3E,MAAM;CACN,YAAY;CACZ,WAAW;CACX,iBAAiB;CACjB,QAAQ;EAAE,OAAO;EAAmB,UAAU;CAAU;CACxD,QAAQ,CAAC;CACT,WACE;AACJ,CAAC;AAED,MAAa,oCAAoC,gBAAyC;CACxF,MAAM;CACN,YAAY;CACZ,WAAW;CACX,iBAAiB;CACjB,QAAQ;EAAE,OAAO;EAA6B,UAAU;CAAU;CAClE,QAAQ,CAAC;CACT,WACE;AACJ,CAAC;AAED,MAAa,iCAAiC,gBAAyC;CACrF,MAAM;CACN,YAAY;CACZ,WAAW;CACX,iBAAiB;CACjB,QAAQ;EAAE,OAAO;EAA0B,UAAU;CAAU;CAC/D,QAAQ,CAAC;CACT,WACE;AACJ,CAAC;AAED,MAAa,mCAAmC,gBAAyC;CACvF,MAAM;CACN,YAAY;CACZ,WAAW;CACX,iBAAiB;CACjB,QAAQ;EAAE,OAAO;EAA4B,UAAU;CAAU;CACjE,QAAQ,CAAC;CACT,WACE;AACJ,CAAC;AAED,SAAgB,mBAAmB,EAAE,SAAS,YAAqC;CACjF,OAAO,oBAAC,sBAAsB,UAAvB;EAAgC,OAAO;EAAU;CAAyC,CAAA;AACnG;AAEA,SAAgB,eAAe,EAAE,WAAW,YAAiC;CAC3E,OACE,oBAAC,OAAD;EAAgB;EAAW,2BAAwB;EAChD,UAAA,YACC,qBAAA,UAAA,EAAA,UAAA;GACE,oBAAC,yBAAD,CAA0B,CAAA;GAC1B,oBAAC,sBAAD,CAAuB,CAAA;GACvB,oBAAC,wBAAD,CAAyB,CAAA;EACzB,EAAA,CAAA;CAED,CAAA;AAET;;AAGA,SAAgB,wBAAwB,EAAE,aAAsC;CAC9E,MAAM,EAAE,kBAAkB,kBAAkB;CAC5C,IAAI,CAAC,eAAe,OAAO;CAC3B,OACE,oBAAC,KAAD;EAAc;EAAW,qCAAkC;EACxD,UAAA;CACA,CAAA;AAEP;;AAGA,SAAgB,qBAAqB,EAAE,aAAsC;CAC3E,MAAM,EAAE,QAAQ,QAAQ,eAAe,kBAAkB;CACzD,MAAM,OAAO,CAAC,CAAC,QAAQ,MAAM,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,IAAI,GAAG,UAAU,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,KAAK;CACjG,IAAI,CAAC,MAAM,OAAO;CAClB,OACE,oBAAC,KAAD;EAAc;EAAW,mCAAgC;EACtD,UAAA;CACA,CAAA;AAEP;;AAGA,SAAgB,uBAAuB,EAAE,aAAsC;CAC7E,MAAM,EAAE,cAAc,MAAM,OAAO,eAAe,kBAAkB;CACpE,MAAM,OAAO;EAAC;EAAc,CAAC,MAAM,KAAK,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,KAAK;EAAG;CAAU,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,IAAI;CAC5G,IAAI,CAAC,MAAM,OAAO;CAClB,OACE,oBAAC,KAAD;EAAc;EAAW,oCAAiC;EACvD,UAAA;CACA,CAAA;AAEP"}
1
+ {"version":3,"file":"address-summary.js","names":[],"sources":["../../../src/particles/address-summary/address-summary.tsx"],"sourcesContent":["'use client';\n\nimport { defineComponent } from '@vtex/fs-core';\nimport { createContext, type ReactNode, useContext } from 'react';\n\n/**\n * AddressSummary particle (no business coupling — ADR-0001): a presentational display for a\n * postal address, driven entirely by AddressSummaryRoot's context rather than props. Any matter\n * component that owns address data (e.g. ShippingAddressSelectedSummary, ShippingAddressSavedOption)\n * provides it via AddressSummaryRoot; AddressSummary reads and renders it. A future alternative\n * presentation (e.g. a \"LeanAddressSummary\") would read the same context and could be composed in\n * its place — swapping the presentation is a composition change, not a new data-binding.\n */\n\nexport type AddressSummaryFields = Readonly<{\n recipientName?: string | null;\n name?: string | null;\n street?: string | null;\n number?: string | null;\n complement?: string | null;\n neighborhood?: string | null;\n city?: string | null;\n state?: string | null;\n postalCode?: string | null;\n country?: string | null;\n reference?: string | null;\n}>;\n\nexport type AddressSummaryFieldKey = keyof AddressSummaryFields;\n\nconst AddressSummaryContext = createContext<AddressSummaryFields | null>(null);\n\nexport function useAddressSummary(): AddressSummaryFields {\n const ctx = useContext(AddressSummaryContext);\n if (!ctx) throw new Error('AddressSummary must be used inside AddressSummaryRoot.');\n return ctx;\n}\n\nexport type AddressSummaryRootProps = {\n /** The address fields provided to descendant presentational components via context. */\n address: AddressSummaryFields;\n children?: ReactNode;\n};\n\nexport type AddressSummaryProps = {\n className?: string;\n /** The lines to render, in order. Defaults to recipient, street, locality when omitted. */\n children?: ReactNode;\n};\n\nexport type AddressSummaryLineProps = {\n className?: string;\n};\n\nexport type AddressSummaryNameProps = Readonly<AddressSummaryLineProps>;\n\nexport type AddressSummaryCountryProps = Readonly<AddressSummaryLineProps>;\n\nexport type AddressSummaryFieldProps = Readonly<{\n /** Which address field to render inline. */\n field: AddressSummaryFieldKey;\n className?: string;\n}>;\n\nexport const AddressSummaryRootDefinition = defineComponent<AddressSummaryRootProps>({\n name: 'AddressSummaryRoot',\n importPath: '@vtex/faststore/components',\n component: AddressSummaryRoot,\n providesContext: 'address-summary',\n editor: { label: 'Address Summary Root', category: 'content' },\n schema: {},\n guideline:\n 'Provides a postal address to descendant presentational components via context (no business coupling). Compose a matter component that owns address data as the source of the address prop, and AddressSummary (or a future alternative presentation reading the same context) as the child that renders it.',\n});\n\nexport const AddressSummaryDefinition = defineComponent<AddressSummaryProps>({\n name: 'AddressSummary',\n importPath: '@vtex/faststore/components',\n component: AddressSummary,\n requiresContext: 'address-summary',\n editor: { label: 'Address Summary', category: 'content' },\n schema: {},\n guideline:\n 'The address block: recipient, street line, locality line, in that order by default. Compose AddressSummaryRecipient / Street / Locality as children to choose the order or drop a line; the wrapper, and any styling on it, is the same either way. AddressSummaryName, AddressSummaryCountry and AddressSummaryField are also available for a custom composition — none of them join the default. Must be a descendant of AddressSummaryRoot.',\n});\n\nexport const AddressSummaryRecipientDefinition = defineComponent<AddressSummaryLineProps>({\n name: 'AddressSummaryRecipient',\n importPath: '@vtex/faststore/components',\n component: AddressSummaryRecipient,\n requiresContext: 'address-summary',\n editor: { label: 'Address Summary Recipient', category: 'content' },\n schema: {},\n guideline:\n 'Who the delivery is addressed to, or nothing when the address carries no recipient. Place it in whatever order the summary should read. Must be a descendant of AddressSummaryRoot.',\n});\n\nexport const AddressSummaryStreetDefinition = defineComponent<AddressSummaryLineProps>({\n name: 'AddressSummaryStreet',\n importPath: '@vtex/faststore/components',\n component: AddressSummaryStreet,\n requiresContext: 'address-summary',\n editor: { label: 'Address Summary Street', category: 'content' },\n schema: {},\n guideline:\n 'Street, number and complement on one line, or nothing when all three are absent. Must be a descendant of AddressSummaryRoot.',\n});\n\nexport const AddressSummaryLocalityDefinition = defineComponent<AddressSummaryLineProps>({\n name: 'AddressSummaryLocality',\n importPath: '@vtex/faststore/components',\n component: AddressSummaryLocality,\n requiresContext: 'address-summary',\n editor: { label: 'Address Summary Locality', category: 'content' },\n schema: {},\n guideline:\n 'Neighborhood, city, state and postal code on one line, or nothing when all are absent. Must be a descendant of AddressSummaryRoot.',\n});\n\nexport const AddressSummaryNameDefinition = defineComponent<AddressSummaryNameProps>({\n name: 'AddressSummaryName',\n importPath: '@vtex/faststore/components',\n component: AddressSummaryName,\n requiresContext: 'address-summary',\n editor: { label: 'Address Summary Name', category: 'content' },\n schema: {},\n guideline:\n \"The shopper's own label for the address, or nothing when there is none. An unnamed address is identified by its contents. Must be a descendant of AddressSummaryRoot.\",\n});\n\nexport const AddressSummaryCountryDefinition = defineComponent<AddressSummaryCountryProps>({\n name: 'AddressSummaryCountry',\n importPath: '@vtex/faststore/components',\n component: AddressSummaryCountry,\n requiresContext: 'address-summary',\n editor: { label: 'Address Summary Country', category: 'content' },\n schema: {},\n guideline:\n \"The address's country, shown exactly as provided, or nothing when there is none. Provide a display name, not a raw code: the address stores an ISO alpha-3 code, which Intl.DisplayNames rejects. Must be a descendant of AddressSummaryRoot.\",\n});\n\nexport const AddressSummaryFieldDefinition = defineComponent<AddressSummaryFieldProps>({\n name: 'AddressSummaryField',\n importPath: '@vtex/faststore/components',\n component: AddressSummaryField,\n requiresContext: 'address-summary',\n editor: { label: 'Address Summary Field', category: 'content' },\n schema: {\n field: {\n type: [\n 'recipientName',\n 'name',\n 'street',\n 'number',\n 'complement',\n 'neighborhood',\n 'city',\n 'state',\n 'postalCode',\n 'country',\n 'reference',\n ] as const,\n label: 'Field',\n },\n },\n guideline:\n \"One address field, rendered inline, or nothing when it is empty. Compose several to build a line in a country's own order (e.g. number before street), with the separators the composition supplies; a separator beside a field that turns out empty is the composition's to drop. Must be a descendant of AddressSummaryRoot.\",\n});\n\nexport function AddressSummaryRoot({ address, children }: AddressSummaryRootProps) {\n return <AddressSummaryContext.Provider value={address}>{children}</AddressSummaryContext.Provider>;\n}\n\nexport function AddressSummary({ className, children }: AddressSummaryProps) {\n return (\n <div className={className} data-fs-address-summary=\"\">\n {children ?? (\n <>\n <AddressSummaryRecipient />\n <AddressSummaryStreet />\n <AddressSummaryLocality />\n </>\n )}\n </div>\n );\n}\n\n/** Who the delivery is addressed to. Renders nothing when the address carries no recipient. */\nexport function AddressSummaryRecipient({ className }: AddressSummaryLineProps) {\n const { recipientName } = useAddressSummary();\n if (!recipientName) return null;\n return (\n <p className={className} data-fs-address-summary-recipient=\"\">\n {recipientName}\n </p>\n );\n}\n\n/** Street, number and complement on one line. Renders nothing when all three are absent. */\nexport function AddressSummaryStreet({ className }: AddressSummaryLineProps) {\n const { street, number, complement } = useAddressSummary();\n const line = [[street, number].filter(Boolean).join(', '), complement].filter(Boolean).join(' - ');\n if (!line) return null;\n return (\n <p className={className} data-fs-address-summary-address=\"\">\n {line}\n </p>\n );\n}\n\n/** Neighborhood, city, state and postal code on one line. Renders nothing when all are absent. */\nexport function AddressSummaryLocality({ className }: AddressSummaryLineProps) {\n const { neighborhood, city, state, postalCode } = useAddressSummary();\n const line = [neighborhood, [city, state].filter(Boolean).join(' - '), postalCode].filter(Boolean).join(', ');\n if (!line) return null;\n return (\n <p className={className} data-fs-address-summary-locality=\"\">\n {line}\n </p>\n );\n}\n\n/** The shopper's own label for the address. Renders nothing when the address carries no name. */\nexport function AddressSummaryName({ className }: AddressSummaryNameProps) {\n const { name } = useAddressSummary();\n if (!name) return null;\n return (\n <p className={className} data-fs-address-summary-name=\"\">\n {name}\n </p>\n );\n}\n\n/** The address's country, shown as provided. Renders nothing when the address carries no country. */\nexport function AddressSummaryCountry({ className }: AddressSummaryCountryProps) {\n const { country } = useAddressSummary();\n if (!country) return null;\n return (\n <p className={className} data-fs-address-summary-country=\"\">\n {country}\n </p>\n );\n}\n\n/** One address field, rendered inline. Renders nothing when that field is absent. */\nexport function AddressSummaryField({ field, className }: AddressSummaryFieldProps) {\n const address = useAddressSummary();\n const value = address[field];\n if (!value) return null;\n return (\n <span className={className} data-fs-address-summary-field={field}>\n {value}\n </span>\n );\n}\n"],"mappings":"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"}
@@ -0,0 +1,68 @@
1
+ import { ComponentDefinition } from "../../core/dist/define-component.js";
2
+ import "../../core/dist/index.js";
3
+ import { ComponentProps, ComponentPropsWithRef, ReactNode } from "react";
4
+ import { AlertDialog } from "@base-ui/react/alert-dialog";
5
+ //#region src/particles/alert-dialog/alert-dialog.d.ts
6
+ type BasePopupProps = ComponentProps<typeof AlertDialog.Popup>;
7
+ export type AlertDialogRootProps = Readonly<{
8
+ open?: boolean;
9
+ defaultOpen?: boolean;
10
+ onOpenChange?: (open: boolean, eventDetails: {
11
+ isCanceled: boolean;
12
+ }) => void;
13
+ children?: ReactNode;
14
+ }>;
15
+ export type AlertDialogTriggerProps = ComponentPropsWithRef<'button'>;
16
+ export type AlertDialogPortalProps = Readonly<{
17
+ children?: ReactNode;
18
+ }>;
19
+ export type AlertDialogBackdropProps = ComponentPropsWithRef<'div'>;
20
+ export type AlertDialogViewportProps = ComponentPropsWithRef<'div'>;
21
+ export type AlertDialogPopupProps = ComponentPropsWithRef<'div'> & {
22
+ initialFocus?: BasePopupProps['initialFocus'];
23
+ finalFocus?: BasePopupProps['finalFocus'];
24
+ };
25
+ export type AlertDialogTitleProps = ComponentPropsWithRef<'h2'>;
26
+ export type AlertDialogDescriptionProps = ComponentPropsWithRef<'p'>;
27
+ export type AlertDialogCloseProps = ComponentPropsWithRef<'button'>;
28
+ export declare const AlertDialogRootDefinition: ComponentDefinition<Readonly<{
29
+ open?: boolean;
30
+ defaultOpen?: boolean;
31
+ onOpenChange?: (open: boolean, eventDetails: {
32
+ isCanceled: boolean;
33
+ }) => void;
34
+ children?: ReactNode;
35
+ }>>;
36
+ export declare const AlertDialogTriggerDefinition: ComponentDefinition<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>>;
37
+ export declare const AlertDialogPortalDefinition: ComponentDefinition<Readonly<{
38
+ children?: ReactNode;
39
+ }>>;
40
+ export declare const AlertDialogBackdropDefinition: ComponentDefinition<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
41
+ export declare const AlertDialogViewportDefinition: ComponentDefinition<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
42
+ export declare const AlertDialogPopupDefinition: ComponentDefinition<AlertDialogPopupProps>;
43
+ export declare const AlertDialogTitleDefinition: ComponentDefinition<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>>;
44
+ export declare const AlertDialogDescriptionDefinition: ComponentDefinition<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>>;
45
+ export declare const AlertDialogCloseDefinition: ComponentDefinition<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>>;
46
+ export declare function AlertDialogRoot({ open, defaultOpen, onOpenChange, children }: AlertDialogRootProps): import("react/jsx-runtime").JSX.Element;
47
+ export declare function AlertDialogTrigger({ className, children, ...props }: AlertDialogTriggerProps): import("react/jsx-runtime").JSX.Element;
48
+ export declare function AlertDialogPortal({ children }: AlertDialogPortalProps): import("react/jsx-runtime").JSX.Element;
49
+ export declare function AlertDialogBackdrop({ className, children, ...props }: AlertDialogBackdropProps): import("react/jsx-runtime").JSX.Element;
50
+ export declare function AlertDialogViewport({ className, children, ...props }: AlertDialogViewportProps): import("react/jsx-runtime").JSX.Element;
51
+ export declare function AlertDialogPopup({ className, children, ...props }: AlertDialogPopupProps): import("react/jsx-runtime").JSX.Element;
52
+ export declare function AlertDialogTitle({ className, children, ...props }: AlertDialogTitleProps): import("react/jsx-runtime").JSX.Element;
53
+ export declare function AlertDialogDescription({ className, children, ...props }: AlertDialogDescriptionProps): import("react/jsx-runtime").JSX.Element;
54
+ export declare function AlertDialogClose({ className, children, ...props }: AlertDialogCloseProps): import("react/jsx-runtime").JSX.Element;
55
+ declare const AlertDialog$1: {
56
+ Root: typeof AlertDialogRoot;
57
+ Trigger: typeof AlertDialogTrigger;
58
+ Portal: typeof AlertDialogPortal;
59
+ Backdrop: typeof AlertDialogBackdrop;
60
+ Viewport: typeof AlertDialogViewport;
61
+ Popup: typeof AlertDialogPopup;
62
+ Title: typeof AlertDialogTitle;
63
+ Description: typeof AlertDialogDescription;
64
+ Close: typeof AlertDialogClose;
65
+ };
66
+ //#endregion
67
+ export { AlertDialog$1 as AlertDialog };
68
+ //# sourceMappingURL=alert-dialog.d.ts.map
@@ -0,0 +1,187 @@
1
+ "use client";
2
+ import { defineComponent } from "../../core/dist/define-component.js";
3
+ import "../../core/dist/index.js";
4
+ import { jsx } from "react/jsx-runtime";
5
+ import { AlertDialog } from "@base-ui/react/alert-dialog";
6
+ //#region src/particles/alert-dialog/alert-dialog.tsx
7
+ const AlertDialogRootDefinition = defineComponent({
8
+ name: "AlertDialogRoot",
9
+ importPath: "@vtex/faststore/components",
10
+ component: AlertDialogRoot,
11
+ editor: {
12
+ label: "Alert Dialog Root",
13
+ category: "layout"
14
+ },
15
+ schema: {},
16
+ guideline: "Root of a confirmation prompt for an irreversible action. Compose as: AlertDialogRoot > (AlertDialogTrigger + AlertDialogPortal > (AlertDialogBackdrop + AlertDialogViewport > AlertDialogPopup > (AlertDialogTitle + AlertDialogDescription + AlertDialogClose + your confirm Button))). Always modal and never closes on an outside click; only Escape or an AlertDialogClose dismisses it. Use Dialog instead when a stray click may close the overlay."
17
+ });
18
+ const AlertDialogTriggerDefinition = defineComponent({
19
+ name: "AlertDialogTrigger",
20
+ importPath: "@vtex/faststore/components",
21
+ component: AlertDialogTrigger,
22
+ editor: {
23
+ label: "Alert Dialog Trigger",
24
+ category: "action"
25
+ },
26
+ schema: {},
27
+ guideline: "Opens the alert dialog when clicked. Direct child of AlertDialogRoot. Accepts any children (text, Icon). Base UI connects it to AlertDialogRoot via context — no explicit wiring needed."
28
+ });
29
+ const AlertDialogPortalDefinition = defineComponent({
30
+ name: "AlertDialogPortal",
31
+ importPath: "@vtex/faststore/components",
32
+ component: AlertDialogPortal,
33
+ editor: {
34
+ label: "Alert Dialog Portal",
35
+ category: "layout"
36
+ },
37
+ schema: {},
38
+ guideline: "Renders its children outside the DOM tree (into document.body). Place AlertDialogBackdrop and AlertDialogViewport as direct children, in that order."
39
+ });
40
+ const AlertDialogBackdropDefinition = defineComponent({
41
+ name: "AlertDialogBackdrop",
42
+ importPath: "@vtex/faststore/components",
43
+ component: AlertDialogBackdrop,
44
+ editor: {
45
+ label: "Alert Dialog Backdrop",
46
+ category: "layout"
47
+ },
48
+ schema: {},
49
+ guideline: "Semi-transparent overlay behind the popup. Direct child of AlertDialogPortal, before AlertDialogViewport. Clicking it does not close the alert dialog."
50
+ });
51
+ const AlertDialogViewportDefinition = defineComponent({
52
+ name: "AlertDialogViewport",
53
+ importPath: "@vtex/faststore/components",
54
+ component: AlertDialogViewport,
55
+ editor: {
56
+ label: "Alert Dialog Viewport",
57
+ category: "layout"
58
+ },
59
+ schema: {},
60
+ guideline: "Positioning container for AlertDialogPopup. Direct child of AlertDialogPortal, after AlertDialogBackdrop. Apply fixed positioning and centering here (e.g. fixed inset-0 flex items-center justify-center). Place AlertDialogPopup inside."
61
+ });
62
+ const AlertDialogPopupDefinition = defineComponent({
63
+ name: "AlertDialogPopup",
64
+ importPath: "@vtex/faststore/components",
65
+ component: AlertDialogPopup,
66
+ editor: {
67
+ label: "Alert Dialog Popup",
68
+ category: "layout"
69
+ },
70
+ schema: {},
71
+ guideline: "The visible prompt, inside AlertDialogViewport, with role alertdialog. Place AlertDialogTitle (required), AlertDialogDescription, an AlertDialogClose for cancel, and a confirm Button inside. Focus starts on the first focusable element, except when opened by touch, where Base UI focuses the popup itself: put the cancel control first, and pass initialFocus (a ref) when Cancel must receive focus for every kind of interaction."
72
+ });
73
+ const AlertDialogTitleDefinition = defineComponent({
74
+ name: "AlertDialogTitle",
75
+ importPath: "@vtex/faststore/components",
76
+ component: AlertDialogTitle,
77
+ editor: {
78
+ label: "Alert Dialog Title",
79
+ category: "layout"
80
+ },
81
+ schema: {},
82
+ guideline: "Required heading inside AlertDialogPopup — sets the accessible name of the alert dialog for screen readers. State the question, e.g. \"Delete this address?\"."
83
+ });
84
+ const AlertDialogDescriptionDefinition = defineComponent({
85
+ name: "AlertDialogDescription",
86
+ importPath: "@vtex/faststore/components",
87
+ component: AlertDialogDescription,
88
+ editor: {
89
+ label: "Alert Dialog Description",
90
+ category: "layout"
91
+ },
92
+ schema: {},
93
+ guideline: "Description inside AlertDialogPopup, after AlertDialogTitle. Screen readers announce it with the prompt, so use it to state the consequence of confirming."
94
+ });
95
+ const AlertDialogCloseDefinition = defineComponent({
96
+ name: "AlertDialogClose",
97
+ importPath: "@vtex/faststore/components",
98
+ component: AlertDialogClose,
99
+ editor: {
100
+ label: "Alert Dialog Close",
101
+ category: "action"
102
+ },
103
+ schema: {},
104
+ guideline: "Closes the alert dialog when clicked. Use it for the cancel control inside AlertDialogPopup. The confirm control is a separate Button that runs the consumer action."
105
+ });
106
+ function AlertDialogRoot({ open, defaultOpen, onOpenChange, children }) {
107
+ return /* @__PURE__ */ jsx(AlertDialog.Root, {
108
+ open,
109
+ defaultOpen,
110
+ onOpenChange,
111
+ children
112
+ });
113
+ }
114
+ function AlertDialogTrigger({ className, children, ...props }) {
115
+ return /* @__PURE__ */ jsx(AlertDialog.Trigger, {
116
+ ...props,
117
+ className,
118
+ "data-fs-alert-dialog-trigger": "",
119
+ children
120
+ });
121
+ }
122
+ function AlertDialogPortal({ children }) {
123
+ return /* @__PURE__ */ jsx(AlertDialog.Portal, { children });
124
+ }
125
+ function AlertDialogBackdrop({ className, children, ...props }) {
126
+ return /* @__PURE__ */ jsx(AlertDialog.Backdrop, {
127
+ ...props,
128
+ className,
129
+ "data-fs-alert-dialog-backdrop": "",
130
+ children
131
+ });
132
+ }
133
+ function AlertDialogViewport({ className, children, ...props }) {
134
+ return /* @__PURE__ */ jsx("div", {
135
+ ...props,
136
+ className,
137
+ "data-fs-alert-dialog-viewport": "",
138
+ children
139
+ });
140
+ }
141
+ function AlertDialogPopup({ className, children, ...props }) {
142
+ return /* @__PURE__ */ jsx(AlertDialog.Popup, {
143
+ ...props,
144
+ className,
145
+ "data-fs-alert-dialog-popup": "",
146
+ children
147
+ });
148
+ }
149
+ function AlertDialogTitle({ className, children, ...props }) {
150
+ return /* @__PURE__ */ jsx(AlertDialog.Title, {
151
+ ...props,
152
+ className,
153
+ "data-fs-alert-dialog-title": "",
154
+ children
155
+ });
156
+ }
157
+ function AlertDialogDescription({ className, children, ...props }) {
158
+ return /* @__PURE__ */ jsx(AlertDialog.Description, {
159
+ ...props,
160
+ className,
161
+ "data-fs-alert-dialog-description": "",
162
+ children
163
+ });
164
+ }
165
+ function AlertDialogClose({ className, children, ...props }) {
166
+ return /* @__PURE__ */ jsx(AlertDialog.Close, {
167
+ ...props,
168
+ className,
169
+ "data-fs-alert-dialog-close": "",
170
+ children
171
+ });
172
+ }
173
+ const AlertDialog$1 = {
174
+ Root: AlertDialogRoot,
175
+ Trigger: AlertDialogTrigger,
176
+ Portal: AlertDialogPortal,
177
+ Backdrop: AlertDialogBackdrop,
178
+ Viewport: AlertDialogViewport,
179
+ Popup: AlertDialogPopup,
180
+ Title: AlertDialogTitle,
181
+ Description: AlertDialogDescription,
182
+ Close: AlertDialogClose
183
+ };
184
+ //#endregion
185
+ export { AlertDialog$1 as AlertDialog, AlertDialogBackdrop, AlertDialogBackdropDefinition, AlertDialogClose, AlertDialogCloseDefinition, AlertDialogDescription, AlertDialogDescriptionDefinition, AlertDialogPopup, AlertDialogPopupDefinition, AlertDialogPortal, AlertDialogPortalDefinition, AlertDialogRoot, AlertDialogRootDefinition, AlertDialogTitle, AlertDialogTitleDefinition, AlertDialogTrigger, AlertDialogTriggerDefinition, AlertDialogViewport, AlertDialogViewportDefinition };
186
+
187
+ //# sourceMappingURL=alert-dialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert-dialog.js","names":["BaseAlertDialog","AlertDialog"],"sources":["../../../src/particles/alert-dialog/alert-dialog.tsx"],"sourcesContent":["'use client';\nimport { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog';\nimport { defineComponent } from '@vtex/fs-core';\nimport type { ComponentProps, ComponentPropsWithRef, ReactNode } from 'react';\n\ntype BasePopupProps = ComponentProps<typeof BaseAlertDialog.Popup>;\n\nexport type AlertDialogRootProps = Readonly<{\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean, eventDetails: { isCanceled: boolean }) => void;\n children?: ReactNode;\n}>;\n\nexport type AlertDialogTriggerProps = ComponentPropsWithRef<'button'>;\n\nexport type AlertDialogPortalProps = Readonly<{\n children?: ReactNode;\n}>;\n\nexport type AlertDialogBackdropProps = ComponentPropsWithRef<'div'>;\n\nexport type AlertDialogViewportProps = ComponentPropsWithRef<'div'>;\n\nexport type AlertDialogPopupProps = ComponentPropsWithRef<'div'> & {\n initialFocus?: BasePopupProps['initialFocus'];\n finalFocus?: BasePopupProps['finalFocus'];\n};\n\nexport type AlertDialogTitleProps = ComponentPropsWithRef<'h2'>;\n\nexport type AlertDialogDescriptionProps = ComponentPropsWithRef<'p'>;\n\nexport type AlertDialogCloseProps = ComponentPropsWithRef<'button'>;\n\nexport const AlertDialogRootDefinition = defineComponent<AlertDialogRootProps>({\n name: 'AlertDialogRoot',\n importPath: '@vtex/faststore/components',\n component: AlertDialogRoot,\n editor: { label: 'Alert Dialog Root', category: 'layout' },\n schema: {},\n guideline:\n 'Root of a confirmation prompt for an irreversible action. Compose as: AlertDialogRoot > (AlertDialogTrigger + AlertDialogPortal > (AlertDialogBackdrop + AlertDialogViewport > AlertDialogPopup > (AlertDialogTitle + AlertDialogDescription + AlertDialogClose + your confirm Button))). Always modal and never closes on an outside click; only Escape or an AlertDialogClose dismisses it. Use Dialog instead when a stray click may close the overlay.',\n});\n\nexport const AlertDialogTriggerDefinition = defineComponent<AlertDialogTriggerProps>({\n name: 'AlertDialogTrigger',\n importPath: '@vtex/faststore/components',\n component: AlertDialogTrigger,\n editor: { label: 'Alert Dialog Trigger', category: 'action' },\n schema: {},\n guideline:\n 'Opens the alert dialog when clicked. Direct child of AlertDialogRoot. Accepts any children (text, Icon). Base UI connects it to AlertDialogRoot via context — no explicit wiring needed.',\n});\n\nexport const AlertDialogPortalDefinition = defineComponent<AlertDialogPortalProps>({\n name: 'AlertDialogPortal',\n importPath: '@vtex/faststore/components',\n component: AlertDialogPortal,\n editor: { label: 'Alert Dialog Portal', category: 'layout' },\n schema: {},\n guideline:\n 'Renders its children outside the DOM tree (into document.body). Place AlertDialogBackdrop and AlertDialogViewport as direct children, in that order.',\n});\n\nexport const AlertDialogBackdropDefinition = defineComponent<AlertDialogBackdropProps>({\n name: 'AlertDialogBackdrop',\n importPath: '@vtex/faststore/components',\n component: AlertDialogBackdrop,\n editor: { label: 'Alert Dialog Backdrop', category: 'layout' },\n schema: {},\n guideline:\n 'Semi-transparent overlay behind the popup. Direct child of AlertDialogPortal, before AlertDialogViewport. Clicking it does not close the alert dialog.',\n});\n\nexport const AlertDialogViewportDefinition = defineComponent<AlertDialogViewportProps>({\n name: 'AlertDialogViewport',\n importPath: '@vtex/faststore/components',\n component: AlertDialogViewport,\n editor: { label: 'Alert Dialog Viewport', category: 'layout' },\n schema: {},\n guideline:\n 'Positioning container for AlertDialogPopup. Direct child of AlertDialogPortal, after AlertDialogBackdrop. Apply fixed positioning and centering here (e.g. fixed inset-0 flex items-center justify-center). Place AlertDialogPopup inside.',\n});\n\nexport const AlertDialogPopupDefinition = defineComponent<AlertDialogPopupProps>({\n name: 'AlertDialogPopup',\n importPath: '@vtex/faststore/components',\n component: AlertDialogPopup,\n editor: { label: 'Alert Dialog Popup', category: 'layout' },\n schema: {},\n guideline:\n 'The visible prompt, inside AlertDialogViewport, with role alertdialog. Place AlertDialogTitle (required), AlertDialogDescription, an AlertDialogClose for cancel, and a confirm Button inside. Focus starts on the first focusable element, except when opened by touch, where Base UI focuses the popup itself: put the cancel control first, and pass initialFocus (a ref) when Cancel must receive focus for every kind of interaction.',\n});\n\nexport const AlertDialogTitleDefinition = defineComponent<AlertDialogTitleProps>({\n name: 'AlertDialogTitle',\n importPath: '@vtex/faststore/components',\n component: AlertDialogTitle,\n editor: { label: 'Alert Dialog Title', category: 'layout' },\n schema: {},\n guideline:\n 'Required heading inside AlertDialogPopup — sets the accessible name of the alert dialog for screen readers. State the question, e.g. \"Delete this address?\".',\n});\n\nexport const AlertDialogDescriptionDefinition = defineComponent<AlertDialogDescriptionProps>({\n name: 'AlertDialogDescription',\n importPath: '@vtex/faststore/components',\n component: AlertDialogDescription,\n editor: { label: 'Alert Dialog Description', category: 'layout' },\n schema: {},\n guideline:\n 'Description inside AlertDialogPopup, after AlertDialogTitle. Screen readers announce it with the prompt, so use it to state the consequence of confirming.',\n});\n\nexport const AlertDialogCloseDefinition = defineComponent<AlertDialogCloseProps>({\n name: 'AlertDialogClose',\n importPath: '@vtex/faststore/components',\n component: AlertDialogClose,\n editor: { label: 'Alert Dialog Close', category: 'action' },\n schema: {},\n guideline:\n 'Closes the alert dialog when clicked. Use it for the cancel control inside AlertDialogPopup. The confirm control is a separate Button that runs the consumer action.',\n});\n\nexport function AlertDialogRoot({ open, defaultOpen, onOpenChange, children }: AlertDialogRootProps) {\n return (\n <BaseAlertDialog.Root open={open} defaultOpen={defaultOpen} onOpenChange={onOpenChange}>\n {children}\n </BaseAlertDialog.Root>\n );\n}\n\nexport function AlertDialogTrigger({ className, children, ...props }: AlertDialogTriggerProps) {\n return (\n <BaseAlertDialog.Trigger {...props} className={className} data-fs-alert-dialog-trigger=\"\">\n {children}\n </BaseAlertDialog.Trigger>\n );\n}\n\nexport function AlertDialogPortal({ children }: AlertDialogPortalProps) {\n return <BaseAlertDialog.Portal>{children}</BaseAlertDialog.Portal>;\n}\n\nexport function AlertDialogBackdrop({ className, children, ...props }: AlertDialogBackdropProps) {\n return (\n <BaseAlertDialog.Backdrop {...props} className={className} data-fs-alert-dialog-backdrop=\"\">\n {children}\n </BaseAlertDialog.Backdrop>\n );\n}\n\nexport function AlertDialogViewport({ className, children, ...props }: AlertDialogViewportProps) {\n return (\n <div {...props} className={className} data-fs-alert-dialog-viewport=\"\">\n {children}\n </div>\n );\n}\n\nexport function AlertDialogPopup({ className, children, ...props }: AlertDialogPopupProps) {\n return (\n <BaseAlertDialog.Popup {...props} className={className} data-fs-alert-dialog-popup=\"\">\n {children}\n </BaseAlertDialog.Popup>\n );\n}\n\nexport function AlertDialogTitle({ className, children, ...props }: AlertDialogTitleProps) {\n return (\n <BaseAlertDialog.Title {...props} className={className} data-fs-alert-dialog-title=\"\">\n {children}\n </BaseAlertDialog.Title>\n );\n}\n\nexport function AlertDialogDescription({ className, children, ...props }: AlertDialogDescriptionProps) {\n return (\n <BaseAlertDialog.Description {...props} className={className} data-fs-alert-dialog-description=\"\">\n {children}\n </BaseAlertDialog.Description>\n );\n}\n\nexport function AlertDialogClose({ className, children, ...props }: AlertDialogCloseProps) {\n return (\n <BaseAlertDialog.Close {...props} className={className} data-fs-alert-dialog-close=\"\">\n {children}\n </BaseAlertDialog.Close>\n );\n}\n\nexport const AlertDialog = {\n Root: AlertDialogRoot,\n Trigger: AlertDialogTrigger,\n Portal: AlertDialogPortal,\n Backdrop: AlertDialogBackdrop,\n Viewport: AlertDialogViewport,\n Popup: AlertDialogPopup,\n Title: AlertDialogTitle,\n Description: AlertDialogDescription,\n Close: AlertDialogClose,\n};\n"],"mappings":"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"}
@@ -1,8 +1,10 @@
1
1
  import { ComponentDefinition } from "../../core/dist/define-component.js";
2
2
  import "../../core/dist/index.js";
3
- import { ComponentPropsWithRef, ReactNode } from "react";
3
+ import { ComponentPropsWithRef, ReactNode, Ref } from "react";
4
4
  //#region src/particles/checkbox/checkbox.d.ts
5
- export type CheckboxRootProps = {
5
+ export type CheckboxRootProps = Omit<ComponentPropsWithRef<'span'>, 'defaultValue' | 'defaultChecked' | 'onChange' | 'ref' | 'dangerouslySetInnerHTML'> & {
6
+ /** The rendered host element is a span; Base UI types its forwarded ref as HTMLElement because `render` can replace it. */
7
+ ref?: Ref<HTMLElement>;
6
8
  checked?: boolean;
7
9
  defaultChecked?: boolean;
8
10
  onCheckedChange?: (checked: boolean) => void;
@@ -15,6 +17,8 @@ export type CheckboxRootProps = {
15
17
  id?: string;
16
18
  className?: string;
17
19
  children?: ReactNode;
20
+ /** Id of the element this checkbox shows, hides or changes; forwarded to the `role="checkbox"` element. */
21
+ 'aria-controls'?: string;
18
22
  };
19
23
  export type CheckboxIndicatorProps = ComponentPropsWithRef<'span'> & {
20
24
  keepMounted?: boolean;
@@ -29,7 +33,7 @@ export type CheckboxGroupProps = Omit<ComponentPropsWithRef<'div'>, 'defaultValu
29
33
  export declare const CheckboxRootDefinition: ComponentDefinition<CheckboxRootProps>;
30
34
  export declare const CheckboxIndicatorDefinition: ComponentDefinition<CheckboxIndicatorProps>;
31
35
  export declare const CheckboxGroupDefinition: ComponentDefinition<CheckboxGroupProps>;
32
- export declare function CheckboxRoot({ checked, defaultChecked, onCheckedChange, indeterminate, disabled, readOnly, required, name, value, id, className, children }: CheckboxRootProps): import("react/jsx-runtime").JSX.Element;
36
+ export declare function CheckboxRoot({ checked, defaultChecked, onCheckedChange, indeterminate, disabled, readOnly, required, name, value, id, className, children, 'aria-controls': ariaControls, ref, ...props }: CheckboxRootProps): import("react/jsx-runtime").JSX.Element;
33
37
  export declare function CheckboxIndicator({ keepMounted, className, children, ...props }: CheckboxIndicatorProps): import("react/jsx-runtime").JSX.Element;
34
38
  export declare function CheckboxGroup({ className, children, ...props }: CheckboxGroupProps): import("react/jsx-runtime").JSX.Element;
35
39
  export declare const Checkbox: {
@@ -38,8 +38,10 @@ const CheckboxGroupDefinition = defineComponent({
38
38
  schema: {},
39
39
  guideline: "Shared state container for a series of checkboxes. Use allValues to enable select-all behavior. Contains Checkbox.Root children with individual value props."
40
40
  });
41
- function CheckboxRoot({ checked, defaultChecked, onCheckedChange, indeterminate, disabled, readOnly, required, name, value, id, className, children }) {
41
+ function CheckboxRoot({ checked, defaultChecked, onCheckedChange, indeterminate, disabled, readOnly, required, name, value, id, className, children, "aria-controls": ariaControls, ref, ...props }) {
42
42
  return /* @__PURE__ */ jsx(Checkbox.Root, {
43
+ ...props,
44
+ ref,
43
45
  checked,
44
46
  defaultChecked,
45
47
  onCheckedChange,
@@ -51,6 +53,7 @@ function CheckboxRoot({ checked, defaultChecked, onCheckedChange, indeterminate,
51
53
  value,
52
54
  id,
53
55
  className,
56
+ "aria-controls": ariaControls,
54
57
  "data-fs-checkbox-root": "",
55
58
  children
56
59
  });
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox.js","names":["CheckboxGroup","BaseCheckbox","BaseCheckboxGroup","Checkbox"],"sources":["../../../src/particles/checkbox/checkbox.tsx"],"sourcesContent":["'use client';\nimport { Checkbox as BaseCheckbox } from '@base-ui/react/checkbox';\nimport { CheckboxGroup as BaseCheckboxGroup } from '@base-ui/react/checkbox-group';\nimport { defineComponent } from '@vtex/fs-core';\nimport type { ComponentPropsWithRef, ReactNode } from 'react';\n\nexport type CheckboxRootProps = {\n checked?: boolean;\n defaultChecked?: boolean;\n onCheckedChange?: (checked: boolean) => void;\n indeterminate?: boolean;\n disabled?: boolean;\n readOnly?: boolean;\n required?: boolean;\n name?: string;\n value?: string;\n id?: string;\n className?: string;\n children?: ReactNode;\n};\n\nexport type CheckboxIndicatorProps = ComponentPropsWithRef<'span'> & {\n keepMounted?: boolean;\n};\n\nexport type CheckboxGroupProps = Omit<ComponentPropsWithRef<'div'>, 'defaultValue'> & {\n value?: string[];\n defaultValue?: string[];\n onValueChange?: (value: string[]) => void;\n allValues?: string[];\n disabled?: boolean;\n};\n\nexport const CheckboxRootDefinition = defineComponent<CheckboxRootProps>({\n name: 'CheckboxRoot',\n importPath: '@vtex/faststore/components',\n component: CheckboxRoot,\n editor: { label: 'Checkbox Root', category: 'action' },\n schema: {},\n guideline:\n 'Form checkbox that integrates with Field for labeling and validation. Requires a Checkbox.Indicator child for visual state. Use indeterminate for partial selection in nested lists.',\n});\n\nexport const CheckboxIndicatorDefinition = defineComponent<CheckboxIndicatorProps>({\n name: 'CheckboxIndicator',\n importPath: '@vtex/faststore/components',\n component: CheckboxIndicator,\n editor: { label: 'Checkbox Indicator', category: 'layout' },\n schema: {},\n guideline:\n 'Visual indicator inside Checkbox.Root showing checked/indeterminate state. Render a checkmark SVG as a child. Visible only when checked or indeterminate via data-checked/data-indeterminate.',\n});\n\nexport const CheckboxGroupDefinition = defineComponent<CheckboxGroupProps>({\n name: 'CheckboxGroup',\n importPath: '@vtex/faststore/components',\n component: CheckboxGroup,\n editor: { label: 'Checkbox Group', category: 'layout' },\n schema: {},\n guideline:\n 'Shared state container for a series of checkboxes. Use allValues to enable select-all behavior. Contains Checkbox.Root children with individual value props.',\n});\n\nexport function CheckboxRoot({\n checked,\n defaultChecked,\n onCheckedChange,\n indeterminate,\n disabled,\n readOnly,\n required,\n name,\n value,\n id,\n className,\n children,\n}: CheckboxRootProps) {\n return (\n <BaseCheckbox.Root\n checked={checked}\n defaultChecked={defaultChecked}\n onCheckedChange={onCheckedChange}\n indeterminate={indeterminate}\n disabled={disabled}\n readOnly={readOnly}\n required={required}\n name={name}\n value={value}\n id={id}\n className={className}\n data-fs-checkbox-root=\"\"\n >\n {children}\n </BaseCheckbox.Root>\n );\n}\n\nexport function CheckboxIndicator({ keepMounted = false, className, children, ...props }: CheckboxIndicatorProps) {\n return (\n <BaseCheckbox.Indicator {...props} keepMounted={keepMounted} className={className} data-fs-checkbox-indicator=\"\">\n {children}\n </BaseCheckbox.Indicator>\n );\n}\n\nexport function CheckboxGroup({ className, children, ...props }: CheckboxGroupProps) {\n return (\n <BaseCheckboxGroup {...props} className={className} data-fs-checkbox-group=\"\">\n {children}\n </BaseCheckboxGroup>\n );\n}\n\nexport const Checkbox = {\n Root: CheckboxRoot,\n Indicator: CheckboxIndicator,\n};\n"],"mappings":";;;;;;;AAiCA,MAAa,yBAAyB,gBAAmC;CACvE,MAAM;CACN,YAAY;CACZ,WAAW;CACX,QAAQ;EAAE,OAAO;EAAiB,UAAU;CAAS;CACrD,QAAQ,CAAC;CACT,WACE;AACJ,CAAC;AAED,MAAa,8BAA8B,gBAAwC;CACjF,MAAM;CACN,YAAY;CACZ,WAAW;CACX,QAAQ;EAAE,OAAO;EAAsB,UAAU;CAAS;CAC1D,QAAQ,CAAC;CACT,WACE;AACJ,CAAC;AAED,MAAa,0BAA0B,gBAAoC;CACzE,MAAM;CACN,YAAY;CACZ,WAAWA;CACX,QAAQ;EAAE,OAAO;EAAkB,UAAU;CAAS;CACtD,QAAQ,CAAC;CACT,WACE;AACJ,CAAC;AAED,SAAgB,aAAa,EAC3B,SACA,gBACA,iBACA,eACA,UACA,UACA,UACA,MACA,OACA,IACA,WACA,YACoB;CACpB,OACE,oBAACC,SAAa,MAAd;EACW;EACO;EACC;EACF;EACL;EACA;EACA;EACJ;EACC;EACH;EACO;EACX,yBAAsB;EAErB;CACgB,CAAA;AAEvB;AAEA,SAAgB,kBAAkB,EAAE,cAAc,OAAO,WAAW,UAAU,GAAG,SAAiC;CAChH,OACE,oBAACA,SAAa,WAAd;EAAwB,GAAI;EAAoB;EAAwB;EAAW,8BAA2B;EAC3G;CACqB,CAAA;AAE5B;AAEA,SAAgBD,gBAAc,EAAE,WAAW,UAAU,GAAG,SAA6B;CACnF,OACE,oBAACE,eAAD;EAAmB,GAAI;EAAkB;EAAW,0BAAuB;EACxE;CACgB,CAAA;AAEvB;AAEA,MAAaC,aAAW;CACtB,MAAM;CACN,WAAW;AACb"}
1
+ {"version":3,"file":"checkbox.js","names":["CheckboxGroup","BaseCheckbox","BaseCheckboxGroup","Checkbox"],"sources":["../../../src/particles/checkbox/checkbox.tsx"],"sourcesContent":["'use client';\nimport { Checkbox as BaseCheckbox } from '@base-ui/react/checkbox';\nimport { CheckboxGroup as BaseCheckboxGroup } from '@base-ui/react/checkbox-group';\nimport { defineComponent } from '@vtex/fs-core';\nimport type { ComponentPropsWithRef, ReactNode, Ref } from 'react';\n\n// The twelve members below, over the span props Base UI's own `CheckboxRoot` already accepts, so\n// `ref`, `onBlur` and any `data-*` attribute reach the rendered host element through a rest spread.\n// `dangerouslySetInnerHTML` is excluded — the rest spread otherwise forwards it straight onto the\n// rendered `<span>`, and a schema-authored `page.json` can supply it with no allowlist in between.\nexport type CheckboxRootProps = Omit<\n ComponentPropsWithRef<'span'>,\n 'defaultValue' | 'defaultChecked' | 'onChange' | 'ref' | 'dangerouslySetInnerHTML'\n> & {\n /** The rendered host element is a span; Base UI types its forwarded ref as HTMLElement because `render` can replace it. */\n ref?: Ref<HTMLElement>;\n checked?: boolean;\n defaultChecked?: boolean;\n onCheckedChange?: (checked: boolean) => void;\n indeterminate?: boolean;\n disabled?: boolean;\n readOnly?: boolean;\n required?: boolean;\n name?: string;\n value?: string;\n id?: string;\n className?: string;\n children?: ReactNode;\n /** Id of the element this checkbox shows, hides or changes; forwarded to the `role=\"checkbox\"` element. */\n 'aria-controls'?: string;\n};\n\nexport type CheckboxIndicatorProps = ComponentPropsWithRef<'span'> & {\n keepMounted?: boolean;\n};\n\nexport type CheckboxGroupProps = Omit<ComponentPropsWithRef<'div'>, 'defaultValue'> & {\n value?: string[];\n defaultValue?: string[];\n onValueChange?: (value: string[]) => void;\n allValues?: string[];\n disabled?: boolean;\n};\n\nexport const CheckboxRootDefinition = defineComponent<CheckboxRootProps>({\n name: 'CheckboxRoot',\n importPath: '@vtex/faststore/components',\n component: CheckboxRoot,\n editor: { label: 'Checkbox Root', category: 'action' },\n schema: {},\n guideline:\n 'Form checkbox that integrates with Field for labeling and validation. Requires a Checkbox.Indicator child for visual state. Use indeterminate for partial selection in nested lists.',\n});\n\nexport const CheckboxIndicatorDefinition = defineComponent<CheckboxIndicatorProps>({\n name: 'CheckboxIndicator',\n importPath: '@vtex/faststore/components',\n component: CheckboxIndicator,\n editor: { label: 'Checkbox Indicator', category: 'layout' },\n schema: {},\n guideline:\n 'Visual indicator inside Checkbox.Root showing checked/indeterminate state. Render a checkmark SVG as a child. Visible only when checked or indeterminate via data-checked/data-indeterminate.',\n});\n\nexport const CheckboxGroupDefinition = defineComponent<CheckboxGroupProps>({\n name: 'CheckboxGroup',\n importPath: '@vtex/faststore/components',\n component: CheckboxGroup,\n editor: { label: 'Checkbox Group', category: 'layout' },\n schema: {},\n guideline:\n 'Shared state container for a series of checkboxes. Use allValues to enable select-all behavior. Contains Checkbox.Root children with individual value props.',\n});\n\nexport function CheckboxRoot({\n checked,\n defaultChecked,\n onCheckedChange,\n indeterminate,\n disabled,\n readOnly,\n required,\n name,\n value,\n id,\n className,\n children,\n 'aria-controls': ariaControls,\n ref,\n ...props\n}: CheckboxRootProps) {\n return (\n <BaseCheckbox.Root\n {...props}\n ref={ref}\n checked={checked}\n defaultChecked={defaultChecked}\n onCheckedChange={onCheckedChange}\n indeterminate={indeterminate}\n disabled={disabled}\n readOnly={readOnly}\n required={required}\n name={name}\n value={value}\n id={id}\n className={className}\n aria-controls={ariaControls}\n data-fs-checkbox-root=\"\"\n >\n {children}\n </BaseCheckbox.Root>\n );\n}\n\nexport function CheckboxIndicator({ keepMounted = false, className, children, ...props }: CheckboxIndicatorProps) {\n return (\n <BaseCheckbox.Indicator {...props} keepMounted={keepMounted} className={className} data-fs-checkbox-indicator=\"\">\n {children}\n </BaseCheckbox.Indicator>\n );\n}\n\nexport function CheckboxGroup({ className, children, ...props }: CheckboxGroupProps) {\n return (\n <BaseCheckboxGroup {...props} className={className} data-fs-checkbox-group=\"\">\n {children}\n </BaseCheckboxGroup>\n );\n}\n\nexport const Checkbox = {\n Root: CheckboxRoot,\n Indicator: CheckboxIndicator,\n};\n"],"mappings":";;;;;;;AA4CA,MAAa,yBAAyB,gBAAmC;CACvE,MAAM;CACN,YAAY;CACZ,WAAW;CACX,QAAQ;EAAE,OAAO;EAAiB,UAAU;CAAS;CACrD,QAAQ,CAAC;CACT,WACE;AACJ,CAAC;AAED,MAAa,8BAA8B,gBAAwC;CACjF,MAAM;CACN,YAAY;CACZ,WAAW;CACX,QAAQ;EAAE,OAAO;EAAsB,UAAU;CAAS;CAC1D,QAAQ,CAAC;CACT,WACE;AACJ,CAAC;AAED,MAAa,0BAA0B,gBAAoC;CACzE,MAAM;CACN,YAAY;CACZ,WAAWA;CACX,QAAQ;EAAE,OAAO;EAAkB,UAAU;CAAS;CACtD,QAAQ,CAAC;CACT,WACE;AACJ,CAAC;AAED,SAAgB,aAAa,EAC3B,SACA,gBACA,iBACA,eACA,UACA,UACA,UACA,MACA,OACA,IACA,WACA,UACA,iBAAiB,cACjB,KACA,GAAG,SACiB;CACpB,OACE,oBAACC,SAAa,MAAd;EACE,GAAI;EACC;EACI;EACO;EACC;EACF;EACL;EACA;EACA;EACJ;EACC;EACH;EACO;EACX,iBAAe;EACf,yBAAsB;EAErB;CACgB,CAAA;AAEvB;AAEA,SAAgB,kBAAkB,EAAE,cAAc,OAAO,WAAW,UAAU,GAAG,SAAiC;CAChH,OACE,oBAACA,SAAa,WAAd;EAAwB,GAAI;EAAoB;EAAwB;EAAW,8BAA2B;EAC3G;CACqB,CAAA;AAE5B;AAEA,SAAgBD,gBAAc,EAAE,WAAW,UAAU,GAAG,SAA6B;CACnF,OACE,oBAACE,eAAD;EAAmB,GAAI;EAAkB;EAAW,0BAAuB;EACxE;CACgB,CAAA;AAEvB;AAEA,MAAaC,aAAW;CACtB,MAAM;CACN,WAAW;AACb"}