@sonic-equipment/ui 239.0.0 → 241.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.
- package/dist/algolia/algolia-index-config.d.ts +3 -1
- package/dist/algolia/algolia-index-config.js +19 -112
- package/dist/algolia/algolia-initialization.js +1 -1
- package/dist/buttons/button/button.js +1 -1
- package/dist/cart-totals/cart-totals-summary.js +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/delivery-time/delivery-time.js +1 -1
- package/dist/display/details/details.d.ts +7 -0
- package/dist/display/details/details.js +11 -0
- package/dist/display/details/details.module.css.js +3 -0
- package/dist/display/price/price.js +15 -5
- package/dist/exports.d.ts +1 -0
- package/dist/header/buttons/account/connected-account-button.js +3 -1
- package/dist/icons/glyph/glyphs-chevrons-bold-right-icon.js +8 -0
- package/dist/index.js +1 -0
- package/dist/info-icon-tooltip/info-icon-tooltip.js +1 -1
- package/dist/intl/translation-id.d.ts +1 -1
- package/dist/modals/confirmation/confirmation-dialog.d.ts +1 -1
- package/dist/navigation/quick-access-menu/quick-access-menu.js +4 -1
- package/dist/pages/checkout/cart-page/cart-page.js +2 -2
- package/dist/pages/checkout/payment-page/components/adyen-payment.d.ts +1 -1
- package/dist/pages/error-page/error-page.d.ts +2 -1
- package/dist/pages/error-page/error-page.js +2 -2
- package/dist/pages/my-sonic/actions/create-ship-to-address/connected-create-ship-to-address-form.js +1 -2
- package/dist/pages/my-sonic/actions/edit-bill-to-address/connected-edit-bill-to-address-form.js +1 -2
- package/dist/pages/my-sonic/actions/edit-ship-to-address/connected-edit-ship-to-address-form.js +1 -2
- package/dist/pages/my-sonic/pages/favorites/favorites-page.js +2 -2
- package/dist/pages/my-sonic/pages/order-details/order-details-content.js +1 -1
- package/dist/pages/my-sonic/pages/order-details/order-details-page.js +5 -5
- package/dist/pages/my-sonic/pages/order-history/order-history-page.js +2 -2
- package/dist/pages/product/product-details-page/components/product-details-panel/product-details-panel.d.ts +1 -1
- package/dist/pages/product/product-details-page/components/product-details-panel/product-details-panel.js +1 -1
- package/dist/shared/api/storefront/hooks/account/use-create-account.d.ts +2 -2
- package/dist/shared/api/storefront/hooks/account/use-create-guest-account.d.ts +1 -1
- package/dist/shared/api/storefront/hooks/authentication/use-patch-session.js +1 -1
- package/dist/shared/api/storefront/hooks/authentication/use-sign-out-mutation.d.ts +6 -2
- package/dist/shared/api/storefront/hooks/authentication/use-sign-out-mutation.js +1 -1
- package/dist/shared/api/storefront/hooks/authentication/use-sign-out.d.ts +3 -1
- package/dist/shared/api/storefront/hooks/authentication/use-sign-out.js +4 -2
- package/dist/shared/api/storefront/hooks/customer/use-patch-bill-to-address.js +1 -1
- package/dist/shared/api/storefront/hooks/customer/use-patch-ship-to-address.js +1 -1
- package/dist/shared/api/storefront/hooks/customer/use-post-ship-to-address.js +1 -1
- package/dist/shared/api/storefront/hooks/payment/use-create-adyen-session.d.ts +2 -2
- package/dist/shared/api/storefront/hooks/payment/use-fetch-adyen-config.js +1 -1
- package/dist/shared/api/storefront/services/payment-service.d.ts +1 -1
- package/dist/shared/error/basic-error-view.js +3 -10
- package/dist/shared/error/basic-error-view.module.css.js +3 -0
- package/dist/shared/error/default-error-view.d.ts +1 -1
- package/dist/shared/error/default-error-view.js +10 -28
- package/dist/shared/error/default-error-view.module.css.js +3 -0
- package/dist/shared/error/types.d.ts +3 -0
- package/dist/shared/utils/price.d.ts +4 -2
- package/dist/shared/utils/price.js +8 -5
- package/dist/styles.css +170 -2
- package/dist/tooltip/tooltip.js +1 -1
- package/package.json +2 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
function parseCurrency({ currencyCode, locale, price, }) {
|
|
1
|
+
function parseCurrency({ currencyCode, locale, price, useGrouping = true, }) {
|
|
2
2
|
const formatter = new Intl.NumberFormat(locale, {
|
|
3
3
|
currency: currencyCode,
|
|
4
4
|
currencyDisplay: 'narrowSymbol',
|
|
5
5
|
style: 'currency',
|
|
6
|
+
useGrouping,
|
|
6
7
|
});
|
|
7
8
|
const parts = formatter.formatToParts(price);
|
|
8
9
|
const namedParts = parts.reduce((result, part) => {
|
|
@@ -23,16 +24,18 @@ function parseCurrency({ currencyCode, locale, price, }) {
|
|
|
23
24
|
: 'before',
|
|
24
25
|
};
|
|
25
26
|
}
|
|
26
|
-
function formatCurrency({ currencyCode, locale, price, replaceNonBreakingSpace = false, }) {
|
|
27
|
+
function formatCurrency({ currencyCode, locale, price, replaceNonBreakingSpace = false, useGrouping = true, }) {
|
|
27
28
|
const formatter = new Intl.NumberFormat(locale, {
|
|
28
29
|
currency: currencyCode,
|
|
29
30
|
currencyDisplay: 'narrowSymbol',
|
|
30
31
|
style: 'currency',
|
|
32
|
+
useGrouping,
|
|
31
33
|
});
|
|
32
34
|
const string = formatter.format(price);
|
|
33
|
-
|
|
34
|
-
string.replaceAll('\u00A0', ' ')
|
|
35
|
-
|
|
35
|
+
const normalized = replaceNonBreakingSpace
|
|
36
|
+
? string.replaceAll(new RegExp('\u00A0', 'g'), ' ')
|
|
37
|
+
: string;
|
|
38
|
+
return normalized;
|
|
36
39
|
}
|
|
37
40
|
const countryCodeToCurrencyCode = {
|
|
38
41
|
AR: 'ARS',
|
package/dist/styles.css
CHANGED
|
@@ -1178,6 +1178,11 @@ html {
|
|
|
1178
1178
|
text-transform: none;
|
|
1179
1179
|
}
|
|
1180
1180
|
|
|
1181
|
+
.button-module-Pbwz7 .button-module-XaNWz svg {
|
|
1182
|
+
width: 18px;
|
|
1183
|
+
height: 18px;
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1181
1186
|
.button-module-GVTEW {
|
|
1182
1187
|
min-width: 52px;
|
|
1183
1188
|
min-height: 40px;
|
|
@@ -2768,6 +2773,7 @@ html {
|
|
|
2768
2773
|
.data-card-module-24uin {
|
|
2769
2774
|
position: relative;
|
|
2770
2775
|
display: grid;
|
|
2776
|
+
padding: var(--space-16);
|
|
2771
2777
|
border: 1px solid var(--color-brand-medium-gray);
|
|
2772
2778
|
border-radius: var(--border-radius-32);
|
|
2773
2779
|
grid-area: card;
|
|
@@ -2801,7 +2807,6 @@ html {
|
|
|
2801
2807
|
.data-card-module-24uin .data-card-module-ZefqY {
|
|
2802
2808
|
display: grid;
|
|
2803
2809
|
align-items: start;
|
|
2804
|
-
padding: var(--space-16);
|
|
2805
2810
|
grid-template-rows: 1fr min-content;
|
|
2806
2811
|
}
|
|
2807
2812
|
|
|
@@ -4981,6 +4986,74 @@ button.swiper-pagination-bullet {
|
|
|
4981
4986
|
margin-inline: var(--space-4);
|
|
4982
4987
|
}
|
|
4983
4988
|
|
|
4989
|
+
.details-module-yz0rE {
|
|
4990
|
+
--duration: var(--transition-duration-short);
|
|
4991
|
+
--arrow-size: 12px;
|
|
4992
|
+
--arrow-space: 12px;
|
|
4993
|
+
|
|
4994
|
+
display: grid;
|
|
4995
|
+
gap: 0 var(--space-4);
|
|
4996
|
+
grid-template-columns: var(--arrow-space) minmax(0, 1fr);
|
|
4997
|
+
interpolate-size: allow-keywords;
|
|
4998
|
+
}
|
|
4999
|
+
|
|
5000
|
+
.details-module-yz0rE .details-module-mSgNu {
|
|
5001
|
+
display: grid;
|
|
5002
|
+
flex-direction: row;
|
|
5003
|
+
color: var(--color-brand-red);
|
|
5004
|
+
cursor: pointer;
|
|
5005
|
+
grid-column: 1 / -1;
|
|
5006
|
+
grid-template-areas: 'marker label';
|
|
5007
|
+
grid-template-columns: subgrid;
|
|
5008
|
+
-webkit-user-select: none;
|
|
5009
|
+
-moz-user-select: none;
|
|
5010
|
+
user-select: none;
|
|
5011
|
+
}
|
|
5012
|
+
|
|
5013
|
+
.details-module-yz0rE .details-module-mSgNu::marker {
|
|
5014
|
+
display: none;
|
|
5015
|
+
}
|
|
5016
|
+
|
|
5017
|
+
.details-module-yz0rE .details-module-mSgNu .details-module-2O7TR {
|
|
5018
|
+
block-size: var(--arrow-size);
|
|
5019
|
+
grid-area: marker;
|
|
5020
|
+
inline-size: var(--arrow-size);
|
|
5021
|
+
place-self: center;
|
|
5022
|
+
transition: all var(--duration) ease-in-out;
|
|
5023
|
+
}
|
|
5024
|
+
|
|
5025
|
+
.details-module-yz0rE .details-module-mSgNu:hover {
|
|
5026
|
+
color: var(--color-brand-dark-red);
|
|
5027
|
+
}
|
|
5028
|
+
|
|
5029
|
+
.details-module-yz0rE .details-module-mSgNu:focus-visible {
|
|
5030
|
+
outline: var(--focus-outline);
|
|
5031
|
+
}
|
|
5032
|
+
|
|
5033
|
+
.details-module-yz0rE::details-content {
|
|
5034
|
+
display: grid;
|
|
5035
|
+
overflow: hidden;
|
|
5036
|
+
block-size: 0;
|
|
5037
|
+
grid-column: 1 / -1;
|
|
5038
|
+
grid-template-areas: '. content';
|
|
5039
|
+
grid-template-columns: subgrid;
|
|
5040
|
+
transition: all var(--duration) ease-in-out;
|
|
5041
|
+
transition-behavior: allow-discrete;
|
|
5042
|
+
}
|
|
5043
|
+
|
|
5044
|
+
.details-module-yz0rE .details-module-EJitZ {
|
|
5045
|
+
grid-area: content;
|
|
5046
|
+
padding-block-start: var(--space-8);
|
|
5047
|
+
}
|
|
5048
|
+
|
|
5049
|
+
.details-module-yz0rE:open .details-module-mSgNu .details-module-2O7TR {
|
|
5050
|
+
rotate: 90deg;
|
|
5051
|
+
}
|
|
5052
|
+
|
|
5053
|
+
.details-module-yz0rE:open::details-content {
|
|
5054
|
+
block-size: auto;
|
|
5055
|
+
}
|
|
5056
|
+
|
|
4984
5057
|
.info-display-module-jsSU0 .info-display-module-aGbJV {
|
|
4985
5058
|
display: block;
|
|
4986
5059
|
margin-bottom: var(--space-8);
|
|
@@ -7852,6 +7925,41 @@ button.swiper-pagination-bullet {
|
|
|
7852
7925
|
padding-block-end: 0;
|
|
7853
7926
|
}
|
|
7854
7927
|
|
|
7928
|
+
.default-error-view-module-IXKuf > *:first-child {
|
|
7929
|
+
margin-block-start: 0;
|
|
7930
|
+
}
|
|
7931
|
+
.default-error-view-module-IXKuf > *:last-child {
|
|
7932
|
+
margin-block-end: 0;
|
|
7933
|
+
}
|
|
7934
|
+
.default-error-view-module-IXKuf .default-error-view-module-ZfydO {
|
|
7935
|
+
margin-block-end: var(--space-16);
|
|
7936
|
+
}
|
|
7937
|
+
.default-error-view-module-IXKuf p {
|
|
7938
|
+
margin-block: var(--space-16);
|
|
7939
|
+
}
|
|
7940
|
+
.default-error-view-module-IXKuf .default-error-view-module-pGbzW {
|
|
7941
|
+
margin-block: var(--space-16);
|
|
7942
|
+
}
|
|
7943
|
+
.default-error-view-module-IXKuf .default-error-view-module-LRchn {
|
|
7944
|
+
display: block;
|
|
7945
|
+
font-weight: bold;
|
|
7946
|
+
margin-block-end: var(--space-8);
|
|
7947
|
+
}
|
|
7948
|
+
.default-error-view-module-IXKuf .default-error-view-module-Tz1Vb .default-error-view-module-go6yg {
|
|
7949
|
+
font-size: var(--font-size-12);
|
|
7950
|
+
font-weight: bold;
|
|
7951
|
+
margin-block-end: 0;
|
|
7952
|
+
}
|
|
7953
|
+
.default-error-view-module-IXKuf .default-error-view-module-Tz1Vb .default-error-view-module--B3DB {
|
|
7954
|
+
overflow: auto;
|
|
7955
|
+
margin: 0;
|
|
7956
|
+
font: inherit;
|
|
7957
|
+
font-size: var(--font-size-12);
|
|
7958
|
+
}
|
|
7959
|
+
.default-error-view-module-IXKuf .default-error-view-module-Tz1Vb .default-error-view-module--B3DB:focus-visible {
|
|
7960
|
+
outline: var(--focus-outline-inset);
|
|
7961
|
+
}
|
|
7962
|
+
|
|
7855
7963
|
.no-results-module-HGe-Y {
|
|
7856
7964
|
margin-top: var(--space-24);
|
|
7857
7965
|
text-align: center;
|
|
@@ -8896,11 +9004,26 @@ button.swiper-pagination-bullet {
|
|
|
8896
9004
|
}
|
|
8897
9005
|
|
|
8898
9006
|
.order-details-content-module-aU3VQ .order-details-content-module--1w7s dl {
|
|
8899
|
-
display:
|
|
9007
|
+
display: grid;
|
|
9008
|
+
align-items: baseline;
|
|
9009
|
+
gap: var(--space-8) var(--space-16);
|
|
9010
|
+
grid-template-columns:
|
|
9011
|
+
[title-start] fit-content(25ch)
|
|
9012
|
+
[title-end data-start] 1fr [data-end];
|
|
8900
9013
|
}
|
|
8901
9014
|
|
|
8902
9015
|
.order-details-content-module-aU3VQ .order-details-content-module--1w7s dl dt {
|
|
8903
9016
|
font-weight: var(--font-weight-bold);
|
|
9017
|
+
grid-column: title;
|
|
9018
|
+
}
|
|
9019
|
+
|
|
9020
|
+
.order-details-content-module-aU3VQ .order-details-content-module--1w7s dl dt::after {
|
|
9021
|
+
content: ':';
|
|
9022
|
+
}
|
|
9023
|
+
|
|
9024
|
+
.order-details-content-module-aU3VQ .order-details-content-module--1w7s dl dd {
|
|
9025
|
+
margin: 0;
|
|
9026
|
+
grid-column: data;
|
|
8904
9027
|
}
|
|
8905
9028
|
|
|
8906
9029
|
.order-details-content-module-aU3VQ .order-details-content-module-BO26h h3 {
|
|
@@ -9478,6 +9601,51 @@ button.swiper-pagination-bullet {
|
|
|
9478
9601
|
}
|
|
9479
9602
|
}
|
|
9480
9603
|
|
|
9604
|
+
.basic-error-view-module-iKnnd {
|
|
9605
|
+
padding: 0;
|
|
9606
|
+
margin: 0;
|
|
9607
|
+
block-size: 100%;
|
|
9608
|
+
}
|
|
9609
|
+
|
|
9610
|
+
.basic-error-view-module-iKnnd body {
|
|
9611
|
+
position: relative;
|
|
9612
|
+
display: grid;
|
|
9613
|
+
grid-template-columns: 100%;
|
|
9614
|
+
min-block-size: 100%;
|
|
9615
|
+
}
|
|
9616
|
+
|
|
9617
|
+
.basic-error-view-module-iKnnd main {
|
|
9618
|
+
inline-size: -moz-fit-content;
|
|
9619
|
+
inline-size: fit-content;
|
|
9620
|
+
max-inline-size: min(calc(100% - 32px), 60ch);
|
|
9621
|
+
place-self: center;
|
|
9622
|
+
}
|
|
9623
|
+
|
|
9624
|
+
.basic-error-view-module-iKnnd main > *:last-child {
|
|
9625
|
+
margin-block-end: 0;
|
|
9626
|
+
}
|
|
9627
|
+
|
|
9628
|
+
.basic-error-view-module-iKnnd .basic-error-view-module-vyq6y {
|
|
9629
|
+
margin-block-end: var(--space-16);
|
|
9630
|
+
}
|
|
9631
|
+
|
|
9632
|
+
.basic-error-view-module-iKnnd p {
|
|
9633
|
+
margin-block: var(--space-16);
|
|
9634
|
+
}
|
|
9635
|
+
|
|
9636
|
+
.basic-error-view-module-iKnnd a {
|
|
9637
|
+
color: var(--color-brand-red);
|
|
9638
|
+
text-decoration: underline;
|
|
9639
|
+
}
|
|
9640
|
+
|
|
9641
|
+
.basic-error-view-module-iKnnd a:hover {
|
|
9642
|
+
color: var(--color-brand-dark-red);
|
|
9643
|
+
}
|
|
9644
|
+
|
|
9645
|
+
.basic-error-view-module-iKnnd a:focus-visible {
|
|
9646
|
+
outline: var(--focus-outline);
|
|
9647
|
+
}
|
|
9648
|
+
|
|
9481
9649
|
.sidebar-provider-module-rjeCL {
|
|
9482
9650
|
--transition-duration: 0;
|
|
9483
9651
|
}
|
package/dist/tooltip/tooltip.js
CHANGED
|
@@ -3,8 +3,8 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
3
3
|
import { useRef, useMemo, cloneElement } from 'react';
|
|
4
4
|
import { usePress } from 'react-aria';
|
|
5
5
|
import { DialogTrigger, Popover, OverlayArrow, Dialog } from 'react-aria-components';
|
|
6
|
-
import { IconButton } from '../buttons/icon-button/icon-button.js';
|
|
7
6
|
import clsx from 'clsx';
|
|
7
|
+
import { IconButton } from '../buttons/icon-button/icon-button.js';
|
|
8
8
|
import { StrokeInformationIcon } from '../icons/stroke/stroke-information-icon.js';
|
|
9
9
|
import { useDisclosure } from '../shared/hooks/use-disclosure.js';
|
|
10
10
|
import styles from './tooltip.module.css.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sonic-equipment/ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "241.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
"eslint-plugin-react": "7.37.5",
|
|
88
88
|
"eslint-plugin-react-hooks": "5.2.0",
|
|
89
89
|
"eslint-plugin-react-server-components": "^1.2.0",
|
|
90
|
+
"eslint-plugin-require-relative-imports": "1.0.0",
|
|
90
91
|
"eslint-plugin-simple-import-sort": "12.1.1",
|
|
91
92
|
"eslint-plugin-sort-destructure-keys": "2.0.0",
|
|
92
93
|
"eslint-plugin-sort-keys-fix": "1.1.2",
|