kwant-ui 3.39.3-dev.6 → 3.40.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/Alert/AlertTypes.d.ts +1 -1
- package/dist/components/Alert/AlertUtils.d.ts +1 -0
- package/dist/components/Calendar/CalendarComponents.d.ts +3 -3
- package/dist/components/Calendar/CalendarStyled.d.ts +4 -1
- package/dist/components/Calendar/CalendarTypes.d.ts +3 -1
- package/dist/components/Calendar/CalendarUtils.d.ts +3 -0
- package/dist/components/Datepicker/DatepickerStyled.d.ts +1 -0
- package/dist/components/Datepicker/types.d.ts +7 -1
- package/dist/components/Input/index.d.ts +1 -0
- package/dist/components/Input/types.d.ts +1 -0
- package/dist/components/Toast/Toast.types.d.ts +2 -1
- package/dist/hooks/useToast.d.ts +1 -0
- package/dist/index.es.js +159 -134
- package/dist/index.js +158 -133
- package/dist/package.json +1 -1
- package/dist/public/assets/icons/unsafe.svg +23 -0
- package/dist/themes/colors.ts +5 -0
- package/dist/types/IconTypes.d.ts +1 -1
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.ts +14 -0
- package/package.json +1 -1
- package/themes/colors.ts +5 -0
- package/utils/index.ts +14 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
export declare namespace IAlert {
|
|
3
|
-
type AlertType = 'success' | 'error' | 'warning' | 'info' | 'promise';
|
|
3
|
+
type AlertType = 'success' | 'error' | 'warning' | 'info' | 'promise' | 'alert';
|
|
4
4
|
interface AlertStyled {
|
|
5
5
|
type: AlertType;
|
|
6
6
|
width?: string;
|
|
@@ -15,6 +15,7 @@ export declare const alertIcons: {
|
|
|
15
15
|
error: import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
warning: import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
promise: import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
alert: import("react/jsx-runtime").JSX.Element;
|
|
18
19
|
};
|
|
19
20
|
export declare const switchStyles: (type: IAlert.AlertType, theme: any) => {
|
|
20
21
|
background: any;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { DateObject } from 'react-multi-date-picker';
|
|
2
1
|
import { CalendarTimeBarProps, ICalendar } from './CalendarTypes';
|
|
3
2
|
export type SidebarOptionProps = ICalendar.SidebarOptionProps;
|
|
4
3
|
export declare const SidebarOption: ({ title, selected, onClick }: SidebarOptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
export declare const CalendarSidebar: ({ options, selectedOption, onOptionClick, }: {
|
|
4
|
+
export declare const CalendarSidebar: ({ options, selectedOption, onOptionClick, order, }: {
|
|
6
5
|
options?: Pick<SidebarOptionProps, 'title' | 'selected' | 'value'>[];
|
|
7
6
|
selectedOption: string;
|
|
8
|
-
onOptionClick?: (value:
|
|
7
|
+
onOptionClick?: (value: SidebarOptionProps['value'], option?: Pick<SidebarOptionProps, 'title' | 'selected' | 'value'>) => void;
|
|
8
|
+
order?: number;
|
|
9
9
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export declare const CalendarTimeBar: ({ label, timeHour, timeMinute, clockType, disabled, onClockTypeChange, onHourChange, onMinuteChange, }: CalendarTimeBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export declare const renderDatepickerNavigationButton: (direction: ICalendar.DatpickerNavigationDirection, handleClick: (event: React.MouseEvent<HTMLButtonElement>) => void) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const CalendarWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
-
export declare const CalendarSidebarStyled: import("styled-components").StyledComponent<"div", any, {
|
|
3
|
+
export declare const CalendarSidebarStyled: import("styled-components").StyledComponent<"div", any, {
|
|
4
|
+
order?: number;
|
|
5
|
+
}, never>;
|
|
4
6
|
export declare const CalendarSidebarOptions: import("styled-components").StyledComponent<"button", any, {
|
|
5
7
|
selected?: boolean;
|
|
6
8
|
}, never>;
|
|
@@ -27,6 +29,7 @@ export declare const StyledInput: import("styled-components").StyledComponent<im
|
|
|
27
29
|
variant?: import("../Input/types").InputComponent.InputVariant;
|
|
28
30
|
tooltipContent?: string;
|
|
29
31
|
tooltipPosition?: import("../Tooltip/types").TooltipComponent.Position;
|
|
32
|
+
decimal?: boolean;
|
|
30
33
|
} & import("react").RefAttributes<HTMLInputElement>>, any, {}, never>;
|
|
31
34
|
export declare const Colon: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
32
35
|
export declare const InputGroup: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import dayjs from 'dayjs';
|
|
2
3
|
import { CalendarProps, DateObject } from 'react-multi-date-picker';
|
|
3
4
|
export type RangeDomainUnit = 'd' | 'w' | 'm' | 'y';
|
|
4
5
|
export type RangeDomain = `${number}${RangeDomainUnit}`;
|
|
@@ -33,6 +34,7 @@ export declare namespace ICalendar {
|
|
|
33
34
|
rangeDomain?: RangeDomain;
|
|
34
35
|
onSidebarOptionSelect?: (value: string) => void;
|
|
35
36
|
onChange?: (date: DateObject | DateObject[], selectedOption?: string) => void;
|
|
37
|
+
onChangeDateTime?: (date: dayjs.Dayjs | dayjs.Dayjs[], selectedOption?: string) => void;
|
|
36
38
|
};
|
|
37
39
|
type ClockType = 'am' | 'pm';
|
|
38
40
|
type CalendarTimeBarProps = {
|
|
@@ -52,7 +54,7 @@ export declare namespace ICalendar {
|
|
|
52
54
|
type SidebarOptionProps = {
|
|
53
55
|
title: string;
|
|
54
56
|
selected?: boolean;
|
|
55
|
-
value?: () => DateObject[];
|
|
57
|
+
value?: (() => DateObject[]) | (() => dayjs.Dayjs[]) | string;
|
|
56
58
|
onClick?: () => void;
|
|
57
59
|
};
|
|
58
60
|
type Time = {
|
|
@@ -24,6 +24,9 @@ export declare const CALENDAR_CONSTANTS: {
|
|
|
24
24
|
CUSTOM_RANGE: DateObject[];
|
|
25
25
|
NOW: DateObject[];
|
|
26
26
|
LAST_HOUR: DateObject[];
|
|
27
|
+
LAST_HALF_AN_HOUR: DateObject[];
|
|
28
|
+
LAST_10_MINUTES: DateObject[];
|
|
29
|
+
LAST_5_MINUTES: DateObject[];
|
|
27
30
|
YESTERDAY: DateObject[];
|
|
28
31
|
CUSTOM_RANGE_LOCATION_PLAN: DateObject[];
|
|
29
32
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
declare const DatepickerWrapper: import("styled-components").StyledComponent<"div", any, {
|
|
2
2
|
showTime?: boolean;
|
|
3
|
+
disableTimeRange?: boolean;
|
|
3
4
|
}, never>;
|
|
4
5
|
declare const DatepickerNavigationButton: import("styled-components").StyledComponent<"button", any, {}, never>;
|
|
5
6
|
declare const IconWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { CalendarProps, DatePickerProps } from 'react-multi-date-picker';
|
|
3
3
|
import { InputComponent } from '../Input/types';
|
|
4
|
+
import { SidebarOptionProps } from '../Calendar/CalendarComponents';
|
|
4
5
|
export declare namespace IDatepicker {
|
|
5
6
|
type ClockType = 'am' | 'pm';
|
|
6
7
|
enum ClockTypeEnum {
|
|
@@ -19,7 +20,12 @@ export declare namespace IDatepicker {
|
|
|
19
20
|
dateFormat?: string;
|
|
20
21
|
showTime?: boolean;
|
|
21
22
|
dateTimeRange?: DateRangeType;
|
|
22
|
-
onChangeDateTime?: (time: DateRangeType) => void;
|
|
23
|
+
onChangeDateTime?: (time: DateRangeType, option: string) => void;
|
|
24
|
+
projectDuration?: DateRangeType;
|
|
25
|
+
showSideBar?: boolean;
|
|
26
|
+
sidebarOptions?: Omit<SidebarOptionProps, 'onClick'>[];
|
|
27
|
+
selectedSidebarOption?: string;
|
|
28
|
+
timezone?: string;
|
|
23
29
|
};
|
|
24
30
|
enum DatpickerNavigationDirectionEnum {
|
|
25
31
|
right = "right",
|
|
@@ -22,5 +22,6 @@ declare const Input: import("react").ForwardRefExoticComponent<import("react").I
|
|
|
22
22
|
variant?: InputComponent.InputVariant;
|
|
23
23
|
tooltipContent?: string;
|
|
24
24
|
tooltipPosition?: import("../Tooltip/types").TooltipComponent.Position;
|
|
25
|
+
decimal?: boolean;
|
|
25
26
|
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
26
27
|
export { Input };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
export type GeneralToastType = 'success' | 'error' | 'warning' | 'info';
|
|
2
|
+
export type GeneralToastType = 'success' | 'error' | 'warning' | 'info' | 'alert';
|
|
3
3
|
export type ToastType = GeneralToastType | 'promise';
|
|
4
4
|
export type XAlign = 'left' | 'center' | 'right';
|
|
5
5
|
export type YAlign = 'top' | 'bottom';
|
|
@@ -39,6 +39,7 @@ export interface IToastContext {
|
|
|
39
39
|
warning: GeneralToastFn;
|
|
40
40
|
info: GeneralToastFn;
|
|
41
41
|
promise: PromiseToastFn;
|
|
42
|
+
alert: GeneralToastFn;
|
|
42
43
|
};
|
|
43
44
|
removeToast: (id: string) => void;
|
|
44
45
|
setConfig: (config: Omit<IToastProviderConfig, 'children'>) => void;
|
package/dist/hooks/useToast.d.ts
CHANGED
|
@@ -6,5 +6,6 @@ declare const useToast: (hookConfig?: Omit<IToastProviderConfig, 'children'>) =>
|
|
|
6
6
|
warning: import("../components/Toast/Toast.types").GeneralToastFn;
|
|
7
7
|
info: import("../components/Toast/Toast.types").GeneralToastFn;
|
|
8
8
|
promise: import("../components/Toast/Toast.types").PromiseToastFn;
|
|
9
|
+
alert: import("../components/Toast/Toast.types").GeneralToastFn;
|
|
9
10
|
};
|
|
10
11
|
export { useToast };
|