@astral/ui 4.0.0-alpha.31 → 4.0.0-alpha.33

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.
Files changed (55) hide show
  1. package/components/Banner/index.d.ts +3 -3
  2. package/components/Banner/index.js +3 -3
  3. package/components/InfiniteTreeList/InfiniteTreeListItem/useLogic/useLogic.d.ts +1 -1
  4. package/components/InfiniteTreeList/index.d.ts +4 -4
  5. package/components/InfiniteTreeList/index.js +3 -4
  6. package/components/InputGroup/InputGroup.d.ts +3 -0
  7. package/components/InputGroup/InputGroup.js +7 -0
  8. package/components/InputGroup/index.d.ts +2 -0
  9. package/components/InputGroup/index.js +1 -0
  10. package/components/InputGroup/styles.d.ts +7 -0
  11. package/components/InputGroup/styles.js +88 -0
  12. package/components/InputGroup/types.d.ts +10 -0
  13. package/components/InputGroup/types.js +1 -0
  14. package/components/InputGroup/useLogic/index.d.ts +1 -0
  15. package/components/InputGroup/useLogic/index.js +1 -0
  16. package/components/InputGroup/useLogic/useLogic.d.ts +6 -0
  17. package/components/InputGroup/useLogic/useLogic.js +11 -0
  18. package/components/JsonViewer/index.d.ts +1 -1
  19. package/components/JsonViewer/index.js +1 -1
  20. package/components/Notification/index.d.ts +5 -6
  21. package/components/Notification/index.js +4 -6
  22. package/components/PdfViewer/index.d.ts +3 -3
  23. package/components/PdfViewer/index.js +2 -3
  24. package/components/ResizingDataGrid/index.d.ts +3 -3
  25. package/components/ResizingDataGrid/index.js +3 -3
  26. package/components/ResizingDataGridInfinite/index.d.ts +1 -1
  27. package/components/ResizingDataGridInfinite/index.js +1 -1
  28. package/node/components/Banner/index.d.ts +3 -3
  29. package/node/components/Banner/index.js +7 -17
  30. package/node/components/InfiniteTreeList/InfiniteTreeListItem/useLogic/useLogic.d.ts +1 -1
  31. package/node/components/InfiniteTreeList/index.d.ts +4 -4
  32. package/node/components/InfiniteTreeList/index.js +7 -18
  33. package/node/components/InputGroup/InputGroup.d.ts +3 -0
  34. package/node/components/InputGroup/InputGroup.js +11 -0
  35. package/node/components/InputGroup/index.d.ts +2 -0
  36. package/node/components/InputGroup/index.js +17 -0
  37. package/node/components/InputGroup/styles.d.ts +7 -0
  38. package/node/components/InputGroup/styles.js +91 -0
  39. package/node/components/InputGroup/types.d.ts +10 -0
  40. package/node/components/InputGroup/types.js +2 -0
  41. package/node/components/InputGroup/useLogic/index.d.ts +1 -0
  42. package/node/components/InputGroup/useLogic/index.js +17 -0
  43. package/node/components/InputGroup/useLogic/useLogic.d.ts +6 -0
  44. package/node/components/InputGroup/useLogic/useLogic.js +15 -0
  45. package/node/components/JsonViewer/index.d.ts +1 -1
  46. package/node/components/JsonViewer/index.js +3 -15
  47. package/node/components/Notification/index.d.ts +5 -6
  48. package/node/components/Notification/index.js +11 -20
  49. package/node/components/PdfViewer/index.d.ts +3 -3
  50. package/node/components/PdfViewer/index.js +5 -18
  51. package/node/components/ResizingDataGrid/index.d.ts +3 -3
  52. package/node/components/ResizingDataGrid/index.js +7 -17
  53. package/node/components/ResizingDataGridInfinite/index.d.ts +1 -1
  54. package/node/components/ResizingDataGridInfinite/index.js +3 -15
  55. package/package.json +41 -48
@@ -1,3 +1,3 @@
1
- export * from './Banner';
2
- export * from './BannerContainer';
3
- export * from './BannerActionButton';
1
+ export { banner } from './Banner';
2
+ export { BannerContainer } from './BannerContainer';
3
+ export { BannerActionButton, type BannerActionButtonProps, } from './BannerActionButton';
@@ -1,3 +1,3 @@
1
- export * from './Banner';
2
- export * from './BannerContainer';
3
- export * from './BannerActionButton';
1
+ export { banner } from './Banner';
2
+ export { BannerContainer } from './BannerContainer';
3
+ export { BannerActionButton, } from './BannerActionButton';
@@ -2,7 +2,7 @@ import { type MouseEvent } from 'react';
2
2
  import { type TooltipProps } from '../../../Tooltip';
