@hh.ru/magritte-ui-chips 7.0.44 → 7.0.46
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 +1 -1
- package/ChipContent-BYkOgNB3.js +23 -0
- package/{ChipContent-BsVKf7Wn.js.map → ChipContent-BYkOgNB3.js.map} +1 -1
- package/ChipContent.js +1 -1
- package/ChipsContainer.js +2 -2
- package/CustomChip.js +1 -1
- package/index.css +1371 -1371
- package/index.js +1 -1
- package/package.json +13 -13
- package/ChipContent-BsVKf7Wn.js +0 -23
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-BYkOgNB3.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.0.
|
|
3
|
+
"version": "7.0.46",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"sideEffects": [
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"prepack": "yarn root:prepack $(pwd)",
|
|
13
13
|
"postpublish": "yarn root:postpublish $(pwd)",
|
|
14
14
|
"stylelint-check": "yarn root:stylelint-check $(pwd)",
|
|
15
|
-
"
|
|
15
|
+
"lint-check": "yarn root:lint-check $(pwd)",
|
|
16
16
|
"ts-config": "yarn root:ts-config $(pwd)",
|
|
17
17
|
"ts-check": "yarn root:ts-check $(pwd)",
|
|
18
18
|
"test": "yarn root:test $(pwd)",
|
|
@@ -23,16 +23,16 @@
|
|
|
23
23
|
"figma-snapshot-update": "yarn root:figma-snapshot $(pwd) --update"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@hh.ru/magritte-common-keyboard": "4.3.
|
|
27
|
-
"@hh.ru/magritte-common-use-disabled": "1.0.
|
|
28
|
-
"@hh.ru/magritte-design-tokens": "
|
|
29
|
-
"@hh.ru/magritte-internal-default-props-context": "1.0.
|
|
30
|
-
"@hh.ru/magritte-types": "5.0.
|
|
31
|
-
"@hh.ru/magritte-ui-breakpoint": "6.1.
|
|
32
|
-
"@hh.ru/magritte-ui-icon": "15.1.
|
|
33
|
-
"@hh.ru/magritte-ui-mock-component": "1.1.
|
|
34
|
-
"@hh.ru/magritte-ui-scrollable-container": "6.5.
|
|
35
|
-
"@hh.ru/magritte-ui-typography": "5.3.
|
|
26
|
+
"@hh.ru/magritte-common-keyboard": "4.3.6",
|
|
27
|
+
"@hh.ru/magritte-common-use-disabled": "1.0.16",
|
|
28
|
+
"@hh.ru/magritte-design-tokens": "26.0.0",
|
|
29
|
+
"@hh.ru/magritte-internal-default-props-context": "1.0.3",
|
|
30
|
+
"@hh.ru/magritte-types": "5.0.8",
|
|
31
|
+
"@hh.ru/magritte-ui-breakpoint": "6.1.2",
|
|
32
|
+
"@hh.ru/magritte-ui-icon": "15.1.4",
|
|
33
|
+
"@hh.ru/magritte-ui-mock-component": "1.1.8",
|
|
34
|
+
"@hh.ru/magritte-ui-scrollable-container": "6.5.2",
|
|
35
|
+
"@hh.ru/magritte-ui-typography": "5.3.15"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"classnames": ">=2.3.2",
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "b0ff5da48fb29d516c8289082560ee1882d16986"
|
|
45
45
|
}
|
package/ChipContent-BsVKf7Wn.js
DELETED
|
@@ -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 chipsStyles = {"input":"magritte-input___ctH9G_7-0-44","chip":"magritte-chip___uulZ9_7-0-44","chip-wrapper":"magritte-chip-wrapper___os8tP_7-0-44","chipWrapper":"magritte-chip-wrapper___os8tP_7-0-44","chip-wrapper__disabled":"magritte-chip-wrapper__disabled___mHM6-_7-0-44","chipWrapperDisabled":"magritte-chip-wrapper__disabled___mHM6-_7-0-44","content":"magritte-content___17f1s_7-0-44","size-extra-small":"magritte-size-extra-small___rVVLp_7-0-44","sizeExtraSmall":"magritte-size-extra-small___rVVLp_7-0-44","content__deletable":"magritte-content__deletable___iqF4W_7-0-44","contentDeletable":"magritte-content__deletable___iqF4W_7-0-44","addon":"magritte-addon___mlwVD_7-0-44","label-container":"magritte-label-container___VVRg1_7-0-44","labelContainer":"magritte-label-container___VVRg1_7-0-44","label":"magritte-label___NSEUN_7-0-44","postfix-wrapper":"magritte-postfix-wrapper___Qmxwy_7-0-44","postfixWrapper":"magritte-postfix-wrapper___Qmxwy_7-0-44","close":"magritte-close___5I1Fe_7-0-44","chip_style-neutral":"magritte-chip_style-neutral___gELi3_7-0-44","chipStyleNeutral":"magritte-chip_style-neutral___gELi3_7-0-44","postfix":"magritte-postfix___hgYUe_7-0-44","chip__checked":"magritte-chip__checked___3GRxf_7-0-44","chipChecked":"magritte-chip__checked___3GRxf_7-0-44","chip__custom":"magritte-chip__custom___mE-pN_7-0-44","chipCustom":"magritte-chip__custom___mE-pN_7-0-44","disabled":"magritte-disabled___CLRlf_7-0-44","chip_style-accent":"magritte-chip_style-accent___rD0pt_7-0-44","chipStyleAccent":"magritte-chip_style-accent___rD0pt_7-0-44","delete-only":"magritte-delete-only___dn3c7_7-0-44","deleteOnly":"magritte-delete-only___dn3c7_7-0-44","chip_secondary":"magritte-chip_secondary___druWa_7-0-44","chipSecondary":"magritte-chip_secondary___druWa_7-0-44","close_secondary":"magritte-close_secondary___7bJpC_7-0-44","closeSecondary":"magritte-close_secondary___7bJpC_7-0-44","container-gap":"magritte-container-gap___K6Isn_7-0-44","containerGap":"magritte-container-gap___K6Isn_7-0-44"};
|
|
8
|
-
|
|
9
|
-
const ChipContent = ({ addon, 'aria-label': ariaLabel, hideLabel, onDelete, postfix, children, size = 'small', mode = 'primary', }) => {
|
|
10
|
-
const showLabel = !hideLabel && !!children;
|
|
11
|
-
const typographyForPrimary = size === 'extra-small' ? 'subtitle-2-semibold' : 'subtitle-1-semibold';
|
|
12
|
-
const typography = mode === 'secondary' ? 'label-3-regular' : typographyForPrimary;
|
|
13
|
-
return (jsxs("span", { className: classnames(chipsStyles.content, {
|
|
14
|
-
[chipsStyles.contentDeletable]: !!onDelete,
|
|
15
|
-
}), children: [addon && (jsx("span", { className: chipsStyles.addon, children: cloneElement(addon, {
|
|
16
|
-
'data-qa': 'chip-addon',
|
|
17
|
-
'aria-label': ariaLabel,
|
|
18
|
-
'aria-hidden': showLabel,
|
|
19
|
-
}) })), showLabel && (jsxs("span", { className: chipsStyles.labelContainer, children: [jsx("span", { className: chipsStyles.label, children: jsx(Text, { Element: "span", typography: typography, children: children }) }), postfix && (jsx("span", { className: chipsStyles.postfixWrapper, children: jsx(Text, { Element: "span", typography: typography, children: jsx("span", { className: chipsStyles.postfix, children: postfix }) }) }))] }))] }));
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export { ChipContent as C, chipsStyles as c };
|
|
23
|
-
//# sourceMappingURL=ChipContent-BsVKf7Wn.js.map
|