@veeqo/ui 7.0.0 → 7.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Calendars/components/Calendar/Calendar.d.ts +12 -0
- package/dist/components/Calendars/components/Calendar/index.d.ts +1 -0
- package/dist/components/Calendars/components/Calendar/styled.d.ts +2 -0
- package/dist/components/{RangeCalendar → Calendars/components/RangeCalendar}/RangeCalendar.d.ts +1 -1
- package/dist/components/{RangeCalendar/components → Calendars/components/subcomponents}/CalendarGrid/CalendarGrid.d.ts +1 -1
- package/dist/components/Calendars/components/subcomponents/CalendarGrid/subCalendars/YearCalendar.test.d.ts +1 -0
- package/dist/components/{RangeCalendar/components → Calendars/components/subcomponents}/CalendarHeader.d.ts +3 -2
- package/dist/components/{RangeCalendar/components → Calendars/components/subcomponents}/CalendarHeading.d.ts +1 -1
- package/dist/components/Calendars/components/subcomponents/CalendarStyles/CalendarStyles.d.ts +1 -0
- package/dist/components/Calendars/components/subcomponents/CalendarStyles/index.d.ts +1 -0
- package/dist/components/Calendars/components/subcomponents/utils.d.ts +6 -0
- package/dist/components/Calendars/components/subcomponents/utils.test.d.ts +1 -0
- package/dist/components/Calendars/data/useCalendar.d.ts +13 -0
- package/dist/components/Calendars/data/useCalendarLevels.d.ts +7 -0
- package/dist/components/Calendars/data/useIsDateUnavailable.d.ts +10 -0
- package/dist/components/{RangeCalendar → Calendars}/data/useRangeCalendar.d.ts +2 -3
- package/dist/components/Calendars/index.d.ts +2 -0
- package/dist/components/DataTable/DataTable.d.ts +1 -1
- package/dist/components/DataTable/hooks/useColumnWidths.d.ts +2 -1
- package/dist/components/DataTable/hooks/useColumns.d.ts +6 -56
- package/dist/components/DataTable/types.d.ts +3 -5
- package/dist/components/DataTable/utils/generateTableCss.d.ts +3 -3
- package/dist/components/index.d.ts +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/theme/index.d.ts +1 -0
- package/dist/theme/utils.d.ts +2 -0
- package/package.json +2 -1
- package/dist/components/RangeCalendar/components/StyledRangeCalendar/index.d.ts +0 -1
- package/dist/components/RangeCalendar/components/utils.d.ts +0 -8
- /package/dist/components/{RangeCalendar/RangeCalendar.test.d.ts → Calendars/components/Calendar/Calendar.test.d.ts} +0 -0
- /package/dist/components/{RangeCalendar/components/CalendarGrid/subCalendars/DodecadeCalendar.test.d.ts → Calendars/components/RangeCalendar/RangeCalendar.test.d.ts} +0 -0
- /package/dist/components/{RangeCalendar → Calendars/components/RangeCalendar}/index.d.ts +0 -0
- /package/dist/components/{RangeCalendar/components/StyledRangeCalendar/StyledRangeCalendar.d.ts → Calendars/components/RangeCalendar/styled.d.ts} +0 -0
- /package/dist/components/{RangeCalendar/components → Calendars/components/subcomponents}/CalendarGrid/index.d.ts +0 -0
- /package/dist/components/{RangeCalendar/components → Calendars/components/subcomponents}/CalendarGrid/subCalendars/DodecadeCalendar.d.ts +0 -0
- /package/dist/components/{RangeCalendar/components/CalendarGrid/subCalendars/YearCalendar.test.d.ts → Calendars/components/subcomponents/CalendarGrid/subCalendars/DodecadeCalendar.test.d.ts} +0 -0
- /package/dist/components/{RangeCalendar/components → Calendars/components/subcomponents}/CalendarGrid/subCalendars/MonthCalendar.d.ts +0 -0
- /package/dist/components/{RangeCalendar/components → Calendars/components/subcomponents}/CalendarGrid/subCalendars/YearCalendar.d.ts +0 -0
- /package/dist/components/{RangeCalendar/components → Calendars/components/subcomponents}/CalendarGrid/subCalendars/index.d.ts +0 -0
- /package/dist/components/{RangeCalendar/components → Calendars/components/subcomponents}/CalendarGrid/subCalendars/styled.d.ts +0 -0
- /package/dist/components/{RangeCalendar/components → Calendars/components/subcomponents}/CalendarGrid/subCalendars/utils.d.ts +0 -0
- /package/dist/components/{RangeCalendar/components/StyledRangeCalendar → Calendars/components/subcomponents/CalendarStyles}/buttonStyles.d.ts +0 -0
- /package/dist/components/{RangeCalendar/components/StyledRangeCalendar → Calendars/components/subcomponents/CalendarStyles}/calendarCellStyles.d.ts +0 -0
- /package/dist/components/{RangeCalendar/components/StyledRangeCalendar → Calendars/components/subcomponents/CalendarStyles}/headerStyles.d.ts +0 -0
- /package/dist/components/{RangeCalendar → Calendars}/data/constants.d.ts +0 -0
- /package/dist/components/{RangeCalendar → Calendars}/types.d.ts +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { DateValue, CalendarProps as RACalProps } from 'react-aria-components';
|
|
3
|
+
import { CalendarDate } from '@internationalized/date';
|
|
4
|
+
export type CalendarProps = RACalProps<DateValue> & {
|
|
5
|
+
value: DateValue | null | undefined;
|
|
6
|
+
onChange?: RACalProps<DateValue>['onChange'];
|
|
7
|
+
} & React.RefAttributes<HTMLDivElement> & {
|
|
8
|
+
'aria-label': string;
|
|
9
|
+
disabledRanges?: CalendarDate[][];
|
|
10
|
+
disallowWeekends?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare const Calendar: ({ disabledRanges, disallowWeekends, value, onChange, isDisabled, ...props }: CalendarProps) => React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Calendar } from './Calendar';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const StyledCalendar: import("styled-components").StyledComponent<(<T extends import("react-aria-components").DateValue>(props: import("react-aria-components").CalendarProps<T> & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>), any, {}, never>;
|
package/dist/components/{RangeCalendar → Calendars/components/RangeCalendar}/RangeCalendar.d.ts
RENAMED
|
@@ -9,4 +9,4 @@ export type CalendarProps = RangeCalendarProps<DateValue> & {
|
|
|
9
9
|
disabledRanges?: CalendarDate[][];
|
|
10
10
|
disallowWeekends?: boolean;
|
|
11
11
|
};
|
|
12
|
-
export declare const RangeCalendar: ({ disabledRanges, disallowWeekends, value, onChange, ...props }: CalendarProps) => React.JSX.Element;
|
|
12
|
+
export declare const RangeCalendar: ({ disabledRanges, disallowWeekends, value, onChange, isDisabled, ...props }: CalendarProps) => React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { CalendarLevel } from '
|
|
2
|
+
import { CalendarLevel } from '../../types';
|
|
3
3
|
type CalendarHeaderProps = {
|
|
4
4
|
level: CalendarLevel;
|
|
5
5
|
currentYear: number;
|
|
6
6
|
handleSwitchLevel: () => void;
|
|
7
|
+
isDisabled?: boolean;
|
|
7
8
|
};
|
|
8
|
-
export declare const CalendarHeader: ({ level, currentYear, handleSwitchLevel }: CalendarHeaderProps) => React.JSX.Element;
|
|
9
|
+
export declare const CalendarHeader: ({ level, currentYear, handleSwitchLevel, isDisabled, }: CalendarHeaderProps) => React.JSX.Element;
|
|
9
10
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { HeadingProps } from 'react-aria-components';
|
|
3
|
-
import { CalendarLevel } from '
|
|
3
|
+
import { CalendarLevel } from '../../types';
|
|
4
4
|
export declare const CalendarHeading: React.ForwardRefExoticComponent<HeadingProps & {
|
|
5
5
|
level: CalendarLevel;
|
|
6
6
|
currentYear: number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SharedCalendarStyles: import("styled-components").FlattenSimpleInterpolation;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SharedCalendarStyles } from './CalendarStyles';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CalendarDate } from '@internationalized/date';
|
|
3
|
+
import { DateValue } from 'react-aria-components';
|
|
4
|
+
import { CalendarLevel } from '../types';
|
|
5
|
+
export declare const useCalendarState: (initialValue: DateValue | null | undefined) => {
|
|
6
|
+
level: CalendarLevel;
|
|
7
|
+
focusedDate: CalendarDate | import("@internationalized/date").CalendarDateTime | import("@internationalized/date").ZonedDateTime;
|
|
8
|
+
setFocusedDate: import("react").Dispatch<import("react").SetStateAction<CalendarDate | import("@internationalized/date").CalendarDateTime | import("@internationalized/date").ZonedDateTime>>;
|
|
9
|
+
currentYear: number;
|
|
10
|
+
onFocusMonth: (monthIndex: number) => () => void;
|
|
11
|
+
onFocusYear: (year: number) => () => void;
|
|
12
|
+
handleSwitchLevel: () => void;
|
|
13
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CalendarLevel } from '../types';
|
|
3
|
+
export declare const useCalendarLevels: () => {
|
|
4
|
+
level: CalendarLevel;
|
|
5
|
+
handleSwitchLevel: () => void;
|
|
6
|
+
setLevel: import("react").Dispatch<import("react").SetStateAction<CalendarLevel>>;
|
|
7
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DateValue } from 'react-aria-components';
|
|
2
|
+
import { CalendarDate } from '@internationalized/date';
|
|
3
|
+
type UseIsDateUnavailableParams = {
|
|
4
|
+
disabledRanges: CalendarDate[][];
|
|
5
|
+
disallowWeekends: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare const useIsDateUnavailable: ({ disabledRanges, disallowWeekends, }: UseIsDateUnavailableParams) => {
|
|
8
|
+
isDateUnavailable: (date: DateValue) => boolean;
|
|
9
|
+
};
|
|
10
|
+
export {};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { CalendarDate } from '@internationalized/date';
|
|
3
|
-
import { DateRange
|
|
3
|
+
import { DateRange } from 'react-aria-components';
|
|
4
4
|
import { CalendarLevel } from '../types';
|
|
5
|
-
export declare const useRangeCalendarState: (initialValue: DateRange | null | undefined
|
|
5
|
+
export declare const useRangeCalendarState: (initialValue: DateRange | null | undefined) => {
|
|
6
6
|
level: CalendarLevel;
|
|
7
7
|
focusedDate: CalendarDate | import("@internationalized/date").CalendarDateTime | import("@internationalized/date").ZonedDateTime;
|
|
8
8
|
setFocusedDate: import("react").Dispatch<import("react").SetStateAction<CalendarDate | import("@internationalized/date").CalendarDateTime | import("@internationalized/date").ZonedDateTime>>;
|
|
9
9
|
currentYear: number;
|
|
10
|
-
isDateUnavailable: (date: DateValue) => boolean;
|
|
11
10
|
onFocusMonth: (monthIndex: number) => () => void;
|
|
12
11
|
onFocusYear: (year: number) => () => void;
|
|
13
12
|
handleSwitchLevel: () => void;
|
|
@@ -4,7 +4,7 @@ import { ColumnMenu } from './components/ColumnMenu';
|
|
|
4
4
|
import { SelectionCell } from './components/SelectionCell';
|
|
5
5
|
import { SelectionHeader } from './components/SelectionHeader';
|
|
6
6
|
export declare const DataTable: {
|
|
7
|
-
({ ActionBarSlot, borderMode, columns: initialColumns, emptyState, expandedRowIds, loading, loadingRowCount, onChangeSort, rows, disabledRowIds, selectionMode, selectionState, setExpanded, sortState, stripingMode, enableStickyHeader, resizeableColumns, onResizeColumns, }: DataTableProps): React.JSX.Element;
|
|
7
|
+
({ ActionBarSlot, borderMode, columns: initialColumns, emptyState, expandedRowIds, loading, loadingRowCount, onChangeSort, rows, disabledRowIds, selectionMode, selectionState, setExpanded, sortState, stripingMode, enableStickyHeader, resizeableColumns, onResizeColumns, columnWidths, }: DataTableProps): React.JSX.Element;
|
|
8
8
|
defaultProps: {
|
|
9
9
|
loading: boolean;
|
|
10
10
|
loadingRowCount: number;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
2
|
import { ColumnConfigs, ColumnWidthsType, ColumnWidthHandler, ColumnId } from '../types';
|
|
3
|
-
export declare const useColumnWidths: ({ tableRef, columns, columnIds, }: {
|
|
3
|
+
export declare const useColumnWidths: ({ tableRef, columns, columnIds, columnWidths: initialColumnWidths, }: {
|
|
4
4
|
tableRef: RefObject<HTMLElement>;
|
|
5
5
|
columns: ColumnConfigs;
|
|
6
6
|
columnIds: ColumnId[];
|
|
7
|
+
columnWidths?: ColumnWidthsType | undefined;
|
|
7
8
|
}) => {
|
|
8
9
|
setColumnWidth: ColumnWidthHandler;
|
|
9
10
|
columnWidths: ColumnWidthsType;
|
|
@@ -1,59 +1,9 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
|
-
import { ColumnConfigs, ColumnWidthState, ResizeColumnData } from '../types';
|
|
3
|
-
export declare function useColumns(columns: ColumnConfigs, tableRef: RefObject<HTMLElement>, onResizeColumns?: (columnWidths: ResizeColumnData) => void): {
|
|
4
|
-
visible:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
hidden?: boolean | undefined;
|
|
9
|
-
icon?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
10
|
-
pinned?: import("../types").ColumnPinned | undefined;
|
|
11
|
-
sortable?: boolean | undefined;
|
|
12
|
-
spacing?: keyof import("../../Stack/types").SizeScale | undefined;
|
|
13
|
-
span?: number | undefined;
|
|
14
|
-
title?: string | undefined;
|
|
15
|
-
tooltip?: string | undefined;
|
|
16
|
-
resizeMinWidth?: number | undefined;
|
|
17
|
-
renderCell: import("../types").CellRenderer;
|
|
18
|
-
renderFooter?: import("../types").FooterRenderer | undefined;
|
|
19
|
-
renderHeader?: import("../types").HeaderRenderer | undefined;
|
|
20
|
-
renderNestedCell?: import("../types").NestedCellRenderer | undefined;
|
|
21
|
-
}[];
|
|
22
|
-
pinnedLeft: {
|
|
23
|
-
width: import("../types").ColumnWidth | import("../types").ColumnWidthBounded | undefined;
|
|
24
|
-
id: import("../types").ColumnId;
|
|
25
|
-
align?: import("../types").ColumnAlignment | undefined;
|
|
26
|
-
hidden?: boolean | undefined;
|
|
27
|
-
icon?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
28
|
-
pinned?: import("../types").ColumnPinned | undefined;
|
|
29
|
-
sortable?: boolean | undefined;
|
|
30
|
-
spacing?: keyof import("../../Stack/types").SizeScale | undefined;
|
|
31
|
-
span?: number | undefined;
|
|
32
|
-
title?: string | undefined;
|
|
33
|
-
tooltip?: string | undefined;
|
|
34
|
-
resizeMinWidth?: number | undefined;
|
|
35
|
-
renderCell: import("../types").CellRenderer;
|
|
36
|
-
renderFooter?: import("../types").FooterRenderer | undefined;
|
|
37
|
-
renderHeader?: import("../types").HeaderRenderer | undefined;
|
|
38
|
-
renderNestedCell?: import("../types").NestedCellRenderer | undefined;
|
|
39
|
-
}[];
|
|
40
|
-
pinnedRight: {
|
|
41
|
-
width: import("../types").ColumnWidth | import("../types").ColumnWidthBounded | undefined;
|
|
42
|
-
id: import("../types").ColumnId;
|
|
43
|
-
align?: import("../types").ColumnAlignment | undefined;
|
|
44
|
-
hidden?: boolean | undefined;
|
|
45
|
-
icon?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
46
|
-
pinned?: import("../types").ColumnPinned | undefined;
|
|
47
|
-
sortable?: boolean | undefined;
|
|
48
|
-
spacing?: keyof import("../../Stack/types").SizeScale | undefined;
|
|
49
|
-
span?: number | undefined;
|
|
50
|
-
title?: string | undefined;
|
|
51
|
-
tooltip?: string | undefined;
|
|
52
|
-
resizeMinWidth?: number | undefined;
|
|
53
|
-
renderCell: import("../types").CellRenderer;
|
|
54
|
-
renderFooter?: import("../types").FooterRenderer | undefined;
|
|
55
|
-
renderHeader?: import("../types").HeaderRenderer | undefined;
|
|
56
|
-
renderNestedCell?: import("../types").NestedCellRenderer | undefined;
|
|
57
|
-
}[];
|
|
2
|
+
import { ColumnConfigs, ColumnWidthState, ColumnWidthsType, ResizeColumnData } from '../types';
|
|
3
|
+
export declare function useColumns(columns: ColumnConfigs, tableRef: RefObject<HTMLElement>, onResizeColumns?: (columnWidths: ResizeColumnData) => void, columnWidths?: ColumnWidthsType): {
|
|
4
|
+
visible: import("../types").ColumnConfig[];
|
|
5
|
+
columnWidths: ColumnWidthsType;
|
|
6
|
+
pinnedLeft: import("../types").ColumnConfig[];
|
|
7
|
+
pinnedRight: import("../types").ColumnConfig[];
|
|
58
8
|
setColumnWidth: ({ columnId, width }: ColumnWidthState) => void;
|
|
59
9
|
};
|
|
@@ -51,7 +51,7 @@ export type ColumnWidthState = {
|
|
|
51
51
|
columnId: ColumnId;
|
|
52
52
|
width: number | string;
|
|
53
53
|
};
|
|
54
|
-
export type ColumnWidthHandler = (columnWidthState: ColumnWidthState) => void;
|
|
54
|
+
export type ColumnWidthHandler = (columnWidthState: ColumnWidthState) => ColumnWidthsType | void;
|
|
55
55
|
export type RowId = number | string;
|
|
56
56
|
export interface NestedTableRow {
|
|
57
57
|
id: RowId;
|
|
@@ -140,13 +140,11 @@ export interface DataTableProps {
|
|
|
140
140
|
resizeableColumns?: boolean;
|
|
141
141
|
/** Callback for when columns are resized */
|
|
142
142
|
onResizeColumns?: (columnWidths: ResizeColumnData) => void;
|
|
143
|
+
columnWidths?: ColumnWidthsType;
|
|
143
144
|
}
|
|
144
145
|
export type ColumnWidthsType = {
|
|
145
146
|
[key: ColumnId]: ColumnWidthType;
|
|
146
147
|
};
|
|
147
148
|
export type ColumnWidthType = ColumnWidthFixed | ColumnWidthBounded | undefined;
|
|
148
|
-
export type ResizeColumnData =
|
|
149
|
-
id: ColumnId;
|
|
150
|
-
columnWidth?: ColumnWidth | ColumnWidthBounded;
|
|
151
|
-
}[];
|
|
149
|
+
export type ResizeColumnData = ColumnWidthsType;
|
|
152
150
|
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ColumnConfigs, ScrollPosition, StripingMode } from '../types';
|
|
1
|
+
import { ColumnConfigs, ColumnWidthsType, ScrollPosition, StripingMode } from '../types';
|
|
2
2
|
export type GenerateTableCssArgs = {
|
|
3
3
|
pinnedLeft: ColumnConfigs;
|
|
4
4
|
pinnedRight: ColumnConfigs;
|
|
5
5
|
cellWidths: Array<number>;
|
|
6
6
|
scrollPosition: ScrollPosition;
|
|
7
|
-
visible: ColumnConfigs;
|
|
8
7
|
stripingMode?: StripingMode;
|
|
8
|
+
columnWidths: ColumnWidthsType;
|
|
9
9
|
};
|
|
10
|
-
export declare function generateTableCss({ pinnedLeft, pinnedRight, cellWidths, scrollPosition,
|
|
10
|
+
export declare function generateTableCss({ pinnedLeft, pinnedRight, cellWidths, scrollPosition, stripingMode, columnWidths, }: GenerateTableCssArgs): string;
|
|
@@ -9,7 +9,7 @@ export { Banner } from './Banner';
|
|
|
9
9
|
export { BaseContainer } from './BaseContainer';
|
|
10
10
|
export { Breadcrumbs } from './Breadcrumbs';
|
|
11
11
|
export { Button } from './Button';
|
|
12
|
-
export { RangeCalendar } from './
|
|
12
|
+
export { RangeCalendar, Calendar } from './Calendars';
|
|
13
13
|
export { Card } from './Card';
|
|
14
14
|
export { CardHeader } from './CardHeader';
|
|
15
15
|
export { Checkbox } from './Checkbox';
|