@sima-land/moleculas 16.0.0-alpha.17 → 16.0.0-alpha.19
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/common/components/badge/badge.d.ts +2 -13
- package/common/components/badge/badge.js +7 -2
- package/common/components/badge/badge.js.map +1 -1
- package/common/components/badge/badge.module.scss +65 -24
- package/common/components/badge/index.d.ts +2 -1
- package/common/components/badge/index.js.map +1 -1
- package/common/components/badge/types.d.ts +26 -0
- package/common/components/badge/types.js +3 -0
- package/common/components/badge/types.js.map +1 -0
- package/common/components/media-modal/parts/product-brief.d.ts +4 -2
- package/common/components/media-modal/parts/product-brief.js +3 -2
- package/common/components/media-modal/parts/product-brief.js.map +1 -1
- package/common/components/media-modal/parts/product-brief.module.scss +5 -1
- package/common/components/media-modal/parts/thumbnail.module.scss +30 -13
- package/package.json +3 -3
|
@@ -1,16 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
type: 'text' | 'timer' | 'svg-url';
|
|
4
|
-
value: string;
|
|
5
|
-
}
|
|
6
|
-
export interface BadgeProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'color'> {
|
|
7
|
-
/** Основной цвет, используется как цвет обводки, иконок и текста. */
|
|
8
|
-
color?: string;
|
|
9
|
-
/** Содержимое шильдика. */
|
|
10
|
-
fields: Array<BadgeField>;
|
|
11
|
-
/** Идентификатор для систем автоматизированного тестирования. */
|
|
12
|
-
'data-testid'?: string;
|
|
13
|
-
}
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { BadgeProps } from './types';
|
|
14
3
|
/**
|
|
15
4
|
* Шильдик.
|
|
16
5
|
* @param props Свойства.
|
|
@@ -15,9 +15,14 @@ const cx = bind_1.default.bind(badge_module_scss_1.default);
|
|
|
15
15
|
* @param props Свойства.
|
|
16
16
|
* @return Элемент.
|
|
17
17
|
*/
|
|
18
|
-
exports.Badge = (0, react_1.forwardRef)(function Badge({ className, color, fields, href, style, 'data-testid': testId = 'badge', ...restProps }, ref) {
|
|
18
|
+
exports.Badge = (0, react_1.forwardRef)(function Badge({ className, color, coloring = 'outline', fields, href, style, shape = 'unset', withHoverEffect = Boolean(href), 'data-testid': testId = 'badge', ...restProps }, ref) {
|
|
19
19
|
const iconOnly = fields.length === 1 && fields[0].type === 'svg-url';
|
|
20
|
-
|
|
20
|
+
const rootClassName = cx('root', iconOnly && 'icon-only', withHoverEffect && 'with-hover-effect', shape === 'round' && 'shape-round', shape === 'pill' && 'shape-pill', shape !== 'pill' && !iconOnly && 'padding-x-default', shape === 'pill' && !iconOnly && 'padding-x-pill', coloring === 'outline' && 'coloring-outline', coloring === 'fill' && 'coloring-fill', className);
|
|
21
|
+
const rootStyle = {
|
|
22
|
+
'--badge-color': color,
|
|
23
|
+
...style,
|
|
24
|
+
};
|
|
25
|
+
return ((0, jsx_runtime_1.jsx)("a", { ref: ref, ...restProps, "data-testid": testId, href: href, style: rootStyle, className: rootClassName, children: iconOnly ? ((0, jsx_runtime_1.jsx)("img", { className: cx('icon'), src: fields[0].value, alt: '' })) : (
|
|
21
26
|
// вложенный span нужен для того чтобы объединить `display: inline-flex` и `text-overflow: ellipsis`
|
|
22
27
|
(0, jsx_runtime_1.jsx)("span", { className: cx('content'), children: fields.reduce((acc, item, i) => {
|
|
23
28
|
let result = null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.js","sourceRoot":"","sources":["../../../../src/common/components/badge/badge.tsx"],"names":[],"mappings":";;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"badge.js","sourceRoot":"","sources":["../../../../src/common/components/badge/badge.tsx"],"names":[],"mappings":";;;;;;;AAAA,iCAA8C;AAE9C,wDAAqD;AACrD,2DAAyC;AACzC,4EAAyC;AAEzC,MAAM,EAAE,GAAG,cAAU,CAAC,IAAI,CAAC,2BAAM,CAAC,CAAC;AAEnC;;;;GAIG;AACU,QAAA,KAAK,GAAG,IAAA,kBAAU,EAAgC,S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display: inline-flex;
|
|
7
6
|
align-items: center;
|
|
8
7
|
justify-content: center;
|
|
9
8
|
height: $badge-size;
|
|
10
|
-
color: var(--badge-color);
|
|
11
|
-
|
|
12
|
-
// используем border т.к. на Safari box-shadow пропадает при уменьшении масштаба
|
|
13
|
-
border: 1px solid var(--badge-color);
|
|
14
|
-
padding: 0 5px; // учитываем border
|
|
15
9
|
font-weight: bold;
|
|
16
10
|
font-size: 12px;
|
|
17
11
|
line-height: 16px;
|
|
18
12
|
max-width: 100%;
|
|
19
13
|
min-width: $badge-size;
|
|
20
14
|
text-decoration: none;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.padding-x-default {
|
|
18
|
+
// ВАЖНО: учитываем border
|
|
19
|
+
padding-left: 5px;
|
|
20
|
+
padding-right: 5px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.padding-x-pill {
|
|
24
|
+
// ВАЖНО: учитываем border
|
|
25
|
+
padding-left: 7px;
|
|
26
|
+
padding-right: 8px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.shape-round {
|
|
30
|
+
border-radius: 4px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.shape-pill {
|
|
34
|
+
border-radius: 99999px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.with-hover-effect:hover {
|
|
38
|
+
position: relative;
|
|
39
|
+
cursor: pointer;
|
|
40
|
+
&::after {
|
|
41
|
+
content: '';
|
|
42
|
+
display: block;
|
|
43
|
+
position: absolute;
|
|
44
|
+
top: 0;
|
|
45
|
+
left: 0;
|
|
46
|
+
right: 0;
|
|
47
|
+
bottom: 0;
|
|
48
|
+
background: #fff;
|
|
49
|
+
opacity: 0.16;
|
|
39
50
|
}
|
|
40
51
|
}
|
|
52
|
+
|
|
53
|
+
.coloring-outline {
|
|
54
|
+
color: var(--badge-color, #aaa);
|
|
55
|
+
|
|
56
|
+
// ВАЖНО: используем border т.к. на Safari box-shadow пропадает при уменьшении масштаба
|
|
57
|
+
border: 1px solid var(--badge-border-color, var(--badge-color, #aaa));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.coloring-fill {
|
|
61
|
+
background: var(--badge-color, #aaa);
|
|
62
|
+
color: var(--badge-text-color, #fff);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.icon-only {
|
|
66
|
+
width: $badge-size;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// содержимое
|
|
70
|
+
.content {
|
|
71
|
+
overflow: hidden;
|
|
72
|
+
text-overflow: ellipsis;
|
|
73
|
+
white-space: nowrap;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.icon {
|
|
77
|
+
display: inline-block;
|
|
78
|
+
width: $icon-size;
|
|
79
|
+
height: $icon-size;
|
|
80
|
+
line-height: $icon-size;
|
|
81
|
+
}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export type { BadgeProps, BadgeField } from './types';
|
|
2
|
+
export { Badge } from './badge';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/components/badge/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/components/badge/index.ts"],"names":[],"mappings":";;;AACA,iCAAgC;AAAvB,8FAAA,KAAK,OAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { AnchorHTMLAttributes, CSSProperties } from 'react';
|
|
2
|
+
export interface BadgeField {
|
|
3
|
+
type: 'text' | 'timer' | 'svg-url';
|
|
4
|
+
value: string;
|
|
5
|
+
}
|
|
6
|
+
export interface BadgeStyle extends CSSProperties {
|
|
7
|
+
'--badge-color'?: string;
|
|
8
|
+
'--badge-text-color'?: string;
|
|
9
|
+
'--badge-border-color'?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface BadgeProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'color'> {
|
|
12
|
+
/** Основной цвет, используется как цвет обводки, иконок и текста. */
|
|
13
|
+
color?: string;
|
|
14
|
+
/** Как применится цвет. */
|
|
15
|
+
coloring?: 'fill' | 'outline' | 'unset';
|
|
16
|
+
/** Содержимое шильдика. */
|
|
17
|
+
fields: Array<BadgeField>;
|
|
18
|
+
/** Форма скруглений. */
|
|
19
|
+
shape?: 'round' | 'pill' | 'unset';
|
|
20
|
+
/** Нужен ли эффект при наведении. */
|
|
21
|
+
withHoverEffect?: boolean;
|
|
22
|
+
/** Стили. */
|
|
23
|
+
style?: BadgeStyle;
|
|
24
|
+
/** Идентификатор для систем автоматизированного тестирования. */
|
|
25
|
+
'data-testid'?: string;
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/common/components/badge/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { HTMLAttributes, MouseEventHandler, ReactNode } from 'react';
|
|
1
|
+
import { HTMLAttributes, ImgHTMLAttributes, MouseEventHandler, ReactNode } from 'react';
|
|
2
2
|
export interface ProductBriefProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
3
|
size?: 's' | 'l';
|
|
4
4
|
title?: string;
|
|
5
5
|
price?: string | number;
|
|
6
|
+
priceReplacer?: ReactNode;
|
|
6
7
|
currency?: string;
|
|
7
8
|
footer?: ReactNode;
|
|
8
9
|
href?: string;
|
|
9
10
|
onLinkClick?: MouseEventHandler<HTMLAnchorElement>;
|
|
10
11
|
imageSrc?: string;
|
|
12
|
+
imageProps?: ImgHTMLAttributes<HTMLImageElement>;
|
|
11
13
|
loading?: boolean;
|
|
12
14
|
}
|
|
13
15
|
/**
|
|
@@ -15,4 +17,4 @@ export interface ProductBriefProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
15
17
|
* @param props Свойства.
|
|
16
18
|
* @return Элемент.
|
|
17
19
|
*/
|
|
18
|
-
export declare function ProductBrief({ size: sizeProp, imageSrc, title, price, currency, footer, className, href, onLinkClick, loading, ...restProps }: ProductBriefProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare function ProductBrief({ size: sizeProp, imageSrc, imageProps, title, price, priceReplacer, currency, footer, className, href, onLinkClick, loading, ...restProps }: ProductBriefProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -18,14 +18,15 @@ const cx = bind_1.default.bind(product_brief_module_scss_1.default);
|
|
|
18
18
|
* @param props Свойства.
|
|
19
19
|
* @return Элемент.
|
|
20
20
|
*/
|
|
21
|
-
function ProductBrief({ size: sizeProp, imageSrc, title, price, currency, footer, className, href, onLinkClick, loading, ...restProps }) {
|
|
21
|
+
function ProductBrief({ size: sizeProp, imageSrc, imageProps, title, price, priceReplacer, currency, footer, className, href, onLinkClick, loading, ...restProps }) {
|
|
22
22
|
const desktop = (0, hooks_1.useBreakpoint)('xs+');
|
|
23
23
|
const { failed, handleError } = (0, hooks_2.useImageStub)(imageSrc);
|
|
24
24
|
const size = (sizeProp !== null && sizeProp !== void 0 ? sizeProp : desktop) ? 'l' : 's';
|
|
25
|
+
const priceDefined = typeof price === 'number' || typeof price === 'string';
|
|
25
26
|
if (loading) {
|
|
26
27
|
return (0, jsx_runtime_1.jsx)(ProductBriefSkeleton, { size: size });
|
|
27
28
|
}
|
|
28
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: cx('root', `size-${size}`, className), ...restProps, children: [(0, jsx_runtime_1.jsx)("a", { className: product_brief_module_scss_1.default.image, href: href, onClick: onLinkClick, children: (0, jsx_runtime_1.jsxs)(image_overlay_1.ImageOverlay, { className: product_brief_module_scss_1.default.overlay, children: [failed && (0, jsx_runtime_1.jsx)(img_stub_1.ImgStub, { className: product_brief_module_scss_1.default.stub }), !failed && (0, jsx_runtime_1.jsx)("img", { src: imageSrc, onError: handleError })] }) }), (0, jsx_runtime_1.jsxs)("div", { className: product_brief_module_scss_1.default.info, children: [(0, jsx_runtime_1.jsx)("a", { className: product_brief_module_scss_1.default.title, href: href, onClick: onLinkClick, children: title }),
|
|
29
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: cx('root', `size-${size}`, className), ...restProps, children: [(0, jsx_runtime_1.jsx)("a", { className: product_brief_module_scss_1.default.image, href: href, onClick: onLinkClick, children: (0, jsx_runtime_1.jsxs)(image_overlay_1.ImageOverlay, { className: product_brief_module_scss_1.default.overlay, children: [failed && (0, jsx_runtime_1.jsx)(img_stub_1.ImgStub, { className: product_brief_module_scss_1.default.stub }), !failed && (0, jsx_runtime_1.jsx)("img", { src: imageSrc, ...imageProps, onError: handleError })] }) }), (0, jsx_runtime_1.jsxs)("div", { className: product_brief_module_scss_1.default.info, children: [(0, jsx_runtime_1.jsx)("a", { className: product_brief_module_scss_1.default.title, href: href, onClick: onLinkClick, children: title }), (priceDefined || priceReplacer) && ((0, jsx_runtime_1.jsx)("div", { className: product_brief_module_scss_1.default.price, children: priceDefined ? (0, jsx_runtime_1.jsx)(price_1.Price, { value: price, currencyGrapheme: currency }) : priceReplacer }))] }), footer && (0, jsx_runtime_1.jsx)("div", { className: product_brief_module_scss_1.default.footer, children: footer })] }));
|
|
29
30
|
}
|
|
30
31
|
exports.ProductBrief = ProductBrief;
|
|
31
32
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-brief.js","sourceRoot":"","sources":["../../../../../src/common/components/media-modal/parts/product-brief.tsx"],"names":[],"mappings":";;;;;;;AACA,yGAAqG;AACrG,wDAAqD;AACrD,wDAA6D;AAC7D,0CAA8C;AAC9C,2DAAyC;AACzC,4FAAiD;AACjD,6CAAyC;
|
|
1
|
+
{"version":3,"file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IAAC,SAAS,EAAE,mCAAM,CAAC,IAAI,GAAI,EAC7C,CAAC,MAAM,IAAI,gCAAK,GAAG,EAAE,QAAQ,KAAM,UAAU,EAAE,OAAO,EAAE,WAAW,GAAI,IAC3D,GACb,EAEJ,iCAAK,SAAS,EAAE,mCAAM,CAAC,IAAI,aACzB,8BAAG,SAAS,EAAE,mCAAM,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,YACzD,KAAK,GACJ,EACH,CAAC,YAAY,IAAI,aAAa,CAAC,IAAI,CAClC,gCAAK,SAAS,EAAE,mCAAM,CAAC,KAAK,YACzB,YAAY,CAAC,CAAC,CAAC,uBAAC,aAAK,IAAC,KAAK,EAAE,KAAK,EAAE,gBAAgB,EAAE,QAAQ,GAAI,CAAC,CAAC,CAAC,aAAa,GAC/E,CACP,IACG,EAEL,MAAM,IAAI,gCAAK,SAAS,EAAE,mCAAM,CAAC,MAAM,YAAG,MAAM,GAAO,IACpD,CACP,CAAC;AACJ,CAAC;AA/CD,oCA+CC;AAED;;;;GAIG;AACH,SAAS,oBAAoB,CAAC,EAAE,IAAI,EAAO;IACzC,OAAO,CACL,iCAAK,SAAS,EAAE,EAAE,CAAC,UAAU,EAAE,IAAI,CAAC,aAClC,iCAAW,EACX,iCAAW,EACX,iCAAW,IACP,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -38,6 +38,10 @@
|
|
|
38
38
|
font-weight: 600;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
.title + .price {
|
|
42
|
+
margin-top: 4px;
|
|
43
|
+
}
|
|
44
|
+
|
|
41
45
|
.footer {
|
|
42
46
|
display: flex;
|
|
43
47
|
}
|
|
@@ -73,7 +77,7 @@
|
|
|
73
77
|
|
|
74
78
|
.size-l {
|
|
75
79
|
column-gap: 16px;
|
|
76
|
-
row-gap:
|
|
80
|
+
row-gap: 12px;
|
|
77
81
|
grid-template-columns: 112px 1fr;
|
|
78
82
|
.image {
|
|
79
83
|
width: 112px;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@use 'node_modules/@sima-land/ui-nucleons/colors';
|
|
2
|
+
@use 'node_modules/@sima-land/ui-nucleons/breakpoints';
|
|
2
3
|
|
|
3
4
|
.root {
|
|
4
5
|
display: block;
|
|
@@ -18,6 +19,22 @@
|
|
|
18
19
|
.info {
|
|
19
20
|
width: 80px;
|
|
20
21
|
}
|
|
22
|
+
&.loading {
|
|
23
|
+
--thumbnail-color: #{colors.$basic-gray4};
|
|
24
|
+
--thumbnail-border-size: 0;
|
|
25
|
+
.content {
|
|
26
|
+
background: colors.$basic-gray4;
|
|
27
|
+
}
|
|
28
|
+
.info {
|
|
29
|
+
width: 80px;
|
|
30
|
+
height: var(--thumbnail-content-size);
|
|
31
|
+
background: colors.$basic-gray4;
|
|
32
|
+
border-radius: 4px;
|
|
33
|
+
@include breakpoints.gte('xs') {
|
|
34
|
+
height: 34px;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
21
38
|
}
|
|
22
39
|
&.size-l {
|
|
23
40
|
max-width: 80px;
|
|
@@ -25,6 +42,19 @@
|
|
|
25
42
|
.content + .info {
|
|
26
43
|
margin-top: 2px;
|
|
27
44
|
}
|
|
45
|
+
&.loading {
|
|
46
|
+
--thumbnail-color: #{colors.$basic-gray4};
|
|
47
|
+
--thumbnail-border-size: 0;
|
|
48
|
+
.content {
|
|
49
|
+
background: colors.$basic-gray4;
|
|
50
|
+
}
|
|
51
|
+
.info {
|
|
52
|
+
width: 80px;
|
|
53
|
+
height: 34px;
|
|
54
|
+
background: colors.$basic-gray4;
|
|
55
|
+
border-radius: 4px;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
28
58
|
}
|
|
29
59
|
&.iconic {
|
|
30
60
|
--thumbnail-border-size: 2px;
|
|
@@ -37,19 +67,6 @@
|
|
|
37
67
|
cursor: pointer;
|
|
38
68
|
--thumbnail-color: #{colors.$basic-gray38};
|
|
39
69
|
}
|
|
40
|
-
&.loading {
|
|
41
|
-
--thumbnail-color: #{colors.$basic-gray4};
|
|
42
|
-
--thumbnail-border-size: 0;
|
|
43
|
-
.content {
|
|
44
|
-
background: colors.$basic-gray4;
|
|
45
|
-
}
|
|
46
|
-
.info {
|
|
47
|
-
width: 80px;
|
|
48
|
-
height: 34px;
|
|
49
|
-
background: colors.$basic-gray4;
|
|
50
|
-
border-radius: 4px;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
70
|
}
|
|
54
71
|
|
|
55
72
|
.content {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sima-land/moleculas",
|
|
3
3
|
"type": "commonjs",
|
|
4
|
-
"version": "16.0.0-alpha.
|
|
4
|
+
"version": "16.0.0-alpha.19",
|
|
5
5
|
"repository": "ssh://git@github.com:sima-land/moleculas.git",
|
|
6
6
|
"author": "www.sima-land.ru team",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"classnames": "^2.3.2",
|
|
31
|
-
"date-fns": "^
|
|
31
|
+
"date-fns": "^3.3.1",
|
|
32
32
|
"react-transition-group": "^4.4.5"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"webpack": "^5.64.4"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
|
-
"@sima-land/ui-nucleons": "^45.0.0-alpha.
|
|
75
|
+
"@sima-land/ui-nucleons": "^45.0.0-alpha.13",
|
|
76
76
|
"@sima-land/ui-quarks": "^4.6.0",
|
|
77
77
|
"react": "^17.0 || ^18.0"
|
|
78
78
|
}
|