@hh.ru/magritte-ui-tree-selector 4.6.21 → 4.6.23
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/Item.js +1 -1
- package/ItemContent.js +3 -3
- package/ItemContent.js.map +1 -1
- package/ItemsList.js +1 -1
- package/MobileItemsList.js +1 -1
- package/TreeSelector.js +1 -1
- package/TreeSelectorDummy.js +1 -1
- package/index.css +39 -39
- package/index.js +1 -1
- package/package.json +13 -13
- package/tree-selector-item-BM_9pfzv.js +5 -0
- package/tree-selector-item-BM_9pfzv.js.map +1 -0
- package/useAnimationTimeout.js +1 -1
- package/tree-selector-item-DeW_Mu2i.js +0 -5
- package/tree-selector-item-DeW_Mu2i.js.map +0 -1
package/Item.js
CHANGED
|
@@ -10,7 +10,7 @@ import '@hh.ru/magritte-ui-checkbox-radio';
|
|
|
10
10
|
import './TreeSelectorItemBase.js';
|
|
11
11
|
import '@hh.ru/magritte-ui-cell';
|
|
12
12
|
import '@hh.ru/magritte-ui-typography';
|
|
13
|
-
import './tree-selector-item-
|
|
13
|
+
import './tree-selector-item-BM_9pfzv.js';
|
|
14
14
|
|
|
15
15
|
const ONE_BOX_MARGIN = 36;
|
|
16
16
|
const getMargin = (allBoxesCount, hasShift, hasIndent) => {
|
package/ItemContent.js
CHANGED
|
@@ -7,7 +7,7 @@ import { DotFilledSize24, ChevronRightOutlinedSize24 } from '@hh.ru/magritte-ui-
|
|
|
7
7
|
import { Action } from './Action.js';
|
|
8
8
|
import { TreeSelectorItemBase } from './TreeSelectorItemBase.js';
|
|
9
9
|
import { Text } from '@hh.ru/magritte-ui-typography';
|
|
10
|
-
import { s as styles } from './tree-selector-item-
|
|
10
|
+
import { s as styles } from './tree-selector-item-BM_9pfzv.js';
|
|
11
11
|
import '@hh.ru/magritte-ui-checkbox-radio';
|
|
12
12
|
import '@hh.ru/magritte-ui-cell';
|
|
13
13
|
|
|
@@ -29,9 +29,9 @@ const ItemContentComponent = ({ item, parentId, hasAction, hasChildren, letter,
|
|
|
29
29
|
const input = hasAction ? (jsx(Action, { selected: isSelected, onChange: onChange, id: item.id, onKeyDown: handleExpandableKeyDown, indeterminate: isIndeterminate, singleChoice: singleChoice, name: `tree-selector-item-${parentId || 'top'}-${item.id}` })) : undefined;
|
|
30
30
|
return (jsxs("div", { className: classnames(styles.wrapper, {
|
|
31
31
|
[styles.wrapperActive]: hasChildren || hasAction,
|
|
32
|
-
}), onClick: hasChildren && !hasAction ? handleExpandableClick : undefined, children: [(letter || hasLetterOnLevel) && (jsx("div", { className: styles.letter, children: letter && (jsx(Text, { typography: "subtitle-1-semibold", style: "secondary", Element: "span", children: letter })) })), hasDot && (jsx("div", { className: styles.icon, children: jsx(DotFilledSize24, {
|
|
32
|
+
}), onClick: hasChildren && !hasAction ? handleExpandableClick : undefined, children: [(letter || hasLetterOnLevel) && (jsx("div", { className: styles.letter, children: letter && (jsx(Text, { typography: "subtitle-1-semibold", style: "secondary", Element: "span", children: letter })) })), hasDot && (jsx("div", { className: styles.icon, children: jsx(DotFilledSize24, { initialColor: "tertiary" }) })), [...Array(neededSpacesCount).keys()].map((_, i) => (jsx("div", { className: styles.space }, i))), hasChildren && (jsx("div", { className: classnames(styles.icon, styles.iconActive, {
|
|
33
33
|
[styles.iconUp]: isExpanded,
|
|
34
|
-
}), "data-qa": `tree-selector-chevron tree-selector-chevron-${item.id}`, onClick: hasAction ? handleExpandableClick : undefined, children: jsx(ChevronRightOutlinedSize24, {
|
|
34
|
+
}), "data-qa": `tree-selector-chevron tree-selector-chevron-${item.id}`, onClick: hasAction ? handleExpandableClick : undefined, children: jsx(ChevronRightOutlinedSize24, { initialColor: "tertiary" }) })), renderItemForDesktop({ disabled: isDisabled, input, item, isSearch, isParent: hasChildren })] }));
|
|
35
35
|
};
|
|
36
36
|
const ItemContent = memo(ItemContentComponent);
|
|
37
37
|
|
package/ItemContent.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemContent.js","sources":["../src/ItemContent.tsx"],"sourcesContent":["import { ReactElement, useCallback, memo, KeyboardEventHandler } from 'react';\nimport classnames from 'classnames';\n\nimport { keyboardKeys, keyboardMatch } from '@hh.ru/magritte-common-keyboard';\nimport { DotFilledSize24, ChevronRightOutlinedSize24 } from '@hh.ru/magritte-ui-icon/icon';\nimport { Action } from '@hh.ru/magritte-ui-tree-selector/Action';\nimport { TreeSelectorItemBase } from '@hh.ru/magritte-ui-tree-selector/TreeSelectorItemBase';\nimport { AdditionalDefault, TreeModel } from '@hh.ru/magritte-ui-tree-selector/collection/types';\nimport { RenderItem } from '@hh.ru/magritte-ui-tree-selector/types';\nimport { Text } from '@hh.ru/magritte-ui-typography';\n\nimport styles from './tree-selector-item.less';\n\ninterface ItemContent<Additional extends AdditionalDefault> {\n item: TreeModel<Additional>;\n parentId?: TreeModel<Additional>['id'];\n hasChildren: boolean;\n hasAction: boolean;\n letter?: string;\n onExpansion: (id: string) => void;\n isExpanded: boolean;\n isSelected: boolean;\n isDisabled: boolean;\n onChange: (id: string, isSelected: boolean) => void;\n isIndeterminate: boolean;\n singleChoice?: boolean;\n hasLetterOnLevel: boolean;\n hasDot: boolean;\n maxControlsOnLevel: number;\n renderItemForDesktop?: RenderItem<Additional>;\n isSearch: boolean;\n}\n\nconst ItemContentComponent = <Additional extends AdditionalDefault>({\n item,\n parentId,\n hasAction,\n hasChildren,\n letter,\n isExpanded,\n isDisabled,\n onExpansion,\n hasLetterOnLevel,\n isSelected,\n onChange,\n isIndeterminate,\n singleChoice,\n hasDot,\n maxControlsOnLevel,\n isSearch,\n renderItemForDesktop = TreeSelectorItemBase,\n}: ItemContent<Additional>): ReactElement => {\n const handleExpandableClick = useCallback(() => onExpansion && onExpansion(item.id), [item.id, onExpansion]);\n const currentActionCount = +hasDot + +hasAction + +hasChildren;\n const neededSpacesCount = maxControlsOnLevel - currentActionCount;\n\n const handleExpandableKeyDown = useCallback<KeyboardEventHandler>(\n (event) => {\n if (keyboardMatch(event.nativeEvent, keyboardKeys.ArrowLeft)) {\n isExpanded && onExpansion(item.id);\n event.preventDefault();\n return;\n }\n if (keyboardMatch(event.nativeEvent, keyboardKeys.ArrowRight)) {\n !isExpanded && onExpansion(item.id);\n event.preventDefault();\n }\n },\n [isExpanded, onExpansion, item.id]\n );\n\n const input = hasAction ? (\n <Action\n selected={isSelected}\n onChange={onChange}\n id={item.id}\n onKeyDown={handleExpandableKeyDown}\n indeterminate={isIndeterminate}\n singleChoice={singleChoice}\n name={`tree-selector-item-${parentId || 'top'}-${item.id}`}\n />\n ) : undefined;\n\n return (\n <div\n className={classnames(styles.wrapper, {\n [styles.wrapperActive]: hasChildren || hasAction,\n })}\n onClick={hasChildren && !hasAction ? handleExpandableClick : undefined}\n >\n {(letter || hasLetterOnLevel) && (\n <div className={styles.letter}>\n {letter && (\n <Text typography=\"subtitle-1-semibold\" style=\"secondary\" Element=\"span\">\n {letter}\n </Text>\n )}\n </div>\n )}\n {hasDot && (\n <div className={styles.icon}>\n <DotFilledSize24
|
|
1
|
+
{"version":3,"file":"ItemContent.js","sources":["../src/ItemContent.tsx"],"sourcesContent":["import { ReactElement, useCallback, memo, KeyboardEventHandler } from 'react';\nimport classnames from 'classnames';\n\nimport { keyboardKeys, keyboardMatch } from '@hh.ru/magritte-common-keyboard';\nimport { DotFilledSize24, ChevronRightOutlinedSize24 } from '@hh.ru/magritte-ui-icon/icon';\nimport { Action } from '@hh.ru/magritte-ui-tree-selector/Action';\nimport { TreeSelectorItemBase } from '@hh.ru/magritte-ui-tree-selector/TreeSelectorItemBase';\nimport { AdditionalDefault, TreeModel } from '@hh.ru/magritte-ui-tree-selector/collection/types';\nimport { RenderItem } from '@hh.ru/magritte-ui-tree-selector/types';\nimport { Text } from '@hh.ru/magritte-ui-typography';\n\nimport styles from './tree-selector-item.less';\n\ninterface ItemContent<Additional extends AdditionalDefault> {\n item: TreeModel<Additional>;\n parentId?: TreeModel<Additional>['id'];\n hasChildren: boolean;\n hasAction: boolean;\n letter?: string;\n onExpansion: (id: string) => void;\n isExpanded: boolean;\n isSelected: boolean;\n isDisabled: boolean;\n onChange: (id: string, isSelected: boolean) => void;\n isIndeterminate: boolean;\n singleChoice?: boolean;\n hasLetterOnLevel: boolean;\n hasDot: boolean;\n maxControlsOnLevel: number;\n renderItemForDesktop?: RenderItem<Additional>;\n isSearch: boolean;\n}\n\nconst ItemContentComponent = <Additional extends AdditionalDefault>({\n item,\n parentId,\n hasAction,\n hasChildren,\n letter,\n isExpanded,\n isDisabled,\n onExpansion,\n hasLetterOnLevel,\n isSelected,\n onChange,\n isIndeterminate,\n singleChoice,\n hasDot,\n maxControlsOnLevel,\n isSearch,\n renderItemForDesktop = TreeSelectorItemBase,\n}: ItemContent<Additional>): ReactElement => {\n const handleExpandableClick = useCallback(() => onExpansion && onExpansion(item.id), [item.id, onExpansion]);\n const currentActionCount = +hasDot + +hasAction + +hasChildren;\n const neededSpacesCount = maxControlsOnLevel - currentActionCount;\n\n const handleExpandableKeyDown = useCallback<KeyboardEventHandler>(\n (event) => {\n if (keyboardMatch(event.nativeEvent, keyboardKeys.ArrowLeft)) {\n isExpanded && onExpansion(item.id);\n event.preventDefault();\n return;\n }\n if (keyboardMatch(event.nativeEvent, keyboardKeys.ArrowRight)) {\n !isExpanded && onExpansion(item.id);\n event.preventDefault();\n }\n },\n [isExpanded, onExpansion, item.id]\n );\n\n const input = hasAction ? (\n <Action\n selected={isSelected}\n onChange={onChange}\n id={item.id}\n onKeyDown={handleExpandableKeyDown}\n indeterminate={isIndeterminate}\n singleChoice={singleChoice}\n name={`tree-selector-item-${parentId || 'top'}-${item.id}`}\n />\n ) : undefined;\n\n return (\n <div\n className={classnames(styles.wrapper, {\n [styles.wrapperActive]: hasChildren || hasAction,\n })}\n onClick={hasChildren && !hasAction ? handleExpandableClick : undefined}\n >\n {(letter || hasLetterOnLevel) && (\n <div className={styles.letter}>\n {letter && (\n <Text typography=\"subtitle-1-semibold\" style=\"secondary\" Element=\"span\">\n {letter}\n </Text>\n )}\n </div>\n )}\n {hasDot && (\n <div className={styles.icon}>\n <DotFilledSize24 initialColor=\"tertiary\" />\n </div>\n )}\n\n {[...Array(neededSpacesCount).keys()].map((_, i) => (\n <div key={i} className={styles.space} />\n ))}\n\n {hasChildren && (\n <div\n className={classnames(styles.icon, styles.iconActive, {\n [styles.iconUp]: isExpanded,\n })}\n data-qa={`tree-selector-chevron tree-selector-chevron-${item.id}`}\n onClick={hasAction ? handleExpandableClick : undefined}\n >\n <ChevronRightOutlinedSize24 initialColor=\"tertiary\" />\n </div>\n )}\n {renderItemForDesktop({ disabled: isDisabled, input, item, isSearch, isParent: hasChildren })}\n </div>\n );\n};\n\nexport const ItemContent = memo(ItemContentComponent) as <Additional extends AdditionalDefault>(\n props: ItemContent<Additional>\n) => ReactElement;\n"],"names":["_jsx","_jsxs"],"mappings":"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"}
|
package/ItemsList.js
CHANGED
|
@@ -3,7 +3,7 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import { useRef, useMemo, useCallback, useEffect } from 'react';
|
|
4
4
|
import { useVirtualizer } from '@tanstack/react-virtual';
|
|
5
5
|
import { Item } from './Item.js';
|
|
6
|
-
import { s as styles } from './tree-selector-item-
|
|
6
|
+
import { s as styles } from './tree-selector-item-BM_9pfzv.js';
|
|
7
7
|
import 'classnames';
|
|
8
8
|
import './ItemContent.js';
|
|
9
9
|
import '@hh.ru/magritte-common-keyboard';
|
package/MobileItemsList.js
CHANGED
|
@@ -10,7 +10,7 @@ import { Action } from './Action.js';
|
|
|
10
10
|
import { MobileDelimiter } from './MobileDelimiter.js';
|
|
11
11
|
import { MobileItem } from './MobileItem.js';
|
|
12
12
|
import { MobileParentItem } from './MobileParentItem.js';
|
|
13
|
-
import { s as styles } from './tree-selector-item-
|
|
13
|
+
import { s as styles } from './tree-selector-item-BM_9pfzv.js';
|
|
14
14
|
import '@hh.ru/magritte-ui-checkbox-radio';
|
|
15
15
|
import '@hh.ru/magritte-ui-card';
|
|
16
16
|
import '@hh.ru/magritte-ui-typography';
|
package/TreeSelector.js
CHANGED
|
@@ -19,7 +19,7 @@ import '@hh.ru/magritte-ui-checkbox-radio';
|
|
|
19
19
|
import './TreeSelectorItemBase.js';
|
|
20
20
|
import '@hh.ru/magritte-ui-cell';
|
|
21
21
|
import '@hh.ru/magritte-ui-typography';
|
|
22
|
-
import './tree-selector-item-
|
|
22
|
+
import './tree-selector-item-BM_9pfzv.js';
|
|
23
23
|
import './MobileItemsList.js';
|
|
24
24
|
import '@hh.ru/magritte-common-func-utils';
|
|
25
25
|
import '@hh.ru/magritte-ui-checkable-card/CheckableCardElement';
|
package/TreeSelectorDummy.js
CHANGED
|
@@ -21,7 +21,7 @@ import '@hh.ru/magritte-ui-checkbox-radio';
|
|
|
21
21
|
import './TreeSelectorItemBase.js';
|
|
22
22
|
import '@hh.ru/magritte-ui-cell';
|
|
23
23
|
import '@hh.ru/magritte-ui-typography';
|
|
24
|
-
import './tree-selector-item-
|
|
24
|
+
import './tree-selector-item-BM_9pfzv.js';
|
|
25
25
|
import '@hh.ru/magritte-common-func-utils';
|
|
26
26
|
import '@hh.ru/magritte-ui-checkable-card/CheckableCardElement';
|
|
27
27
|
import './MobileDelimiter.js';
|
package/index.css
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
:root{
|
|
2
|
-
--magritte-semantic-animation-ease-in-out-100-timing-function-v21-3-
|
|
3
|
-
--magritte-semantic-animation-ease-in-out-100-duration-v21-3-
|
|
4
|
-
--magritte-semantic-animation-ease-in-out-200-timing-function-v21-3-
|
|
5
|
-
--magritte-semantic-animation-ease-in-out-200-duration-v21-3-
|
|
2
|
+
--magritte-semantic-animation-ease-in-out-100-timing-function-v21-3-1:cubic-bezier(0.25, 0.1, 0.25, 1);
|
|
3
|
+
--magritte-semantic-animation-ease-in-out-100-duration-v21-3-1:100ms;
|
|
4
|
+
--magritte-semantic-animation-ease-in-out-200-timing-function-v21-3-1:cubic-bezier(0.25, 0.1, 0.25, 1);
|
|
5
|
+
--magritte-semantic-animation-ease-in-out-200-duration-v21-3-1:200ms;
|
|
6
6
|
}
|
|
7
|
-
@keyframes magritte-fade-in___yS4Ja_4-6-
|
|
7
|
+
@keyframes magritte-fade-in___yS4Ja_4-6-23{
|
|
8
8
|
0%{
|
|
9
9
|
opacity:0;
|
|
10
10
|
}
|
|
@@ -12,24 +12,24 @@
|
|
|
12
12
|
opacity:1;
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
.magritte-item-animation-timeout___pbOyZ_4-6-
|
|
16
|
-
animation-name:magritte-fade-in___yS4Ja_4-6-
|
|
17
|
-
animation-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v21-3-
|
|
15
|
+
.magritte-item-animation-timeout___pbOyZ_4-6-23{
|
|
16
|
+
animation-name:magritte-fade-in___yS4Ja_4-6-23;
|
|
17
|
+
animation-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v21-3-1);
|
|
18
18
|
--animation-duration:0ms;
|
|
19
19
|
animation-duration:var(--animation-duration);
|
|
20
20
|
}
|
|
21
21
|
@media (prefers-reduced-motion: no-preference){
|
|
22
|
-
.magritte-item-animation-timeout___pbOyZ_4-6-
|
|
23
|
-
--animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v21-3-
|
|
22
|
+
.magritte-item-animation-timeout___pbOyZ_4-6-23{
|
|
23
|
+
--animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v21-3-1);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
.magritte-wrapper___GHKV6_4-6-
|
|
26
|
+
.magritte-wrapper___GHKV6_4-6-23{
|
|
27
27
|
display:flex;
|
|
28
28
|
padding:12px 0;
|
|
29
29
|
gap:12px;
|
|
30
30
|
align-items:flex-start;
|
|
31
31
|
}
|
|
32
|
-
.magritte-letter___yZOCU_4-6-
|
|
32
|
+
.magritte-letter___yZOCU_4-6-23{
|
|
33
33
|
width:24px;
|
|
34
34
|
height:24px;
|
|
35
35
|
display:flex;
|
|
@@ -37,68 +37,68 @@
|
|
|
37
37
|
justify-content:center;
|
|
38
38
|
flex-shrink:0;
|
|
39
39
|
}
|
|
40
|
-
.magritte-icon___kO3Fj_4-6-
|
|
41
|
-
.magritte-space___xTO79_4-6-
|
|
40
|
+
.magritte-icon___kO3Fj_4-6-23,
|
|
41
|
+
.magritte-space___xTO79_4-6-23{
|
|
42
42
|
flex-shrink:0;
|
|
43
43
|
line-height:0;
|
|
44
44
|
width:24px;
|
|
45
45
|
}
|
|
46
|
-
.magritte-icon___kO3Fj_4-6-
|
|
46
|
+
.magritte-icon___kO3Fj_4-6-23{
|
|
47
47
|
transform:rotate(0);
|
|
48
48
|
}
|
|
49
|
-
.magritte-wrapperActive___Hwk8p_4-6-
|
|
50
|
-
.magritte-iconActive___4yrG5_4-6-
|
|
49
|
+
.magritte-wrapperActive___Hwk8p_4-6-23,
|
|
50
|
+
.magritte-iconActive___4yrG5_4-6-23{
|
|
51
51
|
cursor:pointer;
|
|
52
52
|
}
|
|
53
|
-
.magritte-iconUp___mpXV6_4-6-
|
|
53
|
+
.magritte-iconUp___mpXV6_4-6-23{
|
|
54
54
|
transform:rotate(90deg);
|
|
55
55
|
}
|
|
56
56
|
@media (prefers-reduced-motion: no-preference){
|
|
57
|
-
.magritte-icon___kO3Fj_4-6-
|
|
57
|
+
.magritte-icon___kO3Fj_4-6-23{
|
|
58
58
|
transition-property:transform;
|
|
59
|
-
transition-duration:var(--magritte-semantic-animation-ease-in-out-100-duration-v21-3-
|
|
60
|
-
transition-timing-function:var(--magritte-semantic-animation-ease-in-out-100-timing-function-v21-3-
|
|
59
|
+
transition-duration:var(--magritte-semantic-animation-ease-in-out-100-duration-v21-3-1);
|
|
60
|
+
transition-timing-function:var(--magritte-semantic-animation-ease-in-out-100-timing-function-v21-3-1);
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
.magritte-content___ZRc6R_4-6-
|
|
63
|
+
.magritte-content___ZRc6R_4-6-23{
|
|
64
64
|
flex-grow:1;
|
|
65
65
|
}
|
|
66
|
-
.magritte-mobile-item___ynALC_4-6-
|
|
66
|
+
.magritte-mobile-item___ynALC_4-6-23{
|
|
67
67
|
display:flex;
|
|
68
68
|
gap:12px;
|
|
69
69
|
flex-wrap:wrap;
|
|
70
70
|
}
|
|
71
|
-
.magritte-with-gap___gbvGO_4-6-
|
|
71
|
+
.magritte-with-gap___gbvGO_4-6-23{
|
|
72
72
|
padding-top:12px;
|
|
73
73
|
}
|
|
74
|
-
.magritte-virtualized-list___qt2E6_4-6-
|
|
74
|
+
.magritte-virtualized-list___qt2E6_4-6-23{
|
|
75
75
|
width:100%;
|
|
76
76
|
position:relative;
|
|
77
77
|
will-change:transform;
|
|
78
78
|
}
|
|
79
|
-
.magritte-virtualized-item___qAYVN_4-6-
|
|
79
|
+
.magritte-virtualized-item___qAYVN_4-6-23{
|
|
80
80
|
position:absolute;
|
|
81
81
|
top:0;
|
|
82
82
|
left:0;
|
|
83
83
|
width:100%;
|
|
84
84
|
}
|
|
85
|
-
.magritte-was-expanded___uCFbW_4-6-
|
|
86
|
-
animation-name:magritte-fade-in___yS4Ja_4-6-
|
|
87
|
-
animation-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v21-3-
|
|
85
|
+
.magritte-was-expanded___uCFbW_4-6-23{
|
|
86
|
+
animation-name:magritte-fade-in___yS4Ja_4-6-23;
|
|
87
|
+
animation-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v21-3-1);
|
|
88
88
|
--animation-duration:0ms;
|
|
89
89
|
animation-duration:var(--animation-duration);
|
|
90
90
|
}
|
|
91
91
|
@media (prefers-reduced-motion: no-preference){
|
|
92
|
-
.magritte-was-expanded___uCFbW_4-6-
|
|
93
|
-
--animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v21-3-
|
|
92
|
+
.magritte-was-expanded___uCFbW_4-6-23{
|
|
93
|
+
--animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v21-3-1);
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
:root{
|
|
98
|
-
--magritte-semantic-animation-ease-in-out-200-timing-function-v21-3-
|
|
99
|
-
--magritte-semantic-animation-ease-in-out-200-duration-v21-3-
|
|
98
|
+
--magritte-semantic-animation-ease-in-out-200-timing-function-v21-3-1:cubic-bezier(0.25, 0.1, 0.25, 1);
|
|
99
|
+
--magritte-semantic-animation-ease-in-out-200-duration-v21-3-1:200ms;
|
|
100
100
|
}
|
|
101
|
-
@keyframes magritte-fade-in___FDoho_4-6-
|
|
101
|
+
@keyframes magritte-fade-in___FDoho_4-6-23{
|
|
102
102
|
0%{
|
|
103
103
|
opacity:0;
|
|
104
104
|
}
|
|
@@ -106,14 +106,14 @@
|
|
|
106
106
|
opacity:1;
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
-
.magritte-item-animation-timeout___Pdli9_4-6-
|
|
110
|
-
animation-name:magritte-fade-in___FDoho_4-6-
|
|
111
|
-
animation-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v21-3-
|
|
109
|
+
.magritte-item-animation-timeout___Pdli9_4-6-23{
|
|
110
|
+
animation-name:magritte-fade-in___FDoho_4-6-23;
|
|
111
|
+
animation-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v21-3-1);
|
|
112
112
|
--animation-duration:0ms;
|
|
113
113
|
animation-duration:var(--animation-duration);
|
|
114
114
|
}
|
|
115
115
|
@media (prefers-reduced-motion: no-preference){
|
|
116
|
-
.magritte-item-animation-timeout___Pdli9_4-6-
|
|
117
|
-
--animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v21-3-
|
|
116
|
+
.magritte-item-animation-timeout___Pdli9_4-6-23{
|
|
117
|
+
--animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v21-3-1);
|
|
118
118
|
}
|
|
119
119
|
}
|
package/index.js
CHANGED
|
@@ -27,7 +27,7 @@ import '@hh.ru/magritte-ui-icon/icon';
|
|
|
27
27
|
import './Action.js';
|
|
28
28
|
import '@hh.ru/magritte-ui-checkbox-radio';
|
|
29
29
|
import '@hh.ru/magritte-ui-typography';
|
|
30
|
-
import './tree-selector-item-
|
|
30
|
+
import './tree-selector-item-BM_9pfzv.js';
|
|
31
31
|
import './MobileItemsList.js';
|
|
32
32
|
import '@hh.ru/magritte-common-func-utils';
|
|
33
33
|
import '@hh.ru/magritte-ui-cell';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hh.ru/magritte-ui-tree-selector",
|
|
3
|
-
"version": "4.6.
|
|
3
|
+
"version": "4.6.23",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"sideEffects": [
|
|
@@ -25,21 +25,21 @@
|
|
|
25
25
|
"@hh.ru/magritte-common-keyboard": "4.1.0",
|
|
26
26
|
"@hh.ru/magritte-common-resize": "0.1.14",
|
|
27
27
|
"@hh.ru/magritte-common-use-multiple-refs": "1.1.5",
|
|
28
|
-
"@hh.ru/magritte-design-tokens": "21.3.
|
|
28
|
+
"@hh.ru/magritte-design-tokens": "21.3.1",
|
|
29
29
|
"@hh.ru/magritte-internal-custom-scroll": "1.3.3",
|
|
30
30
|
"@hh.ru/magritte-types": "5.0.1",
|
|
31
|
-
"@hh.ru/magritte-ui-badge": "2.3.
|
|
31
|
+
"@hh.ru/magritte-ui-badge": "2.3.3",
|
|
32
32
|
"@hh.ru/magritte-ui-breakpoint": "5.0.0",
|
|
33
|
-
"@hh.ru/magritte-ui-card": "7.0.
|
|
34
|
-
"@hh.ru/magritte-ui-cell": "4.1.
|
|
35
|
-
"@hh.ru/magritte-ui-checkable-card": "3.0.
|
|
36
|
-
"@hh.ru/magritte-ui-checkbox-radio": "3.0.
|
|
37
|
-
"@hh.ru/magritte-ui-icon": "
|
|
38
|
-
"@hh.ru/magritte-ui-input": "7.1.
|
|
33
|
+
"@hh.ru/magritte-ui-card": "7.0.2",
|
|
34
|
+
"@hh.ru/magritte-ui-cell": "4.1.7",
|
|
35
|
+
"@hh.ru/magritte-ui-checkable-card": "3.0.73",
|
|
36
|
+
"@hh.ru/magritte-ui-checkbox-radio": "3.0.41",
|
|
37
|
+
"@hh.ru/magritte-ui-icon": "9.0.0",
|
|
38
|
+
"@hh.ru/magritte-ui-input": "7.1.15",
|
|
39
39
|
"@hh.ru/magritte-ui-mock-component": "1.0.12",
|
|
40
|
-
"@hh.ru/magritte-ui-spacing": "2.0.
|
|
41
|
-
"@hh.ru/magritte-ui-theme-provider": "1.1.
|
|
42
|
-
"@hh.ru/magritte-ui-typography": "3.0.
|
|
40
|
+
"@hh.ru/magritte-ui-spacing": "2.0.42",
|
|
41
|
+
"@hh.ru/magritte-ui-theme-provider": "1.1.40",
|
|
42
|
+
"@hh.ru/magritte-ui-typography": "3.0.30",
|
|
43
43
|
"@tanstack/react-virtual": "3.8.3"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"publishConfig": {
|
|
51
51
|
"access": "public"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "f0580e3372548c1cf344118a05710a20826f423d"
|
|
54
54
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import './index.css';
|
|
2
|
+
var styles = {"item-animation-timeout":"magritte-item-animation-timeout___pbOyZ_4-6-23","itemAnimationTimeout":"magritte-item-animation-timeout___pbOyZ_4-6-23","fade-in":"magritte-fade-in___yS4Ja_4-6-23","fadeIn":"magritte-fade-in___yS4Ja_4-6-23","wrapper":"magritte-wrapper___GHKV6_4-6-23","letter":"magritte-letter___yZOCU_4-6-23","icon":"magritte-icon___kO3Fj_4-6-23","space":"magritte-space___xTO79_4-6-23","wrapperActive":"magritte-wrapperActive___Hwk8p_4-6-23","iconActive":"magritte-iconActive___4yrG5_4-6-23","iconUp":"magritte-iconUp___mpXV6_4-6-23","content":"magritte-content___ZRc6R_4-6-23","mobile-item":"magritte-mobile-item___ynALC_4-6-23","mobileItem":"magritte-mobile-item___ynALC_4-6-23","with-gap":"magritte-with-gap___gbvGO_4-6-23","withGap":"magritte-with-gap___gbvGO_4-6-23","virtualized-list":"magritte-virtualized-list___qt2E6_4-6-23","virtualizedList":"magritte-virtualized-list___qt2E6_4-6-23","virtualized-item":"magritte-virtualized-item___qAYVN_4-6-23","virtualizedItem":"magritte-virtualized-item___qAYVN_4-6-23","was-expanded":"magritte-was-expanded___uCFbW_4-6-23","wasExpanded":"magritte-was-expanded___uCFbW_4-6-23"};
|
|
3
|
+
|
|
4
|
+
export { styles as s };
|
|
5
|
+
//# sourceMappingURL=tree-selector-item-BM_9pfzv.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree-selector-item-BM_9pfzv.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
package/useAnimationTimeout.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
import { useState, useLayoutEffect } from 'react';
|
|
3
3
|
|
|
4
|
-
var styles = {"item-animation-timeout":"magritte-item-animation-timeout___Pdli9_4-6-
|
|
4
|
+
var styles = {"item-animation-timeout":"magritte-item-animation-timeout___Pdli9_4-6-23","itemAnimationTimeout":"magritte-item-animation-timeout___Pdli9_4-6-23","fade-in":"magritte-fade-in___FDoho_4-6-23","fadeIn":"magritte-fade-in___FDoho_4-6-23"};
|
|
5
5
|
|
|
6
6
|
const useAnimationTimeout = () => {
|
|
7
7
|
const [animationTimeout, setAnimationTimeout] = useState(0);
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import './index.css';
|
|
2
|
-
var styles = {"item-animation-timeout":"magritte-item-animation-timeout___pbOyZ_4-6-21","itemAnimationTimeout":"magritte-item-animation-timeout___pbOyZ_4-6-21","fade-in":"magritte-fade-in___yS4Ja_4-6-21","fadeIn":"magritte-fade-in___yS4Ja_4-6-21","wrapper":"magritte-wrapper___GHKV6_4-6-21","letter":"magritte-letter___yZOCU_4-6-21","icon":"magritte-icon___kO3Fj_4-6-21","space":"magritte-space___xTO79_4-6-21","wrapperActive":"magritte-wrapperActive___Hwk8p_4-6-21","iconActive":"magritte-iconActive___4yrG5_4-6-21","iconUp":"magritte-iconUp___mpXV6_4-6-21","content":"magritte-content___ZRc6R_4-6-21","mobile-item":"magritte-mobile-item___ynALC_4-6-21","mobileItem":"magritte-mobile-item___ynALC_4-6-21","with-gap":"magritte-with-gap___gbvGO_4-6-21","withGap":"magritte-with-gap___gbvGO_4-6-21","virtualized-list":"magritte-virtualized-list___qt2E6_4-6-21","virtualizedList":"magritte-virtualized-list___qt2E6_4-6-21","virtualized-item":"magritte-virtualized-item___qAYVN_4-6-21","virtualizedItem":"magritte-virtualized-item___qAYVN_4-6-21","was-expanded":"magritte-was-expanded___uCFbW_4-6-21","wasExpanded":"magritte-was-expanded___uCFbW_4-6-21"};
|
|
3
|
-
|
|
4
|
-
export { styles as s };
|
|
5
|
-
//# sourceMappingURL=tree-selector-item-DeW_Mu2i.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tree-selector-item-DeW_Mu2i.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|