@wix/editor-react-components 1.2744.0 → 1.2746.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,7 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useState, useRef } from "react";
3
3
  import { c as clsx } from "../chunks/clsx.js";
4
- import { a as Fieldset, T as Tooltip, c as InfoCircle_default, d as CheckboxGroup_CheckboxGroup_CheckboxGroup, e as Checkbox } from "../chunks/index12.js";
4
+ import { a as Fieldset, T as Tooltip, b as InfoCircle_default, d as CheckboxGroup_CheckboxGroup_CheckboxGroup, e as Checkbox } from "../chunks/index12.js";
5
5
  import { useService } from "@wix/services-manager-react";
6
6
  import { E as EnvironmentDefinition } from "../chunks/index2.js";
7
7
  import { f as formatClassNames } from "../chunks/classNames.js";
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useState } from "react";
3
3
  import { c as clsx } from "../chunks/clsx.js";
4
- import { a as Fieldset, T as Tooltip, R as RadioGroup_RadioGroup_RadioGroup, b as Radio, c as InfoCircle_default } from "../chunks/index12.js";
4
+ import { a as Fieldset, T as Tooltip, R as Radio, b as InfoCircle_default, c as RadioGroup_RadioGroup_RadioGroup } from "../chunks/index12.js";
5
5
  import { useService } from "@wix/services-manager-react";
6
6
  import { E as EnvironmentDefinition } from "../chunks/index2.js";
7
7
  import { f as formatClassNames } from "../chunks/classNames.js";
@@ -104,6 +104,7 @@ function RadioButtonsComponent(props) {
104
104
  }
105
105
  };
106
106
  const hasLegend = !!label2;
107
+ const groupLabelId = hasLegend ? `${id}-group-label` : void 0;
107
108
  const ariaLabel = (a11y == null ? void 0 : a11y.ariaLabel) || void 0;
108
109
  const customAccessibleNameId = hasLegend && ariaLabel ? `${id}-accessible-name` : void 0;
109
110
  const presetsWrapperProps = (wix == null ? void 0 : wix.presetsWrapperProps) || {};
