@itcase/ui 1.8.34 → 1.8.36
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/{Avatar_cjs_kADy_b4o.js → Avatar_cjs_DBoMi2WA.js} +1 -1
- package/dist/{Avatar_es_DbGpnL99.js → Avatar_es_DHREqfOD.js} +1 -1
- package/dist/{Button_cjs_CW6ENTbm.js → Button_cjs_djJUZATX.js} +2 -2
- package/dist/{Button_es_DTUagqgU.js → Button_es_X1DzVhok.js} +2 -2
- package/dist/ChipsGroup_cjs_5xsEchPo.js +314 -0
- package/dist/ChipsGroup_es_4TOkv-fm.js +309 -0
- package/dist/{DatePicker_cjs_C-VbK2J4.js → DatePicker_cjs_DffhgUnQ.js} +26 -30
- package/dist/{DatePicker_es_CIEHQyHC.js → DatePicker_es_GmkagjKf.js} +27 -31
- package/dist/{DropdownItem_cjs_D-zoX7Ik.js → DropdownItem_cjs_DxBpJAi9.js} +5 -3
- package/dist/{DropdownItem_es_BMnIhUSe.js → DropdownItem_es_Loneq6M7.js} +5 -3
- package/dist/{Input_cjs_arr_wxD2.js → Input_cjs_CPmXkQGd.js} +1 -0
- package/dist/{Input_es_BW6cZThr.js → Input_es_D9Y1Rj5Y.js} +1 -0
- package/dist/{Label_cjs_BWbVsB-u.js → Label_cjs_C88e2CIP.js} +59 -131
- package/dist/{Label_es_ouC2i_iI.js → Label_es_Bn2aRjLl.js} +59 -131
- package/dist/{Loader_cjs_CCrbD8Em.js → Loader_cjs_Ca4i0sER.js} +4 -2
- package/dist/{Loader_es_B2auu_rc.js → Loader_es_GYOr0UTX.js} +4 -2
- package/dist/{Tooltip_cjs_DinScDnC.js → Tooltip_cjs_oS1iOamX.js} +4 -2
- package/dist/{Tooltip_es_B0nm9irO.js → Tooltip_es_LV5ZNg3B.js} +4 -2
- package/dist/cjs/components/Accordion.js +1 -1
- package/dist/cjs/components/Avatar.js +2 -2
- package/dist/cjs/components/AvatarStack.js +2 -2
- package/dist/cjs/components/Badge.js +1 -1
- package/dist/cjs/components/Breadcrumbs/stories/__mock__.js +13 -6
- package/dist/cjs/components/Breadcrumbs.js +17 -18
- package/dist/cjs/components/Button.js +3 -3
- package/dist/cjs/components/Cell.js +2 -2
- package/dist/cjs/components/Chips/stories/__mock__.js +31 -0
- package/dist/cjs/components/Chips.js +4 -4
- package/dist/cjs/components/Choice/stories/__mock__.js +15 -15
- package/dist/cjs/components/Choice.js +7 -7
- package/dist/cjs/components/CookiesWarning.js +3 -3
- package/dist/cjs/components/Dadata.js +1 -1
- package/dist/cjs/components/DatePeriod.js +10 -8
- package/dist/cjs/components/DatePicker.js +6 -6
- package/dist/cjs/components/Drawer.js +1 -1
- package/dist/cjs/components/Dropdown/stories/__mock__.js +3 -2
- package/dist/cjs/components/Dropdown.js +2 -2
- package/dist/cjs/components/HeroTitle.js +1 -1
- package/dist/cjs/components/Icon.js +1 -1
- package/dist/cjs/components/Input.js +1 -1
- package/dist/cjs/components/InputPassword.js +1 -1
- package/dist/cjs/components/Label.js +2 -2
- package/dist/cjs/components/Loader.js +1 -1
- package/dist/cjs/components/MenuItem.js +12 -5
- package/dist/cjs/components/Modal.js +2 -2
- package/dist/cjs/components/Notification.js +1 -1
- package/dist/cjs/components/Pagination.js +2 -4
- package/dist/cjs/components/Response.js +3 -3
- package/dist/cjs/components/ScrollOnDrag.js +5 -3
- package/dist/cjs/components/Search.js +1 -1
- package/dist/cjs/components/Segmented/stories/__mock__.js +24 -9
- package/dist/cjs/components/Segmented.js +80 -51
- package/dist/cjs/components/Select.js +1 -1
- package/dist/cjs/components/Swiper.js +1 -1
- package/dist/cjs/components/Tab.js +1 -1
- package/dist/cjs/components/Textarea.js +8 -9
- package/dist/cjs/components/Tile.js +1 -1
- package/dist/cjs/components/Title.js +1 -1
- package/dist/cjs/components/Tooltip.js +1 -1
- package/dist/cjs/hooks/useStyles/styleAttributes.js +1 -1
- package/dist/components/Accordion.js +1 -1
- package/dist/components/Avatar.js +2 -2
- package/dist/components/AvatarStack.js +2 -2
- package/dist/components/Badge.js +1 -1
- package/dist/components/Breadcrumbs/stories/__mock__.js +13 -7
- package/dist/components/Breadcrumbs.js +17 -18
- package/dist/components/Button.js +3 -3
- package/dist/components/Cell.js +2 -2
- package/dist/components/Chips/stories/__mock__.js +29 -0
- package/dist/components/Chips.js +4 -4
- package/dist/components/Choice/stories/__mock__.js +15 -15
- package/dist/components/Choice.js +7 -7
- package/dist/components/CookiesWarning.js +3 -3
- package/dist/components/Dadata.js +1 -1
- package/dist/components/DatePeriod.js +10 -8
- package/dist/components/DatePicker.js +6 -6
- package/dist/components/Drawer.js +1 -1
- package/dist/components/Dropdown/stories/__mock__.js +3 -2
- package/dist/components/Dropdown.js +2 -2
- package/dist/components/HeroTitle.js +1 -1
- package/dist/components/Icon.js +1 -1
- package/dist/components/Input.js +1 -1
- package/dist/components/InputPassword.js +1 -1
- package/dist/components/Label.js +2 -2
- package/dist/components/Loader.js +1 -1
- package/dist/components/MenuItem.js +12 -5
- package/dist/components/Modal.js +2 -2
- package/dist/components/Notification.js +1 -1
- package/dist/components/Pagination.js +3 -5
- package/dist/components/Response.js +3 -3
- package/dist/components/ScrollOnDrag.js +7 -5
- package/dist/components/Search.js +1 -1
- package/dist/components/Segmented/stories/__mock__.js +23 -11
- package/dist/components/Segmented.js +80 -51
- package/dist/components/Select.js +1 -1
- package/dist/components/Swiper.js +1 -1
- package/dist/components/Tab.js +1 -1
- package/dist/components/Textarea.js +8 -9
- package/dist/components/Tile.js +1 -1
- package/dist/components/Title.js +1 -1
- package/dist/components/Tooltip.js +1 -1
- package/dist/css/components/Breadcrumbs/Breadcrumbs.css +15 -6
- package/dist/css/components/Chips/Chips.css +40 -14
- package/dist/css/components/Dropdown/Dropdown.css +7 -14
- package/dist/css/components/Loader/Loader.css +1 -19
- package/dist/css/components/MenuItem/MenuItem.css +22 -30
- package/dist/css/components/ScrollOnDrag/ScrollOnDrag.css +230 -4
- package/dist/css/components/Segmented/Segmented.css +53 -6
- package/dist/css/components/Segmented/css/__item/segmaented__item.css +31 -0
- package/dist/css/styles/centering/centering.css +17 -0
- package/dist/css/styles/shape-strength/shape-strength.css +10 -9
- package/dist/hooks/useStyles/styleAttributes.js +1 -1
- package/dist/stories/ChipsOverview.mdx +26 -14
- package/dist/stories/ChipsPlayground.mdx +3 -3
- package/dist/types/components/Breadcrumbs/appearance/breadcrumbsStyle.d.ts +5 -5
- package/dist/types/components/Breadcrumbs/stories/__mock__/index.d.ts +24 -1
- package/dist/types/components/Chips/Chips.interface.d.ts +1 -0
- package/dist/types/components/Chips/appearance/chipsAccent.d.ts +9 -1
- package/dist/types/components/Chips/appearance/chipsDanger.d.ts +16 -1
- package/dist/types/components/Chips/appearance/chipsError.d.ts +16 -1
- package/dist/types/components/Chips/appearance/chipsInfo.d.ts +16 -1
- package/dist/types/components/Chips/appearance/chipsPrimary.d.ts +11 -2
- package/dist/types/components/Chips/appearance/chipsSecondary.d.ts +10 -2
- package/dist/types/components/Chips/appearance/chipsSize.d.ts +34 -0
- package/dist/types/components/Chips/appearance/chipsStyle.d.ts +9 -9
- package/dist/types/components/Chips/appearance/chipsSuccess.d.ts +16 -1
- package/dist/types/components/Chips/appearance/chipsSurface.d.ts +11 -1
- package/dist/types/components/Chips/appearance/chipsWarning.d.ts +16 -1
- package/dist/types/components/Chips/stories/__mock__/index.d.ts +14 -0
- package/dist/types/components/Choice/appearance/choiceStyle.d.ts +5 -5
- package/dist/types/components/Choice/stories/__mock__/index.d.ts +3 -9
- package/dist/types/components/Input/appearance/inputDefault.d.ts +1 -0
- package/dist/types/components/Label/appearance/labelAccent.d.ts +0 -8
- package/dist/types/components/Label/appearance/labelDanger.d.ts +0 -12
- package/dist/types/components/Label/appearance/labelDisable.d.ts +2 -4
- package/dist/types/components/Label/appearance/labelError.d.ts +0 -8
- package/dist/types/components/Label/appearance/labelInfo.d.ts +0 -5
- package/dist/types/components/Label/appearance/labelPrimary.d.ts +0 -10
- package/dist/types/components/Label/appearance/labelSecondary.d.ts +0 -10
- package/dist/types/components/Label/appearance/labelSize.d.ts +6 -0
- package/dist/types/components/Label/appearance/labelStyle.d.ts +4 -4
- package/dist/types/components/Label/appearance/labelSuccess.d.ts +0 -8
- package/dist/types/components/Label/appearance/labelSurface.d.ts +0 -6
- package/dist/types/components/Label/appearance/labelWarning.d.ts +0 -9
- package/dist/types/components/MenuItem/appearance/menuItemSurface.d.ts +5 -0
- package/dist/types/components/Segmented/Segmented.interface.d.ts +5 -2
- package/dist/types/components/Segmented/appearance/segmentedDefault.d.ts +8 -11
- package/dist/types/components/Segmented/appearance/segmentedDisabled.d.ts +9 -11
- package/dist/types/components/Segmented/appearance/segmentedError.d.ts +9 -2
- package/dist/types/components/Segmented/appearance/segmentedSize.d.ts +5 -0
- package/dist/types/components/Segmented/appearance/segmentedStyle.d.ts +5 -3
- package/dist/types/components/Segmented/appearance/segmentedSuccess.d.ts +8 -0
- package/dist/types/components/Segmented/appearance/segmentedWarning.d.ts +9 -1
- package/dist/types/components/Segmented/stories/__mock__/index.d.ts +30 -8
- package/dist/types/components/Textarea/appearance/textareaDefault.d.ts +1 -0
- package/dist/types/components/Textarea/appearance/textareaStyle.d.ts +4 -4
- package/dist/types/context/UIContext.d.ts +3 -5
- package/package.json +3 -2
- package/dist/ChipsGroup_cjs_DdWjvr_S.js +0 -168
- package/dist/ChipsGroup_es_CXS0aeon.js +0 -163
|
@@ -5,19 +5,16 @@ declare const segmentedAppearanceDefault: {
|
|
|
5
5
|
fillActiveHover: string;
|
|
6
6
|
fillHover: string;
|
|
7
7
|
labelTextActiveColor: string;
|
|
8
|
+
labelTextActiveHoverColor: string;
|
|
8
9
|
labelTextColor: string;
|
|
10
|
+
iconAfterFill: string;
|
|
11
|
+
iconAfterFillActive: string;
|
|
12
|
+
iconBeforeFill: string;
|
|
13
|
+
iconBeforeFillActive: string;
|
|
14
|
+
iconFill: string;
|
|
15
|
+
iconFillActive: string;
|
|
9
16
|
indicatorFill: string;
|
|
10
|
-
|
|
11
|
-
};
|
|
12
|
-
defaultSecondary: {
|
|
13
|
-
fill: string;
|
|
14
|
-
fillActive: string;
|
|
15
|
-
fillActiveHover: string;
|
|
16
|
-
fillHover: string;
|
|
17
|
-
labelTextActiveColor: string;
|
|
18
|
-
labelTextColor: string;
|
|
19
|
-
indicatorFill: string;
|
|
20
|
-
shape: string;
|
|
17
|
+
inputBorderColor: string;
|
|
21
18
|
};
|
|
22
19
|
};
|
|
23
20
|
export { segmentedAppearanceDefault };
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
declare const segmentedAppearanceDisabled: {
|
|
2
2
|
disabledPrimary: {
|
|
3
3
|
fill: string;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
fillActive: string;
|
|
5
|
+
fillHover: string;
|
|
6
|
+
labelTextColor: string;
|
|
7
|
+
iconAfterFill: string;
|
|
8
|
+
iconAfterFillActive: string;
|
|
7
9
|
iconBeforeFill: string;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
borderColor: string;
|
|
13
|
-
borderHover: string;
|
|
14
|
-
iconBeforeFill: string;
|
|
15
|
-
iconClearFill: string;
|
|
10
|
+
iconBeforeFillActive: string;
|
|
11
|
+
iconFill: string;
|
|
12
|
+
iconFillActive: string;
|
|
13
|
+
inputBorderColor: string;
|
|
16
14
|
};
|
|
17
15
|
};
|
|
18
16
|
export { segmentedAppearanceDisabled };
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
declare const segmentedAppearanceError: {
|
|
2
|
-
|
|
2
|
+
errorPrimary: {
|
|
3
3
|
fill: string;
|
|
4
|
+
fillActive: string;
|
|
4
5
|
fillHover: string;
|
|
5
6
|
labelTextColor: string;
|
|
6
|
-
|
|
7
|
+
iconAfterFill: string;
|
|
8
|
+
iconAfterFillActive: string;
|
|
9
|
+
iconBeforeFill: string;
|
|
10
|
+
iconBeforeFillActive: string;
|
|
11
|
+
iconFill: string;
|
|
12
|
+
iconFillActive: string;
|
|
13
|
+
inputBorderColor: string;
|
|
7
14
|
};
|
|
8
15
|
};
|
|
9
16
|
export { segmentedAppearanceError };
|
|
@@ -2,22 +2,27 @@ declare const segmentedAppearanceSize: {
|
|
|
2
2
|
sizeL: {
|
|
3
3
|
size: string;
|
|
4
4
|
labelTextSize: string;
|
|
5
|
+
iconSize: string;
|
|
5
6
|
};
|
|
6
7
|
sizeM: {
|
|
7
8
|
size: string;
|
|
8
9
|
labelTextSize: string;
|
|
10
|
+
iconSize: string;
|
|
9
11
|
};
|
|
10
12
|
sizeS: {
|
|
11
13
|
size: string;
|
|
12
14
|
labelTextSize: string;
|
|
15
|
+
iconSize: string;
|
|
13
16
|
};
|
|
14
17
|
sizeXS: {
|
|
15
18
|
size: string;
|
|
16
19
|
labelTextSize: string;
|
|
20
|
+
iconSize: string;
|
|
17
21
|
};
|
|
18
22
|
sizeXSS: {
|
|
19
23
|
size: string;
|
|
20
24
|
labelTextSize: string;
|
|
25
|
+
iconSize: string;
|
|
21
26
|
};
|
|
22
27
|
};
|
|
23
28
|
export { segmentedAppearanceSize };
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
declare const segmentedAppearanceStyle: {
|
|
2
2
|
solid: {
|
|
3
|
-
|
|
3
|
+
inputBorderColor: string;
|
|
4
4
|
};
|
|
5
5
|
outlined: {
|
|
6
6
|
fill: string;
|
|
7
|
+
fillActive: string;
|
|
7
8
|
};
|
|
8
9
|
full: {
|
|
9
|
-
|
|
10
|
+
inputBorderColor: string;
|
|
10
11
|
};
|
|
11
12
|
ghost: {
|
|
12
13
|
fill: string;
|
|
13
|
-
|
|
14
|
+
fillActive: string;
|
|
15
|
+
inputBorderColor: string;
|
|
14
16
|
};
|
|
15
17
|
};
|
|
16
18
|
export { segmentedAppearanceStyle };
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
declare const segmentedAppearanceSuccess: {
|
|
2
2
|
successPrimary: {
|
|
3
3
|
fill: string;
|
|
4
|
+
fillActive: string;
|
|
4
5
|
fillHover: string;
|
|
5
6
|
labelTextColor: string;
|
|
6
7
|
labelTextColorHover: string;
|
|
8
|
+
iconAfterFill: string;
|
|
9
|
+
iconAfterFillActive: string;
|
|
10
|
+
iconBeforeFill: string;
|
|
11
|
+
iconBeforeFillActive: string;
|
|
12
|
+
iconFill: string;
|
|
13
|
+
iconFillActive: string;
|
|
14
|
+
inputBorderColor: string;
|
|
7
15
|
};
|
|
8
16
|
};
|
|
9
17
|
export { segmentedAppearanceSuccess };
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
declare const segmentedAppearanceWarning: {
|
|
2
|
-
|
|
2
|
+
warningPrimary: {
|
|
3
3
|
fill: string;
|
|
4
|
+
fillActive: string;
|
|
4
5
|
fillHover: string;
|
|
5
6
|
labelTextColor: string;
|
|
6
7
|
labelTextColorHover: string;
|
|
8
|
+
iconAfterFill: string;
|
|
9
|
+
iconAfterFillActive: string;
|
|
10
|
+
iconBeforeFill: string;
|
|
11
|
+
iconBeforeFillActive: string;
|
|
12
|
+
iconFill: string;
|
|
13
|
+
iconFillActive: string;
|
|
14
|
+
inputBorderColor: string;
|
|
7
15
|
};
|
|
8
16
|
};
|
|
9
17
|
export { segmentedAppearanceWarning };
|
|
@@ -4,14 +4,36 @@ declare const segmentedArgsMock: {
|
|
|
4
4
|
};
|
|
5
5
|
segments: {
|
|
6
6
|
label: string;
|
|
7
|
-
iconAfter:
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
-
iconBefore: {
|
|
11
|
-
Default: any;
|
|
12
|
-
};
|
|
7
|
+
iconAfter: any;
|
|
8
|
+
iconBefore: any;
|
|
13
9
|
value: number;
|
|
14
10
|
}[];
|
|
15
|
-
shape: string;
|
|
16
11
|
};
|
|
17
|
-
|
|
12
|
+
declare const segmentedArgsLabelMock: {
|
|
13
|
+
label: string;
|
|
14
|
+
value: number;
|
|
15
|
+
}[];
|
|
16
|
+
declare const segmentedArgsIconMock: {
|
|
17
|
+
iconBefore: string | undefined;
|
|
18
|
+
}[];
|
|
19
|
+
declare const segmentedArgsMockSize: {
|
|
20
|
+
14: {
|
|
21
|
+
iconAfter: any;
|
|
22
|
+
iconBefore: any;
|
|
23
|
+
label: string;
|
|
24
|
+
value: number;
|
|
25
|
+
}[];
|
|
26
|
+
16: {
|
|
27
|
+
iconAfter: any;
|
|
28
|
+
iconBefore: any;
|
|
29
|
+
label: string;
|
|
30
|
+
value: number;
|
|
31
|
+
}[];
|
|
32
|
+
20: {
|
|
33
|
+
iconAfter: any;
|
|
34
|
+
iconBefore: any;
|
|
35
|
+
label: string;
|
|
36
|
+
value: number;
|
|
37
|
+
}[];
|
|
38
|
+
};
|
|
39
|
+
export { segmentedArgsMock, segmentedArgsLabelMock, segmentedArgsMockSize, segmentedArgsIconMock, };
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
type
|
|
3
|
-
interface iUIProvider {
|
|
2
|
+
type UIProviderProps = {
|
|
4
3
|
children?: ReactNode;
|
|
5
|
-
deviceCurrentMainType: DeviceType;
|
|
6
4
|
userDeviceState?: {
|
|
7
5
|
isDesktop?: boolean;
|
|
8
6
|
isMobile?: boolean;
|
|
9
7
|
isTablet?: boolean;
|
|
10
8
|
};
|
|
11
|
-
}
|
|
12
|
-
declare const UIProvider: import("react").NamedExoticComponent<
|
|
9
|
+
};
|
|
10
|
+
declare const UIProvider: import("react").NamedExoticComponent<UIProviderProps>;
|
|
13
11
|
declare function useUserDeviceContext(): {
|
|
14
12
|
isMobile: boolean;
|
|
15
13
|
isTablet: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itcase/ui",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.36",
|
|
4
4
|
"description": "UI components (Modal, Loader, Popup, etc)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Modal",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"dependencies": {
|
|
98
98
|
"@emotion/is-prop-valid": "^1.3.1",
|
|
99
99
|
"@itcase/common": "^1.2.28",
|
|
100
|
-
"@itcase/icons": "^1.2.
|
|
100
|
+
"@itcase/icons": "^1.2.5",
|
|
101
101
|
"@itcase/storybook-config": "^1.1.14",
|
|
102
102
|
"@itcase/tokens-am": "^1.1.9",
|
|
103
103
|
"@itcase/tokens-baikal": "^1.1.9",
|
|
@@ -126,6 +126,7 @@
|
|
|
126
126
|
"react-scroll": "^1.9.3",
|
|
127
127
|
"react-scrollbars-custom": "^4.1.1",
|
|
128
128
|
"react-select": "^5.10.1",
|
|
129
|
+
"simplebar-react": "^3.3.1",
|
|
129
130
|
"swiper": "^11.2.8",
|
|
130
131
|
"uuid": "^11.1.0"
|
|
131
132
|
},
|
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var tslib_es6 = require('./tslib.es6_cjs_CCZ3TN_7.js');
|
|
4
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
-
var React = require('react');
|
|
6
|
-
var clsx = require('clsx');
|
|
7
|
-
var useDevicePropsGenerator = require('./cjs/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
8
|
-
var useStyles = require('./cjs/hooks/useStyles/useStyles.js');
|
|
9
|
-
var Tooltip = require('./Tooltip_cjs_DinScDnC.js');
|
|
10
|
-
var Text = require('./Text_cjs_C9fOm0nd.js');
|
|
11
|
-
|
|
12
|
-
var chipsAppearanceAccent = {
|
|
13
|
-
accent: {
|
|
14
|
-
fill: 'accentPrimary',
|
|
15
|
-
fillHover: 'accentPrimaryHover',
|
|
16
|
-
labelTextColor: 'accentTextPrimary',
|
|
17
|
-
borderColor: 'accentBorderSecondary',
|
|
18
|
-
},
|
|
19
|
-
accentPrimary: {
|
|
20
|
-
fill: 'accentPrimary',
|
|
21
|
-
fillHover: 'accentPrimaryHover',
|
|
22
|
-
labelTextColor: 'accentTextPrimary',
|
|
23
|
-
borderColor: 'accentBorderSecondary',
|
|
24
|
-
},
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
var chipsAppearanceDanger = {};
|
|
28
|
-
|
|
29
|
-
var chipsAppearanceDisabled = {
|
|
30
|
-
disabled: {
|
|
31
|
-
fill: 'disabledPrimary',
|
|
32
|
-
fillActive: 'disabledPrimary',
|
|
33
|
-
fillHover: 'disabledPrimary',
|
|
34
|
-
labelTextColor: 'disabledTextPrimary',
|
|
35
|
-
labelTextHoverColor: 'disabledTextPrimary',
|
|
36
|
-
borderColor: 'disabledBorderPrimary',
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
var chipsAppearanceError = {};
|
|
41
|
-
|
|
42
|
-
var chipsAppearanceInfo = {};
|
|
43
|
-
|
|
44
|
-
var chipsAppearancePrimary = {
|
|
45
|
-
primary: {
|
|
46
|
-
fill: 'primaryPrimary',
|
|
47
|
-
fillHover: 'primaryPrimaryHover',
|
|
48
|
-
labelTextColor: 'primaryTextPrimary',
|
|
49
|
-
},
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
var chipsAppearanceSecondary = {
|
|
53
|
-
secondary: {
|
|
54
|
-
fill: 'secondaryPrimary',
|
|
55
|
-
fillHover: 'secondaryPrimaryHover',
|
|
56
|
-
labelTextColor: 'secondaryTextPrimary',
|
|
57
|
-
borderColor: 'secondaryBorderSecondary',
|
|
58
|
-
},
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
var chipsAppearanceSize = {
|
|
62
|
-
sizeL: {
|
|
63
|
-
size: 'l',
|
|
64
|
-
labelTextSize: 'm',
|
|
65
|
-
},
|
|
66
|
-
sizeM: {
|
|
67
|
-
size: 'm',
|
|
68
|
-
labelTextSize: 's',
|
|
69
|
-
},
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
var chipsAppearanceStyle = {
|
|
73
|
-
full: {
|
|
74
|
-
borderColor: null,
|
|
75
|
-
},
|
|
76
|
-
ghost: {
|
|
77
|
-
fill: null,
|
|
78
|
-
borderColor: null,
|
|
79
|
-
},
|
|
80
|
-
outlined: {
|
|
81
|
-
fill: null,
|
|
82
|
-
},
|
|
83
|
-
solid: {
|
|
84
|
-
borderColor: null,
|
|
85
|
-
},
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
var chipsAppearanceSuccess = {};
|
|
89
|
-
|
|
90
|
-
var chipsAppearanceSurface = {
|
|
91
|
-
surfacePrimary: {
|
|
92
|
-
fill: 'surfacePrimary',
|
|
93
|
-
fillActive: 'accentPrimary',
|
|
94
|
-
fillActiveHover: 'accentSecondary',
|
|
95
|
-
fillHover: 'surfaceHover',
|
|
96
|
-
labelTextActiveColor: 'accentTextPrimary',
|
|
97
|
-
labelTextColor: 'surfaceTextPrimary',
|
|
98
|
-
labelTextHoverColor: 'surfaceTextPrimary',
|
|
99
|
-
borderColor: 'surfaceBorderTertiary',
|
|
100
|
-
activeIconItemFill: 'surfaceItemSecondary',
|
|
101
|
-
iconBeforeFillIcon: 'surfaceItemPrimary',
|
|
102
|
-
badgeAppearance: 'surfacePrimary sizeXS solid'
|
|
103
|
-
},
|
|
104
|
-
surfaceSecondary: {
|
|
105
|
-
fill: 'surfaceSecondary',
|
|
106
|
-
fillHover: 'surfaceHover',
|
|
107
|
-
labelTextColor: 'surfaceTextPrimary',
|
|
108
|
-
borderColor: 'surfaceBorderSecondary',
|
|
109
|
-
},
|
|
110
|
-
surfaceTertiary: {
|
|
111
|
-
fill: 'surfaceTertiary',
|
|
112
|
-
fillHover: 'surfaceHover',
|
|
113
|
-
labelTextColor: 'surfaceTextPrimary',
|
|
114
|
-
borderColor: 'surfaceBorderTertiary',
|
|
115
|
-
},
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
var chipsAppearanceWarning = {};
|
|
119
|
-
|
|
120
|
-
var chipsAppearance = tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign({}, chipsAppearanceSize), chipsAppearanceStyle), chipsAppearanceAccent), chipsAppearanceDanger), chipsAppearanceError), chipsAppearanceInfo), chipsAppearancePrimary), chipsAppearanceSecondary), chipsAppearanceSuccess), chipsAppearanceSurface), chipsAppearanceWarning), chipsAppearanceDisabled);
|
|
121
|
-
|
|
122
|
-
var chipsConfig = {
|
|
123
|
-
appearance: chipsAppearance,
|
|
124
|
-
setAppearance: function (appearanceConfig) {
|
|
125
|
-
chipsConfig.appearance = appearanceConfig;
|
|
126
|
-
},
|
|
127
|
-
};
|
|
128
|
-
function Chips(props) {
|
|
129
|
-
var className = props.className, appearance = props.appearance, _a = props.label, label = _a === void 0 ? '' : _a, isDisabled = props.isDisabled, dataTestId = props.dataTestId, dataTour = props.dataTour, iconAfter = props.iconAfter, iconAfterSrc = props.iconAfterSrc, iconBefore = props.iconBefore, iconBeforeSrc = props.iconBeforeSrc, isActive = props.isActive, onClick = props.onClick, children = props.children;
|
|
130
|
-
var appearanceConfig = React.useMemo(function () {
|
|
131
|
-
if (appearance) {
|
|
132
|
-
var appearanceProps = appearance.split(' ').reduce(function (resultConfig, appearanceKey) {
|
|
133
|
-
var _a;
|
|
134
|
-
return (tslib_es6.__assign(tslib_es6.__assign({}, resultConfig), (_a = chipsConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
135
|
-
}, {});
|
|
136
|
-
if (isDisabled && chipsConfig.appearance.disabled) {
|
|
137
|
-
Object.assign(appearanceProps, chipsConfig.appearance.disabled);
|
|
138
|
-
}
|
|
139
|
-
return appearanceProps;
|
|
140
|
-
}
|
|
141
|
-
if (isDisabled) {
|
|
142
|
-
return chipsConfig.appearance.disabled;
|
|
143
|
-
}
|
|
144
|
-
return {};
|
|
145
|
-
}, [appearance, isDisabled]);
|
|
146
|
-
var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
|
|
147
|
-
var alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, fillActiveClass = propsGenerator.fillActiveClass, fillActiveHoverClass = propsGenerator.fillActiveHoverClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, labelTextActiveColor = propsGenerator.labelTextActiveColor, labelTextActiveHoverColor = propsGenerator.labelTextActiveHoverColor, labelTextColor = propsGenerator.labelTextColor, labelTextHoverColor = propsGenerator.labelTextHoverColor, labelTextSize = propsGenerator.labelTextSize, labelTextWeight = propsGenerator.labelTextWeight, labelTextWrap = propsGenerator.labelTextWrap, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, badgeAppearance = propsGenerator.badgeAppearance, badgeShape = propsGenerator.badgeShape, badgeSize = propsGenerator.badgeSize, badgeTextColor = propsGenerator.badgeTextColor, badgeTextSize = propsGenerator.badgeTextSize, badgeValue = propsGenerator.badgeValue, cursorClass = propsGenerator.cursorClass, iconAfterFill = propsGenerator.iconAfterFill, iconAfterFillIcon = propsGenerator.iconAfterFillIcon, iconAfterFillSize = propsGenerator.iconAfterFillSize, iconAfterShape = propsGenerator.iconAfterShape, iconAfterSize = propsGenerator.iconAfterSize, iconBeforeFill = propsGenerator.iconBeforeFill, iconBeforeFillIcon = propsGenerator.iconBeforeFillIcon, iconBeforeFillSize = propsGenerator.iconBeforeFillSize, iconBeforeShape = propsGenerator.iconBeforeShape, iconBeforeSize = propsGenerator.iconBeforeSize, shapeClass = propsGenerator.shapeClass, sizeClass = propsGenerator.sizeClass;
|
|
148
|
-
var chipsStyles = useStyles.useStyles(props).styles;
|
|
149
|
-
return (jsxRuntime.jsx("div", { className: clsx(className, 'chips', isActive && 'chips_state_active', !isActive
|
|
150
|
-
? fillClass && "fill_".concat(fillClass)
|
|
151
|
-
: fillActiveClass && "fill_active_".concat(fillActiveClass), !isActive
|
|
152
|
-
? fillHoverClass && "fill_hover_".concat(fillHoverClass)
|
|
153
|
-
: fillActiveHoverClass && "fill_active_hover_".concat(fillActiveHoverClass), shapeClass && "chips_shape_".concat(shapeClass), borderColorClass && "border-color_".concat(borderColorClass), borderTypeClass && "border_type_".concat(borderTypeClass), sizeClass && "chips_size_".concat(sizeClass), alignDirectionClass && "align_".concat(alignDirectionClass), alignClass && "align_".concat(alignClass), isDisabled && "chips_state_disabled", cursorClass && "cursor_".concat(cursorClass), onClick && 'cursor_type_pointer'), "data-testid": dataTestId && "".concat(dataTestId, "Chips"), "data-tour": dataTour, style: chipsStyles, onClick: !isDisabled ? onClick : undefined, children: jsxRuntime.jsxs("div", { className: "chips__inner", children: [(iconBefore || iconBeforeSrc) && (jsxRuntime.jsx(Tooltip.Icon, { className: "chips__icon_before", size: iconBeforeSize, fill: iconBeforeFill, fillSize: iconBeforeFillSize, iconFill: iconBeforeFillIcon, imageSrc: iconBeforeSrc, shape: iconBeforeShape, SvgImage: iconBefore })), typeof label === 'string' ? (jsxRuntime.jsx(Text.Text, { className: "chips__label", size: labelTextSize, textColor: labelTextColor, textColorActive: labelTextActiveColor, textColorActiveHover: labelTextActiveHoverColor, textColorHover: labelTextHoverColor, textWeight: labelTextWeight, textWrap: labelTextWrap, isActive: isActive, children: label })) : (jsxRuntime.jsx("div", { className: "chips__label", children: label })), children, (iconAfter || iconAfterSrc) && (jsxRuntime.jsx(Tooltip.Icon, { className: "chips__icon_after", size: iconAfterSize, fill: iconAfterFill, fillSize: iconAfterFillSize, iconFill: iconAfterFillIcon, imageSrc: iconAfterSrc, shape: iconAfterShape, SvgImage: iconAfter })), badgeValue && (jsxRuntime.jsx(Tooltip.Badge, { className: "chips__badge", appearance: badgeAppearance, size: badgeSize, textColor: badgeTextColor, textSize: badgeTextSize, shape: badgeShape, value: badgeValue }))] }) }));
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
function ChipsGroup(props) {
|
|
157
|
-
var className = props.className, dataTestId = props.dataTestId, dataTour = props.dataTour, horizontalScroll = props.horizontalScroll, style = props.style, set = props.set, children = props.children;
|
|
158
|
-
var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props);
|
|
159
|
-
var directionClass = propsGenerator.directionClass, alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, fillClass = propsGenerator.fillClass, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, borderWidthClass = propsGenerator.borderWidthClass, contentAlignClass = propsGenerator.contentAlignClass, widthClass = propsGenerator.widthClass, wrapClass = propsGenerator.wrapClass;
|
|
160
|
-
// @ts-expect-error
|
|
161
|
-
var _a = useStyles.useStyles(props), groupStyles = _a.styles, groupWrapperStyles = _a.wrapper;
|
|
162
|
-
return (jsxRuntime.jsx("div", { className: clsx(className, 'chips-group', 'group', widthClass && "width_".concat(widthClass), contentAlignClass && "group_content-align_".concat(contentAlignClass), alignDirectionClass && "align_".concat(alignDirectionClass), directionClass && "group_direction_".concat(directionClass), alignClass && "align_".concat(alignClass), fillClass && "fill_".concat(fillClass), set && "group_set_".concat(set), horizontalScroll && 'group_type_horizontal_scroll', wrapClass && "group_wrap_".concat(wrapClass), borderColorClass && "border-color_".concat(borderColorClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass)), "data-testid": dataTestId, "data-tour": dataTour, style: Object.assign({}, groupStyles, style), children: horizontalScroll ? (jsxRuntime.jsx("div", { className: "chips-group__wrapper", style: groupWrapperStyles, children: children })) : (children) }));
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
exports.Chips = Chips;
|
|
166
|
-
exports.ChipsGroup = ChipsGroup;
|
|
167
|
-
exports.chipsAppearance = chipsAppearance;
|
|
168
|
-
exports.chipsConfig = chipsConfig;
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
import { _ as __assign } from './tslib.es6_es_Bwu1Cn-t.js';
|
|
2
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
-
import { useMemo } from 'react';
|
|
4
|
-
import clsx from 'clsx';
|
|
5
|
-
import { useDevicePropsGenerator } from './hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
6
|
-
import { useStyles } from './hooks/useStyles/useStyles.js';
|
|
7
|
-
import { I as Icon, B as Badge } from './Tooltip_es_B0nm9irO.js';
|
|
8
|
-
import { T as Text } from './Text_es_BfLRfj-5.js';
|
|
9
|
-
|
|
10
|
-
var chipsAppearanceAccent = {
|
|
11
|
-
accent: {
|
|
12
|
-
fill: 'accentPrimary',
|
|
13
|
-
fillHover: 'accentPrimaryHover',
|
|
14
|
-
labelTextColor: 'accentTextPrimary',
|
|
15
|
-
borderColor: 'accentBorderSecondary',
|
|
16
|
-
},
|
|
17
|
-
accentPrimary: {
|
|
18
|
-
fill: 'accentPrimary',
|
|
19
|
-
fillHover: 'accentPrimaryHover',
|
|
20
|
-
labelTextColor: 'accentTextPrimary',
|
|
21
|
-
borderColor: 'accentBorderSecondary',
|
|
22
|
-
},
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
var chipsAppearanceDanger = {};
|
|
26
|
-
|
|
27
|
-
var chipsAppearanceDisabled = {
|
|
28
|
-
disabled: {
|
|
29
|
-
fill: 'disabledPrimary',
|
|
30
|
-
fillActive: 'disabledPrimary',
|
|
31
|
-
fillHover: 'disabledPrimary',
|
|
32
|
-
labelTextColor: 'disabledTextPrimary',
|
|
33
|
-
labelTextHoverColor: 'disabledTextPrimary',
|
|
34
|
-
borderColor: 'disabledBorderPrimary',
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
var chipsAppearanceError = {};
|
|
39
|
-
|
|
40
|
-
var chipsAppearanceInfo = {};
|
|
41
|
-
|
|
42
|
-
var chipsAppearancePrimary = {
|
|
43
|
-
primary: {
|
|
44
|
-
fill: 'primaryPrimary',
|
|
45
|
-
fillHover: 'primaryPrimaryHover',
|
|
46
|
-
labelTextColor: 'primaryTextPrimary',
|
|
47
|
-
},
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
var chipsAppearanceSecondary = {
|
|
51
|
-
secondary: {
|
|
52
|
-
fill: 'secondaryPrimary',
|
|
53
|
-
fillHover: 'secondaryPrimaryHover',
|
|
54
|
-
labelTextColor: 'secondaryTextPrimary',
|
|
55
|
-
borderColor: 'secondaryBorderSecondary',
|
|
56
|
-
},
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
var chipsAppearanceSize = {
|
|
60
|
-
sizeL: {
|
|
61
|
-
size: 'l',
|
|
62
|
-
labelTextSize: 'm',
|
|
63
|
-
},
|
|
64
|
-
sizeM: {
|
|
65
|
-
size: 'm',
|
|
66
|
-
labelTextSize: 's',
|
|
67
|
-
},
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
var chipsAppearanceStyle = {
|
|
71
|
-
full: {
|
|
72
|
-
borderColor: null,
|
|
73
|
-
},
|
|
74
|
-
ghost: {
|
|
75
|
-
fill: null,
|
|
76
|
-
borderColor: null,
|
|
77
|
-
},
|
|
78
|
-
outlined: {
|
|
79
|
-
fill: null,
|
|
80
|
-
},
|
|
81
|
-
solid: {
|
|
82
|
-
borderColor: null,
|
|
83
|
-
},
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
var chipsAppearanceSuccess = {};
|
|
87
|
-
|
|
88
|
-
var chipsAppearanceSurface = {
|
|
89
|
-
surfacePrimary: {
|
|
90
|
-
fill: 'surfacePrimary',
|
|
91
|
-
fillActive: 'accentPrimary',
|
|
92
|
-
fillActiveHover: 'accentSecondary',
|
|
93
|
-
fillHover: 'surfaceHover',
|
|
94
|
-
labelTextActiveColor: 'accentTextPrimary',
|
|
95
|
-
labelTextColor: 'surfaceTextPrimary',
|
|
96
|
-
labelTextHoverColor: 'surfaceTextPrimary',
|
|
97
|
-
borderColor: 'surfaceBorderTertiary',
|
|
98
|
-
activeIconItemFill: 'surfaceItemSecondary',
|
|
99
|
-
iconBeforeFillIcon: 'surfaceItemPrimary',
|
|
100
|
-
badgeAppearance: 'surfacePrimary sizeXS solid'
|
|
101
|
-
},
|
|
102
|
-
surfaceSecondary: {
|
|
103
|
-
fill: 'surfaceSecondary',
|
|
104
|
-
fillHover: 'surfaceHover',
|
|
105
|
-
labelTextColor: 'surfaceTextPrimary',
|
|
106
|
-
borderColor: 'surfaceBorderSecondary',
|
|
107
|
-
},
|
|
108
|
-
surfaceTertiary: {
|
|
109
|
-
fill: 'surfaceTertiary',
|
|
110
|
-
fillHover: 'surfaceHover',
|
|
111
|
-
labelTextColor: 'surfaceTextPrimary',
|
|
112
|
-
borderColor: 'surfaceBorderTertiary',
|
|
113
|
-
},
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
var chipsAppearanceWarning = {};
|
|
117
|
-
|
|
118
|
-
var chipsAppearance = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, chipsAppearanceSize), chipsAppearanceStyle), chipsAppearanceAccent), chipsAppearanceDanger), chipsAppearanceError), chipsAppearanceInfo), chipsAppearancePrimary), chipsAppearanceSecondary), chipsAppearanceSuccess), chipsAppearanceSurface), chipsAppearanceWarning), chipsAppearanceDisabled);
|
|
119
|
-
|
|
120
|
-
var chipsConfig = {
|
|
121
|
-
appearance: chipsAppearance,
|
|
122
|
-
setAppearance: function (appearanceConfig) {
|
|
123
|
-
chipsConfig.appearance = appearanceConfig;
|
|
124
|
-
},
|
|
125
|
-
};
|
|
126
|
-
function Chips(props) {
|
|
127
|
-
var className = props.className, appearance = props.appearance, _a = props.label, label = _a === void 0 ? '' : _a, isDisabled = props.isDisabled, dataTestId = props.dataTestId, dataTour = props.dataTour, iconAfter = props.iconAfter, iconAfterSrc = props.iconAfterSrc, iconBefore = props.iconBefore, iconBeforeSrc = props.iconBeforeSrc, isActive = props.isActive, onClick = props.onClick, children = props.children;
|
|
128
|
-
var appearanceConfig = useMemo(function () {
|
|
129
|
-
if (appearance) {
|
|
130
|
-
var appearanceProps = appearance.split(' ').reduce(function (resultConfig, appearanceKey) {
|
|
131
|
-
var _a;
|
|
132
|
-
return (__assign(__assign({}, resultConfig), (_a = chipsConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
133
|
-
}, {});
|
|
134
|
-
if (isDisabled && chipsConfig.appearance.disabled) {
|
|
135
|
-
Object.assign(appearanceProps, chipsConfig.appearance.disabled);
|
|
136
|
-
}
|
|
137
|
-
return appearanceProps;
|
|
138
|
-
}
|
|
139
|
-
if (isDisabled) {
|
|
140
|
-
return chipsConfig.appearance.disabled;
|
|
141
|
-
}
|
|
142
|
-
return {};
|
|
143
|
-
}, [appearance, isDisabled]);
|
|
144
|
-
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
145
|
-
var alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, fillActiveClass = propsGenerator.fillActiveClass, fillActiveHoverClass = propsGenerator.fillActiveHoverClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, labelTextActiveColor = propsGenerator.labelTextActiveColor, labelTextActiveHoverColor = propsGenerator.labelTextActiveHoverColor, labelTextColor = propsGenerator.labelTextColor, labelTextHoverColor = propsGenerator.labelTextHoverColor, labelTextSize = propsGenerator.labelTextSize, labelTextWeight = propsGenerator.labelTextWeight, labelTextWrap = propsGenerator.labelTextWrap, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, badgeAppearance = propsGenerator.badgeAppearance, badgeShape = propsGenerator.badgeShape, badgeSize = propsGenerator.badgeSize, badgeTextColor = propsGenerator.badgeTextColor, badgeTextSize = propsGenerator.badgeTextSize, badgeValue = propsGenerator.badgeValue, cursorClass = propsGenerator.cursorClass, iconAfterFill = propsGenerator.iconAfterFill, iconAfterFillIcon = propsGenerator.iconAfterFillIcon, iconAfterFillSize = propsGenerator.iconAfterFillSize, iconAfterShape = propsGenerator.iconAfterShape, iconAfterSize = propsGenerator.iconAfterSize, iconBeforeFill = propsGenerator.iconBeforeFill, iconBeforeFillIcon = propsGenerator.iconBeforeFillIcon, iconBeforeFillSize = propsGenerator.iconBeforeFillSize, iconBeforeShape = propsGenerator.iconBeforeShape, iconBeforeSize = propsGenerator.iconBeforeSize, shapeClass = propsGenerator.shapeClass, sizeClass = propsGenerator.sizeClass;
|
|
146
|
-
var chipsStyles = useStyles(props).styles;
|
|
147
|
-
return (jsx("div", { className: clsx(className, 'chips', isActive && 'chips_state_active', !isActive
|
|
148
|
-
? fillClass && "fill_".concat(fillClass)
|
|
149
|
-
: fillActiveClass && "fill_active_".concat(fillActiveClass), !isActive
|
|
150
|
-
? fillHoverClass && "fill_hover_".concat(fillHoverClass)
|
|
151
|
-
: fillActiveHoverClass && "fill_active_hover_".concat(fillActiveHoverClass), shapeClass && "chips_shape_".concat(shapeClass), borderColorClass && "border-color_".concat(borderColorClass), borderTypeClass && "border_type_".concat(borderTypeClass), sizeClass && "chips_size_".concat(sizeClass), alignDirectionClass && "align_".concat(alignDirectionClass), alignClass && "align_".concat(alignClass), isDisabled && "chips_state_disabled", cursorClass && "cursor_".concat(cursorClass), onClick && 'cursor_type_pointer'), "data-testid": dataTestId && "".concat(dataTestId, "Chips"), "data-tour": dataTour, style: chipsStyles, onClick: !isDisabled ? onClick : undefined, children: jsxs("div", { className: "chips__inner", children: [(iconBefore || iconBeforeSrc) && (jsx(Icon, { className: "chips__icon_before", size: iconBeforeSize, fill: iconBeforeFill, fillSize: iconBeforeFillSize, iconFill: iconBeforeFillIcon, imageSrc: iconBeforeSrc, shape: iconBeforeShape, SvgImage: iconBefore })), typeof label === 'string' ? (jsx(Text, { className: "chips__label", size: labelTextSize, textColor: labelTextColor, textColorActive: labelTextActiveColor, textColorActiveHover: labelTextActiveHoverColor, textColorHover: labelTextHoverColor, textWeight: labelTextWeight, textWrap: labelTextWrap, isActive: isActive, children: label })) : (jsx("div", { className: "chips__label", children: label })), children, (iconAfter || iconAfterSrc) && (jsx(Icon, { className: "chips__icon_after", size: iconAfterSize, fill: iconAfterFill, fillSize: iconAfterFillSize, iconFill: iconAfterFillIcon, imageSrc: iconAfterSrc, shape: iconAfterShape, SvgImage: iconAfter })), badgeValue && (jsx(Badge, { className: "chips__badge", appearance: badgeAppearance, size: badgeSize, textColor: badgeTextColor, textSize: badgeTextSize, shape: badgeShape, value: badgeValue }))] }) }));
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
function ChipsGroup(props) {
|
|
155
|
-
var className = props.className, dataTestId = props.dataTestId, dataTour = props.dataTour, horizontalScroll = props.horizontalScroll, style = props.style, set = props.set, children = props.children;
|
|
156
|
-
var propsGenerator = useDevicePropsGenerator(props);
|
|
157
|
-
var directionClass = propsGenerator.directionClass, alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, fillClass = propsGenerator.fillClass, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, borderWidthClass = propsGenerator.borderWidthClass, contentAlignClass = propsGenerator.contentAlignClass, widthClass = propsGenerator.widthClass, wrapClass = propsGenerator.wrapClass;
|
|
158
|
-
// @ts-expect-error
|
|
159
|
-
var _a = useStyles(props), groupStyles = _a.styles, groupWrapperStyles = _a.wrapper;
|
|
160
|
-
return (jsx("div", { className: clsx(className, 'chips-group', 'group', widthClass && "width_".concat(widthClass), contentAlignClass && "group_content-align_".concat(contentAlignClass), alignDirectionClass && "align_".concat(alignDirectionClass), directionClass && "group_direction_".concat(directionClass), alignClass && "align_".concat(alignClass), fillClass && "fill_".concat(fillClass), set && "group_set_".concat(set), horizontalScroll && 'group_type_horizontal_scroll', wrapClass && "group_wrap_".concat(wrapClass), borderColorClass && "border-color_".concat(borderColorClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass)), "data-testid": dataTestId, "data-tour": dataTour, style: Object.assign({}, groupStyles, style), children: horizontalScroll ? (jsx("div", { className: "chips-group__wrapper", style: groupWrapperStyles, children: children })) : (children) }));
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
export { Chips as C, chipsAppearance as a, ChipsGroup as b, chipsConfig as c };
|