@wix/editor-react-components 1.2701.0 → 1.2703.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.
@@ -3,8 +3,9 @@ import { AriaProps } from '../../../../types/vendored/editor-elements-types-a11y
3
3
  type UseButtonA11yParams = {
4
4
  propsA11y?: A11y;
5
5
  ariaAttributes?: AriaProps;
6
+ lang?: string;
6
7
  };
7
- export declare function useButtonA11y({ propsA11y, ariaAttributes, }: UseButtonA11yParams): {
8
+ export declare function useButtonA11y({ propsA11y, ariaAttributes, lang, }: UseButtonA11yParams): {
8
9
  tabIndex: 0 | -1 | undefined;
9
10
  screenReader: {
10
11
  prefix?: string | null;
@@ -228,7 +228,8 @@ const manifest = {
228
228
  DATA.A11Y_ATTRIBUTES.ariaExpanded,
229
229
  DATA.A11Y_ATTRIBUTES.ariaDisabled,
230
230
  DATA.A11Y_ATTRIBUTES.ariaHaspopup,
231
- DATA.A11Y_ATTRIBUTES.ariaLabel
231
+ DATA.A11Y_ATTRIBUTES.ariaLabel,
232
+ DATA.A11Y_ATTRIBUTES.lang
232
233
  ]
233
234
  }
234
235
  }
@@ -68,6 +68,7 @@ const manifest = {
68
68
  defaultValue: false
69
69
  },
70
70
  effectType: {
71
+ description: 'Color filter applied to the video. Exactly one of: "tvDuotone" (two-color tint), "tvMonotoneDark" (dark single-color tint), "tvMonotoneLight" (light single-color tint), "grayscale" (black and white), "tvHue" (hue shift). Omit to keep the original colors.',
71
72
  displayName: "Filter Effect Type",
72
73
  dataType: DATA.DATA_TYPE.text,
73
74
  defaultValue: null
@@ -183,22 +183,35 @@ function useButtonEventHandlers({
183
183
  }
184
184
  function useButtonA11y({
185
185
  propsA11y,
186
- ariaAttributes
186
+ ariaAttributes,
187
+ lang
187
188
  }) {
188
- const normalizedA11y = useMemo(
189
- () => removeAriaPrefix(propsA11y ?? {}),
190
- [propsA11y]
191
- );
189
+ const normalizedA11y = useMemo(() => {
190
+ const {
191
+ lang: manifestLang,
192
+ tabIndex: manifestTabindex,
193
+ ...manifestAriaAttributes
194
+ } = propsA11y ?? {};
195
+ return {
196
+ lang: manifestLang,
197
+ tabIndex: manifestTabindex,
198
+ ariaAttributes: removeAriaPrefix(manifestAriaAttributes)
199
+ };
200
+ }, [propsA11y]);
192
201
  const a11yAttr = useMemo(
193
- () => getAccessibilityAttributesSpread({
194
- ariaAttributes: {
195
- ...ariaAttributes,
196
- ...normalizedA11y,
197
- label: (ariaAttributes == null ? void 0 : ariaAttributes.label) ?? normalizedA11y.label
198
- },
199
- tabindex: normalizedA11y == null ? void 0 : normalizedA11y.tabindex
200
- }),
201
- [normalizedA11y, ariaAttributes]
202
+ () => {
203
+ var _a;
204
+ return getAccessibilityAttributesSpread({
205
+ ariaAttributes: {
206
+ ...ariaAttributes,
207
+ ...normalizedA11y.ariaAttributes,
208
+ label: (ariaAttributes == null ? void 0 : ariaAttributes.label) ?? normalizedA11y.ariaAttributes.label
209
+ },
210
+ tabIndex: normalizedA11y.tabIndex,
211
+ lang: ((lang == null ? void 0 : lang.trim()) ?? ((_a = normalizedA11y.lang) == null ? void 0 : _a.trim())) || void 0
212
+ });
213
+ },
214
+ [normalizedA11y, ariaAttributes, lang]
202
215
  );
203
216
  return a11yAttr;
204
217
  }
@@ -377,14 +390,13 @@ const Button = (props) => {
377
390
  onFocus,
378
391
  onBlur
379
392
  });
380
- const a11yAttr = useButtonA11y({ propsA11y, ariaAttributes });
393
+ const a11yAttr = useButtonA11y({ propsA11y, ariaAttributes, lang });
381
394
  const renderedLabel = labelContent ?? label2;
382
395
  const wrapperAttributes = {
383
396
  id,
384
397
  ...getDataAttributes(props),
385
398
  ...getQaDataAttributes(isQaMode, fullNameCompType),
386
399
  "data-semantic-classname": semanticClassNames.root,
387
- lang,
388
400
  ...direction && { dir: direction }
389
401
  };
390
402
  const renderButtonContent = () => /* @__PURE__ */ jsxs(Fragment, { children: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/editor-react-components",
3
- "version": "1.2701.0",
3
+ "version": "1.2703.0",
4
4
  "description": "React components for the Wix Editor",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -200,5 +200,5 @@
200
200
  "registry": "https://registry.npmjs.org/",
201
201
  "access": "public"
202
202
  },
203
- "falconPackageHash": "e1091bd73a6f69eac745f5e67b82f7a92d93bb01ba33f81345055113"
203
+ "falconPackageHash": "ecb65f0062601f19dbb3e6d41e09a53c4d93154903026d87a842680e"
204
204
  }