@wix/editor-react-components 1.2579.0 → 1.2580.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.
|
@@ -40,7 +40,7 @@ const LinkBar = (props) => {
|
|
|
40
40
|
const translations = {
|
|
41
41
|
ariaLabel: translate(ARIA_LABEL_NAMESPACE)(ARIA_LABEL_KEY) || ARIA_LABEL_DEFAULT
|
|
42
42
|
};
|
|
43
|
-
const { id, className, onMouseIn, onMouseOut, direction, items, wix } = props;
|
|
43
|
+
const { id, className, onMouseIn, onMouseOut, direction, items, wix, a11y } = props;
|
|
44
44
|
const presetsWrapperProps = (wix == null ? void 0 : wix.presetsWrapperProps) || {};
|
|
45
45
|
return /* @__PURE__ */ jsx("div", { className: presetWrapperStyles.presetWrapper, ...presetsWrapperProps, children: /* @__PURE__ */ jsx(
|
|
46
46
|
"div",
|
|
@@ -56,8 +56,8 @@ const LinkBar = (props) => {
|
|
|
56
56
|
),
|
|
57
57
|
onMouseEnter: onMouseIn,
|
|
58
58
|
onMouseLeave: onMouseOut,
|
|
59
|
-
children: /* @__PURE__ */ jsx("nav", { "aria-label": translations.ariaLabel, children: /* @__PURE__ */ jsx("ul", { className: styles.container, children: (items ?? []).map((item, index) => {
|
|
60
|
-
const { icon, link: link2, a11y } = item;
|
|
59
|
+
children: /* @__PURE__ */ jsx("nav", { "aria-label": (a11y == null ? void 0 : a11y.ariaLabel) || translations.ariaLabel, children: /* @__PURE__ */ jsx("ul", { className: styles.container, children: (items ?? []).map((item, index) => {
|
|
60
|
+
const { icon, link: link2, a11y: itemA11y } = item;
|
|
61
61
|
const svgContent = (icon == null ? void 0 : icon.svgContent) || defaultSvgContent;
|
|
62
62
|
const svgButton = /* @__PURE__ */ jsx(LinkButtonIcon, { svg: svgContent });
|
|
63
63
|
return /* @__PURE__ */ jsx("li", { className: styles.listItem, children: link2 ? /* @__PURE__ */ jsx(
|
|
@@ -66,7 +66,7 @@ const LinkBar = (props) => {
|
|
|
66
66
|
className: styles.link,
|
|
67
67
|
...link2,
|
|
68
68
|
href: link2.href,
|
|
69
|
-
"aria-label": (
|
|
69
|
+
"aria-label": (itemA11y == null ? void 0 : itemA11y.ariaLabel) || "Social Bar item",
|
|
70
70
|
children: svgButton
|
|
71
71
|
}
|
|
72
72
|
) : /* @__PURE__ */ jsx(
|
|
@@ -140,6 +140,12 @@ const manifest = {
|
|
|
140
140
|
})
|
|
141
141
|
},
|
|
142
142
|
data: {
|
|
143
|
+
a11y: {
|
|
144
|
+
dataType: DATA.DATA_TYPE.a11y,
|
|
145
|
+
[DATA.DATA_TYPE.a11y]: {
|
|
146
|
+
attributes: [DATA.A11Y_ATTRIBUTES.ariaLabel]
|
|
147
|
+
}
|
|
148
|
+
},
|
|
143
149
|
items: {
|
|
144
150
|
dataType: DATA.DATA_TYPE.arrayItems,
|
|
145
151
|
displayName: DisplayNames.root.data.items,
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { DefaultCompPlatformProps } from '../../../types/vendored/editor-elements-types-thunderboltExternal';
|
|
2
2
|
import { LinkProps } from '../../../common/Link/Link.types';
|
|
3
|
-
import { VectorArt, Direction } from '@wix/editor-react-types';
|
|
3
|
+
import { A11y, VectorArt, Direction } from '@wix/editor-react-types';
|
|
4
4
|
import { SdkFunctionMouseHoverProps } from '../../../utils/functions/sdkFunctionCallbackProps';
|
|
5
5
|
type ItemProps = {
|
|
6
6
|
link?: Pick<LinkProps, 'href' | 'target' | 'rel' | 'type'>;
|
|
7
7
|
icon?: VectorArt;
|
|
8
|
-
a11y?:
|
|
9
|
-
ariaLabel: string;
|
|
10
|
-
};
|
|
8
|
+
a11y?: A11y;
|
|
11
9
|
};
|
|
12
10
|
export type LinkBarProps = DefaultCompPlatformProps & Partial<SdkFunctionMouseHoverProps> & {
|
|
13
11
|
/** Array of social-link items. Each entry is rendered as an `<li>`. Manifest enforces `maxSize: 100`. */
|
|
@@ -16,6 +14,8 @@ export type LinkBarProps = DefaultCompPlatformProps & Partial<SdkFunctionMouseHo
|
|
|
16
14
|
trackClicksAnalytics?: boolean;
|
|
17
15
|
/** Sets the `dir` attribute on the root. Defaults to the language direction reported by the environment service. */
|
|
18
16
|
direction?: Direction;
|
|
17
|
+
/** Accessible name for the LinkBar `<nav>` landmark. */
|
|
18
|
+
a11y?: A11y;
|
|
19
19
|
wix?: {
|
|
20
20
|
presetsWrapperProps?: Record<string, any>;
|
|
21
21
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/editor-react-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2580.0",
|
|
4
4
|
"description": "React components for the Wix Editor",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -199,5 +199,5 @@
|
|
|
199
199
|
"registry": "https://registry.npmjs.org/",
|
|
200
200
|
"access": "public"
|
|
201
201
|
},
|
|
202
|
-
"falconPackageHash": "
|
|
202
|
+
"falconPackageHash": "8f2fb1ea98d20c945266a6013b94c3ea8ff38a6c91db9417d2ea89e2"
|
|
203
203
|
}
|