@salutejs/plasma-new-hope 0.185.0-canary.1500.11703995241.0 → 0.185.0-canary.1536.11704107927.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (171) hide show
  1. package/cjs/components/Badge/Badge.css +3 -3
  2. package/cjs/components/Badge/Badge.js +3 -10
  3. package/cjs/components/Badge/Badge.js.map +1 -1
  4. package/cjs/components/Badge/Badge.styles.js +5 -5
  5. package/cjs/components/Badge/Badge.styles.js.map +1 -1
  6. package/cjs/components/Badge/Badge.styles_8pi3br.css +4 -0
  7. package/cjs/components/Badge/Badge.tokens.js +1 -2
  8. package/cjs/components/Badge/Badge.tokens.js.map +1 -1
  9. package/cjs/components/Chip/Chip.js +15 -8
  10. package/cjs/components/Chip/Chip.js.map +1 -1
  11. package/cjs/components/Tabs/tokens.js +1 -2
  12. package/cjs/components/Tabs/tokens.js.map +1 -1
  13. package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.css +6 -6
  14. package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +3 -9
  15. package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js.map +1 -1
  16. package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +6 -6
  17. package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js.map +1 -1
  18. package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles_uaaqqg.css +5 -0
  19. package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_view/base.js +1 -1
  20. package/{es/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_view/base_j8lg9u.css → cjs/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_view/base_4zingj.css} +1 -1
  21. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.css +6 -6
  22. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +3 -9
  23. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js.map +1 -1
  24. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +6 -6
  25. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js.map +1 -1
  26. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles_1g7zipg.css +5 -0
  27. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/variations/_view/base.js +1 -1
  28. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/variations/_view/{base_12fk3xi.css → base_fueiq8.css} +1 -1
  29. package/cjs/index.css +15 -15
  30. package/emotion/cjs/components/Badge/Badge.js +3 -15
  31. package/emotion/cjs/components/Badge/Badge.styles.js +13 -4
  32. package/emotion/cjs/components/Badge/Badge.tokens.js +1 -2
  33. package/emotion/cjs/components/Chip/Chip.js +15 -8
  34. package/emotion/cjs/components/Tabs/tokens.js +1 -2
  35. package/emotion/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +3 -14
  36. package/emotion/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +12 -12
  37. package/emotion/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +3 -14
  38. package/emotion/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +12 -12
  39. package/emotion/cjs/examples/plasma_b2c/components/Badge/Badge.config.js +14 -17
  40. package/emotion/cjs/examples/plasma_b2c/components/Badge/Badge.stories.tsx +1 -5
  41. package/emotion/cjs/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +19 -51
  42. package/emotion/cjs/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.js +15 -18
  43. package/emotion/cjs/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.js +6 -9
  44. package/emotion/cjs/examples/plasma_web/components/Tabs/Tabs.stories.tsx +19 -51
  45. package/emotion/cjs/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.js +15 -18
  46. package/emotion/cjs/examples/plasma_web/components/Tabs/vertical/VerticalTabItem.config.js +6 -9
  47. package/emotion/es/components/Badge/Badge.js +3 -16
  48. package/emotion/es/components/Badge/Badge.styles.js +14 -5
  49. package/emotion/es/components/Badge/Badge.tokens.js +1 -2
  50. package/emotion/es/components/Chip/Chip.js +16 -9
  51. package/emotion/es/components/Tabs/tokens.js +1 -2
  52. package/emotion/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +3 -15
  53. package/emotion/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +13 -13
  54. package/emotion/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +3 -15
  55. package/emotion/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +13 -13
  56. package/emotion/es/examples/plasma_b2c/components/Badge/Badge.config.js +14 -17
  57. package/emotion/es/examples/plasma_b2c/components/Badge/Badge.stories.tsx +1 -5
  58. package/emotion/es/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +19 -51
  59. package/emotion/es/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.js +15 -18
  60. package/emotion/es/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.js +6 -9
  61. package/emotion/es/examples/plasma_web/components/Tabs/Tabs.stories.tsx +19 -51
  62. package/emotion/es/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.js +15 -18
  63. package/emotion/es/examples/plasma_web/components/Tabs/vertical/VerticalTabItem.config.js +6 -9
  64. package/es/components/Badge/Badge.css +3 -3
  65. package/es/components/Badge/Badge.js +4 -11
  66. package/es/components/Badge/Badge.js.map +1 -1
  67. package/es/components/Badge/Badge.styles.js +5 -5
  68. package/es/components/Badge/Badge.styles.js.map +1 -1
  69. package/es/components/Badge/Badge.styles_8pi3br.css +4 -0
  70. package/es/components/Badge/Badge.tokens.js +1 -2
  71. package/es/components/Badge/Badge.tokens.js.map +1 -1
  72. package/es/components/Chip/Chip.js +18 -11
  73. package/es/components/Chip/Chip.js.map +1 -1
  74. package/es/components/Tabs/tokens.js +1 -2
  75. package/es/components/Tabs/tokens.js.map +1 -1
  76. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.css +6 -6
  77. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +4 -10
  78. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js.map +1 -1
  79. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +6 -6
  80. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js.map +1 -1
  81. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles_uaaqqg.css +5 -0
  82. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_view/base.js +1 -1
  83. package/{cjs/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_view/base_j8lg9u.css → es/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_view/base_4zingj.css} +1 -1
  84. package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.css +6 -6
  85. package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +4 -10
  86. package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js.map +1 -1
  87. package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +6 -6
  88. package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js.map +1 -1
  89. package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles_1g7zipg.css +5 -0
  90. package/es/components/Tabs/ui/vertical/VerticalTabItem/variations/_view/base.js +1 -1
  91. package/es/components/Tabs/ui/vertical/VerticalTabItem/variations/_view/{base_12fk3xi.css → base_fueiq8.css} +1 -1
  92. package/es/index.css +15 -15
  93. package/package.json +2 -2
  94. package/styled-components/cjs/components/Badge/Badge.js +3 -15
  95. package/styled-components/cjs/components/Badge/Badge.styles.js +2 -2
  96. package/styled-components/cjs/components/Badge/Badge.tokens.js +1 -2
  97. package/styled-components/cjs/components/Chip/Chip.js +15 -8
  98. package/styled-components/cjs/components/Tabs/tokens.js +1 -2
  99. package/styled-components/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +3 -14
  100. package/styled-components/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +8 -8
  101. package/styled-components/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +3 -14
  102. package/styled-components/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +9 -9
  103. package/styled-components/cjs/examples/plasma_b2c/components/Badge/Badge.config.js +0 -3
  104. package/styled-components/cjs/examples/plasma_b2c/components/Badge/Badge.stories.tsx +1 -5
  105. package/styled-components/cjs/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +19 -51
  106. package/styled-components/cjs/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.js +0 -3
  107. package/styled-components/cjs/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.js +0 -3
  108. package/styled-components/cjs/examples/plasma_web/components/Tabs/Tabs.stories.tsx +19 -51
  109. package/styled-components/cjs/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.js +0 -3
  110. package/styled-components/cjs/examples/plasma_web/components/Tabs/vertical/VerticalTabItem.config.js +0 -3
  111. package/styled-components/es/components/Badge/Badge.js +3 -16
  112. package/styled-components/es/components/Badge/Badge.styles.js +3 -3
  113. package/styled-components/es/components/Badge/Badge.tokens.js +1 -2
  114. package/styled-components/es/components/Chip/Chip.js +16 -9
  115. package/styled-components/es/components/Tabs/tokens.js +1 -2
  116. package/styled-components/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +3 -15
  117. package/styled-components/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +9 -9
  118. package/styled-components/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +3 -15
  119. package/styled-components/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +10 -10
  120. package/styled-components/es/examples/plasma_b2c/components/Badge/Badge.config.js +0 -3
  121. package/styled-components/es/examples/plasma_b2c/components/Badge/Badge.stories.tsx +1 -5
  122. package/styled-components/es/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +19 -51
  123. package/styled-components/es/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.js +0 -3
  124. package/styled-components/es/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.js +0 -3
  125. package/styled-components/es/examples/plasma_web/components/Tabs/Tabs.stories.tsx +19 -51
  126. package/styled-components/es/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.js +0 -3
  127. package/styled-components/es/examples/plasma_web/components/Tabs/vertical/VerticalTabItem.config.js +0 -3
  128. package/types/components/Badge/Badge.d.ts.map +1 -1
  129. package/types/components/Badge/Badge.styles.d.ts +1 -1
  130. package/types/components/Badge/Badge.styles.d.ts.map +1 -1
  131. package/types/components/Badge/Badge.tokens.d.ts +0 -1
  132. package/types/components/Badge/Badge.tokens.d.ts.map +1 -1
  133. package/types/components/Badge/Badge.types.d.ts +0 -5
  134. package/types/components/Badge/Badge.types.d.ts.map +1 -1
  135. package/types/components/Chip/Chip.d.ts.map +1 -1
  136. package/types/components/Chip/Chip.types.d.ts +7 -1
  137. package/types/components/Chip/Chip.types.d.ts.map +1 -1
  138. package/types/components/Tabs/TabItem.types.d.ts +0 -5
  139. package/types/components/Tabs/TabItem.types.d.ts.map +1 -1
  140. package/types/components/Tabs/tokens.d.ts +0 -1
  141. package/types/components/Tabs/tokens.d.ts.map +1 -1
  142. package/types/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.d.ts.map +1 -1
  143. package/types/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.d.ts +1 -1
  144. package/types/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.d.ts.map +1 -1
  145. package/types/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.d.ts.map +1 -1
  146. package/types/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.d.ts +1 -1
  147. package/types/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.d.ts.map +1 -1
  148. package/types/examples/plasma_b2c/components/Badge/Badge.config.d.ts +0 -3
  149. package/types/examples/plasma_b2c/components/Badge/Badge.config.d.ts.map +1 -1
  150. package/types/examples/plasma_b2c/components/Badge/Badge.d.ts +0 -6
  151. package/types/examples/plasma_b2c/components/Badge/Badge.d.ts.map +1 -1
  152. package/types/examples/plasma_b2c/components/Tabs/TabItem.d.ts +0 -6
  153. package/types/examples/plasma_b2c/components/Tabs/TabItem.d.ts.map +1 -1
  154. package/types/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.d.ts +0 -3
  155. package/types/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.d.ts.map +1 -1
  156. package/types/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.d.ts +0 -3
  157. package/types/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.d.ts.map +1 -1
  158. package/types/examples/plasma_web/components/Badge/Badge.d.ts +0 -3
  159. package/types/examples/plasma_web/components/Badge/Badge.d.ts.map +1 -1
  160. package/types/examples/plasma_web/components/Tabs/TabItem.d.ts +0 -6
  161. package/types/examples/plasma_web/components/Tabs/TabItem.d.ts.map +1 -1
  162. package/types/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.d.ts +0 -3
  163. package/types/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.d.ts.map +1 -1
  164. package/types/examples/plasma_web/components/Tabs/vertical/VerticalTabItem.config.d.ts +0 -3
  165. package/types/examples/plasma_web/components/Tabs/vertical/VerticalTabItem.config.d.ts.map +1 -1
  166. package/cjs/components/Badge/Badge.styles_hhbwyi.css +0 -4
  167. package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles_1yi1gll.css +0 -5
  168. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles_17vv6lq.css +0 -5
  169. package/es/components/Badge/Badge.styles_hhbwyi.css +0 -4
  170. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles_1yi1gll.css +0 -5
  171. package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles_17vv6lq.css +0 -5
