@semcore/base-trigger 3.0.23 → 3.1.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/CHANGELOG.md +4 -142
- package/LICENSE +21 -0
- package/lib/cjs/BaseTrigger.js +34 -28
- package/lib/cjs/BaseTrigger.js.map +1 -1
- package/lib/cjs/ButtonTrigger.js +4 -4
- package/lib/cjs/FilterTrigger.js +16 -16
- package/lib/cjs/LinkTrigger.js +14 -14
- package/lib/es6/BaseTrigger.js +35 -29
- package/lib/es6/BaseTrigger.js.map +1 -1
- package/lib/es6/ButtonTrigger.js +4 -4
- package/lib/es6/FilterTrigger.js +16 -16
- package/lib/es6/LinkTrigger.js +14 -14
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -2,131 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
|
5
|
-
## [3.0
|
|
5
|
+
## [3.1.0] - 2022-10-07
|
|
6
6
|
|
|
7
7
|
### Changed
|
|
8
8
|
|
|
9
|
-
-
|
|
9
|
+
- Updated major dependency `@semcore/neighbor-location` [2.3.15 ~> 3.0.0]
|
|
10
10
|
|
|
11
|
-
## [3.0.
|
|
11
|
+
## [3.0.24] - 2022-10-06
|
|
12
12
|
|
|
13
13
|
### Changed
|
|
14
14
|
|
|
15
|
-
- Version patch update due to children dependencies update (`@semcore/icon` [2.32.
|
|
16
|
-
|
|
17
|
-
## [3.0.21] - 2022-09-29
|
|
18
|
-
|
|
19
|
-
### Changed
|
|
20
|
-
|
|
21
|
-
- Version patch update due to children dependencies update (`@semcore/icon` [2.30.4 ~> 2.31.0]).
|
|
22
|
-
|
|
23
|
-
## [3.0.20] - 2022-09-21
|
|
24
|
-
|
|
25
|
-
### Changed
|
|
26
|
-
|
|
27
|
-
- Version patch update due to children dependencies update (`@semcore/icon` [2.30.3 ~> 2.30.4]).
|
|
28
|
-
|
|
29
|
-
## [3.0.19] - 2022-09-21
|
|
30
|
-
|
|
31
|
-
### Changed
|
|
32
|
-
|
|
33
|
-
- Version patch update due to children dependencies update (`@semcore/icon` [2.30.2 ~> 2.30.3]).
|
|
34
|
-
|
|
35
|
-
## [3.0.18] - 2022-09-20
|
|
36
|
-
|
|
37
|
-
### Changed
|
|
38
|
-
|
|
39
|
-
- Version patch update due to children dependencies update (`@semcore/spin` [4.0.9 ~> 4.0.10]).
|
|
40
|
-
|
|
41
|
-
## [3.0.17] - 2022-08-30
|
|
42
|
-
|
|
43
|
-
### Changed
|
|
44
|
-
|
|
45
|
-
- Version patch update due to children dependencies update (`@semcore/utils` [3.37.0 ~> 3.37.1]).
|
|
46
|
-
|
|
47
|
-
## [3.0.16] - 2022-08-18
|
|
48
|
-
|
|
49
|
-
### Changed
|
|
50
|
-
|
|
51
|
-
- Version patch update due to children dependencies update (`@semcore/icon` [2.30.0 ~> 2.30.1]).
|
|
52
|
-
|
|
53
|
-
## [3.0.15] - 2022-08-18
|
|
54
|
-
|
|
55
|
-
### Changed
|
|
56
|
-
|
|
57
|
-
- Version patch update due to children dependencies update (`@semcore/icon` [2.29.5 ~> 2.30.0]).
|
|
58
|
-
|
|
59
|
-
## [3.0.14] - 2022-08-18
|
|
60
|
-
|
|
61
|
-
### Changed
|
|
62
|
-
|
|
63
|
-
- Version patch update due to children dependencies update (`@semcore/utils` [3.36.0 ~> 3.37.0]).
|
|
64
|
-
|
|
65
|
-
## [3.0.13] - 2022-08-11
|
|
66
|
-
|
|
67
|
-
### Changed
|
|
68
|
-
|
|
69
|
-
- Version patch update due to children dependencies update (`@semcore/utils` [3.35.1 ~> 3.36.0]).
|
|
70
|
-
|
|
71
|
-
## [3.0.12] - 2022-08-01
|
|
72
|
-
|
|
73
|
-
### Changed
|
|
74
|
-
|
|
75
|
-
- Version patch update due to children dependencies update (`@semcore/utils` [3.35.0 ~> 3.35.1]).
|
|
76
|
-
|
|
77
|
-
## [3.0.11] - 2022-07-25
|
|
78
|
-
|
|
79
|
-
### Changed
|
|
80
|
-
|
|
81
|
-
- Version patch update due to children dependencies update (`@semcore/icon` [2.29.1 ~> 2.29.2]).
|
|
82
|
-
|
|
83
|
-
## [3.0.10] - 2022-07-22
|
|
84
|
-
|
|
85
|
-
### Changed
|
|
86
|
-
|
|
87
|
-
- Version patch update due to children dependencies update (`@semcore/utils` [3.34.0 ~> 3.35.0]).
|
|
88
|
-
|
|
89
|
-
## [3.0.9] - 2022-07-21
|
|
90
|
-
|
|
91
|
-
### Changed
|
|
92
|
-
|
|
93
|
-
- Version patch update due to children dependencies update (`@semcore/icon` [2.28.0 ~> 2.29.0]).
|
|
94
|
-
|
|
95
|
-
## [3.0.8] - 2022-07-14
|
|
96
|
-
|
|
97
|
-
### Changed
|
|
98
|
-
|
|
99
|
-
- Version patch update due to children dependencies update (`@semcore/neighbor-location` [2.3.9 ~> 2.3.10]).
|
|
100
|
-
|
|
101
|
-
## [3.0.7] - 2022-07-07
|
|
102
|
-
|
|
103
|
-
### Changed
|
|
104
|
-
|
|
105
|
-
- Version patch update due to children dependencies update (`@semcore/utils` [3.33.0 ~> 3.34.0], `@semcore/icon` [2.27.0 ~> 2.28.0]).
|
|
106
|
-
|
|
107
|
-
## [3.0.6] - 2022-06-02
|
|
108
|
-
|
|
109
|
-
### Changed
|
|
110
|
-
|
|
111
|
-
- Version patch update due to children dependencies update (`@semcore/utils` [3.32.2 ~> 3.33.0], `@semcore/icon` [2.26.1 ~> 2.27.0]).
|
|
112
|
-
|
|
113
|
-
## [3.0.5] - 2022-05-31
|
|
114
|
-
|
|
115
|
-
### Changed
|
|
116
|
-
|
|
117
|
-
- Version patch update due to children dependencies update (`@semcore/utils` [3.32.1 ~> 3.32.2]).
|
|
118
|
-
|
|
119
|
-
## [3.0.4] - 2022-05-23
|
|
120
|
-
|
|
121
|
-
### Changed
|
|
122
|
-
|
|
123
|
-
- Version patch update due to children dependencies update (`@semcore/icon` [2.25.1 ~> 2.26.0]).
|
|
124
|
-
|
|
125
|
-
## [3.0.3] - 2022-05-19
|
|
126
|
-
|
|
127
|
-
### Changed
|
|
128
|
-
|
|
129
|
-
- Version patch update due to children dependencies update (`@semcore/utils` [3.32.0 ~> 3.32.1], `@semcore/flex-box` [4.5.1 ~> 4.5.3]).
|
|
15
|
+
- Version patch update due to children dependencies update (`@semcore/icon` [2.32.2 ~> 2.33.0]).
|
|
130
16
|
|
|
131
17
|
## [3.0.2] - 2022-05-19
|
|
132
18
|
|
|
@@ -153,30 +39,6 @@ CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangel
|
|
|
153
39
|
|
|
154
40
|
- Version patch update due to children dependencies update (`@semcore/icon` [2.21.0 ~> 2.24.0]).
|
|
155
41
|
|
|
156
|
-
## [2.6.4] - 2022-04-28
|
|
157
|
-
|
|
158
|
-
### Changed
|
|
159
|
-
|
|
160
|
-
- Version patch update due to children dependencies update (`@semcore/icon` [2.20.0 ~> 2.21.0]).
|
|
161
|
-
|
|
162
|
-
## [2.6.3] - 2022-03-21
|
|
163
|
-
|
|
164
|
-
### Changed
|
|
165
|
-
|
|
166
|
-
- Version patch update due to children dependencies update (`@semcore/icon` [2.19.4 ~> 2.20.0]).
|
|
167
|
-
|
|
168
|
-
## [2.6.2] - 2022-03-14
|
|
169
|
-
|
|
170
|
-
### Changed
|
|
171
|
-
|
|
172
|
-
- Version patch update due to children dependencies update (`@semcore/utils` [3.31.2 ~> 3.31.2]).
|
|
173
|
-
|
|
174
|
-
## [2.6.1] - 2022-03-05
|
|
175
|
-
|
|
176
|
-
### Changed
|
|
177
|
-
|
|
178
|
-
- Version patch update due to children dependencies update (`@semcore/dot` [3.0.2 ~> 3.0.3]).
|
|
179
|
-
|
|
180
42
|
## [2.6.0] - 2021-03-04
|
|
181
43
|
|
|
182
44
|
### Added
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright ©, 2022, Semrush Inc. (written by Roman Lysov, Sergey Kobets, Mikhail Karachev, Julia Mnizhek, Elena Krasnopolskaia, Mikhail Sereniti).
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/lib/cjs/BaseTrigger.js
CHANGED
|
@@ -27,7 +27,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
27
27
|
|
|
28
28
|
var _flexBox = require("@semcore/flex-box");
|
|
29
29
|
|
|
30
|
-
var _neighborLocation = require("@semcore/neighbor-location");
|
|
30
|
+
var _neighborLocation = _interopRequireDefault(require("@semcore/neighbor-location"));
|
|
31
31
|
|
|
32
32
|
var _keyboardFocusEnhance = _interopRequireDefault(require("@semcore/utils/lib/enhances/keyboardFocusEnhance"));
|
|
33
33
|
|
|
@@ -52,28 +52,28 @@ var style = (
|
|
|
52
52
|
/*__reshadow_css_start__*/
|
|
53
53
|
_core.sstyled.insert(
|
|
54
54
|
/*__inner_css_start__*/
|
|
55
|
-
".
|
|
55
|
+
":root {\n\n /* DEPRECATED START\n Deprecated variables should never be used in\n components styles but preserved for backward\n compatibility if they used in projects\n like `<Badge bg=\"red\">alpha</Badge>`\n */\n /* DEPRECATED END */\n}\n\n.___SBaseTrigger_xbf7i_gg_ {\n display: inline-block;\n align-items: center;\n justify-content: center;\n line-height: normal;\n position: relative;\n touch-action: manipulation;\n white-space: nowrap;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n box-sizing: border-box;\n padding: 0;\n margin: 0;\n box-shadow: none;\n outline: none;\n text-decoration: none;\n -webkit-tap-highlight-color: transparent;\n overflow: visible;\n outline: 0;\n text-align: center;\n vertical-align: middle;\n font-family: Inter, sans-serif;\n cursor: pointer;\n\n background: #ffffff;\n\n font-weight: 400;\n border: 1px solid #c4c7cf;\n color: #191b23\n}\n\n.___SBaseTrigger_xbf7i_gg_::-moz-focus-inner {\n border: none;\n padding: 0;\n }\n\n.___SBaseTrigger_xbf7i_gg_:active,\n .___SBaseTrigger_xbf7i_gg_:hover,\n .___SBaseTrigger_xbf7i_gg_:focus {\n outline: 0;\n text-decoration: none;\n }\n\n.___SBaseTrigger_xbf7i_gg_.__keyboardFocused_xbf7i_gg_ {\n border: 1px solid #008ff8;\n box-shadow: 0 0 0 3px rgba(0, 143, 248, 0.2);\n }\n\n.___SBaseTrigger_xbf7i_gg_:hover {\n background-color: rgba(138, 142, 155, 0.2);\n }\n\n.___SBaseTrigger_xbf7i_gg_:active,\n .___SBaseTrigger_xbf7i_gg_.__active_xbf7i_gg_ {\n background-color: rgba(138, 142, 155, 0.3);\n }\n\n.___SBaseTrigger_xbf7i_gg_.__disabled_xbf7i_gg_ {\n opacity: 0.3;\n cursor: default;\n pointer-events: none; /* Disable link interactions */\n}\n\n.___SBaseTrigger_xbf7i_gg_.__keyboardFocused_xbf7i_gg_ {\n z-index: 1;\n}\n\n.___SInner_xbf7i_gg_ {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n}\n\n.___SText_xbf7i_gg_ {\n display: inline;\n padding: 1px 0;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n line-height: 1.42;\n flex-grow: 1;\n text-align: left;\n}\n\n.___SAddon_xbf7i_gg_ {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.___SBaseAddon_xbf7i_gg_ {\n width: 12px;\n height: 12px;\n}\n\n.___SBaseTrigger_xbf7i_gg_._size_m_xbf7i_gg_ {\n min-width: 26px;\n height: 28px;\n border-radius: 6px;\n padding: 0 8px;\n font-size: 14px\n}\n\n.___SBaseTrigger_xbf7i_gg_._size_m_xbf7i_gg_ .___SAddon_xbf7i_gg_:not(:only-child):first-child {\n margin-right: 8px;\n }\n\n.___SBaseTrigger_xbf7i_gg_._size_m_xbf7i_gg_ .___SAddon_xbf7i_gg_:not(:only-child):last-child {\n margin-left: 8px;\n }\n\n.___SBaseTrigger_xbf7i_gg_._size_m_xbf7i_gg_ .___SAddon_xbf7i_gg_:only-child {\n margin-left: -4px;\n margin-right: -4px;\n }\n\n.___SBaseTrigger_xbf7i_gg_._size_l_xbf7i_gg_ {\n min-width: 32px;\n height: 40px;\n border-radius: 6px;\n padding: 0 12px;\n font-size: 16px\n}\n\n.___SBaseTrigger_xbf7i_gg_._size_l_xbf7i_gg_ .___SAddon_xbf7i_gg_:not(:only-child):first-child {\n margin-right: 8px;\n }\n\n.___SBaseTrigger_xbf7i_gg_._size_l_xbf7i_gg_ .___SAddon_xbf7i_gg_:not(:only-child):last-child {\n margin-left: 8px;\n }\n\n.___SBaseTrigger_xbf7i_gg_._size_l_xbf7i_gg_ .___SAddon_xbf7i_gg_:only-child {\n margin-left: -4px;\n margin-right: -4px;\n }\n\n.___SBaseTrigger_xbf7i_gg_._neighborLocation_right_xbf7i_gg_ {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.___SBaseTrigger_xbf7i_gg_._neighborLocation_both_xbf7i_gg_ {\n border-radius: 0;\n margin-left: -1px;\n}\n\n.___SBaseTrigger_xbf7i_gg_._neighborLocation_left_xbf7i_gg_ {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n margin-left: -1px;\n}\n\n.___SText_xbf7i_gg_.__placeholder_xbf7i_gg_ {\n color: #a9abb6;\n}\n\n.___SBaseTrigger_xbf7i_gg_._state_normal_xbf7i_gg_ {\n border-color: #c4c7cf;\n}\n\n.___SBaseTrigger_xbf7i_gg_._state_valid_xbf7i_gg_ {\n border-color: #59ddaa;\n}\n\n.___SBaseTrigger_xbf7i_gg_._state_invalid_xbf7i_gg_ {\n border-color: #ffaeb5\n}\n\n.___SBaseTrigger_xbf7i_gg_._state_invalid_xbf7i_gg_.__keyboardFocused_xbf7i_gg_ {\n border-color: #ff642d;\n box-shadow: 0 0 0 3px rgba(255, 100, 45, 0.3);\n }\n"
|
|
56
56
|
/*__inner_css_end__*/
|
|
57
|
-
, "
|
|
57
|
+
, "xbf7i_gg_")
|
|
58
58
|
/*__reshadow_css_end__*/
|
|
59
59
|
, {
|
|
60
|
-
"__SBaseTrigger": "
|
|
61
|
-
"_keyboardFocused": "
|
|
62
|
-
"_active": "
|
|
63
|
-
"_disabled": "
|
|
64
|
-
"__SInner": "
|
|
65
|
-
"__SText": "
|
|
66
|
-
"__SAddon": "
|
|
67
|
-
"__SBaseAddon": "
|
|
68
|
-
"_size_m": "
|
|
69
|
-
"_size_l": "
|
|
70
|
-
"_neighborLocation_right": "
|
|
71
|
-
"_neighborLocation_both": "
|
|
72
|
-
"_neighborLocation_left": "
|
|
73
|
-
"_placeholder": "
|
|
74
|
-
"_state_normal": "
|
|
75
|
-
"_state_valid": "
|
|
76
|
-
"_state_invalid": "
|
|
60
|
+
"__SBaseTrigger": "___SBaseTrigger_xbf7i_gg_",
|
|
61
|
+
"_keyboardFocused": "__keyboardFocused_xbf7i_gg_",
|
|
62
|
+
"_active": "__active_xbf7i_gg_",
|
|
63
|
+
"_disabled": "__disabled_xbf7i_gg_",
|
|
64
|
+
"__SInner": "___SInner_xbf7i_gg_",
|
|
65
|
+
"__SText": "___SText_xbf7i_gg_",
|
|
66
|
+
"__SAddon": "___SAddon_xbf7i_gg_",
|
|
67
|
+
"__SBaseAddon": "___SBaseAddon_xbf7i_gg_",
|
|
68
|
+
"_size_m": "_size_m_xbf7i_gg_",
|
|
69
|
+
"_size_l": "_size_l_xbf7i_gg_",
|
|
70
|
+
"_neighborLocation_right": "_neighborLocation_right_xbf7i_gg_",
|
|
71
|
+
"_neighborLocation_both": "_neighborLocation_both_xbf7i_gg_",
|
|
72
|
+
"_neighborLocation_left": "_neighborLocation_left_xbf7i_gg_",
|
|
73
|
+
"_placeholder": "__placeholder_xbf7i_gg_",
|
|
74
|
+
"_state_normal": "_state_normal_xbf7i_gg_",
|
|
75
|
+
"_state_valid": "_state_valid_xbf7i_gg_",
|
|
76
|
+
"_state_invalid": "_state_invalid_xbf7i_gg_"
|
|
77
77
|
});
|
|
78
78
|
|
|
79
79
|
var RootBaseTrigger = /*#__PURE__*/function (_Component) {
|
|
@@ -100,33 +100,39 @@ var RootBaseTrigger = /*#__PURE__*/function (_Component) {
|
|
|
100
100
|
}, {
|
|
101
101
|
key: "render",
|
|
102
102
|
value: function render() {
|
|
103
|
-
var _ref = this.asProps
|
|
104
|
-
_ref4;
|
|
105
|
-
|
|
103
|
+
var _ref = this.asProps;
|
|
106
104
|
var SBaseTrigger = _flexBox.Box;
|
|
107
105
|
var SInner = 'div';
|
|
108
106
|
var _this$asProps2 = this.asProps,
|
|
109
107
|
Children = _this$asProps2.Children,
|
|
110
108
|
styles = _this$asProps2.styles,
|
|
111
|
-
theme = _this$asProps2.theme
|
|
109
|
+
theme = _this$asProps2.theme,
|
|
110
|
+
neighborLocation = _this$asProps2.neighborLocation;
|
|
112
111
|
|
|
113
112
|
_logger["default"].warn(theme !== undefined, "The 'theme' property is deprecated, use 'state'", this.asProps['data-ui-name'] || BaseTrigger.displayName); // TODO: add aria
|
|
114
113
|
|
|
115
114
|
|
|
116
|
-
return
|
|
117
|
-
|
|
118
|
-
},
|
|
115
|
+
return /*#__PURE__*/_react["default"].createElement(_neighborLocation["default"].Detect, {
|
|
116
|
+
neighborLocation: neighborLocation
|
|
117
|
+
}, function (neighborLocation) {
|
|
118
|
+
var _ref4;
|
|
119
|
+
|
|
120
|
+
return _ref4 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SBaseTrigger, _ref4.cn("SBaseTrigger", _objectSpread({}, (0, _core.assignProps)({
|
|
121
|
+
"neighborLocation": neighborLocation,
|
|
122
|
+
"state": theme
|
|
123
|
+
}, _ref))), /*#__PURE__*/_react["default"].createElement(SInner, _ref4.cn("SInner", {}), (0, _addonTextChildren["default"])(Children, BaseTrigger.Text, BaseTrigger.Addon)));
|
|
124
|
+
});
|
|
119
125
|
}
|
|
120
126
|
}]);
|
|
121
127
|
return RootBaseTrigger;
|
|
122
128
|
}(_core.Component);
|
|
123
129
|
|
|
124
130
|
(0, _defineProperty2["default"])(RootBaseTrigger, "displayName", 'BaseTrigger');
|
|
131
|
+
(0, _defineProperty2["default"])(RootBaseTrigger, "enhance", [(0, _keyboardFocusEnhance["default"])()]);
|
|
125
132
|
(0, _defineProperty2["default"])(RootBaseTrigger, "style", style);
|
|
126
133
|
(0, _defineProperty2["default"])(RootBaseTrigger, "defaultProps", {
|
|
127
134
|
size: 'm'
|
|
128
135
|
});
|
|
129
|
-
(0, _defineProperty2["default"])(RootBaseTrigger, "enhance", [(0, _keyboardFocusEnhance["default"])(), (0, _neighborLocation.neighborLocationEnhance)()]);
|
|
130
136
|
|
|
131
137
|
function Text(props) {
|
|
132
138
|
var _ref2 = arguments[0],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseTrigger.js","names":["RootBaseTrigger","asProps","placeholder","empty","SBaseTrigger","Box","SInner","Children","styles","theme","logger","warn","undefined","BaseTrigger","displayName","sstyled","addonTextChildren","Text","Addon","Component","
|
|
1
|
+
{"version":3,"file":"BaseTrigger.js","names":["RootBaseTrigger","asProps","placeholder","empty","SBaseTrigger","Box","SInner","Children","styles","theme","neighborLocation","logger","warn","undefined","BaseTrigger","displayName","sstyled","addonTextChildren","Text","Addon","Component","keyboardFocusEnhance","style","size","props","SText","children","SAddon","createComponent"],"sources":["../../src/BaseTrigger.jsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { Component, Root, sstyled } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport NeighborLocation from '@semcore/neighbor-location';\nimport keyboardFocusEnhance from '@semcore/utils/lib/enhances/keyboardFocusEnhance';\nimport addonTextChildren from '@semcore/utils/lib/addonTextChildren';\nimport logger from '@semcore/utils/lib/logger';\n\nimport style from './style/base-trigger.shadow.css';\n\nclass RootBaseTrigger extends Component {\n static displayName = 'BaseTrigger';\n static enhance = [keyboardFocusEnhance()];\n static style = style;\n static defaultProps = {\n size: 'm',\n };\n\n getTextProps() {\n const { placeholder, empty } = this.asProps;\n return {\n placeholder,\n empty,\n };\n }\n\n render() {\n const SBaseTrigger = Root;\n const SInner = 'div';\n const { Children, styles, theme, neighborLocation } = this.asProps;\n\n logger.warn(\n theme !== undefined,\n \"The 'theme' property is deprecated, use 'state'\",\n this.asProps['data-ui-name'] || BaseTrigger.displayName,\n );\n\n // TODO: add aria\n return (\n <NeighborLocation.Detect neighborLocation={neighborLocation}>\n {(neighborLocation) =>\n sstyled(styles)(\n <SBaseTrigger render={Box} neighborLocation={neighborLocation} state={theme}>\n <SInner>{addonTextChildren(Children, BaseTrigger.Text, BaseTrigger.Addon)}</SInner>\n </SBaseTrigger>,\n )\n }\n </NeighborLocation.Detect>\n );\n }\n}\n\nfunction Text(props) {\n const SText = Root;\n const { children, styles, empty, placeholder } = props;\n\n return sstyled(styles)(\n /* \"use:\" prefix was used for backward compatibility (by lsroman) */\n <SText render={Box} use:placeholder={empty}>\n {empty ? placeholder : children}\n </SText>,\n );\n}\n\nfunction Addon(props) {\n const SAddon = Root;\n return sstyled(props.styles)(<SAddon render={Box} />);\n}\n\nconst BaseTrigger = createComponent(RootBaseTrigger, {\n Text,\n Addon,\n});\n\nexport default BaseTrigger;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA;;AADA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIMA,e;;;;;;;;;;;;WAQJ,wBAAe;MACb,oBAA+B,KAAKC,OAApC;MAAA,IAAQC,WAAR,iBAAQA,WAAR;MAAA,IAAqBC,KAArB,iBAAqBA,KAArB;MACA,OAAO;QACLD,WAAW,EAAXA,WADK;QAELC,KAAK,EAALA;MAFK,CAAP;IAID;;;WAED,kBAAS;MAAA;MACP,IAAMC,YAAY,GAeYC,YAf9B;MACA,IAAMC,MAAM,GAAG,KAAf;MACA,qBAAsD,KAAKL,OAA3D;MAAA,IAAQM,QAAR,kBAAQA,QAAR;MAAA,IAAkBC,MAAlB,kBAAkBA,MAAlB;MAAA,IAA0BC,KAA1B,kBAA0BA,KAA1B;MAAA,IAAiCC,gBAAjC,kBAAiCA,gBAAjC;;MAEAC,kBAAA,CAAOC,IAAP,CACEH,KAAK,KAAKI,SADZ,EAEE,iDAFF,EAGE,KAAKZ,OAAL,CAAa,cAAb,KAAgCa,WAAW,CAACC,WAH9C,EALO,CAWP;;;MACA,oBACE,gCAAC,4BAAD,CAAkB,MAAlB;QAAyB,gBAAgB,EAAEL;MAA3C,GACG,UAACA,gBAAD;QAAA;;QAAA,eACC,IAAAM,aAAA,EAAQR,MAAR,CADD,eAEG,gCAAC,YAAD;UAAA,oBAA6CE,gBAA7C;UAAA,SAAsED;QAAtE,yBACE,gCAAC,MAAD,0BAAS,IAAAQ,6BAAA,EAAkBV,QAAlB,EAA4BO,WAAW,CAACI,IAAxC,EAA8CJ,WAAW,CAACK,KAA1D,CAAT,CADF,CAFH;MAAA,CADH,CADF;IAWD;;;EAvC2BC,e;;iCAAxBpB,e,iBACiB,a;iCADjBA,e,aAEa,CAAC,IAAAqB,gCAAA,GAAD,C;iCAFbrB,e,WAGWsB,K;iCAHXtB,e,kBAIkB;EACpBuB,IAAI,EAAE;AADc,C;;AAsCxB,SAASL,IAAT,CAAcM,KAAd,EAAqB;EAAA;EAAA;;EACnB,IAAMC,KAAK,GAKMpB,YALjB;EACA,IAAQqB,QAAR,GAAiDF,KAAjD,CAAQE,QAAR;EAAA,IAAkBlB,MAAlB,GAAiDgB,KAAjD,CAAkBhB,MAAlB;EAAA,IAA0BL,KAA1B,GAAiDqB,KAAjD,CAA0BrB,KAA1B;EAAA,IAAiCD,WAAjC,GAAiDsB,KAAjD,CAAiCtB,WAAjC;EAEA,eAAO,IAAAc,aAAA,EAAQR,MAAR,CAAP;EAAA;;EACE;EACA,gCAAC,KAAD;IAAA,mBAAqCL;EAArC,aACGA,KAAK,GAAGD,WAAH,GAAiBwB,QADzB,CAFF;AAMD;;AAED,SAASP,KAAT,CAAeK,KAAf,EAAsB;EAAA;EAAA;;EACpB,IAAMG,MAAM,GACiCtB,YAD7C;EACA,eAAO,IAAAW,aAAA,EAAQQ,KAAK,CAAChB,MAAd,CAAP,eAA6B,gCAAC,MAAD,2EAA7B;AACD;;AAED,IAAMM,WAAW,GAAG,IAAAc,gBAAA,EAAgB5B,eAAhB,EAAiC;EACnDkB,IAAI,EAAJA,IADmD;EAEnDC,KAAK,EAALA;AAFmD,CAAjC,CAApB;eAKeL,W"}
|
package/lib/cjs/ButtonTrigger.js
CHANGED
|
@@ -46,13 +46,13 @@ var style = (
|
|
|
46
46
|
/*__reshadow_css_start__*/
|
|
47
47
|
_core.sstyled.insert(
|
|
48
48
|
/*__inner_css_start__*/
|
|
49
|
-
".
|
|
49
|
+
":root {\n\n /* DEPRECATED START\n Deprecated variables should never be used in\n components styles but preserved for backward\n compatibility if they used in projects\n like `<Badge bg=\"red\">alpha</Badge>`\n */\n /* DEPRECATED END */\n}\n\n.___SButtonAddon_14eh9_gg_ {\n width: 12px;\n height: 12px;\n}\n\n.___SButtonTriggerSpin_14eh9_gg_ {\n fill: #6c6e79;\n}\n"
|
|
50
50
|
/*__inner_css_end__*/
|
|
51
|
-
, "
|
|
51
|
+
, "14eh9_gg_")
|
|
52
52
|
/*__reshadow_css_end__*/
|
|
53
53
|
, {
|
|
54
|
-
"__SButtonAddon": "
|
|
55
|
-
"__SButtonTriggerSpin": "
|
|
54
|
+
"__SButtonAddon": "___SButtonAddon_14eh9_gg_",
|
|
55
|
+
"__SButtonTriggerSpin": "___SButtonTriggerSpin_14eh9_gg_"
|
|
56
56
|
});
|
|
57
57
|
|
|
58
58
|
var RootButtonTrigger = /*#__PURE__*/function (_Component) {
|
package/lib/cjs/FilterTrigger.js
CHANGED
|
@@ -60,25 +60,25 @@ var style = (
|
|
|
60
60
|
/*__reshadow_css_start__*/
|
|
61
61
|
_core.sstyled.insert(
|
|
62
62
|
/*__inner_css_start__*/
|
|
63
|
-
".
|
|
63
|
+
":root {\n\n /* DEPRECATED START\n Deprecated variables should never be used in\n components styles but preserved for backward\n compatibility if they used in projects\n like `<Badge bg=\"red\">alpha</Badge>`\n */\n /* DEPRECATED END */\n}\n\n.___SButtonTrigger_1apnu_gg_ {\n border: 1px solid #c4c7cf;\n background: #ffffff;\n color: #191b23\n}\n\n.___SButtonTrigger_1apnu_gg_::-moz-focus-inner {\n border: none;\n padding: 0;\n }\n\n.___SButtonTrigger_1apnu_gg_:active,\n .___SButtonTrigger_1apnu_gg_:hover,\n .___SButtonTrigger_1apnu_gg_:focus {\n outline: 0;\n text-decoration: none;\n }\n\n.___SButtonTrigger_1apnu_gg_:active,\n .___SButtonTrigger_1apnu_gg_:hover,\n .___SButtonTrigger_1apnu_gg_.__active_1apnu_gg_ {\n background-color: rgba(138, 142, 155, 0.2);\n }\n\n.___SButtonTrigger_1apnu_gg_._size_m_1apnu_gg_ {\n min-width: 26px;\n height: 28px;\n border-radius: 6px;\n font-size: 14px;\n}\n\n.___SButtonTrigger_1apnu_gg_._size_l_1apnu_gg_ {\n min-width: 32px;\n height: 40px;\n border-radius: 6px;\n font-size: 16px;\n}\n\n.___SText_1apnu_gg_.__placeholder_1apnu_gg_ {\n color: #a9abb6;\n}\n\n.___SButtonTrigger_1apnu_gg_._state_normal_1apnu_gg_ {\n border-color: #c4c7cf;\n}\n\n.___SButtonTrigger_1apnu_gg_._state_valid_1apnu_gg_ {\n border-color: #59ddaa;\n}\n\n.___SButtonTrigger_1apnu_gg_._state_invalid_1apnu_gg_ {\n border-color: #ffaeb5;\n}\n\n.___SFilterTrigger_1apnu_gg_.__selected_1apnu_gg_ {\n border-color: #008ff8;\n background-color: rgba(0, 143, 248, 0.2);\n color: #191b23\n}\n\n.___SFilterTrigger_1apnu_gg_.__selected_1apnu_gg_.__active_1apnu_gg_,\n .___SFilterTrigger_1apnu_gg_.__selected_1apnu_gg_:hover {\n background: rgba(0, 143, 248, 0.3);\n }\n\n.___SWrapper_1apnu_gg_ {\n display: inline-flex\n}\n\n.___SWrapper_1apnu_gg_:focus {\n outline: none;\n }\n\n.___SWrapper_1apnu_gg_.__keyboardFocused_1apnu_gg_ {\n box-shadow: 0 0 0 3px rgba(0, 143, 248, 0.2);\n}\n\n.___SCounter_1apnu_gg_ {\n background-color: #008ff8;\n}\n"
|
|
64
64
|
/*__inner_css_end__*/
|
|
65
|
-
, "
|
|
65
|
+
, "1apnu_gg_")
|
|
66
66
|
/*__reshadow_css_end__*/
|
|
67
67
|
, {
|
|
68
|
-
"__SButtonTrigger": "
|
|
69
|
-
"_active": "
|
|
70
|
-
"_size_m": "
|
|
71
|
-
"_size_l": "
|
|
72
|
-
"__SText": "
|
|
73
|
-
"_placeholder": "
|
|
74
|
-
"_state_normal": "
|
|
75
|
-
"_state_valid": "
|
|
76
|
-
"_state_invalid": "
|
|
77
|
-
"__SFilterTrigger": "
|
|
78
|
-
"_selected": "
|
|
79
|
-
"__SWrapper": "
|
|
80
|
-
"_keyboardFocused": "
|
|
81
|
-
"__SCounter": "
|
|
68
|
+
"__SButtonTrigger": "___SButtonTrigger_1apnu_gg_",
|
|
69
|
+
"_active": "__active_1apnu_gg_",
|
|
70
|
+
"_size_m": "_size_m_1apnu_gg_",
|
|
71
|
+
"_size_l": "_size_l_1apnu_gg_",
|
|
72
|
+
"__SText": "___SText_1apnu_gg_",
|
|
73
|
+
"_placeholder": "__placeholder_1apnu_gg_",
|
|
74
|
+
"_state_normal": "_state_normal_1apnu_gg_",
|
|
75
|
+
"_state_valid": "_state_valid_1apnu_gg_",
|
|
76
|
+
"_state_invalid": "_state_invalid_1apnu_gg_",
|
|
77
|
+
"__SFilterTrigger": "___SFilterTrigger_1apnu_gg_",
|
|
78
|
+
"_selected": "__selected_1apnu_gg_",
|
|
79
|
+
"__SWrapper": "___SWrapper_1apnu_gg_",
|
|
80
|
+
"_keyboardFocused": "__keyboardFocused_1apnu_gg_",
|
|
81
|
+
"__SCounter": "___SCounter_1apnu_gg_"
|
|
82
82
|
});
|
|
83
83
|
|
|
84
84
|
var RootFilterTrigger = /*#__PURE__*/function (_Component) {
|
package/lib/cjs/LinkTrigger.js
CHANGED
|
@@ -54,23 +54,23 @@ var style = (
|
|
|
54
54
|
/*__reshadow_css_start__*/
|
|
55
55
|
_core.sstyled.insert(
|
|
56
56
|
/*__inner_css_start__*/
|
|
57
|
-
".
|
|
57
|
+
":root {\n\n /* DEPRECATED START\n Deprecated variables should never be used in\n components styles but preserved for backward\n compatibility if they used in projects\n like `<Badge bg=\"red\">alpha</Badge>`\n */\n /* DEPRECATED END */\n}\n\n.___SLinkTrigger_1mp9e_gg_ {\n display: inline-flex;\n align-items: center;\n line-height: normal;\n position: relative;\n touch-action: manipulation;\n white-space: nowrap;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n box-sizing: border-box;\n padding: 0;\n margin: 0;\n outline: none;\n text-decoration: none;\n -webkit-tap-highlight-color: transparent;\n overflow: visible;\n outline: 0;\n vertical-align: middle;\n font-family: Inter, sans-serif;\n cursor: pointer;\n color: #006dca;\n background: none;\n transition: color 0.15s ease-in-out\n}\n\n.___SLinkTrigger_1mp9e_gg_.__active_1mp9e_gg_,\n .___SLinkTrigger_1mp9e_gg_:hover,\n .___SLinkTrigger_1mp9e_gg_:active {\n color: #044792\n }\n\n.___SLinkTrigger_1mp9e_gg_.__active_1mp9e_gg_ .___SText_1mp9e_gg_, .___SLinkTrigger_1mp9e_gg_:hover .___SText_1mp9e_gg_, .___SLinkTrigger_1mp9e_gg_:active .___SText_1mp9e_gg_ {\n border-color: currentColor;\n }\n\n.___SLinkTrigger_1mp9e_gg_ .___SText_1mp9e_gg_ {\n border-bottom-width: 1px;\n border-bottom-style: solid;\n border-color: transparent;\n transition: border-bottom-color 0.15s ease-in-out;\n line-height: 1.42;\n }\n\n.___SLinkTrigger_1mp9e_gg_.__color_1mp9e_gg_ {\n color: var(--color_1mp9e)\n}\n\n.___SLinkTrigger_1mp9e_gg_.__color_1mp9e_gg_:hover {\n color: var(--color-hover_1mp9e);\n }\n\n.___SLinkTrigger_1mp9e_gg_.__disabled_1mp9e_gg_ {\n opacity: 0.3;\n cursor: default;\n pointer-events: none;\n}\n\n.___SLinkTrigger_1mp9e_gg_.__keyboardFocused_1mp9e_gg_ {\n box-shadow: 0 0 0 3px rgba(0, 143, 248, 0.2);\n z-index: 1;\n}\n\n.___SAddon_1mp9e_gg_,\n.___SLinkAddon_1mp9e_gg_ {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0\n}\n\n.___SAddon_1mp9e_gg_:not(:only-child):first-child, .___SLinkAddon_1mp9e_gg_:not(:only-child):first-child {\n margin-right: 4px;\n }\n\n.___SAddon_1mp9e_gg_:not(:only-child):last-child, .___SLinkAddon_1mp9e_gg_:not(:only-child):last-child {\n margin-left: 4px;\n }\n\n.___SLinkAddon_1mp9e_gg_ {\n width: 16px;\n height: 16px;\n}\n\n.___SLinkTrigger_1mp9e_gg_._size_m_1mp9e_gg_ {\n font-size: 14px;\n}\n\n.___SLinkTrigger_1mp9e_gg_._size_l_1mp9e_gg_ {\n font-size: 16px;\n}\n\n@media (prefers-reduced-motion) {\n .___SLinkTrigger_1mp9e_gg_ {\n transition: none\n }\n .___SLinkTrigger_1mp9e_gg_ .___SText_1mp9e_gg_ {\n transition: none;\n }\n}\n"
|
|
58
58
|
/*__inner_css_end__*/
|
|
59
|
-
, "
|
|
59
|
+
, "1mp9e_gg_")
|
|
60
60
|
/*__reshadow_css_end__*/
|
|
61
61
|
, {
|
|
62
|
-
"__SLinkTrigger": "
|
|
63
|
-
"_active": "
|
|
64
|
-
"__SText": "
|
|
65
|
-
"_color": "
|
|
66
|
-
"--color": "--
|
|
67
|
-
"--color-hover": "--color-
|
|
68
|
-
"_disabled": "
|
|
69
|
-
"_keyboardFocused": "
|
|
70
|
-
"__SAddon": "
|
|
71
|
-
"__SLinkAddon": "
|
|
72
|
-
"_size_m": "
|
|
73
|
-
"_size_l": "
|
|
62
|
+
"__SLinkTrigger": "___SLinkTrigger_1mp9e_gg_",
|
|
63
|
+
"_active": "__active_1mp9e_gg_",
|
|
64
|
+
"__SText": "___SText_1mp9e_gg_",
|
|
65
|
+
"_color": "__color_1mp9e_gg_",
|
|
66
|
+
"--color": "--color_1mp9e",
|
|
67
|
+
"--color-hover": "--color-hover_1mp9e",
|
|
68
|
+
"_disabled": "__disabled_1mp9e_gg_",
|
|
69
|
+
"_keyboardFocused": "__keyboardFocused_1mp9e_gg_",
|
|
70
|
+
"__SAddon": "___SAddon_1mp9e_gg_",
|
|
71
|
+
"__SLinkAddon": "___SLinkAddon_1mp9e_gg_",
|
|
72
|
+
"_size_m": "_size_m_1mp9e_gg_",
|
|
73
|
+
"_size_l": "_size_l_1mp9e_gg_"
|
|
74
74
|
});
|
|
75
75
|
|
|
76
76
|
var RootLinkTrigger = /*#__PURE__*/function (_Component) {
|
package/lib/es6/BaseTrigger.js
CHANGED
|
@@ -20,7 +20,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
20
20
|
import React from 'react';
|
|
21
21
|
import createComponent, { Component, Root, sstyled } from '@semcore/core';
|
|
22
22
|
import { Box } from '@semcore/flex-box';
|
|
23
|
-
import
|
|
23
|
+
import NeighborLocation from '@semcore/neighbor-location';
|
|
24
24
|
import keyboardFocusEnhance from '@semcore/utils/lib/enhances/keyboardFocusEnhance';
|
|
25
25
|
import addonTextChildren from '@semcore/utils/lib/addonTextChildren';
|
|
26
26
|
import logger from '@semcore/utils/lib/logger';
|
|
@@ -30,28 +30,28 @@ var style = (
|
|
|
30
30
|
/*__reshadow_css_start__*/
|
|
31
31
|
_sstyled.insert(
|
|
32
32
|
/*__inner_css_start__*/
|
|
33
|
-
".
|
|
33
|
+
":root {\n\n /* DEPRECATED START\n Deprecated variables should never be used in\n components styles but preserved for backward\n compatibility if they used in projects\n like `<Badge bg=\"red\">alpha</Badge>`\n */\n /* DEPRECATED END */\n}\n\n.___SBaseTrigger_xbf7i_gg_ {\n display: inline-block;\n align-items: center;\n justify-content: center;\n line-height: normal;\n position: relative;\n touch-action: manipulation;\n white-space: nowrap;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n box-sizing: border-box;\n padding: 0;\n margin: 0;\n box-shadow: none;\n outline: none;\n text-decoration: none;\n -webkit-tap-highlight-color: transparent;\n overflow: visible;\n outline: 0;\n text-align: center;\n vertical-align: middle;\n font-family: Inter, sans-serif;\n cursor: pointer;\n\n background: #ffffff;\n\n font-weight: 400;\n border: 1px solid #c4c7cf;\n color: #191b23\n}\n\n.___SBaseTrigger_xbf7i_gg_::-moz-focus-inner {\n border: none;\n padding: 0;\n }\n\n.___SBaseTrigger_xbf7i_gg_:active,\n .___SBaseTrigger_xbf7i_gg_:hover,\n .___SBaseTrigger_xbf7i_gg_:focus {\n outline: 0;\n text-decoration: none;\n }\n\n.___SBaseTrigger_xbf7i_gg_.__keyboardFocused_xbf7i_gg_ {\n border: 1px solid #008ff8;\n box-shadow: 0 0 0 3px rgba(0, 143, 248, 0.2);\n }\n\n.___SBaseTrigger_xbf7i_gg_:hover {\n background-color: rgba(138, 142, 155, 0.2);\n }\n\n.___SBaseTrigger_xbf7i_gg_:active,\n .___SBaseTrigger_xbf7i_gg_.__active_xbf7i_gg_ {\n background-color: rgba(138, 142, 155, 0.3);\n }\n\n.___SBaseTrigger_xbf7i_gg_.__disabled_xbf7i_gg_ {\n opacity: 0.3;\n cursor: default;\n pointer-events: none; /* Disable link interactions */\n}\n\n.___SBaseTrigger_xbf7i_gg_.__keyboardFocused_xbf7i_gg_ {\n z-index: 1;\n}\n\n.___SInner_xbf7i_gg_ {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n}\n\n.___SText_xbf7i_gg_ {\n display: inline;\n padding: 1px 0;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n line-height: 1.42;\n flex-grow: 1;\n text-align: left;\n}\n\n.___SAddon_xbf7i_gg_ {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.___SBaseAddon_xbf7i_gg_ {\n width: 12px;\n height: 12px;\n}\n\n.___SBaseTrigger_xbf7i_gg_._size_m_xbf7i_gg_ {\n min-width: 26px;\n height: 28px;\n border-radius: 6px;\n padding: 0 8px;\n font-size: 14px\n}\n\n.___SBaseTrigger_xbf7i_gg_._size_m_xbf7i_gg_ .___SAddon_xbf7i_gg_:not(:only-child):first-child {\n margin-right: 8px;\n }\n\n.___SBaseTrigger_xbf7i_gg_._size_m_xbf7i_gg_ .___SAddon_xbf7i_gg_:not(:only-child):last-child {\n margin-left: 8px;\n }\n\n.___SBaseTrigger_xbf7i_gg_._size_m_xbf7i_gg_ .___SAddon_xbf7i_gg_:only-child {\n margin-left: -4px;\n margin-right: -4px;\n }\n\n.___SBaseTrigger_xbf7i_gg_._size_l_xbf7i_gg_ {\n min-width: 32px;\n height: 40px;\n border-radius: 6px;\n padding: 0 12px;\n font-size: 16px\n}\n\n.___SBaseTrigger_xbf7i_gg_._size_l_xbf7i_gg_ .___SAddon_xbf7i_gg_:not(:only-child):first-child {\n margin-right: 8px;\n }\n\n.___SBaseTrigger_xbf7i_gg_._size_l_xbf7i_gg_ .___SAddon_xbf7i_gg_:not(:only-child):last-child {\n margin-left: 8px;\n }\n\n.___SBaseTrigger_xbf7i_gg_._size_l_xbf7i_gg_ .___SAddon_xbf7i_gg_:only-child {\n margin-left: -4px;\n margin-right: -4px;\n }\n\n.___SBaseTrigger_xbf7i_gg_._neighborLocation_right_xbf7i_gg_ {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.___SBaseTrigger_xbf7i_gg_._neighborLocation_both_xbf7i_gg_ {\n border-radius: 0;\n margin-left: -1px;\n}\n\n.___SBaseTrigger_xbf7i_gg_._neighborLocation_left_xbf7i_gg_ {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n margin-left: -1px;\n}\n\n.___SText_xbf7i_gg_.__placeholder_xbf7i_gg_ {\n color: #a9abb6;\n}\n\n.___SBaseTrigger_xbf7i_gg_._state_normal_xbf7i_gg_ {\n border-color: #c4c7cf;\n}\n\n.___SBaseTrigger_xbf7i_gg_._state_valid_xbf7i_gg_ {\n border-color: #59ddaa;\n}\n\n.___SBaseTrigger_xbf7i_gg_._state_invalid_xbf7i_gg_ {\n border-color: #ffaeb5\n}\n\n.___SBaseTrigger_xbf7i_gg_._state_invalid_xbf7i_gg_.__keyboardFocused_xbf7i_gg_ {\n border-color: #ff642d;\n box-shadow: 0 0 0 3px rgba(255, 100, 45, 0.3);\n }\n"
|
|
34
34
|
/*__inner_css_end__*/
|
|
35
|
-
, "
|
|
35
|
+
, "xbf7i_gg_")
|
|
36
36
|
/*__reshadow_css_end__*/
|
|
37
37
|
, {
|
|
38
|
-
"__SBaseTrigger": "
|
|
39
|
-
"_keyboardFocused": "
|
|
40
|
-
"_active": "
|
|
41
|
-
"_disabled": "
|
|
42
|
-
"__SInner": "
|
|
43
|
-
"__SText": "
|
|
44
|
-
"__SAddon": "
|
|
45
|
-
"__SBaseAddon": "
|
|
46
|
-
"_size_m": "
|
|
47
|
-
"_size_l": "
|
|
48
|
-
"_neighborLocation_right": "
|
|
49
|
-
"_neighborLocation_both": "
|
|
50
|
-
"_neighborLocation_left": "
|
|
51
|
-
"_placeholder": "
|
|
52
|
-
"_state_normal": "
|
|
53
|
-
"_state_valid": "
|
|
54
|
-
"_state_invalid": "
|
|
38
|
+
"__SBaseTrigger": "___SBaseTrigger_xbf7i_gg_",
|
|
39
|
+
"_keyboardFocused": "__keyboardFocused_xbf7i_gg_",
|
|
40
|
+
"_active": "__active_xbf7i_gg_",
|
|
41
|
+
"_disabled": "__disabled_xbf7i_gg_",
|
|
42
|
+
"__SInner": "___SInner_xbf7i_gg_",
|
|
43
|
+
"__SText": "___SText_xbf7i_gg_",
|
|
44
|
+
"__SAddon": "___SAddon_xbf7i_gg_",
|
|
45
|
+
"__SBaseAddon": "___SBaseAddon_xbf7i_gg_",
|
|
46
|
+
"_size_m": "_size_m_xbf7i_gg_",
|
|
47
|
+
"_size_l": "_size_l_xbf7i_gg_",
|
|
48
|
+
"_neighborLocation_right": "_neighborLocation_right_xbf7i_gg_",
|
|
49
|
+
"_neighborLocation_both": "_neighborLocation_both_xbf7i_gg_",
|
|
50
|
+
"_neighborLocation_left": "_neighborLocation_left_xbf7i_gg_",
|
|
51
|
+
"_placeholder": "__placeholder_xbf7i_gg_",
|
|
52
|
+
"_state_normal": "_state_normal_xbf7i_gg_",
|
|
53
|
+
"_state_valid": "_state_valid_xbf7i_gg_",
|
|
54
|
+
"_state_invalid": "_state_invalid_xbf7i_gg_"
|
|
55
55
|
});
|
|
56
56
|
|
|
57
57
|
var RootBaseTrigger = /*#__PURE__*/function (_Component) {
|
|
@@ -79,20 +79,26 @@ var RootBaseTrigger = /*#__PURE__*/function (_Component) {
|
|
|
79
79
|
}, {
|
|
80
80
|
key: "render",
|
|
81
81
|
value: function render() {
|
|
82
|
-
var _ref = this.asProps
|
|
83
|
-
_ref4;
|
|
84
|
-
|
|
82
|
+
var _ref = this.asProps;
|
|
85
83
|
var SBaseTrigger = Box;
|
|
86
84
|
var SInner = 'div';
|
|
87
85
|
var _this$asProps2 = this.asProps,
|
|
88
86
|
Children = _this$asProps2.Children,
|
|
89
87
|
styles = _this$asProps2.styles,
|
|
90
|
-
theme = _this$asProps2.theme
|
|
88
|
+
theme = _this$asProps2.theme,
|
|
89
|
+
neighborLocation = _this$asProps2.neighborLocation;
|
|
91
90
|
logger.warn(theme !== undefined, "The 'theme' property is deprecated, use 'state'", this.asProps['data-ui-name'] || BaseTrigger.displayName); // TODO: add aria
|
|
92
91
|
|
|
93
|
-
return
|
|
94
|
-
|
|
95
|
-
},
|
|
92
|
+
return /*#__PURE__*/React.createElement(NeighborLocation.Detect, {
|
|
93
|
+
neighborLocation: neighborLocation
|
|
94
|
+
}, function (neighborLocation) {
|
|
95
|
+
var _ref4;
|
|
96
|
+
|
|
97
|
+
return _ref4 = sstyled(styles), /*#__PURE__*/React.createElement(SBaseTrigger, _ref4.cn("SBaseTrigger", _objectSpread({}, _assignProps({
|
|
98
|
+
"neighborLocation": neighborLocation,
|
|
99
|
+
"state": theme
|
|
100
|
+
}, _ref))), /*#__PURE__*/React.createElement(SInner, _ref4.cn("SInner", {}), addonTextChildren(Children, BaseTrigger.Text, BaseTrigger.Addon)));
|
|
101
|
+
});
|
|
96
102
|
}
|
|
97
103
|
}]);
|
|
98
104
|
|
|
@@ -101,14 +107,14 @@ var RootBaseTrigger = /*#__PURE__*/function (_Component) {
|
|
|
101
107
|
|
|
102
108
|
_defineProperty(RootBaseTrigger, "displayName", 'BaseTrigger');
|
|
103
109
|
|
|
110
|
+
_defineProperty(RootBaseTrigger, "enhance", [keyboardFocusEnhance()]);
|
|
111
|
+
|
|
104
112
|
_defineProperty(RootBaseTrigger, "style", style);
|
|
105
113
|
|
|
106
114
|
_defineProperty(RootBaseTrigger, "defaultProps", {
|
|
107
115
|
size: 'm'
|
|
108
116
|
});
|
|
109
117
|
|
|
110
|
-
_defineProperty(RootBaseTrigger, "enhance", [keyboardFocusEnhance(), neighborLocationEnhance()]);
|
|
111
|
-
|
|
112
118
|
function Text(props) {
|
|
113
119
|
var _ref2 = arguments[0],
|
|
114
120
|
_ref5;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseTrigger.js","names":["React","createComponent","Component","Root","sstyled","Box","
|
|
1
|
+
{"version":3,"file":"BaseTrigger.js","names":["React","createComponent","Component","Root","sstyled","Box","NeighborLocation","keyboardFocusEnhance","addonTextChildren","logger","RootBaseTrigger","asProps","placeholder","empty","SBaseTrigger","SInner","Children","styles","theme","neighborLocation","warn","undefined","BaseTrigger","displayName","Text","Addon","style","size","props","SText","children","SAddon"],"sources":["../../src/BaseTrigger.jsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { Component, Root, sstyled } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport NeighborLocation from '@semcore/neighbor-location';\nimport keyboardFocusEnhance from '@semcore/utils/lib/enhances/keyboardFocusEnhance';\nimport addonTextChildren from '@semcore/utils/lib/addonTextChildren';\nimport logger from '@semcore/utils/lib/logger';\n\nimport style from './style/base-trigger.shadow.css';\n\nclass RootBaseTrigger extends Component {\n static displayName = 'BaseTrigger';\n static enhance = [keyboardFocusEnhance()];\n static style = style;\n static defaultProps = {\n size: 'm',\n };\n\n getTextProps() {\n const { placeholder, empty } = this.asProps;\n return {\n placeholder,\n empty,\n };\n }\n\n render() {\n const SBaseTrigger = Root;\n const SInner = 'div';\n const { Children, styles, theme, neighborLocation } = this.asProps;\n\n logger.warn(\n theme !== undefined,\n \"The 'theme' property is deprecated, use 'state'\",\n this.asProps['data-ui-name'] || BaseTrigger.displayName,\n );\n\n // TODO: add aria\n return (\n <NeighborLocation.Detect neighborLocation={neighborLocation}>\n {(neighborLocation) =>\n sstyled(styles)(\n <SBaseTrigger render={Box} neighborLocation={neighborLocation} state={theme}>\n <SInner>{addonTextChildren(Children, BaseTrigger.Text, BaseTrigger.Addon)}</SInner>\n </SBaseTrigger>,\n )\n }\n </NeighborLocation.Detect>\n );\n }\n}\n\nfunction Text(props) {\n const SText = Root;\n const { children, styles, empty, placeholder } = props;\n\n return sstyled(styles)(\n /* \"use:\" prefix was used for backward compatibility (by lsroman) */\n <SText render={Box} use:placeholder={empty}>\n {empty ? placeholder : children}\n </SText>,\n );\n}\n\nfunction Addon(props) {\n const SAddon = Root;\n return sstyled(props.styles)(<SAddon render={Box} />);\n}\n\nconst BaseTrigger = createComponent(RootBaseTrigger, {\n Text,\n Addon,\n});\n\nexport default BaseTrigger;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,eAAP,IAA0BC,SAA1B,EAAqCC,IAArC,EAA2CC,OAA3C,QAA0D,eAA1D;AACA,SAASC,GAAT,QAAoB,mBAApB;AACA,OAAOC,gBAAP,MAA6B,4BAA7B;AACA,OAAOC,oBAAP,MAAiC,kDAAjC;AACA,OAAOC,iBAAP,MAA8B,sCAA9B;AACA,OAAOC,MAAP,MAAmB,2BAAnB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIMC,e;;;;;;;;;;;;;WAQJ,wBAAe;MACb,oBAA+B,KAAKC,OAApC;MAAA,IAAQC,WAAR,iBAAQA,WAAR;MAAA,IAAqBC,KAArB,iBAAqBA,KAArB;MACA,OAAO;QACLD,WAAW,EAAXA,WADK;QAELC,KAAK,EAALA;MAFK,CAAP;IAID;;;WAED,kBAAS;MAAA;MACP,IAAMC,YAAY,GAeYT,GAf9B;MACA,IAAMU,MAAM,GAAG,KAAf;MACA,qBAAsD,KAAKJ,OAA3D;MAAA,IAAQK,QAAR,kBAAQA,QAAR;MAAA,IAAkBC,MAAlB,kBAAkBA,MAAlB;MAAA,IAA0BC,KAA1B,kBAA0BA,KAA1B;MAAA,IAAiCC,gBAAjC,kBAAiCA,gBAAjC;MAEAV,MAAM,CAACW,IAAP,CACEF,KAAK,KAAKG,SADZ,EAEE,iDAFF,EAGE,KAAKV,OAAL,CAAa,cAAb,KAAgCW,WAAW,CAACC,WAH9C,EALO,CAWP;;MACA,oBACE,oBAAC,gBAAD,CAAkB,MAAlB;QAAyB,gBAAgB,EAAEJ;MAA3C,GACG,UAACA,gBAAD;QAAA;;QAAA,eACCf,OAAO,CAACa,MAAD,CADR,eAEG,oBAAC,YAAD;UAAA,oBAA6CE,gBAA7C;UAAA,SAAsED;QAAtE,yBACE,oBAAC,MAAD,0BAASV,iBAAiB,CAACQ,QAAD,EAAWM,WAAW,CAACE,IAAvB,EAA6BF,WAAW,CAACG,KAAzC,CAA1B,CADF,CAFH;MAAA,CADH,CADF;IAWD;;;;EAvC2BvB,S;;gBAAxBQ,e,iBACiB,a;;gBADjBA,e,aAEa,CAACH,oBAAoB,EAArB,C;;gBAFbG,e,WAGWgB,K;;gBAHXhB,e,kBAIkB;EACpBiB,IAAI,EAAE;AADc,C;;AAsCxB,SAASH,IAAT,CAAcI,KAAd,EAAqB;EAAA;EAAA;;EACnB,IAAMC,KAAK,GAKMxB,GALjB;EACA,IAAQyB,QAAR,GAAiDF,KAAjD,CAAQE,QAAR;EAAA,IAAkBb,MAAlB,GAAiDW,KAAjD,CAAkBX,MAAlB;EAAA,IAA0BJ,KAA1B,GAAiDe,KAAjD,CAA0Bf,KAA1B;EAAA,IAAiCD,WAAjC,GAAiDgB,KAAjD,CAAiChB,WAAjC;EAEA,eAAOR,OAAO,CAACa,MAAD,CAAd;EAAA;;EACE;EACA,oBAAC,KAAD;IAAA,mBAAqCJ;EAArC,aACGA,KAAK,GAAGD,WAAH,GAAiBkB,QADzB,CAFF;AAMD;;AAED,SAASL,KAAT,CAAeG,KAAf,EAAsB;EAAA;EAAA;;EACpB,IAAMG,MAAM,GACiC1B,GAD7C;EACA,eAAOD,OAAO,CAACwB,KAAK,CAACX,MAAP,CAAd,eAA6B,oBAAC,MAAD,kEAA7B;AACD;;AAED,IAAMK,WAAW,GAAGrB,eAAe,CAACS,eAAD,EAAkB;EACnDc,IAAI,EAAJA,IADmD;EAEnDC,KAAK,EAALA;AAFmD,CAAlB,CAAnC;AAKA,eAAeH,WAAf"}
|
package/lib/es6/ButtonTrigger.js
CHANGED
|
@@ -23,13 +23,13 @@ var style = (
|
|
|
23
23
|
/*__reshadow_css_start__*/
|
|
24
24
|
_sstyled.insert(
|
|
25
25
|
/*__inner_css_start__*/
|
|
26
|
-
".
|
|
26
|
+
":root {\n\n /* DEPRECATED START\n Deprecated variables should never be used in\n components styles but preserved for backward\n compatibility if they used in projects\n like `<Badge bg=\"red\">alpha</Badge>`\n */\n /* DEPRECATED END */\n}\n\n.___SButtonAddon_14eh9_gg_ {\n width: 12px;\n height: 12px;\n}\n\n.___SButtonTriggerSpin_14eh9_gg_ {\n fill: #6c6e79;\n}\n"
|
|
27
27
|
/*__inner_css_end__*/
|
|
28
|
-
, "
|
|
28
|
+
, "14eh9_gg_")
|
|
29
29
|
/*__reshadow_css_end__*/
|
|
30
30
|
, {
|
|
31
|
-
"__SButtonAddon": "
|
|
32
|
-
"__SButtonTriggerSpin": "
|
|
31
|
+
"__SButtonAddon": "___SButtonAddon_14eh9_gg_",
|
|
32
|
+
"__SButtonTriggerSpin": "___SButtonTriggerSpin_14eh9_gg_"
|
|
33
33
|
});
|
|
34
34
|
|
|
35
35
|
var RootButtonTrigger = /*#__PURE__*/function (_Component) {
|
package/lib/es6/FilterTrigger.js
CHANGED
|
@@ -33,25 +33,25 @@ var style = (
|
|
|
33
33
|
/*__reshadow_css_start__*/
|
|
34
34
|
_sstyled.insert(
|
|
35
35
|
/*__inner_css_start__*/
|
|
36
|
-
".
|
|
36
|
+
":root {\n\n /* DEPRECATED START\n Deprecated variables should never be used in\n components styles but preserved for backward\n compatibility if they used in projects\n like `<Badge bg=\"red\">alpha</Badge>`\n */\n /* DEPRECATED END */\n}\n\n.___SButtonTrigger_1apnu_gg_ {\n border: 1px solid #c4c7cf;\n background: #ffffff;\n color: #191b23\n}\n\n.___SButtonTrigger_1apnu_gg_::-moz-focus-inner {\n border: none;\n padding: 0;\n }\n\n.___SButtonTrigger_1apnu_gg_:active,\n .___SButtonTrigger_1apnu_gg_:hover,\n .___SButtonTrigger_1apnu_gg_:focus {\n outline: 0;\n text-decoration: none;\n }\n\n.___SButtonTrigger_1apnu_gg_:active,\n .___SButtonTrigger_1apnu_gg_:hover,\n .___SButtonTrigger_1apnu_gg_.__active_1apnu_gg_ {\n background-color: rgba(138, 142, 155, 0.2);\n }\n\n.___SButtonTrigger_1apnu_gg_._size_m_1apnu_gg_ {\n min-width: 26px;\n height: 28px;\n border-radius: 6px;\n font-size: 14px;\n}\n\n.___SButtonTrigger_1apnu_gg_._size_l_1apnu_gg_ {\n min-width: 32px;\n height: 40px;\n border-radius: 6px;\n font-size: 16px;\n}\n\n.___SText_1apnu_gg_.__placeholder_1apnu_gg_ {\n color: #a9abb6;\n}\n\n.___SButtonTrigger_1apnu_gg_._state_normal_1apnu_gg_ {\n border-color: #c4c7cf;\n}\n\n.___SButtonTrigger_1apnu_gg_._state_valid_1apnu_gg_ {\n border-color: #59ddaa;\n}\n\n.___SButtonTrigger_1apnu_gg_._state_invalid_1apnu_gg_ {\n border-color: #ffaeb5;\n}\n\n.___SFilterTrigger_1apnu_gg_.__selected_1apnu_gg_ {\n border-color: #008ff8;\n background-color: rgba(0, 143, 248, 0.2);\n color: #191b23\n}\n\n.___SFilterTrigger_1apnu_gg_.__selected_1apnu_gg_.__active_1apnu_gg_,\n .___SFilterTrigger_1apnu_gg_.__selected_1apnu_gg_:hover {\n background: rgba(0, 143, 248, 0.3);\n }\n\n.___SWrapper_1apnu_gg_ {\n display: inline-flex\n}\n\n.___SWrapper_1apnu_gg_:focus {\n outline: none;\n }\n\n.___SWrapper_1apnu_gg_.__keyboardFocused_1apnu_gg_ {\n box-shadow: 0 0 0 3px rgba(0, 143, 248, 0.2);\n}\n\n.___SCounter_1apnu_gg_ {\n background-color: #008ff8;\n}\n"
|
|
37
37
|
/*__inner_css_end__*/
|
|
38
|
-
, "
|
|
38
|
+
, "1apnu_gg_")
|
|
39
39
|
/*__reshadow_css_end__*/
|
|
40
40
|
, {
|
|
41
|
-
"__SButtonTrigger": "
|
|
42
|
-
"_active": "
|
|
43
|
-
"_size_m": "
|
|
44
|
-
"_size_l": "
|
|
45
|
-
"__SText": "
|
|
46
|
-
"_placeholder": "
|
|
47
|
-
"_state_normal": "
|
|
48
|
-
"_state_valid": "
|
|
49
|
-
"_state_invalid": "
|
|
50
|
-
"__SFilterTrigger": "
|
|
51
|
-
"_selected": "
|
|
52
|
-
"__SWrapper": "
|
|
53
|
-
"_keyboardFocused": "
|
|
54
|
-
"__SCounter": "
|
|
41
|
+
"__SButtonTrigger": "___SButtonTrigger_1apnu_gg_",
|
|
42
|
+
"_active": "__active_1apnu_gg_",
|
|
43
|
+
"_size_m": "_size_m_1apnu_gg_",
|
|
44
|
+
"_size_l": "_size_l_1apnu_gg_",
|
|
45
|
+
"__SText": "___SText_1apnu_gg_",
|
|
46
|
+
"_placeholder": "__placeholder_1apnu_gg_",
|
|
47
|
+
"_state_normal": "_state_normal_1apnu_gg_",
|
|
48
|
+
"_state_valid": "_state_valid_1apnu_gg_",
|
|
49
|
+
"_state_invalid": "_state_invalid_1apnu_gg_",
|
|
50
|
+
"__SFilterTrigger": "___SFilterTrigger_1apnu_gg_",
|
|
51
|
+
"_selected": "__selected_1apnu_gg_",
|
|
52
|
+
"__SWrapper": "___SWrapper_1apnu_gg_",
|
|
53
|
+
"_keyboardFocused": "__keyboardFocused_1apnu_gg_",
|
|
54
|
+
"__SCounter": "___SCounter_1apnu_gg_"
|
|
55
55
|
});
|
|
56
56
|
|
|
57
57
|
var RootFilterTrigger = /*#__PURE__*/function (_Component) {
|
package/lib/es6/LinkTrigger.js
CHANGED
|
@@ -31,23 +31,23 @@ var style = (
|
|
|
31
31
|
/*__reshadow_css_start__*/
|
|
32
32
|
_sstyled.insert(
|
|
33
33
|
/*__inner_css_start__*/
|
|
34
|
-
".
|
|
34
|
+
":root {\n\n /* DEPRECATED START\n Deprecated variables should never be used in\n components styles but preserved for backward\n compatibility if they used in projects\n like `<Badge bg=\"red\">alpha</Badge>`\n */\n /* DEPRECATED END */\n}\n\n.___SLinkTrigger_1mp9e_gg_ {\n display: inline-flex;\n align-items: center;\n line-height: normal;\n position: relative;\n touch-action: manipulation;\n white-space: nowrap;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n box-sizing: border-box;\n padding: 0;\n margin: 0;\n outline: none;\n text-decoration: none;\n -webkit-tap-highlight-color: transparent;\n overflow: visible;\n outline: 0;\n vertical-align: middle;\n font-family: Inter, sans-serif;\n cursor: pointer;\n color: #006dca;\n background: none;\n transition: color 0.15s ease-in-out\n}\n\n.___SLinkTrigger_1mp9e_gg_.__active_1mp9e_gg_,\n .___SLinkTrigger_1mp9e_gg_:hover,\n .___SLinkTrigger_1mp9e_gg_:active {\n color: #044792\n }\n\n.___SLinkTrigger_1mp9e_gg_.__active_1mp9e_gg_ .___SText_1mp9e_gg_, .___SLinkTrigger_1mp9e_gg_:hover .___SText_1mp9e_gg_, .___SLinkTrigger_1mp9e_gg_:active .___SText_1mp9e_gg_ {\n border-color: currentColor;\n }\n\n.___SLinkTrigger_1mp9e_gg_ .___SText_1mp9e_gg_ {\n border-bottom-width: 1px;\n border-bottom-style: solid;\n border-color: transparent;\n transition: border-bottom-color 0.15s ease-in-out;\n line-height: 1.42;\n }\n\n.___SLinkTrigger_1mp9e_gg_.__color_1mp9e_gg_ {\n color: var(--color_1mp9e)\n}\n\n.___SLinkTrigger_1mp9e_gg_.__color_1mp9e_gg_:hover {\n color: var(--color-hover_1mp9e);\n }\n\n.___SLinkTrigger_1mp9e_gg_.__disabled_1mp9e_gg_ {\n opacity: 0.3;\n cursor: default;\n pointer-events: none;\n}\n\n.___SLinkTrigger_1mp9e_gg_.__keyboardFocused_1mp9e_gg_ {\n box-shadow: 0 0 0 3px rgba(0, 143, 248, 0.2);\n z-index: 1;\n}\n\n.___SAddon_1mp9e_gg_,\n.___SLinkAddon_1mp9e_gg_ {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0\n}\n\n.___SAddon_1mp9e_gg_:not(:only-child):first-child, .___SLinkAddon_1mp9e_gg_:not(:only-child):first-child {\n margin-right: 4px;\n }\n\n.___SAddon_1mp9e_gg_:not(:only-child):last-child, .___SLinkAddon_1mp9e_gg_:not(:only-child):last-child {\n margin-left: 4px;\n }\n\n.___SLinkAddon_1mp9e_gg_ {\n width: 16px;\n height: 16px;\n}\n\n.___SLinkTrigger_1mp9e_gg_._size_m_1mp9e_gg_ {\n font-size: 14px;\n}\n\n.___SLinkTrigger_1mp9e_gg_._size_l_1mp9e_gg_ {\n font-size: 16px;\n}\n\n@media (prefers-reduced-motion) {\n .___SLinkTrigger_1mp9e_gg_ {\n transition: none\n }\n .___SLinkTrigger_1mp9e_gg_ .___SText_1mp9e_gg_ {\n transition: none;\n }\n}\n"
|
|
35
35
|
/*__inner_css_end__*/
|
|
36
|
-
, "
|
|
36
|
+
, "1mp9e_gg_")
|
|
37
37
|
/*__reshadow_css_end__*/
|
|
38
38
|
, {
|
|
39
|
-
"__SLinkTrigger": "
|
|
40
|
-
"_active": "
|
|
41
|
-
"__SText": "
|
|
42
|
-
"_color": "
|
|
43
|
-
"--color": "--
|
|
44
|
-
"--color-hover": "--color-
|
|
45
|
-
"_disabled": "
|
|
46
|
-
"_keyboardFocused": "
|
|
47
|
-
"__SAddon": "
|
|
48
|
-
"__SLinkAddon": "
|
|
49
|
-
"_size_m": "
|
|
50
|
-
"_size_l": "
|
|
39
|
+
"__SLinkTrigger": "___SLinkTrigger_1mp9e_gg_",
|
|
40
|
+
"_active": "__active_1mp9e_gg_",
|
|
41
|
+
"__SText": "___SText_1mp9e_gg_",
|
|
42
|
+
"_color": "__color_1mp9e_gg_",
|
|
43
|
+
"--color": "--color_1mp9e",
|
|
44
|
+
"--color-hover": "--color-hover_1mp9e",
|
|
45
|
+
"_disabled": "__disabled_1mp9e_gg_",
|
|
46
|
+
"_keyboardFocused": "__keyboardFocused_1mp9e_gg_",
|
|
47
|
+
"__SAddon": "___SAddon_1mp9e_gg_",
|
|
48
|
+
"__SLinkAddon": "___SLinkAddon_1mp9e_gg_",
|
|
49
|
+
"_size_m": "_size_m_1mp9e_gg_",
|
|
50
|
+
"_size_l": "_size_l_1mp9e_gg_"
|
|
51
51
|
});
|
|
52
52
|
|
|
53
53
|
var RootLinkTrigger = /*#__PURE__*/function (_Component) {
|
package/package.json
CHANGED
|
@@ -1,23 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/base-trigger",
|
|
3
3
|
"description": "Semrush BaseTrigger Component",
|
|
4
|
-
"version": "3.0
|
|
4
|
+
"version": "3.1.0",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
8
8
|
"sideEffects": false,
|
|
9
9
|
"author": "UI-kit team <ui-kit-team@semrush.com>",
|
|
10
10
|
"license": "MIT",
|
|
11
|
-
"scripts": {
|
|
12
|
-
"build": "pnpm semcore-builder --source=js",
|
|
13
|
-
"test": "jest"
|
|
14
|
-
},
|
|
15
11
|
"dependencies": {
|
|
16
12
|
"@semcore/utils": "^3.15",
|
|
17
13
|
"@semcore/dot": "^4.0.0",
|
|
18
14
|
"@semcore/flex-box": "^4",
|
|
19
15
|
"@semcore/icon": "^2.16",
|
|
20
|
-
"@semcore/neighbor-location": "^
|
|
16
|
+
"@semcore/neighbor-location": "^3",
|
|
21
17
|
"@semcore/spin": "^4"
|
|
22
18
|
},
|
|
23
19
|
"peerDependencies": {
|
|
@@ -35,5 +31,9 @@
|
|
|
35
31
|
"devDependencies": {
|
|
36
32
|
"@types/react": "16.8 - 17",
|
|
37
33
|
"@semcore/jest-preset-ui": "1.0.0"
|
|
34
|
+
},
|
|
35
|
+
"scripts": {
|
|
36
|
+
"build": "pnpm semcore-builder --source=js",
|
|
37
|
+
"test": "jest"
|
|
38
38
|
}
|
|
39
|
-
}
|
|
39
|
+
}
|