@wix/editor-react-components 1.2751.0 → 1.2752.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/site/components/AccordionComponent/component.js +2 -0
- package/dist/site/components/AccordionComponent/manifest.js +6 -0
- package/dist/site/components/AccordionComponent/types.d.ts +1 -0
- package/dist/site/components/CollapsibleText/component.js +2 -2
- package/dist/site/components/CollapsibleText/manifest.js +6 -0
- package/dist/site/components/CollapsibleText/types.d.ts +1 -0
- package/dist/site/components/HTMLComponent/HTMLComponent.types.d.ts +1 -0
- package/dist/site/components/HTMLComponent/component.js +2 -0
- package/dist/site/components/HTMLComponent/hooks/useHTMLComponentProps.d.ts +1 -0
- package/dist/site/components/HTMLComponent/manifest.js +4 -1
- package/dist/site/components/HTMLComponent/panels/hooks.d.ts +3 -2
- package/dist/site/components/HTMLComponent/panels/test-utils.d.ts +3 -2
- package/dist/site/components/Menu/manifest.js +2 -3
- package/dist/site/components/Slideshow/component.js +1 -0
- package/dist/site/components/Slideshow/manifest.js +4 -1
- package/package.json +2 -2
|
@@ -2613,6 +2613,7 @@ function useAccordionState(items, defaultOpen = "none", allowMultipleOpen = fals
|
|
|
2613
2613
|
const AccordionContainer = (props) => {
|
|
2614
2614
|
var _a, _b;
|
|
2615
2615
|
const {
|
|
2616
|
+
a11y,
|
|
2616
2617
|
items = DEFAULT_PROPS.items,
|
|
2617
2618
|
defaultOpen = DEFAULT_PROPS.defaultOpen,
|
|
2618
2619
|
className,
|
|
@@ -2660,6 +2661,7 @@ const AccordionContainer = (props) => {
|
|
|
2660
2661
|
"div",
|
|
2661
2662
|
{
|
|
2662
2663
|
id,
|
|
2664
|
+
lang: a11y == null ? void 0 : a11y.lang,
|
|
2663
2665
|
...direction && { dir: direction },
|
|
2664
2666
|
onClick,
|
|
2665
2667
|
onDoubleClick: onDblClick,
|
|
@@ -243,6 +243,12 @@ const manifest = {
|
|
|
243
243
|
}
|
|
244
244
|
},
|
|
245
245
|
data: {
|
|
246
|
+
a11y: {
|
|
247
|
+
dataType: DATA.DATA_TYPE.a11y,
|
|
248
|
+
[DATA.DATA_TYPE.a11y]: {
|
|
249
|
+
attributes: [DATA.A11Y_ATTRIBUTES.lang]
|
|
250
|
+
}
|
|
251
|
+
},
|
|
246
252
|
items: {
|
|
247
253
|
dataType: DATA.DATA_TYPE.arrayItems,
|
|
248
254
|
displayName: DISPLAY_NAMES.data.items,
|
|
@@ -23,6 +23,7 @@ export interface AccordionElementProps {
|
|
|
23
23
|
export interface AccordionContainerProps extends SdkFunctionClickableProps, SdkFunctionMouseHoverProps, SdkFunctionFocusableProps {
|
|
24
24
|
/** DOM `id` on the root element. */
|
|
25
25
|
id?: string;
|
|
26
|
+
a11y?: A11y;
|
|
26
27
|
/**
|
|
27
28
|
* Appended to the root `.accordion`. Use this for CSS-variable overrides
|
|
28
29
|
* targeting a higher-specificity selector than the single-class defaults.
|
|
@@ -114,7 +114,7 @@ const noop = () => {
|
|
|
114
114
|
function CollapsibleText(props) {
|
|
115
115
|
var _a, _b, _c;
|
|
116
116
|
const environmentService = useService(EnvironmentDefinition);
|
|
117
|
-
const { id, className, text: text2, expandMode, link, linkText } = props;
|
|
117
|
+
const { a11y, id, className, text: text2, expandMode, link, linkText } = props;
|
|
118
118
|
const { readMoreText, readLessText } = props;
|
|
119
119
|
const {
|
|
120
120
|
onClick = noop,
|
|
@@ -175,7 +175,7 @@ function CollapsibleText(props) {
|
|
|
175
175
|
...getDataAttributes(props),
|
|
176
176
|
...getTabIndexAttribute(props),
|
|
177
177
|
className: rootClassName,
|
|
178
|
-
lang: environmentService.language,
|
|
178
|
+
lang: (a11y == null ? void 0 : a11y.lang) ?? environmentService.language,
|
|
179
179
|
onClick,
|
|
180
180
|
onDoubleClick: onDblClick,
|
|
181
181
|
onMouseEnter: onMouseIn,
|
|
@@ -47,6 +47,12 @@ const manifest = {
|
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
data: {
|
|
50
|
+
a11y: {
|
|
51
|
+
dataType: DATA.DATA_TYPE.a11y,
|
|
52
|
+
[DATA.DATA_TYPE.a11y]: {
|
|
53
|
+
attributes: [DATA.A11Y_ATTRIBUTES.lang]
|
|
54
|
+
}
|
|
55
|
+
},
|
|
50
56
|
expandMode: {
|
|
51
57
|
dataType: DATA.DATA_TYPE.textEnum,
|
|
52
58
|
displayName: DisplayNames.root.data.expandMode.displayName,
|
|
@@ -6,6 +6,7 @@ export type ExpandMode = 'button' | 'link';
|
|
|
6
6
|
export type CollapsibleTextProps = SdkFunctionClickableProps & SdkFunctionMouseHoverProps & {
|
|
7
7
|
/** DOM `id` on the root `.collapsible-text` wrapper. */
|
|
8
8
|
id: string;
|
|
9
|
+
a11y?: A11y;
|
|
9
10
|
/** Appended to the root `.collapsible-text`. Use this for CSS-variable and per-element overrides. */
|
|
10
11
|
className: string;
|
|
11
12
|
/** `'button'` toggles the body in place; `'link'` renders a static link that navigates via `link`. Default `'button'`. */
|
|
@@ -95,6 +95,7 @@ const styles = {
|
|
|
95
95
|
};
|
|
96
96
|
const HTMLComponent$1 = React.forwardRef((props, forwardRef) => {
|
|
97
97
|
const {
|
|
98
|
+
a11y,
|
|
98
99
|
id,
|
|
99
100
|
className,
|
|
100
101
|
url,
|
|
@@ -147,6 +148,7 @@ const HTMLComponent$1 = React.forwardRef((props, forwardRef) => {
|
|
|
147
148
|
"iframe",
|
|
148
149
|
{
|
|
149
150
|
ref,
|
|
151
|
+
lang: a11y == null ? void 0 : a11y.lang,
|
|
150
152
|
sandbox,
|
|
151
153
|
className: styles.iframe,
|
|
152
154
|
scrolling,
|
|
@@ -159,7 +159,10 @@ const manifest = {
|
|
|
159
159
|
a11y: {
|
|
160
160
|
dataType: DATA.DATA_TYPE.a11y,
|
|
161
161
|
[DATA.DATA_TYPE.a11y]: {
|
|
162
|
-
attributes: [
|
|
162
|
+
attributes: [
|
|
163
|
+
DATA.A11Y_ATTRIBUTES.ariaLabel,
|
|
164
|
+
DATA.A11Y_ATTRIBUTES.lang
|
|
165
|
+
]
|
|
163
166
|
}
|
|
164
167
|
},
|
|
165
168
|
...manifestMouseHover()
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { ElementA11y } from '@wix/editor';
|
|
1
2
|
import { SourceTypes, CookieConsentType } from './constants';
|
|
2
3
|
export interface UsePanelDataReturn {
|
|
3
4
|
sourceType: SourceTypes;
|
|
4
5
|
currentUrl: string;
|
|
5
6
|
currentCode: string;
|
|
6
|
-
|
|
7
|
+
a11y: ElementA11y;
|
|
7
8
|
cookieConsent: CookieConsentType;
|
|
8
9
|
isLoading: boolean;
|
|
9
10
|
isInitialDataLoaded: boolean;
|
|
@@ -14,7 +15,7 @@ export interface UsePanelDataReturn {
|
|
|
14
15
|
setCookieConsent: (consent: CookieConsentType) => void;
|
|
15
16
|
}
|
|
16
17
|
export declare const usePanelData: () => UsePanelDataReturn;
|
|
17
|
-
export declare const useDataPersistence: (isInitialDataLoaded: boolean, sourceType: SourceTypes, currentUrl: string,
|
|
18
|
+
export declare const useDataPersistence: (isInitialDataLoaded: boolean, sourceType: SourceTypes, currentUrl: string, a11y: ElementA11y, cookieConsent: CookieConsentType) => void;
|
|
18
19
|
export declare const useEventHandlers: (setSourceType: (value: SourceTypes) => void, setCurrentUrl: (url: string) => void, setCurrentCode: (code: string) => void, setHtmlTitle: (title: string) => void, setCookieConsent: (consent: CookieConsentType) => void) => {
|
|
19
20
|
handleSourceTypeChange: (value: SourceTypes) => void;
|
|
20
21
|
handleUrlChange: (url: string) => void;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { SourceTypes, CookieConsentType } from './constants';
|
|
2
|
+
import { ElementA11y } from '@wix/editor';
|
|
2
3
|
import { MockElementConfig, MockHttpClientConfig } from '../../../../test-utils';
|
|
3
4
|
export type PanelData = {
|
|
4
5
|
url: string;
|
|
5
|
-
a11y: {
|
|
6
|
-
|
|
6
|
+
a11y: ElementA11y & {
|
|
7
|
+
lang?: string;
|
|
7
8
|
};
|
|
8
9
|
componentConsentPolicy: CookieConsentType;
|
|
9
10
|
sourceType: SourceTypes;
|
|
@@ -673,9 +673,8 @@ const navbarConfig = {
|
|
|
673
673
|
DATA.A11Y_ATTRIBUTES.ariaDisabled,
|
|
674
674
|
DATA.A11Y_ATTRIBUTES.ariaHaspopup,
|
|
675
675
|
DATA.A11Y_ATTRIBUTES.ariaLabel,
|
|
676
|
-
DATA.A11Y_ATTRIBUTES.ariaLive
|
|
677
|
-
|
|
678
|
-
// DATA.A11Y_ATTRIBUTES.lang,
|
|
676
|
+
DATA.A11Y_ATTRIBUTES.ariaLive,
|
|
677
|
+
DATA.A11Y_ATTRIBUTES.lang
|
|
679
678
|
]
|
|
680
679
|
}
|
|
681
680
|
}
|
|
@@ -703,6 +703,7 @@ const Slideshow = (props) => {
|
|
|
703
703
|
"div",
|
|
704
704
|
{
|
|
705
705
|
role: "region",
|
|
706
|
+
lang: a11y == null ? void 0 : a11y.lang,
|
|
706
707
|
"aria-label": (a11y == null ? void 0 : a11y.ariaLabel) ?? "Slideshow",
|
|
707
708
|
className: presetWrapperStyles.presetWrapper,
|
|
708
709
|
...presetsWrapperProps,
|
|
@@ -227,7 +227,10 @@ const manifest = {
|
|
|
227
227
|
a11y: {
|
|
228
228
|
dataType: DATA.DATA_TYPE.a11y,
|
|
229
229
|
[DATA.DATA_TYPE.a11y]: {
|
|
230
|
-
attributes: [
|
|
230
|
+
attributes: [
|
|
231
|
+
DATA.A11Y_ATTRIBUTES.ariaLabel,
|
|
232
|
+
DATA.A11Y_ATTRIBUTES.lang
|
|
233
|
+
]
|
|
231
234
|
}
|
|
232
235
|
},
|
|
233
236
|
transitionDirection: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/editor-react-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2752.0",
|
|
4
4
|
"description": "React components for the Wix Editor",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -222,5 +222,5 @@
|
|
|
222
222
|
"registry": "https://registry.npmjs.org/",
|
|
223
223
|
"access": "public"
|
|
224
224
|
},
|
|
225
|
-
"falconPackageHash": "
|
|
225
|
+
"falconPackageHash": "df292d5885f8651c9c6d5a021592d147208ae952ab9a3cd1b85f1754"
|
|
226
226
|
}
|