@sonic-equipment/ui 0.0.26 → 0.0.28

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 (55) hide show
  1. package/dist/algolia/algolia-pagination.d.ts +5 -1
  2. package/dist/algolia/algolia-provider.d.ts +1 -1
  3. package/dist/algolia/algolia-sonic-searchclient.d.ts +2 -0
  4. package/dist/breadcrumbs/breadcrumb.stories.d.ts +2 -2
  5. package/dist/breadcrumbs/connected-breadcrumb.d.ts +1 -1
  6. package/dist/buttons/icon-button/icon-button.d.ts +2 -1
  7. package/dist/cards/category-card/category-card.d.ts +2 -5
  8. package/dist/cards/product-card/product-card.d.ts +7 -5
  9. package/dist/cards/product-card/product-card.stories.d.ts +2 -1
  10. package/dist/carousel/category-carousel/connected-category-carousel.d.ts +1 -0
  11. package/dist/filters/pagination/pagination.d.ts +2 -2
  12. package/dist/icons/arrows/text-aligned-arrow-icon.d.ts +2 -0
  13. package/dist/icons/magnifying-glass/magnifying-glass-icon.d.ts +2 -0
  14. package/dist/icons/math/minus-filled-icon.d.ts +2 -0
  15. package/dist/icons/math/plus-filled-icon.d.ts +2 -0
  16. package/dist/icons/reset/reset-icon.d.ts +2 -0
  17. package/dist/icons/trash/trash-outlined-icon.d.ts +2 -0
  18. package/dist/index.d.ts +44 -57
  19. package/dist/index.js +328 -151
  20. package/dist/intl/translation-id.d.ts +1 -1
  21. package/dist/media/image/image.d.ts +2 -19
  22. package/dist/pages/product-listing-page/product-listing-page-data-types.d.ts +20 -0
  23. package/dist/pages/product-listing-page/product-listing-page-provider/product-listing-page-context.d.ts +9 -0
  24. package/dist/pages/product-listing-page/product-listing-page-provider/product-listing-page-provider.d.ts +8 -0
  25. package/dist/pages/product-listing-page/product-listing-page-provider/use-breadcrumb.d.ts +4 -0
  26. package/dist/pages/product-listing-page/product-listing-page-provider/use-subcategories.d.ts +4 -0
  27. package/dist/pages/product-listing-page/product-listing-page.d.ts +5 -3
  28. package/dist/pages/product-listing-page/product-listing-page.stories.d.ts +7 -8
  29. package/dist/pages/product-listing-page/types.d.ts +34 -0
  30. package/dist/pages/product-listing-page/use-fetch-product-listing-page/product-listing-page-data-response.d.ts +48 -0
  31. package/dist/pages/product-listing-page/use-fetch-product-listing-page/use-fetch-product-listing-page-data.d.ts +2 -0
  32. package/dist/pages/product-listing-page/use-fetch-product-listing-page/use-fetch-product-listing-page-data.stories.d.ts +20 -0
  33. package/dist/search/global-search/clear-icon.d.ts +2 -0
  34. package/dist/search/global-search/global-search.d.ts +19 -0
  35. package/dist/search/global-search/global-search.stories.d.ts +14 -0
  36. package/dist/search/global-search/highlight.d.ts +21 -0
  37. package/dist/search/global-search/plugins/categories-plugin.d.ts +10 -0
  38. package/dist/search/global-search/plugins/popular-categories-plugin.d.ts +11 -0
  39. package/dist/search/global-search/plugins/popular-searches-plugin.d.ts +12 -0
  40. package/dist/search/global-search/plugins/products-plugin.d.ts +23 -0
  41. package/dist/search/global-search/plugins/query-suggestions-plugin.d.ts +12 -0
  42. package/dist/search/global-search/plugins/quick-access-plugin.d.ts +13 -0
  43. package/dist/search/global-search/plugins/recent-searches-plugin.d.ts +7 -0
  44. package/dist/search/global-search/search-icon.d.ts +2 -0
  45. package/dist/search/global-search/types.d.ts +23 -0
  46. package/dist/search/search-input/search-input.d.ts +5 -0
  47. package/dist/search/search-input/search-input.stories.d.ts +6 -0
  48. package/dist/shared/fetch/ResponseError.d.ts +9 -0
  49. package/dist/shared/hooks/use-scroll-to.d.ts +8 -0
  50. package/dist/shared/types/category.d.ts +6 -0
  51. package/dist/shared/types/image.d.ts +20 -0
  52. package/dist/styles.css +97 -25
  53. package/package.json +34 -29
  54. package/dist/shared/providers/breadcrumb-provider.d.ts +0 -11
  55. /package/dist/shared/hooks/{use-debounce-callback.d.ts → use-debounced-callback.d.ts} +0 -0