@@ -1,6 +1,7 @@
1
1
  import styled from 'styled-components';
2
2
  import { css } from 'styled-components';
3
- import { classes, tokens } from './Badge.tokens';
3
+ import { tokens } from './Badge.tokens';
4
+ export var base = /*#__PURE__*/css(["display:inline-flex;align-items:center;box-sizing:border-box;justify-content:center;width:max-content;"]);
4
5
  export var StyledContentLeft = /*#__PURE__*/styled.div.withConfig({
5
6
  componentId: "plasma-new-hope__sc-naxmb2-0"
6
7
  })(["display:flex;margin-left:var(", ");margin-right:var(", ");"], tokens.leftContentMarginLeft, tokens.leftContentMarginRight);
@@ -9,5 +10,4 @@ export var StyledContentMain = /*#__PURE__*/styled.span.withConfig({
9
10
  })([""]);
10
11
  export var StyledContentRight = /*#__PURE__*/styled.div.withConfig({
11
12
  componentId: "plasma-new-hope__sc-naxmb2-2"
12
- })(["display:flex;margin-left:var(", ");margin-right:var(", ");"], tokens.rightContentMarginLeft, tokens.rightContentMarginRight);
13
- export var base = /*#__PURE__*/css(["display:inline-flex;align-items:center;box-sizing:border-box;justify-content:center;width:max-content;&.", "{max-width:100%;", "{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}}"], classes.badgeTruncate, StyledContentMain);
13
+ })(["display:flex;margin-left:var(", ");margin-right:var(", ");"], tokens.rightContentMarginLeft, tokens.rightContentMarginRight);
@@ -1,8 +1,7 @@
1
1
  export var classes = {
2
2
  badgePilled: 'badge-pilled',
3
3
  badgeTransparent: 'badge-transparent',
4
- badgeClear: 'badge-clear',
5
- badgeTruncate: 'badge-truncate'
4
+ badgeClear: 'badge-clear'
6
5
  };
