@wix/editor-react-components 1.2765.0 → 1.2767.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.
Files changed (36) hide show
  1. package/dist/site/components/AccordionComponent/component.js +80 -3
  2. package/dist/site/components/AudioPlayer/manifest.js +1 -1
  3. package/dist/site/components/Checkbox/component.js +1 -2
  4. package/dist/site/components/CheckboxGroup/component.js +1 -2
  5. package/dist/site/components/DatePicker/component.js +2 -4
  6. package/dist/site/components/Dropdown/Dropdown.d.ts +1 -1
  7. package/dist/site/components/Dropdown/Dropdown.types.d.ts +22 -89
  8. package/dist/site/components/Dropdown/component.js +205 -873
  9. package/dist/site/components/Dropdown/constants.d.ts +26 -168
  10. package/dist/site/components/Dropdown/css.css +52 -462
  11. package/dist/site/components/Dropdown/manifest.js +338 -441
  12. package/dist/site/components/Line/manifest.js +39 -3
  13. package/dist/site/components/RadioButtons/component.js +1 -2
  14. package/dist/site/components/TextBox/component.js +1 -2
  15. package/dist/site/components/TimePicker/component.js +2 -4
  16. package/dist/site/components/chunks/DismissSmall.js +7727 -1
  17. package/dist/site/components/chunks/RequiredIndicator.js +4 -0
  18. package/dist/site/components/chunks/constants36.js +31 -148
  19. package/dist/site/components/chunks/index11.js +0 -66
  20. package/dist/site/components/chunks/isObjectLike.js +15 -5
  21. package/dist/site/components/chunks/manifestSdkMixins.js +1 -14
  22. package/dist/site/components/chunks/types.impl.js +26 -1
  23. package/package.json +3 -3
  24. package/dist/site/components/Dropdown/component.preview.d.ts +0 -9
  25. package/dist/site/components/Dropdown/components/DropdownChips.d.ts +0 -8
  26. package/dist/site/components/Dropdown/components/DropdownList.d.ts +0 -20
  27. package/dist/site/components/Dropdown/components/DropdownTrigger.d.ts +0 -22
  28. package/dist/site/components/Dropdown/dropdownUtils.d.ts +0 -22
  29. package/dist/site/components/Dropdown/hooks/useChipOverflow.d.ts +0 -9
  30. package/dist/site/components/Dropdown/hooks/useDropdownQuery.d.ts +0 -15
  31. package/dist/site/components/Dropdown/hooks/useDropdownSelection.d.ts +0 -16
  32. package/dist/site/components/chunks/InfoCircleSmall.js +0 -7
  33. package/dist/site/components/chunks/Tooltip.js +0 -7728
  34. package/dist/site/components/chunks/_baseSlice.js +0 -43
  35. package/dist/site/components/chunks/isArray.js +0 -12
  36. package/dist/site/components/chunks/isArrayLike.js +0 -88
@@ -1,14 +1,17 @@
1
- import { C as CSS_PROPERTIES, b as DISPLAY_GROUPS, D as DATA, N as NativeStateType, E as ELEMENTS, a as ACTIONS, L as LAYOUT, A as Archetype } from "../chunks/chunk-EVX7ZUBD.js";
2
- import { D as DesignStates, f as DisplayNames, d as defaultValues, F as FunctionalStateKeys, s as selectors } from "../chunks/constants36.js";
3
- import { w as withSpec, g as getSelector } from "../chunks/manifest.js";
1
+ import { b as DISPLAY_GROUPS, D as DATA, E as ELEMENTS, N as NativeStateType, C as CSS_PROPERTIES, a as ACTIONS, L as LAYOUT, A as Archetype } from "../chunks/chunk-EVX7ZUBD.js";
2
+ import { D as DesignStates, a as DisplayNames, b as TEXT_PROP_STATIC_VALUE_MAX_LENGTH, F as FunctionalStateKeys, e as editorElementClassNames } from "../chunks/constants36.js";
3
+ import { w as withSpec } from "../chunks/manifest.js";
4
4
  import { I as IS_SUPPORT_DESIGN_STATE_SPEC } from "../chunks/specs.js";
