@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,76 @@
|
|
1
|
+
import { slicedToArray as _slicedToArray } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
2
|
+
import { useState, useEffect, useCallback } from 'react';
|
3
|
+
|
4
|
+
var Keys = {
|
5
|
+
Tab: 'Tab',
|
6
|
+
Enter: 'Enter',
|
7
|
+
Escape: 'Escape',
|
8
|
+
ArrowUp: 'ArrowUp',
|
9
|
+
ArrowDown: 'ArrowDown'
|
10
|
+
};
|
11
|
+
var useKeyNavigation = function useKeyNavigation(_ref) {
|
12
|
+
var itemsRefs = _ref.itemsRefs,
|
13
|
+
opened = _ref.opened,
|
14
|
+
updateOpened = _ref.updateOpened;
|
15
|
+
var _useState = useState(0),
|
16
|
+
_useState2 = _slicedToArray(_useState, 2),
|
17
|
+
selectItemIndex = _useState2[0],
|
18
|
+
setSelectItemIndex = _useState2[1];
|
19
|
+
useEffect(function () {
|
20
|
+
var _itemsRefs$current, _itemsRefs$current$se;
|
21
|
+
if (!opened) {
|
22
|
+
setSelectItemIndex(0);
|
23
|
+
return;
|
24
|
+
}
|
25
|
+
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();
|
26
|
+
}, [opened]);
|
27
|
+
var onKeyDownTarget = useCallback(function (event) {
|
28
|
+
var _focusedItem, _focusedItem2;
|
29
|
+
event.stopPropagation();
|
30
|
+
var code = event.code;
|
31
|
+
var itemsRefsCount = itemsRefs.current.length;
|
32
|
+
var newOpened = opened;
|
33
|
+
var newSelectItemIndex = selectItemIndex;
|
34
|
+
var focusedItem = null;
|
35
|
+
if (code === Keys.Escape || code === Keys.Tab) {
|
36
|
+
newOpened = false;
|
37
|
+
newSelectItemIndex = -1;
|
38
|
+
updateOpened === null || updateOpened === void 0 ? void 0 : updateOpened(newOpened, event);
|
39
|
+
}
|
40
|
+
if (code === Keys.ArrowUp) {
|
41
|
+
var _itemsRefs$current2;
|
42
|
+
newSelectItemIndex = newSelectItemIndex - 1 === -1 ? itemsRefsCount - 1 : newSelectItemIndex - 1;
|
43
|
+
focusedItem = itemsRefs === null || itemsRefs === void 0 ? void 0 : (_itemsRefs$current2 = itemsRefs.current) === null || _itemsRefs$current2 === void 0 ? void 0 : _itemsRefs$current2[newSelectItemIndex];
|
44
|
+
}
|
45
|
+
if (code === Keys.ArrowDown) {
|
46
|
+
var _itemsRefs$current3;
|
47
|
+
newSelectItemIndex = newSelectItemIndex + 1 === itemsRefsCount ? 0 : newSelectItemIndex + 1;
|
48
|
+
focusedItem = itemsRefs === null || itemsRefs === void 0 ? void 0 : (_itemsRefs$current3 = itemsRefs.current) === null || _itemsRefs$current3 === void 0 ? void 0 : _itemsRefs$current3[newSelectItemIndex];
|
49
|
+
}
|
50
|
+
if (code === Keys.Enter) {
|
51
|
+
event.preventDefault();
|
52
|
+
var item = itemsRefs.current[newSelectItemIndex];
|
53
|
+
|
54
|
+
// TODO: #1016
|
55
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
56
|
+
// @ts-ignore
|
57
|
+
if (item !== null && item !== void 0 && item.ariaDisabled) {
|
58
|
+
return;
|
59
|
+
}
|
60
|
+
item === null || item === void 0 ? void 0 : item.click();
|
61
|
+
}
|
62
|
+
setSelectItemIndex(newSelectItemIndex);
|
63
|
+
(_focusedItem = focusedItem) === null || _focusedItem === void 0 ? void 0 : _focusedItem.focus();
|
64
|
+
(_focusedItem2 = focusedItem) === null || _focusedItem2 === void 0 ? void 0 : _focusedItem2.scrollIntoView({
|
65
|
+
behavior: 'smooth',
|
66
|
+
block: 'center',
|
67
|
+
inline: 'center'
|
68
|
+
});
|
69
|
+
}, [opened, selectItemIndex, updateOpened]);
|
70
|
+
return {
|
71
|
+
onKeyDownTarget: onKeyDownTarget
|
72
|
+
};
|
73
|
+
};
|
74
|
+
|
75
|
+
export { Keys, useKeyNavigation };
|
76
|
+
//# 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,QAAQ,CAAC,CAAC,CAAC;IAAAC,UAAA,GAAAC,cAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAAlDI,IAAAA,eAAe,GAAAF,UAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,kBAAkB,GAAAH,UAAA,CAAA,CAAA,CAAA,CAAA;AAE1CI,EAAAA,SAAS,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,GAAA,KAAA,CAAA,GAAA,CAAAU,kBAAA,GAATV,SAAS,CAAEY,OAAO,MAAAF,IAAAA,IAAAA,kBAAA,KAAAC,KAAAA,CAAAA,GAAAA,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AA,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;;;;"}
|
@@ -8,7 +8,7 @@ import { base as base$1 } from './variations/_view/base.js';
|
|
8
8
|
import { base as base$2 } from './variations/_size/base.js';
|
9
9
|
import { StyledContentLeft, StyledText, StyledContentRight, base } from './DropdownItem.styles.js';
|
10
10
|
|
11
|
-
var _excluded = ["id", "className", "children", "text", "isSelected", "name", "checked", "value", "
|
11
|
+
var _excluded = ["id", "className", "children", "text", "isSelected", "name", "checked", "value", "view", "size", "disabled", "role", "contentLeft", "contentRight", "onSelect", "onClick", "onChange"];
|
12
12
|
/**
|
13
13
|
* Элемент выпадающего списка
|
14
14
|
*/
|
@@ -22,10 +22,11 @@ var dropdownItemRoot = function dropdownItemRoot(Root) {
|
|
22
22
|
name = _ref.name,
|
23
23
|
checked = _ref.checked,
|
24
24
|
value = _ref.value,
|
25
|
-
role = _ref.role,
|
26
25
|
view = _ref.view,
|
27
26
|
size = _ref.size,
|
28
27
|
disabled = _ref.disabled,
|
28
|
+
_ref$role = _ref.role,
|
29
|
+
role = _ref$role === void 0 ? 'option' : _ref$role,
|
29
30
|
ContentLeftComponent = _ref.contentLeft,
|
30
31
|
ContentRightComponent = _ref.contentRight,
|
31
32
|
onSelect = _ref.onSelect,
|
@@ -59,7 +60,7 @@ var dropdownItemRoot = function dropdownItemRoot(Root) {
|
|
59
60
|
value: value,
|
60
61
|
checked: checked || isSelected,
|
61
62
|
disabled: disabled,
|
62
|
-
tabIndex:
|
63
|
+
tabIndex: -1
|
63
64
|
}, !disabled && {
|
64
65
|
onChange: handleOnChange
|
65
66
|
});
|
@@ -79,6 +80,7 @@ var dropdownItemRoot = function dropdownItemRoot(Root) {
|
|
79
80
|
ref: outerRootRef,
|
80
81
|
tabIndex: 0,
|
81
82
|
"aria-disabled": disabled,
|
83
|
+
"aria-selected": isSelected,
|
82
84
|
onClick: handleOnClick,
|
83
85
|
"data-value": value
|
84
86
|
}, rest), text ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StyledContentLeft, null, ContentLeftComponent && ContentLeft), /*#__PURE__*/React.createElement(StyledText, null, text), /*#__PURE__*/React.createElement(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,UAAU,CACN,UAAAC,IAAA,EAqBIC,YAAY,EACX;AAAA,IAAA,IApBGC,EAAE,GAAAF,IAAA,CAAFE,EAAE;MACFC,SAAS,GAAAH,IAAA,CAATG,SAAS;MACTC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;MACRC,IAAI,GAAAL,IAAA,CAAJK,IAAI;MACJC,UAAU,GAAAN,IAAA,CAAVM,UAAU;MACV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AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNpD,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;"}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { typeof as _typeof } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
2
|
-
import React, { isValidElement, cloneElement } from 'react';
|
1
|
+
import { objectSpread2 as _objectSpread2, typeof as _typeof } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
2
|
+
import React, { isValidElement, cloneElement, Children } from 'react';
|
3
3
|
|
4
4
|
var getPlacement = function getPlacement(placement) {
|
5
5
|
return "".concat(placement, "-start");
|
@@ -29,6 +29,48 @@ var getValidComponent = function getValidComponent(element, props) {
|
|
29
29
|
}
|
30
30
|
return element;
|
31
31
|
};
|
32
|
+
var getChildren = function getChildren(children, externalProps) {
|
33
|
+
if (externalProps.childrenRefs) {
|
34
|
+
externalProps.childrenRefs.current = [];
|
35
|
+
}
|
36
|
+
var res = Children.map(children || [], function (child) {
|
37
|
+
var hasValue = ('value' in (child === null || child === void 0 ? void 0 : child.props));
|
38
|
+
var hasTarget = ('target' in (child === null || child === void 0 ? void 0 : child.props));
|
39
|
+
if (! /*#__PURE__*/isValidElement(child) || !hasValue && !hasTarget) {
|
40
|
+
return child;
|
41
|
+
}
|
42
|
+
if (hasTarget) {
|
43
|
+
var _ref = child === null || child === void 0 ? void 0 : child.props,
|
44
|
+
target = _ref.target;
|
45
|
+
if (! /*#__PURE__*/isValidElement(target)) {
|
46
|
+
return child;
|
47
|
+
}
|
48
|
+
var targetProps = _objectSpread2(_objectSpread2({}, target === null || target === void 0 ? void 0 : target.props), {}, {
|
49
|
+
ref: function ref(element) {
|
50
|
+
var _externalProps$childr;
|
51
|
+
if (externalProps !== null && externalProps !== void 0 && (_externalProps$childr = externalProps.childrenRefs) !== null && _externalProps$childr !== void 0 && _externalProps$childr.current && element) {
|
52
|
+
externalProps.childrenRefs.current.push(element);
|
53
|
+
}
|
54
|
+
}
|
55
|
+
});
|
56
|
+
var updatedTarget = /*#__PURE__*/cloneElement(target, targetProps);
|
57
|
+
var updatedProps = _objectSpread2(_objectSpread2({}, child === null || child === void 0 ? void 0 : child.props), {}, {
|
58
|
+
target: updatedTarget
|
59
|
+
});
|
60
|
+
return /*#__PURE__*/cloneElement(child, updatedProps);
|
61
|
+
}
|
62
|
+
var props = _objectSpread2(_objectSpread2({}, child === null || child === void 0 ? void 0 : child.props), {}, {
|
63
|
+
ref: function ref(element) {
|
64
|
+
var _externalProps$childr2;
|
65
|
+
if (externalProps !== null && externalProps !== void 0 && (_externalProps$childr2 = externalProps.childrenRefs) !== null && _externalProps$childr2 !== void 0 && _externalProps$childr2.current && element) {
|
66
|
+
externalProps.childrenRefs.current.push(element);
|
67
|
+
}
|
68
|
+
}
|
69
|
+
});
|
70
|
+
return /*#__PURE__*/cloneElement(child, props);
|
71
|
+
});
|
72
|
+
return res;
|
73
|
+
};
|
32
74
|
|
33
|
-
export { getPlacement, getPlacements, getValidComponent };
|
75
|
+
export { getChildren, getPlacement, getPlacements, getValidComponent };
|
34
76
|
//# sourceMappingURL=index.js.map
|
@@ -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,E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,CAAA;AACpD,SAAA;AACJ,OAAA;KACH,CAAA,CAAA;AAED,IAAA,oBAAOK,YAAY,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/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js
CHANGED
@@ -3,11 +3,11 @@ import { styled } from '@linaria/react';
|
|
3
3
|
import { selectConfig } from '../../../Select/Select.js';
|
4
4
|
import 'react';
|
5
5
|
import '@salutejs/plasma-core';
|
6
|
+
import '../../../../utils/react.js';
|
6
7
|
import '@linaria/core';
|
7
8
|
import { component, mergeConfig } from '../../../../engines/common.js';
|
8
9
|
import 'react-dom';
|
9
10
|
import 'react-popper';
|
10
|
-
import '../../../../utils/react.js';
|
11
11
|
import 'focus-visible';
|
12
12
|
import { selectItemConfig } from '../../../Select/ui/SelectItem/SelectItem.js';
|
13
13
|
|
@@ -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
|
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import 'react';
|
2
2
|
import '@salutejs/plasma-core';
|
3
|
+
import '../../../../utils/react.js';
|
3
4
|
import '@linaria/react';
|
4
5
|
import '@linaria/core';
|
5
6
|
import 'focus-visible';
|
6
7
|
import 'react-dom';
|
7
8
|
import 'react-popper';
|
8
|
-
import '../../../../utils/react.js';
|
9
9
|
import { dropdownDividerRoot } from '../../../Dropdown/ui/DropdownDivider/DropdownDivider.js';
|
10
10
|
import { base as base$1 } from './variations/_view/base.js';
|
11
11
|
import { base as base$2 } from './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
|
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import 'react';
|
2
2
|
import '@salutejs/plasma-core';
|
3
|
+
import '../../../../utils/react.js';
|
3
4
|
import '@linaria/react';
|
4
5
|
import '@linaria/core';
|
5
6
|
import 'focus-visible';
|
6
7
|
import 'react-dom';
|
7
8
|
import 'react-popper';
|
8
|
-
import '../../../../utils/react.js';
|
9
9
|
import { dropdownFooterRoot } from '../../../Dropdown/ui/DropdownFooter/DropdownFooter.js';
|
10
10
|
import { base as base$1 } from './variations/_view/base.js';
|
11
11
|
import { base as base$2 } from './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
|
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import 'react';
|
2
2
|
import '@salutejs/plasma-core';
|
3
|
+
import '../../../../utils/react.js';
|
3
4
|
import '@linaria/react';
|
4
5
|
import '@linaria/core';
|
5
6
|
import 'focus-visible';
|
6
7
|
import 'react-dom';
|
7
8
|
import 'react-popper';
|
8
|
-
import '../../../../utils/react.js';
|
9
9
|
import { dropdownGroupRoot } from '../../../Dropdown/ui/DropdownGroup/DropdownGroup.js';
|
10
10
|
import { base as base$1 } from './variations/_view/base.js';
|
11
11
|
import { base as base$2 } from './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
|
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import 'react';
|
2
2
|
import '@salutejs/plasma-core';
|
3
|
+
import '../../../../utils/react.js';
|
3
4
|
import '@linaria/react';
|
4
5
|
import '@linaria/core';
|
5
6
|
import 'focus-visible';
|
6
7
|
import 'react-dom';
|
7
8
|
import 'react-popper';
|
8
|
-
import '../../../../utils/react.js';
|
9
9
|
import { dropdownHeaderRoot } from '../../../Dropdown/ui/DropdownHeader/DropdownHeader.js';
|
10
10
|
import { base as base$1 } from './variations/_view/base.js';
|
11
11
|
import { base as base$2 } from './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
|
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import 'react';
|
2
2
|
import '@salutejs/plasma-core';
|
3
|
+
import '../../../../utils/react.js';
|
3
4
|
import '@linaria/react';
|
4
5
|
import '@linaria/core';
|
5
6
|
import 'focus-visible';
|
6
7
|
import 'react-dom';
|
7
8
|
import 'react-popper';
|
8
|
-
import '../../../../utils/react.js';
|
9
9
|
import { dropdownItemRoot } from '../../../Dropdown/ui/DropdownItem/DropdownItem.js';
|
10
10
|
import { base as base$1 } from './variations/_view/base.js';
|
11
11
|
import { base as base$2 } from './variations/_size/base.js';
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import './SelectItem.styles_6h17aw.css';
|
2
2
|
import 'react';
|
3
3
|
import '@salutejs/plasma-core';
|
4
|
+
import '../../../../utils/react.js';
|
4
5
|
import '@linaria/react';
|
5
6
|
import '@linaria/core';
|
6
7
|
import 'focus-visible';
|
7
8
|
import 'react-dom';
|
8
9
|
import 'react-popper';
|
9
|
-
import '../../../../utils/react.js';
|
10
10
|
|
11
11
|
var base = "bhy25de";
|
12
12
|
|
package/es/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/es/index.js
CHANGED
@@ -86,6 +86,7 @@ export { drawerHeaderConfig, drawerHeaderRoot } from './components/Drawer/ui/Dra
|
|
86
86
|
export { classes as drawerClasses, tokens as drawerTokens } from './components/Drawer/Drawer.tokens.js';
|
87
87
|
export { dropdownConfig, dropdownRoot } from './components/Dropdown/Dropdown.js';
|
88
88
|
export { classes as dropdownClasses, tokens as dropdownTokens } from './components/Dropdown/Dropdown.tokens.js';
|
89
|
+
export { useKeyNavigation as useDropdownKeyNavigation } from './components/Dropdown/hooks/useKeyboardNavigation.js';
|
89
90
|
export { dropdownDividerConfig, dropdownDividerRoot } from './components/Dropdown/ui/DropdownDivider/DropdownDivider.js';
|
90
91
|
export { dropdownFooterConfig, dropdownFooterRoot } from './components/Dropdown/ui/DropdownFooter/DropdownFooter.js';
|
91
92
|
export { dropdownGroupConfig, dropdownGroupRoot } from './components/Dropdown/ui/DropdownGroup/DropdownGroup.js';
|
package/es/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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@salutejs/plasma-new-hope",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.77.0-canary.1185.8720195819.0",
|
4
4
|
"description": "Salute Design System blueprint",
|
5
5
|
"main": "cjs/index.js",
|
6
6
|
"module": "es/index.js",
|
@@ -102,5 +102,5 @@
|
|
102
102
|
"react-popper": "2.3.0",
|
103
103
|
"storeon": "3.1.5"
|
104
104
|
},
|
105
|
-
"gitHead": "
|
105
|
+
"gitHead": "13c455660efe83ed3be6667c5a39572827922e2f"
|
106
106
|
}
|