@sonic-equipment/ui 178.0.0 → 180.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.
Files changed (102) hide show
  1. package/dist/algolia/algolia-active-filters.js +4 -0
  2. package/dist/config.js +4 -7
  3. package/dist/country-select/country-select.d.ts +1 -0
  4. package/dist/exports.d.ts +19 -9
  5. package/dist/forms/input/input.d.ts +1 -0
  6. package/dist/forms/input/input.js +4 -4
  7. package/dist/forms/input/input.module.css.js +1 -1
  8. package/dist/forms/password-field/password-field.d.ts +2 -0
  9. package/dist/forms/password-field/password-field.js +15 -0
  10. package/dist/forms/search-field/search-field.d.ts +5 -0
  11. package/dist/forms/search-field/search-field.js +19 -0
  12. package/dist/forms/text-field/text-field.d.ts +25 -24
  13. package/dist/forms/text-field/text-field.js +7 -14
  14. package/dist/forms/textarea/textarea.d.ts +1 -0
  15. package/dist/forms/textarea/textarea.js +2 -2
  16. package/dist/forms/textarea/textarea.module.css.js +1 -1
  17. package/dist/global-search/search-highlight/highlight.d.ts +1 -0
  18. package/dist/header/buttons/account/connected-account-button.js +1 -1
  19. package/dist/icons/solid/solid-rating-icon.js +7 -0
  20. package/dist/index.js +20 -10
  21. package/dist/intl/translation-id.d.ts +1 -1
  22. package/dist/modals/dialog/dialog.d.ts +5 -1
  23. package/dist/modals/dialog/dialog.js +10 -4
  24. package/dist/navigation/mobile-navigation/mobile-navigation.js +1 -1
  25. package/dist/observers/intersection-observer.d.ts +9 -1
  26. package/dist/observers/intersection-observer.js +6 -3
  27. package/dist/pages/account/components/create-account-form/create-account-form.js +3 -2
  28. package/dist/pages/account/components/sign-in-form/sign-in-form.js +2 -1
  29. package/dist/pages/my-sonic/actions/change-customer/change-customer-dialog.d.ts +15 -0
  30. package/dist/pages/my-sonic/actions/change-customer/change-customer-dialog.js +23 -0
  31. package/dist/pages/my-sonic/actions/change-customer/change-customer-dialog.module.css.js +3 -0
  32. package/dist/pages/my-sonic/actions/change-customer/change-customer.d.ts +13 -0
  33. package/dist/pages/my-sonic/actions/change-customer/change-customer.js +66 -0
  34. package/dist/pages/my-sonic/actions/change-customer/change-customer.module.css.js +3 -0
  35. package/dist/pages/my-sonic/actions/change-customer/connected-change-customer-dialog.d.ts +2 -0
  36. package/dist/pages/my-sonic/actions/change-customer/connected-change-customer-dialog.js +39 -0
  37. package/dist/pages/my-sonic/navigation/connected-my-sonic-navigation.d.ts +1 -0
  38. package/dist/pages/{my-account/navigation/connected-my-account-navigation.js → my-sonic/navigation/connected-my-sonic-navigation.js} +5 -5
  39. package/dist/pages/my-sonic/navigation/my-sonic-desktop-navigation.d.ts +6 -0
  40. package/dist/pages/my-sonic/navigation/my-sonic-desktop-navigation.js +19 -0
  41. package/dist/pages/my-sonic/navigation/my-sonic-desktop-navigation.module.css.js +3 -0
  42. package/dist/pages/{my-account/navigation/my-account-mobile-navigation.d.ts → my-sonic/navigation/my-sonic-mobile-navigation.d.ts} +1 -1
  43. package/dist/pages/my-sonic/navigation/my-sonic-mobile-navigation.js +22 -0
  44. package/dist/pages/my-sonic/navigation/my-sonic-navigation-items.d.ts +18 -0
  45. package/dist/pages/my-sonic/navigation/my-sonic-navigation-items.js +29 -0
  46. package/dist/pages/my-sonic/widgets/connected-customer-information-widget.d.ts +1 -0
  47. package/dist/pages/my-sonic/widgets/connected-customer-information-widget.js +56 -0
  48. package/dist/pages/product/layouts/product-details-page-layout/product-details-page-layout.d.ts +2 -2
  49. package/dist/pages/product/layouts/product-details-page-layout/product-details-page-layout.js +3 -2
  50. package/dist/pages/product/layouts/product-details-page-layout/product-details-page-layout.module.css.js +1 -1
  51. package/dist/pages/product/product-details-page/components/product-details-recently-viewed-section/product-details-recently-viewed-section.d.ts +1 -0
  52. package/dist/pages/product/product-details-page/components/product-details-recently-viewed-section/product-details-recently-viewed-section.js +24 -0
  53. package/dist/pages/product/product-details-page/components/product-details-recently-viewed-section/product-details-recently-viewed-section.module.css.js +3 -0
  54. package/dist/pages/product/product-details-page/product-details.d.ts +1 -2
  55. package/dist/pages/product/product-details-page/product-details.js +4 -5
  56. package/dist/shared/api/bff/hooks/use-fetch-product-details-page-data.js +6 -2
  57. package/dist/shared/api/bff/hooks/use-fetch-recently-viewed-products.d.ts +4 -0
  58. package/dist/shared/api/bff/hooks/use-fetch-recently-viewed-products.js +15 -0
  59. package/dist/shared/api/bff/model/bff.model.d.ts +0 -1
  60. package/dist/shared/api/bff/services/bff-service.d.ts +4 -1
  61. package/dist/shared/api/bff/services/bff-service.js +11 -1
  62. package/dist/shared/api/storefront/hooks/authentication/use-patch-session.d.ts +12 -1
  63. package/dist/shared/api/storefront/hooks/customer/use-fetch-bill-to-addresses.d.ts +4 -1
  64. package/dist/shared/api/storefront/hooks/customer/use-fetch-bill-to-addresses.js +5 -6
  65. package/dist/shared/api/storefront/hooks/product/use-mark-product-as-viewed.d.ts +2 -0
  66. package/dist/shared/api/storefront/hooks/product/use-mark-product-as-viewed.js +17 -0
  67. package/dist/shared/api/storefront/model/storefront.model.d.ts +4 -1
  68. package/dist/shared/api/storefront/services/customer-service.d.ts +5 -1
  69. package/dist/shared/api/storefront/services/customer-service.js +3 -3
  70. package/dist/shared/api/storefront/services/product-service.d.ts +4 -0
  71. package/dist/shared/api/storefront/services/product-service.js +10 -0
  72. package/dist/shared/feature-flags/use-feature-flags.d.ts +0 -3
  73. package/dist/shared/feature-flags/use-feature-flags.js +0 -3
  74. package/dist/shared/fetch/request.d.ts +1 -1
  75. package/dist/shared/ga/google-analytics-provider.d.ts +1 -1
  76. package/dist/shared/hooks/use-intersection-observer.d.ts +2 -1
  77. package/dist/shared/hooks/use-intersection-observer.js +3 -2
  78. package/dist/styles.css +228 -101
  79. package/dist/text/highlight-text/highlight-text.d.ts +10 -0
  80. package/dist/text/highlight-text/highlight-text.js +19 -0
  81. package/dist/text/highlight-text/highlight-text.module.css.js +3 -0
  82. package/dist/typography/heading/heading.d.ts +3 -1
  83. package/dist/typography/heading/heading.js +2 -1
  84. package/package.json +2 -1
  85. package/dist/icons/solid/solid-dashboard-icon.js +0 -7
  86. package/dist/pages/my-account/navigation/connected-my-account-navigation.d.ts +0 -1
  87. package/dist/pages/my-account/navigation/my-account-desktop-navigation.d.ts +0 -6
  88. package/dist/pages/my-account/navigation/my-account-desktop-navigation.js +0 -17
  89. package/dist/pages/my-account/navigation/my-account-desktop-navigation.module.css.js +0 -3
  90. package/dist/pages/my-account/navigation/my-account-mobile-navigation.js +0 -25
  91. package/dist/pages/my-account/widgets/connected-company-information-widget.d.ts +0 -1
  92. package/dist/pages/my-account/widgets/connected-company-information-widget.js +0 -43
  93. package/dist/pages/product/product-details-page/components/product-details-recently-viewed/product-details-recently-viewed.d.ts +0 -4
  94. package/dist/pages/product/product-details-page/components/product-details-recently-viewed/product-details-recently-viewed.js +0 -15
  95. /package/dist/pages/{my-account → my-sonic}/widgets/components/address-data-card.d.ts +0 -0
  96. /package/dist/pages/{my-account → my-sonic}/widgets/components/address-data-card.js +0 -0
  97. /package/dist/pages/{my-account → my-sonic}/widgets/connected-bill-to-address-widget.d.ts +0 -0
  98. /package/dist/pages/{my-account → my-sonic}/widgets/connected-bill-to-address-widget.js +0 -0
  99. /package/dist/pages/{my-account → my-sonic}/widgets/connected-ship-to-address-widget.d.ts +0 -0
  100. /package/dist/pages/{my-account → my-sonic}/widgets/connected-ship-to-address-widget.js +0 -0
  101. /package/dist/pages/{my-account → my-sonic}/widgets/connected-user-account-widget.d.ts +0 -0
  102. /package/dist/pages/{my-account → my-sonic}/widgets/connected-user-account-widget.js +0 -0
