@korsolutions/ui 0.0.72 → 0.0.75
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/module/components/calendar/calendar/calendar-root.js +57 -0
- package/dist/module/components/calendar/calendar/calendar-root.js.map +1 -0
- package/dist/module/components/calendar/{components → calendar}/calendar-weeks.js +12 -5
- package/dist/module/components/calendar/calendar/calendar-weeks.js.map +1 -0
- package/dist/module/components/calendar/calendar/index.js +19 -0
- package/dist/module/components/calendar/calendar/index.js.map +1 -0
- package/dist/module/components/calendar/calendar/types.js.map +1 -0
- package/dist/module/components/calendar/{variants → calendar/variants}/default.js +29 -13
- package/dist/module/components/calendar/calendar/variants/default.js.map +1 -0
- package/dist/module/components/calendar/calendar/variants/index.js.map +1 -0
- package/dist/module/components/calendar/index.js +3 -16
- package/dist/module/components/calendar/index.js.map +1 -1
- package/dist/module/components/calendar/{context.js → shared/calendar-context.js} +2 -2
- package/dist/module/components/calendar/shared/calendar-context.js.map +1 -0
- package/dist/module/components/calendar/{components → shared}/calendar-day.js +12 -11
- package/dist/module/components/calendar/shared/calendar-day.js.map +1 -0
- package/dist/module/components/calendar/{components → shared}/calendar-header.js +1 -1
- package/dist/module/components/calendar/shared/calendar-header.js.map +1 -0
- package/dist/module/components/calendar/shared/calendar-nav-buttons.js +63 -0
- package/dist/module/components/calendar/shared/calendar-nav-buttons.js.map +1 -0
- package/dist/module/components/calendar/{components → shared}/calendar-title.js +2 -2
- package/dist/module/components/calendar/shared/calendar-title.js.map +1 -0
- package/dist/module/components/calendar/{components → shared}/calendar-week-labels.js +1 -1
- package/dist/module/components/calendar/shared/calendar-week-labels.js.map +1 -0
- package/dist/module/components/calendar/shared/types.js +4 -0
- package/dist/module/components/calendar/shared/types.js.map +1 -0
- package/dist/module/components/calendar/timeline/calendar-timeline.js +138 -0
- package/dist/module/components/calendar/timeline/calendar-timeline.js.map +1 -0
- package/dist/module/components/calendar/timeline/index.js +4 -0
- package/dist/module/components/calendar/timeline/index.js.map +1 -0
- package/dist/module/components/calendar/timeline/types.js +4 -0
- package/dist/module/components/calendar/timeline/types.js.map +1 -0
- package/dist/module/components/calendar/timeline/variants/default.js +62 -0
- package/dist/module/components/calendar/timeline/variants/default.js.map +1 -0
- package/dist/module/components/calendar/timeline/variants/index.js +7 -0
- package/dist/module/components/calendar/timeline/variants/index.js.map +1 -0
- package/dist/module/components/calendar/week-calendar/index.js +4 -0
- package/dist/module/components/calendar/week-calendar/index.js.map +1 -0
- package/dist/module/components/calendar/week-calendar/types.js +4 -0
- package/dist/module/components/calendar/week-calendar/types.js.map +1 -0
- package/dist/module/components/calendar/week-calendar/variants/default.js +145 -0
- package/dist/module/components/calendar/week-calendar/variants/default.js.map +1 -0
- package/dist/module/components/calendar/week-calendar/variants/index.js +7 -0
- package/dist/module/components/calendar/week-calendar/variants/index.js.map +1 -0
- package/dist/module/components/calendar/week-calendar/week-calendar.js +170 -0
- package/dist/module/components/calendar/week-calendar/week-calendar.js.map +1 -0
- package/dist/module/components/index.js +1 -1
- package/dist/module/index.js +2 -1
- package/dist/module/index.js.map +1 -1
- package/dist/module/themes/provider.js.map +1 -1
- package/dist/module/utils/date-utils.js +45 -17
- package/dist/module/utils/date-utils.js.map +1 -1
- package/dist/typescript/src/components/calendar/{components → calendar}/calendar-root.d.ts +2 -1
- package/dist/typescript/src/components/calendar/calendar/calendar-root.d.ts.map +1 -0
- package/dist/typescript/src/components/calendar/calendar/calendar-weeks.d.ts.map +1 -0
- package/dist/typescript/src/components/calendar/calendar/index.d.ts +25 -0
- package/dist/typescript/src/components/calendar/calendar/index.d.ts.map +1 -0
- package/dist/typescript/src/components/calendar/calendar/types.d.ts +7 -0
- package/dist/typescript/src/components/calendar/calendar/types.d.ts.map +1 -0
- package/dist/typescript/src/components/calendar/calendar/variants/default.d.ts +3 -0
- package/dist/typescript/src/components/calendar/calendar/variants/default.d.ts.map +1 -0
- package/dist/typescript/src/components/calendar/calendar/variants/index.d.ts.map +1 -0
- package/dist/typescript/src/components/calendar/index.d.ts +7 -24
- package/dist/typescript/src/components/calendar/index.d.ts.map +1 -1
- package/dist/typescript/src/components/calendar/{context.d.ts → shared/calendar-context.d.ts} +10 -4
- package/dist/typescript/src/components/calendar/shared/calendar-context.d.ts.map +1 -0
- package/dist/typescript/src/components/calendar/shared/calendar-day.d.ts.map +1 -0
- package/dist/typescript/src/components/calendar/shared/calendar-header.d.ts.map +1 -0
- package/dist/typescript/src/components/calendar/shared/calendar-nav-buttons.d.ts +7 -0
- package/dist/typescript/src/components/calendar/shared/calendar-nav-buttons.d.ts.map +1 -0
- package/dist/typescript/src/components/calendar/shared/calendar-title.d.ts.map +1 -0
- package/dist/typescript/src/components/calendar/shared/calendar-week-labels.d.ts.map +1 -0
- package/dist/typescript/src/components/calendar/shared/types.d.ts +18 -0
- package/dist/typescript/src/components/calendar/shared/types.d.ts.map +1 -0
- package/dist/typescript/src/components/calendar/timeline/calendar-timeline.d.ts +23 -0
- package/dist/typescript/src/components/calendar/timeline/calendar-timeline.d.ts.map +1 -0
- package/dist/typescript/src/components/calendar/timeline/index.d.ts +4 -0
- package/dist/typescript/src/components/calendar/timeline/index.d.ts.map +1 -0
- package/dist/typescript/src/components/calendar/timeline/types.d.ts +13 -0
- package/dist/typescript/src/components/calendar/timeline/types.d.ts.map +1 -0
- package/dist/typescript/src/components/calendar/timeline/variants/default.d.ts +3 -0
- package/dist/typescript/src/components/calendar/timeline/variants/default.d.ts.map +1 -0
- package/dist/typescript/src/components/calendar/timeline/variants/index.d.ts +4 -0
- package/dist/typescript/src/components/calendar/timeline/variants/index.d.ts.map +1 -0
- package/dist/typescript/src/components/calendar/week-calendar/index.d.ts +4 -0
- package/dist/typescript/src/components/calendar/week-calendar/index.d.ts.map +1 -0
- package/dist/typescript/src/components/calendar/week-calendar/types.d.ts +7 -0
- package/dist/typescript/src/components/calendar/week-calendar/types.d.ts.map +1 -0
- package/dist/typescript/src/components/calendar/week-calendar/variants/default.d.ts +3 -0
- package/dist/typescript/src/components/calendar/week-calendar/variants/default.d.ts.map +1 -0
- package/dist/typescript/src/components/calendar/week-calendar/variants/index.d.ts +4 -0
- package/dist/typescript/src/components/calendar/week-calendar/variants/index.d.ts.map +1 -0
- package/dist/typescript/src/components/calendar/week-calendar/week-calendar.d.ts +16 -0
- package/dist/typescript/src/components/calendar/week-calendar/week-calendar.d.ts.map +1 -0
- package/dist/typescript/src/components/index.d.ts +1 -1
- package/dist/typescript/src/index.d.ts.map +1 -1
- package/dist/typescript/src/themes/provider.d.ts +4 -0
- package/dist/typescript/src/themes/provider.d.ts.map +1 -1
- package/dist/typescript/src/utils/date-utils.d.ts +8 -1
- package/dist/typescript/src/utils/date-utils.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/calendar/calendar/calendar-root.tsx +73 -0
- package/src/components/calendar/{components → calendar}/calendar-weeks.tsx +22 -8
- package/src/components/calendar/calendar/index.ts +26 -0
- package/src/components/calendar/calendar/types.ts +7 -0
- package/src/components/calendar/{variants → calendar/variants}/default.tsx +30 -14
- package/src/components/calendar/index.ts +21 -24
- package/src/components/calendar/shared/calendar-context.ts +35 -0
- package/src/components/calendar/{components → shared}/calendar-day.tsx +41 -13
- package/src/components/calendar/{components → shared}/calendar-header.tsx +7 -2
- package/src/components/calendar/shared/calendar-nav-buttons.tsx +81 -0
- package/src/components/calendar/{components → shared}/calendar-title.tsx +8 -3
- package/src/components/calendar/{components → shared}/calendar-week-labels.tsx +8 -2
- package/src/components/calendar/shared/types.ts +24 -0
- package/src/components/calendar/timeline/calendar-timeline.tsx +204 -0
- package/src/components/calendar/timeline/index.ts +6 -0
- package/src/components/calendar/timeline/types.ts +13 -0
- package/src/components/calendar/timeline/variants/default.tsx +59 -0
- package/src/components/calendar/timeline/variants/index.ts +5 -0
- package/src/components/calendar/week-calendar/index.ts +3 -0
- package/src/components/calendar/week-calendar/types.ts +7 -0
- package/src/components/calendar/week-calendar/variants/default.tsx +141 -0
- package/src/components/calendar/week-calendar/variants/index.ts +5 -0
- package/src/components/calendar/week-calendar/week-calendar.tsx +256 -0
- package/src/components/index.ts +1 -1
- package/src/index.tsx +2 -0
- package/src/themes/provider.tsx +4 -0
- package/src/utils/date-utils.ts +53 -21
- package/dist/module/components/calendar/components/calendar-day.js.map +0 -1
- package/dist/module/components/calendar/components/calendar-header.js.map +0 -1
- package/dist/module/components/calendar/components/calendar-nav-button.js +0 -61
- package/dist/module/components/calendar/components/calendar-nav-button.js.map +0 -1
- package/dist/module/components/calendar/components/calendar-root.js +0 -39
- package/dist/module/components/calendar/components/calendar-root.js.map +0 -1
- package/dist/module/components/calendar/components/calendar-title.js.map +0 -1
- package/dist/module/components/calendar/components/calendar-week-labels.js.map +0 -1
- package/dist/module/components/calendar/components/calendar-weeks.js.map +0 -1
- package/dist/module/components/calendar/context.js.map +0 -1
- package/dist/module/components/calendar/types.js.map +0 -1
- package/dist/module/components/calendar/variants/default.js.map +0 -1
- package/dist/module/components/calendar/variants/index.js.map +0 -1
- package/dist/typescript/src/components/calendar/components/calendar-day.d.ts.map +0 -1
- package/dist/typescript/src/components/calendar/components/calendar-header.d.ts.map +0 -1
- package/dist/typescript/src/components/calendar/components/calendar-nav-button.d.ts +0 -10
- package/dist/typescript/src/components/calendar/components/calendar-nav-button.d.ts.map +0 -1
- package/dist/typescript/src/components/calendar/components/calendar-root.d.ts.map +0 -1
- package/dist/typescript/src/components/calendar/components/calendar-title.d.ts.map +0 -1
- package/dist/typescript/src/components/calendar/components/calendar-week-labels.d.ts.map +0 -1
- package/dist/typescript/src/components/calendar/components/calendar-weeks.d.ts.map +0 -1
- package/dist/typescript/src/components/calendar/context.d.ts.map +0 -1
- package/dist/typescript/src/components/calendar/types.d.ts +0 -37
- package/dist/typescript/src/components/calendar/types.d.ts.map +0 -1
- package/dist/typescript/src/components/calendar/variants/default.d.ts +0 -3
- package/dist/typescript/src/components/calendar/variants/default.d.ts.map +0 -1
- package/dist/typescript/src/components/calendar/variants/index.d.ts.map +0 -1
- package/src/components/calendar/components/calendar-nav-button.tsx +0 -60
- package/src/components/calendar/components/calendar-root.tsx +0 -42
- package/src/components/calendar/context.ts +0 -23
- package/src/components/calendar/types.ts +0 -39
- /package/dist/module/components/calendar/{types.js → calendar/types.js} +0 -0
- /package/dist/module/components/calendar/{variants → calendar/variants}/index.js +0 -0
- /package/dist/typescript/src/components/calendar/{components → calendar}/calendar-weeks.d.ts +0 -0
- /package/dist/typescript/src/components/calendar/{variants → calendar/variants}/index.d.ts +0 -0
- /package/dist/typescript/src/components/calendar/{components → shared}/calendar-day.d.ts +0 -0
- /package/dist/typescript/src/components/calendar/{components → shared}/calendar-header.d.ts +0 -0
- /package/dist/typescript/src/components/calendar/{components → shared}/calendar-title.d.ts +0 -0
- /package/dist/typescript/src/components/calendar/{components → shared}/calendar-week-labels.d.ts +0 -0
- /package/src/components/calendar/{variants → calendar/variants}/index.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["formatDate","date","format","months","day","getDate","month","getMonth","year","getFullYear","toString","toLocaleDateString","isDateSameDay","date1","date2","isDateToday","Date","isDateBefore","d1","d2","getTime","isDateAfter","isDateTimeWithinInterval","interval","time","start","end","addMonths","newDate","setMonth","subMonths","startOfMonth","endOfMonth","getDaysInMonth","getFirstDayOfMonth","getDay","isSameMonth","getWeekDays","week","days","firstDayOfMonth","daysInMonth","startDay","i","
|
|
1
|
+
{"version":3,"names":["formatDate","date","format","months","day","getDate","month","getMonth","year","getFullYear","toString","toLocaleDateString","isDateSameDay","date1","date2","isDateToday","Date","isDateBefore","d1","d2","getTime","isDateAfter","isDateTimeWithinInterval","interval","time","start","end","addMonths","newDate","setMonth","subMonths","startOfMonth","endOfMonth","getDaysInMonth","getFirstDayOfMonth","getDay","isSameMonth","getWeekDays","week","days","firstDayOfMonth","daysInMonth","startDay","i","push","getWeeksInMonth","Math","ceil","startOfWeek","d","setDate","endOfWeek","getWeekDates","Array","from","length","_","addWeeks","weeks","subWeeks","addDays","subDays"],"sour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W;EACzD,MAAMU,CAAC,GAAG,IAAIjC,IAAI,CAACf,IAAI,CAAC;EACxBgD,CAAC,CAACC,OAAO,CAACD,CAAC,CAAC5C,OAAO,CAAC,CAAC,GAAGkC,IAAI,CAAC;EAC7B,OAAOU,CAAC;AACV,CAAC;AAED,OAAO,MAAMY,OAAO,GAAGA,CAAC5D,IAAU,EAAEsC,IAAY,KAAW;EACzD,OAAOqB,OAAO,CAAC3D,IAAI,EAAE,CAACsC,IAAI,CAAC;AAC7B,CAAC","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { type StyleProp, type ViewStyle } from "react-native";
|
|
3
|
-
import { CalendarVariants } from "
|
|
3
|
+
import { CalendarVariants } from "./variants";
|
|
4
4
|
export interface CalendarRootProps {
|
|
5
5
|
variant?: keyof typeof CalendarVariants;
|
|
6
6
|
children?: React.ReactNode;
|
|
@@ -9,6 +9,7 @@ export interface CalendarRootProps {
|
|
|
9
9
|
defaultMonth?: Date;
|
|
10
10
|
minDate?: Date;
|
|
11
11
|
maxDate?: Date;
|
|
12
|
+
markedDates?: Date[];
|
|
12
13
|
style?: StyleProp<ViewStyle>;
|
|
13
14
|
}
|
|
14
15
|
export declare function CalendarRoot(props: CalendarRootProps): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar-root.d.ts","sourceRoot":"","sources":["../../../../../../src/components/calendar/calendar/calendar-root.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAQ,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9C,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,EAAE,MAAM,OAAO,gBAAgB,CAAC;IACxC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,KAAK,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IACvC,YAAY,CAAC,EAAE,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,WAAW,CAAC,EAAE,IAAI,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,qBAsDpD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar-weeks.d.ts","sourceRoot":"","sources":["../../../../../../src/components/calendar/calendar/calendar-weeks.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAMtB,MAAM,WAAW,iBAAkB,SAAQ,SAAS;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AA0BD,MAAM,WAAW,kBAAmB,SAAQ,SAAS;IACnD,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,qBAetD"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CalendarDay } from "../shared/calendar-day";
|
|
2
|
+
import { CalendarHeader } from "../shared/calendar-header";
|
|
3
|
+
import { CalendarNavButtons } from "../shared/calendar-nav-buttons";
|
|
4
|
+
import { CalendarTitle } from "../shared/calendar-title";
|
|
5
|
+
import { CalendarWeekLabels } from "../shared/calendar-week-labels";
|
|
6
|
+
import { CalendarRoot } from "./calendar-root";
|
|
7
|
+
import { CalendarWeeks } from "./calendar-weeks";
|
|
8
|
+
export declare const Calendar: {
|
|
9
|
+
Root: typeof CalendarRoot;
|
|
10
|
+
Header: typeof CalendarHeader;
|
|
11
|
+
Title: typeof CalendarTitle;
|
|
12
|
+
NavButtons: typeof CalendarNavButtons;
|
|
13
|
+
CalendarWeekLabels: typeof CalendarWeekLabels;
|
|
14
|
+
Weeks: typeof CalendarWeeks;
|
|
15
|
+
Day: typeof CalendarDay;
|
|
16
|
+
};
|
|
17
|
+
export type { CalendarDayProps } from "../shared/calendar-day";
|
|
18
|
+
export type { CalendarHeaderProps } from "../shared/calendar-header";
|
|
19
|
+
export type { CalendarNavButtonsProps } from "../shared/calendar-nav-buttons";
|
|
20
|
+
export type { CalendarTitleProps } from "../shared/calendar-title";
|
|
21
|
+
export type { CalendarWeekLabelsProps } from "../shared/calendar-week-labels";
|
|
22
|
+
export type { CalendarRootProps } from "./calendar-root";
|
|
23
|
+
export type { CalendarWeeksProps } from "./calendar-weeks";
|
|
24
|
+
export type { CalendarStyles } from "./types";
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/calendar/calendar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,eAAO,MAAM,QAAQ;;;;;;;;CAQpB,CAAC;AAEF,YAAY,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,YAAY,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACrE,YAAY,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAC9E,YAAY,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACnE,YAAY,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAC9E,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,YAAY,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { StyleProp, ViewStyle } from "react-native";
|
|
2
|
+
import type { BaseCalendarStyles } from "../shared/types";
|
|
3
|
+
export interface CalendarStyles extends BaseCalendarStyles {
|
|
4
|
+
weeks?: StyleProp<ViewStyle>;
|
|
5
|
+
week?: StyleProp<ViewStyle>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/calendar/calendar/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAE1D,MAAM,WAAW,cAAe,SAAQ,kBAAkB;IACxD,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,IAAI,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/calendar/calendar/variants/default.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C,eAAO,MAAM,yBAAyB,QAAO,cA0I5C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/calendar/calendar/variants/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB;;CAE5B,CAAC"}
|
|
@@ -1,25 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export declare const Calendar: {
|
|
9
|
-
Root: typeof CalendarRoot;
|
|
10
|
-
Header: typeof CalendarHeader;
|
|
11
|
-
Title: typeof CalendarTitle;
|
|
12
|
-
NavButton: typeof CalendarNavButton;
|
|
13
|
-
CalendarWeekLabels: typeof CalendarWeekLabels;
|
|
14
|
-
Weeks: typeof CalendarWeeks;
|
|
15
|
-
Day: typeof CalendarDay;
|
|
16
|
-
};
|
|
17
|
-
export type { CalendarDayProps } from "./components/calendar-day";
|
|
18
|
-
export type { CalendarHeaderProps } from "./components/calendar-header";
|
|
19
|
-
export type { CalendarNavButtonProps } from "./components/calendar-nav-button";
|
|
20
|
-
export type { CalendarRootProps } from "./components/calendar-root";
|
|
21
|
-
export type { CalendarTitleProps } from "./components/calendar-title";
|
|
22
|
-
export type { CalendarWeekLabelsProps } from "./components/calendar-week-labels";
|
|
23
|
-
export type { CalendarWeeksProps } from "./components/calendar-weeks";
|
|
24
|
-
export type { CalendarDayState, CalendarStyles } from "./types";
|
|
1
|
+
export { Calendar } from "./calendar";
|
|
2
|
+
export type { CalendarDayProps, CalendarHeaderProps, CalendarNavButtonsProps, CalendarRootProps, CalendarStyles, CalendarTitleProps, CalendarWeekLabelsProps, CalendarWeeksProps, } from "./calendar";
|
|
3
|
+
export { WeekCalendar } from "./week-calendar";
|
|
4
|
+
export type { WeekCalendarProps, WeekCalendarStyles } from "./week-calendar";
|
|
5
|
+
export { CalendarTimeline } from "./timeline";
|
|
6
|
+
export type { CalendarTimelineProps, TimelineEventLayout, TimelineStyles, } from "./timeline";
|
|
7
|
+
export type { CalendarDayState } from "./shared/types";
|
|
25
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/calendar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/calendar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EACV,gBAAgB,EAChB,mBAAmB,EACnB,uBAAuB,EACvB,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,uBAAuB,EACvB,kBAAkB,GACnB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAE7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,YAAY,EACV,qBAAqB,EACrB,mBAAmB,EACnB,cAAc,GACf,MAAM,YAAY,CAAC;AAEpB,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/typescript/src/components/calendar/{context.d.ts → shared/calendar-context.d.ts}
RENAMED
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import type {
|
|
2
|
+
import type { BaseCalendarStyles } from "./types";
|
|
3
3
|
export interface CalendarContextValue {
|
|
4
4
|
value?: Date | null;
|
|
5
5
|
onChange?: (date: Date | null) => void;
|
|
6
6
|
currentMonth: Date;
|
|
7
|
-
|
|
7
|
+
goToPrev: () => void;
|
|
8
|
+
goToNext: () => void;
|
|
9
|
+
isPrevDisabled: boolean;
|
|
10
|
+
isNextDisabled: boolean;
|
|
8
11
|
minDate?: Date;
|
|
9
12
|
maxDate?: Date;
|
|
10
|
-
|
|
13
|
+
markedDates?: Date[];
|
|
14
|
+
currentWeekStart?: Date;
|
|
15
|
+
setCurrentWeekStart?: (date: Date) => void;
|
|
16
|
+
styles?: BaseCalendarStyles;
|
|
11
17
|
}
|
|
12
18
|
export declare const CalendarContext: React.Context<CalendarContextValue | undefined>;
|
|
13
19
|
export declare const useCalendarContext: () => CalendarContextValue;
|
|
14
|
-
//# sourceMappingURL=context.d.ts.map
|
|
20
|
+
//# sourceMappingURL=calendar-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar-context.d.ts","sourceRoot":"","sources":["../../../../../../src/components/calendar/shared/calendar-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,MAAM,WAAW,oBAAoB;IACnC,KAAK,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IACvC,YAAY,EAAE,IAAI,CAAC;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,cAAc,EAAE,OAAO,CAAC;IACxB,cAAc,EAAE,OAAO,CAAC;IACxB,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,WAAW,CAAC,EAAE,IAAI,EAAE,CAAC;IAGrB,gBAAgB,CAAC,EAAE,IAAI,CAAC;IACxB,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAE3C,MAAM,CAAC,EAAE,kBAAkB,CAAC;CAC7B;AAED,eAAO,MAAM,eAAe,iDAEhB,CAAC;AAEb,eAAO,MAAM,kBAAkB,4BAQ9B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar-day.d.ts","sourceRoot":"","sources":["../../../../../../src/components/calendar/shared/calendar-day.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,EAIL,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAWtB,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAClC;AAeD,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,qBAkDlD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar-header.d.ts","sourceRoot":"","sources":["../../../../../../src/components/calendar/shared/calendar-header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAGtB,MAAM,WAAW,mBAAoB,SAAQ,SAAS;IACpD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,qBAWxD"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type StyleProp, type ViewStyle } from "react-native";
|
|
3
|
+
export interface CalendarNavButtonsProps {
|
|
4
|
+
style?: StyleProp<ViewStyle>;
|
|
5
|
+
}
|
|
6
|
+
export declare function CalendarNavButtons(props: CalendarNavButtonsProps): React.JSX.Element;
|
|
7
|
+
//# sourceMappingURL=calendar-nav-buttons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar-nav-buttons.d.ts","sourceRoot":"","sources":["../../../../../../src/components/calendar/shared/calendar-nav-buttons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAKL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAKtB,MAAM,WAAW,uBAAuB;IACtC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAWD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,qBAsDhE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar-title.d.ts","sourceRoot":"","sources":["../../../../../../src/components/calendar/shared/calendar-title.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAItB,MAAM,WAAW,kBAAmB,SAAQ,SAAS;IACnD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,qBAWtD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar-week-labels.d.ts","sourceRoot":"","sources":["../../../../../../src/components/calendar/shared/calendar-week-labels.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAGL,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAGtB,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAcD,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IAEpB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAID,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,qBAehE"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { StyleProp, TextStyle, ViewStyle } from "react-native";
|
|
2
|
+
import type { IconProps } from "../../icon";
|
|
3
|
+
export type CalendarDayState = "default" | "selected" | "today" | "disabled" | "hovered";
|
|
4
|
+
export type CalendarNavButtonState = "default" | "disabled" | "hovered";
|
|
5
|
+
export interface BaseCalendarStyles {
|
|
6
|
+
root?: StyleProp<ViewStyle>;
|
|
7
|
+
header?: StyleProp<ViewStyle>;
|
|
8
|
+
headerTitle?: StyleProp<TextStyle>;
|
|
9
|
+
navButtons?: StyleProp<ViewStyle>;
|
|
10
|
+
navButton?: Partial<Record<CalendarNavButtonState, ViewStyle>>;
|
|
11
|
+
navButtonIcon?: Partial<Record<CalendarNavButtonState, IconProps>>;
|
|
12
|
+
weekLabels?: StyleProp<ViewStyle>;
|
|
13
|
+
weekLabel?: StyleProp<TextStyle>;
|
|
14
|
+
dayButton?: Partial<Record<CalendarDayState, StyleProp<ViewStyle>>>;
|
|
15
|
+
dayText?: Partial<Record<CalendarDayState, StyleProp<TextStyle>>>;
|
|
16
|
+
dayMarker?: StyleProp<ViewStyle>;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/calendar/shared/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,MAAM,MAAM,gBAAgB,GACxB,SAAS,GACT,UAAU,GACV,OAAO,GACP,UAAU,GACV,SAAS,CAAC;AACd,MAAM,MAAM,sBAAsB,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;AAExE,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC5B,MAAM,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC9B,WAAW,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACnC,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAClC,SAAS,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,sBAAsB,EAAE,SAAS,CAAC,CAAC,CAAC;IAC/D,aAAa,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,sBAAsB,EAAE,SAAS,CAAC,CAAC,CAAC;IACnE,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAClC,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACjC,SAAS,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IACpE,OAAO,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAClE,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAClC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type StyleProp, type ViewStyle } from "react-native";
|
|
3
|
+
import { TimelineVariants } from "./variants";
|
|
4
|
+
export interface TimelineEventLayout {
|
|
5
|
+
top: number;
|
|
6
|
+
height: number;
|
|
7
|
+
left: string;
|
|
8
|
+
width: string;
|
|
9
|
+
}
|
|
10
|
+
export interface CalendarTimelineProps<T> {
|
|
11
|
+
events?: T[];
|
|
12
|
+
date: Date;
|
|
13
|
+
startHour?: number;
|
|
14
|
+
endHour?: number;
|
|
15
|
+
getStart: (event: T) => Date;
|
|
16
|
+
getEnd: (event: T) => Date;
|
|
17
|
+
keyExtractor: (event: T) => string;
|
|
18
|
+
renderEvent: (event: T, layout: TimelineEventLayout) => React.ReactNode;
|
|
19
|
+
variant?: keyof typeof TimelineVariants;
|
|
20
|
+
style?: StyleProp<ViewStyle>;
|
|
21
|
+
}
|
|
22
|
+
export declare function CalendarTimeline<T>(props: CalendarTimelineProps<T>): React.JSX.Element;
|
|
23
|
+
//# sourceMappingURL=calendar-timeline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar-timeline.d.ts","sourceRoot":"","sources":["../../../../../../src/components/calendar/timeline/calendar-timeline.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,EAA0B,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEtF,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAe9C,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,qBAAqB,CAAC,CAAC;IACtC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC;IACb,IAAI,EAAE,IAAI,CAAC;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAC7B,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAC3B,YAAY,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,MAAM,CAAC;IACnC,WAAW,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,mBAAmB,KAAK,KAAK,CAAC,SAAS,CAAC;IACxE,OAAO,CAAC,EAAE,MAAM,OAAO,gBAAgB,CAAC;IACxC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AA2CD,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,KAAK,EAAE,qBAAqB,CAAC,CAAC,CAAC,qBA4HlE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/calendar/timeline/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,YAAY,EACV,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { StyleProp, TextStyle, ViewStyle } from "react-native";
|
|
2
|
+
export interface TimelineStyles {
|
|
3
|
+
container?: StyleProp<ViewStyle>;
|
|
4
|
+
timeline?: StyleProp<ViewStyle>;
|
|
5
|
+
timeColumn?: StyleProp<ViewStyle>;
|
|
6
|
+
timeSlot?: StyleProp<ViewStyle>;
|
|
7
|
+
timeText?: StyleProp<TextStyle>;
|
|
8
|
+
eventsColumn?: StyleProp<ViewStyle>;
|
|
9
|
+
hourLine?: StyleProp<ViewStyle>;
|
|
10
|
+
currentTimeDot?: StyleProp<ViewStyle>;
|
|
11
|
+
currentTimeLineBar?: StyleProp<ViewStyle>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/calendar/timeline/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpE,MAAM,WAAW,cAAc;IAC7B,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACjC,QAAQ,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAChC,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAClC,QAAQ,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAChC,QAAQ,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAChC,YAAY,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACpC,QAAQ,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAChC,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACtC,kBAAkB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC3C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/calendar/timeline/variants/default.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAK/C,eAAO,MAAM,yBAAyB,QAAO,cAoD5C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/calendar/timeline/variants/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB;;CAE5B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/calendar/week-calendar/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { StyleProp, ViewStyle } from "react-native";
|
|
2
|
+
import type { BaseCalendarStyles } from "../shared/types";
|
|
3
|
+
export interface WeekCalendarStyles extends BaseCalendarStyles {
|
|
4
|
+
weekStrip?: StyleProp<ViewStyle>;
|
|
5
|
+
swipeContainer?: StyleProp<ViewStyle>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/calendar/week-calendar/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAE1D,MAAM,WAAW,kBAAmB,SAAQ,kBAAkB;IAC5D,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACjC,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CACvC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/calendar/week-calendar/variants/default.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD,eAAO,MAAM,6BAA6B,QAAO,kBAwIhD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/calendar/week-calendar/variants/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB;;CAEhC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type StyleProp, type ViewStyle } from "react-native";
|
|
3
|
+
import { WeekCalendarVariants } from "./variants";
|
|
4
|
+
export interface WeekCalendarProps {
|
|
5
|
+
value?: Date | null;
|
|
6
|
+
onChange?: (date: Date | null) => void;
|
|
7
|
+
defaultWeek?: Date;
|
|
8
|
+
minDate?: Date;
|
|
9
|
+
maxDate?: Date;
|
|
10
|
+
markedDates?: Date[];
|
|
11
|
+
weekDays?: string[];
|
|
12
|
+
variant?: keyof typeof WeekCalendarVariants;
|
|
13
|
+
style?: StyleProp<ViewStyle>;
|
|
14
|
+
}
|
|
15
|
+
export declare function WeekCalendar(props: WeekCalendarProps): React.JSX.Element;
|
|
16
|
+
//# sourceMappingURL=week-calendar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"week-calendar.d.ts","sourceRoot":"","sources":["../../../../../../src/components/calendar/week-calendar/week-calendar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAC;AACtE,OAAO,EASL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAkBtB,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAIlD,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IACvC,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,WAAW,CAAC,EAAE,IAAI,EAAE,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,OAAO,oBAAoB,CAAC;IAC5C,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAWD,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,qBAwMpD"}
|
|
@@ -5,8 +5,8 @@ export * from "./badge";
|
|
|
5
5
|
export * from "./button";
|
|
6
6
|
export * from "./calendar";
|
|
7
7
|
export * from "./card";
|
|
8
|
-
export * from "./combobox";
|
|
9
8
|
export * from "./checkbox";
|
|
9
|
+
export * from "./combobox";
|
|
10
10
|
export * from "./empty";
|
|
11
11
|
export * from "./field";
|
|
12
12
|
export * from "./icon";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAG5E,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACxB,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,eAAe,CAAC,EAAE,eAAe,CAAC,WAAW,CAAC,CAAC;IAC/C,KAAK,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC;IACpC,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC/B;AAED,eAAO,MAAM,UAAU,GAAI,mEAMxB,aAAa,gCAef,CAAC;AAEF,cAAc,yBAAyB,CAAC;AAExC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACpE,cAAc,gBAAgB,CAAC;AAE/B,cAAc,cAAc,CAAC;AAE7B,cAAc,aAAa,CAAC"}
|
|
@@ -20,6 +20,10 @@ export interface ComponentsConfig {
|
|
|
20
20
|
menu?: {
|
|
21
21
|
selectionIcon?: React.ComponentType<SvgProps>;
|
|
22
22
|
};
|
|
23
|
+
calendar?: {
|
|
24
|
+
prevIcon?: React.ComponentType<SvgProps>;
|
|
25
|
+
nextIcon?: React.ComponentType<SvgProps>;
|
|
26
|
+
};
|
|
23
27
|
}
|
|
24
28
|
declare const ThemeContext: import("react").Context<ThemeContext | null>;
|
|
25
29
|
export interface ThemeProviderProps extends PropsWithChildren {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../src/themes/provider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,iBAAiB,EAIvB,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,KAAK,EACV,MAAM,EACN,WAAW,EACX,UAAU,EACV,QAAQ,EACR,aAAa,EACb,MAAM,EACN,WAAW,EACZ,MAAM,SAAS,CAAC;AAGjB,UAAU,YAAY;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,UAAU,CAAC;IACvB,WAAW,EAAE,WAAW,CAAC;IACzB,aAAa,EAAE,aAAa,CAAC;IAC7B,QAAQ,EAAE,QAAQ,CAAC;IACnB,cAAc,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAC9C,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC/B;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE;QACN,KAAK,CAAC,EAAE,OAAO,CACb,MAAM,CAAC,MAAM,OAAO,aAAa,EAAE,KAAK,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAClE,CAAC;KACH,CAAC;IACF,IAAI,CAAC,EAAE;QACL,aAAa,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;KAC/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C,CAAC,CAClE,CAAC;KACH,CAAC;IACF,IAAI,CAAC,EAAE;QACL,aAAa,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;KAC/C,CAAC;IACF,QAAQ,CAAC,EAAE;QACT,QAAQ,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QACzC,QAAQ,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;KAC1C,CAAC;CACH;AAED,QAAA,MAAM,YAAY,8CAA2C,CAAC;AAE9D,MAAM,WAAW,kBAAmB,SAAQ,iBAAiB;IAC3D,KAAK,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IACjC,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC/B;AAED,eAAO,MAAM,aAAa,GAAI,OAAO,kBAAkB,gCAoCtD,CAAC;AAEF,eAAO,MAAM,QAAQ,oBAMpB,CAAC;AAEF,eAAO,MAAM,mBAAmB,oCAM/B,CAAC"}
|
|
@@ -14,6 +14,13 @@ export declare const endOfMonth: (date: Date) => Date;
|
|
|
14
14
|
export declare const getDaysInMonth: (date: Date) => number;
|
|
15
15
|
export declare const getFirstDayOfMonth: (date: Date) => number;
|
|
16
16
|
export declare const isSameMonth: (date1: Date, date2: Date) => boolean;
|
|
17
|
-
export declare const getWeekDays: (month: number, year: number, week: number) => Date[];
|
|
17
|
+
export declare const getWeekDays: (month: number, year: number, week: number) => (Date | null)[];
|
|
18
18
|
export declare const getWeeksInMonth: (date: Date) => number;
|
|
19
|
+
export declare const startOfWeek: (date: Date) => Date;
|
|
20
|
+
export declare const endOfWeek: (date: Date) => Date;
|
|
21
|
+
export declare const getWeekDates: (date: Date) => Date[];
|
|
22
|
+
export declare const addWeeks: (date: Date, weeks: number) => Date;
|
|
23
|
+
export declare const subWeeks: (date: Date, weeks: number) => Date;
|
|
24
|
+
export declare const addDays: (date: Date, days: number) => Date;
|
|
25
|
+
export declare const subDays: (date: Date, days: number) => Date;
|
|
19
26
|
//# sourceMappingURL=date-utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-utils.d.ts","sourceRoot":"","sources":["../../../../src/utils/date-utils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,GAAI,MAAM,IAAI,EAAE,QAAQ,MAAM,KAAG,
|
|
1
|
+
{"version":3,"file":"date-utils.d.ts","sourceRoot":"","sources":["../../../../src/utils/date-utils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,GAAI,MAAM,IAAI,EAAE,QAAQ,MAAM,KAAG,MAkBvD,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,OAAO,IAAI,EAAE,OAAO,IAAI,KAAG,OAExD,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,MAAM,IAAI,KAAG,OAExC,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,OAAO,IAAI,EAAE,OAAO,IAAI,KAAG,OAIvD,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,OAAO,IAAI,EAAE,OAAO,IAAI,KAAG,OAItD,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,MAAM,IAAI,EAAE,UAAU;IAAE,KAAK,EAAE,IAAI,CAAC;IAAC,GAAG,EAAE,IAAI,CAAA;CAAE,KAAG,OAG3F,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,MAAM,IAAI,EAAE,QAAQ,MAAM,KAAG,IAItD,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,MAAM,IAAI,EAAE,QAAQ,MAAM,KAAG,IAEtD,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,MAAM,IAAI,KAAG,IAEzC,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,MAAM,IAAI,KAAG,IAEvC,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,MAAM,IAAI,KAAG,MAE3C,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,MAAM,IAAI,KAAG,MAE/C,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,OAAO,IAAI,EAAE,OAAO,IAAI,KAAG,OAEtD,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,EAAE,MAAM,MAAM,EAAE,MAAM,MAAM,KAAG,CAAC,IAAI,GAAG,IAAI,CAAC,EAoBpF,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,MAAM,IAAI,KAAG,MAM5C,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,MAAM,IAAI,KAAG,IAIxC,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,MAAM,IAAI,KAAG,IAItC,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,MAAM,IAAI,KAAG,IAAI,EAO7C,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,MAAM,IAAI,EAAE,OAAO,MAAM,KAAG,IAIpD,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,MAAM,IAAI,EAAE,OAAO,MAAM,KAAG,IAEpD,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,MAAM,IAAI,EAAE,MAAM,MAAM,KAAG,IAIlD,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,MAAM,IAAI,EAAE,MAAM,MAAM,KAAG,IAElD,CAAC"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import React, { useCallback, useMemo, useState } from "react";
|
|
2
|
+
import { View, type StyleProp, type ViewStyle } from "react-native";
|
|
3
|
+
import { addMonths, subMonths } from "../../../utils/date-utils";
|
|
4
|
+
import { CalendarContext } from "../shared/calendar-context";
|
|
5
|
+
import { CalendarVariants } from "./variants";
|
|
6
|
+
|
|
7
|
+
export interface CalendarRootProps {
|
|
8
|
+
variant?: keyof typeof CalendarVariants;
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
value?: Date | null;
|
|
11
|
+
onChange?: (date: Date | null) => void;
|
|
12
|
+
defaultMonth?: Date;
|
|
13
|
+
minDate?: Date;
|
|
14
|
+
maxDate?: Date;
|
|
15
|
+
markedDates?: Date[];
|
|
16
|
+
style?: StyleProp<ViewStyle>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function CalendarRoot(props: CalendarRootProps) {
|
|
20
|
+
const {
|
|
21
|
+
children,
|
|
22
|
+
value,
|
|
23
|
+
onChange,
|
|
24
|
+
defaultMonth = new Date(),
|
|
25
|
+
minDate,
|
|
26
|
+
maxDate,
|
|
27
|
+
markedDates,
|
|
28
|
+
style,
|
|
29
|
+
} = props;
|
|
30
|
+
const variantStyles = CalendarVariants[props.variant || "default"]();
|
|
31
|
+
|
|
32
|
+
const [currentMonth, setCurrentMonth] = useState<Date>(defaultMonth);
|
|
33
|
+
|
|
34
|
+
const goToPrev = useCallback(() => {
|
|
35
|
+
setCurrentMonth((prev) => subMonths(prev, 1));
|
|
36
|
+
}, []);
|
|
37
|
+
|
|
38
|
+
const goToNext = useCallback(() => {
|
|
39
|
+
setCurrentMonth((prev) => addMonths(prev, 1));
|
|
40
|
+
}, []);
|
|
41
|
+
|
|
42
|
+
const isPrevDisabled = useMemo(() => {
|
|
43
|
+
if (!minDate) return false;
|
|
44
|
+
return subMonths(currentMonth, 1) < minDate;
|
|
45
|
+
}, [currentMonth, minDate]);
|
|
46
|
+
|
|
47
|
+
const isNextDisabled = useMemo(() => {
|
|
48
|
+
if (!maxDate) return false;
|
|
49
|
+
return addMonths(currentMonth, 1) > maxDate;
|
|
50
|
+
}, [currentMonth, maxDate]);
|
|
51
|
+
|
|
52
|
+
const containerStyle = [variantStyles.root, style];
|
|
53
|
+
|
|
54
|
+
return (
|
|
55
|
+
<CalendarContext.Provider
|
|
56
|
+
value={{
|
|
57
|
+
value,
|
|
58
|
+
onChange,
|
|
59
|
+
currentMonth,
|
|
60
|
+
goToPrev,
|
|
61
|
+
goToNext,
|
|
62
|
+
isPrevDisabled,
|
|
63
|
+
isNextDisabled,
|
|
64
|
+
styles: variantStyles,
|
|
65
|
+
minDate,
|
|
66
|
+
maxDate,
|
|
67
|
+
markedDates,
|
|
68
|
+
}}
|
|
69
|
+
>
|
|
70
|
+
<View style={containerStyle}>{children}</View>
|
|
71
|
+
</CalendarContext.Provider>
|
|
72
|
+
);
|
|
73
|
+
}
|
|
@@ -1,25 +1,38 @@
|
|
|
1
|
-
import { getWeekDays, getWeeksInMonth } from "../../../utils/date-utils";
|
|
2
1
|
import React from "react";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import {
|
|
3
|
+
View,
|
|
4
|
+
type StyleProp,
|
|
5
|
+
type ViewProps,
|
|
6
|
+
type ViewStyle,
|
|
7
|
+
} from "react-native";
|
|
8
|
+
import { getWeekDays, getWeeksInMonth } from "../../../utils/date-utils";
|
|
9
|
+
import { useCalendarContext } from "../shared/calendar-context";
|
|
10
|
+
import { CalendarDay } from "../shared/calendar-day";
|
|
11
|
+
import type { CalendarStyles } from "./types";
|
|
6
12
|
|
|
7
13
|
export interface CalendarWeekProps extends ViewProps {
|
|
8
14
|
index: number;
|
|
9
|
-
|
|
10
15
|
style?: StyleProp<ViewStyle>;
|
|
11
16
|
}
|
|
12
17
|
|
|
13
18
|
function CalendarWeek(props: CalendarWeekProps) {
|
|
14
19
|
const { style, ...viewProps } = props;
|
|
15
20
|
const { currentMonth, styles } = useCalendarContext();
|
|
21
|
+
const calStyles = styles as CalendarStyles;
|
|
16
22
|
|
|
17
|
-
const days = getWeekDays(
|
|
23
|
+
const days = getWeekDays(
|
|
24
|
+
currentMonth.getMonth(),
|
|
25
|
+
currentMonth.getFullYear(),
|
|
26
|
+
props.index,
|
|
27
|
+
);
|
|
18
28
|
|
|
19
|
-
const composedStyle = [
|
|
29
|
+
const composedStyle = [calStyles?.week, style];
|
|
20
30
|
return (
|
|
21
31
|
<View {...viewProps} style={composedStyle}>
|
|
22
32
|
{days.map((day, index) => {
|
|
33
|
+
if (!day) {
|
|
34
|
+
return <View key={index} style={styles?.dayButton?.default} />;
|
|
35
|
+
}
|
|
23
36
|
return <CalendarDay key={index} date={day} />;
|
|
24
37
|
})}
|
|
25
38
|
</View>
|
|
@@ -32,10 +45,11 @@ export interface CalendarWeeksProps extends ViewProps {
|
|
|
32
45
|
|
|
33
46
|
export function CalendarWeeks(props: CalendarWeeksProps) {
|
|
34
47
|
const { currentMonth, styles } = useCalendarContext();
|
|
48
|
+
const calStyles = styles as CalendarStyles;
|
|
35
49
|
|
|
36
50
|
const weeks = getWeeksInMonth(currentMonth);
|
|
37
51
|
|
|
38
|
-
const composedStyle = [
|
|
52
|
+
const composedStyle = [calStyles?.weeks, props.style];
|
|
39
53
|
|
|
40
54
|
return (
|
|
41
55
|
<View style={composedStyle}>
|