@shopify/ui-extensions 2026.7.4 → 2026.10.0-rc.10

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 (329) hide show
  1. package/build/cjs/surfaces/checkout/preact/market.js +8 -2
  2. package/build/cjs/surfaces/checkout/shared.js +0 -2
  3. package/build/cjs/surfaces/customer-account/preact/market.js +8 -2
  4. package/build/cjs/surfaces/point-of-sale/events.js +129 -1
  5. package/build/cjs/surfaces/point-of-sale/types/storage.js +11 -0
  6. package/build/cjs/surfaces/point-of-sale.js +1 -0
  7. package/build/esm/surfaces/checkout/preact/market.mjs +8 -2
  8. package/build/esm/surfaces/checkout/shared.mjs +0 -2
  9. package/build/esm/surfaces/customer-account/preact/market.mjs +8 -2
  10. package/build/esm/surfaces/point-of-sale/events.mjs +129 -2
  11. package/build/esm/surfaces/point-of-sale/types/storage.mjs +11 -0
  12. package/build/esm/surfaces/point-of-sale.mjs +1 -1
  13. package/build/esnext/surfaces/checkout/preact/market.esnext +8 -2
  14. package/build/esnext/surfaces/checkout/shared.esnext +0 -2
  15. package/build/esnext/surfaces/customer-account/preact/market.esnext +8 -2
  16. package/build/esnext/surfaces/point-of-sale/events.esnext +129 -2
  17. package/build/esnext/surfaces/point-of-sale/types/storage.esnext +11 -0
  18. package/build/esnext/surfaces/point-of-sale.esnext +1 -1
  19. package/build/ts/shared.d.ts +2 -2
  20. package/build/ts/shared.d.ts.map +1 -1
  21. package/build/ts/surfaces/admin/components/AdminAction.d.ts +61 -107
  22. package/build/ts/surfaces/admin/components/AdminBlock.d.ts +22 -107
  23. package/build/ts/surfaces/admin/components/AdminPrintAction.d.ts +20 -101
  24. package/build/ts/surfaces/admin/components/AppNav.d.ts +38 -1
  25. package/build/ts/surfaces/admin/components/Avatar.d.ts +100 -139
  26. package/build/ts/surfaces/admin/components/Badge.d.ts +107 -156
  27. package/build/ts/surfaces/admin/components/Banner.d.ts +102 -127
  28. package/build/ts/surfaces/admin/components/Box.d.ts +145 -234
  29. package/build/ts/surfaces/admin/components/Button.d.ts +156 -266
  30. package/build/ts/surfaces/admin/components/ButtonGroup.d.ts +89 -117
  31. package/build/ts/surfaces/admin/components/Checkbox.d.ts +139 -174
  32. package/build/ts/surfaces/admin/components/Chip.d.ts +117 -15
  33. package/build/ts/surfaces/admin/components/Choice.d.ts +88 -113
  34. package/build/ts/surfaces/admin/components/ChoiceList.d.ts +120 -129
  35. package/build/ts/surfaces/admin/components/Clickable.d.ts +227 -209
  36. package/build/ts/surfaces/admin/components/ClickableChip.d.ts +117 -153
  37. package/build/ts/surfaces/admin/components/ColorField.d.ts +111 -215
  38. package/build/ts/surfaces/admin/components/ColorPicker.d.ts +82 -137
  39. package/build/ts/surfaces/admin/components/DateField.d.ts +140 -230
  40. package/build/ts/surfaces/admin/components/DatePicker.d.ts +178 -181
  41. package/build/ts/surfaces/admin/components/Divider.d.ts +50 -118
  42. package/build/ts/surfaces/admin/components/DropZone.d.ts +153 -12
  43. package/build/ts/surfaces/admin/components/EmailField.d.ts +100 -197
  44. package/build/ts/surfaces/admin/components/EmptyState.d.ts +144 -0
  45. package/build/ts/surfaces/admin/components/Form.d.ts +25 -118
  46. package/build/ts/surfaces/admin/components/FunctionSettings.d.ts +26 -132
  47. package/build/ts/surfaces/admin/components/Grid.d.ts +165 -299
  48. package/build/ts/surfaces/admin/components/GridItem.d.ts +145 -261
  49. package/build/ts/surfaces/admin/components/Heading.d.ts +117 -117
  50. package/build/ts/surfaces/admin/components/Icon.d.ts +91 -129
  51. package/build/ts/surfaces/admin/components/Image.d.ts +216 -251
  52. package/build/ts/surfaces/admin/components/Link.d.ts +125 -126
  53. package/build/ts/surfaces/admin/components/ListItem.d.ts +63 -102
  54. package/build/ts/surfaces/admin/components/Menu.d.ts +82 -150
  55. package/build/ts/surfaces/admin/components/Modal.d.ts +232 -26
  56. package/build/ts/surfaces/admin/components/MoneyField.d.ts +103 -196
  57. package/build/ts/surfaces/admin/components/Number.d.ts +193 -0
  58. package/build/ts/surfaces/admin/components/NumberField.d.ts +114 -208
  59. package/build/ts/surfaces/admin/components/Option.d.ts +67 -108
  60. package/build/ts/surfaces/admin/components/OptionGroup.d.ts +69 -105
  61. package/build/ts/surfaces/admin/components/OrderedList.d.ts +56 -102
  62. package/build/ts/surfaces/admin/components/Page.d.ts +93 -13
  63. package/build/ts/surfaces/admin/components/Paragraph.d.ts +126 -138
  64. package/build/ts/surfaces/admin/components/PasswordField.d.ts +109 -203
  65. package/build/ts/surfaces/admin/components/Popover.d.ts +673 -0
  66. package/build/ts/surfaces/admin/components/Progress.d.ts +155 -0
  67. package/build/ts/surfaces/admin/components/QueryContainer.d.ts +77 -116
  68. package/build/ts/surfaces/admin/components/SearchField.d.ts +103 -191
  69. package/build/ts/surfaces/admin/components/Section.d.ts +132 -128
  70. package/build/ts/surfaces/admin/components/Select.d.ts +144 -193
  71. package/build/ts/surfaces/admin/components/Spinner.d.ts +60 -113
  72. package/build/ts/surfaces/admin/components/Stack.d.ts +156 -282
  73. package/build/ts/surfaces/admin/components/StandardComponents.d.ts +1 -1
  74. package/build/ts/surfaces/admin/components/StandardComponents.d.ts.map +1 -1
  75. package/build/ts/surfaces/admin/components/Switch.d.ts +75 -165
  76. package/build/ts/surfaces/admin/components/Table.d.ts +100 -210
  77. package/build/ts/surfaces/admin/components/TableBody.d.ts +70 -106
  78. package/build/ts/surfaces/admin/components/TableCell.d.ts +70 -107
  79. package/build/ts/surfaces/admin/components/TableHeader.d.ts +79 -119
  80. package/build/ts/surfaces/admin/components/TableHeaderRow.d.ts +71 -107
  81. package/build/ts/surfaces/admin/components/TableRow.d.ts +81 -109
  82. package/build/ts/surfaces/admin/components/Text.d.ts +123 -164
  83. package/build/ts/surfaces/admin/components/TextArea.d.ts +100 -195
  84. package/build/ts/surfaces/admin/components/TextField.d.ts +120 -204
  85. package/build/ts/surfaces/admin/components/Thumbnail.d.ts +83 -133
  86. package/build/ts/surfaces/admin/components/Tooltip.d.ts +78 -146
  87. package/build/ts/surfaces/admin/components/URLField.d.ts +107 -209
  88. package/build/ts/surfaces/admin/components/UnorderedList.d.ts +58 -110
  89. package/build/ts/surfaces/admin/components/shared.d.ts +4193 -1203
  90. package/build/ts/surfaces/admin/extension-targets.d.ts +8 -0
  91. package/build/ts/surfaces/admin/extension-targets.d.ts.map +1 -1
  92. package/build/ts/surfaces/admin/targets/admin.abandoned-checkout-details.action.render.d.ts +2 -0
  93. package/build/ts/surfaces/admin/targets/admin.abandoned-checkout-details.block.render.d.ts +2 -0
  94. package/build/ts/surfaces/admin/targets/admin.abandoned-checkout-index.action.render.d.ts +2 -0
  95. package/build/ts/surfaces/admin/targets/admin.app.home.render.d.ts +2 -0
  96. package/build/ts/surfaces/admin/targets/admin.app.intent.render.d.ts +2 -0
  97. package/build/ts/surfaces/admin/targets/admin.catalog-details.action.render.d.ts +2 -0
  98. package/build/ts/surfaces/admin/targets/admin.catalog-details.block.render.d.ts +2 -0
  99. package/build/ts/surfaces/admin/targets/admin.collection-details.action.render.d.ts +2 -0
  100. package/build/ts/surfaces/admin/targets/admin.collection-details.block.render.d.ts +2 -0
  101. package/build/ts/surfaces/admin/targets/admin.collection-index.action.render.d.ts +2 -0
  102. package/build/ts/surfaces/admin/targets/admin.company-details.action.render.d.ts +2 -0
  103. package/build/ts/surfaces/admin/targets/admin.company-details.block.render.d.ts +2 -0
  104. package/build/ts/surfaces/admin/targets/admin.company-location-details.block.render.d.ts +2 -0
  105. package/build/ts/surfaces/admin/targets/admin.customer-details.action.render.d.ts +2 -0
  106. package/build/ts/surfaces/admin/targets/admin.customer-details.block.render.d.ts +2 -0
  107. package/build/ts/surfaces/admin/targets/admin.customer-index.action.render.d.ts +2 -0
  108. package/build/ts/surfaces/admin/targets/admin.customer-index.selection-action.render.d.ts +2 -0
  109. package/build/ts/surfaces/admin/targets/admin.customer-segment-details.action.render.d.ts +2 -0
  110. package/build/ts/surfaces/admin/targets/admin.discount-details.action.render.d.ts +2 -0
  111. package/build/ts/surfaces/admin/targets/admin.discount-details.function-settings.render.d.ts +2 -0
  112. package/build/ts/surfaces/admin/targets/admin.discount-index.action.render.d.ts +2 -0
  113. package/build/ts/surfaces/admin/targets/admin.discount-index.selection-action.render.d.ts +2 -0
  114. package/build/ts/surfaces/admin/targets/admin.draft-order-details.action.render.d.ts +2 -0
  115. package/build/ts/surfaces/admin/targets/admin.draft-order-details.block.render.d.ts +2 -0
  116. package/build/ts/surfaces/admin/targets/admin.draft-order-index.action.render.d.ts +2 -0
  117. package/build/ts/surfaces/admin/targets/admin.draft-order-index.selection-action.render.d.ts +2 -0
  118. package/build/ts/surfaces/admin/targets/admin.gift-card-details.action.render.d.ts +2 -0
  119. package/build/ts/surfaces/admin/targets/admin.gift-card-details.block.render.d.ts +2 -0
  120. package/build/ts/surfaces/admin/targets/admin.order-details.action.render.d.ts +2 -0
  121. package/build/ts/surfaces/admin/targets/admin.order-details.block.render.d.ts +2 -0
  122. package/build/ts/surfaces/admin/targets/admin.order-details.print-action.render.d.ts +2 -0
  123. package/build/ts/surfaces/admin/targets/admin.order-fulfilled-card.action.render.d.ts +2 -0
  124. package/build/ts/surfaces/admin/targets/admin.order-index.action.render.d.ts +2 -0
  125. package/build/ts/surfaces/admin/targets/admin.order-index.selection-action.render.d.ts +2 -0
  126. package/build/ts/surfaces/admin/targets/admin.order-index.selection-print-action.render.d.ts +2 -0
  127. package/build/ts/surfaces/admin/targets/admin.product-details.action.render.d.ts +2 -0
  128. package/build/ts/surfaces/admin/targets/admin.product-details.block.render.d.ts +2 -0
  129. package/build/ts/surfaces/admin/targets/admin.product-details.configuration.render.d.ts +2 -0
  130. package/build/ts/surfaces/admin/targets/admin.product-details.configuration.should-render.d.ts +6 -0
  131. package/build/ts/surfaces/admin/targets/admin.product-details.print-action.render.d.ts +2 -0
  132. package/build/ts/surfaces/admin/targets/admin.product-details.reorder.render.d.ts +2 -0
  133. package/build/ts/surfaces/admin/targets/admin.product-index.action.render.d.ts +2 -0
  134. package/build/ts/surfaces/admin/targets/admin.product-index.selection-action.render.d.ts +2 -0
  135. package/build/ts/surfaces/admin/targets/admin.product-index.selection-print-action.render.d.ts +2 -0
  136. package/build/ts/surfaces/admin/targets/admin.product-purchase-option.action.render.d.ts +2 -0
  137. package/build/ts/surfaces/admin/targets/admin.product-variant-details.action.render.d.ts +2 -0
  138. package/build/ts/surfaces/admin/targets/admin.product-variant-details.block.render.d.ts +2 -0
  139. package/build/ts/surfaces/admin/targets/admin.product-variant-details.configuration.render.d.ts +2 -0
  140. package/build/ts/surfaces/admin/targets/admin.product-variant-details.configuration.should-render.d.ts +6 -0
  141. package/build/ts/surfaces/admin/targets/admin.product-variant-purchase-option.action.render.d.ts +2 -0
  142. package/build/ts/surfaces/admin/targets/admin.settings.internal-order-routing-rule.render.d.ts +2 -0
  143. package/build/ts/surfaces/admin/targets/admin.settings.order-routing-rule.render.d.ts +2 -0
  144. package/build/ts/surfaces/admin/targets/admin.settings.validation.render.d.ts +2 -0
  145. package/build/ts/surfaces/checkout/api/standard/standard.d.ts +8 -5
  146. package/build/ts/surfaces/checkout/api/standard/standard.d.ts.map +1 -1
  147. package/build/ts/surfaces/checkout/components/Box.d.ts +56 -1
  148. package/build/ts/surfaces/checkout/components/components-shared.d.ts +1 -1
  149. package/build/ts/surfaces/checkout/preact/market.d.ts +8 -2
  150. package/build/ts/surfaces/checkout/preact/market.d.ts.map +1 -1
  151. package/build/ts/surfaces/checkout/shared.d.ts +1 -3
  152. package/build/ts/surfaces/checkout/shared.d.ts.map +1 -1
  153. package/build/ts/surfaces/checkout/targets/purchase.cart-line-item.line-components.render.d.ts +0 -1
  154. package/build/ts/surfaces/checkout/targets/purchase.checkout.actions.render-before.d.ts +0 -1
  155. package/build/ts/surfaces/checkout/targets/purchase.checkout.block.render.d.ts +0 -1
  156. package/build/ts/surfaces/checkout/targets/purchase.checkout.cart-line-item.render-after.d.ts +0 -1
  157. package/build/ts/surfaces/checkout/targets/purchase.checkout.cart-line-list.render-after.d.ts +0 -1
  158. package/build/ts/surfaces/checkout/targets/purchase.checkout.contact.render-after.d.ts +0 -1
  159. package/build/ts/surfaces/checkout/targets/purchase.checkout.delivery-address.render-after.d.ts +0 -1
  160. package/build/ts/surfaces/checkout/targets/purchase.checkout.delivery-address.render-before.d.ts +0 -1
  161. package/build/ts/surfaces/checkout/targets/purchase.checkout.footer.render-after.d.ts +0 -1
  162. package/build/ts/surfaces/checkout/targets/purchase.checkout.gift-card.render.d.ts +0 -1
  163. package/build/ts/surfaces/checkout/targets/purchase.checkout.header.render-after.d.ts +0 -1
  164. package/build/ts/surfaces/checkout/targets/purchase.checkout.payment-method-list.render-after.d.ts +0 -1
  165. package/build/ts/surfaces/checkout/targets/purchase.checkout.payment-method-list.render-before.d.ts +0 -1
  166. package/build/ts/surfaces/checkout/targets/purchase.checkout.payment-option-item.action-required.render.d.ts +0 -1
  167. package/build/ts/surfaces/checkout/targets/purchase.checkout.payment-option-item.details.render.d.ts +0 -1
  168. package/build/ts/surfaces/checkout/targets/purchase.checkout.payment-option-item.hosted-fields.render-after.d.ts +0 -1
  169. package/build/ts/surfaces/checkout/targets/purchase.checkout.pickup-location-list.render-after.d.ts +0 -1
  170. package/build/ts/surfaces/checkout/targets/purchase.checkout.pickup-location-list.render-before.d.ts +0 -1
  171. package/build/ts/surfaces/checkout/targets/purchase.checkout.pickup-location-option-item.render-after.d.ts +0 -1
  172. package/build/ts/surfaces/checkout/targets/purchase.checkout.pickup-point-list.render-after.d.ts +0 -1
  173. package/build/ts/surfaces/checkout/targets/purchase.checkout.pickup-point-list.render-before.d.ts +0 -1
  174. package/build/ts/surfaces/checkout/targets/purchase.checkout.reductions.render-after.d.ts +0 -1
  175. package/build/ts/surfaces/checkout/targets/purchase.checkout.reductions.render-before.d.ts +0 -1
  176. package/build/ts/surfaces/checkout/targets/purchase.checkout.shipping-option-item.details.render.d.ts +0 -1
  177. package/build/ts/surfaces/checkout/targets/purchase.checkout.shipping-option-item.render-after.d.ts +0 -1
  178. package/build/ts/surfaces/checkout/targets/purchase.checkout.shipping-option-list.render-after.d.ts +0 -1
  179. package/build/ts/surfaces/checkout/targets/purchase.checkout.shipping-option-list.render-before.d.ts +0 -1
  180. package/build/ts/surfaces/checkout/targets/purchase.thank-you.block.render.d.ts +0 -1
  181. package/build/ts/surfaces/checkout/targets/purchase.thank-you.cart-line-item.render-after.d.ts +0 -1
  182. package/build/ts/surfaces/checkout/targets/purchase.thank-you.cart-line-list.render-after.d.ts +0 -1
  183. package/build/ts/surfaces/checkout/targets/purchase.thank-you.customer-information.render-after.d.ts +0 -1
  184. package/build/ts/surfaces/checkout/targets/purchase.thank-you.footer.render-after.d.ts +0 -1
  185. package/build/ts/surfaces/checkout/targets/purchase.thank-you.header.render-after.d.ts +0 -1
  186. package/build/ts/surfaces/customer-account/api/order-status/order-status.d.ts +6 -1
  187. package/build/ts/surfaces/customer-account/api/order-status/order-status.d.ts.map +1 -1
  188. package/build/ts/surfaces/customer-account/components/Box.d.ts +56 -1
  189. package/build/ts/surfaces/customer-account/components/components-shared.d.ts +1 -1
  190. package/build/ts/surfaces/customer-account/preact/market.d.ts +8 -2
  191. package/build/ts/surfaces/customer-account/preact/market.d.ts.map +1 -1
  192. package/build/ts/surfaces/customer-account/targets/customer-account.footer.render-after.d.ts +0 -1
  193. package/build/ts/surfaces/customer-account/targets/customer-account.order-index.announcement.render.d.ts +0 -1
  194. package/build/ts/surfaces/customer-account/targets/customer-account.order-index.block.render.d.ts +0 -1
  195. package/build/ts/surfaces/customer-account/targets/customer-account.order-status.announcement.render.d.ts +0 -1
  196. package/build/ts/surfaces/customer-account/targets/customer-account.order-status.block.render.d.ts +0 -1
  197. package/build/ts/surfaces/customer-account/targets/customer-account.order-status.cart-line-item.render-after.d.ts +0 -1
  198. package/build/ts/surfaces/customer-account/targets/customer-account.order-status.cart-line-list.render-after.d.ts +0 -1
  199. package/build/ts/surfaces/customer-account/targets/customer-account.order-status.customer-information.render-after.d.ts +0 -1
  200. package/build/ts/surfaces/customer-account/targets/customer-account.order-status.fulfillment-details.render-after.d.ts +0 -1
  201. package/build/ts/surfaces/customer-account/targets/customer-account.order-status.payment-details.render-after.d.ts +0 -1
  202. package/build/ts/surfaces/customer-account/targets/customer-account.order-status.return-details.render-after.d.ts +0 -1
  203. package/build/ts/surfaces/customer-account/targets/customer-account.order-status.unfulfilled-items.render-after.d.ts +0 -1
  204. package/build/ts/surfaces/customer-account/targets/customer-account.order.action.menu-item.render.d.ts +0 -1
  205. package/build/ts/surfaces/customer-account/targets/customer-account.order.action.render.d.ts +0 -1
  206. package/build/ts/surfaces/customer-account/targets/customer-account.order.page.render.d.ts +0 -1
  207. package/build/ts/surfaces/customer-account/targets/customer-account.page.render.d.ts +0 -1
  208. package/build/ts/surfaces/customer-account/targets/customer-account.profile.addresses.render-after.d.ts +0 -1
  209. package/build/ts/surfaces/customer-account/targets/customer-account.profile.announcement.render.d.ts +0 -1
  210. package/build/ts/surfaces/customer-account/targets/customer-account.profile.block.render.d.ts +0 -1
  211. package/build/ts/surfaces/customer-account/targets/customer-account.profile.company-details.render-after.d.ts +0 -1
  212. package/build/ts/surfaces/customer-account/targets/customer-account.profile.company-location-addresses.render-after.d.ts +0 -1
  213. package/build/ts/surfaces/customer-account/targets/customer-account.profile.company-location-payment.render-after.d.ts +0 -1
  214. package/build/ts/surfaces/customer-account/targets/customer-account.profile.company-location-staff.render-after.d.ts +0 -1
  215. package/build/ts/surfaces/customer-account/targets/customer-account.profile.payment.render-after.d.ts +0 -1
  216. package/build/ts/surfaces/point-of-sale/api/cart-api/cart-api.d.ts +13 -0
  217. package/build/ts/surfaces/point-of-sale/api/cart-api/cart-api.d.ts.map +1 -1
  218. package/build/ts/surfaces/point-of-sale/api/resolution-api/resolution-api.d.ts +23 -0
  219. package/build/ts/surfaces/point-of-sale/api/resolution-api/resolution-api.d.ts.map +1 -0
  220. package/build/ts/surfaces/point-of-sale/api.d.ts +3 -2
  221. package/build/ts/surfaces/point-of-sale/api.d.ts.map +1 -1
  222. package/build/ts/surfaces/point-of-sale/components/targets/ResolutionComponents.d.ts +10 -0
  223. package/build/ts/surfaces/point-of-sale/components/targets/ResolutionComponents.d.ts.map +1 -0
  224. package/build/ts/surfaces/point-of-sale/events/scan-event.d.ts +34 -0
  225. package/build/ts/surfaces/point-of-sale/events/scan-event.d.ts.map +1 -0
  226. package/build/ts/surfaces/point-of-sale/events.d.ts +183 -1
  227. package/build/ts/surfaces/point-of-sale/events.d.ts.map +1 -1
  228. package/build/ts/surfaces/point-of-sale/extension-targets.d.ts +17 -3
  229. package/build/ts/surfaces/point-of-sale/extension-targets.d.ts.map +1 -1
  230. package/build/ts/surfaces/point-of-sale/globals.d.ts +8 -1
  231. package/build/ts/surfaces/point-of-sale/globals.d.ts.map +1 -1
  232. package/build/ts/surfaces/point-of-sale/targets/pos.cart.validations.resolution.render.d.ts +44 -0
  233. package/build/ts/surfaces/point-of-sale/targets/pos.payment.validations.resolution.render.d.ts +44 -0
  234. package/build/ts/surfaces/point-of-sale/types/cart.d.ts +4 -0
  235. package/build/ts/surfaces/point-of-sale/types/cart.d.ts.map +1 -1
  236. package/build/ts/surfaces/point-of-sale/types/storage.d.ts +40 -0
  237. package/build/ts/surfaces/point-of-sale/types/storage.d.ts.map +1 -1
  238. package/build/tsconfig.tsbuildinfo +1 -1
  239. package/package.json +1 -1
  240. package/src/shared.ts +4 -2
  241. package/src/surfaces/admin/components/AdminAction.d.ts +61 -107
  242. package/src/surfaces/admin/components/AdminBlock.d.ts +22 -107
  243. package/src/surfaces/admin/components/AdminPrintAction.d.ts +20 -101
  244. package/src/surfaces/admin/components/AppNav.d.ts +38 -1
  245. package/src/surfaces/admin/components/Avatar.d.ts +100 -139
  246. package/src/surfaces/admin/components/Badge.d.ts +107 -156
  247. package/src/surfaces/admin/components/Banner.d.ts +102 -127
  248. package/src/surfaces/admin/components/Box.d.ts +145 -234
  249. package/src/surfaces/admin/components/Button.d.ts +156 -266
  250. package/src/surfaces/admin/components/ButtonGroup.d.ts +89 -117
  251. package/src/surfaces/admin/components/Checkbox.d.ts +139 -174
  252. package/src/surfaces/admin/components/Chip.d.ts +117 -15
  253. package/src/surfaces/admin/components/Choice.d.ts +88 -113
  254. package/src/surfaces/admin/components/ChoiceList.d.ts +120 -129
  255. package/src/surfaces/admin/components/Clickable.d.ts +227 -209
  256. package/src/surfaces/admin/components/ClickableChip.d.ts +117 -153
  257. package/src/surfaces/admin/components/ColorField.d.ts +111 -215
  258. package/src/surfaces/admin/components/ColorPicker.d.ts +82 -137
  259. package/src/surfaces/admin/components/DateField.d.ts +140 -230
  260. package/src/surfaces/admin/components/DatePicker.d.ts +178 -181
  261. package/src/surfaces/admin/components/Divider.d.ts +50 -118
  262. package/src/surfaces/admin/components/DropZone.d.ts +153 -12
  263. package/src/surfaces/admin/components/EmailField.d.ts +100 -197
  264. package/src/surfaces/admin/components/EmptyState.d.ts +144 -0
  265. package/src/surfaces/admin/components/Form.d.ts +25 -118
  266. package/src/surfaces/admin/components/FunctionSettings.d.ts +26 -132
  267. package/src/surfaces/admin/components/Grid.d.ts +165 -299
  268. package/src/surfaces/admin/components/GridItem.d.ts +145 -261
  269. package/src/surfaces/admin/components/Heading.d.ts +117 -117
  270. package/src/surfaces/admin/components/Icon.d.ts +91 -129
  271. package/src/surfaces/admin/components/Image.d.ts +216 -251
  272. package/src/surfaces/admin/components/Link.d.ts +125 -126
  273. package/src/surfaces/admin/components/ListItem.d.ts +63 -102
  274. package/src/surfaces/admin/components/Menu.d.ts +82 -150
  275. package/src/surfaces/admin/components/Modal.d.ts +232 -26
  276. package/src/surfaces/admin/components/MoneyField.d.ts +103 -196
  277. package/src/surfaces/admin/components/Number.d.ts +193 -0
  278. package/src/surfaces/admin/components/NumberField.d.ts +114 -208
  279. package/src/surfaces/admin/components/Option.d.ts +67 -108
  280. package/src/surfaces/admin/components/OptionGroup.d.ts +69 -105
  281. package/src/surfaces/admin/components/OrderedList.d.ts +56 -102
  282. package/src/surfaces/admin/components/Page.d.ts +93 -13
  283. package/src/surfaces/admin/components/Paragraph.d.ts +126 -138
  284. package/src/surfaces/admin/components/PasswordField.d.ts +109 -203
  285. package/src/surfaces/admin/components/Popover.d.ts +673 -0
  286. package/src/surfaces/admin/components/Progress.d.ts +155 -0
  287. package/src/surfaces/admin/components/QueryContainer.d.ts +77 -116
  288. package/src/surfaces/admin/components/SearchField.d.ts +103 -191
  289. package/src/surfaces/admin/components/Section.d.ts +132 -128
  290. package/src/surfaces/admin/components/Select.d.ts +144 -193
  291. package/src/surfaces/admin/components/Spinner.d.ts +60 -113
  292. package/src/surfaces/admin/components/Stack.d.ts +156 -282
  293. package/src/surfaces/admin/components/StandardComponents.ts +2 -0
  294. package/src/surfaces/admin/components/Switch.d.ts +75 -165
  295. package/src/surfaces/admin/components/Table.d.ts +100 -210
  296. package/src/surfaces/admin/components/TableBody.d.ts +70 -106
  297. package/src/surfaces/admin/components/TableCell.d.ts +70 -107
  298. package/src/surfaces/admin/components/TableHeader.d.ts +79 -119
  299. package/src/surfaces/admin/components/TableHeaderRow.d.ts +71 -107
  300. package/src/surfaces/admin/components/TableRow.d.ts +81 -109
  301. package/src/surfaces/admin/components/Text.d.ts +123 -164
  302. package/src/surfaces/admin/components/TextArea.d.ts +100 -195
  303. package/src/surfaces/admin/components/TextField.d.ts +120 -204
  304. package/src/surfaces/admin/components/Thumbnail.d.ts +83 -133
  305. package/src/surfaces/admin/components/Tooltip.d.ts +78 -146
  306. package/src/surfaces/admin/components/URLField.d.ts +107 -209
  307. package/src/surfaces/admin/components/UnorderedList.d.ts +58 -110
  308. package/src/surfaces/admin/components/shared.d.ts +4193 -1203
  309. package/src/surfaces/admin/extension-targets.ts +18 -0
  310. package/src/surfaces/checkout/api/standard/standard.ts +8 -5
  311. package/src/surfaces/checkout/components/Box.d.ts +56 -1
  312. package/src/surfaces/checkout/components/components-shared.d.ts +1 -1
  313. package/src/surfaces/checkout/preact/market.ts +8 -2
  314. package/src/surfaces/checkout/shared.ts +1 -6
  315. package/src/surfaces/customer-account/api/order-status/order-status.ts +6 -1
  316. package/src/surfaces/customer-account/preact/market.ts +8 -2
  317. package/src/surfaces/point-of-sale/api/cart-api/cart-api.ts +14 -0
  318. package/src/surfaces/point-of-sale/api/resolution-api/resolution-api.ts +24 -0
  319. package/src/surfaces/point-of-sale/api.ts +7 -1
  320. package/src/surfaces/point-of-sale/components/targets/ResolutionComponents.ts +13 -0
  321. package/src/surfaces/point-of-sale/events/scan-event.ts +34 -0
  322. package/src/surfaces/point-of-sale/events.ts +215 -0
  323. package/src/surfaces/point-of-sale/extension-targets.ts +33 -2
  324. package/src/surfaces/point-of-sale/globals.ts +16 -1
  325. package/src/surfaces/point-of-sale/types/cart.ts +4 -0
  326. package/src/surfaces/point-of-sale/types/storage.ts +47 -0
  327. package/build/ts/surfaces/checkout/components/LoginWithShop.d.ts +0 -164
  328. package/build/ts/surfaces/customer-account/components/LoginWithShop.d.ts +0 -164
  329. package/src/surfaces/checkout/components/LoginWithShop.d.ts +0 -164