package/dist/styles.css CHANGED
@@ -195,6 +195,11 @@
195
195
 
196
196
  /* State */
197
197
  --color-focus-ring: var(--color-brand-red);
198
+ --color-selection: color-mix(
199
+ in oklch,
200
+ var(--color-brand-dark-steelblue) 50%,
201
+ transparent
202
+ );
198
203
  }
199
204
  :root {
200
205
  /*********************************************************
@@ -202,17 +207,12 @@
202
207
  * Global border radius tokens
203
208
  *
204
209
  *********************************************************/
205
- --border-radius-0: 0px;
206
210
  --border-radius-2: 2px;
207
- --border-radius-4: 4px;
208
- --border-radius-6: 6px;
209
211
  --border-radius-8: 8px;
210
212
  --border-radius-12: 12px;
211
- --border-radius-16: 16px;
212
213
  --border-radius-20: 20px;
213
214
  --border-radius-22: 22px;
214
- --border-radius-30: 30px;
215
- --border-radius-full: 9999px;
215
+ --border-radius-32: 32px;
216
216
 
217
217
  /*********************************************************
218
218
  *
@@ -1371,6 +1371,13 @@ html {
1371
1371
  border-radius: var(--border-radius-8);
1372
1372
  background-color: var(--color-brand-light-gray);
1373
1373
  }
1374
+ .input-module-2woJR.input-module-uWZm6 {
1375
+ background-color: var(--color-brand-light-gray);
1376
+ }
1377
+ .input-module-2woJR.input-module-i5PS- {
1378
+ border: solid 1.5px var(--color-brand-medium-gray);
1379
+ background-color: var(--color-brand-white);
1380
+ }
1374
1381
  .input-module-2woJR::-moz-placeholder {
1375
1382
  font-style: italic;
1376
1383
  }
@@ -1383,7 +1390,16 @@ html {
1383
1390
  width: 100%;
1384
1391
  min-width: 180px;
1385
1392
  box-sizing: border-box;
1393
+ -webkit-appearance: none;
1394
+ -moz-appearance: none;
1395
+ appearance: none;
1386
1396
  font: inherit;
1397
+ font-size: inherit;
1398
+ }
1399
+ .input-module-2woJR input[type='search']::-webkit-search-cancel-button {
1400
+ display: none;
1401
+ -webkit-appearance: none;
1402
+ appearance: none;
1387
1403
  }
1388
1404
  .input-module-2woJR .input-module-pNKEt {
1389
1405
  display: none;
@@ -1448,7 +1464,7 @@ html {
1448
1464
  white-space: nowrap;
1449
1465
  }
1450
1466
  /* account for inline element when growing */
1451
- .input-module-2woJR .input-module-6HwY4 .input-module-oeAz2 + .input-module-pNKEt {
1467
+ .input-module-2woJR .input-module-6HwY4 .input-module-oeAz2 ~ .input-module-pNKEt {
1452
1468
  margin-right: var(--space-24);
1453
1469
  }
1454
1470
  .input-module-2woJR .input-module-zjVxG {
@@ -1457,7 +1473,7 @@ html {
1457
1473
  align-items: center;
1458
1474
  grid-template-columns: 1fr 0;
1459
1475
  }
1460
- .input-module-2woJR .input-module-zjVxG input:has(+ .input-module-oeAz2) {
1476
+ .input-module-2woJR .input-module-zjVxG input:has(~ .input-module-oeAz2) {
1461
1477
  padding-right: var(--space-36);
1462
1478
  margin-right: -20px;
1463
1479
  }
@@ -1472,20 +1488,23 @@ html {
1472
1488
  font-family: 'Verdana', sans-serif !important;
1473
1489
  font-size: inherit !important;
1474
1490
  }
1475
- .input-module-2woJR .input-module-zjVxG input[type='password'] + .input-module-oeAz2 {
1491
+ .input-module-2woJR .input-module-zjVxG input[type='password'] ~ .input-module-oeAz2 {
1476
1492
  transition: all 0.2s ease;
1477
1493
  }
1478
- .input-module-2woJR .input-module-zjVxG input[type='password'][value=''] + .input-module-oeAz2 {
1494
+ .input-module-2woJR .input-module-zjVxG input[type='password'][value=''] ~ .input-module-oeAz2 {
1479
1495
  opacity: 0;
1480
1496
  visibility: hidden;
1481
1497
  }
1482
- .input-module-2woJR .input-module-zjVxG input[type='password']:not([value='']) + .input-module-oeAz2 {
1498
+ .input-module-2woJR .input-module-zjVxG input[type='password']:not([value='']) ~ .input-module-oeAz2 {
1483
1499
  opacity: 1;
1484
1500
  visibility: visible;
1485
1501
  }
1486
1502
  .input-module-2woJR .input-module-zjVxG input[type='password']::-ms-reveal {
1487
1503
  display: none;
1488
1504
  }
1505
+ .input-module-2woJR .input-module-zjVxG input[type='password'] ~ .input-module-pNKEt {
1506
+ font-family: 'Verdana', sans-serif !important;
1507
+ }
1489
1508
 
1490
1509
  .number-field-module-xawWc .number-field-module-A1nvE {
1491
1510
  display: flex;
@@ -2659,9 +2678,9 @@ html {
2659
2678
  .data-card-module-24uin {
2660
2679
  position: relative;
2661
2680
  width: 100%;
2662
- min-height: 200px;
2681
+ min-height: 150px;
2663
2682
  border: 1px solid var(--color-brand-medium-gray);
2664
- border-radius: var(--border-radius-22);
2683
+ border-radius: var(--border-radius-32);
2665
2684
  container-type: inline-size;
2666
2685
  }
2667
2686
 
@@ -2688,10 +2707,10 @@ html {
2688
2707
  }
2689
2708
 
2690
2709
  .data-card-module-24uin .data-card-module-ZefqY {
2691
- padding: var(--space-32) var(--space-32) var(--space-16);
2710
+ padding: var(--space-32) var(--space-16) var(--space-16) var(--space-32);
2692
2711
  }
2693
2712
 
2694
- @container (max-width: 273px) {
2713
+ @container (max-width: 414px) {
2695
2714
 
2696
2715
  .data-card-module-24uin .data-card-module-ZefqY {
2697
2716
  padding: var(--space-20) var(--space-16) var(--space-16)
@@ -2713,7 +2732,7 @@ html {
2713
2732
  line-height: 1;
2714
2733
  }
2715
2734
 
2716
- @container (max-width: 273px) {
2735
+ @container (max-width: 414px) {
2717
2736
 
2718
2737
  .data-card-module-24uin .data-card-module-ZefqY .data-card-module-EDbE- {
2719
2738
  grid-template-areas: unset;
@@ -2728,7 +2747,7 @@ html {
2728
2747
  text-align: right;
2729
2748
  }
2730
2749
 
2731
- @container (max-width: 273px) {
2750
+ @container (max-width: 414px) {
2732
2751
 
2733
2752
  .data-card-module-24uin .data-card-module-ZefqY .data-card-module-EDbE- .data-card-module-FAgmN {
2734
2753
  text-align: left
@@ -2748,7 +2767,7 @@ html {
2748
2767
  gap: var(--space-8);
2749
2768
  }
2750
2769
 
2751
- @container (max-width: 273px) {
2770
+ @container (max-width: 414px) {
2752
2771
 
2753
2772
  .data-card-module-24uin .data-card-module-ZefqY .data-card-module-Qv5iI {
2754
2773
  flex-direction: column
@@ -4880,6 +4899,7 @@ button.swiper-pagination-bullet {
4880
4899
  font-size: var(--font-size-base);
4881
4900
  grid-template-areas: 'icon body';
4882
4901
  grid-template-columns: minmax(0, min-content) 1fr;
4902
+ line-height: 1.25;
4883
4903
  }
4884
4904
 
4885
4905
  .message-module-w2hsL {
@@ -5036,6 +5056,95 @@ button.swiper-pagination-bullet {
5036
5056
  } */
5037
5057
  }
5038
5058
 
5059
+ .password-reveal-toggle-module-bGH6I {
5060
+ display: inline-flex;
5061
+ color: var(--color-brand-medium-gray);
5062
+ cursor: pointer;
5063
+ }
5064
+
5065
+ .password-reveal-toggle-module-bGH6I[data-hovered],
5066
+ .password-reveal-toggle-module-bGH6I[data-focused] {
5067
+ color: var(--color-brand-dark-gray);
5068
+ }
5069
+
5070
+ .password-reveal-toggle-module-bGH6I input {
5071
+ block-size: 0;
5072
+ inline-size: 0;
5073
+ }
5074
+
5075
+ .password-reveal-toggle-module-bGH6I span {
5076
+ block-size: var(--space-24);
5077
+ inline-size: var(--space-24);
5078
+ }
5079
+
5080
+ .textarea-module-C6Xr1 {
5081
+ position: relative;
5082
+ display: inline-block;
5083
+ overflow: hidden;
5084
+ border: none;
5085
+ border-radius: var(--border-radius-8);
5086
+ }
5087
+
5088
+ .textarea-module-C6Xr1.textarea-module-NgOND {
5089
+ background-color: var(--color-brand-light-gray);
5090
+ }
5091
+
5092
+ .textarea-module-C6Xr1.textarea-module-Z-ytQ {
5093
+ border: solid 1.5px var(--color-brand-medium-gray);
5094
+ background-color: var(--color-brand-white);
5095
+ }
5096
+
5097
+ .textarea-module-C6Xr1:has([data-disabled]) {
5098
+ opacity: 0.4;
5099
+ }
5100
+
5101
+ .textarea-module-C6Xr1:has([data-focused]) {
5102
+ box-shadow: 0 0 8px 2px var(--color-brand-red);
5103
+ outline: 0;
5104
+ }
5105
+
5106
+ .textarea-module-C6Xr1:has([data-invalid])::after {
5107
+ position: absolute;
5108
+ right: 0;
5109
+ bottom: 0;
5110
+ left: 0;
5111
+ display: block;
5112
+ height: 2px;
5113
+ background-color: var(--color-brand-red);
5114
+ content: '';
5115
+ }
5116
+
5117
+ .textarea-module-C6Xr1 textarea {
5118
+ all: unset;
5119
+ width: 100%;
5120
+ box-sizing: border-box;
5121
+ padding: 13px var(--space-16);
5122
+ font: inherit;
5123
+ overflow-y: hidden;
5124
+ }
5125
+
5126
+ .textarea-module-C6Xr1.textarea-module-vksG- textarea,
5127
+ .textarea-module-C6Xr1.textarea-module-vksG- .textarea-module-C6Xr1 {
5128
+ min-height: var(--space-44);
5129
+ }
5130
+
5131
+ .textarea-module-C6Xr1.textarea-module-vksG- textarea {
5132
+ padding: var(--space-16);
5133
+ }
5134
+
5135
+ .textarea-module-C6Xr1.textarea-module-6JrQJ textarea,
5136
+ .textarea-module-C6Xr1.textarea-module-6JrQJ .textarea-module-C6Xr1 {
5137
+ min-height: var(--space-40);
5138
+ }
5139
+
5140
+ .textarea-module-C6Xr1.textarea-module-6JrQJ textarea {
5141
+ padding: 11px var(--space-8);
5142
+ }
5143
+
5144
+ .text-field-module-PBkCx {
5145
+ /* styles */
5146
+ }
5147
+
5039
5148
  .switch-module-ywpXc {
5040
5149
  --pin-color: var(--color-white);
5041
5150
  --box-color: var(--color-brand-light-gray);
@@ -5131,87 +5240,6 @@ button.swiper-pagination-bullet {
5131
5240
  justify-self: flex-start;
5132
5241
  }
5133
5242
 
5134
- .password-reveal-toggle-module-bGH6I {
5135
- display: inline-flex;
5136
- color: var(--color-brand-medium-gray);
5137
- cursor: pointer;
5138
- }
5139
-
5140
- .password-reveal-toggle-module-bGH6I[data-hovered],
5141
- .password-reveal-toggle-module-bGH6I[data-focused] {
5142
- color: var(--color-brand-dark-gray);
5143
- }
5144
-
5145
- .password-reveal-toggle-module-bGH6I input {
5146
- block-size: 0;
5147
- inline-size: 0;
5148
- }
5149
-
5150
- .password-reveal-toggle-module-bGH6I span {
5151
- block-size: var(--space-24);
5152
- inline-size: var(--space-24);
5153
- }
5154
-
5155
- .textarea-module-C6Xr1 {
5156
- position: relative;
5157
- display: inline-block;
5158
- overflow: hidden;
5159
- border: none;
5160
- border-radius: var(--border-radius-8);
5161
- background-color: var(--color-brand-light-gray);
5162
- }
5163
-
5164
- .textarea-module-C6Xr1:has([data-disabled]) {
5165
- opacity: 0.4;
5166
- }
5167
-
5168
- .textarea-module-C6Xr1:has([data-focused]) {
5169
- box-shadow: 0 0 8px 2px var(--color-brand-red);
5170
- outline: 0;
5171
- }
5172
-
5173
- .textarea-module-C6Xr1:has([data-invalid])::after {
5174
- position: absolute;
5175
- right: 0;
5176
- bottom: 0;
5177
- left: 0;
5178
- display: block;
5179
- height: 2px;
5180
- background-color: var(--color-brand-red);
5181
- content: '';
5182
- }
5183
-
5184
- .textarea-module-C6Xr1 textarea {
5185
- all: unset;
5186
- width: 100%;
5187
- box-sizing: border-box;
5188
- padding: 13px var(--space-16);
5189
- font: inherit;
5190
- overflow-y: hidden;
5191
- }
5192
-
5193
- .textarea-module-C6Xr1.textarea-module-vksG- textarea,
5194
- .textarea-module-C6Xr1.textarea-module-vksG- .textarea-module-C6Xr1 {
5195
- min-height: var(--space-44);
5196
- }
5197
-
5198
- .textarea-module-C6Xr1.textarea-module-vksG- textarea {
5199
- padding: var(--space-16);
5200
- }
5201
-
5202
- .textarea-module-C6Xr1.textarea-module-6JrQJ textarea,
5203
- .textarea-module-C6Xr1.textarea-module-6JrQJ .textarea-module-C6Xr1 {
5204
- min-height: var(--space-40);
5205
- }
5206
-
5207
- .textarea-module-C6Xr1.textarea-module-6JrQJ textarea {
5208
- padding: 11px var(--space-8);
5209
- }
5210
-
5211
- .text-field-module-PBkCx {
5212
- /* styles */
5213
- }
5214
-
5215
5243
  .categories-grid-module-C751R {
5216
5244
  --nr-of-columns: 2;
5217
5245
  --item-padding: var(--space-16);
@@ -7433,7 +7461,100 @@ button.swiper-pagination-bullet {
7433
7461
  color: var(--color-brand-red);
7434
7462
  }
7435
7463
 
7436
- .my-account-desktop-navigation-module-3BpoH {
7464
+ .highlight-text-module-e6Irk {
7465
+ background-color: var(--highlighted-text-bg-color, rgb(109 170 200 / 40%));
7466
+ }
7467
+
7468
+ .change-customer-module-2kOw4 {
7469
+ display: grid;
7470
+ block-size: 100%;
7471
+ gap: var(--space-8);
7472
+ grid-template-rows: min-content 1fr min-content;
7473
+ }
7474
+
7475
+ .change-customer-module-StfiY {
7476
+ box-sizing: border-box;
7477
+ border: 1.5px solid var(--color-brand-medium-gray);
7478
+ border-radius: var(--border-radius-8);
7479
+ block-size: 100%;
7480
+ inline-size: 100%;
7481
+ overflow-y: scroll;
7482
+ }
7483
+
7484
+ .change-customer-module-P7ouY {
7485
+ position: relative;
7486
+ display: flex;
7487
+ box-sizing: border-box;
7488
+ flex-direction: column;
7489
+ padding: var(--space-4) var(--space-12);
7490
+ -moz-column-gap: 8px;
7491
+ column-gap: 8px;
7492
+ cursor: pointer;
7493
+ }
7494
+
7495
+ .change-customer-module-P7ouY::after {
7496
+ position: absolute;
7497
+ display: block;
7498
+ background: var(--color-brand-light-gray);
7499
+ block-size: 1.5px;
7500
+ content: '';
7501
+ inset: auto 12px 0;
7502
+ }
7503
+
7504
+ .change-customer-module-P7ouY [slot='label'] {
7505
+ display: flex;
7506
+ width: 100%;
7507
+ flex-direction: column;
7508
+ }
7509
+
7510
+ .change-customer-module-P7ouY [slot='label'] .change-customer-module-DSVPN {
7511
+ display: flex;
7512
+ flex-direction: row;
7513
+ align-items: center;
7514
+ gap: var(--space-4);
7515
+ grid-area: company-name;
7516
+ }
7517
+
7518
+ .change-customer-module-P7ouY [slot='label'] .change-customer-module-DSVPN .change-customer-module-4KQoq {
7519
+ font-weight: bold;
7520
+ }
7521
+
7522
+ .change-customer-module-P7ouY [slot='label'] .change-customer-module-4p6ab {
7523
+ color: var(--color-brand-dark-gray);
7524
+ font-weight: normal;
7525
+ grid-area: customer-number;
7526
+ }
7527
+
7528
+ .change-customer-module-P7ouY [slot='description'] {
7529
+ grid-area: description;
7530
+ }
7531
+
7532
+ .change-customer-module-P7ouY:focus,
7533
+ .change-customer-module-P7ouY:focus-visible,
7534
+ .change-customer-module-P7ouY[aria-selected='true'] {
7535
+ outline: none;
7536
+ }
7537
+
7538
+ .change-customer-module-P7ouY:focus::before, .change-customer-module-P7ouY:focus-visible::before, .change-customer-module-P7ouY[aria-selected='true']::before {
7539
+ position: absolute;
7540
+ z-index: -1;
7541
+ display: block;
7542
+ background: var(--color-selection);
7543
+ content: '';
7544
+ inset: 0;
7545
+ pointer-events: none;
7546
+ }
7547
+
7548
+ .change-customer-module-P7ouY:focus::after, .change-customer-module-P7ouY:focus-visible::after, .change-customer-module-P7ouY[aria-selected='true']::after {
7549
+ display: none;
7550
+ }
7551
+
7552
+ .change-customer-dialog-module-O6oOS .change-customer-dialog-module-OP23q {
7553
+ width: 300px;
7554
+ height: 400px;
7555
+ }
7556
+
7557
+ .my-sonic-desktop-navigation-module-f8Y3F {
7437
7558
  font-weight: bold;
7438
7559
  }
7439
7560
 
@@ -7458,7 +7579,6 @@ button.swiper-pagination-bullet {
7458
7579
  height: fit-content;
7459
7580
  }
7460
7581
 
7461
- .product-details-page-layout-module-pPtZX .product-details-page-layout-module-Cl9u-,
7462
7582
  .product-details-page-layout-module-pPtZX .product-details-page-layout-module-lfAgH {
7463
7583
  display: flex;
7464
7584
  flex-direction: column;
@@ -7557,6 +7677,13 @@ button.swiper-pagination-bullet {
7557
7677
  margin-bottom: var(--space-24);
7558
7678
  }
7559
7679
 
7680
+ .product-details-recently-viewed-section-module-cGFgH {
7681
+ display: flex;
7682
+ flex-direction: column;
7683
+ align-items: center;
7684
+ gap: var(--space-24);
7685
+ }
7686
+
7560
7687
  & .promo-banner-module-yuVEO {
7561
7688
  position: relative;
7562
7689
  display: block;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ type HighlightTextProps = {
3
+ className?: string;
4
+ highlightClassName?: string;
5
+ highlightText: string;
6
+ isCaseSensitive?: boolean;
7
+ text: string;
8
+ };
9
+ export declare const HighlightText: React.FC<HighlightTextProps>;
10
+ export {};
@@ -0,0 +1,19 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import { Fragment } from 'react';
3
+ import styles from './highlight-text.module.css.js';
4
+
5
+ const HighlightText = ({ className, highlightClassName = styles['highlighted-text'], highlightText, isCaseSensitive = false, text, }) => {
6
+ if (!highlightText)
7
+ return className ? jsx("span", { className: className, children: text }) : text;
8
+ const regex = new RegExp(highlightText.replaceAll(/[$()*+.?[\\\]^{|}]/g, String.raw `\$&`), // escape regex special chars
9
+ isCaseSensitive ? 'g' : 'gi');
10
+ const parts = text.split(regex);
11
+ const matches = text.match(regex);
12
+ if (parts.length === 0)
13
+ return className ? jsx("span", { className: className, children: text }) : text;
14
+ return (jsx("span", { className: className, children: parts.map((part, index) => (
15
+ // eslint-disable-next-line @eslint-react/no-array-index-key
16
+ jsxs(Fragment, { children: [part, matches && index < matches.length && (jsx("span", { className: highlightClassName, children: matches[index] }))] }, `${part}-${index}`))) }));
17
+ };
18
+
19
+ export { HighlightText };
@@ -0,0 +1,3 @@
1
+ var styles = {"highlighted-text":"highlight-text-module-e6Irk"};
2
+
3
+ export { styles as default };
@@ -9,13 +9,15 @@ export interface HeadingProps {
9
9
  children: React.ReactNode;
10
10
  className?: string;
11
11
  'data-test-selector'?: string;
12
+ id?: string;
12
13
  italic?: boolean;
13
14
  size?: Size;
14
15
  tag?: Tag;
15
16
  uppercase?: boolean;
16
17
  }
17
- export declare function Heading({ bold, breakpoints, children, className, 'data-test-selector': dataTestSelector, italic, size, tag, uppercase, }: HeadingProps): React.ReactElement<{
18
+ export declare function Heading({ bold, breakpoints, children, className, 'data-test-selector': dataTestSelector, id, italic, size, tag, uppercase, }: HeadingProps): React.ReactElement<{
18
19
  className: string;
19
20
  'data-test-selector': string;
21
+ id: string | undefined;
20
22
  }, string | React.JSXElementConstructor<any>>;
21
23
  export {};
@@ -15,7 +15,7 @@ const sizeToTag = {
15
15
  xxs: 'h6',
16
16
  xxxs: 'h6',
17
17
  };
18
- function Heading({ bold = true, breakpoints, children, className, 'data-test-selector': dataTestSelector = 'heading', italic, size = 'xxl', tag, uppercase, }) {
18
+ function Heading({ bold = true, breakpoints, children, className, 'data-test-selector': dataTestSelector = 'heading', id, italic, size = 'xxl', tag, uppercase, }) {
19
19
  return createElement(tag || sizeToTag[size], {
20
20
  className: clsx(className, styles.heading, styles[size], breakpoints &&
21
21
  Object.entries(breakpoints).map(([breakpoint, bpSize]) => styles[`${breakpoint}-${bpSize}`]), {
@@ -24,6 +24,7 @@ function Heading({ bold = true, breakpoints, children, className, 'data-test-sel
24
24
  [styles.bold]: bold,
25
25
  }),
26
26
  'data-test-selector': dataTestSelector,
27
+ id,
27
28
  }, children);
28
29
  }
29
30
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonic-equipment/ui",
3
- "version": "178.0.0",
3
+ "version": "180.0.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -84,6 +84,7 @@
84
84
  "eslint-config-prettier": "10.1.5",
85
85
  "eslint-import-resolver-typescript": "3.10.1",
86
86
  "eslint-plugin-css-modules": "^2.12.0",
87
+ "eslint-plugin-deprecation": "^3.0.0",
87
88
  "eslint-plugin-formatjs": "^5.3.1",
88
89
  "eslint-plugin-import": "2.31.0",
89
90
  "eslint-plugin-jsx-a11y": "^6.10.2",
@@ -1,7 +0,0 @@
1
- import { jsx } from 'react/jsx-runtime';
2
-
3
- function SolidDashboardIcon(props) {
4
- return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", ...props, fill: "currentColor", height: "24", viewBox: "0 0 24 24", width: "24", children: jsx("path", { d: "M5.75930325,11 L8.74069675,11 C10.5577989,11 11.5,10.1436837 11.5,8.50048216 L11.5,5.5072324 C11.5,3.8563163 10.5577989,3 8.74069675,3 L5.75930325,3 C3.94220111,3 3,3.8563163 3,5.5072324 L3,8.50048216 C3,10.1513983 3.94220111,11 5.75930325,11 Z M5.75930325,20.5 L8.74069675,20.5 C10.5577989,20.5 11.5,19.6436837 11.5,18.0004822 L11.5,15.0072324 C11.5,13.3563163 10.5577989,12.5 8.74069675,12.5 L5.75930325,12.5 C3.94220111,12.5 3,13.3563163 3,15.0072324 L3,18.0004822 C3,19.6513983 3.94220111,20.5 5.75930325,20.5 Z M15.7593032,11 L18.7406968,11 C20.5577989,11 21.5,10.1436837 21.5,8.50048216 L21.5,5.5072324 C21.5,3.8563163 20.5577989,3 18.7406968,3 L15.7593032,3 C13.9422011,3 13,3.8563163 13,5.5072324 L13,8.50048216 C13,10.1513983 13.9422011,11 15.7593032,11 Z M15.7593032,20.5 L18.7406968,20.5 C20.5577989,20.5 21.5,19.6436837 21.5,18.0004822 L21.5,15.0072324 C21.5,13.3563163 20.5577989,12.5 18.7406968,12.5 L15.7593032,12.5 C13.9422011,12.5 13,13.3563163 13,15.0072324 L13,18.0004822 C13,19.6513983 13.9422011,20.5 15.7593032,20.5 Z" }) }));
5
- }
6
-
7
- export { SolidDashboardIcon };
@@ -1 +0,0 @@
1
- export declare function ConnectedMyAccountNavigation(): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +0,0 @@
1
- interface MyAccountDesktopNavigationProps {
2
- currentPath?: string;
3
- onLogout?: VoidFunction;
4
- }
5
- export declare function MyAccountDesktopNavigation({ currentPath, onLogout, }: MyAccountDesktopNavigationProps): import("react/jsx-runtime").JSX.Element;
6
- export {};
@@ -1,17 +0,0 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { SolidCartIcon } from '../../../icons/solid/solid-cart-icon.js';
3
- import { SolidDashboardIcon } from '../../../icons/solid/solid-dashboard-icon.js';
4
- import { SolidFavoriteIcon } from '../../../icons/solid/solid-favorite-icon.js';
5
- import { SolidLoginIcon } from '../../../icons/solid/solid-login-icon.js';
6
- import { SolidLogOutIcon } from '../../../icons/solid/solid-logout-icon.js';
7
- import { FormattedMessage } from '../../../intl/formatted-message.js';
8
- import { MenuList } from '../../../lists/menu-list/menu-list.js';
9
- import { MenuListItem } from '../../../lists/menu-list/menu-list-item.js';
10
- import { PATHS } from '../../paths.js';
11
- import styles from './my-account-desktop-navigation.module.css.js';
12
-
13
- function MyAccountDesktopNavigation({ currentPath, onLogout, }) {
14
- return (jsxs(MenuList, { children: [jsx(MenuListItem, { hasChildren: true, badge: jsx(SolidDashboardIcon, {}), href: PATHS.ACCOUNT, isSelected: currentPath?.toLowerCase() === PATHS.ACCOUNT.toLowerCase(), children: jsx("span", { className: styles['menu-list-item'], children: jsx(FormattedMessage, { id: "Overview" }) }) }), jsx(MenuListItem, { hasChildren: true, badge: jsx(SolidLoginIcon, {}), href: PATHS.ACCOUNT_SETTINGS, isSelected: currentPath?.toLowerCase() === PATHS.ACCOUNT_SETTINGS.toLowerCase(), children: jsx("span", { className: styles['menu-list-item'], children: jsx(FormattedMessage, { id: "Sonic account" }) }) }), jsx(MenuListItem, { hasChildren: true, badge: jsx(SolidFavoriteIcon, {}), href: PATHS.ACCOUNT_MY_LISTS, isSelected: currentPath?.toLowerCase() === PATHS.ACCOUNT_MY_LISTS.toLowerCase(), children: jsx("span", { className: styles['menu-list-item'], children: jsx(FormattedMessage, { id: "Favorites" }) }) }), jsx(MenuListItem, { hasChildren: true, badge: jsx(SolidCartIcon, {}), href: PATHS.ACCOUNT_ORDERS, isSelected: currentPath?.toLowerCase() === PATHS.ACCOUNT_ORDERS.toLowerCase(), children: jsx("span", { className: styles['menu-list-item'], children: jsx(FormattedMessage, { id: "Orders" }) }) }), jsx(MenuListItem, { hasChildren: true, badge: jsx(SolidLogOutIcon, {}), onClick: onLogout, children: jsx("span", { className: styles['menu-list-item'], children: jsx(FormattedMessage, { id: "Log out" }) }) })] }));
15
- }
16
-
17
- export { MyAccountDesktopNavigation };
@@ -1,3 +0,0 @@
1
- var styles = {"menu-list-item":"my-account-desktop-navigation-module-3BpoH"};
2
-
3
- export { styles as default };
@@ -1,25 +0,0 @@
1
- import { jsx } from 'react/jsx-runtime';
2
- import { useMemo } from 'react';
3
- import { Select } from '../../../forms/select/select.js';
4
- import { useFormattedMessage } from '../../../intl/use-formatted-message.js';
5
- import { useNavigate } from '../../../shared/routing/use-navigate.js';
6
- import { PATHS } from '../../paths.js';
7
-
8
- function MyAccountMobileNavigation({ currentPath, onLogout, }) {
9
- const { navigate } = useNavigate();
10
- const t = useFormattedMessage();
11
- const options = useMemo(() => ({
12
- [PATHS.ACCOUNT.toLowerCase()]: t('Overview'),
13
- [PATHS.ACCOUNT_SETTINGS.toLowerCase()]: t('Sonic account'),
14
- [PATHS.ACCOUNT_MY_LISTS.toLowerCase()]: t('Favorites'),
15
- [PATHS.ACCOUNT_ORDERS.toLowerCase()]: t('Orders'),
16
- logout: t('Log out'),
17
- }), [t]);
18
- return (jsx(Select, { label: t('Navigate to...'), onChange: option => {
19
- if (option === 'logout')
20
- return onLogout();
21
- return navigate(option);
22
- }, options: options, selectedOption: currentPath?.toLowerCase() }));
23
- }
24
-
25
- export { MyAccountMobileNavigation };
@@ -1 +0,0 @@
1
- export declare function ConnectedCompanyInformationWidget(): import("react/jsx-runtime").JSX.Element;
@@ -1,43 +0,0 @@
1
- import { jsx } from 'react/jsx-runtime';
2
- import { Button } from '../../../buttons/button/button.js';
3
- import { DataCard } from '../../../cards/data-card/data-card.js';
4
- import { FormattedMessage } from '../../../intl/formatted-message.js';
5
- import { useFetchCurrentBillToAddress } from '../../../shared/api/storefront/hooks/customer/use-fetch-current-bill-to-address.js';
6
-
7
- function ConnectedCompanyInformationWidget() {
8
- const { data: billToAddress, error, isLoading, } = useFetchCurrentBillToAddress();
9
- const data = billToAddress
10
- ? [
11
- {
12
- key: 'company-name',
13
- label: 'Company name',
14
- value: billToAddress.companyName,
15
- },
16
- {
17
- key: 'coc-number',
18
- label: 'CoC number',
19
- value: billToAddress.properties.cocRegistration,
20
- },
21
- {
22
- key: 'billing',
23
- label: 'Billing',
24
- value: [
25
- billToAddress.address1,
26
- billToAddress.address2,
27
- billToAddress.address3,
28
- billToAddress.address4,
29
- billToAddress.postalCode,
30
- billToAddress.city,
31
- billToAddress.country?.abbreviation,
32
- ]
33
- .filter(Boolean)
34
- .join(', ') || null,
35
- },
36
- ]
37
- : [];
38
- return (jsx(DataCard, { actions: [
39
- jsx(Button, { isDisabled: true, color: "secondary", size: "sm", variant: "outline", children: jsx(FormattedMessage, { id: "Select other company" }) }, "edit"),
40
- ], data: data, "data-test-selector": "company-information-widget", isLoading: isLoading, showError: error, title: "Selected company" }));
41
- }
42
-
43
- export { ConnectedCompanyInformationWidget };
@@ -1,4 +0,0 @@
1
- import { ProductSummary } from '../../../../../shared/api/bff/model/bff.model';
2
- export declare function ProductDetailsRecentlyViewed({ recentlyViewed, }: {
3
- recentlyViewed: ProductSummary[];
4
- }): import("react/jsx-runtime").JSX.Element;