funda-ui 4.7.615 → 4.7.624
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/.gitattributes +2 -0
- package/README.md +116 -2
- package/README_PUBLISH.md +328 -0
- package/lib/cjs/Date/index.js +39 -2
- package/lib/cjs/DynamicFields/index.js +11 -3
- package/lib/esm/Date/index.tsx +47 -2
- package/lib/esm/DynamicFields/index.tsx +9 -4
- package/logo.png +0 -0
- package/package.json +589 -43
- package/preview.png +0 -0
- package/{Date → publish/Date}/index.js +39 -2
- package/{DynamicFields → publish/DynamicFields}/index.js +11 -3
- package/publish/LICENSE +21 -0
- package/publish/README.md +328 -0
- package/publish/lib/cjs/Accordion/index.d.ts +2 -0
- package/publish/lib/cjs/Accordion/index.js +667 -0
- package/publish/lib/cjs/BackToTop/index.d.ts +17 -0
- package/publish/lib/cjs/BackToTop/index.js +904 -0
- package/publish/lib/cjs/CascadingSelect/index.d.ts +80 -0
- package/publish/lib/cjs/CascadingSelect/index.js +3383 -0
- package/publish/lib/cjs/CascadingSelectE2E/index.d.ts +91 -0
- package/publish/lib/cjs/CascadingSelectE2E/index.js +3988 -0
- package/publish/lib/cjs/Chatbox/index.d.ts +101 -0
- package/publish/lib/cjs/Chatbox/index.js +7037 -0
- package/publish/lib/cjs/Checkbox/index.d.ts +28 -0
- package/publish/lib/cjs/Checkbox/index.js +673 -0
- package/publish/lib/cjs/ColorPicker/index.d.ts +27 -0
- package/publish/lib/cjs/ColorPicker/index.js +662 -0
- package/publish/lib/cjs/Date/index.d.ts +70 -0
- package/publish/lib/cjs/Date/index.js +6368 -0
- package/publish/lib/cjs/DigitalClock/index.d.ts +7 -0
- package/publish/lib/cjs/DigitalClock/index.js +402 -0
- package/publish/lib/cjs/DragDropList/index.d.ts +45 -0
- package/publish/lib/cjs/DragDropList/index.js +1586 -0
- package/publish/lib/cjs/DropdownMenu/index.d.ts +38 -0
- package/publish/lib/cjs/DropdownMenu/index.js +1507 -0
- package/publish/lib/cjs/DynamicFields/index.d.ts +40 -0
- package/publish/lib/cjs/DynamicFields/index.js +818 -0
- package/publish/lib/cjs/EventCalendar/index.d.ts +61 -0
- package/publish/lib/cjs/EventCalendar/index.js +3789 -0
- package/publish/lib/cjs/EventCalendarTimeline/index.d.ts +100 -0
- package/publish/lib/cjs/EventCalendarTimeline/index.js +6141 -0
- package/publish/lib/cjs/File/index.d.ts +40 -0
- package/publish/lib/cjs/File/index.js +1751 -0
- package/publish/lib/cjs/HorizontalScrollContent/index.d.ts +14 -0
- package/publish/lib/cjs/HorizontalScrollContent/index.js +426 -0
- package/publish/lib/cjs/Input/index.d.ts +59 -0
- package/publish/lib/cjs/Input/index.js +1486 -0
- package/publish/lib/cjs/LiveSearch/index.d.ts +70 -0
- package/publish/lib/cjs/LiveSearch/index.js +4180 -0
- package/publish/lib/cjs/MasonryLayout/index.d.ts +14 -0
- package/publish/lib/cjs/MasonryLayout/index.js +689 -0
- package/publish/lib/cjs/ModalDialog/index.d.ts +83 -0
- package/publish/lib/cjs/ModalDialog/index.js +1719 -0
- package/publish/lib/cjs/ModeSwitch/index.d.ts +17 -0
- package/publish/lib/cjs/ModeSwitch/index.js +202 -0
- package/publish/lib/cjs/MultilevelDropdownMenu/index.d.ts +20 -0
- package/publish/lib/cjs/MultilevelDropdownMenu/index.js +930 -0
- package/publish/lib/cjs/MultipleCheckboxes/index.d.ts +66 -0
- package/publish/lib/cjs/MultipleCheckboxes/index.js +2337 -0
- package/publish/lib/cjs/MultipleSelect/index.d.ts +65 -0
- package/publish/lib/cjs/MultipleSelect/index.js +4197 -0
- package/publish/lib/cjs/NativeSelect/index.d.ts +37 -0
- package/publish/lib/cjs/NativeSelect/index.js +2052 -0
- package/publish/lib/cjs/NumberInput/index.d.ts +40 -0
- package/publish/lib/cjs/NumberInput/index.js +1191 -0
- package/publish/lib/cjs/Pagination/index.d.ts +51 -0
- package/publish/lib/cjs/Pagination/index.js +612 -0
- package/publish/lib/cjs/Radio/index.d.ts +45 -0
- package/publish/lib/cjs/Radio/index.js +1838 -0
- package/publish/lib/cjs/RangeSlider/index.d.ts +22 -0
- package/publish/lib/cjs/RangeSlider/index.js +2696 -0
- package/publish/lib/cjs/Refresher/index.d.ts +22 -0
- package/publish/lib/cjs/Refresher/index.js +564 -0
- package/publish/lib/cjs/RootPortal/index.d.ts +9 -0
- package/publish/lib/cjs/RootPortal/index.js +148 -0
- package/publish/lib/cjs/ScrollReveal/index.d.ts +21 -0
- package/publish/lib/cjs/ScrollReveal/index.js +401 -0
- package/publish/lib/cjs/Scrollbar/index.d.ts +17 -0
- package/publish/lib/cjs/Scrollbar/index.js +1107 -0
- package/publish/lib/cjs/SearchBar/index.d.ts +41 -0
- package/publish/lib/cjs/SearchBar/index.js +701 -0
- package/publish/lib/cjs/Select/index.d.ts +107 -0
- package/publish/lib/cjs/Select/index.js +6540 -0
- package/publish/lib/cjs/ShowMoreLess/index.d.ts +36 -0
- package/publish/lib/cjs/ShowMoreLess/index.js +387 -0
- package/publish/lib/cjs/SplitterPanel/index.d.ts +20 -0
- package/publish/lib/cjs/SplitterPanel/index.js +800 -0
- package/publish/lib/cjs/Stepper/index.d.ts +26 -0
- package/publish/lib/cjs/Stepper/index.js +568 -0
- package/publish/lib/cjs/Switch/index.d.ts +25 -0
- package/publish/lib/cjs/Switch/index.js +630 -0
- package/publish/lib/cjs/Table/index.d.ts +12 -0
- package/publish/lib/cjs/Table/index.js +2311 -0
- package/publish/lib/cjs/Tabs/index.d.ts +3 -0
- package/publish/lib/cjs/Tabs/index.js +771 -0
- package/publish/lib/cjs/TagInput/index.d.ts +37 -0
- package/publish/lib/cjs/TagInput/index.js +1227 -0
- package/publish/lib/cjs/Textarea/index.d.ts +50 -0
- package/publish/lib/cjs/Textarea/index.js +1795 -0
- package/publish/lib/cjs/Toast/index.d.ts +3 -0
- package/publish/lib/cjs/Toast/index.js +1345 -0
- package/publish/lib/cjs/Tooltip/index.d.ts +38 -0
- package/publish/lib/cjs/Tooltip/index.js +1778 -0
- package/publish/lib/cjs/Tree/index.d.ts +78 -0
- package/publish/lib/cjs/Tree/index.js +2330 -0
- package/publish/lib/cjs/Utils/anim.d.ts +11 -0
- package/publish/lib/cjs/Utils/anim.js +846 -0
- package/publish/lib/cjs/Utils/bodyScrollLock.d.ts +8 -0
- package/publish/lib/cjs/Utils/bodyScrollLock.js +311 -0
- package/publish/lib/cjs/Utils/buffer.d.ts +67 -0
- package/publish/lib/cjs/Utils/buffer.js +343 -0
- package/publish/lib/cjs/Utils/cls.d.ts +15 -0
- package/publish/lib/cjs/Utils/cls.js +124 -0
- package/publish/lib/cjs/Utils/convert.d.ts +25 -0
- package/publish/lib/cjs/Utils/convert.js +109 -0
- package/publish/lib/cjs/Utils/date.d.ts +227 -0
- package/publish/lib/cjs/Utils/date.js +587 -0
- package/publish/lib/cjs/Utils/dom.d.ts +13 -0
- package/publish/lib/cjs/Utils/dom.js +215 -0
- package/publish/lib/cjs/Utils/easing.d.ts +29 -0
- package/publish/lib/cjs/Utils/easing.js +221 -0
- package/publish/lib/cjs/Utils/extract.d.ts +66 -0
- package/publish/lib/cjs/Utils/extract.js +195 -0
- package/publish/lib/cjs/Utils/format-string.d.ts +65 -0
- package/publish/lib/cjs/Utils/format-string.js +167 -0
- package/publish/lib/cjs/Utils/formdata.d.ts +13 -0
- package/publish/lib/cjs/Utils/formdata.js +131 -0
- package/publish/lib/cjs/Utils/getElementProperty.d.ts +52 -0
- package/publish/lib/cjs/Utils/getElementProperty.js +189 -0
- package/publish/lib/cjs/Utils/guid.d.ts +7 -0
- package/publish/lib/cjs/Utils/guid.js +67 -0
- package/publish/lib/cjs/Utils/initDefaultOptions.d.ts +10 -0
- package/publish/lib/cjs/Utils/initDefaultOptions.js +607 -0
- package/publish/lib/cjs/Utils/inputsCalculation.d.ts +28 -0
- package/publish/lib/cjs/Utils/inputsCalculation.js +188 -0
- package/publish/lib/cjs/Utils/math.d.ts +77 -0
- package/publish/lib/cjs/Utils/math.js +305 -0
- package/publish/lib/cjs/Utils/object.d.ts +18 -0
- package/publish/lib/cjs/Utils/object.js +120 -0
- package/publish/lib/cjs/Utils/os.d.ts +2 -0
- package/publish/lib/cjs/Utils/os.js +104 -0
- package/publish/lib/cjs/Utils/performance.d.ts +3 -0
- package/publish/lib/cjs/Utils/performance.js +94 -0
- package/publish/lib/cjs/Utils/sanitize.d.ts +14 -0
- package/publish/lib/cjs/Utils/sanitize.js +87 -0
- package/publish/lib/cjs/Utils/time.d.ts +40 -0
- package/publish/lib/cjs/Utils/time.js +177 -0
- package/publish/lib/cjs/Utils/tree.d.ts +40 -0
- package/publish/lib/cjs/Utils/tree.js +195 -0
- package/publish/lib/cjs/Utils/useAutosizeTextArea.d.ts +10 -0
- package/publish/lib/cjs/Utils/useAutosizeTextArea.js +231 -0
- package/publish/lib/cjs/Utils/useBoundedDrag.d.ts +125 -0
- package/publish/lib/cjs/Utils/useBoundedDrag.js +380 -0
- package/publish/lib/cjs/Utils/useClickOutside.d.ts +33 -0
- package/publish/lib/cjs/Utils/useClickOutside.js +166 -0
- package/publish/lib/cjs/Utils/useComId.d.ts +6 -0
- package/publish/lib/cjs/Utils/useComId.js +114 -0
- package/publish/lib/cjs/Utils/useDebounce.d.ts +20 -0
- package/publish/lib/cjs/Utils/useDebounce.js +138 -0
- package/publish/lib/cjs/Utils/useDragDropPosition.d.ts +166 -0
- package/publish/lib/cjs/Utils/useDragDropPosition.js +453 -0
- package/publish/lib/cjs/Utils/useDraggable.d.ts +62 -0
- package/publish/lib/cjs/Utils/useDraggable.js +348 -0
- package/publish/lib/cjs/Utils/useHistoryTracker.d.ts +166 -0
- package/publish/lib/cjs/Utils/useHistoryTracker.js +649 -0
- package/publish/lib/cjs/Utils/useInterval.d.ts +5 -0
- package/publish/lib/cjs/Utils/useInterval.js +168 -0
- package/publish/lib/cjs/Utils/useIsMobile.d.ts +2 -0
- package/publish/lib/cjs/Utils/useIsMobile.js +232 -0
- package/publish/lib/cjs/Utils/useKeyPress.d.ts +44 -0
- package/publish/lib/cjs/Utils/useKeyPress.js +200 -0
- package/publish/lib/cjs/Utils/useSessionStorageListener.d.ts +2 -0
- package/publish/lib/cjs/Utils/useSessionStorageListener.js +157 -0
- package/publish/lib/cjs/Utils/useStreamController.d.ts +71 -0
- package/publish/lib/cjs/Utils/useStreamController.js +494 -0
- package/publish/lib/cjs/Utils/useThrottle.d.ts +2 -0
- package/publish/lib/cjs/Utils/useThrottle.js +136 -0
- package/publish/lib/cjs/Utils/useWindowScroll.d.ts +12 -0
- package/publish/lib/cjs/Utils/useWindowScroll.js +217 -0
- package/publish/lib/cjs/Utils/validate.d.ts +53 -0
- package/publish/lib/cjs/Utils/validate.js +536 -0
- package/publish/lib/cjs/Utils/viewport.d.ts +7 -0
- package/publish/lib/cjs/Utils/viewport.js +64 -0
- package/publish/lib/cjs/index.d.ts +49 -0
- package/publish/lib/cjs/index.js +50 -0
- package/publish/lib/css/BackToTop/index.css +34 -0
- package/publish/lib/css/CascadingSelect/index.css +245 -0
- package/publish/lib/css/CascadingSelectE2E/index.css +245 -0
- package/publish/lib/css/Chatbox/index.css +774 -0
- package/publish/lib/css/ColorPicker/index.css +58 -0
- package/publish/lib/css/Date/index.css +434 -0
- package/publish/lib/css/DragDropList/index.css +188 -0
- package/publish/lib/css/DropdownMenu/index.css +151 -0
- package/publish/lib/css/EventCalendar/index.css +300 -0
- package/publish/lib/css/EventCalendarTimeline/index.css +694 -0
- package/publish/lib/css/HorizontalScrollContent/index.css +70 -0
- package/publish/lib/css/LiveSearch/index.css +88 -0
- package/publish/lib/css/MultilevelDropdownMenu/index.css +38 -0
- package/publish/lib/css/MultipleSelect/index.css +313 -0
- package/publish/lib/css/RangeSlider/index.css +150 -0
- package/publish/lib/css/Scrollbar/index.css +176 -0
- package/publish/lib/css/Select/index.css +434 -0
- package/publish/lib/css/ShowMoreLess/index.css +23 -0
- package/publish/lib/css/SplitterPanel/index.css +63 -0
- package/publish/lib/css/Stepper/index.css +250 -0
- package/publish/lib/css/Table/index.css +584 -0
- package/publish/lib/css/TagInput/index.css +91 -0
- package/publish/lib/css/Toast/index.css +149 -0
- package/publish/lib/css/Tooltip/index.css +198 -0
- package/publish/lib/css/Tree/index.css +237 -0
- package/publish/lib/esm/Accordion/Accordion.tsx +185 -0
- package/publish/lib/esm/Accordion/AccordionItem.tsx +248 -0
- package/publish/lib/esm/Accordion/index.tsx +2 -0
- package/publish/lib/esm/BackToTop/index.scss +47 -0
- package/publish/lib/esm/BackToTop/index.tsx +177 -0
- package/publish/lib/esm/CascadingSelect/Group.tsx +83 -0
- package/publish/lib/esm/CascadingSelect/index.scss +330 -0
- package/publish/lib/esm/CascadingSelect/index.tsx +1397 -0
- package/publish/lib/esm/CascadingSelectE2E/Group.tsx +87 -0
- package/publish/lib/esm/CascadingSelectE2E/index.scss +333 -0
- package/publish/lib/esm/CascadingSelectE2E/index.tsx +1684 -0
- package/publish/lib/esm/Chatbox/PureLoader.tsx +47 -0
- package/publish/lib/esm/Chatbox/TypingEffect.tsx +56 -0
- package/publish/lib/esm/Chatbox/index.scss +966 -0
- package/publish/lib/esm/Chatbox/index.tsx +1742 -0
- package/publish/lib/esm/Chatbox/utils/func.ts +180 -0
- package/publish/lib/esm/Checkbox/index.tsx +206 -0
- package/publish/lib/esm/ColorPicker/index.scss +91 -0
- package/publish/lib/esm/ColorPicker/index.tsx +204 -0
- package/publish/lib/esm/Date/Calendar.tsx +723 -0
- package/publish/lib/esm/Date/index.scss +567 -0
- package/publish/lib/esm/Date/index.tsx +1797 -0
- package/publish/lib/esm/Date/localization/en_US.js +13 -0
- package/publish/lib/esm/Date/localization/zh_CN.js +12 -0
- package/publish/lib/esm/DigitalClock/index.tsx +74 -0
- package/publish/lib/esm/DragDropList/index.scss +245 -0
- package/publish/lib/esm/DragDropList/index.tsx +504 -0
- package/publish/lib/esm/DropdownMenu/Option.tsx +55 -0
- package/publish/lib/esm/DropdownMenu/index.scss +205 -0
- package/publish/lib/esm/DropdownMenu/index.tsx +378 -0
- package/publish/lib/esm/DynamicFields/index.tsx +409 -0
- package/publish/lib/esm/EventCalendar/index.scss +407 -0
- package/publish/lib/esm/EventCalendar/index.tsx +1005 -0
- package/publish/lib/esm/EventCalendarTimeline/index.scss +926 -0
- package/publish/lib/esm/EventCalendarTimeline/index.tsx +2686 -0
- package/publish/lib/esm/File/index.tsx +477 -0
- package/publish/lib/esm/HorizontalScrollContent/index.scss +87 -0
- package/publish/lib/esm/HorizontalScrollContent/index.tsx +171 -0
- package/publish/lib/esm/Input/index.tsx +641 -0
- package/publish/lib/esm/LiveSearch/index.scss +129 -0
- package/publish/lib/esm/LiveSearch/index.tsx +1058 -0
- package/publish/lib/esm/MasonryLayout/index.tsx +326 -0
- package/publish/lib/esm/ModalDialog/index.tsx +572 -0
- package/publish/lib/esm/ModeSwitch/index.tsx +82 -0
- package/publish/lib/esm/MultilevelDropdownMenu/ItemList.tsx +265 -0
- package/publish/lib/esm/MultilevelDropdownMenu/index.scss +79 -0
- package/publish/lib/esm/MultilevelDropdownMenu/index.tsx +77 -0
- package/publish/lib/esm/MultipleCheckboxes/index.tsx +849 -0
- package/publish/lib/esm/MultipleSelect/index.scss +398 -0
- package/publish/lib/esm/MultipleSelect/index.tsx +769 -0
- package/publish/lib/esm/MultipleSelect/utils/func.ts +63 -0
- package/publish/lib/esm/NativeSelect/index.tsx +396 -0
- package/publish/lib/esm/NativeSelect/utils/func.ts +51 -0
- package/publish/lib/esm/NumberInput/index.tsx +425 -0
- package/publish/lib/esm/Pagination/index.tsx +286 -0
- package/publish/lib/esm/Pagination/pagination-navigators.tsx +60 -0
- package/publish/lib/esm/Radio/index.tsx +694 -0
- package/publish/lib/esm/RangeSlider/index.scss +186 -0
- package/publish/lib/esm/RangeSlider/index.tsx +241 -0
- package/publish/lib/esm/Refresher/index.tsx +121 -0
- package/publish/lib/esm/RootPortal/index.tsx +59 -0
- package/publish/lib/esm/ScrollReveal/index.tsx +148 -0
- package/publish/lib/esm/Scrollbar/index.scss +221 -0
- package/publish/lib/esm/Scrollbar/index.tsx +561 -0
- package/publish/lib/esm/SearchBar/index.tsx +252 -0
- package/publish/lib/esm/Select/index.scss +639 -0
- package/publish/lib/esm/Select/index.tsx +3104 -0
- package/publish/lib/esm/Select/utils/func.ts +98 -0
- package/publish/lib/esm/ShowMoreLess/index.scss +27 -0
- package/publish/lib/esm/ShowMoreLess/index.tsx +145 -0
- package/publish/lib/esm/SplitterPanel/index.scss +82 -0
- package/publish/lib/esm/SplitterPanel/index.tsx +174 -0
- package/publish/lib/esm/Stepper/index.scss +315 -0
- package/publish/lib/esm/Stepper/index.tsx +325 -0
- package/publish/lib/esm/Switch/index.tsx +149 -0
- package/publish/lib/esm/Table/Table.tsx +351 -0
- package/publish/lib/esm/Table/TableBody.tsx +41 -0
- package/publish/lib/esm/Table/TableCaption.tsx +34 -0
- package/publish/lib/esm/Table/TableCell.tsx +126 -0
- package/publish/lib/esm/Table/TableColgroup.tsx +38 -0
- package/publish/lib/esm/Table/TableContext.tsx +26 -0
- package/publish/lib/esm/Table/TableFoot.tsx +28 -0
- package/publish/lib/esm/Table/TableHead.tsx +28 -0
- package/publish/lib/esm/Table/TableRow.tsx +76 -0
- package/publish/lib/esm/Table/index.scss +418 -0
- package/publish/lib/esm/Table/index.tsx +14 -0
- package/publish/lib/esm/Table/utils/DragHandleSprite.tsx +46 -0
- package/publish/lib/esm/Table/utils/SortSprite.tsx +63 -0
- package/publish/lib/esm/Table/utils/TableFilter.tsx +56 -0
- package/publish/lib/esm/Table/utils/ToggleSelection.tsx +255 -0
- package/publish/lib/esm/Table/utils/func.ts +182 -0
- package/publish/lib/esm/Table/utils/hooks/useTableDraggable.tsx +342 -0
- package/publish/lib/esm/Table/utils/hooks/useTableKeyPress.tsx +255 -0
- package/publish/lib/esm/Table/utils/hooks/useTableResponsive.tsx +92 -0
- package/publish/lib/esm/Table/utils/hooks/useTableSort.tsx +187 -0
- package/publish/lib/esm/Tabs/TabList.tsx +50 -0
- package/publish/lib/esm/Tabs/TabPanel.tsx +44 -0
- package/publish/lib/esm/Tabs/Tabs.tsx +282 -0
- package/publish/lib/esm/Tabs/index.tsx +3 -0
- package/publish/lib/esm/TagInput/index.scss +126 -0
- package/publish/lib/esm/TagInput/index.tsx +379 -0
- package/publish/lib/esm/Textarea/index.tsx +621 -0
- package/publish/lib/esm/Toast/Item.tsx +165 -0
- package/publish/lib/esm/Toast/Toast.tsx +391 -0
- package/publish/lib/esm/Toast/ToastContext.tsx +104 -0
- package/publish/lib/esm/Toast/__toast.vanilla.js +422 -0
- package/publish/lib/esm/Toast/index.scss +197 -0
- package/publish/lib/esm/Toast/index.tsx +3 -0
- package/publish/lib/esm/Toast/types.ts +60 -0
- package/publish/lib/esm/Toast/useToast.tsx +72 -0
- package/publish/lib/esm/Tooltip/index.scss +272 -0
- package/publish/lib/esm/Tooltip/index.tsx +416 -0
- package/publish/lib/esm/Tree/TreeList.tsx +600 -0
- package/publish/lib/esm/Tree/index.scss +384 -0
- package/publish/lib/esm/Tree/index.tsx +661 -0
- package/publish/lib/esm/Tree/init-height.tsx +40 -0
- package/publish/lib/esm/Tree/utils/func.ts +15 -0
- package/publish/lib/esm/Utils/hooks/useAutosizeTextArea.tsx +131 -0
- package/publish/lib/esm/Utils/hooks/useBoundedDrag.tsx +301 -0
- package/publish/lib/esm/Utils/hooks/useClickOutside.tsx +69 -0
- package/publish/lib/esm/Utils/hooks/useComId.tsx +13 -0
- package/publish/lib/esm/Utils/hooks/useDebounce.tsx +40 -0
- package/publish/lib/esm/Utils/hooks/useDragDropPosition.tsx +417 -0
- package/publish/lib/esm/Utils/hooks/useDraggable.tsx +265 -0
- package/publish/lib/esm/Utils/hooks/useHistoryTracker.tsx +554 -0
- package/publish/lib/esm/Utils/hooks/useInterval.tsx +74 -0
- package/publish/lib/esm/Utils/hooks/useIsMobile.tsx +139 -0
- package/publish/lib/esm/Utils/hooks/useKeyPress.tsx +104 -0
- package/publish/lib/esm/Utils/hooks/useSessionStorageListener.tsx +45 -0
- package/publish/lib/esm/Utils/hooks/useStreamController.tsx +277 -0
- package/publish/lib/esm/Utils/hooks/useThrottle.tsx +39 -0
- package/publish/lib/esm/Utils/hooks/useWindowScroll.tsx +83 -0
- package/publish/lib/esm/Utils/libs/anim.ts +96 -0
- package/publish/lib/esm/Utils/libs/buffer.ts +262 -0
- package/publish/lib/esm/Utils/libs/cls.ts +64 -0
- package/publish/lib/esm/Utils/libs/convert.ts +59 -0
- package/publish/lib/esm/Utils/libs/date.ts +598 -0
- package/publish/lib/esm/Utils/libs/dom.ts +150 -0
- package/publish/lib/esm/Utils/libs/easing.ts +201 -0
- package/publish/lib/esm/Utils/libs/extract.ts +160 -0
- package/publish/lib/esm/Utils/libs/format-string.ts +116 -0
- package/publish/lib/esm/Utils/libs/formdata.ts +93 -0
- package/publish/lib/esm/Utils/libs/getElementProperty.ts +150 -0
- package/publish/lib/esm/Utils/libs/guid.ts +16 -0
- package/publish/lib/esm/Utils/libs/initDefaultOptions.ts +43 -0
- package/publish/lib/esm/Utils/libs/inputsCalculation.ts +160 -0
- package/publish/lib/esm/Utils/libs/math.ts +276 -0
- package/publish/lib/esm/Utils/libs/object.ts +68 -0
- package/publish/lib/esm/Utils/libs/os.ts +63 -0
- package/publish/lib/esm/Utils/libs/performance.ts +47 -0
- package/publish/lib/esm/Utils/libs/sanitize.ts +55 -0
- package/publish/lib/esm/Utils/libs/time.ts +139 -0
- package/publish/lib/esm/Utils/libs/tree.ts +119 -0
- package/publish/lib/esm/Utils/libs/validate.ts +434 -0
- package/publish/lib/esm/Utils/libs/viewport.ts +20 -0
- package/publish/lib/esm/Utils/plugins/bodyScrollLock.ts +286 -0
- package/publish/lib/esm/index.js +47 -0
- package/publish/package.json +1 -0
- /package/{Accordion → publish/Accordion}/index.d.ts +0 -0
- /package/{Accordion → publish/Accordion}/index.js +0 -0
- /package/{BackToTop → publish/BackToTop}/index.css +0 -0
- /package/{BackToTop → publish/BackToTop}/index.d.ts +0 -0
- /package/{BackToTop → publish/BackToTop}/index.js +0 -0
- /package/{CascadingSelect → publish/CascadingSelect}/index.css +0 -0
- /package/{CascadingSelect → publish/CascadingSelect}/index.d.ts +0 -0
- /package/{CascadingSelect → publish/CascadingSelect}/index.js +0 -0
- /package/{CascadingSelectE2E → publish/CascadingSelectE2E}/index.css +0 -0
- /package/{CascadingSelectE2E → publish/CascadingSelectE2E}/index.d.ts +0 -0
- /package/{CascadingSelectE2E → publish/CascadingSelectE2E}/index.js +0 -0
- /package/{Chatbox → publish/Chatbox}/index.css +0 -0
- /package/{Chatbox → publish/Chatbox}/index.d.ts +0 -0
- /package/{Chatbox → publish/Chatbox}/index.js +0 -0
- /package/{Checkbox → publish/Checkbox}/index.d.ts +0 -0
- /package/{Checkbox → publish/Checkbox}/index.js +0 -0
- /package/{ColorPicker → publish/ColorPicker}/index.css +0 -0
- /package/{ColorPicker → publish/ColorPicker}/index.d.ts +0 -0
- /package/{ColorPicker → publish/ColorPicker}/index.js +0 -0
- /package/{Date → publish/Date}/index.css +0 -0
- /package/{Date → publish/Date}/index.d.ts +0 -0
- /package/{DigitalClock → publish/DigitalClock}/index.d.ts +0 -0
- /package/{DigitalClock → publish/DigitalClock}/index.js +0 -0
- /package/{DragDropList → publish/DragDropList}/index.css +0 -0
- /package/{DragDropList → publish/DragDropList}/index.d.ts +0 -0
- /package/{DragDropList → publish/DragDropList}/index.js +0 -0
- /package/{DropdownMenu → publish/DropdownMenu}/index.css +0 -0
- /package/{DropdownMenu → publish/DropdownMenu}/index.d.ts +0 -0
- /package/{DropdownMenu → publish/DropdownMenu}/index.js +0 -0
- /package/{DynamicFields → publish/DynamicFields}/index.d.ts +0 -0
- /package/{EventCalendar → publish/EventCalendar}/index.css +0 -0
- /package/{EventCalendar → publish/EventCalendar}/index.d.ts +0 -0
- /package/{EventCalendar → publish/EventCalendar}/index.js +0 -0
- /package/{EventCalendarTimeline → publish/EventCalendarTimeline}/index.css +0 -0
- /package/{EventCalendarTimeline → publish/EventCalendarTimeline}/index.d.ts +0 -0
- /package/{EventCalendarTimeline → publish/EventCalendarTimeline}/index.js +0 -0
- /package/{File → publish/File}/index.d.ts +0 -0
- /package/{File → publish/File}/index.js +0 -0
- /package/{HorizontalScrollContent → publish/HorizontalScrollContent}/index.css +0 -0
- /package/{HorizontalScrollContent → publish/HorizontalScrollContent}/index.d.ts +0 -0
- /package/{HorizontalScrollContent → publish/HorizontalScrollContent}/index.js +0 -0
- /package/{Input → publish/Input}/index.d.ts +0 -0
- /package/{Input → publish/Input}/index.js +0 -0
- /package/{LiveSearch → publish/LiveSearch}/index.css +0 -0
- /package/{LiveSearch → publish/LiveSearch}/index.d.ts +0 -0
- /package/{LiveSearch → publish/LiveSearch}/index.js +0 -0
- /package/{MasonryLayout → publish/MasonryLayout}/index.d.ts +0 -0
- /package/{MasonryLayout → publish/MasonryLayout}/index.js +0 -0
- /package/{ModalDialog → publish/ModalDialog}/index.d.ts +0 -0
- /package/{ModalDialog → publish/ModalDialog}/index.js +0 -0
- /package/{ModeSwitch → publish/ModeSwitch}/index.d.ts +0 -0
- /package/{ModeSwitch → publish/ModeSwitch}/index.js +0 -0
- /package/{MultilevelDropdownMenu → publish/MultilevelDropdownMenu}/index.css +0 -0
- /package/{MultilevelDropdownMenu → publish/MultilevelDropdownMenu}/index.d.ts +0 -0
- /package/{MultilevelDropdownMenu → publish/MultilevelDropdownMenu}/index.js +0 -0
- /package/{MultipleCheckboxes → publish/MultipleCheckboxes}/index.d.ts +0 -0
- /package/{MultipleCheckboxes → publish/MultipleCheckboxes}/index.js +0 -0
- /package/{MultipleSelect → publish/MultipleSelect}/index.css +0 -0
- /package/{MultipleSelect → publish/MultipleSelect}/index.d.ts +0 -0
- /package/{MultipleSelect → publish/MultipleSelect}/index.js +0 -0
- /package/{NativeSelect → publish/NativeSelect}/index.d.ts +0 -0
- /package/{NativeSelect → publish/NativeSelect}/index.js +0 -0
- /package/{NumberInput → publish/NumberInput}/index.d.ts +0 -0
- /package/{NumberInput → publish/NumberInput}/index.js +0 -0
- /package/{Pagination → publish/Pagination}/index.d.ts +0 -0
- /package/{Pagination → publish/Pagination}/index.js +0 -0
- /package/{Radio → publish/Radio}/index.d.ts +0 -0
- /package/{Radio → publish/Radio}/index.js +0 -0
- /package/{RangeSlider → publish/RangeSlider}/index.css +0 -0
- /package/{RangeSlider → publish/RangeSlider}/index.d.ts +0 -0
- /package/{RangeSlider → publish/RangeSlider}/index.js +0 -0
- /package/{Refresher → publish/Refresher}/index.d.ts +0 -0
- /package/{Refresher → publish/Refresher}/index.js +0 -0
- /package/{RootPortal → publish/RootPortal}/index.d.ts +0 -0
- /package/{RootPortal → publish/RootPortal}/index.js +0 -0
- /package/{ScrollReveal → publish/ScrollReveal}/index.d.ts +0 -0
- /package/{ScrollReveal → publish/ScrollReveal}/index.js +0 -0
- /package/{Scrollbar → publish/Scrollbar}/index.css +0 -0
- /package/{Scrollbar → publish/Scrollbar}/index.d.ts +0 -0
- /package/{Scrollbar → publish/Scrollbar}/index.js +0 -0
- /package/{SearchBar → publish/SearchBar}/index.d.ts +0 -0
- /package/{SearchBar → publish/SearchBar}/index.js +0 -0
- /package/{Select → publish/Select}/index.css +0 -0
- /package/{Select → publish/Select}/index.d.ts +0 -0
- /package/{Select → publish/Select}/index.js +0 -0
- /package/{ShowMoreLess → publish/ShowMoreLess}/index.css +0 -0
- /package/{ShowMoreLess → publish/ShowMoreLess}/index.d.ts +0 -0
- /package/{ShowMoreLess → publish/ShowMoreLess}/index.js +0 -0
- /package/{SplitterPanel → publish/SplitterPanel}/index.css +0 -0
- /package/{SplitterPanel → publish/SplitterPanel}/index.d.ts +0 -0
- /package/{SplitterPanel → publish/SplitterPanel}/index.js +0 -0
- /package/{Stepper → publish/Stepper}/index.css +0 -0
- /package/{Stepper → publish/Stepper}/index.d.ts +0 -0
- /package/{Stepper → publish/Stepper}/index.js +0 -0
- /package/{Switch → publish/Switch}/index.d.ts +0 -0
- /package/{Switch → publish/Switch}/index.js +0 -0
- /package/{Table → publish/Table}/index.css +0 -0
- /package/{Table → publish/Table}/index.d.ts +0 -0
- /package/{Table → publish/Table}/index.js +0 -0
- /package/{Tabs → publish/Tabs}/index.d.ts +0 -0
- /package/{Tabs → publish/Tabs}/index.js +0 -0
- /package/{TagInput → publish/TagInput}/index.css +0 -0
- /package/{TagInput → publish/TagInput}/index.d.ts +0 -0
- /package/{TagInput → publish/TagInput}/index.js +0 -0
- /package/{Textarea → publish/Textarea}/index.d.ts +0 -0
- /package/{Textarea → publish/Textarea}/index.js +0 -0
- /package/{Toast → publish/Toast}/index.css +0 -0
- /package/{Toast → publish/Toast}/index.d.ts +0 -0
- /package/{Toast → publish/Toast}/index.js +0 -0
- /package/{Tooltip → publish/Tooltip}/index.css +0 -0
- /package/{Tooltip → publish/Tooltip}/index.d.ts +0 -0
- /package/{Tooltip → publish/Tooltip}/index.js +0 -0
- /package/{Tree → publish/Tree}/index.css +0 -0
- /package/{Tree → publish/Tree}/index.d.ts +0 -0
- /package/{Tree → publish/Tree}/index.js +0 -0
- /package/{Utils → publish/Utils}/anim.d.ts +0 -0
- /package/{Utils → publish/Utils}/anim.js +0 -0
- /package/{Utils → publish/Utils}/bodyScrollLock.d.ts +0 -0
- /package/{Utils → publish/Utils}/bodyScrollLock.js +0 -0
- /package/{Utils → publish/Utils}/buffer.d.ts +0 -0
- /package/{Utils → publish/Utils}/buffer.js +0 -0
- /package/{Utils → publish/Utils}/cls.d.ts +0 -0
- /package/{Utils → publish/Utils}/cls.js +0 -0
- /package/{Utils → publish/Utils}/convert.d.ts +0 -0
- /package/{Utils → publish/Utils}/convert.js +0 -0
- /package/{Utils → publish/Utils}/date.d.ts +0 -0
- /package/{Utils → publish/Utils}/date.js +0 -0
- /package/{Utils → publish/Utils}/dom.d.ts +0 -0
- /package/{Utils → publish/Utils}/dom.js +0 -0
- /package/{Utils → publish/Utils}/easing.d.ts +0 -0
- /package/{Utils → publish/Utils}/easing.js +0 -0
- /package/{Utils → publish/Utils}/extract.d.ts +0 -0
- /package/{Utils → publish/Utils}/extract.js +0 -0
- /package/{Utils → publish/Utils}/format-string.d.ts +0 -0
- /package/{Utils → publish/Utils}/format-string.js +0 -0
- /package/{Utils → publish/Utils}/formdata.d.ts +0 -0
- /package/{Utils → publish/Utils}/formdata.js +0 -0
- /package/{Utils → publish/Utils}/getElementProperty.d.ts +0 -0
- /package/{Utils → publish/Utils}/getElementProperty.js +0 -0
- /package/{Utils → publish/Utils}/guid.d.ts +0 -0
- /package/{Utils → publish/Utils}/guid.js +0 -0
- /package/{Utils → publish/Utils}/initDefaultOptions.d.ts +0 -0
- /package/{Utils → publish/Utils}/initDefaultOptions.js +0 -0
- /package/{Utils → publish/Utils}/inputsCalculation.d.ts +0 -0
- /package/{Utils → publish/Utils}/inputsCalculation.js +0 -0
- /package/{Utils → publish/Utils}/math.d.ts +0 -0
- /package/{Utils → publish/Utils}/math.js +0 -0
- /package/{Utils → publish/Utils}/object.d.ts +0 -0
- /package/{Utils → publish/Utils}/object.js +0 -0
- /package/{Utils → publish/Utils}/os.d.ts +0 -0
- /package/{Utils → publish/Utils}/os.js +0 -0
- /package/{Utils → publish/Utils}/performance.d.ts +0 -0
- /package/{Utils → publish/Utils}/performance.js +0 -0
- /package/{Utils → publish/Utils}/sanitize.d.ts +0 -0
- /package/{Utils → publish/Utils}/sanitize.js +0 -0
- /package/{Utils → publish/Utils}/time.d.ts +0 -0
- /package/{Utils → publish/Utils}/time.js +0 -0
- /package/{Utils → publish/Utils}/tree.d.ts +0 -0
- /package/{Utils → publish/Utils}/tree.js +0 -0
- /package/{Utils → publish/Utils}/useAutosizeTextArea.d.ts +0 -0
- /package/{Utils → publish/Utils}/useAutosizeTextArea.js +0 -0
- /package/{Utils → publish/Utils}/useBoundedDrag.d.ts +0 -0
- /package/{Utils → publish/Utils}/useBoundedDrag.js +0 -0
- /package/{Utils → publish/Utils}/useClickOutside.d.ts +0 -0
- /package/{Utils → publish/Utils}/useClickOutside.js +0 -0
- /package/{Utils → publish/Utils}/useComId.d.ts +0 -0
- /package/{Utils → publish/Utils}/useComId.js +0 -0
- /package/{Utils → publish/Utils}/useDebounce.d.ts +0 -0
- /package/{Utils → publish/Utils}/useDebounce.js +0 -0
- /package/{Utils → publish/Utils}/useDragDropPosition.d.ts +0 -0
- /package/{Utils → publish/Utils}/useDragDropPosition.js +0 -0
- /package/{Utils → publish/Utils}/useDraggable.d.ts +0 -0
- /package/{Utils → publish/Utils}/useDraggable.js +0 -0
- /package/{Utils → publish/Utils}/useHistoryTracker.d.ts +0 -0
- /package/{Utils → publish/Utils}/useHistoryTracker.js +0 -0
- /package/{Utils → publish/Utils}/useInterval.d.ts +0 -0
- /package/{Utils → publish/Utils}/useInterval.js +0 -0
- /package/{Utils → publish/Utils}/useIsMobile.d.ts +0 -0
- /package/{Utils → publish/Utils}/useIsMobile.js +0 -0
- /package/{Utils → publish/Utils}/useKeyPress.d.ts +0 -0
- /package/{Utils → publish/Utils}/useKeyPress.js +0 -0
- /package/{Utils → publish/Utils}/useSessionStorageListener.d.ts +0 -0
- /package/{Utils → publish/Utils}/useSessionStorageListener.js +0 -0
- /package/{Utils → publish/Utils}/useStreamController.d.ts +0 -0
- /package/{Utils → publish/Utils}/useStreamController.js +0 -0
- /package/{Utils → publish/Utils}/useThrottle.d.ts +0 -0
- /package/{Utils → publish/Utils}/useThrottle.js +0 -0
- /package/{Utils → publish/Utils}/useWindowScroll.d.ts +0 -0
- /package/{Utils → publish/Utils}/useWindowScroll.js +0 -0
- /package/{Utils → publish/Utils}/validate.d.ts +0 -0
- /package/{Utils → publish/Utils}/validate.js +0 -0
- /package/{Utils → publish/Utils}/viewport.d.ts +0 -0
- /package/{Utils → publish/Utils}/viewport.js +0 -0
- /package/{all.d.ts → publish/all.d.ts} +0 -0
- /package/{all.js → publish/all.js} +0 -0
|
@@ -0,0 +1,561 @@
|
|
|
1
|
+
import React, { useState, useEffect, useRef, useCallback } from 'react';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import useComId from 'funda-utils/dist/cjs/useComId';
|
|
5
|
+
import {
|
|
6
|
+
throttle
|
|
7
|
+
} from 'funda-utils/dist/cjs/performance';
|
|
8
|
+
import { clsWrite, combinedCls } from 'funda-utils/dist/cjs/cls';
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
export type ScrollbarProps = {
|
|
12
|
+
onlyVerticle?: boolean;
|
|
13
|
+
onlyHorizontal?: boolean;
|
|
14
|
+
arrowIcons?: React.ReactNode[];
|
|
15
|
+
disableArrow?: boolean;
|
|
16
|
+
horizontallyWithWheel?: boolean;
|
|
17
|
+
autoScrollTo?: boolean | string;
|
|
18
|
+
/** Incoming data, changes in the `data` value will cause the component to re-render. */
|
|
19
|
+
data?: any;
|
|
20
|
+
onMove?: (data: any) => void;
|
|
21
|
+
/** -- */
|
|
22
|
+
id?: string;
|
|
23
|
+
children: React.ReactNode;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
const Scrollbar = (props: ScrollbarProps) => {
|
|
29
|
+
const {
|
|
30
|
+
onlyVerticle,
|
|
31
|
+
onlyHorizontal,
|
|
32
|
+
arrowIcons,
|
|
33
|
+
disableArrow,
|
|
34
|
+
horizontallyWithWheel,
|
|
35
|
+
autoScrollTo,
|
|
36
|
+
data,
|
|
37
|
+
onMove,
|
|
38
|
+
id,
|
|
39
|
+
children
|
|
40
|
+
} = props;
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
const uniqueID = useComId();
|
|
44
|
+
const idRes = id || uniqueID;
|
|
45
|
+
const rootRef = useRef<HTMLDivElement>(null);
|
|
46
|
+
const contentRef = useRef<HTMLDivElement>(null);
|
|
47
|
+
const AUTO_SCROLL_TO_DIR = typeof autoScrollTo === 'undefined' ? false : autoScrollTo;
|
|
48
|
+
const icons = typeof arrowIcons === 'undefined' || !arrowIcons ? [
|
|
49
|
+
<><svg width="10px" height="10px" viewBox="0 0 24 24" fill="none"> <path d="M18.2929 15.2893C18.6834 14.8988 18.6834 14.2656 18.2929 13.8751L13.4007 8.98766C12.6195 8.20726 11.3537 8.20757 10.5729 8.98835L5.68257 13.8787C5.29205 14.2692 5.29205 14.9024 5.68257 15.2929C6.0731 15.6835 6.70626 15.6835 7.09679 15.2929L11.2824 11.1073C11.673 10.7168 12.3061 10.7168 12.6966 11.1073L16.8787 15.2893C17.2692 15.6798 17.9024 15.6798 18.2929 15.2893Z"/> </svg></>,
|
|
50
|
+
<><svg width="10px" height="10px" viewBox="0 0 24 24" fill="none"> <path d="M5.70711 9.71069C5.31658 10.1012 5.31658 10.7344 5.70711 11.1249L10.5993 16.0123C11.3805 16.7927 12.6463 16.7924 13.4271 16.0117L18.3174 11.1213C18.708 10.7308 18.708 10.0976 18.3174 9.70708C17.9269 9.31655 17.2937 9.31655 16.9032 9.70708L12.7176 13.8927C12.3271 14.2833 11.6939 14.2832 11.3034 13.8927L7.12132 9.71069C6.7308 9.32016 6.09763 9.32016 5.70711 9.71069Z" /> </svg></>,
|
|
51
|
+
<><svg width="10px" height="10px" viewBox="0 0 24 24" fill="none" transform="translate(0 -2)"> <path d="M14.2893 5.70708C13.8988 5.31655 13.2657 5.31655 12.8751 5.70708L7.98768 10.5993C7.20729 11.3805 7.2076 12.6463 7.98837 13.427L12.8787 18.3174C13.2693 18.7079 13.9024 18.7079 14.293 18.3174C14.6835 17.9269 14.6835 17.2937 14.293 16.9032L10.1073 12.7175C9.71678 12.327 9.71678 11.6939 10.1073 11.3033L14.2893 7.12129C14.6799 6.73077 14.6799 6.0976 14.2893 5.70708Z"/> </svg></>,
|
|
52
|
+
<><svg width="10px" height="10px" viewBox="0 0 24 24" fill="none" transform="translate(0 -2)"> <path d="M9.71069 18.2929C10.1012 18.6834 10.7344 18.6834 11.1249 18.2929L16.0123 13.4006C16.7927 12.6195 16.7924 11.3537 16.0117 10.5729L11.1213 5.68254C10.7308 5.29202 10.0976 5.29202 9.70708 5.68254C9.31655 6.07307 9.31655 6.70623 9.70708 7.09676L13.8927 11.2824C14.2833 11.6729 14.2833 12.3061 13.8927 12.6966L9.71069 16.8787C9.32016 17.2692 9.32016 17.9023 9.71069 18.2929Z" /> </svg></>
|
|
53
|
+
] : arrowIcons;
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
const contentAreaScrollUpdate = throttle(handleScrollEvent, 5);
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
// Vertical (default)
|
|
60
|
+
//========================================
|
|
61
|
+
const scrollTrackRef = useRef<HTMLDivElement>(null);
|
|
62
|
+
const scrollThumbRef = useRef<HTMLDivElement>(null);
|
|
63
|
+
const scrollBarRef = useRef<HTMLDivElement>(null);
|
|
64
|
+
const observer = useRef<ResizeObserver | null>(null);
|
|
65
|
+
const [thumbHeight, setThumbHeight] = useState<number>(20);
|
|
66
|
+
const [scrollStartPosition, setScrollStartPosition] = useState<number | null>(null);
|
|
67
|
+
const [initialScrollTop, setInitialScrollTop] = useState<number>(0);
|
|
68
|
+
const [isDragging, setIsDragging] = useState<boolean>(false);
|
|
69
|
+
|
|
70
|
+
// Horizontal
|
|
71
|
+
//========================================
|
|
72
|
+
const scrollTrackHorizontalRef = useRef<HTMLDivElement>(null);
|
|
73
|
+
const scrollThumbHorizontalRef = useRef<HTMLDivElement>(null);
|
|
74
|
+
const scrollBarHorizontalRef = useRef<HTMLDivElement>(null);
|
|
75
|
+
const horizontalObserver = useRef<ResizeObserver | null>(null);
|
|
76
|
+
const [thumbWidth, setThumbWidth] = useState<number>(20);
|
|
77
|
+
const [scrollHorizontalStartPosition, setScrollHorizontalStartPosition] = useState<number | null>(null);
|
|
78
|
+
const [initialScrollLeft, setInitialScrollLeft] = useState<number>(0);
|
|
79
|
+
const [isHorizontalDragging, setIsHorizontalDragging] = useState<boolean>(false);
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
// common functions
|
|
84
|
+
//========================================
|
|
85
|
+
function handleScrollEvent(e: any) {
|
|
86
|
+
if (typeof e === 'undefined') return;
|
|
87
|
+
const scrollLeft = contentRef.current?.scrollLeft;
|
|
88
|
+
const scrollTop = contentRef.current?.scrollTop;
|
|
89
|
+
|
|
90
|
+
if (onlyHorizontal && horizontallyWithWheel) {
|
|
91
|
+
const direction = e.deltaY < 0 ? 'left' : 'right';
|
|
92
|
+
horizontalContentScrollTo(direction, false); //do not use `smooth`
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
onMove?.({
|
|
96
|
+
scrollLeft: scrollLeft,
|
|
97
|
+
scrolTop: scrollTop,
|
|
98
|
+
data: e
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
// Vertical --> functions
|
|
105
|
+
//========================================
|
|
106
|
+
|
|
107
|
+
function contentScrollTo(dir: string, smooth: boolean = true, max: boolean = false) {
|
|
108
|
+
const { current } = contentRef;
|
|
109
|
+
if (current) {
|
|
110
|
+
const pivot = current.scrollHeight/10;
|
|
111
|
+
let speed = pivot >= 200 ? 200 : pivot;
|
|
112
|
+
speed = !max ? speed : current.scrollHeight;
|
|
113
|
+
const scrollAmount = dir === 'down' ? speed : -speed;
|
|
114
|
+
current.scrollBy({ top: scrollAmount, behavior: smooth ? 'smooth' : 'auto' });
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
function contentScrollToMax(dir: string) {
|
|
120
|
+
contentScrollTo(dir, true, true);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
function handleResize(ref: HTMLDivElement, trackSize: number) {
|
|
125
|
+
const { clientHeight, scrollHeight } = ref;
|
|
126
|
+
if (clientHeight === 0 || scrollHeight === 0) return;
|
|
127
|
+
setThumbHeight(Math.max((clientHeight / scrollHeight) * trackSize, 20));
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
// do not need scrolling
|
|
131
|
+
if (clientHeight / scrollHeight === 1) {
|
|
132
|
+
// hide scrollbar
|
|
133
|
+
if (scrollBarRef.current !== null) scrollBarRef.current.classList.add('disabled');
|
|
134
|
+
} else {
|
|
135
|
+
if (scrollBarRef.current !== null) scrollBarRef.current.classList.remove('disabled');
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
function handleScrollButton(direction: 'up' | 'down') {
|
|
142
|
+
contentScrollTo(direction);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
const handleTrackClick = useCallback(
|
|
146
|
+
(e: React.MouseEvent) => {
|
|
147
|
+
e.preventDefault();
|
|
148
|
+
e.stopPropagation();
|
|
149
|
+
const { current: trackCurrent } = scrollTrackRef;
|
|
150
|
+
const { current: contentCurrent } = contentRef;
|
|
151
|
+
if (trackCurrent && contentCurrent) {
|
|
152
|
+
const { clientY } = e;
|
|
153
|
+
const target = e.target as HTMLDivElement;
|
|
154
|
+
const rect = target.getBoundingClientRect();
|
|
155
|
+
const trackTop = rect.top;
|
|
156
|
+
const thumbOffset = -(thumbHeight / 2);
|
|
157
|
+
const clickRatio = (clientY - trackTop + thumbOffset) / trackCurrent.clientHeight;
|
|
158
|
+
const scrollAmount = Math.floor(clickRatio * contentCurrent.scrollHeight);
|
|
159
|
+
contentCurrent.scrollTo({
|
|
160
|
+
top: scrollAmount,
|
|
161
|
+
behavior: 'smooth',
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
[thumbHeight]
|
|
166
|
+
);
|
|
167
|
+
|
|
168
|
+
const handleThumbPosition = useCallback(() => {
|
|
169
|
+
if (
|
|
170
|
+
!contentRef.current ||
|
|
171
|
+
!scrollTrackRef.current ||
|
|
172
|
+
!scrollThumbRef.current
|
|
173
|
+
) {
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
const { scrollTop: contentTop, scrollHeight: contentHeight } = contentRef.current;
|
|
177
|
+
const { clientHeight: trackHeight } = scrollTrackRef.current;
|
|
178
|
+
let newTop = (+contentTop / +contentHeight) * trackHeight;
|
|
179
|
+
newTop = Math.min(newTop, trackHeight - thumbHeight);
|
|
180
|
+
const thumb = scrollThumbRef.current;
|
|
181
|
+
thumb.style.top = `${newTop}px`;
|
|
182
|
+
}, []);
|
|
183
|
+
|
|
184
|
+
const handleThumbMouseDown = useCallback((e: React.MouseEvent) => {
|
|
185
|
+
e.preventDefault();
|
|
186
|
+
e.stopPropagation();
|
|
187
|
+
setScrollStartPosition(e.clientY);
|
|
188
|
+
if (contentRef.current) setInitialScrollTop(contentRef.current.scrollTop);
|
|
189
|
+
setIsDragging(true);
|
|
190
|
+
}, []);
|
|
191
|
+
|
|
192
|
+
const handleThumbMouseMove = useCallback((e: React.MouseEvent) => {
|
|
193
|
+
e.preventDefault();
|
|
194
|
+
e.stopPropagation();
|
|
195
|
+
if (isDragging && contentRef.current && scrollStartPosition) {
|
|
196
|
+
const {
|
|
197
|
+
scrollHeight: contentScrollHeight,
|
|
198
|
+
offsetHeight: contentOffsetHeight,
|
|
199
|
+
} = contentRef.current;
|
|
200
|
+
|
|
201
|
+
const deltaY =
|
|
202
|
+
(e.clientY - scrollStartPosition) *
|
|
203
|
+
(contentOffsetHeight / thumbHeight);
|
|
204
|
+
const newScrollTop = Math.min(
|
|
205
|
+
initialScrollTop + deltaY,
|
|
206
|
+
contentScrollHeight - contentOffsetHeight
|
|
207
|
+
);
|
|
208
|
+
|
|
209
|
+
contentRef.current.scrollTop = newScrollTop;
|
|
210
|
+
}
|
|
211
|
+
}, [isDragging, scrollStartPosition, thumbHeight]);
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
const handleThumbMouseUp = useCallback((e: React.MouseEvent) => {
|
|
215
|
+
e.preventDefault();
|
|
216
|
+
e.stopPropagation();
|
|
217
|
+
if (isDragging) {
|
|
218
|
+
setIsDragging(false);
|
|
219
|
+
}
|
|
220
|
+
}, [isDragging]);
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
// Horizontal --> functions
|
|
226
|
+
//========================================
|
|
227
|
+
|
|
228
|
+
function horizontalContentScrollTo(dir: string, smooth: boolean = true, max: boolean = false) {
|
|
229
|
+
const { current } = contentRef;
|
|
230
|
+
if (current) {
|
|
231
|
+
const pivot = current.scrollWidth/10;
|
|
232
|
+
let speed = pivot >= 200 ? 200 : pivot;
|
|
233
|
+
speed = !max ? speed : current.scrollWidth;
|
|
234
|
+
const scrollAmount = dir === 'right' ? speed : -speed;
|
|
235
|
+
current.scrollBy({ left: scrollAmount, behavior: smooth ? 'smooth' : 'auto' });
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
function horizontalContentScrollToMax(dir: string) {
|
|
240
|
+
horizontalContentScrollTo(dir, true, true);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
function handleHorizontalResize(ref: HTMLDivElement, trackSize: number) {
|
|
246
|
+
const { clientWidth, scrollWidth } = ref;
|
|
247
|
+
if (clientWidth === 0 || scrollWidth === 0) return;
|
|
248
|
+
setThumbWidth(Math.max((clientWidth / scrollWidth) * trackSize, 20));
|
|
249
|
+
|
|
250
|
+
// do not need scrolling
|
|
251
|
+
if (clientWidth / scrollWidth === 1) {
|
|
252
|
+
// hide scrollbar
|
|
253
|
+
if (scrollBarHorizontalRef.current) scrollBarHorizontalRef.current.classList.add('disabled');
|
|
254
|
+
} else {
|
|
255
|
+
if (scrollBarHorizontalRef.current) scrollBarHorizontalRef.current.classList.remove('disabled');
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
function handleHorizontalScrollButton(direction: 'left' | 'right') {
|
|
263
|
+
horizontalContentScrollTo(direction);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
const handleHorizontalTrackClick = useCallback(
|
|
267
|
+
(e: React.MouseEvent) => {
|
|
268
|
+
e.preventDefault();
|
|
269
|
+
e.stopPropagation();
|
|
270
|
+
const { current: trackCurrent } = scrollTrackHorizontalRef;
|
|
271
|
+
const { current: contentCurrent } = contentRef;
|
|
272
|
+
if (trackCurrent && contentCurrent) {
|
|
273
|
+
const { clientX } = e;
|
|
274
|
+
const target = e.target as HTMLDivElement;
|
|
275
|
+
const rect = target.getBoundingClientRect();
|
|
276
|
+
const trackLeft = rect.left;
|
|
277
|
+
const thumbOffset = -(thumbWidth / 2);
|
|
278
|
+
const clickRatio = (clientX - trackLeft + thumbOffset) / trackCurrent.clientWidth;
|
|
279
|
+
const scrollAmount = Math.floor(clickRatio * contentCurrent.scrollWidth);
|
|
280
|
+
contentCurrent.scrollTo({
|
|
281
|
+
left: scrollAmount,
|
|
282
|
+
behavior: 'smooth',
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
[thumbWidth]
|
|
287
|
+
);
|
|
288
|
+
|
|
289
|
+
const handleHorizontalThumbPosition = useCallback(() => {
|
|
290
|
+
if (
|
|
291
|
+
!contentRef.current ||
|
|
292
|
+
!scrollTrackHorizontalRef.current ||
|
|
293
|
+
!scrollThumbHorizontalRef.current
|
|
294
|
+
) {
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
297
|
+
const { scrollLeft: contentLeft, scrollWidth: contentWidth } = contentRef.current;
|
|
298
|
+
const { clientWidth: trackWidth } = scrollTrackHorizontalRef.current;
|
|
299
|
+
|
|
300
|
+
let newLeft = (+contentLeft / +contentWidth) * trackWidth;
|
|
301
|
+
newLeft = Math.min(newLeft, trackWidth - thumbWidth);
|
|
302
|
+
const thumb = scrollThumbHorizontalRef.current;
|
|
303
|
+
thumb.style.left = `${newLeft}px`;
|
|
304
|
+
}, []);
|
|
305
|
+
|
|
306
|
+
const handleHorizontalThumbMouseDown = useCallback((e: React.MouseEvent) => {
|
|
307
|
+
e.preventDefault();
|
|
308
|
+
e.stopPropagation();
|
|
309
|
+
setScrollHorizontalStartPosition(e.clientX);
|
|
310
|
+
if (contentRef.current) setInitialScrollLeft(contentRef.current.scrollLeft);
|
|
311
|
+
setIsHorizontalDragging(true);
|
|
312
|
+
}, []);
|
|
313
|
+
|
|
314
|
+
const handleHorizontalThumbMouseUp = useCallback(
|
|
315
|
+
(e: React.MouseEvent) => {
|
|
316
|
+
e.preventDefault();
|
|
317
|
+
e.stopPropagation();
|
|
318
|
+
if (isHorizontalDragging) {
|
|
319
|
+
setIsHorizontalDragging(false);
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
[isHorizontalDragging]
|
|
323
|
+
);
|
|
324
|
+
|
|
325
|
+
const handleHorizontalThumbMouseMove = useCallback(
|
|
326
|
+
(e: React.MouseEvent) => {
|
|
327
|
+
e.preventDefault();
|
|
328
|
+
e.stopPropagation();
|
|
329
|
+
if (isHorizontalDragging && contentRef.current && scrollHorizontalStartPosition) {
|
|
330
|
+
const {
|
|
331
|
+
scrollWidth: contentScrollWidth,
|
|
332
|
+
offsetWidth: contentOffsetWidth,
|
|
333
|
+
} = contentRef.current;
|
|
334
|
+
|
|
335
|
+
const deltaY =
|
|
336
|
+
(e.clientX - scrollHorizontalStartPosition) *
|
|
337
|
+
(contentOffsetWidth / thumbWidth);
|
|
338
|
+
const newScrollLeft = Math.min(
|
|
339
|
+
initialScrollLeft + deltaY,
|
|
340
|
+
contentScrollWidth - contentOffsetWidth
|
|
341
|
+
);
|
|
342
|
+
|
|
343
|
+
contentRef.current.scrollLeft = newScrollLeft;
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
[isHorizontalDragging, scrollHorizontalStartPosition, thumbWidth]
|
|
347
|
+
);
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
// If the content and the scrollbar track exist, use a ResizeObserver to adjust height of thumb and listen for scroll event to move the thumb
|
|
352
|
+
useEffect(() => {
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
//
|
|
356
|
+
if (contentRef.current && scrollTrackRef.current && scrollTrackHorizontalRef.current) {
|
|
357
|
+
|
|
358
|
+
// Vertical
|
|
359
|
+
const ref = contentRef.current;
|
|
360
|
+
const { clientHeight: trackSize } = scrollTrackRef.current;
|
|
361
|
+
observer.current = new ResizeObserver(() => {
|
|
362
|
+
handleResize(ref, trackSize);
|
|
363
|
+
});
|
|
364
|
+
observer.current.observe(ref);
|
|
365
|
+
ref.addEventListener('scroll', handleThumbPosition);
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
//Horizontal
|
|
369
|
+
const horizontalRef = contentRef.current;
|
|
370
|
+
const { clientWidth: trackHorizontalSize } = scrollTrackHorizontalRef.current;
|
|
371
|
+
horizontalObserver.current = new ResizeObserver(() => {
|
|
372
|
+
handleHorizontalResize(horizontalRef, trackHorizontalSize);
|
|
373
|
+
});
|
|
374
|
+
horizontalObserver.current.observe(horizontalRef);
|
|
375
|
+
horizontalRef.addEventListener('scroll', handleHorizontalThumbPosition);
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
// auto scroll to some position
|
|
379
|
+
setTimeout(() => {
|
|
380
|
+
if (
|
|
381
|
+
AUTO_SCROLL_TO_DIR !== false &&
|
|
382
|
+
(AUTO_SCROLL_TO_DIR == 'down' || AUTO_SCROLL_TO_DIR == 'up')
|
|
383
|
+
) {
|
|
384
|
+
contentScrollToMax(AUTO_SCROLL_TO_DIR);
|
|
385
|
+
}
|
|
386
|
+
if (
|
|
387
|
+
AUTO_SCROLL_TO_DIR !== false &&
|
|
388
|
+
(AUTO_SCROLL_TO_DIR == 'left' || AUTO_SCROLL_TO_DIR == 'right')
|
|
389
|
+
) {
|
|
390
|
+
horizontalContentScrollToMax(AUTO_SCROLL_TO_DIR);
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
}, 50);
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
return () => {
|
|
398
|
+
observer.current?.unobserve(ref);
|
|
399
|
+
ref.removeEventListener('scroll', handleThumbPosition);
|
|
400
|
+
|
|
401
|
+
horizontalObserver.current?.unobserve(horizontalRef);
|
|
402
|
+
horizontalRef.removeEventListener('scroll', handleHorizontalThumbPosition);
|
|
403
|
+
|
|
404
|
+
};
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
}, [data]);
|
|
408
|
+
|
|
409
|
+
// Listen for mouse events to handle scrolling by dragging the thumb
|
|
410
|
+
useEffect(() => {
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
// Add function to the element that should be used as the scrollable area.
|
|
414
|
+
if (contentRef.current) {
|
|
415
|
+
contentRef.current.removeEventListener('wheel', contentAreaScrollUpdate);
|
|
416
|
+
contentRef.current.addEventListener('wheel', contentAreaScrollUpdate);
|
|
417
|
+
contentAreaScrollUpdate();
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
return () => {
|
|
422
|
+
|
|
423
|
+
if (contentRef.current) {
|
|
424
|
+
contentRef.current.removeEventListener('wheel', contentAreaScrollUpdate);
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
|
|
428
|
+
};
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
}, [handleThumbMouseMove, handleThumbMouseUp, handleHorizontalThumbMouseMove, handleHorizontalThumbMouseUp]);
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
return (
|
|
435
|
+
<>
|
|
436
|
+
|
|
437
|
+
<div
|
|
438
|
+
id={idRes}
|
|
439
|
+
ref={rootRef}
|
|
440
|
+
className={`custom-scrollbars__wrapper ${onlyHorizontal ? 'custom-scrollbars__wrapper--horizontal' : ''} ${disableArrow ? 'arrow-disabled' : ''}`}
|
|
441
|
+
>
|
|
442
|
+
<div className="custom-scrollbars__content" ref={contentRef}>
|
|
443
|
+
{children}
|
|
444
|
+
</div>
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
{/* SCROLLBAR */}
|
|
448
|
+
{/*
|
|
449
|
+
!!! IMPORTANT:
|
|
450
|
+
Button needs to specify type to prevent the "Enter" key event from interfering with the page outside the component
|
|
451
|
+
*/}
|
|
452
|
+
<div ref={scrollBarRef} className="custom-scrollbars__scrollbar" style={onlyHorizontal ? { display: 'none' } : {}}>
|
|
453
|
+
<button
|
|
454
|
+
tabIndex={-1}
|
|
455
|
+
type="button"
|
|
456
|
+
className={combinedCls(
|
|
457
|
+
'custom-scrollbars__button',
|
|
458
|
+
{
|
|
459
|
+
'disabled': disableArrow
|
|
460
|
+
}
|
|
461
|
+
)}
|
|
462
|
+
onClick={() => handleScrollButton('up')}
|
|
463
|
+
>
|
|
464
|
+
{icons[0]}
|
|
465
|
+
</button>
|
|
466
|
+
<div className="custom-scrollbars__track-and-thumb">
|
|
467
|
+
<div
|
|
468
|
+
className="custom-scrollbars__track"
|
|
469
|
+
ref={scrollTrackRef}
|
|
470
|
+
onClick={handleTrackClick}
|
|
471
|
+
style={{ cursor: isDragging ? 'grabbing' : 'pointer' }}
|
|
472
|
+
></div>
|
|
473
|
+
<div
|
|
474
|
+
className="custom-scrollbars__thumb"
|
|
475
|
+
ref={scrollThumbRef}
|
|
476
|
+
onMouseDown={handleThumbMouseDown}
|
|
477
|
+
onMouseMove={handleThumbMouseMove}
|
|
478
|
+
onMouseUp={handleThumbMouseUp}
|
|
479
|
+
style={{
|
|
480
|
+
height: `${thumbHeight}px`,
|
|
481
|
+
cursor: isDragging ? 'grabbing' : 'grab',
|
|
482
|
+
}}
|
|
483
|
+
></div>
|
|
484
|
+
</div>
|
|
485
|
+
<button
|
|
486
|
+
tabIndex={-1}
|
|
487
|
+
type="button"
|
|
488
|
+
className={combinedCls(
|
|
489
|
+
'custom-scrollbars__button',
|
|
490
|
+
{
|
|
491
|
+
'disabled': disableArrow
|
|
492
|
+
}
|
|
493
|
+
)}
|
|
494
|
+
onClick={() => handleScrollButton('down')}
|
|
495
|
+
>
|
|
496
|
+
{icons[1]}
|
|
497
|
+
</button>
|
|
498
|
+
</div>
|
|
499
|
+
{/* /SCROLLBAR */}
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
|
|
503
|
+
|
|
504
|
+
{/* SCROLLBAR HORIZONTAL */}
|
|
505
|
+
<div ref={scrollBarHorizontalRef} className="custom-scrollbars__scrollbar-horizontal" style={onlyVerticle ? { display: 'none' } : {}}>
|
|
506
|
+
<button
|
|
507
|
+
tabIndex={-1}
|
|
508
|
+
type="button"
|
|
509
|
+
className={combinedCls(
|
|
510
|
+
'custom-scrollbars__button',
|
|
511
|
+
{
|
|
512
|
+
'disabled': disableArrow
|
|
513
|
+
}
|
|
514
|
+
)}
|
|
515
|
+
onClick={() => handleHorizontalScrollButton('left')}
|
|
516
|
+
>
|
|
517
|
+
{icons[2]}
|
|
518
|
+
</button>
|
|
519
|
+
<div className="custom-scrollbars__track-and-thumb">
|
|
520
|
+
<div
|
|
521
|
+
className="custom-scrollbars__track"
|
|
522
|
+
ref={scrollTrackHorizontalRef}
|
|
523
|
+
onClick={handleHorizontalTrackClick}
|
|
524
|
+
style={{ cursor: isHorizontalDragging ? 'grabbing' : 'pointer' }}
|
|
525
|
+
></div>
|
|
526
|
+
<div
|
|
527
|
+
className="custom-scrollbars__thumb"
|
|
528
|
+
ref={scrollThumbHorizontalRef}
|
|
529
|
+
onMouseDown={handleHorizontalThumbMouseDown}
|
|
530
|
+
onMouseMove={handleHorizontalThumbMouseMove}
|
|
531
|
+
onMouseUp={handleHorizontalThumbMouseUp}
|
|
532
|
+
style={{
|
|
533
|
+
width: `${thumbWidth}px`,
|
|
534
|
+
cursor: isHorizontalDragging ? 'grabbing' : 'grab',
|
|
535
|
+
}}
|
|
536
|
+
></div>
|
|
537
|
+
</div>
|
|
538
|
+
<button
|
|
539
|
+
tabIndex={-1}
|
|
540
|
+
type="button"
|
|
541
|
+
className={combinedCls(
|
|
542
|
+
'custom-scrollbars__button',
|
|
543
|
+
{
|
|
544
|
+
'disabled': disableArrow
|
|
545
|
+
}
|
|
546
|
+
)}
|
|
547
|
+
onClick={() => handleHorizontalScrollButton('right')}
|
|
548
|
+
>
|
|
549
|
+
{icons[3]}
|
|
550
|
+
</button>
|
|
551
|
+
</div>
|
|
552
|
+
{/* /SCROLLBAR HORIZONTAL */}
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
</div>
|
|
556
|
+
</>
|
|
557
|
+
)
|
|
558
|
+
};
|
|
559
|
+
|
|
560
|
+
|
|
561
|
+
export default Scrollbar;
|