@hh.ru/magritte-ui-chips 7.0.23 → 7.0.24

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/index.js CHANGED
@@ -6,7 +6,7 @@ import 'react/jsx-runtime';
6
6
  import 'react';
7
7
  import 'classnames';
8
8
  import '@hh.ru/magritte-common-use-disabled';
9
- import './ChipContent-DDk4p0Ez.js';
9
+ import './ChipContent-CqeSdYoC.js';
10
10
  import '@hh.ru/magritte-ui-typography';
11
11
  import '@hh.ru/magritte-ui-icon/variants/icon';
12
12
  import '@hh.ru/magritte-ui-scrollable-container';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hh.ru/magritte-ui-chips",
3
- "version": "7.0.23",
3
+ "version": "7.0.24",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
@@ -21,13 +21,13 @@
21
21
  "dependencies": {
22
22
  "@hh.ru/magritte-common-keyboard": "4.3.4",
23
23
  "@hh.ru/magritte-common-use-disabled": "1.0.15",
24
- "@hh.ru/magritte-design-tokens": "24.7.2",
24
+ "@hh.ru/magritte-design-tokens": "24.7.3",
25
25
  "@hh.ru/magritte-types": "5.0.7",
26
26
  "@hh.ru/magritte-ui-breakpoint": "6.1.1",
27
- "@hh.ru/magritte-ui-icon": "14.2.13",
27
+ "@hh.ru/magritte-ui-icon": "14.2.14",
28
28
  "@hh.ru/magritte-ui-mock-component": "1.1.7",
29
- "@hh.ru/magritte-ui-scrollable-container": "6.2.24",
30
- "@hh.ru/magritte-ui-typography": "5.3.6"
29
+ "@hh.ru/magritte-ui-scrollable-container": "6.2.25",
30
+ "@hh.ru/magritte-ui-typography": "5.3.7"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "classnames": ">=2.3.2",
@@ -36,5 +36,5 @@
36
36
  "publishConfig": {
37
37
  "access": "public"
38
38
  },
39
- "gitHead": "2d1368843f436bae7ed053430de10909840d8cc4"
39
+ "gitHead": "70ac6d4c2faa2fe631fae008bb817f6cb21f6520"
40
40
  }
@@ -1,23 +0,0 @@
1
- import './index.css';
2
- import { jsxs, jsx } from 'react/jsx-runtime';
3
- import { cloneElement } from 'react';
4
- import classnames from 'classnames';
5
- import { Text } from '@hh.ru/magritte-ui-typography';
6
-
7
- var styles = {"input":"magritte-input___ctH9G_7-0-23","chip":"magritte-chip___uulZ9_7-0-23","chip-wrapper":"magritte-chip-wrapper___os8tP_7-0-23","chipWrapper":"magritte-chip-wrapper___os8tP_7-0-23","chip-wrapper__disabled":"magritte-chip-wrapper__disabled___mHM6-_7-0-23","chipWrapperDisabled":"magritte-chip-wrapper__disabled___mHM6-_7-0-23","content":"magritte-content___17f1s_7-0-23","size-extra-small":"magritte-size-extra-small___rVVLp_7-0-23","sizeExtraSmall":"magritte-size-extra-small___rVVLp_7-0-23","content__deletable":"magritte-content__deletable___iqF4W_7-0-23","contentDeletable":"magritte-content__deletable___iqF4W_7-0-23","addon":"magritte-addon___mlwVD_7-0-23","label-container":"magritte-label-container___VVRg1_7-0-23","labelContainer":"magritte-label-container___VVRg1_7-0-23","label":"magritte-label___NSEUN_7-0-23","postfix-wrapper":"magritte-postfix-wrapper___Qmxwy_7-0-23","postfixWrapper":"magritte-postfix-wrapper___Qmxwy_7-0-23","close":"magritte-close___5I1Fe_7-0-23","chip_style-neutral":"magritte-chip_style-neutral___gELi3_7-0-23","chipStyleNeutral":"magritte-chip_style-neutral___gELi3_7-0-23","postfix":"magritte-postfix___hgYUe_7-0-23","chip__checked":"magritte-chip__checked___3GRxf_7-0-23","chipChecked":"magritte-chip__checked___3GRxf_7-0-23","chip__custom":"magritte-chip__custom___mE-pN_7-0-23","chipCustom":"magritte-chip__custom___mE-pN_7-0-23","disabled":"magritte-disabled___CLRlf_7-0-23","chip_style-accent":"magritte-chip_style-accent___rD0pt_7-0-23","chipStyleAccent":"magritte-chip_style-accent___rD0pt_7-0-23","delete-only":"magritte-delete-only___dn3c7_7-0-23","deleteOnly":"magritte-delete-only___dn3c7_7-0-23","chip_secondary":"magritte-chip_secondary___druWa_7-0-23","chipSecondary":"magritte-chip_secondary___druWa_7-0-23","close_secondary":"magritte-close_secondary___7bJpC_7-0-23","closeSecondary":"magritte-close_secondary___7bJpC_7-0-23"};
8
-
9
- const ChipContent = ({ addon, 'aria-label': ariaLabel, hideLabel, onDelete, postfix, children, size = 'small', mode = 'primary', }) => {
10
- const showLabel = !hideLabel && !!children;
11
- const typographyForPrimary = size === 'extra-small' ? 'subtitle-2-semibold' : 'subtitle-1-semibold';
12
- const typography = mode === 'secondary' ? 'label-3-regular' : typographyForPrimary;
13
- return (jsxs("span", { className: classnames(styles.content, {
14
- [styles.contentDeletable]: !!onDelete,
15
- }), children: [addon && (jsx("span", { className: styles.addon, children: cloneElement(addon, {
16
- 'data-qa': 'chip-addon',
17
- 'aria-label': ariaLabel,
18
- 'aria-hidden': showLabel,
19
- }) })), showLabel && (jsxs("span", { className: styles.labelContainer, children: [jsx("span", { className: styles.label, children: jsx(Text, { Element: "span", typography: typography, children: children }) }), postfix && (jsx("span", { className: styles.postfixWrapper, children: jsx(Text, { Element: "span", typography: typography, children: jsx("span", { className: styles.postfix, children: postfix }) }) }))] }))] }));
20
- };
21
-
22
- export { ChipContent as C, styles as s };
23
- //# sourceMappingURL=ChipContent-DDk4p0Ez.js.map