5
- import { m as manifestFocusable, e as manifestInputable, a as manifestChangeable } from "../chunks/manifestSdkMixins.js";
6
- import { m as manifestValidation } from "../chunks/manifest2.js";
5
+ const basePresetName = "baseDropdown";
7
6
  const manifest = {
8
- id: "f49b3649-fff3-42b4-8e18-a3cd2b23c2ec",
9
- type: "wixEditorElements.Dropdown__DEV__v4",
10
- description: "A single-select dropdown input. Visitors pick a value from a list of options (and can clear it when enabled). Options can be set statically or fed dynamically by a connected data source. Turn on search to filter a long list.",
7
+ id: "d46302be-0629-45c8-bdf3-cdb14c6457c8",
8
+ type: "wixEditorElements.Dropdown__DEV__v5",
9
+ 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.",
11
10
  installation: {
11
+ presets: {
12
+ small: basePresetName,
13
+ large: basePresetName
14
+ },
12
15
  initialSize: {
13
16
  width: {
14
17
  sizingType: LAYOUT.SIZING_TYPE.pixels,
@@ -20,12 +23,124 @@ const manifest = {
20
23
  }
21
24
  },
22
25
  editorElement: {
23
- selector: getSelector(selectors.root),
26
+ selector: `.${editorElementClassNames.root}`,
24
27
  displayName: DisplayNames.root.elementDisplayName,
25
28
  archetype: Archetype.Dropdown,
29
+ // Bare component (no baked-in visual look) — per
30
+ // https://wix.slack.com/archives/C088A26Q8TC/p1791288610605529. The
31
+ // preset CSS file is what actually renders; `presetDefaults` only
32
+ // pre-fills the panel (see AGENTS.md).
33
+ presets: {
34
+ [basePresetName]: {
35
+ presetCssUrl: `./site/components/Dropdown/presets/${basePresetName}.css`,
36
+ displayName: DisplayNames.root.presets.baseDropdown,
37
+ presetDefaults: {
38
+ elements: {
39
+ label: {
40
+ cssProperties: {
41
+ marginBottom: { defaultValue: "0px" },
42
+ textAlign: { defaultValue: "start" },
43
+ font: {
44
+ defaultValue: "normal normal 400 16px/1.3em 'Wix Madefor Text', sans-serif"
45
+ },
46
+ color: { defaultValue: "rgba(0, 0, 0, 1)" }
47
+ }
48
+ },
49
+ input: {
50
+ cssProperties: {
51
+ textAlign: { defaultValue: "start" },
52
+ font: {
53
+ defaultValue: "normal normal 400 16px/1.3em 'Wix Madefor Text', sans-serif"
54
+ },
55
+ color: { defaultValue: "rgba(0, 0, 0, 1)" },
56
+ borderStartStartRadius: { defaultValue: "0px" },
57
+ borderStartEndRadius: { defaultValue: "0px" },
58
+ borderEndStartRadius: { defaultValue: "0px" },
59
+ borderEndEndRadius: { defaultValue: "0px" },
60
+ paddingTop: { defaultValue: "0px" },
61
+ paddingBottom: { defaultValue: "0px" },
62
+ paddingInlineStart: { defaultValue: "0px" },
63
+ paddingInlineEnd: { defaultValue: "0px" },
64
+ // Kept (not a "look" default), like List's: a non-transparent
65
+ // backdrop so the Input stays legible over whatever sits
66
+ // behind it on the page.
67
+ background: { defaultValue: "#ffffff" },
68
+ boxShadow: { defaultValue: "none" },
69
+ // The one kept visual default: a solid 1px black border, so
70
+ // the Input's clickable area stays visible/usable before any
71
+ // template is applied.
72
+ border: { defaultValue: "1px solid rgba(0, 0, 0, 1)" }
73
+ },
74
+ cssCustomProperties: {
75
+ placeholderColor: { defaultValue: "rgba(0, 0, 0, 1)" }
76
+ }
77
+ },
78
+ list: {
79
+ cssProperties: {
80
+ // Kept (not a "look" default): a floating popup needs a
81
+ // non-transparent backdrop to stay legible at all.
82
+ background: { defaultValue: "#ffffff" },
83
+ // The other half of the kept 1px black border.
84
+ border: { defaultValue: "1px solid rgba(0, 0, 0, 1)" },
85
+ borderStartStartRadius: { defaultValue: "0px" },
86
+ borderStartEndRadius: { defaultValue: "0px" },
87
+ borderEndStartRadius: { defaultValue: "0px" },
88
+ borderEndEndRadius: { defaultValue: "0px" },
89
+ paddingTop: { defaultValue: "0px" },
90
+ paddingBottom: { defaultValue: "0px" },
91
+ paddingInlineStart: { defaultValue: "0px" },
92
+ paddingInlineEnd: { defaultValue: "0px" }
93
+ },
94
+ cssCustomProperties: {
95
+ optionsGap: { defaultValue: "0px" }
96
+ }
97
+ },
98
+ option: {
99
+ cssProperties: {
100
+ textAlign: { defaultValue: "start" },
101
+ font: {
102
+ defaultValue: "normal normal 400 16px/1.3em 'Wix Madefor Text', sans-serif"
103
+ },
104
+ color: { defaultValue: "rgba(0, 0, 0, 1)" },
105
+ paddingTop: { defaultValue: "0px" },
106
+ paddingBottom: { defaultValue: "0px" },
107
+ paddingInlineStart: { defaultValue: "0px" },
108
+ paddingInlineEnd: { defaultValue: "0px" },
109
+ background: { defaultValue: "transparent" },
110
+ border: { defaultValue: "0px solid transparent" },
111
+ borderStartStartRadius: { defaultValue: "0px" },
112
+ borderStartEndRadius: { defaultValue: "0px" },
113
+ borderEndStartRadius: { defaultValue: "0px" },
114
+ borderEndEndRadius: { defaultValue: "0px" }
115
+ }
116
+ },
117
+ helperText: {
118
+ cssProperties: {
119
+ marginTop: { defaultValue: "0px" },
120
+ textAlign: { defaultValue: "start" },
121
+ font: {
122
+ defaultValue: "normal normal 400 14px/1.3em 'Wix Madefor Text', sans-serif"
123
+ },
124
+ color: { defaultValue: "rgba(0, 0, 0, 1)" }
125
+ }
126
+ },
127
+ errorMessage: {
128
+ cssProperties: {
129
+ marginTop: { defaultValue: "0px" },
130
+ textAlign: { defaultValue: "start" },
131
+ font: {
132
+ defaultValue: "normal normal 400 14px/1.3em 'Wix Madefor Text', sans-serif"
133
+ },
134
+ color: { defaultValue: "rgba(0, 0, 0, 1)" }
135
+ }
136
+ }
137
+ }
138
+ }
139
+ }
140
+ },
26
141
  layout: {
27
- resizeDirection: LAYOUT.RESIZE_DIRECTION.horizontalAndVertical,
28
- contentResizeDirection: LAYOUT.CONTENT_RESIZE_DIRECTION.vertical,
142
+ resizeDirection: LAYOUT.RESIZE_DIRECTION.horizontal,
143
+ contentResizeDirection: LAYOUT.CONTENT_RESIZE_DIRECTION.horizontalAndVertical,
29
144
  disableStretching: true,
30
145
  disablePositioning: false
31
146
  },
@@ -40,36 +155,21 @@ const manifest = {
40
155
  }
41
156
  }
42
157
  },
43
- // Design states (gated behind the design-states spec so they stay inert in
44
- // prod until the experiment is declared). BEM classNames: `<block>--<state>`.
158
+ // Display-less functional states: force parts visible while they're being
159
+ // designed (referenced by the list/option/errorMessage elements' visibleState).
45
160
  states: {
46
- hover: withSpec({
47
- spec: IS_SUPPORT_DESIGN_STATE_SPEC,
48
- displayName: DesignStates.root.hover.displayName,
49
- className: DesignStates.root.hover.className,
50
- pseudoClass: NativeStateType.hover
51
- }),
52
- disabled: withSpec({
53
- spec: IS_SUPPORT_DESIGN_STATE_SPEC,
54
- displayName: DesignStates.root.disabled.displayName,
55
- className: DesignStates.root.disabled.className,
56
- pseudoClass: NativeStateType.disabled,
57
- props: { isDisabled: true }
58
- }),
59
- // Display-less functional states: force hidden parts visible while their
60
- // element is designed (referenced by the elements' visibleState).
61
161
  [FunctionalStateKeys.previewList]: {
62
162
  props: { previewList: true }
63
163
  },
64
- [FunctionalStateKeys.previewChips]: {
65
- props: { previewChips: true }
164
+ [FunctionalStateKeys.previewError]: {
165
+ props: { previewError: true }
66
166
  }
67
167
  },
68
168
  displayFilters: {
69
169
  states: {
70
170
  hide: [
71
171
  FunctionalStateKeys.previewList,
72
- FunctionalStateKeys.previewChips
172
+ FunctionalStateKeys.previewError
73
173
  ]
74
174
  }
75
175
  },
@@ -78,21 +178,21 @@ const manifest = {
78
178
  elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
79
179
  inlineElement: {
80
180
  displayName: DisplayNames.root.elements.label,
81
- selector: getSelector(selectors.label),
181
+ selector: `.${editorElementClassNames.label}`,
82
182
  behaviors: {
83
183
  selectable: false,
84
184
  removable: false
85
185
  },
86
- cssCustomProperties: {
87
- labelFont: {
88
- cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.font,
89
- displayName: DisplayNames.root.cssCustomProperties.labelFont,
90
- defaultValue: "normal normal normal 14px/1.4em madefor-text, helveticaneuew01-45ligh, helveticaneuew02-45ligh, helveticaneuew10-45ligh, sans-serif"
91
- },
92
- labelColor: {
93
- cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color,
94
- displayName: DisplayNames.root.cssCustomProperties.labelColor
95
- }
186
+ // `font`/`color`/`textDecorationLine`/`textTransform` are bare so
187
+ // the panel renders one merged "Typography" control — richer than
188
+ // cssCustomProperties or a `text` displayGroup.
189
+ cssProperties: {
190
+ marginBottom: {},
191
+ textAlign: {},
192
+ font: {},
193
+ color: {},
194
+ textDecorationLine: {},
195
+ textTransform: {}
96
196
  }
97
197
  }
98
198
  },
@@ -100,25 +200,58 @@ const manifest = {
100
200
  elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
101
201
  inlineElement: {
102
202
  displayName: DisplayNames.root.elements.input,
103
- selector: getSelector(selectors.input),
203
+ selector: `.${editorElementClassNames.input}`,
104
204
  behaviors: {
105
205
  selectable: false,
106
206
  removable: false
107
207
  },
108
- // Same var names as the root's — element-scoped overrides.
208
+ // `font`/`color`/`textDecorationLine`/`textTransform` are bare so
209
+ // the panel renders one merged "Typography" control (see Label's
210
+ // comment). background/boxShadow/border are bare too — per-state
211
+ // customization works the same as with cssCustomProperties.
212
+ // `border` is a shorthand (the panel still exposes color/width/
213
+ // style individually); no `borderGroup`/`backgroundGroup`, since
214
+ // those display groups only validate against cssCustomProperties,
215
+ // not bare properties (confirmed via a real enrichment SPI
216
+ // rejection, error 15113). Corners/padding stay 4 separate logical
217
+ // properties each (not a `borderRadius`/`padding` shorthand): those
218
+ // shorthands are physical-only, so an asymmetric value would land
219
+ // on the wrong corner/side under RTL.
220
+ cssProperties: {
221
+ textAlign: {},
222
+ font: {},
223
+ color: {},
224
+ textDecorationLine: {},
225
+ textTransform: {},
226
+ borderStartStartRadius: {},
227
+ borderStartEndRadius: {},
228
+ borderEndStartRadius: {},
229
+ borderEndEndRadius: {},
230
+ paddingTop: {},
231
+ paddingBottom: {},
232
+ paddingInlineStart: {},
233
+ paddingInlineEnd: {},
234
+ background: {},
235
+ boxShadow: {},
236
+ border: {}
237
+ },
238
+ displayGroups: {
239
+ // placeholderColor renders through the same Typography-style
240
+ // control as Input's own text, instead of a standalone swatch
241
+ // (matches Tabs' menu-item text pattern).
242
+ placeholderGroup: {
243
+ displayName: "Placeholder",
244
+ groupType: DISPLAY_GROUPS.GROUP_TYPE.text,
245
+ [DISPLAY_GROUPS.GROUP_TYPE.text]: {
246
+ color: "placeholderColor"
247
+ }
248
+ }
249
+ },
250
+ // No defaultValue here — every default lives in the preset above.
251
+ // `placeholderColor` has no literal CSS property of its own (it
252
+ // targets the placeholder span, not Input's own text color), so
253
+ // it stays a cssCustomProperty.
109
254
  cssCustomProperties: {
110
- backgroundColor: {
111
- cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.backgroundColor,
112
- displayName: DisplayNames.root.cssCustomProperties.backgroundColor
113
- },
114
- borderColor: {
115
- cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.borderColor,
116
- displayName: DisplayNames.root.cssCustomProperties.borderColor
117
- },
118
- textColor: {
119
- cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color,
120
- displayName: DisplayNames.root.cssCustomProperties.textColor
121
- },
122
255
  placeholderColor: {
123
256
  cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color,
124
257
  displayName: DisplayNames.root.cssCustomProperties.placeholderColor
@@ -137,74 +270,22 @@ const manifest = {
137
270
  className: DesignStates.input.focus.className,
138
271
  pseudoClass: NativeStateType.focus
139
272
  }),
273
+ // No native pseudo-class exists for "invalid" (Base UI's
274
+ // Combobox.Trigger doesn't render as a real `<input>`) — this
275
+ // state's export is scoped to this `className` instead, so
276
+ // Dropdown.tsx applies it for real whenever `inErrorState` is true
277
+ // (not just during design preview), same as Option's `selected`.
278
+ error: withSpec({
279
+ spec: IS_SUPPORT_DESIGN_STATE_SPEC,
280
+ displayName: DesignStates.input.error.displayName,
281
+ className: DesignStates.input.error.className
282
+ }),
140
283
  disabled: withSpec({
141
284
  spec: IS_SUPPORT_DESIGN_STATE_SPEC,
142
285
  displayName: DesignStates.input.disabled.displayName,
143
286
  className: DesignStates.input.disabled.className,
144
287
  pseudoClass: NativeStateType.disabled,
145
- props: { isDisabled: true }
146
- })
147
- }
148
- }
149
- },
150
- trigger: {
151
- elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
152
- inlineElement: {
153
- displayName: DisplayNames.root.elements.trigger,
154
- selector: getSelector(selectors.trigger),
155
- behaviors: {
156
- selectable: false,
157
- removable: false
158
- },
159
- cssCustomProperties: {
160
- backgroundColor: {
161
- cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.backgroundColor,
162
- displayName: DisplayNames.root.cssCustomProperties.backgroundColor
163
- },
164
- borderColor: {
165
- cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.borderColor,
166
- displayName: DisplayNames.root.cssCustomProperties.borderColor
167
- },
168
- textColor: {
169
- cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color,
170
- displayName: DisplayNames.root.cssCustomProperties.textColor
171
- }
172
- },
173
- states: {
174
- hover: withSpec({
175
- spec: IS_SUPPORT_DESIGN_STATE_SPEC,
176
- displayName: DesignStates.trigger.hover.displayName,
177
- className: DesignStates.trigger.hover.className,
178
- pseudoClass: NativeStateType.hover
179
- }),
180
- selected: withSpec({
181
- spec: IS_SUPPORT_DESIGN_STATE_SPEC,
182
- displayName: DesignStates.trigger.selected.displayName,
183
- className: DesignStates.trigger.selected.className
184
- })
185
- }
186
- }
187
- },
188
- clearButton: {
189
- elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
190
- inlineElement: {
191
- displayName: DisplayNames.root.elements.clearButton,
192
- selector: getSelector(selectors.clear),
193
- behaviors: {
194
- selectable: false,
195
- removable: false
196
- },
197
- states: {
198
- hover: withSpec({
199
- spec: IS_SUPPORT_DESIGN_STATE_SPEC,
200
- displayName: DesignStates.clearButton.hover.displayName,
201
- className: DesignStates.clearButton.hover.className,
202
- pseudoClass: NativeStateType.hover
203
- }),
204
- selected: withSpec({
205
- spec: IS_SUPPORT_DESIGN_STATE_SPEC,
206
- displayName: DesignStates.clearButton.selected.displayName,
207
- className: DesignStates.clearButton.selected.className
288
+ props: { disabled: true }
208
289
  })
209
290
  }
210
291
  }
@@ -213,21 +294,34 @@ const manifest = {
213
294
  elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
214
295
  inlineElement: {
215
296
  displayName: DisplayNames.root.elements.list,
216
- selector: getSelector(selectors.list),
297
+ selector: `.${editorElementClassNames.list}`,
217
298
  behaviors: {
218
299
  selectable: false,
219
300
  removable: false
220
301
  },
302
+ // No defaultValue here — every default lives in the preset above.
303
+ // See Input's `cssProperties` comment for why these are bare, why
304
+ // `border` is a shorthand, and why corners/padding aren't.
221
305
  cssProperties: {
222
306
  background: {},
223
- borderTop: {},
224
- borderBottom: {},
225
- borderInlineStart: {},
226
- borderInlineEnd: {},
307
+ border: {},
227
308
  borderStartStartRadius: {},
228
309
  borderStartEndRadius: {},
229
310
  borderEndStartRadius: {},
230
- borderEndEndRadius: {}
311
+ borderEndEndRadius: {},
312
+ paddingTop: {},
313
+ paddingBottom: {},
314
+ paddingInlineStart: {},
315
+ paddingInlineEnd: {}
316
+ },
317
+ // This selector targets the outer popup frame (border/background
318
+ // owner), not the scrollable column the options sit in — a custom
319
+ // property still reaches it, since it inherits down.
320
+ cssCustomProperties: {
321
+ optionsGap: {
322
+ cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.rowGap,
323
+ displayName: DisplayNames.root.cssCustomProperties.optionsGap
324
+ }
231
325
  },
232
326
  visibleState: {
233
327
  stateKey: FunctionalStateKeys.previewList,
@@ -239,20 +333,33 @@ const manifest = {
239
333
  elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
240
334
  inlineElement: {
241
335
  displayName: DisplayNames.root.elements.option,
242
- selector: getSelector(selectors.option),
336
+ selector: `.${editorElementClassNames.option}`,
243
337
  behaviors: {
244
338
  selectable: false,
245
339
  removable: false
246
340
  },
247
- cssCustomProperties: {
248
- optionTextColor: {
249
- cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color,
250
- displayName: DisplayNames.root.cssCustomProperties.optionTextColor
251
- },
252
- optionHoverBackgroundColor: {
253
- cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color,
254
- displayName: DisplayNames.root.cssCustomProperties.optionHoverBackgroundColor
255
- }
341
+ // `font`/`color`/`textDecorationLine`/`textTransform` are bare so
342
+ // the panel renders one merged "Typography" control (see Label's
343
+ // comment). No defaultValue here — every default lives in the
344
+ // preset above.
345
+ cssProperties: {
346
+ textAlign: {},
347
+ font: {},
348
+ color: {},
349
+ textDecorationLine: {},
350
+ textTransform: {},
351
+ // Bare, matching Input/List (including Hover/Selected states
352
+ // below) — see Input's `cssProperties` comment for why.
353
+ background: {},
354
+ border: {},
355
+ borderStartStartRadius: {},
356
+ borderStartEndRadius: {},
357
+ borderEndStartRadius: {},
358
+ borderEndEndRadius: {},
359
+ paddingTop: {},
360
+ paddingBottom: {},
361
+ paddingInlineStart: {},
362
+ paddingInlineEnd: {}
256
363
  },
257
364
  states: {
258
365
  hover: withSpec({
@@ -261,6 +368,10 @@ const manifest = {
261
368
  className: DesignStates.option.hover.className,
262
369
  pseudoClass: NativeStateType.hover
263
370
  }),
371
+ // No native pseudo-class exists for "selected list item" — the
372
+ // panel's export for this state is scoped to this `className`
373
+ // instead, so Dropdown.tsx applies it for real whenever an
374
+ // option is actually selected (not just during design preview).
264
375
  selected: withSpec({
265
376
  spec: IS_SUPPORT_DESIGN_STATE_SPEC,
266
377
  displayName: DesignStates.option.selected.displayName,
@@ -273,40 +384,46 @@ const manifest = {
273
384
  }
274
385
  }
275
386
  },
276
- chip: {
387
+ helperText: {
277
388
  elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
278
389
  inlineElement: {
279
- displayName: DisplayNames.root.elements.chip,
280
- selector: getSelector(selectors.chip),
390
+ displayName: DisplayNames.root.elements.helperText,
391
+ selector: `.${editorElementClassNames.helperText}`,
281
392
  behaviors: {
282
393
  selectable: false,
283
394
  removable: false
284
395
  },
285
- cssCustomProperties: {
286
- chipBackgroundColor: {
287
- cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color,
288
- displayName: DisplayNames.root.cssCustomProperties.chipBackgroundColor
289
- },
290
- chipTextColor: {
291
- cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color,
292
- displayName: DisplayNames.root.cssCustomProperties.chipTextColor
293
- }
396
+ // No defaultValue here — every default lives in the preset above.
397
+ cssProperties: {
398
+ marginTop: {},
399
+ textAlign: {},
400
+ font: {},
401
+ color: {},
402
+ textDecorationLine: {},
403
+ textTransform: {}
404
+ }
405
+ }
406
+ },
407
+ errorMessage: {
408
+ elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
409
+ inlineElement: {
410
+ displayName: DisplayNames.root.elements.errorMessage,
411
+ selector: `.${editorElementClassNames.errorMessage}`,
412
+ behaviors: {
413
+ selectable: false,
414
+ removable: false
294
415
  },
295
- states: {
296
- hover: withSpec({
297
- spec: IS_SUPPORT_DESIGN_STATE_SPEC,
298
- displayName: DesignStates.chip.hover.displayName,
299
- className: DesignStates.chip.hover.className,
300
- pseudoClass: NativeStateType.hover
301
- }),
302
- selected: withSpec({
303
- spec: IS_SUPPORT_DESIGN_STATE_SPEC,
304
- displayName: DesignStates.chip.selected.displayName,
305
- className: DesignStates.chip.selected.className
306
- })
416
+ // No defaultValue here — every default lives in the preset above.
417
+ cssProperties: {
418
+ marginTop: {},
419
+ textAlign: {},
420
+ font: {},
421
+ color: {},
422
+ textDecorationLine: {},
423
+ textTransform: {}
307
424
  },
308
425
  visibleState: {
309
- stateKey: FunctionalStateKeys.previewChips,
426
+ stateKey: FunctionalStateKeys.previewError,
310
427
  elementPath: ".root"
311
428
  }
312
429
  }
@@ -321,159 +438,67 @@ const manifest = {
321
438
  items: {
322
439
  label: {
323
440
  dataType: DATA.DATA_TYPE.text,
324
- displayName: DisplayNames.root.data.optionLabel
441
+ displayName: DisplayNames.root.data.optionLabel,
442
+ [DATA.DATA_TYPE.text]: {
443
+ maxLength: TEXT_PROP_STATIC_VALUE_MAX_LENGTH
444
+ }
325
445
  },
326
446
  value: {
327
447
  dataType: DATA.DATA_TYPE.text,
328
- displayName: DisplayNames.root.data.optionValue
448
+ displayName: DisplayNames.root.data.optionValue,
449
+ [DATA.DATA_TYPE.text]: {
450
+ maxLength: TEXT_PROP_STATIC_VALUE_MAX_LENGTH
451
+ }
329
452
  }
330
453
  }
331
454
  }
332
455
  }
333
456
  },
334
- // Single-select selection (shown when `multiple` is off — see preview).
335
457
  value: {
336
458
  dataType: DATA.DATA_TYPE.text,
337
- displayName: DisplayNames.root.data.value
338
- },
339
- // Multi-select selection (shown when `multiple` is on). A separate field
340
- // because a data field's schema is fixed — it can't switch text↔arrayItems.
341
- values: {
342
- dataType: DATA.DATA_TYPE.arrayItems,
343
- displayName: DisplayNames.root.data.values,
344
- [DATA.DATA_TYPE.arrayItems]: {
345
- dataItem: {
346
- dataType: DATA.DATA_TYPE.text,
347
- displayName: DisplayNames.root.data.optionValue
348
- }
459
+ displayName: DisplayNames.root.data.value,
460
+ description: DisplayNames.root.descriptions.value,
461
+ [DATA.DATA_TYPE.text]: {
462
+ maxLength: TEXT_PROP_STATIC_VALUE_MAX_LENGTH
349
463
  }
350
464
  },
351
- // Uncontrolled counterparts of value/values, used only when the
352
- // controlled field isn't bound.
353
- defaultValue: {
354
- dataType: DATA.DATA_TYPE.text,
355
- displayName: DisplayNames.root.data.defaultValue
356
- },
357
- defaultValues: {
358
- dataType: DATA.DATA_TYPE.arrayItems,
359
- displayName: DisplayNames.root.data.defaultValues,
360
- [DATA.DATA_TYPE.arrayItems]: {
361
- dataItem: {
362
- dataType: DATA.DATA_TYPE.text,
363
- displayName: DisplayNames.root.data.optionValue
364
- }
365
- }
366
- },
367
- inputValue: {
368
- dataType: DATA.DATA_TYPE.text,
369
- displayName: DisplayNames.root.data.inputValue,
370
- defaultValue: defaultValues.inputValue
371
- },
372
- open: {
465
+ disabled: {
373
466
  dataType: DATA.DATA_TYPE.booleanValue,
374
- displayName: DisplayNames.root.data.open,
375
- defaultValue: defaultValues.open
376
- },
377
- isDisabled: {
378
- dataType: DATA.DATA_TYPE.booleanValue,
379
- displayName: DisplayNames.root.data.isDisabled,
380
- defaultValue: defaultValues.isDisabled
381
- },
382
- filter: {
383
- dataType: DATA.DATA_TYPE.function,
384
- [DATA.DATA_TYPE.function]: {}
467
+ displayName: DisplayNames.root.data.disabled
385
468
  },
386
469
  label: {
387
470
  dataType: DATA.DATA_TYPE.text,
388
471
  displayName: DisplayNames.root.data.label,
389
- defaultValue: defaultValues.label
472
+ [DATA.DATA_TYPE.text]: {
473
+ maxLength: TEXT_PROP_STATIC_VALUE_MAX_LENGTH
474
+ }
390
475
  },
391
476
  placeholder: {
392
477
  dataType: DATA.DATA_TYPE.text,
393
478
  displayName: DisplayNames.root.data.placeholder,
394
- defaultValue: defaultValues.placeholder
395
- },
396
- searchable: {
397
- dataType: DATA.DATA_TYPE.booleanValue,
398
- displayName: DisplayNames.root.data.searchable,
399
- defaultValue: defaultValues.searchable
400
- },
401
- multiple: {
402
- dataType: DATA.DATA_TYPE.booleanValue,
403
- displayName: DisplayNames.root.data.multiple,
404
- defaultValue: defaultValues.multiple
405
- },
406
- clearable: {
407
- dataType: DATA.DATA_TYPE.booleanValue,
408
- displayName: DisplayNames.root.data.clearable,
409
- defaultValue: defaultValues.clearable
410
- },
411
- autoHighlight: {
412
- dataType: DATA.DATA_TYPE.booleanValue,
413
- displayName: DisplayNames.root.data.autoHighlight,
414
- defaultValue: defaultValues.autoHighlight
415
- },
416
- openOnInputClick: {
417
- dataType: DATA.DATA_TYPE.booleanValue,
418
- displayName: DisplayNames.root.data.openOnInputClick,
419
- defaultValue: defaultValues.openOnInputClick
420
- },
421
- inline: {
422
- dataType: DATA.DATA_TYPE.booleanValue,
423
- displayName: DisplayNames.root.data.inline,
424
- defaultValue: defaultValues.inline
425
- },
426
- grid: {
427
- dataType: DATA.DATA_TYPE.booleanValue,
428
- displayName: DisplayNames.root.data.grid,
429
- defaultValue: defaultValues.grid
430
- },
431
- columns: {
432
- dataType: DATA.DATA_TYPE.number,
433
- displayName: DisplayNames.root.data.columns,
434
- defaultValue: defaultValues.columns
435
- },
436
- limit: {
437
- dataType: DATA.DATA_TYPE.number,
438
- displayName: DisplayNames.root.data.limit,
439
- defaultValue: defaultValues.limit
440
- },
441
- required: {
442
- dataType: DATA.DATA_TYPE.booleanValue,
443
- displayName: DisplayNames.root.data.required,
444
- defaultValue: defaultValues.required
479
+ [DATA.DATA_TYPE.text]: {
480
+ maxLength: TEXT_PROP_STATIC_VALUE_MAX_LENGTH
481
+ }
445
482
  },
446
483
  readOnly: {
447
484
  dataType: DATA.DATA_TYPE.booleanValue,
448
- displayName: DisplayNames.root.data.readOnly,
449
- defaultValue: defaultValues.readOnly
485
+ displayName: DisplayNames.root.data.readOnly
450
486
  },
451
- description: {
487
+ helperText: {
452
488
  dataType: DATA.DATA_TYPE.text,
453
- displayName: DisplayNames.root.data.description,
454
- defaultValue: defaultValues.description
455
- },
456
- triggerMode: {
457
- dataType: DATA.DATA_TYPE.textEnum,
458
- displayName: DisplayNames.root.data.triggerMode.displayName,
459
- [DATA.DATA_TYPE.textEnum]: {
460
- options: [
461
- {
462
- value: "onSelection",
463
- displayName: DisplayNames.root.data.triggerMode.options.onSelection
464
- },
465
- {
466
- value: "onApply",
467
- displayName: DisplayNames.root.data.triggerMode.options.onApply
468
- }
469
- ]
470
- },
471
- defaultValue: defaultValues.triggerMode
489
+ displayName: DisplayNames.root.data.helperText,
490
+ description: DisplayNames.root.descriptions.helperText,
491
+ [DATA.DATA_TYPE.text]: {
492
+ maxLength: TEXT_PROP_STATIC_VALUE_MAX_LENGTH
493
+ }
472
494
  },
473
- applyButtonLabel: {
495
+ errorMessage: {
474
496
  dataType: DATA.DATA_TYPE.text,
475
- displayName: DisplayNames.root.data.applyButtonLabel,
476
- defaultValue: defaultValues.applyButtonLabel
497
+ displayName: DisplayNames.root.data.errorMessage,
498
+ description: DisplayNames.root.descriptions.errorMessage,
499
+ [DATA.DATA_TYPE.text]: {
500
+ maxLength: TEXT_PROP_STATIC_VALUE_MAX_LENGTH
501
+ }
477
502
  },
478
503
  a11y: {
479
504
  dataType: DATA.DATA_TYPE.a11y,
@@ -484,12 +509,30 @@ const manifest = {
484
509
  direction: {
485
510
  dataType: DATA.DATA_TYPE.direction
486
511
  },
487
- ...manifestChangeable(),
488
- ...manifestInputable(),
489
- ...manifestFocusable(),
490
- ...manifestValidation({ valueDataType: DATA.DATA_TYPE.text })
512
+ onValueChange: {
513
+ dataType: DATA.DATA_TYPE.function,
514
+ displayName: "On Value Change",
515
+ [DATA.DATA_TYPE.function]: {
516
+ parameters: [{ dataType: DATA.DATA_TYPE.text, displayName: "Value" }]
517
+ }
518
+ }
491
519
  },
492
520
  displayGroups: {
521
+ // Order of the parts in the design panel — the `elements` map's own
522
+ // key order isn't what the panel uses for this.
523
+ partsOrder: {
524
+ groupType: DISPLAY_GROUPS.GROUP_TYPE.elements,
525
+ elements: {
526
+ items: [
527
+ "label",
528
+ "input",
529
+ "list",
530
+ "option",
531
+ "helperText",
532
+ "errorMessage"
533
+ ]
534
+ }
535
+ },
493
536
  optionsGroup: {
494
537
  displayName: DisplayNames.root.displayGroups.optionsGroup,
495
538
  groupType: DISPLAY_GROUPS.GROUP_TYPE.listItem,
@@ -502,152 +545,15 @@ const manifest = {
502
545
  groupType: DISPLAY_GROUPS.GROUP_TYPE.data,
503
546
  data: {
504
547
  items: [
505
- "required",
548
+ "label",
549
+ "placeholder",
550
+ "value",
551
+ "helperText",
552
+ "errorMessage",
506
553
  "readOnly",
507
- "isDisabled",
508
- "searchable",
509
- "multiple",
510
- "clearable",
511
- "grid",
512
- "columns",
513
- "triggerMode",
514
- "applyButtonLabel",
515
- "description"
554
+ "disabled"
516
555
  ]
517
556
  }
518
- },
519
- sizeGroup: {
520
- displayName: DisplayNames.root.displayGroups.sizeGroup,
521
- groupType: DISPLAY_GROUPS.GROUP_TYPE.cssDataType,
522
- cssDataType: {
523
- items: ["width", "maxWidth"]
524
- }
525
- },
526
- backgroundGroup: {
527
- displayName: DisplayNames.root.displayGroups.backgroundGroup,
528
- groupType: DISPLAY_GROUPS.GROUP_TYPE.background,
529
- [DISPLAY_GROUPS.GROUP_TYPE.background]: {
530
- backgroundColor: "backgroundColor"
531
- }
532
- },
533
- borderGroup: {
534
- groupType: DISPLAY_GROUPS.GROUP_TYPE.border,
535
- border: {
536
- color: "borderColor",
537
- width: "borderWidth"
538
- }
539
- },
540
- cornersGroup: {
541
- displayName: DisplayNames.root.displayGroups.cornersGroup,
542
- groupType: DISPLAY_GROUPS.GROUP_TYPE.borderRadius,
543
- [DISPLAY_GROUPS.GROUP_TYPE.borderRadius]: {
544
- topLeft: "borderStartStartRadius",
545
- topRight: "borderStartEndRadius",
546
- bottomLeft: "borderEndStartRadius",
547
- bottomRight: "borderEndEndRadius"
548
- }
549
- },
550
- paddingGroup: {
551
- displayName: DisplayNames.root.displayGroups.paddingGroup,
552
- groupType: DISPLAY_GROUPS.GROUP_TYPE.padding,
553
- padding: {
554
- top: "paddingTop",
555
- bottom: "paddingBottom",
556
- left: "paddingInlineStart",
557
- right: "paddingInlineEnd"
558
- }
559
- }
560
- },
561
- cssCustomProperties: {
562
- width: {
563
- cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.lengthPercentage,
564
- displayName: DisplayNames.root.cssCustomProperties.width
565
- },
566
- maxWidth: {
567
- cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.lengthPercentage,
568
- displayName: DisplayNames.root.cssCustomProperties.maxWidth,
569
- defaultValue: "480px"
570
- },
571
- backgroundColor: {
572
- cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.backgroundColor,
573
- displayName: DisplayNames.root.cssCustomProperties.backgroundColor
574
- },
575
- borderColor: {
576
- cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.borderColor,
577
- displayName: DisplayNames.root.cssCustomProperties.borderColor
578
- },
579
- borderWidth: {
580
- cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.borderWidth,
581
- displayName: DisplayNames.root.cssCustomProperties.borderWidth,
582
- defaultValue: "1px"
583
- },
584
- borderStartStartRadius: {
585
- cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.borderStartStartRadius,
586
- defaultValue: "4px"
587
- },
588
- borderStartEndRadius: {
589
- cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.borderStartEndRadius,
590
- defaultValue: "4px"
591
- },
592
- borderEndStartRadius: {
593
- cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.borderEndStartRadius,
594
- defaultValue: "4px"
595
- },
596
- borderEndEndRadius: {
597
- cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.borderEndEndRadius,
598
- defaultValue: "4px"
599
- },
600
- paddingTop: {
601
- cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.paddingTop,
602
- displayName: DisplayNames.root.cssCustomProperties.paddingTop,
603
- defaultValue: "8px"
604
- },
605
- paddingBottom: {
606
- cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.paddingBottom,
607
- displayName: DisplayNames.root.cssCustomProperties.paddingBottom,
608
- defaultValue: "8px"
609
- },
610
- paddingInlineStart: {
611
- cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.paddingInlineStart,
612
- displayName: DisplayNames.root.cssCustomProperties.paddingInlineStart,
613
- defaultValue: "12px"
614
- },
615
- paddingInlineEnd: {
616
- cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.paddingInlineEnd,
617
- displayName: DisplayNames.root.cssCustomProperties.paddingInlineEnd,
618
- defaultValue: "12px"
619
- },
620
- boxShadow: {
621
- cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.boxShadow,
622
- displayName: DisplayNames.root.cssCustomProperties.boxShadow
623
- },
624
- gap: {
625
- cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.gap,
626
- displayName: DisplayNames.root.cssCustomProperties.gap,
627
- defaultValue: "8px"
628
- },
629
- textAlign: {
630
- cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.textAlign,
631
- displayName: DisplayNames.root.cssCustomProperties.textAlign,
632
- defaultValue: "start"
633
- },
634
- font: {
635
- cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.font,
636
- displayName: DisplayNames.root.cssCustomProperties.font,
637
- defaultValue: "normal normal normal 16px/1.5em madefor-text, helveticaneuew01-45ligh, helveticaneuew02-45ligh, helveticaneuew10-45ligh, sans-serif"
638
- },
639
- textColor: {
640
- cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color,
641
- displayName: DisplayNames.root.cssCustomProperties.textColor
642
- },
643
- helperFont: {
644
- cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.font,
645
- displayName: DisplayNames.root.cssCustomProperties.helperFont,
646
- defaultValue: "normal normal normal 14px/1.4em madefor-text, helveticaneuew01-45ligh, helveticaneuew02-45ligh, helveticaneuew10-45ligh, sans-serif"
647
- },
648
- helperColor: {
649
- cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color,
650
- displayName: DisplayNames.root.cssCustomProperties.helperColor
651
557
  }
652
558
  }
653
559
  },
@@ -660,15 +566,6 @@ const manifest = {
660
566
  "@wix/viewer-service-translations"
661
567
  ]
662
568
  }
663
- },
664
- editor: {
665
- componentUrl: "./site/components/Dropdown/component.preview.tsx",
666
- dependencies: {
667
- serviceDependencies: [
668
- "@wix/viewer-service-environment",
669
- "@wix/viewer-service-translations"
670
- ]
671
- }
672
569
  }
673
570
  },
674
571
  moduleConfiguration: {