@astral/ui 4.22.1 → 4.23.0
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/BulletList/BulletList.d.ts +4 -0
- package/components/BulletList/BulletList.js +9 -3
- package/components/BulletList/constants.d.ts +4 -0
- package/components/BulletList/constants.js +5 -0
- package/components/BulletList/styles.d.ts +5 -1
- package/components/BulletList/styles.js +9 -1
- package/hook-form/FormTreeLikeAsyncAutocomplete/public.d.ts +2 -0
- package/hook-form/FormTreeLikeAsyncAutocomplete/public.js +1 -1
- package/node/components/BulletList/BulletList.d.ts +4 -0
- package/node/components/BulletList/BulletList.js +8 -2
- package/node/components/BulletList/constants.d.ts +4 -0
- package/node/components/BulletList/constants.js +8 -0
- package/node/components/BulletList/styles.d.ts +5 -1
- package/node/components/BulletList/styles.js +10 -2
- package/node/hook-form/FormTreeLikeAsyncAutocomplete/public.d.ts +2 -0
- package/node/hook-form/FormTreeLikeAsyncAutocomplete/public.js +4 -0
- package/package.json +1 -1
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { type PropsWithChildren } from 'react';
|
|
2
2
|
export type BulletListProps = PropsWithChildren<{
|
|
3
3
|
className?: string;
|
|
4
|
+
/**
|
|
5
|
+
* Флаг для скрытия точек у первых элементов списка каждой строки.
|
|
6
|
+
*/
|
|
7
|
+
hideFirstBullet?: boolean;
|
|
4
8
|
}>;
|
|
5
9
|
/**
|
|
6
10
|
* Список элементов с маркерами
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { classNames } from '../utils/classNames';
|
|
4
|
+
import { bulletListClassnames } from './constants';
|
|
5
|
+
import { List, Wrapper } from './styles';
|
|
3
6
|
/**
|
|
4
7
|
* Список элементов с маркерами
|
|
5
8
|
*/
|
|
6
9
|
export const BulletList = (props) => {
|
|
7
|
-
const { children,
|
|
8
|
-
|
|
10
|
+
const { children, hideFirstBullet, className } = props;
|
|
11
|
+
const classnames = useMemo(() => classNames(className, bulletListClassnames.root, {
|
|
12
|
+
[bulletListClassnames.hideFirstBullet]: hideFirstBullet,
|
|
13
|
+
}), [hideFirstBullet]);
|
|
14
|
+
return (_jsx(Wrapper, { children: _jsx(List, { className: classnames, children: children }) }));
|
|
9
15
|
};
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const List: import("../styled").StyledComponent<{
|
|
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<HTMLUListElement>, HTMLUListElement>, {}>;
|
|
6
|
+
export declare const Wrapper: import("../styled").StyledComponent<{
|
|
7
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
8
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
9
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { styled } from '../styled';
|
|
2
2
|
import { listContainer } from '../styled/mixins';
|
|
3
|
-
|
|
3
|
+
import { bulletListClassnames } from './constants';
|
|
4
|
+
export const List = styled.ul `
|
|
4
5
|
${listContainer};
|
|
6
|
+
|
|
7
|
+
&.${bulletListClassnames.hideFirstBullet} {
|
|
8
|
+
margin-left: -${({ theme }) => theme.spacing(5)};
|
|
9
|
+
}
|
|
10
|
+
`;
|
|
11
|
+
export const Wrapper = styled.div `
|
|
12
|
+
overflow: hidden;
|
|
5
13
|
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export { FormTreeLikeAsyncAutocomplete } from './FormTreeLikeAsyncAutocomplete';
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { type PropsWithChildren } from 'react';
|
|
2
2
|
export type BulletListProps = PropsWithChildren<{
|
|
3
3
|
className?: string;
|
|
4
|
+
/**
|
|
5
|
+
* Флаг для скрытия точек у первых элементов списка каждой строки.
|
|
6
|
+
*/
|
|
7
|
+
hideFirstBullet?: boolean;
|
|
4
8
|
}>;
|
|
5
9
|
/**
|
|
6
10
|
* Список элементов с маркерами
|
|
@@ -2,12 +2,18 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BulletList = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const classNames_1 = require("../utils/classNames");
|
|
7
|
+
const constants_1 = require("./constants");
|
|
5
8
|
const styles_1 = require("./styles");
|
|
6
9
|
/**
|
|
7
10
|
* Список элементов с маркерами
|
|
8
11
|
*/
|
|
9
12
|
const BulletList = (props) => {
|
|
10
|
-
const { children,
|
|
11
|
-
|
|
13
|
+
const { children, hideFirstBullet, className } = props;
|
|
14
|
+
const classnames = (0, react_1.useMemo)(() => (0, classNames_1.classNames)(className, constants_1.bulletListClassnames.root, {
|
|
15
|
+
[constants_1.bulletListClassnames.hideFirstBullet]: hideFirstBullet,
|
|
16
|
+
}), [hideFirstBullet]);
|
|
17
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.Wrapper, { children: (0, jsx_runtime_1.jsx)(styles_1.List, { className: classnames, children: children }) }));
|
|
12
18
|
};
|
|
13
19
|
exports.BulletList = BulletList;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bulletListClassnames = void 0;
|
|
4
|
+
const createUIKitClassname_1 = require("../utils/createUIKitClassname");
|
|
5
|
+
exports.bulletListClassnames = {
|
|
6
|
+
root: (0, createUIKitClassname_1.createUIKitClassname)('bullet-list'),
|
|
7
|
+
hideFirstBullet: (0, createUIKitClassname_1.createUIKitClassname)('bullet-list_hide-first-bullets'),
|
|
8
|
+
};
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const List: import("@emotion/styled/dist/declarations/src/types").StyledComponent<{
|
|
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<HTMLUListElement>, HTMLUListElement>, {}>;
|
|
6
|
+
export declare const Wrapper: import("@emotion/styled/dist/declarations/src/types").StyledComponent<{
|
|
7
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
8
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
9
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Wrapper = void 0;
|
|
3
|
+
exports.Wrapper = exports.List = void 0;
|
|
4
4
|
const styled_1 = require("../styled");
|
|
5
5
|
const mixins_1 = require("../styled/mixins");
|
|
6
|
-
|
|
6
|
+
const constants_1 = require("./constants");
|
|
7
|
+
exports.List = styled_1.styled.ul `
|
|
7
8
|
${mixins_1.listContainer};
|
|
9
|
+
|
|
10
|
+
&.${constants_1.bulletListClassnames.hideFirstBullet} {
|
|
11
|
+
margin-left: -${({ theme }) => theme.spacing(5)};
|
|
12
|
+
}
|
|
13
|
+
`;
|
|
14
|
+
exports.Wrapper = styled_1.styled.div `
|
|
15
|
+
overflow: hidden;
|
|
8
16
|
`;
|
|
@@ -1 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FormTreeLikeAsyncAutocomplete = void 0;
|
|
4
|
+
var FormTreeLikeAsyncAutocomplete_1 = require("./FormTreeLikeAsyncAutocomplete");
|
|
5
|
+
Object.defineProperty(exports, "FormTreeLikeAsyncAutocomplete", { enumerable: true, get: function () { return FormTreeLikeAsyncAutocomplete_1.FormTreeLikeAsyncAutocomplete; } });
|