@@ -1,4 +1,4 @@
1
- /** VERSION: 1.25.0 **/
1
+ /** VERSION: 2.23.0 **/
2
2
  /* eslint-disable import/extensions */
3
3
 
4
4
  /* eslint-disable @typescript-eslint/no-namespace */
@@ -13,21 +13,30 @@ import type {
13
13
  SizeUnitsOrAuto,
14
14
  SizeUnits,
15
15
  SizeUnitsOrNone,
16
- ComponentChildren,
16
+ PreactCustomElement,
17
+ RenderImpl,
17
18
  } from './shared.d.ts';
19
+ import * as preact$1 from 'preact';
20
+ import {ReactNode, RefAttributes} from 'react';
18
21
 
19
22
  /**
20
- * A callback event that's typed to a specific HTML element. This type provides access to the element that triggered the event.
23
+ * An event object with a strongly-typed `currentTarget` property that references the specific HTML element that triggered the event.
24
+ *
25
+ * This type extends the standard DOM `Event` interface and ensures type safety when accessing the element that fired the event.
21
26
  * @publicDocs
22
27
  */
23
28
  export type CallbackEvent<T extends keyof HTMLElementTagNameMap> = Event & {
24
- /**
25
- * The element that currently has the event listener attached.
26
- */
27
29
  currentTarget: HTMLElementTagNameMap[T];
28
30
  };
