@salutejs/plasma-new-hope 0.118.0-dev.0 → 0.118.1-canary.1333.10283987438.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (194) hide show
  1. package/cjs/components/Modal/Modal.js +3 -1
  2. package/cjs/components/Modal/Modal.js.map +1 -1
  3. package/cjs/components/Tabs/tokens.js +5 -2
  4. package/cjs/components/Tabs/tokens.js.map +1 -1
  5. package/cjs/components/Tabs/ui/TabItem/TabItem.css +1 -1
  6. package/cjs/components/Tabs/ui/TabItem/TabItem.js +14 -2
  7. package/cjs/components/Tabs/ui/TabItem/TabItem.js.map +1 -1
  8. package/cjs/components/Tabs/ui/TabItem/variations/_view/base.js +1 -1
  9. package/cjs/components/Tabs/ui/TabItem/variations/_view/base.js.map +1 -1
  10. package/cjs/components/Tabs/ui/TabItem/variations/_view/base_7pcxtm.css +1 -0
  11. package/cjs/components/Tabs/ui/Tabs/Tabs.css +6 -6
  12. package/cjs/components/Tabs/ui/Tabs/Tabs.js +57 -8
  13. package/cjs/components/Tabs/ui/Tabs/Tabs.js.map +1 -1
  14. package/cjs/components/Tabs/ui/Tabs/Tabs.styles.js +7 -7
  15. package/cjs/components/Tabs/ui/Tabs/Tabs.styles.js.map +1 -1
  16. package/{es/components/Tabs/ui/Tabs/Tabs.styles_1b8qt33.css → cjs/components/Tabs/ui/Tabs/Tabs.styles_z4dnzh.css} +2 -2
  17. package/cjs/components/Tabs/ui/Tabs/variations/_stretch/base.js +1 -1
  18. package/cjs/components/Tabs/ui/Tabs/variations/_stretch/base.js.map +1 -1
  19. package/{es/components/Tabs/ui/Tabs/variations/_stretch/base_176tz0n.css → cjs/components/Tabs/ui/Tabs/variations/_stretch/base_1c7lnrm.css} +1 -1
  20. package/cjs/components/Tabs/ui/Tabs/variations/_view/base.js +1 -1
  21. package/{es/components/Tabs/ui/Tabs/variations/_view/base_4xkt26.css → cjs/components/Tabs/ui/Tabs/variations/_view/base_aij3sf.css} +1 -1
  22. package/cjs/hooks/useFocusTrap.js +97 -0
  23. package/cjs/hooks/useFocusTrap.js.map +1 -0
  24. package/cjs/index.css +7 -7
  25. package/cjs/index.js +2 -0
  26. package/cjs/index.js.map +1 -1
  27. package/cjs/utils/focusManager.js +56 -0
  28. package/cjs/utils/focusManager.js.map +1 -0
  29. package/cjs/utils/scopeTab.js +37 -0
  30. package/cjs/utils/scopeTab.js.map +1 -0
  31. package/cjs/utils/tabbable.js +51 -0
  32. package/cjs/utils/tabbable.js.map +1 -0
  33. package/emotion/cjs/components/Modal/Modal.js +4 -3
  34. package/emotion/cjs/components/Tabs/Tabs.template-doc.mdx +89 -3
  35. package/emotion/cjs/components/Tabs/tokens.js +5 -2
  36. package/emotion/cjs/components/Tabs/ui/TabItem/TabItem.js +14 -2
  37. package/emotion/cjs/components/Tabs/ui/TabItem/variations/_view/base.js +1 -1
  38. package/emotion/cjs/components/Tabs/ui/Tabs/Tabs.js +57 -8
  39. package/emotion/cjs/components/Tabs/ui/Tabs/Tabs.styles.js +8 -16
  40. package/emotion/cjs/components/Tabs/ui/Tabs/variations/_stretch/base.js +1 -1
  41. package/emotion/cjs/components/Tabs/ui/Tabs/variations/_view/tokens.json +1 -1
  42. package/emotion/cjs/examples/plasma_b2c/components/Modal/Modal.stories.tsx +113 -1
  43. package/emotion/cjs/examples/plasma_b2c/components/Tabs/TabItem.config.js +15 -15
  44. package/emotion/cjs/examples/plasma_b2c/components/Tabs/Tabs.config.js +16 -17
  45. package/emotion/cjs/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +238 -197
  46. package/emotion/cjs/examples/plasma_web/components/Modal/Modal.stories.tsx +113 -1
  47. package/emotion/cjs/examples/plasma_web/components/Tabs/TabItem.config.js +15 -15
  48. package/emotion/cjs/examples/plasma_web/components/Tabs/Tabs.config.js +16 -17
  49. package/emotion/cjs/examples/plasma_web/components/Tabs/Tabs.stories.tsx +238 -197
  50. package/emotion/cjs/hooks/index.js +7 -0
  51. package/emotion/cjs/hooks/useFocusTrap.js +95 -0
  52. package/emotion/cjs/utils/focusManager.js +60 -0
  53. package/emotion/cjs/utils/scopeTab.js +35 -0
  54. package/emotion/cjs/utils/tabbable.js +46 -0
  55. package/emotion/cjs/utils/useFocusTrap.js +95 -0
  56. package/emotion/es/components/Modal/Modal.js +3 -2
  57. package/emotion/es/components/Tabs/Tabs.template-doc.mdx +89 -3
  58. package/emotion/es/components/Tabs/tokens.js +5 -2
  59. package/emotion/es/components/Tabs/ui/TabItem/TabItem.js +14 -2
  60. package/emotion/es/components/Tabs/ui/TabItem/variations/_view/base.js +1 -1
  61. package/emotion/es/components/Tabs/ui/Tabs/Tabs.js +58 -9
  62. package/emotion/es/components/Tabs/ui/Tabs/Tabs.styles.js +9 -17
  63. package/emotion/es/components/Tabs/ui/Tabs/variations/_stretch/base.js +1 -1
  64. package/emotion/es/components/Tabs/ui/Tabs/variations/_view/tokens.json +1 -1
  65. package/emotion/es/examples/plasma_b2c/components/Modal/Modal.stories.tsx +113 -1
  66. package/emotion/es/examples/plasma_b2c/components/Tabs/TabItem.config.js +15 -15
  67. package/emotion/es/examples/plasma_b2c/components/Tabs/Tabs.config.js +16 -17
  68. package/emotion/es/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +238 -197
  69. package/emotion/es/examples/plasma_web/components/Modal/Modal.stories.tsx +113 -1
  70. package/emotion/es/examples/plasma_web/components/Tabs/TabItem.config.js +15 -15
  71. package/emotion/es/examples/plasma_web/components/Tabs/Tabs.config.js +16 -17
  72. package/emotion/es/examples/plasma_web/components/Tabs/Tabs.stories.tsx +238 -197
  73. package/emotion/es/hooks/index.js +1 -0
  74. package/emotion/es/hooks/useFocusTrap.js +90 -0
  75. package/emotion/es/utils/focusManager.js +55 -0
  76. package/emotion/es/utils/scopeTab.js +30 -0
  77. package/emotion/es/utils/tabbable.js +40 -0
  78. package/emotion/es/utils/useFocusTrap.js +90 -0
  79. package/es/components/Modal/Modal.js +4 -2
  80. package/es/components/Modal/Modal.js.map +1 -1
  81. package/es/components/Tabs/tokens.js +5 -2
  82. package/es/components/Tabs/tokens.js.map +1 -1
  83. package/es/components/Tabs/ui/TabItem/TabItem.css +1 -1
  84. package/es/components/Tabs/ui/TabItem/TabItem.js +14 -2
  85. package/es/components/Tabs/ui/TabItem/TabItem.js.map +1 -1
  86. package/es/components/Tabs/ui/TabItem/variations/_view/base.js +1 -1
  87. package/es/components/Tabs/ui/TabItem/variations/_view/base.js.map +1 -1
  88. package/es/components/Tabs/ui/TabItem/variations/_view/base_7pcxtm.css +1 -0
  89. package/es/components/Tabs/ui/Tabs/Tabs.css +6 -6
  90. package/es/components/Tabs/ui/Tabs/Tabs.js +58 -9
  91. package/es/components/Tabs/ui/Tabs/Tabs.js.map +1 -1
  92. package/es/components/Tabs/ui/Tabs/Tabs.styles.js +7 -7
  93. package/es/components/Tabs/ui/Tabs/Tabs.styles.js.map +1 -1
  94. package/{cjs/components/Tabs/ui/Tabs/Tabs.styles_1b8qt33.css → es/components/Tabs/ui/Tabs/Tabs.styles_z4dnzh.css} +2 -2
  95. package/es/components/Tabs/ui/Tabs/variations/_stretch/base.js +1 -1
  96. package/es/components/Tabs/ui/Tabs/variations/_stretch/base.js.map +1 -1
  97. package/{cjs/components/Tabs/ui/Tabs/variations/_stretch/base_176tz0n.css → es/components/Tabs/ui/Tabs/variations/_stretch/base_1c7lnrm.css} +1 -1
  98. package/es/components/Tabs/ui/Tabs/variations/_view/base.js +1 -1
  99. package/{cjs/components/Tabs/ui/Tabs/variations/_view/base_4xkt26.css → es/components/Tabs/ui/Tabs/variations/_view/base_aij3sf.css} +1 -1
  100. package/es/hooks/useFocusTrap.js +93 -0
  101. package/es/hooks/useFocusTrap.js.map +1 -0
  102. package/es/index.css +7 -7
  103. package/es/index.js +1 -0
  104. package/es/index.js.map +1 -1
  105. package/es/utils/focusManager.js +52 -0
  106. package/es/utils/focusManager.js.map +1 -0
  107. package/es/utils/scopeTab.js +33 -0
  108. package/es/utils/scopeTab.js.map +1 -0
  109. package/es/utils/tabbable.js +43 -0
  110. package/es/utils/tabbable.js.map +1 -0
  111. package/package.json +4 -4
  112. package/styled-components/cjs/components/Modal/Modal.js +4 -3
  113. package/styled-components/cjs/components/Tabs/Tabs.template-doc.mdx +89 -3
  114. package/styled-components/cjs/components/Tabs/tokens.js +5 -2
  115. package/styled-components/cjs/components/Tabs/ui/TabItem/TabItem.js +14 -2
  116. package/styled-components/cjs/components/Tabs/ui/TabItem/variations/_view/base.js +1 -1
  117. package/styled-components/cjs/components/Tabs/ui/Tabs/Tabs.js +57 -8
  118. package/styled-components/cjs/components/Tabs/ui/Tabs/Tabs.styles.js +2 -2
  119. package/styled-components/cjs/components/Tabs/ui/Tabs/variations/_stretch/base.js +1 -1
  120. package/styled-components/cjs/components/Tabs/ui/Tabs/variations/_view/tokens.json +1 -1
  121. package/styled-components/cjs/examples/plasma_b2c/components/Modal/Modal.stories.tsx +113 -1
  122. package/styled-components/cjs/examples/plasma_b2c/components/Tabs/TabItem.config.js +8 -8
  123. package/styled-components/cjs/examples/plasma_b2c/components/Tabs/Tabs.config.js +4 -5
  124. package/styled-components/cjs/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +238 -197
  125. package/styled-components/cjs/examples/plasma_web/components/Modal/Modal.stories.tsx +113 -1
  126. package/styled-components/cjs/examples/plasma_web/components/Tabs/TabItem.config.js +8 -8
  127. package/styled-components/cjs/examples/plasma_web/components/Tabs/Tabs.config.js +4 -5
  128. package/styled-components/cjs/examples/plasma_web/components/Tabs/Tabs.stories.tsx +238 -197
  129. package/styled-components/cjs/hooks/index.js +7 -0
  130. package/styled-components/cjs/hooks/useFocusTrap.js +95 -0
  131. package/styled-components/cjs/utils/focusManager.js +60 -0
  132. package/styled-components/cjs/utils/scopeTab.js +35 -0
  133. package/styled-components/cjs/utils/tabbable.js +46 -0
  134. package/styled-components/cjs/utils/useFocusTrap.js +95 -0
  135. package/styled-components/es/components/Modal/Modal.js +3 -2
  136. package/styled-components/es/components/Tabs/Tabs.template-doc.mdx +89 -3
  137. package/styled-components/es/components/Tabs/tokens.js +5 -2
  138. package/styled-components/es/components/Tabs/ui/TabItem/TabItem.js +14 -2
  139. package/styled-components/es/components/Tabs/ui/TabItem/variations/_view/base.js +1 -1
  140. package/styled-components/es/components/Tabs/ui/Tabs/Tabs.js +58 -9
  141. package/styled-components/es/components/Tabs/ui/Tabs/Tabs.styles.js +3 -3
  142. package/styled-components/es/components/Tabs/ui/Tabs/variations/_stretch/base.js +1 -1
  143. package/styled-components/es/components/Tabs/ui/Tabs/variations/_view/tokens.json +1 -1
  144. package/styled-components/es/examples/plasma_b2c/components/Modal/Modal.stories.tsx +113 -1
  145. package/styled-components/es/examples/plasma_b2c/components/Tabs/TabItem.config.js +8 -8
  146. package/styled-components/es/examples/plasma_b2c/components/Tabs/Tabs.config.js +4 -5
  147. package/styled-components/es/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +238 -197
  148. package/styled-components/es/examples/plasma_web/components/Modal/Modal.stories.tsx +113 -1
  149. package/styled-components/es/examples/plasma_web/components/Tabs/TabItem.config.js +8 -8
  150. package/styled-components/es/examples/plasma_web/components/Tabs/Tabs.config.js +4 -5
  151. package/styled-components/es/examples/plasma_web/components/Tabs/Tabs.stories.tsx +238 -197
  152. package/styled-components/es/hooks/index.js +1 -0
  153. package/styled-components/es/hooks/useFocusTrap.js +90 -0
  154. package/styled-components/es/utils/focusManager.js +55 -0
  155. package/styled-components/es/utils/scopeTab.js +30 -0
  156. package/styled-components/es/utils/tabbable.js +40 -0
  157. package/styled-components/es/utils/useFocusTrap.js +90 -0
  158. package/types/components/Modal/Modal.d.ts.map +1 -1
  159. package/types/components/Tabs/tokens.d.ts +3 -0
  160. package/types/components/Tabs/tokens.d.ts.map +1 -1
  161. package/types/components/Tabs/ui/TabItem/TabItem.d.ts.map +1 -1
  162. package/types/components/Tabs/ui/TabItem/variations/_view/base.d.ts.map +1 -1
  163. package/types/components/Tabs/ui/Tabs/Tabs.d.ts +4 -2
  164. package/types/components/Tabs/ui/Tabs/Tabs.d.ts.map +1 -1
  165. package/types/components/Tabs/ui/Tabs/Tabs.styles.d.ts.map +1 -1
  166. package/types/components/Tabs/ui/Tabs/Tabs.types.d.ts +12 -5
  167. package/types/components/Tabs/ui/Tabs/Tabs.types.d.ts.map +1 -1
  168. package/types/components/Tabs/ui/Tabs/variations/_stretch/base.d.ts.map +1 -1
  169. package/types/examples/plasma_b2c/components/Tabs/TabItem.config.d.ts.map +1 -1
  170. package/types/examples/plasma_b2c/components/Tabs/Tabs.config.d.ts +0 -1
  171. package/types/examples/plasma_b2c/components/Tabs/Tabs.config.d.ts.map +1 -1
  172. package/types/examples/plasma_b2c/components/Tabs/Tabs.d.ts +2 -1
  173. package/types/examples/plasma_b2c/components/Tabs/Tabs.d.ts.map +1 -1
  174. package/types/examples/plasma_web/components/Tabs/TabItem.config.d.ts.map +1 -1
  175. package/types/examples/plasma_web/components/Tabs/Tabs.config.d.ts +0 -1
  176. package/types/examples/plasma_web/components/Tabs/Tabs.config.d.ts.map +1 -1
  177. package/types/examples/plasma_web/components/Tabs/Tabs.d.ts +2 -1
  178. package/types/examples/plasma_web/components/Tabs/Tabs.d.ts.map +1 -1
  179. package/types/examples/sds_engineer/components/Tabs/Tabs.d.ts +2 -1
  180. package/types/examples/sds_engineer/components/Tabs/Tabs.d.ts.map +1 -1
  181. package/types/hooks/index.d.ts +1 -0
  182. package/types/hooks/index.d.ts.map +1 -1
  183. package/types/hooks/useFocusTrap.d.ts +6 -0
  184. package/types/hooks/useFocusTrap.d.ts.map +1 -0
  185. package/types/utils/focusManager.d.ts +15 -0
  186. package/types/utils/focusManager.d.ts.map +1 -0
  187. package/types/utils/scopeTab.d.ts +7 -0
  188. package/types/utils/scopeTab.d.ts.map +1 -0
  189. package/types/utils/tabbable.d.ts +6 -0
  190. package/types/utils/tabbable.d.ts.map +1 -0
  191. package/types/utils/useFocusTrap.d.ts +6 -0
  192. package/types/utils/useFocusTrap.d.ts.map +1 -0
  193. package/cjs/components/Tabs/ui/TabItem/variations/_view/base_q8xs21.css +0 -1
  194. package/es/components/Tabs/ui/TabItem/variations/_view/base_q8xs21.css +0 -1
