@shopify/ui-extensions 2026.10.0-rc.8 → 2026.10.0

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 (332) hide show
  1. package/build/cjs/surfaces/customer-account/preact/authenticated-account.js +1 -1
  2. package/build/cjs/surfaces/point-of-sale/events.js +39 -22
  3. package/build/cjs/surfaces/point-of-sale/pos-list-template.js +339 -0
  4. package/build/cjs/surfaces/point-of-sale.js +2 -0
  5. package/build/esm/surfaces/customer-account/preact/authenticated-account.mjs +1 -1
  6. package/build/esm/surfaces/point-of-sale/events.mjs +39 -22
  7. package/build/esm/surfaces/point-of-sale/pos-list-template.mjs +331 -0
  8. package/build/esm/surfaces/point-of-sale.mjs +1 -0
  9. package/build/esnext/surfaces/customer-account/preact/authenticated-account.esnext +1 -1
  10. package/build/esnext/surfaces/point-of-sale/events.esnext +39 -22
  11. package/build/esnext/surfaces/point-of-sale/pos-list-template.esnext +331 -0
  12. package/build/esnext/surfaces/point-of-sale.esnext +1 -0
  13. package/build/ts/shared.d.ts +6 -20
  14. package/build/ts/shared.d.ts.map +1 -1
  15. package/build/ts/surfaces/admin/api/picker/picker.d.ts +2 -2
  16. package/build/ts/surfaces/admin/api/picker/picker.d.ts.map +1 -1
  17. package/build/ts/surfaces/admin/components/AdminAction.d.ts +61 -107
  18. package/build/ts/surfaces/admin/components/AdminBlock.d.ts +22 -107
  19. package/build/ts/surfaces/admin/components/AdminPrintAction.d.ts +20 -101
  20. package/build/ts/surfaces/admin/components/AppNav.d.ts +38 -1
  21. package/build/ts/surfaces/admin/components/Avatar.d.ts +100 -139
  22. package/build/ts/surfaces/admin/components/Badge.d.ts +107 -156
  23. package/build/ts/surfaces/admin/components/Banner.d.ts +102 -127
  24. package/build/ts/surfaces/admin/components/Box.d.ts +145 -234
  25. package/build/ts/surfaces/admin/components/Button.d.ts +156 -266
  26. package/build/ts/surfaces/admin/components/ButtonGroup.d.ts +89 -117
  27. package/build/ts/surfaces/admin/components/Checkbox.d.ts +140 -175
  28. package/build/ts/surfaces/admin/components/Chip.d.ts +117 -15
  29. package/build/ts/surfaces/admin/components/Choice.d.ts +88 -113
  30. package/build/ts/surfaces/admin/components/ChoiceList.d.ts +120 -129
  31. package/build/ts/surfaces/admin/components/Clickable.d.ts +227 -209
  32. package/build/ts/surfaces/admin/components/ClickableChip.d.ts +117 -153
  33. package/build/ts/surfaces/admin/components/ColorField.d.ts +111 -215
  34. package/build/ts/surfaces/admin/components/ColorPicker.d.ts +82 -137
  35. package/build/ts/surfaces/admin/components/DateField.d.ts +140 -230
  36. package/build/ts/surfaces/admin/components/DatePicker.d.ts +178 -181
  37. package/build/ts/surfaces/admin/components/Divider.d.ts +50 -118
  38. package/build/ts/surfaces/admin/components/DropZone.d.ts +153 -12
  39. package/build/ts/surfaces/admin/components/EmailField.d.ts +100 -197
  40. package/build/ts/surfaces/admin/components/EmptyState.d.ts +144 -0
  41. package/build/ts/surfaces/admin/components/Form.d.ts +25 -118
  42. package/build/ts/surfaces/admin/components/FunctionSettings.d.ts +26 -132
  43. package/build/ts/surfaces/admin/components/Grid.d.ts +165 -299
  44. package/build/ts/surfaces/admin/components/GridItem.d.ts +145 -261
  45. package/build/ts/surfaces/admin/components/Heading.d.ts +117 -117
  46. package/build/ts/surfaces/admin/components/Icon.d.ts +91 -129
  47. package/build/ts/surfaces/admin/components/Image.d.ts +216 -251
  48. package/build/ts/surfaces/admin/components/Link.d.ts +125 -126
  49. package/build/ts/surfaces/admin/components/ListItem.d.ts +63 -102
  50. package/build/ts/surfaces/admin/components/Menu.d.ts +82 -150
  51. package/build/ts/surfaces/admin/components/Modal.d.ts +232 -26
  52. package/build/ts/surfaces/admin/components/MoneyField.d.ts +103 -196
  53. package/build/ts/surfaces/admin/components/Number.d.ts +193 -0
  54. package/build/ts/surfaces/admin/components/NumberField.d.ts +114 -208
  55. package/build/ts/surfaces/admin/components/Option.d.ts +67 -108
  56. package/build/ts/surfaces/admin/components/OptionGroup.d.ts +69 -105
  57. package/build/ts/surfaces/admin/components/OrderedList.d.ts +56 -102
  58. package/build/ts/surfaces/admin/components/Page.d.ts +93 -13
  59. package/build/ts/surfaces/admin/components/Paragraph.d.ts +126 -138
  60. package/build/ts/surfaces/admin/components/PasswordField.d.ts +109 -203
  61. package/build/ts/surfaces/admin/components/Popover.d.ts +26 -8
  62. package/build/ts/surfaces/admin/components/Progress.d.ts +155 -0
  63. package/build/ts/surfaces/admin/components/QueryContainer.d.ts +77 -116
  64. package/build/ts/surfaces/admin/components/SearchField.d.ts +103 -191
  65. package/build/ts/surfaces/admin/components/Section.d.ts +139 -127
  66. package/build/ts/surfaces/admin/components/Select.d.ts +144 -193
  67. package/build/ts/surfaces/admin/components/Spinner.d.ts +60 -113
  68. package/build/ts/surfaces/admin/components/Stack.d.ts +156 -282
  69. package/build/ts/surfaces/admin/components/StandardComponents.d.ts +1 -1
  70. package/build/ts/surfaces/admin/components/StandardComponents.d.ts.map +1 -1
  71. package/build/ts/surfaces/admin/components/Switch.d.ts +76 -166
  72. package/build/ts/surfaces/admin/components/Table.d.ts +100 -210
  73. package/build/ts/surfaces/admin/components/TableBody.d.ts +70 -106
  74. package/build/ts/surfaces/admin/components/TableCell.d.ts +70 -107
  75. package/build/ts/surfaces/admin/components/TableHeader.d.ts +79 -119
  76. package/build/ts/surfaces/admin/components/TableHeaderRow.d.ts +71 -107
  77. package/build/ts/surfaces/admin/components/TableRow.d.ts +81 -109
  78. package/build/ts/surfaces/admin/components/Text.d.ts +123 -164
  79. package/build/ts/surfaces/admin/components/TextArea.d.ts +100 -195
  80. package/build/ts/surfaces/admin/components/TextField.d.ts +120 -204
  81. package/build/ts/surfaces/admin/components/Thumbnail.d.ts +83 -133
  82. package/build/ts/surfaces/admin/components/Tooltip.d.ts +78 -146
  83. package/build/ts/surfaces/admin/components/URLField.d.ts +107 -209
  84. package/build/ts/surfaces/admin/components/UnorderedList.d.ts +58 -110
  85. package/build/ts/surfaces/admin/components/shared.d.ts +4233 -1203
  86. package/build/ts/surfaces/admin/targets/admin.abandoned-checkout-details.action.render.d.ts +3 -0
  87. package/build/ts/surfaces/admin/targets/admin.abandoned-checkout-details.block.render.d.ts +3 -0
  88. package/build/ts/surfaces/admin/targets/admin.abandoned-checkout-index.action.render.d.ts +3 -0
  89. package/build/ts/surfaces/admin/targets/admin.app.home.render.d.ts +3 -0
  90. package/build/ts/surfaces/admin/targets/admin.app.intent.render.d.ts +3 -0
  91. package/build/ts/surfaces/admin/targets/admin.catalog-details.action.render.d.ts +3 -0
  92. package/build/ts/surfaces/admin/targets/admin.catalog-details.block.render.d.ts +3 -0
  93. package/build/ts/surfaces/admin/targets/admin.collection-details.action.render.d.ts +3 -0
  94. package/build/ts/surfaces/admin/targets/admin.collection-details.block.render.d.ts +3 -0
  95. package/build/ts/surfaces/admin/targets/admin.collection-index.action.render.d.ts +3 -0
  96. package/build/ts/surfaces/admin/targets/admin.company-details.action.render.d.ts +3 -0
  97. package/build/ts/surfaces/admin/targets/admin.company-details.block.render.d.ts +3 -0
  98. package/build/ts/surfaces/admin/targets/admin.company-location-details.block.render.d.ts +3 -0
  99. package/build/ts/surfaces/admin/targets/admin.customer-details.action.render.d.ts +3 -0
  100. package/build/ts/surfaces/admin/targets/admin.customer-details.block.render.d.ts +3 -0
  101. package/build/ts/surfaces/admin/targets/admin.customer-index.action.render.d.ts +3 -0
  102. package/build/ts/surfaces/admin/targets/admin.customer-index.selection-action.render.d.ts +3 -0
  103. package/build/ts/surfaces/admin/targets/admin.customer-segment-details.action.render.d.ts +3 -0
  104. package/build/ts/surfaces/admin/targets/admin.discount-details.action.render.d.ts +3 -0
  105. package/build/ts/surfaces/admin/targets/admin.discount-details.function-settings.render.d.ts +3 -0
  106. package/build/ts/surfaces/admin/targets/admin.discount-index.action.render.d.ts +3 -0
  107. package/build/ts/surfaces/admin/targets/admin.discount-index.selection-action.render.d.ts +3 -0
  108. package/build/ts/surfaces/admin/targets/admin.draft-order-details.action.render.d.ts +3 -0
  109. package/build/ts/surfaces/admin/targets/admin.draft-order-details.block.render.d.ts +3 -0
  110. package/build/ts/surfaces/admin/targets/admin.draft-order-index.action.render.d.ts +3 -0
  111. package/build/ts/surfaces/admin/targets/admin.draft-order-index.selection-action.render.d.ts +3 -0
  112. package/build/ts/surfaces/admin/targets/admin.gift-card-details.action.render.d.ts +3 -0
  113. package/build/ts/surfaces/admin/targets/admin.gift-card-details.block.render.d.ts +3 -0
  114. package/build/ts/surfaces/admin/targets/admin.order-details.action.render.d.ts +3 -0
  115. package/build/ts/surfaces/admin/targets/admin.order-details.block.render.d.ts +3 -0
  116. package/build/ts/surfaces/admin/targets/admin.order-details.print-action.render.d.ts +3 -0
  117. package/build/ts/surfaces/admin/targets/admin.order-fulfilled-card.action.render.d.ts +3 -0
  118. package/build/ts/surfaces/admin/targets/admin.order-index.action.render.d.ts +3 -0
  119. package/build/ts/surfaces/admin/targets/admin.order-index.selection-action.render.d.ts +3 -0
  120. package/build/ts/surfaces/admin/targets/admin.order-index.selection-print-action.render.d.ts +3 -0
  121. package/build/ts/surfaces/admin/targets/admin.product-details.action.render.d.ts +3 -0
  122. package/build/ts/surfaces/admin/targets/admin.product-details.block.render.d.ts +3 -0
  123. package/build/ts/surfaces/admin/targets/admin.product-details.configuration.render.d.ts +3 -0
  124. package/build/ts/surfaces/admin/targets/admin.product-details.print-action.render.d.ts +3 -0
  125. package/build/ts/surfaces/admin/targets/admin.product-details.reorder.render.d.ts +3 -0
  126. package/build/ts/surfaces/admin/targets/admin.product-index.action.render.d.ts +3 -0
  127. package/build/ts/surfaces/admin/targets/admin.product-index.selection-action.render.d.ts +3 -0
  128. package/build/ts/surfaces/admin/targets/admin.product-index.selection-print-action.render.d.ts +3 -0
  129. package/build/ts/surfaces/admin/targets/admin.product-purchase-option.action.render.d.ts +3 -0
  130. package/build/ts/surfaces/admin/targets/admin.product-variant-details.action.render.d.ts +3 -0
  131. package/build/ts/surfaces/admin/targets/admin.product-variant-details.block.render.d.ts +3 -0
  132. package/build/ts/surfaces/admin/targets/admin.product-variant-details.configuration.render.d.ts +3 -0
  133. package/build/ts/surfaces/admin/targets/admin.product-variant-purchase-option.action.render.d.ts +3 -0
  134. package/build/ts/surfaces/admin/targets/admin.settings.internal-order-routing-rule.render.d.ts +3 -0
  135. package/build/ts/surfaces/admin/targets/admin.settings.order-routing-rule.render.d.ts +3 -0
  136. package/build/ts/surfaces/admin/targets/admin.settings.validation.render.d.ts +3 -0
  137. package/build/ts/surfaces/checkout/api/address-autocomplete/format-suggestion.d.ts +7 -0
  138. package/build/ts/surfaces/checkout/api/address-autocomplete/format-suggestion.d.ts.map +1 -1
  139. package/build/ts/surfaces/checkout/api/address-autocomplete/shared.d.ts +8 -1
  140. package/build/ts/surfaces/checkout/api/address-autocomplete/shared.d.ts.map +1 -1
  141. package/build/ts/surfaces/checkout/api/address-autocomplete/standard.d.ts +2 -2
  142. package/build/ts/surfaces/checkout/api/address-autocomplete/standard.d.ts.map +1 -1
  143. package/build/ts/surfaces/checkout/api/address-autocomplete/suggest.d.ts +7 -0
  144. package/build/ts/surfaces/checkout/api/address-autocomplete/suggest.d.ts.map +1 -1
  145. package/build/ts/surfaces/checkout/api/checkout/checkout.d.ts +15 -4
  146. package/build/ts/surfaces/checkout/api/checkout/checkout.d.ts.map +1 -1
  147. package/build/ts/surfaces/checkout/api/shared.d.ts +102 -1
  148. package/build/ts/surfaces/checkout/api/shared.d.ts.map +1 -1
  149. package/build/ts/surfaces/checkout/api/standard/standard.d.ts +8 -2
  150. package/build/ts/surfaces/checkout/api/standard/standard.d.ts.map +1 -1
  151. package/build/ts/surfaces/checkout/components/Box.d.ts +56 -1
  152. package/build/ts/surfaces/checkout/components/MoneyField.d.ts +3 -1
  153. package/build/ts/surfaces/checkout/components/NumberField.d.ts +3 -1
  154. package/build/ts/surfaces/checkout/components/components-shared.d.ts +1 -1
  155. package/build/ts/surfaces/checkout/preact/country.d.ts +1 -1
  156. package/build/ts/surfaces/checkout/preact/country.d.ts.map +1 -1
  157. package/build/ts/surfaces/checkout.d.ts +2 -2
  158. package/build/ts/surfaces/checkout.d.ts.map +1 -1
  159. package/build/ts/surfaces/customer-account/api/shared.d.ts +26 -7
  160. package/build/ts/surfaces/customer-account/api/shared.d.ts.map +1 -1
  161. package/build/ts/surfaces/customer-account/api.d.ts +1 -1
  162. package/build/ts/surfaces/customer-account/api.d.ts.map +1 -1
  163. package/build/ts/surfaces/customer-account/components/Box.d.ts +56 -1
  164. package/build/ts/surfaces/customer-account/components/MoneyField.d.ts +3 -1
  165. package/build/ts/surfaces/customer-account/components/NumberField.d.ts +3 -1
  166. package/build/ts/surfaces/customer-account/components/components-shared.d.ts +1 -1
  167. package/build/ts/surfaces/customer-account/preact/authenticated-account.d.ts +3 -3
  168. package/build/ts/surfaces/customer-account/preact/authenticated-account.d.ts.map +1 -1
  169. package/build/ts/surfaces/point-of-sale/api/cart-api/cart-api.d.ts +13 -0
  170. package/build/ts/surfaces/point-of-sale/api/cart-api/cart-api.d.ts.map +1 -1
  171. package/build/ts/surfaces/point-of-sale/api/device-api/device-api.d.ts +4 -0
  172. package/build/ts/surfaces/point-of-sale/api/device-api/device-api.d.ts.map +1 -1
  173. package/build/ts/surfaces/point-of-sale/api/docs.d.ts +7 -0
  174. package/build/ts/surfaces/point-of-sale/api/docs.d.ts.map +1 -1
  175. package/build/ts/surfaces/point-of-sale/api/extension-api/extension-api.d.ts +25 -5
  176. package/build/ts/surfaces/point-of-sale/api/extension-api/extension-api.d.ts.map +1 -1
  177. package/build/ts/surfaces/point-of-sale/api/navigation-api/navigation-api.d.ts +19 -7
  178. package/build/ts/surfaces/point-of-sale/api/navigation-api/navigation-api.d.ts.map +1 -1
  179. package/build/ts/surfaces/point-of-sale/api/resolution-api/resolution-api.d.ts +28 -3
  180. package/build/ts/surfaces/point-of-sale/api/resolution-api/resolution-api.d.ts.map +1 -1
  181. package/build/ts/surfaces/point-of-sale/api/session-api/session-api.d.ts +1 -1
  182. package/build/ts/surfaces/point-of-sale/api.d.ts +2 -2
  183. package/build/ts/surfaces/point-of-sale/api.d.ts.map +1 -1
  184. package/build/ts/surfaces/point-of-sale/components/POSList.d.ts +179 -0
  185. package/build/ts/surfaces/point-of-sale/components/targets/BlockExtensionComponents.d.ts +1 -1
  186. package/build/ts/surfaces/point-of-sale/components/targets/BlockExtensionComponents.d.ts.map +1 -1
  187. package/build/ts/surfaces/point-of-sale/components/targets/ResolutionComponents.d.ts +1 -1
  188. package/build/ts/surfaces/point-of-sale/components/targets/ResolutionComponents.d.ts.map +1 -1
  189. package/build/ts/surfaces/point-of-sale/components/targets/StandardComponents.d.ts +1 -1
  190. package/build/ts/surfaces/point-of-sale/components/targets/StandardComponents.d.ts.map +1 -1
  191. package/build/ts/surfaces/point-of-sale/event/data/BaseData.d.ts +12 -1
  192. package/build/ts/surfaces/point-of-sale/event/data/BaseData.d.ts.map +1 -1
  193. package/build/ts/surfaces/point-of-sale/event/data.d.ts +1 -1
  194. package/build/ts/surfaces/point-of-sale/event/data.d.ts.map +1 -1
  195. package/build/ts/surfaces/point-of-sale/events/scan-event.d.ts +34 -0
  196. package/build/ts/surfaces/point-of-sale/events/scan-event.d.ts.map +1 -0
  197. package/build/ts/surfaces/point-of-sale/events.d.ts +58 -28
  198. package/build/ts/surfaces/point-of-sale/events.d.ts.map +1 -1
  199. package/build/ts/surfaces/point-of-sale/extension-targets.d.ts +4 -4
  200. package/build/ts/surfaces/point-of-sale/extension-targets.d.ts.map +1 -1
  201. package/build/ts/surfaces/point-of-sale/globals.d.ts +0 -2
  202. package/build/ts/surfaces/point-of-sale/globals.d.ts.map +1 -1
  203. package/build/ts/surfaces/point-of-sale/pos-list-template.d.ts +36 -0
  204. package/build/ts/surfaces/point-of-sale/pos-list-template.d.ts.map +1 -0
  205. package/build/ts/surfaces/point-of-sale/targets/pos.cart.line-item-details.action.render.d.ts +1 -0
  206. package/build/ts/surfaces/point-of-sale/targets/pos.cart.validations.resolution.render.d.ts +1 -0
  207. package/build/ts/surfaces/point-of-sale/targets/pos.customer-details.action.render.d.ts +1 -0
  208. package/build/ts/surfaces/point-of-sale/targets/pos.draft-order-details.action.render.d.ts +1 -0
  209. package/build/ts/surfaces/point-of-sale/targets/pos.exchange.post.action.render.d.ts +1 -0
  210. package/build/ts/surfaces/point-of-sale/targets/pos.home.modal.render.d.ts +1 -0
  211. package/build/ts/surfaces/point-of-sale/targets/pos.order-details.action.render.d.ts +1 -0
  212. package/build/ts/surfaces/point-of-sale/targets/pos.payment.validations.resolution.render.d.ts +1 -0
  213. package/build/ts/surfaces/point-of-sale/targets/pos.product-details.action.render.d.ts +1 -0
  214. package/build/ts/surfaces/point-of-sale/targets/pos.purchase.post.action.render.d.ts +1 -0
  215. package/build/ts/surfaces/point-of-sale/targets/pos.register-details.action.render.d.ts +1 -0
  216. package/build/ts/surfaces/point-of-sale/targets/pos.return.post.action.render.d.ts +1 -0
  217. package/build/ts/surfaces/point-of-sale/types/session.d.ts +0 -6
  218. package/build/ts/surfaces/point-of-sale/types/session.d.ts.map +1 -1
  219. package/build/ts/surfaces/point-of-sale.d.ts +1 -0
  220. package/build/ts/surfaces/point-of-sale.d.ts.map +1 -1
  221. package/build/tsconfig.tsbuildinfo +1 -1
  222. package/package.json +2 -1
  223. package/src/shared.ts +22 -21
  224. package/src/surfaces/admin/api/picker/picker.ts +5 -2
  225. package/src/surfaces/admin/components/AdminAction.d.ts +61 -107
  226. package/src/surfaces/admin/components/AdminBlock.d.ts +22 -107
  227. package/src/surfaces/admin/components/AdminPrintAction.d.ts +20 -101
  228. package/src/surfaces/admin/components/AppNav.d.ts +38 -1
  229. package/src/surfaces/admin/components/Avatar.d.ts +100 -139
  230. package/src/surfaces/admin/components/Badge.d.ts +107 -156
  231. package/src/surfaces/admin/components/Banner.d.ts +102 -127
  232. package/src/surfaces/admin/components/Box.d.ts +145 -234
  233. package/src/surfaces/admin/components/Button.d.ts +156 -266
  234. package/src/surfaces/admin/components/ButtonGroup.d.ts +89 -117
  235. package/src/surfaces/admin/components/Checkbox.d.ts +140 -175
  236. package/src/surfaces/admin/components/Chip.d.ts +117 -15
  237. package/src/surfaces/admin/components/Choice.d.ts +88 -113
  238. package/src/surfaces/admin/components/ChoiceList.d.ts +120 -129
  239. package/src/surfaces/admin/components/Clickable.d.ts +227 -209
  240. package/src/surfaces/admin/components/ClickableChip.d.ts +117 -153
  241. package/src/surfaces/admin/components/ColorField.d.ts +111 -215
  242. package/src/surfaces/admin/components/ColorPicker.d.ts +82 -137
  243. package/src/surfaces/admin/components/DateField.d.ts +140 -230
  244. package/src/surfaces/admin/components/DatePicker.d.ts +178 -181
  245. package/src/surfaces/admin/components/Divider.d.ts +50 -118
  246. package/src/surfaces/admin/components/DropZone.d.ts +153 -12
  247. package/src/surfaces/admin/components/EmailField.d.ts +100 -197
  248. package/src/surfaces/admin/components/EmptyState.d.ts +144 -0
  249. package/src/surfaces/admin/components/Form.d.ts +25 -118
  250. package/src/surfaces/admin/components/FunctionSettings.d.ts +26 -132
  251. package/src/surfaces/admin/components/Grid.d.ts +165 -299
  252. package/src/surfaces/admin/components/GridItem.d.ts +145 -261
  253. package/src/surfaces/admin/components/Heading.d.ts +117 -117
  254. package/src/surfaces/admin/components/Icon.d.ts +91 -129
  255. package/src/surfaces/admin/components/Image.d.ts +216 -251
  256. package/src/surfaces/admin/components/Link.d.ts +125 -126
  257. package/src/surfaces/admin/components/ListItem.d.ts +63 -102
  258. package/src/surfaces/admin/components/Menu.d.ts +82 -150
  259. package/src/surfaces/admin/components/Modal.d.ts +232 -26
  260. package/src/surfaces/admin/components/MoneyField.d.ts +103 -196
  261. package/src/surfaces/admin/components/Number.d.ts +193 -0
  262. package/src/surfaces/admin/components/NumberField.d.ts +114 -208
  263. package/src/surfaces/admin/components/Option.d.ts +67 -108
  264. package/src/surfaces/admin/components/OptionGroup.d.ts +69 -105
  265. package/src/surfaces/admin/components/OrderedList.d.ts +56 -102
  266. package/src/surfaces/admin/components/Page.d.ts +93 -13
  267. package/src/surfaces/admin/components/Paragraph.d.ts +126 -138
  268. package/src/surfaces/admin/components/PasswordField.d.ts +109 -203
  269. package/src/surfaces/admin/components/Popover.d.ts +26 -8
  270. package/src/surfaces/admin/components/Progress.d.ts +155 -0
  271. package/src/surfaces/admin/components/QueryContainer.d.ts +77 -116
  272. package/src/surfaces/admin/components/SearchField.d.ts +103 -191
  273. package/src/surfaces/admin/components/Section.d.ts +139 -127
  274. package/src/surfaces/admin/components/Select.d.ts +144 -193
  275. package/src/surfaces/admin/components/Spinner.d.ts +60 -113
  276. package/src/surfaces/admin/components/Stack.d.ts +156 -282
  277. package/src/surfaces/admin/components/StandardComponents.ts +3 -0
  278. package/src/surfaces/admin/components/Switch.d.ts +76 -166
  279. package/src/surfaces/admin/components/Table.d.ts +100 -210
  280. package/src/surfaces/admin/components/TableBody.d.ts +70 -106
  281. package/src/surfaces/admin/components/TableCell.d.ts +70 -107
  282. package/src/surfaces/admin/components/TableHeader.d.ts +79 -119
  283. package/src/surfaces/admin/components/TableHeaderRow.d.ts +71 -107
  284. package/src/surfaces/admin/components/TableRow.d.ts +81 -109
  285. package/src/surfaces/admin/components/Text.d.ts +123 -164
  286. package/src/surfaces/admin/components/TextArea.d.ts +100 -195
  287. package/src/surfaces/admin/components/TextField.d.ts +120 -204
  288. package/src/surfaces/admin/components/Thumbnail.d.ts +83 -133
  289. package/src/surfaces/admin/components/Tooltip.d.ts +78 -146
  290. package/src/surfaces/admin/components/URLField.d.ts +107 -209
  291. package/src/surfaces/admin/components/UnorderedList.d.ts +58 -110
  292. package/src/surfaces/admin/components/shared.d.ts +4233 -1203
  293. package/src/surfaces/admin/components.d.ts +8216 -2635
  294. package/src/surfaces/checkout/api/address-autocomplete/format-suggestion.ts +9 -0
  295. package/src/surfaces/checkout/api/address-autocomplete/shared.ts +9 -0
  296. package/src/surfaces/checkout/api/address-autocomplete/standard.ts +1 -2
  297. package/src/surfaces/checkout/api/address-autocomplete/suggest.ts +8 -0
  298. package/src/surfaces/checkout/api/checkout/checkout.ts +19 -9
  299. package/src/surfaces/checkout/api/shared.ts +110 -1
  300. package/src/surfaces/checkout/api/standard/standard.ts +11 -1
  301. package/src/surfaces/checkout/components/Box.d.ts +56 -1
  302. package/src/surfaces/checkout/components/MoneyField.d.ts +3 -1
  303. package/src/surfaces/checkout/components/NumberField.d.ts +3 -1
  304. package/src/surfaces/checkout/components/components-shared.d.ts +1 -1
  305. package/src/surfaces/checkout/preact/country.ts +1 -1
  306. package/src/surfaces/checkout.ts +3 -0
  307. package/src/surfaces/customer-account/api/shared.ts +25 -7
  308. package/src/surfaces/customer-account/api.ts +1 -0
  309. package/src/surfaces/customer-account/preact/authenticated-account.ts +3 -3
  310. package/src/surfaces/point-of-sale/api/cart-api/cart-api.ts +14 -0
  311. package/src/surfaces/point-of-sale/api/device-api/device-api.ts +4 -0
  312. package/src/surfaces/point-of-sale/api/docs.ts +8 -0
  313. package/src/surfaces/point-of-sale/api/extension-api/extension-api.ts +25 -5
  314. package/src/surfaces/point-of-sale/api/navigation-api/navigation-api.ts +22 -7
  315. package/src/surfaces/point-of-sale/api/resolution-api/resolution-api.ts +30 -3
  316. package/src/surfaces/point-of-sale/api/session-api/session-api.ts +1 -1
  317. package/src/surfaces/point-of-sale/api.ts +2 -0
  318. package/src/surfaces/point-of-sale/components/POSList.d.ts +179 -0
  319. package/src/surfaces/point-of-sale/components/targets/BlockExtensionComponents.ts +0 -4
  320. package/src/surfaces/point-of-sale/components/targets/ResolutionComponents.ts +1 -1
  321. package/src/surfaces/point-of-sale/components/targets/StandardComponents.ts +1 -3
  322. package/src/surfaces/point-of-sale/components.d.ts +194 -0
  323. package/src/surfaces/point-of-sale/event/data/BaseData.ts +13 -1
  324. package/src/surfaces/point-of-sale/event/data.ts +1 -1
  325. package/src/surfaces/point-of-sale/events/scan-event.ts +34 -0
  326. package/src/surfaces/point-of-sale/events.ts +58 -27
  327. package/src/surfaces/point-of-sale/extension-targets.ts +4 -4
  328. package/src/surfaces/point-of-sale/globals.ts +0 -2
  329. package/src/surfaces/point-of-sale/pos-list-template.ts +351 -0
  330. package/src/surfaces/point-of-sale/tests/pos-list-template.test.ts +306 -0
  331. package/src/surfaces/point-of-sale/types/session.ts +0 -7
  332. package/src/surfaces/point-of-sale.ts +1 -0
