@semcore/base-trigger 3.0.24 → 3.2.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 CHANGED
@@ -2,6 +2,19 @@
2
2
 
3
3
  CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
+ ## [3.2.0] - 2022-10-10
6
+
7
+ ### Changed
8
+
9
+ - Added support for React 18 🔥
10
+ - Extended version range for dependency `@semcore/icons`.
11
+
12
+ ## [3.1.0] - 2022-10-07
13
+
14
+ ### Changed
15
+
16
+ - Updated major dependency `@semcore/neighbor-location` [2.3.15 ~> 3.0.0]
17
+
5
18
  ## [3.0.24] - 2022-10-06
6
19
 
7
20
  ### 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
- ":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_s5ggo_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_s5ggo_gg_::-moz-focus-inner {\n border: none;\n padding: 0;\n }\n\n.___SBaseTrigger_s5ggo_gg_:active,\n .___SBaseTrigger_s5ggo_gg_:hover,\n .___SBaseTrigger_s5ggo_gg_:focus {\n outline: 0;\n text-decoration: none;\n }\n\n.___SBaseTrigger_s5ggo_gg_.__keyboardFocused_s5ggo_gg_ {\n border: 1px solid #008ff8;\n box-shadow: 0 0 0 3px rgba(0, 143, 248, 0.2);\n }\n\n.___SBaseTrigger_s5ggo_gg_:hover {\n background-color: rgba(138, 142, 155, 0.2);\n }\n\n.___SBaseTrigger_s5ggo_gg_:active,\n .___SBaseTrigger_s5ggo_gg_.__active_s5ggo_gg_ {\n background-color: rgba(138, 142, 155, 0.3);\n }\n\n.___SBaseTrigger_s5ggo_gg_.__disabled_s5ggo_gg_ {\n opacity: 0.3;\n cursor: default;\n pointer-events: none; /* Disable link interactions */\n}\n\n.___SBaseTrigger_s5ggo_gg_.__keyboardFocused_s5ggo_gg_ {\n z-index: 1;\n}\n\n.___SInner_s5ggo_gg_ {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n}\n\n.___SText_s5ggo_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_s5ggo_gg_ {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.___SBaseAddon_s5ggo_gg_ {\n width: 12px;\n height: 12px;\n}\n\n.___SBaseTrigger_s5ggo_gg_._size_m_s5ggo_gg_ {\n min-width: 26px;\n height: 28px;\n border-radius: 6px;\n padding: 0 8px;\n font-size: 14px\n}\n\n.___SBaseTrigger_s5ggo_gg_._size_m_s5ggo_gg_ .___SAddon_s5ggo_gg_:not(:only-child):first-child {\n margin-right: 8px;\n }\n\n.___SBaseTrigger_s5ggo_gg_._size_m_s5ggo_gg_ .___SAddon_s5ggo_gg_:not(:only-child):last-child {\n margin-left: 8px;\n }\n\n.___SBaseTrigger_s5ggo_gg_._size_m_s5ggo_gg_ .___SAddon_s5ggo_gg_:only-child {\n margin-left: -4px;\n margin-right: -4px;\n }\n\n.___SBaseTrigger_s5ggo_gg_._size_l_s5ggo_gg_ {\n min-width: 32px;\n height: 40px;\n border-radius: 6px;\n padding: 0 12px;\n font-size: 16px\n}\n\n.___SBaseTrigger_s5ggo_gg_._size_l_s5ggo_gg_ .___SAddon_s5ggo_gg_:not(:only-child):first-child {\n margin-right: 8px;\n }\n\n.___SBaseTrigger_s5ggo_gg_._size_l_s5ggo_gg_ .___SAddon_s5ggo_gg_:not(:only-child):last-child {\n margin-left: 8px;\n }\n\n.___SBaseTrigger_s5ggo_gg_._size_l_s5ggo_gg_ .___SAddon_s5ggo_gg_:only-child {\n margin-left: -4px;\n margin-right: -4px;\n }\n\n.___SBaseTrigger_s5ggo_gg_._neighborLocation_right_s5ggo_gg_ {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.___SBaseTrigger_s5ggo_gg_._neighborLocation_both_s5ggo_gg_ {\n border-radius: 0;\n margin-left: -1px;\n}\n\n.___SBaseTrigger_s5ggo_gg_._neighborLocation_left_s5ggo_gg_ {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n margin-left: -1px;\n}\n\n.___SText_s5ggo_gg_.__placeholder_s5ggo_gg_ {\n color: #a9abb6;\n}\n\n.___SBaseTrigger_s5ggo_gg_._state_normal_s5ggo_gg_ {\n border-color: #c4c7cf;\n}\n\n.___SBaseTrigger_s5ggo_gg_._state_valid_s5ggo_gg_ {\n border-color: #59ddaa;\n}\n\n.___SBaseTrigger_s5ggo_gg_._state_invalid_s5ggo_gg_ {\n border-color: #ffaeb5\n}\n\n.___SBaseTrigger_s5ggo_gg_._state_invalid_s5ggo_gg_.__keyboardFocused_s5ggo_gg_ {\n border-color: #ff642d;\n box-shadow: 0 0 0 3px rgba(255, 100, 45, 0.3);\n }\n"
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_157ei_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_157ei_gg_::-moz-focus-inner {\n border: none;\n padding: 0;\n }\n\n.___SBaseTrigger_157ei_gg_:active,\n .___SBaseTrigger_157ei_gg_:hover,\n .___SBaseTrigger_157ei_gg_:focus {\n outline: 0;\n text-decoration: none;\n }\n\n.___SBaseTrigger_157ei_gg_.__keyboardFocused_157ei_gg_ {\n border: 1px solid #008ff8;\n box-shadow: 0 0 0 3px rgba(0, 143, 248, 0.2);\n }\n\n.___SBaseTrigger_157ei_gg_:hover {\n background-color: rgba(138, 142, 155, 0.2);\n }\n\n.___SBaseTrigger_157ei_gg_:active,\n .___SBaseTrigger_157ei_gg_.__active_157ei_gg_ {\n background-color: rgba(138, 142, 155, 0.3);\n }\n\n.___SBaseTrigger_157ei_gg_.__disabled_157ei_gg_ {\n opacity: 0.3;\n cursor: default;\n pointer-events: none; /* Disable link interactions */\n}\n\n.___SBaseTrigger_157ei_gg_.__keyboardFocused_157ei_gg_ {\n z-index: 1;\n}\n\n.___SInner_157ei_gg_ {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n}\n\n.___SText_157ei_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_157ei_gg_ {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.___SBaseAddon_157ei_gg_ {\n width: 12px;\n height: 12px;\n}\n\n.___SBaseTrigger_157ei_gg_._size_m_157ei_gg_ {\n min-width: 26px;\n height: 28px;\n border-radius: 6px;\n padding: 0 8px;\n font-size: 14px\n}\n\n.___SBaseTrigger_157ei_gg_._size_m_157ei_gg_ .___SAddon_157ei_gg_:not(:only-child):first-child {\n margin-right: 8px;\n }\n\n.___SBaseTrigger_157ei_gg_._size_m_157ei_gg_ .___SAddon_157ei_gg_:not(:only-child):last-child {\n margin-left: 8px;\n }\n\n.___SBaseTrigger_157ei_gg_._size_m_157ei_gg_ .___SAddon_157ei_gg_:only-child {\n margin-left: -4px;\n margin-right: -4px;\n }\n\n.___SBaseTrigger_157ei_gg_._size_l_157ei_gg_ {\n min-width: 32px;\n height: 40px;\n border-radius: 6px;\n padding: 0 12px;\n font-size: 16px\n}\n\n.___SBaseTrigger_157ei_gg_._size_l_157ei_gg_ .___SAddon_157ei_gg_:not(:only-child):first-child {\n margin-right: 8px;\n }\n\n.___SBaseTrigger_157ei_gg_._size_l_157ei_gg_ .___SAddon_157ei_gg_:not(:only-child):last-child {\n margin-left: 8px;\n }\n\n.___SBaseTrigger_157ei_gg_._size_l_157ei_gg_ .___SAddon_157ei_gg_:only-child {\n margin-left: -4px;\n margin-right: -4px;\n }\n\n.___SBaseTrigger_157ei_gg_._neighborLocation_right_157ei_gg_ {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.___SBaseTrigger_157ei_gg_._neighborLocation_both_157ei_gg_ {\n border-radius: 0;\n margin-left: -1px;\n}\n\n.___SBaseTrigger_157ei_gg_._neighborLocation_left_157ei_gg_ {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n margin-left: -1px;\n}\n\n.___SText_157ei_gg_.__placeholder_157ei_gg_ {\n color: #a9abb6;\n}\n\n.___SBaseTrigger_157ei_gg_._state_normal_157ei_gg_ {\n border-color: #c4c7cf;\n}\n\n.___SBaseTrigger_157ei_gg_._state_valid_157ei_gg_ {\n border-color: #59ddaa;\n}\n\n.___SBaseTrigger_157ei_gg_._state_invalid_157ei_gg_ {\n border-color: #ffaeb5\n}\n\n.___SBaseTrigger_157ei_gg_._state_invalid_157ei_gg_.__keyboardFocused_157ei_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
- , "s5ggo_gg_")
57
+ , "157ei_gg_")
58
58
  /*__reshadow_css_end__*/