3
3
  import { type InfiniteTreeListItemProps } from '../types';
4
4
  export declare const useLogic: ({ isDisabled, disabledReason, }: InfiniteTreeListItemProps) => {
5
- item: import("../..").FlattenTree<import("../..").InfiniteTreeListData>;
5
+ item: import("../../types").FlattenTree<import("../../types").InfiniteTreeListData>;
6
6
  handleClick: (event: MouseEvent) => void;
7
7
  itemSkeleton: import("react").ReactNode;
8
8
  isDisabled: boolean | undefined;
@@ -1,4 +1,4 @@
1
- export * from './InfiniteTreeList';
2
- export * from './types';
3
- export * from './InfiniteTreeListItem';
4
- export * from './InfiniteTreeListActions';
1
+ export { InfiniteTreeList } from './InfiniteTreeList';
2
+ export type { InfiniteTreeListProps } from './types';
3
+ export { InfiniteTreeListItem, type InfiniteTreeListItemProps, } from './InfiniteTreeListItem';
4
+ export { type InfiniteTreeListActionProps, InfiniteTreeListActions, } from './InfiniteTreeListActions';
@@ -1,4 +1,3 @@
1
- export * from './InfiniteTreeList';
2
- export * from './types';
3
- export * from './InfiniteTreeListItem';
4
- export * from './InfiniteTreeListActions';
1
+ export { InfiniteTreeList } from './InfiniteTreeList';
2
+ export { InfiniteTreeListItem, } from './InfiniteTreeListItem';
3
+ export { InfiniteTreeListActions, } from './InfiniteTreeListActions';
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import type { InputGroupProps } from './types';
3
+ export declare const InputGroup: ({ children, columns }: InputGroupProps) => JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { InputsWrapper } from './styles';
3
+ import { useLogic } from './useLogic';
4
+ export const InputGroup = ({ children, columns }) => {
5
+ const { gridColumnTemplate } = useLogic({ children, columns });
6
+ return (_jsx(InputsWrapper, { "$columnsTemplate": gridColumnTemplate(), children: children }));
7
+ };
@@ -0,0 +1,2 @@
1
+ export * from './InputGroup';
2
+ export type { InputGroupProps } from './types';
@@ -0,0 +1 @@
1
+ export * from './InputGroup';
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ export declare const InputsWrapper: import("@emotion/styled").StyledComponent<{
3
+ theme?: import("@emotion/react").Theme | undefined;
4
+ as?: import("react").ElementType<any> | undefined;
5
+ } & {
6
+ $columnsTemplate: string;
7
+ }, import("react").DetailedHTMLProps<import("react").FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, {}>;
@@ -0,0 +1,88 @@
1
+ import { formControlClasses, inputBaseClasses } from '@mui/material';
2
+ import { styled } from '../styles';
3
+ export const InputsWrapper = styled.fieldset `
4
+ display: grid;
5
+ grid-template-columns: ${({ $columnsTemplate }) => $columnsTemplate};
6
+
7
+ margin-inline: 0;
8
+ padding: 0;
9
+
10
+ border: unset;
11
+
12
+ & .${formControlClasses.root} {
13
+ width: 100%;
14
+
15
+ .${inputBaseClasses.root} {
16
+ position: relative;
17
+ z-index: 2;
18
+
19
+ border-radius: 0;
20
+
21
+ &.${inputBaseClasses.focused} {
22
+ z-index: 4;
23
+ }
24
+ }
25
+ }
26
+
27
+ /* Скругления только крайних инпутов */
28
+ & > :first-child .${inputBaseClasses.root} {
29
+ border-top-left-radius: ${({ theme }) => theme.shape.medium};
30
+ border-bottom-left-radius: ${({ theme }) => theme.shape.medium};
31
+
32
+ &.${inputBaseClasses.disabled} {
33
+ z-index: 1;
34
+
35
+ &::after {
36
+ content: '';
37
+
38
+ position: absolute;
39
+ right: 0;
40
+
41
+ width: 1px;
42
+ height: 100%;
43
+
44
+ background-color: ${({ theme }) => theme.palette.grey[500]};
45
+ }
46
+ }
47
+ }
48
+
49
+ & > :last-child .${inputBaseClasses.root} {
50
+ border-top-right-radius: ${({ theme }) => theme.shape.medium};
51
+ border-bottom-right-radius: ${({ theme }) => theme.shape.medium};
52
+ }
53
+
54
+ & > :not(:first-child) .${inputBaseClasses.root} {
55
+ &.${inputBaseClasses.disabled} {
56
+ z-index: 1;
57
+
58
+
59
+ &::after {
60
+ content: '';
61
+
62
+ position: absolute;
63
+ left: 0;
64
+
65
+ width: 1px;
66
+ height: 100%;
67
+
68
+ background-color: ${({ theme }) => theme.palette.grey[500]};
69
+ }
70
+ }
71
+
72
+ }
73
+
74
+ & > :not(:last-child) .${inputBaseClasses.root} {
75
+ width: auto;
76
+ margin-right: -2px;
77
+
78
+ &:hover {
79
+ z-index: 3;
80
+
81
+ &.${inputBaseClasses.disabled} {
82
+ z-index: 1;
83
+ }
84
+ }
85
+ }
86
+
87
+
88
+ `;
@@ -0,0 +1,10 @@
1
+ import type { ReactNode } from 'react';
2
+ export type InputGroupProps = {
3
+ children: ReactNode;
4
+ /**
5
+ * Определяет шаблон колонок для grid группы инпутов
6
+ * @example
7
+ * columns={['300px', '1fr', '30%]}
8
+ */
9
+ columns?: string[];
10
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './useLogic';
@@ -0,0 +1 @@
1
+ export * from './useLogic';
@@ -0,0 +1,6 @@
1
+ import type { InputGroupProps } from '../types';
2
+ type UseLogicParams = InputGroupProps;
3
+ export declare const useLogic: ({ children, columns }: UseLogicParams) => {
4
+ gridColumnTemplate: () => string;
5
+ };
6
+ export {};
@@ -0,0 +1,11 @@
1
+ import { Children } from 'react';
2
+ export const useLogic = ({ children, columns }) => {
3
+ const gridColumnTemplate = () => {
4
+ if (columns) {
5
+ return columns.join(' ');
6
+ }
7
+ const childrenCount = Children.count(children);
8
+ return `repeat(${childrenCount}, 1fr)`;
9
+ };
10
+ return { gridColumnTemplate };
11
+ };
@@ -1,2 +1,2 @@
1
- export * from './JsonViewer';
1
+ export { JsonViewer } from './JsonViewer';
2
2
  export type { JsonViewerProps } from './types';
@@ -1 +1 @@
1
- export * from './JsonViewer';
1
+ export { JsonViewer } from './JsonViewer';
@@ -1,6 +1,5 @@
1
- export * from './constants';
2
- export * from './NotificationContainer';
3
- export * from './Notification';
4
- export * from './NotificationStackContainer';
5
- export * from './NotificationTemplate';
6
- export * from './types';
1
+ export { NOTIFY_POSITIONS, notifyClassnames, BANNER_CONTAINER_ID, } from './constants';
2
+ export { NotificationContainer } from './NotificationContainer';
3
+ export { notify } from './Notification';
4
+ export { NotificationStackContainer } from './NotificationStackContainer';
5
+ export type { Notify } from './types';
@@ -1,6 +1,4 @@
1
- export * from './constants';
2
- export * from './NotificationContainer';
3
- export * from './Notification';
4
- export * from './NotificationStackContainer';
5
- export * from './NotificationTemplate';
6
- export * from './types';
1
+ export { NOTIFY_POSITIONS, notifyClassnames, BANNER_CONTAINER_ID, } from './constants';
2
+ export { NotificationContainer } from './NotificationContainer';
3
+ export { notify } from './Notification';
4
+ export { NotificationStackContainer } from './NotificationStackContainer';
@@ -1,6 +1,6 @@
1
1
  import { PdfViewer } from './PdfViewer';
2
2
  export default PdfViewer;
3
3
  export { PdfViewer };
4
- export * from './constants';
5
- export * from './PdfViewerPagination';
6
- export * from './types';
4
+ export { pdfViewerClassnames } from './constants';
5
+ export { type PdfViewerPaginationProps, PdfViewerPagination, } from './PdfViewerPagination';
6
+ export type { PdfViewerOnLoadSuccessProps, PdfViewerProps } from './types';
@@ -1,6 +1,5 @@
1
1
  import { PdfViewer } from './PdfViewer';
2
2
  export default PdfViewer;
3
3
  export { PdfViewer };
4
- export * from './constants';
5
- export * from './PdfViewerPagination';
6
- export * from './types';
4
+ export { pdfViewerClassnames } from './constants';
5
+ export { PdfViewerPagination, } from './PdfViewerPagination';
@@ -1,4 +1,4 @@
1
- export * from './ResizingDataGrid';
2
- export * from './hooks/useComputedColumns';
3
- export * from './Sliders';
1
+ export { ResizingDataGrid } from './ResizingDataGrid';
2
+ export { useComputedColumns } from './hooks/useComputedColumns';
3
+ export { Sliders } from './Sliders';
4
4
  export type { ResizingColumns, ResizingDataGridProps } from './types';
@@ -1,3 +1,3 @@
1
- export * from './ResizingDataGrid';
2
- export * from './hooks/useComputedColumns';
3
- export * from './Sliders';
1
+ export { ResizingDataGrid } from './ResizingDataGrid';
2
+ export { useComputedColumns } from './hooks/useComputedColumns';
3
+ export { Sliders } from './Sliders';
@@ -1,2 +1,2 @@
1
- export * from './ResizingDataGridInfinite';
1
+ export { ResizingDataGridInfinite } from './ResizingDataGridInfinite';
2
2
  export type { ResizingDataGridInfiniteProps, ResizingColumnsInfinite, } from './types';
@@ -1 +1 @@
1
- export * from './ResizingDataGridInfinite';
1
+ export { ResizingDataGridInfinite } from './ResizingDataGridInfinite';
@@ -1,3 +1,3 @@
1
- export * from './Banner';
2
- export * from './BannerContainer';
3
- export * from './BannerActionButton';
1
+ export { banner } from './Banner';
2
+ export { BannerContainer } from './BannerContainer';
3
+ export { BannerActionButton, type BannerActionButtonProps, } from './BannerActionButton';
@@ -1,19 +1,9 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
2
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./Banner"), exports);
18
- __exportStar(require("./BannerContainer"), exports);
19
- __exportStar(require("./BannerActionButton"), exports);
3
+ exports.BannerActionButton = exports.BannerContainer = exports.banner = void 0;
4
+ var Banner_1 = require("./Banner");
5
+ Object.defineProperty(exports, "banner", { enumerable: true, get: function () { return Banner_1.banner; } });
6
+ var BannerContainer_1 = require("./BannerContainer");
7
+ Object.defineProperty(exports, "BannerContainer", { enumerable: true, get: function () { return BannerContainer_1.BannerContainer; } });
8
+ var BannerActionButton_1 = require("./BannerActionButton");
9
+ Object.defineProperty(exports, "BannerActionButton", { enumerable: true, get: function () { return BannerActionButton_1.BannerActionButton; } });
@@ -2,7 +2,7 @@ import { type MouseEvent } from 'react';
2
2
  import { type TooltipProps } from '../../../Tooltip';
3
3
  import { type InfiniteTreeListItemProps } from '../types';
4
4
  export declare const useLogic: ({ isDisabled, disabledReason, }: InfiniteTreeListItemProps) => {
5
- item: import("../..").FlattenTree<import("../..").InfiniteTreeListData>;
5
+ item: import("../../types").FlattenTree<import("../../types").InfiniteTreeListData>;
6
6
  handleClick: (event: MouseEvent) => void;
7
7
  itemSkeleton: import("react").ReactNode;
8
8
  isDisabled: boolean | undefined;
@@ -1,4 +1,4 @@
1
- export * from './InfiniteTreeList';
2
- export * from './types';
3
- export * from './InfiniteTreeListItem';
4
- export * from './InfiniteTreeListActions';
1
+ export { InfiniteTreeList } from './InfiniteTreeList';
2
+ export type { InfiniteTreeListProps } from './types';
3
+ export { InfiniteTreeListItem, type InfiniteTreeListItemProps, } from './InfiniteTreeListItem';
4
+ export { type InfiniteTreeListActionProps, InfiniteTreeListActions, } from './InfiniteTreeListActions';
@@ -1,20 +1,9 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
2
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./InfiniteTreeList"), exports);
18
- __exportStar(require("./types"), exports);
19
- __exportStar(require("./InfiniteTreeListItem"), exports);
20
- __exportStar(require("./InfiniteTreeListActions"), exports);
3
+ exports.InfiniteTreeListActions = exports.InfiniteTreeListItem = exports.InfiniteTreeList = void 0;
4
+ var InfiniteTreeList_1 = require("./InfiniteTreeList");
5
+ Object.defineProperty(exports, "InfiniteTreeList", { enumerable: true, get: function () { return InfiniteTreeList_1.InfiniteTreeList; } });
6
+ var InfiniteTreeListItem_1 = require("./InfiniteTreeListItem");
7
+ Object.defineProperty(exports, "InfiniteTreeListItem", { enumerable: true, get: function () { return InfiniteTreeListItem_1.InfiniteTreeListItem; } });
8
+ var InfiniteTreeListActions_1 = require("./InfiniteTreeListActions");
9
+ Object.defineProperty(exports, "InfiniteTreeListActions", { enumerable: true, get: function () { return InfiniteTreeListActions_1.InfiniteTreeListActions; } });
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import type { InputGroupProps } from './types';
3
+ export declare const InputGroup: ({ children, columns }: InputGroupProps) => JSX.Element;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InputGroup = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const styles_1 = require("./styles");
6
+ const useLogic_1 = require("./useLogic");
7
+ const InputGroup = ({ children, columns }) => {
8
+ const { gridColumnTemplate } = (0, useLogic_1.useLogic)({ children, columns });
9
+ return ((0, jsx_runtime_1.jsx)(styles_1.InputsWrapper, { "$columnsTemplate": gridColumnTemplate(), children: children }));
10
+ };
11
+ exports.InputGroup = InputGroup;
@@ -0,0 +1,2 @@
1
+ export * from './InputGroup';
2
+ export type { InputGroupProps } from './types';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./InputGroup"), exports);
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ export declare const InputsWrapper: import("@emotion/styled").StyledComponent<{
3
+ theme?: import("@emotion/react").Theme | undefined;
4
+ as?: import("react").ElementType<any> | undefined;
5
+ } & {
6
+ $columnsTemplate: string;
7
+ }, import("react").DetailedHTMLProps<import("react").FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, {}>;
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InputsWrapper = void 0;
4
+ const material_1 = require("@mui/material");
5
+ const styles_1 = require("../styles");
6
+ exports.InputsWrapper = styles_1.styled.fieldset `
7
+ display: grid;
8
+ grid-template-columns: ${({ $columnsTemplate }) => $columnsTemplate};
9
+
10
+ margin-inline: 0;
11
+ padding: 0;
12
+
13
+ border: unset;
14
+
15
+ & .${material_1.formControlClasses.root} {
16
+ width: 100%;
17
+
18
+ .${material_1.inputBaseClasses.root} {
19
+ position: relative;
20
+ z-index: 2;
21
+
22
+ border-radius: 0;
23
+
24
+ &.${material_1.inputBaseClasses.focused} {
25
+ z-index: 4;
26
+ }
27
+ }
28
+ }
29
+
30
+ /* Скругления только крайних инпутов */
31
+ & > :first-child .${material_1.inputBaseClasses.root} {
32
+ border-top-left-radius: ${({ theme }) => theme.shape.medium};
33
+ border-bottom-left-radius: ${({ theme }) => theme.shape.medium};
34
+
35
+ &.${material_1.inputBaseClasses.disabled} {
36
+ z-index: 1;
37
+
38
+ &::after {
39
+ content: '';
40
+
41
+ position: absolute;
42
+ right: 0;
43
+
44
+ width: 1px;
45
+ height: 100%;
46
+
47
+ background-color: ${({ theme }) => theme.palette.grey[500]};
48
+ }
49
+ }
50
+ }
51
+
52
+ & > :last-child .${material_1.inputBaseClasses.root} {
53
+ border-top-right-radius: ${({ theme }) => theme.shape.medium};
54
+ border-bottom-right-radius: ${({ theme }) => theme.shape.medium};
55
+ }
56
+
57
+ & > :not(:first-child) .${material_1.inputBaseClasses.root} {
58
+ &.${material_1.inputBaseClasses.disabled} {
59
+ z-index: 1;
60
+
61
+
62
+ &::after {
63
+ content: '';
64
+
65
+ position: absolute;
66
+ left: 0;
67
+
68
+ width: 1px;
69
+ height: 100%;
70
+
71
+ background-color: ${({ theme }) => theme.palette.grey[500]};
72
+ }
73
+ }
74
+
75
+ }
76
+
77
+ & > :not(:last-child) .${material_1.inputBaseClasses.root} {
78
+ width: auto;
79
+ margin-right: -2px;
80
+
81
+ &:hover {
82
+ z-index: 3;
83
+
84
+ &.${material_1.inputBaseClasses.disabled} {
85
+ z-index: 1;
86
+ }
87
+ }
88
+ }
89
+
90
+
91
+ `;
@@ -0,0 +1,10 @@
1
+ import type { ReactNode } from 'react';
2
+ export type InputGroupProps = {
3
+ children: ReactNode;
4
+ /**
5
+ * Определяет шаблон колонок для grid группы инпутов
6
+ * @example
7
+ * columns={['300px', '1fr', '30%]}
8
+ */
9
+ columns?: string[];
10
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from './useLogic';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./useLogic"), exports);
@@ -0,0 +1,6 @@
1
+ import type { InputGroupProps } from '../types';
2
+ type UseLogicParams = InputGroupProps;
3
+ export declare const useLogic: ({ children, columns }: UseLogicParams) => {
4
+ gridColumnTemplate: () => string;
5
+ };
6
+ export {};
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useLogic = void 0;
4
+ const react_1 = require("react");
5
+ const useLogic = ({ children, columns }) => {
6
+ const gridColumnTemplate = () => {
7
+ if (columns) {
8
+ return columns.join(' ');
9
+ }
10
+ const childrenCount = react_1.Children.count(children);
11
+ return `repeat(${childrenCount}, 1fr)`;
12
+ };
13
+ return { gridColumnTemplate };
14
+ };
15
+ exports.useLogic = useLogic;
@@ -1,2 +1,2 @@
1
- export * from './JsonViewer';
1
+ export { JsonViewer } from './JsonViewer';
2
2
  export type { JsonViewerProps } from './types';
@@ -1,17 +1,5 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
2
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./JsonViewer"), exports);
3
+ exports.JsonViewer = void 0;
4
+ var JsonViewer_1 = require("./JsonViewer");
5
+ Object.defineProperty(exports, "JsonViewer", { enumerable: true, get: function () { return JsonViewer_1.JsonViewer; } });
@@ -1,6 +1,5 @@
1
- export * from './constants';
2
- export * from './NotificationContainer';
3
- export * from './Notification';
4
- export * from './NotificationStackContainer';
5
- export * from './NotificationTemplate';
6
- export * from './types';
1
+ export { NOTIFY_POSITIONS, notifyClassnames, BANNER_CONTAINER_ID, } from './constants';
2
+ export { NotificationContainer } from './NotificationContainer';
3
+ export { notify } from './Notification';
4
+ export { NotificationStackContainer } from './NotificationStackContainer';
5
+ export type { Notify } from './types';
@@ -1,22 +1,13 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
2
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./constants"), exports);
18
- __exportStar(require("./NotificationContainer"), exports);
19
- __exportStar(require("./Notification"), exports);
20
- __exportStar(require("./NotificationStackContainer"), exports);
21
- __exportStar(require("./NotificationTemplate"), exports);
22
- __exportStar(require("./types"), exports);
3
+ exports.NotificationStackContainer = exports.notify = exports.NotificationContainer = exports.BANNER_CONTAINER_ID = exports.notifyClassnames = exports.NOTIFY_POSITIONS = void 0;
4
+ var constants_1 = require("./constants");
5
+ Object.defineProperty(exports, "NOTIFY_POSITIONS", { enumerable: true, get: function () { return constants_1.NOTIFY_POSITIONS; } });
6
+ Object.defineProperty(exports, "notifyClassnames", { enumerable: true, get: function () { return constants_1.notifyClassnames; } });
7
+ Object.defineProperty(exports, "BANNER_CONTAINER_ID", { enumerable: true, get: function () { return constants_1.BANNER_CONTAINER_ID; } });
8
+ var NotificationContainer_1 = require("./NotificationContainer");
9
+ Object.defineProperty(exports, "NotificationContainer", { enumerable: true, get: function () { return NotificationContainer_1.NotificationContainer; } });
10
+ var Notification_1 = require("./Notification");
11
+ Object.defineProperty(exports, "notify", { enumerable: true, get: function () { return Notification_1.notify; } });
12
+ var NotificationStackContainer_1 = require("./NotificationStackContainer");
13
+ Object.defineProperty(exports, "NotificationStackContainer", { enumerable: true, get: function () { return NotificationStackContainer_1.NotificationStackContainer; } });
@@ -1,6 +1,6 @@
1
1
  import { PdfViewer } from './PdfViewer';
2
2
  export default PdfViewer;
3
3
  export { PdfViewer };
4
- export * from './constants';
5
- export * from './PdfViewerPagination';
6
- export * from './types';
4
+ export { pdfViewerClassnames } from './constants';
5
+ export { type PdfViewerPaginationProps, PdfViewerPagination, } from './PdfViewerPagination';
6
+ export type { PdfViewerOnLoadSuccessProps, PdfViewerProps } from './types';
@@ -1,23 +1,10 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
2
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.PdfViewer = void 0;
3
+ exports.PdfViewerPagination = exports.pdfViewerClassnames = exports.PdfViewer = void 0;
18
4
  const PdfViewer_1 = require("./PdfViewer");
19
5
  Object.defineProperty(exports, "PdfViewer", { enumerable: true, get: function () { return PdfViewer_1.PdfViewer; } });
20
6
  exports.default = PdfViewer_1.PdfViewer;
21
- __exportStar(require("./constants"), exports);
22
- __exportStar(require("./PdfViewerPagination"), exports);
23
- __exportStar(require("./types"), exports);
7
+ var constants_1 = require("./constants");
8
+ Object.defineProperty(exports, "pdfViewerClassnames", { enumerable: true, get: function () { return constants_1.pdfViewerClassnames; } });
9
+ var PdfViewerPagination_1 = require("./PdfViewerPagination");
10
+ Object.defineProperty(exports, "PdfViewerPagination", { enumerable: true, get: function () { return PdfViewerPagination_1.PdfViewerPagination; } });
@@ -1,4 +1,4 @@
1
- export * from './ResizingDataGrid';
2
- export * from './hooks/useComputedColumns';
3
- export * from './Sliders';
1
+ export { ResizingDataGrid } from './ResizingDataGrid';
2
+ export { useComputedColumns } from './hooks/useComputedColumns';
3
+ export { Sliders } from './Sliders';
4
4
  export type { ResizingColumns, ResizingDataGridProps } from './types';
@@ -1,19 +1,9 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
2
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./ResizingDataGrid"), exports);
18
- __exportStar(require("./hooks/useComputedColumns"), exports);
19
- __exportStar(require("./Sliders"), exports);
3
+ exports.Sliders = exports.useComputedColumns = exports.ResizingDataGrid = void 0;
4
+ var ResizingDataGrid_1 = require("./ResizingDataGrid");
5
+ Object.defineProperty(exports, "ResizingDataGrid", { enumerable: true, get: function () { return ResizingDataGrid_1.ResizingDataGrid; } });
6
+ var useComputedColumns_1 = require("./hooks/useComputedColumns");
7
+ Object.defineProperty(exports, "useComputedColumns", { enumerable: true, get: function () { return useComputedColumns_1.useComputedColumns; } });
8
+ var Sliders_1 = require("./Sliders");
9
+ Object.defineProperty(exports, "Sliders", { enumerable: true, get: function () { return Sliders_1.Sliders; } });
@@ -1,2 +1,2 @@
1
- export * from './ResizingDataGridInfinite';
1
+ export { ResizingDataGridInfinite } from './ResizingDataGridInfinite';
2
2
  export type { ResizingDataGridInfiniteProps, ResizingColumnsInfinite, } from './types';
@@ -1,17 +1,5 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
2
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./ResizingDataGridInfinite"), exports);
3
+ exports.ResizingDataGridInfinite = void 0;
4
+ var ResizingDataGridInfinite_1 = require("./ResizingDataGridInfinite");
5
+ Object.defineProperty(exports, "ResizingDataGridInfinite", { enumerable: true, get: function () { return ResizingDataGridInfinite_1.ResizingDataGridInfinite; } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astral/ui",
3
- "version": "4.0.0-alpha.31",
3
+ "version": "4.0.0-alpha.33",
4
4
  "browser": "./index.js",
5
5
  "main": "./node/index.js",
6
6
  "dependencies": {
@@ -51,68 +51,61 @@
51
51
  "default": "./server/index.js",
52
52
  "import": "./server/index.js"
53
53
  },
54
- "./next": {
55
- "module": "./next.js",
56
- "require": "./node/next.js",
57
- "types": "./next.d.ts",
58
- "default": "./next.js",
59
- "import": "./next.js"
60
- },
61
54
  "./components/PdfViewer": {
62
- "module": "./components/PdfViewer.js",
63
- "require": "./node/components/PdfViewer.js",
64
- "types": "./components/PdfViewer.d.ts",
65
- "default": "./components/PdfViewer.js",
66
- "import": "./components/PdfViewer.js"
55
+ "module": "./components/PdfViewer/index.js",
56
+ "require": "./node/components/PdfViewer/index.js",
57
+ "types": "./components/PdfViewer/index.d.ts",
58
+ "default": "./components/PdfViewer/index.js",
59
+ "import": "./components/PdfViewer/index.js"
67
60
  },
68
61
  "./components/JsonViewer": {
69
- "module": "./components/JsonViewer.js",
70
- "require": "./node/components/JsonViewer.js",
71
- "types": "./components/JsonViewer.d.ts",
72
- "default": "./components/JsonViewer.js",
73
- "import": "./components/JsonViewer.js"
62
+ "module": "./components/JsonViewer/index.js",
63
+ "require": "./node/components/JsonViewer/index.js",
64
+ "types": "./components/JsonViewer/index.d.ts",
65
+ "default": "./components/JsonViewer/index.js",
66
+ "import": "./components/JsonViewer/index.js"
74
67
  },
75
68
  "./components/Notification": {
76
- "module": "./components/Notification.js",
77
- "require": "./node/components/Notification.js",
78
- "types": "./components/Notification.d.ts",
79
- "default": "./components/Notification.js",
80
- "import": "./components/Notification.js"
69
+ "module": "./components/Notification/index.js",
70
+ "require": "./node/components/Notification/index.js",
71
+ "types": "./components/Notification/index.d.ts",
72
+ "default": "./components/Notification/index.js",
73
+ "import": "./components/Notification/index.js"
81
74
  },
82
75
  "./components/LegacyNotification": {
83
- "module": "./components/LegacyNotification.js",
84
- "require": "./node/components/LegacyNotification.js",
85
- "types": "./components/LegacyNotification.d.ts",
86
- "default": "./components/LegacyNotification.js",
87
- "import": "./components/LegacyNotification.js"
76
+ "module": "./components/LegacyNotification/index.js",
77
+ "require": "./node/components/LegacyNotification/index.js",
78
+ "types": "./components/LegacyNotification/index.d.ts",
79
+ "default": "./components/LegacyNotification/index.js",
80
+ "import": "./components/LegacyNotification/index.js"
88
81
  },
89
82
  "./components/Banner": {
90
- "module": "./components/Banner.js",
91
- "require": "./node/components/Banner.js",
92
- "types": "./components/Banner.d.ts",
93
- "default": "./components/Banner.js",
94
- "import": "./components/Banner.js"
83
+ "module": "./components/Banner/index.js",
84
+ "require": "./node/components/Banner/index.js",
85
+ "types": "./components/Banner/index.d.ts",
86
+ "default": "./components/Banner/index.js",
87
+ "import": "./components/Banner/index.js"
95
88
  },
96
89
  "./components/unstable/ResizingDataGrid": {
97
- "module": "./components/ResizingDataGrid.js",
98
- "require": "./node/components/ResizingDataGrid.js",
99
- "types": "./components/ResizingDataGrid.d.ts",
100
- "default": "./components/ResizingDataGrid.js",
101
- "import": "./components/ResizingDataGrid.js"
90
+ "module": "./components/ResizingDataGrid/index.js",
91
+ "require": "./node/components/ResizingDataGrid/index.js",
92
+ "types": "./components/ResizingDataGrid/index.d.ts",
93
+ "default": "./components/ResizingDataGrid/index.js",
94
+ "import": "./components/ResizingDataGrid/index.js"
102
95
  },
103
96
  "./components/unstable/ResizingDataGridInfinite": {
104
- "module": "./components/ResizingDataGridInfinite.js",
105
- "require": "./node/components/ResizingDataGridInfinite.js",
106
- "types": "./components/ResizingDataGridInfinite.d.ts",
107
- "default": "./components/ResizingDataGridInfinite.js",
108
- "import": "./components/ResizingDataGridInfinite.js"
97
+ "module": "./components/ResizingDataGridInfinite/index.js",
98
+ "require": "./node/components/ResizingDataGridInfinite/index.js",
99
+ "types": "./components/ResizingDataGridInfinite/index.d.ts",
100
+ "default": "./components/ResizingDataGridInfinite/index.js",
101
+ "import": "./components/ResizingDataGridInfinite/index.js"
109
102
  },
110
103
  "./components/InfiniteTreeList": {
111
- "module": "./components/InfiniteTreeList.js",
112
- "require": "./node/components/InfiniteTreeList.js",
113
- "types": "./components/InfiniteTreeList.d.ts",
114
- "default": "./components/InfiniteTreeList.js",
115
- "import": "./components/InfiniteTreeList.js"
104
+ "module": "./components/InfiniteTreeList/index.js",
105
+ "require": "./node/components/InfiniteTreeList/index.js",
106
+ "types": "./components/InfiniteTreeList/index.d.ts",
107
+ "default": "./components/InfiniteTreeList/index.js",
108
+ "import": "./components/InfiniteTreeList/index.js"
116
109
  }
117
110
  },
118
111
  "author": "Astral.Soft",