@semcore/tab-line 4.40.0-prerelease.9 → 4.40.1-prerelease.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,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
- ## [4.40.0] - 2025-02-28
5
+ ## [4.40.1] - 2025-03-17
6
6
 
7
7
  ### Changed
8
8
 
9
- - Version minor update due to children dependencies update (`@semcore/flex-box` [5.40.1 ~> 5.41.0], `@semcore/neighbor-location` [4.38.1 ~> 4.39.0], `@semcore/utils` [4.45.1 ~> 4.47.1], `@semcore/core` [2.38.1 ~> 2.39.0]).
9
+ - Version patch update due to children dependencies update (`@semcore/flex-box` [5.41.0 ~> 5.41.1], `@semcore/neighbor-location` [4.40.0 ~> 4.40.1], `@semcore/utils` [4.48.0 ~> 4.48.1], `@semcore/core` [2.39.0 ~> 2.39.1]).
10
+
11
+ ## [4.40.0] - 2025-03-14
12
+
13
+ ### Added
14
+
15
+ - Build for ESM.
10
16
 
11
17
  ## [4.39.1] - 2025-02-05
12
18
 
@@ -22,19 +22,19 @@ var _keyboardFocusEnhance = _interopRequireDefault(require("@semcore/utils/lib/e
22
22
  var _a11yEnhance = _interopRequireDefault(require("@semcore/utils/lib/enhances/a11yEnhance"));
23
23
  var _neighborLocation = _interopRequireDefault(require("@semcore/neighbor-location"));
24
24
  /*__reshadow-styles__:"./style/tab-line.shadow.css"*/
25
- var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".___STabLine_1ofgb_gg_{position:relative;display:flex;width:100%;max-width:100%}.___STabLine_1ofgb_gg_.__underlined_1ofgb_gg_{border-bottom:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___STabLineItem_1ofgb_gg_{display:inline-flex;align-items:center;justify-content:center;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;-webkit-text-decoration:none;text-decoration:none;-webkit-tap-highlight-color:transparent;overflow:visible;outline:0;text-align:center;vertical-align:middle;font-family:inherit;cursor:pointer;border:0;background:0 0;color:var(--intergalactic-text-primary, #191b23);margin-right:var(--intergalactic-spacing-4x, 16px);font-weight:var(--intergalactic-medium, 500)}.___STabLineItem_1ofgb_gg_::-moz-focus-inner{border:0;padding:0}.___STabLineItem_1ofgb_gg_:active,.___STabLineItem_1ofgb_gg_:focus{outline:0;-webkit-text-decoration:none;text-decoration:none}@media (hover:hover){.___STabLineItem_1ofgb_gg_:hover{outline:0;-webkit-text-decoration:none;text-decoration:none}}.___STabLineItem_1ofgb_gg_::after,.___STabLineItem_1ofgb_gg_::before{content:\"\";position:absolute;left:0;bottom:-1px;height:3px;width:100%;background-color:transparent}.___STabLineItem_1ofgb_gg_::before{transition:background-color calc(var(--intergalactic-duration-control, 200)*1ms) ease-in-out}@media (hover:hover){.___STabLineItem_1ofgb_gg_:hover::before{background-color:var(--intergalactic-border-primary, #c4c7cf)}}.___STabLineItem_1ofgb_gg_.__selected_1ofgb_gg_::after{transition-delay:calc(var(--intergalactic-duration-control, 200)*1ms);background-color:var(--intergalactic-border-info-active, #006dca)}.___STabLineItem_1ofgb_gg_ .___SAddon_1ofgb_gg_:not(:last-child),.___STabLineItem_1ofgb_gg_ .___SText_1ofgb_gg_:not(:last-child){margin-right:var(--intergalactic-spacing-2x, 8px)}.___SCaret_1ofgb_gg_{position:absolute;bottom:-1px;height:3px;background-color:var(--intergalactic-border-info-active, #006dca);transition:calc(var(--intergalactic-duration-control, 200)*1ms) all ease-in-out}.___STabLineItem_1ofgb_gg_.__selected_1ofgb_gg_{flex-shrink:0}.___STabLineItem_1ofgb_gg_.__disabled_1ofgb_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}.___STabLineItem_1ofgb_gg_.__keyboardFocused_1ofgb_gg_{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}.___SText_1ofgb_gg_{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.___SAddon_1ofgb_gg_{display:inline-flex;align-items:center;justify-content:center}.___STabLineItem_1ofgb_gg_._size_m_1ofgb_gg_{height:28px;min-width:18px}.___STabLineItem_1ofgb_gg_._size_m_1ofgb_gg_ .___SText_1ofgb_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___STabLineItem_1ofgb_gg_._size_l_1ofgb_gg_{height:40px;min-width:26px}.___STabLineItem_1ofgb_gg_._size_l_1ofgb_gg_ .___SText_1ofgb_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%)}.___STabLineItem_1ofgb_gg_._neighborLocation_left_1ofgb_gg_{margin-right:0}@media (prefers-reduced-motion){.___STabLineItem_1ofgb_gg_.__selected_1ofgb_gg_::after,.___STabLineItem_1ofgb_gg_::after,.___STabLineItem_1ofgb_gg_::before{transition:none}.___SCaret_1ofgb_gg_{display:none}}" /*__inner_css_end__*/, "1ofgb_gg_") /*__reshadow_css_end__*/, {
26
- "__STabLine": "___STabLine_1ofgb_gg_",
27
- "_underlined": "__underlined_1ofgb_gg_",
28
- "__SCaret": "___SCaret_1ofgb_gg_",
29
- "__STabLineItem": "___STabLineItem_1ofgb_gg_",
30
- "_selected": "__selected_1ofgb_gg_",
31
- "_disabled": "__disabled_1ofgb_gg_",
32
- "_keyboardFocused": "__keyboardFocused_1ofgb_gg_",
33
- "__SText": "___SText_1ofgb_gg_",
34
- "__SAddon": "___SAddon_1ofgb_gg_",
35
- "_neighborLocation_left": "_neighborLocation_left_1ofgb_gg_",
36
- "_size_m": "_size_m_1ofgb_gg_",
37
- "_size_l": "_size_l_1ofgb_gg_"
25
+ var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".___STabLine_cskwx_gg_{position:relative;display:flex;width:100%;max-width:100%}.___STabLine_cskwx_gg_.__underlined_cskwx_gg_{border-bottom:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___STabLineItem_cskwx_gg_{display:inline-flex;align-items:center;justify-content:center;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;-webkit-text-decoration:none;text-decoration:none;-webkit-tap-highlight-color:transparent;overflow:visible;outline:0;text-align:center;vertical-align:middle;font-family:inherit;cursor:pointer;border:0;background:0 0;color:var(--intergalactic-text-primary, #191b23);margin-right:var(--intergalactic-spacing-4x, 16px);font-weight:var(--intergalactic-medium, 500)}.___STabLineItem_cskwx_gg_::-moz-focus-inner{border:0;padding:0}.___STabLineItem_cskwx_gg_:active,.___STabLineItem_cskwx_gg_:focus{outline:0;-webkit-text-decoration:none;text-decoration:none}@media (hover:hover){.___STabLineItem_cskwx_gg_:hover{outline:0;-webkit-text-decoration:none;text-decoration:none}}.___STabLineItem_cskwx_gg_::after,.___STabLineItem_cskwx_gg_::before{content:\"\";position:absolute;left:0;bottom:-1px;height:3px;width:100%;background-color:transparent}.___STabLineItem_cskwx_gg_::before{transition:background-color calc(var(--intergalactic-duration-control, 200)*1ms) ease-in-out}@media (hover:hover){.___STabLineItem_cskwx_gg_:hover::before{background-color:var(--intergalactic-border-primary, #c4c7cf)}}.___STabLineItem_cskwx_gg_.__selected_cskwx_gg_::after{transition-delay:calc(var(--intergalactic-duration-control, 200)*1ms);background-color:var(--intergalactic-border-info-active, #006dca)}.___STabLineItem_cskwx_gg_ .___SAddon_cskwx_gg_:not(:last-child),.___STabLineItem_cskwx_gg_ .___SText_cskwx_gg_:not(:last-child){margin-right:var(--intergalactic-spacing-2x, 8px)}.___SCaret_cskwx_gg_{position:absolute;bottom:-1px;height:3px;background-color:var(--intergalactic-border-info-active, #006dca);transition:calc(var(--intergalactic-duration-control, 200)*1ms) all ease-in-out}.___STabLineItem_cskwx_gg_.__selected_cskwx_gg_{flex-shrink:0}.___STabLineItem_cskwx_gg_.__disabled_cskwx_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}.___STabLineItem_cskwx_gg_.__keyboardFocused_cskwx_gg_{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}.___SText_cskwx_gg_{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.___SAddon_cskwx_gg_{display:inline-flex;align-items:center;justify-content:center}.___STabLineItem_cskwx_gg_._size_m_cskwx_gg_{height:28px;min-width:18px}.___STabLineItem_cskwx_gg_._size_m_cskwx_gg_ .___SText_cskwx_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___STabLineItem_cskwx_gg_._size_l_cskwx_gg_{height:40px;min-width:26px}.___STabLineItem_cskwx_gg_._size_l_cskwx_gg_ .___SText_cskwx_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%)}.___STabLineItem_cskwx_gg_._neighborLocation_left_cskwx_gg_{margin-right:0}@media (prefers-reduced-motion){.___STabLineItem_cskwx_gg_.__selected_cskwx_gg_::after,.___STabLineItem_cskwx_gg_::after,.___STabLineItem_cskwx_gg_::before{transition:none}.___SCaret_cskwx_gg_{display:none}}" /*__inner_css_end__*/, "cskwx_gg_") /*__reshadow_css_end__*/, {
26
+ "__STabLine": "___STabLine_cskwx_gg_",
27
+ "_underlined": "__underlined_cskwx_gg_",
28
+ "__SCaret": "___SCaret_cskwx_gg_",
29
+ "__STabLineItem": "___STabLineItem_cskwx_gg_",
30
+ "_selected": "__selected_cskwx_gg_",
31
+ "_disabled": "__disabled_cskwx_gg_",
32
+ "_keyboardFocused": "__keyboardFocused_cskwx_gg_",
33
+ "__SText": "___SText_cskwx_gg_",
34
+ "__SAddon": "___SAddon_cskwx_gg_",
35
+ "_neighborLocation_left": "_neighborLocation_left_cskwx_gg_",
36
+ "_size_m": "_size_m_cskwx_gg_",
37
+ "_size_l": "_size_l_cskwx_gg_"
38
38
  });