59
59
  , {
60
- "__SBaseTrigger": "___SBaseTrigger_s5ggo_gg_",
61
- "_keyboardFocused": "__keyboardFocused_s5ggo_gg_",
62
- "_active": "__active_s5ggo_gg_",
63
- "_disabled": "__disabled_s5ggo_gg_",
64
- "__SInner": "___SInner_s5ggo_gg_",
65
- "__SText": "___SText_s5ggo_gg_",
66
- "__SAddon": "___SAddon_s5ggo_gg_",
67
- "__SBaseAddon": "___SBaseAddon_s5ggo_gg_",
68
- "_size_m": "_size_m_s5ggo_gg_",
69
- "_size_l": "_size_l_s5ggo_gg_",
70
- "_neighborLocation_right": "_neighborLocation_right_s5ggo_gg_",
71
- "_neighborLocation_both": "_neighborLocation_both_s5ggo_gg_",
72
- "_neighborLocation_left": "_neighborLocation_left_s5ggo_gg_",
73
- "_placeholder": "__placeholder_s5ggo_gg_",
74
- "_state_normal": "_state_normal_s5ggo_gg_",
75
- "_state_valid": "_state_valid_s5ggo_gg_",
76
- "_state_invalid": "_state_invalid_s5ggo_gg_"
60
+ "__SBaseTrigger": "___SBaseTrigger_157ei_gg_",
61
+ "_keyboardFocused": "__keyboardFocused_157ei_gg_",
62
+ "_active": "__active_157ei_gg_",
63
+ "_disabled": "__disabled_157ei_gg_",
64
+ "__SInner": "___SInner_157ei_gg_",
65
+ "__SText": "___SText_157ei_gg_",
66
+ "__SAddon": "___SAddon_157ei_gg_",
67
+ "__SBaseAddon": "___SBaseAddon_157ei_gg_",
68
+ "_size_m": "_size_m_157ei_gg_",
69
+ "_size_l": "_size_l_157ei_gg_",
70
+ "_neighborLocation_right": "_neighborLocation_right_157ei_gg_",
71
+ "_neighborLocation_both": "_neighborLocation_both_157ei_gg_",
72
+ "_neighborLocation_left": "_neighborLocation_left_157ei_gg_",
73
+ "_placeholder": "__placeholder_157ei_gg_",
74
+ "_state_normal": "_state_normal_157ei_gg_",
75
+ "_state_valid": "_state_valid_157ei_gg_",
76
+ "_state_invalid": "_state_invalid_157ei_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 _ref4 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SBaseTrigger, _ref4.cn("SBaseTrigger", _objectSpread({}, (0, _core.assignProps)({
117
- "state": theme
118
- }, _ref))), /*#__PURE__*/_react["default"].createElement(SInner, _ref4.cn("SInner", {}), (0, _addonTextChildren["default"])(Children, BaseTrigger.Text, BaseTrigger.Addon)));
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","style","size","keyboardFocusEnhance","neighborLocationEnhance","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 { neighborLocationEnhance } 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 style = style;\n static defaultProps = {\n size: 'm',\n };\n static enhance = [keyboardFocusEnhance(), neighborLocationEnhance()];\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 } = 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 sstyled(styles)(\n <SBaseTrigger render={Box} state={theme}>\n <SInner>{addonTextChildren(Children, BaseTrigger.Text, BaseTrigger.Addon)}</SInner>\n </SBaseTrigger>,\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;MAAA;;MACP,IAAMC,YAAY,GAYMC,YAZxB;MACA,IAAMC,MAAM,GAAG,KAAf;MACA,qBAAoC,KAAKL,OAAzC;MAAA,IAAQM,QAAR,kBAAQA,QAAR;MAAA,IAAkBC,MAAlB,kBAAkBA,MAAlB;MAAA,IAA0BC,KAA1B,kBAA0BA,KAA1B;;MAEAC,kBAAA,CAAOC,IAAP,CACEF,KAAK,KAAKG,SADZ,EAEE,iDAFF,EAGE,KAAKX,OAAL,CAAa,cAAb,KAAgCY,WAAW,CAACC,WAH9C,EALO,CAWP;;;MACA,eAAO,IAAAC,aAAA,EAAQP,MAAR,CAAP,eACE,gCAAC,YAAD;QAAA,SAAkCC;MAAlC,yBACE,gCAAC,MAAD,0BAAS,IAAAO,6BAAA,EAAkBT,QAAlB,EAA4BM,WAAW,CAACI,IAAxC,EAA8CJ,WAAW,CAACK,KAA1D,CAAT,CADF,CADF;IAKD;;;EAjC2BC,e;;iCAAxBnB,e,iBACiB,a;iCADjBA,e,WAEWoB,K;iCAFXpB,e,kBAGkB;EACpBqB,IAAI,EAAE;AADc,C;iCAHlBrB,e,aAMa,CAAC,IAAAsB,gCAAA,GAAD,EAAyB,IAAAC,yCAAA,GAAzB,C;;AA8BnB,SAASN,IAAT,CAAcO,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,IAAAa,aAAA,EAAQP,MAAR,CAAP;EAAA;;EACE;EACA,gCAAC,KAAD;IAAA,mBAAqCL;EAArC,aACGA,KAAK,GAAGD,WAAH,GAAiBwB,QADzB,CAFF;AAMD;;AAED,SAASR,KAAT,CAAeM,KAAf,EAAsB;EAAA;EAAA;;EACpB,IAAMG,MAAM,GACiCtB,YAD7C;EACA,eAAO,IAAAU,aAAA,EAAQS,KAAK,CAAChB,MAAd,CAAP,eAA6B,gCAAC,MAAD,2EAA7B;AACD;;AAED,IAAMK,WAAW,GAAG,IAAAe,gBAAA,EAAgB5B,eAAhB,EAAiC;EACnDiB,IAAI,EAAJA,IADmD;EAEnDC,KAAK,EAALA;AAFmD,CAAjC,CAApB;eAKeL,W"}
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"}
@@ -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_1ihj4_gg_ {\n width: 12px;\n height: 12px;\n}\n\n.___SButtonTriggerSpin_1ihj4_gg_ {\n fill: #6c6e79;\n}\n"
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_1130f_gg_ {\n width: 12px;\n height: 12px;\n}\n\n.___SButtonTriggerSpin_1130f_gg_ {\n fill: #6c6e79;\n}\n"
50
50
  /*__inner_css_end__*/
51
- , "1ihj4_gg_")
51
+ , "1130f_gg_")
52
52
  /*__reshadow_css_end__*/
53
53
  , {
54
- "__SButtonAddon": "___SButtonAddon_1ihj4_gg_",
55
- "__SButtonTriggerSpin": "___SButtonTriggerSpin_1ihj4_gg_"
54
+ "__SButtonAddon": "___SButtonAddon_1130f_gg_",
55
+ "__SButtonTriggerSpin": "___SButtonTriggerSpin_1130f_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_uu8ur_gg_ {\n border: 1px solid #c4c7cf;\n background: #ffffff;\n color: #191b23\n}\n\n.___SButtonTrigger_uu8ur_gg_::-moz-focus-inner {\n border: none;\n padding: 0;\n }\n\n.___SButtonTrigger_uu8ur_gg_:active,\n .___SButtonTrigger_uu8ur_gg_:hover,\n .___SButtonTrigger_uu8ur_gg_:focus {\n outline: 0;\n text-decoration: none;\n }\n\n.___SButtonTrigger_uu8ur_gg_:active,\n .___SButtonTrigger_uu8ur_gg_:hover,\n .___SButtonTrigger_uu8ur_gg_.__active_uu8ur_gg_ {\n background-color: rgba(138, 142, 155, 0.2);\n }\n\n.___SButtonTrigger_uu8ur_gg_._size_m_uu8ur_gg_ {\n min-width: 26px;\n height: 28px;\n border-radius: 6px;\n font-size: 14px;\n}\n\n.___SButtonTrigger_uu8ur_gg_._size_l_uu8ur_gg_ {\n min-width: 32px;\n height: 40px;\n border-radius: 6px;\n font-size: 16px;\n}\n\n.___SText_uu8ur_gg_.__placeholder_uu8ur_gg_ {\n color: #a9abb6;\n}\n\n.___SButtonTrigger_uu8ur_gg_._state_normal_uu8ur_gg_ {\n border-color: #c4c7cf;\n}\n\n.___SButtonTrigger_uu8ur_gg_._state_valid_uu8ur_gg_ {\n border-color: #59ddaa;\n}\n\n.___SButtonTrigger_uu8ur_gg_._state_invalid_uu8ur_gg_ {\n border-color: #ffaeb5;\n}\n\n.___SFilterTrigger_uu8ur_gg_.__selected_uu8ur_gg_ {\n border-color: #008ff8;\n background-color: rgba(0, 143, 248, 0.2);\n color: #191b23\n}\n\n.___SFilterTrigger_uu8ur_gg_.__selected_uu8ur_gg_.__active_uu8ur_gg_,\n .___SFilterTrigger_uu8ur_gg_.__selected_uu8ur_gg_:hover {\n background: rgba(0, 143, 248, 0.3);\n }\n\n.___SWrapper_uu8ur_gg_ {\n display: inline-flex\n}\n\n.___SWrapper_uu8ur_gg_:focus {\n outline: none;\n }\n\n.___SWrapper_uu8ur_gg_.__keyboardFocused_uu8ur_gg_ {\n box-shadow: 0 0 0 3px rgba(0, 143, 248, 0.2);\n}\n\n.___SCounter_uu8ur_gg_ {\n background-color: #008ff8;\n}\n"
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_2tu9q_gg_ {\n border: 1px solid #c4c7cf;\n background: #ffffff;\n color: #191b23\n}\n\n.___SButtonTrigger_2tu9q_gg_::-moz-focus-inner {\n border: none;\n padding: 0;\n }\n\n.___SButtonTrigger_2tu9q_gg_:active,\n .___SButtonTrigger_2tu9q_gg_:hover,\n .___SButtonTrigger_2tu9q_gg_:focus {\n outline: 0;\n text-decoration: none;\n }\n\n.___SButtonTrigger_2tu9q_gg_:active,\n .___SButtonTrigger_2tu9q_gg_:hover,\n .___SButtonTrigger_2tu9q_gg_.__active_2tu9q_gg_ {\n background-color: rgba(138, 142, 155, 0.2);\n }\n\n.___SButtonTrigger_2tu9q_gg_._size_m_2tu9q_gg_ {\n min-width: 26px;\n height: 28px;\n border-radius: 6px;\n font-size: 14px;\n}\n\n.___SButtonTrigger_2tu9q_gg_._size_l_2tu9q_gg_ {\n min-width: 32px;\n height: 40px;\n border-radius: 6px;\n font-size: 16px;\n}\n\n.___SText_2tu9q_gg_.__placeholder_2tu9q_gg_ {\n color: #a9abb6;\n}\n\n.___SButtonTrigger_2tu9q_gg_._state_normal_2tu9q_gg_ {\n border-color: #c4c7cf;\n}\n\n.___SButtonTrigger_2tu9q_gg_._state_valid_2tu9q_gg_ {\n border-color: #59ddaa;\n}\n\n.___SButtonTrigger_2tu9q_gg_._state_invalid_2tu9q_gg_ {\n border-color: #ffaeb5;\n}\n\n.___SFilterTrigger_2tu9q_gg_.__selected_2tu9q_gg_ {\n border-color: #008ff8;\n background-color: rgba(0, 143, 248, 0.2);\n color: #191b23\n}\n\n.___SFilterTrigger_2tu9q_gg_.__selected_2tu9q_gg_.__active_2tu9q_gg_,\n .___SFilterTrigger_2tu9q_gg_.__selected_2tu9q_gg_:hover {\n background: rgba(0, 143, 248, 0.3);\n }\n\n.___SWrapper_2tu9q_gg_ {\n display: inline-flex\n}\n\n.___SWrapper_2tu9q_gg_:focus {\n outline: none;\n }\n\n.___SWrapper_2tu9q_gg_.__keyboardFocused_2tu9q_gg_ {\n box-shadow: 0 0 0 3px rgba(0, 143, 248, 0.2);\n}\n\n.___SCounter_2tu9q_gg_ {\n background-color: #008ff8;\n}\n"
64
64
  /*__inner_css_end__*/
65
- , "uu8ur_gg_")
65
+ , "2tu9q_gg_")
66
66
  /*__reshadow_css_end__*/
67
67
  , {
68
- "__SButtonTrigger": "___SButtonTrigger_uu8ur_gg_",
69
- "_active": "__active_uu8ur_gg_",
70
- "_size_m": "_size_m_uu8ur_gg_",
71
- "_size_l": "_size_l_uu8ur_gg_",
72
- "__SText": "___SText_uu8ur_gg_",
73
- "_placeholder": "__placeholder_uu8ur_gg_",
74
- "_state_normal": "_state_normal_uu8ur_gg_",
75
- "_state_valid": "_state_valid_uu8ur_gg_",
76
- "_state_invalid": "_state_invalid_uu8ur_gg_",
77
- "__SFilterTrigger": "___SFilterTrigger_uu8ur_gg_",
78
- "_selected": "__selected_uu8ur_gg_",
79
- "__SWrapper": "___SWrapper_uu8ur_gg_",
80
- "_keyboardFocused": "__keyboardFocused_uu8ur_gg_",
81
- "__SCounter": "___SCounter_uu8ur_gg_"
68
+ "__SButtonTrigger": "___SButtonTrigger_2tu9q_gg_",
69
+ "_active": "__active_2tu9q_gg_",
70
+ "_size_m": "_size_m_2tu9q_gg_",
71
+ "_size_l": "_size_l_2tu9q_gg_",
72
+ "__SText": "___SText_2tu9q_gg_",
73
+ "_placeholder": "__placeholder_2tu9q_gg_",
74
+ "_state_normal": "_state_normal_2tu9q_gg_",
75
+ "_state_valid": "_state_valid_2tu9q_gg_",
76
+ "_state_invalid": "_state_invalid_2tu9q_gg_",
77
+ "__SFilterTrigger": "___SFilterTrigger_2tu9q_gg_",
78
+ "_selected": "__selected_2tu9q_gg_",
79
+ "__SWrapper": "___SWrapper_2tu9q_gg_",
80
+ "_keyboardFocused": "__keyboardFocused_2tu9q_gg_",
81
+ "__SCounter": "___SCounter_2tu9q_gg_"
82
82
  });
