@up42/up-components 5.10.2 → 5.12.0-date-pickers.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/FormDatePicker/FormDatePicker.d.ts +2 -2
- package/dist/cjs/types/components/FormDatePickers/FormDateRangePicker/FormDateRangePicker.d.ts +30 -19
- package/dist/cjs/types/components/FormDatePickers/FormDateRangePickerList/FormDateRangePickerList.d.ts +3 -22
- package/dist/cjs/types/components/PageHeader/PageHeader.d.ts +1 -0
- package/dist/cjs/types/components/PageHeaderV2/PageHeaderV2.d.ts +29 -0
- package/dist/cjs/types/components/PageHeaderV2/PageHeaderV2.test.d.ts +1 -0
- package/dist/cjs/types/components/Popover/Popover.d.ts +1 -1
- package/dist/cjs/types/global/icons/index.d.ts +1 -0
- package/dist/cjs/types/index.d.ts +4 -3
- package/dist/esm/index.js +2 -2
- package/dist/esm/types/components/FormDatePickers/FormDatePicker/FormDatePicker.d.ts +2 -2
- package/dist/esm/types/components/FormDatePickers/FormDateRangePicker/FormDateRangePicker.d.ts +30 -19
- package/dist/esm/types/components/FormDatePickers/FormDateRangePickerList/FormDateRangePickerList.d.ts +3 -22
- package/dist/esm/types/components/PageHeader/PageHeader.d.ts +1 -0
- package/dist/esm/types/components/PageHeaderV2/PageHeaderV2.d.ts +29 -0
- package/dist/esm/types/components/PageHeaderV2/PageHeaderV2.test.d.ts +1 -0
- package/dist/esm/types/components/Popover/Popover.d.ts +1 -1
- package/dist/esm/types/global/icons/index.d.ts +1 -0
- package/dist/esm/types/index.d.ts +4 -3
- package/dist/index.d.ts +482 -444
- package/package.json +1 -1
|
@@ -2,8 +2,8 @@ import { DatePickerProps as MuiDatePickerProps } from '@mui/x-date-pickers-pro';
|
|
|
2
2
|
import { Dayjs } from 'dayjs';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { type DatePickerWrapperProps } from '../FormDatePickerWrapper';
|
|
5
|
-
export type
|
|
6
|
-
type NonGenericMuiDatePickerProps = MuiDatePickerProps<
|
|
5
|
+
export type FormDatePickerDateType = Date | Dayjs | null | undefined;
|
|
6
|
+
type NonGenericMuiDatePickerProps = MuiDatePickerProps<FormDatePickerDateType>;
|
|
7
7
|
export type FormDatePickerProps = NonGenericMuiDatePickerProps & DatePickerWrapperProps;
|
|
8
8
|
export declare const FormDatePicker: React.ForwardRefExoticComponent<NonGenericMuiDatePickerProps & DatePickerWrapperProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
9
|
export {};
|
package/dist/esm/types/components/FormDatePickers/FormDateRangePicker/FormDateRangePicker.d.ts
CHANGED
|
@@ -1,23 +1,34 @@
|
|
|
1
|
-
import { DatePickerProps as MuiDatePickerProps } from '@mui/x-date-pickers-pro';
|
|
2
1
|
import React from 'react';
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
export type
|
|
7
|
-
start:
|
|
8
|
-
|
|
9
|
-
end: DatePickerDateType;
|
|
10
|
-
onEndChange: (date: DatePickerDateType) => void;
|
|
11
|
-
label?: string;
|
|
12
|
-
startPickerProps?: {
|
|
13
|
-
slotProps: FormDatePickerProps['slotProps'];
|
|
14
|
-
};
|
|
15
|
-
endPickerProps?: {
|
|
16
|
-
slotProps: FormDatePickerProps['slotProps'];
|
|
17
|
-
};
|
|
2
|
+
import { DateRangePickerProps } from '@mui/x-date-pickers-pro/DateRangePicker';
|
|
3
|
+
import { type DatePickerWrapperProps } from '../FormDatePickerWrapper';
|
|
4
|
+
import { FormDatePickerDateType } from '../FormDatePicker/FormDatePicker';
|
|
5
|
+
export type DateRange = {
|
|
6
|
+
start: FormDatePickerDateType;
|
|
7
|
+
end: FormDatePickerDateType;
|
|
18
8
|
};
|
|
9
|
+
export type FormDateRangePickerProps = {
|
|
10
|
+
startLabel?: string;
|
|
11
|
+
startPlaceholder?: string;
|
|
12
|
+
endLabel?: string;
|
|
13
|
+
endPlaceholder?: string;
|
|
14
|
+
value: DateRange | null;
|
|
15
|
+
onChange?: (value: DateRange | null) => void;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Defines whether or not the user can input values and navigate in the calendars using the keyboard.
|
|
19
|
+
*/
|
|
20
|
+
allowKeyboard?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Defines the minimum number of days after the "start date" that the "end date" can be selected.
|
|
23
|
+
*/
|
|
24
|
+
minEndDateOffset?: number;
|
|
25
|
+
/**
|
|
26
|
+
* Defines the maximum number of days after the "start date" that the "end date" can be selected.
|
|
27
|
+
*/
|
|
28
|
+
maxEndDateOffset?: number;
|
|
29
|
+
} & DatePickerWrapperProps & Omit<DateRangePickerProps<FormDatePickerDateType | Date>, 'value' | 'onChange'>;
|
|
19
30
|
/**
|
|
20
|
-
*
|
|
31
|
+
* FormDateRangePicker allows users to choose two dates (start and end) using calendar view.
|
|
32
|
+
* Documentation: https://up-components.up42.com/?path=/docs-patterns-form-formdaterangepicker--docs
|
|
21
33
|
*/
|
|
22
|
-
export declare const FormDateRangePicker: ({
|
|
23
|
-
export {};
|
|
34
|
+
export declare const FormDateRangePicker: ({ value, onChange, label, helperText, error, startLabel, endLabel, disabled, minEndDateOffset, maxEndDateOffset, allowKeyboard, startPlaceholder, endPlaceholder, ...props }: FormDateRangePickerProps) => React.JSX.Element;
|
|
@@ -1,36 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { DateRangePickerProps } from '@mui/x-date-pickers-pro/DateRangePicker';
|
|
3
2
|
import { type DatePickerWrapperProps } from '../FormDatePickerWrapper';
|
|
4
|
-
import {
|
|
5
|
-
export type DateRange = {
|
|
6
|
-
start: DatePickerDateType | Date;
|
|
7
|
-
end: DatePickerDateType | Date;
|
|
8
|
-
};
|
|
3
|
+
import { FormDateRangePickerProps, DateRange } from '../FormDateRangePicker/FormDateRangePicker';
|
|
9
4
|
export type FormDateRangePickerListProps = {
|
|
10
|
-
startLabel?: string;
|
|
11
|
-
endLabel?: string;
|
|
12
5
|
value: DateRange[];
|
|
13
6
|
onChange?: (value: DateRange[]) => void;
|
|
14
7
|
disabled?: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Defines whether or not the user can input values and navigate in the calendars using the keyboard.
|
|
17
|
-
*/
|
|
18
|
-
allowKeyboard?: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Defines the minimum number of days after the "start date" that the "end date" can be selected.
|
|
21
|
-
*/
|
|
22
|
-
minEndDateOffset?: number;
|
|
23
|
-
/**
|
|
24
|
-
* Defines the maximum number of days after the "start date" that the "end date" can be selected.
|
|
25
|
-
*/
|
|
26
|
-
maxEndDateOffset?: number;
|
|
27
8
|
/**
|
|
28
9
|
* Defines the text to display in the action button to add a new Date Range.
|
|
29
10
|
* It defaults to "Add new date".
|
|
30
11
|
*/
|
|
31
12
|
addButtonText?: string;
|
|
32
|
-
} & DatePickerWrapperProps & Omit<
|
|
13
|
+
} & DatePickerWrapperProps & Omit<FormDateRangePickerProps, 'value' | 'onChange'>;
|
|
33
14
|
/**
|
|
34
15
|
* Documentation: https://up-components.up42.com/?path=/docs/patterns-form-formdaterangepickerlist--docs
|
|
35
16
|
*/
|
|
36
|
-
export declare const FormDateRangePickerList: ({ value, onChange, label, helperText, error,
|
|
17
|
+
export declare const FormDateRangePickerList: ({ value, onChange, label, helperText, error, disabled, addButtonText, ...props }: FormDateRangePickerListProps) => React.JSX.Element;
|
|
@@ -18,5 +18,6 @@ export type PageHeaderProps = {
|
|
|
18
18
|
};
|
|
19
19
|
/**
|
|
20
20
|
* Documentation: https://up-components.up42.com/?path=/docs/patterns-pageheader--docs
|
|
21
|
+
* @deprecated use PageHeaderV2 instead
|
|
21
22
|
*/
|
|
22
23
|
export declare const PageHeader: ({ title, description, divider, action, secondaryAction, onSubmitTitle, }: PageHeaderProps) => React.JSX.Element;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { SxProps, Theme } from '@mui/material';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export type PageHeaderV2Props = {
|
|
4
|
+
title: string;
|
|
5
|
+
divider?: boolean;
|
|
6
|
+
description?: React.ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Sets the size and spacing of the header
|
|
9
|
+
*/
|
|
10
|
+
variant?: 'default' | 'compact';
|
|
11
|
+
/**
|
|
12
|
+
* Back link configuration
|
|
13
|
+
*/
|
|
14
|
+
backLink?: {
|
|
15
|
+
label: string;
|
|
16
|
+
href?: string;
|
|
17
|
+
onClick?: () => void;
|
|
18
|
+
'data-testid'?: string;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Action buttons to display on the right side
|
|
22
|
+
*/
|
|
23
|
+
action?: React.ReactNode;
|
|
24
|
+
sx?: SxProps<Theme>;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Documentation: https://up-components.up42.com/?path=/docs/patterns-pageheaderv2--docs
|
|
28
|
+
*/
|
|
29
|
+
export declare const PageHeaderV2: ({ title, description, divider, variant, backLink, action, sx, }: PageHeaderV2Props) => React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -111,7 +111,7 @@ export declare const Popover: React.ForwardRefExoticComponent<Omit<Omit<MUIPopov
|
|
|
111
111
|
/**
|
|
112
112
|
* Alternative icon to display as the built in button's icon (only applicable if isIconAnchor is true)
|
|
113
113
|
*/
|
|
114
|
-
icon?: "AccessTime" | "Add" | "AddCircleFilled" | "AddPlusCircle" | "AlarmBell" | "AlertCircleFilled" | "AlertTriangle" | "Angle" | "AppWindowCode" | "ArrowBack" | "ArrowBackIos" | "ArrowDownLeft" | "ArrowDownRight" | "ArrowDownward" | "ArrowForward" | "ArrowTopLeft" | "ArrowTopRight" | "ArrowUpward" | "Attachment" | "AutoStoriesOutlined" | "Balance" | "Bin" | "Block" | "Blocked" | "Boxes" | "BoxesGrid" | "Brightness1" | "Calendar" | "CalendarAdd" | "CalendarCheck" | "CalendarDate" | "CalendarEdit" | "CalendarRemove" | "CalendarSearchDate" | "CampaignOutlined" | "CaretCircleFilledDown" | "CaretCircleFilledLeft" | "CaretCircleFilledRight" | "CaretCircleFilledUp" | "Catalog" | "CheckCircle" | "CheckCircleFilled" | "CheckList" | "CheckMark" | "ChevronCircleFilledDown" | "ChevronCircleFilledLeft" | "ChevronCircleFilledRight" | "ChevronCircleFilledUp" | "Close" | "CloseCircle" | "CloseCircleFilled" | "Cloud" | "CloudCheck" | "CloudDownload" | "CloudOff" | "CloudRemove" | "CloudSearch" | "CloudSync" | "CloudUpload" | "CloudWarning" | "Coin" | "CoinEuro" | "Compass" | "ContactSupportOutlined" | "ContentCut" | "ContentPaste" | "Copy" | "Credit" | "Dashboard" | "DataTransferVertical" | "Delivery" | "DollarCoinCircleFilled" | "DottedLines" | "Download" | "DownloadCircle" | "EditPencil" | "EuroCoinCircleFilled" | "ExitLeaveBack" | "ExternalLink" | "EyeCircleFilled" | "FlagQuestion" | "FolderEmpty" | "Footprint" | "HeadphonesQuestion" | "Heart" | "HeartCircleFilled" | "Hyperlink" | "ImageResolution" | "Invoice" | "KeyboardArrowDown" | "KeyboardArrowLeft" | "KeyboardArrowRight" | "KeyboardArrowUp" | "Layers" | "Library" | "Lightbulb" | "LightbulbOutlined" | "LocalOfferOutlined" | "Lock" | "LockCircleFilled" | "LockShield" | "Logo" | "LogoKSA" | "Map" | "MapPin" | "MapSearch" | "Marketplace" | "MarketplaceExternal" | "MenuCircleFilledHorizontal" | "MenuCircleFilledVertical" | "MenuOpenHorizontal" | "MenuOpenVertical" | "MinusCircleFilled" | "Module" | "Module2" | "ModuleThree" | "MoreHoriz" | "MultipleUsers" | "NotificationError" | "NotificationInfo" | "NotificationSuccess" | "NotificationWarning" | "PenCircleFilled" | "Pencil" | "PercentCircle" | "Person" | "Pin" | "Polygon" | "Projects" | "QuestionBubble" | "QuestionCircle" | "QuestionCircleFilled" | "QuestionMark" | "Rectangle" | "RectangleAOI" | "Redo" | "Remove" | "Resolution" | "Satellite" | "Save" | "Scissors" | "Search" | "SelectedIndicator" | "ServerCheck" | "ServerDeny" | "ServerDownload" | "ServerEdit" | "ServerError" | "ServerLock" | "ServerMinus" | "ServerQuestion" | "ServerRefresh" | "ServerSearch" | "ServerSync" | "ServerUpload" | "ServerWarning" | "SettingsCog" | "SettingsCog2" | "SettingsSliderHorizontal" | "SettingsVertical" | "Share" | "ShareNetwork" | "Shield" | "ShieldWithLock" | "ShoppingCartCheck" | "ShoppingCartClose" | "ShoppingCartMinus" | "ShoppingCartOutlined" | "ShoppingCartPlus" | "Storage" | "Support" | "SupportClear" | "SupportHeadphones" | "System" | "Tag" | "TagAlert" | "TagCheck" | "TagDouble" | "TagEdit" | "TagMinus" | "TagPlus" | "TagSearch" | "TagX" | "Target" | "Transaction" | "TrashBin" | "Undo" | "Unlock" | "UpgradeShield" | "Upload" | "UploadCircle" | "User" | "VisibilityOffOutlined" | "VisibilityOutlined" | "WeatherCloud" | "Webhooks" | "Workflow" | "WorkflowPencil" | "ZoomIn" | "ZoomOut" | undefined;
|
|
114
|
+
icon?: "AccessTime" | "Add" | "AddCircleFilled" | "AddPlusCircle" | "AlarmBell" | "AlertCircleFilled" | "AlertTriangle" | "Angle" | "AppWindowCode" | "ArrowBack" | "ArrowBackIos" | "ArrowDownLeft" | "ArrowDownRight" | "ArrowDownward" | "ArrowForward" | "ArrowTopLeft" | "ArrowTopRight" | "ArrowUpward" | "Attachment" | "AutoStoriesOutlined" | "Balance" | "Bin" | "Block" | "Blocked" | "Boxes" | "BoxesGrid" | "Brightness1" | "Calendar" | "CalendarAdd" | "CalendarCheck" | "CalendarDate" | "CalendarEdit" | "CalendarRemove" | "CalendarSearchDate" | "CampaignOutlined" | "CaretCircleFilledDown" | "CaretCircleFilledLeft" | "CaretCircleFilledRight" | "CaretCircleFilledUp" | "Catalog" | "CheckCircle" | "CheckCircleFilled" | "CheckList" | "CheckMark" | "ChevronCircleFilledDown" | "ChevronCircleFilledLeft" | "ChevronCircleFilledRight" | "ChevronCircleFilledUp" | "Close" | "CloseCircle" | "CloseCircleFilled" | "Cloud" | "CloudCheck" | "CloudDownload" | "CloudOff" | "CloudRemove" | "CloudSearch" | "CloudSync" | "CloudUpload" | "CloudWarning" | "Coin" | "CoinEuro" | "Compass" | "ContactSupportOutlined" | "ContentCut" | "ContentPaste" | "Copy" | "Credit" | "Dashboard" | "DataTransferVertical" | "Delivery" | "DollarCoinCircleFilled" | "DottedLines" | "Download" | "DownloadCircle" | "EditPencil" | "EuroCoinCircleFilled" | "ExitLeaveBack" | "ExternalLink" | "EyeCircleFilled" | "FlagQuestion" | "FolderEmpty" | "Footprint" | "HeadphonesQuestion" | "Heart" | "HeartCircleFilled" | "Hyperlink" | "ImageResolution" | "Invoice" | "KeyboardArrowDown" | "KeyboardArrowLeft" | "KeyboardArrowRight" | "KeyboardArrowUp" | "Layers" | "Library" | "Lightbulb" | "LightbulbOutlined" | "LocalOfferOutlined" | "Lock" | "LockCircleFilled" | "LockShield" | "Logo" | "LogoKSA" | "Map" | "MapPin" | "MapSearch" | "Marketplace" | "MarketplaceExternal" | "MenuCircleFilledHorizontal" | "MenuCircleFilledVertical" | "MenuOpenHorizontal" | "MenuOpenVertical" | "MinusCircleFilled" | "Module" | "Module2" | "ModuleThree" | "MoreHoriz" | "MultipleUsers" | "NotificationError" | "NotificationInfo" | "NotificationSuccess" | "NotificationWarning" | "PenCircleFilled" | "Pencil" | "PercentCircle" | "Person" | "Pin" | "Polygon" | "Projects" | "QuestionBubble" | "QuestionCircle" | "QuestionCircleFilled" | "QuestionMark" | "Rectangle" | "RectangleAOI" | "Redo" | "Remove" | "Resolution" | "Satellite" | "Save" | "Scissors" | "Search" | "SelectedIndicator" | "SelectedIndicatorWide" | "ServerCheck" | "ServerDeny" | "ServerDownload" | "ServerEdit" | "ServerError" | "ServerLock" | "ServerMinus" | "ServerQuestion" | "ServerRefresh" | "ServerSearch" | "ServerSync" | "ServerUpload" | "ServerWarning" | "SettingsCog" | "SettingsCog2" | "SettingsSliderHorizontal" | "SettingsVertical" | "Share" | "ShareNetwork" | "Shield" | "ShieldWithLock" | "ShoppingCartCheck" | "ShoppingCartClose" | "ShoppingCartMinus" | "ShoppingCartOutlined" | "ShoppingCartPlus" | "Storage" | "Support" | "SupportClear" | "SupportHeadphones" | "System" | "Tag" | "TagAlert" | "TagCheck" | "TagDouble" | "TagEdit" | "TagMinus" | "TagPlus" | "TagSearch" | "TagX" | "Target" | "Transaction" | "TrashBin" | "Undo" | "Unlock" | "UpgradeShield" | "Upload" | "UploadCircle" | "User" | "VisibilityOffOutlined" | "VisibilityOutlined" | "WeatherCloud" | "Webhooks" | "Workflow" | "WorkflowPencil" | "ZoomIn" | "ZoomOut" | undefined;
|
|
115
115
|
/**
|
|
116
116
|
* Custom styles for the icon anchor button (only applicable if isIconAnchor is true)
|
|
117
117
|
*/
|
|
@@ -141,6 +141,7 @@ export { default as Save } from './Save.svg';
|
|
|
141
141
|
export { default as Scissors } from './Scissors.svg';
|
|
142
142
|
export { default as Search } from './Search.svg';
|
|
143
143
|
export { default as SelectedIndicator } from './SelectedIndicator.svg';
|
|
144
|
+
export { default as SelectedIndicatorWide } from './SelectedIndicatorWide.svg';
|
|
144
145
|
export { default as ServerCheck } from './ServerCheck.svg';
|
|
145
146
|
export { default as ServerDeny } from './ServerDeny.svg';
|
|
146
147
|
export { default as ServerDownload } from './ServerDownload.svg';
|
|
@@ -10,10 +10,10 @@ export { GridContainer, type GridContainerProps, GridItem, type GridItemProps }
|
|
|
10
10
|
export { PageContainer, type PageContainerProps } from './components/PageContainer/PageContainer';
|
|
11
11
|
export { Checkbox, type CheckboxProps } from './components/Checkbox/Checkbox';
|
|
12
12
|
export { FormCheckbox, type FormCheckboxProps } from './components/FormCheckbox/FormCheckbox';
|
|
13
|
-
export { FormDatePicker, type FormDatePickerProps, type
|
|
14
|
-
export { FormDateRangePicker, type FormDateRangePickerProps, } from './components/FormDatePickers/FormDateRangePicker/FormDateRangePicker';
|
|
13
|
+
export { FormDatePicker, type FormDatePickerProps, type FormDatePickerDateType, } from './components/FormDatePickers/FormDatePicker/FormDatePicker';
|
|
14
|
+
export { FormDateRangePicker, type FormDateRangePickerProps, type DateRange, } from './components/FormDatePickers/FormDateRangePicker/FormDateRangePicker';
|
|
15
15
|
export { FormDateTimePicker, type FormDateTimePickerProps, } from './components/FormDatePickers/FormDateTimePicker/FormDateTimePicker';
|
|
16
|
-
export { FormDateRangePickerList, type FormDateRangePickerListProps,
|
|
16
|
+
export { FormDateRangePickerList, type FormDateRangePickerListProps, } from './components/FormDatePickers/FormDateRangePickerList/FormDateRangePickerList';
|
|
17
17
|
export { Radio, type RadioProps } from './components/Radio/Radio';
|
|
18
18
|
export { FormRadio, type FormRadioProps } from './components/FormRadio/FormRadio';
|
|
19
19
|
export { Switch, type SwitchProps } from './components/Switch/Switch';
|
|
@@ -37,6 +37,7 @@ export { CopyButton, type CopyButtonProps } from './components/CopyButton/CopyBu
|
|
|
37
37
|
export { InfoPopover, type InfoPopoverProps } from './components/InfoPopover/InfoPopover';
|
|
38
38
|
export { Popover, type PopoverProps } from './components/Popover/Popover';
|
|
39
39
|
export { PageHeader, type PageHeaderProps } from './components/PageHeader/PageHeader';
|
|
40
|
+
export { PageHeaderV2, type PageHeaderV2Props } from './components/PageHeaderV2/PageHeaderV2';
|
|
40
41
|
export { NotFound, type NotFoundProps } from './components/NotFound/NotFound';
|
|
41
42
|
export { Loading, type LoadingProps } from './components/Loading/Loading';
|
|
42
43
|
export { Icon, type IconProps } from './components/Icon/Icon';
|