@wix/editor-react-components 1.2317.0 → 1.2318.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.
|
@@ -2057,6 +2057,7 @@ const HamburgerMenu = ({
|
|
|
2057
2057
|
}
|
|
2058
2058
|
}
|
|
2059
2059
|
}) => {
|
|
2060
|
+
const { translations } = useMenuContext();
|
|
2060
2061
|
const siteScrollBlocker = useService(SiteScrollBlockerDefinition);
|
|
2061
2062
|
const [isOpen, setIsOpen] = useState(false);
|
|
2062
2063
|
useEffect(() => {
|
|
@@ -2113,6 +2114,10 @@ const HamburgerMenu = ({
|
|
|
2113
2114
|
Button,
|
|
2114
2115
|
{
|
|
2115
2116
|
...hamburgerOpenButtonProps,
|
|
2117
|
+
a11y: {
|
|
2118
|
+
ariaLabel: translations.hamburgerOpenButtonAriaLabel,
|
|
2119
|
+
...hamburgerOpenButtonProps == null ? void 0 : hamburgerOpenButtonProps.a11y
|
|
2120
|
+
},
|
|
2116
2121
|
className: clsx(
|
|
2117
2122
|
selectors.hamburgerMenuOpenButton,
|
|
2118
2123
|
classes.openButton
|
|
@@ -2149,6 +2154,10 @@ const HamburgerMenu = ({
|
|
|
2149
2154
|
Button,
|
|
2150
2155
|
{
|
|
2151
2156
|
...hamburgerCloseButtonProps,
|
|
2157
|
+
a11y: {
|
|
2158
|
+
ariaLabel: translations.hamburgerCloseButtonAriaLabel,
|
|
2159
|
+
...hamburgerCloseButtonProps == null ? void 0 : hamburgerCloseButtonProps.a11y
|
|
2160
|
+
},
|
|
2152
2161
|
className: clsx(
|
|
2153
2162
|
selectors.hamburgerMenuCloseButton,
|
|
2154
2163
|
classes.closeButton
|
|
@@ -2226,7 +2235,13 @@ const Menu = (props) => {
|
|
|
2226
2235
|
menuNavAriaLabel: translate(ARIA_LABEL_NAMESPACE)(translationsKeys.menuNavAriaLabel) || defaultTranslations.menuNavAriaLabel,
|
|
2227
2236
|
dropdownButtonAriaLabel: translate(ARIA_LABEL_NAMESPACE)(
|
|
2228
2237
|
translationsKeys.dropdownButtonAriaLabel
|
|
2229
|
-
) || defaultTranslations.dropdownButtonAriaLabel
|
|
2238
|
+
) || defaultTranslations.dropdownButtonAriaLabel,
|
|
2239
|
+
hamburgerOpenButtonAriaLabel: translate(ARIA_LABEL_NAMESPACE)(
|
|
2240
|
+
translationsKeys.hamburgerOpenButtonAriaLabel
|
|
2241
|
+
) || defaultTranslations.hamburgerOpenButtonAriaLabel,
|
|
2242
|
+
hamburgerCloseButtonAriaLabel: translate(ARIA_LABEL_NAMESPACE)(
|
|
2243
|
+
translationsKeys.hamburgerCloseButtonAriaLabel
|
|
2244
|
+
) || defaultTranslations.hamburgerCloseButtonAriaLabel
|
|
2230
2245
|
};
|
|
2231
2246
|
const presetsWrapperProps = (wix == null ? void 0 : wix.presetsWrapperProps) || {};
|
|
2232
2247
|
return /* @__PURE__ */ jsx("div", { className: presetWrapperStyles.presetWrapper, ...presetsWrapperProps, children: /* @__PURE__ */ jsx(
|
|
@@ -301,11 +301,15 @@ export declare const ARIA_LABEL_NAMESPACE = "ariaLabels";
|
|
|
301
301
|
export declare const translationsKeys: {
|
|
302
302
|
menuNavAriaLabel: string;
|
|
303
303
|
dropdownButtonAriaLabel: string;
|
|
304
|
+
hamburgerOpenButtonAriaLabel: string;
|
|
305
|
+
hamburgerCloseButtonAriaLabel: string;
|
|
304
306
|
};
|
|
305
307
|
export type Translations = {
|
|
306
308
|
translations: {
|
|
307
309
|
dropdownButtonAriaLabel?: string;
|
|
308
310
|
menuNavAriaLabel?: string;
|
|
311
|
+
hamburgerOpenButtonAriaLabel?: string;
|
|
312
|
+
hamburgerCloseButtonAriaLabel?: string;
|
|
309
313
|
};
|
|
310
314
|
};
|
|
311
315
|
export declare const defaultTranslations: Translations['translations'];
|
|
@@ -9,6 +9,8 @@ export type MenuContextValue = {
|
|
|
9
9
|
translations: {
|
|
10
10
|
dropdownButtonAriaLabel?: string;
|
|
11
11
|
menuNavAriaLabel?: string;
|
|
12
|
+
hamburgerOpenButtonAriaLabel?: string;
|
|
13
|
+
hamburgerCloseButtonAriaLabel?: string;
|
|
12
14
|
};
|
|
13
15
|
customClassNames?: Array<string>;
|
|
14
16
|
navAriaLabel: string;
|
|
@@ -363,11 +363,15 @@ const DropdownAnchorPositions = {
|
|
|
363
363
|
const ARIA_LABEL_NAMESPACE = "ariaLabels";
|
|
364
364
|
const translationsKeys = {
|
|
365
365
|
menuNavAriaLabel: "dropDownMenu_AriaLabel_TopLevel_SiteNavigation",
|
|
366
|
-
dropdownButtonAriaLabel: "menu_dropdown_chevron_button_aria_label"
|
|
366
|
+
dropdownButtonAriaLabel: "menu_dropdown_chevron_button_aria_label",
|
|
367
|
+
hamburgerOpenButtonAriaLabel: "Mobile_Hamburger_Menu_AriaLabel_Open",
|
|
368
|
+
hamburgerCloseButtonAriaLabel: "Mobile_Hamburger_Menu_AriaLabel_Close"
|
|
367
369
|
};
|
|
368
370
|
const defaultTranslations = {
|
|
369
371
|
menuNavAriaLabel: "Site",
|
|
370
|
-
dropdownButtonAriaLabel: "More pages"
|
|
372
|
+
dropdownButtonAriaLabel: "More pages",
|
|
373
|
+
hamburgerOpenButtonAriaLabel: "Open navigation menu",
|
|
374
|
+
hamburgerCloseButtonAriaLabel: "Close navigation menu"
|
|
371
375
|
};
|
|
372
376
|
const MenuParts = {
|
|
373
377
|
Navbar: "navbar",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/editor-react-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2318.0",
|
|
4
4
|
"description": "React components for the Wix Editor",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"format:check": "yarn run -T format:package:check"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"@wix/editor-react-types": "^1.0.
|
|
69
|
+
"@wix/editor-react-types": "^1.0.65",
|
|
70
70
|
"react": "^18.2.0",
|
|
71
71
|
"react-dom": "^18.2.0"
|
|
72
72
|
},
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"@wix/ambassador-devcenter-v1-component-type-data": "^1.0.436",
|
|
79
79
|
"@wix/sdk": "^1.21.13",
|
|
80
80
|
"@wix/services-manager-react": "^0.1.27",
|
|
81
|
-
"@wix/site-ui": "1.
|
|
81
|
+
"@wix/site-ui": "1.152.0",
|
|
82
82
|
"@wix/video": "^1.85.0",
|
|
83
83
|
"@wix/viewer-service-consent-policy": "^1.0.100",
|
|
84
84
|
"@wix/web-bi-logger": "^2.1.26",
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"@wix/editor": "^1.586.0",
|
|
120
120
|
"@wix/editor-elements-scripts": "^1.0.0",
|
|
121
121
|
"@wix/editor-elements-test-utils": "^1.0.0",
|
|
122
|
-
"@wix/editor-react-types": "^1.0.
|
|
122
|
+
"@wix/editor-react-types": "^1.0.65",
|
|
123
123
|
"@wix/essentials": "^0.1.28",
|
|
124
124
|
"@wix/fed-cli-sled": "1.0.25",
|
|
125
125
|
"@wix/image": "^1.437.0",
|
|
@@ -193,5 +193,5 @@
|
|
|
193
193
|
"registry": "https://registry.npmjs.org/",
|
|
194
194
|
"access": "public"
|
|
195
195
|
},
|
|
196
|
-
"falconPackageHash": "
|
|
196
|
+
"falconPackageHash": "01ea2f49bb1dd841b9c2badbfbaef3ed374260b29adb42ff13c6798f"
|
|
197
197
|
}
|