83
83
 
84
84
  var RootFilterTrigger = /*#__PURE__*/function (_Component) {
@@ -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_2an6d_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_2an6d_gg_.__active_2an6d_gg_,\n .___SLinkTrigger_2an6d_gg_:hover,\n .___SLinkTrigger_2an6d_gg_:active {\n color: #044792\n }\n\n.___SLinkTrigger_2an6d_gg_.__active_2an6d_gg_ .___SText_2an6d_gg_, .___SLinkTrigger_2an6d_gg_:hover .___SText_2an6d_gg_, .___SLinkTrigger_2an6d_gg_:active .___SText_2an6d_gg_ {\n border-color: currentColor;\n }\n\n.___SLinkTrigger_2an6d_gg_ .___SText_2an6d_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_2an6d_gg_.__color_2an6d_gg_ {\n color: var(--color_2an6d)\n}\n\n.___SLinkTrigger_2an6d_gg_.__color_2an6d_gg_:hover {\n color: var(--color-hover_2an6d);\n }\n\n.___SLinkTrigger_2an6d_gg_.__disabled_2an6d_gg_ {\n opacity: 0.3;\n cursor: default;\n pointer-events: none;\n}\n\n.___SLinkTrigger_2an6d_gg_.__keyboardFocused_2an6d_gg_ {\n box-shadow: 0 0 0 3px rgba(0, 143, 248, 0.2);\n z-index: 1;\n}\n\n.___SAddon_2an6d_gg_,\n.___SLinkAddon_2an6d_gg_ {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0\n}\n\n.___SAddon_2an6d_gg_:not(:only-child):first-child, .___SLinkAddon_2an6d_gg_:not(:only-child):first-child {\n margin-right: 4px;\n }\n\n.___SAddon_2an6d_gg_:not(:only-child):last-child, .___SLinkAddon_2an6d_gg_:not(:only-child):last-child {\n margin-left: 4px;\n }\n\n.___SLinkAddon_2an6d_gg_ {\n width: 16px;\n height: 16px;\n}\n\n.___SLinkTrigger_2an6d_gg_._size_m_2an6d_gg_ {\n font-size: 14px;\n}\n\n.___SLinkTrigger_2an6d_gg_._size_l_2an6d_gg_ {\n font-size: 16px;\n}\n\n@media (prefers-reduced-motion) {\n .___SLinkTrigger_2an6d_gg_ {\n transition: none\n }\n .___SLinkTrigger_2an6d_gg_ .___SText_2an6d_gg_ {\n transition: none;\n }\n}\n"
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_18l9r_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_18l9r_gg_.__active_18l9r_gg_,\n .___SLinkTrigger_18l9r_gg_:hover,\n .___SLinkTrigger_18l9r_gg_:active {\n color: #044792\n }\n\n.___SLinkTrigger_18l9r_gg_.__active_18l9r_gg_ .___SText_18l9r_gg_, .___SLinkTrigger_18l9r_gg_:hover .___SText_18l9r_gg_, .___SLinkTrigger_18l9r_gg_:active .___SText_18l9r_gg_ {\n border-color: currentColor;\n }\n\n.___SLinkTrigger_18l9r_gg_ .___SText_18l9r_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_18l9r_gg_.__color_18l9r_gg_ {\n color: var(--color_18l9r)\n}\n\n.___SLinkTrigger_18l9r_gg_.__color_18l9r_gg_:hover {\n color: var(--color-hover_18l9r);\n }\n\n.___SLinkTrigger_18l9r_gg_.__disabled_18l9r_gg_ {\n opacity: 0.3;\n cursor: default;\n pointer-events: none;\n}\n\n.___SLinkTrigger_18l9r_gg_.__keyboardFocused_18l9r_gg_ {\n box-shadow: 0 0 0 3px rgba(0, 143, 248, 0.2);\n z-index: 1;\n}\n\n.___SAddon_18l9r_gg_,\n.___SLinkAddon_18l9r_gg_ {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0\n}\n\n.___SAddon_18l9r_gg_:not(:only-child):first-child, .___SLinkAddon_18l9r_gg_:not(:only-child):first-child {\n margin-right: 4px;\n }\n\n.___SAddon_18l9r_gg_:not(:only-child):last-child, .___SLinkAddon_18l9r_gg_:not(:only-child):last-child {\n margin-left: 4px;\n }\n\n.___SLinkAddon_18l9r_gg_ {\n width: 16px;\n height: 16px;\n}\n\n.___SLinkTrigger_18l9r_gg_._size_m_18l9r_gg_ {\n font-size: 14px;\n}\n\n.___SLinkTrigger_18l9r_gg_._size_l_18l9r_gg_ {\n font-size: 16px;\n}\n\n@media (prefers-reduced-motion) {\n .___SLinkTrigger_18l9r_gg_ {\n transition: none\n }\n .___SLinkTrigger_18l9r_gg_ .___SText_18l9r_gg_ {\n transition: none;\n }\n}\n"
58
58
  /*__inner_css_end__*/
59
- , "2an6d_gg_")
59
+ , "18l9r_gg_")
60
60
  /*__reshadow_css_end__*/
61
61
  , {
62
- "__SLinkTrigger": "___SLinkTrigger_2an6d_gg_",
63
- "_active": "__active_2an6d_gg_",
64
- "__SText": "___SText_2an6d_gg_",
65
- "_color": "__color_2an6d_gg_",
66
- "--color": "--color_2an6d",
67
- "--color-hover": "--color-hover_2an6d",
68
- "_disabled": "__disabled_2an6d_gg_",
69
- "_keyboardFocused": "__keyboardFocused_2an6d_gg_",
70
- "__SAddon": "___SAddon_2an6d_gg_",
71
- "__SLinkAddon": "___SLinkAddon_2an6d_gg_",
72
- "_size_m": "_size_m_2an6d_gg_",
73
- "_size_l": "_size_l_2an6d_gg_"
62
+ "__SLinkTrigger": "___SLinkTrigger_18l9r_gg_",
63
+ "_active": "__active_18l9r_gg_",
64
+ "__SText": "___SText_18l9r_gg_",
65
+ "_color": "__color_18l9r_gg_",
66
+ "--color": "--color_18l9r",
67
+ "--color-hover": "--color-hover_18l9r",
68
+ "_disabled": "__disabled_18l9r_gg_",
69
+ "_keyboardFocused": "__keyboardFocused_18l9r_gg_",
70
+ "__SAddon": "___SAddon_18l9r_gg_",
71
+ "__SLinkAddon": "___SLinkAddon_18l9r_gg_",
72
+ "_size_m": "_size_m_18l9r_gg_",
73
+ "_size_l": "_size_l_18l9r_gg_"
74
74
  });
