@finam/web-ui-kit-components 3.33.2 → 3.33.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/Avatar/index.d.ts +1 -3
- package/dist/Avatar/index.d.ts.map +1 -1
- package/dist/Avatar/index.js +1 -5
- package/dist/Avatar/utils.d.ts.map +1 -1
- package/dist/Avatar/utils.js.map +1 -1
- package/dist/Breadcrumbs/Breadcrumb/Breadcrumb.d.ts +2 -1
- package/dist/Breadcrumbs/Breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/dist/Breadcrumbs/Breadcrumb/Breadcrumb.js.map +1 -1
- package/dist/Breadcrumbs/utils/getRenderOnPageItems.d.ts.map +1 -1
- package/dist/Breadcrumbs/utils/getRenderOnPageItems.js +7 -8
- package/dist/Breadcrumbs/utils/getRenderOnPageItems.js.map +1 -1
- package/dist/Calendar/Calendar.js +8 -1
- package/dist/Calendar/Calendar.js.map +1 -1
- package/dist/Calendar/Calendar.styles.css +1 -1
- package/dist/Calendar/Calendar.styles.d.ts +1 -1
- package/dist/Calendar/Calendar.styles.d.ts.map +1 -1
- package/dist/Calendar/Calendar.styles.js +1 -1
- package/dist/Calendar/Calendar.styles.js.map +1 -1
- package/dist/Calendar/Day/Day.d.ts +3 -2
- package/dist/Calendar/Day/Day.d.ts.map +1 -1
- package/dist/Calendar/Day/Day.js +5 -2
- package/dist/Calendar/Day/Day.js.map +1 -1
- package/dist/Calendar/Day/Day.styles.css +2 -2
- package/dist/Calendar/Day/Day.styles.d.ts.map +1 -1
- package/dist/Calendar/Day/Day.styles.js.map +1 -1
- package/dist/Calendar/Day/index.d.ts +1 -3
- package/dist/Calendar/Day/index.d.ts.map +1 -1
- package/dist/Calendar/Day/index.js +1 -5
- package/dist/Calendar/DayWrapper.d.ts +1 -1
- package/dist/Calendar/DayWrapper.d.ts.map +1 -1
- package/dist/Calendar/DayWrapper.js +15 -7
- package/dist/Calendar/DayWrapper.js.map +1 -1
- package/dist/Calendar/SelectMonthTable/SelectMonthTable.styles.css +1 -1
- package/dist/Calendar/SelectMonthTable/SelectMonthTable.styles.d.ts +1 -1
- package/dist/Calendar/SelectMonthTable/SelectMonthTable.styles.d.ts.map +1 -1
- package/dist/Calendar/SelectMonthTable/SelectMonthTable.styles.js.map +1 -1
- package/dist/Calendar/SelectYearTable/SelectYearTable.styles.css +1 -1
- package/dist/Calendar/SelectYearTable/SelectYearTable.styles.d.ts +1 -1
- package/dist/Calendar/SelectYearTable/SelectYearTable.styles.d.ts.map +1 -1
- package/dist/Calendar/SelectYearTable/SelectYearTable.styles.js.map +1 -1
- package/dist/Calendar/SlideTransition/index.d.ts +1 -3
- package/dist/Calendar/SlideTransition/index.d.ts.map +1 -1
- package/dist/Calendar/SlideTransition/index.js +1 -5
- package/dist/Calendar/utils.js +9 -9
- package/dist/Calendar/utils.js.map +1 -1
- package/dist/CheckboxField/index.d.ts +1 -3
- package/dist/CheckboxField/index.d.ts.map +1 -1
- package/dist/CheckboxField/index.js +1 -5
- package/dist/CheckboxField/types.d.ts +2 -2
- package/dist/CheckboxField/types.d.ts.map +1 -1
- package/dist/Chip/index.d.ts +1 -3
- package/dist/Chip/index.d.ts.map +1 -1
- package/dist/Chip/index.js +1 -5
- package/dist/ClickAwayListener/ClickAwayListener.d.ts.map +1 -1
- package/dist/ClickAwayListener/ClickAwayListener.js +3 -1
- package/dist/ClickAwayListener/ClickAwayListener.js.map +1 -1
- package/dist/ClickAwayListener/index.d.ts +1 -3
- package/dist/ClickAwayListener/index.d.ts.map +1 -1
- package/dist/ClickAwayListener/index.js +1 -5
- package/dist/Counter/index.d.ts +1 -3
- package/dist/Counter/index.d.ts.map +1 -1
- package/dist/Counter/index.js +1 -5
- package/dist/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/DatePicker/DatePicker.js +1 -1
- package/dist/DatePicker/DatePicker.js.map +1 -1
- package/dist/DateTimePeriod/index.d.ts +2 -5
- package/dist/DateTimePeriod/index.d.ts.map +1 -1
- package/dist/DateTimePeriod/index.js +1 -5
- package/dist/DateTimePicker/index.d.ts +1 -3
- package/dist/DateTimePicker/index.d.ts.map +1 -1
- package/dist/DateTimePicker/index.js +1 -5
- package/dist/Dialog/Dialog.js +1 -1
- package/dist/Dialog/Dialog.js.map +1 -1
- package/dist/DialogActions/index.d.ts +1 -3
- package/dist/DialogActions/index.d.ts.map +1 -1
- package/dist/DialogActions/index.js +1 -5
- package/dist/DialogContent/index.d.ts +1 -3
- package/dist/DialogContent/index.d.ts.map +1 -1
- package/dist/DialogContent/index.js +1 -5
- package/dist/DialogTitle/index.d.ts +1 -3
- package/dist/DialogTitle/index.d.ts.map +1 -1
- package/dist/DialogTitle/index.js +1 -5
- package/dist/Divider/index.d.ts +1 -3
- package/dist/Divider/index.d.ts.map +1 -1
- package/dist/Divider/index.js +1 -5
- package/dist/DraggablePopover/DraggablePopover.d.ts.map +1 -1
- package/dist/DraggablePopover/DraggablePopover.js +2 -2
- package/dist/DraggablePopover/DraggablePopover.js.map +1 -1
- package/dist/DraggablePopover/layersManager.d.ts +1 -1
- package/dist/DraggablePopover/layersManager.d.ts.map +1 -1
- package/dist/DraggablePopover/layersManager.js.map +1 -1
- package/dist/DropDownMenu/index.d.ts +1 -3
- package/dist/DropDownMenu/index.d.ts.map +1 -1
- package/dist/DropDownMenu/index.js +1 -5
- package/dist/FeatureCallout/FeatureCalloutActions/index.d.ts +1 -3
- package/dist/FeatureCallout/FeatureCalloutActions/index.d.ts.map +1 -1
- package/dist/FeatureCallout/FeatureCalloutActions/index.js +1 -5
- package/dist/FeatureCallout/FeatureCalloutText/index.d.ts +1 -3
- package/dist/FeatureCallout/FeatureCalloutText/index.d.ts.map +1 -1
- package/dist/FeatureCallout/FeatureCalloutText/index.js +1 -5
- package/dist/FeatureCallout/FeatureCalloutTitle/index.d.ts +1 -3
- package/dist/FeatureCallout/FeatureCalloutTitle/index.d.ts.map +1 -1
- package/dist/FeatureCallout/FeatureCalloutTitle/index.js +1 -5
- package/dist/FeatureCallout/index.d.ts +4 -7
- package/dist/FeatureCallout/index.d.ts.map +1 -1
- package/dist/FeatureCallout/index.js +1 -5
- package/dist/FeatureCallout/utils.d.ts.map +1 -1
- package/dist/FeatureCallout/utils.js +1 -37
- package/dist/FeatureCallout/utils.js.map +1 -1
- package/dist/FieldHint/index.d.ts +1 -3
- package/dist/FieldHint/index.d.ts.map +1 -1
- package/dist/FieldHint/index.js +1 -5
- package/dist/FilterButton/FilterButton.js +1 -1
- package/dist/FilterButton/FilterButton.js.map +1 -1
- package/dist/FormGroup/index.d.ts +1 -3
- package/dist/FormGroup/index.d.ts.map +1 -1
- package/dist/FormGroup/index.js +1 -5
- package/dist/Loader/index.d.ts +1 -3
- package/dist/Loader/index.d.ts.map +1 -1
- package/dist/Loader/index.js +1 -5
- package/dist/LoaderBackdrop/index.d.ts +1 -3
- package/dist/LoaderBackdrop/index.d.ts.map +1 -1
- package/dist/LoaderBackdrop/index.js +1 -5
- package/dist/LoaderDots/index.d.ts +1 -3
- package/dist/LoaderDots/index.d.ts.map +1 -1
- package/dist/LoaderDots/index.js +1 -5
- package/dist/MarketingButton/useMarketingAnimations.d.ts +2 -2
- package/dist/MarketingButton/useMarketingAnimations.d.ts.map +1 -1
- package/dist/MarketingButton/useMarketingAnimations.js +27 -14
- package/dist/MarketingButton/useMarketingAnimations.js.map +1 -1
- package/dist/Modal/ModalManager.d.ts +1 -1
- package/dist/Modal/ModalManager.d.ts.map +1 -1
- package/dist/Modal/ModalManager.js.map +1 -1
- package/dist/Modal/Portal.js +1 -1
- package/dist/Modal/Portal.js.map +1 -1
- package/dist/ModalsProvider/index.d.ts +1 -3
- package/dist/ModalsProvider/index.d.ts.map +1 -1
- package/dist/ModalsProvider/index.js +1 -6
- package/dist/MultiSelectField/MultiSelectField.d.ts.map +1 -1
- package/dist/MultiSelectField/MultiSelectField.js +3 -8
- package/dist/MultiSelectField/MultiSelectField.js.map +1 -1
- package/dist/MultiSelectField/index.d.ts +1 -3
- package/dist/MultiSelectField/index.d.ts.map +1 -1
- package/dist/MultiSelectField/index.js +1 -5
- package/dist/NumberTextField/NumberTextField.js +4 -4
- package/dist/NumberTextField/NumberTextField.js.map +1 -1
- package/dist/NumberTextField/index.d.ts +1 -3
- package/dist/NumberTextField/index.d.ts.map +1 -1
- package/dist/NumberTextField/index.js +1 -5
- package/dist/NumberTextField/utils.d.ts.map +1 -1
- package/dist/NumberTextField/utils.js +1 -1
- package/dist/NumberTextField/utils.js.map +1 -1
- package/dist/PaginatorNumber/NavButton/index.d.ts +1 -3
- package/dist/PaginatorNumber/NavButton/index.d.ts.map +1 -1
- package/dist/PaginatorNumber/NavButton/index.js +1 -5
- package/dist/PaginatorNumber/PageButton/index.d.ts +1 -3
- package/dist/PaginatorNumber/PageButton/index.d.ts.map +1 -1
- package/dist/PaginatorNumber/PageButton/index.js +1 -5
- package/dist/PaginatorNumber/index.d.ts +1 -3
- package/dist/PaginatorNumber/index.d.ts.map +1 -1
- package/dist/PaginatorNumber/index.js +1 -5
- package/dist/PaginatorOverflow/NavButton/index.d.ts +1 -3
- package/dist/PaginatorOverflow/NavButton/index.d.ts.map +1 -1
- package/dist/PaginatorOverflow/NavButton/index.js +1 -5
- package/dist/PaginatorOverflow/PaginatorOverflow.js +2 -2
- package/dist/PaginatorOverflow/PaginatorOverflow.js.map +1 -1
- package/dist/PaginatorOverflow/index.d.ts +1 -3
- package/dist/PaginatorOverflow/index.d.ts.map +1 -1
- package/dist/PaginatorOverflow/index.js +1 -5
- package/dist/Paper/types.d.ts +6 -1
- package/dist/Paper/types.d.ts.map +1 -1
- package/dist/Paper/utils.d.ts +2 -2
- package/dist/PickersUtilsProvider/defaultDateFormatUtils.js +1 -1
- package/dist/PickersUtilsProvider/defaultDateFormatUtils.js.map +1 -1
- package/dist/PickersUtilsProvider/defaultTimeFormatUtils.js +4 -4
- package/dist/PickersUtilsProvider/defaultTimeFormatUtils.js.map +1 -1
- package/dist/PickersUtilsProvider/utils.js +1 -1
- package/dist/PickersUtilsProvider/utils.js.map +1 -1
- package/dist/ProductCard/layouts/ipo/Content.d.ts +2 -2
- package/dist/ProductCard/layouts/ipo/Content.d.ts.map +1 -1
- package/dist/ProductCard/layouts/ipo/Content.js.map +1 -1
- package/dist/ProductCard/utils.d.ts.map +1 -1
- package/dist/ProductCard/utils.js +4 -1
- package/dist/ProductCard/utils.js.map +1 -1
- package/dist/Skeleton/index.d.ts +2 -3
- package/dist/Skeleton/index.d.ts.map +1 -1
- package/dist/Skeleton/index.js +1 -5
- package/dist/Slider/Slider.js +9 -5
- package/dist/Slider/Slider.js.map +1 -1
- package/dist/Snackbar/Snackbar.js.map +1 -1
- package/dist/Stepper/index.d.ts +2 -3
- package/dist/Stepper/index.d.ts.map +1 -1
- package/dist/Stepper/index.js +1 -5
- package/dist/Tab/Tab.d.ts +2 -1
- package/dist/Tab/Tab.d.ts.map +1 -1
- package/dist/Tab/Tab.js +1 -1
- package/dist/Tab/Tab.js.map +1 -1
- package/dist/Tag/Tag.d.ts.map +1 -1
- package/dist/Tag/Tag.js +2 -13
- package/dist/Tag/Tag.js.map +1 -1
- package/dist/Tag/Tag.styles.css +1 -1
- package/dist/Tag/Tag.styles.d.ts.map +1 -1
- package/dist/Tag/Tag.styles.js.map +1 -1
- package/dist/Tooltip/Tooltip.js.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -1
- package/dist/Avatar/index.js.map +0 -1
- package/dist/Calendar/Day/index.js.map +0 -1
- package/dist/Calendar/SlideTransition/index.js.map +0 -1
- package/dist/CheckboxField/index.js.map +0 -1
- package/dist/Chip/index.js.map +0 -1
- package/dist/ClickAwayListener/index.js.map +0 -1
- package/dist/Counter/index.js.map +0 -1
- package/dist/DateTimePeriod/index.js.map +0 -1
- package/dist/DateTimePicker/index.js.map +0 -1
- package/dist/DialogActions/index.js.map +0 -1
- package/dist/DialogContent/index.js.map +0 -1
- package/dist/DialogTitle/index.js.map +0 -1
- package/dist/Divider/index.js.map +0 -1
- package/dist/DropDownMenu/index.js.map +0 -1
- package/dist/FeatureCallout/FeatureCalloutActions/index.js.map +0 -1
- package/dist/FeatureCallout/FeatureCalloutText/index.js.map +0 -1
- package/dist/FeatureCallout/FeatureCalloutTitle/index.js.map +0 -1
- package/dist/FeatureCallout/index.js.map +0 -1
- package/dist/FieldHint/index.js.map +0 -1
- package/dist/FormGroup/index.js.map +0 -1
- package/dist/Loader/index.js.map +0 -1
- package/dist/LoaderBackdrop/index.js.map +0 -1
- package/dist/LoaderDots/index.js.map +0 -1
- package/dist/ModalsProvider/index.js.map +0 -1
- package/dist/MultiSelectField/index.js.map +0 -1
- package/dist/NumberTextField/index.js.map +0 -1
- package/dist/PaginatorNumber/NavButton/index.js.map +0 -1
- package/dist/PaginatorNumber/PageButton/index.js.map +0 -1
- package/dist/PaginatorNumber/index.js.map +0 -1
- package/dist/PaginatorOverflow/NavButton/index.js.map +0 -1
- package/dist/PaginatorOverflow/index.js.map +0 -1
- package/dist/Skeleton/index.js.map +0 -1
- package/dist/Stepper/index.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DraggablePopover.d.ts","sourceRoot":"","sources":["../../src/DraggablePopover/DraggablePopover.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,SAAS,
|
|
1
|
+
{"version":3,"file":"DraggablePopover.d.ts","sourceRoot":"","sources":["../../src/DraggablePopover/DraggablePopover.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,SAAS,EAEV,MAAM,OAAO,CAAC;AAGf,OAAkB,EAAE,eAAe,EAAiC,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAO5G,OAAO,EAAE,YAAY,EAAuB,MAAM,mBAAmB,CAAC;AAUtE,MAAM,WAAW,KAAM,SAAQ,OAAO,CAAC,cAAc,CAAC;IACpD,4EAA4E;IAC5E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gFAAgF;IAChF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kDAAkD;IAClD,IAAI,EAAE,OAAO,CAAC;IACd,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;IACnB,uCAAuC;IACvC,QAAQ,EAAE,SAAS,CAAC;IACpB,sEAAsE;IACtE,gBAAgB,EAAE,CAAC,QAAQ,EAAE,eAAe,KAAK,IAAI,CAAC;IACtD,yBAAyB;IACzB,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,oFAAoF;IACpF,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B;AAED,YAAY,EAAE,eAAe,EAAE,CAAC;wMAY7B,KAAK;AAuMR,wBAAsC"}
|
|
@@ -131,8 +131,8 @@ const DraggablePopover = (_0)=>{
|
|
|
131
131
|
const nextPosition = _({}, position);
|
|
132
132
|
if (screenWidthDiff > 0) nextPosition.x -= screenWidthDiff;
|
|
133
133
|
if (screenHeightDiff > 0) nextPosition.y -= screenHeightDiff;
|
|
134
|
-
nextPosition.x =
|
|
135
|
-
nextPosition.y =
|
|
134
|
+
nextPosition.x = Math.max(0, nextPosition.x);
|
|
135
|
+
nextPosition.y = Math.max(0, nextPosition.y);
|
|
136
136
|
if (position.x !== nextPosition.x || position.y !== nextPosition.y) onChangePosition(nextPosition);
|
|
137
137
|
}, [
|
|
138
138
|
position.x,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DraggablePopover/DraggablePopover.js","sources":["../../src/DraggablePopover/DraggablePopover.tsx"],"sourcesContent":["import {\n useCallback,\n useEffect,\n useMemo,\n useRef,\n memo,\n useState,\n ReactNode,\n useReducer,\n RefObject,\n} from 'react';\nimport { createPortal } from 'react-dom';\nimport debounce from 'lodash/debounce.js';\nimport Draggable, { ControlPosition, DraggableData, DraggableEvent, DraggableProps } from 'react-draggable';\nimport { CSSTransition } from 'react-transition-group';\nimport { tokens } from '@finam/web-ui-kit-core/theme/contract';\nimport { transitionGrow, transitionGrowParent } from '@finam/web-ui-kit-core/styles/transition';\nimport classNames from 'clsx';\n\nimport { KeyboardEventKey } from '../types.js';\nimport { ModalManager, defaultModalManager } from '../Modal/index.js';\nimport { useModalState } from '../ModalsProvider/index.js';\nimport { defaultLayersManager } from './layersManager.js';\nimport { correctPosition } from './utils.js';\nimport { PaperStyled, DraggableWrap, transitionClassName } from './DraggablePopover.styles.js';\nimport { useIsomorphicEffect } from '../utils/useIsomorphicEffect.js';\nimport { transitionClassNames } from '../utils/transition.js';\n\nconst DEFAULT_OFFSET = 16;\n\nexport interface Props extends Partial<DraggableProps> {\n /** Кастомные классы передаваемые в компонент Paper перетаскиваемого окна */\n className?: string;\n /** Идентификатор слоя, используется для управления порядком отображения окон */\n layerId?: string;\n /** Управление видимостью перетаскиваемого окна */\n show: boolean;\n /** Коллбэк, вызываемый на нажатие ESCAPE */\n onEsc?: () => void;\n /** Содержимое перетаскиваемого окна */\n children: ReactNode;\n /** Коллбэк, вызываемый при изменении позиции перетаскиваемого окна */\n onChangePosition: (position: ControlPosition) => void;\n /** from CSSTransition */\n onExited?: VoidFunction;\n /** Экземпляр класса ModalManager для управления порядком открытых модальных окон */\n modalManager?: ModalManager;\n}\n\nexport type { ControlPosition };\n\nconst DraggablePopover = ({\n show,\n children,\n onEsc,\n layerId: layerIdProp,\n className,\n onChangePosition,\n onExited,\n modalManager: modalManagerProp,\n ...draggableProps\n}: Props) => {\n const {\n position: positionProp,\n defaultPosition,\n onStart,\n onMouseDown,\n onStop,\n } = draggableProps;\n const { className: modalClassName } = useModalState();\n const layerIdRef = useRef<string>(layerIdProp || Math.random().toString());\n const popoverRef = useRef<HTMLDivElement | null>(null);\n const rootRef = useRef<HTMLDivElement | null>(null);\n const [zIndex, setZIndex] = useState(0);\n const [resized, setResized] = useReducer(prev => !prev, false);\n\n const positionX = positionProp?.x ?? defaultPosition?.x ?? DEFAULT_OFFSET;\n const positionY = positionProp?.y ?? defaultPosition?.y ?? DEFAULT_OFFSET;\n const position = useMemo(() => (\n correctPosition(positionX, positionY, popoverRef.current)\n // eslint-disable-next-line react-hooks/exhaustive-deps\n ), [positionX, positionY, resized]);\n\n const modalManager = modalManagerProp || defaultModalManager;\n\n const handleMouseDown = useCallback((e: MouseEvent) => {\n const popover = popoverRef.current;\n const layerId = layerIdRef.current;\n\n defaultLayersManager.setLayerActive(layerId);\n if (popover) {\n modalManager.remove(popover);\n modalManager.add(popover);\n }\n onMouseDown?.(e);\n }, [modalManager, onMouseDown]);\n\n const handleDragStart = useCallback((e: DraggableEvent, data: DraggableData) => {\n e.preventDefault();\n onStart?.(e, data);\n }, [onStart]);\n\n const handleDragStop = useCallback((e: DraggableEvent, data: DraggableData) => {\n onChangePosition({ x: data.x, y: data.y });\n onStop?.(e, data);\n }, [onChangePosition, onStop]);\n\n useEffect(() => {\n if (!show) return undefined;\n\n const popover = popoverRef.current;\n const layerId = layerIdRef.current;\n\n defaultLayersManager.addLayerListener(\n layerId,\n () => {\n setZIndex(prev => (defaultLayersManager.isLayerActive(layerId) ? 0 : prev + 1));\n },\n () => {\n setZIndex(prevZIndex => prevZIndex - 1);\n },\n );\n defaultLayersManager.setLayerActive(layerId);\n if (popover) {\n modalManager.add(popover);\n }\n\n return () => {\n defaultLayersManager.removeLayerListener(layerId);\n setZIndex(0);\n if (popover) {\n modalManager.remove(popover);\n }\n };\n }, [modalManager, show]);\n\n useEffect(() => {\n if (!show) return undefined;\n\n const handleKeyDown = (event: KeyboardEvent) => {\n const { key } = event;\n if (\n (key === KeyboardEventKey.ESCAPE || key === KeyboardEventKey.ESC) &&\n onEsc && !event.defaultPrevented &&\n defaultLayersManager.isLayerActive(layerIdRef.current) &&\n popoverRef.current && modalManager.isTop(popoverRef.current)\n ) {\n event.preventDefault();\n onEsc();\n }\n };\n\n document.addEventListener('keydown', handleKeyDown);\n\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n };\n }, [modalManager, onEsc, show]);\n\n useIsomorphicEffect(() => {\n const popover = popoverRef.current;\n if (!popover) return;\n\n const screenWidth = document.documentElement.scrollWidth;\n const screenHeight = document.documentElement.scrollHeight;\n\n const prevWidth = popover.style.width;\n const prevHeight = popover.style.height;\n popover.style.width = '0px';\n popover.style.height = '0px';\n const screenWidthWithout = document.documentElement.scrollWidth;\n const screenHeightWithout = document.documentElement.scrollHeight;\n popover.style.width = prevWidth;\n popover.style.height = prevHeight;\n\n const screenWidthDiff = screenWidth - screenWidthWithout;\n const screenHeightDiff = screenHeight - screenHeightWithout;\n\n const nextPosition = { ...position };\n if (screenWidthDiff > 0) {\n nextPosition.x -= screenWidthDiff;\n }\n if (screenHeightDiff > 0) {\n nextPosition.y -= screenHeightDiff;\n }\n\n nextPosition.x = nextPosition.x < 0 ? 0 : nextPosition.x;\n nextPosition.y = nextPosition.y < 0 ? 0 : nextPosition.y;\n\n if (position.x !== nextPosition.x || position.y !== nextPosition.y) {\n onChangePosition(nextPosition);\n }\n }, [position.x, position.y, resized, onChangePosition]);\n\n useEffect(() => {\n const popover = popoverRef.current;\n if (!show || !popover) return undefined;\n\n const handleResize = debounce(() => {\n setResized();\n }, 250);\n\n setResized();\n window.addEventListener('resize', handleResize);\n let resizeObserver: ResizeObserver | undefined;\n if ('ResizeObserver' in window) {\n try {\n resizeObserver = new window.ResizeObserver(handleResize);\n resizeObserver.observe(popover);\n } catch (e) {\n console.warn('Failed to create ResizeObserver for handling element resize', e);\n }\n }\n\n return () => {\n handleResize.cancel();\n window.removeEventListener('resize', handleResize);\n resizeObserver?.disconnect();\n };\n }, [show]);\n\n const paperClassName = classNames(\n transitionGrow(),\n className,\n );\n\n return createPortal(\n <Draggable\n bounds=\"parent\"\n {...draggableProps}\n // TODO: remove as after https://github.com/react-grid-layout/react-draggable/issues/768\n nodeRef={popoverRef as RefObject<HTMLDivElement>}\n position={position}\n onMouseDown={handleMouseDown}\n onStart={handleDragStart}\n onStop={handleDragStop}\n >\n <DraggableWrap\n ref={popoverRef}\n className={modalClassName}\n style={{ zIndex: `calc(${tokens.zIndex.draggablePopover} + ${zIndex})` }}\n >\n <CSSTransition\n nodeRef={rootRef}\n mountOnEnter={true}\n unmountOnExit={true}\n classNames={transitionClassNames([transitionGrowParent, transitionClassName])}\n timeout={300}\n in={show}\n onExited={onExited}\n >\n <PaperStyled shadow=\"modalDialog\" ref={rootRef} className={paperClassName} tabIndex={0}>\n {children}\n </PaperStyled>\n </CSSTransition>\n </DraggableWrap>\n </Draggable>,\n document.body,\n );\n};\n\nexport default memo(DraggablePopover);\n"],"names":["DEFAULT_OFFSET","DraggablePopover","show","children","onEsc","layerIdProp","className","onChangePosition","onExited","modalManagerProp","draggableProps","_ref","_ref2","positionProp","defaultPosition","onStart","onMouseDown","onStop","modalClassName","useModalState","layerIdRef","useRef","Math","popoverRef","rootRef","zIndex","setZIndex","useState","resized","setResized","useReducer","prev","positionX","positionY","position","useMemo","correctPosition","modalManager","defaultModalManager","handleMouseDown","useCallback","e","popover","layerId","defaultLayersManager","handleDragStart","data","handleDragStop","useEffect","prevZIndex","handleKeyDown","event","key","KeyboardEventKey","document","useIsomorphicEffect","screenWidth","screenHeight","prevWidth","prevHeight","screenWidthWithout","screenHeightWithout","screenWidthDiff","screenHeightDiff","nextPosition","handleResize","debounce","window","resizeObserver","console","paperClassName","classNames","transitionGrow","createPortal","Draggable","DraggableWrap","tokens","CSSTransition","transitionClassNames","transitionGrowParent","transitionClassName","PaperStyled","memo"],"mappings":";;;;;;;;;;;;;;;;;;;;AA4BA,MAAMA,iBAAiB;AAuBvB,MAAMC,mBAAmB,CAAC;QAAA,EACxBC,IAAI,EACJC,QAAQ,EACRC,KAAK,EACL,SAASC,WAAW,EACpBC,SAAS,EACTC,gBAAgB,EAChBC,QAAQ,EACR,cAAcC,gBAAgB,EAExB,OADHC,iBAAAA,6BAAAA,IAAAA;;;;;;;;;;QAgBeC,MAAAA,OACAC,OAAAA;IAflB,MAAM,EACJ,UAAUC,YAAY,EACtBC,eAAe,EACfC,OAAO,EACPC,WAAW,EACXC,MAAM,EACP,GAAGP;IACJ,MAAM,EAAE,WAAWQ,cAAc,EAAE,GAAG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C9E;QAGF,OAAO;YACLwB,aAAa,MAAM;YACnBE,OAAO,mBAAmB,CAAC,UAAUF;YACrCG,QAAAA,kBAAAA,eAAgB,UAAU;QAC5B;IACF,GAAG;QAAClE;KAAK;IAET,MAAMoE,iBAAiBC,KACrBC,kBACAlE;IAGF,OAAO,WAAP,GAAOmE,aAAa,WAADA,GACjB,IAACC,iBAASA,uBAAAA,EAAAA;QACR,QAAO;OACHhE,iBAAAA;QAEJ,SAASa;QACT,UAAUW;QACV,aAAaK;QACb,SAASM;QACT,QAAQE;kBAER,kBAAC4B,eAAaA;YACZ,KAAKpD;YACL,WAAWL;YACX,OAAO;gBAAE,QAAQ,CAAC,KAAK,EAAE0D,OAAO,MAAM,CAAC,gBAAgB,CAAC,GAAG,EAAEnD,OAAO,CAAC,CAAC;YAAC;sBAEvE,kBAACoD,eAAaA;gBACZ,SAASrD;gBACT,cAAc;gBACd,eAAe;gBACf,YAAYsD,qBAAqB;oBAACC;oBAAsBC;iBAAoB;gBAC5E,SAAS;gBACT,IAAI9E;gBACJ,UAAUM;0BAEV,kBAACyE,aAAWA;oBAAC,QAAO;oBAAc,KAAKzD;oBAAS,WAAW8C;oBAAgB,UAAU;8BAClFnE;;;;SAKTmD,SAAS,IAAI;AAEjB;AAEA,wDAAe4B,KAAKjF"}
|
|
1
|
+
{"version":3,"file":"DraggablePopover/DraggablePopover.js","sources":["../../src/DraggablePopover/DraggablePopover.tsx"],"sourcesContent":["import {\n useCallback,\n useEffect,\n useMemo,\n useRef,\n memo,\n useState,\n ReactNode,\n useReducer,\n} from 'react';\nimport { createPortal } from 'react-dom';\nimport debounce from 'lodash/debounce.js';\nimport Draggable, { ControlPosition, DraggableData, DraggableEvent, DraggableProps } from 'react-draggable';\nimport { CSSTransition } from 'react-transition-group';\nimport { tokens } from '@finam/web-ui-kit-core/theme/contract';\nimport { transitionGrow, transitionGrowParent } from '@finam/web-ui-kit-core/styles/transition';\nimport classNames from 'clsx';\n\nimport { KeyboardEventKey } from '../types.js';\nimport { ModalManager, defaultModalManager } from '../Modal/index.js';\nimport { useModalState } from '../ModalsProvider/index.js';\nimport { defaultLayersManager } from './layersManager.js';\nimport { correctPosition } from './utils.js';\nimport { PaperStyled, DraggableWrap, transitionClassName } from './DraggablePopover.styles.js';\nimport { useIsomorphicEffect } from '../utils/useIsomorphicEffect.js';\nimport { transitionClassNames } from '../utils/transition.js';\n\nconst DEFAULT_OFFSET = 16;\n\nexport interface Props extends Partial<DraggableProps> {\n /** Кастомные классы передаваемые в компонент Paper перетаскиваемого окна */\n className?: string;\n /** Идентификатор слоя, используется для управления порядком отображения окон */\n layerId?: string;\n /** Управление видимостью перетаскиваемого окна */\n show: boolean;\n /** Коллбэк, вызываемый на нажатие ESCAPE */\n onEsc?: () => void;\n /** Содержимое перетаскиваемого окна */\n children: ReactNode;\n /** Коллбэк, вызываемый при изменении позиции перетаскиваемого окна */\n onChangePosition: (position: ControlPosition) => void;\n /** from CSSTransition */\n onExited?: VoidFunction;\n /** Экземпляр класса ModalManager для управления порядком открытых модальных окон */\n modalManager?: ModalManager;\n}\n\nexport type { ControlPosition };\n\nconst DraggablePopover = ({\n show,\n children,\n onEsc,\n layerId: layerIdProp,\n className,\n onChangePosition,\n onExited,\n modalManager: modalManagerProp,\n ...draggableProps\n}: Props) => {\n const {\n position: positionProp,\n defaultPosition,\n onStart,\n onMouseDown,\n onStop,\n } = draggableProps;\n const { className: modalClassName } = useModalState();\n const layerIdRef = useRef<string>(layerIdProp || Math.random().toString());\n const popoverRef = useRef<HTMLDivElement | null>(null);\n const rootRef = useRef<HTMLDivElement | null>(null);\n const [zIndex, setZIndex] = useState(0);\n const [resized, setResized] = useReducer(prev => !prev, false);\n\n const positionX = positionProp?.x ?? defaultPosition?.x ?? DEFAULT_OFFSET;\n const positionY = positionProp?.y ?? defaultPosition?.y ?? DEFAULT_OFFSET;\n const position = useMemo(() => (\n correctPosition(positionX, positionY, popoverRef.current)\n // eslint-disable-next-line react-hooks/exhaustive-deps\n ), [positionX, positionY, resized]);\n\n const modalManager = modalManagerProp || defaultModalManager;\n\n const handleMouseDown = useCallback((e: MouseEvent) => {\n const popover = popoverRef.current;\n const layerId = layerIdRef.current;\n\n defaultLayersManager.setLayerActive(layerId);\n if (popover) {\n modalManager.remove(popover);\n modalManager.add(popover);\n }\n onMouseDown?.(e);\n }, [modalManager, onMouseDown]);\n\n const handleDragStart = useCallback((e: DraggableEvent, data: DraggableData) => {\n e.preventDefault();\n onStart?.(e, data);\n }, [onStart]);\n\n const handleDragStop = useCallback((e: DraggableEvent, data: DraggableData) => {\n onChangePosition({ x: data.x, y: data.y });\n onStop?.(e, data);\n }, [onChangePosition, onStop]);\n\n useEffect(() => {\n if (!show) return undefined;\n\n const popover = popoverRef.current;\n const layerId = layerIdRef.current;\n\n defaultLayersManager.addLayerListener(\n layerId,\n () => {\n setZIndex(prev => (defaultLayersManager.isLayerActive(layerId) ? 0 : prev + 1));\n },\n () => {\n setZIndex(prevZIndex => prevZIndex - 1);\n },\n );\n defaultLayersManager.setLayerActive(layerId);\n if (popover) {\n modalManager.add(popover);\n }\n\n return () => {\n defaultLayersManager.removeLayerListener(layerId);\n setZIndex(0);\n if (popover) {\n modalManager.remove(popover);\n }\n };\n }, [modalManager, show]);\n\n useEffect(() => {\n if (!show) return undefined;\n\n const handleKeyDown = (event: KeyboardEvent) => {\n const { key } = event;\n if (\n (key === KeyboardEventKey.ESCAPE || key === KeyboardEventKey.ESC) &&\n onEsc && !event.defaultPrevented &&\n defaultLayersManager.isLayerActive(layerIdRef.current) &&\n popoverRef.current && modalManager.isTop(popoverRef.current)\n ) {\n event.preventDefault();\n onEsc();\n }\n };\n\n document.addEventListener('keydown', handleKeyDown);\n\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n };\n }, [modalManager, onEsc, show]);\n\n useIsomorphicEffect(() => {\n const popover = popoverRef.current;\n if (!popover) return;\n\n const screenWidth = document.documentElement.scrollWidth;\n const screenHeight = document.documentElement.scrollHeight;\n\n const prevWidth = popover.style.width;\n const prevHeight = popover.style.height;\n popover.style.width = '0px';\n popover.style.height = '0px';\n const screenWidthWithout = document.documentElement.scrollWidth;\n const screenHeightWithout = document.documentElement.scrollHeight;\n popover.style.width = prevWidth;\n popover.style.height = prevHeight;\n\n const screenWidthDiff = screenWidth - screenWidthWithout;\n const screenHeightDiff = screenHeight - screenHeightWithout;\n\n const nextPosition = { ...position };\n if (screenWidthDiff > 0) {\n nextPosition.x -= screenWidthDiff;\n }\n if (screenHeightDiff > 0) {\n nextPosition.y -= screenHeightDiff;\n }\n\n nextPosition.x = Math.max(0, nextPosition.x);\n nextPosition.y = Math.max(0, nextPosition.y);\n\n if (position.x !== nextPosition.x || position.y !== nextPosition.y) {\n onChangePosition(nextPosition);\n }\n }, [position.x, position.y, resized, onChangePosition]);\n\n useEffect(() => {\n const popover = popoverRef.current;\n if (!show || !popover) return undefined;\n\n const handleResize = debounce(() => {\n setResized();\n }, 250);\n\n setResized();\n window.addEventListener('resize', handleResize);\n let resizeObserver: ResizeObserver | undefined;\n if ('ResizeObserver' in window) {\n try {\n resizeObserver = new window.ResizeObserver(handleResize);\n resizeObserver.observe(popover);\n } catch (e) {\n console.warn('Failed to create ResizeObserver for handling element resize', e);\n }\n }\n\n return () => {\n handleResize.cancel();\n window.removeEventListener('resize', handleResize);\n resizeObserver?.disconnect();\n };\n }, [show]);\n\n const paperClassName = classNames(\n transitionGrow(),\n className,\n );\n\n return createPortal(\n <Draggable\n bounds=\"parent\"\n {...draggableProps}\n nodeRef={popoverRef}\n position={position}\n onMouseDown={handleMouseDown}\n onStart={handleDragStart}\n onStop={handleDragStop}\n >\n <DraggableWrap\n ref={popoverRef}\n className={modalClassName}\n style={{ zIndex: `calc(${tokens.zIndex.draggablePopover} + ${zIndex})` }}\n >\n <CSSTransition\n nodeRef={rootRef}\n mountOnEnter={true}\n unmountOnExit={true}\n classNames={transitionClassNames([transitionGrowParent, transitionClassName])}\n timeout={300}\n in={show}\n onExited={onExited}\n >\n <PaperStyled shadow=\"modalDialog\" ref={rootRef} className={paperClassName} tabIndex={0}>\n {children}\n </PaperStyled>\n </CSSTransition>\n </DraggableWrap>\n </Draggable>,\n document.body,\n );\n};\n\nexport default memo(DraggablePopover);\n"],"names":["DEFAULT_OFFSET","DraggablePopover","show","children","onEsc","layerIdProp","className","onChangePosition","onExited","modalManagerProp","draggableProps","_ref","_ref2","positionProp","defaultPosition","onStart","onMouseDown","onStop","modalClassName","useModalState","layerIdRef","useRef","Math","popoverRef","rootRef","zIndex","setZIndex","useState","resized","setResized","useReducer","prev","positionX","positionY","position","useMemo","correctPosition","modalManager","defaultModalManager","handleMouseDown","useCallback","e","popover","layerId","defaultLayersManager","handleDragStart","data","handleDragStop","useEffect","prevZIndex","handleKeyDown","event","key","KeyboardEventKey","document","useIsomorphicEffect","screenWidth","screenHeight","prevWidth","prevHeight","screenWidthWithout","screenHeightWithout","screenWidthDiff","screenHeightDiff","nextPosition","handleResize","debounce","window","resizeObserver","console","paperClassName","classNames","transitionGrow","createPortal","Draggable","DraggableWrap","tokens","CSSTransition","transitionClassNames","transitionGrowParent","transitionClassName","PaperStyled","memo"],"mappings":";;;;;;;;;;;;;;;;;;;;AA2BA,MAAMA,iBAAiB;AAuBvB,MAAMC,mBAAmB,CAAC;QAAA,EACxBC,IAAI,EACJC,QAAQ,EACRC,KAAK,EACL,SAASC,WAAW,EACpBC,SAAS,EACTC,gBAAgB,EAChBC,QAAQ,EACR,cAAcC,gBAAgB,EAExB,OADHC,iBAAAA,6BAAAA,IAAAA;;;;;;;;;;QAgBeC,MAAAA,OACAC,OAAAA;IAflB,MAAM,EACJ,UAAUC,YAAY,EACtBC,eAAe,EACfC,OAAO,EACPC,WAAW,EACXC,MAAM,EACP,GAAGP;IACJ,MAAM,EAAE,WAAWQ,cAAc,EAAE,GAAGC;IACtC,MAAMC,aAAaC,OAAehB,eAAeiB,KAAK,MAAM,GAAG,QAAQ;IACvE,MAAMC,aAAaF,OAA8B;IACjD,MAAMG,UAAUH,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F,GAAG;QAAClE;KAAK;IAET,MAAMoE,iBAAiBC,KACrBC,kBACAlE;IAGF,OAAO,WAAP,GAAOmE,aAAa,WAADA,GACjB,IAACC,iBAASA,uBAAAA,EAAAA;QACR,QAAO;OACHhE,iBAAAA;QACJ,SAASa;QACT,UAAUW;QACV,aAAaK;QACb,SAASM;QACT,QAAQE;kBAER,kBAAC4B,eAAaA;YACZ,KAAKpD;YACL,WAAWL;YACX,OAAO;gBAAE,QAAQ,CAAC,KAAK,EAAE0D,OAAO,MAAM,CAAC,gBAAgB,CAAC,GAAG,EAAEnD,OAAO,CAAC,CAAC;YAAC;sBAEvE,kBAACoD,eAAaA;gBACZ,SAASrD;gBACT,cAAc;gBACd,eAAe;gBACf,YAAYsD,qBAAqB;oBAACC;oBAAsBC;iBAAoB;gBAC5E,SAAS;gBACT,IAAI9E;gBACJ,UAAUM;0BAEV,kBAACyE,aAAWA;oBAAC,QAAO;oBAAc,KAAKzD;oBAAS,WAAW8C;oBAAgB,UAAU;8BAClFnE;;;;SAKTmD,SAAS,IAAI;AAEjB;AAEA,wDAAe4B,KAAKjF"}
|
|
@@ -4,7 +4,7 @@ export interface Layer {
|
|
|
4
4
|
onBack: () => void;
|
|
5
5
|
}
|
|
6
6
|
declare class LayersManager {
|
|
7
|
-
private layers;
|
|
7
|
+
private readonly layers;
|
|
8
8
|
setLayerActive: (id: string) => void;
|
|
9
9
|
removeLayerListener: (id: string) => void;
|
|
10
10
|
addLayerListener: (id: string, onFront: () => void, onBack: () => void) => () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layersManager.d.ts","sourceRoot":"","sources":["../../src/DraggablePopover/layersManager.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,cAAM,aAAa;IACjB,OAAO,CAAC,MAAM,CAAe;
|
|
1
|
+
{"version":3,"file":"layersManager.d.ts","sourceRoot":"","sources":["../../src/DraggablePopover/layersManager.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,cAAM,aAAa;IACjB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;IAEtC,cAAc,GAAI,IAAI,MAAM,UAa1B;IAEF,mBAAmB,GAAI,IAAI,MAAM,UAW/B;IAEF,gBAAgB,GAAI,IAAI,MAAM,EAAE,SAAS,MAAM,IAAI,EAAE,QAAQ,MAAM,IAAI,gBAerE;IAEF,aAAa,GAAI,IAAI,MAAM,aAAoD;CAChF;AAED,eAAO,MAAM,oBAAoB,eAAsB,CAAC;AAExD,eAAe,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DraggablePopover/layersManager.js","sources":["../../src/DraggablePopover/layersManager.ts"],"sourcesContent":["export interface Layer {\n id: string;\n onFront: () => void;\n onBack: () => void;\n}\n\nclass LayersManager {\n private layers: Layer[] = [];\n\n setLayerActive = (id: string) => {\n const layerIndex = this.layers.findIndex(layer => layer.id === id);\n if (layerIndex < 0 || layerIndex >= this.layers.length - 1) {\n return;\n }\n const [layer] = this.layers.splice(layerIndex, 1);\n this.layers.forEach((layerValue, index) => {\n if (index >= layerIndex) {\n layerValue.onBack();\n }\n });\n this.layers.push(layer);\n layer.onFront();\n };\n\n removeLayerListener = (id: string) => {\n const layerIndex = this.layers.findIndex(layer => layer.id === id);\n if (layerIndex < 0) {\n return;\n }\n this.layers.splice(layerIndex, 1);\n this.layers.forEach((layer, index) => {\n if (index < layerIndex) {\n layer.onFront();\n }\n });\n };\n\n addLayerListener = (id: string, onFront: () => void, onBack: () => void) => {\n if (!this.layers.some(layer => layer.id === id)) {\n this.layers.forEach((layer) => {\n layer.onBack();\n });\n this.layers.push({\n id,\n onFront,\n onBack,\n });\n }\n\n return () => {\n this.removeLayerListener(id);\n };\n };\n\n isLayerActive = (id: string) => this.layers[this.layers.length - 1]?.id === id;\n}\n\nexport const defaultLayersManager = new LayersManager();\n\nexport default LayersManager;\n"],"names":["LayersManager","id","layerIndex","layer","layerValue","index","onFront","onBack","_this_layers_","defaultLayersManager"],"mappings":"AAMA,MAAMA;;
|
|
1
|
+
{"version":3,"file":"DraggablePopover/layersManager.js","sources":["../../src/DraggablePopover/layersManager.ts"],"sourcesContent":["export interface Layer {\n id: string;\n onFront: () => void;\n onBack: () => void;\n}\n\nclass LayersManager {\n private readonly layers: Layer[] = [];\n\n setLayerActive = (id: string) => {\n const layerIndex = this.layers.findIndex(layer => layer.id === id);\n if (layerIndex < 0 || layerIndex >= this.layers.length - 1) {\n return;\n }\n const [layer] = this.layers.splice(layerIndex, 1);\n this.layers.forEach((layerValue, index) => {\n if (index >= layerIndex) {\n layerValue.onBack();\n }\n });\n this.layers.push(layer);\n layer.onFront();\n };\n\n removeLayerListener = (id: string) => {\n const layerIndex = this.layers.findIndex(layer => layer.id === id);\n if (layerIndex < 0) {\n return;\n }\n this.layers.splice(layerIndex, 1);\n this.layers.forEach((layer, index) => {\n if (index < layerIndex) {\n layer.onFront();\n }\n });\n };\n\n addLayerListener = (id: string, onFront: () => void, onBack: () => void) => {\n if (!this.layers.some(layer => layer.id === id)) {\n this.layers.forEach((layer) => {\n layer.onBack();\n });\n this.layers.push({\n id,\n onFront,\n onBack,\n });\n }\n\n return () => {\n this.removeLayerListener(id);\n };\n };\n\n isLayerActive = (id: string) => this.layers[this.layers.length - 1]?.id === id;\n}\n\nexport const defaultLayersManager = new LayersManager();\n\nexport default LayersManager;\n"],"names":["LayersManager","id","layerIndex","layer","layerValue","index","onFront","onBack","_this_layers_","defaultLayersManager"],"mappings":"AAMA,MAAMA;;aACa,MAAM,GAAY,EAAE;aAErC,cAAc,GAAG,CAACC;YAChB,MAAMC,aAAa,IAAI,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Q,uBAAuB,IAAIT;AAExC,sBAAeA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/DropDownMenu/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/DropDownMenu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,KAAK,IAAI,iBAAiB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export type { Props as FeatureCalloutActionsProps };
|
|
3
|
-
export default FeatureCalloutActions;
|
|
1
|
+
export { default, type Props as FeatureCalloutActionsProps } from './FeatureCalloutActions.js';
|
|
4
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/FeatureCallout/FeatureCalloutActions/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/FeatureCallout/FeatureCalloutActions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,KAAK,IAAI,0BAA0B,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -1,5 +1 @@
|
|
|
1
|
-
|
|
2
|
-
const FeatureCallout_FeatureCalloutActions = FeatureCalloutActions;
|
|
3
|
-
export default FeatureCallout_FeatureCalloutActions;
|
|
4
|
-
|
|
5
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export { default } from "./FeatureCalloutActions.js";
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export type { Props as FeatureCalloutTextProps };
|
|
3
|
-
export default FeatureCalloutText;
|
|
1
|
+
export { default, type Props as FeatureCalloutTextProps } from './FeatureCalloutText.js';
|
|
4
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/FeatureCallout/FeatureCalloutText/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/FeatureCallout/FeatureCalloutText/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,KAAK,IAAI,uBAAuB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export type { Props as FeatureCalloutTitleProps };
|
|
3
|
-
export default FeatureCalloutTitle;
|
|
1
|
+
export { default, type Props as FeatureCalloutTitleProps } from './FeatureCalloutTitle.js';
|
|
4
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/FeatureCallout/FeatureCalloutTitle/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/FeatureCallout/FeatureCalloutTitle/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,KAAK,IAAI,wBAAwB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export type { FeatureCalloutProps, FeatureCalloutActionsProps, FeatureCalloutTitleProps, FeatureCalloutTextProps, };
|
|
6
|
-
export default FeatureCallout;
|
|
1
|
+
export { default, type Props as FeatureCalloutProps } from './FeatureCallout.js';
|
|
2
|
+
export { default as FeatureCalloutActions, type FeatureCalloutActionsProps } from './FeatureCalloutActions/index.js';
|
|
3
|
+
export { default as FeatureCalloutTitle, type FeatureCalloutTitleProps } from './FeatureCalloutTitle/index.js';
|
|
4
|
+
export { default as FeatureCalloutText, type FeatureCalloutTextProps } from './FeatureCalloutText/index.js';
|
|
7
5
|
export { FeatureCalloutPosition } from './constants.js';
|
|
8
|
-
export { FeatureCalloutActions, FeatureCalloutTitle, FeatureCalloutText };
|
|
9
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/FeatureCallout/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/FeatureCallout/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,KAAK,IAAI,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,KAAK,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AACrH,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,KAAK,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC/G,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,KAAK,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAC5G,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
const src_FeatureCallout = FeatureCallout;
|
|
1
|
+
export { default } from "./FeatureCallout.js";
|
|
3
2
|
export { default as FeatureCalloutActions } from "./FeatureCalloutActions/index.js";
|
|
4
3
|
export { default as FeatureCalloutTitle } from "./FeatureCalloutTitle/index.js";
|
|
5
4
|
export { default as FeatureCalloutText } from "./FeatureCalloutText/index.js";
|
|
6
5
|
export { FeatureCalloutPosition } from "./constants.js";
|
|
7
|
-
export default src_FeatureCallout;
|
|
8
|
-
|
|
9
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/FeatureCallout/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAkB,sBAAsB,EAAiB,MAAM,gBAAgB,CAAC;AAEvF,eAAO,MAAM,kBAAkB,GAAI,UAAU,sBAAsB,KAAG,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/FeatureCallout/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAkB,sBAAsB,EAAiB,MAAM,gBAAgB,CAAC;AAEvF,eAAO,MAAM,kBAAkB,GAAI,UAAU,sBAAsB,KAAG,MAgErE,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,UAAU,sBAAsB,KAAG,MAoClE,CAAC"}
|
|
@@ -12,6 +12,7 @@ const getTransformOrigin = (position)=>{
|
|
|
12
12
|
vertical: 'bottom'
|
|
13
13
|
};
|
|
14
14
|
case FeatureCalloutPosition.TopRight:
|
|
15
|
+
case FeatureCalloutPosition.LeftBottom:
|
|
15
16
|
return {
|
|
16
17
|
horizontal: 'right',
|
|
17
18
|
vertical: 'bottom'
|
|
@@ -36,11 +37,6 @@ const getTransformOrigin = (position)=>{
|
|
|
36
37
|
horizontal: 'right',
|
|
37
38
|
vertical: 'top'
|
|
38
39
|
};
|
|
39
|
-
case FeatureCalloutPosition.LeftBottom:
|
|
40
|
-
return {
|
|
41
|
-
horizontal: 'right',
|
|
42
|
-
vertical: 'bottom'
|
|
43
|
-
};
|
|
44
40
|
case FeatureCalloutPosition.LeftCenter:
|
|
45
41
|
return {
|
|
46
42
|
horizontal: 'right',
|
|
@@ -71,60 +67,28 @@ const getTransformOrigin = (position)=>{
|
|
|
71
67
|
const getAnchorOrigin = (position)=>{
|
|
72
68
|
switch(position){
|
|
73
69
|
case FeatureCalloutPosition.TopLeft:
|
|
74
|
-
return {
|
|
75
|
-
horizontal: 'center',
|
|
76
|
-
vertical: -POINTER_WIDTH
|
|
77
|
-
};
|
|
78
70
|
case FeatureCalloutPosition.TopRight:
|
|
79
|
-
return {
|
|
80
|
-
horizontal: 'center',
|
|
81
|
-
vertical: -POINTER_WIDTH
|
|
82
|
-
};
|
|
83
71
|
case FeatureCalloutPosition.TopCenter:
|
|
84
72
|
return {
|
|
85
73
|
horizontal: 'center',
|
|
86
74
|
vertical: -POINTER_WIDTH
|
|
87
75
|
};
|
|
88
76
|
case FeatureCalloutPosition.BottomLeft:
|
|
89
|
-
return {
|
|
90
|
-
horizontal: 'center',
|
|
91
|
-
vertical: 'bottom'
|
|
92
|
-
};
|
|
93
77
|
case FeatureCalloutPosition.BottomRight:
|
|
94
|
-
return {
|
|
95
|
-
horizontal: 'center',
|
|
96
|
-
vertical: 'bottom'
|
|
97
|
-
};
|
|
98
78
|
case FeatureCalloutPosition.BottomCenter:
|
|
99
79
|
return {
|
|
100
80
|
horizontal: 'center',
|
|
101
81
|
vertical: 'bottom'
|
|
102
82
|
};
|
|
103
83
|
case FeatureCalloutPosition.LeftTop:
|
|
104
|
-
return {
|
|
105
|
-
horizontal: 'left',
|
|
106
|
-
vertical: 'center'
|
|
107
|
-
};
|
|
108
84
|
case FeatureCalloutPosition.LeftBottom:
|
|
109
|
-
return {
|
|
110
|
-
horizontal: 'left',
|
|
111
|
-
vertical: 'center'
|
|
112
|
-
};
|
|
113
85
|
case FeatureCalloutPosition.LeftCenter:
|
|
114
86
|
return {
|
|
115
87
|
horizontal: 'left',
|
|
116
88
|
vertical: 'center'
|
|
117
89
|
};
|
|
118
90
|
case FeatureCalloutPosition.RightTop:
|
|
119
|
-
return {
|
|
120
|
-
horizontal: 'right',
|
|
121
|
-
vertical: 'center'
|
|
122
|
-
};
|
|
123
91
|
case FeatureCalloutPosition.RightBottom:
|
|
124
|
-
return {
|
|
125
|
-
horizontal: 'right',
|
|
126
|
-
vertical: 'center'
|
|
127
|
-
};
|
|
128
92
|
case FeatureCalloutPosition.RightCenter:
|
|
129
93
|
return {
|
|
130
94
|
horizontal: 'right',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureCallout/utils.js","sources":["../../src/FeatureCallout/utils.ts"],"sourcesContent":["import type { Origin } from '../Popover/index.js';\nimport { POINTER_HEIGHT, FeatureCalloutPosition, POINTER_WIDTH } from './constants.js';\n\nexport const getTransformOrigin = (position: FeatureCalloutPosition): Origin => {\n switch (position) {\n case FeatureCalloutPosition.TopLeft:\n return {\n horizontal: 'left',\n vertical: 'bottom',\n };\n case FeatureCalloutPosition.TopCenter:\n return {\n horizontal: 'center',\n vertical: 'bottom',\n };\n case FeatureCalloutPosition.TopRight:\n return {\n horizontal: 'right',\n vertical: 'bottom',\n };\n case FeatureCalloutPosition.BottomLeft:\n return {\n horizontal: 'left',\n vertical: -POINTER_HEIGHT,\n };\n case FeatureCalloutPosition.BottomRight:\n return {\n horizontal: 'right',\n vertical: -POINTER_HEIGHT,\n };\n case FeatureCalloutPosition.BottomCenter:\n return {\n horizontal: 'center',\n vertical: -POINTER_HEIGHT,\n };\n case FeatureCalloutPosition.LeftTop:\n return {\n horizontal: 'right',\n vertical: 'top',\n };\n case FeatureCalloutPosition.
|
|
1
|
+
{"version":3,"file":"FeatureCallout/utils.js","sources":["../../src/FeatureCallout/utils.ts"],"sourcesContent":["import type { Origin } from '../Popover/index.js';\nimport { POINTER_HEIGHT, FeatureCalloutPosition, POINTER_WIDTH } from './constants.js';\n\nexport const getTransformOrigin = (position: FeatureCalloutPosition): Origin => {\n switch (position) {\n case FeatureCalloutPosition.TopLeft:\n return {\n horizontal: 'left',\n vertical: 'bottom',\n };\n case FeatureCalloutPosition.TopCenter:\n return {\n horizontal: 'center',\n vertical: 'bottom',\n };\n case FeatureCalloutPosition.TopRight:\n case FeatureCalloutPosition.LeftBottom:\n return {\n horizontal: 'right',\n vertical: 'bottom',\n };\n case FeatureCalloutPosition.BottomLeft:\n return {\n horizontal: 'left',\n vertical: -POINTER_HEIGHT,\n };\n case FeatureCalloutPosition.BottomRight:\n return {\n horizontal: 'right',\n vertical: -POINTER_HEIGHT,\n };\n case FeatureCalloutPosition.BottomCenter:\n return {\n horizontal: 'center',\n vertical: -POINTER_HEIGHT,\n };\n case FeatureCalloutPosition.LeftTop:\n return {\n horizontal: 'right',\n vertical: 'top',\n };\n case FeatureCalloutPosition.LeftCenter:\n return {\n horizontal: 'right',\n vertical: 'center',\n };\n case FeatureCalloutPosition.RightTop:\n return {\n horizontal: -POINTER_HEIGHT,\n vertical: 'top',\n };\n case FeatureCalloutPosition.RightBottom:\n return {\n horizontal: -POINTER_HEIGHT,\n vertical: 'bottom',\n };\n case FeatureCalloutPosition.RightCenter:\n return {\n horizontal: -POINTER_HEIGHT,\n vertical: 'center',\n };\n default:\n return {\n horizontal: 0,\n vertical: 0,\n };\n }\n};\n\nexport const getAnchorOrigin = (position: FeatureCalloutPosition): Origin => {\n switch (position) {\n case FeatureCalloutPosition.TopLeft:\n case FeatureCalloutPosition.TopRight:\n case FeatureCalloutPosition.TopCenter:\n return {\n horizontal: 'center',\n vertical: -POINTER_WIDTH,\n };\n case FeatureCalloutPosition.BottomLeft:\n case FeatureCalloutPosition.BottomRight:\n case FeatureCalloutPosition.BottomCenter:\n return {\n horizontal: 'center',\n vertical: 'bottom',\n };\n case FeatureCalloutPosition.LeftTop:\n case FeatureCalloutPosition.LeftBottom:\n case FeatureCalloutPosition.LeftCenter:\n return {\n horizontal: 'left',\n vertical: 'center',\n };\n case FeatureCalloutPosition.RightTop:\n case FeatureCalloutPosition.RightBottom:\n case FeatureCalloutPosition.RightCenter:\n return {\n horizontal: 'right',\n vertical: 'center',\n };\n default:\n return {\n horizontal: 0,\n vertical: 0,\n };\n }\n};\n"],"names":["getTransformOrigin","position","FeatureCalloutPosition","POINTER_HEIGHT","getAnchorOrigin","POINTER_WIDTH"],"mappings":";AAGO,MAAMA,qBAAqB,CAACC;IACjC,OAAQA;QACN,KAAKC,uBAAuB,OAAO;YACjC,OAAO;gB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AO;gBACL,YAAY;gBACZ,UAAU;YACZ;QACF,KAAKA,uBAAuB,QAAQ;QACpC,KAAKA,uBAAuB,WAAW;QACvC,KAAKA,uBAAuB,WAAW;YACrC,OAAO;gBACL,YAAY;gBACZ,UAAU;YACZ;QACF;YACE,OAAO;gBACL,YAAY;gBACZ,UAAU;YACZ;IACJ;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/FieldHint/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/FieldHint/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,KAAK,IAAI,cAAc,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/FieldHint/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterButton/FilterButton.js","sources":["../../src/FilterButton/FilterButton.tsx"],"sourcesContent":["import {\n forwardRef,\n ForwardedRef,\n memo,\n ReactNode,\n ButtonHTMLAttributes,\n ComponentType,\n MouseEvent,\n useCallback,\n useRef,\n useState,\n} from 'react';\nimport classnames from 'clsx';\nimport { filterButton, filterButtonLabel } from '@finam/web-ui-kit-core/styles/filterButton';\nimport ChevronDownSmall from '@finam/web-ui-kit-icons/Chevron/ChevronDownSmall';\nimport PlusCircle from '@finam/web-ui-kit-icons/Plus/PlusCircle';\nimport PlusCircleFilled from '@finam/web-ui-kit-icons/Plus/PlusCircleFilled';\nimport DismissCircleSmall from '@finam/web-ui-kit-icons/Dismiss/DismissCircleSmall';\nimport DismissCircleSmallFilled from '@finam/web-ui-kit-icons/Dismiss/DismissCircleSmallFilled';\nimport Popover, { Origin, PopoverProps } from '../Popover/index.js';\nimport { useForkRef } from '../utils/withForwardedRef.js';\nimport { useModalState } from '../ModalsProvider/index.js';\nimport type { Size, Color, LabelPlacement, FixedForwardRef, FixedMemo } from './types.js';\n\nexport const classNames = filterButton.classNames.variants;\n\ntype PartialProp<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;\n\nexport interface Props<T extends PopoverProps> extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** Состояние активированности кнопки */\n activated?: boolean;\n /** Размер кнопки */\n size?: Size;\n /** Вариант основного цвета кнопки */\n color?: Color;\n /** Текст на кнопке */\n label?: ReactNode;\n /** Положение текста по отношению к иконке */\n labelPlacement?: LabelPlacement;\n /** иконка на кнопке */\n iconAdd?: ReactNode;\n /** Испольльзовать ли иконку с заливкой */\n iconFilled?: boolean;\n /** Обработчик клика по иконке очистки состояния */\n onClear?: VoidFunction;\n /** Свойства компонента отображающего всплывающую панель */\n PopoverProps?: PartialProp<T, 'children' | 'open'>;\n /**\n * Компонент всплывающей панели\n * @default Popover\n * */\n PopoverComponent?: ComponentType<T>;\n /** Верстка внутри всплывающей панели */\n children: ReactNode;\n}\n\nconst fixedForwardRef = forwardRef as FixedForwardRef;\nconst fixedMemo = memo as FixedMemo;\n\nconst anchorOrigin: Origin = { vertical: 'bottom', horizontal: 'left' };\nconst transformOrigin: Origin = { vertical: -8, horizontal: 'left' };\n\nfunction FilterButtonImpl<T extends PopoverProps>({\n activated = false,\n size = 'm',\n color = 'primary',\n label,\n labelPlacement = 'left',\n iconAdd,\n iconFilled = false,\n onClear,\n PopoverComponent = Popover,\n PopoverProps: popoverProps = {} as T,\n className,\n onClick,\n children,\n ...buttonProps\n}: Props<T>, ref: ForwardedRef<HTMLButtonElement>) {\n const { disabled } = buttonProps;\n\n const buttonRef = useRef<HTMLButtonElement | null>(null);\n const handleRef = useForkRef(ref, buttonRef);\n\n const { open: initialOpen } = useModalState(popoverProps.id);\n const [open, setOpen] = useState(initialOpen ?? false);\n const popoverOnClose = popoverProps?.onClose;\n\n if (popoverProps?.open != null && popoverProps.open !== open) {\n setOpen(popoverProps.open);\n }\n\n const buttonClassName = classnames(\n filterButton({\n size,\n color,\n state: disabled\n ? 'disabled'\n : activated ? 'activated' : 'default',\n iconOnly: !label,\n }),\n className,\n );\n\n const handleClickButton = useCallback((event: MouseEvent<HTMLButtonElement>) => {\n setOpen(true);\n onClick?.(event);\n }, [onClick]);\n\n const handleClickIconClear = useCallback((event: MouseEvent<SVGElement>) => {\n event.stopPropagation();\n onClear
|
|
1
|
+
{"version":3,"file":"FilterButton/FilterButton.js","sources":["../../src/FilterButton/FilterButton.tsx"],"sourcesContent":["import {\n forwardRef,\n ForwardedRef,\n memo,\n ReactNode,\n ButtonHTMLAttributes,\n ComponentType,\n MouseEvent,\n useCallback,\n useRef,\n useState,\n} from 'react';\nimport classnames from 'clsx';\nimport { filterButton, filterButtonLabel } from '@finam/web-ui-kit-core/styles/filterButton';\nimport ChevronDownSmall from '@finam/web-ui-kit-icons/Chevron/ChevronDownSmall';\nimport PlusCircle from '@finam/web-ui-kit-icons/Plus/PlusCircle';\nimport PlusCircleFilled from '@finam/web-ui-kit-icons/Plus/PlusCircleFilled';\nimport DismissCircleSmall from '@finam/web-ui-kit-icons/Dismiss/DismissCircleSmall';\nimport DismissCircleSmallFilled from '@finam/web-ui-kit-icons/Dismiss/DismissCircleSmallFilled';\nimport Popover, { Origin, PopoverProps } from '../Popover/index.js';\nimport { useForkRef } from '../utils/withForwardedRef.js';\nimport { useModalState } from '../ModalsProvider/index.js';\nimport type { Size, Color, LabelPlacement, FixedForwardRef, FixedMemo } from './types.js';\n\nexport const classNames = filterButton.classNames.variants;\n\ntype PartialProp<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;\n\nexport interface Props<T extends PopoverProps> extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** Состояние активированности кнопки */\n activated?: boolean;\n /** Размер кнопки */\n size?: Size;\n /** Вариант основного цвета кнопки */\n color?: Color;\n /** Текст на кнопке */\n label?: ReactNode;\n /** Положение текста по отношению к иконке */\n labelPlacement?: LabelPlacement;\n /** иконка на кнопке */\n iconAdd?: ReactNode;\n /** Испольльзовать ли иконку с заливкой */\n iconFilled?: boolean;\n /** Обработчик клика по иконке очистки состояния */\n onClear?: VoidFunction;\n /** Свойства компонента отображающего всплывающую панель */\n PopoverProps?: PartialProp<T, 'children' | 'open'>;\n /**\n * Компонент всплывающей панели\n * @default Popover\n * */\n PopoverComponent?: ComponentType<T>;\n /** Верстка внутри всплывающей панели */\n children: ReactNode;\n}\n\nconst fixedForwardRef = forwardRef as FixedForwardRef;\nconst fixedMemo = memo as FixedMemo;\n\nconst anchorOrigin: Origin = { vertical: 'bottom', horizontal: 'left' };\nconst transformOrigin: Origin = { vertical: -8, horizontal: 'left' };\n\nfunction FilterButtonImpl<T extends PopoverProps>({\n activated = false,\n size = 'm',\n color = 'primary',\n label,\n labelPlacement = 'left',\n iconAdd,\n iconFilled = false,\n onClear,\n PopoverComponent = Popover,\n PopoverProps: popoverProps = {} as T,\n className,\n onClick,\n children,\n ...buttonProps\n}: Props<T>, ref: ForwardedRef<HTMLButtonElement>) {\n const { disabled } = buttonProps;\n\n const buttonRef = useRef<HTMLButtonElement | null>(null);\n const handleRef = useForkRef(ref, buttonRef);\n\n const { open: initialOpen } = useModalState(popoverProps.id);\n const [open, setOpen] = useState(initialOpen ?? false);\n const popoverOnClose = popoverProps?.onClose;\n\n if (popoverProps?.open != null && popoverProps.open !== open) {\n setOpen(popoverProps.open);\n }\n\n const buttonClassName = classnames(\n filterButton({\n size,\n color,\n state: disabled\n ? 'disabled'\n : activated ? 'activated' : 'default',\n iconOnly: !label,\n }),\n className,\n );\n\n const handleClickButton = useCallback((event: MouseEvent<HTMLButtonElement>) => {\n setOpen(true);\n onClick?.(event);\n }, [onClick]);\n\n const handleClickIconClear = useCallback((event: MouseEvent<SVGElement>) => {\n event.stopPropagation();\n onClear?.();\n }, [onClear]);\n\n const handleClosePopover = useCallback(() => {\n setOpen(false);\n popoverOnClose?.();\n }, [popoverOnClose]);\n\n const IconClear = iconFilled ? DismissCircleSmallFilled : DismissCircleSmall;\n const IconAdd = iconFilled ? PlusCircleFilled : PlusCircle;\n\n return (\n <>\n <button\n type=\"button\"\n {...buttonProps}\n className={buttonClassName}\n ref={handleRef}\n onClick={handleClickButton}\n >\n {(labelPlacement === 'right' || !label) && (\n activated ? <IconClear onClick={handleClickIconClear} /> : iconAdd ?? <IconAdd />\n )}\n {!!label && (\n <span className={filterButtonLabel}>{label}</span>\n )}\n {labelPlacement === 'left' && !!label && (\n activated ? <IconClear onClick={handleClickIconClear} /> : <ChevronDownSmall />\n )}\n </button>\n {\n /* тайпскрипт ругается, что T может быть неподоходящим для ComponentType<T>\n * подтипом PopoverProps, но дженерик это исключает\n */\n }\n {/* @ts-expect-error */}\n <PopoverComponent\n anchorOrigin={anchorOrigin}\n transformOrigin={transformOrigin}\n {...popoverProps}\n anchorEl={buttonRef.current || undefined}\n open={popoverProps?.open ?? open}\n onClose={handleClosePopover}\n >\n {children}\n </PopoverComponent>\n </>\n );\n}\n\nconst FilterButton = fixedForwardRef(FilterButtonImpl);\nexport default fixedMemo(FilterButton);\n"],"names":["classNames","filterButton","fixedForwardRef","forwardRef","fixedMemo","memo","anchorOrigin","transformOrigin","FilterButtonImpl","ref","activated","size","color","label","labelPlacement","iconAdd","iconFilled","onClear","PopoverComponent","Popover","popoverProps","className","onClick","children","buttonProps","disabled","buttonRef","useRef","handleRef","useForkRef","initialOpen","useModalState","open","setOpen","useState","popoverOnClose","buttonClassName","classnames","handleClickButton","useCallback","event","handleClickIconClear","handleClosePopover","IconClear","DismissCircleSmallFilled","DismissCircleSmall","IconAdd","PlusCircleFilled","PlusCircle","filterButtonLabel","ChevronDownSmall","undefined","FilterButton"],"mappings":";;;;;;;;;;;;;;;AAwBO,MAAMA,aAAaC,aAAa,UAAU,CAAC,QAAQ;AAgC1D,MAAMC,kBAAkBC;AACxB,MAAMC,YAAYC;AAElB,MAAMC,eAAuB;IAAE,UAAU;IAAU,YAAY;AAAO;AACtE,MAAMC,kBAA0B;IAAE,UAAU;IAAI,YAAY;AAAO;AAEnE,SAASC,iBAAyC,EAevC,E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,UAAU9B,aAAa+B,mBAAmBC;IAEhD,OAAO,WAAP,GACE;;0BACE,KAAC;gBACC,MAAK;eACDxB,cAAAA;gBACJ,WAAWY;gBACX,KAAKR;gBACL,SAASU;;oBAEPxB,CAAAA,AAAmB,YAAnBA,kBAA8B,CAACD,KAAI,KACnCH,CAAAA,YAAY,WAAZA,GAAY,IAACiC,WAAAA;wBAAU,SAASF;yBAA2B1B,QAAAA,UAAAA,UAAAA,WAAAA,GAAW,IAAC+B,SAAAA,CAAAA,EAAAA;oBAExE,CAAC,CAACjC,SAAS,WAATA,GACD,IAAC;wBAAK,WAAWoC;kCAAoBpC;;oBAEnB,WAAnBC,kBAA6B,CAAC,CAACD,SAC9BH,CAAAA,YAAY,WAAZA,GAAY,IAACiC,WAAAA;wBAAU,SAASF;uCAA2B,IAACS,kBAAgBA,CAAAA,EAAAA;;;0BAShF,IAAChC,kBAAAA,uBAAAA,EAAAA;gBACC,cAAcZ;gBACd,iBAAiBC;eACba,eAAAA;gBACJ,UAAUM,UAAU,OAAO,IAAIyB;gBAC/B,MAAI,iBAAE/B,QAAAA,eAAAA,KAAAA,IAAAA,aAAc,IAAI,AAAD,IAAC,QAAIY;gBAC5B,SAASU;0BAERnB;;;;AAIT;AAEA,MAAM6B,eAAelD,gBAAgBM;AACrC,kCAAeJ,UAAUgD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/FormGroup/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/FormGroup/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,KAAK,IAAI,cAAc,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/FormGroup/index.js
CHANGED
package/dist/Loader/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Loader/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Loader/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,KAAK,IAAI,WAAW,EAAE,KAAK,KAAK,IAAI,WAAW,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/Loader/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/LoaderBackdrop/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/LoaderBackdrop/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,KAAK,IAAI,mBAAmB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/LoaderDots/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/LoaderDots/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,KAAK,IAAI,WAAW,EAAE,MAAM,iBAAiB,CAAC"}
|
package/dist/LoaderDots/index.js
CHANGED
|
@@ -17,8 +17,8 @@ export declare const useMarketingAnimations: (marketingType?: Variant) => {
|
|
|
17
17
|
};
|
|
18
18
|
isHovered: boolean;
|
|
19
19
|
isActive: boolean;
|
|
20
|
-
hasHoverBgAnimation: boolean
|
|
21
|
-
hasHoverGlowAnimation: boolean
|
|
20
|
+
hasHoverBgAnimation: boolean;
|
|
21
|
+
hasHoverGlowAnimation: boolean;
|
|
22
22
|
highlightX: number;
|
|
23
23
|
};
|
|
24
24
|
//# sourceMappingURL=useMarketingAnimations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMarketingAnimations.d.ts","sourceRoot":"","sources":["../../src/MarketingButton/useMarketingAnimations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,UAAU,EAAe,MAAM,OAAO,CAAC;AAClE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"useMarketingAnimations.d.ts","sourceRoot":"","sources":["../../src/MarketingButton/useMarketingAnimations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,UAAU,EAAe,MAAM,OAAO,CAAC;AAClE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAsF1C,eAAO,MAAM,sBAAsB,GAAI,gBAAgB,OAAO;;yBAmBpB,UAAU,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;0BA0BhD,KAAK,CAAC,UAAU,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;0BA2BvD,KAAK,CAAC,UAAU,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;yBA0BxD,UAAU,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;uBA0BnD,UAAU,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;;;;;;;;;;;;;;CAmDxF,CAAC"}
|