@salutejs/plasma-new-hope 0.229.0-canary.1666.12456056975.0 → 0.230.0-canary.1670.12462995068.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Breadcrumbs/Breadcrumbs.js +1 -2
- package/cjs/components/Breadcrumbs/Breadcrumbs.js.map +1 -1
- package/cjs/components/Breadcrumbs/utils/index.js +38 -0
- package/cjs/components/Breadcrumbs/utils/index.js.map +1 -1
- package/cjs/components/Calendar/utils/getDateWithModification.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/Combobox.js +3 -2
- package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.css +75 -0
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +112 -0
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +2 -2
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
- package/cjs/components/Dropdown/Dropdown.js +3 -2
- package/cjs/components/Dropdown/Dropdown.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +1 -1
- package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.css +25 -0
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +2 -2
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
- package/cjs/components/Select/Select.js +3 -2
- package/cjs/components/Select/Select.js.map +1 -1
- package/cjs/components/Select/ui/Inner/Inner.css +109 -0
- package/cjs/components/Select/ui/Inner/Inner.js +1 -1
- package/cjs/components/Select/ui/Inner/Inner.js.map +1 -1
- package/cjs/components/Select/ui/Inner/ui/Item/Item.css +112 -0
- package/cjs/components/Select/ui/Inner/ui/Item/Item.js +2 -2
- package/cjs/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
- package/cjs/components/Slider/components/Double/Double.css +91 -0
- package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +7 -0
- package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js.map +1 -1
- package/cjs/components/TextArea/TextArea.js +6 -0
- package/cjs/components/TextArea/TextArea.js.map +1 -1
- package/cjs/components/TextField/TextField.js +1 -0
- package/cjs/components/TextField/TextField.js.map +1 -1
- package/cjs/engines/common.js +36 -0
- package/cjs/engines/common.js.map +1 -1
- package/cjs/engines/linaria.js +3 -3
- package/cjs/engines/linaria.js.map +1 -1
- package/emotion/cjs/components/Breadcrumbs/Breadcrumbs.js +1 -2
- package/emotion/cjs/components/Breadcrumbs/utils/index.js +37 -1
- package/emotion/cjs/components/Calendar/utils/getDateWithModification.js +3 -3
- package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.js +4 -3
- package/emotion/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -1
- package/emotion/cjs/components/Dropdown/Dropdown.js +4 -3
- package/emotion/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +3 -3
- package/emotion/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +1 -1
- package/emotion/cjs/components/Select/Select.js +4 -3
- package/emotion/cjs/components/Select/ui/Inner/Inner.js +3 -3
- package/emotion/cjs/components/Select/ui/Inner/ui/Item/Item.js +1 -1
- package/emotion/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +3 -3
- package/emotion/cjs/components/TextArea/TextArea.js +7 -1
- package/emotion/cjs/components/TextField/TextField.js +2 -1
- package/emotion/cjs/engines/common.js +42 -2
- package/emotion/cjs/engines/emotion.js +4 -4
- package/emotion/cjs/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +71 -8
- package/emotion/cjs/examples/plasma_web/components/TextArea/TextArea.stories.tsx +69 -7
- package/emotion/es/components/Breadcrumbs/Breadcrumbs.js +1 -2
- package/emotion/es/components/Breadcrumbs/utils/index.js +35 -0
- package/emotion/es/components/Calendar/utils/getDateWithModification.js +1 -1
- package/emotion/es/components/Combobox/ComboboxNew/Combobox.js +2 -2
- package/emotion/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -1
- package/emotion/es/components/Dropdown/Dropdown.js +2 -2
- package/emotion/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +1 -1
- package/emotion/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +1 -1
- package/emotion/es/components/Select/Select.js +2 -2
- package/emotion/es/components/Select/ui/Inner/Inner.js +1 -1
- package/emotion/es/components/Select/ui/Inner/ui/Item/Item.js +1 -1
- package/emotion/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +1 -1
- package/emotion/es/components/TextArea/TextArea.js +8 -2
- package/emotion/es/components/TextField/TextField.js +2 -1
- package/emotion/es/engines/common.js +40 -0
- package/emotion/es/engines/emotion.js +2 -2
- package/emotion/es/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +71 -8
- package/emotion/es/examples/plasma_web/components/TextArea/TextArea.stories.tsx +69 -7
- package/es/components/Breadcrumbs/Breadcrumbs.js +1 -2
- package/es/components/Breadcrumbs/Breadcrumbs.js.map +1 -1
- package/es/components/Breadcrumbs/utils/index.js +37 -1
- package/es/components/Breadcrumbs/utils/index.js.map +1 -1
- package/es/components/Calendar/utils/getDateWithModification.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/Combobox.js +3 -3
- package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.css +75 -0
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +112 -0
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -1
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
- package/es/components/Dropdown/Dropdown.js +3 -3
- package/es/components/Dropdown/Dropdown.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +1 -1
- package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.css +25 -0
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +1 -1
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
- package/es/components/Select/Select.js +3 -3
- package/es/components/Select/Select.js.map +1 -1
- package/es/components/Select/ui/Inner/Inner.css +109 -0
- package/es/components/Select/ui/Inner/Inner.js +1 -1
- package/es/components/Select/ui/Inner/Inner.js.map +1 -1
- package/es/components/Select/ui/Inner/ui/Item/Item.css +112 -0
- package/es/components/Select/ui/Inner/ui/Item/Item.js +1 -1
- package/es/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
- package/es/components/Slider/components/Double/Double.css +91 -0
- package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +7 -0
- package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js.map +1 -1
- package/es/components/TextArea/TextArea.js +7 -1
- package/es/components/TextArea/TextArea.js.map +1 -1
- package/es/components/TextField/TextField.js +1 -0
- package/es/components/TextField/TextField.js.map +1 -1
- package/es/engines/common.js +36 -2
- package/es/engines/common.js.map +1 -1
- package/es/engines/linaria.js +1 -1
- package/es/engines/linaria.js.map +1 -1
- package/package.json +5 -17
- package/styled-components/cjs/components/Breadcrumbs/Breadcrumbs.js +1 -2
- package/styled-components/cjs/components/Breadcrumbs/utils/index.js +37 -1
- package/styled-components/cjs/components/Calendar/utils/getDateWithModification.js +3 -3
- package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.js +4 -3
- package/styled-components/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -1
- package/styled-components/cjs/components/Dropdown/Dropdown.js +4 -3
- package/styled-components/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +3 -3
- package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +1 -1
- package/styled-components/cjs/components/Select/Select.js +4 -3
- package/styled-components/cjs/components/Select/ui/Inner/Inner.js +3 -3
- package/styled-components/cjs/components/Select/ui/Inner/ui/Item/Item.js +1 -1
- package/styled-components/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +3 -3
- package/styled-components/cjs/components/TextArea/TextArea.js +6 -0
- package/styled-components/cjs/components/TextField/TextField.js +1 -0
- package/styled-components/cjs/engines/common.js +42 -2
- package/styled-components/cjs/engines/styled-components.js +3 -3
- package/styled-components/cjs/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +71 -8
- package/styled-components/cjs/examples/plasma_web/components/TextArea/TextArea.stories.tsx +69 -7
- package/styled-components/es/components/Breadcrumbs/Breadcrumbs.js +1 -2
- package/styled-components/es/components/Breadcrumbs/utils/index.js +35 -0
- package/styled-components/es/components/Calendar/utils/getDateWithModification.js +1 -1
- package/styled-components/es/components/Combobox/ComboboxNew/Combobox.js +2 -2
- package/styled-components/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -1
- package/styled-components/es/components/Dropdown/Dropdown.js +2 -2
- package/styled-components/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +1 -1
- package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +1 -1
- package/styled-components/es/components/Select/Select.js +2 -2
- package/styled-components/es/components/Select/ui/Inner/Inner.js +1 -1
- package/styled-components/es/components/Select/ui/Inner/ui/Item/Item.js +1 -1
- package/styled-components/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +1 -1
- package/styled-components/es/components/TextArea/TextArea.js +7 -1
- package/styled-components/es/components/TextField/TextField.js +1 -0
- package/styled-components/es/engines/common.js +40 -0
- package/styled-components/es/engines/styled-components.js +1 -1
- package/styled-components/es/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +71 -8
- package/styled-components/es/examples/plasma_web/components/TextArea/TextArea.stories.tsx +69 -7
- package/types/components/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/types/components/Breadcrumbs/utils/index.d.ts +5 -2
- package/types/components/Breadcrumbs/utils/index.d.ts.map +1 -1
- package/types/components/Calendar/utils/getDateWithModification.d.ts +1 -1
- package/types/components/Calendar/utils/getDateWithModification.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/Combobox.d.ts +2 -1
- package/types/components/Combobox/ComboboxNew/Combobox.d.ts.map +1 -1
- package/types/components/Dropdown/Dropdown.d.ts +2 -1
- package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/types/components/Select/Select.d.ts +2 -1
- package/types/components/Select/Select.d.ts.map +1 -1
- package/types/components/TextArea/TextArea.d.ts.map +1 -1
- package/types/components/TextField/TextField.d.ts.map +1 -1
- package/types/engines/common.d.ts +3 -1
- package/types/engines/common.d.ts.map +1 -1
- package/cjs/components/Breadcrumbs/ui/BreadcrumbShorter/BreadcrumbShorter.css +0 -3
- package/cjs/components/Breadcrumbs/utils/getShortItems.js +0 -44
- package/cjs/components/Breadcrumbs/utils/getShortItems.js.map +0 -1
- package/cjs/components/Combobox/ComboboxNew/Combobox.context.js +0 -10
- package/cjs/components/Combobox/ComboboxNew/Combobox.context.js.map +0 -1
- package/cjs/components/Dropdown/Dropdown.context.js +0 -10
- package/cjs/components/Dropdown/Dropdown.context.js.map +0 -1
- package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.css +0 -27
- package/cjs/components/Select/Select.context.js +0 -10
- package/cjs/components/Select/Select.context.js.map +0 -1
- package/cjs/engines/utils.js +0 -40
- package/cjs/engines/utils.js.map +0 -1
- package/emotion/cjs/components/Breadcrumbs/utils/getShortItems.js +0 -42
- package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.context.js +0 -8
- package/emotion/cjs/components/Dropdown/Dropdown.context.js +0 -8
- package/emotion/cjs/components/Select/Select.context.js +0 -8
- package/emotion/cjs/engines/utils.js +0 -42
- package/emotion/es/components/Breadcrumbs/utils/getShortItems.js +0 -35
- package/emotion/es/components/Combobox/ComboboxNew/Combobox.context.js +0 -2
- package/emotion/es/components/Dropdown/Dropdown.context.js +0 -2
- package/emotion/es/components/Select/Select.context.js +0 -2
- package/emotion/es/engines/utils.js +0 -36
- package/es/components/Breadcrumbs/ui/BreadcrumbShorter/BreadcrumbShorter.css +0 -3
- package/es/components/Breadcrumbs/utils/getShortItems.js +0 -39
- package/es/components/Breadcrumbs/utils/getShortItems.js.map +0 -1
- package/es/components/Combobox/ComboboxNew/Combobox.context.js +0 -6
- package/es/components/Combobox/ComboboxNew/Combobox.context.js.map +0 -1
- package/es/components/Dropdown/Dropdown.context.js +0 -6
- package/es/components/Dropdown/Dropdown.context.js.map +0 -1
- package/es/components/Dropdown/ui/DropdownInner/DropdownInner.css +0 -27
- package/es/components/Select/Select.context.js +0 -6
- package/es/components/Select/Select.context.js.map +0 -1
- package/es/engines/utils.js +0 -35
- package/es/engines/utils.js.map +0 -1
- package/styled-components/cjs/components/Breadcrumbs/utils/getShortItems.js +0 -42
- package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.context.js +0 -8
- package/styled-components/cjs/components/Dropdown/Dropdown.context.js +0 -8
- package/styled-components/cjs/components/Select/Select.context.js +0 -8
- package/styled-components/cjs/engines/utils.js +0 -42
- package/styled-components/es/components/Breadcrumbs/utils/getShortItems.js +0 -35
- package/styled-components/es/components/Combobox/ComboboxNew/Combobox.context.js +0 -2
- package/styled-components/es/components/Dropdown/Dropdown.context.js +0 -2
- package/styled-components/es/components/Select/Select.context.js +0 -2
- package/styled-components/es/engines/utils.js +0 -36
- package/types/components/Breadcrumbs/utils/getShortItems.d.ts +0 -6
- package/types/components/Breadcrumbs/utils/getShortItems.d.ts.map +0 -1
- package/types/components/Combobox/ComboboxNew/Combobox.context.d.ts +0 -4
- package/types/components/Combobox/ComboboxNew/Combobox.context.d.ts.map +0 -1
- package/types/components/Dropdown/Dropdown.context.d.ts +0 -4
- package/types/components/Dropdown/Dropdown.context.d.ts.map +0 -1
- package/types/components/Select/Select.context.d.ts +0 -4
- package/types/components/Select/Select.context.d.ts.map +0 -1
- package/types/engines/utils.d.ts +0 -4
- package/types/engines/utils.d.ts.map +0 -1
- /package/cjs/components/Breadcrumbs/utils/{getShortItems.css → index.css} +0 -0
- /package/es/components/Breadcrumbs/utils/{getShortItems.css → index.css} +0 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Dropdown.js","sources":["../../../src/components/Dropdown/Dropdown.tsx"],"sourcesContent":["import React, { forwardRef, useReducer, useRef } from 'react';\nimport { safeUseId } from '@salutejs/plasma-core';\n\nimport { RootProps } from '../../engines';\nimport { cx } from '../../utils';\nimport { useOutsideClick } from '../../hooks';\n\nimport { pathReducer } from './reducers/pathReducer';\nimport { focusedPathReducer } from './reducers/focusedPathReducer';\nimport { DropdownInner } from './ui';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { Ul, base } from './Dropdown.styles';\nimport { childrenWithProps, getItemByFocused, getItemId, getPlacement } from './utils';\nimport type { DropdownProps, HandleGlobalToggleType } from './Dropdown.types';\nimport { classes } from './Dropdown.tokens';\nimport { useKeyNavigation } from './hooks/useKeyboardNavigation';\nimport { useHashMaps } from './hooks/useHashMaps';\nimport { FloatingPopover } from './FloatingPopover';\nimport { Context } from './Dropdown.context';\n\n/**\n * Выпадающий список.\n */\nexport const dropdownRoot = (Root: RootProps<HTMLDivElement, Omit<DropdownProps, 'items'>>) =>\n forwardRef<HTMLDivElement, DropdownProps>(\n (\n {\n items,\n children,\n placement,\n offset,\n closeOnOverlayClick = true,\n onToggle,\n size,\n view,\n itemRole = 'treeitem',\n className,\n listWidth,\n listHeight,\n listOverflow,\n closeOnSelect = true,\n onHover,\n onItemSelect,\n onItemClick,\n trigger = 'click',\n variant = 'normal',\n hasArrow = true,\n alwaysOpened = false,\n portal,\n renderItem,\n zIndex,\n beforeList,\n afterList,\n ...rest\n },\n ref,\n ) => {\n const [path, dispatchPath] = useReducer(pathReducer, []);\n const [focusedPath, dispatchFocusedPath] = useReducer(focusedPathReducer, []);\n\n const [pathMap, focusedToValueMap] = useHashMaps(items);\n\n const activeDescendantItemValue = getItemByFocused(focusedPath, focusedToValueMap)?.value || '';\n\n const floatingPopoverRef = useRef<HTMLDivElement>(null);\n\n const treeId = safeUseId();\n\n // Логика работы при клике за пределами выпадающего списка\n const targetRef = useOutsideClick<HTMLUListElement>((event) => {\n if (!isCurrentListOpen || !closeOnOverlayClick || alwaysOpened) {\n return;\n }\n\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n\n if (onToggle) {\n onToggle(false, event);\n }\n }, floatingPopoverRef);\n\n const handleGlobalToggle: HandleGlobalToggleType = (opened, event) => {\n if (alwaysOpened || opened) {\n dispatchPath({ type: 'opened_first_level' });\n } else {\n dispatchFocusedPath({ type: 'reset' });\n dispatchPath({ type: 'reset' });\n }\n\n if (onToggle) {\n onToggle(opened, event);\n }\n };\n\n const { onKeyDown } = useKeyNavigation({\n focusedPath,\n dispatchFocusedPath,\n path,\n dispatchPath,\n pathMap,\n focusedToValueMap,\n handleGlobalToggle,\n closeOnSelect,\n onItemSelect,\n onItemClick,\n });\n\n const isCurrentListOpen = alwaysOpened || Boolean(path[0]);\n\n return (\n <Context.Provider\n value={{\n focusedPath,\n size,\n variant,\n itemRole,\n handleGlobalToggle,\n closeOnSelect,\n onHover,\n onItemClick,\n onItemSelect,\n hasArrow,\n treeId,\n renderItem,\n }}\n >\n <FloatingPopover\n ref={floatingPopoverRef}\n opened={isCurrentListOpen}\n onToggle={handleGlobalToggle}\n placement={getPlacement(placement)}\n offset={offset}\n portal={portal}\n trigger={trigger}\n target={childrenWithProps(children, {\n role: 'combobox',\n 'aria-controls': `${treeId}_tree_level_1`,\n 'aria-expanded': isCurrentListOpen,\n 'aria-activedescendant': activeDescendantItemValue\n ? getItemId(treeId, activeDescendantItemValue.toString())\n : '',\n onKeyDown,\n })}\n zIndex={zIndex}\n >\n <Root\n className={cx(className, classes.dropdownRoot)}\n ref={ref}\n view={view}\n size={size}\n style={{ display: 'inline-block' }}\n {...rest}\n >\n <Ul\n ref={targetRef}\n id={`${treeId}_tree_level_1`}\n role=\"tree\"\n listHeight={listHeight}\n listOverflow={listOverflow}\n listWidth={listWidth}\n >\n {beforeList}\n\n {items.map((item, index) => (\n <DropdownInner\n key={`${index}/0`}\n item={item}\n currentLevel={0}\n trigger={trigger}\n path={path}\n dispatchPath={dispatchPath}\n index={index}\n listHeight={listHeight}\n listOverflow={listOverflow}\n listWidth={listWidth}\n />\n ))}\n\n {afterList}\n </Ul>\n </Root>\n </FloatingPopover>\n </Context.Provider>\n );\n },\n );\n\nexport const dropdownConfig = {\n name: 'Dropdown',\n tag: 'div',\n layout: dropdownRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n },\n};\n"],"names":["dropdownRoot","Root","forwardRef","_ref","ref","_getItemByFocused","items","children","placement","offset","_ref$closeOnOverlayCl","closeOnOverlayClick","onToggle","size","view","_ref$itemRole","itemRole","className","listWidth","listHeight","listOverflow","_ref$closeOnSelect","closeOnSelect","onHover","onItemSelect","onItemClick","_ref$trigger","trigger","_ref$variant","variant","_ref$hasArrow","hasArrow","_ref$alwaysOpened","alwaysOpened","portal","renderItem","zIndex","beforeList","afterList","rest","_objectWithoutProperties","_excluded","_useReducer","useReducer","pathReducer","_useReducer2","_slicedToArray","path","dispatchPath","_useReducer3","focusedPathReducer","_useReducer4","focusedPath","dispatchFocusedPath","_useHashMaps","useHashMaps","_useHashMaps2","pathMap","focusedToValueMap","activeDescendantItemValue","getItemByFocused","value","floatingPopoverRef","useRef","treeId","safeUseId","targetRef","useOutsideClick","event","isCurrentListOpen","type","handleGlobalToggle","opened","_useKeyNavigation","useKeyNavigation","onKeyDown","Boolean","React","createElement","Context","Provider","FloatingPopover","getPlacement","target","childrenWithProps","role","concat","getItemId","toString","_extends","cx","classes","style","display","Ul","id","map","item","index","DropdownInner","key","currentLevel","dropdownConfig","name","tag","layout","base","variations","css","viewCSS","sizeC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E;AACF+F,MAAAA,GAAG,EAAEE,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNjG,IAAAA,IAAI,EAAE,SAAS;AACfD,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;;"}
|
1
|
+
{"version":3,"file":"Dropdown.js","sources":["../../../src/components/Dropdown/Dropdown.tsx"],"sourcesContent":["import React, { createContext, forwardRef, useReducer, useRef } from 'react';\nimport { safeUseId } from '@salutejs/plasma-core';\n\nimport { RootProps } from '../../engines';\nimport { cx } from '../../utils';\nimport { useOutsideClick } from '../../hooks';\n\nimport { pathReducer } from './reducers/pathReducer';\nimport { focusedPathReducer } from './reducers/focusedPathReducer';\nimport { DropdownInner } from './ui';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { Ul, base } from './Dropdown.styles';\nimport { childrenWithProps, getItemByFocused, getItemId, getPlacement } from './utils';\nimport type { DropdownProps, HandleGlobalToggleType, ItemContext } from './Dropdown.types';\nimport { classes } from './Dropdown.tokens';\nimport { useKeyNavigation } from './hooks/useKeyboardNavigation';\nimport { useHashMaps } from './hooks/useHashMaps';\nimport { FloatingPopover } from './FloatingPopover';\n\nexport const Context = createContext<ItemContext>({} as ItemContext);\n\n/**\n * Выпадающий список.\n */\nexport const dropdownRoot = (Root: RootProps<HTMLDivElement, Omit<DropdownProps, 'items'>>) =>\n forwardRef<HTMLDivElement, DropdownProps>(\n (\n {\n items,\n children,\n placement,\n offset,\n closeOnOverlayClick = true,\n onToggle,\n size,\n view,\n itemRole = 'treeitem',\n className,\n listWidth,\n listHeight,\n listOverflow,\n closeOnSelect = true,\n onHover,\n onItemSelect,\n onItemClick,\n trigger = 'click',\n variant = 'normal',\n hasArrow = true,\n alwaysOpened = false,\n portal,\n renderItem,\n zIndex,\n beforeList,\n afterList,\n ...rest\n },\n ref,\n ) => {\n const [path, dispatchPath] = useReducer(pathReducer, []);\n const [focusedPath, dispatchFocusedPath] = useReducer(focusedPathReducer, []);\n\n const [pathMap, focusedToValueMap] = useHashMaps(items);\n\n const activeDescendantItemValue = getItemByFocused(focusedPath, focusedToValueMap)?.value || '';\n\n const floatingPopoverRef = useRef<HTMLDivElement>(null);\n\n const treeId = safeUseId();\n\n // Логика работы при клике за пределами выпадающего списка\n const targetRef = useOutsideClick<HTMLUListElement>((event) => {\n if (!isCurrentListOpen || !closeOnOverlayClick || alwaysOpened) {\n return;\n }\n\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n\n if (onToggle) {\n onToggle(false, event);\n }\n }, floatingPopoverRef);\n\n const handleGlobalToggle: HandleGlobalToggleType = (opened, event) => {\n if (alwaysOpened || opened) {\n dispatchPath({ type: 'opened_first_level' });\n } else {\n dispatchFocusedPath({ type: 'reset' });\n dispatchPath({ type: 'reset' });\n }\n\n if (onToggle) {\n onToggle(opened, event);\n }\n };\n\n const { onKeyDown } = useKeyNavigation({\n focusedPath,\n dispatchFocusedPath,\n path,\n dispatchPath,\n pathMap,\n focusedToValueMap,\n handleGlobalToggle,\n closeOnSelect,\n onItemSelect,\n onItemClick,\n });\n\n const isCurrentListOpen = alwaysOpened || Boolean(path[0]);\n\n return (\n <Context.Provider\n value={{\n focusedPath,\n size,\n variant,\n itemRole,\n handleGlobalToggle,\n closeOnSelect,\n onHover,\n onItemClick,\n onItemSelect,\n hasArrow,\n treeId,\n renderItem,\n }}\n >\n <FloatingPopover\n ref={floatingPopoverRef}\n opened={isCurrentListOpen}\n onToggle={handleGlobalToggle}\n placement={getPlacement(placement)}\n offset={offset}\n portal={portal}\n trigger={trigger}\n target={childrenWithProps(children, {\n role: 'combobox',\n 'aria-controls': `${treeId}_tree_level_1`,\n 'aria-expanded': isCurrentListOpen,\n 'aria-activedescendant': activeDescendantItemValue\n ? getItemId(treeId, activeDescendantItemValue.toString())\n : '',\n onKeyDown,\n })}\n zIndex={zIndex}\n >\n <Root\n className={cx(className, classes.dropdownRoot)}\n ref={ref}\n view={view}\n size={size}\n style={{ display: 'inline-block' }}\n {...rest}\n >\n <Ul\n ref={targetRef}\n id={`${treeId}_tree_level_1`}\n role=\"tree\"\n listHeight={listHeight}\n listOverflow={listOverflow}\n listWidth={listWidth}\n >\n {beforeList}\n\n {items.map((item, index) => (\n <DropdownInner\n key={`${index}/0`}\n item={item}\n currentLevel={0}\n trigger={trigger}\n path={path}\n dispatchPath={dispatchPath}\n index={index}\n listHeight={listHeight}\n listOverflow={listOverflow}\n listWidth={listWidth}\n />\n ))}\n\n {afterList}\n </Ul>\n </Root>\n </FloatingPopover>\n </Context.Provider>\n );\n },\n );\n\nexport const dropdownConfig = {\n name: 'Dropdown',\n tag: 'div',\n layout: dropdownRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n },\n};\n"],"names":["Context","createContext","dropdownRoot","Root","forwardRef","_ref","ref","_getItemByFocused","items","children","placement","offset","_ref$closeOnOverlayCl","closeOnOverlayClick","onToggle","size","view","_ref$itemRole","itemRole","className","listWidth","listHeight","listOverflow","_ref$closeOnSelect","closeOnSelect","onHover","onItemSelect","onItemClick","_ref$trigger","trigger","_ref$variant","variant","_ref$hasArrow","hasArrow","_ref$alwaysOpened","alwaysOpened","portal","renderItem","zIndex","beforeList","afterList","rest","_objectWithoutProperties","_excluded","_useReducer","useReducer","pathReducer","_useReducer2","_slicedToArray","path","dispatchPath","_useReducer3","focusedPathReducer","_useReducer4","focusedPath","dispatchFocusedPath","_useHashMaps","useHashMaps","_useHashMaps2","pathMap","focusedToValueMap","activeDescendantItemValue","getItemByFocused","value","floatingPopoverRef","useRef","treeId","safeUseId","targetRef","useOutsideClick","event","isCurrentListOpen","type","handleGlobalToggle","opened","_useKeyNavigation","useKeyNavigation","onKeyDown","Boolean","React","createElement","Provider","FloatingPopover","getPlacement","target","childrenWithProps","role","concat","getItemId","toString","_extends","cx","classes","style","display","Ul","id","map","item","index","DropdownInner","key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;AACR5F,IAAAA,IAAI,EAAE;AACF6F,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACD/F,IAAAA,IAAI,EAAE;AACF8F,MAAAA,GAAG,EAAEE,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNhG,IAAAA,IAAI,EAAE,SAAS;AACfD,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;;;"}
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
var React = require('react');
|
6
6
|
var plasmaCore = require('@salutejs/plasma-core');
|
7
|
-
var DropdownItem = require('../DropdownItem/DropdownItem.js');
|
8
7
|
var Dropdown_styles = require('../../Dropdown.styles.js');
|
9
8
|
var FloatingPopover = require('../../FloatingPopover.js');
|
9
|
+
var DropdownItem = require('../DropdownItem/DropdownItem.js');
|
10
10
|
|
11
11
|
var DropdownInner = function DropdownInner(_ref) {
|
12
12
|
var item = _ref.item,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DropdownInner.js","sources":["../../../../../src/components/Dropdown/ui/DropdownInner/DropdownInner.tsx"],"sourcesContent":["import React from 'react';\nimport type { FC } from 'react';\nimport { safeUseId } from '@salutejs/plasma-core';\n\nimport { DropdownItem } from '
|
1
|
+
{"version":3,"file":"DropdownInner.js","sources":["../../../../../src/components/Dropdown/ui/DropdownInner/DropdownInner.tsx"],"sourcesContent":["import React from 'react';\nimport type { FC } from 'react';\nimport { safeUseId } from '@salutejs/plasma-core';\n\nimport { DropdownItem } from '..';\nimport { Ul } from '../../Dropdown.styles';\nimport { FloatingPopover } from '../../FloatingPopover';\n\nimport { DropdownInnerProps } from './DropdownInner.type';\n\nconst DropdownInner: FC<DropdownInnerProps> = ({\n item,\n currentLevel,\n path,\n dispatchPath,\n index,\n trigger,\n listHeight,\n listOverflow,\n listWidth,\n}) => {\n const handleToggle = (opened: boolean): void => {\n if (opened) {\n dispatchPath({ type: 'changed_on_level', value: item.value.toString(), level: currentLevel + 1 });\n } else {\n dispatchPath({ type: 'cut_by_level', level: currentLevel + 1 });\n }\n };\n\n const isCurrentListOpen = path[currentLevel + 1] === item.value.toString();\n\n const treeId = safeUseId();\n const listId = `${treeId}_tree_level_${currentLevel + 2}`;\n const nextLevel = currentLevel + 1;\n\n if (item?.items) {\n return (\n <FloatingPopover\n placement=\"right-start\"\n opened={isCurrentListOpen}\n onToggle={handleToggle}\n trigger={trigger}\n target={\n <DropdownItem\n item={item}\n index={index}\n path={path}\n currentLevel={currentLevel}\n ariaControls={listId}\n ariaExpanded={isCurrentListOpen}\n ariaLevel={nextLevel}\n ariaLabel={item.label}\n />\n }\n isInner\n >\n <Ul\n id={listId}\n role=\"group\"\n isInnerUl\n listHeight={listHeight}\n listOverflow={listOverflow}\n listWidth={listWidth}\n >\n {item.items.map((innerItem, innerIndex) => (\n <DropdownInner\n key={`${innerIndex}/${currentLevel}`}\n item={innerItem}\n currentLevel={nextLevel}\n path={path}\n dispatchPath={dispatchPath}\n index={innerIndex}\n trigger={trigger}\n listHeight={listHeight}\n listOverflow={listOverflow}\n listWidth={listWidth}\n />\n ))}\n </Ul>\n </FloatingPopover>\n );\n }\n\n return <DropdownItem item={item} path={path} index={index} currentLevel={currentLevel} ariaLevel={nextLevel} />;\n};\n\nexport { DropdownInner };\n"],"names":["DropdownInner","_ref","item","currentLevel","path","dispatchPath","index","trigger","listHeight","listOverflow","listWidth","handleToggle","opened","type","value","toString","level","isCurrentListOpen","treeId","safeUseId","listId","concat","nextLevel","items","React","createElement","FloatingPopover","placement","onToggle","target","DropdownItem","ariaControls","ariaExpanded","ariaLevel","ariaLabel","label","isInner","Ul","id","role","isInnerUl","map","innerItem","innerIndex","key"],"mappings":";;;;;;;;;;AAUA,IAAMA,aAAqC,GAAG,SAAxCA,aAAqCA,CAAAC,IAAA,EAUrC;AAAA,EAAA,IATFC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IACJC,YAAY,GAAAF,IAAA,CAAZ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AACjBC,QAAAA,UAAU,EAAEA,UAAW;AACvBC,QAAAA,YAAY,EAAEA,YAAa;AAC3BC,QAAAA,SAAS,EAAEA,SAAAA;AAAU,OACxB,CAAC,CAAA;KACL,CACD,CACS,CAAC,CAAA;AAE1B,GAAA;AAEA,EAAA,oBAAOc,KAAA,CAAAC,aAAA,CAACK,yBAAY,EAAA;AAAC5B,IAAAA,IAAI,EAAEA,IAAK;AAACE,IAAAA,IAAI,EAAEA,IAAK;AAACE,IAAAA,KAAK,EAAEA,KAAM;AAACH,IAAAA,YAAY,EAAEA,YAAa;AAAC8B,IAAAA,SAAS,EAAEX,SAAAA;AAAU,GAAE,CAAC,CAAA;AACnH;;;;"}
|
@@ -1,5 +1,30 @@
|
|
1
1
|
.IconRoot_7pl7ig_svvlqhf__32c458a1{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;width:var(--svvlqhf-0);height:var(--svvlqhf-0);-webkit-flex:0 0 var(--svvlqhf-0);-ms-flex:0 0 var(--svvlqhf-0);flex:0 0 var(--svvlqhf-0);}
|
2
2
|
|
3
|
+
.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);}
|
4
|
+
|
5
|
+
.DropdownFooter_styles_1j4sg1p_stiw0r3__41ff7287{background:var(--plasma-dropdown-footer-background);font-family:var(--plasma-dropdown-footer-font-family);font-size:var(--plasma-dropdown-footer-font-size);font-style:var(--plasma-dropdown-footer-font-style);font-weight:var(--plasma-dropdown-footer-letter-spacing);-webkit-letter-spacing:var(--plasma-dropdown-footer-line-height);-moz-letter-spacing:var(--plasma-dropdown-footer-line-height);-ms-letter-spacing:var(--plasma-dropdown-footer-line-height);letter-spacing:var(--plasma-dropdown-footer-line-height);line-height:var(--plasma-dropdown-footer-font-weight);width:var(--plasma-dropdown-footer-width);height:var(--plasma-dropdown-footer-height);padding:var(--plasma-dropdown-footer-padding-top) var(--plasma-dropdown-footer-padding-right) var(--plasma-dropdown-footer-padding-bottom) var(--plasma-dropdown-footer-padding-left);margin:var(--plasma-dropdown-footer-margin-top) var(--plasma-dropdown-footer-margin-right) var(--plasma-dropdown-footer-margin-bottom) var(--plasma-dropdown-footer-margin-left);}
|
6
|
+
|
7
|
+
.DropdownGroup_styles_1o990eo_scop7qk__fca8c58e{background:var(--plasma-dropdown-group-background);width:var(--plasma-dropdown-group-width);height:var(--plasma-dropdown-group-height);padding:var(--plasma-dropdown-group-padding-top) var(--plasma-dropdown-group-padding-right) var(--plasma-dropdown-group-padding-bottom) var(--plasma-dropdown-group-padding-left);margin:var(--plasma-dropdown-group-margin-top) var(--plasma-dropdown-group-margin-right) var(--plasma-dropdown-group-margin-bottom) var(--plasma-dropdown-group-margin-left);}
|
8
|
+
.DropdownGroup_styles_1o990eo_s1oaw95y__fca8c58e{font-family:var(--plasma-dropdown-group-label-font-family);font-size:var(--plasma-dropdown-group-label-font-size);font-style:var(--plasma-dropdown-group-label-font-style);font-weight:var(--plasma-dropdown-group-label-font-weight);-webkit-letter-spacing:var(--plasma-dropdown-group-label-letter-spacing);-moz-letter-spacing:var(--plasma-dropdown-group-label-letter-spacing);-ms-letter-spacing:var(--plasma-dropdown-group-label-letter-spacing);letter-spacing:var(--plasma-dropdown-group-label-letter-spacing);line-height:var(--plasma-dropdown-group-label-line-height);color:var(--plasma-dropdown-group-label-color);padding:var(--plasma-dropdown-group-label-padding-top) var(--plasma-dropdown-group-label-padding-right) var(--plasma-dropdown-group-label-padding-bottom) var(--plasma-dropdown-group-label-padding-left);margin:var(--plasma-dropdown-group-label-margin-top) var(--plasma-dropdown-group-label-margin-right) var(--plasma-dropdown-group-label-margin-bottom) var(--plasma-dropdown-group-label-margin-left);}
|
9
|
+
|
10
|
+
.DropdownHeader_styles_196gwgm_s133b1g2__3510806e{background:var(--plasma-dropdown-header-background);font-family:var(--plasma-dropdown-header-font-family);font-size:var(--plasma-dropdown-header-font-size);font-style:var(--plasma-dropdown-header-font-style);font-weight:var(--plasma-dropdown-header-letter-spacing);-webkit-letter-spacing:var(--plasma-dropdown-header-line-height);-moz-letter-spacing:var(--plasma-dropdown-header-line-height);-ms-letter-spacing:var(--plasma-dropdown-header-line-height);letter-spacing:var(--plasma-dropdown-header-line-height);line-height:var(--plasma-dropdown-header-font-weight);width:var(--plasma-dropdown-header-width);height:var(--plasma-dropdown-header-height);padding:var(--plasma-dropdown-header-padding-top) var(--plasma-dropdown-header-padding-right) var(--plasma-dropdown-header-padding-bottom) var(--plasma-dropdown-header-padding-left);margin:var(--plasma-dropdown-header-margin-top) var(--plasma-dropdown-header-margin-right) var(--plasma-dropdown-header-margin-bottom) var(--plasma-dropdown-header-margin-left);}
|
11
|
+
|
12
|
+
.DropdownItem_styles_1lyg81y_s1iqs5in__b17ea060{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;min-width:var(--plasma-dropdown-item-content-left-width);color:var(--plasma-dropdown-item-content-left-color);}
|
13
|
+
.DropdownItem_styles_1lyg81y_sfg3dyd__b17ea060{margin-left:auto;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;min-width:var(--plasma-dropdown-item-content-right-width);color:var(--plasma-dropdown-item-content-right-color);}
|
14
|
+
.DropdownItem_styles_1lyg81y_s1dea6tl__b17ea060{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
15
|
+
.DropdownItem_styles_1lyg81y_b1b2nce8__b17ea060{box-sizing:content-box;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;width:auto;font-family:var(--plasma-dropdown-item-font-family);font-size:var(--plasma-dropdown-item-font-size);font-style:var(--plasma-dropdown-item-font-style);font-weight:var(--plasma-dropdown-item-letter-spacing);-webkit-letter-spacing:var(--plasma-dropdown-item-line-height);-moz-letter-spacing:var(--plasma-dropdown-item-line-height);-ms-letter-spacing:var(--plasma-dropdown-item-line-height);letter-spacing:var(--plasma-dropdown-item-line-height);line-height:var(--plasma-dropdown-item-font-weight);background:var(--plasma-dropdown-item-background);color:var(--plasma-dropdown-item-color);border-radius:var(--plasma-dropdown-item-border-radius);width:var(--plasma-dropdown-item-width);height:var(--plasma-dropdown-item-height);padding:var(--plasma-dropdown-item-padding-top) var(--plasma-dropdown-item-padding-right) var(--plasma-dropdown-item-padding-bottom) var(--plasma-dropdown-item-padding-left);margin:var(--plasma-dropdown-item-margin-top) var(--plasma-dropdown-item-margin-right) var(--plasma-dropdown-item-margin-bottom) var(--plasma-dropdown-item-margin-left);}.DropdownItem_styles_1lyg81y_b1b2nce8__b17ea060:focus{outline:none;}.DropdownItem_styles_1lyg81y_b1b2nce8__b17ea060::before{content:'';position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;display:block;box-sizing:content-box;border:0.0625rem solid transparent;border-radius:var(--plasma-dropdown-item-border-radius);-webkit-transition:none;transition:none;pointer-events:none;}.DropdownItem_styles_1lyg81y_b1b2nce8__b17ea060.DropdownItem_styles_1lyg81y_focusVisible__b17ea060:focus::before,.DropdownItem_styles_1lyg81y_b1b2nce8__b17ea060[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.0625rem var(--plasma-dropdown-focus-color);}.DropdownItem_styles_1lyg81y_b1b2nce8__b17ea060:hover:not(.DropdownItem_styles_1lyg81y_dropdownItemIsDisabled__b17ea060){cursor:pointer;background:var(--plasma-dropdown-item-background-hover);}.DropdownItem_styles_1lyg81y_b1b2nce8__b17ea060.DropdownItem_styles_1lyg81y_dropdownItemIsSelected__b17ea060{color:var(--plasma-dropdown-item-color-selected);background:var(--plasma-dropdown-item-background-selected);}.DropdownItem_styles_1lyg81y_b1b2nce8__b17ea060.DropdownItem_styles_1lyg81y_dropdownItemIsSelected__b17ea060:hover:not(.DropdownItem_styles_1lyg81y_dropdownItemIsDisabled__b17ea060){background:var(--plasma-dropdown-item-background-selected-hover);}.DropdownItem_styles_1lyg81y_b1b2nce8__b17ea060.DropdownItem_styles_1lyg81y_dropdownItemIsDisabled__b17ea060{opacity:var(--plasma-dropdown-disabled-opacity);cursor:not-allowed;}
|
16
|
+
|
17
|
+
.Popover_styles_mzmbre_s1g1xbt5__2ee8e6b1{display:inline-block;}
|
18
|
+
.Popover_styles_mzmbre_s12xwbyh__2ee8e6b1{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;box-sizing:border-box;position:relative;}
|
19
|
+
.Popover_styles_mzmbre_s1pd4d8a__2ee8e6b1{width:var(--plasma-popover-arrow-mask-width);height:var(--plasma-popover-arrow-mask-height);}.Popover_styles_mzmbre_s1pd4d8a__2ee8e6b1::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);}
|
20
|
+
.Popover_styles_mzmbre_s16xlixz__2ee8e6b1{position:absolute;z-index:var(--s16xlixz-0);}.Popover_styles_mzmbre_s16xlixz__2ee8e6b1:before{content:'';display:block;position:absolute;background:transparent;}.Popover_styles_mzmbre_s16xlixz__2ee8e6b1[data-popper-placement^='top'] > .Popover_styles_mzmbre_popoverArrow__2ee8e6b1{bottom:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_mzmbre_s16xlixz__2ee8e6b1[data-popper-placement^='bottom'] > .Popover_styles_mzmbre_popoverArrow__2ee8e6b1{top:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_mzmbre_s16xlixz__2ee8e6b1[data-popper-placement^='bottom'] > .Popover_styles_mzmbre_popoverArrow__2ee8e6b1::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.Popover_styles_mzmbre_s16xlixz__2ee8e6b1[data-popper-placement^='left'] > .Popover_styles_mzmbre_popoverArrow__2ee8e6b1{right:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_mzmbre_s16xlixz__2ee8e6b1[data-popper-placement^='left'] > .Popover_styles_mzmbre_popoverArrow__2ee8e6b1::before{-webkit-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg);}.Popover_styles_mzmbre_s16xlixz__2ee8e6b1[data-popper-placement^='right'] > .Popover_styles_mzmbre_popoverArrow__2ee8e6b1{left:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_mzmbre_s16xlixz__2ee8e6b1[data-popper-placement^='right'] > .Popover_styles_mzmbre_popoverArrow__2ee8e6b1::before{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);}.Popover_styles_mzmbre_s16xlixz__2ee8e6b1[data-popper-placement^='top-start'] > .Popover_styles_mzmbre_popoverArrow__2ee8e6b1{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_mzmbre_s16xlixz__2ee8e6b1[data-popper-placement^='top-end'] > .Popover_styles_mzmbre_popoverArrow__2ee8e6b1{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_mzmbre_s16xlixz__2ee8e6b1[data-popper-placement^='bottom-start'] > .Popover_styles_mzmbre_popoverArrow__2ee8e6b1{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_mzmbre_s16xlixz__2ee8e6b1[data-popper-placement^='bottom-start'] > .Popover_styles_mzmbre_popoverArrow__2ee8e6b1::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.Popover_styles_mzmbre_s16xlixz__2ee8e6b1[data-popper-placement^='bottom-end'] > .Popover_styles_mzmbre_popoverArrow__2ee8e6b1{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_mzmbre_s16xlixz__2ee8e6b1[data-popper-placement^='bottom-end'] > .Popover_styles_mzmbre_popoverArrow__2ee8e6b1::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.Popover_styles_mzmbre_s16xlixz__2ee8e6b1[data-popper-placement^='left-start'] > .Popover_styles_mzmbre_popoverArrow__2ee8e6b1,.Popover_styles_mzmbre_s16xlixz__2ee8e6b1[data-popper-placement^='right-start'] > .Popover_styles_mzmbre_popoverArrow__2ee8e6b1{top:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_mzmbre_s16xlixz__2ee8e6b1[data-popper-placement^='left-end'] > .Popover_styles_mzmbre_popoverArrow__2ee8e6b1,.Popover_styles_mzmbre_s16xlixz__2ee8e6b1[data-popper-placement^='right-end'] > .Popover_styles_mzmbre_popoverArrow__2ee8e6b1{top:unset !important;bottom:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_mzmbre_s16xlixz__2ee8e6b1[data-popper-placement^='top']:before,.Popover_styles_mzmbre_s16xlixz__2ee8e6b1[data-popper-placement^='top-start']:before,.Popover_styles_mzmbre_s16xlixz__2ee8e6b1[data-popper-placement^='top-end']:before{top:unset;left:0;right:0;height:var(--plasma-popover-arrow-height);bottom:calc(-1 * var(--plasma-popover-arrow-height));}.Popover_styles_mzmbre_s16xlixz__2ee8e6b1[data-popper-placement^='bottom']:before,.Popover_styles_mzmbre_s16xlixz__2ee8e6b1[data-popper-placement^='bottom-start']:before,.Popover_styles_mzmbre_s16xlixz__2ee8e6b1[data-popper-placement^='bottom-end']:before{top:calc(-1 * var(--plasma-popover-arrow-height));left:0;right:0;bottom:var(--plasma-popover-arrow-height);height:var(--plasma-popover-arrow-height);}.Popover_styles_mzmbre_s16xlixz__2ee8e6b1[data-popper-placement^='left']:before,.Popover_styles_mzmbre_s16xlixz__2ee8e6b1[data-popper-placement^='left-start']:before,.Popover_styles_mzmbre_s16xlixz__2ee8e6b1[data-popper-placement^='left-end']:before{width:var(--plasma-popover-arrow-height);height:100%;top:0;right:calc(-1 * var(--plasma-popover-arrow-height));bottom:0;}.Popover_styles_mzmbre_s16xlixz__2ee8e6b1[data-popper-placement^='right']:before,.Popover_styles_mzmbre_s16xlixz__2ee8e6b1[data-popper-placement^='right-start']:before,.Popover_styles_mzmbre_s16xlixz__2ee8e6b1[data-popper-placement^='right-end']:before{width:var(--plasma-popover-arrow-height);height:100%;top:0;left:calc(-1 * var(--plasma-popover-arrow-height));bottom:0;}
|
21
|
+
|
22
|
+
.Dropdown_styles_3w3l45_s1rwu6ky__59648b20 .Dropdown_styles_3w3l45_popoverTarget__59648b20{display:block;}
|
23
|
+
.Dropdown_styles_3w3l45_s10jhp3l__59648b20{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);}
|
24
|
+
|
25
|
+
.Dropdown_styles_1ljmphy_un7uamp__8526f7b0{box-sizing:border-box;width:var(--un7uamp-0);max-height:var(--un7uamp-1);margin:var(--un7uamp-2);padding:var(--plasma-dropdown-padding) 0;overflow:var(--un7uamp-3);background:var(--surface-solid-card-brightness);box-shadow:0px 4px 14px -4px rgba(8,8,8,0.08),0px 1px 4px -1px rgba(0,0,0,0.04);border-radius:var(--plasma-dropdown-border-radius);border:var(--plasma-dropdown-border-width) solid var(--plasma-dropdown-border-color);}
|
26
|
+
|
27
|
+
|
3
28
|
.CellTextboxLabel_styles_1x97zqi_supiagz__b05150dd{color:var(--plasma-cell-label-color);font-size:var(--plasma-cell-label-font-size);font-weight:var(--plasma-cell-label-font-weight);font-family:var(--plasma-cell-label-font-family);font-style:var(--plasma-cell-label-font-style);line-height:var(--plasma-cell-label-line-height);-webkit-letter-spacing:var(--plasma-cell-label-letter-spacing);-moz-letter-spacing:var(--plasma-cell-label-letter-spacing);-ms-letter-spacing:var(--plasma-cell-label-letter-spacing);letter-spacing:var(--plasma-cell-label-letter-spacing);}
|
4
29
|
|
5
30
|
.CellTextboxTitle_styles_jogov7_s16psy9b__edbbb199{color:var(--plasma-cell-title-color);font-size:var(--plasma-cell-title-font-size);font-weight:var(--plasma-cell-title-font-weight);font-family:var(--plasma-cell-title-font-family);font-style:var(--plasma-cell-title-font-style);line-height:var(--plasma-cell-title-line-height);-webkit-letter-spacing:var(--plasma-cell-title-letter-spacing);-moz-letter-spacing:var(--plasma-cell-title-letter-spacing);-ms-letter-spacing:var(--plasma-cell-title-letter-spacing);letter-spacing:var(--plasma-cell-title-letter-spacing);}
|
@@ -6,7 +6,7 @@ var _rollupPluginBabelHelpers = require('../../../../_virtual/_rollupPluginBabel
|
|
6
6
|
var React = require('react');
|
7
7
|
var Dropdown_tokens = require('../../Dropdown.tokens.js');
|
8
8
|
var index = require('../../../../utils/index.js');
|
9
|
-
var
|
9
|
+
var Dropdown = require('../../Dropdown.js');
|
10
10
|
var DropdownItem_styles = require('./DropdownItem.styles.js');
|
11
11
|
var getItemId = require('../../utils/getItemId.js');
|
12
12
|
var IconDisclosureRight = require('../../../_Icon/Icons/IconDisclosureRight.js');
|
@@ -32,7 +32,7 @@ var DropdownItem = function DropdownItem(_ref) {
|
|
32
32
|
className = item.className,
|
33
33
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(item, _excluded);
|
34
34
|
var ref = React.useRef(null);
|
35
|
-
var _useContext = React.useContext(
|
35
|
+
var _useContext = React.useContext(Dropdown.Context),
|
36
36
|
focusedPath = _useContext.focusedPath,
|
37
37
|
size = _useContext.size,
|
38
38
|
variant = _useContext.variant,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DropdownItem.js","sources":["../../../../../src/components/Dropdown/ui/DropdownItem/DropdownItem.tsx"],"sourcesContent":["import React, { useEffect, useRef, FC, useContext } from 'react';\n\nimport { classes } from '../../Dropdown.tokens';\nimport { cx } from '../../../../utils';\nimport { IconDisclosureRight } from '../../../_Icon';\nimport { Context } from '../../Dropdown
|
1
|
+
{"version":3,"file":"DropdownItem.js","sources":["../../../../../src/components/Dropdown/ui/DropdownItem/DropdownItem.tsx"],"sourcesContent":["import React, { useEffect, useRef, FC, useContext } from 'react';\n\nimport { classes } from '../../Dropdown.tokens';\nimport { cx } from '../../../../utils';\nimport { IconDisclosureRight } from '../../../_Icon';\nimport { Context } from '../../Dropdown';\nimport { getItemId } from '../../utils';\n\nimport {\n Wrapper,\n DisclosureIconWrapper,\n Divider,\n CellWrapper,\n StyledCell,\n RenderItemWrapper,\n} from './DropdownItem.styles';\nimport type { DropdownItemProps } from './DropdownItem.type';\n\nexport const DropdownItem: FC<DropdownItemProps> = ({\n item,\n path,\n currentLevel,\n index,\n ariaControls,\n ariaExpanded,\n ariaLevel,\n ariaLabel,\n}) => {\n const {\n value,\n label,\n disabled,\n isDisabled,\n contentLeft,\n contentRight,\n dividerBefore,\n dividerAfter,\n className,\n ...rest\n } = item;\n\n const ref = useRef<HTMLLIElement | null>(null);\n\n const {\n focusedPath,\n size,\n variant,\n itemRole,\n handleGlobalToggle,\n closeOnSelect,\n onHover,\n onItemSelect,\n onItemClick,\n hasArrow,\n treeId,\n renderItem,\n } = useContext(Context);\n\n const hasDescendants = Boolean(item.items);\n const disclosureIconSize = size === 'xs' ? 'xs' : 's';\n const isDisabledClassName = disabled || isDisabled ? classes.dropdownItemIsDisabled : undefined;\n const focusedClass =\n currentLevel === focusedPath.length - 1 && index === focusedPath?.[currentLevel]\n ? classes.dropdownItemIsFocused\n : undefined;\n const activeClass = value === path?.[currentLevel + 1] ? classes.dropdownItemIsActive : undefined;\n\n useEffect(() => {\n if (focusedClass && ref?.current) {\n ref.current.scrollIntoView({\n behavior: 'smooth',\n block: 'center',\n inline: 'center',\n });\n }\n }, [focusedClass]);\n\n const handleClick = (event: React.MouseEvent<HTMLLIElement>): void => {\n if (disabled || isDisabled) {\n return;\n }\n\n if (onItemSelect) {\n onItemSelect(item, event);\n }\n\n if (onItemClick) {\n onItemClick(item, event);\n }\n\n // Закрываем весь дропдаун целиком при клике на айтем без потомков. Только при closeOnSelect === true.\n if (closeOnSelect && !hasDescendants) {\n handleGlobalToggle(false, event);\n }\n };\n\n const handleHover = () => {\n if (onHover) {\n onHover(index);\n }\n };\n\n return (\n <>\n {dividerBefore && <Divider variant={variant} />}\n\n <Wrapper\n {...rest}\n ref={ref}\n className={cx(isDisabledClassName, focusedClass, activeClass, className)}\n id={getItemId(treeId, value.toString())}\n role={itemRole}\n onClick={handleClick}\n onMouseEnter={handleHover}\n variant={variant}\n aria-disabled={disabled || isDisabled}\n aria-controls={ariaControls}\n aria-expanded={ariaExpanded}\n aria-level={ariaLevel}\n aria-label={ariaLabel}\n >\n {renderItem ? (\n <RenderItemWrapper>{renderItem(item)}</RenderItemWrapper>\n ) : (\n <CellWrapper>\n <StyledCell\n contentLeft={contentLeft}\n contentRight={contentRight}\n alignContentLeft=\"center\"\n alignContentRight=\"center\"\n title={label}\n />\n </CellWrapper>\n )}\n\n {item.items && hasArrow && (\n <DisclosureIconWrapper>\n <IconDisclosureRight size={disclosureIconSize} color=\"inherit\" />\n </DisclosureIconWrapper>\n )}\n </Wrapper>\n\n {dividerAfter && <Divider variant={variant} />}\n </>\n );\n};\n"],"names":["DropdownItem","_ref","item","path","currentLevel","index","ariaControls","ariaExpanded","ariaLevel","ariaLabel","value","label","disabled","isDisabled","contentLeft","contentRight","dividerBefore","dividerAfter","className","rest","_objectWithoutProperties","_excluded","ref","useRef","_useContext","useContext","Context","focusedPath","size","variant","itemRole","handleGlobalToggle","closeOnSelect","onHover","onItemSelect","onItemClick","hasArrow","treeId","renderItem","hasDescendants","Boolean","items","disclosureIconSize","isDisabledClassName","classes","dropdownItemIsDisabled","undefined","focusedClass","length","dropdownItemIsFocused","activeClass","dropdownItemIsActive","useEffect","current","scrollIntoView","behavior","block","inline","handleClick","event","handleHover","React","createElement","Fragment","Divider","Wrapper","_extends","cx","id","getItemId","toString","role","onClick","onMouseEnter","RenderItemWrapper","CellWrapper","StyledCell","alignContentLeft","alignContentRight","title","DisclosureIconWrapper","IconDisclosureRight","color"],"mappings":";;;;;;;;;;;;;;IAkBaA,YAAmC,GAAG,SAAtCA,YAAmCA,CAAAC,IAAA,EAS1C;AAAA,EAAA,IARFC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IACJC,IAAI,GAAAF,IAAA,CAAJE,IAAI;IACJC,YAAY,GAAAH,IAAA,CAAZG,YAAY;IACZC,OAAK,GAAAJ,IAAA,CAALI,KAAK;IACLC,YAAY,GAAAL,IAAA,CAAZK,YAAY;IACZC,YAAY,GAAAN,IAAA,CAAZM,YAAY;IACZC,SAAS,GAAAP,IAAA,CAATO,SAAS;IACTC,SAAS,GAAAR,IAAA,CAATQ,SAAS,CAAA;AAET,EAAA,IACIC,KAAK,GAULR,IAAI,CAVJQ,KAAK;IACLC,KAAK,GASLT,IAAI,CATJS,KAAK;IACLC,QAAQ,GAQRV,IAAI,CARJU,QAAQ;IACRC,UAAU,GAOVX,IAAI,CAPJW,UAAU;IACVC,WAAW,GAMXZ,IAAI,CANJY,WAAW;IACXC,YAAY,GAKZb,IAAI,CALJa,YAAY;IACZC,aAAa,GAIbd,IAAI,CAJJc,aAAa;IACbC,YAA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,CACQ,CAChB,EAEAT,IAAI,CAACuC,KAAK,IAAIL,QAAQ,iBACnByB,KAAA,CAAAC,aAAA,CAACkB,yCAAqB,EAAA,IAAA,eAClBnB,KAAA,CAAAC,aAAA,CAACmB,uCAAmB,EAAA;AAACrD,IAAAA,IAAI,EAAEc,kBAAmB;AAACwC,IAAAA,KAAK,EAAC,SAAA;GAAW,CAC7C,CAEtB,CAAC,EAETjE,YAAY,iBAAI4C,KAAA,CAAAC,aAAA,CAACE,2BAAO,EAAA;AAACnC,IAAAA,OAAO,EAAEA,OAAAA;AAAQ,GAAE,CAC/C,CAAC,CAAA;AAEX;;;;"}
|
@@ -10,7 +10,6 @@ var usePathMaps = require('./hooks/usePathMaps.js');
|
|
10
10
|
var Select_styles = require('./Select.styles.js');
|
11
11
|
var FloatingPopover = require('./FloatingPopover.js');
|
12
12
|
var SelectNative = require('./ui/SelectNative/SelectNative.js');
|
13
|
-
var Select_context = require('./Select.context.js');
|
14
13
|
var initialItemsTransform = require('./utils/initialItemsTransform.js');
|
15
14
|
var getInitialValue = require('./utils/getInitialValue.js');
|
16
15
|
var pathReducer = require('./reducers/pathReducer.js');
|
@@ -25,6 +24,7 @@ var Inner = require('./ui/Inner/Inner.js');
|
|
25
24
|
var getView = require('./utils/getView.js');
|
26
25
|
|
27
26
|
var _excluded = ["value", "onChange", "target", "items", "placement", "label", "labelPlacement", "placeholder", "helperText", "disabled", "view", "size", "listOverflow", "listHeight", "listWidth", "contentLeft", "onScrollBottom", "chipView", "variant", "portal", "renderValue", "renderItem", "status", "onItemSelect", "separator", "closeAfterSelect", "isTargetAmount", "beforeList", "afterList", "zIndex", "name", "defaultValue"];
|
27
|
+
var Context = /*#__PURE__*/React.createContext({});
|
28
28
|
|
29
29
|
/**
|
30
30
|
* Выпадающий список. Поддерживает выбор одного или нескольких значений.
|
@@ -304,7 +304,7 @@ var selectRoot = function selectRoot(Root) {
|
|
304
304
|
onChange: onChange,
|
305
305
|
onSetValue: setInternalValue,
|
306
306
|
ref: ref
|
307
|
-
}), /*#__PURE__*/React.createElement(
|
307
|
+
}), /*#__PURE__*/React.createElement(Context.Provider, {
|
308
308
|
value: {
|
309
309
|
focusedPath: focusedPath,
|
310
310
|
checked: checked,
|
@@ -398,6 +398,7 @@ var selectConfig = {
|
|
398
398
|
}
|
399
399
|
};
|
400
400
|
|
401
|
+
exports.Context = Context;
|
401
402
|
exports.selectConfig = selectConfig;
|
402
403
|
exports.selectRoot = selectRoot;
|
403
404
|
//# sourceMappingURL=Select.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Select.js","sources":["../../../src/components/Select/Select.tsx"],"sourcesContent":["import React, {\n forwardRef,\n useState,\n useReducer,\n useMemo,\n useLayoutEffect,\n useRef,\n ChangeEvent,\n ForwardedRef,\n} from 'react';\nimport { safeUseId } from '@salutejs/plasma-core';\n\nimport { RootProps } from '../../engines';\nimport { isEmpty } from '../../utils';\nimport { useOutsideClick } from '../../hooks';\n\nimport { useKeyNavigation, getItemByFocused } from './hooks/useKeyboardNavigation';\nimport {\n initialItemsTransform,\n updateAncestors,\n updateDescendants,\n updateSingleAncestors,\n getView,\n getInitialValue,\n} from './utils';\nimport { Inner, Target } from './ui';\nimport { pathReducer, focusedPathReducer } from './reducers';\nimport { usePathMaps } from './hooks/usePathMaps';\nimport { Ul, base } from './Select.styles';\nimport type { MergedSelectProps, RequiredProps } from './Select.types';\nimport type { MergedDropdownNodeTransformed } from './ui/Inner/ui/Item/Item.types';\nimport { FloatingPopover } from './FloatingPopover';\nimport { SelectNative } from './ui/SelectNative/SelectNative';\nimport { Context } from './Select.context';\n\n/**\n * Выпадающий список. Поддерживает выбор одного или нескольких значений.\n */\nexport const selectRoot = (Root: RootProps<HTMLButtonElement, Omit<MergedSelectProps, 'items'>>) =>\n forwardRef<HTMLButtonElement, MergedSelectProps>((props, ref) => {\n const {\n value: outerValue,\n onChange: outerOnChange,\n target = 'textfield-like',\n items,\n placement = 'bottom',\n label,\n labelPlacement,\n placeholder,\n helperText,\n disabled = false,\n view: outerView,\n size,\n listOverflow,\n listHeight,\n listWidth,\n contentLeft,\n onScrollBottom,\n chipView,\n variant = 'normal',\n portal,\n renderValue,\n renderItem,\n status,\n onItemSelect,\n separator,\n closeAfterSelect: outerCloseAfterSelect,\n isTargetAmount,\n beforeList,\n afterList,\n zIndex,\n name,\n defaultValue,\n ...rest\n } = props;\n const transformedItems = useMemo(() => initialItemsTransform(items || []), [items]);\n\n // Создаем структуры для быстрой работы с деревом\n const [pathMap, focusedToValueMap, valueToCheckedMap, valueToItemMap, labelToItemMap] = usePathMaps(\n transformedItems,\n );\n\n const [internalValue, setInternalValue] = useState<string | number | Array<string | number>>(\n props.multiselect ? [] : '',\n );\n\n const value =\n outerValue !== null && outerValue !== undefined\n ? getInitialValue(outerValue, valueToItemMap)\n : internalValue;\n\n const floatingPopoverRef = useRef<HTMLDivElement>(null);\n\n // Состояния дерева элементов\n const [path, dispatchPath] = useReducer(pathReducer, []);\n const [focusedPath, dispatchFocusedPath] = useReducer(focusedPathReducer, []);\n const [checked, setChecked] = useState(valueToCheckedMap);\n\n const isCurrentListOpen = Boolean(path[0]);\n const activeDescendantItemValue = getItemByFocused(focusedPath, focusedToValueMap)?.value.toString() || '';\n const closeAfterSelect = outerCloseAfterSelect ?? !props.multiselect;\n const treeId = safeUseId();\n const view = target === 'textfield-like' && disabled ? 'default' : getView(status, outerView);\n\n // Собираем объект с пропсами для required и прокидываем их напрямую в компонент Textfield.\n const requiredProps =\n props.target === 'button-like'\n ? undefined\n : ({\n required: props.required,\n requiredPlacement: props.requiredPlacement,\n optional: props.optional,\n } as RequiredProps);\n\n const targetRef = useOutsideClick<HTMLUListElement>(() => {\n if (!isCurrentListOpen) {\n return;\n }\n\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n }, floatingPopoverRef);\n\n const onChange = (\n newValue?: string | number | Array<string | number> | ChangeEvent<HTMLSelectElement> | null,\n ) => {\n if (outerOnChange) {\n // Условие для отправки если комбобокс используется без формы.\n if (!name && (typeof newValue === 'string' || Array.isArray(newValue))) {\n outerOnChange(newValue as any);\n }\n\n // Условие для отправки если комбобокс используется с формой.\n if (name && typeof newValue === 'object' && !Array.isArray(newValue)) {\n outerOnChange(newValue as any);\n }\n }\n\n // Условие для изменения внутреннего значения (только если newValue строка или массив строк).\n if (typeof newValue === 'string' || Array.isArray(newValue)) {\n setInternalValue(newValue);\n }\n };\n\n const handleClickArrow = () => {\n if (disabled) {\n return;\n }\n\n if (isCurrentListOpen) {\n dispatchPath({ type: 'reset' });\n } else {\n dispatchPath({ type: 'opened_first_level' });\n }\n\n dispatchFocusedPath({ type: 'reset' });\n };\n\n const handleListToggle = (opened: boolean) => {\n if (disabled) {\n return;\n }\n\n if (opened) {\n dispatchPath({ type: 'opened_first_level' });\n } else {\n dispatchFocusedPath({ type: 'reset' });\n dispatchPath({ type: 'reset' });\n }\n };\n\n const handleCheckboxChange = (item: MergedDropdownNodeTransformed) => {\n if (!props.multiselect) {\n return;\n }\n\n const checkedCopy = new Map(checked);\n\n if (!checkedCopy.get(item.value)) {\n checkedCopy.set(item.value, true);\n updateDescendants(item, checkedCopy, true);\n } else {\n checkedCopy.set(item.value, false);\n updateDescendants(item, checkedCopy, false);\n }\n\n updateAncestors(item, checkedCopy);\n\n const newValues: Array<string | number> = [];\n\n valueToItemMap.forEach((item, key) => {\n if (checkedCopy.get(key)) {\n newValues.push(item.value);\n }\n });\n\n if (closeAfterSelect) {\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n }\n\n if (onChange) {\n onChange(newValues);\n }\n };\n\n const handleItemClick = (item: MergedDropdownNodeTransformed, e?: React.MouseEvent<HTMLElement>) => {\n if (!isEmpty(item?.items)) {\n return;\n }\n\n if (props.multiselect) {\n handleCheckboxChange(item);\n return;\n }\n\n if (e) {\n e.stopPropagation();\n }\n\n const isCurrentChecked = checked.get(item.value);\n\n if (closeAfterSelect) {\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n }\n\n if (onChange) {\n onChange(isCurrentChecked ? '' : item.value);\n }\n\n if (onItemSelect) {\n onItemSelect(item, e!);\n }\n };\n\n const handlePressDown = (item: MergedDropdownNodeTransformed, e?: React.MouseEvent<HTMLElement>) => {\n if (isEmpty(item.items)) {\n handleItemClick(item, e);\n } else if (props.multiselect) {\n handleCheckboxChange(item);\n }\n };\n\n const handleScroll = (e: React.UIEvent<HTMLUListElement>) => {\n if (!onScrollBottom) return;\n\n const { target } = e;\n\n if (\n (target as HTMLElement).scrollHeight - (target as HTMLElement).scrollTop ===\n (target as HTMLElement).clientHeight\n ) {\n onScrollBottom(e);\n }\n };\n\n const { onKeyDown } = useKeyNavigation({\n focusedPath,\n dispatchFocusedPath,\n path,\n dispatchPath,\n pathMap,\n focusedToValueMap,\n handleListToggle,\n handlePressDown,\n });\n\n // В данном эффекте мы следим за изменениями value снаружи и вносим коррективы в дерево чекбоксов.\n // Пример: когда юзер очистил value извне, тогда нужно пройтись по элементам и выключить все чекбоксы.\n useLayoutEffect(() => {\n const checkedCopy = new Map(checked);\n\n checkedCopy.forEach((_, key) => {\n checkedCopy.set(key, false);\n });\n\n if (!isEmpty(value) || typeof value === 'number') {\n if (Array.isArray(value)) {\n value.forEach((val) => {\n checkedCopy.set(val, true);\n updateDescendants(valueToItemMap.get(val)!, checkedCopy, true);\n updateAncestors(valueToItemMap.get(val)!, checkedCopy);\n });\n } else {\n checkedCopy.set(value, 'done');\n updateSingleAncestors(valueToItemMap.get(value)!, checkedCopy, 'dot');\n }\n }\n\n setChecked(checkedCopy);\n\n // В deps мы кладем именно outerValue и internalValue, а не просто value.\n // Т.к. вначале нужно отфильтровать и провалидировать outerValue и результат положить в переменную.\n // А переменную, содержащую сложные типы данных, нельзя помещать в deps.\n }, [outerValue, internalValue, items]);\n\n useLayoutEffect(() => {\n if (defaultValue) {\n setInternalValue(defaultValue as string | string[]);\n }\n }, [defaultValue]);\n\n return (\n <Root\n view={view}\n size={size}\n labelPlacement={labelPlacement}\n chipView={chipView}\n disabled={disabled}\n {...(rest as any)}\n >\n {name && (\n <SelectNative\n items={valueToItemMap}\n name={name}\n value={internalValue}\n multiselect={props.multiselect}\n onChange={onChange}\n onSetValue={setInternalValue}\n ref={ref as ForwardedRef<HTMLButtonElement>}\n />\n )}\n <Context.Provider\n value={{\n focusedPath,\n checked,\n multiselect: props.multiselect,\n size,\n handleCheckboxChange,\n handleItemClick,\n variant,\n renderItem,\n treeId,\n }}\n >\n <FloatingPopover\n ref={floatingPopoverRef}\n opened={isCurrentListOpen}\n onToggle={(opened: boolean) => opened && handleListToggle(true)}\n placement={placement}\n portal={portal}\n listWidth={listWidth}\n target={(referenceRef) => (\n <Target\n ref={name ? null : ref}\n value={value}\n opened={isCurrentListOpen}\n valueToItemMap={valueToItemMap}\n label={label}\n placeholder={placeholder}\n onKeyDown={onKeyDown}\n labelPlacement={labelPlacement}\n size={size}\n contentLeft={contentLeft}\n disabled={disabled}\n renderValue={renderValue}\n selectProps={props}\n inputWrapperRef={referenceRef as React.MutableRefObject<HTMLDivElement>}\n multiselect={props.multiselect}\n view={view}\n handleClickArrow={handleClickArrow}\n helperText={helperText}\n treeId={treeId}\n activeDescendantItemValue={activeDescendantItemValue}\n isTargetAmount={isTargetAmount}\n onChange={onChange}\n labelToItemMap={labelToItemMap}\n chipView={chipView}\n separator={separator}\n requiredProps={requiredProps}\n />\n )}\n zIndex={zIndex}\n >\n <Root\n view={view}\n size={size}\n labelPlacement={labelPlacement}\n chipView={chipView}\n disabled={disabled}\n {...(rest as any)}\n >\n <Ul\n role=\"tree\"\n id={`${treeId}_tree_level_1`}\n aria-multiselectable={Boolean(props.multiselect)}\n listHeight={listHeight}\n listOverflow={listOverflow}\n onScroll={handleScroll}\n listWidth={listWidth}\n ref={targetRef}\n >\n {beforeList}\n\n {transformedItems.map((item, index) => (\n <Inner\n key={`${index}/0`}\n item={item}\n currentLevel={0}\n path={path}\n dispatchPath={dispatchPath}\n index={index}\n listWidth={listWidth}\n />\n ))}\n\n {afterList}\n </Ul>\n </Root>\n </FloatingPopover>\n </Context.Provider>\n </Root>\n );\n });\n\nexport const selectConfig = {\n name: 'Select',\n tag: 'div',\n layout: selectRoot,\n base,\n variations: {},\n defaults: {\n view: 'default',\n size: 'm',\n labelPlacement: 'outer',\n chipView: 'default',\n },\n};\n"],"names":["selectRoot","Root","forwardRef","props","ref","_getItemByFocused","outerValue","value","outerOnChange","onChange","_props$target","target","items","_props$placement","placement","label","labelPlacement","placeholder","helperText","_props$disabled","disabled","outerView","view","size","listOverflow","listHeight","listWidth","contentLeft","onScrollBottom","chipView","_props$variant","variant","portal","renderValue","renderItem","status","onItemSelect","separator","outerCloseAfterSelect","closeAfterSelect","isTargetAmount","beforeList","afterList","zIndex","name","defaultValue","rest","_objectWithoutProperties","_excluded","transformedItems","useMemo","initialItemsTransform","_usePathMaps","usePathMaps","_usePathMaps2","_slicedToArray","pathMap","focusedToValueMap","valueToCheckedMap","valueToItemMap","labelToItemMap","_useState","useState","multiselect","_useState2","internalValue","setInternalValue","undefined","getInitialValue","floatingPopoverRef","useRef","_useReducer","useReducer","pathReducer","_useReducer2","path","dispatchPath","_useReducer3","focusedPathReducer","_useReducer4","focusedPath","dispatchFocusedPath","_useState3","_useState4","checked","setChecked","isCurrentListOpen","Boolean","activeDescendantItemValue","getItemByFocused","toString","treeId","safeUseId","getView","requiredProps","required","requiredPlacement","optional","targetRef","useOutsideClick","type","newValue","Array","isArray","_typeof","handleClickArrow","handleListToggle","opened","handleCheckboxChange","item","checkedCopy","Map","get","set","updateDescendants","updateAncestors","newValues","forEach","key","push","handleItemClick","e","isEmpty","stopPropagation","isCurrentChecked","handlePressDown","handleScroll","scrollHeight","scrollTop","clientHeight","_useKeyNavigation","useKeyNavigation","onKeyDown","useLayoutEffect","_","val","updateSingleAncestors","React","createElement","_extends","SelectNative","onSetValue","Context","Provider","FloatingPopover","onToggle","referenceRef","Target","selectProps","inputWrapperRef","Ul","role","id","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EAAEA,SAAAA;AAAU,OACxB,CAAC,CAAA;AAAA,KACL,CAAC,EAEDgB,SACD,CACF,CACO,CACH,CAChB,CAAC,CAAA;AAEf,GAAC,CAAC,CAAA;AAAA,EAAA;AAEC,IAAMqH,YAAY,GAAG;AACxBnH,EAAAA,IAAI,EAAE,QAAQ;AACdoH,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAEjK,UAAU;AAClBkK,EAAAA,IAAI,EAAJA,kBAAI;EACJC,UAAU,EAAE,EAAE;AACdC,EAAAA,QAAQ,EAAE;AACN9I,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,IAAI,EAAE,GAAG;AACTP,IAAAA,cAAc,EAAE,OAAO;AACvBa,IAAAA,QAAQ,EAAE,SAAA;AACd,GAAA;AACJ;;;;;"}
|
1
|
+
{"version":3,"file":"Select.js","sources":["../../../src/components/Select/Select.tsx"],"sourcesContent":["import React, {\n forwardRef,\n useState,\n useReducer,\n useMemo,\n createContext,\n useLayoutEffect,\n useRef,\n ChangeEvent,\n ForwardedRef,\n} from 'react';\nimport { safeUseId } from '@salutejs/plasma-core';\n\nimport { RootProps } from '../../engines';\nimport { isEmpty } from '../../utils';\nimport { useOutsideClick } from '../../hooks';\n\nimport { useKeyNavigation, getItemByFocused } from './hooks/useKeyboardNavigation';\nimport {\n initialItemsTransform,\n updateAncestors,\n updateDescendants,\n updateSingleAncestors,\n getView,\n getInitialValue,\n} from './utils';\nimport { Inner, Target } from './ui';\nimport { pathReducer, focusedPathReducer } from './reducers';\nimport { usePathMaps } from './hooks/usePathMaps';\nimport { Ul, base } from './Select.styles';\nimport type { ItemContext, MergedSelectProps, RequiredProps } from './Select.types';\nimport type { MergedDropdownNodeTransformed } from './ui/Inner/ui/Item/Item.types';\nimport { FloatingPopover } from './FloatingPopover';\nimport { SelectNative } from './ui/SelectNative/SelectNative';\n\nexport const Context = createContext<ItemContext>({} as ItemContext);\n\n/**\n * Выпадающий список. Поддерживает выбор одного или нескольких значений.\n */\nexport const selectRoot = (Root: RootProps<HTMLButtonElement, Omit<MergedSelectProps, 'items'>>) =>\n forwardRef<HTMLButtonElement, MergedSelectProps>((props, ref) => {\n const {\n value: outerValue,\n onChange: outerOnChange,\n target = 'textfield-like',\n items,\n placement = 'bottom',\n label,\n labelPlacement,\n placeholder,\n helperText,\n disabled = false,\n view: outerView,\n size,\n listOverflow,\n listHeight,\n listWidth,\n contentLeft,\n onScrollBottom,\n chipView,\n variant = 'normal',\n portal,\n renderValue,\n renderItem,\n status,\n onItemSelect,\n separator,\n closeAfterSelect: outerCloseAfterSelect,\n isTargetAmount,\n beforeList,\n afterList,\n zIndex,\n name,\n defaultValue,\n ...rest\n } = props;\n const transformedItems = useMemo(() => initialItemsTransform(items || []), [items]);\n\n // Создаем структуры для быстрой работы с деревом\n const [pathMap, focusedToValueMap, valueToCheckedMap, valueToItemMap, labelToItemMap] = usePathMaps(\n transformedItems,\n );\n\n const [internalValue, setInternalValue] = useState<string | number | Array<string | number>>(\n props.multiselect ? [] : '',\n );\n\n const value =\n outerValue !== null && outerValue !== undefined\n ? getInitialValue(outerValue, valueToItemMap)\n : internalValue;\n\n const floatingPopoverRef = useRef<HTMLDivElement>(null);\n\n // Состояния дерева элементов\n const [path, dispatchPath] = useReducer(pathReducer, []);\n const [focusedPath, dispatchFocusedPath] = useReducer(focusedPathReducer, []);\n const [checked, setChecked] = useState(valueToCheckedMap);\n\n const isCurrentListOpen = Boolean(path[0]);\n const activeDescendantItemValue = getItemByFocused(focusedPath, focusedToValueMap)?.value.toString() || '';\n const closeAfterSelect = outerCloseAfterSelect ?? !props.multiselect;\n const treeId = safeUseId();\n const view = target === 'textfield-like' && disabled ? 'default' : getView(status, outerView);\n\n // Собираем объект с пропсами для required и прокидываем их напрямую в компонент Textfield.\n const requiredProps =\n props.target === 'button-like'\n ? undefined\n : ({\n required: props.required,\n requiredPlacement: props.requiredPlacement,\n optional: props.optional,\n } as RequiredProps);\n\n const targetRef = useOutsideClick<HTMLUListElement>(() => {\n if (!isCurrentListOpen) {\n return;\n }\n\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n }, floatingPopoverRef);\n\n const onChange = (\n newValue?: string | number | Array<string | number> | ChangeEvent<HTMLSelectElement> | null,\n ) => {\n if (outerOnChange) {\n // Условие для отправки если комбобокс используется без формы.\n if (!name && (typeof newValue === 'string' || Array.isArray(newValue))) {\n outerOnChange(newValue as any);\n }\n\n // Условие для отправки если комбобокс используется с формой.\n if (name && typeof newValue === 'object' && !Array.isArray(newValue)) {\n outerOnChange(newValue as any);\n }\n }\n\n // Условие для изменения внутреннего значения (только если newValue строка или массив строк).\n if (typeof newValue === 'string' || Array.isArray(newValue)) {\n setInternalValue(newValue);\n }\n };\n\n const handleClickArrow = () => {\n if (disabled) {\n return;\n }\n\n if (isCurrentListOpen) {\n dispatchPath({ type: 'reset' });\n } else {\n dispatchPath({ type: 'opened_first_level' });\n }\n\n dispatchFocusedPath({ type: 'reset' });\n };\n\n const handleListToggle = (opened: boolean) => {\n if (disabled) {\n return;\n }\n\n if (opened) {\n dispatchPath({ type: 'opened_first_level' });\n } else {\n dispatchFocusedPath({ type: 'reset' });\n dispatchPath({ type: 'reset' });\n }\n };\n\n const handleCheckboxChange = (item: MergedDropdownNodeTransformed) => {\n if (!props.multiselect) {\n return;\n }\n\n const checkedCopy = new Map(checked);\n\n if (!checkedCopy.get(item.value)) {\n checkedCopy.set(item.value, true);\n updateDescendants(item, checkedCopy, true);\n } else {\n checkedCopy.set(item.value, false);\n updateDescendants(item, checkedCopy, false);\n }\n\n updateAncestors(item, checkedCopy);\n\n const newValues: Array<string | number> = [];\n\n valueToItemMap.forEach((item, key) => {\n if (checkedCopy.get(key)) {\n newValues.push(item.value);\n }\n });\n\n if (closeAfterSelect) {\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n }\n\n if (onChange) {\n onChange(newValues);\n }\n };\n\n const handleItemClick = (item: MergedDropdownNodeTransformed, e?: React.MouseEvent<HTMLElement>) => {\n if (!isEmpty(item?.items)) {\n return;\n }\n\n if (props.multiselect) {\n handleCheckboxChange(item);\n return;\n }\n\n if (e) {\n e.stopPropagation();\n }\n\n const isCurrentChecked = checked.get(item.value);\n\n if (closeAfterSelect) {\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n }\n\n if (onChange) {\n onChange(isCurrentChecked ? '' : item.value);\n }\n\n if (onItemSelect) {\n onItemSelect(item, e!);\n }\n };\n\n const handlePressDown = (item: MergedDropdownNodeTransformed, e?: React.MouseEvent<HTMLElement>) => {\n if (isEmpty(item.items)) {\n handleItemClick(item, e);\n } else if (props.multiselect) {\n handleCheckboxChange(item);\n }\n };\n\n const handleScroll = (e: React.UIEvent<HTMLUListElement>) => {\n if (!onScrollBottom) return;\n\n const { target } = e;\n\n if (\n (target as HTMLElement).scrollHeight - (target as HTMLElement).scrollTop ===\n (target as HTMLElement).clientHeight\n ) {\n onScrollBottom(e);\n }\n };\n\n const { onKeyDown } = useKeyNavigation({\n focusedPath,\n dispatchFocusedPath,\n path,\n dispatchPath,\n pathMap,\n focusedToValueMap,\n handleListToggle,\n handlePressDown,\n });\n\n // В данном эффекте мы следим за изменениями value снаружи и вносим коррективы в дерево чекбоксов.\n // Пример: когда юзер очистил value извне, тогда нужно пройтись по элементам и выключить все чекбоксы.\n useLayoutEffect(() => {\n const checkedCopy = new Map(checked);\n\n checkedCopy.forEach((_, key) => {\n checkedCopy.set(key, false);\n });\n\n if (!isEmpty(value) || typeof value === 'number') {\n if (Array.isArray(value)) {\n value.forEach((val) => {\n checkedCopy.set(val, true);\n updateDescendants(valueToItemMap.get(val)!, checkedCopy, true);\n updateAncestors(valueToItemMap.get(val)!, checkedCopy);\n });\n } else {\n checkedCopy.set(value, 'done');\n updateSingleAncestors(valueToItemMap.get(value)!, checkedCopy, 'dot');\n }\n }\n\n setChecked(checkedCopy);\n\n // В deps мы кладем именно outerValue и internalValue, а не просто value.\n // Т.к. вначале нужно отфильтровать и провалидировать outerValue и результат положить в переменную.\n // А переменную, содержащую сложные типы данных, нельзя помещать в deps.\n }, [outerValue, internalValue, items]);\n\n useLayoutEffect(() => {\n if (defaultValue) {\n setInternalValue(defaultValue as string | string[]);\n }\n }, [defaultValue]);\n\n return (\n <Root\n view={view}\n size={size}\n labelPlacement={labelPlacement}\n chipView={chipView}\n disabled={disabled}\n {...(rest as any)}\n >\n {name && (\n <SelectNative\n items={valueToItemMap}\n name={name}\n value={internalValue}\n multiselect={props.multiselect}\n onChange={onChange}\n onSetValue={setInternalValue}\n ref={ref as ForwardedRef<HTMLButtonElement>}\n />\n )}\n <Context.Provider\n value={{\n focusedPath,\n checked,\n multiselect: props.multiselect,\n size,\n handleCheckboxChange,\n handleItemClick,\n variant,\n renderItem,\n treeId,\n }}\n >\n <FloatingPopover\n ref={floatingPopoverRef}\n opened={isCurrentListOpen}\n onToggle={(opened: boolean) => opened && handleListToggle(true)}\n placement={placement}\n portal={portal}\n listWidth={listWidth}\n target={(referenceRef) => (\n <Target\n ref={name ? null : ref}\n value={value}\n opened={isCurrentListOpen}\n valueToItemMap={valueToItemMap}\n label={label}\n placeholder={placeholder}\n onKeyDown={onKeyDown}\n labelPlacement={labelPlacement}\n size={size}\n contentLeft={contentLeft}\n disabled={disabled}\n renderValue={renderValue}\n selectProps={props}\n inputWrapperRef={referenceRef as React.MutableRefObject<HTMLDivElement>}\n multiselect={props.multiselect}\n view={view}\n handleClickArrow={handleClickArrow}\n helperText={helperText}\n treeId={treeId}\n activeDescendantItemValue={activeDescendantItemValue}\n isTargetAmount={isTargetAmount}\n onChange={onChange}\n labelToItemMap={labelToItemMap}\n chipView={chipView}\n separator={separator}\n requiredProps={requiredProps}\n />\n )}\n zIndex={zIndex}\n >\n <Root\n view={view}\n size={size}\n labelPlacement={labelPlacement}\n chipView={chipView}\n disabled={disabled}\n {...(rest as any)}\n >\n <Ul\n role=\"tree\"\n id={`${treeId}_tree_level_1`}\n aria-multiselectable={Boolean(props.multiselect)}\n listHeight={listHeight}\n listOverflow={listOverflow}\n onScroll={handleScroll}\n listWidth={listWidth}\n ref={targetRef}\n >\n {beforeList}\n\n {transformedItems.map((item, index) => (\n <Inner\n key={`${index}/0`}\n item={item}\n currentLevel={0}\n path={path}\n dispatchPath={dispatchPath}\n index={index}\n listWidth={listWidth}\n />\n ))}\n\n {afterList}\n </Ul>\n </Root>\n </FloatingPopover>\n </Context.Provider>\n </Root>\n );\n });\n\nexport const selectConfig = {\n name: 'Select',\n tag: 'div',\n layout: selectRoot,\n base,\n variations: {},\n defaults: {\n view: 'default',\n size: 'm',\n labelPlacement: 'outer',\n chipView: 'default',\n },\n};\n"],"names":["Context","createContext","selectRoot","Root","forwardRef","props","ref","_getItemByFocused","outerValue","value","outerOnChange","onChange","_props$target","target","items","_props$placement","placement","label","labelPlacement","placeholder","helperText","_props$disabled","disabled","outerView","view","size","listOverflow","listHeight","listWidth","contentLeft","onScrollBottom","chipView","_props$variant","variant","portal","renderValue","renderItem","status","onItemSelect","separator","outerCloseAfterSelect","closeAfterSelect","isTargetAmount","beforeList","afterList","zIndex","name","defaultValue","rest","_objectWithoutProperties","_excluded","transformedItems","useMemo","initialItemsTransform","_usePathMaps","usePathMaps","_usePathMaps2","_slicedToArray","pathMap","focusedToValueMap","valueToCheckedMap","valueToItemMap","labelToItemMap","_useState","useState","multiselect","_useState2","internalValue","setInternalValue","undefined","getInitialValue","floatingPopoverRef","useRef","_useReducer","useReducer","pathReducer","_useReducer2","path","dispatchPath","_useReducer3","focusedPathReducer","_useReducer4","focusedPath","dispatchFocusedPath","_useState3","_useState4","checked","setChecked","isCurrentListOpen","Boolean","activeDescendantItemValue","getItemByFocused","toString","treeId","safeUseId","getView","requiredProps","required","requiredPlacement","optional","targetRef","useOutsideClick","type","newValue","Array","isArray","_typeof","handleClickArrow","handleListToggle","opened","handleCheckboxChange","item","checkedCopy","Map","get","set","updateDescendants","updateAncestors","newValues","forEach","key","push","handleItemClick","e","isEmpty","stopPropagation","isCurrentChecked","handlePressDown","handleScroll","scrollHeight","scrollTop","clientHeight","_useKeyNavigation","useKeyNavigation","onKeyDown","useLayoutEffect","_","val","updateSingleAncestors","React","createElement","_extends","SelectNative","onSetValue","Provider","FloatingPopover","onToggle","referenceRef","Target","selectProps","inputWrapperRef","Ul","role","id","concat","onScroll","map","index","Inner","currentLevel","selectConfig","tag","layout","base","variations","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;IAmCaA,OAAO,gBAAGC,mBAAa,CAAc,EAAiB,EAAC;;AAEpE;AACA;AACA;IACaC,UAAU,GAAG,SAAbA,UAAUA,CAAIC,IAAoE,EAAA;AAAA,EAAA,oBAC3FC,gBAAU,CAAuC,UAACC,KAAK,EAAEC,GAAG,EAAK;AAAA,IAAA,IAAAC,iBAAA,CAAA;AAC7D,IAAA,IACWC,UAAU,GAiCjBH,KAAK,CAjCLI,KAAK;MACKC,aAAa,GAgCvBL,KAAK,CAhCLM,QAAQ;MAAAC,aAAA,GAgCRP,KAAK,CA/BLQ,MAAM;AAANA,MAAAA,MAAM,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,gBAAgB,GAAAA,aAAA;MACzBE,KAAK,GA8BLT,KAAK,CA9BLS,KAAK;MAAAC,gBAAA,GA8BLV,KAAK,CA7BLW,SAAS;AAATA,MAAAA,SAAS,GAAAD,gBAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,gBAAA;MACpBE,KAAK,GA4BLZ,KAAK,CA5BLY,KAAK;MACLC,cAAc,GA2Bdb,KAAK,CA3BLa,cAAc;MACdC,WAAW,GA0BXd,KAAK,CA1BLc,WAAW;MACXC,UAAU,GAyBVf,KAAK,CAzBLe,UAAU;MAAAC,eAAA,GAyBVhB,KAAK,CAxBLiB,QAAQ;AAARA,MAAAA,QAAQ,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,eAAA;MACVE,SAAS,GAuBflB,KAAK,CAvBLmB,IAAI;MACJC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