@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 */
@@ -12,20 +12,30 @@ import type {
12
12
  ButtonProps$1,
13
13
  IconType,
14
14
  InteractionProps,
15
+ PreactCustomElement,
16
+ RenderImpl,
15
17
  } from './shared.d.ts';
18
+ import * as preact$1 from 'preact';
19
+ import {ReactNode, RefAttributes} from 'react';
16
20
 
17
21
  /**
18
- * A callback event with a strongly-typed `currentTarget` property that corresponds to a specific HTML element. This provides better type safety when handling events from custom elements.
22
+ * An event object with a strongly-typed `currentTarget` property that references the specific HTML element that triggered the event.
23
+ *
24
+ * This type extends the standard DOM `Event` interface and ensures type safety when accessing the element that fired the event.
19
25
  * @publicDocs
20
26
  */
21
27
  export type CallbackEvent<T extends keyof HTMLElementTagNameMap> = Event & {
22
- /**
23
- * The element that the event listener is attached to, strongly typed based on the element's tag name.
24
- */
25
28
  currentTarget: HTMLElementTagNameMap[T];
26
29
  };
27
30
  /**
28
- * An event listener function type for callback events with a strongly-typed `currentTarget`. This ensures the event handler receives the correct element type.
31
+ * A function that handles events from UI components.
32
+ *
33
+ * 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.
34
+ *
35
+ * @example
36
+ * const handleClick: CallbackEventListener<'button'> = (event) => {
37
+ * console.log('Button clicked:', event.currentTarget);
38
+ * };
29
39
  * @publicDocs
30
40
  */
31
41
  export type CallbackEventListener<T extends keyof HTMLElementTagNameMap> =
@@ -34,57 +44,95 @@ export type CallbackEventListener<T extends keyof HTMLElementTagNameMap> =
34
44
  })
35
45
  | null;
36
46
  /**
37
- * The base properties for Preact elements without children. Provides `key`, `ref`, and `slot` properties for element identification, DOM access, and slot-based positioning.
47
+ * 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.
38
48
  * @publicDocs
39
49
  */
40
50
  export interface PreactBaseElementProps<TClass extends HTMLElement> {
41
51
  /**
42
- * A unique identifier for the element when used in lists. Preact uses keys for efficient rendering and reconciliation when lists change.
52
+ * A unique identifier for this element, used by the virtual DOM to efficiently track and update elements in lists.
53
+ * Essential for maintaining component state and optimizing re-renders when lists change.
43
54
  */
44
55
  key?: preact.Key;
45
56
  /**
46
- * A reference to the underlying DOM element. Typically created with `useRef()` to access the element directly for imperative operations like focusing or measuring.
57
+ * A reference to access the underlying DOM element directly.
58
+ * Typically created using `useRef()` to interact with the element imperatively or measure its properties.
47
59
  */
48
60
  ref?: preact.Ref<TClass>;
49
61
  /**
50
- * The named slot this element should be placed in when used within a web component. Learn more about [using slots](/docs/api/polaris/using-polaris-web-components#slots).
62
+ * The named slot to which this element is assigned in the parent component's shadow DOM.
63
+ *
64
+ * Used for advanced component composition with web components.
51
65
  */
52
66
  slot?: Lowercase<string>;
53
67
  }
54
68
  /**
55
- * The base properties for Preact elements with children. Extends `PreactBaseElementProps` with the ability to render child elements.
69
+ * Base props for Preact custom elements with children support. Extends PreactBaseElementProps with the ability to render child elements.
56
70
  * @publicDocs
57
71
  */
58
72
  export interface PreactBaseElementPropsWithChildren<TClass extends HTMLElement>
59
73
  extends PreactBaseElementProps<TClass> {
60
74
  /**
61
- * The child elements to render within this component.
75
+ * The child elements to be rendered within this component.
62
76
  */
63
77
  children?: preact.ComponentChildren;
64
78
  }
65
79
 
