@salutejs/sdds-cs 0.376.0-dev.0 → 0.377.0-dev.0

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.
Files changed (34) hide show
  1. package/dist/emotion/cjs/components/Autocomplete/Autocomplete.clear.config.js +234 -0
  2. package/dist/emotion/cjs/components/Autocomplete/Autocomplete.config.js +10 -0
  3. package/dist/emotion/cjs/components/Autocomplete/Autocomplete.js +14 -1
  4. package/dist/emotion/cjs/components/DatePicker/DatePicker.config.js +1 -0
  5. package/dist/emotion/cjs/components/Drawer/Drawer.config.js +8 -1
  6. package/dist/emotion/cjs/components/Select/Select.clear.config.js +306 -0
  7. package/dist/emotion/cjs/components/Select/Select.config.js +9 -0
  8. package/dist/emotion/cjs/components/Select/Select.js +8 -1
  9. package/dist/emotion/cjs/components/TextArea/TextArea.clear.config.js +1 -0
  10. package/dist/emotion/cjs/components/TextArea/TextArea.config.js +1 -0
  11. package/dist/emotion/cjs/components/TextField/TextField.clear.config.js +7 -1
  12. package/dist/emotion/cjs/components/TextField/TextField.config.js +2 -0
  13. package/dist/emotion/cjs/components/TimePicker/TimePicker.config.js +9 -0
  14. package/dist/emotion/es/components/Autocomplete/Autocomplete.clear.config.js +224 -0
  15. package/dist/emotion/es/components/Autocomplete/Autocomplete.config.js +10 -0
  16. package/dist/emotion/es/components/Autocomplete/Autocomplete.js +9 -2
  17. package/dist/emotion/es/components/DatePicker/DatePicker.config.js +1 -0
  18. package/dist/emotion/es/components/Drawer/Drawer.config.js +9 -2
  19. package/dist/emotion/es/components/Select/Select.clear.config.js +296 -0
  20. package/dist/emotion/es/components/Select/Select.config.js +9 -0
  21. package/dist/emotion/es/components/Select/Select.js +9 -2
  22. package/dist/emotion/es/components/TextArea/TextArea.clear.config.js +1 -0
  23. package/dist/emotion/es/components/TextArea/TextArea.config.js +1 -0
  24. package/dist/emotion/es/components/TextField/TextField.clear.config.js +7 -1
  25. package/dist/emotion/es/components/TextField/TextField.config.js +2 -0
  26. package/dist/emotion/es/components/TimePicker/TimePicker.config.js +9 -0
  27. package/package.json +10 -10
  28. package/types/components/Autocomplete/Autocomplete.clear.config.d.ts +26 -0
  29. package/types/components/Autocomplete/Autocomplete.d.ts +1796 -10
  30. package/types/components/Calendar/Calendar.d.ts +3 -1
  31. package/types/components/DatePicker/DatePicker.d.ts +9 -9
  32. package/types/components/Select/Select.clear.config.d.ts +30 -0
  33. package/types/components/Select/Select.d.ts +36 -10
  34. package/types/components/TimePicker/TimePicker.d.ts +2 -0