29
31
  /**
30
- * An event listener for callback events, typed to a specific HTML element.
32
+ * A function that handles events from UI components.
33
+ *
34
+ * This type represents an event listener callback that receives a `CallbackEvent` with a strongly-typed `currentTarget`. Use this for component event handlers like `click`, `focus`, `blur`, and other DOM events.
35
+ *
36
+ * @example
37
+ * const handleClick: CallbackEventListener<'button'> = (event) => {
38
+ * console.log('Button clicked:', event.currentTarget);
39
+ * };
31
40
  * @publicDocs
32
41
  */
33
42
  export type CallbackEventListener<T extends keyof HTMLElementTagNameMap> =
@@ -36,26 +45,61 @@ export type CallbackEventListener<T extends keyof HTMLElementTagNameMap> =
36
45
  })
37
46
  | null;
38
47
  /**
39
- * The base properties for Preact elements that don't have children, providing essential attributes like keys and refs for component management.
48
+ * Base props for Preact custom elements without children support. Includes common properties like key, ref, and slot for elements that don't accept child content.
40
49
  * @publicDocs
41
50
  */
42
51
  export interface PreactBaseElementProps<TClass extends HTMLElement> {
43
52
  /**
44
- * A unique identifier for this element within its parent. Preact uses keys to optimize rendering performance when lists change by tracking which items have been added, removed, or reordered.
53
+ * A unique identifier for this element, used by the virtual DOM to efficiently track and update elements in lists.
54
+ * Essential for maintaining component state and optimizing re-renders when lists change.
45
55
  */
46
56
  key?: preact.Key;
47
57
  /**
48
- * A reference to the underlying DOM element, typically created using `useRef()`. This allows you to access and manipulate the DOM element directly in your component logic.
58
+ * A reference to access the underlying DOM element directly.
59
+ * Typically created using `useRef()` to interact with the element imperatively or measure its properties.
49
60
  */
50
61
  ref?: preact.Ref<TClass>;
51
62
  /**
52
- * Assigns this element to a named slot in a parent component that uses shadow DOM or slot-based composition patterns.
63
+ * The named slot to which this element is assigned in the parent component's shadow DOM.
64
+ *
65
+ * Used for advanced component composition with web components.
53
66
  */
54
67
  slot?: Lowercase<string>;
55
68
  }
