@ovok/native 1.8.0 → 1.8.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/lib/commonjs/modules/ui/components/calendar-grid.js +156 -0
- package/lib/commonjs/modules/ui/components/calendar-grid.js.map +1 -0
- package/lib/commonjs/modules/ui/components/calendar.js +137 -0
- package/lib/commonjs/modules/ui/components/calendar.js.map +1 -0
- package/lib/commonjs/modules/ui/components/period-calendar.js +127 -0
- package/lib/commonjs/modules/ui/components/period-calendar.js.map +1 -0
- package/lib/commonjs/modules/ui/index.js +22 -0
- package/lib/commonjs/modules/ui/index.js.map +1 -1
- package/lib/commonjs/modules/ui/utils/calendar-date.js +44 -0
- package/lib/commonjs/modules/ui/utils/calendar-date.js.map +1 -0
- package/lib/module/modules/ui/components/calendar-grid.js +152 -0
- package/lib/module/modules/ui/components/calendar-grid.js.map +1 -0
- package/lib/module/modules/ui/components/calendar.js +133 -0
- package/lib/module/modules/ui/components/calendar.js.map +1 -0
- package/lib/module/modules/ui/components/period-calendar.js +122 -0
- package/lib/module/modules/ui/components/period-calendar.js.map +1 -0
- package/lib/module/modules/ui/index.js +2 -0
- package/lib/module/modules/ui/index.js.map +1 -1
- package/lib/module/modules/ui/utils/calendar-date.js +36 -0
- package/lib/module/modules/ui/utils/calendar-date.js.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/components/calendar-grid.d.ts +23 -0
- package/lib/typescript/commonjs/src/modules/ui/components/calendar-grid.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/components/calendar.d.ts +32 -0
- package/lib/typescript/commonjs/src/modules/ui/components/calendar.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/components/period-calendar.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/ui/components/period-calendar.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/index.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/ui/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/utils/calendar-date.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/ui/utils/calendar-date.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/components/calendar-grid.d.ts +23 -0
- package/lib/typescript/module/src/modules/ui/components/calendar-grid.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/components/calendar.d.ts +32 -0
- package/lib/typescript/module/src/modules/ui/components/calendar.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/components/period-calendar.d.ts +16 -0
- package/lib/typescript/module/src/modules/ui/components/period-calendar.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/index.d.ts +2 -0
- package/lib/typescript/module/src/modules/ui/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/utils/calendar-date.d.ts +9 -0
- package/lib/typescript/module/src/modules/ui/utils/calendar-date.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { OvokTheme, OvokUiSlots } from "../types";
|
|
3
|
+
import type { CalendarDayMarker } from "./calendar";
|
|
4
|
+
import { type CalendarDateInput, type WeekStartsOn } from "../utils/calendar-date";
|
|
5
|
+
interface CalendarGridProps {
|
|
6
|
+
activeMonth: Date;
|
|
7
|
+
selectedDate?: Date;
|
|
8
|
+
minDate?: CalendarDateInput;
|
|
9
|
+
maxDate?: CalendarDateInput;
|
|
10
|
+
isDateDisabled?: (date: Date) => boolean;
|
|
11
|
+
markers: readonly CalendarDayMarker[];
|
|
12
|
+
getMarkerForDate?: (date: Date) => CalendarDayMarker | undefined;
|
|
13
|
+
labelForDate?: (date: Date) => string;
|
|
14
|
+
locale?: string;
|
|
15
|
+
weekStartsOn: WeekStartsOn;
|
|
16
|
+
testID: string;
|
|
17
|
+
theme: OvokTheme;
|
|
18
|
+
Text: OvokUiSlots["Text"];
|
|
19
|
+
onSelectDate: (date: Date) => void;
|
|
20
|
+
}
|
|
21
|
+
declare const CalendarGrid: React.MemoExoticComponent<({ activeMonth, selectedDate, minDate, maxDate, isDateDisabled, markers, getMarkerForDate, labelForDate, locale, weekStartsOn, testID, theme, Text, onSelectDate, }: CalendarGridProps) => React.JSX.Element>;
|
|
22
|
+
export { CalendarGrid };
|
|
23
|
+
//# sourceMappingURL=calendar-grid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar-grid.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/ui/components/calendar-grid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD,OAAO,EAGL,KAAK,iBAAiB,EAEtB,KAAK,YAAY,EAClB,MAAM,wBAAwB,CAAC;AAEhC,UAAU,iBAAiB;IACzB,WAAW,EAAE,IAAI,CAAC;IAClB,YAAY,CAAC,EAAE,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC;IACzC,OAAO,EAAE,SAAS,iBAAiB,EAAE,CAAC;IACtC,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,iBAAiB,GAAG,SAAS,CAAC;IACjE,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,YAAY,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC1B,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;CACpC;AAuID,QAAA,MAAM,YAAY,iMAtHf,iBAAiB,uBAsHkC,CAAC;AAqBvD,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { OvokUiProps } from "../types";
|
|
3
|
+
import type { CalendarDateInput, WeekStartsOn } from "../utils/calendar-date";
|
|
4
|
+
interface CalendarDayMarker {
|
|
5
|
+
date: CalendarDateInput;
|
|
6
|
+
label?: string;
|
|
7
|
+
backgroundColor?: string;
|
|
8
|
+
color?: string;
|
|
9
|
+
rangePosition?: "single" | "start" | "middle" | "end";
|
|
10
|
+
}
|
|
11
|
+
interface CalendarProps extends OvokUiProps {
|
|
12
|
+
selectedDate?: CalendarDateInput | null;
|
|
13
|
+
defaultSelectedDate?: CalendarDateInput;
|
|
14
|
+
onDateSelect?: (date: Date) => void;
|
|
15
|
+
visibleMonth?: CalendarDateInput;
|
|
16
|
+
defaultVisibleMonth?: CalendarDateInput;
|
|
17
|
+
onVisibleMonthChange?: (month: Date) => void;
|
|
18
|
+
locale?: string;
|
|
19
|
+
weekStartsOn?: WeekStartsOn;
|
|
20
|
+
minDate?: CalendarDateInput;
|
|
21
|
+
maxDate?: CalendarDateInput;
|
|
22
|
+
isDateDisabled?: (date: Date) => boolean;
|
|
23
|
+
markers?: readonly CalendarDayMarker[];
|
|
24
|
+
getMarkerForDate?: (date: Date) => CalendarDayMarker | undefined;
|
|
25
|
+
labelForDate?: (date: Date) => string;
|
|
26
|
+
previousMonthLabel?: string;
|
|
27
|
+
nextMonthLabel?: string;
|
|
28
|
+
testID?: string;
|
|
29
|
+
}
|
|
30
|
+
declare const Calendar: React.MemoExoticComponent<({ selectedDate, defaultSelectedDate, onDateSelect, visibleMonth, defaultVisibleMonth, onVisibleMonthChange, locale, weekStartsOn, minDate, maxDate, isDateDisabled, markers, getMarkerForDate, labelForDate, previousMonthLabel, nextMonthLabel, testID, ...uiProps }: CalendarProps) => React.JSX.Element>;
|
|
31
|
+
export { Calendar, type CalendarDayMarker, type CalendarProps };
|
|
32
|
+
//# sourceMappingURL=calendar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/ui/components/calendar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAO9E,UAAU,iBAAiB;IACzB,IAAI,EAAE,iBAAiB,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;CACvD;AAED,UAAU,aAAc,SAAQ,WAAW;IACzC,YAAY,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACxC,mBAAmB,CAAC,EAAE,iBAAiB,CAAC;IACxC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACpC,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC,mBAAmB,CAAC,EAAE,iBAAiB,CAAC;IACxC,oBAAoB,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,KAAK,IAAI,CAAC;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC;IACzC,OAAO,CAAC,EAAE,SAAS,iBAAiB,EAAE,CAAC;IACvC,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,iBAAiB,GAAG,SAAS,CAAC;IACjE,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC;IACtC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAwHD,QAAA,MAAM,QAAQ,oSAnGX,aAAa,uBAmG8B,CAAC;AAiB/C,OAAO,EAAE,QAAQ,EAAE,KAAK,iBAAiB,EAAE,KAAK,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { CalendarProps } from "./calendar";
|
|
3
|
+
import type { CalendarDateInput } from "../utils/calendar-date";
|
|
4
|
+
interface PeriodDateRange {
|
|
5
|
+
startDate: CalendarDateInput;
|
|
6
|
+
endDate: CalendarDateInput;
|
|
7
|
+
}
|
|
8
|
+
type PeriodCalendarProps = Omit<CalendarProps, "markers" | "getMarkerForDate"> & {
|
|
9
|
+
periods: readonly PeriodDateRange[];
|
|
10
|
+
periodLabel?: string;
|
|
11
|
+
labelForPeriodDate?: (date: Date) => string;
|
|
12
|
+
showLegend?: boolean;
|
|
13
|
+
};
|
|
14
|
+
declare const PeriodCalendar: ({ periods, periodLabel, labelForPeriodDate, showLegend, testID, ...calendarProps }: PeriodCalendarProps) => React.JSX.Element;
|
|
15
|
+
export { PeriodCalendar, type PeriodCalendarProps, type PeriodDateRange };
|
|
16
|
+
//# sourceMappingURL=period-calendar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"period-calendar.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/ui/components/period-calendar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAqB,aAAa,EAAE,MAAM,YAAY,CAAC;AACnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAOhE,UAAU,eAAe;IACvB,SAAS,EAAE,iBAAiB,CAAC;IAC7B,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED,KAAK,mBAAmB,GAAG,IAAI,CAAC,aAAa,EAAE,SAAS,GAAG,kBAAkB,CAAC,GAAG;IAC/E,OAAO,EAAE,SAAS,eAAe,EAAE,CAAC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC;IAC5C,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AA+CF,QAAA,MAAM,cAAc,GAAI,oFAOrB,mBAAmB,sBA2CrB,CAAC;AAQF,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,KAAK,eAAe,EAAE,CAAC"}
|
|
@@ -9,4 +9,6 @@ export * from "./components/urine-test-result";
|
|
|
9
9
|
export * from "./components/health-import-card";
|
|
10
10
|
export * from "./components/background-sync-setting";
|
|
11
11
|
export * from "./components/measurement-trend-chart";
|
|
12
|
+
export * from "./components/calendar";
|
|
13
|
+
export * from "./components/period-calendar";
|
|
12
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6CAA6C,CAAC;AAC5D,cAAc,qCAAqC,CAAC;AACpD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,sCAAsC,CAAC;AACrD,cAAc,sCAAsC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6CAA6C,CAAC;AAC5D,cAAc,qCAAqC,CAAC;AACpD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,sCAAsC,CAAC;AACrD,cAAc,sCAAsC,CAAC;AACrD,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type CalendarDateInput = Date | string;
|
|
2
|
+
type WeekStartsOn = 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
3
|
+
declare const toCalendarDate: (value: CalendarDateInput | undefined) => Date | undefined;
|
|
4
|
+
declare const calendarDateKey: (date: Date) => string;
|
|
5
|
+
declare const firstOfMonth: (date: Date) => Date;
|
|
6
|
+
declare const calendarGridDates: (visibleMonth: Date, weekStartsOn: WeekStartsOn) => Date[];
|
|
7
|
+
declare const monthBy: (date: Date, amount: number) => Date;
|
|
8
|
+
export { calendarDateKey, calendarGridDates, firstOfMonth, monthBy, toCalendarDate, type CalendarDateInput, type WeekStartsOn, };
|
|
9
|
+
//# sourceMappingURL=calendar-date.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar-date.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/ui/utils/calendar-date.ts"],"names":[],"mappings":"AAAA,KAAK,iBAAiB,GAAG,IAAI,GAAG,MAAM,CAAC;AAEvC,KAAK,YAAY,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAE9C,QAAA,MAAM,cAAc,GAClB,OAAO,iBAAiB,GAAG,SAAS,KACnC,IAAI,GAAG,SAiCT,CAAC;AAEF,QAAA,MAAM,eAAe,GAAI,MAAM,IAAI,KAAG,MAC8E,CAAC;AAErH,QAAA,MAAM,YAAY,GAAI,MAAM,IAAI,KAAG,IACe,CAAC;AAEnD,QAAA,MAAM,iBAAiB,GACrB,cAAc,IAAI,EAClB,cAAc,YAAY,KACzB,IAAI,EASN,CAAC;AAEF,QAAA,MAAM,OAAO,GAAI,MAAM,IAAI,EAAE,QAAQ,MAAM,KAAG,IACa,CAAC;AAE5D,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,OAAO,EACP,cAAc,EACd,KAAK,iBAAiB,EACtB,KAAK,YAAY,GAClB,CAAC"}
|