@shopify/ui-extensions 2025.10.0-rc.46 → 2025.10.0-rc.48
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/api.js +1 -1
- package/build/cjs/surfaces/checkout/shared.js +1 -1
- package/build/esm/surfaces/checkout/preact/api.mjs +1 -1
- package/build/esm/surfaces/checkout/shared.mjs +1 -1
- package/build/esnext/surfaces/checkout/preact/api.esnext +1 -1
- package/build/esnext/surfaces/checkout/shared.esnext +1 -1
- package/build/ts/docs/shared/components/ConsentCheckbox.d.ts +4 -0
- package/build/ts/docs/shared/components/ConsentCheckbox.d.ts.map +1 -0
- package/build/ts/docs/shared/components/ConsentPhoneField.d.ts +4 -0
- package/build/ts/docs/shared/components/ConsentPhoneField.d.ts.map +1 -0
- package/build/ts/docs/shared/components/index.d.ts +2 -0
- package/build/ts/docs/shared/components/index.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/Chip.d.ts +1 -5
- package/build/ts/surfaces/admin/components/ClickableChip.d.ts +1 -5
- package/build/ts/surfaces/admin/components/ColorPicker.d.ts +1 -5
- package/build/ts/surfaces/admin/components/DateField.d.ts +1 -5
- package/build/ts/surfaces/admin/components/Menu.d.ts +1 -5
- package/build/ts/surfaces/admin/components/Modal.d.ts +1 -5
- package/build/ts/surfaces/admin/components/QueryContainer.d.ts +1 -5
- package/build/ts/surfaces/admin/components/shared.d.ts +30 -6
- package/build/ts/surfaces/checkout/components/ConsentCheckbox/ConsentCheckbox.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/ConsentCheckbox/ConsentCheckbox.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/ConsentCheckbox.d.ts +84 -0
- package/build/ts/surfaces/checkout/components/ConsentPhoneField/ConsentPhoneField.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/ConsentPhoneField/ConsentPhoneField.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/ConsentPhoneField.d.ts +129 -0
- package/build/ts/surfaces/checkout/components/NumberField/NumberField.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/NumberField/NumberField.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/NumberField.d.ts +98 -0
- package/build/ts/surfaces/checkout/components/PasswordField.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/components-shared.d.ts +17 -0
- package/build/ts/surfaces/checkout/components/components.d.ts +216 -144
- package/build/ts/surfaces/checkout/shared.d.ts +1 -1
- package/build/ts/surfaces/checkout/shared.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/targets/Checkout::Actions::RenderBefore.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/Checkout::CartLineDetails::RenderAfter.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/Checkout::CartLineDetails::RenderLineComponents.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/Checkout::CartLines::RenderAfter.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/Checkout::Contact::RenderAfter.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/Checkout::CustomerInformation::RenderAfter.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/Checkout::DeliveryAddress::RenderBefore.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/Checkout::Dynamic::Render.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/Checkout::GiftCard::Render.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/Checkout::PaymentMethod::HostedFields::RenderAfter.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/Checkout::PaymentMethod::Render.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/Checkout::PaymentMethod::RenderRequiredAction.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/Checkout::PickupLocations::RenderAfter.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/Checkout::PickupLocations::RenderBefore.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/Checkout::PickupPoints::RenderAfter.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/Checkout::PickupPoints::RenderBefore.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/Checkout::Reductions::RenderAfter.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/Checkout::Reductions::RenderBefore.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/Checkout::ShippingMethodDetails::RenderAfter.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/Checkout::ShippingMethodDetails::RenderExpanded.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/Checkout::ShippingMethods::RenderAfter.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/Checkout::ShippingMethods::RenderBefore.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/Checkout::ThankYou::CartLineDetails::RenderAfter.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/Checkout::ThankYou::CartLines::RenderAfter.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/Checkout::ThankYou::CustomerInformation::RenderAfter.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/Checkout::ThankYou::Dynamic::Render.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/purchase.cart-line-item.line-components.render.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/purchase.checkout.actions.render-before.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/purchase.checkout.block.render.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/purchase.checkout.cart-line-item.render-after.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/purchase.checkout.cart-line-list.render-after.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/purchase.checkout.contact.render-after.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/purchase.checkout.delivery-address.render-after.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/purchase.checkout.delivery-address.render-before.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/purchase.checkout.footer.render-after.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/purchase.checkout.gift-card.render.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/purchase.checkout.header.render-after.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/purchase.checkout.payment-method-list.render-after.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/purchase.checkout.payment-method-list.render-before.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/purchase.checkout.payment-option-item.action-required.render.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/purchase.checkout.payment-option-item.details.render.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/purchase.checkout.payment-option-item.hosted-fields.render-after.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/purchase.checkout.pickup-location-list.render-after.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/purchase.checkout.pickup-location-list.render-before.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/purchase.checkout.pickup-location-option-item.render-after.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/purchase.checkout.pickup-point-list.render-after.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/purchase.checkout.pickup-point-list.render-before.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/purchase.checkout.reductions.render-after.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/purchase.checkout.reductions.render-before.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/purchase.checkout.shipping-option-item.details.render.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/purchase.checkout.shipping-option-item.render-after.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/purchase.checkout.shipping-option-list.render-after.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/purchase.checkout.shipping-option-list.render-before.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/purchase.thank-you.announcement.render.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/purchase.thank-you.block.render.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/purchase.thank-you.cart-line-item.render-after.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/purchase.thank-you.cart-line-list.render-after.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/purchase.thank-you.customer-information.render-after.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/purchase.thank-you.footer.render-after.d.ts +3 -0
- package/build/ts/surfaces/checkout/targets/purchase.thank-you.header.render-after.d.ts +3 -0
- package/build/ts/surfaces/customer-account/components/ConsentCheckbox.d.ts +84 -0
- package/build/ts/surfaces/customer-account/components/ConsentPhoneField.d.ts +129 -0
- package/build/ts/surfaces/customer-account/components/NumberField.d.ts +98 -0
- package/build/ts/surfaces/customer-account/components/PasswordField.d.ts +1 -1
- package/build/ts/surfaces/customer-account/components/components-shared.d.ts +17 -0
- package/build/ts/surfaces/customer-account/components/components.d.ts +216 -144
- package/build/ts/surfaces/customer-account/targets/customer-account.footer.render-after.d.ts +3 -0
- package/build/ts/surfaces/customer-account/targets/customer-account.order-index.announcement.render.d.ts +3 -0
- package/build/ts/surfaces/customer-account/targets/customer-account.order-index.block.render.d.ts +3 -0
- package/build/ts/surfaces/customer-account/targets/customer-account.order-status.announcement.render.d.ts +3 -0
- package/build/ts/surfaces/customer-account/targets/customer-account.order-status.block.render.d.ts +3 -0
- package/build/ts/surfaces/customer-account/targets/customer-account.order-status.cart-line-item.render-after.d.ts +3 -0
- package/build/ts/surfaces/customer-account/targets/customer-account.order-status.cart-line-list.render-after.d.ts +3 -0
- package/build/ts/surfaces/customer-account/targets/customer-account.order-status.customer-information.render-after.d.ts +3 -0
- package/build/ts/surfaces/customer-account/targets/customer-account.order-status.fulfillment-details.render-after.d.ts +3 -0
- package/build/ts/surfaces/customer-account/targets/customer-account.order-status.payment-details.render-after.d.ts +3 -0
- package/build/ts/surfaces/customer-account/targets/customer-account.order-status.return-details.render-after.d.ts +3 -0
- package/build/ts/surfaces/customer-account/targets/customer-account.order-status.unfulfilled-items.render-after.d.ts +3 -0
- package/build/ts/surfaces/customer-account/targets/customer-account.order.action.menu-item.render.d.ts +3 -0
- package/build/ts/surfaces/customer-account/targets/customer-account.order.action.render.d.ts +3 -0
- package/build/ts/surfaces/customer-account/targets/customer-account.order.page.render.d.ts +3 -0
- package/build/ts/surfaces/customer-account/targets/customer-account.page.render.d.ts +3 -0
- package/build/ts/surfaces/customer-account/targets/customer-account.profile.addresses.render-after.d.ts +3 -0
- package/build/ts/surfaces/customer-account/targets/customer-account.profile.announcement.render.d.ts +3 -0
- package/build/ts/surfaces/customer-account/targets/customer-account.profile.block.render.d.ts +3 -0
- package/build/ts/surfaces/customer-account/targets/customer-account.profile.company-details.render-after.d.ts +3 -0
- package/build/ts/surfaces/customer-account/targets/customer-account.profile.company-location-addresses.render-after.d.ts +3 -0
- package/build/ts/surfaces/customer-account/targets/customer-account.profile.company-location-payment.render-after.d.ts +3 -0
- package/build/ts/surfaces/customer-account/targets/customer-account.profile.company-location-staff.render-after.d.ts +3 -0
- package/build/ts/surfaces/customer-account/targets/customer-account.profile.payment.render-after.d.ts +3 -0
- package/build/ts/surfaces/point-of-sale/components/Badge.d.ts +10 -1
- package/build/ts/surfaces/point-of-sale/components/Banner.d.ts +12 -4
- package/build/ts/surfaces/point-of-sale/components/Box.d.ts +51 -14
- package/build/ts/surfaces/point-of-sale/components/Button.d.ts +12 -2
- package/build/ts/surfaces/point-of-sale/components/Choice.d.ts +3 -2
- package/build/ts/surfaces/point-of-sale/components/ChoiceList.d.ts +12 -5
- package/build/ts/surfaces/point-of-sale/components/Clickable.d.ts +11 -4
- package/build/ts/surfaces/point-of-sale/components/DateField.d.ts +17 -8
- package/build/ts/surfaces/point-of-sale/components/DatePicker.d.ts +14 -6
- package/build/ts/surfaces/point-of-sale/components/DateSpinner.d.ts +10 -6
- package/build/ts/surfaces/point-of-sale/components/Divider.d.ts +4 -3
- package/build/ts/surfaces/point-of-sale/components/EmailField.d.ts +17 -7
- package/build/ts/surfaces/point-of-sale/components/Heading.d.ts +7 -4
- package/build/ts/surfaces/point-of-sale/components/Icon.d.ts +13 -3
- package/build/ts/surfaces/point-of-sale/components/Image.d.ts +12 -5
- package/build/ts/surfaces/point-of-sale/components/Modal.d.ts +28 -7
- package/build/ts/surfaces/point-of-sale/components/NumberField.d.ts +17 -7
- package/build/ts/surfaces/point-of-sale/components/Page.d.ts +25 -11
- package/build/ts/surfaces/point-of-sale/components/PosBlock/PosBlock.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/PosBlock.d.ts +12 -13
- package/build/ts/surfaces/point-of-sale/components/QrCode.d.ts +12 -8
- package/build/ts/surfaces/point-of-sale/components/ScrollBox.d.ts +47 -15
- package/build/ts/surfaces/point-of-sale/components/SearchField.d.ts +15 -7
- package/build/ts/surfaces/point-of-sale/components/Section.d.ts +15 -9
- package/build/ts/surfaces/point-of-sale/components/Stack.d.ts +67 -7
- package/build/ts/surfaces/point-of-sale/components/Text.d.ts +25 -4
- package/build/ts/surfaces/point-of-sale/components/TextArea.d.ts +17 -7
- package/build/ts/surfaces/point-of-sale/components/TextField.d.ts +9 -7
- package/build/ts/surfaces/point-of-sale/components/Tile.d.ts +12 -2
- package/build/ts/surfaces/point-of-sale/components/TimeField.d.ts +14 -6
- package/build/ts/surfaces/point-of-sale/components/TimePicker.d.ts +14 -6
- package/build/ts/surfaces/point-of-sale/components/components-shared.d.ts +102 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -1
- package/src/docs/shared/components/ConsentCheckbox.ts +12 -0
- package/src/docs/shared/components/ConsentPhoneField.ts +12 -0
- package/src/docs/shared/components/index.ts +2 -0
- package/src/surfaces/admin/components/Chip.d.ts +1 -5
- package/src/surfaces/admin/components/ClickableChip.d.ts +1 -5
- package/src/surfaces/admin/components/ColorPicker.d.ts +1 -5
- package/src/surfaces/admin/components/DateField.d.ts +1 -5
- package/src/surfaces/admin/components/Menu.d.ts +1 -5
- package/src/surfaces/admin/components/Modal.d.ts +1 -5
- package/src/surfaces/admin/components/QueryContainer.d.ts +1 -5
- package/src/surfaces/admin/components/shared.d.ts +30 -6
- package/src/surfaces/admin/components.d.ts +64 -152
- package/src/surfaces/checkout/components/ConsentCheckbox/examples/basic-consent-checkbox.example.html +5 -0
- package/src/surfaces/checkout/components/ConsentCheckbox.d.ts +84 -0
- package/src/surfaces/checkout/components/ConsentPhoneField/examples/basic-consent-phone-field.example.html +5 -0
- package/src/surfaces/checkout/components/ConsentPhoneField.d.ts +129 -0
- package/src/surfaces/checkout/components/NumberField/examples/basic-number-field.example.html +8 -0
- package/src/surfaces/checkout/components/NumberField.d.ts +98 -0
- package/src/surfaces/checkout/components/PasswordField.d.ts +1 -1
- package/src/surfaces/checkout/components/PhoneField/examples/basic-phone-field.example.html +2 -1
- package/src/surfaces/checkout/components/ProductThumbnail/examples/basic-product-thumbnail.example.html +4 -1
- package/src/surfaces/checkout/components/Stack/examples/basic-stack.example.html +20 -4
- package/src/surfaces/checkout/components/TextArea/examples/basic-text-area.example.html +5 -1
- package/src/surfaces/checkout/components/TextField/examples/basic-text-field.example.html +4 -1
- package/src/surfaces/checkout/components/components-shared.d.ts +17 -0
- package/src/surfaces/checkout/components/components.d.ts +216 -144
- package/src/surfaces/checkout/preact/api.ts +1 -1
- package/src/surfaces/checkout/preact/tests/api.test.tsx +22 -13
- package/src/surfaces/checkout/preact/tests/app-metafields.test.ts +52 -56
- package/src/surfaces/checkout/preact/tests/attributes.test.ts +34 -24
- package/src/surfaces/checkout/preact/tests/billing-address.test.ts +17 -7
- package/src/surfaces/checkout/preact/tests/buyer-identity-businessCustomer.test.ts +16 -9
- package/src/surfaces/checkout/preact/tests/buyer-identity.test.tsx +57 -26
- package/src/surfaces/checkout/preact/tests/buyer-journey.test.ts +71 -74
- package/src/surfaces/checkout/preact/tests/capabilities.test.ts +32 -28
- package/src/surfaces/checkout/preact/tests/cart-line-target.test.ts +31 -24
- package/src/surfaces/checkout/preact/tests/checkout-settings.test.ts +17 -9
- package/src/surfaces/checkout/preact/tests/checkout-token.test.ts +16 -6
- package/src/surfaces/checkout/preact/tests/configuration.test.ts +16 -6
- package/src/surfaces/checkout/preact/tests/country.test.tsx +18 -8
- package/src/surfaces/checkout/preact/tests/currency.test.tsx +18 -8
- package/src/surfaces/checkout/preact/tests/customer-privacy.test.ts +17 -8
- package/src/surfaces/checkout/preact/tests/delivery-group-list-target.test.ts +24 -18
- package/src/surfaces/checkout/preact/tests/delivery-group-target.test.ts +25 -19
- package/src/surfaces/checkout/preact/tests/delivery-group.test.ts +22 -16
- package/src/surfaces/checkout/preact/tests/delivery-groups.test.ts +17 -11
- package/src/surfaces/checkout/preact/tests/delivery-selection-groups.test.ts +31 -24
- package/src/surfaces/checkout/preact/tests/discounts.test.tsx +21 -14
- package/src/surfaces/checkout/preact/tests/extension-language.test.tsx +17 -8
- package/src/surfaces/checkout/preact/tests/gift-cards.test.tsx +17 -8
- package/src/surfaces/checkout/preact/tests/localized-fields.test.ts +58 -59
- package/src/surfaces/checkout/preact/tests/market.test.tsx +17 -7
- package/src/surfaces/checkout/preact/tests/metafield.test.tsx +33 -36
- package/src/surfaces/checkout/preact/tests/metafields.test.tsx +36 -53
- package/src/surfaces/checkout/preact/tests/mount.tsx +60 -17
- package/src/surfaces/checkout/preact/tests/notes.test.tsx +16 -6
- package/src/surfaces/checkout/preact/tests/payment-method.test.ts +87 -60
- package/src/surfaces/checkout/preact/tests/payment-options.test.tsx +26 -24
- package/src/surfaces/checkout/preact/tests/pickup-location-option-target.test.tsx +55 -46
- package/src/surfaces/checkout/preact/tests/redeemable.test.ts +30 -23
- package/src/surfaces/checkout/preact/tests/session-token.test.tsx +12 -6
- package/src/surfaces/checkout/preact/tests/shipping-address.test.ts +17 -7
- package/src/surfaces/checkout/preact/tests/shipping-option-target.test.ts +54 -50
- package/src/surfaces/checkout/preact/tests/shopping-address.test.tsx +18 -10
- package/src/surfaces/checkout/preact/tests/timezone.test.tsx +17 -7
- package/src/surfaces/checkout/preact/tests/translate.test.tsx +18 -13
- package/src/surfaces/checkout/preact/tests/tsconfig.json +1 -1
- package/src/surfaces/checkout/shared.ts +2 -0
- package/src/surfaces/point-of-sale/components/Badge.d.ts +10 -1
- package/src/surfaces/point-of-sale/components/Banner.d.ts +12 -4
- package/src/surfaces/point-of-sale/components/Box.d.ts +51 -14
- package/src/surfaces/point-of-sale/components/Button.d.ts +12 -2
- package/src/surfaces/point-of-sale/components/Choice.d.ts +3 -2
- package/src/surfaces/point-of-sale/components/ChoiceList.d.ts +12 -5
- package/src/surfaces/point-of-sale/components/Clickable.d.ts +11 -4
- package/src/surfaces/point-of-sale/components/DateField.d.ts +17 -8
- package/src/surfaces/point-of-sale/components/DatePicker.d.ts +14 -6
- package/src/surfaces/point-of-sale/components/DateSpinner.d.ts +10 -6
- package/src/surfaces/point-of-sale/components/Divider.d.ts +4 -3
- package/src/surfaces/point-of-sale/components/EmailField.d.ts +17 -7
- package/src/surfaces/point-of-sale/components/Heading.d.ts +7 -4
- package/src/surfaces/point-of-sale/components/Icon.d.ts +13 -3
- package/src/surfaces/point-of-sale/components/Image.d.ts +12 -5
- package/src/surfaces/point-of-sale/components/Modal.d.ts +28 -7
- package/src/surfaces/point-of-sale/components/NumberField.d.ts +17 -7
- package/src/surfaces/point-of-sale/components/Page.d.ts +25 -11
- package/src/surfaces/point-of-sale/components/PosBlock.d.ts +12 -13
- package/src/surfaces/point-of-sale/components/QrCode.d.ts +12 -8
- package/src/surfaces/point-of-sale/components/ScrollBox.d.ts +47 -15
- package/src/surfaces/point-of-sale/components/SearchField.d.ts +15 -7
- package/src/surfaces/point-of-sale/components/Section.d.ts +15 -9
- package/src/surfaces/point-of-sale/components/Stack.d.ts +67 -7
- package/src/surfaces/point-of-sale/components/Text.d.ts +25 -4
- package/src/surfaces/point-of-sale/components/TextArea.d.ts +17 -7
- package/src/surfaces/point-of-sale/components/TextField.d.ts +9 -7
- package/src/surfaces/point-of-sale/components/Tile.d.ts +12 -2
- package/src/surfaces/point-of-sale/components/TimeField.d.ts +14 -6
- package/src/surfaces/point-of-sale/components/TimePicker.d.ts +14 -6
- package/src/surfaces/point-of-sale/components/components-shared.d.ts +102 -1
- package/src/surfaces/point-of-sale/components.d.ts +869 -481
- package/build/ts/surfaces/checkout/errors.d.ts +0 -10
- package/build/ts/surfaces/checkout/errors.d.ts.map +0 -1
- package/src/surfaces/checkout/errors.ts +0 -13
|
@@ -31,6 +31,7 @@ export interface BaseElementPropsWithChildren<TClass = HTMLElement>
|
|
|
31
31
|
extends BaseElementProps<TClass> {
|
|
32
32
|
children?: ComponentChildren;
|
|
33
33
|
}
|
|
34
|
+
export type IntrinsicElementProps<T> = T & BaseElementPropsWithChildren<T>;
|
|
34
35
|
export interface CallbackEvent<T extends keyof HTMLElementTagNameMap> {
|
|
35
36
|
currentTarget: HTMLElementTagNameMap[T];
|
|
36
37
|
bubbles?: boolean;
|
|
@@ -43,24 +44,44 @@ export interface CallbackEvent<T extends keyof HTMLElementTagNameMap> {
|
|
|
43
44
|
|
|
44
45
|
declare const tagName = 's-modal';
|
|
45
46
|
export interface ModalJSXProps extends Pick<ModalProps, 'id' | 'heading'> {
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
/**
|
|
48
|
+
* Callback when the modal is hidden.
|
|
49
|
+
*/
|
|
48
50
|
onHide?: (event: CallbackEvent<typeof tagName>) => void | null;
|
|
51
|
+
/**
|
|
52
|
+
* Callback when the modal is shown.
|
|
53
|
+
*/
|
|
49
54
|
onShow?: (event: CallbackEvent<typeof tagName>) => void | null;
|
|
55
|
+
/**
|
|
56
|
+
* The primary action button displayed in the modal.
|
|
57
|
+
*
|
|
58
|
+
* The tone of the button is used to define the tone of the modal.
|
|
59
|
+
*
|
|
60
|
+
* If omitted, the modal will default to an 'info' tone, and show an 'OK' button, translated according to the user's locale.
|
|
61
|
+
*/
|
|
62
|
+
primaryAction?: ComponentChild;
|
|
63
|
+
/**
|
|
64
|
+
* The secondary action buttons displayed in the modal.
|
|
65
|
+
*/
|
|
66
|
+
secondaryActions?: ComponentChild;
|
|
67
|
+
/**
|
|
68
|
+
* The content of the Modal.
|
|
69
|
+
*/
|
|
50
70
|
children?: ComponentChildren;
|
|
51
71
|
}
|
|
72
|
+
export type ElementProps = Omit<
|
|
73
|
+
ModalJSXProps,
|
|
74
|
+
'primaryAction' | 'secondaryActions'
|
|
75
|
+
>;
|
|
52
76
|
declare global {
|
|
53
77
|
interface HTMLElementTagNameMap {
|
|
54
|
-
[tagName]:
|
|
78
|
+
[tagName]: ElementProps;
|
|
55
79
|
}
|
|
56
80
|
}
|
|
57
81
|
declare module 'preact' {
|
|
58
82
|
namespace createElement.JSX {
|
|
59
83
|
interface IntrinsicElements {
|
|
60
|
-
[tagName]:
|
|
61
|
-
BaseElementPropsWithChildren<
|
|
62
|
-
Omit<ModalJSXProps, 'primaryAction' | 'secondaryActions'>
|
|
63
|
-
>;
|
|
84
|
+
[tagName]: IntrinsicElementProps<ElementProps>;
|
|
64
85
|
}
|
|
65
86
|
}
|
|
66
87
|
}
|
|
@@ -31,6 +31,7 @@ export interface BaseElementPropsWithChildren<TClass = HTMLElement>
|
|
|
31
31
|
extends BaseElementProps<TClass> {
|
|
32
32
|
children?: ComponentChildren;
|
|
33
33
|
}
|
|
34
|
+
export type IntrinsicElementProps<T> = T & BaseElementPropsWithChildren<T>;
|
|
34
35
|
export interface CallbackEvent<T extends keyof HTMLElementTagNameMap> {
|
|
35
36
|
currentTarget: HTMLElementTagNameMap[T];
|
|
36
37
|
bubbles?: boolean;
|
|
@@ -45,6 +46,7 @@ declare const tagName = 's-number-field';
|
|
|
45
46
|
export interface NumberFieldJSXProps
|
|
46
47
|
extends Pick<
|
|
47
48
|
NumberFieldProps,
|
|
49
|
+
| 'id'
|
|
48
50
|
| 'label'
|
|
49
51
|
| 'details'
|
|
50
52
|
| 'value'
|
|
@@ -122,25 +124,33 @@ export interface NumberFieldJSXProps
|
|
|
122
124
|
* - `auto`: the presence of the controls depends on the surface and context.
|
|
123
125
|
*/
|
|
124
126
|
controls?: NumberFieldProps['controls'];
|
|
125
|
-
/**
|
|
127
|
+
/**
|
|
128
|
+
* Callback when the user makes any changes in the field.
|
|
129
|
+
*/
|
|
126
130
|
onInput?: ((event: CallbackEvent<typeof tagName>) => void) | null;
|
|
127
|
-
/**
|
|
131
|
+
/**
|
|
132
|
+
* Callback after editing completes (typically on blur).
|
|
133
|
+
*/
|
|
128
134
|
onChange?: ((event: CallbackEvent<typeof tagName>) => void) | null;
|
|
129
|
-
/**
|
|
135
|
+
/**
|
|
136
|
+
* Callback when the element loses focus.
|
|
137
|
+
*/
|
|
130
138
|
onBlur?: ((event: CallbackEvent<typeof tagName>) => void) | null;
|
|
131
|
-
/**
|
|
139
|
+
/**
|
|
140
|
+
* Callback when the element receives focus.
|
|
141
|
+
*/
|
|
132
142
|
onFocus?: ((event: CallbackEvent<typeof tagName>) => void) | null;
|
|
133
143
|
}
|
|
144
|
+
export type ElementProps = Omit<NumberFieldJSXProps, 'accessory'>;
|
|
134
145
|
declare global {
|
|
135
146
|
interface HTMLElementTagNameMap {
|
|
136
|
-
[tagName]:
|
|
147
|
+
[tagName]: ElementProps;
|
|
137
148
|
}
|
|
138
149
|
}
|
|
139
150
|
declare module 'preact' {
|
|
140
151
|
namespace createElement.JSX {
|
|
141
152
|
interface IntrinsicElements {
|
|
142
|
-
[tagName]:
|
|
143
|
-
BaseElementPropsWithChildren<Omit<NumberFieldJSXProps, 'accessory'>>;
|
|
153
|
+
[tagName]: IntrinsicElementProps<ElementProps>;
|
|
144
154
|
}
|
|
145
155
|
}
|
|
146
156
|
}
|
|
@@ -31,29 +31,43 @@ export interface BaseElementPropsWithChildren<TClass = HTMLElement>
|
|
|
31
31
|
extends BaseElementProps<TClass> {
|
|
32
32
|
children?: ComponentChildren;
|
|
33
33
|
}
|
|
34
|
+
export type IntrinsicElementProps<T> = T & BaseElementPropsWithChildren<T>;
|
|
34
35
|
|
|
35
36
|
declare const tagName = 's-page';
|
|
36
|
-
export
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
export interface PageJSXProps extends Pick<PageProps, 'id'> {
|
|
38
|
+
/**
|
|
39
|
+
* The main page heading, displayed in the action bar at the top of the page.
|
|
40
|
+
*
|
|
41
|
+
* @default: ''
|
|
42
|
+
*/
|
|
43
|
+
heading?: PageProps['heading'];
|
|
44
|
+
/**
|
|
45
|
+
* A secondary page heading, displayed under the main heading in the action bar.
|
|
46
|
+
*/
|
|
47
|
+
subheading?: PageProps['subheading'];
|
|
48
|
+
/**
|
|
49
|
+
* Button element to display in the action bar. Only a single button is supported.
|
|
50
|
+
*/
|
|
42
51
|
secondaryActions?: ComponentChild;
|
|
52
|
+
/**
|
|
53
|
+
* Content to display in the page's sidebar.
|
|
54
|
+
*/
|
|
43
55
|
aside?: ComponentChild;
|
|
56
|
+
/**
|
|
57
|
+
* The content of the Page.
|
|
58
|
+
*/
|
|
59
|
+
children?: ComponentChildren;
|
|
44
60
|
}
|
|
61
|
+
export type ElementProps = Omit<PageJSXProps, 'secondaryActions' | 'aside'>;
|
|
45
62
|
declare global {
|
|
46
63
|
interface HTMLElementTagNameMap {
|
|
47
|
-
[tagName]:
|
|
64
|
+
[tagName]: ElementProps;
|
|
48
65
|
}
|
|
49
66
|
}
|
|
50
67
|
declare module 'preact' {
|
|
51
68
|
namespace createElement.JSX {
|
|
52
69
|
interface IntrinsicElements {
|
|
53
|
-
[tagName]:
|
|
54
|
-
BaseElementPropsWithChildren<
|
|
55
|
-
Omit<PageJSXProps, 'secondaryActions' | 'aside'>
|
|
56
|
-
>;
|
|
70
|
+
[tagName]: IntrinsicElementProps<ElementProps>;
|
|
57
71
|
}
|
|
58
72
|
}
|
|
59
73
|
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// eslint-disable-next-line @typescript-eslint/triple-slash-reference, spaced-comment
|
|
10
10
|
/// <reference lib="DOM" />
|
|
11
11
|
import type {
|
|
12
|
-
|
|
12
|
+
POSBlockProps,
|
|
13
13
|
Key,
|
|
14
14
|
Ref,
|
|
15
15
|
ComponentChild,
|
|
@@ -31,31 +31,30 @@ export interface BaseElementPropsWithChildren<TClass = HTMLElement>
|
|
|
31
31
|
extends BaseElementProps<TClass> {
|
|
32
32
|
children?: ComponentChildren;
|
|
33
33
|
}
|
|
34
|
+
export type IntrinsicElementProps<T> = T & BaseElementPropsWithChildren<T>;
|
|
34
35
|
|
|
35
36
|
declare const tagName = 's-pos-block';
|
|
36
|
-
export interface PosBlockJSXProps
|
|
37
|
+
export interface PosBlockJSXProps
|
|
38
|
+
extends Pick<POSBlockProps, 'id' | 'heading'> {
|
|
39
|
+
/**
|
|
40
|
+
* The secondary actions to perform, provided as button or link type elements.
|
|
41
|
+
*/
|
|
37
42
|
secondaryActions?: ComponentChild;
|
|
38
43
|
/**
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* **Mobile surfaces:** Uses the standard POS Design System heading style for a section (not h2).
|
|
42
|
-
*
|
|
43
|
-
* @default undefined
|
|
44
|
+
* The content of the Block.
|
|
44
45
|
*/
|
|
45
|
-
|
|
46
|
+
children?: ComponentChildren;
|
|
46
47
|
}
|
|
48
|
+
export type ElementProps = Omit<PosBlockJSXProps, 'secondaryActions'>;
|
|
47
49
|
declare global {
|
|
48
50
|
interface HTMLElementTagNameMap {
|
|
49
|
-
[tagName]:
|
|
51
|
+
[tagName]: ElementProps;
|
|
50
52
|
}
|
|
51
53
|
}
|
|
52
54
|
declare module 'preact' {
|
|
53
55
|
namespace createElement.JSX {
|
|
54
56
|
interface IntrinsicElements {
|
|
55
|
-
[tagName]:
|
|
56
|
-
BaseElementPropsWithChildren<
|
|
57
|
-
Omit<PosBlockJSXProps, 'secondaryActions'>
|
|
58
|
-
>;
|
|
57
|
+
[tagName]: IntrinsicElementProps<ElementProps>;
|
|
59
58
|
}
|
|
60
59
|
}
|
|
61
60
|
}
|
|
@@ -8,8 +8,9 @@
|
|
|
8
8
|
/* eslint-disable import-x/namespace */
|
|
9
9
|
// eslint-disable-next-line @typescript-eslint/triple-slash-reference, spaced-comment
|
|
10
10
|
/// <reference lib="DOM" />
|
|
11
|
-
import type {Key, Ref} from './components-shared.d.ts';
|
|
11
|
+
import type {QRCodeProps, Key, Ref} from './components-shared.d.ts';
|
|
12
12
|
|
|
13
|
+
export type ComponentChildren = any;
|
|
13
14
|
/**
|
|
14
15
|
* Used when an element does not have children.
|
|
15
16
|
*/
|
|
@@ -18,14 +19,17 @@ export interface BaseElementProps<TClass = HTMLElement> {
|
|
|
18
19
|
ref?: Ref<TClass>;
|
|
19
20
|
slot?: Lowercase<string>;
|
|
20
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Used when an element has children.
|
|
24
|
+
*/
|
|
25
|
+
export interface BaseElementPropsWithChildren<TClass = HTMLElement>
|
|
26
|
+
extends BaseElementProps<TClass> {
|
|
27
|
+
children?: ComponentChildren;
|
|
28
|
+
}
|
|
29
|
+
export type IntrinsicElementProps<T> = T & BaseElementPropsWithChildren<T>;
|
|
21
30
|
|
|
22
31
|
declare const tagName = 's-qr-code';
|
|
23
|
-
export interface QrCodeJSXProps {
|
|
24
|
-
/**
|
|
25
|
-
* The value to encode in the QR code
|
|
26
|
-
*/
|
|
27
|
-
content: string;
|
|
28
|
-
}
|
|
32
|
+
export interface QrCodeJSXProps extends Pick<QRCodeProps, 'id' | 'content'> {}
|
|
29
33
|
declare global {
|
|
30
34
|
interface HTMLElementTagNameMap {
|
|
31
35
|
[tagName]: QrCodeJSXProps;
|
|
@@ -34,7 +38,7 @@ declare global {
|
|
|
34
38
|
declare module 'preact' {
|
|
35
39
|
namespace createElement.JSX {
|
|
36
40
|
interface IntrinsicElements {
|
|
37
|
-
[tagName]:
|
|
41
|
+
[tagName]: IntrinsicElementProps<QrCodeJSXProps>;
|
|
38
42
|
}
|
|
39
43
|
}
|
|
40
44
|
}
|
|
@@ -13,6 +13,9 @@ import type {
|
|
|
13
13
|
MaybeAllValuesShorthandProperty,
|
|
14
14
|
MaybeTwoValuesShorthandProperty,
|
|
15
15
|
SizeKeyword,
|
|
16
|
+
SizeUnitsOrAuto,
|
|
17
|
+
SizeUnitsOrNone,
|
|
18
|
+
SizeUnits,
|
|
16
19
|
Key,
|
|
17
20
|
Ref,
|
|
18
21
|
} from './components-shared.d.ts';
|
|
@@ -33,20 +36,47 @@ export interface BaseElementPropsWithChildren<TClass = HTMLElement>
|
|
|
33
36
|
extends BaseElementProps<TClass> {
|
|
34
37
|
children?: ComponentChildren;
|
|
35
38
|
}
|
|
39
|
+
export type IntrinsicElementProps<T> = T & BaseElementPropsWithChildren<T>;
|
|
36
40
|
|
|
37
41
|
export type PaddingKeyword = SizeKeyword | 'none';
|
|
38
42
|
declare const tagName = 's-scroll-box';
|
|
39
|
-
export interface ScrollBoxJSXProps
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
43
|
+
export interface ScrollBoxJSXProps extends Pick<ScrollBoxProps, 'id'> {
|
|
44
|
+
/**
|
|
45
|
+
* Adjust the block size.
|
|
46
|
+
*
|
|
47
|
+
* @default 'auto'
|
|
48
|
+
*/
|
|
49
|
+
blockSize?: SizeUnitsOrAuto;
|
|
50
|
+
/**
|
|
51
|
+
* Adjust the inline size.
|
|
52
|
+
*
|
|
53
|
+
* @default 'auto'
|
|
54
|
+
*/
|
|
55
|
+
inlineSize?: SizeUnitsOrAuto;
|
|
56
|
+
/**
|
|
57
|
+
* Adjust the maximum block size.
|
|
58
|
+
*
|
|
59
|
+
* @default 'none'
|
|
60
|
+
*/
|
|
61
|
+
maxBlockSize?: SizeUnitsOrNone;
|
|
62
|
+
/**
|
|
63
|
+
* Adjust the maximum inline size.
|
|
64
|
+
*
|
|
65
|
+
* @default 'none'
|
|
66
|
+
*/
|
|
67
|
+
maxInlineSize?: SizeUnitsOrNone;
|
|
68
|
+
/**
|
|
69
|
+
* Adjust the minimum block size.
|
|
70
|
+
*
|
|
71
|
+
* @default '0'
|
|
72
|
+
*/
|
|
73
|
+
minBlockSize?: SizeUnits;
|
|
74
|
+
/**
|
|
75
|
+
* Adjust the minimum inline size.
|
|
76
|
+
*
|
|
77
|
+
* @default '0'
|
|
78
|
+
*/
|
|
79
|
+
minInlineSize?: SizeUnits;
|
|
50
80
|
/**
|
|
51
81
|
* Adjust the padding of all edges.
|
|
52
82
|
*
|
|
@@ -77,7 +107,7 @@ export interface ScrollBoxJSXProps
|
|
|
77
107
|
*
|
|
78
108
|
* @default '' - meaning no override
|
|
79
109
|
*/
|
|
80
|
-
paddingBlock?: MaybeTwoValuesShorthandProperty<PaddingKeyword | ''
|
|
110
|
+
paddingBlock?: MaybeTwoValuesShorthandProperty<PaddingKeyword> | '';
|
|
81
111
|
/**
|
|
82
112
|
* Adjust the block-start padding.
|
|
83
113
|
*
|
|
@@ -103,7 +133,7 @@ export interface ScrollBoxJSXProps
|
|
|
103
133
|
*
|
|
104
134
|
* @default '' - meaning no override
|
|
105
135
|
*/
|
|
106
|
-
paddingInline?: MaybeTwoValuesShorthandProperty<PaddingKeyword | ''
|
|
136
|
+
paddingInline?: MaybeTwoValuesShorthandProperty<PaddingKeyword> | '';
|
|
107
137
|
/**
|
|
108
138
|
* Adjust the inline-start padding.
|
|
109
139
|
*
|
|
@@ -120,6 +150,9 @@ export interface ScrollBoxJSXProps
|
|
|
120
150
|
* @default '' - meaning no override
|
|
121
151
|
*/
|
|
122
152
|
paddingInlineEnd?: PaddingKeyword | '';
|
|
153
|
+
/**
|
|
154
|
+
* The content of the ScrollBox.
|
|
155
|
+
*/
|
|
123
156
|
children?: ComponentChildren;
|
|
124
157
|
}
|
|
125
158
|
declare global {
|
|
@@ -130,8 +163,7 @@ declare global {
|
|
|
130
163
|
declare module 'preact' {
|
|
131
164
|
namespace createElement.JSX {
|
|
132
165
|
interface IntrinsicElements {
|
|
133
|
-
[tagName]: ScrollBoxJSXProps
|
|
134
|
-
BaseElementPropsWithChildren<ScrollBoxJSXProps>;
|
|
166
|
+
[tagName]: IntrinsicElementProps<ScrollBoxJSXProps>;
|
|
135
167
|
}
|
|
136
168
|
}
|
|
137
169
|
}
|
|
@@ -26,6 +26,7 @@ export interface BaseElementPropsWithChildren<TClass = HTMLElement>
|
|
|
26
26
|
extends BaseElementProps<TClass> {
|
|
27
27
|
children?: ComponentChildren;
|
|
28
28
|
}
|
|
29
|
+
export type IntrinsicElementProps<T> = T & BaseElementPropsWithChildren<T>;
|
|
29
30
|
export interface CallbackEvent<T extends keyof HTMLElementTagNameMap> {
|
|
30
31
|
currentTarget: HTMLElementTagNameMap[T];
|
|
31
32
|
bubbles?: boolean;
|
|
@@ -38,14 +39,22 @@ export interface CallbackEvent<T extends keyof HTMLElementTagNameMap> {
|
|
|
38
39
|
|
|
39
40
|
declare const tagName = 's-search-field';
|
|
40
41
|
export interface SearchFieldJSXProps
|
|
41
|
-
extends Pick<SearchFieldProps, 'disabled' | 'placeholder' | 'value'> {
|
|
42
|
-
/**
|
|
42
|
+
extends Pick<SearchFieldProps, 'id' | 'disabled' | 'placeholder' | 'value'> {
|
|
43
|
+
/**
|
|
44
|
+
* Callback when the user changes the value in the field.
|
|
45
|
+
*/
|
|
43
46
|
onInput?: ((event: CallbackEvent<typeof tagName>) => void) | null;
|
|
44
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* Callback when the field loses focus after the user changes the value in the field.
|
|
49
|
+
*/
|
|
45
50
|
onChange?: ((event: CallbackEvent<typeof tagName>) => void) | null;
|
|
46
|
-
/**
|
|
51
|
+
/**
|
|
52
|
+
* Callback when the field loses focus.
|
|
53
|
+
*/
|
|
47
54
|
onBlur?: ((event: CallbackEvent<typeof tagName>) => void) | null;
|
|
48
|
-
/**
|
|
55
|
+
/**
|
|
56
|
+
* Callback when the field is focused.
|
|
57
|
+
*/
|
|
49
58
|
onFocus?: ((event: CallbackEvent<typeof tagName>) => void) | null;
|
|
50
59
|
}
|
|
51
60
|
declare global {
|
|
@@ -56,8 +65,7 @@ declare global {
|
|
|
56
65
|
declare module 'preact' {
|
|
57
66
|
namespace createElement.JSX {
|
|
58
67
|
interface IntrinsicElements {
|
|
59
|
-
[tagName]: SearchFieldJSXProps
|
|
60
|
-
BaseElementPropsWithChildren<SearchFieldJSXProps>;
|
|
68
|
+
[tagName]: IntrinsicElementProps<SearchFieldJSXProps>;
|
|
61
69
|
}
|
|
62
70
|
}
|
|
63
71
|
}
|
|
@@ -31,29 +31,35 @@ export interface BaseElementPropsWithChildren<TClass = HTMLElement>
|
|
|
31
31
|
extends BaseElementProps<TClass> {
|
|
32
32
|
children?: ComponentChildren;
|
|
33
33
|
}
|
|
34
|
+
export type IntrinsicElementProps<T> = T & BaseElementPropsWithChildren<T>;
|
|
34
35
|
|
|
35
36
|
declare const tagName = 's-section';
|
|
36
|
-
export interface SectionJSXProps extends Pick<SectionProps, '
|
|
37
|
-
secondaryActions?: ComponentChild;
|
|
37
|
+
export interface SectionJSXProps extends Pick<SectionProps, 'id'> {
|
|
38
38
|
/**
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* **Mobile surfaces:** Uses the standard POS Design System heading style for a section (not h2).
|
|
39
|
+
* A title that describes the content of the section.
|
|
42
40
|
*
|
|
43
|
-
*
|
|
41
|
+
* If omitted, and no secondaryActions are provided, the section will be rendered without a header.
|
|
44
42
|
*/
|
|
45
43
|
heading?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Button element to display in the section heading. A single button is supported.
|
|
46
|
+
*/
|
|
47
|
+
secondaryActions?: ComponentChild;
|
|
48
|
+
/**
|
|
49
|
+
* The content of the Section.
|
|
50
|
+
*/
|
|
51
|
+
children?: ComponentChildren;
|
|
46
52
|
}
|
|
53
|
+
export type ElementProps = Omit<SectionJSXProps, 'secondaryActions'>;
|
|
47
54
|
declare global {
|
|
48
55
|
interface HTMLElementTagNameMap {
|
|
49
|
-
[tagName]:
|
|
56
|
+
[tagName]: ElementProps;
|
|
50
57
|
}
|
|
51
58
|
}
|
|
52
59
|
declare module 'preact' {
|
|
53
60
|
namespace createElement.JSX {
|
|
54
61
|
interface IntrinsicElements {
|
|
55
|
-
[tagName]:
|
|
56
|
-
BaseElementPropsWithChildren<Omit<SectionJSXProps, 'secondaryActions'>>;
|
|
62
|
+
[tagName]: IntrinsicElementProps<ElementProps>;
|
|
57
63
|
}
|
|
58
64
|
}
|
|
59
65
|
}
|
|
@@ -10,6 +10,13 @@
|
|
|
10
10
|
/// <reference lib="DOM" />
|
|
11
11
|
import type {
|
|
12
12
|
StackProps,
|
|
13
|
+
SizeUnitsOrAuto,
|
|
14
|
+
SizeUnitsOrNone,
|
|
15
|
+
SizeUnits,
|
|
16
|
+
AlignItemsKeyword,
|
|
17
|
+
AlignContentKeyword,
|
|
18
|
+
SpacingKeyword,
|
|
19
|
+
JustifyContentKeyword,
|
|
13
20
|
SizeKeyword,
|
|
14
21
|
MaybeAllValuesShorthandProperty,
|
|
15
22
|
MaybeTwoValuesShorthandProperty,
|
|
@@ -33,11 +40,13 @@ export interface BaseElementPropsWithChildren<TClass = HTMLElement>
|
|
|
33
40
|
extends BaseElementProps<TClass> {
|
|
34
41
|
children?: ComponentChildren;
|
|
35
42
|
}
|
|
43
|
+
export type IntrinsicElementProps<T> = T & BaseElementPropsWithChildren<T>;
|
|
36
44
|
|
|
37
45
|
declare const tagName = 's-stack';
|
|
38
46
|
export type PaddingKeyword = SizeKeyword | 'none';
|
|
39
47
|
export type PickedProps = Pick<
|
|
40
48
|
StackProps,
|
|
49
|
+
| 'id'
|
|
41
50
|
| 'alignItems'
|
|
42
51
|
| 'alignContent'
|
|
43
52
|
| 'gap'
|
|
@@ -126,7 +135,6 @@ export interface StackJSXProps extends PickedProps {
|
|
|
126
135
|
* @default '' - meaning no override
|
|
127
136
|
*/
|
|
128
137
|
paddingInlineEnd?: PaddingKeyword | '';
|
|
129
|
-
children?: ComponentChildren;
|
|
130
138
|
/**
|
|
131
139
|
* Adjust the block size.
|
|
132
140
|
* **Mobile surfaces:** Avoid using percentage-based sizes. They do not behave as expected when placed within a scrollable container.
|
|
@@ -135,7 +143,7 @@ export interface StackJSXProps extends PickedProps {
|
|
|
135
143
|
*
|
|
136
144
|
* @default 'auto'
|
|
137
145
|
*/
|
|
138
|
-
blockSize?:
|
|
146
|
+
blockSize?: SizeUnitsOrAuto;
|
|
139
147
|
/**
|
|
140
148
|
* Adjust the maximum block size.
|
|
141
149
|
* **Mobile surfaces:** Avoid using percentage-based sizes. They do not behave as expected when placed within a scrollable container.
|
|
@@ -144,7 +152,7 @@ export interface StackJSXProps extends PickedProps {
|
|
|
144
152
|
*
|
|
145
153
|
* @default 'none'
|
|
146
154
|
*/
|
|
147
|
-
maxBlockSize?:
|
|
155
|
+
maxBlockSize?: SizeUnitsOrNone;
|
|
148
156
|
/**
|
|
149
157
|
* Adjust the maximum inline size.
|
|
150
158
|
* **Mobile surfaces:** Avoid using percentage-based sizes. They do not behave as expected when placed within a scrollable container.
|
|
@@ -153,7 +161,7 @@ export interface StackJSXProps extends PickedProps {
|
|
|
153
161
|
*
|
|
154
162
|
* @default 'none'
|
|
155
163
|
*/
|
|
156
|
-
maxInlineSize?:
|
|
164
|
+
maxInlineSize?: SizeUnitsOrNone;
|
|
157
165
|
/**
|
|
158
166
|
* Adjust the minimum block size.
|
|
159
167
|
* **Mobile surfaces:** Avoid using percentage-based sizes. They do not behave as expected when placed within a scrollable container.
|
|
@@ -162,7 +170,7 @@ export interface StackJSXProps extends PickedProps {
|
|
|
162
170
|
*
|
|
163
171
|
* @default '0'
|
|
164
172
|
*/
|
|
165
|
-
minBlockSize?:
|
|
173
|
+
minBlockSize?: SizeUnits;
|
|
166
174
|
/**
|
|
167
175
|
* Adjust the minimum inline size.
|
|
168
176
|
* **Mobile surfaces:** Avoid using percentage-based sizes. They do not behave as expected when placed within a scrollable container.
|
|
@@ -171,7 +179,59 @@ export interface StackJSXProps extends PickedProps {
|
|
|
171
179
|
*
|
|
172
180
|
* @default '0'
|
|
173
181
|
*/
|
|
174
|
-
minInlineSize?:
|
|
182
|
+
minInlineSize?: SizeUnits;
|
|
183
|
+
/**
|
|
184
|
+
* Aligns the Stack's children along the cross axis.
|
|
185
|
+
*/
|
|
186
|
+
alignItems?: AlignItemsKeyword;
|
|
187
|
+
/**
|
|
188
|
+
* Aligns the Stack along the cross axis.
|
|
189
|
+
*/
|
|
190
|
+
alignContent?: AlignContentKeyword;
|
|
191
|
+
/**
|
|
192
|
+
* Adjust spacing between elements.
|
|
193
|
+
* A single value applies to both axes. A pair of values (eg large-100 large-500) can be used to set the inline and block axes respectively.
|
|
194
|
+
*
|
|
195
|
+
* @default 'none'
|
|
196
|
+
*/
|
|
197
|
+
gap?: MaybeTwoValuesShorthandProperty<SpacingKeyword>;
|
|
198
|
+
/**
|
|
199
|
+
* Adjust spacing between elements in the inline axis. This overrides the column value of gap.
|
|
200
|
+
*
|
|
201
|
+
* @default '' - meaning no override
|
|
202
|
+
*/
|
|
203
|
+
columnGap?: SpacingKeyword | '';
|
|
204
|
+
/**
|
|
205
|
+
* Sets how the children are placed within the Stack. This uses logical properties.
|
|
206
|
+
*
|
|
207
|
+
* @default 'block'
|
|
208
|
+
* @implementation - the content will wrap if the direction is 'inline', and not wrap if the direction is 'block'
|
|
209
|
+
*/
|
|
210
|
+
direction?: 'block' | 'inline';
|
|
211
|
+
/**
|
|
212
|
+
* Adjust the inline size.
|
|
213
|
+
* @see — https://developer.mozilla.org/en-US/docs/Web/CSS/inline-size
|
|
214
|
+
*
|
|
215
|
+
* @default 'auto'
|
|
216
|
+
*/
|
|
217
|
+
inlineSize?: SizeUnitsOrAuto;
|
|
218
|
+
/**
|
|
219
|
+
* Aligns the Stack along the main axis.
|
|
220
|
+
* @see — https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content
|
|
221
|
+
*
|
|
222
|
+
* @default 'normal'
|
|
223
|
+
*/
|
|
224
|
+
justifyContent?: JustifyContentKeyword;
|
|
225
|
+
/**
|
|
226
|
+
* Adjust spacing between elements in the block axis. This overrides the row value of gap.
|
|
227
|
+
*
|
|
228
|
+
* @default '' - meaning no override
|
|
229
|
+
*/
|
|
230
|
+
rowGap?: SpacingKeyword | '';
|
|
231
|
+
/**
|
|
232
|
+
* The content of the Stack.
|
|
233
|
+
*/
|
|
234
|
+
children?: ComponentChildren;
|
|
175
235
|
}
|
|
176
236
|
declare global {
|
|
177
237
|
interface HTMLElementTagNameMap {
|
|
@@ -181,7 +241,7 @@ declare global {
|
|
|
181
241
|
declare module 'preact' {
|
|
182
242
|
namespace createElement.JSX {
|
|
183
243
|
interface IntrinsicElements {
|
|
184
|
-
[tagName]:
|
|
244
|
+
[tagName]: IntrinsicElementProps<StackJSXProps>;
|
|
185
245
|
}
|
|
186
246
|
}
|
|
187
247
|
}
|
|
@@ -26,15 +26,36 @@ export interface BaseElementPropsWithChildren<TClass = HTMLElement>
|
|
|
26
26
|
extends BaseElementProps<TClass> {
|
|
27
27
|
children?: ComponentChildren;
|
|
28
28
|
}
|
|
29
|
+
export type IntrinsicElementProps<T> = T & BaseElementPropsWithChildren<T>;
|
|
29
30
|
|
|
30
31
|
declare const tagName = 's-text';
|
|
31
|
-
export interface TextJSXProps extends Pick<TextProps, '
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
export interface TextJSXProps extends Pick<TextProps, 'id'> {
|
|
33
|
+
/**
|
|
34
|
+
* Modify the color to be more or less intense.
|
|
35
|
+
*
|
|
36
|
+
* @default 'base'
|
|
37
|
+
*/
|
|
38
|
+
color?: Extract<TextProps['color'], 'base' | 'strong' | 'subdued'>;
|
|
39
|
+
/**
|
|
40
|
+
* Provide semantic meaning and default styling to the text.
|
|
41
|
+
*
|
|
42
|
+
* Other presentation properties on Text override the default styling.
|
|
43
|
+
*
|
|
44
|
+
* @default 'generic'
|
|
45
|
+
*/
|
|
46
|
+
type?: Extract<TextProps['type'], 'generic' | 'strong' | 'small'>;
|
|
47
|
+
/**
|
|
48
|
+
* Sets the tone of the component, based on the intention of the information being conveyed.
|
|
49
|
+
*
|
|
50
|
+
* @default 'auto'
|
|
51
|
+
*/
|
|
34
52
|
tone?: Extract<
|
|
35
53
|
TextProps['tone'],
|
|
36
54
|
'auto' | 'neutral' | 'info' | 'success' | 'warning' | 'critical' | 'caution'
|
|
37
55
|
>;
|
|
56
|
+
/**
|
|
57
|
+
* The Text content. Supports nested text elements.
|
|
58
|
+
*/
|
|
38
59
|
children?: ComponentChildren;
|
|
39
60
|
}
|
|
40
61
|
declare global {
|
|
@@ -45,7 +66,7 @@ declare global {
|
|
|
45
66
|
declare module 'preact' {
|
|
46
67
|
namespace createElement.JSX {
|
|
47
68
|
interface IntrinsicElements {
|
|
48
|
-
[tagName]:
|
|
69
|
+
[tagName]: IntrinsicElementProps<TextJSXProps>;
|
|
49
70
|
}
|
|
50
71
|
}
|
|
51
72
|
}
|