@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
@@ -26,6 +26,7 @@ const config = {
26
26
  ${_emotion.selectTokens.textFieldBackgroundColorFocus}: ${_sdds_cs.surfaceSolidCard};
27
27
  ${_emotion.selectTokens.textFieldLabelColor}: ${_sdds_cs.textPrimary};
28
28
  ${_emotion.selectTokens.textFieldLeftHelperColor}: ${_sdds_cs.textSecondary};
29
+ ${_emotion.selectTokens.textFieldTitleCaptionColor}: ${_sdds_cs.textSecondary};
29
30
  ${_emotion.selectTokens.textFieldContentSlotColor}: ${_sdds_cs.textSecondary};
30
31
  ${_emotion.selectTokens.textFieldBorderColor}: ${_sdds_cs.outlineSolidPrimary};
31
32
  ${_emotion.selectTokens.textFieldBorderColorHover}: ${_sdds_cs.outlineSolidPrimaryHover};
@@ -69,6 +70,7 @@ const config = {
69
70
  ${_emotion.selectTokens.textFieldBackgroundColorFocus}: ${_sdds_cs.surfaceSolidCard};
70
71
  ${_emotion.selectTokens.textFieldLabelColor}: ${_sdds_cs.textPrimary};
71
72
  ${_emotion.selectTokens.textFieldLeftHelperColor}: ${_sdds_cs.textNegative};
73
+ ${_emotion.selectTokens.textFieldTitleCaptionColor}: ${_sdds_cs.textSecondary};
72
74
  ${_emotion.selectTokens.textFieldContentSlotColor}: ${_sdds_cs.textSecondary};
73
75
  ${_emotion.selectTokens.textFieldBorderColor}: ${_sdds_cs.outlineNegative};
74
76
  ${_emotion.selectTokens.textFieldBorderColorHover}: ${_sdds_cs.outlineNegativeHover};
@@ -134,6 +136,13 @@ const config = {
134
136
  ${_emotion.selectTokens.textFieldLabelFontWeight}: ${_sdds_cs.bodyS.fontWeight};
135
137
  ${_emotion.selectTokens.textFieldLabelLetterSpacing}: ${_sdds_cs.bodyS.letterSpacing};
136
138
  ${_emotion.selectTokens.textFieldLabelLineHeight}: ${_sdds_cs.bodyS.lineHeight};
139
+ ${_emotion.selectTokens.textFieldTitleCaptionMargin}: 0.1875rem;
140
+ ${_emotion.selectTokens.textFieldTitleCaptionFontFamily}: ${_sdds_cs.bodyXS.fontFamily};
141
+ ${_emotion.selectTokens.textFieldTitleCaptionFontSize}: ${_sdds_cs.bodyXS.fontSize};
142
+ ${_emotion.selectTokens.textFieldTitleCaptionFontStyle}: ${_sdds_cs.bodyXS.fontStyle};
143
+ ${_emotion.selectTokens.textFieldTitleCaptionFontWeight}: ${_sdds_cs.bodyXS.fontWeight};
144
+ ${_emotion.selectTokens.textFieldTitleCaptionLetterSpacing}: ${_sdds_cs.bodyXS.letterSpacing};
145
+ ${_emotion.selectTokens.textFieldTitleCaptionLineHeight}: ${_sdds_cs.bodyXS.lineHeight};
137
146
 
138
147
  ${_emotion.selectTokens.textFieldLeftHelperOffset}: 0.25rem 0 0 0;
139
148
  ${_emotion.selectTokens.textFieldLeftHelperFontFamily}: ${_sdds_cs.bodyS.fontFamily};
@@ -11,13 +11,20 @@ Object.defineProperty(exports, "Select", {
11
11
  const _emotion = require("@salutejs/plasma-new-hope/emotion");
12
12
  const _react = /*#__PURE__*/ _interop_require_default(require("react"));
13
13
  const _Selectconfig = require("./Select.config");
14
+ const _Selectclearconfig = require("./Select.clear.config");
14
15
  function _interop_require_default(obj) {
15
16
  return obj && obj.__esModule ? obj : {
16
17
  default: obj
17
18
  };
18
19
  }
19
20
  const mergedConfig = (0, _emotion.mergeConfig)(_emotion.selectConfig, _Selectconfig.config);
20
- const SelectNewHope = (0, _emotion.component)(mergedConfig);
21
+ const SelectDefault = (0, _emotion.component)(mergedConfig);
22
+ const mergedConfigClear = (0, _emotion.mergeConfig)(_emotion.selectConfig, _Selectclearconfig.config);
23
+ const SelectClear = (0, _emotion.component)(mergedConfigClear);
24
+ const SelectNewHope = (0, _emotion.createConditionalComponent)({
25
+ default: SelectDefault,
26
+ clear: SelectClear
27
+ });
21
28
  const SelectComponent = (props, ref)=>{
22
29
  return /*#__PURE__*/ _react.default.createElement(SelectNewHope, {
23
30
  ref: ref,
@@ -204,6 +204,7 @@ const config = {
204
204
  ${_emotion.textAreaTokens.hintInnerLabelPlacementOffset}: -0.751rem -2rem auto auto;
205
205
 
206
206
  ${_emotion.textAreaTokens.titleCaptionInnerLabelOffset}: 0.25rem;
207
+ ${_emotion.textAreaTokens.titleCaptionMargin}: 0.1875rem;
207
208
  ${_emotion.textAreaTokens.titleCaptionFontFamily}: ${_sdds_cs.bodyXS.fontFamily};
208
209
  ${_emotion.textAreaTokens.titleCaptionFontSize}: ${_sdds_cs.bodyXS.fontSize};
209
210
  ${_emotion.textAreaTokens.titleCaptionFontStyle}: ${_sdds_cs.bodyXS.fontStyle};
@@ -193,6 +193,7 @@ const config = {
193
193
  ${_emotion.textAreaTokens.hintInnerLabelPlacementOffset}: -0.751rem -2rem auto auto;
194
194
 
195
195
  ${_emotion.textAreaTokens.titleCaptionInnerLabelOffset}: 0.25rem;
196
+ ${_emotion.textAreaTokens.titleCaptionMargin}: 0.1875rem;
196
197
  ${_emotion.textAreaTokens.titleCaptionFontFamily}: ${_sdds_cs.bodyXS.fontFamily};
197
198
  ${_emotion.textAreaTokens.titleCaptionFontSize}: ${_sdds_cs.bodyXS.fontSize};
198
199
  ${_emotion.textAreaTokens.titleCaptionFontStyle}: ${_sdds_cs.bodyXS.fontStyle};
@@ -53,9 +53,11 @@ const config = {
53
53
  `,
54
54
  negative: (0, _emotion.css)`
55
55
  ${_emotion.textFieldTokens.color}: ${_sdds_cs.textNegative};
56
+ ${_emotion.textFieldTokens.colorFocus}: ${_sdds_cs.textPrimary};
56
57
 
57
58
  ${_emotion.textFieldTokens.placeholderColor}: ${_sdds_cs.textNegative};
58
- ${_emotion.textFieldTokens.placeholderColorFocus}: ${_sdds_cs.textNegative};
59
+ ${_emotion.textFieldTokens.placeholderColorHover}: ${_sdds_cs.textSecondary};
60
+ ${_emotion.textFieldTokens.placeholderColorFocus}: ${_sdds_cs.textTertiary};
59
61
 
60
62
  ${_emotion.textFieldTokens.backgroundColor}: transparent;
61
63
  ${_emotion.textFieldTokens.backgroundColorHover}: transparent;
@@ -66,12 +68,15 @@ const config = {
66
68
  ${_emotion.textFieldTokens.labelColor}: ${_sdds_cs.textPrimary};
67
69
  ${_emotion.textFieldTokens.leftHelperColor}: ${_sdds_cs.textNegative};
68
70
  ${_emotion.textFieldTokens.rightHelperColor}: ${_sdds_cs.textNegative};
71
+ ${_emotion.textFieldTokens.leftHelperColorFocus}: ${_sdds_cs.textSecondary};
72
+ ${_emotion.textFieldTokens.rightHelperColorFocus}: ${_sdds_cs.textSecondary};
69
73
  ${_emotion.textFieldTokens.titleCaptionColor}: ${_sdds_cs.textSecondary};
70
74
  ${_emotion.textFieldTokens.hintIconColor}: ${_sdds_cs.textSecondary};
71
75
 
72
76
  ${_emotion.textFieldTokens.contentSlotColor}: ${_sdds_cs.textNegative};
73
77
  ${_emotion.textFieldTokens.contentSlotColorHover}: ${_sdds_cs.textNegativeHover};
74
78
  ${_emotion.textFieldTokens.contentSlotColorActive}: ${_sdds_cs.textNegativeActive};
79
+ ${_emotion.textFieldTokens.contentSlotColorFocus}: ${_sdds_cs.textSecondary};
75
80
 
76
81
  ${_emotion.textFieldTokens.contentSlotRightColor}: ${_sdds_cs.textSecondary};
77
82
  ${_emotion.textFieldTokens.contentSlotRightColorHover}: ${_sdds_cs.textSecondaryHover};
@@ -116,6 +121,7 @@ const config = {
116
121
  ${_emotion.textFieldTokens.hintInnerLabelPlacementOffset}: 0.062rem -2.1063rem auto auto;
117
122
 
118
123
  ${_emotion.textFieldTokens.titleCaptionInnerLabelOffset}: 0.25rem;
124
+ ${_emotion.textFieldTokens.titleCaptionMargin}: 0.1875rem;
119
125
  ${_emotion.textFieldTokens.titleCaptionFontFamily}: ${_sdds_cs.bodyXS.fontFamily};
120
126
  ${_emotion.textFieldTokens.titleCaptionFontSize}: ${_sdds_cs.bodyXS.fontSize};
121
127
  ${_emotion.textFieldTokens.titleCaptionFontStyle}: ${_sdds_cs.bodyXS.fontStyle};
@@ -143,6 +143,7 @@ const config = {
143
143
  ${_emotion.textFieldTokens.hintInnerLabelPlacementOffset}: 0.312rem -2.813rem auto auto;
144
144
 
145
145
  ${_emotion.textFieldTokens.titleCaptionInnerLabelOffset}: 0.25rem;
146
+ ${_emotion.textFieldTokens.titleCaptionMargin}: 0.3125rem;
146
147
  ${_emotion.textFieldTokens.titleCaptionFontFamily}: ${_sdds_cs.bodyXS.fontFamily};
147
148
  ${_emotion.textFieldTokens.titleCaptionFontSize}: ${_sdds_cs.bodyXS.fontSize};
148
149
  ${_emotion.textFieldTokens.titleCaptionFontStyle}: ${_sdds_cs.bodyXS.fontStyle};
@@ -224,6 +225,7 @@ const config = {
224
225
  ${_emotion.textFieldTokens.hintInnerLabelPlacementOffset}: 0.563rem -2.938rem auto auto;
225
226
 
226
227
  ${_emotion.textFieldTokens.titleCaptionInnerLabelOffset}: 0.25rem;
228
+ ${_emotion.textFieldTokens.titleCaptionMargin}: 0.1875rem;
227
229
  ${_emotion.textFieldTokens.titleCaptionFontFamily}: ${_sdds_cs.bodyXS.fontFamily};
228
230
  ${_emotion.textFieldTokens.titleCaptionFontSize}: ${_sdds_cs.bodyXS.fontSize};
229
231
  ${_emotion.textFieldTokens.titleCaptionFontStyle}: ${_sdds_cs.bodyXS.fontStyle};
@@ -79,6 +79,7 @@ const config = {
79
79
  ${_emotion.timePickerTokens.disabledOpacity}: 0.4;
80
80
 
81
81
  ${_emotion.timePickerTokens.leftHelperColor}: ${_sdds_cs.textSecondary};
82
+ ${_emotion.timePickerTokens.titleCaptionColor}: ${_sdds_cs.textSecondary};
82
83
  ${_emotion.timePickerTokens.leftHelperColorError}: ${_sdds_cs.textNegative};
83
84
  ${_emotion.timePickerTokens.leftHelperColorSuccess}: ${_sdds_cs.textPositive};
84
85
  `
@@ -96,6 +97,13 @@ const config = {
96
97
  ${_emotion.timePickerTokens.labelFontWeight}: ${_sdds_cs.bodyS.fontWeight};
97
98
  ${_emotion.timePickerTokens.labelLetterSpacing}: ${_sdds_cs.bodyS.letterSpacing};
98
99
  ${_emotion.timePickerTokens.labelLineHeight}: ${_sdds_cs.bodyS.lineHeight};
100
+ ${_emotion.timePickerTokens.titleCaptionMargin}: 0.1875rem;
101
+ ${_emotion.timePickerTokens.titleCaptionFontFamily}: ${_sdds_cs.bodyXS.fontFamily};
102
+ ${_emotion.timePickerTokens.titleCaptionFontStyle}: ${_sdds_cs.bodyXS.fontStyle};
103
+ ${_emotion.timePickerTokens.titleCaptionFontSize}: ${_sdds_cs.bodyXS.fontSize};
104
+ ${_emotion.timePickerTokens.titleCaptionFontWeight}: ${_sdds_cs.bodyXS.fontWeight};
105
+ ${_emotion.timePickerTokens.titleCaptionLetterSpacing}: ${_sdds_cs.bodyXS.letterSpacing};
106
+ ${_emotion.timePickerTokens.titleCaptionLineHeight}: ${_sdds_cs.bodyXS.lineHeight};
99
107
  ${_emotion.timePickerTokens.textFieldBorderWidth}: 0.0625rem;
100
108
 
101
109
  ${_emotion.timePickerTokens.indicatorSize}: 0.375rem;
@@ -168,6 +176,7 @@ const config = {
168
176
  true: (0, _emotion.css)`
169
177
  ${_emotion.timePickerTokens.labelColorReadOnly}: ${_sdds_cs.textSecondary};
170
178
  ${_emotion.timePickerTokens.leftHelperColorReadOnly}: ${_sdds_cs.textSecondary};
179
+ ${_emotion.timePickerTokens.titleCaptionColorReadOnly}: ${_sdds_cs.textSecondary};
171
180
 
172
181
  ${_emotion.timePickerTokens.textFieldColorReadOnly}: ${_sdds_cs.textPrimary};
173
182
  ${_emotion.timePickerTokens.textFieldPlaceholderColorReadOnly}: ${_sdds_cs.textSecondary};
@@ -0,0 +1,224 @@
1
+ import { bodyM, bodyS, bodyXS, outlineAccent, outlineNegativeHover, outlineSolidPrimary, outlineSolidSecondary, surfaceAccent, surfaceClear, surfaceNegative, surfaceSolidCard, surfaceSolidPrimary, surfaceTransparentAccent, textAccent, textAccentActive, textAccentMinor, textNegative, textPrimary, textSecondary, textSecondaryActive, textSecondaryHover, textTertiary } from '@salutejs/sdds-themes/tokens/sdds_cs';
2
+ import { css, autocompleteTokens as tokens } from '@salutejs/plasma-new-hope/emotion';
3
+ export const config = {
4
+ defaults: {
5
+ view: 'default',
6
+ size: 's',
7
+ labelPlacement: 'outer'
8
+ },
9
+ variations: {
10
+ view: {
11
+ default: css`
12
+ ${tokens.textFieldColor}: ${textPrimary};
13
+ ${tokens.textFieldClearColor}: ${textPrimary};
14
+
15
+ ${tokens.textFieldPlaceholderColor}: ${textSecondary};
16
+ ${tokens.textFieldPlaceholderColorFocus}: ${textTertiary};
17
+ ${tokens.textFieldClearPlaceholderColor}: ${textSecondary};
18
+ ${tokens.textFieldClearPlaceholderColorFocus}: ${textTertiary};
19
+
20
+ ${tokens.textFieldBackgroundColor}: transparent;
21
+ ${tokens.textFieldBackgroundColorHover}: transparent;
22
+ ${tokens.textFieldBackgroundColorFocus}: transparent;
23
+ ${tokens.textFieldCaretColor}: ${textAccent};
24
+ ${tokens.textFieldTextBeforeColor}: ${textTertiary};
25
+ ${tokens.textFieldTextAfterColor}: ${textTertiary};
26
+ ${tokens.textFieldLabelColor}: ${textPrimary};
27
+ ${tokens.textFieldLeftHelperColor}: ${textSecondary};
28
+ ${tokens.textFieldTitleCaptionColor}: ${textSecondary};
29
+ ${tokens.textFieldFocusColor}: ${textAccent};
30
+
31
+ ${tokens.textFieldContentSlotColor}: ${textSecondary};
32
+ ${tokens.textFieldContentSlotColorHover}: ${textSecondaryHover};
33
+ ${tokens.textFieldContentSlotColorActive}: ${textSecondaryActive};
34
+ ${tokens.textFieldContentSlotRightColor}: ${textAccent};
35
+ ${tokens.textFieldContentSlotRightColorHover}: ${textAccentMinor};
36
+ ${tokens.textFieldContentSlotRightColorActive}: ${textAccentActive};
37
+
38
+ ${tokens.focusColor}: ${surfaceAccent};
39
+ ${tokens.textFieldIndicatorColor}: ${surfaceNegative};
40
+ ${tokens.textFieldOptionalColor}: ${textTertiary};
41
+
42
+ ${tokens.background}: ${surfaceSolidCard};
43
+ ${tokens.boxShadow}: 0px 4px 14px -4px rgba(8, 8, 8, 0.08), 0px 1px 4px -1px rgba(0, 0, 0, 0.04);
44
+ ${tokens.itemBackground}: ${surfaceClear};
45
+ ${tokens.itemBackgroundHover}: ${surfaceTransparentAccent};
46
+ ${tokens.itemColor}: ${textPrimary};
47
+
48
+ ${tokens.infiniteLoaderSpinnerColor}: ${textPrimary};
49
+
50
+ ${tokens.dropdownBorderColor}: ${surfaceSolidPrimary};
51
+
52
+ ${tokens.textFieldDividerColor}: ${outlineSolidPrimary};
53
+ ${tokens.textFieldDividerColorHover}: ${textSecondary};
54
+ ${tokens.textFieldDividerColorFocus}: ${surfaceAccent};
55
+ `,
56
+ negative: css`
57
+ ${tokens.textFieldColor}: ${textNegative};
58
+ ${tokens.textFieldClearColor}: ${textPrimary};
59
+
60
+ ${tokens.textFieldPlaceholderColor}: ${textNegative};
61
+ ${tokens.textFieldPlaceholderColorHover}: ${textSecondary};
62
+ ${tokens.textFieldPlaceholderColorFocus}: ${textTertiary};
63
+ ${tokens.textFieldClearPlaceholderColor}: ${textSecondary};
64
+ ${tokens.textFieldClearPlaceholderColorFocus}: ${textTertiary};
65
+
66
+ ${tokens.textFieldBackgroundColor}: transparent;
67
+ ${tokens.textFieldBackgroundColorHover}: transparent;
68
+ ${tokens.textFieldBackgroundColorFocus}: transparent;
69
+ ${tokens.textFieldCaretColor}: ${textAccent};
70
+ ${tokens.textFieldTextBeforeColor}: ${textSecondary};
71
+ ${tokens.textFieldTextAfterColor}: ${textSecondary};
72
+ ${tokens.textFieldLabelColor}: ${textPrimary};
73
+ ${tokens.textFieldLeftHelperColor}: ${textNegative};
74
+ ${tokens.textFieldTitleCaptionColor}: ${textSecondary};
75
+ ${tokens.textFieldLeftHelperColorFocus}: ${textSecondary};
76
+ ${tokens.textFieldFocusColor}: ${textAccent};
77
+
78
+ ${tokens.textFieldContentSlotColor}: ${textSecondary};
79
+ ${tokens.textFieldContentSlotColorHover}: ${textSecondaryHover};
80
+ ${tokens.textFieldContentSlotColorActive}: ${textSecondaryActive};
81
+ ${tokens.textFieldContentSlotRightColor}: ${textSecondary};
82
+ ${tokens.textFieldContentSlotRightColorHover}: ${textSecondaryHover};
83
+ ${tokens.textFieldContentSlotRightColorActive}: ${textSecondaryActive};
84
+ ${tokens.textFieldColorFocus}: ${textPrimary};
85
+ ${tokens.textFieldContentSlotColorFocus}: ${textSecondary};
86
+
87
+ ${tokens.focusColor}: ${surfaceAccent};
88
+ ${tokens.textFieldIndicatorColor}: ${surfaceNegative};
89
+ ${tokens.textFieldOptionalColor}: ${textTertiary};
90
+
91
+ ${tokens.textFieldBorderColorHover}: ${outlineNegativeHover};
92
+ ${tokens.textFieldBorderColorFocus}: ${outlineAccent};
93
+
94
+ ${tokens.background}: ${surfaceSolidCard};
95
+ ${tokens.boxShadow}: 0px 4px 14px -4px rgba(8, 8, 8, 0.08), 0px 1px 4px -1px rgba(0, 0, 0, 0.04);
96
+ ${tokens.itemBackground}: ${surfaceClear};
97
+ ${tokens.itemBackgroundHover}: ${surfaceTransparentAccent};
98
+ ${tokens.itemColor}: ${textPrimary};
99
+
100
+ ${tokens.infiniteLoaderSpinnerColor}: ${textPrimary};
101
+
102
+ ${tokens.dropdownBorderColor}: ${surfaceSolidPrimary};
103
+
104
+ ${tokens.textFieldDividerColor}: ${surfaceNegative};
105
+ ${tokens.textFieldDividerColorHover}: ${surfaceNegative};
106
+ ${tokens.textFieldDividerColorFocus}: ${surfaceAccent};
107
+ `
108
+ },
109
+ size: {
110
+ s: css`
111
+ ${tokens.textFieldHeight}: 2.5rem;
112
+ ${tokens.textFieldPadding}: 0.6875rem 0;
113
+ ${tokens.textFieldBorderRadius}: 0;
114
+
115
+ ${tokens.textFieldLeftContentMargin}: -0.1875rem 0.25rem -0.1875rem 0;
116
+ ${tokens.textFieldRightContentMargin}: -0.1875rem 0 -0.1875rem 0.75rem;
117
+
118
+ ${tokens.textFieldTextBeforeMargin}: 0 0.25rem 0 0;
119
+ ${tokens.textFieldTextAfterMargin}: 0 0 0 0.25rem;
120
+
121
+ ${tokens.textFieldFontFamily}: ${bodyM.fontFamily};
122
+ ${tokens.textFieldFontSize}: ${bodyM.fontSize};
123
+ ${tokens.textFieldFontStyle}: ${bodyM.fontStyle};
124
+ ${tokens.textFieldFontWeight}: ${bodyM.fontWeight};
125
+ ${tokens.textFieldLetterSpacing}: ${bodyM.letterSpacing};
126
+ ${tokens.textFieldLineHeight}: ${bodyM.lineHeight};
127
+
128
+ ${tokens.textFieldLabelOffset}: 0.5rem;
129
+ ${tokens.textFieldLabelFontFamily}: ${bodyS.fontFamily};
130
+ ${tokens.textFieldLabelFontSize}: ${bodyS.fontSize};
131
+ ${tokens.textFieldLabelFontStyle}: ${bodyS.fontStyle};
132
+ ${tokens.textFieldLabelFontWeight}: ${bodyS.fontWeight};
133
+ ${tokens.textFieldLabelLetterSpacing}: ${bodyS.letterSpacing};
134
+ ${tokens.textFieldLabelLineHeight}: ${bodyS.lineHeight};
135
+
136
+ ${tokens.textFieldLeftHelperOffset}: 0.25rem 0 0 0;
137
+ ${tokens.textFieldLeftHelperFontFamily}: ${bodyS.fontFamily};
138
+ ${tokens.textFieldLeftHelperFontSize}: ${bodyS.fontSize};
139
+ ${tokens.textFieldLeftHelperFontStyle}: ${bodyS.fontStyle};
140
+ ${tokens.textFieldLeftHelperFontWeight}: ${bodyS.fontWeight};
141
+ ${tokens.textFieldLeftHelperLetterSpacing}: ${bodyS.letterSpacing};
142
+ ${tokens.textFieldLeftHelperLineHeight}: ${bodyS.lineHeight};
143
+ ${tokens.textFieldTitleCaptionMargin}: 0.1875rem;
144
+ ${tokens.textFieldTitleCaptionFontFamily}: ${bodyXS.fontFamily};
145
+ ${tokens.textFieldTitleCaptionFontSize}: ${bodyXS.fontSize};
146
+ ${tokens.textFieldTitleCaptionFontStyle}: ${bodyXS.fontStyle};
147
+ ${tokens.textFieldTitleCaptionFontWeight}: ${bodyXS.fontWeight};
148
+ ${tokens.textFieldTitleCaptionLetterSpacing}: ${bodyXS.letterSpacing};
149
+ ${tokens.textFieldTitleCaptionLineHeight}: ${bodyXS.lineHeight};
150
+
151
+ ${tokens.textFieldLabelInnerPadding}: 0.3125rem 0 0 0;
152
+ ${tokens.textFieldContentLabelInnerPadding}: 1.0625rem 0 0.3125rem 0;
153
+
154
+ ${tokens.textFieldIndicatorSizeInner}: 0.375rem;
155
+ ${tokens.textFieldIndicatorSizeOuter}: 0.375rem;
156
+ ${tokens.textFieldIndicatorLabelPlacementInner}: 1.063rem auto auto -0.75rem;
157
+ ${tokens.textFieldIndicatorLabelPlacementOuter}: 0.3125rem auto auto -0.6875rem;
158
+ ${tokens.textFieldIndicatorLabelPlacementInnerRight}: 1.063rem -0.75rem auto auto;
159
+ ${tokens.textFieldIndicatorLabelPlacementOuterRight}: 0.25rem -0.625rem auto auto;
160
+ ${tokens.textFieldClearIndicatorLabelPlacementInner}: 1.063rem auto auto -0.75rem;
161
+ ${tokens.textFieldClearIndicatorLabelPlacementInnerRight}: 1.063rem -0.75rem auto auto;
162
+ ${tokens.textFieldClearIndicatorHintInnerRight}: 1.063rem -2.125rem auto auto;
163
+
164
+ ${tokens.borderRadius}: 0.75rem;
165
+ ${tokens.padding}: 0.125rem;
166
+ ${tokens.itemPadding}: 0.6875rem 0.75rem;
167
+ ${tokens.itemBorderRadius}: 0.5rem;
168
+
169
+ ${tokens.itemFontFamily}: ${bodyM.fontFamily};
170
+ ${tokens.itemFontSize}: ${bodyM.fontSize};
171
+ ${tokens.itemFontStyle}: ${bodyM.fontStyle};
172
+ ${tokens.itemFontWeight}: ${bodyM.fontWeight};
173
+ ${tokens.itemFontLetterSpacing}: ${bodyM.letterSpacing};
174
+ ${tokens.itemFontLineHeight}: ${bodyM.lineHeight};
175
+
176
+ ${tokens.emptyStatePadding}: 1.375rem 0.625rem 0.625rem 0.625rem;
177
+ ${tokens.emptyStateGap}: 0.25rem;
178
+
179
+ ${tokens.infiniteLoaderSpinnerSize}: 1.5rem;
180
+ ${tokens.infiniteLoaderGap}: 0.25rem;
181
+
182
+ ${tokens.dropdownBorderWidth}: 0.125rem;
183
+ `
184
+ },
185
+ labelPlacement: {
186
+ inner: css`
187
+ ${tokens.textFieldPlaceholderColor}: ${textSecondary};
188
+ ${tokens.textFieldLabelInnerFontFamily}: ${bodyXS.fontFamily};
189
+ ${tokens.textFieldLabelInnerFontSize}: ${bodyXS.fontSize};
190
+ ${tokens.textFieldLabelInnerFontStyle}: ${bodyXS.fontStyle};
191
+ ${tokens.textFieldLabelInnerFontWeight}: ${bodyXS.fontWeight};
192
+ ${tokens.textFieldLabelInnerLetterSpacing}: ${bodyXS.letterSpacing};
193
+ ${tokens.textFieldLabelInnerLineHeight}: ${bodyXS.lineHeight};
194
+ `,
195
+ outer: css``
196
+ },
197
+ disabled: {
198
+ true: css`
199
+ ${tokens.itemColor}: ${textSecondary};
200
+ ${tokens.background}: ${surfaceSolidPrimary};
201
+ ${tokens.textFieldColor}: ${textSecondary};
202
+ ${tokens.textFieldLabelColor}: ${textSecondary};
203
+ ${tokens.textFieldBackgroundColorHover}: ${surfaceSolidPrimary};
204
+
205
+ ${tokens.textFieldDividerColor}: ${surfaceSolidPrimary};
206
+ ${tokens.textFieldDividerColorHover}: ${surfaceSolidPrimary};
207
+ ${tokens.textFieldDividerColorFocus}: ${surfaceSolidPrimary};
208
+ `
209
+ },
210
+ readOnly: {
211
+ true: css`
212
+ ${tokens.textFieldColorReadOnly}: ${textPrimary};
213
+ ${tokens.textFieldBackgroundColorReadOnly}: ${surfaceClear};
214
+ ${tokens.textFieldBorderColorReadOnly}: ${surfaceClear};
215
+ ${tokens.textFieldPlaceholderColorReadOnly}: ${textSecondary};
216
+ ${tokens.textFieldLeftHelperColorReadOnly}: ${textSecondary};
217
+ ${tokens.textFieldLabelColorReadOnly}: ${textPrimary};
218
+
219
+ ${tokens.textFieldDividerColorReadOnly}: ${outlineSolidSecondary};
220
+ ${tokens.textFieldTitleCaptionColorReadOnly}: ${textSecondary};
221
+ `
222
+ }
223
+ }
224
+ };
@@ -24,6 +24,7 @@ export const config = {
24
24
  ${tokens.textFieldTextAfterColor}: ${textSecondary};
25
25
  ${tokens.textFieldLabelColor}: ${textPrimary};
26
26
  ${tokens.textFieldLeftHelperColor}: ${textSecondary};
27
+ ${tokens.textFieldTitleCaptionColor}: ${textSecondary};
27
28
  ${tokens.textFieldFocusColor}: ${textAccent};
28
29
 
29
30
  ${tokens.textFieldContentSlotColor}: ${textSecondary};
@@ -67,6 +68,7 @@ export const config = {
67
68
  ${tokens.textFieldTextAfterColor}: ${textSecondary};
68
69
  ${tokens.textFieldLabelColor}: ${textPrimary};
69
70
  ${tokens.textFieldLeftHelperColor}: ${textNegative};
71
+ ${tokens.textFieldTitleCaptionColor}: ${textSecondary};
70
72
  ${tokens.textFieldFocusColor}: ${textAccent};
71
73
 
72
74
  ${tokens.textFieldContentSlotColor}: ${textSecondary};
@@ -122,6 +124,13 @@ export const config = {
122
124
  ${tokens.textFieldLabelFontWeight}: ${bodyS.fontWeight};
123
125
  ${tokens.textFieldLabelLetterSpacing}: ${bodyS.letterSpacing};
124
126
  ${tokens.textFieldLabelLineHeight}: ${bodyS.lineHeight};
127
+ ${tokens.textFieldTitleCaptionMargin}: 0.1875rem;
128
+ ${tokens.textFieldTitleCaptionFontFamily}: ${bodyXS.fontFamily};
129
+ ${tokens.textFieldTitleCaptionFontStyle}: ${bodyXS.fontStyle};
130
+ ${tokens.textFieldTitleCaptionFontSize}: ${bodyXS.fontSize};
131
+ ${tokens.textFieldTitleCaptionFontWeight}: ${bodyXS.fontWeight};
132
+ ${tokens.textFieldTitleCaptionLetterSpacing}: ${bodyXS.letterSpacing};
133
+ ${tokens.textFieldTitleCaptionLineHeight}: ${bodyXS.lineHeight};
125
134
 
126
135
  ${tokens.textFieldLeftHelperOffset}: 0.25rem 0 0 0;
127
136
  ${tokens.textFieldLeftHelperFontFamily}: ${bodyS.fontFamily};
@@ -198,6 +207,7 @@ export const config = {
198
207
  ${tokens.textFieldBorderColorReadOnly}: ${surfaceClear};
199
208
  ${tokens.textFieldPlaceholderColorReadOnly}: ${textSecondary};
200
209
  ${tokens.textFieldLeftHelperColorReadOnly}: ${textSecondary};
210
+ ${tokens.textFieldTitleCaptionColorReadOnly}: ${textSecondary};
201
211
  ${tokens.textFieldLabelColorReadOnly}: ${textSecondary};
202
212
  ${tokens.textFieldBorderColor}: transparent;
203
213
  ${tokens.textFieldBorderWidth}: 0;
@@ -1,8 +1,15 @@
1
- import { autocompleteConfig, component, mergeConfig, fixedForwardRef } from '@salutejs/plasma-new-hope/emotion';
1
+ import { autocompleteConfig, component, createConditionalComponent, mergeConfig, fixedForwardRef } from '@salutejs/plasma-new-hope/emotion';
2
2
  import React from 'react';
3
3
  import { config } from './Autocomplete.config';
4
+ import { config as clearConfig } from './Autocomplete.clear.config';
4
5
  const mergedConfig = mergeConfig(autocompleteConfig, config);
5
- export const AutocompleteComponent = component(mergedConfig);
6
+ export const AutocompleteDefault = component(mergedConfig);
7
+ const mergedClearConfig = mergeConfig(autocompleteConfig, clearConfig);
8
+ export const AutocompleteClear = component(mergedClearConfig);
9
+ export const AutocompleteComponent = createConditionalComponent({
10
+ default: AutocompleteDefault,
11
+ clear: AutocompleteClear
12
+ });
6
13
  const AutocompleteWithoutRef = (props, ref)=>{
7
14
  return /*#__PURE__*/ React.createElement(AutocompleteComponent, {
8
15
  ...props,
@@ -161,6 +161,7 @@ export const config = {
161
161
  ${tokens.textFieldLineHeight}: ${bodyM.lineHeight};
162
162
 
163
163
  ${tokens.titleCaptionOffset}: 0;
164
+ ${tokens.titleCaptionMargin}: 0.1875rem;
164
165
  ${tokens.titleCaptionFontFamily}: ${bodyS.fontFamily};
165
166
  ${tokens.titleCaptionFontSize}: ${bodyS.fontSize};
166
167
  ${tokens.titleCaptionFontStyle}: ${bodyS.fontStyle};
@@ -1,4 +1,4 @@
1
- import { surfaceSolidCard, textAccent } from '@salutejs/sdds-themes/tokens/sdds_cs';
1
+ import { surfaceSolidCard, surfaceSolidPrimary, surfaceSolidTertiary, surfaceSolidTertiaryActive, surfaceSolidTertiaryHover, textAccent } from '@salutejs/sdds-themes/tokens/sdds_cs';
2
2
  import { css, drawerTokens } from '@salutejs/plasma-new-hope/emotion';
3
3
  export const config = {
4
4
  defaults: {
@@ -12,6 +12,13 @@ export const config = {
12
12
  ${drawerTokens.shadow}: 0 3.75rem 7rem -0.5rem rgba(0, 0, 0, 0.08);
13
13
  ${drawerTokens.contentBackgroundColor}: ${surfaceSolidCard};
14
14
  ${drawerTokens.closeIconColor}: ${textAccent};
15
+
16
+ ${drawerTokens.scrollbarWidth}: 0.25rem;
17
+ ${drawerTokens.scrollbarOffsetRight}: 0.25rem;
18
+ ${drawerTokens.scrollbarThumbBackgroundColor}: ${surfaceSolidTertiary};
19
+ ${drawerTokens.scrollbarThumbBackgroundColorHover}: ${surfaceSolidTertiaryHover};
20
+ ${drawerTokens.scrollbarThumbBackgroundColorActive}: ${surfaceSolidTertiaryActive};
21
+ ${drawerTokens.scrollbarTrackBackgroundColor}: ${surfaceSolidPrimary};
15
22
  `
16
23
  },
17
24
  size: {
@@ -38,7 +45,7 @@ export const contentConfig = {
38
45
  variations: {
39
46
  view: {
40
47
  default: css`
41
- padding-right: 0;
48
+ padding-right: 1rem;
42
49
  `
43
50
  }
44
51
  }