@theroutingcompany/components 0.0.66-alpha.2 → 0.0.66-alpha.4
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.
|
@@ -14160,20 +14160,22 @@ const H9 = M.td`
|
|
|
14160
14160
|
}
|
|
14161
14161
|
`;
|
|
14162
14162
|
function q9({
|
|
14163
|
-
|
|
14164
|
-
|
|
14165
|
-
|
|
14166
|
-
|
|
14167
|
-
|
|
14168
|
-
|
|
14163
|
+
isUnavailable: e,
|
|
14164
|
+
isDisabled: t,
|
|
14165
|
+
isSelectionStart: r,
|
|
14166
|
+
isSelectionEnd: n,
|
|
14167
|
+
isFocusVisible: o,
|
|
14168
|
+
isSelected: a,
|
|
14169
|
+
isToday: i
|
|
14169
14170
|
}) {
|
|
14170
14171
|
return [
|
|
14171
14172
|
e && "disabled",
|
|
14172
|
-
t && "
|
|
14173
|
-
r && "selection-
|
|
14174
|
-
|
|
14175
|
-
|
|
14176
|
-
|
|
14173
|
+
t && "disabled",
|
|
14174
|
+
r && "selection-start",
|
|
14175
|
+
n && "selection-end",
|
|
14176
|
+
a && "selected",
|
|
14177
|
+
o && "focused",
|
|
14178
|
+
i && "today"
|
|
14177
14179
|
].filter(Boolean).join(" ");
|
|
14178
14180
|
}
|
|
14179
14181
|
function Z9({
|
|
@@ -14184,23 +14186,24 @@ function Z9({
|
|
|
14184
14186
|
currentMonth: o,
|
|
14185
14187
|
single: a
|
|
14186
14188
|
}) {
|
|
14187
|
-
const i = K(null), { cellProps: s, buttonProps: l, isSelected: c, isDisabled: d,
|
|
14189
|
+
const i = K(null), { cellProps: s, buttonProps: l, isSelected: c, isDisabled: d, isUnavailable: f, formattedDate: p } = W9({ date: t, isDisabled: n }, e, i), m = !T4(o, t), h = e.highlightedRange ? Ne(t, e.highlightedRange.start) : c, b = e.highlightedRange ? Ne(t, e.highlightedRange.end) : c, { locale: g } = Ze(), $ = Ps(t, g), v = c && (h || $ === 0 || t.day === 1), y = c && (b || $ === 6 || t.day === t.calendar.getDaysInMonth(t)), w = [v && "left", y && "right"].filter(Boolean).join(" "), { focusProps: P, isFocusVisible: F } = bn(), T = Ne(t, r), _ = q9({
|
|
14190
|
+
isUnavailable: f,
|
|
14188
14191
|
isDisabled: d,
|
|
14189
14192
|
isSelected: c,
|
|
14190
|
-
isSelectionStart:
|
|
14191
|
-
isSelectionEnd:
|
|
14192
|
-
isFocusVisible:
|
|
14193
|
-
isToday:
|
|
14193
|
+
isSelectionStart: h,
|
|
14194
|
+
isSelectionEnd: b,
|
|
14195
|
+
isFocusVisible: F,
|
|
14196
|
+
isToday: T
|
|
14194
14197
|
});
|
|
14195
14198
|
return /* @__PURE__ */ x(H9, { ...s, children: /* @__PURE__ */ x(
|
|
14196
14199
|
G9,
|
|
14197
14200
|
{
|
|
14198
|
-
...$e(l,
|
|
14201
|
+
...$e(l, P),
|
|
14199
14202
|
ref: i,
|
|
14200
|
-
hidden:
|
|
14201
|
-
"data-rounded":
|
|
14202
|
-
"data-state":
|
|
14203
|
-
children: /* @__PURE__ */ x(Y9, { "data-state":
|
|
14203
|
+
hidden: m,
|
|
14204
|
+
"data-rounded": w,
|
|
14205
|
+
"data-state": _,
|
|
14206
|
+
children: /* @__PURE__ */ x(Y9, { "data-state": _, single: a, children: p })
|
|
14204
14207
|
}
|
|
14205
14208
|
) });
|
|
14206
14209
|
}
|
|
@@ -14221,15 +14224,16 @@ function nd({
|
|
|
14221
14224
|
/* @__PURE__ */ x("th", { style: { textAlign: "center" }, children: m }, h)
|
|
14222
14225
|
)) }) }),
|
|
14223
14226
|
/* @__PURE__ */ x("tbody", { children: [...Array.from({ length: p }).keys()].map((m) => /* @__PURE__ */ x("tr", { children: e.getDatesInWeek(m, i).map((h, b) => {
|
|
14227
|
+
var g;
|
|
14224
14228
|
if (h) {
|
|
14225
|
-
const
|
|
14229
|
+
const $ = (
|
|
14226
14230
|
// lies, we have to check undefined too because CalendarState (single calendar view)
|
|
14227
14231
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
14228
14232
|
e.anchorDate !== void 0 && e.anchorDate !== null ? X9({
|
|
14229
14233
|
date: h,
|
|
14230
14234
|
// @ts-expect-error we are checking for null in the ternary condition
|
|
14231
14235
|
anchorDate: e.anchorDate
|
|
14232
|
-
}) : !1
|
|
14236
|
+
}) || ((g = t.isDateUnavailable) == null ? void 0 : g.call(t, h)) : !1
|
|
14233
14237
|
);
|
|
14234
14238
|
return /* @__PURE__ */ x(
|
|
14235
14239
|
Z9,
|
|
@@ -14237,7 +14241,7 @@ function nd({
|
|
|
14237
14241
|
state: e,
|
|
14238
14242
|
date: h,
|
|
14239
14243
|
today: l,
|
|
14240
|
-
disabled:
|
|
14244
|
+
disabled: $,
|
|
14241
14245
|
currentMonth: i,
|
|
14242
14246
|
single: o
|
|
14243
14247
|
},
|
|
@@ -14860,13 +14864,14 @@ function VB({
|
|
|
14860
14864
|
}
|
|
14861
14865
|
),
|
|
14862
14866
|
/* @__PURE__ */ oe(Ft, { gap: u.spacing_400, justifyContent: "space-between", children: [
|
|
14863
|
-
/* @__PURE__ */ x(nd, { state: a, timeZone: e }),
|
|
14867
|
+
/* @__PURE__ */ x(nd, { state: a, timeZone: e, isDateUnavailable: t.isDateUnavailable }),
|
|
14864
14868
|
/* @__PURE__ */ x(
|
|
14865
14869
|
nd,
|
|
14866
14870
|
{
|
|
14867
14871
|
state: a,
|
|
14868
14872
|
offset: { months: 1 },
|
|
14869
|
-
timeZone: e
|
|
14873
|
+
timeZone: e,
|
|
14874
|
+
isDateUnavailable: t.isDateUnavailable
|
|
14870
14875
|
}
|
|
14871
14876
|
)
|
|
14872
14877
|
] })
|