56
69
 
70
+ export type ReactIntrinsicElementChildren<PreactProps extends object> =
71
+ 'children' extends keyof PreactProps
72
+ ? {
73
+ children?: ReactNode;
74
+ }
75
+ : Record<never, never>;
76
+ export type ReactIntrinsicElementProps<
77
+ PreactProps extends object,
78
+ ElementType,
79
+ > = Omit<PreactProps, 'children' | 'key' | 'ref' | 'slot'> &
80
+ ReactIntrinsicElementChildren<PreactProps> &
81
+ RefAttributes<ElementType> & {
82
+ slot?: Lowercase<string>;
83
+ };
84
+ export type ReactIntrinsicElements = {
85
+ [Tag in Exclude<
86
+ Extract<keyof preact$1.createElement.JSX.IntrinsicElements, `s-${string}`>,
87
+ `s-test-${string}`
88
+ >]: ReactIntrinsicElementProps<
89
+ preact$1.createElement.JSX.IntrinsicElements[Tag],
90
+ Tag extends keyof HTMLElementTagNameMap
91
+ ? HTMLElementTagNameMap[Tag]
92
+ : HTMLElement
93
+ >;
94
+ };
95
+ declare module 'react' {
96
+ namespace JSX {
97
+ interface IntrinsicElements extends ReactIntrinsicElements {}
98
+ }
99
+ }
100
+
57
101
  /**
58
- * Makes a type value responsive by allowing container query strings.
102
+ * Makes a type responsive by allowing it to be either the base value or a container query string. This enables conditional styling based on container dimensions.
59
103
  * @publicDocs
60
104
  */
