@salutejs/plasma-new-hope 0.76.3-canary.1180.8720362393.0 → 0.77.0-canary.1185.8720195819.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Avatar/Avatar.js +1 -35
- package/cjs/components/Avatar/Avatar.js.map +1 -1
- package/cjs/components/Combobox/Combobox.css +2 -2
- package/cjs/components/Combobox/ui/ComboboxDivider/ComboboxDivider.css +2 -2
- package/cjs/components/Combobox/ui/ComboboxDivider/ComboboxDivider.js +1 -1
- package/cjs/components/Combobox/ui/ComboboxFooter/ComboboxFooter.css +2 -2
- package/cjs/components/Combobox/ui/ComboboxFooter/ComboboxFooter.js +1 -1
- package/cjs/components/Combobox/ui/ComboboxGroup/ComboboxGroup.css +2 -2
- package/cjs/components/Combobox/ui/ComboboxGroup/ComboboxGroup.js +1 -1
- package/cjs/components/Combobox/ui/ComboboxHeader/ComboboxHeader.css +2 -2
- package/cjs/components/Combobox/ui/ComboboxHeader/ComboboxHeader.js +1 -1
- package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.css +2 -2
- package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.js +1 -1
- package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js +1 -1
- package/cjs/components/Dropdown/Dropdown.css +2 -2
- package/cjs/components/Dropdown/Dropdown.js +27 -4
- package/cjs/components/Dropdown/Dropdown.js.map +1 -1
- package/cjs/components/Dropdown/Dropdown.styles.js +1 -1
- package/cjs/components/Dropdown/Dropdown.styles.js.map +1 -1
- package/cjs/components/Dropdown/{Dropdown.styles_1daxhqh.css → Dropdown.styles_13400l5.css} +1 -1
- package/cjs/components/Dropdown/Dropdown.tokens.js +1 -0
- package/cjs/components/Dropdown/Dropdown.tokens.js.map +1 -1
- package/cjs/components/Dropdown/hooks/useKeyboardNavigation.js +81 -0
- package/cjs/components/Dropdown/hooks/useKeyboardNavigation.js.map +1 -0
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +5 -3
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
- package/cjs/components/Dropdown/utils/index.js +43 -0
- package/cjs/components/Dropdown/utils/index.js.map +1 -1
- package/cjs/components/Pagination/Pagination.css +2 -2
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +2 -2
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -1
- package/cjs/components/Select/Select.css +2 -2
- package/cjs/components/Select/ui/SelectDivider/SelectDivider.css +2 -2
- package/cjs/components/Select/ui/SelectDivider/SelectDivider.js +1 -1
- package/cjs/components/Select/ui/SelectFooter/SelectFooter.css +2 -2
- package/cjs/components/Select/ui/SelectFooter/SelectFooter.js +1 -1
- package/cjs/components/Select/ui/SelectGroup/SelectGroup.css +2 -2
- package/cjs/components/Select/ui/SelectGroup/SelectGroup.js +1 -1
- package/cjs/components/Select/ui/SelectHeader/SelectHeader.css +2 -2
- package/cjs/components/Select/ui/SelectHeader/SelectHeader.js +1 -1
- package/cjs/components/Select/ui/SelectItem/SelectItem.css +2 -2
- package/cjs/components/Select/ui/SelectItem/SelectItem.js +1 -1
- package/cjs/components/Select/ui/SelectItem/SelectItem.styles.js +1 -1
- package/cjs/index.css +2 -2
- package/cjs/index.js +2 -0
- package/cjs/index.js.map +1 -1
- package/es/components/Avatar/Avatar.js +2 -36
- package/es/components/Avatar/Avatar.js.map +1 -1
- package/es/components/Combobox/Combobox.css +2 -2
- package/es/components/Combobox/ui/ComboboxDivider/ComboboxDivider.css +2 -2
- package/es/components/Combobox/ui/ComboboxDivider/ComboboxDivider.js +1 -1
- package/es/components/Combobox/ui/ComboboxFooter/ComboboxFooter.css +2 -2
- package/es/components/Combobox/ui/ComboboxFooter/ComboboxFooter.js +1 -1
- package/es/components/Combobox/ui/ComboboxGroup/ComboboxGroup.css +2 -2
- package/es/components/Combobox/ui/ComboboxGroup/ComboboxGroup.js +1 -1
- package/es/components/Combobox/ui/ComboboxHeader/ComboboxHeader.css +2 -2
- package/es/components/Combobox/ui/ComboboxHeader/ComboboxHeader.js +1 -1
- package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.css +2 -2
- package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.js +1 -1
- package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js +1 -1
- package/es/components/Dropdown/Dropdown.css +2 -2
- package/es/components/Dropdown/Dropdown.js +29 -6
- package/es/components/Dropdown/Dropdown.js.map +1 -1
- package/es/components/Dropdown/Dropdown.styles.js +1 -1
- package/es/components/Dropdown/Dropdown.styles.js.map +1 -1
- package/es/components/Dropdown/{Dropdown.styles_1daxhqh.css → Dropdown.styles_13400l5.css} +1 -1
- package/es/components/Dropdown/Dropdown.tokens.js +1 -0
- package/es/components/Dropdown/Dropdown.tokens.js.map +1 -1
- package/es/components/Dropdown/hooks/useKeyboardNavigation.js +76 -0
- package/es/components/Dropdown/hooks/useKeyboardNavigation.js.map +1 -0
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +5 -3
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
- package/es/components/Dropdown/utils/index.js +45 -3
- package/es/components/Dropdown/utils/index.js.map +1 -1
- package/es/components/Pagination/Pagination.css +2 -2
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +2 -2
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -1
- package/es/components/Select/Select.css +2 -2
- package/es/components/Select/ui/SelectDivider/SelectDivider.css +2 -2
- package/es/components/Select/ui/SelectDivider/SelectDivider.js +1 -1
- package/es/components/Select/ui/SelectFooter/SelectFooter.css +2 -2
- package/es/components/Select/ui/SelectFooter/SelectFooter.js +1 -1
- package/es/components/Select/ui/SelectGroup/SelectGroup.css +2 -2
- package/es/components/Select/ui/SelectGroup/SelectGroup.js +1 -1
- package/es/components/Select/ui/SelectHeader/SelectHeader.css +2 -2
- package/es/components/Select/ui/SelectHeader/SelectHeader.js +1 -1
- package/es/components/Select/ui/SelectItem/SelectItem.css +2 -2
- package/es/components/Select/ui/SelectItem/SelectItem.js +1 -1
- package/es/components/Select/ui/SelectItem/SelectItem.styles.js +1 -1
- package/es/index.css +2 -2
- package/es/index.js +1 -0
- package/es/index.js.map +1 -1
- package/package.json +2 -2
- package/styled-components/cjs/components/Avatar/Avatar.js +1 -40
- package/styled-components/cjs/components/Avatar/Avatar.template-doc.mdx +2 -52
- package/styled-components/cjs/components/Dropdown/Dropdown.js +28 -6
- package/styled-components/cjs/components/Dropdown/Dropdown.styles.js +1 -1
- package/styled-components/cjs/components/Dropdown/Dropdown.tokens.js +1 -0
- package/styled-components/cjs/components/Dropdown/hooks/useKeyboardNavigation.js +83 -0
- package/styled-components/cjs/components/Dropdown/index.js +9 -1
- package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +5 -3
- package/styled-components/cjs/components/Dropdown/utils/index.js +48 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Avatar/Avatar.stories.tsx +1 -26
- package/styled-components/cjs/examples/plasma_b2c/components/AvatarGroup/AvatarGroup.stories.tsx +18 -36
- package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.config.js +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.stories.tsx +27 -7
- package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.config.js +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.stories.tsx +30 -11
- package/styled-components/cjs/examples/plasma_web/components/Avatar/Avatar.stories.tsx +1 -26
- package/styled-components/cjs/examples/plasma_web/components/Dropdown/Normal/Dropdown.config.js +1 -1
- package/styled-components/cjs/examples/plasma_web/components/Dropdown/Normal/Dropdown.stories.tsx +27 -8
- package/styled-components/cjs/examples/plasma_web/components/Dropdown/Tight/Dropdown.config.js +1 -1
- package/styled-components/cjs/examples/plasma_web/components/Dropdown/Tight/Dropdown.stories.tsx +30 -11
- package/styled-components/cjs/examples/sds_engineer/components/Avatar/Avatar.stories.tsx +1 -27
- package/styled-components/es/components/Avatar/Avatar.js +1 -41
- package/styled-components/es/components/Avatar/Avatar.template-doc.mdx +2 -52
- package/styled-components/es/components/Dropdown/Dropdown.js +29 -6
- package/styled-components/es/components/Dropdown/Dropdown.styles.js +1 -1
- package/styled-components/es/components/Dropdown/Dropdown.tokens.js +1 -0
- package/styled-components/es/components/Dropdown/hooks/useKeyboardNavigation.js +77 -0
- package/styled-components/es/components/Dropdown/index.js +1 -0
- package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +5 -3
- package/styled-components/es/components/Dropdown/utils/index.js +48 -1
- package/styled-components/es/examples/plasma_b2c/components/Avatar/Avatar.stories.tsx +1 -26
- package/styled-components/es/examples/plasma_b2c/components/AvatarGroup/AvatarGroup.stories.tsx +18 -36
- package/styled-components/es/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.config.js +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.stories.tsx +27 -7
- package/styled-components/es/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.config.js +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.stories.tsx +30 -11
- package/styled-components/es/examples/plasma_web/components/Avatar/Avatar.stories.tsx +1 -26
- package/styled-components/es/examples/plasma_web/components/Dropdown/Normal/Dropdown.config.js +1 -1
- package/styled-components/es/examples/plasma_web/components/Dropdown/Normal/Dropdown.stories.tsx +27 -8
- package/styled-components/es/examples/plasma_web/components/Dropdown/Tight/Dropdown.config.js +1 -1
- package/styled-components/es/examples/plasma_web/components/Dropdown/Tight/Dropdown.stories.tsx +30 -11
- package/styled-components/es/examples/sds_engineer/components/Avatar/Avatar.stories.tsx +1 -27
- package/types/components/Avatar/Avatar.d.ts +1 -3
- package/types/components/Avatar/Avatar.d.ts.map +1 -1
- package/types/components/Avatar/Avatar.types.d.ts +0 -7
- package/types/components/Avatar/Avatar.types.d.ts.map +1 -1
- package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/types/components/Dropdown/Dropdown.tokens.d.ts +1 -0
- package/types/components/Dropdown/Dropdown.tokens.d.ts.map +1 -1
- package/types/components/Dropdown/Dropdown.types.d.ts +7 -2
- package/types/components/Dropdown/Dropdown.types.d.ts.map +1 -1
- package/types/components/Dropdown/hooks/useKeyboardNavigation.d.ts +13 -0
- package/types/components/Dropdown/hooks/useKeyboardNavigation.d.ts.map +1 -0
- package/types/components/Dropdown/index.d.ts +1 -0
- package/types/components/Dropdown/index.d.ts.map +1 -1
- package/types/components/Dropdown/ui/DropdownItem/DropdownItem.d.ts.map +1 -1
- package/types/components/Dropdown/utils/index.d.ts +5 -2
- package/types/components/Dropdown/utils/index.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Avatar/Avatar.d.ts +0 -2
- package/types/examples/plasma_b2c/components/Avatar/Avatar.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Avatar/Avatar.d.ts +0 -2
- package/types/examples/plasma_web/components/Avatar/Avatar.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Dropdown/Normal/Dropdown.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Dropdown/Tight/Dropdown.config.d.ts.map +1 -1
- package/types/examples/sds_engineer/components/Avatar/Avatar.d.ts +0 -1
- package/types/examples/sds_engineer/components/Avatar/Avatar.d.ts.map +1 -1
@@ -0,0 +1,81 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
var _rollupPluginBabelHelpers = require('../../../_virtual/_rollupPluginBabelHelpers.js');
|
6
|
+
var React = require('react');
|
7
|
+
|
8
|
+
var Keys = {
|
9
|
+
Tab: 'Tab',
|
10
|
+
Enter: 'Enter',
|
11
|
+
Escape: 'Escape',
|
12
|
+
ArrowUp: 'ArrowUp',
|
13
|
+
ArrowDown: 'ArrowDown'
|
14
|
+
};
|
15
|
+
var useKeyNavigation = function useKeyNavigation(_ref) {
|
16
|
+
var itemsRefs = _ref.itemsRefs,
|
17
|
+
opened = _ref.opened,
|
18
|
+
updateOpened = _ref.updateOpened;
|
19
|
+
var _useState = React.useState(0),
|
20
|
+
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
21
|
+
selectItemIndex = _useState2[0],
|
22
|
+
setSelectItemIndex = _useState2[1];
|
23
|
+
React.useEffect(function () {
|
24
|
+
var _itemsRefs$current, _itemsRefs$current$se;
|
25
|
+
if (!opened) {
|
26
|
+
setSelectItemIndex(0);
|
27
|
+
return;
|
28
|
+
}
|
29
|
+
itemsRefs === null || itemsRefs === void 0 ? void 0 : (_itemsRefs$current = itemsRefs.current) === null || _itemsRefs$current === void 0 ? void 0 : (_itemsRefs$current$se = _itemsRefs$current[selectItemIndex]) === null || _itemsRefs$current$se === void 0 ? void 0 : _itemsRefs$current$se.focus();
|
30
|
+
}, [opened]);
|
31
|
+
var onKeyDownTarget = React.useCallback(function (event) {
|
32
|
+
var _focusedItem, _focusedItem2;
|
33
|
+
event.stopPropagation();
|
34
|
+
var code = event.code;
|
35
|
+
var itemsRefsCount = itemsRefs.current.length;
|
36
|
+
var newOpened = opened;
|
37
|
+
var newSelectItemIndex = selectItemIndex;
|
38
|
+
var focusedItem = null;
|
39
|
+
if (code === Keys.Escape || code === Keys.Tab) {
|
40
|
+
newOpened = false;
|
41
|
+
newSelectItemIndex = -1;
|
42
|
+
updateOpened === null || updateOpened === void 0 ? void 0 : updateOpened(newOpened, event);
|
43
|
+
}
|
44
|
+
if (code === Keys.ArrowUp) {
|
45
|
+
var _itemsRefs$current2;
|
46
|
+
newSelectItemIndex = newSelectItemIndex - 1 === -1 ? itemsRefsCount - 1 : newSelectItemIndex - 1;
|
47
|
+
focusedItem = itemsRefs === null || itemsRefs === void 0 ? void 0 : (_itemsRefs$current2 = itemsRefs.current) === null || _itemsRefs$current2 === void 0 ? void 0 : _itemsRefs$current2[newSelectItemIndex];
|
48
|
+
}
|
49
|
+
if (code === Keys.ArrowDown) {
|
50
|
+
var _itemsRefs$current3;
|
51
|
+
newSelectItemIndex = newSelectItemIndex + 1 === itemsRefsCount ? 0 : newSelectItemIndex + 1;
|
52
|
+
focusedItem = itemsRefs === null || itemsRefs === void 0 ? void 0 : (_itemsRefs$current3 = itemsRefs.current) === null || _itemsRefs$current3 === void 0 ? void 0 : _itemsRefs$current3[newSelectItemIndex];
|
53
|
+
}
|
54
|
+
if (code === Keys.Enter) {
|
55
|
+
event.preventDefault();
|
56
|
+
var item = itemsRefs.current[newSelectItemIndex];
|
57
|
+
|
58
|
+
// TODO: #1016
|
59
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
60
|
+
// @ts-ignore
|
61
|
+
if (item !== null && item !== void 0 && item.ariaDisabled) {
|
62
|
+
return;
|
63
|
+
}
|
64
|
+
item === null || item === void 0 ? void 0 : item.click();
|
65
|
+
}
|
66
|
+
setSelectItemIndex(newSelectItemIndex);
|
67
|
+
(_focusedItem = focusedItem) === null || _focusedItem === void 0 ? void 0 : _focusedItem.focus();
|
68
|
+
(_focusedItem2 = focusedItem) === null || _focusedItem2 === void 0 ? void 0 : _focusedItem2.scrollIntoView({
|
69
|
+
behavior: 'smooth',
|
70
|
+
block: 'center',
|
71
|
+
inline: 'center'
|
72
|
+
});
|
73
|
+
}, [opened, selectItemIndex, updateOpened]);
|
74
|
+
return {
|
75
|
+
onKeyDownTarget: onKeyDownTarget
|
76
|
+
};
|
77
|
+
};
|
78
|
+
|
79
|
+
exports.Keys = Keys;
|
80
|
+
exports.useKeyNavigation = useKeyNavigation;
|
81
|
+
//# sourceMappingURL=useKeyboardNavigation.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useKeyboardNavigation.js","sources":["../../../../src/components/Dropdown/hooks/useKeyboardNavigation.ts"],"sourcesContent":["import { KeyboardEvent, useCallback, useEffect, useState } from 'react';\n\nimport type { UseKeyNavigationProps } from '../Dropdown.types';\n\nexport const Keys = {\n Tab: 'Tab',\n Enter: 'Enter',\n Escape: 'Escape',\n ArrowUp: 'ArrowUp',\n ArrowDown: 'ArrowDown',\n};\n\nexport const useKeyNavigation = ({ itemsRefs, opened, updateOpened }: UseKeyNavigationProps) => {\n const [selectItemIndex, setSelectItemIndex] = useState(0);\n\n useEffect(() => {\n if (!opened) {\n setSelectItemIndex(0);\n\n return;\n }\n\n itemsRefs?.current?.[selectItemIndex]?.focus();\n }, [opened]);\n\n const onKeyDownTarget = useCallback(\n (event: KeyboardEvent<HTMLDivElement>) => {\n event.stopPropagation();\n\n const { code } = event;\n\n const itemsRefsCount = itemsRefs.current.length;\n let newOpened = opened;\n let newSelectItemIndex = selectItemIndex;\n let focusedItem: HTMLElement | null = null;\n\n if (code === Keys.Escape || code === Keys.Tab) {\n newOpened = false;\n newSelectItemIndex = -1;\n updateOpened?.(newOpened, event);\n }\n\n if (code === Keys.ArrowUp) {\n newSelectItemIndex = newSelectItemIndex - 1 === -1 ? itemsRefsCount - 1 : newSelectItemIndex - 1;\n focusedItem = itemsRefs?.current?.[newSelectItemIndex];\n }\n\n if (code === Keys.ArrowDown) {\n newSelectItemIndex = newSelectItemIndex + 1 === itemsRefsCount ? 0 : newSelectItemIndex + 1;\n focusedItem = itemsRefs?.current?.[newSelectItemIndex];\n }\n\n if (code === Keys.Enter) {\n event.preventDefault();\n\n const item = itemsRefs.current[newSelectItemIndex] as HTMLElement;\n\n // TODO: #1016\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n if (item?.ariaDisabled) {\n return;\n }\n\n item?.click();\n }\n\n setSelectItemIndex(newSelectItemIndex);\n\n focusedItem?.focus();\n focusedItem?.scrollIntoView({\n behavior: 'smooth',\n block: 'center',\n inline: 'center',\n });\n },\n [opened, selectItemIndex, updateOpened],\n );\n\n return { onKeyDownTarget } as const;\n};\n"],"names":["Keys","Tab","Enter","Escape","ArrowUp","ArrowDown","useKeyNavigation","_ref","itemsRefs","opened","updateOpened","_useState","useState","_useState2","_slicedToArray","selectItemIndex","setSelectItemIndex","useEffect","_itemsRefs$current","_itemsRefs$current$se","current","focus","onKeyDownTarget","useCallback","event","_focusedItem","_focusedItem2","stopPropagation","code","itemsRefsCount","length","newOpened","newSelectItemIndex","focusedItem","_itemsRefs$current2","_itemsRefs$current3","preventDefault","item","ariaDisabled","click","scrollIntoView","behavior","block","inline"],"mappings":";;;;;;;AAIO,IAAMA,IAAI,GAAG;AAChBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,MAAM,EAAE,QAAQ;AAChBC,EAAAA,OAAO,EAAE,SAAS;AAClBC,EAAAA,SAAS,EAAE,WAAA;AACf,EAAC;IAEYC,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAAC,IAAA,EAAmE;AAAA,EAAA,IAA7DC,SAAS,GAAAD,IAAA,CAATC,SAAS;IAAEC,MAAM,GAAAF,IAAA,CAANE,MAAM;IAAEC,YAAY,GAAAH,IAAA,CAAZG,YAAY,CAAA;AAC9D,EAAA,IAAAC,SAAA,GAA8CC,cAAQ,CAAC,CAAC,CAAC;IAAAC,UAAA,GAAAC,uCAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAAlDI,IAAAA,eAAe,GAAAF,UAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,kBAAkB,GAAAH,UAAA,CAAA,CAAA,CAAA,CAAA;AAE1CI,EAAAA,eAAS,CAAC,YAAM;IAAA,IAAAC,kBAAA,EAAAC,qBAAA,CAAA;IACZ,IAAI,CAACV,MAAM,EAAE;MACTO,kBAAkB,CAAC,CAAC,CAAC,CAAA;AAErB,MAAA,OAAA;AACJ,KAAA;IAEAR,SAAS,KAAA,IAAA,IAATA,SAAS,KAAA,KAAA,CAAA,GA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AAR,IAAAA,IAAAA,YAAA,uBAAXA,YAAA,CAAaJ,KAAK,EAAE,CAAA;IACpB,CAAAK,aAAA,GAAAO,WAAW,MAAA,IAAA,IAAAP,aAAA,KAAXA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,aAAA,CAAac,cAAc,CAAC;AACxBC,MAAAA,QAAQ,EAAE,QAAQ;AAClBC,MAAAA,KAAK,EAAE,QAAQ;AACfC,MAAAA,MAAM,EAAE,QAAA;AACZ,KAAC,CAAC,CAAA;GACL,EACD,CAAClC,MAAM,EAAEM,eAAe,EAAEL,YAAY,CAC1C,CAAC,CAAA;EAED,OAAO;AAAEY,IAAAA,eAAe,EAAfA,eAAAA;GAAiB,CAAA;AAC9B;;;;;"}
|
@@ -12,7 +12,7 @@ var base = require('./variations/_view/base.js');
|
|
12
12
|
var base$1 = require('./variations/_size/base.js');
|
13
13
|
var DropdownItem_styles = require('./DropdownItem.styles.js');
|
14
14
|
|
15
|
-
var _excluded = ["id", "className", "children", "text", "isSelected", "name", "checked", "value", "
|
15
|
+
var _excluded = ["id", "className", "children", "text", "isSelected", "name", "checked", "value", "view", "size", "disabled", "role", "contentLeft", "contentRight", "onSelect", "onClick", "onChange"];
|
16
16
|
/**
|
17
17
|
* Элемент выпадающего списка
|
18
18
|
*/
|
@@ -26,10 +26,11 @@ var dropdownItemRoot = function dropdownItemRoot(Root) {
|
|
26
26
|
name = _ref.name,
|
27
27
|
checked = _ref.checked,
|
28
28
|
value = _ref.value,
|
29
|
-
role = _ref.role,
|
30
29
|
view = _ref.view,
|
31
30
|
size = _ref.size,
|
32
31
|
disabled = _ref.disabled,
|
32
|
+
_ref$role = _ref.role,
|
33
|
+
role = _ref$role === void 0 ? 'option' : _ref$role,
|
33
34
|
ContentLeftComponent = _ref.contentLeft,
|
34
35
|
ContentRightComponent = _ref.contentRight,
|
35
36
|
onSelect = _ref.onSelect,
|
@@ -63,7 +64,7 @@ var dropdownItemRoot = function dropdownItemRoot(Root) {
|
|
63
64
|
value: value,
|
64
65
|
checked: checked || isSelected,
|
65
66
|
disabled: disabled,
|
66
|
-
tabIndex:
|
67
|
+
tabIndex: -1
|
67
68
|
}, !disabled && {
|
68
69
|
onChange: handleOnChange
|
69
70
|
});
|
@@ -83,6 +84,7 @@ var dropdownItemRoot = function dropdownItemRoot(Root) {
|
|
83
84
|
ref: outerRootRef,
|
84
85
|
tabIndex: 0,
|
85
86
|
"aria-disabled": disabled,
|
87
|
+
"aria-selected": isSelected,
|
86
88
|
onClick: handleOnClick,
|
87
89
|
"data-value": value
|
88
90
|
}, rest), text ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DropdownItem_styles.StyledContentLeft, null, ContentLeftComponent && ContentLeft), /*#__PURE__*/React.createElement(DropdownItem_styles.StyledText, null, text), /*#__PURE__*/React.createElement(DropdownItem_styles.StyledContentRight, null, ContentRightComponent && ContentRight)) : children);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DropdownItem.js","sources":["../../../../../src/components/Dropdown/ui/DropdownItem/DropdownItem.tsx"],"sourcesContent":["import React, { forwardRef, useCallback, useMemo } from 'react';\nimport { safeUseId } from '@salutejs/plasma-core';\n\nimport { RootProps } from '../../../../engines';\nimport { classes } from '../../Dropdown.tokens';\nimport { cx } from '../../../../utils';\nimport { getValidComponent } from '../../utils';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { StyledContentLeft, StyledContentRight, StyledText, base } from './DropdownItem.styles';\nimport type { DropdownItemProps } from './DropdownItem.type';\n\n/**\n * Элемент выпадающего списка\n */\nexport const dropdownItemRoot = (Root: RootProps<HTMLDivElement, DropdownItemProps>) =>\n forwardRef<HTMLDivElement, DropdownItemProps>(\n (\n {\n id,\n className,\n children,\n text,\n isSelected,\n name,\n checked,\n value,\n
|
1
|
+
{"version":3,"file":"DropdownItem.js","sources":["../../../../../src/components/Dropdown/ui/DropdownItem/DropdownItem.tsx"],"sourcesContent":["import React, { forwardRef, useCallback, useMemo } from 'react';\nimport { safeUseId } from '@salutejs/plasma-core';\n\nimport { RootProps } from '../../../../engines';\nimport { classes } from '../../Dropdown.tokens';\nimport { cx } from '../../../../utils';\nimport { getValidComponent } from '../../utils';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { StyledContentLeft, StyledContentRight, StyledText, base } from './DropdownItem.styles';\nimport type { DropdownItemProps } from './DropdownItem.type';\n\n/**\n * Элемент выпадающего списка\n */\nexport const dropdownItemRoot = (Root: RootProps<HTMLDivElement, DropdownItemProps>) =>\n forwardRef<HTMLDivElement, DropdownItemProps>(\n (\n {\n id,\n className,\n children,\n text,\n isSelected,\n name,\n checked,\n value,\n view,\n size,\n disabled,\n role = 'option',\n contentLeft: ContentLeftComponent,\n contentRight: ContentRightComponent,\n onSelect,\n onClick,\n onChange,\n ...rest\n },\n outerRootRef,\n ) => {\n const uniqId = safeUseId();\n const innerId = id || uniqId;\n\n const withDropdownItemIsSelected = checked || isSelected ? classes.dropdownItemIsSelected : undefined;\n const withDropdownItemIsDisabled = disabled ? classes.dropdownItemIsDisabled : undefined;\n\n const handleOnClick = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n if (disabled) {\n return;\n }\n\n onClick?.(event);\n\n if (onSelect && !ContentLeftComponent) {\n onSelect(value, text);\n }\n },\n [onSelect, disabled],\n );\n\n const handleOnChange = useCallback(\n (event: React.MouseEvent<HTMLInputElement>) => {\n if (disabled) {\n return;\n }\n\n onChange?.(event);\n\n if (onSelect && ContentLeftComponent) {\n onSelect(value, text);\n }\n },\n [onSelect, disabled],\n );\n\n const contentProps = {\n name,\n value,\n checked: checked || isSelected,\n disabled,\n tabIndex: -1,\n ...(!disabled && { onChange: handleOnChange }),\n };\n\n const ContentLeft = useMemo(() => getValidComponent(ContentLeftComponent, contentProps), [\n ContentRightComponent,\n contentProps,\n ]);\n\n const ContentRight = useMemo(() => getValidComponent(ContentRightComponent, contentProps), [\n ContentRightComponent,\n contentProps,\n ]);\n\n return (\n <Root\n className={cx(withDropdownItemIsSelected, withDropdownItemIsDisabled, className)}\n view={view}\n size={size}\n id={innerId}\n isSelected={isSelected}\n role={role}\n ref={outerRootRef}\n tabIndex={0}\n aria-disabled={disabled}\n aria-selected={isSelected}\n onClick={handleOnClick}\n data-value={value}\n {...rest}\n >\n {text ? (\n <>\n <StyledContentLeft>{ContentLeftComponent && ContentLeft}</StyledContentLeft>\n <StyledText>{text}</StyledText>\n <StyledContentRight>{ContentRightComponent && ContentRight}</StyledContentRight>\n </>\n ) : (\n children\n )}\n </Root>\n );\n },\n );\n\nexport const dropdownItemConfig = {\n name: 'DropdownItem',\n tag: 'div',\n layout: dropdownItemRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'primary',\n size: 'm',\n },\n};\n"],"names":["dropdownItemRoot","Root","forwardRef","_ref","outerRootRef","id","className","children","text","isSelected","name","checked","value","view","size","disabled","_ref$role","role","ContentLeftComponent","contentLeft","ContentRightComponent","contentRight","onSelect","onClick","onChange","rest","_objectWithoutProperties","_excluded","uniqId","safeUseId","innerId","withDropdownItemIsSelected","classes","dropdownItemIsSelected","undefined","withDropdownItemIsDisabled","dropdownItemIsDisabled","handleOnClick","useCallback","event","handleOnChange","contentProps","_objectSpread","tabIndex","ContentLeft","useMemo","getValidComponent","ContentRight","React","createElement","_extends","cx","ref","Fragment","StyledContentLeft","StyledText","StyledContentRight","dropdownItemConfig","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;AAaA;AACA;AACA;IACaA,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAIC,IAAkD,EAAA;AAAA,EAAA,oBAC/EC,gBAAU,CACN,UAAAC,IAAA,EAqBIC,YAAY,EACX;AAAA,IAAA,IApBGC,EAAE,GAAAF,IAAA,CAAFE,EAAE;MACFC,SAAS,GAAAH,I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C,EAAAA,UAAU,EAAE;AACRhD,IAAAA,IAAI,EAAE;AACFiD,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACDjD,IAAAA,IAAI,EAAE;AACFgD,MAAAA,GAAG,EAAEE,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNpD,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;;"}
|
@@ -33,7 +33,50 @@ var getValidComponent = function getValidComponent(element, props) {
|
|
33
33
|
}
|
34
34
|
return element;
|
35
35
|
};
|
36
|
+
var getChildren = function getChildren(children, externalProps) {
|
37
|
+
if (externalProps.childrenRefs) {
|
38
|
+
externalProps.childrenRefs.current = [];
|
39
|
+
}
|
40
|
+
var res = React.Children.map(children || [], function (child) {
|
41
|
+
var hasValue = ('value' in (child === null || child === void 0 ? void 0 : child.props));
|
42
|
+
var hasTarget = ('target' in (child === null || child === void 0 ? void 0 : child.props));
|
43
|
+
if (! /*#__PURE__*/React.isValidElement(child) || !hasValue && !hasTarget) {
|
44
|
+
return child;
|
45
|
+
}
|
46
|
+
if (hasTarget) {
|
47
|
+
var _ref = child === null || child === void 0 ? void 0 : child.props,
|
48
|
+
target = _ref.target;
|
49
|
+
if (! /*#__PURE__*/React.isValidElement(target)) {
|
50
|
+
return child;
|
51
|
+
}
|
52
|
+
var targetProps = _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, target === null || target === void 0 ? void 0 : target.props), {}, {
|
53
|
+
ref: function ref(element) {
|
54
|
+
var _externalProps$childr;
|
55
|
+
if (externalProps !== null && externalProps !== void 0 && (_externalProps$childr = externalProps.childrenRefs) !== null && _externalProps$childr !== void 0 && _externalProps$childr.current && element) {
|
56
|
+
externalProps.childrenRefs.current.push(element);
|
57
|
+
}
|
58
|
+
}
|
59
|
+
});
|
60
|
+
var updatedTarget = /*#__PURE__*/React.cloneElement(target, targetProps);
|
61
|
+
var updatedProps = _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, child === null || child === void 0 ? void 0 : child.props), {}, {
|
62
|
+
target: updatedTarget
|
63
|
+
});
|
64
|
+
return /*#__PURE__*/React.cloneElement(child, updatedProps);
|
65
|
+
}
|
66
|
+
var props = _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, child === null || child === void 0 ? void 0 : child.props), {}, {
|
67
|
+
ref: function ref(element) {
|
68
|
+
var _externalProps$childr2;
|
69
|
+
if (externalProps !== null && externalProps !== void 0 && (_externalProps$childr2 = externalProps.childrenRefs) !== null && _externalProps$childr2 !== void 0 && _externalProps$childr2.current && element) {
|
70
|
+
externalProps.childrenRefs.current.push(element);
|
71
|
+
}
|
72
|
+
}
|
73
|
+
});
|
74
|
+
return /*#__PURE__*/React.cloneElement(child, props);
|
75
|
+
});
|
76
|
+
return res;
|
77
|
+
};
|
36
78
|
|
79
|
+
exports.getChildren = getChildren;
|
37
80
|
exports.getPlacement = getPlacement;
|
38
81
|
exports.getPlacements = getPlacements;
|
39
82
|
exports.getValidComponent = getValidComponent;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/Dropdown/utils/index.tsx"],"sourcesContent":["import React, {
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/Dropdown/utils/index.tsx"],"sourcesContent":["import React, { Children, cloneElement, isValidElement } from 'react';\nimport type { ElementType, ReactElement, ReactNode } from 'react';\n\nimport type { PopoverPlacementBasic } from '../../Popover';\nimport type { DropdownPlacement, DropdownPlacementBasic, DropdownProps } from '../Dropdown.types';\nimport { DropdownItemProps } from '../ui/DropdownItem/DropdownItem.type';\n\nexport const getPlacement = (placement: DropdownPlacement) => {\n return `${placement}-start` as PopoverPlacementBasic;\n};\n\nexport const getPlacements = (placements?: DropdownPlacement | DropdownPlacementBasic[]) => {\n if (!placements) {\n return;\n }\n const isArray = Array.isArray(placements);\n\n if (!isArray) {\n return getPlacement(placements as DropdownPlacement);\n }\n return ((placements || []) as DropdownPlacementBasic[]).map((placement) => getPlacement(placement));\n};\n\nconst isReactObject = (element: any): element is ElementType => {\n return typeof element === 'object' || typeof element === 'function';\n};\n\nexport const getValidComponent = (element: ElementType | ReactNode, props: object) => {\n if (isValidElement(element)) {\n return cloneElement(element, props);\n }\n\n if (isReactObject(element)) {\n const Component = element;\n\n return <Component {...props} />;\n }\n\n return element;\n};\n\nexport const getChildren = (\n children: ReactElement<DropdownProps | DropdownItemProps>[],\n externalProps: Record<string, any>,\n) => {\n if (externalProps.childrenRefs) {\n externalProps.childrenRefs.current = [];\n }\n\n const res = Children.map(children || [], (child) => {\n const hasValue = 'value' in child?.props;\n const hasTarget = 'target' in child?.props;\n\n if (!isValidElement(child) || (!hasValue && !hasTarget)) {\n return child;\n }\n\n if (hasTarget) {\n const { target } = child?.props as DropdownProps;\n if (!isValidElement(target)) {\n return child;\n }\n\n const targetProps = {\n ...target?.props,\n ref: (element: HTMLDivElement) => {\n if (externalProps?.childrenRefs?.current && element) {\n externalProps.childrenRefs.current.push(element);\n }\n },\n };\n\n const updatedTarget = cloneElement(target, targetProps);\n\n const updatedProps = {\n ...child?.props,\n target: updatedTarget,\n };\n\n return cloneElement(child, updatedProps);\n }\n\n const props = {\n ...child?.props,\n ref: (element: HTMLDivElement) => {\n if (externalProps?.childrenRefs?.current && element) {\n externalProps.childrenRefs.current.push(element);\n }\n },\n };\n\n return cloneElement(child, props);\n });\n\n return res;\n};\n"],"names":["getPlacement","placement","concat","getPlacements","placements","isArray","Array","map","isReactObject","element","_typeof","getValidComponent","props","isValidElement","cloneElement","Component","React","createElement","getChildren","children","externalProps","childrenRefs","current","res","Children","child","hasValue","hasTarget","_ref","target","targetProps","_objectSpread","ref","_externalProps$childr","push","updatedTarget","updatedProps","_externalProps$childr2"],"mappings":";;;;;;;IAOaA,YAAY,GAAG,SAAfA,YAAYA,CAAIC,SAA4B,EAAK;EAC1D,OAAAC,EAA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AACpD,SAAA;AACJ,OAAA;KACH,CAAA,CAAA;AAED,IAAA,oBAAOK,kBAAY,CAACW,KAAK,EAAEb,KAAK,CAAC,CAAA;AACrC,GAAC,CAAC,CAAA;AAEF,EAAA,OAAOW,GAAG,CAAA;AACd;;;;;;;"}
|
@@ -65,8 +65,8 @@
|
|
65
65
|
.Select_styles_1q3i6gw_svro45w__08f2a797{display:block;}.Select_styles_1q3i6gw_svro45w__08f2a797 .Select_styles_1q3i6gw_popoverRoot__08f2a797,.Select_styles_1q3i6gw_svro45w__08f2a797 .Select_styles_1q3i6gw_popoverTarget__08f2a797{width:var(--svro45w-0);}
|
66
66
|
.Select_styles_1q3i6gw_sgpldc9__08f2a797{display:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;-moz-appearance:none;-webkit-appearance:none;background:transparent;color:transparent;border:none;outline:none;opacity:1;position:absolute;inset:-0.125rem;z-index:1;cursor:var(--sgpldc9-0);font-size:1rem;}.Select_styles_1q3i6gw_sgpldc9__08f2a797:hover:not(:disabled) + .Select_styles_1q3i6gw_popoverWrapper__08f2a797 .Select_styles_1q3i6gw_selectTarget__08f2a797{background:var(--plasma-select-target-background-color-hover);}.Select_styles_1q3i6gw_sgpldc9__08f2a797:focus-visible{border-radius:var(--plasma-select-border-radius);box-shadow:0 0 0 0.0625rem var(--plasma-select-focus-color);}
|
67
67
|
|
68
|
-
.
|
69
|
-
.
|
68
|
+
.Dropdown_styles_13400l5_sn7uamp__84327758 .Dropdown_styles_13400l5_popoverWrapper__84327758,.Dropdown_styles_13400l5_sn7uamp__84327758 .Dropdown_styles_13400l5_popoverTarget__84327758{display:block;}
|
69
|
+
.Dropdown_styles_13400l5_sjr7fmv__84327758{box-sizing:border-box;background:var(--plasma-dropdown-background);box-shadow:var(--plasma-dropdown-box-shadow);border-radius:var(--plasma-dropdown-border-radius);width:var(--plasma-dropdown-width);height:var(--plasma-dropdown-height);padding:var(--plasma-dropdown-padding-top) var(--plasma-dropdown-padding-right) var(--plasma-dropdown-padding-bottom) var(--plasma-dropdown-padding-left);}
|
70
70
|
|
71
71
|
.DropdownDivider_styles_v3xor1_s1brpi5d__3a791565{background:var(--plasma-dropdown-divider-color);width:var(--plasma-dropdown-divider-width);height:var(--plasma-dropdown-divider-height);margin:var(--plasma-dropdown-divider-margin-top) var(--plasma-dropdown-divider-margin-right) var(--plasma-dropdown-divider-margin-bottom) var(--plasma-dropdown-divider-margin-left);}
|
72
72
|
|
@@ -10,8 +10,8 @@
|
|
10
10
|
.Select_styles_1q3i6gw_svro45w__08f2a797{display:block;}.Select_styles_1q3i6gw_svro45w__08f2a797 .Select_styles_1q3i6gw_popoverRoot__08f2a797,.Select_styles_1q3i6gw_svro45w__08f2a797 .Select_styles_1q3i6gw_popoverTarget__08f2a797{width:var(--svro45w-0);}
|
11
11
|
.Select_styles_1q3i6gw_sgpldc9__08f2a797{display:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;-moz-appearance:none;-webkit-appearance:none;background:transparent;color:transparent;border:none;outline:none;opacity:1;position:absolute;inset:-0.125rem;z-index:1;cursor:var(--sgpldc9-0);font-size:1rem;}.Select_styles_1q3i6gw_sgpldc9__08f2a797:hover:not(:disabled) + .Select_styles_1q3i6gw_popoverWrapper__08f2a797 .Select_styles_1q3i6gw_selectTarget__08f2a797{background:var(--plasma-select-target-background-color-hover);}.Select_styles_1q3i6gw_sgpldc9__08f2a797:focus-visible{border-radius:var(--plasma-select-border-radius);box-shadow:0 0 0 0.0625rem var(--plasma-select-focus-color);}
|
12
12
|
|
13
|
-
.
|
14
|
-
.
|
13
|
+
.Dropdown_styles_13400l5_sn7uamp__84327758 .Dropdown_styles_13400l5_popoverWrapper__84327758,.Dropdown_styles_13400l5_sn7uamp__84327758 .Dropdown_styles_13400l5_popoverTarget__84327758{display:block;}
|
14
|
+
.Dropdown_styles_13400l5_sjr7fmv__84327758{box-sizing:border-box;background:var(--plasma-dropdown-background);box-shadow:var(--plasma-dropdown-box-shadow);border-radius:var(--plasma-dropdown-border-radius);width:var(--plasma-dropdown-width);height:var(--plasma-dropdown-height);padding:var(--plasma-dropdown-padding-top) var(--plasma-dropdown-padding-right) var(--plasma-dropdown-padding-bottom) var(--plasma-dropdown-padding-left);}
|
15
15
|
|
16
16
|
.DropdownDivider_styles_v3xor1_s1brpi5d__3a791565{background:var(--plasma-dropdown-divider-color);width:var(--plasma-dropdown-divider-width);height:var(--plasma-dropdown-divider-height);margin:var(--plasma-dropdown-divider-margin-top) var(--plasma-dropdown-divider-margin-right) var(--plasma-dropdown-divider-margin-bottom) var(--plasma-dropdown-divider-margin-left);}
|
17
17
|
|
package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js
CHANGED
@@ -7,11 +7,11 @@ var react = require('@linaria/react');
|
|
7
7
|
var Select$1 = require('../../../Select/Select.js');
|
8
8
|
require('react');
|
9
9
|
require('@salutejs/plasma-core');
|
10
|
+
require('../../../../utils/react.js');
|
10
11
|
require('@linaria/core');
|
11
12
|
var common = require('../../../../engines/common.js');
|
12
13
|
require('react-dom');
|
13
14
|
require('react-popper');
|
14
|
-
require('../../../../utils/react.js');
|
15
15
|
require('focus-visible');
|
16
16
|
var SelectItem$1 = require('../../../Select/ui/SelectItem/SelectItem.js');
|
17
17
|
|
@@ -1,5 +1,5 @@
|
|
1
|
-
.
|
2
|
-
.
|
1
|
+
.Dropdown_styles_13400l5_sn7uamp__84327758 .Dropdown_styles_13400l5_popoverWrapper__84327758,.Dropdown_styles_13400l5_sn7uamp__84327758 .Dropdown_styles_13400l5_popoverTarget__84327758{display:block;}
|
2
|
+
.Dropdown_styles_13400l5_sjr7fmv__84327758{box-sizing:border-box;background:var(--plasma-dropdown-background);box-shadow:var(--plasma-dropdown-box-shadow);border-radius:var(--plasma-dropdown-border-radius);width:var(--plasma-dropdown-width);height:var(--plasma-dropdown-height);padding:var(--plasma-dropdown-padding-top) var(--plasma-dropdown-padding-right) var(--plasma-dropdown-padding-bottom) var(--plasma-dropdown-padding-left);}
|
3
3
|
|
4
4
|
.DropdownDivider_styles_v3xor1_s1brpi5d__3a791565{background:var(--plasma-dropdown-divider-color);width:var(--plasma-dropdown-divider-width);height:var(--plasma-dropdown-divider-height);margin:var(--plasma-dropdown-divider-margin-top) var(--plasma-dropdown-divider-margin-right) var(--plasma-dropdown-divider-margin-bottom) var(--plasma-dropdown-divider-margin-left);}
|
5
5
|
|
@@ -3,8 +3,8 @@
|
|
3
3
|
.Popover_styles_rmr9za_s1pd4d8a__0bafa6fb{width:var(--plasma-popover-arrow-mask-width);height:var(--plasma-popover-arrow-mask-height);}.Popover_styles_rmr9za_s1pd4d8a__0bafa6fb::before{position:absolute;width:var(--plasma-popover-arrow-mask-width);height:var(--plasma-popover-arrow-mask-height);-webkit-mask-image:var(--plasma-popover-arrow-mask-image);mask-image:var(--plasma-popover-arrow-mask-image);background:var(--plasma-popover-arrow-background);content:'';-webkit-transform:rotate(0deg);-ms-transform:rotate(0deg);transform:rotate(0deg);}
|
4
4
|
.Popover_styles_rmr9za_s16xlixz__0bafa6fb{position:absolute;z-index:var(--s16xlixz-0);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='top'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{bottom:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{top:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='left'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{right:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='left'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='right'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{left:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='right'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='top-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{bottom:calc(0px - var(--plasma-popover-arrow-height));left:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='top-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{bottom:calc(0px - var(--plasma-popover-arrow-height));left:unset !important;right:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{top:calc(0px - var(--plasma-popover-arrow-height));left:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{top:calc(0px - var(--plasma-popover-arrow-height));left:unset !important;right:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='left-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb,.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='right-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{top:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='left-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb,.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='right-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{top:unset !important;bottom:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}
|
5
5
|
|
6
|
-
.
|
7
|
-
.
|
6
|
+
.Dropdown_styles_13400l5_sn7uamp__84327758 .Dropdown_styles_13400l5_popoverWrapper__84327758,.Dropdown_styles_13400l5_sn7uamp__84327758 .Dropdown_styles_13400l5_popoverTarget__84327758{display:block;}
|
7
|
+
.Dropdown_styles_13400l5_sjr7fmv__84327758{box-sizing:border-box;background:var(--plasma-dropdown-background);box-shadow:var(--plasma-dropdown-box-shadow);border-radius:var(--plasma-dropdown-border-radius);width:var(--plasma-dropdown-width);height:var(--plasma-dropdown-height);padding:var(--plasma-dropdown-padding-top) var(--plasma-dropdown-padding-right) var(--plasma-dropdown-padding-bottom) var(--plasma-dropdown-padding-left);}
|
8
8
|
|
9
9
|
.DropdownDivider_styles_v3xor1_s1brpi5d__3a791565{background:var(--plasma-dropdown-divider-color);width:var(--plasma-dropdown-divider-width);height:var(--plasma-dropdown-divider-height);margin:var(--plasma-dropdown-divider-margin-top) var(--plasma-dropdown-divider-margin-right) var(--plasma-dropdown-divider-margin-bottom) var(--plasma-dropdown-divider-margin-left);}
|
10
10
|
|
@@ -4,12 +4,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
require('react');
|
6
6
|
require('@salutejs/plasma-core');
|
7
|
+
require('../../../../utils/react.js');
|
7
8
|
require('@linaria/react');
|
8
9
|
require('@linaria/core');
|
9
10
|
require('focus-visible');
|
10
11
|
require('react-dom');
|
11
12
|
require('react-popper');
|
12
|
-
require('../../../../utils/react.js');
|
13
13
|
var DropdownDivider = require('../../../Dropdown/ui/DropdownDivider/DropdownDivider.js');
|
14
14
|
var base = require('./variations/_view/base.js');
|
15
15
|
var base$1 = require('./variations/_size/base.js');
|
@@ -3,8 +3,8 @@
|
|
3
3
|
.Popover_styles_rmr9za_s1pd4d8a__0bafa6fb{width:var(--plasma-popover-arrow-mask-width);height:var(--plasma-popover-arrow-mask-height);}.Popover_styles_rmr9za_s1pd4d8a__0bafa6fb::before{position:absolute;width:var(--plasma-popover-arrow-mask-width);height:var(--plasma-popover-arrow-mask-height);-webkit-mask-image:var(--plasma-popover-arrow-mask-image);mask-image:var(--plasma-popover-arrow-mask-image);background:var(--plasma-popover-arrow-background);content:'';-webkit-transform:rotate(0deg);-ms-transform:rotate(0deg);transform:rotate(0deg);}
|
4
4
|
.Popover_styles_rmr9za_s16xlixz__0bafa6fb{position:absolute;z-index:var(--s16xlixz-0);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='top'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{bottom:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{top:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='left'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{right:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='left'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='right'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{left:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='right'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='top-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{bottom:calc(0px - var(--plasma-popover-arrow-height));left:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='top-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{bottom:calc(0px - var(--plasma-popover-arrow-height));left:unset !important;right:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{top:calc(0px - var(--plasma-popover-arrow-height));left:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{top:calc(0px - var(--plasma-popover-arrow-height));left:unset !important;right:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='left-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb,.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='right-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{top:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='left-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb,.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='right-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{top:unset !important;bottom:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}
|
5
5
|
|
6
|
-
.
|
7
|
-
.
|
6
|
+
.Dropdown_styles_13400l5_sn7uamp__84327758 .Dropdown_styles_13400l5_popoverWrapper__84327758,.Dropdown_styles_13400l5_sn7uamp__84327758 .Dropdown_styles_13400l5_popoverTarget__84327758{display:block;}
|
7
|
+
.Dropdown_styles_13400l5_sjr7fmv__84327758{box-sizing:border-box;background:var(--plasma-dropdown-background);box-shadow:var(--plasma-dropdown-box-shadow);border-radius:var(--plasma-dropdown-border-radius);width:var(--plasma-dropdown-width);height:var(--plasma-dropdown-height);padding:var(--plasma-dropdown-padding-top) var(--plasma-dropdown-padding-right) var(--plasma-dropdown-padding-bottom) var(--plasma-dropdown-padding-left);}
|
8
8
|
|
9
9
|
.DropdownDivider_styles_v3xor1_s1brpi5d__3a791565{background:var(--plasma-dropdown-divider-color);width:var(--plasma-dropdown-divider-width);height:var(--plasma-dropdown-divider-height);margin:var(--plasma-dropdown-divider-margin-top) var(--plasma-dropdown-divider-margin-right) var(--plasma-dropdown-divider-margin-bottom) var(--plasma-dropdown-divider-margin-left);}
|
10
10
|
|
@@ -4,12 +4,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
require('react');
|
6
6
|
require('@salutejs/plasma-core');
|
7
|
+
require('../../../../utils/react.js');
|
7
8
|
require('@linaria/react');
|
8
9
|
require('@linaria/core');
|
9
10
|
require('focus-visible');
|
10
11
|
require('react-dom');
|
11
12
|
require('react-popper');
|
12
|
-
require('../../../../utils/react.js');
|
13
13
|
var DropdownFooter = require('../../../Dropdown/ui/DropdownFooter/DropdownFooter.js');
|
14
14
|
var base = require('./variations/_view/base.js');
|
15
15
|
var base$1 = require('./variations/_size/base.js');
|
@@ -3,8 +3,8 @@
|
|
3
3
|
.Popover_styles_rmr9za_s1pd4d8a__0bafa6fb{width:var(--plasma-popover-arrow-mask-width);height:var(--plasma-popover-arrow-mask-height);}.Popover_styles_rmr9za_s1pd4d8a__0bafa6fb::before{position:absolute;width:var(--plasma-popover-arrow-mask-width);height:var(--plasma-popover-arrow-mask-height);-webkit-mask-image:var(--plasma-popover-arrow-mask-image);mask-image:var(--plasma-popover-arrow-mask-image);background:var(--plasma-popover-arrow-background);content:'';-webkit-transform:rotate(0deg);-ms-transform:rotate(0deg);transform:rotate(0deg);}
|
4
4
|
.Popover_styles_rmr9za_s16xlixz__0bafa6fb{position:absolute;z-index:var(--s16xlixz-0);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='top'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{bottom:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{top:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='left'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{right:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='left'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='right'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{left:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='right'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='top-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{bottom:calc(0px - var(--plasma-popover-arrow-height));left:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='top-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{bottom:calc(0px - var(--plasma-popover-arrow-height));left:unset !important;right:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{top:calc(0px - var(--plasma-popover-arrow-height));left:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{top:calc(0px - var(--plasma-popover-arrow-height));left:unset !important;right:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='left-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb,.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='right-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{top:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='left-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb,.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='right-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{top:unset !important;bottom:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}
|
5
5
|
|
6
|
-
.
|
7
|
-
.
|
6
|
+
.Dropdown_styles_13400l5_sn7uamp__84327758 .Dropdown_styles_13400l5_popoverWrapper__84327758,.Dropdown_styles_13400l5_sn7uamp__84327758 .Dropdown_styles_13400l5_popoverTarget__84327758{display:block;}
|
7
|
+
.Dropdown_styles_13400l5_sjr7fmv__84327758{box-sizing:border-box;background:var(--plasma-dropdown-background);box-shadow:var(--plasma-dropdown-box-shadow);border-radius:var(--plasma-dropdown-border-radius);width:var(--plasma-dropdown-width);height:var(--plasma-dropdown-height);padding:var(--plasma-dropdown-padding-top) var(--plasma-dropdown-padding-right) var(--plasma-dropdown-padding-bottom) var(--plasma-dropdown-padding-left);}
|
8
8
|
|
9
9
|
.DropdownDivider_styles_v3xor1_s1brpi5d__3a791565{background:var(--plasma-dropdown-divider-color);width:var(--plasma-dropdown-divider-width);height:var(--plasma-dropdown-divider-height);margin:var(--plasma-dropdown-divider-margin-top) var(--plasma-dropdown-divider-margin-right) var(--plasma-dropdown-divider-margin-bottom) var(--plasma-dropdown-divider-margin-left);}
|
10
10
|
|
@@ -4,12 +4,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
require('react');
|
6
6
|
require('@salutejs/plasma-core');
|
7
|
+
require('../../../../utils/react.js');
|
7
8
|
require('@linaria/react');
|
8
9
|
require('@linaria/core');
|
9
10
|
require('focus-visible');
|
10
11
|
require('react-dom');
|
11
12
|
require('react-popper');
|
12
|
-
require('../../../../utils/react.js');
|
13
13
|
var DropdownGroup = require('../../../Dropdown/ui/DropdownGroup/DropdownGroup.js');
|
14
14
|
var base = require('./variations/_view/base.js');
|
15
15
|
var base$1 = require('./variations/_size/base.js');
|
@@ -3,8 +3,8 @@
|
|
3
3
|
.Popover_styles_rmr9za_s1pd4d8a__0bafa6fb{width:var(--plasma-popover-arrow-mask-width);height:var(--plasma-popover-arrow-mask-height);}.Popover_styles_rmr9za_s1pd4d8a__0bafa6fb::before{position:absolute;width:var(--plasma-popover-arrow-mask-width);height:var(--plasma-popover-arrow-mask-height);-webkit-mask-image:var(--plasma-popover-arrow-mask-image);mask-image:var(--plasma-popover-arrow-mask-image);background:var(--plasma-popover-arrow-background);content:'';-webkit-transform:rotate(0deg);-ms-transform:rotate(0deg);transform:rotate(0deg);}
|
4
4
|
.Popover_styles_rmr9za_s16xlixz__0bafa6fb{position:absolute;z-index:var(--s16xlixz-0);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='top'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{bottom:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{top:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='left'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{right:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='left'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='right'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{left:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='right'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='top-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{bottom:calc(0px - var(--plasma-popover-arrow-height));left:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='top-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{bottom:calc(0px - var(--plasma-popover-arrow-height));left:unset !important;right:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{top:calc(0px - var(--plasma-popover-arrow-height));left:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{top:calc(0px - var(--plasma-popover-arrow-height));left:unset !important;right:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='left-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb,.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='right-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{top:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='left-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb,.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='right-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{top:unset !important;bottom:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}
|
5
5
|
|
6
|
-
.
|
7
|
-
.
|
6
|
+
.Dropdown_styles_13400l5_sn7uamp__84327758 .Dropdown_styles_13400l5_popoverWrapper__84327758,.Dropdown_styles_13400l5_sn7uamp__84327758 .Dropdown_styles_13400l5_popoverTarget__84327758{display:block;}
|
7
|
+
.Dropdown_styles_13400l5_sjr7fmv__84327758{box-sizing:border-box;background:var(--plasma-dropdown-background);box-shadow:var(--plasma-dropdown-box-shadow);border-radius:var(--plasma-dropdown-border-radius);width:var(--plasma-dropdown-width);height:var(--plasma-dropdown-height);padding:var(--plasma-dropdown-padding-top) var(--plasma-dropdown-padding-right) var(--plasma-dropdown-padding-bottom) var(--plasma-dropdown-padding-left);}
|
8
8
|
|
9
9
|
.DropdownDivider_styles_v3xor1_s1brpi5d__3a791565{background:var(--plasma-dropdown-divider-color);width:var(--plasma-dropdown-divider-width);height:var(--plasma-dropdown-divider-height);margin:var(--plasma-dropdown-divider-margin-top) var(--plasma-dropdown-divider-margin-right) var(--plasma-dropdown-divider-margin-bottom) var(--plasma-dropdown-divider-margin-left);}
|
10
10
|
|
@@ -4,12 +4,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
require('react');
|
6
6
|
require('@salutejs/plasma-core');
|
7
|
+
require('../../../../utils/react.js');
|
7
8
|
require('@linaria/react');
|
8
9
|
require('@linaria/core');
|
9
10
|
require('focus-visible');
|
10
11
|
require('react-dom');
|
11
12
|
require('react-popper');
|
12
|
-
require('../../../../utils/react.js');
|
13
13
|
var DropdownHeader = require('../../../Dropdown/ui/DropdownHeader/DropdownHeader.js');
|
14
14
|
var base = require('./variations/_view/base.js');
|
15
15
|
var base$1 = require('./variations/_size/base.js');
|
@@ -3,8 +3,8 @@
|
|
3
3
|
.Popover_styles_rmr9za_s1pd4d8a__0bafa6fb{width:var(--plasma-popover-arrow-mask-width);height:var(--plasma-popover-arrow-mask-height);}.Popover_styles_rmr9za_s1pd4d8a__0bafa6fb::before{position:absolute;width:var(--plasma-popover-arrow-mask-width);height:var(--plasma-popover-arrow-mask-height);-webkit-mask-image:var(--plasma-popover-arrow-mask-image);mask-image:var(--plasma-popover-arrow-mask-image);background:var(--plasma-popover-arrow-background);content:'';-webkit-transform:rotate(0deg);-ms-transform:rotate(0deg);transform:rotate(0deg);}
|
4
4
|
.Popover_styles_rmr9za_s16xlixz__0bafa6fb{position:absolute;z-index:var(--s16xlixz-0);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='top'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{bottom:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{top:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='left'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{right:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='left'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='right'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{left:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='right'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='top-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{bottom:calc(0px - var(--plasma-popover-arrow-height));left:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='top-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{bottom:calc(0px - var(--plasma-popover-arrow-height));left:unset !important;right:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{top:calc(0px - var(--plasma-popover-arrow-height));left:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{top:calc(0px - var(--plasma-popover-arrow-height));left:unset !important;right:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='left-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb,.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='right-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{top:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='left-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb,.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='right-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{top:unset !important;bottom:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}
|
5
5
|
|
6
|
-
.
|
7
|
-
.
|
6
|
+
.Dropdown_styles_13400l5_sn7uamp__84327758 .Dropdown_styles_13400l5_popoverWrapper__84327758,.Dropdown_styles_13400l5_sn7uamp__84327758 .Dropdown_styles_13400l5_popoverTarget__84327758{display:block;}
|
7
|
+
.Dropdown_styles_13400l5_sjr7fmv__84327758{box-sizing:border-box;background:var(--plasma-dropdown-background);box-shadow:var(--plasma-dropdown-box-shadow);border-radius:var(--plasma-dropdown-border-radius);width:var(--plasma-dropdown-width);height:var(--plasma-dropdown-height);padding:var(--plasma-dropdown-padding-top) var(--plasma-dropdown-padding-right) var(--plasma-dropdown-padding-bottom) var(--plasma-dropdown-padding-left);}
|
8
8
|
|
9
9
|
.DropdownDivider_styles_v3xor1_s1brpi5d__3a791565{background:var(--plasma-dropdown-divider-color);width:var(--plasma-dropdown-divider-width);height:var(--plasma-dropdown-divider-height);margin:var(--plasma-dropdown-divider-margin-top) var(--plasma-dropdown-divider-margin-right) var(--plasma-dropdown-divider-margin-bottom) var(--plasma-dropdown-divider-margin-left);}
|
10
10
|
|
@@ -4,12 +4,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
require('react');
|
6
6
|
require('@salutejs/plasma-core');
|
7
|
+
require('../../../../utils/react.js');
|
7
8
|
require('@linaria/react');
|
8
9
|
require('@linaria/core');
|
9
10
|
require('focus-visible');
|
10
11
|
require('react-dom');
|
11
12
|
require('react-popper');
|
12
|
-
require('../../../../utils/react.js');
|
13
13
|
var DropdownItem = require('../../../Dropdown/ui/DropdownItem/DropdownItem.js');
|
14
14
|
var base = require('./variations/_view/base.js');
|
15
15
|
var base$1 = require('./variations/_size/base.js');
|
@@ -5,12 +5,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
6
6
|
require('react');
|
7
7
|
require('@salutejs/plasma-core');
|
8
|
+
require('../../../../utils/react.js');
|
8
9
|
require('@linaria/react');
|
9
10
|
require('@linaria/core');
|
10
11
|
require('focus-visible');
|
11
12
|
require('react-dom');
|
12
13
|
require('react-popper');
|
13
|
-
require('../../../../utils/react.js');
|
14
14
|
|
15
15
|
var base = "bhy25de";
|
16
16
|
|
package/cjs/index.css
CHANGED
@@ -275,8 +275,8 @@
|
|
275
275
|
|
276
276
|
.base_ydejlv_b175yas1__99ab42b5{--plasma-panel-border-radius:var(--plasma-drawer-border-radius);}
|
277
277
|
|
278
|
-
.
|
279
|
-
.
|
278
|
+
.Dropdown_styles_13400l5_sn7uamp__84327758 .Dropdown_styles_13400l5_popoverWrapper__84327758,.Dropdown_styles_13400l5_sn7uamp__84327758 .Dropdown_styles_13400l5_popoverTarget__84327758{display:block;}
|
279
|
+
.Dropdown_styles_13400l5_sjr7fmv__84327758{box-sizing:border-box;background:var(--plasma-dropdown-background);box-shadow:var(--plasma-dropdown-box-shadow);border-radius:var(--plasma-dropdown-border-radius);width:var(--plasma-dropdown-width);height:var(--plasma-dropdown-height);padding:var(--plasma-dropdown-padding-top) var(--plasma-dropdown-padding-right) var(--plasma-dropdown-padding-bottom) var(--plasma-dropdown-padding-left);}
|
280
280
|
|
281
281
|
.DropdownDivider_styles_v3xor1_s1brpi5d__3a791565{background:var(--plasma-dropdown-divider-color);width:var(--plasma-dropdown-divider-width);height:var(--plasma-dropdown-divider-height);margin:var(--plasma-dropdown-divider-margin-top) var(--plasma-dropdown-divider-margin-right) var(--plasma-dropdown-divider-margin-bottom) var(--plasma-dropdown-divider-margin-left);}
|
282
282
|
|
package/cjs/index.js
CHANGED
@@ -90,6 +90,7 @@ var DrawerHeader = require('./components/Drawer/ui/DrawerHeader/DrawerHeader.js'
|
|
90
90
|
var Drawer_tokens = require('./components/Drawer/Drawer.tokens.js');
|
91
91
|
var Dropdown = require('./components/Dropdown/Dropdown.js');
|
92
92
|
var Dropdown_tokens = require('./components/Dropdown/Dropdown.tokens.js');
|
93
|
+
var useKeyboardNavigation = require('./components/Dropdown/hooks/useKeyboardNavigation.js');
|
93
94
|
var DropdownDivider = require('./components/Dropdown/ui/DropdownDivider/DropdownDivider.js');
|
94
95
|
var DropdownFooter = require('./components/Dropdown/ui/DropdownFooter/DropdownFooter.js');
|
95
96
|
var DropdownGroup = require('./components/Dropdown/ui/DropdownGroup/DropdownGroup.js');
|
@@ -370,6 +371,7 @@ exports.dropdownConfig = Dropdown.dropdownConfig;
|
|
370
371
|
exports.dropdownRoot = Dropdown.dropdownRoot;
|
371
372
|
exports.dropdownClasses = Dropdown_tokens.classes;
|
372
373
|
exports.dropdownTokens = Dropdown_tokens.tokens;
|
374
|
+
exports.useDropdownKeyNavigation = useKeyboardNavigation.useKeyNavigation;
|
373
375
|
exports.dropdownDividerConfig = DropdownDivider.dropdownDividerConfig;
|
374
376
|
exports.dropdownDividerRoot = DropdownDivider.dropdownDividerRoot;
|
375
377
|
exports.dropdownFooterConfig = DropdownFooter.dropdownFooterConfig;
|
package/cjs/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|