@wix/editor-react-components 1.2877.0 → 1.2878.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/DatePicker/DatePicker.types.d.ts +1 -3
- package/dist/site/components/DatePicker/component.js +1 -2
- package/dist/site/components/DatePicker/constants.d.ts +1 -1
- package/dist/site/components/DatePicker/manifest.js +1 -7
- package/dist/site/components/TextInput/TextInput.types.d.ts +1 -2
- package/dist/site/components/TextInput/component.js +2 -24
- package/dist/site/components/TextInput/css.css +0 -11
- package/dist/site/components/TextInput/manifest.js +2 -14
- package/dist/site/components/TimePicker/TimePicker.types.d.ts +1 -3
- package/dist/site/components/TimePicker/component.js +4 -8
- package/dist/site/components/TimePicker/constants.d.ts +1 -1
- package/dist/site/components/TimePicker/manifest.js +4 -8
- package/dist/site/components/chunks/constants2.js +1 -1
- package/dist/site/components/chunks/constants37.js +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Direction } from '@wix/editor-react-types';
|
|
2
2
|
import { SdkFunctionFocusableProps, SdkFunctionKeyboardProps } from '../../../utils/functions/sdkFunctionCallbackProps';
|
|
3
3
|
/** A `localDate` data value: an ISO `YYYY-MM-DD` calendar date with no time or zone. */
|
|
4
4
|
export type LocalDate = string;
|
|
@@ -65,8 +65,6 @@ export type DatePickerProps = SdkFunctionFocusableProps & SdkFunctionKeyboardPro
|
|
|
65
65
|
* shown unless `errorMessage` is set.
|
|
66
66
|
*/
|
|
67
67
|
previewError?: boolean;
|
|
68
|
-
/** Accessibility attributes. `ariaLabel` labels the date picker for assistive tech. */
|
|
69
|
-
a11y?: A11y;
|
|
70
68
|
/** Platform-provided props. */
|
|
71
69
|
wix?: {
|
|
72
70
|
/** Spread on the preset wrapper. */
|
|
@@ -4349,7 +4349,6 @@ function DatePicker2(props) {
|
|
|
4349
4349
|
readOnly = defaultValues.readOnly,
|
|
4350
4350
|
disabled = defaultValues.disabled,
|
|
4351
4351
|
direction,
|
|
4352
|
-
a11y,
|
|
4353
4352
|
previewCalendarOpen,
|
|
4354
4353
|
previewError,
|
|
4355
4354
|
onValueChange = noop,
|
|
@@ -4365,7 +4364,7 @@ function DatePicker2(props) {
|
|
|
4365
4364
|
null
|
|
4366
4365
|
);
|
|
4367
4366
|
const locale = regionalFormat || "en-US";
|
|
4368
|
-
const ariaLabel =
|
|
4367
|
+
const ariaLabel = label2 ? void 0 : t(AriaLabels.root);
|
|
4369
4368
|
const handleChange = (date) => {
|
|
4370
4369
|
onValueChange(toLocalDate(date));
|
|
4371
4370
|
};
|
|
@@ -80,7 +80,7 @@ const dateInputCssProperties = {
|
|
|
80
80
|
...boxPadding
|
|
81
81
|
};
|
|
82
82
|
const manifest = {
|
|
83
|
-
id: "
|
|
83
|
+
id: "d68eb609-66b6-4319-8113-7f6e143986ae",
|
|
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: {
|
|
@@ -384,12 +384,6 @@ const manifest = {
|
|
|
384
384
|
displayName: DisplayNames.root.data.disabled,
|
|
385
385
|
defaultValue: defaultValues.disabled
|
|
386
386
|
},
|
|
387
|
-
a11y: {
|
|
388
|
-
dataType: DATA.DATA_TYPE.a11y,
|
|
389
|
-
[DATA.DATA_TYPE.a11y]: {
|
|
390
|
-
attributes: [DATA.A11Y_ATTRIBUTES.ariaLabel]
|
|
391
|
-
}
|
|
392
|
-
},
|
|
393
387
|
direction: {
|
|
394
388
|
dataType: DATA.DATA_TYPE.direction
|
|
395
389
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Direction } from '@wix/editor-react-types';
|
|
2
2
|
import { SdkFunctionFocusableProps, SdkFunctionInputableProps, SdkFunctionKeyboardProps } from '../../../utils/functions/sdkFunctionCallbackProps';
|
|
3
3
|
import type * as React from 'react';
|
|
4
4
|
/**
|
|
@@ -33,7 +33,6 @@ export type ITextInputProps = ITextInputMapperProps & {
|
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
35
|
export type ITextInputMapperProps = SdkFunctionFocusableProps<HTMLInputElement> & SdkFunctionInputableProps<HTMLInputElement> & SdkFunctionKeyboardProps<HTMLInputElement> & {
|
|
36
|
-
a11y?: A11y;
|
|
37
36
|
/** Controlled value. Omission renders an empty input; edits require a parent update. */
|
|
38
37
|
value?: string;
|
|
39
38
|
onValueChange?: (value: string) => void;
|
|
@@ -6,7 +6,6 @@ import { u as useCurrentLanguage } from "../chunks/useCurrentLanguage.js";
|
|
|
6
6
|
import { a as getDataAttributes } from "../chunks/dataUtils.js";
|
|
7
7
|
import { p as presetWrapperStyles } from "../chunks/presetWrapper.module.js";
|
|
8
8
|
import { d as directionStyles } from "../chunks/direction.module.js";
|
|
9
|
-
import { a as accessibilityStyles } from "../chunks/accessibility.module.js";
|
|
10
9
|
import { c as componentClassNames, D as DesignStates } from "../chunks/constants3.js";
|
|
11
10
|
import { b as $fd2148440a13ec26$export$fc1a364ae1f3ff10, c as $191c9b6d48a0a4e2$export$294aa081a6c6f55d, d as $860f7da480e22816$export$b8473d3665f3a75a, e as $d3e0e05bdfcf66bd$export$c24727297075ec6a, f as $3985021b0ad6602f$export$37fb8590cf2c088c, g as $514c0188e459b4c0$export$9afb8bc826b033ea, h as $ee014567cb39d3f0$export$ff05c3ac10437e03, i as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../chunks/Input.js";
|
|
12
11
|
import { b as $3e6197669829fe11$export$40bfa8c7b0832715, c as $3274bf1495747a7b$export$5add1d006293d136, d as $bbaa08b3cd72f041$export$9d1611c77c2fe928, e as $23f2114a1b82827e$export$e58f029f0fbfdb29, f as $01b77f81d0f07f68$export$75b6ee27786ba447, g as $a049562f99e7db0e$export$f9c6924e160136d1, a as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../chunks/Group.js";
|
|
@@ -216,7 +215,6 @@ const TextInput = (props) => {
|
|
|
216
215
|
onInput,
|
|
217
216
|
onFocus,
|
|
218
217
|
onBlur,
|
|
219
|
-
a11y,
|
|
220
218
|
contentRef,
|
|
221
219
|
elementProps,
|
|
222
220
|
wix
|
|
@@ -241,10 +239,7 @@ const TextInput = (props) => {
|
|
|
241
239
|
className,
|
|
242
240
|
!direction && directionStyles.fallbackDirection
|
|
243
241
|
);
|
|
244
|
-
const ariaLabel = a11y == null ? void 0 : a11y.ariaLabel;
|
|
245
|
-
const ariaInvalid = inErrorState ? true : (a11y == null ? void 0 : a11y.ariaInvalid) ?? false;
|
|
246
242
|
const inputId = `${id}-input`;
|
|
247
|
-
const customAccessibleNameId = label2 && ariaLabel ? `${id}-accessible-name` : void 0;
|
|
248
243
|
const helperTextId = helperText2 ? `${id}-helper-text` : void 0;
|
|
249
244
|
const errorMessageId = inErrorState ? `${id}-error-message` : void 0;
|
|
250
245
|
const inputClasses = clsx(
|
|
@@ -268,14 +263,9 @@ const TextInput = (props) => {
|
|
|
268
263
|
autoFocus,
|
|
269
264
|
"data-testid": "text-field"
|
|
270
265
|
};
|
|
271
|
-
const describedBy = [
|
|
272
|
-
a11y == null ? void 0 : a11y.ariaDescribedby,
|
|
273
|
-
helperTextId,
|
|
274
|
-
errorMessageId
|
|
275
|
-
].filter(Boolean);
|
|
266
|
+
const describedBy = [helperTextId, errorMessageId].filter(Boolean);
|
|
276
267
|
const inputProps = {
|
|
277
268
|
ref: inputRef,
|
|
278
|
-
tabIndex: a11y == null ? void 0 : a11y.tabIndex,
|
|
279
269
|
placeholder,
|
|
280
270
|
className: inputClasses,
|
|
281
271
|
id: inputId,
|
|
@@ -284,11 +274,7 @@ const TextInput = (props) => {
|
|
|
284
274
|
onInput,
|
|
285
275
|
onFocus,
|
|
286
276
|
onBlur,
|
|
287
|
-
"aria-invalid":
|
|
288
|
-
...ariaLabel && { "aria-label": ariaLabel },
|
|
289
|
-
...customAccessibleNameId && {
|
|
290
|
-
"aria-labelledby": customAccessibleNameId
|
|
291
|
-
},
|
|
277
|
+
"aria-invalid": inErrorState,
|
|
292
278
|
...describedBy.length ? { "aria-describedby": describedBy.join(" ") } : {}
|
|
293
279
|
};
|
|
294
280
|
return /* @__PURE__ */ jsx(
|
|
@@ -307,14 +293,6 @@ const TextInput = (props) => {
|
|
|
307
293
|
"data-testid": dataTestId,
|
|
308
294
|
lang: language,
|
|
309
295
|
children: /* @__PURE__ */ jsxs($bcdf0525bf22703d$export$2c73285ae9390cec, { ...textFieldProps, children: [
|
|
310
|
-
customAccessibleNameId && /* @__PURE__ */ jsx(
|
|
311
|
-
"span",
|
|
312
|
-
{
|
|
313
|
-
id: customAccessibleNameId,
|
|
314
|
-
className: accessibilityStyles.visuallyHidden,
|
|
315
|
-
children: ariaLabel
|
|
316
|
-
}
|
|
317
|
-
),
|
|
318
296
|
label2 && /* @__PURE__ */ jsx($01b77f81d0f07f68$export$b04be29aa201d4f5, { className: labelClasses, htmlFor: inputId, children: label2 }),
|
|
319
297
|
/* @__PURE__ */ jsx("div", { className: style.inputWrapper, children: /* @__PURE__ */ jsx($3985021b0ad6602f$export$f5b8910cec6cf069, { ...inputProps }) }),
|
|
320
298
|
helperText2 && /* @__PURE__ */ jsx(
|
|
@@ -47,15 +47,4 @@
|
|
|
47
47
|
}
|
|
48
48
|
.fallbackDirection__HeRgn:not([dir]) {
|
|
49
49
|
direction: var(--wix-opt-in-direction);
|
|
50
|
-
}
|
|
51
|
-
.visuallyHidden__Md84p {
|
|
52
|
-
position: absolute;
|
|
53
|
-
width: 1px;
|
|
54
|
-
height: 1px;
|
|
55
|
-
padding: 0;
|
|
56
|
-
margin: -1px;
|
|
57
|
-
overflow: hidden;
|
|
58
|
-
clip-path: inset(50%);
|
|
59
|
-
white-space: nowrap;
|
|
60
|
-
border: 0;
|
|
61
50
|
}
|
|
@@ -8,8 +8,8 @@ const designState = (s, pseudoClass) => ({
|
|
|
8
8
|
...pseudoClass ? { pseudoClass } : {}
|
|
9
9
|
});
|
|
10
10
|
const manifest = {
|
|
11
|
-
id: "
|
|
12
|
-
type: "wixEditorElements.
|
|
11
|
+
id: "e4b0ddb2-7550-46ef-bdc9-8d72d7e8519b",
|
|
12
|
+
type: "wixEditorElements.TextInput__DEV__v6",
|
|
13
13
|
description: "TextInput",
|
|
14
14
|
installation: {
|
|
15
15
|
presets: { small: "baseTextInput", large: "baseTextInput" },
|
|
@@ -335,18 +335,6 @@ const manifest = {
|
|
|
335
335
|
maxLength: TEXT_PROP_STATIC_VALUE_MAX_LENGTH
|
|
336
336
|
}
|
|
337
337
|
},
|
|
338
|
-
// Accessibility
|
|
339
|
-
a11y: {
|
|
340
|
-
dataType: DATA.DATA_TYPE.a11y,
|
|
341
|
-
[DATA.DATA_TYPE.a11y]: {
|
|
342
|
-
attributes: [
|
|
343
|
-
DATA.A11Y_ATTRIBUTES.tabIndex,
|
|
344
|
-
DATA.A11Y_ATTRIBUTES.ariaLabel,
|
|
345
|
-
DATA.A11Y_ATTRIBUTES.ariaDescribedby,
|
|
346
|
-
DATA.A11Y_ATTRIBUTES.ariaInvalid
|
|
347
|
-
]
|
|
348
|
-
}
|
|
349
|
-
},
|
|
350
338
|
readOnly: {
|
|
351
339
|
displayName: DisplayNames.data.readOnly,
|
|
352
340
|
dataType: DATA.DATA_TYPE.booleanValue
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Direction } from '@wix/editor-react-types';
|
|
2
2
|
import { SdkFunctionFocusableProps, SdkFunctionKeyboardProps } from '../../../utils/functions/sdkFunctionCallbackProps';
|
|
3
3
|
export type TimePickerElementProps = {
|
|
4
4
|
label?: {
|
|
@@ -47,8 +47,6 @@ export type TimePickerProps = SdkFunctionFocusableProps & SdkFunctionKeyboardPro
|
|
|
47
47
|
disabled?: boolean;
|
|
48
48
|
/** Writing direction applied to the root. */
|
|
49
49
|
direction?: Direction;
|
|
50
|
-
/** Accessibility attributes. `ariaLabel` labels the time picker for assistive tech. */
|
|
51
|
-
a11y?: A11y;
|
|
52
50
|
/** Platform-provided props. */
|
|
53
51
|
wix?: {
|
|
54
52
|
/** Spread on the preset wrapper. */
|
|
@@ -124,7 +124,6 @@ function TimePicker(props) {
|
|
|
124
124
|
readOnly = false,
|
|
125
125
|
previewError,
|
|
126
126
|
direction,
|
|
127
|
-
a11y,
|
|
128
127
|
onValueChange = noop,
|
|
129
128
|
onKeyDown,
|
|
130
129
|
onKeyUp,
|
|
@@ -143,13 +142,10 @@ function TimePicker(props) {
|
|
|
143
142
|
});
|
|
144
143
|
const hasError = typeof errorMessage2 !== "undefined" && errorMessage2 !== "";
|
|
145
144
|
const inErrorState = hasError || Boolean(previewError);
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
AriaLabels.root.default
|
|
151
|
-
);
|
|
152
|
-
}
|
|
145
|
+
const ariaLabel = label2 ? void 0 : translate("ariaLabels")(
|
|
146
|
+
AriaLabels.root.legacyKey,
|
|
147
|
+
AriaLabels.root.default
|
|
148
|
+
);
|
|
153
149
|
return /* @__PURE__ */ jsx(
|
|
154
150
|
"div",
|
|
155
151
|
{
|
|
@@ -5,7 +5,7 @@ import { m as manifestKeyboard, a as manifestFocusable } from "../chunks/manifes
|
|
|
5
5
|
const basePresetName = "baseTimePicker";
|
|
6
6
|
const keyboardEvents = manifestKeyboard();
|
|
7
7
|
const manifest = {
|
|
8
|
-
id: "
|
|
8
|
+
id: "bf0b381a-2eb3-46bc-b76f-0ea73689a67a",
|
|
9
9
|
type: COMPONENT_TYPE,
|
|
10
10
|
description: Descriptions.component,
|
|
11
11
|
installation: {
|
|
@@ -141,7 +141,9 @@ const manifest = {
|
|
|
141
141
|
states: {
|
|
142
142
|
[FunctionalStateKeys.previewError]: { props: { previewError: true } }
|
|
143
143
|
},
|
|
144
|
-
displayFilters: {
|
|
144
|
+
displayFilters: {
|
|
145
|
+
states: { hide: [FunctionalStateKeys.previewError] }
|
|
146
|
+
},
|
|
145
147
|
elements: {
|
|
146
148
|
label: {
|
|
147
149
|
elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
|
|
@@ -298,12 +300,6 @@ const manifest = {
|
|
|
298
300
|
dataType: DATA.DATA_TYPE.booleanValue,
|
|
299
301
|
displayName: DisplayNames.root.data.disabled
|
|
300
302
|
},
|
|
301
|
-
a11y: {
|
|
302
|
-
dataType: DATA.DATA_TYPE.a11y,
|
|
303
|
-
[DATA.DATA_TYPE.a11y]: {
|
|
304
|
-
attributes: [DATA.A11Y_ATTRIBUTES.ariaLabel]
|
|
305
|
-
}
|
|
306
|
-
},
|
|
307
303
|
direction: {
|
|
308
304
|
dataType: DATA.DATA_TYPE.direction
|
|
309
305
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/editor-react-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2878.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": "
|
|
231
|
+
"falconPackageHash": "dd5f5db72e862b673aa5b5c781084f68fa04f2664cf8871bf34f5b96"
|
|
232
232
|
}
|