@veeqo/ui 6.2.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.
@@ -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;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const DateInputField: import("react").FC<import("./types").DateInputFieldProps & import("../../hoc/withLabels/withLabels").WithLabelsProps>;
@@ -1,21 +1,34 @@
1
- import React, { CSSProperties } from 'react';
1
+ import { CSSProperties } from 'react';
2
2
  import { DateValue } from 'react-aria-components';
3
- export type DateRangeInputProps = {
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
- hasError?: boolean;
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
- onChangeStartDate: (value: DateValue) => void;
19
- onChangeEndDate: (value: DateValue) => void;
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 {};
@@ -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 { DateRangeInput } from './DateRangeInput';
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';