@sonic-equipment/ui 0.0.89 → 0.0.90

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.
Files changed (27) hide show
  1. package/dist/index.d.ts +84 -36
  2. package/dist/index.js +229 -192
  3. package/dist/src/algolia/{algolia-product-hit-type.d.ts → algolia-hit-type.d.ts} +17 -2
  4. package/dist/src/algolia/algolia-hits-provider.d.ts +6 -0
  5. package/dist/src/algolia/use-algolia-hits.d.ts +10 -0
  6. package/dist/src/algolia/use-algolia-search.d.ts +3 -3
  7. package/dist/src/carousel/card-carousel/card-carousel.d.ts +10 -0
  8. package/dist/src/carousel/{product-carousel/product-carousel.stories.d.ts → card-carousel/product-card-carousel.stories.d.ts} +3 -3
  9. package/dist/src/carousel/card-carousel/promo-card-carousel.stories.d.ts +20 -0
  10. package/dist/src/carousel/promo-card-carousel/promo-card-carousel.d.ts +10 -0
  11. package/dist/src/global-search/types.d.ts +1 -1
  12. package/dist/src/index.d.ts +1 -1
  13. package/dist/src/pages/product-listing-page/product-listing-page-data-types.d.ts +3 -3
  14. package/dist/src/promos/promo-banner/promo-banner.d.ts +7 -0
  15. package/dist/src/promos/promo-banner/promo-banner.stories.d.ts +19 -0
  16. package/dist/src/promos/promo-banners/promo-banners.d.ts +8 -0
  17. package/dist/src/promos/{promo-cards/promo-cards.stories.d.ts → promo-banners/promo-banners.stories.d.ts} +3 -3
  18. package/dist/src/promos/promo-card/promo-card.d.ts +5 -5
  19. package/dist/src/promos/promo-card/promo-card.stories.d.ts +1 -8
  20. package/dist/src/shared/api/bff/model/bff.model.d.ts +4 -4
  21. package/dist/src/shared/model/{product-hit.d.ts → hit.d.ts} +12 -1
  22. package/dist/styles.css +97 -66
  23. package/package.json +1 -1
  24. package/dist/src/algolia/algolia-products-hits-provider.d.ts +0 -6
  25. package/dist/src/algolia/use-algolia-product-hits.d.ts +0 -10
  26. package/dist/src/carousel/product-carousel/product-carousel.d.ts +0 -10
  27. package/dist/src/promos/promo-cards/promo-cards.d.ts +0 -8
package/dist/styles.css CHANGED
@@ -917,11 +917,14 @@
917
917
 
918
918
  position: relative;
919
919
  display: grid;
920
+ width: 100%;
921
+ height: 100%;
920
922
  box-sizing: border-box;
921
923
  padding-top: var(--space-12);
922
924
  background-color: var(--color-white);
923
925
  color: var(--color-black);
924
926
  cursor: pointer;
927
+ grid-template-rows: auto 1fr;
925
928
  outline: none;
926
929
  text-decoration: none;
927
930
  transition:
@@ -937,6 +940,8 @@
937
940
 
