@alfalab/core-components-picker-button 10.3.9 → 10.3.10
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.js +1 -1
- package/cssm/field/Component.d.ts +1 -1
- package/cssm/option/Component.d.ts +2 -2
- package/cssm/{typings-cac440c1.d.ts → typings-a8deae7f.d.ts} +46 -44
- package/esm/Component.js +1 -1
- package/esm/field/Component.d.ts +1 -1
- package/esm/field/Component.js +1 -1
- package/esm/field/index.css +5 -5
- package/esm/index.css +7 -7
- package/esm/option/Component.d.ts +2 -2
- package/esm/option/Component.js +1 -1
- package/esm/option/index.css +4 -4
- package/esm/{typings-cac440c1.d.ts → typings-a8deae7f.d.ts} +46 -44
- package/field/Component.d.ts +1 -1
- package/field/Component.js +1 -1
- package/field/index.css +5 -5
- package/index.css +7 -7
- package/modern/Component.js +1 -1
- package/modern/field/Component.d.ts +1 -1
- package/modern/field/Component.js +1 -1
- package/modern/field/index.css +5 -5
- package/modern/index.css +7 -7
- package/modern/option/Component.d.ts +2 -2
- package/modern/option/Component.js +1 -1
- package/modern/option/index.css +4 -4
- package/modern/{typings-cac440c1.d.ts → typings-a8deae7f.d.ts} +46 -44
- package/option/Component.d.ts +2 -2
- package/option/Component.js +1 -1
- package/option/index.css +4 -4
- package/package.json +2 -2
- package/{typings-cac440c1.d.ts → typings-a8deae7f.d.ts} +46 -44
package/Component.js
CHANGED
|
@@ -18,7 +18,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
18
18
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
19
19
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
20
20
|
|
|
21
|
-
var styles = {"container":"picker-
|
|
21
|
+
var styles = {"container":"picker-button__container_1k9v6","optionsPopover":"picker-button__optionsPopover_1k9v6","sideGap":"picker-button__sideGap_1k9v6","optionsListContainer":"picker-button__optionsListContainer_1k9v6","option":"picker-button__option_1k9v6"};
|
|
22
22
|
require('./index.css')
|
|
23
23
|
|
|
24
24
|
var SIDE_POSITIONS = ['right', 'right-start', 'right-end', 'left', 'left-start', 'left-end'];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ButtonProps } from "@alfalab/core-components-button";
|
|
3
|
-
import { FieldProps as BaseFieldProps } from "../typings-
|
|
3
|
+
import { FieldProps as BaseFieldProps } from "../typings-a8deae7f";
|
|
4
4
|
import { PickerButtonSize, PickerButtonVariant } from "../Component";
|
|
5
5
|
type FieldProps = Omit<BaseFieldProps, 'size' | 'hint' | 'success' | 'error' | 'placeholder'> & ButtonProps & {
|
|
6
6
|
buttonSize?: PickerButtonSize;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { FC, SVGProps } from 'react';
|
|
3
|
-
import { OptionShape } from "../typings-
|
|
4
|
-
import { OptionProps as BaseOptionProps } from "../typings-
|
|
3
|
+
import { OptionShape } from "../typings-a8deae7f";
|
|
4
|
+
import { OptionProps as BaseOptionProps } from "../typings-a8deae7f";
|
|
5
5
|
type OptionProps = Omit<BaseOptionProps, 'option'> & {
|
|
6
6
|
option: OptionShape & {
|
|
7
7
|
icon?: FC<SVGProps<SVGSVGElement>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
/// <reference types="react-transition-group" />
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { ChangeEvent, InputHTMLAttributes, MouseEvent, ReactNode, CSSProperties, MutableRefObject, HTMLAttributes, FC, RefObject, AriaAttributes, FocusEvent, ReactElement, RefAttributes } from "react";
|
|
4
|
+
import { ChangeEvent, InputHTMLAttributes, MouseEvent, ReactNode, CSSProperties, MutableRefObject, HTMLAttributes, FC, RefObject, AriaAttributes, FocusEvent, ReactElement, RefAttributes, SVGProps } from "react";
|
|
5
5
|
import { CSSTransitionProps } from "react-transition-group/CSSTransition";
|
|
6
6
|
import { BasePlacement, VariationPlacement } from "@popperjs/core";
|
|
7
7
|
type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "value" | "defaultValue" | "onChange" | "onClick" | "onMouseDown" | "enterKeyHint"> & {
|
|
@@ -254,6 +254,47 @@ type PopoverProps = {
|
|
|
254
254
|
children?: ReactNode;
|
|
255
255
|
};
|
|
256
256
|
declare const Popover: React.ForwardRefExoticComponent<PopoverProps & React.RefAttributes<HTMLDivElement>>;
|
|
257
|
+
type BadgeProps = {
|
|
258
|
+
/**
|
|
259
|
+
* Дополнительный класс
|
|
260
|
+
*/
|
|
261
|
+
className?: string;
|
|
262
|
+
/**
|
|
263
|
+
* Вид компонента
|
|
264
|
+
*/
|
|
265
|
+
view: "icon" | "count";
|
|
266
|
+
/**
|
|
267
|
+
* Размер компонента (только для view=icon)
|
|
268
|
+
* //deprecated(используйте height для view=count )
|
|
269
|
+
*/
|
|
270
|
+
size?: "s" | "m" | "l" | "xl";
|
|
271
|
+
/**
|
|
272
|
+
* Видимость белой обводки вокруг иконки
|
|
273
|
+
*/
|
|
274
|
+
visibleIconOutline?: boolean;
|
|
275
|
+
/**
|
|
276
|
+
* Видимость цветной обводки вокруг иконки (только для view=icon)
|
|
277
|
+
*/
|
|
278
|
+
visibleColorOutline?: boolean;
|
|
279
|
+
/**
|
|
280
|
+
* Контент компонента
|
|
281
|
+
*/
|
|
282
|
+
content?: React.ReactElement | number;
|
|
283
|
+
/**
|
|
284
|
+
* Высота компонента, min = 16; max = 48 (только для view=count)
|
|
285
|
+
*/
|
|
286
|
+
height?: number;
|
|
287
|
+
/**
|
|
288
|
+
* Цветовое оформление иконки
|
|
289
|
+
*/
|
|
290
|
+
iconColor?: "positive" | "attention" | "link" | "negative" | "tertiary" | "secondary" | "primary";
|
|
291
|
+
/**
|
|
292
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
293
|
+
*/
|
|
294
|
+
dataTestId?: string;
|
|
295
|
+
};
|
|
296
|
+
// eslint-disable-next-line complexity
|
|
297
|
+
declare const Badge: ({ className, size, view, visibleIconOutline, visibleColorOutline, content, height, iconColor, dataTestId }: BadgeProps) => JSX.Element;
|
|
257
298
|
type FormControlProps = HTMLAttributes<HTMLDivElement> & {
|
|
258
299
|
/**
|
|
259
300
|
* Растягивает компонент на ширину контейнера
|
|
@@ -358,46 +399,6 @@ declare const FormControl: React.ForwardRefExoticComponent<React.HTMLAttributes<
|
|
|
358
399
|
dataTestId?: string | undefined;
|
|
359
400
|
children?: ReactNode;
|
|
360
401
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
361
|
-
type BadgeProps = {
|
|
362
|
-
/**
|
|
363
|
-
* Дополнительный класс
|
|
364
|
-
*/
|
|
365
|
-
className?: string;
|
|
366
|
-
/**
|
|
367
|
-
* Вид компонента
|
|
368
|
-
*/
|
|
369
|
-
view: "icon" | "count";
|
|
370
|
-
/**
|
|
371
|
-
* Размер компонента (только для view=icon)
|
|
372
|
-
* //deprecated(используйте height для view=count )
|
|
373
|
-
*/
|
|
374
|
-
size?: "s" | "m" | "l" | "xl";
|
|
375
|
-
/**
|
|
376
|
-
* Видимость белой обводки вокруг иконки
|
|
377
|
-
*/
|
|
378
|
-
visibleIconOutline?: boolean;
|
|
379
|
-
/**
|
|
380
|
-
* Видимость цветной обводки вокруг иконки (только для view=icon)
|
|
381
|
-
*/
|
|
382
|
-
visibleColorOutline?: boolean;
|
|
383
|
-
/**
|
|
384
|
-
* Контент компонента
|
|
385
|
-
*/
|
|
386
|
-
content?: React.ReactElement | number;
|
|
387
|
-
/**
|
|
388
|
-
* Высота компонента, min = 16; max = 48 (только для view=count)
|
|
389
|
-
*/
|
|
390
|
-
height?: number;
|
|
391
|
-
/**
|
|
392
|
-
* Цветовое оформление иконки
|
|
393
|
-
*/
|
|
394
|
-
iconColor?: "positive" | "attention" | "link" | "negative" | "tertiary" | "secondary" | "primary";
|
|
395
|
-
/**
|
|
396
|
-
* Идентификатор для систем автоматизированного тестирования
|
|
397
|
-
*/
|
|
398
|
-
dataTestId?: string;
|
|
399
|
-
};
|
|
400
|
-
declare const Badge: ({ className, size, view, visibleIconOutline, visibleColorOutline, content, height, iconColor, dataTestId }: BadgeProps) => JSX.Element;
|
|
401
402
|
type PortalProps = {
|
|
402
403
|
/** Контент */
|
|
403
404
|
children?: ReactNode;
|
|
@@ -439,6 +440,7 @@ declare const Stack: FC<StackProps>;
|
|
|
439
440
|
declare const PORTAL_CONTAINER_ATTRIBUTE = "alfa-portal-container";
|
|
440
441
|
declare const getDefaultPortalContainer: () => Element;
|
|
441
442
|
declare function setRef<T>(ref: RefObject<T> | ((instance: T | null) => void) | null | undefined, value: T | null): void;
|
|
443
|
+
type AnyObject = Record<string, any>;
|
|
442
444
|
type OptionShape = {
|
|
443
445
|
/**
|
|
444
446
|
* Текстовое представление пункта
|
|
@@ -762,7 +764,7 @@ type FieldProps = {
|
|
|
762
764
|
* Идентификатор для систем автоматизированного тестирования
|
|
763
765
|
*/
|
|
764
766
|
dataTestId?: string;
|
|
765
|
-
} &
|
|
767
|
+
} & AnyObject;
|
|
766
768
|
type ArrowProps = {
|
|
767
769
|
/**
|
|
768
770
|
* Дополнительный класс
|
|
@@ -982,6 +984,6 @@ type CheckmarkProps = {
|
|
|
982
984
|
/**
|
|
983
985
|
* Иконка выбранного пункта
|
|
984
986
|
*/
|
|
985
|
-
icon?:
|
|
987
|
+
icon?: FC<SVGProps<SVGSVGElement>>;
|
|
986
988
|
};
|
|
987
|
-
export { InputProps, Input, Position, PopoverProps, Popover,
|
|
989
|
+
export { InputProps, Input, Position, PopoverProps, Popover, BadgeProps, Badge, FormControlProps, FormControl, PortalProps, Portal, stackingOrder, StackingContext, StackProps, Stack, PORTAL_CONTAINER_ATTRIBUTE, getDefaultPortalContainer, setRef, AnyObject, OptionShape, GroupShape, BaseSelectChangePayload, BaseSelectProps, FieldProps, ArrowProps, OptionsListProps, OptgroupProps, OptionProps, CheckmarkProps };
|
package/esm/Component.js
CHANGED
|
@@ -11,7 +11,7 @@ import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
|
11
11
|
import '@alfalab/icons-glyph/MoreMIcon';
|
|
12
12
|
import '@alfalab/icons-glyph/MoreSIcon';
|
|
13
13
|
|
|
14
|
-
var styles = {"container":"picker-
|
|
14
|
+
var styles = {"container":"picker-button__container_1k9v6","optionsPopover":"picker-button__optionsPopover_1k9v6","sideGap":"picker-button__sideGap_1k9v6","optionsListContainer":"picker-button__optionsListContainer_1k9v6","option":"picker-button__option_1k9v6"};
|
|
15
15
|
require('./index.css')
|
|
16
16
|
|
|
17
17
|
var SIDE_POSITIONS = ['right', 'right-start', 'right-end', 'left', 'left-start', 'left-end'];
|
package/esm/field/Component.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ButtonProps } from "@alfalab/core-components-button";
|
|
3
|
-
import { FieldProps as BaseFieldProps } from "../typings-
|
|
3
|
+
import { FieldProps as BaseFieldProps } from "../typings-a8deae7f";
|
|
4
4
|
import { PickerButtonSize, PickerButtonVariant } from "../Component";
|
|
5
5
|
type FieldProps = Omit<BaseFieldProps, 'size' | 'hint' | 'success' | 'error' | 'placeholder'> & ButtonProps & {
|
|
6
6
|
buttonSize?: PickerButtonSize;
|
package/esm/field/Component.js
CHANGED
|
@@ -8,7 +8,7 @@ import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
|
8
8
|
import '@alfalab/icons-glyph/MoreMIcon';
|
|
9
9
|
import '@alfalab/icons-glyph/MoreSIcon';
|
|
10
10
|
|
|
11
|
-
var styles = {"iconContainer":"picker-
|
|
11
|
+
var styles = {"iconContainer":"picker-button__iconContainer_1vqdm","addonsContainer":"picker-button__addonsContainer_1vqdm","showControlIcon":"picker-button__showControlIcon_1vqdm","open":"picker-button__open_1vqdm"};
|
|
12
12
|
require('./index.css')
|
|
13
13
|
|
|
14
14
|
var Field = function (_a) {
|
package/esm/field/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: o1ydp */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
} :root {
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
18
|
--arrow-transform: rotate(180deg);
|
|
19
|
-
} .picker-
|
|
19
|
+
} .picker-button__iconContainer_1vqdm {
|
|
20
20
|
display: flex;
|
|
21
21
|
transition: transform 0.15s ease-in-out;
|
|
22
|
-
} .picker-
|
|
22
|
+
} .picker-button__addonsContainer_1vqdm {
|
|
23
23
|
display: flex
|
|
24
|
-
} .picker-
|
|
24
|
+
} .picker-button__addonsContainer_1vqdm.picker-button__showControlIcon_1vqdm {
|
|
25
25
|
margin-right: var(--gap-2xs);
|
|
26
|
-
} .picker-
|
|
26
|
+
} .picker-button__open_1vqdm {
|
|
27
27
|
transform: var(--arrow-transform);
|
|
28
28
|
}
|
package/esm/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1pakk */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
} :root {
|
|
@@ -18,17 +18,17 @@
|
|
|
18
18
|
--gap-m: 16px;
|
|
19
19
|
} :root {
|
|
20
20
|
} :root {
|
|
21
|
-
} .picker-
|
|
21
|
+
} .picker-button__container_1k9v6 {
|
|
22
22
|
min-width: auto;
|
|
23
|
-
} .cc-picker-button.picker-
|
|
23
|
+
} .cc-picker-button.picker-button__optionsPopover_1k9v6 {
|
|
24
24
|
padding: var(--gap-2xs) 0
|
|
25
|
-
} .cc-picker-button.picker-
|
|
25
|
+
} .cc-picker-button.picker-button__optionsPopover_1k9v6.picker-button__sideGap_1k9v6 {
|
|
26
26
|
padding: 0 var(--gap-xs);
|
|
27
|
-
} .cc-picker-button .picker-
|
|
27
|
+
} .cc-picker-button .picker-button__optionsListContainer_1k9v6 {
|
|
28
28
|
border-radius: var(--border-radius-m);
|
|
29
|
-
} .cc-picker-button .picker-
|
|
29
|
+
} .cc-picker-button .picker-button__option_1k9v6 {
|
|
30
30
|
padding: 0 var(--gap-m)
|
|
31
|
-
} .cc-picker-button .picker-
|
|
31
|
+
} .cc-picker-button .picker-button__option_1k9v6:before {
|
|
32
32
|
/* Удаляем разделители у опций выпадающего списка. */
|
|
33
33
|
display: none;
|
|
34
34
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { FC, SVGProps } from 'react';
|
|
3
|
-
import { OptionShape } from "../typings-
|
|
4
|
-
import { OptionProps as BaseOptionProps } from "../typings-
|
|
3
|
+
import { OptionShape } from "../typings-a8deae7f";
|
|
4
|
+
import { OptionProps as BaseOptionProps } from "../typings-a8deae7f";
|
|
5
5
|
type OptionProps = Omit<BaseOptionProps, 'option'> & {
|
|
6
6
|
option: OptionShape & {
|
|
7
7
|
icon?: FC<SVGProps<SVGSVGElement>>;
|
package/esm/option/Component.js
CHANGED
|
@@ -2,7 +2,7 @@ import { __rest, __assign } from 'tslib';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { Option as Option$1 } from '@alfalab/core-components-select/esm';
|
|
4
4
|
|
|
5
|
-
var styles = {"container":"picker-
|
|
5
|
+
var styles = {"container":"picker-button__container_15jj2","icon":"picker-button__icon_15jj2","content":"picker-button__content_15jj2"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
var Option = function (_a) {
|
package/esm/option/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1x1y0 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
} :root {
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
--gap-s: 12px;
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
|
-
} .picker-
|
|
18
|
+
} .picker-button__container_15jj2 {
|
|
19
19
|
display: flex;
|
|
20
20
|
align-items: center;
|
|
21
|
-
} .picker-
|
|
21
|
+
} .picker-button__icon_15jj2 {
|
|
22
22
|
display: flex;
|
|
23
23
|
margin-right: var(--gap-s);
|
|
24
|
-
} .picker-
|
|
24
|
+
} .picker-button__content_15jj2 {
|
|
25
25
|
overflow: hidden;
|
|
26
26
|
flex: 1;
|
|
27
27
|
text-overflow: ellipsis;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
/// <reference types="react-transition-group" />
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { ChangeEvent, InputHTMLAttributes, MouseEvent, ReactNode, CSSProperties, MutableRefObject, HTMLAttributes, FC, RefObject, AriaAttributes, FocusEvent, ReactElement, RefAttributes } from "react";
|
|
4
|
+
import { ChangeEvent, InputHTMLAttributes, MouseEvent, ReactNode, CSSProperties, MutableRefObject, HTMLAttributes, FC, RefObject, AriaAttributes, FocusEvent, ReactElement, RefAttributes, SVGProps } from "react";
|
|
5
5
|
import { CSSTransitionProps } from "react-transition-group/CSSTransition";
|
|
6
6
|
import { BasePlacement, VariationPlacement } from "@popperjs/core";
|
|
7
7
|
type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "value" | "defaultValue" | "onChange" | "onClick" | "onMouseDown" | "enterKeyHint"> & {
|
|
@@ -254,6 +254,47 @@ type PopoverProps = {
|
|
|
254
254
|
children?: ReactNode;
|
|
255
255
|
};
|
|
256
256
|
declare const Popover: React.ForwardRefExoticComponent<PopoverProps & React.RefAttributes<HTMLDivElement>>;
|
|
257
|
+
type BadgeProps = {
|
|
258
|
+
/**
|
|
259
|
+
* Дополнительный класс
|
|
260
|
+
*/
|
|
261
|
+
className?: string;
|
|
262
|
+
/**
|
|
263
|
+
* Вид компонента
|
|
264
|
+
*/
|
|
265
|
+
view: "icon" | "count";
|
|
266
|
+
/**
|
|
267
|
+
* Размер компонента (только для view=icon)
|
|
268
|
+
* //deprecated(используйте height для view=count )
|
|
269
|
+
*/
|
|
270
|
+
size?: "s" | "m" | "l" | "xl";
|
|
271
|
+
/**
|
|
272
|
+
* Видимость белой обводки вокруг иконки
|
|
273
|
+
*/
|
|
274
|
+
visibleIconOutline?: boolean;
|
|
275
|
+
/**
|
|
276
|
+
* Видимость цветной обводки вокруг иконки (только для view=icon)
|
|
277
|
+
*/
|
|
278
|
+
visibleColorOutline?: boolean;
|
|
279
|
+
/**
|
|
280
|
+
* Контент компонента
|
|
281
|
+
*/
|
|
282
|
+
content?: React.ReactElement | number;
|
|
283
|
+
/**
|
|
284
|
+
* Высота компонента, min = 16; max = 48 (только для view=count)
|
|
285
|
+
*/
|
|
286
|
+
height?: number;
|
|
287
|
+
/**
|
|
288
|
+
* Цветовое оформление иконки
|
|
289
|
+
*/
|
|
290
|
+
iconColor?: "positive" | "attention" | "link" | "negative" | "tertiary" | "secondary" | "primary";
|
|
291
|
+
/**
|
|
292
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
293
|
+
*/
|
|
294
|
+
dataTestId?: string;
|
|
295
|
+
};
|
|
296
|
+
// eslint-disable-next-line complexity
|
|
297
|
+
declare const Badge: ({ className, size, view, visibleIconOutline, visibleColorOutline, content, height, iconColor, dataTestId }: BadgeProps) => JSX.Element;
|
|
257
298
|
type FormControlProps = HTMLAttributes<HTMLDivElement> & {
|
|
258
299
|
/**
|
|
259
300
|
* Растягивает компонент на ширину контейнера
|
|
@@ -358,46 +399,6 @@ declare const FormControl: React.ForwardRefExoticComponent<React.HTMLAttributes<
|
|
|
358
399
|
dataTestId?: string | undefined;
|
|
359
400
|
children?: ReactNode;
|
|
360
401
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
361
|
-
type BadgeProps = {
|
|
362
|
-
/**
|
|
363
|
-
* Дополнительный класс
|
|
364
|
-
*/
|
|
365
|
-
className?: string;
|
|
366
|
-
/**
|
|
367
|
-
* Вид компонента
|
|
368
|
-
*/
|
|
369
|
-
view: "icon" | "count";
|
|
370
|
-
/**
|
|
371
|
-
* Размер компонента (только для view=icon)
|
|
372
|
-
* //deprecated(используйте height для view=count )
|
|
373
|
-
*/
|
|
374
|
-
size?: "s" | "m" | "l" | "xl";
|
|
375
|
-
/**
|
|
376
|
-
* Видимость белой обводки вокруг иконки
|
|
377
|
-
*/
|
|
378
|
-
visibleIconOutline?: boolean;
|
|
379
|
-
/**
|
|
380
|
-
* Видимость цветной обводки вокруг иконки (только для view=icon)
|
|
381
|
-
*/
|
|
382
|
-
visibleColorOutline?: boolean;
|
|
383
|
-
/**
|
|
384
|
-
* Контент компонента
|
|
385
|
-
*/
|
|
386
|
-
content?: React.ReactElement | number;
|
|
387
|
-
/**
|
|
388
|
-
* Высота компонента, min = 16; max = 48 (только для view=count)
|
|
389
|
-
*/
|
|
390
|
-
height?: number;
|
|
391
|
-
/**
|
|
392
|
-
* Цветовое оформление иконки
|
|
393
|
-
*/
|
|
394
|
-
iconColor?: "positive" | "attention" | "link" | "negative" | "tertiary" | "secondary" | "primary";
|
|
395
|
-
/**
|
|
396
|
-
* Идентификатор для систем автоматизированного тестирования
|
|
397
|
-
*/
|
|
398
|
-
dataTestId?: string;
|
|
399
|
-
};
|
|
400
|
-
declare const Badge: ({ className, size, view, visibleIconOutline, visibleColorOutline, content, height, iconColor, dataTestId }: BadgeProps) => JSX.Element;
|
|
401
402
|
type PortalProps = {
|
|
402
403
|
/** Контент */
|
|
403
404
|
children?: ReactNode;
|
|
@@ -439,6 +440,7 @@ declare const Stack: FC<StackProps>;
|
|
|
439
440
|
declare const PORTAL_CONTAINER_ATTRIBUTE = "alfa-portal-container";
|
|
440
441
|
declare const getDefaultPortalContainer: () => Element;
|
|
441
442
|
declare function setRef<T>(ref: RefObject<T> | ((instance: T | null) => void) | null | undefined, value: T | null): void;
|
|
443
|
+
type AnyObject = Record<string, any>;
|
|
442
444
|
type OptionShape = {
|
|
443
445
|
/**
|
|
444
446
|
* Текстовое представление пункта
|
|
@@ -762,7 +764,7 @@ type FieldProps = {
|
|
|
762
764
|
* Идентификатор для систем автоматизированного тестирования
|
|
763
765
|
*/
|
|
764
766
|
dataTestId?: string;
|
|
765
|
-
} &
|
|
767
|
+
} & AnyObject;
|
|
766
768
|
type ArrowProps = {
|
|
767
769
|
/**
|
|
768
770
|
* Дополнительный класс
|
|
@@ -982,6 +984,6 @@ type CheckmarkProps = {
|
|
|
982
984
|
/**
|
|
983
985
|
* Иконка выбранного пункта
|
|
984
986
|
*/
|
|
985
|
-
icon?:
|
|
987
|
+
icon?: FC<SVGProps<SVGSVGElement>>;
|
|
986
988
|
};
|
|
987
|
-
export { InputProps, Input, Position, PopoverProps, Popover,
|
|
989
|
+
export { InputProps, Input, Position, PopoverProps, Popover, BadgeProps, Badge, FormControlProps, FormControl, PortalProps, Portal, stackingOrder, StackingContext, StackProps, Stack, PORTAL_CONTAINER_ATTRIBUTE, getDefaultPortalContainer, setRef, AnyObject, OptionShape, GroupShape, BaseSelectChangePayload, BaseSelectProps, FieldProps, ArrowProps, OptionsListProps, OptgroupProps, OptionProps, CheckmarkProps };
|
package/field/Component.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ButtonProps } from "@alfalab/core-components-button";
|
|
3
|
-
import { FieldProps as BaseFieldProps } from "../typings-
|
|
3
|
+
import { FieldProps as BaseFieldProps } from "../typings-a8deae7f";
|
|
4
4
|
import { PickerButtonSize, PickerButtonVariant } from "../Component";
|
|
5
5
|
type FieldProps = Omit<BaseFieldProps, 'size' | 'hint' | 'success' | 'error' | 'placeholder'> & ButtonProps & {
|
|
6
6
|
buttonSize?: PickerButtonSize;
|
package/field/Component.js
CHANGED
|
@@ -15,7 +15,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
15
15
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
16
16
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
17
17
|
|
|
18
|
-
var styles = {"iconContainer":"picker-
|
|
18
|
+
var styles = {"iconContainer":"picker-button__iconContainer_1vqdm","addonsContainer":"picker-button__addonsContainer_1vqdm","showControlIcon":"picker-button__showControlIcon_1vqdm","open":"picker-button__open_1vqdm"};
|
|
19
19
|
require('./index.css')
|
|
20
20
|
|
|
21
21
|
var Field = function (_a) {
|
package/field/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: o1ydp */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
} :root {
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
18
|
--arrow-transform: rotate(180deg);
|
|
19
|
-
} .picker-
|
|
19
|
+
} .picker-button__iconContainer_1vqdm {
|
|
20
20
|
display: flex;
|
|
21
21
|
transition: transform 0.15s ease-in-out;
|
|
22
|
-
} .picker-
|
|
22
|
+
} .picker-button__addonsContainer_1vqdm {
|
|
23
23
|
display: flex
|
|
24
|
-
} .picker-
|
|
24
|
+
} .picker-button__addonsContainer_1vqdm.picker-button__showControlIcon_1vqdm {
|
|
25
25
|
margin-right: var(--gap-2xs);
|
|
26
|
-
} .picker-
|
|
26
|
+
} .picker-button__open_1vqdm {
|
|
27
27
|
transform: var(--arrow-transform);
|
|
28
28
|
}
|
package/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1pakk */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
} :root {
|
|
@@ -18,17 +18,17 @@
|
|
|
18
18
|
--gap-m: 16px;
|
|
19
19
|
} :root {
|
|
20
20
|
} :root {
|
|
21
|
-
} .picker-
|
|
21
|
+
} .picker-button__container_1k9v6 {
|
|
22
22
|
min-width: auto;
|
|
23
|
-
} .cc-picker-button.picker-
|
|
23
|
+
} .cc-picker-button.picker-button__optionsPopover_1k9v6 {
|
|
24
24
|
padding: var(--gap-2xs) 0
|
|
25
|
-
} .cc-picker-button.picker-
|
|
25
|
+
} .cc-picker-button.picker-button__optionsPopover_1k9v6.picker-button__sideGap_1k9v6 {
|
|
26
26
|
padding: 0 var(--gap-xs);
|
|
27
|
-
} .cc-picker-button .picker-
|
|
27
|
+
} .cc-picker-button .picker-button__optionsListContainer_1k9v6 {
|
|
28
28
|
border-radius: var(--border-radius-m);
|
|
29
|
-
} .cc-picker-button .picker-
|
|
29
|
+
} .cc-picker-button .picker-button__option_1k9v6 {
|
|
30
30
|
padding: 0 var(--gap-m)
|
|
31
|
-
} .cc-picker-button .picker-
|
|
31
|
+
} .cc-picker-button .picker-button__option_1k9v6:before {
|
|
32
32
|
/* Удаляем разделители у опций выпадающего списка. */
|
|
33
33
|
display: none;
|
|
34
34
|
}
|
package/modern/Component.js
CHANGED
|
@@ -10,7 +10,7 @@ import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
|
10
10
|
import '@alfalab/icons-glyph/MoreMIcon';
|
|
11
11
|
import '@alfalab/icons-glyph/MoreSIcon';
|
|
12
12
|
|
|
13
|
-
const styles = {"container":"picker-
|
|
13
|
+
const styles = {"container":"picker-button__container_1k9v6","optionsPopover":"picker-button__optionsPopover_1k9v6","sideGap":"picker-button__sideGap_1k9v6","optionsListContainer":"picker-button__optionsListContainer_1k9v6","option":"picker-button__option_1k9v6"};
|
|
14
14
|
require('./index.css')
|
|
15
15
|
|
|
16
16
|
const SIDE_POSITIONS = ['right', 'right-start', 'right-end', 'left', 'left-start', 'left-end'];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ButtonProps } from "@alfalab/core-components-button";
|
|
3
|
-
import { FieldProps as BaseFieldProps } from "../typings-
|
|
3
|
+
import { FieldProps as BaseFieldProps } from "../typings-a8deae7f";
|
|
4
4
|
import { PickerButtonSize, PickerButtonVariant } from "../Component";
|
|
5
5
|
type FieldProps = Omit<BaseFieldProps, 'size' | 'hint' | 'success' | 'error' | 'placeholder'> & ButtonProps & {
|
|
6
6
|
buttonSize?: PickerButtonSize;
|
|
@@ -7,7 +7,7 @@ import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
|
7
7
|
import '@alfalab/icons-glyph/MoreMIcon';
|
|
8
8
|
import '@alfalab/icons-glyph/MoreSIcon';
|
|
9
9
|
|
|
10
|
-
const styles = {"iconContainer":"picker-
|
|
10
|
+
const styles = {"iconContainer":"picker-button__iconContainer_1vqdm","addonsContainer":"picker-button__addonsContainer_1vqdm","showControlIcon":"picker-button__showControlIcon_1vqdm","open":"picker-button__open_1vqdm"};
|
|
11
11
|
require('./index.css')
|
|
12
12
|
|
|
13
13
|
const Field = ({ buttonSize = 'm', buttonVariant = 'default', view, label, open, multiple, rightAddons, Arrow, innerProps, className, selected, selectedMultiple, setSelectedItems, toggleMenu, valueRenderer, showArrow = true, ...restProps }) => {
|
package/modern/field/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: o1ydp */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
} :root {
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
18
|
--arrow-transform: rotate(180deg);
|
|
19
|
-
} .picker-
|
|
19
|
+
} .picker-button__iconContainer_1vqdm {
|
|
20
20
|
display: flex;
|
|
21
21
|
transition: transform 0.15s ease-in-out;
|
|
22
|
-
} .picker-
|
|
22
|
+
} .picker-button__addonsContainer_1vqdm {
|
|
23
23
|
display: flex
|
|
24
|
-
} .picker-
|
|
24
|
+
} .picker-button__addonsContainer_1vqdm.picker-button__showControlIcon_1vqdm {
|
|
25
25
|
margin-right: var(--gap-2xs);
|
|
26
|
-
} .picker-
|
|
26
|
+
} .picker-button__open_1vqdm {
|
|
27
27
|
transform: var(--arrow-transform);
|
|
28
28
|
}
|
package/modern/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1pakk */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
} :root {
|
|
@@ -18,17 +18,17 @@
|
|
|
18
18
|
--gap-m: 16px;
|
|
19
19
|
} :root {
|
|
20
20
|
} :root {
|
|
21
|
-
} .picker-
|
|
21
|
+
} .picker-button__container_1k9v6 {
|
|
22
22
|
min-width: auto;
|
|
23
|
-
} .cc-picker-button.picker-
|
|
23
|
+
} .cc-picker-button.picker-button__optionsPopover_1k9v6 {
|
|
24
24
|
padding: var(--gap-2xs) 0
|
|
25
|
-
} .cc-picker-button.picker-
|
|
25
|
+
} .cc-picker-button.picker-button__optionsPopover_1k9v6.picker-button__sideGap_1k9v6 {
|
|
26
26
|
padding: 0 var(--gap-xs);
|
|
27
|
-
} .cc-picker-button .picker-
|
|
27
|
+
} .cc-picker-button .picker-button__optionsListContainer_1k9v6 {
|
|
28
28
|
border-radius: var(--border-radius-m);
|
|
29
|
-
} .cc-picker-button .picker-
|
|
29
|
+
} .cc-picker-button .picker-button__option_1k9v6 {
|
|
30
30
|
padding: 0 var(--gap-m)
|
|
31
|
-
} .cc-picker-button .picker-
|
|
31
|
+
} .cc-picker-button .picker-button__option_1k9v6:before {
|
|
32
32
|
/* Удаляем разделители у опций выпадающего списка. */
|
|
33
33
|
display: none;
|
|
34
34
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { FC, SVGProps } from 'react';
|
|
3
|
-
import { OptionShape } from "../typings-
|
|
4
|
-
import { OptionProps as BaseOptionProps } from "../typings-
|
|
3
|
+
import { OptionShape } from "../typings-a8deae7f";
|
|
4
|
+
import { OptionProps as BaseOptionProps } from "../typings-a8deae7f";
|
|
5
5
|
type OptionProps = Omit<BaseOptionProps, 'option'> & {
|
|
6
6
|
option: OptionShape & {
|
|
7
7
|
icon?: FC<SVGProps<SVGSVGElement>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Option as Option$1 } from '@alfalab/core-components-select/modern';
|
|
3
3
|
|
|
4
|
-
const styles = {"container":"picker-
|
|
4
|
+
const styles = {"container":"picker-button__container_15jj2","icon":"picker-button__icon_15jj2","content":"picker-button__content_15jj2"};
|
|
5
5
|
require('./index.css')
|
|
6
6
|
|
|
7
7
|
const Option = ({ option, children, ...restProps }) => {
|
package/modern/option/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1x1y0 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
} :root {
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
--gap-s: 12px;
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
|
-
} .picker-
|
|
18
|
+
} .picker-button__container_15jj2 {
|
|
19
19
|
display: flex;
|
|
20
20
|
align-items: center;
|
|
21
|
-
} .picker-
|
|
21
|
+
} .picker-button__icon_15jj2 {
|
|
22
22
|
display: flex;
|
|
23
23
|
margin-right: var(--gap-s);
|
|
24
|
-
} .picker-
|
|
24
|
+
} .picker-button__content_15jj2 {
|
|
25
25
|
overflow: hidden;
|
|
26
26
|
flex: 1;
|
|
27
27
|
text-overflow: ellipsis;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
/// <reference types="react-transition-group" />
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { ChangeEvent, InputHTMLAttributes, MouseEvent, ReactNode, CSSProperties, MutableRefObject, HTMLAttributes, FC, RefObject, AriaAttributes, FocusEvent, ReactElement, RefAttributes } from "react";
|
|
4
|
+
import { ChangeEvent, InputHTMLAttributes, MouseEvent, ReactNode, CSSProperties, MutableRefObject, HTMLAttributes, FC, RefObject, AriaAttributes, FocusEvent, ReactElement, RefAttributes, SVGProps } from "react";
|
|
5
5
|
import { CSSTransitionProps } from "react-transition-group/CSSTransition";
|
|
6
6
|
import { BasePlacement, VariationPlacement } from "@popperjs/core";
|
|
7
7
|
type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "value" | "defaultValue" | "onChange" | "onClick" | "onMouseDown" | "enterKeyHint"> & {
|
|
@@ -254,6 +254,47 @@ type PopoverProps = {
|
|
|
254
254
|
children?: ReactNode;
|
|
255
255
|
};
|
|
256
256
|
declare const Popover: React.ForwardRefExoticComponent<PopoverProps & React.RefAttributes<HTMLDivElement>>;
|
|
257
|
+
type BadgeProps = {
|
|
258
|
+
/**
|
|
259
|
+
* Дополнительный класс
|
|
260
|
+
*/
|
|
261
|
+
className?: string;
|
|
262
|
+
/**
|
|
263
|
+
* Вид компонента
|
|
264
|
+
*/
|
|
265
|
+
view: "icon" | "count";
|
|
266
|
+
/**
|
|
267
|
+
* Размер компонента (только для view=icon)
|
|
268
|
+
* //deprecated(используйте height для view=count )
|
|
269
|
+
*/
|
|
270
|
+
size?: "s" | "m" | "l" | "xl";
|
|
271
|
+
/**
|
|
272
|
+
* Видимость белой обводки вокруг иконки
|
|
273
|
+
*/
|
|
274
|
+
visibleIconOutline?: boolean;
|
|
275
|
+
/**
|
|
276
|
+
* Видимость цветной обводки вокруг иконки (только для view=icon)
|
|
277
|
+
*/
|
|
278
|
+
visibleColorOutline?: boolean;
|
|
279
|
+
/**
|
|
280
|
+
* Контент компонента
|
|
281
|
+
*/
|
|
282
|
+
content?: React.ReactElement | number;
|
|
283
|
+
/**
|
|
284
|
+
* Высота компонента, min = 16; max = 48 (только для view=count)
|
|
285
|
+
*/
|
|
286
|
+
height?: number;
|
|
287
|
+
/**
|
|
288
|
+
* Цветовое оформление иконки
|
|
289
|
+
*/
|
|
290
|
+
iconColor?: "positive" | "attention" | "link" | "negative" | "tertiary" | "secondary" | "primary";
|
|
291
|
+
/**
|
|
292
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
293
|
+
*/
|
|
294
|
+
dataTestId?: string;
|
|
295
|
+
};
|
|
296
|
+
// eslint-disable-next-line complexity
|
|
297
|
+
declare const Badge: ({ className, size, view, visibleIconOutline, visibleColorOutline, content, height, iconColor, dataTestId }: BadgeProps) => JSX.Element;
|
|
257
298
|
type FormControlProps = HTMLAttributes<HTMLDivElement> & {
|
|
258
299
|
/**
|
|
259
300
|
* Растягивает компонент на ширину контейнера
|
|
@@ -358,46 +399,6 @@ declare const FormControl: React.ForwardRefExoticComponent<React.HTMLAttributes<
|
|
|
358
399
|
dataTestId?: string | undefined;
|
|
359
400
|
children?: ReactNode;
|
|
360
401
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
361
|
-
type BadgeProps = {
|
|
362
|
-
/**
|
|
363
|
-
* Дополнительный класс
|
|
364
|
-
*/
|
|
365
|
-
className?: string;
|
|
366
|
-
/**
|
|
367
|
-
* Вид компонента
|
|
368
|
-
*/
|
|
369
|
-
view: "icon" | "count";
|
|
370
|
-
/**
|
|
371
|
-
* Размер компонента (только для view=icon)
|
|
372
|
-
* //deprecated(используйте height для view=count )
|
|
373
|
-
*/
|
|
374
|
-
size?: "s" | "m" | "l" | "xl";
|
|
375
|
-
/**
|
|
376
|
-
* Видимость белой обводки вокруг иконки
|
|
377
|
-
*/
|
|
378
|
-
visibleIconOutline?: boolean;
|
|
379
|
-
/**
|
|
380
|
-
* Видимость цветной обводки вокруг иконки (только для view=icon)
|
|
381
|
-
*/
|
|
382
|
-
visibleColorOutline?: boolean;
|
|
383
|
-
/**
|
|
384
|
-
* Контент компонента
|
|
385
|
-
*/
|
|
386
|
-
content?: React.ReactElement | number;
|
|
387
|
-
/**
|
|
388
|
-
* Высота компонента, min = 16; max = 48 (только для view=count)
|
|
389
|
-
*/
|
|
390
|
-
height?: number;
|
|
391
|
-
/**
|
|
392
|
-
* Цветовое оформление иконки
|
|
393
|
-
*/
|
|
394
|
-
iconColor?: "positive" | "attention" | "link" | "negative" | "tertiary" | "secondary" | "primary";
|
|
395
|
-
/**
|
|
396
|
-
* Идентификатор для систем автоматизированного тестирования
|
|
397
|
-
*/
|
|
398
|
-
dataTestId?: string;
|
|
399
|
-
};
|
|
400
|
-
declare const Badge: ({ className, size, view, visibleIconOutline, visibleColorOutline, content, height, iconColor, dataTestId }: BadgeProps) => JSX.Element;
|
|
401
402
|
type PortalProps = {
|
|
402
403
|
/** Контент */
|
|
403
404
|
children?: ReactNode;
|
|
@@ -439,6 +440,7 @@ declare const Stack: FC<StackProps>;
|
|
|
439
440
|
declare const PORTAL_CONTAINER_ATTRIBUTE = "alfa-portal-container";
|
|
440
441
|
declare const getDefaultPortalContainer: () => Element;
|
|
441
442
|
declare function setRef<T>(ref: RefObject<T> | ((instance: T | null) => void) | null | undefined, value: T | null): void;
|
|
443
|
+
type AnyObject = Record<string, any>;
|
|
442
444
|
type OptionShape = {
|
|
443
445
|
/**
|
|
444
446
|
* Текстовое представление пункта
|
|
@@ -762,7 +764,7 @@ type FieldProps = {
|
|
|
762
764
|
* Идентификатор для систем автоматизированного тестирования
|
|
763
765
|
*/
|
|
764
766
|
dataTestId?: string;
|
|
765
|
-
} &
|
|
767
|
+
} & AnyObject;
|
|
766
768
|
type ArrowProps = {
|
|
767
769
|
/**
|
|
768
770
|
* Дополнительный класс
|
|
@@ -982,6 +984,6 @@ type CheckmarkProps = {
|
|
|
982
984
|
/**
|
|
983
985
|
* Иконка выбранного пункта
|
|
984
986
|
*/
|
|
985
|
-
icon?:
|
|
987
|
+
icon?: FC<SVGProps<SVGSVGElement>>;
|
|
986
988
|
};
|
|
987
|
-
export { InputProps, Input, Position, PopoverProps, Popover,
|
|
989
|
+
export { InputProps, Input, Position, PopoverProps, Popover, BadgeProps, Badge, FormControlProps, FormControl, PortalProps, Portal, stackingOrder, StackingContext, StackProps, Stack, PORTAL_CONTAINER_ATTRIBUTE, getDefaultPortalContainer, setRef, AnyObject, OptionShape, GroupShape, BaseSelectChangePayload, BaseSelectProps, FieldProps, ArrowProps, OptionsListProps, OptgroupProps, OptionProps, CheckmarkProps };
|
package/option/Component.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { FC, SVGProps } from 'react';
|
|
3
|
-
import { OptionShape } from "../typings-
|
|
4
|
-
import { OptionProps as BaseOptionProps } from "../typings-
|
|
3
|
+
import { OptionShape } from "../typings-a8deae7f";
|
|
4
|
+
import { OptionProps as BaseOptionProps } from "../typings-a8deae7f";
|
|
5
5
|
type OptionProps = Omit<BaseOptionProps, 'option'> & {
|
|
6
6
|
option: OptionShape & {
|
|
7
7
|
icon?: FC<SVGProps<SVGSVGElement>>;
|
package/option/Component.js
CHANGED
|
@@ -8,7 +8,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
8
8
|
|
|
9
9
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
10
10
|
|
|
11
|
-
var styles = {"container":"picker-
|
|
11
|
+
var styles = {"container":"picker-button__container_15jj2","icon":"picker-button__icon_15jj2","content":"picker-button__content_15jj2"};
|
|
12
12
|
require('./index.css')
|
|
13
13
|
|
|
14
14
|
var Option = function (_a) {
|
package/option/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1x1y0 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
} :root {
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
--gap-s: 12px;
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
|
-
} .picker-
|
|
18
|
+
} .picker-button__container_15jj2 {
|
|
19
19
|
display: flex;
|
|
20
20
|
align-items: center;
|
|
21
|
-
} .picker-
|
|
21
|
+
} .picker-button__icon_15jj2 {
|
|
22
22
|
display: flex;
|
|
23
23
|
margin-right: var(--gap-s);
|
|
24
|
-
} .picker-
|
|
24
|
+
} .picker-button__content_15jj2 {
|
|
25
25
|
overflow: hidden;
|
|
26
26
|
flex: 1;
|
|
27
27
|
text-overflow: ellipsis;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-picker-button",
|
|
3
|
-
"version": "10.3.
|
|
3
|
+
"version": "10.3.10",
|
|
4
4
|
"description": "Picker button component",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@alfalab/core-components-button": "^7.1.1",
|
|
22
|
-
"@alfalab/core-components-select": "^13.2.
|
|
22
|
+
"@alfalab/core-components-select": "^13.2.15",
|
|
23
23
|
"@alfalab/icons-classic": "^2.3.0",
|
|
24
24
|
"@alfalab/icons-glyph": "^2.89.0",
|
|
25
25
|
"classnames": "^2.3.1",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
/// <reference types="react-transition-group" />
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { ChangeEvent, InputHTMLAttributes, MouseEvent, ReactNode, CSSProperties, MutableRefObject, HTMLAttributes, FC, RefObject, AriaAttributes, FocusEvent, ReactElement, RefAttributes } from "react";
|
|
4
|
+
import { ChangeEvent, InputHTMLAttributes, MouseEvent, ReactNode, CSSProperties, MutableRefObject, HTMLAttributes, FC, RefObject, AriaAttributes, FocusEvent, ReactElement, RefAttributes, SVGProps } from "react";
|
|
5
5
|
import { CSSTransitionProps } from "react-transition-group/CSSTransition";
|
|
6
6
|
import { BasePlacement, VariationPlacement } from "@popperjs/core";
|
|
7
7
|
type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "value" | "defaultValue" | "onChange" | "onClick" | "onMouseDown" | "enterKeyHint"> & {
|
|
@@ -254,6 +254,47 @@ type PopoverProps = {
|
|
|
254
254
|
children?: ReactNode;
|
|
255
255
|
};
|
|
256
256
|
declare const Popover: React.ForwardRefExoticComponent<PopoverProps & React.RefAttributes<HTMLDivElement>>;
|
|
257
|
+
type BadgeProps = {
|
|
258
|
+
/**
|
|
259
|
+
* Дополнительный класс
|
|
260
|
+
*/
|
|
261
|
+
className?: string;
|
|
262
|
+
/**
|
|
263
|
+
* Вид компонента
|
|
264
|
+
*/
|
|
265
|
+
view: "icon" | "count";
|
|
266
|
+
/**
|
|
267
|
+
* Размер компонента (только для view=icon)
|
|
268
|
+
* //deprecated(используйте height для view=count )
|
|
269
|
+
*/
|
|
270
|
+
size?: "s" | "m" | "l" | "xl";
|
|
271
|
+
/**
|
|
272
|
+
* Видимость белой обводки вокруг иконки
|
|
273
|
+
*/
|
|
274
|
+
visibleIconOutline?: boolean;
|
|
275
|
+
/**
|
|
276
|
+
* Видимость цветной обводки вокруг иконки (только для view=icon)
|
|
277
|
+
*/
|
|
278
|
+
visibleColorOutline?: boolean;
|
|
279
|
+
/**
|
|
280
|
+
* Контент компонента
|
|
281
|
+
*/
|
|
282
|
+
content?: React.ReactElement | number;
|
|
283
|
+
/**
|
|
284
|
+
* Высота компонента, min = 16; max = 48 (только для view=count)
|
|
285
|
+
*/
|
|
286
|
+
height?: number;
|
|
287
|
+
/**
|
|
288
|
+
* Цветовое оформление иконки
|
|
289
|
+
*/
|
|
290
|
+
iconColor?: "positive" | "attention" | "link" | "negative" | "tertiary" | "secondary" | "primary";
|
|
291
|
+
/**
|
|
292
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
293
|
+
*/
|
|
294
|
+
dataTestId?: string;
|
|
295
|
+
};
|
|
296
|
+
// eslint-disable-next-line complexity
|
|
297
|
+
declare const Badge: ({ className, size, view, visibleIconOutline, visibleColorOutline, content, height, iconColor, dataTestId }: BadgeProps) => JSX.Element;
|
|
257
298
|
type FormControlProps = HTMLAttributes<HTMLDivElement> & {
|
|
258
299
|
/**
|
|
259
300
|
* Растягивает компонент на ширину контейнера
|
|
@@ -358,46 +399,6 @@ declare const FormControl: React.ForwardRefExoticComponent<React.HTMLAttributes<
|
|
|
358
399
|
dataTestId?: string | undefined;
|
|
359
400
|
children?: ReactNode;
|
|
360
401
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
361
|
-
type BadgeProps = {
|
|
362
|
-
/**
|
|
363
|
-
* Дополнительный класс
|
|
364
|
-
*/
|
|
365
|
-
className?: string;
|
|
366
|
-
/**
|
|
367
|
-
* Вид компонента
|
|
368
|
-
*/
|
|
369
|
-
view: "icon" | "count";
|
|
370
|
-
/**
|
|
371
|
-
* Размер компонента (только для view=icon)
|
|
372
|
-
* //deprecated(используйте height для view=count )
|
|
373
|
-
*/
|
|
374
|
-
size?: "s" | "m" | "l" | "xl";
|
|
375
|
-
/**
|
|
376
|
-
* Видимость белой обводки вокруг иконки
|
|
377
|
-
*/
|
|
378
|
-
visibleIconOutline?: boolean;
|
|
379
|
-
/**
|
|
380
|
-
* Видимость цветной обводки вокруг иконки (только для view=icon)
|
|
381
|
-
*/
|
|
382
|
-
visibleColorOutline?: boolean;
|
|
383
|
-
/**
|
|
384
|
-
* Контент компонента
|
|
385
|
-
*/
|
|
386
|
-
content?: React.ReactElement | number;
|
|
387
|
-
/**
|
|
388
|
-
* Высота компонента, min = 16; max = 48 (только для view=count)
|
|
389
|
-
*/
|
|
390
|
-
height?: number;
|
|
391
|
-
/**
|
|
392
|
-
* Цветовое оформление иконки
|
|
393
|
-
*/
|
|
394
|
-
iconColor?: "positive" | "attention" | "link" | "negative" | "tertiary" | "secondary" | "primary";
|
|
395
|
-
/**
|
|
396
|
-
* Идентификатор для систем автоматизированного тестирования
|
|
397
|
-
*/
|
|
398
|
-
dataTestId?: string;
|
|
399
|
-
};
|
|
400
|
-
declare const Badge: ({ className, size, view, visibleIconOutline, visibleColorOutline, content, height, iconColor, dataTestId }: BadgeProps) => JSX.Element;
|
|
401
402
|
type PortalProps = {
|
|
402
403
|
/** Контент */
|
|
403
404
|
children?: ReactNode;
|
|
@@ -439,6 +440,7 @@ declare const Stack: FC<StackProps>;
|
|
|
439
440
|
declare const PORTAL_CONTAINER_ATTRIBUTE = "alfa-portal-container";
|
|
440
441
|
declare const getDefaultPortalContainer: () => Element;
|
|
441
442
|
declare function setRef<T>(ref: RefObject<T> | ((instance: T | null) => void) | null | undefined, value: T | null): void;
|
|
443
|
+
type AnyObject = Record<string, any>;
|
|
442
444
|
type OptionShape = {
|
|
443
445
|
/**
|
|
444
446
|
* Текстовое представление пункта
|
|
@@ -762,7 +764,7 @@ type FieldProps = {
|
|
|
762
764
|
* Идентификатор для систем автоматизированного тестирования
|
|
763
765
|
*/
|
|
764
766
|
dataTestId?: string;
|
|
765
|
-
} &
|
|
767
|
+
} & AnyObject;
|
|
766
768
|
type ArrowProps = {
|
|
767
769
|
/**
|
|
768
770
|
* Дополнительный класс
|
|
@@ -982,6 +984,6 @@ type CheckmarkProps = {
|
|
|
982
984
|
/**
|
|
983
985
|
* Иконка выбранного пункта
|
|
984
986
|
*/
|
|
985
|
-
icon?:
|
|
987
|
+
icon?: FC<SVGProps<SVGSVGElement>>;
|
|
986
988
|
};
|
|
987
|
-
export { InputProps, Input, Position, PopoverProps, Popover,
|
|
989
|
+
export { InputProps, Input, Position, PopoverProps, Popover, BadgeProps, Badge, FormControlProps, FormControl, PortalProps, Portal, stackingOrder, StackingContext, StackProps, Stack, PORTAL_CONTAINER_ATTRIBUTE, getDefaultPortalContainer, setRef, AnyObject, OptionShape, GroupShape, BaseSelectChangePayload, BaseSelectProps, FieldProps, ArrowProps, OptionsListProps, OptgroupProps, OptionProps, CheckmarkProps };
|