@hh.ru/magritte-ui-chips 5.4.25 → 6.0.1

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.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- export * from '@hh.ru/magritte-ui-theme-provider';
2
1
  export * from '@hh.ru/magritte-ui-chips/CheckableChip';
3
2
  export * from '@hh.ru/magritte-ui-chips/CustomChip';
4
3
  export * from '@hh.ru/magritte-ui-chips/ChipsContainer';
package/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  import './index.css';
2
- export * from '@hh.ru/magritte-ui-theme-provider';
3
2
  export { CheckableChip } from './CheckableChip.js';
4
3
  export { CustomChip } from './CustomChip.js';
5
4
  export { ChipsContainer } from './ChipsContainer.js';
@@ -7,7 +6,7 @@ import 'react/jsx-runtime';
7
6
  import 'react';
8
7
  import 'classnames';
9
8
  import '@hh.ru/magritte-common-use-disabled';
10
- import './ChipContent-D77NYTqv.js';
9
+ import './ChipContent-DPfIb6Hc.js';
11
10
  import '@hh.ru/magritte-ui-typography';
12
11
  import '@hh.ru/magritte-ui-icon/variants/icon';
13
12
  import '@hh.ru/magritte-ui-scrollable-container';
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/index.mock.d.ts CHANGED
@@ -1,7 +1,5 @@
1
1
  import { ForwardRefExoticComponent } from 'react';
2
2
  export { type ChipStyle, type CheckableChipProps, type CustomChipProps } from '@hh.ru/magritte-ui-chips/types';
3
- declare const ThemeProvider: any;
4
- export { ThemeProvider };
5
3
  export declare const CheckableChip: ForwardRefExoticComponent<Record<string, unknown>>;
6
4
  export declare const CustomChip: ForwardRefExoticComponent<Record<string, unknown>>;
7
5
  export declare const ChipsContainer: ForwardRefExoticComponent<Record<string, unknown>>;
package/index.mock.js CHANGED
@@ -1,8 +1,6 @@
1
1
  import './index.css';
2
2
  import { mockComponent } from '@hh.ru/magritte-ui-mock-component';
3
3
 
4
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
5
- const { ThemeProvider } = jest.requireActual('@hh.ru/magritte-ui-theme-provider/index');
6
4
  const CheckableChip = mockComponent('CheckableChip', undefined, { withChildren: true });
