@snack-uikit/list 0.14.3-preview-8898cdde.0 → 0.14.3

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.14.3 (2024-08-06)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **PDS-629:** fix headline height; fix content align; add media hover ([2817670](https://github.com/cloud-ru-tech/snack-uikit/commit/2817670df79299849a266425df5a53979c9e37f6))
12
+
13
+
14
+
15
+
16
+
6
17
  ## 0.14.2 (2024-07-29)
7
18
 
8
19
  ### Only dependencies have been changed
@@ -1,8 +1,8 @@
1
1
  import { TruncateStringProps } from '@snack-uikit/truncate-string';
2
2
  import { WithSupportProps } from '@snack-uikit/utils';
3
3
  type TruncateProps = {
4
- option?: number | null;
5
- description?: number | null;
4
+ option?: number;
5
+ description?: number;
6
6
  variant?: TruncateStringProps['variant'];
7
7
  };
8
8
  export type ItemContentProps = WithSupportProps<{
@@ -22,9 +22,8 @@ const DEFAULT_TRUNCATE = {
22
22
  variant: 'end',
23
23
  };
24
24
  export function ItemContent(_a) {
25
- var _b;
26
25
  var { truncate: truncateProp, caption, description, option, className, disabled } = _a, rest = __rest(_a, ["truncate", "caption", "description", "option", "className", "disabled"]);
27
26
  const { size = 's' } = useNewListContext();
28
27
  const truncate = useMemo(() => (Object.assign(Object.assign({}, DEFAULT_TRUNCATE), truncateProp)), [truncateProp]);
29
- return (_jsxs("div", Object.assign({ className: cn(styles.content, className) }, extractSupportProps(rest), { "data-size": size !== null && size !== void 0 ? size : 's', "data-disabled": disabled || undefined, children: [_jsxs("div", { className: styles.headline, children: [_jsx("div", { className: styles.label, children: _jsx(TruncateString, { variant: truncate === null || truncate === void 0 ? void 0 : truncate.variant, text: String(option), maxLines: truncate === null || truncate === void 0 ? void 0 : truncate.option, "data-test-id": 'list__base-item-option' }) }), caption && _jsx("span", { className: styles.caption, children: caption })] }), description && (_jsx("div", { className: styles.description, children: _jsx(TruncateString, { text: description, maxLines: (_b = truncate === null || truncate === void 0 ? void 0 : truncate.description) !== null && _b !== void 0 ? _b : 2, "data-test-id": 'list__base-item-description' }) }))] })));
28
+ return (_jsxs("div", Object.assign({ className: cn(styles.content, className) }, extractSupportProps(rest), { "data-size": size !== null && size !== void 0 ? size : 's', "data-disabled": disabled || undefined, children: [_jsxs("div", { className: styles.headline, children: [_jsx("div", { className: styles.label, children: _jsx(TruncateString, { variant: truncate.variant, text: String(option), maxLines: truncate.option, "data-test-id": 'list__base-item-option' }) }), caption && _jsx("span", { className: styles.caption, children: caption })] }), description && (_jsx("div", { className: styles.description, children: _jsx(TruncateString, { text: description, maxLines: truncate.description, "data-test-id": 'list__base-item-description' }) }))] })));
30
29
  }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public"
5
5
  },
6
6
  "title": "List",
7
- "version": "0.14.3-preview-8898cdde.0",
7
+ "version": "0.14.3",
8
8
  "sideEffects": [
9
9
  "*.css",
10
10
  "*.woff",
@@ -32,16 +32,16 @@
32
32
  "license": "Apache-2.0",
33
33
  "scripts": {},
34
34
  "dependencies": {
35
- "@snack-uikit/button": "0.17.3-preview-8898cdde.0",
35
+ "@snack-uikit/button": "0.17.3",
36
36
  "@snack-uikit/divider": "3.0.3",
37
37
  "@snack-uikit/dropdown": "0.2.4",
38
38
  "@snack-uikit/icons": "0.22.0",
39
- "@snack-uikit/info-block": "0.4.5-preview-8898cdde.0",
39
+ "@snack-uikit/info-block": "0.4.5",
40
40
  "@snack-uikit/loaders": "0.5.2",
41
41
  "@snack-uikit/scroll": "0.6.0",
42
42
  "@snack-uikit/search-private": "0.2.2",
43
43
  "@snack-uikit/toggles": "0.10.2",
44
- "@snack-uikit/truncate-string": "0.4.21-preview-8898cdde.0",
44
+ "@snack-uikit/truncate-string": "0.4.20",
45
45
  "@snack-uikit/utils": "3.3.0",
46
46
  "classnames": "2.5.1",
47
47
  "merge-refs": "1.2.2"
@@ -49,5 +49,5 @@
49
49
  "peerDependencies": {
50
50
  "@snack-uikit/locale": "*"
51
51
  },
52
- "gitHead": "a0351f376ac28462b847d1bf99ad3f7ba7a1d0cd"
52
+ "gitHead": "b5cf5887d7e1a31571c4ca424b022ef391ed4fef"
53
53
  }
@@ -8,8 +8,8 @@ import { useNewListContext } from '../../components/Lists/contexts';
8
8
  import styles from './styles.module.scss';
9
9
 
10
10
  type TruncateProps = {
11
- option?: number | null;
12
- description?: number | null;
11
+ option?: number;
12
+ description?: number;
13
13
  variant?: TruncateStringProps['variant'];
14
14
  };
15
15
 
@@ -38,6 +38,7 @@ export function ItemContent({
38
38
  ...rest
39
39
  }: ItemContentProps) {
40
40
  const { size = 's' } = useNewListContext();
41
+
41
42
  const truncate = useMemo(
42
43
  () => ({
43
44
  ...DEFAULT_TRUNCATE,
@@ -56,9 +57,9 @@ export function ItemContent({
56
57
  <div className={styles.headline}>
57
58
  <div className={styles.label}>
58
59
  <TruncateString
59
- variant={truncate?.variant}
60
+ variant={truncate.variant}
60
61
  text={String(option)}
61
- maxLines={truncate?.option}
62
+ maxLines={truncate.option}
62
63
  data-test-id='list__base-item-option'
63
64
  />
64
65
  </div>
@@ -69,7 +70,7 @@ export function ItemContent({
69
70
  <div className={styles.description}>
70
71
  <TruncateString
71
72
  text={description}
72
- maxLines={truncate?.description ?? 2}
73
+ maxLines={truncate.description}
73
74
  data-test-id='list__base-item-description'
74
75
  />
75
76
  </div>
@@ -25,7 +25,6 @@ $typography: (
25
25
 
26
26
  .headline {
27
27
  display: flex;
28
- // align-items: flex-start;
29
28
  }
30
29
 
31
30
  .label {
@@ -61,7 +60,6 @@ $typography: (
61
60
 
62
61
  display: flex;
63
62
  align-items: center;
64
- // height: 100%;
65
63
  }
66
64
  .caption {
67
65
  @include composite-var($typography, $size, 'caption');