@sonic-equipment/ui 134.0.0 → 135.0.0

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.
@@ -1,3 +1,6 @@
1
1
  import { AddressType } from '../shared/model/address';
2
- export type AddressProps = AddressType;
3
- export declare function Address({ address1, address2, address3, city, companyName, country, email, firstName, lastName, phone, postalCode, }: AddressProps): import("react/jsx-runtime").JSX.Element;
2
+ export interface AddressProps {
3
+ address: AddressType;
4
+ 'data-test-selector'?: string;
5
+ }
6
+ export declare function Address({ address, 'data-test-selector': dataTestSelector, }: AddressProps): import("react/jsx-runtime").JSX.Element;
@@ -2,8 +2,9 @@ import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { capitalizeFirstLetter } from '../shared/utils/string.js';
3
3
  import styles from './address.module.css.js';
4
4
 
5
- function Address({ address1, address2, address3, city, companyName, country, email, firstName, lastName, phone, postalCode, }) {
6
- return (jsxs("address", { className: styles.address, children: [(firstName || lastName) && jsx("p", { children: `${firstName} ${lastName}` }), companyName && jsx("p", { children: companyName }), address1 && jsx("p", { children: address1 }), address2 && jsx("p", { children: address2 }), address3 && jsx("p", { children: address3 }), (postalCode || city) && (jsxs("p", { children: [postalCode, " ", city ? capitalizeFirstLetter(city) : ''] })), country && jsx("p", { children: country }), phone && jsx("p", { children: phone }), email && jsx("p", { children: email })] }));
5
+ function Address({ address, 'data-test-selector': dataTestSelector, }) {
6
+ const { address1, address2, address3, city, companyName, country, email, firstName, lastName, phone, postalCode, } = address;
7
+ return (jsxs("address", { className: styles.address, "data-test-selector": dataTestSelector, children: [(firstName || lastName) && (jsx("p", { "data-test-selector": "addressInfoDisplay_name", children: `${firstName} ${lastName}` })), companyName && (jsx("p", { "data-test-selector": "addressInfoDisplay_companyName", children: companyName })), address1 && (jsx("p", { "data-test-selector": "addressInfoDisplay_address1", children: address1 })), address2 && (jsx("p", { "data-test-selector": "addressInfoDisplay_address2", children: address2 })), address3 && (jsx("p", { "data-test-selector": "addressInfoDisplay_address3", children: address3 })), (postalCode || city) && (jsxs("p", { "data-test-selector": "addressInfoDisplay_postalCodeAndCity", children: [postalCode, " ", city ? capitalizeFirstLetter(city) : ''] })), country && (jsx("p", { "data-test-selector": "addressInfoDisplay_country", children: country })), phone && jsx("p", { "data-test-selector": "addressInfoDisplay_phone", children: phone }), email && jsx("p", { "data-test-selector": "addressInfoDisplay_email", children: email })] }));
7
8
  }
8
9
 
9
10
  export { Address };
package/dist/exports.d.ts CHANGED
@@ -108,6 +108,9 @@ export * from './global-search/search-section/search-list-item';
108
108
  export * from './global-search/search-section/search-section';
109
109
  export * from './global-search/types';
110
110
  export * from './header/cart-icon/connected-cart-icon';
111
+ export * from './header/hamburger-button/hamburger-button';
112
+ export * from './header/header-layout/header-layout';
113
+ export * from './header/sonic-logo/sonic-logo';
111
114
  export * from './info-icon-tooltip/info-icon-tooltip';
112
115
  export * from './intl/formatted-message';
113
116
  export * from './intl/intl-context';
@@ -0,0 +1,6 @@
1
+ export interface HamburgerButtonProps {
2
+ 'aria-controls': string;
3
+ isActive: boolean;
4
+ onActiveChange: (isActive: boolean) => void;
5
+ }
6
+ export declare function HamburgerButton({ 'aria-controls': ariaControls, isActive, onActiveChange, }: HamburgerButtonProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import clsx from 'clsx';
3
+ import { IconButton } from '../../buttons/icon-button/icon-button.js';
4
+ import { useFormattedMessage } from '../../intl/use-formatted-message.js';
5
+ import styles from './hamburger-button.module.css.js';
6
+
7
+ function HamburgerButton({ 'aria-controls': ariaControls, isActive, onActiveChange, }) {
8
+ const t = useFormattedMessage();
9
+ return (jsx(IconButton, { "aria-controls": ariaControls, "aria-expanded": isActive, onClick: () => onActiveChange(!isActive), title: t('Toggle navigation menu'), type: "button", children: jsxs("div", { className: clsx(styles['hamburger-button'], {
10
+ [styles.active]: isActive,
11
+ }), children: [jsx("span", { "aria-hidden": "true" }), jsx("span", { "aria-hidden": "true" }), jsx("span", { "aria-hidden": "true" })] }) }));
12
+ }
13
+
14
+ export { HamburgerButton };
@@ -0,0 +1,3 @@
1
+ var styles = {"hamburger-button":"hamburger-button-module-xER52","active":"hamburger-button-module-7yoVH"};
2
+
3
+ export { styles as default };
@@ -0,0 +1,9 @@
1
+ import { ReactNode } from 'react';
2
+ export interface HeaderLayoutProps {
3
+ hamburgerButton?: ReactNode;
4
+ logo: ReactNode;
5
+ mainNavigation: ReactNode;
6
+ navigationActions: ReactNode;
7
+ search: ReactNode;
8
+ }
9
+ export declare function HeaderLayout({ hamburgerButton, logo, mainNavigation, navigationActions, search, }: HeaderLayoutProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import styles from './header-layout.module.css.js';
3
+
4
+ function HeaderLayout({ hamburgerButton, logo, mainNavigation, navigationActions, search, }) {
5
+ return (jsxs("header", { className: styles.header, children: [jsxs("div", { className: styles['mobile-menu-toggle'], children: [hamburgerButton && hamburgerButton, jsx("div", { className: styles.search, children: search })] }), jsx("div", { className: styles.logo, children: logo }), jsx("div", { className: styles['main-navigation'], children: mainNavigation }), jsxs("div", { className: styles['navigation-actions'], children: [jsx("div", { className: styles.search, children: search }), jsx("div", { className: styles.icons, children: navigationActions })] })] }));
6
+ }
7
+
8
+ export { HeaderLayout };
@@ -0,0 +1,3 @@
1
+ var styles = {"header":"header-layout-module-VlTuk","logo":"header-layout-module-oKPyL","mobile-menu-toggle":"header-layout-module-aBOJL","main-navigation":"header-layout-module--ICLK","navigation-actions":"header-layout-module-HjY-a","search":"header-layout-module-fP3a6","icons":"header-layout-module-4Qp5b"};
2
+
3
+ export { styles as default };
@@ -0,0 +1,5 @@
1
+ export interface SonicLogoProps {
2
+ className?: string;
3
+ href?: string;
4
+ }
5
+ export declare function SonicLogo({ className, href }: SonicLogoProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import clsx from 'clsx';
3
+ import { RouteLink } from '../../shared/routing/route-link.js';
4
+ import styles from './sonic-logo.module.css.js';
5
+
6
+ function SonicLogo({ className, href }) {
7
+ const Tag = href ? RouteLink : 'div';
8
+ return (jsx(Tag, { "aria-label": "Sonic", className: clsx(styles.wrapper, className), href: href, children: jsx("svg", { className: styles['sonic-logo'], viewBox: "0 0 100 24", xmlns: "http://www.w3.org/2000/svg", children: jsxs("g", { fill: "none", fillRule: "evenodd", children: [jsx("path", { className: styles.letters, d: "M11.87 8.65c1.815 0 3.286 1.482 3.286 3.311 0 6.595-5.325 11.962-11.87 11.962C1.471 23.923 0 22.44 0 20.612c0-1.766 1.372-3.21 3.1-3.307l.186-.005c2.848 0 5.179-2.277 5.293-5.12l.005-.219c0-1.829 1.471-3.311 3.286-3.311zm0-8.65c1.815 0 3.286 1.483 3.286 3.311 0 1.766-1.371 3.21-3.1 3.307l-.186.005c-2.849 0-5.178 2.277-5.293 5.118l-.004.22c0 1.829-1.472 3.311-3.287 3.311C1.472 15.272 0 13.79 0 11.961 0 5.366 5.325 0 11.87 0zm6.155 12.016c0 6.596 5.325 11.963 11.87 11.963 6.545 0 11.87-5.367 11.87-11.963 0-6.595-5.325-11.96-11.87-11.96-6.545 0-11.87 5.365-11.87 11.96zm6.572 0c0-2.943 2.376-5.338 5.298-5.338 2.92 0 5.297 2.395 5.297 5.338 0 2.945-2.376 5.34-5.297 5.34-2.922 0-5.298-2.395-5.298-5.34zM82.251 3.56c-4.628 4.663-4.628 12.251 0 16.915 4.628 4.663 12.158 4.663 16.786 0a3.33 3.33 0 0 0 .001-4.683 3.268 3.268 0 0 0-4.501-.138l-.146.138a5.278 5.278 0 0 1-7.494 0c-2.064-2.081-2.064-5.468.001-7.549a5.275 5.275 0 0 1 7.313-.174l.18.173a3.268 3.268 0 0 0 4.647 0 3.33 3.33 0 0 0 0-4.684c-4.63-4.663-12.16-4.662-16.787.002zm-12.868-.13v17.148c0 1.828 1.47 3.311 3.285 3.311 1.816 0 3.287-1.483 3.287-3.311V3.429c0-1.829-1.471-3.312-3.287-3.312-1.815 0-3.285 1.483-3.285 3.312zM48.063.075c-1.814 0-3.285 1.483-3.285 3.311V20.69c0 1.828 1.471 3.311 3.286 3.311s3.286-1.483 3.286-3.311V6.698h2.95c2.92 0 5.297 2.394 5.297 5.338v8.653c0 1.828 1.471 3.311 3.286 3.311s3.286-1.483 3.286-3.311v-8.653C66.17 5.44 60.844.075 54.3.075h-6.235z" }), jsx("path", { className: styles.dot, d: "M35.27 12.017c0 2.991-2.406 5.416-5.375 5.416-2.97 0-5.376-2.425-5.376-5.416 0-2.992 2.407-5.417 5.376-5.417 2.969 0 5.375 2.425 5.375 5.417" })] }) }) }));
9
+ }
10
+
11
+ export { SonicLogo };
@@ -0,0 +1,3 @@
1
+ var styles = {"wrapper":"sonic-logo-module-5zzhF","sonic-logo":"sonic-logo-module-9Mpdq","letters":"sonic-logo-module-Pa7pF","dot":"sonic-logo-module-vTCO3"};
2
+
3
+ export { styles as default };
package/dist/index.js CHANGED
@@ -112,6 +112,9 @@ export { SearchList } from './global-search/search-section/search-list.js';
112
112
  export { SearchListItem } from './global-search/search-section/search-list-item.js';
113
113
  export { SearchSection } from './global-search/search-section/search-section.js';
114
114
  export { ConnectedCartIcon } from './header/cart-icon/connected-cart-icon.js';
115
+ export { HamburgerButton } from './header/hamburger-button/hamburger-button.js';
116
+ export { HeaderLayout } from './header/header-layout/header-layout.js';
117
+ export { SonicLogo } from './header/sonic-logo/sonic-logo.js';
115
118
  export { InfoIconTooltip } from './info-icon-tooltip/info-icon-tooltip.js';
116
119
  export { FormattedMessage } from './intl/formatted-message.js';
117
120
  export { IntlContext } from './intl/intl-context.js';
@@ -1 +1 @@
1
- export type TranslationId = "'{0}' in all products" | "Try 'Search' and try to find the product you're looking for" | "Unfortnately, We found no articles for your search '{0}'" | ' to your account to manage your lists.' | 'Add order notes' | 'Add to list' | 'Address' | 'Amount: {0}' | 'An error occurred while processing your payment. Please try again.' | 'An unexpected error occured' | 'Are you looking for information about our service? Please visit our customer support page' | 'Are you sure you want to remove all items from your cart?' | 'Are you sure you want to remove this item from your cart?' | 'article' | 'articles' | 'As soon as possible' | 'Attention' | 'Billing address' | 'Billing and shipping address' | 'Billing and shipping information' | 'Cancel' | 'Cart' | 'Changing your address is currently not possible. Please contact customer support to change your address.' | 'Chosen filters' | 'City' | 'Clear filters' | 'Clear' | 'Click the button below to continue shopping.' | 'Company name' | 'Conceal value' | 'Continue shopping' | 'Continue' | 'Cost overview' | 'Country' | 'create account' | 'Create new list' | 'Delivery date' | 'Delivery expected in {0} {1}' | 'Double check your spelling' | 'Downloads' | 'Easily add your favorite products' | 'Edit billing address' | 'Edit shipping address' | 'Email' | 'Excl. VAT' | 'Explore by categories' | 'Exploring our products by category' | 'facet.categories' | 'facet.height' | 'facet.weight' | 'Features' | 'First name' | 'Forgot password?' | 'Fulfillment method' | 'General' | 'Hide filters' | 'Home' | 'Incl. VAT' | 'Includes' | 'Industry' | 'Information' | 'Language' | 'Last name' | 'List name already exists' | 'New list name' | 'New user?' | 'of' | 'Or sign in as guest' | 'Order number' | 'Order' | 'Order confirmation' | 'Order date' | 'Order number' | 'Order' | 'Pay by invoice' | 'Pay' | 'Payment method' | 'Payment' | 'Password' | 'pc' | 'Phone' | 'Pick up' | 'Pickup address' | 'Please enter a valid e-mail address' | 'Please enter a valid phone number' | 'Please Sign In' | 'PO Number' | 'Popular searches' | 'Postal Code' | 'Print' | 'Processing' | 'Product Features' | 'Product' | 'Products' | 'Quick access' | 'Recent searches' | 'Recently viewed' | 'Requested delivery date' | 'Remember me' | 'Remove all' | 'Requested delivery date' | 'Reveal value' | 'Review and payment' | 'Save order' | 'Save' | 'Saved cart for later.' | 'Search' | 'Searching again using more general terms' | 'See all results' | 'Select a desired delivery date' | 'Select a list' | 'Selecting As Soon As Possible will enable us to send the products to you as they become available.' | 'Share your favorite list with others' | 'Ship' | 'Shipping address' | 'Shipping and handling' | 'Shipping details' | 'Shop more efficiently and quicker with a favorites list' | 'Show all' | 'Show filters' | 'Show less' | 'Show' | 'sign in' | 'Sonic address' | 'Sonic Equipment' | 'Sorry, there are no products found' | 'Sorry, we could not find matches for' | 'Sort by' | 'sort.newest' | 'sort.price_asc' | 'sort.price_desc' | 'sort.relevance' | 'Specifications' | 'Submit' | 'Subtotal' | 'Suggestions' | 'tag.limited' | 'tag.new' | 'The expected delivery is an indication based on the product availability and the shipping location.' | 'The product has been added to your cart.' | 'The product has been removed from your cart.' | 'The product has been updated in your cart.' | 'There are no products in your shopping cart.' | 'Total amount is' | 'Total' | 'Total' | 'Try another search' | 'Try another search' | 'Unable to add the product to your cart.' | 'Unable to add the product to your cart.' | 'Unable to empty your cart.' | 'Unable to empty your cart.' | 'Unable to remove the product from your cart.' | 'Unable to remove the product from your cart.' | 'Unable to save cart for later.' | 'Unable to save cart for later.' | 'Unable to update the product in your cart.' | 'Unable to update the product in your cart.' | 'Updating address' | 'Use billing address' | 'Use fewer keywords' | 'Validating' | 'validation.badInput' | 'validation.customError' | 'validation.invalid' | 'validation.patternMismatch' | 'validation.rangeOverflow' | 'validation.rangeUnderflow' | 'validation.stepMismatch' | 'validation.tooLong' | 'validation.tooShort' | 'validation.typeMismatch' | 'validation.valid' | 'validation.valueMissing' | 'VAT Number' | 'VAT' | 'Welcome to Sonic Equipment. Please choose your country and language below.' | 'What are you searching for?' | 'You could try checking the spelling of your search query' | 'You could try exploring our products by category' | 'You could try' | 'You must ' | 'Your cart has been emptied.' | 'Your favorites are available on multiple devices' | 'Your shopping cart is still empty';
1
+ export type TranslationId = "'{0}' in all products" | "Try 'Search' and try to find the product you're looking for" | "Unfortnately, We found no articles for your search '{0}'" | ' to your account to manage your lists.' | 'Add order notes' | 'Add to list' | 'Address' | 'Amount: {0}' | 'An error occurred while processing your payment. Please try again.' | 'An unexpected error occured' | 'Are you looking for information about our service? Please visit our customer support page' | 'Are you sure you want to remove all items from your cart?' | 'Are you sure you want to remove this item from your cart?' | 'article' | 'articles' | 'As soon as possible' | 'Attention' | 'Billing address' | 'Billing and shipping address' | 'Billing and shipping information' | 'Cancel' | 'Cart' | 'Changing your address is currently not possible. Please contact customer support to change your address.' | 'Chosen filters' | 'City' | 'Clear filters' | 'Clear' | 'Click the button below to continue shopping.' | 'Company name' | 'Conceal value' | 'Continue shopping' | 'Continue' | 'Cost overview' | 'Country' | 'create account' | 'Create new list' | 'Delivery date' | 'Delivery expected in {0} {1}' | 'Double check your spelling' | 'Downloads' | 'Easily add your favorite products' | 'Edit billing address' | 'Edit shipping address' | 'Email' | 'Excl. VAT' | 'Explore by categories' | 'Exploring our products by category' | 'facet.categories' | 'facet.height' | 'facet.weight' | 'Features' | 'First name' | 'Forgot password?' | 'Fulfillment method' | 'General' | 'Hide filters' | 'Home' | 'Incl. VAT' | 'Includes' | 'Industry' | 'Information' | 'Language' | 'Last name' | 'List name already exists' | 'New list name' | 'New user?' | 'of' | 'Or sign in as guest' | 'Order number' | 'Order' | 'Order confirmation' | 'Order date' | 'Order number' | 'Order' | 'Pay by invoice' | 'Pay' | 'Payment method' | 'Payment' | 'Password' | 'pc' | 'Phone' | 'Pick up' | 'Pickup address' | 'Please enter a valid e-mail address' | 'Please enter a valid phone number' | 'Please Sign In' | 'PO Number' | 'Popular searches' | 'Postal Code' | 'Print' | 'Processing' | 'Product Features' | 'Product' | 'Products' | 'Quick access' | 'Recent searches' | 'Recently viewed' | 'Requested delivery date' | 'Remember me' | 'Remove all' | 'Requested delivery date' | 'Reveal value' | 'Review and payment' | 'Save order' | 'Save' | 'Saved cart for later.' | 'Search' | 'Searching again using more general terms' | 'See all results' | 'Select a desired delivery date' | 'Select a list' | 'Selecting As Soon As Possible will enable us to send the products to you as they become available.' | 'Share your favorite list with others' | 'Ship' | 'Shipping address' | 'Shipping and handling' | 'Shipping details' | 'Shop more efficiently and quicker with a favorites list' | 'Show all' | 'Show filters' | 'Show less' | 'Show' | 'sign in' | 'Sonic address' | 'Sonic Equipment' | 'Sorry, there are no products found' | 'Sorry, we could not find matches for' | 'Sort by' | 'sort.newest' | 'sort.price_asc' | 'sort.price_desc' | 'sort.relevance' | 'Specifications' | 'Submit' | 'Subtotal' | 'Suggestions' | 'tag.limited' | 'tag.new' | 'The expected delivery is an indication based on the product availability and the shipping location.' | 'The product has been added to your cart.' | 'The product has been removed from your cart.' | 'The product has been updated in your cart.' | 'There are no products in your shopping cart.' | 'Toggle navigation menu' | 'Total amount is' | 'Total' | 'Total' | 'Try another search' | 'Try another search' | 'Unable to add the product to your cart.' | 'Unable to add the product to your cart.' | 'Unable to empty your cart.' | 'Unable to empty your cart.' | 'Unable to remove the product from your cart.' | 'Unable to remove the product from your cart.' | 'Unable to save cart for later.' | 'Unable to save cart for later.' | 'Unable to update the product in your cart.' | 'Unable to update the product in your cart.' | 'Updating address' | 'Use billing address' | 'Use fewer keywords' | 'Validating' | 'validation.badInput' | 'validation.customError' | 'validation.invalid' | 'validation.patternMismatch' | 'validation.rangeOverflow' | 'validation.rangeUnderflow' | 'validation.stepMismatch' | 'validation.tooLong' | 'validation.tooShort' | 'validation.typeMismatch' | 'validation.valid' | 'validation.valueMissing' | 'VAT Number' | 'VAT' | 'Welcome to Sonic Equipment. Please choose your country and language below.' | 'What are you searching for?' | 'You could try checking the spelling of your search query' | 'You could try exploring our products by category' | 'You could try' | 'You must ' | 'Your cart has been emptied.' | 'Your favorites are available on multiple devices' | 'Your shopping cart is still empty';
@@ -6,7 +6,7 @@ import styles from './billing-and-invoice-information.module.css.js';
6
6
 
7
7
  function BillingAndInvoiceInformation({ billToAddress, shipToAddress, }) {
8
8
  const t = useFormattedMessage();
9
- return (jsxs("div", { className: styles['billing-and-invoice-information'], children: [jsx("section", { className: styles.section, children: jsx(InfoDisplay, { id: "billing-address", label: t('Billing address'), value: jsx(Address, { ...billToAddress }) }) }), jsx("section", { className: styles.section, children: jsx(InfoDisplay, { id: "shipping-address", label: t('Shipping address'), value: jsx(Address, { ...shipToAddress }) }) })] }));
9
+ return (jsxs("div", { className: styles['billing-and-invoice-information'], children: [jsx("section", { className: styles.section, children: jsx(InfoDisplay, { id: "billing-address", label: t('Billing address'), value: jsx(Address, { address: billToAddress, "data-test-selector": "orderConfirmationBillingInformation" }) }) }), jsx("section", { className: styles.section, children: jsx(InfoDisplay, { id: "shipping-address", label: t('Shipping address'), value: jsx(Address, { address: shipToAddress, "data-test-selector": "orderConfirmationShippingInformation" }) }) })] }));
10
10
  }
11
11
 
12
12
  export { BillingAndInvoiceInformation };
@@ -40,7 +40,7 @@ function OrderConfirmationPageContent({ cart, }) {
40
40
  },
41
41
  });
42
42
  return (jsx(Page, { breadCrumb: [{ href: CHECKOUT_PATHS.HOME, label: t('Home') }], title: t('Order confirmation'), children: jsx(CheckoutPageLayout, { actions: {
43
- primary: (jsx(RouteButton, { withArrow: true, "data-test-selector": "checkoutShippingCartTotalContinueButton", href: "/", children: jsx(FormattedMessage, { id: "Continue shopping" }) })),
43
+ primary: (jsx(RouteButton, { withArrow: true, "data-test-selector": "checkoutReviewAndSubmit_continueShopping", href: "/", children: jsx(FormattedMessage, { id: "Continue shopping" }) })),
44
44
  secondary: (jsxs(Fragment, { children: [cart.canSaveOrder && (jsx(RouteButton, { color: "secondary", onClick: () => {
45
45
  saveCartForLater.mutate({ cart });
46
46
  }, variant: "outline", children: jsx(FormattedMessage, { id: "Save order" }) })), jsx(PrintButton, {})] })),
@@ -22,7 +22,7 @@ function PaymentPageContent({ atp, cart, formId, hasAtp, isProcessing, isValidat
22
22
  label: t('Review and payment'),
23
23
  },
24
24
  ], title: t('Review and payment'), children: jsxs(CheckoutPageLayout, { actions: {
25
- primary: (jsx(Button, { withArrow: true, "data-test-selector": "checkoutShippingCartTotalContinueButton", form: formId, isDisabled: isProcessing, isLoading: isProcessing ? (jsx(FormattedMessage, { id: "Processing" })) : isValidating ? (jsx(FormattedMessage, { id: "Validating" })) : (false), type: "submit", children: jsx(FormattedMessage, { id: "Pay" }) })),
25
+ primary: (jsx(Button, { withArrow: true, "data-test-selector": "checkoutReviewAndSubmit_placeOrder", form: formId, isDisabled: isProcessing, isLoading: isProcessing ? (jsx(FormattedMessage, { id: "Processing" })) : isValidating ? (jsx(FormattedMessage, { id: "Validating" })) : (false), type: "submit", children: jsx(FormattedMessage, { id: "Pay" }) })),
26
26
  }, mobileSummary: jsx(CartTotalsSummary, { totalAmount: cart.orderGrandTotalDisplay }), overview: jsx(CartTotals, { deliveryDate: hasAtp ? undefined : cart.requestedDeliveryDate, fulfillmentMethod: cart.fulfillmentMethod, isPayByInvoice: (cart.paymentOptions?.paymentMethods?.length || 1) <= 1 &&
27
27
  cart.paymentMethod?.name === 'PBI', shippingCost: cart.shippingAndHandlingDisplay, subtotal: cart.orderSubTotalDisplay, tax: cart.totalTaxDisplay, total: cart.orderGrandTotalDisplay, vatPercentage: cart.cartLines?.[0]?.pricing?.vatRate || 0 }), children: [jsx(CheckoutPageSection, { hasBorder: false, title: jsx(FormattedMessage, { id: "Payment" }), children: jsx(CheckoutPageSectionContent, { children: jsx(Payment, { atp: atp, cart: cart, form: formId, onPaymentComplete: onPaymentComplete, onProcessing: setIsProcessing, onValidating: setIsValidating }) }) }), jsx(CheckoutPageSection, { hasBorder: false, title: jsx(FormattedMessage, { id: "Order" }), children: jsx(CheckoutPageSectionContent, { stretch: true, children: jsx(OrderLineList, { children: cart.cartLines?.map(cartLine => (jsx(OrderLineCard, { deliveryDate: cartLine.atp?.date, href: cartLine.productUri, image: {
28
28
  fit: 'contain',
@@ -22,7 +22,31 @@ function ReadOnlyAddresses({ billTo, isLoading, isPickup, notes, onSubmit, shipT
22
22
  onSubmit({
23
23
  notes: formData.get('notes')?.toString() || '',
24
24
  });
25
- }, children: [jsxs(CheckoutPageSection, { title: jsx(FormattedMessage, { id: "Billing address" }), children: [jsx(CheckoutPageSectionLink, { children: jsxs(RouteLink, { color: "secondary", href: ACCOUNT_ADDRESSES_PATH, isDisabled: isLoading, children: [jsx(FormattedMessage, { id: "Edit billing address" }), " >"] }) }), jsxs(CheckoutPageSectionContent, { children: [billTo && (jsx(Address, { address1: billTo.address1, address2: billTo.address2, address3: billTo.address3, city: billTo.city, companyName: billTo.companyName, country: billTo.country?.name, email: billTo.email, firstName: billTo.firstName, lastName: billTo.lastName, phone: billTo.phone, postalCode: billTo.postalCode })), jsx("div", { className: styles.notes, children: jsx(TextField, { defaultValue: notes, isDisabled: isLoading, isMultiline: true, label: t('Add order notes'), name: "notes", rows: 3, showLabel: true }) })] })] }), jsxs(CheckoutPageSection, { title: jsx(FormattedMessage, { id: isPickup ? 'Pickup address' : 'Shipping address' }), children: [!isPickup && (jsx(CheckoutPageSectionLink, { children: jsxs(RouteLink, { color: "secondary", href: ACCOUNT_ADDRESSES_PATH, isDisabled: isLoading, children: [jsx(FormattedMessage, { id: "Edit shipping address" }), " >"] }) })), jsx(CheckoutPageSectionContent, { children: isPickup ? (jsx(SonicAddress, {})) : (jsxs(Fragment, { children: [jsx(Checkbox, { className: styles['use-invoice-checkbox'], "data-test-selector": "checkboxUseBillingAddress", isDisabled: true, isSelected: true, children: jsx(FormattedMessage, { id: "Use billing address" }) }), shipTo && (jsx(Address, { address1: shipTo.address1, address2: shipTo.address2, address3: shipTo.address3, city: shipTo.city, companyName: shipTo.companyName, country: shipTo.country?.name, email: shipTo.email, firstName: shipTo.firstName, lastName: shipTo.lastName, phone: shipTo.phone, postalCode: shipTo.postalCode }))] })) })] })] }));
25
+ }, children: [jsxs(CheckoutPageSection, { title: jsx(FormattedMessage, { id: "Billing address" }), children: [jsx(CheckoutPageSectionLink, { children: jsxs(RouteLink, { color: "secondary", href: ACCOUNT_ADDRESSES_PATH, isDisabled: isLoading, children: [jsx(FormattedMessage, { id: "Edit billing address" }), " >"] }) }), jsxs(CheckoutPageSectionContent, { children: [billTo && (jsx(Address, { address: {
26
+ address1: billTo.address1,
27
+ address2: billTo.address2,
28
+ address3: billTo.address3,
29
+ city: billTo.city,
30
+ companyName: billTo.companyName,
31
+ country: billTo.country?.name,
32
+ email: billTo.email,
33
+ firstName: billTo.firstName,
34
+ lastName: billTo.lastName,
35
+ phone: billTo.phone,
36
+ postalCode: billTo.postalCode,
37
+ } })), jsx("div", { className: styles.notes, children: jsx(TextField, { defaultValue: notes, isDisabled: isLoading, isMultiline: true, label: t('Add order notes'), name: "notes", rows: 3, showLabel: true }) })] })] }), jsxs(CheckoutPageSection, { title: jsx(FormattedMessage, { id: isPickup ? 'Pickup address' : 'Shipping address' }), children: [!isPickup && (jsx(CheckoutPageSectionLink, { children: jsxs(RouteLink, { color: "secondary", href: ACCOUNT_ADDRESSES_PATH, isDisabled: isLoading, children: [jsx(FormattedMessage, { id: "Edit shipping address" }), " >"] }) })), jsx(CheckoutPageSectionContent, { children: isPickup ? (jsx(SonicAddress, {})) : (jsxs(Fragment, { children: [jsx(Checkbox, { className: styles['use-invoice-checkbox'], "data-test-selector": "checkboxUseBillingAddress", isDisabled: true, isSelected: true, children: jsx(FormattedMessage, { id: "Use billing address" }) }), shipTo && (jsx(Address, { address: {
38
+ address1: shipTo.address1,
39
+ address2: shipTo.address2,
40
+ address3: shipTo.address3,
41
+ city: shipTo.city,
42
+ companyName: shipTo.companyName,
43
+ country: shipTo.country?.name,
44
+ email: shipTo.email,
45
+ firstName: shipTo.firstName,
46
+ lastName: shipTo.lastName,
47
+ phone: shipTo.phone,
48
+ postalCode: shipTo.postalCode,
49
+ } }))] })) })] })] }));
26
50
  }
27
51
 
28
52
  export { ReadOnlyAddresses };
package/dist/styles.css CHANGED
@@ -4754,6 +4754,152 @@ button.swiper-pagination-bullet {
4754
4754
  transform: translateY(-100%);
4755
4755
  }
4756
4756
 
4757
+ .hamburger-button-module-xER52 {
4758
+ --width: 24px;
4759
+ --padding-inline: 2px;
4760
+ --transition-duration: 200ms;
4761
+
4762
+ position: relative;
4763
+ display: block;
4764
+ width: var(--width);
4765
+ border: none;
4766
+ aspect-ratio: 1;
4767
+ background: none;
4768
+ cursor: pointer;
4769
+ }
4770
+
4771
+ .hamburger-button-module-xER52 span {
4772
+ position: absolute;
4773
+ left: 1px;
4774
+ display: block;
4775
+ width: calc(var(--width) - 2 * var(--padding-inline));
4776
+ height: 8%;
4777
+ background-color: var(--color-black);
4778
+ transition-duration: var(--transition-duration);
4779
+ transition-property: transform, top;
4780
+ transition-timing-function: ease;
4781
+ }
4782
+
4783
+ .hamburger-button-module-xER52 span:nth-child(1) {
4784
+ top: calc(var(--width) / 6 - 1px);
4785
+ transition-delay: 0s, var(--transition-duration);
4786
+ }
4787
+
4788
+ .hamburger-button-module-xER52 span:nth-child(2) {
4789
+ top: calc(var(--width) / 2 - 1px);
4790
+ opacity: 1;
4791
+ transition-delay: var(--transition-duration);
4792
+ transition-property: opacity;
4793
+ }
4794
+
4795
+ .hamburger-button-module-xER52 span:nth-child(3) {
4796
+ top: calc(var(--width) / 6 * 5 - 1px);
4797
+ transition-delay: 0s, var(--transition-duration);
4798
+ }
4799
+
4800
+ .hamburger-button-module-xER52:where(.hamburger-button-module-7yoVH) span:nth-child(1) {
4801
+ top: calc(var(--width) / 2 - 1px);
4802
+ transform: rotate(45deg);
4803
+ transition-delay: var(--transition-duration), 0s;
4804
+ }
4805
+
4806
+ .hamburger-button-module-xER52:where(.hamburger-button-module-7yoVH) span:nth-child(2) {
4807
+ opacity: 0;
4808
+ transition-delay: var(--transition-duration);
4809
+ transition-property: opacity;
4810
+ }
4811
+
4812
+ .hamburger-button-module-xER52:where(.hamburger-button-module-7yoVH) span:nth-child(3) {
4813
+ top: calc(var(--width) / 2 - 1px);
4814
+ transform: rotate(-45deg);
4815
+ transition-delay: var(--transition-duration), 0s;
4816
+ }
4817
+
4818
+ .header-layout-module-VlTuk {
4819
+ display: grid;
4820
+ align-items: center;
4821
+ background-color: var(--color-white);
4822
+ gap: var(--space-8);
4823
+ grid-template-columns: 1fr auto 1fr;
4824
+ padding-block: var(--space-4);
4825
+ padding-inline: var(--space-16);
4826
+ }
4827
+
4828
+ .header-layout-module-VlTuk,
4829
+ .header-layout-module-VlTuk * {
4830
+ box-sizing: border-box;
4831
+ }
4832
+
4833
+ .header-layout-module-VlTuk .header-layout-module-oKPyL {
4834
+ width: var(--space-100);
4835
+ }
4836
+
4837
+ .header-layout-module-VlTuk .header-layout-module-aBOJL {
4838
+ display: flex;
4839
+ }
4840
+
4841
+ .header-layout-module-VlTuk .header-layout-module--ICLK {
4842
+ display: none;
4843
+ place-items: center;
4844
+ }
4845
+
4846
+ .header-layout-module-VlTuk .header-layout-module-HjY-a {
4847
+ display: flex;
4848
+ margin-left: auto;
4849
+ }
4850
+
4851
+ .header-layout-module-VlTuk .header-layout-module-HjY-a .header-layout-module-fP3a6 {
4852
+ display: none;
4853
+ }
4854
+
4855
+ .header-layout-module-VlTuk .header-layout-module-HjY-a .header-layout-module-4Qp5b {
4856
+ display: flex;
4857
+ }
4858
+
4859
+ @media (width >= 1024px) {.header-layout-module-VlTuk {
4860
+ padding-block: var(--space-24);
4861
+ padding-inline: var(--space-32)
4862
+ }
4863
+
4864
+ .header-layout-module-VlTuk .header-layout-module-oKPyL {
4865
+ margin-bottom: var(--space-8);
4866
+ }
4867
+
4868
+ .header-layout-module-VlTuk .header-layout-module-aBOJL {
4869
+ display: none;
4870
+ }
4871
+
4872
+ .header-layout-module-VlTuk .header-layout-module--ICLK {
4873
+ display: block;
4874
+ }
4875
+ .header-layout-module-VlTuk .header-layout-module-HjY-a .header-layout-module-fP3a6 {
4876
+ display: block;
4877
+ }
4878
+ }
4879
+
4880
+ .sonic-logo-module-5zzhF {
4881
+ display: block;
4882
+ }
4883
+
4884
+ .sonic-logo-module-5zzhF,
4885
+ .sonic-logo-module-5zzhF * {
4886
+ box-sizing: border-box;
4887
+ }
4888
+
4889
+ .sonic-logo-module-5zzhF .sonic-logo-module-9Mpdq {
4890
+ display: block;
4891
+ width: auto;
4892
+ height: auto;
4893
+ }
4894
+
4895
+ .sonic-logo-module-5zzhF .sonic-logo-module-9Mpdq .sonic-logo-module-Pa7pF {
4896
+ fill: var(--color-black);
4897
+ }
4898
+
4899
+ .sonic-logo-module-5zzhF .sonic-logo-module-9Mpdq .sonic-logo-module-vTCO3 {
4900
+ fill: var(--color-brand-red);
4901
+ }
4902
+
4757
4903
  .feature-list-module-cxc8U {
4758
4904
  display: grid;
4759
4905
  grid-template-columns: auto minmax(50%, 1fr);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonic-equipment/ui",
3
- "version": "134.0.0",
3
+ "version": "135.0.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "engines": {