@salutejs/plasma-new-hope 0.189.1-canary.1532.11794626529.0 → 0.190.0-canary.1538.11794569428.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Breadcrumbs/Breadcrumbs.css +3 -3
- package/cjs/components/Breadcrumbs/Breadcrumbs.styles.js +14 -7
- package/cjs/components/Breadcrumbs/Breadcrumbs.styles.js.map +1 -1
- package/cjs/components/Breadcrumbs/{Breadcrumbs.styles_1icsgdr.css → Breadcrumbs.styles_19b6ey4.css} +1 -1
- package/cjs/components/Breadcrumbs/utils/index.css +3 -3
- package/cjs/components/Dropdown/Dropdown.js +6 -4
- package/cjs/components/Dropdown/Dropdown.js.map +1 -1
- package/cjs/index.css +3 -3
- package/emotion/cjs/components/Breadcrumbs/Breadcrumbs.styles.js +11 -8
- package/emotion/cjs/components/Dropdown/Dropdown.js +6 -4
- package/emotion/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +9 -0
- package/emotion/cjs/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +13 -15
- package/emotion/cjs/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +9 -0
- package/emotion/cjs/examples/plasma_web/components/Tabs/Tabs.stories.tsx +12 -14
- package/emotion/es/components/Breadcrumbs/Breadcrumbs.styles.js +11 -8
- package/emotion/es/components/Dropdown/Dropdown.js +6 -4
- package/emotion/es/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +9 -0
- package/emotion/es/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +13 -15
- package/emotion/es/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +9 -0
- package/emotion/es/examples/plasma_web/components/Tabs/Tabs.stories.tsx +12 -14
- package/es/components/Breadcrumbs/Breadcrumbs.css +3 -3
- package/es/components/Breadcrumbs/Breadcrumbs.styles.js +14 -7
- package/es/components/Breadcrumbs/Breadcrumbs.styles.js.map +1 -1
- package/es/components/Breadcrumbs/{Breadcrumbs.styles_1icsgdr.css → Breadcrumbs.styles_19b6ey4.css} +1 -1
- package/es/components/Breadcrumbs/utils/index.css +3 -3
- package/es/components/Dropdown/Dropdown.js +6 -4
- package/es/components/Dropdown/Dropdown.js.map +1 -1
- package/es/index.css +3 -3
- package/package.json +2 -2
- package/styled-components/cjs/components/Breadcrumbs/Breadcrumbs.styles.js +8 -5
- package/styled-components/cjs/components/Dropdown/Dropdown.js +6 -4
- package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +9 -0
- package/styled-components/cjs/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +13 -15
- package/styled-components/cjs/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +9 -0
- package/styled-components/cjs/examples/plasma_web/components/Tabs/Tabs.stories.tsx +12 -14
- package/styled-components/es/components/Breadcrumbs/Breadcrumbs.styles.js +8 -5
- package/styled-components/es/components/Dropdown/Dropdown.js +6 -4
- package/styled-components/es/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +9 -0
- package/styled-components/es/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +13 -15
- package/styled-components/es/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +9 -0
- package/styled-components/es/examples/plasma_web/components/Tabs/Tabs.stories.tsx +12 -14
- package/types/components/Breadcrumbs/Breadcrumbs.styles.d.ts.map +1 -1
- package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/types/components/Dropdown/Dropdown.types.d.ts +4 -0
- package/types/components/Dropdown/Dropdown.types.d.ts.map +1 -1
@@ -8,9 +8,9 @@
|
|
8
8
|
|
9
9
|
.IconRoot_7pl7ig_svvlqhf__32c458a1{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;width:var(--svvlqhf-0);height:var(--svvlqhf-0);-webkit-flex:0 0 var(--svvlqhf-0);-ms-flex:0 0 var(--svvlqhf-0);flex:0 0 var(--svvlqhf-0);}
|
10
10
|
|
11
|
-
.
|
12
|
-
.
|
13
|
-
.
|
11
|
+
.Breadcrumbs_styles_19b6ey4_shehk3i__c0ed7789{opacity:var(--shehk3i-0);cursor:var(--shehk3i-1);color:var(--shehk3i-2);--plasma-link-disabled-opacity:var(--plasma-breadcrumbs-opacity);position:relative;}.Breadcrumbs_styles_19b6ey4_shehk3i__c0ed7789::before{content:'';position:absolute;top:0rem;left:0rem;right:0rem;bottom:0rem;z-index:1;display:block;box-sizing:content-box;border:0.125rem solid transparent;border-radius:0rem;-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.Breadcrumbs_styles_19b6ey4_shehk3i__c0ed7789.Breadcrumbs_styles_19b6ey4_focusVisible__c0ed7789:focus::before,.Breadcrumbs_styles_19b6ey4_shehk3i__c0ed7789[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.125rem var(--plasma-breadcrumbs-focus-outline-color);}
|
12
|
+
.Breadcrumbs_styles_19b6ey4_bkgt5xr__c0ed7789{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:var(--plasma-breadcrumbs-gap);color:var(--plasma-breadcrumbs-color);font-family:var(--plasma-breadcrumbs-font-family);font-size:var(--plasma-breadcrumbs-font-size);font-weight:var(--plasma-breadcrumbs-font-weight);font-style:var(--plasma-breadcrumbs-font-style);-webkit-letter-spacing:var(--plasma-breadcrumbs-letter-spacing);-moz-letter-spacing:var(--plasma-breadcrumbs-letter-spacing);-ms-letter-spacing:var(--plasma-breadcrumbs-letter-spacing);letter-spacing:var(--plasma-breadcrumbs-letter-spacing);line-height:var(--plasma-breadcrumbs-line-height);}
|
13
|
+
.Breadcrumbs_styles_19b6ey4_sajtslk__c0ed7789{color:var(--plasma-breadcrumbs-color-separator);opacity:var(--plasma-breadcrumbs-opacity);}
|
14
14
|
|
15
15
|
|
16
16
|
.BreadcrumbShorter_styles_czqxks_s19f9x1v__c6484ba8{cursor:pointer;position:relative;}.BreadcrumbShorter_styles_czqxks_s19f9x1v__c6484ba8::before{content:'';position:absolute;top:0.125rem;left:0.125rem;right:0.125rem;bottom:0.125rem;z-index:1;display:block;box-sizing:content-box;border:0.125rem solid transparent;border-radius:0;-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.BreadcrumbShorter_styles_czqxks_s19f9x1v__c6484ba8.BreadcrumbShorter_styles_czqxks_focusVisible__c6484ba8:focus::before,.BreadcrumbShorter_styles_czqxks_s19f9x1v__c6484ba8[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.125rem var(--plasma-breadcrumbs-focus-outline-color);}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import './Breadcrumbs.
|
1
|
+
import './Breadcrumbs.styles_19b6ey4.css';
|
2
2
|
'use strict';
|
3
3
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
@@ -17,13 +17,19 @@ var _exp = function _exp() {
|
|
17
17
|
var _exp2 = function _exp2() {
|
18
18
|
return function (_ref) {
|
19
19
|
var isHref = _ref.isHref;
|
20
|
-
return isHref ?
|
20
|
+
return isHref ? 1 : "var(".concat(Breadcrumbs_tokens.tokens.breadcrumbsOpacity, ")");
|
21
21
|
};
|
22
22
|
};
|
23
|
-
var
|
23
|
+
var _exp3 = function _exp3() {
|
24
24
|
return function (_ref2) {
|
25
25
|
var isHref = _ref2.isHref;
|
26
|
-
return isHref ?
|
26
|
+
return isHref ? 'pointer' : 'auto';
|
27
|
+
};
|
28
|
+
};
|
29
|
+
var _exp4 = function _exp4() {
|
30
|
+
return function (_ref3) {
|
31
|
+
var isHref = _ref3.isHref;
|
32
|
+
return isHref ? "var(".concat(Breadcrumbs_tokens.tokens.breadcrumbsColor, ")") : "var(".concat(Breadcrumbs_tokens.tokens.breadcrumbsColorText, ")");
|
27
33
|
};
|
28
34
|
};
|
29
35
|
var StyledLink = /*#__PURE__*/react.styled(_exp())({
|
@@ -32,14 +38,15 @@ var StyledLink = /*#__PURE__*/react.styled(_exp())({
|
|
32
38
|
propsAsIs: true,
|
33
39
|
vars: {
|
34
40
|
"shehk3i-0": [/*#__PURE__*/_exp2()],
|
35
|
-
"shehk3i-1": [/*#__PURE__*/
|
41
|
+
"shehk3i-1": [/*#__PURE__*/_exp3()],
|
42
|
+
"shehk3i-2": [/*#__PURE__*/_exp4()]
|
36
43
|
}
|
37
44
|
});
|
38
45
|
var base = "bkgt5xr";
|
39
|
-
var
|
46
|
+
var _exp15 = function _exp15() {
|
40
47
|
return IconDisclosureRight.IconDisclosureRight;
|
41
48
|
};
|
42
|
-
var Separator = /*#__PURE__*/react.styled(
|
49
|
+
var Separator = /*#__PURE__*/react.styled(_exp15())({
|
43
50
|
name: "Separator",
|
44
51
|
"class": "sajtslk",
|
45
52
|
propsAsIs: true
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Breadcrumbs.styles.js","sources":["../../../src/components/Breadcrumbs/Breadcrumbs.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\nimport { css } from '@linaria/core';\n\nimport { linkConfig } from '../Link';\nimport { component, mergeConfig } from '../../engines';\nimport { IconDisclosureRight } from '../_Icon';\nimport { addFocus } from '../../mixins';\n\nimport { tokens } from './Breadcrumbs.tokens';\n\nconst mergedLinkConfig = mergeConfig(linkConfig);\nconst Link = component(mergedLinkConfig);\n\nexport const StyledLink = styled(Link)<{ isHref: boolean }>`\n
|
1
|
+
{"version":3,"file":"Breadcrumbs.styles.js","sources":["../../../src/components/Breadcrumbs/Breadcrumbs.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\nimport { css } from '@linaria/core';\n\nimport { linkConfig } from '../Link';\nimport { component, mergeConfig } from '../../engines';\nimport { IconDisclosureRight } from '../_Icon';\nimport { addFocus } from '../../mixins';\n\nimport { tokens } from './Breadcrumbs.tokens';\n\nconst mergedLinkConfig = mergeConfig(linkConfig);\nconst Link = component(mergedLinkConfig);\n\nexport const StyledLink = styled(Link)<{ isHref: boolean }>`\n opacity: ${({ isHref }) => (isHref ? 1 : `var(${tokens.breadcrumbsOpacity})`)};\n cursor: ${({ isHref }) => (isHref ? 'pointer' : 'auto')};\n color: ${({ isHref }) => (isHref ? `var(${tokens.breadcrumbsColor})` : `var(${tokens.breadcrumbsColorText})`)};\n\n --plasma-link-disabled-opacity: var(${tokens.breadcrumbsOpacity});\n\n ${addFocus({\n outlineOffset: '0rem',\n outlineSize: '0.125rem',\n outlineRadius: '0rem',\n outlineColor: `var(${tokens.breadcrumbsFocusOutlineColor})`,\n })}\n`;\n\nexport const base = css`\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: var(${tokens.breadcrumbsGap});\n\n color: var(${tokens.breadcrumbsColor});\n font-family: var(${tokens.breadcrumbsFontFamily});\n font-size: var(${tokens.breadcrumbsFontSize});\n font-weight: var(${tokens.breadcrumbsFontWeight});\n font-style: var(${tokens.breadcrumbsFontStyle});\n letter-spacing: var(${tokens.breadcrumbsLetterSpacing});\n line-height: var(${tokens.breadcrumbsLineHeight});\n`;\n\nexport const Separator = styled(IconDisclosureRight)`\n color: var(${tokens.breadcrumbsColorSeparator});\n opacity: var(${tokens.breadcrumbsOpacity});\n`;\n"],"names":["mergedLinkConfig","mergeConfig","linkConfig","Link","component","_exp","_exp2","_ref","isHref","concat","tokens","breadcrumbsOpacity","_exp3","_ref2","_exp4","_ref3","breadcrumbsColor","breadcrumbsColorText","StyledLink","styled","name","class","propsAsIs","vars","base","_exp15","IconDisclosureRight","Separator"],"mappings":";;;;;;;;;;AAUA,IAAMA,gBAAgB,gBAAGC,kBAAW,CAACC,iBAAU,CAAC,CAAA;AAChD,IAAMC,IAAI,gBAAGC,gBAAS,CAACJ,gBAAgB,CAAC,CAAA;AAAC,IAAAK,IAAA,GAVvBA,SAUuBA,IAAAA,GAAA;AAAA,EAAA,OAERF,IAAI,CAAA;AAAA,CAAA,CAAA;AAAA,IAAAG,KAAA,GAZnBA,SAYmBA,KAAAA,GAAA;AAAA,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AAMU,IAAI,GAahB,UAAA;AAAC,IAAAC,MAAA,GAxCgBA,SAwChBA,MAAAA,GAAA;AAAA,EAAA,OAE8BC,uCAAmB,CAAA;AAAA,CAAA,CAAA;AAA5C,IAAMC,SAAS,gBAAGR,YAAM,CAAAM,MAAA,EAAA,CAAA,CAAA;AAAAL,EAAAA,IAAA,EAAA,WAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAG9B;;;;;;"}
|
package/cjs/components/Breadcrumbs/{Breadcrumbs.styles_1icsgdr.css → Breadcrumbs.styles_19b6ey4.css}
RENAMED
@@ -1,3 +1,3 @@
|
|
1
|
-
.shehk3i{
|
1
|
+
.shehk3i{opacity:var(--shehk3i-0);cursor:var(--shehk3i-1);color:var(--shehk3i-2);--plasma-link-disabled-opacity:var(--plasma-breadcrumbs-opacity);position:relative;}.shehk3i::before{content:'';position:absolute;top:0rem;left:0rem;right:0rem;bottom:0rem;z-index:1;display:block;box-sizing:content-box;border:0.125rem solid transparent;border-radius:0rem;-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.shehk3i.focus-visible:focus::before,.shehk3i[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.125rem var(--plasma-breadcrumbs-focus-outline-color);}
|
2
2
|
.bkgt5xr{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:var(--plasma-breadcrumbs-gap);color:var(--plasma-breadcrumbs-color);font-family:var(--plasma-breadcrumbs-font-family);font-size:var(--plasma-breadcrumbs-font-size);font-weight:var(--plasma-breadcrumbs-font-weight);font-style:var(--plasma-breadcrumbs-font-style);-webkit-letter-spacing:var(--plasma-breadcrumbs-letter-spacing);-moz-letter-spacing:var(--plasma-breadcrumbs-letter-spacing);-ms-letter-spacing:var(--plasma-breadcrumbs-letter-spacing);letter-spacing:var(--plasma-breadcrumbs-letter-spacing);line-height:var(--plasma-breadcrumbs-line-height);}
|
3
3
|
.sajtslk{color:var(--plasma-breadcrumbs-color-separator);opacity:var(--plasma-breadcrumbs-opacity);}
|
@@ -12,6 +12,6 @@
|
|
12
12
|
|
13
13
|
.IconRoot_7pl7ig_svvlqhf__32c458a1{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;width:var(--svvlqhf-0);height:var(--svvlqhf-0);-webkit-flex:0 0 var(--svvlqhf-0);-ms-flex:0 0 var(--svvlqhf-0);flex:0 0 var(--svvlqhf-0);}
|
14
14
|
|
15
|
-
.
|
16
|
-
.
|
17
|
-
.
|
15
|
+
.Breadcrumbs_styles_19b6ey4_shehk3i__c0ed7789{opacity:var(--shehk3i-0);cursor:var(--shehk3i-1);color:var(--shehk3i-2);--plasma-link-disabled-opacity:var(--plasma-breadcrumbs-opacity);position:relative;}.Breadcrumbs_styles_19b6ey4_shehk3i__c0ed7789::before{content:'';position:absolute;top:0rem;left:0rem;right:0rem;bottom:0rem;z-index:1;display:block;box-sizing:content-box;border:0.125rem solid transparent;border-radius:0rem;-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.Breadcrumbs_styles_19b6ey4_shehk3i__c0ed7789.Breadcrumbs_styles_19b6ey4_focusVisible__c0ed7789:focus::before,.Breadcrumbs_styles_19b6ey4_shehk3i__c0ed7789[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.125rem var(--plasma-breadcrumbs-focus-outline-color);}
|
16
|
+
.Breadcrumbs_styles_19b6ey4_bkgt5xr__c0ed7789{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:var(--plasma-breadcrumbs-gap);color:var(--plasma-breadcrumbs-color);font-family:var(--plasma-breadcrumbs-font-family);font-size:var(--plasma-breadcrumbs-font-size);font-weight:var(--plasma-breadcrumbs-font-weight);font-style:var(--plasma-breadcrumbs-font-style);-webkit-letter-spacing:var(--plasma-breadcrumbs-letter-spacing);-moz-letter-spacing:var(--plasma-breadcrumbs-letter-spacing);-ms-letter-spacing:var(--plasma-breadcrumbs-letter-spacing);letter-spacing:var(--plasma-breadcrumbs-letter-spacing);line-height:var(--plasma-breadcrumbs-line-height);}
|
17
|
+
.Breadcrumbs_styles_19b6ey4_sajtslk__c0ed7789{color:var(--plasma-breadcrumbs-color-separator);opacity:var(--plasma-breadcrumbs-opacity);}
|
@@ -22,7 +22,7 @@ var getPlacement = require('./utils/getPlacement.js');
|
|
22
22
|
var getItemId = require('./utils/getItemId.js');
|
23
23
|
var DropdownInner = require('./ui/DropdownInner/DropdownInner.js');
|
24
24
|
|
25
|
-
var _excluded = ["items", "children", "placement", "offset", "closeOnOverlayClick", "onToggle", "size", "view", "itemRole", "className", "listWidth", "listHeight", "listOverflow", "closeOnSelect", "onHover", "onItemSelect", "onItemClick", "trigger", "variant", "hasArrow", "portal"];
|
25
|
+
var _excluded = ["items", "children", "placement", "offset", "closeOnOverlayClick", "onToggle", "size", "view", "itemRole", "className", "listWidth", "listHeight", "listOverflow", "closeOnSelect", "onHover", "onItemSelect", "onItemClick", "trigger", "variant", "hasArrow", "alwaysOpened", "portal"];
|
26
26
|
var Context = /*#__PURE__*/React.createContext({});
|
27
27
|
|
28
28
|
/**
|
@@ -57,6 +57,8 @@ var dropdownRoot = function dropdownRoot(Root) {
|
|
57
57
|
variant = _ref$variant === void 0 ? 'normal' : _ref$variant,
|
58
58
|
_ref$hasArrow = _ref.hasArrow,
|
59
59
|
hasArrow = _ref$hasArrow === void 0 ? true : _ref$hasArrow,
|
60
|
+
_ref$alwaysOpened = _ref.alwaysOpened,
|
61
|
+
alwaysOpened = _ref$alwaysOpened === void 0 ? false : _ref$alwaysOpened,
|
60
62
|
portal = _ref.portal,
|
61
63
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
62
64
|
var _useReducer = React.useReducer(pathReducer.pathReducer, []),
|
@@ -77,7 +79,7 @@ var dropdownRoot = function dropdownRoot(Root) {
|
|
77
79
|
|
78
80
|
// Логика работы при клике за пределами выпадающего списка
|
79
81
|
var targetRef = useOutsideClick.useOutsideClick(function (event) {
|
80
|
-
if (!isCurrentListOpen || !closeOnOverlayClick) {
|
82
|
+
if (!isCurrentListOpen || !closeOnOverlayClick || alwaysOpened) {
|
81
83
|
return;
|
82
84
|
}
|
83
85
|
dispatchPath({
|
@@ -91,7 +93,7 @@ var dropdownRoot = function dropdownRoot(Root) {
|
|
91
93
|
}
|
92
94
|
}, floatingPopoverRef);
|
93
95
|
var handleGlobalToggle = function handleGlobalToggle(opened, event) {
|
94
|
-
if (opened) {
|
96
|
+
if (alwaysOpened || opened) {
|
95
97
|
dispatchPath({
|
96
98
|
type: 'opened_first_level'
|
97
99
|
});
|
@@ -120,7 +122,7 @@ var dropdownRoot = function dropdownRoot(Root) {
|
|
120
122
|
onItemClick: onItemClick
|
121
123
|
}),
|
122
124
|
onKeyDown = _useKeyNavigation.onKeyDown;
|
123
|
-
var isCurrentListOpen = Boolean(path[0]);
|
125
|
+
var isCurrentListOpen = alwaysOpened || Boolean(path[0]);
|
124
126
|
return /*#__PURE__*/React.createElement(Context.Provider, {
|
125
127
|
value: {
|
126
128
|
focusedPath: focusedPath,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Dropdown.js","sources":["../../../src/components/Dropdown/Dropdown.tsx"],"sourcesContent":["import React, { createContext, forwardRef, useReducer, useRef } from 'react';\nimport { safeUseId } from '@salutejs/plasma-core';\n\nimport { RootProps } from '../../engines';\nimport { cx } from '../../utils';\nimport { useOutsideClick } from '../../hooks';\n\nimport { pathReducer } from './reducers/pathReducer';\nimport { focusedPathReducer } from './reducers/focusedPathReducer';\nimport { DropdownInner } from './ui';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { Ul, base } from './Dropdown.styles';\nimport { childrenWithProps, getItemByFocused, getItemId, getPlacement } from './utils';\nimport type { DropdownProps, HandleGlobalToggleType, ItemContext } from './Dropdown.types';\nimport { classes } from './Dropdown.tokens';\nimport { useKeyNavigation } from './hooks/useKeyboardNavigation';\nimport { useHashMaps } from './hooks/useHashMaps';\nimport { FloatingPopover } from './FloatingPopover';\n\nexport const Context = createContext<ItemContext>({} as ItemContext);\n\n/**\n * Выпадающий список.\n */\nexport const dropdownRoot = (Root: RootProps<HTMLDivElement, Omit<DropdownProps, 'items'>>) =>\n forwardRef<HTMLDivElement, DropdownProps>(\n (\n {\n items,\n children,\n placement,\n offset,\n closeOnOverlayClick = true,\n onToggle,\n size,\n view,\n itemRole = 'treeitem',\n className,\n listWidth,\n listHeight,\n listOverflow,\n closeOnSelect = true,\n onHover,\n onItemSelect,\n onItemClick,\n trigger = 'click',\n variant = 'normal',\n hasArrow = true,\n portal,\n ...rest\n },\n ref,\n ) => {\n const [path, dispatchPath] = useReducer(pathReducer, []);\n const [focusedPath, dispatchFocusedPath] = useReducer(focusedPathReducer, []);\n\n const [pathMap, focusedToValueMap] = useHashMaps(items);\n\n const activeDescendantItemValue = getItemByFocused(focusedPath, focusedToValueMap)?.value || '';\n\n const floatingPopoverRef = useRef<HTMLDivElement>(null);\n\n const treeId = safeUseId();\n\n // Логика работы при клике за пределами выпадающего списка\n const targetRef = useOutsideClick<HTMLUListElement>((event) => {\n if (!isCurrentListOpen || !closeOnOverlayClick) {\n return;\n }\n\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n\n if (onToggle) {\n onToggle(false, event);\n }\n }, floatingPopoverRef);\n\n const handleGlobalToggle: HandleGlobalToggleType = (opened, event) => {\n if (opened) {\n dispatchPath({ type: 'opened_first_level' });\n } else {\n dispatchFocusedPath({ type: 'reset' });\n dispatchPath({ type: 'reset' });\n }\n\n if (onToggle) {\n onToggle(opened, event);\n }\n };\n\n const { onKeyDown } = useKeyNavigation({\n focusedPath,\n dispatchFocusedPath,\n path,\n dispatchPath,\n pathMap,\n focusedToValueMap,\n handleGlobalToggle,\n closeOnSelect,\n onItemSelect,\n onItemClick,\n });\n\n const isCurrentListOpen = Boolean(path[0]);\n\n return (\n <Context.Provider\n value={{\n focusedPath,\n size,\n variant,\n itemRole,\n handleGlobalToggle,\n closeOnSelect,\n onHover,\n onItemClick,\n onItemSelect,\n hasArrow,\n treeId,\n }}\n >\n <FloatingPopover\n ref={floatingPopoverRef}\n opened={isCurrentListOpen}\n onToggle={handleGlobalToggle}\n placement={getPlacement(placement)}\n offset={offset}\n portal={portal}\n trigger={trigger}\n target={childrenWithProps(children, {\n role: 'combobox',\n 'aria-controls': `${treeId}_tree_level_1`,\n 'aria-expanded': isCurrentListOpen,\n 'aria-activedescendant': activeDescendantItemValue\n ? getItemId(treeId, activeDescendantItemValue.toString())\n : '',\n onKeyDown,\n })}\n >\n <Root\n className={cx(className, classes.dropdownRoot)}\n ref={ref}\n view={view}\n size={size}\n style={{ display: 'inline-block' }}\n {...rest}\n >\n <Ul\n ref={targetRef}\n id={`${treeId}_tree_level_1`}\n role=\"tree\"\n listHeight={listHeight}\n listOverflow={listOverflow}\n listWidth={listWidth}\n >\n {items.map((item, index) => (\n <DropdownInner\n key={`${index}/0`}\n item={item}\n currentLevel={0}\n trigger={trigger}\n path={path}\n dispatchPath={dispatchPath}\n index={index}\n listHeight={listHeight}\n listOverflow={listOverflow}\n listWidth={listWidth}\n />\n ))}\n </Ul>\n </Root>\n </FloatingPopover>\n </Context.Provider>\n );\n },\n );\n\nexport const dropdownConfig = {\n name: 'Dropdown',\n tag: 'div',\n layout: dropdownRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n },\n};\n"],"names":["Context","createContext","dropdownRoot","Root","forwardRef","_ref","ref","_getItemByFocused","items","children","placement","offset","_ref$closeOnOverlayCl","closeOnOverlayClick","onToggle","size","view","_ref$itemRole","itemRole","className","listWidth","listHeight","listOverflow","_ref$closeOnSelect","closeOnSelect","onHover","onItemSelect","onItemClick","_ref$trigger","trigger","_ref$variant","variant","_ref$hasArrow","hasArrow","portal","rest","_objectWithoutProperties","_excluded","_useReducer","useReducer","pathReducer","_useReducer2","_slicedToArray","path","dispatchPath","_useReducer3","focusedPathReducer","_useReducer4","focusedPath","dispatchFocusedPath","_useHashMaps","useHashMaps","_useHashMaps2","pathMap","focusedToValueMap","activeDescendantItemValue","getItemByFocused","value","floatingPopoverRef","useRef","treeId","safeUseId","targetRef","useOutsideClick","event","isCurrentListOpen","type","handleGlobalToggle","opened","_useKeyNavigation","useKeyNavigation","onKeyDown","Boolean","React","createElement","Provider","FloatingPopover","getPlacement","target","childrenWithProps","role","concat","getItemId","toString","_extends","cx","classes","style","display","Ul","id","map","item","index","DropdownInner","key","currentLevel","dropdownConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;IAoBaA,OAAO,gBAAGC,mBAAa,CAAc,EAAiB,EAAC;;AAEpE;AACA;AACA;IACaC,YAAY,GAAG,SAAfA,YAAYA,CAAIC,IAA6D,EAAA;AAAA,EAAA,oBACtFC,gBAAU,CACN,UAAAC,IAAA,EAyBIC,GAAG,EACF;AAAA,IAAA,IAAAC,iBAAA,CAAA;AAAA,IAAA,IAxBGC,KAAK,GAAAH,IAAA,CAALG,KAAK;MACLC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;MACRC,SAAS,GAAAL,IAAA,CAATK,SAAS;MACTC,MAAM,GAAAN,IAAA,CAANM,MAAM;MAAAC,qBAAA,GAAAP,IAAA,CACNQ,mBAAmB;AAAnBA,MAAAA,mBAAmB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,qBAAA;MAC1BE,QAAQ,GAAAT,IAAA,CA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AAc,GAAG;AAC1BC,EAAAA,IAAI,EAAE,UAAU;AAChBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAElG,YAAY;AACpBmG,EAAAA,IAAI,EAAJA,oBAAI;AACJC,EAAAA,UAAU,EAAE;AACRtF,IAAAA,IAAI,EAAE;AACFuF,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACDzF,IAAAA,IAAI,EAAE;AACFwF,MAAAA,GAAG,EAAEE,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACN1F,IAAAA,IAAI,EAAE,SAAS;AACfD,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;;;"}
|
1
|
+
{"version":3,"file":"Dropdown.js","sources":["../../../src/components/Dropdown/Dropdown.tsx"],"sourcesContent":["import React, { createContext, forwardRef, useReducer, useRef } from 'react';\nimport { safeUseId } from '@salutejs/plasma-core';\n\nimport { RootProps } from '../../engines';\nimport { cx } from '../../utils';\nimport { useOutsideClick } from '../../hooks';\n\nimport { pathReducer } from './reducers/pathReducer';\nimport { focusedPathReducer } from './reducers/focusedPathReducer';\nimport { DropdownInner } from './ui';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { Ul, base } from './Dropdown.styles';\nimport { childrenWithProps, getItemByFocused, getItemId, getPlacement } from './utils';\nimport type { DropdownProps, HandleGlobalToggleType, ItemContext } from './Dropdown.types';\nimport { classes } from './Dropdown.tokens';\nimport { useKeyNavigation } from './hooks/useKeyboardNavigation';\nimport { useHashMaps } from './hooks/useHashMaps';\nimport { FloatingPopover } from './FloatingPopover';\n\nexport const Context = createContext<ItemContext>({} as ItemContext);\n\n/**\n * Выпадающий список.\n */\nexport const dropdownRoot = (Root: RootProps<HTMLDivElement, Omit<DropdownProps, 'items'>>) =>\n forwardRef<HTMLDivElement, DropdownProps>(\n (\n {\n items,\n children,\n placement,\n offset,\n closeOnOverlayClick = true,\n onToggle,\n size,\n view,\n itemRole = 'treeitem',\n className,\n listWidth,\n listHeight,\n listOverflow,\n closeOnSelect = true,\n onHover,\n onItemSelect,\n onItemClick,\n trigger = 'click',\n variant = 'normal',\n hasArrow = true,\n alwaysOpened = false,\n portal,\n ...rest\n },\n ref,\n ) => {\n const [path, dispatchPath] = useReducer(pathReducer, []);\n const [focusedPath, dispatchFocusedPath] = useReducer(focusedPathReducer, []);\n\n const [pathMap, focusedToValueMap] = useHashMaps(items);\n\n const activeDescendantItemValue = getItemByFocused(focusedPath, focusedToValueMap)?.value || '';\n\n const floatingPopoverRef = useRef<HTMLDivElement>(null);\n\n const treeId = safeUseId();\n\n // Логика работы при клике за пределами выпадающего списка\n const targetRef = useOutsideClick<HTMLUListElement>((event) => {\n if (!isCurrentListOpen || !closeOnOverlayClick || alwaysOpened) {\n return;\n }\n\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n\n if (onToggle) {\n onToggle(false, event);\n }\n }, floatingPopoverRef);\n\n const handleGlobalToggle: HandleGlobalToggleType = (opened, event) => {\n if (alwaysOpened || opened) {\n dispatchPath({ type: 'opened_first_level' });\n } else {\n dispatchFocusedPath({ type: 'reset' });\n dispatchPath({ type: 'reset' });\n }\n\n if (onToggle) {\n onToggle(opened, event);\n }\n };\n\n const { onKeyDown } = useKeyNavigation({\n focusedPath,\n dispatchFocusedPath,\n path,\n dispatchPath,\n pathMap,\n focusedToValueMap,\n handleGlobalToggle,\n closeOnSelect,\n onItemSelect,\n onItemClick,\n });\n\n const isCurrentListOpen = alwaysOpened || Boolean(path[0]);\n\n return (\n <Context.Provider\n value={{\n focusedPath,\n size,\n variant,\n itemRole,\n handleGlobalToggle,\n closeOnSelect,\n onHover,\n onItemClick,\n onItemSelect,\n hasArrow,\n treeId,\n }}\n >\n <FloatingPopover\n ref={floatingPopoverRef}\n opened={isCurrentListOpen}\n onToggle={handleGlobalToggle}\n placement={getPlacement(placement)}\n offset={offset}\n portal={portal}\n trigger={trigger}\n target={childrenWithProps(children, {\n role: 'combobox',\n 'aria-controls': `${treeId}_tree_level_1`,\n 'aria-expanded': isCurrentListOpen,\n 'aria-activedescendant': activeDescendantItemValue\n ? getItemId(treeId, activeDescendantItemValue.toString())\n : '',\n onKeyDown,\n })}\n >\n <Root\n className={cx(className, classes.dropdownRoot)}\n ref={ref}\n view={view}\n size={size}\n style={{ display: 'inline-block' }}\n {...rest}\n >\n <Ul\n ref={targetRef}\n id={`${treeId}_tree_level_1`}\n role=\"tree\"\n listHeight={listHeight}\n listOverflow={listOverflow}\n listWidth={listWidth}\n >\n {items.map((item, index) => (\n <DropdownInner\n key={`${index}/0`}\n item={item}\n currentLevel={0}\n trigger={trigger}\n path={path}\n dispatchPath={dispatchPath}\n index={index}\n listHeight={listHeight}\n listOverflow={listOverflow}\n listWidth={listWidth}\n />\n ))}\n </Ul>\n </Root>\n </FloatingPopover>\n </Context.Provider>\n );\n },\n );\n\nexport const dropdownConfig = {\n name: 'Dropdown',\n tag: 'div',\n layout: dropdownRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n },\n};\n"],"names":["Context","createContext","dropdownRoot","Root","forwardRef","_ref","ref","_getItemByFocused","items","children","placement","offset","_ref$closeOnOverlayCl","closeOnOverlayClick","onToggle","size","view","_ref$itemRole","itemRole","className","listWidth","listHeight","listOverflow","_ref$closeOnSelect","closeOnSelect","onHover","onItemSelect","onItemClick","_ref$trigger","trigger","_ref$variant","variant","_ref$hasArrow","hasArrow","_ref$alwaysOpened","alwaysOpened","portal","rest","_objectWithoutProperties","_excluded","_useReducer","useReducer","pathReducer","_useReducer2","_slicedToArray","path","dispatchPath","_useReducer3","focusedPathReducer","_useReducer4","focusedPath","dispatchFocusedPath","_useHashMaps","useHashMaps","_useHashMaps2","pathMap","focusedToValueMap","activeDescendantItemValue","getItemByFocused","value","floatingPopoverRef","useRef","treeId","safeUseId","targetRef","useOutsideClick","event","isCurrentListOpen","type","handleGlobalToggle","opened","_useKeyNavigation","useKeyNavigation","onKeyDown","Boolean","React","createElement","Provider","FloatingPopover","getPlacement","target","childrenWithProps","role","concat","getItemId","toString","_extends","cx","classes","style","display","Ul","id","map","item","index","DropdownInner","key","currentLevel","dropdownConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;IAoBaA,OAAO,gBAAGC,mBAAa,CAAc,EAAiB,EAAC;;AAEpE;AACA;AACA;IACaC,YAAY,GAAG,SAAfA,YAAYA,CAAIC,IAA6D,EAAA;AAAA,EAAA,oBACtFC,gBAAU,CACN,UAAAC,IAAA,EA0BIC,GAAG,EACF;AAAA,IAAA,IAAAC,iBAAA,CAAA;AAAA,IAAA,IAzBGC,KAAK,GAAAH,IAAA,CAALG,KAAK;MACLC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;MACRC,SAAS,GAAAL,IAAA,CAATK,SAAS;MACTC,MAAM,GAAAN,IAAA,CAANM,MAAM;MAAAC,qBAAA,GAAAP,IAAA,CACNQ,mBAAmB;AAAnBA,MAAAA,mBAAmB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,qBAAA;MAC1BE,QAAQ,GAAAT,IAAA,CAARS,QAAQ;MACRC,IAAI,GAAAV,IAAA,CAAJU,IAAI;MACJC,IAAI,GAAAX,IAAA,CAAJW,IAAI;MAAAC,aAAA,GAAAZ,IAAA,CACJa,QAAQ;AAARA,MAAAA,QAAQ,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,UAAU,GAAAA,aAAA;MACrBE,SAAS,GAAAd,IAAA,CAATc,SAAS;MACTC,SAAS,GAAAf,IAAA,CAATe,SAAS;MACTC,UAAU,GAAAhB,IAAA,CAAVgB,UAAU;MACVC,YAAY,GAAAjB,IAAA,CAAZiB,YAAY;MAAAC,kBAAA,GAAAlB,IAAA,CACZmB,aAAa;AAAbA,MAAAA,aAAa,GAAAD,k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AAAA,GAAG,EAAEE,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACN5F,IAAAA,IAAI,EAAE,SAAS;AACfD,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;;;"}
|
package/cjs/index.css
CHANGED
@@ -33,9 +33,9 @@
|
|
33
33
|
|
34
34
|
.ButtonGroup_styles_92nbdg_b181uun8__0ffde6c1{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}
|
35
35
|
|
36
|
-
.
|
37
|
-
.
|
38
|
-
.
|
36
|
+
.Breadcrumbs_styles_19b6ey4_shehk3i__c0ed7789{opacity:var(--shehk3i-0);cursor:var(--shehk3i-1);color:var(--shehk3i-2);--plasma-link-disabled-opacity:var(--plasma-breadcrumbs-opacity);position:relative;}.Breadcrumbs_styles_19b6ey4_shehk3i__c0ed7789::before{content:'';position:absolute;top:0rem;left:0rem;right:0rem;bottom:0rem;z-index:1;display:block;box-sizing:content-box;border:0.125rem solid transparent;border-radius:0rem;-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.Breadcrumbs_styles_19b6ey4_shehk3i__c0ed7789.Breadcrumbs_styles_19b6ey4_focusVisible__c0ed7789:focus::before,.Breadcrumbs_styles_19b6ey4_shehk3i__c0ed7789[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.125rem var(--plasma-breadcrumbs-focus-outline-color);}
|
37
|
+
.Breadcrumbs_styles_19b6ey4_bkgt5xr__c0ed7789{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:var(--plasma-breadcrumbs-gap);color:var(--plasma-breadcrumbs-color);font-family:var(--plasma-breadcrumbs-font-family);font-size:var(--plasma-breadcrumbs-font-size);font-weight:var(--plasma-breadcrumbs-font-weight);font-style:var(--plasma-breadcrumbs-font-style);-webkit-letter-spacing:var(--plasma-breadcrumbs-letter-spacing);-moz-letter-spacing:var(--plasma-breadcrumbs-letter-spacing);-ms-letter-spacing:var(--plasma-breadcrumbs-letter-spacing);letter-spacing:var(--plasma-breadcrumbs-letter-spacing);line-height:var(--plasma-breadcrumbs-line-height);}
|
38
|
+
.Breadcrumbs_styles_19b6ey4_sajtslk__c0ed7789{color:var(--plasma-breadcrumbs-color-separator);opacity:var(--plasma-breadcrumbs-opacity);}
|
39
39
|
|
40
40
|
|
41
41
|
.BreadcrumbShorter_styles_czqxks_s19f9x1v__c6484ba8{cursor:pointer;position:relative;}.BreadcrumbShorter_styles_czqxks_s19f9x1v__c6484ba8::before{content:'';position:absolute;top:0.125rem;left:0.125rem;right:0.125rem;bottom:0.125rem;z-index:1;display:block;box-sizing:content-box;border:0.125rem solid transparent;border-radius:0;-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.BreadcrumbShorter_styles_czqxks_s19f9x1v__c6484ba8.BreadcrumbShorter_styles_czqxks_focusVisible__c6484ba8:focus::before,.BreadcrumbShorter_styles_czqxks_s19f9x1v__c6484ba8[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.125rem var(--plasma-breadcrumbs-focus-outline-color);}
|
@@ -17,20 +17,23 @@ var Link = /*#__PURE__*/(0, _engines.component)(mergedLinkConfig);
|
|
17
17
|
var StyledLink = exports.StyledLink = /*#__PURE__*/(0, _base["default"])(Link, {
|
18
18
|
target: "e1jirwgn1",
|
19
19
|
label: "plasma-new-hope__StyledLink"
|
20
|
-
})("
|
20
|
+
})("opacity:", function (_ref) {
|
21
21
|
var isHref = _ref.isHref;
|
22
|
-
return isHref ? "var(".concat(_Breadcrumbs.tokens.breadcrumbsColor, ")") : "var(".concat(_Breadcrumbs.tokens.breadcrumbsColorText, ")");
|
23
|
-
}, ";--plasma-link-color:var(--plasma__private-color);--plasma-link-color-hover:var(--plasma__private-color);--plasma-link-color-active:var(--plasma__private-color);--plasma-link-disabled-opacity:var(", _Breadcrumbs.tokens.breadcrumbsOpacity, ");opacity:", function (_ref2) {
|
24
|
-
var isHref = _ref2.isHref;
|
25
22
|
return isHref ? 1 : "var(".concat(_Breadcrumbs.tokens.breadcrumbsOpacity, ")");
|
26
|
-
}, ";cursor:
|
23
|
+
}, ";cursor:", function (_ref2) {
|
24
|
+
var isHref = _ref2.isHref;
|
25
|
+
return isHref ? 'pointer' : 'auto';
|
26
|
+
}, ";color:", function (_ref3) {
|
27
|
+
var isHref = _ref3.isHref;
|
28
|
+
return isHref ? "var(".concat(_Breadcrumbs.tokens.breadcrumbsColor, ")") : "var(".concat(_Breadcrumbs.tokens.breadcrumbsColorText, ")");
|
29
|
+
}, ";--plasma-link-disabled-opacity:var(", _Breadcrumbs.tokens.breadcrumbsOpacity, ");", /*#__PURE__*/(0, _mixins.addFocus)({
|
27
30
|
outlineOffset: '0rem',
|
28
31
|
outlineSize: '0.125rem',
|
29
32
|
outlineRadius: '0rem',
|
30
33
|
outlineColor: /*#__PURE__*/"var(".concat(_Breadcrumbs.tokens.breadcrumbsFocusOutlineColor, ")")
|
31
|
-
}), ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
32
|
-
var base = exports.base = /*#__PURE__*/(0, _react.css)("display:flex;flex-direction:row;align-items:center;gap:var(", _Breadcrumbs.tokens.breadcrumbsGap, ");color:var(", _Breadcrumbs.tokens.breadcrumbsColor, ");font-family:var(", _Breadcrumbs.tokens.breadcrumbsFontFamily, ");font-size:var(", _Breadcrumbs.tokens.breadcrumbsFontSize, ");font-weight:var(", _Breadcrumbs.tokens.breadcrumbsFontWeight, ");font-style:var(", _Breadcrumbs.tokens.breadcrumbsFontStyle, ");letter-spacing:var(", _Breadcrumbs.tokens.breadcrumbsLetterSpacing, ");line-height:var(", _Breadcrumbs.tokens.breadcrumbsLineHeight, ");;label:plasma-new-hope__base;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
34
|
+
}), ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQnJlYWRjcnVtYnMvQnJlYWRjcnVtYnMuc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWEyRCIsImZpbGUiOiIuLi8uLi8uLi8uLi9zcmMtZW1vdGlvbi9jb21wb25lbnRzL0JyZWFkY3J1bWJzL0JyZWFkY3J1bWJzLnN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHsgbGlua0NvbmZpZyB9IGZyb20gJy4uL0xpbmsnO1xuaW1wb3J0IHsgY29tcG9uZW50LCBtZXJnZUNvbmZpZyB9IGZyb20gJy4uLy4uL2VuZ2luZXMnO1xuaW1wb3J0IHsgSWNvbkRpc2Nsb3N1cmVSaWdodCB9IGZyb20gJy4uL19JY29uJztcbmltcG9ydCB7IGFkZEZvY3VzIH0gZnJvbSAnLi4vLi4vbWl4aW5zJztcblxuaW1wb3J0IHsgdG9rZW5zIH0gZnJvbSAnLi9CcmVhZGNydW1icy50b2tlbnMnO1xuXG5jb25zdCBtZXJnZWRMaW5rQ29uZmlnID0gbWVyZ2VDb25maWcobGlua0NvbmZpZyk7XG5jb25zdCBMaW5rID0gY29tcG9uZW50KG1lcmdlZExpbmtDb25maWcpO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkTGluayA9IHN0eWxlZChMaW5rKTx7IGlzSHJlZjogYm9vbGVhbiB9PmBcbiAgICBvcGFjaXR5OiAkeyh7IGlzSHJl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uICAgIGZvbnQtd2VpZ2h0OiB2YXIoJHt0b2tlbnMuYnJlYWRjcnVtYnNGb250V2VpZ2h0fSk7XG4gICAgZm9udC1zdHlsZTogdmFyKCR7dG9rZW5zLmJyZWFkY3J1bWJzRm9udFN0eWxlfSk7XG4gICAgbGV0dGVyLXNwYWNpbmc6IHZhcigke3Rva2Vucy5icmVhZGNydW1ic0xldHRlclNwYWNpbmd9KTtcbiAgICBsaW5lLWhlaWdodDogdmFyKCR7dG9rZW5zLmJyZWFkY3J1bWJzTGluZUhlaWdodH0pO1xuYDtcblxuZXhwb3J0IGNvbnN0IFNlcGFyYXRvciA9IHN0eWxlZChJY29uRGlzY2xvc3VyZVJpZ2h0KWBcbiAgICBjb2xvcjogdmFyKCR7dG9rZW5zLmJyZWFkY3J1bWJzQ29sb3JTZXBhcmF0b3J9KTtcbiAgICBvcGFjaXR5OiB2YXIoJHt0b2tlbnMuYnJlYWRjcnVtYnNPcGFjaXR5fSk7XG5gO1xuIl19 */"));
|
35
|
+
var base = exports.base = /*#__PURE__*/(0, _react.css)("display:flex;flex-direction:row;align-items:center;gap:var(", _Breadcrumbs.tokens.breadcrumbsGap, ");color:var(", _Breadcrumbs.tokens.breadcrumbsColor, ");font-family:var(", _Breadcrumbs.tokens.breadcrumbsFontFamily, ");font-size:var(", _Breadcrumbs.tokens.breadcrumbsFontSize, ");font-weight:var(", _Breadcrumbs.tokens.breadcrumbsFontWeight, ");font-style:var(", _Breadcrumbs.tokens.breadcrumbsFontStyle, ");letter-spacing:var(", _Breadcrumbs.tokens.breadcrumbsLetterSpacing, ");line-height:var(", _Breadcrumbs.tokens.breadcrumbsLineHeight, ");;label:plasma-new-hope__base;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQnJlYWRjcnVtYnMvQnJlYWRjcn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GluZS1oZWlnaHQ6IHZhcigke3Rva2Vucy5icmVhZGNydW1ic0xpbmVIZWlnaHR9KTtcbmA7XG5cbmV4cG9ydCBjb25zdCBTZXBhcmF0b3IgPSBzdHlsZWQoSWNvbkRpc2Nsb3N1cmVSaWdodClgXG4gICAgY29sb3I6IHZhcigke3Rva2Vucy5icmVhZGNydW1ic0NvbG9yU2VwYXJhdG9yfSk7XG4gICAgb3BhY2l0eTogdmFyKCR7dG9rZW5zLmJyZWFkY3J1bWJzT3BhY2l0eX0pO1xuYDtcbiJdfQ== */"));
|
33
36
|
var Separator = exports.Separator = /*#__PURE__*/(0, _base["default"])(_Icon.IconDisclosureRight, {
|
34
37
|
target: "e1jirwgn0",
|
35
38
|
label: "plasma-new-hope__Separator"
|
36
|
-
})("color:var(", _Breadcrumbs.tokens.breadcrumbsColorSeparator, ");opacity:var(", _Breadcrumbs.tokens.breadcrumbsOpacity, ");" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
39
|
+
})("color:var(", _Breadcrumbs.tokens.breadcrumbsColorSeparator, ");opacity:var(", _Breadcrumbs.tokens.breadcrumbsOpacity, ");" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQnJlYWRjcnVtYnMvQnJlYWRjcnVtYnMuc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTJDb0QiLCJmaWxlIjoiLi4vLi4vLi4vLi4vc3JjLWVtb3Rpb24vY29tcG9uZW50cy9CcmVhZGNydW1icy9CcmVhZGNydW1icy5zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tIC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hY2l0eX0pO1xuYDtcbiJdfQ== */"));
|
@@ -20,7 +20,7 @@ var _Dropdown2 = /*#__PURE__*/require("./Dropdown.tokens");
|
|
20
20
|
var _useKeyboardNavigation = /*#__PURE__*/require("./hooks/useKeyboardNavigation");
|
21
21
|
var _useHashMaps3 = /*#__PURE__*/require("./hooks/useHashMaps");
|
22
22
|
var _FloatingPopover = /*#__PURE__*/require("./FloatingPopover");
|
23
|
-
var _excluded = ["items", "children", "placement", "offset", "closeOnOverlayClick", "onToggle", "size", "view", "itemRole", "className", "listWidth", "listHeight", "listOverflow", "closeOnSelect", "onHover", "onItemSelect", "onItemClick", "trigger", "variant", "hasArrow", "portal"];
|
23
|
+
var _excluded = ["items", "children", "placement", "offset", "closeOnOverlayClick", "onToggle", "size", "view", "itemRole", "className", "listWidth", "listHeight", "listOverflow", "closeOnSelect", "onHover", "onItemSelect", "onItemClick", "trigger", "variant", "hasArrow", "alwaysOpened", "portal"];
|
24
24
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
25
25
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
26
26
|
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); }
|
@@ -66,6 +66,8 @@ var dropdownRoot = exports.dropdownRoot = function dropdownRoot(Root) {
|
|
66
66
|
variant = _ref$variant === void 0 ? 'normal' : _ref$variant,
|
67
67
|
_ref$hasArrow = _ref.hasArrow,
|
68
68
|
hasArrow = _ref$hasArrow === void 0 ? true : _ref$hasArrow,
|
69
|
+
_ref$alwaysOpened = _ref.alwaysOpened,
|
70
|
+
alwaysOpened = _ref$alwaysOpened === void 0 ? false : _ref$alwaysOpened,
|
69
71
|
portal = _ref.portal,
|
70
72
|
rest = _objectWithoutProperties(_ref, _excluded);
|
71
73
|
var _useReducer = (0, _react.useReducer)(_pathReducer.pathReducer, []),
|
@@ -86,7 +88,7 @@ var dropdownRoot = exports.dropdownRoot = function dropdownRoot(Root) {
|
|
86
88
|
|
87
89
|
// Логика работы при клике за пределами выпадающего списка
|
88
90
|
var targetRef = (0, _hooks.useOutsideClick)(function (event) {
|
89
|
-
if (!isCurrentListOpen || !closeOnOverlayClick) {
|
91
|
+
if (!isCurrentListOpen || !closeOnOverlayClick || alwaysOpened) {
|
90
92
|
return;
|
91
93
|
}
|
92
94
|
dispatchPath({
|
@@ -100,7 +102,7 @@ var dropdownRoot = exports.dropdownRoot = function dropdownRoot(Root) {
|
|
100
102
|
}
|
101
103
|
}, floatingPopoverRef);
|
102
104
|
var handleGlobalToggle = function handleGlobalToggle(opened, event) {
|
103
|
-
if (opened) {
|
105
|
+
if (alwaysOpened || opened) {
|
104
106
|
dispatchPath({
|
105
107
|
type: 'opened_first_level'
|
106
108
|
});
|
@@ -129,7 +131,7 @@ var dropdownRoot = exports.dropdownRoot = function dropdownRoot(Root) {
|
|
129
131
|
onItemClick: onItemClick
|
130
132
|
}),
|
131
133
|
onKeyDown = _useKeyNavigation.onKeyDown;
|
132
|
-
var isCurrentListOpen = Boolean(path[0]);
|
134
|
+
var isCurrentListOpen = alwaysOpened || Boolean(path[0]);
|
133
135
|
return /*#__PURE__*/_react["default"].createElement(Context.Provider, {
|
134
136
|
value: {
|
135
137
|
focusedPath: focusedPath,
|
@@ -45,6 +45,14 @@ const meta: Meta<StoryDropdownProps> = {
|
|
45
45
|
type: 'select',
|
46
46
|
},
|
47
47
|
},
|
48
|
+
closeOnOverlayClick: {
|
49
|
+
control: { type: 'boolean' },
|
50
|
+
if: { arg: 'alwaysOpened', truthy: false },
|
51
|
+
},
|
52
|
+
closeOnSelect: {
|
53
|
+
control: { type: 'boolean' },
|
54
|
+
if: { arg: 'alwaysOpened', truthy: false },
|
55
|
+
},
|
48
56
|
},
|
49
57
|
args: {
|
50
58
|
size: 'm',
|
@@ -54,6 +62,7 @@ const meta: Meta<StoryDropdownProps> = {
|
|
54
62
|
offset: [0, 0],
|
55
63
|
listWidth: '',
|
56
64
|
hasArrow: true,
|
65
|
+
alwaysOpened: false,
|
57
66
|
closeOnOverlayClick: true,
|
58
67
|
closeOnSelect: true,
|
59
68
|
},
|
@@ -25,7 +25,6 @@ type CustomStoryTabsProps = {
|
|
25
25
|
contentRight: string;
|
26
26
|
stretch: boolean;
|
27
27
|
helperText: string;
|
28
|
-
maxItemWidth: string;
|
29
28
|
};
|
30
29
|
|
31
30
|
const contentLeftOptions = ['none', 'icon'];
|
@@ -60,6 +59,17 @@ const meta: Meta<StoryTabsProps> = {
|
|
60
59
|
component: Tabs,
|
61
60
|
decorators: [WithTheme],
|
62
61
|
argTypes: {
|
62
|
+
...disableProps([
|
63
|
+
'orientation',
|
64
|
+
'tabItemContentLeft',
|
65
|
+
'pilled',
|
66
|
+
'animated',
|
67
|
+
'view',
|
68
|
+
'as',
|
69
|
+
'forwardedAs',
|
70
|
+
'outsideScroll',
|
71
|
+
'index',
|
72
|
+
]),
|
63
73
|
contentRight: {
|
64
74
|
options: contentRightOptions,
|
65
75
|
control: {
|
@@ -73,17 +83,6 @@ const meta: Meta<StoryTabsProps> = {
|
|
73
83
|
},
|
74
84
|
if: { arg: 'stretch', truthy: false },
|
75
85
|
},
|
76
|
-
...disableProps([
|
77
|
-
'orientation',
|
78
|
-
'tabItemContentLeft',
|
79
|
-
'pilled',
|
80
|
-
'animated',
|
81
|
-
'view',
|
82
|
-
'as',
|
83
|
-
'forwardedAs',
|
84
|
-
'outsideScroll',
|
85
|
-
'index',
|
86
|
-
]),
|
87
86
|
},
|
88
87
|
};
|
89
88
|
|
@@ -100,13 +99,12 @@ const StoryHorizontalDefault = (props: HorizontalStoryTabsProps) => {
|
|
100
99
|
stretch,
|
101
100
|
maxItemWidth,
|
102
101
|
helperText,
|
103
|
-
clip,
|
104
102
|
} = props;
|
105
103
|
const items = Array(itemQuantity).fill(0);
|
106
104
|
const [index, setIndex] = useState(0);
|
107
105
|
|
108
106
|
return (
|
109
|
-
<Tabs clip=
|
107
|
+
<Tabs clip="none" view="divider" hasDivider={hasDivider} stretch={stretch} disabled={disabled} size={size}>
|
110
108
|
{items.map((_, i) => {
|
111
109
|
if (helperText !== '') {
|
112
110
|
return (
|
@@ -653,7 +651,7 @@ const StoryHeaderDefault = (props: HorizontalStoryTabsProps) => {
|
|
653
651
|
size={size as HeaderSize}
|
654
652
|
maxItemWidth={maxItemWidth}
|
655
653
|
>
|
656
|
-
{
|
654
|
+
{`Label${i + 1}`}
|
657
655
|
</TabItem>
|
658
656
|
))}
|
659
657
|
</Tabs>
|
@@ -45,6 +45,14 @@ const meta: Meta<StoryDropdownProps> = {
|
|
45
45
|
type: 'select',
|
46
46
|
},
|
47
47
|
},
|
48
|
+
closeOnOverlayClick: {
|
49
|
+
control: { type: 'boolean' },
|
50
|
+
if: { arg: 'alwaysOpened', truthy: false },
|
51
|
+
},
|
52
|
+
closeOnSelect: {
|
53
|
+
control: { type: 'boolean' },
|
54
|
+
if: { arg: 'alwaysOpened', truthy: false },
|
55
|
+
},
|
48
56
|
},
|
49
57
|
args: {
|
50
58
|
size: 'm',
|
@@ -54,6 +62,7 @@ const meta: Meta<StoryDropdownProps> = {
|
|
54
62
|
offset: [0, 0],
|
55
63
|
listWidth: '',
|
56
64
|
hasArrow: true,
|
65
|
+
alwaysOpened: false,
|
57
66
|
closeOnOverlayClick: true,
|
58
67
|
closeOnSelect: true,
|
59
68
|
},
|
@@ -25,7 +25,6 @@ type CustomStoryTabsProps = {
|
|
25
25
|
contentRight: string;
|
26
26
|
stretch: boolean;
|
27
27
|
helperText: string;
|
28
|
-
maxItemWidth: string;
|
29
28
|
};
|
30
29
|
|
31
30
|
const contentLeftOptions = ['none', 'icon'];
|
@@ -60,6 +59,17 @@ const meta: Meta<StoryTabsProps> = {
|
|
60
59
|
component: Tabs,
|
61
60
|
decorators: [WithTheme],
|
62
61
|
argTypes: {
|
62
|
+
...disableProps([
|
63
|
+
'orientation',
|
64
|
+
'tabItemContentLeft',
|
65
|
+
'pilled',
|
66
|
+
'animated',
|
67
|
+
'view',
|
68
|
+
'as',
|
69
|
+
'forwardedAs',
|
70
|
+
'outsideScroll',
|
71
|
+
'index',
|
72
|
+
]),
|
63
73
|
contentRight: {
|
64
74
|
options: contentRightOptions,
|
65
75
|
control: {
|
@@ -73,17 +83,6 @@ const meta: Meta<StoryTabsProps> = {
|
|
73
83
|
},
|
74
84
|
if: { arg: 'stretch', truthy: false },
|
75
85
|
},
|
76
|
-
...disableProps([
|
77
|
-
'orientation',
|
78
|
-
'tabItemContentLeft',
|
79
|
-
'pilled',
|
80
|
-
'animated',
|
81
|
-
'view',
|
82
|
-
'as',
|
83
|
-
'forwardedAs',
|
84
|
-
'outsideScroll',
|
85
|
-
'index',
|
86
|
-
]),
|
87
86
|
},
|
88
87
|
};
|
89
88
|
|
@@ -100,13 +99,12 @@ const StoryHorizontalDefault = (props: HorizontalStoryTabsProps) => {
|
|
100
99
|
stretch,
|
101
100
|
maxItemWidth,
|
102
101
|
helperText,
|
103
|
-
clip,
|
104
102
|
} = props;
|
105
103
|
const items = Array(itemQuantity).fill(0);
|
106
104
|
const [index, setIndex] = useState(0);
|
107
105
|
|
108
106
|
return (
|
109
|
-
<Tabs clip=
|
107
|
+
<Tabs clip="none" view="divider" hasDivider={hasDivider} stretch={stretch} disabled={disabled} size={size}>
|
110
108
|
{items.map((_, i) => {
|
111
109
|
if (helperText !== '') {
|
112
110
|
return (
|