@astral/ui 4.36.1 → 4.37.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/Accordion/styles.d.ts +1 -0
- package/components/Alert/styles.d.ts +2 -0
- package/components/AutoSaveIndicator/styles.d.ts +2 -0
- package/components/Autocomplete/Autocomplete.d.ts +1 -1
- package/components/Autocomplete/Autocomplete.js +53 -15
- package/components/Autocomplete/constants.d.ts +6 -0
- package/components/Autocomplete/constants.js +7 -0
- package/components/Autocomplete/styles.js +15 -1
- package/components/Autocomplete/useLogic/useLogic.d.ts +2 -1
- package/components/Autocomplete/useLogic/useLogic.js +11 -2
- package/components/BottomDrawer/styles.d.ts +1 -0
- package/components/Chip/styles.d.ts +1 -0
- package/components/CodeField/styles.d.ts +1 -0
- package/components/CollapsibleTypography/CollapsibleTypography.d.ts +1 -0
- package/components/CollapsibleTypography/styles.d.ts +1 -0
- package/components/ConfirmAction/styles.d.ts +1 -0
- package/components/CopyTypography/styles.d.ts +1 -0
- package/components/CopyTypography/useLogic/useLogic.d.ts +1 -0
- package/components/DashboardSidebarPopover/styles.d.ts +1 -0
- package/components/DataGridPagination/styles.d.ts +1 -0
- package/components/DataGridPaginationContainer/styles.d.ts +1 -0
- package/components/DatePicker/DateCalendar/DateCalendarHead/styles.d.ts +1 -0
- package/components/Description/Value/styles.d.ts +2 -0
- package/components/DescriptionList/styles.d.ts +1 -0
- package/components/Fieldset/styles.d.ts +2 -0
- package/components/Filename/styles.d.ts +1 -0
- package/components/FlowButton/styles.d.ts +1 -0
- package/components/JsonViewer/NodeValue/styles.d.ts +3 -0
- package/components/LegacyNotification/NotificationTemplate/styles.d.ts +2 -0
- package/components/MaskField/MaskField.js +2 -2
- package/components/MaskField/styles.d.ts +2 -0
- package/components/MaskField/styles.js +5 -0
- package/components/MenuGroup/styles.d.ts +1 -0
- package/components/MenuOrganization/OrganizationButton/styles.d.ts +1 -0
- package/components/MenuOrganization/OrganizationGroup/styles.d.ts +1 -0
- package/components/MenuOrganization/styles.d.ts +1 -0
- package/components/MinimalisticPagination/styles.d.ts +1 -0
- package/components/NavMenu/Item/ItemButton/styles.d.ts +1 -0
- package/components/NotFoundPage/styles.d.ts +2 -0
- package/components/Notification/NotificationTemplate/styles.d.ts +2 -0
- package/components/NotificationList/ListItem/styles.d.ts +2 -0
- package/components/OverflowTypography/OverflowTypography.d.ts +1 -0
- package/components/OverflowTypography/styles.d.ts +2 -0
- package/components/PageContent/PageContentHeader/Title/styles.d.ts +1 -0
- package/components/PageHeader/HeaderContent/Description/styles.d.ts +1 -0
- package/components/PageHeader/Title/styles.d.ts +1 -0
- package/components/Pagination/PaginationItem/styles.d.ts +1 -0
- package/components/PinButton/styles.d.ts +1 -0
- package/components/ProductSwitcher/Content/styles.d.ts +1 -0
- package/components/TagsList/Tag/Tag.d.ts +1 -1
- package/components/TagsList/Tag/constants.d.ts +1 -0
- package/components/TagsList/Tag/constants.js +1 -0
- package/components/TagsList/Tag/index.d.ts +1 -0
- package/components/TagsList/Tag/index.js +1 -0
- package/components/TagsList/Tag/styles.js +2 -0
- package/components/TagsList/TagsList.js +6 -6
- package/components/TagsList/constants.d.ts +2 -0
- package/components/TagsList/constants.js +2 -0
- package/components/TagsList/styles.js +5 -1
- package/components/TagsList/types.d.ts +14 -5
- package/components/TagsList/useLogic/useLogic.d.ts +5 -5
- package/components/TagsList/useLogic/useLogic.js +70 -110
- package/components/TagsList/utils/calculateVisibleTagsCount/calculateVisibleTagsCount.d.ts +6 -0
- package/components/TagsList/utils/calculateVisibleTagsCount/calculateVisibleTagsCount.js +35 -0
- package/components/TagsList/utils/calculateVisibleTagsCount/index.d.ts +1 -0
- package/components/TagsList/utils/calculateVisibleTagsCount/index.js +1 -0
- package/components/TagsList/utils/getAvailableWidth/getAvailableWidth.d.ts +1 -0
- package/components/TagsList/utils/getAvailableWidth/getAvailableWidth.js +7 -0
- package/components/TagsList/utils/getAvailableWidth/index.d.ts +1 -0
- package/components/TagsList/utils/getAvailableWidth/index.js +1 -0
- package/components/TagsList/utils/getKey/getKey.d.ts +1 -1
- package/components/TagsList/utils/getKey/getKey.js +6 -3
- package/components/TagsList/utils/getTagWidth/getTagWidth.d.ts +2 -0
- package/components/TagsList/utils/getTagWidth/getTagWidth.js +21 -0
- package/components/TagsList/utils/getTagWidth/index.d.ts +1 -0
- package/components/TagsList/utils/getTagWidth/index.js +1 -0
- package/components/TagsList/utils/index.d.ts +3 -0
- package/components/TagsList/utils/index.js +3 -0
- package/components/TextField/TextField.js +6 -5
- package/components/TextField/constants.d.ts +1 -0
- package/components/TextField/constants.js +1 -0
- package/components/TextField/styles.js +4 -0
- package/components/Tree/TreeItem/styles.d.ts +2 -0
- package/components/TreeLikeAsyncAutocomplete/Input/Input.js +1 -1
- package/components/Typography/Typography.d.ts +1 -0
- package/components/Typography/Typography.js +6 -2
- package/components/Typography/constants.d.ts +3 -0
- package/components/Typography/constants.js +3 -0
- package/components/Typography/styles.js +5 -0
- package/components/Typography/types.d.ts +4 -0
- package/components/WelcomeScreen/styles.d.ts +2 -0
- package/components/fileUploading/FileInfo/styles.d.ts +1 -0
- package/components/placeholders/Placeholder/styles.d.ts +2 -0
- package/hook-form/EditableText/EditingForm/styles.d.ts +1 -0
- package/hook-form/EditableText/styles.d.ts +1 -0
- package/node/components/Accordion/styles.d.ts +1 -0
- package/node/components/Alert/styles.d.ts +2 -0
- package/node/components/AutoSaveIndicator/styles.d.ts +2 -0
- package/node/components/Autocomplete/Autocomplete.d.ts +1 -1
- package/node/components/Autocomplete/Autocomplete.js +51 -13
- package/node/components/Autocomplete/constants.d.ts +6 -0
- package/node/components/Autocomplete/constants.js +8 -1
- package/node/components/Autocomplete/styles.js +15 -1
- package/node/components/Autocomplete/useLogic/useLogic.d.ts +2 -1
- package/node/components/Autocomplete/useLogic/useLogic.js +10 -1
- package/node/components/BottomDrawer/styles.d.ts +1 -0
- package/node/components/Chip/styles.d.ts +1 -0
- package/node/components/CodeField/styles.d.ts +1 -0
- package/node/components/CollapsibleTypography/CollapsibleTypography.d.ts +1 -0
- package/node/components/CollapsibleTypography/styles.d.ts +1 -0
- package/node/components/ConfirmAction/styles.d.ts +1 -0
- package/node/components/CopyTypography/styles.d.ts +1 -0
- package/node/components/CopyTypography/useLogic/useLogic.d.ts +1 -0
- package/node/components/DashboardSidebarPopover/styles.d.ts +1 -0
- package/node/components/DataGridPagination/styles.d.ts +1 -0
- package/node/components/DataGridPaginationContainer/styles.d.ts +1 -0
- package/node/components/DatePicker/DateCalendar/DateCalendarHead/styles.d.ts +1 -0
- package/node/components/Description/Value/styles.d.ts +2 -0
- package/node/components/DescriptionList/styles.d.ts +1 -0
- package/node/components/Fieldset/styles.d.ts +2 -0
- package/node/components/Filename/styles.d.ts +1 -0
- package/node/components/FlowButton/styles.d.ts +1 -0
- package/node/components/JsonViewer/NodeValue/styles.d.ts +3 -0
- package/node/components/LegacyNotification/NotificationTemplate/styles.d.ts +2 -0
- package/node/components/MaskField/MaskField.js +2 -2
- package/node/components/MaskField/styles.d.ts +2 -0
- package/node/components/MaskField/styles.js +8 -0
- package/node/components/MenuGroup/styles.d.ts +1 -0
- package/node/components/MenuOrganization/OrganizationButton/styles.d.ts +1 -0
- package/node/components/MenuOrganization/OrganizationGroup/styles.d.ts +1 -0
- package/node/components/MenuOrganization/styles.d.ts +1 -0
- package/node/components/MinimalisticPagination/styles.d.ts +1 -0
- package/node/components/NavMenu/Item/ItemButton/styles.d.ts +1 -0
- package/node/components/NotFoundPage/styles.d.ts +2 -0
- package/node/components/Notification/NotificationTemplate/styles.d.ts +2 -0
- package/node/components/NotificationList/ListItem/styles.d.ts +2 -0
- package/node/components/OverflowTypography/OverflowTypography.d.ts +1 -0
- package/node/components/OverflowTypography/styles.d.ts +2 -0
- package/node/components/PageContent/PageContentHeader/Title/styles.d.ts +1 -0
- package/node/components/PageHeader/HeaderContent/Description/styles.d.ts +1 -0
- package/node/components/PageHeader/Title/styles.d.ts +1 -0
- package/node/components/Pagination/PaginationItem/styles.d.ts +1 -0
- package/node/components/PinButton/styles.d.ts +1 -0
- package/node/components/ProductSwitcher/Content/styles.d.ts +1 -0
- package/node/components/TagsList/Tag/Tag.d.ts +1 -1
- package/node/components/TagsList/Tag/constants.d.ts +1 -0
- package/node/components/TagsList/Tag/constants.js +4 -0
- package/node/components/TagsList/Tag/index.d.ts +1 -0
- package/node/components/TagsList/Tag/index.js +1 -0
- package/node/components/TagsList/Tag/styles.js +2 -0
- package/node/components/TagsList/TagsList.js +6 -6
- package/node/components/TagsList/constants.d.ts +2 -0
- package/node/components/TagsList/constants.js +5 -0
- package/node/components/TagsList/styles.js +5 -1
- package/node/components/TagsList/types.d.ts +14 -5
- package/node/components/TagsList/useLogic/useLogic.d.ts +5 -5
- package/node/components/TagsList/useLogic/useLogic.js +70 -110
- package/node/components/TagsList/utils/calculateVisibleTagsCount/calculateVisibleTagsCount.d.ts +6 -0
- package/node/components/TagsList/utils/calculateVisibleTagsCount/calculateVisibleTagsCount.js +39 -0
- package/node/components/TagsList/utils/calculateVisibleTagsCount/index.d.ts +1 -0
- package/node/components/TagsList/utils/calculateVisibleTagsCount/index.js +5 -0
- package/node/components/TagsList/utils/getAvailableWidth/getAvailableWidth.d.ts +1 -0
- package/node/components/TagsList/utils/getAvailableWidth/getAvailableWidth.js +11 -0
- package/node/components/TagsList/utils/getAvailableWidth/index.d.ts +1 -0
- package/node/components/TagsList/utils/getAvailableWidth/index.js +5 -0
- package/node/components/TagsList/utils/getKey/getKey.d.ts +1 -1
- package/node/components/TagsList/utils/getKey/getKey.js +6 -3
- package/node/components/TagsList/utils/getTagWidth/getTagWidth.d.ts +2 -0
- package/node/components/TagsList/utils/getTagWidth/getTagWidth.js +25 -0
- package/node/components/TagsList/utils/getTagWidth/index.d.ts +1 -0
- package/node/components/TagsList/{public.js → utils/getTagWidth/index.js} +1 -2
- package/node/components/TagsList/utils/index.d.ts +3 -0
- package/node/components/TagsList/utils/index.js +7 -1
- package/node/components/TextField/TextField.js +6 -5
- package/node/components/TextField/constants.d.ts +1 -0
- package/node/components/TextField/constants.js +1 -0
- package/node/components/TextField/styles.js +4 -0
- package/node/components/Tree/TreeItem/styles.d.ts +2 -0
- package/node/components/TreeLikeAsyncAutocomplete/Input/Input.js +1 -1
- package/node/components/Typography/Typography.d.ts +1 -0
- package/node/components/Typography/Typography.js +6 -2
- package/node/components/Typography/constants.d.ts +3 -0
- package/node/components/Typography/constants.js +6 -0
- package/node/components/Typography/styles.js +5 -0
- package/node/components/Typography/types.d.ts +4 -0
- package/node/components/WelcomeScreen/styles.d.ts +2 -0
- package/node/components/fileUploading/FileInfo/styles.d.ts +1 -0
- package/node/components/placeholders/Placeholder/styles.d.ts +2 -0
- package/node/hook-form/EditableText/EditingForm/styles.d.ts +1 -0
- package/node/hook-form/EditableText/styles.d.ts +1 -0
- package/package.json +1 -1
- package/components/TagsList/public.d.ts +0 -2
- package/components/TagsList/public.js +0 -2
- package/node/components/TagsList/public.d.ts +0 -2
|
@@ -341,6 +341,7 @@ export declare const Value: import("@emotion/styled/dist/declarations/src/types"
|
|
|
341
341
|
colorIntensity?: import("../..").Intensity | undefined;
|
|
342
342
|
component?: import("../../Typography/types").ComponentProp | undefined;
|
|
343
343
|
isUpperCase?: boolean | undefined;
|
|
344
|
+
withoutCalt?: boolean | undefined;
|
|
344
345
|
} & import("react").HTMLAttributes<HTMLParagraphElement> & {
|
|
345
346
|
children?: import("react").ReactNode;
|
|
346
347
|
} & import("react").RefAttributes<HTMLElement> & {
|
|
@@ -354,6 +355,7 @@ export declare const CopyWrapper: import("@emotion/styled/dist/declarations/src/
|
|
|
354
355
|
colorIntensity?: import("../..").Intensity | undefined;
|
|
355
356
|
component?: import("../../Typography/types").ComponentProp | undefined;
|
|
356
357
|
isUpperCase?: boolean | undefined;
|
|
358
|
+
withoutCalt?: boolean | undefined;
|
|
357
359
|
} & import("react").HTMLAttributes<HTMLParagraphElement> & {
|
|
358
360
|
copyText?: string | undefined;
|
|
359
361
|
copyPosition?: "left" | "right" | undefined;
|
|
@@ -1037,6 +1039,7 @@ export declare const GuidValue: import("@emotion/styled/dist/declarations/src/ty
|
|
|
1037
1039
|
colorIntensity?: import("../..").Intensity | undefined;
|
|
1038
1040
|
component?: import("../../Typography/types").ComponentProp | undefined;
|
|
1039
1041
|
isUpperCase?: boolean | undefined;
|
|
1042
|
+
withoutCalt?: boolean | undefined;
|
|
1040
1043
|
} & import("react").HTMLAttributes<HTMLParagraphElement> & {
|
|
1041
1044
|
children?: import("react").ReactNode;
|
|
1042
1045
|
} & {
|
|
@@ -28,6 +28,7 @@ export declare const Content: import("@emotion/styled/dist/declarations/src/type
|
|
|
28
28
|
colorIntensity?: import("../../Typography").Intensity | undefined;
|
|
29
29
|
component?: import("../../Typography/types").ComponentProp | undefined;
|
|
30
30
|
isUpperCase?: boolean | undefined;
|
|
31
|
+
withoutCalt?: boolean | undefined;
|
|
31
32
|
} & import("react").HTMLAttributes<HTMLParagraphElement> & import("react").RefAttributes<HTMLSpanElement> & {
|
|
32
33
|
theme?: import("@emotion/react").Theme | undefined;
|
|
33
34
|
}, {}, {}>;
|
|
@@ -50,6 +51,7 @@ export declare const Title: import("@emotion/styled/dist/declarations/src/types"
|
|
|
50
51
|
colorIntensity?: import("../../Typography").Intensity | undefined;
|
|
51
52
|
component?: import("../../Typography/types").ComponentProp | undefined;
|
|
52
53
|
isUpperCase?: boolean | undefined;
|
|
54
|
+
withoutCalt?: boolean | undefined;
|
|
53
55
|
} & import("react").HTMLAttributes<HTMLParagraphElement> & import("react").RefAttributes<HTMLSpanElement> & {
|
|
54
56
|
theme?: import("@emotion/react").Theme | undefined;
|
|
55
57
|
}, {}, {}>;
|
|
@@ -4,10 +4,10 @@ exports.MaskField = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const react_imask_1 = require("react-imask");
|
|
7
|
-
const
|
|
7
|
+
const styles_1 = require("./styles");
|
|
8
8
|
const MaskedTextField = (0, react_imask_1.IMaskMixin)(({ ...props }) => {
|
|
9
9
|
const textFieldProps = props;
|
|
10
|
-
return (0, jsx_runtime_1.jsx)(
|
|
10
|
+
return (0, jsx_runtime_1.jsx)(styles_1.StyledTextField, { ...textFieldProps });
|
|
11
11
|
});
|
|
12
12
|
exports.MaskField = (0, react_1.forwardRef)(({ onChange, onAccept, ...props }, ref) => {
|
|
13
13
|
const maskFieldProps = { unmask: true, ...props };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const StyledTextField: import("@emotion/styled").StyledComponent<Omit<import("../TextField").TextFieldProps, "ref"> & import("react").RefAttributes<HTMLDivElement> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StyledTextField = void 0;
|
|
4
|
+
const styles_1 = require("@mui/material/styles");
|
|
5
|
+
const TextField_1 = require("../TextField");
|
|
6
|
+
exports.StyledTextField = (0, styles_1.styled)(TextField_1.TextField) `
|
|
7
|
+
font-feature-settings: "calt" 0;
|
|
8
|
+
`;
|
|
@@ -5,6 +5,7 @@ export declare const Label: import("@emotion/styled/dist/declarations/src/types"
|
|
|
5
5
|
colorIntensity?: import("../Typography").Intensity | undefined;
|
|
6
6
|
component?: import("../Typography/types").ComponentProp | undefined;
|
|
7
7
|
isUpperCase?: boolean | undefined;
|
|
8
|
+
withoutCalt?: boolean | undefined;
|
|
8
9
|
} & import("react").HTMLAttributes<HTMLParagraphElement> & import("react").RefAttributes<HTMLSpanElement> & {
|
|
9
10
|
theme?: import("@emotion/react").Theme | undefined;
|
|
10
11
|
}, {}, {}>;
|
|
@@ -24,6 +24,7 @@ export declare const StyledTypography: import("@emotion/styled/dist/declarations
|
|
|
24
24
|
colorIntensity?: import("../../Typography").Intensity | undefined;
|
|
25
25
|
component?: import("../../Typography/types").ComponentProp | undefined;
|
|
26
26
|
isUpperCase?: boolean | undefined;
|
|
27
|
+
withoutCalt?: boolean | undefined;
|
|
27
28
|
} & import("react").HTMLAttributes<HTMLParagraphElement> & import("react").RefAttributes<HTMLSpanElement> & {
|
|
28
29
|
theme?: import("@emotion/react").Theme | undefined;
|
|
29
30
|
} & {
|
|
@@ -5,6 +5,7 @@ export declare const Label: import("@emotion/styled/dist/declarations/src/types"
|
|
|
5
5
|
colorIntensity?: import("../../Typography").Intensity | undefined;
|
|
6
6
|
component?: import("../../Typography/types").ComponentProp | undefined;
|
|
7
7
|
isUpperCase?: boolean | undefined;
|
|
8
|
+
withoutCalt?: boolean | undefined;
|
|
8
9
|
} & import("react").HTMLAttributes<HTMLParagraphElement> & import("react").RefAttributes<HTMLSpanElement> & {
|
|
9
10
|
theme?: import("@emotion/react").Theme | undefined;
|
|
10
11
|
}, {}, {}>;
|
|
@@ -22,6 +22,7 @@ export declare const StyledTypography: import("@emotion/styled/dist/declarations
|
|
|
22
22
|
colorIntensity?: import("../Typography").Intensity | undefined;
|
|
23
23
|
component?: import("../Typography/types").ComponentProp | undefined;
|
|
24
24
|
isUpperCase?: boolean | undefined;
|
|
25
|
+
withoutCalt?: boolean | undefined;
|
|
25
26
|
} & import("react").HTMLAttributes<HTMLParagraphElement> & import("react").RefAttributes<HTMLSpanElement> & {
|
|
26
27
|
theme?: import("@emotion/react").Theme | undefined;
|
|
27
28
|
}, {}, {}>;
|
|
@@ -5,6 +5,7 @@ export declare const PageItem: import("@emotion/styled/dist/declarations/src/typ
|
|
|
5
5
|
colorIntensity?: import("../Typography").Intensity | undefined;
|
|
6
6
|
component?: import("../Typography/types").ComponentProp | undefined;
|
|
7
7
|
isUpperCase?: boolean | undefined;
|
|
8
|
+
withoutCalt?: boolean | undefined;
|
|
8
9
|
} & import("react").HTMLAttributes<HTMLParagraphElement> & import("react").RefAttributes<HTMLSpanElement> & {
|
|
9
10
|
theme?: import("@emotion/react").Theme | undefined;
|
|
10
11
|
}, {}, {}>;
|
|
@@ -632,6 +632,7 @@ export declare const NavMenuItemButtonText: import("@emotion/styled/dist/declara
|
|
|
632
632
|
colorIntensity?: import("../../..").Intensity | undefined;
|
|
633
633
|
component?: import("../../../Typography/types").ComponentProp | undefined;
|
|
634
634
|
isUpperCase?: boolean | undefined;
|
|
635
|
+
withoutCalt?: boolean | undefined;
|
|
635
636
|
} & import("react").HTMLAttributes<HTMLParagraphElement> & {
|
|
636
637
|
children?: import("react").ReactNode;
|
|
637
638
|
} & import("react").RefAttributes<HTMLElement> & {
|
|
@@ -9,6 +9,7 @@ export declare const Header: import("@emotion/styled/dist/declarations/src/types
|
|
|
9
9
|
colorIntensity?: import("../Typography").Intensity | undefined;
|
|
10
10
|
component?: import("../Typography/types").ComponentProp | undefined;
|
|
11
11
|
isUpperCase?: boolean | undefined;
|
|
12
|
+
withoutCalt?: boolean | undefined;
|
|
12
13
|
} & import("react").HTMLAttributes<HTMLParagraphElement> & import("react").RefAttributes<HTMLSpanElement> & {
|
|
13
14
|
theme?: import("@emotion/react").Theme | undefined;
|
|
14
15
|
}, {}, {}>;
|
|
@@ -18,6 +19,7 @@ export declare const Subheader: import("@emotion/styled/dist/declarations/src/ty
|
|
|
18
19
|
colorIntensity?: import("../Typography").Intensity | undefined;
|
|
19
20
|
component?: import("../Typography/types").ComponentProp | undefined;
|
|
20
21
|
isUpperCase?: boolean | undefined;
|
|
22
|
+
withoutCalt?: boolean | undefined;
|
|
21
23
|
} & import("react").HTMLAttributes<HTMLParagraphElement> & import("react").RefAttributes<HTMLSpanElement> & {
|
|
22
24
|
theme?: import("@emotion/react").Theme | undefined;
|
|
23
25
|
}, {}, {}>;
|
|
@@ -20,6 +20,7 @@ export declare const Content: import("@emotion/styled/dist/declarations/src/type
|
|
|
20
20
|
colorIntensity?: import("../../Typography").Intensity | undefined;
|
|
21
21
|
component?: import("../../Typography/types").ComponentProp | undefined;
|
|
22
22
|
isUpperCase?: boolean | undefined;
|
|
23
|
+
withoutCalt?: boolean | undefined;
|
|
23
24
|
} & import("react").HTMLAttributes<HTMLParagraphElement> & import("react").RefAttributes<HTMLSpanElement> & {
|
|
24
25
|
theme?: import("@emotion/react").Theme | undefined;
|
|
25
26
|
}, {}, {}>;
|
|
@@ -46,6 +47,7 @@ export declare const Title: import("@emotion/styled/dist/declarations/src/types"
|
|
|
46
47
|
colorIntensity?: import("../../Typography").Intensity | undefined;
|
|
47
48
|
component?: import("../../Typography/types").ComponentProp | undefined;
|
|
48
49
|
isUpperCase?: boolean | undefined;
|
|
50
|
+
withoutCalt?: boolean | undefined;
|
|
49
51
|
} & import("react").HTMLAttributes<HTMLParagraphElement> & import("react").RefAttributes<HTMLSpanElement> & {
|
|
50
52
|
theme?: import("@emotion/react").Theme | undefined;
|
|
51
53
|
}, {}, {}>;
|
|
@@ -10,6 +10,7 @@ export declare const Title: import("@emotion/styled/dist/declarations/src/types"
|
|
|
10
10
|
colorIntensity?: import("../../Typography").Intensity | undefined;
|
|
11
11
|
component?: import("../../Typography/types").ComponentProp | undefined;
|
|
12
12
|
isUpperCase?: boolean | undefined;
|
|
13
|
+
withoutCalt?: boolean | undefined;
|
|
13
14
|
} & import("react").HTMLAttributes<HTMLParagraphElement> & import("react").RefAttributes<HTMLSpanElement> & {
|
|
14
15
|
theme?: import("@emotion/react").Theme | undefined;
|
|
15
16
|
}, {}, {}>;
|
|
@@ -19,6 +20,7 @@ export declare const DateText: import("@emotion/styled/dist/declarations/src/typ
|
|
|
19
20
|
colorIntensity?: import("../../Typography").Intensity | undefined;
|
|
20
21
|
component?: import("../../Typography/types").ComponentProp | undefined;
|
|
21
22
|
isUpperCase?: boolean | undefined;
|
|
23
|
+
withoutCalt?: boolean | undefined;
|
|
22
24
|
} & import("react").HTMLAttributes<HTMLParagraphElement> & import("react").RefAttributes<HTMLSpanElement> & {
|
|
23
25
|
theme?: import("@emotion/react").Theme | undefined;
|
|
24
26
|
}, {}, {}>;
|
|
@@ -342,6 +342,7 @@ export declare const OverflowTypography: import("react").ForwardRefExoticCompone
|
|
|
342
342
|
colorIntensity?: import("../Typography").Intensity | undefined;
|
|
343
343
|
component?: import("../Typography/types").ComponentProp | undefined;
|
|
344
344
|
isUpperCase?: boolean | undefined;
|
|
345
|
+
withoutCalt?: boolean | undefined;
|
|
345
346
|
} & import("react").HTMLAttributes<HTMLParagraphElement> & {
|
|
346
347
|
children?: import("react").ReactNode;
|
|
347
348
|
} & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -9,6 +9,7 @@ export declare const StyledTypography: import("@emotion/styled/dist/declarations
|
|
|
9
9
|
colorIntensity?: import("../Typography").Intensity | undefined;
|
|
10
10
|
component?: import("../Typography/types").ComponentProp | undefined;
|
|
11
11
|
isUpperCase?: boolean | undefined;
|
|
12
|
+
withoutCalt?: boolean | undefined;
|
|
12
13
|
} & import("react").HTMLAttributes<HTMLParagraphElement> & import("react").RefAttributes<HTMLSpanElement> & {
|
|
13
14
|
theme?: import("@emotion/react").Theme | undefined;
|
|
14
15
|
} & OverflowTypographyWrapperProps, {}, {}>;
|
|
@@ -18,6 +19,7 @@ export declare const Wrapper: import("@emotion/styled/dist/declarations/src/type
|
|
|
18
19
|
colorIntensity?: import("../Typography").Intensity | undefined;
|
|
19
20
|
component?: import("../Typography/types").ComponentProp | undefined;
|
|
20
21
|
isUpperCase?: boolean | undefined;
|
|
22
|
+
withoutCalt?: boolean | undefined;
|
|
21
23
|
} & import("react").HTMLAttributes<HTMLParagraphElement> & import("react").RefAttributes<HTMLSpanElement> & {
|
|
22
24
|
theme?: import("@emotion/react").Theme | undefined;
|
|
23
25
|
} & {
|
|
@@ -5,6 +5,7 @@ export declare const TitleWrapper: import("@emotion/styled/dist/declarations/src
|
|
|
5
5
|
colorIntensity?: import("../../../Typography").Intensity | undefined;
|
|
6
6
|
component?: import("../../../Typography/types").ComponentProp | undefined;
|
|
7
7
|
isUpperCase?: boolean | undefined;
|
|
8
|
+
withoutCalt?: boolean | undefined;
|
|
8
9
|
} & import("react").HTMLAttributes<HTMLParagraphElement> & import("react").RefAttributes<HTMLSpanElement> & {
|
|
9
10
|
theme?: import("@emotion/react").Theme | undefined;
|
|
10
11
|
}, {}, {}>;
|
|
@@ -5,6 +5,7 @@ export declare const StyledTypography: import("@emotion/styled/dist/declarations
|
|
|
5
5
|
colorIntensity?: import("../../../Typography").Intensity | undefined;
|
|
6
6
|
component?: import("../../../Typography/types").ComponentProp | undefined;
|
|
7
7
|
isUpperCase?: boolean | undefined;
|
|
8
|
+
withoutCalt?: boolean | undefined;
|
|
8
9
|
} & import("react").HTMLAttributes<HTMLParagraphElement> & import("react").RefAttributes<HTMLSpanElement> & {
|
|
9
10
|
theme?: import("@emotion/react").Theme | undefined;
|
|
10
11
|
}, {}, {}>;
|
|
@@ -5,6 +5,7 @@ export declare const TitleWrapper: import("@emotion/styled/dist/declarations/src
|
|
|
5
5
|
colorIntensity?: import("../../Typography").Intensity | undefined;
|
|
6
6
|
component?: import("../../Typography/types").ComponentProp | undefined;
|
|
7
7
|
isUpperCase?: boolean | undefined;
|
|
8
|
+
withoutCalt?: boolean | undefined;
|
|
8
9
|
} & import("react").HTMLAttributes<HTMLParagraphElement> & import("react").RefAttributes<HTMLSpanElement> & {
|
|
9
10
|
theme?: import("@emotion/react").Theme | undefined;
|
|
10
11
|
} & {
|
|
@@ -5,6 +5,7 @@ export declare const Ellipsis: import("@emotion/styled/dist/declarations/src/typ
|
|
|
5
5
|
colorIntensity?: import("../../Typography").Intensity | undefined;
|
|
6
6
|
component?: import("../../Typography/types").ComponentProp | undefined;
|
|
7
7
|
isUpperCase?: boolean | undefined;
|
|
8
|
+
withoutCalt?: boolean | undefined;
|
|
8
9
|
} & import("react").HTMLAttributes<HTMLParagraphElement> & import("react").RefAttributes<HTMLSpanElement> & {
|
|
9
10
|
theme?: import("@emotion/react").Theme | undefined;
|
|
10
11
|
} & {
|
|
@@ -14,6 +14,7 @@ export declare const Content: import("@emotion/styled/dist/declarations/src/type
|
|
|
14
14
|
colorIntensity?: import("../Typography").Intensity | undefined;
|
|
15
15
|
component?: import("../Typography/types").ComponentProp | undefined;
|
|
16
16
|
isUpperCase?: boolean | undefined;
|
|
17
|
+
withoutCalt?: boolean | undefined;
|
|
17
18
|
} & import("react").HTMLAttributes<HTMLParagraphElement> & import("react").RefAttributes<HTMLSpanElement> & {
|
|
18
19
|
theme?: import("@emotion/react").Theme | undefined;
|
|
19
20
|
}, {}, {}>;
|
|
@@ -19,6 +19,7 @@ export declare const ProductName: import("@emotion/styled/dist/declarations/src/
|
|
|
19
19
|
colorIntensity?: import("../../Typography").Intensity | undefined;
|
|
20
20
|
component?: import("../../Typography/types").ComponentProp | undefined;
|
|
21
21
|
isUpperCase?: boolean | undefined;
|
|
22
|
+
withoutCalt?: boolean | undefined;
|
|
22
23
|
} & import("react").HTMLAttributes<HTMLParagraphElement> & import("react").RefAttributes<HTMLSpanElement> & {
|
|
23
24
|
theme?: import("@emotion/react").Theme | undefined;
|
|
24
25
|
}, {}, {}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const MAX_TAG_WIDTH = "246px";
|
|
@@ -6,6 +6,8 @@ const Tag_1 = require("../../Tag");
|
|
|
6
6
|
exports.StyledTag = (0, styled_1.styled)(Tag_1.Tag, {
|
|
7
7
|
shouldForwardProp: (prop) => prop !== '$shrinks',
|
|
8
8
|
}) `
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
|
|
9
11
|
/* 4em ширина необходима для отображения двух букв и избежания перекрытия кнопкой сброса всего текста тега */
|
|
10
12
|
min-width: ${({ $shrinks }) => ($shrinks ? 'calc(2em + 20px)' : 'unset')};
|
|
11
13
|
max-width: 246px;
|
|
@@ -11,11 +11,11 @@ const utils_1 = require("./utils");
|
|
|
11
11
|
* Не предназначен для использования в продуктах, не экспортируется из пакета
|
|
12
12
|
*/
|
|
13
13
|
const TagsList = (props) => {
|
|
14
|
-
const {
|
|
15
|
-
const { className,
|
|
16
|
-
return ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { className: className, ref: tagsContainerRef, children: [visibleOptions?.map((option
|
|
17
|
-
const tagProps = getTagProps(option
|
|
18
|
-
return ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { isDisabled: isDisabled, onClick: onClick, ...tagProps }, (0, utils_1.getKey)(option, keyId)));
|
|
19
|
-
}),
|
|
14
|
+
const { hiddenCount, tagsContainerRef, visibleOptions, getTagProps, showCounter, } = (0, useLogic_1.useLogic)(props);
|
|
15
|
+
const { className, keyId, isDisabled, onClick, getOptionLabel } = props;
|
|
16
|
+
return ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { className: className, ref: tagsContainerRef, children: [visibleOptions?.map((option) => {
|
|
17
|
+
const tagProps = getTagProps(option);
|
|
18
|
+
return ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { isDisabled: isDisabled, onClick: onClick, ...tagProps }, (0, utils_1.getKey)(option, keyId, getOptionLabel)));
|
|
19
|
+
}), showCounter && ((0, jsx_runtime_1.jsx)(styles_1.CounterTag, { isDisabled: isDisabled, label: `+${hiddenCount}`, onClick: onClick }, "more"))] }));
|
|
20
20
|
};
|
|
21
21
|
exports.TagsList = TagsList;
|
|
@@ -3,12 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CounterTag = exports.Wrapper = void 0;
|
|
4
4
|
const styled_1 = require("../styled");
|
|
5
5
|
const Tag_1 = require("../Tag");
|
|
6
|
+
const constants_1 = require("./constants");
|
|
6
7
|
const Tag_2 = require("./Tag");
|
|
7
8
|
exports.Wrapper = styled_1.styled.div `
|
|
9
|
+
overflow: hidden;
|
|
8
10
|
display: flex;
|
|
9
|
-
column-gap: ${
|
|
11
|
+
column-gap: ${constants_1.GAP_BETWEEN_TAGS}px;
|
|
10
12
|
`;
|
|
11
13
|
exports.CounterTag = (0, styled_1.styled)(Tag_2.Tag) `
|
|
14
|
+
overflow: unset;
|
|
15
|
+
|
|
12
16
|
.${Tag_1.tagClassnames.label} {
|
|
13
17
|
min-width: unset;
|
|
14
18
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type MouseEvent } from 'react';
|
|
1
|
+
import { type MouseEvent, type RefObject } from 'react';
|
|
2
2
|
export type TagValue = string | Record<string, unknown>;
|
|
3
3
|
export type TagsListProps<TData extends TagValue = TagValue> = {
|
|
4
4
|
/**
|
|
@@ -14,16 +14,25 @@ export type TagsListProps<TData extends TagValue = TagValue> = {
|
|
|
14
14
|
*/
|
|
15
15
|
isDisabled?: boolean;
|
|
16
16
|
/**
|
|
17
|
-
* Поле, используемое в качестве ключа
|
|
17
|
+
* Поле, используемое в качестве ключа списка.
|
|
18
|
+
* Если не передано, для генерации ключа будет использоваться getOptionLabel
|
|
18
19
|
*/
|
|
19
|
-
keyId
|
|
20
|
+
keyId?: TData extends string ? never : keyof TData;
|
|
20
21
|
/**
|
|
21
22
|
* Используется для определения строкового значения опции
|
|
22
23
|
*/
|
|
23
24
|
getOptionLabel: (value: TData) => string | number;
|
|
24
25
|
onChange: (value: TData[] | undefined) => void;
|
|
25
26
|
/**
|
|
26
|
-
* Функция, вызываемая при клике
|
|
27
|
+
* Функция, вызываемая при клике на тэг
|
|
27
28
|
*/
|
|
28
|
-
onClick
|
|
29
|
+
onClick?: (value: MouseEvent<HTMLDivElement>) => void;
|
|
30
|
+
/**
|
|
31
|
+
* Ref на внешний контейнер, чья ширина используется как база для расчёта доступного пространства..
|
|
32
|
+
*/
|
|
33
|
+
inputContainerRef?: RefObject<HTMLElement | null>;
|
|
34
|
+
/**
|
|
35
|
+
* Зарезервированная ширина, которая будет вычтена из доступной ширины при расчете количества отображаемых тегов
|
|
36
|
+
*/
|
|
37
|
+
reservedWidth?: number;
|
|
29
38
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { TagValue } from '../types';
|
|
3
|
-
import { type TagsListProps } from '../types';
|
|
2
|
+
import type { TagsListProps, TagValue } from '../types';
|
|
4
3
|
type UseLogicParams<TData extends TagValue> = TagsListProps<TData>;
|
|
5
|
-
export declare const useLogic: <TData extends TagValue>({ data, keyId, getOptionLabel, onChange, }: UseLogicParams<TData>) => {
|
|
6
|
-
maxItems: number;
|
|
4
|
+
export declare const useLogic: <TData extends TagValue>({ data, keyId, getOptionLabel, onChange, inputContainerRef, reservedWidth, }: UseLogicParams<TData>) => {
|
|
7
5
|
visibleOptions: TData[];
|
|
6
|
+
hiddenCount: number;
|
|
7
|
+
showCounter: boolean;
|
|
8
8
|
tagsContainerRef: import("react").RefObject<HTMLDivElement | null>;
|
|
9
|
-
getTagProps: (option: TData
|
|
9
|
+
getTagProps: (option: TData) => {
|
|
10
10
|
label: string | number;
|
|
11
11
|
shrinks: boolean;
|
|
12
12
|
onDelete: () => void;
|