75
75
 
76
76
  var RootLinkTrigger = /*#__PURE__*/function (_Component) {
@@ -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 { neighborLocationEnhance } from '@semcore/neighbor-location';
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
- ":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_s5ggo_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_s5ggo_gg_::-moz-focus-inner {\n border: none;\n padding: 0;\n }\n\n.___SBaseTrigger_s5ggo_gg_:active,\n .___SBaseTrigger_s5ggo_gg_:hover,\n .___SBaseTrigger_s5ggo_gg_:focus {\n outline: 0;\n text-decoration: none;\n }\n\n.___SBaseTrigger_s5ggo_gg_.__keyboardFocused_s5ggo_gg_ {\n border: 1px solid #008ff8;\n box-shadow: 0 0 0 3px rgba(0, 143, 248, 0.2);\n }\n\n.___SBaseTrigger_s5ggo_gg_:hover {\n background-color: rgba(138, 142, 155, 0.2);\n }\n\n.___SBaseTrigger_s5ggo_gg_:active,\n .___SBaseTrigger_s5ggo_gg_.__active_s5ggo_gg_ {\n background-color: rgba(138, 142, 155, 0.3);\n }\n\n.___SBaseTrigger_s5ggo_gg_.__disabled_s5ggo_gg_ {\n opacity: 0.3;\n cursor: default;\n pointer-events: none; /* Disable link interactions */\n}\n\n.___SBaseTrigger_s5ggo_gg_.__keyboardFocused_s5ggo_gg_ {\n z-index: 1;\n}\n\n.___SInner_s5ggo_gg_ {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n}\n\n.___SText_s5ggo_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_s5ggo_gg_ {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.___SBaseAddon_s5ggo_gg_ {\n width: 12px;\n height: 12px;\n}\n\n.___SBaseTrigger_s5ggo_gg_._size_m_s5ggo_gg_ {\n min-width: 26px;\n height: 28px;\n border-radius: 6px;\n padding: 0 8px;\n font-size: 14px\n}\n\n.___SBaseTrigger_s5ggo_gg_._size_m_s5ggo_gg_ .___SAddon_s5ggo_gg_:not(:only-child):first-child {\n margin-right: 8px;\n }\n\n.___SBaseTrigger_s5ggo_gg_._size_m_s5ggo_gg_ .___SAddon_s5ggo_gg_:not(:only-child):last-child {\n margin-left: 8px;\n }\n\n.___SBaseTrigger_s5ggo_gg_._size_m_s5ggo_gg_ .___SAddon_s5ggo_gg_:only-child {\n margin-left: -4px;\n margin-right: -4px;\n }\n\n.___SBaseTrigger_s5ggo_gg_._size_l_s5ggo_gg_ {\n min-width: 32px;\n height: 40px;\n border-radius: 6px;\n padding: 0 12px;\n font-size: 16px\n}\n\n.___SBaseTrigger_s5ggo_gg_._size_l_s5ggo_gg_ .___SAddon_s5ggo_gg_:not(:only-child):first-child {\n margin-right: 8px;\n }\n\n.___SBaseTrigger_s5ggo_gg_._size_l_s5ggo_gg_ .___SAddon_s5ggo_gg_:not(:only-child):last-child {\n margin-left: 8px;\n }\n\n.___SBaseTrigger_s5ggo_gg_._size_l_s5ggo_gg_ .___SAddon_s5ggo_gg_:only-child {\n margin-left: -4px;\n margin-right: -4px;\n }\n\n.___SBaseTrigger_s5ggo_gg_._neighborLocation_right_s5ggo_gg_ {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.___SBaseTrigger_s5ggo_gg_._neighborLocation_both_s5ggo_gg_ {\n border-radius: 0;\n margin-left: -1px;\n}\n\n.___SBaseTrigger_s5ggo_gg_._neighborLocation_left_s5ggo_gg_ {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n margin-left: -1px;\n}\n\n.___SText_s5ggo_gg_.__placeholder_s5ggo_gg_ {\n color: #a9abb6;\n}\n\n.___SBaseTrigger_s5ggo_gg_._state_normal_s5ggo_gg_ {\n border-color: #c4c7cf;\n}\n\n.___SBaseTrigger_s5ggo_gg_._state_valid_s5ggo_gg_ {\n border-color: #59ddaa;\n}\n\n.___SBaseTrigger_s5ggo_gg_._state_invalid_s5ggo_gg_ {\n border-color: #ffaeb5\n}\n\n.___SBaseTrigger_s5ggo_gg_._state_invalid_s5ggo_gg_.__keyboardFocused_s5ggo_gg_ {\n border-color: #ff642d;\n box-shadow: 0 0 0 3px rgba(255, 100, 45, 0.3);\n }\n"
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_157ei_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_157ei_gg_::-moz-focus-inner {\n border: none;\n padding: 0;\n }\n\n.___SBaseTrigger_157ei_gg_:active,\n .___SBaseTrigger_157ei_gg_:hover,\n .___SBaseTrigger_157ei_gg_:focus {\n outline: 0;\n text-decoration: none;\n }\n\n.___SBaseTrigger_157ei_gg_.__keyboardFocused_157ei_gg_ {\n border: 1px solid #008ff8;\n box-shadow: 0 0 0 3px rgba(0, 143, 248, 0.2);\n }\n\n.___SBaseTrigger_157ei_gg_:hover {\n background-color: rgba(138, 142, 155, 0.2);\n }\n\n.___SBaseTrigger_157ei_gg_:active,\n .___SBaseTrigger_157ei_gg_.__active_157ei_gg_ {\n background-color: rgba(138, 142, 155, 0.3);\n }\n\n.___SBaseTrigger_157ei_gg_.__disabled_157ei_gg_ {\n opacity: 0.3;\n cursor: default;\n pointer-events: none; /* Disable link interactions */\n}\n\n.___SBaseTrigger_157ei_gg_.__keyboardFocused_157ei_gg_ {\n z-index: 1;\n}\n\n.___SInner_157ei_gg_ {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n}\n\n.___SText_157ei_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_157ei_gg_ {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.___SBaseAddon_157ei_gg_ {\n width: 12px;\n height: 12px;\n}\n\n.___SBaseTrigger_157ei_gg_._size_m_157ei_gg_ {\n min-width: 26px;\n height: 28px;\n border-radius: 6px;\n padding: 0 8px;\n font-size: 14px\n}\n\n.___SBaseTrigger_157ei_gg_._size_m_157ei_gg_ .___SAddon_157ei_gg_:not(:only-child):first-child {\n margin-right: 8px;\n }\n\n.___SBaseTrigger_157ei_gg_._size_m_157ei_gg_ .___SAddon_157ei_gg_:not(:only-child):last-child {\n margin-left: 8px;\n }\n\n.___SBaseTrigger_157ei_gg_._size_m_157ei_gg_ .___SAddon_157ei_gg_:only-child {\n margin-left: -4px;\n margin-right: -4px;\n }\n\n.___SBaseTrigger_157ei_gg_._size_l_157ei_gg_ {\n min-width: 32px;\n height: 40px;\n border-radius: 6px;\n padding: 0 12px;\n font-size: 16px\n}\n\n.___SBaseTrigger_157ei_gg_._size_l_157ei_gg_ .___SAddon_157ei_gg_:not(:only-child):first-child {\n margin-right: 8px;\n }\n\n.___SBaseTrigger_157ei_gg_._size_l_157ei_gg_ .___SAddon_157ei_gg_:not(:only-child):last-child {\n margin-left: 8px;\n }\n\n.___SBaseTrigger_157ei_gg_._size_l_157ei_gg_ .___SAddon_157ei_gg_:only-child {\n margin-left: -4px;\n margin-right: -4px;\n }\n\n.___SBaseTrigger_157ei_gg_._neighborLocation_right_157ei_gg_ {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.___SBaseTrigger_157ei_gg_._neighborLocation_both_157ei_gg_ {\n border-radius: 0;\n margin-left: -1px;\n}\n\n.___SBaseTrigger_157ei_gg_._neighborLocation_left_157ei_gg_ {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n margin-left: -1px;\n}\n\n.___SText_157ei_gg_.__placeholder_157ei_gg_ {\n color: #a9abb6;\n}\n\n.___SBaseTrigger_157ei_gg_._state_normal_157ei_gg_ {\n border-color: #c4c7cf;\n}\n\n.___SBaseTrigger_157ei_gg_._state_valid_157ei_gg_ {\n border-color: #59ddaa;\n}\n\n.___SBaseTrigger_157ei_gg_._state_invalid_157ei_gg_ {\n border-color: #ffaeb5\n}\n\n.___SBaseTrigger_157ei_gg_._state_invalid_157ei_gg_.__keyboardFocused_157ei_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
- , "s5ggo_gg_")
35
+ , "157ei_gg_")
36
36
  /*__reshadow_css_end__*/
