@hh.ru/magritte-ui-chips 4.0.2 → 5.0.0

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,9 +6,8 @@ export { ChipsContainer } from './ChipsContainer.js';
6
6
  import 'react/jsx-runtime';
7
7
  import 'react';
8
8
  import '@hh.ru/magritte-common-use-disabled';
9
- import './ChipContent-2bfb618d.js';
9
+ import './ChipContent-f4ad02d5.js';
10
10
  import 'classnames';
11
- import '@hh.ru/magritte-ui-counter';
12
11
  import '@hh.ru/magritte-ui-typography';
13
12
  import '@hh.ru/magritte-ui-action';
14
13
  import '@hh.ru/magritte-ui-icon/variants/icon';
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hh.ru/magritte-ui-chips",
3
- "version": "4.0.2",
3
+ "version": "5.0.0",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
@@ -19,18 +19,17 @@
19
19
  "test": "yarn root:test $(pwd)"
20
20
  },
21
21
  "dependencies": {
22
- "@hh.ru/magritte-common-keyboard": "3.0.2",
22
+ "@hh.ru/magritte-common-keyboard": "4.0.0",
23
23
  "@hh.ru/magritte-common-use-disabled": "1.0.8",
24
- "@hh.ru/magritte-design-tokens": "18.1.2",
24
+ "@hh.ru/magritte-design-tokens": "18.2.0",
25
25
  "@hh.ru/magritte-types": "4.0.1",
26
- "@hh.ru/magritte-ui-action": "4.3.8",
26
+ "@hh.ru/magritte-ui-action": "4.3.9",
27
27
  "@hh.ru/magritte-ui-breakpoint": "4.0.2",
28
- "@hh.ru/magritte-ui-counter": "4.0.10",
29
- "@hh.ru/magritte-ui-icon": "7.1.7",
28
+ "@hh.ru/magritte-ui-icon": "7.1.8",
30
29
  "@hh.ru/magritte-ui-mock-component": "1.0.10",
31
- "@hh.ru/magritte-ui-scrollable-container": "4.3.14",
32
- "@hh.ru/magritte-ui-theme-provider": "1.1.23",
33
- "@hh.ru/magritte-ui-typography": "3.0.10"
30
+ "@hh.ru/magritte-ui-scrollable-container": "4.3.15",
31
+ "@hh.ru/magritte-ui-theme-provider": "1.1.24",
32
+ "@hh.ru/magritte-ui-typography": "3.0.11"
34
33
  },
35
34
  "peerDependencies": {
36
35
  "classnames": ">=2.3.2",
@@ -39,5 +38,5 @@
39
38
  "publishConfig": {
40
39
  "access": "public"
41
40
  },
42
- "gitHead": "98a8e09926b544aea2b9255436cf0605ad12e3f1"
41
+ "gitHead": "2096654db9454114e1dbf70e7a7786d7e5b688b8"
43
42
  }
package/types.d.ts CHANGED
@@ -20,14 +20,14 @@ type ChipChildrenProps = {
20
20
  /** Содержимое лейбла чипса */
21
21
  children: ChipChildren;
22
22
  style?: ChipStyle;
23
- /** Значение в счетчике */
24
- counter?: string;
23
+ /** Постфикс */
24
+ postfix?: string;
25
25
  } & (ChipHideLabelWithIcon | ChipHideLabelWithoutIcon);
26
26
  type ChildIconProps = {
27
27
  children?: never;
28
28
  addon: ReactElement;
29
29
  'aria-label': string;
30
- counter?: never;
30
+ postfix?: never;
31
31
  hideLabel?: never;
32
32
  };
