@cloud-ru/ds-uikit-product-modal-predefined 1.1.3 → 1.1.4-preview-de7dadcf.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloud-ru/ds-uikit-product-modal-predefined",
3
- "version": "1.1.3",
3
+ "version": "1.1.4-preview-de7dadcf.0",
4
4
  "description": "Product preset-компоненты для delete, recall и release notes сценариев на базе Modal и BottomSheet.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -40,24 +40,24 @@
40
40
  ],
41
41
  "dependencies": {
42
42
  "classnames": "^2.5.1",
43
- "@cloud-ru/ds-adaptive": "^1.0.3",
44
- "@cloud-ru/ds-bottom-sheet": "^2.1.1",
45
- "@cloud-ru/ds-carousel": "^1.1.9",
46
- "@cloud-ru/ds-icons": "^1.7.2",
47
- "@cloud-ru/ds-fields": "^3.0.11",
48
- "@cloud-ru/ds-button": "^1.0.5",
49
- "@cloud-ru/ds-locale": "^1.0.0",
50
- "@cloud-ru/ds-markdown": "^1.0.58",
51
- "@cloud-ru/ds-pagination": "^1.1.9",
52
- "@cloud-ru/ds-skeleton": "^1.0.3",
53
- "@cloud-ru/ds-modal": "^2.1.1",
54
- "@cloud-ru/ds-info-block": "^1.0.4",
55
- "@cloud-ru/ds-scroll": "^1.0.6",
56
- "@cloud-ru/ds-uikit-product-copy": "^1.1.18",
57
- "@cloud-ru/ds-tooltip": "^1.0.18",
58
- "@cloud-ru/ds-typography": "^1.0.2",
59
- "@cloud-ru/ds-utils": "^1.3.0",
60
- "@cloud-ru/ds-truncate-string": "^1.0.19"
43
+ "@cloud-ru/ds-carousel": "1.1.9",
44
+ "@cloud-ru/ds-icons": "1.7.2",
45
+ "@cloud-ru/ds-adaptive": "1.0.3",
46
+ "@cloud-ru/ds-fields": "3.0.12-preview-de7dadcf.0",
47
+ "@cloud-ru/ds-button": "1.0.5",
48
+ "@cloud-ru/ds-locale": "1.0.0",
49
+ "@cloud-ru/ds-markdown": "1.0.59-preview-de7dadcf.0",
50
+ "@cloud-ru/ds-modal": "2.1.2-preview-de7dadcf.0",
51
+ "@cloud-ru/ds-scroll": "1.0.6",
52
+ "@cloud-ru/ds-skeleton": "1.0.3",
53
+ "@cloud-ru/ds-pagination": "1.1.9",
54
+ "@cloud-ru/ds-truncate-string": "1.0.19",
55
+ "@cloud-ru/ds-tooltip": "1.0.18",
56
+ "@cloud-ru/ds-uikit-product-copy": "1.1.18",
57
+ "@cloud-ru/ds-typography": "1.0.2",
58
+ "@cloud-ru/ds-utils": "1.3.0",
59
+ "@cloud-ru/ds-bottom-sheet": "2.1.2-preview-de7dadcf.0",
60
+ "@cloud-ru/ds-info-block": "1.0.4"
61
61
  },
62
62
  "publishConfig": {
63
63
  "access": "public"
@@ -14,6 +14,7 @@ const FALLBACK_ICON_SIZE = 48;
14
14
 
15
15
  type NoteItemComponentProps = NoteItemProps & {
16
16
  surface?: Surface;
17
+ active?: boolean;
17
18
  };
18
19
 
19
20
  /**
@@ -93,9 +94,9 @@ function NoteItemMedia({ image, video }: Pick<NoteItemProps, 'image' | 'video'>)
93
94
  );
94
95
  }
95
96
 
96
- export function NoteItem({ title, description, image, video, surface = SURFACE.Modal }: NoteItemComponentProps) {
97
+ export function NoteItem({ title, description, image, video, surface = SURFACE.Modal, active = true }: NoteItemComponentProps) {
97
98
  return (
98
- <article className={styles.root} data-surface={surface} data-test-id={TEST_IDS.releaseNotesItem}>
99
+ <article className={styles.root} data-surface={surface} data-active={active} data-test-id={TEST_IDS.releaseNotesItem}>
99
100
  {/* `key` по источнику: карусель переиспользует слайд, а состояние загрузки относится к файлу. */}
100
101
  <NoteItemMedia key={`${video ?? ''}|${image.src}`} image={image} video={video} />
101
102
 
@@ -21,6 +21,11 @@ $card-size: calc(6 * #{base.$sn-primitive-dimension-64} - #{base.$sn-primitive-d
21
21
  row-gap: base.$sn-primitive-dimension-16;
22
22
  height: auto;
23
23
  }
24
+
25
+ &[data-surface='bottomSheet'][data-active='false'] {
26
+ overflow: hidden;
27
+ height: 0;
28
+ }
24
29
  }
25
30
 
26
31
  .media {
@@ -121,8 +121,8 @@ export function ReleaseNotesContent({
121
121
  state={{ page: pageIndex, onChange: onPageChange }}
122
122
  className={styles.carousel}
123
123
  >
124
- {items.map(item => (
125
- <NoteItem key={`${item.title}-${item.image.src}`} {...item} surface={surface} />
124
+ {items.map((item, index) => (
125
+ <NoteItem key={`${item.title}-${item.image.src}`} {...item} surface={surface} active={index === pageIndex} />
126
126
  ))}
127
127
  </Carousel>
128
128
  </div>