@semcore/base-trigger 3.2.4 → 3.2.6

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 CHANGED
@@ -2,11 +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.2.4] - 2022-10-24
5
+ ## [3.2.6] - 2022-11-07
6
+
7
+ ### Fixed
8
+
9
+ - Fixed `FilterTrigger` accessability.
10
+
11
+ ## [3.2.5] - 2022-10-28
6
12
 
7
13
  ### Changed
8
14
 
9
- - Version patch update due to children dependencies update (`@semcore/icon` [3.1.0 ~> 3.1.1]).
15
+ - Version patch update due to children dependencies update (`@semcore/utils` [3.40.0 ~> 3.40.0], `@semcore/icon` [3.1.1 ~> 3.1.2]).
10
16
 
11
17
  ## [3.2.1] - 2022-10-17
12
18
 
@@ -52,28 +52,28 @@ var style = (
52
52
  /*__reshadow_css_start__*/
53
53
  _core.sstyled.insert(
54
54
  /*__inner_css_start__*/
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_15kkn_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_15kkn_gg_::-moz-focus-inner {\n border: none;\n padding: 0;\n }\n\n.___SBaseTrigger_15kkn_gg_:active,\n .___SBaseTrigger_15kkn_gg_:hover,\n .___SBaseTrigger_15kkn_gg_:focus {\n outline: 0;\n text-decoration: none;\n }\n\n.___SBaseTrigger_15kkn_gg_.__keyboardFocused_15kkn_gg_ {\n border: 1px solid #008ff8;\n box-shadow: 0 0 0 3px rgba(0, 143, 248, 0.2);\n }\n\n.___SBaseTrigger_15kkn_gg_:hover {\n background-color: rgba(138, 142, 155, 0.2);\n }\n\n.___SBaseTrigger_15kkn_gg_:active,\n .___SBaseTrigger_15kkn_gg_.__active_15kkn_gg_ {\n background-color: rgba(138, 142, 155, 0.3);\n }\n\n.___SBaseTrigger_15kkn_gg_.__disabled_15kkn_gg_ {\n opacity: 0.3;\n cursor: default;\n pointer-events: none; /* Disable link interactions */\n}\n\n.___SBaseTrigger_15kkn_gg_.__keyboardFocused_15kkn_gg_ {\n z-index: 1;\n}\n\n.___SInner_15kkn_gg_ {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n}\n\n.___SText_15kkn_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_15kkn_gg_ {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.___SBaseAddon_15kkn_gg_ {\n width: 12px;\n height: 12px;\n}\n\n.___SBaseTrigger_15kkn_gg_._size_m_15kkn_gg_ {\n min-width: 26px;\n height: 28px;\n border-radius: 6px;\n padding: 0 8px;\n font-size: 14px\n}\n\n.___SBaseTrigger_15kkn_gg_._size_m_15kkn_gg_ .___SAddon_15kkn_gg_:not(:only-child):first-child {\n margin-right: 8px;\n }\n\n.___SBaseTrigger_15kkn_gg_._size_m_15kkn_gg_ .___SAddon_15kkn_gg_:not(:only-child):last-child {\n margin-left: 8px;\n }\n\n.___SBaseTrigger_15kkn_gg_._size_m_15kkn_gg_ .___SAddon_15kkn_gg_:only-child {\n margin-left: -4px;\n margin-right: -4px;\n }\n\n.___SBaseTrigger_15kkn_gg_._size_l_15kkn_gg_ {\n min-width: 32px;\n height: 40px;\n border-radius: 6px;\n padding: 0 12px;\n font-size: 16px\n}\n\n.___SBaseTrigger_15kkn_gg_._size_l_15kkn_gg_ .___SAddon_15kkn_gg_:not(:only-child):first-child {\n margin-right: 8px;\n }\n\n.___SBaseTrigger_15kkn_gg_._size_l_15kkn_gg_ .___SAddon_15kkn_gg_:not(:only-child):last-child {\n margin-left: 8px;\n }\n\n.___SBaseTrigger_15kkn_gg_._size_l_15kkn_gg_ .___SAddon_15kkn_gg_:only-child {\n margin-left: -4px;\n margin-right: -4px;\n }\n\n.___SBaseTrigger_15kkn_gg_._neighborLocation_right_15kkn_gg_ {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.___SBaseTrigger_15kkn_gg_._neighborLocation_both_15kkn_gg_ {\n border-radius: 0;\n margin-left: -1px;\n}\n\n.___SBaseTrigger_15kkn_gg_._neighborLocation_left_15kkn_gg_ {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n margin-left: -1px;\n}\n\n.___SText_15kkn_gg_.__placeholder_15kkn_gg_ {\n color: #a9abb6;\n}\n\n.___SBaseTrigger_15kkn_gg_._state_normal_15kkn_gg_ {\n border-color: #c4c7cf;\n}\n\n.___SBaseTrigger_15kkn_gg_._state_valid_15kkn_gg_ {\n border-color: #59ddaa;\n}\n\n.___SBaseTrigger_15kkn_gg_._state_invalid_15kkn_gg_ {\n border-color: #ffaeb5\n}\n\n.___SBaseTrigger_15kkn_gg_._state_invalid_15kkn_gg_.__keyboardFocused_15kkn_gg_ {\n border-color: #ff642d;\n box-shadow: 0 0 0 3px rgba(255, 100, 45, 0.3);\n }\n"
55
+ ".___SBaseTrigger_im4i7_gg_{display:inline-block;align-items:center;justify-content:center;line-height:normal;position:relative;touch-action:manipulation;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;user-select:none;box-sizing:border-box;padding:0;margin:0;box-shadow:none;outline:none;text-decoration:none;-webkit-tap-highlight-color:transparent;overflow:visible;outline:0;text-align:center;vertical-align:middle;font-family:Inter,sans-serif;cursor:pointer;background:#fff;font-weight:400;border:1px solid #c4c7cf;color:#191b23}.___SBaseTrigger_im4i7_gg_::-moz-focus-inner{border:none;padding:0}.___SBaseTrigger_im4i7_gg_:active,.___SBaseTrigger_im4i7_gg_:focus,.___SBaseTrigger_im4i7_gg_:hover{outline:0;text-decoration:none}.___SBaseTrigger_im4i7_gg_.__keyboardFocused_im4i7_gg_{border:1px solid #008ff8;box-shadow:0 0 0 3px rgba(0, 143, 248, 0.2)}.___SBaseTrigger_im4i7_gg_:hover{background-color:rgba(138,142,155,.2)}.___SBaseTrigger_im4i7_gg_:active,.___SBaseTrigger_im4i7_gg_.__active_im4i7_gg_{background-color:rgba(138,142,155,.3)}.___SBaseTrigger_im4i7_gg_.__disabled_im4i7_gg_{opacity:0.3;cursor:default;pointer-events:none}.___SBaseTrigger_im4i7_gg_.__keyboardFocused_im4i7_gg_{z-index:1}.___SInner_im4i7_gg_{display:inline-flex;align-items:center;justify-content:center;height:100%;width:100%}.___SText_im4i7_gg_{display:inline;padding:1px 0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:1.42;flex-grow:1;text-align:left}.___SAddon_im4i7_gg_{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.___SBaseAddon_im4i7_gg_{width:12px;height:12px}.___SBaseTrigger_im4i7_gg_._size_m_im4i7_gg_{min-width:26px;height:28px;border-radius:6px;padding:0 8px;font-size:14px}.___SBaseTrigger_im4i7_gg_._size_m_im4i7_gg_ .___SAddon_im4i7_gg_:not(:only-child):first-child{margin-right:8px}.___SBaseTrigger_im4i7_gg_._size_m_im4i7_gg_ .___SAddon_im4i7_gg_:not(:only-child):last-child{margin-left:8px}.___SBaseTrigger_im4i7_gg_._size_m_im4i7_gg_ .___SAddon_im4i7_gg_:only-child{margin-left:-4px;margin-right:-4px}.___SBaseTrigger_im4i7_gg_._size_l_im4i7_gg_{min-width:32px;height:40px;border-radius:6px;padding:0 12px;font-size:16px}.___SBaseTrigger_im4i7_gg_._size_l_im4i7_gg_ .___SAddon_im4i7_gg_:not(:only-child):first-child{margin-right:8px}.___SBaseTrigger_im4i7_gg_._size_l_im4i7_gg_ .___SAddon_im4i7_gg_:not(:only-child):last-child{margin-left:8px}.___SBaseTrigger_im4i7_gg_._size_l_im4i7_gg_ .___SAddon_im4i7_gg_:only-child{margin-left:-4px;margin-right:-4px}.___SBaseTrigger_im4i7_gg_._neighborLocation_right_im4i7_gg_{border-top-right-radius:0;border-bottom-right-radius:0}.___SBaseTrigger_im4i7_gg_._neighborLocation_both_im4i7_gg_{border-radius:0;margin-left:-1px}.___SBaseTrigger_im4i7_gg_._neighborLocation_left_im4i7_gg_{border-top-left-radius:0;border-bottom-left-radius:0;margin-left:-1px}.___SText_im4i7_gg_.__placeholder_im4i7_gg_{color:#a9abb6}.___SBaseTrigger_im4i7_gg_._state_normal_im4i7_gg_{border-color:#c4c7cf}.___SBaseTrigger_im4i7_gg_._state_valid_im4i7_gg_{border-color:#59ddaa}.___SBaseTrigger_im4i7_gg_._state_invalid_im4i7_gg_{border-color:#ffaeb5}.___SBaseTrigger_im4i7_gg_._state_invalid_im4i7_gg_.__keyboardFocused_im4i7_gg_{border-color:#ff642d;box-shadow:0 0 0 3px rgba(255,100,45,.3)}"
56
56
  /*__inner_css_end__*/
57
- , "15kkn_gg_")
57
+ , "im4i7_gg_")
58
58
  /*__reshadow_css_end__*/
59
59
  , {
60
- "__SBaseTrigger": "___SBaseTrigger_15kkn_gg_",
61
- "_keyboardFocused": "__keyboardFocused_15kkn_gg_",
62
- "_active": "__active_15kkn_gg_",
63
- "_disabled": "__disabled_15kkn_gg_",
64
- "__SInner": "___SInner_15kkn_gg_",
65
- "__SText": "___SText_15kkn_gg_",
66
- "__SAddon": "___SAddon_15kkn_gg_",
67
- "__SBaseAddon": "___SBaseAddon_15kkn_gg_",
68
- "_size_m": "_size_m_15kkn_gg_",
69
- "_size_l": "_size_l_15kkn_gg_",
70
- "_neighborLocation_right": "_neighborLocation_right_15kkn_gg_",
71
- "_neighborLocation_both": "_neighborLocation_both_15kkn_gg_",
72
- "_neighborLocation_left": "_neighborLocation_left_15kkn_gg_",
73
- "_placeholder": "__placeholder_15kkn_gg_",
74
- "_state_normal": "_state_normal_15kkn_gg_",
75
- "_state_valid": "_state_valid_15kkn_gg_",
76
- "_state_invalid": "_state_invalid_15kkn_gg_"
60
+ "__SBaseTrigger": "___SBaseTrigger_im4i7_gg_",
61
+ "_keyboardFocused": "__keyboardFocused_im4i7_gg_",
62
+ "_active": "__active_im4i7_gg_",
63
+ "_disabled": "__disabled_im4i7_gg_",
64
+ "__SInner": "___SInner_im4i7_gg_",
65
+ "__SText": "___SText_im4i7_gg_",
66
+ "__SAddon": "___SAddon_im4i7_gg_",
67
+ "__SBaseAddon": "___SBaseAddon_im4i7_gg_",
68
+ "_size_m": "_size_m_im4i7_gg_",
69
+ "_size_l": "_size_l_im4i7_gg_",
70
+ "_neighborLocation_right": "_neighborLocation_right_im4i7_gg_",
71
+ "_neighborLocation_both": "_neighborLocation_both_im4i7_gg_",
72
+ "_neighborLocation_left": "_neighborLocation_left_im4i7_gg_",
73
+ "_placeholder": "__placeholder_im4i7_gg_",
74
+ "_state_normal": "_state_normal_im4i7_gg_",
75
+ "_state_valid": "_state_valid_im4i7_gg_",
76
+ "_state_invalid": "_state_invalid_im4i7_gg_"
77
77
  });
