@wix/editor-react-components 1.2619.0 → 1.2621.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,7 +1,6 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { c as clsx } from "../chunks/clsx.js";
3
3
  import { f as convertA11yKeysToHtmlFormat } from "../chunks/a11y.js";
4
- import { d as directionStyles } from "../chunks/direction.module.js";
5
4
  import { p as presetWrapperStyles } from "../chunks/presetWrapper.module.js";
6
5
  import { D as DEFAULT_ITEMS_PER_ROW, L as LOADING_ITEM_COUNT_CSS_VAR, C as COLUMN_COUNT_CSS_VAR, T as TestIds, s as semanticClassNames } from "../chunks/constants23.js";
7
6
  import React__default, { useState, useRef, useCallback, useEffect, forwardRef } from "react";
@@ -518,11 +517,9 @@ const Repeater = (props) => {
518
517
  "div",
519
518
  {
520
519
  id,
521
- ...direction && { dir: direction },
522
520
  className: clsx(
523
521
  semanticClassNames.root,
524
522
  styles.repeater,
525
- directionStyles.fallbackDirection,
526
523
  className
527
524
  ),
528
525
  children: showEmptyState ? /* @__PURE__ */ jsx(RepeaterEmptyState, { content: emptyStateContent2 }) : /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -530,6 +527,7 @@ const Repeater = (props) => {
530
527
  "ul",
531
528
  {
532
529
  ref: ulRef,
530
+ ...direction && { dir: direction },
533
531
  ...a11y && convertA11yKeysToHtmlFormat(a11y),
534
532
  role: "list",
535
533
  "aria-busy": isLoading,
@@ -39,6 +39,7 @@ export declare const cssCustomPropertyKeys: {
39
39
  readonly backgroundColor: "background-color";
40
40
  readonly backgroundColorOpacity: "background-color-opacity";
41
41
  readonly overflowContent: "overflow-content";
42
+ readonly itemsDirection: "items-direction";
42
43
  readonly itemsPerRow: "items-per-row";
43
44
  readonly columnCount: "column-count";
44
45
  readonly rowGap: "row-gap";
@@ -25,6 +25,7 @@
25
25
  .repeater__aNz-6 {
26
26
  box-sizing: border-box;
27
27
  width: 100%;
28
+ direction: var(--items-direction, var(--wix-opt-in-direction, ltr));
28
29
  overflow: var(--overflow-content);
29
30
  scroll-snap-type: var(--scroll-snap-type, none);
30
31
  --repeater-background-color-opacity-num: var(--background-color-opacity, 1);
@@ -49,6 +50,7 @@
49
50
  }
50
51
 
51
52
  .item__dXORc {
53
+ direction: var(--wix-opt-in-direction, ltr);
52
54
  box-sizing: border-box;
53
55
  min-height: 10px;
54
56
  flex: 0 var(--item-flex-shrink, 1) var(--item-flex-basis);
@@ -128,6 +130,7 @@
128
130
  }
129
131
  .emptyState__cCB1M {
130
132
  box-sizing: border-box;
133
+ direction: var(--wix-opt-in-direction, ltr);
131
134
  }
132
135
 
133
136
  .emptyStateBanner__W741Z {
@@ -135,6 +138,7 @@
135
138
  width: 100%;
136
139
  padding: 16px;
137
140
  text-align: center;
141
+ direction: var(--wix-opt-in-direction, ltr);
138
142
  }
139
143
 
140
144
  .emptyStateContent__hVHdj {
@@ -215,9 +219,6 @@
215
219
  auto
216
220
  );
217
221
  }
218
- .fallbackDirection__HeRgn:not([dir]) {
219
- direction: var(--wix-opt-in-direction);
220
- }
221
222
  .presetWrapper__J1yzj {
222
223
  display: contents;
223
224
  }
@@ -217,6 +217,18 @@ const manifest = {
217
217
  ]
218
218
  }
219
219
  },
220
+ "items-direction": {
221
+ cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.customEnum,
222
+ displayName: "Layout direction",
223
+ defaultValue: "ltr",
224
+ customEnum: {
225
+ cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.string,
226
+ options: [
227
+ { value: "ltr", displayName: "Left to Right" },
228
+ { value: "rtl", displayName: "Right to Left" }
229
+ ]
230
+ }
231
+ },
220
232
  "items-per-row": {
221
233
  cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.customEnum,
222
234
  displayName: "Items per row",
@@ -469,6 +481,7 @@ const manifest = {
469
481
  cssCustomProperties: {
470
482
  hide: [
471
483
  "column-gap",
484
+ "items-direction",
472
485
  "scroll-snap-align",
473
486
  "show-scrollbar",
474
487
  "column-min-width",
@@ -503,6 +516,7 @@ const manifest = {
503
516
  hide: [
504
517
  "row-gap",
505
518
  "overflow-content",
519
+ "items-direction",
506
520
  "column-min-width",
507
521
  "row-min-height",
508
522
  "keep-rows-equal",
@@ -534,6 +548,7 @@ const manifest = {
534
548
  hide: [
535
549
  "column-gap",
536
550
  "overflow-content",
551
+ "items-direction",
537
552
  "column-min-width",
538
553
  "row-min-height",
539
554
  "keep-rows-equal",
@@ -7,6 +7,7 @@ export declare const TranslationKeys: {
7
7
  readonly itemsPerRowLabel: "custompanel_repeater_items_per_row_label";
8
8
  readonly directionLabel: "custompanel_repeater_direction_label";
9
9
  readonly directionHorizontalOption: "custompanel_repeater_direction_horizontal_option";
10
+ readonly directionRightToLeftOption: "custompanel_repeater_direction_right_to_left_option";
10
11
  readonly directionVerticalOption: "custompanel_repeater_direction_vertical_option";
11
12
  };
12
13
  export type Translations = Record<keyof typeof TranslationKeys, string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/editor-react-components",
3
- "version": "1.2619.0",
3
+ "version": "1.2621.0",
4
4
  "description": "React components for the Wix Editor",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -68,7 +68,7 @@
68
68
  "test:a11y": "a11y-audit-tool-plugin audit"
69
69
  },
70
70
  "peerDependencies": {
71
- "@wix/editor-react-types": "^1.0.92",
71
+ "@wix/editor-react-types": "^1.0.93",
72
72
  "react": "^18.2.0",
73
73
  "react-dom": "^18.2.0"
74
74
  },
@@ -84,7 +84,7 @@
84
84
  "@wix/site-service-business-logger": "^1.0.0",
85
85
  "@wix/site-service-configuration": "^1.0.1",
86
86
  "@wix/site-service-rendering-context": "^1.0.1",
87
- "@wix/site-ui": "1.260.0",
87
+ "@wix/site-ui": "1.261.0",
88
88
  "@wix/video": "^1.106.0",
89
89
  "@wix/viewer-service-consent-policy": "^1.0.101",
90
90
  "@wix/web-bi-logger": "^2.1.29",
@@ -198,5 +198,5 @@
198
198
  "registry": "https://registry.npmjs.org/",
199
199
  "access": "public"
200
200
  },
201
- "falconPackageHash": "2b07aec047b3714ee2e2901cd11669e1cf689f95fc3f842553784405"
201
+ "falconPackageHash": "fcbe6838e5082a6fb7353cb56de3ef4e6780060d93952f47485cb227"
202
202
  }