61
105
  export type MakeResponsive<T> = T | `@container${string}`;
@@ -81,12 +125,21 @@ export type MakeResponsivePick<TType, TProperty extends keyof TType> = {
81
125
  };
82
126
 
83
127
  /**
84
- * The box properties with all fields marked as required.
128
+ * Represents the box component props with all properties marked as required.
85
129
  * @publicDocs
86
130
  */
87
131
  export type RequiredBoxProps = Required<BoxProps$1>;
88
132
  /**
89
- * The available border radius values for Box components.
133
+ * Represents the subset of border radius values supported by the component.
134
+ *
135
+ * - `small-200`: Extra small radius for subtle rounding.
136
+ * - `small-100`: Small radius for minimal corner rounding.
137
+ * - `small`: Standard small radius.
138
+ * - `base`: Medium radius for moderate corner rounding.
139
+ * - `large`: Standard large radius for pronounced rounding.
140
+ * - `large-100`: Large radius for more prominent corner rounding.
141
+ * - `large-200`: Extra large radius for maximum rounding.
142
+ * - `none`: No border radius (sharp corners).
90
143
  * @publicDocs
91
144
  */
92
145
  export type BoxBorderRadii = Extract<
@@ -101,7 +154,12 @@ export type BoxBorderRadii = Extract<
101
154
  | 'large-200'
102
155
  >;
103
156
  /**
104
- * The available border style values for Box components.
157
+ * Represents the subset of border style values supported by the box component.
158
+ *
159
+ * - `auto`: Default border style determined by the system.
160
+ * - `none`: No border style (removes the border).
161
+ * - `solid`: Continuous line border.
162
+ * - `dashed`: Border made up of dashes.
105
163
  * @publicDocs
106
164
  */
107
165
  export type BoxBorderStyles = Extract<
@@ -109,7 +167,9 @@ export type BoxBorderStyles = Extract<
109
167
  'none' | 'solid' | 'dashed' | 'auto'
110
168
  >;
111
169
  /**
112
- * The box properties that support responsive values through container queries.
170
+ * Represents box props with responsive capabilities for layout properties.
171
+ *
172
+ * This enables conditional styling based on container queries.
113
173
  * @publicDocs
114
174
  */
115
175
  export type ResponsiveBoxProps = MakeResponsivePick<
@@ -144,7 +204,7 @@ export interface BoxProps
144
204
  | 'overflow'