7
6
  export var tokens = {
8
7
  background: '--plasma-badge-background',
@@ -1,8 +1,8 @@
1
- var _excluded = ["children", "text", "contentLeft", "contentRight", "contentClearButton", "hasClear", "size", "className", "onClear", "onClick", "pilled", "readOnly", "disabled"];
1
+ var _excluded = ["children", "text", "contentLeft", "contentRight", "contentClearButton", "hasClear", "size", "className", "onClear", "onClick", "onClickClose", "pilled", "readOnly", "disabled"];
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 _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; }
4
4
  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; }
5
- import React, { forwardRef, useMemo } from 'react';
5
+ import React, { forwardRef } from 'react';
6
6
  import { IconClose } from '../_Icon/Icons/IconClose';
7
7
  import { cx } from '../../utils';
8
8
  import { base as viewCSS } from './variations/_view/base';
@@ -26,6 +26,7 @@ export var chipRoot = function chipRoot(Root) {
26
26
  className = props.className,
27
27
  onClear = props.onClear,
28
28
  onClick = props.onClick,
29
+ onClickClose = props.onClickClose,
29
30
  _props$pilled = props.pilled,
30
31
  pilled = _props$pilled === void 0 ? false : _props$pilled,
31
32
  _props$readOnly = props.readOnly,
@@ -42,12 +43,13 @@ export var chipRoot = function chipRoot(Root) {
42
43
  onClick === null || onClick === void 0 || onClick(event);
43
44
  onClear === null || onClear === void 0 || onClear();
44
45
  };
45
- var ClearContent = useMemo(function () {
46
- return contentClearButton || /*#__PURE__*/React.createElement(StyledContentClear, null, /*#__PURE__*/React.createElement(IconClose, {
47
- sizeCustomProperty: tokens.closeIconSize,
48
- color: "inherit"
49
- }));
50
- }, [contentClearButton, tokens.closeIconSize]);
46
+ var handleClickClose = function handleClickClose(event) {
47
+ if (disabled || readOnly || !onClickClose) {
48
+ return;
49
+ }
50
+ event.stopPropagation();
51
+ onClickClose(event);
52
+ };
51
53
  return /*#__PURE__*/React.createElement(Root, _extends({
52
54
  type: "button",
53
55
  ref: ref,
@@ -58,7 +60,12 @@ export var chipRoot = function chipRoot(Root) {
58
60
  pilled: pilled,
59
61
  readOnly: !disabled && readOnly,
60
62
  size: size
61
- }, rest), contentLeft && /*#__PURE__*/React.createElement(StyledContentLeft, null, contentLeft), txt ? /*#__PURE__*/React.createElement(StyledContentMain, null, txt) : children, contentRight && /*#__PURE__*/React.createElement(StyledContentRight, null, contentRight), hasClear && ClearContent);
63
+ }, rest), contentLeft && /*#__PURE__*/React.createElement(StyledContentLeft, null, contentLeft), txt ? /*#__PURE__*/React.createElement(StyledContentMain, null, txt) : children, contentRight && /*#__PURE__*/React.createElement(StyledContentRight, null, contentRight), hasClear && (contentClearButton || /*#__PURE__*/React.createElement(StyledContentClear, {
64
+ onClick: handleClickClose
65
+ }, /*#__PURE__*/React.createElement(IconClose, {
66
+ sizeCustomProperty: tokens.closeIconSize,
67
+ color: "inherit"
68
+ }))));
62
69
  });
63
70
  };
64
71
  export var chipConfig = {
@@ -14,8 +14,7 @@ export var classes = {
14
14
  tabsHasTopArrow: 'tabs-has-top-arrow',
15
15
  tabsHasBottomArrow: 'tabs-has-bottom-arrow',
16
16
  tabsClipScroll: 'tabs-clip-scroll',
17
- tabsClipShowAll: 'tabs-clip-show-all',
18
- tabsTruncate: 'tabs-truncate'
17
+ tabsClipShowAll: 'tabs-clip-show-all'
19
18
  };
20
19
  export var tokens = {
21
20
  disabledOpacity: '--plasma-tabs-disabled-opacity',
@@ -1,11 +1,5 @@
1
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["size", "view", "isActive", "selected", "disabled", "pilled", "children", "value", "contentLeft", "contentRight", "animated", "onIndexChange", "itemIndex", "tabIndex", "className", "onClick", "maxItemWidth"];
1
+ var _excluded = ["size", "view", "isActive", "selected", "disabled", "pilled", "children", "value", "contentLeft", "contentRight", "animated", "onIndexChange", "itemIndex", "tabIndex", "className", "onClick"];
3
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); }
4
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
8
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
9
3
  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