@@ -1,4 +1,4 @@
1
- var _excluded = ["id", "stretch", "disabled", "size", "view", "children", "pilled", "index", "className"];
1
+ var _excluded = ["id", "stretch", "disabled", "clip", "size", "view", "children", "pilled", "index", "className"];
2
2
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
3
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
4
4
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -9,7 +9,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
9
9
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
10
10
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
11
11
  import React, { forwardRef, useCallback, useMemo, useState, useEffect, useRef } from 'react';
12
- import { animatedScrollToX, safeUseId } from '@salutejs/plasma-core';
12
+ import { safeUseId } from '@salutejs/plasma-core';
13
13
  import { IconDisclosureLeft, IconDisclosureRight } from '../../../_Icon';
14
14
  import { classes, tokens } from '../../tokens';
15
15
  import { cx } from '../../../../utils';
@@ -34,10 +34,13 @@ export var tabsRoot = function tabsRoot(Root) {
34
34
  stretch = _props$stretch === void 0 ? false : _props$stretch,
35
35
  _props$disabled = props.disabled,
36
36
  disabled = _props$disabled === void 0 ? false : _props$disabled,
37
+ _props$clip = props.clip,
38
+ clip = _props$clip === void 0 ? 'scroll' : _props$clip,
37
39
  size = props.size,
38
40
  view = props.view,
39
41
  children = props.children,
40
- pilled = props.pilled,
42
+ _props$pilled = props.pilled,
43
+ pilled = _props$pilled === void 0 ? false : _props$pilled,
41
44
  index = props.index,
42
45
  className = props.className,
43
46
  rest = _objectWithoutProperties(props, _excluded);
@@ -60,14 +63,47 @@ export var tabsRoot = function tabsRoot(Root) {
60
63
  var stretchClass = firstItemVisible && lastItemVisible && stretch ? classes.tabsStretch : undefined;
61
64
  var hasLeftArrowClass = !firstItemVisible ? classes.tabsHasLeftArrow : undefined;
62
65
  var hasRightArrowClass = !lastItemVisible ? classes.tabsHasRightArrow : undefined;
66
+ var clipScrollClass = clip === 'scroll' ? classes.tabsClipScroll : undefined;
67
+ var clipShowAllClass = clip === 'showAll' ? classes.tabsClipShowAll : undefined;
63
68
  var scrollRef = useRef(null);
64
69
  var trackRef = useRef(null);
70
+ var leftArrowRef = useRef(null);
65
71
  var onPrev = useCallback(function () {
66
- !disabled && scrollRef.current && animatedScrollToX(scrollRef.current, scrollRef.current.scrollLeft - scrollRef.current.offsetWidth / 2);
67
- }, [disabled, scrollRef]);
72
+ var _firstOverflowingTab$;
73
+ if (disabled || !scrollRef.current) {
74
+ return;
75
+ }
76
+ var scrollLeft = Math.round(scrollRef.current.scrollLeft);
77
+ var firstOverflowingTab = refs.items.slice().reverse().find(function (item) {
78
+ if (!item.current || item.current.offsetLeft === undefined) {
79
+ return;
80
+ }
81
+ var tabStartX = item.current.offsetLeft;
82
+ return tabStartX < scrollLeft;
83
+ });
84
+ firstOverflowingTab === null || firstOverflowingTab === void 0 || (_firstOverflowingTab$ = firstOverflowingTab.current) === null || _firstOverflowingTab$ === void 0 || _firstOverflowingTab$.scrollIntoView({
85
+ block: 'nearest',
86
+ inline: 'nearest'
87
+ });
88
+ }, [disabled, scrollRef, refs]);
68
89
  var onNext = useCallback(function () {
69
- !disabled && scrollRef.current && animatedScrollToX(scrollRef.current, scrollRef.current.scrollLeft + scrollRef.current.offsetWidth / 2);
70
- }, [disabled, scrollRef]);
90
+ var _lastOverflowingTab$c;
91
+ if (disabled || !scrollRef.current) {
92
+ return;
93
+ }
94
+ var scrollRight = Math.round(scrollRef.current.scrollLeft + scrollRef.current.clientWidth);
95
+ var lastOverflowingTab = refs.items.find(function (item) {
96
+ if (!item.current || item.current.offsetLeft === undefined) {
97
+ return;
98
+ }
99
+ var tabEndX = item.current.offsetLeft + item.current.offsetWidth;
100
+ return tabEndX > scrollRight;
101
+ });
102
+ lastOverflowingTab === null || lastOverflowingTab === void 0 || (_lastOverflowingTab$c = lastOverflowingTab.current) === null || _lastOverflowingTab$c === void 0 || _lastOverflowingTab$c.scrollIntoView({
103
+ block: 'nearest',
104
+ inline: 'nearest'
105
+ });
106
+ }, [disabled, scrollRef, refs]);
71
107
  var PreviousButton = useMemo(function () {
72
108
  return /*#__PURE__*/React.createElement(StyledArrow, {
73
109
  type: "button",
@@ -76,6 +112,7 @@ export var tabsRoot = function tabsRoot(Root) {
76
112
  tabIndex: disabled ? -1 : 0,
77
113
  disabled: disabled,
78
114
  isFilled: isFilled,
115
+ ref: leftArrowRef,
79
116
  isLeftArrow: true
80
117
  }, /*#__PURE__*/React.createElement(IconDisclosureLeft, {
81
118
  color: "var(".concat(tokens.arrowColor, ")")
@@ -96,8 +133,9 @@ export var tabsRoot = function tabsRoot(Root) {
96
133
  var handleScroll = useCallback(function (event) {
97
134
  event.stopPropagation();
98
135
  var maxScrollLeft = event.currentTarget.scrollWidth - event.currentTarget.clientWidth;
99
- setFirstItemVisible(event.currentTarget.scrollLeft <= 0);
100
- setLastItemVisible(event.currentTarget.scrollLeft >= maxScrollLeft);
136
+ var scrollLeft = Math.round(event.currentTarget.scrollLeft);
137
+ setFirstItemVisible(scrollLeft <= 0);
138
+ setLastItemVisible(scrollLeft >= maxScrollLeft);
101
139
  }, [setFirstItemVisible, setLastItemVisible]);
102
140
  var onKeyDown = useCallback(function (event) {
103
141
  if (index === undefined) {
@@ -137,6 +175,16 @@ export var tabsRoot = function tabsRoot(Root) {
137
175
  var _scrollRef$current, _scrollRef$current2;
138
176
  setLastItemVisible(((_scrollRef$current = scrollRef.current) === null || _scrollRef$current === void 0 ? void 0 : _scrollRef$current.scrollWidth) === ((_scrollRef$current2 = scrollRef.current) === null || _scrollRef$current2 === void 0 ? void 0 : _scrollRef$current2.clientWidth));
139
177
  }, []);
178
+
179
+ // Этот хук компенсирует появление левой стрелки при прокрутке
180
+ useEffect(function () {
181
+ if (firstItemVisible || !scrollRef.current || !leftArrowRef.current) {
182
+ return;
183
+ }
184
+ scrollRef.current.scrollTo({
185
+ left: Math.round(scrollRef.current.scrollLeft + leftArrowRef.current.clientWidth)
186
+ });
187
+ }, [firstItemVisible, scrollRef, leftArrowRef]);
140
188
  return /*#__PURE__*/React.createElement(TabsContext.Provider, {
141
189
  value: refs
142
190
  }, /*#__PURE__*/React.createElement(Root, _extends({
@@ -150,6 +198,7 @@ export var tabsRoot = function tabsRoot(Root) {
150
198
  className: cx(pilledClass, stretchClass, hasLeftArrowClass, hasRightArrowClass, className),
151
199
  onKeyDown: onKeyDown
152
200
  }, rest), !firstItemVisible && PreviousButton, /*#__PURE__*/React.createElement(StyledContentWrapper, {
201
+ className: cx(clipScrollClass, clipShowAllClass),
153
202
  ref: scrollRef,
154
203
  onScroll: handleScroll
155
204
  }, /*#__PURE__*/React.createElement(StyledContent, {
@@ -3,14 +3,14 @@ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(
3
3
  import { css } from 'styled-components';
4
4
  import styled from 'styled-components';
5
5
  import { addFocus } from '../../../../mixins';
6
- import { tokens } from '../../tokens';
7
- export var base = /*#__PURE__*/css(_templateObject || (_templateObject = /*#__PURE__*/_taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n position: relative;\n"])));
6
+ import { classes, tokens } from '../../tokens';
7
+ export var base = /*#__PURE__*/css(_templateObject || (_templateObject = /*#__PURE__*/_taggedTemplateLiteral(["\n display: flex;\n gap: 0.125rem;\n align-items: center;\n position: relative;\n"])));
8
8
  export var StyledContent = /*#__PURE__*/styled.div.withConfig({
9
9
  componentId: "plasma-new-hope__sc-1ibkmsl-0"
10
10
  })(["display:inline-flex;flex-direction:row;align-items:center;"]);
11
11
  export var StyledContentWrapper = /*#__PURE__*/styled.div.withConfig({
12
12
  componentId: "plasma-new-hope__sc-1ibkmsl-1"
13
- })(["margin:-0.125rem;padding:0.25rem;box-sizing:content-box;overflow:scroll;position:relative;height:100%;width:100%;display:flex;align-items:center;scrollbar-width:none;::-webkit-scrollbar{display:none;}overscroll-behavior:contain;"]);
13
+ })(["margin:-0.125rem;padding:0.25rem;box-sizing:content-box;position:relative;height:100%;width:100%;display:flex;align-items:center;&.", "{overflow:scroll;scroll-padding:0.25rem;overscroll-behavior:contain;scrollbar-width:none;::-webkit-scrollbar{display:none;}}&.", "{overflow:visible;}"], classes.tabsClipScroll, classes.tabsClipShowAll);
14
14
  export var StyledArrow = /*#__PURE__*/styled.button.withConfig({
15
15
  componentId: "plasma-new-hope__sc-1ibkmsl-2"
16
16
  })(["display:flex;cursor:pointer;border:none;background-color:transparent;padding:0;outline:none;", ";&[disabled]{cursor:not-allowed;}--plasma_private-outer-padding:", ";padding-right:", ";padding-left:", ";"], /*#__PURE__*/addFocus({
@@ -1,4 +1,4 @@
1
1
  import { css } from 'styled-components';
2
2
  import { classes } from '../../../../tokens';
3
3
  import { StyledContent, StyledContentWrapper } from '../../Tabs.styles';
4
- export var base = /*#__PURE__*/css(["&.", "{width:100%;", ",", ",", " > button{width:100%;}}"], classes.tabsStretch, StyledContentWrapper, StyledContent, StyledContent);
4
+ export var base = /*#__PURE__*/css(["&.", "{width:100%;", ",", ",", " > button{width:100%;margin-left:0;}}"], classes.tabsStretch, StyledContentWrapper, StyledContent, StyledContent);
@@ -1 +1 @@
1
- ["--plasma-tabs-backgorund-color", "--plasma-tabs-divider-height", "--plasma-tabs-divider-color"]
1
+ ["--plasma-tabs-background-color", "--plasma-tabs-divider-height", "--plasma-tabs-divider-color"]
@@ -1,4 +1,4 @@
1
- import React, { useState } from 'react';
1
+ import React, { useCallback, useRef, useState } from 'react';
2
2
  import styled from 'styled-components';
3
3
  import type { ComponentProps } from 'react';
4
4
  import type { StoryObj, Meta } from '@storybook/react';
@@ -6,6 +6,7 @@ import { SSRProvider } from '@salutejs/plasma-core';
6
6
 
7
7
  import { PopupProvider, popupClasses } from '../Popup/Popup';
8
8
  import { Button } from '../Button/Button';
9
+ import { TextField } from '../TextField/TextField';
9
10
  import { WithTheme } from '../../../_helpers';
10
11
 
11
12
  import { Modal, modalClasses } from './Modal';
@@ -206,3 +207,114 @@ export const ModalDemo: StoryObj<StoryModalProps> = {
206
207
  },
207
208
  render: (args) => <StoryModalDemo {...args} />,
208
209
  };
210
+
211
+ const StyledModalAnimation = styled(Modal)`
212
+ /* stylelint-disable */
213
+ && .${popupClasses.root} {
214
+ animation: fadeIn 1s forwards;
215
+ }
216
+
217
+ &&.${popupClasses.endAnimation} .${popupClasses.root} {
218
+ animation: fadeOut 1s forwards;
219
+ }
220
+
221
+ && .${modalClasses.overlay} {
222
+ animation: overlayFadeIn 1s forwards;
223
+ }
224
+
225
+ &&.${popupClasses.endAnimation} .${modalClasses.overlay} {
226
+ animation: overlayFadeOut 1s forwards;
227
+ }
228
+ /* stylelint-enable */
229
+
230
+ @keyframes overlayFadeIn {
231
+ from {
232
+ opacity: 0;
233
+ }
234
+
235
+ to {
236
+ opacity: 1;
237
+ }
238
+ }
239
+
240
+ @keyframes overlayFadeOut {
241
+ from {
242
+ opacity: 1;
243
+ }
244
+
245
+ to {
246
+ opacity: 0;
247
+ }
248
+ }
249
+
250
+ @keyframes fadeIn {
251
+ from {
252
+ opacity: 0;
253
+ transform: translate(-50%, 100%);
254
+ }
255
+
256
+ to {
257
+ opacity: 1;
258
+ transform: translate(-50%, -50%);
259
+ }
260
+ }
261
+
262
+ @keyframes fadeOut {
263
+ from {
264
+ opacity: 1;
265
+ transform: translate(-50%, -50%);
266
+ }
267
+
268
+ to {
269
+ opacity: 0;
270
+ transform: translate(-50%, 100%);
271
+ }
272
+ }
273
+ `;
274
+
275
+ const StoryModalAnimationDemo = ({ placement, offsetX, offsetY, ...rest }: StoryModalProps) => {
276
+ const ref = useRef(null);
277
+ const [isOpen, setIsOpen] = useState(false);
278
+
279
+ const close = useCallback(() => {
280
+ setIsOpen(false);
281
+ }, []);
282
+
283
+ return (
284
+ <SSRProvider>
285
+ <PopupProvider>
286
+ <Button view="default" text="Открыть новое модальное окно" onClick={() => setIsOpen(!isOpen)} />
287
+ <StyledModalAnimation
288
+ id="modal"
289
+ frame="theme-root"
290
+ withAnimation
291
+ onClose={() => setIsOpen(false)}
292
+ isOpen={isOpen}
293
+ placement={placement}
294
+ offset={[offsetX, offsetY]}
295
+ initialFocusRef={ref}
296
+ {...rest}
297
+ >
298
+ <Content>
299
+ <TextField value="Text" onChange={() => {}} />
300
+ <TextField ref={ref} value="Text2" onChange={() => {}} />
301
+ <Button text="Закрыть" onClick={close} />
302
+ </Content>
303
+ </StyledModalAnimation>
304
+ </PopupProvider>
305
+ </SSRProvider>
306
+ );
307
+ };
308
+
309
+ export const ModalBottomAnimation: StoryObj<StoryModalProps> = {
310
+ args: {
311
+ placement: 'bottom',
312
+ withAnimation: true,
313
+ withBlur: false,
314
+ closeOnEsc: true,
315
+ closeOnOverlayClick: true,
316
+ offsetX: 0,
317
+ offsetY: 0,
318
+ },
319
+ render: (args) => <StoryModalAnimationDemo {...args} />,
320
+ };
@@ -7,16 +7,16 @@ export var config = {
7
7
  },
8
8
  variations: {
9
9
  view: {
10
- clear: /*#__PURE__*/css(["", ":var(--text-secondary);", ":transparent;", ":var(--text-primary);", ":transparent;", ":var(--text-primary);", ":transparent;", ":var(--text-primary);", ":transparent;", ":background-color 0.3s ease-in-out;", ":0;", ":0;", ":var(--plasma-colors-button-focused);", ":0rem;", ":var(--text-primary);", ":var(--text-primary);", ":var(--text-tertiary);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--text-secondary);"], tabsTokens.itemColor, tabsTokens.itemBackgroundColor, tabsTokens.itemColorHover, tabsTokens.itemBackgroundColorHover, tabsTokens.itemSelectedColor, tabsTokens.itemSelectedBackgroundColor, tabsTokens.itemSelectedColorHover, tabsTokens.itemSelectedBackgroundColorHover, tabsTokens.itemBackgroundTransition, tabsTokens.itemPaddingClear, tabsTokens.itemContentPaddingClear, tabsTokens.outlineFocusColor, tabsTokens.itemSelectedDividerHeight, tabsTokens.itemSelectedDividerColor, tabsTokens.itemSelectedDividerColorHover, tabsTokens.additionalContentColor, tabsTokens.additionalContentHoverColor, tabsTokens.additionalContentSelectedColor, tabsTokens.additionalContentSelectedHoverColor),
11
- secondary: /*#__PURE__*/css(["", ":var(--text-primary);", ":transparent;", ":var(--text-primary);", ":transparent;", ":var(--text-primary);", ":var(--surface-solid-card);", ":var(--text-primary);", ":var(--surface-solid-card);", ":background-color 0.3s ease-in-out;", ":0.125rem;", ":var(--plasma-colors-button-focused);", ":0rem;", ":var(--text-primary);", ":var(--text-primary);", ":var(--text-primary);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--text-secondary);"], tabsTokens.itemColor, tabsTokens.itemBackgroundColor, tabsTokens.itemColorHover, tabsTokens.itemBackgroundColorHover, tabsTokens.itemSelectedColor, tabsTokens.itemSelectedBackgroundColor, tabsTokens.itemSelectedColorHover, tabsTokens.itemSelectedBackgroundColorHover, tabsTokens.itemBackgroundTransition, tabsTokens.itemMarginLeftFilled, tabsTokens.outlineFocusColor, tabsTokens.itemSelectedDividerHeight, tabsTokens.itemSelectedDividerColor, tabsTokens.itemSelectedDividerColorHover, tabsTokens.itemSelectedDividerColorHover, tabsTokens.additionalContentColor, tabsTokens.additionalContentHoverColor, tabsTokens.additionalContentSelectedColor, tabsTokens.additionalContentSelectedHoverColor),
12
- divider: /*#__PURE__*/css(["", ":var(--text-secondary);", ":transparent;", ":var(--text-primary);", ":transparent;", ":var(--text-primary);", ":transparent;", ":var(--text-primary);", ":transparent;", ":background-color 0.3s ease-in-out;", ":0;", ":0;", ":var(--plasma-colors-button-focused);", ":0.125rem;", ":var(--text-primary);", ":var(--text-primary);", ":var(--text-primary);", ":var(--text-tertiary);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--text-secondary);"], tabsTokens.itemColor, tabsTokens.itemBackgroundColor, tabsTokens.itemColorHover, tabsTokens.itemBackgroundColorHover, tabsTokens.itemSelectedColor, tabsTokens.itemSelectedBackgroundColor, tabsTokens.itemSelectedColorHover, tabsTokens.itemSelectedBackgroundColorHover, tabsTokens.itemBackgroundTransition, tabsTokens.itemPaddingClear, tabsTokens.itemContentPaddingClear, tabsTokens.outlineFocusColor, tabsTokens.itemSelectedDividerHeight, tabsTokens.itemSelectedDividerColor, tabsTokens.itemSelectedDividerColorHover, tabsTokens.itemSelectedDividerColorHover, tabsTokens.additionalContentColor, tabsTokens.additionalContentHoverColor, tabsTokens.additionalContentSelectedColor, tabsTokens.additionalContentSelectedHoverColor),
13
- "default": /*#__PURE__*/css(["", ":var(--text-primary);", ":transparent;", ":var(--text-primary);", ":transparent;", ":var(--inverse-text-primary);", ":var(--surface-solid-default);", ":var(--inverse-text-primary);", ":var(--surface-solid-default);", ":background-color 0.3s ease-in-out;", ":0.125rem;", ":var(--plasma-colors-button-focused);", ":0rem;", ":var(--text-primary);", ":var(--text-primary);", ":var(--text-primary);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--inverse-text-secondary);", ":var(--inverse-text-secondary);"], tabsTokens.itemColor, tabsTokens.itemBackgroundColor, tabsTokens.itemColorHover, tabsTokens.itemBackgroundColorHover, tabsTokens.itemSelectedColor, tabsTokens.itemSelectedBackgroundColor, tabsTokens.itemSelectedColorHover, tabsTokens.itemSelectedBackgroundColorHover, tabsTokens.itemBackgroundTransition, tabsTokens.itemMarginLeftFilled, tabsTokens.outlineFocusColor, tabsTokens.itemSelectedDividerHeight, tabsTokens.itemSelectedDividerColor, tabsTokens.itemSelectedDividerColorHover, tabsTokens.itemSelectedDividerColorHover, tabsTokens.additionalContentColor, tabsTokens.additionalContentHoverColor, tabsTokens.additionalContentSelectedColor, tabsTokens.additionalContentSelectedHoverColor)
10
+ clear: /*#__PURE__*/css(["", ":var(--text-secondary);", ":transparent;", ":var(--text-secondary-hover);", ":var(--text-secondary-active);", ":transparent;", ":var(--text-primary);", ":transparent;", ":var(--text-primary);", ":transparent;", ":background-color 0.3s ease-in-out;", ":0;", ":0;", ":var(--plasma-colors-button-focused);", ":0rem;", ":var(--text-primary);", ":var(--text-primary);", ":var(--text-tertiary);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--text-secondary);"], tabsTokens.itemColor, tabsTokens.itemBackgroundColor, tabsTokens.itemColorHover, tabsTokens.itemColorActive, tabsTokens.itemBackgroundColorHover, tabsTokens.itemSelectedColor, tabsTokens.itemSelectedBackgroundColor, tabsTokens.itemSelectedColorHover, tabsTokens.itemSelectedBackgroundColorHover, tabsTokens.itemBackgroundTransition, tabsTokens.itemPaddingClear, tabsTokens.itemContentPaddingClear, tabsTokens.outlineFocusColor, tabsTokens.itemSelectedDividerHeight, tabsTokens.itemSelectedDividerColor, tabsTokens.itemSelectedDividerColorHover, tabsTokens.additionalContentColor, tabsTokens.additionalContentHoverColor, tabsTokens.additionalContentSelectedColor, tabsTokens.additionalContentSelectedHoverColor),
11
+ secondary: /*#__PURE__*/css(["", ":var(--text-primary);", ":transparent;", ":var(--text-secondary-hover);", ":var(--text-secondary-active);", ":transparent;", ":var(--text-primary);", ":var(--surface-solid-card);", ":var(--text-primary);", ":var(--surface-solid-card);", ":background-color 0.3s ease-in-out;", ":0.125rem;", ":var(--plasma-colors-button-focused);", ":0rem;", ":var(--text-primary);", ":var(--text-primary);", ":var(--text-primary);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--text-secondary);"], tabsTokens.itemColor, tabsTokens.itemBackgroundColor, tabsTokens.itemColorHover, tabsTokens.itemColorActive, tabsTokens.itemBackgroundColorHover, tabsTokens.itemSelectedColor, tabsTokens.itemSelectedBackgroundColor, tabsTokens.itemSelectedColorHover, tabsTokens.itemSelectedBackgroundColorHover, tabsTokens.itemBackgroundTransition, tabsTokens.itemMarginLeftFilled, tabsTokens.outlineFocusColor, tabsTokens.itemSelectedDividerHeight, tabsTokens.itemSelectedDividerColor, tabsTokens.itemSelectedDividerColorHover, tabsTokens.itemSelectedDividerColorHover, tabsTokens.additionalContentColor, tabsTokens.additionalContentHoverColor, tabsTokens.additionalContentSelectedColor, tabsTokens.additionalContentSelectedHoverColor),
12
+ divider: /*#__PURE__*/css(["", ":var(--text-secondary);", ":transparent;", ":var(--text-secondary-hover);", ":var(--text-secondary-active);", ":transparent;", ":var(--text-primary);", ":transparent;", ":var(--text-primary);", ":transparent;", ":background-color 0.3s ease-in-out;", ":0;", ":0;", ":var(--plasma-colors-button-focused);", ":0.125rem;", ":var(--text-primary);", ":var(--text-primary);", ":var(--text-primary);", ":var(--text-tertiary);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--text-secondary);"], tabsTokens.itemColor, tabsTokens.itemBackgroundColor, tabsTokens.itemColorHover, tabsTokens.itemColorActive, tabsTokens.itemBackgroundColorHover, tabsTokens.itemSelectedColor, tabsTokens.itemSelectedBackgroundColor, tabsTokens.itemSelectedColorHover, tabsTokens.itemSelectedBackgroundColorHover, tabsTokens.itemBackgroundTransition, tabsTokens.itemPaddingClear, tabsTokens.itemContentPaddingClear, tabsTokens.outlineFocusColor, tabsTokens.itemSelectedDividerHeight, tabsTokens.itemSelectedDividerColor, tabsTokens.itemSelectedDividerColorHover, tabsTokens.itemSelectedDividerColorHover, tabsTokens.additionalContentColor, tabsTokens.additionalContentHoverColor, tabsTokens.additionalContentSelectedColor, tabsTokens.additionalContentSelectedHoverColor),
13
+ "default": /*#__PURE__*/css(["", ":var(--text-primary);", ":transparent;", ":var(--text-secondary-hover);", ":var(--text-secondary-active);", ":transparent;", ":var(--inverse-text-primary);", ":var(--surface-solid-default);", ":var(--inverse-text-primary);", ":var(--surface-solid-default);", ":background-color 0.3s ease-in-out;", ":0.125rem;", ":var(--plasma-colors-button-focused);", ":0rem;", ":var(--text-primary);", ":var(--text-primary);", ":var(--text-primary);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--inverse-text-secondary);", ":var(--inverse-text-secondary);"], tabsTokens.itemColor, tabsTokens.itemBackgroundColor, tabsTokens.itemColorHover, tabsTokens.itemColorActive, tabsTokens.itemBackgroundColorHover, tabsTokens.itemSelectedColor, tabsTokens.itemSelectedBackgroundColor, tabsTokens.itemSelectedColorHover, tabsTokens.itemSelectedBackgroundColorHover, tabsTokens.itemBackgroundTransition, tabsTokens.itemMarginLeftFilled, tabsTokens.outlineFocusColor, tabsTokens.itemSelectedDividerHeight, tabsTokens.itemSelectedDividerColor, tabsTokens.itemSelectedDividerColorHover, tabsTokens.itemSelectedDividerColorHover, tabsTokens.additionalContentColor, tabsTokens.additionalContentHoverColor, tabsTokens.additionalContentSelectedColor, tabsTokens.additionalContentSelectedHoverColor)
14
14
  },
15
15
  size: {
16
- xs: /*#__PURE__*/css(["", ":0.375rem;", ":auto;", ":1.5rem;", ":0 0.5rem;", ":0 0.375rem;", ":1.75rem;", ":0.25rem;", ":0.125rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);"], tabsTokens.itemBorderRadius, tabsTokens.itemWidth, tabsTokens.itemHeight, tabsTokens.itemPadding, tabsTokens.itemPaddingPilled, tabsTokens.itemMarginLeft, tabsTokens.itemContentGap, tabsTokens.itemContentPadding, tabsTokens.fontFamily, tabsTokens.fontSize, tabsTokens.fontStyle, tabsTokens.fontWeight, tabsTokens.letterSpacing, tabsTokens.lineHeight),
17
- s: /*#__PURE__*/css(["", ":0.5rem;", ":auto;", ":2rem;", ":0 0.625rem;", ":0 0.5rem;", ":1.75rem;", ":0.25rem;", ":0.125rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);"], tabsTokens.itemBorderRadius, tabsTokens.itemWidth, tabsTokens.itemHeight, tabsTokens.itemPadding, tabsTokens.itemPaddingPilled, tabsTokens.itemMarginLeft, tabsTokens.itemContentGap, tabsTokens.itemContentPadding, tabsTokens.fontFamily, tabsTokens.fontSize, tabsTokens.fontStyle, tabsTokens.fontWeight, tabsTokens.letterSpacing, tabsTokens.lineHeight),
18
- m: /*#__PURE__*/css(["", ":0.625rem;", ":auto;", ":2.5rem;", ":0 0.625rem;", ":0 0.5rem;", ":1.75rem;", ":0.5rem;", ":0.125rem;", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);"], tabsTokens.itemBorderRadius, tabsTokens.itemWidth, tabsTokens.itemHeight, tabsTokens.itemPadding, tabsTokens.itemPaddingPilled, tabsTokens.itemMarginLeft, tabsTokens.itemContentGap, tabsTokens.itemContentPadding, tabsTokens.fontFamily, tabsTokens.fontSize, tabsTokens.fontStyle, tabsTokens.fontWeight, tabsTokens.letterSpacing, tabsTokens.lineHeight),
19
- l: /*#__PURE__*/css(["", ":0.75rem;", ":auto;", ":3rem;", ":0 0.875rem;", ":0 0.75rem;", ":1.75rem;", ":0.5rem;", ":0.125rem;", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);"], tabsTokens.itemBorderRadius, tabsTokens.itemWidth, tabsTokens.itemHeight, tabsTokens.itemPadding, tabsTokens.itemPaddingPilled, tabsTokens.itemMarginLeft, tabsTokens.itemContentGap, tabsTokens.itemContentPadding, tabsTokens.fontFamily, tabsTokens.fontSize, tabsTokens.fontStyle, tabsTokens.fontWeight, tabsTokens.letterSpacing, tabsTokens.lineHeight),
16
+ xs: /*#__PURE__*/css(["", ":0.375rem;", ":auto;", ":2rem;", ":0 0.5rem;", ":0 0.375rem;", ":1.75rem;", ":0.25rem;", ":0.125rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);"], tabsTokens.itemBorderRadius, tabsTokens.itemWidth, tabsTokens.itemHeight, tabsTokens.itemPadding, tabsTokens.itemPaddingPilled, tabsTokens.itemMarginLeft, tabsTokens.itemContentGap, tabsTokens.itemContentPadding, tabsTokens.fontFamily, tabsTokens.fontSize, tabsTokens.fontStyle, tabsTokens.fontWeight, tabsTokens.letterSpacing, tabsTokens.lineHeight),
17
+ s: /*#__PURE__*/css(["", ":0.5rem;", ":auto;", ":2.5rem;", ":0 0.625rem;", ":0 0.5rem;", ":1.75rem;", ":0.25rem;", ":0.125rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);"], tabsTokens.itemBorderRadius, tabsTokens.itemWidth, tabsTokens.itemHeight, tabsTokens.itemPadding, tabsTokens.itemPaddingPilled, tabsTokens.itemMarginLeft, tabsTokens.itemContentGap, tabsTokens.itemContentPadding, tabsTokens.fontFamily, tabsTokens.fontSize, tabsTokens.fontStyle, tabsTokens.fontWeight, tabsTokens.letterSpacing, tabsTokens.lineHeight),
18
+ m: /*#__PURE__*/css(["", ":0.625rem;", ":auto;", ":3rem;", ":0 0.625rem;", ":0 0.5rem;", ":1.75rem;", ":0.375rem;", ":0.125rem;", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);"], tabsTokens.itemBorderRadius, tabsTokens.itemWidth, tabsTokens.itemHeight, tabsTokens.itemPadding, tabsTokens.itemPaddingPilled, tabsTokens.itemMarginLeft, tabsTokens.itemContentGap, tabsTokens.itemContentPadding, tabsTokens.fontFamily, tabsTokens.fontSize, tabsTokens.fontStyle, tabsTokens.fontWeight, tabsTokens.letterSpacing, tabsTokens.lineHeight),
19
+ l: /*#__PURE__*/css(["", ":0.75rem;", ":auto;", ":3.5rem;", ":0 0.875rem;", ":0 0.75rem;", ":1.75rem;", ":0.5rem;", ":0.125rem;", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);"], tabsTokens.itemBorderRadius, tabsTokens.itemWidth, tabsTokens.itemHeight, tabsTokens.itemPadding, tabsTokens.itemPaddingPilled, tabsTokens.itemMarginLeft, tabsTokens.itemContentGap, tabsTokens.itemContentPadding, tabsTokens.fontFamily, tabsTokens.fontSize, tabsTokens.fontStyle, tabsTokens.fontWeight, tabsTokens.letterSpacing, tabsTokens.lineHeight),
20
20
  h5: /*#__PURE__*/css(["", ":0.375rem;", ":auto;", ":3rem;", ":0rem;", ":1.75rem;", ":0.625rem;", ":var(--plasma-typo-h5-font-family);", ":var(--plasma-typo-h5-font-size);", ":var(--plasma-typo-h5-font-style);", ":var(--plasma-typo-h5-font-weight);", ":var(--plasma-typo-h5-letter-spacing);", ":var(--plasma-typo-h5-line-height);"], tabsTokens.itemBorderRadius, tabsTokens.itemWidth, tabsTokens.itemHeight, tabsTokens.itemPadding, tabsTokens.itemMarginLeft, tabsTokens.itemContentGap, tabsTokens.fontFamily, tabsTokens.fontSize, tabsTokens.fontStyle, tabsTokens.fontWeight, tabsTokens.letterSpacing, tabsTokens.lineHeight),
21
21
  h4: /*#__PURE__*/css(["", ":0.375rem;", ":auto;", ":3.25rem;", ":0rem;", ":2rem;", ":0.625rem;", ":var(--plasma-typo-h4-font-family);", ":var(--plasma-typo-h4-font-size);", ":var(--plasma-typo-h4-font-style);", ":var(--plasma-typo-h4-font-weight);", ":var(--plasma-typo-h4-letter-spacing);", ":var(--plasma-typo-h4-line-height);"], tabsTokens.itemBorderRadius, tabsTokens.itemWidth, tabsTokens.itemHeight, tabsTokens.itemPadding, tabsTokens.itemMarginLeft, tabsTokens.itemContentGap, tabsTokens.fontFamily, tabsTokens.fontSize, tabsTokens.fontStyle, tabsTokens.fontWeight, tabsTokens.letterSpacing, tabsTokens.lineHeight),
22
22
  h3: /*#__PURE__*/css(["", ":0.5rem;", ":auto;", ":3.875rem;", ":0rem;", ":2.25rem;", ":0.75rem;", ":var(--plasma-typo-h3-font-family);", ":var(--plasma-typo-h3-font-size);", ":var(--plasma-typo-h3-font-style);", ":var(--plasma-typo-h3-font-weight);", ":var(--plasma-typo-h3-letter-spacing);", ":var(--plasma-typo-h3-line-height);"], tabsTokens.itemBorderRadius, tabsTokens.itemWidth, tabsTokens.itemHeight, tabsTokens.itemPadding, tabsTokens.itemMarginLeft, tabsTokens.itemContentGap, tabsTokens.fontFamily, tabsTokens.fontSize, tabsTokens.fontStyle, tabsTokens.fontWeight, tabsTokens.letterSpacing, tabsTokens.lineHeight),
@@ -3,14 +3,13 @@ import { tabsTokens } from '../../../../components/Tabs';
3
3
  export var config = {
4
4
  defaults: {
5
5
  view: 'filled',
6
- size: 'xs',
7
- disabled: 'false'
6
+ size: 'xs'
8
7
  },
9
8
  variations: {
10
9
  view: {
11
- clear: /*#__PURE__*/css(["", ":var(--text-secondary);", ":tranparent;", ":var(--plasma-colors-button-focused);", ":0rem;", ":tranparent;", ":0rem;"], tabsTokens.arrowColor, tabsTokens.tabsBackgroundColor, tabsTokens.outlineFocusColor, tabsTokens.tabsDividerHeight, tabsTokens.tabsDividerColor, tabsTokens.tabsDividerBorderRadius),
12
- filled: /*#__PURE__*/css(["", ":var(--text-secondary);", ":var(--surface-transparent-primary);", ":var(--plasma-colors-button-focused);", ":0rem;", ":tranparent;", ":0rem;"], tabsTokens.arrowColor, tabsTokens.tabsBackgroundColor, tabsTokens.outlineFocusColor, tabsTokens.tabsDividerHeight, tabsTokens.tabsDividerColor, tabsTokens.tabsDividerBorderRadius),
13
- divider: /*#__PURE__*/css(["", ":var(--text-secondary);", ":tranparent;", ":var(--plasma-colors-button-focused);", ":0.0625rem;", ":var(--surface-transparent-secondary);", ":0.0625rem;"], tabsTokens.arrowColor, tabsTokens.tabsBackgroundColor, tabsTokens.outlineFocusColor, tabsTokens.tabsDividerHeight, tabsTokens.tabsDividerColor, tabsTokens.tabsDividerBorderRadius)
10
+ clear: /*#__PURE__*/css(["", ":var(--text-secondary);", ":transparent;", ":var(--plasma-colors-button-focused);", ":0rem;", ":transparent;", ":0rem;"], tabsTokens.arrowColor, tabsTokens.tabsBackgroundColor, tabsTokens.outlineFocusColor, tabsTokens.tabsDividerHeight, tabsTokens.tabsDividerColor, tabsTokens.tabsDividerBorderRadius),
11
+ filled: /*#__PURE__*/css(["", ":var(--text-secondary);", ":var(--surface-transparent-primary);", ":var(--plasma-colors-button-focused);", ":0rem;", ":transparent;", ":0rem;"], tabsTokens.arrowColor, tabsTokens.tabsBackgroundColor, tabsTokens.outlineFocusColor, tabsTokens.tabsDividerHeight, tabsTokens.tabsDividerColor, tabsTokens.tabsDividerBorderRadius),
12
+ divider: /*#__PURE__*/css(["", ":var(--text-secondary);", ":transparent;", ":var(--plasma-colors-button-focused);", ":0.0625rem;", ":var(--surface-transparent-tertiary);", ":0.0625rem;"], tabsTokens.arrowColor, tabsTokens.tabsBackgroundColor, tabsTokens.outlineFocusColor, tabsTokens.tabsDividerHeight, tabsTokens.tabsDividerColor, tabsTokens.tabsDividerBorderRadius)
14
13
  },
15
14
  size: {
16
15
  xs: /*#__PURE__*/css(["", ":0.5rem;", ":fit-content;", ":auto;", ":0rem;", ":0.125rem;"], tabsTokens.tabsBorderRadius, tabsTokens.tabsWidth, tabsTokens.tabsHeight, tabsTokens.arrowInnerPadding, tabsTokens.arrowOuterPadding),