37
37
  , {
38
- "__SBaseTrigger": "___SBaseTrigger_s5ggo_gg_",
39
- "_keyboardFocused": "__keyboardFocused_s5ggo_gg_",
40
- "_active": "__active_s5ggo_gg_",
41
- "_disabled": "__disabled_s5ggo_gg_",
42
- "__SInner": "___SInner_s5ggo_gg_",
43
- "__SText": "___SText_s5ggo_gg_",
44
- "__SAddon": "___SAddon_s5ggo_gg_",
45
- "__SBaseAddon": "___SBaseAddon_s5ggo_gg_",
46
- "_size_m": "_size_m_s5ggo_gg_",
47
- "_size_l": "_size_l_s5ggo_gg_",
48
- "_neighborLocation_right": "_neighborLocation_right_s5ggo_gg_",
49
- "_neighborLocation_both": "_neighborLocation_both_s5ggo_gg_",
50
- "_neighborLocation_left": "_neighborLocation_left_s5ggo_gg_",
51
- "_placeholder": "__placeholder_s5ggo_gg_",
52
- "_state_normal": "_state_normal_s5ggo_gg_",
53
- "_state_valid": "_state_valid_s5ggo_gg_",
54
- "_state_invalid": "_state_invalid_s5ggo_gg_"
38
+ "__SBaseTrigger": "___SBaseTrigger_157ei_gg_",
39
+ "_keyboardFocused": "__keyboardFocused_157ei_gg_",
40
+ "_active": "__active_157ei_gg_",
41
+ "_disabled": "__disabled_157ei_gg_",
42
+ "__SInner": "___SInner_157ei_gg_",
43
+ "__SText": "___SText_157ei_gg_",
44
+ "__SAddon": "___SAddon_157ei_gg_",
45
+ "__SBaseAddon": "___SBaseAddon_157ei_gg_",
46
+ "_size_m": "_size_m_157ei_gg_",
47
+ "_size_l": "_size_l_157ei_gg_",
48
+ "_neighborLocation_right": "_neighborLocation_right_157ei_gg_",
49
+ "_neighborLocation_both": "_neighborLocation_both_157ei_gg_",
50
+ "_neighborLocation_left": "_neighborLocation_left_157ei_gg_",
51
+ "_placeholder": "__placeholder_157ei_gg_",
52
+ "_state_normal": "_state_normal_157ei_gg_",
53
+ "_state_valid": "_state_valid_157ei_gg_",
54
+ "_state_invalid": "_state_invalid_157ei_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 _ref4 = sstyled(styles), /*#__PURE__*/React.createElement(SBaseTrigger, _ref4.cn("SBaseTrigger", _objectSpread({}, _assignProps({
94
- "state": theme
95
- }, _ref))), /*#__PURE__*/React.createElement(SInner, _ref4.cn("SInner", {}), addonTextChildren(Children, BaseTrigger.Text, BaseTrigger.Addon)));
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","neighborLocationEnhance","keyboardFocusEnhance","addonTextChildren","logger","RootBaseTrigger","asProps","placeholder","empty","SBaseTrigger","SInner","Children","styles","theme","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 { neighborLocationEnhance } 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 style = style;\n static defaultProps = {\n size: 'm',\n };\n static enhance = [keyboardFocusEnhance(), neighborLocationEnhance()];\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 } = 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 sstyled(styles)(\n <SBaseTrigger render={Box} state={theme}>\n <SInner>{addonTextChildren(Children, BaseTrigger.Text, BaseTrigger.Addon)}</SInner>\n </SBaseTrigger>,\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,SAASC,uBAAT,QAAwC,4BAAxC;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;MAAA;;MACP,IAAMC,YAAY,GAYMT,GAZxB;MACA,IAAMU,MAAM,GAAG,KAAf;MACA,qBAAoC,KAAKJ,OAAzC;MAAA,IAAQK,QAAR,kBAAQA,QAAR;MAAA,IAAkBC,MAAlB,kBAAkBA,MAAlB;MAAA,IAA0BC,KAA1B,kBAA0BA,KAA1B;MAEAT,MAAM,CAACU,IAAP,CACED,KAAK,KAAKE,SADZ,EAEE,iDAFF,EAGE,KAAKT,OAAL,CAAa,cAAb,KAAgCU,WAAW,CAACC,WAH9C,EALO,CAWP;;MACA,eAAOlB,OAAO,CAACa,MAAD,CAAd,eACE,oBAAC,YAAD;QAAA,SAAkCC;MAAlC,yBACE,oBAAC,MAAD,0BAASV,iBAAiB,CAACQ,QAAD,EAAWK,WAAW,CAACE,IAAvB,EAA6BF,WAAW,CAACG,KAAzC,CAA1B,CADF,CADF;IAKD;;;;EAjC2BtB,S;;gBAAxBQ,e,iBACiB,a;;gBADjBA,e,WAEWe,K;;gBAFXf,e,kBAGkB;EACpBgB,IAAI,EAAE;AADc,C;;gBAHlBhB,e,aAMa,CAACH,oBAAoB,EAArB,EAAyBD,uBAAuB,EAAhD,C;;AA8BnB,SAASiB,IAAT,CAAcI,KAAd,EAAqB;EAAA;EAAA;;EACnB,IAAMC,KAAK,GAKMvB,GALjB;EACA,IAAQwB,QAAR,GAAiDF,KAAjD,CAAQE,QAAR;EAAA,IAAkBZ,MAAlB,GAAiDU,KAAjD,CAAkBV,MAAlB;EAAA,IAA0BJ,KAA1B,GAAiDc,KAAjD,CAA0Bd,KAA1B;EAAA,IAAiCD,WAAjC,GAAiDe,KAAjD,CAAiCf,WAAjC;EAEA,eAAOR,OAAO,CAACa,MAAD,CAAd;EAAA;;EACE;EACA,oBAAC,KAAD;IAAA,mBAAqCJ;EAArC,aACGA,KAAK,GAAGD,WAAH,GAAiBiB,QADzB,CAFF;AAMD;;AAED,SAASL,KAAT,CAAeG,KAAf,EAAsB;EAAA;EAAA;;EACpB,IAAMG,MAAM,GACiCzB,GAD7C;EACA,eAAOD,OAAO,CAACuB,KAAK,CAACV,MAAP,CAAd,eAA6B,oBAAC,MAAD,kEAA7B;AACD;;AAED,IAAMI,WAAW,GAAGpB,eAAe,CAACS,eAAD,EAAkB;EACnDa,IAAI,EAAJA,IADmD;EAEnDC,KAAK,EAALA;AAFmD,CAAlB,CAAnC;AAKA,eAAeH,WAAf"}
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"}
@@ -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_1ihj4_gg_ {\n width: 12px;\n height: 12px;\n}\n\n.___SButtonTriggerSpin_1ihj4_gg_ {\n fill: #6c6e79;\n}\n"
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_1130f_gg_ {\n width: 12px;\n height: 12px;\n}\n\n.___SButtonTriggerSpin_1130f_gg_ {\n fill: #6c6e79;\n}\n"
27
27
  /*__inner_css_end__*/
28
- , "1ihj4_gg_")
28
+ , "1130f_gg_")
29
29
  /*__reshadow_css_end__*/
30
30
  , {
31
- "__SButtonAddon": "___SButtonAddon_1ihj4_gg_",
32
- "__SButtonTriggerSpin": "___SButtonTriggerSpin_1ihj4_gg_"
31
+ "__SButtonAddon": "___SButtonAddon_1130f_gg_",
32
+ "__SButtonTriggerSpin": "___SButtonTriggerSpin_1130f_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_uu8ur_gg_ {\n border: 1px solid #c4c7cf;\n background: #ffffff;\n color: #191b23\n}\n\n.___SButtonTrigger_uu8ur_gg_::-moz-focus-inner {\n border: none;\n padding: 0;\n }\n\n.___SButtonTrigger_uu8ur_gg_:active,\n .___SButtonTrigger_uu8ur_gg_:hover,\n .___SButtonTrigger_uu8ur_gg_:focus {\n outline: 0;\n text-decoration: none;\n }\n\n.___SButtonTrigger_uu8ur_gg_:active,\n .___SButtonTrigger_uu8ur_gg_:hover,\n .___SButtonTrigger_uu8ur_gg_.__active_uu8ur_gg_ {\n background-color: rgba(138, 142, 155, 0.2);\n }\n\n.___SButtonTrigger_uu8ur_gg_._size_m_uu8ur_gg_ {\n min-width: 26px;\n height: 28px;\n border-radius: 6px;\n font-size: 14px;\n}\n\n.___SButtonTrigger_uu8ur_gg_._size_l_uu8ur_gg_ {\n min-width: 32px;\n height: 40px;\n border-radius: 6px;\n font-size: 16px;\n}\n\n.___SText_uu8ur_gg_.__placeholder_uu8ur_gg_ {\n color: #a9abb6;\n}\n\n.___SButtonTrigger_uu8ur_gg_._state_normal_uu8ur_gg_ {\n border-color: #c4c7cf;\n}\n\n.___SButtonTrigger_uu8ur_gg_._state_valid_uu8ur_gg_ {\n border-color: #59ddaa;\n}\n\n.___SButtonTrigger_uu8ur_gg_._state_invalid_uu8ur_gg_ {\n border-color: #ffaeb5;\n}\n\n.___SFilterTrigger_uu8ur_gg_.__selected_uu8ur_gg_ {\n border-color: #008ff8;\n background-color: rgba(0, 143, 248, 0.2);\n color: #191b23\n}\n\n.___SFilterTrigger_uu8ur_gg_.__selected_uu8ur_gg_.__active_uu8ur_gg_,\n .___SFilterTrigger_uu8ur_gg_.__selected_uu8ur_gg_:hover {\n background: rgba(0, 143, 248, 0.3);\n }\n\n.___SWrapper_uu8ur_gg_ {\n display: inline-flex\n}\n\n.___SWrapper_uu8ur_gg_:focus {\n outline: none;\n }\n\n.___SWrapper_uu8ur_gg_.__keyboardFocused_uu8ur_gg_ {\n box-shadow: 0 0 0 3px rgba(0, 143, 248, 0.2);\n}\n\n.___SCounter_uu8ur_gg_ {\n background-color: #008ff8;\n}\n"
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_2tu9q_gg_ {\n border: 1px solid #c4c7cf;\n background: #ffffff;\n color: #191b23\n}\n\n.___SButtonTrigger_2tu9q_gg_::-moz-focus-inner {\n border: none;\n padding: 0;\n }\n\n.___SButtonTrigger_2tu9q_gg_:active,\n .___SButtonTrigger_2tu9q_gg_:hover,\n .___SButtonTrigger_2tu9q_gg_:focus {\n outline: 0;\n text-decoration: none;\n }\n\n.___SButtonTrigger_2tu9q_gg_:active,\n .___SButtonTrigger_2tu9q_gg_:hover,\n .___SButtonTrigger_2tu9q_gg_.__active_2tu9q_gg_ {\n background-color: rgba(138, 142, 155, 0.2);\n }\n\n.___SButtonTrigger_2tu9q_gg_._size_m_2tu9q_gg_ {\n min-width: 26px;\n height: 28px;\n border-radius: 6px;\n font-size: 14px;\n}\n\n.___SButtonTrigger_2tu9q_gg_._size_l_2tu9q_gg_ {\n min-width: 32px;\n height: 40px;\n border-radius: 6px;\n font-size: 16px;\n}\n\n.___SText_2tu9q_gg_.__placeholder_2tu9q_gg_ {\n color: #a9abb6;\n}\n\n.___SButtonTrigger_2tu9q_gg_._state_normal_2tu9q_gg_ {\n border-color: #c4c7cf;\n}\n\n.___SButtonTrigger_2tu9q_gg_._state_valid_2tu9q_gg_ {\n border-color: #59ddaa;\n}\n\n.___SButtonTrigger_2tu9q_gg_._state_invalid_2tu9q_gg_ {\n border-color: #ffaeb5;\n}\n\n.___SFilterTrigger_2tu9q_gg_.__selected_2tu9q_gg_ {\n border-color: #008ff8;\n background-color: rgba(0, 143, 248, 0.2);\n color: #191b23\n}\n\n.___SFilterTrigger_2tu9q_gg_.__selected_2tu9q_gg_.__active_2tu9q_gg_,\n .___SFilterTrigger_2tu9q_gg_.__selected_2tu9q_gg_:hover {\n background: rgba(0, 143, 248, 0.3);\n }\n\n.___SWrapper_2tu9q_gg_ {\n display: inline-flex\n}\n\n.___SWrapper_2tu9q_gg_:focus {\n outline: none;\n }\n\n.___SWrapper_2tu9q_gg_.__keyboardFocused_2tu9q_gg_ {\n box-shadow: 0 0 0 3px rgba(0, 143, 248, 0.2);\n}\n\n.___SCounter_2tu9q_gg_ {\n background-color: #008ff8;\n}\n"
37
37
  /*__inner_css_end__*/
38
- , "uu8ur_gg_")
38
+ , "2tu9q_gg_")
39
39
  /*__reshadow_css_end__*/
40
40
  , {
41
- "__SButtonTrigger": "___SButtonTrigger_uu8ur_gg_",
42
- "_active": "__active_uu8ur_gg_",
43
- "_size_m": "_size_m_uu8ur_gg_",
44
- "_size_l": "_size_l_uu8ur_gg_",
45
- "__SText": "___SText_uu8ur_gg_",
46
- "_placeholder": "__placeholder_uu8ur_gg_",
47
- "_state_normal": "_state_normal_uu8ur_gg_",
48
- "_state_valid": "_state_valid_uu8ur_gg_",
49
- "_state_invalid": "_state_invalid_uu8ur_gg_",
50
- "__SFilterTrigger": "___SFilterTrigger_uu8ur_gg_",
51
- "_selected": "__selected_uu8ur_gg_",
52
- "__SWrapper": "___SWrapper_uu8ur_gg_",
53
- "_keyboardFocused": "__keyboardFocused_uu8ur_gg_",
54
- "__SCounter": "___SCounter_uu8ur_gg_"
41
+ "__SButtonTrigger": "___SButtonTrigger_2tu9q_gg_",
42
+ "_active": "__active_2tu9q_gg_",
43
+ "_size_m": "_size_m_2tu9q_gg_",
44
+ "_size_l": "_size_l_2tu9q_gg_",
45
+ "__SText": "___SText_2tu9q_gg_",
46
+ "_placeholder": "__placeholder_2tu9q_gg_",
47
+ "_state_normal": "_state_normal_2tu9q_gg_",
48
+ "_state_valid": "_state_valid_2tu9q_gg_",
49
+ "_state_invalid": "_state_invalid_2tu9q_gg_",
50
+ "__SFilterTrigger": "___SFilterTrigger_2tu9q_gg_",
51
+ "_selected": "__selected_2tu9q_gg_",
52
+ "__SWrapper": "___SWrapper_2tu9q_gg_",
53
+ "_keyboardFocused": "__keyboardFocused_2tu9q_gg_",
54
+ "__SCounter": "___SCounter_2tu9q_gg_"
55
55
  });
