@astral/ui 4.31.2 → 4.32.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/ActionGroup/index.d.ts +1 -1
- package/components/Button/Button.js +1 -1
- package/components/Button/constants.d.ts +1 -0
- package/components/Button/constants.js +1 -0
- package/components/DashboardLayout/DashboardWrapper/styles.js +1 -1
- package/components/DashboardLayout/Header/styles.js +1 -1
- package/components/DashboardSidebar/styles.js +1 -1
- package/components/DataGridPaginationContainer/styles.js +1 -1
- package/components/PageAside/styles.js +4 -1
- package/components/PageAsideBlock/styles.js +4 -0
- package/components/PageContent/styles.js +1 -1
- package/components/PageHeader/HeaderContent/HeaderContent.js +1 -1
- package/components/PageHeader/HeaderContent/styles.js +7 -2
- package/components/PageHeader/PageActions/PageActions.d.ts +1 -0
- package/components/PageHeader/PageActions/PageActions.js +3 -7
- package/components/PageHeader/PageActions/constants.d.ts +3 -0
- package/components/PageHeader/PageActions/constants.js +3 -0
- package/components/PageHeader/PageActions/styles.d.ts +11 -1
- package/components/PageHeader/PageActions/styles.js +39 -4
- package/components/PageHeader/PageActions/types.d.ts +4 -0
- package/components/PageHeader/PageActions/useLogic/useLogic.d.ts +4 -3
- package/components/PageHeader/PageActions/useLogic/useLogic.js +38 -3
- package/components/PageHeader/styles.js +1 -1
- package/components/PageLayoutFooter/styles.js +5 -1
- package/components/PagePinnableAside/styles.js +2 -2
- package/components/SearchField/SearchField.js +5 -1
- package/components/SearchField/constants.d.ts +3 -0
- package/components/SearchField/constants.js +4 -0
- package/components/SearchField/styles.js +8 -0
- package/components/declaration/mui-material.d.ts +4 -0
- package/components/theme/breakpoints.d.ts +10 -1
- package/components/theme/breakpoints.js +1 -0
- package/hook-form/FormFilters/AllFiltersButton/AllFiltersButton.js +2 -2
- package/hook-form/FormFilters/AllFiltersButton/styles.d.ts +3 -0
- package/hook-form/FormFilters/AllFiltersButton/styles.js +33 -3
- package/hook-form/FormFilters/AllFiltersButton/useLogic/useLogic.js +1 -0
- package/hook-form/FormFilters/FormFiltersSkeleton/styles.js +7 -0
- package/hook-form/FormFilters/constants.d.ts +1 -0
- package/hook-form/FormFilters/constants.js +1 -0
- package/hook-form/FormFilters/styles.js +8 -4
- package/hook-form/FormFiltersSearchField/FormFiltersSearchField.js +4 -3
- package/hook-form/FormFiltersSearchField/constants.d.ts +4 -0
- package/hook-form/FormFiltersSearchField/constants.js +5 -0
- package/hook-form/FormFiltersSearchField/styles.js +60 -1
- package/node/components/ActionGroup/index.d.ts +1 -1
- package/node/components/Button/Button.js +1 -1
- package/node/components/Button/constants.d.ts +1 -0
- package/node/components/Button/constants.js +1 -0
- package/node/components/DashboardLayout/DashboardWrapper/styles.js +1 -1
- package/node/components/DashboardLayout/Header/styles.js +1 -1
- package/node/components/DashboardSidebar/styles.js +1 -1
- package/node/components/DataGridPaginationContainer/styles.js +1 -1
- package/node/components/PageAside/styles.js +4 -1
- package/node/components/PageAsideBlock/styles.js +4 -0
- package/node/components/PageContent/styles.js +1 -1
- package/node/components/PageHeader/HeaderContent/HeaderContent.js +1 -1
- package/node/components/PageHeader/HeaderContent/styles.js +7 -2
- package/node/components/PageHeader/PageActions/PageActions.d.ts +1 -0
- package/node/components/PageHeader/PageActions/PageActions.js +2 -6
- package/node/components/PageHeader/PageActions/constants.d.ts +3 -0
- package/node/components/PageHeader/PageActions/constants.js +4 -1
- package/node/components/PageHeader/PageActions/styles.d.ts +11 -1
- package/node/components/PageHeader/PageActions/styles.js +39 -4
- package/node/components/PageHeader/PageActions/types.d.ts +4 -0
- package/node/components/PageHeader/PageActions/useLogic/useLogic.d.ts +4 -3
- package/node/components/PageHeader/PageActions/useLogic/useLogic.js +36 -1
- package/node/components/PageHeader/styles.js +1 -1
- package/node/components/PageLayoutFooter/styles.js +4 -0
- package/node/components/PagePinnableAside/styles.js +2 -2
- package/node/components/SearchField/SearchField.js +5 -1
- package/node/components/SearchField/constants.d.ts +3 -0
- package/node/components/SearchField/constants.js +7 -0
- package/node/components/SearchField/styles.js +8 -0
- package/node/components/theme/breakpoints.d.ts +10 -1
- package/node/components/theme/breakpoints.js +1 -0
- package/node/hook-form/FormFilters/AllFiltersButton/AllFiltersButton.js +1 -1
- package/node/hook-form/FormFilters/AllFiltersButton/styles.d.ts +3 -0
- package/node/hook-form/FormFilters/AllFiltersButton/styles.js +41 -11
- package/node/hook-form/FormFilters/AllFiltersButton/useLogic/useLogic.js +1 -0
- package/node/hook-form/FormFilters/FormFiltersSkeleton/styles.js +7 -0
- package/node/hook-form/FormFilters/constants.d.ts +1 -0
- package/node/hook-form/FormFilters/constants.js +1 -0
- package/node/hook-form/FormFilters/styles.js +8 -4
- package/node/hook-form/FormFiltersSearchField/FormFiltersSearchField.js +3 -2
- package/node/hook-form/FormFiltersSearchField/constants.d.ts +4 -0
- package/node/hook-form/FormFiltersSearchField/constants.js +6 -1
- package/node/hook-form/FormFiltersSearchField/styles.js +60 -1
- package/package.json +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.searchFieldClassnames = void 0;
|
|
4
|
+
const createUIKitClassname_1 = require("../utils/createUIKitClassname");
|
|
5
|
+
exports.searchFieldClassnames = {
|
|
6
|
+
endAdornmentVisible: (0, createUIKitClassname_1.createUIKitClassname)('search-field__end-adornment_visible'),
|
|
7
|
+
};
|
|
@@ -5,6 +5,7 @@ const SearchOutlineMd_1 = require("../../icons/SearchOutlineMd");
|
|
|
5
5
|
const IconButton_1 = require("../IconButton");
|
|
6
6
|
const Loader_1 = require("../Loader");
|
|
7
7
|
const styled_1 = require("../styled");
|
|
8
|
+
const constants_1 = require("./constants");
|
|
8
9
|
exports.SearchIcon = (0, styled_1.styled)(SearchOutlineMd_1.SearchOutlineMd) `
|
|
9
10
|
/* Задается чтобы клик по startAdornment приводил к клику в инпут */
|
|
10
11
|
pointer-events: none;
|
|
@@ -35,8 +36,15 @@ exports.LoaderWrapper = styled_1.styled.div `
|
|
|
35
36
|
height: 100%;
|
|
36
37
|
`;
|
|
37
38
|
exports.EndAdornmentWrapper = styled_1.styled.div `
|
|
39
|
+
/* Задается чтобы клик по endAdornment приводил к клику в инпут */
|
|
40
|
+
pointer-events: none;
|
|
41
|
+
|
|
38
42
|
display: flex;
|
|
39
43
|
align-items: center;
|
|
44
|
+
|
|
45
|
+
&.${constants_1.searchFieldClassnames.endAdornmentVisible} {
|
|
46
|
+
pointer-events: unset;
|
|
47
|
+
}
|
|
40
48
|
`;
|
|
41
49
|
exports.StyledLoader = (0, styled_1.styled)(Loader_1.Loader) `
|
|
42
50
|
width: 20px;
|
|
@@ -1,2 +1,11 @@
|
|
|
1
1
|
import type { BreakpointsOptions } from '@mui/material/styles';
|
|
2
|
-
export declare const defaultBreakpoints: BreakpointsOptions
|
|
2
|
+
export declare const defaultBreakpoints: BreakpointsOptions & {
|
|
3
|
+
values: {
|
|
4
|
+
xs: number;
|
|
5
|
+
sm: number;
|
|
6
|
+
md: number;
|
|
7
|
+
lg: number;
|
|
8
|
+
laptop: number;
|
|
9
|
+
xl: number;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -9,6 +9,6 @@ const styles_1 = require("./styles");
|
|
|
9
9
|
const useLogic_1 = require("./useLogic");
|
|
10
10
|
const AllFiltersButton = (props) => {
|
|
11
11
|
const { allFiltersButtonClassName, counter, onOpenModal } = (0, useLogic_1.useLogic)(props);
|
|
12
|
-
return ((0, jsx_runtime_1.jsx)(styles_1.AllFiltersButtonWrapper, { className: allFiltersButtonClassName, children: (0, jsx_runtime_1.jsx)(styles_1.StyledBadge, { color: "error", badgeContent: counter, variant: "dot", children: (0, jsx_runtime_1.jsx)(Button_1.Button, { onClick: onOpenModal, variant: "outlined", color: "grey", startIcon: (0, jsx_runtime_1.jsx)(Filter2OutlineMd_1.Filter2OutlineMd, {}), endIcon: counter ? (0, jsx_runtime_1.jsx)(styles_1.StyledCounter, { color: "error", content: counter }) : null, className: constants_1.formFiltersClassnames.allFiltersButton, children: "\u0412\u0441\u0435 \u0444\u0438\u043B\u044C\u0442\u0440\u044B" }) }) }));
|
|
12
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.AllFiltersButtonWrapper, { className: allFiltersButtonClassName, children: (0, jsx_runtime_1.jsx)(styles_1.StyledBadge, { color: "error", badgeContent: counter, variant: "dot", children: (0, jsx_runtime_1.jsx)(styles_1.StyledTooltip, { title: "\u0424\u0438\u043B\u044C\u0442\u0440\u044B", enterDelay: 400, enterNextDelay: 400, placement: "bottom-end", children: (0, jsx_runtime_1.jsx)(Button_1.Button, { onClick: onOpenModal, variant: "outlined", color: "grey", startIcon: (0, jsx_runtime_1.jsx)(Filter2OutlineMd_1.Filter2OutlineMd, {}), endIcon: counter ? (0, jsx_runtime_1.jsx)(styles_1.StyledCounter, { color: "error", content: counter }) : null, className: constants_1.formFiltersClassnames.allFiltersButton, children: "\u0412\u0441\u0435 \u0444\u0438\u043B\u044C\u0442\u0440\u044B" }) }) }) }));
|
|
13
13
|
};
|
|
14
14
|
exports.AllFiltersButton = AllFiltersButton;
|
|
@@ -3,6 +3,9 @@ export declare const AllFiltersButtonWrapper: import("@emotion/styled/dist/decla
|
|
|
3
3
|
theme?: import("@emotion/react").Theme | undefined;
|
|
4
4
|
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
5
5
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
|
+
export declare const StyledTooltip: import("@emotion/styled/dist/declarations/src/types").StyledComponent<Omit<import("../../../components/Tooltip").TooltipProps, "ref"> & import("react").RefAttributes<HTMLDivElement> & {
|
|
7
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
8
|
+
}, {}, {}>;
|
|
6
9
|
export declare const StyledBadge: import("@emotion/styled/dist/declarations/src/types").StyledComponent<Omit<import("../../..").WithoutEmotionSpecific<import("@mui/material/Badge").BadgeProps>, "color"> & {
|
|
7
10
|
color: import("../../../components/Badge").BadgeColor;
|
|
8
11
|
withBorder?: boolean | undefined;
|
|
@@ -1,36 +1,55 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StyledCounter = exports.StyledBadge = exports.AllFiltersButtonWrapper = void 0;
|
|
3
|
+
exports.StyledCounter = exports.StyledBadge = exports.StyledTooltip = exports.AllFiltersButtonWrapper = void 0;
|
|
4
4
|
const Badge_1 = require("@mui/material/Badge");
|
|
5
|
+
const Tooltip_1 = require("@mui/material/Tooltip");
|
|
5
6
|
const Badge_2 = require("../../../components/Badge");
|
|
7
|
+
const constants_1 = require("../../../components/Button/constants");
|
|
6
8
|
const Counter_1 = require("../../../components/Counter");
|
|
7
9
|
const styled_1 = require("../../../components/styled");
|
|
8
|
-
const
|
|
10
|
+
const Tooltip_2 = require("../../../components/Tooltip");
|
|
11
|
+
const constants_2 = require("../constants");
|
|
9
12
|
exports.AllFiltersButtonWrapper = styled_1.styled.div `
|
|
10
13
|
display: none;
|
|
11
14
|
|
|
12
15
|
white-space: nowrap;
|
|
13
16
|
|
|
14
|
-
&.${
|
|
17
|
+
&.${constants_2.formFiltersClassnames.showAllFiltersButtonOnDesktop} {
|
|
15
18
|
display: flex;
|
|
16
19
|
}
|
|
17
20
|
|
|
21
|
+
${({ theme }) => theme.breakpoints.between('sm', 'laptop')} {
|
|
22
|
+
&.${constants_2.formFiltersClassnames.showAllFiltersButtonOnLaptop} {
|
|
23
|
+
display: flex;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.${constants_2.formFiltersClassnames.allFiltersButton} {
|
|
27
|
+
padding: ${({ theme }) => theme.microSpacing(0, 3)};
|
|
28
|
+
|
|
29
|
+
font-size: 0;
|
|
30
|
+
|
|
31
|
+
&.${constants_1.buttonClassnames.root} {
|
|
32
|
+
gap: 0;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
18
37
|
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
19
38
|
margin-right: 0;
|
|
20
|
-
&.${
|
|
39
|
+
&.${constants_2.formFiltersClassnames.showAllFiltersButtonOnMobile} {
|
|
21
40
|
display: flex;
|
|
22
41
|
}
|
|
23
42
|
|
|
24
|
-
&.${
|
|
43
|
+
&.${constants_2.formFiltersClassnames.withoutSearch} {
|
|
25
44
|
width: 100%;
|
|
26
45
|
|
|
27
|
-
.${
|
|
46
|
+
.${constants_2.formFiltersClassnames.allFiltersButton} {
|
|
28
47
|
width: 100%;
|
|
29
48
|
}
|
|
30
49
|
}
|
|
31
50
|
|
|
32
|
-
&.${
|
|
33
|
-
.${
|
|
51
|
+
&.${constants_2.formFiltersClassnames.withSearch} {
|
|
52
|
+
.${constants_2.formFiltersClassnames.allFiltersButton} {
|
|
34
53
|
display: unset;
|
|
35
54
|
gap: 0;
|
|
36
55
|
|
|
@@ -41,16 +60,27 @@ exports.AllFiltersButtonWrapper = styled_1.styled.div `
|
|
|
41
60
|
}
|
|
42
61
|
}
|
|
43
62
|
`;
|
|
63
|
+
exports.StyledTooltip = (0, styled_1.styled)(Tooltip_2.Tooltip) `
|
|
64
|
+
& .${Tooltip_1.tooltipClasses.tooltip} {
|
|
65
|
+
${({ theme }) => theme.breakpoints.up('laptop')} {
|
|
66
|
+
display: none;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
`;
|
|
44
70
|
exports.StyledBadge = (0, styled_1.styled)(Badge_2.Badge) `
|
|
45
|
-
width: 100%;
|
|
71
|
+
width: 100%;
|
|
72
|
+
|
|
46
73
|
.${Badge_1.badgeClasses.dot} {
|
|
47
|
-
|
|
74
|
+
top: ${({ theme }) => theme.spacing(1)};
|
|
75
|
+
right: ${({ theme }) => theme.spacing(1)};
|
|
76
|
+
|
|
77
|
+
${({ theme }) => theme.breakpoints.up('laptop')} {
|
|
48
78
|
display: none;
|
|
49
79
|
}
|
|
50
80
|
}
|
|
51
81
|
`;
|
|
52
82
|
exports.StyledCounter = (0, styled_1.styled)(Counter_1.Counter) `
|
|
53
|
-
${({ theme }) => theme.breakpoints.down('
|
|
83
|
+
${({ theme }) => theme.breakpoints.down('laptop')} {
|
|
54
84
|
display: none;
|
|
55
85
|
}
|
|
56
86
|
`;
|
|
@@ -23,6 +23,7 @@ const useLogic = ({ form, onOpenModal, hasMainFilters, hasSecondaryFilters, hasS
|
|
|
23
23
|
const allFiltersButtonClassName = (0, react_1.useMemo)(() => {
|
|
24
24
|
return (0, classNames_1.classNames)({
|
|
25
25
|
[constants_2.formFiltersClassnames.showAllFiltersButtonOnDesktop]: hasSecondaryFilters,
|
|
26
|
+
[constants_2.formFiltersClassnames.showAllFiltersButtonOnLaptop]: hasMainFilters || hasSecondaryFilters,
|
|
26
27
|
[constants_2.formFiltersClassnames.showAllFiltersButtonOnMobile]: hasMainFilters || hasSecondaryFilters,
|
|
27
28
|
[constants_2.formFiltersClassnames.withSearch]: hasSearch,
|
|
28
29
|
[constants_2.formFiltersClassnames.withoutSearch]: !hasSearch,
|
|
@@ -10,6 +10,13 @@ exports.SkeletonWrapper = styled_1.styled.div `
|
|
|
10
10
|
|
|
11
11
|
margin-top: ${({ theme }) => theme.spacing(4)};
|
|
12
12
|
|
|
13
|
+
${({ theme }) => theme.breakpoints.between('sm', 'laptop')} {
|
|
14
|
+
grid-template-columns: 72px 0 0 0;
|
|
15
|
+
gap: 0;
|
|
16
|
+
|
|
17
|
+
margin: ${({ theme }) => theme.spacing(0, 2, 0)};
|
|
18
|
+
}
|
|
19
|
+
|
|
13
20
|
.${Skeleton_1.skeletonClasses.root} {
|
|
14
21
|
height: 32px;
|
|
15
22
|
}
|
|
@@ -7,6 +7,7 @@ exports.formFiltersClassnames = {
|
|
|
7
7
|
submitButton: (0, createUIKitClassname_1.createUIKitClassname)('form-filters__submit-button'),
|
|
8
8
|
allFiltersButton: (0, createUIKitClassname_1.createUIKitClassname)('form-filters__all-filters-button'),
|
|
9
9
|
showAllFiltersButtonOnDesktop: (0, createUIKitClassname_1.createUIKitClassname)('form-filters_show-all-filters-button_desktop'),
|
|
10
|
+
showAllFiltersButtonOnLaptop: (0, createUIKitClassname_1.createUIKitClassname)('form-filters_show-all-filters-button_laptop'),
|
|
10
11
|
showAllFiltersButtonOnMobile: (0, createUIKitClassname_1.createUIKitClassname)('form-filters_show-all-filters-button_mobile'),
|
|
11
12
|
withSearch: (0, createUIKitClassname_1.createUIKitClassname)('form-filters_with-search'),
|
|
12
13
|
withoutSearch: (0, createUIKitClassname_1.createUIKitClassname)('form-filters_without-search'),
|
|
@@ -16,9 +16,13 @@ exports.Wrapper = styled_1.styled.div `
|
|
|
16
16
|
.${FormLabel_1.formLabelClasses.root} {
|
|
17
17
|
display: none;
|
|
18
18
|
}
|
|
19
|
+
|
|
20
|
+
${({ theme }) => theme.breakpoints.down('laptop')} {
|
|
21
|
+
margin-top: 0;
|
|
22
|
+
padding-right: ${({ theme }) => theme.spacing(2)};
|
|
23
|
+
}
|
|
19
24
|
|
|
20
25
|
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
21
|
-
margin-top: 0;
|
|
22
26
|
padding: ${({ theme }) => theme.spacing(1, 4, 5, 4)};
|
|
23
27
|
|
|
24
28
|
font-size: 0;
|
|
@@ -40,14 +44,14 @@ exports.MainFiltersWrapper = styled_1.styled.div `
|
|
|
40
44
|
|
|
41
45
|
width: 100%;
|
|
42
46
|
|
|
43
|
-
${({ theme }) => theme.breakpoints.down('
|
|
47
|
+
${({ theme }) => theme.breakpoints.down('laptop')} {
|
|
44
48
|
display: none;
|
|
45
49
|
}
|
|
46
50
|
`;
|
|
47
51
|
exports.SubmitButtonWrapper = styled_1.styled.div `
|
|
48
52
|
white-space: nowrap;
|
|
49
53
|
|
|
50
|
-
${({ theme }) => theme.breakpoints.down('
|
|
51
|
-
display:
|
|
54
|
+
${({ theme }) => theme.breakpoints.down('laptop')} {
|
|
55
|
+
display: none;
|
|
52
56
|
}
|
|
53
57
|
`;
|
|
@@ -8,13 +8,14 @@ const useFormFieldProps_1 = require("../useFormFieldProps");
|
|
|
8
8
|
const constants_1 = require("./constants");
|
|
9
9
|
const styles_1 = require("./styles");
|
|
10
10
|
/**
|
|
11
|
-
* Адаптер для SearchField
|
|
11
|
+
* Адаптер для SearchField для использования в FormFilters
|
|
12
12
|
*/
|
|
13
13
|
function FormFiltersSearchFieldInner({ width, ...props }, ref) {
|
|
14
14
|
const fieldProps = (0, useFormFieldProps_1.useFormFieldProps)({
|
|
15
15
|
...props,
|
|
16
16
|
defaultValue: props.defaultValue || '',
|
|
17
17
|
});
|
|
18
|
-
|
|
18
|
+
const hasValue = Boolean(fieldProps.value);
|
|
19
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.Wrapper, { "$width": width, className: hasValue ? constants_1.formFiltersSearchFieldClassnames.hasValue : '', children: (0, jsx_runtime_1.jsx)(SearchField_1.SearchField, { ...fieldProps, ref: ref, inputProps: { id: constants_1.FORM_FILTERS_SEARCH_FIELD_ID }, fullWidth: true }) }));
|
|
19
20
|
}
|
|
20
21
|
exports.FormFiltersSearchField = (0, forwardRefWithGeneric_1.forwardRefWithGeneric)(FormFiltersSearchFieldInner);
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FORM_FILTERS_SEARCH_FIELD_ID = void 0;
|
|
3
|
+
exports.DEFAULT_SEARCH_FIELD_WIDTH = exports.formFiltersSearchFieldClassnames = exports.FORM_FILTERS_SEARCH_FIELD_ID = void 0;
|
|
4
|
+
const createUIKitClassname_1 = require("../../components/utils/createUIKitClassname");
|
|
4
5
|
exports.FORM_FILTERS_SEARCH_FIELD_ID = 'form-filters-search-field';
|
|
6
|
+
exports.formFiltersSearchFieldClassnames = {
|
|
7
|
+
hasValue: (0, createUIKitClassname_1.createUIKitClassname)('form-filters-search-field__has-value'),
|
|
8
|
+
};
|
|
9
|
+
exports.DEFAULT_SEARCH_FIELD_WIDTH = '240px';
|
|
@@ -1,9 +1,68 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Wrapper = void 0;
|
|
4
|
+
const FormControl_1 = require("@mui/material/FormControl");
|
|
5
|
+
const InputBase_1 = require("@mui/material/InputBase");
|
|
6
|
+
const OutlinedInput_1 = require("@mui/material/OutlinedInput");
|
|
7
|
+
const SvgIcon_1 = require("../../components/SvgIcon");
|
|
4
8
|
const styled_1 = require("../../components/styled");
|
|
9
|
+
const constants_1 = require("./constants");
|
|
5
10
|
exports.Wrapper = styled_1.styled.div `
|
|
6
|
-
min-width: ${({ $width }) => $width ||
|
|
11
|
+
min-width: ${({ $width }) => $width || constants_1.DEFAULT_SEARCH_FIELD_WIDTH};
|
|
12
|
+
|
|
13
|
+
${({ theme }) => theme.breakpoints.between('sm', 'laptop')} {
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
|
|
16
|
+
width: ${({ $width }) => $width || constants_1.DEFAULT_SEARCH_FIELD_WIDTH};
|
|
17
|
+
min-width: unset;
|
|
18
|
+
|
|
19
|
+
transition: ${({ theme }) => theme.transitions.create(['width', 'padding'], {
|
|
20
|
+
duration: theme.transitions.duration.shorter,
|
|
21
|
+
easing: theme.transitions.easing.easeInOut,
|
|
22
|
+
delay: theme.transitions.duration.shorter,
|
|
23
|
+
})};
|
|
24
|
+
|
|
25
|
+
.${FormControl_1.formControlClasses.root} {
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: row-reverse;
|
|
28
|
+
|
|
29
|
+
width: 100%;
|
|
30
|
+
min-width: 32px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.${OutlinedInput_1.outlinedInputClasses.root} {
|
|
34
|
+
transition: ${({ theme }) => theme.transitions.create(['width', 'padding'], {
|
|
35
|
+
duration: theme.transitions.duration.shorter,
|
|
36
|
+
easing: theme.transitions.easing.easeInOut,
|
|
37
|
+
delay: theme.transitions.duration.shorter,
|
|
38
|
+
})};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.${SvgIcon_1.svgIconClassnames.root} {
|
|
42
|
+
transition: ${({ theme }) => theme.transitions.create(['fill'], {
|
|
43
|
+
duration: theme.transitions.duration.shorter,
|
|
44
|
+
easing: theme.transitions.easing.easeInOut,
|
|
45
|
+
delay: theme.transitions.duration.shorter,
|
|
46
|
+
})};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&:not(:hover, :focus-within):not(.${constants_1.formFiltersSearchFieldClassnames.hasValue}) {
|
|
50
|
+
width: 32px;
|
|
51
|
+
|
|
52
|
+
.${SvgIcon_1.svgIconClassnames.root} {
|
|
53
|
+
fill: ${({ theme }) => theme.palette.grey[800]};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.${OutlinedInput_1.outlinedInputClasses.root} {
|
|
57
|
+
padding: ${({ theme }) => theme.microSpacing(1, 3)};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.${InputBase_1.inputBaseClasses.input} {
|
|
61
|
+
width: 0;
|
|
62
|
+
min-width: 0;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
7
66
|
|
|
8
67
|
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
9
68
|
width: 100%;
|