145
205
  > {
146
206
  /**
147
- * The background color of the image container.
207
+ * The background color of the component.
148
208
  *
149
209
  * @default 'transparent'
150
210
  */
@@ -153,16 +213,13 @@ export interface BoxProps
153
213
  'transparent' | 'base' | 'subdued' | 'strong'
154
214
  >;
155
215
  /**
156
- * Controls the thickness of the border on all sides. When set, this overrides the width value specified in the `border` property.
216
+ * A border applied using shorthand syntax to specify width, color, and style in a single property.
157
217
  *
158
- * - `small`: Thin border for subtle definition.
159
- * - `small-100`: Extra thin border for minimal emphasis.
160
- * - `base`: Standard border width.
161
- * - `large`: Thick border for strong emphasis.
162
- * - `large-100`: Extra thick border for maximum prominence.
163
- * - `none`: No border.
164
- *
165
- * Supports [1-to-4-value syntax](https://developer.mozilla.org/en-US/docs/Web/CSS/Shorthand_properties#edges_of_a_box) for specifying different widths per side.
218
+ * @default 'none'
219
+ */
220
+ border: RequiredBoxProps['border'];
221
+ /**
222
+ * The thickness of the border on all sides. When set, this overrides the width value specified in the `border` property.
166
223
  *
167
224
  * @default '' - meaning no override
168
225
  */
@@ -175,7 +232,7 @@ export interface BoxProps
175
232
  >
176
233
  | Extract<RequiredBoxProps['borderWidth'], ''>;
177
234
  /**
178
- * The visual style of the border (solid, dashed, auto, or none).
235
+ * The visual style of the border on all sides, such as solid, dashed, or dotted. When set, this overrides the style value specified in the `border` property.
179
236
  *
180
237
  * @default '' - meaning no override
181
238
  */
@@ -183,7 +240,7 @@ export interface BoxProps
183
240
  | MaybeAllValuesShorthandProperty<BoxBorderStyles>
184
241
  | Extract<RequiredBoxProps['borderStyle'], ''>;
185
242
  /**
186
- * The color of the border using the design system's color scale.
243
+ * The color of the border using the design system's color scale. When set, this overrides the color value specified in the `border` property.
187
244
  *
188
245
  * @default '' - meaning no override
189
246
  */
@@ -192,99 +249,85 @@ export interface BoxProps
192
249
  'subdued' | 'base' | 'strong' | ''
193
250
  >;
194
251
  /**
195
- * The roundedness of the corners using the design system's radius scale.
252
+ * The roundedness of the element's corners using the design system's radius scale.
196
253
  *
197
254
  * @default 'none'
198
255
  */
199
256
  borderRadius: MaybeAllValuesShorthandProperty<BoxBorderRadii>;
200
257
  /**
201
- * The padding applied to all edges of the image container.
202
- *
203
- * [1-to-4-value syntax](https://developer.mozilla.org/en-US/docs/Web/CSS/Shorthand_properties#edges_of_a_box) is supported. Note that, contrary to the CSS, it uses flow-relative values and the order is:
258
+ * The padding applied to all edges of the component.
204
259
  *
205
- * - 4 values: `block-start inline-end block-end inline-start`
206
- * - 3 values: `block-start inline block-end`
207
- * - 2 values: `block inline`
260
+ * Supports [1-to-4-value syntax](https://developer.mozilla.org/en-US/docs/Web/CSS/Shorthand_properties#edges_of_a_box) using flow-relative values:
261
+ * - 1 value applies to all sides
262
+ * - 2 values apply to block (top/bottom) and inline (left/right)
263
+ * - 3 values apply to block-start (top), inline (left/right), and block-end (bottom)
264
+ * - 4 values apply to block-start (top), inline-end (right), block-end (bottom), and inline-start (left)
208
265
  *
209
- * For example:
210
- * - `large` means block-start, inline-end, block-end and inline-start paddings are `large`.
211
- * - `large none` means block-start and block-end paddings are `large`, inline-start and inline-end paddings are `none`.
212
- * - `large none large` means block-start padding is `large`, inline-end padding is `none`, block-end padding is `large` and inline-start padding is `none`.
213
- * - `large none large small` means block-start padding is `large`, inline-end padding is `none`, block-end padding is `large` and inline-start padding is `small`.
266
+ * **Examples:** `base`, `large none`, `base large-100 base small`
214
267
  *
215
- * A padding value of `auto` will use the default padding for the closest container that has had its usual padding removed.
216
- *
217
- * `padding` also accepts a [responsive value](https://shopify.dev/docs/api/polaris/using-polaris-web-components#responsive-values) string with the supported `PaddingKeyword` as a query value.
268
+ * Use `auto` to inherit padding from the nearest container with removed padding. Also accepts a [responsive value](/docs/api/polaris/using-polaris-web-components#responsive-values) string with the supported `PaddingKeyword` as a query value.
218
269
  *
219
270
  * @default 'none'
220
271
  */
221
272
  padding: ResponsiveBoxProps['padding'];
222
273
  /**
223
- * The padding applied to the block axis (top and bottom in horizontal writing modes).
274
+ * The block-direction padding (top and bottom in horizontal writing modes).
224
275
  *
225
- * - `large none` means block-start padding is `large`, block-end padding is `none`.
276
+ * Accepts a single value for both sides or two space-separated values for block-start and block-end.
226
277
  *
227
- * This overrides the block value of `padding`.
278
+ * **Example:** `large none` applies `large` to the top and `none` to the bottom.
228
279
  *
229
- * `paddingBlock` also accepts a [responsive value](https://shopify.dev/docs/api/polaris/using-polaris-web-components#responsive-values) string with the supported `PaddingKeyword` as a query value.
280
+ * Overrides the block value from `padding`. Also accepts a [responsive value](/docs/api/polaris/using-polaris-web-components#responsive-values) string with the supported `PaddingKeyword` as a query value.
230
281
  *
231
282
  * @default '' - meaning no override
232
283
  */
233
284
  paddingBlock: ResponsiveBoxProps['paddingBlock'];
234
285
  /**
235
- * The padding applied to the block-start edge (top in horizontal writing modes).
236
- *
237
- * This overrides the block-start value of `paddingBlock`.
286
+ * The block-start padding (top in horizontal writing modes).
238
287
  *
239
- * `paddingBlockStart` also accepts a [responsive value](https://shopify.dev/docs/api/polaris/using-polaris-web-components#responsive-values) string with the supported `PaddingKeyword` as a query value.
288
+ * Overrides the block-start value from `paddingBlock`. Also accepts a [responsive value](/docs/api/polaris/using-polaris-web-components#responsive-values) string with the supported `PaddingKeyword` as a query value.
240
289
  *
241
290
  * @default '' - meaning no override
242
291
  */
243
292
  paddingBlockStart: ResponsiveBoxProps['paddingBlockStart'];
244
293
  /**
245
- * The padding applied to the block-end edge (bottom in horizontal writing modes).
294
+ * The block-end padding (bottom in horizontal writing modes).
246
295
  *
247
- * This overrides the block-end value of `paddingBlock`.
248
- *
249
- * `paddingBlockEnd` also accepts a [responsive value](https://shopify.dev/docs/api/polaris/using-polaris-web-components#responsive-values) string with the supported `PaddingKeyword` as a query value.
296
+ * Overrides the block-end value from `paddingBlock`. Also accepts a [responsive value](/docs/api/polaris/using-polaris-web-components#responsive-values) string with the supported `PaddingKeyword` as a query value.
250
297
  *
251
298
  * @default '' - meaning no override
252
299
  */
253
300
  paddingBlockEnd: ResponsiveBoxProps['paddingBlockEnd'];
254
301
  /**
255
- * The padding applied to the inline axis (left and right in horizontal writing modes).
302
+ * The inline-direction padding (left and right in horizontal writing modes).
256
303
  *
257
- * - `large none` means inline-start padding is `large`, inline-end padding is `none`.
304
+ * Accepts a single value for both sides or two space-separated values for inline-start and inline-end.
258
305
  *
259
- * This overrides the inline value of `padding`.
306
+ * **Example:** `large none` applies `large` to the left and `none` to the right.
260
307
  *
261
- * `paddingInline` also accepts a [responsive value](https://shopify.dev/docs/api/polaris/using-polaris-web-components#responsive-values) string with the supported `PaddingKeyword` as a query value.
308
+ * Overrides the inline value from `padding`. Also accepts a [responsive value](/docs/api/polaris/using-polaris-web-components#responsive-values) string with the supported `PaddingKeyword` as a query value.
262
309
  *
263
310
  * @default '' - meaning no override
264
311
  */
265
312
  paddingInline: ResponsiveBoxProps['paddingInline'];
266
313
  /**
267
- * The padding applied to the inline-start edge (left in left-to-right languages).
268
- *
269
- * This overrides the inline-start value of `paddingInline`.
314
+ * The inline-start padding (left in LTR writing modes, right in RTL).
270
315
  *
271
- * `paddingInlineStart` also accepts a [responsive value](https://shopify.dev/docs/api/polaris/using-polaris-web-components#responsive-values) string with the supported `PaddingKeyword` as a query value.
316
+ * Overrides the inline-start value from `paddingInline`. Also accepts a [responsive value](/docs/api/polaris/using-polaris-web-components#responsive-values) string with the supported `PaddingKeyword` as a query value.
272
317
  *
273
318
  * @default '' - meaning no override
274
319
  */
275
320
  paddingInlineStart: ResponsiveBoxProps['paddingInlineStart'];
276
321
  /**
277
- * The padding applied to the inline-end edge (right in left-to-right languages).
322
+ * The inline-end padding (right in LTR writing modes, left in RTL).
278
323
  *
279
- * This overrides the inline-end value of `paddingInline`.
280
- *
281
- * `paddingInlineEnd` also accepts a [responsive value](https://shopify.dev/docs/api/polaris/using-polaris-web-components#responsive-values) string with the supported `PaddingKeyword` as a query value.
324
+ * Overrides the inline-end value from `paddingInline`. Also accepts a [responsive value](/docs/api/polaris/using-polaris-web-components#responsive-values) string with the supported `PaddingKeyword` as a query value.
282
325
  *
283
326
  * @default '' - meaning no override
284
327
  */
285
328
  paddingInlineEnd: ResponsiveBoxProps['paddingInlineEnd'];
286
329
  /**
287
- * Sets the outer [display](https://developer.mozilla.org/en-US/docs/Web/CSS/display) type of the component. The outer type sets a component's participation in [flow layout](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_flow_layout).
330
+ * The outer [display](https://developer.mozilla.org/en-US/docs/Web/CSS/display) type of the component. The outer type sets a component's participation in [flow layout](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_flow_layout).
288
331
  *
289
332
  * - `auto` the component's initial value. The actual value depends on the component and context.
290
333
  * - `none` hides the component from display and removes it from the accessibility tree, making it invisible to screen readers.
@@ -293,7 +336,7 @@ export interface BoxProps
293
336
  */
294
337
  display: ResponsiveBoxProps['display'];
295
338
  /**
296
- * The vertical size of the image in standard layouts (height in left-to-right or right-to-left writing modes).
339
+ * The vertical size of the element in standard layouts (height in left-to-right or right-to-left writing modes).
297
340
  *
298
341
  * Block size adjusts based on the writing direction: in horizontal layouts, it controls the height;
299
342
  * in vertical layouts, it controls the width. This ensures consistent behavior across different text directions.
@@ -304,31 +347,44 @@ export interface BoxProps
304
347
  */
305
348
  blockSize: SizeUnitsOrAuto;
306
349
  /**
307
- * The [minimum block size](https://developer.mozilla.org/en-US/docs/Web/CSS/min-block-size) (minimum height in horizontal writing modes) of the image.
350
+ * The minimum height in horizontal writing modes, or minimum width in vertical writing modes.
351
+ * Prevents the element from shrinking below this size.
352
+ *
353
+ * Learn more about [min-block-size](https://developer.mozilla.org/en-US/docs/Web/CSS/min-block-size).
308
354
  *
309
355
  * @default '0'
310
356
  */
311
357
  minBlockSize: SizeUnits;
312
358
  /**
313
- * The [maximum block size](https://developer.mozilla.org/en-US/docs/Web/CSS/max-block-size) (maximum height in horizontal writing modes) of the image.
359
+ * The maximum height in horizontal writing modes, or maximum width in vertical writing modes.
360
+ * Prevents the element from growing beyond this size.
361
+ *
362
+ * Learn more about [max-block-size](https://developer.mozilla.org/en-US/docs/Web/CSS/max-block-size).
314
363
  *
315
364
  * @default 'none'
316
365
  */
317
366
  maxBlockSize: SizeUnitsOrNone;
318
367
  /**
319
- * The [inline size](https://developer.mozilla.org/en-US/docs/Web/CSS/inline-size) (width in horizontal writing modes) of the image.
368
+ * The width in horizontal writing modes, or height in vertical writing modes.
369
+ * Use this for flow-relative sizing that adapts to text direction. Learn more about [inline-size](https://developer.mozilla.org/en-US/docs/Web/CSS/inline-size).
320
370
  *
321
371
  * @default 'auto'
322
372
  */
323
373
  inlineSize: SizeUnitsOrAuto;
324
374
  /**
325
- * The [minimum inline size](https://developer.mozilla.org/en-US/docs/Web/CSS/min-inline-size) (minimum width in horizontal writing modes) of the image.
375
+ * The minimum width in horizontal writing modes, or minimum height in vertical writing modes.
376
+ * Prevents the element from shrinking below this size.
377
+ *
378
+ * Learn more about [min-inline-size](https://developer.mozilla.org/en-US/docs/Web/CSS/min-inline-size).
326
379
  *
327
380
  * @default '0'
328
381
  */
329
382
  minInlineSize: SizeUnits;
330
383
  /**
331
- * The [maximum inline size](https://developer.mozilla.org/en-US/docs/Web/CSS/max-inline-size) (maximum width in horizontal writing modes) of the image.
384
+ * The maximum width in horizontal writing modes, or maximum height in vertical writing modes.
385
+ * Prevents the element from growing beyond this size.
386
+ *
387
+ * Learn more about [max-inline-size](https://developer.mozilla.org/en-US/docs/Web/CSS/max-inline-size).
332
388
  *
333
389
  * @default 'none'
334
390
  */
@@ -336,8 +392,7 @@ export interface BoxProps
336
392
  }