56
56
 
57
57
  var RootFilterTrigger = /*#__PURE__*/function (_Component) {
@@ -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_2an6d_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_2an6d_gg_.__active_2an6d_gg_,\n .___SLinkTrigger_2an6d_gg_:hover,\n .___SLinkTrigger_2an6d_gg_:active {\n color: #044792\n }\n\n.___SLinkTrigger_2an6d_gg_.__active_2an6d_gg_ .___SText_2an6d_gg_, .___SLinkTrigger_2an6d_gg_:hover .___SText_2an6d_gg_, .___SLinkTrigger_2an6d_gg_:active .___SText_2an6d_gg_ {\n border-color: currentColor;\n }\n\n.___SLinkTrigger_2an6d_gg_ .___SText_2an6d_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_2an6d_gg_.__color_2an6d_gg_ {\n color: var(--color_2an6d)\n}\n\n.___SLinkTrigger_2an6d_gg_.__color_2an6d_gg_:hover {\n color: var(--color-hover_2an6d);\n }\n\n.___SLinkTrigger_2an6d_gg_.__disabled_2an6d_gg_ {\n opacity: 0.3;\n cursor: default;\n pointer-events: none;\n}\n\n.___SLinkTrigger_2an6d_gg_.__keyboardFocused_2an6d_gg_ {\n box-shadow: 0 0 0 3px rgba(0, 143, 248, 0.2);\n z-index: 1;\n}\n\n.___SAddon_2an6d_gg_,\n.___SLinkAddon_2an6d_gg_ {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0\n}\n\n.___SAddon_2an6d_gg_:not(:only-child):first-child, .___SLinkAddon_2an6d_gg_:not(:only-child):first-child {\n margin-right: 4px;\n }\n\n.___SAddon_2an6d_gg_:not(:only-child):last-child, .___SLinkAddon_2an6d_gg_:not(:only-child):last-child {\n margin-left: 4px;\n }\n\n.___SLinkAddon_2an6d_gg_ {\n width: 16px;\n height: 16px;\n}\n\n.___SLinkTrigger_2an6d_gg_._size_m_2an6d_gg_ {\n font-size: 14px;\n}\n\n.___SLinkTrigger_2an6d_gg_._size_l_2an6d_gg_ {\n font-size: 16px;\n}\n\n@media (prefers-reduced-motion) {\n .___SLinkTrigger_2an6d_gg_ {\n transition: none\n }\n .___SLinkTrigger_2an6d_gg_ .___SText_2an6d_gg_ {\n transition: none;\n }\n}\n"
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_18l9r_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_18l9r_gg_.__active_18l9r_gg_,\n .___SLinkTrigger_18l9r_gg_:hover,\n .___SLinkTrigger_18l9r_gg_:active {\n color: #044792\n }\n\n.___SLinkTrigger_18l9r_gg_.__active_18l9r_gg_ .___SText_18l9r_gg_, .___SLinkTrigger_18l9r_gg_:hover .___SText_18l9r_gg_, .___SLinkTrigger_18l9r_gg_:active .___SText_18l9r_gg_ {\n border-color: currentColor;\n }\n\n.___SLinkTrigger_18l9r_gg_ .___SText_18l9r_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_18l9r_gg_.__color_18l9r_gg_ {\n color: var(--color_18l9r)\n}\n\n.___SLinkTrigger_18l9r_gg_.__color_18l9r_gg_:hover {\n color: var(--color-hover_18l9r);\n }\n\n.___SLinkTrigger_18l9r_gg_.__disabled_18l9r_gg_ {\n opacity: 0.3;\n cursor: default;\n pointer-events: none;\n}\n\n.___SLinkTrigger_18l9r_gg_.__keyboardFocused_18l9r_gg_ {\n box-shadow: 0 0 0 3px rgba(0, 143, 248, 0.2);\n z-index: 1;\n}\n\n.___SAddon_18l9r_gg_,\n.___SLinkAddon_18l9r_gg_ {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0\n}\n\n.___SAddon_18l9r_gg_:not(:only-child):first-child, .___SLinkAddon_18l9r_gg_:not(:only-child):first-child {\n margin-right: 4px;\n }\n\n.___SAddon_18l9r_gg_:not(:only-child):last-child, .___SLinkAddon_18l9r_gg_:not(:only-child):last-child {\n margin-left: 4px;\n }\n\n.___SLinkAddon_18l9r_gg_ {\n width: 16px;\n height: 16px;\n}\n\n.___SLinkTrigger_18l9r_gg_._size_m_18l9r_gg_ {\n font-size: 14px;\n}\n\n.___SLinkTrigger_18l9r_gg_._size_l_18l9r_gg_ {\n font-size: 16px;\n}\n\n@media (prefers-reduced-motion) {\n .___SLinkTrigger_18l9r_gg_ {\n transition: none\n }\n .___SLinkTrigger_18l9r_gg_ .___SText_18l9r_gg_ {\n transition: none;\n }\n}\n"
35
35
  /*__inner_css_end__*/
36
- , "2an6d_gg_")
36
+ , "18l9r_gg_")
37
37
  /*__reshadow_css_end__*/
38
38
  , {
39
- "__SLinkTrigger": "___SLinkTrigger_2an6d_gg_",
40
- "_active": "__active_2an6d_gg_",
41
- "__SText": "___SText_2an6d_gg_",
42
- "_color": "__color_2an6d_gg_",
43
- "--color": "--color_2an6d",
44
- "--color-hover": "--color-hover_2an6d",
45
- "_disabled": "__disabled_2an6d_gg_",
46
- "_keyboardFocused": "__keyboardFocused_2an6d_gg_",
47
- "__SAddon": "___SAddon_2an6d_gg_",
48
- "__SLinkAddon": "___SLinkAddon_2an6d_gg_",
49
- "_size_m": "_size_m_2an6d_gg_",
50
- "_size_l": "_size_l_2an6d_gg_"
39
+ "__SLinkTrigger": "___SLinkTrigger_18l9r_gg_",
40
+ "_active": "__active_18l9r_gg_",
41
+ "__SText": "___SText_18l9r_gg_",
42
+ "_color": "__color_18l9r_gg_",
43
+ "--color": "--color_18l9r",
44
+ "--color-hover": "--color-hover_18l9r",
45
+ "_disabled": "__disabled_18l9r_gg_",
46
+ "_keyboardFocused": "__keyboardFocused_18l9r_gg_",
47
+ "__SAddon": "___SAddon_18l9r_gg_",
48
+ "__SLinkAddon": "___SLinkAddon_18l9r_gg_",
49
+ "_size_m": "_size_m_18l9r_gg_",
50
+ "_size_l": "_size_l_18l9r_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.0.24",
4
+ "version": "3.2.0",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",
@@ -12,13 +12,13 @@
12
12
  "@semcore/utils": "^3.15",
13
13
  "@semcore/dot": "^4.0.0",
14
14
  "@semcore/flex-box": "^4",
15
- "@semcore/icon": "^2.16",
16
- "@semcore/neighbor-location": "^2",
15
+ "@semcore/icon": "2.16 - 3",
16
+ "@semcore/neighbor-location": "^3",
17
17
  "@semcore/spin": "^4"
18
18
  },
19
19
  "peerDependencies": {
20
20
  "@semcore/core": "^1.11",
21
- "react": "16.8 - 17"
21
+ "react": "16.8 - 18"
22
22
  },
23
23
  "jest": {
24
24
  "preset": "@semcore/jest-preset-ui"
@@ -29,7 +29,7 @@
29
29
  "directory": "semcore/base-trigger"
30
30
  },
31
31
  "devDependencies": {
32
- "@types/react": "16.8 - 17",
32
+ "@types/react": "18.0.21",
33
33
  "@semcore/jest-preset-ui": "1.0.0"
34
34
  },
35
35
  "scripts": {