@sonic-equipment/ui 0.0.117 → 0.0.118

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/index.js CHANGED
@@ -4469,9 +4469,9 @@ function Modal({ children, className, hasCloseButton, isDismissable, isFullScree
4469
4469
  e.preventDefault();
4470
4470
  e.stopPropagation();
4471
4471
  });
4472
- }, className: clsx(styles$V['modal-overlay'], className), isDismissable: isDismissable, isKeyboardDismissDisabled: isKeyboardDismissDisabled, isOpen: isOpen, onOpenChange: onOpenChange, shouldCloseOnInteractOutside: () => shouldCloseOnInteractOutside, children: jsxs(Modal$1, { className: clsx(styles$V.modal, {
4472
+ }, className: clsx(styles$V['modal-overlay'], typeof className === 'string' ? className : className?.overlay), isDismissable: isDismissable, isKeyboardDismissDisabled: isKeyboardDismissDisabled, isOpen: isOpen, onOpenChange: onOpenChange, shouldCloseOnInteractOutside: () => shouldCloseOnInteractOutside, UNSTABLE_portalContainer: document.body, children: jsxs(Modal$1, { className: clsx(styles$V.modal, {
4473
4473
  [styles$V['is-full-screen']]: isFullScreen,
4474
- }), children: [hasCloseButton && (jsx("div", { className: styles$V.close, children: jsx(IconButton, { color: "secondary", isDisabled: !isDismissable, onClick: () => onOpenChange?.(false), children: jsx(StrokeCloseboxIcon, {}) }) })), jsx("div", { className: styles$V.content, children: children })] }) }));
4474
+ }, typeof className === 'string' ? undefined : className?.modal), children: [hasCloseButton && (jsx("div", { className: clsx(styles$V.close, typeof className === 'string' ? className : className?.close), children: jsx(IconButton, { color: "secondary", isDisabled: !isDismissable, onClick: () => onOpenChange?.(false), children: jsx(StrokeCloseboxIcon, {}) }) })), jsx("div", { className: clsx(styles$V.content, typeof className === 'string' ? className : className?.content), children: children })] }) }));
4475
4475
  }
4476
4476
 
4477
4477
  var styles$U = {"dialog":"dialog-module-qKzgy","header":"dialog-module-ZnsAe","close":"dialog-module-Y7Tqg","footer":"dialog-module-y7Axm"};