4
  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
5
  import React, { forwardRef, useRef, useContext, useEffect, useCallback } from 'react';
@@ -39,13 +33,11 @@ export var horizontalTabItemRoot = function horizontalTabItemRoot(Root) {
39
33
  tabIndex = props.tabIndex,
40
34
  className = props.className,
41
35
  onClick = props.onClick,
42
- maxWidth = props.maxItemWidth,
43
36
  rest = _objectWithoutProperties(props, _excluded);
44
37
  var innerRef = useRef(null);
45
38
  var ref = useForkRef(outerRef, innerRef);
46
39
  var refs = useContext(TabsContext);
47
40
  var role = 'tab';
48
- var truncate = maxWidth !== 'auto';
49
41
  var pilledAttr = view !== 'clear' && pilled;
50
42
  var animatedClass = animated ? classes.tabItemAnimated : undefined;
51
43
  var pilledClass = pilledAttr ? classes.tabsPilled : undefined;
@@ -106,13 +98,9 @@ export var horizontalTabItemRoot = function horizontalTabItemRoot(Root) {
106
98
  size: size,
107
99
  onFocus: onItemFocus,
108
100
  tabIndex: hasKeyNavigation ? navigationTabIndex : tabIndex,
109
- className: cx(pilledClass, selectedClass, animatedClass, truncate && classes.tabsTruncate, className),
101
+ className: cx(pilledClass, selectedClass, animatedClass, className),
110
102
  onClick: handleClick
111
- }, rest, {
112
- style: _objectSpread(_objectSpread({}, rest.style), {}, {
113
- maxWidth: maxWidth
114
- })
115
- }), /*#__PURE__*/React.createElement(React.Fragment, null, contentLeft && /*#__PURE__*/React.createElement(LeftContent, {
103
+ }, rest), /*#__PURE__*/React.createElement(React.Fragment, null, contentLeft && /*#__PURE__*/React.createElement(LeftContent, {
116
104
  className: classes.tabLeftContent
117
105
  }, contentLeft), /*#__PURE__*/React.createElement(StyledContent, {
118
106
  className: classes.tabContent
@@ -1,7 +1,14 @@
1
1
  import styled from 'styled-components';
2
2
  import { css } from 'styled-components';
3
3
  import { addFocus } from '../../../../../mixins';
4
- import { classes, tokens } from '../../../tokens';
4
+ import { tokens } from '../../../tokens';
5
+ export var base = /*#__PURE__*/css(["position:relative;display:flex;align-items:center;justify-content:center;box-sizing:border-box;align-items:center;gap:var(", ");padding:var(", ",var(", "));appearance:none;border:none;outline:none;cursor:pointer;-webkit-tap-highlight-color:transparent;&:first-child{margin-left:0;}", ";"], tokens.itemContentGap, tokens.itemPaddingClear, tokens.itemPadding, /*#__PURE__*/addFocus({
6
+ outlineSize: '0.063rem',
7
+ outlineOffset: '-0.125rem',
8
+ outlineColor: /*#__PURE__*/"var(".concat(tokens.outlineFocusColor, ")"),
9
+ outlineRadius: 'calc(var(--plasma_private-outline-radius) + 0.063rem)',
10
+ customFocusRules: /*#__PURE__*/"\n &.focus-visible:focus,\n &[data-focus-visible-added] {\n &::before {\n z-index: 1;\n outline: none;\n box-shadow: 0 0 0 0.063rem var(".concat(tokens.outlineFocusColor, ");\n }\n }\n ")
11
+ }));
5
12
  export var StyledContent = /*#__PURE__*/styled.div.withConfig({
6
13
  componentId: "plasma-new-hope__sc-lremls-0"
7
14
  })(["display:inline-block;width:fit-content;padding:0 var(", ",var(", "));"], tokens.itemContentPaddingClear, tokens.itemContentPadding);
@@ -13,11 +20,4 @@ export var RightContent = /*#__PURE__*/styled.div.withConfig({
13
20
  })(["display:flex;color:inherit;&:hover{color:inherit;}"]);
14
21
  export var LeftContent = /*#__PURE__*/styled.div.withConfig({
15
22
  componentId: "plasma-new-hope__sc-lremls-3"
16
- })(["display:flex;color:inherit;&:hover{color:inherit;}"]);
17
- export var base = /*#__PURE__*/css(["position:relative;display:flex;align-items:center;justify-content:center;box-sizing:border-box;align-items:center;white-space:nowrap;gap:var(", ");padding:var(", ",var(", "));appearance:none;border:none;outline:none;cursor:pointer;-webkit-tap-highlight-color:transparent;&:first-child{margin-left:0;}", ";&.", "{", "{overflow:hidden;text-overflow:ellipsis;}", "{overflow:hidden;text-overflow:ellipsis;}}"], tokens.itemContentGap, tokens.itemPaddingClear, tokens.itemPadding, /*#__PURE__*/addFocus({
18
- outlineSize: '0.063rem',
19
- outlineOffset: '-0.125rem',
20
- outlineColor: /*#__PURE__*/"var(".concat(tokens.outlineFocusColor, ")"),
21
- outlineRadius: 'calc(var(--plasma_private-outline-radius) + 0.063rem)',
22
- customFocusRules: /*#__PURE__*/"\n &.focus-visible:focus,\n &[data-focus-visible-added] {\n &::before {\n z-index: 1;\n outline: none;\n box-shadow: 0 0 0 0.063rem var(".concat(tokens.outlineFocusColor, ");\n }\n }\n ")
23
- }), classes.tabsTruncate, StyledContent, TabItemValue);
23
+ })(["display:flex;color:inherit;&:hover{color:inherit;}"]);
@@ -1,11 +1,5 @@
1
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["size", "view", "selected", "disabled", "children", "value", "contentLeft", "contentRight", "onIndexChange", "itemIndex", "tabIndex", "className", "onClick", "maxItemWidth"];
1
+ var _excluded = ["size", "view", "selected", "disabled", "children", "value", "contentLeft", "contentRight", "onIndexChange", "itemIndex", "tabIndex", "className", "onClick"];
3
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); }
4
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
8
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
9
3
  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
