@shopify/ui-extensions 2025.10.0-rc.45 → 2025.10.0-rc.47

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 (304) hide show
  1. package/build/cjs/surfaces/checkout/preact/api.js +1 -1
  2. package/build/cjs/surfaces/checkout/shared.js +1 -1
  3. package/build/esm/surfaces/checkout/preact/api.mjs +1 -1
  4. package/build/esm/surfaces/checkout/shared.mjs +1 -1
  5. package/build/esnext/surfaces/checkout/preact/api.esnext +1 -1
  6. package/build/esnext/surfaces/checkout/shared.esnext +1 -1
  7. package/build/ts/docs/shared/components/ConsentCheckbox.d.ts +4 -0
  8. package/build/ts/docs/shared/components/ConsentCheckbox.d.ts.map +1 -0
  9. package/build/ts/docs/shared/components/ConsentPhoneField.d.ts +4 -0
  10. package/build/ts/docs/shared/components/ConsentPhoneField.d.ts.map +1 -0
  11. package/build/ts/docs/shared/components/index.d.ts +2 -0
  12. package/build/ts/docs/shared/components/index.d.ts.map +1 -1
  13. package/build/ts/surfaces/checkout/components/ConsentCheckbox/ConsentCheckbox.doc.d.ts +4 -0
  14. package/build/ts/surfaces/checkout/components/ConsentCheckbox/ConsentCheckbox.doc.d.ts.map +1 -0
  15. package/build/ts/surfaces/checkout/components/ConsentCheckbox.d.ts +84 -0
  16. package/build/ts/surfaces/checkout/components/ConsentPhoneField/ConsentPhoneField.doc.d.ts +4 -0
  17. package/build/ts/surfaces/checkout/components/ConsentPhoneField/ConsentPhoneField.doc.d.ts.map +1 -0
  18. package/build/ts/surfaces/checkout/components/ConsentPhoneField.d.ts +129 -0
  19. package/build/ts/surfaces/checkout/components/NumberField/NumberField.doc.d.ts +4 -0
  20. package/build/ts/surfaces/checkout/components/NumberField/NumberField.doc.d.ts.map +1 -0
  21. package/build/ts/surfaces/checkout/components/NumberField.d.ts +98 -0
  22. package/build/ts/surfaces/checkout/components/PasswordField.d.ts +1 -1
  23. package/build/ts/surfaces/checkout/components/components-shared.d.ts +17 -0
  24. package/build/ts/surfaces/checkout/components/components.d.ts +216 -144
  25. package/build/ts/surfaces/checkout/shared.d.ts +1 -1
  26. package/build/ts/surfaces/checkout/shared.d.ts.map +1 -1
  27. package/build/ts/surfaces/checkout/targets/Checkout::Actions::RenderBefore.d.ts +3 -0
  28. package/build/ts/surfaces/checkout/targets/Checkout::CartLineDetails::RenderAfter.d.ts +3 -0
  29. package/build/ts/surfaces/checkout/targets/Checkout::CartLineDetails::RenderLineComponents.d.ts +3 -0
  30. package/build/ts/surfaces/checkout/targets/Checkout::CartLines::RenderAfter.d.ts +3 -0
  31. package/build/ts/surfaces/checkout/targets/Checkout::Contact::RenderAfter.d.ts +3 -0
  32. package/build/ts/surfaces/checkout/targets/Checkout::CustomerInformation::RenderAfter.d.ts +3 -0
  33. package/build/ts/surfaces/checkout/targets/Checkout::DeliveryAddress::RenderBefore.d.ts +3 -0
  34. package/build/ts/surfaces/checkout/targets/Checkout::Dynamic::Render.d.ts +3 -0
  35. package/build/ts/surfaces/checkout/targets/Checkout::GiftCard::Render.d.ts +3 -0
  36. package/build/ts/surfaces/checkout/targets/Checkout::PaymentMethod::HostedFields::RenderAfter.d.ts +3 -0
  37. package/build/ts/surfaces/checkout/targets/Checkout::PaymentMethod::Render.d.ts +3 -0
  38. package/build/ts/surfaces/checkout/targets/Checkout::PaymentMethod::RenderRequiredAction.d.ts +3 -0
  39. package/build/ts/surfaces/checkout/targets/Checkout::PickupLocations::RenderAfter.d.ts +3 -0
  40. package/build/ts/surfaces/checkout/targets/Checkout::PickupLocations::RenderBefore.d.ts +3 -0
  41. package/build/ts/surfaces/checkout/targets/Checkout::PickupPoints::RenderAfter.d.ts +3 -0
  42. package/build/ts/surfaces/checkout/targets/Checkout::PickupPoints::RenderBefore.d.ts +3 -0
  43. package/build/ts/surfaces/checkout/targets/Checkout::Reductions::RenderAfter.d.ts +3 -0
  44. package/build/ts/surfaces/checkout/targets/Checkout::Reductions::RenderBefore.d.ts +3 -0
  45. package/build/ts/surfaces/checkout/targets/Checkout::ShippingMethodDetails::RenderAfter.d.ts +3 -0
  46. package/build/ts/surfaces/checkout/targets/Checkout::ShippingMethodDetails::RenderExpanded.d.ts +3 -0
  47. package/build/ts/surfaces/checkout/targets/Checkout::ShippingMethods::RenderAfter.d.ts +3 -0
  48. package/build/ts/surfaces/checkout/targets/Checkout::ShippingMethods::RenderBefore.d.ts +3 -0
  49. package/build/ts/surfaces/checkout/targets/Checkout::ThankYou::CartLineDetails::RenderAfter.d.ts +3 -0
  50. package/build/ts/surfaces/checkout/targets/Checkout::ThankYou::CartLines::RenderAfter.d.ts +3 -0
  51. package/build/ts/surfaces/checkout/targets/Checkout::ThankYou::CustomerInformation::RenderAfter.d.ts +3 -0
  52. package/build/ts/surfaces/checkout/targets/Checkout::ThankYou::Dynamic::Render.d.ts +3 -0
  53. package/build/ts/surfaces/checkout/targets/purchase.cart-line-item.line-components.render.d.ts +3 -0
  54. package/build/ts/surfaces/checkout/targets/purchase.checkout.actions.render-before.d.ts +3 -0
  55. package/build/ts/surfaces/checkout/targets/purchase.checkout.block.render.d.ts +3 -0
  56. package/build/ts/surfaces/checkout/targets/purchase.checkout.cart-line-item.render-after.d.ts +3 -0
  57. package/build/ts/surfaces/checkout/targets/purchase.checkout.cart-line-list.render-after.d.ts +3 -0
  58. package/build/ts/surfaces/checkout/targets/purchase.checkout.contact.render-after.d.ts +3 -0
  59. package/build/ts/surfaces/checkout/targets/purchase.checkout.delivery-address.render-after.d.ts +3 -0
  60. package/build/ts/surfaces/checkout/targets/purchase.checkout.delivery-address.render-before.d.ts +3 -0
  61. package/build/ts/surfaces/checkout/targets/purchase.checkout.footer.render-after.d.ts +3 -0
  62. package/build/ts/surfaces/checkout/targets/purchase.checkout.gift-card.render.d.ts +3 -0
  63. package/build/ts/surfaces/checkout/targets/purchase.checkout.header.render-after.d.ts +3 -0
  64. package/build/ts/surfaces/checkout/targets/purchase.checkout.payment-method-list.render-after.d.ts +3 -0
  65. package/build/ts/surfaces/checkout/targets/purchase.checkout.payment-method-list.render-before.d.ts +3 -0
  66. package/build/ts/surfaces/checkout/targets/purchase.checkout.payment-option-item.action-required.render.d.ts +3 -0
  67. package/build/ts/surfaces/checkout/targets/purchase.checkout.payment-option-item.details.render.d.ts +3 -0
  68. package/build/ts/surfaces/checkout/targets/purchase.checkout.payment-option-item.hosted-fields.render-after.d.ts +3 -0
  69. package/build/ts/surfaces/checkout/targets/purchase.checkout.pickup-location-list.render-after.d.ts +3 -0
  70. package/build/ts/surfaces/checkout/targets/purchase.checkout.pickup-location-list.render-before.d.ts +3 -0
  71. package/build/ts/surfaces/checkout/targets/purchase.checkout.pickup-location-option-item.render-after.d.ts +3 -0
  72. package/build/ts/surfaces/checkout/targets/purchase.checkout.pickup-point-list.render-after.d.ts +3 -0
  73. package/build/ts/surfaces/checkout/targets/purchase.checkout.pickup-point-list.render-before.d.ts +3 -0
  74. package/build/ts/surfaces/checkout/targets/purchase.checkout.reductions.render-after.d.ts +3 -0
  75. package/build/ts/surfaces/checkout/targets/purchase.checkout.reductions.render-before.d.ts +3 -0
  76. package/build/ts/surfaces/checkout/targets/purchase.checkout.shipping-option-item.details.render.d.ts +3 -0
  77. package/build/ts/surfaces/checkout/targets/purchase.checkout.shipping-option-item.render-after.d.ts +3 -0
  78. package/build/ts/surfaces/checkout/targets/purchase.checkout.shipping-option-list.render-after.d.ts +3 -0
  79. package/build/ts/surfaces/checkout/targets/purchase.checkout.shipping-option-list.render-before.d.ts +3 -0
  80. package/build/ts/surfaces/checkout/targets/purchase.thank-you.announcement.render.d.ts +3 -0
  81. package/build/ts/surfaces/checkout/targets/purchase.thank-you.block.render.d.ts +3 -0
  82. package/build/ts/surfaces/checkout/targets/purchase.thank-you.cart-line-item.render-after.d.ts +3 -0
  83. package/build/ts/surfaces/checkout/targets/purchase.thank-you.cart-line-list.render-after.d.ts +3 -0
  84. package/build/ts/surfaces/checkout/targets/purchase.thank-you.customer-information.render-after.d.ts +3 -0
  85. package/build/ts/surfaces/checkout/targets/purchase.thank-you.footer.render-after.d.ts +3 -0
  86. package/build/ts/surfaces/checkout/targets/purchase.thank-you.header.render-after.d.ts +3 -0
  87. package/build/ts/surfaces/customer-account/components/ConsentCheckbox.d.ts +84 -0
  88. package/build/ts/surfaces/customer-account/components/ConsentPhoneField.d.ts +129 -0
  89. package/build/ts/surfaces/customer-account/components/NumberField.d.ts +98 -0
  90. package/build/ts/surfaces/customer-account/components/PasswordField.d.ts +1 -1
  91. package/build/ts/surfaces/customer-account/components/components-shared.d.ts +17 -0
  92. package/build/ts/surfaces/customer-account/components/components.d.ts +216 -144
  93. package/build/ts/surfaces/customer-account/targets/customer-account.footer.render-after.d.ts +3 -0
  94. package/build/ts/surfaces/customer-account/targets/customer-account.order-index.announcement.render.d.ts +3 -0
  95. package/build/ts/surfaces/customer-account/targets/customer-account.order-index.block.render.d.ts +3 -0
  96. package/build/ts/surfaces/customer-account/targets/customer-account.order-status.announcement.render.d.ts +3 -0
  97. package/build/ts/surfaces/customer-account/targets/customer-account.order-status.block.render.d.ts +3 -0
  98. package/build/ts/surfaces/customer-account/targets/customer-account.order-status.cart-line-item.render-after.d.ts +3 -0
  99. package/build/ts/surfaces/customer-account/targets/customer-account.order-status.cart-line-list.render-after.d.ts +3 -0
  100. package/build/ts/surfaces/customer-account/targets/customer-account.order-status.customer-information.render-after.d.ts +3 -0
  101. package/build/ts/surfaces/customer-account/targets/customer-account.order-status.fulfillment-details.render-after.d.ts +3 -0
  102. package/build/ts/surfaces/customer-account/targets/customer-account.order-status.payment-details.render-after.d.ts +3 -0
  103. package/build/ts/surfaces/customer-account/targets/customer-account.order-status.return-details.render-after.d.ts +3 -0
  104. package/build/ts/surfaces/customer-account/targets/customer-account.order-status.unfulfilled-items.render-after.d.ts +3 -0
  105. package/build/ts/surfaces/customer-account/targets/customer-account.order.action.menu-item.render.d.ts +3 -0
  106. package/build/ts/surfaces/customer-account/targets/customer-account.order.action.render.d.ts +3 -0
  107. package/build/ts/surfaces/customer-account/targets/customer-account.order.page.render.d.ts +3 -0
  108. package/build/ts/surfaces/customer-account/targets/customer-account.page.render.d.ts +3 -0
  109. package/build/ts/surfaces/customer-account/targets/customer-account.profile.addresses.render-after.d.ts +3 -0
  110. package/build/ts/surfaces/customer-account/targets/customer-account.profile.announcement.render.d.ts +3 -0
  111. package/build/ts/surfaces/customer-account/targets/customer-account.profile.block.render.d.ts +3 -0
  112. package/build/ts/surfaces/customer-account/targets/customer-account.profile.company-details.render-after.d.ts +3 -0
  113. package/build/ts/surfaces/customer-account/targets/customer-account.profile.company-location-addresses.render-after.d.ts +3 -0
  114. package/build/ts/surfaces/customer-account/targets/customer-account.profile.company-location-payment.render-after.d.ts +3 -0
  115. package/build/ts/surfaces/customer-account/targets/customer-account.profile.company-location-staff.render-after.d.ts +3 -0
  116. package/build/ts/surfaces/customer-account/targets/customer-account.profile.payment.render-after.d.ts +3 -0
  117. package/build/ts/surfaces/point-of-sale/components/Badge.d.ts +10 -1
  118. package/build/ts/surfaces/point-of-sale/components/Banner.d.ts +12 -4
  119. package/build/ts/surfaces/point-of-sale/components/Box.d.ts +51 -14
  120. package/build/ts/surfaces/point-of-sale/components/Button.d.ts +12 -2
  121. package/build/ts/surfaces/point-of-sale/components/Choice.d.ts +3 -2
  122. package/build/ts/surfaces/point-of-sale/components/ChoiceList/ChoiceList.doc.d.ts.map +1 -1
  123. package/build/ts/surfaces/point-of-sale/components/ChoiceList.d.ts +13 -4
  124. package/build/ts/surfaces/point-of-sale/components/Clickable.d.ts +11 -4
  125. package/build/ts/surfaces/point-of-sale/components/DateField/DateField.doc.d.ts.map +1 -1
  126. package/build/ts/surfaces/point-of-sale/components/DateField.d.ts +20 -13
  127. package/build/ts/surfaces/point-of-sale/components/DatePicker/DatePicker.doc.d.ts.map +1 -1
  128. package/build/ts/surfaces/point-of-sale/components/DatePicker.d.ts +16 -4
  129. package/build/ts/surfaces/point-of-sale/components/DateSpinner/DateSpinner.doc.d.ts.map +1 -1
  130. package/build/ts/surfaces/point-of-sale/components/DateSpinner.d.ts +16 -4
  131. package/build/ts/surfaces/point-of-sale/components/Divider/Divider.doc.d.ts +4 -0
  132. package/build/ts/surfaces/point-of-sale/components/Divider/Divider.doc.d.ts.map +1 -0
  133. package/build/ts/surfaces/point-of-sale/components/Divider.d.ts +4 -3
  134. package/build/ts/surfaces/point-of-sale/components/EmailField/EmailField.doc.d.ts.map +1 -1
  135. package/build/ts/surfaces/point-of-sale/components/EmailField.d.ts +22 -5
  136. package/build/ts/surfaces/point-of-sale/components/Heading.d.ts +7 -4
  137. package/build/ts/surfaces/point-of-sale/components/Icon.d.ts +13 -3
  138. package/build/ts/surfaces/point-of-sale/components/Image.d.ts +12 -5
  139. package/build/ts/surfaces/point-of-sale/components/Modal.d.ts +28 -7
  140. package/build/ts/surfaces/point-of-sale/components/NumberField/NumberField.doc.d.ts.map +1 -1
  141. package/build/ts/surfaces/point-of-sale/components/NumberField.d.ts +32 -23
  142. package/build/ts/surfaces/point-of-sale/components/Page.d.ts +25 -11
  143. package/build/ts/surfaces/point-of-sale/components/PosBlock.d.ts +12 -13
  144. package/build/ts/surfaces/point-of-sale/components/QrCode.d.ts +12 -8
  145. package/build/ts/surfaces/point-of-sale/components/ScrollBox.d.ts +47 -15
  146. package/build/ts/surfaces/point-of-sale/components/SearchField/SearchField.doc.d.ts.map +1 -1
  147. package/build/ts/surfaces/point-of-sale/components/SearchField.d.ts +17 -5
  148. package/build/ts/surfaces/point-of-sale/components/Section.d.ts +15 -9
  149. package/build/ts/surfaces/point-of-sale/components/Stack.d.ts +67 -7
  150. package/build/ts/surfaces/point-of-sale/components/Text.d.ts +25 -4
  151. package/build/ts/surfaces/point-of-sale/components/TextArea/TextArea.doc.d.ts.map +1 -1
  152. package/build/ts/surfaces/point-of-sale/components/TextArea.d.ts +22 -5
  153. package/build/ts/surfaces/point-of-sale/components/TextField/TextField.doc.d.ts.map +1 -1
  154. package/build/ts/surfaces/point-of-sale/components/TextField.d.ts +22 -5
  155. package/build/ts/surfaces/point-of-sale/components/Tile.d.ts +12 -2
  156. package/build/ts/surfaces/point-of-sale/components/TimeField/TimeField.doc.d.ts.map +1 -1
  157. package/build/ts/surfaces/point-of-sale/components/TimeField.d.ts +18 -6
  158. package/build/ts/surfaces/point-of-sale/components/TimePicker/TimePicker.doc.d.ts.map +1 -1
  159. package/build/ts/surfaces/point-of-sale/components/TimePicker.d.ts +16 -4
  160. package/build/ts/surfaces/point-of-sale/components/components-shared.d.ts +102 -1
  161. package/build/tsconfig.tsbuildinfo +1 -1
  162. package/package.json +14 -3
  163. package/src/docs/shared/components/ConsentCheckbox.ts +12 -0
  164. package/src/docs/shared/components/ConsentPhoneField.ts +12 -0
  165. package/src/docs/shared/components/index.ts +2 -0
  166. package/src/surfaces/checkout/components/ConsentCheckbox/examples/basic-consent-checkbox.example.html +5 -0
  167. package/src/surfaces/checkout/components/ConsentCheckbox.d.ts +84 -0
  168. package/src/surfaces/checkout/components/ConsentPhoneField/examples/basic-consent-phone-field.example.html +5 -0
  169. package/src/surfaces/checkout/components/ConsentPhoneField.d.ts +129 -0
  170. package/src/surfaces/checkout/components/NumberField/examples/basic-number-field.example.html +8 -0
  171. package/src/surfaces/checkout/components/NumberField.d.ts +98 -0
  172. package/src/surfaces/checkout/components/PasswordField.d.ts +1 -1
  173. package/src/surfaces/checkout/components/PhoneField/examples/basic-phone-field.example.html +2 -1
  174. package/src/surfaces/checkout/components/ProductThumbnail/examples/basic-product-thumbnail.example.html +4 -1
  175. package/src/surfaces/checkout/components/Stack/examples/basic-stack.example.html +20 -4
  176. package/src/surfaces/checkout/components/TextArea/examples/basic-text-area.example.html +5 -1
  177. package/src/surfaces/checkout/components/TextField/examples/basic-text-field.example.html +4 -1
  178. package/src/surfaces/checkout/components/components-shared.d.ts +17 -0
  179. package/src/surfaces/checkout/components/components.d.ts +216 -144
  180. package/src/surfaces/checkout/preact/api.ts +1 -1
  181. package/src/surfaces/checkout/preact/tests/api.test.tsx +22 -13
  182. package/src/surfaces/checkout/preact/tests/app-metafields.test.ts +52 -56
  183. package/src/surfaces/checkout/preact/tests/attributes.test.ts +34 -24
  184. package/src/surfaces/checkout/preact/tests/billing-address.test.ts +17 -7
  185. package/src/surfaces/checkout/preact/tests/buyer-identity-businessCustomer.test.ts +16 -9
  186. package/src/surfaces/checkout/preact/tests/buyer-identity.test.tsx +57 -26
  187. package/src/surfaces/checkout/preact/tests/buyer-journey.test.ts +71 -74
  188. package/src/surfaces/checkout/preact/tests/capabilities.test.ts +32 -28
  189. package/src/surfaces/checkout/preact/tests/cart-line-target.test.ts +31 -24
  190. package/src/surfaces/checkout/preact/tests/checkout-settings.test.ts +17 -9
  191. package/src/surfaces/checkout/preact/tests/checkout-token.test.ts +16 -6
  192. package/src/surfaces/checkout/preact/tests/configuration.test.ts +16 -6
  193. package/src/surfaces/checkout/preact/tests/country.test.tsx +18 -8
  194. package/src/surfaces/checkout/preact/tests/currency.test.tsx +18 -8
  195. package/src/surfaces/checkout/preact/tests/customer-privacy.test.ts +17 -8
  196. package/src/surfaces/checkout/preact/tests/delivery-group-list-target.test.ts +24 -18
  197. package/src/surfaces/checkout/preact/tests/delivery-group-target.test.ts +25 -19
  198. package/src/surfaces/checkout/preact/tests/delivery-group.test.ts +22 -16
  199. package/src/surfaces/checkout/preact/tests/delivery-groups.test.ts +17 -11
  200. package/src/surfaces/checkout/preact/tests/delivery-selection-groups.test.ts +31 -24
  201. package/src/surfaces/checkout/preact/tests/discounts.test.tsx +21 -14
  202. package/src/surfaces/checkout/preact/tests/extension-language.test.tsx +17 -8
  203. package/src/surfaces/checkout/preact/tests/gift-cards.test.tsx +17 -8
  204. package/src/surfaces/checkout/preact/tests/localized-fields.test.ts +58 -59
  205. package/src/surfaces/checkout/preact/tests/market.test.tsx +17 -7
  206. package/src/surfaces/checkout/preact/tests/metafield.test.tsx +33 -36
  207. package/src/surfaces/checkout/preact/tests/metafields.test.tsx +36 -53
  208. package/src/surfaces/checkout/preact/tests/mount.tsx +60 -17
  209. package/src/surfaces/checkout/preact/tests/notes.test.tsx +16 -6
  210. package/src/surfaces/checkout/preact/tests/payment-method.test.ts +87 -60
  211. package/src/surfaces/checkout/preact/tests/payment-options.test.tsx +26 -24
  212. package/src/surfaces/checkout/preact/tests/pickup-location-option-target.test.tsx +55 -46
  213. package/src/surfaces/checkout/preact/tests/redeemable.test.ts +30 -23
  214. package/src/surfaces/checkout/preact/tests/session-token.test.tsx +12 -6
  215. package/src/surfaces/checkout/preact/tests/shipping-address.test.ts +17 -7
  216. package/src/surfaces/checkout/preact/tests/shipping-option-target.test.ts +54 -50
  217. package/src/surfaces/checkout/preact/tests/shopping-address.test.tsx +18 -10
  218. package/src/surfaces/checkout/preact/tests/timezone.test.tsx +17 -7
  219. package/src/surfaces/checkout/preact/tests/translate.test.tsx +18 -13
  220. package/src/surfaces/checkout/preact/tests/tsconfig.json +1 -1
  221. package/src/surfaces/checkout/shared.ts +2 -0
  222. package/src/surfaces/point-of-sale/components/Badge.d.ts +10 -1
  223. package/src/surfaces/point-of-sale/components/Banner/examples/default.html +8 -8
  224. package/src/surfaces/point-of-sale/components/Banner.d.ts +12 -4
  225. package/src/surfaces/point-of-sale/components/Box/examples/default.html +2 -2
  226. package/src/surfaces/point-of-sale/components/Box.d.ts +51 -14
  227. package/src/surfaces/point-of-sale/components/Button/examples/default.html +2 -4
  228. package/src/surfaces/point-of-sale/components/Button.d.ts +12 -2
  229. package/src/surfaces/point-of-sale/components/Choice.d.ts +3 -2
  230. package/src/surfaces/point-of-sale/components/ChoiceList/examples/default.html +5 -4
  231. package/src/surfaces/point-of-sale/components/ChoiceList/examples/event-handling.jsx +8 -0
  232. package/src/surfaces/point-of-sale/components/ChoiceList/examples/multiple-selection.jsx +9 -0
  233. package/src/surfaces/point-of-sale/components/ChoiceList.d.ts +13 -4
  234. package/src/surfaces/point-of-sale/components/Clickable/examples/default.html +5 -2
  235. package/src/surfaces/point-of-sale/components/Clickable.d.ts +11 -4
  236. package/src/surfaces/point-of-sale/components/DateField/examples/default.html +2 -10
  237. package/src/surfaces/point-of-sale/components/DateField/examples/event-handling.jsx +8 -0
  238. package/src/surfaces/point-of-sale/components/DateField.d.ts +20 -13
  239. package/src/surfaces/point-of-sale/components/DatePicker/examples/command-system.jsx +10 -0
  240. package/src/surfaces/point-of-sale/components/DatePicker/examples/default.html +4 -5
  241. package/src/surfaces/point-of-sale/components/DatePicker/examples/event-handling.jsx +7 -0
  242. package/src/surfaces/point-of-sale/components/DatePicker.d.ts +16 -4
  243. package/src/surfaces/point-of-sale/components/DateSpinner/examples/command-system.jsx +10 -0
  244. package/src/surfaces/point-of-sale/components/DateSpinner/examples/default.html +1 -2
  245. package/src/surfaces/point-of-sale/components/DateSpinner/examples/event-handling.jsx +7 -0
  246. package/src/surfaces/point-of-sale/components/DateSpinner.d.ts +16 -4
  247. package/src/surfaces/point-of-sale/components/Divider/examples/default.html +1 -0
  248. package/src/surfaces/point-of-sale/components/Divider.d.ts +4 -3
  249. package/src/surfaces/point-of-sale/components/EmailField/examples/accessory-slot.jsx +9 -0
  250. package/src/surfaces/point-of-sale/components/EmailField/examples/default.html +3 -10
  251. package/src/surfaces/point-of-sale/components/EmailField/examples/event-handling.jsx +8 -0
  252. package/src/surfaces/point-of-sale/components/EmailField.d.ts +22 -5
  253. package/src/surfaces/point-of-sale/components/Heading/examples/default.html +4 -5
  254. package/src/surfaces/point-of-sale/components/Heading.d.ts +7 -4
  255. package/src/surfaces/point-of-sale/components/Icon/examples/default.html +4 -1
  256. package/src/surfaces/point-of-sale/components/Icon.d.ts +13 -3
  257. package/src/surfaces/point-of-sale/components/Image/examples/default.html +1 -1
  258. package/src/surfaces/point-of-sale/components/Image.d.ts +12 -5
  259. package/src/surfaces/point-of-sale/components/Modal/examples/default.html +6 -8
  260. package/src/surfaces/point-of-sale/components/Modal.d.ts +28 -7
  261. package/src/surfaces/point-of-sale/components/NumberField/examples/controls-constraints.jsx +9 -0
  262. package/src/surfaces/point-of-sale/components/NumberField/examples/default.html +5 -2
  263. package/src/surfaces/point-of-sale/components/NumberField/examples/input-mode.jsx +15 -0
  264. package/src/surfaces/point-of-sale/components/NumberField.d.ts +32 -23
  265. package/src/surfaces/point-of-sale/components/Page/examples/default.html +3 -4
  266. package/src/surfaces/point-of-sale/components/Page.d.ts +25 -11
  267. package/src/surfaces/point-of-sale/components/PosBlock/examples/default.html +3 -9
  268. package/src/surfaces/point-of-sale/components/PosBlock.d.ts +12 -13
  269. package/src/surfaces/point-of-sale/components/QrCode.d.ts +12 -8
  270. package/src/surfaces/point-of-sale/components/ScrollBox/examples/default.html +5 -4
  271. package/src/surfaces/point-of-sale/components/ScrollBox.d.ts +47 -15
  272. package/src/surfaces/point-of-sale/components/SearchField/examples/default.html +1 -1
  273. package/src/surfaces/point-of-sale/components/SearchField/examples/event-handling.jsx +8 -0
  274. package/src/surfaces/point-of-sale/components/SearchField.d.ts +17 -5
  275. package/src/surfaces/point-of-sale/components/Section/examples/default.html +6 -8
  276. package/src/surfaces/point-of-sale/components/Section.d.ts +15 -9
  277. package/src/surfaces/point-of-sale/components/Stack/examples/default.html +3 -3
  278. package/src/surfaces/point-of-sale/components/Stack.d.ts +67 -7
  279. package/src/surfaces/point-of-sale/components/Text/examples/default.html +3 -6
  280. package/src/surfaces/point-of-sale/components/Text.d.ts +25 -4
  281. package/src/surfaces/point-of-sale/components/TextArea/examples/accessory-slot.jsx +9 -0
  282. package/src/surfaces/point-of-sale/components/TextArea/examples/default.html +4 -1
  283. package/src/surfaces/point-of-sale/components/TextArea/examples/event-handling.jsx +8 -0
  284. package/src/surfaces/point-of-sale/components/TextArea/examples/rows-configuration.jsx +7 -0
  285. package/src/surfaces/point-of-sale/components/TextArea.d.ts +22 -5
  286. package/src/surfaces/point-of-sale/components/TextField/examples/accessory-slot.jsx +5 -0
  287. package/src/surfaces/point-of-sale/components/TextField/examples/common-props.jsx +11 -0
  288. package/src/surfaces/point-of-sale/components/TextField/examples/default.html +5 -3
  289. package/src/surfaces/point-of-sale/components/TextField/examples/event-handling.jsx +17 -0
  290. package/src/surfaces/point-of-sale/components/TextField.d.ts +22 -5
  291. package/src/surfaces/point-of-sale/components/Tile/examples/default.html +2 -5
  292. package/src/surfaces/point-of-sale/components/Tile.d.ts +12 -2
  293. package/src/surfaces/point-of-sale/components/TimeField/examples/default.html +1 -9
  294. package/src/surfaces/point-of-sale/components/TimeField/examples/event-handling.jsx +8 -0
  295. package/src/surfaces/point-of-sale/components/TimeField.d.ts +18 -6
  296. package/src/surfaces/point-of-sale/components/TimePicker/examples/command-system.jsx +10 -0
  297. package/src/surfaces/point-of-sale/components/TimePicker/examples/default.html +4 -1
  298. package/src/surfaces/point-of-sale/components/TimePicker/examples/event-handling.jsx +7 -0
  299. package/src/surfaces/point-of-sale/components/TimePicker.d.ts +16 -4
  300. package/src/surfaces/point-of-sale/components/components-shared.d.ts +102 -1
  301. package/src/surfaces/point-of-sale/components.d.ts +957 -472
  302. package/build/ts/surfaces/checkout/errors.d.ts +0 -10
  303. package/build/ts/surfaces/checkout/errors.d.ts.map +0 -1
  304. package/src/surfaces/checkout/errors.ts +0 -13
