@up42/up-components 4.0.0 → 4.1.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/cjs/index.js +2 -2
- package/dist/cjs/types/components/FormDatePickers/FormDatePickerWrapper.d.ts +2 -2
- package/dist/cjs/types/components/FormDatePickers/FormDateRangePickerList/FormDateRangePickerList.d.ts +27 -0
- package/dist/cjs/types/index.d.ts +1 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/types/components/FormDatePickers/FormDatePickerWrapper.d.ts +2 -2
- package/dist/esm/types/components/FormDatePickers/FormDateRangePickerList/FormDateRangePickerList.d.ts +27 -0
- package/dist/esm/types/index.d.ts +1 -0
- package/dist/index.d.ts +32 -3
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React, { PropsWithChildren } from 'react';
|
|
1
|
+
import React, { PropsWithChildren, ReactNode } from 'react';
|
|
2
2
|
export type DatePickerWrapperProps = {
|
|
3
3
|
error?: boolean;
|
|
4
|
-
label?: string;
|
|
4
|
+
label?: string | ReactNode;
|
|
5
5
|
helperText?: string;
|
|
6
6
|
};
|
|
7
7
|
export declare const FormDatePickerWrapper: ({ label, error, helperText, children, }: PropsWithChildren<DatePickerWrapperProps>) => React.JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DateRangePickerProps } from '@mui/x-date-pickers-pro/DateRangePicker';
|
|
3
|
+
import { type DatePickerWrapperProps } from '../FormDatePickerWrapper';
|
|
4
|
+
import { DatePickerDateType } from '../FormDatePicker/FormDatePicker';
|
|
5
|
+
export type DateRange = {
|
|
6
|
+
start: DatePickerDateType | Date;
|
|
7
|
+
end: DatePickerDateType | Date;
|
|
8
|
+
};
|
|
9
|
+
export type FormDateRangePickerListProps = {
|
|
10
|
+
startLabel?: string;
|
|
11
|
+
endLabel?: string;
|
|
12
|
+
value: DateRange[];
|
|
13
|
+
onChange?: (value: DateRange[]) => void;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Defines the minimum number of days after the "start date" that the "end date" can be selected.
|
|
17
|
+
*/
|
|
18
|
+
minEndDateOffset?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Defines the maximum number of days after the "start date" that the "end date" can be selected.
|
|
21
|
+
*/
|
|
22
|
+
maxEndDateOffset?: number;
|
|
23
|
+
} & DatePickerWrapperProps & Omit<DateRangePickerProps<DatePickerDateType | Date>, 'value'>;
|
|
24
|
+
/**
|
|
25
|
+
* Documentation: https://up-components.up42.com/?path=/docs/patterns-form-formdaterangepickerlist--docs
|
|
26
|
+
*/
|
|
27
|
+
export declare const FormDateRangePickerList: ({ value, onChange, label, helperText, error, startLabel, endLabel, disabled, minEndDateOffset, maxEndDateOffset, ...props }: FormDateRangePickerListProps) => React.JSX.Element;
|
|
@@ -13,6 +13,7 @@ export { FormCheckbox, type FormCheckboxProps } from './components/FormCheckbox/
|
|
|
13
13
|
export { FormDatePicker, type FormDatePickerProps, type DatePickerDateType, } from './components/FormDatePickers/FormDatePicker/FormDatePicker';
|
|
14
14
|
export { FormDateRangePicker, type FormDateRangePickerProps, } from './components/FormDatePickers/FormDateRangePicker/FormDateRangePicker';
|
|
15
15
|
export { FormDateTimePicker, type FormDateTimePickerProps, } from './components/FormDatePickers/FormDateTimePicker/FormDateTimePicker';
|
|
16
|
+
export { FormDateRangePickerList, type FormDateRangePickerListProps, type DateRange, } from './components/FormDatePickers/FormDateRangePickerList/FormDateRangePickerList';
|
|
16
17
|
export { Radio, type RadioProps } from './components/Radio/Radio';
|
|
17
18
|
export { FormRadio, type FormRadioProps } from './components/FormRadio/FormRadio';
|
|
18
19
|
export { Switch, type SwitchProps } from './components/Switch/Switch';
|
package/dist/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ import * as _mui_material_OverridableComponent from '@mui/material/OverridableCo
|
|
|
11
11
|
import * as _mui_system from '@mui/system';
|
|
12
12
|
import { DatePickerProps, DateTimePickerProps } from '@mui/x-date-pickers-pro';
|
|
13
13
|
import dayjs, { Dayjs } from 'dayjs';
|
|
14
|
+
import { DateRangePickerProps } from '@mui/x-date-pickers-pro/DateRangePicker';
|
|
14
15
|
import { TableProps as TableProps$1 } from '@mui/material/Table';
|
|
15
16
|
import { TableBodyProps as TableBodyProps$1 } from '@mui/material/TableBody';
|
|
16
17
|
import { TableCellProps as TableCellProps$1 } from '@mui/material/TableCell';
|
|
@@ -177,7 +178,7 @@ declare const FormCheckbox: React__default.ForwardRefExoticComponent<Omit<_mui_s
|
|
|
177
178
|
|
|
178
179
|
type DatePickerWrapperProps = {
|
|
179
180
|
error?: boolean;
|
|
180
|
-
label?: string;
|
|
181
|
+
label?: string | ReactNode;
|
|
181
182
|
helperText?: string;
|
|
182
183
|
};
|
|
183
184
|
|
|
@@ -215,6 +216,32 @@ type NonGenericMuiDateTimePickerProps = DateTimePickerProps<Dayjs | null | undef
|
|
|
215
216
|
type FormDateTimePickerProps = NonGenericMuiDateTimePickerProps & DatePickerWrapperProps;
|
|
216
217
|
declare const FormDateTimePicker: React__default.ForwardRefExoticComponent<NonGenericMuiDateTimePickerProps & DatePickerWrapperProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
217
218
|
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
type DateRange = {
|
|
222
|
+
start: DatePickerDateType | Date;
|
|
223
|
+
end: DatePickerDateType | Date;
|
|
224
|
+
};
|
|
225
|
+
type FormDateRangePickerListProps = {
|
|
226
|
+
startLabel?: string;
|
|
227
|
+
endLabel?: string;
|
|
228
|
+
value: DateRange[];
|
|
229
|
+
onChange?: (value: DateRange[]) => void;
|
|
230
|
+
disabled?: boolean;
|
|
231
|
+
/**
|
|
232
|
+
* Defines the minimum number of days after the "start date" that the "end date" can be selected.
|
|
233
|
+
*/
|
|
234
|
+
minEndDateOffset?: number;
|
|
235
|
+
/**
|
|
236
|
+
* Defines the maximum number of days after the "start date" that the "end date" can be selected.
|
|
237
|
+
*/
|
|
238
|
+
maxEndDateOffset?: number;
|
|
239
|
+
} & DatePickerWrapperProps & Omit<DateRangePickerProps<DatePickerDateType | Date>, 'value'>;
|
|
240
|
+
/**
|
|
241
|
+
* Documentation: https://up-components.up42.com/?path=/docs/patterns-form-formdaterangepickerlist--docs
|
|
242
|
+
*/
|
|
243
|
+
declare const FormDateRangePickerList: ({ value, onChange, label, helperText, error, startLabel, endLabel, disabled, minEndDateOffset, maxEndDateOffset, ...props }: FormDateRangePickerListProps) => React__default.JSX.Element;
|
|
244
|
+
|
|
218
245
|
type RadioProps = MUIGlobalOmit<RadioProps$1>;
|
|
219
246
|
/**
|
|
220
247
|
* Documentation: https://up-components.up42.com/?path=/docs/data-entry-radio--docs
|
|
@@ -5404,5 +5431,7 @@ declare const useAlert: () => ContextState;
|
|
|
5404
5431
|
|
|
5405
5432
|
|
|
5406
5433
|
|
|
5407
|
-
|
|
5408
|
-
|
|
5434
|
+
|
|
5435
|
+
|
|
5436
|
+
export { Alert, Avatar, Badge, Banner, Button, Checkbox, CodeInline, CodeSnippet, ContactBox, ControlButton, CopyButton, DataGrid, DateTime, Divider, DocumentationPopover, EmptyState, FormCheckbox, FormDatePicker, FormDateRangePicker, FormDateRangePickerList, FormDateTimePicker, FormInput, FormRadio, FormSelect, FormSwitch, GridContainer, GridItem, Icon, Illustration, InfoCard, InfoModal, InfoPopover, Input, Link, Loading, NotFound, PageContainer, PageHeader, Radio, Select, Slider, Switch, Tab, TabGroup, Table, TableBody, TableCell, TableContainer, TableFooter, TableHead, TablePagination, TableRow, TableSortLabel, Tabs, Tag, Typography, UpComponentsProvider, capitalize, copyToClipboard, formatDate, formatFileSize, formatNumber, theme, useAlert, useCursorPagination, useDebounce, useQueryParams, useRemotePagination };
|
|
5437
|
+
export type { AlertProps, AvatarProps, BadgeProps, BannerProps, ButtonProps, CheckboxProps, CodeInlineProps, CodeSnippetItemProps, CodeSnippetProps, ContactBoxProps, ControlButtonProps, CopyButtonProps, CreateAlertProps, CreateSnackbarProps, CursorPaginatedResponse, DatePickerDateType, DateRange, DateTimeProps, DividerProps, DocumentationPopoverProps, EmptyStateProps, FormCheckboxProps, FormDatePickerProps, FormDateRangePickerListProps, FormDateRangePickerProps, FormDateTimePickerProps, FormInputProps, FormRadioProps, FormSelectProps, FormSwitchProps, GridContainerProps, GridItemProps, IconProps, IllustrationProps, InfoCardProps, InfoModalProps, InfoPopoverProps, InputProps, LinkProps, LoadingProps, NotFoundProps, PageContainerProps, PageHeaderProps, PaginatedResponse, RadioProps, SelectProps, SliderProps, SwitchProps, TabGroupProps, TabProps, TableBodyProps, TableCellProps, TableContainerProps, TableFooterProps, TableHeadProps, TablePaginationProps, TableProps, TableRowProps, TableSortLabelProps, TabsProps, TagProps, TypographyProps };
|