@salutejs/plasma-new-hope 0.336.0-canary.2234.17756611449.0 → 0.336.0-canary.2235.17792261875.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.
- package/cjs/components/Attach/Attach.css +9 -9
- package/cjs/components/Attach/components/AttachButton/AttachButton.css +9 -9
- package/cjs/components/Button/Button.css +9 -9
- package/cjs/components/Button/Button.styles.js +11 -11
- package/cjs/components/Button/Button.styles.js.map +1 -1
- package/cjs/components/Button/{Button.styles_wo15lb.css → Button.styles_yce5o0.css} +1 -1
- package/cjs/components/Calendar/CalendarBase/CalendarBase.css +9 -9
- package/cjs/components/Calendar/CalendarDouble/CalendarDouble.css +9 -9
- package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.css +9 -9
- package/cjs/components/Carousel/CarouselNew/Carousel.css +9 -9
- package/cjs/components/Combobox/ComboboxNew/Combobox.css +9 -9
- package/cjs/components/Combobox/ComboboxNew/Combobox.js +11 -10
- package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.css +9 -9
- package/cjs/components/DatePicker/RangeDate/RangeDate.css +9 -9
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +9 -9
- package/cjs/components/DatePicker/SingleDate/SingleDate.css +9 -9
- package/cjs/components/Drawer/Drawer.css +9 -9
- package/cjs/components/Drawer/ui/DrawerContent/DrawerContent.css +9 -9
- package/cjs/components/EmbedIconButton/EmbedIconButton.css +9 -9
- package/cjs/components/EmptyState/EmptyState.css +9 -9
- package/cjs/components/IconButton/IconButton.css +9 -9
- package/cjs/components/Note/Note.css +9 -9
- package/cjs/components/Notification/Notification.css +9 -9
- package/cjs/components/Notification/NotificationsProvider.css +9 -9
- package/cjs/components/NumberInput/NumberInput.css +9 -9
- package/cjs/components/Pagination/Pagination.css +9 -9
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +9 -9
- package/cjs/components/Panel/ui/PanelHeader/PanelHeader.css +9 -9
- package/cjs/components/Select/Select.css +9 -9
- package/cjs/components/Select/Select.js +12 -10
- package/cjs/components/Select/Select.js.map +1 -1
- package/cjs/components/Select/ui/Target/Target.css +9 -9
- package/cjs/components/Select/ui/Target/ui/Button/Button.css +9 -9
- package/cjs/components/Table/Table.css +9 -9
- package/cjs/components/Table/ui/Cell/Cell.css +9 -9
- package/cjs/components/Table/ui/EditableCell/EditableCell.css +9 -9
- package/cjs/components/Table/ui/HeadCell/HeadCell.css +9 -9
- package/cjs/components/Table/ui/HeadCell/ui/Filter/Filter.css +9 -9
- package/cjs/components/TextField/TextField.js +1 -1
- package/cjs/components/TextField/TextField.js.map +1 -1
- package/cjs/components/TextField/TextField.tokens.js +1 -0
- package/cjs/components/TextField/TextField.tokens.js.map +1 -1
- package/cjs/components/Toast/Toast.css +9 -9
- package/cjs/components/Toast/ToastController.css +9 -9
- package/cjs/components/Toast/ToastNew/ToastNew.css +9 -9
- package/cjs/index.css +9 -9
- package/emotion/cjs/components/Button/Button.styles.js +17 -17
- package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.js +10 -10
- package/emotion/cjs/components/Select/Select.js +10 -10
- package/emotion/cjs/components/TextField/TextField.js +2 -2
- package/emotion/cjs/components/TextField/TextField.tokens.js +1 -0
- package/emotion/cjs/examples/components/Button/Button.config.js +21 -21
- package/emotion/es/components/Button/Button.styles.js +17 -17
- package/emotion/es/components/Combobox/ComboboxNew/Combobox.js +10 -10
- package/emotion/es/components/Select/Select.js +10 -10
- package/emotion/es/components/TextField/TextField.js +2 -2
- package/emotion/es/components/TextField/TextField.tokens.js +1 -0
- package/emotion/es/examples/components/Button/Button.config.js +21 -21
- package/es/components/Attach/Attach.css +9 -9
- package/es/components/Attach/components/AttachButton/AttachButton.css +9 -9
- package/es/components/Button/Button.css +9 -9
- package/es/components/Button/Button.styles.js +11 -11
- package/es/components/Button/Button.styles.js.map +1 -1
- package/es/components/Button/{Button.styles_wo15lb.css → Button.styles_yce5o0.css} +1 -1
- package/es/components/Calendar/CalendarBase/CalendarBase.css +9 -9
- package/es/components/Calendar/CalendarDouble/CalendarDouble.css +9 -9
- package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.css +9 -9
- package/es/components/Carousel/CarouselNew/Carousel.css +9 -9
- package/es/components/Combobox/ComboboxNew/Combobox.css +9 -9
- package/es/components/Combobox/ComboboxNew/Combobox.js +11 -10
- package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.css +9 -9
- package/es/components/DatePicker/RangeDate/RangeDate.css +9 -9
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +9 -9
- package/es/components/DatePicker/SingleDate/SingleDate.css +9 -9
- package/es/components/Drawer/Drawer.css +9 -9
- package/es/components/Drawer/ui/DrawerContent/DrawerContent.css +9 -9
- package/es/components/EmbedIconButton/EmbedIconButton.css +9 -9
- package/es/components/EmptyState/EmptyState.css +9 -9
- package/es/components/IconButton/IconButton.css +9 -9
- package/es/components/Note/Note.css +9 -9
- package/es/components/Notification/Notification.css +9 -9
- package/es/components/Notification/NotificationsProvider.css +9 -9
- package/es/components/NumberInput/NumberInput.css +9 -9
- package/es/components/Pagination/Pagination.css +9 -9
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +9 -9
- package/es/components/Panel/ui/PanelHeader/PanelHeader.css +9 -9
- package/es/components/Select/Select.css +9 -9
- package/es/components/Select/Select.js +12 -10
- package/es/components/Select/Select.js.map +1 -1
- package/es/components/Select/ui/Target/Target.css +9 -9
- package/es/components/Select/ui/Target/ui/Button/Button.css +9 -9
- package/es/components/Table/Table.css +9 -9
- package/es/components/Table/ui/Cell/Cell.css +9 -9
- package/es/components/Table/ui/EditableCell/EditableCell.css +9 -9
- package/es/components/Table/ui/HeadCell/HeadCell.css +9 -9
- package/es/components/Table/ui/HeadCell/ui/Filter/Filter.css +9 -9
- package/es/components/TextField/TextField.js +1 -1
- package/es/components/TextField/TextField.js.map +1 -1
- package/es/components/TextField/TextField.tokens.js +1 -0
- package/es/components/TextField/TextField.tokens.js.map +1 -1
- package/es/components/Toast/Toast.css +9 -9
- package/es/components/Toast/ToastController.css +9 -9
- package/es/components/Toast/ToastNew/ToastNew.css +9 -9
- package/es/index.css +9 -9
- package/package.json +5 -5
- package/styled-components/cjs/components/Button/Button.styles.js +10 -11
- package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.js +10 -10
- package/styled-components/cjs/components/Select/Select.js +10 -10
- package/styled-components/cjs/components/TextField/TextField.js +1 -1
- package/styled-components/cjs/components/TextField/TextField.tokens.js +1 -0
- package/styled-components/cjs/examples/components/Button/Button.config.js +4 -2
- package/styled-components/es/components/Button/Button.styles.js +10 -11
- package/styled-components/es/components/Combobox/ComboboxNew/Combobox.js +10 -10
- package/styled-components/es/components/Select/Select.js +10 -10
- package/styled-components/es/components/TextField/TextField.js +1 -1
- package/styled-components/es/components/TextField/TextField.tokens.js +1 -0
- package/styled-components/es/examples/components/Button/Button.config.js +4 -2
- package/styled-components/es/examples/components/Combobox/Combobox.js +0 -7
- package/types/components/Button/Button.styles.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/Combobox.d.ts.map +1 -1
- package/types/components/Select/Select.d.ts.map +1 -1
- package/types/components/TextField/TextField.tokens.d.ts +1 -0
- package/types/components/TextField/TextField.tokens.d.ts.map +1 -1
- package/types/examples/components/Button/Button.config.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salutejs/plasma-new-hope",
|
|
3
|
-
"version": "0.336.0-canary.
|
|
3
|
+
"version": "0.336.0-canary.2235.17792261875.0",
|
|
4
4
|
"description": "Salute Design System blueprint",
|
|
5
5
|
"main": "cjs/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -79,8 +79,8 @@
|
|
|
79
79
|
"@rollup/plugin-babel": "^6.0.4",
|
|
80
80
|
"@rollup/plugin-commonjs": "^25.0.4",
|
|
81
81
|
"@rollup/plugin-node-resolve": "^15.1.0",
|
|
82
|
-
"@salutejs/plasma-sb-utils": "0.208.0-canary.
|
|
83
|
-
"@salutejs/plasma-themes": "0.
|
|
82
|
+
"@salutejs/plasma-sb-utils": "0.208.0-canary.2235.17792261875.0",
|
|
83
|
+
"@salutejs/plasma-themes": "0.38.0-canary.2235.17792261875.0",
|
|
84
84
|
"@storybook/addon-docs": "8.6.12",
|
|
85
85
|
"@storybook/addon-essentials": "8.6.12",
|
|
86
86
|
"@storybook/manager-api": "8.6.12",
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
"@linaria/react": "5.0.3",
|
|
118
118
|
"@popperjs/core": "2.11.8",
|
|
119
119
|
"@salutejs/input-core": "2.1.2",
|
|
120
|
-
"@salutejs/plasma-core": "1.208.0-canary.
|
|
120
|
+
"@salutejs/plasma-core": "1.208.0-canary.2235.17792261875.0",
|
|
121
121
|
"@salutejs/react-maskinput": "3.2.6",
|
|
122
122
|
"@tanstack/react-table": "8.21.2",
|
|
123
123
|
"@tanstack/react-virtual": "3.13.2",
|
|
@@ -137,5 +137,5 @@
|
|
|
137
137
|
"sideEffects": [
|
|
138
138
|
"*.css"
|
|
139
139
|
],
|
|
140
|
-
"gitHead": "
|
|
140
|
+
"gitHead": "d9a568677d1bd96093e53ff939314cb38eed5b00"
|
|
141
141
|
}
|
|
@@ -91,16 +91,15 @@ var mergedConfig = (0, _engines.mergeConfig)(_Spinner.spinnerConfig);
|
|
|
91
91
|
var Spinner = (0, _engines.component)(mergedConfig);
|
|
92
92
|
var ButtonText = _styledcomponents.default.span.withConfig({
|
|
93
93
|
displayName: "Button.styles__ButtonText",
|
|
94
|
-
componentId: "sc-
|
|
94
|
+
componentId: "sc-8625a921-0"
|
|
95
95
|
})([
|
|
96
96
|
"min-width:4ch;&.",
|
|
97
|
-
"{flex-grow:2;text-align:start;}
|
|
98
|
-
");",
|
|
97
|
+
"{flex-grow:2;text-align:start;}",
|
|
99
98
|
""
|
|
100
|
-
], String(_Buttontokens.classes.contentRelaxed),
|
|
99
|
+
], String(_Buttontokens.classes.contentRelaxed), (0, _mixins.applyEllipsis)());
|
|
101
100
|
var StyledAdditionalContent = _styledcomponents.default.div.withConfig({
|
|
102
101
|
displayName: "Button.styles__StyledAdditionalContent",
|
|
103
|
-
componentId: "sc-
|
|
102
|
+
componentId: "sc-8625a921-1"
|
|
104
103
|
})([
|
|
105
104
|
"display:flex;align-items:center;margin:var(",
|
|
106
105
|
");&.",
|
|
@@ -110,7 +109,7 @@ var StyledAdditionalContent = _styledcomponents.default.div.withConfig({
|
|
|
110
109
|
], _Buttontokens.tokens.buttonAdditionalContentMargin, String(_Buttontokens.classes.contentRelaxed), _Buttontokens.classes.buttonHasValue, _Buttontokens.tokens.buttonAdditionalContentMarginRightWidthValue);
|
|
111
110
|
var ButtonValue = _styledcomponents.default.span.withConfig({
|
|
112
111
|
displayName: "Button.styles__ButtonValue",
|
|
113
|
-
componentId: "sc-
|
|
112
|
+
componentId: "sc-8625a921-2"
|
|
114
113
|
})([
|
|
115
114
|
"color:var(",
|
|
116
115
|
");margin:var(",
|
|
@@ -119,7 +118,7 @@ var ButtonValue = _styledcomponents.default.span.withConfig({
|
|
|
119
118
|
], _Buttontokens.tokens.buttonValueColor, _Buttontokens.tokens.buttonValueMargin, (0, _mixins.applyEllipsis)());
|
|
120
119
|
var LoadWrap = _styledcomponents.default.div.withConfig({
|
|
121
120
|
displayName: "Button.styles__LoadWrap",
|
|
122
|
-
componentId: "sc-
|
|
121
|
+
componentId: "sc-8625a921-3"
|
|
123
122
|
})([
|
|
124
123
|
"opacity:",
|
|
125
124
|
";display:flex;align-items:inherit;justify-content:",
|
|
@@ -133,13 +132,13 @@ var LoadWrap = _styledcomponents.default.div.withConfig({
|
|
|
133
132
|
});
|
|
134
133
|
var Loader = _styledcomponents.default.div.withConfig({
|
|
135
134
|
displayName: "Button.styles__Loader",
|
|
136
|
-
componentId: "sc-
|
|
135
|
+
componentId: "sc-8625a921-4"
|
|
137
136
|
})([
|
|
138
137
|
"position:absolute;"
|
|
139
138
|
]);
|
|
140
139
|
var StyledSpinner = (0, _styledcomponents.default)(Spinner).withConfig({
|
|
141
140
|
displayName: "Button.styles__StyledSpinner",
|
|
142
|
-
componentId: "sc-
|
|
141
|
+
componentId: "sc-8625a921-5"
|
|
143
142
|
})([
|
|
144
143
|
"",
|
|
145
144
|
":var(",
|
|
@@ -149,7 +148,7 @@ var StyledSpinner = (0, _styledcomponents.default)(Spinner).withConfig({
|
|
|
149
148
|
], _Spinner.spinnerTokens.size, _Buttontokens.tokens.buttonSpinnerSize, _Spinner.spinnerTokens.color, _Buttontokens.tokens.buttonSpinnerColor);
|
|
150
149
|
var StyledContentLeft = _styledcomponents.default.div.withConfig({
|
|
151
150
|
displayName: "Button.styles__StyledContentLeft",
|
|
152
|
-
componentId: "sc-
|
|
151
|
+
componentId: "sc-8625a921-6"
|
|
153
152
|
})([
|
|
154
153
|
"display:flex;align-self:var(",
|
|
155
154
|
");color:var(",
|
|
@@ -161,7 +160,7 @@ var StyledContentLeft = _styledcomponents.default.div.withConfig({
|
|
|
161
160
|
});
|
|
162
161
|
var StyledContentRight = _styledcomponents.default.div.withConfig({
|
|
163
162
|
displayName: "Button.styles__StyledContentRight",
|
|
164
|
-
componentId: "sc-
|
|
163
|
+
componentId: "sc-8625a921-7"
|
|
165
164
|
})([
|
|
166
165
|
"display:flex;align-self:var(",
|
|
167
166
|
");color:var(",
|
|
@@ -267,6 +267,7 @@ var comboboxRoot = function(Root) {
|
|
|
267
267
|
var _useState = _sliced_to_array((0, _react.useState)((0, _utils2.getTextValue)(multiple, outerValue, valueToItemMap, renderValue)), 2), textValue = _useState[0], setTextValue = _useState[1];
|
|
268
268
|
var _useState1 = _sliced_to_array((0, _react.useState)(multiple ? [] : ''), 2), internalValue = _useState1[0], setInternalValue = _useState1[1];
|
|
269
269
|
var value = outerValue !== null && outerValue !== undefined ? outerValue : internalValue;
|
|
270
|
+
var rootRef = (0, _react.useRef)(null);
|
|
270
271
|
var inputRef = (0, _react.useRef)(null);
|
|
271
272
|
var floatingPopoverRef = (0, _react.useRef)(null);
|
|
272
273
|
var inputForkRef = (0, _plasmacore.useForkRef)(inputRef, ref);
|
|
@@ -301,15 +302,7 @@ var comboboxRoot = function(Root) {
|
|
|
301
302
|
if (!isCurrentListOpen || alwaysOpened) {
|
|
302
303
|
return;
|
|
303
304
|
}
|
|
304
|
-
|
|
305
|
-
type: 'reset'
|
|
306
|
-
});
|
|
307
|
-
dispatchFocusedPath({
|
|
308
|
-
type: 'reset'
|
|
309
|
-
});
|
|
310
|
-
if (onToggle) {
|
|
311
|
-
onToggle(false);
|
|
312
|
-
}
|
|
305
|
+
handleListToggle(false);
|
|
313
306
|
// Возвращаем актуальное значение поля ввода после закрытия выпадающего списка.
|
|
314
307
|
setTextValue((0, _utils2.getTextValue)(multiple, value, valueToItemMap, renderValue));
|
|
315
308
|
}, floatingPopoverRef);
|
|
@@ -375,12 +368,18 @@ var comboboxRoot = function(Root) {
|
|
|
375
368
|
type: 'opened_first_level'
|
|
376
369
|
});
|
|
377
370
|
} else {
|
|
371
|
+
var _rootRef_current;
|
|
378
372
|
dispatchFocusedPath({
|
|
379
373
|
type: 'reset'
|
|
380
374
|
});
|
|
381
375
|
dispatchPath({
|
|
382
376
|
type: 'reset'
|
|
383
377
|
});
|
|
378
|
+
// Скроллим чипы к левому краю при закрытии компонента
|
|
379
|
+
var el = rootRef === null || rootRef === void 0 ? void 0 : (_rootRef_current = rootRef.current) === null || _rootRef_current === void 0 ? void 0 : _rootRef_current.querySelector('.input-scrollable-wrapper');
|
|
380
|
+
if (multiple && value.length > 0 && el) {
|
|
381
|
+
el.scrollLeft = 0;
|
|
382
|
+
}
|
|
384
383
|
}
|
|
385
384
|
if (onToggle) {
|
|
386
385
|
onToggle(opened);
|
|
@@ -591,7 +590,8 @@ var comboboxRoot = function(Root) {
|
|
|
591
590
|
readOnly: readOnly,
|
|
592
591
|
name: name,
|
|
593
592
|
hintView: hintView,
|
|
594
|
-
hintSize: hintSize
|
|
593
|
+
hintSize: hintSize,
|
|
594
|
+
ref: rootRef
|
|
595
595
|
}, name && /*#__PURE__*/ _react.default.createElement(_SelectNative.SelectNative, {
|
|
596
596
|
items: valueToItemMap,
|
|
597
597
|
name: name,
|
|
@@ -270,6 +270,7 @@ var selectRoot = function(Root) {
|
|
|
270
270
|
var treeId = (0, _utils.safeUseId)();
|
|
271
271
|
var listWrapperRef = (0, _react.useRef)(null);
|
|
272
272
|
var view = target === 'textfield-like' && (disabled || readOnly) ? 'default' : (0, _utils1.getView)(status, outerView);
|
|
273
|
+
var rootRef = (0, _react.useRef)(null);
|
|
273
274
|
// Собираем объект с пропсами для required и прокидываем их напрямую в компонент Textfield.
|
|
274
275
|
var requiredProps = props.target === 'button-like' ? undefined : {
|
|
275
276
|
required: required,
|
|
@@ -292,15 +293,7 @@ var selectRoot = function(Root) {
|
|
|
292
293
|
if (!isCurrentListOpen) {
|
|
293
294
|
return;
|
|
294
295
|
}
|
|
295
|
-
|
|
296
|
-
type: 'reset'
|
|
297
|
-
});
|
|
298
|
-
dispatchFocusedPath({
|
|
299
|
-
type: 'reset'
|
|
300
|
-
});
|
|
301
|
-
if (onToggle) {
|
|
302
|
-
onToggle(false);
|
|
303
|
-
}
|
|
296
|
+
handleListToggle(false);
|
|
304
297
|
}, floatingPopoverRef);
|
|
305
298
|
var onChange = function(newValue, item) {
|
|
306
299
|
if (props.onChange) {
|
|
@@ -328,12 +321,18 @@ var selectRoot = function(Root) {
|
|
|
328
321
|
type: 'opened_first_level'
|
|
329
322
|
});
|
|
330
323
|
} else {
|
|
324
|
+
var _rootRef_current;
|
|
331
325
|
dispatchFocusedPath({
|
|
332
326
|
type: 'reset'
|
|
333
327
|
});
|
|
334
328
|
dispatchPath({
|
|
335
329
|
type: 'reset'
|
|
336
330
|
});
|
|
331
|
+
// Скроллим чипы к левому краю при закрытии компонента
|
|
332
|
+
var el = rootRef === null || rootRef === void 0 ? void 0 : (_rootRef_current = rootRef.current) === null || _rootRef_current === void 0 ? void 0 : _rootRef_current.querySelector('.input-scrollable-wrapper');
|
|
333
|
+
if (multiselect && value.length > 0 && el) {
|
|
334
|
+
el.scrollLeft = 0;
|
|
335
|
+
}
|
|
337
336
|
}
|
|
338
337
|
if (onToggle) {
|
|
339
338
|
onToggle(opened);
|
|
@@ -503,7 +502,8 @@ var selectRoot = function(Root) {
|
|
|
503
502
|
chipView: chipView,
|
|
504
503
|
disabled: disabled,
|
|
505
504
|
readOnly: readOnly,
|
|
506
|
-
id: id
|
|
505
|
+
id: id,
|
|
506
|
+
ref: rootRef
|
|
507
507
|
}, rest), name && /*#__PURE__*/ _react.default.createElement(_SelectNative.SelectNative, {
|
|
508
508
|
items: valueToItemMap,
|
|
509
509
|
name: name,
|
|
@@ -529,7 +529,7 @@ var textFieldRoot = function(Root) {
|
|
|
529
529
|
tabIndex: -1,
|
|
530
530
|
ref: contentRef,
|
|
531
531
|
onKeyDown: handleContentKeyDown,
|
|
532
|
-
className: withHasChips
|
|
532
|
+
className: (0, _utils.cx)(withHasChips, _TextFieldtokens.classes.inputScrollableWrapper)
|
|
533
533
|
}, Boolean(textBefore && isChipEnumeration) && /*#__PURE__*/ _react.default.createElement(_TextFieldstyles.StyledTextBefore, null, textBefore), Boolean(_chips === null || _chips === void 0 ? void 0 : _chips.length) && /*#__PURE__*/ _react.default.createElement(_ui.TextFieldChipNew, {
|
|
534
534
|
chips: _chips,
|
|
535
535
|
onChipClick: _onChipClick,
|
|
@@ -33,6 +33,7 @@ var classes = {
|
|
|
33
33
|
textFieldGroupItem: 'text-field-group-item',
|
|
34
34
|
requiredAlignRight: 'required-align-right',
|
|
35
35
|
inputWrapper: 'input-wrapper',
|
|
36
|
+
inputScrollableWrapper: 'input-scrollable-wrapper',
|
|
36
37
|
inputTextEllipsis: 'textfield-input-text-ellipsis',
|
|
37
38
|
contentRightCompensationMargin: 'textfield-content-right-compensation-margin',
|
|
38
39
|
readOnlyInput: 'textfield-readonly-input'
|
|
@@ -24,12 +24,14 @@ var config = {
|
|
|
24
24
|
":var(--inverse-text-primary);",
|
|
25
25
|
":var(--inverse-text-primary);",
|
|
26
26
|
":var(--inverse-text-secondary);",
|
|
27
|
-
":var(--surface-solid-default);",
|
|
27
|
+
":var(--surface-solid-default-brightness);",
|
|
28
|
+
":var(--surface-solid-default-hover-brightness);",
|
|
29
|
+
":var(--surface-solid-default-active-brightness);",
|
|
28
30
|
":var(",
|
|
29
31
|
");",
|
|
30
32
|
":var(--inverse-text-primary-hover);",
|
|
31
33
|
":var(--inverse-text-primary-active);"
|
|
32
|
-
], _Button.buttonTokens.buttonColor, _Button.buttonTokens.buttonTextColor, _Button.buttonTokens.buttonIconColor, _Button.buttonTokens.buttonValueColor, _Button.buttonTokens.buttonBackgroundColor, _Button.buttonTokens.buttonLoadingBackgroundColor, _Button.buttonTokens.buttonBackgroundColor, _Button.buttonTokens.buttonColorHover, _Button.buttonTokens.buttonColorActive),
|
|
34
|
+
], _Button.buttonTokens.buttonColor, _Button.buttonTokens.buttonTextColor, _Button.buttonTokens.buttonIconColor, _Button.buttonTokens.buttonValueColor, _Button.buttonTokens.buttonBackgroundColor, _Button.buttonTokens.buttonBackgroundColorHover, _Button.buttonTokens.buttonBackgroundColorActive, _Button.buttonTokens.buttonLoadingBackgroundColor, _Button.buttonTokens.buttonBackgroundColor, _Button.buttonTokens.buttonColorHover, _Button.buttonTokens.buttonColorActive),
|
|
33
35
|
accent: (0, _styledcomponents.css)([
|
|
34
36
|
"",
|
|
35
37
|
":var(--on-dark-text-primary);",
|
|
@@ -9,16 +9,15 @@ var mergedConfig = mergeConfig(spinnerConfig);
|
|
|
9
9
|
var Spinner = component(mergedConfig);
|
|
10
10
|
export var ButtonText = styled.span.withConfig({
|
|
11
11
|
displayName: "Button.styles__ButtonText",
|
|
12
|
-
componentId: "sc-
|
|
12
|
+
componentId: "sc-8625a921-0"
|
|
13
13
|
})([
|
|
14
14
|
"min-width:4ch;&.",
|
|
15
|
-
"{flex-grow:2;text-align:start;}
|
|
16
|
-
");",
|
|
15
|
+
"{flex-grow:2;text-align:start;}",
|
|
17
16
|
""
|
|
18
|
-
], String(classes.contentRelaxed),
|
|
17
|
+
], String(classes.contentRelaxed), applyEllipsis());
|
|
19
18
|
export var StyledAdditionalContent = styled.div.withConfig({
|
|
20
19
|
displayName: "Button.styles__StyledAdditionalContent",
|
|
21
|
-
componentId: "sc-
|
|
20
|
+
componentId: "sc-8625a921-1"
|
|
22
21
|
})([
|
|
23
22
|
"display:flex;align-items:center;margin:var(",
|
|
24
23
|
");&.",
|
|
@@ -28,7 +27,7 @@ export var StyledAdditionalContent = styled.div.withConfig({
|
|
|
28
27
|
], tokens.buttonAdditionalContentMargin, String(classes.contentRelaxed), classes.buttonHasValue, tokens.buttonAdditionalContentMarginRightWidthValue);
|
|
29
28
|
export var ButtonValue = styled.span.withConfig({
|
|
30
29
|
displayName: "Button.styles__ButtonValue",
|
|
31
|
-
componentId: "sc-
|
|
30
|
+
componentId: "sc-8625a921-2"
|
|
32
31
|
})([
|
|
33
32
|
"color:var(",
|
|
34
33
|
");margin:var(",
|
|
@@ -38,7 +37,7 @@ export var ButtonValue = styled.span.withConfig({
|
|
|
38
37
|
// TODO: #720
|
|
39
38
|
export var LoadWrap = styled.div.withConfig({
|
|
40
39
|
displayName: "Button.styles__LoadWrap",
|
|
41
|
-
componentId: "sc-
|
|
40
|
+
componentId: "sc-8625a921-3"
|
|
42
41
|
})([
|
|
43
42
|
"opacity:",
|
|
44
43
|
";display:flex;align-items:inherit;justify-content:",
|
|
@@ -52,13 +51,13 @@ export var LoadWrap = styled.div.withConfig({
|
|
|
52
51
|
});
|
|
53
52
|
export var Loader = styled.div.withConfig({
|
|
54
53
|
displayName: "Button.styles__Loader",
|
|
55
|
-
componentId: "sc-
|
|
54
|
+
componentId: "sc-8625a921-4"
|
|
56
55
|
})([
|
|
57
56
|
"position:absolute;"
|
|
58
57
|
]);
|
|
59
58
|
export var StyledSpinner = styled(Spinner).withConfig({
|
|
60
59
|
displayName: "Button.styles__StyledSpinner",
|
|
61
|
-
componentId: "sc-
|
|
60
|
+
componentId: "sc-8625a921-5"
|
|
62
61
|
})([
|
|
63
62
|
"",
|
|
64
63
|
":var(",
|
|
@@ -68,7 +67,7 @@ export var StyledSpinner = styled(Spinner).withConfig({
|
|
|
68
67
|
], spinnerTokens.size, tokens.buttonSpinnerSize, spinnerTokens.color, tokens.buttonSpinnerColor);
|
|
69
68
|
export var StyledContentLeft = styled.div.withConfig({
|
|
70
69
|
displayName: "Button.styles__StyledContentLeft",
|
|
71
|
-
componentId: "sc-
|
|
70
|
+
componentId: "sc-8625a921-6"
|
|
72
71
|
})([
|
|
73
72
|
"display:flex;align-self:var(",
|
|
74
73
|
");color:var(",
|
|
@@ -80,7 +79,7 @@ export var StyledContentLeft = styled.div.withConfig({
|
|
|
80
79
|
});
|
|
81
80
|
export var StyledContentRight = styled.div.withConfig({
|
|
82
81
|
displayName: "Button.styles__StyledContentRight",
|
|
83
|
-
componentId: "sc-
|
|
82
|
+
componentId: "sc-8625a921-7"
|
|
84
83
|
})([
|
|
85
84
|
"display:flex;align-self:var(",
|
|
86
85
|
");color:var(",
|
|
@@ -210,6 +210,7 @@ import { Context } from "./Combobox.context";
|
|
|
210
210
|
var _useState = _sliced_to_array(useState(getTextValue(multiple, outerValue, valueToItemMap, renderValue)), 2), textValue = _useState[0], setTextValue = _useState[1];
|
|
211
211
|
var _useState1 = _sliced_to_array(useState(multiple ? [] : ''), 2), internalValue = _useState1[0], setInternalValue = _useState1[1];
|
|
212
212
|
var value = outerValue !== null && outerValue !== undefined ? outerValue : internalValue;
|
|
213
|
+
var rootRef = useRef(null);
|
|
213
214
|
var inputRef = useRef(null);
|
|
214
215
|
var floatingPopoverRef = useRef(null);
|
|
215
216
|
var inputForkRef = useForkRef(inputRef, ref);
|
|
@@ -244,15 +245,7 @@ import { Context } from "./Combobox.context";
|
|
|
244
245
|
if (!isCurrentListOpen || alwaysOpened) {
|
|
245
246
|
return;
|
|
246
247
|
}
|
|
247
|
-
|
|
248
|
-
type: 'reset'
|
|
249
|
-
});
|
|
250
|
-
dispatchFocusedPath({
|
|
251
|
-
type: 'reset'
|
|
252
|
-
});
|
|
253
|
-
if (onToggle) {
|
|
254
|
-
onToggle(false);
|
|
255
|
-
}
|
|
248
|
+
handleListToggle(false);
|
|
256
249
|
// Возвращаем актуальное значение поля ввода после закрытия выпадающего списка.
|
|
257
250
|
setTextValue(getTextValue(multiple, value, valueToItemMap, renderValue));
|
|
258
251
|
}, floatingPopoverRef);
|
|
@@ -318,12 +311,18 @@ import { Context } from "./Combobox.context";
|
|
|
318
311
|
type: 'opened_first_level'
|
|
319
312
|
});
|
|
320
313
|
} else {
|
|
314
|
+
var _rootRef_current;
|
|
321
315
|
dispatchFocusedPath({
|
|
322
316
|
type: 'reset'
|
|
323
317
|
});
|
|
324
318
|
dispatchPath({
|
|
325
319
|
type: 'reset'
|
|
326
320
|
});
|
|
321
|
+
// Скроллим чипы к левому краю при закрытии компонента
|
|
322
|
+
var el = rootRef === null || rootRef === void 0 ? void 0 : (_rootRef_current = rootRef.current) === null || _rootRef_current === void 0 ? void 0 : _rootRef_current.querySelector('.input-scrollable-wrapper');
|
|
323
|
+
if (multiple && value.length > 0 && el) {
|
|
324
|
+
el.scrollLeft = 0;
|
|
325
|
+
}
|
|
327
326
|
}
|
|
328
327
|
if (onToggle) {
|
|
329
328
|
onToggle(opened);
|
|
@@ -534,7 +533,8 @@ import { Context } from "./Combobox.context";
|
|
|
534
533
|
readOnly: readOnly,
|
|
535
534
|
name: name,
|
|
536
535
|
hintView: hintView,
|
|
537
|
-
hintSize: hintSize
|
|
536
|
+
hintSize: hintSize,
|
|
537
|
+
ref: rootRef
|
|
538
538
|
}, name && /*#__PURE__*/ React.createElement(SelectNative, {
|
|
539
539
|
items: valueToItemMap,
|
|
540
540
|
name: name,
|
|
@@ -213,6 +213,7 @@ import { Context } from "./Select.context";
|
|
|
213
213
|
var treeId = safeUseId();
|
|
214
214
|
var listWrapperRef = useRef(null);
|
|
215
215
|
var view = target === 'textfield-like' && (disabled || readOnly) ? 'default' : getView(status, outerView);
|
|
216
|
+
var rootRef = useRef(null);
|
|
216
217
|
// Собираем объект с пропсами для required и прокидываем их напрямую в компонент Textfield.
|
|
217
218
|
var requiredProps = props.target === 'button-like' ? undefined : {
|
|
218
219
|
required: required,
|
|
@@ -235,15 +236,7 @@ import { Context } from "./Select.context";
|
|
|
235
236
|
if (!isCurrentListOpen) {
|
|
236
237
|
return;
|
|
237
238
|
}
|
|
238
|
-
|
|
239
|
-
type: 'reset'
|
|
240
|
-
});
|
|
241
|
-
dispatchFocusedPath({
|
|
242
|
-
type: 'reset'
|
|
243
|
-
});
|
|
244
|
-
if (onToggle) {
|
|
245
|
-
onToggle(false);
|
|
246
|
-
}
|
|
239
|
+
handleListToggle(false);
|
|
247
240
|
}, floatingPopoverRef);
|
|
248
241
|
var onChange = function(newValue, item) {
|
|
249
242
|
if (props.onChange) {
|
|
@@ -271,12 +264,18 @@ import { Context } from "./Select.context";
|
|
|
271
264
|
type: 'opened_first_level'
|
|
272
265
|
});
|
|
273
266
|
} else {
|
|
267
|
+
var _rootRef_current;
|
|
274
268
|
dispatchFocusedPath({
|
|
275
269
|
type: 'reset'
|
|
276
270
|
});
|
|
277
271
|
dispatchPath({
|
|
278
272
|
type: 'reset'
|
|
279
273
|
});
|
|
274
|
+
// Скроллим чипы к левому краю при закрытии компонента
|
|
275
|
+
var el = rootRef === null || rootRef === void 0 ? void 0 : (_rootRef_current = rootRef.current) === null || _rootRef_current === void 0 ? void 0 : _rootRef_current.querySelector('.input-scrollable-wrapper');
|
|
276
|
+
if (multiselect && value.length > 0 && el) {
|
|
277
|
+
el.scrollLeft = 0;
|
|
278
|
+
}
|
|
280
279
|
}
|
|
281
280
|
if (onToggle) {
|
|
282
281
|
onToggle(opened);
|
|
@@ -446,7 +445,8 @@ import { Context } from "./Select.context";
|
|
|
446
445
|
chipView: chipView,
|
|
447
446
|
disabled: disabled,
|
|
448
447
|
readOnly: readOnly,
|
|
449
|
-
id: id
|
|
448
|
+
id: id,
|
|
449
|
+
ref: rootRef
|
|
450
450
|
}, rest), name && /*#__PURE__*/ React.createElement(SelectNative, {
|
|
451
451
|
items: valueToItemMap,
|
|
452
452
|
name: name,
|
|
@@ -467,7 +467,7 @@ export var textFieldRoot = function(Root) {
|
|
|
467
467
|
tabIndex: -1,
|
|
468
468
|
ref: contentRef,
|
|
469
469
|
onKeyDown: handleContentKeyDown,
|
|
470
|
-
className: withHasChips
|
|
470
|
+
className: cx(withHasChips, classes.inputScrollableWrapper)
|
|
471
471
|
}, Boolean(textBefore && isChipEnumeration) && /*#__PURE__*/ React.createElement(StyledTextBefore, null, textBefore), Boolean(_chips === null || _chips === void 0 ? void 0 : _chips.length) && /*#__PURE__*/ React.createElement(TextFieldChipNew, {
|
|
472
472
|
chips: _chips,
|
|
473
473
|
onChipClick: _onChipClick,
|
|
@@ -15,6 +15,7 @@ export var classes = {
|
|
|
15
15
|
textFieldGroupItem: 'text-field-group-item',
|
|
16
16
|
requiredAlignRight: 'required-align-right',
|
|
17
17
|
inputWrapper: 'input-wrapper',
|
|
18
|
+
inputScrollableWrapper: 'input-scrollable-wrapper',
|
|
18
19
|
inputTextEllipsis: 'textfield-input-text-ellipsis',
|
|
19
20
|
contentRightCompensationMargin: 'textfield-content-right-compensation-margin',
|
|
20
21
|
readOnlyInput: 'textfield-readonly-input'
|
|
@@ -14,12 +14,14 @@ export var config = {
|
|
|
14
14
|
":var(--inverse-text-primary);",
|
|
15
15
|
":var(--inverse-text-primary);",
|
|
16
16
|
":var(--inverse-text-secondary);",
|
|
17
|
-
":var(--surface-solid-default);",
|
|
17
|
+
":var(--surface-solid-default-brightness);",
|
|
18
|
+
":var(--surface-solid-default-hover-brightness);",
|
|
19
|
+
":var(--surface-solid-default-active-brightness);",
|
|
18
20
|
":var(",
|
|
19
21
|
");",
|
|
20
22
|
":var(--inverse-text-primary-hover);",
|
|
21
23
|
":var(--inverse-text-primary-active);"
|
|
22
|
-
], buttonTokens.buttonColor, buttonTokens.buttonTextColor, buttonTokens.buttonIconColor, buttonTokens.buttonValueColor, buttonTokens.buttonBackgroundColor, buttonTokens.buttonLoadingBackgroundColor, buttonTokens.buttonBackgroundColor, buttonTokens.buttonColorHover, buttonTokens.buttonColorActive),
|
|
24
|
+
], buttonTokens.buttonColor, buttonTokens.buttonTextColor, buttonTokens.buttonIconColor, buttonTokens.buttonValueColor, buttonTokens.buttonBackgroundColor, buttonTokens.buttonBackgroundColorHover, buttonTokens.buttonBackgroundColorActive, buttonTokens.buttonLoadingBackgroundColor, buttonTokens.buttonBackgroundColor, buttonTokens.buttonColorHover, buttonTokens.buttonColorActive),
|
|
23
25
|
accent: css([
|
|
24
26
|
"",
|
|
25
27
|
":var(--on-dark-text-primary);",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { component, mergeConfig } from "../../../engines";
|
|
2
|
-
import { comboboxNewConfig } from "../../..";
|
|
3
|
-
import { config } from "./Combobox.config";
|
|
4
|
-
var mergedConfig = mergeConfig(comboboxNewConfig, config);
|
|
5
|
-
var ComboboxComponent = component(mergedConfig);
|
|
6
|
-
var Combobox = ComboboxComponent;
|
|
7
|
-
export { Combobox };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.styles.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"Button.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.styles.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,UAAU,uKAStB,CAAC;AAEF,eAAO,MAAM,uBAAuB,qKAanC,CAAC;AAEF,eAAO,MAAM,WAAW,uKAQvB,CAAC;AAGF,eAAO,MAAM,QAAQ;oBAAgC,MAAM;gBAAc,OAAO;EAO/E,CAAC;AAEF,eAAO,MAAM,MAAM,qKAElB,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;oDAGzB,CAAC;AAEF,eAAO,MAAM,iBAAiB;uBAAmC,OAAO;EAMvE,CAAC;AAEF,eAAO,MAAM,kBAAkB;uBAAmC,OAAO;EAMxE,CAAC;AAEF,eAAO,MAAM,IAAI,0CA0BhB,CAAC;AAGF,eAAO,MAAM,WAAW,QA6FvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../../../src/components/Combobox/ComboboxNew/Combobox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6E,MAAM,OAAO,CAAC;AAIlG,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AA6BxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAOtD;;GAEG;AAEH,eAAO,MAAM,YAAY,SAAU,SAAS,CAAC,gBAAgB,EAAE,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../../../src/components/Combobox/ComboboxNew/Combobox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6E,MAAM,OAAO,CAAC;AAIlG,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AA6BxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAOtD;;GAEG;AAEH,eAAO,MAAM,YAAY,SAAU,SAAS,CAAC,gBAAgB,EAAE,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,2FA0jBtF,CAAC;AAEP,eAAO,MAAM,cAAc;;;mBA5jBQ,SAAS,CAAC,gBAAgB,EAAE,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;;;;;;;;;;;;;;;;;;CAilB3F,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,KASN,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAYxC,OAAO,KAAK,EAAE,iBAAiB,EAAiB,MAAM,gBAAgB,CAAC;AAMvE;;GAEG;AACH,eAAO,MAAM,UAAU,SAAU,SAAS,CAAC,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,KASN,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAYxC,OAAO,KAAK,EAAE,iBAAiB,EAAiB,MAAM,gBAAgB,CAAC;AAMvE;;GAEG;AACH,eAAO,MAAM,UAAU,SAAU,SAAS,CAAC,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC,gGAwezF,CAAC;AAEP,eAAO,MAAM,YAAY;;;mBA1eQ,SAAS,CAAC,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;;;;;;;;;CAsf9F,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.tokens.d.ts","sourceRoot":"","sources":["../../../src/components/TextField/TextField.tokens.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO
|
|
1
|
+
{"version":3,"file":"TextField.tokens.d.ts","sourceRoot":"","sources":["../../../src/components/TextField/TextField.tokens.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;CAoBnB,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;;;;;;;;;IAiBf,oCAAoC;;;;;;IAOpC,mBAAmB;;;;;;;;;;IAYnB,kCAAkC;;;;;;;;;;;;;;;;;;;;IA4BlC,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA8CpB,qCAAqC;;;;;IAMrC,6DAA6D;;;IAI7D,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgCzB,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8CrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.config.d.ts","sourceRoot":"","sources":["../../../../src/examples/components/Button/Button.config.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Button.config.d.ts","sourceRoot":"","sources":["../../../../src/examples/components/Button/Button.config.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+PlB,CAAC"}
|