@astral/ui 4.24.2 → 4.25.1
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/components/fileUploading/FileInput/styles.js +4 -0
- package/hook-form/EditableText/EditingForm/EditingForm.d.ts +1 -0
- package/hook-form/EditableText/EditingForm/EditingForm.js +3 -3
- package/hook-form/EditableText/EditingForm/styles.d.ts +9 -0
- package/hook-form/EditableText/EditingForm/styles.js +23 -0
- package/hook-form/EditableText/useLogic/useLogic.d.ts +1 -0
- package/hook-form/EditableText/useLogic/useLogic.js +1 -0
- package/node/components/fileUploading/FileInput/styles.js +4 -0
- package/node/hook-form/EditableText/EditingForm/EditingForm.d.ts +1 -0
- package/node/hook-form/EditableText/EditingForm/EditingForm.js +2 -2
- package/node/hook-form/EditableText/EditingForm/styles.d.ts +9 -0
- package/node/hook-form/EditableText/EditingForm/styles.js +24 -1
- package/node/hook-form/EditableText/useLogic/useLogic.d.ts +1 -0
- package/node/hook-form/EditableText/useLogic/useLogic.js +1 -0
- package/package.json +1 -1
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Button } from '../../../components/Button';
|
|
3
2
|
import { Form } from '../../Form';
|
|
4
3
|
import { FormSubmitButton } from '../../FormSubmitButton';
|
|
5
4
|
import { FormTextField } from '../../FormTextField';
|
|
6
5
|
import { FIELD_NAME } from '../constants';
|
|
7
|
-
import { Description, FormFooter, Wrapper } from './styles';
|
|
6
|
+
import { CancelButton, Description, FormFooter, Wrapper } from './styles';
|
|
8
7
|
import { useLogic } from './useLogic';
|
|
9
8
|
// biome-ignore lint/complexity/noUselessTypeConstraint: Фикс типизация в тестах
|
|
10
9
|
export const EditingForm = (props) => {
|
|
@@ -14,5 +13,6 @@ export const EditingForm = (props) => {
|
|
|
14
13
|
name: FIELD_NAME,
|
|
15
14
|
control: formProps.form.control,
|
|
16
15
|
fullWidth: true,
|
|
17
|
-
|
|
16
|
+
autoFocus: true,
|
|
17
|
+
}), _jsxs(FormFooter, { children: [_jsx(CancelButton, { variant: "text", onClick: onClose, children: "\u041E\u0442\u043C\u0435\u043D\u0430" }), _jsx(FormSubmitButton, { children: "\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C" })] })] }) }));
|
|
18
18
|
};
|
|
@@ -16,3 +16,12 @@ export declare const FormFooter: import("../../../components/styled").StyledComp
|
|
|
16
16
|
theme?: import("@emotion/react").Theme | undefined;
|
|
17
17
|
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
18
18
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
|
|
19
|
+
export declare const CancelButton: import("../../../components/styled").StyledComponent<Omit<import("../../..").WithoutEmotionSpecific<import("@mui/material").ButtonProps>, "color" | "component" | "variant" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple"> & {
|
|
20
|
+
variant?: "light" | "link" | "text" | "contained" | "outlined" | undefined;
|
|
21
|
+
loading?: boolean | undefined;
|
|
22
|
+
color?: "primary" | "success" | "warning" | "error" | "grey" | undefined;
|
|
23
|
+
component?: import("react").ElementType | undefined;
|
|
24
|
+
selected?: boolean | undefined;
|
|
25
|
+
} & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, ""> & import("react").RefAttributes<HTMLButtonElement> & {
|
|
26
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
27
|
+
}, {}, {}>;
|
|
@@ -1,14 +1,37 @@
|
|
|
1
|
+
import { Button, buttonClasses } from '../../../components/Button';
|
|
1
2
|
import { styled } from '../../../components/styled';
|
|
2
3
|
import { Typography } from '../../../components/Typography';
|
|
3
4
|
export const Wrapper = styled.div `
|
|
4
5
|
width: 400px;
|
|
5
6
|
padding: ${({ theme }) => theme.spacing(4)};
|
|
7
|
+
|
|
8
|
+
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
9
|
+
width: auto;
|
|
10
|
+
}
|
|
6
11
|
`;
|
|
7
12
|
export const Description = styled(Typography) `
|
|
8
13
|
margin-bottom: ${({ theme }) => theme.spacing(3)};
|
|
14
|
+
|
|
15
|
+
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
16
|
+
display: none;
|
|
17
|
+
}
|
|
9
18
|
`;
|
|
10
19
|
export const FormFooter = styled.footer `
|
|
11
20
|
display: flex;
|
|
12
21
|
gap: ${({ theme }) => theme.spacing(3)};
|
|
13
22
|
justify-content: end;
|
|
23
|
+
|
|
24
|
+
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
25
|
+
padding-top: ${({ theme }) => theme.spacing(4)};
|
|
26
|
+
|
|
27
|
+
& .${buttonClasses.root} {
|
|
28
|
+
width: 100%;
|
|
29
|
+
height: 48px;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
`;
|
|
33
|
+
export const CancelButton = styled(Button) `
|
|
34
|
+
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
35
|
+
display: none;
|
|
36
|
+
}
|
|
14
37
|
`;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.EditingForm = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const Button_1 = require("../../../components/Button");
|
|
6
5
|
const Form_1 = require("../../Form");
|
|
7
6
|
const FormSubmitButton_1 = require("../../FormSubmitButton");
|
|
8
7
|
const FormTextField_1 = require("../../FormTextField");
|
|
@@ -17,6 +16,7 @@ const EditingForm = (props) => {
|
|
|
17
16
|
name: constants_1.FIELD_NAME,
|
|
18
17
|
control: formProps.form.control,
|
|
19
18
|
fullWidth: true,
|
|
20
|
-
|
|
19
|
+
autoFocus: true,
|
|
20
|
+
}), (0, jsx_runtime_1.jsxs)(styles_1.FormFooter, { children: [(0, jsx_runtime_1.jsx)(styles_1.CancelButton, { variant: "text", onClick: onClose, children: "\u041E\u0442\u043C\u0435\u043D\u0430" }), (0, jsx_runtime_1.jsx)(FormSubmitButton_1.FormSubmitButton, { children: "\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C" })] })] }) }));
|
|
21
21
|
};
|
|
22
22
|
exports.EditingForm = EditingForm;
|
|
@@ -16,3 +16,12 @@ export declare const FormFooter: import("@emotion/styled/dist/declarations/src/t
|
|
|
16
16
|
theme?: import("@emotion/react").Theme | undefined;
|
|
17
17
|
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
18
18
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
|
|
19
|
+
export declare const CancelButton: import("@emotion/styled/dist/declarations/src/types").StyledComponent<Omit<import("../../..").WithoutEmotionSpecific<import("@mui/material").ButtonProps>, "color" | "component" | "variant" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple"> & {
|
|
20
|
+
variant?: "light" | "link" | "text" | "contained" | "outlined" | undefined;
|
|
21
|
+
loading?: boolean | undefined;
|
|
22
|
+
color?: "primary" | "success" | "warning" | "error" | "grey" | undefined;
|
|
23
|
+
component?: import("react").ElementType | undefined;
|
|
24
|
+
selected?: boolean | undefined;
|
|
25
|
+
} & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, ""> & import("react").RefAttributes<HTMLButtonElement> & {
|
|
26
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
27
|
+
}, {}, {}>;
|
|
@@ -1,17 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FormFooter = exports.Description = exports.Wrapper = void 0;
|
|
3
|
+
exports.CancelButton = exports.FormFooter = exports.Description = exports.Wrapper = void 0;
|
|
4
|
+
const Button_1 = require("../../../components/Button");
|
|
4
5
|
const styled_1 = require("../../../components/styled");
|
|
5
6
|
const Typography_1 = require("../../../components/Typography");
|
|
6
7
|
exports.Wrapper = styled_1.styled.div `
|
|
7
8
|
width: 400px;
|
|
8
9
|
padding: ${({ theme }) => theme.spacing(4)};
|
|
10
|
+
|
|
11
|
+
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
12
|
+
width: auto;
|
|
13
|
+
}
|
|
9
14
|
`;
|
|
10
15
|
exports.Description = (0, styled_1.styled)(Typography_1.Typography) `
|
|
11
16
|
margin-bottom: ${({ theme }) => theme.spacing(3)};
|
|
17
|
+
|
|
18
|
+
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
19
|
+
display: none;
|
|
20
|
+
}
|
|
12
21
|
`;
|
|
13
22
|
exports.FormFooter = styled_1.styled.footer `
|
|
14
23
|
display: flex;
|
|
15
24
|
gap: ${({ theme }) => theme.spacing(3)};
|
|
16
25
|
justify-content: end;
|
|
26
|
+
|
|
27
|
+
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
28
|
+
padding-top: ${({ theme }) => theme.spacing(4)};
|
|
29
|
+
|
|
30
|
+
& .${Button_1.buttonClasses.root} {
|
|
31
|
+
width: 100%;
|
|
32
|
+
height: 48px;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
`;
|
|
36
|
+
exports.CancelButton = (0, styled_1.styled)(Button_1.Button) `
|
|
37
|
+
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
38
|
+
display: none;
|
|
39
|
+
}
|
|
17
40
|
`;
|