@theroutingcompany/components 0.0.66-alpha.3 → 0.0.66-alpha.5
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/trc-components.es.js +43 -39
- package/dist/trc-components.es.js.map +1 -1
- package/dist/trc-components.umd.js +2 -2
- package/dist/trc-components.umd.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/types/components/Calendar/CalendarGrid.d.ts +1 -0
- package/types/components/Calendar/RangeCalendar.d.ts +1 -0
|
@@ -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
|
}
|
|
@@ -14229,7 +14232,9 @@ function nd({
|
|
|
14229
14232
|
e.anchorDate !== void 0 && e.anchorDate !== null ? X9({
|
|
14230
14233
|
date: h,
|
|
14231
14234
|
// @ts-expect-error we are checking for null in the ternary condition
|
|
14232
|
-
anchorDate: e.anchorDate
|
|
14235
|
+
anchorDate: e.anchorDate,
|
|
14236
|
+
min: t.maxDays,
|
|
14237
|
+
max: t.maxDays
|
|
14233
14238
|
}) || ((g = t.isDateUnavailable) == null ? void 0 : g.call(t, h)) : !1
|
|
14234
14239
|
);
|
|
14235
14240
|
return /* @__PURE__ */ x(
|
|
@@ -14830,45 +14835,44 @@ function VB({
|
|
|
14830
14835
|
timeZone: e,
|
|
14831
14836
|
...t
|
|
14832
14837
|
}) {
|
|
14833
|
-
const { locale: r } = Ze(), n = t.width ?? "fit-content"
|
|
14834
|
-
console.log("props: ", t);
|
|
14835
|
-
const o = gn(e), a = a8({
|
|
14838
|
+
const { locale: r } = Ze(), n = t.width ?? "fit-content", o = t.maxDays ?? 6, a = gn(e), i = a8({
|
|
14836
14839
|
...t,
|
|
14837
14840
|
visibleDuration: { months: 2 },
|
|
14838
14841
|
locale: r,
|
|
14839
14842
|
createCalendar: Q0,
|
|
14840
|
-
defaultFocusedValue:
|
|
14841
|
-
}),
|
|
14843
|
+
defaultFocusedValue: a
|
|
14844
|
+
}), s = K(null), { calendarProps: l, prevButtonProps: c, nextButtonProps: d } = j9(
|
|
14842
14845
|
t,
|
|
14843
|
-
|
|
14844
|
-
|
|
14846
|
+
i,
|
|
14847
|
+
s
|
|
14845
14848
|
);
|
|
14846
|
-
return
|
|
14849
|
+
return /* @__PURE__ */ oe(
|
|
14847
14850
|
i8,
|
|
14848
14851
|
{
|
|
14849
14852
|
width: n,
|
|
14850
14853
|
p: u.spacing_100,
|
|
14851
|
-
...
|
|
14852
|
-
ref:
|
|
14854
|
+
...l,
|
|
14855
|
+
ref: s,
|
|
14853
14856
|
children: [
|
|
14854
14857
|
/* @__PURE__ */ x(
|
|
14855
14858
|
o8,
|
|
14856
14859
|
{
|
|
14857
|
-
state:
|
|
14858
|
-
calendarProps:
|
|
14859
|
-
prevButtonProps:
|
|
14860
|
-
nextButtonProps:
|
|
14860
|
+
state: i,
|
|
14861
|
+
calendarProps: l,
|
|
14862
|
+
prevButtonProps: c,
|
|
14863
|
+
nextButtonProps: d
|
|
14861
14864
|
}
|
|
14862
14865
|
),
|
|
14863
14866
|
/* @__PURE__ */ oe(Ft, { gap: u.spacing_400, justifyContent: "space-between", children: [
|
|
14864
|
-
/* @__PURE__ */ x(nd, { state:
|
|
14867
|
+
/* @__PURE__ */ x(nd, { state: i, timeZone: e, isDateUnavailable: t.isDateUnavailable, maxDays: o }),
|
|
14865
14868
|
/* @__PURE__ */ x(
|
|
14866
14869
|
nd,
|
|
14867
14870
|
{
|
|
14868
|
-
state:
|
|
14871
|
+
state: i,
|
|
14869
14872
|
offset: { months: 1 },
|
|
14870
14873
|
timeZone: e,
|
|
14871
|
-
isDateUnavailable: t.isDateUnavailable
|
|
14874
|
+
isDateUnavailable: t.isDateUnavailable,
|
|
14875
|
+
maxDays: o
|
|
14872
14876
|
}
|
|
14873
14877
|
)
|
|
14874
14878
|
] })
|