@sonic-equipment/ui 0.0.59 → 0.0.61
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.d.ts +178 -51
- package/dist/index.js +229 -282
- package/dist/src/buttons/link-button/link-button.d.ts +3 -1
- package/dist/src/global-search/plugins/popular-categories-plugin.d.ts +4 -2
- package/dist/src/shared/api/shop/hooks/wishlist/use-add-wishlist-item-to-current-wishlist.d.ts +3 -0
- package/dist/src/shared/api/shop/hooks/wishlist/use-add-wishlist.d.ts +0 -3
- package/dist/src/shared/api/shop/hooks/wishlist/use-create-current-wishlist.d.ts +1 -0
- package/dist/src/shared/api/shop/hooks/wishlist/use-fetch-all-wishlists-items.d.ts +5 -2
- package/dist/src/shared/api/shop/hooks/wishlist/use-remove-wishlist-item-from-wishlist.d.ts +4 -0
- package/dist/src/shared/api/shop/hooks/wishlist/wishlist.stories.d.ts +1 -0
- package/dist/src/shared/api/shop/services/wishlist-service.d.ts +30 -0
- package/dist/src/shared/providers/favorite-provider.d.ts +3 -0
- package/dist/styles.css +96 -41
- package/package.json +1 -1
|
@@ -3,6 +3,8 @@ import { NavigateOptions } from 'shared/routing/route-provider';
|
|
|
3
3
|
export interface LinkButtonProps {
|
|
4
4
|
children?: React.ReactNode | string;
|
|
5
5
|
className?: string;
|
|
6
|
+
color?: 'primary' | 'secondary';
|
|
7
|
+
hasUnderline?: boolean;
|
|
6
8
|
href?: string;
|
|
7
9
|
isDisabled?: boolean;
|
|
8
10
|
onPress?: VoidFunction;
|
|
@@ -10,4 +12,4 @@ export interface LinkButtonProps {
|
|
|
10
12
|
target?: HTMLAttributeAnchorTarget;
|
|
11
13
|
type?: 'button' | 'link';
|
|
12
14
|
}
|
|
13
|
-
export declare function LinkButton({ children, className, href, isDisabled, onPress, route, target, type, }: LinkButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function LinkButton({ children, className, href, isDisabled, onPress, route, hasUnderline, target, color, type, }: LinkButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { AutocompletePlugin } from '@algolia/autocomplete-core';
|
|
2
2
|
import { Hit } from '@algolia/client-search';
|
|
3
3
|
import { SearchClient } from 'algoliasearch';
|
|
4
|
+
import { Image } from 'shared/model/image';
|
|
4
5
|
export type PopularCategoryHit = Hit<{
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
href: string;
|
|
7
|
+
image: Image;
|
|
8
|
+
title: string;
|
|
7
9
|
}>;
|
|
8
10
|
export declare const popularCategoriesPlugin: ({ productsIndexName, searchClient, }: {
|
|
9
11
|
productsIndexName: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useCreateCurrentWishList(): import("@tanstack/react-query").UseMutationResult<string, Error, void, unknown>;
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
import { WishListLineModel
|
|
2
|
-
export declare function useFetchAllWishListsItems(): import("@tanstack/react-query").UseQueryResult<
|
|
1
|
+
import { WishListLineModel, WishListModel } from 'shared/api/shop/model/shop.model';
|
|
2
|
+
export declare function useFetchAllWishListsItems(): import("@tanstack/react-query").UseQueryResult<{
|
|
3
|
+
wishList: WishListModel;
|
|
4
|
+
wishListItem: WishListLineModel;
|
|
5
|
+
}[], Error>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { WishListCollectionModel, WishListLineCollectionModel, WishListModel } from 'shared/api/shop/model/shop.model';
|
|
2
|
+
export declare function createWishList(): Promise<WishListModel>;
|
|
3
|
+
export declare function addWishListItemToWishList({ productId, wishListId, }: {
|
|
4
|
+
productId: string;
|
|
5
|
+
wishListId: string;
|
|
6
|
+
}): Promise<void>;
|
|
7
|
+
export declare function removeWishListItemFromWishList({ wishListId, wishListItemId, }: {
|
|
8
|
+
wishListId: string;
|
|
9
|
+
wishListItemId: string;
|
|
10
|
+
}): Promise<void>;
|
|
11
|
+
export declare class WishListNameAlreadyExistsError extends Error {
|
|
12
|
+
constructor();
|
|
13
|
+
}
|
|
14
|
+
export declare function addWishList({ name, }: {
|
|
15
|
+
name: string;
|
|
16
|
+
}): Promise<WishListModel>;
|
|
17
|
+
export declare function deleteWishListItemFromWishList({ wishListId, wishListItemId, }: {
|
|
18
|
+
wishListId: string;
|
|
19
|
+
wishListItemId: string;
|
|
20
|
+
}): Promise<void>;
|
|
21
|
+
export declare function deleteWishList({ wishListId, }: {
|
|
22
|
+
wishListId: string;
|
|
23
|
+
}): Promise<void>;
|
|
24
|
+
export declare function getWishLists(): Promise<WishListCollectionModel>;
|
|
25
|
+
export declare function getWishList({ wishListId, }: {
|
|
26
|
+
wishListId: string;
|
|
27
|
+
}): Promise<WishListModel>;
|
|
28
|
+
export declare function getWishListItemsByWishListId({ wishListId, }: {
|
|
29
|
+
wishListId: string;
|
|
30
|
+
}): Promise<WishListLineCollectionModel>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { WishListLineModel, WishListModel } from 'shared/api/shop/model/shop.model';
|
|
1
2
|
interface Props {
|
|
2
3
|
onFavoriteAdded: () => void;
|
|
3
4
|
onFavoriteListAdded: () => void;
|
|
@@ -11,5 +12,7 @@ export declare function useFavorite(): {
|
|
|
11
12
|
export declare function useFavoriteProduct(productId: string): {
|
|
12
13
|
isFavorite: boolean;
|
|
13
14
|
isFetching: boolean;
|
|
15
|
+
wishList: WishListModel | undefined;
|
|
16
|
+
wishListItem: WishListLineModel | undefined;
|
|
14
17
|
};
|
|
15
18
|
export {};
|
package/dist/styles.css
CHANGED
|
@@ -211,10 +211,11 @@
|
|
|
211
211
|
}
|
|
212
212
|
:root {
|
|
213
213
|
--carousel-layer: 10;
|
|
214
|
+
--header-layer: 15;
|
|
215
|
+
--loading-layer: 50;
|
|
214
216
|
--sidebar-layer: 100;
|
|
215
217
|
--search-layer: 200;
|
|
216
218
|
--modal-layer: 300;
|
|
217
|
-
--header-layer: 15;
|
|
218
219
|
}
|
|
219
220
|
|
|
220
221
|
/* stylelint-disable max-nesting-depth */
|
|
@@ -515,7 +516,6 @@
|
|
|
515
516
|
position: relative;
|
|
516
517
|
display: inline-flex;
|
|
517
518
|
align-items: center;
|
|
518
|
-
color: var(--color-brand-red);
|
|
519
519
|
cursor: pointer;
|
|
520
520
|
font: inherit;
|
|
521
521
|
gap: var(--space-4);
|
|
@@ -527,26 +527,54 @@
|
|
|
527
527
|
height: 12px;
|
|
528
528
|
}
|
|
529
529
|
|
|
530
|
+
.link-button-module-6i75g:where(.link-button-module-DRTd0) {
|
|
531
|
+
color: var(--color-brand-red);
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
.link-button-module-6i75g:where(.link-button-module-DRTd0):where([data-pressed]),
|
|
535
|
+
.link-button-module-6i75g:where(.link-button-module-DRTd0):where([data-hovered]) {
|
|
536
|
+
color: var(--color-brand-dark-red);
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
.link-button-module-6i75g:where(.link-button-module-DRTd0):where([data-pressed])::after, .link-button-module-6i75g:where(.link-button-module-DRTd0):where([data-hovered])::after {
|
|
540
|
+
background-color: var(--color-brand-dark-red);
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
.link-button-module-6i75g:where(.link-button-module-HEqnO) {
|
|
544
|
+
color: var(--color-black);
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
.link-button-module-6i75g:where(.link-button-module-HEqnO)[data-pressed],
|
|
548
|
+
.link-button-module-6i75g:where(.link-button-module-HEqnO)[data-hovered] {
|
|
549
|
+
color: var(--color-brand-dark-red);
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
.link-button-module-6i75g:where(.link-button-module-HEqnO)[data-pressed]::after, .link-button-module-6i75g:where(.link-button-module-HEqnO)[data-hovered]::after {
|
|
553
|
+
background-color: var(--color-brand-dark-red);
|
|
554
|
+
}
|
|
555
|
+
|
|
530
556
|
.link-button-module-6i75g:where([data-disabled]) {
|
|
531
557
|
cursor: default;
|
|
532
558
|
opacity: 0.4;
|
|
533
559
|
}
|
|
534
560
|
|
|
535
|
-
.link-button-module-6i75g:where([data-pressed]),
|
|
536
|
-
.link-button-module-6i75g:where([data-hovered]) {
|
|
537
|
-
color: var(--color-brand-dark-red);
|
|
538
|
-
}
|
|
539
|
-
|
|
540
561
|
.link-button-module-6i75g:where([data-pressed])::after, .link-button-module-6i75g:where([data-hovered])::after {
|
|
541
562
|
position: absolute;
|
|
542
563
|
bottom: 0;
|
|
543
564
|
left: 0;
|
|
544
565
|
width: 100%;
|
|
545
566
|
height: 1px;
|
|
546
|
-
background-color: var(--color-brand-dark-red);
|
|
547
567
|
content: '';
|
|
548
568
|
}
|
|
549
569
|
|
|
570
|
+
.link-button-module-6i75g:where(.link-button-module-Xc-3N) {
|
|
571
|
+
text-decoration: underline;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
.link-button-module-6i75g:where(.link-button-module-Xc-3N)::after {
|
|
575
|
+
display: none;
|
|
576
|
+
}
|
|
577
|
+
|
|
550
578
|
.field-error-module-FXnIg {
|
|
551
579
|
color: var(--color-brand-red);
|
|
552
580
|
}
|
|
@@ -807,6 +835,7 @@
|
|
|
807
835
|
.product-price-module-oIU1K .product-price-module-pvy2w .product-price-module-GCw07,
|
|
808
836
|
.product-price-module-oIU1K .product-price-module-pvy2w .product-price-module-N56iV {
|
|
809
837
|
font-size: var(--font-size-wholes);
|
|
838
|
+
font-weight: inherit;
|
|
810
839
|
}
|
|
811
840
|
|
|
812
841
|
.product-price-module-oIU1K .product-price-module-pvy2w .product-price-module-eWOOF {
|
|
@@ -814,6 +843,7 @@
|
|
|
814
843
|
margin-top: 2px;
|
|
815
844
|
margin-left: -0.375rem;
|
|
816
845
|
font-size: var(--font-size-decimals);
|
|
846
|
+
font-weight: inherit;
|
|
817
847
|
}
|
|
818
848
|
|
|
819
849
|
.product-price-module-oIU1K .product-price-module-96DoG {
|
|
@@ -927,6 +957,8 @@
|
|
|
927
957
|
|
|
928
958
|
.product-card-module-pLaiB .product-card-module-Q0VvF .product-card-module-CStNi mark {
|
|
929
959
|
background-color: rgb(109 170 200 / 40%);
|
|
960
|
+
color: currentcolor;
|
|
961
|
+
font-weight: inherit;
|
|
930
962
|
}
|
|
931
963
|
|
|
932
964
|
.product-card-module-pLaiB .product-card-module-kD2tU {
|
|
@@ -1001,7 +1033,7 @@
|
|
|
1001
1033
|
}
|
|
1002
1034
|
|
|
1003
1035
|
/**
|
|
1004
|
-
* Swiper 11.1.
|
|
1036
|
+
* Swiper 11.1.10
|
|
1005
1037
|
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
|
1006
1038
|
* https://swiperjs.com
|
|
1007
1039
|
*
|
|
@@ -1009,7 +1041,7 @@
|
|
|
1009
1041
|
*
|
|
1010
1042
|
* Released under the MIT License
|
|
1011
1043
|
*
|
|
1012
|
-
* Released on:
|
|
1044
|
+
* Released on: August 21, 2024
|
|
1013
1045
|
*/
|
|
1014
1046
|
|
|
1015
1047
|
/* FONT_START */
|
|
@@ -1315,6 +1347,7 @@
|
|
|
1315
1347
|
.carousel-module-ealh- .carousel-module-bUMlb {
|
|
1316
1348
|
display: block;
|
|
1317
1349
|
width: auto;
|
|
1350
|
+
text-align: left;
|
|
1318
1351
|
}
|
|
1319
1352
|
.carousel-module-ealh- .carousel-module-kcqEE.carousel-module-uCrOA {
|
|
1320
1353
|
display: none;
|
|
@@ -1879,11 +1912,11 @@
|
|
|
1879
1912
|
|
|
1880
1913
|
.product-overview-grid-module-bzys- .product-overview-grid-module-XikkF {
|
|
1881
1914
|
position: absolute;
|
|
1882
|
-
z-index:
|
|
1915
|
+
z-index: var(--loading-layer);
|
|
1883
1916
|
display: flex;
|
|
1884
1917
|
justify-content: center;
|
|
1885
1918
|
padding: 120px;
|
|
1886
|
-
animation: product-overview-grid-module-A6CS7
|
|
1919
|
+
animation: product-overview-grid-module-A6CS7 1s ease-in-out forwards;
|
|
1887
1920
|
background-color: rgb(255 255 255 / 0%);
|
|
1888
1921
|
inset: 0;
|
|
1889
1922
|
pointer-events: none;
|
|
@@ -1895,14 +1928,33 @@
|
|
|
1895
1928
|
.product-overview-grid-module-bzys- .product-overview-grid-module-XikkF .product-overview-grid-module-DWnnI {
|
|
1896
1929
|
position: fixed;
|
|
1897
1930
|
top: 50vh;
|
|
1931
|
+
animation: product-overview-grid-module-r-wvY 1s linear forwards;
|
|
1898
1932
|
}
|
|
1899
1933
|
|
|
1934
|
+
@keyframes product-overview-grid-module-r-wvY {
|
|
1935
|
+
0% {
|
|
1936
|
+
opacity: 0;
|
|
1937
|
+
}
|
|
1938
|
+
|
|
1939
|
+
99% {
|
|
1940
|
+
opacity: 0;
|
|
1941
|
+
}
|
|
1942
|
+
|
|
1943
|
+
100% {
|
|
1944
|
+
opacity: 1;
|
|
1945
|
+
}
|
|
1946
|
+
}
|
|
1947
|
+
|
|
1900
1948
|
@keyframes product-overview-grid-module-A6CS7 {
|
|
1901
|
-
|
|
1949
|
+
0% {
|
|
1902
1950
|
background-color: rgb(255 255 255 / 0%);
|
|
1903
1951
|
}
|
|
1904
1952
|
|
|
1905
|
-
|
|
1953
|
+
50% {
|
|
1954
|
+
background-color: rgb(255 255 255 / 0%);
|
|
1955
|
+
}
|
|
1956
|
+
|
|
1957
|
+
100% {
|
|
1906
1958
|
background-color: rgb(255 255 255 / 80%);
|
|
1907
1959
|
}
|
|
1908
1960
|
}
|
|
@@ -2307,28 +2359,6 @@
|
|
|
2307
2359
|
gap: 8px;
|
|
2308
2360
|
}
|
|
2309
2361
|
|
|
2310
|
-
.add-to-favorite-dialog-module-WJYMb {
|
|
2311
|
-
display: flex;
|
|
2312
|
-
flex-direction: column;
|
|
2313
|
-
gap: 1rem;
|
|
2314
|
-
}
|
|
2315
|
-
|
|
2316
|
-
.add-to-favorite-dialog-module--0-Ln {
|
|
2317
|
-
display: flex;
|
|
2318
|
-
flex-direction: row-reverse;
|
|
2319
|
-
justify-content: flex-end;
|
|
2320
|
-
gap: 1rem;
|
|
2321
|
-
}
|
|
2322
|
-
|
|
2323
|
-
.add-to-favorite-dialog-module-ZAuzE {
|
|
2324
|
-
display: flex;
|
|
2325
|
-
min-height: 66px;
|
|
2326
|
-
align-items: center;
|
|
2327
|
-
justify-content: center;
|
|
2328
|
-
font-weight: bold;
|
|
2329
|
-
gap: 1rem;
|
|
2330
|
-
}
|
|
2331
|
-
|
|
2332
2362
|
.category-card-module-4NUjH {
|
|
2333
2363
|
all: unset;
|
|
2334
2364
|
display: grid;
|
|
@@ -2840,8 +2870,6 @@
|
|
|
2840
2870
|
--border: 1px solid var(--color-brand-light-gray);
|
|
2841
2871
|
|
|
2842
2872
|
display: grid;
|
|
2843
|
-
border-top: var(--border);
|
|
2844
|
-
border-left: var(--border);
|
|
2845
2873
|
grid-template-columns: repeat(var(--amount-of-columns), 1fr);
|
|
2846
2874
|
}
|
|
2847
2875
|
|
|
@@ -2849,15 +2877,38 @@
|
|
|
2849
2877
|
position: relative;
|
|
2850
2878
|
display: grid;
|
|
2851
2879
|
padding: var(--space-16);
|
|
2852
|
-
border-right: var(--border);
|
|
2853
|
-
border-bottom: var(--border);
|
|
2854
2880
|
place-items: center;
|
|
2855
2881
|
}
|
|
2856
2882
|
|
|
2883
|
+
@media (0 <= width < 576px) {
|
|
2884
|
+
.categories-grid-module-C751R {
|
|
2885
|
+
position: relative;
|
|
2886
|
+
left: calc(var(--padding-inline) * -1);
|
|
2887
|
+
width: calc(100% + (var(--padding-inline) * 2));
|
|
2888
|
+
border-top: var(--border);
|
|
2889
|
+
}
|
|
2890
|
+
|
|
2891
|
+
.categories-grid-module-C751R .categories-grid-module-7OZS1 {
|
|
2892
|
+
border-bottom: var(--border);
|
|
2893
|
+
}
|
|
2894
|
+
|
|
2895
|
+
.categories-grid-module-C751R .categories-grid-module-7OZS1:nth-child(odd) {
|
|
2896
|
+
border-right: var(--border);
|
|
2897
|
+
}
|
|
2898
|
+
}
|
|
2899
|
+
|
|
2857
2900
|
@media (width >= 576px) {
|
|
2858
2901
|
.categories-grid-module-C751R {
|
|
2859
2902
|
--amount-of-columns: 3;
|
|
2903
|
+
|
|
2904
|
+
border-top: var(--border);
|
|
2905
|
+
border-left: var(--border);
|
|
2860
2906
|
}
|
|
2907
|
+
|
|
2908
|
+
.categories-grid-module-C751R .categories-grid-module-7OZS1 {
|
|
2909
|
+
border-right: var(--border);
|
|
2910
|
+
border-bottom: var(--border);
|
|
2911
|
+
}
|
|
2861
2912
|
}
|
|
2862
2913
|
|
|
2863
2914
|
@media (width >= 1024px) {
|
|
@@ -2947,9 +2998,11 @@
|
|
|
2947
2998
|
padding-inline: var(--padding-inline);
|
|
2948
2999
|
}
|
|
2949
3000
|
|
|
2950
|
-
.search-content-module-H-FX2 .search-content-module-
|
|
3001
|
+
.search-content-module-H-FX2 .search-content-module-LbQnK {
|
|
2951
3002
|
margin-top: var(--space-12);
|
|
2952
3003
|
margin-bottom: var(--space-24);
|
|
3004
|
+
font-size: var(--font-size-24);
|
|
3005
|
+
font-weight: var(--font-weight-medium);
|
|
2953
3006
|
}
|
|
2954
3007
|
|
|
2955
3008
|
.search-content-module-H-FX2 .search-content-module-mhiBZ {
|
|
@@ -2961,8 +3014,10 @@
|
|
|
2961
3014
|
}
|
|
2962
3015
|
|
|
2963
3016
|
.search-content-module-H-FX2 .search-content-module-mhiBZ .search-content-module-coPAt {
|
|
3017
|
+
display: block;
|
|
2964
3018
|
padding-left: var(--space-16);
|
|
2965
3019
|
margin: 0;
|
|
3020
|
+
list-style: initial;
|
|
2966
3021
|
}
|
|
2967
3022
|
|
|
2968
3023
|
@media (width >= 768px) {
|