@cloud-ru/uikit-product-fields-predefined 0.13.6 → 0.13.7
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/CHANGELOG.md +11 -0
- package/dist/cjs/components/FieldAi/FieldAi.js +1 -1
- package/dist/cjs/components/FieldAi/components/MobileFieldAi/styles.module.css +21 -0
- package/dist/cjs/components/FieldAi/styles.module.css +9 -0
- package/dist/esm/components/FieldAi/FieldAi.js +1 -1
- package/dist/esm/components/FieldAi/components/MobileFieldAi/styles.module.css +21 -0
- package/dist/esm/components/FieldAi/styles.module.css +9 -0
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/components/FieldAi/FieldAi.tsx +2 -2
- package/src/components/FieldAi/components/MobileFieldAi/styles.module.scss +9 -0
- package/src/components/FieldAi/styles.module.scss +18 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 0.13.7 (2025-11-13)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **LK-6839:** repaint submitButton and textarea for Giga-helper ([49b1652](https://gitverse.ru/cloud-ru-tech/uikit-product/commits/49b165277c94deea5ececcea54f41a1505424a99))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## 0.13.6 (2025-11-13)
|
|
7
18
|
|
|
8
19
|
|
|
@@ -62,5 +62,5 @@ exports.FieldAi = (0, react_1.forwardRef)((_a, ref) => {
|
|
|
62
62
|
if (isTouchDevice && !secure) {
|
|
63
63
|
return ((0, jsx_runtime_1.jsx)(MobileFieldAi_1.MobileFieldAi, Object.assign({}, props, (0, uikit_product_mobile_fields_1.getAdaptiveFieldProps)(props), { onSubmit: handleSubmit, submitEnabled: isValueValid && !disabled, ref: ref, value: value })));
|
|
64
64
|
}
|
|
65
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(styles_module_scss_1.default.wrapper, className), children: [(0, jsx_runtime_1.jsx)(WithPasswordValidation_1.WithPasswordValidation, { showValidation: isPasswordMode, passwordValidation: passwordValidation, layoutType: layoutType, children: (0, jsx_runtime_1.jsx)(uikit_product_mobile_fields_1.AdaptiveFieldTextArea, Object.assign({}, props, { ref: ref, value: value, size: 'm', minRows: secure ? 1 : 2, maxRows: secure ? 1 : 4, placeholder: secure ? t('FieldAi.secret.placeholder') : t('FieldAi.regular.placeholder'), className: secure && isValueHidden ? styles_module_scss_1.default.secured : undefined, onKeyDown: handleKeyDown, spellCheck: !secure, validationState: showPasswordError ? 'error' : validationState, footer: (0, jsx_runtime_1.jsx)(TextAreaActionsFooter_1.TextAreaActionsFooter, { left: secure && ((0, jsx_runtime_1.jsx)(button_1.ButtonFunction, { size: 'xs', icon: isValueHidden ? (0, jsx_runtime_1.jsx)(uikit_product_icons_1.EyeSVG, {}) : (0, jsx_runtime_1.jsx)(uikit_product_icons_1.EyeClosedSVG, {}), onClick: () => setIsValueHidden(prev => !prev) })), right: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [secure && onResetContextClick && ((0, jsx_runtime_1.jsx)(tooltip_1.Tooltip, { tip: t('FieldAi.resetContext.tooltip'), hoverDelayOpen: 600, children: (0, jsx_runtime_1.jsx)(button_1.ButtonOutline, { size: 'xs', label: t('FieldAi.resetContext.label'), onClick: onResetContextClick, appearance: 'destructive' }) })), (0, jsx_runtime_1.jsx)(FieldSubmitButton_1.FieldSubmitButton, { showTooltip: !isTouchDevice, className: isTouchDevice ? styles_module_scss_1.default.mobileSubmitButton : undefined, active: isValueValid && !disabled && isPasswordValid, handleClick: handleSubmit, size: isTouchDevice ? 's' : 'xs' })] }) }) })) }), !isPasswordMode && (0, jsx_runtime_1.jsx)(AIDisclaimer_1.AIDisclaimer, { layoutType: layoutType })] }));
|
|
65
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(styles_module_scss_1.default.wrapper, className), children: [(0, jsx_runtime_1.jsx)(WithPasswordValidation_1.WithPasswordValidation, { showValidation: isPasswordMode, passwordValidation: passwordValidation, layoutType: layoutType, children: (0, jsx_runtime_1.jsx)(uikit_product_mobile_fields_1.AdaptiveFieldTextArea, Object.assign({}, props, { ref: ref, value: value, size: 'm', minRows: secure ? 1 : 2, maxRows: secure ? 1 : 4, placeholder: secure ? t('FieldAi.secret.placeholder') : t('FieldAi.regular.placeholder'), className: (0, classnames_1.default)(styles_module_scss_1.default.textarea, secure && isValueHidden ? styles_module_scss_1.default.secured : undefined), onKeyDown: handleKeyDown, spellCheck: !secure, validationState: showPasswordError ? 'error' : validationState, footer: (0, jsx_runtime_1.jsx)(TextAreaActionsFooter_1.TextAreaActionsFooter, { left: secure && ((0, jsx_runtime_1.jsx)(button_1.ButtonFunction, { size: 'xs', icon: isValueHidden ? (0, jsx_runtime_1.jsx)(uikit_product_icons_1.EyeSVG, {}) : (0, jsx_runtime_1.jsx)(uikit_product_icons_1.EyeClosedSVG, {}), onClick: () => setIsValueHidden(prev => !prev) })), right: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [secure && onResetContextClick && ((0, jsx_runtime_1.jsx)(tooltip_1.Tooltip, { tip: t('FieldAi.resetContext.tooltip'), hoverDelayOpen: 600, children: (0, jsx_runtime_1.jsx)(button_1.ButtonOutline, { size: 'xs', label: t('FieldAi.resetContext.label'), onClick: onResetContextClick, appearance: 'destructive' }) })), (0, jsx_runtime_1.jsx)(FieldSubmitButton_1.FieldSubmitButton, { showTooltip: !isTouchDevice, className: (0, classnames_1.default)(styles_module_scss_1.default.submitButton, isTouchDevice ? styles_module_scss_1.default.mobileSubmitButton : undefined), active: isValueValid && !disabled && isPasswordValid, handleClick: handleSubmit, size: isTouchDevice ? 's' : 'xs' })] }) }) })) }), !isPasswordMode && (0, jsx_runtime_1.jsx)(AIDisclaimer_1.AIDisclaimer, { layoutType: layoutType })] }));
|
|
66
66
|
});
|
|
@@ -34,6 +34,12 @@
|
|
|
34
34
|
paragraph-spacing:var(--sans-body-s-paragraph-spacing, 6.6px);
|
|
35
35
|
padding-right:calc(42px + var(--size-fields-scroll-bar-width, 8px));
|
|
36
36
|
}
|
|
37
|
+
.mobileInputWrapper[data-size=s] .textarea::-moz-placeholder{
|
|
38
|
+
color:var(--sys-neutral-text-disabled, #aaaebd);
|
|
39
|
+
}
|
|
40
|
+
.mobileInputWrapper[data-size=s] .textarea::placeholder{
|
|
41
|
+
color:var(--sys-neutral-text-disabled, #aaaebd);
|
|
42
|
+
}
|
|
37
43
|
.mobileInputWrapper[data-size=m]{
|
|
38
44
|
--row-height:var(--sans-body-m-line-height, 20px);
|
|
39
45
|
--horizontal-scroll-bar-height:calc(var(--dimension-025m, 2px) + var(--dimension-050m, 4px));
|
|
@@ -47,6 +53,12 @@
|
|
|
47
53
|
paragraph-spacing:var(--sans-body-m-paragraph-spacing, 7.7px);
|
|
48
54
|
padding-right:calc(42px + var(--size-fields-scroll-bar-width, 8px));
|
|
49
55
|
}
|
|
56
|
+
.mobileInputWrapper[data-size=m] .textarea::-moz-placeholder{
|
|
57
|
+
color:var(--sys-neutral-text-disabled, #aaaebd);
|
|
58
|
+
}
|
|
59
|
+
.mobileInputWrapper[data-size=m] .textarea::placeholder{
|
|
60
|
+
color:var(--sys-neutral-text-disabled, #aaaebd);
|
|
61
|
+
}
|
|
50
62
|
.mobileInputWrapper[data-size=l]{
|
|
51
63
|
--row-height:var(--sans-body-l-line-height, 24px);
|
|
52
64
|
--horizontal-scroll-bar-height:var(--dimension-1m, 8px);
|
|
@@ -60,6 +72,12 @@
|
|
|
60
72
|
paragraph-spacing:var(--sans-body-l-paragraph-spacing, 8.8px);
|
|
61
73
|
padding-right:calc(42px + var(--size-fields-scroll-bar-width, 8px));
|
|
62
74
|
}
|
|
75
|
+
.mobileInputWrapper[data-size=l] .textarea::-moz-placeholder{
|
|
76
|
+
color:var(--sys-neutral-text-disabled, #aaaebd);
|
|
77
|
+
}
|
|
78
|
+
.mobileInputWrapper[data-size=l] .textarea::placeholder{
|
|
79
|
+
color:var(--sys-neutral-text-disabled, #aaaebd);
|
|
80
|
+
}
|
|
63
81
|
|
|
64
82
|
.mobileSubmitButtonWrapper{
|
|
65
83
|
width:32px;
|
|
@@ -75,6 +93,9 @@
|
|
|
75
93
|
position:relative !important;
|
|
76
94
|
flex-shrink:0 !important;
|
|
77
95
|
}
|
|
96
|
+
.mobileSubmitButton:not([data-disabled]){
|
|
97
|
+
background:radial-gradient(92.53% 92.53% at 65.87% 21.69%, #7CB5F2 15%, #5FD7C2 45%, #26D07C 65%);
|
|
98
|
+
}
|
|
78
99
|
.mobileSubmitButton:after{
|
|
79
100
|
content:"";
|
|
80
101
|
display:flex;
|
|
@@ -22,4 +22,13 @@
|
|
|
22
22
|
top:50%;
|
|
23
23
|
left:50%;
|
|
24
24
|
transform:translate(-50%, -50%);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.submitButton:not([data-disabled]){
|
|
28
|
+
background:radial-gradient(92.53% 92.53% at 65.87% 21.69%, #7CB5F2 15%, #5FD7C2 45%, #26D07C 65%);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.textarea > :first-child[data-validation=default]:not([data-readonly]):not([data-disable-focus]):focus-within:not([data-disabled]){
|
|
32
|
+
border-color:transparent;
|
|
33
|
+
background:linear-gradient(var(--sys-neutral-background2-level), var(--sys-neutral-background2-level) 0) padding-box, radial-gradient(92.53% 92.53% at 65.87% 21.69%, #7CB5F2 8%, #78B9EC 17%, #70C6DD 28%, #64D8C7 38%, #5FD7C2 44%, #54D5B3 51%, #40D39C 58%, #26D07C 66%) border-box;
|
|
25
34
|
}
|
|
@@ -56,5 +56,5 @@ export const FieldAi = forwardRef((_a, ref) => {
|
|
|
56
56
|
if (isTouchDevice && !secure) {
|
|
57
57
|
return (_jsx(MobileFieldAi, Object.assign({}, props, getAdaptiveFieldProps(props), { onSubmit: handleSubmit, submitEnabled: isValueValid && !disabled, ref: ref, value: value })));
|
|
58
58
|
}
|
|
59
|
-
return (_jsxs("div", { className: cn(styles.wrapper, className), children: [_jsx(WithPasswordValidation, { showValidation: isPasswordMode, passwordValidation: passwordValidation, layoutType: layoutType, children: _jsx(AdaptiveFieldTextArea, Object.assign({}, props, { ref: ref, value: value, size: 'm', minRows: secure ? 1 : 2, maxRows: secure ? 1 : 4, placeholder: secure ? t('FieldAi.secret.placeholder') : t('FieldAi.regular.placeholder'), className: secure && isValueHidden ? styles.secured : undefined, onKeyDown: handleKeyDown, spellCheck: !secure, validationState: showPasswordError ? 'error' : validationState, footer: _jsx(TextAreaActionsFooter, { left: secure && (_jsx(ButtonFunction, { size: 'xs', icon: isValueHidden ? _jsx(EyeSVG, {}) : _jsx(EyeClosedSVG, {}), onClick: () => setIsValueHidden(prev => !prev) })), right: _jsxs(_Fragment, { children: [secure && onResetContextClick && (_jsx(Tooltip, { tip: t('FieldAi.resetContext.tooltip'), hoverDelayOpen: 600, children: _jsx(ButtonOutline, { size: 'xs', label: t('FieldAi.resetContext.label'), onClick: onResetContextClick, appearance: 'destructive' }) })), _jsx(FieldSubmitButton, { showTooltip: !isTouchDevice, className: isTouchDevice ? styles.mobileSubmitButton : undefined, active: isValueValid && !disabled && isPasswordValid, handleClick: handleSubmit, size: isTouchDevice ? 's' : 'xs' })] }) }) })) }), !isPasswordMode && _jsx(AIDisclaimer, { layoutType: layoutType })] }));
|
|
59
|
+
return (_jsxs("div", { className: cn(styles.wrapper, className), children: [_jsx(WithPasswordValidation, { showValidation: isPasswordMode, passwordValidation: passwordValidation, layoutType: layoutType, children: _jsx(AdaptiveFieldTextArea, Object.assign({}, props, { ref: ref, value: value, size: 'm', minRows: secure ? 1 : 2, maxRows: secure ? 1 : 4, placeholder: secure ? t('FieldAi.secret.placeholder') : t('FieldAi.regular.placeholder'), className: cn(styles.textarea, secure && isValueHidden ? styles.secured : undefined), onKeyDown: handleKeyDown, spellCheck: !secure, validationState: showPasswordError ? 'error' : validationState, footer: _jsx(TextAreaActionsFooter, { left: secure && (_jsx(ButtonFunction, { size: 'xs', icon: isValueHidden ? _jsx(EyeSVG, {}) : _jsx(EyeClosedSVG, {}), onClick: () => setIsValueHidden(prev => !prev) })), right: _jsxs(_Fragment, { children: [secure && onResetContextClick && (_jsx(Tooltip, { tip: t('FieldAi.resetContext.tooltip'), hoverDelayOpen: 600, children: _jsx(ButtonOutline, { size: 'xs', label: t('FieldAi.resetContext.label'), onClick: onResetContextClick, appearance: 'destructive' }) })), _jsx(FieldSubmitButton, { showTooltip: !isTouchDevice, className: cn(styles.submitButton, isTouchDevice ? styles.mobileSubmitButton : undefined), active: isValueValid && !disabled && isPasswordValid, handleClick: handleSubmit, size: isTouchDevice ? 's' : 'xs' })] }) }) })) }), !isPasswordMode && _jsx(AIDisclaimer, { layoutType: layoutType })] }));
|
|
60
60
|
});
|
|
@@ -34,6 +34,12 @@
|
|
|
34
34
|
paragraph-spacing:var(--sans-body-s-paragraph-spacing, 6.6px);
|
|
35
35
|
padding-right:calc(42px + var(--size-fields-scroll-bar-width, 8px));
|
|
36
36
|
}
|
|
37
|
+
.mobileInputWrapper[data-size=s] .textarea::-moz-placeholder{
|
|
38
|
+
color:var(--sys-neutral-text-disabled, #aaaebd);
|
|
39
|
+
}
|
|
40
|
+
.mobileInputWrapper[data-size=s] .textarea::placeholder{
|
|
41
|
+
color:var(--sys-neutral-text-disabled, #aaaebd);
|
|
42
|
+
}
|
|
37
43
|
.mobileInputWrapper[data-size=m]{
|
|
38
44
|
--row-height:var(--sans-body-m-line-height, 20px);
|
|
39
45
|
--horizontal-scroll-bar-height:calc(var(--dimension-025m, 2px) + var(--dimension-050m, 4px));
|
|
@@ -47,6 +53,12 @@
|
|
|
47
53
|
paragraph-spacing:var(--sans-body-m-paragraph-spacing, 7.7px);
|
|
48
54
|
padding-right:calc(42px + var(--size-fields-scroll-bar-width, 8px));
|
|
49
55
|
}
|
|
56
|
+
.mobileInputWrapper[data-size=m] .textarea::-moz-placeholder{
|
|
57
|
+
color:var(--sys-neutral-text-disabled, #aaaebd);
|
|
58
|
+
}
|
|
59
|
+
.mobileInputWrapper[data-size=m] .textarea::placeholder{
|
|
60
|
+
color:var(--sys-neutral-text-disabled, #aaaebd);
|
|
61
|
+
}
|
|
50
62
|
.mobileInputWrapper[data-size=l]{
|
|
51
63
|
--row-height:var(--sans-body-l-line-height, 24px);
|
|
52
64
|
--horizontal-scroll-bar-height:var(--dimension-1m, 8px);
|
|
@@ -60,6 +72,12 @@
|
|
|
60
72
|
paragraph-spacing:var(--sans-body-l-paragraph-spacing, 8.8px);
|
|
61
73
|
padding-right:calc(42px + var(--size-fields-scroll-bar-width, 8px));
|
|
62
74
|
}
|
|
75
|
+
.mobileInputWrapper[data-size=l] .textarea::-moz-placeholder{
|
|
76
|
+
color:var(--sys-neutral-text-disabled, #aaaebd);
|
|
77
|
+
}
|
|
78
|
+
.mobileInputWrapper[data-size=l] .textarea::placeholder{
|
|
79
|
+
color:var(--sys-neutral-text-disabled, #aaaebd);
|
|
80
|
+
}
|
|
63
81
|
|
|
64
82
|
.mobileSubmitButtonWrapper{
|
|
65
83
|
width:32px;
|
|
@@ -75,6 +93,9 @@
|
|
|
75
93
|
position:relative !important;
|
|
76
94
|
flex-shrink:0 !important;
|
|
77
95
|
}
|
|
96
|
+
.mobileSubmitButton:not([data-disabled]){
|
|
97
|
+
background:radial-gradient(92.53% 92.53% at 65.87% 21.69%, #7CB5F2 15%, #5FD7C2 45%, #26D07C 65%);
|
|
98
|
+
}
|
|
78
99
|
.mobileSubmitButton:after{
|
|
79
100
|
content:"";
|
|
80
101
|
display:flex;
|
|
@@ -22,4 +22,13 @@
|
|
|
22
22
|
top:50%;
|
|
23
23
|
left:50%;
|
|
24
24
|
transform:translate(-50%, -50%);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.submitButton:not([data-disabled]){
|
|
28
|
+
background:radial-gradient(92.53% 92.53% at 65.87% 21.69%, #7CB5F2 15%, #5FD7C2 45%, #26D07C 65%);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.textarea > :first-child[data-validation=default]:not([data-readonly]):not([data-disable-focus]):focus-within:not([data-disabled]){
|
|
32
|
+
border-color:transparent;
|
|
33
|
+
background:linear-gradient(var(--sys-neutral-background2-level), var(--sys-neutral-background2-level) 0) padding-box, radial-gradient(92.53% 92.53% at 65.87% 21.69%, #7CB5F2 8%, #78B9EC 17%, #70C6DD 28%, #64D8C7 38%, #5FD7C2 44%, #54D5B3 51%, #40D39C 58%, #26D07C 66%) border-box;
|
|
25
34
|
}
|