@cloud-ru/uikit-product-title-clickable 0.0.48 → 0.0.50

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 (34) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/cjs/components/TitleClickable.d.ts +2 -0
  3. package/dist/cjs/components/TitleClickable.js +28 -0
  4. package/dist/cjs/components/helperComponents/TitleClickableContent.d.ts +4 -0
  5. package/dist/cjs/components/helperComponents/TitleClickableContent.js +16 -0
  6. package/dist/cjs/components/helperComponents/index.d.ts +1 -0
  7. package/dist/cjs/components/helperComponents/index.js +5 -0
  8. package/dist/cjs/components/helperComponents/styles.module.css +25 -0
  9. package/dist/cjs/components/index.d.ts +1 -0
  10. package/dist/cjs/components/index.js +17 -0
  11. package/dist/cjs/components/styles.module.css +43 -0
  12. package/dist/cjs/constants.d.ts +10 -0
  13. package/dist/cjs/constants.js +14 -0
  14. package/dist/cjs/index.d.ts +2 -0
  15. package/dist/cjs/index.js +17 -0
  16. package/dist/cjs/types.d.ts +31 -0
  17. package/dist/cjs/types.js +2 -0
  18. package/dist/esm/components/TitleClickable.d.ts +2 -0
  19. package/dist/esm/components/TitleClickable.js +22 -0
  20. package/dist/esm/components/helperComponents/TitleClickableContent.d.ts +4 -0
  21. package/dist/esm/components/helperComponents/TitleClickableContent.js +10 -0
  22. package/dist/esm/components/helperComponents/index.d.ts +1 -0
  23. package/dist/esm/components/helperComponents/index.js +1 -0
  24. package/dist/esm/components/helperComponents/styles.module.css +25 -0
  25. package/dist/esm/components/index.d.ts +1 -0
  26. package/dist/esm/components/index.js +1 -0
  27. package/dist/esm/components/styles.module.css +43 -0
  28. package/dist/esm/constants.d.ts +10 -0
  29. package/dist/esm/constants.js +11 -0
  30. package/dist/esm/index.d.ts +2 -0
  31. package/dist/esm/index.js +1 -0
  32. package/dist/esm/types.d.ts +31 -0
  33. package/dist/esm/types.js +1 -0
  34. package/package.json +4 -3