78
78
 
79
79
  var RootBaseTrigger = /*#__PURE__*/function (_Component) {
@@ -46,13 +46,13 @@ var style = (
46
46
  /*__reshadow_css_start__*/
47
47
  _core.sstyled.insert(
48
48
  /*__inner_css_start__*/
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_1f17b_gg_ {\n width: 12px;\n height: 12px;\n}\n\n.___SButtonTriggerSpin_1f17b_gg_ {\n fill: #6c6e79;\n}\n"
49
+ ".___SButtonAddon_kxt2p_gg_{width:12px;height:12px}.___SButtonTriggerSpin_kxt2p_gg_{fill:#6c6e79}"
50
50
  /*__inner_css_end__*/
51
- , "1f17b_gg_")
51
+ , "kxt2p_gg_")
52
52
  /*__reshadow_css_end__*/
53
53
  , {
54
- "__SButtonAddon": "___SButtonAddon_1f17b_gg_",
55
- "__SButtonTriggerSpin": "___SButtonTriggerSpin_1f17b_gg_"
54
+ "__SButtonAddon": "___SButtonAddon_kxt2p_gg_",
55
+ "__SButtonTriggerSpin": "___SButtonTriggerSpin_kxt2p_gg_"
56
56
  });
57
57
 
58
58
  var RootButtonTrigger = /*#__PURE__*/function (_Component) {
@@ -60,25 +60,25 @@ var style = (
60
60
  /*__reshadow_css_start__*/
61
61
  _core.sstyled.insert(
62
62
  /*__inner_css_start__*/
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_ibowk_gg_ {\n border: 1px solid #c4c7cf;\n background: #ffffff;\n color: #191b23\n}\n\n.___SButtonTrigger_ibowk_gg_::-moz-focus-inner {\n border: none;\n padding: 0;\n }\n\n.___SButtonTrigger_ibowk_gg_:active,\n .___SButtonTrigger_ibowk_gg_:hover,\n .___SButtonTrigger_ibowk_gg_:focus {\n outline: 0;\n text-decoration: none;\n }\n\n.___SButtonTrigger_ibowk_gg_:active,\n .___SButtonTrigger_ibowk_gg_:hover,\n .___SButtonTrigger_ibowk_gg_.__active_ibowk_gg_ {\n background-color: rgba(138, 142, 155, 0.2);\n }\n\n.___SButtonTrigger_ibowk_gg_._size_m_ibowk_gg_ {\n min-width: 26px;\n height: 28px;\n border-radius: 6px;\n font-size: 14px;\n}\n\n.___SButtonTrigger_ibowk_gg_._size_l_ibowk_gg_ {\n min-width: 32px;\n height: 40px;\n border-radius: 6px;\n font-size: 16px;\n}\n\n.___SText_ibowk_gg_.__placeholder_ibowk_gg_ {\n color: #a9abb6;\n}\n\n.___SButtonTrigger_ibowk_gg_._state_normal_ibowk_gg_ {\n border-color: #c4c7cf;\n}\n\n.___SButtonTrigger_ibowk_gg_._state_valid_ibowk_gg_ {\n border-color: #59ddaa;\n}\n\n.___SButtonTrigger_ibowk_gg_._state_invalid_ibowk_gg_ {\n border-color: #ffaeb5;\n}\n\n.___SFilterTrigger_ibowk_gg_.__selected_ibowk_gg_ {\n border-color: #008ff8;\n background-color: rgba(0, 143, 248, 0.2);\n color: #191b23\n}\n\n.___SFilterTrigger_ibowk_gg_.__selected_ibowk_gg_.__active_ibowk_gg_,\n .___SFilterTrigger_ibowk_gg_.__selected_ibowk_gg_:hover {\n background: rgba(0, 143, 248, 0.3);\n }\n\n.___SWrapper_ibowk_gg_ {\n display: inline-flex\n}\n\n.___SWrapper_ibowk_gg_:focus {\n outline: none;\n }\n\n.___SWrapper_ibowk_gg_.__keyboardFocused_ibowk_gg_ {\n box-shadow: 0 0 0 3px rgba(0, 143, 248, 0.2);\n}\n\n.___SCounter_ibowk_gg_ {\n background-color: #008ff8;\n}\n"
63
+ ".___SButtonTrigger_15m5u_gg_{border:1px solid #c4c7cf;background:#fff;color:#191b23}.___SButtonTrigger_15m5u_gg_::-moz-focus-inner{border:none;padding:0}.___SButtonTrigger_15m5u_gg_:active,.___SButtonTrigger_15m5u_gg_:focus,.___SButtonTrigger_15m5u_gg_:hover{outline:0;text-decoration:none}.___SButtonTrigger_15m5u_gg_:active,.___SButtonTrigger_15m5u_gg_:hover,.___SButtonTrigger_15m5u_gg_.__active_15m5u_gg_{background-color:rgba(138,142,155,.2)}.___SButtonTrigger_15m5u_gg_._size_m_15m5u_gg_{min-width:26px;height:28px;border-radius:6px;font-size:14px}.___SButtonTrigger_15m5u_gg_._size_l_15m5u_gg_{min-width:32px;height:40px;border-radius:6px;font-size:16px}.___SText_15m5u_gg_.__placeholder_15m5u_gg_{color:#a9abb6}.___SButtonTrigger_15m5u_gg_._state_normal_15m5u_gg_{border-color:#c4c7cf}.___SButtonTrigger_15m5u_gg_._state_valid_15m5u_gg_{border-color:#59ddaa}.___SButtonTrigger_15m5u_gg_._state_invalid_15m5u_gg_{border-color:#ffaeb5}.___SFilterTrigger_15m5u_gg_.__selected_15m5u_gg_{border-color:#008ff8;background-color:rgba(0,143,248,.2);color:#191b23}.___SFilterTrigger_15m5u_gg_.__selected_15m5u_gg_:hover,.___SFilterTrigger_15m5u_gg_.__selected_15m5u_gg_.__active_15m5u_gg_{background:rgba(0,143,248,.3)}.___SWrapper_15m5u_gg_{display:inline-flex}.___SWrapper_15m5u_gg_:focus{outline:none}.___SWrapper_15m5u_gg_.__keyboardFocused_15m5u_gg_{box-shadow:0 0 0 3px rgba(0, 143, 248, 0.2)}.___SCounter_15m5u_gg_{background-color:#008ff8}"
64
64
  /*__inner_css_end__*/
65
- , "ibowk_gg_")
65
+ , "15m5u_gg_")
66
66
  /*__reshadow_css_end__*/
67
67
  , {
68
- "__SButtonTrigger": "___SButtonTrigger_ibowk_gg_",
69
- "_active": "__active_ibowk_gg_",
70
- "_size_m": "_size_m_ibowk_gg_",
71
- "_size_l": "_size_l_ibowk_gg_",
72
- "__SText": "___SText_ibowk_gg_",
73
- "_placeholder": "__placeholder_ibowk_gg_",
74
- "_state_normal": "_state_normal_ibowk_gg_",
75
- "_state_valid": "_state_valid_ibowk_gg_",
76
- "_state_invalid": "_state_invalid_ibowk_gg_",
77
- "__SFilterTrigger": "___SFilterTrigger_ibowk_gg_",
78
- "_selected": "__selected_ibowk_gg_",
79
- "__SWrapper": "___SWrapper_ibowk_gg_",
80
- "_keyboardFocused": "__keyboardFocused_ibowk_gg_",
81
- "__SCounter": "___SCounter_ibowk_gg_"
68
+ "__SButtonTrigger": "___SButtonTrigger_15m5u_gg_",
69
+ "_active": "__active_15m5u_gg_",
70
+ "_size_m": "_size_m_15m5u_gg_",
71
+ "_size_l": "_size_l_15m5u_gg_",
72
+ "__SText": "___SText_15m5u_gg_",
73
+ "_placeholder": "__placeholder_15m5u_gg_",
74
+ "_state_normal": "_state_normal_15m5u_gg_",
75
+ "_state_valid": "_state_valid_15m5u_gg_",
76
+ "_state_invalid": "_state_invalid_15m5u_gg_",
77
+ "__SFilterTrigger": "___SFilterTrigger_15m5u_gg_",
78
+ "_selected": "__selected_15m5u_gg_",
79
+ "__SWrapper": "___SWrapper_15m5u_gg_",
80
+ "_keyboardFocused": "__keyboardFocused_15m5u_gg_",
81
+ "__SCounter": "___SCounter_15m5u_gg_"
82
82
  });
83
83
 
84
84
  var RootFilterTrigger = /*#__PURE__*/function (_Component) {
@@ -119,7 +119,14 @@ var RootFilterTrigger = /*#__PURE__*/function (_Component) {
119
119
  placeholder = _this$asProps.placeholder,
120
120
  active = _this$asProps.active,
121
121
  disabled = _this$asProps.disabled;
122
- return _ref3 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SWrapper, _ref3.cn("SWrapper", _objectSpread({}, (0, _core.assignProps)({}, _ref))), /*#__PURE__*/_react["default"].createElement(_neighborLocation["default"], _ref3.cn("NeighborLocation", {}), /*#__PURE__*/_react["default"].createElement(SFilterTrigger, _ref3.cn("SFilterTrigger", {
122
+
123
+ if (this.asProps.role === 'button') {
124
+ this.asProps.role = 'group';
125
+ }
126
+
127
+ return _ref3 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SWrapper, _ref3.cn("SWrapper", _objectSpread({}, (0, _core.assignProps)({
128
+ "aria-label": "Filter"
129
+ }, _ref))), /*#__PURE__*/_react["default"].createElement(_neighborLocation["default"], _ref3.cn("NeighborLocation", {}), /*#__PURE__*/_react["default"].createElement(SFilterTrigger, _ref3.cn("SFilterTrigger", {
123
130
  "w": "100%",
124
131
  "size": size,
125
132
  "placeholder": placeholder,
@@ -131,6 +138,7 @@ var RootFilterTrigger = /*#__PURE__*/function (_Component) {
131
138
  tag: _m2["default"]
132
139
  })), !empty && /*#__PURE__*/_react["default"].createElement(SFilterTrigger, _ref3.cn("SFilterTrigger", {
133
140
  "tag": "button",
141
+ "aria-label": "Clear",
134
142
  "size": size,
135
143
  "empty": empty,
136
144
  "selected": true,
@@ -1 +1 @@
1
- {"version":3,"file":"FilterTrigger.js","names":["RootFilterTrigger","e","stopPropagation","SWrapper","Box","SFilterTrigger","BaseTrigger","asProps","Children","styles","empty","onClear","size","placeholder","active","disabled","sstyled","addonTextChildren","FilterTrigger","Text","Addon","Counter","ChevronDown","callAllEventHandlers","handleStopPropagation","Close","Component","style","props","SCounter","Dot","createComponent","parent"],"sources":["../../src/FilterTrigger.jsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { Component, Root, sstyled } from '@semcore/core';\nimport BaseTrigger from './BaseTrigger';\nimport { Box } from '@semcore/flex-box';\nimport NeighborLocation from '@semcore/neighbor-location';\nimport Dot from '@semcore/dot';\nimport Close from '@semcore/icon/Close/m';\nimport ChevronDown from '@semcore/icon/ChevronDown/m';\nimport { callAllEventHandlers } from '@semcore/utils/lib/assignProps';\nimport addonTextChildren from '@semcore/utils/lib/addonTextChildren';\n\nimport style from './style/filter-trigger.shadow.css';\n\nclass RootFilterTrigger extends Component {\n static displayName = 'FilterTrigger';\n static style = style;\n\n handleStopPropagation = (e) => e.stopPropagation();\n\n render() {\n const SWrapper = Root;\n const SFilterTrigger = BaseTrigger;\n const { Children, styles, empty, onClear, size, placeholder, active, disabled } = this.asProps;\n\n return sstyled(styles)(\n <SWrapper render={Box}>\n <NeighborLocation>\n <SFilterTrigger\n w=\"100%\"\n size={size}\n placeholder={placeholder}\n empty={empty}\n selected={!empty}\n active={active}\n disabled={disabled}\n >\n {addonTextChildren(\n Children,\n FilterTrigger.Text,\n [FilterTrigger.Addon, FilterTrigger.Counter],\n empty,\n )}\n {empty && <FilterTrigger.Addon tag={ChevronDown} />}\n </SFilterTrigger>\n {!empty && (\n <SFilterTrigger\n tag=\"button\"\n size={size}\n empty={empty}\n selected\n onClick={callAllEventHandlers(onClear, this.handleStopPropagation)}\n onKeyDown={this.handleStopPropagation}\n disabled={disabled}\n >\n <FilterTrigger.Addon tag={Close} />\n </SFilterTrigger>\n )}\n </NeighborLocation>\n </SWrapper>,\n );\n }\n}\n\nfunction Counter(props) {\n const SCounter = Root;\n return sstyled(props.styles)(<SCounter render={BaseTrigger.Addon} tag={Dot} />);\n}\n\nconst FilterTrigger = createComponent(\n RootFilterTrigger,\n {\n Text: BaseTrigger.Text,\n Addon: BaseTrigger.Addon,\n Counter,\n },\n {\n parent: BaseTrigger,\n },\n);\n\nexport default FilterTrigger;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AADA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIMA,iB;;;;;;;;;;;;;;;8GAIoB,UAACC,CAAD;MAAA,OAAOA,CAAC,CAACC,eAAF,EAAP;IAAA,C;;;;;;WAExB,kBAAS;MAAA;MAAA;;MACP,IAAMC,QAAQ,GAKMC,YALpB;MACA,IAAMC,cAAc,GAAGC,uBAAvB;MACA,oBAAkF,KAAKC,OAAvF;MAAA,IAAQC,QAAR,iBAAQA,QAAR;MAAA,IAAkBC,MAAlB,iBAAkBA,MAAlB;MAAA,IAA0BC,KAA1B,iBAA0BA,KAA1B;MAAA,IAAiCC,OAAjC,iBAAiCA,OAAjC;MAAA,IAA0CC,IAA1C,iBAA0CA,IAA1C;MAAA,IAAgDC,WAAhD,iBAAgDA,WAAhD;MAAA,IAA6DC,MAA7D,iBAA6DA,MAA7D;MAAA,IAAqEC,QAArE,iBAAqEA,QAArE;MAEA,eAAO,IAAAC,aAAA,EAAQP,MAAR,CAAP,eACE,gCAAC,QAAD,0FACE,gCAAC,4BAAD,iDACE,gCAAC,cAAD;QAAA,KACI,MADJ;QAAA,QAEQG,IAFR;QAAA,eAGeC,WAHf;QAAA,SAISH,KAJT;QAAA,YAKY,CAACA,KALb;QAAA,UAMUI,MANV;QAAA,YAOYC;MAPZ,IASG,IAAAE,6BAAA,EACCT,QADD,EAECU,aAAa,CAACC,IAFf,EAGC,CAACD,aAAa,CAACE,KAAf,EAAsBF,aAAa,CAACG,OAApC,CAHD,EAICX,KAJD,CATH,EAeGA,KAAK,iBAAI,gCAAC,aAAD,CAAe,KAAf;QAAqB,GAAG,EAAEY;MAA1B,EAfZ,CADF,EAkBG,CAACZ,KAAD,iBACC,gCAAC,cAAD;QAAA,OACM,QADN;QAAA,QAEQE,IAFR;QAAA,SAGSF,KAHT;QAAA;QAAA,WAKW,IAAAa,kCAAA,EAAqBZ,OAArB,EAA8B,KAAKa,qBAAnC,CALX;QAAA,aAMa,KAAKA,qBANlB;QAAA,YAOYT;MAPZ,iBASE,gCAAC,aAAD,CAAe,KAAf;QAAqB,GAAG,EAAEU;MAA1B,EATF,CAnBJ,CADF,CADF;IAoCD;;;EA/C6BC,e;;iCAA1B1B,iB,iBACiB,e;iCADjBA,iB,WAEW2B,K;;AAgDjB,SAASN,OAAT,CAAiBO,KAAjB,EAAwB;EAAA;EAAA;;EACtB,IAAMC,QAAQ,GACiCvB,uBAAA,CAAYc,KAD3D;EACA,eAAO,IAAAJ,aAAA,EAAQY,KAAK,CAACnB,MAAd,CAAP,eAA6B,gCAAC,QAAD;IAAA,OAA0CqB;EAA1C,YAA7B;AACD;;AAED,IAAMZ,aAAa,GAAG,IAAAa,gBAAA,EACpB/B,iBADoB,EAEpB;EACEmB,IAAI,EAAEb,uBAAA,CAAYa,IADpB;EAEEC,KAAK,EAAEd,uBAAA,CAAYc,KAFrB;EAGEC,OAAO,EAAPA;AAHF,CAFoB,EAOpB;EACEW,MAAM,EAAE1B;AADV,CAPoB,CAAtB;eAYeY,a"}
1
+ {"version":3,"file":"FilterTrigger.js","names":["RootFilterTrigger","e","stopPropagation","SWrapper","Box","SFilterTrigger","BaseTrigger","asProps","Children","styles","empty","onClear","size","placeholder","active","disabled","role","sstyled","addonTextChildren","FilterTrigger","Text","Addon","Counter","ChevronDown","callAllEventHandlers","handleStopPropagation","Close","Component","style","props","SCounter","Dot","createComponent","parent"],"sources":["../../src/FilterTrigger.jsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { Component, Root, sstyled } from '@semcore/core';\nimport BaseTrigger from './BaseTrigger';\nimport { Box } from '@semcore/flex-box';\nimport NeighborLocation from '@semcore/neighbor-location';\nimport Dot from '@semcore/dot';\nimport Close from '@semcore/icon/Close/m';\nimport ChevronDown from '@semcore/icon/ChevronDown/m';\nimport { callAllEventHandlers } from '@semcore/utils/lib/assignProps';\nimport addonTextChildren from '@semcore/utils/lib/addonTextChildren';\n\nimport style from './style/filter-trigger.shadow.css';\n\nclass RootFilterTrigger extends Component {\n static displayName = 'FilterTrigger';\n static style = style;\n\n handleStopPropagation = (e) => e.stopPropagation();\n\n render() {\n const SWrapper = Root;\n const SFilterTrigger = BaseTrigger;\n const { Children, styles, empty, onClear, size, placeholder, active, disabled } = this.asProps;\n\n if (this.asProps.role === 'button') {\n this.asProps.role = 'group';\n }\n\n return sstyled(styles)(\n <SWrapper render={Box} aria-label=\"Filter\">\n <NeighborLocation>\n <SFilterTrigger\n w=\"100%\"\n size={size}\n placeholder={placeholder}\n empty={empty}\n selected={!empty}\n active={active}\n disabled={disabled}\n >\n {addonTextChildren(\n Children,\n FilterTrigger.Text,\n [FilterTrigger.Addon, FilterTrigger.Counter],\n empty,\n )}\n {empty && <FilterTrigger.Addon tag={ChevronDown} />}\n </SFilterTrigger>\n {!empty && (\n <SFilterTrigger\n tag=\"button\"\n aria-label=\"Clear\"\n size={size}\n empty={empty}\n selected\n onClick={callAllEventHandlers(onClear, this.handleStopPropagation)}\n onKeyDown={this.handleStopPropagation}\n disabled={disabled}\n >\n <FilterTrigger.Addon tag={Close} />\n </SFilterTrigger>\n )}\n </NeighborLocation>\n </SWrapper>,\n );\n }\n}\n\nfunction Counter(props) {\n const SCounter = Root;\n return sstyled(props.styles)(<SCounter render={BaseTrigger.Addon} tag={Dot} />);\n}\n\nconst FilterTrigger = createComponent(\n RootFilterTrigger,\n {\n Text: BaseTrigger.Text,\n Addon: BaseTrigger.Addon,\n Counter,\n },\n {\n parent: BaseTrigger,\n },\n);\n\nexport default FilterTrigger;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AADA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIMA,iB;;;;;;;;;;;;;;;8GAIoB,UAACC,CAAD;MAAA,OAAOA,CAAC,CAACC,eAAF,EAAP;IAAA,C;;;;;;WAExB,kBAAS;MAAA;MAAA;;MACP,IAAMC,QAAQ,GASMC,YATpB;MACA,IAAMC,cAAc,GAAGC,uBAAvB;MACA,oBAAkF,KAAKC,OAAvF;MAAA,IAAQC,QAAR,iBAAQA,QAAR;MAAA,IAAkBC,MAAlB,iBAAkBA,MAAlB;MAAA,IAA0BC,KAA1B,iBAA0BA,KAA1B;MAAA,IAAiCC,OAAjC,iBAAiCA,OAAjC;MAAA,IAA0CC,IAA1C,iBAA0CA,IAA1C;MAAA,IAAgDC,WAAhD,iBAAgDA,WAAhD;MAAA,IAA6DC,MAA7D,iBAA6DA,MAA7D;MAAA,IAAqEC,QAArE,iBAAqEA,QAArE;;MAEA,IAAI,KAAKR,OAAL,CAAaS,IAAb,KAAsB,QAA1B,EAAoC;QAClC,KAAKT,OAAL,CAAaS,IAAb,GAAoB,OAApB;MACD;;MAED,eAAO,IAAAC,aAAA,EAAQR,MAAR,CAAP,eACE,gCAAC,QAAD;QAAA,cAAkC;MAAlC,yBACE,gCAAC,4BAAD,iDACE,gCAAC,cAAD;QAAA,KACI,MADJ;QAAA,QAEQG,IAFR;QAAA,eAGeC,WAHf;QAAA,SAISH,KAJT;QAAA,YAKY,CAACA,KALb;QAAA,UAMUI,MANV;QAAA,YAOYC;MAPZ,IASG,IAAAG,6BAAA,EACCV,QADD,EAECW,aAAa,CAACC,IAFf,EAGC,CAACD,aAAa,CAACE,KAAf,EAAsBF,aAAa,CAACG,OAApC,CAHD,EAICZ,KAJD,CATH,EAeGA,KAAK,iBAAI,gCAAC,aAAD,CAAe,KAAf;QAAqB,GAAG,EAAEa;MAA1B,EAfZ,CADF,EAkBG,CAACb,KAAD,iBACC,gCAAC,cAAD;QAAA,OACM,QADN;QAAA,cAEa,OAFb;QAAA,QAGQE,IAHR;QAAA,SAISF,KAJT;QAAA;QAAA,WAMW,IAAAc,kCAAA,EAAqBb,OAArB,EAA8B,KAAKc,qBAAnC,CANX;QAAA,aAOa,KAAKA,qBAPlB;QAAA,YAQYV;MARZ,iBAUE,gCAAC,aAAD,CAAe,KAAf;QAAqB,GAAG,EAAEW;MAA1B,EAVF,CAnBJ,CADF,CADF;IAqCD;;;EApD6BC,e;;iCAA1B3B,iB,iBACiB,e;iCADjBA,iB,WAEW4B,K;;AAqDjB,SAASN,OAAT,CAAiBO,KAAjB,EAAwB;EAAA;EAAA;;EACtB,IAAMC,QAAQ,GACiCxB,uBAAA,CAAYe,KAD3D;EACA,eAAO,IAAAJ,aAAA,EAAQY,KAAK,CAACpB,MAAd,CAAP,eAA6B,gCAAC,QAAD;IAAA,OAA0CsB;EAA1C,YAA7B;AACD;;AAED,IAAMZ,aAAa,GAAG,IAAAa,gBAAA,EACpBhC,iBADoB,EAEpB;EACEoB,IAAI,EAAEd,uBAAA,CAAYc,IADpB;EAEEC,KAAK,EAAEf,uBAAA,CAAYe,KAFrB;EAGEC,OAAO,EAAPA;AAHF,CAFoB,EAOpB;EACEW,MAAM,EAAE3B;AADV,CAPoB,CAAtB;eAYea,a"}
@@ -54,23 +54,23 @@ var style = (
54
54
  /*__reshadow_css_start__*/
55
55
  _core.sstyled.insert(
56
56
  /*__inner_css_start__*/
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_1864k_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_1864k_gg_.__active_1864k_gg_,\n .___SLinkTrigger_1864k_gg_:hover,\n .___SLinkTrigger_1864k_gg_:active {\n color: #044792\n }\n\n.___SLinkTrigger_1864k_gg_.__active_1864k_gg_ .___SText_1864k_gg_, .___SLinkTrigger_1864k_gg_:hover .___SText_1864k_gg_, .___SLinkTrigger_1864k_gg_:active .___SText_1864k_gg_ {\n border-color: currentColor;\n }\n\n.___SLinkTrigger_1864k_gg_ .___SText_1864k_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_1864k_gg_.__color_1864k_gg_ {\n color: var(--color_1864k)\n}\n\n.___SLinkTrigger_1864k_gg_.__color_1864k_gg_:hover {\n color: var(--color-hover_1864k);\n }\n\n.___SLinkTrigger_1864k_gg_.__disabled_1864k_gg_ {\n opacity: 0.3;\n cursor: default;\n pointer-events: none;\n}\n\n.___SLinkTrigger_1864k_gg_.__keyboardFocused_1864k_gg_ {\n box-shadow: 0 0 0 3px rgba(0, 143, 248, 0.2);\n z-index: 1;\n}\n\n.___SAddon_1864k_gg_,\n.___SLinkAddon_1864k_gg_ {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0\n}\n\n.___SAddon_1864k_gg_:not(:only-child):first-child, .___SLinkAddon_1864k_gg_:not(:only-child):first-child {\n margin-right: 4px;\n }\n\n.___SAddon_1864k_gg_:not(:only-child):last-child, .___SLinkAddon_1864k_gg_:not(:only-child):last-child {\n margin-left: 4px;\n }\n\n.___SLinkAddon_1864k_gg_ {\n width: 16px;\n height: 16px;\n}\n\n.___SLinkTrigger_1864k_gg_._size_m_1864k_gg_ {\n font-size: 14px;\n}\n\n.___SLinkTrigger_1864k_gg_._size_l_1864k_gg_ {\n font-size: 16px;\n}\n\n@media (prefers-reduced-motion) {\n .___SLinkTrigger_1864k_gg_ {\n transition: none\n }\n .___SLinkTrigger_1864k_gg_ .___SText_1864k_gg_ {\n transition: none;\n }\n}\n"
57
+ ".___SLinkTrigger_x7ew0_gg_{display:inline-flex;align-items:center;line-height:normal;position:relative;touch-action:manipulation;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;user-select:none;box-sizing:border-box;padding:0;margin:0;outline:none;text-decoration:none;-webkit-tap-highlight-color:transparent;overflow:visible;outline:0;vertical-align:middle;font-family:Inter,sans-serif;cursor:pointer;color:#006dca;background:none;transition:color .15s ease-in-out}.___SLinkTrigger_x7ew0_gg_:active,.___SLinkTrigger_x7ew0_gg_:hover,.___SLinkTrigger_x7ew0_gg_.__active_x7ew0_gg_{color:#044792}.___SLinkTrigger_x7ew0_gg_:active .___SText_x7ew0_gg_,.___SLinkTrigger_x7ew0_gg_:hover .___SText_x7ew0_gg_,.___SLinkTrigger_x7ew0_gg_.__active_x7ew0_gg_ .___SText_x7ew0_gg_{border-color:currentColor}.___SLinkTrigger_x7ew0_gg_ .___SText_x7ew0_gg_{border-bottom-width:1px;border-bottom-style:solid;border-color:transparent;transition:border-bottom-color .15s ease-in-out;line-height:1.42}.___SLinkTrigger_x7ew0_gg_.__color_x7ew0_gg_{color:var(--color_x7ew0)}.___SLinkTrigger_x7ew0_gg_.__color_x7ew0_gg_:hover{color:var(--color-hover_x7ew0)}.___SLinkTrigger_x7ew0_gg_.__disabled_x7ew0_gg_{opacity:0.3;cursor:default;pointer-events:none}.___SLinkTrigger_x7ew0_gg_.__keyboardFocused_x7ew0_gg_{box-shadow:0 0 0 3px rgba(0, 143, 248, 0.2);z-index:1}.___SAddon_x7ew0_gg_,.___SLinkAddon_x7ew0_gg_{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.___SAddon_x7ew0_gg_:not(:only-child):first-child,.___SLinkAddon_x7ew0_gg_:not(:only-child):first-child{margin-right:4px}.___SAddon_x7ew0_gg_:not(:only-child):last-child,.___SLinkAddon_x7ew0_gg_:not(:only-child):last-child{margin-left:4px}.___SLinkAddon_x7ew0_gg_{width:16px;height:16px}.___SLinkTrigger_x7ew0_gg_._size_m_x7ew0_gg_{font-size:14px}.___SLinkTrigger_x7ew0_gg_._size_l_x7ew0_gg_{font-size:16px}@media (prefers-reduced-motion){.___SLinkTrigger_x7ew0_gg_{transition:none}.___SLinkTrigger_x7ew0_gg_ .___SText_x7ew0_gg_{transition:none}}"
58
58
  /*__inner_css_end__*/
59
- , "1864k_gg_")
59
+ , "x7ew0_gg_")
60
60
  /*__reshadow_css_end__*/
61
61
  , {
62
- "__SLinkTrigger": "___SLinkTrigger_1864k_gg_",
63
- "_active": "__active_1864k_gg_",
64
- "__SText": "___SText_1864k_gg_",
65
- "_color": "__color_1864k_gg_",
66
- "--color": "--color_1864k",
67
- "--color-hover": "--color-hover_1864k",
68
- "_disabled": "__disabled_1864k_gg_",
69
- "_keyboardFocused": "__keyboardFocused_1864k_gg_",
70
- "__SAddon": "___SAddon_1864k_gg_",
71
- "__SLinkAddon": "___SLinkAddon_1864k_gg_",
72
- "_size_m": "_size_m_1864k_gg_",
73
- "_size_l": "_size_l_1864k_gg_"
62
+ "__SLinkTrigger": "___SLinkTrigger_x7ew0_gg_",
63
+ "_active": "__active_x7ew0_gg_",
64
+ "__SText": "___SText_x7ew0_gg_",
65
+ "_color": "__color_x7ew0_gg_",
66
+ "--color": "--color_x7ew0",
67
+ "--color-hover": "--color-hover_x7ew0",
68
+ "_disabled": "__disabled_x7ew0_gg_",
69
+ "_keyboardFocused": "__keyboardFocused_x7ew0_gg_",
70
+ "__SAddon": "___SAddon_x7ew0_gg_",
71
+ "__SLinkAddon": "___SLinkAddon_x7ew0_gg_",
72
+ "_size_m": "_size_m_x7ew0_gg_",
73
+ "_size_l": "_size_l_x7ew0_gg_"
74
74
  });
75
75
 
76
76
  var RootLinkTrigger = /*#__PURE__*/function (_Component) {
@@ -30,28 +30,28 @@ var style = (
30
30
  /*__reshadow_css_start__*/
31
31
  _sstyled.insert(
32
32
  /*__inner_css_start__*/
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_15kkn_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_15kkn_gg_::-moz-focus-inner {\n border: none;\n padding: 0;\n }\n\n.___SBaseTrigger_15kkn_gg_:active,\n .___SBaseTrigger_15kkn_gg_:hover,\n .___SBaseTrigger_15kkn_gg_:focus {\n outline: 0;\n text-decoration: none;\n }\n\n.___SBaseTrigger_15kkn_gg_.__keyboardFocused_15kkn_gg_ {\n border: 1px solid #008ff8;\n box-shadow: 0 0 0 3px rgba(0, 143, 248, 0.2);\n }\n\n.___SBaseTrigger_15kkn_gg_:hover {\n background-color: rgba(138, 142, 155, 0.2);\n }\n\n.___SBaseTrigger_15kkn_gg_:active,\n .___SBaseTrigger_15kkn_gg_.__active_15kkn_gg_ {\n background-color: rgba(138, 142, 155, 0.3);\n }\n\n.___SBaseTrigger_15kkn_gg_.__disabled_15kkn_gg_ {\n opacity: 0.3;\n cursor: default;\n pointer-events: none; /* Disable link interactions */\n}\n\n.___SBaseTrigger_15kkn_gg_.__keyboardFocused_15kkn_gg_ {\n z-index: 1;\n}\n\n.___SInner_15kkn_gg_ {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n}\n\n.___SText_15kkn_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_15kkn_gg_ {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.___SBaseAddon_15kkn_gg_ {\n width: 12px;\n height: 12px;\n}\n\n.___SBaseTrigger_15kkn_gg_._size_m_15kkn_gg_ {\n min-width: 26px;\n height: 28px;\n border-radius: 6px;\n padding: 0 8px;\n font-size: 14px\n}\n\n.___SBaseTrigger_15kkn_gg_._size_m_15kkn_gg_ .___SAddon_15kkn_gg_:not(:only-child):first-child {\n margin-right: 8px;\n }\n\n.___SBaseTrigger_15kkn_gg_._size_m_15kkn_gg_ .___SAddon_15kkn_gg_:not(:only-child):last-child {\n margin-left: 8px;\n }\n\n.___SBaseTrigger_15kkn_gg_._size_m_15kkn_gg_ .___SAddon_15kkn_gg_:only-child {\n margin-left: -4px;\n margin-right: -4px;\n }\n\n.___SBaseTrigger_15kkn_gg_._size_l_15kkn_gg_ {\n min-width: 32px;\n height: 40px;\n border-radius: 6px;\n padding: 0 12px;\n font-size: 16px\n}\n\n.___SBaseTrigger_15kkn_gg_._size_l_15kkn_gg_ .___SAddon_15kkn_gg_:not(:only-child):first-child {\n margin-right: 8px;\n }\n\n.___SBaseTrigger_15kkn_gg_._size_l_15kkn_gg_ .___SAddon_15kkn_gg_:not(:only-child):last-child {\n margin-left: 8px;\n }\n\n.___SBaseTrigger_15kkn_gg_._size_l_15kkn_gg_ .___SAddon_15kkn_gg_:only-child {\n margin-left: -4px;\n margin-right: -4px;\n }\n\n.___SBaseTrigger_15kkn_gg_._neighborLocation_right_15kkn_gg_ {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.___SBaseTrigger_15kkn_gg_._neighborLocation_both_15kkn_gg_ {\n border-radius: 0;\n margin-left: -1px;\n}\n\n.___SBaseTrigger_15kkn_gg_._neighborLocation_left_15kkn_gg_ {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n margin-left: -1px;\n}\n\n.___SText_15kkn_gg_.__placeholder_15kkn_gg_ {\n color: #a9abb6;\n}\n\n.___SBaseTrigger_15kkn_gg_._state_normal_15kkn_gg_ {\n border-color: #c4c7cf;\n}\n\n.___SBaseTrigger_15kkn_gg_._state_valid_15kkn_gg_ {\n border-color: #59ddaa;\n}\n\n.___SBaseTrigger_15kkn_gg_._state_invalid_15kkn_gg_ {\n border-color: #ffaeb5\n}\n\n.___SBaseTrigger_15kkn_gg_._state_invalid_15kkn_gg_.__keyboardFocused_15kkn_gg_ {\n border-color: #ff642d;\n box-shadow: 0 0 0 3px rgba(255, 100, 45, 0.3);\n }\n"
33
+ ".___SBaseTrigger_im4i7_gg_{display:inline-block;align-items:center;justify-content:center;line-height:normal;position:relative;touch-action:manipulation;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;user-select:none;box-sizing:border-box;padding:0;margin:0;box-shadow:none;outline:none;text-decoration:none;-webkit-tap-highlight-color:transparent;overflow:visible;outline:0;text-align:center;vertical-align:middle;font-family:Inter,sans-serif;cursor:pointer;background:#fff;font-weight:400;border:1px solid #c4c7cf;color:#191b23}.___SBaseTrigger_im4i7_gg_::-moz-focus-inner{border:none;padding:0}.___SBaseTrigger_im4i7_gg_:active,.___SBaseTrigger_im4i7_gg_:focus,.___SBaseTrigger_im4i7_gg_:hover{outline:0;text-decoration:none}.___SBaseTrigger_im4i7_gg_.__keyboardFocused_im4i7_gg_{border:1px solid #008ff8;box-shadow:0 0 0 3px rgba(0, 143, 248, 0.2)}.___SBaseTrigger_im4i7_gg_:hover{background-color:rgba(138,142,155,.2)}.___SBaseTrigger_im4i7_gg_:active,.___SBaseTrigger_im4i7_gg_.__active_im4i7_gg_{background-color:rgba(138,142,155,.3)}.___SBaseTrigger_im4i7_gg_.__disabled_im4i7_gg_{opacity:0.3;cursor:default;pointer-events:none}.___SBaseTrigger_im4i7_gg_.__keyboardFocused_im4i7_gg_{z-index:1}.___SInner_im4i7_gg_{display:inline-flex;align-items:center;justify-content:center;height:100%;width:100%}.___SText_im4i7_gg_{display:inline;padding:1px 0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:1.42;flex-grow:1;text-align:left}.___SAddon_im4i7_gg_{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.___SBaseAddon_im4i7_gg_{width:12px;height:12px}.___SBaseTrigger_im4i7_gg_._size_m_im4i7_gg_{min-width:26px;height:28px;border-radius:6px;padding:0 8px;font-size:14px}.___SBaseTrigger_im4i7_gg_._size_m_im4i7_gg_ .___SAddon_im4i7_gg_:not(:only-child):first-child{margin-right:8px}.___SBaseTrigger_im4i7_gg_._size_m_im4i7_gg_ .___SAddon_im4i7_gg_:not(:only-child):last-child{margin-left:8px}.___SBaseTrigger_im4i7_gg_._size_m_im4i7_gg_ .___SAddon_im4i7_gg_:only-child{margin-left:-4px;margin-right:-4px}.___SBaseTrigger_im4i7_gg_._size_l_im4i7_gg_{min-width:32px;height:40px;border-radius:6px;padding:0 12px;font-size:16px}.___SBaseTrigger_im4i7_gg_._size_l_im4i7_gg_ .___SAddon_im4i7_gg_:not(:only-child):first-child{margin-right:8px}.___SBaseTrigger_im4i7_gg_._size_l_im4i7_gg_ .___SAddon_im4i7_gg_:not(:only-child):last-child{margin-left:8px}.___SBaseTrigger_im4i7_gg_._size_l_im4i7_gg_ .___SAddon_im4i7_gg_:only-child{margin-left:-4px;margin-right:-4px}.___SBaseTrigger_im4i7_gg_._neighborLocation_right_im4i7_gg_{border-top-right-radius:0;border-bottom-right-radius:0}.___SBaseTrigger_im4i7_gg_._neighborLocation_both_im4i7_gg_{border-radius:0;margin-left:-1px}.___SBaseTrigger_im4i7_gg_._neighborLocation_left_im4i7_gg_{border-top-left-radius:0;border-bottom-left-radius:0;margin-left:-1px}.___SText_im4i7_gg_.__placeholder_im4i7_gg_{color:#a9abb6}.___SBaseTrigger_im4i7_gg_._state_normal_im4i7_gg_{border-color:#c4c7cf}.___SBaseTrigger_im4i7_gg_._state_valid_im4i7_gg_{border-color:#59ddaa}.___SBaseTrigger_im4i7_gg_._state_invalid_im4i7_gg_{border-color:#ffaeb5}.___SBaseTrigger_im4i7_gg_._state_invalid_im4i7_gg_.__keyboardFocused_im4i7_gg_{border-color:#ff642d;box-shadow:0 0 0 3px rgba(255,100,45,.3)}"
34
34
  /*__inner_css_end__*/
35
- , "15kkn_gg_")
35
+ , "im4i7_gg_")
36
36
  /*__reshadow_css_end__*/
37
37
  , {
38
- "__SBaseTrigger": "___SBaseTrigger_15kkn_gg_",
39
- "_keyboardFocused": "__keyboardFocused_15kkn_gg_",
40
- "_active": "__active_15kkn_gg_",
41
- "_disabled": "__disabled_15kkn_gg_",
42
- "__SInner": "___SInner_15kkn_gg_",
43
- "__SText": "___SText_15kkn_gg_",
44
- "__SAddon": "___SAddon_15kkn_gg_",
45
- "__SBaseAddon": "___SBaseAddon_15kkn_gg_",
46
- "_size_m": "_size_m_15kkn_gg_",
47
- "_size_l": "_size_l_15kkn_gg_",
48
- "_neighborLocation_right": "_neighborLocation_right_15kkn_gg_",
49
- "_neighborLocation_both": "_neighborLocation_both_15kkn_gg_",
50
- "_neighborLocation_left": "_neighborLocation_left_15kkn_gg_",
51
- "_placeholder": "__placeholder_15kkn_gg_",
52
- "_state_normal": "_state_normal_15kkn_gg_",
53
- "_state_valid": "_state_valid_15kkn_gg_",
54
- "_state_invalid": "_state_invalid_15kkn_gg_"
38
+ "__SBaseTrigger": "___SBaseTrigger_im4i7_gg_",
39
+ "_keyboardFocused": "__keyboardFocused_im4i7_gg_",
40
+ "_active": "__active_im4i7_gg_",
41
+ "_disabled": "__disabled_im4i7_gg_",
42
+ "__SInner": "___SInner_im4i7_gg_",
43
+ "__SText": "___SText_im4i7_gg_",
44
+ "__SAddon": "___SAddon_im4i7_gg_",
45
+ "__SBaseAddon": "___SBaseAddon_im4i7_gg_",
46
+ "_size_m": "_size_m_im4i7_gg_",
47
+ "_size_l": "_size_l_im4i7_gg_",
48
+ "_neighborLocation_right": "_neighborLocation_right_im4i7_gg_",
49
+ "_neighborLocation_both": "_neighborLocation_both_im4i7_gg_",
50
+ "_neighborLocation_left": "_neighborLocation_left_im4i7_gg_",
51
+ "_placeholder": "__placeholder_im4i7_gg_",
52
+ "_state_normal": "_state_normal_im4i7_gg_",
53
+ "_state_valid": "_state_valid_im4i7_gg_",
54
+ "_state_invalid": "_state_invalid_im4i7_gg_"
55
55
  });
56
56
 
57
57
  var RootBaseTrigger = /*#__PURE__*/function (_Component) {
@@ -23,13 +23,13 @@ var style = (
23
23
  /*__reshadow_css_start__*/
24
24
  _sstyled.insert(
25
25
  /*__inner_css_start__*/
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_1f17b_gg_ {\n width: 12px;\n height: 12px;\n}\n\n.___SButtonTriggerSpin_1f17b_gg_ {\n fill: #6c6e79;\n}\n"
26
+ ".___SButtonAddon_kxt2p_gg_{width:12px;height:12px}.___SButtonTriggerSpin_kxt2p_gg_{fill:#6c6e79}"
27
27
  /*__inner_css_end__*/
28
- , "1f17b_gg_")
28
+ , "kxt2p_gg_")
29
29
  /*__reshadow_css_end__*/
30
30
  , {
31
- "__SButtonAddon": "___SButtonAddon_1f17b_gg_",
32
- "__SButtonTriggerSpin": "___SButtonTriggerSpin_1f17b_gg_"
31
+ "__SButtonAddon": "___SButtonAddon_kxt2p_gg_",
32
+ "__SButtonTriggerSpin": "___SButtonTriggerSpin_kxt2p_gg_"
33
33
  });
34
34
 
35
35
  var RootButtonTrigger = /*#__PURE__*/function (_Component) {
@@ -33,25 +33,25 @@ var style = (
33
33
  /*__reshadow_css_start__*/
34
34
  _sstyled.insert(
35
35
  /*__inner_css_start__*/
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_ibowk_gg_ {\n border: 1px solid #c4c7cf;\n background: #ffffff;\n color: #191b23\n}\n\n.___SButtonTrigger_ibowk_gg_::-moz-focus-inner {\n border: none;\n padding: 0;\n }\n\n.___SButtonTrigger_ibowk_gg_:active,\n .___SButtonTrigger_ibowk_gg_:hover,\n .___SButtonTrigger_ibowk_gg_:focus {\n outline: 0;\n text-decoration: none;\n }\n\n.___SButtonTrigger_ibowk_gg_:active,\n .___SButtonTrigger_ibowk_gg_:hover,\n .___SButtonTrigger_ibowk_gg_.__active_ibowk_gg_ {\n background-color: rgba(138, 142, 155, 0.2);\n }\n\n.___SButtonTrigger_ibowk_gg_._size_m_ibowk_gg_ {\n min-width: 26px;\n height: 28px;\n border-radius: 6px;\n font-size: 14px;\n}\n\n.___SButtonTrigger_ibowk_gg_._size_l_ibowk_gg_ {\n min-width: 32px;\n height: 40px;\n border-radius: 6px;\n font-size: 16px;\n}\n\n.___SText_ibowk_gg_.__placeholder_ibowk_gg_ {\n color: #a9abb6;\n}\n\n.___SButtonTrigger_ibowk_gg_._state_normal_ibowk_gg_ {\n border-color: #c4c7cf;\n}\n\n.___SButtonTrigger_ibowk_gg_._state_valid_ibowk_gg_ {\n border-color: #59ddaa;\n}\n\n.___SButtonTrigger_ibowk_gg_._state_invalid_ibowk_gg_ {\n border-color: #ffaeb5;\n}\n\n.___SFilterTrigger_ibowk_gg_.__selected_ibowk_gg_ {\n border-color: #008ff8;\n background-color: rgba(0, 143, 248, 0.2);\n color: #191b23\n}\n\n.___SFilterTrigger_ibowk_gg_.__selected_ibowk_gg_.__active_ibowk_gg_,\n .___SFilterTrigger_ibowk_gg_.__selected_ibowk_gg_:hover {\n background: rgba(0, 143, 248, 0.3);\n }\n\n.___SWrapper_ibowk_gg_ {\n display: inline-flex\n}\n\n.___SWrapper_ibowk_gg_:focus {\n outline: none;\n }\n\n.___SWrapper_ibowk_gg_.__keyboardFocused_ibowk_gg_ {\n box-shadow: 0 0 0 3px rgba(0, 143, 248, 0.2);\n}\n\n.___SCounter_ibowk_gg_ {\n background-color: #008ff8;\n}\n"
36
+ ".___SButtonTrigger_15m5u_gg_{border:1px solid #c4c7cf;background:#fff;color:#191b23}.___SButtonTrigger_15m5u_gg_::-moz-focus-inner{border:none;padding:0}.___SButtonTrigger_15m5u_gg_:active,.___SButtonTrigger_15m5u_gg_:focus,.___SButtonTrigger_15m5u_gg_:hover{outline:0;text-decoration:none}.___SButtonTrigger_15m5u_gg_:active,.___SButtonTrigger_15m5u_gg_:hover,.___SButtonTrigger_15m5u_gg_.__active_15m5u_gg_{background-color:rgba(138,142,155,.2)}.___SButtonTrigger_15m5u_gg_._size_m_15m5u_gg_{min-width:26px;height:28px;border-radius:6px;font-size:14px}.___SButtonTrigger_15m5u_gg_._size_l_15m5u_gg_{min-width:32px;height:40px;border-radius:6px;font-size:16px}.___SText_15m5u_gg_.__placeholder_15m5u_gg_{color:#a9abb6}.___SButtonTrigger_15m5u_gg_._state_normal_15m5u_gg_{border-color:#c4c7cf}.___SButtonTrigger_15m5u_gg_._state_valid_15m5u_gg_{border-color:#59ddaa}.___SButtonTrigger_15m5u_gg_._state_invalid_15m5u_gg_{border-color:#ffaeb5}.___SFilterTrigger_15m5u_gg_.__selected_15m5u_gg_{border-color:#008ff8;background-color:rgba(0,143,248,.2);color:#191b23}.___SFilterTrigger_15m5u_gg_.__selected_15m5u_gg_:hover,.___SFilterTrigger_15m5u_gg_.__selected_15m5u_gg_.__active_15m5u_gg_{background:rgba(0,143,248,.3)}.___SWrapper_15m5u_gg_{display:inline-flex}.___SWrapper_15m5u_gg_:focus{outline:none}.___SWrapper_15m5u_gg_.__keyboardFocused_15m5u_gg_{box-shadow:0 0 0 3px rgba(0, 143, 248, 0.2)}.___SCounter_15m5u_gg_{background-color:#008ff8}"
37
37
  /*__inner_css_end__*/
38
- , "ibowk_gg_")
38
+ , "15m5u_gg_")
39
39
  /*__reshadow_css_end__*/
40
40
  , {
41
- "__SButtonTrigger": "___SButtonTrigger_ibowk_gg_",
42
- "_active": "__active_ibowk_gg_",
43
- "_size_m": "_size_m_ibowk_gg_",
44
- "_size_l": "_size_l_ibowk_gg_",
45
- "__SText": "___SText_ibowk_gg_",
46
- "_placeholder": "__placeholder_ibowk_gg_",
47
- "_state_normal": "_state_normal_ibowk_gg_",
48
- "_state_valid": "_state_valid_ibowk_gg_",
49
- "_state_invalid": "_state_invalid_ibowk_gg_",
50
- "__SFilterTrigger": "___SFilterTrigger_ibowk_gg_",
51
- "_selected": "__selected_ibowk_gg_",
52
- "__SWrapper": "___SWrapper_ibowk_gg_",
53
- "_keyboardFocused": "__keyboardFocused_ibowk_gg_",
54
- "__SCounter": "___SCounter_ibowk_gg_"
41
+ "__SButtonTrigger": "___SButtonTrigger_15m5u_gg_",
42
+ "_active": "__active_15m5u_gg_",
43
+ "_size_m": "_size_m_15m5u_gg_",
44
+ "_size_l": "_size_l_15m5u_gg_",
45
+ "__SText": "___SText_15m5u_gg_",
46
+ "_placeholder": "__placeholder_15m5u_gg_",
47
+ "_state_normal": "_state_normal_15m5u_gg_",
48
+ "_state_valid": "_state_valid_15m5u_gg_",
49
+ "_state_invalid": "_state_invalid_15m5u_gg_",
50
+ "__SFilterTrigger": "___SFilterTrigger_15m5u_gg_",
51
+ "_selected": "__selected_15m5u_gg_",
52
+ "__SWrapper": "___SWrapper_15m5u_gg_",
53
+ "_keyboardFocused": "__keyboardFocused_15m5u_gg_",
54
+ "__SCounter": "___SCounter_15m5u_gg_"
55
55
  });
56
56
 
57
57
  var RootFilterTrigger = /*#__PURE__*/function (_Component) {
@@ -94,7 +94,14 @@ var RootFilterTrigger = /*#__PURE__*/function (_Component) {
94
94
  placeholder = _this$asProps.placeholder,
95
95
  active = _this$asProps.active,
96
96
  disabled = _this$asProps.disabled;
97
- return _ref3 = sstyled(styles), /*#__PURE__*/React.createElement(SWrapper, _ref3.cn("SWrapper", _objectSpread({}, _assignProps({}, _ref))), /*#__PURE__*/React.createElement(NeighborLocation, _ref3.cn("NeighborLocation", {}), /*#__PURE__*/React.createElement(SFilterTrigger, _ref3.cn("SFilterTrigger", {
97
+
98
+ if (this.asProps.role === 'button') {
99
+ this.asProps.role = 'group';
100
+ }
101
+
102
+ return _ref3 = sstyled(styles), /*#__PURE__*/React.createElement(SWrapper, _ref3.cn("SWrapper", _objectSpread({}, _assignProps({
103
+ "aria-label": "Filter"
104
+ }, _ref))), /*#__PURE__*/React.createElement(NeighborLocation, _ref3.cn("NeighborLocation", {}), /*#__PURE__*/React.createElement(SFilterTrigger, _ref3.cn("SFilterTrigger", {
98
105
  "w": "100%",
99
106
  "size": size,
100
107
  "placeholder": placeholder,
@@ -106,6 +113,7 @@ var RootFilterTrigger = /*#__PURE__*/function (_Component) {
106
113
  tag: ChevronDown
107
114
  })), !empty && /*#__PURE__*/React.createElement(SFilterTrigger, _ref3.cn("SFilterTrigger", {
108
115
  "tag": "button",
116
+ "aria-label": "Clear",
109
117
  "size": size,
110
118
  "empty": empty,
111
119
  "selected": true,
@@ -1 +1 @@
1
- {"version":3,"file":"FilterTrigger.js","names":["React","createComponent","Component","Root","sstyled","BaseTrigger","Box","NeighborLocation","Dot","Close","ChevronDown","callAllEventHandlers","addonTextChildren","RootFilterTrigger","e","stopPropagation","SWrapper","SFilterTrigger","asProps","Children","styles","empty","onClear","size","placeholder","active","disabled","FilterTrigger","Text","Addon","Counter","handleStopPropagation","style","props","SCounter","parent"],"sources":["../../src/FilterTrigger.jsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { Component, Root, sstyled } from '@semcore/core';\nimport BaseTrigger from './BaseTrigger';\nimport { Box } from '@semcore/flex-box';\nimport NeighborLocation from '@semcore/neighbor-location';\nimport Dot from '@semcore/dot';\nimport Close from '@semcore/icon/Close/m';\nimport ChevronDown from '@semcore/icon/ChevronDown/m';\nimport { callAllEventHandlers } from '@semcore/utils/lib/assignProps';\nimport addonTextChildren from '@semcore/utils/lib/addonTextChildren';\n\nimport style from './style/filter-trigger.shadow.css';\n\nclass RootFilterTrigger extends Component {\n static displayName = 'FilterTrigger';\n static style = style;\n\n handleStopPropagation = (e) => e.stopPropagation();\n\n render() {\n const SWrapper = Root;\n const SFilterTrigger = BaseTrigger;\n const { Children, styles, empty, onClear, size, placeholder, active, disabled } = this.asProps;\n\n return sstyled(styles)(\n <SWrapper render={Box}>\n <NeighborLocation>\n <SFilterTrigger\n w=\"100%\"\n size={size}\n placeholder={placeholder}\n empty={empty}\n selected={!empty}\n active={active}\n disabled={disabled}\n >\n {addonTextChildren(\n Children,\n FilterTrigger.Text,\n [FilterTrigger.Addon, FilterTrigger.Counter],\n empty,\n )}\n {empty && <FilterTrigger.Addon tag={ChevronDown} />}\n </SFilterTrigger>\n {!empty && (\n <SFilterTrigger\n tag=\"button\"\n size={size}\n empty={empty}\n selected\n onClick={callAllEventHandlers(onClear, this.handleStopPropagation)}\n onKeyDown={this.handleStopPropagation}\n disabled={disabled}\n >\n <FilterTrigger.Addon tag={Close} />\n </SFilterTrigger>\n )}\n </NeighborLocation>\n </SWrapper>,\n );\n }\n}\n\nfunction Counter(props) {\n const SCounter = Root;\n return sstyled(props.styles)(<SCounter render={BaseTrigger.Addon} tag={Dot} />);\n}\n\nconst FilterTrigger = createComponent(\n RootFilterTrigger,\n {\n Text: BaseTrigger.Text,\n Addon: BaseTrigger.Addon,\n Counter,\n },\n {\n parent: BaseTrigger,\n },\n);\n\nexport default FilterTrigger;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,eAAP,IAA0BC,SAA1B,EAAqCC,IAArC,EAA2CC,OAA3C,QAA0D,eAA1D;AACA,OAAOC,WAAP,MAAwB,eAAxB;AACA,SAASC,GAAT,QAAoB,mBAApB;AACA,OAAOC,gBAAP,MAA6B,4BAA7B;AACA,OAAOC,GAAP,MAAgB,cAAhB;AACA,OAAOC,KAAP,MAAkB,uBAAlB;AACA,OAAOC,WAAP,MAAwB,6BAAxB;AACA,SAASC,oBAAT,QAAqC,gCAArC;AACA,OAAOC,iBAAP,MAA8B,sCAA9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIMC,iB;;;;;;;;;;;;;;;;4EAIoB,UAACC,CAAD;MAAA,OAAOA,CAAC,CAACC,eAAF,EAAP;IAAA,C;;;;;;;WAExB,kBAAS;MAAA;MAAA;;MACP,IAAMC,QAAQ,GAKMV,GALpB;MACA,IAAMW,cAAc,GAAGZ,WAAvB;MACA,oBAAkF,KAAKa,OAAvF;MAAA,IAAQC,QAAR,iBAAQA,QAAR;MAAA,IAAkBC,MAAlB,iBAAkBA,MAAlB;MAAA,IAA0BC,KAA1B,iBAA0BA,KAA1B;MAAA,IAAiCC,OAAjC,iBAAiCA,OAAjC;MAAA,IAA0CC,IAA1C,iBAA0CA,IAA1C;MAAA,IAAgDC,WAAhD,iBAAgDA,WAAhD;MAAA,IAA6DC,MAA7D,iBAA6DA,MAA7D;MAAA,IAAqEC,QAArE,iBAAqEA,QAArE;MAEA,eAAOtB,OAAO,CAACgB,MAAD,CAAd,eACE,oBAAC,QAAD,gFACE,oBAAC,gBAAD,iDACE,oBAAC,cAAD;QAAA,KACI,MADJ;QAAA,QAEQG,IAFR;QAAA,eAGeC,WAHf;QAAA,SAISH,KAJT;QAAA,YAKY,CAACA,KALb;QAAA,UAMUI,MANV;QAAA,YAOYC;MAPZ,IASGd,iBAAiB,CAChBO,QADgB,EAEhBQ,aAAa,CAACC,IAFE,EAGhB,CAACD,aAAa,CAACE,KAAf,EAAsBF,aAAa,CAACG,OAApC,CAHgB,EAIhBT,KAJgB,CATpB,EAeGA,KAAK,iBAAI,oBAAC,aAAD,CAAe,KAAf;QAAqB,GAAG,EAAEX;MAA1B,EAfZ,CADF,EAkBG,CAACW,KAAD,iBACC,oBAAC,cAAD;QAAA,OACM,QADN;QAAA,QAEQE,IAFR;QAAA,SAGSF,KAHT;QAAA;QAAA,WAKWV,oBAAoB,CAACW,OAAD,EAAU,KAAKS,qBAAf,CAL/B;QAAA,aAMa,KAAKA,qBANlB;QAAA,YAOYL;MAPZ,iBASE,oBAAC,aAAD,CAAe,KAAf;QAAqB,GAAG,EAAEjB;MAA1B,EATF,CAnBJ,CADF,CADF;IAoCD;;;;EA/C6BP,S;;gBAA1BW,iB,iBACiB,e;;gBADjBA,iB,WAEWmB,K;;AAgDjB,SAASF,OAAT,CAAiBG,KAAjB,EAAwB;EAAA;EAAA;;EACtB,IAAMC,QAAQ,GACiC7B,WAAW,CAACwB,KAD3D;EACA,eAAOzB,OAAO,CAAC6B,KAAK,CAACb,MAAP,CAAd,eAA6B,oBAAC,QAAD;IAAA,OAA0CZ;EAA1C,YAA7B;AACD;;AAED,IAAMmB,aAAa,GAAG1B,eAAe,CACnCY,iBADmC,EAEnC;EACEe,IAAI,EAAEvB,WAAW,CAACuB,IADpB;EAEEC,KAAK,EAAExB,WAAW,CAACwB,KAFrB;EAGEC,OAAO,EAAPA;AAHF,CAFmC,EAOnC;EACEK,MAAM,EAAE9B;AADV,CAPmC,CAArC;AAYA,eAAesB,aAAf"}
1
+ {"version":3,"file":"FilterTrigger.js","names":["React","createComponent","Component","Root","sstyled","BaseTrigger","Box","NeighborLocation","Dot","Close","ChevronDown","callAllEventHandlers","addonTextChildren","RootFilterTrigger","e","stopPropagation","SWrapper","SFilterTrigger","asProps","Children","styles","empty","onClear","size","placeholder","active","disabled","role","FilterTrigger","Text","Addon","Counter","handleStopPropagation","style","props","SCounter","parent"],"sources":["../../src/FilterTrigger.jsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { Component, Root, sstyled } from '@semcore/core';\nimport BaseTrigger from './BaseTrigger';\nimport { Box } from '@semcore/flex-box';\nimport NeighborLocation from '@semcore/neighbor-location';\nimport Dot from '@semcore/dot';\nimport Close from '@semcore/icon/Close/m';\nimport ChevronDown from '@semcore/icon/ChevronDown/m';\nimport { callAllEventHandlers } from '@semcore/utils/lib/assignProps';\nimport addonTextChildren from '@semcore/utils/lib/addonTextChildren';\n\nimport style from './style/filter-trigger.shadow.css';\n\nclass RootFilterTrigger extends Component {\n static displayName = 'FilterTrigger';\n static style = style;\n\n handleStopPropagation = (e) => e.stopPropagation();\n\n render() {\n const SWrapper = Root;\n const SFilterTrigger = BaseTrigger;\n const { Children, styles, empty, onClear, size, placeholder, active, disabled } = this.asProps;\n\n if (this.asProps.role === 'button') {\n this.asProps.role = 'group';\n }\n\n return sstyled(styles)(\n <SWrapper render={Box} aria-label=\"Filter\">\n <NeighborLocation>\n <SFilterTrigger\n w=\"100%\"\n size={size}\n placeholder={placeholder}\n empty={empty}\n selected={!empty}\n active={active}\n disabled={disabled}\n >\n {addonTextChildren(\n Children,\n FilterTrigger.Text,\n [FilterTrigger.Addon, FilterTrigger.Counter],\n empty,\n )}\n {empty && <FilterTrigger.Addon tag={ChevronDown} />}\n </SFilterTrigger>\n {!empty && (\n <SFilterTrigger\n tag=\"button\"\n aria-label=\"Clear\"\n size={size}\n empty={empty}\n selected\n onClick={callAllEventHandlers(onClear, this.handleStopPropagation)}\n onKeyDown={this.handleStopPropagation}\n disabled={disabled}\n >\n <FilterTrigger.Addon tag={Close} />\n </SFilterTrigger>\n )}\n </NeighborLocation>\n </SWrapper>,\n );\n }\n}\n\nfunction Counter(props) {\n const SCounter = Root;\n return sstyled(props.styles)(<SCounter render={BaseTrigger.Addon} tag={Dot} />);\n}\n\nconst FilterTrigger = createComponent(\n RootFilterTrigger,\n {\n Text: BaseTrigger.Text,\n Addon: BaseTrigger.Addon,\n Counter,\n },\n {\n parent: BaseTrigger,\n },\n);\n\nexport default FilterTrigger;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,eAAP,IAA0BC,SAA1B,EAAqCC,IAArC,EAA2CC,OAA3C,QAA0D,eAA1D;AACA,OAAOC,WAAP,MAAwB,eAAxB;AACA,SAASC,GAAT,QAAoB,mBAApB;AACA,OAAOC,gBAAP,MAA6B,4BAA7B;AACA,OAAOC,GAAP,MAAgB,cAAhB;AACA,OAAOC,KAAP,MAAkB,uBAAlB;AACA,OAAOC,WAAP,MAAwB,6BAAxB;AACA,SAASC,oBAAT,QAAqC,gCAArC;AACA,OAAOC,iBAAP,MAA8B,sCAA9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIMC,iB;;;;;;;;;;;;;;;;4EAIoB,UAACC,CAAD;MAAA,OAAOA,CAAC,CAACC,eAAF,EAAP;IAAA,C;;;;;;;WAExB,kBAAS;MAAA;MAAA;;MACP,IAAMC,QAAQ,GASMV,GATpB;MACA,IAAMW,cAAc,GAAGZ,WAAvB;MACA,oBAAkF,KAAKa,OAAvF;MAAA,IAAQC,QAAR,iBAAQA,QAAR;MAAA,IAAkBC,MAAlB,iBAAkBA,MAAlB;MAAA,IAA0BC,KAA1B,iBAA0BA,KAA1B;MAAA,IAAiCC,OAAjC,iBAAiCA,OAAjC;MAAA,IAA0CC,IAA1C,iBAA0CA,IAA1C;MAAA,IAAgDC,WAAhD,iBAAgDA,WAAhD;MAAA,IAA6DC,MAA7D,iBAA6DA,MAA7D;MAAA,IAAqEC,QAArE,iBAAqEA,QAArE;;MAEA,IAAI,KAAKR,OAAL,CAAaS,IAAb,KAAsB,QAA1B,EAAoC;QAClC,KAAKT,OAAL,CAAaS,IAAb,GAAoB,OAApB;MACD;;MAED,eAAOvB,OAAO,CAACgB,MAAD,CAAd,eACE,oBAAC,QAAD;QAAA,cAAkC;MAAlC,yBACE,oBAAC,gBAAD,iDACE,oBAAC,cAAD;QAAA,KACI,MADJ;QAAA,QAEQG,IAFR;QAAA,eAGeC,WAHf;QAAA,SAISH,KAJT;QAAA,YAKY,CAACA,KALb;QAAA,UAMUI,MANV;QAAA,YAOYC;MAPZ,IASGd,iBAAiB,CAChBO,QADgB,EAEhBS,aAAa,CAACC,IAFE,EAGhB,CAACD,aAAa,CAACE,KAAf,EAAsBF,aAAa,CAACG,OAApC,CAHgB,EAIhBV,KAJgB,CATpB,EAeGA,KAAK,iBAAI,oBAAC,aAAD,CAAe,KAAf;QAAqB,GAAG,EAAEX;MAA1B,EAfZ,CADF,EAkBG,CAACW,KAAD,iBACC,oBAAC,cAAD;QAAA,OACM,QADN;QAAA,cAEa,OAFb;QAAA,QAGQE,IAHR;QAAA,SAISF,KAJT;QAAA;QAAA,WAMWV,oBAAoB,CAACW,OAAD,EAAU,KAAKU,qBAAf,CAN/B;QAAA,aAOa,KAAKA,qBAPlB;QAAA,YAQYN;MARZ,iBAUE,oBAAC,aAAD,CAAe,KAAf;QAAqB,GAAG,EAAEjB;MAA1B,EAVF,CAnBJ,CADF,CADF;IAqCD;;;;EApD6BP,S;;gBAA1BW,iB,iBACiB,e;;gBADjBA,iB,WAEWoB,K;;AAqDjB,SAASF,OAAT,CAAiBG,KAAjB,EAAwB;EAAA;EAAA;;EACtB,IAAMC,QAAQ,GACiC9B,WAAW,CAACyB,KAD3D;EACA,eAAO1B,OAAO,CAAC8B,KAAK,CAACd,MAAP,CAAd,eAA6B,oBAAC,QAAD;IAAA,OAA0CZ;EAA1C,YAA7B;AACD;;AAED,IAAMoB,aAAa,GAAG3B,eAAe,CACnCY,iBADmC,EAEnC;EACEgB,IAAI,EAAExB,WAAW,CAACwB,IADpB;EAEEC,KAAK,EAAEzB,WAAW,CAACyB,KAFrB;EAGEC,OAAO,EAAPA;AAHF,CAFmC,EAOnC;EACEK,MAAM,EAAE/B;AADV,CAPmC,CAArC;AAYA,eAAeuB,aAAf"}
@@ -31,23 +31,23 @@ var style = (
31
31
  /*__reshadow_css_start__*/
32
32
  _sstyled.insert(
33
33
  /*__inner_css_start__*/
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_1864k_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_1864k_gg_.__active_1864k_gg_,\n .___SLinkTrigger_1864k_gg_:hover,\n .___SLinkTrigger_1864k_gg_:active {\n color: #044792\n }\n\n.___SLinkTrigger_1864k_gg_.__active_1864k_gg_ .___SText_1864k_gg_, .___SLinkTrigger_1864k_gg_:hover .___SText_1864k_gg_, .___SLinkTrigger_1864k_gg_:active .___SText_1864k_gg_ {\n border-color: currentColor;\n }\n\n.___SLinkTrigger_1864k_gg_ .___SText_1864k_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_1864k_gg_.__color_1864k_gg_ {\n color: var(--color_1864k)\n}\n\n.___SLinkTrigger_1864k_gg_.__color_1864k_gg_:hover {\n color: var(--color-hover_1864k);\n }\n\n.___SLinkTrigger_1864k_gg_.__disabled_1864k_gg_ {\n opacity: 0.3;\n cursor: default;\n pointer-events: none;\n}\n\n.___SLinkTrigger_1864k_gg_.__keyboardFocused_1864k_gg_ {\n box-shadow: 0 0 0 3px rgba(0, 143, 248, 0.2);\n z-index: 1;\n}\n\n.___SAddon_1864k_gg_,\n.___SLinkAddon_1864k_gg_ {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0\n}\n\n.___SAddon_1864k_gg_:not(:only-child):first-child, .___SLinkAddon_1864k_gg_:not(:only-child):first-child {\n margin-right: 4px;\n }\n\n.___SAddon_1864k_gg_:not(:only-child):last-child, .___SLinkAddon_1864k_gg_:not(:only-child):last-child {\n margin-left: 4px;\n }\n\n.___SLinkAddon_1864k_gg_ {\n width: 16px;\n height: 16px;\n}\n\n.___SLinkTrigger_1864k_gg_._size_m_1864k_gg_ {\n font-size: 14px;\n}\n\n.___SLinkTrigger_1864k_gg_._size_l_1864k_gg_ {\n font-size: 16px;\n}\n\n@media (prefers-reduced-motion) {\n .___SLinkTrigger_1864k_gg_ {\n transition: none\n }\n .___SLinkTrigger_1864k_gg_ .___SText_1864k_gg_ {\n transition: none;\n }\n}\n"
34
+ ".___SLinkTrigger_x7ew0_gg_{display:inline-flex;align-items:center;line-height:normal;position:relative;touch-action:manipulation;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;user-select:none;box-sizing:border-box;padding:0;margin:0;outline:none;text-decoration:none;-webkit-tap-highlight-color:transparent;overflow:visible;outline:0;vertical-align:middle;font-family:Inter,sans-serif;cursor:pointer;color:#006dca;background:none;transition:color .15s ease-in-out}.___SLinkTrigger_x7ew0_gg_:active,.___SLinkTrigger_x7ew0_gg_:hover,.___SLinkTrigger_x7ew0_gg_.__active_x7ew0_gg_{color:#044792}.___SLinkTrigger_x7ew0_gg_:active .___SText_x7ew0_gg_,.___SLinkTrigger_x7ew0_gg_:hover .___SText_x7ew0_gg_,.___SLinkTrigger_x7ew0_gg_.__active_x7ew0_gg_ .___SText_x7ew0_gg_{border-color:currentColor}.___SLinkTrigger_x7ew0_gg_ .___SText_x7ew0_gg_{border-bottom-width:1px;border-bottom-style:solid;border-color:transparent;transition:border-bottom-color .15s ease-in-out;line-height:1.42}.___SLinkTrigger_x7ew0_gg_.__color_x7ew0_gg_{color:var(--color_x7ew0)}.___SLinkTrigger_x7ew0_gg_.__color_x7ew0_gg_:hover{color:var(--color-hover_x7ew0)}.___SLinkTrigger_x7ew0_gg_.__disabled_x7ew0_gg_{opacity:0.3;cursor:default;pointer-events:none}.___SLinkTrigger_x7ew0_gg_.__keyboardFocused_x7ew0_gg_{box-shadow:0 0 0 3px rgba(0, 143, 248, 0.2);z-index:1}.___SAddon_x7ew0_gg_,.___SLinkAddon_x7ew0_gg_{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.___SAddon_x7ew0_gg_:not(:only-child):first-child,.___SLinkAddon_x7ew0_gg_:not(:only-child):first-child{margin-right:4px}.___SAddon_x7ew0_gg_:not(:only-child):last-child,.___SLinkAddon_x7ew0_gg_:not(:only-child):last-child{margin-left:4px}.___SLinkAddon_x7ew0_gg_{width:16px;height:16px}.___SLinkTrigger_x7ew0_gg_._size_m_x7ew0_gg_{font-size:14px}.___SLinkTrigger_x7ew0_gg_._size_l_x7ew0_gg_{font-size:16px}@media (prefers-reduced-motion){.___SLinkTrigger_x7ew0_gg_{transition:none}.___SLinkTrigger_x7ew0_gg_ .___SText_x7ew0_gg_{transition:none}}"
35
35
  /*__inner_css_end__*/
36
- , "1864k_gg_")
36
+ , "x7ew0_gg_")
37
37
  /*__reshadow_css_end__*/
38
38
  , {
39
- "__SLinkTrigger": "___SLinkTrigger_1864k_gg_",
40
- "_active": "__active_1864k_gg_",
41
- "__SText": "___SText_1864k_gg_",
42
- "_color": "__color_1864k_gg_",
43
- "--color": "--color_1864k",
44
- "--color-hover": "--color-hover_1864k",
45
- "_disabled": "__disabled_1864k_gg_",
46
- "_keyboardFocused": "__keyboardFocused_1864k_gg_",
47
- "__SAddon": "___SAddon_1864k_gg_",
48
- "__SLinkAddon": "___SLinkAddon_1864k_gg_",
49
- "_size_m": "_size_m_1864k_gg_",
50
- "_size_l": "_size_l_1864k_gg_"
39
+ "__SLinkTrigger": "___SLinkTrigger_x7ew0_gg_",
40
+ "_active": "__active_x7ew0_gg_",
41
+ "__SText": "___SText_x7ew0_gg_",
42
+ "_color": "__color_x7ew0_gg_",
43
+ "--color": "--color_x7ew0",
44
+ "--color-hover": "--color-hover_x7ew0",
45
+ "_disabled": "__disabled_x7ew0_gg_",
46
+ "_keyboardFocused": "__keyboardFocused_x7ew0_gg_",
47
+ "__SAddon": "___SAddon_x7ew0_gg_",
48
+ "__SLinkAddon": "___SLinkAddon_x7ew0_gg_",
49
+ "_size_m": "_size_m_x7ew0_gg_",
50
+ "_size_l": "_size_l_x7ew0_gg_"
51
51
  });
52
52
 
53
53
  var RootLinkTrigger = /*#__PURE__*/function (_Component) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@semcore/base-trigger",
3
3
  "description": "Semrush BaseTrigger Component",
4
- "version": "3.2.4",
4
+ "version": "3.2.6",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",
@@ -9,12 +9,12 @@
9
9
  "author": "UI-kit team <ui-kit-team@semrush.com>",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
- "@semcore/utils": "^3.29",
13
12
  "@semcore/dot": "^4.0.0",
14
13
  "@semcore/flex-box": "^4",
15
14
  "@semcore/icon": "2.16 - 3",
16
15
  "@semcore/neighbor-location": "^3",
17
- "@semcore/spin": "^4"
16
+ "@semcore/spin": "^4",
17
+ "@semcore/utils": "^3.29"
18
18
  },
19
19
  "peerDependencies": {
20
20
  "@semcore/core": "^1.11",
@@ -29,8 +29,10 @@
29
29
  "directory": "semcore/base-trigger"
30
30
  },
31
31
  "devDependencies": {
32
- "@types/react": "18.0.21",
33
- "@semcore/jest-preset-ui": "1.0.0"
32
+ "@guidepup/playwright": "0.6.1",
33
+ "@playwright/test": "1.25.1",
34
+ "@semcore/jest-preset-ui": "1.0.0",
35
+ "@types/react": "18.0.21"
34
36
  },
35
37
  "scripts": {
36
38
  "build": "pnpm semcore-builder --source=js",