337
393
 
338
394
  /**
339
- * The properties for the image component. An image displays pictures with configurable sizing, loading behavior, and borders. Properties include `src` for the image URL, `alt` for accessibility text, `aspectRatio` for sizing, `loading` for lazy loading, and border styling options.
340
- * @publicDocs
395
+ * Configure the following properties on the image component.
341
396
  */
342
397
  export interface ImageProps
343
398
  extends Required<
@@ -365,227 +420,141 @@ export interface ImageProps
365
420
  >
366
421
  > {
367
422
  /**
368
- * The URL of the image to display. You can provide an absolute or relative URL pointing to the image file.
369
- */
370
- src: ImageProps$1['src'];
371
- /**
372
- * A set of source images with different sizes for responsive loading. Use this to provide multiple image sizes for different screen resolutions (for example, `'image-320w.jpg 320w, image-640w.jpg 640w'`).
373
- */
374
- srcSet: ImageProps$1['srcSet'];
375
- /**
376
- * The sizes of the image at different viewport widths. Use this with `srcSet` to tell the browser which image to load (for example, `'(max-width: 320px) 280px, 640px'`).
377
- */
378
- sizes: ImageProps$1['sizes'];
379
- /**
380
- * Alternative text that describes the image for screen readers. This text should convey the meaning or content of the image to users who can't see it.
381
- */
382
- alt: ImageProps$1['alt'];
383
- /**
384
- * The aspect ratio of the image as a width-to-height ratio (for example, `'16/9'` or `'1'`). This helps prevent layout shifts while the image loads.
385
- */
386
- aspectRatio: ImageProps$1['aspectRatio'];
387
- /**
388
- * How the image should be resized to fit its container. Choose `'cover'` to fill the container while maintaining aspect ratio (cropping if needed), or `'contain'` to fit the entire image within the container.
389
- */
390
- objectFit: ImageProps$1['objectFit'];
391
- /**
392
- * When the image should be loaded. Use `'lazy'` to defer loading until the image is near the viewport, or `'eager'` to load immediately.
393
- */
394
- loading: ImageProps$1['loading'];
395
- /**
396
- * The accessibility role for the image. Set this to provide semantic meaning for screen readers.
397
- */
398
- accessibilityRole: ImageProps$1['accessibilityRole'];
399
- /**
400
- * The inline size (width in horizontal writing modes) of the image. You can use size units like `'100px'` or `'50%'`.
401
- */
402
- inlineSize: ImageProps$1['inlineSize'];
403
- /**
404
- * Whether to show a border around the image. Set to `true` to display a border, or `false` to hide it.
405
- */
406
- border: BoxProps['border'];
407
- /**
408
- * The width of the border around the image. You can use a single value to apply the same width to all sides, or use the 1-to-4-value syntax to control individual sides.
409
- */
410
- borderWidth: BoxProps['borderWidth'];
411
- /**
412
- * The style of the border around the image. You can use a single value to apply the same style to all sides, or use the 1-to-4-value syntax to control individual sides.
413
- */
414
- borderStyle: BoxProps['borderStyle'];
415
- /**
416
- * The color of the border around the image. Choose from `'subdued'`, `'base'`, or `'strong'` to control the visual emphasis.
417
- */
418
- borderColor: BoxProps['borderColor'];
419
- /**
420
- * The radius of the border corners around the image. You can use a single value to apply the same radius to all corners, or use the 1-to-4-value syntax to control individual corners.
421
- */
422
- borderRadius: BoxProps['borderRadius'];
423
- }
424
-
425
- /**
426
- * A string containing CSS styles for a custom element.
427
- * @publicDocs
428
- */
429
- export type Styles = string;
430
- /**
431
- * The configuration for rendering a custom element with Preact.
432
- * @publicDocs
433
- */
434
- export type RenderImpl = Omit<ShadowRootInit, 'mode'> & {
435
- /**
436
- * The function that renders the shadow root content.
437
- */
438
- ShadowRoot: (element: any) => ComponentChildren;
439
- /**
440
- * The optional CSS styles to apply to the shadow root.
441
- */
442
- styles?: Styles;
443
- };
444
- /**
445
- * The properties of an activation event, such as a click or keypress. These properties capture which modifier keys were pressed and which mouse button was used during the event.
446
- * @publicDocs
447
- */
448
- export interface ActivationEventEsque {
449
- /**
450
- * Whether the shift key was pressed during the event.
423
+ * The loading strategy for the image.
424
+ *
425
+ * - `eager`: Immediately loads the image, irrespective of its position within the visible viewport.
426
+ * - `lazy`: Delays loading the image until it approaches a specified distance from the viewport.
427
+ *
428
+ * Learn more about the [loading attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#loading).
429
+ *
430
+ * @default 'eager'
451
431
  */
452
- shiftKey: boolean;
432
+ loading: Required<ImageProps$1>['loading'];
453
433
  /**
454
- * Whether the meta key (Command on Mac, Windows key on Windows) was pressed during the event.
434
+ * The semantic meaning of the component’s content. When set,
435
+ * the role will be used by assistive technologies to help users
436
+ * navigate the page.
437
+ *
438
+ * - `none`: Completely hides the element and its content from assistive technologies
439
+ * - `presentation`: Removes semantic meaning, making the image purely decorative and ignored by screen readers.
440
+ * - `img`: Identifies the element as an image that conveys meaningful information to users.
441
+ *
442
+ * @default 'img'
443
+ *
444
+ * @implementation The `img` role doesn't need to be applied if
445
+ * the host applies it for you; for example, an HTML host rendering
446
+ * an `<img>` element should not apply the `img` role.
455
447
  */
456
- metaKey: boolean;
448
+ accessibilityRole: Required<ImageProps$1>['accessibilityRole'];
457
449
  /**
458
- * Whether the control key was pressed during the event.
450
+ * The displayed inline width of the image.
451
+ *
452
+ * - `fill`: the image will take up 100% of the available inline size.
453
+ * - `auto`: the image will be displayed at its natural size.
454
+ *
455
+ * Learn more about the [width attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#width).
456
+ *
457
+ * @default 'fill'
459
458
  */
460
- ctrlKey: boolean;
459
+ inlineSize: Required<ImageProps$1>['inlineSize'];
461
460
  /**
462
- * The mouse button that was pressed (0 for left, 1 for middle, 2 for right).
461
+ * The aspect ratio of the image.
462
+ *
463
+ * The rendering of the image will depend on the `inlineSize` value:
464
+ *
465
+ * - `inlineSize="fill"`: the aspect ratio will be respected and the image will take the necessary space.
466
+ * - `inlineSize="auto"`: the image will not render until it has loaded and the aspect ratio will be ignored.
467
+ *
468
+ * For example, if the value is set as `50 / 100`, the getter returns `50 / 100`.
469
+ * If the value is set as `0.5`, the getter returns `0.5 / 1`.
470
+ *
471
+ * Learn more about the [aspect-ratio property](https://developer.mozilla.org/en-US/docs/Web/CSS/aspect-ratio).
472
+ *
473
+ * @default '1/1'
463
474
  */
464
- button: number;
465
- }
466
- /**
467
- * The options for triggering a synthetic click event.
468
- * @publicDocs
469
- */
470
- export interface ClickOptions {
475
+ aspectRatio: Required<ImageProps$1>['aspectRatio'];
471
476
  /**
472
- * The original user event (such as a click or keyboard event) that triggered this programmatic click. When provided, the component preserves important event properties like modifier keys (Ctrl, Shift, Alt, Meta) and mouse button states, enabling behaviors such as opening links in a new tab when middle-clicked or Ctrl+clicked.
477
+ * The image resizing behavior to fit within its container.
478
+ *
479
+ * - `contain`: Scales the image to fit within the container while maintaining its aspect ratio. The entire image is visible, but might leave empty space.
480
+ * - `cover`: Scales the image to fill the entire container while maintaining its aspect ratio. The image might be cropped to fit.
481
+ *
482
+ * The image is always positioned in the center of the container.
483
+ *
484
+ * Learn more about the [object-fit property](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit).
485
+ *
486
+ * @default 'contain'
473
487
  */
474
- sourceEvent?: ActivationEventEsque;
488
+ objectFit: Required<ImageProps$1>['objectFit'];
475
489
  }
