@salutejs/plasma-new-hope 0.190.0-canary.1552.11794692529.0 → 0.190.1-canary.1532.11798057558.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 +7 -14
- package/cjs/components/Breadcrumbs/Breadcrumbs.styles.js.map +1 -1
- package/cjs/components/Breadcrumbs/{Breadcrumbs.styles_19b6ey4.css → Breadcrumbs.styles_1icsgdr.css} +1 -1
- package/cjs/components/Breadcrumbs/utils/index.css +3 -3
- package/cjs/components/Combobox/ComboboxNew/Combobox.css +0 -2
- package/cjs/components/Combobox/ComboboxNew/Combobox.js +6 -31
- package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.css +0 -2
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +0 -2
- package/cjs/components/Dropdown/Dropdown.js +6 -4
- package/cjs/components/Dropdown/Dropdown.js.map +1 -1
- package/cjs/index.css +3 -5
- package/emotion/cjs/components/Breadcrumbs/Breadcrumbs.styles.js +8 -11
- package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.js +7 -32
- package/emotion/cjs/components/Dropdown/Dropdown.js +6 -4
- package/emotion/cjs/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +1 -1
- package/emotion/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +9 -0
- package/emotion/cjs/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +15 -13
- package/emotion/cjs/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +9 -0
- package/emotion/cjs/examples/plasma_web/components/Tabs/Tabs.stories.tsx +14 -12
- package/emotion/es/components/Breadcrumbs/Breadcrumbs.styles.js +8 -11
- package/emotion/es/components/Combobox/ComboboxNew/Combobox.js +7 -33
- package/emotion/es/components/Dropdown/Dropdown.js +6 -4
- package/emotion/es/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +1 -1
- package/emotion/es/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +9 -0
- package/emotion/es/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +15 -13
- package/emotion/es/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +9 -0
- package/emotion/es/examples/plasma_web/components/Tabs/Tabs.stories.tsx +14 -12
- package/es/components/Breadcrumbs/Breadcrumbs.css +3 -3
- package/es/components/Breadcrumbs/Breadcrumbs.styles.js +7 -14
- package/es/components/Breadcrumbs/Breadcrumbs.styles.js.map +1 -1
- package/es/components/Breadcrumbs/{Breadcrumbs.styles_19b6ey4.css → Breadcrumbs.styles_1icsgdr.css} +1 -1
- package/es/components/Breadcrumbs/utils/index.css +3 -3
- package/es/components/Combobox/ComboboxNew/Combobox.css +0 -2
- package/es/components/Combobox/ComboboxNew/Combobox.js +8 -33
- package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.css +0 -2
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +0 -2
- package/es/components/Dropdown/Dropdown.js +6 -4
- package/es/components/Dropdown/Dropdown.js.map +1 -1
- package/es/index.css +3 -5
- package/package.json +2 -2
- package/styled-components/cjs/components/Breadcrumbs/Breadcrumbs.styles.js +5 -8
- package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.js +7 -32
- package/styled-components/cjs/components/Dropdown/Dropdown.js +6 -4
- package/styled-components/cjs/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +1 -1
- 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 +15 -13
- 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 +14 -12
- package/styled-components/es/components/Breadcrumbs/Breadcrumbs.styles.js +5 -8
- package/styled-components/es/components/Combobox/ComboboxNew/Combobox.js +7 -33
- package/styled-components/es/components/Dropdown/Dropdown.js +6 -4
- package/styled-components/es/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +1 -1
- 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 +15 -13
- 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 +14 -12
- package/types/components/Breadcrumbs/Breadcrumbs.styles.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/Combobox.d.ts +2 -2
- package/types/components/Combobox/ComboboxNew/Combobox.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts +2 -24
- package/types/components/Combobox/ComboboxNew/Combobox.types.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
- package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts +120 -1080
- package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Combobox/Combobox.d.ts +120 -1080
- package/types/examples/plasma_web/components/Combobox/Combobox.d.ts.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/ui/Form/Form.css +0 -1
- package/cjs/components/Combobox/ComboboxNew/ui/Form/Form.js +0 -37
- package/cjs/components/Combobox/ComboboxNew/ui/Form/Form.js.map +0 -1
- package/cjs/components/Combobox/ComboboxNew/ui/Form/Form.styles.js +0 -15
- package/cjs/components/Combobox/ComboboxNew/ui/Form/Form.styles.js.map +0 -1
- package/cjs/components/Combobox/ComboboxNew/ui/Form/Form.styles_22v2s5.css +0 -1
- package/cjs/utils/syntheticEvent.js +0 -55
- package/cjs/utils/syntheticEvent.js.map +0 -1
- package/emotion/cjs/components/Combobox/ComboboxNew/ui/Form/Form.js +0 -38
- package/emotion/cjs/components/Combobox/ComboboxNew/ui/Form/Form.styles.js +0 -13
- package/emotion/cjs/utils/syntheticEvent.js +0 -53
- package/emotion/es/components/Combobox/ComboboxNew/ui/Form/Form.js +0 -29
- package/emotion/es/components/Combobox/ComboboxNew/ui/Form/Form.styles.js +0 -6
- package/emotion/es/utils/syntheticEvent.js +0 -47
- package/es/components/Combobox/ComboboxNew/ui/Form/Form.css +0 -1
- package/es/components/Combobox/ComboboxNew/ui/Form/Form.js +0 -33
- package/es/components/Combobox/ComboboxNew/ui/Form/Form.js.map +0 -1
- package/es/components/Combobox/ComboboxNew/ui/Form/Form.styles.js +0 -11
- package/es/components/Combobox/ComboboxNew/ui/Form/Form.styles.js.map +0 -1
- package/es/components/Combobox/ComboboxNew/ui/Form/Form.styles_22v2s5.css +0 -1
- package/es/utils/syntheticEvent.js +0 -50
- package/es/utils/syntheticEvent.js.map +0 -1
- package/styled-components/cjs/components/Combobox/ComboboxNew/ui/Form/Form.js +0 -38
- package/styled-components/cjs/components/Combobox/ComboboxNew/ui/Form/Form.styles.js +0 -12
- package/styled-components/cjs/utils/syntheticEvent.js +0 -53
- package/styled-components/es/components/Combobox/ComboboxNew/ui/Form/Form.js +0 -29
- package/styled-components/es/components/Combobox/ComboboxNew/ui/Form/Form.styles.js +0 -5
- package/styled-components/es/utils/syntheticEvent.js +0 -47
- package/types/components/Combobox/ComboboxNew/ui/Form/Form.d.ts +0 -6
- package/types/components/Combobox/ComboboxNew/ui/Form/Form.d.ts.map +0 -1
- package/types/components/Combobox/ComboboxNew/ui/Form/Form.styles.d.ts +0 -3
- package/types/components/Combobox/ComboboxNew/ui/Form/Form.styles.d.ts.map +0 -1
- package/types/utils/syntheticEvent.d.ts +0 -4
- package/types/utils/syntheticEvent.d.ts.map +0 -1
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_1icsgdr_shehk3i__3049ecb4{--plasma__private-color:var(--shehk3i-0);--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(--plasma-breadcrumbs-opacity);opacity:var(--shehk3i-1);cursor:pointer;position:relative;}.Breadcrumbs_styles_1icsgdr_shehk3i__3049ecb4::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_1icsgdr_shehk3i__3049ecb4.Breadcrumbs_styles_1icsgdr_focusVisible__3049ecb4:focus::before,.Breadcrumbs_styles_1icsgdr_shehk3i__3049ecb4[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.125rem var(--plasma-breadcrumbs-focus-outline-color);}
|
37
|
+
.Breadcrumbs_styles_1icsgdr_bkgt5xr__3049ecb4{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_1icsgdr_sajtslk__3049ecb4{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);}
|
@@ -581,8 +581,6 @@
|
|
581
581
|
|
582
582
|
.Combobox_styles_18a8p75_s11cn92k__ba048029{--plasma-emptystate-border-radius:var(--plasma-combobox-new-textfield-border-radius);--plasma-emptystate-padding:var(--plasma-combobox-new-empty-state-padding);--plasma-emptystate-font-family:var(--plasma-combobox-new-textfield-font-family);--plasma-emptystate-font-size:var(--plasma-combobox-new-textfield-font-size);--plasma-emptystate-font-style:var(--plasma-combobox-new-textfield-font-style);--plasma-emptystate-font-weight:var(--plasma-combobox-new-textfield-font-weight);--plasma-emptystate-font-letter-spacing:var(--plasma-combobox-new-textfield-letter-spacing);--plasma-emptystate-font-line-height:var(--plasma-combobox-new-textfield-line-height);}
|
583
583
|
|
584
|
-
.Form_styles_22v2s5_sngk5la__4621e773{visibility:hidden;width:0;height:0;opacity:0;margin:0;padding:0;border:none;}
|
585
|
-
|
586
584
|
.Indicator_styles_v8giip_b5hgwnm__ffd4472f{border-radius:100%;}
|
587
585
|
|
588
586
|
.base_1rjb5ly_bu942ai__5ed616c0{background-color:var(--plasma-indicator-color);}
|
@@ -17,23 +17,20 @@ 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
|
+
})("--plasma__private-color:", function (_ref) {
|
21
21
|
var isHref = _ref.isHref;
|
22
|
-
return isHref ? 1 : "var(".concat(_Breadcrumbs.tokens.breadcrumbsOpacity, ")");
|
23
|
-
}, ";cursor:", function (_ref2) {
|
24
|
-
var isHref = _ref2.isHref;
|
25
|
-
return isHref ? 'pointer' : 'auto';
|
26
|
-
}, ";color:", function (_ref3) {
|
27
|
-
var isHref = _ref3.isHref;
|
28
22
|
return isHref ? "var(".concat(_Breadcrumbs.tokens.breadcrumbsColor, ")") : "var(".concat(_Breadcrumbs.tokens.breadcrumbsColorText, ")");
|
29
|
-
}, ";--plasma-link-disabled-opacity:var(", _Breadcrumbs.tokens.breadcrumbsOpacity, ");",
|
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
|
+
return isHref ? 1 : "var(".concat(_Breadcrumbs.tokens.breadcrumbsOpacity, ")");
|
26
|
+
}, ";cursor:pointer;", /*#__PURE__*/(0, _mixins.addFocus)({
|
30
27
|
outlineOffset: '0rem',
|
31
28
|
outlineSize: '0.125rem',
|
32
29
|
outlineRadius: '0rem',
|
33
30
|
outlineColor: /*#__PURE__*/"var(".concat(_Breadcrumbs.tokens.breadcrumbsFocusOutlineColor, ")")
|
34
|
-
}), ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
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,
|
31
|
+
}), ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQnJlYWRjcnVtYnMvQnJlYWRjcnVtYnMuc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWEyRCIsImZpbGUiOiIuLi8uLi8uLi8uLi9zcmMtZW1vdGlvbi9jb21wb25lbnRzL0JyZWFkY3J1bWJzL0JyZWFkY3J1bWJzLnN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHsgbGlua0NvbmZpZyB9IGZyb20gJy4uL0xpbmsnO1xuaW1wb3J0IHsgY29tcG9uZW50LCBtZXJnZUNvbmZpZyB9IGZyb20gJy4uLy4uL2VuZ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9yU2VwYXJhdG9yfSk7XG4gICAgb3BhY2l0eTogdmFyKCR7dG9rZW5zLmJyZWFkY3J1bWJzT3BhY2l0eX0pO1xuYDtcbiJdfQ== */"));
|
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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQnJlYWRjcnVtYnMvQnJlYWRjcnVtYnMuc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWtDdUIiLCJmaWxlIjoiLi4vLi4vLi4vLi4vc3JjLWVtb3Rpb24vY29tcG9uZW50cy9CcmVhZGNydW1icy9CcmVhZGNydW1icy5zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7IGxpbmtDb25maWcgfSBmcm9tICcuLi9MaW5rJztcbmltcG9ydCB7IGNvbXBvbmVudCwgbWVyZ2VDb25maWcgfSBmcm9tICcuLi8uLi9lbmdpbmVzJztcbmltcG9ydCB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clNlcGFyYXRvcn0pO1xuICAgIG9wYWNpdHk6IHZhcigke3Rva2Vucy5icmVhZGNydW1ic09wYWNpdHl9KTtcbmA7XG4iXX0= */"));
|
36
33
|
var Separator = exports.Separator = /*#__PURE__*/(0, _base["default"])(_Icon.IconDisclosureRight, {
|
37
34
|
target: "e1jirwgn0",
|
38
35
|
label: "plasma-new-hope__Separator"
|
39
|
-
})("color:var(", _Breadcrumbs.tokens.breadcrumbsColorSeparator, ");opacity:var(", _Breadcrumbs.tokens.breadcrumbsOpacity, ");" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
36
|
+
})("color:var(", _Breadcrumbs.tokens.breadcrumbsColorSeparator, ");opacity:var(", _Breadcrumbs.tokens.breadcrumbsOpacity, ");" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQnJlYWRjcnVtYnMvQnJlYWRjcnVtYnMuc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWlEb0QiLCJmaWxlIjoiLi4vLi4vLi4vLi4vc3JjLWVtb3Rpb24vY29tcG9uZW50cy9CcmVhZGNydW1icy9CcmVhZGNydW1icy5zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7IGxpbmtDb25maWcgfSBmcm9tICcuLi9MaW5rJztcbmltcG9ydCB7IGNvbXBvbmVudCwgbWVyZ2VDb25maWcgfSBmcm9tICcuLi8uLi9lbmdpbmVzJztcbmltcG9ydCB7IEljb25EaXNjbG9zdXJlUmlnaHQgfSBmcm9tICcuLi9f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Rva2Vucy5icmVhZGNydW1ic09wYWNpdHl9KTtcbmA7XG4iXX0= */"));
|
@@ -1,5 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
4
5
|
value: true
|
5
6
|
});
|
@@ -19,12 +20,10 @@ var _getPathMaps = /*#__PURE__*/require("./hooks/getPathMaps");
|
|
19
20
|
var _Combobox2 = /*#__PURE__*/require("./Combobox.styles");
|
20
21
|
var _base = /*#__PURE__*/require("./variations/_view/base");
|
21
22
|
var _base2 = /*#__PURE__*/require("./variations/_size/base");
|
22
|
-
var
|
23
|
-
var _excluded = ["name", "multiple", "value", "onChange", "defaultValue", "isTargetAmount", "targetAmount", "items", "placement", "label", "placeholder", "helperText", "contentLeft", "textBefore", "textAfter", "variant", "listOverflow", "listHeight", "listWidth", "portal", "renderItem", "view", "size", "labelPlacement", "readOnly", "disabled", "alwaysOpened", "filter", "closeAfterSelect", "renderValue"];
|
23
|
+
var _excluded = ["multiple", "value", "onChange", "isTargetAmount", "targetAmount", "items", "placement", "label", "placeholder", "helperText", "contentLeft", "textBefore", "textAfter", "variant", "listOverflow", "listHeight", "listWidth", "portal", "renderItem", "view", "size", "labelPlacement", "readOnly", "disabled", "alwaysOpened", "filter", "closeAfterSelect", "renderValue"];
|
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); }
|
27
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
28
27
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
29
28
|
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."); }
|
30
29
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
@@ -38,15 +37,12 @@ var Context = exports.Context = /*#__PURE__*/(0, _react.createContext)({});
|
|
38
37
|
/**
|
39
38
|
* Поле ввода с выпадающим списком и возможностью фильтрации и выбора элементов.
|
40
39
|
*/
|
41
|
-
|
42
40
|
var comboboxRoot = exports.comboboxRoot = function comboboxRoot(Root) {
|
43
41
|
return /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
44
42
|
var _valueToItemMap$get, _valueToItemMap$get2, _getItemByFocused;
|
45
|
-
var
|
46
|
-
multiple = props.multiple,
|
43
|
+
var multiple = props.multiple,
|
47
44
|
outerValue = props.value,
|
48
45
|
outerOnChange = props.onChange,
|
49
|
-
defaultValue = props.defaultValue,
|
50
46
|
isTargetAmount = props.isTargetAmount,
|
51
47
|
targetAmount = props.targetAmount,
|
52
48
|
items = props.items,
|
@@ -155,19 +151,9 @@ var comboboxRoot = exports.comboboxRoot = function comboboxRoot(Root) {
|
|
155
151
|
}, floatingPopoverRef);
|
156
152
|
var onChange = function onChange(newValue) {
|
157
153
|
if (outerOnChange) {
|
158
|
-
|
159
|
-
outerOnChange(newValue);
|
160
|
-
}
|
161
|
-
if (!name && multiple && Array.isArray(newValue)) {
|
162
|
-
outerOnChange(newValue);
|
163
|
-
}
|
164
|
-
if (name && _typeof(newValue) === 'object' && !Array.isArray(newValue)) {
|
165
|
-
outerOnChange(newValue);
|
166
|
-
}
|
167
|
-
}
|
168
|
-
if (typeof newValue === 'string' || Array.isArray(newValue)) {
|
169
|
-
setInternalValue(newValue);
|
154
|
+
outerOnChange(newValue);
|
170
155
|
}
|
156
|
+
setInternalValue(newValue);
|
171
157
|
};
|
172
158
|
var handleClickArrow = function handleClickArrow() {
|
173
159
|
if (disabled || readOnly) {
|
@@ -356,24 +342,13 @@ var comboboxRoot = exports.comboboxRoot = function comboboxRoot(Root) {
|
|
356
342
|
// Т.к. вначале нужно отфильтровать и провалидировать outerValue и результат положить в переменную.
|
357
343
|
// А переменную, содержащую сложные типы данных, нельзя помещать в deps.
|
358
344
|
}, [outerValue, internalValue, items]);
|
359
|
-
(0, _react.useEffect)(function () {
|
360
|
-
if (defaultValue) {
|
361
|
-
setInternalValue(defaultValue);
|
362
|
-
}
|
363
|
-
}, [defaultValue]);
|
364
345
|
return /*#__PURE__*/_react["default"].createElement(Root, {
|
365
346
|
size: size,
|
366
347
|
view: view,
|
367
348
|
labelPlacement: labelPlacement,
|
368
349
|
disabled: disabled,
|
369
350
|
readOnly: readOnly
|
370
|
-
},
|
371
|
-
name: name,
|
372
|
-
value: internalValue,
|
373
|
-
multiple: multiple,
|
374
|
-
onChange: onChange,
|
375
|
-
ref: ref
|
376
|
-
}), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(Context.Provider, {
|
351
|
+
}, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(Context.Provider, {
|
377
352
|
value: {
|
378
353
|
focusedPath: focusedPath,
|
379
354
|
checked: checked,
|
@@ -397,7 +372,7 @@ var comboboxRoot = exports.comboboxRoot = function comboboxRoot(Root) {
|
|
397
372
|
listWidth: listWidth,
|
398
373
|
target: function target(referenceRef) {
|
399
374
|
return /*#__PURE__*/_react["default"].createElement(_ui.StyledTextField, _extends({
|
400
|
-
ref:
|
375
|
+
ref: inputForkRef,
|
401
376
|
inputWrapperRef: referenceRef,
|
402
377
|
value: textValue,
|
403
378
|
onChange: handleTextValueChange,
|
@@ -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,
|
@@ -353,11 +353,11 @@ const items = [
|
|
353
353
|
|
354
354
|
const SingleStory = (args: StorySelectProps) => {
|
355
355
|
const [value, setValue] = useState('');
|
356
|
+
|
356
357
|
return (
|
357
358
|
<div style={{ width: '400px' }}>
|
358
359
|
<Combobox
|
359
360
|
{...args}
|
360
|
-
name="mau"
|
361
361
|
items={items}
|
362
362
|
value={value}
|
363
363
|
onChange={setValue}
|
@@ -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,6 +25,7 @@ type CustomStoryTabsProps = {
|
|
25
25
|
contentRight: string;
|
26
26
|
stretch: boolean;
|
27
27
|
helperText: string;
|
28
|
+
maxItemWidth: string;
|
28
29
|
};
|
29
30
|
|
30
31
|
const contentLeftOptions = ['none', 'icon'];
|
@@ -59,17 +60,6 @@ const meta: Meta<StoryTabsProps> = {
|
|
59
60
|
component: Tabs,
|
60
61
|
decorators: [WithTheme],
|
61
62
|
argTypes: {
|
62
|
-
...disableProps([
|
63
|
-
'orientation',
|
64
|
-
'tabItemContentLeft',
|
65
|
-
'pilled',
|
66
|
-
'animated',
|
67
|
-
'view',
|
68
|
-
'as',
|
69
|
-
'forwardedAs',
|
70
|
-
'outsideScroll',
|
71
|
-
'index',
|
72
|
-
]),
|
73
63
|
contentRight: {
|
74
64
|
options: contentRightOptions,
|
75
65
|
control: {
|
@@ -83,6 +73,17 @@ const meta: Meta<StoryTabsProps> = {
|
|
83
73
|
},
|
84
74
|
if: { arg: 'stretch', truthy: false },
|
85
75
|
},
|
76
|
+
...disableProps([
|
77
|
+
'orientation',
|
78
|
+
'tabItemContentLeft',
|
79
|
+
'pilled',
|
80
|
+
'animated',
|
81
|
+
'view',
|
82
|
+
'as',
|
83
|
+
'forwardedAs',
|
84
|
+
'outsideScroll',
|
85
|
+
'index',
|
86
|
+
]),
|
86
87
|
},
|
87
88
|
};
|
88
89
|
|
@@ -99,12 +100,13 @@ const StoryHorizontalDefault = (props: HorizontalStoryTabsProps) => {
|
|
99
100
|
stretch,
|
100
101
|
maxItemWidth,
|
101
102
|
helperText,
|
103
|
+
clip,
|
102
104
|
} = props;
|
103
105
|
const items = Array(itemQuantity).fill(0);
|
104
106
|
const [index, setIndex] = useState(0);
|
105
107
|
|
106
108
|
return (
|
107
|
-
<Tabs clip=
|
109
|
+
<Tabs clip={clip} view="divider" hasDivider={hasDivider} stretch={stretch} disabled={disabled} size={size}>
|
108
110
|
{items.map((_, i) => {
|
109
111
|
if (helperText !== '') {
|
110
112
|
return (
|
@@ -651,7 +653,7 @@ const StoryHeaderDefault = (props: HorizontalStoryTabsProps) => {
|
|
651
653
|
size={size as HeaderSize}
|
652
654
|
maxItemWidth={maxItemWidth}
|
653
655
|
>
|
654
|
-
{
|
656
|
+
{`${labels[i % labels.length]} ${i + 1}`}
|
655
657
|
</TabItem>
|
656
658
|
))}
|
657
659
|
</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,6 +25,7 @@ type CustomStoryTabsProps = {
|
|
25
25
|
contentRight: string;
|
26
26
|
stretch: boolean;
|
27
27
|
helperText: string;
|
28
|
+
maxItemWidth: string;
|
28
29
|
};
|
29
30
|
|
30
31
|
const contentLeftOptions = ['none', 'icon'];
|
@@ -59,17 +60,6 @@ const meta: Meta<StoryTabsProps> = {
|
|
59
60
|
component: Tabs,
|
60
61
|
decorators: [WithTheme],
|
61
62
|
argTypes: {
|
62
|
-
...disableProps([
|
63
|
-
'orientation',
|
64
|
-
'tabItemContentLeft',
|
65
|
-
'pilled',
|
66
|
-
'animated',
|
67
|
-
'view',
|
68
|
-
'as',
|
69
|
-
'forwardedAs',
|
70
|
-
'outsideScroll',
|
71
|
-
'index',
|
72
|
-
]),
|
73
63
|
contentRight: {
|
74
64
|
options: contentRightOptions,
|
75
65
|
control: {
|
@@ -83,6 +73,17 @@ const meta: Meta<StoryTabsProps> = {
|
|
83
73
|
},
|
84
74
|
if: { arg: 'stretch', truthy: false },
|
85
75
|
},
|
76
|
+
...disableProps([
|
77
|
+
'orientation',
|
78
|
+
'tabItemContentLeft',
|
79
|
+
'pilled',
|
80
|
+
'animated',
|
81
|
+
'view',
|
82
|
+
'as',
|
83
|
+
'forwardedAs',
|
84
|
+
'outsideScroll',
|
85
|
+
'index',
|
86
|
+
]),
|
86
87
|
},
|
87
88
|
};
|
88
89
|
|
@@ -99,12 +100,13 @@ const StoryHorizontalDefault = (props: HorizontalStoryTabsProps) => {
|
|
99
100
|
stretch,
|
100
101
|
maxItemWidth,
|
101
102
|
helperText,
|
103
|
+
clip,
|
102
104
|
} = props;
|
103
105
|
const items = Array(itemQuantity).fill(0);
|
104
106
|
const [index, setIndex] = useState(0);
|
105
107
|
|
106
108
|
return (
|
107
|
-
<Tabs clip=
|
109
|
+
<Tabs clip={clip} view="divider" hasDivider={hasDivider} stretch={stretch} disabled={disabled} size={size}>
|
108
110
|
{items.map((_, i) => {
|
109
111
|
if (helperText !== '') {
|
110
112
|
return (
|
@@ -10,23 +10,20 @@ var Link = /*#__PURE__*/component(mergedLinkConfig);
|
|
10
10
|
export var StyledLink = /*#__PURE__*/_styled(Link, {
|
11
11
|
target: "e1jirwgn1",
|
12
12
|
label: "plasma-new-hope__StyledLink"
|
13
|
-
})("
|
13
|
+
})("--plasma__private-color:", function (_ref) {
|
14
14
|
var isHref = _ref.isHref;
|
15
|
-
return isHref ? 1 : "var(".concat(tokens.breadcrumbsOpacity, ")");
|
16
|
-
}, ";cursor:", function (_ref2) {
|
17
|
-
var isHref = _ref2.isHref;
|
18
|
-
return isHref ? 'pointer' : 'auto';
|
19
|
-
}, ";color:", function (_ref3) {
|
20
|
-
var isHref = _ref3.isHref;
|
21
15
|
return isHref ? "var(".concat(tokens.breadcrumbsColor, ")") : "var(".concat(tokens.breadcrumbsColorText, ")");
|
22
|
-
}, ";--plasma-link-disabled-opacity:var(", tokens.breadcrumbsOpacity, ");",
|
16
|
+
}, ";--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(", tokens.breadcrumbsOpacity, ");opacity:", function (_ref2) {
|
17
|
+
var isHref = _ref2.isHref;
|
18
|
+
return isHref ? 1 : "var(".concat(tokens.breadcrumbsOpacity, ")");
|
19
|
+
}, ";cursor:pointer;", /*#__PURE__*/addFocus({
|
23
20
|
outlineOffset: '0rem',
|
24
21
|
outlineSize: '0.125rem',
|
25
22
|
outlineRadius: '0rem',
|
26
23
|
outlineColor: /*#__PURE__*/"var(".concat(tokens.breadcrumbsFocusOutlineColor, ")")
|
27
|
-
}), ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
28
|
-
export var base = /*#__PURE__*/css("display:flex;flex-direction:row;align-items:center;gap:var(", tokens.breadcrumbsGap, ");color:var(", tokens.breadcrumbsColor, ");font-family:var(", tokens.breadcrumbsFontFamily, ");font-size:var(", tokens.breadcrumbsFontSize, ");font-weight:var(", tokens.breadcrumbsFontWeight, ");font-style:var(", tokens.breadcrumbsFontStyle, ");letter-spacing:var(", tokens.breadcrumbsLetterSpacing, ");line-height:var(", tokens.breadcrumbsLineHeight, ");;label:plasma-new-hope__base;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
24
|
+
}), ";" + (process.env.NODE_ENV === "production" ? ""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lseTogdmFyKCR7dG9rZW5zLmJyZWFkY3J1bWJzRm9udEZhbWlseX0pO1xuICAgIGZvbnQtc2l6ZTogdmFyKCR7dG9rZW5zLmJyZWFkY3J1bWJzRm9udFNpemV9KTtcbiAgICBmb250LXdlaWdodDogdmFyKCR7dG9rZW5zLmJyZWFkY3J1bWJzRm9udFdlaWdodH0pO1xuICAgIGZvbnQtc3R5bGU6IHZhcigke3Rva2Vucy5icmVhZGNydW1ic0ZvbnRTdHlsZX0pO1xuICAgIGxldHRlci1zcGFjaW5nOiB2YXIoJHt0b2tlbnMuYnJlYWRjcnVtYnNMZXR0ZXJTcGFjaW5nfSk7XG4gICAgbGluZS1oZWlnaHQ6IHZhcigke3Rva2Vucy5icmVhZGNydW1ic0xpbmVIZWlnaHR9KTtcbmA7XG5cbmV4cG9ydCBjb25zdCBTZXBhcmF0b3IgPSBzdHlsZWQoSWNvbkRpc2Nsb3N1cmVSaWdodClgXG4gICAgY29sb3I6IHZhcigke3Rva2Vucy5icmVhZGNydW1ic0NvbG9yU2VwYXJhdG9yfSk7XG4gICAgb3BhY2l0eTogdmFyKCR7dG9rZW5zLmJyZWFkY3J1bWJzT3BhY2l0eX0pO1xuYDtcbiJdfQ== */"));
|
25
|
+
export var base = /*#__PURE__*/css("display:flex;flex-direction:row;align-items:center;gap:var(", tokens.breadcrumbsGap, ");color:var(", tokens.breadcrumbsColor, ");font-family:var(", tokens.breadcrumbsFontFamily, ");font-size:var(", tokens.breadcrumbsFontSize, ");font-weight:var(", tokens.breadcrumbsFontWeight, ");font-style:var(", tokens.breadcrumbsFontStyle, ");letter-spacing:var(", tokens.breadcrumbsLetterSpacing, ");line-height:var(", tokens.breadcrumbsLineHeight, ");;label:plasma-new-hope__base;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMv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1ic0ZvbnRTaXplfSk7XG4gICAgZm9udC13ZWlnaHQ6IHZhcigke3Rva2Vucy5icmVhZGNydW1ic0ZvbnRXZWlnaHR9KTtcbiAgICBmb250LXN0eWxlOiB2YXIoJHt0b2tlbnMuYnJlYWRjcnVtYnNGb250U3R5bGV9KTtcbiAgICBsZXR0ZXItc3BhY2luZzogdmFyKCR7dG9rZW5zLmJyZWFkY3J1bWJzTGV0dGVyU3BhY2luZ30pO1xuICAgIGxpbmUtaGVpZ2h0OiB2YXIoJHt0b2tlbnMuYnJlYWRjcnVtYnNMaW5lSGVpZ2h0fSk7XG5gO1xuXG5leHBvcnQgY29uc3QgU2VwYXJhdG9yID0gc3R5bGVkKEljb25EaXNjbG9zdXJlUmlnaHQpYFxuICAgIGNvbG9yOiB2YXIoJHt0b2tlbnMuYnJlYWRjcnVtYnNDb2xvclNlcGFyYXRvcn0pO1xuICAgIG9wYWNpdHk6IHZhcigke3Rva2Vucy5icmVhZGNydW1ic09wYWNpdHl9KTtcbmA7XG4iXX0= */"));
|
29
26
|
export var Separator = /*#__PURE__*/_styled(IconDisclosureRight, {
|
30
27
|
target: "e1jirwgn0",
|
31
28
|
label: "plasma-new-hope__Separator"
|
32
|
-
})("color:var(", tokens.breadcrumbsColorSeparator, ");opacity:var(", tokens.breadcrumbsOpacity, ");" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
29
|
+
})("color:var(", tokens.breadcrumbsColorSeparator, ");opacity:var(", tokens.breadcrumbsOpacity, ");" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQnJlYWRjcnVtYnMvQnJlYWRjcnVtYnMuc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWlEb0QiLCJmaWxlIjoi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LXN0eWxlOiB2YXIoJHt0b2tlbnMuYnJlYWRjcnVtYnNGb250U3R5bGV9KTtcbiAgICBsZXR0ZXItc3BhY2luZzogdmFyKCR7dG9rZW5zLmJyZWFkY3J1bWJzTGV0dGVyU3BhY2luZ30pO1xuICAgIGxpbmUtaGVpZ2h0OiB2YXIoJHt0b2tlbnMuYnJlYWRjcnVtYnNMaW5lSGVpZ2h0fSk7XG5gO1xuXG5leHBvcnQgY29uc3QgU2VwYXJhdG9yID0gc3R5bGVkKEljb25EaXNjbG9zdXJlUmlnaHQpYFxuICAgIGNvbG9yOiB2YXIoJHt0b2tlbnMuYnJlYWRjcnVtYnNDb2xvclNlcGFyYXRvcn0pO1xuICAgIG9wYWNpdHk6IHZhcigke3Rva2Vucy5icmVhZGNydW1ic09wYWNpdHl9KTtcbmA7XG4iXX0= */"));
|
@@ -1,6 +1,5 @@
|
|
1
|
-
var _excluded = ["
|
1
|
+
var _excluded = ["multiple", "value", "onChange", "isTargetAmount", "targetAmount", "items", "placement", "label", "placeholder", "helperText", "contentLeft", "textBefore", "textAfter", "variant", "listOverflow", "listHeight", "listWidth", "portal", "renderItem", "view", "size", "labelPlacement", "readOnly", "disabled", "alwaysOpened", "filter", "closeAfterSelect", "renderValue"];
|
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
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
4
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
5
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."); }
|
6
5
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
@@ -9,7 +8,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
9
8
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
10
9
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
11
10
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
12
|
-
import React, { forwardRef, useState, useReducer, useMemo, createContext, useLayoutEffect, useRef
|
11
|
+
import React, { forwardRef, useState, useReducer, useMemo, createContext, useLayoutEffect, useRef } from 'react';
|
13
12
|
import { safeUseId, useForkRef } from '@salutejs/plasma-core';
|
14
13
|
import { isEmpty } from '../../../utils';
|
15
14
|
import { useOutsideClick } from '../../../hooks';
|
@@ -24,21 +23,17 @@ import { getPathMap, getTreeMaps } from './hooks/getPathMaps';
|
|
24
23
|
import { Ul, base, StyledArrow, IconArrowWrapper, StyledEmptyState } from './Combobox.styles';
|
25
24
|
import { base as viewCSS } from './variations/_view/base';
|
26
25
|
import { base as sizeCSS } from './variations/_size/base';
|
27
|
-
import { Form } from './ui/Form/Form';
|
28
26
|
export var Context = /*#__PURE__*/createContext({});
|
29
27
|
|
30
28
|
/**
|
31
29
|
* Поле ввода с выпадающим списком и возможностью фильтрации и выбора элементов.
|
32
30
|
*/
|
33
|
-
|
34
31
|
export var comboboxRoot = function comboboxRoot(Root) {
|
35
32
|
return /*#__PURE__*/forwardRef(function (props, ref) {
|
36
33
|
var _valueToItemMap$get, _valueToItemMap$get2, _getItemByFocused;
|
37
|
-
var
|
38
|
-
multiple = props.multiple,
|
34
|
+
var multiple = props.multiple,
|
39
35
|
outerValue = props.value,
|
40
36
|
outerOnChange = props.onChange,
|
41
|
-
defaultValue = props.defaultValue,
|
42
37
|
isTargetAmount = props.isTargetAmount,
|
43
38
|
targetAmount = props.targetAmount,
|
44
39
|
items = props.items,
|
@@ -147,19 +142,9 @@ export var comboboxRoot = function comboboxRoot(Root) {
|
|
147
142
|
}, floatingPopoverRef);
|
148
143
|
var onChange = function onChange(newValue) {
|
149
144
|
if (outerOnChange) {
|
150
|
-
|
151
|
-
outerOnChange(newValue);
|
152
|
-
}
|
153
|
-
if (!name && multiple && Array.isArray(newValue)) {
|
154
|
-
outerOnChange(newValue);
|
155
|
-
}
|
156
|
-
if (name && _typeof(newValue) === 'object' && !Array.isArray(newValue)) {
|
157
|
-
outerOnChange(newValue);
|
158
|
-
}
|
159
|
-
}
|
160
|
-
if (typeof newValue === 'string' || Array.isArray(newValue)) {
|
161
|
-
setInternalValue(newValue);
|
145
|
+
outerOnChange(newValue);
|
162
146
|
}
|
147
|
+
setInternalValue(newValue);
|
163
148
|
};
|
164
149
|
var handleClickArrow = function handleClickArrow() {
|
165
150
|
if (disabled || readOnly) {
|
@@ -348,24 +333,13 @@ export var comboboxRoot = function comboboxRoot(Root) {
|
|
348
333
|
// Т.к. вначале нужно отфильтровать и провалидировать outerValue и результат положить в переменную.
|
349
334
|
// А переменную, содержащую сложные типы данных, нельзя помещать в deps.
|
350
335
|
}, [outerValue, internalValue, items]);
|
351
|
-
useEffect(function () {
|
352
|
-
if (defaultValue) {
|
353
|
-
setInternalValue(defaultValue);
|
354
|
-
}
|
355
|
-
}, [defaultValue]);
|
356
336
|
return /*#__PURE__*/React.createElement(Root, {
|
357
337
|
size: size,
|
358
338
|
view: view,
|
359
339
|
labelPlacement: labelPlacement,
|
360
340
|
disabled: disabled,
|
361
341
|
readOnly: readOnly
|
362
|
-
},
|
363
|
-
name: name,
|
364
|
-
value: internalValue,
|
365
|
-
multiple: multiple,
|
366
|
-
onChange: onChange,
|
367
|
-
ref: ref
|
368
|
-
}), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Context.Provider, {
|
342
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Context.Provider, {
|
369
343
|
value: {
|
370
344
|
focusedPath: focusedPath,
|
371
345
|
checked: checked,
|
@@ -389,7 +363,7 @@ export var comboboxRoot = function comboboxRoot(Root) {
|
|
389
363
|
listWidth: listWidth,
|
390
364
|
target: function target(referenceRef) {
|
391
365
|
return /*#__PURE__*/React.createElement(StyledTextField, _extends({
|
392
|
-
ref:
|
366
|
+
ref: inputForkRef,
|
393
367
|
inputWrapperRef: referenceRef,
|
394
368
|
value: textValue,
|
395
369
|
onChange: handleTextValueChange,
|