@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,7 +5,7 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var clsx = require('clsx');
|
|
7
7
|
var useDevicePropsGenerator = require('./cjs/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
8
|
-
var Tooltip = require('./
|
|
8
|
+
var Tooltip = require('./Tooltip_cjs_oS1iOamX.js');
|
|
9
9
|
var Image = require('./Image_cjs_CCWqbNn4.js');
|
|
10
10
|
var Text = require('./Text_cjs_C9fOm0nd.js');
|
|
11
11
|
|
|
@@ -3,7 +3,7 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
3
3
|
import { useMemo } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { useDevicePropsGenerator } from './hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
6
|
-
import { I as Icon, B as Badge } from './
|
|
6
|
+
import { I as Icon, B as Badge } from './Tooltip_es_LV5ZNg3B.js';
|
|
7
7
|
import { I as Image } from './Image_es_DZUVp0FS.js';
|
|
8
8
|
import { T as Text } from './Text_es_BfLRfj-5.js';
|
|
9
9
|
|
|
@@ -4,9 +4,9 @@ var tslib_es6 = require('./tslib.es6_cjs_CCZ3TN_7.js');
|
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var clsx = require('clsx');
|
|
7
|
-
var Tooltip = require('./
|
|
7
|
+
var Tooltip = require('./Tooltip_cjs_oS1iOamX.js');
|
|
8
8
|
var Link = require('./Link_cjs_DbRGq2Yk.js');
|
|
9
|
-
var Loader = require('./
|
|
9
|
+
var Loader = require('./Loader_cjs_Ca4i0sER.js');
|
|
10
10
|
var Text = require('./Text_cjs_C9fOm0nd.js');
|
|
11
11
|
var useDevicePropsGenerator = require('./cjs/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
12
12
|
var useStyles = require('./cjs/hooks/useStyles/useStyles.js');
|
|
@@ -2,9 +2,9 @@ import { _ as __assign } from './tslib.es6_es_Bwu1Cn-t.js';
|
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
|
-
import { I as Icon } from './
|
|
5
|
+
import { I as Icon } from './Tooltip_es_LV5ZNg3B.js';
|
|
6
6
|
import { a as LinkWrapper } from './Link_es_DxtZLeKY.js';
|
|
7
|
-
import { L as Loader } from './
|
|
7
|
+
import { L as Loader } from './Loader_es_GYOr0UTX.js';
|
|
8
8
|
import { T as Text } from './Text_es_BfLRfj-5.js';
|
|
9
9
|
import { useDevicePropsGenerator } from './hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
10
10
|
import { useStyles } from './hooks/useStyles/useStyles.js';
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var clsx = require('clsx');
|
|
5
|
+
var tslib_es6 = require('./tslib.es6_cjs_CCZ3TN_7.js');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var useDevicePropsGenerator = require('./cjs/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
8
|
+
var useStyles = require('./cjs/hooks/useStyles/useStyles.js');
|
|
9
|
+
var Tooltip = require('./Tooltip_cjs_oS1iOamX.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
|
+
accentMutedPrimary: {
|
|
20
|
+
fill: 'accentMutedPrimary',
|
|
21
|
+
labelTextColor: 'accentMutedTextPrimary',
|
|
22
|
+
borderColor: 'accentMutedBorderSecondary',
|
|
23
|
+
iconAfterFillIcon: 'accentMutedItemPrimary',
|
|
24
|
+
iconBeforeFillIcon: 'accentMutedItemPrimary',
|
|
25
|
+
},
|
|
26
|
+
accentPrimary: {
|
|
27
|
+
fill: 'accentPrimary',
|
|
28
|
+
labelTextColor: 'accentTextPrimary',
|
|
29
|
+
borderColor: 'accentBorderSecondary',
|
|
30
|
+
iconAfterFillIcon: 'accentItemPrimary',
|
|
31
|
+
iconBeforeFillIcon: 'accentItemPrimary',
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
var chipsAppearanceDanger = {
|
|
36
|
+
dangerMutedPrimary: {
|
|
37
|
+
fill: 'dangerMutedPrimary',
|
|
38
|
+
labelTextColor: 'dangerMutedTextPrimary',
|
|
39
|
+
borderColor: 'dangerMutedBorderSecondary',
|
|
40
|
+
iconAfterFillIcon: 'dangerMutedItemPrimary',
|
|
41
|
+
iconBeforeFillIcon: 'dangerMutedItemPrimary',
|
|
42
|
+
},
|
|
43
|
+
dangerPrimary: {
|
|
44
|
+
fill: 'dangerPrimary',
|
|
45
|
+
labelTextColor: 'dangerTextPrimary',
|
|
46
|
+
borderColor: 'dangerBorderSecondary',
|
|
47
|
+
iconAfterFillIcon: 'dangerItemPrimary',
|
|
48
|
+
iconBeforeFillIcon: 'dangerItemPrimary',
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
var chipsAppearanceDisabled = {
|
|
53
|
+
disabled: {
|
|
54
|
+
fill: 'surfaceDisabled',
|
|
55
|
+
fillActive: 'surfaceDisabled',
|
|
56
|
+
fillHover: 'surfaceDisabled',
|
|
57
|
+
labelTextColor: 'surfaceTextDisabled',
|
|
58
|
+
labelTextHoverColor: 'surfaceTextDisabled',
|
|
59
|
+
borderColor: 'surfaceBorderDisabled',
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
var chipsAppearanceError = {
|
|
64
|
+
errorMutedPrimary: {
|
|
65
|
+
fill: 'errorMutedPrimary',
|
|
66
|
+
labelTextColor: 'errorMutedTextPrimary',
|
|
67
|
+
borderColor: 'errorMutedBorderSecondary',
|
|
68
|
+
iconAfterFillIcon: 'errorMutedItemPrimary',
|
|
69
|
+
iconBeforeFillIcon: 'errorMutedItemPrimary',
|
|
70
|
+
},
|
|
71
|
+
errorPrimary: {
|
|
72
|
+
fill: 'errorPrimary',
|
|
73
|
+
labelTextColor: 'errorTextPrimary',
|
|
74
|
+
borderColor: 'errorBorderSecondary',
|
|
75
|
+
iconAfterFillIcon: 'errorItemPrimary',
|
|
76
|
+
iconBeforeFillIcon: 'errorItemPrimary',
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
var chipsAppearanceInfo = {
|
|
81
|
+
infoMutedPrimary: {
|
|
82
|
+
fill: 'infoPrimary',
|
|
83
|
+
labelTextColor: 'infoTextPrimary',
|
|
84
|
+
borderColor: 'infoBorderSecondary',
|
|
85
|
+
iconAfterFillIcon: 'infoItemPrimary',
|
|
86
|
+
iconBeforeFillIcon: 'infoItemPrimary',
|
|
87
|
+
},
|
|
88
|
+
infoPrimary: {
|
|
89
|
+
fill: 'infoPrimary',
|
|
90
|
+
labelTextColor: 'infoTextPrimary',
|
|
91
|
+
borderColor: 'infoBorderSecondary',
|
|
92
|
+
iconAfterFillIcon: 'infoItemPrimary',
|
|
93
|
+
iconBeforeFillIcon: 'infoItemPrimary',
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
var chipsAppearancePrimary = {
|
|
98
|
+
primaryMutedPrimary: {
|
|
99
|
+
fill: 'primaryMutedPrimary',
|
|
100
|
+
labelTextColor: 'primaryMutedTextPrimary',
|
|
101
|
+
borderColor: 'primaryMutedBorderSecondary',
|
|
102
|
+
iconAfterFillIcon: 'primaryMutedItemPrimary',
|
|
103
|
+
iconBeforeFillIcon: 'primaryMutedItemPrimary',
|
|
104
|
+
},
|
|
105
|
+
primaryPrimary: {
|
|
106
|
+
fill: 'primaryPrimary',
|
|
107
|
+
labelTextColor: 'primaryTextPrimary',
|
|
108
|
+
borderColor: 'primaryBorderSecondary',
|
|
109
|
+
iconAfterFillIcon: 'primaryItemPrimary',
|
|
110
|
+
iconBeforeFillIcon: 'primaryItemPrimary',
|
|
111
|
+
},
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
var chipsAppearanceSecondary = {
|
|
115
|
+
secondaryMutedPrimary: {
|
|
116
|
+
fill: 'secondaryMutedPrimary',
|
|
117
|
+
labelTextColor: 'secondaryMutedTextPrimary',
|
|
118
|
+
borderColor: 'secondaryMutedBorderSecondary',
|
|
119
|
+
iconAfterFillIcon: 'secondaryMutedItemPrimary',
|
|
120
|
+
iconBeforeFillIcon: 'secondaryMutedItemPrimary',
|
|
121
|
+
},
|
|
122
|
+
secondaryPrimary: {
|
|
123
|
+
fill: 'secondaryPrimary',
|
|
124
|
+
labelTextColor: 'secondaryTextPrimary',
|
|
125
|
+
borderColor: 'secondaryBorderSecondary',
|
|
126
|
+
iconAfterFillIcon: 'secondaryItemPrimary',
|
|
127
|
+
iconBeforeFillIcon: 'secondaryItemPrimary',
|
|
128
|
+
},
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
var chipsAppearanceSize = {
|
|
132
|
+
sizeXXL: {
|
|
133
|
+
size: 'xxl',
|
|
134
|
+
labelTextSize: 'xl',
|
|
135
|
+
iconAfterSize: 24,
|
|
136
|
+
iconBeforeSize: 24,
|
|
137
|
+
},
|
|
138
|
+
sizeXL: {
|
|
139
|
+
size: 'xl',
|
|
140
|
+
labelTextSize: 'm',
|
|
141
|
+
iconAfterSize: 20,
|
|
142
|
+
iconBeforeSize: 20,
|
|
143
|
+
},
|
|
144
|
+
sizeL: {
|
|
145
|
+
size: 'l',
|
|
146
|
+
labelTextSize: 'm',
|
|
147
|
+
iconAfterSize: 16,
|
|
148
|
+
iconBeforeSize: 16,
|
|
149
|
+
},
|
|
150
|
+
sizeM: {
|
|
151
|
+
size: 'm',
|
|
152
|
+
labelTextSize: 's',
|
|
153
|
+
iconAfterSize: 16,
|
|
154
|
+
iconBeforeSize: 16,
|
|
155
|
+
},
|
|
156
|
+
sizeS: {
|
|
157
|
+
size: 's',
|
|
158
|
+
labelTextSize: 's',
|
|
159
|
+
iconAfterSize: 16,
|
|
160
|
+
iconBeforeSize: 16,
|
|
161
|
+
},
|
|
162
|
+
sizeXS: {
|
|
163
|
+
size: 'xs',
|
|
164
|
+
labelTextSize: 'xs',
|
|
165
|
+
iconAfterSize: 14,
|
|
166
|
+
iconBeforeSize: 14,
|
|
167
|
+
},
|
|
168
|
+
sizeXXS: {
|
|
169
|
+
size: 'xxs',
|
|
170
|
+
labelTextSize: 'xxs',
|
|
171
|
+
iconAfterSize: 12,
|
|
172
|
+
iconBeforeSize: 12,
|
|
173
|
+
},
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
var chipsAppearanceStyle = {
|
|
177
|
+
solid: {
|
|
178
|
+
borderColor: 'none',
|
|
179
|
+
},
|
|
180
|
+
outlined: {
|
|
181
|
+
fill: 'none',
|
|
182
|
+
},
|
|
183
|
+
full: {
|
|
184
|
+
borderColor: 'none',
|
|
185
|
+
},
|
|
186
|
+
ghost: {
|
|
187
|
+
fill: 'none',
|
|
188
|
+
borderColor: 'none',
|
|
189
|
+
},
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
var chipsAppearanceSuccess = {
|
|
193
|
+
successMutedPrimary: {
|
|
194
|
+
fill: 'successMutedPrimary',
|
|
195
|
+
labelTextColor: 'successMutedTextPrimary',
|
|
196
|
+
borderColor: 'successMutedBorderSecondary',
|
|
197
|
+
iconAfterFillIcon: 'successMutedItemPrimary',
|
|
198
|
+
iconBeforeFillIcon: 'successMutedItemPrimary',
|
|
199
|
+
},
|
|
200
|
+
successPrimary: {
|
|
201
|
+
fill: 'successPrimary',
|
|
202
|
+
labelTextColor: 'successTextPrimary',
|
|
203
|
+
borderColor: 'successBorderSecondary',
|
|
204
|
+
iconAfterFillIcon: 'successItemPrimary',
|
|
205
|
+
iconBeforeFillIcon: 'successItemPrimary',
|
|
206
|
+
},
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
var chipsAppearanceSurface = {
|
|
210
|
+
surfaceMutedPrimary: {
|
|
211
|
+
fill: 'surfaceMutedPrimary',
|
|
212
|
+
labelTextColor: 'surfaceMutedTextPrimary',
|
|
213
|
+
borderColor: 'surfaceMutedBorderTertiary',
|
|
214
|
+
iconAfterFillIcon: 'surfaceMutedItemPrimary',
|
|
215
|
+
iconBeforeFillIcon: 'surfaceMutedItemPrimary',
|
|
216
|
+
},
|
|
217
|
+
surfacePrimary: {
|
|
218
|
+
fill: 'surfacePrimary',
|
|
219
|
+
fillActive: 'accentPrimary',
|
|
220
|
+
fillActiveHover: 'accentSecondary',
|
|
221
|
+
fillHover: 'surfaceHover',
|
|
222
|
+
labelTextActiveColor: 'accentTextPrimary',
|
|
223
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
224
|
+
labelTextHoverColor: 'surfaceTextPrimary',
|
|
225
|
+
borderColor: 'surfaceBorderTertiary',
|
|
226
|
+
activeIconItemFill: 'surfaceItemSecondary',
|
|
227
|
+
badgeAppearance: 'surfacePrimary sizeXS solid',
|
|
228
|
+
iconAfterFillActiveIcon: 'accentItemPrimary',
|
|
229
|
+
iconAfterFillIcon: 'surfaceItemPrimary',
|
|
230
|
+
iconBeforeFillActiveIcon: 'accentItemPrimary',
|
|
231
|
+
iconBeforeFillIcon: 'surfaceItemPrimary',
|
|
232
|
+
},
|
|
233
|
+
surfaceSecondary: {
|
|
234
|
+
fill: 'surfaceSecondary',
|
|
235
|
+
fillHover: 'surfaceHover',
|
|
236
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
237
|
+
borderColor: 'surfaceBorderSecondary',
|
|
238
|
+
},
|
|
239
|
+
surfaceTertiary: {
|
|
240
|
+
fill: 'surfaceTertiary',
|
|
241
|
+
fillHover: 'surfaceHover',
|
|
242
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
243
|
+
borderColor: 'surfaceBorderTertiary',
|
|
244
|
+
},
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
var chipsAppearanceWarning = {
|
|
248
|
+
warningMutedPrimary: {
|
|
249
|
+
fill: 'warningMutedPrimary',
|
|
250
|
+
labelTextColor: 'warningMutedTextPrimary',
|
|
251
|
+
borderColor: 'warningMutedBorderSecondary',
|
|
252
|
+
iconAfterFillIcon: 'warningMutedItemPrimary',
|
|
253
|
+
iconBeforeFillIcon: 'warningMutedItemPrimary',
|
|
254
|
+
},
|
|
255
|
+
warningPrimary: {
|
|
256
|
+
fill: 'warningPrimary',
|
|
257
|
+
labelTextColor: 'warningTextPrimary',
|
|
258
|
+
borderColor: 'warningBorderSecondary',
|
|
259
|
+
iconAfterFillIcon: 'warningItemPrimary',
|
|
260
|
+
iconBeforeFillIcon: 'warningItemPrimary',
|
|
261
|
+
},
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
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), chipsAppearanceDisabled), chipsAppearancePrimary), chipsAppearanceSecondary), chipsAppearanceSuccess), chipsAppearanceSurface), chipsAppearanceWarning);
|
|
265
|
+
|
|
266
|
+
var chipsConfig = {
|
|
267
|
+
appearance: chipsAppearance,
|
|
268
|
+
setAppearance: function (appearanceConfig) {
|
|
269
|
+
chipsConfig.appearance = appearanceConfig;
|
|
270
|
+
},
|
|
271
|
+
};
|
|
272
|
+
function Chips(props) {
|
|
273
|
+
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, isSkeleton = props.isSkeleton, onClick = props.onClick, children = props.children;
|
|
274
|
+
var appearanceConfig = React.useMemo(function () {
|
|
275
|
+
if (appearance) {
|
|
276
|
+
var appearanceProps = appearance.split(' ').reduce(function (resultConfig, appearanceKey) {
|
|
277
|
+
var _a;
|
|
278
|
+
return (tslib_es6.__assign(tslib_es6.__assign({}, resultConfig), (_a = chipsConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
279
|
+
}, {});
|
|
280
|
+
if (isDisabled && chipsConfig.appearance.disabled) {
|
|
281
|
+
Object.assign(appearanceProps, chipsConfig.appearance.disabled);
|
|
282
|
+
}
|
|
283
|
+
return appearanceProps;
|
|
284
|
+
}
|
|
285
|
+
if (isDisabled) {
|
|
286
|
+
return chipsConfig.appearance.disabled;
|
|
287
|
+
}
|
|
288
|
+
return {};
|
|
289
|
+
}, [appearance, isDisabled]);
|
|
290
|
+
var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
|
|
291
|
+
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, iconAfterFillActiveIcon = propsGenerator.iconAfterFillActiveIcon, iconAfterFillIcon = propsGenerator.iconAfterFillIcon, iconAfterFillSize = propsGenerator.iconAfterFillSize, iconAfterShape = propsGenerator.iconAfterShape, iconAfterSize = propsGenerator.iconAfterSize, iconBeforeFill = propsGenerator.iconBeforeFill, iconBeforeFillActiveIcon = propsGenerator.iconBeforeFillActiveIcon, iconBeforeFillIcon = propsGenerator.iconBeforeFillIcon, iconBeforeFillSize = propsGenerator.iconBeforeFillSize, iconBeforeShape = propsGenerator.iconBeforeShape, iconBeforeSize = propsGenerator.iconBeforeSize, shapeClass = propsGenerator.shapeClass, sizeClass = propsGenerator.sizeClass;
|
|
292
|
+
var chipsStyles = useStyles.useStyles(props).styles;
|
|
293
|
+
return (jsxRuntime.jsx("div", { className: clsx(className, 'chips', !isActive
|
|
294
|
+
? fillClass && "fill_".concat(fillClass)
|
|
295
|
+
: fillActiveClass && "fill_active_".concat(fillActiveClass), !isActive
|
|
296
|
+
? fillHoverClass && "fill_hover_".concat(fillHoverClass)
|
|
297
|
+
: 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), isActive && 'chips_state_active', isDisabled && "chips_state_disabled", cursorClass && "cursor_".concat(cursorClass), onClick && 'cursor_type_pointer', isSkeleton && "chips_skeleton"), "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, iconFillActive: iconBeforeFillActiveIcon, imageSrc: iconBeforeSrc, shape: iconBeforeShape, SvgImage: iconBefore, isActive: isActive })), 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, iconFillActive: iconAfterFillActiveIcon, fillSize: iconAfterFillSize, iconFill: iconAfterFillIcon, imageSrc: iconAfterSrc, shape: iconAfterShape, SvgImage: iconAfter, isActive: isActive })), badgeValue && (jsxRuntime.jsx(Tooltip.Badge, { className: "chips__badge", appearance: badgeAppearance, size: badgeSize, textColor: badgeTextColor, textSize: badgeTextSize, shape: badgeShape, value: badgeValue }))] }) }));
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
function ChipsGroup(props) {
|
|
301
|
+
var className = props.className, chipsList = props.chipsList, dataTestId = props.dataTestId, dataTour = props.dataTour, horizontalScroll = props.horizontalScroll, style = props.style, onClick = props.onClick, children = props.children;
|
|
302
|
+
var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props);
|
|
303
|
+
var directionClass = propsGenerator.directionClass, alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, fillClass = propsGenerator.fillClass, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, borderWidthClass = propsGenerator.borderWidthClass, chipsAppearance = propsGenerator.chipsAppearance, contentAlignClass = propsGenerator.contentAlignClass, widthClass = propsGenerator.widthClass, wrapClass = propsGenerator.wrapClass;
|
|
304
|
+
// @ts-expect-error
|
|
305
|
+
var _a = useStyles.useStyles(props), groupStyles = _a.styles, groupWrapperStyles = _a.wrapper;
|
|
306
|
+
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), 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
|
|
307
|
+
? children
|
|
308
|
+
: chipsList === null || chipsList === void 0 ? void 0 : chipsList.map(function (item) { return (jsxRuntime.jsx(Chips, { appearance: chipsAppearance, label: item.label, isDisabled: item.isDisabled, iconAfter: item.iconAfter, iconBefore: item.iconBefore, isActive: item.isActive, onClick: function () { return onClick(item); } }, item.id)); }) })) : children ? (children) : (chipsList === null || chipsList === void 0 ? void 0 : chipsList.map(function (item) { return (jsxRuntime.jsx(Chips, { appearance: chipsAppearance, label: item.label, isDisabled: item.isDisabled, iconAfter: item.iconAfter, iconBefore: item.iconBefore, isActive: item.isActive, onClick: function () { return onClick(item); } }, item.id)); })) }));
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
exports.Chips = Chips;
|
|
312
|
+
exports.ChipsGroup = ChipsGroup;
|
|
313
|
+
exports.chipsAppearance = chipsAppearance;
|
|
314
|
+
exports.chipsConfig = chipsConfig;
|