package/dist/styles.css CHANGED
@@ -131,6 +131,7 @@
131
131
 
132
132
  /* Neutrals */
133
133
  --color-gray-50: #fbfbfb;
134
+ --color-gray-75: #f6f6f6;
134
135
  --color-gray-100: #ededed;
135
136
  --color-gray-500: #bcbcbc;
136
137
  --color-gray-900: #6f6f6f;
@@ -254,6 +255,7 @@
254
255
  font-weight: var(--font-weight-bold);
255
256
  }
256
257
  .breadcrumb-module-CQGse .breadcrumb-module-hxhDY:not(:last-of-type)::after {
258
+ color: var(--color-brand-medium-gray);
257
259
  content: '/';
258
260
  margin-inline: 10px;
259
261
  }
@@ -618,18 +620,61 @@
618
620
  justify-content: space-between;
619
621
  }
620
622
 
623
+ .number-field-module-gmnog .number-field-module-8Lvgh input {
624
+ min-width: var(--space-36);
625
+ transition: font-size 0.5s ease;
626
+ }
627
+
628
+ .number-field-module-gmnog .number-field-module-8Lvgh:has(button[data-pressed]) input {
629
+ animation: number-field-module-OlEoa 100ms infinite;
630
+ }
631
+
621
632
  .number-field-module-gmnog .number-field-module-8Lvgh button {
622
633
  all: unset;
634
+ position: relative;
635
+ display: flex;
623
636
  width: var(--space-32);
637
+ align-items: center;
638
+ justify-content: center;
624
639
  cursor: pointer;
625
- font-size: var(--font-size-24);
640
+ font-size: var(--font-size-32);
641
+ -webkit-tap-highlight-color: transparent;
626
642
  text-align: center;
643
+ -webkit-user-select: none;
644
+ -moz-user-select: none;
645
+ user-select: none;
627
646
  }
628
647
 
648
+ .number-field-module-gmnog .number-field-module-8Lvgh button[data-pressed]::before {
649
+ position: absolute;
650
+ z-index: -1;
651
+ top: 50%;
652
+ left: 50%;
653
+ display: block;
654
+ width: 24px;
655
+ height: 24px;
656
+ border-radius: 50%;
657
+ margin-top: -12px;
658
+ margin-left: -12px;
659
+ background-color: var(--color-brand-light-gray);
660
+ content: '';
661
+ }
662
+
629
663
  .number-field-module-gmnog span:empty {
630
664
  display: none;
631
665
  }
632
666
 
667
+ @keyframes number-field-module-OlEoa {
668
+ 0%,
669
+ 100% {
670
+ transform: scale(1);
671
+ }
672
+
673
+ 50% {
674
+ transform: scale(1.3);
675
+ }
676
+ }
677
+
633
678
  .add-to-cart-button-module-AWFvQ {
634
679
  display: inline-flex;
635
680
  flex-direction: row;
@@ -888,6 +933,7 @@
888
933
  display: grid;
889
934
  max-width: 136px;
890
935
  cursor: pointer;
936
+ padding-inline: 10px;
891
937
  place-items: center;
892
938
  }
893
939
 
@@ -945,6 +991,11 @@
945
991
  }
946
992
  }
947
993
 
994
+ @media (width >= 1024px) {.category-card-module-4NUjH {
995
+ padding-inline: 0
996
+ }
997
+ }
998
+
948
999
  @media (width >= 1440px) {.category-card-module-4NUjH {
949
1000
  max-width: 144px
950
1001
  }
@@ -1293,9 +1344,6 @@
1293
1344
  right: 0;
1294
1345
  transform: translate(50%, 0);
1295
1346
  }