@@ -122,71 +123,78 @@ function RadioButtonsComponent(props) {
122
123
  dir: direction,
123
124
  lang: environmentService.language,
124
125
  "data-testid": TestIds.root,
125
- children: /* @__PURE__ */ jsxs(Fieldset.Root, { className: styles.fieldset, children: [
126
- customAccessibleNameId && /* @__PURE__ */ jsx(
127
- "span",
128
- {
129
- id: customAccessibleNameId,
130
- className: accessibilityStyles.visuallyHidden,
131
- children: ariaLabel
132
- }
133
- ),
134
- (hasLegend || tooltip2) && /* @__PURE__ */ jsxs("div", { className: styles.labelRow, children: [
135
- hasLegend && /* @__PURE__ */ jsxs(
136
- Fieldset.Legend,
126
+ children: /* @__PURE__ */ jsxs(
127
+ Fieldset.Root,
128
+ {
129
+ className: styles.fieldset,
130
+ render: /* @__PURE__ */ jsx(
131
+ RadioGroup_RadioGroup_RadioGroup,
137
132
  {
138
- className: clsx(
139
- styles.groupLabel,
140
- selectors.groupLabel,
141
- formatClassNames(semanticClassNames.groupLabel),
142
- (_b = elementProps == null ? void 0 : elementProps.groupLabel) == null ? void 0 : _b.className
143
- ),
144
- "data-testid": TestIds.legend,
145
- children: [
146
- label2,
147
- required && /* @__PURE__ */ jsx(
148
- RequiredIndicator,
149
- {
150
- className: formatClassNames(
151
- semanticClassNames.requiredIndicator
152
- ),
153
- "data-testid": TestIds.requiredIndicator
154
- }
155
- )
156
- ]
133
+ ...selectionProps,
134
+ onValueChange: (value) => handleValueChange(value),
135
+ disabled,
136
+ readOnly,
137
+ "aria-required": required || void 0,
138
+ "aria-invalid": isInvalid || void 0,
139
+ "aria-describedby": isInvalid && validity.validationMessage ? errorId : void 0,
140
+ "aria-label": ariaLabel,
141
+ "aria-labelledby": customAccessibleNameId ?? groupLabelId,
142
+ render: /* @__PURE__ */ jsx("fieldset", {}),
143
+ "data-testid": TestIds.group,
144
+ onFocus,
145
+ onBlur: handleBlur
157
146
  }
158
147
  ),
159
- tooltip2 && /* @__PURE__ */ jsx(Tooltip.Provider, { delay: 0, children: /* @__PURE__ */ jsxs(Tooltip.Root, { children: [
160
- /* @__PURE__ */ jsx(
161
- Tooltip.Trigger,
148
+ children: [
149
+ customAccessibleNameId && /* @__PURE__ */ jsx(
150
+ "span",
162
151
  {
163
- type: "button",
164
- className: styles.tooltipButton,
165
- "data-testid": TestIds.tooltipButton,
166
- "aria-label": tooltip2,
167
- children: /* @__PURE__ */ jsx(InfoCircleSmall_default, { "aria-hidden": "true" })
152
+ id: customAccessibleNameId,
153
+ className: accessibilityStyles.visuallyHidden,
154
+ children: ariaLabel
168
155
  }
169
156
  ),
170
- /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsx(Tooltip.Positioner, { sideOffset: 6, children: /* @__PURE__ */ jsx(Tooltip.Popup, { className: styles.tooltip, children: tooltip2 }) }) })
171
- ] }) })
172
- ] }),
173
- /* @__PURE__ */ jsx(
174
- RadioGroup_RadioGroup_RadioGroup,
175
- {
176
- ...selectionProps,
177
- onValueChange: (value) => handleValueChange(value),
178
- disabled,
179
- readOnly,
180
- "aria-required": required || void 0,
181
- "aria-invalid": isInvalid || void 0,
182
- "aria-describedby": isInvalid && validity.validationMessage ? errorId : void 0,
183
- "aria-label": ariaLabel,
184
- "aria-labelledby": customAccessibleNameId,
185
- className: styles.group,
186
- "data-testid": TestIds.group,
187
- onFocus,
188
- onBlur: handleBlur,
189
- children: options.map((option2, index) => {
157
+ (hasLegend || tooltip2) && /* @__PURE__ */ jsxs("div", { className: styles.labelRow, children: [
158
+ hasLegend && /* @__PURE__ */ jsxs(
159
+ Fieldset.Legend,
160
+ {
161
+ id: groupLabelId,
162
+ className: clsx(
163
+ styles.groupLabel,
164
+ selectors.groupLabel,
165
+ formatClassNames(semanticClassNames.groupLabel),
166
+ (_b = elementProps == null ? void 0 : elementProps.groupLabel) == null ? void 0 : _b.className
167
+ ),
168
+ "data-testid": TestIds.legend,
169
+ children: [
170
+ label2,
171
+ required && /* @__PURE__ */ jsx(
172
+ RequiredIndicator,
173
+ {
174
+ className: formatClassNames(
175
+ semanticClassNames.requiredIndicator
176
+ ),
177
+ "data-testid": TestIds.requiredIndicator
178
+ }
179
+ )
180
+ ]
181
+ }
182
+ ),
183
+ tooltip2 && /* @__PURE__ */ jsx(Tooltip.Provider, { delay: 0, children: /* @__PURE__ */ jsxs(Tooltip.Root, { children: [
184
+ /* @__PURE__ */ jsx(
185
+ Tooltip.Trigger,
186
+ {
187
+ type: "button",
188
+ className: styles.tooltipButton,
189
+ "data-testid": TestIds.tooltipButton,
190
+ "aria-label": tooltip2,
191
+ children: /* @__PURE__ */ jsx(InfoCircleSmall_default, { "aria-hidden": "true" })
192
+ }
193
+ ),
194
+ /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsx(Tooltip.Positioner, { sideOffset: 6, children: /* @__PURE__ */ jsx(Tooltip.Popup, { className: styles.tooltip, children: tooltip2 }) }) })
195
+ ] }) })
196
+ ] }),
197
+ /* @__PURE__ */ jsx("div", { className: styles.group, children: options.map((option2, index) => {
190
198
  var _a2, _b2;
191
199
  return /* @__PURE__ */ jsxs(
192
200
  "label",
@@ -242,25 +250,25 @@ function RadioButtonsComponent(props) {
242
250
  },
243
251
  option2.value || index
244
252
  );
245
- })
246
- }
247
- ),
248
- isInvalid && validity.validationMessage && /* @__PURE__ */ jsxs(
249
- "div",
250
- {
251
- id: errorId,
252
- className: clsx(
253
- styles.errorMessage,
254
- formatClassNames(semanticClassNames.errorMessage)
255
- ),
256
- "data-testid": TestIds.errorMessage,
257
- children: [
258
- /* @__PURE__ */ jsx(InfoCircle_default, { "aria-hidden": "true" }),
259
- validity.validationMessage
260
- ]
261
- }
262
- )
263
- ] })
253
+ }) }),
254
+ isInvalid && validity.validationMessage && /* @__PURE__ */ jsxs(
255
+ "div",
256
+ {
257
+ id: errorId,
258
+ className: clsx(
259
+ styles.errorMessage,
260
+ formatClassNames(semanticClassNames.errorMessage)
261
+ ),
262
+ "data-testid": TestIds.errorMessage,
263
+ children: [
264
+ /* @__PURE__ */ jsx(InfoCircle_default, { "aria-hidden": "true" }),
265
+ validity.validationMessage
266
+ ]
267
+ }
268
+ )
269
+ ]
270
+ }
271
+ )
264
272
  }
