@hh.ru/magritte-ui-chips 7.1.0 → 7.1.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/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-C0tJbwjN.js';
10
+ import './ChipContent-DMbI4xxD.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.1.0",
3
+ "version": "7.1.2",
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.2.0",
34
34
  "@hh.ru/magritte-ui-mock-component": "1.1.9",
35
- "@hh.ru/magritte-ui-scrollable-container": "6.6.0",
35
+ "@hh.ru/magritte-ui-scrollable-container": "6.7.1",
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": "24e606d1bcdafe5b56067887c4ebb87a8fa87c0c"
45
+ "gitHead": "ad19ed51701dafb78eb62deec0a4cf7448b0ff47"
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-1-0","chip":"magritte-chip___uulZ9_7-1-0","chip-wrapper":"magritte-chip-wrapper___os8tP_7-1-0","chipWrapper":"magritte-chip-wrapper___os8tP_7-1-0","chip-wrapper__disabled":"magritte-chip-wrapper__disabled___mHM6-_7-1-0","chipWrapperDisabled":"magritte-chip-wrapper__disabled___mHM6-_7-1-0","content":"magritte-content___17f1s_7-1-0","size-extra-small":"magritte-size-extra-small___rVVLp_7-1-0","sizeExtraSmall":"magritte-size-extra-small___rVVLp_7-1-0","content__deletable":"magritte-content__deletable___iqF4W_7-1-0","contentDeletable":"magritte-content__deletable___iqF4W_7-1-0","addon":"magritte-addon___mlwVD_7-1-0","label-container":"magritte-label-container___VVRg1_7-1-0","labelContainer":"magritte-label-container___VVRg1_7-1-0","label":"magritte-label___NSEUN_7-1-0","postfix-wrapper":"magritte-postfix-wrapper___Qmxwy_7-1-0","postfixWrapper":"magritte-postfix-wrapper___Qmxwy_7-1-0","close":"magritte-close___5I1Fe_7-1-0","chip_style-neutral":"magritte-chip_style-neutral___gELi3_7-1-0","chipStyleNeutral":"magritte-chip_style-neutral___gELi3_7-1-0","postfix":"magritte-postfix___hgYUe_7-1-0","chip__checked":"magritte-chip__checked___3GRxf_7-1-0","chipChecked":"magritte-chip__checked___3GRxf_7-1-0","chip__custom":"magritte-chip__custom___mE-pN_7-1-0","chipCustom":"magritte-chip__custom___mE-pN_7-1-0","disabled":"magritte-disabled___CLRlf_7-1-0","chip_style-accent":"magritte-chip_style-accent___rD0pt_7-1-0","chipStyleAccent":"magritte-chip_style-accent___rD0pt_7-1-0","delete-only":"magritte-delete-only___dn3c7_7-1-0","deleteOnly":"magritte-delete-only___dn3c7_7-1-0","chip_secondary":"magritte-chip_secondary___druWa_7-1-0","chipSecondary":"magritte-chip_secondary___druWa_7-1-0","close_secondary":"magritte-close_secondary___7bJpC_7-1-0","closeSecondary":"magritte-close_secondary___7bJpC_7-1-0","container-gap":"magritte-container-gap___K6Isn_7-1-0","containerGap":"magritte-container-gap___K6Isn_7-1-0"};
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-C0tJbwjN.js.map