4
  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
5
  import React, { forwardRef, useRef, useContext, useEffect, useCallback } from 'react';
@@ -33,13 +27,11 @@ export var verticalTabItemRoot = function verticalTabItemRoot(Root) {
33
27
  tabIndex = props.tabIndex,
34
28
  className = props.className,
35
29
  onClick = props.onClick,
36
- maxWidth = props.maxItemWidth,
37
30
  rest = _objectWithoutProperties(props, _excluded);
38
31
  var innerRef = useRef(null);
39
32
  var ref = useForkRef(outerRef, innerRef);
40
33
  var refs = useContext(TabsContext);
41
34
  var role = 'tab';
42
- var truncate = maxWidth !== 'auto';
43
35
  var selectedClass = selected ? classes.selectedTabsItem : undefined;
44
36
  var hasKeyNavigation = itemIndex !== undefined && onIndexChange !== undefined;
45
37
  var navigationTabIndex = !disabled && (refs === null || refs === void 0 ? void 0 : refs.current) === itemIndex ? 0 : -1;
@@ -93,13 +85,9 @@ export var verticalTabItemRoot = function verticalTabItemRoot(Root) {
93
85
  size: size,
94
86
  onFocus: onItemFocus,
95
87
  tabIndex: hasKeyNavigation ? navigationTabIndex : tabIndex,
96
- className: cx(selectedClass, truncate && classes.tabsTruncate, className),
88
+ className: cx(selectedClass, className),
97
89
  onClick: handleClick
98
- }, rest, {
99
- style: _objectSpread(_objectSpread({}, rest.style), {}, {
100
- maxWidth: maxWidth
101
- })
102
- }), /*#__PURE__*/React.createElement(React.Fragment, null, contentLeft && /*#__PURE__*/React.createElement(LeftContent, {
90
+ }, rest), /*#__PURE__*/React.createElement(React.Fragment, null, contentLeft && /*#__PURE__*/React.createElement(LeftContent, {
103
91
  className: classes.tabLeftContent
104
92
  }, contentLeft), /*#__PURE__*/React.createElement(StyledContent, {
105
93
  className: classes.tabContent
@@ -3,23 +3,23 @@ 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 { classes, tokens } from '../../../tokens';
6
+ import { tokens } from '../../../tokens';
7
+ export var base = /*#__PURE__*/css(_templateObject || (_templateObject = /*#__PURE__*/_taggedTemplateLiteral(["\n position: relative;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n box-sizing: border-box;\n align-items: center;\n\n gap: var(", ");\n padding: var(", ");\n\n appearance: none;\n border: none;\n outline: none;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n\n ", ";\n"])), tokens.itemContentGap, tokens.itemPaddingOrientationVertical, /*#__PURE__*/addFocus({
8
+ outlineSize: '0.063rem',
9
+ outlineOffset: '-0.125rem',
10
+ outlineColor: /*#__PURE__*/"var(".concat(tokens.outlineFocusColor, ")"),
11
+ outlineRadius: 'calc(var(--plasma_private-outline-radius) + 0.063rem)',
12
+ customFocusRules: /*#__PURE__*/"\n &.focus-visible:focus,\n &[data-focus-visible-added] {\n &::before {\n z-index: 1;\n outline: none;\n box-shadow: 0 0 0 0.063rem var(".concat(tokens.outlineFocusColor, ");\n }\n }\n ")
13
+ }));
7
14
  export var StyledContent = /*#__PURE__*/styled.div.withConfig({
8
15
  componentId: "plasma-new-hope__sc-1pflgj8-0"
9
16
  })(["display:inline-block;width:fit-content;padding:0 var(", ",var(", "));"], tokens.itemContentPaddingClear, tokens.itemContentPadding);
10
17
  export var TabItemValue = /*#__PURE__*/styled.span.withConfig({
11
18
  componentId: "plasma-new-hope__sc-1pflgj8-1"
12
- })(["white-space:nowrap;color:var(", ");font-family:var(", ",var(", "));font-size:var(", ",var(", "));font-style:var(", ",var(", "));font-weight:var(", ",var(", "));letter-spacing:var(", ",var(", "));line-height:var(", ",var(", "));"], tokens.itemValueColor, tokens.valueFontFamily, tokens.fontFamily, tokens.valueFontSize, tokens.fontSize, tokens.valueFontStyle, tokens.fontStyle, tokens.valueFontWeight, tokens.fontWeight, tokens.valueLetterSpacing, tokens.letterSpacing, tokens.valueLineHeight, tokens.lineHeight);
19
+ })(["color:var(", ");font-family:var(", ",var(", "));font-size:var(", ",var(", "));font-style:var(", ",var(", "));font-weight:var(", ",var(", "));letter-spacing:var(", ",var(", "));line-height:var(", ",var(", "));"], tokens.itemValueColor, tokens.valueFontFamily, tokens.fontFamily, tokens.valueFontSize, tokens.fontSize, tokens.valueFontStyle, tokens.fontStyle, tokens.valueFontWeight, tokens.fontWeight, tokens.valueLetterSpacing, tokens.letterSpacing, tokens.valueLineHeight, tokens.lineHeight);
13
20
  export var RightContent = /*#__PURE__*/styled.div.withConfig({
14
21
  componentId: "plasma-new-hope__sc-1pflgj8-2"
15
22
  })(["display:flex;color:inherit;&:hover{color:inherit;}"]);
16
23
  export var LeftContent = /*#__PURE__*/styled.div.withConfig({
17
24
  componentId: "plasma-new-hope__sc-1pflgj8-3"
18
- })(["display:flex;color:inherit;&:hover{color:inherit;}"]);
19
- export var base = /*#__PURE__*/css(_templateObject || (_templateObject = /*#__PURE__*/_taggedTemplateLiteral(["\n position: relative;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n box-sizing: border-box;\n white-space: nowrap;\n\n gap: var(", ");\n padding: var(", ");\n\n appearance: none;\n border: none;\n outline: none;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n\n ", ";\n\n &.", " {\n ", " {\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n ", " {\n overflow: hidden;\n text-overflow: ellipsis;\n }\n }\n"])), tokens.itemContentGap, tokens.itemPaddingOrientationVertical, /*#__PURE__*/addFocus({
20
- outlineSize: '0.063rem',
21
- outlineOffset: '-0.125rem',
22
- outlineColor: /*#__PURE__*/"var(".concat(tokens.outlineFocusColor, ")"),
23
- outlineRadius: 'calc(var(--plasma_private-outline-radius) + 0.063rem)',
24
- customFocusRules: /*#__PURE__*/"\n &.focus-visible:focus,\n &[data-focus-visible-added] {\n &::before {\n z-index: 1;\n outline: none;\n box-shadow: 0 0 0 0.063rem var(".concat(tokens.outlineFocusColor, ");\n }\n }\n ")
25
- }), classes.tabsTruncate, StyledContent, TabItemValue);
25
+ })(["display:flex;color:inherit;&:hover{color:inherit;}"]);
@@ -29,9 +29,6 @@ export var config = {
29
29
  },
