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