@hh.ru/magritte-ui-chips 7.1.3 → 7.1.5

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-V6adaX_p.js';
10
+ import './ChipContent-DcRrGD_F.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.3",
3
+ "version": "7.1.5",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
@@ -26,14 +26,14 @@
26
26
  "dependencies": {
27
27
  "@hh.ru/magritte-common-keyboard": "4.3.7",
28
28
  "@hh.ru/magritte-common-use-disabled": "1.0.17",
29
- "@hh.ru/magritte-design-tokens": "26.0.2",
29
+ "@hh.ru/magritte-design-tokens": "26.0.3",
30
30
  "@hh.ru/magritte-internal-default-props-context": "1.0.4",
31
31
  "@hh.ru/magritte-types": "5.0.9",
32
32
  "@hh.ru/magritte-ui-breakpoint": "6.1.3",
33
- "@hh.ru/magritte-ui-icon": "15.2.0",
33
+ "@hh.ru/magritte-ui-icon": "16.0.0",
34
34
  "@hh.ru/magritte-ui-mock-component": "1.1.9",
35
- "@hh.ru/magritte-ui-scrollable-container": "6.7.2",
36
- "@hh.ru/magritte-ui-typography": "5.3.17"
35
+ "@hh.ru/magritte-ui-scrollable-container": "6.7.4",
36
+ "@hh.ru/magritte-ui-typography": "5.3.18"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "classnames": ">=2.3.2",
@@ -42,5 +42,5 @@
42
42
  "publishConfig": {
43
43
  "access": "public"
44
44
  },
45
- "gitHead": "ce227820b42f34879e84552a6f96456c1b270de8"
45
+ "gitHead": "fd2be984ce4d23e62a54d072c9a090792c572b4b"
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-3","chip":"magritte-chip___uulZ9_7-1-3","chip-wrapper":"magritte-chip-wrapper___os8tP_7-1-3","chipWrapper":"magritte-chip-wrapper___os8tP_7-1-3","chip-wrapper__disabled":"magritte-chip-wrapper__disabled___mHM6-_7-1-3","chipWrapperDisabled":"magritte-chip-wrapper__disabled___mHM6-_7-1-3","content":"magritte-content___17f1s_7-1-3","size-extra-small":"magritte-size-extra-small___rVVLp_7-1-3","sizeExtraSmall":"magritte-size-extra-small___rVVLp_7-1-3","content__deletable":"magritte-content__deletable___iqF4W_7-1-3","contentDeletable":"magritte-content__deletable___iqF4W_7-1-3","addon":"magritte-addon___mlwVD_7-1-3","label-container":"magritte-label-container___VVRg1_7-1-3","labelContainer":"magritte-label-container___VVRg1_7-1-3","label":"magritte-label___NSEUN_7-1-3","postfix-wrapper":"magritte-postfix-wrapper___Qmxwy_7-1-3","postfixWrapper":"magritte-postfix-wrapper___Qmxwy_7-1-3","close":"magritte-close___5I1Fe_7-1-3","chip_style-neutral":"magritte-chip_style-neutral___gELi3_7-1-3","chipStyleNeutral":"magritte-chip_style-neutral___gELi3_7-1-3","postfix":"magritte-postfix___hgYUe_7-1-3","chip__checked":"magritte-chip__checked___3GRxf_7-1-3","chipChecked":"magritte-chip__checked___3GRxf_7-1-3","chip__custom":"magritte-chip__custom___mE-pN_7-1-3","chipCustom":"magritte-chip__custom___mE-pN_7-1-3","disabled":"magritte-disabled___CLRlf_7-1-3","chip_style-accent":"magritte-chip_style-accent___rD0pt_7-1-3","chipStyleAccent":"magritte-chip_style-accent___rD0pt_7-1-3","delete-only":"magritte-delete-only___dn3c7_7-1-3","deleteOnly":"magritte-delete-only___dn3c7_7-1-3","chip_secondary":"magritte-chip_secondary___druWa_7-1-3","chipSecondary":"magritte-chip_secondary___druWa_7-1-3","close_secondary":"magritte-close_secondary___7bJpC_7-1-3","closeSecondary":"magritte-close_secondary___7bJpC_7-1-3","container-gap":"magritte-container-gap___K6Isn_7-1-3","containerGap":"magritte-container-gap___K6Isn_7-1-3"};
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-V6adaX_p.js.map