@@ -1,4 +1,4 @@
1
- /** VERSION: 1.25.0 **/
1
+ /** VERSION: 2.26.1 **/
2
2
  /* eslint-disable import/extensions */
3
3
 
4
4
  /* eslint-disable @typescript-eslint/no-namespace */
@@ -6,11 +6,16 @@
6
6
 
7
7
  // eslint-disable-next-line @typescript-eslint/triple-slash-reference, spaced-comment
8
8
  /// <reference lib="DOM" />
9
- import type {DatePickerProps$1, ComponentChildren} from './shared.d.ts';
9
+ import type {
10
+ DatePickerProps$1,
11
+ PreactCustomElement,
12
+ RenderImpl,
13
+ } from './shared.d.ts';
14
+ import * as preact$1 from 'preact';
15
+ import {ReactNode, RefAttributes} from 'react';
10
16
 
11
17
  /**
12
- * The properties for the date picker component. These properties configure a standalone calendar interface for selecting single dates or date ranges, with support for date constraints, day-of-week restrictions, and month/year navigation.
13
- * @publicDocs
18
+ * Configure the following properties on the date picker component.
14
19
  */
15
20
  export interface DatePickerProps
16
21
  extends Required<
@@ -36,231 +41,227 @@ export interface DatePickerProps
36
41
  * @default "single"
