@snack-uikit/card 0.10.1 → 0.10.2

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.10.2 (2024-02-21)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **FF-4147:** display check in disabled state ([d12507c](https://github.com/cloud-ru-tech/snack-uikit/commit/d12507c6e775b43d399eb5ff9366e8db083f0ca9))
12
+
13
+
14
+
15
+
16
+
6
17
  ## 0.10.1 (2024-02-20)
7
18
 
8
19
 
@@ -34,5 +34,5 @@ export function Card(_a) {
34
34
  const supportProps = extractSupportProps(rest);
35
35
  return (_jsx(CardContext.Provider, { value: { size, disabled }, children: _jsxs("div", Object.assign({ ref: localDivRef, className: cn(styles.card, className) }, supportProps, { onClick: onClick, "data-disabled": disabled || undefined, "data-checked": checked || undefined, "data-outline": outline || undefined, "data-pointer": onClick ? true : undefined,
36
36
  // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
37
- tabIndex: 0, onKeyDown: onKeyDown, children: [image, promoBadge && _jsx(PromoBadge, { text: promoBadge }), _jsxs("div", { className: styles.composition, tabIndex: -1, children: [href && (_jsx("a", { ref: localAnchorRef, "data-test-id": TEST_IDS.anchor, tabIndex: -1, href: href, className: styles.anchor, "aria-label": supportProps['aria-label'] })), !disabled && functionBadge && (_jsx(FunctionBadgeWrapper, { className: styles.functionBadgeWrapper, children: functionBadge })), _jsx("div", { className: styles.contentWrapper, children: _jsxs("div", { className: styles.content, "data-size": size, children: [header || null, children && (_jsx(Typography, { family: 'sans', size: size, purpose: 'body', className: styles.body, tag: 'div', children: children })), footer && _jsx("div", { className: styles.footer, children: footer })] }) })] }), !disabled && checked && multipleSelection && _jsx(Check, { className: styles.check })] })) }));
37
+ tabIndex: 0, onKeyDown: onKeyDown, children: [image, promoBadge && _jsx(PromoBadge, { text: promoBadge }), _jsxs("div", { className: styles.composition, tabIndex: -1, children: [href && (_jsx("a", { ref: localAnchorRef, "data-test-id": TEST_IDS.anchor, tabIndex: -1, href: href, className: styles.anchor, "aria-label": supportProps['aria-label'] })), !disabled && functionBadge && (_jsx(FunctionBadgeWrapper, { className: styles.functionBadgeWrapper, children: functionBadge })), _jsx("div", { className: styles.contentWrapper, children: _jsxs("div", { className: styles.content, "data-size": size, children: [header || null, children && (_jsx(Typography, { family: 'sans', size: size, purpose: 'body', className: styles.body, tag: 'div', children: children })), footer && _jsx("div", { className: styles.footer, children: footer })] }) })] }), checked && multipleSelection && _jsx(Check, { className: styles.check })] })) }));
38
38
  }
@@ -122,6 +122,10 @@
122
122
  outline-color:var(--sys-neutral-decor-default, #dfe2ec);
123
123
  outline-width:var(--border-width-card-container, 1px);
124
124
  }
125
+ .card[data-disabled] .check{
126
+ color:var(--sys-neutral-on-accent, #ffffff);
127
+ background-color:var(--sys-neutral-text-disabled, #b3b6bf);
128
+ }
125
129
  .card[data-disabled] *{
126
130
  cursor:not-allowed;
127
131
  }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public"
5
5
  },
6
6
  "title": "Card",
7
- "version": "0.10.1",
7
+ "version": "0.10.2",
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": "fd079dd3acbfe935d0b88d9efd863047f25e5824"
46
+ "gitHead": "3e7a22f46aa4c135fababaf8d147bdf860a37e39"
47
47
  }
@@ -127,7 +127,7 @@ export function Card({
127
127
  </div>
128
128
  </div>
129
129
 
130
- {!disabled && checked && multipleSelection && <Check className={styles.check} />}
130
+ {checked && multipleSelection && <Check className={styles.check} />}
131
131
  </div>
132
132
  </CardContext.Provider>
133
133
  );
@@ -156,6 +156,11 @@ $sizes: 's', 'm', 'l';
156
156
  outline-color: $sys-neutral-decor-default;
157
157
  outline-width: $border-width-card-container;
158
158
 
159
+ .check {
160
+ color: $sys-neutral-on-accent;
161
+ background-color: $sys-neutral-text-disabled;
162
+ }
163
+
159
164
  * {
160
165
  cursor: not-allowed;
161
166
  }