package/CHANGELOG.md CHANGED
@@ -3,6 +3,26 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 0.0.50 (2025-11-13)
7
+
8
+ ### Only dependencies have been changed
9
+ * [@cloud-ru/uikit-product-icons@15.1.3](https://gitverse.ru/cloud-ru-tech/uikit-product/-/blob/master/packages/icons/CHANGELOG.md)
10
+
11
+
12
+
13
+
14
+
15
+ ## 0.0.49 (2025-11-12)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * **PD-3377:** contributors update to publish all packages ([719fd3e](https://gitverse.ru/cloud-ru-tech/uikit-product/commits/719fd3e1249e247443b125c47ea408d92c8395c3))
21
+
22
+
23
+
24
+
25
+
6
26
  ## 0.0.48 (2025-11-12)
7
27
 
8
28
  ### Only dependencies have been changed
@@ -0,0 +1,2 @@
1
+ import { TitleClickableProps } from '../types';
2
+ export declare function TitleClickable({ className, href, target, fullWidth, onClick, title, icon, children, titleTag, avatar, ...props }: TitleClickableProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.TitleClickable = TitleClickable;
18
+ const jsx_runtime_1 = require("react/jsx-runtime");
19
+ const classnames_1 = __importDefault(require("classnames"));
20
+ const uikit_product_icons_1 = require("@sbercloud/uikit-product-icons");
21
+ const utils_1 = require("@snack-uikit/utils");
22
+ const constants_1 = require("../constants");
23
+ const helperComponents_1 = require("./helperComponents");
24
+ const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
25
+ function TitleClickable(_a) {
26
+ var { className, href, target, fullWidth, onClick, title, icon, children, titleTag, avatar } = _a, props = __rest(_a, ["className", "href", "target", "fullWidth", "onClick", "title", "icon", "children", "titleTag", "avatar"]);
27
+ return ((0, jsx_runtime_1.jsxs)("a", Object.assign({}, (0, utils_1.extractSupportProps)(props), { className: (0, classnames_1.default)(styles_module_scss_1.default.titleClickable, className), href: href, target: target, onClick: onClick, rel: target === '_blank' ? 'noopener noreferrer' : undefined, "data-full-width": fullWidth || undefined, children: [(0, jsx_runtime_1.jsx)(helperComponents_1.TitleClickableContent, { title: title, icon: icon, avatar: avatar, titleTag: titleTag, fullWidth: fullWidth, children: children }), (0, jsx_runtime_1.jsx)("div", { "data-test-id": constants_1.TEST_IDS.chevron, className: styles_module_scss_1.default.iconWrapper, children: (0, jsx_runtime_1.jsx)(uikit_product_icons_1.ChevronRightSVG, { size: 24 }) })] })));
28
+ }
@@ -0,0 +1,4 @@
1
+ import { TitleClickableProps } from '../../types';
2
+ type TitleClickableContent = Pick<TitleClickableProps, 'title' | 'icon' | 'children' | 'titleTag' | 'avatar' | 'fullWidth'>;
3
+ export declare function TitleClickableContent({ title, icon, children, titleTag, avatar, fullWidth }: TitleClickableContent): import("react/jsx-runtime").JSX.Element;
4
+ export {};
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.TitleClickableContent = TitleClickableContent;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const avatar_1 = require("@snack-uikit/avatar");
9
+ const icon_predefined_1 = require("@snack-uikit/icon-predefined");
10
+ const truncate_string_1 = require("@snack-uikit/truncate-string");
11
+ const typography_1 = require("@snack-uikit/typography");
12
+ const constants_1 = require("../../constants");
13
+ const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
14
+ function TitleClickableContent({ title, icon, children, titleTag, avatar, fullWidth }) {
15
+ return ((0, jsx_runtime_1.jsxs)("div", { "data-test-id": constants_1.TEST_IDS.content, className: styles_module_scss_1.default.contentWrapper, "data-full-width": fullWidth || undefined, children: [icon && (0, jsx_runtime_1.jsx)(icon_predefined_1.IconPredefined, { "data-test-id": constants_1.TEST_IDS.icon, icon: icon, appearance: 'neutral', decor: false, size: 's' }), title && ((0, jsx_runtime_1.jsx)(typography_1.Typography.SansTitleM, { tag: titleTag, "data-test-id": constants_1.TEST_IDS.title, children: (0, jsx_runtime_1.jsx)(truncate_string_1.TruncateString, { text: title, maxLines: 1, variant: 'end' }) })), avatar && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(avatar_1.Avatar, Object.assign({}, avatar, { "data-test-id": constants_1.TEST_IDS.avatar })), (0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.avatarWrapper, children: [(0, jsx_runtime_1.jsx)(typography_1.Typography.SansLabelL, { tag: 'span', "data-test-id": constants_1.TEST_IDS.avatarLabel, children: (0, jsx_runtime_1.jsx)(truncate_string_1.TruncateString, { text: avatar.name, maxLines: 1, variant: 'end' }) }), (0, jsx_runtime_1.jsx)(typography_1.Typography.SansBodyS, { className: styles_module_scss_1.default.subtitle, tag: 'span', "data-test-id": constants_1.TEST_IDS.avatarSubtitle, children: (0, jsx_runtime_1.jsx)(truncate_string_1.TruncateString, { text: avatar.subtitle, maxLines: 1, variant: 'end' }) })] })] })), children] }));
16
+ }
@@ -0,0 +1 @@
1
+ export { TitleClickableContent } from './TitleClickableContent';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TitleClickableContent = void 0;
4
+ var TitleClickableContent_1 = require("./TitleClickableContent");
5
+ Object.defineProperty(exports, "TitleClickableContent", { enumerable: true, get: function () { return TitleClickableContent_1.TitleClickableContent; } });
@@ -0,0 +1,25 @@
1
+ .contentWrapper{
2
+ display:flex;
3
+ gap:var(--dimension-1m, 8px);
4
+ align-items:center;
5
+ max-width:100%;
6
+ }
7
+ .contentWrapper[data-full-width]{
8
+ width:100%;
9
+ }
10
+
11
+ .iconTitleWrapper{
12
+ display:flex;
13
+ gap:var(--dimension-1m, 8px);
14
+ align-items:center;
15
+ }
16
+
17
+ .avatarWrapper{
18
+ display:flex;
19
+ flex-direction:column;
20
+ max-width:100%;
21
+ }
22
+
23
+ .subtitle{
24
+ color:var(--sys-neutral-text-light, #8b8e9b);
25
+ }
@@ -0,0 +1 @@
1
+ export * from './TitleClickable';
@@ -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("./TitleClickable"), exports);
@@ -0,0 +1,43 @@
1
+ .contentWrapper{
2
+ display:flex;
3
+ gap:var(--dimension-1m, 8px);
4
+ align-items:center;
5
+ max-width:100%;
6
+ }
7
+
8
+ .titleClickable{
9
+ cursor:pointer;
10
+ display:flex;
11
+ gap:var(--dimension-1m, 8px);
12
+ align-items:center;
13
+ box-sizing:border-box;
14
+ max-width:-moz-fit-content;
15
+ max-width:fit-content;
16
+ padding:0 var(--dimension-050m, 4px);
17
+ color:var(--sys-neutral-text-main, #41424e);
18
+ }
19
+ .titleClickable[data-full-width]{
20
+ width:100%;
21
+ max-width:100%;
22
+ }
23
+ .titleClickable:focus-visible{
24
+ outline-width:var(--border-state-focus-s-border-width, 2px);
25
+ outline-style:var(--border-state-focus-s-border-style, solid);
26
+ outline-color:var(--border-state-focus-s-border-color, );
27
+ border-radius:var(--dimension-050m, 4px);
28
+ outline-color:var(--sys-available-complementary, #1c1c24);
29
+ }
30
+ .titleClickable:active{
31
+ outline:none;
32
+ }
33
+
34
+ .iconWrapper{
35
+ display:flex;
36
+ align-items:center;
37
+ justify-content:center;
38
+ width:20px;
39
+ height:20px;
40
+ background-color:var(--sys-neutral-decor-disabled, #e6e8ef);
41
+ border-radius:var(--dimension-050m, 4px);
42
+ color:var(--sys-neutral-accent-default, #787b8a);
43
+ }
@@ -0,0 +1,10 @@
1
+ export declare const TEST_IDS: {
2
+ content: string;
3
+ chevron: string;
4
+ icon: string;
5
+ title: string;
6
+ avatar: string;
7
+ avatarLabel: string;
8
+ avatarSubtitle: string;
9
+ subtitle: string;
10
+ };
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TEST_IDS = void 0;
4
+ const PREFIX = 'title-clickable';
5
+ exports.TEST_IDS = {
6
+ content: `${PREFIX}__content`,
7
+ chevron: `${PREFIX}__chevron`,
8
+ icon: `${PREFIX}__icon`,
9
+ title: `${PREFIX}__title`,
10
+ avatar: `${PREFIX}__avatar`,
11
+ avatarLabel: `${PREFIX}__avatar-label`,
12
+ avatarSubtitle: `${PREFIX}__avatar-subtitle`,
13
+ subtitle: `${PREFIX}__subtitle`,
14
+ };
@@ -0,0 +1,2 @@
1
+ export * from './components';
2
+ export type { TitleClickableProps } 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("./components"), exports);
@@ -0,0 +1,31 @@
1
+ import { AnchorHTMLAttributes, JSXElementConstructor, MouseEventHandler, ReactNode } from 'react';
2
+ import { AvatarProps } from '@snack-uikit/avatar';
3
+ import { Tag } from '@snack-uikit/typography';
4
+ import { WithSupportProps } from '@snack-uikit/utils';
5
+ export type TitleClickableProps = WithSupportProps<{
6
+ /** Аватар */
7
+ avatar?: AvatarProps & {
8
+ subtitle: string;
9
+ };
10
+ /** Заголовок */
11
+ title?: string;
12
+ /** Дочерний компонент */
13
+ children?: ReactNode;
14
+ /** Иконка */
15
+ icon?: JSXElementConstructor<{
16
+ size?: number;
17
+ className?: string;
18
+ }>;
19
+ /** Занимает ли всю ширину **/
20
+ fullWidth?: boolean;
21
+ /** Ссылка */
22
+ href: string;
23
+ /** HTML-атрибут target */
24
+ target?: AnchorHTMLAttributes<HTMLAnchorElement>['target'];
25
+ /** Колбек обработки клика */
26
+ onClick?: MouseEventHandler<HTMLAnchorElement>;
27
+ /** CSS-класс */
28
+ className?: string;
29
+ /** Тег заголовка для семантики */
30
+ titleTag?: Tag;
31
+ }>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ import { TitleClickableProps } from '../types';
2
+ export declare function TitleClickable({ className, href, target, fullWidth, onClick, title, icon, children, titleTag, avatar, ...props }: TitleClickableProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,22 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import cn from 'classnames';
14
+ import { ChevronRightSVG } from '@sbercloud/uikit-product-icons';
15
+ import { extractSupportProps } from '@snack-uikit/utils';
16
+ import { TEST_IDS } from '../constants';
17
+ import { TitleClickableContent } from './helperComponents';
18
+ import styles from './styles.module.css';
19
+ export function TitleClickable(_a) {
20
+ var { className, href, target, fullWidth, onClick, title, icon, children, titleTag, avatar } = _a, props = __rest(_a, ["className", "href", "target", "fullWidth", "onClick", "title", "icon", "children", "titleTag", "avatar"]);
21
+ return (_jsxs("a", Object.assign({}, extractSupportProps(props), { className: cn(styles.titleClickable, className), href: href, target: target, onClick: onClick, rel: target === '_blank' ? 'noopener noreferrer' : undefined, "data-full-width": fullWidth || undefined, children: [_jsx(TitleClickableContent, { title: title, icon: icon, avatar: avatar, titleTag: titleTag, fullWidth: fullWidth, children: children }), _jsx("div", { "data-test-id": TEST_IDS.chevron, className: styles.iconWrapper, children: _jsx(ChevronRightSVG, { size: 24 }) })] })));
22
+ }
@@ -0,0 +1,4 @@
1
+ import { TitleClickableProps } from '../../types';
2
+ type TitleClickableContent = Pick<TitleClickableProps, 'title' | 'icon' | 'children' | 'titleTag' | 'avatar' | 'fullWidth'>;
3
+ export declare function TitleClickableContent({ title, icon, children, titleTag, avatar, fullWidth }: TitleClickableContent): import("react/jsx-runtime").JSX.Element;
4
+ export {};
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { Avatar } from '@snack-uikit/avatar';
3
+ import { IconPredefined } from '@snack-uikit/icon-predefined';
4
+ import { TruncateString } from '@snack-uikit/truncate-string';
5
+ import { Typography } from '@snack-uikit/typography';
6
+ import { TEST_IDS } from '../../constants';
7
+ import styles from './styles.module.css';
8
+ export function TitleClickableContent({ title, icon, children, titleTag, avatar, fullWidth }) {
9
+ return (_jsxs("div", { "data-test-id": TEST_IDS.content, className: styles.contentWrapper, "data-full-width": fullWidth || undefined, children: [icon && _jsx(IconPredefined, { "data-test-id": TEST_IDS.icon, icon: icon, appearance: 'neutral', decor: false, size: 's' }), title && (_jsx(Typography.SansTitleM, { tag: titleTag, "data-test-id": TEST_IDS.title, children: _jsx(TruncateString, { text: title, maxLines: 1, variant: 'end' }) })), avatar && (_jsxs(_Fragment, { children: [_jsx(Avatar, Object.assign({}, avatar, { "data-test-id": TEST_IDS.avatar })), _jsxs("div", { className: styles.avatarWrapper, children: [_jsx(Typography.SansLabelL, { tag: 'span', "data-test-id": TEST_IDS.avatarLabel, children: _jsx(TruncateString, { text: avatar.name, maxLines: 1, variant: 'end' }) }), _jsx(Typography.SansBodyS, { className: styles.subtitle, tag: 'span', "data-test-id": TEST_IDS.avatarSubtitle, children: _jsx(TruncateString, { text: avatar.subtitle, maxLines: 1, variant: 'end' }) })] })] })), children] }));
10
+ }
@@ -0,0 +1 @@
1
+ export { TitleClickableContent } from './TitleClickableContent';
@@ -0,0 +1 @@
1
+ export { TitleClickableContent } from './TitleClickableContent';
@@ -0,0 +1,25 @@
1
+ .contentWrapper{
2
+ display:flex;
3
+ gap:var(--dimension-1m, 8px);
4
+ align-items:center;
5
+ max-width:100%;
6
+ }
7
+ .contentWrapper[data-full-width]{
8
+ width:100%;
9
+ }
10
+
11
+ .iconTitleWrapper{
12
+ display:flex;
13
+ gap:var(--dimension-1m, 8px);
14
+ align-items:center;
15
+ }
16
+
17
+ .avatarWrapper{
18
+ display:flex;
19
+ flex-direction:column;
20
+ max-width:100%;
21
+ }
22
+
23
+ .subtitle{
24
+ color:var(--sys-neutral-text-light, #8b8e9b);
25
+ }
@@ -0,0 +1 @@
1
+ export * from './TitleClickable';
@@ -0,0 +1 @@
1
+ export * from './TitleClickable';
@@ -0,0 +1,43 @@
1
+ .contentWrapper{
2
+ display:flex;
3
+ gap:var(--dimension-1m, 8px);
4
+ align-items:center;
5
+ max-width:100%;
6
+ }
7
+
8
+ .titleClickable{
9
+ cursor:pointer;
10
+ display:flex;
11
+ gap:var(--dimension-1m, 8px);
12
+ align-items:center;
13
+ box-sizing:border-box;
14
+ max-width:-moz-fit-content;
15
+ max-width:fit-content;
16
+ padding:0 var(--dimension-050m, 4px);
17
+ color:var(--sys-neutral-text-main, #41424e);
18
+ }
19
+ .titleClickable[data-full-width]{
20
+ width:100%;
21
+ max-width:100%;
22
+ }
23
+ .titleClickable:focus-visible{
24
+ outline-width:var(--border-state-focus-s-border-width, 2px);
25
+ outline-style:var(--border-state-focus-s-border-style, solid);
26
+ outline-color:var(--border-state-focus-s-border-color, );
27
+ border-radius:var(--dimension-050m, 4px);
28
+ outline-color:var(--sys-available-complementary, #1c1c24);
29
+ }
30
+ .titleClickable:active{
31
+ outline:none;
32
+ }
33
+
34
+ .iconWrapper{
35
+ display:flex;
36
+ align-items:center;
37
+ justify-content:center;
38
+ width:20px;
39
+ height:20px;
40
+ background-color:var(--sys-neutral-decor-disabled, #e6e8ef);
41
+ border-radius:var(--dimension-050m, 4px);
42
+ color:var(--sys-neutral-accent-default, #787b8a);
43
+ }
@@ -0,0 +1,10 @@
1
+ export declare const TEST_IDS: {
2
+ content: string;
3
+ chevron: string;
4
+ icon: string;
5
+ title: string;
6
+ avatar: string;
7
+ avatarLabel: string;
8
+ avatarSubtitle: string;
9
+ subtitle: string;
10
+ };
@@ -0,0 +1,11 @@
1
+ const PREFIX = 'title-clickable';
2
+ export const TEST_IDS = {
3
+ content: `${PREFIX}__content`,
4
+ chevron: `${PREFIX}__chevron`,
5
+ icon: `${PREFIX}__icon`,
6
+ title: `${PREFIX}__title`,
7
+ avatar: `${PREFIX}__avatar`,
8
+ avatarLabel: `${PREFIX}__avatar-label`,
9
+ avatarSubtitle: `${PREFIX}__avatar-subtitle`,
10
+ subtitle: `${PREFIX}__subtitle`,
11
+ };
@@ -0,0 +1,2 @@
1
+ export * from './components';
2
+ export type { TitleClickableProps } from './types';
@@ -0,0 +1 @@
1
+ export * from './components';
@@ -0,0 +1,31 @@
1
+ import { AnchorHTMLAttributes, JSXElementConstructor, MouseEventHandler, ReactNode } from 'react';
2
+ import { AvatarProps } from '@snack-uikit/avatar';
3
+ import { Tag } from '@snack-uikit/typography';
4
+ import { WithSupportProps } from '@snack-uikit/utils';
5
+ export type TitleClickableProps = WithSupportProps<{
6
+ /** Аватар */
7
+ avatar?: AvatarProps & {
8
+ subtitle: string;
9
+ };
10
+ /** Заголовок */
11
+ title?: string;
12
+ /** Дочерний компонент */
13
+ children?: ReactNode;
14
+ /** Иконка */
15
+ icon?: JSXElementConstructor<{
16
+ size?: number;
17
+ className?: string;
18
+ }>;
19
+ /** Занимает ли всю ширину **/
20
+ fullWidth?: boolean;
21
+ /** Ссылка */
22
+ href: string;
23
+ /** HTML-атрибут target */
24
+ target?: AnchorHTMLAttributes<HTMLAnchorElement>['target'];
25
+ /** Колбек обработки клика */
26
+ onClick?: MouseEventHandler<HTMLAnchorElement>;
27
+ /** CSS-класс */
28
+ className?: string;
29
+ /** Тег заголовка для семантики */
30
+ titleTag?: Tag;
31
+ }>;
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloud-ru/uikit-product-title-clickable",
3
3
  "title": "Title Clickable",
4
- "version": "0.0.48",
4
+ "version": "0.0.50",
5
5
  "sideEffects": [
6
6
  "*.css",
7
7
  "*.woff",
@@ -30,13 +30,14 @@
30
30
  "name": "Akhremenko Grigorii",
31
31
  "url": "https://github.com/AGrigorii"
32
32
  },
33
+ "contributors": [],
33
34
  "license": "Apache-2.0",
34
35
  "publishConfig": {
35
36
  "access": "public"
36
37
  },
37
38
  "scripts": {},
38
39
  "dependencies": {
39
- "@cloud-ru/uikit-product-icons": "15.1.1",
40
+ "@cloud-ru/uikit-product-icons": "15.1.3",
40
41
  "@snack-uikit/avatar": "0.8.4",
41
42
  "@snack-uikit/icon-predefined": "0.7.3",
42
43
  "@snack-uikit/truncate-string": "0.6.9",
@@ -44,5 +45,5 @@
44
45
  "@snack-uikit/utils": "3.7.0",
45
46
  "classnames": "2.5.1"
46
47
  },
47
- "gitHead": "e8bd79bc92b26a8f52611972eec98a867536ccd3"
48
+ "gitHead": "bf479ecf7238ef20b78f20acaef439efa535d1a1"
48
49
  }