@@ -0,0 +1,296 @@
1
+ import { bodyM, bodyS, bodyXS, inverseTextPrimary, inverseTextSecondary, onDarkTextPrimary, outlineAccent, outlineNegative, outlineNegativeHover, outlineSolidPrimary, outlineSolidPrimaryHover, outlineSolidSecondary, surfaceAccent, surfaceClear, surfaceNegative, surfaceSolidDefault, surfaceSolidDefaultHover, surfaceSolidPrimary, surfaceSolidPrimaryActive, surfaceSolidPrimaryHover, surfaceTransparentAccent, textAccent, textAccentActive, textAccentMinor, textNegative, textPrimary, textPrimaryHover, textSecondary, textTertiary } from '@salutejs/sdds-themes/tokens/sdds_cs';
2
+ import { css, selectTokens as tokens } from '@salutejs/plasma-new-hope/emotion';
3
+ export const config = {
4
+ defaults: {
5
+ view: 'default',
6
+ size: 's',
7
+ labelPlacement: 'outer',
8
+ chipView: 'default'
9
+ },
10
+ variations: {
11
+ view: {
12
+ default: css`
13
+ ${tokens.textFieldColor}: ${textPrimary};
14
+ ${tokens.textFieldPlaceholderColor}: ${textSecondary};
15
+ ${tokens.textFieldPlaceholderColorFocus}: ${textTertiary};
16
+ ${tokens.textFieldBackgroundColor}: transparent;
17
+ ${tokens.textFieldBackgroundColorFocus}: transparent;
18
+ ${tokens.textFieldLabelColor}: ${textPrimary};
19
+ ${tokens.textFieldLeftHelperColor}: ${textSecondary};
20
+ ${tokens.textFieldTitleCaptionColor}: ${textSecondary};
21
+ ${tokens.textFieldContentSlotColor}: ${textSecondary};
22
+ ${tokens.textFieldBorderColor}: ${outlineSolidPrimary};
23
+ ${tokens.textFieldBorderColorHover}: ${outlineSolidPrimaryHover};
24
+ ${tokens.textFieldBorderColorFocus}: ${outlineAccent};
25
+ ${tokens.textFieldBackgroundColorHover}: transparent;
26
+ ${tokens.textFieldDividerColor}: ${outlineSolidPrimary};
27
+ ${tokens.textFieldDividerColorHover}: ${textSecondary};
28
+ ${tokens.textFieldDividerColorFocus}: ${surfaceAccent};
29
+ ${tokens.textFieldClearPlaceholderColor}: ${textSecondary};
30
+ ${tokens.textFieldClearPlaceholderColorFocus}: ${textTertiary};
31
+
32
+ ${tokens.textFieldIndicatorColor}: ${surfaceNegative};
33
+ ${tokens.textFieldOptionalColor}: ${textTertiary};
34
+
35
+ ${tokens.buttonColor}: ${textAccent};
36
+ ${tokens.buttonColorHover}: ${textAccentMinor};
37
+ ${tokens.buttonColorActive}: ${textAccentActive};
38
+ ${tokens.buttonArrowColor}: ${textPrimary};
39
+ ${tokens.buttonArrowColorHover}: ${textPrimaryHover};
40
+ ${tokens.buttonArrowColorActive}: ${textPrimaryHover};
41
+ ${tokens.buttonBackgroundColor}: ${surfaceSolidPrimary};
42
+ ${tokens.buttonBackgroundColorHover}: ${surfaceSolidPrimaryHover};
43
+ ${tokens.buttonBackgroundColorActive}: ${surfaceSolidPrimaryActive};
44
+
45
+ ${tokens.disclosureIconColor}: ${textAccent};
46
+ ${tokens.disclosureIconColorHover}: ${textAccentMinor};
47
+ ${tokens.itemBackgroundHover}: ${surfaceTransparentAccent};
48
+ ${tokens.itemDisabledOpacity}: 1;
49
+ ${tokens.itemDisabledColor}: ${textSecondary};
50
+
51
+ ${tokens.dropdownBorderColor}: ${outlineSolidPrimary};
52
+ ${tokens.checkboxIconColor}: ${textPrimary};
53
+
54
+ ${tokens.dividerColor}: ${surfaceSolidPrimary};
55
+
56
+ ${tokens.itemIconColor}: ${textAccent};
57
+
58
+ ${tokens.checkboxFillColor}: ${textAccent};
59
+ ${tokens.checkboxIconColor}: ${onDarkTextPrimary};
60
+ ${tokens.checkboxTriggerBorderCheckedColor}: none;
61
+ ${tokens.checkboxTriggerBorderColor}: ${outlineAccent};
62
+ `,
63
+ negative: css`
64
+ ${tokens.textFieldColor}: ${textNegative};
65
+ ${tokens.textFieldColorFocus}: ${textPrimary};
66
+ ${tokens.textFieldPlaceholderColor}: ${textNegative};
67
+ ${tokens.textFieldPlaceholderColorHover}: ${textSecondary};
68
+ ${tokens.textFieldPlaceholderColorFocus}: ${textTertiary};
69
+ ${tokens.textFieldBackgroundColor}: transparent;
70
+ ${tokens.textFieldBackgroundColorFocus}: transparent;
71
+ ${tokens.textFieldLabelColor}: ${textPrimary};
72
+ ${tokens.textFieldLeftHelperColor}: ${textNegative};
73
+ ${tokens.textFieldTitleCaptionColor}: ${textSecondary};
74
+ ${tokens.textFieldContentSlotColor}: ${textSecondary};
75
+ ${tokens.textFieldBorderColor}: ${outlineNegative};
76
+ ${tokens.textFieldBorderColorHover}: ${outlineNegativeHover};
77
+ ${tokens.textFieldBorderColorFocus}: ${outlineAccent};
78
+ ${tokens.textFieldBackgroundColorHover}: transparent;
79
+ ${tokens.textFieldDividerColor}: ${surfaceNegative};
80
+ ${tokens.textFieldDividerColorHover}: ${surfaceNegative};
81
+ ${tokens.textFieldDividerColorFocus}: ${surfaceAccent};
82
+ ${tokens.textFieldClearPlaceholderColor}: ${textNegative};
83
+ ${tokens.textFieldClearPlaceholderColorFocus}: ${textTertiary};
84
+
85
+ ${tokens.textFieldIndicatorColor}: ${surfaceNegative};
86
+ ${tokens.textFieldOptionalColor}: ${textTertiary};
87
+
88
+ ${tokens.buttonColor}: ${textAccent};
89
+ ${tokens.buttonColorHover}: ${textAccentMinor};
90
+ ${tokens.buttonColorActive}: ${textAccentActive};
91
+ ${tokens.buttonArrowColor}: ${textPrimary};
92
+ ${tokens.buttonArrowColorHover}: ${textPrimaryHover};
93
+ ${tokens.buttonArrowColorActive}: ${textPrimaryHover};
94
+ ${tokens.buttonBackgroundColor}: ${surfaceSolidPrimary};
95
+ ${tokens.buttonBackgroundColorHover}: ${surfaceSolidPrimaryHover};
96
+ ${tokens.buttonBackgroundColorActive}: ${surfaceSolidPrimaryActive};
97
+
98
+ ${tokens.disclosureIconColor}: ${textAccent};
99
+ ${tokens.disclosureIconColorHover}: ${textAccentMinor};
100
+ ${tokens.itemBackgroundHover}: ${surfaceTransparentAccent};
101
+ ${tokens.itemDisabledOpacity}: 1;
102
+ ${tokens.itemDisabledColor}: ${textSecondary};
103
+
104
+ ${tokens.dropdownBorderColor}: ${outlineSolidPrimary};
105
+ ${tokens.checkboxIconColor}: ${textAccent};
106
+
107
+ ${tokens.dividerColor}: ${surfaceSolidPrimary};
108
+
109
+ ${tokens.itemIconColor}: ${textAccent};
110
+
111
+ ${tokens.checkboxFillColor}: ${textAccent};
112
+ ${tokens.checkboxIconColor}: ${onDarkTextPrimary};
113
+ ${tokens.checkboxTriggerBorderCheckedColor}: none;
114
+ ${tokens.checkboxTriggerBorderColor}: ${outlineAccent};
115
+ `
116
+ },
117
+ size: {
118
+ s: css`
119
+ ${tokens.textFieldHeight}: 2.5rem;
120
+ ${tokens.textFieldPadding}: 0.6875rem 0;
121
+ ${tokens.textFieldPaddingWithChips}: 0.375rem 0;
122
+ ${tokens.textFieldBorderRadius}: 0;
123
+ ${tokens.textFieldBorderWidth}: 0;
124
+
125
+ ${tokens.textFieldLeftContentMargin}: -0.1875rem 0.25rem -0.1875rem 0;
126
+ ${tokens.textFieldRightContentMargin}: -0.1875rem 0 -0.1875rem 0.75rem;
127
+
128
+ ${tokens.textFieldTextBeforeMargin}: 0 0.25rem 0 0;
129
+ ${tokens.textFieldTextAfterMargin}: 0 0 0 0.25rem;
130
+
131
+ ${tokens.textFieldFontFamily}: ${bodyM.fontFamily};
132
+ ${tokens.textFieldFontSize}: ${bodyM.fontSize};
133
+ ${tokens.textFieldFontStyle}: ${bodyM.fontStyle};
134
+ ${tokens.textFieldFontWeight}: ${bodyM.fontWeight};
135
+ ${tokens.textFieldLetterSpacing}: ${bodyM.letterSpacing};
136
+ ${tokens.textFieldLineHeight}: ${bodyM.lineHeight};
137
+
138
+ ${tokens.textFieldLabelOffset}: 0.5rem;
139
+ ${tokens.textFieldLabelFontFamily}: ${bodyS.fontFamily};
140
+ ${tokens.textFieldLabelFontSize}: ${bodyS.fontSize};
141
+ ${tokens.textFieldLabelFontStyle}: ${bodyS.fontStyle};
142
+ ${tokens.textFieldLabelFontWeight}: ${bodyS.fontWeight};
143
+ ${tokens.textFieldLabelLetterSpacing}: ${bodyS.letterSpacing};
144
+ ${tokens.textFieldLabelLineHeight}: ${bodyS.lineHeight};
145
+ ${tokens.textFieldTitleCaptionMargin}: 0.1875rem;
146
+ ${tokens.textFieldTitleCaptionFontFamily}: ${bodyXS.fontFamily};
147
+ ${tokens.textFieldTitleCaptionFontSize}: ${bodyXS.fontSize};
148
+ ${tokens.textFieldTitleCaptionFontStyle}: ${bodyXS.fontStyle};
149
+ ${tokens.textFieldTitleCaptionFontWeight}: ${bodyXS.fontWeight};
150
+ ${tokens.textFieldTitleCaptionLetterSpacing}: ${bodyXS.letterSpacing};
151
+ ${tokens.textFieldTitleCaptionLineHeight}: ${bodyXS.lineHeight};
152
+
153
+ ${tokens.textFieldLeftHelperOffset}: 0.25rem 0 0 0;
154
+ ${tokens.textFieldLeftHelperFontFamily}: ${bodyS.fontFamily};
155
+ ${tokens.textFieldLeftHelperFontSize}: ${bodyS.fontSize};
156
+ ${tokens.textFieldLeftHelperFontStyle}: ${bodyS.fontStyle};
157
+ ${tokens.textFieldLeftHelperFontWeight}: ${bodyS.fontWeight};
158
+ ${tokens.textFieldLeftHelperLetterSpacing}: ${bodyS.letterSpacing};
159
+ ${tokens.textFieldLeftHelperLineHeight}: ${bodyS.lineHeight};
160
+
161
+ ${tokens.textFieldLabelInnerPadding}: 0.3125rem 0 0 0;
162
+ ${tokens.textFieldContentLabelInnerPadding}: 1.0625rem 0 0.3125rem 0;
163
+
164
+ ${tokens.textFieldIndicatorSizeInner}: 0.375rem;
165
+ ${tokens.textFieldIndicatorSizeOuter}: 0.375rem;
166
+ ${tokens.textFieldIndicatorLabelPlacementInner}: 0 0 0 0;
167
+ ${tokens.textFieldIndicatorLabelPlacementOuter}: 0.3125rem auto auto -0.6875rem;
168
+ ${tokens.textFieldIndicatorLabelPlacementInnerRight}: 0 0 auto auto;
169
+ ${tokens.textFieldIndicatorLabelPlacementOuterRight}: 0.25rem -0.625rem auto auto;
170
+ ${tokens.textFieldClearIndicatorLabelPlacementInner}: 1.063rem auto auto -0.75rem;
171
+ ${tokens.textFieldClearIndicatorLabelPlacementInnerRight}: 1.063rem -0.75rem auto auto;
172
+ ${tokens.textFieldClearIndicatorHintInnerRight}: 1.063rem -2.125rem auto auto;
173
+
174
+ ${tokens.textFieldChipGap}: 0.25rem;
175
+ ${tokens.textFieldChipBorderRadius}: 0.25rem;
176
+ ${tokens.textFieldChipWidth}: auto;
177
+ ${tokens.textFieldChipHeight}: 1.75rem;
178
+ ${tokens.textFieldChipPadding}: 0 0.5rem 0 0.75rem;
179
+ ${tokens.textFieldChipClearContentMarginLeft}: 0.375rem;
180
+ ${tokens.textFieldChipClearContentMarginRight}: 0rem;
181
+ ${tokens.textFieldChipCloseIconSize}: 1rem;
182
+ ${tokens.textFieldChipFontFamily}: ${bodyS.fontFamily};
183
+ ${tokens.textFieldChipFontSize}: ${bodyS.fontSize};
184
+ ${tokens.textFieldChipFontStyle}: ${bodyS.fontStyle};
185
+ ${tokens.textFieldChipFontWeight}: ${bodyS.fontWeight};
186
+ ${tokens.textFieldChipLetterSpacing}: ${bodyS.letterSpacing};
187
+ ${tokens.textFieldChipLineHeight}: ${bodyS.lineHeight};
188
+
189
+ ${tokens.buttonArrowMargin}: 0 -0.125rem 0 0.25rem;
190
+ ${tokens.targetHeight}: 2.5rem;
191
+ ${tokens.buttonPadding}: 1rem 0 1rem;
192
+
193
+ ${tokens.emptyStatePadding}: 0.625rem 0.875rem 0.625rem 0.875rem;
194
+ ${tokens.padding}: 0.125rem;
195
+ ${tokens.borderRadius}: 0.75rem;
196
+
197
+ ${tokens.dropdownBorderWidth}: 0.125rem;
198
+
199
+ ${tokens.itemHeight}: 1.5rem;
200
+ ${tokens.itemPadding}: 0.5rem 0.5rem;
201
+ ${tokens.itemPaddingTight}: 0.25rem 0.5rem;
202
+ ${tokens.itemBorderRadius}: 0.5rem;
203
+ ${tokens.itemIconSize}: 1.5rem;
204
+ ${tokens.itemIconSizeTight}: 1rem;
205
+ ${tokens.itemIconMargin}: 0 0.5rem 0 0;
206
+
207
+ ${tokens.cellPadding}: 0rem;
208
+ ${tokens.cellPaddingLeftContent}: 0rem;
209
+ ${tokens.cellPaddingContent}: 0rem;
210
+ ${tokens.cellPaddingRightContent}: 0rem;
211
+ ${tokens.cellTextboxGap}: 0.125rem;
212
+ ${tokens.cellGap}: 0.375rem;
213
+ ${tokens.cellTitleFontFamily}: ${bodyM.fontFamily};
214
+ ${tokens.cellTitleFontSize}: ${bodyM.fontSize};
215
+ ${tokens.cellTitleFontStyle}: ${bodyM.fontStyle};
216
+ ${tokens.cellTitleFontWeight}: ${bodyM.fontWeight};
217
+ ${tokens.cellTitleLetterSpacing}: ${bodyM.letterSpacing};
218
+ ${tokens.cellTitleLineHeight}: ${bodyM.lineHeight};
219
+
220
+ ${tokens.fontFamily}: ${bodyM.fontFamily};
221
+ ${tokens.fontSize}: ${bodyM.fontSize};
222
+ ${tokens.fontStyle}: ${bodyM.fontStyle};
223
+ ${tokens.fontWeight}: ${bodyM.fontWeight};
224
+ ${tokens.fontLetterSpacing}: ${bodyM.letterSpacing};
225
+ ${tokens.fontLineHeight}: ${bodyM.lineHeight};
226
+
227
+ ${tokens.checkboxTriggerSize}: 1.25rem;
228
+ ${tokens.checkboxTriggerSizeTight}: 0.875rem;
229
+ ${tokens.checkboxTriggerBorderRadius}: 0.375rem;
230
+ ${tokens.checkboxTriggerBorderRadiusTight}: 0.25rem;
231
+ ${tokens.checkboxTriggerBorderWidth}: 0.125rem;
232
+
233
+ ${tokens.indicatorSize}: 0.375rem;
234
+
235
+ ${tokens.dividerMarginTop}: 0.375rem;
236
+ ${tokens.dividerMarginRight}: 0.75rem;
237
+ ${tokens.dividerMarginBottom}: 0.375rem;
238
+ ${tokens.dividerMarginLeft}: 0.75rem;
239
+ ${tokens.dividerMarginTopTight}: 0.25rem;
240
+ ${tokens.dividerMarginBottomTight}: 0.25rem;
241
+ `
242
+ },
243
+ labelPlacement: {
244
+ inner: css`
245
+ ${tokens.textFieldPlaceholderColor}: ${textSecondary};
246
+ ${tokens.textFieldLabelInnerFontFamily}: ${bodyXS.fontFamily};
247
+ ${tokens.textFieldLabelInnerFontSize}: ${bodyXS.fontSize};
248
+ ${tokens.textFieldLabelInnerFontStyle}: ${bodyXS.fontStyle};
249
+ ${tokens.textFieldLabelInnerFontWeight}: ${bodyXS.fontWeight};
250
+ ${tokens.textFieldLabelInnerLetterSpacing}: ${bodyXS.letterSpacing};
251
+ ${tokens.textFieldLabelInnerLineHeight}: ${bodyXS.lineHeight};
252
+ `,
253
+ outer: css``
254
+ },
255
+ chipView: {
256
+ default: css`
257
+ ${tokens.textFieldChipColor}: ${inverseTextPrimary};
258
+ ${tokens.textFieldChipColorHover}: ${inverseTextPrimary};
259
+ ${tokens.textFieldChipBackground}: ${surfaceSolidDefault};
260
+ ${tokens.textFieldChipBackgroundHover}: ${surfaceSolidDefaultHover};
261
+ ${tokens.textFieldChipCloseIconColor}: ${inverseTextSecondary};
262
+ ${tokens.textFieldChipCloseIconColorHover}: ${inverseTextPrimary};
263
+ ${tokens.textFieldChipOpacityReadonly}: 1;
264
+ `
265
+ },
266
+ disabled: {
267
+ true: css`
268
+ ${tokens.textFieldDisabledOpacity}: 1;
269
+ ${tokens.textFieldBackgroundColor}: transparent;
270
+ ${tokens.textFieldBackgroundColorFocus}: transparent;
271
+ ${tokens.textFieldBorderColor}: ${surfaceSolidPrimary};
272
+ ${tokens.textFieldBorderColorHover}: ${surfaceSolidPrimary};
273
+ ${tokens.textFieldBorderColorFocus}: ${surfaceSolidPrimary};
274
+ ${tokens.textFieldBackgroundColorHover}: transparent;
275
+ ${tokens.textFieldDividerColor}: ${surfaceSolidPrimary};
276
+ ${tokens.textFieldDividerColorHover}: ${surfaceSolidPrimary};
277
+ ${tokens.textFieldDividerColorFocus}: ${surfaceSolidPrimary};
278
+ ${tokens.textFieldColor}: ${textSecondary};
279
+ `
280
+ },
281
+ readOnly: {
282
+ true: css`
283
+ ${tokens.textFieldDividerColorReadOnly}: ${outlineSolidSecondary};
284
+ ${tokens.textFieldColorReadOnly}: ${textPrimary};
285
+ ${tokens.textFieldBackgroundColorReadOnly}: ${surfaceClear};
286
+ ${tokens.textFieldPlaceholderColorReadOnly}: ${textSecondary};
287
+ ${tokens.textFieldLeftHelperColorReadOnly}: ${textSecondary};
288
+ ${tokens.textFieldLabelColorReadOnly}: ${textSecondary};
289
+ ${tokens.disclosureIconOpacityReadOnly}: 0.4;
290
+ ${tokens.textFieldTitleCaptionColorReadOnly}: ${textSecondary};
291
+ ${tokens.textFieldBorderColor}: transparent;
292
+ ${tokens.textFieldBorderWidth}: 0;
293
+ `
294
+ }
295
+ }
296
+ };
@@ -16,6 +16,7 @@ export const config = {
16
16
  ${tokens.textFieldBackgroundColorFocus}: ${surfaceSolidCard};
17
17
  ${tokens.textFieldLabelColor}: ${textPrimary};
18
18
  ${tokens.textFieldLeftHelperColor}: ${textSecondary};
19
+ ${tokens.textFieldTitleCaptionColor}: ${textSecondary};
19
20
  ${tokens.textFieldContentSlotColor}: ${textSecondary};
20
21
  ${tokens.textFieldBorderColor}: ${outlineSolidPrimary};
21
22
  ${tokens.textFieldBorderColorHover}: ${outlineSolidPrimaryHover};
@@ -59,6 +60,7 @@ export const config = {
59
60
  ${tokens.textFieldBackgroundColorFocus}: ${surfaceSolidCard};
60
61
  ${tokens.textFieldLabelColor}: ${textPrimary};
61
62
  ${tokens.textFieldLeftHelperColor}: ${textNegative};
63
+ ${tokens.textFieldTitleCaptionColor}: ${textSecondary};
62
64
  ${tokens.textFieldContentSlotColor}: ${textSecondary};
63
65
  ${tokens.textFieldBorderColor}: ${outlineNegative};
64
66
  ${tokens.textFieldBorderColorHover}: ${outlineNegativeHover};
@@ -124,6 +126,13 @@ export const config = {
124
126
  ${tokens.textFieldLabelFontWeight}: ${bodyS.fontWeight};
125
127
  ${tokens.textFieldLabelLetterSpacing}: ${bodyS.letterSpacing};
126
128
  ${tokens.textFieldLabelLineHeight}: ${bodyS.lineHeight};
129
+ ${tokens.textFieldTitleCaptionMargin}: 0.1875rem;
130
+ ${tokens.textFieldTitleCaptionFontFamily}: ${bodyXS.fontFamily};
131
+ ${tokens.textFieldTitleCaptionFontSize}: ${bodyXS.fontSize};
132
+ ${tokens.textFieldTitleCaptionFontStyle}: ${bodyXS.fontStyle};
133
+ ${tokens.textFieldTitleCaptionFontWeight}: ${bodyXS.fontWeight};
134
+ ${tokens.textFieldTitleCaptionLetterSpacing}: ${bodyXS.letterSpacing};
135
+ ${tokens.textFieldTitleCaptionLineHeight}: ${bodyXS.lineHeight};
127
136
 
128
137
  ${tokens.textFieldLeftHelperOffset}: 0.25rem 0 0 0;
129
138
  ${tokens.textFieldLeftHelperFontFamily}: ${bodyS.fontFamily};
@@ -1,8 +1,15 @@
1
- import { selectConfig, component, mergeConfig, fixedForwardRef } from '@salutejs/plasma-new-hope/emotion';
1
+ import { selectConfig, component, mergeConfig, fixedForwardRef, createConditionalComponent } from '@salutejs/plasma-new-hope/emotion';
2
2
  import React from 'react';
3
3
  import { config } from './Select.config';
4
+ import { config as clearConfig } from './Select.clear.config';
4
5
  const mergedConfig = mergeConfig(selectConfig, config);
5
- const SelectNewHope = component(mergedConfig);
6
+ const SelectDefault = component(mergedConfig);
7
+ const mergedConfigClear = mergeConfig(selectConfig, clearConfig);
8
+ const SelectClear = component(mergedConfigClear);
9
+ const SelectNewHope = createConditionalComponent({
10
+ default: SelectDefault,
11
+ clear: SelectClear
12
+ });
6
13
  const SelectComponent = (props, ref)=>{
7
14
  return /*#__PURE__*/ React.createElement(SelectNewHope, {
8
15
  ref: ref,
@@ -194,6 +194,7 @@ export const config = {
194
194
  ${textAreaTokens.hintInnerLabelPlacementOffset}: -0.751rem -2rem auto auto;
195
195
 
196
196
  ${textAreaTokens.titleCaptionInnerLabelOffset}: 0.25rem;
197
+ ${textAreaTokens.titleCaptionMargin}: 0.1875rem;
197
198
  ${textAreaTokens.titleCaptionFontFamily}: ${bodyXS.fontFamily};
198
199
  ${textAreaTokens.titleCaptionFontSize}: ${bodyXS.fontSize};
199
200
  ${textAreaTokens.titleCaptionFontStyle}: ${bodyXS.fontStyle};
@@ -183,6 +183,7 @@ export const config = {
183
183
  ${textAreaTokens.hintInnerLabelPlacementOffset}: -0.751rem -2rem auto auto;
184
184
 
185
185
  ${textAreaTokens.titleCaptionInnerLabelOffset}: 0.25rem;
186
+ ${textAreaTokens.titleCaptionMargin}: 0.1875rem;
186
187
  ${textAreaTokens.titleCaptionFontFamily}: ${bodyXS.fontFamily};
187
188
  ${textAreaTokens.titleCaptionFontSize}: ${bodyXS.fontSize};
188
189
  ${textAreaTokens.titleCaptionFontStyle}: ${bodyXS.fontStyle};
@@ -43,9 +43,11 @@ export const config = {
43
43
  `,
44
44
  negative: css`
45
45
  ${tokens.color}: ${textNegative};
46
+ ${tokens.colorFocus}: ${textPrimary};
46
47
 
47
48
  ${tokens.placeholderColor}: ${textNegative};
48
- ${tokens.placeholderColorFocus}: ${textNegative};
49
+ ${tokens.placeholderColorHover}: ${textSecondary};
50
+ ${tokens.placeholderColorFocus}: ${textTertiary};
49
51
 
50
52
  ${tokens.backgroundColor}: transparent;
51
53
  ${tokens.backgroundColorHover}: transparent;
@@ -56,12 +58,15 @@ export const config = {
56
58
  ${tokens.labelColor}: ${textPrimary};
57
59
  ${tokens.leftHelperColor}: ${textNegative};
58
60
  ${tokens.rightHelperColor}: ${textNegative};
61
+ ${tokens.leftHelperColorFocus}: ${textSecondary};
62
+ ${tokens.rightHelperColorFocus}: ${textSecondary};
59
63
  ${tokens.titleCaptionColor}: ${textSecondary};
60
64
  ${tokens.hintIconColor}: ${textSecondary};
61
65
 
62
66
  ${tokens.contentSlotColor}: ${textNegative};
63
67
  ${tokens.contentSlotColorHover}: ${textNegativeHover};
64
68
  ${tokens.contentSlotColorActive}: ${textNegativeActive};
69
+ ${tokens.contentSlotColorFocus}: ${textSecondary};
65
70
 
66
71
  ${tokens.contentSlotRightColor}: ${textSecondary};
67
72
  ${tokens.contentSlotRightColorHover}: ${textSecondaryHover};
@@ -106,6 +111,7 @@ export const config = {
106
111
  ${tokens.hintInnerLabelPlacementOffset}: 0.062rem -2.1063rem auto auto;
107
112
 
108
113
  ${tokens.titleCaptionInnerLabelOffset}: 0.25rem;
114
+ ${tokens.titleCaptionMargin}: 0.1875rem;
109
115
  ${tokens.titleCaptionFontFamily}: ${bodyXS.fontFamily};
110
116
  ${tokens.titleCaptionFontSize}: ${bodyXS.fontSize};
111
117
  ${tokens.titleCaptionFontStyle}: ${bodyXS.fontStyle};
@@ -133,6 +133,7 @@ export const config = {
133
133
  ${tokens.hintInnerLabelPlacementOffset}: 0.312rem -2.813rem auto auto;
134
134
 
135
135
  ${tokens.titleCaptionInnerLabelOffset}: 0.25rem;
136
+ ${tokens.titleCaptionMargin}: 0.3125rem;
136
137
  ${tokens.titleCaptionFontFamily}: ${bodyXS.fontFamily};
137
138
  ${tokens.titleCaptionFontSize}: ${bodyXS.fontSize};
138
139
  ${tokens.titleCaptionFontStyle}: ${bodyXS.fontStyle};
@@ -214,6 +215,7 @@ export const config = {
214
215
  ${tokens.hintInnerLabelPlacementOffset}: 0.563rem -2.938rem auto auto;
215
216
 
216
217
  ${tokens.titleCaptionInnerLabelOffset}: 0.25rem;
218
+ ${tokens.titleCaptionMargin}: 0.1875rem;
217
219
  ${tokens.titleCaptionFontFamily}: ${bodyXS.fontFamily};
218
220
  ${tokens.titleCaptionFontSize}: ${bodyXS.fontSize};
219
221
  ${tokens.titleCaptionFontStyle}: ${bodyXS.fontStyle};
@@ -69,6 +69,7 @@ export const config = {
69
69
  ${tokens.disabledOpacity}: 0.4;
70
70
 
71
71
  ${tokens.leftHelperColor}: ${textSecondary};
72
+ ${tokens.titleCaptionColor}: ${textSecondary};
72
73
  ${tokens.leftHelperColorError}: ${textNegative};
73
74
  ${tokens.leftHelperColorSuccess}: ${textPositive};
74
75
  `
@@ -86,6 +87,13 @@ export const config = {
86
87
  ${tokens.labelFontWeight}: ${bodyS.fontWeight};
87
88
  ${tokens.labelLetterSpacing}: ${bodyS.letterSpacing};
88
89
  ${tokens.labelLineHeight}: ${bodyS.lineHeight};
90
+ ${tokens.titleCaptionMargin}: 0.1875rem;
91
+ ${tokens.titleCaptionFontFamily}: ${bodyXS.fontFamily};
92
+ ${tokens.titleCaptionFontStyle}: ${bodyXS.fontStyle};
93
+ ${tokens.titleCaptionFontSize}: ${bodyXS.fontSize};
94
+ ${tokens.titleCaptionFontWeight}: ${bodyXS.fontWeight};
95
+ ${tokens.titleCaptionLetterSpacing}: ${bodyXS.letterSpacing};
96
+ ${tokens.titleCaptionLineHeight}: ${bodyXS.lineHeight};
89
97
  ${tokens.textFieldBorderWidth}: 0.0625rem;
90
98
 
91
99
  ${tokens.indicatorSize}: 0.375rem;
@@ -158,6 +166,7 @@ export const config = {
158
166
  true: css`
159
167
  ${tokens.labelColorReadOnly}: ${textSecondary};
160
168
  ${tokens.leftHelperColorReadOnly}: ${textSecondary};
169
+ ${tokens.titleCaptionColorReadOnly}: ${textSecondary};
161
170
 
162
171
  ${tokens.textFieldColorReadOnly}: ${textPrimary};
163
172
  ${tokens.textFieldPlaceholderColorReadOnly}: ${textSecondary};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salutejs/sdds-cs",
3
- "version": "0.376.0-dev.0",
3
+ "version": "0.377.0-dev.0",
4
4
  "description": "Salute Design System / React UI kit for SDDS CS web applications",
5
5
  "author": "Salute Frontend Team <salute.developers@gmail.com>",
6
6
  "publishConfig": {
@@ -39,11 +39,11 @@
39
39
  "@emotion/styled": ">=11",
40
40
  "react": ">=16.13.1",
41
41
  "react-dom": ">=16.13.1",
42
- "styled-components": "^5.3.1"
42
+ "styled-components": "^5.3.11"
43
43
  },
44
44
  "dependencies": {
45
- "@salutejs/plasma-new-hope": "0.384.0-dev.0",
46
- "@salutejs/sdds-themes": "0.84.0-dev.0",
45
+ "@salutejs/plasma-new-hope": "0.385.0-dev.0",
46
+ "@salutejs/sdds-themes": "0.85.0-dev.0",
47
47
  "classnames": "2.5.1"
48
48
  },
49
49
  "devDependencies": {
@@ -62,10 +62,10 @@
62
62
  "@rollup/plugin-babel": "^6.0.4",
63
63
  "@rollup/plugin-node-resolve": "^15.1.0",
64
64
  "@salutejs/plasma-colors": "0.26.0-dev.0",
65
- "@salutejs/plasma-core": "1.246.0-dev.0",
66
- "@salutejs/plasma-cy-utils": "0.176.0-dev.0",
67
- "@salutejs/plasma-icons": "1.253.0-dev.0",
68
- "@salutejs/plasma-sb-utils": "0.247.0-dev.0",
65
+ "@salutejs/plasma-core": "1.247.0-dev.0",
66
+ "@salutejs/plasma-cy-utils": "0.177.0-dev.0",
67
+ "@salutejs/plasma-icons": "1.254.0-dev.0",
68
+ "@salutejs/plasma-sb-utils": "0.248.0-dev.0",
69
69
  "@types/node": "16.7.13",
70
70
  "@types/react": "18.0.28",
71
71
  "@types/react-dom": "18.0.11",
@@ -77,7 +77,7 @@
77
77
  "react": "18.2.0",
78
78
  "react-dom": "18.2.0",
79
79
  "rollup": "^3.28.0",
80
- "styled-components": "5.3.1",
80
+ "styled-components": "5.3.11",
81
81
  "typescript-coverage-report": "0.7.0"
82
82
  },
83
83
  "scripts": {
@@ -107,5 +107,5 @@
107
107
  "sideEffects": [
108
108
  "*.css"
109
109
  ],
110
- "gitHead": "573a5eebb5c872332089cd4fd4b3738a975c1f6d"
110
+ "gitHead": "192f858f2e44fc11fc92b19949cbe9b40eb12210"
111
111
  }
@@ -0,0 +1,26 @@
1
+ export declare const config: {
2
+ defaults: {
3
+ view: string;
4
+ size: string;
5
+ labelPlacement: string;
6
+ };
7
+ variations: {
8
+ view: {
9
+ default: import("@salutejs/plasma-new-hope/types/engines/types.js").PolymorphicClassName;
10
+ negative: import("@salutejs/plasma-new-hope/types/engines/types.js").PolymorphicClassName;
11
+ };
12
+ size: {
13
+ s: import("@salutejs/plasma-new-hope/types/engines/types.js").PolymorphicClassName;
14
+ };
15
+ labelPlacement: {
16
+ inner: import("@salutejs/plasma-new-hope/types/engines/types.js").PolymorphicClassName;
17
+ outer: import("@salutejs/plasma-new-hope/types/engines/types.js").PolymorphicClassName;
18
+ };
19
+ disabled: {
20
+ true: import("@salutejs/plasma-new-hope/types/engines/types.js").PolymorphicClassName;
21
+ };
22
+ readOnly: {
23
+ true: import("@salutejs/plasma-new-hope/types/engines/types.js").PolymorphicClassName;
24
+ };
25
+ };
26
+ };