@alfalab/core-components-calendar-range 7.2.11 → 7.2.12
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/Component-89f0cb07.d.ts +90 -0
- package/Component.desktop-0aa4e915.d.ts +5 -0
- package/Component.js +1 -1
- package/{cssm/Component.responsive-2e2b2125.d.ts → Component.responsive-0aa4e915.d.ts} +3 -4
- package/components/divider/Component.js +1 -1
- package/components/divider/index.css +8 -8
- package/cssm/Component-89f0cb07.d.ts +90 -0
- package/cssm/Component.desktop-0aa4e915.d.ts +5 -0
- package/{modern/Component.responsive-2e2b2125.d.ts → cssm/Component.responsive-0aa4e915.d.ts} +3 -4
- package/cssm/desktop-69921c40.d.ts +2 -0
- package/cssm/index-89f0cb07.d.ts +2 -0
- package/cssm/index-ebda875c.d.ts +1 -2
- package/{esm/typings-9211a437.d.ts → cssm/typings-89f0cb07.d.ts} +5 -7
- package/desktop-69921c40.d.ts +2 -0
- package/esm/Component-89f0cb07.d.ts +90 -0
- package/esm/Component.desktop-0aa4e915.d.ts +5 -0
- package/esm/Component.js +1 -1
- package/{Component.responsive-2e2b2125.d.ts → esm/Component.responsive-0aa4e915.d.ts} +3 -4
- package/esm/components/divider/Component.js +1 -1
- package/esm/components/divider/index.css +8 -8
- package/esm/desktop-69921c40.d.ts +2 -0
- package/esm/index-89f0cb07.d.ts +2 -0
- package/esm/index-ebda875c.d.ts +1 -2
- package/esm/index.js +1 -1
- package/esm/index.module-3f70c4f0.js +4 -0
- package/{cssm/typings-9211a437.d.ts → esm/typings-89f0cb07.d.ts} +5 -7
- package/esm/views/index.css +7 -7
- package/esm/views/popover.js +1 -1
- package/esm/views/static.js +1 -1
- package/index-89f0cb07.d.ts +2 -0
- package/index-ebda875c.d.ts +1 -2
- package/index.js +1 -1
- package/index.module-661eb959.js +6 -0
- package/modern/Component-89f0cb07.d.ts +90 -0
- package/modern/Component.desktop-0aa4e915.d.ts +5 -0
- package/modern/Component.js +1 -1
- package/{esm/Component.responsive-2e2b2125.d.ts → modern/Component.responsive-0aa4e915.d.ts} +3 -4
- package/modern/components/divider/Component.js +1 -1
- package/modern/components/divider/index.css +8 -8
- package/modern/desktop-69921c40.d.ts +2 -0
- package/modern/index-89f0cb07.d.ts +2 -0
- package/modern/index-ebda875c.d.ts +1 -2
- package/modern/index.js +1 -1
- package/modern/index.module-a0384b3f.js +4 -0
- package/modern/{typings-9211a437.d.ts → typings-89f0cb07.d.ts} +5 -7
- package/modern/views/index.css +7 -7
- package/modern/views/popover.js +1 -1
- package/modern/views/static.js +1 -1
- package/package.json +4 -4
- package/{typings-9211a437.d.ts → typings-89f0cb07.d.ts} +5 -7
- package/views/index.css +7 -7
- package/views/popover.js +1 -1
- package/views/static.js +1 -1
- package/Component.desktop-2e2b2125.d.ts +0 -6
- package/cssm/Component.desktop-2e2b2125.d.ts +0 -6
- package/cssm/desktop-63dec22f.d.ts +0 -2
- package/cssm/index-9211a437.d.ts +0 -2
- package/desktop-63dec22f.d.ts +0 -2
- package/esm/Component.desktop-2e2b2125.d.ts +0 -6
- package/esm/desktop-63dec22f.d.ts +0 -2
- package/esm/index-9211a437.d.ts +0 -2
- package/esm/index.module-865e4fdc.js +0 -4
- package/index-9211a437.d.ts +0 -2
- package/index.module-0c5ee619.js +0 -6
- package/modern/Component.desktop-2e2b2125.d.ts +0 -6
- package/modern/desktop-63dec22f.d.ts +0 -2
- package/modern/index-9211a437.d.ts +0 -2
- package/modern/index.module-7f27622d.js +0 -4
- /package/{Component-63dec22f.d.ts → Component-69921c40.d.ts} +0 -0
- /package/cssm/{Component-63dec22f.d.ts → Component-69921c40.d.ts} +0 -0
- /package/esm/{Component-63dec22f.d.ts → Component-69921c40.d.ts} +0 -0
- /package/modern/{Component-63dec22f.d.ts → Component-69921c40.d.ts} +0 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { FC } from "react";
|
|
4
|
+
/* eslint-disable no-plusplus, no-param-reassign */
|
|
5
|
+
import { MaskitoPlugin, MaskitoPostprocessor, MaskitoPreprocessor } from "@maskito/core";
|
|
6
|
+
import { CommonButtonProps, PrivateButtonProps } from "./typings-89f0cb07";
|
|
7
|
+
declare const isClient: () => boolean;
|
|
8
|
+
declare const getDataTestId: (dataTestId?: string, element?: string) => string | undefined;
|
|
9
|
+
type PaddingType = number | string | {
|
|
10
|
+
top?: number;
|
|
11
|
+
right?: number;
|
|
12
|
+
bottom?: number;
|
|
13
|
+
left?: number;
|
|
14
|
+
};
|
|
15
|
+
declare function createPaddingStyle(padding?: PaddingType): undefined | React.CSSProperties;
|
|
16
|
+
declare function easeInOutQuad(x: number): number;
|
|
17
|
+
declare const easingFns: {
|
|
18
|
+
easeInOutQuad: typeof easeInOutQuad;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Возвращает true, если значение равно null или undefined
|
|
22
|
+
*/
|
|
23
|
+
declare function isNil(value: unknown): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Выбор значения между min max границами
|
|
26
|
+
*/
|
|
27
|
+
declare function clamp<T extends Date | number>(value: T, min: T, max: T): T;
|
|
28
|
+
declare function noop(): void;
|
|
29
|
+
declare const fnUtils: {
|
|
30
|
+
clamp: typeof clamp;
|
|
31
|
+
noop: typeof noop;
|
|
32
|
+
isNil: typeof isNil;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Запрещает каретке становиться за указанные границы
|
|
36
|
+
*/
|
|
37
|
+
declare function caretGuard(guard: (value: string, selection: readonly [
|
|
38
|
+
from: number,
|
|
39
|
+
to: number
|
|
40
|
+
]) => [
|
|
41
|
+
from: number,
|
|
42
|
+
to: number
|
|
43
|
+
]): MaskitoPlugin;
|
|
44
|
+
/**
|
|
45
|
+
* Запрещает удалять указанный префикс
|
|
46
|
+
*/
|
|
47
|
+
declare function prefixPostprocessor(prefix: string): MaskitoPostprocessor;
|
|
48
|
+
/**
|
|
49
|
+
* Препроцессор необходим для правильной вставки/автокомплита телефонного номера
|
|
50
|
+
*/
|
|
51
|
+
declare function insertionPhonePreprocessor(mask: Array<string | RegExp>, countryCode?: string, clearableCountryCode?: boolean): MaskitoPreprocessor;
|
|
52
|
+
declare const maskUtils: {
|
|
53
|
+
insertionPhonePreprocessor: typeof insertionPhonePreprocessor;
|
|
54
|
+
prefixPostprocessor: typeof prefixPostprocessor;
|
|
55
|
+
caretGuard: typeof caretGuard;
|
|
56
|
+
};
|
|
57
|
+
type SpinnerProps = {
|
|
58
|
+
/**
|
|
59
|
+
* Управление видимостью компонента
|
|
60
|
+
*/
|
|
61
|
+
visible?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Размер компонента
|
|
64
|
+
*/
|
|
65
|
+
size?: "xs" | "s" | "m";
|
|
66
|
+
/**
|
|
67
|
+
* Дополнительный класс
|
|
68
|
+
*/
|
|
69
|
+
className?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Идентификатор компонента в DOM
|
|
72
|
+
*/
|
|
73
|
+
id?: string;
|
|
74
|
+
/**
|
|
75
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
76
|
+
*/
|
|
77
|
+
dataTestId?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Палитра, в контексте которой используется спиннер
|
|
80
|
+
*/
|
|
81
|
+
colors?: "default" | "inverted";
|
|
82
|
+
};
|
|
83
|
+
declare const Spinner: FC<SpinnerProps>;
|
|
84
|
+
/**
|
|
85
|
+
* Минимальное время отображения лоадера - 500мс,
|
|
86
|
+
* чтобы при быстрых ответах от сервера кнопка не «моргала».
|
|
87
|
+
*/
|
|
88
|
+
declare const LOADER_MIN_DISPLAY_INTERVAL = 500;
|
|
89
|
+
declare const BaseButton: React.ForwardRefExoticComponent<(CommonButtonProps & PrivateButtonProps) & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
90
|
+
export { isClient, getDataTestId, createPaddingStyle, easingFns, fnUtils, maskUtils, SpinnerProps, Spinner, LOADER_MIN_DISPLAY_INTERVAL, BaseButton };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { CommonButtonProps } from "./typings-89f0cb07";
|
|
4
|
+
declare const ButtonDesktop: React.ForwardRefExoticComponent<CommonButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
5
|
+
export { ButtonDesktop };
|
package/Component.js
CHANGED
|
@@ -19,7 +19,7 @@ require('date-fns/isEqual');
|
|
|
19
19
|
require('date-fns/max');
|
|
20
20
|
require('date-fns/min');
|
|
21
21
|
require('date-fns/subMonths');
|
|
22
|
-
require('./index.module-
|
|
22
|
+
require('./index.module-661eb959.js');
|
|
23
23
|
require('date-fns/endOfMonth');
|
|
24
24
|
require('date-fns/isSameMonth');
|
|
25
25
|
require('@alfalab/core-components-calendar/desktop');
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { FC, ReactNode } from "react";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
declare const ButtonMobile: React.ForwardRefExoticComponent<ButtonMobileProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
4
|
+
import { CommonButtonProps, ButtonProps } from "./typings-89f0cb07";
|
|
5
|
+
declare const ButtonMobile: React.ForwardRefExoticComponent<CommonButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
7
6
|
type MqProps = {
|
|
8
7
|
/**
|
|
9
8
|
* Media выражение или кастомный запрос из `mq.json`, например `--mobile`.
|
|
@@ -65,4 +64,4 @@ declare const _exports: {
|
|
|
65
64
|
"--desktop": string;
|
|
66
65
|
};
|
|
67
66
|
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
68
|
-
export { _exports as default,
|
|
67
|
+
export { _exports as default, ButtonMobile, MqProps, Mq, useMatchMedia, getMatchMedia, releaseMatchMedia, isPointerEventsSupported, isTouchSupported, Button };
|
|
@@ -10,7 +10,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
10
10
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
11
11
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
12
12
|
|
|
13
|
-
var styles = {"component":"calendar-
|
|
13
|
+
var styles = {"component":"calendar-range__component_yceni","outer":"calendar-range__outer_yceni","s":"calendar-range__s_yceni","m":"calendar-range__m_yceni","l":"calendar-range__l_yceni","xl":"calendar-range__xl_yceni"};
|
|
14
14
|
require('./index.css')
|
|
15
15
|
|
|
16
16
|
var Divider = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 4vum2 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-graphic-primary: #0e0e0e; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -41,29 +41,29 @@
|
|
|
41
41
|
/* disabled */
|
|
42
42
|
|
|
43
43
|
/* marker */
|
|
44
|
-
} .calendar-
|
|
44
|
+
} .calendar-range__component_yceni {
|
|
45
45
|
display: flex;
|
|
46
46
|
align-items: center;
|
|
47
47
|
justify-content: center;
|
|
48
48
|
width: 16px;
|
|
49
49
|
margin: 0 var(--gap-xs)
|
|
50
|
-
} .calendar-
|
|
50
|
+
} .calendar-range__component_yceni:after {
|
|
51
51
|
content: '';
|
|
52
52
|
display: block;
|
|
53
53
|
width: 100%;
|
|
54
54
|
height: 1px;
|
|
55
55
|
background-color: var(--color-light-graphic-primary);
|
|
56
|
-
} .calendar-
|
|
56
|
+
} .calendar-range__outer_yceni {
|
|
57
57
|
position: relative;
|
|
58
58
|
|
|
59
59
|
/* FormControl .above height + margin-bottom */
|
|
60
60
|
top: 24px;
|
|
61
|
-
} .calendar-
|
|
61
|
+
} .calendar-range__s_yceni {
|
|
62
62
|
height: var(--size-s-height);
|
|
63
|
-
} .calendar-
|
|
63
|
+
} .calendar-range__m_yceni {
|
|
64
64
|
height: var(--size-m-height);
|
|
65
|
-
} .calendar-
|
|
65
|
+
} .calendar-range__l_yceni {
|
|
66
66
|
height: var(--size-l-height);
|
|
67
|
-
} .calendar-
|
|
67
|
+
} .calendar-range__xl_yceni {
|
|
68
68
|
height: var(--size-xl-height);
|
|
69
69
|
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { FC } from "react";
|
|
4
|
+
/* eslint-disable no-plusplus, no-param-reassign */
|
|
5
|
+
import { MaskitoPlugin, MaskitoPostprocessor, MaskitoPreprocessor } from "@maskito/core";
|
|
6
|
+
import { CommonButtonProps, PrivateButtonProps } from "./typings-89f0cb07";
|
|
7
|
+
declare const isClient: () => boolean;
|
|
8
|
+
declare const getDataTestId: (dataTestId?: string, element?: string) => string | undefined;
|
|
9
|
+
type PaddingType = number | string | {
|
|
10
|
+
top?: number;
|
|
11
|
+
right?: number;
|
|
12
|
+
bottom?: number;
|
|
13
|
+
left?: number;
|
|
14
|
+
};
|
|
15
|
+
declare function createPaddingStyle(padding?: PaddingType): undefined | React.CSSProperties;
|
|
16
|
+
declare function easeInOutQuad(x: number): number;
|
|
17
|
+
declare const easingFns: {
|
|
18
|
+
easeInOutQuad: typeof easeInOutQuad;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Возвращает true, если значение равно null или undefined
|
|
22
|
+
*/
|
|
23
|
+
declare function isNil(value: unknown): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Выбор значения между min max границами
|
|
26
|
+
*/
|
|
27
|
+
declare function clamp<T extends Date | number>(value: T, min: T, max: T): T;
|
|
28
|
+
declare function noop(): void;
|
|
29
|
+
declare const fnUtils: {
|
|
30
|
+
clamp: typeof clamp;
|
|
31
|
+
noop: typeof noop;
|
|
32
|
+
isNil: typeof isNil;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Запрещает каретке становиться за указанные границы
|
|
36
|
+
*/
|
|
37
|
+
declare function caretGuard(guard: (value: string, selection: readonly [
|
|
38
|
+
from: number,
|
|
39
|
+
to: number
|
|
40
|
+
]) => [
|
|
41
|
+
from: number,
|
|
42
|
+
to: number
|
|
43
|
+
]): MaskitoPlugin;
|
|
44
|
+
/**
|
|
45
|
+
* Запрещает удалять указанный префикс
|
|
46
|
+
*/
|
|
47
|
+
declare function prefixPostprocessor(prefix: string): MaskitoPostprocessor;
|
|
48
|
+
/**
|
|
49
|
+
* Препроцессор необходим для правильной вставки/автокомплита телефонного номера
|
|
50
|
+
*/
|
|
51
|
+
declare function insertionPhonePreprocessor(mask: Array<string | RegExp>, countryCode?: string, clearableCountryCode?: boolean): MaskitoPreprocessor;
|
|
52
|
+
declare const maskUtils: {
|
|
53
|
+
insertionPhonePreprocessor: typeof insertionPhonePreprocessor;
|
|
54
|
+
prefixPostprocessor: typeof prefixPostprocessor;
|
|
55
|
+
caretGuard: typeof caretGuard;
|
|
56
|
+
};
|
|
57
|
+
type SpinnerProps = {
|
|
58
|
+
/**
|
|
59
|
+
* Управление видимостью компонента
|
|
60
|
+
*/
|
|
61
|
+
visible?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Размер компонента
|
|
64
|
+
*/
|
|
65
|
+
size?: "xs" | "s" | "m";
|
|
66
|
+
/**
|
|
67
|
+
* Дополнительный класс
|
|
68
|
+
*/
|
|
69
|
+
className?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Идентификатор компонента в DOM
|
|
72
|
+
*/
|
|
73
|
+
id?: string;
|
|
74
|
+
/**
|
|
75
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
76
|
+
*/
|
|
77
|
+
dataTestId?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Палитра, в контексте которой используется спиннер
|
|
80
|
+
*/
|
|
81
|
+
colors?: "default" | "inverted";
|
|
82
|
+
};
|
|
83
|
+
declare const Spinner: FC<SpinnerProps>;
|
|
84
|
+
/**
|
|
85
|
+
* Минимальное время отображения лоадера - 500мс,
|
|
86
|
+
* чтобы при быстрых ответах от сервера кнопка не «моргала».
|
|
87
|
+
*/
|
|
88
|
+
declare const LOADER_MIN_DISPLAY_INTERVAL = 500;
|
|
89
|
+
declare const BaseButton: React.ForwardRefExoticComponent<(CommonButtonProps & PrivateButtonProps) & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
90
|
+
export { isClient, getDataTestId, createPaddingStyle, easingFns, fnUtils, maskUtils, SpinnerProps, Spinner, LOADER_MIN_DISPLAY_INTERVAL, BaseButton };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { CommonButtonProps } from "./typings-89f0cb07";
|
|
4
|
+
declare const ButtonDesktop: React.ForwardRefExoticComponent<CommonButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
5
|
+
export { ButtonDesktop };
|
package/{modern/Component.responsive-2e2b2125.d.ts → cssm/Component.responsive-0aa4e915.d.ts}
RENAMED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { FC, ReactNode } from "react";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
declare const ButtonMobile: React.ForwardRefExoticComponent<ButtonMobileProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
4
|
+
import { CommonButtonProps, ButtonProps } from "./typings-89f0cb07";
|
|
5
|
+
declare const ButtonMobile: React.ForwardRefExoticComponent<CommonButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
7
6
|
type MqProps = {
|
|
8
7
|
/**
|
|
9
8
|
* Media выражение или кастомный запрос из `mq.json`, например `--mobile`.
|
|
@@ -65,4 +64,4 @@ declare const _exports: {
|
|
|
65
64
|
"--desktop": string;
|
|
66
65
|
};
|
|
67
66
|
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
68
|
-
export { _exports as default,
|
|
67
|
+
export { _exports as default, ButtonMobile, MqProps, Mq, useMatchMedia, getMatchMedia, releaseMatchMedia, isPointerEventsSupported, isTouchSupported, Button };
|
package/cssm/index-ebda875c.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export * from "./Component-63dec22f";
|
|
1
|
+
export * from "./Component-69921c40";
|
|
@@ -69,6 +69,8 @@ type ComponentProps = {
|
|
|
69
69
|
* Дочерние элементы.
|
|
70
70
|
*/
|
|
71
71
|
children?: ReactNode;
|
|
72
|
+
};
|
|
73
|
+
type PrivateButtonProps = {
|
|
72
74
|
/**
|
|
73
75
|
* Основные стили компонента.
|
|
74
76
|
*/
|
|
@@ -80,16 +82,12 @@ type ComponentProps = {
|
|
|
80
82
|
*/
|
|
81
83
|
colorStylesMap: StyleColors;
|
|
82
84
|
};
|
|
83
|
-
type
|
|
84
|
-
type
|
|
85
|
-
type BaseButtonProps = Partial<AnchorBaseButtonProps | NativeBaseButtonProps>;
|
|
86
|
-
type AnchorButtonProps = Omit<BaseButtonProps, 'styles' | 'colorStylesMap'> & AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
87
|
-
type NativeButtonProps = Omit<BaseButtonProps, 'styles' | 'colorStylesMap'> & ButtonHTMLAttributes<HTMLButtonElement>;
|
|
88
|
-
type ButtonProps = Partial<AnchorButtonProps | NativeButtonProps> & {
|
|
85
|
+
type CommonButtonProps = ComponentProps & Partial<AnchorHTMLAttributes<HTMLAnchorElement> | ButtonHTMLAttributes<HTMLButtonElement>>;
|
|
86
|
+
type ButtonProps = CommonButtonProps & {
|
|
89
87
|
/**
|
|
90
88
|
* Контрольная точка, с нее начинается desktop версия
|
|
91
89
|
* @default 1024
|
|
92
90
|
*/
|
|
93
91
|
breakpoint?: number;
|
|
94
92
|
};
|
|
95
|
-
export { StyleColors, ComponentProps,
|
|
93
|
+
export { StyleColors, ComponentProps, PrivateButtonProps, CommonButtonProps, ButtonProps };
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { FC } from "react";
|
|
4
|
+
/* eslint-disable no-plusplus, no-param-reassign */
|
|
5
|
+
import { MaskitoPlugin, MaskitoPostprocessor, MaskitoPreprocessor } from "@maskito/core";
|
|
6
|
+
import { CommonButtonProps, PrivateButtonProps } from "./typings-89f0cb07";
|
|
7
|
+
declare const isClient: () => boolean;
|
|
8
|
+
declare const getDataTestId: (dataTestId?: string, element?: string) => string | undefined;
|
|
9
|
+
type PaddingType = number | string | {
|
|
10
|
+
top?: number;
|
|
11
|
+
right?: number;
|
|
12
|
+
bottom?: number;
|
|
13
|
+
left?: number;
|
|
14
|
+
};
|
|
15
|
+
declare function createPaddingStyle(padding?: PaddingType): undefined | React.CSSProperties;
|
|
16
|
+
declare function easeInOutQuad(x: number): number;
|
|
17
|
+
declare const easingFns: {
|
|
18
|
+
easeInOutQuad: typeof easeInOutQuad;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Возвращает true, если значение равно null или undefined
|
|
22
|
+
*/
|
|
23
|
+
declare function isNil(value: unknown): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Выбор значения между min max границами
|
|
26
|
+
*/
|
|
27
|
+
declare function clamp<T extends Date | number>(value: T, min: T, max: T): T;
|
|
28
|
+
declare function noop(): void;
|
|
29
|
+
declare const fnUtils: {
|
|
30
|
+
clamp: typeof clamp;
|
|
31
|
+
noop: typeof noop;
|
|
32
|
+
isNil: typeof isNil;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Запрещает каретке становиться за указанные границы
|
|
36
|
+
*/
|
|
37
|
+
declare function caretGuard(guard: (value: string, selection: readonly [
|
|
38
|
+
from: number,
|
|
39
|
+
to: number
|
|
40
|
+
]) => [
|
|
41
|
+
from: number,
|
|
42
|
+
to: number
|
|
43
|
+
]): MaskitoPlugin;
|
|
44
|
+
/**
|
|
45
|
+
* Запрещает удалять указанный префикс
|
|
46
|
+
*/
|
|
47
|
+
declare function prefixPostprocessor(prefix: string): MaskitoPostprocessor;
|
|
48
|
+
/**
|
|
49
|
+
* Препроцессор необходим для правильной вставки/автокомплита телефонного номера
|
|
50
|
+
*/
|
|
51
|
+
declare function insertionPhonePreprocessor(mask: Array<string | RegExp>, countryCode?: string, clearableCountryCode?: boolean): MaskitoPreprocessor;
|
|
52
|
+
declare const maskUtils: {
|
|
53
|
+
insertionPhonePreprocessor: typeof insertionPhonePreprocessor;
|
|
54
|
+
prefixPostprocessor: typeof prefixPostprocessor;
|
|
55
|
+
caretGuard: typeof caretGuard;
|
|
56
|
+
};
|
|
57
|
+
type SpinnerProps = {
|
|
58
|
+
/**
|
|
59
|
+
* Управление видимостью компонента
|
|
60
|
+
*/
|
|
61
|
+
visible?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Размер компонента
|
|
64
|
+
*/
|
|
65
|
+
size?: "xs" | "s" | "m";
|
|
66
|
+
/**
|
|
67
|
+
* Дополнительный класс
|
|
68
|
+
*/
|
|
69
|
+
className?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Идентификатор компонента в DOM
|
|
72
|
+
*/
|
|
73
|
+
id?: string;
|
|
74
|
+
/**
|
|
75
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
76
|
+
*/
|
|
77
|
+
dataTestId?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Палитра, в контексте которой используется спиннер
|
|
80
|
+
*/
|
|
81
|
+
colors?: "default" | "inverted";
|
|
82
|
+
};
|
|
83
|
+
declare const Spinner: FC<SpinnerProps>;
|
|
84
|
+
/**
|
|
85
|
+
* Минимальное время отображения лоадера - 500мс,
|
|
86
|
+
* чтобы при быстрых ответах от сервера кнопка не «моргала».
|
|
87
|
+
*/
|
|
88
|
+
declare const LOADER_MIN_DISPLAY_INTERVAL = 500;
|
|
89
|
+
declare const BaseButton: React.ForwardRefExoticComponent<(CommonButtonProps & PrivateButtonProps) & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
90
|
+
export { isClient, getDataTestId, createPaddingStyle, easingFns, fnUtils, maskUtils, SpinnerProps, Spinner, LOADER_MIN_DISPLAY_INTERVAL, BaseButton };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { CommonButtonProps } from "./typings-89f0cb07";
|
|
4
|
+
declare const ButtonDesktop: React.ForwardRefExoticComponent<CommonButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
5
|
+
export { ButtonDesktop };
|
package/esm/Component.js
CHANGED
|
@@ -15,7 +15,7 @@ import 'date-fns/isEqual';
|
|
|
15
15
|
import 'date-fns/max';
|
|
16
16
|
import 'date-fns/min';
|
|
17
17
|
import 'date-fns/subMonths';
|
|
18
|
-
import './index.module-
|
|
18
|
+
import './index.module-3f70c4f0.js';
|
|
19
19
|
import 'date-fns/endOfMonth';
|
|
20
20
|
import 'date-fns/isSameMonth';
|
|
21
21
|
import '@alfalab/core-components-calendar/esm/desktop';
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { FC, ReactNode } from "react";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
declare const ButtonMobile: React.ForwardRefExoticComponent<ButtonMobileProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
4
|
+
import { CommonButtonProps, ButtonProps } from "./typings-89f0cb07";
|
|
5
|
+
declare const ButtonMobile: React.ForwardRefExoticComponent<CommonButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
7
6
|
type MqProps = {
|
|
8
7
|
/**
|
|
9
8
|
* Media выражение или кастомный запрос из `mq.json`, например `--mobile`.
|
|
@@ -65,4 +64,4 @@ declare const _exports: {
|
|
|
65
64
|
"--desktop": string;
|
|
66
65
|
};
|
|
67
66
|
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
68
|
-
export { _exports as default,
|
|
67
|
+
export { _exports as default, ButtonMobile, MqProps, Mq, useMatchMedia, getMatchMedia, releaseMatchMedia, isPointerEventsSupported, isTouchSupported, Button };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
|
|
4
|
-
var styles = {"component":"calendar-
|
|
4
|
+
var styles = {"component":"calendar-range__component_yceni","outer":"calendar-range__outer_yceni","s":"calendar-range__s_yceni","m":"calendar-range__m_yceni","l":"calendar-range__l_yceni","xl":"calendar-range__xl_yceni"};
|
|
5
5
|
require('./index.css')
|
|
6
6
|
|
|
7
7
|
var Divider = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 4vum2 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-graphic-primary: #0e0e0e; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -41,29 +41,29 @@
|
|
|
41
41
|
/* disabled */
|
|
42
42
|
|
|
43
43
|
/* marker */
|
|
44
|
-
} .calendar-
|
|
44
|
+
} .calendar-range__component_yceni {
|
|
45
45
|
display: flex;
|
|
46
46
|
align-items: center;
|
|
47
47
|
justify-content: center;
|
|
48
48
|
width: 16px;
|
|
49
49
|
margin: 0 var(--gap-xs)
|
|
50
|
-
} .calendar-
|
|
50
|
+
} .calendar-range__component_yceni:after {
|
|
51
51
|
content: '';
|
|
52
52
|
display: block;
|
|
53
53
|
width: 100%;
|
|
54
54
|
height: 1px;
|
|
55
55
|
background-color: var(--color-light-graphic-primary);
|
|
56
|
-
} .calendar-
|
|
56
|
+
} .calendar-range__outer_yceni {
|
|
57
57
|
position: relative;
|
|
58
58
|
|
|
59
59
|
/* FormControl .above height + margin-bottom */
|
|
60
60
|
top: 24px;
|
|
61
|
-
} .calendar-
|
|
61
|
+
} .calendar-range__s_yceni {
|
|
62
62
|
height: var(--size-s-height);
|
|
63
|
-
} .calendar-
|
|
63
|
+
} .calendar-range__m_yceni {
|
|
64
64
|
height: var(--size-m-height);
|
|
65
|
-
} .calendar-
|
|
65
|
+
} .calendar-range__l_yceni {
|
|
66
66
|
height: var(--size-l-height);
|
|
67
|
-
} .calendar-
|
|
67
|
+
} .calendar-range__xl_yceni {
|
|
68
68
|
height: var(--size-xl-height);
|
|
69
69
|
}
|
package/esm/index-ebda875c.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export * from "./Component-63dec22f";
|
|
1
|
+
export * from "./Component-69921c40";
|
package/esm/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import 'date-fns/isEqual';
|
|
|
15
15
|
import 'date-fns/max';
|
|
16
16
|
import 'date-fns/min';
|
|
17
17
|
import 'date-fns/subMonths';
|
|
18
|
-
import './index.module-
|
|
18
|
+
import './index.module-3f70c4f0.js';
|
|
19
19
|
import './views/static.js';
|
|
20
20
|
import 'date-fns/endOfMonth';
|
|
21
21
|
import 'date-fns/isSameMonth';
|
|
@@ -69,6 +69,8 @@ type ComponentProps = {
|
|
|
69
69
|
* Дочерние элементы.
|
|
70
70
|
*/
|
|
71
71
|
children?: ReactNode;
|
|
72
|
+
};
|
|
73
|
+
type PrivateButtonProps = {
|
|
72
74
|
/**
|
|
73
75
|
* Основные стили компонента.
|
|
74
76
|
*/
|
|
@@ -80,16 +82,12 @@ type ComponentProps = {
|
|
|
80
82
|
*/
|
|
81
83
|
colorStylesMap: StyleColors;
|
|
82
84
|
};
|
|
83
|
-
type
|
|
84
|
-
type
|
|
85
|
-
type BaseButtonProps = Partial<AnchorBaseButtonProps | NativeBaseButtonProps>;
|
|
86
|
-
type AnchorButtonProps = Omit<BaseButtonProps, 'styles' | 'colorStylesMap'> & AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
87
|
-
type NativeButtonProps = Omit<BaseButtonProps, 'styles' | 'colorStylesMap'> & ButtonHTMLAttributes<HTMLButtonElement>;
|
|
88
|
-
type ButtonProps = Partial<AnchorButtonProps | NativeButtonProps> & {
|
|
85
|
+
type CommonButtonProps = ComponentProps & Partial<AnchorHTMLAttributes<HTMLAnchorElement> | ButtonHTMLAttributes<HTMLButtonElement>>;
|
|
86
|
+
type ButtonProps = CommonButtonProps & {
|
|
89
87
|
/**
|
|
90
88
|
* Контрольная точка, с нее начинается desktop версия
|
|
91
89
|
* @default 1024
|
|
92
90
|
*/
|
|
93
91
|
breakpoint?: number;
|
|
94
92
|
};
|
|
95
|
-
export { StyleColors, ComponentProps,
|
|
93
|
+
export { StyleColors, ComponentProps, PrivateButtonProps, CommonButtonProps, ButtonProps };
|
package/esm/views/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1nceq */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -38,16 +38,16 @@
|
|
|
38
38
|
/* disabled */
|
|
39
39
|
|
|
40
40
|
/* marker */
|
|
41
|
-
} .calendar-
|
|
41
|
+
} .calendar-range__component_1udcx {
|
|
42
42
|
display: flex
|
|
43
|
-
} .calendar-
|
|
43
|
+
} .calendar-range__component_1udcx button[aria-selected='true'] {
|
|
44
44
|
cursor: pointer;
|
|
45
|
-
} .calendar-
|
|
45
|
+
} .calendar-range__component_1udcx *[class*='errorIcon_'] {
|
|
46
46
|
display: none;
|
|
47
|
-
} .calendar-
|
|
47
|
+
} .calendar-range__component_1udcx *[class*='calendarIcon_'] {
|
|
48
48
|
margin-right: 0;
|
|
49
|
-
} .calendar-
|
|
49
|
+
} .calendar-range__static_1udcx .calendar-range__calendar_1udcx {
|
|
50
50
|
width: var(--calendar-inner-width)
|
|
51
|
-
} .calendar-
|
|
51
|
+
} .calendar-range__static_1udcx .calendar-range__calendar_1udcx > div:first-child {
|
|
52
52
|
padding: var(--gap-m) 0 var(--gap-s);
|
|
53
53
|
}
|
package/esm/views/popover.js
CHANGED
|
@@ -8,7 +8,7 @@ import { isCompleteDateInput } from '@alfalab/core-components-date-input/esm';
|
|
|
8
8
|
import { useDidUpdateEffect } from '@alfalab/hooks';
|
|
9
9
|
import { Divider } from '../components/divider/Component.js';
|
|
10
10
|
import { usePopoverViewMonthes } from '../hooks.js';
|
|
11
|
-
import { s as styles } from '../index.module-
|
|
11
|
+
import { s as styles } from '../index.module-3f70c4f0.js';
|
|
12
12
|
import 'date-fns/addMonths';
|
|
13
13
|
import 'date-fns/isEqual';
|
|
14
14
|
import 'date-fns/max';
|
package/esm/views/static.js
CHANGED
|
@@ -14,7 +14,7 @@ import { isCompleteDateInput, DateInput } from '@alfalab/core-components-date-in
|
|
|
14
14
|
import { Divider } from '../components/divider/Component.js';
|
|
15
15
|
import { useStaticViewMonthes, useSelectionProps } from '../hooks.js';
|
|
16
16
|
import { isDayButton } from '../utils.js';
|
|
17
|
-
import { s as styles } from '../index.module-
|
|
17
|
+
import { s as styles } from '../index.module-3f70c4f0.js';
|
|
18
18
|
import 'date-fns/isEqual';
|
|
19
19
|
import 'date-fns/min';
|
|
20
20
|
|