@hh.ru/magritte-ui-chips 6.0.40 → 6.0.42
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-DxHArFF9.js +23 -0
- package/{ChipContent-BA0MUPBP.js.map → ChipContent-DxHArFF9.js.map} +1 -1
- package/ChipContent.js +1 -1
- package/ChipsContainer.js +2 -2
- package/CustomChip.js +3 -3
- package/CustomChip.js.map +1 -1
- package/index.css +741 -741
- package/index.js +1 -1
- package/package.json +3 -3
- package/types.d.ts +3 -0
- package/ChipContent-BA0MUPBP.js +0 -23
package/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import 'react/jsx-runtime';
|
|
|
6
6
|
import 'react';
|
|
7
7
|
import 'classnames';
|
|
8
8
|
import '@hh.ru/magritte-common-use-disabled';
|
|
9
|
-
import './ChipContent-
|
|
9
|
+
import './ChipContent-DxHArFF9.js';
|
|
10
10
|
import '@hh.ru/magritte-ui-typography';
|
|
11
11
|
import '@hh.ru/magritte-ui-icon/variants/icon';
|
|
12
12
|
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": "6.0.
|
|
3
|
+
"version": "6.0.42",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"sideEffects": [
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"watch": "yarn root:watch $(pwd)"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@hh.ru/magritte-common-keyboard": "4.
|
|
22
|
+
"@hh.ru/magritte-common-keyboard": "4.2.0",
|
|
23
23
|
"@hh.ru/magritte-common-use-disabled": "1.0.14",
|
|
24
24
|
"@hh.ru/magritte-design-tokens": "24.3.0",
|
|
25
25
|
"@hh.ru/magritte-types": "5.0.5",
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "41d32c285f6eba76c355d91dadb0e136fb13c41f"
|
|
40
40
|
}
|
package/types.d.ts
CHANGED
|
@@ -54,10 +54,13 @@ type DeletableCustomChipProps = {
|
|
|
54
54
|
* удаления доступна для нажатия
|
|
55
55
|
*/
|
|
56
56
|
deleteOnly?: boolean;
|
|
57
|
+
/** aria-label кнопки удаления */
|
|
58
|
+
deleteButtonAriaLabel?: string;
|
|
57
59
|
};
|
|
58
60
|
type NonDeletableCustomChipProps = {
|
|
59
61
|
onDelete?: never;
|
|
60
62
|
deleteOnly?: never;
|
|
63
|
+
deleteButtonAriaLabel?: never;
|
|
61
64
|
};
|
|
62
65
|
export type CustomChipProps = {
|
|
63
66
|
/** Флаг выбран ли чипс */
|
package/ChipContent-BA0MUPBP.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 styles = {"input":"magritte-input___ctH9G_6-0-40","chip":"magritte-chip___uulZ9_6-0-40","chip-wrapper":"magritte-chip-wrapper___os8tP_6-0-40","chipWrapper":"magritte-chip-wrapper___os8tP_6-0-40","chip-wrapper__disabled":"magritte-chip-wrapper__disabled___mHM6-_6-0-40","chipWrapperDisabled":"magritte-chip-wrapper__disabled___mHM6-_6-0-40","content":"magritte-content___17f1s_6-0-40","size-small":"magritte-size-small___2di4r_6-0-40","sizeSmall":"magritte-size-small___2di4r_6-0-40","content__deletable":"magritte-content__deletable___iqF4W_6-0-40","contentDeletable":"magritte-content__deletable___iqF4W_6-0-40","addon":"magritte-addon___mlwVD_6-0-40","label-container":"magritte-label-container___VVRg1_6-0-40","labelContainer":"magritte-label-container___VVRg1_6-0-40","label":"magritte-label___NSEUN_6-0-40","postfix-wrapper":"magritte-postfix-wrapper___Qmxwy_6-0-40","postfixWrapper":"magritte-postfix-wrapper___Qmxwy_6-0-40","close":"magritte-close___5I1Fe_6-0-40","chip_style-neutral":"magritte-chip_style-neutral___gELi3_6-0-40","chipStyleNeutral":"magritte-chip_style-neutral___gELi3_6-0-40","postfix":"magritte-postfix___hgYUe_6-0-40","chip__checked":"magritte-chip__checked___3GRxf_6-0-40","chipChecked":"magritte-chip__checked___3GRxf_6-0-40","chip__custom":"magritte-chip__custom___mE-pN_6-0-40","chipCustom":"magritte-chip__custom___mE-pN_6-0-40","disabled":"magritte-disabled___CLRlf_6-0-40","chip_style-accent":"magritte-chip_style-accent___rD0pt_6-0-40","chipStyleAccent":"magritte-chip_style-accent___rD0pt_6-0-40","delete-only":"magritte-delete-only___dn3c7_6-0-40","deleteOnly":"magritte-delete-only___dn3c7_6-0-40","chip_secondary":"magritte-chip_secondary___druWa_6-0-40","chipSecondary":"magritte-chip_secondary___druWa_6-0-40","close_secondary":"magritte-close_secondary___7bJpC_6-0-40","closeSecondary":"magritte-close_secondary___7bJpC_6-0-40"};
|
|
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-BA0MUPBP.js.map
|