@cloud-ru/ds-uikit-product-card-predefined 3.1.4 → 3.1.5-preview-0406cbd2.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/dist/cjs/components/CardServiceInfo/styles.module.css +5 -0
- package/dist/cjs/components/CardServiceLight/CardServiceLight.js +1 -4
- package/dist/cjs/components/CardServiceLight/styles.module.css +5 -5
- package/dist/cjs/style.css +10 -5
- package/dist/esm/components/CardServiceInfo/styles.module.css +5 -0
- package/dist/esm/components/CardServiceLight/CardServiceLight.js +1 -4
- package/dist/esm/components/CardServiceLight/styles.module.css +5 -5
- package/dist/esm/style.css +10 -5
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +17 -18
- package/src/components/CardServiceInfo/styles.module.scss +7 -0
- package/src/components/CardServiceLight/CardServiceLight.tsx +2 -5
- package/src/components/CardServiceLight/styles.module.scss +5 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloud-ru/ds-uikit-product-card-predefined",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.5-preview-0406cbd2.0",
|
|
4
4
|
"description": "Пресеты карточек Product UI Kit — CardBanner, CardService, CardServiceLight, CardServiceSmall, CardSuggest, CardCustom.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -41,23 +41,22 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"classnames": "^2.5.1",
|
|
43
43
|
"merge-refs": "^2.0.0",
|
|
44
|
-
"@cloud-ru/ds-
|
|
45
|
-
"@cloud-ru/ds-
|
|
46
|
-
"@cloud-ru/ds-
|
|
47
|
-
"@cloud-ru/ds-
|
|
48
|
-
"@cloud-ru/ds-
|
|
49
|
-
"@cloud-ru/ds-
|
|
50
|
-
"@cloud-ru/ds-
|
|
51
|
-
"@cloud-ru/ds-
|
|
52
|
-
"@cloud-ru/ds-
|
|
53
|
-
"@cloud-ru/ds-
|
|
54
|
-
"@cloud-ru/ds-
|
|
55
|
-
"@cloud-ru/ds-
|
|
56
|
-
"@cloud-ru/ds-
|
|
57
|
-
"@cloud-ru/ds-
|
|
58
|
-
"@cloud-ru/ds-
|
|
59
|
-
"@cloud-ru/ds-
|
|
60
|
-
"@cloud-ru/ds-utils": "^1.1.0"
|
|
44
|
+
"@cloud-ru/ds-button": "1.0.3",
|
|
45
|
+
"@cloud-ru/ds-card": "1.0.14",
|
|
46
|
+
"@cloud-ru/ds-icon-predefined": "1.0.2",
|
|
47
|
+
"@cloud-ru/ds-locale": "1.0.0",
|
|
48
|
+
"@cloud-ru/ds-materials": "2.0.0",
|
|
49
|
+
"@cloud-ru/ds-promo-tag": "1.0.2",
|
|
50
|
+
"@cloud-ru/ds-tag": "1.1.3",
|
|
51
|
+
"@cloud-ru/ds-theme": "2.0.0",
|
|
52
|
+
"@cloud-ru/ds-toggles": "1.1.5",
|
|
53
|
+
"@cloud-ru/ds-truncate-string": "1.0.6",
|
|
54
|
+
"@cloud-ru/ds-tooltip": "1.0.6",
|
|
55
|
+
"@cloud-ru/ds-typography": "1.0.0",
|
|
56
|
+
"@cloud-ru/ds-uikit-product-promo-tag-predefined": "1.0.6",
|
|
57
|
+
"@cloud-ru/ds-utils": "1.1.0",
|
|
58
|
+
"@cloud-ru/ds-icons": "1.2.1",
|
|
59
|
+
"@cloud-ru/ds-list": "2.2.2-preview-0406cbd2.0"
|
|
61
60
|
},
|
|
62
61
|
"publishConfig": {
|
|
63
62
|
"access": "public"
|
|
@@ -23,6 +23,13 @@ $actions-counts: 1, 2;
|
|
|
23
23
|
.actions {
|
|
24
24
|
--card-actions-surface-inset-top: #{base.$sn-primitive-dimension-4};
|
|
25
25
|
--card-actions-surface-inset-right: #{base.$sn-primitive-dimension-4};
|
|
26
|
+
|
|
27
|
+
// В Figma панель вынесена из потока и не растит строку заголовка; место под неё резервирует actions-reserve.
|
|
28
|
+
&[data-actions-visibility='always'] {
|
|
29
|
+
position: absolute;
|
|
30
|
+
top: var(--card-actions-surface-inset-top);
|
|
31
|
+
right: var(--card-actions-surface-inset-right);
|
|
32
|
+
}
|
|
26
33
|
}
|
|
27
34
|
|
|
28
35
|
.titleContainer {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { isMobileLayout, useAdaptiveLayout } from '@cloud-ru/ds-adaptive';
|
|
2
1
|
import { PolymorphicRef } from '@cloud-ru/ds-card';
|
|
3
2
|
import { useThemeClassnames } from '@cloud-ru/ds-theme';
|
|
4
3
|
import { TooltipProps } from '@cloud-ru/ds-tooltip';
|
|
@@ -85,8 +84,6 @@ export function CardServiceLight<T extends ElementType = 'button'>({
|
|
|
85
84
|
'data-test-id': dataTestId,
|
|
86
85
|
...rest
|
|
87
86
|
}: CardServiceLightProps<T>): ReactElement | null {
|
|
88
|
-
const { layoutType } = useAdaptiveLayout();
|
|
89
|
-
const isMobile = isMobileLayout(layoutType);
|
|
90
87
|
const Component: ElementType = as ?? 'button';
|
|
91
88
|
const cardRef = useRef<HTMLElement>(null);
|
|
92
89
|
const tooltipTriggerRef = useRef<HTMLButtonElement>(null);
|
|
@@ -179,7 +176,7 @@ export function CardServiceLight<T extends ElementType = 'button'>({
|
|
|
179
176
|
{...polymorphicProps}
|
|
180
177
|
>
|
|
181
178
|
<span className={styles.stateLayer} data-state='emptyNeutralOnBackground' aria-hidden />
|
|
182
|
-
<div className={styles.container}
|
|
179
|
+
<div className={styles.container}>
|
|
183
180
|
{icon && <div className={styles.icon}>{icon}</div>}
|
|
184
181
|
|
|
185
182
|
<div className={styles.content}>
|
|
@@ -206,7 +203,7 @@ export function CardServiceLight<T extends ElementType = 'button'>({
|
|
|
206
203
|
</div>
|
|
207
204
|
|
|
208
205
|
<CardActionsSurface
|
|
209
|
-
actionsSize=
|
|
206
|
+
actionsSize='m'
|
|
210
207
|
actionsVisibility={actionsVisibility}
|
|
211
208
|
className={styles.cardActions}
|
|
212
209
|
onTooltipOpenChange={setIsTooltipOpen}
|
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
// `position: static`: чтобы он, как и `.container`, не рисовался под `.stateLayer`, тоже нужен
|
|
11
11
|
// позиционированный брат.
|
|
12
12
|
.cardActions {
|
|
13
|
+
// В Figma панель стоит внутри container с gap 8 и без правого отступа: 4 от container + 4 здесь.
|
|
14
|
+
margin-left: base.$sn-primitive-dimension-4;
|
|
15
|
+
|
|
13
16
|
&[data-actions-visibility='always'] {
|
|
14
17
|
position: relative;
|
|
15
18
|
}
|
|
@@ -23,8 +26,8 @@
|
|
|
23
26
|
display: flex;
|
|
24
27
|
align-items: center;
|
|
25
28
|
|
|
29
|
+
box-sizing: border-box;
|
|
26
30
|
width: 100%;
|
|
27
|
-
min-width: 228px;
|
|
28
31
|
padding: 0;
|
|
29
32
|
border: none;
|
|
30
33
|
border-radius: base.$sn-density-radius-3xs;
|
|
@@ -47,7 +50,7 @@
|
|
|
47
50
|
|
|
48
51
|
&:focus-visible {
|
|
49
52
|
outline: base.$sn-theme-color-primary-accent solid base.$sn-primitive-strokeWeight-strokeSemiBold;
|
|
50
|
-
outline-offset:
|
|
53
|
+
outline-offset: calc(-1 * #{base.$sn-primitive-strokeWeight-strokeSemiBold});
|
|
51
54
|
}
|
|
52
55
|
|
|
53
56
|
&:not([data-disabled]):hover,
|
|
@@ -77,9 +80,6 @@
|
|
|
77
80
|
padding: base.$sn-primitive-dimension-4;
|
|
78
81
|
border-radius: inherit;
|
|
79
82
|
|
|
80
|
-
&[data-mobile] {
|
|
81
|
-
min-height: base.$sn-primitive-dimension-40;
|
|
82
|
-
}
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
.icon {
|