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