@salutejs/plasma-new-hope 0.114.1-canary.1333.10216082008.0 → 0.114.1-canary.1339.10246269224.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Notification/NotificationsPortal.js +11 -1
- package/cjs/components/Notification/NotificationsPortal.js.map +1 -1
- package/cjs/components/Notification/NotificationsPortal_6417q6.css +1 -0
- package/cjs/components/Notification/NotificationsProvider.css +2 -0
- package/cjs/components/Tabs/tokens.js +2 -5
- package/cjs/components/Tabs/tokens.js.map +1 -1
- package/cjs/components/Tabs/ui/TabItem/TabItem.css +1 -1
- package/cjs/components/Tabs/ui/TabItem/TabItem.js +2 -8
- package/cjs/components/Tabs/ui/TabItem/TabItem.js.map +1 -1
- package/cjs/components/Tabs/ui/TabItem/variations/_view/base.js +1 -1
- package/cjs/components/Tabs/ui/TabItem/variations/_view/base.js.map +1 -1
- package/cjs/components/Tabs/ui/TabItem/variations/_view/base_q8xs21.css +1 -0
- package/cjs/components/Tabs/ui/Tabs/Tabs.css +6 -6
- package/cjs/components/Tabs/ui/Tabs/Tabs.js +8 -51
- package/cjs/components/Tabs/ui/Tabs/Tabs.js.map +1 -1
- package/cjs/components/Tabs/ui/Tabs/Tabs.styles.js +7 -7
- package/cjs/components/Tabs/ui/Tabs/Tabs.styles.js.map +1 -1
- package/{es/components/Tabs/ui/Tabs/Tabs.styles_z4dnzh.css → cjs/components/Tabs/ui/Tabs/Tabs.styles_1b8qt33.css} +2 -2
- package/cjs/components/Tabs/ui/Tabs/variations/_stretch/base.js +1 -1
- package/cjs/components/Tabs/ui/Tabs/variations/_stretch/base.js.map +1 -1
- package/{es/components/Tabs/ui/Tabs/variations/_stretch/base_1c7lnrm.css → cjs/components/Tabs/ui/Tabs/variations/_stretch/base_176tz0n.css} +1 -1
- package/cjs/components/Tabs/ui/Tabs/variations/_view/base.js +1 -1
- package/{es/components/Tabs/ui/Tabs/variations/_view/base_aij3sf.css → cjs/components/Tabs/ui/Tabs/variations/_view/base_4xkt26.css} +1 -1
- package/cjs/index.css +9 -7
- package/emotion/cjs/components/Notification/NotificationsPortal.js +8 -1
- package/emotion/cjs/components/Tabs/tokens.js +2 -5
- package/emotion/cjs/components/Tabs/ui/TabItem/TabItem.js +2 -8
- package/emotion/cjs/components/Tabs/ui/TabItem/variations/_view/base.js +1 -1
- package/emotion/cjs/components/Tabs/ui/Tabs/Tabs.js +8 -51
- package/emotion/cjs/components/Tabs/ui/Tabs/Tabs.styles.js +16 -8
- package/emotion/cjs/components/Tabs/ui/Tabs/variations/_stretch/base.js +1 -1
- package/emotion/cjs/components/Tabs/ui/Tabs/variations/_view/tokens.json +1 -1
- package/emotion/cjs/examples/plasma_b2c/components/Tabs/TabItem.config.js +15 -15
- package/emotion/cjs/examples/plasma_b2c/components/Tabs/Tabs.config.js +17 -16
- package/emotion/cjs/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +196 -287
- package/emotion/cjs/examples/plasma_web/components/Tabs/TabItem.config.js +15 -15
- package/emotion/cjs/examples/plasma_web/components/Tabs/Tabs.config.js +17 -16
- package/emotion/cjs/examples/plasma_web/components/Tabs/Tabs.stories.tsx +196 -287
- package/emotion/es/components/Notification/NotificationsPortal.js +7 -1
- package/emotion/es/components/Tabs/tokens.js +2 -5
- package/emotion/es/components/Tabs/ui/TabItem/TabItem.js +2 -8
- package/emotion/es/components/Tabs/ui/TabItem/variations/_view/base.js +1 -1
- package/emotion/es/components/Tabs/ui/Tabs/Tabs.js +9 -52
- package/emotion/es/components/Tabs/ui/Tabs/Tabs.styles.js +17 -9
- package/emotion/es/components/Tabs/ui/Tabs/variations/_stretch/base.js +1 -1
- package/emotion/es/components/Tabs/ui/Tabs/variations/_view/tokens.json +1 -1
- package/emotion/es/examples/plasma_b2c/components/Tabs/TabItem.config.js +15 -15
- package/emotion/es/examples/plasma_b2c/components/Tabs/Tabs.config.js +17 -16
- package/emotion/es/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +196 -287
- package/emotion/es/examples/plasma_web/components/Tabs/TabItem.config.js +15 -15
- package/emotion/es/examples/plasma_web/components/Tabs/Tabs.config.js +17 -16
- package/emotion/es/examples/plasma_web/components/Tabs/Tabs.stories.tsx +196 -287
- package/es/components/Notification/NotificationsPortal.js +11 -1
- package/es/components/Notification/NotificationsPortal.js.map +1 -1
- package/es/components/Notification/NotificationsPortal_6417q6.css +1 -0
- package/es/components/Notification/NotificationsProvider.css +2 -0
- package/es/components/Tabs/tokens.js +2 -5
- package/es/components/Tabs/tokens.js.map +1 -1
- package/es/components/Tabs/ui/TabItem/TabItem.css +1 -1
- package/es/components/Tabs/ui/TabItem/TabItem.js +2 -8
- package/es/components/Tabs/ui/TabItem/TabItem.js.map +1 -1
- package/es/components/Tabs/ui/TabItem/variations/_view/base.js +1 -1
- package/es/components/Tabs/ui/TabItem/variations/_view/base.js.map +1 -1
- package/es/components/Tabs/ui/TabItem/variations/_view/base_q8xs21.css +1 -0
- package/es/components/Tabs/ui/Tabs/Tabs.css +6 -6
- package/es/components/Tabs/ui/Tabs/Tabs.js +9 -52
- package/es/components/Tabs/ui/Tabs/Tabs.js.map +1 -1
- package/es/components/Tabs/ui/Tabs/Tabs.styles.js +7 -7
- package/es/components/Tabs/ui/Tabs/Tabs.styles.js.map +1 -1
- package/{cjs/components/Tabs/ui/Tabs/Tabs.styles_z4dnzh.css → es/components/Tabs/ui/Tabs/Tabs.styles_1b8qt33.css} +2 -2
- package/es/components/Tabs/ui/Tabs/variations/_stretch/base.js +1 -1
- package/es/components/Tabs/ui/Tabs/variations/_stretch/base.js.map +1 -1
- package/{cjs/components/Tabs/ui/Tabs/variations/_stretch/base_1c7lnrm.css → es/components/Tabs/ui/Tabs/variations/_stretch/base_176tz0n.css} +1 -1
- package/es/components/Tabs/ui/Tabs/variations/_view/base.js +1 -1
- package/{cjs/components/Tabs/ui/Tabs/variations/_view/base_aij3sf.css → es/components/Tabs/ui/Tabs/variations/_view/base_4xkt26.css} +1 -1
- package/es/index.css +9 -7
- package/package.json +2 -2
- package/styled-components/cjs/components/Notification/NotificationsPortal.js +7 -1
- package/styled-components/cjs/components/Tabs/tokens.js +2 -5
- package/styled-components/cjs/components/Tabs/ui/TabItem/TabItem.js +2 -8
- package/styled-components/cjs/components/Tabs/ui/TabItem/variations/_view/base.js +1 -1
- package/styled-components/cjs/components/Tabs/ui/Tabs/Tabs.js +8 -51
- package/styled-components/cjs/components/Tabs/ui/Tabs/Tabs.styles.js +2 -2
- package/styled-components/cjs/components/Tabs/ui/Tabs/variations/_stretch/base.js +1 -1
- package/styled-components/cjs/components/Tabs/ui/Tabs/variations/_view/tokens.json +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Tabs/TabItem.config.js +8 -8
- package/styled-components/cjs/examples/plasma_b2c/components/Tabs/Tabs.config.js +5 -4
- package/styled-components/cjs/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +196 -287
- package/styled-components/cjs/examples/plasma_web/components/Tabs/TabItem.config.js +8 -8
- package/styled-components/cjs/examples/plasma_web/components/Tabs/Tabs.config.js +5 -4
- package/styled-components/cjs/examples/plasma_web/components/Tabs/Tabs.stories.tsx +196 -287
- package/styled-components/es/components/Notification/NotificationsPortal.js +6 -1
- package/styled-components/es/components/Tabs/tokens.js +2 -5
- package/styled-components/es/components/Tabs/ui/TabItem/TabItem.js +2 -8
- package/styled-components/es/components/Tabs/ui/TabItem/variations/_view/base.js +1 -1
- package/styled-components/es/components/Tabs/ui/Tabs/Tabs.js +9 -52
- package/styled-components/es/components/Tabs/ui/Tabs/Tabs.styles.js +3 -3
- package/styled-components/es/components/Tabs/ui/Tabs/variations/_stretch/base.js +1 -1
- package/styled-components/es/components/Tabs/ui/Tabs/variations/_view/tokens.json +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Tabs/TabItem.config.js +8 -8
- package/styled-components/es/examples/plasma_b2c/components/Tabs/Tabs.config.js +5 -4
- package/styled-components/es/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +196 -287
- package/styled-components/es/examples/plasma_web/components/Tabs/TabItem.config.js +8 -8
- package/styled-components/es/examples/plasma_web/components/Tabs/Tabs.config.js +5 -4
- package/styled-components/es/examples/plasma_web/components/Tabs/Tabs.stories.tsx +196 -287
- package/types/components/Notification/NotificationsPortal.d.ts.map +1 -1
- package/types/components/Tabs/tokens.d.ts +0 -3
- package/types/components/Tabs/tokens.d.ts.map +1 -1
- package/types/components/Tabs/ui/TabItem/TabItem.d.ts.map +1 -1
- package/types/components/Tabs/ui/TabItem/variations/_view/base.d.ts.map +1 -1
- package/types/components/Tabs/ui/Tabs/Tabs.d.ts +2 -4
- package/types/components/Tabs/ui/Tabs/Tabs.d.ts.map +1 -1
- package/types/components/Tabs/ui/Tabs/Tabs.styles.d.ts.map +1 -1
- package/types/components/Tabs/ui/Tabs/Tabs.types.d.ts +5 -12
- package/types/components/Tabs/ui/Tabs/Tabs.types.d.ts.map +1 -1
- package/types/components/Tabs/ui/Tabs/variations/_stretch/base.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Tabs/TabItem.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Tabs/Tabs.config.d.ts +1 -0
- package/types/examples/plasma_b2c/components/Tabs/Tabs.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Tabs/Tabs.d.ts +1 -2
- package/types/examples/plasma_b2c/components/Tabs/Tabs.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Tabs/TabItem.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Tabs/Tabs.config.d.ts +1 -0
- package/types/examples/plasma_web/components/Tabs/Tabs.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Tabs/Tabs.d.ts +1 -2
- package/types/examples/plasma_web/components/Tabs/Tabs.d.ts.map +1 -1
- package/types/examples/sds_engineer/components/Tabs/Tabs.d.ts +1 -2
- package/types/examples/sds_engineer/components/Tabs/Tabs.d.ts.map +1 -1
- package/cjs/components/Tabs/ui/TabItem/variations/_view/base_7pcxtm.css +0 -1
- package/es/components/Tabs/ui/TabItem/variations/_view/base_7pcxtm.css +0 -1
@@ -1,4 +1,4 @@
|
|
1
|
-
var _excluded = ["id", "stretch", "disabled", "
|
1
|
+
var _excluded = ["id", "stretch", "disabled", "size", "view", "children", "pilled", "index", "className"];
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
3
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
4
4
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
@@ -9,7 +9,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
9
9
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
10
10
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
11
11
|
import React, { forwardRef, useCallback, useMemo, useState, useEffect, useRef } from 'react';
|
12
|
-
import { safeUseId } from '@salutejs/plasma-core';
|
12
|
+
import { animatedScrollToX, safeUseId } from '@salutejs/plasma-core';
|
13
13
|
import { IconDisclosureLeft, IconDisclosureRight } from '../../../_Icon';
|
14
14
|
import { classes, tokens } from '../../tokens';
|
15
15
|
import { cx } from '../../../../utils';
|
@@ -34,13 +34,10 @@ export var tabsRoot = function tabsRoot(Root) {
|
|
34
34
|
stretch = _props$stretch === void 0 ? false : _props$stretch,
|
35
35
|
_props$disabled = props.disabled,
|
36
36
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
37
|
-
_props$clip = props.clip,
|
38
|
-
clip = _props$clip === void 0 ? 'scroll' : _props$clip,
|
39
37
|
size = props.size,
|
40
38
|
view = props.view,
|
41
39
|
children = props.children,
|
42
|
-
|
43
|
-
pilled = _props$pilled === void 0 ? false : _props$pilled,
|
40
|
+
pilled = props.pilled,
|
44
41
|
index = props.index,
|
45
42
|
className = props.className,
|
46
43
|
rest = _objectWithoutProperties(props, _excluded);
|
@@ -63,41 +60,14 @@ export var tabsRoot = function tabsRoot(Root) {
|
|
63
60
|
var stretchClass = firstItemVisible && lastItemVisible && stretch ? classes.tabsStretch : undefined;
|
64
61
|
var hasLeftArrowClass = !firstItemVisible ? classes.tabsHasLeftArrow : undefined;
|
65
62
|
var hasRightArrowClass = !lastItemVisible ? classes.tabsHasRightArrow : undefined;
|
66
|
-
var clipScrollClass = clip === 'scroll' ? classes.tabsClipScroll : undefined;
|
67
|
-
var clipShowAllClass = clip === 'showAll' ? classes.tabsClipShowAll : undefined;
|
68
63
|
var scrollRef = useRef(null);
|
69
64
|
var trackRef = useRef(null);
|
70
|
-
var leftArrowRef = useRef(null);
|
71
65
|
var onPrev = useCallback(function () {
|
72
|
-
|
73
|
-
|
74
|
-
return;
|
75
|
-
}
|
76
|
-
var scrollLeft = Math.round(scrollRef.current.scrollLeft);
|
77
|
-
var firstOverflowingTab = refs.items.slice().reverse().find(function (item) {
|
78
|
-
if (!item.current || item.current.offsetLeft === undefined) {
|
79
|
-
return;
|
80
|
-
}
|
81
|
-
var tabStartX = item.current.offsetLeft;
|
82
|
-
return tabStartX < scrollLeft;
|
83
|
-
});
|
84
|
-
firstOverflowingTab === null || firstOverflowingTab === void 0 || (_firstOverflowingTab$ = firstOverflowingTab.current) === null || _firstOverflowingTab$ === void 0 || _firstOverflowingTab$.scrollIntoView();
|
85
|
-
}, [disabled, scrollRef, refs]);
|
66
|
+
!disabled && scrollRef.current && animatedScrollToX(scrollRef.current, scrollRef.current.scrollLeft - scrollRef.current.offsetWidth / 2);
|
67
|
+
}, [disabled, scrollRef]);
|
86
68
|
var onNext = useCallback(function () {
|
87
|
-
|
88
|
-
|
89
|
-
return;
|
90
|
-
}
|
91
|
-
var scrollRight = Math.round(scrollRef.current.scrollLeft + scrollRef.current.clientWidth);
|
92
|
-
var lastOverflowingTab = refs.items.find(function (item) {
|
93
|
-
if (!item.current || item.current.offsetLeft === undefined) {
|
94
|
-
return;
|
95
|
-
}
|
96
|
-
var tabEndX = item.current.offsetLeft + item.current.offsetWidth;
|
97
|
-
return tabEndX > scrollRight;
|
98
|
-
});
|
99
|
-
lastOverflowingTab === null || lastOverflowingTab === void 0 || (_lastOverflowingTab$c = lastOverflowingTab.current) === null || _lastOverflowingTab$c === void 0 || _lastOverflowingTab$c.scrollIntoView();
|
100
|
-
}, [disabled, scrollRef, refs]);
|
69
|
+
!disabled && scrollRef.current && animatedScrollToX(scrollRef.current, scrollRef.current.scrollLeft + scrollRef.current.offsetWidth / 2);
|
70
|
+
}, [disabled, scrollRef]);
|
101
71
|
var PreviousButton = useMemo(function () {
|
102
72
|
return /*#__PURE__*/React.createElement(StyledArrow, {
|
103
73
|
type: "button",
|
@@ -106,7 +76,6 @@ export var tabsRoot = function tabsRoot(Root) {
|
|
106
76
|
tabIndex: disabled ? -1 : 0,
|
107
77
|
disabled: disabled,
|
108
78
|
isFilled: isFilled,
|
109
|
-
ref: leftArrowRef,
|
110
79
|
isLeftArrow: true
|
111
80
|
}, /*#__PURE__*/React.createElement(IconDisclosureLeft, {
|
112
81
|
color: "var(".concat(tokens.arrowColor, ")")
|
@@ -127,9 +96,8 @@ export var tabsRoot = function tabsRoot(Root) {
|
|
127
96
|
var handleScroll = useCallback(function (event) {
|
128
97
|
event.stopPropagation();
|
129
98
|
var maxScrollLeft = event.currentTarget.scrollWidth - event.currentTarget.clientWidth;
|
130
|
-
|
131
|
-
|
132
|
-
setLastItemVisible(scrollLeft >= maxScrollLeft);
|
99
|
+
setFirstItemVisible(event.currentTarget.scrollLeft <= 0);
|
100
|
+
setLastItemVisible(event.currentTarget.scrollLeft >= maxScrollLeft);
|
133
101
|
}, [setFirstItemVisible, setLastItemVisible]);
|
134
102
|
var onKeyDown = useCallback(function (event) {
|
135
103
|
if (index === undefined) {
|
@@ -169,16 +137,6 @@ export var tabsRoot = function tabsRoot(Root) {
|
|
169
137
|
var _scrollRef$current, _scrollRef$current2;
|
170
138
|
setLastItemVisible(((_scrollRef$current = scrollRef.current) === null || _scrollRef$current === void 0 ? void 0 : _scrollRef$current.scrollWidth) === ((_scrollRef$current2 = scrollRef.current) === null || _scrollRef$current2 === void 0 ? void 0 : _scrollRef$current2.clientWidth));
|
171
139
|
}, []);
|
172
|
-
|
173
|
-
// Этот хук компенсирует появление левой стрелки при прокрутке
|
174
|
-
useEffect(function () {
|
175
|
-
if (firstItemVisible || !scrollRef.current || !leftArrowRef.current) {
|
176
|
-
return;
|
177
|
-
}
|
178
|
-
scrollRef.current.scrollTo({
|
179
|
-
left: Math.round(scrollRef.current.scrollLeft + leftArrowRef.current.clientWidth)
|
180
|
-
});
|
181
|
-
}, [firstItemVisible, scrollRef, leftArrowRef]);
|
182
140
|
return /*#__PURE__*/React.createElement(TabsContext.Provider, {
|
183
141
|
value: refs
|
184
142
|
}, /*#__PURE__*/React.createElement(Root, _extends({
|
@@ -192,7 +150,6 @@ export var tabsRoot = function tabsRoot(Root) {
|
|
192
150
|
className: cx(pilledClass, stretchClass, hasLeftArrowClass, hasRightArrowClass, className),
|
193
151
|
onKeyDown: onKeyDown
|
194
152
|
}, rest), !firstItemVisible && PreviousButton, /*#__PURE__*/React.createElement(StyledContentWrapper, {
|
195
|
-
className: cx(clipScrollClass, clipShowAllClass),
|
196
153
|
ref: scrollRef,
|
197
154
|
onScroll: handleScroll
|
198
155
|
}, /*#__PURE__*/React.createElement(StyledContent, {
|
@@ -3,14 +3,14 @@ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(
|
|
3
3
|
import { css } from 'styled-components';
|
4
4
|
import styled from 'styled-components';
|
5
5
|
import { addFocus } from '../../../../mixins';
|
6
|
-
import {
|
7
|
-
export var base = /*#__PURE__*/css(_templateObject || (_templateObject = /*#__PURE__*/_taggedTemplateLiteral(["\n display: flex;\n
|
6
|
+
import { tokens } from '../../tokens';
|
7
|
+
export var base = /*#__PURE__*/css(_templateObject || (_templateObject = /*#__PURE__*/_taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n position: relative;\n"])));
|
8
8
|
export var StyledContent = /*#__PURE__*/styled.div.withConfig({
|
9
9
|
componentId: "plasma-new-hope__sc-1ibkmsl-0"
|
10
10
|
})(["display:inline-flex;flex-direction:row;align-items:center;"]);
|
11
11
|
export var StyledContentWrapper = /*#__PURE__*/styled.div.withConfig({
|
12
12
|
componentId: "plasma-new-hope__sc-1ibkmsl-1"
|
13
|
-
})(["margin:-0.125rem;padding:0.25rem;box-sizing:content-box;position:relative;height:100%;width:100%;display:flex;align-items:center
|
13
|
+
})(["margin:-0.125rem;padding:0.25rem;box-sizing:content-box;overflow:scroll;position:relative;height:100%;width:100%;display:flex;align-items:center;scrollbar-width:none;::-webkit-scrollbar{display:none;}overscroll-behavior:contain;"]);
|
14
14
|
export var StyledArrow = /*#__PURE__*/styled.button.withConfig({
|
15
15
|
componentId: "plasma-new-hope__sc-1ibkmsl-2"
|
16
16
|
})(["display:flex;cursor:pointer;border:none;background-color:transparent;padding:0;outline:none;", ";&[disabled]{cursor:not-allowed;}--plasma_private-outer-padding:", ";padding-right:", ";padding-left:", ";"], /*#__PURE__*/addFocus({
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import { css } from 'styled-components';
|
2
2
|
import { classes } from '../../../../tokens';
|
3
3
|
import { StyledContent, StyledContentWrapper } from '../../Tabs.styles';
|
4
|
-
export var base = /*#__PURE__*/css(["&.", "{width:100%;", ",", ",", " > button{width:100%;
|
4
|
+
export var base = /*#__PURE__*/css(["&.", "{width:100%;", ",", ",", " > button{width:100%;}}"], classes.tabsStretch, StyledContentWrapper, StyledContent, StyledContent);
|
@@ -1 +1 @@
|
|
1
|
-
["--plasma-tabs-
|
1
|
+
["--plasma-tabs-backgorund-color", "--plasma-tabs-divider-height", "--plasma-tabs-divider-color"]
|
@@ -7,16 +7,16 @@ export var config = {
|
|
7
7
|
},
|
8
8
|
variations: {
|
9
9
|
view: {
|
10
|
-
clear: /*#__PURE__*/css(["", ":var(--text-secondary);", ":transparent;", ":var(--text-
|
11
|
-
secondary: /*#__PURE__*/css(["", ":var(--text-primary);", ":transparent;", ":var(--text-
|
12
|
-
divider: /*#__PURE__*/css(["", ":var(--text-secondary);", ":transparent;", ":var(--text-
|
13
|
-
"default": /*#__PURE__*/css(["", ":var(--text-primary);", ":transparent;", ":var(--text-
|
10
|
+
clear: /*#__PURE__*/css(["", ":var(--text-secondary);", ":transparent;", ":var(--text-primary);", ":transparent;", ":var(--text-primary);", ":transparent;", ":var(--text-primary);", ":transparent;", ":background-color 0.3s ease-in-out;", ":0;", ":0;", ":var(--plasma-colors-button-focused);", ":0rem;", ":var(--text-primary);", ":var(--text-primary);", ":var(--text-tertiary);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--text-secondary);"], tabsTokens.itemColor, tabsTokens.itemBackgroundColor, tabsTokens.itemColorHover, tabsTokens.itemBackgroundColorHover, tabsTokens.itemSelectedColor, tabsTokens.itemSelectedBackgroundColor, tabsTokens.itemSelectedColorHover, tabsTokens.itemSelectedBackgroundColorHover, tabsTokens.itemBackgroundTransition, tabsTokens.itemPaddingClear, tabsTokens.itemContentPaddingClear, tabsTokens.outlineFocusColor, tabsTokens.itemSelectedDividerHeight, tabsTokens.itemSelectedDividerColor, tabsTokens.itemSelectedDividerColorHover, tabsTokens.additionalContentColor, tabsTokens.additionalContentHoverColor, tabsTokens.additionalContentSelectedColor, tabsTokens.additionalContentSelectedHoverColor),
|
11
|
+
secondary: /*#__PURE__*/css(["", ":var(--text-primary);", ":transparent;", ":var(--text-primary);", ":transparent;", ":var(--text-primary);", ":var(--surface-solid-card);", ":var(--text-primary);", ":var(--surface-solid-card);", ":background-color 0.3s ease-in-out;", ":0.125rem;", ":var(--plasma-colors-button-focused);", ":0rem;", ":var(--text-primary);", ":var(--text-primary);", ":var(--text-primary);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--text-secondary);"], tabsTokens.itemColor, tabsTokens.itemBackgroundColor, tabsTokens.itemColorHover, tabsTokens.itemBackgroundColorHover, tabsTokens.itemSelectedColor, tabsTokens.itemSelectedBackgroundColor, tabsTokens.itemSelectedColorHover, tabsTokens.itemSelectedBackgroundColorHover, tabsTokens.itemBackgroundTransition, tabsTokens.itemMarginLeftFilled, tabsTokens.outlineFocusColor, tabsTokens.itemSelectedDividerHeight, tabsTokens.itemSelectedDividerColor, tabsTokens.itemSelectedDividerColorHover, tabsTokens.itemSelectedDividerColorHover, tabsTokens.additionalContentColor, tabsTokens.additionalContentHoverColor, tabsTokens.additionalContentSelectedColor, tabsTokens.additionalContentSelectedHoverColor),
|
12
|
+
divider: /*#__PURE__*/css(["", ":var(--text-secondary);", ":transparent;", ":var(--text-primary);", ":transparent;", ":var(--text-primary);", ":transparent;", ":var(--text-primary);", ":transparent;", ":background-color 0.3s ease-in-out;", ":0;", ":0;", ":var(--plasma-colors-button-focused);", ":0.125rem;", ":var(--text-primary);", ":var(--text-primary);", ":var(--text-primary);", ":var(--text-tertiary);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--text-secondary);"], tabsTokens.itemColor, tabsTokens.itemBackgroundColor, tabsTokens.itemColorHover, tabsTokens.itemBackgroundColorHover, tabsTokens.itemSelectedColor, tabsTokens.itemSelectedBackgroundColor, tabsTokens.itemSelectedColorHover, tabsTokens.itemSelectedBackgroundColorHover, tabsTokens.itemBackgroundTransition, tabsTokens.itemPaddingClear, tabsTokens.itemContentPaddingClear, tabsTokens.outlineFocusColor, tabsTokens.itemSelectedDividerHeight, tabsTokens.itemSelectedDividerColor, tabsTokens.itemSelectedDividerColorHover, tabsTokens.itemSelectedDividerColorHover, tabsTokens.additionalContentColor, tabsTokens.additionalContentHoverColor, tabsTokens.additionalContentSelectedColor, tabsTokens.additionalContentSelectedHoverColor),
|
13
|
+
"default": /*#__PURE__*/css(["", ":var(--text-primary);", ":transparent;", ":var(--text-primary);", ":transparent;", ":var(--inverse-text-primary);", ":var(--surface-solid-default);", ":var(--inverse-text-primary);", ":var(--surface-solid-default);", ":background-color 0.3s ease-in-out;", ":0.125rem;", ":var(--plasma-colors-button-focused);", ":0rem;", ":var(--text-primary);", ":var(--text-primary);", ":var(--text-primary);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--inverse-text-secondary);", ":var(--inverse-text-secondary);"], tabsTokens.itemColor, tabsTokens.itemBackgroundColor, tabsTokens.itemColorHover, tabsTokens.itemBackgroundColorHover, tabsTokens.itemSelectedColor, tabsTokens.itemSelectedBackgroundColor, tabsTokens.itemSelectedColorHover, tabsTokens.itemSelectedBackgroundColorHover, tabsTokens.itemBackgroundTransition, tabsTokens.itemMarginLeftFilled, tabsTokens.outlineFocusColor, tabsTokens.itemSelectedDividerHeight, tabsTokens.itemSelectedDividerColor, tabsTokens.itemSelectedDividerColorHover, tabsTokens.itemSelectedDividerColorHover, tabsTokens.additionalContentColor, tabsTokens.additionalContentHoverColor, tabsTokens.additionalContentSelectedColor, tabsTokens.additionalContentSelectedHoverColor)
|
14
14
|
},
|
15
15
|
size: {
|
16
|
-
xs: /*#__PURE__*/css(["", ":0.375rem;", ":auto;", ":
|
17
|
-
s: /*#__PURE__*/css(["", ":0.5rem;", ":auto;", ":
|
18
|
-
m: /*#__PURE__*/css(["", ":0.625rem;", ":auto;", ":
|
19
|
-
l: /*#__PURE__*/css(["", ":0.75rem;", ":auto;", ":
|
16
|
+
xs: /*#__PURE__*/css(["", ":0.375rem;", ":auto;", ":1.5rem;", ":0 0.5rem;", ":0 0.375rem;", ":1.75rem;", ":0.25rem;", ":0.125rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);"], tabsTokens.itemBorderRadius, tabsTokens.itemWidth, tabsTokens.itemHeight, tabsTokens.itemPadding, tabsTokens.itemPaddingPilled, tabsTokens.itemMarginLeft, tabsTokens.itemContentGap, tabsTokens.itemContentPadding, tabsTokens.fontFamily, tabsTokens.fontSize, tabsTokens.fontStyle, tabsTokens.fontWeight, tabsTokens.letterSpacing, tabsTokens.lineHeight),
|
17
|
+
s: /*#__PURE__*/css(["", ":0.5rem;", ":auto;", ":2rem;", ":0 0.625rem;", ":0 0.5rem;", ":1.75rem;", ":0.25rem;", ":0.125rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);"], tabsTokens.itemBorderRadius, tabsTokens.itemWidth, tabsTokens.itemHeight, tabsTokens.itemPadding, tabsTokens.itemPaddingPilled, tabsTokens.itemMarginLeft, tabsTokens.itemContentGap, tabsTokens.itemContentPadding, tabsTokens.fontFamily, tabsTokens.fontSize, tabsTokens.fontStyle, tabsTokens.fontWeight, tabsTokens.letterSpacing, tabsTokens.lineHeight),
|
18
|
+
m: /*#__PURE__*/css(["", ":0.625rem;", ":auto;", ":2.5rem;", ":0 0.625rem;", ":0 0.5rem;", ":1.75rem;", ":0.5rem;", ":0.125rem;", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);"], tabsTokens.itemBorderRadius, tabsTokens.itemWidth, tabsTokens.itemHeight, tabsTokens.itemPadding, tabsTokens.itemPaddingPilled, tabsTokens.itemMarginLeft, tabsTokens.itemContentGap, tabsTokens.itemContentPadding, tabsTokens.fontFamily, tabsTokens.fontSize, tabsTokens.fontStyle, tabsTokens.fontWeight, tabsTokens.letterSpacing, tabsTokens.lineHeight),
|
19
|
+
l: /*#__PURE__*/css(["", ":0.75rem;", ":auto;", ":3rem;", ":0 0.875rem;", ":0 0.75rem;", ":1.75rem;", ":0.5rem;", ":0.125rem;", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);"], tabsTokens.itemBorderRadius, tabsTokens.itemWidth, tabsTokens.itemHeight, tabsTokens.itemPadding, tabsTokens.itemPaddingPilled, tabsTokens.itemMarginLeft, tabsTokens.itemContentGap, tabsTokens.itemContentPadding, tabsTokens.fontFamily, tabsTokens.fontSize, tabsTokens.fontStyle, tabsTokens.fontWeight, tabsTokens.letterSpacing, tabsTokens.lineHeight),
|
20
20
|
h5: /*#__PURE__*/css(["", ":0.375rem;", ":auto;", ":3rem;", ":0rem;", ":1.75rem;", ":0.625rem;", ":var(--plasma-typo-h5-font-family);", ":var(--plasma-typo-h5-font-size);", ":var(--plasma-typo-h5-font-style);", ":var(--plasma-typo-h5-font-weight);", ":var(--plasma-typo-h5-letter-spacing);", ":var(--plasma-typo-h5-line-height);"], tabsTokens.itemBorderRadius, tabsTokens.itemWidth, tabsTokens.itemHeight, tabsTokens.itemPadding, tabsTokens.itemMarginLeft, tabsTokens.itemContentGap, tabsTokens.fontFamily, tabsTokens.fontSize, tabsTokens.fontStyle, tabsTokens.fontWeight, tabsTokens.letterSpacing, tabsTokens.lineHeight),
|
21
21
|
h4: /*#__PURE__*/css(["", ":0.375rem;", ":auto;", ":3.25rem;", ":0rem;", ":2rem;", ":0.625rem;", ":var(--plasma-typo-h4-font-family);", ":var(--plasma-typo-h4-font-size);", ":var(--plasma-typo-h4-font-style);", ":var(--plasma-typo-h4-font-weight);", ":var(--plasma-typo-h4-letter-spacing);", ":var(--plasma-typo-h4-line-height);"], tabsTokens.itemBorderRadius, tabsTokens.itemWidth, tabsTokens.itemHeight, tabsTokens.itemPadding, tabsTokens.itemMarginLeft, tabsTokens.itemContentGap, tabsTokens.fontFamily, tabsTokens.fontSize, tabsTokens.fontStyle, tabsTokens.fontWeight, tabsTokens.letterSpacing, tabsTokens.lineHeight),
|
22
22
|
h3: /*#__PURE__*/css(["", ":0.5rem;", ":auto;", ":3.875rem;", ":0rem;", ":2.25rem;", ":0.75rem;", ":var(--plasma-typo-h3-font-family);", ":var(--plasma-typo-h3-font-size);", ":var(--plasma-typo-h3-font-style);", ":var(--plasma-typo-h3-font-weight);", ":var(--plasma-typo-h3-letter-spacing);", ":var(--plasma-typo-h3-line-height);"], tabsTokens.itemBorderRadius, tabsTokens.itemWidth, tabsTokens.itemHeight, tabsTokens.itemPadding, tabsTokens.itemMarginLeft, tabsTokens.itemContentGap, tabsTokens.fontFamily, tabsTokens.fontSize, tabsTokens.fontStyle, tabsTokens.fontWeight, tabsTokens.letterSpacing, tabsTokens.lineHeight),
|
@@ -3,13 +3,14 @@ import { tabsTokens } from '../../../../components/Tabs';
|
|
3
3
|
export var config = {
|
4
4
|
defaults: {
|
5
5
|
view: 'filled',
|
6
|
-
size: 'xs'
|
6
|
+
size: 'xs',
|
7
|
+
disabled: 'false'
|
7
8
|
},
|
8
9
|
variations: {
|
9
10
|
view: {
|
10
|
-
clear: /*#__PURE__*/css(["", ":var(--text-secondary);", ":
|
11
|
-
filled: /*#__PURE__*/css(["", ":var(--text-secondary);", ":var(--surface-transparent-primary);", ":var(--plasma-colors-button-focused);", ":0rem;", ":
|
12
|
-
divider: /*#__PURE__*/css(["", ":var(--text-secondary);", ":
|
11
|
+
clear: /*#__PURE__*/css(["", ":var(--text-secondary);", ":tranparent;", ":var(--plasma-colors-button-focused);", ":0rem;", ":tranparent;", ":0rem;"], tabsTokens.arrowColor, tabsTokens.tabsBackgroundColor, tabsTokens.outlineFocusColor, tabsTokens.tabsDividerHeight, tabsTokens.tabsDividerColor, tabsTokens.tabsDividerBorderRadius),
|
12
|
+
filled: /*#__PURE__*/css(["", ":var(--text-secondary);", ":var(--surface-transparent-primary);", ":var(--plasma-colors-button-focused);", ":0rem;", ":tranparent;", ":0rem;"], tabsTokens.arrowColor, tabsTokens.tabsBackgroundColor, tabsTokens.outlineFocusColor, tabsTokens.tabsDividerHeight, tabsTokens.tabsDividerColor, tabsTokens.tabsDividerBorderRadius),
|
13
|
+
divider: /*#__PURE__*/css(["", ":var(--text-secondary);", ":tranparent;", ":var(--plasma-colors-button-focused);", ":0.0625rem;", ":var(--surface-transparent-secondary);", ":0.0625rem;"], tabsTokens.arrowColor, tabsTokens.tabsBackgroundColor, tabsTokens.outlineFocusColor, tabsTokens.tabsDividerHeight, tabsTokens.tabsDividerColor, tabsTokens.tabsDividerBorderRadius)
|
13
14
|
},
|
14
15
|
size: {
|
15
16
|
xs: /*#__PURE__*/css(["", ":0.5rem;", ":fit-content;", ":auto;", ":0rem;", ":0.125rem;"], tabsTokens.tabsBorderRadius, tabsTokens.tabsWidth, tabsTokens.tabsHeight, tabsTokens.arrowInnerPadding, tabsTokens.arrowOuterPadding),
|