80
+ export type ReactIntrinsicElementChildren<PreactProps extends object> =
81
+ 'children' extends keyof PreactProps
82
+ ? {
83
+ children?: ReactNode;
84
+ }
85
+ : Record<never, never>;
86
+ export type ReactIntrinsicElementProps<
87
+ PreactProps extends object,
88
+ ElementType,
89
+ > = Omit<PreactProps, 'children' | 'key' | 'ref' | 'slot'> &
90
+ ReactIntrinsicElementChildren<PreactProps> &
91
+ RefAttributes<ElementType> & {
92
+ slot?: Lowercase<string>;
93
+ };
94
+ export type ReactIntrinsicElements = {
95
+ [Tag in Exclude<
96
+ Extract<keyof preact$1.createElement.JSX.IntrinsicElements, `s-${string}`>,
97
+ `s-test-${string}`
98
+ >]: ReactIntrinsicElementProps<
99
+ preact$1.createElement.JSX.IntrinsicElements[Tag],
100
+ Tag extends keyof HTMLElementTagNameMap
101
+ ? HTMLElementTagNameMap[Tag]
102
+ : HTMLElement
103
+ >;
104
+ };
105
+ declare module 'react' {
106
+ namespace JSX {
107
+ interface IntrinsicElements extends ReactIntrinsicElements {}
108
+ }
109
+ }
110
+
66
111
  /**
67
- * The configuration for icons used within Button components. Defines the visual appearance, size, and semantic meaning of icons displayed in buttons.
68
- * @publicDocs
112
+ * Configure the following properties on the icon component.
69
113
  */
70
114
  export interface IconProps
71
- extends Pick<
72
- IconProps$1,
73
- 'type' | 'tone' | 'color' | 'size' | 'interestFor'
115
+ extends Required<
116
+ Pick<IconProps$1, 'type' | 'tone' | 'color' | 'size' | 'interestFor'>
74
117
  > {
75
118
  /**
76
- * Specifies the type of icon that will be displayed.
119
+ * The icon to display from the icon library.
120
+ *
121
+ * Set to a valid icon name to display that icon. To hide the icon completely,
122
+ * use an empty string `''`. To reserve the icon's space without displaying an icon,
123
+ * use `'empty'`.
77
124
  */
78
125
  type: '' | IconType | 'empty';
79
126
  /**
80
- * Determines the color used for the icon based on semantic meaning. Available options:
81
- * - `'auto'` - Lets the system automatically choose the appropriate tone based on context.
82
- * - `'neutral'` - Gray styling for general information.
83
- * - `'info'` - Blue styling for informational content.
84
- * - `'success'` - Green styling for positive states.
85
- * - `'caution'` - Yellow styling for situations that need attention.
86
- * - `'warning'` - Orange styling for important notices.
87
- * - `'critical'` - Red styling for errors and urgent issues.
127
+ * The semantic meaning and color treatment of the component.
128
+ *
129
+ * - `info`: Informational content or helpful tips.
130
+ * - `success`: Positive outcomes or successful states.
131
+ * - `warning`: Important warnings about potential issues.
132
+ * - `critical`: Urgent problems or destructive actions.
133
+ * - `auto`: Automatically determined based on context.
134
+ * - `neutral`: General information without specific intent.
135
+ * - `caution`: Advisory notices that need attention.
88
136
  *
89
137
  * @default 'auto'
90
138
  */
@@ -93,25 +141,25 @@ export interface IconProps
93
141
  'auto' | 'neutral' | 'info' | 'success' | 'caution' | 'warning' | 'critical'
94
142
  >;
95
143
  /**
96
- * Controls the visual prominence of the icon. Available options:
97
- * - `'base'` - Standard color intensity for normal emphasis.
98
- * - `'subdued'` - Reduced color intensity for less emphasis.
144
+ * The color emphasis level that controls visual intensity.
145
+ *
146
+ * - `base`: Primary color for body text, standard UI elements, and general content with good readability.
147
+ * - `subdued`: Deemphasized color for secondary text, supporting labels, and less critical interface elements.
99
148
  *
100
149
  * @default 'base'
101
150
  */
102
151
  color: Extract<IconProps$1['color'], 'base' | 'subdued'>;
103
152
  /**
104
- * Determines the size of the icon. Available options:
105
- * - `'small'` - Smaller icon size for compact layouts.
106
- * - `'base'` - Standard icon size for most use cases.
153
+ * The size of the icon.
107
154
  *
108
- * @default 'base'
155
+ * - `small`: Smaller icon suitable for inline use within text or compact UI elements.
156
+ * - `base`: Default size that works well for standalone icons and standard use cases.
109
157
  */
110
158
  size: Extract<IconProps$1['size'], 'small' | 'base'>;
111
159
  }