30
30
  clear: {
31
31
  "true": /*#__PURE__*/css([""])
32
- },
33
- truncate: {
34
- "true": /*#__PURE__*/css([""])
35
32
  }
36
33
  }
37
34
  };
@@ -31,9 +31,6 @@ const meta: Meta<typeof Badge> = {
31
31
  control: { type: 'boolean' },
32
32
  if: { arg: 'clear', truthy: false },
33
33
  },
34
- maxWidth: {
35
- control: { type: 'text' },
36
- },
37
34
  ...disableProps(['contentLeft', 'contentRight']),
38
35
  },
39
36
  };
@@ -67,7 +64,7 @@ export const Default: Story = {
67
64
  },
68
65
  },
69
66
  args: {
70
- text: 'Hello Kitty',
67
+ text: 'Hello',
71
68
  view: 'default',
72
69
  size: 'm',
73
70
  enableContentLeft: false,
@@ -75,7 +72,6 @@ export const Default: Story = {
75
72
  clear: false,
76
73
  pilled: false,
77
74
  transparent: false,
78
- maxWidth: '',
79
75
  },
80
76
  render: ({ enableContentLeft, enableContentRight, size, ...rest }: StoryProps) => {
81
77
  const iconSize = size === 'l' ? '1rem' : '0.75rem';
@@ -29,7 +29,6 @@ type CustomStoryTabsProps = {
29
29
 
30
30
  const contentLeftOptions = ['none', 'icon'];
31
31
  const contentRightOptions = ['none', 'counter', 'icon'];
32
- const labels = ['Label', 'Middle label', 'Very long label'];
33
32
 
34
33
  const getContentLeft = (contentLeftOption: string, size: string) => {
35
34
  const iconSize = size === 'xs' ? 'xs' : 's';
@@ -77,12 +76,6 @@ const meta: Meta<StoryTabsProps> = {
77
76
  },
78
77
  if: { arg: 'helperText', eq: '' },
79
78
  },
80
- maxItemWidth: {
81
- control: {
82
- type: 'text',
83
- },
84
- if: { arg: 'stretch', truthy: false },
85
- },
86
79
  },
87
80
  };
88
81
 
@@ -97,14 +90,13 @@ const StoryHorizontalDefault = (props: HorizontalStoryTabsProps) => {
97
90
  contentRight: contentRightOption,
98
91
  hasDivider,
99
92
  stretch,
100
- maxItemWidth,
101
93
  helperText,
102
94
  } = props;
103
95
  const items = Array(itemQuantity).fill(0);
104
96
  const [index, setIndex] = useState(0);
105
97
 
106
98
  return (
107
- <Tabs clip="none" view="divider" hasDivider={hasDivider} stretch={stretch} disabled={disabled} size={size}>
99
+ <Tabs view="divider" hasDivider={hasDivider} stretch={stretch} disabled={disabled} size={size}>
108
100
  {items.map((_, i) => {
109
101
  if (helperText !== '') {
110
102
  return (
@@ -118,9 +110,8 @@ const StoryHorizontalDefault = (props: HorizontalStoryTabsProps) => {
118
110
  value={helperText}
119
111
  contentLeft={getContentLeft(contentLeftOption, size as Size)}
120
112
  size={size as Size}
121
- maxItemWidth={maxItemWidth}
122
113
  >
123
- {`${labels[i % labels.length]} ${i + 1}`}
114
+ {`Label${i + 1}`}
124
115
  </TabItem>
125
116
  );
126
117
  }
@@ -136,9 +127,8 @@ const StoryHorizontalDefault = (props: HorizontalStoryTabsProps) => {
136
127
  contentLeft={getContentLeft(contentLeftOption, size as Size)}
137
128
  contentRight={getContentRight(contentRightOption, size as Size)}
138
129
  size={size as Size}
139
- maxItemWidth={maxItemWidth}
140
130
  >
141
- {`${labels[i % labels.length]} ${i + 1}`}
131
+ {`Label${i + 1}`}
142
132
  </TabItem>
143
133
  );
144
134
  })}
@@ -157,7 +147,6 @@ const StoryHorizontalScroll = (props: HorizontalStoryTabsProps) => {
157
147
  hasDivider,
158
148
  helperText,
159
149
  width,
160
- maxItemWidth,
161
150
  } = props;
162
151
  const items = Array(itemQuantity).fill(0);
163
152
  const [index, setIndex] = useState(0);
@@ -177,9 +166,8 @@ const StoryHorizontalScroll = (props: HorizontalStoryTabsProps) => {
177
166
  value={helperText}
178
167
  contentLeft={getContentLeft(contentLeftOption, size as Size)}
179
168
  size={size as Size}
180
- maxItemWidth={maxItemWidth}
181
169
  >
182
- {`${labels[i % labels.length]} ${i + 1}`}
170
+ {`Label${i + 1}`}
183
171
  </TabItem>
184
172
  );
185
173
  }
@@ -195,9 +183,8 @@ const StoryHorizontalScroll = (props: HorizontalStoryTabsProps) => {
195
183
  contentLeft={getContentLeft(contentLeftOption, size as Size)}
196
184
  contentRight={getContentRight(contentRightOption, size as Size)}
197
185
  size={size as Size}
198
- maxItemWidth={maxItemWidth}
199
186
  >
200
- {`${labels[i % labels.length]} ${i + 1}`}
187
+ {`Label${i + 1}`}
201
188
  </TabItem>
202
189
  );
203
190
  })}
