@veeqo/ui 6.1.0 → 6.3.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/DateInputField/DateInputField.d.ts +3 -0
- package/dist/components/DateInputField/index.d.ts +2 -0
- package/dist/components/{DateRangeInput/DateRangeInput.d.ts → DateInputField/types.d.ts} +20 -7
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +1 -1
- package/dist/components/DateRangePicker/types.d.ts +0 -1
- package/dist/components/RangeCalendar/RangeCalendar.d.ts +6 -4
- package/dist/components/RangeCalendar/components/CalendarGrid/CalendarGrid.d.ts +10 -0
- package/dist/components/RangeCalendar/components/CalendarGrid/index.d.ts +1 -0
- package/dist/components/RangeCalendar/components/CalendarGrid/subCalendars/DodecadeCalendar.d.ts +7 -0
- package/dist/components/RangeCalendar/components/CalendarGrid/subCalendars/DodecadeCalendar.test.d.ts +1 -0
- package/dist/components/RangeCalendar/components/{CalendarGrid.d.ts → CalendarGrid/subCalendars/MonthCalendar.d.ts} +1 -1
- package/dist/components/RangeCalendar/components/CalendarGrid/subCalendars/YearCalendar.d.ts +6 -0
- package/dist/components/RangeCalendar/components/CalendarGrid/subCalendars/YearCalendar.test.d.ts +1 -0
- package/dist/components/RangeCalendar/components/CalendarGrid/subCalendars/index.d.ts +3 -0
- package/dist/components/RangeCalendar/components/CalendarGrid/subCalendars/styled.d.ts +1 -0
- package/dist/components/RangeCalendar/components/CalendarGrid/subCalendars/utils.d.ts +6 -0
- package/dist/components/RangeCalendar/components/CalendarHeader.d.ts +9 -0
- package/dist/components/RangeCalendar/components/CalendarHeading.d.ts +7 -0
- package/dist/components/RangeCalendar/components/utils.d.ts +6 -0
- package/dist/components/RangeCalendar/data/constants.d.ts +4 -0
- package/dist/components/RangeCalendar/data/useRangeCalendar.d.ts +14 -0
- package/dist/components/RangeCalendar/types.d.ts +5 -0
- 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/tempIcons/CalendarIcon.d.ts +1 -1
- package/package.json +1 -1
- package/dist/components/DateRangeInput/index.d.ts +0 -2
- /package/dist/components/{DateRangeInput/DateRangeInput.test.d.ts → DateInputField/DateInputField.test.d.ts} +0 -0
- /package/dist/components/{DateRangeInput → DateInputField}/styled.d.ts +0 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DateInputFieldProps } from './types';
|
|
3
|
+
export declare const DateInputField: ({ id, className, style, shouldForceLeadingZeros, rightAction, minValue, maxvalue, startValue, endValue, isDisabled, isReadOnly, isRangeInput, hasError, "aria-label": ariaLabel, "aria-describedby": ariaDescribedBy, "aria-labelledby": ariaLabelledBy, onChange, onChangeStartDate, onChangeEndDate, }: DateInputFieldProps) => React.JSX.Element;
|
|
@@ -1,21 +1,34 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
2
|
import { DateValue } from 'react-aria-components';
|
|
3
|
-
|
|
3
|
+
import { ButtonProps } from '../Button/types';
|
|
4
|
+
type DateInputRangeProps = {
|
|
5
|
+
isRangeInput: true;
|
|
6
|
+
onChangeStartDate: (value: DateValue) => void;
|
|
7
|
+
onChangeEndDate: (value: DateValue) => void;
|
|
8
|
+
onChange?: (value: DateValue) => void;
|
|
9
|
+
};
|
|
10
|
+
type DateInputSingleProps = {
|
|
11
|
+
isRangeInput?: false;
|
|
12
|
+
onChange: (value: DateValue) => void;
|
|
13
|
+
onChangeStartDate?: (value: DateValue) => void;
|
|
14
|
+
onChangeEndDate?: (value: DateValue) => void;
|
|
15
|
+
};
|
|
16
|
+
export type DateInputFieldProps = {
|
|
4
17
|
id?: string;
|
|
5
18
|
className?: string;
|
|
6
19
|
style?: CSSProperties;
|
|
7
20
|
shouldForceLeadingZeros?: boolean;
|
|
8
|
-
|
|
21
|
+
rightAction?: ButtonProps;
|
|
9
22
|
startValue?: DateValue | null;
|
|
10
23
|
endValue?: DateValue | null;
|
|
11
24
|
minValue?: DateValue;
|
|
12
25
|
maxvalue?: DateValue;
|
|
13
26
|
isDisabled?: boolean;
|
|
14
27
|
isReadOnly?: boolean;
|
|
28
|
+
isRangeInput?: boolean;
|
|
29
|
+
hasError?: boolean;
|
|
15
30
|
'aria-label'?: string;
|
|
16
31
|
'aria-labelledby'?: string;
|
|
17
32
|
'aria-describedby'?: string;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
};
|
|
21
|
-
export declare const DateRangeInput: ({ id, className, style, shouldForceLeadingZeros, hasError, minValue, maxvalue, startValue, endValue, isDisabled, isReadOnly, "aria-label": ariaLabel, "aria-describedby": ariaDescribedBy, "aria-labelledby": ariaLabelledBy, onChangeStartDate, onChangeEndDate, }: DateRangeInputProps) => React.JSX.Element;
|
|
33
|
+
} & (DateInputRangeProps | DateInputSingleProps);
|
|
34
|
+
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DateRangePickerProps } from './types';
|
|
3
|
-
export declare const DateRangePicker: ({ className, style, isDisabled,
|
|
3
|
+
export declare const DateRangePicker: ({ className, style, isDisabled, showDatePresets, onReset, disabledRanges, selectedPreset, setSelectedPreset, selectedRange, setSelectedRange, "aria-describedby": ariaDescribedBy, "aria-label": ariaLabel, ...previousPeriodProps }: DateRangePickerProps) => React.JSX.Element;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { DateRange, DateValue, RangeCalendarProps } from 'react-aria-components';
|
|
2
3
|
import { CalendarDate } from '@internationalized/date';
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
export type CalendarProps = RangeCalendarProps<DateValue> & {
|
|
5
|
+
value: DateRange | null | undefined;
|
|
6
|
+
onChange?: RangeCalendarProps<DateValue>['onChange'];
|
|
7
|
+
} & React.RefAttributes<HTMLDivElement> & {
|
|
5
8
|
'aria-label': string;
|
|
6
|
-
isMultiMonth?: boolean;
|
|
7
9
|
disabledRanges?: CalendarDate[][];
|
|
8
10
|
disallowWeekends?: boolean;
|
|
9
11
|
};
|
|
10
|
-
export declare const RangeCalendar: ({ disabledRanges, disallowWeekends,
|
|
12
|
+
export declare const RangeCalendar: ({ disabledRanges, disallowWeekends, value, onChange, ...props }: CalendarProps) => React.JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CalendarLevel } from '../../types';
|
|
3
|
+
type CalendarGridProps = {
|
|
4
|
+
level: CalendarLevel;
|
|
5
|
+
currentYear: number;
|
|
6
|
+
onFocusYear: (year: number) => () => void;
|
|
7
|
+
onFocusMonth: (month: number) => () => void;
|
|
8
|
+
};
|
|
9
|
+
export declare const CalendarGrid: ({ level, currentYear, onFocusMonth, onFocusYear, }: CalendarGridProps) => React.JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CalendarGrid } from './CalendarGrid';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/components/RangeCalendar/components/CalendarGrid/subCalendars/YearCalendar.test.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SubCalendarOption: import("styled-components").StyledComponent<"button", any, {}, never>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CalendarLevel } from '../types';
|
|
3
|
+
type CalendarHeaderProps = {
|
|
4
|
+
level: CalendarLevel;
|
|
5
|
+
currentYear: number;
|
|
6
|
+
handleSwitchLevel: () => void;
|
|
7
|
+
};
|
|
8
|
+
export declare const CalendarHeader: ({ level, currentYear, handleSwitchLevel }: CalendarHeaderProps) => React.JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { HeadingProps } from 'react-aria-components';
|
|
3
|
+
import { CalendarLevel } from '../types';
|
|
4
|
+
export declare const CalendarHeading: React.ForwardRefExoticComponent<HeadingProps & {
|
|
5
|
+
level: CalendarLevel;
|
|
6
|
+
currentYear: number;
|
|
7
|
+
} & React.RefAttributes<HTMLHeadingElement>>;
|
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
import type { TextStyles } from '../../../theme/modules/text';
|
|
2
2
|
export declare const getTextStyles: (textTheme: TextStyles) => string;
|
|
3
|
+
/**
|
|
4
|
+
* Replaces all words with the first three letter of that word. All numbers are left alone.
|
|
5
|
+
*
|
|
6
|
+
* @example "January 2023" => "Jan 2023"
|
|
7
|
+
*/
|
|
8
|
+
export declare const trimMonths: (dateString: string) => string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CalendarDate } from '@internationalized/date';
|
|
3
|
+
import { DateRange, DateValue } from 'react-aria-components';
|
|
4
|
+
import { CalendarLevel } from '../types';
|
|
5
|
+
export declare const useRangeCalendarState: (initialValue: DateRange | null | undefined, disabledRanges: CalendarDate[][], disallowWeekends: boolean) => {
|
|
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
|
+
isDateUnavailable: (date: DateValue) => boolean;
|
|
11
|
+
onFocusMonth: (monthIndex: number) => () => void;
|
|
12
|
+
onFocusYear: (year: number) => () => void;
|
|
13
|
+
handleSwitchLevel: () => void;
|
|
14
|
+
};
|
|
@@ -16,7 +16,7 @@ export { Checkbox } from './Checkbox';
|
|
|
16
16
|
export { Choice } from './Choice';
|
|
17
17
|
export { ChoiceList } from './ChoiceList';
|
|
18
18
|
export { CopyToClipboard } from './CopyToClipboard';
|
|
19
|
-
export {
|
|
19
|
+
export { DateInputField } from './DateInputField';
|
|
20
20
|
export { DateRangePicker, DATE_RANGE_OPTIONS, DEFAULT_PRESET, DEFAULT_RANGE, DateRanges, checkIfDateRangeInvalid, getDateRange, } from './DateRangePicker';
|
|
21
21
|
export { DataTable, useCellWidths, useColumns, useDragToScroll, useNested, useScrollPosition, useSelection, } from './DataTable';
|
|
22
22
|
export { DescriptionList } from './DescriptionList';
|