33
33
  type ChipCommonProps = {
@@ -1,22 +0,0 @@
1
- import './index.css';
2
- import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
3
- import { cloneElement } from 'react';
4
- import classnames from 'classnames';
5
- import { Counter } from '@hh.ru/magritte-ui-counter';
6
- import { Text } from '@hh.ru/magritte-ui-typography';
7
-
8
- var styles = {"input":"magritte-input___ctH9G_4-0-2","chip":"magritte-chip___uulZ9_4-0-2","chip-wrapper":"magritte-chip-wrapper___os8tP_4-0-2","chipWrapper":"magritte-chip-wrapper___os8tP_4-0-2","chip-wrapper__disabled":"magritte-chip-wrapper__disabled___mHM6-_4-0-2","chipWrapperDisabled":"magritte-chip-wrapper__disabled___mHM6-_4-0-2","content":"magritte-content___17f1s_4-0-2","content__deletable":"magritte-content__deletable___iqF4W_4-0-2","contentDeletable":"magritte-content__deletable___iqF4W_4-0-2","addon":"magritte-addon___mlwVD_4-0-2","label":"magritte-label___NSEUN_4-0-2","counter":"magritte-counter___X35B-_4-0-2","close":"magritte-close___5I1Fe_4-0-2","chip_style-neutral":"magritte-chip_style-neutral___gELi3_4-0-2","chipStyleNeutral":"magritte-chip_style-neutral___gELi3_4-0-2","chip__checked":"magritte-chip__checked___3GRxf_4-0-2","chipChecked":"magritte-chip__checked___3GRxf_4-0-2","chip__custom":"magritte-chip__custom___mE-pN_4-0-2","chipCustom":"magritte-chip__custom___mE-pN_4-0-2","chip_style-accent":"magritte-chip_style-accent___rD0pt_4-0-2","chipStyleAccent":"magritte-chip_style-accent___rD0pt_4-0-2"};
9
-
10
- const ChipContent = ({ addon, 'aria-label': ariaLabel, hideLabel, onDelete, counter, children, }) => {
11
- const showLabel = !hideLabel && !!children;
12
- return (jsxs("span", { className: classnames(styles.content, {
13
- [styles.contentDeletable]: !!onDelete,
14
- }), children: [addon && (jsx("span", { className: styles.addon, children: cloneElement(addon, {
15
- 'data-qa': 'chip-addon',
16
- 'aria-label': ariaLabel,
17
- 'aria-hidden': showLabel,
18
- }) })), showLabel && (jsxs(Fragment, { children: [jsx("span", { className: styles.label, children: jsx(Text, { Element: "span", typography: "subtitle-1-semibold", children: children }) }), counter && (jsx("span", { className: styles.counter, children: jsx(Counter, { label: counter, style: "attention", mode: "secondary" }) }))] }))] }));
19
- };
20
-
21
- export { ChipContent as C, styles as s };
22
- //# sourceMappingURL=ChipContent-2bfb618d.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ChipContent-2bfb618d.js","sources":["../src/ChipContent.tsx"],"sourcesContent":["import { cloneElement, FC } from 'react';\nimport classnames from 'classnames';\n\nimport { CustomChipProps } from '@hh.ru/magritte-ui-chips/types';\nimport { Counter } from '@hh.ru/magritte-ui-counter';\nimport { Text } from '@hh.ru/magritte-ui-typography';\n\nimport styles from './chips.less';\n\ntype ChipContentProps = Pick<\n CustomChipProps,\n 'addon' | 'hideLabel' | 'aria-label' | 'counter' | 'onDelete' | 'children'\n>;\n\nconst ChipContent: FC<ChipContentProps> = ({\n addon,\n 'aria-label': ariaLabel,\n hideLabel,\n onDelete,\n counter,\n children,\n}) => {\n const showLabel = !hideLabel && !!children;\n return (\n <span\n className={classnames(styles.content, {\n [styles.contentDeletable]: !!onDelete,\n })}\n >\n {addon && (\n <span className={styles.addon}>\n {cloneElement(addon, {\n 'data-qa': 'chip-addon',\n 'aria-label': ariaLabel,\n 'aria-hidden': showLabel,\n })}\n </span>\n )}\n {showLabel && (\n <>\n <span className={styles.label}>\n <Text Element=\"span\" typography=\"subtitle-1-semibold\">\n {children}\n </Text>\n </span>\n {counter && (\n <span className={styles.counter}>\n <Counter label={counter} style=\"attention\" mode=\"secondary\" />\n </span>\n )}\n </>\n )}\n </span>\n );\n};\n\nexport default ChipContent;\n"],"names":["_jsxs","_jsx","_Fragment"],"mappings":";;;;;;;;AAcA,MAAM,WAAW,GAAyB,CAAC,EACvC,KAAK,EACL,YAAY,EAAE,SAAS,EACvB,SAAS,EACT,QAAQ,EACR,OAAO,EACP,QAAQ,GACX,KAAI;IACD,MAAM,SAAS,GAAG,CAAC,SAAS,IAAI,CAAC,CAAC,QAAQ,CAAC;IAC3C,QACIA,eACI,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,OAAO,EAAE;AAClC,YAAA,CAAC,MAAM,CAAC,gBAAgB,GAAG,CAAC,CAAC,QAAQ;AACxC,SAAA,CAAC,EAED,QAAA,EAAA,CAAA,KAAK,KACFC,cAAM,SAAS,EAAE,MAAM,CAAC,KAAK,EAAA,QAAA,EACxB,YAAY,CAAC,KAAK,EAAE;AACjB,oBAAA,SAAS,EAAE,YAAY;AACvB,oBAAA,YAAY,EAAE,SAA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