@wix/editor-react-components 1.2686.0 → 1.2687.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.
@@ -4,11 +4,12 @@ import { c as clsx } from "../chunks/clsx.js";
4
4
  import { r as $f39a9eba43920ace$export$8dc98ba7eadeaa56, m as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, a as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f, c as $64fa3d84918910a7$export$29f1550f4b0d4415, h as $65484d02dcb7eb3e$export$457c3d6518dd4c6f, p as $3ef42575df84b30b$export$9d1611c77c2fe928, d as $64fa3d84918910a7$export$fabf2dc03a41866e, g as $64fa3d84918910a7$export$4d86445c2cf5e3 } from "../chunks/filterDOMProps.js";
5
5
  import { $ as $cf2482eff2eeeec2$export$f12b703ca79dfbb1 } from "../chunks/useLocalizedStringFormatter.js";
6
6
  import { createPortal } from "react-dom";
7
+ import { useService } from "@wix/services-manager-react";
8
+ import { T as TranslationsDefinition } from "../chunks/index6.js";
7
9
  import { f as convertA11yKeysToHtmlFormat } from "../chunks/a11y.js";
8
10
  import { d as directionStyles } from "../chunks/direction.module.js";
9
- import { s as semanticClassNames, D as DesignStates } from "../chunks/constants41.js";
11
+ import { s as semanticClassNames, D as DesignStates, A as ARIA_LABEL_NAMESPACE, t as translationKeys, d as defaultTranslations } from "../chunks/constants41.js";
10
12
  import { A as AnimatedIcon } from "../chunks/AnimatedIcon.js";
11
- import { useService } from "@wix/services-manager-react";
12
13
  import { d as defineService } from "../chunks/index8.js";
13
14
  import { E as EnvironmentDefinition } from "../chunks/index2.js";
14
15
  import { U as UrlDefinition } from "../chunks/index13.js";
@@ -1344,7 +1345,7 @@ function BreadcrumbItemComponent({
1344
1345
  },
1345
1346
  [isCollapsed]
1346
1347
  );