37
42
  */
38
43
  type: Extract<DatePickerProps$1['type'], 'single' | 'range'>;
44
+ /**
45
+ * The currently selected date(s). An empty string means no date is selected.
46
+ *
47
+ * - Single date in `YYYY-MM-DD` format when `type` is set to `"single"`
48
+ * - Date range in `YYYY-MM-DD--YYYY-MM-DD` format (inclusive) when `type` is set to `"range"`
49
+ *
50
+ * @default ""
51
+ */
52
+ value: Required<DatePickerProps$1>['value'];
53
+ /**
54
+ * The initially selected date(s) when the component first renders. An empty string means no date is initially selected.
55
+ *
56
+ * - Single date in `YYYY-MM-DD` format when `type` is set to `"single"`
57
+ * - Date range in `YYYY-MM-DD--YYYY-MM-DD` format (inclusive) when `type` is set to `"range"`
58
+ *
59
+ * @default ""
60
+ */
61
+ defaultValue: Required<DatePickerProps$1>['defaultValue'];
62
+ /**
63
+ * Specifies which dates can be selected as a comma-separated list. An empty string (default) allows all dates.
64
+ *
65
+ * **Formats:**
66
+ * - `YYYY-MM-DD`: Single date
67
+ * - `YYYY-MM`: Whole month
68
+ * - `YYYY`: Whole year
69
+ * - `start--end`: Date range (inclusive, unbounded if start/end omitted)
70
+ *
71
+ * **Examples:**
72
+ * - `2024-02--2025`: February 2024 through end of 2025
73
+ * - `2024-05-09, 2024-05-11`: Only May 9th and 11th, 2024
74
+ *
75
+ * @default ""
76
+ */
77
+ allow: Required<DatePickerProps$1>['allow'];
78
+ /**
79
+ * Specifies which days of the week can be selected as a comma-separated list. Further restricts dates from `allow` and `disallow`. An empty string (default) has no effect.
80
+ *
81
+ * **Valid days**: `sunday`, `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`
82
+ *
83
+ * **Example:** `saturday, sunday` (only weekends)
84
+ *
85
+ * @default ""
86
+ */
87
+ allowDays: Required<DatePickerProps$1>['allowDays'];
88
+ /**
89
+ * Specifies which dates can't be selected as a comma-separated list. These dates are excluded from those specified in `allow`. An empty string (default) has no effect.
90
+ *
91
+ * **Formats:**
92
+ * - `YYYY-MM-DD`: Single date
93
+ * - `YYYY-MM`: Whole month
94
+ * - `YYYY`: Whole year
95
+ * - `start--end`: Date range (inclusive, unbounded if start/end omitted)
96
+ *
97
+ * **Examples:**
98
+ * - `--2024-02`: All dates before February 2024
99
+ * - `2024-05-09, 2024-05-11`: May 9th and 11th, 2024
100
+ *
101
+ * @default ""
102
+ */
103
+ disallow: Required<DatePickerProps$1>['disallow'];
104
+ /**
105
+ * Specifies which days of the week can't be selected as a comma-separated list. Excludes days from `allowDays` and intersects with `allow` and `disallow`. An empty string (default) has no effect.
106
+ *
107
+ * **Valid days**: `sunday`, `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`
108
+ *
109
+ * **Example:** `saturday, sunday` (no weekends)
110
+ *
111
+ * @default ""
112
+ */
113
+ disallowDays: Required<DatePickerProps$1>['disallowDays'];
114
+ /**
115
+ * The currently displayed month in `YYYY-MM` format. When changed, the `viewchange` callback is triggered. Defaults to `defaultView`.
116
+ */
117
+ view: Required<DatePickerProps$1>['view'];
118
+ /**
119
+ * The default month to display in `YYYY-MM` format. Used until the `view` callback is set by user interaction or programmatically. Defaults to the current month in the user's locale.
120
+ */
121
+ defaultView: Required<DatePickerProps$1>['defaultView'];
122
+ /**
123
+ * Controls how many months are displayed.
124
+ *
125
+ * - `'auto'`: Context-driven. Today this renders a single month, matching `'1'`.
126
+ * - `'1'`: Renders one month at a time.
127
+ * - `'2'`: Renders two consecutive months side-by-side.
128
+ *
129
+ * @default 'auto'
130
+ */
131
+ visibleMonths: 'auto' | '1' | '2';
132
+ }
133
+
134
+ export type ReactIntrinsicElementChildren<PreactProps extends object> =
135
+ 'children' extends keyof PreactProps
136
+ ? {
137
+ children?: ReactNode;
138
+ }
139
+ : Record<never, never>;
140
+ export type ReactIntrinsicElementProps<
141
+ PreactProps extends object,
142
+ ElementType,
143
+ > = Omit<PreactProps, 'children' | 'key' | 'ref' | 'slot'> &
144
+ ReactIntrinsicElementChildren<PreactProps> &
145
+ RefAttributes<ElementType> & {
146
+ slot?: Lowercase<string>;
147
+ };
148
+ export type ReactIntrinsicElements = {
149
+ [Tag in Exclude<
150
+ Extract<keyof preact$1.createElement.JSX.IntrinsicElements, `s-${string}`>,
151
+ `s-test-${string}`
152
+ >]: ReactIntrinsicElementProps<
153
+ preact$1.createElement.JSX.IntrinsicElements[Tag],
154
+ Tag extends keyof HTMLElementTagNameMap
155
+ ? HTMLElementTagNameMap[Tag]
156
+ : HTMLElement
157
+ >;
158
+ };
159
+ declare module 'react' {
160
+ namespace JSX {
161
+ interface IntrinsicElements extends ReactIntrinsicElements {}
162
+ }
39
163
  }