938
941
  .product-card-module-pLaiB .product-card-module-e0kMu {
939
942
  display: grid;
943
+ height: 100%;
944
+ box-sizing: border-box;
940
945
  padding-bottom: var(--padding-bottom);
941
946
  margin-top: auto;
942
947
  gap: var(--space-16);
@@ -1361,6 +1366,7 @@
1361
1366
  position: relative;
1362
1367
  display: block;
1363
1368
  width: 100%;
1369
+ height: 100%;
1364
1370
  -webkit-user-select: none;
1365
1371
  -moz-user-select: none;
1366
1372
  user-select: none;
@@ -1374,6 +1380,7 @@
1374
1380
  .carousel-module-ealh- .carousel-module-IftbN {
1375
1381
  position: relative;
1376
1382
  display: block;
1383
+ overflow: visible;
1377
1384
  opacity: 0;
1378
1385
  }
1379
1386
 
@@ -1421,6 +1428,7 @@
1421
1428
  .carousel-module-ealh- .carousel-module-bUMlb {
1422
1429
  width: -moz-fit-content;
1423
1430
  width: fit-content;
1431
+ height: auto;
1424
1432
  }
1425
1433
 
1426
1434
  /* stylelint-disable-next-line no-descending-specificity */
@@ -2347,6 +2355,7 @@
2347
2355
 
2348
2356
  .product-overview-grid-module-MlUVA {
2349
2357
  position: relative;
2358
+ min-height: 380px;
2350
2359
  }
2351
2360
 
2352
2361
  .product-overview-grid-module-MlUVA:not(:last-child)::before {
@@ -2370,12 +2379,23 @@
2370
2379
  z-index: 1;
2371
2380
  }
2372
2381
 
2382
+ @media (width >= 360px) {
2383
+ .product-overview-grid-module-MlUVA {
2384
+ min-height: 448px;
2385
+ }
2386
+ }
2387
+
2373
2388
  @media (width >= 576px) {
2374
2389
  .product-overview-grid-module-bzys- {
2375
2390
  --amount-of-columns: 2;
2376
2391
  --row-gap: 0;
2377
2392
  --column-gap: var(--space-16);
2378
2393
  }
2394
+
2395
+ .product-overview-grid-module-MlUVA {
2396
+ min-height: 448px;
2397
+ }
2398
+
2379
2399
  .product-overview-grid-module-MlUVA::before {
2380
2400
  display: none;
2381
2401
  }
@@ -2631,55 +2651,58 @@
2631
2651
  padding: 28px 24px 36px;
2632
2652
  }
2633
2653
 
2634
- .product-carousel-module-DpUaX {
2654
+ .card-carousel-module-JXQmk {
2635
2655
  display: flex;
2636
2656
  width: 100%;
2657
+ height: 100%;
2637
2658
  flex-direction: column;
2638
2659
  gap: var(--space-24);
2639
2660
  }
2640
2661
 
2641
2662
  @media (width >= 768px) {
2642
- .product-carousel-module-DpUaX .product-carousel-module-0ymqZ {
2663
+ .card-carousel-module-JXQmk .card-carousel-module-XQ2pX {
2643
2664
  align-self: center;
2644
2665
  }
2645
2666
  }
2646
2667
 
2647
- .product-carousel-module-DpUaX .swiper {
2668
+ .card-carousel-module-JXQmk .swiper {
2648
2669
  --padding: var(--space-16);
2649
2670
 
2650
2671
  width: calc(100% + (2 * var(--padding)));
2672
+ height: 100%;
2651
2673
  padding: var(--padding);
2652
2674
  margin-top: calc(var(--padding) * -1);
2653
2675
  margin-bottom: calc(var(--padding) * -1);
2654
2676
  margin-left: calc(var(--padding) * -1);
2655
2677
  }
2656
2678
 
2657
- .product-carousel-module-XVTB1 {
2679
+ .card-carousel-module-DxKOG {
2658
2680
  --slide-width-normal: 300px;
2659
2681
  --slide-width-narrow: 154px;
2660
2682
  --slide-width-auto: auto;
2661
2683
  --slide-width: var(--slide-width-narrow);
2662
2684
 
2663
2685
  position: relative;
2686
+ height: 100%;
2664
2687
  }
2665
2688
 
2666
- .product-carousel-module-XVTB1.product-carousel-module-E2EUK {
2689
+ .card-carousel-module-DxKOG.card-carousel-module-RQ8gl {
2667
2690
  --slide-width: var(--slide-width-auto);
2668
2691
  }
2669
2692
 
2670
- .product-carousel-module-XVTB1.product-carousel-module-yrkV9 {
2693
+ .card-carousel-module-DxKOG.card-carousel-module-8uKSt {
2671
2694
  --slide-width: var(--slide-width-narrow);
2672
2695
  }
2673
2696
 
2674
- .product-carousel-module-XVTB1.product-carousel-module-SzVga {
2697
+ .card-carousel-module-DxKOG.card-carousel-module-l-ylK {
2675
2698
  --slide-width: var(--slide-width-normal);
2676
2699
  }
2677
2700
 
2678
- .product-carousel-module-XVTB1 > * {
2701
+ .card-carousel-module-DxKOG > * {
2679
2702
  width: var(--slide-width);
2680
2703
  }
2681
2704
 
2682
- .product-carousel-module-XVTB1:not(:first-child)::after {
2705
+ .card-carousel-module-DxKOG:not(:first-child)::after {
2683
2706
  position: absolute;
2684
2707
  top: 0;
2685
2708
  left: calc((var(--column-gap) / 2) * -1);
@@ -2699,35 +2722,35 @@
2699
2722
  /* Hide the separator line between the cards when hovering */
2700
2723
 
2701
2724
  @media (hover: hover) {
2702
- .product-carousel-module-XVTB1:hover {
2725
+ .card-carousel-module-DxKOG:hover {
2703
2726
  z-index: 1;
2704
2727
  }
2705
2728
 
2706
- .product-carousel-module-XVTB1:hover::after {
2729
+ .card-carousel-module-DxKOG:hover::after {
2707
2730
  display: none;
2708
2731
  }
2709
- .product-carousel-module-XVTB1:hover + .product-carousel-module-XVTB1::after {
2732
+ .card-carousel-module-DxKOG:hover + .card-carousel-module-DxKOG::after {
2710
2733
  display: none;
2711
2734
  }
2712
2735
  }
2713
2736
 
2714
2737
  @media (width >= 768px) {
2715
- .product-carousel-module-XVTB1 {
2738
+ .card-carousel-module-DxKOG {
2716
2739
  --slide-width-normal: 300px;
2717
2740
  --slide-width-narrow: 192px;
2718
2741
  --slide-width-auto: auto;
2719
2742
  --slide-width: var(--slide-width-narrow);
2720
2743
  }
2721
2744
 
2722
- .product-carousel-module-XVTB1.product-carousel-module-E2EUK {
2745
+ .card-carousel-module-DxKOG.card-carousel-module-RQ8gl {
2723
2746
  --slide-width: var(--slide-width-auto);
2724
2747
  }
2725
2748
 
2726
- .product-carousel-module-XVTB1.product-carousel-module-yrkV9 {
2749
+ .card-carousel-module-DxKOG.card-carousel-module-8uKSt {
2727
2750
  --slide-width: var(--slide-width-narrow);
2728
2751
  }
2729
2752
 
2730
- .product-carousel-module-XVTB1.product-carousel-module-SzVga {
2753
+ .card-carousel-module-DxKOG.card-carousel-module-l-ylK {
2731
2754
  --slide-width: var(--slide-width-normal);
2732
2755
  }
2733
2756
  }
@@ -3657,30 +3680,30 @@ button.swiper-pagination-bullet {
3657
3680
  height: 12px;
3658
3681
  }
3659
3682
 
3660
- & .promo-card-module-e2oii {
3683
+ & .promo-banner-module-yuVEO {
3661
3684
  position: relative;
3662
3685
  display: block;
3663
3686
  height: 122px;
3664
3687
  outline: none;
3665
3688
  }
3666
3689
 
3667
- & .promo-card-module-e2oii.promo-card-module-1-jT0 {
3690
+ & .promo-banner-module-yuVEO.promo-banner-module-ut8Kd {
3668
3691
  width: 250px;
3669
3692
  }
3670
3693
 
3671
- & .promo-card-module-e2oii.promo-card-module-zIYDh {
3694
+ & .promo-banner-module-yuVEO.promo-banner-module-CSkIw {
3672
3695
  width: 310px;
3673
3696
  }
3674
3697
 
3675
- & .promo-card-module-e2oii picture {
3698
+ & .promo-banner-module-yuVEO picture {
3676
3699
  width: 100%;
3677
3700
  }
3678
3701
 
3679
- & .promo-card-module-e2oii picture img {
3702
+ & .promo-banner-module-yuVEO picture img {
3680
3703
  width: 100%;
3681
3704
  }
3682
3705
 
3683
- & .promo-card-module-e2oii:focus-visible::after {
3706
+ & .promo-banner-module-yuVEO:focus-visible::after {
3684
3707
  position: absolute;
3685
3708
  display: block;
3686
3709
  background-color: transparent;
@@ -3694,22 +3717,22 @@ button.swiper-pagination-bullet {
3694
3717
  }
3695
3718
 
3696
3719
  @media (width >= 768px) {
3697
- & .promo-card-module-e2oii {
3720
+ & .promo-banner-module-yuVEO {
3698
3721
  height: 230px;
3699
3722
  }
3700
3723
 
3701
- & .promo-card-module-e2oii.promo-card-module-zIYDh,
3702
- & .promo-card-module-e2oii.promo-card-module-1-jT0 {
3724
+ & .promo-banner-module-yuVEO.promo-banner-module-CSkIw,
3725
+ & .promo-banner-module-yuVEO.promo-banner-module-ut8Kd {
3703
3726
  width: auto;
3704
3727
  }
3705
3728
  }
3706
3729
 
3707
- .promo-cards-module-Dy4p3 {
3730
+ .promo-banners-module-uVyxh {
3708
3731
  margin-bottom: var(--space-24);
3709
3732
  }
3710
3733
 
3711
3734
  @media (width >= 768px) {
3712
- .promo-cards-module-Dy4p3 {
3735
+ .promo-banners-module-uVyxh {
3713
3736
  display: grid;
3714
3737
  margin-bottom: var(--space-32);
3715
3738
  gap: var(--space-16);
@@ -3718,7 +3741,7 @@ button.swiper-pagination-bullet {
3718
3741
  }
3719
3742
 
3720
3743
  @media (width >= 1440px) {
3721
- .promo-cards-module-Dy4p3 {
3744
+ .promo-banners-module-uVyxh {
3722
3745
  gap: var(--space-24);
3723
3746
  grid-template-columns: 1.5fr 1fr;
3724
3747
  }
@@ -3938,6 +3961,48 @@ button.swiper-pagination-bullet {
3938
3961
  }
3939
3962
  }
3940
3963
 
3964
+ .promo-card-module-idY1g {
3965
+ height: 100%;
3966
+ container-type: inline-size;
3967
+ }
3968
+
3969
+ .promo-card-module-e2oii {
3970
+ --box-shadow: var(--box-shadow-medium);
3971
+
3972
+ position: relative;
3973
+ overflow: hidden;
3974
+ width: 100%;
3975
+ height: 100%;
3976
+ box-sizing: border-box;
3977
+ cursor: pointer;
3978
+ outline: none;
3979
+ text-decoration: none;
3980
+ transition:
3981
+ scale ease 0.2s,
3982
+ box-shadow ease 0.2s;
3983
+ }
3984
+
3985
+ .promo-card-module-e2oii .promo-card-module-jr9sn img {
3986
+ -o-object-fit: cover;
3987
+ object-fit: cover;
3988
+ -o-object-position: bottom left;
3989
+ object-position: bottom left;
3990
+ }
3991
+
3992
+ @media (hover: hover) {
3993
+ .promo-card-module-e2oii:hover {
3994
+ box-shadow: var(--box-shadow);
3995
+ color: var(--color-black);
3996
+ scale: 1.04;
3997
+ }
3998
+ }
3999
+
4000
+ @container (min-width: 273px) {
4001
+ .promo-card-module-e2oii {
4002
+ --box-shadow: var(--box-shadow-heavy);
4003
+ }
4004
+ }
4005
+
3941
4006
  .product-listing-page-module-dmIHF .product-listing-page-module-Oz76Z {
3942
4007
  margin-bottom: 44px;
3943
4008
  }
@@ -4325,6 +4390,7 @@ button.swiper-pagination-bullet {
4325
4390
  --padding-block: var(--space-20);
4326
4391
 
4327
4392
  display: grid;
4393
+ grid-template-rows: auto 1fr;
4328
4394
  padding-block: var(--padding-block);
4329
4395
  padding-inline: var(--padding-inline);
4330
4396
  }
@@ -4359,7 +4425,8 @@ button.swiper-pagination-bullet {
4359
4425
  }
4360
4426
 
4361
4427
  .search-content-module-KIok6 .search-content-module-qK5sg {
4362
- display: block;
4428
+ display: grid;
4429
+ grid-template-rows: 1fr auto;
4363
4430
  }
4364
4431
 
4365
4432
  .search-content-module-w-ORq {
@@ -4384,6 +4451,7 @@ button.swiper-pagination-bullet {
4384
4451
  --card-width: 154px;
4385
4452
 
4386
4453
  overflow: hidden;
4454
+ height: 100%;
4387
4455
  padding-top: 32px;
4388
4456
  margin-top: -32px;
4389
4457
  gap: var(--column-gap);
@@ -4491,43 +4559,6 @@ button.swiper-pagination-bullet {
4491
4559
  font-weight: var(--font-weight-bold);
4492
4560
  }
4493
4561
 
4494
- .no-search-module-87NKV {
4495
- position: relative;
4496
- left: -16px;
4497
- display: inline-block;
4498
- overflow: hidden;
4499
- width: calc(100% + var(--space-32));
4500
- }
4501
-
4502
- .no-search-module-87NKV .no-search-module-beCXI {
4503
- padding-inline: var(--space-16);
4504
- }
4505
-
4506
- .no-search-module-87NKV .no-search-module-dtT5J {
4507
- display: grid;
4508
- width: 153px;
4509
- height: 272px;
4510
- cursor: pointer;
4511
- place-items: center;
4512
- }
4513
-
4514
- @media (width >= 768px) {
4515
- .no-search-module-87NKV {
4516
- position: static;
4517
- left: unset;
4518
- width: 100%;
4519
- }
4520
-
4521
- .no-search-module-87NKV .no-search-module-beCXI {
4522
- padding-inline: 0;
4523
- }
4524
-
4525
- .no-search-module-87NKV .no-search-module-dtT5J {
4526
- width: 192px;
4527
- height: 343px;
4528
- }
4529
- }
4530
-
4531
4562
  .search-result-panel-module-KBrc9 {
4532
4563
  position: absolute;
4533
4564
  z-index: var(--sidebar-layer);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonic-equipment/ui",
3
- "version": "0.0.89",
3
+ "version": "0.0.90",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -1,6 +0,0 @@
1
- import { AlgoliaProductHit } from './algolia-product-hit-type';
2
- export interface AlgoliaProductHitsGlobalState {
3
- isLoading: boolean | undefined;
4
- items: AlgoliaProductHit[];
5
- }
6
- export declare function AlgoliaProductHitsProvider(): null;
@@ -1,10 +0,0 @@
1
- import { ProductHit } from 'shared/model/product-hit';
2
- import { AlgoliaProductHit } from './algolia-product-hit-type';
3
- export declare const useAlgoliaProductHitsItems: () => [AlgoliaProductHit[], import("shared/providers/global-state-provider").UpdateGlobalState<AlgoliaProductHit[]>];
4
- export declare const useAlgoliaProductHitsLoading: () => [boolean | undefined, import("shared/providers/global-state-provider").UpdateGlobalState<boolean | undefined>];
5
- interface UseProductHitsReturnType {
6
- isLoading: boolean | undefined;
7
- products: ProductHit[];
8
- }
9
- export declare function useAlgoliaProductHits(): UseProductHitsReturnType;
10
- export {};
@@ -1,10 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { CarouselProps } from 'carousel/carousel';
3
- export interface ProductCarouselProps {
4
- allowExpandToGrid?: boolean;
5
- cardWidth?: 'normal' | 'narrow' | 'auto';
6
- hasOverflow?: boolean;
7
- productCards: ReactNode[];
8
- productsPerView?: CarouselProps['slidesPerView'];
9
- }
10
- export declare function ProductCarousel({ allowExpandToGrid, cardWidth, hasOverflow, productCards, productsPerView, }: ProductCarouselProps): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +0,0 @@
1
- import { ResponsiveImage } from 'shared/model/image';
2
- export interface PromoCardsProps {
3
- promoCardsData?: Array<{
4
- href: string;
5
- image: ResponsiveImage;
6
- }>;
7
- }
8
- export declare function PromoCards({ promoCardsData }: PromoCardsProps): import("react/jsx-runtime").JSX.Element | null;