@itcase/ui 1.8.35 → 1.8.37
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_nMPCDjk8.js} +1 -1
- package/dist/{Avatar_es_DbGpnL99.js → Avatar_es_B73a6TzA.js} +1 -1
- package/dist/{Button_cjs_CW6ENTbm.js → Button_cjs_plv5-qcj.js} +11 -2
- package/dist/{Button_es_DTUagqgU.js → Button_es_BigB2Wz6.js} +11 -2
- package/dist/ChipsGroup_cjs_DrOhD-Fc.js +312 -0
- package/dist/ChipsGroup_es_B9m4l0wN.js +307 -0
- package/dist/{DatePicker_cjs_Bx5_lZNT.js → DatePicker_cjs_CmqgSNw7.js} +4 -4
- package/dist/{DatePicker_es_A1FcasHs.js → DatePicker_es_mk9wFTe9.js} +4 -4
- package/dist/{DropdownItem_cjs_tH2DBClp.js → DropdownItem_cjs_DQvByLbN.js} +1 -1
- package/dist/{DropdownItem_es_BeVv-pDA.js → DropdownItem_es_KppIfto7.js} +1 -1
- 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_CP4b6Mg2.js → Label_cjs_BGJfyrOL.js} +15 -13
- package/dist/{Label_es_DFSiy5sL.js → Label_es_C4Px7b-N.js} +15 -13
- 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_DHduWa-v.js} +76 -70
- package/dist/{Tooltip_es_B0nm9irO.js → Tooltip_es_ltCY-w4M.js} +76 -70
- 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 +32 -41
- package/dist/cjs/components/Breadcrumbs.js +41 -124
- 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 +20 -18
- package/dist/cjs/components/CookiesWarning.js +3 -3
- package/dist/cjs/components/Dadata.js +1 -1
- package/dist/cjs/components/DatePeriod.js +7 -7
- package/dist/cjs/components/DatePicker.js +6 -6
- package/dist/cjs/components/Drawer.js +1 -1
- package/dist/cjs/components/Dropdown/stories/__mock__.js +104 -33
- 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 +17 -12
- package/dist/cjs/components/Modal.js +2 -2
- package/dist/cjs/components/Notification.js +3 -8
- 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 +26 -11
- package/dist/cjs/components/Segmented.js +84 -52
- 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 +32 -41
- package/dist/components/Breadcrumbs.js +41 -124
- 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 +20 -18
- package/dist/components/CookiesWarning.js +3 -3
- package/dist/components/Dadata.js +1 -1
- package/dist/components/DatePeriod.js +7 -7
- package/dist/components/DatePicker.js +6 -6
- package/dist/components/Drawer.js +1 -1
- package/dist/components/Dropdown/stories/__mock__.js +102 -34
- 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 +17 -12
- package/dist/components/Modal.js +2 -2
- package/dist/components/Notification.js +3 -8
- 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 +24 -12
- package/dist/components/Segmented.js +84 -52
- 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 +39 -6
- package/dist/css/components/Chips/Chips.css +40 -14
- package/dist/css/components/Icon/Icon.css +24 -0
- package/dist/css/components/Loader/Loader.css +1 -19
- package/dist/css/components/MenuItem/MenuItem.css +53 -30
- package/dist/css/components/Notification/Notification.css +0 -48
- package/dist/css/components/ScrollOnDrag/ScrollOnDrag.css +230 -4
- package/dist/css/components/Segmented/Segmented.css +64 -8
- package/dist/css/components/Segmented/css/__item/segmaented__item.css +28 -0
- package/dist/css/styles/centering/centering.css +17 -0
- package/dist/css/styles/shape-strength/shape-strength.css +6 -0
- package/dist/hooks/useStyles/styleAttributes.js +1 -1
- package/dist/stories/BreadcrumbsPlsyground.mdx +1 -1
- package/dist/stories/ChipsOverview.mdx +26 -14
- package/dist/stories/ChipsPlayground.mdx +3 -3
- package/dist/types/components/Breadcrumbs/appearance/breadcrumbsAccent.d.ts +2 -12
- package/dist/types/components/Breadcrumbs/appearance/breadcrumbsSize.d.ts +7 -14
- package/dist/types/components/Breadcrumbs/appearance/breadcrumbsStyle.d.ts +4 -6
- package/dist/types/components/Breadcrumbs/appearance/breadcrumbsSurface.d.ts +11 -8
- package/dist/types/components/Breadcrumbs/stories/__mock__/index.d.ts +5 -8
- package/dist/types/components/Button/appearance/buttonSurface.d.ts +9 -0
- 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/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/choiceDefault.d.ts +1 -0
- package/dist/types/components/Choice/appearance/choiceDisabled.d.ts +1 -1
- package/dist/types/components/Choice/appearance/choiceError.d.ts +1 -0
- package/dist/types/components/Choice/appearance/choiceRequire.d.ts +1 -0
- package/dist/types/components/Choice/appearance/choiceStyle.d.ts +4 -6
- package/dist/types/components/Choice/appearance/choiceSuccess.d.ts +1 -0
- package/dist/types/components/Choice/stories/__mock__/index.d.ts +3 -9
- package/dist/types/components/Dropdown/stories/__mock__/index.d.ts +87 -44
- package/dist/types/components/Icon/appearance/iconAccent.d.ts +2 -4
- package/dist/types/components/Icon/appearance/iconDanger.d.ts +2 -4
- package/dist/types/components/Icon/appearance/iconDisabled.d.ts +12 -0
- package/dist/types/components/Icon/appearance/iconError.d.ts +4 -4
- package/dist/types/components/Icon/appearance/iconInfo.d.ts +7 -4
- package/dist/types/components/Icon/appearance/iconPrimary.d.ts +4 -2
- package/dist/types/components/Icon/appearance/iconSecondary.d.ts +2 -2
- package/dist/types/components/Icon/appearance/iconStyle.d.ts +4 -6
- package/dist/types/components/Icon/appearance/iconSuccess.d.ts +0 -2
- package/dist/types/components/Icon/appearance/iconSurface.d.ts +0 -5
- package/dist/types/components/Icon/appearance/iconWarning.d.ts +4 -4
- package/dist/types/components/Input/appearance/inputDefault.d.ts +1 -0
- package/dist/types/components/Label/appearance/labelDisable.d.ts +2 -2
- package/dist/types/components/Label/appearance/labelPrimary.d.ts +1 -0
- package/dist/types/components/Label/appearance/labelSurface.d.ts +1 -0
- package/dist/types/components/MenuItem/appearance/menuItemStyle.d.ts +4 -6
- package/dist/types/components/MenuItem/appearance/menuItemSurface.d.ts +5 -0
- package/dist/types/components/Notification/appearance/notificationDefault.d.ts +0 -1
- package/dist/types/components/Notification/appearance/notificationError.d.ts +0 -1
- package/dist/types/components/Notification/appearance/notificationInfo.d.ts +0 -1
- package/dist/types/components/Notification/appearance/notificationSuccess.d.ts +0 -1
- package/dist/types/components/Notification/appearance/notificationWarning.d.ts +0 -1
- 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 +8 -10
- package/dist/types/components/Segmented/appearance/segmentedError.d.ts +10 -1
- package/dist/types/components/Segmented/appearance/segmentedSize.d.ts +5 -0
- package/dist/types/components/Segmented/appearance/segmentedStyle.d.ts +3 -3
- package/dist/types/components/Segmented/appearance/segmentedSuccess.d.ts +10 -1
- package/dist/types/components/Segmented/appearance/segmentedWarning.d.ts +10 -1
- package/dist/types/components/Segmented/stories/__mock__/index.d.ts +31 -9
- 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 +8 -7
- package/dist/ChipsGroup_cjs_j3QOma3U.js +0 -200
- package/dist/ChipsGroup_es_DF1fhn97.js +0 -195
- package/dist/css/components/Notification/css/__item/notification__item_status.css +0 -48
- package/dist/types/components/Breadcrumbs/appearance/breadcrumbsDanger.d.ts +0 -7
- package/dist/types/components/Breadcrumbs/appearance/breadcrumbsError.d.ts +0 -9
- package/dist/types/components/Breadcrumbs/appearance/breadcrumbsInfo.d.ts +0 -17
- package/dist/types/components/Breadcrumbs/appearance/breadcrumbsPrimary.d.ts +0 -8
- package/dist/types/components/Breadcrumbs/appearance/breadcrumbsSecondary.d.ts +0 -8
- package/dist/types/components/Breadcrumbs/appearance/breadcrumbsSuccess.d.ts +0 -9
- package/dist/types/components/Breadcrumbs/appearance/breadcrumbsWarning.d.ts +0 -9
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { _ as __assign } from './tslib.es6_es_Bwu1Cn-t.js';
|
|
4
|
+
import { useMemo } from 'react';
|
|
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_ltCY-w4M.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
|
+
accentMutedPrimary: {
|
|
18
|
+
fill: 'accentMutedPrimary',
|
|
19
|
+
labelTextColor: 'accentMutedTextPrimary',
|
|
20
|
+
borderColor: 'accentMutedBorderSecondary',
|
|
21
|
+
iconAfterFillIcon: 'accentMutedItemPrimary',
|
|
22
|
+
iconBeforeFillIcon: 'accentMutedItemPrimary',
|
|
23
|
+
},
|
|
24
|
+
accentPrimary: {
|
|
25
|
+
fill: 'accentPrimary',
|
|
26
|
+
labelTextColor: 'accentTextPrimary',
|
|
27
|
+
borderColor: 'accentBorderSecondary',
|
|
28
|
+
iconAfterFillIcon: 'accentItemPrimary',
|
|
29
|
+
iconBeforeFillIcon: 'accentItemPrimary',
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
var chipsAppearanceDanger = {
|
|
34
|
+
dangerMutedPrimary: {
|
|
35
|
+
fill: 'dangerMutedPrimary',
|
|
36
|
+
labelTextColor: 'dangerMutedTextPrimary',
|
|
37
|
+
borderColor: 'dangerMutedBorderSecondary',
|
|
38
|
+
iconAfterFillIcon: 'dangerMutedItemPrimary',
|
|
39
|
+
iconBeforeFillIcon: 'dangerMutedItemPrimary',
|
|
40
|
+
},
|
|
41
|
+
dangerPrimary: {
|
|
42
|
+
fill: 'dangerPrimary',
|
|
43
|
+
labelTextColor: 'dangerTextPrimary',
|
|
44
|
+
borderColor: 'dangerBorderSecondary',
|
|
45
|
+
iconAfterFillIcon: 'dangerItemPrimary',
|
|
46
|
+
iconBeforeFillIcon: 'dangerItemPrimary',
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
var chipsAppearanceDisabled = {
|
|
51
|
+
disabled: {
|
|
52
|
+
fill: 'surfaceDisabled',
|
|
53
|
+
fillActive: 'surfaceDisabled',
|
|
54
|
+
fillHover: 'surfaceDisabled',
|
|
55
|
+
labelTextColor: 'surfaceTextDisabled',
|
|
56
|
+
labelTextHoverColor: 'surfaceTextDisabled',
|
|
57
|
+
borderColor: 'surfaceBorderDisabled',
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
var chipsAppearanceError = {
|
|
62
|
+
errorMutedPrimary: {
|
|
63
|
+
fill: 'errorMutedPrimary',
|
|
64
|
+
labelTextColor: 'errorMutedTextPrimary',
|
|
65
|
+
borderColor: 'errorMutedBorderSecondary',
|
|
66
|
+
iconAfterFillIcon: 'errorMutedItemPrimary',
|
|
67
|
+
iconBeforeFillIcon: 'errorMutedItemPrimary',
|
|
68
|
+
},
|
|
69
|
+
errorPrimary: {
|
|
70
|
+
fill: 'errorPrimary',
|
|
71
|
+
labelTextColor: 'errorTextPrimary',
|
|
72
|
+
borderColor: 'errorBorderSecondary',
|
|
73
|
+
iconAfterFillIcon: 'errorItemPrimary',
|
|
74
|
+
iconBeforeFillIcon: 'errorItemPrimary',
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
var chipsAppearanceInfo = {
|
|
79
|
+
infoMutedPrimary: {
|
|
80
|
+
fill: 'infoPrimary',
|
|
81
|
+
labelTextColor: 'infoTextPrimary',
|
|
82
|
+
borderColor: 'infoBorderSecondary',
|
|
83
|
+
iconAfterFillIcon: 'infoItemPrimary',
|
|
84
|
+
iconBeforeFillIcon: 'infoItemPrimary',
|
|
85
|
+
},
|
|
86
|
+
infoPrimary: {
|
|
87
|
+
fill: 'infoPrimary',
|
|
88
|
+
labelTextColor: 'infoTextPrimary',
|
|
89
|
+
borderColor: 'infoBorderSecondary',
|
|
90
|
+
iconAfterFillIcon: 'infoItemPrimary',
|
|
91
|
+
iconBeforeFillIcon: 'infoItemPrimary',
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
var chipsAppearancePrimary = {
|
|
96
|
+
primaryMutedPrimary: {
|
|
97
|
+
fill: 'primaryMutedPrimary',
|
|
98
|
+
labelTextColor: 'primaryMutedTextPrimary',
|
|
99
|
+
borderColor: 'primaryMutedBorderSecondary',
|
|
100
|
+
iconAfterFillIcon: 'primaryMutedItemPrimary',
|
|
101
|
+
iconBeforeFillIcon: 'primaryMutedItemPrimary',
|
|
102
|
+
},
|
|
103
|
+
primaryPrimary: {
|
|
104
|
+
fill: 'primaryPrimary',
|
|
105
|
+
labelTextColor: 'primaryTextPrimary',
|
|
106
|
+
borderColor: 'primaryBorderSecondary',
|
|
107
|
+
iconAfterFillIcon: 'primaryItemPrimary',
|
|
108
|
+
iconBeforeFillIcon: 'primaryItemPrimary',
|
|
109
|
+
},
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
var chipsAppearanceSecondary = {
|
|
113
|
+
secondaryMutedPrimary: {
|
|
114
|
+
fill: 'secondaryMutedPrimary',
|
|
115
|
+
labelTextColor: 'secondaryMutedTextPrimary',
|
|
116
|
+
borderColor: 'secondaryMutedBorderSecondary',
|
|
117
|
+
iconAfterFillIcon: 'secondaryMutedItemPrimary',
|
|
118
|
+
iconBeforeFillIcon: 'secondaryMutedItemPrimary',
|
|
119
|
+
},
|
|
120
|
+
secondaryPrimary: {
|
|
121
|
+
fill: 'secondaryPrimary',
|
|
122
|
+
labelTextColor: 'secondaryTextPrimary',
|
|
123
|
+
borderColor: 'secondaryBorderSecondary',
|
|
124
|
+
iconAfterFillIcon: 'secondaryItemPrimary',
|
|
125
|
+
iconBeforeFillIcon: 'secondaryItemPrimary',
|
|
126
|
+
},
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
var chipsAppearanceSize = {
|
|
130
|
+
sizeXXL: {
|
|
131
|
+
size: 'xxl',
|
|
132
|
+
labelTextSize: 'xl',
|
|
133
|
+
iconAfterSize: 24,
|
|
134
|
+
iconBeforeSize: 24,
|
|
135
|
+
},
|
|
136
|
+
sizeXL: {
|
|
137
|
+
size: 'xl',
|
|
138
|
+
labelTextSize: 'm',
|
|
139
|
+
iconAfterSize: 20,
|
|
140
|
+
iconBeforeSize: 20,
|
|
141
|
+
},
|
|
142
|
+
sizeL: {
|
|
143
|
+
size: 'l',
|
|
144
|
+
labelTextSize: 'm',
|
|
145
|
+
iconAfterSize: 16,
|
|
146
|
+
iconBeforeSize: 16,
|
|
147
|
+
},
|
|
148
|
+
sizeM: {
|
|
149
|
+
size: 'm',
|
|
150
|
+
labelTextSize: 's',
|
|
151
|
+
iconAfterSize: 16,
|
|
152
|
+
iconBeforeSize: 16,
|
|
153
|
+
},
|
|
154
|
+
sizeS: {
|
|
155
|
+
size: 's',
|
|
156
|
+
labelTextSize: 's',
|
|
157
|
+
iconAfterSize: 16,
|
|
158
|
+
iconBeforeSize: 16,
|
|
159
|
+
},
|
|
160
|
+
sizeXS: {
|
|
161
|
+
size: 'xs',
|
|
162
|
+
labelTextSize: 'xs',
|
|
163
|
+
iconAfterSize: 14,
|
|
164
|
+
iconBeforeSize: 14,
|
|
165
|
+
},
|
|
166
|
+
sizeXXS: {
|
|
167
|
+
size: 'xxs',
|
|
168
|
+
labelTextSize: 'xxs',
|
|
169
|
+
iconAfterSize: 12,
|
|
170
|
+
iconBeforeSize: 12,
|
|
171
|
+
},
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
var chipsAppearanceStyle = {
|
|
175
|
+
solid: {
|
|
176
|
+
borderColor: 'none',
|
|
177
|
+
},
|
|
178
|
+
outlined: {
|
|
179
|
+
fill: 'none',
|
|
180
|
+
},
|
|
181
|
+
full: {},
|
|
182
|
+
ghost: {
|
|
183
|
+
fill: 'none',
|
|
184
|
+
borderColor: 'none',
|
|
185
|
+
},
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
var chipsAppearanceSuccess = {
|
|
189
|
+
successMutedPrimary: {
|
|
190
|
+
fill: 'successMutedPrimary',
|
|
191
|
+
labelTextColor: 'successMutedTextPrimary',
|
|
192
|
+
borderColor: 'successMutedBorderSecondary',
|
|
193
|
+
iconAfterFillIcon: 'successMutedItemPrimary',
|
|
194
|
+
iconBeforeFillIcon: 'successMutedItemPrimary',
|
|
195
|
+
},
|
|
196
|
+
successPrimary: {
|
|
197
|
+
fill: 'successPrimary',
|
|
198
|
+
labelTextColor: 'successTextPrimary',
|
|
199
|
+
borderColor: 'successBorderSecondary',
|
|
200
|
+
iconAfterFillIcon: 'successItemPrimary',
|
|
201
|
+
iconBeforeFillIcon: 'successItemPrimary',
|
|
202
|
+
},
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
var chipsAppearanceSurface = {
|
|
206
|
+
surfaceMutedPrimary: {
|
|
207
|
+
fill: 'surfaceMutedPrimary',
|
|
208
|
+
labelTextColor: 'surfaceMutedTextPrimary',
|
|
209
|
+
borderColor: 'surfaceMutedBorderTertiary',
|
|
210
|
+
iconAfterFillIcon: 'surfaceMutedItemPrimary',
|
|
211
|
+
iconBeforeFillIcon: 'surfaceMutedItemPrimary',
|
|
212
|
+
},
|
|
213
|
+
surfacePrimary: {
|
|
214
|
+
fill: 'surfacePrimary',
|
|
215
|
+
fillActive: 'accentPrimary',
|
|
216
|
+
fillActiveHover: 'accentSecondary',
|
|
217
|
+
fillHover: 'surfaceHover',
|
|
218
|
+
labelTextActiveColor: 'accentTextPrimary',
|
|
219
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
220
|
+
labelTextHoverColor: 'surfaceTextPrimary',
|
|
221
|
+
borderColor: 'surfaceBorderTertiary',
|
|
222
|
+
activeIconItemFill: 'surfaceItemSecondary',
|
|
223
|
+
badgeAppearance: 'surfacePrimary sizeXS solid',
|
|
224
|
+
iconAfterFillActiveIcon: 'accentItemPrimary',
|
|
225
|
+
iconAfterFillIcon: 'surfaceItemPrimary',
|
|
226
|
+
iconBeforeFillActiveIcon: 'accentItemPrimary',
|
|
227
|
+
iconBeforeFillIcon: 'surfaceItemPrimary',
|
|
228
|
+
},
|
|
229
|
+
surfaceSecondary: {
|
|
230
|
+
fill: 'surfaceSecondary',
|
|
231
|
+
fillHover: 'surfaceHover',
|
|
232
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
233
|
+
borderColor: 'surfaceBorderSecondary',
|
|
234
|
+
},
|
|
235
|
+
surfaceTertiary: {
|
|
236
|
+
fill: 'surfaceTertiary',
|
|
237
|
+
fillHover: 'surfaceHover',
|
|
238
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
239
|
+
borderColor: 'surfaceBorderTertiary',
|
|
240
|
+
},
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
var chipsAppearanceWarning = {
|
|
244
|
+
warningMutedPrimary: {
|
|
245
|
+
fill: 'warningMutedPrimary',
|
|
246
|
+
labelTextColor: 'warningMutedTextPrimary',
|
|
247
|
+
borderColor: 'warningMutedBorderSecondary',
|
|
248
|
+
iconAfterFillIcon: 'warningMutedItemPrimary',
|
|
249
|
+
iconBeforeFillIcon: 'warningMutedItemPrimary',
|
|
250
|
+
},
|
|
251
|
+
warningPrimary: {
|
|
252
|
+
fill: 'warningPrimary',
|
|
253
|
+
labelTextColor: 'warningTextPrimary',
|
|
254
|
+
borderColor: 'warningBorderSecondary',
|
|
255
|
+
iconAfterFillIcon: 'warningItemPrimary',
|
|
256
|
+
iconBeforeFillIcon: 'warningItemPrimary',
|
|
257
|
+
},
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
var chipsAppearance = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, chipsAppearanceSize), chipsAppearanceStyle), chipsAppearanceAccent), chipsAppearanceDanger), chipsAppearanceError), chipsAppearanceInfo), chipsAppearanceDisabled), chipsAppearancePrimary), chipsAppearanceSecondary), chipsAppearanceSuccess), chipsAppearanceSurface), chipsAppearanceWarning);
|
|
261
|
+
|
|
262
|
+
var chipsConfig = {
|
|
263
|
+
appearance: chipsAppearance,
|
|
264
|
+
setAppearance: function (appearanceConfig) {
|
|
265
|
+
chipsConfig.appearance = appearanceConfig;
|
|
266
|
+
},
|
|
267
|
+
};
|
|
268
|
+
function Chips(props) {
|
|
269
|
+
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;
|
|
270
|
+
var appearanceConfig = useMemo(function () {
|
|
271
|
+
if (appearance) {
|
|
272
|
+
var appearanceProps = appearance.split(' ').reduce(function (resultConfig, appearanceKey) {
|
|
273
|
+
var _a;
|
|
274
|
+
return (__assign(__assign({}, resultConfig), (_a = chipsConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
275
|
+
}, {});
|
|
276
|
+
if (isDisabled && chipsConfig.appearance.disabled) {
|
|
277
|
+
Object.assign(appearanceProps, chipsConfig.appearance.disabled);
|
|
278
|
+
}
|
|
279
|
+
return appearanceProps;
|
|
280
|
+
}
|
|
281
|
+
if (isDisabled) {
|
|
282
|
+
return chipsConfig.appearance.disabled;
|
|
283
|
+
}
|
|
284
|
+
return {};
|
|
285
|
+
}, [appearance, isDisabled]);
|
|
286
|
+
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
287
|
+
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;
|
|
288
|
+
var chipsStyles = useStyles(props).styles;
|
|
289
|
+
return (jsx("div", { className: clsx(className, 'chips', !isActive
|
|
290
|
+
? fillClass && "fill_".concat(fillClass)
|
|
291
|
+
: fillActiveClass && "fill_active_".concat(fillActiveClass), !isActive
|
|
292
|
+
? fillHoverClass && "fill_hover_".concat(fillHoverClass)
|
|
293
|
+
: 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: jsxs("div", { className: "chips__inner", children: [(iconBefore || iconBeforeSrc) && (jsx(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' ? (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, iconFillActive: iconAfterFillActiveIcon, fillSize: iconAfterFillSize, iconFill: iconAfterFillIcon, imageSrc: iconAfterSrc, shape: iconAfterShape, SvgImage: iconAfter, isActive: isActive })), badgeValue && (jsx(Badge, { className: "chips__badge", appearance: badgeAppearance, size: badgeSize, textColor: badgeTextColor, textSize: badgeTextSize, shape: badgeShape, value: badgeValue }))] }) }));
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
function ChipsGroup(props) {
|
|
297
|
+
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;
|
|
298
|
+
var propsGenerator = useDevicePropsGenerator(props);
|
|
299
|
+
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;
|
|
300
|
+
// @ts-expect-error
|
|
301
|
+
var _a = useStyles(props), groupStyles = _a.styles, groupWrapperStyles = _a.wrapper;
|
|
302
|
+
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), 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
|
|
303
|
+
? children
|
|
304
|
+
: chipsList === null || chipsList === void 0 ? void 0 : chipsList.map(function (item) { return (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 (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)); })) }));
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
export { Chips as C, chipsAppearance as a, ChipsGroup as b, chipsConfig as c };
|
|
@@ -8,10 +8,10 @@ var locale = require('date-fns/locale');
|
|
|
8
8
|
var DatePicker = require('react-datepicker');
|
|
9
9
|
var useDevicePropsGenerator = require('./cjs/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
10
10
|
var useStyles = require('./cjs/hooks/useStyles/useStyles.js');
|
|
11
|
-
var Button = require('./
|
|
12
|
-
var Tooltip = require('./
|
|
13
|
-
var Input = require('./
|
|
14
|
-
var Label = require('./
|
|
11
|
+
var Button = require('./Button_cjs_plv5-qcj.js');
|
|
12
|
+
var Tooltip = require('./Tooltip_cjs_DHduWa-v.js');
|
|
13
|
+
var Input = require('./Input_cjs_CPmXkQGd.js');
|
|
14
|
+
var Label = require('./Label_cjs_BGJfyrOL.js');
|
|
15
15
|
var Text = require('./Text_cjs_C9fOm0nd.js');
|
|
16
16
|
var _default = require('@itcase/icons/default');
|
|
17
17
|
|
|
@@ -6,10 +6,10 @@ import { ru } from 'date-fns/locale';
|
|
|
6
6
|
import DatePicker from 'react-datepicker';
|
|
7
7
|
import { useDevicePropsGenerator } from './hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
8
8
|
import { useStyles } from './hooks/useStyles/useStyles.js';
|
|
9
|
-
import { B as Button } from './
|
|
10
|
-
import { I as Icon } from './
|
|
11
|
-
import { I as Input } from './
|
|
12
|
-
import { L as Label } from './
|
|
9
|
+
import { B as Button } from './Button_es_BigB2Wz6.js';
|
|
10
|
+
import { I as Icon } from './Tooltip_es_ltCY-w4M.js';
|
|
11
|
+
import { I as Input } from './Input_es_D9Y1Rj5Y.js';
|
|
12
|
+
import { L as Label } from './Label_es_C4Px7b-N.js';
|
|
13
13
|
import { T as Text } from './Text_es_BfLRfj-5.js';
|
|
14
14
|
import { icons14 } from '@itcase/icons/default';
|
|
15
15
|
|
|
@@ -7,7 +7,7 @@ var useDevicePropsGenerator = require('./cjs/hooks/useDevicePropsGenerator/useDe
|
|
|
7
7
|
var useStyles = require('./cjs/hooks/useStyles/useStyles.js');
|
|
8
8
|
var tslib_es6 = require('./tslib.es6_cjs_CCZ3TN_7.js');
|
|
9
9
|
var Divider = require('./Divider_cjs_BmCJj3TN.js');
|
|
10
|
-
var Tooltip = require('./
|
|
10
|
+
var Tooltip = require('./Tooltip_cjs_DHduWa-v.js');
|
|
11
11
|
var Text = require('./Text_cjs_C9fOm0nd.js');
|
|
12
12
|
|
|
13
13
|
function Dropdown(props) {
|
|
@@ -5,7 +5,7 @@ import { useDevicePropsGenerator } from './hooks/useDevicePropsGenerator/useDevi
|
|
|
5
5
|
import { useStyles } from './hooks/useStyles/useStyles.js';
|
|
6
6
|
import { _ as __assign } from './tslib.es6_es_Bwu1Cn-t.js';
|
|
7
7
|
import { D as Divider } from './Divider_es_kY-30pft.js';
|
|
8
|
-
import { I as Icon } from './
|
|
8
|
+
import { I as Icon } from './Tooltip_es_ltCY-w4M.js';
|
|
9
9
|
import { T as Text } from './Text_es_BfLRfj-5.js';
|
|
10
10
|
|
|
11
11
|
function Dropdown(props) {
|
|
@@ -6,7 +6,7 @@ var React = require('react');
|
|
|
6
6
|
var clsx = require('clsx');
|
|
7
7
|
var useDevicePropsGenerator = require('./cjs/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
8
8
|
var useStyles = require('./cjs/hooks/useStyles/useStyles.js');
|
|
9
|
-
var Tooltip = require('./
|
|
9
|
+
var Tooltip = require('./Tooltip_cjs_DHduWa-v.js');
|
|
10
10
|
var Text = require('./Text_cjs_C9fOm0nd.js');
|
|
11
11
|
|
|
12
12
|
var labelAppearanceAccent = {
|
|
@@ -48,6 +48,13 @@ var labelAppearanceDanger = {
|
|
|
48
48
|
};
|
|
49
49
|
|
|
50
50
|
var labelAppearanceDisable = {
|
|
51
|
+
disableMutedPrimary: {
|
|
52
|
+
fill: 'disableMuted',
|
|
53
|
+
labelTextColor: 'disableMutedTextPrimary',
|
|
54
|
+
borderColor: 'disableMutedBorderSecondary',
|
|
55
|
+
iconAfterFillIcon: 'disableMutedItemPrimary',
|
|
56
|
+
iconBeforeFillIcon: 'disableMutedItemPrimary',
|
|
57
|
+
},
|
|
51
58
|
disablePrimary: {
|
|
52
59
|
fill: 'disablePrimary',
|
|
53
60
|
labelTextColor: 'disableTextPrimary',
|
|
@@ -55,13 +62,6 @@ var labelAppearanceDisable = {
|
|
|
55
62
|
iconAfterFillIcon: 'disableItemPrimary',
|
|
56
63
|
iconBeforeFillIcon: 'disableItemPrimary',
|
|
57
64
|
},
|
|
58
|
-
disableMuted: {
|
|
59
|
-
fill: 'disableMuted',
|
|
60
|
-
labelTextColor: 'disableMutedTextPrimary',
|
|
61
|
-
borderColor: 'disableMutedBorderSecondary',
|
|
62
|
-
iconAfterFillIcon: 'disableMutedItemPrimary',
|
|
63
|
-
iconBeforeFillIcon: 'disableMutedItemPrimary',
|
|
64
|
-
},
|
|
65
65
|
};
|
|
66
66
|
|
|
67
67
|
var labelAppearanceError = {
|
|
@@ -110,16 +110,17 @@ var labelAppearancePrimary = {
|
|
|
110
110
|
primaryMutedPrimary: {
|
|
111
111
|
fill: 'primaryDisabled',
|
|
112
112
|
labelTextColor: 'primaryTextSecondary',
|
|
113
|
+
labelTextColorHover: 'primaryTextSecondary',
|
|
113
114
|
borderColor: 'primaryBorderTertiary',
|
|
114
115
|
iconAfterFillIcon: 'primaryItemSecondary',
|
|
115
116
|
iconBeforeFillIcon: 'primaryItemSecondary',
|
|
116
117
|
},
|
|
117
118
|
primaryPrimary: {
|
|
118
|
-
fill: '
|
|
119
|
-
labelTextColor: '
|
|
120
|
-
borderColor: '
|
|
121
|
-
iconAfterFillIcon: '
|
|
122
|
-
iconBeforeFillIcon: '
|
|
119
|
+
fill: 'primaryDisabled',
|
|
120
|
+
labelTextColor: 'primaryTextSecondary',
|
|
121
|
+
borderColor: 'primaryBorderTertiary',
|
|
122
|
+
iconAfterFillIcon: 'primaryItemSecondary',
|
|
123
|
+
iconBeforeFillIcon: 'primaryItemSecondary',
|
|
123
124
|
},
|
|
124
125
|
};
|
|
125
126
|
|
|
@@ -235,6 +236,7 @@ var labelAppearanceSurface = {
|
|
|
235
236
|
surfaceMutedPrimary: {
|
|
236
237
|
fill: 'surfaceSecondary',
|
|
237
238
|
labelTextColor: 'surfaceTextQuaternary',
|
|
239
|
+
labelTextColorHover: 'surfaceTextQuaternary',
|
|
238
240
|
borderColor: 'surfaceBorderQuaternary',
|
|
239
241
|
iconAfterFillIcon: 'surfaceItemQuaternary',
|
|
240
242
|
iconBeforeFillIcon: 'surfaceItemQuaternary',
|
|
@@ -4,7 +4,7 @@ import { useRef, useCallback } from 'react';
|
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { useDevicePropsGenerator } from './hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
6
6
|
import { useStyles } from './hooks/useStyles/useStyles.js';
|
|
7
|
-
import { I as Icon, T as Tooltip } from './
|
|
7
|
+
import { I as Icon, T as Tooltip } from './Tooltip_es_ltCY-w4M.js';
|
|
8
8
|
import { T as Text } from './Text_es_BfLRfj-5.js';
|
|
9
9
|
|
|
10
10
|
var labelAppearanceAccent = {
|
|
@@ -46,6 +46,13 @@ var labelAppearanceDanger = {
|
|
|
46
46
|
};
|
|
47
47
|
|
|
48
48
|
var labelAppearanceDisable = {
|
|
49
|
+
disableMutedPrimary: {
|
|
50
|
+
fill: 'disableMuted',
|
|
51
|
+
labelTextColor: 'disableMutedTextPrimary',
|
|
52
|
+
borderColor: 'disableMutedBorderSecondary',
|
|
53
|
+
iconAfterFillIcon: 'disableMutedItemPrimary',
|
|
54
|
+
iconBeforeFillIcon: 'disableMutedItemPrimary',
|
|
55
|
+
},
|
|
49
56
|
disablePrimary: {
|
|
50
57
|
fill: 'disablePrimary',
|
|
51
58
|
labelTextColor: 'disableTextPrimary',
|
|
@@ -53,13 +60,6 @@ var labelAppearanceDisable = {
|
|
|
53
60
|
iconAfterFillIcon: 'disableItemPrimary',
|
|
54
61
|
iconBeforeFillIcon: 'disableItemPrimary',
|
|
55
62
|
},
|
|
56
|
-
disableMuted: {
|
|
57
|
-
fill: 'disableMuted',
|
|
58
|
-
labelTextColor: 'disableMutedTextPrimary',
|
|
59
|
-
borderColor: 'disableMutedBorderSecondary',
|
|
60
|
-
iconAfterFillIcon: 'disableMutedItemPrimary',
|
|
61
|
-
iconBeforeFillIcon: 'disableMutedItemPrimary',
|
|
62
|
-
},
|
|
63
63
|
};
|
|
64
64
|
|
|
65
65
|
var labelAppearanceError = {
|
|
@@ -108,16 +108,17 @@ var labelAppearancePrimary = {
|
|
|
108
108
|
primaryMutedPrimary: {
|
|
109
109
|
fill: 'primaryDisabled',
|
|
110
110
|
labelTextColor: 'primaryTextSecondary',
|
|
111
|
+
labelTextColorHover: 'primaryTextSecondary',
|
|
111
112
|
borderColor: 'primaryBorderTertiary',
|
|
112
113
|
iconAfterFillIcon: 'primaryItemSecondary',
|
|
113
114
|
iconBeforeFillIcon: 'primaryItemSecondary',
|
|
114
115
|
},
|
|
115
116
|
primaryPrimary: {
|
|
116
|
-
fill: '
|
|
117
|
-
labelTextColor: '
|
|
118
|
-
borderColor: '
|
|
119
|
-
iconAfterFillIcon: '
|
|
120
|
-
iconBeforeFillIcon: '
|
|
117
|
+
fill: 'primaryDisabled',
|
|
118
|
+
labelTextColor: 'primaryTextSecondary',
|
|
119
|
+
borderColor: 'primaryBorderTertiary',
|
|
120
|
+
iconAfterFillIcon: 'primaryItemSecondary',
|
|
121
|
+
iconBeforeFillIcon: 'primaryItemSecondary',
|
|
121
122
|
},
|
|
122
123
|
};
|
|
123
124
|
|
|
@@ -233,6 +234,7 @@ var labelAppearanceSurface = {
|
|
|
233
234
|
surfaceMutedPrimary: {
|
|
234
235
|
fill: 'surfaceSecondary',
|
|
235
236
|
labelTextColor: 'surfaceTextQuaternary',
|
|
237
|
+
labelTextColorHover: 'surfaceTextQuaternary',
|
|
236
238
|
borderColor: 'surfaceBorderQuaternary',
|
|
237
239
|
iconAfterFillIcon: 'surfaceItemQuaternary',
|
|
238
240
|
iconBeforeFillIcon: 'surfaceItemQuaternary',
|
|
@@ -105,10 +105,12 @@ function Loader(props) {
|
|
|
105
105
|
return (tslib_es6.__assign(tslib_es6.__assign({}, resultConfig), (_a = loaderConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
106
106
|
}, {});
|
|
107
107
|
var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
|
|
108
|
-
var fillClass = propsGenerator.fillClass, textColor = propsGenerator.textColor, textSize = propsGenerator.textSize, heightClass = propsGenerator.heightClass, itemFillClass = propsGenerator.itemFillClass, shapeClass = propsGenerator.shapeClass, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass;
|
|
108
|
+
var fillClass = propsGenerator.fillClass, textColor = propsGenerator.textColor, textSize = propsGenerator.textSize, heightClass = propsGenerator.heightClass, shapeStrengthClass = propsGenerator.shapeStrengthClass, itemFillClass = propsGenerator.itemFillClass, shapeClass = propsGenerator.shapeClass, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass;
|
|
109
109
|
// @ts-expect-error
|
|
110
110
|
var loader = useStyles.useStyles(props).styles;
|
|
111
|
-
return (jsxRuntime.jsxs("div", { className: clsx('loader', className, widthClass && "width_".concat(widthClass), heightClass && "height_".concat(heightClass), fillClass && "fill_".concat(fillClass), sizeClass && "loader_size_".concat(sizeClass), isSkeleton && "loader_skeleton", type && "loader_type_".concat(type), shapeClass && "
|
|
111
|
+
return (jsxRuntime.jsxs("div", { className: clsx('loader', className, widthClass && "width_".concat(widthClass), heightClass && "height_".concat(heightClass), fillClass && "fill_".concat(fillClass), sizeClass && "loader_size_".concat(sizeClass), isSkeleton && "loader_skeleton", type && "loader_type_".concat(type), shapeClass && "shape_".concat(shapeClass), shapeStrengthClass
|
|
112
|
+
? "shape-strength_".concat(shapeStrengthClass)
|
|
113
|
+
: shapeClass === 'rounded' && 'shape-strength_default'), style: loader, children: [children || (jsxRuntime.jsxs("div", { className: "loader__inner", children: [jsxRuntime.jsx("span", { className: clsx('loader__item', itemFillClass && "fill_".concat(itemFillClass)) }), jsxRuntime.jsx("span", { className: clsx('loader__item', itemFillClass && "fill_".concat(itemFillClass)) }), jsxRuntime.jsx("span", { className: clsx('loader__item', itemFillClass && "fill_".concat(itemFillClass)) })] })), text && (jsxRuntime.jsx(Text.Text, { className: "loader__text", size: textSize, textColor: textColor, children: text }))] }));
|
|
112
114
|
}
|
|
113
115
|
|
|
114
116
|
exports.Loader = Loader;
|
|
@@ -103,10 +103,12 @@ function Loader(props) {
|
|
|
103
103
|
return (__assign(__assign({}, resultConfig), (_a = loaderConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
104
104
|
}, {});
|
|
105
105
|
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
106
|
-
var fillClass = propsGenerator.fillClass, textColor = propsGenerator.textColor, textSize = propsGenerator.textSize, heightClass = propsGenerator.heightClass, itemFillClass = propsGenerator.itemFillClass, shapeClass = propsGenerator.shapeClass, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass;
|
|
106
|
+
var fillClass = propsGenerator.fillClass, textColor = propsGenerator.textColor, textSize = propsGenerator.textSize, heightClass = propsGenerator.heightClass, shapeStrengthClass = propsGenerator.shapeStrengthClass, itemFillClass = propsGenerator.itemFillClass, shapeClass = propsGenerator.shapeClass, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass;
|
|
107
107
|
// @ts-expect-error
|
|
108
108
|
var loader = useStyles(props).styles;
|
|
109
|
-
return (jsxs("div", { className: clsx('loader', className, widthClass && "width_".concat(widthClass), heightClass && "height_".concat(heightClass), fillClass && "fill_".concat(fillClass), sizeClass && "loader_size_".concat(sizeClass), isSkeleton && "loader_skeleton", type && "loader_type_".concat(type), shapeClass && "
|
|
109
|
+
return (jsxs("div", { className: clsx('loader', className, widthClass && "width_".concat(widthClass), heightClass && "height_".concat(heightClass), fillClass && "fill_".concat(fillClass), sizeClass && "loader_size_".concat(sizeClass), isSkeleton && "loader_skeleton", type && "loader_type_".concat(type), shapeClass && "shape_".concat(shapeClass), shapeStrengthClass
|
|
110
|
+
? "shape-strength_".concat(shapeStrengthClass)
|
|
111
|
+
: shapeClass === 'rounded' && 'shape-strength_default'), style: loader, children: [children || (jsxs("div", { className: "loader__inner", children: [jsx("span", { className: clsx('loader__item', itemFillClass && "fill_".concat(itemFillClass)) }), jsx("span", { className: clsx('loader__item', itemFillClass && "fill_".concat(itemFillClass)) }), jsx("span", { className: clsx('loader__item', itemFillClass && "fill_".concat(itemFillClass)) })] })), text && (jsx(Text, { className: "loader__text", size: textSize, textColor: textColor, children: text }))] }));
|
|
110
112
|
}
|
|
111
113
|
|
|
112
114
|
export { Loader as L, loaderAppearance as a, loaderConfig as l };
|