@shopify/ui-extensions 2025.10.0-rc.45 → 2025.10.0-rc.47
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/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/ChoiceList.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/ChoiceList.d.ts +13 -4
- package/build/ts/surfaces/point-of-sale/components/Clickable.d.ts +11 -4
- package/build/ts/surfaces/point-of-sale/components/DateField/DateField.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/DateField.d.ts +20 -13
- package/build/ts/surfaces/point-of-sale/components/DatePicker/DatePicker.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/DatePicker.d.ts +16 -4
- package/build/ts/surfaces/point-of-sale/components/DateSpinner/DateSpinner.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/DateSpinner.d.ts +16 -4
- package/build/ts/surfaces/point-of-sale/components/Divider/Divider.doc.d.ts +4 -0
- package/build/ts/surfaces/point-of-sale/components/Divider/Divider.doc.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/components/Divider.d.ts +4 -3
- package/build/ts/surfaces/point-of-sale/components/EmailField/EmailField.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/EmailField.d.ts +22 -5
- 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/NumberField.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/NumberField.d.ts +32 -23
- package/build/ts/surfaces/point-of-sale/components/Page.d.ts +25 -11
- 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/SearchField.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/SearchField.d.ts +17 -5
- 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/TextArea.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/TextArea.d.ts +22 -5
- package/build/ts/surfaces/point-of-sale/components/TextField/TextField.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/TextField.d.ts +22 -5
- package/build/ts/surfaces/point-of-sale/components/Tile.d.ts +12 -2
- package/build/ts/surfaces/point-of-sale/components/TimeField/TimeField.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/TimeField.d.ts +18 -6
- package/build/ts/surfaces/point-of-sale/components/TimePicker/TimePicker.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/TimePicker.d.ts +16 -4
- package/build/ts/surfaces/point-of-sale/components/components-shared.d.ts +102 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +14 -3
- 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/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/examples/default.html +8 -8
- package/src/surfaces/point-of-sale/components/Banner.d.ts +12 -4
- package/src/surfaces/point-of-sale/components/Box/examples/default.html +2 -2
- package/src/surfaces/point-of-sale/components/Box.d.ts +51 -14
- package/src/surfaces/point-of-sale/components/Button/examples/default.html +2 -4
- 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/examples/default.html +5 -4
- package/src/surfaces/point-of-sale/components/ChoiceList/examples/event-handling.jsx +8 -0
- package/src/surfaces/point-of-sale/components/ChoiceList/examples/multiple-selection.jsx +9 -0
- package/src/surfaces/point-of-sale/components/ChoiceList.d.ts +13 -4
- package/src/surfaces/point-of-sale/components/Clickable/examples/default.html +5 -2
- package/src/surfaces/point-of-sale/components/Clickable.d.ts +11 -4
- package/src/surfaces/point-of-sale/components/DateField/examples/default.html +2 -10
- package/src/surfaces/point-of-sale/components/DateField/examples/event-handling.jsx +8 -0
- package/src/surfaces/point-of-sale/components/DateField.d.ts +20 -13
- package/src/surfaces/point-of-sale/components/DatePicker/examples/command-system.jsx +10 -0
- package/src/surfaces/point-of-sale/components/DatePicker/examples/default.html +4 -5
- package/src/surfaces/point-of-sale/components/DatePicker/examples/event-handling.jsx +7 -0
- package/src/surfaces/point-of-sale/components/DatePicker.d.ts +16 -4
- package/src/surfaces/point-of-sale/components/DateSpinner/examples/command-system.jsx +10 -0
- package/src/surfaces/point-of-sale/components/DateSpinner/examples/default.html +1 -2
- package/src/surfaces/point-of-sale/components/DateSpinner/examples/event-handling.jsx +7 -0
- package/src/surfaces/point-of-sale/components/DateSpinner.d.ts +16 -4
- package/src/surfaces/point-of-sale/components/Divider/examples/default.html +1 -0
- package/src/surfaces/point-of-sale/components/Divider.d.ts +4 -3
- package/src/surfaces/point-of-sale/components/EmailField/examples/accessory-slot.jsx +9 -0
- package/src/surfaces/point-of-sale/components/EmailField/examples/default.html +3 -10
- package/src/surfaces/point-of-sale/components/EmailField/examples/event-handling.jsx +8 -0
- package/src/surfaces/point-of-sale/components/EmailField.d.ts +22 -5
- package/src/surfaces/point-of-sale/components/Heading/examples/default.html +4 -5
- package/src/surfaces/point-of-sale/components/Heading.d.ts +7 -4
- package/src/surfaces/point-of-sale/components/Icon/examples/default.html +4 -1
- package/src/surfaces/point-of-sale/components/Icon.d.ts +13 -3
- package/src/surfaces/point-of-sale/components/Image/examples/default.html +1 -1
- package/src/surfaces/point-of-sale/components/Image.d.ts +12 -5
- package/src/surfaces/point-of-sale/components/Modal/examples/default.html +6 -8
- package/src/surfaces/point-of-sale/components/Modal.d.ts +28 -7
- package/src/surfaces/point-of-sale/components/NumberField/examples/controls-constraints.jsx +9 -0
- package/src/surfaces/point-of-sale/components/NumberField/examples/default.html +5 -2
- package/src/surfaces/point-of-sale/components/NumberField/examples/input-mode.jsx +15 -0
- package/src/surfaces/point-of-sale/components/NumberField.d.ts +32 -23
- package/src/surfaces/point-of-sale/components/Page/examples/default.html +3 -4
- package/src/surfaces/point-of-sale/components/Page.d.ts +25 -11
- package/src/surfaces/point-of-sale/components/PosBlock/examples/default.html +3 -9
- 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/examples/default.html +5 -4
- package/src/surfaces/point-of-sale/components/ScrollBox.d.ts +47 -15
- package/src/surfaces/point-of-sale/components/SearchField/examples/default.html +1 -1
- package/src/surfaces/point-of-sale/components/SearchField/examples/event-handling.jsx +8 -0
- package/src/surfaces/point-of-sale/components/SearchField.d.ts +17 -5
- package/src/surfaces/point-of-sale/components/Section/examples/default.html +6 -8
- package/src/surfaces/point-of-sale/components/Section.d.ts +15 -9
- package/src/surfaces/point-of-sale/components/Stack/examples/default.html +3 -3
- package/src/surfaces/point-of-sale/components/Stack.d.ts +67 -7
- package/src/surfaces/point-of-sale/components/Text/examples/default.html +3 -6
- package/src/surfaces/point-of-sale/components/Text.d.ts +25 -4
- package/src/surfaces/point-of-sale/components/TextArea/examples/accessory-slot.jsx +9 -0
- package/src/surfaces/point-of-sale/components/TextArea/examples/default.html +4 -1
- package/src/surfaces/point-of-sale/components/TextArea/examples/event-handling.jsx +8 -0
- package/src/surfaces/point-of-sale/components/TextArea/examples/rows-configuration.jsx +7 -0
- package/src/surfaces/point-of-sale/components/TextArea.d.ts +22 -5
- package/src/surfaces/point-of-sale/components/TextField/examples/accessory-slot.jsx +5 -0
- package/src/surfaces/point-of-sale/components/TextField/examples/common-props.jsx +11 -0
- package/src/surfaces/point-of-sale/components/TextField/examples/default.html +5 -3
- package/src/surfaces/point-of-sale/components/TextField/examples/event-handling.jsx +17 -0
- package/src/surfaces/point-of-sale/components/TextField.d.ts +22 -5
- package/src/surfaces/point-of-sale/components/Tile/examples/default.html +2 -5
- package/src/surfaces/point-of-sale/components/Tile.d.ts +12 -2
- package/src/surfaces/point-of-sale/components/TimeField/examples/default.html +1 -9
- package/src/surfaces/point-of-sale/components/TimeField/examples/event-handling.jsx +8 -0
- package/src/surfaces/point-of-sale/components/TimeField.d.ts +18 -6
- package/src/surfaces/point-of-sale/components/TimePicker/examples/command-system.jsx +10 -0
- package/src/surfaces/point-of-sale/components/TimePicker/examples/default.html +4 -1
- package/src/surfaces/point-of-sale/components/TimePicker/examples/event-handling.jsx +7 -0
- package/src/surfaces/point-of-sale/components/TimePicker.d.ts +16 -4
- package/src/surfaces/point-of-sale/components/components-shared.d.ts +102 -1
- package/src/surfaces/point-of-sale/components.d.ts +957 -472
- 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
|
@@ -26,9 +26,11 @@ 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-divider';
|
|
31
|
-
export interface DividerJSXProps
|
|
32
|
+
export interface DividerJSXProps
|
|
33
|
+
extends Pick<DividerProps, 'id' | 'direction'> {}
|
|
32
34
|
declare global {
|
|
33
35
|
interface HTMLElementTagNameMap {
|
|
34
36
|
[tagName]: DividerJSXProps;
|
|
@@ -37,8 +39,7 @@ declare global {
|
|
|
37
39
|
declare module 'preact' {
|
|
38
40
|
namespace createElement.JSX {
|
|
39
41
|
interface IntrinsicElements {
|
|
40
|
-
[tagName]: DividerJSXProps
|
|
41
|
-
BaseElementPropsWithChildren<DividerJSXProps>;
|
|
42
|
+
[tagName]: IntrinsicElementProps<DividerJSXProps>;
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
45
|
}
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
<s-email-field
|
|
2
|
-
label="Email"
|
|
3
|
-
|
|
2
|
+
label="Email"
|
|
3
|
+
value="snowdevil@shopify.com"
|
|
4
4
|
required
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
<s-email-field
|
|
8
|
-
label="Email"
|
|
9
|
-
placeholder="Enter your email"
|
|
10
|
-
required
|
|
11
|
-
error="Enter a valid email address"
|
|
12
|
-
value="example.com"></s-email-field>
|
|
5
|
+
/>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<s-email-field
|
|
2
|
+
label="Customer email"
|
|
3
|
+
placeholder="customer@example.com"
|
|
4
|
+
onInput={(event) => console.log('Input:', event.target.value)}
|
|
5
|
+
onChange={(event) => console.log('Change:', event.target.value)}
|
|
6
|
+
onFocus={(event) => console.log('Focus')}
|
|
7
|
+
onBlur={(event) => console.log('Blur')}
|
|
8
|
+
/>
|
|
@@ -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-email-field';
|
|
|
45
46
|
export interface EmailFieldJSXProps
|
|
46
47
|
extends Pick<
|
|
47
48
|
EmailFieldProps,
|
|
49
|
+
| 'id'
|
|
48
50
|
| 'label'
|
|
49
51
|
| 'value'
|
|
50
52
|
| 'placeholder'
|
|
@@ -54,22 +56,37 @@ export interface EmailFieldJSXProps
|
|
|
54
56
|
| 'maxLength'
|
|
55
57
|
| 'details'
|
|
56
58
|
> {
|
|
59
|
+
/**
|
|
60
|
+
* Callback when the user makes any changes in the field.
|
|
61
|
+
*/
|
|
57
62
|
onInput?: ((event: CallbackEvent<typeof tagName>) => void) | null;
|
|
58
|
-
|
|
59
|
-
|
|
63
|
+
/**
|
|
64
|
+
* Callback after editing completes (typically on blur).
|
|
65
|
+
*/
|
|
60
66
|
onChange?: ((event: CallbackEvent<typeof tagName>) => void) | null;
|
|
67
|
+
/**
|
|
68
|
+
* Callback when the element loses focus.
|
|
69
|
+
*/
|
|
70
|
+
onBlur?: ((event: CallbackEvent<typeof tagName>) => void) | null;
|
|
71
|
+
/**
|
|
72
|
+
* Callback when the element receives focus.
|
|
73
|
+
*/
|
|
74
|
+
onFocus?: ((event: CallbackEvent<typeof tagName>) => void) | null;
|
|
75
|
+
/**
|
|
76
|
+
* Additional content to be displayed in the field. Commonly used to display clickable text.
|
|
77
|
+
*/
|
|
61
78
|
accessory?: ComponentChild;
|
|
62
79
|
}
|
|
80
|
+
export type ElementProps = Omit<EmailFieldJSXProps, 'accessory'>;
|
|
63
81
|
declare global {
|
|
64
82
|
interface HTMLElementTagNameMap {
|
|
65
|
-
[tagName]:
|
|
83
|
+
[tagName]: ElementProps;
|
|
66
84
|
}
|
|
67
85
|
}
|
|
68
86
|
declare module 'preact' {
|
|
69
87
|
namespace createElement.JSX {
|
|
70
88
|
interface IntrinsicElements {
|
|
71
|
-
[tagName]:
|
|
72
|
-
BaseElementPropsWithChildren<Omit<EmailFieldJSXProps, 'accessory'>>;
|
|
89
|
+
[tagName]: IntrinsicElementProps<ElementProps>;
|
|
73
90
|
}
|
|
74
91
|
}
|
|
75
92
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
<s-heading>Heading (
|
|
2
|
-
|
|
1
|
+
<s-heading>Heading (H2)</s-heading>
|
|
3
2
|
<s-section>
|
|
4
|
-
<s-heading>Heading (
|
|
3
|
+
<s-heading>Heading (H3)</s-heading>
|
|
5
4
|
<s-section>
|
|
6
|
-
<s-heading>Heading (
|
|
5
|
+
<s-heading>Heading (H4)</s-heading>
|
|
7
6
|
</s-section>
|
|
8
|
-
</s-section>
|
|
7
|
+
</s-section>
|
|
@@ -8,7 +8,7 @@
|
|
|
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 {HeadingProps, Key, Ref} from './components-shared.d.ts';
|
|
12
12
|
|
|
13
13
|
export type ComponentChildren = any;
|
|
14
14
|
/**
|
|
@@ -26,9 +26,13 @@ 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-heading';
|
|
31
|
-
export interface HeadingJSXProps {
|
|
32
|
+
export interface HeadingJSXProps extends Pick<HeadingProps, 'id'> {
|
|
33
|
+
/**
|
|
34
|
+
* The content of the Heading.
|
|
35
|
+
*/
|
|
32
36
|
children?: ComponentChildren;
|
|
33
37
|
}
|
|
34
38
|
declare global {
|
|
@@ -39,8 +43,7 @@ declare global {
|
|
|
39
43
|
declare module 'preact' {
|
|
40
44
|
namespace createElement.JSX {
|
|
41
45
|
interface IntrinsicElements {
|
|
42
|
-
[tagName]: HeadingJSXProps
|
|
43
|
-
BaseElementPropsWithChildren<HeadingJSXProps>;
|
|
46
|
+
[tagName]: IntrinsicElementProps<HeadingJSXProps>;
|
|
44
47
|
}
|
|
45
48
|
}
|
|
46
49
|
}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
/// <reference lib="DOM" />
|
|
11
11
|
import type {IconProps, 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,6 +19,14 @@ 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-icon';
|
|
23
32
|
export type SupportedIconNames = Extract<
|
|
@@ -149,9 +158,10 @@ export type SupportedIconNames = Extract<
|
|
|
149
158
|
| 'x-circle'
|
|
150
159
|
>;
|
|
151
160
|
export interface IconJSXProps
|
|
152
|
-
extends Pick<IconProps, 'tone' | 'color' | 'size'> {
|
|
161
|
+
extends Pick<IconProps, 'id' | 'tone' | 'color' | 'size'> {
|
|
153
162
|
/**
|
|
154
|
-
* The type of icon to display.
|
|
163
|
+
* The type of icon to display.
|
|
164
|
+
*
|
|
155
165
|
* @default ''
|
|
156
166
|
*/
|
|
157
167
|
type?: SupportedIconNames;
|
|
@@ -164,7 +174,7 @@ declare global {
|
|
|
164
174
|
declare module 'preact' {
|
|
165
175
|
namespace createElement.JSX {
|
|
166
176
|
interface IntrinsicElements {
|
|
167
|
-
[tagName]:
|
|
177
|
+
[tagName]: IntrinsicElementProps<IconJSXProps>;
|
|
168
178
|
}
|
|
169
179
|
}
|
|
170
180
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<s-image src="example.png" inlineSize="auto"
|
|
1
|
+
<s-image src="example.png" inlineSize="auto" />
|
|
@@ -26,11 +26,10 @@ 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-image';
|
|
31
|
-
export
|
|
32
|
-
export interface ImageJSXProps extends PickedProps {
|
|
33
|
-
children?: ComponentChildren;
|
|
32
|
+
export interface ImageJSXProps extends Pick<ImageProps, 'id' | 'objectFit'> {
|
|
34
33
|
/**
|
|
35
34
|
* The displayed inline width of the image.
|
|
36
35
|
*
|
|
@@ -45,7 +44,15 @@ export interface ImageJSXProps extends PickedProps {
|
|
|
45
44
|
*
|
|
46
45
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#width
|
|
47
46
|
*/
|
|
48
|
-
inlineSize?:
|
|
47
|
+
inlineSize?: ImageProps['inlineSize'];
|
|
48
|
+
/**
|
|
49
|
+
* The image source, which should be a remote URL.
|
|
50
|
+
*
|
|
51
|
+
* When the image is loading or no `src` is provided, a placeholder will be rendered.
|
|
52
|
+
*
|
|
53
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#src
|
|
54
|
+
*/
|
|
55
|
+
src?: ImageProps['src'];
|
|
49
56
|
}
|
|
50
57
|
declare global {
|
|
51
58
|
interface HTMLElementTagNameMap {
|
|
@@ -55,7 +62,7 @@ declare global {
|
|
|
55
62
|
declare module 'preact' {
|
|
56
63
|
namespace createElement.JSX {
|
|
57
64
|
interface IntrinsicElements {
|
|
58
|
-
[tagName]:
|
|
65
|
+
[tagName]: IntrinsicElementProps<ImageJSXProps>;
|
|
59
66
|
}
|
|
60
67
|
}
|
|
61
68
|
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
<s-button command="--show" commandFor="modal">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
<s-button slot="primary-action"
|
|
7
|
-
Label
|
|
8
|
-
</s-button>
|
|
1
|
+
<s-button command="--show" commandFor="modal">
|
|
2
|
+
Open modal
|
|
3
|
+
</s-button>
|
|
4
|
+
<s-modal id="modal" heading="Changes could not be saved">
|
|
5
|
+
Please check your internet connection and try again.
|
|
6
|
+
<s-button slot="primary-action">OK</s-button>
|
|
9
7
|
</s-modal>
|
|
@@ -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
|
}
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
<s-number-field
|
|
2
|
-
|
|
1
|
+
<s-number-field
|
|
2
|
+
label="Item count"
|
|
3
|
+
value="976"
|
|
4
|
+
required
|
|
5
|
+
/>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<s-stack>
|
|
2
|
+
<s-number-field
|
|
3
|
+
label="Price"
|
|
4
|
+
placeholder="0.00"
|
|
5
|
+
inputMode="decimal"
|
|
6
|
+
onInput={(event) => console.log('Value:', event.target.value)}
|
|
7
|
+
/>
|
|
8
|
+
|
|
9
|
+
<s-number-field
|
|
10
|
+
label="Stock count"
|
|
11
|
+
placeholder="0"
|
|
12
|
+
inputMode="numeric"
|
|
13
|
+
onInput={(event) => console.log('Value:', event.target.value)}
|
|
14
|
+
/>
|
|
15
|
+
</s-stack>;
|
|
@@ -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;
|
|
@@ -42,9 +43,10 @@ export interface CallbackEvent<T extends keyof HTMLElementTagNameMap> {
|
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
declare const tagName = 's-number-field';
|
|
45
|
-
export interface
|
|
46
|
+
export interface NumberFieldJSXProps
|
|
46
47
|
extends Pick<
|
|
47
48
|
NumberFieldProps,
|
|
49
|
+
| 'id'
|
|
48
50
|
| 'label'
|
|
49
51
|
| 'details'
|
|
50
52
|
| 'value'
|
|
@@ -56,20 +58,12 @@ export interface PickedJSXProps
|
|
|
56
58
|
| 'min'
|
|
57
59
|
| 'controls'
|
|
58
60
|
> {
|
|
59
|
-
inputMode?: Extract<NumberFieldProps['inputMode'], 'decimal' | 'numeric'>;
|
|
60
|
-
onInput?: ((event: CallbackEvent<typeof tagName>) => void) | null;
|
|
61
|
-
onFocus?: ((event: CallbackEvent<typeof tagName>) => void) | null;
|
|
62
|
-
onBlur?: ((event: CallbackEvent<typeof tagName>) => void) | null;
|
|
63
|
-
onChange?: ((event: CallbackEvent<typeof tagName>) => void) | null;
|
|
64
|
-
accessory?: ComponentChild;
|
|
65
|
-
}
|
|
66
|
-
export interface NumberFieldJSXProps extends PickedJSXProps {
|
|
67
61
|
/**
|
|
68
62
|
* Content to use as the field label.
|
|
69
63
|
*
|
|
70
64
|
* Label is not supported when using Stepper controls
|
|
71
65
|
*/
|
|
72
|
-
label?:
|
|
66
|
+
label?: NumberFieldProps['label'];
|
|
73
67
|
/**
|
|
74
68
|
* Additional text to provide context or guidance for the field.
|
|
75
69
|
* This text is displayed along with the field and its label
|
|
@@ -79,7 +73,7 @@ export interface NumberFieldJSXProps extends PickedJSXProps {
|
|
|
79
73
|
*
|
|
80
74
|
* Details are not supported when using Stepper controls
|
|
81
75
|
*/
|
|
82
|
-
details?:
|
|
76
|
+
details?: NumberFieldProps['details'];
|
|
83
77
|
/**
|
|
84
78
|
* Whether the field needs a value. This requirement adds semantic value
|
|
85
79
|
* to the field, but it will not cause an error to appear automatically.
|
|
@@ -90,14 +84,14 @@ export interface NumberFieldJSXProps extends PickedJSXProps {
|
|
|
90
84
|
*
|
|
91
85
|
* Required is not supported when using Stepper controls
|
|
92
86
|
*/
|
|
93
|
-
required?:
|
|
87
|
+
required?: NumberFieldProps['required'];
|
|
94
88
|
/**
|
|
95
89
|
* Indicate an error to the user. The field will be given a specific stylistic treatment
|
|
96
90
|
* to communicate problems that have to be resolved immediately.
|
|
97
91
|
*
|
|
98
92
|
* Error is not supported when using Stepper controls
|
|
99
93
|
*/
|
|
100
|
-
error?:
|
|
94
|
+
error?: NumberFieldProps['error'];
|
|
101
95
|
/**
|
|
102
96
|
* Sets the virtual keyboard.
|
|
103
97
|
*
|
|
@@ -106,20 +100,19 @@ export interface NumberFieldJSXProps extends PickedJSXProps {
|
|
|
106
100
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode
|
|
107
101
|
* @default 'decimal'
|
|
108
102
|
*/
|
|
109
|
-
inputMode?:
|
|
103
|
+
inputMode?: NumberFieldProps['inputMode'];
|
|
110
104
|
/**
|
|
111
105
|
* A short hint that describes the expected value of the field.
|
|
112
106
|
*
|
|
113
107
|
* Placeholder text is not supported when using Stepper controls due to constrained space for the number field, especially on phones.
|
|
114
108
|
*/
|
|
115
|
-
placeholder?:
|
|
109
|
+
placeholder?: NumberFieldProps['placeholder'];
|
|
116
110
|
/**
|
|
117
|
-
*
|
|
118
|
-
* Commonly used to display an icon that activates a tooltip providing more information.
|
|
111
|
+
* Additional content to be displayed in the field. Commonly used to display clickable text.
|
|
119
112
|
*
|
|
120
|
-
* Accessory is not supported when using Stepper controls
|
|
113
|
+
* > Note: Accessory is not supported when using Stepper controls
|
|
121
114
|
*/
|
|
122
|
-
accessory?:
|
|
115
|
+
accessory?: ComponentChild;
|
|
123
116
|
/**
|
|
124
117
|
* Sets the type of controls displayed for the field.
|
|
125
118
|
*
|
|
@@ -130,18 +123,34 @@ export interface NumberFieldJSXProps extends PickedJSXProps {
|
|
|
130
123
|
* - `none`: no controls are displayed and users must input the value manually.
|
|
131
124
|
* - `auto`: the presence of the controls depends on the surface and context.
|
|
132
125
|
*/
|
|
133
|
-
controls?:
|
|
126
|
+
controls?: NumberFieldProps['controls'];
|
|
127
|
+
/**
|
|
128
|
+
* Callback when the user makes any changes in the field.
|
|
129
|
+
*/
|
|
130
|
+
onInput?: ((event: CallbackEvent<typeof tagName>) => void) | null;
|
|
131
|
+
/**
|
|
132
|
+
* Callback after editing completes (typically on blur).
|
|
133
|
+
*/
|
|
134
|
+
onChange?: ((event: CallbackEvent<typeof tagName>) => void) | null;
|
|
135
|
+
/**
|
|
136
|
+
* Callback when the element loses focus.
|
|
137
|
+
*/
|
|
138
|
+
onBlur?: ((event: CallbackEvent<typeof tagName>) => void) | null;
|
|
139
|
+
/**
|
|
140
|
+
* Callback when the element receives focus.
|
|
141
|
+
*/
|
|
142
|
+
onFocus?: ((event: CallbackEvent<typeof tagName>) => void) | null;
|
|
134
143
|
}
|
|
144
|
+
export type ElementProps = Omit<NumberFieldJSXProps, 'accessory'>;
|
|
135
145
|
declare global {
|
|
136
146
|
interface HTMLElementTagNameMap {
|
|
137
|
-
[tagName]:
|
|
147
|
+
[tagName]: ElementProps;
|
|
138
148
|
}
|
|
139
149
|
}
|
|
140
150
|
declare module 'preact' {
|
|
141
151
|
namespace createElement.JSX {
|
|
142
152
|
interface IntrinsicElements {
|
|
143
|
-
[tagName]:
|
|
144
|
-
BaseElementPropsWithChildren<Omit<NumberFieldJSXProps, 'accessory'>>;
|
|
153
|
+
[tagName]: IntrinsicElementProps<ElementProps>;
|
|
145
154
|
}
|
|
146
155
|
}
|
|
147
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
|
}
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
<s-pos-block>
|
|
2
|
-
<s-
|
|
3
|
-
|
|
4
|
-
onClick={onActionClick}
|
|
5
|
-
>
|
|
6
|
-
Action
|
|
7
|
-
</s-button>
|
|
8
|
-
<s-box padding="base">
|
|
9
|
-
<s-text>Label</s-text>
|
|
2
|
+
<s-box paddingBlock="base">
|
|
3
|
+
<s-text>Customer Loyalty</s-text>
|
|
10
4
|
</s-box>
|
|
11
|
-
</s-pos-block>
|
|
5
|
+
</s-pos-block>
|
|
@@ -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
|
}
|