@@ -215,7 +202,6 @@ const StoryHorizontalShowAll = (props: HorizontalStoryTabsProps) => {
215
202
  contentRight: contentRightOption,
216
203
  hasDivider,
217
204
  helperText,
218
- maxItemWidth,
219
205
  } = props;
220
206
  const maxItemQuantity = 3;
221
207
  const items = Array(itemQuantity).fill(0);
@@ -248,9 +234,8 @@ const StoryHorizontalShowAll = (props: HorizontalStoryTabsProps) => {
248
234
  value={helperText}
249
235
  contentLeft={getContentLeft(contentLeftOption, size as Size)}
250
236
  size={size as Size}
251
- maxItemWidth={maxItemWidth}
252
237
  >
253
- {`${labels[i % labels.length]} ${i + 1}`}
238
+ {`Label${i + 1}`}
254
239
  </TabItem>
255
240
  );
256
241
  }
@@ -266,9 +251,8 @@ const StoryHorizontalShowAll = (props: HorizontalStoryTabsProps) => {
266
251
  contentLeft={getContentLeft(contentLeftOption, size as Size)}
267
252
  contentRight={getContentRight(contentRightOption, size as Size)}
268
253
  size={size as Size}
269
- maxItemWidth={maxItemWidth}
270
254
  >
271
- {`${labels[i % labels.length]} ${i + 1}`}
255
+ {`Label${i + 1}`}
272
256
  </TabItem>
273
257
  );
274
258
  })}
@@ -285,7 +269,6 @@ const StoryHorizontalShowAll = (props: HorizontalStoryTabsProps) => {
285
269
  tabIndex={!disabled ? 0 : -1}
286
270
  disabled={disabled}
287
271
  size={size as Size}
288
- maxItemWidth="auto"
289
272
  >
290
273
  ShowAll
291
274
  </TabItem>
@@ -302,10 +285,9 @@ export const HorizontalTabs: StoryObj<HorizontalStoryTabsProps> = {
302
285
  disabled: false,
303
286
  hasDivider: true,
304
287
  helperText: '',
305
- itemQuantity: 6,
288
+ itemQuantity: 8,
306
289
  stretch: false,
307
290
  width: '15rem',
308
- maxItemWidth: '',
309
291
  },
310
292
  argTypes: {
311
293
  contentLeft: {
@@ -361,7 +343,6 @@ const StoryVerticalDefault = (props: VerticalStoryTabsProps) => {
361
343
  contentRight: contentRightOption,
362
344
  hasDivider,
363
345
  helperText,
364
- maxItemWidth,
365
346
  } = props;
366
347
  const items = Array(itemQuantity).fill(0);
367
348
  const [index, setIndex] = useState(0);
@@ -382,9 +363,8 @@ const StoryVerticalDefault = (props: VerticalStoryTabsProps) => {
382
363
  value={helperText}
383
364
  contentLeft={getContentLeft(contentLeftOption, size as Size)}
384
365
  size={size as Size}
385
- maxItemWidth={maxItemWidth}
386
366
  >
387
- {`${labels[i % labels.length]} ${i + 1}`}
367
+ {`Label${i + 1}`}
388
368
  </TabItem>
389
369
  );
390
370
  }
@@ -401,9 +381,8 @@ const StoryVerticalDefault = (props: VerticalStoryTabsProps) => {
401
381
  contentLeft={getContentLeft(contentLeftOption, size as Size)}
402
382
  contentRight={getContentRight(contentRightOption, size as Size)}
403
383
  size={size as Size}
404
- maxItemWidth={maxItemWidth}
405
384
  >
406
- {`${labels[i % labels.length]} ${i + 1}`}
385
+ {`Label${i + 1}`}
407
386
  </TabItem>
408
387
  );
409
388
  })}
@@ -422,7 +401,6 @@ const StoryVerticalScroll = (props: VerticalStoryTabsProps) => {
422
401
  hasDivider,
423
402
  helperText,
424
403
  height,
425
- maxItemWidth,
426
404
  } = props;
427
405
  const items = Array(itemQuantity).fill(0);
428
406
  const [index, setIndex] = useState(0);
@@ -450,9 +428,8 @@ const StoryVerticalScroll = (props: VerticalStoryTabsProps) => {
450
428
  value={helperText}
451
429
  contentLeft={getContentLeft(contentLeftOption, size as Size)}
452
430
  size={size as Size}
453
- maxItemWidth={maxItemWidth}
454
431
  >
455
- {`${labels[i % labels.length]} ${i + 1}`}
432
+ {`Label${i + 1}`}
456
433
  </TabItem>
457
434
  );
458
435
  }