39
39
  var optionsA11yEnhance = {
40
40
  onNeighborChange: function onNeighborChange(neighborElement, props) {
@@ -18,19 +18,19 @@ import keyboardFocusEnhance from '@semcore/utils/lib/enhances/keyboardFocusEnhan
18
18
  import a11yEnhance from '@semcore/utils/lib/enhances/a11yEnhance';
19
19
  import NeighborLocation from '@semcore/neighbor-location';
20
20
  /*__reshadow-styles__:"./style/tab-line.shadow.css"*/
21
- var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___STabLine_1ofgb_gg_{position:relative;display:flex;width:100%;max-width:100%}.___STabLine_1ofgb_gg_.__underlined_1ofgb_gg_{border-bottom:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___STabLineItem_1ofgb_gg_{display:inline-flex;align-items:center;justify-content:center;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;-webkit-text-decoration:none;text-decoration:none;-webkit-tap-highlight-color:transparent;overflow:visible;outline:0;text-align:center;vertical-align:middle;font-family:inherit;cursor:pointer;border:0;background:0 0;color:var(--intergalactic-text-primary, #191b23);margin-right:var(--intergalactic-spacing-4x, 16px);font-weight:var(--intergalactic-medium, 500)}.___STabLineItem_1ofgb_gg_::-moz-focus-inner{border:0;padding:0}.___STabLineItem_1ofgb_gg_:active,.___STabLineItem_1ofgb_gg_:focus{outline:0;-webkit-text-decoration:none;text-decoration:none}@media (hover:hover){.___STabLineItem_1ofgb_gg_:hover{outline:0;-webkit-text-decoration:none;text-decoration:none}}.___STabLineItem_1ofgb_gg_::after,.___STabLineItem_1ofgb_gg_::before{content:\"\";position:absolute;left:0;bottom:-1px;height:3px;width:100%;background-color:transparent}.___STabLineItem_1ofgb_gg_::before{transition:background-color calc(var(--intergalactic-duration-control, 200)*1ms) ease-in-out}@media (hover:hover){.___STabLineItem_1ofgb_gg_:hover::before{background-color:var(--intergalactic-border-primary, #c4c7cf)}}.___STabLineItem_1ofgb_gg_.__selected_1ofgb_gg_::after{transition-delay:calc(var(--intergalactic-duration-control, 200)*1ms);background-color:var(--intergalactic-border-info-active, #006dca)}.___STabLineItem_1ofgb_gg_ .___SAddon_1ofgb_gg_:not(:last-child),.___STabLineItem_1ofgb_gg_ .___SText_1ofgb_gg_:not(:last-child){margin-right:var(--intergalactic-spacing-2x, 8px)}.___SCaret_1ofgb_gg_{position:absolute;bottom:-1px;height:3px;background-color:var(--intergalactic-border-info-active, #006dca);transition:calc(var(--intergalactic-duration-control, 200)*1ms) all ease-in-out}.___STabLineItem_1ofgb_gg_.__selected_1ofgb_gg_{flex-shrink:0}.___STabLineItem_1ofgb_gg_.__disabled_1ofgb_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}.___STabLineItem_1ofgb_gg_.__keyboardFocused_1ofgb_gg_{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}.___SText_1ofgb_gg_{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.___SAddon_1ofgb_gg_{display:inline-flex;align-items:center;justify-content:center}.___STabLineItem_1ofgb_gg_._size_m_1ofgb_gg_{height:28px;min-width:18px}.___STabLineItem_1ofgb_gg_._size_m_1ofgb_gg_ .___SText_1ofgb_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___STabLineItem_1ofgb_gg_._size_l_1ofgb_gg_{height:40px;min-width:26px}.___STabLineItem_1ofgb_gg_._size_l_1ofgb_gg_ .___SText_1ofgb_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%)}.___STabLineItem_1ofgb_gg_._neighborLocation_left_1ofgb_gg_{margin-right:0}@media (prefers-reduced-motion){.___STabLineItem_1ofgb_gg_.__selected_1ofgb_gg_::after,.___STabLineItem_1ofgb_gg_::after,.___STabLineItem_1ofgb_gg_::before{transition:none}.___SCaret_1ofgb_gg_{display:none}}" /*__inner_css_end__*/, "1ofgb_gg_") /*__reshadow_css_end__*/, {
22
- "__STabLine": "___STabLine_1ofgb_gg_",
23
- "_underlined": "__underlined_1ofgb_gg_",
24
- "__SCaret": "___SCaret_1ofgb_gg_",
25
- "__STabLineItem": "___STabLineItem_1ofgb_gg_",
26
- "_selected": "__selected_1ofgb_gg_",
27
- "_disabled": "__disabled_1ofgb_gg_",
28
- "_keyboardFocused": "__keyboardFocused_1ofgb_gg_",
29
- "__SText": "___SText_1ofgb_gg_",
30
- "__SAddon": "___SAddon_1ofgb_gg_",
31
- "_neighborLocation_left": "_neighborLocation_left_1ofgb_gg_",
32
- "_size_m": "_size_m_1ofgb_gg_",
33
- "_size_l": "_size_l_1ofgb_gg_"
21
+ var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___STabLine_cskwx_gg_{position:relative;display:flex;width:100%;max-width:100%}.___STabLine_cskwx_gg_.__underlined_cskwx_gg_{border-bottom:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___STabLineItem_cskwx_gg_{display:inline-flex;align-items:center;justify-content:center;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;-webkit-text-decoration:none;text-decoration:none;-webkit-tap-highlight-color:transparent;overflow:visible;outline:0;text-align:center;vertical-align:middle;font-family:inherit;cursor:pointer;border:0;background:0 0;color:var(--intergalactic-text-primary, #191b23);margin-right:var(--intergalactic-spacing-4x, 16px);font-weight:var(--intergalactic-medium, 500)}.___STabLineItem_cskwx_gg_::-moz-focus-inner{border:0;padding:0}.___STabLineItem_cskwx_gg_:active,.___STabLineItem_cskwx_gg_:focus{outline:0;-webkit-text-decoration:none;text-decoration:none}@media (hover:hover){.___STabLineItem_cskwx_gg_:hover{outline:0;-webkit-text-decoration:none;text-decoration:none}}.___STabLineItem_cskwx_gg_::after,.___STabLineItem_cskwx_gg_::before{content:\"\";position:absolute;left:0;bottom:-1px;height:3px;width:100%;background-color:transparent}.___STabLineItem_cskwx_gg_::before{transition:background-color calc(var(--intergalactic-duration-control, 200)*1ms) ease-in-out}@media (hover:hover){.___STabLineItem_cskwx_gg_:hover::before{background-color:var(--intergalactic-border-primary, #c4c7cf)}}.___STabLineItem_cskwx_gg_.__selected_cskwx_gg_::after{transition-delay:calc(var(--intergalactic-duration-control, 200)*1ms);background-color:var(--intergalactic-border-info-active, #006dca)}.___STabLineItem_cskwx_gg_ .___SAddon_cskwx_gg_:not(:last-child),.___STabLineItem_cskwx_gg_ .___SText_cskwx_gg_:not(:last-child){margin-right:var(--intergalactic-spacing-2x, 8px)}.___SCaret_cskwx_gg_{position:absolute;bottom:-1px;height:3px;background-color:var(--intergalactic-border-info-active, #006dca);transition:calc(var(--intergalactic-duration-control, 200)*1ms) all ease-in-out}.___STabLineItem_cskwx_gg_.__selected_cskwx_gg_{flex-shrink:0}.___STabLineItem_cskwx_gg_.__disabled_cskwx_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}.___STabLineItem_cskwx_gg_.__keyboardFocused_cskwx_gg_{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}.___SText_cskwx_gg_{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.___SAddon_cskwx_gg_{display:inline-flex;align-items:center;justify-content:center}.___STabLineItem_cskwx_gg_._size_m_cskwx_gg_{height:28px;min-width:18px}.___STabLineItem_cskwx_gg_._size_m_cskwx_gg_ .___SText_cskwx_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___STabLineItem_cskwx_gg_._size_l_cskwx_gg_{height:40px;min-width:26px}.___STabLineItem_cskwx_gg_._size_l_cskwx_gg_ .___SText_cskwx_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%)}.___STabLineItem_cskwx_gg_._neighborLocation_left_cskwx_gg_{margin-right:0}@media (prefers-reduced-motion){.___STabLineItem_cskwx_gg_.__selected_cskwx_gg_::after,.___STabLineItem_cskwx_gg_::after,.___STabLineItem_cskwx_gg_::before{transition:none}.___SCaret_cskwx_gg_{display:none}}" /*__inner_css_end__*/, "cskwx_gg_") /*__reshadow_css_end__*/, {
22
+ "__STabLine": "___STabLine_cskwx_gg_",
23
+ "_underlined": "__underlined_cskwx_gg_",
24
+ "__SCaret": "___SCaret_cskwx_gg_",
25
+ "__STabLineItem": "___STabLineItem_cskwx_gg_",
26
+ "_selected": "__selected_cskwx_gg_",
27
+ "_disabled": "__disabled_cskwx_gg_",
28
+ "_keyboardFocused": "__keyboardFocused_cskwx_gg_",
29
+ "__SText": "___SText_cskwx_gg_",
30
+ "__SAddon": "___SAddon_cskwx_gg_",
31
+ "_neighborLocation_left": "_neighborLocation_left_cskwx_gg_",
32
+ "_size_m": "_size_m_cskwx_gg_",
33
+ "_size_l": "_size_l_cskwx_gg_"
34
34
  });
35
35
  var optionsA11yEnhance = {
36
36
  onNeighborChange: function onNeighborChange(neighborElement, props) {
@@ -0,0 +1,204 @@
1
+ import u from "@babel/runtime/helpers/esm/objectSpread2";
2
+ import T from "@babel/runtime/helpers/esm/classCallCheck";
3
+ import L from "@babel/runtime/helpers/esm/createClass";
4
+ import d from "@babel/runtime/helpers/esm/assertThisInitialized";
5
+ import y from "@babel/runtime/helpers/esm/inherits";
6
+ import I from "@babel/runtime/helpers/esm/createSuper";
7
+ import c from "@babel/runtime/helpers/esm/defineProperty";
8
+ import { sstyled as C } from "@semcore/utils/lib/core/index";
9
+ import P, { sstyled as x, assignProps as b, Component as R } from "@semcore/core";
10
+ import l from "react";
11
+ import { Box as v } from "@semcore/flex-box";
12
+ import z from "@semcore/utils/lib/addonTextChildren";
13
+ import A from "@semcore/utils/lib/enhances/keyboardFocusEnhance";
14
+ import E from "@semcore/utils/lib/enhances/a11yEnhance";
15
+ import w from "@semcore/neighbor-location";
16
+ var N = (
17
+ /*__reshadow_css_start__*/
18
+ (C.insert(
19
+ /*__inner_css_start__*/
20
+ '.___STabLine_cskwx_gg_{position:relative;display:flex;width:100%;max-width:100%}.___STabLine_cskwx_gg_.__underlined_cskwx_gg_{border-bottom:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___STabLineItem_cskwx_gg_{display:inline-flex;align-items:center;justify-content:center;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;-webkit-text-decoration:none;text-decoration:none;-webkit-tap-highlight-color:transparent;overflow:visible;outline:0;text-align:center;vertical-align:middle;font-family:inherit;cursor:pointer;border:0;background:0 0;color:var(--intergalactic-text-primary, #191b23);margin-right:var(--intergalactic-spacing-4x, 16px);font-weight:var(--intergalactic-medium, 500)}.___STabLineItem_cskwx_gg_::-moz-focus-inner{border:0;padding:0}.___STabLineItem_cskwx_gg_:active,.___STabLineItem_cskwx_gg_:focus{outline:0;-webkit-text-decoration:none;text-decoration:none}@media (hover:hover){.___STabLineItem_cskwx_gg_:hover{outline:0;-webkit-text-decoration:none;text-decoration:none}}.___STabLineItem_cskwx_gg_::after,.___STabLineItem_cskwx_gg_::before{content:"";position:absolute;left:0;bottom:-1px;height:3px;width:100%;background-color:transparent}.___STabLineItem_cskwx_gg_::before{transition:background-color calc(var(--intergalactic-duration-control, 200)*1ms) ease-in-out}@media (hover:hover){.___STabLineItem_cskwx_gg_:hover::before{background-color:var(--intergalactic-border-primary, #c4c7cf)}}.___STabLineItem_cskwx_gg_.__selected_cskwx_gg_::after{transition-delay:calc(var(--intergalactic-duration-control, 200)*1ms);background-color:var(--intergalactic-border-info-active, #006dca)}.___STabLineItem_cskwx_gg_ .___SAddon_cskwx_gg_:not(:last-child),.___STabLineItem_cskwx_gg_ .___SText_cskwx_gg_:not(:last-child){margin-right:var(--intergalactic-spacing-2x, 8px)}.___SCaret_cskwx_gg_{position:absolute;bottom:-1px;height:3px;background-color:var(--intergalactic-border-info-active, #006dca);transition:calc(var(--intergalactic-duration-control, 200)*1ms) all ease-in-out}.___STabLineItem_cskwx_gg_.__selected_cskwx_gg_{flex-shrink:0}.___STabLineItem_cskwx_gg_.__disabled_cskwx_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}.___STabLineItem_cskwx_gg_.__keyboardFocused_cskwx_gg_{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}.___SText_cskwx_gg_{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.___SAddon_cskwx_gg_{display:inline-flex;align-items:center;justify-content:center}.___STabLineItem_cskwx_gg_._size_m_cskwx_gg_{height:28px;min-width:18px}.___STabLineItem_cskwx_gg_._size_m_cskwx_gg_ .___SText_cskwx_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___STabLineItem_cskwx_gg_._size_l_cskwx_gg_{height:40px;min-width:26px}.___STabLineItem_cskwx_gg_._size_l_cskwx_gg_ .___SText_cskwx_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%)}.___STabLineItem_cskwx_gg_._neighborLocation_left_cskwx_gg_{margin-right:0}@media (prefers-reduced-motion){.___STabLineItem_cskwx_gg_.__selected_cskwx_gg_::after,.___STabLineItem_cskwx_gg_::after,.___STabLineItem_cskwx_gg_::before{transition:none}.___SCaret_cskwx_gg_{display:none}}',
21
+ "cskwx_gg_"
22
+ ), {
23
+ __STabLine: "___STabLine_cskwx_gg_",
24
+ _underlined: "__underlined_cskwx_gg_",
25
+ __SCaret: "___SCaret_cskwx_gg_",
26
+ __STabLineItem: "___STabLineItem_cskwx_gg_",
27
+ _selected: "__selected_cskwx_gg_",
28
+ _disabled: "__disabled_cskwx_gg_",
29
+ _keyboardFocused: "__keyboardFocused_cskwx_gg_",
30
+ __SText: "___SText_cskwx_gg_",
31
+ __SAddon: "___SAddon_cskwx_gg_",
32
+ _neighborLocation_left: "_neighborLocation_left_cskwx_gg_",
33
+ _size_m: "_size_m_cskwx_gg_",
34
+ _size_l: "_size_l_cskwx_gg_"
35
+ })
36
+ ), V = {
37
+ onNeighborChange: function(r, n) {
38
+ r && (r.focus(), n.behavior === "auto" && r.click());
39
+ },
40
+ childSelector: ["role", "tab"]
41
+ }, h = /* @__PURE__ */ function(_) {
42
+ y(n, _);
43
+ var r = I(n);
44
+ function n() {
45
+ var e;
46
+ T(this, n);
47
+ for (var t = arguments.length, i = new Array(t), o = 0; o < t; o++)
48
+ i[o] = arguments[o];
49
+ return e = r.call.apply(r, [this].concat(i)), c(d(e), "state", {
50
+ animation: null
51
+ }), c(d(e), "prevValue", void 0), c(d(e), "itemRefs", {}), c(d(e), "containerRef", /* @__PURE__ */ l.createRef()), c(d(e), "animationStartTimeout", -1), c(d(e), "handleAnimationStart", function() {
52
+ var a;
53
+ ((a = e.state.animation) === null || a === void 0 ? void 0 : a.started) === !1 && e.setState({
54
+ animation: u(u({}, e.state.animation), {}, {
55
+ started: !0
56
+ })
57
+ });
58
+ }), c(d(e), "handleAnimationEnd", function() {
59
+ e.setState({
60
+ animation: null
61
+ });
62
+ }), c(d(e), "bindHandlerClick", function(a) {
63
+ return function(s) {
64
+ e.handlers.value(a, s);
65
+ };
66
+ }), e;
67
+ }
68
+ return L(n, [{
69
+ key: "uncontrolledProps",
70
+ value: function() {
71
+ return {
72
+ value: null
73
+ };
74
+ }
75
+ }, {
76
+ key: "componentDidUpdate",
77
+ value: function() {
78
+ this.prevValue !== null && this.asProps.value !== null && this.prevValue !== this.asProps.value && this.animate(), this.prevValue = this.asProps.value;
79
+ }
80
+ }, {
81
+ key: "componentDidMount",
82
+ value: function() {
83
+ this.prevValue = this.asProps.value;
84
+ }
85
+ }, {
86
+ key: "componentWillUnmount",
87
+ value: function() {
88
+ clearTimeout(this.animationStartTimeout);
89
+ }
90
+ }, {
91
+ key: "animate",
92
+ value: function() {
93
+ var t = this.itemRefs[this.prevValue], i = this.itemRefs[this.asProps.value], o = this.containerRef.current;
94
+ if (!(!t || !i || !o)) {
95
+ var a = o.getBoundingClientRect(), s = t.getBoundingClientRect(), g = i.getBoundingClientRect(), m = {
96
+ fromLeft: s.x - a.x,
97
+ fromWidth: s.width,
98
+ toLeft: g.x - a.x,
99
+ toWidth: g.width,
100
+ started: !1
101
+ };
102
+ this.setState({
103
+ animation: m
104
+ }), clearTimeout(this.animationStartTimeout), this.animationStartTimeout = setTimeout(this.handleAnimationStart, 0);
105
+ }
106
+ }
107
+ }, {
108
+ key: "getItemProps",
109
+ value: function(t, i) {
110
+ var o = this, a = this.asProps, s = a.value, g = a.size, m = s === t.value;
111
+ return {
112
+ size: g,
113
+ selected: m,
114
+ onClick: this.bindHandlerClick(t.value),
115
+ tabIndex: m ? 0 : -1,
116
+ "aria-selected": m,
117
+ ref: function(p) {
118
+ o.itemRefs[t.value] = p;
119
+ }
120
+ };
121
+ }
122
+ }, {
123
+ key: "getCaretProps",
124
+ value: function() {
125
+ var t = this.state.animation;
126
+ return t ? t.started ? {
127
+ style: {
128
+ left: t.toLeft,
129
+ width: t.toWidth
130
+ },
131
+ onTransitionEnd: this.handleAnimationEnd
132
+ } : {
133
+ style: {
134
+ left: t.fromLeft,
135
+ width: t.fromWidth
136
+ },
137
+ onTransitionEnd: this.handleAnimationEnd
138
+ } : {};
139
+ }
140
+ }, {
141
+ key: "render",
142
+ value: function() {
143
+ var t = this.asProps, i, o = v, a = "div", s = this.asProps, g = s.styles, m = s.Children, k = s.controlsLength, p = this.state.animation;
144
+ return i = x(g), /* @__PURE__ */ l.createElement(o, i.cn("STabLine", u({}, b({
145
+ role: "tablist",
146
+ ref: this.containerRef
147
+ }, t))), /* @__PURE__ */ l.createElement(w, i.cn("NeighborLocation", {
148
+ controlsLength: k
149
+ }), /* @__PURE__ */ l.createElement(m, i.cn("Children", {}))), p && /* @__PURE__ */ l.createElement(a, i.cn("SCaret", u({}, this.getCaretProps()))));
150
+ }
151
+ }]), n;
152
+ }(R);
153
+ c(h, "displayName", "TabLine");
154
+ c(h, "style", N);
155
+ c(h, "defaultProps", {
156
+ defaultValue: null,
157
+ size: "m",
158
+ underlined: !0,
159
+ behavior: "auto"
160
+ });
161
+ c(h, "enhance", [E(V)]);
162
+ function S(_) {
163
+ var r = arguments[0], n = v, e = _.Children, t = _.styles, i = _.addonLeft, o = _.addonRight, a = _.neighborLocation;
164
+ return /* @__PURE__ */ l.createElement(w.Detect, {
165
+ neighborLocation: a
166
+ }, function(s) {
167
+ var g;
168
+ return g = x(t), /* @__PURE__ */ l.createElement(n, g.cn("STabLineItem", u({}, b({
169
+ tag: "button",
170
+ neighborLocation: s,
171
+ type: "button",
172
+ role: "tab"
173
+ }, r))), i ? /* @__PURE__ */ l.createElement(f.Item.Addon, {
174
+ tag: i
175
+ }) : null, z(e, f.Item.Text, f.Item.Addon), o ? /* @__PURE__ */ l.createElement(f.Item.Addon, {
176
+ tag: o
177
+ }) : null);
178
+ });
179
+ }
180
+ S.enhance = [A()];
181
+ function W(_) {
182
+ var r = arguments[0], n, e = _.styles, t = v;
183
+ return n = x(e), /* @__PURE__ */ l.createElement(t, n.cn("SText", u({}, b({
184
+ tag: "span"
185
+ }, r))));
186
+ }
187
+ function D(_) {
188
+ var r = arguments[0], n, e = _.styles, t = v;
189
+ return n = x(e), /* @__PURE__ */ l.createElement(t, n.cn("SAddon", u({}, b({
190
+ tag: "span"
191
+ }, r))));
192
+ }
193
+ var f = P(h, {
194
+ Item: [S, {
195
+ Text: W,
196
+ Addon: D
197
+ }]
198
+ }), Z = function(r) {
199
+ return r;
200
+ };
201
+ export {
202
+ f as default,
203
+ Z as wrapTabLine
204
+ };
@@ -0,0 +1,5 @@
1
+ import { default as r, wrapTabLine as f } from "./TabLine.mjs";
2
+ export {
3
+ r as default,
4
+ f as wrapTabLine
5
+ };
package/package.json CHANGED
@@ -1,20 +1,25 @@
1
1
  {
2
2
  "name": "@semcore/tab-line",
3
3
  "description": "Semrush TabLine Component",
4
- "version": "4.40.0-prerelease.9",
4
+ "version": "4.40.1-prerelease.0",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",
8
8
  "sideEffects": false,
9
9
  "author": "UI-kit team <ui-kit-team@semrush.com>",
10
10
  "license": "MIT",
11
+ "exports": {
12
+ "require": "./lib/cjs/index.js",
13
+ "import": "./lib/esm/index.mjs",
14
+ "types": "./lib/types/index.d.ts"
15
+ },
11
16
  "dependencies": {
12
- "@semcore/flex-box": "5.41.0-prerelease.9",
13
- "@semcore/neighbor-location": "4.39.0-prerelease.9",
14
- "@semcore/utils": "4.47.1-prerelease.9"
17
+ "@semcore/flex-box": "5.41.1-prerelease.0",
18
+ "@semcore/neighbor-location": "4.40.1-prerelease.0",
19
+ "@semcore/utils": "4.48.1-prerelease.0"
15
20
  },
16
21
  "peerDependencies": {
17
- "@semcore/core": "^2.39.0-prerelease.9",
22
+ "@semcore/core": "^2.39.1-prerelease.0",
18
23
  "react": "16.8 - 18",
19
24
  "react-dom": "16.8 - 18"
20
25
  },
@@ -28,6 +33,6 @@
28
33
  "@semcore/testing-utils": "1.0.0"
29
34
  },
30
35
  "scripts": {
31
- "build": "pnpm semcore-builder --source=js"
36
+ "build": "pnpm semcore-builder --source=js && pnpm vite build"
32
37
  }
33
38
  }
package/vite.config.ts ADDED
@@ -0,0 +1,17 @@
1
+ import { defineConfig, mergeConfig } from 'vite';
2
+
3
+ import viteConfig from '../../commonVite.config';
4
+
5
+ export default mergeConfig(
6
+ viteConfig,
7
+ defineConfig({
8
+ build: {
9
+ lib: {
10
+ entry: './src/index.js',
11
+ },
12
+ rollupOptions: {
13
+ external: ['react', 'react-dom', 'react/jsx-runtime', /@babel\/runtime\/*/, /@semcore\/*/],
14
+ },
15
+ },
16
+ }),
17
+ );