@alfalab/core-components-slider-input 11.0.4 → 11.0.5-alfasans
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.d.ts +23 -23
- package/cssm/Component.d.ts +23 -23
- package/cssm/index.module.css +9 -5
- package/cssm/types/propTypes.d.ts +2 -2
- package/esm/Component.d.ts +23 -23
- package/esm/index.css +35 -31
- package/esm/index.module.css.js +1 -1
- package/esm/index.module.css.js.map +1 -1
- package/esm/types/propTypes.d.ts +2 -2
- package/index.css +35 -31
- package/index.module.css.js +1 -1
- package/index.module.css.js.map +1 -1
- package/modern/Component.d.ts +23 -23
- package/modern/index.css +35 -31
- package/modern/index.module.css.js +1 -1
- package/modern/index.module.css.js.map +1 -1
- package/modern/types/propTypes.d.ts +2 -2
- package/moderncssm/Component.d.ts +23 -23
- package/moderncssm/index.module.css +6 -3
- package/moderncssm/types/propTypes.d.ts +2 -2
- package/package.json +5 -5
- package/src/index.module.css +1 -1
- package/types/propTypes.d.ts +2 -2
|
@@ -2,7 +2,7 @@ import React, { type ComponentType, type ReactNode } from 'react';
|
|
|
2
2
|
import { type InputProps } from '@alfalab/core-components-input/moderncssm';
|
|
3
3
|
import { type SliderProps } from '@alfalab/core-components-slider/moderncssm';
|
|
4
4
|
import { type OnChangeType, type OnInputChangeType } from './types/propTypes';
|
|
5
|
-
export
|
|
5
|
+
export type SliderInputProps = Omit<InputProps, 'min' | 'max' | 'step' | 'value' | 'type' | 'onChange' | 'bottomAddons' | 'size'> & {
|
|
6
6
|
/**
|
|
7
7
|
* Размер компонента
|
|
8
8
|
* @description s, m, l, xl deprecated, используйте вместо них 48, 56, 64, 72 соответственно
|
|
@@ -103,41 +103,41 @@ export declare const SliderInput: React.ForwardRefExoticComponent<Omit<InputProp
|
|
|
103
103
|
* Размер компонента
|
|
104
104
|
* @description s, m, l, xl deprecated, используйте вместо них 48, 56, 64, 72 соответственно
|
|
105
105
|
*/
|
|
106
|
-
size?: Exclude<InputProps[
|
|
106
|
+
size?: Exclude<InputProps["size"], 40>;
|
|
107
107
|
/**
|
|
108
108
|
* Мин. допустимое число
|
|
109
109
|
*/
|
|
110
|
-
min?: number
|
|
110
|
+
min?: number;
|
|
111
111
|
/**
|
|
112
112
|
* Макс. допустимое число
|
|
113
113
|
*/
|
|
114
|
-
max?: number
|
|
114
|
+
max?: number;
|
|
115
115
|
/**
|
|
116
116
|
* Массив подписей к слайдеру
|
|
117
117
|
*/
|
|
118
|
-
steps?:
|
|
118
|
+
steps?: ReactNode[];
|
|
119
119
|
/**
|
|
120
120
|
* Шаг (должен нацело делить отрезок между мин и макс)
|
|
121
121
|
*/
|
|
122
|
-
step?: number
|
|
122
|
+
step?: number;
|
|
123
123
|
/**
|
|
124
124
|
* Отображение подписей
|
|
125
125
|
* https://refreshless.com/nouislider/pips/
|
|
126
126
|
*/
|
|
127
|
-
pips?: SliderProps[
|
|
127
|
+
pips?: SliderProps["pips"];
|
|
128
128
|
/**
|
|
129
129
|
* Настройка шагов
|
|
130
130
|
* https://refreshless.com/nouislider/pips/#section-range
|
|
131
131
|
*/
|
|
132
|
-
range?: SliderProps[
|
|
132
|
+
range?: SliderProps["range"];
|
|
133
133
|
/**
|
|
134
134
|
* Значение инпута
|
|
135
135
|
*/
|
|
136
|
-
value?:
|
|
136
|
+
value?: number | string;
|
|
137
137
|
/**
|
|
138
138
|
* Значение слайдера
|
|
139
139
|
*/
|
|
140
|
-
sliderValue?: number
|
|
140
|
+
sliderValue?: number;
|
|
141
141
|
/**
|
|
142
142
|
* Дополнительная информация в правой части поля
|
|
143
143
|
*/
|
|
@@ -145,52 +145,52 @@ export declare const SliderInput: React.ForwardRefExoticComponent<Omit<InputProp
|
|
|
145
145
|
/**
|
|
146
146
|
* Компонент поля ввода
|
|
147
147
|
*/
|
|
148
|
-
Input?:
|
|
148
|
+
Input?: ComponentType<Omit<InputProps, "onChange" | "value" | "defaultValue">>;
|
|
149
149
|
/**
|
|
150
150
|
* Кастомные пропсы для поля ввода
|
|
151
151
|
*/
|
|
152
|
-
customInputProps?: Record<string, unknown
|
|
152
|
+
customInputProps?: Record<string, unknown>;
|
|
153
153
|
/**
|
|
154
154
|
* Класс для инпута
|
|
155
155
|
*/
|
|
156
|
-
inputClassName?: string
|
|
156
|
+
inputClassName?: string;
|
|
157
157
|
/**
|
|
158
158
|
* Класс для слайдера
|
|
159
159
|
*/
|
|
160
|
-
sliderClassName?: string
|
|
160
|
+
sliderClassName?: string;
|
|
161
161
|
/**
|
|
162
162
|
* Класс для шагов
|
|
163
163
|
*/
|
|
164
|
-
stepsClassName?: string
|
|
164
|
+
stepsClassName?: string;
|
|
165
165
|
/**
|
|
166
166
|
* Обработчик изменения значения через слайдер или поле ввода
|
|
167
167
|
*/
|
|
168
|
-
onChange?: OnChangeType
|
|
168
|
+
onChange?: OnChangeType;
|
|
169
169
|
/**
|
|
170
170
|
* Обработчик ввода
|
|
171
171
|
*/
|
|
172
|
-
onInputChange?: OnInputChangeType
|
|
172
|
+
onInputChange?: OnInputChangeType;
|
|
173
173
|
/**
|
|
174
174
|
* Обработчик изменения слайдера
|
|
175
175
|
*/
|
|
176
|
-
onSliderChange?: (
|
|
176
|
+
onSliderChange?: (payload: {
|
|
177
177
|
value: number;
|
|
178
|
-
}) => void
|
|
178
|
+
}) => void;
|
|
179
179
|
/**
|
|
180
180
|
* Обработчик начала перетаскивания ползунка
|
|
181
181
|
*/
|
|
182
|
-
onSliderStart?: SliderProps[
|
|
182
|
+
onSliderStart?: SliderProps["onStart"];
|
|
183
183
|
/**
|
|
184
184
|
* Обработчик окончания перетаскивания ползунка
|
|
185
185
|
*/
|
|
186
|
-
onSliderEnd?: SliderProps[
|
|
186
|
+
onSliderEnd?: SliderProps["onEnd"];
|
|
187
187
|
/**
|
|
188
188
|
* Идентификатор для систем автоматизированного тестирования
|
|
189
189
|
*/
|
|
190
|
-
dataTestId?: string
|
|
190
|
+
dataTestId?: string;
|
|
191
191
|
/**
|
|
192
192
|
* Жирность текста
|
|
193
193
|
* @default true
|
|
194
194
|
*/
|
|
195
|
-
bold?: boolean
|
|
195
|
+
bold?: boolean;
|
|
196
196
|
} & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -89,13 +89,15 @@
|
|
|
89
89
|
font-size: 16px;
|
|
90
90
|
line-height: 20px;
|
|
91
91
|
font-weight: 700;
|
|
92
|
-
|
|
92
|
+
letter-spacing: 0.43px;
|
|
93
|
+
font-family: var(--font-family-alfasans);
|
|
93
94
|
}
|
|
94
95
|
.steps {
|
|
95
96
|
font-size: 14px;
|
|
96
97
|
line-height: 18px;
|
|
97
98
|
font-weight: 400;
|
|
98
|
-
|
|
99
|
+
letter-spacing: -0.08px;
|
|
100
|
+
font-family: var(--font-family-alfasans);
|
|
99
101
|
|
|
100
102
|
display: flex;
|
|
101
103
|
justify-content: space-between;
|
|
@@ -106,7 +108,8 @@
|
|
|
106
108
|
font-size: 16px;
|
|
107
109
|
line-height: 20px;
|
|
108
110
|
font-weight: 400;
|
|
109
|
-
|
|
111
|
+
letter-spacing: -0.24px;
|
|
112
|
+
font-family: var(--font-family-alfasans);
|
|
110
113
|
|
|
111
114
|
color: var(--slider-input-info-color);
|
|
112
115
|
box-sizing: border-box;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ChangeEvent } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type OnChangeType = (event: ChangeEvent<HTMLInputElement> | null, payload: {
|
|
3
3
|
value: number | '';
|
|
4
4
|
}) => void;
|
|
5
|
-
export
|
|
5
|
+
export type OnInputChangeType = (event: ChangeEvent<HTMLInputElement> | null, payload: {
|
|
6
6
|
value: number | '';
|
|
7
7
|
}) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-slider-input",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.5-alfasans",
|
|
4
4
|
"description": "Slider input component",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"main": "index.js",
|
|
11
11
|
"module": "./esm/index.js",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@alfalab/core-components-input": "
|
|
14
|
-
"@alfalab/core-components-slider": "
|
|
13
|
+
"@alfalab/core-components-input": "17.1.3-alfasans",
|
|
14
|
+
"@alfalab/core-components-slider": "6.0.2-alfasans",
|
|
15
15
|
"classnames": "^2.5.1",
|
|
16
16
|
"tslib": "^2.4.0"
|
|
17
17
|
},
|
|
@@ -23,6 +23,6 @@
|
|
|
23
23
|
"access": "public",
|
|
24
24
|
"directory": "dist"
|
|
25
25
|
},
|
|
26
|
-
"themesVersion": "15.0.2",
|
|
27
|
-
"varsVersion": "11.0.
|
|
26
|
+
"themesVersion": "15.0.2-alfasans",
|
|
27
|
+
"varsVersion": "11.0.2-alfasans"
|
|
28
28
|
}
|
package/src/index.module.css
CHANGED
package/types/propTypes.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ChangeEvent } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type OnChangeType = (event: ChangeEvent<HTMLInputElement> | null, payload: {
|
|
3
3
|
value: number | '';
|
|
4
4
|
}) => void;
|
|
5
|
-
export
|
|
5
|
+
export type OnInputChangeType = (event: ChangeEvent<HTMLInputElement> | null, payload: {
|
|
6
6
|
value: number | '';
|
|
7
7
|
}) => void;
|