@@ -4479,12 +4479,16 @@ var styles$U = {"dialog":"dialog-module-qKzgy","header":"dialog-module-ZnsAe","c
4479
4479
  function Footer({ cancelLabel, close, submitLabel }) {
4480
4480
  return (jsxs(Fragment, { children: [jsx(Button, { withArrow: true, color: "primary", size: "md", type: "submit", children: jsx(FormattedMessage, { id: submitLabel }) }), jsx(Button, { color: "secondary", onClick: close, size: "md", variant: "outline", children: jsx(FormattedMessage, { id: cancelLabel }) })] }));
4481
4481
  }
4482
- function Dialog({ allowClose = true, cancelLabel = 'Close', children, className, dialogClassName, footer = Footer, hasCloseButton = true, hideTitle, isDismissable, isFullScreen, isKeyboardDismissDisabled, isOpen, onOpenChange, onSubmit, shouldCloseOnInteractOutside, submitLabel = 'Submit', title, validationErrors, }) {
4483
- return (jsx(Modal, { className: clsx(styles$U['modal-overlay'], className), hasCloseButton: false, isDismissable: isDismissable, isFullScreen: isFullScreen, isKeyboardDismissDisabled: isKeyboardDismissDisabled, isOpen: isOpen, onOpenChange: onOpenChange, shouldCloseOnInteractOutside: shouldCloseOnInteractOutside, children: jsx(Dialog$1, { "aria-label": title, className: clsx(styles$U.dialog, dialogClassName), children: ({ close }) => (jsxs(Form, { className: styles$U.form, onSubmit: e => {
4482
+ function Dialog({ allowClose = true, cancelLabel = 'Close', children, className, footer = Footer, hasCloseButton = true, hideTitle, isDismissable, isFullScreen, isKeyboardDismissDisabled, isOpen, onOpenChange, onSubmit, shouldCloseOnInteractOutside, submitLabel = 'Submit', title, validationErrors, }) {
4483
+ return (jsx(Modal, { className: clsx(styles$U['modal-overlay'], typeof className === 'string' ? className : className?.modal), hasCloseButton: false, isDismissable: isDismissable, isFullScreen: isFullScreen, isKeyboardDismissDisabled: isKeyboardDismissDisabled, isOpen: isOpen, onOpenChange: onOpenChange, shouldCloseOnInteractOutside: shouldCloseOnInteractOutside, children: jsx(Dialog$1, { "aria-label": title, className: clsx(styles$U.dialog, typeof className === 'string' ? undefined : className?.dialog), children: ({ close }) => (jsxs(Form, { className: clsx(styles$U.form, typeof className === 'string' ? undefined : className?.form), onSubmit: e => {
4484
4484
  e.preventDefault();
4485
4485
  e.stopPropagation();
4486
4486
  onSubmit?.(e);
4487
- }, validationErrors: validationErrors, children: [jsxs("header", { className: styles$U.header, children: [!hideTitle && (jsx(Heading, { className: styles$U.heading, size: "xs", children: title })), hasCloseButton && (jsx("div", { className: styles$U.close, children: jsx(IconButton, { color: "secondary", isDisabled: !allowClose, onClick: close, children: jsx(StrokeCloseboxIcon, {}) }) }))] }), jsx("div", { className: styles$U.content, children: children instanceof Function ? children({ close }) : children }), jsx("footer", { className: styles$U.footer, children: footer instanceof Function
4487
+ }, validationErrors: validationErrors, children: [jsxs("header", { className: clsx(styles$U.header, typeof className === 'string' ? undefined : className?.header), children: [!hideTitle && (jsx(Heading, { className: clsx(styles$U.heading, typeof className === 'string'
4488
+ ? undefined
4489
+ : className?.heading), size: "xs", children: title })), hasCloseButton && (jsx("div", { className: clsx(styles$U.close, typeof className === 'string'
4490
+ ? undefined
4491
+ : className?.close), children: jsx(IconButton, { color: "secondary", isDisabled: !allowClose, onClick: close, children: jsx(StrokeCloseboxIcon, {}) }) }))] }), jsx("div", { className: clsx(styles$U.content, typeof className === 'string' ? undefined : className?.content), children: children instanceof Function ? children({ close }) : children }), jsx("footer", { className: clsx(styles$U.footer, typeof className === 'string' ? undefined : className?.footer), children: footer instanceof Function
4488
4492
  ? footer({ cancelLabel, close, submitLabel })
4489
4493
  : footer })] })) }) }));
4490
4494
  }
@@ -4494,7 +4498,7 @@ var styles$T = {"sign-in-dialog":"sign-in-dialog-module-P-AHV"};
4494
4498
  function SignInDialog({ isOpen, onOpenChange }) {
4495
4499
  const { signInUrl } = useFavorite();
4496
4500
  const t = useFormattedMessage();
4497
- return (jsx(Dialog, { isDismissable: true, dialogClassName: styles$T['sign-in-dialog'], footer: jsxs(Fragment, { children: [jsx(RouteButton, { withArrow: true, color: "primary", href: `${signInUrl}?returnUrl=${encodeURIComponent(window.location.pathname + window.location.search)}`, onClick: () => onOpenChange(false), variant: "solid", children: jsx(FormattedMessage, { id: "sign in" }) }), jsx(RouteButton, { color: "secondary", href: `${signInUrl}?returnUrl=${encodeURIComponent(window.location.pathname + window.location.search)}`, onClick: () => onOpenChange(false), variant: "outline", children: jsx(FormattedMessage, { id: "create account" }) })] }), isOpen: isOpen, onOpenChange: onOpenChange, title: t('Shop more efficiently and quicker with a favorites list'), children: jsxs(List, { children: [jsx(ListItem, { icon: jsx(SolidOkayIcon, { fill: "var(--color-status-available)" }), text: t('Easily add your favorite products') }), jsx(ListItem, { icon: jsx(SolidOkayIcon, { fill: "var(--color-status-available)" }), text: t('Your favorites are available on multiple devices') }), jsx(ListItem, { icon: jsx(SolidOkayIcon, { fill: "var(--color-status-available)" }), text: t('Share your favorite list with others') })] }) }));
4501
+ return (jsx(Dialog, { isDismissable: true, className: { dialog: styles$T['sign-in-dialog'] }, footer: jsxs(Fragment, { children: [jsx(RouteButton, { withArrow: true, color: "primary", href: `${signInUrl}?returnUrl=${encodeURIComponent(window.location.pathname + window.location.search)}`, onClick: () => onOpenChange(false), variant: "solid", children: jsx(FormattedMessage, { id: "sign in" }) }), jsx(RouteButton, { color: "secondary", href: `${signInUrl}?returnUrl=${encodeURIComponent(window.location.pathname + window.location.search)}`, onClick: () => onOpenChange(false), variant: "outline", children: jsx(FormattedMessage, { id: "create account" }) })] }), isOpen: isOpen, onOpenChange: onOpenChange, title: t('Shop more efficiently and quicker with a favorites list'), children: jsxs(List, { children: [jsx(ListItem, { icon: jsx(SolidOkayIcon, { fill: "var(--color-status-available)" }), text: t('Easily add your favorite products') }), jsx(ListItem, { icon: jsx(SolidOkayIcon, { fill: "var(--color-status-available)" }), text: t('Your favorites are available on multiple devices') }), jsx(ListItem, { icon: jsx(SolidOkayIcon, { fill: "var(--color-status-available)" }), text: t('Share your favorite list with others') })] }) }));
4498
4502
  }
4499
4503
 
4500
4504
  function useAddWishListItemToCurrentWishList() {
@@ -4671,7 +4675,7 @@ var styles$P = {"confirmation-dialog":"confirmation-dialog-module-Up-BC"};
4671
4675
 
4672
4676
  function ConfirmationDialog({ cancelLabel = 'Cancel', isOpen, onCancel, onConfirm, submitLabel = 'Continue', title, }) {
4673
4677
  const t = useFormattedMessage();
4674
- return (jsx(Dialog, { isDismissable: true, cancelLabel: t(cancelLabel), dialogClassName: styles$P['confirmation-dialog'], isOpen: isOpen, onOpenChange: onCancel, onSubmit: onConfirm, submitLabel: t(submitLabel), title: title }));
4678
+ return (jsx(Dialog, { isDismissable: true, cancelLabel: t(cancelLabel), className: { dialog: styles$P['confirmation-dialog'] }, isOpen: isOpen, onOpenChange: onCancel, onSubmit: onConfirm, submitLabel: t(submitLabel), title: title }));
4675
4679
  }
4676
4680
 
4677
4681
  function ConnectedRemoveButton({ onRemove: _onRemove, productId, }) {
@@ -10933,7 +10937,10 @@ function CountrySelectorDialog({ countries, isDismissable, isOpen, onOpenChange,
10933
10937
  setCurrentLanguage(fallbackLanguage);
10934
10938
  // eslint-disable-next-line react-hooks/exhaustive-deps
10935
10939
  }, [currentCountry]);
10936
- return (jsx(Dialog, { hideTitle: true, allowClose: isDismissable, className: styles$z.modal, dialogClassName: styles$z['country-selector-dialog'], footer: jsx(Button, { withArrow: true, type: "submit", children: jsx(FormattedMessage, { id: "Save" }) }), hasCloseButton: isDismissable, isDismissable: isDismissable, isOpen: isOpen, onOpenChange: onOpenChange, onSubmit: e => {
10940
+ return (jsx(Dialog, { hideTitle: true, allowClose: isDismissable, className: {
10941
+ dialog: styles$z['country-selector-dialog'],
10942
+ modal: styles$z.modal,
10943
+ }, footer: jsx(Button, { withArrow: true, type: "submit", children: jsx(FormattedMessage, { id: "Save" }) }), hasCloseButton: isDismissable, isDismissable: isDismissable, isOpen: isOpen, onOpenChange: onOpenChange, onSubmit: e => {
10937
10944
  onSubmit({ country: currentCountry, language: currentLanguage });
10938
10945
  e.preventDefault();
10939
10946
  e.stopPropagation();
@@ -11639,16 +11646,14 @@ function ImagesGrid({ images, onSelectImage }) {
11639
11646
  }), onClick: () => onSelectImage?.(image, index), onKeyDown: event => handleKeydown(event, image), role: "button", tabIndex: 0, children: jsx(Image, { className: styles$h.image, fit: "contain", image: image, title: image.altText }) }, index))) }));
11640
11647
  }
11641
11648
 
11642
- var styles$g = {"image-lightbox":"image-lightbox-module-9k3oJ","slide":"image-lightbox-module-K5Gd0","active-image":"image-lightbox-module-UNPOi","thumb":"image-lightbox-module-PUOMT","image":"image-lightbox-module-4RKLg","main-swiper":"image-lightbox-module-hAy3O","pagination":"image-lightbox-module-nN1Kr","sm":"image-lightbox-module-1idAN","thumbs-swiper":"image-lightbox-module-Xbxcn","lg":"image-lightbox-module--V8Xo","navigation-button":"image-lightbox-module-RP7KS","navigation-button-prev":"image-lightbox-module-wOPYF","navigation-button-next":"image-lightbox-module-knizp","zoomed-overlay":"image-lightbox-module-UVzAg","zoomed-container":"image-lightbox-module-sBtWE","zoomed-image":"image-lightbox-module-aehw-"};
11649
+ var styles$g = {"image-lightbox":"image-lightbox-module-9k3oJ","slide":"image-lightbox-module-K5Gd0","active-image":"image-lightbox-module-UNPOi","thumb":"image-lightbox-module-PUOMT","image":"image-lightbox-module-4RKLg","main-swiper":"image-lightbox-module-hAy3O","pagination":"image-lightbox-module-nN1Kr","sm":"image-lightbox-module-1idAN","thumbs-swiper":"image-lightbox-module-Xbxcn","lg":"image-lightbox-module--V8Xo","navigation-button":"image-lightbox-module-RP7KS","navigation-button-prev":"image-lightbox-module-wOPYF","navigation-button-next":"image-lightbox-module-knizp","zoomed-overlay":"image-lightbox-module-UVzAg","modal":"image-lightbox-module-MMYzc","zoomed-container":"image-lightbox-module-sBtWE","zoomed-image":"image-lightbox-module-aehw-"};
11643
11650
 
11644
- function ImageLightbox({ images, initialSelectedIndex = 0, variant = 'sm', }) {
11651
+ function ImageLightbox({ images, initialSelectedIndex = 0, onZoom, variant = 'sm', }) {
11645
11652
  const [thumbsSwiper, setThumbsSwiper] = useState();
11646
11653
  const [currentIndex, setCurrentIndex] = useState(initialSelectedIndex);
11647
11654
  const nextEl = useRef(null);
11648
11655
  const prevEl = useRef(null);
11649
11656
  const mainSwiperRef = useRef(null);
11650
- const [scrollFromTopPercentage, setScrollFromTopPercentage] = useState(0.5);
11651
- const { close, isOpen, open } = useDisclosure(false);
11652
11657
  function handleZoom(e) {
11653
11658
  const target = e.target;
11654
11659
  const clientRect = target?.getBoundingClientRect();
@@ -11657,18 +11662,17 @@ function ImageLightbox({ images, initialSelectedIndex = 0, variant = 'sm', }) {
11657
11662
  const height = clientRect.height;
11658
11663
  const clientY = e.clientY - clientRect.top;
11659
11664
  const scrollPercentage = clientY / height;
11660
- setScrollFromTopPercentage(scrollPercentage);
11661
- open();
11665
+ onZoom?.({ index: currentIndex, scrollPercentage });
11662
11666
  }
11663
11667
  return (jsxs("div", { className: clsx(styles$g['image-lightbox'], styles$g[variant]), children: [jsx(Swiper, { watchSlidesProgress: true, className: styles$g['thumbs-swiper'], direction: variant === 'sm' ? 'horizontal' : 'vertical', modules: [Thumb], onSwiper: swiper => setThumbsSwiper(swiper), slidesPerView: "auto", spaceBetween: 8, children: images.map((image, index) => (jsx(SwiperSlide, { className: styles$g.slide, children: jsx("div", { className: styles$g.thumb, children: jsx(Image, { className: styles$g.image, fit: "contain", height: 80, image: image, title: "Image", width: 80 }) }) }, index))) }), jsxs("div", { className: styles$g['main-swiper'], children: [jsx(Swiper, { initialSlide: initialSelectedIndex, modules: [Thumb, Navigation], navigation: {
11664
11668
  nextEl: nextEl.current,
11665
11669
  prevEl: prevEl.current,
11666
- }, onActiveIndexChange: swiper => setCurrentIndex(swiper.activeIndex), onBeforeInit: swiper => (mainSwiperRef.current = swiper), slidesPerView: 1, thumbs: { swiper: thumbsSwiper }, children: images.map((image, index) => (jsx(SwiperSlide, { className: styles$g.slide, children: jsx("button", { className: styles$g['active-image'], onClick: handleZoom, type: "button", children: jsx(Image, { className: styles$g.image, fit: "contain", image: image, title: "Image" }) }) }, index))) }), jsx("div", { className: styles$g.pagination, children: jsx(CarouselPagination, { contained: true, currentPage: currentIndex + 1, numberOfPages: images.length, onChange: pageNumber => mainSwiperRef.current?.slideTo(pageNumber - 1) }) }), variant === 'lg' && (jsxs(Fragment, { children: [jsx(CarouselNavigationButton, { ref: prevEl, className: clsx(styles$g['navigation-button'], styles$g['navigation-button-prev']), direction: "previous" }), jsx(CarouselNavigationButton, { ref: nextEl, className: clsx(styles$g['navigation-button'], styles$g['navigation-button-next']), direction: "next" })] }))] }), jsx(ZoomImage, { currentImage: images[currentIndex], isZoomed: isOpen, onClose: close, scrollFromTopPercentage: scrollFromTopPercentage })] }));
11670
+ }, onActiveIndexChange: swiper => setCurrentIndex(swiper.activeIndex), onBeforeInit: swiper => (mainSwiperRef.current = swiper), slidesPerView: 1, thumbs: { swiper: thumbsSwiper }, children: images.map((image, index) => (jsx(SwiperSlide, { className: styles$g.slide, children: jsx("button", { className: styles$g['active-image'], onClick: handleZoom, type: "button", children: jsx(Image, { className: styles$g.image, fit: "contain", image: image, title: "Image" }) }) }, index))) }), jsx("div", { className: styles$g.pagination, children: jsx(CarouselPagination, { contained: true, currentPage: currentIndex + 1, numberOfPages: images.length, onChange: pageNumber => mainSwiperRef.current?.slideTo(pageNumber - 1) }) }), variant === 'lg' && (jsxs(Fragment, { children: [jsx(CarouselNavigationButton, { ref: prevEl, className: clsx(styles$g['navigation-button'], styles$g['navigation-button-prev']), direction: "previous" }), jsx(CarouselNavigationButton, { ref: nextEl, className: clsx(styles$g['navigation-button'], styles$g['navigation-button-next']), direction: "next" })] }))] })] }));
11667
11671
  }
11668
11672
  function ZoomImage({ currentImage, isZoomed, onClose, scrollFromTopPercentage, }) {
11669
11673
  if (!isZoomed || !currentImage)
11670
11674
  return null;
11671
- return (jsx(Modal, { className: styles$g['zoomed-overlay'], hasCloseButton: true, isDismissable: true, isFullScreen: true, isKeyboardDismissDisabled: false, isOpen: isZoomed, onOpenChange: onClose, children: jsx("div", { ref: element => {
11675
+ return (jsx(Modal, { className: { modal: styles$g.modal, overlay: styles$g['zoomed-overlay'] }, hasCloseButton: true, isDismissable: true, isFullScreen: true, isKeyboardDismissDisabled: false, isOpen: isZoomed, onOpenChange: onClose, children: jsx("div", { ref: element => {
11672
11676
  setTimeout(() => {
11673
11677
  if (!element)
11674
11678
  return;
@@ -11998,19 +12002,24 @@ var styles$9 = {"image-lightbox-modal":"product-detail-images-module-N3Ms-"};
11998
12002
  const MAX_IMAGES = 5;
11999
12003
  function ProductDetailImages({ images }) {
12000
12004
  const [selectedImageIndex, setSelectedImageIndex] = useState(0);
12001
- const { isOpen, open, toggle } = useDisclosure();
12005
+ const [selectedZoomImageIndex, setSelectedZoomImageIndex] = useState(0);
12006
+ const [scrollPercentage, setScrollPercentage] = useState(0);
12007
+ const { isOpen: isOpenModal, open: openModal, toggle: toggleModal, } = useDisclosure();
12008
+ const { close: closeZoom, isOpen: isOpenZoom, open: openZoom, } = useDisclosure();
12002
12009
  const isXl = useIsBreakpoint('xl');
12003
12010
  if (images.length > MAX_IMAGES) {
12004
12011
  images = images.slice(0, MAX_IMAGES);
12005
12012
  }
12006
12013
  function handleOpenImage(image) {
12007
12014
  setSelectedImageIndex(images.indexOf(image));
12008
- open();
12015
+ openModal();
12009
12016
  }
12010
- if (!isXl) {
12011
- return jsx(ImageLightbox, { images: images });
12017
+ function onZoom({ index, scrollPercentage, }) {
12018
+ setSelectedZoomImageIndex(index);
12019
+ setScrollPercentage(scrollPercentage);
12020
+ openZoom();
12012
12021
  }
12013
- return (jsxs(Fragment, { children: [jsx(ImagesGrid, { images: images, onSelectImage: (image, _index) => handleOpenImage(image) }), jsx(Modal, { hasCloseButton: true, isDismissable: true, isFullScreen: true, isKeyboardDismissDisabled: false, isOpen: isOpen, onOpenChange: toggle, shouldCloseOnInteractOutside: false, children: jsx("div", { className: styles$9['image-lightbox-modal'], children: jsx(ImageLightbox, { images: images, initialSelectedIndex: selectedImageIndex, variant: "lg" }) }) })] }));
12022
+ return (jsxs(Fragment, { children: [!isXl ? (jsx(ImageLightbox, { images: images, onZoom: onZoom })) : (jsxs(Fragment, { children: [jsx(ImagesGrid, { images: images, onSelectImage: (image, _index) => handleOpenImage(image) }), jsx(Modal, { hasCloseButton: true, isDismissable: true, isFullScreen: true, isKeyboardDismissDisabled: false, isOpen: isOpenModal, onOpenChange: toggleModal, shouldCloseOnInteractOutside: false, children: jsx("div", { className: styles$9['image-lightbox-modal'], children: jsx(ImageLightbox, { images: images, initialSelectedIndex: selectedImageIndex, onZoom: onZoom, variant: "lg" }) }) })] })), isOpenZoom && (jsx(ZoomImage, { currentImage: images[selectedZoomImageIndex], isZoomed: isOpenZoom, onClose: closeZoom, scrollFromTopPercentage: scrollPercentage }))] }));
12014
12023
  }
12015
12024
 
12016
12025
  var styles$8 = {"product-details-panel":"product-details-panel-module-kfhpL","heading":"product-details-panel-module--1ODE","price-action-container":"product-details-panel-module-CCcmA","action-container":"product-details-panel-module-1vyDM","description":"product-details-panel-module-GfTab","feature-list":"product-details-panel-module-ze0my"};
@@ -12626,4 +12635,4 @@ console.log(`@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
12626
12635
  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
12627
12636
  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@`);
12628
12637
 
12629
- export { Accordion, AccordionItem, ActiveFilters, AddToCartButton, AddToFavoriteDialog, AlgoliaActiveCategories, AlgoliaActiveFilters, AlgoliaCategoriesFilters, AlgoliaDummyRefinementListConsumer, AlgoliaFilterPanel, AlgoliaHitsProvider, AlgoliaInsightInstantSearchProvider, AlgoliaInsightsProvider, AlgoliaInsightsProviderContext, AlgoliaInstantSearchStateProvider, AlgoliaMultiSelectFilterSection, AlgoliaPagination, AlgoliaProvider, AlgoliaResultsCount, AlgoliaSearchProvider, AlgoliaSortBy, Animation, Announcement, AnnouncementProvider, AvailabilityMessageType, BackgroundOverlay, BadRequestError, Badge, BadgeImagePlacementValues, BadgeStyleValues, BadgeTypeValues, BlankPageSpacer, Breadcrumb, Button, CardCarousel, Carousel, CarouselNavigationButton, CarouselPagination, CartProvider, CartTotals, CategoriesGrid, CategoryCard, CategoryCarousel, Checkbox, ColorCheckbox, ConfirmationDialog, ConnectedAddToCartButton, ConnectedAnnouncement, ConnectedCartIcon, ConnectedCountrySelector, ConnectedFavoriteButton, ConnectedOrderLineCard, ConnectedProductCard, ConnectedRemoveButton, ConnectedSearchInput, CountrySelectorDialog, CountrySelectorTrigger, CurrencyPositioningType, DeliveryTime, Dialog, DownloadDocumentList, ErrorPage, EventEmitter, FavoriteButton, FavoriteProvider, FeatureList, FieldError, FilterSection, ForbiddenRequestError, FormattedMessage, GlobalSearch, GlobalSearchContext, GlobalSearchDisclosureContext, GlobalSearchProvider, GlobalStateProvider, GlobalStateProviderContext, Heading, Highlight, IconButton, IconWithBadge, Image, ImageLightbox, ImagesGrid, Input, InternalServerErrorRequest, IntlContext, IntlProvider, Label, Link, List, ListItem, LoadingOverlay, LoadingPage, Modal, MultiSelect, NoResults, NoSearch, NoSearchResults, NotFoundRequestError, NumberField, OrderLineCard, OrderLineList, Page, PageContainer, Pagination, PaginationButton, PanelContent, PrintButton, ProductCard, ProductDetailImages, ProductDetailsPage, ProductDetailsPageLayout, ProductDetailsPanel, ProductListingPage, ProductListingPageCategoryCarousel, ProductListingPageContext, ProductListingPageProvider, ProductListingProductOverview, ProductOverviewGrid, ProductPrice, ProductSku, ProductTotalPrice, ProductUSPCarousel, ProductUsp, ProgressCircle, PromoBanner, PromoBanners, PromoCard, ReactQueryContainer, RequestError, RouteButton, RouteIconButton, RouteLink, RouteProvider, SIZES, SearchInput, SearchList, SearchListItem, SearchResultPanel, SearchResultProductOverview, SearchResultsPage, SearchResultsPageCategoryCarousel, SearchRoot, SearchSection, SectionContainer, Select, ShowAll, Sidebar, SidebarDetectBreakpoint, SidebarProvider, SignInDialog, TAGS, TIME, Tag, TextArea, TextField, TimeoutRequestError, Toast, ToastProvider, ToggleSidebarButton, USPCarousel, UnauthorizedRequestError, UnprocessableContentRequestError, VariantDisplayTypeValues, WishListNameAlreadyExistsError, WithResults, addProductToCurrentCart, addWishListItemToWishList, algoliaIndexesPerEnvironment, announcementSubTypes, announcementTypes, breakpoints$1 as breakpoints, categoriesPlugin, clone, config, configPerEnvironment, convertDateUnitToPluralOrSingle, createGuestAccount, createQueryStringRouting, createSession, createSonicSearchClient, createUUID, createWishList, deepMerge, deleteCartLineById, deleteCurrentCart, deleteWishList, deleteWishListItemFromWishList, environment, environments, fetchAnnouncements, fetchCountries, fetchCountriesLanguages, fetchCountriesWithLanguages, fetchCurrentCart, fetchCurrentCartLines, fetchCurrentCartProductAtp, fetchCurrentCartPromotions, fetchCurrentCheckoutAtp, fetchProductDetailsPageData, fetchProductListingPageData, fetchSession, fetchSettings, fetchTranslations, formatPrice, getAlgoliaIndex, getCurrentBreakpoints, getDateUnitObject, getLanguageCodeFromCultureCode, getTokenKeyValue, getTokenValue, getWishList, getWishListItemsByWishListId, getWishLists, isAlgoliaProductHit, isAnnouncementSubtype, isAnnouncementType, isCountryCode, isCultureCode, isLanguageCode, isPlainObject, isProductHit, isRequestError, isResponsiveImage, main, merge, now, offlineSearchClient, patchCart, patchSession, placeOrder, popularCategoriesPlugin, popularSearchesPlugin, querySuggestionsPlugin, quickAccessPlugin, recentSearchesPlugin, request, saveCartForLater, scrollToTop, searchClientLogger, signIn, signOut, spireTranslateAdapter, transformAlgoliaCategoryData, transformAlgoliaProductHitToProductHit, transformAlgoliaPromoHitToPromoHit, updateCartLineById, updateLocale, useAddProductToCurrentCart, useAddWishListItemToCurrentWishList, useAddWishListItemToWishList, useAlgolia, useAlgoliaHits, useAlgoliaHitsItems, useAlgoliaHitsLoading, useAlgoliaInsights, useAlgoliaInsightsGlobalState, useAlgoliaInstantSearchState, useAlgoliaInstantSearchStateIndex, useAlgoliaInstantSearchStateOnline, useAlgoliaInstantSearchStateQueryId, useAlgoliaInstantSearchStateStatus, useAlgoliaSearch, useBreakpoint, useCartEvents, useCookie, useCountriesLanguages, useCreateWishList, useCultureCode, useDebouncedCallback, useDeleteCartLineById, useDeleteCurrentCart, useDeleteWishListItemFromWishList, useDisclosure, useFavorite, useFavoriteProduct, useFeatureFlags, useFetchAllWishListsItems, useFetchAnnouncements, useFetchCountries, useFetchCountriesLanguages, useFetchCountriesWithLanguages, useFetchCurrentCart, useFetchCurrentCartCount, useFetchCurrentCartLines, useFetchCurrentCartProductAtp, useFetchCurrentCartPromotions, useFetchCurrentCheckoutAtp, useFetchProductDetailsPageData, useFetchProductListingPageData, useFetchSession, useFetchSettings, useFetchTranslations, useFetchWishLists, useFormattedMessage, useGlobalSearchDisclosure, useGlobalState, useInvalidateCurrentCart, useInvalidateSession, useIsAuthenticated, useIsBreakpoint, useLanguageCode, useLocalStorage, useNavigate, useOnNavigate, usePatchCart, usePlaceOrder, useProductListingPageProvider, useResizeObserver, useSaveCartForLater, useScrollLock, useScrollTo, useSessionStorage, useSidebar, useSidebarActions, useSignIn, useSignOut, useSubcatagories, useToast, useUpdateCartLineById, useUpdateCultureCode, useUpdateLocale, userToken, wait, withRouting };
12638
+ export { Accordion, AccordionItem, ActiveFilters, AddToCartButton, AddToFavoriteDialog, AlgoliaActiveCategories, AlgoliaActiveFilters, AlgoliaCategoriesFilters, AlgoliaDummyRefinementListConsumer, AlgoliaFilterPanel, AlgoliaHitsProvider, AlgoliaInsightInstantSearchProvider, AlgoliaInsightsProvider, AlgoliaInsightsProviderContext, AlgoliaInstantSearchStateProvider, AlgoliaMultiSelectFilterSection, AlgoliaPagination, AlgoliaProvider, AlgoliaResultsCount, AlgoliaSearchProvider, AlgoliaSortBy, Animation, Announcement, AnnouncementProvider, AvailabilityMessageType, BackgroundOverlay, BadRequestError, Badge, BadgeImagePlacementValues, BadgeStyleValues, BadgeTypeValues, BlankPageSpacer, Breadcrumb, Button, CardCarousel, Carousel, CarouselNavigationButton, CarouselPagination, CartProvider, CartTotals, CategoriesGrid, CategoryCard, CategoryCarousel, Checkbox, ColorCheckbox, ConfirmationDialog, ConnectedAddToCartButton, ConnectedAnnouncement, ConnectedCartIcon, ConnectedCountrySelector, ConnectedFavoriteButton, ConnectedOrderLineCard, ConnectedProductCard, ConnectedRemoveButton, ConnectedSearchInput, CountrySelectorDialog, CountrySelectorTrigger, CurrencyPositioningType, DeliveryTime, Dialog, DownloadDocumentList, ErrorPage, EventEmitter, FavoriteButton, FavoriteProvider, FeatureList, FieldError, FilterSection, ForbiddenRequestError, FormattedMessage, GlobalSearch, GlobalSearchContext, GlobalSearchDisclosureContext, GlobalSearchProvider, GlobalStateProvider, GlobalStateProviderContext, Heading, Highlight, IconButton, IconWithBadge, Image, ImageLightbox, ImagesGrid, Input, InternalServerErrorRequest, IntlContext, IntlProvider, Label, Link, List, ListItem, LoadingOverlay, LoadingPage, Modal, MultiSelect, NoResults, NoSearch, NoSearchResults, NotFoundRequestError, NumberField, OrderLineCard, OrderLineList, Page, PageContainer, Pagination, PaginationButton, PanelContent, PrintButton, ProductCard, ProductDetailImages, ProductDetailsPage, ProductDetailsPageLayout, ProductDetailsPanel, ProductListingPage, ProductListingPageCategoryCarousel, ProductListingPageContext, ProductListingPageProvider, ProductListingProductOverview, ProductOverviewGrid, ProductPrice, ProductSku, ProductTotalPrice, ProductUSPCarousel, ProductUsp, ProgressCircle, PromoBanner, PromoBanners, PromoCard, ReactQueryContainer, RequestError, RouteButton, RouteIconButton, RouteLink, RouteProvider, SIZES, SearchInput, SearchList, SearchListItem, SearchResultPanel, SearchResultProductOverview, SearchResultsPage, SearchResultsPageCategoryCarousel, SearchRoot, SearchSection, SectionContainer, Select, ShowAll, Sidebar, SidebarDetectBreakpoint, SidebarProvider, SignInDialog, TAGS, TIME, Tag, TextArea, TextField, TimeoutRequestError, Toast, ToastProvider, ToggleSidebarButton, USPCarousel, UnauthorizedRequestError, UnprocessableContentRequestError, VariantDisplayTypeValues, WishListNameAlreadyExistsError, WithResults, ZoomImage, addProductToCurrentCart, addWishListItemToWishList, algoliaIndexesPerEnvironment, announcementSubTypes, announcementTypes, breakpoints$1 as breakpoints, categoriesPlugin, clone, config, configPerEnvironment, convertDateUnitToPluralOrSingle, createGuestAccount, createQueryStringRouting, createSession, createSonicSearchClient, createUUID, createWishList, deepMerge, deleteCartLineById, deleteCurrentCart, deleteWishList, deleteWishListItemFromWishList, environment, environments, fetchAnnouncements, fetchCountries, fetchCountriesLanguages, fetchCountriesWithLanguages, fetchCurrentCart, fetchCurrentCartLines, fetchCurrentCartProductAtp, fetchCurrentCartPromotions, fetchCurrentCheckoutAtp, fetchProductDetailsPageData, fetchProductListingPageData, fetchSession, fetchSettings, fetchTranslations, formatPrice, getAlgoliaIndex, getCurrentBreakpoints, getDateUnitObject, getLanguageCodeFromCultureCode, getTokenKeyValue, getTokenValue, getWishList, getWishListItemsByWishListId, getWishLists, isAlgoliaProductHit, isAnnouncementSubtype, isAnnouncementType, isCountryCode, isCultureCode, isLanguageCode, isPlainObject, isProductHit, isRequestError, isResponsiveImage, main, merge, now, offlineSearchClient, patchCart, patchSession, placeOrder, popularCategoriesPlugin, popularSearchesPlugin, querySuggestionsPlugin, quickAccessPlugin, recentSearchesPlugin, request, saveCartForLater, scrollToTop, searchClientLogger, signIn, signOut, spireTranslateAdapter, transformAlgoliaCategoryData, transformAlgoliaProductHitToProductHit, transformAlgoliaPromoHitToPromoHit, updateCartLineById, updateLocale, useAddProductToCurrentCart, useAddWishListItemToCurrentWishList, useAddWishListItemToWishList, useAlgolia, useAlgoliaHits, useAlgoliaHitsItems, useAlgoliaHitsLoading, useAlgoliaInsights, useAlgoliaInsightsGlobalState, useAlgoliaInstantSearchState, useAlgoliaInstantSearchStateIndex, useAlgoliaInstantSearchStateOnline, useAlgoliaInstantSearchStateQueryId, useAlgoliaInstantSearchStateStatus, useAlgoliaSearch, useBreakpoint, useCartEvents, useCookie, useCountriesLanguages, useCreateWishList, useCultureCode, useDebouncedCallback, useDeleteCartLineById, useDeleteCurrentCart, useDeleteWishListItemFromWishList, useDisclosure, useFavorite, useFavoriteProduct, useFeatureFlags, useFetchAllWishListsItems, useFetchAnnouncements, useFetchCountries, useFetchCountriesLanguages, useFetchCountriesWithLanguages, useFetchCurrentCart, useFetchCurrentCartCount, useFetchCurrentCartLines, useFetchCurrentCartProductAtp, useFetchCurrentCartPromotions, useFetchCurrentCheckoutAtp, useFetchProductDetailsPageData, useFetchProductListingPageData, useFetchSession, useFetchSettings, useFetchTranslations, useFetchWishLists, useFormattedMessage, useGlobalSearchDisclosure, useGlobalState, useInvalidateCurrentCart, useInvalidateSession, useIsAuthenticated, useIsBreakpoint, useLanguageCode, useLocalStorage, useNavigate, useOnNavigate, usePatchCart, usePlaceOrder, useProductListingPageProvider, useResizeObserver, useSaveCartForLater, useScrollLock, useScrollTo, useSessionStorage, useSidebar, useSidebarActions, useSignIn, useSignOut, useSubcatagories, useToast, useUpdateCartLineById, useUpdateCultureCode, useUpdateLocale, userToken, wait, withRouting };
@@ -3,6 +3,16 @@ import { ImageType } from '../../shared/model/image';
3
3
  export interface ImageLightboxProps {
4
4
  images: ImageType[];
5
5
  initialSelectedIndex?: number;
6
+ onZoom?: (args: {
7
+ index: number;
8
+ scrollPercentage: number;
9
+ }) => void;
6
10
  variant?: 'sm' | 'lg';
7
11
  }
8
- export declare function ImageLightbox({ images, initialSelectedIndex, variant, }: ImageLightboxProps): import("react/jsx-runtime").JSX.Element;
12
+ export declare function ImageLightbox({ images, initialSelectedIndex, onZoom, variant, }: ImageLightboxProps): import("react/jsx-runtime").JSX.Element;
13
+ export declare function ZoomImage({ currentImage, isZoomed, onClose, scrollFromTopPercentage, }: {
14
+ currentImage: ImageType | undefined;
15
+ isZoomed: boolean;
16
+ onClose: () => void;
17
+ scrollFromTopPercentage: number;
18
+ }): import("react/jsx-runtime").JSX.Element | null;
@@ -1,13 +1,22 @@
1
1
  import { ComponentProps, ReactNode } from 'react';
2
2
  import { Form as AriaForm } from 'react-aria-components';
3
3
  import { ModalProps } from '../modal/modal';
4
- interface DialogProps extends Omit<ModalProps, 'children'> {
4
+ interface DialogProps extends Omit<ModalProps, 'children' | 'className'> {
5
5
  allowClose?: boolean;
6
6
  cancelLabel?: string;
7
7
  children?: ReactNode | ((props: {
8
8
  close: VoidFunction;
9
9
  }) => ReactNode);
10
- dialogClassName?: string;
10
+ className?: string | {
11
+ close?: string;
12
+ content?: string;
13
+ dialog?: string;
14
+ footer?: string;
15
+ form?: string;
16
+ header?: string;
17
+ heading?: string;
18
+ modal?: string;
19
+ };
11
20
  footer?: ReactNode | ((props: DialogFooterProps) => ReactNode);
12
21
  hideTitle?: boolean;
13
22
  onSubmit?: (e: React.FormEvent<HTMLFormElement>) => void;
@@ -20,5 +29,5 @@ interface DialogFooterProps {
20
29
  close: VoidFunction;
21
30
  submitLabel: string;
22
31
  }
23
- export declare function Dialog({ allowClose, cancelLabel, children, className, dialogClassName, footer, hasCloseButton, hideTitle, isDismissable, isFullScreen, isKeyboardDismissDisabled, isOpen, onOpenChange, onSubmit, shouldCloseOnInteractOutside, submitLabel, title, validationErrors, }: DialogProps): import("react/jsx-runtime").JSX.Element;
32
+ export declare function Dialog({ allowClose, cancelLabel, children, className, footer, hasCloseButton, hideTitle, isDismissable, isFullScreen, isKeyboardDismissDisabled, isOpen, onOpenChange, onSubmit, shouldCloseOnInteractOutside, submitLabel, title, validationErrors, }: DialogProps): import("react/jsx-runtime").JSX.Element;
24
33
  export {};
@@ -1,7 +1,12 @@
1
1
  import { ReactNode } from 'react';
2
2
  export interface ModalProps {
3
3
  children: ReactNode;
4
- className?: string;
4
+ className?: string | {
5
+ close?: string;
6
+ content?: string;
7
+ modal?: string;
8
+ overlay?: string;
9
+ };
5
10
  hasCloseButton?: boolean;
6
11
  isDismissable?: boolean;
7
12
  isFullScreen?: boolean;
package/dist/styles.css CHANGED
@@ -4392,6 +4392,10 @@ button.swiper-pagination-bullet {
4392
4392
  cursor: zoom-out;
4393
4393
  }
4394
4394
 
4395
+ .image-lightbox-module-UVzAg .image-lightbox-module-MMYzc {
4396
+ z-index: var(--zoom-image-layer);
4397
+ }
4398
+
4395
4399
  .image-lightbox-module-UVzAg .image-lightbox-module-sBtWE {
4396
4400
  display: grid;
4397
4401
  overflow: auto;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonic-equipment/ui",
3
- "version": "0.0.117",
3
+ "version": "0.0.118",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "engines": {