@selectwin/kit 0.1.146 → 0.1.147
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/SelectCalendar.d.ts +54 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1039 -598
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type SelectCalendarView = 'month' | 'week';
|
|
3
|
+
export interface SelectCalendarEvent {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
/** Com hora: o instante (Date ou ISO). Dia inteiro: a DATA do primeiro dia, 'YYYY-MM-DD' (um ISO serve: vale a data). */
|
|
7
|
+
start: Date | string;
|
|
8
|
+
/** Fim EXCLUSIVO: o instante, ou (dia inteiro) a data do dia SEGUINTE ao último. */
|
|
9
|
+
end: Date | string;
|
|
10
|
+
allDay?: boolean;
|
|
11
|
+
/** A cor da agenda (qualquer cor CSS). Sem ela, a do tema. */
|
|
12
|
+
color?: string | null;
|
|
13
|
+
/** `cancelled` sai riscado; `tentative`, com o "talvez". */
|
|
14
|
+
status?: 'confirmed' | 'tentative' | 'cancelled';
|
|
15
|
+
/** Uma linha a mais no bloco da semana (o local, a empresa). */
|
|
16
|
+
detail?: string | null;
|
|
17
|
+
}
|
|
18
|
+
export interface SelectCalendarProps {
|
|
19
|
+
view: SelectCalendarView;
|
|
20
|
+
/** Um dia qualquer do mês ou da semana mostrados ('YYYY-MM-DD'). */
|
|
21
|
+
date: string;
|
|
22
|
+
events: SelectCalendarEvent[];
|
|
23
|
+
onViewChange?: (view: SelectCalendarView) => void;
|
|
24
|
+
onDateChange?: (date: string) => void;
|
|
25
|
+
onEventClick?: (id: string) => void;
|
|
26
|
+
/** O número do dia e o "+N" do mês. Sem ele, são texto. */
|
|
27
|
+
onDayClick?: (date: string) => void;
|
|
28
|
+
/** O fuso em que a grade é desenhada. Padrão: America/Sao_Paulo. */
|
|
29
|
+
timeZone?: string;
|
|
30
|
+
/** O primeiro dia da semana: 0 domingo (padrão), 1 segunda. */
|
|
31
|
+
weekStartsOn?: 0 | 1;
|
|
32
|
+
/** Na barra, à direita (ex.: "Marcar reunião"). */
|
|
33
|
+
actions?: ReactNode;
|
|
34
|
+
/** Carregando: a grade fica, os eventos esmaecem. */
|
|
35
|
+
loading?: boolean;
|
|
36
|
+
/** Na semana, a hora em que a grade abre rolada. Padrão: 8. */
|
|
37
|
+
scrollToHour?: number;
|
|
38
|
+
className?: string;
|
|
39
|
+
}
|
|
40
|
+
/** Hoje no fuso da grade ('YYYY-MM-DD'). */
|
|
41
|
+
export declare function calendarToday(timeZone?: string): string;
|
|
42
|
+
/**
|
|
43
|
+
* O intervalo que a grade mostra — o que o app busca: `from`/`to` são instantes ISO (meia-noite no fuso da grade, `to`
|
|
44
|
+
* exclusivo), e `days` os dias da grade. Mês: as semanas inteiras (35 ou 42 dias); semana: 7.
|
|
45
|
+
*/
|
|
46
|
+
export declare function calendarRange(view: SelectCalendarView, date: string, opts?: {
|
|
47
|
+
timeZone?: string;
|
|
48
|
+
weekStartsOn?: 0 | 1;
|
|
49
|
+
}): {
|
|
50
|
+
from: string;
|
|
51
|
+
to: string;
|
|
52
|
+
days: string[];
|
|
53
|
+
};
|
|
54
|
+
export declare function SelectCalendar({ view, date, events, onViewChange, onDateChange, onEventClick, onDayClick, timeZone, weekStartsOn, actions, loading, scrollToHour, className, }: SelectCalendarProps): import("react").JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -76,6 +76,8 @@ export { SelectActionCard } from './SelectActionCard';
|
|
|
76
76
|
export { SelectAppTile, SelectCreateTile } from './SelectTile';
|
|
77
77
|
export { SelectWorkspaceSwitcher } from './SelectWorkspaceSwitcher';
|
|
78
78
|
export { SelectKanban, SelectKanbanCard } from './SelectKanban';
|
|
79
|
+
export { SelectCalendar, calendarRange, calendarToday } from './SelectCalendar';
|
|
80
|
+
export type { SelectCalendarEvent, SelectCalendarProps, SelectCalendarView } from './SelectCalendar';
|
|
79
81
|
export { SelectHtmlFrame } from './SelectHtmlFrame';
|
|
80
82
|
export type { SelectHtmlFrameProps } from './SelectHtmlFrame';
|
|
81
83
|
export { SelectMailList, SelectMailListItem, SelectMailMessage, mailName } from './SelectMail';
|