@sonic-equipment/ui 259.0.3 → 260.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.
- package/dist/algolia/algolia-active-categories.js +2 -2
- package/dist/algolia/algolia-categories-filters.js +2 -2
- package/dist/badges/badge/badge.d.ts +5 -3
- package/dist/badges/badge/badge.js +4 -4
- package/dist/badges/badge/badge.module.css.js +1 -1
- package/dist/badges/badge/icon-with-badge/icon-with-badge.d.ts +11 -6
- package/dist/badges/badge/icon-with-badge/icon-with-badge.js +5 -2
- package/dist/badges/badge/icon-with-badge/icon-with-badge.module.css.js +1 -1
- package/dist/base.css +2 -2
- package/dist/breadcrumbs/breadcrumb.js +3 -4
- package/dist/buttons/add-to-cart-button/add-to-cart-button.js +2 -2
- package/dist/buttons/button/button.js +2 -2
- package/dist/buttons/close-button/close-button.d.ts +12 -0
- package/dist/buttons/close-button/close-button.js +11 -0
- package/dist/buttons/close-button/close-button.module.css.js +3 -0
- package/dist/buttons/favorite/favorite-button.js +3 -3
- package/dist/buttons/icon-button/icon-button.d.ts +13 -5
- package/dist/buttons/icon-button/icon-button.js +6 -5
- package/dist/buttons/icon-button/icon-button.module.css.js +1 -1
- package/dist/buttons/link/link.d.ts +2 -0
- package/dist/buttons/link/link.js +4 -7
- package/dist/cards/orderline-card/connected-remove-button.js +1 -2
- package/dist/carousel/carousel-navigation-button.js +2 -3
- package/dist/collapsables/accordion/accordion-item.js +2 -3
- package/dist/collapsables/show-all/show-all.js +2 -2
- package/dist/collapsables/unmounter/utils.js +4 -1
- package/dist/country-language-selection-list/connected-country-language-selection-list.d.ts +1 -0
- package/dist/country-language-selection-list/connected-country-language-selection-list.js +268 -0
- package/dist/country-language-selection-list/country-language-selection-list.d.ts +18 -0
- package/dist/country-language-selection-list/country-language-selection-list.js +54 -0
- package/dist/country-language-selection-list/country-language-selection-list.module.css.js +3 -0
- package/dist/country-language-selector/connected-country-language-selector.d.ts +10 -0
- package/dist/country-language-selector/connected-country-language-selector.js +129 -0
- package/dist/country-language-selector/country-language-selector.d.ts +18 -0
- package/dist/country-language-selector/country-language-selector.js +52 -0
- package/dist/country-language-selector/country-language-selector.module.css.js +3 -0
- package/dist/country-language-selector-button/connected-country-language-selector-button.d.ts +1 -0
- package/dist/country-language-selector-button/connected-country-language-selector-button.js +22 -0
- package/dist/country-language-selector-button/country-language-selector-button.d.ts +7 -0
- package/dist/country-language-selector-button/country-language-selector-button.js +18 -0
- package/dist/country-language-selector-button/country-language-selector-button.module.css.js +3 -0
- package/dist/country-selector/country-selector-trigger/country-selector-trigger.js +2 -2
- package/dist/country-selector/country-selector-trigger/country-selector-trigger.module.css.js +1 -1
- package/dist/country-selector/use-countries-languages.d.ts +2 -2
- package/dist/country-selector/use-countries-languages.js +1 -1
- package/dist/delivery-time/delivery-time.js +1 -1
- package/dist/display/details/details.js +2 -2
- package/dist/exports.d.ts +71 -3
- package/dist/filters/active-filters/active-filters.js +1 -2
- package/dist/filters/active-filters/active-filters.module.css.js +1 -1
- package/dist/filters/pagination/pagination.js +1 -3
- package/dist/filters/pagination/pagination.module.css.js +1 -1
- package/dist/flag/flag.d.ts +8 -0
- package/dist/flag/flag.js +11 -0
- package/dist/flag/flag.module.css.js +3 -0
- package/dist/flags/flag-ad.d.ts +1 -0
- package/dist/flags/flag-ad.js +7 -0
- package/dist/flags/flag-ae.d.ts +1 -0
- package/dist/flags/flag-ae.js +7 -0
- package/dist/flags/flag-al.d.ts +1 -0
- package/dist/flags/flag-al.js +7 -0
- package/dist/flags/flag-at.d.ts +1 -0
- package/dist/flags/flag-at.js +7 -0
- package/dist/flags/flag-ba.d.ts +1 -0
- package/dist/flags/flag-ba.js +7 -0
- package/dist/flags/flag-be.d.ts +1 -0
- package/dist/flags/flag-be.js +7 -0
- package/dist/flags/flag-bg.d.ts +1 -0
- package/dist/flags/flag-bg.js +7 -0
- package/dist/flags/flag-br.d.ts +1 -0
- package/dist/flags/flag-br.js +7 -0
- package/dist/flags/flag-ca.d.ts +1 -0
- package/dist/flags/flag-ca.js +7 -0
- package/dist/flags/flag-ch.d.ts +1 -0
- package/dist/flags/flag-ch.js +7 -0
- package/dist/flags/flag-cy.d.ts +1 -0
- package/dist/flags/flag-cy.js +7 -0
- package/dist/flags/flag-cz.d.ts +1 -0
- package/dist/flags/flag-cz.js +7 -0
- package/dist/flags/flag-de.d.ts +1 -0
- package/dist/flags/flag-de.js +7 -0
- package/dist/flags/flag-dj.d.ts +1 -0
- package/dist/flags/flag-dj.js +7 -0
- package/dist/flags/flag-dk.d.ts +1 -0
- package/dist/flags/flag-dk.js +7 -0
- package/dist/flags/flag-ec.d.ts +1 -0
- package/dist/flags/flag-ec.js +7 -0
- package/dist/flags/flag-ee.d.ts +1 -0
- package/dist/flags/flag-ee.js +7 -0
- package/dist/flags/flag-es.d.ts +1 -0
- package/dist/flags/flag-es.js +7 -0
- package/dist/flags/flag-eu.d.ts +1 -0
- package/dist/flags/flag-eu.js +7 -0
- package/dist/flags/flag-fi.d.ts +1 -0
- package/dist/flags/flag-fi.js +7 -0
- package/dist/flags/flag-fr.d.ts +1 -0
- package/dist/flags/flag-fr.js +7 -0
- package/dist/flags/flag-gb.d.ts +1 -0
- package/dist/flags/flag-gb.js +7 -0
- package/dist/flags/flag-gr.d.ts +1 -0
- package/dist/flags/flag-gr.js +7 -0
- package/dist/flags/flag-hr.d.ts +1 -0
- package/dist/flags/flag-hr.js +7 -0
- package/dist/flags/flag-hu.d.ts +1 -0
- package/dist/flags/flag-hu.js +7 -0
- package/dist/flags/flag-ie.d.ts +1 -0
- package/dist/flags/flag-ie.js +7 -0
- package/dist/flags/flag-iq.d.ts +1 -0
- package/dist/flags/flag-iq.js +7 -0
- package/dist/flags/flag-is.d.ts +1 -0
- package/dist/flags/flag-is.js +7 -0
- package/dist/flags/flag-it.d.ts +1 -0
- package/dist/flags/flag-it.js +7 -0
- package/dist/flags/flag-kw.d.ts +1 -0
- package/dist/flags/flag-kw.js +7 -0
- package/dist/flags/flag-kz.d.ts +1 -0
- package/dist/flags/flag-kz.js +7 -0
- package/dist/flags/flag-lb.d.ts +1 -0
- package/dist/flags/flag-lb.js +7 -0
- package/dist/flags/flag-lt.d.ts +1 -0
- package/dist/flags/flag-lt.js +7 -0
- package/dist/flags/flag-lu.d.ts +1 -0
- package/dist/flags/flag-lu.js +7 -0
- package/dist/flags/flag-lv.d.ts +1 -0
- package/dist/flags/flag-lv.js +7 -0
- package/dist/flags/flag-ma.d.ts +1 -0
- package/dist/flags/flag-ma.js +7 -0
- package/dist/flags/flag-mc.d.ts +1 -0
- package/dist/flags/flag-mc.js +7 -0
- package/dist/flags/flag-md.d.ts +1 -0
- package/dist/flags/flag-md.js +7 -0
- package/dist/flags/flag-me.d.ts +1 -0
- package/dist/flags/flag-me.js +7 -0
- package/dist/flags/flag-mk.d.ts +1 -0
- package/dist/flags/flag-mk.js +7 -0
- package/dist/flags/flag-mt.d.ts +1 -0
- package/dist/flags/flag-mt.js +7 -0
- package/dist/flags/flag-mx.d.ts +1 -0
- package/dist/flags/flag-mx.js +7 -0
- package/dist/flags/flag-my.d.ts +1 -0
- package/dist/flags/flag-my.js +7 -0
- package/dist/flags/flag-nl.d.ts +1 -0
- package/dist/flags/flag-nl.js +7 -0
- package/dist/flags/flag-no.d.ts +1 -0
- package/dist/flags/flag-no.js +7 -0
- package/dist/flags/flag-pl.d.ts +1 -0
- package/dist/flags/flag-pl.js +7 -0
- package/dist/flags/flag-pt.d.ts +1 -0
- package/dist/flags/flag-pt.js +7 -0
- package/dist/flags/flag-ro.d.ts +1 -0
- package/dist/flags/flag-ro.js +7 -0
- package/dist/flags/flag-rs.d.ts +1 -0
- package/dist/flags/flag-rs.js +7 -0
- package/dist/flags/flag-sa.d.ts +1 -0
- package/dist/flags/flag-sa.js +7 -0
- package/dist/flags/flag-se.d.ts +1 -0
- package/dist/flags/flag-se.js +7 -0
- package/dist/flags/flag-sg.d.ts +1 -0
- package/dist/flags/flag-sg.js +7 -0
- package/dist/flags/flag-si.d.ts +1 -0
- package/dist/flags/flag-si.js +7 -0
- package/dist/flags/flag-sk.d.ts +1 -0
- package/dist/flags/flag-sk.js +7 -0
- package/dist/flags/flag-tr.d.ts +1 -0
- package/dist/flags/flag-tr.js +7 -0
- package/dist/flags/flag-tw.d.ts +1 -0
- package/dist/flags/flag-tw.js +7 -0
- package/dist/flags/flag-ua.d.ts +1 -0
- package/dist/flags/flag-ua.js +7 -0
- package/dist/flags/flag-us.d.ts +1 -0
- package/dist/flags/flag-us.js +7 -0
- package/dist/flags/flag-vn.d.ts +1 -0
- package/dist/flags/flag-vn.js +7 -0
- package/dist/flags/flag-xk.d.ts +1 -0
- package/dist/flags/flag-xk.js +7 -0
- package/dist/flags/flag-za.d.ts +1 -0
- package/dist/flags/flag-za.js +7 -0
- package/dist/flags/index.d.ts +1 -0
- package/dist/flags/index.js +88 -0
- package/dist/footer/connected-footer.d.ts +1 -3
- package/dist/footer/connected-footer.js +3 -5
- package/dist/forms/elements/checkbox/checkbox.module.css.js +1 -1
- package/dist/forms/elements/select/select.js +3 -4
- package/dist/forms/fields/number-field/number-field.js +2 -4
- package/dist/forms/fields/search-field/search-field.js +2 -2
- package/dist/forms/fields/select-field/select-field.d.ts +8 -1
- package/dist/forms/fields/select-field/select-field.js +30 -9
- package/dist/forms/fields/select-field/select-field.module.css.js +1 -1
- package/dist/forms/fields/text-field/password-reveal-toggle/password-reveal-toggle.js +2 -3
- package/dist/forms/layout/form/form.js +1 -1
- package/dist/global-search/search-input/search-input.js +5 -4
- package/dist/global-search/search-result-panel/sections/no-search.js +3 -4
- package/dist/global-search/search-result-panel/sections/with-results.js +4 -4
- package/dist/global-search/search-section/search-list-item.js +1 -2
- package/dist/header/buttons/account/connected-account-button.js +1 -2
- package/dist/header/buttons/cart/connected-cart-button.js +1 -2
- package/dist/header/buttons/favorites/connected-favorites-button.js +1 -3
- package/dist/header/buttons/hamburger/hamburger-button.js +1 -1
- package/dist/header/buttons/hamburger/hamburger-button.module.css.js +1 -1
- package/dist/header/buttons/search/search-button.js +1 -2
- package/dist/header/header.js +1 -1
- package/dist/header/link-list/navigation-link-list.js +2 -2
- package/dist/header/link-list/navigation-link-list.module.css.js +1 -1
- package/dist/header/sonic-logo/sonic-logo.js +7 -2
- package/dist/header/sonic-logo/sonic-logo.module.css.js +1 -1
- package/dist/icon/icon.d.ts +10 -0
- package/dist/icon/icon.js +11 -0
- package/dist/icon/icon.module.css.js +3 -0
- package/dist/icons/glyph/glyphs-arrow-boldcaps-left-icon.js +0 -1
- package/dist/icons/glyph/glyphs-arrow-boldcaps-right-icon.js +0 -1
- package/dist/icons/glyph/glyphs-chevrons-bold-down-icon.js +0 -1
- package/dist/icons/glyph/glyphs-chevrons-bold-left-icon.js +7 -0
- package/dist/icons/glyph/glyphs-chevrons-bold-right-icon.js +0 -1
- package/dist/icons/glyph/glyphs-chevrons-bold-up-icon.js +0 -1
- package/dist/icons/glyph/glyphs-chevrons-slim-down-icon.js +0 -1
- package/dist/icons/glyph/glyphs-chevrons-slim-left-icon.js +0 -1
- package/dist/icons/glyph/glyphs-chevrons-slim-right-icon.js +0 -1
- package/dist/icons/glyph/glyphs-chevrons-slim-up-icon.js +7 -0
- package/dist/icons/index.d.ts +87 -0
- package/dist/icons/index.js +90 -0
- package/dist/icons/solid/solid-attention-icon.js +0 -1
- package/dist/icons/solid/solid-cart-icon.js +0 -1
- package/dist/icons/solid/solid-close-icon.js +0 -1
- package/dist/icons/solid/solid-edit-icon.js +0 -1
- package/dist/icons/solid/solid-favorite-icon.js +0 -1
- package/dist/icons/solid/solid-home-icon.js +0 -1
- package/dist/icons/solid/solid-information-icon.js +0 -1
- package/dist/icons/solid/solid-login-icon.js +0 -1
- package/dist/icons/solid/solid-logout-icon.js +0 -1
- package/dist/icons/solid/solid-news-icon.js +0 -1
- package/dist/icons/solid/solid-notice-icon.js +0 -1
- package/dist/icons/solid/solid-okay-icon.js +0 -1
- package/dist/icons/solid/solid-rating-icon.js +0 -1
- package/dist/icons/solid/solid-salecategory-icon.js +0 -1
- package/dist/icons/solid/solid-tag-icon.js +0 -1
- package/dist/icons/stroke/stroke-arrowdown-icon.d.ts +1 -0
- package/dist/icons/stroke/stroke-arrowleft-icon.d.ts +1 -0
- package/dist/icons/stroke/stroke-arrowleft-icon.js +7 -0
- package/dist/icons/stroke/stroke-arrowright-icon.d.ts +1 -0
- package/dist/icons/stroke/stroke-arrowright-icon.js +7 -0
- package/dist/icons/stroke/stroke-arrowup-icon.d.ts +1 -0
- package/dist/icons/stroke/stroke-categories-icon.js +0 -1
- package/dist/icons/stroke/stroke-checkmark-icon.js +0 -1
- package/dist/icons/stroke/stroke-closebox-icon.js +0 -1
- package/dist/icons/stroke/stroke-dehashed-icon.js +0 -1
- package/dist/icons/stroke/stroke-download-icon.js +0 -1
- package/dist/icons/stroke/stroke-event-icon.js +0 -1
- package/dist/icons/stroke/stroke-favorite-icon.js +0 -1
- package/dist/icons/stroke/stroke-filter-icon.js +0 -1
- package/dist/icons/stroke/stroke-hashed-icon.js +0 -1
- package/dist/icons/stroke/stroke-information-icon.js +0 -1
- package/dist/icons/stroke/stroke-minus-icon.js +0 -1
- package/dist/icons/stroke/stroke-notice-icon.js +7 -0
- package/dist/icons/stroke/stroke-plus-icon.js +0 -1
- package/dist/icons/stroke/stroke-recent-icon.js +0 -1
- package/dist/icons/stroke/stroke-search-icon.js +0 -1
- package/dist/icons/stroke/stroke-trash-icon.js +0 -1
- package/dist/index.js +72 -4
- package/dist/info-icon-tooltip/info-icon-tooltip.d.ts +3 -1
- package/dist/info-icon-tooltip/info-icon-tooltip.js +6 -8
- package/dist/intl/intl-context.d.ts +2 -0
- package/dist/intl/intl-provider.js +5 -0
- package/dist/intl/translation-id.d.ts +1 -1
- package/dist/intl/types.d.ts +3 -0
- package/dist/intl/types.js +6 -1
- package/dist/lists/download-document-list/download-document-list.js +4 -8
- package/dist/lists/download-document-list/download-document-list.module.css.js +1 -1
- package/dist/lists/feature-list/feature-list.js +5 -4
- package/dist/lists/feature-list/feature-list.module.css.js +1 -1
- package/dist/lists/icon-list/icon-list.d.ts +2 -1
- package/dist/lists/icon-list/icon-list.js +3 -2
- package/dist/lists/icon-list/icon-list.module.css.js +1 -1
- package/dist/lists/menu-list/menu-list-back-button.js +2 -2
- package/dist/lists/menu-list/menu-list-header.js +2 -2
- package/dist/lists/menu-list/menu-list-item.js +2 -2
- package/dist/lists/orderline-list/orderline-list.js +2 -2
- package/dist/lists/orderline-list/orderline-list.module.css.js +1 -1
- package/dist/media/image/image.js +1 -1
- package/dist/message/message.js +5 -8
- package/dist/modals/dialog/dialog.js +1 -4
- package/dist/modals/favorite/add-to-favorite-dialog.js +1 -1
- package/dist/modals/modal/modal.js +3 -2
- package/dist/modals/recover-password/recover-password-dialog.js +1 -1
- package/dist/modals/signin/sign-in-dialog.js +2 -2
- package/dist/navigation/mobile-navigation/mobile-navigation.js +2 -4
- package/dist/navigation/mobile-navigation/mobile-navigation.module.css.js +1 -1
- package/dist/notifications/announcements/announcement-list.js +7 -3
- package/dist/notifications/announcements/announcement-list.module.css.js +1 -1
- package/dist/notifications/announcements/announcement.js +12 -18
- package/dist/pages/checkout/payment-page/components/payment.js +1 -1
- package/dist/pages/checkout/shipping-page/components/edit-checkout-bill-to-address-form.js +1 -1
- package/dist/pages/countries-page/countries-page.d.ts +1 -0
- package/dist/pages/countries-page/countries-page.js +18 -0
- package/dist/pages/error-page/error-page.js +1 -1
- package/dist/pages/my-sonic/actions/change-customer/change-customer.js +2 -2
- package/dist/pages/my-sonic/navigation/my-sonic-desktop-navigation.js +2 -1
- package/dist/pages/my-sonic/navigation/my-sonic-navigation-items.d.ts +2 -2
- package/dist/pages/my-sonic/navigation/my-sonic-navigation-items.js +4 -8
- package/dist/pages/my-sonic/widgets/connected-address-book-widget.js +2 -2
- package/dist/shared/api/storefront/hooks/authentication/use-patch-session.d.ts +4 -1
- package/dist/shared/api/storefront/model/storefront.model.d.ts +4 -1
- package/dist/shared/error/default-error-view.js +2 -2
- package/dist/shared/hooks/use-resize-observer.js +1 -0
- package/dist/sidebar/sidebar.js +3 -2
- package/dist/sidebar/toggle-sidebar-button.js +2 -2
- package/dist/styles.css +1032 -686
- package/dist/table/elements/table-sort-button.js +2 -2
- package/dist/toast/toast.js +8 -10
- package/dist/tooltip/tooltip.js +3 -2
- package/dist/tooltip/tooltip.module.css.js +1 -1
- package/package.json +2 -1
- package/dist/icons/glyph/glyphs-arrow-blackcaps-right-icon.js +0 -8
- package/dist/icons/glyph/glyphs-arrow-semibold-right-icon.js +0 -8
- package/dist/navigation/account-icon/account-icon.d.ts +0 -5
- package/dist/navigation/account-icon/account-icon.js +0 -13
- package/dist/navigation/cart-icon/cart-icon.d.ts +0 -5
- package/dist/navigation/cart-icon/cart-icon.js +0 -13
- package/dist/navigation/favorite-icon/favorite-icon.d.ts +0 -5
- package/dist/navigation/favorite-icon/favorite-icon.js +0 -13
|
@@ -3,7 +3,7 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
3
3
|
import { useHierarchicalMenu } from 'react-instantsearch';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { Link } from '../buttons/link/link.js';
|
|
6
|
-
import {
|
|
6
|
+
import { Icon } from '../icon/icon.js';
|
|
7
7
|
import { useFormattedMessage } from '../intl/use-formatted-message.js';
|
|
8
8
|
import { FilterSection } from './filter-section.js';
|
|
9
9
|
import styles from './algolia-filter-panel.module.css.js';
|
|
@@ -32,7 +32,7 @@ function Categories({ categories, path: _path, }) {
|
|
|
32
32
|
const isActive = !category.data || !category.data.some(c => c.isRefined);
|
|
33
33
|
return (jsxs(Fragment, { children: [jsx("div", { className: filterSectionStyles['filter-section-item'], children: jsxs(Link, { hasUnderline: true, className: clsx(styles.category, {
|
|
34
34
|
[styles['is-active']]: isActive,
|
|
35
|
-
}), href: path, isDisabled: isActive, children: [jsx(
|
|
35
|
+
}), href: path, isDisabled: isActive, children: [jsx(Icon, { name: "Categories" }), jsx("span", { children: category.label })] }) }), category.data && (jsx(Categories, { categories: category.data, path: path }))] }, category.value));
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
|
|
@@ -4,7 +4,7 @@ import { Fragment } from 'react';
|
|
|
4
4
|
import { useHierarchicalMenu } from 'react-instantsearch';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import { Link } from '../buttons/link/link.js';
|
|
7
|
-
import {
|
|
7
|
+
import { Icon } from '../icon/icon.js';
|
|
8
8
|
import { useFormattedMessage } from '../intl/use-formatted-message.js';
|
|
9
9
|
import { transformAlgoliaCategoryData } from '../shared/model/category.js';
|
|
10
10
|
import { FilterSection } from './filter-section.js';
|
|
@@ -21,7 +21,7 @@ function AlgoliaCategoriesFilters() {
|
|
|
21
21
|
const categories = transformAlgoliaCategoryData(items);
|
|
22
22
|
return (jsx(FilterSection, { title: t('facet.categories'), variant: "default", children: categories.map((category, index) => (jsx(Fragment, { children: jsx("div", { className: filterSectionStyles['filter-section-item'], children: jsxs(Link, { hasUnderline: true, className: clsx(styles.category, {
|
|
23
23
|
[styles['is-active']]: category.isRefined,
|
|
24
|
-
}), color: "primary", onClick: () => refine(category.value), children: [jsx(
|
|
24
|
+
}), color: "primary", onClick: () => refine(category.value), children: [jsx(Icon, { name: "Categories" }), jsx("span", { children: category.name }), jsxs("span", { className: styles.count, children: ["(", category.count, ")"] })] }) }) }, category.href || index))) }));
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
export { AlgoliaCategoriesFilters };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
export type BadgeStatus = 'off' | 'on' | 'indeterminate' | 'disabled';
|
|
1
2
|
export interface BadgeProps {
|
|
2
|
-
|
|
3
|
+
className?: string;
|
|
3
4
|
count?: number;
|
|
4
|
-
|
|
5
|
+
label?: string;
|
|
6
|
+
status?: BadgeStatus;
|
|
5
7
|
}
|
|
6
|
-
export declare function Badge({
|
|
8
|
+
export declare function Badge({ className, count, label, status }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,15 +4,15 @@ import { useRef, useEffect } from 'react';
|
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import styles from './badge.module.css.js';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
function Badge({
|
|
7
|
+
// TODO: why is it animating on mount? and when I set lastCount to count by default it never animates
|
|
8
|
+
function Badge({ className, count, label, status }) {
|
|
9
9
|
const lastCount = useRef(null);
|
|
10
10
|
useEffect(() => {
|
|
11
11
|
lastCount.current = count;
|
|
12
12
|
}, [count]);
|
|
13
|
-
return (jsx("span", { "aria-label":
|
|
13
|
+
return (jsx("span", { "aria-label": label, className: clsx(styles.badge, status && styles[status], {
|
|
14
14
|
[styles['is-animating']]: count !== undefined && count !== lastCount.current,
|
|
15
|
-
}
|
|
15
|
+
}, className), children: count }, count));
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
export { Badge };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var styles = {"badge":"badge-module-X5Au9","
|
|
1
|
+
var styles = {"badge":"badge-module-X5Au9","disabled":"badge-module-LoUsz","off":"badge-module-qE3YB","indeterminate":"badge-module-YnGju","on":"badge-module-N4lDJ","is-animating":"badge-module-Q03Go","badge-pulse":"badge-module-uFNdF"};
|
|
2
2
|
|
|
3
3
|
export { styles as default };
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IconSize } from '../../../icon/icon';
|
|
2
|
+
import { IconName } from '../../../icons';
|
|
3
|
+
import { BadgeStatus } from '../badge';
|
|
2
4
|
export interface IconWithBadgeProps {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
badgeCount?: number;
|
|
6
|
+
badgeLabel?: string;
|
|
7
|
+
badgeStatus?: BadgeStatus;
|
|
8
|
+
className?: string;
|
|
9
|
+
icon: IconName;
|
|
10
|
+
label?: string;
|
|
11
|
+
size?: IconSize;
|
|
7
12
|
}
|
|
8
|
-
export declare function IconWithBadge({
|
|
13
|
+
export declare function IconWithBadge({ badgeCount, badgeLabel, badgeStatus, className, icon, label, size, }: IconWithBadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { Icon } from '../../../icon/icon.js';
|
|
5
|
+
import { Badge } from '../badge.js';
|
|
3
6
|
import styles from './icon-with-badge.module.css.js';
|
|
4
7
|
|
|
5
|
-
function IconWithBadge({
|
|
6
|
-
return (jsxs("div", { "aria-label":
|
|
8
|
+
function IconWithBadge({ badgeCount, badgeLabel, badgeStatus, className, icon, label, size, }) {
|
|
9
|
+
return (jsxs("div", { "aria-label": label, className: clsx(styles['icon-with-badge'], className), children: [jsx(Icon, { className: styles['icon'], name: icon, size: size }), (badgeCount || badgeStatus) && (jsx(Badge, { className: styles['badge'], count: badgeCount, label: badgeLabel, status: badgeStatus }))] }));
|
|
7
10
|
}
|
|
8
11
|
|
|
9
12
|
export { IconWithBadge };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var styles = {"icon-with-badge":"icon-with-badge-module-eCTIN","badge-
|
|
1
|
+
var styles = {"icon-with-badge":"icon-with-badge-module-eCTIN","icon":"icon-with-badge-module-z8YPt","badge":"icon-with-badge-module-X4Tjx"};
|
|
2
2
|
|
|
3
3
|
export { styles as default };
|
package/dist/base.css
CHANGED
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
shared/reset.module.css contains reset styles that overwrite this Spire CSS */
|
|
5
5
|
|
|
6
6
|
html {
|
|
7
|
-
height: 100%;
|
|
8
7
|
box-sizing: border-box;
|
|
8
|
+
block-size: 100%;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
body {
|
|
12
|
-
height: 100%;
|
|
13
12
|
margin: 0;
|
|
14
13
|
background: #fff;
|
|
14
|
+
block-size: 100%;
|
|
15
15
|
color: #000;
|
|
16
16
|
font-size: 16px;
|
|
17
17
|
font-weight: 400;
|
|
@@ -3,8 +3,7 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import { Breadcrumbs, Breadcrumb as Breadcrumb$1 } from 'react-aria-components';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { Link } from '../buttons/link/link.js';
|
|
6
|
-
import {
|
|
7
|
-
import { SolidHomeIcon } from '../icons/solid/solid-home-icon.js';
|
|
6
|
+
import { Icon } from '../icon/icon.js';
|
|
8
7
|
import styles from './breadcrumb.module.css.js';
|
|
9
8
|
|
|
10
9
|
function Breadcrumb({ links }) {
|
|
@@ -18,10 +17,10 @@ function Breadcrumb({ links }) {
|
|
|
18
17
|
const label = previousLink?.label || homeLink?.label;
|
|
19
18
|
if (!homeLink)
|
|
20
19
|
return null;
|
|
21
|
-
return (jsxs(Breadcrumbs, { className: styles.breadcrumbs, children: [jsx(Breadcrumb$1, { className: clsx(styles.breadcrumb, styles.short), children: jsxs(Link, { className: styles.link, href: href, isDisabled: false, title: label, children: [jsx(
|
|
20
|
+
return (jsxs(Breadcrumbs, { className: styles.breadcrumbs, children: [jsx(Breadcrumb$1, { className: clsx(styles.breadcrumb, styles.short), children: jsxs(Link, { className: styles.link, href: href, isDisabled: false, title: label, children: [jsx(Icon, { className: styles.icon, name: "ArrowLeft", size: "xxs" }), isHomeLink ? (jsx(Icon, { className: styles.icon, name: "HomeSolid", size: "xxs" })) : (jsx("span", { children: previousLink.label }))] }) }), jsx(Breadcrumb$1, { className: clsx(styles.breadcrumb, styles.long), children: jsx(Link, { className: styles.link, href: homeLink.href, title: homeLink.label, children: jsx(Icon, { className: clsx(styles['home-icon'], styles.icon), name: "HomeSolid", size: "xxs" }) }) }), linksWithoutFirst.map((link, index) => (jsx(BreadcrumbLongItem, { index: index, isDisabled: linksWithoutFirst.length - 1 === index, link: link }, link.href + link.label || index)))] }));
|
|
22
21
|
}
|
|
23
22
|
function BreadcrumbLongItem({ index, isDisabled, link, }) {
|
|
24
|
-
return (jsx(Breadcrumb$1, { className: clsx(styles.breadcrumb, styles.long), children: jsxs(Link, { className: styles.link, color: "secondary", href: link.href, isDisabled: isDisabled, title: link.label, children: [jsx(
|
|
23
|
+
return (jsx(Breadcrumb$1, { className: clsx(styles.breadcrumb, styles.long), children: jsxs(Link, { className: styles.link, color: "secondary", href: link.href, isDisabled: isDisabled, title: link.label, children: [jsx(Icon, { className: clsx(styles.icon, styles['previous-icon']), name: "ArrowLeft" }), link.label] }) }, index));
|
|
25
24
|
}
|
|
26
25
|
|
|
27
26
|
export { Breadcrumb };
|
|
@@ -3,7 +3,7 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import { useState, useRef, useEffect, useCallback, useMemo } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { NumberField } from '../../forms/fields/number-field/number-field.js';
|
|
6
|
-
import {
|
|
6
|
+
import { Icon } from '../../icon/icon.js';
|
|
7
7
|
import { useFormattedMessage } from '../../intl/use-formatted-message.js';
|
|
8
8
|
import { useDebouncedCallback } from '../../shared/hooks/use-debounced-callback.js';
|
|
9
9
|
import { ensureNumber } from '../../shared/utils/number.js';
|
|
@@ -53,7 +53,7 @@ function InitialState({ buttonRef, hasFocus, isDisabled, onAddToCart, onHasFocus
|
|
|
53
53
|
onHasFocussed?.();
|
|
54
54
|
}
|
|
55
55
|
}, [hasFocus, buttonRef, onHasFocussed]);
|
|
56
|
-
return (jsx(Button, { ref: buttonRef, condensed: true, "aria-label": t('Add to cart'), className: clsx(styles['initial'], isDisabled && styles['disabled']), icon: jsx(
|
|
56
|
+
return (jsx(Button, { ref: buttonRef, condensed: true, "aria-label": t('Add to cart'), className: clsx(styles['initial'], isDisabled && styles['disabled']), icon: jsx(Icon, { name: "CartSolid" }), onClick: () => {
|
|
57
57
|
if (!isDisabled)
|
|
58
58
|
onAddToCart();
|
|
59
59
|
}, size: "md" }));
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import { forwardRef, isValidElement } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
|
-
import {
|
|
5
|
+
import { Icon } from '../../icon/icon.js';
|
|
6
6
|
import { ProgressCircle } from '../../loading/progress-circle.js';
|
|
7
7
|
import { useRouteLink } from '../../shared/routing/use-route-link.js';
|
|
8
8
|
import buttonStyles from './button.module.css.js';
|
|
@@ -24,7 +24,7 @@ const Button = forwardRef(({ _pseudo = 'none', 'aria-label': ariaLabel, children
|
|
|
24
24
|
const showIconOnLeft = icon && iconPosition === 'left';
|
|
25
25
|
const showIconOnRight = icon && iconPosition === 'right';
|
|
26
26
|
const iconElement = icon && jsx("span", { className: buttonStyles.icon, children: icon });
|
|
27
|
-
const children = (jsxs(Fragment, { children: [showIconOnLeft && iconElement, jsx("span", { className: buttonStyles.children, children: isLoading ? (isLoading === true ? _children : isLoading) : _children }), withArrow && (jsx(
|
|
27
|
+
const children = (jsxs(Fragment, { children: [showIconOnLeft && iconElement, jsx("span", { className: buttonStyles.children, children: isLoading ? (isLoading === true ? _children : isLoading) : _children }), withArrow && (jsx(Icon, { className: buttonStyles['right-arrow-icon'], name: "ArrowRightThick" })), showIconOnRight && iconElement, isLoading && (jsx(ProgressCircle, { className: buttonStyles.spinner, size: "sm", variant: color === 'primary' ? 'white' : 'gray' }))] }));
|
|
28
28
|
if (href) {
|
|
29
29
|
// TODO: only button currently supports ref for now
|
|
30
30
|
return (jsx(RouteLinkElement, { "aria-label": ariaLabel, className: classNames, "data-disabled": isDisabled ? true : undefined, "data-test-selector": dataTestSelector, download: download, onClick: onClick, type: type, ...getRouteLinkProps(href, route), children: children }));
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MouseEvent } from 'react';
|
|
2
|
+
import { IconSize } from '../../icon/icon';
|
|
3
|
+
export interface CloseButtonProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
'data-test-selector'?: string;
|
|
6
|
+
isDisabled?: boolean;
|
|
7
|
+
label: string;
|
|
8
|
+
onClick?: (event: MouseEvent<HTMLElement>) => void;
|
|
9
|
+
size?: IconSize;
|
|
10
|
+
theme?: 'default' | 'light';
|
|
11
|
+
}
|
|
12
|
+
export declare function CloseButton({ className, 'data-test-selector': dataTestSelector, isDisabled, label, onClick, size, theme, }: CloseButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { IconButton } from '../icon-button/icon-button.js';
|
|
5
|
+
import styles from './close-button.module.css.js';
|
|
6
|
+
|
|
7
|
+
function CloseButton({ className, 'data-test-selector': dataTestSelector, isDisabled, label, onClick, size = 'md', theme = 'default', }) {
|
|
8
|
+
return (jsx(IconButton, { round: true, className: clsx(styles['close-button'], styles[`theme-${theme}`], className), "data-test-selector": dataTestSelector, icon: "Close", isDisabled: isDisabled, label: label, onClick: onClick, size: size, theme: theme }));
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export { CloseButton };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
|
-
import {
|
|
5
|
-
import { StrokeFavoriteIcon } from '../../icons/stroke/stroke-favorite-icon.js';
|
|
4
|
+
import { useFormattedMessage } from '../../intl/use-formatted-message.js';
|
|
6
5
|
import { IconButton } from '../icon-button/icon-button.js';
|
|
7
6
|
import styles from './favorite-button.module.css.js';
|
|
8
7
|
|
|
9
8
|
function FavoriteButton({ isDisabled, isFavorite, onClick: onClick, }) {
|
|
9
|
+
const t = useFormattedMessage();
|
|
10
10
|
return (jsx(IconButton, { className: clsx(styles['favorite-button'], {
|
|
11
11
|
[styles['is-favorite']]: isFavorite,
|
|
12
|
-
}),
|
|
12
|
+
}), icon: isFavorite ? 'FavoriteSolid' : 'Favorite', isDisabled: isDisabled, label: isFavorite ? t('Remove from favorites') : t('Add to favorites'), onClick: onClick }));
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export { FavoriteButton };
|
|
@@ -1,17 +1,25 @@
|
|
|
1
|
-
import { MouseEvent
|
|
1
|
+
import { MouseEvent } from 'react';
|
|
2
|
+
import { BadgeStatus } from '../../badges/badge/badge';
|
|
3
|
+
import { IconSize } from '../../icon/icon';
|
|
4
|
+
import { IconName } from '../../icons';
|
|
2
5
|
import { NavigateOptions } from '../../shared/routing/types';
|
|
3
6
|
export interface IconButtonProps {
|
|
4
|
-
|
|
7
|
+
badgeCount?: number;
|
|
8
|
+
badgeLabel?: string;
|
|
9
|
+
badgeStatus?: BadgeStatus;
|
|
10
|
+
children?: React.ReactNode;
|
|
5
11
|
className?: string;
|
|
6
|
-
color?: 'primary' | 'secondary' | 'current-color';
|
|
7
12
|
'data-test-selector'?: string;
|
|
8
13
|
href?: string;
|
|
14
|
+
icon?: IconName;
|
|
9
15
|
isDisabled?: boolean;
|
|
16
|
+
label: string;
|
|
10
17
|
onClick?: (event: MouseEvent<HTMLElement>) => void;
|
|
18
|
+
round?: boolean;
|
|
11
19
|
route?: NavigateOptions;
|
|
12
|
-
size?:
|
|
20
|
+
size?: IconSize;
|
|
13
21
|
target?: string;
|
|
14
|
-
|
|
22
|
+
theme?: 'default' | 'secondary' | 'light';
|
|
15
23
|
type?: 'button' | 'submit' | 'reset';
|
|
16
24
|
}
|
|
17
25
|
export declare const IconButton: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
|
+
import { IconWithBadge } from '../../badges/badge/icon-with-badge/icon-with-badge.js';
|
|
5
6
|
import { useRouteLink } from '../../shared/routing/use-route-link.js';
|
|
6
7
|
import styles from './icon-button.module.css.js';
|
|
7
8
|
|
|
8
|
-
const IconButton = forwardRef(({ children, className: _className,
|
|
9
|
+
const IconButton = forwardRef(({ badgeCount, badgeLabel, badgeStatus, children, className: _className, 'data-test-selector': dataTestSelector, href, icon, isDisabled, label, onClick, round, route, size = 'md', target, theme, type = 'button', ...rest }, ref) => {
|
|
9
10
|
const { getRouteLinkProps, RouteLinkElement } = useRouteLink();
|
|
10
11
|
const handleButtonClick = (e) => {
|
|
11
12
|
e.preventDefault();
|
|
12
13
|
e.stopPropagation();
|
|
13
14
|
onClick?.(e);
|
|
14
15
|
};
|
|
15
|
-
const className = clsx(styles['icon-button'], styles[
|
|
16
|
+
const className = clsx(styles['icon-button'], round && styles['round'], theme && styles[`theme-${theme}`], _className);
|
|
16
17
|
if (href) {
|
|
17
|
-
return (
|
|
18
|
+
return (jsxs(RouteLinkElement, { className: className, "data-disabled": isDisabled ? true : undefined, "data-test-selector": dataTestSelector, onClick: onClick, target: target, title: label, ...getRouteLinkProps(href, route), ...rest, children: [icon && !children && (jsx(IconWithBadge, { badgeCount: badgeCount, badgeLabel: badgeLabel, badgeStatus: badgeStatus, className: styles['icon'], icon: icon, label: label, size: size })), !icon && children && (jsx("div", { className: clsx(styles['icon'], styles[`size-${size}`]), children: children }))] }));
|
|
18
19
|
}
|
|
19
|
-
return (
|
|
20
|
+
return (jsxs("button", { ref: ref, className: className, "data-disabled": isDisabled ? true : undefined, "data-test-selector": dataTestSelector, disabled: isDisabled, onClick: handleButtonClick, title: label, type: type, ...rest, children: [icon && !children && (jsx(IconWithBadge, { badgeCount: badgeCount, badgeLabel: badgeLabel, badgeStatus: badgeStatus, className: styles['icon'], icon: icon, label: label, size: size })), !icon && children && (jsx("div", { className: clsx(styles['icon'], styles[`size-${size}`]), children: children }))] }));
|
|
20
21
|
});
|
|
21
22
|
IconButton.displayName = 'IconButton';
|
|
22
23
|
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var styles = {"icon-button":"icon-button-module-4PDK-","
|
|
1
|
+
var styles = {"icon-button":"icon-button-module-4PDK-","round":"icon-button-module-k3t1M","icon":"icon-button-module-VP7H-","size-xxs":"icon-button-module-QuuTN","size-xs":"icon-button-module-2lAhj","size-sm":"icon-button-module-m0IqA","size-md":"icon-button-module-mMrDe","size-lg":"icon-button-module-b8FFz","theme-secondary":"icon-button-module-DEmZc","theme-light":"icon-button-module-lEhMh"};
|
|
2
2
|
|
|
3
3
|
export { styles as default };
|
|
@@ -6,8 +6,10 @@ export interface LinkProps {
|
|
|
6
6
|
color?: 'primary' | 'secondary';
|
|
7
7
|
hasUnderline?: boolean;
|
|
8
8
|
href?: string;
|
|
9
|
+
hrefLang?: string;
|
|
9
10
|
id?: string;
|
|
10
11
|
isDisabled?: boolean;
|
|
12
|
+
lang?: string;
|
|
11
13
|
onClick?: MouseEventHandler<HTMLElement>;
|
|
12
14
|
onKeyUp?: (event: KeyboardEvent) => void;
|
|
13
15
|
rel?: string;
|
|
@@ -5,16 +5,13 @@ import clsx from 'clsx';
|
|
|
5
5
|
import { useRouteLink } from '../../shared/routing/use-route-link.js';
|
|
6
6
|
import styles from './link.module.css.js';
|
|
7
7
|
|
|
8
|
-
const Link = forwardRef(({ children, className: _className, color, hasUnderline, href, id, isDisabled, onClick, onKeyUp, rel, role, route, tabIndex, target, title, ...rest }, ref) => {
|
|
8
|
+
const Link = forwardRef(({ children, className: _className, color, hasUnderline, href, hrefLang, id, isDisabled, lang, onClick, onKeyUp, rel, role, route, tabIndex, target, title, ...rest }, ref) => {
|
|
9
9
|
const { getRouteLinkProps, RouteLinkElement } = useRouteLink();
|
|
10
|
-
const className = clsx(
|
|
11
|
-
[styles.hover]: Boolean(href || onClick),
|
|
12
|
-
[styles['has-underline']]: hasUnderline,
|
|
13
|
-
}, styles['link'], color && styles[color], _className);
|
|
10
|
+
const className = clsx(styles['link'], hasUnderline && styles['has-underline'], color && styles[color], _className);
|
|
14
11
|
if (href) {
|
|
15
|
-
return (jsx(RouteLinkElement, { ref: ref, className: className, "data-disabled": isDisabled ? true : undefined, id: id, onClick: onClick, onKeyUp: onKeyUp, rel: rel, role: role, tabIndex: isDisabled ? -1 : tabIndex, target: target, title: title, ...getRouteLinkProps(href, route), ...rest, children: children }));
|
|
12
|
+
return (jsx(RouteLinkElement, { ref: ref, className: className, "data-disabled": isDisabled ? true : undefined, hrefLang: hrefLang, id: id, lang: lang, onClick: onClick, onKeyUp: onKeyUp, rel: rel, role: role, tabIndex: isDisabled ? -1 : tabIndex, target: target, title: title, ...getRouteLinkProps(href, route), ...rest, children: children }));
|
|
16
13
|
}
|
|
17
|
-
return (jsx("button", { ref: ref, className: className, "data-disabled": isDisabled ? true : undefined, disabled: isDisabled ? true : undefined, id: id, onClick: onClick, onKeyUp: onKeyUp, rel: rel, role: role, tabIndex: isDisabled ? -1 : tabIndex, title: title, type: "button", ...rest, children: children }));
|
|
14
|
+
return (jsx("button", { ref: ref, className: className, "data-disabled": isDisabled ? true : undefined, disabled: isDisabled ? true : undefined, id: id, lang: lang, onClick: onClick, onKeyUp: onKeyUp, rel: rel, role: role, tabIndex: isDisabled ? -1 : tabIndex, title: title, type: "button", ...rest, children: children }));
|
|
18
15
|
});
|
|
19
16
|
Link.displayName = 'Link';
|
|
20
17
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { IconButton } from '../../buttons/icon-button/icon-button.js';
|
|
4
|
-
import { StrokeTrashIcon } from '../../icons/stroke/stroke-trash-icon.js';
|
|
5
4
|
import { useFormattedMessage } from '../../intl/use-formatted-message.js';
|
|
6
5
|
import { ConfirmationDialog } from '../../modals/confirmation/confirmation-dialog.js';
|
|
7
6
|
import { useDisclosure } from '../../shared/hooks/use-disclosure.js';
|
|
@@ -13,7 +12,7 @@ function ConnectedRemoveButton({ id: productId, onRemove: _onRemove, }) {
|
|
|
13
12
|
close();
|
|
14
13
|
_onRemove(productId);
|
|
15
14
|
}
|
|
16
|
-
return (jsxs(Fragment, { children: [jsx(IconButton, {
|
|
15
|
+
return (jsxs(Fragment, { children: [jsx(IconButton, { icon: "Trash", label: t('Remove'), onClick: open, theme: "secondary" }), jsx(ConfirmationDialog, { "data-test-selector": "removeItemFromCartConfirmationDialog", isOpen: isOpen, onCancel: close, onConfirm: onRemove, title: t('Are you sure you want to remove this item from your cart?') })] }));
|
|
17
16
|
}
|
|
18
17
|
|
|
19
18
|
export { ConnectedRemoveButton };
|
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
|
-
import {
|
|
6
|
-
import { GlyphsArrowBoldCapsRightIcon } from '../icons/glyph/glyphs-arrow-boldcaps-right-icon.js';
|
|
5
|
+
import { Icon } from '../icon/icon.js';
|
|
7
6
|
import styles from './carousel-navigation-button.module.css.js';
|
|
8
7
|
|
|
9
8
|
const CarouselNavigationButton = forwardRef(function NavigationButton({ className, direction, onClick }, ref) {
|
|
10
|
-
return (jsx("button", { ref: ref, className: clsx(styles['carousel-navigation-button'], className), onClick: () => onClick?.(direction), type: "button", children: direction === 'previous' ? (jsx(
|
|
9
|
+
return (jsx("button", { ref: ref, className: clsx(styles['carousel-navigation-button'], className), onClick: () => onClick?.(direction), type: "button", children: direction === 'previous' ? (jsx(Icon, { className: styles['icon'], name: "ArrowLeftThick", size: "xxs" })) : (jsx(Icon, { className: styles['icon'], name: "ArrowRightThick", size: "xxs" })) }));
|
|
11
10
|
});
|
|
12
11
|
|
|
13
12
|
export { CarouselNavigationButton };
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useEffect } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
|
-
import {
|
|
6
|
-
import { GlyphsChevronsSlimDownIcon } from '../../icons/glyph/glyphs-chevrons-slim-down-icon.js';
|
|
5
|
+
import { Icon } from '../../icon/icon.js';
|
|
7
6
|
import { useDisclosure } from '../../shared/hooks/use-disclosure.js';
|
|
8
7
|
import { useInert } from '../../shared/hooks/use-inert.js';
|
|
9
8
|
import { ensureArray } from '../../shared/utils/array.js';
|
|
@@ -31,7 +30,7 @@ function AccordionItem({ _pseudo = 'none', allowCollapse = true, allowToggle = t
|
|
|
31
30
|
}), disabled: isDisabled, id: id, onClick: () => {
|
|
32
31
|
if (allowToggle && allowCollapse)
|
|
33
32
|
toggle();
|
|
34
|
-
}, tabIndex: allowToggle ? 0 : -1, type: "button", children: [title, jsx(
|
|
33
|
+
}, tabIndex: allowToggle ? 0 : -1, type: "button", children: [title, size === 'lg' ? (jsx(Icon, { className: styles.icon, name: "ArrowDownBold", size: "xs" })) : (jsx(Icon, { className: styles.icon, name: "ArrowDown", size: "xs" }))] }) }), jsx("div", { ref: panelRef, "aria-hidden": !isOpen.toString(), "aria-labelledby": id, className: styles.panel, id: panelId, role: "region", children: children })] }));
|
|
35
34
|
}
|
|
36
35
|
|
|
37
36
|
export { AccordionItem };
|
|
@@ -3,7 +3,7 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import { useRef, useState } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { Link } from '../../buttons/link/link.js';
|
|
6
|
-
import {
|
|
6
|
+
import { Icon } from '../../icon/icon.js';
|
|
7
7
|
import { FormattedMessage } from '../../intl/formatted-message.js';
|
|
8
8
|
import { useDisclosure } from '../../shared/hooks/use-disclosure.js';
|
|
9
9
|
import { useInert } from '../../shared/hooks/use-inert.js';
|
|
@@ -29,7 +29,7 @@ function ShowAll({ children, hasTransparency = true, initialHeight = 0, initialI
|
|
|
29
29
|
if (isControlled)
|
|
30
30
|
return onToggle(!isControlled);
|
|
31
31
|
toggle();
|
|
32
|
-
}, children: [jsx(
|
|
32
|
+
}, children: [jsx(Icon, { className: styles.icon, name: "ArrowDown", size: "xxs" }), isReallyOpen ? (jsx(FormattedMessage, { id: "Show less" })) : (jsx(FormattedMessage, { id: "Show all" }))] }))] }));
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
export { ShowAll };
|
|
@@ -3,7 +3,10 @@ function createAddEndListener(nodeRef) {
|
|
|
3
3
|
if (done === undefined) {
|
|
4
4
|
if (typeof doneOrNode === 'function') {
|
|
5
5
|
if (nodeRef && 'current' in nodeRef && nodeRef.current) {
|
|
6
|
-
return nodeRef.current.addEventListener('transitionend',
|
|
6
|
+
return nodeRef.current.addEventListener('transitionend', event => {
|
|
7
|
+
if (event.target === nodeRef.current)
|
|
8
|
+
doneOrNode();
|
|
9
|
+
}, false);
|
|
7
10
|
}
|
|
8
11
|
throw new Error('Unsupported CSSTransition addEndListener function call');
|
|
9
12
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ConnectedCountryLanguageSelectionList(): import("react/jsx-runtime").JSX.Element;
|