@wix/editor-react-components 1.2834.0 → 1.2836.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.
|
@@ -1,21 +1,10 @@
|
|
|
1
|
+
import { A11y } from '@wix/editor-react-types';
|
|
1
2
|
import { DefaultCompPlatformProps } from '../../../types/vendored/editor-elements-types-thunderbolt';
|
|
2
3
|
import { ScreenReaderSDKProps, AriaAttributesSDKProps, LangSDKProps } from '../../../common/sdk/props-factories/accessibilitySDKFactories/types';
|
|
3
4
|
import { IElementPropsSDKActions } from '../../../common/sdk/props-factories/elementPropsSDKFactory';
|
|
4
5
|
import { IClickPropsSDKActions } from '../../../common/sdk/props-factories/clickPropsSDKFactory';
|
|
5
6
|
import { default as React } from 'react';
|
|
6
|
-
type
|
|
7
|
-
type A11yRole = 'region' | 'group' | 'none' | 'status' | 'alert' | 'nav';
|
|
8
|
-
type AriaLive = 'polite' | 'assertive';
|
|
9
|
-
type AriaCurrent = 'step' | 'page' | 'true' | 'false';
|
|
10
|
-
type StyledTextA11yProps = {
|
|
11
|
-
'aria-label'?: string;
|
|
12
|
-
'aria-live'?: AriaLive;
|
|
13
|
-
'aria-level'?: number;
|
|
14
|
-
role?: A11yRole;
|
|
15
|
-
'aria-atomic'?: BooleanString;
|
|
16
|
-
'aria-hidden'?: BooleanString;
|
|
17
|
-
'aria-current'?: AriaCurrent;
|
|
18
|
-
};
|
|
7
|
+
type StyledTextA11yProps = Pick<A11y, 'lang' | 'ariaLabel' | 'ariaLevel' | 'ariaHidden' | 'role'>;
|
|
19
8
|
type WRichTextSkin = 'WRichTextSkin' | 'WRichTextNewSkin' | 'WRichTextClickableSkin' | 'WRichTextThemeSkin';
|
|
20
9
|
type WRichTextProps = {
|
|
21
10
|
html: string;
|
|
@@ -4,7 +4,7 @@ import { useRef, useEffect, useMemo } from "react";
|
|
|
4
4
|
import { c as clsx } from "../chunks/clsx.js";
|
|
5
5
|
import { f as formatClassNames } from "../chunks/classNames.js";
|
|
6
6
|
import { g as getQaDataAttributes, a as getDataAttributes } from "../chunks/dataUtils.js";
|
|
7
|
-
import { a as activateBySpaceOrEnterButton, g as getAccessibilityAttributesSpread } from "../chunks/a11y.js";
|
|
7
|
+
import { a as activateBySpaceOrEnterButton, c as convertA11yKeysToHtmlFormat, g as getAccessibilityAttributesSpread } from "../chunks/a11y.js";
|
|
8
8
|
import { p as parseHtml } from "../chunks/parseHtml.js";
|
|
9
9
|
import { T as TestIds } from "../chunks/constants.js";
|
|
10
10
|
const semanticClassNames = {
|
|
@@ -131,8 +131,8 @@ const WRichText$1 = React.forwardRef((props, ref) => {
|
|
|
131
131
|
),
|
|
132
132
|
"data-testid": TestIds.richTextElement,
|
|
133
133
|
...sdkEventHandlers,
|
|
134
|
-
...a11y,
|
|
135
134
|
...getAccessibilityAttributesSpread({ ariaAttributes, lang }),
|
|
135
|
+
...convertA11yKeysToHtmlFormat(a11y ?? {}),
|
|
136
136
|
...getQaDataAttributes(isQaMode, fullNameCompType)
|
|
137
137
|
} : {
|
|
138
138
|
className: isClassNameToRootEnabled ? className : ""
|
|
@@ -166,8 +166,8 @@ const WRichText$1 = React.forwardRef((props, ref) => {
|
|
|
166
166
|
),
|
|
167
167
|
"data-testid": TestIds.richTextElement,
|
|
168
168
|
...sdkEventHandlers,
|
|
169
|
-
...
|
|
170
|
-
...
|
|
169
|
+
...getAccessibilityAttributesSpread({ ariaAttributes, lang }),
|
|
170
|
+
...convertA11yKeysToHtmlFormat(a11y ?? {})
|
|
171
171
|
}
|
|
172
172
|
};
|
|
173
173
|
const prefixElement = prefix && /* @__PURE__ */ jsx(
|
|
@@ -66,12 +66,10 @@ const manifest = {
|
|
|
66
66
|
[DATA.DATA_TYPE.a11y]: {
|
|
67
67
|
attributes: [
|
|
68
68
|
DATA.A11Y_ATTRIBUTES.ariaLabel,
|
|
69
|
-
DATA.A11Y_ATTRIBUTES.ariaLive,
|
|
70
69
|
DATA.A11Y_ATTRIBUTES.ariaLevel,
|
|
71
70
|
DATA.A11Y_ATTRIBUTES.role,
|
|
72
|
-
DATA.A11Y_ATTRIBUTES.ariaAtomic,
|
|
73
71
|
DATA.A11Y_ATTRIBUTES.ariaHidden,
|
|
74
|
-
DATA.A11Y_ATTRIBUTES.
|
|
72
|
+
DATA.A11Y_ATTRIBUTES.lang
|
|
75
73
|
]
|
|
76
74
|
}
|
|
77
75
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/editor-react-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2836.0",
|
|
4
4
|
"description": "React components for the Wix Editor",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -228,5 +228,5 @@
|
|
|
228
228
|
"registry": "https://registry.npmjs.org/",
|
|
229
229
|
"access": "public"
|
|
230
230
|
},
|
|
231
|
-
"falconPackageHash": "
|
|
231
|
+
"falconPackageHash": "a94b488213003bd08eab120dcd388a38b4b88e006c765a78d7d2461a"
|
|
232
232
|
}
|