1347
- const homeIcon2 = isHomepageItem && hasIcon ? /* @__PURE__ */ jsx("span", { className: styles.homeIconWrapper, children: /* @__PURE__ */ jsx(
1348
+ const homeIcon2 = isHomepageItem && hasIcon ? /* @__PURE__ */ jsx("span", { className: styles.homeIconWrapper, "aria-hidden": "true", children: /* @__PURE__ */ jsx(
1348
1349
  AnimatedIcon,
1349
1350
  {
1350
1351
  id: iconDomId,
@@ -1377,6 +1378,7 @@ function BreadcrumbItemComponent({
1377
1378
  {
1378
1379
  ...href && { href },
1379
1380
  "aria-current": isCurrent ? "page" : void 0,
1381
+ "aria-label": href && isHomepageItem && (item2 == null ? void 0 : item2.label) || void 0,
1380
1382
  className: clsx(
1381
1383
  semanticClassNames.itemLabel,
1382
1384
  styles.label,
@@ -1517,6 +1519,13 @@ function Breadcrumbs2({
1517
1519
  const generatedItems = useBreadcrumbItems();
1518
1520
  const items = itemsFromProps ?? generatedItems;
1519
1521
  const collapsedRange = useCollapsedRange(rootRef, items.length);
1522
+ const { translate } = useService(
1523
+ TranslationsDefinition
1524
+ );
1525
+ const listAriaLabel = translate(ARIA_LABEL_NAMESPACE)(
1526
+ translationKeys.breadcrumbsAriaLabel,
1527
+ defaultTranslations.breadcrumbsAriaLabel
1528
+ );
1520
1529
  useSeoService(items);
1521
1530
  return /* @__PURE__ */ jsxs(
1522
1531
  "nav",
@@ -1535,18 +1544,25 @@ function Breadcrumbs2({
1535
1544
  onMouseEnter: onMouseIn,
1536
1545
  onMouseLeave: onMouseOut,
1537
1546
  children: [
1538
- /* @__PURE__ */ jsx($778035c5624f61e7$export$2dc68d50d56fbbd, { className: styles.breadcrumbs, children: items.map((item2, index) => /* @__PURE__ */ jsx(
1539
- BreadcrumbItemComponent,
1547
+ /* @__PURE__ */ jsx(
1548
+ $778035c5624f61e7$export$2dc68d50d56fbbd,
1540
1549
  {
1541
- item: item2,
1542
- index,
1543
- isCurrent: index === items.length - 1,
1544
- isHomepageItem: index === 0,
1545
- collapsedRange,
1546
- elementProps
1547
- },
1548
- uniqueKey(index, item2.id)
1549
- )) }),
1550
+ className: styles.breadcrumbs,
1551
+ "aria-label": listAriaLabel,
1552
+ children: items.map((item2, index) => /* @__PURE__ */ jsx(
1553
+ BreadcrumbItemComponent,
1554
+ {
1555
+ item: item2,
1556
+ index,
1557
+ isCurrent: index === items.length - 1,
1558
+ isHomepageItem: index === 0,
1559
+ collapsedRange,
1560
+ elementProps
1561
+ },
1562
+ uniqueKey(index, item2.id)
1563
+ ))
1564
+ }
1565
+ ),
1550
1566
  /* @__PURE__ */ jsx(EllipsisItem, {})
1551
1567
  ]
1552
1568
  }
@@ -93,3 +93,10 @@ export declare const defaultStateValues: {
93
93
  readonly hideHomepage: "hideHomepage";
94
94
  readonly hideCurrentPage: "hideCurrentPage";
95
95
  };
96
+ export declare const ARIA_LABEL_NAMESPACE = "ariaLabels";
97
+ export declare const translationKeys: {
98
+ readonly breadcrumbsAriaLabel: "breadcrumbs_AriaLabel";
99
+ };
100
+ export declare const defaultTranslations: {
101
+ readonly breadcrumbsAriaLabel: "Breadcrumbs";
102
+ };
@@ -1,7 +1,7 @@
1
1
  import { L as LAYOUT, a as ACTIONS, b as DISPLAY_GROUPS, C as CSS_PROPERTIES, E as ELEMENTS, N as NativeStateType, D as DATA, A as Archetype } from "../chunks/chunk-ZHYIPFVN.js";
2
2
  import { w as withSpec, g as getSelector } from "../chunks/manifest.js";
3
3
  import { I as IS_SUPPORT_DESIGN_STATE_SPEC } from "../chunks/specs.js";
4
- import { D as DesignStates, a as DisplayNames, h as homepageModeValues, d as defaultStateValues, b as separatorValues, c as componentMetadata, s as semanticClassNames } from "../chunks/constants41.js";
4
+ import { D as DesignStates, a as DisplayNames, h as homepageModeValues, b as defaultStateValues, c as separatorValues, e as componentMetadata, s as semanticClassNames } from "../chunks/constants41.js";
5
5
  import { c as manifestMouseHover } from "../chunks/manifestSdkMixins.js";
6
6
  const manifest = {
7
7
  id: componentMetadata.id,
@@ -377,6 +377,7 @@ const manifest = {
377
377
  componentDependencies: ["@wix/editor-react-components/AnimatedIcon"],
378
378
  serviceDependencies: [
379
379
  "@wix/viewer-service-pages",
380
+ "@wix/viewer-service-translations",
380
381
  "@wix/viewer-service-url"
381
382
  ]
382
383
  }
@@ -76,12 +76,22 @@ const defaultStateValues = {
76
76
  hideHomepage: "hideHomepage",
77
77
  hideCurrentPage: "hideCurrentPage"
78
78
  };
79
+ const ARIA_LABEL_NAMESPACE = "ariaLabels";
80
+ const translationKeys = {
81
+ breadcrumbsAriaLabel: "breadcrumbs_AriaLabel"
82
+ };
83
+ const defaultTranslations = {
84
+ breadcrumbsAriaLabel: "Breadcrumbs"
85
+ };
79
86
  export {
87
+ ARIA_LABEL_NAMESPACE as A,
80
88
  DesignStates as D,
81
89
  DisplayNames as a,
82
- separatorValues as b,
83
- componentMetadata as c,
84
- defaultStateValues as d,
90
+ defaultStateValues as b,
91
+ separatorValues as c,
92
+ defaultTranslations as d,
93
+ componentMetadata as e,
85
94
  homepageModeValues as h,
86
- semanticClassNames as s
95
+ semanticClassNames as s,
96
+ translationKeys as t
87
97
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/editor-react-components",
3
- "version": "1.2686.0",
3
+ "version": "1.2687.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": "0ea15a8395b510dce2c84cbacb526976259c9dc4ddc1ee06fead9098"
203
+ "falconPackageHash": "1444a5d5ff5cf1b80feab0f31c4325d87512f7f437e858cf9508ddaf"
204
204
  }