@@ -26,6 +26,7 @@ export interface BaseElementPropsWithChildren<TClass = HTMLElement>
26
26
  extends BaseElementProps<TClass> {
27
27
  children?: ComponentChildren;
28
28
  }
29
+ export type IntrinsicElementProps<T> = T & BaseElementPropsWithChildren<T>;
29
30
  export interface CallbackEvent<T extends keyof HTMLElementTagNameMap> {
30
31
  currentTarget: HTMLElementTagNameMap[T];
31
32
  bubbles?: boolean;
@@ -38,7 +39,10 @@ export interface CallbackEvent<T extends keyof HTMLElementTagNameMap> {
38
39
 
39
40
  declare const tagName = 's-button';
40
41
  export interface ButtonJSXProps
41
- extends Pick<ButtonProps, 'disabled' | 'command' | 'commandFor' | 'loading'> {
42
+ extends Pick<
43
+ ButtonProps,
44
+ 'id' | 'disabled' | 'command' | 'commandFor' | 'loading'
45
+ > {
42
46
  /**
43
47
  * Sets the action the `commandFor` should take when this clickable is activated.
44
48
  *
@@ -72,7 +76,13 @@ export interface ButtonJSXProps
72
76
  * @default 'auto' - the variant is automatically determined by the Button's context
73
77
  */
74
78
  variant?: Extract<ButtonProps['variant'], 'primary' | 'secondary'>;
79
+ /**
80
+ * Called when the button is activated.
81
+ */
75
82
  onClick?: (event: CallbackEvent<typeof tagName>) => void;
83
+ /**
84
+ * The content of the Button.
85
+ */
76
86
  children?: ComponentChildren;
77
87
  }
78
88
  declare global {
@@ -83,7 +93,7 @@ declare global {
83
93
  declare module 'preact' {
84
94
  namespace createElement.JSX {
85
95
  interface IntrinsicElements {
86
- [tagName]: ButtonJSXProps & BaseElementPropsWithChildren<ButtonJSXProps>;
96
+ [tagName]: IntrinsicElementProps<ButtonJSXProps>;
87
97
  }
88
98
  }
89
99
  }
@@ -26,10 +26,11 @@ export interface BaseElementPropsWithChildren<TClass = HTMLElement>
26
26
  extends BaseElementProps<TClass> {
27
27
  children?: ComponentChildren;
28
28
  }
29
+ export type IntrinsicElementProps<T> = T & BaseElementPropsWithChildren<T>;
29
30
 
30
31
  declare const tagName = 's-choice';
31
32
  export interface ChoiceJSXProps
32
- extends Pick<ChoiceProps, 'value' | 'disabled' | 'selected'> {
33
+ extends Pick<ChoiceProps, 'id' | 'value' | 'disabled' | 'selected'> {
33
34
  children?: ComponentChildren;
34
35
  }
35
36
  declare global {
@@ -40,7 +41,7 @@ declare global {
40
41
  declare module 'preact' {
41
42
  namespace createElement.JSX {
42
43
  interface IntrinsicElements {
43
- [tagName]: ChoiceJSXProps & BaseElementPropsWithChildren<ChoiceJSXProps>;
44
+ [tagName]: IntrinsicElementProps<ChoiceJSXProps>;
44
45
  }
45
46
  }
46
47
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ChoiceList.doc.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/components/ChoiceList/ChoiceList.doc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,6BAA6B,EAAC,MAAM,wBAAwB,CAAC;AAErE,QAAA,MAAM,IAAI,EAAE,6BAwCX,CAAC;AAEF,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"ChoiceList.doc.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/components/ChoiceList/ChoiceList.doc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,6BAA6B,EAAC,MAAM,wBAAwB,CAAC;AAErE,QAAA,MAAM,IAAI,EAAE,6BAsEX,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -26,6 +26,7 @@ export interface BaseElementPropsWithChildren<TClass = HTMLElement>
26
26
  extends BaseElementProps<TClass> {
27
27
  children?: ComponentChildren;
28
28
  }
29
+ export type IntrinsicElementProps<T> = T & BaseElementPropsWithChildren<T>;
29
30
  export interface CallbackEvent<T extends keyof HTMLElementTagNameMap> {
30
31
  currentTarget: HTMLElementTagNameMap[T];
31
32
  bubbles?: boolean;
@@ -38,9 +39,18 @@ export interface CallbackEvent<T extends keyof HTMLElementTagNameMap> {
38
39
 
39
40
  declare const tagName = 's-choice-list';
40
41
  export interface ChoiceListJSXProps
41
- extends Pick<ChoiceListProps, 'values' | 'multiple'> {
42
- onChange?: ((event: CallbackEvent<typeof tagName>) => void) | null;
42
+ extends Pick<ChoiceListProps, 'id' | 'values' | 'multiple'> {
43
+ /**
44
+ * Callback when the user changes a choice. Fires simultaneously with onChange.
45
+ */
43
46
  onInput?: ((event: CallbackEvent<typeof tagName>) => void) | null;
47
+ /**
48
+ * Callback when the user changes a choice. Fires simultaneously with onInput.
49
+ */
50
+ onChange?: ((event: CallbackEvent<typeof tagName>) => void) | null;
51
+ /**
52
+ * The content of the ChoiceList. Should be one or more Choice elements.
53
+ */
44
54
  children?: ComponentChildren;
45
55
  }
46
56
  declare global {
@@ -51,8 +61,7 @@ declare global {
51
61
  declare module 'preact' {
52
62
  namespace createElement.JSX {
53
63
  interface IntrinsicElements {
54
- [tagName]: ChoiceListJSXProps &
55
- BaseElementPropsWithChildren<ChoiceListJSXProps>;
64
+ [tagName]: IntrinsicElementProps<ChoiceListJSXProps>;
56
65
  }
57
66
  }
58
67
  }
@@ -26,6 +26,7 @@ export interface BaseElementPropsWithChildren<TClass = HTMLElement>
26
26
  extends BaseElementProps<TClass> {
27
27
  children?: ComponentChildren;
28
28
  }
29
+ export type IntrinsicElementProps<T> = T & BaseElementPropsWithChildren<T>;
29
30
  export interface CallbackEvent<T extends keyof HTMLElementTagNameMap> {
30
31
  currentTarget: HTMLElementTagNameMap[T];
31
32
  bubbles?: boolean;
@@ -37,9 +38,16 @@ export interface CallbackEvent<T extends keyof HTMLElementTagNameMap> {
37
38
  }
38
39
 
39
40
  declare const tagName = 's-clickable';
40
- export interface ClickableJSXProps extends Pick<ClickableProps, 'disabled'> {
41
- children?: ComponentChildren;
41
+ export interface ClickableJSXProps
42
+ extends Pick<ClickableProps, 'id' | 'disabled'> {
43
+ /**
44
+ * Callback when the element is activated.
45
+ */
42
46
  onClick?: (event: CallbackEvent<typeof tagName>) => void;
47
+ /**
48
+ * The content of the Clickable.
49
+ */
50
+ children?: ComponentChildren;
43
51
  }
44
52
  declare global {
45
53
  interface HTMLElementTagNameMap {
@@ -49,8 +57,7 @@ declare global {
49
57
  declare module 'preact' {
50
58
  namespace createElement.JSX {
51
59
  interface IntrinsicElements {
52
- [tagName]: ClickableJSXProps &
53
- BaseElementPropsWithChildren<ClickableJSXProps>;
60
+ [tagName]: IntrinsicElementProps<ClickableJSXProps>;
54
61
  }
55
62
  }
56
63
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DateField.doc.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/components/DateField/DateField.doc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,6BAA6B,EAAC,MAAM,wBAAwB,CAAC;AAErE,QAAA,MAAM,IAAI,EAAE,6BAuCX,CAAC;AAEF,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"DateField.doc.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/components/DateField/DateField.doc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,6BAA6B,EAAC,MAAM,wBAAwB,CAAC;AAErE,QAAA,MAAM,IAAI,EAAE,6BAoDX,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -8,12 +8,7 @@
8
8
  /* eslint-disable import-x/namespace */
9
9
  // eslint-disable-next-line @typescript-eslint/triple-slash-reference, spaced-comment
10
10
  /// <reference lib="DOM" />
11
- import type {
12
- DateFieldProps,
13
- Key,
14
- Ref,
15
- ComponentChild,
16
- } from './components-shared.d.ts';
11
+ import type {DateFieldProps, Key, Ref} from './components-shared.d.ts';
17
12
 
18
13
  export type ComponentChildren = any;
19
14
  /**
@@ -31,6 +26,7 @@ export interface BaseElementPropsWithChildren<TClass = HTMLElement>
31
26
  extends BaseElementProps<TClass> {
32
27
  children?: ComponentChildren;
33
28
  }
29
+ export type IntrinsicElementProps<T> = T & BaseElementPropsWithChildren<T>;
34
30
  export interface CallbackEvent<T extends keyof HTMLElementTagNameMap> {
35
31
  currentTarget: HTMLElementTagNameMap[T];
36
32
  bubbles?: boolean;
@@ -45,24 +41,35 @@ declare const tagName = 's-date-field';
45
41
  export interface DateFieldJSXProps
46
42
  extends Pick<
47
43
  DateFieldProps,
48
- 'label' | 'details' | 'value' | 'disabled' | 'error'
44
+ 'id' | 'label' | 'details' | 'value' | 'disabled' | 'error'
49
45
  > {
46
+ /**
47
+ * Callback when the user makes any changes in the field.
48
+ */
50
49
  onInput?: ((event: CallbackEvent<typeof tagName>) => void) | null;
51
- onFocus?: ((event: CallbackEvent<typeof tagName>) => void) | null;
52
- onBlur?: ((event: CallbackEvent<typeof tagName>) => void) | null;
50
+ /**
51
+ * Callback after editing completes (typically on blur).
52
+ */
53
53
  onChange?: ((event: CallbackEvent<typeof tagName>) => void) | null;
54
- accessory?: ComponentChild;
54
+ /**
55
+ * Callback when the element loses focus.
56
+ */
57
+ onBlur?: ((event: CallbackEvent<typeof tagName>) => void) | null;
58
+ /**
59
+ * Callback when the element receives focus.
60
+ */
61
+ onFocus?: ((event: CallbackEvent<typeof tagName>) => void) | null;
55
62
  }
63
+ export type ElementProps = Omit<DateFieldJSXProps, 'accessory'>;
56
64
  declare global {
57
65
  interface HTMLElementTagNameMap {
58
- [tagName]: DateFieldJSXProps;
66
+ [tagName]: ElementProps;
59
67
  }
60
68
  }
61
69
  declare module 'preact' {
62
70
  namespace createElement.JSX {
63
71
  interface IntrinsicElements {
64
- [tagName]: Omit<DateFieldJSXProps, 'accessory'> &
65
- BaseElementPropsWithChildren<Omit<DateFieldJSXProps, 'accessory'>>;
72
+ [tagName]: IntrinsicElementProps<ElementProps>;
66
73
  }
67
74
  }
68
75
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DatePicker.doc.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/components/DatePicker/DatePicker.doc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,6BAA6B,EAAC,MAAM,wBAAwB,CAAC;AAErE,QAAA,MAAM,IAAI,EAAE,6BAkCX,CAAC;AAEF,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"DatePicker.doc.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/components/DatePicker/DatePicker.doc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,6BAA6B,EAAC,MAAM,wBAAwB,CAAC;AAErE,QAAA,MAAM,IAAI,EAAE,6BAgEX,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -26,6 +26,7 @@ export interface BaseElementPropsWithChildren<TClass = HTMLElement>
26
26
  extends BaseElementProps<TClass> {
27
27
  children?: ComponentChildren;
28
28
  }
29
+ export type IntrinsicElementProps<T> = T & BaseElementPropsWithChildren<T>;
29
30
  export interface CallbackEvent<T extends keyof HTMLElementTagNameMap> {
30
31
  currentTarget: HTMLElementTagNameMap[T];
31
32
  bubbles?: boolean;
@@ -39,10 +40,22 @@ export interface CallbackEvent<T extends keyof HTMLElementTagNameMap> {
39
40
  declare const tagName = 's-date-picker';
40
41
  export interface DatePickerJSXProps
41
42
  extends Pick<DatePickerProps, 'id' | 'value'> {
43
+ /**
44
+ * Callback when the user selects a date from the picker.
45
+ */
46
+ onInput?: (event: CallbackEvent<typeof tagName>) => void | null;
47
+ /**
48
+ * Callback when the user selects a date from the picker that is different to the current value.
49
+ */
50
+ onChange?: (event: CallbackEvent<typeof tagName>) => void | null;
51
+ /**
52
+ * Callback when the date picker is dismissed.
53
+ */
42
54
  onBlur?: (event: CallbackEvent<typeof tagName>) => void | null;
55
+ /**
56
+ * Callback when the date picker is revealed.
57
+ */
43
58
  onFocus?: (event: CallbackEvent<typeof tagName>) => void | null;
44
- onChange?: (event: CallbackEvent<typeof tagName>) => void | null;
45
- onInput?: (event: CallbackEvent<typeof tagName>) => void | null;
46
59
  }
47
60
  declare global {
48
61
  interface HTMLElementTagNameMap {
@@ -52,8 +65,7 @@ declare global {
52
65
  declare module 'preact' {
53
66
  namespace createElement.JSX {
54
67
  interface IntrinsicElements {
55
- [tagName]: DatePickerJSXProps &
56
- BaseElementPropsWithChildren<DatePickerJSXProps>;
68
+ [tagName]: IntrinsicElementProps<DatePickerJSXProps>;
57
69
  }
58
70
  }
59
71
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DateSpinner.doc.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/components/DateSpinner/DateSpinner.doc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,6BAA6B,EAAC,MAAM,wBAAwB,CAAC;AAErE,QAAA,MAAM,IAAI,EAAE,6BAkCX,CAAC;AAEF,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"DateSpinner.doc.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/components/DateSpinner/DateSpinner.doc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,6BAA6B,EAAC,MAAM,wBAAwB,CAAC;AAErE,QAAA,MAAM,IAAI,EAAE,6BAgEX,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -26,6 +26,7 @@ export interface BaseElementPropsWithChildren<TClass = HTMLElement>
26
26
  extends BaseElementProps<TClass> {
27
27
  children?: ComponentChildren;
28
28
  }
29
+ export type IntrinsicElementProps<T> = T & BaseElementPropsWithChildren<T>;
29
30
  export interface CallbackEvent<T extends keyof HTMLElementTagNameMap> {
30
31
  currentTarget: HTMLElementTagNameMap[T];
31
32
  bubbles?: boolean;
@@ -39,10 +40,22 @@ export interface CallbackEvent<T extends keyof HTMLElementTagNameMap> {
39
40
  declare const tagName = 's-date-spinner';
40
41
  export interface DateSpinnerJSXProps
41
42
  extends Pick<DateSpinnerProps, 'id' | 'value'> {
43
+ /**
44
+ * Callback when the user makes a selection.
45
+ */
46
+ onInput?: (event: CallbackEvent<typeof tagName>) => void | null;
47
+ /**
48
+ * Callback when the value changes. Only called when a different value is selected.
49
+ */
50
+ onChange?: (event: CallbackEvent<typeof tagName>) => void | null;
51
+ /**
52
+ * Callback when the date spinner is dismissed.
53
+ */
42
54
  onBlur?: (event: CallbackEvent<typeof tagName>) => void | null;
55
+ /**
56
+ * Callback when the date spinner is revealed.
57
+ */
43
58
  onFocus?: (event: CallbackEvent<typeof tagName>) => void | null;
44
- onChange?: (event: CallbackEvent<typeof tagName>) => void | null;
45
- onInput?: (event: CallbackEvent<typeof tagName>) => void | null;
46
59
  }
47
60
  declare global {
48
61
  interface HTMLElementTagNameMap {
@@ -52,8 +65,7 @@ declare global {
52
65
  declare module 'preact' {
53
66
  namespace createElement.JSX {
54
67
  interface IntrinsicElements {
55
- [tagName]: DateSpinnerJSXProps &
56
- BaseElementPropsWithChildren<DateSpinnerJSXProps>;
68
+ [tagName]: IntrinsicElementProps<DateSpinnerJSXProps>;
57
69
  }
58
70
  }
59
71
  }
@@ -0,0 +1,4 @@
1
+ import { ReferenceEntityTemplateSchema } from '@shopify/generate-docs';
2
+ declare const data: ReferenceEntityTemplateSchema;
3
+ export default data;
4
+ //# sourceMappingURL=Divider.doc.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Divider.doc.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/components/Divider/Divider.doc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,6BAA6B,EAAC,MAAM,wBAAwB,CAAC;AAErE,QAAA,MAAM,IAAI,EAAE,6BA6BX,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -26,9 +26,11 @@ export interface BaseElementPropsWithChildren<TClass = HTMLElement>
26
26
  extends BaseElementProps<TClass> {
27
27
  children?: ComponentChildren;
28
28
  }
29
+ export type IntrinsicElementProps<T> = T & BaseElementPropsWithChildren<T>;
29
30
 
30
31
  declare const tagName = 's-divider';
31
- export interface DividerJSXProps extends Pick<DividerProps, 'direction'> {}
32
+ export interface DividerJSXProps
33
+ extends Pick<DividerProps, 'id' | 'direction'> {}
32
34
  declare global {
33
35
  interface HTMLElementTagNameMap {
34
36
  [tagName]: DividerJSXProps;
@@ -37,8 +39,7 @@ declare global {
37
39
  declare module 'preact' {
38
40
  namespace createElement.JSX {
39
41
  interface IntrinsicElements {
40
- [tagName]: DividerJSXProps &
41
- BaseElementPropsWithChildren<DividerJSXProps>;
42
+ [tagName]: IntrinsicElementProps<DividerJSXProps>;
42
43
  }
43
44
  }
44
45
  }
@@ -1 +1 @@
1
- {"version":3,"file":"EmailField.doc.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/components/EmailField/EmailField.doc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,6BAA6B,EAAC,MAAM,wBAAwB,CAAC;AAErE,QAAA,MAAM,IAAI,EAAE,6BAuCX,CAAC;AAEF,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"EmailField.doc.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/components/EmailField/EmailField.doc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,6BAA6B,EAAC,MAAM,wBAAwB,CAAC;AAErE,QAAA,MAAM,IAAI,EAAE,6BAuEX,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -31,6 +31,7 @@ export interface BaseElementPropsWithChildren<TClass = HTMLElement>
31
31
  extends BaseElementProps<TClass> {
32
32
  children?: ComponentChildren;
33
33
  }
34
+ export type IntrinsicElementProps<T> = T & BaseElementPropsWithChildren<T>;
34
35
  export interface CallbackEvent<T extends keyof HTMLElementTagNameMap> {
35
36
  currentTarget: HTMLElementTagNameMap[T];
36
37
  bubbles?: boolean;
@@ -45,6 +46,7 @@ declare const tagName = 's-email-field';
45
46
  export interface EmailFieldJSXProps
46
47
  extends Pick<
47
48
  EmailFieldProps,
49
+ | 'id'
48
50
  | 'label'
49
51
  | 'value'
50
52
  | 'placeholder'
@@ -54,22 +56,37 @@ export interface EmailFieldJSXProps
54
56
  | 'maxLength'
55
57
  | 'details'
56
58
  > {
59
+ /**
60
+ * Callback when the user makes any changes in the field.
61
+ */
57
62
  onInput?: ((event: CallbackEvent<typeof tagName>) => void) | null;
58
- onFocus?: ((event: CallbackEvent<typeof tagName>) => void) | null;
59
- onBlur?: ((event: CallbackEvent<typeof tagName>) => void) | null;
63
+ /**
64
+ * Callback after editing completes (typically on blur).
65
+ */
60
66
  onChange?: ((event: CallbackEvent<typeof tagName>) => void) | null;
67
+ /**
68
+ * Callback when the element loses focus.
69
+ */
70
+ onBlur?: ((event: CallbackEvent<typeof tagName>) => void) | null;
71
+ /**
72
+ * Callback when the element receives focus.
73
+ */
74
+ onFocus?: ((event: CallbackEvent<typeof tagName>) => void) | null;
75
+ /**
76
+ * Additional content to be displayed in the field. Commonly used to display clickable text.
77
+ */
61
78
  accessory?: ComponentChild;
62
79
  }
80
+ export type ElementProps = Omit<EmailFieldJSXProps, 'accessory'>;
63
81
  declare global {
64
82
  interface HTMLElementTagNameMap {
65
- [tagName]: EmailFieldJSXProps;
83
+ [tagName]: ElementProps;
66
84
  }
67
85
  }
68
86
  declare module 'preact' {
69
87
  namespace createElement.JSX {
70
88
  interface IntrinsicElements {
71
- [tagName]: Omit<EmailFieldJSXProps, 'accessory'> &
72
- BaseElementPropsWithChildren<Omit<EmailFieldJSXProps, 'accessory'>>;
89
+ [tagName]: IntrinsicElementProps<ElementProps>;
73
90
  }
74
91
  }
75
92
  }
@@ -8,7 +8,7 @@
8
8
  /* eslint-disable import-x/namespace */
9
9
  // eslint-disable-next-line @typescript-eslint/triple-slash-reference, spaced-comment
10
10
  /// <reference lib="DOM" />
11
- import type {Key, Ref} from './components-shared.d.ts';
11
+ import type {HeadingProps, Key, Ref} from './components-shared.d.ts';
12
12
 
13
13
  export type ComponentChildren = any;
14
14
  /**
@@ -26,9 +26,13 @@ export interface BaseElementPropsWithChildren<TClass = HTMLElement>
26
26
  extends BaseElementProps<TClass> {
27
27
  children?: ComponentChildren;
28
28
  }
29
+ export type IntrinsicElementProps<T> = T & BaseElementPropsWithChildren<T>;
29
30
 
30
31
  declare const tagName = 's-heading';
31
- export interface HeadingJSXProps {
32
+ export interface HeadingJSXProps extends Pick<HeadingProps, 'id'> {
33
+ /**
34
+ * The content of the Heading.
35
+ */
32
36
  children?: ComponentChildren;
33
37
  }
34
38
  declare global {
@@ -39,8 +43,7 @@ declare global {
39
43
  declare module 'preact' {
40
44
  namespace createElement.JSX {
41
45
  interface IntrinsicElements {
42
- [tagName]: HeadingJSXProps &
43
- BaseElementPropsWithChildren<HeadingJSXProps>;
46
+ [tagName]: IntrinsicElementProps<HeadingJSXProps>;
44
47
  }
45
48
  }
46
49
  }
@@ -10,6 +10,7 @@
10
10
  /// <reference lib="DOM" />
11
11
  import type {IconProps, Key, Ref} from './components-shared.d.ts';
12
12
 
13
+ export type ComponentChildren = any;
13
14
  /**
14
15
  * Used when an element does not have children.
15
16
  */
@@ -18,6 +19,14 @@ export interface BaseElementProps<TClass = HTMLElement> {
18
19
  ref?: Ref<TClass>;
19
20
  slot?: Lowercase<string>;
20
21
  }
22
+ /**
23
+ * Used when an element has children.
24
+ */
25
+ export interface BaseElementPropsWithChildren<TClass = HTMLElement>
26
+ extends BaseElementProps<TClass> {
27
+ children?: ComponentChildren;
28
+ }
29
+ export type IntrinsicElementProps<T> = T & BaseElementPropsWithChildren<T>;
21
30
 
22
31
  declare const tagName = 's-icon';
23
32
  export type SupportedIconNames = Extract<
@@ -149,9 +158,10 @@ export type SupportedIconNames = Extract<
149
158
  | 'x-circle'
150
159
  >;
151
160
  export interface IconJSXProps
152
- extends Pick<IconProps, 'tone' | 'color' | 'size'> {
161
+ extends Pick<IconProps, 'id' | 'tone' | 'color' | 'size'> {
153
162
  /**
154
- * The type of icon to display. Maps to PDS icon names.
163
+ * The type of icon to display.
164
+ *
155
165
  * @default ''
156
166
  */
157
167
  type?: SupportedIconNames;
@@ -164,7 +174,7 @@ declare global {
164
174
  declare module 'preact' {
165
175
  namespace createElement.JSX {
166
176
  interface IntrinsicElements {
167
- [tagName]: IconJSXProps & BaseElementProps<IconJSXProps>;
177
+ [tagName]: IntrinsicElementProps<IconJSXProps>;
168
178
  }
169
179
  }
170
180
  }
@@ -26,11 +26,10 @@ export interface BaseElementPropsWithChildren<TClass = HTMLElement>
26
26
  extends BaseElementProps<TClass> {
27
27
  children?: ComponentChildren;
28
28
  }
29
+ export type IntrinsicElementProps<T> = T & BaseElementPropsWithChildren<T>;
29
30
 
30
31
  declare const tagName = 's-image';
31
- export type PickedProps = Pick<ImageProps, 'src' | 'inlineSize' | 'objectFit'>;
32
- export interface ImageJSXProps extends PickedProps {
33
- children?: ComponentChildren;
32
+ export interface ImageJSXProps extends Pick<ImageProps, 'id' | 'objectFit'> {
34
33
  /**
35
34
  * The displayed inline width of the image.
36
35
  *
@@ -45,7 +44,15 @@ export interface ImageJSXProps extends PickedProps {
45
44
  *
46
45
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#width
47
46
  */
48
- inlineSize?: PickedProps['inlineSize'];
47
+ inlineSize?: ImageProps['inlineSize'];
48
+ /**
49
+ * The image source, which should be a remote URL.
50
+ *
51
+ * When the image is loading or no `src` is provided, a placeholder will be rendered.
52
+ *
53
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#src
54
+ */
55
+ src?: ImageProps['src'];
49
56
  }
50
57
  declare global {
51
58
  interface HTMLElementTagNameMap {
@@ -55,7 +62,7 @@ declare global {
55
62
  declare module 'preact' {
56
63
  namespace createElement.JSX {
57
64
  interface IntrinsicElements {
58
- [tagName]: ImageJSXProps & BaseElementPropsWithChildren<ImageJSXProps>;
65
+ [tagName]: IntrinsicElementProps<ImageJSXProps>;
59
66
  }
60
67
  }
61
68
  }
@@ -31,6 +31,7 @@ export interface BaseElementPropsWithChildren<TClass = HTMLElement>
31
31
  extends BaseElementProps<TClass> {
32
32
  children?: ComponentChildren;
33
33
  }
34
+ export type IntrinsicElementProps<T> = T & BaseElementPropsWithChildren<T>;
34
35
  export interface CallbackEvent<T extends keyof HTMLElementTagNameMap> {
35
36
  currentTarget: HTMLElementTagNameMap[T];
36
37
  bubbles?: boolean;
@@ -43,24 +44,44 @@ export interface CallbackEvent<T extends keyof HTMLElementTagNameMap> {
43
44
 
44
45
  declare const tagName = 's-modal';
45
46
  export interface ModalJSXProps extends Pick<ModalProps, 'id' | 'heading'> {
46
- primaryAction?: ComponentChild;
47
- secondaryActions?: ComponentChild;
47
+ /**
48
+ * Callback when the modal is hidden.
49
+ */
48
50
  onHide?: (event: CallbackEvent<typeof tagName>) => void | null;
51
+ /**
52
+ * Callback when the modal is shown.
53
+ */
49
54
  onShow?: (event: CallbackEvent<typeof tagName>) => void | null;
55
+ /**
56
+ * The primary action button displayed in the modal.
57
+ *
58
+ * The tone of the button is used to define the tone of the modal.
59
+ *
60
+ * If omitted, the modal will default to an 'info' tone, and show an 'OK' button, translated according to the user's locale.
61
+ */
62
+ primaryAction?: ComponentChild;
63
+ /**
64
+ * The secondary action buttons displayed in the modal.
65
+ */
66
+ secondaryActions?: ComponentChild;
67
+ /**
68
+ * The content of the Modal.
69
+ */
50
70
  children?: ComponentChildren;
51
71
  }
72
+ export type ElementProps = Omit<
73
+ ModalJSXProps,
74
+ 'primaryAction' | 'secondaryActions'
75
+ >;
52
76
  declare global {
53
77
  interface HTMLElementTagNameMap {
54
- [tagName]: ModalJSXProps;
78
+ [tagName]: ElementProps;
55
79
  }
56
80
  }
57
81
  declare module 'preact' {
58
82
  namespace createElement.JSX {
59
83
  interface IntrinsicElements {
60
- [tagName]: Omit<ModalJSXProps, 'primaryAction' | 'secondaryActions'> &
61
- BaseElementPropsWithChildren<
62
- Omit<ModalJSXProps, 'primaryAction' | 'secondaryActions'>
63
- >;
84
+ [tagName]: IntrinsicElementProps<ElementProps>;
64
85
  }
65
86
  }
66
87
  }
@@ -1 +1 @@
1
- {"version":3,"file":"NumberField.doc.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/components/NumberField/NumberField.doc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,6BAA6B,EAAC,MAAM,wBAAwB,CAAC;AAErE,QAAA,MAAM,IAAI,EAAE,6BAuCX,CAAC;AAEF,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"NumberField.doc.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/components/NumberField/NumberField.doc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,6BAA6B,EAAC,MAAM,wBAAwB,CAAC;AAErE,QAAA,MAAM,IAAI,EAAE,6BAwEX,CAAC;AAEF,eAAe,IAAI,CAAC"}