@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 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["addMonths","subMonths","React","useState","Pressable","Text","useCalendarContext","jsx","_jsx","calculateState","isDisabled","isHovered","CalendarNavButton","props","children","direction","style","textStyle","pressableProps","currentMonth","setCurrentMonth","minDate","maxDate","styles","setIsHovered","useMemo","prevMonth","nextMonth","state","handlePress","newMonth","buttonStyle","navButton","default","textStyleCombined","navButtonText","onPress","onHoverIn","onHoverOut","disabled"],"sourceRoot":"../../../../../src","sources":["components/calendar/components/calendar-nav-button.tsx"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,SAAS,QAAQ,8BAA2B;AAChE,OAAOC,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,SAAS,EAAEC,IAAI,QAA6E,cAAc;AACnH,SAASC,kBAAkB,QAAQ,eAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAUhD,MAAMC,cAAc,GAAGA,CAACC,UAAmB,EAAEC,SAAkB,KAA6B;EAC1F,IAAID,UAAU,EAAE,OAAO,UAAU;EACjC,IAAIC,SAAS,EAAE,OAAO,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AAMC,WAAW,GAAG,CAACR,MAAM,EAAES,SAAS,EAAEC,OAAO,EAAEV,MAAM,EAAES,SAAS,GAAGJ,KAAK,CAAC,EAAEZ,KAAK,CAAC;EACnF,MAAMkB,iBAAiB,GAAG,CAACX,MAAM,EAAEY,aAAa,EAAEF,OAAO,EAAEV,MAAM,EAAEY,aAAa,GAAGP,KAAK,CAAC,EAAEX,SAAS,CAAC;EAErG,oBACET,IAAA,CAACJ,SAAS;IAAA,GACJc,cAAc;IAClBkB,OAAO,EAAEP,WAAY;IACrBQ,SAAS,EAAEA,CAAA,KAAMb,YAAY,CAAC,IAAI,CAAE;IACpCc,UAAU,EAAEA,CAAA,KAAMd,YAAY,CAAC,KAAK,CAAE;IACtCe,QAAQ,EAAE7B,UAAW;IACrBM,KAAK,EAAEe,WAAY;IAAAjB,QAAA,eAEnBN,IAAA,CAACH,IAAI;MAACW,KAAK,EAAEkB,iBAAkB;MAAApB,QAAA,EAAEA;IAAQ,CAAO;EAAC,CACxC,CAAC;AAEhB","ignoreList":[]}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import React, { useState } from "react";
|
|
4
|
-
import { View } from "react-native";
|
|
5
|
-
import { CalendarContext } from "../context.js";
|
|
6
|
-
import { CalendarVariants } from "../variants/index.js";
|
|
7
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
-
export function CalendarRoot(props) {
|
|
9
|
-
const {
|
|
10
|
-
children,
|
|
11
|
-
value,
|
|
12
|
-
onChange,
|
|
13
|
-
defaultMonth = new Date(),
|
|
14
|
-
minDate,
|
|
15
|
-
maxDate,
|
|
16
|
-
style,
|
|
17
|
-
...viewProps
|
|
18
|
-
} = props;
|
|
19
|
-
const variantStyles = CalendarVariants[props.variant || "default"]();
|
|
20
|
-
const [currentMonth, setCurrentMonth] = useState(defaultMonth);
|
|
21
|
-
const containerStyle = [variantStyles.root, style];
|
|
22
|
-
return /*#__PURE__*/_jsx(CalendarContext.Provider, {
|
|
23
|
-
value: {
|
|
24
|
-
value,
|
|
25
|
-
onChange,
|
|
26
|
-
currentMonth,
|
|
27
|
-
setCurrentMonth,
|
|
28
|
-
styles: variantStyles,
|
|
29
|
-
minDate,
|
|
30
|
-
maxDate
|
|
31
|
-
},
|
|
32
|
-
children: /*#__PURE__*/_jsx(View, {
|
|
33
|
-
...viewProps,
|
|
34
|
-
style: containerStyle,
|
|
35
|
-
children: children
|
|
36
|
-
})
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=calendar-root.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","useState","View","CalendarContext","CalendarVariants","jsx","_jsx","CalendarRoot","props","children","value","onChange","defaultMonth","Date","minDate","maxDate","style","viewProps","variantStyles","variant","currentMonth","setCurrentMonth","containerStyle","root","Provider","styles"],"sourceRoot":"../../../../../src","sources":["components/calendar/components/calendar-root.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,IAAI,QAAwC,cAAc;AACnE,SAASC,eAAe,QAAQ,eAAY;AAC5C,SAASC,gBAAgB,QAAQ,sBAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAa/C,OAAO,SAASC,YAAYA,CAACC,KAAwB,EAAE;EACrD,MAAM;IAAEC,QAAQ;IAAEC,KAAK;IAAEC,QAAQ;IAAEC,YAAY,GAAG,IAAIC,IAAI,CAAC,CAAC;IAAEC,OAAO;IAAEC,OAAO;IAAEC,KAAK;IAAE,GAAGC;EAAU,CAAC,GAAGT,KAAK;EAC7G,MAAMU,aAAa,GAAGd,gBAAgB,CAACI,KAAK,CAACW,OAAO,IAAI,SAAS,CAAC,CAAC,CAAC;EAEpE,MAAM,CAACC,YAAY,EAAEC,eAAe,CAAC,GAAGpB,QAAQ,CAAOW,YAAY,CAAC;EAEpE,MAAMU,cAAc,GAAG,CAACJ,aAAa,CAACK,IAAI,EAAEP,KAAK,CAAC;EAElD,oBACEV,IAAA,CAACH,eAAe,CAACqB,QAAQ;IACvBd,KAAK,EAAE;MACLA,KAAK;MACLC,QAAQ;MACRS,YAAY;MACZC,eAAe;MACfI,MAAM,EAAEP,aAAa;MACrBJ,OAAO;MACPC;IACF,CAAE;IAAAN,QAAA,eAEFH,IAAA,CAACJ,IAAI;MAAA,GAAKe,SAAS;MAAED,KAAK,EAAEM,cAAe;MAAAb,QAAA,EACxCA;IAAQ,CACL;EAAC,CACiB,CAAC;AAE/B","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["formatDate","React","Text","useCalendarContext","jsx","_jsx","CalendarTitle","props","children","style","formatStr","textProps","currentMonth","styles","titleStyle","headerTitle"],"sourceRoot":"../../../../../src","sources":["components/calendar/components/calendar-title.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,8BAA2B;AACtD,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAwD,cAAc;AACnF,SAASC,kBAAkB,QAAQ,eAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAQhD,OAAO,SAASC,aAAaA,CAACC,KAAyB,EAAE;EACvD,MAAM;IAAEC,QAAQ;IAAEC,KAAK;IAAEC,SAAS,GAAG,WAAW;IAAE,GAAGC;EAAU,CAAC,GAAGJ,KAAK;EACxE,MAAM;IAAEK,YAAY;IAAEC;EAAO,CAAC,GAAGV,kBAAkB,CAAC,CAAC;EAErD,MAAMW,UAAU,GAAG,CAACD,MAAM,EAAEE,WAAW,EAAEN,KAAK,CAAC;EAE/C,oBACEJ,IAAA,CAACH,IAAI;IAAA,GAAKS,SAAS;IAAEF,KAAK,EAAEK,UAAW;IAAAN,QAAA,EACpCA,QAAQ,IAAIR,UAAU,CAACY,YAAY,EAAEF,SAAS;EAAC,CAC5C,CAAC;AAEX","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","Text","View","useCalendarContext","jsx","_jsx","CalendarWeekLabel","props","styles","composedStyle","weekLabel","style","numberOfLines","children","DEFAULT_WEEK_DAYS","CalendarWeekLabels","weekDays","weekLabels","map","day","index"],"sourceRoot":"../../../../../src","sources":["components/calendar/components/calendar-week-labels.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAAwD,cAAc;AACzF,SAASC,kBAAkB,QAAQ,eAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAOhD,SAASC,iBAAiBA,CAACC,KAA6B,EAAE;EACxD,MAAM;IAAEC;EAAO,CAAC,GAAGL,kBAAkB,CAAC,CAAC;EAEvC,MAAMM,aAAa,GAAG,CAACD,MAAM,EAAEE,SAAS,EAAEH,KAAK,CAACI,KAAK,CAAC;EAEtD,oBACEN,IAAA,CAACJ,IAAI;IAACW,aAAa,EAAE,CAAE;IAACD,KAAK,EAAEF,aAAc;IAAAI,QAAA,EAC1CN,KAAK,CAACM;EAAQ,CACX,CAAC;AAEX;AAQA,MAAMC,iBAAiB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;AAEpE,OAAO,SAASC,kBAAkBA,CAACR,KAA8B,EAAE;EACjE,MAAM;IAAES,QAAQ,GAAGF,iBAAiB;IAAEH;EAAM,CAAC,GAAGJ,KAAK;EACrD,MAAM;IAAEC;EAAO,CAAC,GAAGL,kBAAkB,CAAC,CAAC;EAEvC,MAAMM,aAAa,GAAG,CAACD,MAAM,EAAES,UAAU,EAAEN,KAAK,CAAC;EAEjD,oBACEN,IAAA,CAACH,IAAI;IAACS,KAAK,EAAEF,aAAc;IAAAI,QAAA,EACxBG,QAAQ,CAACE,GAAG,CAAC,CAACC,GAAG,EAAEC,KAAK,kBACvBf,IAAA,CAACC,iBAAiB;MAAaK,KAAK,EAAEH,MAAM,EAAEE,SAAU;MAAAG,QAAA,EACrDM;IAAG,GADkBC,KAEL,CACpB;EAAC,CACE,CAAC;AAEX","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["getWeekDays","getWeeksInMonth","React","View","useCalendarContext","CalendarDay","jsx","_jsx","CalendarWeek","props","style","viewProps","currentMonth","styles","days","getMonth","getFullYear","index","composedStyle","week","children","map","day","date","CalendarWeeks","weeks","Array","from","length","_"],"sourceRoot":"../../../../../src","sources":["components/calendar/components/calendar-weeks.tsx"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,eAAe,QAAQ,8BAA2B;AACxE,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAwD,cAAc;AACnF,SAASC,kBAAkB,QAAQ,eAAY;AAC/C,SAASC,WAAW,QAAQ,mBAAgB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAQ7C,SAASC,YAAYA,CAACC,KAAwB,EAAE;EAC9C,MAAM;IAAEC,KAAK;IAAE,GAAGC;EAAU,CAAC,GAAGF,KAAK;EACrC,MAAM;IAAEG,YAAY;IAAEC;EAAO,CAAC,GAAGT,kBAAkB,CAAC,CAAC;EAErD,MAAMU,IAAI,GAAGd,WAAW,CAACY,YAAY,CAACG,QAAQ,CAAC,CAAC,EAAEH,YAAY,CAACI,WAAW,CAAC,CAAC,EAAEP,KAAK,CAACQ,KAAK,CAAC;EAE1F,MAAMC,aAAa,GAAG,CAACL,MAAM,EAAEM,IAAI,EAAET,KAAK,CAAC;EAC3C,oBACEH,IAAA,CAACJ,IAAI;IAAA,GAAKQ,SAAS;IAAED,KAAK,EAAEQ,aAAc;IAAAE,QAAA,EACvCN,IAAI,CAACO,GAAG,CAAC,CAACC,GAAG,EAAEL,KAAK,KAAK;MACxB,oBAAOV,IAAA,CAACF,WAAW;QAAakB,IAAI,EAAED;MAAI,GAAjBL,KAAmB,CAAC;IAC/C,CAAC;EAAC,CACE,CAAC;AAEX;AAMA,OAAO,SAASO,aAAaA,CAACf,KAAyB,EAAE;EACvD,MAAM;IAAEG,YAAY;IAAEC;EAAO,CAAC,GAAGT,kBAAkB,CAAC,CAAC;EAErD,MAAMqB,KAAK,GAAGxB,eAAe,CAACW,YAAY,CAAC;EAE3C,MAAMM,aAAa,GAAG,CAACL,MAAM,EAAEY,KAAK,EAAEhB,KAAK,CAACC,KAAK,CAAC;EAElD,oBACEH,IAAA,CAACJ,IAAI;IAACO,KAAK,EAAEQ,aAAc;IAAAE,QAAA,EACxBM,KAAK,CAACC,IAAI,CAAC;MAAEC,MAAM,EAAEH;IAAM,CAAC,CAAC,CAACJ,GAAG,CAAC,CAACQ,CAAC,EAAEZ,KAAK,KAAK;MAC/C,oBAAOV,IAAA,CAACC,YAAY;QAAaS,KAAK,EAAEA;MAAM,GAApBA,KAAsB,CAAC;IACnD,CAAC;EAAC,CACE,CAAC;AAEX","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","CalendarContext","createContext","undefined","useCalendarContext","context","useContext","Error"],"sourceRoot":"../../../../src","sources":["components/calendar/context.ts"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AAczB,OAAO,MAAMC,eAAe,gBAAGD,KAAK,CAACE,aAAa,CAAmCC,SAAS,CAAC;AAE/F,OAAO,MAAMC,kBAAkB,GAAGA,CAAA,KAAM;EACtC,MAAMC,OAAO,GAAGL,KAAK,CAACM,UAAU,CAACL,eAAe,CAAC;EACjD,IAAI,CAACI,OAAO,EAAE;IACZ,MAAM,IAAIE,KAAK,CAAC,sDAAsD,CAAC;EACzE;EACA,OAAOF,OAAO;AAChB,CAAC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/calendar/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["useThemedStyles","useCalendarVariantDefault","colors","radius","fontFamily","fontSize","root","padding","backgroundColor","background","borderRadius","borderWidth","borderColor","border","width","header","flexDirection","justifyContent","alignItems","marginBottom","paddingHorizontal","headerTitle","fontWeight","color","foreground","navButton","default","height","disabled","opacity","navButtonText","mutedForeground","weekLabels","paddingVertical","gap","weekLabel","textAlign","weeks","week","dayButton","selected","primary","today","deprioritized","hovered","muted","dayText","pointerEvents","primaryForeground"],"sourceRoot":"../../../../../src","sources":["components/calendar/variants/default.tsx"],"mappings":";;AACA,SAASA,eAAe,QAAQ,qCAAkC;AAElE,OAAO,MAAMC,yBAAyB,GAAGA,CAAA,KAAsB;EAC7D,OAAOD,eAAe,CACpB,CAAC;IAAEE,MAAM;IAAEC,MAAM;IAAEC,UAAU;IAAEC;EAAS,CAAC,MAAsB;IAC7DC,IAAI,EAAE;MACJC,OAAO,EAAE,EAAE;MACXC,eAAe,EAAEN,MAAM,CAACO,UAAU;MAClCC,YAAY,EAAEP,MAAM;MACpBQ,WAAW,EAAE,CAAC;MACdC,WAAW,EAAEV,MAAM,CAACW,MAAM;MAC1BC,KAAK,EAAE;IACT,CAAC;IACDC,MAAM,EAAE;MACNC,aAAa,EAAE,KAAK;MACpBC,cAAc,EAAE,eAAe;MAC/BC,UAAU,EAAE,QAAQ;MACpBC,YAAY,EAAE,EAAE;MAChBC,iBAAiB,EAAE;IACrB,CAAC;IACDC,WAAW,EAAE;MACXhB,QAAQ,EAAEA,QAAQ,GAAG,KAAK;MAC1BiB,UAAU,EAAE,KAAK;MACjBlB,UAAU;MACVmB,KAAK,EAAErB,MAAM,CAACsB;IAChB,CAAC;IACDC,SAAS,EAAE;MACTC,OAAO,EAAE;QACPZ,KAAK,EAAE,EAAE;QACTa,MAAM,EAAE,EAAE;QACVjB,YAAY,EAAEP,MAAM,GAAG,GAAG;QAC1Be,UAAU,EAAE,QAAQ;QACpBD,cAAc,EAAE,QAAQ;QACxBT,eAAe,EAAE;MACnB,CAAC;MACDoB,QAAQ,EAAE;QACRC,OAAO,EAAE;MACX;IACF,CAAC;IACDC,aAAa,EAAE;MACbJ,OAAO,E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1B;IACF,CAAC;IACDC,OAAO,EAAE;MACPpB,OAAO,EAAE;QACPrB,QAAQ;QACRD,UAAU;QACVmB,KAAK,EAAErB,MAAM,CAACsB,UAAU;QACxBF,UAAU,EAAE,KAAK;QACjByB,aAAa,EAAE;MACjB,CAAC;MACDP,QAAQ,EAAE;QACRjB,KAAK,EAAErB,MAAM,CAAC8C,iBAAiB;QAC/B1B,UAAU,EAAE;MACd,CAAC;MACDoB,KAAK,EAAE;QACLnB,KAAK,EAAErB,MAAM,CAACuC,OAAO;QACrBnB,UAAU,EAAE;MACd,CAAC;MACDM,QAAQ,EAAE;QACRL,KAAK,EAAErB,MAAM,CAAC6B;MAChB,CAAC;MACDY,aAAa,EAAE;QACbpB,KAAK,EAAErB,MAAM,CAAC6B,eAAe;QAC7BF,OAAO,EAAE;MACX;IACF;EACF,CAAC,CACH,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["useCalendarVariantDefault","CalendarVariants","default"],"sourceRoot":"../../../../../src","sources":["components/calendar/variants/index.ts"],"mappings":";;AAAA,SAASA,yBAAyB,QAAQ,cAAW;AAErD,OAAO,MAAMC,gBAAgB,GAAG;EAC9BC,OAAO,EAAEF;AACX,CAAC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"calendar-day.d.ts","sourceRoot":"","sources":["../../../../../../src/components/calendar/components/calendar-day.tsx"],"names":[],"mappings":"AACA,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,EAAmB,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAI/F,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;AAiBD,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,qBAiClD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"calendar-header.d.ts","sourceRoot":"","sources":["../../../../../../src/components/calendar/components/calendar-header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAQ,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpF,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"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { type PressableProps, type StyleProp, type TextStyle, type ViewStyle } from "react-native";
|
|
3
|
-
export interface CalendarNavButtonProps extends PressableProps {
|
|
4
|
-
children?: React.ReactNode;
|
|
5
|
-
direction: "prev" | "next";
|
|
6
|
-
style?: StyleProp<ViewStyle>;
|
|
7
|
-
textStyle?: StyleProp<TextStyle>;
|
|
8
|
-
}
|
|
9
|
-
export declare function CalendarNavButton(props: CalendarNavButtonProps): React.JSX.Element;
|
|
10
|
-
//# sourceMappingURL=calendar-nav-button.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"calendar-nav-button.d.ts","sourceRoot":"","sources":["../../../../../../src/components/calendar/components/calendar-nav-button.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAAmB,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAIpH,MAAM,WAAW,sBAAuB,SAAQ,cAAc;IAC5D,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAClC;AAQD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,qBAwC9D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"calendar-root.d.ts","sourceRoot":"","sources":["../../../../../../src/components/calendar/components/calendar-root.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAAQ,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,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,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,qBAyBpD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"calendar-title.d.ts","sourceRoot":"","sources":["../../../../../../src/components/calendar/components/calendar-title.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAQ,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpF,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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"calendar-week-labels.d.ts","sourceRoot":"","sources":["../../../../../../src/components/calendar/components/calendar-week-labels.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAc,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAG1F,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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"calendar-weeks.d.ts","sourceRoot":"","sources":["../../../../../../src/components/calendar/components/calendar-weeks.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAQ,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAIpF,MAAM,WAAW,iBAAkB,SAAQ,SAAS;IAClD,KAAK,EAAE,MAAM,CAAC;IAEd,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAkBD,MAAM,WAAW,kBAAmB,SAAQ,SAAS;IACnD,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,qBActD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../../src/components/calendar/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,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,eAAe,EAAE,CAAC,KAAK,EAAE,IAAI,KAAK,IAAI,CAAC;IACvC,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,OAAO,CAAC,EAAE,IAAI,CAAC;IAEf,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB;AAED,eAAO,MAAM,eAAe,iDAAmE,CAAC;AAEhG,eAAO,MAAM,kBAAkB,4BAM9B,CAAC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { TextStyle, ViewStyle } from "react-native";
|
|
2
|
-
import type { CalendarDayProps } from "./components/calendar-day";
|
|
3
|
-
import type { CalendarHeaderProps } from "./components/calendar-header";
|
|
4
|
-
import type { CalendarRootProps } from "./components/calendar-root";
|
|
5
|
-
import type { CalendarTitleProps } from "./components/calendar-title";
|
|
6
|
-
import type { CalendarWeekLabelProps, CalendarWeekLabelsProps } from "./components/calendar-week-labels";
|
|
7
|
-
import type { CalendarWeekProps, CalendarWeeksProps } from "./components/calendar-weeks";
|
|
8
|
-
export type CalendarDayState = "default" | "selected" | "today" | "disabled" | "deprioritized" | "hovered";
|
|
9
|
-
export type CalendarNavButtonState = "default" | "disabled" | "hovered";
|
|
10
|
-
export interface CalendarStyles {
|
|
11
|
-
root?: CalendarRootProps["style"];
|
|
12
|
-
header?: CalendarHeaderProps["style"];
|
|
13
|
-
headerTitle?: CalendarTitleProps["style"];
|
|
14
|
-
navButton?: Partial<Record<CalendarNavButtonState, ViewStyle>>;
|
|
15
|
-
navButtonText?: Partial<Record<CalendarNavButtonState, TextStyle>>;
|
|
16
|
-
weekLabels: CalendarWeekLabelsProps["style"];
|
|
17
|
-
weekLabel?: CalendarWeekLabelProps["style"];
|
|
18
|
-
weeks?: CalendarWeekProps["style"];
|
|
19
|
-
week?: CalendarWeeksProps["style"];
|
|
20
|
-
dayButton?: Partial<Record<CalendarDayState, CalendarDayProps["style"]>>;
|
|
21
|
-
dayText?: Partial<Record<CalendarDayState, CalendarDayProps["textStyle"]>>;
|
|
22
|
-
}
|
|
23
|
-
export type Months = [
|
|
24
|
-
january: number,
|
|
25
|
-
february: number,
|
|
26
|
-
march: number,
|
|
27
|
-
april: number,
|
|
28
|
-
may: number,
|
|
29
|
-
june: number,
|
|
30
|
-
july: number,
|
|
31
|
-
august: number,
|
|
32
|
-
september: number,
|
|
33
|
-
october: number,
|
|
34
|
-
november: number,
|
|
35
|
-
december: number
|
|
36
|
-
];
|
|
37
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/calendar/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,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AAE,MAAM;IACf,QAAQ,EAAE,MAAM;IAChB,KAAK,EAAE,MAAM;IACb,KAAK,EAAE,MAAM;IACb,GAAG,EAAE,MAAM;IACX,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,MAAM;IACd,SAAS,EAAE,MAAM;IACjB,OAAO,EAAE,MAAM;IACf,QAAQ,EAAE,MAAM;IAChB,QAAQ,EAAE,MAAM;CACjB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../../../../src/components/calendar/variants/default.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,eAAO,MAAM,yBAAyB,QAAO,cA2H5C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/calendar/variants/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB;;CAE5B,CAAC"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { addMonths, subMonths } from "../../../utils/date-utils";
|
|
2
|
-
import React, { useState } from "react";
|
|
3
|
-
import { Pressable, Text, type PressableProps, type StyleProp, type TextStyle, type ViewStyle } from "react-native";
|
|
4
|
-
import { useCalendarContext } from "../context";
|
|
5
|
-
import type { CalendarNavButtonState } from "../types";
|
|
6
|
-
|
|
7
|
-
export interface CalendarNavButtonProps extends PressableProps {
|
|
8
|
-
children?: React.ReactNode;
|
|
9
|
-
direction: "prev" | "next";
|
|
10
|
-
style?: StyleProp<ViewStyle>;
|
|
11
|
-
textStyle?: StyleProp<TextStyle>;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const calculateState = (isDisabled: boolean, isHovered: boolean): CalendarNavButtonState => {
|
|
15
|
-
if (isDisabled) return "disabled";
|
|
16
|
-
if (isHovered) return "hovered";
|
|
17
|
-
return "default";
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export function CalendarNavButton(props: CalendarNavButtonProps) {
|
|
21
|
-
const { children = props.direction === "prev" ? "‹" : "›", direction, style, textStyle, ...pressableProps } = props;
|
|
22
|
-
const { currentMonth, setCurrentMonth, minDate, maxDate, styles } = useCalendarContext();
|
|
23
|
-
const [isHovered, setIsHovered] = useState(false);
|
|
24
|
-
|
|
25
|
-
const isDisabled = React.useMemo(() => {
|
|
26
|
-
if (direction === "prev" && minDate) {
|
|
27
|
-
const prevMonth = subMonths(currentMonth, 1);
|
|
28
|
-
return prevMonth < minDate;
|
|
29
|
-
}
|
|
30
|
-
if (direction === "next" && maxDate) {
|
|
31
|
-
const nextMonth = addMonths(currentMonth, 1);
|
|
32
|
-
return nextMonth > maxDate;
|
|
33
|
-
}
|
|
34
|
-
return false;
|
|
35
|
-
}, [direction, currentMonth, minDate, maxDate]);
|
|
36
|
-
|
|
37
|
-
const state = calculateState(isDisabled, isHovered);
|
|
38
|
-
|
|
39
|
-
const handlePress = () => {
|
|
40
|
-
if (isDisabled) return;
|
|
41
|
-
const newMonth = direction === "prev" ? subMonths(currentMonth, 1) : addMonths(currentMonth, 1);
|
|
42
|
-
setCurrentMonth(newMonth);
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
const buttonStyle = [styles?.navButton?.default, styles?.navButton?.[state], style];
|
|
46
|
-
const textStyleCombined = [styles?.navButtonText?.default, styles?.navButtonText?.[state], textStyle];
|
|
47
|
-
|
|
48
|
-
return (
|
|
49
|
-
<Pressable
|
|
50
|
-
{...pressableProps}
|
|
51
|
-
onPress={handlePress}
|
|
52
|
-
onHoverIn={() => setIsHovered(true)}
|
|
53
|
-
onHoverOut={() => setIsHovered(false)}
|
|
54
|
-
disabled={isDisabled}
|
|
55
|
-
style={buttonStyle}
|
|
56
|
-
>
|
|
57
|
-
<Text style={textStyleCombined}>{children}</Text>
|
|
58
|
-
</Pressable>
|
|
59
|
-
);
|
|
60
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import React, { useState } from "react";
|
|
2
|
-
import { View, type StyleProp, type ViewStyle } from "react-native";
|
|
3
|
-
import { CalendarContext } from "../context";
|
|
4
|
-
import { CalendarVariants } from "../variants";
|
|
5
|
-
|
|
6
|
-
export interface CalendarRootProps {
|
|
7
|
-
variant?: keyof typeof CalendarVariants;
|
|
8
|
-
children?: React.ReactNode;
|
|
9
|
-
value?: Date | null;
|
|
10
|
-
onChange?: (date: Date | null) => void;
|
|
11
|
-
defaultMonth?: Date;
|
|
12
|
-
minDate?: Date;
|
|
13
|
-
maxDate?: Date;
|
|
14
|
-
style?: StyleProp<ViewStyle>;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export function CalendarRoot(props: CalendarRootProps) {
|
|
18
|
-
const { children, value, onChange, defaultMonth = new Date(), minDate, maxDate, style, ...viewProps } = props;
|
|
19
|
-
const variantStyles = CalendarVariants[props.variant || "default"]();
|
|
20
|
-
|
|
21
|
-
const [currentMonth, setCurrentMonth] = useState<Date>(defaultMonth);
|
|
22
|
-
|
|
23
|
-
const containerStyle = [variantStyles.root, style];
|
|
24
|
-
|
|
25
|
-
return (
|
|
26
|
-
<CalendarContext.Provider
|
|
27
|
-
value={{
|
|
28
|
-
value,
|
|
29
|
-
onChange,
|
|
30
|
-
currentMonth,
|
|
31
|
-
setCurrentMonth,
|
|
32
|
-
styles: variantStyles,
|
|
33
|
-
minDate,
|
|
34
|
-
maxDate,
|
|
35
|
-
}}
|
|
36
|
-
>
|
|
37
|
-
<View {...viewProps} style={containerStyle}>
|
|
38
|
-
{children}
|
|
39
|
-
</View>
|
|
40
|
-
</CalendarContext.Provider>
|
|
41
|
-
);
|
|
42
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import type { CalendarStyles } from "./types";
|
|
3
|
-
|
|
4
|
-
export interface CalendarContextValue {
|
|
5
|
-
value?: Date | null;
|
|
6
|
-
onChange?: (date: Date | null) => void;
|
|
7
|
-
currentMonth: Date;
|
|
8
|
-
setCurrentMonth: (month: Date) => void;
|
|
9
|
-
minDate?: Date;
|
|
10
|
-
maxDate?: Date;
|
|
11
|
-
|
|
12
|
-
styles?: CalendarStyles;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export const CalendarContext = React.createContext<CalendarContextValue | undefined>(undefined);
|
|
16
|
-
|
|
17
|
-
export const useCalendarContext = () => {
|
|
18
|
-
const context = React.useContext(CalendarContext);
|
|
19
|
-
if (!context) {
|
|
20
|
-
throw new Error("Calendar components must be used within CalendarRoot");
|
|
21
|
-
}
|
|
22
|
-
return context;
|
|
23
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { TextStyle, ViewStyle } from "react-native";
|
|
2
|
-
import type { CalendarDayProps } from "./components/calendar-day";
|
|
3
|
-
import type { CalendarHeaderProps } from "./components/calendar-header";
|
|
4
|
-
import type { CalendarRootProps } from "./components/calendar-root";
|
|
5
|
-
import type { CalendarTitleProps } from "./components/calendar-title";
|
|
6
|
-
import type { CalendarWeekLabelProps, CalendarWeekLabelsProps } from "./components/calendar-week-labels";
|
|
7
|
-
import type { CalendarWeekProps, CalendarWeeksProps } from "./components/calendar-weeks";
|
|
8
|
-
|
|
9
|
-
export type CalendarDayState = "default" | "selected" | "today" | "disabled" | "deprioritized" | "hovered";
|
|
10
|
-
export type CalendarNavButtonState = "default" | "disabled" | "hovered";
|
|
11
|
-
|
|
12
|
-
export interface CalendarStyles {
|
|
13
|
-
root?: CalendarRootProps["style"];
|
|
14
|
-
header?: CalendarHeaderProps["style"];
|
|
15
|
-
headerTitle?: CalendarTitleProps["style"];
|
|
16
|
-
navButton?: Partial<Record<CalendarNavButtonState, ViewStyle>>;
|
|
17
|
-
navButtonText?: Partial<Record<CalendarNavButtonState, TextStyle>>;
|
|
18
|
-
weekLabels: CalendarWeekLabelsProps["style"];
|
|
19
|
-
weekLabel?: CalendarWeekLabelProps["style"];
|
|
20
|
-
weeks?: CalendarWeekProps["style"];
|
|
21
|
-
week?: CalendarWeeksProps["style"];
|
|
22
|
-
dayButton?: Partial<Record<CalendarDayState, CalendarDayProps["style"]>>;
|
|
23
|
-
dayText?: Partial<Record<CalendarDayState, CalendarDayProps["textStyle"]>>;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export type Months = [
|
|
27
|
-
january: number,
|
|
28
|
-
february: number,
|
|
29
|
-
march: number,
|
|
30
|
-
april: number,
|
|
31
|
-
may: number,
|
|
32
|
-
june: number,
|
|
33
|
-
july: number,
|
|
34
|
-
august: number,
|
|
35
|
-
september: number,
|
|
36
|
-
october: number,
|
|
37
|
-
november: number,
|
|
38
|
-
december: number,
|
|
39
|
-
];
|
|
File without changes
|
|
File without changes
|
/package/dist/typescript/src/components/calendar/{components → calendar}/calendar-weeks.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/typescript/src/components/calendar/{components → shared}/calendar-week-labels.d.ts
RENAMED
|
File without changes
|
|
File without changes
|