7
5
  const CustomChip = mockComponent('CustomChip', undefined, {
8
6
  withChildren: true,
@@ -11,5 +9,5 @@ const ChipsContainer = mockComponent('ChipsContainer', undefined, {
11
9
  withChildren: true,
12
10
  });
13
11
 
14
- export { CheckableChip, ChipsContainer, CustomChip, ThemeProvider };
12
+ export { CheckableChip, ChipsContainer, CustomChip };
15
13
  //# sourceMappingURL=index.mock.js.map
package/index.mock.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.mock.js","sources":["../src/index.mock.ts"],"sourcesContent":["import { ForwardRefExoticComponent } from 'react';\n\nimport { mockComponent } from '@hh.ru/magritte-ui-mock-component';\n\nexport { type ChipStyle, type CheckableChipProps, type CustomChipProps } from '@hh.ru/magritte-ui-chips/types';\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\nconst { ThemeProvider } = jest.requireActual('@hh.ru/magritte-ui-theme-provider/index');\n\nexport { ThemeProvider };\n\nexport const CheckableChip: ForwardRefExoticComponent<Record<string, unknown>> = mockComponent(\n 'CheckableChip',\n undefined,\n { withChildren: true }\n);\n\nexport const CustomChip: ForwardRefExoticComponent<Record<string, unknown>> = mockComponent('CustomChip', undefined, {\n withChildren: true,\n});\n\nexport const ChipsContainer: ForwardRefExoticComponent<Record<string, unknown>> = mockComponent(\n 'ChipsContainer',\n undefined,\n {\n withChildren: true,\n }\n);\n"],"names":[],"mappings":";;AAMA;AACM,MAAA,EAAE,aAAa,EAAE,GAAG,IAAI,CAAC,aAAa,CAAC,yCAAyC,EAAE;AAI3E,MAAA,aAAa,GAAuD,aAAa,CAC1F,eAAe,EACf,SAAS,EACT,EAAE,YAAY,EAAE,IAAI,EAAE,EACxB;MAEW,UAAU,GAAuD,aAAa,CAAC,YAAY,EAAE,SAAS,EAAE;AACjH,IAAA,YAAY,EAAE,IAAI;AACrB,CAAA,EAAE;MAEU,cAAc,GAAuD,aAAa,CAC3F,gBAAgB,EAChB,SAAS,EACT;AACI,IAAA,YAAY,EAAE,IAAI;AACrB,CAAA;;;;"}
1
+ {"version":3,"file":"index.mock.js","sources":["../src/index.mock.ts"],"sourcesContent":["import { ForwardRefExoticComponent } from 'react';\n\nimport { mockComponent } from '@hh.ru/magritte-ui-mock-component';\n\nexport { type ChipStyle, type CheckableChipProps, type CustomChipProps } from '@hh.ru/magritte-ui-chips/types';\n\nexport const CheckableChip: ForwardRefExoticComponent<Record<string, unknown>> = mockComponent(\n 'CheckableChip',\n undefined,\n { withChildren: true }\n);\n\nexport const CustomChip: ForwardRefExoticComponent<Record<string, unknown>> = mockComponent('CustomChip', undefined, {\n withChildren: true,\n});\n\nexport const ChipsContainer: ForwardRefExoticComponent<Record<string, unknown>> = mockComponent(\n 'ChipsContainer',\n undefined,\n {\n withChildren: true,\n }\n);\n"],"names":[],"mappings":";;AAMa,MAAA,aAAa,GAAuD,aAAa,CAC1F,eAAe,EACf,SAAS,EACT,EAAE,YAAY,EAAE,IAAI,EAAE,EACxB;MAEW,UAAU,GAAuD,aAAa,CAAC,YAAY,EAAE,SAAS,EAAE;AACjH,IAAA,YAAY,EAAE,IAAI;AACrB,CAAA,EAAE;MAEU,cAAc,GAAuD,aAAa,CAC3F,gBAAgB,EAChB,SAAS,EACT;AACI,IAAA,YAAY,EAAE,IAAI;AACrB,CAAA;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hh.ru/magritte-ui-chips",
3
- "version": "5.4.25",
3
+ "version": "6.0.1",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
@@ -21,14 +21,13 @@
21
21
  "dependencies": {
22
22
  "@hh.ru/magritte-common-keyboard": "4.1.2",
23
23
  "@hh.ru/magritte-common-use-disabled": "1.0.12",
24
- "@hh.ru/magritte-design-tokens": "22.0.0",
24
+ "@hh.ru/magritte-design-tokens": "22.1.0",
25
25
  "@hh.ru/magritte-types": "5.0.4",
26
- "@hh.ru/magritte-ui-breakpoint": "5.0.3",
27
- "@hh.ru/magritte-ui-icon": "11.1.0",
26
+ "@hh.ru/magritte-ui-breakpoint": "6.0.0",
27
+ "@hh.ru/magritte-ui-icon": "12.0.0",
28
28
  "@hh.ru/magritte-ui-mock-component": "1.1.4",
29
- "@hh.ru/magritte-ui-scrollable-container": "5.2.22",
30
- "@hh.ru/magritte-ui-theme-provider": "1.1.51",
31
- "@hh.ru/magritte-ui-typography": "3.0.47"
29
+ "@hh.ru/magritte-ui-scrollable-container": "5.2.24",
30
+ "@hh.ru/magritte-ui-typography": "4.0.0"
32
31
  },
33
32
  "peerDependencies": {
34
33
  "classnames": ">=2.3.2",
@@ -37,5 +36,5 @@
37
36
  "publishConfig": {
38
37
  "access": "public"
39
38
  },
40
- "gitHead": "5b83b8f36a1aa79857e35ef038d9d32abef39be0"
39
+ "gitHead": "3683d6878ef11d2912f1bcda4bd1112735fb0493"
41
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_5-4-25","chip":"magritte-chip___uulZ9_5-4-25","chip-wrapper":"magritte-chip-wrapper___os8tP_5-4-25","chipWrapper":"magritte-chip-wrapper___os8tP_5-4-25","chip-wrapper__disabled":"magritte-chip-wrapper__disabled___mHM6-_5-4-25","chipWrapperDisabled":"magritte-chip-wrapper__disabled___mHM6-_5-4-25","content":"magritte-content___17f1s_5-4-25","size-small":"magritte-size-small___2di4r_5-4-25","sizeSmall":"magritte-size-small___2di4r_5-4-25","content__deletable":"magritte-content__deletable___iqF4W_5-4-25","contentDeletable":"magritte-content__deletable___iqF4W_5-4-25","addon":"magritte-addon___mlwVD_5-4-25","label-container":"magritte-label-container___VVRg1_5-4-25","labelContainer":"magritte-label-container___VVRg1_5-4-25","label":"magritte-label___NSEUN_5-4-25","postfix-wrapper":"magritte-postfix-wrapper___Qmxwy_5-4-25","postfixWrapper":"magritte-postfix-wrapper___Qmxwy_5-4-25","close":"magritte-close___5I1Fe_5-4-25","chip_style-neutral":"magritte-chip_style-neutral___gELi3_5-4-25","chipStyleNeutral":"magritte-chip_style-neutral___gELi3_5-4-25","postfix":"magritte-postfix___hgYUe_5-4-25","chip__checked":"magritte-chip__checked___3GRxf_5-4-25","chipChecked":"magritte-chip__checked___3GRxf_5-4-25","chip__custom":"magritte-chip__custom___mE-pN_5-4-25","chipCustom":"magritte-chip__custom___mE-pN_5-4-25","disabled":"magritte-disabled___CLRlf_5-4-25","chip_style-accent":"magritte-chip_style-accent___rD0pt_5-4-25","chipStyleAccent":"magritte-chip_style-accent___rD0pt_5-4-25","delete-only":"magritte-delete-only___dn3c7_5-4-25","deleteOnly":"magritte-delete-only___dn3c7_5-4-25","chip_secondary":"magritte-chip_secondary___druWa_5-4-25","chipSecondary":"magritte-chip_secondary___druWa_5-4-25","close_secondary":"magritte-close_secondary___7bJpC_5-4-25","closeSecondary":"magritte-close_secondary___7bJpC_5-4-25"};
8
-
9
- const ChipContent = ({ addon, 'aria-label': ariaLabel, hideLabel, onDelete, postfix, children, size = 'medium', mode = 'primary', }) => {
10
- const showLabel = !hideLabel && !!children;
11
- const typographyForPrimary = size === '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-D77NYTqv.js.map