@salutejs/plasma-new-hope 0.186.0-canary.1546.11723696357.0 → 0.186.0-dev.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Badge/Badge.css +7 -7
- package/cjs/components/Badge/Badge.js +11 -16
- package/cjs/components/Badge/Badge.js.map +1 -1
- package/cjs/components/Badge/Badge.styles.js +5 -5
- package/cjs/components/Badge/Badge.styles.js.map +1 -1
- package/cjs/components/Badge/Badge.styles_hhbwyi.css +4 -0
- package/cjs/components/Badge/Badge.tokens.js +5 -9
- package/cjs/components/Badge/Badge.tokens.js.map +1 -1
- package/cjs/components/Badge/variations/_clear/base.js +1 -1
- package/cjs/components/Badge/variations/_clear/base.js.map +1 -1
- package/cjs/components/Badge/variations/_clear/base_oopyb7.css +1 -0
- package/cjs/components/Badge/variations/_size/base.js +1 -1
- package/cjs/components/Badge/variations/_size/base.js.map +1 -1
- package/{es/components/Badge/variations/_size/base_rn38n6.css → cjs/components/Badge/variations/_size/base_to0y5x.css} +1 -1
- package/cjs/components/Badge/variations/_transparent/base.js +1 -1
- package/cjs/components/Badge/variations/_transparent/base.js.map +1 -1
- package/cjs/components/Badge/variations/_transparent/base_1l6036y.css +1 -0
- package/cjs/components/Badge/variations/_view/base.js +1 -1
- package/cjs/components/Badge/variations/_view/base.js.map +1 -1
- package/cjs/components/Badge/variations/_view/base_qlxank.css +1 -0
- package/cjs/components/Tabs/tokens.js +2 -1
- package/cjs/components/Tabs/tokens.js.map +1 -1
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.css +6 -6
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +10 -3
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js.map +1 -1
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +6 -6
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js.map +1 -1
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles_1yi1gll.css +5 -0
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_view/base.js +1 -1
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_view/{base_4zingj.css → base_j8lg9u.css} +1 -1
- package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.css +6 -6
- package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +10 -3
- package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js.map +1 -1
- package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +6 -6
- package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js.map +1 -1
- package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles_17vv6lq.css +5 -0
- package/cjs/components/Tabs/ui/vertical/VerticalTabItem/variations/_view/base.js +1 -1
- package/cjs/components/Tabs/ui/vertical/VerticalTabItem/variations/_view/{base_fueiq8.css → base_12fk3xi.css} +1 -1
- package/cjs/index.css +19 -19
- package/emotion/cjs/components/Badge/Badge.js +11 -16
- package/emotion/cjs/components/Badge/Badge.styles.js +4 -13
- package/emotion/cjs/components/Badge/Badge.tokens.js +6 -9
- package/emotion/cjs/components/Badge/variations/_clear/base.js +1 -1
- package/emotion/cjs/components/Badge/variations/_size/base.js +1 -2
- package/emotion/cjs/components/Badge/variations/_transparent/base.js +1 -1
- package/emotion/cjs/components/Badge/variations/_view/base.js +1 -1
- package/emotion/cjs/components/Tabs/tokens.js +2 -1
- package/emotion/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +15 -3
- package/emotion/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +12 -12
- package/emotion/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +15 -3
- package/emotion/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +12 -12
- package/emotion/cjs/examples/plasma_b2c/components/Badge/Badge.config.js +17 -14
- package/emotion/cjs/examples/plasma_b2c/components/Badge/Badge.stories.tsx +4 -6
- package/emotion/cjs/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +51 -19
- package/emotion/cjs/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.js +18 -15
- package/emotion/cjs/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.js +9 -6
- package/emotion/cjs/examples/plasma_web/components/Badge/Badge.config.js +14 -14
- package/emotion/cjs/examples/plasma_web/components/Badge/Badge.stories.tsx +2 -8
- package/emotion/cjs/examples/plasma_web/components/Tabs/Tabs.stories.tsx +51 -19
- package/emotion/cjs/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.js +18 -15
- package/emotion/cjs/examples/plasma_web/components/Tabs/vertical/VerticalTabItem.config.js +9 -6
- package/emotion/es/components/Badge/Badge.js +12 -17
- package/emotion/es/components/Badge/Badge.styles.js +5 -14
- package/emotion/es/components/Badge/Badge.tokens.js +5 -8
- package/emotion/es/components/Badge/variations/_clear/base.js +2 -2
- package/emotion/es/components/Badge/variations/_size/base.js +2 -3
- package/emotion/es/components/Badge/variations/_transparent/base.js +2 -2
- package/emotion/es/components/Badge/variations/_view/base.js +2 -2
- package/emotion/es/components/Tabs/tokens.js +2 -1
- package/emotion/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +16 -3
- package/emotion/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +13 -13
- package/emotion/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +16 -3
- package/emotion/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +13 -13
- package/emotion/es/examples/plasma_b2c/components/Badge/Badge.config.js +17 -14
- package/emotion/es/examples/plasma_b2c/components/Badge/Badge.stories.tsx +4 -6
- package/emotion/es/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +51 -19
- package/emotion/es/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.js +18 -15
- package/emotion/es/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.js +9 -6
- package/emotion/es/examples/plasma_web/components/Badge/Badge.config.js +14 -14
- package/emotion/es/examples/plasma_web/components/Badge/Badge.stories.tsx +2 -8
- package/emotion/es/examples/plasma_web/components/Tabs/Tabs.stories.tsx +51 -19
- package/emotion/es/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.js +18 -15
- package/emotion/es/examples/plasma_web/components/Tabs/vertical/VerticalTabItem.config.js +9 -6
- package/es/components/Badge/Badge.css +7 -7
- package/es/components/Badge/Badge.js +14 -19
- package/es/components/Badge/Badge.js.map +1 -1
- package/es/components/Badge/Badge.styles.js +5 -5
- package/es/components/Badge/Badge.styles.js.map +1 -1
- package/es/components/Badge/Badge.styles_hhbwyi.css +4 -0
- package/es/components/Badge/Badge.tokens.js +6 -9
- package/es/components/Badge/Badge.tokens.js.map +1 -1
- package/es/components/Badge/variations/_clear/base.js +1 -1
- package/es/components/Badge/variations/_clear/base.js.map +1 -1
- package/es/components/Badge/variations/_clear/base_oopyb7.css +1 -0
- package/es/components/Badge/variations/_size/base.js +1 -1
- package/es/components/Badge/variations/_size/base.js.map +1 -1
- package/{cjs/components/Badge/variations/_size/base_rn38n6.css → es/components/Badge/variations/_size/base_to0y5x.css} +1 -1
- package/es/components/Badge/variations/_transparent/base.js +1 -1
- package/es/components/Badge/variations/_transparent/base.js.map +1 -1
- package/es/components/Badge/variations/_transparent/base_1l6036y.css +1 -0
- package/es/components/Badge/variations/_view/base.js +1 -1
- package/es/components/Badge/variations/_view/base.js.map +1 -1
- package/es/components/Badge/variations/_view/base_qlxank.css +1 -0
- package/es/components/Tabs/tokens.js +2 -1
- package/es/components/Tabs/tokens.js.map +1 -1
- package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.css +6 -6
- package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +11 -4
- package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js.map +1 -1
- package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +6 -6
- package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js.map +1 -1
- package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles_1yi1gll.css +5 -0
- package/es/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_view/base.js +1 -1
- package/es/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_view/{base_4zingj.css → base_j8lg9u.css} +1 -1
- package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.css +6 -6
- package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +11 -4
- package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js.map +1 -1
- package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +6 -6
- package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js.map +1 -1
- package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles_17vv6lq.css +5 -0
- package/es/components/Tabs/ui/vertical/VerticalTabItem/variations/_view/base.js +1 -1
- package/es/components/Tabs/ui/vertical/VerticalTabItem/variations/_view/{base_fueiq8.css → base_12fk3xi.css} +1 -1
- package/es/index.css +19 -19
- package/package.json +2 -2
- package/styled-components/cjs/components/Badge/Badge.js +11 -16
- package/styled-components/cjs/components/Badge/Badge.styles.js +2 -2
- package/styled-components/cjs/components/Badge/Badge.tokens.js +6 -9
- package/styled-components/cjs/components/Badge/variations/_clear/base.js +1 -1
- package/styled-components/cjs/components/Badge/variations/_size/base.js +1 -2
- package/styled-components/cjs/components/Badge/variations/_transparent/base.js +1 -1
- package/styled-components/cjs/components/Badge/variations/_view/base.js +1 -1
- package/styled-components/cjs/components/Tabs/tokens.js +2 -1
- package/styled-components/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +15 -3
- package/styled-components/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +8 -8
- package/styled-components/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +15 -3
- package/styled-components/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +9 -9
- package/styled-components/cjs/examples/plasma_b2c/components/Badge/Badge.config.js +8 -5
- package/styled-components/cjs/examples/plasma_b2c/components/Badge/Badge.stories.tsx +4 -6
- package/styled-components/cjs/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +51 -19
- package/styled-components/cjs/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.js +3 -0
- package/styled-components/cjs/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.js +3 -0
- package/styled-components/cjs/examples/plasma_web/components/Badge/Badge.config.js +5 -5
- package/styled-components/cjs/examples/plasma_web/components/Badge/Badge.stories.tsx +2 -8
- package/styled-components/cjs/examples/plasma_web/components/Tabs/Tabs.stories.tsx +51 -19
- package/styled-components/cjs/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.js +3 -0
- package/styled-components/cjs/examples/plasma_web/components/Tabs/vertical/VerticalTabItem.config.js +3 -0
- package/styled-components/es/components/Badge/Badge.js +12 -17
- package/styled-components/es/components/Badge/Badge.styles.js +3 -3
- package/styled-components/es/components/Badge/Badge.tokens.js +5 -8
- package/styled-components/es/components/Badge/variations/_clear/base.js +2 -2
- package/styled-components/es/components/Badge/variations/_size/base.js +2 -3
- package/styled-components/es/components/Badge/variations/_transparent/base.js +2 -2
- package/styled-components/es/components/Badge/variations/_view/base.js +2 -2
- package/styled-components/es/components/Tabs/tokens.js +2 -1
- package/styled-components/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +16 -3
- package/styled-components/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +9 -9
- package/styled-components/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +16 -3
- package/styled-components/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +10 -10
- package/styled-components/es/examples/plasma_b2c/components/Badge/Badge.config.js +8 -5
- package/styled-components/es/examples/plasma_b2c/components/Badge/Badge.stories.tsx +4 -6
- package/styled-components/es/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +51 -19
- package/styled-components/es/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.js +3 -0
- package/styled-components/es/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.js +3 -0
- package/styled-components/es/examples/plasma_web/components/Badge/Badge.config.js +5 -5
- package/styled-components/es/examples/plasma_web/components/Badge/Badge.stories.tsx +2 -8
- package/styled-components/es/examples/plasma_web/components/Tabs/Tabs.stories.tsx +51 -19
- package/styled-components/es/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.js +3 -0
- package/styled-components/es/examples/plasma_web/components/Tabs/vertical/VerticalTabItem.config.js +3 -0
- package/types/components/Badge/Badge.d.ts.map +1 -1
- package/types/components/Badge/Badge.styles.d.ts +1 -1
- package/types/components/Badge/Badge.styles.d.ts.map +1 -1
- package/types/components/Badge/Badge.tokens.d.ts +5 -8
- package/types/components/Badge/Badge.tokens.d.ts.map +1 -1
- package/types/components/Badge/Badge.types.d.ts +10 -18
- package/types/components/Badge/Badge.types.d.ts.map +1 -1
- package/types/components/Badge/variations/_clear/base.d.ts.map +1 -1
- package/types/components/Badge/variations/_size/base.d.ts.map +1 -1
- package/types/components/Tabs/TabItem.types.d.ts +6 -1
- package/types/components/Tabs/TabItem.types.d.ts.map +1 -1
- package/types/components/Tabs/tokens.d.ts +1 -0
- package/types/components/Tabs/tokens.d.ts.map +1 -1
- package/types/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.d.ts.map +1 -1
- package/types/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.d.ts +1 -1
- package/types/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.d.ts.map +1 -1
- package/types/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.d.ts.map +1 -1
- package/types/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.d.ts +1 -1
- package/types/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Badge/Badge.config.d.ts +3 -0
- package/types/examples/plasma_b2c/components/Badge/Badge.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Badge/Badge.d.ts +10 -58
- package/types/examples/plasma_b2c/components/Badge/Badge.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Tabs/TabItem.d.ts +6 -0
- package/types/examples/plasma_b2c/components/Tabs/TabItem.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.d.ts +3 -0
- package/types/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.d.ts +3 -0
- package/types/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Badge/Badge.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Badge/Badge.d.ts +7 -58
- package/types/examples/plasma_web/components/Badge/Badge.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Tabs/TabItem.d.ts +6 -0
- package/types/examples/plasma_web/components/Tabs/TabItem.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.d.ts +3 -0
- package/types/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Tabs/vertical/VerticalTabItem.config.d.ts +3 -0
- package/types/examples/plasma_web/components/Tabs/vertical/VerticalTabItem.config.d.ts.map +1 -1
- package/cjs/components/Badge/Badge.styles_8pi3br.css +0 -4
- package/cjs/components/Badge/variations/_clear/base_wiboj8.css +0 -1
- package/cjs/components/Badge/variations/_transparent/base_aapqhz.css +0 -1
- package/cjs/components/Badge/variations/_view/base_j3xzf3.css +0 -1
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles_uaaqqg.css +0 -5
- package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles_1g7zipg.css +0 -5
- package/es/components/Badge/Badge.styles_8pi3br.css +0 -4
- package/es/components/Badge/variations/_clear/base_wiboj8.css +0 -1
- package/es/components/Badge/variations/_transparent/base_aapqhz.css +0 -1
- package/es/components/Badge/variations/_view/base_j3xzf3.css +0 -1
- package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles_uaaqqg.css +0 -5
- package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles_1g7zipg.css +0 -5
@@ -1,5 +1,5 @@
|
|
1
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 = ["children", "className", "
|
2
|
+
var _excluded = ["children", "className", "text", "contentLeft", "contentRight", "size", "view", "pilled", "transparent", "clear", "maxWidth"];
|
3
3
|
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
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
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; }
|
@@ -16,48 +16,43 @@ import { base as pilledCSS } from './variations/_pilled/base';
|
|
16
16
|
import { base as transparentCSS } from './variations/_transparent/base';
|
17
17
|
import { base as clearCSS } from './variations/_clear/base';
|
18
18
|
import { StyledContentLeft, StyledContentMain, StyledContentRight, base } from './Badge.styles';
|
19
|
-
import { classes
|
19
|
+
import { classes } from './Badge.tokens';
|
20
20
|
export var badgeRoot = function badgeRoot(Root) {
|
21
21
|
return /*#__PURE__*/forwardRef(function (props, ref) {
|
22
|
-
var _StyledContentLeft, _StyledContentMain, _StyledContentMain2, _StyledContentRight;
|
23
22
|
var children = props.children,
|
24
23
|
className = props.className,
|
25
|
-
style = props.style,
|
26
24
|
text = props.text,
|
27
25
|
contentLeft = props.contentLeft,
|
28
26
|
contentRight = props.contentRight,
|
29
27
|
size = props.size,
|
30
28
|
view = props.view,
|
31
|
-
customColor = props.customColor,
|
32
|
-
customBackgroundColor = props.customBackgroundColor,
|
33
29
|
_props$pilled = props.pilled,
|
34
30
|
pilled = _props$pilled === void 0 ? false : _props$pilled,
|
35
31
|
_props$transparent = props.transparent,
|
36
32
|
transparent = _props$transparent === void 0 ? false : _props$transparent,
|
37
33
|
_props$clear = props.clear,
|
38
34
|
clear = _props$clear === void 0 ? false : _props$clear,
|
35
|
+
_props$maxWidth = props.maxWidth,
|
36
|
+
maxWidth = _props$maxWidth === void 0 ? 'auto' : _props$maxWidth,
|
39
37
|
rest = _objectWithoutProperties(props, _excluded);
|
40
38
|
var pilledClass = pilled ? classes.badgePilled : undefined;
|
41
39
|
var transparentClass = transparent ? classes.badgeTransparent : undefined;
|
42
40
|
var clearClass = clear ? classes.badgeClear : undefined;
|
41
|
+
var truncateClass = maxWidth !== 'auto' ? classes.badgeTruncate : undefined;
|
43
42
|
var txt = !text && typeof children === 'string' ? children : text;
|
44
|
-
var iconOnlyClass = !txt && contentLeft ? classes.iconOnly : undefined;
|
45
|
-
var BadgeContent = function BadgeContent() {
|
46
|
-
if (contentLeft) {
|
47
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, _StyledContentLeft || (_StyledContentLeft = /*#__PURE__*/React.createElement(StyledContentLeft, null, contentLeft)), txt ? _StyledContentMain || (_StyledContentMain = /*#__PURE__*/React.createElement(StyledContentMain, null, txt)) : children);
|
48
|
-
}
|
49
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, txt ? _StyledContentMain2 || (_StyledContentMain2 = /*#__PURE__*/React.createElement(StyledContentMain, null, txt)) : children, contentRight && (_StyledContentRight || (_StyledContentRight = /*#__PURE__*/React.createElement(StyledContentRight, null, contentRight))));
|
50
|
-
};
|
51
43
|
return /*#__PURE__*/React.createElement(Root, _extends({
|
52
44
|
ref: ref,
|
53
|
-
className: cx(pilledClass, transparentClass, clearClass,
|
45
|
+
className: cx(pilledClass, transparentClass, clearClass, truncateClass, className),
|
54
46
|
view: view,
|
55
47
|
size: size,
|
56
48
|
pilled: pilled,
|
57
49
|
transparent: transparent,
|
58
|
-
clear: clear
|
59
|
-
|
60
|
-
|
50
|
+
clear: clear
|
51
|
+
}, rest, {
|
52
|
+
style: _objectSpread(_objectSpread({}, rest.style), {}, {
|
53
|
+
maxWidth: maxWidth
|
54
|
+
})
|
55
|
+
}), contentLeft && /*#__PURE__*/React.createElement(StyledContentLeft, null, contentLeft), txt ? /*#__PURE__*/React.createElement(StyledContentMain, null, txt) : children, contentRight && /*#__PURE__*/React.createElement(StyledContentRight, null, contentRight));
|
61
56
|
});
|
62
57
|
};
|
63
58
|
export var badgeConfig = {
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import styled from 'styled-components';
|
2
2
|
import { css } from 'styled-components';
|
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;"]);
|
3
|
+
import { classes, tokens } from './Badge.tokens';
|
5
4
|
export var StyledContentLeft = /*#__PURE__*/styled.div.withConfig({
|
6
5
|
componentId: "plasma-new-hope__sc-naxmb2-0"
|
7
6
|
})(["display:flex;margin-left:var(", ");margin-right:var(", ");"], tokens.leftContentMarginLeft, tokens.leftContentMarginRight);
|
@@ -10,4 +9,5 @@ export var StyledContentMain = /*#__PURE__*/styled.span.withConfig({
|
|
10
9
|
})([""]);
|
11
10
|
export var StyledContentRight = /*#__PURE__*/styled.div.withConfig({
|
12
11
|
componentId: "plasma-new-hope__sc-naxmb2-2"
|
13
|
-
})(["display:flex;margin-left:var(", ");margin-right:var(", ");"], tokens.rightContentMarginLeft, tokens.rightContentMarginRight);
|
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);
|
@@ -2,11 +2,7 @@ export var classes = {
|
|
2
2
|
badgePilled: 'badge-pilled',
|
3
3
|
badgeTransparent: 'badge-transparent',
|
4
4
|
badgeClear: 'badge-clear',
|
5
|
-
|
6
|
-
};
|
7
|
-
export var privateTokens = {
|
8
|
-
customBackground: '--plasma-badge-custom-background',
|
9
|
-
customColor: '--plasma-badge-custom-color'
|
5
|
+
badgeTruncate: 'badge-truncate'
|
10
6
|
};
|
11
7
|
export var tokens = {
|
12
8
|
background: '--plasma-badge-background',
|
@@ -14,12 +10,13 @@ export var tokens = {
|
|
14
10
|
backgroundTransparent: '--plasma-badge-background-transparent',
|
15
11
|
colorTransparent: '--plasma-badge-color-transparent',
|
16
12
|
colorClear: '--plasma-badge-color-clear',
|
17
|
-
backgroundClear: '--plasma-badge-background-clear',
|
18
13
|
borderRadius: '--plasma-badge-border-radius',
|
19
14
|
pilledBorderRadius: '--plasma-badge-pilled-border-radius',
|
20
15
|
height: '--plasma-badge-height',
|
21
|
-
|
22
|
-
|
16
|
+
paddingTop: '--plasma-badge-padding-top',
|
17
|
+
paddingRight: '--plasma-badge-padding-right',
|
18
|
+
paddingBottom: '--plasma-badge-padding-bottom',
|
19
|
+
paddingLeft: '--plasma-badge-padding-left',
|
23
20
|
fontFamily: '--plasma-badge-font-family',
|
24
21
|
fontSize: '--plasma-badge-font-size',
|
25
22
|
fontStyle: '--plasma-badge-font-style',
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { css } from 'styled-components';
|
2
|
-
import { classes,
|
3
|
-
export var base = /*#__PURE__*/css(["&.", "{color:var(", "
|
2
|
+
import { classes, tokens } from '../../Badge.tokens';
|
3
|
+
export var base = /*#__PURE__*/css(["&.", "{color:var(", ");background-color:transparent;padding:0;}"], classes.badgeClear, tokens.colorClear);
|
@@ -1,4 +1,3 @@
|
|
1
1
|
import { css } from 'styled-components';
|
2
|
-
import {
|
3
|
-
|
4
|
-
export var base = /*#__PURE__*/css(["font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");border-radius:var(", ");height:var(", ");padding:var(", ");&.", "{padding:var(", ");", "{margin:0;}}"], tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, tokens.borderRadius, tokens.height, tokens.padding, classes.iconOnly, tokens.paddingIconOnly, StyledContentLeft);
|
2
|
+
import { tokens } from '../../Badge.tokens';
|
3
|
+
export var base = /*#__PURE__*/css(["font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");border-radius:var(", ");height:var(", ");padding-top:var(", ");padding-right:var(", ");padding-bottom:var(", ");padding-left:var(", ");"], tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, tokens.borderRadius, tokens.height, tokens.paddingTop, tokens.paddingRight, tokens.paddingBottom, tokens.paddingLeft);
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { css } from 'styled-components';
|
2
|
-
import { classes,
|
3
|
-
export var base = /*#__PURE__*/css(["&.", "{color:var(", "
|
2
|
+
import { classes, tokens } from '../../Badge.tokens';
|
3
|
+
export var base = /*#__PURE__*/css(["&.", "{color:var(", ");background-color:var(", ");}"], classes.badgeTransparent, tokens.colorTransparent, tokens.backgroundTransparent);
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { css } from 'styled-components';
|
2
|
-
import {
|
3
|
-
export var base = /*#__PURE__*/css(["color:var(", "
|
2
|
+
import { tokens } from '../../Badge.tokens';
|
3
|
+
export var base = /*#__PURE__*/css(["color:var(", ");background-color:var(", ");"], tokens.color, tokens.background);
|
@@ -14,7 +14,8 @@ 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'
|
17
|
+
tabsClipShowAll: 'tabs-clip-show-all',
|
18
|
+
tabsTruncate: 'tabs-truncate'
|
18
19
|
};
|
19
20
|
export var tokens = {
|
20
21
|
disabledOpacity: '--plasma-tabs-disabled-opacity',
|
package/styled-components/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js
CHANGED
@@ -1,5 +1,11 @@
|
|
1
|
-
|
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"];
|
2
3
|
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); }
|
3
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; }
|
4
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; }
|
5
11
|
import React, { forwardRef, useRef, useContext, useEffect, useCallback } from 'react';
|
@@ -33,6 +39,8 @@ export var horizontalTabItemRoot = function horizontalTabItemRoot(Root) {
|
|
33
39
|
tabIndex = props.tabIndex,
|
34
40
|
className = props.className,
|
35
41
|
onClick = props.onClick,
|
42
|
+
_props$maxItemWidth = props.maxItemWidth,
|
43
|
+
maxWidth = _props$maxItemWidth === void 0 ? 'auto' : _props$maxItemWidth,
|
36
44
|
rest = _objectWithoutProperties(props, _excluded);
|
37
45
|
var innerRef = useRef(null);
|
38
46
|
var ref = useForkRef(outerRef, innerRef);
|
@@ -42,6 +50,7 @@ export var horizontalTabItemRoot = function horizontalTabItemRoot(Root) {
|
|
42
50
|
var animatedClass = animated ? classes.tabItemAnimated : undefined;
|
43
51
|
var pilledClass = pilledAttr ? classes.tabsPilled : undefined;
|
44
52
|
var selectedClass = isActive || selected ? classes.selectedTabsItem : undefined;
|
53
|
+
var truncateClass = maxWidth !== 'auto' ? classes.tabsTruncate : undefined;
|
45
54
|
var hasKeyNavigation = itemIndex !== undefined && onIndexChange !== undefined;
|
46
55
|
var navigationTabIndex = !disabled && (refs === null || refs === void 0 ? void 0 : refs.current) === itemIndex ? 0 : -1;
|
47
56
|
useEffect(function () {
|
@@ -98,9 +107,13 @@ export var horizontalTabItemRoot = function horizontalTabItemRoot(Root) {
|
|
98
107
|
size: size,
|
99
108
|
onFocus: onItemFocus,
|
100
109
|
tabIndex: hasKeyNavigation ? navigationTabIndex : tabIndex,
|
101
|
-
className: cx(pilledClass, selectedClass, animatedClass, className),
|
110
|
+
className: cx(pilledClass, selectedClass, animatedClass, truncateClass, className),
|
102
111
|
onClick: handleClick
|
103
|
-
}, rest
|
112
|
+
}, rest, {
|
113
|
+
style: _objectSpread(_objectSpread({}, rest.style), {}, {
|
114
|
+
maxWidth: maxWidth
|
115
|
+
})
|
116
|
+
}), /*#__PURE__*/React.createElement(React.Fragment, null, contentLeft && /*#__PURE__*/React.createElement(LeftContent, {
|
104
117
|
className: classes.tabLeftContent
|
105
118
|
}, contentLeft), /*#__PURE__*/React.createElement(StyledContent, {
|
106
119
|
className: classes.tabContent
|
@@ -1,14 +1,7 @@
|
|
1
1
|
import styled from 'styled-components';
|
2
2
|
import { css } from 'styled-components';
|
3
3
|
import { addFocus } from '../../../../../mixins';
|
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
|
-
}));
|
4
|
+
import { classes, tokens } from '../../../tokens';
|
12
5
|
export var StyledContent = /*#__PURE__*/styled.div.withConfig({
|
13
6
|
componentId: "plasma-new-hope__sc-lremls-0"
|
14
7
|
})(["display:inline-block;width:fit-content;padding:0 var(", ",var(", "));"], tokens.itemContentPaddingClear, tokens.itemContentPadding);
|
@@ -20,4 +13,11 @@ export var RightContent = /*#__PURE__*/styled.div.withConfig({
|
|
20
13
|
})(["display:flex;color:inherit;&:hover{color:inherit;}"]);
|
21
14
|
export var LeftContent = /*#__PURE__*/styled.div.withConfig({
|
22
15
|
componentId: "plasma-new-hope__sc-lremls-3"
|
23
|
-
})(["display:flex;color:inherit;&:hover{color:inherit;}"]);
|
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);
|
@@ -1,5 +1,11 @@
|
|
1
|
-
|
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"];
|
2
3
|
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); }
|
3
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; }
|
4
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; }
|
5
11
|
import React, { forwardRef, useRef, useContext, useEffect, useCallback } from 'react';
|
@@ -27,12 +33,15 @@ export var verticalTabItemRoot = function verticalTabItemRoot(Root) {
|
|
27
33
|
tabIndex = props.tabIndex,
|
28
34
|
className = props.className,
|
29
35
|
onClick = props.onClick,
|
36
|
+
_props$maxItemWidth = props.maxItemWidth,
|
37
|
+
maxWidth = _props$maxItemWidth === void 0 ? 'auto' : _props$maxItemWidth,
|
30
38
|
rest = _objectWithoutProperties(props, _excluded);
|
31
39
|
var innerRef = useRef(null);
|
32
40
|
var ref = useForkRef(outerRef, innerRef);
|
33
41
|
var refs = useContext(TabsContext);
|
34
42
|
var role = 'tab';
|
35
43
|
var selectedClass = selected ? classes.selectedTabsItem : undefined;
|
44
|
+
var truncateClass = maxWidth !== 'auto' ? classes.tabsTruncate : undefined;
|
36
45
|
var hasKeyNavigation = itemIndex !== undefined && onIndexChange !== undefined;
|
37
46
|
var navigationTabIndex = !disabled && (refs === null || refs === void 0 ? void 0 : refs.current) === itemIndex ? 0 : -1;
|
38
47
|
useEffect(function () {
|
@@ -85,9 +94,13 @@ export var verticalTabItemRoot = function verticalTabItemRoot(Root) {
|
|
85
94
|
size: size,
|
86
95
|
onFocus: onItemFocus,
|
87
96
|
tabIndex: hasKeyNavigation ? navigationTabIndex : tabIndex,
|
88
|
-
className: cx(selectedClass, className),
|
97
|
+
className: cx(selectedClass, truncateClass, className),
|
89
98
|
onClick: handleClick
|
90
|
-
}, rest
|
99
|
+
}, rest, {
|
100
|
+
style: _objectSpread(_objectSpread({}, rest.style), {}, {
|
101
|
+
maxWidth: maxWidth
|
102
|
+
})
|
103
|
+
}), /*#__PURE__*/React.createElement(React.Fragment, null, contentLeft && /*#__PURE__*/React.createElement(LeftContent, {
|
91
104
|
className: classes.tabLeftContent
|
92
105
|
}, contentLeft), /*#__PURE__*/React.createElement(StyledContent, {
|
93
106
|
className: classes.tabContent
|
package/styled-components/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js
CHANGED
@@ -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 { 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
|
-
}));
|
6
|
+
import { classes, tokens } from '../../../tokens';
|
14
7
|
export var StyledContent = /*#__PURE__*/styled.div.withConfig({
|
15
8
|
componentId: "plasma-new-hope__sc-1pflgj8-0"
|
16
9
|
})(["display:inline-block;width:fit-content;padding:0 var(", ",var(", "));"], tokens.itemContentPaddingClear, tokens.itemContentPadding);
|
17
10
|
export var TabItemValue = /*#__PURE__*/styled.span.withConfig({
|
18
11
|
componentId: "plasma-new-hope__sc-1pflgj8-1"
|
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);
|
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);
|
20
13
|
export var RightContent = /*#__PURE__*/styled.div.withConfig({
|
21
14
|
componentId: "plasma-new-hope__sc-1pflgj8-2"
|
22
15
|
})(["display:flex;color:inherit;&:hover{color:inherit;}"]);
|
23
16
|
export var LeftContent = /*#__PURE__*/styled.div.withConfig({
|
24
17
|
componentId: "plasma-new-hope__sc-1pflgj8-3"
|
25
|
-
})(["display:flex;color:inherit;&:hover{color:inherit;}"]);
|
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);
|
@@ -16,10 +16,10 @@ export var config = {
|
|
16
16
|
light: /*#__PURE__*/css(["", ":var(--on-light-text-primary);", ":var(--on-dark-surface-solid-default);", ":var(--on-dark-text-primary);", ":var(--on-dark-surface-transparent-card);", ":var(--on-dark-text-primary);"], badgeTokens.color, badgeTokens.background, badgeTokens.colorTransparent, badgeTokens.backgroundTransparent, badgeTokens.colorClear)
|
17
17
|
},
|
18
18
|
size: {
|
19
|
-
l: /*#__PURE__*/css(["", ":0.5rem;", ":1.75rem;", ":0
|
20
|
-
m: /*#__PURE__*/css(["", ":0.375rem;", ":1.5rem;", ":0
|
21
|
-
s: /*#__PURE__*/css(["", ":0.375rem;", ":1.25rem;", ":0
|
22
|
-
xs: /*#__PURE__*/css(["", ":0.25rem;", ":1rem;", ":0
|
19
|
+
l: /*#__PURE__*/css(["", ":0.5rem;", ":1.75rem;", ":0.6875rem;", ":0.6875rem;", ":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);", ":-0.0625rem;", ":0.25rem;", ":0.25rem;", ":-0.0625rem;"], badgeTokens.borderRadius, badgeTokens.height, badgeTokens.paddingRight, badgeTokens.paddingLeft, badgeTokens.fontFamily, badgeTokens.fontSize, badgeTokens.fontStyle, badgeTokens.fontWeight, badgeTokens.letterSpacing, badgeTokens.lineHeight, badgeTokens.leftContentMarginLeft, badgeTokens.leftContentMarginRight, badgeTokens.rightContentMarginLeft, badgeTokens.rightContentMarginRight),
|
20
|
+
m: /*#__PURE__*/css(["", ":0.375rem;", ":1.5rem;", ":0.5625rem;", ":0.5625rem;", ":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);", ":-0.0625rem;", ":0.1875rem;", ":0.1875rem;", ":-0.0625rem;"], badgeTokens.borderRadius, badgeTokens.height, badgeTokens.paddingRight, badgeTokens.paddingLeft, badgeTokens.fontFamily, badgeTokens.fontSize, badgeTokens.fontStyle, badgeTokens.fontWeight, badgeTokens.letterSpacing, badgeTokens.lineHeight, badgeTokens.leftContentMarginLeft, badgeTokens.leftContentMarginRight, badgeTokens.rightContentMarginLeft, badgeTokens.rightContentMarginRight),
|
21
|
+
s: /*#__PURE__*/css(["", ":0.375rem;", ":1.25rem;", ":0.4375rem;", ":0.4375rem;", ":var(--plasma-typo-body-xxs-font-family);", ":var(--plasma-typo-body-xxs-font-size);", ":var(--plasma-typo-body-xxs-font-style);", ":var(--plasma-typo-body-xxs-font-weight);", ":var(--plasma-typo-body-xxs-letter-spacing);", ":var(--plasma-typo-body-xxs-line-height);", ":-0.0625rem;", ":0.125rem;", ":0.125rem;", ":-0.0625rem;"], badgeTokens.borderRadius, badgeTokens.height, badgeTokens.paddingRight, badgeTokens.paddingLeft, badgeTokens.fontFamily, badgeTokens.fontSize, badgeTokens.fontStyle, badgeTokens.fontWeight, badgeTokens.letterSpacing, badgeTokens.lineHeight, badgeTokens.leftContentMarginLeft, badgeTokens.leftContentMarginRight, badgeTokens.rightContentMarginLeft, badgeTokens.rightContentMarginRight),
|
22
|
+
xs: /*#__PURE__*/css(["", ":0.25rem;", ":1rem;", ":0.25rem;", ":0.25rem;", ":var(--plasma-typo-body-xxs-font-family);", ":var(--plasma-typo-body-xxs-font-size);", ":var(--plasma-typo-body-xxs-font-style);", ":var(--plasma-typo-body-xxs-font-weight);", ":var(--plasma-typo-body-xxs-letter-spacing);", ":var(--plasma-typo-body-xxs-line-height);", ":-0.0625rem;", ":0.125rem;", ":0.125rem;", ":-0.0625rem;"], badgeTokens.borderRadius, badgeTokens.height, badgeTokens.paddingRight, badgeTokens.paddingLeft, badgeTokens.fontFamily, badgeTokens.fontSize, badgeTokens.fontStyle, badgeTokens.fontWeight, badgeTokens.letterSpacing, badgeTokens.lineHeight, badgeTokens.leftContentMarginLeft, badgeTokens.leftContentMarginRight, badgeTokens.rightContentMarginLeft, badgeTokens.rightContentMarginRight)
|
23
23
|
},
|
24
24
|
pilled: {
|
25
25
|
"true": /*#__PURE__*/css(["", ":1.25rem;"], badgeTokens.pilledBorderRadius)
|
@@ -28,7 +28,10 @@ export var config = {
|
|
28
28
|
"true": /*#__PURE__*/css([""])
|
29
29
|
},
|
30
30
|
clear: {
|
31
|
-
"true": /*#__PURE__*/css([""
|
31
|
+
"true": /*#__PURE__*/css([""])
|
32
|
+
},
|
33
|
+
truncate: {
|
34
|
+
"true": /*#__PURE__*/css([""])
|
32
35
|
}
|
33
36
|
}
|
34
37
|
};
|
@@ -31,9 +31,8 @@ const meta: Meta<typeof Badge> = {
|
|
31
31
|
control: { type: 'boolean' },
|
32
32
|
if: { arg: 'clear', truthy: false },
|
33
33
|
},
|
34
|
-
|
34
|
+
maxWidth: {
|
35
35
|
control: { type: 'text' },
|
36
|
-
if: { arg: 'enableText', truthy: true },
|
37
36
|
},
|
38
37
|
...disableProps(['contentLeft', 'contentRight']),
|
39
38
|
},
|
@@ -44,7 +43,6 @@ export default meta;
|
|
44
43
|
type StoryProps = ComponentProps<typeof Badge> & {
|
45
44
|
enableContentLeft: boolean;
|
46
45
|
enableContentRight: boolean;
|
47
|
-
enableText: boolean;
|
48
46
|
};
|
49
47
|
type Story = StoryObj<StoryProps>;
|
50
48
|
|
@@ -65,19 +63,19 @@ export const Default: Story = {
|
|
65
63
|
},
|
66
64
|
enableContentRight: {
|
67
65
|
control: { type: 'boolean' },
|
68
|
-
if: { arg: '
|
66
|
+
if: { arg: 'enableContentLeft', truthy: false },
|
69
67
|
},
|
70
68
|
},
|
71
69
|
args: {
|
70
|
+
text: 'Hello Kitty',
|
72
71
|
view: 'default',
|
73
72
|
size: 'm',
|
74
|
-
enableText: true,
|
75
|
-
text: 'Hello',
|
76
73
|
enableContentLeft: false,
|
77
74
|
enableContentRight: false,
|
78
75
|
clear: false,
|
79
76
|
pilled: false,
|
80
77
|
transparent: false,
|
78
|
+
maxWidth: '',
|
81
79
|
},
|
82
80
|
render: ({ enableContentLeft, enableContentRight, size, ...rest }: StoryProps) => {
|
83
81
|
const iconSize = size === 'l' ? '1rem' : '0.75rem';
|