sanity 5.0.1 → 5.0.2-next.1
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/lib/_chunks-es/package.js +1 -1
- package/lib/_chunks-es/version.js +1 -1
- package/lib/index.js +177 -195
- package/lib/index.js.map +1 -1
- package/package.json +14 -14
|
@@ -7,7 +7,7 @@ try {
|
|
|
7
7
|
try {
|
|
8
8
|
buildVersion = buildVersion || // This is replaced by `@sanity/pkg-utils` at build time
|
|
9
9
|
// and must always be references by its full static name, e.g. no optional chaining, no `if (process && process.env)` etc.
|
|
10
|
-
"5.0.1";
|
|
10
|
+
"5.0.2-next.1+7915625d74";
|
|
11
11
|
} catch {
|
|
12
12
|
}
|
|
13
13
|
const SANITY_VERSION = buildVersion || `${version}-dev`;
|
package/lib/index.js
CHANGED
|
@@ -27425,7 +27425,7 @@ function debugWithName$1(name) {
|
|
|
27425
27425
|
const namespace = `${rootName$1}${name}`;
|
|
27426
27426
|
return debug$c && debug$c.enabled(namespace) ? debug$c(namespace) : debug$c(rootName$1);
|
|
27427
27427
|
}
|
|
27428
|
-
function createTZDateFromComponents
|
|
27428
|
+
function createTZDateFromComponents(date, timeZone) {
|
|
27429
27429
|
return new TZDate(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds(), timeZone);
|
|
27430
27430
|
}
|
|
27431
27431
|
const TimeZoneEvents = {
|
|
@@ -27611,7 +27611,7 @@ const TIME_ZONE_SCOPE_TYPE = {
|
|
|
27611
27611
|
$[50] !== timeZone_0 ? (t18 = (date_1) => {
|
|
27612
27612
|
if (!timeZone_0)
|
|
27613
27613
|
return date_1;
|
|
27614
|
-
const tzDate = createTZDateFromComponents
|
|
27614
|
+
const tzDate = createTZDateFromComponents(date_1, timeZone_0.name);
|
|
27615
27615
|
return new Date(tzDate);
|
|
27616
27616
|
}, $[50] = timeZone_0, $[51] = t18) : t18 = $[51];
|
|
27617
27617
|
const zoneDateToUtc = t18;
|
|
@@ -27959,11 +27959,7 @@ const features$1 = {
|
|
|
27959
27959
|
const handleChange = t0;
|
|
27960
27960
|
let t1;
|
|
27961
27961
|
return $[5] !== handleChange || $[6] !== restProps ? (t1 = /* @__PURE__ */ jsx(LazyTextInput, { "data-testid": "date-input", ...restProps, fontSize: 1, onChange: handleChange, inputMode: "numeric", padding: 2, radius: 2 }), $[5] = handleChange, $[6] = restProps, $[7] = t1) : t1 = $[7], t1;
|
|
27962
|
-
}
|
|
27963
|
-
function createTZDateFromComponents(date, timeZone) {
|
|
27964
|
-
return new TZDate(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds(), timeZone);
|
|
27965
|
-
}
|
|
27966
|
-
const MONTH_PICKER_VARIANT = {
|
|
27962
|
+
}, MONTH_PICKER_VARIANT = {
|
|
27967
27963
|
carousel: "carousel"
|
|
27968
27964
|
}, PRESERVE_FOCUS_ELEMENT$3 = /* @__PURE__ */ jsx("span", { "data-preserve-focus": !0, style: {
|
|
27969
27965
|
overflow: "hidden",
|
|
@@ -27972,13 +27968,11 @@ const MONTH_PICKER_VARIANT = {
|
|
|
27972
27968
|
}, tabIndex: -1 }), CALENDAR_ICON_BUTTON_PROPS = {
|
|
27973
27969
|
padding: 2
|
|
27974
27970
|
}, Calendar$2 = forwardRef(function(props2, forwardedRef) {
|
|
27975
|
-
const $ = c(
|
|
27976
|
-
let
|
|
27971
|
+
const $ = c(145);
|
|
27972
|
+
let isPastDisabled, labels2, onSelect, restProps, selectTime, t0, t1, t2, t3, timeZoneScope, value;
|
|
27977
27973
|
$[0] !== props2 ? ({
|
|
27978
27974
|
selectTime,
|
|
27979
|
-
|
|
27980
|
-
selectedDate: savedSelectedDate,
|
|
27981
|
-
focusedDate: _focusedDate,
|
|
27975
|
+
value,
|
|
27982
27976
|
timeStep: t0,
|
|
27983
27977
|
onSelect,
|
|
27984
27978
|
labels: labels2,
|
|
@@ -27988,94 +27982,89 @@ const MONTH_PICKER_VARIANT = {
|
|
|
27988
27982
|
showTimeZone: t3,
|
|
27989
27983
|
timeZoneScope,
|
|
27990
27984
|
...restProps
|
|
27991
|
-
} = props2, $[0] = props2, $[1] =
|
|
27992
|
-
const timeStep = t0 === void 0 ? 1 : t0, monthPickerVariant = t1 === void 0 ? "select" : t1, padding = t2 === void 0 ? 2 : t2, showTimeZone = t3 === void 0 ? !1 : t3,
|
|
27985
|
+
} = props2, $[0] = props2, $[1] = isPastDisabled, $[2] = labels2, $[3] = onSelect, $[4] = restProps, $[5] = selectTime, $[6] = t0, $[7] = t1, $[8] = t2, $[9] = t3, $[10] = timeZoneScope, $[11] = value) : (isPastDisabled = $[1], labels2 = $[2], onSelect = $[3], restProps = $[4], selectTime = $[5], t0 = $[6], t1 = $[7], t2 = $[8], t3 = $[9], timeZoneScope = $[10], value = $[11]);
|
|
27986
|
+
const timeStep = t0 === void 0 ? 1 : t0, monthPickerVariant = t1 === void 0 ? "select" : t1, padding = t2 === void 0 ? 2 : t2, showTimeZone = t3 === void 0 ? !1 : t3, {
|
|
27993
27987
|
timeZone,
|
|
27994
|
-
zoneDateToUtc
|
|
27995
|
-
|
|
27988
|
+
zoneDateToUtc,
|
|
27989
|
+
utcToCurrentZoneDate
|
|
27990
|
+
} = useTimeZone(timeZoneScope);
|
|
27991
|
+
let t4;
|
|
27992
|
+
$[12] !== utcToCurrentZoneDate || $[13] !== value ? (t4 = utcToCurrentZoneDate(value), $[12] = utcToCurrentZoneDate, $[13] = value, $[14] = t4) : t4 = $[14];
|
|
27993
|
+
const currentTzDate = t4, [focusedDate, setFocusedDate] = useState(value);
|
|
27996
27994
|
let t5;
|
|
27997
|
-
$[
|
|
27998
|
-
timeZone:
|
|
27999
|
-
}), $
|
|
28000
|
-
|
|
28001
|
-
|
|
28002
|
-
|
|
28003
|
-
|
|
28004
|
-
|
|
28005
|
-
const t9 = Number(t8);
|
|
28006
|
-
let t10;
|
|
28007
|
-
$[20] !== t6 || $[21] !== t9 ? (t10 = [t6, t9], $[20] = t6, $[21] = t9, $[22] = t10) : t10 = $[22];
|
|
28008
|
-
const [displayMonth, displayYear] = t10, {
|
|
27995
|
+
$[15] !== focusedDate || $[16] !== timeZone?.name ? (t5 = () => [Number(format$1(focusedDate, "MM", {
|
|
27996
|
+
timeZone: timeZone?.name
|
|
27997
|
+
})) - 1, Number(format$1(focusedDate, "YYYY", {
|
|
27998
|
+
timeZone: timeZone?.name
|
|
27999
|
+
}))], $[15] = focusedDate, $[16] = timeZone?.name, $[17] = t5) : t5 = $[17];
|
|
28000
|
+
let t6;
|
|
28001
|
+
$[18] !== t5 ? (t6 = t5(), $[18] = t5, $[19] = t6) : t6 = $[19];
|
|
28002
|
+
const [displayMonth, displayYear] = t6, {
|
|
28009
28003
|
DialogTimeZone: DialogTimeZone2,
|
|
28010
28004
|
dialogProps,
|
|
28011
28005
|
dialogTimeZoneShow
|
|
28012
28006
|
} = useDialogTimeZone(timeZoneScope);
|
|
28007
|
+
let t7;
|
|
28008
|
+
$[20] !== focusedDate ? (t7 = (month) => setFocusedDate(setDate(setMonth(focusedDate, month), 1)), $[20] = focusedDate, $[21] = t7) : t7 = $[21];
|
|
28009
|
+
const setFocusedDateMonth = t7;
|
|
28010
|
+
let t8;
|
|
28011
|
+
$[22] !== setFocusedDateMonth ? (t8 = (e) => setFocusedDateMonth(Number(e.currentTarget.value)), $[22] = setFocusedDateMonth, $[23] = t8) : t8 = $[23];
|
|
28012
|
+
const handleFocusedMonthChange = t8;
|
|
28013
|
+
let t9;
|
|
28014
|
+
$[24] !== focusedDate ? (t9 = (by) => setFocusedDate(addMonths(focusedDate, by)), $[24] = focusedDate, $[25] = t9) : t9 = $[25];
|
|
28015
|
+
const moveFocusedDate = t9;
|
|
28016
|
+
let t10;
|
|
28017
|
+
$[26] !== focusedDate ? (t10 = (year) => setFocusedDate(setYear(focusedDate, year)), $[26] = focusedDate, $[27] = t10) : t10 = $[27];
|
|
28018
|
+
const setFocusedDateYear = t10;
|
|
28013
28019
|
let t11;
|
|
28014
|
-
$[
|
|
28015
|
-
|
|
28016
|
-
let t12;
|
|
28017
|
-
$[25] !== focusedDate || $[26] !== setFocusedDate ? (t12 = (month) => setFocusedDate(setDate(setMonth(focusedDate, month), 1)), $[25] = focusedDate, $[26] = setFocusedDate, $[27] = t12) : t12 = $[27];
|
|
28018
|
-
const setFocusedDateMonth = t12;
|
|
28019
|
-
let t13;
|
|
28020
|
-
$[28] !== setFocusedDateMonth ? (t13 = (e) => setFocusedDateMonth(Number(e.currentTarget.value)), $[28] = setFocusedDateMonth, $[29] = t13) : t13 = $[29];
|
|
28021
|
-
const handleFocusedMonthChange = t13;
|
|
28022
|
-
let t14;
|
|
28023
|
-
$[30] !== focusedDate || $[31] !== setFocusedDate ? (t14 = (by) => setFocusedDate(addMonths(focusedDate, by)), $[30] = focusedDate, $[31] = setFocusedDate, $[32] = t14) : t14 = $[32];
|
|
28024
|
-
const moveFocusedDate = t14;
|
|
28025
|
-
let t15;
|
|
28026
|
-
$[33] !== focusedDate || $[34] !== setFocusedDate ? (t15 = (year) => setFocusedDate(setYear(focusedDate, year)), $[33] = focusedDate, $[34] = setFocusedDate, $[35] = t15) : t15 = $[35];
|
|
28027
|
-
const setFocusedDateYear = t15;
|
|
28028
|
-
let t16;
|
|
28029
|
-
$[36] !== onSelect || $[37] !== savedSelectedDate || $[38] !== timeZone || $[39] !== zoneDateToUtc ? (t16 = (date_0) => {
|
|
28030
|
-
const newDate = setMinutes(setHours(date_0, savedSelectedDate.getHours()), savedSelectedDate.getMinutes());
|
|
28020
|
+
$[28] !== currentTzDate || $[29] !== onSelect || $[30] !== timeZone || $[31] !== zoneDateToUtc ? (t11 = (date) => {
|
|
28021
|
+
const newDate = setMinutes(setHours(date, currentTzDate.getHours()), currentTzDate.getMinutes());
|
|
28031
28022
|
if (!timeZone) {
|
|
28032
28023
|
onSelect(newDate);
|
|
28033
28024
|
return;
|
|
28034
28025
|
}
|
|
28035
|
-
const
|
|
28026
|
+
const utcDate = zoneDateToUtc(newDate);
|
|
28036
28027
|
onSelect(utcDate);
|
|
28037
|
-
}, $[
|
|
28038
|
-
const handleDateChange =
|
|
28039
|
-
let
|
|
28040
|
-
$[
|
|
28028
|
+
}, $[28] = currentTzDate, $[29] = onSelect, $[30] = timeZone, $[31] = zoneDateToUtc, $[32] = t11) : t11 = $[32];
|
|
28029
|
+
const handleDateChange = t11;
|
|
28030
|
+
let t12;
|
|
28031
|
+
$[33] !== currentTzDate || $[34] !== onSelect || $[35] !== timeZone || $[36] !== zoneDateToUtc ? (t12 = (hours, mins) => {
|
|
28041
28032
|
if (!timeZone) {
|
|
28042
|
-
onSelect(setHours(setMinutes(
|
|
28033
|
+
onSelect(setHours(setMinutes(currentTzDate, mins), hours));
|
|
28043
28034
|
return;
|
|
28044
28035
|
}
|
|
28045
|
-
const zonedDate = new TZDate(
|
|
28036
|
+
const zonedDate = new TZDate(currentTzDate, timeZone.name), newZonedDate = setHours(setMinutes(zonedDate, mins), hours), utcDate_0 = zoneDateToUtc(newZonedDate);
|
|
28046
28037
|
onSelect(utcDate_0);
|
|
28047
|
-
}, $[
|
|
28048
|
-
const handleTimeChange =
|
|
28049
|
-
let
|
|
28050
|
-
$[
|
|
28051
|
-
timeZone:
|
|
28052
|
-
}), $[
|
|
28053
|
-
|
|
28054
|
-
|
|
28055
|
-
|
|
28056
|
-
let t20, t21;
|
|
28057
|
-
$[51] !== timeFromDate ? (t20 = () => {
|
|
28038
|
+
}, $[33] = currentTzDate, $[34] = onSelect, $[35] = timeZone, $[36] = zoneDateToUtc, $[37] = t12) : t12 = $[37];
|
|
28039
|
+
const handleTimeChange = t12, t13 = timeZone?.name;
|
|
28040
|
+
let t14;
|
|
28041
|
+
$[38] !== currentTzDate || $[39] !== t13 ? (t14 = format$1(currentTzDate, "HH:mm", {
|
|
28042
|
+
timeZone: t13
|
|
28043
|
+
}), $[38] = currentTzDate, $[39] = t13, $[40] = t14) : t14 = $[40];
|
|
28044
|
+
const timeFromDate = t14, [timeValue, setTimeValue] = useState(timeFromDate);
|
|
28045
|
+
let t15, t16;
|
|
28046
|
+
$[41] !== timeFromDate ? (t15 = () => {
|
|
28058
28047
|
setTimeValue(timeFromDate);
|
|
28059
|
-
},
|
|
28060
|
-
let
|
|
28061
|
-
$[
|
|
28062
|
-
const
|
|
28063
|
-
if (
|
|
28064
|
-
const
|
|
28065
|
-
handleTimeChange(
|
|
28048
|
+
}, t16 = [timeFromDate], $[41] = timeFromDate, $[42] = t15, $[43] = t16) : (t15 = $[42], t16 = $[43]), useEffect(t15, t16);
|
|
28049
|
+
let t17;
|
|
28050
|
+
$[44] !== handleTimeChange ? (t17 = (event) => {
|
|
28051
|
+
const nextValue = event.currentTarget.value;
|
|
28052
|
+
if (nextValue) {
|
|
28053
|
+
const date_0 = parse(nextValue, "HH:mm", /* @__PURE__ */ new Date());
|
|
28054
|
+
handleTimeChange(date_0.getHours(), date_0.getMinutes());
|
|
28066
28055
|
} else
|
|
28067
28056
|
setTimeValue(void 0);
|
|
28068
|
-
}, $[
|
|
28069
|
-
const handleTimeChangeInputChange =
|
|
28070
|
-
let
|
|
28071
|
-
$[
|
|
28072
|
-
let
|
|
28073
|
-
$[
|
|
28057
|
+
}, $[44] = handleTimeChange, $[45] = t17) : t17 = $[45];
|
|
28058
|
+
const handleTimeChangeInputChange = t17, ref = useRef(null);
|
|
28059
|
+
let t18;
|
|
28060
|
+
$[46] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t18 = () => ref.current, $[46] = t18) : t18 = $[46], useImperativeHandle(forwardedRef, t18);
|
|
28061
|
+
let t19;
|
|
28062
|
+
$[47] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t19 = () => {
|
|
28074
28063
|
ref.current?.querySelector('[data-focused="true"]')?.focus();
|
|
28075
|
-
}, $[
|
|
28076
|
-
const focusCurrentWeekDay =
|
|
28077
|
-
let
|
|
28078
|
-
$[
|
|
28064
|
+
}, $[47] = t19) : t19 = $[47];
|
|
28065
|
+
const focusCurrentWeekDay = t19;
|
|
28066
|
+
let t20;
|
|
28067
|
+
$[48] !== focusedDate ? (t20 = (event_0) => {
|
|
28079
28068
|
if (!ARROW_KEYS$2.includes(event_0.key))
|
|
28080
28069
|
return;
|
|
28081
28070
|
const target = event_0.currentTarget;
|
|
@@ -28083,134 +28072,134 @@ const MONTH_PICKER_VARIANT = {
|
|
|
28083
28072
|
focusCurrentWeekDay();
|
|
28084
28073
|
return;
|
|
28085
28074
|
}
|
|
28086
|
-
event_0.key === "ArrowUp" &&
|
|
28087
|
-
}, $[
|
|
28088
|
-
const handleKeyDown =
|
|
28089
|
-
let
|
|
28090
|
-
$[
|
|
28075
|
+
event_0.key === "ArrowUp" && setFocusedDate(addDays(focusedDate, -7)), event_0.key === "ArrowDown" && setFocusedDate(addDays(focusedDate, 7)), event_0.key === "ArrowLeft" && setFocusedDate(addDays(focusedDate, -1)), event_0.key === "ArrowRight" && setFocusedDate(addDays(focusedDate, 1)), ref.current?.querySelector("[data-preserve-focus]")?.focus();
|
|
28076
|
+
}, $[48] = focusedDate, $[49] = t20) : t20 = $[49];
|
|
28077
|
+
const handleKeyDown = t20;
|
|
28078
|
+
let t21, t22;
|
|
28079
|
+
$[50] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t21 = () => {
|
|
28091
28080
|
focusCurrentWeekDay();
|
|
28092
|
-
},
|
|
28093
|
-
let
|
|
28094
|
-
$[
|
|
28081
|
+
}, t22 = [focusCurrentWeekDay], $[50] = t21, $[51] = t22) : (t21 = $[50], t22 = $[51]), useEffect(t21, t22);
|
|
28082
|
+
let t23;
|
|
28083
|
+
$[52] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t23 = () => {
|
|
28095
28084
|
document.activeElement?.matches("[data-calendar-grid], [data-calendar-grid] [data-preserve-focus]") && focusCurrentWeekDay();
|
|
28096
|
-
}, $[
|
|
28097
|
-
let
|
|
28098
|
-
$[
|
|
28099
|
-
let
|
|
28100
|
-
$[
|
|
28101
|
-
const handleYesterdayClick =
|
|
28102
|
-
let
|
|
28103
|
-
$[
|
|
28104
|
-
const handleTodayClick =
|
|
28105
|
-
let
|
|
28106
|
-
$[
|
|
28107
|
-
const handleTomorrowClick =
|
|
28108
|
-
let
|
|
28085
|
+
}, $[52] = t23) : t23 = $[52];
|
|
28086
|
+
let t24;
|
|
28087
|
+
$[53] !== focusedDate ? (t24 = [ref, focusCurrentWeekDay, focusedDate], $[53] = focusedDate, $[54] = t24) : t24 = $[54], useEffect(t23, t24);
|
|
28088
|
+
let t25;
|
|
28089
|
+
$[55] !== handleDateChange ? (t25 = () => handleDateChange(addDays(/* @__PURE__ */ new Date(), -1)), $[55] = handleDateChange, $[56] = t25) : t25 = $[56];
|
|
28090
|
+
const handleYesterdayClick = t25;
|
|
28091
|
+
let t26;
|
|
28092
|
+
$[57] !== handleDateChange ? (t26 = () => handleDateChange(/* @__PURE__ */ new Date()), $[57] = handleDateChange, $[58] = t26) : t26 = $[58];
|
|
28093
|
+
const handleTodayClick = t26;
|
|
28094
|
+
let t27;
|
|
28095
|
+
$[59] !== handleDateChange ? (t27 = () => handleDateChange(addDays(/* @__PURE__ */ new Date(), 1)), $[59] = handleDateChange, $[60] = t27) : t27 = $[60];
|
|
28096
|
+
const handleTomorrowClick = t27;
|
|
28097
|
+
let t28;
|
|
28109
28098
|
bb0: {
|
|
28110
28099
|
if (monthPickerVariant === "carousel") {
|
|
28111
|
-
let
|
|
28112
|
-
$[
|
|
28100
|
+
let t293;
|
|
28101
|
+
$[61] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t293 = {
|
|
28113
28102
|
borderBottom: "1px solid var(--card-border-color)",
|
|
28114
28103
|
minHeight: "55px",
|
|
28115
28104
|
position: "sticky",
|
|
28116
28105
|
top: 0
|
|
28117
|
-
}, $[
|
|
28118
|
-
const
|
|
28119
|
-
let
|
|
28120
|
-
$[
|
|
28121
|
-
let
|
|
28122
|
-
$[
|
|
28123
|
-
|
|
28106
|
+
}, $[61] = t293) : t293 = $[61];
|
|
28107
|
+
const t303 = labels2.monthNames[(focusedDate || /* @__PURE__ */ new Date())?.getMonth()];
|
|
28108
|
+
let t313;
|
|
28109
|
+
$[62] !== focusedDate ? (t313 = (focusedDate || /* @__PURE__ */ new Date())?.getFullYear(), $[62] = focusedDate, $[63] = t313) : t313 = $[63];
|
|
28110
|
+
let t323;
|
|
28111
|
+
$[64] !== t303 || $[65] !== t313 ? (t323 = /* @__PURE__ */ jsx(Flex, { align: "center", flex: 1, children: /* @__PURE__ */ jsxs(Text$1, { weight: "medium", size: 1, children: [
|
|
28112
|
+
t303,
|
|
28124
28113
|
" ",
|
|
28125
|
-
|
|
28126
|
-
] }) }), $[
|
|
28127
|
-
let
|
|
28128
|
-
$[
|
|
28129
|
-
let
|
|
28130
|
-
$[
|
|
28114
|
+
t313
|
|
28115
|
+
] }) }), $[64] = t303, $[65] = t313, $[66] = t323) : t323 = $[66];
|
|
28116
|
+
let t332;
|
|
28117
|
+
$[67] !== moveFocusedDate ? (t332 = () => moveFocusedDate(-1), $[67] = moveFocusedDate, $[68] = t332) : t332 = $[68];
|
|
28118
|
+
let t342;
|
|
28119
|
+
$[69] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t342 = {
|
|
28131
28120
|
content: "Previous month"
|
|
28132
|
-
}, $[
|
|
28133
|
-
let
|
|
28134
|
-
$[
|
|
28135
|
-
let
|
|
28136
|
-
$[
|
|
28137
|
-
let
|
|
28138
|
-
$[
|
|
28121
|
+
}, $[69] = t342) : t342 = $[69];
|
|
28122
|
+
let t352;
|
|
28123
|
+
$[70] !== t332 ? (t352 = /* @__PURE__ */ jsx(Button, { icon: ChevronLeftIcon, mode: "bleed", onClick: t332, "data-testid": "calendar-prev-month", tooltipProps: t342 }), $[70] = t332, $[71] = t352) : t352 = $[71];
|
|
28124
|
+
let t362;
|
|
28125
|
+
$[72] !== moveFocusedDate ? (t362 = () => moveFocusedDate(1), $[72] = moveFocusedDate, $[73] = t362) : t362 = $[73];
|
|
28126
|
+
let t372;
|
|
28127
|
+
$[74] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t372 = {
|
|
28139
28128
|
content: "Next month"
|
|
28140
|
-
}, $[
|
|
28141
|
-
let
|
|
28142
|
-
$[
|
|
28143
|
-
let
|
|
28144
|
-
$[
|
|
28145
|
-
|
|
28146
|
-
|
|
28147
|
-
] }) }), $[
|
|
28148
|
-
let
|
|
28149
|
-
$[
|
|
28150
|
-
|
|
28151
|
-
|
|
28152
|
-
] }) }), $[
|
|
28129
|
+
}, $[74] = t372) : t372 = $[74];
|
|
28130
|
+
let t382;
|
|
28131
|
+
$[75] !== t362 ? (t382 = /* @__PURE__ */ jsx(Button, { icon: ChevronRightIcon, mode: "bleed", onClick: t362, "data-testid": "calendar-next-month", tooltipProps: t372 }), $[75] = t362, $[76] = t382) : t382 = $[76];
|
|
28132
|
+
let t39;
|
|
28133
|
+
$[77] !== t352 || $[78] !== t382 ? (t39 = /* @__PURE__ */ jsx(Flex, { paddingRight: 3, gap: 2, children: /* @__PURE__ */ jsxs(TooltipDelayGroupProvider, { children: [
|
|
28134
|
+
t352,
|
|
28135
|
+
t382
|
|
28136
|
+
] }) }), $[77] = t352, $[78] = t382, $[79] = t39) : t39 = $[79];
|
|
28137
|
+
let t40;
|
|
28138
|
+
$[80] !== t323 || $[81] !== t39 ? (t40 = /* @__PURE__ */ jsx(Flex, { align: "center", paddingLeft: 4, style: t293, children: /* @__PURE__ */ jsxs(Flex, { align: "center", flex: 1, justify: "space-between", children: [
|
|
28139
|
+
t323,
|
|
28140
|
+
t39
|
|
28141
|
+
] }) }), $[80] = t323, $[81] = t39, $[82] = t40) : t40 = $[82], t28 = t40;
|
|
28153
28142
|
break bb0;
|
|
28154
28143
|
}
|
|
28155
|
-
let
|
|
28156
|
-
$[
|
|
28157
|
-
let
|
|
28158
|
-
$[
|
|
28144
|
+
let t292;
|
|
28145
|
+
$[83] !== displayMonth || $[84] !== handleFocusedMonthChange || $[85] !== labels2.monthNames ? (t292 = /* @__PURE__ */ jsx(Box, { flex: 1, children: /* @__PURE__ */ jsx(CalendarMonthSelect$1, { onChange: handleFocusedMonthChange, monthNames: labels2.monthNames, value: displayMonth }) }), $[83] = displayMonth, $[84] = handleFocusedMonthChange, $[85] = labels2.monthNames, $[86] = t292) : t292 = $[86];
|
|
28146
|
+
let t302;
|
|
28147
|
+
$[87] !== labels2.goToNextYear || $[88] !== labels2.goToPreviousYear ? (t302 = {
|
|
28159
28148
|
goToNextYear: labels2.goToNextYear,
|
|
28160
28149
|
goToPreviousYear: labels2.goToPreviousYear
|
|
28161
|
-
}, $[
|
|
28162
|
-
let
|
|
28163
|
-
$[
|
|
28164
|
-
let
|
|
28165
|
-
$[
|
|
28166
|
-
|
|
28167
|
-
|
|
28168
|
-
] }), $[
|
|
28169
|
-
}
|
|
28170
|
-
const monthPicker =
|
|
28171
|
-
let
|
|
28172
|
-
$[
|
|
28173
|
-
const handleNowClick =
|
|
28174
|
-
let
|
|
28175
|
-
$[
|
|
28176
|
-
let
|
|
28177
|
-
$[
|
|
28178
|
-
let
|
|
28179
|
-
$[
|
|
28180
|
-
|
|
28150
|
+
}, $[87] = labels2.goToNextYear, $[88] = labels2.goToPreviousYear, $[89] = t302) : t302 = $[89];
|
|
28151
|
+
let t312;
|
|
28152
|
+
$[90] !== displayYear || $[91] !== moveFocusedDate || $[92] !== setFocusedDateYear || $[93] !== t302 ? (t312 = /* @__PURE__ */ jsx(Box, { marginLeft: 2, children: /* @__PURE__ */ jsx(CalendarYearSelect$1, { moveFocusedDate, labels: t302, onChange: setFocusedDateYear, value: displayYear }) }), $[90] = displayYear, $[91] = moveFocusedDate, $[92] = setFocusedDateYear, $[93] = t302, $[94] = t312) : t312 = $[94];
|
|
28153
|
+
let t322;
|
|
28154
|
+
$[95] !== t292 || $[96] !== t312 ? (t322 = /* @__PURE__ */ jsxs(Flex, { children: [
|
|
28155
|
+
t292,
|
|
28156
|
+
t312
|
|
28157
|
+
] }), $[95] = t292, $[96] = t312, $[97] = t322) : t322 = $[97], t28 = t322;
|
|
28158
|
+
}
|
|
28159
|
+
const monthPicker = t28;
|
|
28160
|
+
let t29;
|
|
28161
|
+
$[98] !== onSelect ? (t29 = () => onSelect(/* @__PURE__ */ new Date()), $[98] = onSelect, $[99] = t29) : t29 = $[99];
|
|
28162
|
+
const handleNowClick = t29;
|
|
28163
|
+
let t30;
|
|
28164
|
+
$[100] !== handleTodayClick || $[101] !== handleTomorrowClick || $[102] !== handleYesterdayClick || $[103] !== labels2.goToToday || $[104] !== labels2.goToTomorrow || $[105] !== labels2.goToYesterday ? (t30 = features$1.dayPresets, $[100] = handleTodayClick, $[101] = handleTomorrowClick, $[102] = handleYesterdayClick, $[103] = labels2.goToToday, $[104] = labels2.goToTomorrow, $[105] = labels2.goToYesterday, $[106] = t30) : t30 = $[106];
|
|
28165
|
+
let t31;
|
|
28166
|
+
$[107] !== currentTzDate || $[108] !== focusedDate || $[109] !== handleDateChange || $[110] !== isPastDisabled || $[111] !== labels2.weekDayNamesShort ? (t31 = /* @__PURE__ */ jsx(CalendarMonth$3, { weekDayNames: labels2.weekDayNamesShort, date: focusedDate, focused: focusedDate, onSelect: handleDateChange, selected: currentTzDate, isPastDisabled }), $[107] = currentTzDate, $[108] = focusedDate, $[109] = handleDateChange, $[110] = isPastDisabled, $[111] = labels2.weekDayNamesShort, $[112] = t31) : t31 = $[112];
|
|
28167
|
+
let t32;
|
|
28168
|
+
$[113] !== handleKeyDown || $[114] !== t31 ? (t32 = /* @__PURE__ */ jsxs(Box, { "data-calendar-grid": !0, onKeyDown: handleKeyDown, marginY: 2, overflow: "hidden", tabIndex: 0, children: [
|
|
28169
|
+
t31,
|
|
28181
28170
|
PRESERVE_FOCUS_ELEMENT$3
|
|
28182
|
-
] }), $[
|
|
28183
|
-
let
|
|
28184
|
-
$[
|
|
28185
|
-
|
|
28171
|
+
] }), $[113] = handleKeyDown, $[114] = t31, $[115] = t32) : t32 = $[115];
|
|
28172
|
+
let t33;
|
|
28173
|
+
$[116] !== monthPicker || $[117] !== padding || $[118] !== t30 || $[119] !== t32 ? (t33 = /* @__PURE__ */ jsxs(Box, { padding, children: [
|
|
28174
|
+
t30,
|
|
28186
28175
|
monthPicker,
|
|
28187
|
-
|
|
28188
|
-
] }), $[
|
|
28189
|
-
let
|
|
28190
|
-
$[
|
|
28176
|
+
t32
|
|
28177
|
+
] }), $[116] = monthPicker, $[117] = padding, $[118] = t30, $[119] = t32, $[120] = t33) : t33 = $[120];
|
|
28178
|
+
let t34;
|
|
28179
|
+
$[121] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t34 = {
|
|
28191
28180
|
borderTop: "1px solid var(--card-border-color)"
|
|
28192
|
-
}, $[
|
|
28193
|
-
let
|
|
28194
|
-
$[
|
|
28181
|
+
}, $[121] = t34) : t34 = $[121];
|
|
28182
|
+
let t35;
|
|
28183
|
+
$[122] !== currentTzDate || $[123] !== dialogTimeZoneShow || $[124] !== handleNowClick || $[125] !== handleTimeChange || $[126] !== handleTimeChangeInputChange || $[127] !== labels2 || $[128] !== selectTime || $[129] !== showTimeZone || $[130] !== timeStep || $[131] !== timeValue || $[132] !== timeZone?.abbreviation ? (t35 = selectTime && /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
28195
28184
|
/* @__PURE__ */ jsxs(Flex, { align: "center", children: [
|
|
28196
28185
|
/* @__PURE__ */ jsx(TimeInput, { "aria-label": labels2.selectTime, value: timeValue, onChange: handleTimeChangeInputChange, step: timeStep * 60 }),
|
|
28197
28186
|
/* @__PURE__ */ jsx(Box, { marginLeft: 2, children: /* @__PURE__ */ jsx(Button, { text: labels2.setToCurrentTime, mode: "bleed", onClick: handleNowClick }) })
|
|
28198
28187
|
] }),
|
|
28199
28188
|
showTimeZone && /* @__PURE__ */ jsx(Button, { icon: EarthGlobeIcon, mode: "bleed", size: "default", text: `${timeZone?.abbreviation}`, onClick: dialogTimeZoneShow }),
|
|
28200
28189
|
features$1.timePresets
|
|
28201
|
-
] }), $[
|
|
28202
|
-
let
|
|
28203
|
-
$[
|
|
28204
|
-
let
|
|
28205
|
-
$[
|
|
28206
|
-
|
|
28207
|
-
|
|
28208
|
-
] }) }), $[
|
|
28209
|
-
let
|
|
28210
|
-
return $[
|
|
28211
|
-
|
|
28212
|
-
|
|
28213
|
-
] }), $[
|
|
28190
|
+
] }), $[122] = currentTzDate, $[123] = dialogTimeZoneShow, $[124] = handleNowClick, $[125] = handleTimeChange, $[126] = handleTimeChangeInputChange, $[127] = labels2, $[128] = selectTime, $[129] = showTimeZone, $[130] = timeStep, $[131] = timeValue, $[132] = timeZone?.abbreviation, $[133] = t35) : t35 = $[133];
|
|
28191
|
+
let t36;
|
|
28192
|
+
$[134] !== DialogTimeZone2 || $[135] !== dialogProps || $[136] !== showTimeZone ? (t36 = showTimeZone && DialogTimeZone2 && /* @__PURE__ */ jsx(DialogTimeZone2, { ...dialogProps }), $[134] = DialogTimeZone2, $[135] = dialogProps, $[136] = showTimeZone, $[137] = t36) : t36 = $[137];
|
|
28193
|
+
let t37;
|
|
28194
|
+
$[138] !== t35 || $[139] !== t36 ? (t37 = /* @__PURE__ */ jsx(Box, { padding: 2, style: t34, children: /* @__PURE__ */ jsxs(Flex, { align: "center", justify: "space-between", children: [
|
|
28195
|
+
t35,
|
|
28196
|
+
t36
|
|
28197
|
+
] }) }), $[138] = t35, $[139] = t36, $[140] = t37) : t37 = $[140];
|
|
28198
|
+
let t38;
|
|
28199
|
+
return $[141] !== restProps || $[142] !== t33 || $[143] !== t37 ? (t38 = /* @__PURE__ */ jsxs(Box, { "data-testid": "calendar", "data-ui": "Calendar", ...restProps, ref, children: [
|
|
28200
|
+
t33,
|
|
28201
|
+
t37
|
|
28202
|
+
] }), $[141] = restProps, $[142] = t33, $[143] = t37, $[144] = t38) : t38 = $[144], t38;
|
|
28214
28203
|
});
|
|
28215
28204
|
function CalendarMonthSelect$1(props2) {
|
|
28216
28205
|
const $ = c(6), {
|
|
@@ -28265,7 +28254,7 @@ function CalendarYearSelect$1(props2) {
|
|
|
28265
28254
|
] }), $[16] = t3, $[17] = t5, $[18] = t7, $[19] = t8) : t8 = $[19], t8;
|
|
28266
28255
|
}
|
|
28267
28256
|
const DatePicker$2 = forwardRef(function(props2, ref) {
|
|
28268
|
-
const $ = c(
|
|
28257
|
+
const $ = c(20);
|
|
28269
28258
|
let _value, calendarLabels, onChange, rest, t0, t1, timeZoneScope;
|
|
28270
28259
|
$[0] !== props2 ? ({
|
|
28271
28260
|
value: _value,
|
|
@@ -28286,21 +28275,14 @@ const DatePicker$2 = forwardRef(function(props2, ref) {
|
|
|
28286
28275
|
let now;
|
|
28287
28276
|
$[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (now = /* @__PURE__ */ new Date(), now.setSeconds(0, 0), $[8] = now) : now = $[8], t2 = now;
|
|
28288
28277
|
}
|
|
28289
|
-
const value = t2
|
|
28290
|
-
utcToCurrentZoneDate
|
|
28291
|
-
} = useTimeZone(timeZoneScope), [focusedDate, setFocusedDay] = useState();
|
|
28278
|
+
const value = t2;
|
|
28292
28279
|
let t3;
|
|
28293
28280
|
$[9] !== onChange ? (t3 = (nextDate) => {
|
|
28294
|
-
onChange(nextDate)
|
|
28281
|
+
onChange(nextDate);
|
|
28295
28282
|
}, $[9] = onChange, $[10] = t3) : t3 = $[10];
|
|
28296
28283
|
const handleSelect = t3;
|
|
28297
28284
|
let t4;
|
|
28298
|
-
$[11] !==
|
|
28299
|
-
const t5 = focusedDate || value;
|
|
28300
|
-
let t6;
|
|
28301
|
-
$[14] !== t5 || $[15] !== utcToCurrentZoneDate ? (t6 = utcToCurrentZoneDate(t5), $[14] = t5, $[15] = utcToCurrentZoneDate, $[16] = t6) : t6 = $[16];
|
|
28302
|
-
let t7;
|
|
28303
|
-
return $[17] !== calendarLabels || $[18] !== handleSelect || $[19] !== padding || $[20] !== ref || $[21] !== rest || $[22] !== showTimeZone || $[23] !== t4 || $[24] !== t6 || $[25] !== timeZoneScope ? (t7 = /* @__PURE__ */ jsx(Calendar$2, { ...rest, labels: calendarLabels, ref, selectedDate: t4, onSelect: handleSelect, focusedDate: t6, onFocusedDateChange: setFocusedDay, padding, showTimeZone, timeZoneScope }), $[17] = calendarLabels, $[18] = handleSelect, $[19] = padding, $[20] = ref, $[21] = rest, $[22] = showTimeZone, $[23] = t4, $[24] = t6, $[25] = timeZoneScope, $[26] = t7) : t7 = $[26], t7;
|
|
28285
|
+
return $[11] !== calendarLabels || $[12] !== handleSelect || $[13] !== padding || $[14] !== ref || $[15] !== rest || $[16] !== showTimeZone || $[17] !== timeZoneScope || $[18] !== value ? (t4 = /* @__PURE__ */ jsx(Calendar$2, { ...rest, labels: calendarLabels, ref, value, onSelect: handleSelect, padding, showTimeZone, timeZoneScope }), $[11] = calendarLabels, $[12] = handleSelect, $[13] = padding, $[14] = ref, $[15] = rest, $[16] = showTimeZone, $[17] = timeZoneScope, $[18] = value, $[19] = t4) : t4 = $[19], t4;
|
|
28304
28286
|
}), DateTimeInput$3 = forwardRef(function(props2, forwardedRef) {
|
|
28305
28287
|
const $ = c(55);
|
|
28306
28288
|
let calendarLabels, disableInput, inputValue, isPastDisabled, monthPickerVariant, onChange, onInputChange, padding, readOnly, rest, selectTime, t0, t1, timeStep, timeZoneScope, value;
|