@wix/editor-react-components 1.2769.0 → 1.2771.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/AudioPlayer/component.js +2 -2
- package/dist/site/components/Breadcrumbs/component.js +1 -1
- package/dist/site/components/DatePicker/DatePicker.types.d.ts +20 -76
- package/dist/site/components/DatePicker/component.js +232 -1240
- package/dist/site/components/DatePicker/components/DatePickerCalendar.d.ts +3 -2
- package/dist/site/components/DatePicker/components/DatePickerField.d.ts +1 -3
- package/dist/site/components/DatePicker/constants.d.ts +47 -79
- package/dist/site/components/DatePicker/css.css +60 -287
- package/dist/site/components/DatePicker/datePickerUtils.d.ts +8 -26
- package/dist/site/components/DatePicker/manifest.js +234 -207
- package/dist/site/components/Repeater/component.js +6 -6
- package/dist/site/components/TextInput/component.js +2 -2
- package/dist/site/components/TimePicker/component.js +350 -3
- package/dist/site/components/chunks/Button.js +2 -2
- package/dist/site/components/chunks/{DismissSmall.js → DateField.js} +56 -430
- package/dist/site/components/chunks/Group.js +44 -44
- package/dist/site/components/chunks/I18nProvider.js +1 -1
- package/dist/site/components/chunks/Input.js +3 -26
- package/dist/site/components/chunks/VisuallyHidden.js +1 -1
- package/dist/site/components/chunks/constants37.js +59 -90
- package/dist/site/components/chunks/filterDOMProps.js +11 -11
- package/dist/site/components/chunks/index11.js +8 -4
- package/package.json +2 -2
- package/dist/site/components/DatePicker/components/DatePickerLabel.d.ts +0 -8
- package/dist/site/components/DatePicker/components/DatePickerTooltip.d.ts +0 -5
- package/dist/site/components/DatePicker/hooks/useDateConstraints.d.ts +0 -12
- package/dist/site/components/DatePicker/hooks/useDatePickerValue.d.ts +0 -15
- package/dist/site/components/DatePicker/hooks/useUnavailableDates.d.ts +0 -3
|
@@ -9,8 +9,8 @@ import Image3 from "../Image3/component.js";
|
|
|
9
9
|
import { A as ARIA_LABELS, s as selectors, d as dataDefaults } from "../chunks/constants42.js";
|
|
10
10
|
import { c as commonjsGlobal } from "../chunks/_commonjsHelpers.js";
|
|
11
11
|
import { g as $cbf007e418543821$export$b0d6fa1ab32e3295, h as $cbf007e418543821$export$16a4697467175487, a as $1dfb119a85e764e5$export$cc77c4ff7e8673c5, c as $240e9101ba2842f5$export$7d15b64cf5a3a4c4, i as $240e9101ba2842f5$export$cb6e0bb50bc19463, $ as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "../chunks/Button.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
12
|
+
import { c as $64fa3d84918910a7$export$29f1550f4b0d4415, h as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, d as $64fa3d84918910a7$export$4d86445c2cf5e3, e as $65484d02dcb7eb3e$export$457c3d6518dd4c6f, b as $64fa3d84918910a7$export$2881499e37b75b9a, g as $64fa3d84918910a7$export$fabf2dc03a41866e } from "../chunks/filterDOMProps.js";
|
|
13
|
+
import { r as $48a7d519b337145d$export$4eaf04e54aa8eed6, s as $fe16bffc7a557bf0$export$7f54fc3180508a52, q as $d447af545b77c9f1$export$f21a1ffae260145a, k as $23f2114a1b82827e$export$e58f029f0fbfdb29, S as $0beb20c9744a2065$export$8467354a121f1b9f, R as $8f5a2122b0992be3$export$8397ddfc504fdb9a, a as $bbaa08b3cd72f041$export$9d1611c77c2fe928, y as $1969ac565cfec8d0$export$de79e2c695e052f3, U as $8296dad1a4c5e0dc$export$8f71654801c2f7cd, c as $d1116acdf220c2da$export$4c014de7c8940b4c, j as $3274bf1495747a7b$export$5add1d006293d136, i as $3e6197669829fe11$export$40bfa8c7b0832715, l as $01b77f81d0f07f68$export$75b6ee27786ba447, $ as $e969f22b6713ca4a$export$ae780daf29e6d456, E as $0c4a58759813079a$export$4e328f61c538687f, g as $a049562f99e7db0e$export$eb2fcfdbd7ba97d4 } from "../chunks/Group.js";
|
|
14
14
|
import { a as $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7 } from "../chunks/I18nProvider.js";
|
|
15
15
|
import { $ as $ea3928288112382f$export$439d29a4e110a164 } from "../chunks/VisuallyHidden.js";
|
|
16
16
|
function $1dfdc54e7eb53ba0$export$36da96379f79f245(props) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React__default, { useContext, useState, useRef, useMemo, cloneElement, forwardRef, createContext, useCallback, isValidElement, useEffect } from "react";
|
|
3
3
|
import { c as clsx } from "../chunks/clsx.js";
|
|
4
|
-
import { p as $f39a9eba43920ace$export$8dc98ba7eadeaa56,
|
|
4
|
+
import { p as $f39a9eba43920ace$export$8dc98ba7eadeaa56, j as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, a as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f, c as $64fa3d84918910a7$export$29f1550f4b0d4415, e as $65484d02dcb7eb3e$export$457c3d6518dd4c6f, n as $3ef42575df84b30b$export$9d1611c77c2fe928, g as $64fa3d84918910a7$export$fabf2dc03a41866e, d as $64fa3d84918910a7$export$4d86445c2cf5e3 } from "../chunks/filterDOMProps.js";
|
|
5
5
|
import { $ as $cf2482eff2eeeec2$export$f12b703ca79dfbb1 } from "../chunks/useLocalizedStringFormatter.js";
|
|
6
6
|
import { createPortal } from "react-dom";
|
|
7
7
|
import { useService } from "@wix/services-manager-react";
|
|
@@ -1,30 +1,14 @@
|
|
|
1
|
-
import { DateValue } from 'react-aria-components';
|
|
2
1
|
import { A11y, Direction } from '@wix/editor-react-types';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
/** Single date or a start–end range. */
|
|
6
|
-
export type DatePickerSelectionMode = 'single' | 'range';
|
|
7
|
-
/** Smallest editable time unit (React Aria `granularity`). */
|
|
8
|
-
export type DatePickerGranularity = 'day' | 'hour' | 'minute';
|
|
9
|
-
/** A resolved start–end range for the range calendar (or `null` when unset). */
|
|
10
|
-
export type DateRangeValue = {
|
|
11
|
-
start: DateValue;
|
|
12
|
-
end: DateValue;
|
|
13
|
-
} | null;
|
|
14
|
-
/**
|
|
15
|
-
* One blocked span. `from`/`to` are ISO `YYYY-MM-DD` strings (inclusive); a single
|
|
16
|
-
* blocked day sets both to the same date. Comes from the `unavailableDates`
|
|
17
|
-
* arrayItems data.
|
|
18
|
-
*/
|
|
19
|
-
export type UnavailableDateRange = {
|
|
20
|
-
from?: string;
|
|
21
|
-
to?: string;
|
|
22
|
-
};
|
|
2
|
+
/** A `localDate` data value: an ISO `YYYY-MM-DD` calendar date with no time or zone. */
|
|
3
|
+
export type LocalDate = string;
|
|
23
4
|
export type DatePickerElementProps = {
|
|
24
5
|
label?: {
|
|
25
6
|
className?: string;
|
|
26
7
|
};
|
|
27
|
-
|
|
8
|
+
helperText?: {
|
|
9
|
+
className?: string;
|
|
10
|
+
};
|
|
11
|
+
errorMessage?: {
|
|
28
12
|
className?: string;
|
|
29
13
|
};
|
|
30
14
|
dateInput?: {
|
|
@@ -36,79 +20,39 @@ export type DatePickerElementProps = {
|
|
|
36
20
|
popover?: {
|
|
37
21
|
className?: string;
|
|
38
22
|
};
|
|
39
|
-
|
|
23
|
+
calendarHeader?: {
|
|
40
24
|
className?: string;
|
|
41
25
|
};
|
|
42
|
-
|
|
26
|
+
weekdays?: {
|
|
43
27
|
className?: string;
|
|
44
28
|
};
|
|
45
|
-
|
|
29
|
+
dates?: {
|
|
46
30
|
className?: string;
|
|
47
31
|
};
|
|
48
32
|
};
|
|
49
|
-
export type DatePickerProps =
|
|
50
|
-
/** Fires with the selected ISO date string (range mode: the start date). */
|
|
51
|
-
onChange?: (value: string) => void;
|
|
52
|
-
/** Range mode: fires with the selected end date as an ISO string. */
|
|
53
|
-
onEndChange?: (value: string) => void;
|
|
33
|
+
export type DatePickerProps = {
|
|
54
34
|
/** DOM `id` on the root `.datePicker` wrapper. */
|
|
55
35
|
id: string;
|
|
56
36
|
/** Appended to the root `.datePicker`. Use this for CSS-variable and per-element overrides. */
|
|
57
37
|
className: string;
|
|
58
|
-
/**
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
|
|
62
|
-
* segments and make the value an ISO datetime (local wall-clock, no zone).
|
|
63
|
-
*/
|
|
64
|
-
granularity?: DatePickerGranularity;
|
|
65
|
-
/**
|
|
66
|
-
* The selected date as an ISO string — `YYYY-MM-DD`, or `YYYY-MM-DDTHH:MM`
|
|
67
|
-
* with time granularity (range mode: the start date). The empty string means
|
|
68
|
-
* no date is selected.
|
|
69
|
-
*/
|
|
70
|
-
value: string;
|
|
71
|
-
/**
|
|
72
|
-
* Range mode only: the end date as an ISO string (`YYYY-MM-DD`, or
|
|
73
|
-
* `YYYY-MM-DDTHH:MM` with time granularity).
|
|
74
|
-
*/
|
|
75
|
-
endValue?: string;
|
|
76
|
-
/** Uncontrolled initial selected date (ISO string). Used only when `value` is not provided. */
|
|
77
|
-
defaultValue?: string;
|
|
78
|
-
/** Uncontrolled initial range end date (ISO string). Used only when `endValue` is not provided (range mode). */
|
|
79
|
-
defaultEndValue?: string;
|
|
38
|
+
/** The selected date. `undefined` (or an unparseable string) means no date is selected. */
|
|
39
|
+
value?: LocalDate;
|
|
40
|
+
/** Fires with the date the visitor picked, or `undefined` when they cleared it. */
|
|
41
|
+
onValueChange?: (value: LocalDate | undefined) => void;
|
|
80
42
|
/** Optional text label rendered above the field. */
|
|
81
|
-
label
|
|
43
|
+
label?: string;
|
|
82
44
|
/** Site-facing helper text rendered under the field. */
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
|
|
86
|
-
/** Earliest selectable date as an ISO `YYYY-MM-DD` string. */
|
|
87
|
-
minDate?: string;
|
|
88
|
-
/** Latest selectable date as an ISO `YYYY-MM-DD` string. */
|
|
89
|
-
maxDate?: string;
|
|
90
|
-
/**
|
|
91
|
-
* Spans that can't be selected — a list of `{ from, to }` ISO date ranges
|
|
92
|
-
* (inclusive); a single blocked day sets `from` and `to` to the same date.
|
|
93
|
-
* Set via data binding / Velo, not the Settings panel.
|
|
94
|
-
*/
|
|
95
|
-
unavailableDates?: Array<UnavailableDateRange>;
|
|
96
|
-
/** When `false`, dates before today can't be selected (clamps min to today). */
|
|
97
|
-
allowPastDates?: boolean;
|
|
98
|
-
/** When `false`, dates after today can't be selected (clamps max to today). */
|
|
99
|
-
allowFutureDates?: boolean;
|
|
100
|
-
/** Marks the field required for form submission. */
|
|
101
|
-
required?: boolean;
|
|
45
|
+
helperText?: string;
|
|
46
|
+
/** A non-empty message switches the field into the error state and is shown under it. */
|
|
47
|
+
errorMessage?: string;
|
|
102
48
|
/** Shows the date but blocks editing. */
|
|
103
49
|
readOnly?: boolean;
|
|
104
|
-
/** Renders a clear (✕) control that empties the value. */
|
|
105
|
-
clearable?: boolean;
|
|
106
50
|
/** Disables interaction with the date picker. */
|
|
107
|
-
|
|
51
|
+
disabled?: boolean;
|
|
108
52
|
/** Writing direction applied to the root. */
|
|
109
53
|
direction?: Direction;
|
|
110
54
|
/**
|
|
111
|
-
* Editor-only: forces the calendar popover open so the Popover/
|
|
55
|
+
* Editor-only: forces the calendar popover open so the Popover/Dates
|
|
112
56
|
* design parts are editable on the canvas. Set by the manifest `visibleState`.
|
|
113
57
|
*/
|
|
114
58
|
previewCalendarOpen?: boolean;
|