@snack-uikit/card 0.11.10 → 0.12.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/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
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.12.0 (2024-04-05)
7
+
8
+
9
+ ### Features
10
+
11
+ * **PDS-0000:** add shape prop into emblem in Card.Header ([4d58dff](https://github.com/cloud-ru-tech/snack-uikit/commit/4d58dffcf4d880b69bc8b43811f33551db7b92f9))
12
+
13
+
14
+
15
+
16
+
6
17
  ## 0.11.10 (2024-04-02)
7
18
 
8
19
 
@@ -3,6 +3,6 @@ type PictureProps = {
3
3
  src: string;
4
4
  alt: string;
5
5
  };
6
- export type EmblemProps = PictureProps | Pick<IconPredefinedProps, 'icon' | 'decor' | 'appearance'>;
6
+ export type EmblemProps = PictureProps | Pick<IconPredefinedProps, 'icon' | 'decor' | 'appearance' | 'shape'>;
7
7
  export declare function Emblem(props: EmblemProps): import("react/jsx-runtime").JSX.Element;
8
8
  export {};
@@ -7,10 +7,10 @@ function isPictureProps(props) {
7
7
  return 'src' in props && 'alt' in props;
8
8
  }
9
9
  export function Emblem(props) {
10
- var _a, _b;
10
+ var _a, _b, _c;
11
11
  const { size } = useCardContext();
12
12
  if (isPictureProps(props)) {
13
13
  return (_jsx("img", { src: props.src, alt: props.alt, "data-size": size || undefined, className: styles.img, "data-test-id": TEST_IDS.emblemPicture }));
14
14
  }
15
- return (_jsx(IconPredefined, { icon: props.icon, appearance: (_a = props.appearance) !== null && _a !== void 0 ? _a : 'primary', decor: (_b = props.decor) !== null && _b !== void 0 ? _b : true, size: size, "data-test-id": TEST_IDS.emblemIcon }));
15
+ return (_jsx(IconPredefined, { icon: props.icon, appearance: (_a = props.appearance) !== null && _a !== void 0 ? _a : 'primary', decor: (_b = props.decor) !== null && _b !== void 0 ? _b : true, size: size, shape: (_c = props.shape) !== null && _c !== void 0 ? _c : 'round', "data-test-id": TEST_IDS.emblemIcon }));
16
16
  }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public"
5
5
  },
6
6
  "title": "Card",
7
- "version": "0.11.10",
7
+ "version": "0.12.0",
8
8
  "sideEffects": [
9
9
  "*.css",
10
10
  "*.woff",
@@ -43,5 +43,5 @@
43
43
  "@snack-uikit/utils": "3.2.0",
44
44
  "classnames": "2.3.2"
45
45
  },
46
- "gitHead": "2c0f3a21f942a3ff17bff06b83ce877b3d3c9b5b"
46
+ "gitHead": "d283eef081151bcd969562be37904f1444467712"
47
47
  }
@@ -9,7 +9,7 @@ type PictureProps = {
9
9
  alt: string;
10
10
  };
11
11
 
12
- export type EmblemProps = PictureProps | Pick<IconPredefinedProps, 'icon' | 'decor' | 'appearance'>;
12
+ export type EmblemProps = PictureProps | Pick<IconPredefinedProps, 'icon' | 'decor' | 'appearance' | 'shape'>;
13
13
 
14
14
  function isPictureProps(props: EmblemProps): props is PictureProps {
15
15
  return 'src' in props && 'alt' in props;
@@ -36,6 +36,7 @@ export function Emblem(props: EmblemProps) {
36
36
  appearance={props.appearance ?? 'primary'}
37
37
  decor={props.decor ?? true}
38
38
  size={size}
39
+ shape={props.shape ?? 'round'}
39
40
  data-test-id={TEST_IDS.emblemIcon}
40
41
  />
41
42
  );