kiban-design-system 3.12.0 → 3.13.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/dist/components/table-search-filters.d.ts +34 -0
- package/dist/components/table-search-filters.d.ts.map +1 -0
- package/dist/components/table-search-filters.js +222 -0
- package/dist/components/totalizer.d.ts.map +1 -1
- package/dist/components/totalizer.js +6 -1
- package/dist/components/ui/calendar.d.ts +9 -0
- package/dist/components/ui/calendar.d.ts.map +1 -0
- package/dist/components/ui/calendar.js +56 -0
- package/dist/components/ui/popover.d.ts +11 -0
- package/dist/components/ui/popover.d.ts.map +1 -0
- package/dist/components/ui/popover.js +81 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +99 -87
- package/dist/node_modules/@date-fns/tz/date/index.js +61 -0
- package/dist/node_modules/@date-fns/tz/date/mini.js +69 -0
- package/dist/node_modules/@date-fns/tz/tzName/index.js +11 -0
- package/dist/node_modules/@date-fns/tz/tzOffset/index.js +22 -0
- package/dist/node_modules/@radix-ui/react-popover/dist/index.js +240 -0
- package/dist/node_modules/date-fns/_lib/addLeadingZeros.js +7 -0
- package/dist/node_modules/date-fns/_lib/defaultOptions.js +7 -0
- package/dist/node_modules/date-fns/_lib/format/formatters.js +548 -0
- package/dist/node_modules/date-fns/_lib/format/lightFormatters.js +58 -0
- package/dist/node_modules/date-fns/_lib/format/longFormatters.js +49 -0
- package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +18 -0
- package/dist/node_modules/date-fns/_lib/normalizeDates.js +11 -0
- package/dist/node_modules/date-fns/_lib/normalizeInterval.js +8 -0
- package/dist/node_modules/date-fns/_lib/protectedTokens.js +20 -0
- package/dist/node_modules/date-fns/addDays.js +9 -0
- package/dist/node_modules/date-fns/addMonths.js +19 -0
- package/dist/node_modules/date-fns/addWeeks.js +7 -0
- package/dist/node_modules/date-fns/addYears.js +7 -0
- package/dist/node_modules/date-fns/constants.js +8 -0
- package/dist/node_modules/date-fns/constructFrom.js +7 -0
- package/dist/node_modules/date-fns/differenceInCalendarDays.js +15 -0
- package/dist/node_modules/date-fns/differenceInCalendarMonths.js +12 -0
- package/dist/node_modules/date-fns/eachMonthOfInterval.js +16 -0
- package/dist/node_modules/date-fns/eachYearOfInterval.js +16 -0
- package/dist/node_modules/date-fns/endOfISOWeek.js +7 -0
- package/dist/node_modules/date-fns/endOfMonth.js +8 -0
- package/dist/node_modules/date-fns/endOfWeek.js +9 -0
- package/dist/node_modules/date-fns/endOfYear.js +8 -0
- package/dist/node_modules/date-fns/format.js +57 -0
- package/dist/node_modules/date-fns/getDayOfYear.js +10 -0
- package/dist/node_modules/date-fns/getDaysInMonth.js +9 -0
- package/dist/node_modules/date-fns/getISOWeek.js +11 -0
- package/dist/node_modules/date-fns/getISOWeekYear.js +14 -0
- package/dist/node_modules/date-fns/getMonth.js +7 -0
- package/dist/node_modules/date-fns/getWeek.js +11 -0
- package/dist/node_modules/date-fns/getWeekYear.js +15 -0
- package/dist/node_modules/date-fns/getYear.js +7 -0
- package/dist/node_modules/date-fns/isAfter.js +7 -0
- package/dist/node_modules/date-fns/isBefore.js +7 -0
- package/dist/node_modules/date-fns/isDate.js +6 -0
- package/dist/node_modules/date-fns/isSameDay.js +13 -0
- package/dist/node_modules/date-fns/isSameMonth.js +12 -0
- package/dist/node_modules/date-fns/isSameYear.js +12 -0
- package/dist/node_modules/date-fns/isValid.js +8 -0
- package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +9 -0
- package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +18 -0
- package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js +31 -0
- package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +15 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +70 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js +33 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +11 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js +155 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/match.js +110 -0
- package/dist/node_modules/date-fns/locale/en-US.js +20 -0
- package/dist/node_modules/date-fns/max.js +13 -0
- package/dist/node_modules/date-fns/min.js +13 -0
- package/dist/node_modules/date-fns/parseISO.js +121 -0
- package/dist/node_modules/date-fns/setMonth.js +12 -0
- package/dist/node_modules/date-fns/setYear.js +9 -0
- package/dist/node_modules/date-fns/startOfDay.js +8 -0
- package/dist/node_modules/date-fns/startOfISOWeek.js +7 -0
- package/dist/node_modules/date-fns/startOfISOWeekYear.js +10 -0
- package/dist/node_modules/date-fns/startOfMonth.js +8 -0
- package/dist/node_modules/date-fns/startOfWeek.js +9 -0
- package/dist/node_modules/date-fns/startOfWeekYear.js +11 -0
- package/dist/node_modules/date-fns/startOfYear.js +8 -0
- package/dist/node_modules/date-fns/toDate.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/DayPicker.js +234 -0
- package/dist/node_modules/react-day-picker/dist/esm/UI.js +22 -0
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarDay.js +19 -0
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarMonth.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarWeek.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/classes/DateLib.js +148 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Button.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/CaptionLabel.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Chevron.js +18 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Day.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/DayButton.js +10 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Dropdown.js +19 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/DropdownNav.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Footer.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Month.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthCaption.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthGrid.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Months.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthsDropdown.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Nav.js +27 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/NextMonthButton.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Option.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/PreviousMonthButton.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Root.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Select.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Week.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/WeekNumber.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/WeekNumberHeader.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Weekday.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Weekdays.js +11 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Weeks.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/YearsDropdown.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/custom-components.js +54 -0
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatCaption.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatDay.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.js +6 -0
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/formatters/index.js +18 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.js +19 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.js +42 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getComponents.js +10 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDataAttributes.js +16 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDates.js +19 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDays.js +10 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.js +16 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.js +13 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.js +15 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getFormatters.js +10 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.js +13 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getLabels.js +34 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.js +13 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getMonths.js +24 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNavMonth.js +13 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNextFocus.js +12 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNextMonth.js +12 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getPreviousMonth.js +12 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.js +13 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getWeekdays.js +11 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getWeeks.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js +16 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/useControlledValue.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/index.js +26 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelDayButton.js +10 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelGrid.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelGridcell.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.js +6 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelNav.js +6 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelNext.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelPrevious.js +6 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.js +6 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.js +6 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekday.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.js +6 -0
- package/dist/node_modules/react-day-picker/dist/esm/locale/en-US.js +37 -0
- package/dist/node_modules/react-day-picker/dist/esm/noonDateLib.js +104 -0
- package/dist/node_modules/react-day-picker/dist/esm/selection/useMulti.js +21 -0
- package/dist/node_modules/react-day-picker/dist/esm/selection/useRange.js +18 -0
- package/dist/node_modules/react-day-picker/dist/esm/selection/useSingle.js +15 -0
- package/dist/node_modules/react-day-picker/dist/esm/useAnimation.js +56 -0
- package/dist/node_modules/react-day-picker/dist/esm/useCalendar.js +75 -0
- package/dist/node_modules/react-day-picker/dist/esm/useDayPicker.js +12 -0
- package/dist/node_modules/react-day-picker/dist/esm/useFocus.js +23 -0
- package/dist/node_modules/react-day-picker/dist/esm/useSelection.js +19 -0
- package/dist/node_modules/react-day-picker/dist/esm/utils/addToRange.js +32 -0
- package/dist/node_modules/react-day-picker/dist/esm/utils/convertMatchersToTimeZone.js +26 -0
- package/dist/node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.js +26 -0
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.js +15 -0
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.js +28 -0
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/utils/toTimeZone.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/utils/typeguards.js +26 -0
- package/dist/style.css +1 -1
- package/dist/tokens.css +107 -0
- package/package.json +11 -5
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Button as e } from "./Button.js";
|
|
2
|
+
import { CaptionLabel as p } from "./CaptionLabel.js";
|
|
3
|
+
import { Chevron as x } from "./Chevron.js";
|
|
4
|
+
import { Day as n } from "./Day.js";
|
|
5
|
+
import { DayButton as d } from "./DayButton.js";
|
|
6
|
+
import { Dropdown as u } from "./Dropdown.js";
|
|
7
|
+
import { DropdownNav as k } from "./DropdownNav.js";
|
|
8
|
+
import { Footer as D } from "./Footer.js";
|
|
9
|
+
import { Month as i } from "./Month.js";
|
|
10
|
+
import { MonthCaption as v } from "./MonthCaption.js";
|
|
11
|
+
import { MonthGrid as y } from "./MonthGrid.js";
|
|
12
|
+
import { Months as b } from "./Months.js";
|
|
13
|
+
import { MonthsDropdown as l } from "./MonthsDropdown.js";
|
|
14
|
+
import { Nav as F } from "./Nav.js";
|
|
15
|
+
import { NextMonthButton as H } from "./NextMonthButton.js";
|
|
16
|
+
import { Option as O } from "./Option.js";
|
|
17
|
+
import { PreviousMonthButton as R } from "./PreviousMonthButton.js";
|
|
18
|
+
import { Root as Y } from "./Root.js";
|
|
19
|
+
import { Select as j } from "./Select.js";
|
|
20
|
+
import { Week as z } from "./Week.js";
|
|
21
|
+
import { Weekday as E } from "./Weekday.js";
|
|
22
|
+
import { Weekdays as J } from "./Weekdays.js";
|
|
23
|
+
import { WeekNumber as Q } from "./WeekNumber.js";
|
|
24
|
+
import { WeekNumberHeader as U } from "./WeekNumberHeader.js";
|
|
25
|
+
import { Weeks as X } from "./Weeks.js";
|
|
26
|
+
import { YearsDropdown as _ } from "./YearsDropdown.js";
|
|
27
|
+
export {
|
|
28
|
+
e as Button,
|
|
29
|
+
p as CaptionLabel,
|
|
30
|
+
x as Chevron,
|
|
31
|
+
n as Day,
|
|
32
|
+
d as DayButton,
|
|
33
|
+
u as Dropdown,
|
|
34
|
+
k as DropdownNav,
|
|
35
|
+
D as Footer,
|
|
36
|
+
i as Month,
|
|
37
|
+
v as MonthCaption,
|
|
38
|
+
y as MonthGrid,
|
|
39
|
+
b as Months,
|
|
40
|
+
l as MonthsDropdown,
|
|
41
|
+
F as Nav,
|
|
42
|
+
H as NextMonthButton,
|
|
43
|
+
O as Option,
|
|
44
|
+
R as PreviousMonthButton,
|
|
45
|
+
Y as Root,
|
|
46
|
+
j as Select,
|
|
47
|
+
z as Week,
|
|
48
|
+
Q as WeekNumber,
|
|
49
|
+
U as WeekNumberHeader,
|
|
50
|
+
E as Weekday,
|
|
51
|
+
J as Weekdays,
|
|
52
|
+
X as Weeks,
|
|
53
|
+
_ as YearsDropdown
|
|
54
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { formatCaption as t, formatMonthCaption as e } from "./formatCaption.js";
|
|
2
|
+
import { formatDay as a } from "./formatDay.js";
|
|
3
|
+
import { formatMonthDropdown as p } from "./formatMonthDropdown.js";
|
|
4
|
+
import { formatWeekdayName as x } from "./formatWeekdayName.js";
|
|
5
|
+
import { formatWeekNumber as i } from "./formatWeekNumber.js";
|
|
6
|
+
import { formatWeekNumberHeader as C } from "./formatWeekNumberHeader.js";
|
|
7
|
+
import { formatYearCaption as N, formatYearDropdown as W } from "./formatYearDropdown.js";
|
|
8
|
+
export {
|
|
9
|
+
t as formatCaption,
|
|
10
|
+
a as formatDay,
|
|
11
|
+
e as formatMonthCaption,
|
|
12
|
+
p as formatMonthDropdown,
|
|
13
|
+
i as formatWeekNumber,
|
|
14
|
+
C as formatWeekNumberHeader,
|
|
15
|
+
x as formatWeekdayName,
|
|
16
|
+
N as formatYearCaption,
|
|
17
|
+
W as formatYearDropdown
|
|
18
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DayFlag as s } from "../UI.js";
|
|
2
|
+
var d;
|
|
3
|
+
(function(e) {
|
|
4
|
+
e[e.Today = 0] = "Today", e[e.Selected = 1] = "Selected", e[e.LastFocused = 2] = "LastFocused", e[e.FocusedModifier = 3] = "FocusedModifier";
|
|
5
|
+
})(d || (d = {}));
|
|
6
|
+
function l(e) {
|
|
7
|
+
return !e[s.disabled] && !e[s.hidden] && !e[s.outside];
|
|
8
|
+
}
|
|
9
|
+
function F(e, u, t, n) {
|
|
10
|
+
let f, c = -1;
|
|
11
|
+
for (const o of e) {
|
|
12
|
+
const a = u(o);
|
|
13
|
+
l(a) && (a[s.focused] && c < d.FocusedModifier ? (f = o, c = d.FocusedModifier) : n?.isEqualTo(o) && c < d.LastFocused ? (f = o, c = d.LastFocused) : t(o.date) && c < d.Selected ? (f = o, c = d.Selected) : a[s.today] && c < d.Today && (f = o, c = d.Today));
|
|
14
|
+
}
|
|
15
|
+
return f || (f = e.find((o) => l(u(o)))), f;
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
F as calculateFocusTarget
|
|
19
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { DayFlag as e } from "../UI.js";
|
|
2
|
+
import { dateMatchModifiers as u } from "../utils/dateMatchModifiers.js";
|
|
3
|
+
function V(b, S, h, M, a) {
|
|
4
|
+
const { disabled: m, hidden: p, modifiers: r, showOutsideDays: y, broadcastCalendar: B, today: g = a.today() } = S, { isSameDay: v, isSameMonth: A, startOfMonth: E, isBefore: F, endOfMonth: j, isAfter: k } = a, O = h && E(h), D = M && j(M), i = {
|
|
5
|
+
[e.focused]: [],
|
|
6
|
+
[e.outside]: [],
|
|
7
|
+
[e.disabled]: [],
|
|
8
|
+
[e.hidden]: [],
|
|
9
|
+
[e.today]: []
|
|
10
|
+
}, d = {};
|
|
11
|
+
for (const s of b) {
|
|
12
|
+
const { date: o, displayMonth: n } = s, t = !!(n && !A(o, n)), f = !!(O && F(o, O)), l = !!(D && k(o, D)), w = !!(m && u(o, m, a)), x = !!(p && u(o, p, a)) || f || l || // Broadcast calendar will show outside days as default
|
|
13
|
+
!B && !y && t || B && y === !1 && t, C = v(o, g);
|
|
14
|
+
t && i.outside.push(s), w && i.disabled.push(s), x && i.hidden.push(s), C && i.today.push(s), r && Object.keys(r).forEach((c) => {
|
|
15
|
+
const N = r?.[c];
|
|
16
|
+
N && u(o, N, a) && (d[c] ? d[c].push(s) : d[c] = [s]);
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
return (s) => {
|
|
20
|
+
const o = {
|
|
21
|
+
[e.focused]: !1,
|
|
22
|
+
[e.disabled]: !1,
|
|
23
|
+
[e.hidden]: !1,
|
|
24
|
+
[e.outside]: !1,
|
|
25
|
+
[e.today]: !1
|
|
26
|
+
}, n = {};
|
|
27
|
+
for (const t in i) {
|
|
28
|
+
const f = i[t];
|
|
29
|
+
o[t] = f.some((l) => l === s);
|
|
30
|
+
}
|
|
31
|
+
for (const t in d)
|
|
32
|
+
n[t] = d[t].some((f) => f === s);
|
|
33
|
+
return {
|
|
34
|
+
...o,
|
|
35
|
+
// custom modifiers should override all the previous ones
|
|
36
|
+
...n
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export {
|
|
41
|
+
V as createGetModifiers
|
|
42
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { getBroadcastWeeksInMonth as n } from "./getBroadcastWeeksInMonth.js";
|
|
2
|
+
import { startOfBroadcastWeek as s } from "./startOfBroadcastWeek.js";
|
|
3
|
+
function d(e, t) {
|
|
4
|
+
const o = s(e, t), r = n(e, t);
|
|
5
|
+
return t.addDays(o, r * 7 - 1);
|
|
6
|
+
}
|
|
7
|
+
export {
|
|
8
|
+
d as endOfBroadcastWeek
|
|
9
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DayFlag as e, SelectionState as n, UI as d } from "../UI.js";
|
|
2
|
+
function p(o, i, f = {}) {
|
|
3
|
+
return Object.entries(o).filter(([, t]) => t === !0).reduce((t, [r]) => (f[r] ? t.push(f[r]) : i[e[r]] ? t.push(i[e[r]]) : i[n[r]] && t.push(i[n[r]]), t), [i[d.Day]]);
|
|
4
|
+
}
|
|
5
|
+
export {
|
|
6
|
+
p as getClassNamesForModifiers
|
|
7
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
function n(e) {
|
|
2
|
+
const t = {
|
|
3
|
+
"data-mode": e.mode ?? void 0,
|
|
4
|
+
"data-required": "required" in e ? e.required : void 0,
|
|
5
|
+
"data-multiple-months": e.numberOfMonths && e.numberOfMonths > 1 || void 0,
|
|
6
|
+
"data-week-numbers": e.showWeekNumber || void 0,
|
|
7
|
+
"data-broadcast-calendar": e.broadcastCalendar || void 0,
|
|
8
|
+
"data-nav-layout": e.navLayout || void 0
|
|
9
|
+
};
|
|
10
|
+
return Object.entries(e).forEach(([a, d]) => {
|
|
11
|
+
a.startsWith("data-") && (t[a] = d);
|
|
12
|
+
}), t;
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
n as getDataAttributes
|
|
16
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
function j(r, n, I, W) {
|
|
2
|
+
const s = r[0], o = r[r.length - 1], { ISOWeek: c, fixedWeeks: u, broadcastCalendar: a } = I ?? {}, { addDays: i, differenceInCalendarDays: M, differenceInCalendarMonths: C, endOfBroadcastWeek: O, endOfISOWeek: k, endOfMonth: h, endOfWeek: l, isAfter: E, startOfBroadcastWeek: F, startOfISOWeek: S, startOfWeek: p } = W, g = a ? F(s, W) : c ? S(s) : p(s), D = a ? O(o) : c ? k(h(o)) : l(h(o)), f = n && (a ? O(n) : c ? k(n) : l(n)), x = f && E(D, f) ? f : D, A = M(x, g), B = C(o, s) + 1, e = [];
|
|
3
|
+
for (let t = 0; t <= A; t++) {
|
|
4
|
+
const d = i(g, t);
|
|
5
|
+
e.push(d);
|
|
6
|
+
}
|
|
7
|
+
const y = (a ? 35 : 42) * B;
|
|
8
|
+
if (u && e.length < y) {
|
|
9
|
+
const t = y - e.length;
|
|
10
|
+
for (let d = 0; d < t; d++) {
|
|
11
|
+
const T = i(e[e.length - 1], 1);
|
|
12
|
+
e.push(T);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return e;
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
j as getDates
|
|
19
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { UI as t, DayFlag as e, SelectionState as r, Animation as s } from "../UI.js";
|
|
2
|
+
function i() {
|
|
3
|
+
const o = {};
|
|
4
|
+
for (const n in t)
|
|
5
|
+
o[t[n]] = `rdp-${t[n]}`;
|
|
6
|
+
for (const n in e)
|
|
7
|
+
o[e[n]] = `rdp-${e[n]}`;
|
|
8
|
+
for (const n in r)
|
|
9
|
+
o[r[n]] = `rdp-${r[n]}`;
|
|
10
|
+
for (const n in s)
|
|
11
|
+
o[s[n]] = `rdp-${s[n]}`;
|
|
12
|
+
return o;
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
i as getDefaultClassNames
|
|
16
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
function g(d, s, k, t, f, O, n) {
|
|
2
|
+
const { ISOWeek: o, broadcastCalendar: r } = O, { addDays: W, addMonths: c, addWeeks: l, addYears: u, endOfBroadcastWeek: b, endOfISOWeek: m, endOfWeek: y, max: F, min: I, startOfBroadcastWeek: h, startOfISOWeek: x, startOfWeek: B } = n;
|
|
3
|
+
let a = {
|
|
4
|
+
day: W,
|
|
5
|
+
week: l,
|
|
6
|
+
month: c,
|
|
7
|
+
year: u,
|
|
8
|
+
startOfWeek: (e) => r ? h(e, n) : o ? x(e) : B(e),
|
|
9
|
+
endOfWeek: (e) => r ? b(e) : o ? m(e) : y(e)
|
|
10
|
+
}[d](k, s === "after" ? 1 : -1);
|
|
11
|
+
return s === "before" && t ? a = F([t, a]) : s === "after" && f && (a = I([f, a])), a;
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
g as getFocusableDate
|
|
15
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as a from "../formatters/index.js";
|
|
2
|
+
function f(n) {
|
|
3
|
+
return n?.formatMonthCaption && !n.formatCaption && (n.formatCaption = n.formatMonthCaption), n?.formatYearCaption && !n.formatYearDropdown && (n.formatYearDropdown = n.formatYearCaption), {
|
|
4
|
+
...a,
|
|
5
|
+
...n
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
f as getFormatters
|
|
10
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
function u(i, o, n, e) {
|
|
2
|
+
const { month: s, defaultMonth: M, today: c = e.today(), numberOfMonths: f = 1 } = i;
|
|
3
|
+
let t = s || M || c;
|
|
4
|
+
const { differenceInCalendarMonths: h, addMonths: l, startOfMonth: r } = e;
|
|
5
|
+
if (n && h(n, t) < f - 1) {
|
|
6
|
+
const d = -1 * (f - 1);
|
|
7
|
+
t = l(n, d);
|
|
8
|
+
}
|
|
9
|
+
return o && h(t, o) < 0 && (t = o), r(t);
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
u as getInitialMonth
|
|
13
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as o from "../labels/index.js";
|
|
2
|
+
import { labelWeekday as b } from "../labels/labelWeekday.js";
|
|
3
|
+
import { labelWeekNumberHeader as i } from "../labels/labelWeekNumberHeader.js";
|
|
4
|
+
import { labelNav as n } from "../labels/labelNav.js";
|
|
5
|
+
import { labelGridcell as t } from "../labels/labelGridcell.js";
|
|
6
|
+
import { labelGrid as d } from "../labels/labelGrid.js";
|
|
7
|
+
import { labelYearDropdown as p } from "../labels/labelYearDropdown.js";
|
|
8
|
+
import { labelWeekNumber as m } from "../labels/labelWeekNumber.js";
|
|
9
|
+
import { labelPrevious as f } from "../labels/labelPrevious.js";
|
|
10
|
+
import { labelNext as N } from "../labels/labelNext.js";
|
|
11
|
+
import { labelMonthDropdown as k } from "../labels/labelMonthDropdown.js";
|
|
12
|
+
import { labelDayButton as D } from "../labels/labelDayButton.js";
|
|
13
|
+
const r = (l, a, e) => a || (e ? typeof e == "function" ? e : (...W) => e : l);
|
|
14
|
+
function Y(l, a) {
|
|
15
|
+
const e = a.locale?.labels ?? {};
|
|
16
|
+
return {
|
|
17
|
+
...o,
|
|
18
|
+
...l ?? {},
|
|
19
|
+
labelDayButton: r(D, l?.labelDayButton, e.labelDayButton),
|
|
20
|
+
labelMonthDropdown: r(k, l?.labelMonthDropdown, e.labelMonthDropdown),
|
|
21
|
+
labelNext: r(N, l?.labelNext, e.labelNext),
|
|
22
|
+
labelPrevious: r(f, l?.labelPrevious, e.labelPrevious),
|
|
23
|
+
labelWeekNumber: r(m, l?.labelWeekNumber, e.labelWeekNumber),
|
|
24
|
+
labelYearDropdown: r(p, l?.labelYearDropdown, e.labelYearDropdown),
|
|
25
|
+
labelGrid: r(d, l?.labelGrid, e.labelGrid),
|
|
26
|
+
labelGridcell: r(t, l?.labelGridcell, e.labelGridcell),
|
|
27
|
+
labelNav: r(n, l?.labelNav, e.labelNav),
|
|
28
|
+
labelWeekNumberHeader: r(i, l?.labelWeekNumberHeader, e.labelWeekNumberHeader),
|
|
29
|
+
labelWeekday: r(b, l?.labelWeekday, e.labelWeekday)
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
Y as getLabels
|
|
34
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
function d(o, n, s, a, e) {
|
|
2
|
+
const { startOfMonth: r, startOfYear: c, endOfYear: f, eachMonthOfInterval: l, getMonth: p } = e;
|
|
3
|
+
return l({
|
|
4
|
+
start: c(o),
|
|
5
|
+
end: f(o)
|
|
6
|
+
}).map((t) => {
|
|
7
|
+
const O = a.formatMonthDropdown(t, e), h = p(t), u = n && t < r(n) || s && t > r(s) || !1;
|
|
8
|
+
return { value: h, label: O, disabled: u };
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
d as getMonthOptions
|
|
13
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { CalendarDay as F } from "../classes/CalendarDay.js";
|
|
2
|
+
import { CalendarWeek as N } from "../classes/CalendarWeek.js";
|
|
3
|
+
import { CalendarMonth as P } from "../classes/CalendarMonth.js";
|
|
4
|
+
function j(l, f, e, c) {
|
|
5
|
+
const { addDays: y, endOfBroadcastWeek: D, endOfISOWeek: h, endOfMonth: k, endOfWeek: C, getISOWeek: I, getWeek: M, startOfBroadcastWeek: S, startOfISOWeek: g, startOfWeek: w } = c, o = l.reduce((W, t) => {
|
|
6
|
+
const x = e.broadcastCalendar ? S(t, c) : e.ISOWeek ? g(t) : w(t), d = e.broadcastCalendar ? D(t) : e.ISOWeek ? h(k(t)) : C(k(t)), a = f.filter((r) => r >= x && r <= d), O = e.broadcastCalendar ? 35 : 42;
|
|
7
|
+
if (e.fixedWeeks && a.length < O) {
|
|
8
|
+
const r = f.filter((n) => {
|
|
9
|
+
const s = O - a.length;
|
|
10
|
+
return n > d && n <= y(d, s);
|
|
11
|
+
});
|
|
12
|
+
a.push(...r);
|
|
13
|
+
}
|
|
14
|
+
const b = a.reduce((r, n) => {
|
|
15
|
+
const s = e.ISOWeek ? I(n) : M(n), i = r.find((B) => B.weekNumber === s), u = new F(n, t, c);
|
|
16
|
+
return i ? i.days.push(u) : r.push(new N(s, [u])), r;
|
|
17
|
+
}, []), v = new P(t, b);
|
|
18
|
+
return W.push(v), W;
|
|
19
|
+
}, []);
|
|
20
|
+
return e.reverseMonths ? o.reverse() : o;
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
j as getMonths
|
|
24
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
function O(o, r) {
|
|
2
|
+
let { startMonth: t, endMonth: e } = o;
|
|
3
|
+
const { startOfYear: M, startOfDay: d, startOfMonth: c, endOfMonth: Y, addYears: l, endOfYear: w, newDate: f, today: i } = r, { fromYear: a, toYear: n, fromMonth: s, toMonth: h } = o;
|
|
4
|
+
!t && s && (t = s), !t && a && (t = r.newDate(a, 0, 1)), !e && h && (e = h), !e && n && (e = f(n, 11, 31));
|
|
5
|
+
const y = o.captionLayout === "dropdown" || o.captionLayout === "dropdown-years";
|
|
6
|
+
return t ? t = c(t) : a ? t = f(a, 0, 1) : !t && y && (t = M(l(o.today ?? i(), -100))), e ? e = Y(e) : n ? e = f(n, 11, 31) : !e && y && (e = w(o.today ?? i())), [
|
|
7
|
+
t && d(t),
|
|
8
|
+
e && d(e)
|
|
9
|
+
];
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
O as getNavMonths
|
|
13
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { dateMatchModifiers as u } from "../utils/dateMatchModifiers.js";
|
|
2
|
+
import { getFocusableDate as g } from "./getFocusableDate.js";
|
|
3
|
+
import { CalendarDay as m } from "../classes/CalendarDay.js";
|
|
4
|
+
function h(t, i, a, d, f, e, n, s = 0) {
|
|
5
|
+
if (s > 365)
|
|
6
|
+
return;
|
|
7
|
+
const o = g(t, i, a.date, d, f, e, n), r = !!(e.disabled && u(o, e.disabled, n)), l = !!(e.hidden && u(o, e.hidden, n)), D = o, c = new m(o, D, n);
|
|
8
|
+
return !r && !l ? c : h(t, i, c, d, f, e, n, s + 1);
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
h as getNextFocus
|
|
12
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
function h(n, t, e, s) {
|
|
2
|
+
if (e.disableNavigation)
|
|
3
|
+
return;
|
|
4
|
+
const { pagedNavigation: u, numberOfMonths: f = 1 } = e, { startOfMonth: a, addMonths: o, differenceInCalendarMonths: d } = s, i = u ? f : 1, r = a(n);
|
|
5
|
+
if (!t)
|
|
6
|
+
return o(r, i);
|
|
7
|
+
if (!(d(t, n) < f))
|
|
8
|
+
return o(r, i);
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
h as getNextMonth
|
|
12
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
function c(i, t, e, s) {
|
|
2
|
+
if (e.disableNavigation)
|
|
3
|
+
return;
|
|
4
|
+
const { pagedNavigation: r, numberOfMonths: d } = e, { startOfMonth: u, addMonths: f, differenceInCalendarMonths: a } = s, o = r ? d ?? 1 : 1, n = u(i);
|
|
5
|
+
if (!t)
|
|
6
|
+
return f(n, -o);
|
|
7
|
+
if (!(a(n, t) <= 0))
|
|
8
|
+
return f(n, -o);
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
c as getPreviousMonth
|
|
12
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { UI as f } from "../UI.js";
|
|
2
|
+
function n(r, o = {}, i = {}) {
|
|
3
|
+
let e = { ...o?.[f.Day] };
|
|
4
|
+
return Object.entries(r).filter(([, t]) => t === !0).forEach(([t]) => {
|
|
5
|
+
e = {
|
|
6
|
+
...e,
|
|
7
|
+
...i?.[t]
|
|
8
|
+
};
|
|
9
|
+
}), e;
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
n as getStyleForModifiers
|
|
13
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
function y(t, o, a, n) {
|
|
2
|
+
const s = n ?? t.today(), c = a ? t.startOfBroadcastWeek(s, t) : o ? t.startOfISOWeek(s) : t.startOfWeek(s), r = [];
|
|
3
|
+
for (let e = 0; e < 7; e++) {
|
|
4
|
+
const f = t.addDays(c, e);
|
|
5
|
+
r.push(f);
|
|
6
|
+
}
|
|
7
|
+
return r;
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
y as getWeekdays
|
|
11
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
function p(e, r, s, t, f = !1) {
|
|
2
|
+
if (!e || !r)
|
|
3
|
+
return;
|
|
4
|
+
const { startOfYear: o, endOfYear: i, eachYearOfInterval: l, getYear: u } = t, Y = o(e), c = i(r), a = l({ start: Y, end: c });
|
|
5
|
+
return f && a.reverse(), a.map((n) => {
|
|
6
|
+
const d = s.formatYearDropdown(n, t);
|
|
7
|
+
return {
|
|
8
|
+
value: u(n),
|
|
9
|
+
label: d,
|
|
10
|
+
disabled: !1
|
|
11
|
+
};
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
p as getYearOptions
|
|
16
|
+
};
|