@mw-kit/mw-ui 1.7.6 → 1.7.8
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/Calendar/components/Interval/components/Main/styles.d.ts +1 -0
- package/dist/components/Calendar/functions.d.ts +1 -1
- package/dist/components/Input/components/DateIntervalPicker/functions.d.ts +3 -2
- package/dist/components/Input/components/DateIntervalPicker/interfaces.d.ts +5 -3
- package/dist/functions/common.d.ts +1 -0
- package/dist/functions/formatters.d.ts +1 -2
- package/dist/functions/validators.d.ts +6 -1
- package/dist/index.js +209 -161
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +209 -161
- package/dist/index.modern.js.map +1 -1
- package/dist/theme/constants.d.ts +21 -21
- package/package.json +1 -1
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export * from '../../../../styles';
|
|
2
2
|
export declare const CalendarsContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
3
|
+
export declare const LabelContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -2,7 +2,7 @@ import { CalendarInterface } from './components/Basic/interfaces';
|
|
|
2
2
|
export declare const getCalendar: (d: Date) => CalendarInterface;
|
|
3
3
|
export declare const getMiddle: (min?: Date | undefined, max?: Date | undefined) => Date;
|
|
4
4
|
export declare const getFullDate: (date: Date, time: string, end?: true | undefined) => Date;
|
|
5
|
-
export declare const isDateBetween: (date: Date, min?: Date | undefined, max?: Date | undefined
|
|
5
|
+
export declare const isDateBetween: (date: Date, min?: Date | undefined, max?: Date | undefined) => boolean;
|
|
6
6
|
export declare const getTimeFromDate: (date: Date | null) => string;
|
|
7
7
|
export declare const isInvalid: (value: Date | null, time: string, timeOptions?: {
|
|
8
8
|
required?: boolean | undefined;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { Value } from '../../../Calendar/components/Interval/interfaces';
|
|
1
2
|
import { IntervalType, IntervalTypes } from './interfaces';
|
|
2
|
-
export declare const validate: (value:
|
|
3
|
+
export declare const validate: (value: Value, min?: Date, max?: Date) => boolean;
|
|
3
4
|
export declare const intervalTypes: IntervalTypes;
|
|
4
|
-
export declare const identify: (value:
|
|
5
|
+
export declare const identify: (value: Value) => IntervalType;
|
|
5
6
|
export declare const parse: (value: [string, string]) => [Date | null, Date | null];
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { IntervalCalendarProps } from '../../../Calendar/interfaces';
|
|
3
3
|
import { InputProps } from '../Input/interfaces';
|
|
4
|
+
declare type Value = [string, string];
|
|
4
5
|
export declare type IntervalType = 'day' | 'week' | 'month' | 'custom';
|
|
5
6
|
export interface DateIntervalPickerProps extends React.HTMLAttributes<HTMLInputElement>, Pick<InputProps, 'label' | 'invalid' | 'required' | 'disabled' | 'width' | 'borderless' | 'paddingless'> {
|
|
6
7
|
type: 'date-interval-picker';
|
|
7
|
-
value:
|
|
8
|
-
setValue: (value:
|
|
9
|
-
getLabel?: (value:
|
|
8
|
+
value: Value;
|
|
9
|
+
setValue: (value: Value) => void;
|
|
10
|
+
getLabel?: (value: Value) => string;
|
|
10
11
|
max?: Date;
|
|
11
12
|
min?: Date;
|
|
12
13
|
only?: IntervalType;
|
|
@@ -25,3 +26,4 @@ export interface Variation {
|
|
|
25
26
|
export declare type IntervalTypes = {
|
|
26
27
|
[key in IntervalType]: Variation;
|
|
27
28
|
};
|
|
29
|
+
export {};
|
|
@@ -2,3 +2,4 @@ export declare const stripAccents: (value: string) => string;
|
|
|
2
2
|
export declare const isKeyOf: <T>(object: T, key: string | number | symbol) => key is keyof T;
|
|
3
3
|
export declare const isObject: <T = unknown>(value: unknown) => value is T;
|
|
4
4
|
export declare const dateToIsoString: (date: Date, time?: boolean, fullYear?: boolean, pattern?: 'us' | 'br') => string;
|
|
5
|
+
export declare const keys: <T extends Record<string | number | symbol, any>>(value: T) => (keyof T)[];
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { SpacingOrZero, Spacings } from '../interfaces';
|
|
2
|
-
export declare const keys: <T extends Record<string | number | symbol, any>>(value: T) => (keyof T)[];
|
|
3
2
|
export declare const filterObject: <T extends Record<string | number | symbol, any>, R extends Record<string | number | symbol, any>>(object: T, remove: (keyof T)[], inital?: Partial<R>) => R;
|
|
4
3
|
export declare const phone: (value: string) => string;
|
|
5
4
|
export declare const cnpj: (value: string) => string;
|
|
@@ -24,7 +23,7 @@ export declare const getWeekNumber: (value: Date) => [number, number];
|
|
|
24
23
|
export declare const getMonthName: (value: Date) => string;
|
|
25
24
|
export declare const getFirstWeek: (year?: number | undefined) => Date;
|
|
26
25
|
export declare const getLastWeek: (year?: number | undefined) => Date;
|
|
27
|
-
export { stripAccents, dateToIsoString } from './common';
|
|
26
|
+
export { stripAccents, dateToIsoString, keys } from './common';
|
|
28
27
|
export declare const getSpacings: (value: SpacingOrZero | Spacings, defaults?: "s1" | "s2" | "s3" | "s4" | "s5" | "s6" | "0" | Spacings | undefined) => string;
|
|
29
28
|
export declare const clone: <T>(value: T) => T;
|
|
30
29
|
export declare const unique: <T>(value: T[], callback?: (item: T, arr: T[]) => boolean) => T[];
|
|
@@ -8,7 +8,12 @@ export declare const isString: (value: unknown) => value is string;
|
|
|
8
8
|
export declare const isDateInstance: (value: unknown) => value is Date;
|
|
9
9
|
export declare const isDate: (value: unknown) => boolean;
|
|
10
10
|
declare type Operations = 'eq' | 'gt' | 'gte' | 'lt' | 'lte';
|
|
11
|
-
export declare const dateCompare: (a: Date, b: Date, operation: Operations, time?: boolean
|
|
11
|
+
export declare const dateCompare: (a: Date, b: Date, operation: Operations, time?: boolean | Partial<{
|
|
12
|
+
s: true;
|
|
13
|
+
h: true;
|
|
14
|
+
m: true;
|
|
15
|
+
ms: true;
|
|
16
|
+
}>) => boolean;
|
|
12
17
|
declare type Formats = 'h' | 'm' | 's';
|
|
13
18
|
declare type Mode = 'required' | 'optional';
|
|
14
19
|
export declare const isValidTime: (time: string, format?: Partial<{
|