@wix/editor-react-components 1.2885.0 → 1.2887.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.
- package/dist/site/components/Combobox/Combobox.d.ts +3 -0
- package/dist/site/components/{Dropdown/Dropdown.types.d.ts → Combobox/Combobox.types.d.ts} +8 -8
- package/dist/site/components/Combobox/component.d.ts +2 -0
- package/dist/site/components/{Dropdown → Combobox}/component.js +65 -58
- package/dist/site/components/{Dropdown → Combobox}/constants.d.ts +21 -21
- package/dist/site/components/{Dropdown → Combobox}/css.css +20 -20
- package/dist/site/components/Combobox/index.d.ts +2 -0
- package/dist/site/components/Combobox/index.js +6 -0
- package/dist/site/components/{Dropdown → Combobox}/manifest.js +12 -11
- package/dist/site/components/DatePicker/component.js +2 -2
- package/dist/site/components/DatePicker/constants.d.ts +1 -1
- package/dist/site/components/DatePicker/manifest.js +4 -3
- package/dist/site/components/TextField/TextField.d.ts +4 -0
- package/dist/site/components/{TextInput/TextInput.types.d.ts → TextField/TextField.types.d.ts} +4 -4
- package/dist/site/components/TextField/component.d.ts +1 -0
- package/dist/site/components/{TextInput → TextField}/component.js +8 -8
- package/dist/site/components/TextField/component.preview.d.ts +1 -0
- package/dist/site/components/{TextInput → TextField}/constants.d.ts +9 -9
- package/dist/site/components/{TextInput → TextField}/css.css +10 -10
- package/dist/site/components/TextField/index.d.ts +2 -0
- package/dist/site/components/TextField/index.js +6 -0
- package/dist/site/components/{TextInput → TextField}/manifest.js +12 -11
- package/dist/site/components/TextMarquee/component.js +2 -0
- package/dist/site/components/TextMarquee/css.css +1 -1
- package/dist/site/components/TextMarquee/manifest.js +5 -0
- package/dist/site/components/TimePicker/constants.d.ts +1 -1
- package/dist/site/components/TimePicker/manifest.js +2 -1
- package/dist/site/components/chunks/constants2.js +1 -1
- package/dist/site/components/chunks/constants3.js +10 -10
- package/dist/site/components/chunks/constants36.js +138 -70
- package/dist/site/components/chunks/constants37.js +70 -138
- package/dist/site/components/extensions.js +4 -4
- package/package.json +2 -2
- package/dist/site/components/Dropdown/Dropdown.d.ts +0 -3
- package/dist/site/components/Dropdown/component.d.ts +0 -2
- package/dist/site/components/Dropdown/index.d.ts +0 -2
- package/dist/site/components/Dropdown/index.js +0 -6
- package/dist/site/components/TextInput/TextInput.d.ts +0 -4
- package/dist/site/components/TextInput/component.d.ts +0 -1
- package/dist/site/components/TextInput/component.preview.d.ts +0 -1
- package/dist/site/components/TextInput/index.d.ts +0 -2
- package/dist/site/components/TextInput/index.js +0 -6
- /package/dist/site/components/{Dropdown → Combobox}/manifest.d.ts +0 -0
- /package/dist/site/components/{TextInput → TextField}/manifest.d.ts +0 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ComboboxProps } from './Combobox.types';
|
|
3
|
+
export default function Combobox({ className, direction, disabled, elementProps, errorMessage, helperText, id, label, onValueChange, options, placeholder, previewError, previewList, readOnly, value, wix, ...rest }: ComboboxProps): React.JSX.Element;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Direction } from '@wix/editor-react-types';
|
|
2
|
-
export type
|
|
2
|
+
export type ComboboxOption = {
|
|
3
3
|
/** Text shown to the visitor in the list. */
|
|
4
4
|
label: string;
|
|
5
5
|
/** Underlying value emitted when the option is selected. */
|
|
6
6
|
value: string;
|
|
7
7
|
};
|
|
8
|
-
export type
|
|
8
|
+
export type ComboboxElementProps = {
|
|
9
9
|
label?: {
|
|
10
10
|
className?: string;
|
|
11
11
|
};
|
|
@@ -25,13 +25,13 @@ export type DropdownElementProps = {
|
|
|
25
25
|
className?: string;
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
|
-
export type
|
|
29
|
-
/** DOM `id` on the root `.
|
|
28
|
+
export type ComboboxProps = {
|
|
29
|
+
/** DOM `id` on the root `.combobox` wrapper. */
|
|
30
30
|
id: string;
|
|
31
|
-
/** Appended to the root `.
|
|
31
|
+
/** Appended to the root `.combobox`. Use this for CSS-variable and per-element overrides. */
|
|
32
32
|
className: string;
|
|
33
33
|
/** The selectable options (static from the editor or from a bound data source). */
|
|
34
|
-
options?: Array<
|
|
34
|
+
options?: Array<ComboboxOption>;
|
|
35
35
|
/** The current selection: a value string. `undefined` means no selection. */
|
|
36
36
|
value?: string;
|
|
37
37
|
/** Fires with the value of the newly selected option. */
|
|
@@ -49,7 +49,7 @@ export type DropdownProps = {
|
|
|
49
49
|
* `undefined` or empty string hides the message and clears the error state.
|
|
50
50
|
*/
|
|
51
51
|
errorMessage?: string;
|
|
52
|
-
/** Disables interaction with the
|
|
52
|
+
/** Disables interaction with the combobox. */
|
|
53
53
|
disabled?: boolean;
|
|
54
54
|
/** Preview-only: forces the option list open while the List part is being designed. */
|
|
55
55
|
previewList?: boolean;
|
|
@@ -58,7 +58,7 @@ export type DropdownProps = {
|
|
|
58
58
|
/** Writing direction applied to the root. */
|
|
59
59
|
direction?: Direction;
|
|
60
60
|
/** Per-element className overrides. Keys match the manifest element keys. */
|
|
61
|
-
elementProps?:
|
|
61
|
+
elementProps?: ComboboxElementProps;
|
|
62
62
|
/** Platform-provided props. */
|
|
63
63
|
wix?: {
|
|
64
64
|
/** Spread on the preset wrapper. */
|
|
@@ -1,28 +1,28 @@
|
|
|
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 { F as Field, C as Combobox } from "../chunks/index13.js";
|
|
4
|
+
import { F as Field, C as Combobox$1 } from "../chunks/index13.js";
|
|
5
5
|
import { useService } from "@wix/services-manager-react";
|
|
6
6
|
import { u as useCurrentLanguage } from "../chunks/useCurrentLanguage.js";
|
|
7
7
|
import { T as TranslationsDefinition } from "../chunks/index4.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 AriaLabels, T as TestIds, e as editorElementClassNames, D as DesignStates } from "../chunks/
|
|
12
|
-
const root = "
|
|
13
|
-
const input = "
|
|
14
|
-
const option = "
|
|
15
|
-
const optionLabel = "
|
|
16
|
-
const select = "
|
|
17
|
-
const errorMessage = "
|
|
18
|
-
const label = "
|
|
19
|
-
const helperText = "
|
|
20
|
-
const positioner = "
|
|
21
|
-
const popup = "
|
|
22
|
-
const list = "
|
|
23
|
-
const value = "
|
|
24
|
-
const placeholder = "
|
|
25
|
-
const arrow = "
|
|
11
|
+
import { A as AriaLabels, T as TestIds, e as editorElementClassNames, D as DesignStates } from "../chunks/constants37.js";
|
|
12
|
+
const root = "root__x-u7O";
|
|
13
|
+
const input = "input__Lq-U0";
|
|
14
|
+
const option = "option__ocFV-";
|
|
15
|
+
const optionLabel = "optionLabel__65M8K";
|
|
16
|
+
const select = "select__eDSgT";
|
|
17
|
+
const errorMessage = "errorMessage__XruRw";
|
|
18
|
+
const label = "label__enEWb";
|
|
19
|
+
const helperText = "helperText__IU0s7";
|
|
20
|
+
const positioner = "positioner__Diaau";
|
|
21
|
+
const popup = "popup__anCjX";
|
|
22
|
+
const list = "list__H5yAH";
|
|
23
|
+
const value = "value__2dHYG";
|
|
24
|
+
const placeholder = "placeholder__H5Pm3";
|
|
25
|
+
const arrow = "arrow__AHeTc";
|
|
26
26
|
const styles = {
|
|
27
27
|
root,
|
|
28
28
|
input,
|
|
@@ -41,7 +41,7 @@ const styles = {
|
|
|
41
41
|
};
|
|
42
42
|
const itemToStringLabel = (item) => (item == null ? void 0 : item.label) ?? "";
|
|
43
43
|
const itemToStringValue = (item) => (item == null ? void 0 : item.value) ?? "";
|
|
44
|
-
function
|
|
44
|
+
function Combobox({
|
|
45
45
|
className,
|
|
46
46
|
direction,
|
|
47
47
|
disabled,
|
|
@@ -104,7 +104,7 @@ function Dropdown({
|
|
|
104
104
|
...getDataAttributes(rest),
|
|
105
105
|
children: /* @__PURE__ */ jsxs(Field.Root, { className: styles.select, invalid: inErrorState, children: [
|
|
106
106
|
/* @__PURE__ */ jsxs(
|
|
107
|
-
Combobox.Root,
|
|
107
|
+
Combobox$1.Root,
|
|
108
108
|
{
|
|
109
109
|
disabled: disabled || !(options == null ? void 0 : options.length),
|
|
110
110
|
id: comboboxId,
|
|
@@ -118,7 +118,7 @@ function Dropdown({
|
|
|
118
118
|
value: selectedOption ?? null,
|
|
119
119
|
children: [
|
|
120
120
|
label2 && /* @__PURE__ */ jsx(
|
|
121
|
-
Combobox.Label,
|
|
121
|
+
Combobox$1.Label,
|
|
122
122
|
{
|
|
123
123
|
className: clsx(
|
|
124
124
|
styles.label,
|
|
@@ -130,7 +130,7 @@ function Dropdown({
|
|
|
130
130
|
}
|
|
131
131
|
),
|
|
132
132
|
/* @__PURE__ */ jsxs(
|
|
133
|
-
Combobox.Trigger,
|
|
133
|
+
Combobox$1.Trigger,
|
|
134
134
|
{
|
|
135
135
|
"aria-describedby": describedBy,
|
|
136
136
|
"aria-haspopup": "listbox",
|
|
@@ -151,7 +151,7 @@ function Dropdown({
|
|
|
151
151
|
),
|
|
152
152
|
"data-testid": TestIds.input,
|
|
153
153
|
children: [
|
|
154
|
-
/* @__PURE__ */ jsx(Combobox.Value, { children: /* @__PURE__ */ jsx(
|
|
154
|
+
/* @__PURE__ */ jsx(Combobox$1.Value, { children: /* @__PURE__ */ jsx(
|
|
155
155
|
"span",
|
|
156
156
|
{
|
|
157
157
|
className: clsx(
|
|
@@ -165,48 +165,55 @@ function Dropdown({
|
|
|
165
165
|
]
|
|
166
166
|
}
|
|
167
167
|
),
|
|
168
|
-
/* @__PURE__ */ jsx(Combobox.Portal, { container: popoverContainer, children: /* @__PURE__ */ jsx(
|
|
169
|
-
Combobox.
|
|
168
|
+
/* @__PURE__ */ jsx(Combobox$1.Portal, { container: popoverContainer, children: /* @__PURE__ */ jsx(
|
|
169
|
+
Combobox$1.Positioner,
|
|
170
170
|
{
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
styles.popup,
|
|
174
|
-
editorElementClassNames.list,
|
|
175
|
-
(_c = elementProps == null ? void 0 : elementProps.list) == null ? void 0 : _c.className
|
|
176
|
-
),
|
|
177
|
-
"data-testid": TestIds.list,
|
|
171
|
+
className: styles.positioner,
|
|
172
|
+
sideOffset: 4,
|
|
178
173
|
children: /* @__PURE__ */ jsx(
|
|
179
|
-
Combobox.
|
|
174
|
+
Combobox$1.Popup,
|
|
180
175
|
{
|
|
181
|
-
"
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
176
|
+
role: "presentation",
|
|
177
|
+
className: clsx(
|
|
178
|
+
styles.popup,
|
|
179
|
+
editorElementClassNames.list,
|
|
180
|
+
(_c = elementProps == null ? void 0 : elementProps.list) == null ? void 0 : _c.className
|
|
181
|
+
),
|
|
182
|
+
"data-testid": TestIds.list,
|
|
183
|
+
children: /* @__PURE__ */ jsx(
|
|
184
|
+
Combobox$1.List,
|
|
185
|
+
{
|
|
186
|
+
"aria-label": ariaLabel,
|
|
187
|
+
"aria-labelledby": label2 ? `${comboboxId}-label` : void 0,
|
|
188
|
+
className: styles.list,
|
|
189
|
+
children: options == null ? void 0 : options.map((option2, index) => {
|
|
190
|
+
var _a2;
|
|
191
|
+
return /* @__PURE__ */ jsx(
|
|
192
|
+
Combobox$1.Item,
|
|
193
|
+
{
|
|
194
|
+
className: clsx(
|
|
195
|
+
styles.option,
|
|
196
|
+
editorElementClassNames.option,
|
|
197
|
+
(_a2 = elementProps == null ? void 0 : elementProps.option) == null ? void 0 : _a2.className,
|
|
198
|
+
// No native pseudo-class exists for "selected" (see
|
|
199
|
+
// the manifest's `option.states.selected` comment)
|
|
200
|
+
// — applied for real here so the panel's per-state
|
|
201
|
+
// export has a real selector to bind to, not just
|
|
202
|
+
// the editor's own design-preview injection.
|
|
203
|
+
option2 === selectedOption ? DesignStates.option.selected.className : void 0
|
|
204
|
+
),
|
|
205
|
+
value: option2,
|
|
206
|
+
children: /* @__PURE__ */ jsx("span", { className: styles.optionLabel, children: option2.label })
|
|
207
|
+
},
|
|
208
|
+
`option-${index}`
|
|
209
|
+
);
|
|
210
|
+
})
|
|
211
|
+
}
|
|
212
|
+
)
|
|
206
213
|
}
|
|
207
214
|
)
|
|
208
215
|
}
|
|
209
|
-
) })
|
|
216
|
+
) })
|
|
210
217
|
]
|
|
211
218
|
}
|
|
212
219
|
),
|
|
@@ -245,5 +252,5 @@ function Dropdown({
|
|
|
245
252
|
);
|
|
246
253
|
}
|
|
247
254
|
export {
|
|
248
|
-
|
|
255
|
+
Combobox as default
|
|
249
256
|
};
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
export declare const COMPONENT_TYPE = "wixEditorElements.
|
|
1
|
+
export declare const COMPONENT_TYPE = "wixEditorElements.Combobox";
|
|
2
2
|
export declare const DesignStates: {
|
|
3
3
|
readonly input: {
|
|
4
4
|
readonly hover: {
|
|
5
5
|
readonly displayName: "Hover";
|
|
6
|
-
readonly className: "
|
|
6
|
+
readonly className: "combobox__input--hover";
|
|
7
7
|
};
|
|
8
8
|
readonly focus: {
|
|
9
9
|
readonly displayName: "Focus";
|
|
10
|
-
readonly className: "
|
|
10
|
+
readonly className: "combobox__input--focus";
|
|
11
11
|
};
|
|
12
12
|
readonly error: {
|
|
13
13
|
readonly displayName: "Error";
|
|
14
|
-
readonly className: "
|
|
14
|
+
readonly className: "combobox__input--error";
|
|
15
15
|
};
|
|
16
16
|
readonly disabled: {
|
|
17
17
|
readonly displayName: "Disabled";
|
|
18
|
-
readonly className: "
|
|
18
|
+
readonly className: "combobox__input--disabled";
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
21
|
readonly option: {
|
|
22
22
|
readonly hover: {
|
|
23
23
|
readonly displayName: "Hover";
|
|
24
|
-
readonly className: "
|
|
24
|
+
readonly className: "combobox__option--hover";
|
|
25
25
|
};
|
|
26
26
|
readonly selected: {
|
|
27
27
|
readonly displayName: "Selected";
|
|
28
|
-
readonly className: "
|
|
28
|
+
readonly className: "combobox__option--selected";
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
31
|
};
|
|
@@ -66,7 +66,7 @@ export declare const DisplayNames: {
|
|
|
66
66
|
errorMessage: string;
|
|
67
67
|
};
|
|
68
68
|
presets: {
|
|
69
|
-
|
|
69
|
+
baseCombobox: string;
|
|
70
70
|
};
|
|
71
71
|
displayGroups: {
|
|
72
72
|
optionsGroup: string;
|
|
@@ -74,21 +74,21 @@ export declare const DisplayNames: {
|
|
|
74
74
|
};
|
|
75
75
|
};
|
|
76
76
|
export declare const TestIds: {
|
|
77
|
-
readonly root: "
|
|
78
|
-
readonly label: "
|
|
79
|
-
readonly input: "
|
|
80
|
-
readonly list: "
|
|
81
|
-
readonly helperText: "
|
|
82
|
-
readonly errorMessage: "
|
|
77
|
+
readonly root: "combobox-root";
|
|
78
|
+
readonly label: "combobox-label";
|
|
79
|
+
readonly input: "combobox-input";
|
|
80
|
+
readonly list: "combobox-list";
|
|
81
|
+
readonly helperText: "combobox-helper-text";
|
|
82
|
+
readonly errorMessage: "combobox-error-message";
|
|
83
83
|
};
|
|
84
84
|
export declare const editorElementClassNames: {
|
|
85
|
-
readonly root: "
|
|
86
|
-
readonly label: "
|
|
87
|
-
readonly input: "
|
|
88
|
-
readonly list: "
|
|
89
|
-
readonly option: "
|
|
90
|
-
readonly helperText: "
|
|
91
|
-
readonly errorMessage: "
|
|
85
|
+
readonly root: "combobox";
|
|
86
|
+
readonly label: "combobox-label";
|
|
87
|
+
readonly input: "combobox-input";
|
|
88
|
+
readonly list: "combobox-list";
|
|
89
|
+
readonly option: "combobox-option";
|
|
90
|
+
readonly helperText: "combobox-helper-text";
|
|
91
|
+
readonly errorMessage: "combobox-error-message";
|
|
92
92
|
};
|
|
93
93
|
export declare const AriaLabels: {
|
|
94
94
|
readonly root: {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
.
|
|
1
|
+
.root__x-u7O {
|
|
2
2
|
box-sizing: border-box;
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
5
5
|
min-width: max-content !important;
|
|
6
6
|
max-width: 100%;
|
|
7
7
|
}
|
|
8
|
-
.
|
|
8
|
+
.root__x-u7O .input__Lq-U0 {
|
|
9
9
|
box-sizing: border-box;
|
|
10
10
|
display: flex;
|
|
11
11
|
align-items: center;
|
|
@@ -15,41 +15,41 @@
|
|
|
15
15
|
cursor: pointer;
|
|
16
16
|
height: auto;
|
|
17
17
|
}
|
|
18
|
-
#SITE_CONTAINER.focus-ring-active.keyboard-tabbing-on .
|
|
18
|
+
#SITE_CONTAINER.focus-ring-active.keyboard-tabbing-on .root__x-u7O .input__Lq-U0:focus {
|
|
19
19
|
outline: 2px solid #116dff;
|
|
20
20
|
outline-offset: 1px;
|
|
21
21
|
box-shadow: 0 0 1px 2px #ffffff;
|
|
22
22
|
}
|
|
23
23
|
@media (forced-colors: active) {
|
|
24
|
-
.
|
|
24
|
+
.root__x-u7O .input__Lq-U0:focus {
|
|
25
25
|
outline: 3px solid Highlight !important;
|
|
26
26
|
outline-offset: 1px !important;
|
|
27
27
|
box-shadow: none;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
.
|
|
30
|
+
.root__x-u7O .input__Lq-U0:disabled, .root__x-u7O .input__Lq-U0.combobox__input--disabled {
|
|
31
31
|
cursor: not-allowed;
|
|
32
32
|
}
|
|
33
|
-
.
|
|
33
|
+
.root__x-u7O .option__ocFV- {
|
|
34
34
|
display: flex;
|
|
35
35
|
align-items: center;
|
|
36
36
|
gap: 8px;
|
|
37
37
|
cursor: pointer;
|
|
38
38
|
}
|
|
39
|
-
#SITE_CONTAINER.focus-ring-active.keyboard-tabbing-on .
|
|
39
|
+
#SITE_CONTAINER.focus-ring-active.keyboard-tabbing-on .root__x-u7O .option__ocFV-[data-highlighted] {
|
|
40
40
|
outline: 2px solid #116dff;
|
|
41
41
|
outline-offset: 1px;
|
|
42
42
|
box-shadow: 0 0 1px 2px #ffffff;
|
|
43
43
|
outline-offset: -2px;
|
|
44
44
|
}
|
|
45
45
|
@media (forced-colors: active) {
|
|
46
|
-
.
|
|
46
|
+
.root__x-u7O .option__ocFV-[data-highlighted] {
|
|
47
47
|
outline: 3px solid Highlight !important;
|
|
48
48
|
outline-offset: -3px !important;
|
|
49
49
|
box-shadow: none;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
.
|
|
52
|
+
.root__x-u7O .option__ocFV- .optionLabel__65M8K {
|
|
53
53
|
flex: 1;
|
|
54
54
|
min-width: 100px;
|
|
55
55
|
min-height: 1lh;
|
|
@@ -59,37 +59,37 @@
|
|
|
59
59
|
font: inherit;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
.
|
|
62
|
+
.select__eDSgT {
|
|
63
63
|
flex: 1;
|
|
64
64
|
display: flex;
|
|
65
65
|
flex-direction: column;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
.
|
|
68
|
+
.errorMessage__XruRw {
|
|
69
69
|
contain: inline-size;
|
|
70
70
|
overflow-wrap: anywhere;
|
|
71
71
|
}
|
|
72
|
-
.
|
|
72
|
+
.errorMessage__XruRw svg {
|
|
73
73
|
display: none;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
.
|
|
77
|
-
.
|
|
76
|
+
.label__enEWb,
|
|
77
|
+
.helperText__IU0s7 {
|
|
78
78
|
contain: inline-size;
|
|
79
79
|
overflow-wrap: anywhere;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
.
|
|
82
|
+
.positioner__Diaau {
|
|
83
83
|
width: var(--anchor-width);
|
|
84
84
|
z-index: 100;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
.
|
|
87
|
+
.popup__anCjX {
|
|
88
88
|
box-sizing: border-box;
|
|
89
89
|
overflow: hidden;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
.
|
|
92
|
+
.list__H5yAH {
|
|
93
93
|
display: flex;
|
|
94
94
|
flex-direction: column;
|
|
95
95
|
max-height: 300px;
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
row-gap: var(--optionsGap);
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
.
|
|
100
|
+
.value__2dHYG {
|
|
101
101
|
contain: inline-size;
|
|
102
102
|
flex: 1;
|
|
103
103
|
min-width: 100px;
|
|
@@ -110,11 +110,11 @@
|
|
|
110
110
|
text-overflow: ellipsis;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
.
|
|
113
|
+
.placeholder__H5Pm3 {
|
|
114
114
|
color: var(--placeholderColor);
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
.
|
|
117
|
+
.arrow__AHeTc {
|
|
118
118
|
flex: none;
|
|
119
119
|
width: 0;
|
|
120
120
|
height: 0;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
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-LDITHLYN.js";
|
|
2
|
-
import { a as DisplayNames, F as FunctionalStateKeys, e as editorElementClassNames, D as DesignStates, C as COMPONENT_TYPE } from "../chunks/
|
|
2
|
+
import { a as DisplayNames, F as FunctionalStateKeys, e as editorElementClassNames, D as DesignStates, C as COMPONENT_TYPE } from "../chunks/constants37.js";
|
|
3
3
|
import { T as TEXT_PROP_STATIC_VALUE_MAX_LENGTH } from "../chunks/manifest.js";
|
|
4
|
-
const basePresetName = "
|
|
4
|
+
const basePresetName = "baseCombobox";
|
|
5
5
|
const manifest = {
|
|
6
|
-
id: "
|
|
6
|
+
id: "f21254cf-5b14-4d26-8393-38a44c88864c",
|
|
7
7
|
type: COMPONENT_TYPE,
|
|
8
|
-
description: "A single-select
|
|
8
|
+
description: "A single-select combobox. 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: {
|
|
10
10
|
presets: {
|
|
11
11
|
small: basePresetName,
|
|
@@ -31,8 +31,8 @@ const manifest = {
|
|
|
31
31
|
// pre-fills the panel (see AGENTS.md).
|
|
32
32
|
presets: {
|
|
33
33
|
[basePresetName]: {
|
|
34
|
-
presetCssUrl: `./site/components/
|
|
35
|
-
displayName: DisplayNames.root.presets.
|
|
34
|
+
presetCssUrl: `./site/components/Combobox/presets/${basePresetName}.css`,
|
|
35
|
+
displayName: DisplayNames.root.presets.baseCombobox,
|
|
36
36
|
presetDefaults: {
|
|
37
37
|
elements: {
|
|
38
38
|
label: {
|
|
@@ -270,7 +270,7 @@ const manifest = {
|
|
|
270
270
|
// No native pseudo-class exists for "invalid" (Base UI's
|
|
271
271
|
// Combobox.Trigger doesn't render as a real `<input>`) — this
|
|
272
272
|
// state's export is scoped to this `className` instead, so
|
|
273
|
-
//
|
|
273
|
+
// Combobox.tsx applies it for real whenever `inErrorState` is true
|
|
274
274
|
// (not just during design preview), same as Option's `selected`.
|
|
275
275
|
error: {
|
|
276
276
|
displayName: DesignStates.input.error.displayName,
|
|
@@ -364,7 +364,7 @@ const manifest = {
|
|
|
364
364
|
},
|
|
365
365
|
// No native pseudo-class exists for "selected list item" — the
|
|
366
366
|
// panel's export for this state is scoped to this `className`
|
|
367
|
-
// instead, so
|
|
367
|
+
// instead, so Combobox.tsx applies it for real whenever an
|
|
368
368
|
// option is actually selected (not just during design preview).
|
|
369
369
|
selected: {
|
|
370
370
|
displayName: DesignStates.option.selected.displayName,
|
|
@@ -546,7 +546,8 @@ const manifest = {
|
|
|
546
546
|
},
|
|
547
547
|
resources: {
|
|
548
548
|
client: {
|
|
549
|
-
componentUrl: "./site/components/
|
|
549
|
+
componentUrl: "./site/components/Combobox/component.tsx",
|
|
550
|
+
moduleSpecifier: "@wix/editor-react-components/Combobox",
|
|
550
551
|
dependencies: {
|
|
551
552
|
serviceDependencies: [
|
|
552
553
|
"@wix/site-service-locale",
|
|
@@ -558,8 +559,8 @@ const manifest = {
|
|
|
558
559
|
},
|
|
559
560
|
moduleConfiguration: {
|
|
560
561
|
package: { name: "@wix/editor-react-components", version: "^1.0.0" },
|
|
561
|
-
component: { path: "
|
|
562
|
-
cssFile: { path: "
|
|
562
|
+
component: { path: "Combobox" },
|
|
563
|
+
cssFile: { path: "Combobox/css" }
|
|
563
564
|
}
|
|
564
565
|
};
|
|
565
566
|
export {
|
|
@@ -17,7 +17,7 @@ import { T as TranslationsDefinition } from "../chunks/index4.js";
|
|
|
17
17
|
import { a as getDataAttributes } from "../chunks/dataUtils.js";
|
|
18
18
|
import { d as directionStyles } from "../chunks/direction.module.js";
|
|
19
19
|
import { p as presetWrapperStyles } from "../chunks/presetWrapper.module.js";
|
|
20
|
-
import { T as TestIds, s as selectors, D as DesignStates, A as ARIA_LABEL_NAMESPACE, d as defaultValues, a as AriaLabels } from "../chunks/
|
|
20
|
+
import { T as TestIds, s as selectors, D as DesignStates, A as ARIA_LABEL_NAMESPACE, d as defaultValues, a as AriaLabels } from "../chunks/constants36.js";
|
|
21
21
|
createContext(null);
|
|
22
22
|
createContext(null);
|
|
23
23
|
createContext(null);
|
|
@@ -4243,7 +4243,7 @@ const DatePickerCalendar = ({
|
|
|
4243
4243
|
//
|
|
4244
4244
|
// react-aria's Popover is only the positioner (it owns inline position,
|
|
4245
4245
|
// z-index and max-height). The Popover design part is the static box inside
|
|
4246
|
-
// it — the same split as
|
|
4246
|
+
// it — the same split as Combobox's Positioner/Popup — so the
|
|
4247
4247
|
// design panel's border and padding style a plain element.
|
|
4248
4248
|
/* @__PURE__ */ jsx(
|
|
4249
4249
|
$07b14b47974efb58$export$5b6b19405a83ff9d,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { D as DomEventType } from "../chunks/types.impl.js";
|
|
2
2
|
import { C as CSS_PROPERTIES, N as NativeStateType, b as DISPLAY_GROUPS, D as DATA, E as ELEMENTS, L as LAYOUT, A as Archetype } from "../chunks/chunk-LDITHLYN.js";
|
|
3
|
-
import { F as FunctionalStateKeys, D as DesignStates, d as defaultValues, b as DisplayNames, c as Descriptions, C as COMPONENT_TYPE, s as selectors } from "../chunks/
|
|
3
|
+
import { F as FunctionalStateKeys, D as DesignStates, d as defaultValues, b as DisplayNames, c as Descriptions, C as COMPONENT_TYPE, s as selectors } from "../chunks/constants36.js";
|
|
4
4
|
import { T as TEXT_PROP_STATIC_VALUE_MAX_LENGTH, g as getSelector } from "../chunks/manifest.js";
|
|
5
5
|
import { a as manifestFocusable } from "../chunks/manifestSdkMixins.js";
|
|
6
6
|
const basePresetName = "baseDatePicker";
|
|
@@ -80,7 +80,7 @@ const dateInputCssProperties = {
|
|
|
80
80
|
...boxPadding
|
|
81
81
|
};
|
|
82
82
|
const manifest = {
|
|
83
|
-
id: "
|
|
83
|
+
id: "a872e574-e3c4-4b09-bf9d-5e1bea826c9e",
|
|
84
84
|
type: COMPONENT_TYPE,
|
|
85
85
|
description: "A date picker input. Visitors pick a date from a segmented field or a calendar popover. The selected date is a local date and can be connected to a data field.",
|
|
86
86
|
installation: {
|
|
@@ -102,7 +102,7 @@ const manifest = {
|
|
|
102
102
|
selector: getSelector(selectors.root),
|
|
103
103
|
displayName: DisplayNames.root.elementDisplayName,
|
|
104
104
|
archetype: Archetype.DatePicker,
|
|
105
|
-
// Bare component with one minimal preset (Button's and
|
|
105
|
+
// Bare component with one minimal preset (Button's and Combobox's
|
|
106
106
|
// structure): the module styles carry layout/behaviour only, this preset
|
|
107
107
|
// gives the default look, and Add Panel templates supply real designs.
|
|
108
108
|
// Part declarations have no defaults; `presetDefaults` mirrors the CSS.
|
|
@@ -466,6 +466,7 @@ const manifest = {
|
|
|
466
466
|
resources: {
|
|
467
467
|
client: {
|
|
468
468
|
componentUrl: "./site/components/DatePicker/component.tsx",
|
|
469
|
+
moduleSpecifier: "@wix/editor-react-components/DatePicker",
|
|
469
470
|
dependencies: {
|
|
470
471
|
serviceDependencies: [
|
|
471
472
|
"@wix/site-service-locale",
|
package/dist/site/components/{TextInput/TextInput.types.d.ts → TextField/TextField.types.d.ts}
RENAMED
|
@@ -7,7 +7,7 @@ import type * as React from 'react';
|
|
|
7
7
|
* a class token and delivers it here, so every one of these has to reach the
|
|
8
8
|
* matching DOM node or the state silently does nothing.
|
|
9
9
|
*/
|
|
10
|
-
export type
|
|
10
|
+
export type TextFieldElementProps = {
|
|
11
11
|
label?: {
|
|
12
12
|
className?: string;
|
|
13
13
|
};
|
|
@@ -21,18 +21,18 @@ export type TextInputElementProps = {
|
|
|
21
21
|
className?: string;
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
|
-
export type
|
|
24
|
+
export type ITextFieldProps = ITextFieldMapperProps & {
|
|
25
25
|
id: string;
|
|
26
26
|
autoFocus?: boolean;
|
|
27
27
|
className?: string;
|
|
28
28
|
dataTestId?: string;
|
|
29
29
|
contentRef?: React.Ref<HTMLDivElement>;
|
|
30
|
-
elementProps?:
|
|
30
|
+
elementProps?: TextFieldElementProps;
|
|
31
31
|
wix?: {
|
|
32
32
|
presetsWrapperProps?: Record<string, unknown>;
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
|
-
export type
|
|
35
|
+
export type ITextFieldMapperProps = SdkFunctionFocusableProps<HTMLInputElement> & SdkFunctionInputableProps<HTMLInputElement> & SdkFunctionKeyboardProps<HTMLInputElement> & {
|
|
36
36
|
/** Controlled value. Omission renders an empty input; edits require a parent update. */
|
|
37
37
|
value?: string;
|
|
38
38
|
onValueChange?: (value: string) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './TextField';
|