@wix/editor-react-components 1.2879.0 → 1.2881.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.
@@ -2,6 +2,7 @@
2
2
  box-sizing: border-box;
3
3
  display: flex;
4
4
  align-items: center;
5
+ min-width: min-content !important;
5
6
  max-width: 100%;
6
7
  }
7
8
 
@@ -78,6 +79,9 @@
78
79
  .label__Y3ciV {
79
80
  cursor: pointer;
80
81
  margin-bottom: 0;
82
+ flex: 1;
83
+ min-width: 0;
84
+ overflow-wrap: anywhere;
81
85
  }
82
86
  .label__Y3ciV[data-disabled] {
83
87
  cursor: default;
@@ -85,12 +89,7 @@
85
89
 
86
90
  .errorMessage__PtMqM {
87
91
  contain: inline-size;
88
- display: -webkit-box;
89
- -webkit-box-orient: vertical;
90
- -webkit-line-clamp: 2;
91
- max-height: 2lh;
92
- overflow: hidden;
93
- text-overflow: ellipsis;
92
+ overflow-wrap: anywhere;
94
93
  }
95
94
  .errorMessage__PtMqM svg {
96
95
  display: none;
@@ -17,15 +17,13 @@
17
17
  .label__YTX1z,
18
18
  .helperText__CKn-5,
19
19
  .errorMessage__b9Pp3 {
20
- display: -webkit-box;
21
- -webkit-box-orient: vertical;
22
- -webkit-line-clamp: 2;
23
- line-clamp: 2;
24
- overflow: hidden;
25
20
  min-width: 0;
26
21
  max-width: 100%;
27
- overflow-wrap: break-word;
28
- word-break: break-word;
22
+ overflow-wrap: anywhere;
23
+ }
24
+
25
+ .errorMessage__b9Pp3 {
26
+ display: block;
29
27
  }
30
28
 
31
29
  .group__2UIvk {
@@ -1,3 +1,3 @@
1
1
  import { default as React } from 'react';
2
2
  import { DropdownProps } from './Dropdown.types';
3
- export default function Dropdown({ a11y, className, direction, disabled, elementProps, errorMessage, helperText, id, label, onValueChange, options, placeholder, previewError, previewList, readOnly, value, wix, ...rest }: DropdownProps): React.JSX.Element;
3
+ export default function Dropdown({ className, direction, disabled, elementProps, errorMessage, helperText, id, label, onValueChange, options, placeholder, previewError, previewList, readOnly, value, wix, ...rest }: DropdownProps): React.JSX.Element;
@@ -1,4 +1,4 @@
1
- import { A11y, Direction } from '@wix/editor-react-types';
1
+ import { Direction } from '@wix/editor-react-types';
2
2
  export type DropdownOption = {
3
3
  /** Text shown to the visitor in the list. */
4
4
  label: string;
@@ -57,8 +57,6 @@ export type DropdownProps = {
57
57
  previewError?: boolean;
58
58
  /** Writing direction applied to the root. */
59
59
  direction?: Direction;
60
- /** Accessibility attributes. `ariaLabel` labels the dropdown for assistive tech. */
61
- a11y?: A11y;
62
60
  /** Per-element className overrides. Keys match the manifest element keys. */
63
61
  elementProps?: DropdownElementProps;
64
62
  /** Platform-provided props. */
@@ -8,7 +8,6 @@ import { T as TranslationsDefinition } from "../chunks/index5.js";
8
8
  import { a as getDataAttributes } from "../chunks/dataUtils.js";
9
9
  import { d as directionStyles } from "../chunks/direction.module.js";
10
10
  import { p as presetWrapperStyles } from "../chunks/presetWrapper.module.js";
11
- import { a as accessibilityStyles } from "../chunks/accessibility.module.js";
12
11
  import { A as AriaLabels, T as TestIds, e as editorElementClassNames, D as DesignStates } from "../chunks/constants36.js";
13
12
  const root = "root__WnTks";
14
13
  const input = "input__pbp9w";
@@ -43,7 +42,6 @@ const styles = {
43
42
  const itemToStringLabel = (item) => (item == null ? void 0 : item.label) ?? "";
44
43
  const itemToStringValue = (item) => (item == null ? void 0 : item.value) ?? "";
45
44
  function Dropdown({
46
- a11y,
47
45
  className,
48
46
  direction,
49
47
  disabled,
@@ -76,15 +74,14 @@ function Dropdown({
76
74
  const inErrorState = hasError || Boolean(previewError);
77
75
  const { language } = useCurrentLanguage();
78
76
  const { translate } = useService(TranslationsDefinition);
79
- const ariaLabel = (a11y == null ? void 0 : a11y.ariaLabel) || (label2 ? void 0 : translate("ariaLabels")(
77
+ const ariaLabel = label2 ? void 0 : translate("ariaLabels")(
80
78
  AriaLabels.root.legacyKey,
81
79
  AriaLabels.root.default
82
- ));
80
+ );
83
81
  const comboboxId = `${id}-combobox`;
84
82
  const helperTextId = helperText2 ? `${id}-helper-text` : void 0;
85
83
  const errorMessageId = inErrorState ? `${id}-error-message` : void 0;
86
84
  const describedBy = [helperTextId, errorMessageId].filter(Boolean).join(" ") || void 0;
87
- const accessibleNameId = label2 && ariaLabel ? `${id}-accessible-name` : void 0;
88
85
  return /* @__PURE__ */ jsx(
89
86
  "div",
90
87
  {
@@ -120,14 +117,6 @@ function Dropdown({
120
117
  readOnly,
121
118
  value: selectedOption ?? null,
122
119
  children: [
123
- accessibleNameId && /* @__PURE__ */ jsx(
124
- "span",
125
- {
126
- id: accessibleNameId,
127
- className: accessibilityStyles.visuallyHidden,
128
- children: ariaLabel
129
- }
130
- ),
131
120
  label2 && /* @__PURE__ */ jsx(
132
121
  Combobox.Label,
133
122
  {
@@ -143,7 +132,6 @@ function Dropdown({
143
132
  /* @__PURE__ */ jsxs(
144
133
  Combobox.Trigger,
145
134
  {
146
- ...accessibleNameId ? { "aria-labelledby": accessibleNameId } : {},
147
135
  "aria-describedby": describedBy,
148
136
  "aria-haspopup": "listbox",
149
137
  "aria-invalid": inErrorState || void 0,
@@ -190,8 +178,8 @@ function Dropdown({
190
178
  children: /* @__PURE__ */ jsx(
191
179
  Combobox.List,
192
180
  {
193
- "aria-label": label2 ? void 0 : ariaLabel,
194
- "aria-labelledby": accessibleNameId ?? (label2 ? `${comboboxId}-label` : void 0),
181
+ "aria-label": ariaLabel,
182
+ "aria-labelledby": label2 ? `${comboboxId}-label` : void 0,
195
183
  className: styles.list,
196
184
  children: options == null ? void 0 : options.map((option2, index) => {
197
185
  var _a2;
@@ -1,4 +1,4 @@
1
- export declare const COMPONENT_TYPE = "wixEditorElements.Dropdown__DEV__v5";
1
+ export declare const COMPONENT_TYPE = "wixEditorElements.Dropdown__DEV__v6";
2
2
  export declare const DesignStates: {
3
3
  readonly input: {
4
4
  readonly hover: {
@@ -54,12 +54,7 @@
54
54
  min-width: 100px;
55
55
  min-height: 1lh;
56
56
  contain: inline-size;
57
- display: -webkit-box;
58
- -webkit-box-orient: vertical;
59
- -webkit-line-clamp: 2;
60
- max-height: 2lh;
61
- overflow: hidden;
62
- text-overflow: ellipsis;
57
+ overflow-wrap: anywhere;
63
58
  color: inherit;
64
59
  font: inherit;
65
60
  }
@@ -72,35 +67,16 @@
72
67
 
73
68
  .errorMessage__iMuAa {
74
69
  contain: inline-size;
75
- display: -webkit-box;
76
- -webkit-box-orient: vertical;
77
- -webkit-line-clamp: 2;
78
- max-height: 2lh;
79
- overflow: hidden;
80
- text-overflow: ellipsis;
70
+ overflow-wrap: anywhere;
81
71
  }
82
72
  .errorMessage__iMuAa svg {
83
73
  display: none;
84
74
  }
85
75
 
86
- .label__Q7fZH {
87
- contain: inline-size;
88
- display: -webkit-box;
89
- -webkit-box-orient: vertical;
90
- -webkit-line-clamp: 2;
91
- max-height: 2lh;
92
- overflow: hidden;
93
- text-overflow: ellipsis;
94
- }
95
-
76
+ .label__Q7fZH,
96
77
  .helperText__M9s0b {
97
78
  contain: inline-size;
98
- display: -webkit-box;
99
- -webkit-box-orient: vertical;
100
- -webkit-line-clamp: 2;
101
- max-height: 2lh;
102
- overflow: hidden;
103
- text-overflow: ellipsis;
79
+ overflow-wrap: anywhere;
104
80
  }
105
81
 
106
82
  .positioner__YS--m {
@@ -151,15 +127,4 @@
151
127
  }
152
128
  .presetWrapper__J1yzj {
153
129
  display: contents;
154
- }
155
- .visuallyHidden__Md84p {
156
- position: absolute;
157
- width: 1px;
158
- height: 1px;
159
- padding: 0;
160
- margin: -1px;
161
- overflow: hidden;
162
- clip-path: inset(50%);
163
- white-space: nowrap;
164
- border: 0;
165
130
  }
@@ -3,7 +3,7 @@ import { a as DisplayNames, F as FunctionalStateKeys, e as editorElementClassNam
3
3
  import { T as TEXT_PROP_STATIC_VALUE_MAX_LENGTH } from "../chunks/manifest.js";
4
4
  const basePresetName = "baseDropdown";
5
5
  const manifest = {
6
- id: "d46302be-0629-45c8-bdf3-cdb14c6457c8",
6
+ id: "550ebc8b-39bc-4b95-a76e-57d3b0350a0e",
7
7
  type: COMPONENT_TYPE,
8
8
  description: "A single-select dropdown input. Visitors pick a value from a list of options. Options can be set statically or fed dynamically by a connected data source.",
9
9
  installation: {
@@ -493,12 +493,6 @@ const manifest = {
493
493
  maxLength: TEXT_PROP_STATIC_VALUE_MAX_LENGTH
494
494
  }
495
495
  },
496
- a11y: {
497
- dataType: DATA.DATA_TYPE.a11y,
498
- [DATA.DATA_TYPE.a11y]: {
499
- attributes: [DATA.A11Y_ATTRIBUTES.ariaLabel]
500
- }
501
- },
502
496
  direction: {
503
497
  dataType: DATA.DATA_TYPE.direction
504
498
  },
@@ -28,14 +28,9 @@
28
28
  .root__zQlRz .label__mbGIM,
29
29
  .root__zQlRz .helperText__SfMAH,
30
30
  .root__zQlRz .errorMessage__4XDzv {
31
+ display: block;
31
32
  contain: inline-size;
32
- display: -webkit-box;
33
- -webkit-box-orient: vertical;
34
- -webkit-line-clamp: 2;
35
- max-height: 2lh;
36
33
  overflow-wrap: anywhere;
37
- overflow: hidden;
38
- text-overflow: ellipsis;
39
34
  }
40
35
  .root__zQlRz .helperText__SfMAH,
41
36
  .root__zQlRz .errorMessage__4XDzv {
@@ -15,15 +15,9 @@
15
15
  .label__THO5j,
16
16
  .description__ePprf,
17
17
  .errorMessage__zxbOJ {
18
- display: -webkit-box;
19
- -webkit-box-orient: vertical;
20
- -webkit-line-clamp: 2;
21
- line-clamp: 2;
22
- overflow: hidden;
23
18
  min-width: 0;
24
19
  max-width: 100%;
25
- overflow-wrap: break-word;
26
- word-break: break-word;
20
+ overflow-wrap: anywhere;
27
21
  }
28
22
 
29
23
  .group__6HZy7 {
@@ -1,4 +1,4 @@
1
- const COMPONENT_TYPE = "wixEditorElements.Dropdown__DEV__v5";
1
+ const COMPONENT_TYPE = "wixEditorElements.Dropdown__DEV__v6";
2
2
  const DesignStates = {
3
3
  input: {
4
4
  hover: { displayName: "Hover", className: "dropdown__input--hover" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/editor-react-components",
3
- "version": "1.2879.0",
3
+ "version": "1.2881.0",
4
4
  "description": "React components for the Wix Editor",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -228,5 +228,5 @@
228
228
  "registry": "https://registry.npmjs.org/",
229
229
  "access": "public"
230
230
  },
231
- "falconPackageHash": "cd4e2a330a5709ad9c1a6676f8ca0596c33ee02ba8077946768853cf"
231
+ "falconPackageHash": "87da3c56182c06972a6d33b9b8a2bc03db27afa643486a0707e0f6c5"
232
232
  }