40
164
 
41
165
  /**
42
- * An event object with a strongly-typed currentTarget property that references the specific HTML element type.
166
+ * An event object with a strongly-typed `currentTarget` property that references the specific HTML element that triggered the event.
167
+ *
168
+ * This type extends the standard DOM `Event` interface and ensures type safety when accessing the element that fired the event.
43
169
  * @publicDocs
44
170
  */
45
171
  export type CallbackEvent<T extends keyof HTMLElementTagNameMap> = Event & {
46
- /**
47
- * The DOM element that the event listener is attached to.
48
- */
49
172
  currentTarget: HTMLElementTagNameMap[T];
50
173
  };
51
174
  /**
52
- * An event listener function or null that receives a typed callback event.
175
+ * A function that handles events from UI components.
176
+ *
177
+ * 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.
178
+ *
179
+ * @example
180
+ * const handleClick: CallbackEventListener<'button'> = (event) => {
181
+ * console.log('Button clicked:', event.currentTarget);
182
+ * };
53
183
  * @publicDocs
54
184
  */
55
185
  export type CallbackEventListener<T extends keyof HTMLElementTagNameMap> =
56
186
  | (EventListener & {
57
- /**
58
- * The callback function that's invoked when the event fires.
59
- */
60
187
  (event: CallbackEvent<T>): void;
61
188
  })
