@veeqo/ui 8.0.0 → 8.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.
Files changed (33) hide show
  1. package/dist/components/Button/Button.d.ts +1 -0
  2. package/dist/components/Button/types.d.ts +3 -1
  3. package/dist/components/Calendars/components/Calendar/Calendar.d.ts +3 -5
  4. package/dist/components/Calendars/components/Calendar/utils.d.ts +0 -0
  5. package/dist/components/Calendars/components/RangeCalendar/RangeCalendar.d.ts +3 -5
  6. package/dist/components/Calendars/data/useIsDateUnavailable.d.ts +6 -9
  7. package/dist/components/Calendars/index.d.ts +1 -0
  8. package/dist/components/DateInputField/DateInputField.d.ts +1 -1
  9. package/dist/components/DateInputField/types.d.ts +23 -16
  10. package/dist/components/DatePicker/DatePicker.d.ts +16 -0
  11. package/dist/components/DatePicker/DatePicker.test.d.ts +1 -0
  12. package/dist/components/DatePicker/index.d.ts +1 -0
  13. package/dist/components/DatePicker/styled.d.ts +1 -0
  14. package/dist/components/DateRangePicker/DateRangePicker.d.ts +1 -1
  15. package/dist/components/DateRangePicker/index.d.ts +0 -1
  16. package/dist/components/DateRangePicker/types.d.ts +2 -3
  17. package/dist/components/DimensionsInput/styled.d.ts +1 -0
  18. package/dist/components/Modal/types.d.ts +1 -0
  19. package/dist/components/Pagination/styled.d.ts +1 -0
  20. package/dist/components/Popover/Popover.d.ts +1 -1
  21. package/dist/components/Popover/hooks/useUpdateAriaAnchor.d.ts +2 -1
  22. package/dist/components/Popover/types.d.ts +4 -0
  23. package/dist/components/VideoModal/styled.d.ts +1 -0
  24. package/dist/components/ViewsContainer/styled.d.ts +3 -0
  25. package/dist/components/WeightInput/styled.d.ts +1 -0
  26. package/dist/components/index.d.ts +3 -2
  27. package/dist/index.esm.js +1 -1
  28. package/dist/index.esm.js.map +1 -1
  29. package/dist/index.js +1 -1
  30. package/dist/index.js.map +1 -1
  31. package/package.json +1 -1
  32. package/dist/components/DateRangePicker/utils.d.ts +0 -6
  33. /package/dist/components/{DateRangePicker/utils.test.d.ts → Calendars/data/useIsDateUnavailable.test.d.ts} +0 -0
@@ -6,4 +6,5 @@ export declare const Button: React.ForwardRefExoticComponent<React.ButtonHTMLAtt
6
6
  iconSlot?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
7
7
  dropdown?: boolean | undefined;
8
8
  loading?: boolean | undefined;
9
+ contentStyles?: React.CSSProperties | undefined;
9
10
  } & React.RefAttributes<HTMLButtonElement>>;
@@ -1,4 +1,4 @@
1
- import { ReactNode, ButtonHTMLAttributes, ReactElement } from 'react';
1
+ import { ReactNode, ButtonHTMLAttributes, ReactElement, CSSProperties } from 'react';
2
2
  export type ButtonVariant = 'default' | 'destructive' | 'primary' | 'primaryDestructive' | 'flat' | 'link' | 'unstyled';
3
3
  /**
4
4
  * Button properties.
@@ -15,4 +15,6 @@ export type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
15
15
  dropdown?: boolean;
16
16
  /** Renders a loading indicator inside the button */
17
17
  loading?: boolean;
18
+ /** Additional styles for mainContent */
19
+ contentStyles?: CSSProperties;
18
20
  };
@@ -1,12 +1,10 @@
1
1
  import React from 'react';
2
2
  import type { DateValue, CalendarProps as RACalProps } from 'react-aria-components';
