PluginProbe ʕ •ᴥ•ʔ
SureCart – Ecommerce Made Easy For Selling Physical Products, Digital Downloads, Subscriptions, Donations, & Payments / 4.6.3
SureCart – Ecommerce Made Easy For Selling Physical Products, Digital Downloads, Subscriptions, Donations, & Payments v4.6.3
4.6.6 4.6.5 4.6.4 4.6.3 4.6.2 4.6.1 4.6.0 4.5.1 4.5.0 4.4.2 4.4.1 4.4.0 4.3.3 4.3.2 4.3.1 4.3.0 4.2.3 4.2.2 4.2.1 1.0.3 1.0.4 1.0.5 1.0.6 1.1.0 1.1.1 1.1.10 1.1.11 1.1.12 1.1.13 1.1.14 1.1.15 1.1.16 1.1.17 1.1.18 1.1.19 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.11.0 1.11.1 1.11.2 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.4.0 1.4.1 1.4.2 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.7.0 1.7.1 1.7.2 1.8.0 1.8.1 1.8.2 1.8.3 1.8.4 1.8.5 1.9.0 1.9.1 1.9.2 1.9.3 1.9.4 1.9.5 2.0.0 2.0.1 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.10.0 2.10.1 2.11.0 2.11.1 2.11.2 2.11.3 2.11.4 2.12.0 2.13.0 2.14.0 2.14.1 2.15.0 2.15.1 2.16.0 2.16.1 2.16.2 2.16.3 2.17.0 2.17.1 2.17.2 2.18.0 2.19.0 2.19.2 2.19.3 2.19.4 2.2.0 2.2.1 2.20.0 2.20.1 2.20.2 2.20.3 2.20.4 2.20.5 2.20.6 2.21.0 2.22.0 2.22.1 2.23.0 2.24.0 2.25.0 2.25.1 2.25.2 2.26.0 2.27.0 2.27.1 2.28.0 2.29.0 2.29.1 2.29.2 2.29.3 2.29.4 2.3.0 2.3.1 2.30.0 2.31.0 2.31.1 2.31.2 2.31.3 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.40.0 2.40.1 2.5.0 2.5.1 2.5.2 2.6.0 2.6.1 2.6.2 2.7.0 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.8.0 2.8.1 2.8.2 2.8.3 2.8.4 2.9.0 3.0.0 3.0.0-RC1 3.0.0-RC2 3.0.0-beta1 3.0.0-beta2 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.10.0 3.10.1 3.11.0 3.12.0 3.13.0 3.13.1 3.13.2 3.13.3 3.13.4 3.14.0 3.15.0 3.15.1 3.15.2 3.15.3 3.15.4 3.15.5 3.16.0 3.16.1 3.16.2 3.16.3 3.16.4 3.16.5 3.16.6 3.16.7 3.16.8 3.17.0 3.17.1 3.17.2 3.17.3 3.17.4 3.17.5 3.17.6 3.18.0 3.19.0 3.19.1 3.19.2 3.2.0 3.2.1 3.2.2 3.20.0 3.20.1 3.3.0 3.3.1 3.4.0 3.4.1 3.4.2 3.4.3 3.5.0 3.5.1 3.5.2 3.5.3 3.6.0 3.6.1 3.6.2 3.7.0 3.7.1 3.7.2 3.7.3 3.8.0 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.9.0 4.0.0 4.0.1 4.0.2 4.0.3 trunk 4.1.0 0.2.19.1 4.1.1 1.0.0 4.2.0 1.0.1 1.0.2
surecart / dist / components / esm / sc-button_6.entry.js
surecart / dist / components / esm Last commit date
MockProcessor-5c5e066a.js 2 months ago MockProcessor-5c5e066a.js.map 2 months ago add-query-args-0e2a8393.js 1 year ago add-query-args-0e2a8393.js.map 1 year ago address-b8e2e4c8.js 4 months ago address-b8e2e4c8.js.map 4 months ago animation-registry-de37bd7e.js 3 months ago animation-registry-de37bd7e.js.map 3 months ago app-globals-0eef0276.js 2 months ago app-globals-0eef0276.js.map 2 months ago consumer-f1775a76.js 2 months ago consumer-f1775a76.js.map 2 months ago currency-a0c9bff4.js 1 year ago currency-a0c9bff4.js.map 1 year ago error-c1bb15f2.js 1 month ago error-c1bb15f2.js.map 1 month ago fetch-cdff67be.js 1 month ago fetch-cdff67be.js.map 1 month ago floating-ui.dom.esm-8dce4ea1.js 6 months ago floating-ui.dom.esm-8dce4ea1.js.map 6 months ago form-data-76641f16.js 1 year ago form-data-76641f16.js.map 1 year ago functions-4f009ce1.js 3 months ago functions-4f009ce1.js.map 3 months ago geo-permission-62aea8ee.js 1 month ago geo-permission-62aea8ee.js.map 1 month ago getters-1049a6f8.js 2 months ago getters-1049a6f8.js.map 2 months ago getters-1477d792.js 2 months ago getters-1477d792.js.map 2 months ago getters-4bb6cc1b.js 2 months ago getters-4bb6cc1b.js.map 2 months ago getters-80f582ec.js 1 month ago getters-80f582ec.js.map 1 month ago getters-8ecca822.js 1 month ago getters-8ecca822.js.map 1 month ago google-a86aa761.js 1 year ago google-a86aa761.js.map 1 year ago google-ff13b5f8.js 1 month ago google-ff13b5f8.js.map 1 month ago google-maps-e8b00ffd.js 3 months ago google-maps-e8b00ffd.js.map 3 months ago index-17aac936.js 1 month ago index-17aac936.js.map 1 month ago index-18f5a1bc.js 2 months ago index-18f5a1bc.js.map 2 months ago index-25e5af33.js 2 months ago index-25e5af33.js.map 2 months ago index-824c562b.js 2 months ago index-824c562b.js.map 2 months ago index-86fa6913.js 1 month ago index-86fa6913.js.map 1 month ago index-871d88b8.js 1 year ago index-871d88b8.js.map 1 year ago index-c5a96d53.js 2 years ago index-c5a96d53.js.map 2 years ago index-d602bc13.js 1 month ago index-d602bc13.js.map 1 month ago index.js 1 month ago index.js.map 1 month ago inline-c012a0f9.js 1 year ago inline-c012a0f9.js.map 1 year ago lazy-deb42890.js 1 year ago lazy-deb42890.js.map 1 year ago library-1bd957d5.js 2 months ago library-1bd957d5.js.map 2 months ago loader.js 2 weeks ago loader.js.map 1 year ago media-d21119a3.js 1 year ago media-d21119a3.js.map 1 year ago mutations-017e8c92.js 1 month ago mutations-017e8c92.js.map 1 month ago mutations-7458343f.js 2 months ago mutations-7458343f.js.map 2 months ago mutations-96351e28.js 1 month ago mutations-96351e28.js.map 1 month ago mutations-c99167c2.js 1 month ago mutations-c99167c2.js.map 1 month ago page-align-0cdacf32.js 1 year ago page-align-0cdacf32.js.map 1 year ago price-1ff6aa07.js 4 months ago price-1ff6aa07.js.map 4 months ago pure-963214cb.js 1 year ago pure-963214cb.js.map 1 year ago quantity-5c986f3d.js 3 months ago quantity-5c986f3d.js.map 3 months ago razorpay-4c4a3d31.js 3 months ago razorpay-4c4a3d31.js.map 3 months ago remove-query-args-938c53ea.js 1 year ago remove-query-args-938c53ea.js.map 1 year ago sc-address_5.entry.js 2 weeks ago sc-address_5.entry.js.map 2 weeks ago sc-alert.entry.js 1 month ago sc-alert.entry.js.map 1 year ago sc-avatar_2.entry.js 1 month ago sc-avatar_2.entry.js.map 1 month ago sc-badge-notice.entry.js 1 month ago sc-badge-notice.entry.js.map 1 year ago sc-block-ui.entry.js 1 month ago sc-block-ui.entry.js.map 4 months ago sc-breadcrumb.entry.js 1 month ago sc-breadcrumb.entry.js.map 1 year ago sc-breadcrumbs.entry.js 1 month ago sc-breadcrumbs.entry.js.map 1 year ago sc-button-group.entry.js 1 month ago sc-button-group.entry.js.map 1 year ago sc-button_6.entry.js 1 month ago sc-button_6.entry.js.map 1 month ago sc-cancel-dialog_3.entry.js 1 month ago sc-cancel-dialog_3.entry.js.map 1 month ago sc-cancel-discount_4.entry.js 1 month ago sc-cancel-discount_4.entry.js.map 2 months ago sc-card_2.entry.js 1 month ago sc-card_2.entry.js.map 4 months ago sc-cart-button.entry.js 1 month ago sc-cart-button.entry.js.map 1 year ago sc-cart-form-submit.entry.js 2 months ago sc-cart-form-submit.entry.js.map 1 year ago sc-cart-form.entry.js 1 month ago sc-cart-form.entry.js.map 1 month ago sc-cart-header.entry.js 1 month ago sc-cart-header.entry.js.map 1 year ago sc-cart-icon.entry.js 1 month ago sc-cart-icon.entry.js.map 1 year ago sc-cart-loader.entry.js 1 month ago sc-cart-loader.entry.js.map 1 year ago sc-cart-session-provider_3.entry.js 1 month ago sc-cart-session-provider_3.entry.js.map 2 months ago sc-cart-submit.entry.js 2 months ago sc-cart-submit.entry.js.map 1 year ago sc-cart.entry.js 1 month ago sc-cart.entry.js.map 2 months ago sc-cc-logo_2.entry.js 1 month ago sc-cc-logo_2.entry.js.map 1 month ago sc-charges-list.entry.js 1 month ago sc-charges-list.entry.js.map 2 months ago sc-checkout-autofill-provider_11.entry.js 1 month ago sc-checkout-autofill-provider_11.entry.js.map 1 month ago sc-checkout-form-errors.entry.js 2 months ago sc-checkout-form-errors.entry.js.map 1 year ago sc-checkout-mollie-payment_3.entry.js 1 month ago sc-checkout-mollie-payment_3.entry.js.map 2 months ago sc-checkout-product-bundle-component-variants.entry.js 1 month ago sc-checkout-product-bundle-component-variants.entry.js.map 1 month ago sc-checkout-product-price-variant-selector.entry.js 3 weeks ago sc-checkout-product-price-variant-selector.entry.js.map 3 weeks ago sc-checkout.entry.js 1 month ago sc-checkout.entry.js.map 1 month ago sc-choice-container.entry.js 1 month ago sc-choice-container.entry.js.map 1 year ago sc-choice.entry.js 1 month ago sc-choice.entry.js.map 1 year ago sc-choices.entry.js 1 month ago sc-choices.entry.js.map 1 year ago sc-column_2.entry.js 1 month ago sc-column_2.entry.js.map 1 month ago sc-compact-address_18.entry.js 1 month ago sc-compact-address_18.entry.js.map 1 month ago sc-conditional-form.entry.js 1 month ago sc-conditional-form.entry.js.map 2 months ago sc-consumer.entry.js 2 months ago sc-consumer.entry.js.map 1 year ago sc-coupon-form.entry.js 1 month ago sc-coupon-form.entry.js.map 5 months ago sc-custom-order-price-input.entry.js 1 month ago sc-custom-order-price-input.entry.js.map 2 months ago sc-customer-details.entry.js 1 month ago sc-customer-details.entry.js.map 7 months ago sc-customer-edit.entry.js 1 month ago sc-customer-edit.entry.js.map 2 months ago sc-customer-email.entry.js 1 month ago sc-customer-email.entry.js.map 1 month ago sc-customer-firstname.entry.js 1 month ago sc-customer-firstname.entry.js.map 2 months ago sc-customer-lastname.entry.js 1 month ago sc-customer-lastname.entry.js.map 2 months ago sc-customer-name.entry.js 1 month ago sc-customer-name.entry.js.map 2 months ago sc-dashboard-customer-details.entry.js 1 month ago sc-dashboard-customer-details.entry.js.map 2 months ago sc-dashboard-downloads-list.entry.js 1 month ago sc-dashboard-downloads-list.entry.js.map 2 months ago sc-dialog.entry.js 1 month ago sc-dialog.entry.js.map 4 months ago sc-divider.entry.js 1 month ago sc-divider.entry.js.map 1 year ago sc-donation-choices.entry.js 2 months ago sc-donation-choices.entry.js.map 1 year ago sc-downloads-list.entry.js 1 month ago sc-downloads-list.entry.js.map 1 month ago sc-dropdown_3.entry.js 1 month ago sc-dropdown_3.entry.js.map 6 months ago sc-empty_3.entry.js 1 month ago sc-empty_3.entry.js.map 4 months ago sc-express-payment.entry.js 1 month ago sc-express-payment.entry.js.map 3 months ago sc-feature-demo-banner.entry.js 1 month ago sc-feature-demo-banner.entry.js.map 1 year ago sc-flex.entry.js 1 month ago sc-flex.entry.js.map 1 year ago sc-form-control_2.entry.js 1 month ago sc-form-control_2.entry.js.map 2 months ago sc-form-row.entry.js 1 month ago sc-form-row.entry.js.map 1 year ago sc-form.entry.js 1 month ago sc-form.entry.js.map 1 year ago sc-format-bytes.entry.js 2 months ago sc-format-bytes.entry.js.map 1 year ago sc-format-interval.entry.js 2 months ago sc-format-interval.entry.js.map 1 year ago sc-format-number.entry.js 2 months ago sc-format-number.entry.js.map 1 year ago sc-fulfillment-shipping-status-badge.entry.js 2 months ago sc-fulfillment-shipping-status-badge.entry.js.map 4 months ago sc-fulfillments.entry.js 1 month ago sc-fulfillments.entry.js.map 2 months ago sc-heading_2.entry.js 1 month ago sc-heading_2.entry.js.map 1 year ago sc-image-slider.entry.js 1 month ago sc-image-slider.entry.js.map 1 month ago sc-invoice-status-badge.entry.js 1 month ago sc-invoice-status-badge.entry.js.map 4 months ago sc-invoices-list.entry.js 1 month ago sc-invoices-list.entry.js.map 2 months ago sc-license.entry.js 1 month ago sc-license.entry.js.map 2 months ago sc-licenses-list.entry.js 1 month ago sc-licenses-list.entry.js.map 1 month ago sc-line-item-bump.entry.js 1 month ago sc-line-item-bump.entry.js.map 1 year ago sc-line-item-total.entry.js 1 month ago sc-line-item-total.entry.js.map 6 months ago sc-line-item.entry.js 1 month ago sc-line-item.entry.js.map 1 year ago sc-line-items-provider.entry.js 1 month ago sc-line-items-provider.entry.js.map 1 year ago sc-line-items.entry.js 1 month ago sc-line-items.entry.js.map 1 month ago sc-login-form.entry.js 1 month ago sc-login-form.entry.js.map 2 months ago sc-manual-payment-method_3.entry.js 1 month ago sc-manual-payment-method_3.entry.js.map 3 months ago sc-menu-divider.entry.js 1 month ago sc-menu-divider.entry.js.map 1 year ago sc-menu-label_2.entry.js 1 month ago sc-menu-label_2.entry.js.map 1 month ago sc-mollie-add-method.entry.js 1 month ago sc-mollie-add-method.entry.js.map 2 months ago sc-order-confirmation-customer.entry.js 2 months ago sc-order-confirmation-customer.entry.js.map 1 year ago sc-order-confirmation-details.entry.js 2 months ago sc-order-confirmation-details.entry.js.map 11 months ago sc-order-confirmation-line-items_2.entry.js 1 month ago sc-order-confirmation-line-items_2.entry.js.map 1 month ago sc-order-confirmation.entry.js 1 month ago sc-order-confirmation.entry.js.map 2 months ago sc-order-coupon-form.entry.js 1 month ago sc-order-coupon-form.entry.js.map 2 months ago sc-order-detail.entry.js 2 months ago sc-order-detail.entry.js.map 1 year ago sc-order-fulfillment-badge.entry.js 1 month ago sc-order-fulfillment-badge.entry.js.map 4 months ago sc-order-manual-instructions.entry.js 2 months ago sc-order-manual-instructions.entry.js.map 1 year ago sc-order-password.entry.js 2 months ago sc-order-password.entry.js.map 1 year ago sc-order-return-badge.entry.js 1 month ago sc-order-return-badge.entry.js.map 4 months ago sc-order-shipment-badge.entry.js 2 months ago sc-order-shipment-badge.entry.js.map 4 months ago sc-order-status-badge.entry.js 1 month ago sc-order-status-badge.entry.js.map 4 months ago sc-order-submit.entry.js 1 month ago sc-order-submit.entry.js.map 2 months ago sc-order-summary.entry.js 1 month ago sc-order-summary.entry.js.map 1 month ago sc-order.entry.js 1 month ago sc-order.entry.js.map 1 month ago sc-orders-list.entry.js 1 month ago sc-orders-list.entry.js.map 1 month ago sc-pagination.entry.js 2 months ago sc-pagination.entry.js.map 1 year ago sc-password-nag.entry.js 1 month ago sc-password-nag.entry.js.map 2 months ago sc-password.entry.js 1 month ago sc-password.entry.js.map 1 month ago sc-payment-method-choice_2.entry.js 1 month ago sc-payment-method-choice_2.entry.js.map 1 year ago sc-payment-method-details.entry.js 1 month ago sc-payment-method-details.entry.js.map 1 year ago sc-payment-methods-list.entry.js 1 month ago sc-payment-methods-list.entry.js.map 2 months ago sc-payment.entry.js 1 month ago sc-payment.entry.js.map 3 months ago sc-paypal-add-method.entry.js 1 month ago sc-paypal-add-method.entry.js.map 2 months ago sc-paypal-buttons_2.entry.js 1 month ago sc-paypal-buttons_2.entry.js.map 2 months ago sc-paystack-add-method.entry.js 1 month ago sc-paystack-add-method.entry.js.map 2 months ago sc-pill-option.entry.js 1 month ago sc-pill-option.entry.js.map 1 year ago sc-popover.entry.js 1 month ago sc-popover.entry.js.map 6 months ago sc-premium-tag.entry.js 1 month ago sc-premium-tag.entry.js.map 1 year ago sc-price-choice-container.entry.js 1 month ago sc-price-choice-container.entry.js.map 1 month ago sc-price-choice.entry.js 1 month ago sc-price-choice.entry.js.map 2 months ago sc-price-choices.entry.js 1 month ago sc-price-choices.entry.js.map 1 year ago sc-price-input.entry.js 1 month ago sc-price-input.entry.js.map 1 year ago sc-price-range_4.entry.js 1 month ago sc-price-range_4.entry.js.map 1 year ago sc-price.entry.js 2 months ago sc-price.entry.js.map 11 months ago sc-product-buy-button.entry.js 1 month ago sc-product-buy-button.entry.js.map 2 months ago sc-product-donation-amount-choice.entry.js 1 month ago sc-product-donation-amount-choice.entry.js.map 2 months ago sc-product-donation-choices.entry.js 1 month ago sc-product-donation-choices.entry.js.map 2 months ago sc-product-donation-custom-amount.entry.js 1 month ago sc-product-donation-custom-amount.entry.js.map 2 months ago sc-product-item-list.entry.js 1 month ago sc-product-item-list.entry.js.map 2 months ago sc-product-item.entry.js 1 month ago sc-product-item.entry.js.map 1 year ago sc-product-pills-variant-option.entry.js 1 month ago sc-product-pills-variant-option.entry.js.map 1 year ago sc-product-price-choices.entry.js 1 month ago sc-product-price-choices.entry.js.map 1 year ago sc-product-price-modal.entry.js 1 month ago sc-product-price-modal.entry.js.map 2 months ago sc-product-price.entry.js 1 month ago sc-product-price.entry.js.map 2 months ago sc-product-quantity.entry.js 1 month ago sc-product-quantity.entry.js.map 1 year ago sc-product-selected-price.entry.js 1 month ago sc-product-selected-price.entry.js.map 2 months ago sc-product-text.entry.js 1 month ago sc-product-text.entry.js.map 1 year ago sc-provider.entry.js 2 months ago sc-provider.entry.js.map 1 year ago sc-provisional-banner.entry.js 1 month ago sc-provisional-banner.entry.js.map 11 months ago sc-purchase-downloads-list.entry.js 1 month ago sc-purchase-downloads-list.entry.js.map 1 month ago sc-razorpay-add-method.entry.js 1 month ago sc-razorpay-add-method.entry.js.map 2 months ago sc-recurring-price-choice-container.entry.js 2 months ago sc-recurring-price-choice-container.entry.js.map 1 year ago sc-review-stars.entry.js 2 months ago sc-review-stars.entry.js.map 5 months ago sc-rich-text.entry.js 1 month ago sc-rich-text.entry.js.map 1 month ago sc-skeleton.entry.js 1 month ago sc-skeleton.entry.js.map 1 year ago sc-spacing.entry.js 1 month ago sc-spacing.entry.js.map 1 year ago sc-stripe-add-method.entry.js 1 month ago sc-stripe-add-method.entry.js.map 2 months ago sc-stripe-element.entry.js 1 month ago sc-stripe-element.entry.js.map 2 months ago sc-stripe-payment-element.entry.js 1 month ago sc-stripe-payment-element.entry.js.map 2 months ago sc-stripe-payment-request.entry.js 1 month ago sc-stripe-payment-request.entry.js.map 2 months ago sc-subscription-ad-hoc-confirm.entry.js 1 month ago sc-subscription-ad-hoc-confirm.entry.js.map 6 months ago sc-subscription-details_2.entry.js 1 month ago sc-subscription-details_2.entry.js.map 1 month ago sc-subscription-payment-method.entry.js 1 month ago sc-subscription-payment-method.entry.js.map 2 months ago sc-subscription-payment.entry.js 1 month ago sc-subscription-payment.entry.js.map 2 months ago sc-subscription-switch.entry.js 1 month ago sc-subscription-switch.entry.js.map 2 months ago sc-subscription-variation-confirm.entry.js 1 month ago sc-subscription-variation-confirm.entry.js.map 1 year ago sc-subscription.entry.js 1 month ago sc-subscription.entry.js.map 1 month ago sc-subscriptions-list.entry.js 1 month ago sc-subscriptions-list.entry.js.map 2 months ago sc-summary.entry.js 1 month ago sc-summary.entry.js.map 1 year ago sc-swap.entry.js 1 month ago sc-swap.entry.js.map 2 months ago sc-switch.entry.js 1 month ago sc-switch.entry.js.map 7 months ago sc-tab-group.entry.js 1 month ago sc-tab-group.entry.js.map 1 year ago sc-tab-panel.entry.js 1 month ago sc-tab-panel.entry.js.map 1 year ago sc-tab.entry.js 1 month ago sc-tab.entry.js.map 1 year ago sc-table-head.entry.js 1 month ago sc-table-head.entry.js.map 1 year ago sc-table_3.entry.js 1 month ago sc-table_3.entry.js.map 10 months ago sc-tag.entry.js 1 month ago sc-tag.entry.js.map 4 months ago sc-test-mode-info.entry.js 1 month ago sc-test-mode-info.entry.js.map 6 months ago sc-text.entry.js 1 month ago sc-text.entry.js.map 1 year ago sc-toggle.entry.js 1 month ago sc-toggle.entry.js.map 1 year ago sc-toggles.entry.js 1 month ago sc-toggles.entry.js.map 1 year ago sc-total.entry.js 1 month ago sc-total.entry.js.map 1 year ago sc-upcoming-invoice.entry.js 1 month ago sc-upcoming-invoice.entry.js.map 2 months ago sc-upgrade-required.entry.js 2 months ago sc-upgrade-required.entry.js.map 1 year ago sc-upsell-countdown-timer.entry.js 1 month ago sc-upsell-countdown-timer.entry.js.map 1 year ago sc-upsell-no-thanks-button.entry.js 1 month ago sc-upsell-no-thanks-button.entry.js.map 2 months ago sc-upsell-submit-button.entry.js 1 month ago sc-upsell-submit-button.entry.js.map 2 months ago sc-upsell-totals.entry.js 1 month ago sc-upsell-totals.entry.js.map 2 months ago sc-upsell.entry.js 1 month ago sc-upsell.entry.js.map 2 months ago sc-verification-code.entry.js 1 month ago sc-verification-code.entry.js.map 2 months ago sc-visually-hidden.entry.js 1 month ago sc-visually-hidden.entry.js.map 1 year ago sc-wordpress-password-edit.entry.js 1 month ago sc-wordpress-password-edit.entry.js.map 2 months ago sc-wordpress-user-edit.entry.js 1 month ago sc-wordpress-user-edit.entry.js.map 2 months ago sc-wordpress-user.entry.js 1 month ago sc-wordpress-user.entry.js.map 1 year ago store-289e460c.js 2 months ago store-289e460c.js.map 2 months ago store-ac90a769.js 1 month ago store-ac90a769.js.map 1 month ago store-b1758b00.js 2 months ago store-b1758b00.js.map 2 months ago surecart.js 2 weeks ago surecart.js.map 1 year ago tax-a03623ca.js 1 year ago tax-a03623ca.js.map 1 year ago universe-7bd0ac2b.js 2 months ago universe-7bd0ac2b.js.map 2 months ago util-dfbf863e.js 2 months ago util-dfbf863e.js.map 2 months ago utils-f84b2118.js 3 months ago utils-f84b2118.js.map 3 months ago verification-00df9439.js 1 month ago verification-00df9439.js.map 1 month ago watchers-17c3cde1.js 1 month ago watchers-17c3cde1.js.map 1 month ago watchers-35242771.js 1 month ago watchers-35242771.js.map 1 month ago watchers-76068961.js 1 month ago watchers-76068961.js.map 1 month ago watchers-ba73ceab.js 1 month ago watchers-ba73ceab.js.map 1 month ago watchers-c7bbc6b2.js 2 months ago watchers-c7bbc6b2.js.map 2 months ago
sc-button_6.entry.js
525 lines
1 import { r as registerInstance, c as createEvent, h, F as Fragment, a as getElement } from './index-25e5af33.js';
2 import { i as isRtl } from './page-align-0cdacf32.js';
3 import { w as watchIcon, u as unwatchIcon, g as getIconLibrary } from './library-1bd957d5.js';
4 import { g as getBundleComponentRowsFromLineItems } from './index-17aac936.js';
5 import { s as speak } from './index-c5a96d53.js';
6
7 const scButtonCss = ":host{display:inline-block;width:auto;cursor:pointer;--primary-color:var(--sc-color-primary-text);--primary-background:var(--sc-color-primary-500)}:host([full]){display:block}::slotted(*){pointer-events:none}.button{box-sizing:border-box;z-index:10;display:inline-flex;align-items:stretch;justify-content:center;width:100%;border-style:solid;border-width:var(--sc-input-border-width);font-family:var(--sc-input-font-family);font-weight:var(--sc-font-weight-semibold);text-decoration:none;user-select:none;white-space:nowrap;vertical-align:middle;padding:0;transition:var(--sc-input-transition, var(--sc-transition-medium)) background-color, var(--sc-input-transition, var(--sc-transition-medium)) color, var(--sc-input-transition, var(--sc-transition-medium)) border, var(--sc-input-transition, var(--sc-transition-medium)) box-shadow, var(--sc-input-transition, var(--sc-transition-medium)) opacity;cursor:inherit}.button::-moz-focus-inner{border:0}.button:focus{outline:none}.button:focus-visible{box-shadow:0 0 0 var(--sc-focus-ring-width) var(--sc-focus-ring-color-primary)}.button.button--disabled{cursor:not-allowed}.button.button--disabled *{pointer-events:none}.button.button--disabled .button__label,.button.button--disabled .button__suffix,.button.button--disabled .button__prefix{opacity:0.5}.button ::slotted(.sc--icon){pointer-events:none}.button__prefix,.button__suffix{flex:0 0 auto;display:flex;align-items:center}.button__label{display:flex;align-items:center}.button__label ::slotted(sc-icon){vertical-align:-2px}.button:not(.button--text):not(.button--link){box-shadow:var(--sc-shadow-small)}.button.button--standard.button--default{background-color:var(--sc-button-default-background-color, var(--sc-color-white));border-color:var(--sc-button-default-border-color, var(--sc-color-gray-300));color:var(--sc-button-default-color, var(--sc-color-gray-600))}.button.button--standard.button--default:hover:not(.button--disabled){background-color:var(--sc-button-default-hover-background-color, var(--sc-color-white));border-color:var(--sc-button-default-focus-border-color, var(--primary-background));color:var(--primary-background)}.button.button--standard.button--default:focus:not(.button--disabled){background-color:var(--sc-button-default-focus-background-color, var(--sc-color-white));border-color:var(--sc-button-default-focus-border-color, var(--sc-color-white));color:var(--primary-background);box-shadow:0 0 0 var(--sc-focus-ring-width) var(--sc-focus-ring-color-primary)}.button.button--standard.button--default:active:not(.button--disabled){background-color:var(--sc-button-default-active-background-color, var(--sc-color-white));border-color:var(--sc-button-default-active-border-color, var(--sc-color-white));color:var(--primary-background)}.button.button--standard.button--primary{background-color:var(--primary-background);border-color:var(--primary-background);color:var(--primary-color)}.button.button--standard.button--primary:hover:not(.button--disabled){opacity:0.8}.button.button--standard.button--primary:focus:not(.button--disabled){opacity:0.8;color:var(--primary-color);border-color:var(--sc-color-white);box-shadow:0 0 0 var(--sc-focus-ring-width) var(--sc-focus-ring-color-primary)}.button.button--standard.button--primary:active:not(.button--disabled){background-color:var(--primary-background);border-color:var(--sc-color-white);color:var(--primary-color)}.button.button--standard.button--success{background-color:var(--sc-color-success-500);border-color:var(--sc-color-success-500);color:var(--sc-color-success-text)}.button.button--standard.button--success:hover:not(.button--disabled){background-color:var(--sc-color-success-400);border-color:var(--sc-color-success-400);color:var(--sc-color-success-text)}.button.button--standard.button--success:focus:not(.button--disabled){background-color:var(--sc-color-success-400);border-color:var(--sc-color-success-400);color:var(--sc-color-success-text);box-shadow:0 0 0 var(--sc-focus-ring-width) var(--sc-focus-ring-color-success)}.button.button--standard.button--success:active:not(.button--disabled){background-color:var(--sc-color-success-500);border-color:var(--sc-color-success-500);color:var(--sc-color-success-text)}.button.button--standard.button--info{background-color:var(--sc-color-info-500);border-color:var(--sc-color-info-500);color:var(--sc-color-info-text)}.button.button--standard.button--info:hover:not(.button--disabled){background-color:var(--sc-color-info-400);border-color:var(--sc-color-info-400);color:var(--sc-color-info-text)}.button.button--standard.button--info:focus:not(.button--disabled){background-color:var(--sc-color-info-400);border-color:var(--sc-color-info-400);color:var(--sc-color-info-text);box-shadow:0 0 0 var(--sc-focus-ring-width) var(--sc-focus-ring-color-info)}.button.button--standard.button--info:active:not(.button--disabled){background-color:var(--sc-color-info-500);border-color:var(--sc-color-info-500);color:var(--sc-color-info-text)}.button.button--standard.button--warning{background-color:var(--sc-color-warning-500);border-color:var(--sc-color-warning-500);color:var(--sc-color-warning-text)}.button.button--standard.button--warning:hover:not(.button--disabled){background-color:var(--sc-color-warning-400);border-color:var(--sc-color-warning-400);color:var(--sc-color-warning-text)}.button.button--standard.button--warning:focus:not(.button--disabled){background-color:var(--sc-color-warning-400);border-color:var(--sc-color-warning-400);color:var(--sc-color-warning-text);box-shadow:0 0 0 var(--sc-focus-ring-width) var(--sc-focus-ring-color-warning)}.button.button--standard.button--warning:active:not(.button--disabled){background-color:var(--sc-color-warning-500);border-color:var(--sc-color-warning-500);color:var(--sc-color-warning-text)}.button.button--standard.button--danger{background-color:var(--sc-color-danger-500);border-color:var(--sc-color-danger-500);color:var(--sc-color-danger-text)}.button.button--standard.button--danger:hover:not(.button--disabled){background-color:var(--sc-color-danger-400);border-color:var(--sc-color-danger-400);color:var(--sc-color-danger-text)}.button.button--standard.button--danger:focus:not(.button--disabled){background-color:var(--sc-color-danger-400);border-color:var(--sc-color-danger-400);color:var(--sc-color-danger-text);box-shadow:0 0 0 var(--sc-focus-ring-width) var(--sc-focus-ring-color-danger)}.button.button--standard.button--danger:active:not(.button--disabled){background-color:var(--sc-color-danger-500);border-color:var(--sc-color-danger-500);color:var(--sc-color-danger-text)}.button--outline{background:none;border:solid 1px}.button--outline.button--default{border-color:var(--sc-color-gray-300);color:var(--sc-color-gray-700)}.button--outline.button--default:hover:not(.button--disabled){border-color:var(--primary-background);background-color:var(--primary-background);color:var(--sc-color-white)}.button--outline.button--default:focus:not(.button--disabled){border-color:var(--primary-background);box-shadow:0 0 0 var(--sc-focus-ring-width) var(--primary-background)/var(--sc-focus-ring-alpha)}.button--outline.button--default:active:not(.button--disabled){opacity:0.8;color:var(--sc-color-white)}.button--outline.button--primary{border-color:var(--primary-background);color:var(--primary-background)}.button--outline.button--primary:hover:not(.button--disabled){background-color:var(--primary-background);opacity:0.8;color:var(--sc-color-white)}.button--outline.button--primary:focus:not(.button--disabled){border-color:var(--primary-background);box-shadow:0 0 0 var(--sc-focus-ring-width) var(--primary-background)/var(--sc-focus-ring-alpha)}.button--outline.button--primary:active:not(.button--disabled){border-color:var(--primary-background);background-color:var(--primary-background);opacity:0.9;color:var(--sc-color-white)}.button--outline.button--success{border-color:var(--sc-color-success-500);color:var(--sc-color-success-500)}.button--outline.button--success:hover:not(.button--disabled){background-color:var(--sc-color-success-500);color:var(--sc-color-white)}.button--outline.button--success:focus:not(.button--disabled){border-color:var(--sc-color-success-500);box-shadow:0 0 0 var(--sc-focus-ring-width) var(--sc-color-success-500)/var(--sc-focus-ring-alpha)}.button--outline.button--success:active:not(.button--disabled){border-color:var(--sc-color-success-700);background-color:var(--sc-color-success-700);color:var(--sc-color-white)}.button--outline.button--info{border-color:var(--sc-color-gray-500);color:var(--sc-color-gray-500)}.button--outline.button--info:hover:not(.button--disabled){background-color:var(--sc-color-gray-500);color:var(--sc-color-white)}.button--outline.button--info:focus:not(.button--disabled){border-color:var(--sc-color-gray-500);box-shadow:0 0 0 var(--sc-focus-ring-width) var(--sc-color-gray-500)/var(--sc-focus-ring-alpha)}.button--outline.button--info:active:not(.button--disabled){border-color:var(--sc-color-gray-700);background-color:var(--sc-color-gray-700);color:var(--sc-color-white)}.button--outline.button--warning{border-color:var(--sc-color-warning-500);color:var(--sc-color-warning-500)}.button--outline.button--warning:hover:not(.button--disabled){background-color:var(--sc-color-warning-500);color:var(--sc-color-white)}.button--outline.button--warning:focus:not(.button--disabled){border-color:var(--sc-color-warning-500);box-shadow:0 0 0 var(--sc-focus-ring-width) var(--sc-color-warning-500)/var(--sc-focus-ring-alpha)}.button--outline.button--warning:active:not(.button--disabled){border-color:var(--sc-color-warning-700);background-color:var(--sc-color-warning-700);color:var(--sc-color-white)}.button--outline.button--danger{border-color:var(--sc-color-danger-500);color:var(--sc-color-danger-500)}.button--outline.button--danger:hover:not(.button--disabled){background-color:var(--sc-color-danger-500);color:var(--sc-color-white)}.button--outline.button--danger:focus:not(.button--disabled){border-color:var(--sc-color-danger-500);box-shadow:0 0 0 var(--sc-focus-ring-width) var(--sc-color-danger-500)/var(--sc-focus-ring-alpha)}.button--outline.button--danger:active:not(.button--disabled){border-color:var(--sc-color-danger-700);background-color:var(--sc-color-danger-700);color:var(--sc-color-white)}.button--text{background-color:transparent;border-color:transparent;color:inherit}.button--text:hover:not(.button--disabled){background-color:transparent;border-color:transparent;color:var(--sc-color-gray-600)}.button--text:focus:not(.button--disabled){background-color:transparent;border-color:transparent;box-shadow:0}.button--text:active:not(.button--disabled){background-color:transparent;border-color:transparent;box-shadow:0}.button--text.button--caret.button--has-label{padding-right:var(--sc-spacing-xx-small)}.button--text.button--caret.button--has-label .button__label{padding:0 var(--sc-spacing-xx-small) !important}.button--link{background-color:transparent;border-color:transparent;box-shadow:none;color:var(--sc-button-link-color, var(--primary-background));transition:opacity var(--sc-input-transition, var(--sc-transition-medium)) ease;text-decoration:var(--sc-button-link-text-decoration, none)}.button--link.button--has-label.button--small .button__label,.button--link.button--has-label.button--medium .button__label,.button--link.button--has-label.button--large .button__label{padding:0}.button--link:hover:not(.button--disabled){background-color:transparent;border-color:transparent;opacity:0.75}.button--link:focus:not(.button--disabled){background-color:transparent;border-color:transparent}.button--link:active:not(.button--disabled){background-color:transparent;border-color:transparent}.button--link.button--has-prefix:not(.button--text).button--small,.button--link.button--has-prefix:not(.button--text).button--medium,.button--link.button--has-prefix:not(.button--text).button--large{padding-left:0}.button--link.button--has-prefix:not(.button--text).button--small .button__label,.button--link.button--has-prefix:not(.button--text).button--medium .button__label,.button--link.button--has-prefix:not(.button--text).button--large .button__label{padding-left:var(--sc-spacing-xx-small)}.button--link.button--has-suffix:not(.button--text).button--small,.button--link.button--has-suffix:not(.button--text).button--medium,.button--link.button--has-suffix:not(.button--text).button--large{padding-right:0}.button--link.button--has-suffix:not(.button--text).button--small .button__label,.button--link.button--has-suffix:not(.button--text).button--medium .button__label,.button--link.button--has-suffix:not(.button--text).button--large .button__label{padding-right:var(--sc-spacing-xx-small)}.button--small{font-size:var(--sc-button-font-size-small);height:var(--sc-input-height-small);line-height:calc(var(--sc-input-height-small) - var(--sc-input-border-width) * 2);border-radius:var(--button-border-radius, var(--sc-input-border-radius-small))}.button--medium{font-size:var(--sc-button-font-size-medium);height:var(--sc-input-height-medium);line-height:calc(var(--sc-input-height-medium) - var(--sc-input-border-width) * 2);border-radius:var(--button-border-radius, var(--sc-input-border-radius-medium))}.button--large{font-size:var(--sc-button-font-size-large);height:var(--sc-input-height-large);line-height:calc(var(--sc-input-height-large) - var(--sc-input-border-width) * 2);border-radius:var(--button-border-radius, var(--sc-input-border-radius-large))}.button--full{display:block}.button--pill.button--small{border-radius:var(--sc-input-height-small)}.button--pill.button--medium{border-radius:var(--sc-input-height-medium)}.button--pill.button--large{border-radius:var(--sc-input-height-large)}.button--circle{padding-left:0;padding-right:0}.button--circle.button--small{width:var(--sc-input-height-small);border-radius:50%}.button--circle.button--medium{width:var(--sc-input-height-medium);border-radius:50%}.button--circle.button--large{width:var(--sc-input-height-large);border-radius:50%}.button--circle .button__prefix,.button--circle .button__suffix,.button--circle .button__caret{display:none}.button--caret .button__suffix{display:none}.button--caret .button__caret{display:flex;align-items:center}.button--caret .button__caret svg{width:1em;height:1em}.button--busy{position:relative;cursor:wait}.button--busy .button__prefix,.button--busy .button__label,.button--busy .button__suffix,.button--busy .button__caret{visibility:hidden}.button--busy *{pointer-events:none}.button--loading{position:relative;cursor:wait}.button--loading .button__prefix,.button--loading .button__label,.button--loading .button__suffix,.button--loading .button__caret{visibility:hidden}sc-spinner::part(base){--indicator-color:currentColor;--spinner-size:12px;position:absolute;top:calc(50% - var(--spinner-size) + var(--spinner-size) / 4);left:calc(50% - var(--spinner-size) + var(--spinner-size) / 4)}.button ::slotted(sc-badge){position:absolute;top:0;right:0;transform:translateY(-50%) translateX(50%);pointer-events:none}.button--has-label.button--small .button__label{padding:0 var(--sc-spacing-small)}.button--has-label.button--medium .button__label{padding:0 var(--sc-spacing-medium)}.button--has-label.button--large .button__label{padding:0 var(--sc-spacing-large)}.button--has-prefix:not(.button--text).button--small{padding-left:var(--sc-spacing-x-small)}.button--has-prefix:not(.button--text).button--small .button__label{padding-left:var(--sc-spacing-x-small)}.button--has-prefix:not(.button--text).button--medium{padding-left:var(--sc-spacing-small)}.button--has-prefix:not(.button--text).button--medium .button__label{padding-left:var(--sc-spacing-small)}.button--has-prefix:not(.button--text).button--large{padding-left:var(--sc-spacing-small)}.button--has-prefix:not(.button--text).button--large .button__label{padding-left:var(--sc-spacing-small)}.button--has-suffix.button--small,.button--caret.button--small{padding-right:var(--sc-spacing-x-small)}.button--has-suffix.button--small .button__label,.button--caret.button--small .button__label{padding-right:var(--sc-spacing-x-small)}.button--has-suffix.button--medium,.button--caret.button--medium{padding-right:var(--sc-spacing-small)}.button--has-suffix.button--medium .button__label,.button--caret.button--medium .button__label{padding-right:var(--sc-spacing-small)}.button--has-suffix.button--large,.button--caret.button--large{padding-right:var(--sc-spacing-small)}.button--has-suffix.button--large .button__label,.button--caret.button--large .button__label{padding-right:var(--sc-spacing-small)}:host(.sc-button-group__button--first) .button{border-top-right-radius:0;border-bottom-right-radius:0}:host(.sc-button-group__button--inner) .button{border-radius:0}:host(.sc-button-group__button--last) .button{border-top-left-radius:0;border-bottom-left-radius:0}:host(.sc-button-group__button:not(.sc-button-group__button--first)){margin-left:calc(-1 * var(--sc-input-border-width))}:host(.sc-button-group__button:not(.sc-button-group__button--focus,.sc-button-group__button--first,[type=default]):not(:hover,:active,:focus)) .button:after{content:\"\";position:absolute;top:0;left:0;bottom:0;border-left:solid 1px rgba(255, 255, 255, 0.2666666667);mix-blend-mode:lighten}:host(.sc-button-group__button--hover){z-index:1}:host(.sc-button-group__button--focus){z-index:2}@keyframes busy-animation{0%{background-position:200px 0}}.button--is-rtl.button--has-prefix.button--small,.button--is-rtl.button--has-prefix.button--medium,.button--is-rtl.button--has-prefix.button--large{padding-left:0}.button--is-rtl.button--has-prefix.button--small .button__label,.button--is-rtl.button--has-prefix.button--medium .button__label,.button--is-rtl.button--has-prefix.button--large .button__label{padding-left:0;padding-right:var(--sc-spacing-xx-small)}.button--is-rtl.button--has-suffix.button--small,.button--is-rtl.button--has-suffix.button--medium,.button--is-rtl.button--has-suffix.button--large{padding-right:0}.button--is-rtl.button--has-suffix.button--small .button__label,.button--is-rtl.button--has-suffix.button--medium .button__label,.button--is-rtl.button--has-suffix.button--large .button__label{padding-right:0;padding-left:var(--sc-spacing-xx-small)}";
8 const ScButtonStyle0 = scButtonCss;
9
10 const ScButton = class {
11 constructor(hostRef) {
12 registerInstance(this, hostRef);
13 this.scBlur = createEvent(this, "scBlur", 7);
14 this.scFocus = createEvent(this, "scFocus", 7);
15 this.hasFocus = false;
16 this.hasLabel = false;
17 this.hasPrefix = false;
18 this.hasSuffix = false;
19 this.type = 'default';
20 this.size = 'medium';
21 this.caret = false;
22 this.full = false;
23 this.disabled = false;
24 this.loading = false;
25 this.outline = false;
26 this.busy = false;
27 this.pill = false;
28 this.circle = false;
29 this.submit = false;
30 this.name = undefined;
31 this.value = undefined;
32 this.href = undefined;
33 this.target = undefined;
34 this.download = undefined;
35 this.autofocus = undefined;
36 }
37 componentWillLoad() {
38 this.handleSlotChange();
39 }
40 /** Simulates a click on the button. */
41 click() {
42 this.button.click();
43 }
44 /** Sets focus on the button. */
45 focus(options) {
46 this.button.focus(options);
47 }
48 /** Removes focus from the button. */
49 blur() {
50 this.button.blur();
51 }
52 handleSlotChange() {
53 this.hasLabel = !!this.button.children;
54 this.hasPrefix = !!this.button.querySelector('[slot="prefix"]');
55 this.hasSuffix = !!this.button.querySelector('[slot="suffix"]');
56 }
57 handleBlur() {
58 this.hasFocus = false;
59 this.scBlur.emit();
60 }
61 handleFocus() {
62 this.hasFocus = true;
63 this.scFocus.emit();
64 }
65 handleClick(event) {
66 if (this.disabled || this.loading || this.busy) {
67 event.preventDefault();
68 event.stopPropagation();
69 }
70 if (this.submit) {
71 this.submitForm();
72 }
73 }
74 submitForm() {
75 var _a, _b;
76 const form = ((_b = (_a = this.button.closest('sc-form')) === null || _a === void 0 ? void 0 : _a.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('form')) || this.button.closest('form');
77 // Calling form.submit() seems to bypass the submit event and constraint validation. Instead, we can inject a
78 // native submit button into the form, click it, then remove it to simulate a standard form submission.
79 const button = document.createElement('button');
80 if (form) {
81 button.type = 'submit';
82 button.style.position = 'absolute';
83 button.style.width = '0';
84 button.style.height = '0';
85 button.style.clip = 'rect(0 0 0 0)';
86 button.style.clipPath = 'inset(50%)';
87 button.style.overflow = 'hidden';
88 button.style.whiteSpace = 'nowrap';
89 form.append(button);
90 button.click();
91 button.remove();
92 }
93 }
94 render() {
95 const Tag = this.href ? 'a' : 'button';
96 const interior = (h(Fragment, { key: '84d023e2186c1abc388d1de326806f9a8a658808' }, h("span", { key: 'c32560928901007caed8336c15d0f663be0f09f7', part: "prefix", class: "button__prefix" }, h("slot", { key: '46de2a01772f62073e3d08135d5b96d14243918a', onSlotchange: () => this.handleSlotChange(), name: "prefix" })), h("span", { key: '5db06a1370062fa8e1d23d40f876192e436a87ce', part: "label", class: "button__label" }, h("slot", { key: 'e7fcc1fa23f9c0c277e66332cedd5958b7a3d64d', onSlotchange: () => this.handleSlotChange() })), h("span", { key: '4a3b90458d4751d4f80942e792c55d18370f2173', part: "suffix", class: "button__suffix" }, h("slot", { key: '5b45213af863a205f706e0462650ab6c87f24a9e', onSlotchange: () => this.handleSlotChange(), name: "suffix" })), this.caret ? (h("span", { part: "caret", class: "button__caret" }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("polyline", { points: "6 9 12 15 18 9" })))) : (''), this.loading || this.busy ? h("sc-spinner", { exportparts: "base:spinner" }) : ''));
97 return (h(Tag, { key: '25a87670748d993aeab7bf5f045f48de4cea6b54', part: "base", class: {
98 'button': true,
99 [`button--${this.type}`]: !!this.type,
100 [`button--${this.size}`]: true,
101 'button--caret': this.caret,
102 'button--circle': this.circle,
103 'button--disabled': this.disabled,
104 'button--focused': this.hasFocus,
105 'button--loading': this.loading,
106 'button--busy': this.busy,
107 'button--pill': this.pill,
108 'button--standard': !this.outline,
109 'button--outline': this.outline,
110 'button--has-label': this.hasLabel,
111 'button--has-prefix': this.hasPrefix,
112 'button--has-suffix': this.hasSuffix,
113 'button--is-rtl': isRtl(),
114 }, href: this.href, target: this.target, download: this.download, autoFocus: this.autofocus, rel: this.target ? 'noreferrer noopener' : undefined, role: "button", "aria-disabled": this.disabled ? 'true' : 'false', "aria-busy": this.busy || this.loading ? 'true' : 'false', tabindex: this.disabled ? '-1' : '0', disabled: this.disabled || this.busy, type: this.submit ? 'submit' : 'button', name: this.name, value: this.value, onBlur: () => this.handleBlur(), onFocus: () => this.handleFocus(), onClick: e => this.handleClick(e) }, interior));
115 }
116 get button() { return getElement(this); }
117 };
118 ScButton.style = ScButtonStyle0;
119
120 const iconFiles = new Map();
121 const requestIcon = (url) => {
122 if (iconFiles.has(url)) {
123 return iconFiles.get(url);
124 }
125 else {
126 const request = fetch(url).then(async (response) => {
127 if (response.ok) {
128 const div = document.createElement('div');
129 div.innerHTML = await response.text();
130 const svg = div.firstElementChild;
131 return {
132 ok: response.ok,
133 status: response.status,
134 svg: svg && svg.tagName.toLowerCase() === 'svg' ? svg.outerHTML : '',
135 };
136 }
137 else {
138 return {
139 ok: response.ok,
140 status: response.status,
141 svg: null,
142 };
143 }
144 });
145 iconFiles.set(url, request);
146 return request;
147 }
148 };
149
150 const scIconCss = ":host{--width:1em;--height:1em;display:inline-block;width:var(--width);height:var(--height);contain:strict;box-sizing:content-box !important}.icon,svg{display:block;height:100%;width:100%;stroke-width:var(--sc-icon-stroke-width, 2px)}";
151 const ScIconStyle0 = scIconCss;
152
153 /**
154 * The icon's label used for accessibility.
155 */
156 const LABEL_MAPPINGS = {
157 'chevron-down': wp.i18n.__('Open', 'surecart'),
158 'chevron-up': wp.i18n.__('Close', 'surecart'),
159 'chevron-right': wp.i18n.__('Next', 'surecart'),
160 'chevron-left': wp.i18n.__('Previous', 'surecart'),
161 'arrow-right': wp.i18n.__('Next', 'surecart'),
162 'arrow-left': wp.i18n.__('Previous', 'surecart'),
163 'arrow-down': wp.i18n.__('Down', 'surecart'),
164 'arrow-up': wp.i18n.__('Up', 'surecart'),
165 'alert-circle': wp.i18n.__('Alert', 'surecart'),
166 };
167 const parser = new DOMParser();
168 const ScIcon = class {
169 constructor(hostRef) {
170 registerInstance(this, hostRef);
171 this.scLoad = createEvent(this, "scLoad", 7);
172 this.svg = '';
173 this.name = undefined;
174 this.src = undefined;
175 this.label = undefined;
176 this.library = 'default';
177 this.mutate = true;
178 }
179 /** @internal Fetches the icon and redraws it. Used to handle library registrations. */
180 redraw() {
181 this.setIcon();
182 }
183 componentWillLoad() {
184 // Get redrawn if our library is registered after we mount.
185 watchIcon(this);
186 this.setIcon();
187 }
188 disconnectedCallback() {
189 unwatchIcon(this);
190 }
191 getLabel() {
192 let label = '';
193 if (this.label) {
194 label = (LABEL_MAPPINGS === null || LABEL_MAPPINGS === void 0 ? void 0 : LABEL_MAPPINGS[this.label]) || this.label;
195 }
196 else if (this.name) {
197 label = ((LABEL_MAPPINGS === null || LABEL_MAPPINGS === void 0 ? void 0 : LABEL_MAPPINGS[this.name]) || this.name).replace(/-/g, ' ');
198 }
199 else if (this.src) {
200 label = this.src.replace(/.*\//, '').replace(/-/g, ' ').replace(/\.svg/i, '');
201 }
202 return label;
203 }
204 async setIcon() {
205 const library = getIconLibrary(this.library);
206 const url = this.getUrl();
207 if (url) {
208 try {
209 const file = await requestIcon(url);
210 if (url !== this.getUrl()) {
211 // If the url has changed while fetching the icon, ignore this request
212 return;
213 }
214 else if (file.ok) {
215 const doc = parser.parseFromString(file.svg, 'text/html');
216 const svgEl = doc.body.querySelector('svg');
217 if (svgEl) {
218 if (library && library.mutator && this.mutate) {
219 library.mutator(svgEl);
220 }
221 this.svg = svgEl.outerHTML;
222 // add part attribute to the svg element.
223 this.svg = this.svg.replace('<svg', '<svg part="svg" ');
224 this.scLoad.emit();
225 }
226 else {
227 this.svg = '';
228 console.error({ status: file === null || file === void 0 ? void 0 : file.status });
229 }
230 }
231 else {
232 this.svg = '';
233 console.error({ status: file === null || file === void 0 ? void 0 : file.status });
234 }
235 }
236 catch {
237 console.error({ status: -1 });
238 }
239 }
240 else if (this.svg) {
241 // If we can't resolve a URL and an icon was previously set, remove it
242 this.svg = '';
243 }
244 }
245 getUrl() {
246 const library = getIconLibrary(this.library);
247 if (this.name && library) {
248 return library.resolver(this.name);
249 }
250 else {
251 return this.src;
252 }
253 }
254 render() {
255 return h("div", { key: '18d7d08cbf7a046767fcb296769c3a403af6c46b', part: "base", class: "icon", role: "img", "aria-label": this.getLabel(), innerHTML: this.svg });
256 }
257 static get assetsDirs() { return ["icon-assets"]; }
258 static get watchers() { return {
259 "name": ["setIcon"],
260 "src": ["setIcon"],
261 "library": ["setIcon"]
262 }; }
263 };
264 ScIcon.style = ScIconStyle0;
265
266 const scProductLineItemCss = ":host {\n display: block;\n font-family: var(--sc-font-sans);\n}\n\n.item {\n box-sizing: border-box;\n margin: 0px;\n min-width: 0px;\n display: flex;\n gap: var(--sc-spacing-large);\n justify-content: space-between;\n align-items: stretch;\n width: 100%;\n border-bottom: none;\n container-type: inline-size;\n}\n.item__text-container {\n box-sizing: border-box;\n margin: 0px;\n min-width: 0px;\n display: flex;\n flex-direction: column;\n gap: var(--sc-product-line-item-line-gap, 6px);\n justify-content: space-between;\n align-items: stretch;\n width: 100%;\n border-bottom: none;\n}\n.item__row {\n display: flex;\n gap: 18px;\n justify-content: space-between;\n align-items: stretch;\n width: 100%;\n}\n.item__row.stick-bottom {\n margin-top: auto;\n}\n.item__scratch-price {\n text-decoration: line-through;\n font-size: var(--sc-font-size-small);\n line-height: 1;\n color: var(--sc-input-help-text-color);\n white-space: nowrap;\n}\n.item__remove-container {\n display: flex;\n gap: 6px;\n align-items: center;\n line-height: 1;\n cursor: pointer;\n color: var(--sc-input-help-text-color);\n font-size: var(--sc-input-help-text-font-size-medium);\n}\n.item__add-review sc-button {\n --sc-input-border-radius-small: var(--sc-input-border-radius-medium);\n}\n.item--has-review {\n border-bottom: solid 1px var(--sc-input-border-color, var(--sc-input-border));\n padding-top: var(--sc-spacing-small);\n padding-bottom: var(--sc-spacing-large);\n}\n:host(:first-of-type) .item--has-review {\n padding-top: 0;\n}\n\n.item__text {\n box-sizing: border-box;\n margin: 0px;\n min-width: 0px;\n display: flex;\n gap: 6px;\n flex-direction: column;\n align-items: flex-start;\n justify-content: flex-start;\n flex: 1 1 0%;\n}\n\n.item__text-details {\n display: grid;\n gap: var(--sc-product-line-item-line-gap, 6px);\n}\n\n.item__title {\n box-sizing: border-box;\n min-width: 0px;\n margin: 0;\n color: var(--sc-line-item-title-color, var(--sc-input-label-color));\n font-size: var(--sc-font-size-medium);\n font-weight: var(--sc-font-weight-semibold);\n line-height: 1;\n cursor: pointer;\n display: -webkit-box;\n display: -moz-box;\n -webkit-box-orient: vertical;\n -moz-box-orient: vertical;\n -webkit-line-clamp: 3;\n -moz-box-lines: 3;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.item__suffix {\n flex: 1;\n box-sizing: border-box;\n margin: 0px;\n min-width: 0px;\n display: flex;\n flex-direction: column;\n -webkit-box-pack: start;\n justify-content: space-between;\n align-items: flex-end;\n min-width: 100px;\n margin-left: auto;\n align-self: center;\n}\n\n.product-line-item__removable .item__suffix {\n align-self: flex-start;\n}\n\n.product-line-item__editable .item__suffix {\n align-self: flex-start;\n}\n\n.product-line-item__purchasable-status {\n font-size: var(--sc-font-size-x-small);\n color: var(--sc-input-error-text-color);\n}\n\n.item__price {\n text-align: right;\n max-width: 100%;\n display: grid;\n gap: var(--sc-product-line-item-line-gap, 6px);\n}\n\n.item__description {\n color: var(--sc-price-label-color, var(--sc-input-help-text-color));\n font-size: var(--sc-price-label-font-size, var(--sc-input-help-text-font-size-medium));\n line-height: 1;\n display: flex;\n flex-wrap: wrap;\n flex-direction: column;\n gap: var(--sc-product-line-item-line-gap, 6px);\n text-wrap: pretty;\n}\n.item__description:last-child {\n align-items: flex-end;\n text-align: right;\n}\n\n.item__image-placeholder {\n width: var(--sc-product-line-item-image-size, 65px);\n height: var(--sc-product-line-item-image-size, 65px);\n background-color: var(--sc-input-border-color, var(--sc-input-border));\n border-radius: 4px;\n flex: 0 0 var(--sc-product-line-item-image-size, 65px);\n}\n\n.item__image,\n.attachment-thumbnail {\n width: var(--sc-product-line-item-image-size, 65px);\n height: var(--sc-product-line-item-image-size, 65px);\n object-fit: cover;\n border-radius: 4px;\n border: solid 1px var(--sc-input-border-color, var(--sc-input-border));\n display: block;\n box-shadow: var(--sc-input-box-shadow);\n align-self: flex-start;\n}\n\n@container (max-width: 380px) {\n .item__image,\n .item__image-placeholder {\n display: var(--sc-product-line-item-mobile-image-display, none);\n }\n}\n.product__description {\n display: flex;\n gap: 0.5em;\n align-items: center;\n}\n\n.price {\n font-size: var(--sc-font-size-medium);\n font-weight: var(--sc-font-weight-semibold);\n color: var(--sc-input-label-color);\n line-height: 1;\n white-space: nowrap;\n display: flex;\n gap: 4px;\n align-items: baseline;\n}\n\n.price__description {\n font-size: var(--sc-font-size-small);\n line-height: 1;\n color: var(--sc-input-help-text-color);\n text-align: right;\n white-space: nowrap;\n}\n\n.item--is-rtl.price {\n text-align: right;\n}\n.item--is-rtl .item__price {\n text-align: left;\n}\n\n.base {\n display: grid;\n gap: var(--sc-spacing-x-small);\n}\n\n.fee__description {\n color: var(--sc-input-help-text-color);\n}\n\nsc-quantity-select::part(base) {\n box-shadow: none;\n background-color: transparent;\n}\n\nsc-quantity-select::part(base):not(:focus-within) {\n border-color: transparent;\n}\n\nsc-quantity-select::part(input),\nsc-quantity-select::part(plus),\nsc-quantity-select::part(minus) {\n background-color: transparent;\n}\n\n.line-item-details {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n align-self: flex-start;\n gap: 0.25em;\n margin-top: var(--sc-spacing-xx-small);\n color: var(--sc-input-label-color);\n font-size: var(--sc-font-size-small);\n line-height: 1.4;\n background: transparent;\n outline: none;\n}\n.line-item-details:hover, .line-item-details:focus, .line-item-details:focus-visible {\n background: transparent;\n}\n.line-item-details--clickable {\n cursor: pointer;\n}\n.line-item-details__content {\n flex: 0 1 auto;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n.line-item-details:not(.line-item-details--is-expanded) .line-item-details__content {\n max-height: calc(var(--sc-line-item-details-collapse-lines, 2) * 1.4em + (var(--sc-line-item-details-collapse-lines, 2) - 1) * 2px);\n max-height: calc(var(--sc-line-item-details-collapse-lines, 2) * 1lh + (var(--sc-line-item-details-collapse-lines, 2) - 1) * 2px);\n overflow: hidden;\n}\n.line-item-details--is-expanded .line-item-details__content {\n max-height: none;\n overflow: visible;\n}\n.line-item-details__row:empty {\n display: none;\n}\n.line-item-details__qty {\n margin-inline-end: 0.35em;\n}\n.line-item-details__variant {\n margin-inline-start: 0.35em;\n color: var(--sc-color-gray-500, var(--sc-input-help-text-color));\n}\n.line-item-details__note {\n color: var(--sc-color-gray-500, var(--sc-input-help-text-color));\n word-wrap: break-word;\n white-space: normal;\n max-width: 100%;\n}\n.line-item-details__toggle {\n background: transparent;\n border: 0;\n padding: 0;\n align-self: flex-start;\n display: inline-flex;\n align-items: center;\n color: var(--sc-color-gray-500, var(--sc-input-help-text-color));\n cursor: pointer;\n border-radius: var(--sc-border-radius-small);\n transition: color 0.2s ease;\n appearance: none;\n -webkit-appearance: none;\n box-shadow: none;\n}\n.line-item-details__toggle:hover, .line-item-details__toggle:focus, .line-item-details__toggle:active {\n background: transparent;\n box-shadow: none;\n color: var(--sc-color-gray-700, var(--sc-input-label-color));\n}\n.line-item-details__toggle:focus {\n outline: none;\n}\n.line-item-details__toggle:focus-visible {\n outline: 2px solid var(--sc-color-primary-500);\n outline-offset: 2px;\n}\n.line-item-details__toggle-label {\n font-size: 14px;\n line-height: 20px;\n}\n.line-item-details__toggle-icon {\n transition: transform 0.2s ease;\n will-change: transform;\n}\n.line-item-details--is-expanded .line-item-details__toggle-icon {\n transform: rotate(180deg);\n}\n\n.item__title-count {\n margin-inline-start: 0.25em;\n}\n\n.visually-hidden {\n position: absolute !important;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n}";
267 const ScProductLineItemStyle0 = scProductLineItemCss;
268
269 /** Number of detail rows shown before the region collapses (matches the cart block default). */
270 const COLLAPSE_AFTER = 2;
271 const ScProductLineItem = class {
272 constructor(hostRef) {
273 registerInstance(this, hostRef);
274 this.scUpdateQuantity = createEvent(this, "scUpdateQuantity", 3);
275 this.scRemove = createEvent(this, "scRemove", 3);
276 this.image = undefined;
277 this.name = undefined;
278 this.amount = undefined;
279 this.scratch = undefined;
280 this.displayAmount = undefined;
281 this.scratchDisplayAmount = undefined;
282 this.fees = undefined;
283 this.price = undefined;
284 this.variant = '';
285 this.quantity = undefined;
286 this.interval = undefined;
287 this.trial = undefined;
288 this.removable = undefined;
289 this.editable = true;
290 this.max = undefined;
291 this.sku = '';
292 this.purchasableStatus = undefined;
293 this.note = undefined;
294 this.reviewButtonLink = '';
295 this.bundleComponents = [];
296 this.showAllBundleItems = true;
297 this.separator = '·';
298 this.detailsExpanded = false;
299 }
300 toggleDetails() {
301 this.detailsExpanded = !this.detailsExpanded;
302 }
303 /**
304 * Bundle items render in a single collapsible region. Collapsed, only the
305 * first `COLLAPSE_AFTER` rows show; bundle components render one row each, so
306 * the hidden count is exact ("+N more").
307 */
308 renderDetails() {
309 const sep = (this.separator || '·').trim() || '·';
310 const rows = getBundleComponentRowsFromLineItems(this.bundleComponents, this.quantity, this.showAllBundleItems, sep);
311 if (!rows.length)
312 return null;
313 const bundleHidden = rows.length > COLLAPSE_AFTER ? rows.length - COLLAPSE_AFTER : 0;
314 // Row count is authoritative for bundles (avoids a wrapped row falsely
315 // triggering a toggle).
316 const collapsible = this.detailsExpanded || bundleHidden > 0;
317 const toggleLabel = this.detailsExpanded
318 ? wp.i18n.__('Show less', 'surecart')
319 : bundleHidden > 0
320 ? wp.i18n.sprintf(/* translators: %d: number of hidden bundle items */ wp.i18n.__('+%d more', 'surecart'), bundleHidden)
321 : wp.i18n.__('Show more', 'surecart');
322 return (h("div", { class: {
323 'line-item-details': true,
324 'line-item-details--clickable': collapsible,
325 'line-item-details--is-expanded': this.detailsExpanded,
326 }, part: "details", onClick: () => collapsible && this.toggleDetails() }, h("div", { class: "line-item-details__content" }, rows.map(row => (h("div", { class: "line-item-details__row", part: "details__component", key: row.id }, row.qty > 1 && h("span", { class: "line-item-details__qty" }, row.qty, " \u00D7"), h("span", { class: "line-item-details__name" }, row.name), !!row.variants && (h("span", { class: "line-item-details__variant", part: "details__variant" }, sep, " ", row.variants)))))), collapsible && (h("button", { class: "line-item-details__toggle", type: "button", part: "details__toggle", "aria-expanded": this.detailsExpanded ? 'true' : 'false', onClick: e => {
327 e.stopPropagation();
328 this.toggleDetails();
329 } }, h("span", { class: "line-item-details__toggle-label" }, toggleLabel), h("sc-icon", { class: "line-item-details__toggle-icon", name: "chevron-down", "aria-hidden": "true", style: { width: '16px', height: '16px' } })))));
330 }
331 render() {
332 var _a, _b, _c, _d;
333 const isImageFallback = ((_a = this.image) === null || _a === void 0 ? void 0 : _a.type) === 'fallback';
334 // Number of products a bundle contains — shown as "(N)" next to the name.
335 const bundleCount = ((_b = this.bundleComponents) === null || _b === void 0 ? void 0 : _b.length) || 0;
336 const hasDescriptionDetails = !!this.variant || !!this.price || !!this.sku || !!this.purchasableStatus;
337 const hasTrialFeesDetails = !!this.trial || (this.fees || []).some(fee => (fee === null || fee === void 0 ? void 0 : fee.display_amount) || (fee === null || fee === void 0 ? void 0 : fee.description));
338 const hasMetaRow = hasDescriptionDetails || hasTrialFeesDetails;
339 return (h("div", { key: '83d9573f96517b1e5589f6ed917e1232d52f44e6', class: "base", part: "base" }, h("div", { key: '1a9fc5b3065201292ca576c542906c69716383c6', part: "product-line-item", class: {
340 'item': true,
341 'item--has-image': !!((_c = this.image) === null || _c === void 0 ? void 0 : _c.src),
342 'item--has-review': !!this.reviewButtonLink,
343 'item--is-rtl': isRtl(),
344 'product-line-item__editable': this.editable,
345 'product-line-item__removable': this.removable,
346 } }, !!((_d = this.image) === null || _d === void 0 ? void 0 : _d.src) ? (h("img", { ...this.image, part: isImageFallback ? 'placeholder__image' : 'image', class: isImageFallback ? 'item__image-placeholder' : 'item__image' })) : (h("div", { class: "item__image-placeholder", part: "placeholder__image" })), h("div", { key: '46e4e94c95be8949922be91eabd354324445820c', class: "item__text-container" }, h("div", { key: '8a092d0b25ed8f08feea9f4d5d2283bcb4a88017', class: "item__row" }, h("div", { key: '99f2a5b72d749bac8fb169a2d0424340b7baa777', class: "item__title", part: "title" }, h("slot", { key: '6b5a077ca5acced18163ff6f0b3ad66cb9129b7e', name: "title" }, this.name), bundleCount > 0 && (h("span", { key: '3a310ffe710600c73e59905789864a1f762b0d03', class: "item__title-count", "aria-hidden": "true" }, "(", bundleCount, ")")), bundleCount > 0 && h("span", { key: 'afd855d2f64476c6a02f52181303f0febd1aa3f7', class: "visually-hidden" }, wp.i18n.sprintf(wp.i18n._n('Includes %d item', 'Includes %d items', bundleCount, 'surecart'), bundleCount))), h("div", { key: 'a4a0b90d1faaf3b9bd4b303bc71f1cdfffe77911', class: "price", part: "price__amount" }, !!this.scratch && this.scratch !== this.amount && h("span", { key: '742fa88c625a4388bb556b8ee32fed9eefd8f630', class: "item__scratch-price" }, this.scratch), this.amount, h("div", { key: 'a4c7b0d1852a0ea3d1e17458c70c017cef2b43bb', class: "price__description", part: "price__description" }, this.interval))), hasMetaRow && (h("div", { key: 'b5aabb2e2d0cc5fd936656124336b05f99cf0100', class: "item__row" }, h("div", { key: 'f6f152b2ddcba92b6c8d2ecda0f49e4c8b8dd6ed', class: "item__description", part: "description" }, this.variant && h("div", { key: 'd499b9a0390314f3f7fde5b876d4a2946d59bd6a' }, this.variant), this.price && h("div", { key: '12394beab31dd51be37c885b7c023159c312ebf8' }, this.price), this.sku && (h("div", { key: '7f57930476202c91a6b360beb72996f0fa940fe1' }, wp.i18n.__('SKU:', 'surecart'), " ", this.sku)), !!this.purchasableStatus && h("div", { key: 'e69060d0491f81ac9825b5c29c6c0c58114756ad' }, this.purchasableStatus)), h("div", { key: '20d21e071cbedd6e9832c28e1654ae6ed0535d3e', class: "item__description", part: "trial-fees" }, !!this.trial && h("div", { key: '8bb86047207a23fd3327943b8e0eeec018b3f93b' }, this.trial), (this.fees || []).map(fee => {
347 return (h("div", null, fee === null || fee === void 0 ? void 0 :
348 fee.display_amount, " ", fee === null || fee === void 0 ? void 0 :
349 fee.description));
350 })))), this.renderDetails(), !!this.note && (h("div", { key: '43e4128b6f44b4eb9f118f00a32fdbe2fdc65857', class: "item__description" }, h("sc-product-line-item-note", { key: '4a94e30b0530426c99df5faeb5195385c3f628aa', note: this.note, exportparts: "base:note" }))), h("div", { key: 'a0629cdd7906c2eebe12b3457eeac878842565ed', class: "item__row stick-bottom" }, this.editable ? (h("sc-quantity-select", { max: this.max || Infinity, exportparts: "base:quantity, minus:quantity__minus, minus-icon:quantity__minus-icon, plus:quantity__plus, plus-icon:quantity__plus-icon, input:quantity__input", clickEl: this.el, quantity: this.quantity, size: "small", onScChange: e => e.detail && this.scUpdateQuantity.emit(e.detail), "aria-label":
351 /** translators: %1$s: product name, %2$s: product price name */
352 wp.i18n.sprintf(wp.i18n.__('Change Quantity - %1$s %2$s', 'surecart'), this.name, this.price), productName: this.name })) : (h("span", { class: "item__description", part: "static-quantity" }, wp.i18n.__('Qty:', 'surecart'), " ", this.quantity)), !!this.reviewButtonLink && (h("div", { key: '3cc3d05585054334d3995e440de0a0523184ce34', class: "item__add-review" }, h("sc-button", { key: 'c26a69bfd4605193113a240b4fa33bd6c69eed21', size: "small", href: this.reviewButtonLink, target: "_blank" }, wp.i18n.__('Review Product', 'surecart')))), !!this.removable && (h("div", { key: 'ea6d312c2ec917b332c30ab46128b74f37b37f43', class: "item__remove-container", onClick: () => this.scRemove.emit(), onKeyDown: e => {
353 if (e.key === 'Enter') {
354 this.scRemove.emit();
355 }
356 }, "aria-label": wp.i18n.sprintf(wp.i18n.__('Remove Item - %1$s %2$s', 'surecart'), this.name, this.amount), tabIndex: 0 }, h("sc-icon", { key: 'b0b99a1488432d4b6577322b912a3dc5246fc170', exportparts: "base:remove-icon__base", class: "item__remove", name: "x" }), h("span", { key: 'ba58e3c57316d646ad85cf2de19fb61008076704', class: "item__remove-text" }, wp.i18n.__('Remove', 'surecart')))))))));
357 }
358 get el() { return getElement(this); }
359 };
360 ScProductLineItem.style = ScProductLineItemStyle0;
361
362 const scProductLineItemNoteCss = ".line-item-note{display:flex;align-items:flex-start;gap:0.25em;min-height:1.5em}.line-item-note--clickable{cursor:pointer}.line-item-note__text{line-height:1.4;flex:1;display:-webkit-box;-webkit-box-orient:vertical;line-clamp:1;-webkit-line-clamp:1;overflow:hidden;text-overflow:ellipsis;transition:all 0.2s}.line-item-note--is-expanded .line-item-note__text{display:block;line-clamp:unset;-webkit-line-clamp:unset;overflow:visible;text-overflow:unset}.line-item-note__toggle{background:none;border:none;color:var(--sc-color-gray-500);cursor:pointer;padding:0;align-self:flex-start;transition:opacity 0.2s ease;border-radius:var(--sc-border-radius-small)}.line-item-note__toggle:hover{opacity:0.8}.line-item-note__toggle:focus-visible{outline:2px solid var(--sc-color-primary-500);outline-offset:2px}.line-item-note__toggle:focus{outline:2px solid var(--sc-color-primary-500);outline-offset:2px}";
363 const ScProductLineItemNoteStyle0 = scProductLineItemNoteCss;
364
365 const ScProductLineItemNote = class {
366 constructor(hostRef) {
367 registerInstance(this, hostRef);
368 this.note = undefined;
369 this.expanded = false;
370 this.isOverflowing = false;
371 }
372 componentDidLoad() {
373 this.setupObservers();
374 this.checkOverflow();
375 }
376 disconnectedCallback() {
377 this.cleanupObservers();
378 }
379 setupObservers() {
380 if (!this.noteEl)
381 return;
382 // ResizeObserver for container size changes
383 if (typeof ResizeObserver !== 'undefined') {
384 this.resizeObserver = new ResizeObserver(() => {
385 this.checkOverflow();
386 });
387 this.resizeObserver.observe(this.noteEl);
388 }
389 // MutationObserver for content changes
390 if (typeof MutationObserver !== 'undefined') {
391 this.mutationObserver = new MutationObserver(() => {
392 this.checkOverflow();
393 });
394 this.mutationObserver.observe(this.noteEl, {
395 characterData: true,
396 subtree: true,
397 childList: true,
398 });
399 }
400 }
401 cleanupObservers() {
402 if (this.resizeObserver) {
403 this.resizeObserver.disconnect();
404 this.resizeObserver = undefined;
405 }
406 if (this.mutationObserver) {
407 this.mutationObserver.disconnect();
408 this.mutationObserver = undefined;
409 }
410 }
411 checkOverflow() {
412 if (!this.noteEl)
413 return;
414 this.isOverflowing = this.noteEl.scrollHeight > this.noteEl.clientHeight;
415 }
416 toggle() {
417 this.expanded = !this.expanded;
418 }
419 render() {
420 if (!this.note)
421 return null;
422 return (h("div", { class: "base", part: "base" }, h("div", { class: {
423 'line-item-note': true,
424 'line-item-note--is-expanded': this.expanded,
425 'line-item-note--clickable': this.isOverflowing || this.expanded,
426 }, tabIndex: this.isOverflowing || this.expanded ? 0 : undefined, onClick: () => (this.isOverflowing || this.expanded) && this.toggle() }, h("div", { ref: el => (this.noteEl = el), class: "line-item-note__text" }, this.note), (this.isOverflowing || this.expanded) && (h("button", { class: "line-item-note__toggle", type: "button", onClick: e => {
427 e.stopPropagation();
428 this.toggle();
429 }, title: this.expanded ? wp.i18n.__('Collapse note', 'surecart') : wp.i18n.__('Expand note', 'surecart') }, h("slot", { name: "icon" }, h("sc-icon", { name: this.expanded ? 'chevron-up' : 'chevron-down', style: { width: '16px', height: '16px' } })))))));
430 }
431 get el() { return getElement(this); }
432 };
433 ScProductLineItemNote.style = ScProductLineItemNoteStyle0;
434
435 const scQuantitySelectCss = ":host{--focus-ring:0 0 0 var(--sc-focus-ring-width) var(--sc-focus-ring-color-primary);--border-radius:var(--sc-quantity-border-radius, var(--sc-input-border-radius-small));display:inline-block}.input__control{text-align:center;line-height:1;border:none;flex:1;max-width:var(--sc-quantity-input-max-width, 35px);background-color:var(--sc-input-control-background-color, var(--sc-color-white));color:var(--sc-input-control-color, var(--sc-color-black));-moz-appearance:textfield}.input__control::-webkit-outer-spin-button,.input__control::-webkit-inner-spin-button{-webkit-appearance:none}.input__control::-webkit-search-decoration,.input__control::-webkit-search-cancel-button,.input__control::-webkit-search-results-button,.input__control::-webkit-search-results-decoration{-webkit-appearance:none}.input__control:-webkit-autofill,.input__control:-webkit-autofill:hover,.input__control:-webkit-autofill:focus,.input__control:-webkit-autofill:active{box-shadow:0 0 0 var(--sc-input-height-large) var(--sc-input-background-color-hover) inset !important;-webkit-text-fill-color:var(--sc-input-color)}.input__control::placeholder{color:var(--sc-input-placeholder-color);user-select:none}.input__control:focus{outline:none}.quantity--trigger{cursor:pointer;white-space:nowrap}.quantity{position:relative;display:inline-block;width:var(--sc-quantity-select-width, 100px);height:var(--sc-quantity-control-height, var(--sc-input-height-small));display:flex;align-items:stretch;font-family:var(--sc-input-font-family);font-weight:var(--sc-input-font-weight);letter-spacing:var(--sc-input-letter-spacing);background-color:var(--sc-input-background-color);border:var(--sc-input-border);border-radius:var(--border-radius);vertical-align:middle;box-shadow:var(--sc-input-box-shadow);transition:var(--sc-input-transition, var(--sc-transition-medium)) color, var(--sc-input-transition, var(--sc-transition-medium)) border, var(--sc-input-transition, var(--sc-transition-medium)) box-shadow}.quantity:hover:not(.quantity--disabled){background-color:var(--sc-input-background-color-hover);border-color:var(--sc-input-border-color-hover)}.quantity:hover:not(.quantity--disabled) .quantity__control{color:var(--sc-input-color-hover)}.quantity.quantity--focused:not(.quantity--disabled){background-color:var(--sc-input-background-color-focus);border-color:var(--sc-input-border-color-focus);box-shadow:var(--focus-ring)}.quantity.quantity--focused:not(.quantity--disabled) .quantity__control{color:var(--sc-input-color-focus)}.quantity.quantity--disabled{background-color:var(--sc-input-background-color-disabled);border-color:var(--sc-input-border-color-disabled);opacity:0.5;cursor:not-allowed}.quantity.quantity--disabled .input__control{color:var(--sc-input-color-disabled)}.quantity.quantity--disabled .input__control::placeholder{color:var(--sc-input-placeholder-color-disabled)}.button__decrease,.button__increase{display:inline-block;text-align:center;vertical-align:middle;line-height:0;height:auto;top:1px;bottom:1px;width:32px;background:var(--sc-input-background-color);color:var(--sc-input-help-text-color);cursor:pointer;font-size:13px;user-select:none;border-width:0;padding:0}.button__decrease:hover:not(.button--disabled) .quantity__control,.button__increase:hover:not(.button--disabled) .quantity__control{color:var(--sc-input-color-hover)}.button__decrease.button--disabled,.button__increase.button--disabled{background-color:var(--sc-input-background-color-disabled);border-color:var(--sc-input-border-color-disabled);opacity:0.5;cursor:not-allowed}.quantity--small{width:var(--sc-quantity-select-width-small, 76px);height:var(--sc-quantity-control-height-small, 26px)}.quantity--small .button__decrease,.quantity--small .button__increase{width:24px;border:none}.quantity--small .input__control{max-width:24px}.button__decrease{left:1px;border-radius:var(--border-radius) 0 0 var(--border-radius);border-right:var(--sc-input-border)}.button__increase{right:1px;border-radius:0 var(--border-radius) var(--border-radius) 0;border-left:var(--sc-input-border)}.quantity--is-rtl .button__decrease{right:1px;border-left:var(--sc-input-border);border-right:0}.quantity--is-rtl .button__increase{left:1px;border-right:var(--sc-input-border);border-left:0}";
436 const ScQuantitySelectStyle0 = scQuantitySelectCss;
437
438 const ScQuantitySelect = class {
439 constructor(hostRef) {
440 registerInstance(this, hostRef);
441 this.scChange = createEvent(this, "scChange", 7);
442 this.scInput = createEvent(this, "scInput", 7);
443 this.scFocus = createEvent(this, "scFocus", 7);
444 this.scBlur = createEvent(this, "scBlur", 7);
445 this.clickEl = undefined;
446 this.disabled = undefined;
447 this.max = Infinity;
448 this.min = 1;
449 this.quantity = 0;
450 this.productName = 'Product';
451 this.size = 'medium';
452 this.hasFocus = undefined;
453 }
454 decrease() {
455 if (this.disabled)
456 return;
457 this.quantity = Math.max(this.quantity - 1, this.min);
458 // translators: %1$s is the product name
459 speak(wp.i18n.sprintf(wp.i18n.__('Decreased %1$s quantity by one', 'surecart'), this.productName), 'assertive');
460 this.scChange.emit(this.quantity);
461 this.scInput.emit(this.quantity);
462 }
463 increase() {
464 if (this.disabled)
465 return;
466 this.quantity = Math.min(this.quantity + 1, this.max);
467 // translators: %1$s is the product name
468 speak(wp.i18n.sprintf(wp.i18n.__('Increased %1$s quantity by one', 'surecart'), this.productName), 'assertive');
469 this.scChange.emit(this.quantity);
470 this.scInput.emit(this.quantity);
471 }
472 handleBlur() {
473 this.hasFocus = false;
474 this.scBlur.emit();
475 }
476 handleFocus() {
477 this.hasFocus = true;
478 this.scFocus.emit();
479 }
480 handleChange() {
481 this.quantity = parseInt(this.input.value) > this.max ? this.max : parseInt(this.input.value);
482 // translators: %1$s is the product name, %2$s is the quantity
483 speak(wp.i18n.sprintf(wp.i18n.__('Quantity of %1$s changed to %2$s', 'surecart'), this.productName, this.quantity), 'assertive');
484 this.scChange.emit(this.quantity);
485 }
486 handleInput() {
487 this.quantity = parseInt(this.input.value);
488 this.scInput.emit(this.quantity);
489 }
490 render() {
491 return (h("div", { key: 'f87d0e717cca0f093b8cd46001668ee45acd602e', part: "base", class: {
492 'quantity': true,
493 // States
494 'quantity--focused': this.hasFocus,
495 'quantity--disabled': this.disabled,
496 'quantity--is-rtl': isRtl(),
497 'quantity--small': this.size === 'small',
498 } }, h("button", { key: 'b87e536709d9facd789600480e15e491ed8f59e4', part: "minus", "aria-label":
499 /** translators: %1$s: product name */
500 wp.i18n.sprintf(wp.i18n.__('Decrease %1$s quantity by one', 'surecart'), this.productName), "aria-disabled": this.disabled || (this.quantity <= this.min && this.min > 1), class: { 'button__decrease': true, 'button--disabled': this.quantity <= this.min && this.min > 1 }, onClick: () => this.quantity > this.min && this.decrease(), disabled: this.disabled || (this.quantity <= this.min && this.min > 1) }, h("sc-icon", { key: '587cea8b0c6b06b0ddee6b88dd610f3363066f0a', name: "minus", exportparts: "base:minus__icon" })), h("input", { key: 'ab04a8b9dde3ce3960f4d5f83d5902fc692a1815', part: "input", class: "input__control", ref: el => (this.input = el), step: "1", type: "number", max: this.max, min: this.min, value: this.quantity, disabled: this.disabled, autocomplete: "off", role: "spinbutton", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": this.quantity, "aria-disabled": this.disabled, onChange: () => this.handleChange(), onInput: () => this.handleInput(), onFocus: () => this.handleFocus(), onBlur: () => this.handleBlur(), "aria-label":
501 /** translators: %1$s: product name */
502 wp.i18n.sprintf(wp.i18n.__('Quantity input for %1$s product', 'surecart'), this.productName) }), h("button", { key: '969d9da1d6cac9d9aa484b1a3b1983f0325c65fb', part: "plus", "aria-label":
503 /** translators: %1$s: product name */
504 wp.i18n.sprintf(wp.i18n.__('Increase %1$s quantity by one', 'surecart'), this.productName), class: { 'button__increase': true, 'button--disabled': this.quantity >= this.max }, onClick: () => this.quantity < this.max && this.increase(), "aria-disabled": this.disabled || this.quantity >= this.max, disabled: this.disabled || this.quantity >= this.max }, h("sc-icon", { key: '498ee6e4edac91ab06c2f13fe8b4df553b98a34a', name: "plus", exportparts: "base:plus__icon" }))));
505 }
506 get el() { return getElement(this); }
507 };
508 ScQuantitySelect.style = ScQuantitySelectStyle0;
509
510 const scSpinnerCss = ":host{--track-color:#0d131e20;--indicator-color:var(--sc-color-primary-500);--stroke-width:2px;--spinner-size:1em;display:inline-block}.spinner{display:inline-block;width:var(--spinner-size);height:var(--spinner-size);border-radius:50%;border:solid var(--stroke-width) var(--track-color);border-top-color:var(--indicator-color);border-right-color:var(--indicator-color);animation:1s linear infinite spin}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
511 const ScSpinnerStyle0 = scSpinnerCss;
512
513 const ScSpinner = class {
514 constructor(hostRef) {
515 registerInstance(this, hostRef);
516 }
517 render() {
518 return h("span", { key: '2ee97812cfb75bbdc7b60de3552494267e4480ac', part: "base", class: "spinner", "aria-busy": "true", "aria-live": "polite" });
519 }
520 };
521 ScSpinner.style = ScSpinnerStyle0;
522
523 export { ScButton as sc_button, ScIcon as sc_icon, ScProductLineItem as sc_product_line_item, ScProductLineItemNote as sc_product_line_item_note, ScQuantitySelect as sc_quantity_select, ScSpinner as sc_spinner };
524
525 //# sourceMappingURL=sc-button_6.entry.js.map