62
189
  | null;
63
- /** Used when an element does not have children. * @publicDocs
190
+ /**
191
+ * 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.
192
+ * @publicDocs
64
193
  */
65
194
  export interface PreactBaseElementProps<TClass extends HTMLElement> {
66
195
  /**
67
- * 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.
196
+ * A unique identifier for this element, used by the virtual DOM to efficiently track and update elements in lists.
197
+ * Essential for maintaining component state and optimizing re-renders when lists change.
68
198
  */
69
199
  key?: preact.Key;
70
200
  /**
71
- * 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.
201
+ * A reference to access the underlying DOM element directly.
202
+ * Typically created using `useRef()` to interact with the element imperatively or measure its properties.
72
203
  */
73
204
  ref?: preact.Ref<TClass>;
74
205
  /**
75
- * Assigns this element to a named slot in a parent component that uses shadow DOM or slot-based composition patterns.
206
+ * The named slot to which this element is assigned in the parent component's shadow DOM.
207
+ *
208
+ * Used for advanced component composition with web components.
76
209
  */
77
210
  slot?: Lowercase<string>;
78
211
  }
79
212
 
80
- /**
81
- * A string containing CSS styles to be applied to the component.
82
- * @publicDocs
83
- */
84
- export type Styles = string;
85
- /**
86
- * The implementation details for rendering a custom element with a shadow DOM.
87
- * @publicDocs
88
- */
89
- export type RenderImpl = Omit<ShadowRootInit, 'mode'> & {
90
- /**
91
- * A function that renders the component's shadow DOM content.
92
- */
93
- ShadowRoot: (element: any) => ComponentChildren;
94
- /**
95
- * The CSS styles to apply to the component.
96
- */
97
- styles?: Styles;
98
- };
99
- /**
100
- * An object containing information about keyboard and mouse button states during an activation event.
101
- * @publicDocs
102
- */
103
- export interface ActivationEventEsque {
104
- /**
105
- * Whether the Shift key was pressed during the event.
106
- */
107
- shiftKey: boolean;
108
- /**
109
- * Whether the Meta (Command on Mac, Windows key on PC) key was pressed during the event.
110
- */
111
- metaKey: boolean;
112
- /**
113
- * Whether the Control key was pressed during the event.
114
- */
115
- ctrlKey: boolean;
116
- /**
117
- * The mouse button that was pressed during the event.
118
- */
119
- button: number;
120
- }
121
- /**
122
- * The options for programmatically triggering a click event on an element.
123
- * @publicDocs
124
- */
125
- export interface ClickOptions {
126
- /**
127
- * 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.
128
- */
129
- sourceEvent?: ActivationEventEsque;
130
- }
131
- /**
132
- * Base class for creating custom elements with Preact.
133
- * While this class could be used in both Node and the browser, the constructor will only be used in the browser.
134
- * So we give it a type of HTMLElement to avoid typing issues later where it's used, which will only happen in the browser.
135
- */
136
- declare const BaseClass$1: typeof globalThis.HTMLElement;
137
- declare abstract class PreactCustomElement extends BaseClass$1 {
138
- /** @private */
139
- static get observedAttributes(): string[];
140
- constructor({
141
- styles,
142
- ShadowRoot: renderFunction,
143
- delegatesFocus,
144
- ...options
145
- }: RenderImpl);
146
-
147
- /** @private */
148
- setAttribute(name: string, value: string): void;
149
- /** @private */
150
- attributeChangedCallback(name: string): void;
213
+ declare class PolarisCustomElement extends PreactCustomElement {
214
+ constructor(renderImpl: Omit<RenderImpl, 'globalShadowCSS'>);
151
215
  /** @private */
152
216
  connectedCallback(): void;
153
217
  /** @private */
154
- disconnectedCallback(): void;
155
- /** @private */
156
218
  adoptedCallback(): void;
157
- /**
158
- * Queue a run of the render function.
159
- * You shouldn't need to call this manually - it should be handled by changes to @property values.
160
- * @private
161
- */
162
- queueRender(): void;
163
- /**
164
- * Like the standard `element.click()`, but you can influence the behavior with a `sourceEvent`.
165
- *
166
- * For example, if the `sourceEvent` was a middle click, or has particular keys held down,
167
- * components will attempt to produce the desired behavior on links, such as opening the page in the background tab.
168
- * @private
169
- * @param options
170
- */
171
- click({sourceEvent}?: ClickOptions): void;
172
219
  }
173
220
 
174
221
  declare const internals: unique symbol;
175
222
  declare const dirtyStateSymbol: unique symbol;
176
- /**
177
- * The base class for form-associated components that can participate in form submission.
178
- */
179
- declare class BaseClass extends PreactCustomElement {
180
- /**
181
- * Whether this element can participate in form submission.
182
- */
223
+ declare abstract class DatePickerBase<
224
+ TagName extends 's-date-picker' | 's-internal-date-picker',
225
+ >
226
+ extends PolarisCustomElement
227
+ implements DatePickerProps
228
+ {
183
229
  static formAssociated: boolean;
184
230
  constructor(renderImpl: RenderImpl);
185
231
  /** @private */
186
232
  [internals]: ElementInternals;
187
- }
188
- /**
189
- * The date picker custom element class that renders a standalone calendar interface in the Shopify admin. This component allows merchants to select single dates or date ranges using an interactive calendar with month/year navigation, date constraints, and day-of-week restrictions.
190
- */
191
- declare class DatePicker extends BaseClass implements DatePickerProps {
192
- /**
193
- * The initial month and year shown when the calendar first renders, formatted as an ISO 8601 date string.
194
- */
195
233
  accessor defaultView: string;
196
- /**
197
- * The currently visible month and year in the calendar, formatted as an ISO 8601 date string.
198
- */
199
234
  set view(view: string);
200
- /**
201
- * The currently visible month and year in the calendar, formatted as an ISO 8601 date string.
202
- */
203
235
  get view(): string;
204
- /**
205
- * The dates that are allowed to be selected, specified as ISO 8601 date strings or date ranges.
206
- */
207
236
  accessor allow: DatePickerProps['allow'];
208
- /**
209
- * The dates that aren't allowed to be selected, specified as ISO 8601 date strings or date ranges.
210
- */
211
237
  accessor disallow: DatePickerProps['disallow'];
212
- /**
213
- * The days of the week that are allowed to be selected. Available values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.
214
- */
215
238
  accessor allowDays: DatePickerProps['allowDays'];
216
- /**
217
- * The days of the week that aren't allowed to be selected. Available values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.
218
- */
219
239
  accessor disallowDays: DatePickerProps['disallowDays'];
220
- /**
221
- * The type of date selection allowed. Available values: `single`, `range`.
222
- */
223
240
  accessor type: DatePickerProps['type'];
224
- /**
225
- * The initial selected date or date range when the picker first renders, formatted as an ISO 8601 date string.
226
- */
227
241
  accessor defaultValue: DatePickerProps['defaultValue'];
228
- /**
229
- * The name of the picker, used when submitting form data.
230
- */
231
242
  accessor name: DatePickerProps['name'];
232
- /**
233
- * The currently selected date or date range, formatted as an ISO 8601 date string.
234
- */
243
+ accessor visibleMonths: DatePickerProps['visibleMonths'];
235
244
  set value(value: string);
236
- /**
237
- * The currently selected date or date range, formatted as an ISO 8601 date string.
238
- */
239
245
  get value(): string;
240
246
  /** @private */
241
247
  [dirtyStateSymbol]: boolean;
242
248
  /** @private */
243
249
  formResetCallback(): void;
244
- /**
245
- * The callback that's triggered when the visible month or year in the calendar changes.
246
- */
247
- accessor onviewchange: CallbackEventListener<typeof tagName> | null;
248
- /**
249
- * The callback that's triggered when the picker receives focus.
250
- */
251
- accessor onfocus: CallbackEventListener<typeof tagName> | null;
252
- /**
253
- * The callback that's triggered when the picker loses focus.
254
- */
255
- accessor onblur: CallbackEventListener<typeof tagName> | null;
256
- /**
257
- * The callback that's triggered when the selected date changes as the user interacts with the picker.
258
- */
259
- accessor oninput: CallbackEventListener<typeof tagName> | null;
260
- /**
261
- * The callback that's triggered when the selected date changes and the picker loses focus.
262
- */
263
- accessor onchange: CallbackEventListener<typeof tagName> | null;
250
+ accessor onviewchange: CallbackEventListener<TagName> | null;
251
+ accessor onfocus: CallbackEventListener<TagName> | null;
252
+ accessor onblur: CallbackEventListener<TagName> | null;
253
+ accessor oninput: CallbackEventListener<TagName> | null;
254
+ accessor onchange: CallbackEventListener<TagName> | null;
255
+ }
256
+
257
+ /**
258
+ * Configure the following properties on the date picker component.
259
+ * @publicDocs
260
+ */
261
+ declare class DatePicker
262
+ extends DatePickerBase<typeof tagName>
263
+ implements DatePickerProps
264
+ {
264
265
  constructor();
265
266
  }
266
267
  declare global {
@@ -277,31 +278,27 @@ declare module 'preact' {
277
278
  }
278
279
 
279
280
  declare const tagName = 's-date-picker';
280
- /**
281
- * The JSX props for the date picker component. These properties extend `DatePickerProps` with JSX-specific event callbacks for React-style event handling when used in Preact, including callbacks for date selection, focus events, and view changes.
282
- * @publicDocs
283
- */
284
281
  export interface DatePickerJSXProps
285
282
  extends Partial<DatePickerProps>,
286
283
  Pick<DatePickerProps$1, 'id'> {
287
284
  /**
288
- * A callback that's triggered when the visible month or year in the calendar changes.
285
+ * A callback fired when the calendar view changes, such as when navigating between months.
289
286
  */
290
287
  onViewChange?: ((event: CallbackEvent<typeof tagName>) => void) | null;
291
288
  /**
292
- * A callback that's triggered when the picker receives focus.
289
+ * A callback fired when the date picker receives focus.
293
290
  */
294
291
  onFocus?: ((event: CallbackEvent<typeof tagName>) => void) | null;
295
292
  /**
296
- * A callback that's triggered when the picker loses focus.
293
+ * A callback fired when the date picker loses focus.
297
294
  */
298
295
  onBlur?: ((event: CallbackEvent<typeof tagName>) => void) | null;
299
296
  /**
300
- * A callback that's triggered when the selected date changes as the user interacts with the picker.
297
+ * A callback fired when the user makes any changes to the selected date.
301
298
  */
302
299
  onInput?: ((event: CallbackEvent<typeof tagName>) => void) | null;
303
300
  /**
304
- * A callback that's triggered when the selected date changes and the picker loses focus.
301
+ * A callback fired when the user has finished selecting a date and the value changes.
305
302
  */
306
303
  onChange?: ((event: CallbackEvent<typeof tagName>) => void) | null;
307
304
  }
@@ -1,4 +1,4 @@
1
- /** VERSION: 1.25.0 **/
1
+ /** VERSION: 2.26.1 **/
2
2
  /* eslint-disable import/extensions */
3
3
 
4
4
  /* eslint-disable @typescript-eslint/no-namespace */
@@ -6,11 +6,16 @@
6
6
 
7
7
  // eslint-disable-next-line @typescript-eslint/triple-slash-reference, spaced-comment
8
8
  /// <reference lib="DOM" />
9
- import type {DividerProps$1, ComponentChildren} from './shared.d.ts';
9
+ import type {
10
+ DividerProps$1,
11
+ PreactCustomElement,
12
+ RenderImpl,
13
+ } from './shared.d.ts';
14
+ import * as preact$1 from 'preact';
15
+ import {ReactNode, RefAttributes} from 'react';
10
16
 
11
17
  /**
12
- * The properties for the divider component. A divider creates a visual separator to distinguish different sections of content.
13
- * @publicDocs
18
+ * Configure the following properties on the divider component.
14
19
  */
15
20
  export interface DividerProps
16
21
  extends Pick<DividerProps$1, 'direction' | 'color'> {
@@ -34,143 +39,74 @@ export interface DividerProps
34
39
  color: Extract<DividerProps$1['color'], 'base' | 'strong'>;
35
40
  }
36
41
 
37
- /**
38
- * A string containing CSS styles for a custom element.
39
- * @publicDocs
40
- */
41
- export type Styles = string;
42
- /**
43
- * The configuration for rendering a custom element with Preact.
44
- * @publicDocs
45
- */
46
- export type RenderImpl = Omit<ShadowRootInit, 'mode'> & {
47
- /**
48
- * The function that renders the shadow root content.
49
- */
50
- ShadowRoot: (element: any) => ComponentChildren;
51
- /**
52
- * The optional CSS styles to apply to the shadow root.
53
- */
54
- styles?: Styles;
42
+ export type ReactIntrinsicElementChildren<PreactProps extends object> =
43
+ 'children' extends keyof PreactProps
44
+ ? {
45
+ children?: ReactNode;
46
+ }
47
+ : Record<never, never>;
48
+ export type ReactIntrinsicElementProps<
49
+ PreactProps extends object,
50
+ ElementType,
51
+ > = Omit<PreactProps, 'children' | 'key' | 'ref' | 'slot'> &
52
+ ReactIntrinsicElementChildren<PreactProps> &
53
+ RefAttributes<ElementType> & {
54
+ slot?: Lowercase<string>;
55
+ };
56
+ export type ReactIntrinsicElements = {
57
+ [Tag in Exclude<
58
+ Extract<keyof preact$1.createElement.JSX.IntrinsicElements, `s-${string}`>,
59
+ `s-test-${string}`
60
+ >]: ReactIntrinsicElementProps<
61
+ preact$1.createElement.JSX.IntrinsicElements[Tag],
62
+ Tag extends keyof HTMLElementTagNameMap
63
+ ? HTMLElementTagNameMap[Tag]
64
+ : HTMLElement
65
+ >;
55
66
  };
56
- /**
57
- * An interface representing the properties of an activation event, such as a click or keypress.
58
- * @publicDocs
59
- */
60
- export interface ActivationEventEsque {
61
- /**
62
- * Whether the shift key was pressed during the event.
63
- */
64
- shiftKey: boolean;
65
- /**
66
- * Whether the meta key (Command on Mac, Windows key on PC) was pressed during the event.
67
- */
68
- metaKey: boolean;
69
- /**
70
- * Whether the control key was pressed during the event.
71
- */
72
- ctrlKey: boolean;
73
- /**
74
- * The mouse button that was pressed (0 for left, 1 for middle, 2 for right).
75
- */
76
- button: number;
77
- }
78
- /**
79
- * The options for triggering a synthetic click event.
80
- * @publicDocs
81
- */
82
- export interface ClickOptions {
83
- /**
84
- * 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.
85
- */
86
- sourceEvent?: ActivationEventEsque;
67
+ declare module 'react' {
68
+ namespace JSX {
69
+ interface IntrinsicElements extends ReactIntrinsicElements {}
70
+ }
87
71
  }
88
- /**
89
- * The base class for creating custom elements with Preact.
90
- * While this class could be used in both Node and the browser, the constructor will only be used in the browser.
91
- * So we give it a type of HTMLElement to avoid typing issues later where it's used, which will only happen in the browser.
92
- */
93
- declare const BaseClass: typeof globalThis.HTMLElement;
94
- /**
95
- * An abstract base class for creating custom elements that render with Preact.
96
- */
97
- declare abstract class PreactCustomElement extends BaseClass {
98
- /** @private */
99
- static get observedAttributes(): string[];
100
- constructor({
101
- styles,
102
- ShadowRoot: renderFunction,
103
- delegatesFocus,
104
- ...options
105
- }: RenderImpl);
106
72
 
107
- /** @private */
108
- setAttribute(name: string, value: string): void;
109
- /** @private */
110
- attributeChangedCallback(name: string): void;
73
+ declare class PolarisCustomElement extends PreactCustomElement {
74
+ constructor(renderImpl: Omit<RenderImpl, 'globalShadowCSS'>);
111
75
  /** @private */
112
76
  connectedCallback(): void;
113
77
  /** @private */
114
- disconnectedCallback(): void;
115
- /** @private */
116
78
  adoptedCallback(): void;
117
- /**
118
- * Queue a run of the render function.
119
- * You shouldn't need to call this manually - it should be handled by changes to @property values.
120
- * @private
121
- */
122
- queueRender(): void;
123
- /**
124
- * Like the standard `element.click()`, but you can influence the behavior with a `sourceEvent`.
125
- *
126
- * For example, if the `sourceEvent` was a middle click, or has particular keys held down,
127
- * components will attempt to produce the desired behavior on links, such as opening the page in the background tab.
128
- * @private
129
- * @param options
130
- */
131
- click({sourceEvent}?: ClickOptions): void;
132
79
  }
133
80
 
134
81
  /**
135
- * The base properties for Preact elements that don't have children, providing essential attributes like keys and refs for component management.
82
+ * 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.
136
83
  * @publicDocs
137
84
  */
138
85
  export interface PreactBaseElementProps<TClass extends HTMLElement> {
139
86
  /**
140
- * 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.
87
+ * A unique identifier for this element, used by the virtual DOM to efficiently track and update elements in lists.
88
+ * Essential for maintaining component state and optimizing re-renders when lists change.
141
89
  */
142
90
  key?: preact.Key;
143
91
  /**
144
- * 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.
92
+ * A reference to access the underlying DOM element directly.
93
+ * Typically created using `useRef()` to interact with the element imperatively or measure its properties.
145
94
  */
146
95
  ref?: preact.Ref<TClass>;
147
96
  /**
148
- * Assigns this element to a named slot in a parent component that uses shadow DOM or slot-based composition patterns.
97
+ * The named slot to which this element is assigned in the parent component's shadow DOM.
98
+ *
99
+ * Used for advanced component composition with web components.
149
100
  */
150
101
  slot?: Lowercase<string>;
151
102
  }
152
103
 
153
104
  /**
154
- * A divider is a visual separator that creates a line between different sections of content.
105
+ * Configure the following properties on the divider component.
106
+ * @publicDocs
155
107
  */
156
- declare class Divider extends PreactCustomElement implements DividerProps {
157
- /**
158
- * The orientation of the divider line, using [logical properties](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_logical_properties_and_values).
159
- *
160
- * - `inline`: Horizontal divider for separating vertically stacked content
161
- * - `block`: Vertical divider for separating horizontally arranged content
162
- *
163
- * @default 'inline'
164
- */
108
+ declare class Divider extends PolarisCustomElement implements DividerProps {
165
109
  accessor direction: DividerProps['direction'];
166
- /**
167
- * The visual prominence of the divider line.
168
- *
169
- * - `base`: Standard divider for most separations (default)
170
- * - `strong`: More prominent divider for major section breaks
171
- *
172
- * @default 'base'
173
- */
174
110
  accessor color: DividerProps['color'];
175
111
  constructor();
176
112
  }
@@ -188,10 +124,6 @@ declare module 'preact' {
188
124
  }
189
125
 
190
126
  declare const tagName = 's-divider';
191
- /**
192
- * The properties for the divider component when it's used in JSX.
193
- * @publicDocs
194
- */
195
127
  export interface DividerJSXProps
196
128
  extends Partial<DividerProps>,
197
129
  Pick<DividerProps$1, 'id'> {}