@hh.ru/magritte-ui-chips 7.0.48 → 7.0.49

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
@@ -7,7 +7,7 @@ import 'react/jsx-runtime';
7
7
  import 'react';
8
8
  import 'classnames';
9
9
  import '@hh.ru/magritte-common-use-disabled';
10
- import './ChipContent-Cg4nwq6k.js';
10
+ import './ChipContent-CAn_MxFL.js';
11
11
  import '@hh.ru/magritte-ui-typography';
12
12
  import '@hh.ru/magritte-ui-icon/variants/icon';
13
13
  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.48",
3
+ "version": "7.0.49",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
@@ -32,7 +32,7 @@
32
32
  "@hh.ru/magritte-ui-breakpoint": "6.1.3",
33
33
  "@hh.ru/magritte-ui-icon": "15.1.6",
34
34
  "@hh.ru/magritte-ui-mock-component": "1.1.9",
35
- "@hh.ru/magritte-ui-scrollable-container": "6.5.4",
35
+ "@hh.ru/magritte-ui-scrollable-container": "6.5.5",
36
36
  "@hh.ru/magritte-ui-typography": "5.3.17"
37
37
  },
38
38
  "peerDependencies": {
@@ -42,5 +42,5 @@
42
42
  "publishConfig": {
43
43
  "access": "public"
44
44
  },
45
- "gitHead": "33dbaa1dc9b9705e925ffc9f6fcc7a0dc153bd36"
45
+ "gitHead": "ca948a3b83c1141cea0f32e35a9d4dc56f8d0077"
46
46
  }
@@ -1,45 +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 chipsStyles = {"input":"magritte-input___ctH9G_7-0-48","chip":"magritte-chip___uulZ9_7-0-48","chip-wrapper":"magritte-chip-wrapper___os8tP_7-0-48","chipWrapper":"magritte-chip-wrapper___os8tP_7-0-48","chip-wrapper__disabled":"magritte-chip-wrapper__disabled___mHM6-_7-0-48","chipWrapperDisabled":"magritte-chip-wrapper__disabled___mHM6-_7-0-48","content":"magritte-content___17f1s_7-0-48","size-extra-small":"magritte-size-extra-small___rVVLp_7-0-48","sizeExtraSmall":"magritte-size-extra-small___rVVLp_7-0-48","content__deletable":"magritte-content__deletable___iqF4W_7-0-48","contentDeletable":"magritte-content__deletable___iqF4W_7-0-48","addon":"magritte-addon___mlwVD_7-0-48","label-container":"magritte-label-container___VVRg1_7-0-48","labelContainer":"magritte-label-container___VVRg1_7-0-48","label":"magritte-label___NSEUN_7-0-48","postfix-wrapper":"magritte-postfix-wrapper___Qmxwy_7-0-48","postfixWrapper":"magritte-postfix-wrapper___Qmxwy_7-0-48","close":"magritte-close___5I1Fe_7-0-48","chip_style-neutral":"magritte-chip_style-neutral___gELi3_7-0-48","chipStyleNeutral":"magritte-chip_style-neutral___gELi3_7-0-48","postfix":"magritte-postfix___hgYUe_7-0-48","chip__checked":"magritte-chip__checked___3GRxf_7-0-48","chipChecked":"magritte-chip__checked___3GRxf_7-0-48","chip__custom":"magritte-chip__custom___mE-pN_7-0-48","chipCustom":"magritte-chip__custom___mE-pN_7-0-48","disabled":"magritte-disabled___CLRlf_7-0-48","chip_style-accent":"magritte-chip_style-accent___rD0pt_7-0-48","chipStyleAccent":"magritte-chip_style-accent___rD0pt_7-0-48","delete-only":"magritte-delete-only___dn3c7_7-0-48","deleteOnly":"magritte-delete-only___dn3c7_7-0-48","chip_secondary":"magritte-chip_secondary___druWa_7-0-48","chipSecondary":"magritte-chip_secondary___druWa_7-0-48","close_secondary":"magritte-close_secondary___7bJpC_7-0-48","closeSecondary":"magritte-close_secondary___7bJpC_7-0-48","container-gap":"magritte-container-gap___K6Isn_7-0-48","containerGap":"magritte-container-gap___K6Isn_7-0-48"};
8
-
9
- const ChipContent = ({
10
- addon,
11
- "aria-label": ariaLabel,
12
- hideLabel,
13
- onDelete,
14
- postfix,
15
- children,
16
- size = "small",
17
- mode = "primary"
18
- }) => {
19
- const showLabel = !hideLabel && !!children;
20
- const typographyForPrimary = size === "extra-small" ? "subtitle-2-semibold" : "subtitle-1-semibold";
21
- const typography = mode === "secondary" ? "label-3-regular" : typographyForPrimary;
22
- return /* @__PURE__ */ jsxs(
23
- "span",
24
- {
25
- className: classnames(chipsStyles.content, {
26
- [chipsStyles.contentDeletable]: !!onDelete
27
- }),
28
- children: [
29
- addon && /* @__PURE__ */ jsx("span", { className: chipsStyles.addon, children: cloneElement(addon, {
30
- "data-qa": "chip-addon",
31
- "aria-label": ariaLabel,
32
- "aria-hidden": showLabel
33
- }) }),
34
- showLabel && /* @__PURE__ */ jsxs("span", { className: chipsStyles.labelContainer, children: [
35
- /* @__PURE__ */ jsx("span", { className: chipsStyles.label, children: /* @__PURE__ */ jsx(Text, { Element: "span", typography, children }) }),
36
- postfix && /* @__PURE__ */ jsx("span", { className: chipsStyles.postfixWrapper, children: /* @__PURE__ */ jsx(Text, { Element: "span", typography, children: /* @__PURE__ */ jsx("span", { className: chipsStyles.postfix, children: postfix }) }) })
37
- ] })
38
- ]
39
- }
40
- );
41
- };
42
- var ChipContent_default = ChipContent;
43
-
44
- export { ChipContent_default as C, chipsStyles as c };
45
- //# sourceMappingURL=ChipContent-Cg4nwq6k.js.map