476
- /**
477
- * The base class for creating custom elements with Preact.
478
- * While this class could be used in both Node and the browser, the constructor will only be used in the browser.
479
- * So we give it a type of `HTMLElement` to avoid typing issues later where it's used, which will only happen in the browser.
480
- */
481
- declare const BaseClass: typeof globalThis.HTMLElement;
482
- /**
483
- * An abstract base class for creating custom elements that render with Preact.
484
- */
485
- declare abstract class PreactCustomElement extends BaseClass {
486
- /** @private */
487
- static get observedAttributes(): string[];
488
- constructor({
489
- styles,
490
- ShadowRoot: renderFunction,
491
- delegatesFocus,
492
- ...options
493
- }: RenderImpl);
494
490
 
495
- /** @private */
496
- setAttribute(name: string, value: string): void;
497
- /** @private */
498
- attributeChangedCallback(name: string): void;
491
+ declare class PolarisCustomElement extends PreactCustomElement {
492
+ constructor(renderImpl: Omit<RenderImpl, 'globalShadowCSS'>);
499
493
  /** @private */
500
494
  connectedCallback(): void;
501
495
  /** @private */
502
- disconnectedCallback(): void;
503
- /** @private */
504
496
  adoptedCallback(): void;
505
- /**
506
- * Queues a run of the render function.
507
- * You shouldn't need to call this manually - it should be handled by changes to `@property` values.
508
- * @private
509
- */
510
- queueRender(): void;
511
- /**
512
- * Like the standard `element.click()`, but you can influence the behavior with a `sourceEvent`.
513
- *
514
- * For example, if the `sourceEvent` was a middle click, or has particular keys held down,
515
- * components will attempt to produce the desired behavior on links, such as opening the page in a background tab.
516
- * @private
517
- * @param options
518
- */
519
- click({sourceEvent}?: ClickOptions): void;
520
497
  }
521
498
 
522
499
  /**
523
- * An image displays pictures with configurable sizing, loading behavior, and borders.
500
+ * Configure the following properties on the image component.
501
+ * @publicDocs
524
502
  */
525
- declare class Image extends PreactCustomElement implements ImageProps {
503
+ declare class Image extends PolarisCustomElement implements ImageProps {
526
504
  /**
527
- * The URL of the image to display.
505
+ * The image source (either a remote URL or a local file resource).
506
+ *
507
+ * When the image is loading or no `src` is provided, a placeholder is rendered.
528
508
  */
529
509
  accessor src: ImageProps['src'];
530
510
  /**
531
- * A set of source images with different sizes for responsive loading.
511
+ * A set of image sources and their width or pixel density descriptors. This overrides the `src` property.
512
+ *
513
+ * Learn more about the [srcset attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#srcset).
532
514
  */
533
515
  accessor srcSet: ImageProps['srcSet'];
534
516
  /**
535
- * The sizes of the image at different viewport widths.
517
+ * A set of media conditions and their corresponding sizes.
518
+ *
519
+ * Learn more about the [sizes attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#sizes).
536
520
  */
537
521
  accessor sizes: ImageProps['sizes'];
538
522
  /**
539
- * Alternative text that describes the image for screen readers.
523
+ * Alternative text that describes the image for accessibility.
524
+ *
525
+ * Provides a text description of the image for users with assistive technology and serves as a fallback when the image fails to load. A well-written description enables people with visual impairments to understand non-text content.
526
+ *
527
+ * When a screen reader encounters an image, it reads this description aloud. When an image fails to load, this text displays on screen, helping all users understand what content was intended.
528
+ *
529
+ * Learn more about [writing effective alt text](https://www.shopify.com/ca/blog/image-alt-text#4) and the [alt attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#alt).
540
530
  */
541
531
  accessor alt: ImageProps['alt'];
542
- /**
543
- * The aspect ratio of the image as a width-to-height ratio.
544
- */
545
532
  accessor aspectRatio: ImageProps['aspectRatio'];
546
- /**
547
- * How the image should be resized to fit its container.
548
- */
549
533
  accessor objectFit: ImageProps['objectFit'];
550
- /**
551
- * When the image should be loaded.
552
- */
553
534
  accessor loading: ImageProps['loading'];
554
- /**
555
- * The accessibility role for the image.
556
- */
557
535
  accessor accessibilityRole: ImageProps['accessibilityRole'];
558
- /**
559
- * The inline size (width in horizontal writing modes) of the image.
560
- */
561
536
  accessor inlineSize: ImageProps['inlineSize'];
562
537
  /**
563
- * Whether to show a border around the image.
538
+ * A border applied around the image using shorthand syntax to specify width, color, and style in a single property.
564
539
  */
565
540
  accessor border: ImageProps['border'];
566
541
  /**
567
- * The width of the border around the image.
542
+ * The thickness of the border around the image. When set, this overrides the width value specified in the `border` property.
568
543
  */
569
544
  accessor borderWidth: ImageProps['borderWidth'];
570
545
  /**
571
- * The style of the border around the image.
546
+ * The visual style of the border around the image, such as solid, dashed, or dotted. When set, this overrides the style value specified in the `border` property.
572
547
  */
573
548
  accessor borderStyle: ImageProps['borderStyle'];
574
549
  /**
575
- * The color of the border around the image.
550
+ * The color of the border around the image using the design system's color scale. When set, this overrides the color value specified in the `border` property.
576
551
  */
577
552
  accessor borderColor: ImageProps['borderColor'];
578
553
  /**
579
- * The radius of the border corners around the image.
554
+ * The roundedness of the image's corners using the design system's radius scale.
580
555
  */
581
556
  accessor borderRadius: ImageProps['borderRadius'];
582
- /**
583
- * A callback that's fired when the image has loaded successfully.
584
- */
585
557
  accessor onload: CallbackEventListener<typeof tagName> | null;
586
- /**
587
- * A callback that's fired when the image fails to load.
588
- */
589
558
  accessor onerror: OnErrorEventHandler;
590
559
  constructor();
591
560
  }
@@ -603,19 +572,15 @@ declare module 'preact' {
603
572
  }
604
573
 
605
574
  declare const tagName = 's-image';
606
- /**
607
- * The properties for the image component when it's used in JSX.
608
- * @publicDocs
609
- */
610
575
  export interface ImageJSXProps
611
576
  extends Partial<ImageProps>,
612
577
  Pick<ImageProps$1, 'id'> {
613
578
  /**
614
- * A callback that's fired when the image fails to load.
579
+ * A callback fired when the image fails to load.
615
580
  */
616
581
  onError?: ((event: CallbackEvent<typeof tagName>) => void) | null;
617
582
  /**
618
- * A callback that's fired when the image has loaded successfully.
583
+ * A callback fired when the image loads successfully.
619
584
  */
620
585
  onLoad?: ((event: CallbackEvent<typeof tagName>) => void) | null;
621
586
  }