@hh.ru/magritte-ui-chips 4.0.3 → 5.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/CheckableChip.js +3 -4
- package/CheckableChip.js.map +1 -1
- package/ChipContent-5760bbaf.js +21 -0
- package/ChipContent-5760bbaf.js.map +1 -0
- package/ChipContent.d.ts +1 -1
- package/ChipContent.js +1 -2
- package/ChipContent.js.map +1 -1
- package/ChipsContainer.js +2 -3
- package/ChipsContainer.js.map +1 -1
- package/CustomChip.js +3 -4
- package/CustomChip.js.map +1 -1
- package/index.css +763 -604
- package/index.js +1 -2
- package/index.js.map +1 -1
- package/package.json +8 -9
- package/types.d.ts +3 -3
- package/ChipContent-9fe51858.js +0 -22
- package/ChipContent-9fe51858.js.map +0 -1
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-
|
|
9
|
+
import './ChipContent-5760bbaf.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": "
|
|
3
|
+
"version": "5.0.1",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"sideEffects": [
|
|
@@ -21,16 +21,15 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
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.
|
|
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.
|
|
26
|
+
"@hh.ru/magritte-ui-action": "4.3.10",
|
|
27
27
|
"@hh.ru/magritte-ui-breakpoint": "4.0.2",
|
|
28
|
-
"@hh.ru/magritte-ui-
|
|
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.
|
|
32
|
-
"@hh.ru/magritte-ui-theme-provider": "1.1.
|
|
33
|
-
"@hh.ru/magritte-ui-typography": "3.0.
|
|
30
|
+
"@hh.ru/magritte-ui-scrollable-container": "4.3.16",
|
|
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": "
|
|
41
|
+
"gitHead": "4480faadc19af08673481a84a62f77d081e9be2e"
|
|
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
|
-
|
|
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
|
-
|
|
30
|
+
postfix?: never;
|
|
31
31
|
hideLabel?: never;
|
|
32
32
|
};
|
|
33
33
|
type ChipCommonProps = {
|
package/ChipContent-9fe51858.js
DELETED
|
@@ -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-3","chip":"magritte-chip___uulZ9_4-0-3","chip-wrapper":"magritte-chip-wrapper___os8tP_4-0-3","chipWrapper":"magritte-chip-wrapper___os8tP_4-0-3","chip-wrapper__disabled":"magritte-chip-wrapper__disabled___mHM6-_4-0-3","chipWrapperDisabled":"magritte-chip-wrapper__disabled___mHM6-_4-0-3","content":"magritte-content___17f1s_4-0-3","content__deletable":"magritte-content__deletable___iqF4W_4-0-3","contentDeletable":"magritte-content__deletable___iqF4W_4-0-3","addon":"magritte-addon___mlwVD_4-0-3","label":"magritte-label___NSEUN_4-0-3","counter":"magritte-counter___X35B-_4-0-3","close":"magritte-close___5I1Fe_4-0-3","chip_style-neutral":"magritte-chip_style-neutral___gELi3_4-0-3","chipStyleNeutral":"magritte-chip_style-neutral___gELi3_4-0-3","chip__checked":"magritte-chip__checked___3GRxf_4-0-3","chipChecked":"magritte-chip__checked___3GRxf_4-0-3","chip__custom":"magritte-chip__custom___mE-pN_4-0-3","chipCustom":"magritte-chip__custom___mE-pN_4-0-3","chip_style-accent":"magritte-chip_style-accent___rD0pt_4-0-3","chipStyleAccent":"magritte-chip_style-accent___rD0pt_4-0-3"};
|
|
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-9fe51858.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChipContent-9fe51858.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,SAAS;AACvB,oBAAA,aAAa,EAAE,SAAS;AAC3B,iBAAA,CAAC,EACC,CAAA,CACV,EACA,SAAS,KACND,IACI,CAAAE,QAAA,EAAA,EAAA,QAAA,EAAA,CAAAD,GAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAE,MAAM,CAAC,KAAK,EAAA,QAAA,EACzBA,GAAC,CAAA,IAAI,EAAC,EAAA,OAAO,EAAC,MAAM,EAAC,UAAU,EAAC,qBAAqB,EAChD,QAAA,EAAA,QAAQ,EACN,CAAA,EAAA,CACJ,EACN,OAAO,KACJA,GAAM,CAAA,MAAA,EAAA,EAAA,SAAS,EAAE,MAAM,CAAC,OAAO,EAC3B,QAAA,EAAAA,GAAA,CAAC,OAAO,EAAA,EAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAC,WAAW,EAAC,IAAI,EAAC,WAAW,EAAA,CAAG,EAC3D,CAAA,CACV,CACF,EAAA,CAAA,CACN,CACE,EAAA,CAAA,EACT;AACN;;;;"}
|