112
160
 
113
161
  /**
114
- * The button-specific properties extracted from the base button props type, used internally for type safety.
162
+ * Represents button props that are specific to button-type elements only. Extracts the subset of `ButtonProps` that includes the `type` property.
115
163
  * @publicDocs
116
164
  */
117
165
  export type ButtonOnlyProps = Extract<
@@ -121,7 +169,7 @@ export type ButtonOnlyProps = Extract<
121
169
  }
122
170
  >;
123
171
  /**
124
- * The base required properties for the button component, including all essential button configuration options. This type ensures all button properties have default values.
172
+ * Represents the base button props with all properties marked as required.
125
173
  * @publicDocs
126
174
  */
127
175
  export type ButtonBaseProps = Required<
@@ -141,138 +189,69 @@ export type ButtonBaseProps = Required<
141
189
  | 'target'
142
190
  | 'href'
143
191
  | 'download'
192
+ | 'inlineSize'
144
193
  >
145
194
  >;
146
195
  /**
147
- * The properties for the button component. Buttons trigger actions or navigation when clicked, with customizable visual styles, states, and optional icons.
148
- * @publicDocs
196
+ * Configure the following properties on the button component.
149
197
  */
150
198
  export interface ButtonProps extends ButtonBaseProps {
151
199
  /**
152
- * Determines the visual appearance and semantic meaning of the button. Buttons rely on the tone system for semantic meaning, so using custom styling might not clearly convey intent to merchants. Available options:
153
- * - `'auto'` - Lets the system automatically choose the appropriate tone based on context.
154
- * - `'neutral'` - Standard styling for general actions without specific semantic meaning.
155
- * - `'critical'` - Red styling for destructive actions that can't be undone, such as deleting data.
200
+ * The semantic meaning and color treatment of the component.
201
+ *
202
+ * - `critical`: Urgent problems or destructive actions.
203
+ * - `auto`: Automatically determined based on context.
204
+ * - `neutral`: General information without specific intent.
156
205
  *
157
206
  * @default 'auto'
158
207
  */
159
208
  tone: Extract<ButtonProps$1['tone'], 'neutral' | 'critical' | 'auto'>;
160
209
  /**
161
- * The icon to display inside the button. Accepts any valid icon type or an empty string to display no icon.
210
+ * An icon displayed inside the button, typically positioned before the button text.
211
+ * Use icons to help users quickly identify the button's action or to improve scannability.
212
+ * Accepts any icon name from the icon library or a custom string identifier.
162
213
  *
163
214
  * @default ''
164
215
  */
165
216
  icon: IconProps['type'];
166
- }
167
-
168
- /**
169
- * The CSS styles as a string, used for styling web components within their shadow DOM.
170
- * @publicDocs
171
- */
172
- export type Styles = string;
173
- /**
174
- * The implementation configuration for rendering a Preact component into a shadow root. Defines the render function that returns JSX elements and optional CSS styles to apply to the component's shadow DOM.
175
- * @publicDocs
176
- */
177
- export type RenderImpl = Omit<ShadowRootInit, 'mode'> & {
178
- /**
179
- * The render function that returns Preact/JSX elements to display in the component's shadow root.
180
- */
181
- ShadowRoot: (element: any) => ComponentChildren;
182
217
  /**
183
- * The optional CSS styles to inject into the component's shadow DOM.
184
- */
185
- styles?: Styles;
186
- };
187
- /**
188
- * The properties of an activation event (such as a click or keyboard press) that describe which modifier keys and mouse buttons were involved. This is used to determine intended behavior like opening links in new tabs when Command/Control is pressed.
189
- * @publicDocs
190
- */
191
- export interface ActivationEventEsque {
192
- /**
193
- * Whether the Shift key was pressed during the activation event.
194
- */
195
- shiftKey: boolean;
196
- /**
197
- * Whether the Meta key (Command on Mac, Windows key on Windows) was pressed during the activation event.
198
- */
199
- metaKey: boolean;
200
- /**
201
- * Whether the Control key was pressed during the activation event.
218
+ * A label that describes the purpose or content of the component for assistive technologies like screen readers. Use this to provide additional context when the visible content alone doesn't clearly convey the component's purpose.
202
219
  */
203
- ctrlKey: boolean;
220
+ accessibilityLabel: Required<ButtonOnlyProps>['accessibilityLabel'];
204
221
  /**
205
- * The mouse button that was pressed during the activation event. `0` for primary button (left click), `1` for auxiliary button (middle click), `2` for secondary button (right click).
222
+ * The visual appearance of the button component.
223
+ *
224
+ * - `auto`: The variant is automatically determined by the button component's context.
225
+ * - `primary`: High emphasis button for the primary action on the page. Should be used sparingly.
226
+ * - `secondary`: Medium emphasis button for secondary actions.
227
+ * - `tertiary`: Low emphasis button for less important actions.
228
+ *
229
+ * @default 'auto'
206
230
  */
207
- button: number;
208
- }
209
- /**
210
- * The options for controlling how a synthetic click behaves. Allows passing modifier key states and button information from an original event to influence link behavior such as opening in new tabs or background tabs.
211
- * @publicDocs
212
- */
213
- export interface ClickOptions {
231
+ variant: Required<ButtonOnlyProps>['variant'];
214
232
  /**
215
- * The activation event (such as a click or keyboard event) whose modifier key state and button information should influence the synthetic click behavior. For example, passing an event with `metaKey: true` will cause links to open in a new tab.
233
+ * The language of the text content. Use this when the text is in a different language than the rest of the page, allowing assistive technologies such as screen readers to invoke the correct pronunciation. The value should be a valid language subtag from the [IANA language subtag registry](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry).
216
234
  */
217
- sourceEvent?: ActivationEventEsque;
235
+ lang: Required<ButtonOnlyProps>['lang'];
218
236
  }
