@hh.ru/magritte-ui-trigger 2.0.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/Trigger.d.ts +3 -0
- package/Trigger.js +65 -0
- package/Trigger.js.map +1 -0
- package/index.css +329 -0
- package/index.d.ts +2 -0
- package/index.js +9 -0
- package/index.js.map +1 -0
- package/package.json +35 -0
- package/types.d.ts +16 -0
- package/types.js +3 -0
- package/types.js.map +1 -0
package/Trigger.d.ts
ADDED
package/Trigger.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import './index.css';
|
|
2
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { useRef, useCallback } from 'react';
|
|
4
|
+
import classnames from 'classnames';
|
|
5
|
+
import { keyboardMatches, keyboardKeys } from '@hh.ru/magritte-common-keyboard';
|
|
6
|
+
import { Action } from '@hh.ru/magritte-ui-action';
|
|
7
|
+
import { CrossOutlinedSize24, ChevronDownOutlinedSize24, CrossOutlinedSize16, ChevronDownOutlinedSize16 } from '@hh.ru/magritte-ui-icon/icon';
|
|
8
|
+
|
|
9
|
+
var styles = {"trigger":"magritte-trigger___IpHhR_2-0-0","xsmall":"magritte-xsmall___8iEkS_2-0-0","content":"magritte-content___5eg6m_2-0-0","small":"magritte-small___DphY3_2-0-0","medium":"magritte-medium___0kuIk_2-0-0","large":"magritte-large___1eRM6_2-0-0","applied":"magritte-applied___jrfWs_2-0-0","disabled":"magritte-disabled___ZTuRA_2-0-0","invalid":"magritte-invalid___Xlbyg_2-0-0","icon":"magritte-icon___HbC0r_2-0-0","selected":"magritte-selected___NjQNn_2-0-0","stretched":"magritte-stretched___0cr0S_2-0-0","content_medium":"magritte-content_medium___VnlIy_2-0-0","contentMedium":"magritte-content_medium___VnlIy_2-0-0","content_large":"magritte-content_large___byZTA_2-0-0","contentLarge":"magritte-content_large___byZTA_2-0-0","content_label-can-elevated":"magritte-content_label-can-elevated___7VXpk_2-0-0","contentLabelCanElevated":"magritte-content_label-can-elevated___7VXpk_2-0-0","value":"magritte-value___23UwK_2-0-0","label":"magritte-label___VsUEF_2-0-0","label_elevated":"magritte-label_elevated___N0xnk_2-0-0","labelElevated":"magritte-label_elevated___N0xnk_2-0-0","icon_expanded":"magritte-icon_expanded___ggr1u_2-0-0","iconExpanded":"magritte-icon_expanded___ggr1u_2-0-0"};
|
|
10
|
+
|
|
11
|
+
// расчитываем размер шеврона на базе `size`
|
|
12
|
+
// если состояние `applied`, то нужно использовать крест
|
|
13
|
+
const getIcon = (size, applied) => {
|
|
14
|
+
if (size === 'large' || size === 'medium') {
|
|
15
|
+
if (applied) {
|
|
16
|
+
return CrossOutlinedSize24;
|
|
17
|
+
}
|
|
18
|
+
return ChevronDownOutlinedSize24;
|
|
19
|
+
}
|
|
20
|
+
if (applied) {
|
|
21
|
+
return CrossOutlinedSize16;
|
|
22
|
+
}
|
|
23
|
+
return ChevronDownOutlinedSize16;
|
|
24
|
+
};
|
|
25
|
+
const Trigger = ({ applied, disabled, expanded, minWidth, invalid, value, label, elevateLabel, stretched, size, onToogle, onClear, }) => {
|
|
26
|
+
const triggerRef = useRef(null);
|
|
27
|
+
const labelCanElevated = size === 'large' && !!elevateLabel && !!label;
|
|
28
|
+
const labelIsElevated = value !== '' && labelCanElevated;
|
|
29
|
+
const IconComponent = getIcon(size, Boolean(applied));
|
|
30
|
+
const handleClickTrigger = useCallback(() => {
|
|
31
|
+
onToogle?.();
|
|
32
|
+
}, [onToogle]);
|
|
33
|
+
const handleKeyDownTrigger = useCallback((event) => {
|
|
34
|
+
if (keyboardMatches(event.nativeEvent, [keyboardKeys.Space])) {
|
|
35
|
+
onToogle?.();
|
|
36
|
+
}
|
|
37
|
+
}, [onToogle]);
|
|
38
|
+
const handleClickClear = useCallback(() => {
|
|
39
|
+
onClear?.();
|
|
40
|
+
triggerRef.current?.focus();
|
|
41
|
+
}, [onClear]);
|
|
42
|
+
const handleKeyDownClear = useCallback((event) => {
|
|
43
|
+
if (keyboardMatches(event.nativeEvent, [keyboardKeys.Space])) {
|
|
44
|
+
onClear?.();
|
|
45
|
+
triggerRef.current?.focus();
|
|
46
|
+
event.stopPropagation();
|
|
47
|
+
}
|
|
48
|
+
}, [onClear]);
|
|
49
|
+
return (jsxs("div", { ref: triggerRef, className: classnames(styles.trigger, styles[size], {
|
|
50
|
+
[styles.applied]: applied,
|
|
51
|
+
[styles.disabled]: disabled,
|
|
52
|
+
[styles.invalid]: invalid,
|
|
53
|
+
[styles.stretched]: stretched,
|
|
54
|
+
[styles.selected]: Boolean(value),
|
|
55
|
+
}), onClick: !applied && !disabled ? handleClickTrigger : undefined, onKeyDown: !applied && !disabled ? handleKeyDownTrigger : undefined, style: minWidth ? { minWidth: `${minWidth}px` } : {}, tabIndex: disabled ? -1 : 0, children: [jsxs("div", { className: classnames(styles.content, styles[`content_${size}`], {
|
|
56
|
+
[styles.contentLabelCanElevated]: labelCanElevated,
|
|
57
|
+
}), children: [!labelCanElevated && (value || label), labelCanElevated && (jsxs(Fragment, { children: [jsx("div", { className: classnames(styles.label, {
|
|
58
|
+
[styles.labelElevated]: labelIsElevated,
|
|
59
|
+
}), children: label }), value && jsx("div", { className: styles.value, children: value })] }))] }), !applied && (jsx("div", { className: classnames(styles.icon, {
|
|
60
|
+
[styles.iconExpanded]: expanded,
|
|
61
|
+
}), children: jsx(IconComponent, {}) })), applied && (jsx("div", { className: styles.icon, children: jsx(Action, { onKeyDown: handleKeyDownClear, onClick: handleClickClear, icon: IconComponent, disabled: disabled, disablePadding: true }) }))] }));
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export { Trigger };
|
|
65
|
+
//# sourceMappingURL=Trigger.js.map
|
package/Trigger.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Trigger.js","sources":["../src/Trigger.tsx"],"sourcesContent":["import { FC, useCallback, KeyboardEventHandler, useRef } from 'react';\nimport classnames from 'classnames';\n\nimport { keyboardKeys, keyboardMatches } from '@hh.ru/magritte-common-keyboard';\nimport { Action } from '@hh.ru/magritte-ui-action';\nimport {\n ChevronDownOutlinedSize16,\n ChevronDownOutlinedSize24,\n CrossOutlinedSize16,\n CrossOutlinedSize24,\n} from '@hh.ru/magritte-ui-icon/icon';\nimport { type IconWrapperComponentSize24, type IconWrapperComponentSize16 } from '@hh.ru/magritte-ui-icon/iconTypes';\nimport { TriggerProps, TriggerSize } from '@hh.ru/magritte-ui-trigger/types';\n\nimport styles from './trigger.less';\n\n// расчитываем размер шеврона на базе `size`\n// если состояние `applied`, то нужно использовать крест\nconst getIcon = (size: TriggerSize, applied: boolean): IconWrapperComponentSize24 | IconWrapperComponentSize16 => {\n if (size === 'large' || size === 'medium') {\n if (applied) {\n return CrossOutlinedSize24;\n }\n return ChevronDownOutlinedSize24;\n }\n if (applied) {\n return CrossOutlinedSize16;\n }\n return ChevronDownOutlinedSize16;\n};\n\nexport const Trigger: FC<TriggerProps> = ({\n applied,\n disabled,\n expanded,\n minWidth,\n invalid,\n value,\n label,\n elevateLabel,\n stretched,\n size,\n onToogle,\n onClear,\n}) => {\n const triggerRef = useRef<HTMLDivElement>(null);\n const labelCanElevated = size === 'large' && !!elevateLabel && !!label;\n const labelIsElevated = value !== '' && labelCanElevated;\n const IconComponent = getIcon(size, Boolean(applied));\n\n const handleClickTrigger = useCallback(() => {\n onToogle?.();\n }, [onToogle]);\n\n const handleKeyDownTrigger = useCallback<KeyboardEventHandler>(\n (event) => {\n if (keyboardMatches(event.nativeEvent, [keyboardKeys.Space])) {\n onToogle?.();\n }\n },\n [onToogle]\n );\n\n const handleClickClear = useCallback(() => {\n onClear?.();\n triggerRef.current?.focus();\n }, [onClear]);\n\n const handleKeyDownClear = useCallback<KeyboardEventHandler>(\n (event) => {\n if (keyboardMatches(event.nativeEvent, [keyboardKeys.Space])) {\n onClear?.();\n triggerRef.current?.focus();\n event.stopPropagation();\n }\n },\n [onClear]\n );\n\n return (\n <div\n ref={triggerRef}\n className={classnames(styles.trigger, styles[size], {\n [styles.applied]: applied,\n [styles.disabled]: disabled,\n [styles.invalid]: invalid,\n [styles.stretched]: stretched,\n [styles.selected]: Boolean(value),\n })}\n onClick={!applied && !disabled ? handleClickTrigger : undefined}\n onKeyDown={!applied && !disabled ? handleKeyDownTrigger : undefined}\n style={minWidth ? { minWidth: `${minWidth}px` } : {}}\n tabIndex={disabled ? -1 : 0}\n >\n <div\n className={classnames(styles.content, styles[`content_${size}`], {\n [styles.contentLabelCanElevated]: labelCanElevated,\n })}\n >\n {!labelCanElevated && (value || label)}\n {labelCanElevated && (\n <>\n <div\n className={classnames(styles.label, {\n [styles.labelElevated]: labelIsElevated,\n })}\n >\n {label}\n </div>\n {value && <div className={styles.value}>{value}</div>}\n </>\n )}\n </div>\n {!applied && (\n <div\n className={classnames(styles.icon, {\n [styles.iconExpanded]: expanded,\n })}\n >\n <IconComponent />\n </div>\n )}\n {applied && (\n <div className={styles.icon}>\n <Action\n onKeyDown={handleKeyDownClear}\n onClick={handleClickClear}\n icon={IconComponent}\n disabled={disabled}\n disablePadding\n />\n </div>\n )}\n </div>\n );\n};\n"],"names":["_jsxs","_Fragment","_jsx"],"mappings":"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"}
|
package/index.css
ADDED
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
:root{
|
|
2
|
+
--magritte-color-component-input-stroke-state-field-hovered-v18-2-1:#CCD5DF;
|
|
3
|
+
--magritte-color-component-input-stroke-state-field-focused-v18-2-1:#0070ff;
|
|
4
|
+
--magritte-color-component-input-stroke-state-accent-focused-accessible-v18-2-1:#0070ff7a;
|
|
5
|
+
--magritte-color-component-input-stroke-state-field-invalid-v18-2-1:#ff4d3a;
|
|
6
|
+
--magritte-color-component-input-stroke-state-negative-focused-accessible-v18-2-1:#ff4d3a7a;
|
|
7
|
+
--magritte-color-component-input-stroke-state-field-disabled-v18-2-1:#EEF1F7;
|
|
8
|
+
--magritte-color-component-input-stroke-state-field-applied-v18-2-1:#000000;
|
|
9
|
+
--magritte-color-component-input-background-field-v18-2-1:#ffffff;
|
|
10
|
+
--magritte-color-component-input-background-state-field-hovered-v18-2-1:#ffffff;
|
|
11
|
+
--magritte-color-component-input-background-state-field-focused-v18-2-1:#ffffff;
|
|
12
|
+
--magritte-color-component-input-background-state-field-invalid-v18-2-1:#ffffff;
|
|
13
|
+
--magritte-color-component-input-background-state-field-disabled-v18-2-1:#F4F6FB;
|
|
14
|
+
--magritte-color-component-input-stroke-field-v18-2-1:#DCE3EB;
|
|
15
|
+
--magritte-color-component-input-text-state-label-disabled-v18-2-1:#AABBCA;
|
|
16
|
+
--magritte-color-component-input-text-state-content-focused-v18-2-1:#000000;
|
|
17
|
+
--magritte-color-component-input-text-state-content-invalid-attention-v18-2-1:#ff4d3a;
|
|
18
|
+
--magritte-color-component-input-text-state-label-hovered-v18-2-1:#768694;
|
|
19
|
+
--magritte-color-component-input-text-state-label-focused-v18-2-1:#768694;
|
|
20
|
+
--magritte-color-component-input-text-state-label-invalid-v18-2-1:#768694;
|
|
21
|
+
--magritte-color-component-input-icon-chevron-v18-2-1:#AABBCA;
|
|
22
|
+
--magritte-color-component-input-icon-state-content-applied-v18-2-1:#000000;
|
|
23
|
+
--magritte-color-component-input-icon-state-chevron-focused-v18-2-1:#000000;
|
|
24
|
+
--magritte-color-component-input-icon-state-chevron-hovered-v18-2-1:#6a7885;
|
|
25
|
+
--magritte-color-component-input-icon-state-chevron-disabled-v18-2-1:#AABBCA;
|
|
26
|
+
--magritte-color-component-input-icon-state-chevron-invalid-v18-2-1:#AABBCA;
|
|
27
|
+
--magritte-color-component-input-text-content-v18-2-1:#000000;
|
|
28
|
+
--magritte-color-component-input-text-label-v18-2-1:#768694;
|
|
29
|
+
--magritte-color-component-input-text-placeholder-v18-2-1:#AABBCA;
|
|
30
|
+
}
|
|
31
|
+
:root{
|
|
32
|
+
--magritte-typography-label-2-regular-font-family-v18-2-1:"Inter";
|
|
33
|
+
--magritte-typography-label-2-regular-font-weight-v18-2-1:400;
|
|
34
|
+
--magritte-typography-label-2-regular-line-height-v18-2-1:22px;
|
|
35
|
+
--magritte-typography-label-2-regular-font-size-v18-2-1:16px;
|
|
36
|
+
--magritte-typography-label-2-regular-letter-spacing-v18-2-1:0em;
|
|
37
|
+
--magritte-typography-label-2-regular-text-indent-v18-2-1:0px;
|
|
38
|
+
--magritte-typography-label-2-regular-text-transform-v18-2-1:none;
|
|
39
|
+
--magritte-typography-label-2-regular-text-decoration-v18-2-1:none;
|
|
40
|
+
--magritte-typography-label-3-regular-font-family-v18-2-1:"Inter";
|
|
41
|
+
--magritte-typography-label-3-regular-font-weight-v18-2-1:400;
|
|
42
|
+
--magritte-typography-label-3-regular-line-height-v18-2-1:20px;
|
|
43
|
+
--magritte-typography-label-3-regular-font-size-v18-2-1:14px;
|
|
44
|
+
--magritte-typography-label-3-regular-letter-spacing-v18-2-1:0.005em;
|
|
45
|
+
--magritte-typography-label-3-regular-text-indent-v18-2-1:0px;
|
|
46
|
+
--magritte-typography-label-3-regular-text-transform-v18-2-1:none;
|
|
47
|
+
--magritte-typography-label-3-regular-text-decoration-v18-2-1:none;
|
|
48
|
+
--magritte-typography-label-4-regular-font-family-v18-2-1:"Inter";
|
|
49
|
+
--magritte-typography-label-4-regular-font-weight-v18-2-1:400;
|
|
50
|
+
--magritte-typography-label-4-regular-line-height-v18-2-1:18px;
|
|
51
|
+
--magritte-typography-label-4-regular-font-size-v18-2-1:12px;
|
|
52
|
+
--magritte-typography-label-4-regular-letter-spacing-v18-2-1:0.01em;
|
|
53
|
+
--magritte-typography-label-4-regular-text-indent-v18-2-1:0px;
|
|
54
|
+
--magritte-typography-label-4-regular-text-transform-v18-2-1:none;
|
|
55
|
+
--magritte-typography-label-4-regular-text-decoration-v18-2-1:none;
|
|
56
|
+
--magritte-semantic-animation-ease-in-out-100-timing-function-v18-2-1:cubic-bezier(0.25, 0.1, 0.25, 1);
|
|
57
|
+
--magritte-semantic-animation-ease-in-out-100-duration-v18-2-1:100ms;
|
|
58
|
+
--magritte-static-space-200-v18-2-1:8px;
|
|
59
|
+
--magritte-static-space-250-v18-2-1:10px;
|
|
60
|
+
--magritte-static-space-300-v18-2-1:12px;
|
|
61
|
+
--magritte-static-space-400-v18-2-1:16px;
|
|
62
|
+
--magritte-core-border-radius-3-x-v18-2-1:12px;
|
|
63
|
+
}
|
|
64
|
+
.magritte-night-theme{
|
|
65
|
+
--magritte-color-component-input-stroke-state-field-hovered-v18-2-1:#3B3B3B;
|
|
66
|
+
--magritte-color-component-input-stroke-state-field-focused-v18-2-1:#0070ff;
|
|
67
|
+
--magritte-color-component-input-stroke-state-accent-focused-accessible-v18-2-1:#0070ff7a;
|
|
68
|
+
--magritte-color-component-input-stroke-state-field-invalid-v18-2-1:#ff4d3a;
|
|
69
|
+
--magritte-color-component-input-stroke-state-negative-focused-accessible-v18-2-1:#ff4d3a7a;
|
|
70
|
+
--magritte-color-component-input-stroke-state-field-disabled-v18-2-1:#111;
|
|
71
|
+
--magritte-color-component-input-stroke-state-field-applied-v18-2-1:#ffffff;
|
|
72
|
+
--magritte-color-component-input-background-field-v18-2-1:#1B1B1B;
|
|
73
|
+
--magritte-color-component-input-background-state-field-hovered-v18-2-1:#1B1B1B;
|
|
74
|
+
--magritte-color-component-input-background-state-field-focused-v18-2-1:#1B1B1B;
|
|
75
|
+
--magritte-color-component-input-background-state-field-invalid-v18-2-1:#1B1B1B;
|
|
76
|
+
--magritte-color-component-input-background-state-field-disabled-v18-2-1:#111;
|
|
77
|
+
--magritte-color-component-input-stroke-field-v18-2-1:#303030;
|
|
78
|
+
--magritte-color-component-input-text-content-v18-2-1:#ffffff;
|
|
79
|
+
--magritte-color-component-input-text-label-v18-2-1:#919191;
|
|
80
|
+
--magritte-color-component-input-text-placeholder-v18-2-1:#535353;
|
|
81
|
+
--magritte-color-component-input-text-state-label-disabled-v18-2-1:#474747;
|
|
82
|
+
--magritte-color-component-input-text-state-content-focused-v18-2-1:#ffffff;
|
|
83
|
+
--magritte-color-component-input-text-state-content-invalid-attention-v18-2-1:#ff4d3a;
|
|
84
|
+
--magritte-color-component-input-text-state-label-hovered-v18-2-1:#919191;
|
|
85
|
+
--magritte-color-component-input-text-state-label-focused-v18-2-1:#919191;
|
|
86
|
+
--magritte-color-component-input-text-state-label-invalid-v18-2-1:#919191;
|
|
87
|
+
--magritte-color-component-input-icon-state-content-applied-v18-2-1:#ffffff;
|
|
88
|
+
--magritte-color-component-input-icon-state-chevron-disabled-v18-2-1:#474747;
|
|
89
|
+
--magritte-color-component-input-icon-state-chevron-hovered-v18-2-1:#848484;
|
|
90
|
+
--magritte-color-component-input-icon-state-chevron-focused-v18-2-1:#ffffff;
|
|
91
|
+
--magritte-color-component-input-icon-state-chevron-invalid-v18-2-1:#474747;
|
|
92
|
+
--magritte-color-component-input-icon-chevron-v18-2-1:#5E5E5E;
|
|
93
|
+
}
|
|
94
|
+
.magritte-trigger___IpHhR_2-0-0{
|
|
95
|
+
display:inline-flex;
|
|
96
|
+
align-items:center;
|
|
97
|
+
cursor:pointer;
|
|
98
|
+
position:relative;
|
|
99
|
+
user-select:none;
|
|
100
|
+
white-space:nowrap;
|
|
101
|
+
appearance:none;
|
|
102
|
+
background-color:var(--magritte-color-component-input-background-field-v18-2-1);
|
|
103
|
+
border-radius:var(--magritte-core-border-radius-3-x-v18-2-1);
|
|
104
|
+
--magritte-ui-icon-color-override:var(--magritte-color-component-input-icon-chevron-v18-2-1);
|
|
105
|
+
}
|
|
106
|
+
.magritte-trigger___IpHhR_2-0-0.focus-visible{
|
|
107
|
+
outline:var(--magritte-color-component-input-stroke-state-accent-focused-accessible-v18-2-1) solid 4px;
|
|
108
|
+
}
|
|
109
|
+
.magritte-xsmall___8iEkS_2-0-0{
|
|
110
|
+
font-family:var(--magritte-typography-label-3-regular-font-family-v18-2-1);
|
|
111
|
+
font-weight:var(--magritte-typography-label-3-regular-font-weight-v18-2-1);
|
|
112
|
+
line-height:var(--magritte-typography-label-3-regular-line-height-v18-2-1);
|
|
113
|
+
font-size:var(--magritte-typography-label-3-regular-font-size-v18-2-1);
|
|
114
|
+
letter-spacing:var(--magritte-typography-label-3-regular-letter-spacing-v18-2-1);
|
|
115
|
+
text-indent:var(--magritte-typography-label-3-regular-text-indent-v18-2-1);
|
|
116
|
+
text-transform:var(--magritte-typography-label-3-regular-text-transform-v18-2-1);
|
|
117
|
+
text-decoration:var(--magritte-typography-label-3-regular-text-decoration-v18-2-1);
|
|
118
|
+
}
|
|
119
|
+
@media (min-width: 1020px){
|
|
120
|
+
body.magritte-old-layout .magritte-xsmall___8iEkS_2-0-0:hover{
|
|
121
|
+
--magritte-ui-icon-color-override:var(--magritte-color-component-input-icon-state-chevron-hovered-v18-2-1);
|
|
122
|
+
}
|
|
123
|
+
body.magritte-old-layout .magritte-xsmall___8iEkS_2-0-0:hover .magritte-content___5eg6m_2-0-0{
|
|
124
|
+
color:var(--magritte-color-component-input-text-state-label-hovered-v18-2-1);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
@media (min-width: 1024px){
|
|
128
|
+
body:not(.magritte-old-layout) .magritte-xsmall___8iEkS_2-0-0:hover{
|
|
129
|
+
--magritte-ui-icon-color-override:var(--magritte-color-component-input-icon-state-chevron-hovered-v18-2-1);
|
|
130
|
+
}
|
|
131
|
+
body:not(.magritte-old-layout) .magritte-xsmall___8iEkS_2-0-0:hover .magritte-content___5eg6m_2-0-0{
|
|
132
|
+
color:var(--magritte-color-component-input-text-state-label-hovered-v18-2-1);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
.magritte-xsmall___8iEkS_2-0-0:focus{
|
|
136
|
+
--magritte-ui-icon-color-override:var(--magritte-color-component-input-icon-state-chevron-focused-v18-2-1);
|
|
137
|
+
}
|
|
138
|
+
.magritte-xsmall___8iEkS_2-0-0:focus .magritte-content___5eg6m_2-0-0{
|
|
139
|
+
color:var(--magritte-color-component-input-text-state-label-focused-v18-2-1);
|
|
140
|
+
}
|
|
141
|
+
.magritte-small___DphY3_2-0-0,
|
|
142
|
+
.magritte-medium___0kuIk_2-0-0,
|
|
143
|
+
.magritte-large___1eRM6_2-0-0{
|
|
144
|
+
box-sizing:border-box;
|
|
145
|
+
box-shadow:inset 0 0 0 1px var(--magritte-color-component-input-stroke-field-v18-2-1);
|
|
146
|
+
}
|
|
147
|
+
@media (min-width: 1020px){
|
|
148
|
+
body.magritte-old-layout .magritte-small___DphY3_2-0-0:hover,
|
|
149
|
+
body.magritte-old-layout .magritte-medium___0kuIk_2-0-0:hover,
|
|
150
|
+
body.magritte-old-layout .magritte-large___1eRM6_2-0-0:hover{
|
|
151
|
+
background-color:var(--magritte-color-component-input-background-state-field-hovered-v18-2-1);
|
|
152
|
+
box-shadow:inset 0 0 0 1px var(--magritte-color-component-input-stroke-state-field-hovered-v18-2-1);
|
|
153
|
+
--magritte-ui-icon-color-override:var(--magritte-color-component-input-icon-state-chevron-hovered-v18-2-1);
|
|
154
|
+
}
|
|
155
|
+
body.magritte-old-layout .magritte-small___DphY3_2-0-0:hover .magritte-content___5eg6m_2-0-0,
|
|
156
|
+
body.magritte-old-layout .magritte-medium___0kuIk_2-0-0:hover .magritte-content___5eg6m_2-0-0,
|
|
157
|
+
body.magritte-old-layout .magritte-large___1eRM6_2-0-0:hover .magritte-content___5eg6m_2-0-0{
|
|
158
|
+
color:var(--magritte-color-component-input-text-state-label-hovered-v18-2-1);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
@media (min-width: 1024px){
|
|
162
|
+
body:not(.magritte-old-layout) .magritte-small___DphY3_2-0-0:hover,
|
|
163
|
+
body:not(.magritte-old-layout) .magritte-medium___0kuIk_2-0-0:hover,
|
|
164
|
+
body:not(.magritte-old-layout) .magritte-large___1eRM6_2-0-0:hover{
|
|
165
|
+
background-color:var(--magritte-color-component-input-background-state-field-hovered-v18-2-1);
|
|
166
|
+
box-shadow:inset 0 0 0 1px var(--magritte-color-component-input-stroke-state-field-hovered-v18-2-1);
|
|
167
|
+
--magritte-ui-icon-color-override:var(--magritte-color-component-input-icon-state-chevron-hovered-v18-2-1);
|
|
168
|
+
}
|
|
169
|
+
body:not(.magritte-old-layout) .magritte-small___DphY3_2-0-0:hover .magritte-content___5eg6m_2-0-0,
|
|
170
|
+
body:not(.magritte-old-layout) .magritte-medium___0kuIk_2-0-0:hover .magritte-content___5eg6m_2-0-0,
|
|
171
|
+
body:not(.magritte-old-layout) .magritte-large___1eRM6_2-0-0:hover .magritte-content___5eg6m_2-0-0{
|
|
172
|
+
color:var(--magritte-color-component-input-text-state-label-hovered-v18-2-1);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
.magritte-small___DphY3_2-0-0:focus,
|
|
176
|
+
.magritte-medium___0kuIk_2-0-0:focus,
|
|
177
|
+
.magritte-large___1eRM6_2-0-0:focus{
|
|
178
|
+
background-color:var(--magritte-color-component-input-background-state-field-focused-v18-2-1);
|
|
179
|
+
box-shadow:inset 0 0 0 2px var(--magritte-color-component-input-stroke-state-field-focused-v18-2-1);
|
|
180
|
+
--magritte-ui-icon-color-override:var(--magritte-color-component-input-icon-state-chevron-focused-v18-2-1);
|
|
181
|
+
}
|
|
182
|
+
.magritte-small___DphY3_2-0-0:focus .magritte-content___5eg6m_2-0-0,
|
|
183
|
+
.magritte-medium___0kuIk_2-0-0:focus .magritte-content___5eg6m_2-0-0,
|
|
184
|
+
.magritte-large___1eRM6_2-0-0:focus .magritte-content___5eg6m_2-0-0{
|
|
185
|
+
color:var(--magritte-color-component-input-text-state-label-focused-v18-2-1);
|
|
186
|
+
}
|
|
187
|
+
.magritte-small___DphY3_2-0-0{
|
|
188
|
+
padding:var(--magritte-static-space-250-v18-2-1) var(--magritte-static-space-300-v18-2-1);
|
|
189
|
+
font-family:var(--magritte-typography-label-3-regular-font-family-v18-2-1);
|
|
190
|
+
font-weight:var(--magritte-typography-label-3-regular-font-weight-v18-2-1);
|
|
191
|
+
line-height:var(--magritte-typography-label-3-regular-line-height-v18-2-1);
|
|
192
|
+
font-size:var(--magritte-typography-label-3-regular-font-size-v18-2-1);
|
|
193
|
+
letter-spacing:var(--magritte-typography-label-3-regular-letter-spacing-v18-2-1);
|
|
194
|
+
text-indent:var(--magritte-typography-label-3-regular-text-indent-v18-2-1);
|
|
195
|
+
text-transform:var(--magritte-typography-label-3-regular-text-transform-v18-2-1);
|
|
196
|
+
text-decoration:var(--magritte-typography-label-3-regular-text-decoration-v18-2-1);
|
|
197
|
+
}
|
|
198
|
+
.magritte-medium___0kuIk_2-0-0{
|
|
199
|
+
padding:var(--magritte-static-space-300-v18-2-1) var(--magritte-static-space-400-v18-2-1);
|
|
200
|
+
font-family:var(--magritte-typography-label-2-regular-font-family-v18-2-1);
|
|
201
|
+
font-weight:var(--magritte-typography-label-2-regular-font-weight-v18-2-1);
|
|
202
|
+
line-height:var(--magritte-typography-label-2-regular-line-height-v18-2-1);
|
|
203
|
+
font-size:var(--magritte-typography-label-2-regular-font-size-v18-2-1);
|
|
204
|
+
letter-spacing:var(--magritte-typography-label-2-regular-letter-spacing-v18-2-1);
|
|
205
|
+
text-indent:var(--magritte-typography-label-2-regular-text-indent-v18-2-1);
|
|
206
|
+
text-transform:var(--magritte-typography-label-2-regular-text-transform-v18-2-1);
|
|
207
|
+
text-decoration:var(--magritte-typography-label-2-regular-text-decoration-v18-2-1);
|
|
208
|
+
}
|
|
209
|
+
.magritte-large___1eRM6_2-0-0{
|
|
210
|
+
padding:var(--magritte-static-space-400-v18-2-1);
|
|
211
|
+
font-family:var(--magritte-typography-label-2-regular-font-family-v18-2-1);
|
|
212
|
+
font-weight:var(--magritte-typography-label-2-regular-font-weight-v18-2-1);
|
|
213
|
+
line-height:var(--magritte-typography-label-2-regular-line-height-v18-2-1);
|
|
214
|
+
font-size:var(--magritte-typography-label-2-regular-font-size-v18-2-1);
|
|
215
|
+
letter-spacing:var(--magritte-typography-label-2-regular-letter-spacing-v18-2-1);
|
|
216
|
+
text-indent:var(--magritte-typography-label-2-regular-text-indent-v18-2-1);
|
|
217
|
+
text-transform:var(--magritte-typography-label-2-regular-text-transform-v18-2-1);
|
|
218
|
+
text-decoration:var(--magritte-typography-label-2-regular-text-decoration-v18-2-1);
|
|
219
|
+
}
|
|
220
|
+
.magritte-applied___jrfWs_2-0-0:not(.magritte-disabled___ZTuRA_2-0-0).magritte-small___DphY3_2-0-0:not(.magritte-invalid___Xlbyg_2-0-0),
|
|
221
|
+
.magritte-applied___jrfWs_2-0-0:not(.magritte-disabled___ZTuRA_2-0-0).magritte-medium___0kuIk_2-0-0:not(.magritte-invalid___Xlbyg_2-0-0),
|
|
222
|
+
.magritte-applied___jrfWs_2-0-0:not(.magritte-disabled___ZTuRA_2-0-0).magritte-large___1eRM6_2-0-0:not(.magritte-invalid___Xlbyg_2-0-0){
|
|
223
|
+
box-shadow:inset 0 0 0 2px var(--magritte-color-component-input-stroke-state-field-applied-v18-2-1);
|
|
224
|
+
}
|
|
225
|
+
.magritte-applied___jrfWs_2-0-0:not(.magritte-disabled___ZTuRA_2-0-0) .magritte-icon___HbC0r_2-0-0{
|
|
226
|
+
--magritte-ui-icon-color-override:var(--magritte-color-component-input-icon-state-content-applied-v18-2-1);
|
|
227
|
+
}
|
|
228
|
+
.magritte-applied___jrfWs_2-0-0:not(.magritte-disabled___ZTuRA_2-0-0) .magritte-content___5eg6m_2-0-0{
|
|
229
|
+
color:var(--magritte-color-component-input-text-content-v18-2-1);
|
|
230
|
+
}
|
|
231
|
+
.magritte-invalid___Xlbyg_2-0-0.magritte-small___DphY3_2-0-0,
|
|
232
|
+
.magritte-invalid___Xlbyg_2-0-0.magritte-medium___0kuIk_2-0-0,
|
|
233
|
+
.magritte-invalid___Xlbyg_2-0-0.magritte-large___1eRM6_2-0-0{
|
|
234
|
+
background-color:var(--magritte-color-component-input-background-state-field-invalid-v18-2-1);
|
|
235
|
+
box-shadow:inset 0 0 0 1px var(--magritte-color-component-input-stroke-state-field-invalid-v18-2-1);
|
|
236
|
+
--magritte-ui-icon-color-override:var(--magritte-color-component-input-icon-state-chevron-invalid-v18-2-1);
|
|
237
|
+
}
|
|
238
|
+
.magritte-invalid___Xlbyg_2-0-0.magritte-small___DphY3_2-0-0 .magritte-content___5eg6m_2-0-0,
|
|
239
|
+
.magritte-invalid___Xlbyg_2-0-0.magritte-medium___0kuIk_2-0-0 .magritte-content___5eg6m_2-0-0,
|
|
240
|
+
.magritte-invalid___Xlbyg_2-0-0.magritte-large___1eRM6_2-0-0 .magritte-content___5eg6m_2-0-0{
|
|
241
|
+
color:var(--magritte-color-component-input-text-state-label-invalid-v18-2-1);
|
|
242
|
+
}
|
|
243
|
+
.magritte-invalid___Xlbyg_2-0-0.focus-visible{
|
|
244
|
+
outline:var(--magritte-color-component-input-stroke-state-negative-focused-accessible-v18-2-1) solid 4px;
|
|
245
|
+
}
|
|
246
|
+
.magritte-disabled___ZTuRA_2-0-0{
|
|
247
|
+
cursor:not-allowed;
|
|
248
|
+
}
|
|
249
|
+
.magritte-disabled___ZTuRA_2-0-0.magritte-xsmall___8iEkS_2-0-0{
|
|
250
|
+
--magritte-ui-icon-color-override:var(--magritte-color-component-input-icon-state-chevron-disabled-v18-2-1);
|
|
251
|
+
}
|
|
252
|
+
.magritte-disabled___ZTuRA_2-0-0.magritte-xsmall___8iEkS_2-0-0 .magritte-content___5eg6m_2-0-0{
|
|
253
|
+
color:var(--magritte-color-component-input-text-state-label-disabled-v18-2-1);
|
|
254
|
+
}
|
|
255
|
+
.magritte-disabled___ZTuRA_2-0-0.magritte-small___DphY3_2-0-0,
|
|
256
|
+
.magritte-disabled___ZTuRA_2-0-0.magritte-medium___0kuIk_2-0-0,
|
|
257
|
+
.magritte-disabled___ZTuRA_2-0-0.magritte-large___1eRM6_2-0-0{
|
|
258
|
+
background-color:var(--magritte-color-component-input-background-state-field-disabled-v18-2-1);
|
|
259
|
+
box-shadow:inset 0 0 0 1px var(--magritte-color-component-input-stroke-state-field-disabled-v18-2-1);
|
|
260
|
+
--magritte-ui-icon-color-override:var(--magritte-color-component-input-icon-state-chevron-disabled-v18-2-1);
|
|
261
|
+
}
|
|
262
|
+
.magritte-disabled___ZTuRA_2-0-0.magritte-small___DphY3_2-0-0 .magritte-content___5eg6m_2-0-0,
|
|
263
|
+
.magritte-disabled___ZTuRA_2-0-0.magritte-medium___0kuIk_2-0-0 .magritte-content___5eg6m_2-0-0,
|
|
264
|
+
.magritte-disabled___ZTuRA_2-0-0.magritte-large___1eRM6_2-0-0 .magritte-content___5eg6m_2-0-0{
|
|
265
|
+
color:var(--magritte-color-component-input-text-state-label-disabled-v18-2-1);
|
|
266
|
+
}
|
|
267
|
+
.magritte-selected___NjQNn_2-0-0:not(.magritte-disabled___ZTuRA_2-0-0).magritte-small___DphY3_2-0-0:focus .magritte-content___5eg6m_2-0-0,
|
|
268
|
+
.magritte-selected___NjQNn_2-0-0:not(.magritte-disabled___ZTuRA_2-0-0).magritte-medium___0kuIk_2-0-0:focus .magritte-content___5eg6m_2-0-0,
|
|
269
|
+
.magritte-selected___NjQNn_2-0-0:not(.magritte-disabled___ZTuRA_2-0-0).magritte-large___1eRM6_2-0-0:focus .magritte-content___5eg6m_2-0-0{
|
|
270
|
+
color:var(--magritte-color-component-input-text-state-content-focused-v18-2-1);
|
|
271
|
+
}
|
|
272
|
+
.magritte-selected___NjQNn_2-0-0:not(.magritte-disabled___ZTuRA_2-0-0) .magritte-content___5eg6m_2-0-0{
|
|
273
|
+
color:var(--magritte-color-component-input-text-content-v18-2-1);
|
|
274
|
+
}
|
|
275
|
+
.magritte-stretched___0cr0S_2-0-0{
|
|
276
|
+
width:100%;
|
|
277
|
+
}
|
|
278
|
+
.magritte-content___5eg6m_2-0-0{
|
|
279
|
+
color:var(--magritte-color-component-input-text-placeholder-v18-2-1);
|
|
280
|
+
padding-right:var(--magritte-static-space-200-v18-2-1);
|
|
281
|
+
}
|
|
282
|
+
.magritte-invalid___Xlbyg_2-0-0.magritte-xsmall___8iEkS_2-0-0 .magritte-content___5eg6m_2-0-0{
|
|
283
|
+
color:var(--magritte-color-component-input-text-state-content-invalid-attention-v18-2-1);
|
|
284
|
+
}
|
|
285
|
+
.magritte-content_medium___VnlIy_2-0-0,
|
|
286
|
+
.magritte-content_large___byZTA_2-0-0{
|
|
287
|
+
padding-right:var(--magritte-static-space-300-v18-2-1);
|
|
288
|
+
}
|
|
289
|
+
.magritte-content_label-can-elevated___7VXpk_2-0-0{
|
|
290
|
+
height:22px;
|
|
291
|
+
}
|
|
292
|
+
.magritte-value___23UwK_2-0-0{
|
|
293
|
+
text-align:left;
|
|
294
|
+
margin-top:calc(0px - ((var(--magritte-typography-label-4-regular-line-height-v18-2-1) + var(--magritte-typography-label-2-regular-line-height-v18-2-1)) / 2) + (var(--magritte-typography-label-4-regular-line-height-v18-2-1) / 2));
|
|
295
|
+
}
|
|
296
|
+
.magritte-label___VsUEF_2-0-0{
|
|
297
|
+
text-align:left;
|
|
298
|
+
transition-property:transform, color, font-size, letter-spacing;
|
|
299
|
+
transition-duration:var(--magritte-semantic-animation-ease-in-out-100-duration-v18-2-1);
|
|
300
|
+
transition-timing-function:var(--magritte-semantic-animation-ease-in-out-100-timing-function-v18-2-1);
|
|
301
|
+
}
|
|
302
|
+
.magritte-label_elevated___N0xnk_2-0-0{
|
|
303
|
+
font-family:var(--magritte-typography-label-4-regular-font-family-v18-2-1);
|
|
304
|
+
font-weight:var(--magritte-typography-label-4-regular-font-weight-v18-2-1);
|
|
305
|
+
line-height:var(--magritte-typography-label-4-regular-line-height-v18-2-1);
|
|
306
|
+
font-size:var(--magritte-typography-label-4-regular-font-size-v18-2-1);
|
|
307
|
+
letter-spacing:var(--magritte-typography-label-4-regular-letter-spacing-v18-2-1);
|
|
308
|
+
text-indent:var(--magritte-typography-label-4-regular-text-indent-v18-2-1);
|
|
309
|
+
text-transform:var(--magritte-typography-label-4-regular-text-transform-v18-2-1);
|
|
310
|
+
text-decoration:var(--magritte-typography-label-4-regular-text-decoration-v18-2-1);
|
|
311
|
+
color:var(--magritte-color-component-input-text-label-v18-2-1);
|
|
312
|
+
margin-top:2px;
|
|
313
|
+
transform:translateY(calc(0px - ((var(--magritte-typography-label-4-regular-line-height-v18-2-1) + var(--magritte-typography-label-2-regular-line-height-v18-2-1)) / 2) + (var(--magritte-typography-label-4-regular-line-height-v18-2-1) / 2)));
|
|
314
|
+
}
|
|
315
|
+
.magritte-icon___HbC0r_2-0-0{
|
|
316
|
+
display:inline-flex;
|
|
317
|
+
margin-left:auto;
|
|
318
|
+
border-radius:var(--magritte-core-border-radius-3-x-v18-2-1);
|
|
319
|
+
transition-property:transform;
|
|
320
|
+
transition-duration:var(--magritte-semantic-animation-ease-in-out-100-duration-v18-2-1);
|
|
321
|
+
transition-timing-function:var(--magritte-semantic-animation-ease-in-out-100-timing-function-v18-2-1);
|
|
322
|
+
}
|
|
323
|
+
.magritte-icon___HbC0r_2-0-0.focus-visible{
|
|
324
|
+
outline:var(--magritte-color-component-input-stroke-state-accent-focused-accessible-v18-2-1) solid 4px;
|
|
325
|
+
}
|
|
326
|
+
.magritte-icon_expanded___ggr1u_2-0-0{
|
|
327
|
+
transform:rotate(-180deg);
|
|
328
|
+
--magritte-ui-icon-color-override:var(--magritte-color-component-input-icon-state-chevron-focused-v18-2-1);
|
|
329
|
+
}
|
package/index.d.ts
ADDED
package/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import './index.css';
|
|
2
|
+
export { Trigger } from './Trigger.js';
|
|
3
|
+
import 'react/jsx-runtime';
|
|
4
|
+
import 'react';
|
|
5
|
+
import 'classnames';
|
|
6
|
+
import '@hh.ru/magritte-common-keyboard';
|
|
7
|
+
import '@hh.ru/magritte-ui-action';
|
|
8
|
+
import '@hh.ru/magritte-ui-icon/icon';
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
package/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
package/package.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hh.ru/magritte-ui-trigger",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"main": "index.js",
|
|
5
|
+
"types": "index.d.ts",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"index.css"
|
|
8
|
+
],
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "yarn root:build $(pwd)",
|
|
11
|
+
"build-test-branch": "yarn root:build-test-branch $(pwd)",
|
|
12
|
+
"changelog": "yarn root:changelog $(pwd)",
|
|
13
|
+
"prepack": "yarn root:prepack $(pwd)",
|
|
14
|
+
"postpublish": "yarn root:postpublish $(pwd)",
|
|
15
|
+
"stylelint-test": "yarn root:stylelint-test $(pwd)",
|
|
16
|
+
"eslint-test": "yarn root:eslint-test $(pwd)",
|
|
17
|
+
"ts-config": "yarn root:ts-config $(pwd)",
|
|
18
|
+
"ts-check": "yarn root:ts-check $(pwd)",
|
|
19
|
+
"test": "yarn root:test $(pwd)"
|
|
20
|
+
},
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public"
|
|
23
|
+
},
|
|
24
|
+
"peerDependencies": {
|
|
25
|
+
"classnames": ">=2.3.2",
|
|
26
|
+
"react": ">=18.2.0"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@hh.ru/magritte-common-keyboard": "4.0.1",
|
|
30
|
+
"@hh.ru/magritte-ui-action": "4.3.14",
|
|
31
|
+
"@hh.ru/magritte-ui-button": "5.0.5",
|
|
32
|
+
"@hh.ru/magritte-ui-icon": "7.1.9"
|
|
33
|
+
},
|
|
34
|
+
"gitHead": "ba78077748c19c90f0391fd29b665285a740e1c1"
|
|
35
|
+
}
|
package/types.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type TriggerSize = 'large' | 'medium' | 'small' | 'xsmall';
|
|
3
|
+
export interface TriggerProps {
|
|
4
|
+
applied?: boolean;
|
|
5
|
+
value: ReactNode;
|
|
6
|
+
label?: string;
|
|
7
|
+
elevateLabel?: boolean;
|
|
8
|
+
expanded: boolean;
|
|
9
|
+
minWidth?: number;
|
|
10
|
+
invalid?: boolean;
|
|
11
|
+
size: TriggerSize;
|
|
12
|
+
stretched?: boolean;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
onToogle?: () => void;
|
|
15
|
+
onClear?: () => void;
|
|
16
|
+
}
|
package/types.js
ADDED
package/types.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|