1296
- .carousel-module-ealh- .carousel-module-k7Z4S .carousel-module-Hi-0z.carousel-module-T7bTr .carousel-module-p5oAL {
1297
- transform: rotate(180deg);
1298
- }
1299
1347
  .carousel-module-ealh- .carousel-module-k7Z4S .carousel-module-Hi-0z .carousel-module-kcqEE {
1300
1348
  width: 44px;
1301
1349
  height: 44px;
@@ -1311,8 +1359,8 @@
1311
1359
  background-color: var(--color-brand-light-gray);
1312
1360
  }
1313
1361
  .carousel-module-ealh- .carousel-module-k7Z4S .carousel-module-Hi-0z .carousel-module-kcqEE[data-disabled] {
1362
+ color: #bcbcbc66;
1314
1363
  cursor: default;
1315
- opacity: 0.4;
1316
1364
  }
1317
1365
  .carousel-module-ealh- .carousel-module-k7Z4S.carousel-module-nL-O8 .carousel-module-Hi-0z {
1318
1366
  top: var(--space-24);
@@ -1320,7 +1368,12 @@
1320
1368
  .carousel-module-ealh- .carousel-module-k7Z4S.carousel-module-5SGYn .carousel-module-Hi-0z {
1321
1369
  top: 50%;
1322
1370
  }
1323
- @media (width < 576px) {
1371
+ @media (width < 1024px) {
1372
+ .carousel-module-ealh- {
1373
+ width: calc(100% + 20px);
1374
+ margin-left: -10px
1375
+ }
1376
+
1324
1377
  .carousel-module-ealh- .carousel-module-Hi-0z {
1325
1378
  display: none;
1326
1379
  }
@@ -1625,8 +1678,8 @@
1625
1678
 
1626
1679
  all: unset;
1627
1680
  position: relative;
1628
- display: grid;
1629
- width: 100%;
1681
+ display: inline-flex;
1682
+ box-sizing: border-box;
1630
1683
  gap: var(--space-4);
1631
1684
  }
1632
1685
 
@@ -1867,26 +1920,34 @@
1867
1920
  }
1868
1921
  }
1869
1922
 