@@ -469,9 +446,8 @@ const StoryVerticalScroll = (props: VerticalStoryTabsProps) => {
469
446
  contentLeft={getContentLeft(contentLeftOption, size as Size)}
470
447
  contentRight={getContentRight(contentRightOption, size as Size)}
471
448
  size={size as Size}
472
- maxItemWidth={maxItemWidth}
473
449
  >
474
- {`${labels[i % labels.length]} ${i + 1}`}
450
+ {`Label${i + 1}`}
475
451
  </TabItem>
476
452
  );
477
453
  })}
@@ -489,7 +465,6 @@ const StoryVerticalShowAll = (props: VerticalStoryTabsProps) => {
489
465
  contentRight: contentRightOption,
490
466
  hasDivider,
491
467
  helperText,
492
- maxItemWidth,
493
468
  } = props;
494
469
  const maxItemQuantity = 3;
495
470
  const items = Array(itemQuantity).fill(0);
@@ -523,9 +498,8 @@ const StoryVerticalShowAll = (props: VerticalStoryTabsProps) => {
523
498
  value={helperText}
524
499
  contentLeft={getContentLeft(contentLeftOption, size as Size)}
525
500
  size={size as Size}
526
- maxItemWidth={maxItemWidth}
527
501
  >
528
- {`${labels[i % labels.length]} ${i + 1}`}
502
+ {`Label${i + 1}`}
529
503
  </TabItem>
530
504
  );
531
505
  }
@@ -542,9 +516,8 @@ const StoryVerticalShowAll = (props: VerticalStoryTabsProps) => {
542
516
  contentLeft={getContentLeft(contentLeftOption, size as Size)}
543
517
  contentRight={getContentRight(contentRightOption, size as Size)}
544
518
  size={size as Size}
545
- maxItemWidth={maxItemWidth}
546
519
  >
547
- {`${labels[i % labels.length]} ${i + 1}`}
520
+ {`Label${i + 1}`}
548
521
  </TabItem>
549
522
  );
550
523
  })}
@@ -561,7 +534,6 @@ const StoryVerticalShowAll = (props: VerticalStoryTabsProps) => {
561
534
  tabIndex={!disabled ? 0 : -1}
562
535
  disabled={disabled}
563
536
  size={size as Size}
564
- maxItemWidth="auto"
565
537
  >
566
538
  ShowAll
567
539
  </TabItem>
@@ -576,11 +548,10 @@ export const VerticalTabs: StoryObj<VerticalStoryTabsProps> = {
576
548
  size: 'xs',
577
549
  disabled: false,
578
550
  hasDivider: true,
579
- itemQuantity: 6,
551
+ itemQuantity: 8,
580
552
  orientation: 'vertical',
581
553
  helperText: '',
582
554
  height: '10rem',
583
- maxItemWidth: '',
584
555
  },
585
556
  argTypes: {
586
557
  contentLeft: {
@@ -633,7 +604,7 @@ export const VerticalTabs: StoryObj<VerticalStoryTabsProps> = {
633
604
  };
634
605
 
635
606
  const StoryHeaderDefault = (props: HorizontalStoryTabsProps) => {
636
- const { disabled, itemQuantity, size, helperText, maxItemWidth } = props;
607
+ const { disabled, itemQuantity, size, helperText } = props;
637
608
  const items = Array(itemQuantity).fill(0);
638
609
  const [index, setIndex] = useState(0);
639
610
 
@@ -649,7 +620,6 @@ const StoryHeaderDefault = (props: HorizontalStoryTabsProps) => {
649
620
  disabled={disabled}
650
621
  value={helperText}
651
622
  size={size as HeaderSize}
652
- maxItemWidth={maxItemWidth}
653
623
  >
654
624
  {`Label${i + 1}`}
655
625
  </TabItem>
@@ -659,7 +629,7 @@ const StoryHeaderDefault = (props: HorizontalStoryTabsProps) => {
659
629
  };
660
630
 
661
631
  const StoryHeaderScroll = (props: HorizontalStoryTabsProps) => {
662
- const { disabled, itemQuantity, size, helperText, width, maxItemWidth } = props;
632
+ const { disabled, itemQuantity, size, helperText, width } = props;
663
633
  const items = Array(itemQuantity).fill(0);
664
634
  const [index, setIndex] = useState(0);
665
635
 
@@ -675,9 +645,8 @@ const StoryHeaderScroll = (props: HorizontalStoryTabsProps) => {
675
645
  disabled={disabled}
676
646
  value={helperText}
677
647
  size={size as HeaderSize}
678
- maxItemWidth={maxItemWidth}
679
648
  >
680
- {`${labels[i % labels.length]} ${i + 1}`}
649
+ {`Label${i + 1}`}
681
650
  </TabItem>
682
651
  ))}
683
652
  </Tabs>
@@ -689,9 +658,8 @@ export const HeaderTabs: StoryObj<HorizontalStoryTabsProps> = {
689
658
  size: 'h5',
690
659
  disabled: false,
691
660
  helperText: '',
692
- itemQuantity: 4,
661
+ itemQuantity: 6,
693
662
  width: '12rem',
694
- maxItemWidth: '',
695
663
  },
696
664
  argTypes: {
697
665
  clip: {
@@ -28,9 +28,6 @@ export var config = {
28
28
  },
29
29
  pilled: {
30
30
  "true": /*#__PURE__*/css(["", ":1.5rem;"], tabsTokens.itemPilledBorderRadius)
31
- },
32
- truncate: {
33
- "true": /*#__PURE__*/css([""])
34
31
  }
35
32
  }
36
33
  };
@@ -17,9 +17,6 @@ export var config = {
17
17
  },
18
18
  disabled: {
19
19
  "true": /*#__PURE__*/css(["", ":0.4;"], tabsTokens.disabledOpacity)
20
- },
21
- truncate: {
22
- "true": /*#__PURE__*/css([""])
23
20
  }
24
21
  }
25
22
  };