@salutejs/plasma-new-hope 0.177.0-dev.0 → 0.177.1-canary.1512.11575354211.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Dropdown/ui/DropdownDivider/DropdownDivider.js +2 -2
- package/cjs/components/Dropdown/ui/DropdownDivider/DropdownDivider.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownFooter/DropdownFooter.js +2 -2
- package/cjs/components/Dropdown/ui/DropdownFooter/DropdownFooter.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownGroup/DropdownGroup.js +2 -2
- package/cjs/components/Dropdown/ui/DropdownGroup/DropdownGroup.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownHeader/DropdownHeader.js +2 -2
- package/cjs/components/Dropdown/ui/DropdownHeader/DropdownHeader.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownOld/DropdownOld.js +4 -2
- package/cjs/components/Dropdown/ui/DropdownOld/DropdownOld.js.map +1 -1
- package/cjs/components/Popover/Popover.js +2 -1
- package/cjs/components/Popover/Popover.js.map +1 -1
- package/cjs/components/Tabs/createTabsController.js.map +1 -1
- package/cjs/components/Tabs/tokens.js +2 -0
- package/cjs/components/Tabs/tokens.js.map +1 -1
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +3 -1
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js.map +1 -1
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.css +5 -5
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js +20 -8
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js.map +1 -1
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.styles.js +1 -1
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.styles.js.map +1 -1
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabs/{HorizontalTabs.styles_16kuvxt.css → HorizontalTabs.styles_p9rk79.css} +1 -1
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabs/variations/_view/base.js +1 -1
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabs/variations/_view/base.js.map +1 -1
- package/{es/components/Tabs/ui/horizontal/HorizontalTabs/variations/_view/base_9miwn.css → cjs/components/Tabs/ui/horizontal/HorizontalTabs/variations/_view/base_4ob3q5.css} +1 -1
- package/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.css +4 -4
- package/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js +7 -6
- package/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js.map +1 -1
- package/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.styles.js +1 -1
- package/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.styles.js.map +1 -1
- package/{es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.styles_1fr5ovg.css → cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.styles_1r1hidh.css} +1 -1
- package/cjs/index.css +9 -9
- package/emotion/cjs/components/Dropdown/ui/DropdownDivider/DropdownDivider.js +2 -2
- package/emotion/cjs/components/Dropdown/ui/DropdownFooter/DropdownFooter.js +2 -2
- package/emotion/cjs/components/Dropdown/ui/DropdownGroup/DropdownGroup.js +2 -2
- package/emotion/cjs/components/Dropdown/ui/DropdownHeader/DropdownHeader.js +2 -2
- package/emotion/cjs/components/Dropdown/ui/DropdownOld/DropdownOld.js +6 -4
- package/emotion/cjs/components/Popover/Popover.js +2 -1
- package/emotion/cjs/components/Tabs/tokens.js +2 -0
- package/emotion/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +3 -1
- package/emotion/cjs/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js +20 -8
- package/emotion/cjs/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.styles.js +4 -4
- package/emotion/cjs/components/Tabs/ui/horizontal/HorizontalTabs/variations/_view/base.js +1 -1
- package/emotion/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js +7 -6
- package/emotion/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.styles.js +4 -4
- package/emotion/cjs/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +72 -33
- package/emotion/cjs/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.js +15 -15
- package/emotion/cjs/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabs.config.js +15 -15
- package/emotion/cjs/examples/plasma_b2c/components/Tabs/vertical/VerticalTabs.config.js +6 -6
- package/emotion/cjs/examples/plasma_web/components/Tabs/Tabs.stories.tsx +72 -33
- package/emotion/cjs/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.js +15 -15
- package/emotion/cjs/examples/plasma_web/components/Tabs/horizontal/HorizontalTabs.config.js +15 -15
- package/emotion/cjs/examples/plasma_web/components/Tabs/vertical/VerticalTabs.config.js +6 -6
- package/emotion/es/components/Dropdown/ui/DropdownDivider/DropdownDivider.js +2 -2
- package/emotion/es/components/Dropdown/ui/DropdownFooter/DropdownFooter.js +2 -2
- package/emotion/es/components/Dropdown/ui/DropdownGroup/DropdownGroup.js +2 -2
- package/emotion/es/components/Dropdown/ui/DropdownHeader/DropdownHeader.js +2 -2
- package/emotion/es/components/Dropdown/ui/DropdownOld/DropdownOld.js +4 -2
- package/emotion/es/components/Popover/Popover.js +2 -1
- package/emotion/es/components/Tabs/tokens.js +2 -0
- package/emotion/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +3 -1
- package/emotion/es/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js +21 -9
- package/emotion/es/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.styles.js +4 -4
- package/emotion/es/components/Tabs/ui/horizontal/HorizontalTabs/variations/_view/base.js +1 -1
- package/emotion/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js +8 -7
- package/emotion/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.styles.js +4 -4
- package/emotion/es/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +72 -33
- package/emotion/es/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.js +15 -15
- package/emotion/es/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabs.config.js +15 -15
- package/emotion/es/examples/plasma_b2c/components/Tabs/vertical/VerticalTabs.config.js +6 -6
- package/emotion/es/examples/plasma_web/components/Tabs/Tabs.stories.tsx +72 -33
- package/emotion/es/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.js +15 -15
- package/emotion/es/examples/plasma_web/components/Tabs/horizontal/HorizontalTabs.config.js +15 -15
- package/emotion/es/examples/plasma_web/components/Tabs/vertical/VerticalTabs.config.js +6 -6
- package/es/components/Dropdown/ui/DropdownDivider/DropdownDivider.js +2 -2
- package/es/components/Dropdown/ui/DropdownDivider/DropdownDivider.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownFooter/DropdownFooter.js +2 -2
- package/es/components/Dropdown/ui/DropdownFooter/DropdownFooter.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownGroup/DropdownGroup.js +2 -2
- package/es/components/Dropdown/ui/DropdownGroup/DropdownGroup.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownHeader/DropdownHeader.js +2 -2
- package/es/components/Dropdown/ui/DropdownHeader/DropdownHeader.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownOld/DropdownOld.js +4 -2
- package/es/components/Dropdown/ui/DropdownOld/DropdownOld.js.map +1 -1
- package/es/components/Popover/Popover.js +2 -1
- package/es/components/Popover/Popover.js.map +1 -1
- package/es/components/Tabs/createTabsController.js.map +1 -1
- package/es/components/Tabs/tokens.js +2 -0
- package/es/components/Tabs/tokens.js.map +1 -1
- package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +3 -1
- package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js.map +1 -1
- package/es/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.css +5 -5
- package/es/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js +21 -9
- package/es/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js.map +1 -1
- package/es/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.styles.js +1 -1
- package/es/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.styles.js.map +1 -1
- package/es/components/Tabs/ui/horizontal/HorizontalTabs/{HorizontalTabs.styles_16kuvxt.css → HorizontalTabs.styles_p9rk79.css} +1 -1
- package/es/components/Tabs/ui/horizontal/HorizontalTabs/variations/_view/base.js +1 -1
- package/es/components/Tabs/ui/horizontal/HorizontalTabs/variations/_view/base.js.map +1 -1
- package/{cjs/components/Tabs/ui/horizontal/HorizontalTabs/variations/_view/base_9miwn.css → es/components/Tabs/ui/horizontal/HorizontalTabs/variations/_view/base_4ob3q5.css} +1 -1
- package/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.css +4 -4
- package/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js +8 -7
- package/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js.map +1 -1
- package/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.styles.js +1 -1
- package/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.styles.js.map +1 -1
- package/{cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.styles_1fr5ovg.css → es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.styles_1r1hidh.css} +1 -1
- package/es/index.css +9 -9
- package/package.json +4 -4
- package/styled-components/cjs/components/Dropdown/ui/DropdownDivider/DropdownDivider.js +2 -2
- package/styled-components/cjs/components/Dropdown/ui/DropdownFooter/DropdownFooter.js +2 -2
- package/styled-components/cjs/components/Dropdown/ui/DropdownGroup/DropdownGroup.js +2 -2
- package/styled-components/cjs/components/Dropdown/ui/DropdownHeader/DropdownHeader.js +2 -2
- package/styled-components/cjs/components/Dropdown/ui/DropdownOld/DropdownOld.js +6 -4
- package/styled-components/cjs/components/Popover/Popover.js +2 -1
- package/styled-components/cjs/components/Tabs/tokens.js +2 -0
- package/styled-components/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +3 -1
- package/styled-components/cjs/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js +20 -8
- package/styled-components/cjs/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.styles.js +2 -2
- package/styled-components/cjs/components/Tabs/ui/horizontal/HorizontalTabs/variations/_view/base.js +1 -1
- package/styled-components/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js +7 -6
- package/styled-components/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.styles.js +2 -2
- package/styled-components/cjs/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +72 -33
- package/styled-components/cjs/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.js +2 -2
- package/styled-components/cjs/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabs.config.js +3 -3
- package/styled-components/cjs/examples/plasma_b2c/components/Tabs/vertical/VerticalTabs.config.js +1 -1
- package/styled-components/cjs/examples/plasma_web/components/Tabs/Tabs.stories.tsx +72 -33
- package/styled-components/cjs/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.js +2 -2
- package/styled-components/cjs/examples/plasma_web/components/Tabs/horizontal/HorizontalTabs.config.js +3 -3
- package/styled-components/cjs/examples/plasma_web/components/Tabs/vertical/VerticalTabs.config.js +1 -1
- package/styled-components/es/components/Dropdown/ui/DropdownDivider/DropdownDivider.js +2 -2
- package/styled-components/es/components/Dropdown/ui/DropdownFooter/DropdownFooter.js +2 -2
- package/styled-components/es/components/Dropdown/ui/DropdownGroup/DropdownGroup.js +2 -2
- package/styled-components/es/components/Dropdown/ui/DropdownHeader/DropdownHeader.js +2 -2
- package/styled-components/es/components/Dropdown/ui/DropdownOld/DropdownOld.js +4 -2
- package/styled-components/es/components/Popover/Popover.js +2 -1
- package/styled-components/es/components/Tabs/tokens.js +2 -0
- package/styled-components/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +3 -1
- package/styled-components/es/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js +21 -9
- package/styled-components/es/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.styles.js +2 -2
- package/styled-components/es/components/Tabs/ui/horizontal/HorizontalTabs/variations/_view/base.js +1 -1
- package/styled-components/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js +8 -7
- package/styled-components/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.styles.js +2 -2
- package/styled-components/es/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +72 -33
- package/styled-components/es/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.js +2 -2
- package/styled-components/es/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabs.config.js +3 -3
- package/styled-components/es/examples/plasma_b2c/components/Tabs/vertical/VerticalTabs.config.js +1 -1
- package/styled-components/es/examples/plasma_web/components/Tabs/Tabs.stories.tsx +72 -33
- package/styled-components/es/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.js +2 -2
- package/styled-components/es/examples/plasma_web/components/Tabs/horizontal/HorizontalTabs.config.js +3 -3
- package/styled-components/es/examples/plasma_web/components/Tabs/vertical/VerticalTabs.config.js +1 -1
- package/types/components/Dropdown/ui/DropdownDivider/DropdownDivider.d.ts.map +1 -1
- package/types/components/Dropdown/ui/DropdownFooter/DropdownFooter.d.ts.map +1 -1
- package/types/components/Dropdown/ui/DropdownGroup/DropdownGroup.d.ts.map +1 -1
- package/types/components/Dropdown/ui/DropdownHeader/DropdownHeader.d.ts.map +1 -1
- package/types/components/Dropdown/ui/DropdownOld/DropdownOld.d.ts.map +1 -1
- package/types/components/Popover/Popover.d.ts.map +1 -1
- package/types/components/Tabs/TabItem.types.d.ts +50 -8
- package/types/components/Tabs/TabItem.types.d.ts.map +1 -1
- package/types/components/Tabs/Tabs.types.d.ts +44 -2
- package/types/components/Tabs/Tabs.types.d.ts.map +1 -1
- package/types/components/Tabs/createTabsController.d.ts +2 -2
- package/types/components/Tabs/createTabsController.d.ts.map +1 -1
- package/types/components/Tabs/index.d.ts +2 -2
- package/types/components/Tabs/index.d.ts.map +1 -1
- package/types/components/Tabs/tokens.d.ts +2 -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/HorizontalTabs/HorizontalTabs.d.ts +2 -2
- package/types/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.d.ts.map +1 -1
- package/types/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.styles.d.ts.map +1 -1
- package/types/components/Tabs/ui/horizontal/HorizontalTabs/variations/_view/base.d.ts.map +1 -1
- package/types/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.styles.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Tabs/TabItem.d.ts +21 -6
- package/types/examples/plasma_b2c/components/Tabs/TabItem.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Tabs/Tabs.d.ts +2 -2
- package/types/examples/plasma_b2c/components/Tabs/Tabs.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabs.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Tabs/vertical/VerticalTabs.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Tabs/TabItem.d.ts +21 -6
- package/types/examples/plasma_web/components/Tabs/TabItem.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Tabs/Tabs.d.ts +2 -2
- package/types/examples/plasma_web/components/Tabs/Tabs.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Tabs/horizontal/HorizontalTabs.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Tabs/vertical/VerticalTabs.config.d.ts.map +1 -1
@@ -26,8 +26,8 @@ var config = exports.config = {
|
|
26
26
|
h5: /*#__PURE__*/(0, _styledComponents.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);"], _Tabs.tabsTokens.itemBorderRadius, _Tabs.tabsTokens.itemWidth, _Tabs.tabsTokens.itemHeight, _Tabs.tabsTokens.itemPadding, _Tabs.tabsTokens.itemMarginLeft, _Tabs.tabsTokens.itemContentGap, _Tabs.tabsTokens.fontFamily, _Tabs.tabsTokens.fontSize, _Tabs.tabsTokens.fontStyle, _Tabs.tabsTokens.fontWeight, _Tabs.tabsTokens.letterSpacing, _Tabs.tabsTokens.lineHeight),
|
27
27
|
h4: /*#__PURE__*/(0, _styledComponents.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);"], _Tabs.tabsTokens.itemBorderRadius, _Tabs.tabsTokens.itemWidth, _Tabs.tabsTokens.itemHeight, _Tabs.tabsTokens.itemPadding, _Tabs.tabsTokens.itemMarginLeft, _Tabs.tabsTokens.itemContentGap, _Tabs.tabsTokens.fontFamily, _Tabs.tabsTokens.fontSize, _Tabs.tabsTokens.fontStyle, _Tabs.tabsTokens.fontWeight, _Tabs.tabsTokens.letterSpacing, _Tabs.tabsTokens.lineHeight),
|
28
28
|
h3: /*#__PURE__*/(0, _styledComponents.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);"], _Tabs.tabsTokens.itemBorderRadius, _Tabs.tabsTokens.itemWidth, _Tabs.tabsTokens.itemHeight, _Tabs.tabsTokens.itemPadding, _Tabs.tabsTokens.itemMarginLeft, _Tabs.tabsTokens.itemContentGap, _Tabs.tabsTokens.fontFamily, _Tabs.tabsTokens.fontSize, _Tabs.tabsTokens.fontStyle, _Tabs.tabsTokens.fontWeight, _Tabs.tabsTokens.letterSpacing, _Tabs.tabsTokens.lineHeight),
|
29
|
-
h2: /*#__PURE__*/(0, _styledComponents.css)(["", ":0.625rem;", ":auto;", ":4.5rem;", ":0rem;", ":2.5rem;", ":
|
30
|
-
h1: /*#__PURE__*/(0, _styledComponents.css)(["", ":0.75rem;", ":auto;", ":5.75rem;", ":0rem;", ":3.5rem;", ":
|
29
|
+
h2: /*#__PURE__*/(0, _styledComponents.css)(["", ":0.625rem;", ":auto;", ":4.5rem;", ":0rem;", ":2.5rem;", ":0.875rem;", ":var(--plasma-typo-h2-font-family);", ":var(--plasma-typo-h2-font-size);", ":var(--plasma-typo-h2-font-style);", ":var(--plasma-typo-h2-font-weight);", ":var(--plasma-typo-h2-letter-spacing);", ":var(--plasma-typo-h2-line-height);"], _Tabs.tabsTokens.itemBorderRadius, _Tabs.tabsTokens.itemWidth, _Tabs.tabsTokens.itemHeight, _Tabs.tabsTokens.itemPadding, _Tabs.tabsTokens.itemMarginLeft, _Tabs.tabsTokens.itemContentGap, _Tabs.tabsTokens.fontFamily, _Tabs.tabsTokens.fontSize, _Tabs.tabsTokens.fontStyle, _Tabs.tabsTokens.fontWeight, _Tabs.tabsTokens.letterSpacing, _Tabs.tabsTokens.lineHeight),
|
30
|
+
h1: /*#__PURE__*/(0, _styledComponents.css)(["", ":0.75rem;", ":auto;", ":5.75rem;", ":0rem;", ":3.5rem;", ":1rem;", ":var(--plasma-typo-h1-font-family);", ":var(--plasma-typo-h1-font-size);", ":var(--plasma-typo-h1-font-style);", ":var(--plasma-typo-h1-font-weight);", ":var(--plasma-typo-h1-letter-spacing);", ":var(--plasma-typo-h1-line-height);"], _Tabs.tabsTokens.itemBorderRadius, _Tabs.tabsTokens.itemWidth, _Tabs.tabsTokens.itemHeight, _Tabs.tabsTokens.itemPadding, _Tabs.tabsTokens.itemMarginLeft, _Tabs.tabsTokens.itemContentGap, _Tabs.tabsTokens.fontFamily, _Tabs.tabsTokens.fontSize, _Tabs.tabsTokens.fontStyle, _Tabs.tabsTokens.fontWeight, _Tabs.tabsTokens.letterSpacing, _Tabs.tabsTokens.lineHeight)
|
31
31
|
},
|
32
32
|
disabled: {
|
33
33
|
"true": /*#__PURE__*/(0, _styledComponents.css)(["", ":0.4;"], _Tabs.tabsTokens.disabledOpacity)
|
@@ -13,9 +13,9 @@ var config = exports.config = {
|
|
13
13
|
},
|
14
14
|
variations: {
|
15
15
|
view: {
|
16
|
-
clear: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-secondary);", ":transparent;", ":var(--surface-accent);", ":0rem;", ":transparent;", ":0rem;"], _Tabs.tabsTokens.arrowColor, _Tabs.tabsTokens.tabsBackgroundColor, _Tabs.tabsTokens.outlineFocusColor, _Tabs.tabsTokens.tabsDividerHeight, _Tabs.tabsTokens.tabsDividerColor, _Tabs.tabsTokens.tabsDividerBorderRadius),
|
17
|
-
filled: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-secondary);", ":var(--surface-transparent-primary);", ":var(--surface-accent);", ":0rem;", ":transparent;", ":0rem;"], _Tabs.tabsTokens.arrowColor, _Tabs.tabsTokens.tabsBackgroundColor, _Tabs.tabsTokens.outlineFocusColor, _Tabs.tabsTokens.tabsDividerHeight, _Tabs.tabsTokens.tabsDividerColor, _Tabs.tabsTokens.tabsDividerBorderRadius),
|
18
|
-
divider: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-secondary);", ":transparent;", ":var(--surface-accent);", ":0.0625rem;", ":var(--surface-transparent-tertiary);", ":0.0625rem;"], _Tabs.tabsTokens.arrowColor, _Tabs.tabsTokens.tabsBackgroundColor, _Tabs.tabsTokens.outlineFocusColor, _Tabs.tabsTokens.tabsDividerHeight, _Tabs.tabsTokens.tabsDividerColor, _Tabs.tabsTokens.tabsDividerBorderRadius)
|
16
|
+
clear: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-secondary);", ":var(--text-secondary-hover);", ":var(---text-secondary-active);", ":transparent;", ":var(--surface-accent);", ":0rem;", ":transparent;", ":0rem;"], _Tabs.tabsTokens.arrowColor, _Tabs.tabsTokens.arrowColorHover, _Tabs.tabsTokens.arrowColorActive, _Tabs.tabsTokens.tabsBackgroundColor, _Tabs.tabsTokens.outlineFocusColor, _Tabs.tabsTokens.tabsDividerHeight, _Tabs.tabsTokens.tabsDividerColor, _Tabs.tabsTokens.tabsDividerBorderRadius),
|
17
|
+
filled: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-secondary);", ":var(--text-secondary-hover);", ":var(---text-secondary-active);", ":var(--surface-transparent-primary);", ":var(--surface-accent);", ":0rem;", ":transparent;", ":0rem;"], _Tabs.tabsTokens.arrowColor, _Tabs.tabsTokens.arrowColorHover, _Tabs.tabsTokens.arrowColorActive, _Tabs.tabsTokens.tabsBackgroundColor, _Tabs.tabsTokens.outlineFocusColor, _Tabs.tabsTokens.tabsDividerHeight, _Tabs.tabsTokens.tabsDividerColor, _Tabs.tabsTokens.tabsDividerBorderRadius),
|
18
|
+
divider: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-secondary);", ":var(--text-secondary-hover);", ":var(---text-secondary-active);", ":transparent;", ":var(--surface-accent);", ":0.0625rem;", ":var(--surface-transparent-tertiary);", ":0.0625rem;"], _Tabs.tabsTokens.arrowColor, _Tabs.tabsTokens.arrowColorHover, _Tabs.tabsTokens.arrowColorActive, _Tabs.tabsTokens.tabsBackgroundColor, _Tabs.tabsTokens.outlineFocusColor, _Tabs.tabsTokens.tabsDividerHeight, _Tabs.tabsTokens.tabsDividerColor, _Tabs.tabsTokens.tabsDividerBorderRadius)
|
19
19
|
},
|
20
20
|
size: {
|
21
21
|
xs: /*#__PURE__*/(0, _styledComponents.css)(["", ":0.5rem;", ":fit-content;", ":auto;", ":0rem;", ":0.125rem;"], _Tabs.tabsTokens.tabsBorderRadius, _Tabs.tabsTokens.tabsWidth, _Tabs.tabsTokens.tabsHeight, _Tabs.tabsTokens.arrowInnerPadding, _Tabs.tabsTokens.arrowOuterPadding),
|
package/styled-components/cjs/examples/plasma_b2c/components/Tabs/vertical/VerticalTabs.config.js
CHANGED
@@ -13,7 +13,7 @@ var config = exports.config = {
|
|
13
13
|
},
|
14
14
|
variations: {
|
15
15
|
view: {
|
16
|
-
divider: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-secondary);", ":transparent;", ":var(--surface-accent);", ":0.0625rem;", ":0.0625rem;", ":var(--surface-transparent-tertiary);", ":0.0625rem;"], _Tabs.tabsTokens.arrowColor, _Tabs.tabsTokens.tabsBackgroundColor, _Tabs.tabsTokens.outlineFocusColor, _Tabs.tabsTokens.tabsDividerWidth, _Tabs.tabsTokens.tabsDividerHeight, _Tabs.tabsTokens.tabsDividerColor, _Tabs.tabsTokens.tabsDividerBorderRadius)
|
16
|
+
divider: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-secondary);", ":var(--text-secondary-hover);", ":var(---text-secondary-active);", ":transparent;", ":var(--surface-accent);", ":0.0625rem;", ":0.0625rem;", ":var(--surface-transparent-tertiary);", ":0.0625rem;"], _Tabs.tabsTokens.arrowColor, _Tabs.tabsTokens.arrowColorHover, _Tabs.tabsTokens.arrowColorActive, _Tabs.tabsTokens.tabsBackgroundColor, _Tabs.tabsTokens.outlineFocusColor, _Tabs.tabsTokens.tabsDividerWidth, _Tabs.tabsTokens.tabsDividerHeight, _Tabs.tabsTokens.tabsDividerColor, _Tabs.tabsTokens.tabsDividerBorderRadius)
|
17
17
|
},
|
18
18
|
size: {
|
19
19
|
xs: /*#__PURE__*/(0, _styledComponents.css)(["", ":0.5rem;", ":fit-content;", ":auto;", ":0rem;", ":0.125rem;"], _Tabs.tabsTokens.tabsBorderRadius, _Tabs.tabsTokens.tabsWidth, _Tabs.tabsTokens.tabsHeight, _Tabs.tabsTokens.arrowInnerPadding, _Tabs.tabsTokens.arrowOuterPadding),
|
@@ -12,6 +12,7 @@ import { Tabs } from './Tabs';
|
|
12
12
|
import { TabItem } from './TabItem';
|
13
13
|
|
14
14
|
const clips = ['none', 'scroll', 'showAll'];
|
15
|
+
const headerClips = ['none', 'scroll'];
|
15
16
|
const sizes = ['xs', 's', 'm', 'l'] as const;
|
16
17
|
const headerSizes = ['h5', 'h4', 'h3', 'h2', 'h1'] as const;
|
17
18
|
|
@@ -20,7 +21,6 @@ type HeaderSize = typeof headerSizes[number];
|
|
20
21
|
|
21
22
|
type CustomStoryTabsProps = {
|
22
23
|
itemQuantity: number;
|
23
|
-
hasDivider: boolean;
|
24
24
|
contentLeft: string;
|
25
25
|
contentRight: string;
|
26
26
|
stretch: boolean;
|
@@ -30,12 +30,12 @@ type CustomStoryTabsProps = {
|
|
30
30
|
const contentLeftOptions = ['none', 'icon'];
|
31
31
|
const contentRightOptions = ['none', 'counter', 'icon'];
|
32
32
|
|
33
|
-
const getContentLeft = (contentLeftOption: string, size:
|
33
|
+
const getContentLeft = (contentLeftOption: string, size: string) => {
|
34
34
|
const iconSize = size === 'xs' ? 'xs' : 's';
|
35
35
|
return contentLeftOption === 'icon' ? <IconMic size={iconSize} color="inherit" /> : undefined;
|
36
36
|
};
|
37
37
|
|
38
|
-
const getContentRight = (contentRightOption: string, size:
|
38
|
+
const getContentRight = (contentRightOption: string, size: string) => {
|
39
39
|
const iconSize = size === 'xs' ? 'xs' : 's';
|
40
40
|
const counterSize = size === 'xs' ? 'xxs' : 'xs';
|
41
41
|
|
@@ -96,7 +96,7 @@ const StoryHorizontalDefault = (props: HorizontalStoryTabsProps) => {
|
|
96
96
|
const [index, setIndex] = useState(0);
|
97
97
|
|
98
98
|
return (
|
99
|
-
<Tabs view={hasDivider
|
99
|
+
<Tabs view="divider" hasDivider={hasDivider} stretch={stretch} disabled={disabled} size={size}>
|
100
100
|
{items.map((_, i) => {
|
101
101
|
if (helperText !== '') {
|
102
102
|
return (
|
@@ -152,7 +152,7 @@ const StoryHorizontalScroll = (props: HorizontalStoryTabsProps) => {
|
|
152
152
|
const [index, setIndex] = useState(0);
|
153
153
|
|
154
154
|
return (
|
155
|
-
<Tabs clip={clip} view={hasDivider
|
155
|
+
<Tabs clip={clip} view="divider" hasDivider={hasDivider} disabled={disabled} size={size} style={{ width }}>
|
156
156
|
{items.map((_, i) => {
|
157
157
|
if (helperText !== '') {
|
158
158
|
return (
|
@@ -220,7 +220,7 @@ const StoryHorizontalShowAll = (props: HorizontalStoryTabsProps) => {
|
|
220
220
|
});
|
221
221
|
|
222
222
|
return (
|
223
|
-
<Tabs clip={clip} view={hasDivider
|
223
|
+
<Tabs clip={clip} view="divider" hasDivider={hasDivider} disabled={disabled} size={size}>
|
224
224
|
{visibleItems.map((_, i) => {
|
225
225
|
if (helperText !== '') {
|
226
226
|
return (
|
@@ -603,31 +603,47 @@ export const VerticalTabs: StoryObj<VerticalStoryTabsProps> = {
|
|
603
603
|
},
|
604
604
|
};
|
605
605
|
|
606
|
-
const
|
607
|
-
const {
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
606
|
+
const StoryHeaderDefault = (props: HorizontalStoryTabsProps) => {
|
607
|
+
const { disabled, itemQuantity, size, helperText } = props;
|
608
|
+
const items = Array(itemQuantity).fill(0);
|
609
|
+
const [index, setIndex] = useState(0);
|
610
|
+
|
611
|
+
return (
|
612
|
+
<Tabs view="clear" disabled={disabled} size={size as HeaderSize}>
|
613
|
+
{items.map((_, i) => (
|
614
|
+
<TabItem
|
615
|
+
key={`item:${i}`}
|
616
|
+
view="clear"
|
617
|
+
selected={i === index}
|
618
|
+
onClick={() => !disabled && setIndex(i)}
|
619
|
+
tabIndex={!disabled ? 0 : -1}
|
620
|
+
disabled={disabled}
|
621
|
+
value={helperText}
|
622
|
+
size={size as HeaderSize}
|
623
|
+
>
|
624
|
+
{`Label${i + 1}`}
|
625
|
+
</TabItem>
|
626
|
+
))}
|
627
|
+
</Tabs>
|
628
|
+
);
|
629
|
+
};
|
630
|
+
|
631
|
+
const StoryHeaderScroll = (props: HorizontalStoryTabsProps) => {
|
632
|
+
const { disabled, itemQuantity, size, helperText, width } = props;
|
616
633
|
const items = Array(itemQuantity).fill(0);
|
617
634
|
const [index, setIndex] = useState(0);
|
618
635
|
|
619
636
|
return (
|
620
|
-
<Tabs view=
|
637
|
+
<Tabs view="clear" disabled={disabled} size={size as HeaderSize} style={{ width }}>
|
621
638
|
{items.map((_, i) => (
|
622
639
|
<TabItem
|
623
640
|
key={`item:${i}`}
|
624
|
-
view="
|
641
|
+
view="clear"
|
625
642
|
selected={i === index}
|
626
643
|
onClick={() => !disabled && setIndex(i)}
|
627
644
|
tabIndex={!disabled ? 0 : -1}
|
628
645
|
disabled={disabled}
|
629
|
-
|
630
|
-
contentRight={getContentRight(contentRightOption, size as Size)}
|
646
|
+
value={helperText}
|
631
647
|
size={size as HeaderSize}
|
632
648
|
>
|
633
649
|
{`Label${i + 1}`}
|
@@ -637,37 +653,60 @@ const StoryHeaderTabs = (props: StoryTabsProps) => {
|
|
637
653
|
);
|
638
654
|
};
|
639
655
|
|
640
|
-
export const HeaderTabs: StoryObj<
|
656
|
+
export const HeaderTabs: StoryObj<HorizontalStoryTabsProps> = {
|
641
657
|
args: {
|
642
658
|
size: 'h5',
|
643
659
|
disabled: false,
|
644
|
-
|
645
|
-
itemQuantity:
|
660
|
+
helperText: '',
|
661
|
+
itemQuantity: 6,
|
662
|
+
width: '12rem',
|
646
663
|
},
|
647
664
|
argTypes: {
|
648
|
-
|
649
|
-
options:
|
665
|
+
clip: {
|
666
|
+
options: headerClips,
|
650
667
|
control: {
|
651
668
|
type: 'select',
|
652
669
|
},
|
653
670
|
},
|
654
|
-
|
655
|
-
options: contentLeftOptions,
|
671
|
+
width: {
|
656
672
|
control: {
|
657
|
-
type: '
|
673
|
+
type: 'text',
|
674
|
+
},
|
675
|
+
if: { arg: 'clip', eq: 'scroll' },
|
676
|
+
},
|
677
|
+
stretch: {
|
678
|
+
table: {
|
679
|
+
disable: true,
|
680
|
+
},
|
681
|
+
},
|
682
|
+
contentLeft: {
|
683
|
+
table: {
|
684
|
+
disable: true,
|
658
685
|
},
|
659
686
|
},
|
660
687
|
contentRight: {
|
661
|
-
|
662
|
-
|
663
|
-
type: 'select',
|
688
|
+
table: {
|
689
|
+
disable: true,
|
664
690
|
},
|
665
691
|
},
|
666
|
-
|
692
|
+
hasDivider: {
|
667
693
|
table: {
|
668
694
|
disable: true,
|
669
695
|
},
|
670
696
|
},
|
697
|
+
size: {
|
698
|
+
options: headerSizes,
|
699
|
+
control: {
|
700
|
+
type: 'select',
|
701
|
+
},
|
702
|
+
},
|
703
|
+
},
|
704
|
+
render: (args) => {
|
705
|
+
switch (args.clip) {
|
706
|
+
case 'scroll':
|
707
|
+
return <StoryHeaderScroll {...args} />;
|
708
|
+
default:
|
709
|
+
return <StoryHeaderDefault {...args} />;
|
710
|
+
}
|
671
711
|
},
|
672
|
-
render: (args) => <StoryHeaderTabs {...args} />,
|
673
712
|
};
|
@@ -26,8 +26,8 @@ var config = exports.config = {
|
|
26
26
|
h5: /*#__PURE__*/(0, _styledComponents.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);"], _Tabs.tabsTokens.itemBorderRadius, _Tabs.tabsTokens.itemWidth, _Tabs.tabsTokens.itemHeight, _Tabs.tabsTokens.itemPadding, _Tabs.tabsTokens.itemMarginLeft, _Tabs.tabsTokens.itemContentGap, _Tabs.tabsTokens.fontFamily, _Tabs.tabsTokens.fontSize, _Tabs.tabsTokens.fontStyle, _Tabs.tabsTokens.fontWeight, _Tabs.tabsTokens.letterSpacing, _Tabs.tabsTokens.lineHeight),
|
27
27
|
h4: /*#__PURE__*/(0, _styledComponents.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);"], _Tabs.tabsTokens.itemBorderRadius, _Tabs.tabsTokens.itemWidth, _Tabs.tabsTokens.itemHeight, _Tabs.tabsTokens.itemPadding, _Tabs.tabsTokens.itemMarginLeft, _Tabs.tabsTokens.itemContentGap, _Tabs.tabsTokens.fontFamily, _Tabs.tabsTokens.fontSize, _Tabs.tabsTokens.fontStyle, _Tabs.tabsTokens.fontWeight, _Tabs.tabsTokens.letterSpacing, _Tabs.tabsTokens.lineHeight),
|
28
28
|
h3: /*#__PURE__*/(0, _styledComponents.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);"], _Tabs.tabsTokens.itemBorderRadius, _Tabs.tabsTokens.itemWidth, _Tabs.tabsTokens.itemHeight, _Tabs.tabsTokens.itemPadding, _Tabs.tabsTokens.itemMarginLeft, _Tabs.tabsTokens.itemContentGap, _Tabs.tabsTokens.fontFamily, _Tabs.tabsTokens.fontSize, _Tabs.tabsTokens.fontStyle, _Tabs.tabsTokens.fontWeight, _Tabs.tabsTokens.letterSpacing, _Tabs.tabsTokens.lineHeight),
|
29
|
-
h2: /*#__PURE__*/(0, _styledComponents.css)(["", ":0.625rem;", ":auto;", ":4.5rem;", ":0rem;", ":2.5rem;", ":
|
30
|
-
h1: /*#__PURE__*/(0, _styledComponents.css)(["", ":0.75rem;", ":auto;", ":5.75rem;", ":0rem;", ":3.5rem;", ":
|
29
|
+
h2: /*#__PURE__*/(0, _styledComponents.css)(["", ":0.625rem;", ":auto;", ":4.5rem;", ":0rem;", ":2.5rem;", ":0.875rem;", ":var(--plasma-typo-h2-font-family);", ":var(--plasma-typo-h2-font-size);", ":var(--plasma-typo-h2-font-style);", ":var(--plasma-typo-h2-font-weight);", ":var(--plasma-typo-h2-letter-spacing);", ":var(--plasma-typo-h2-line-height);"], _Tabs.tabsTokens.itemBorderRadius, _Tabs.tabsTokens.itemWidth, _Tabs.tabsTokens.itemHeight, _Tabs.tabsTokens.itemPadding, _Tabs.tabsTokens.itemMarginLeft, _Tabs.tabsTokens.itemContentGap, _Tabs.tabsTokens.fontFamily, _Tabs.tabsTokens.fontSize, _Tabs.tabsTokens.fontStyle, _Tabs.tabsTokens.fontWeight, _Tabs.tabsTokens.letterSpacing, _Tabs.tabsTokens.lineHeight),
|
30
|
+
h1: /*#__PURE__*/(0, _styledComponents.css)(["", ":0.75rem;", ":auto;", ":5.75rem;", ":0rem;", ":3.5rem;", ":1rem;", ":var(--plasma-typo-h1-font-family);", ":var(--plasma-typo-h1-font-size);", ":var(--plasma-typo-h1-font-style);", ":var(--plasma-typo-h1-font-weight);", ":var(--plasma-typo-h1-letter-spacing);", ":var(--plasma-typo-h1-line-height);"], _Tabs.tabsTokens.itemBorderRadius, _Tabs.tabsTokens.itemWidth, _Tabs.tabsTokens.itemHeight, _Tabs.tabsTokens.itemPadding, _Tabs.tabsTokens.itemMarginLeft, _Tabs.tabsTokens.itemContentGap, _Tabs.tabsTokens.fontFamily, _Tabs.tabsTokens.fontSize, _Tabs.tabsTokens.fontStyle, _Tabs.tabsTokens.fontWeight, _Tabs.tabsTokens.letterSpacing, _Tabs.tabsTokens.lineHeight)
|
31
31
|
},
|
32
32
|
disabled: {
|
33
33
|
"true": /*#__PURE__*/(0, _styledComponents.css)(["", ":0.4;"], _Tabs.tabsTokens.disabledOpacity)
|
@@ -13,9 +13,9 @@ var config = exports.config = {
|
|
13
13
|
},
|
14
14
|
variations: {
|
15
15
|
view: {
|
16
|
-
clear: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-secondary);", ":transparent;", ":var(--surface-accent);", ":0rem;", ":transparent;", ":0rem;"], _Tabs.tabsTokens.arrowColor, _Tabs.tabsTokens.tabsBackgroundColor, _Tabs.tabsTokens.outlineFocusColor, _Tabs.tabsTokens.tabsDividerHeight, _Tabs.tabsTokens.tabsDividerColor, _Tabs.tabsTokens.tabsDividerBorderRadius),
|
17
|
-
filled: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-secondary);", ":var(--surface-transparent-primary);", ":var(--surface-accent);", ":0rem;", ":transparent;", ":0rem;"], _Tabs.tabsTokens.arrowColor, _Tabs.tabsTokens.tabsBackgroundColor, _Tabs.tabsTokens.outlineFocusColor, _Tabs.tabsTokens.tabsDividerHeight, _Tabs.tabsTokens.tabsDividerColor, _Tabs.tabsTokens.tabsDividerBorderRadius),
|
18
|
-
divider: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-secondary);", ":transparent;", ":var(--surface-accent);", ":0.0625rem;", ":var(--surface-transparent-tertiary);", ":0.0625rem;"], _Tabs.tabsTokens.arrowColor, _Tabs.tabsTokens.tabsBackgroundColor, _Tabs.tabsTokens.outlineFocusColor, _Tabs.tabsTokens.tabsDividerHeight, _Tabs.tabsTokens.tabsDividerColor, _Tabs.tabsTokens.tabsDividerBorderRadius)
|
16
|
+
clear: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-secondary);", ":var(--text-secondary-hover);", ":var(---text-secondary-active);", ":transparent;", ":var(--surface-accent);", ":0rem;", ":transparent;", ":0rem;"], _Tabs.tabsTokens.arrowColor, _Tabs.tabsTokens.arrowColorHover, _Tabs.tabsTokens.arrowColorActive, _Tabs.tabsTokens.tabsBackgroundColor, _Tabs.tabsTokens.outlineFocusColor, _Tabs.tabsTokens.tabsDividerHeight, _Tabs.tabsTokens.tabsDividerColor, _Tabs.tabsTokens.tabsDividerBorderRadius),
|
17
|
+
filled: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-secondary);", ":var(--text-secondary-hover);", ":var(---text-secondary-active);", ":var(--surface-transparent-primary);", ":var(--surface-accent);", ":0rem;", ":transparent;", ":0rem;"], _Tabs.tabsTokens.arrowColor, _Tabs.tabsTokens.arrowColorHover, _Tabs.tabsTokens.arrowColorActive, _Tabs.tabsTokens.tabsBackgroundColor, _Tabs.tabsTokens.outlineFocusColor, _Tabs.tabsTokens.tabsDividerHeight, _Tabs.tabsTokens.tabsDividerColor, _Tabs.tabsTokens.tabsDividerBorderRadius),
|
18
|
+
divider: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-secondary);", ":var(--text-secondary-hover);", ":var(---text-secondary-active);", ":transparent;", ":var(--surface-accent);", ":0.0625rem;", ":var(--surface-transparent-tertiary);", ":0.0625rem;"], _Tabs.tabsTokens.arrowColor, _Tabs.tabsTokens.arrowColorHover, _Tabs.tabsTokens.arrowColorActive, _Tabs.tabsTokens.tabsBackgroundColor, _Tabs.tabsTokens.outlineFocusColor, _Tabs.tabsTokens.tabsDividerHeight, _Tabs.tabsTokens.tabsDividerColor, _Tabs.tabsTokens.tabsDividerBorderRadius)
|
19
19
|
},
|
20
20
|
size: {
|
21
21
|
xs: /*#__PURE__*/(0, _styledComponents.css)(["", ":0.5rem;", ":fit-content;", ":auto;", ":0rem;", ":0.125rem;"], _Tabs.tabsTokens.tabsBorderRadius, _Tabs.tabsTokens.tabsWidth, _Tabs.tabsTokens.tabsHeight, _Tabs.tabsTokens.arrowInnerPadding, _Tabs.tabsTokens.arrowOuterPadding),
|
package/styled-components/cjs/examples/plasma_web/components/Tabs/vertical/VerticalTabs.config.js
CHANGED
@@ -13,7 +13,7 @@ var config = exports.config = {
|
|
13
13
|
},
|
14
14
|
variations: {
|
15
15
|
view: {
|
16
|
-
divider: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-secondary);", ":transparent;", ":var(--surface-accent);", ":0.0625rem;", ":0.0625rem;", ":var(--surface-transparent-tertiary);", ":0.0625rem;"], _Tabs.tabsTokens.arrowColor, _Tabs.tabsTokens.tabsBackgroundColor, _Tabs.tabsTokens.outlineFocusColor, _Tabs.tabsTokens.tabsDividerWidth, _Tabs.tabsTokens.tabsDividerHeight, _Tabs.tabsTokens.tabsDividerColor, _Tabs.tabsTokens.tabsDividerBorderRadius)
|
16
|
+
divider: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-secondary);", ":var(--text-secondary-hover);", ":var(---text-secondary-active);", ":transparent;", ":var(--surface-accent);", ":0.0625rem;", ":0.0625rem;", ":var(--surface-transparent-tertiary);", ":0.0625rem;"], _Tabs.tabsTokens.arrowColor, _Tabs.tabsTokens.arrowColorHover, _Tabs.tabsTokens.arrowColorActive, _Tabs.tabsTokens.tabsBackgroundColor, _Tabs.tabsTokens.outlineFocusColor, _Tabs.tabsTokens.tabsDividerWidth, _Tabs.tabsTokens.tabsDividerHeight, _Tabs.tabsTokens.tabsDividerColor, _Tabs.tabsTokens.tabsDividerBorderRadius)
|
17
17
|
},
|
18
18
|
size: {
|
19
19
|
xs: /*#__PURE__*/(0, _styledComponents.css)(["", ":0.5rem;", ":fit-content;", ":auto;", ":0rem;", ":0.125rem;"], _Tabs.tabsTokens.tabsBorderRadius, _Tabs.tabsTokens.tabsWidth, _Tabs.tabsTokens.tabsHeight, _Tabs.tabsTokens.arrowInnerPadding, _Tabs.tabsTokens.arrowOuterPadding),
|
@@ -3,7 +3,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
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
5
|
import React, { forwardRef } from 'react';
|
6
|
-
import {
|
6
|
+
import { safeUseId } from '../../../../utils';
|
7
7
|
import { base as viewCSS } from './variations/_view/base';
|
8
8
|
import { base as sizeCSS } from './variations/_size/base';
|
9
9
|
import { StyledDropdownDivider } from './DropdownDivider.styles';
|
@@ -17,7 +17,7 @@ export var dropdownDividerRoot = function dropdownDividerRoot(Root) {
|
|
17
17
|
view = _ref.view,
|
18
18
|
size = _ref.size,
|
19
19
|
rest = _objectWithoutProperties(_ref, _excluded);
|
20
|
-
var uniqId =
|
20
|
+
var uniqId = safeUseId();
|
21
21
|
var innerId = id || uniqId;
|
22
22
|
return /*#__PURE__*/React.createElement(Root, {
|
23
23
|
id: innerId,
|
@@ -3,7 +3,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
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
5
|
import React, { forwardRef } from 'react';
|
6
|
-
import {
|
6
|
+
import { safeUseId } from '../../../../utils';
|
7
7
|
import { base as viewCSS } from './variations/_view/base';
|
8
8
|
import { base as sizeCSS } from './variations/_size/base';
|
9
9
|
import { StyledDropdownFooter } from './DropdownFooter.styles';
|
@@ -18,7 +18,7 @@ export var dropdownFooterRoot = function dropdownFooterRoot(Root) {
|
|
18
18
|
view = _ref.view,
|
19
19
|
size = _ref.size,
|
20
20
|
rest = _objectWithoutProperties(_ref, _excluded);
|
21
|
-
var uniqId =
|
21
|
+
var uniqId = safeUseId();
|
22
22
|
var innerId = id || uniqId;
|
23
23
|
return /*#__PURE__*/React.createElement(Root, {
|
24
24
|
id: innerId,
|
@@ -3,7 +3,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
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
5
|
import React, { forwardRef } from 'react';
|
6
|
-
import {
|
6
|
+
import { safeUseId } from '../../../../utils';
|
7
7
|
import { base as viewCSS } from './variations/_view/base';
|
8
8
|
import { base as sizeCSS } from './variations/_size/base';
|
9
9
|
import { StyledDropdownGroup, StyledDropdownLabel } from './DropdownGroup.styles';
|
@@ -21,7 +21,7 @@ export var dropdownGroupRoot = function dropdownGroupRoot(Root) {
|
|
21
21
|
view = _ref.view,
|
22
22
|
size = _ref.size,
|
23
23
|
rest = _objectWithoutProperties(_ref, _excluded);
|
24
|
-
var uniqId =
|
24
|
+
var uniqId = safeUseId();
|
25
25
|
var innerId = id || uniqId;
|
26
26
|
return /*#__PURE__*/React.createElement(Root, {
|
27
27
|
id: innerId,
|
@@ -3,7 +3,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
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
5
|
import React, { forwardRef } from 'react';
|
6
|
-
import {
|
6
|
+
import { safeUseId } from '../../../../utils';
|
7
7
|
import { base as viewCSS } from './variations/_view/base';
|
8
8
|
import { base as sizeCSS } from './variations/_size/base';
|
9
9
|
import { StyledDropdownHeader } from './DropdownHeader.styles';
|
@@ -18,7 +18,7 @@ export var dropdownHeaderRoot = function dropdownHeaderRoot(Root) {
|
|
18
18
|
size = _ref.size,
|
19
19
|
children = _ref.children,
|
20
20
|
rest = _objectWithoutProperties(_ref, _excluded);
|
21
|
-
var uniqId =
|
21
|
+
var uniqId = safeUseId();
|
22
22
|
var innerId = id || uniqId;
|
23
23
|
return /*#__PURE__*/React.createElement(Root, {
|
24
24
|
id: innerId,
|
@@ -3,7 +3,9 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
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
5
|
import React, { forwardRef, useRef } from 'react';
|
6
|
-
import {
|
6
|
+
import { useForkRef } from '@salutejs/plasma-core';
|
7
|
+
import { useFocusTrap } from '../../../../hooks';
|
8
|
+
import { safeUseId } from '../../../../utils';
|
7
9
|
import { base as viewCSS } from './variations/_view/base';
|
8
10
|
import { base as sizeCSS } from './variations/_size/base';
|
9
11
|
import { StyledDropdown, StyledPopover } from './Dropdown.styles';
|
@@ -42,7 +44,7 @@ export var dropdownOldRoot = function dropdownOldRoot(Root) {
|
|
42
44
|
closeOnEsc = _ref$closeOnEsc === void 0 ? false : _ref$closeOnEsc,
|
43
45
|
rest = _objectWithoutProperties(_ref, _excluded);
|
44
46
|
var innerIsOpen = Boolean(isOpen || opened);
|
45
|
-
var uniqId =
|
47
|
+
var uniqId = safeUseId();
|
46
48
|
var innerId = id || uniqId;
|
47
49
|
var rootRef = useRef(null);
|
48
50
|
var dropdownRef = useRef(null);
|
@@ -16,7 +16,8 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
16
16
|
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; }
|
17
17
|
import React, { useRef, useCallback, useEffect, useState, forwardRef } from 'react';
|
18
18
|
import { usePopper } from 'react-popper';
|
19
|
-
import {
|
19
|
+
import { useForkRef } from '@salutejs/plasma-core';
|
20
|
+
import { useFocusTrap } from '../../hooks';
|
20
21
|
import { cx } from '../../utils';
|
21
22
|
import { Portal } from '../Portal';
|
22
23
|
import { base as viewCSS } from './variations/_view/base';
|
@@ -33,6 +33,8 @@ export var tokens = {
|
|
33
33
|
itemSelectedDividerColorHover: '--plasma-tab-item-selected-hover-divider-color',
|
34
34
|
outlineFocusColor: '--plasma-tabs-outline-focus-color',
|
35
35
|
arrowColor: '--plasma-tabs-arrow-color',
|
36
|
+
arrowColorHover: '--plasma-tabs-arrow-color-hover',
|
37
|
+
arrowColorActive: '--plasma-tabs-arrow-color-active',
|
36
38
|
tabsFilledBackgroundColor: '--plasma-tabs-filled-background-color',
|
37
39
|
tabsBackgroundColor: '--plasma-tabs-background-color',
|
38
40
|
tabsBorderRadius: '--plasma-tabs-border-radius',
|
package/styled-components/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js
CHANGED
@@ -92,7 +92,9 @@ export var horizontalTabItemRoot = function horizontalTabItemRoot(Root) {
|
|
92
92
|
disabled: disabled,
|
93
93
|
pilled: pilled,
|
94
94
|
role: role,
|
95
|
-
view: view
|
95
|
+
view: view
|
96
|
+
// TODO: убрать каст any, когда будут удалены deprecated props
|
97
|
+
,
|
96
98
|
size: size,
|
97
99
|
onFocus: onItemFocus,
|
98
100
|
tabIndex: hasKeyNavigation ? navigationTabIndex : tabIndex,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
var _excluded = ["id", "stretch", "disabled", "clip", "size", "view", "children", "pilled", "index", "className"];
|
1
|
+
var _excluded = ["id", "stretch", "disabled", "clip", "size", "view", "children", "pilled", "index", "className", "hasDivider"];
|
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."); }
|
@@ -11,7 +11,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
11
11
|
import React, { forwardRef, useCallback, useMemo, useState, useEffect, useRef } from 'react';
|
12
12
|
import { safeUseId } from '@salutejs/plasma-core';
|
13
13
|
import { IconDisclosureLeft, IconDisclosureRight } from '../../../../_Icon';
|
14
|
-
import { classes
|
14
|
+
import { classes } from '../../../tokens';
|
15
15
|
import { cx } from '../../../../../utils';
|
16
16
|
import { TabItemRefs, TabsContext } from '../../../TabsContext';
|
17
17
|
import { base as sizeCSS } from './variations/_size/base';
|
@@ -26,7 +26,12 @@ var Keys = /*#__PURE__*/function (Keys) {
|
|
26
26
|
Keys[Keys["left"] = 37] = "left";
|
27
27
|
Keys[Keys["right"] = 39] = "right";
|
28
28
|
return Keys;
|
29
|
-
}(Keys || {});
|
29
|
+
}(Keys || {});
|
30
|
+
var getIconSize = function getIconSize(size) {
|
31
|
+
return size === 'h1' || size === 'h2' ? 'm' : 's';
|
32
|
+
};
|
33
|
+
|
34
|
+
// TODO: https://github.com/salute-developers/plasma/issues/1474
|
30
35
|
export var horizontalTabsRoot = function horizontalTabsRoot(Root) {
|
31
36
|
return /*#__PURE__*/forwardRef(function (props, outerRef) {
|
32
37
|
var id = props.id,
|
@@ -43,6 +48,8 @@ export var horizontalTabsRoot = function horizontalTabsRoot(Root) {
|
|
43
48
|
pilled = _props$pilled === void 0 ? false : _props$pilled,
|
44
49
|
index = props.index,
|
45
50
|
className = props.className,
|
51
|
+
_props$hasDivider = props.hasDivider,
|
52
|
+
hasDivider = _props$hasDivider === void 0 ? true : _props$hasDivider,
|
46
53
|
rest = _objectWithoutProperties(props, _excluded);
|
47
54
|
var _useState = useState(true),
|
48
55
|
_useState2 = _slicedToArray(_useState, 2),
|
@@ -60,6 +67,7 @@ export var horizontalTabsRoot = function horizontalTabsRoot(Root) {
|
|
60
67
|
var isFilled = view === 'filled'; // outer padding is only for filled view
|
61
68
|
var pilledAttr = view !== 'clear' && pilled;
|
62
69
|
var pilledClass = pilledAttr ? classes.tabsPilled : undefined;
|
70
|
+
var noDividerClass = !hasDivider ? classes.tabsNoDivider : undefined;
|
63
71
|
var stretchClass = firstItemVisible && lastItemVisible && stretch ? classes.tabsStretch : undefined;
|
64
72
|
var hasLeftArrowClass = !firstItemVisible ? classes.tabsHasLeftArrow : undefined;
|
65
73
|
var hasRightArrowClass = !lastItemVisible ? classes.tabsHasRightArrow : undefined;
|
@@ -115,9 +123,10 @@ export var horizontalTabsRoot = function horizontalTabsRoot(Root) {
|
|
115
123
|
ref: leftArrowRef,
|
116
124
|
isLeftArrow: true
|
117
125
|
}, /*#__PURE__*/React.createElement(IconDisclosureLeft, {
|
118
|
-
|
126
|
+
size: getIconSize(size),
|
127
|
+
color: "inherit"
|
119
128
|
}));
|
120
|
-
}, [onPrev, disabled, isFilled]);
|
129
|
+
}, [onPrev, size, disabled, isFilled]);
|
121
130
|
var NextButton = useMemo(function () {
|
122
131
|
return /*#__PURE__*/React.createElement(StyledArrow, {
|
123
132
|
type: "button",
|
@@ -127,9 +136,10 @@ export var horizontalTabsRoot = function horizontalTabsRoot(Root) {
|
|
127
136
|
disabled: disabled,
|
128
137
|
isFilled: isFilled
|
129
138
|
}, /*#__PURE__*/React.createElement(IconDisclosureRight, {
|
130
|
-
|
139
|
+
size: getIconSize(size),
|
140
|
+
color: "inherit"
|
131
141
|
}));
|
132
|
-
}, [onNext, disabled, isFilled]);
|
142
|
+
}, [onNext, size, disabled, isFilled]);
|
133
143
|
var handleScroll = useCallback(function (event) {
|
134
144
|
event.stopPropagation();
|
135
145
|
var maxScrollLeft = event.currentTarget.scrollWidth - event.currentTarget.clientWidth;
|
@@ -189,13 +199,15 @@ export var horizontalTabsRoot = function horizontalTabsRoot(Root) {
|
|
189
199
|
value: refs
|
190
200
|
}, /*#__PURE__*/React.createElement(Root, _extends({
|
191
201
|
view: view,
|
192
|
-
role: "tablist"
|
202
|
+
role: "tablist"
|
203
|
+
// TODO: убрать каст any, когда будут удалены deprecated props
|
204
|
+
,
|
193
205
|
size: size,
|
194
206
|
pilled: pilled,
|
195
207
|
id: tabsId,
|
196
208
|
ref: outerRef,
|
197
209
|
disabled: disabled,
|
198
|
-
className: cx(pilledClass, stretchClass, hasLeftArrowClass, hasRightArrowClass, className),
|
210
|
+
className: cx(pilledClass, stretchClass, hasLeftArrowClass, hasRightArrowClass, noDividerClass, className),
|
199
211
|
onKeyDown: onKeyDown
|
200
212
|
}, rest), !firstItemVisible && PreviousButton, /*#__PURE__*/React.createElement(StyledContentWrapper, {
|
201
213
|
className: cx(clipScrollClass, clipShowAllClass),
|
package/styled-components/es/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.styles.js
CHANGED
@@ -13,7 +13,7 @@ export var StyledContentWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
13
13
|
})(["margin:-0.125rem;padding:0.25rem;box-sizing:content-box;position:relative;height:100%;width:100%;display:flex;align-items:center;z-index:1;&.", "{overflow:scroll;scroll-padding:0.25rem;overscroll-behavior:contain;scrollbar-width:none;::-webkit-scrollbar{display:none;}}&.", "{overflow:visible;}"], classes.tabsClipScroll, classes.tabsClipShowAll);
|
14
14
|
export var StyledArrow = /*#__PURE__*/styled.button.withConfig({
|
15
15
|
componentId: "plasma-new-hope__sc-1nr0m0h-2"
|
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({
|
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:", ";color:var(", ");&:hover{color:var(", ");}&:active{color:var(", ");}"], /*#__PURE__*/addFocus({
|
17
17
|
outlineSize: '0.063rem',
|
18
18
|
outlineOffset: '-0.125rem',
|
19
19
|
outlineColor: /*#__PURE__*/"var(".concat(tokens.outlineFocusColor, ")"),
|
@@ -27,4 +27,4 @@ export var StyledArrow = /*#__PURE__*/styled.button.withConfig({
|
|
27
27
|
}, function (_ref3) {
|
28
28
|
var isLeftArrow = _ref3.isLeftArrow;
|
29
29
|
return isLeftArrow ? 'var(--plasma_private-outer-padding)' : "var(".concat(tokens.arrowInnerPadding, ")");
|
30
|
-
});
|
30
|
+
}, tokens.arrowColor, tokens.arrowColorHover, tokens.arrowColorActive);
|
package/styled-components/es/components/Tabs/ui/horizontal/HorizontalTabs/variations/_view/base.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
import { css } from 'styled-components';
|
2
2
|
import { classes, tokens } from '../../../../../tokens';
|
3
|
-
export var base = /*#__PURE__*/css(["background-color:var(", ");&::after{content:'';position:absolute;bottom:0.125rem;left:0.125rem;right:0.125rem;background:var(", ");height:var(", ");border-radius:var(", ");}&.", "{&::after{left:1.5rem;}}&.", "{&::after{right:1.5rem;}}"], tokens.tabsBackgroundColor, tokens.tabsDividerColor, tokens.tabsDividerHeight, tokens.tabsDividerBorderRadius, classes.tabsHasLeftArrow, classes.tabsHasRightArrow);
|
3
|
+
export var base = /*#__PURE__*/css(["background-color:var(", ");&::after{content:'';position:absolute;bottom:0.125rem;left:0.125rem;right:0.125rem;background:var(", ");height:var(", ");border-radius:var(", ");}&.", "{&::after{left:1.5rem;}}&.", "{&::after{right:1.5rem;}}&.", "{&::after{height:0;}}"], tokens.tabsBackgroundColor, tokens.tabsDividerColor, tokens.tabsDividerHeight, tokens.tabsDividerBorderRadius, classes.tabsHasLeftArrow, classes.tabsHasRightArrow, classes.tabsNoDivider);
|
@@ -1,3 +1,4 @@
|
|
1
|
+
var _IconDisclosureLeft, _IconDisclosureRight;
|
1
2
|
var _excluded = ["id", "disabled", "clip", "size", "view", "children", "index", "className", "orientation", "hasDivider"];
|
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); }
|
3
4
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
@@ -10,7 +11,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
10
11
|
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
12
|
import React, { forwardRef, useCallback, useMemo, useState, useEffect, useRef } from 'react';
|
12
13
|
import { safeUseId } from '@salutejs/plasma-core';
|
13
|
-
import { classes
|
14
|
+
import { classes } from '../../../tokens';
|
14
15
|
import { cx } from '../../../../../utils';
|
15
16
|
import { TabItemRefs, TabsContext } from '../../../TabsContext';
|
16
17
|
import { IconDisclosureLeft, IconDisclosureRight } from '../../../../_Icon';
|
@@ -105,18 +106,18 @@ export var verticalTabsRoot = function verticalTabsRoot(Root) {
|
|
105
106
|
tabIndex: disabled ? -1 : 0,
|
106
107
|
disabled: disabled,
|
107
108
|
ref: upArrowRef
|
108
|
-
}, /*#__PURE__*/React.createElement(IconDisclosureLeft, {
|
109
|
-
color: "
|
110
|
-
}));
|
109
|
+
}, _IconDisclosureLeft || (_IconDisclosureLeft = /*#__PURE__*/React.createElement(IconDisclosureLeft, {
|
110
|
+
color: "inherit"
|
111
|
+
})));
|
111
112
|
var NextButton = /*#__PURE__*/React.createElement(StyledArrow, {
|
112
113
|
type: "button",
|
113
114
|
"aria-label": "\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439 \u0442\u0430\u0431",
|
114
115
|
onClick: onNext,
|
115
116
|
tabIndex: disabled ? -1 : 0,
|
116
117
|
disabled: disabled
|
117
|
-
}, /*#__PURE__*/React.createElement(IconDisclosureRight, {
|
118
|
-
color: "
|
119
|
-
}));
|
118
|
+
}, _IconDisclosureRight || (_IconDisclosureRight = /*#__PURE__*/React.createElement(IconDisclosureRight, {
|
119
|
+
color: "inherit"
|
120
|
+
})));
|
120
121
|
var handleScroll = useCallback(function (event) {
|
121
122
|
event.stopPropagation();
|
122
123
|
var maxScrollTop = event.currentTarget.scrollHeight - event.currentTarget.clientHeight;
|
package/styled-components/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.styles.js
CHANGED
@@ -13,9 +13,9 @@ export var StyledContentWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
13
13
|
})(["margin:-0.125rem;padding:0.25rem;box-sizing:content-box;position:relative;height:100%;width:100%;display:flex;align-items:center;z-index:1;&.", "{overflow:scroll;scroll-padding:0.25rem;overscroll-behavior:contain;scrollbar-width:none;::-webkit-scrollbar{display:none;}", "{margin-top:auto;}}&.", "{overflow:visible;}"], classes.tabsClipScroll, StyledContent, classes.tabsClipShowAll);
|
14
14
|
export var StyledArrow = /*#__PURE__*/styled.button.withConfig({
|
15
15
|
componentId: "plasma-new-hope__sc-gz8fxn-2"
|
16
|
-
})(["display:flex;cursor:pointer;border:none;background-color:transparent;padding:0;outline:none;transform:rotate(90deg);", ";&[disabled]{cursor:not-allowed;}"], /*#__PURE__*/addFocus({
|
16
|
+
})(["display:flex;cursor:pointer;border:none;background-color:transparent;padding:0;outline:none;transform:rotate(90deg);", ";&[disabled]{cursor:not-allowed;}color:var(", ");&:hover{color:var(", ");}&:active{color:var(", ");}"], /*#__PURE__*/addFocus({
|
17
17
|
outlineSize: '0.063rem',
|
18
18
|
outlineOffset: '-0.125rem',
|
19
19
|
outlineColor: /*#__PURE__*/"var(".concat(tokens.outlineFocusColor, ")"),
|
20
20
|
outlineRadius: 'calc(var(--plasma_private-outline-radius) - 0.063rem)'
|
21
|
-
}));
|
21
|
+
}), tokens.arrowColor, tokens.arrowColorHover, tokens.arrowColorActive);
|