1870
- .page-layout-module-osQ2n {
1871
- --page-layout-padding: 1rem;
1872
-
1873
- position: relative;
1874
- box-sizing: border-box;
1875
- padding: var(--page-layout-padding);
1876
- padding-bottom: var(--space-64);
1923
+ .page-layout-module-sSsgZ {
1924
+ overflow: hidden;
1877
1925
  }
1878
1926
 
1879
- @media (width >= 768px) {.page-layout-module-osQ2n {
1880
- max-width: calc(806px + (2 * var(--page-layout-padding)));
1881
- margin: 0 auto
1882
- }
1927
+ .page-layout-module-sSsgZ .page-layout-module-osQ2n {
1928
+ --page-layout-padding: 10px;
1929
+
1930
+ position: relative;
1931
+ box-sizing: border-box;
1932
+ padding: var(--page-layout-padding);
1933
+ padding-bottom: var(--space-64);
1883
1934
  }
1884
1935
 
1885
- @media (width >= 1440px) {.page-layout-module-osQ2n {
1886
- max-width: calc(1222px + (2 * var(--page-layout-padding)));
1887
- padding-bottom: var(--space-96)
1888
- }
1936
+ @media (width >= 768px) {
1937
+
1938
+ .page-layout-module-sSsgZ .page-layout-module-osQ2n {
1939
+ max-width: calc(806px + (2 * var(--page-layout-padding)));
1940
+ margin: 0 auto
1889
1941
  }
1942
+ }
1943
+
1944
+ @media (width >= 1440px) {
1945
+
1946
+ .page-layout-module-sSsgZ .page-layout-module-osQ2n {
1947
+ max-width: calc(1222px + (2 * var(--page-layout-padding)));
1948
+ padding-bottom: var(--space-96)
1949
+ }
1950
+ }
1890
1951
 
1891
1952
  .heading-module-pMC65 {
1892
1953
  padding: 0;
@@ -2142,11 +2203,17 @@
2142
2203
  margin-bottom: 44px;
2143
2204
  }
2144
2205
  .product-listing-page-module-dmIHF .product-listing-page-module-XxGrr {
2145
- display: grid;
2206
+ display: flex;
2207
+ flex-wrap: wrap;
2146
2208
  align-items: center;
2209
+ justify-content: space-between;
2147
2210
  margin-bottom: var(--space-24);
2148
- grid-template-columns: auto 1fr auto;
2211
+ row-gap: var(--space-8);
2149
2212
  }
2213
+ .product-listing-page-module-dmIHF .product-listing-page-module-XxGrr .product-listing-page-module-aQzHr {
2214
+ display: flex;
2215
+ justify-content: flex-end;
2216
+ }
2150
2217
  .product-listing-page-module-dmIHF .product-listing-page-module-XxGrr .product-listing-page-module-zx79v {
2151
2218
  margin: auto;
2152
2219
  }
@@ -2166,6 +2233,11 @@
2166
2233
  grid-column: span 2;
2167
2234
  }
2168
2235
  @media (width >= 1440px) {
2236
+ .product-listing-page-module-dmIHF .product-listing-page-module-XxGrr {
2237
+ display: grid;
2238
+ grid-template-columns: repeat(3, 1fr);
2239
+ }
2240
+
2169
2241
  .product-listing-page-module-dmIHF .product-listing-page-module-ICkKg {
2170
2242
  grid-template-columns: auto 1fr;
2171
2243
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonic-equipment/ui",
3
- "version": "0.0.26",
3
+ "version": "0.0.28",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -31,41 +31,41 @@
31
31
  "start": "http-server ./storybook-static",
32
32
  "stylelint": "stylelint --config .stylelintrc.cjs \"src/**/*.css\"",
33
33
  "stylelint:fix": "stylelint --config .stylelintrc.cjs \"src/**/*.css\" --formatter verbose --fix",
34
- "test:all": "npx concurrently -g --names \"TSC,ESLINT,STYLELINT\" -c auto --kill-others-on-fail \"pnpm test:types\" \"pnpm lint\" \"pnpm stylelint\"",
34
+ "test:all": "npx concurrently -g --names \"TSC,ESLINT,STYLELINT\" -c auto --kill-others-on-fail \"npm run test:types\" \"npm run lint\" \"npm run stylelint\"",
35
35
  "test:types": "tsc --noEmit --pretty false",
36
36
  "update-packages": "npx npm-check-updates -u"
37
37
  },
38
38
  "peerDependencies": {
39
- "react": "^18",
40
- "react-dom": "^18",
41
- "qs": "^6",
42
39
  "algoliasearch": "^4",
43
40
  "instantsearch.js": "^4",
41
+ "qs": "^6",
42
+ "react": "^18",
43
+ "react-dom": "^18",
44
44
  "react-instantsearch": "^7",
45
45
  "react-instantsearch-core": "^7"
46
46
  },
47
47
  "devDependencies": {
48
- "@chromatic-com/storybook": "^1.4.0",
48
+ "@chromatic-com/storybook": "^1.5.0",
49
49
  "@csstools/postcss-global-data": "^2.1.1",
50
50
  "@rollup/plugin-alias": "^5.1.0",
51
- "@rollup/plugin-commonjs": "^25.0.8",
51
+ "@rollup/plugin-commonjs": "^26.0.1",
52
52
  "@rollup/plugin-node-resolve": "^15.2.3",
53
53
  "@rollup/plugin-typescript": "^11.1.6",
54
- "@storybook/addon-docs": "^8.1.3",
55
- "@storybook/addon-essentials": "^8.1.3",
56
- "@storybook/addon-interactions": "^8.1.3",
57
- "@storybook/addon-links": "^8.1.3",
58
- "@storybook/addon-viewport": "^8.1.3",
59
- "@storybook/blocks": "^8.1.3",
60
- "@storybook/preview-api": "^8.1.3",
61
- "@storybook/react": "^8.1.3",
62
- "@storybook/react-vite": "^8.1.3",
63
- "@storybook/test": "^8.1.3",
64
- "@types/react": "^18.3.2",
54
+ "@storybook/addon-docs": "^8.1.9",
55
+ "@storybook/addon-essentials": "^8.1.9",
56
+ "@storybook/addon-interactions": "^8.1.9",
57
+ "@storybook/addon-links": "^8.1.9",
58
+ "@storybook/addon-viewport": "^8.1.9",
59
+ "@storybook/blocks": "^8.1.9",
60
+ "@storybook/preview-api": "^8.1.9",
61
+ "@storybook/react": "^8.1.9",
62
+ "@storybook/react-vite": "^8.1.9",
63
+ "@storybook/test": "^8.1.9",
64
+ "@types/react": "^18.3.3",
65
65
  "@types/react-dom": "^18.3.0",
66
- "@typescript-eslint/eslint-plugin": "^7.10.0",
67
- "@typescript-eslint/parser": "^7.10.0",
68
- "@vitejs/plugin-react": "^4.3.0",
66
+ "@typescript-eslint/eslint-plugin": "^7.13.0",
67
+ "@typescript-eslint/parser": "^7.13.0",
68
+ "@vitejs/plugin-react": "^4.3.1",
69
69
  "autoprefixer": "^10.4.19",
70
70
  "concurrently": "^8.2.2",
71
71
  "eslint": "^8.57.0",
@@ -75,7 +75,7 @@
75
75
  "eslint-plugin-mdx": "^3.1.5",
76
76
  "eslint-plugin-no-relative-import-paths": "^1.5.4",
77
77
  "eslint-plugin-prettier": "^5.1.3",
78
- "eslint-plugin-react": "^7.34.1",
78
+ "eslint-plugin-react": "^7.34.2",
79
79
  "eslint-plugin-react-hooks": "^4.6.2",
80
80
  "eslint-plugin-simple-import-sort": "^12.1.0",
81
81
  "eslint-plugin-sort-destructure-keys": "^2.0.0",
@@ -85,7 +85,7 @@
85
85
  "eslint-plugin-unused-imports": "^3.2.0",
86
86
  "http-server": "^14.1.1",
87
87
  "husky": "^9.0.11",
88
- "instantsearch.js": "^4.69.0",
88
+ "instantsearch.js": "^4.71.1",
89
89
  "postcss": "^8.4.38",
90
90
  "postcss-custom-media": "^10.0.6",
91
91
  "postcss-import": "^16.1.0",
@@ -98,23 +98,28 @@
98
98
  "rollup-plugin-peer-deps-external": "^2.2.4",
99
99
  "rollup-plugin-postcss": "^4.0.2",
100
100
  "rollup-plugin-ts": "^3.4.5",
101
- "storybook": "^8.1.3",
102
- "stylelint": "^16.5.0",
101
+ "storybook": "^8.1.9",
102
+ "stylelint": "^16.6.1",
103
103
  "stylelint-config-css-modules": "^4.4.0",
104
104
  "stylelint-config-idiomatic-order": "^10.0.0",
105
105
  "stylelint-config-standard": "^36.0.0",
106
106
  "typescript": "^5.4.5",
107
- "vite": "^5.2.11",
107
+ "vite": "^5.3.1",
108
108
  "vite-tsconfig-paths": "^4.3.2"
109
109
  },
110
110
  "dependencies": {
111
+ "@algolia/autocomplete-core": "^1.17.2",
112
+ "@algolia/autocomplete-plugin-query-suggestions": "^1.17.2",
113
+ "@algolia/autocomplete-plugin-recent-searches": "^1.17.2",
114
+ "@algolia/autocomplete-preset-algolia": "^1.17.2",
111
115
  "@algolia/client-search": "^4.23.3",
116
+ "@tanstack/react-query": "^5.45.0",
112
117
  "algoliasearch": "^4.23.3",
113
- "instantsearch.js": "^4.69.0",
114
118
  "clsx": "^2.1.1",
119
+ "instantsearch.js": "^4.71.1",
115
120
  "react-aria-components": "^1.2.1",
116
- "react-instantsearch": "^7.9.0",
117
- "swiper": "^11.1.3"
121
+ "react-instantsearch": "^7.11.1",
122
+ "swiper": "^11.1.4"
118
123
  },
119
124
  "publishConfig": {
120
125
  "access": "public"
@@ -1,11 +0,0 @@
1
- export interface Link {
2
- href: string;
3
- label: string;
4
- }
5
- interface Props {
6
- links: Link[];
7
- updateLinks: (links: Link[]) => void;
8
- }
9
- export declare function BreadcrumbProvider(props: Props): null;
10
- export declare function useBreadcrumb(): Props;
11
- export {};