@astral/ui 4.26.0 → 4.26.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.
@@ -13,5 +13,5 @@ export const HeaderContent = ({ backButton, description, subheader, breadcrumbs,
13
13
  }
14
14
  return (_jsx(BreadcrumbsWrapper, { children: Array.isArray(breadcrumbs) ? (_jsx(Breadcrumbs, { children: breadcrumbs })) : (breadcrumbs) }));
15
15
  };
16
- return (_jsxs(_Fragment, { children: [renderBreadcrumbs(), _jsx(DesktopTitleWrapper, { children: _jsx(Title, { backButton: backButton, title: title, isLoading: isLoading, hasDescription: Boolean(description), hasBreadcrumbs: Boolean(breadcrumbs) }) }), _jsx(Description, { description: description, isLoading: isLoading }), actions && (_jsx(PageActions, { className: classNames(pageHeaderClassnames.pageHeaderActions), isLoading: isLoading, size: "medium", ...actions })), subheader && _jsx(PageSubheader, { children: subheader }), filters && _jsx(PageFilters, { children: filters })] }));
16
+ return (_jsxs(_Fragment, { children: [renderBreadcrumbs(), _jsx(DesktopTitleWrapper, { children: _jsx(Title, { backButton: backButton, title: title, isLoading: isLoading, hasDescription: Boolean(description), hasBreadcrumbs: Boolean(breadcrumbs) }) }), _jsx(Description, { description: description, isLoading: isLoading }), actions && (_jsx(PageActions, { className: classNames(pageHeaderClassnames.pageHeaderActions), isLoading: isLoading, size: "medium", ...actions })), filters && _jsx(PageFilters, { children: filters }), subheader && _jsx(PageSubheader, { children: subheader })] }));
17
17
  };
@@ -6,7 +6,7 @@ import { FormControlProvider } from '../FormControlProvider';
6
6
  import { formFiltersClassnames } from './constants';
7
7
  import { FormFiltersDialog } from './FormFiltersDialog';
8
8
  import { FormFiltersSkeleton } from './FormFiltersSkeleton';
9
- import { AllFiltersButtonWrapper, MainFiltersWrapper, StyledBadge, StyledCounter, Wrapper, } from './styles';
9
+ import { AllFiltersButtonWrapper, MainFiltersWrapper, StyledBadge, StyledCounter, SubmitButtonWrapper, Wrapper, } from './styles';
10
10
  import { useLogic } from './useLogic';