265
273
  ) });
266
274
  }
@@ -177,10 +177,8 @@ function getFilterValue(key, value, overrides) {
177
177
  light: "duotoneLight" in overrides && overrides.duotoneLight || value.light,
178
178
  dark: "duotoneDark" in overrides && overrides.duotoneDark || value.dark
179
179
  };
180
- } else if (key in overrides) {
181
- return overrides[key];
182
180
  }
183
- return value;
181
+ return overrides[key] ?? value;
184
182
  }
185
183
  function interpolate(id, filterDefinition, overrides, attrs) {
186
184
  const content = filterDefinition.map((effect) => {
@@ -63,6 +63,7 @@ const manifest = {
63
63
  },
64
64
  data: {
65
65
  filterEffectRecolorVideo: {
66
+ description: "Must be true for the effectType color filter to show; false shows the original colors.",
66
67
  displayName: "Filter Effect Recolor",
67
68
  dataType: DATA.DATA_TYPE.booleanValue,
68
69
  defaultValue: false
@@ -47,23 +47,41 @@ function bidiFactory() {
47
47
  function parseData() {
48
48
  if (!map) {
49
49
  map = /* @__PURE__ */ new Map();
50
- var loop = function(type2) {
51
- if (DATA.hasOwnProperty(type2)) {
50
+ var start = 0;
51
+ for (var type in DATA) {
52
+ if (DATA.hasOwnProperty(type)) {
53
+ var segments = DATA[type];
54
+ var temp = "";
55
+ var end = void 0;
56
+ var state = false;
52
57
  var lastCode = 0;
53
- DATA[type2].split(",").forEach(function(range) {
54
- var ref = range.split("+");
55
- var skip = ref[0];
56
- var step = ref[1];
57
- skip = parseInt(skip, 36);
58
- step = step ? parseInt(step, 36) : 0;
59
- map.set(lastCode += skip, TYPES[type2]);
60
- for (var i = 0; i < step; i++) {
61
- map.set(++lastCode, TYPES[type2]);
58
+ for (var i = 0; i <= segments.length + 1; i += 1) {
59
+ var char = segments[i];
60
+ if (char !== "," && i !== segments.length) {
61
+ if (char === "+") {
62
+ state = true;
63
+ lastCode = start = lastCode + parseInt(temp, 36);
64
+ temp = "";
65
+ } else {
66
+ temp += char;
67
+ }
68
+ } else {
69
+ if (!state) {
70
+ lastCode = start = lastCode + parseInt(temp, 36);
71
+ end = start;
72
+ } else {
73
+ end = start + parseInt(temp, 36);
74
+ }
75
+ state = false;
76
+ temp = "";
77
+ lastCode = end;
78
+ for (var j = start; j < end + 1; j += 1) {
79
+ map.set(j, TYPES[type]);
80
+ }
62
81
  }
63
- });
82
+ }
64
83
  }
65
- };
66
- for (var type in DATA) loop(type);
84
+ }
67
85
  }
68
86
  }
69
87
  function getBidiCharType(char) {
@@ -31183,11 +31183,11 @@ export {
31183
31183
  Combobox as C,
31184
31184
  Field as F,
31185
31185
  Input_Input_Input as I,
31186
- RadioGroup_RadioGroup_RadioGroup as R,
31186
+ Radio as R,
31187
31187
  Tooltip as T,
31188
31188
  Fieldset as a,
31189
- Radio as b,
31190
- InfoCircle_default as c,
31189
+ InfoCircle_default as b,
31190
+ RadioGroup_RadioGroup_RadioGroup as c,
31191
31191
  CheckboxGroup_CheckboxGroup_CheckboxGroup as d,
31192
31192
  Checkbox as e
31193
31193
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/editor-react-components",
3
- "version": "1.2744.0",
3
+ "version": "1.2746.0",
4
4
  "description": "React components for the Wix Editor",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -116,7 +116,7 @@
116
116
  "@wix/editor-elements-scripts": "^1.0.0",
117
117
  "@wix/editor-elements-test-utils": "^1.0.0",
118
118
  "@wix/essentials": "^0.1.28",
119
- "@wix/fed-cli-sled": "^1.0.36",
119
+ "@wix/fed-cli-sled": "^1.0.39",
120
120
  "@wix/image": "^1.452.0",
121
121
  "@wix/image-kit": "^1.118.0",
122
122
  "@wix/janet-build": "^1.0.10",
@@ -212,5 +212,5 @@
212
212
  "registry": "https://registry.npmjs.org/",
213
213
  "access": "public"
214
214
  },
215
- "falconPackageHash": "4f3c17b81dea886130892726292456bad773acfa57f1224107598f8e"
215
+ "falconPackageHash": "97231c1620a86fe3ddad4fe2f53b3a0d207595829133ca940810e7d3"
216
216
  }