@magento/venia-ui 10.0.0-rc.1 → 10.1.0-alpha.1
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/i18n/en_US.json +3 -1
- package/lib/components/CartPage/PriceSummary/discountSummary.js +27 -23
- package/lib/components/CreateAccount/createAccount.js +2 -0
- package/lib/components/FilterModal/FilterList/filterDefault.js +8 -1
- package/lib/components/ProductOptions/__tests__/__snapshots__/tile.spec.js.snap +5 -0
- package/lib/components/ProductOptions/__tests__/__snapshots__/tileList.spec.js.snap +1 -0
- package/lib/components/ProductOptions/tile.js +20 -1
- package/lib/components/SignIn/signIn.js +2 -0
- package/package.json +2 -2
package/i18n/en_US.json
CHANGED
|
@@ -498,5 +498,7 @@
|
|
|
498
498
|
"global.cityRequired":"City Required",
|
|
499
499
|
"global.stateRequired":"State Required",
|
|
500
500
|
"Form.postalCode":"ZIP / Postal Code Required",
|
|
501
|
-
"Form.phonenumber":"Phone Number Required"
|
|
501
|
+
"Form.phonenumber":"Phone Number Required",
|
|
502
|
+
"ProductOptions.productSize":"Fashion size {label}",
|
|
503
|
+
"productOptions.selectedSize":"Fashion size {label} button selected"
|
|
502
504
|
}
|
|
@@ -47,31 +47,35 @@ const DiscountSummary = props => {
|
|
|
47
47
|
>
|
|
48
48
|
<hr className={classes.individualDiscountSeparator} />
|
|
49
49
|
{discountData.map(discount => {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
data-cy="DiscountSummary-IndividualDiscount-Label"
|
|
50
|
+
if (discount.label != 'Gift Cards') {
|
|
51
|
+
return (
|
|
52
|
+
<li
|
|
53
|
+
className={
|
|
54
|
+
classes.individualDiscountsListLineItem
|
|
55
|
+
}
|
|
56
|
+
key={discount.label}
|
|
58
57
|
>
|
|
59
|
-
<span
|
|
60
|
-
{
|
|
58
|
+
<span
|
|
59
|
+
className={classes.lineItemLabel}
|
|
60
|
+
data-cy="DiscountSummary-IndividualDiscount-Label"
|
|
61
|
+
>
|
|
62
|
+
<span data-cy="DiscountSummary-IndividualDiscount-DiscountLabel">
|
|
63
|
+
{discount.label}
|
|
64
|
+
</span>
|
|
61
65
|
</span>
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
</
|
|
73
|
-
|
|
74
|
-
|
|
66
|
+
<span
|
|
67
|
+
data-cy="DiscountSummary-IndividualDiscount-DiscountValue"
|
|
68
|
+
className={classes.price}
|
|
69
|
+
>
|
|
70
|
+
{MINUS_SYMBOL}
|
|
71
|
+
<Price
|
|
72
|
+
value={discount.amount.value}
|
|
73
|
+
currencyCode={discount.amount.currency}
|
|
74
|
+
/>
|
|
75
|
+
</span>
|
|
76
|
+
</li>
|
|
77
|
+
);
|
|
78
|
+
}
|
|
75
79
|
})}
|
|
76
80
|
<hr className={classes.individualDiscountSeparator} />
|
|
77
81
|
</ul>
|
|
@@ -32,6 +32,7 @@ const CreateAccount = props => {
|
|
|
32
32
|
handleCancel,
|
|
33
33
|
handleSubmit,
|
|
34
34
|
handleEnterKeyPress,
|
|
35
|
+
handleCancelKeyPress,
|
|
35
36
|
isDisabled,
|
|
36
37
|
initialValues,
|
|
37
38
|
recaptchaWidgetProps
|
|
@@ -47,6 +48,7 @@ const CreateAccount = props => {
|
|
|
47
48
|
type="button"
|
|
48
49
|
priority="low"
|
|
49
50
|
onClick={handleCancel}
|
|
51
|
+
onKeyDown={handleCancelKeyPress}
|
|
50
52
|
>
|
|
51
53
|
<FormattedMessage
|
|
52
54
|
id={'createAccount.cancelText'}
|
|
@@ -7,7 +7,13 @@ import { useStyle } from '../../../classify';
|
|
|
7
7
|
import defaultClasses from './filterDefault.module.css';
|
|
8
8
|
|
|
9
9
|
const FilterDefault = props => {
|
|
10
|
-
const {
|
|
10
|
+
const {
|
|
11
|
+
classes: propsClasses,
|
|
12
|
+
isSelected,
|
|
13
|
+
item,
|
|
14
|
+
onMouseDown,
|
|
15
|
+
...restProps
|
|
16
|
+
} = props;
|
|
11
17
|
|
|
12
18
|
const { label, value_index } = item || {};
|
|
13
19
|
const classes = useStyle(defaultClasses, propsClasses);
|
|
@@ -41,6 +47,7 @@ const FilterDefault = props => {
|
|
|
41
47
|
label={label}
|
|
42
48
|
ariaLabel={ariaLabel}
|
|
43
49
|
data-cy="FilterDefault-checkbox"
|
|
50
|
+
onClick={onMouseDown}
|
|
44
51
|
{...restProps}
|
|
45
52
|
/>
|
|
46
53
|
);
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`appends "_focused" to className if hasFocus is true 1`] = `
|
|
4
4
|
<button
|
|
5
|
+
aria-label="Fashion size red"
|
|
5
6
|
className="root_focused"
|
|
6
7
|
onClick={[Function]}
|
|
7
8
|
title="red"
|
|
@@ -15,6 +16,7 @@ exports[`appends "_focused" to className if hasFocus is true 1`] = `
|
|
|
15
16
|
|
|
16
17
|
exports[`appends "_outOfStock" to className if isEverythingOutOfStock is true 1`] = `
|
|
17
18
|
<button
|
|
19
|
+
aria-label="Fashion size red"
|
|
18
20
|
className="root_outOfStock"
|
|
19
21
|
disabled={true}
|
|
20
22
|
onClick={[Function]}
|
|
@@ -29,6 +31,7 @@ exports[`appends "_outOfStock" to className if isEverythingOutOfStock is true 1`
|
|
|
29
31
|
|
|
30
32
|
exports[`appends "_outOfStock" to className if isOptionOutOfStock is true 1`] = `
|
|
31
33
|
<button
|
|
34
|
+
aria-label="Fashion size red"
|
|
32
35
|
className="root_outOfStock"
|
|
33
36
|
disabled={true}
|
|
34
37
|
onClick={[Function]}
|
|
@@ -43,6 +46,7 @@ exports[`appends "_outOfStock" to className if isOptionOutOfStock is true 1`] =
|
|
|
43
46
|
|
|
44
47
|
exports[`appends "_selected" to className if isSelected is true 1`] = `
|
|
45
48
|
<button
|
|
49
|
+
aria-label="Fashion size red button selected"
|
|
46
50
|
className="root_selected"
|
|
47
51
|
onClick={[Function]}
|
|
48
52
|
title="red"
|
|
@@ -56,6 +60,7 @@ exports[`appends "_selected" to className if isSelected is true 1`] = `
|
|
|
56
60
|
|
|
57
61
|
exports[`renders a Tile correctly 1`] = `
|
|
58
62
|
<button
|
|
63
|
+
aria-label="Fashion size red"
|
|
59
64
|
className="root"
|
|
60
65
|
onClick={[Function]}
|
|
61
66
|
title="red"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { bool, func, number, oneOfType, shape, string } from 'prop-types';
|
|
3
|
-
|
|
3
|
+
import { useIntl } from 'react-intl';
|
|
4
4
|
import { useStyle } from '../../classify';
|
|
5
5
|
import defaultClasses from './tile.module.css';
|
|
6
6
|
import { useTile } from '@magento/peregrine/lib/talons/ProductOptions/useTile';
|
|
@@ -43,6 +43,24 @@ const Tile = props => {
|
|
|
43
43
|
isEverythingOutOfStock
|
|
44
44
|
)
|
|
45
45
|
];
|
|
46
|
+
const { formatMessage } = useIntl();
|
|
47
|
+
const ariaLabelView = formatMessage(
|
|
48
|
+
{
|
|
49
|
+
id: 'ProductOptions.productSize',
|
|
50
|
+
defaultMessage: 'Fashion size {label}'
|
|
51
|
+
},
|
|
52
|
+
{ label: label }
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
const ariaLabelSelected = formatMessage(
|
|
56
|
+
{
|
|
57
|
+
id: 'productOptions.selectedSize',
|
|
58
|
+
defaultMessage: 'Fashion size {label} button Selected'
|
|
59
|
+
},
|
|
60
|
+
{ label: label }
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
const result = isSelected ? ariaLabelSelected : ariaLabelView;
|
|
46
64
|
|
|
47
65
|
return (
|
|
48
66
|
<button
|
|
@@ -51,6 +69,7 @@ const Tile = props => {
|
|
|
51
69
|
title={label}
|
|
52
70
|
type="button"
|
|
53
71
|
data-cy="Tile-button"
|
|
72
|
+
aria-label={result}
|
|
54
73
|
disabled={isEverythingOutOfStock || isOptionOutOfStock}
|
|
55
74
|
>
|
|
56
75
|
<span>{label}</span>
|
|
@@ -37,6 +37,7 @@ const SignIn = props => {
|
|
|
37
37
|
errors,
|
|
38
38
|
handleCreateAccount,
|
|
39
39
|
handleEnterKeyPress,
|
|
40
|
+
signinHandleEnterKeyPress,
|
|
40
41
|
handleForgotPassword,
|
|
41
42
|
handleSubmit,
|
|
42
43
|
isBusy,
|
|
@@ -119,6 +120,7 @@ const SignIn = props => {
|
|
|
119
120
|
<Button
|
|
120
121
|
priority="high"
|
|
121
122
|
type="submit"
|
|
123
|
+
onKeyDown={signinHandleEnterKeyPress}
|
|
122
124
|
data-cy="SignInButton-root_highPriority"
|
|
123
125
|
disabled={isBusy}
|
|
124
126
|
>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@magento/venia-ui",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.1.0-alpha.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"peerDependencies": {
|
|
81
81
|
"@apollo/client": "~3.5.0",
|
|
82
82
|
"@magento/babel-preset-peregrine": "~1.2.2",
|
|
83
|
-
"@magento/peregrine": "13.0.
|
|
83
|
+
"@magento/peregrine": "13.0.1-alpha.1",
|
|
84
84
|
"@magento/pwa-buildpack": "~11.4.1",
|
|
85
85
|
"apollo-cache-persist": "~0.1.1",
|
|
86
86
|
"braintree-web-drop-in": "~1.33.3",
|