@hh.ru/magritte-ui-chips 5.2.28 → 5.3.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/CheckableChip.js +6 -3
- package/CheckableChip.js.map +1 -1
- package/ChipContent-kMWSLbKS.js +23 -0
- package/ChipContent-kMWSLbKS.js.map +1 -0
- package/ChipContent.d.ts +1 -1
- package/ChipContent.js +1 -1
- package/ChipsContainer.js +2 -2
- package/CustomChip.js +4 -3
- package/CustomChip.js.map +1 -1
- package/index.css +2058 -1349
- package/index.js +1 -1
- package/package.json +8 -8
- package/types.d.ts +2 -0
- package/ChipContent-C7vLmLSw.js +0 -22
- package/ChipContent-C7vLmLSw.js.map +0 -1
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-
|
|
10
|
+
import './ChipContent-kMWSLbKS.js';
|
|
11
11
|
import '@hh.ru/magritte-ui-typography';
|
|
12
12
|
import '@hh.ru/magritte-ui-action';
|
|
13
13
|
import '@hh.ru/magritte-ui-icon/variants/icon';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hh.ru/magritte-ui-chips",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"sideEffects": [
|
|
@@ -22,15 +22,15 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@hh.ru/magritte-common-keyboard": "4.0.3",
|
|
24
24
|
"@hh.ru/magritte-common-use-disabled": "1.0.10",
|
|
25
|
-
"@hh.ru/magritte-design-tokens": "20.0
|
|
25
|
+
"@hh.ru/magritte-design-tokens": "20.1.0",
|
|
26
26
|
"@hh.ru/magritte-types": "5.0.0",
|
|
27
|
-
"@hh.ru/magritte-ui-action": "4.4.
|
|
27
|
+
"@hh.ru/magritte-ui-action": "4.4.20",
|
|
28
28
|
"@hh.ru/magritte-ui-breakpoint": "4.1.1",
|
|
29
|
-
"@hh.ru/magritte-ui-icon": "7.9.
|
|
29
|
+
"@hh.ru/magritte-ui-icon": "7.9.9",
|
|
30
30
|
"@hh.ru/magritte-ui-mock-component": "1.0.12",
|
|
31
|
-
"@hh.ru/magritte-ui-scrollable-container": "4.
|
|
32
|
-
"@hh.ru/magritte-ui-theme-provider": "1.1.
|
|
33
|
-
"@hh.ru/magritte-ui-typography": "3.0.
|
|
31
|
+
"@hh.ru/magritte-ui-scrollable-container": "4.5.1",
|
|
32
|
+
"@hh.ru/magritte-ui-theme-provider": "1.1.35",
|
|
33
|
+
"@hh.ru/magritte-ui-typography": "3.0.24"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"classnames": ">=2.3.2",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"publishConfig": {
|
|
40
40
|
"access": "public"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "e7fdddfb173fef52fee57b97129483cf8663f8cf"
|
|
43
43
|
}
|
package/types.d.ts
CHANGED
|
@@ -36,6 +36,8 @@ type ChipCommonProps = {
|
|
|
36
36
|
dataQaWrapper?: string;
|
|
37
37
|
/** Размер чипса */
|
|
38
38
|
size?: 'small' | 'medium';
|
|
39
|
+
/** Режим отображения чипса */
|
|
40
|
+
mode?: 'primary' | 'secondary';
|
|
39
41
|
} & (ChipChildrenProps | ChildIconProps);
|
|
40
42
|
type CheckableChipBaseProps = {
|
|
41
43
|
/** Тип чипса */
|
package/ChipContent-C7vLmLSw.js
DELETED
|
@@ -1,22 +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-2-28","chip":"magritte-chip___uulZ9_5-2-28","chip-wrapper":"magritte-chip-wrapper___os8tP_5-2-28","chipWrapper":"magritte-chip-wrapper___os8tP_5-2-28","chip-wrapper__disabled":"magritte-chip-wrapper__disabled___mHM6-_5-2-28","chipWrapperDisabled":"magritte-chip-wrapper__disabled___mHM6-_5-2-28","content":"magritte-content___17f1s_5-2-28","size-small":"magritte-size-small___2di4r_5-2-28","sizeSmall":"magritte-size-small___2di4r_5-2-28","content__deletable":"magritte-content__deletable___iqF4W_5-2-28","contentDeletable":"magritte-content__deletable___iqF4W_5-2-28","addon":"magritte-addon___mlwVD_5-2-28","label-container":"magritte-label-container___VVRg1_5-2-28","labelContainer":"magritte-label-container___VVRg1_5-2-28","label":"magritte-label___NSEUN_5-2-28","postfix-wrapper":"magritte-postfix-wrapper___Qmxwy_5-2-28","postfixWrapper":"magritte-postfix-wrapper___Qmxwy_5-2-28","close":"magritte-close___5I1Fe_5-2-28","chip_style-neutral":"magritte-chip_style-neutral___gELi3_5-2-28","chipStyleNeutral":"magritte-chip_style-neutral___gELi3_5-2-28","postfix":"magritte-postfix___hgYUe_5-2-28","chip__checked":"magritte-chip__checked___3GRxf_5-2-28","chipChecked":"magritte-chip__checked___3GRxf_5-2-28","chip__custom":"magritte-chip__custom___mE-pN_5-2-28","chipCustom":"magritte-chip__custom___mE-pN_5-2-28","disabled":"magritte-disabled___CLRlf_5-2-28","chip_style-accent":"magritte-chip_style-accent___rD0pt_5-2-28","chipStyleAccent":"magritte-chip_style-accent___rD0pt_5-2-28","delete-only":"magritte-delete-only___dn3c7_5-2-28","deleteOnly":"magritte-delete-only___dn3c7_5-2-28"};
|
|
8
|
-
|
|
9
|
-
const ChipContent = ({ addon, 'aria-label': ariaLabel, hideLabel, onDelete, postfix, children, size = 'medium', }) => {
|
|
10
|
-
const showLabel = !hideLabel && !!children;
|
|
11
|
-
const typography = size === 'small' ? 'subtitle-2-semibold' : 'subtitle-1-semibold';
|
|
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("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 }) }) }))] }))] }));
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export { ChipContent as C, styles as s };
|
|
22
|
-
//# sourceMappingURL=ChipContent-C7vLmLSw.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChipContent-C7vLmLSw.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 { Text } from '@hh.ru/magritte-ui-typography';\n\nimport styles from './chips.less';\n\ntype ChipContentProps = Pick<\n CustomChipProps,\n 'addon' | 'hideLabel' | 'aria-label' | 'postfix' | 'onDelete' | 'children' | 'size'\n>;\n\nconst ChipContent: FC<ChipContentProps> = ({\n addon,\n 'aria-label': ariaLabel,\n hideLabel,\n onDelete,\n postfix,\n children,\n size = 'medium',\n}) => {\n const showLabel = !hideLabel && !!children;\n const typography = size === 'small' ? 'subtitle-2-semibold' : 'subtitle-1-semibold';\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 <span className={styles.labelContainer}>\n <span className={styles.label}>\n <Text Element=\"span\" typography={typography}>\n {children}\n </Text>\n </span>\n {postfix && (\n <span className={styles.postfixWrapper}>\n <Text Element=\"span\" typography={typography}>\n <span className={styles.postfix}>{postfix}</span>\n </Text>\n </span>\n )}\n </span>\n )}\n </span>\n );\n};\n\nexport default ChipContent;\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;AAaM,MAAA,WAAW,GAAyB,CAAC,EACvC,KAAK,EACL,YAAY,EAAE,SAAS,EACvB,SAAS,EACT,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,IAAI,GAAG,QAAQ,GAClB,KAAI;IACD,MAAM,SAAS,GAAG,CAAC,SAAS,IAAI,CAAC,CAAC,QAAQ,CAAC;AAC3C,IAAA,MAAM,UAAU,GAAG,IAAI,KAAK,OAAO,GAAG,qBAAqB,GAAG,qBAAqB,CAAC;IACpF,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,SAAS;AACvB,oBAAA,aAAa,EAAE,SAAS;AAC3B,iBAAA,CAAC,EACC,CAAA,CACV,EACA,SAAS,KACND,IAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAE,MAAM,CAAC,cAAc,EAClC,QAAA,EAAA,CAAAC,GAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAE,MAAM,CAAC,KAAK,EACzB,QAAA,EAAAA,GAAA,CAAC,IAAI,EAAA,EAAC,OAAO,EAAC,MAAM,EAAC,UAAU,EAAE,UAAU,EAAA,QAAA,EACtC,QAAQ,EAAA,CACN,GACJ,EACN,OAAO,KACJA,GAAM,CAAA,MAAA,EAAA,EAAA,SAAS,EAAE,MAAM,CAAC,cAAc,EAAA,QAAA,EAClCA,GAAC,CAAA,IAAI,IAAC,OAAO,EAAC,MAAM,EAAC,UAAU,EAAE,UAAU,EACvC,QAAA,EAAAA,GAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAE,MAAM,CAAC,OAAO,EAAG,QAAA,EAAA,OAAO,EAAQ,CAAA,EAAA,CAC9C,GACJ,CACV,CAAA,EAAA,CACE,CACV,CAAA,EAAA,CACE,EACT;AACN;;;;"}
|