219
- /**
220
- * Base class for creating custom elements with Preact.
221
- * While this class could be used in both Node and the browser, the constructor will only be used in the browser.
222
- * So we give it a type of HTMLElement to avoid typing issues later where it's used, which will only happen in the browser.
223
- */
224
- declare const BaseClass: typeof globalThis.HTMLElement;
225
- declare abstract class PreactCustomElement extends BaseClass {
226
- /** @private */
227
- static get observedAttributes(): string[];
228
- constructor({
229
- styles,
230
- ShadowRoot: renderFunction,
231
- delegatesFocus,
232
- ...options
233
- }: RenderImpl);
234
237
 
235
- /** @private */
236
- setAttribute(name: string, value: string): void;
237
- /** @private */
238
- attributeChangedCallback(name: string): void;
238
+ declare class PolarisCustomElement extends PreactCustomElement {
239
+ constructor(renderImpl: Omit<RenderImpl, 'globalShadowCSS'>);
239
240
  /** @private */
240
241
  connectedCallback(): void;
241
242
  /** @private */
242
- disconnectedCallback(): void;
243
- /** @private */
244
243
  adoptedCallback(): void;
245
- /**
246
- * Queue a run of the render function.
247
- * You shouldn't need to call this manually - it should be handled by changes to @property values.
248
- * @private
249
- */
250
- queueRender(): void;
251
- /**
252
- * Like the standard `element.click()`, but you can influence the behavior with a `sourceEvent`.
253
- *
254
- * For example, if the `sourceEvent` was a middle click, or has particular keys held down,
255
- * components will attempt to produce the desired behavior on links, such as opening the page in the background tab.
256
- * @private
257
- * @param options
258
- */
259
- click({sourceEvent}?: ClickOptions): void;
260
244
  }
261
245
 
262
- /**
263
- * The properties for controlling overlay interactions via commands. These properties enable buttons to control other components like modals, popovers, and dialogs using declarative commands.
264
- * @publicDocs
265
- */
266
246
  export interface PreactOverlayControlProps
267
247
  extends Pick<InteractionProps, 'commandFor' | 'interestFor'> {
268
248
  /**
269
- * Sets the action the [command](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#command) should take when this button is activated. Available options:
270
- * - `'--auto'`: Performs the default action appropriate for the target component.
271
- * - `'--show'`: Displays the target component if it's currently hidden.
272
- * - `'--hide'`: Conceals the target component from view.
273
- * - `'--toggle'`: Alternates the target component between visible and hidden states.
249
+ * The action that [command](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#command) should take when this component is activated.
274
250
  *
275
- * The supported actions vary by target component type.
251
+ * - `--auto`: A default action for the target component.
252
+ * - `--show`: Shows the target component.
253
+ * - `--hide`: Hides the target component.
254
+ * - `--toggle`: Toggles the visibility of the target component.
276
255
  *
277
256
  * @default '--auto'
278
257
  */
@@ -281,78 +260,59 @@ export interface PreactOverlayControlProps
281
260
  '--show' | '--hide' | '--toggle' | '--auto'
282
261
  >;
283
262
  /**
284
- * Sets the element ID that the [commandFor](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#commandfor) should act on when this button is activated. References another component by its `id` attribute.
263
+ * The component that [commandFor](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#commandfor) should act on when this component is activated.
285
264
  */
286
265
  commandFor: Extract<InteractionProps['commandFor'], string>;
287
266
  /**
288
- * Sets the element ID that the [interestFor](https://open-ui.org/components/interest-invokers.explainer/#the-pitch-in-code) should act on when this button is activated. Used for interest-based interactions with other components.
267
+ * The ID of the component to show when users hover over or focus on this component. Use this to connect interactive components to popovers or tooltips that provide additional context or information.
289
268
  */
290
269
  interestFor: Extract<InteractionProps['interestFor'], string>;
291
270
  }
292
271
 
293
- /**
294
- * The base class for the button component, combining Preact custom element functionality with overlay control capabilities.
295
- */
296
- declare const Button_base: (abstract new (
297
- args_0: RenderImpl,
298
- ) => PreactCustomElement & PreactOverlayControlProps) &
299
- Pick<typeof PreactCustomElement, 'prototype' | 'observedAttributes'>;
300
- /**
301
- * The button custom element class that renders interactive buttons in the Shopify admin interface. This component triggers actions or navigation when clicked, with customizable visual styles, states, and optional icons.
302
- */
303
- declare class Button extends Button_base implements ButtonProps {
304
- /**
305
- * Whether the button is disabled, preventing any interaction. When `true`, the button appears visually disabled and doesn't respond to user clicks.
306
- */
272
+ declare const ButtonBase_base: (abstract new (
273
+ renderImpl: Omit<RenderImpl, 'globalShadowCSS'>,
274
+ ) => PolarisCustomElement & PreactOverlayControlProps) &
275
+ Pick<typeof PolarisCustomElement, 'prototype' | 'observedAttributes'>;
276
+ declare abstract class ButtonBase<TTagName extends keyof HTMLElementTagNameMap>
277
+ extends ButtonBase_base
278
+ implements
279
+ Pick<
280
+ ButtonProps,
281
+ | 'disabled'
282
+ | 'loading'
283
+ | 'target'
284
+ | 'href'
285
+ | 'download'
286
+ | 'type'
287
+ | 'accessibilityLabel'
288
+ | 'inlineSize'
289
+ >
290
+ {
307
291
  accessor disabled: ButtonProps['disabled'];
308
- /**
309
- * The icon to display inside the button. Accepts any valid icon type from the admin icon set, or an empty string to display no icon.
310
- */
311
- accessor icon: ButtonProps['icon'];
312
- /**
313
- * Whether the button is in a loading state. When `true`, displays a loading indicator and prevents interaction to show that an action is in progress.
314
- */
315
292
  accessor loading: ButtonProps['loading'];
316
- /**
317
- * The visual style variant of the button that determines its emphasis. Available options: `'primary'`, `'secondary'`, `'tertiary'`, or `'plain'`.
318
- */
319
- accessor variant: ButtonProps['variant'];
320
- /**
321
- * The tone that determines the button's visual appearance and semantic meaning. Available options: `'auto'`, `'neutral'`, or `'critical'`.
322
- */
323
- accessor tone: ButtonProps['tone'];
324
- /**
325
- * Specifies where to open the linked document when the button acts as a link. Available options: `''`, `'_blank'`, `'_self'`, `'_parent'`, or `'_top'`.
326
- */
327
293
  accessor target: ButtonProps['target'];
328
- /**
329
- * A URL that the button should navigate to when clicked. When provided, the button behaves as a link.
330
- */
331
294
  accessor href: ButtonProps['href'];
332
- /**
333
- * Prompts the user to save the linked URL as a file with the specified filename. Only works when `href` is provided.
334
- */
335
295
  accessor download: ButtonProps['download'];
336
- /**
337
- * A callback that's invoked when the button is clicked. Receives the click event as an argument.
338
- */
339
- accessor onclick: CallbackEventListener<typeof tagName> | null;
340
- /**
341
- * A callback that's invoked when the button loses focus. Receives the blur event as an argument.
342
- */
343
- accessor onblur: CallbackEventListener<typeof tagName> | null;
344
- /**
345
- * A callback that's invoked when the button receives focus. Receives the focus event as an argument.
346
- */
347
- accessor onfocus: CallbackEventListener<typeof tagName> | null;
348
- /**
349
- * The button's behavior in forms. Available options: `'button'`, `'submit'`, or `'reset'`.
350
- */
351
296
  accessor type: ButtonProps['type'];
352
- /**
353
- * A text description of the button's purpose for screen readers. This is essential for accessibility when the button doesn't have visible text.
354
- */
355
297
  accessor accessibilityLabel: ButtonProps['accessibilityLabel'];
298
+ accessor inlineSize: ButtonProps['inlineSize'];
299
+ accessor onclick: CallbackEventListener<TTagName> | null;
300
+ accessor onblur: CallbackEventListener<TTagName> | null;
301
+ accessor onfocus: CallbackEventListener<TTagName> | null;
302
+ abstract icon: string;
303
+ abstract variant: string;
304
+ abstract tone: string;
305
+ constructor(renderImpl: RenderImpl);
306
+ }
307
+
308
+ /**
309
+ * Configure the following properties on the button component.
310
+ * @publicDocs
311
+ */
312
+ declare class Button extends ButtonBase<typeof tagName> implements ButtonProps {
313
+ accessor icon: ButtonProps['icon'];
314
+ accessor variant: ButtonProps['variant'];
315
+ accessor tone: ButtonProps['tone'];
356
316
  constructor();
357
317
  }
358
318
  declare global {
@@ -369,95 +329,25 @@ declare module 'preact' {
369
329
  }
370
330
 
371
331
  declare const tagName = 's-button';
372
- /**
373
- * The JSX props for the button component. These properties extend `ButtonProps` with event callbacks and additional options for rendering buttons in JSX.
374
- * @publicDocs
375
- */
376
332
  export interface ButtonJSXProps
377
333
  extends Partial<ButtonProps>,
378
334
  Pick<ButtonProps$1, 'id' | 'children'> {
379
335
  /**
380
- * The text label or content to display inside the button. Can be plain text or other components.
336
+ * The label text or elements displayed inside the button component, describing the action that will be performed when clicked.
381
337
  */
382
338
  children?: ComponentChildren;
383
339
  /**
384
- * Callback function that's invoked when the button is clicked. Receives the click event as an argument.
340
+ * A callback fired when the button is clicked.
385
341
  */
386
342
  onClick?: ((event: CallbackEvent<typeof tagName>) => void) | null;
387
343
  /**
388
- * Callback function that's invoked when the button receives focus. Receives the focus event as an argument.
344
+ * A callback fired when the button receives focus.
389
345
  */
390
346
  onFocus?: ((event: CallbackEvent<typeof tagName>) => void) | null;
391
347
  /**
392
- * Callback function that's invoked when the button loses focus. Receives the blur event as an argument.
348
+ * A callback fired when the button loses focus.
393
349
  */
394
350
  onBlur?: ((event: CallbackEvent<typeof tagName>) => void) | null;
395
- /**
396
- * A label that describes the purpose or content of the component for assistive technologies like screen readers. Use this to provide additional context when the visible content alone doesn't clearly convey the component's purpose.
397
- *
398
- * @default ''
399
- */
400
- accessibilityLabel?: string;
401
- /**
402
- * Prevents the button from being clicked when set to `true`. The button appears visually disabled and doesn't respond to user interaction.
403
- *
404
- * @default false
405
- */
406
- disabled?: boolean;
407
- /**
408
- * Displays a loading indicator and prevents interaction when set to `true`. Use this to show that an action triggered by the button is in progress.
409
- *
410
- * @default false
411
- */
412
- loading?: boolean;
413
- /**
414
- * Determines the visual style and emphasis of the button. Available options:
415
- * - `'primary'` - Highest emphasis for the main action on a screen.
416
- * - `'secondary'` - Medium emphasis for secondary actions.
417
- * - `'tertiary'` - Lowest emphasis for less important actions.
418
- * - `'plain'` - Text-only appearance for subtle actions that don't need visual weight.
419
- *
420
- * @default 'secondary'
421
- */
422
- variant?: ButtonProps['variant'];
423
- /**
424
- * Specifies where to open the linked document when the button acts as a link (when `href` is provided). Available options:
425
- * - `''` - Opens in the same frame (default behavior).
426
- * - `'_blank'` - Opens in a new window or tab.
427
- * - `'_self'` - Opens in the same frame (explicit version of default).
428
- * - `'_parent'` - Opens in the parent frame.
429
- * - `'_top'` - Opens in the full body of the window.
430
- *
431
- * @default ''
432
- */
433
- target?: ButtonProps['target'];
434
- /**
435
- * A URL that the button should navigate to when clicked. When provided, the button behaves as a link.
436
- *
437
- * @default ''
438
- */
439
- href?: ButtonProps['href'];
440
- /**
441
- * Prompts the user to save the linked URL as a file with the specified filename. Only works when `href` is provided.
442
- *
443
- * @default ''
444
- */
445
- download?: ButtonProps['download'];
446
- /**
447
- * Specifies the button's behavior in forms. Available options:
448
- * - `'button'` - A standard button with no default behavior.
449
- * - `'submit'` - Submits the form data to the server.
450
- * - `'reset'` - Resets all form controls to their initial values.
451
- *
452
- * @default 'button'
453
- */
454
- type?: ButtonProps['type'];
455
- /**
456
- * The language of the button's content, specified as a BCP 47 language tag (such as `'en'` or `'fr'`). This helps assistive technologies pronounce content correctly.
457
- *
458
- * @default ''
459
- */
460
- lang?: ButtonProps['lang'];
461
351
  }
462
352
 
463
353
  export {Button};