3
- import { CalendarDate } from '@internationalized/date';
3
+ import { DateValidationProps } from 'src/components/DateInputField/types';
4
4
  export type CalendarProps = RACalProps<DateValue> & {
5
5
  value: DateValue | null | undefined;
6
6
  onChange?: RACalProps<DateValue>['onChange'];
7
7
  } & React.RefAttributes<HTMLDivElement> & {
8
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;
9
+ } & DateValidationProps;
10
+ export declare const Calendar: ({ value, onChange, isDisabled, ...props }: CalendarProps) => React.JSX.Element;
@@ -1,12 +1,10 @@
1
1
  import React from 'react';
2
2
  import type { DateRange, DateValue, RangeCalendarProps } from 'react-aria-components';
3
- import { CalendarDate } from '@internationalized/date';
3
+ import { DateValidationProps } from 'src/components/DateInputField/types';
4
4
  export type CalendarProps = RangeCalendarProps<DateValue> & {
5
5
  value: DateRange | null | undefined;
6
6
  onChange?: RangeCalendarProps<DateValue>['onChange'];
7
7
  } & React.RefAttributes<HTMLDivElement> & {
8
8
  'aria-label': string;
9
- disabledRanges?: CalendarDate[][];
10
- disallowWeekends?: boolean;
11
- };
12
- export declare const RangeCalendar: ({ disabledRanges, disallowWeekends, value, onChange, isDisabled, ...props }: CalendarProps) => React.JSX.Element;
9
+ } & DateValidationProps;
10
+ export declare const RangeCalendar: ({ value, onChange, isDisabled, ...props }: CalendarProps) => React.JSX.Element;
@@ -1,10 +1,7 @@
1
- import { DateValue } from 'react-aria-components';
2
- import { CalendarDate } from '@internationalized/date';
3
- type UseIsDateUnavailableParams = {
4
- disabledRanges: CalendarDate[][];
5
- disallowWeekends: boolean;
1
+ import { DateValue } from '@internationalized/date';
2
+ import { DateRange } from 'react-aria-components';
3
+ import { DateValidationProps } from 'src/components/DateInputField/types';
4
+ export declare const useIsDateUnavailable: ({ disabledRanges, disallowWeekends, minValue, maxValue, }: DateValidationProps) => {
5
+ isDateUnavailable: (date: DateValue | null) => boolean;
6
+ isDateRangeUnavailable: (selectedRange: DateRange | null) => boolean;
6
7
  };
7
- export declare const useIsDateUnavailable: ({ disabledRanges, disallowWeekends, }: UseIsDateUnavailableParams) => {
8
- isDateUnavailable: (date: DateValue) => boolean;
9
- };
10
- export {};
@@ -1,2 +1,3 @@
1
1
  export { RangeCalendar } from './components/RangeCalendar';
2
2
  export { Calendar } from './components/Calendar';
3
+ export { useIsDateUnavailable } from './data/useIsDateUnavailable';
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
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;
3
+ export declare const DateInputField: ({ id, className, style, shouldForceLeadingZeros, rightAction, startValue, endValue, isDisabled, isReadOnly, isRangeInput, hasError, "aria-label": ariaLabel, "aria-describedby": ariaDescribedBy, "aria-labelledby": ariaLabelledBy, onChange, onChangeStartDate, onChangeEndDate, rangeRef, rightActionRef, ...validationProps }: DateInputFieldProps) => React.JSX.Element;
@@ -1,19 +1,14 @@
1
1
  import { CSSProperties } from 'react';
2
2
  import { DateValue } from 'react-aria-components';
3
+ import { CalendarDate } from '@internationalized/date';
3
4
  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;
5
+ export type DateValidationProps = {
6
+ minValue?: DateValue;
7
+ maxValue?: DateValue;
8
+ disabledRanges?: CalendarDate[][] | undefined;
9
+ disallowWeekends?: boolean | undefined;
15
10
  };
16
- export type DateInputFieldProps = {
11
+ type CommonDateInputProps = {
17
12
  id?: string;
18
13
  className?: string;
19
14
  style?: CSSProperties;
@@ -21,14 +16,26 @@ export type DateInputFieldProps = {
21
16
  rightAction?: ButtonProps;
22
17
  startValue?: DateValue | null;
23
18
  endValue?: DateValue | null;
24
- minValue?: DateValue;
25
- maxvalue?: DateValue;
26
19
  isDisabled?: boolean;
27
20
  isReadOnly?: boolean;
28
- isRangeInput?: boolean;
29
21
  hasError?: boolean;
30
22
  'aria-label'?: string;
31
23
  'aria-labelledby'?: string;
32
24
  'aria-describedby'?: string;
33
- } & (DateInputRangeProps | DateInputSingleProps);
25
+ rangeRef?: React.RefObject<HTMLDivElement>;
26
+ rightActionRef?: React.RefObject<HTMLButtonElement>;
27
+ } & DateValidationProps;
28
+ type DateInputRangeProps = CommonDateInputProps & {
29
+ isRangeInput: true;
30
+ onChangeStartDate: (value: DateValue) => void;
31
+ onChangeEndDate: (value: DateValue) => void;
32
+ onChange?: never;
33
+ };
34
+ type DateInputSingleProps = CommonDateInputProps & {
35
+ isRangeInput?: false;
36
+ onChange: (value: DateValue) => void;
37
+ onChangeStartDate?: never;
38
+ onChangeEndDate?: never;
39
+ };
40
+ export type DateInputFieldProps = DateInputRangeProps | DateInputSingleProps;
34
41
  export {};
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import { DateValue } from 'react-aria-components';
3
+ import { WithLabelsProps } from '../../hoc/withLabels/withLabels';
4
+ import { PopoverProps } from '../Popover/types';
5
+ import { DateValidationProps } from '../DateInputField/types';
6
+ type DatePickerProps = {
7
+ value: DateValue | null;
8
+ 'aria-label': string;
9
+ onChange: (date: DateValue | null) => void;
10
+ isDisabled?: boolean;
11
+ shouldCloseOnSelect?: boolean;
12
+ className?: string;
13
+ style?: React.CSSProperties;
14
+ } & WithLabelsProps & DateValidationProps & Pick<PopoverProps, 'rootElementRef'>;
15
+ export declare const DatePicker: ({ className, style, value, onChange, "aria-label": ariaLabel, isDisabled, shouldCloseOnSelect, rootElementRef, maxValue, minValue, disabledRanges, disallowWeekends, ...withLabelProps }: DatePickerProps) => React.JSX.Element;
16
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export { DatePicker } from './DatePicker';
@@ -0,0 +1 @@
1
+ export declare const DatePickerFooter: import("styled-components").StyledComponent<"footer", any, {}, never>;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
2
  import { DateRangePickerProps } from './types';
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;
3
+ export declare const DateRangePicker: ({ className, style, isDisabled, showDatePresets, onReset, disabledRanges, disallowWeekends, maxValue, minValue, selectedPreset, setSelectedPreset, selectedRange, setSelectedRange, "aria-describedby": ariaDescribedBy, "aria-label": ariaLabel, ...previousPeriodProps }: DateRangePickerProps) => React.JSX.Element;
@@ -1,3 +1,2 @@
1
1
  export { DateRangePicker } from './DateRangePicker';
2
- export { checkIfDateRangeInvalid } from './utils';
3
2
  export { DATE_RANGE_OPTIONS, DEFAULT_PRESET, DEFAULT_RANGE, DateRanges, getDateRange, } from './constants';
@@ -1,20 +1,19 @@
1
1
  import { CSSProperties } from 'react';
2
2
  import type { DateRange } from 'react-aria-components';
3
- import { CalendarDate } from '@internationalized/date';
4
3
  import { ComparePreviousPeriodProps } from './components/ComparePreviousPeriod';
5
4
  import { SelectOption } from '../Select/Select';
5
+ import { DateValidationProps } from '../DateInputField/types';
6
6
  export type DateRangePickerProps = {
7
7
  style?: CSSProperties;
8
8
  className?: string;
9
9
  isDisabled?: boolean;
10
10
  showDatePresets?: boolean;
11
11
  onReset?: () => void;
12
- disabledRanges?: CalendarDate[][];
13
12
  selectedPreset: SelectOption;
14
13
  setSelectedPreset: (selected: SelectOption) => void;
15
14
  selectedRange: DateRange | null;
16
15
  setSelectedRange: (selected: DateRange | null) => void;
17
- } & PreviousPeriodProps & RequiredLabel;
16
+ } & PreviousPeriodProps & DateValidationProps & RequiredLabel;
18
17
  type RequiredLabel = {
19
18
  'aria-describedby': string;
20
19
  'aria-label'?: string;
@@ -310,6 +310,7 @@ declare const StyledButton: import("styled-components").StyledComponent<import("
310
310
  iconSlot?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
311
311
  dropdown?: boolean | undefined;
312
312
  loading?: boolean | undefined;
313
+ contentStyles?: import("react").CSSProperties | undefined;
313
314
  } & import("react").RefAttributes<HTMLButtonElement>>, any, {}, never>;
314
315
  declare const Label: import("styled-components").StyledComponent<"span", any, {} & import("../Text/types").TextProps, never>;
315
316
  declare const Error: import("styled-components").StyledComponent<"span", any, {}, never>;
@@ -8,6 +8,7 @@ type BaseModalProps = {
8
8
  variant?: ModalVariants;
9
9
  onClose: () => void;
10
10
  children: React.ReactNode;
11
+ className?: string;
11
12
  };
12
13
  type WithHeaderSlot = {
13
14
  headerSlot: React.ReactNode;
@@ -7,6 +7,7 @@ export declare const PaginationButton: import("styled-components").StyledCompone
7
7
  iconSlot?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
8
8
  dropdown?: boolean | undefined;
9
9
  loading?: boolean | undefined;
10
+ contentStyles?: import("react").CSSProperties | undefined;
10
11
  } & import("react").RefAttributes<HTMLButtonElement>>, any, {}, never>;
11
12
  export declare const PageInput: import("styled-components").StyledComponent<import("react").FC<{
12
13
  form?: string | undefined;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
2
  import { PopoverProps } from './types';
3
- export declare const Popover: ({ id: passedId, children, zIndex, placement, anchorElement, rootElementRef, onShouldClose, style, disableFocusLock, removeBackdrop, useAnchorWidth, ...dialogProps }: PopoverProps) => React.JSX.Element;
3
+ export declare const Popover: ({ id: passedId, children, zIndex, placement, anchorElement, rootElementRef, onShouldClose, style, disableFocusLock, removeBackdrop, useAnchorWidth, ignoreAriaWarnings, ...dialogProps }: PopoverProps) => React.JSX.Element;
@@ -1,11 +1,12 @@
1
1
  type UseUpdateAriaAnchor = {
2
2
  anchorElement: HTMLElement | null;
3
3
  popoverId: string;
4
+ ignoreAriaWarnings?: boolean;
4
5
  };
5
6
  /**
6
7
  * Update the anchor element to sent the required attributes if they haven't already set them.
7
8
  *
8
9
  * This allows current, inaccesible usages to be improved.
9
10
  */
10
- export declare const useUpdateAriaAnchor: ({ anchorElement, popoverId }: UseUpdateAriaAnchor) => void;
11
+ export declare const useUpdateAriaAnchor: ({ anchorElement, popoverId, ignoreAriaWarnings, }: UseUpdateAriaAnchor) => void;
11
12
  export {};
@@ -7,6 +7,10 @@ export type PopoverProps = DialogHTMLAttributes<HTMLDialogElement> & {
7
7
  anchorElement: HTMLElement | null;
8
8
  useAnchorWidth?: boolean;
9
9
  rootElementRef?: HTMLElement;
10
+ /**
11
+ * When another ref is not the triggering element.
12
+ */
13
+ ignoreAriaWarnings?: boolean;
10
14
  /**
11
15
  * Will disable the focus lock if set to true, use only if taking manual control of focus.
12
16
  */
@@ -8,4 +8,5 @@ export declare const ButtonSC: import("styled-components").StyledComponent<impor
8
8
  iconSlot?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
9
9
  dropdown?: boolean | undefined;
10
10
  loading?: boolean | undefined;
11
+ contentStyles?: import("react").CSSProperties | undefined;
11
12
  } & import("react").RefAttributes<HTMLButtonElement>>, any, {}, never>;
@@ -11,6 +11,7 @@ export declare const StyledMenuButton: import("styled-components").StyledCompone
11
11
  iconSlot?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
12
12
  dropdown?: boolean | undefined;
13
13
  loading?: boolean | undefined;
14
+ contentStyles?: import("react").CSSProperties | undefined;
14
15
  } & import("react").RefAttributes<HTMLButtonElement>>, any, {}, never>;
15
16
  export declare const StyledLeftButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("react").ButtonHTMLAttributes<HTMLButtonElement> & {
16
17
  children?: import("react").ReactNode;
@@ -19,6 +20,7 @@ export declare const StyledLeftButton: import("styled-components").StyledCompone
19
20
  iconSlot?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
20
21
  dropdown?: boolean | undefined;
21
22
  loading?: boolean | undefined;
23
+ contentStyles?: import("react").CSSProperties | undefined;
22
24
  } & import("react").RefAttributes<HTMLButtonElement>>, any, {}, never>;
23
25
  export declare const StyledRightButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("react").ButtonHTMLAttributes<HTMLButtonElement> & {
24
26
  children?: import("react").ReactNode;
@@ -27,5 +29,6 @@ export declare const StyledRightButton: import("styled-components").StyledCompon
27
29
  iconSlot?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
28
30
  dropdown?: boolean | undefined;
29
31
  loading?: boolean | undefined;
32
+ contentStyles?: import("react").CSSProperties | undefined;
30
33
  } & import("react").RefAttributes<HTMLButtonElement>>, any, {}, never>;
31
34
  export declare const StyledInputGroup: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -310,6 +310,7 @@ declare const StyledButton: import("styled-components").StyledComponent<import("
310
310
  iconSlot?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
311
311
  dropdown?: boolean | undefined;
312
312
  loading?: boolean | undefined;
313
+ contentStyles?: import("react").CSSProperties | undefined;
313
314
  } & import("react").RefAttributes<HTMLButtonElement>>, any, {
314
315
  hasError?: boolean | undefined;
315
316
  }, never>;
@@ -10,7 +10,7 @@ export { Banner } from './Banner';
10
10
  export { BaseContainer } from './BaseContainer';
11
11
  export { Breadcrumbs } from './Breadcrumbs';
12
12
  export { Button } from './Button';
13
- export { RangeCalendar, Calendar } from './Calendars';
13
+ export { RangeCalendar, Calendar, useIsDateUnavailable } from './Calendars';
14
14
  export { Card } from './Card';
15
15
  export { CardHeader } from './CardHeader';
16
16
  export { Checkbox } from './Checkbox';
@@ -18,7 +18,8 @@ export { Choice } from './Choice';
18
18
  export { ChoiceList } from './ChoiceList';
19
19
  export { CopyToClipboard } from './CopyToClipboard';
20
20
  export { DateInputField } from './DateInputField';
21
- export { DateRangePicker, DATE_RANGE_OPTIONS, DEFAULT_PRESET, DEFAULT_RANGE, DateRanges, checkIfDateRangeInvalid, getDateRange, } from './DateRangePicker';
21
+ export { DatePicker } from './DatePicker';
22
+ export { DateRangePicker, DATE_RANGE_OPTIONS, DEFAULT_PRESET, DEFAULT_RANGE, DateRanges, getDateRange, } from './DateRangePicker';
22
23
  export { DataTable, useCellWidths, useColumns, useDragToScroll, useNested, useScrollPosition, useSelection, } from './DataTable';
23
24
  export { DescriptionList } from './DescriptionList';
24
25
  export { DetailPage } from './DetailPage';