11
11
  /**
12
12
  * Компонент для отображения фильтров формы
@@ -16,5 +16,5 @@ export const FormFilters = (props) => {
16
16
  if (isLoading) {
17
17
  return _jsx(FormFiltersSkeleton, {});
18
18
  }
19
- return (_jsxs(_Fragment, { children: [_jsx(FormControlProvider, { size: "small", hideHelperText: true, children: _jsx(Form, { form: headerForm, onSubmit: headerForm.handleSubmit(onSubmit), children: _jsxs(Wrapper, { children: [SearchField && (_jsx(SearchField, { control: headerForm.control, fullWidth: true })), _jsx(AllFiltersButtonWrapper, { className: allFiltersButtonClassName, children: _jsx(StyledBadge, { color: "error", badgeContent: counter, variant: "dot", children: _jsx(Button, { onClick: onOpenModal, variant: "outlined", color: "grey", startIcon: _jsx(Filter2OutlineMd, {}), endIcon: counter ? (_jsx(StyledCounter, { color: "error", content: counter })) : null, className: formFiltersClassnames.allFiltersButton, children: "\u0412\u0441\u0435 \u0444\u0438\u043B\u044C\u0442\u0440\u044B" }) }) }), _jsx(MainFiltersWrapper, { className: formFiltersClassnames.pageHeaderFilters, columns: mainFiltersColumns, children: MainFilters && (_jsx(MainFilters, { control: headerForm.control, isModal: false })) }), SubmitButton && (_jsx(SubmitButton, { size: "medium", className: formFiltersClassnames.submitButton }))] }) }) }), _jsx(FormFiltersDialog, { ...dialogProps })] }));
19
+ return (_jsxs(_Fragment, { children: [_jsx(FormControlProvider, { size: "small", hideHelperText: true, children: _jsx(Form, { form: headerForm, onSubmit: headerForm.handleSubmit(onSubmit), children: _jsxs(Wrapper, { children: [SearchField && (_jsx(SearchField, { control: headerForm.control, fullWidth: true })), _jsx(AllFiltersButtonWrapper, { className: allFiltersButtonClassName, children: _jsx(StyledBadge, { color: "error", badgeContent: counter, variant: "dot", children: _jsx(Button, { onClick: onOpenModal, variant: "outlined", color: "grey", startIcon: _jsx(Filter2OutlineMd, {}), endIcon: counter ? (_jsx(StyledCounter, { color: "error", content: counter })) : null, className: formFiltersClassnames.allFiltersButton, children: "\u0412\u0441\u0435 \u0444\u0438\u043B\u044C\u0442\u0440\u044B" }) }) }), _jsx(MainFiltersWrapper, { className: formFiltersClassnames.pageHeaderFilters, columns: mainFiltersColumns, children: MainFilters && (_jsx(MainFilters, { control: headerForm.control, isModal: false })) }), SubmitButton && (_jsx(SubmitButtonWrapper, { children: _jsx(SubmitButton, { size: "medium", className: formFiltersClassnames.submitButton }) }))] }) }) }), _jsx(FormFiltersDialog, { ...dialogProps })] }));
20
20
  };
@@ -27,3 +27,7 @@ export declare const StyledCounter: import("../../components/styled").StyledComp
27
27
  } & {
28
28
  theme?: import("@emotion/react").Theme | undefined;
29
29
  }, {}, {}>;
30
+ export declare const SubmitButtonWrapper: import("../../components/styled").StyledComponent<{
31
+ theme?: import("@emotion/react").Theme | undefined;
32
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
33
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -88,7 +88,14 @@ export const StyledBadge = styled(Badge) `
88
88
  }
89
89
  `;
90
90
  export const StyledCounter = styled(Counter) `
91
- ${({ theme }) => theme.breakpoints.down('sm')} {
91
+ ${({ theme }) => theme.breakpoints.down('sm')} {
92
92
  display: none;
93
93
  }
94
94
  `;
95
+ export const SubmitButtonWrapper = styled.div `
96
+ white-space: nowrap;
97
+
98
+ ${({ theme }) => theme.breakpoints.down('sm')} {
99
+ display: contents;
100
+ }
101
+ `;
@@ -16,6 +16,6 @@ const HeaderContent = ({ backButton, description, subheader, breadcrumbs, action
16
16
  }
17
17
  return ((0, jsx_runtime_1.jsx)(styles_1.BreadcrumbsWrapper, { children: Array.isArray(breadcrumbs) ? ((0, jsx_runtime_1.jsx)(Breadcrumbs_1.Breadcrumbs, { children: breadcrumbs })) : (breadcrumbs) }));
18
18
  };
19
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [renderBreadcrumbs(), (0, jsx_runtime_1.jsx)(styles_1.DesktopTitleWrapper, { children: (0, jsx_runtime_1.jsx)(Title_1.Title, { backButton: backButton, title: title, isLoading: isLoading, hasDescription: Boolean(description), hasBreadcrumbs: Boolean(breadcrumbs) }) }), (0, jsx_runtime_1.jsx)(Description_1.Description, { description: description, isLoading: isLoading }), actions && ((0, jsx_runtime_1.jsx)(PageActions_1.PageActions, { className: (0, classNames_1.classNames)(constants_1.pageHeaderClassnames.pageHeaderActions), isLoading: isLoading, size: "medium", ...actions })), subheader && (0, jsx_runtime_1.jsx)(styles_1.PageSubheader, { children: subheader }), filters && (0, jsx_runtime_1.jsx)(styles_1.PageFilters, { children: filters })] }));
19
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [renderBreadcrumbs(), (0, jsx_runtime_1.jsx)(styles_1.DesktopTitleWrapper, { children: (0, jsx_runtime_1.jsx)(Title_1.Title, { backButton: backButton, title: title, isLoading: isLoading, hasDescription: Boolean(description), hasBreadcrumbs: Boolean(breadcrumbs) }) }), (0, jsx_runtime_1.jsx)(Description_1.Description, { description: description, isLoading: isLoading }), actions && ((0, jsx_runtime_1.jsx)(PageActions_1.PageActions, { className: (0, classNames_1.classNames)(constants_1.pageHeaderClassnames.pageHeaderActions), isLoading: isLoading, size: "medium", ...actions })), filters && (0, jsx_runtime_1.jsx)(styles_1.PageFilters, { children: filters }), subheader && (0, jsx_runtime_1.jsx)(styles_1.PageSubheader, { children: subheader })] }));
20
20
  };
21
21
  exports.HeaderContent = HeaderContent;
@@ -19,6 +19,6 @@ const FormFilters = (props) => {
19
19
  if (isLoading) {
20
20
  return (0, jsx_runtime_1.jsx)(FormFiltersSkeleton_1.FormFiltersSkeleton, {});
21
21
  }
22
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(FormControlProvider_1.FormControlProvider, { size: "small", hideHelperText: true, children: (0, jsx_runtime_1.jsx)(Form_1.Form, { form: headerForm, onSubmit: headerForm.handleSubmit(onSubmit), children: (0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { children: [SearchField && ((0, jsx_runtime_1.jsx)(SearchField, { control: headerForm.control, fullWidth: true })), (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" }) }) }), (0, jsx_runtime_1.jsx)(styles_1.MainFiltersWrapper, { className: constants_1.formFiltersClassnames.pageHeaderFilters, columns: mainFiltersColumns, children: MainFilters && ((0, jsx_runtime_1.jsx)(MainFilters, { control: headerForm.control, isModal: false })) }), SubmitButton && ((0, jsx_runtime_1.jsx)(SubmitButton, { size: "medium", className: constants_1.formFiltersClassnames.submitButton }))] }) }) }), (0, jsx_runtime_1.jsx)(FormFiltersDialog_1.FormFiltersDialog, { ...dialogProps })] }));
22
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(FormControlProvider_1.FormControlProvider, { size: "small", hideHelperText: true, children: (0, jsx_runtime_1.jsx)(Form_1.Form, { form: headerForm, onSubmit: headerForm.handleSubmit(onSubmit), children: (0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { children: [SearchField && ((0, jsx_runtime_1.jsx)(SearchField, { control: headerForm.control, fullWidth: true })), (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" }) }) }), (0, jsx_runtime_1.jsx)(styles_1.MainFiltersWrapper, { className: constants_1.formFiltersClassnames.pageHeaderFilters, columns: mainFiltersColumns, children: MainFilters && ((0, jsx_runtime_1.jsx)(MainFilters, { control: headerForm.control, isModal: false })) }), SubmitButton && ((0, jsx_runtime_1.jsx)(styles_1.SubmitButtonWrapper, { children: (0, jsx_runtime_1.jsx)(SubmitButton, { size: "medium", className: constants_1.formFiltersClassnames.submitButton }) }))] }) }) }), (0, jsx_runtime_1.jsx)(FormFiltersDialog_1.FormFiltersDialog, { ...dialogProps })] }));
23
23
  };
24
24
  exports.FormFilters = FormFilters;
@@ -27,3 +27,7 @@ export declare const StyledCounter: import("@emotion/styled/dist/declarations/sr
27
27
  } & {
28
28
  theme?: import("@emotion/react").Theme | undefined;
29
29
  }, {}, {}>;
30
+ export declare const SubmitButtonWrapper: import("@emotion/styled/dist/declarations/src/types").StyledComponent<{
31
+ theme?: import("@emotion/react").Theme | undefined;
32
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
33
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StyledCounter = exports.StyledBadge = exports.MainFiltersWrapper = exports.AllFiltersButtonWrapper = exports.Wrapper = void 0;
3
+ exports.SubmitButtonWrapper = exports.StyledCounter = exports.StyledBadge = exports.MainFiltersWrapper = exports.AllFiltersButtonWrapper = exports.Wrapper = void 0;
4
4
  const Badge_1 = require("@mui/material/Badge");
5
5
  const FormLabel_1 = require("@mui/material/FormLabel");
6
6
  const InputBase_1 = require("@mui/material/InputBase");
@@ -91,7 +91,14 @@ exports.StyledBadge = (0, styled_1.styled)(Badge_2.Badge) `
91
91
  }
92
92
  `;
93
93
  exports.StyledCounter = (0, styled_1.styled)(Counter_1.Counter) `
94
- ${({ theme }) => theme.breakpoints.down('sm')} {
94
+ ${({ theme }) => theme.breakpoints.down('sm')} {
95
95
  display: none;
96
96
  }
97
97
  `;
98
+ exports.SubmitButtonWrapper = styled_1.styled.div `
99
+ white-space: nowrap;
100
+
101
+ ${({ theme }) => theme.breakpoints.down('sm')} {
102
+ display: contents;
103
+ }
104
+ `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astral/ui",
3
- "version": "4.26.0",
3
+ "version": "4.26.1",
4
4
  "browser": "./index.js",
5
5
  "main": "./node/index.js",
6
6
  "dependencies": {