@1money/component-ui 0.0.1
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/.agents/skills/1money-component-dev/SKILL.md +224 -0
- package/.agents/skills/1money-component-dev/checklist.md +159 -0
- package/.agents/skills/1money-component-dev/references/ComponentPatterns.md +478 -0
- package/.agents/skills/1money-component-dev/references/FigmaExtractionChecklist.md +144 -0
- package/.agents/skills/1money-component-dev/references/HooksGuide.md +360 -0
- package/.agents/skills/1money-component-dev/references/SemanticColors.md +215 -0
- package/.agents/skills/1money-component-dev/references/StyleSystemAPI.md +389 -0
- package/.claude/settings.local.json +103 -0
- package/.claude/skills/1money-component-dev/SKILL.md +229 -0
- package/.claude/skills/1money-component-dev/checklist.md +159 -0
- package/.claude/skills/1money-component-dev/references/ComponentPatterns.md +478 -0
- package/.claude/skills/1money-component-dev/references/FigmaExtractionChecklist.md +144 -0
- package/.claude/skills/1money-component-dev/references/HooksGuide.md +360 -0
- package/.claude/skills/1money-component-dev/references/SemanticColors.md +215 -0
- package/.claude/skills/1money-component-dev/references/StyleSystemAPI.md +389 -0
- package/.claude/skills/1money-component-review/SKILL.md +316 -0
- package/.claude/skills/component-pipeline/SKILL.md +116 -0
- package/.claude/skills/component-pipeline/checklist.md +125 -0
- package/.hintrc +13 -0
- package/@types/global.d.ts +28 -0
- package/AGENTS.md +540 -0
- package/CLAUDE.md +1 -0
- package/LICENSE +21 -0
- package/README.md +169 -0
- package/es/components/Accordion/Accordion.d.ts +6 -0
- package/es/components/Accordion/Accordion.js +102 -0
- package/es/components/Accordion/index.d.ts +4 -0
- package/es/components/Accordion/index.js +5 -0
- package/es/components/Accordion/interface.d.ts +29 -0
- package/es/components/Accordion/interface.js +2 -0
- package/es/components/Accordion/style/Accordion.css +1 -0
- package/es/components/Accordion/style/Accordion.scss +127 -0
- package/es/components/Accordion/style/css.js +2 -0
- package/es/components/Accordion/style/index.d.ts +1 -0
- package/es/components/Accordion/style/index.js +2 -0
- package/es/components/Alert/Alert.d.ts +6 -0
- package/es/components/Alert/Alert.js +94 -0
- package/es/components/Alert/index.d.ts +4 -0
- package/es/components/Alert/index.js +5 -0
- package/es/components/Alert/interface.d.ts +40 -0
- package/es/components/Alert/interface.js +6 -0
- package/es/components/Alert/style/Alert.css +1 -0
- package/es/components/Alert/style/Alert.scss +89 -0
- package/es/components/Alert/style/css.js +3 -0
- package/es/components/Alert/style/index.d.ts +2 -0
- package/es/components/Alert/style/index.js +3 -0
- package/es/components/Button/Button.d.ts +4 -0
- package/es/components/Button/Button.js +121 -0
- package/es/components/Button/constants.d.ts +56 -0
- package/es/components/Button/constants.js +69 -0
- package/es/components/Button/index.d.ts +5 -0
- package/es/components/Button/index.js +6 -0
- package/es/components/Button/interface.d.ts +14 -0
- package/es/components/Button/interface.js +2 -0
- package/es/components/Button/style/Button.css +1 -0
- package/es/components/Button/style/Button.scss +190 -0
- package/es/components/Button/style/css.js +2 -0
- package/es/components/Button/style/index.d.ts +1 -0
- package/es/components/Button/style/index.js +2 -0
- package/es/components/Calendar/Calendar.d.ts +7 -0
- package/es/components/Calendar/Calendar.js +112 -0
- package/es/components/Calendar/index.d.ts +4 -0
- package/es/components/Calendar/index.js +5 -0
- package/es/components/Calendar/interface.d.ts +29 -0
- package/es/components/Calendar/interface.js +2 -0
- package/es/components/Calendar/style/Calendar.css +1 -0
- package/es/components/Calendar/style/Calendar.scss +377 -0
- package/es/components/Calendar/style/css.js +2 -0
- package/es/components/Calendar/style/index.d.ts +1 -0
- package/es/components/Calendar/style/index.js +2 -0
- package/es/components/Carousel/Carousel.d.ts +6 -0
- package/es/components/Carousel/Carousel.js +46 -0
- package/es/components/Carousel/index.d.ts +4 -0
- package/es/components/Carousel/index.js +5 -0
- package/es/components/Carousel/interface.d.ts +15 -0
- package/es/components/Carousel/interface.js +2 -0
- package/es/components/Carousel/style/Carousel.css +1 -0
- package/es/components/Carousel/style/Carousel.scss +63 -0
- package/es/components/Carousel/style/css.js +2 -0
- package/es/components/Carousel/style/index.d.ts +1 -0
- package/es/components/Carousel/style/index.js +2 -0
- package/es/components/Checkbox/BaseCheckbox.d.ts +6 -0
- package/es/components/Checkbox/BaseCheckbox.js +84 -0
- package/es/components/Checkbox/Checkbox.d.ts +6 -0
- package/es/components/Checkbox/Checkbox.js +120 -0
- package/es/components/Checkbox/CheckboxGroup.d.ts +5 -0
- package/es/components/Checkbox/CheckboxGroup.js +140 -0
- package/es/components/Checkbox/CheckboxGroupContext.d.ts +14 -0
- package/es/components/Checkbox/CheckboxGroupContext.js +3 -0
- package/es/components/Checkbox/constants.d.ts +7 -0
- package/es/components/Checkbox/constants.js +8 -0
- package/es/components/Checkbox/index.d.ts +10 -0
- package/es/components/Checkbox/index.js +10 -0
- package/es/components/Checkbox/interface.d.ts +77 -0
- package/es/components/Checkbox/interface.js +2 -0
- package/es/components/Checkbox/style/Checkbox.css +1 -0
- package/es/components/Checkbox/style/Checkbox.scss +235 -0
- package/es/components/Checkbox/style/css.js +2 -0
- package/es/components/Checkbox/style/index.d.ts +1 -0
- package/es/components/Checkbox/style/index.js +2 -0
- package/es/components/CoachMark/CoachMark.d.ts +4 -0
- package/es/components/CoachMark/CoachMark.js +142 -0
- package/es/components/CoachMark/index.d.ts +4 -0
- package/es/components/CoachMark/index.js +5 -0
- package/es/components/CoachMark/interface.d.ts +47 -0
- package/es/components/CoachMark/interface.js +2 -0
- package/es/components/CoachMark/style/CoachMark.css +1 -0
- package/es/components/CoachMark/style/CoachMark.scss +176 -0
- package/es/components/CoachMark/style/css.js +5 -0
- package/es/components/CoachMark/style/index.d.ts +4 -0
- package/es/components/CoachMark/style/index.js +5 -0
- package/es/components/Copy/Copy.d.ts +6 -0
- package/es/components/Copy/Copy.js +70 -0
- package/es/components/Copy/index.d.ts +4 -0
- package/es/components/Copy/index.js +5 -0
- package/es/components/Copy/interface.d.ts +20 -0
- package/es/components/Copy/interface.js +2 -0
- package/es/components/Copy/style/Copy.css +1 -0
- package/es/components/Copy/style/Copy.scss +35 -0
- package/es/components/Copy/style/css.js +2 -0
- package/es/components/Copy/style/index.d.ts +1 -0
- package/es/components/Copy/style/index.js +2 -0
- package/es/components/Divider/Divider.d.ts +4 -0
- package/es/components/Divider/Divider.js +53 -0
- package/es/components/Divider/index.d.ts +4 -0
- package/es/components/Divider/index.js +5 -0
- package/es/components/Divider/interface.d.ts +20 -0
- package/es/components/Divider/interface.js +2 -0
- package/es/components/Divider/style/Divider.css +1 -0
- package/es/components/Divider/style/Divider.scss +149 -0
- package/es/components/Divider/style/css.js +2 -0
- package/es/components/Divider/style/index.d.ts +1 -0
- package/es/components/Divider/style/index.js +2 -0
- package/es/components/Drawer/Drawer.d.ts +4 -0
- package/es/components/Drawer/Drawer.js +271 -0
- package/es/components/Drawer/constants.d.ts +15 -0
- package/es/components/Drawer/constants.js +16 -0
- package/es/components/Drawer/index.d.ts +3 -0
- package/es/components/Drawer/index.js +4 -0
- package/es/components/Drawer/interface.d.ts +79 -0
- package/es/components/Drawer/interface.js +2 -0
- package/es/components/Drawer/style/Drawer.css +1 -0
- package/es/components/Drawer/style/Drawer.scss +163 -0
- package/es/components/Drawer/style/css.js +2 -0
- package/es/components/Drawer/style/index.d.ts +1 -0
- package/es/components/Drawer/style/index.js +2 -0
- package/es/components/Dropdown/Dropdown.d.ts +5 -0
- package/es/components/Dropdown/Dropdown.js +24 -0
- package/es/components/Dropdown/index.d.ts +3 -0
- package/es/components/Dropdown/index.js +4 -0
- package/es/components/Dropdown/interface.d.ts +8 -0
- package/es/components/Dropdown/interface.js +2 -0
- package/es/components/Dropdown/style/Dropdown.css +0 -0
- package/es/components/Dropdown/style/Dropdown.scss +2 -0
- package/es/components/Dropdown/style/css.js +3 -0
- package/es/components/Dropdown/style/index.d.ts +2 -0
- package/es/components/Dropdown/style/index.js +3 -0
- package/es/components/Empty/Empty.d.ts +6 -0
- package/es/components/Empty/Empty.js +68 -0
- package/es/components/Empty/index.d.ts +4 -0
- package/es/components/Empty/index.js +5 -0
- package/es/components/Empty/interface.d.ts +11 -0
- package/es/components/Empty/interface.js +2 -0
- package/es/components/Empty/style/Empty.css +1 -0
- package/es/components/Empty/style/Empty.scss +53 -0
- package/es/components/Empty/style/css.js +3 -0
- package/es/components/Empty/style/index.d.ts +2 -0
- package/es/components/Empty/style/index.js +3 -0
- package/es/components/Flex/Flex.d.ts +5 -0
- package/es/components/Flex/Flex.js +50 -0
- package/es/components/Flex/constants.d.ts +41 -0
- package/es/components/Flex/constants.js +45 -0
- package/es/components/Flex/index.d.ts +5 -0
- package/es/components/Flex/index.js +6 -0
- package/es/components/Flex/interface.d.ts +13 -0
- package/es/components/Flex/interface.js +2 -0
- package/es/components/Flex/style/Flex.css +1 -0
- package/es/components/Flex/style/Flex.scss +70 -0
- package/es/components/Flex/style/css.js +2 -0
- package/es/components/Flex/style/index.d.ts +1 -0
- package/es/components/Flex/style/index.js +2 -0
- package/es/components/Form/Form.d.ts +4 -0
- package/es/components/Form/Form.js +73 -0
- package/es/components/Form/FormItem.d.ts +4 -0
- package/es/components/Form/FormItem.js +183 -0
- package/es/components/Form/constants.d.ts +19 -0
- package/es/components/Form/constants.js +19 -0
- package/es/components/Form/context.d.ts +5 -0
- package/es/components/Form/context.js +19 -0
- package/es/components/Form/hooks/useForm.d.ts +3 -0
- package/es/components/Form/hooks/useForm.js +541 -0
- package/es/components/Form/hooks/useFormCore.d.ts +3 -0
- package/es/components/Form/hooks/useFormCore.js +348 -0
- package/es/components/Form/index.d.ts +10 -0
- package/es/components/Form/index.js +17 -0
- package/es/components/Form/interface.d.ts +166 -0
- package/es/components/Form/interface.js +2 -0
- package/es/components/Form/style/Form.css +1 -0
- package/es/components/Form/style/Form.scss +57 -0
- package/es/components/Form/style/css.js +2 -0
- package/es/components/Form/style/index.d.ts +1 -0
- package/es/components/Form/style/index.js +2 -0
- package/es/components/Grid/Col.d.ts +4 -0
- package/es/components/Grid/Col.js +83 -0
- package/es/components/Grid/Grid.d.ts +10 -0
- package/es/components/Grid/Grid.js +15 -0
- package/es/components/Grid/Row.d.ts +4 -0
- package/es/components/Grid/Row.js +41 -0
- package/es/components/Grid/constants.d.ts +48 -0
- package/es/components/Grid/constants.js +71 -0
- package/es/components/Grid/helper.d.ts +15 -0
- package/es/components/Grid/helper.js +87 -0
- package/es/components/Grid/index.d.ts +7 -0
- package/es/components/Grid/index.js +8 -0
- package/es/components/Grid/interface.d.ts +38 -0
- package/es/components/Grid/interface.js +2 -0
- package/es/components/Grid/style/Grid.css +1 -0
- package/es/components/Grid/style/Grid.scss +184 -0
- package/es/components/Grid/style/css.js +2 -0
- package/es/components/Grid/style/index.d.ts +1 -0
- package/es/components/Grid/style/index.js +2 -0
- package/es/components/Icons/Icons.d.ts +192 -0
- package/es/components/Icons/Icons.js +192 -0
- package/es/components/Icons/Illustrations.d.ts +18 -0
- package/es/components/Icons/Illustrations.js +874 -0
- package/es/components/Icons/Logo.d.ts +36 -0
- package/es/components/Icons/Logo.js +209 -0
- package/es/components/Icons/SVGs.d.ts +265 -0
- package/es/components/Icons/SVGs.js +1918 -0
- package/es/components/Icons/Wrapper.d.ts +6 -0
- package/es/components/Icons/Wrapper.js +100 -0
- package/es/components/Icons/index.d.ts +4 -0
- package/es/components/Icons/index.js +4 -0
- package/es/components/Icons/interface.d.ts +27 -0
- package/es/components/Icons/interface.js +2 -0
- package/es/components/Icons/style/Icons.css +1 -0
- package/es/components/Icons/style/Icons.scss +85 -0
- package/es/components/Icons/style/css.js +2 -0
- package/es/components/Icons/style/index.d.ts +1 -0
- package/es/components/Icons/style/index.js +2 -0
- package/es/components/Input/Amount/Amount.d.ts +6 -0
- package/es/components/Input/Amount/Amount.js +192 -0
- package/es/components/Input/Amount/helper.d.ts +35 -0
- package/es/components/Input/Amount/helper.js +95 -0
- package/es/components/Input/Amount/index.d.ts +3 -0
- package/es/components/Input/Amount/index.js +4 -0
- package/es/components/Input/Amount/style/Amount.css +1 -0
- package/es/components/Input/Amount/style/Amount.scss +89 -0
- package/es/components/Input/Amount/style/css.js +2 -0
- package/es/components/Input/Amount/style/index.d.ts +1 -0
- package/es/components/Input/Amount/style/index.js +2 -0
- package/es/components/Input/FieldShell/FieldShell.css +1 -0
- package/es/components/Input/FieldShell/FieldShell.d.ts +19 -0
- package/es/components/Input/FieldShell/FieldShell.js +76 -0
- package/es/components/Input/FieldShell/FieldShell.scss +62 -0
- package/es/components/Input/FieldShell/index.d.ts +3 -0
- package/es/components/Input/FieldShell/index.js +3 -0
- package/es/components/Input/Input/Input.css +1 -0
- package/es/components/Input/Input/Input.d.ts +3 -0
- package/es/components/Input/Input/Input.js +158 -0
- package/es/components/Input/Input/Input.scss +131 -0
- package/es/components/Input/Input/index.d.ts +2 -0
- package/es/components/Input/Input/index.js +3 -0
- package/es/components/Input/Mask/Mask.d.ts +5 -0
- package/es/components/Input/Mask/Mask.js +337 -0
- package/es/components/Input/Mask/index.d.ts +2 -0
- package/es/components/Input/Mask/index.js +3 -0
- package/es/components/Input/OTP/OTP.css +1 -0
- package/es/components/Input/OTP/OTP.d.ts +5 -0
- package/es/components/Input/OTP/OTP.js +150 -0
- package/es/components/Input/OTP/OTP.scss +75 -0
- package/es/components/Input/OTP/index.d.ts +2 -0
- package/es/components/Input/OTP/index.js +3 -0
- package/es/components/Input/Password/Password.d.ts +5 -0
- package/es/components/Input/Password/Password.js +121 -0
- package/es/components/Input/Password/index.d.ts +2 -0
- package/es/components/Input/Password/index.js +3 -0
- package/es/components/Input/Search/Search.d.ts +5 -0
- package/es/components/Input/Search/Search.js +144 -0
- package/es/components/Input/Search/index.d.ts +2 -0
- package/es/components/Input/Search/index.js +3 -0
- package/es/components/Input/TextArea/TextArea.css +1 -0
- package/es/components/Input/TextArea/TextArea.d.ts +5 -0
- package/es/components/Input/TextArea/TextArea.js +93 -0
- package/es/components/Input/TextArea/TextArea.scss +87 -0
- package/es/components/Input/TextArea/index.d.ts +2 -0
- package/es/components/Input/TextArea/index.js +3 -0
- package/es/components/Input/Trade/Trade.css +1 -0
- package/es/components/Input/Trade/Trade.d.ts +5 -0
- package/es/components/Input/Trade/Trade.js +130 -0
- package/es/components/Input/Trade/Trade.scss +184 -0
- package/es/components/Input/Trade/index.d.ts +2 -0
- package/es/components/Input/Trade/index.js +3 -0
- package/es/components/Input/constants.d.ts +15 -0
- package/es/components/Input/constants.js +16 -0
- package/es/components/Input/index.d.ts +4 -0
- package/es/components/Input/index.js +5 -0
- package/es/components/Input/interface.d.ts +153 -0
- package/es/components/Input/interface.js +2 -0
- package/es/components/Input/style/css.js +7 -0
- package/es/components/Input/style/index.d.ts +6 -0
- package/es/components/Input/style/index.js +7 -0
- package/es/components/Input/useAmountInput.d.ts +35 -0
- package/es/components/Input/useAmountInput.js +207 -0
- package/es/components/Input/useSyncRef.d.ts +2 -0
- package/es/components/Input/useSyncRef.js +13 -0
- package/es/components/Modal/Modal.d.ts +4 -0
- package/es/components/Modal/Modal.js +383 -0
- package/es/components/Modal/constants.d.ts +58 -0
- package/es/components/Modal/constants.js +55 -0
- package/es/components/Modal/index.d.ts +4 -0
- package/es/components/Modal/index.js +5 -0
- package/es/components/Modal/interface.d.ts +37 -0
- package/es/components/Modal/interface.js +2 -0
- package/es/components/Modal/style/Modal.css +1 -0
- package/es/components/Modal/style/Modal.scss +254 -0
- package/es/components/Modal/style/css.js +2 -0
- package/es/components/Modal/style/index.d.ts +1 -0
- package/es/components/Modal/style/index.js +2 -0
- package/es/components/Navigation/Nav.d.ts +5 -0
- package/es/components/Navigation/Nav.js +198 -0
- package/es/components/Navigation/Navigation.d.ts +5 -0
- package/es/components/Navigation/Navigation.js +299 -0
- package/es/components/Navigation/NavigationLogo.d.ts +7 -0
- package/es/components/Navigation/NavigationLogo.js +36 -0
- package/es/components/Navigation/index.d.ts +5 -0
- package/es/components/Navigation/index.js +6 -0
- package/es/components/Navigation/interface.d.ts +95 -0
- package/es/components/Navigation/interface.js +2 -0
- package/es/components/Navigation/style/Nav.css +1 -0
- package/es/components/Navigation/style/Nav.scss +174 -0
- package/es/components/Navigation/style/Navigation.css +1 -0
- package/es/components/Navigation/style/Navigation.scss +443 -0
- package/es/components/Navigation/style/css.js +3 -0
- package/es/components/Navigation/style/index.d.ts +2 -0
- package/es/components/Navigation/style/index.js +3 -0
- package/es/components/Notification/Notification.d.ts +6 -0
- package/es/components/Notification/Notification.js +114 -0
- package/es/components/Notification/NotificationStatic.d.ts +4 -0
- package/es/components/Notification/NotificationStatic.js +501 -0
- package/es/components/Notification/constants.d.ts +5 -0
- package/es/components/Notification/constants.js +7 -0
- package/es/components/Notification/index.d.ts +5 -0
- package/es/components/Notification/index.js +5 -0
- package/es/components/Notification/interface.d.ts +70 -0
- package/es/components/Notification/interface.js +7 -0
- package/es/components/Notification/style/Notification.css +1 -0
- package/es/components/Notification/style/Notification.scss +200 -0
- package/es/components/Notification/style/css.js +2 -0
- package/es/components/Notification/style/index.d.ts +1 -0
- package/es/components/Notification/style/index.js +2 -0
- package/es/components/Pagination/Pagination.d.ts +5 -0
- package/es/components/Pagination/Pagination.js +137 -0
- package/es/components/Pagination/constants.d.ts +53 -0
- package/es/components/Pagination/constants.js +56 -0
- package/es/components/Pagination/index.d.ts +6 -0
- package/es/components/Pagination/index.js +7 -0
- package/es/components/Pagination/interface.d.ts +54 -0
- package/es/components/Pagination/interface.js +2 -0
- package/es/components/Pagination/style/Pagination.css +1 -0
- package/es/components/Pagination/style/Pagination.scss +95 -0
- package/es/components/Pagination/style/css.js +2 -0
- package/es/components/Pagination/style/index.d.ts +1 -0
- package/es/components/Pagination/style/index.js +2 -0
- package/es/components/Pagination/usePagination.d.ts +3 -0
- package/es/components/Pagination/usePagination.js +154 -0
- package/es/components/Popconfirm/Popconfirm.d.ts +6 -0
- package/es/components/Popconfirm/Popconfirm.js +131 -0
- package/es/components/Popconfirm/constants.d.ts +72 -0
- package/es/components/Popconfirm/constants.js +71 -0
- package/es/components/Popconfirm/index.d.ts +4 -0
- package/es/components/Popconfirm/index.js +5 -0
- package/es/components/Popconfirm/interface.d.ts +40 -0
- package/es/components/Popconfirm/interface.js +2 -0
- package/es/components/Popconfirm/style/Popconfirm.css +1 -0
- package/es/components/Popconfirm/style/Popconfirm.scss +264 -0
- package/es/components/Popconfirm/style/css.js +5 -0
- package/es/components/Popconfirm/style/index.d.ts +4 -0
- package/es/components/Popconfirm/style/index.js +5 -0
- package/es/components/Portal/Portal.d.ts +3 -0
- package/es/components/Portal/Portal.js +54 -0
- package/es/components/Portal/index.d.ts +4 -0
- package/es/components/Portal/index.js +5 -0
- package/es/components/Portal/interface.d.ts +7 -0
- package/es/components/Portal/interface.js +2 -0
- package/es/components/ProForm/ProForm.d.ts +3 -0
- package/es/components/ProForm/ProForm.js +254 -0
- package/es/components/ProForm/ProFormDependency.d.ts +3 -0
- package/es/components/ProForm/ProFormDependency.js +69 -0
- package/es/components/ProForm/ProFormGroup.d.ts +3 -0
- package/es/components/ProForm/ProFormGroup.js +78 -0
- package/es/components/ProForm/ProFormList.d.ts +3 -0
- package/es/components/ProForm/ProFormList.js +253 -0
- package/es/components/ProForm/Submitter.d.ts +6 -0
- package/es/components/ProForm/Submitter.js +67 -0
- package/es/components/ProForm/constants.d.ts +18 -0
- package/es/components/ProForm/constants.js +23 -0
- package/es/components/ProForm/context.d.ts +5 -0
- package/es/components/ProForm/context.js +26 -0
- package/es/components/ProForm/fields/ProFormCheckbox.d.ts +3 -0
- package/es/components/ProForm/fields/ProFormCheckbox.js +11 -0
- package/es/components/ProForm/fields/ProFormCheckboxGroup.d.ts +3 -0
- package/es/components/ProForm/fields/ProFormCheckboxGroup.js +12 -0
- package/es/components/ProForm/fields/ProFormDatePicker.d.ts +3 -0
- package/es/components/ProForm/fields/ProFormDatePicker.js +23 -0
- package/es/components/ProForm/fields/ProFormFieldSet.d.ts +4 -0
- package/es/components/ProForm/fields/ProFormFieldSet.js +62 -0
- package/es/components/ProForm/fields/ProFormPassword.d.ts +3 -0
- package/es/components/ProForm/fields/ProFormPassword.js +11 -0
- package/es/components/ProForm/fields/ProFormRadioGroup.d.ts +3 -0
- package/es/components/ProForm/fields/ProFormRadioGroup.js +10 -0
- package/es/components/ProForm/fields/ProFormSelect.d.ts +3 -0
- package/es/components/ProForm/fields/ProFormSelect.js +40 -0
- package/es/components/ProForm/fields/ProFormSlider.d.ts +3 -0
- package/es/components/ProForm/fields/ProFormSlider.js +10 -0
- package/es/components/ProForm/fields/ProFormSwitch.d.ts +3 -0
- package/es/components/ProForm/fields/ProFormSwitch.js +11 -0
- package/es/components/ProForm/fields/ProFormText.d.ts +3 -0
- package/es/components/ProForm/fields/ProFormText.js +10 -0
- package/es/components/ProForm/fields/ProFormTextArea.d.ts +3 -0
- package/es/components/ProForm/fields/ProFormTextArea.js +10 -0
- package/es/components/ProForm/fields/ProFormUpload.d.ts +3 -0
- package/es/components/ProForm/fields/ProFormUpload.js +25 -0
- package/es/components/ProForm/fields/createProFormField.d.ts +4 -0
- package/es/components/ProForm/fields/createProFormField.js +229 -0
- package/es/components/ProForm/fields/index.d.ts +13 -0
- package/es/components/ProForm/fields/index.js +14 -0
- package/es/components/ProForm/hooks/useFieldRequest.d.ts +7 -0
- package/es/components/ProForm/hooks/useFieldRequest.js +90 -0
- package/es/components/ProForm/index.d.ts +30 -0
- package/es/components/ProForm/index.js +37 -0
- package/es/components/ProForm/interface.d.ts +240 -0
- package/es/components/ProForm/interface.js +2 -0
- package/es/components/ProForm/layouts/DrawerForm.d.ts +3 -0
- package/es/components/ProForm/layouts/DrawerForm.js +73 -0
- package/es/components/ProForm/layouts/ModalForm.d.ts +3 -0
- package/es/components/ProForm/layouts/ModalForm.js +74 -0
- package/es/components/ProForm/layouts/QueryFilter.d.ts +4 -0
- package/es/components/ProForm/layouts/QueryFilter.js +158 -0
- package/es/components/ProForm/layouts/index.d.ts +4 -0
- package/es/components/ProForm/layouts/index.js +5 -0
- package/es/components/ProForm/layouts/useOverlayForm.d.ts +17 -0
- package/es/components/ProForm/layouts/useOverlayForm.js +107 -0
- package/es/components/ProForm/style/ProForm.css +1 -0
- package/es/components/ProForm/style/ProForm.scss +118 -0
- package/es/components/ProForm/style/css.js +2 -0
- package/es/components/ProForm/style/index.d.ts +1 -0
- package/es/components/ProForm/style/index.js +2 -0
- package/es/components/ProForm/utils.d.ts +22 -0
- package/es/components/ProForm/utils.js +211 -0
- package/es/components/Progress/Progress.d.ts +6 -0
- package/es/components/Progress/Progress.js +94 -0
- package/es/components/Progress/constants.d.ts +26 -0
- package/es/components/Progress/constants.js +32 -0
- package/es/components/Progress/index.d.ts +5 -0
- package/es/components/Progress/index.js +6 -0
- package/es/components/Progress/interface.d.ts +26 -0
- package/es/components/Progress/interface.js +2 -0
- package/es/components/Progress/style/Progress.css +1 -0
- package/es/components/Progress/style/Progress.scss +120 -0
- package/es/components/Progress/style/css.js +2 -0
- package/es/components/Progress/style/index.d.ts +1 -0
- package/es/components/Progress/style/index.js +2 -0
- package/es/components/Radio/BaseRadio.d.ts +16 -0
- package/es/components/Radio/BaseRadio.js +58 -0
- package/es/components/Radio/Radio.d.ts +6 -0
- package/es/components/Radio/Radio.js +179 -0
- package/es/components/Radio/RadioGroup.d.ts +5 -0
- package/es/components/Radio/RadioGroup.js +100 -0
- package/es/components/Radio/RadioGroupContext.d.ts +22 -0
- package/es/components/Radio/RadioGroupContext.js +7 -0
- package/es/components/Radio/constants.d.ts +36 -0
- package/es/components/Radio/constants.js +63 -0
- package/es/components/Radio/index.d.ts +5 -0
- package/es/components/Radio/index.js +6 -0
- package/es/components/Radio/interface.d.ts +115 -0
- package/es/components/Radio/interface.js +2 -0
- package/es/components/Radio/style/Radio.css +1 -0
- package/es/components/Radio/style/Radio.scss +431 -0
- package/es/components/Radio/style/css.js +3 -0
- package/es/components/Radio/style/index.d.ts +2 -0
- package/es/components/Radio/style/index.js +3 -0
- package/es/components/ResizeObserver/Collection.d.ts +19 -0
- package/es/components/ResizeObserver/Collection.js +41 -0
- package/es/components/ResizeObserver/ResizeObserver.d.ts +7 -0
- package/es/components/ResizeObserver/ResizeObserver.js +31 -0
- package/es/components/ResizeObserver/SingleObserver/index.d.ts +7 -0
- package/es/components/ResizeObserver/SingleObserver/index.js +38 -0
- package/es/components/ResizeObserver/index.d.ts +7 -0
- package/es/components/ResizeObserver/index.js +6 -0
- package/es/components/ResizeObserver/interface.d.ts +16 -0
- package/es/components/ResizeObserver/interface.js +2 -0
- package/es/components/ResizeObserver/useResizeObserver.d.ts +2 -0
- package/es/components/ResizeObserver/useResizeObserver.js +70 -0
- package/es/components/ResizeObserver/utils/observerUtil.d.ts +7 -0
- package/es/components/ResizeObserver/utils/observerUtil.js +39 -0
- package/es/components/ResizeObserver/utils/reactUtil.d.ts +19 -0
- package/es/components/ResizeObserver/utils/reactUtil.js +78 -0
- package/es/components/Segment/Segment.d.ts +6 -0
- package/es/components/Segment/Segment.js +100 -0
- package/es/components/Segment/index.d.ts +4 -0
- package/es/components/Segment/index.js +5 -0
- package/es/components/Segment/interface.d.ts +23 -0
- package/es/components/Segment/interface.js +2 -0
- package/es/components/Segment/style/Segment.css +1 -0
- package/es/components/Segment/style/Segment.scss +80 -0
- package/es/components/Segment/style/css.js +2 -0
- package/es/components/Segment/style/index.d.ts +1 -0
- package/es/components/Segment/style/index.js +2 -0
- package/es/components/Select/Select.d.ts +6 -0
- package/es/components/Select/Select.js +520 -0
- package/es/components/Select/SelectFieldShell.d.ts +22 -0
- package/es/components/Select/SelectFieldShell.js +73 -0
- package/es/components/Select/SelectOptionContent.d.ts +9 -0
- package/es/components/Select/SelectOptionContent.js +36 -0
- package/es/components/Select/SelectSearchControl.d.ts +12 -0
- package/es/components/Select/SelectSearchControl.js +38 -0
- package/es/components/Select/SelectValueContent.d.ts +18 -0
- package/es/components/Select/SelectValueContent.js +99 -0
- package/es/components/Select/constants.d.ts +14 -0
- package/es/components/Select/constants.js +20 -0
- package/es/components/Select/index.d.ts +4 -0
- package/es/components/Select/index.js +5 -0
- package/es/components/Select/interface.d.ts +83 -0
- package/es/components/Select/interface.js +4 -0
- package/es/components/Select/style/Select.css +1 -0
- package/es/components/Select/style/Select.scss +480 -0
- package/es/components/Select/style/css.js +4 -0
- package/es/components/Select/style/index.d.ts +3 -0
- package/es/components/Select/style/index.js +4 -0
- package/es/components/Select/utils.d.ts +21 -0
- package/es/components/Select/utils.js +140 -0
- package/es/components/Skeleton/Skeleton.d.ts +6 -0
- package/es/components/Skeleton/Skeleton.js +49 -0
- package/es/components/Skeleton/index.d.ts +4 -0
- package/es/components/Skeleton/index.js +5 -0
- package/es/components/Skeleton/interface.d.ts +19 -0
- package/es/components/Skeleton/interface.js +2 -0
- package/es/components/Skeleton/style/Skeleton.css +1 -0
- package/es/components/Skeleton/style/Skeleton.scss +47 -0
- package/es/components/Skeleton/style/css.js +2 -0
- package/es/components/Skeleton/style/index.d.ts +1 -0
- package/es/components/Skeleton/style/index.js +2 -0
- package/es/components/Slider/Slider.d.ts +6 -0
- package/es/components/Slider/Slider.js +116 -0
- package/es/components/Slider/index.d.ts +4 -0
- package/es/components/Slider/index.js +5 -0
- package/es/components/Slider/interface.d.ts +39 -0
- package/es/components/Slider/interface.js +2 -0
- package/es/components/Slider/style/Slider.css +1 -0
- package/es/components/Slider/style/Slider.scss +182 -0
- package/es/components/Slider/style/css.js +2 -0
- package/es/components/Slider/style/index.d.ts +1 -0
- package/es/components/Slider/style/index.js +2 -0
- package/es/components/Space/Space.d.ts +5 -0
- package/es/components/Space/Space.js +78 -0
- package/es/components/Space/constants.d.ts +33 -0
- package/es/components/Space/constants.js +37 -0
- package/es/components/Space/index.d.ts +5 -0
- package/es/components/Space/index.js +6 -0
- package/es/components/Space/interface.d.ts +12 -0
- package/es/components/Space/interface.js +2 -0
- package/es/components/Space/style/Space.css +1 -0
- package/es/components/Space/style/Space.scss +40 -0
- package/es/components/Space/style/css.js +2 -0
- package/es/components/Space/style/index.d.ts +1 -0
- package/es/components/Space/style/index.js +2 -0
- package/es/components/Spinner/Spinner.d.ts +6 -0
- package/es/components/Spinner/Spinner.js +83 -0
- package/es/components/Spinner/index.d.ts +4 -0
- package/es/components/Spinner/index.js +5 -0
- package/es/components/Spinner/interface.d.ts +14 -0
- package/es/components/Spinner/interface.js +2 -0
- package/es/components/Spinner/style/Spinner.css +1 -0
- package/es/components/Spinner/style/Spinner.scss +90 -0
- package/es/components/Spinner/style/css.js +2 -0
- package/es/components/Spinner/style/index.d.ts +1 -0
- package/es/components/Spinner/style/index.js +2 -0
- package/es/components/Step/Step.d.ts +5 -0
- package/es/components/Step/Step.js +116 -0
- package/es/components/Step/constants.d.ts +59 -0
- package/es/components/Step/constants.js +65 -0
- package/es/components/Step/index.d.ts +4 -0
- package/es/components/Step/index.js +5 -0
- package/es/components/Step/interface.d.ts +22 -0
- package/es/components/Step/interface.js +2 -0
- package/es/components/Step/style/Step.css +1 -0
- package/es/components/Step/style/Step.scss +91 -0
- package/es/components/Step/style/css.js +2 -0
- package/es/components/Step/style/index.d.ts +1 -0
- package/es/components/Step/style/index.js +2 -0
- package/es/components/Switch/Switch.d.ts +6 -0
- package/es/components/Switch/Switch.js +93 -0
- package/es/components/Switch/constants.d.ts +11 -0
- package/es/components/Switch/constants.js +12 -0
- package/es/components/Switch/index.d.ts +5 -0
- package/es/components/Switch/index.js +6 -0
- package/es/components/Switch/interface.d.ts +26 -0
- package/es/components/Switch/interface.js +2 -0
- package/es/components/Switch/style/Switch.css +1 -0
- package/es/components/Switch/style/Switch.scss +126 -0
- package/es/components/Switch/style/css.js +3 -0
- package/es/components/Switch/style/index.d.ts +2 -0
- package/es/components/Switch/style/index.js +3 -0
- package/es/components/Table/Table.d.ts +10 -0
- package/es/components/Table/Table.js +164 -0
- package/es/components/Table/VirtualTable.d.ts +9 -0
- package/es/components/Table/VirtualTable.js +166 -0
- package/es/components/Table/constants.d.ts +4 -0
- package/es/components/Table/constants.js +5 -0
- package/es/components/Table/core/useTableColumns.d.ts +34 -0
- package/es/components/Table/core/useTableColumns.js +191 -0
- package/es/components/Table/core/useTableDataPipeline.d.ts +50 -0
- package/es/components/Table/core/useTableDataPipeline.js +262 -0
- package/es/components/Table/core/useTableExpand.d.ts +9 -0
- package/es/components/Table/core/useTableExpand.js +38 -0
- package/es/components/Table/core/useTableSelection.d.ts +17 -0
- package/es/components/Table/core/useTableSelection.js +144 -0
- package/es/components/Table/features/ExpandTrigger.d.ts +4 -0
- package/es/components/Table/features/ExpandTrigger.js +24 -0
- package/es/components/Table/features/SelectionColumn.d.ts +11 -0
- package/es/components/Table/features/SelectionColumn.js +41 -0
- package/es/components/Table/features/SortTrigger.d.ts +7 -0
- package/es/components/Table/features/SortTrigger.js +26 -0
- package/es/components/Table/index.d.ts +6 -0
- package/es/components/Table/index.js +7 -0
- package/es/components/Table/interface.d.ts +179 -0
- package/es/components/Table/interface.js +2 -0
- package/es/components/Table/internal/index.d.ts +3 -0
- package/es/components/Table/internal/index.js +3 -0
- package/es/components/Table/internal/kernel/Body/BodyRow.d.ts +37 -0
- package/es/components/Table/internal/kernel/Body/BodyRow.js +174 -0
- package/es/components/Table/internal/kernel/Body/ExpandedRow.d.ts +15 -0
- package/es/components/Table/internal/kernel/Body/ExpandedRow.js +56 -0
- package/es/components/Table/internal/kernel/Body/MeasureCell.d.ts +8 -0
- package/es/components/Table/internal/kernel/Body/MeasureCell.js +39 -0
- package/es/components/Table/internal/kernel/Body/MeasureRow.d.ts +10 -0
- package/es/components/Table/internal/kernel/Body/MeasureRow.js +53 -0
- package/es/components/Table/internal/kernel/Body/index.d.ts +9 -0
- package/es/components/Table/internal/kernel/Body/index.js +124 -0
- package/es/components/Table/internal/kernel/Cell/index.d.ts +39 -0
- package/es/components/Table/internal/kernel/Cell/index.js +179 -0
- package/es/components/Table/internal/kernel/Cell/useCellRender.d.ts +3 -0
- package/es/components/Table/internal/kernel/Cell/useCellRender.js +63 -0
- package/es/components/Table/internal/kernel/Cell/useHoverState.d.ts +2 -0
- package/es/components/Table/internal/kernel/Cell/useHoverState.js +15 -0
- package/es/components/Table/internal/kernel/ColGroup.d.ts +8 -0
- package/es/components/Table/internal/kernel/ColGroup.js +56 -0
- package/es/components/Table/internal/kernel/FixedHolder/index.d.ts +27 -0
- package/es/components/Table/internal/kernel/FixedHolder/index.js +181 -0
- package/es/components/Table/internal/kernel/Footer/Cell.d.ts +11 -0
- package/es/components/Table/internal/kernel/Footer/Cell.js +50 -0
- package/es/components/Table/internal/kernel/Footer/Row.d.ts +8 -0
- package/es/components/Table/internal/kernel/Footer/Row.js +20 -0
- package/es/components/Table/internal/kernel/Footer/Summary.d.ts +14 -0
- package/es/components/Table/internal/kernel/Footer/Summary.js +13 -0
- package/es/components/Table/internal/kernel/Footer/SummaryContext.d.ts +11 -0
- package/es/components/Table/internal/kernel/Footer/SummaryContext.js +4 -0
- package/es/components/Table/internal/kernel/Footer/index.d.ts +16 -0
- package/es/components/Table/internal/kernel/Footer/index.js +36 -0
- package/es/components/Table/internal/kernel/Header/Header.d.ts +9 -0
- package/es/components/Table/internal/kernel/Header/Header.js +109 -0
- package/es/components/Table/internal/kernel/Header/HeaderRow.d.ts +18 -0
- package/es/components/Table/internal/kernel/Header/HeaderRow.js +60 -0
- package/es/components/Table/internal/kernel/Panel/index.d.ts +7 -0
- package/es/components/Table/internal/kernel/Panel/index.js +15 -0
- package/es/components/Table/internal/kernel/Table.d.ts +126 -0
- package/es/components/Table/internal/kernel/Table.js +692 -0
- package/es/components/Table/internal/kernel/VirtualTable/BodyGrid.d.ts +13 -0
- package/es/components/Table/internal/kernel/VirtualTable/BodyGrid.js +287 -0
- package/es/components/Table/internal/kernel/VirtualTable/BodyLine.d.ts +14 -0
- package/es/components/Table/internal/kernel/VirtualTable/BodyLine.js +113 -0
- package/es/components/Table/internal/kernel/VirtualTable/VirtualCell.d.ts +26 -0
- package/es/components/Table/internal/kernel/VirtualTable/VirtualCell.js +105 -0
- package/es/components/Table/internal/kernel/VirtualTable/context.d.ts +13 -0
- package/es/components/Table/internal/kernel/VirtualTable/context.js +5 -0
- package/es/components/Table/internal/kernel/VirtualTable/index.d.ts +17 -0
- package/es/components/Table/internal/kernel/VirtualTable/index.js +91 -0
- package/es/components/Table/internal/kernel/constant.d.ts +2 -0
- package/es/components/Table/internal/kernel/constant.js +4 -0
- package/es/components/Table/internal/kernel/context/PerfContext.d.ts +6 -0
- package/es/components/Table/internal/kernel/context/PerfContext.js +8 -0
- package/es/components/Table/internal/kernel/context/TableContext.d.ts +51 -0
- package/es/components/Table/internal/kernel/context/TableContext.js +10 -0
- package/es/components/Table/internal/kernel/hooks/useColumns/index.d.ts +31 -0
- package/es/components/Table/internal/kernel/hooks/useColumns/index.js +210 -0
- package/es/components/Table/internal/kernel/hooks/useColumns/useWidthColumns.d.ts +5 -0
- package/es/components/Table/internal/kernel/hooks/useColumns/useWidthColumns.js +69 -0
- package/es/components/Table/internal/kernel/hooks/useExpand.d.ts +10 -0
- package/es/components/Table/internal/kernel/hooks/useExpand.js +84 -0
- package/es/components/Table/internal/kernel/hooks/useFixedInfo.d.ts +2 -0
- package/es/components/Table/internal/kernel/hooks/useFixedInfo.js +18 -0
- package/es/components/Table/internal/kernel/hooks/useFlattenRecords.d.ts +19 -0
- package/es/components/Table/internal/kernel/hooks/useFlattenRecords.js +54 -0
- package/es/components/Table/internal/kernel/hooks/useFrame.d.ts +7 -0
- package/es/components/Table/internal/kernel/hooks/useFrame.js +63 -0
- package/es/components/Table/internal/kernel/hooks/useHover.d.ts +2 -0
- package/es/components/Table/internal/kernel/hooks/useHover.js +19 -0
- package/es/components/Table/internal/kernel/hooks/useRenderTimes.d.ts +5 -0
- package/es/components/Table/internal/kernel/hooks/useRenderTimes.js +41 -0
- package/es/components/Table/internal/kernel/hooks/useRowInfo.d.ts +11 -0
- package/es/components/Table/internal/kernel/hooks/useRowInfo.js +62 -0
- package/es/components/Table/internal/kernel/hooks/useSticky.d.ts +10 -0
- package/es/components/Table/internal/kernel/hooks/useSticky.js +33 -0
- package/es/components/Table/internal/kernel/hooks/useStickyOffsets.d.ts +6 -0
- package/es/components/Table/internal/kernel/hooks/useStickyOffsets.js +31 -0
- package/es/components/Table/internal/kernel/index.d.ts +12 -0
- package/es/components/Table/internal/kernel/index.js +11 -0
- package/es/components/Table/internal/kernel/interface.d.ts +202 -0
- package/es/components/Table/internal/kernel/interface.js +2 -0
- package/es/components/Table/internal/kernel/namePathType.d.ts +13 -0
- package/es/components/Table/internal/kernel/namePathType.js +3 -0
- package/es/components/Table/internal/kernel/selector-context/Immutable.d.ts +10 -0
- package/es/components/Table/internal/kernel/selector-context/Immutable.js +73 -0
- package/es/components/Table/internal/kernel/selector-context/context.d.ts +26 -0
- package/es/components/Table/internal/kernel/selector-context/context.js +83 -0
- package/es/components/Table/internal/kernel/selector-context/index.d.ts +7 -0
- package/es/components/Table/internal/kernel/selector-context/index.js +9 -0
- package/es/components/Table/internal/kernel/selector-context/isEqual.d.ts +5 -0
- package/es/components/Table/internal/kernel/selector-context/isEqual.js +48 -0
- package/es/components/Table/internal/kernel/stickyScrollBar.d.ts +12 -0
- package/es/components/Table/internal/kernel/stickyScrollBar.js +192 -0
- package/es/components/Table/internal/kernel/sugar/Column.d.ts +10 -0
- package/es/components/Table/internal/kernel/sugar/Column.js +11 -0
- package/es/components/Table/internal/kernel/sugar/ColumnGroup.d.ts +12 -0
- package/es/components/Table/internal/kernel/sugar/ColumnGroup.js +11 -0
- package/es/components/Table/internal/kernel/utils/dom/canUseDom.d.ts +1 -0
- package/es/components/Table/internal/kernel/utils/dom/canUseDom.js +4 -0
- package/es/components/Table/internal/kernel/utils/dom/isVisible.d.ts +2 -0
- package/es/components/Table/internal/kernel/utils/dom/isVisible.js +28 -0
- package/es/components/Table/internal/kernel/utils/expandUtil.d.ts +4 -0
- package/es/components/Table/internal/kernel/utils/expandUtil.js +47 -0
- package/es/components/Table/internal/kernel/utils/fixUtil.d.ts +21 -0
- package/es/components/Table/internal/kernel/utils/fixUtil.js +64 -0
- package/es/components/Table/internal/kernel/utils/get.d.ts +1 -0
- package/es/components/Table/internal/kernel/utils/get.js +11 -0
- package/es/components/Table/internal/kernel/utils/getScrollBarSize.d.ts +7 -0
- package/es/components/Table/internal/kernel/utils/getScrollBarSize.js +38 -0
- package/es/components/Table/internal/kernel/utils/legacyUtil.d.ts +5 -0
- package/es/components/Table/internal/kernel/utils/legacyUtil.js +31 -0
- package/es/components/Table/internal/kernel/utils/offsetUtil.d.ts +4 -0
- package/es/components/Table/internal/kernel/utils/offsetUtil.js +14 -0
- package/es/components/Table/internal/kernel/utils/pickAttrs.d.ts +6 -0
- package/es/components/Table/internal/kernel/utils/pickAttrs.js +33 -0
- package/es/components/Table/internal/kernel/utils/useMemo.d.ts +1 -0
- package/es/components/Table/internal/kernel/utils/useMemo.js +10 -0
- package/es/components/Table/internal/kernel/utils/valueUtil.d.ts +8 -0
- package/es/components/Table/internal/kernel/utils/valueUtil.js +30 -0
- package/es/components/Table/internal/kernel/utils/warning.d.ts +4 -0
- package/es/components/Table/internal/kernel/utils/warning.js +17 -0
- package/es/components/Table/renderers/BodyCell.d.ts +15 -0
- package/es/components/Table/renderers/BodyCell.js +40 -0
- package/es/components/Table/renderers/CellContent.d.ts +4 -0
- package/es/components/Table/renderers/CellContent.js +26 -0
- package/es/components/Table/renderers/EmptyState.d.ts +4 -0
- package/es/components/Table/renderers/EmptyState.js +15 -0
- package/es/components/Table/renderers/ExpandedRowContainer.d.ts +4 -0
- package/es/components/Table/renderers/ExpandedRowContainer.js +10 -0
- package/es/components/Table/renderers/HeaderCell.d.ts +7 -0
- package/es/components/Table/renderers/HeaderCell.js +22 -0
- package/es/components/Table/style/Table.css +1 -0
- package/es/components/Table/style/Table.scss +376 -0
- package/es/components/Table/style/css.js +10 -0
- package/es/components/Table/style/index.d.ts +9 -0
- package/es/components/Table/style/index.js +10 -0
- package/es/components/Tabs/Tabs.d.ts +6 -0
- package/es/components/Tabs/Tabs.js +111 -0
- package/es/components/Tabs/index.d.ts +4 -0
- package/es/components/Tabs/index.js +5 -0
- package/es/components/Tabs/interface.d.ts +27 -0
- package/es/components/Tabs/interface.js +2 -0
- package/es/components/Tabs/style/Tabs.css +1 -0
- package/es/components/Tabs/style/Tabs.scss +100 -0
- package/es/components/Tabs/style/css.js +2 -0
- package/es/components/Tabs/style/index.d.ts +1 -0
- package/es/components/Tabs/style/index.js +2 -0
- package/es/components/Tag/Tag.d.ts +6 -0
- package/es/components/Tag/Tag.js +80 -0
- package/es/components/Tag/constants.d.ts +18 -0
- package/es/components/Tag/constants.js +28 -0
- package/es/components/Tag/index.d.ts +5 -0
- package/es/components/Tag/index.js +6 -0
- package/es/components/Tag/interface.d.ts +15 -0
- package/es/components/Tag/interface.js +2 -0
- package/es/components/Tag/style/Tag.css +1 -0
- package/es/components/Tag/style/Tag.scss +103 -0
- package/es/components/Tag/style/css.js +2 -0
- package/es/components/Tag/style/index.d.ts +1 -0
- package/es/components/Tag/style/index.js +2 -0
- package/es/components/Tooltip/Tooltip.d.ts +6 -0
- package/es/components/Tooltip/Tooltip.js +62 -0
- package/es/components/Tooltip/index.d.ts +4 -0
- package/es/components/Tooltip/index.js +5 -0
- package/es/components/Tooltip/interface.d.ts +20 -0
- package/es/components/Tooltip/interface.js +2 -0
- package/es/components/Tooltip/style/Tooltip.css +1 -0
- package/es/components/Tooltip/style/Tooltip.scss +95 -0
- package/es/components/Tooltip/style/css.js +2 -0
- package/es/components/Tooltip/style/index.d.ts +1 -0
- package/es/components/Tooltip/style/index.js +2 -0
- package/es/components/Tour/Tour.d.ts +3 -0
- package/es/components/Tour/Tour.js +243 -0
- package/es/components/Tour/index.d.ts +4 -0
- package/es/components/Tour/index.js +5 -0
- package/es/components/Tour/interface.d.ts +46 -0
- package/es/components/Tour/interface.js +2 -0
- package/es/components/Trigger/Trigger.d.ts +5 -0
- package/es/components/Trigger/Trigger.js +151 -0
- package/es/components/Trigger/index.d.ts +3 -0
- package/es/components/Trigger/index.js +4 -0
- package/es/components/Trigger/interface.d.ts +52 -0
- package/es/components/Trigger/interface.js +2 -0
- package/es/components/Trigger/style/Trigger.css +1 -0
- package/es/components/Trigger/style/Trigger.scss +18 -0
- package/es/components/Trigger/style/css.js +2 -0
- package/es/components/Trigger/style/index.d.ts +1 -0
- package/es/components/Trigger/style/index.js +2 -0
- package/es/components/Typography/Typography.d.ts +17 -0
- package/es/components/Typography/Typography.js +201 -0
- package/es/components/Typography/constants.d.ts +33 -0
- package/es/components/Typography/constants.js +9 -0
- package/es/components/Typography/index.d.ts +4 -0
- package/es/components/Typography/index.js +5 -0
- package/es/components/Typography/interface.d.ts +72 -0
- package/es/components/Typography/interface.js +22 -0
- package/es/components/Typography/render.d.ts +328 -0
- package/es/components/Typography/render.js +106 -0
- package/es/components/Typography/style/Typography.css +1 -0
- package/es/components/Typography/style/Typography.scss +132 -0
- package/es/components/Typography/style/css.js +4 -0
- package/es/components/Typography/style/index.d.ts +3 -0
- package/es/components/Typography/style/index.js +4 -0
- package/es/components/Typography/useTypographyEnhancements.d.ts +43 -0
- package/es/components/Typography/useTypographyEnhancements.js +110 -0
- package/es/components/Typography/utils.d.ts +17 -0
- package/es/components/Typography/utils.js +88 -0
- package/es/components/Upload/Upload.d.ts +7 -0
- package/es/components/Upload/Upload.js +88 -0
- package/es/components/Upload/UploadFileBar.d.ts +6 -0
- package/es/components/Upload/UploadFileBar.js +63 -0
- package/es/components/Upload/index.d.ts +5 -0
- package/es/components/Upload/index.js +6 -0
- package/es/components/Upload/interface.d.ts +41 -0
- package/es/components/Upload/interface.js +2 -0
- package/es/components/Upload/style/Upload.css +1 -0
- package/es/components/Upload/style/Upload.scss +44 -0
- package/es/components/Upload/style/UploadFileBar.css +1 -0
- package/es/components/Upload/style/UploadFileBar.scss +94 -0
- package/es/components/Upload/style/css.js +3 -0
- package/es/components/Upload/style/index.d.ts +2 -0
- package/es/components/Upload/style/index.js +3 -0
- package/es/components/VirtualList/Filler.d.ts +21 -0
- package/es/components/VirtualList/Filler.js +56 -0
- package/es/components/VirtualList/Item.d.ts +6 -0
- package/es/components/VirtualList/Item.js +12 -0
- package/es/components/VirtualList/ScrollBar.d.ts +22 -0
- package/es/components/VirtualList/ScrollBar.js +237 -0
- package/es/components/VirtualList/VirtualList.d.ts +62 -0
- package/es/components/VirtualList/VirtualList.js +529 -0
- package/es/components/VirtualList/constants.d.ts +4 -0
- package/es/components/VirtualList/constants.js +5 -0
- package/es/components/VirtualList/hooks/useChildren.d.ts +2 -0
- package/es/components/VirtualList/hooks/useChildren.js +25 -0
- package/es/components/VirtualList/hooks/useDiffItem.d.ts +2 -0
- package/es/components/VirtualList/hooks/useDiffItem.js +16 -0
- package/es/components/VirtualList/hooks/useFrameWheel.d.ts +10 -0
- package/es/components/VirtualList/hooks/useFrameWheel.js +85 -0
- package/es/components/VirtualList/hooks/useGetSize.d.ts +7 -0
- package/es/components/VirtualList/hooks/useGetSize.js +47 -0
- package/es/components/VirtualList/hooks/useHeights.d.ts +8 -0
- package/es/components/VirtualList/hooks/useHeights.js +96 -0
- package/es/components/VirtualList/hooks/useMobileTouchMove.d.ts +2 -0
- package/es/components/VirtualList/hooks/useMobileTouchMove.js +85 -0
- package/es/components/VirtualList/hooks/useOriginScroll.d.ts +2 -0
- package/es/components/VirtualList/hooks/useOriginScroll.js +44 -0
- package/es/components/VirtualList/hooks/useScrollDrag.d.ts +3 -0
- package/es/components/VirtualList/hooks/useScrollDrag.js +76 -0
- package/es/components/VirtualList/hooks/useScrollTo.d.ts +18 -0
- package/es/components/VirtualList/hooks/useScrollTo.js +132 -0
- package/es/components/VirtualList/index.d.ts +9 -0
- package/es/components/VirtualList/index.js +5 -0
- package/es/components/VirtualList/interface.d.ts +26 -0
- package/es/components/VirtualList/interface.js +2 -0
- package/es/components/VirtualList/style/VirtualList.css +1 -0
- package/es/components/VirtualList/style/VirtualList.scss +5 -0
- package/es/components/VirtualList/style/css.js +2 -0
- package/es/components/VirtualList/style/index.d.ts +1 -0
- package/es/components/VirtualList/style/index.js +2 -0
- package/es/components/VirtualList/utils/CacheMap.d.ts +16 -0
- package/es/components/VirtualList/utils/CacheMap.js +43 -0
- package/es/components/VirtualList/utils/algorithmUtil.d.ts +23 -0
- package/es/components/VirtualList/utils/algorithmUtil.js +77 -0
- package/es/components/VirtualList/utils/isFirefox.d.ts +2 -0
- package/es/components/VirtualList/utils/isFirefox.js +4 -0
- package/es/components/VirtualList/utils/raf.d.ts +9 -0
- package/es/components/VirtualList/utils/raf.js +47 -0
- package/es/components/VirtualList/utils/scrollbarUtil.d.ts +1 -0
- package/es/components/VirtualList/utils/scrollbarUtil.js +12 -0
- package/es/index.css +1 -0
- package/es/index.d.ts +89 -0
- package/es/index.js +46 -0
- package/es/styles/_api.scss +5 -0
- package/es/styles/_settings.scss +5 -0
- package/es/styles/index.css +1 -0
- package/es/styles/index.scss +2 -0
- package/es/styles/public/_index.scss +2 -0
- package/es/styles/public/_system.scss +1 -0
- package/es/styles/public/_theme.scss +3 -0
- package/es/styles/recipes/_index.scss +1 -0
- package/es/styles/recipes/_variants.scss +110 -0
- package/es/styles/system/_index.scss +4 -0
- package/es/styles/system/_props.scss +95 -0
- package/es/styles/system/_public.scss +5 -0
- package/es/styles/system/_sx.scss +81 -0
- package/es/styles/theme/_breakpoints.scss +95 -0
- package/es/styles/theme/_functions.scss +271 -0
- package/es/styles/theme/_index.scss +6 -0
- package/es/styles/theme/_mixins.scss +37 -0
- package/es/styles/theme/_scales.scss +29 -0
- package/es/styles/theme/_values.scss +68 -0
- package/es/styles/tokens/_index.scss +11 -0
- package/es/styles/tokens/breakpoint/_index.scss +2 -0
- package/es/styles/tokens/breakpoint/_primitives.scss +8 -0
- package/es/styles/tokens/color/_index.scss +3 -0
- package/es/styles/tokens/color/_primitives.scss +42 -0
- package/es/styles/tokens/color/_semantic-color.scss +172 -0
- package/es/styles/tokens/opacity/_functions.scss +13 -0
- package/es/styles/tokens/opacity/_index.scss +3 -0
- package/es/styles/tokens/opacity/_primitives.scss +12 -0
- package/es/styles/tokens/radius/_index.scss +2 -0
- package/es/styles/tokens/radius/_primitives.scss +11 -0
- package/es/styles/tokens/shadow/_index.scss +2 -0
- package/es/styles/tokens/shadow/_primitives.scss +7 -0
- package/es/styles/tokens/sizing/_functions.scss +17 -0
- package/es/styles/tokens/sizing/_index.scss +4 -0
- package/es/styles/tokens/sizing/_primitives.scss +12 -0
- package/es/styles/tokens/sizing/_semantic-sizing.scss +11 -0
- package/es/styles/tokens/spacing/_functions.scss +51 -0
- package/es/styles/tokens/spacing/_index.scss +4 -0
- package/es/styles/tokens/spacing/_primitives.scss +22 -0
- package/es/styles/tokens/spacing/_semantic-spacing.scss +22 -0
- package/es/styles/tokens/typography/_functions.scss +31 -0
- package/es/styles/tokens/typography/_index.scss +4 -0
- package/es/styles/tokens/typography/_primitives.scss +27 -0
- package/es/styles/tokens/typography/_semantic-typography.scss +216 -0
- package/es/styles/utilities/_generator.scss +55 -0
- package/es/styles/utilities/_index.scss +14 -0
- package/es/utils/classnames.d.ts +5 -0
- package/es/utils/classnames.js +18 -0
- package/es/utils/clipboard.d.ts +2 -0
- package/es/utils/clipboard.js +50 -0
- package/es/utils/ref.d.ts +4 -0
- package/es/utils/ref.js +32 -0
- package/es/utils/uuid.d.ts +2 -0
- package/es/utils/uuid.js +16 -0
- package/jest.setup.d.ts +1 -0
- package/jest.setup.ts +1 -0
- package/lib/components/Accordion/Accordion.d.ts +6 -0
- package/lib/components/Accordion/Accordion.js +112 -0
- package/lib/components/Accordion/index.d.ts +4 -0
- package/lib/components/Accordion/index.js +33 -0
- package/lib/components/Accordion/interface.d.ts +29 -0
- package/lib/components/Accordion/interface.js +6 -0
- package/lib/components/Accordion/style/Accordion.css +1 -0
- package/lib/components/Accordion/style/Accordion.scss +127 -0
- package/lib/components/Accordion/style/css.js +4 -0
- package/lib/components/Accordion/style/index.d.ts +1 -0
- package/lib/components/Accordion/style/index.js +4 -0
- package/lib/components/Alert/Alert.d.ts +6 -0
- package/lib/components/Alert/Alert.js +103 -0
- package/lib/components/Alert/index.d.ts +4 -0
- package/lib/components/Alert/index.js +33 -0
- package/lib/components/Alert/interface.d.ts +40 -0
- package/lib/components/Alert/interface.js +12 -0
- package/lib/components/Alert/style/Alert.css +1 -0
- package/lib/components/Alert/style/Alert.scss +89 -0
- package/lib/components/Alert/style/css.js +5 -0
- package/lib/components/Alert/style/index.d.ts +2 -0
- package/lib/components/Alert/style/index.js +5 -0
- package/lib/components/Button/Button.d.ts +4 -0
- package/lib/components/Button/Button.js +131 -0
- package/lib/components/Button/constants.d.ts +56 -0
- package/lib/components/Button/constants.js +76 -0
- package/lib/components/Button/index.d.ts +5 -0
- package/lib/components/Button/index.js +45 -0
- package/lib/components/Button/interface.d.ts +14 -0
- package/lib/components/Button/interface.js +6 -0
- package/lib/components/Button/style/Button.css +1 -0
- package/lib/components/Button/style/Button.scss +190 -0
- package/lib/components/Button/style/css.js +4 -0
- package/lib/components/Button/style/index.d.ts +1 -0
- package/lib/components/Button/style/index.js +4 -0
- package/lib/components/Calendar/Calendar.d.ts +7 -0
- package/lib/components/Calendar/Calendar.js +122 -0
- package/lib/components/Calendar/index.d.ts +4 -0
- package/lib/components/Calendar/index.js +33 -0
- package/lib/components/Calendar/interface.d.ts +29 -0
- package/lib/components/Calendar/interface.js +6 -0
- package/lib/components/Calendar/style/Calendar.css +1 -0
- package/lib/components/Calendar/style/Calendar.scss +377 -0
- package/lib/components/Calendar/style/css.js +4 -0
- package/lib/components/Calendar/style/index.d.ts +1 -0
- package/lib/components/Calendar/style/index.js +4 -0
- package/lib/components/Carousel/Carousel.d.ts +6 -0
- package/lib/components/Carousel/Carousel.js +56 -0
- package/lib/components/Carousel/index.d.ts +4 -0
- package/lib/components/Carousel/index.js +33 -0
- package/lib/components/Carousel/interface.d.ts +15 -0
- package/lib/components/Carousel/interface.js +6 -0
- package/lib/components/Carousel/style/Carousel.css +1 -0
- package/lib/components/Carousel/style/Carousel.scss +63 -0
- package/lib/components/Carousel/style/css.js +4 -0
- package/lib/components/Carousel/style/index.d.ts +1 -0
- package/lib/components/Carousel/style/index.js +4 -0
- package/lib/components/Checkbox/BaseCheckbox.d.ts +6 -0
- package/lib/components/Checkbox/BaseCheckbox.js +94 -0
- package/lib/components/Checkbox/Checkbox.d.ts +6 -0
- package/lib/components/Checkbox/Checkbox.js +130 -0
- package/lib/components/Checkbox/CheckboxGroup.d.ts +5 -0
- package/lib/components/Checkbox/CheckboxGroup.js +150 -0
- package/lib/components/Checkbox/CheckboxGroupContext.d.ts +14 -0
- package/lib/components/Checkbox/CheckboxGroupContext.js +9 -0
- package/lib/components/Checkbox/constants.d.ts +7 -0
- package/lib/components/Checkbox/constants.js +14 -0
- package/lib/components/Checkbox/index.d.ts +10 -0
- package/lib/components/Checkbox/index.js +52 -0
- package/lib/components/Checkbox/interface.d.ts +77 -0
- package/lib/components/Checkbox/interface.js +6 -0
- package/lib/components/Checkbox/style/Checkbox.css +1 -0
- package/lib/components/Checkbox/style/Checkbox.scss +235 -0
- package/lib/components/Checkbox/style/css.js +4 -0
- package/lib/components/Checkbox/style/index.d.ts +1 -0
- package/lib/components/Checkbox/style/index.js +4 -0
- package/lib/components/CoachMark/CoachMark.d.ts +4 -0
- package/lib/components/CoachMark/CoachMark.js +152 -0
- package/lib/components/CoachMark/index.d.ts +4 -0
- package/lib/components/CoachMark/index.js +33 -0
- package/lib/components/CoachMark/interface.d.ts +47 -0
- package/lib/components/CoachMark/interface.js +8 -0
- package/lib/components/CoachMark/style/CoachMark.css +1 -0
- package/lib/components/CoachMark/style/CoachMark.scss +176 -0
- package/lib/components/CoachMark/style/css.js +7 -0
- package/lib/components/CoachMark/style/index.d.ts +4 -0
- package/lib/components/CoachMark/style/index.js +7 -0
- package/lib/components/Copy/Copy.d.ts +6 -0
- package/lib/components/Copy/Copy.js +80 -0
- package/lib/components/Copy/index.d.ts +4 -0
- package/lib/components/Copy/index.js +33 -0
- package/lib/components/Copy/interface.d.ts +20 -0
- package/lib/components/Copy/interface.js +6 -0
- package/lib/components/Copy/style/Copy.css +1 -0
- package/lib/components/Copy/style/Copy.scss +35 -0
- package/lib/components/Copy/style/css.js +4 -0
- package/lib/components/Copy/style/index.d.ts +1 -0
- package/lib/components/Copy/style/index.js +4 -0
- package/lib/components/Divider/Divider.d.ts +4 -0
- package/lib/components/Divider/Divider.js +62 -0
- package/lib/components/Divider/index.d.ts +4 -0
- package/lib/components/Divider/index.js +31 -0
- package/lib/components/Divider/interface.d.ts +20 -0
- package/lib/components/Divider/interface.js +6 -0
- package/lib/components/Divider/style/Divider.css +1 -0
- package/lib/components/Divider/style/Divider.scss +149 -0
- package/lib/components/Divider/style/css.js +4 -0
- package/lib/components/Divider/style/index.d.ts +1 -0
- package/lib/components/Divider/style/index.js +4 -0
- package/lib/components/Drawer/Drawer.d.ts +4 -0
- package/lib/components/Drawer/Drawer.js +281 -0
- package/lib/components/Drawer/constants.d.ts +15 -0
- package/lib/components/Drawer/constants.js +22 -0
- package/lib/components/Drawer/index.d.ts +3 -0
- package/lib/components/Drawer/index.js +46 -0
- package/lib/components/Drawer/interface.d.ts +79 -0
- package/lib/components/Drawer/interface.js +6 -0
- package/lib/components/Drawer/style/Drawer.css +1 -0
- package/lib/components/Drawer/style/Drawer.scss +163 -0
- package/lib/components/Drawer/style/css.js +4 -0
- package/lib/components/Drawer/style/index.d.ts +1 -0
- package/lib/components/Drawer/style/index.js +4 -0
- package/lib/components/Dropdown/Dropdown.d.ts +5 -0
- package/lib/components/Dropdown/Dropdown.js +31 -0
- package/lib/components/Dropdown/index.d.ts +3 -0
- package/lib/components/Dropdown/index.js +35 -0
- package/lib/components/Dropdown/interface.d.ts +8 -0
- package/lib/components/Dropdown/interface.js +6 -0
- package/lib/components/Dropdown/style/Dropdown.css +0 -0
- package/lib/components/Dropdown/style/Dropdown.scss +2 -0
- package/lib/components/Dropdown/style/css.js +5 -0
- package/lib/components/Dropdown/style/index.d.ts +2 -0
- package/lib/components/Dropdown/style/index.js +5 -0
- package/lib/components/Empty/Empty.d.ts +6 -0
- package/lib/components/Empty/Empty.js +77 -0
- package/lib/components/Empty/index.d.ts +4 -0
- package/lib/components/Empty/index.js +33 -0
- package/lib/components/Empty/interface.d.ts +11 -0
- package/lib/components/Empty/interface.js +6 -0
- package/lib/components/Empty/style/Empty.css +1 -0
- package/lib/components/Empty/style/Empty.scss +53 -0
- package/lib/components/Empty/style/css.js +5 -0
- package/lib/components/Empty/style/index.d.ts +2 -0
- package/lib/components/Empty/style/index.js +5 -0
- package/lib/components/Flex/Flex.d.ts +5 -0
- package/lib/components/Flex/Flex.js +60 -0
- package/lib/components/Flex/constants.d.ts +41 -0
- package/lib/components/Flex/constants.js +51 -0
- package/lib/components/Flex/index.d.ts +5 -0
- package/lib/components/Flex/index.js +60 -0
- package/lib/components/Flex/interface.d.ts +13 -0
- package/lib/components/Flex/interface.js +6 -0
- package/lib/components/Flex/style/Flex.css +1 -0
- package/lib/components/Flex/style/Flex.scss +70 -0
- package/lib/components/Flex/style/css.js +4 -0
- package/lib/components/Flex/style/index.d.ts +1 -0
- package/lib/components/Flex/style/index.js +4 -0
- package/lib/components/Form/Form.d.ts +4 -0
- package/lib/components/Form/Form.js +80 -0
- package/lib/components/Form/FormItem.d.ts +4 -0
- package/lib/components/Form/FormItem.js +193 -0
- package/lib/components/Form/constants.d.ts +19 -0
- package/lib/components/Form/constants.js +25 -0
- package/lib/components/Form/context.d.ts +5 -0
- package/lib/components/Form/context.js +25 -0
- package/lib/components/Form/hooks/useForm.d.ts +3 -0
- package/lib/components/Form/hooks/useForm.js +551 -0
- package/lib/components/Form/hooks/useFormCore.d.ts +3 -0
- package/lib/components/Form/hooks/useFormCore.js +355 -0
- package/lib/components/Form/index.d.ts +10 -0
- package/lib/components/Form/index.js +83 -0
- package/lib/components/Form/interface.d.ts +166 -0
- package/lib/components/Form/interface.js +6 -0
- package/lib/components/Form/style/Form.css +1 -0
- package/lib/components/Form/style/Form.scss +57 -0
- package/lib/components/Form/style/css.js +4 -0
- package/lib/components/Form/style/index.d.ts +1 -0
- package/lib/components/Form/style/index.js +4 -0
- package/lib/components/Grid/Col.d.ts +4 -0
- package/lib/components/Grid/Col.js +93 -0
- package/lib/components/Grid/Grid.d.ts +10 -0
- package/lib/components/Grid/Grid.js +21 -0
- package/lib/components/Grid/Row.d.ts +4 -0
- package/lib/components/Grid/Row.js +50 -0
- package/lib/components/Grid/constants.d.ts +48 -0
- package/lib/components/Grid/constants.js +77 -0
- package/lib/components/Grid/helper.d.ts +15 -0
- package/lib/components/Grid/helper.js +94 -0
- package/lib/components/Grid/index.d.ts +7 -0
- package/lib/components/Grid/index.js +62 -0
- package/lib/components/Grid/interface.d.ts +38 -0
- package/lib/components/Grid/interface.js +6 -0
- package/lib/components/Grid/style/Grid.css +1 -0
- package/lib/components/Grid/style/Grid.scss +184 -0
- package/lib/components/Grid/style/css.js +4 -0
- package/lib/components/Grid/style/index.d.ts +1 -0
- package/lib/components/Grid/style/index.js +4 -0
- package/lib/components/Icons/Icons.d.ts +192 -0
- package/lib/components/Icons/Icons.js +193 -0
- package/lib/components/Icons/Illustrations.d.ts +18 -0
- package/lib/components/Icons/Illustrations.js +881 -0
- package/lib/components/Icons/Logo.d.ts +36 -0
- package/lib/components/Icons/Logo.js +219 -0
- package/lib/components/Icons/SVGs.d.ts +265 -0
- package/lib/components/Icons/SVGs.js +1926 -0
- package/lib/components/Icons/Wrapper.d.ts +6 -0
- package/lib/components/Icons/Wrapper.js +109 -0
- package/lib/components/Icons/index.d.ts +4 -0
- package/lib/components/Icons/index.js +52 -0
- package/lib/components/Icons/interface.d.ts +27 -0
- package/lib/components/Icons/interface.js +6 -0
- package/lib/components/Icons/style/Icons.css +1 -0
- package/lib/components/Icons/style/Icons.scss +85 -0
- package/lib/components/Icons/style/css.js +4 -0
- package/lib/components/Icons/style/index.d.ts +1 -0
- package/lib/components/Icons/style/index.js +4 -0
- package/lib/components/Input/Amount/Amount.d.ts +6 -0
- package/lib/components/Input/Amount/Amount.js +201 -0
- package/lib/components/Input/Amount/helper.d.ts +35 -0
- package/lib/components/Input/Amount/helper.js +102 -0
- package/lib/components/Input/Amount/index.d.ts +3 -0
- package/lib/components/Input/Amount/index.js +18 -0
- package/lib/components/Input/Amount/style/Amount.css +1 -0
- package/lib/components/Input/Amount/style/Amount.scss +89 -0
- package/lib/components/Input/Amount/style/css.js +4 -0
- package/lib/components/Input/Amount/style/index.d.ts +1 -0
- package/lib/components/Input/Amount/style/index.js +4 -0
- package/lib/components/Input/FieldShell/FieldShell.css +1 -0
- package/lib/components/Input/FieldShell/FieldShell.d.ts +19 -0
- package/lib/components/Input/FieldShell/FieldShell.js +85 -0
- package/lib/components/Input/FieldShell/FieldShell.scss +62 -0
- package/lib/components/Input/FieldShell/index.d.ts +3 -0
- package/lib/components/Input/FieldShell/index.js +22 -0
- package/lib/components/Input/Input/Input.css +1 -0
- package/lib/components/Input/Input/Input.d.ts +3 -0
- package/lib/components/Input/Input/Input.js +168 -0
- package/lib/components/Input/Input/Input.scss +131 -0
- package/lib/components/Input/Input/index.d.ts +2 -0
- package/lib/components/Input/Input/index.js +22 -0
- package/lib/components/Input/Mask/Mask.d.ts +5 -0
- package/lib/components/Input/Mask/Mask.js +347 -0
- package/lib/components/Input/Mask/index.d.ts +2 -0
- package/lib/components/Input/Mask/index.js +22 -0
- package/lib/components/Input/OTP/OTP.css +1 -0
- package/lib/components/Input/OTP/OTP.d.ts +5 -0
- package/lib/components/Input/OTP/OTP.js +157 -0
- package/lib/components/Input/OTP/OTP.scss +75 -0
- package/lib/components/Input/OTP/index.d.ts +2 -0
- package/lib/components/Input/OTP/index.js +22 -0
- package/lib/components/Input/Password/Password.d.ts +5 -0
- package/lib/components/Input/Password/Password.js +131 -0
- package/lib/components/Input/Password/index.d.ts +2 -0
- package/lib/components/Input/Password/index.js +22 -0
- package/lib/components/Input/Search/Search.d.ts +5 -0
- package/lib/components/Input/Search/Search.js +154 -0
- package/lib/components/Input/Search/index.d.ts +2 -0
- package/lib/components/Input/Search/index.js +22 -0
- package/lib/components/Input/TextArea/TextArea.css +1 -0
- package/lib/components/Input/TextArea/TextArea.d.ts +5 -0
- package/lib/components/Input/TextArea/TextArea.js +103 -0
- package/lib/components/Input/TextArea/TextArea.scss +87 -0
- package/lib/components/Input/TextArea/index.d.ts +2 -0
- package/lib/components/Input/TextArea/index.js +22 -0
- package/lib/components/Input/Trade/Trade.css +1 -0
- package/lib/components/Input/Trade/Trade.d.ts +5 -0
- package/lib/components/Input/Trade/Trade.js +139 -0
- package/lib/components/Input/Trade/Trade.scss +184 -0
- package/lib/components/Input/Trade/index.d.ts +2 -0
- package/lib/components/Input/Trade/index.js +22 -0
- package/lib/components/Input/constants.d.ts +15 -0
- package/lib/components/Input/constants.js +22 -0
- package/lib/components/Input/index.d.ts +4 -0
- package/lib/components/Input/index.js +49 -0
- package/lib/components/Input/interface.d.ts +153 -0
- package/lib/components/Input/interface.js +6 -0
- package/lib/components/Input/style/css.js +9 -0
- package/lib/components/Input/style/index.d.ts +6 -0
- package/lib/components/Input/style/index.js +9 -0
- package/lib/components/Input/useAmountInput.d.ts +35 -0
- package/lib/components/Input/useAmountInput.js +214 -0
- package/lib/components/Input/useSyncRef.d.ts +2 -0
- package/lib/components/Input/useSyncRef.js +19 -0
- package/lib/components/Modal/Modal.d.ts +4 -0
- package/lib/components/Modal/Modal.js +390 -0
- package/lib/components/Modal/constants.d.ts +58 -0
- package/lib/components/Modal/constants.js +62 -0
- package/lib/components/Modal/index.d.ts +4 -0
- package/lib/components/Modal/index.js +33 -0
- package/lib/components/Modal/interface.d.ts +37 -0
- package/lib/components/Modal/interface.js +6 -0
- package/lib/components/Modal/style/Modal.css +1 -0
- package/lib/components/Modal/style/Modal.scss +254 -0
- package/lib/components/Modal/style/css.js +4 -0
- package/lib/components/Modal/style/index.d.ts +1 -0
- package/lib/components/Modal/style/index.js +4 -0
- package/lib/components/Navigation/Nav.d.ts +5 -0
- package/lib/components/Navigation/Nav.js +208 -0
- package/lib/components/Navigation/Navigation.d.ts +5 -0
- package/lib/components/Navigation/Navigation.js +309 -0
- package/lib/components/Navigation/NavigationLogo.d.ts +7 -0
- package/lib/components/Navigation/NavigationLogo.js +42 -0
- package/lib/components/Navigation/index.d.ts +5 -0
- package/lib/components/Navigation/index.js +41 -0
- package/lib/components/Navigation/interface.d.ts +95 -0
- package/lib/components/Navigation/interface.js +6 -0
- package/lib/components/Navigation/style/Nav.css +1 -0
- package/lib/components/Navigation/style/Nav.scss +174 -0
- package/lib/components/Navigation/style/Navigation.css +1 -0
- package/lib/components/Navigation/style/Navigation.scss +443 -0
- package/lib/components/Navigation/style/css.js +5 -0
- package/lib/components/Navigation/style/index.d.ts +2 -0
- package/lib/components/Navigation/style/index.js +5 -0
- package/lib/components/Notification/Notification.d.ts +6 -0
- package/lib/components/Notification/Notification.js +122 -0
- package/lib/components/Notification/NotificationStatic.d.ts +4 -0
- package/lib/components/Notification/NotificationStatic.js +515 -0
- package/lib/components/Notification/constants.d.ts +5 -0
- package/lib/components/Notification/constants.js +13 -0
- package/lib/components/Notification/index.d.ts +5 -0
- package/lib/components/Notification/index.js +52 -0
- package/lib/components/Notification/interface.d.ts +70 -0
- package/lib/components/Notification/interface.js +13 -0
- package/lib/components/Notification/style/Notification.css +1 -0
- package/lib/components/Notification/style/Notification.scss +200 -0
- package/lib/components/Notification/style/css.js +4 -0
- package/lib/components/Notification/style/index.d.ts +1 -0
- package/lib/components/Notification/style/index.js +4 -0
- package/lib/components/Pagination/Pagination.d.ts +5 -0
- package/lib/components/Pagination/Pagination.js +146 -0
- package/lib/components/Pagination/constants.d.ts +53 -0
- package/lib/components/Pagination/constants.js +63 -0
- package/lib/components/Pagination/index.d.ts +6 -0
- package/lib/components/Pagination/index.js +53 -0
- package/lib/components/Pagination/interface.d.ts +54 -0
- package/lib/components/Pagination/interface.js +6 -0
- package/lib/components/Pagination/style/Pagination.css +1 -0
- package/lib/components/Pagination/style/Pagination.scss +95 -0
- package/lib/components/Pagination/style/css.js +4 -0
- package/lib/components/Pagination/style/index.d.ts +1 -0
- package/lib/components/Pagination/style/index.js +4 -0
- package/lib/components/Pagination/usePagination.d.ts +3 -0
- package/lib/components/Pagination/usePagination.js +161 -0
- package/lib/components/Popconfirm/Popconfirm.d.ts +6 -0
- package/lib/components/Popconfirm/Popconfirm.js +141 -0
- package/lib/components/Popconfirm/constants.d.ts +72 -0
- package/lib/components/Popconfirm/constants.js +78 -0
- package/lib/components/Popconfirm/index.d.ts +4 -0
- package/lib/components/Popconfirm/index.js +33 -0
- package/lib/components/Popconfirm/interface.d.ts +40 -0
- package/lib/components/Popconfirm/interface.js +6 -0
- package/lib/components/Popconfirm/style/Popconfirm.css +1 -0
- package/lib/components/Popconfirm/style/Popconfirm.scss +264 -0
- package/lib/components/Popconfirm/style/css.js +7 -0
- package/lib/components/Popconfirm/style/index.d.ts +4 -0
- package/lib/components/Popconfirm/style/index.js +7 -0
- package/lib/components/Portal/Portal.d.ts +3 -0
- package/lib/components/Portal/Portal.js +61 -0
- package/lib/components/Portal/index.d.ts +4 -0
- package/lib/components/Portal/index.js +33 -0
- package/lib/components/Portal/interface.d.ts +7 -0
- package/lib/components/Portal/interface.js +6 -0
- package/lib/components/ProForm/ProForm.d.ts +3 -0
- package/lib/components/ProForm/ProForm.js +264 -0
- package/lib/components/ProForm/ProFormDependency.d.ts +3 -0
- package/lib/components/ProForm/ProFormDependency.js +75 -0
- package/lib/components/ProForm/ProFormGroup.d.ts +3 -0
- package/lib/components/ProForm/ProFormGroup.js +85 -0
- package/lib/components/ProForm/ProFormList.d.ts +3 -0
- package/lib/components/ProForm/ProFormList.js +260 -0
- package/lib/components/ProForm/Submitter.d.ts +6 -0
- package/lib/components/ProForm/Submitter.js +74 -0
- package/lib/components/ProForm/constants.d.ts +18 -0
- package/lib/components/ProForm/constants.js +29 -0
- package/lib/components/ProForm/context.d.ts +5 -0
- package/lib/components/ProForm/context.js +32 -0
- package/lib/components/ProForm/fields/ProFormCheckbox.d.ts +3 -0
- package/lib/components/ProForm/fields/ProFormCheckbox.js +17 -0
- package/lib/components/ProForm/fields/ProFormCheckboxGroup.d.ts +3 -0
- package/lib/components/ProForm/fields/ProFormCheckboxGroup.js +18 -0
- package/lib/components/ProForm/fields/ProFormDatePicker.d.ts +3 -0
- package/lib/components/ProForm/fields/ProFormDatePicker.js +29 -0
- package/lib/components/ProForm/fields/ProFormFieldSet.d.ts +4 -0
- package/lib/components/ProForm/fields/ProFormFieldSet.js +72 -0
- package/lib/components/ProForm/fields/ProFormPassword.d.ts +3 -0
- package/lib/components/ProForm/fields/ProFormPassword.js +17 -0
- package/lib/components/ProForm/fields/ProFormRadioGroup.d.ts +3 -0
- package/lib/components/ProForm/fields/ProFormRadioGroup.js +16 -0
- package/lib/components/ProForm/fields/ProFormSelect.d.ts +3 -0
- package/lib/components/ProForm/fields/ProFormSelect.js +46 -0
- package/lib/components/ProForm/fields/ProFormSlider.d.ts +3 -0
- package/lib/components/ProForm/fields/ProFormSlider.js +16 -0
- package/lib/components/ProForm/fields/ProFormSwitch.d.ts +3 -0
- package/lib/components/ProForm/fields/ProFormSwitch.js +17 -0
- package/lib/components/ProForm/fields/ProFormText.d.ts +3 -0
- package/lib/components/ProForm/fields/ProFormText.js +16 -0
- package/lib/components/ProForm/fields/ProFormTextArea.d.ts +3 -0
- package/lib/components/ProForm/fields/ProFormTextArea.js +16 -0
- package/lib/components/ProForm/fields/ProFormUpload.d.ts +3 -0
- package/lib/components/ProForm/fields/ProFormUpload.js +32 -0
- package/lib/components/ProForm/fields/createProFormField.d.ts +4 -0
- package/lib/components/ProForm/fields/createProFormField.js +237 -0
- package/lib/components/ProForm/fields/index.d.ts +13 -0
- package/lib/components/ProForm/fields/index.js +97 -0
- package/lib/components/ProForm/hooks/useFieldRequest.d.ts +7 -0
- package/lib/components/ProForm/hooks/useFieldRequest.js +98 -0
- package/lib/components/ProForm/index.d.ts +30 -0
- package/lib/components/ProForm/index.js +187 -0
- package/lib/components/ProForm/interface.d.ts +240 -0
- package/lib/components/ProForm/interface.js +6 -0
- package/lib/components/ProForm/layouts/DrawerForm.d.ts +3 -0
- package/lib/components/ProForm/layouts/DrawerForm.js +80 -0
- package/lib/components/ProForm/layouts/ModalForm.d.ts +3 -0
- package/lib/components/ProForm/layouts/ModalForm.js +81 -0
- package/lib/components/ProForm/layouts/QueryFilter.d.ts +4 -0
- package/lib/components/ProForm/layouts/QueryFilter.js +167 -0
- package/lib/components/ProForm/layouts/index.d.ts +4 -0
- package/lib/components/ProForm/layouts/index.js +34 -0
- package/lib/components/ProForm/layouts/useOverlayForm.d.ts +17 -0
- package/lib/components/ProForm/layouts/useOverlayForm.js +117 -0
- package/lib/components/ProForm/style/ProForm.css +1 -0
- package/lib/components/ProForm/style/ProForm.scss +118 -0
- package/lib/components/ProForm/style/css.js +4 -0
- package/lib/components/ProForm/style/index.d.ts +1 -0
- package/lib/components/ProForm/style/index.js +4 -0
- package/lib/components/ProForm/utils.d.ts +22 -0
- package/lib/components/ProForm/utils.js +228 -0
- package/lib/components/Progress/Progress.d.ts +6 -0
- package/lib/components/Progress/Progress.js +103 -0
- package/lib/components/Progress/constants.d.ts +26 -0
- package/lib/components/Progress/constants.js +38 -0
- package/lib/components/Progress/index.d.ts +5 -0
- package/lib/components/Progress/index.js +45 -0
- package/lib/components/Progress/interface.d.ts +26 -0
- package/lib/components/Progress/interface.js +6 -0
- package/lib/components/Progress/style/Progress.css +1 -0
- package/lib/components/Progress/style/Progress.scss +120 -0
- package/lib/components/Progress/style/css.js +4 -0
- package/lib/components/Progress/style/index.d.ts +1 -0
- package/lib/components/Progress/style/index.js +4 -0
- package/lib/components/Radio/BaseRadio.d.ts +16 -0
- package/lib/components/Radio/BaseRadio.js +65 -0
- package/lib/components/Radio/Radio.d.ts +6 -0
- package/lib/components/Radio/Radio.js +189 -0
- package/lib/components/Radio/RadioGroup.d.ts +5 -0
- package/lib/components/Radio/RadioGroup.js +110 -0
- package/lib/components/Radio/RadioGroupContext.d.ts +22 -0
- package/lib/components/Radio/RadioGroupContext.js +13 -0
- package/lib/components/Radio/constants.d.ts +36 -0
- package/lib/components/Radio/constants.js +69 -0
- package/lib/components/Radio/index.d.ts +5 -0
- package/lib/components/Radio/index.js +41 -0
- package/lib/components/Radio/interface.d.ts +115 -0
- package/lib/components/Radio/interface.js +6 -0
- package/lib/components/Radio/style/Radio.css +1 -0
- package/lib/components/Radio/style/Radio.scss +431 -0
- package/lib/components/Radio/style/css.js +5 -0
- package/lib/components/Radio/style/index.d.ts +2 -0
- package/lib/components/Radio/style/index.js +5 -0
- package/lib/components/ResizeObserver/Collection.d.ts +19 -0
- package/lib/components/ResizeObserver/Collection.js +51 -0
- package/lib/components/ResizeObserver/ResizeObserver.d.ts +7 -0
- package/lib/components/ResizeObserver/ResizeObserver.js +41 -0
- package/lib/components/ResizeObserver/SingleObserver/index.d.ts +7 -0
- package/lib/components/ResizeObserver/SingleObserver/index.js +48 -0
- package/lib/components/ResizeObserver/index.d.ts +7 -0
- package/lib/components/ResizeObserver/index.js +30 -0
- package/lib/components/ResizeObserver/interface.d.ts +16 -0
- package/lib/components/ResizeObserver/interface.js +6 -0
- package/lib/components/ResizeObserver/useResizeObserver.d.ts +2 -0
- package/lib/components/ResizeObserver/useResizeObserver.js +79 -0
- package/lib/components/ResizeObserver/utils/observerUtil.d.ts +7 -0
- package/lib/components/ResizeObserver/utils/observerUtil.js +47 -0
- package/lib/components/ResizeObserver/utils/reactUtil.d.ts +19 -0
- package/lib/components/ResizeObserver/utils/reactUtil.js +91 -0
- package/lib/components/Segment/Segment.d.ts +6 -0
- package/lib/components/Segment/Segment.js +110 -0
- package/lib/components/Segment/index.d.ts +4 -0
- package/lib/components/Segment/index.js +33 -0
- package/lib/components/Segment/interface.d.ts +23 -0
- package/lib/components/Segment/interface.js +6 -0
- package/lib/components/Segment/style/Segment.css +1 -0
- package/lib/components/Segment/style/Segment.scss +80 -0
- package/lib/components/Segment/style/css.js +4 -0
- package/lib/components/Segment/style/index.d.ts +1 -0
- package/lib/components/Segment/style/index.js +4 -0
- package/lib/components/Select/Select.d.ts +6 -0
- package/lib/components/Select/Select.js +530 -0
- package/lib/components/Select/SelectFieldShell.d.ts +22 -0
- package/lib/components/Select/SelectFieldShell.js +79 -0
- package/lib/components/Select/SelectOptionContent.d.ts +9 -0
- package/lib/components/Select/SelectOptionContent.js +42 -0
- package/lib/components/Select/SelectSearchControl.d.ts +12 -0
- package/lib/components/Select/SelectSearchControl.js +44 -0
- package/lib/components/Select/SelectValueContent.d.ts +18 -0
- package/lib/components/Select/SelectValueContent.js +105 -0
- package/lib/components/Select/constants.d.ts +14 -0
- package/lib/components/Select/constants.js +26 -0
- package/lib/components/Select/index.d.ts +4 -0
- package/lib/components/Select/index.js +49 -0
- package/lib/components/Select/interface.d.ts +83 -0
- package/lib/components/Select/interface.js +10 -0
- package/lib/components/Select/style/Select.css +1 -0
- package/lib/components/Select/style/Select.scss +480 -0
- package/lib/components/Select/style/css.js +6 -0
- package/lib/components/Select/style/index.d.ts +3 -0
- package/lib/components/Select/style/index.js +6 -0
- package/lib/components/Select/utils.d.ts +21 -0
- package/lib/components/Select/utils.js +161 -0
- package/lib/components/Skeleton/Skeleton.d.ts +6 -0
- package/lib/components/Skeleton/Skeleton.js +58 -0
- package/lib/components/Skeleton/index.d.ts +4 -0
- package/lib/components/Skeleton/index.js +33 -0
- package/lib/components/Skeleton/interface.d.ts +19 -0
- package/lib/components/Skeleton/interface.js +6 -0
- package/lib/components/Skeleton/style/Skeleton.css +1 -0
- package/lib/components/Skeleton/style/Skeleton.scss +47 -0
- package/lib/components/Skeleton/style/css.js +4 -0
- package/lib/components/Skeleton/style/index.d.ts +1 -0
- package/lib/components/Skeleton/style/index.js +4 -0
- package/lib/components/Slider/Slider.d.ts +6 -0
- package/lib/components/Slider/Slider.js +126 -0
- package/lib/components/Slider/index.d.ts +4 -0
- package/lib/components/Slider/index.js +33 -0
- package/lib/components/Slider/interface.d.ts +39 -0
- package/lib/components/Slider/interface.js +6 -0
- package/lib/components/Slider/style/Slider.css +1 -0
- package/lib/components/Slider/style/Slider.scss +182 -0
- package/lib/components/Slider/style/css.js +4 -0
- package/lib/components/Slider/style/index.d.ts +1 -0
- package/lib/components/Slider/style/index.js +4 -0
- package/lib/components/Space/Space.d.ts +5 -0
- package/lib/components/Space/Space.js +88 -0
- package/lib/components/Space/constants.d.ts +33 -0
- package/lib/components/Space/constants.js +43 -0
- package/lib/components/Space/index.d.ts +5 -0
- package/lib/components/Space/index.js +53 -0
- package/lib/components/Space/interface.d.ts +12 -0
- package/lib/components/Space/interface.js +6 -0
- package/lib/components/Space/style/Space.css +1 -0
- package/lib/components/Space/style/Space.scss +40 -0
- package/lib/components/Space/style/css.js +4 -0
- package/lib/components/Space/style/index.d.ts +1 -0
- package/lib/components/Space/style/index.js +4 -0
- package/lib/components/Spinner/Spinner.d.ts +6 -0
- package/lib/components/Spinner/Spinner.js +91 -0
- package/lib/components/Spinner/index.d.ts +4 -0
- package/lib/components/Spinner/index.js +33 -0
- package/lib/components/Spinner/interface.d.ts +14 -0
- package/lib/components/Spinner/interface.js +8 -0
- package/lib/components/Spinner/style/Spinner.css +1 -0
- package/lib/components/Spinner/style/Spinner.scss +90 -0
- package/lib/components/Spinner/style/css.js +4 -0
- package/lib/components/Spinner/style/index.d.ts +1 -0
- package/lib/components/Spinner/style/index.js +4 -0
- package/lib/components/Step/Step.d.ts +5 -0
- package/lib/components/Step/Step.js +126 -0
- package/lib/components/Step/constants.d.ts +59 -0
- package/lib/components/Step/constants.js +72 -0
- package/lib/components/Step/index.d.ts +4 -0
- package/lib/components/Step/index.js +33 -0
- package/lib/components/Step/interface.d.ts +22 -0
- package/lib/components/Step/interface.js +6 -0
- package/lib/components/Step/style/Step.css +1 -0
- package/lib/components/Step/style/Step.scss +91 -0
- package/lib/components/Step/style/css.js +4 -0
- package/lib/components/Step/style/index.d.ts +1 -0
- package/lib/components/Step/style/index.js +4 -0
- package/lib/components/Switch/Switch.d.ts +6 -0
- package/lib/components/Switch/Switch.js +103 -0
- package/lib/components/Switch/constants.d.ts +11 -0
- package/lib/components/Switch/constants.js +18 -0
- package/lib/components/Switch/index.d.ts +5 -0
- package/lib/components/Switch/index.js +45 -0
- package/lib/components/Switch/interface.d.ts +26 -0
- package/lib/components/Switch/interface.js +6 -0
- package/lib/components/Switch/style/Switch.css +1 -0
- package/lib/components/Switch/style/Switch.scss +126 -0
- package/lib/components/Switch/style/css.js +5 -0
- package/lib/components/Switch/style/index.d.ts +2 -0
- package/lib/components/Switch/style/index.js +5 -0
- package/lib/components/Table/Table.d.ts +10 -0
- package/lib/components/Table/Table.js +173 -0
- package/lib/components/Table/VirtualTable.d.ts +9 -0
- package/lib/components/Table/VirtualTable.js +175 -0
- package/lib/components/Table/constants.d.ts +4 -0
- package/lib/components/Table/constants.js +11 -0
- package/lib/components/Table/core/useTableColumns.d.ts +34 -0
- package/lib/components/Table/core/useTableColumns.js +198 -0
- package/lib/components/Table/core/useTableDataPipeline.d.ts +50 -0
- package/lib/components/Table/core/useTableDataPipeline.js +269 -0
- package/lib/components/Table/core/useTableExpand.d.ts +9 -0
- package/lib/components/Table/core/useTableExpand.js +45 -0
- package/lib/components/Table/core/useTableSelection.d.ts +17 -0
- package/lib/components/Table/core/useTableSelection.js +151 -0
- package/lib/components/Table/features/ExpandTrigger.d.ts +4 -0
- package/lib/components/Table/features/ExpandTrigger.js +30 -0
- package/lib/components/Table/features/SelectionColumn.d.ts +11 -0
- package/lib/components/Table/features/SelectionColumn.js +47 -0
- package/lib/components/Table/features/SortTrigger.d.ts +7 -0
- package/lib/components/Table/features/SortTrigger.js +32 -0
- package/lib/components/Table/index.d.ts +6 -0
- package/lib/components/Table/index.js +47 -0
- package/lib/components/Table/interface.d.ts +179 -0
- package/lib/components/Table/interface.js +6 -0
- package/lib/components/Table/internal/index.d.ts +3 -0
- package/lib/components/Table/internal/index.js +52 -0
- package/lib/components/Table/internal/kernel/Body/BodyRow.d.ts +37 -0
- package/lib/components/Table/internal/kernel/Body/BodyRow.js +186 -0
- package/lib/components/Table/internal/kernel/Body/ExpandedRow.d.ts +15 -0
- package/lib/components/Table/internal/kernel/Body/ExpandedRow.js +67 -0
- package/lib/components/Table/internal/kernel/Body/MeasureCell.d.ts +8 -0
- package/lib/components/Table/internal/kernel/Body/MeasureCell.js +50 -0
- package/lib/components/Table/internal/kernel/Body/MeasureRow.d.ts +10 -0
- package/lib/components/Table/internal/kernel/Body/MeasureRow.js +64 -0
- package/lib/components/Table/internal/kernel/Body/index.d.ts +9 -0
- package/lib/components/Table/internal/kernel/Body/index.js +135 -0
- package/lib/components/Table/internal/kernel/Cell/index.d.ts +39 -0
- package/lib/components/Table/internal/kernel/Cell/index.js +190 -0
- package/lib/components/Table/internal/kernel/Cell/useCellRender.d.ts +3 -0
- package/lib/components/Table/internal/kernel/Cell/useCellRender.js +74 -0
- package/lib/components/Table/internal/kernel/Cell/useHoverState.d.ts +2 -0
- package/lib/components/Table/internal/kernel/Cell/useHoverState.js +23 -0
- package/lib/components/Table/internal/kernel/ColGroup.d.ts +8 -0
- package/lib/components/Table/internal/kernel/ColGroup.js +68 -0
- package/lib/components/Table/internal/kernel/FixedHolder/index.d.ts +27 -0
- package/lib/components/Table/internal/kernel/FixedHolder/index.js +193 -0
- package/lib/components/Table/internal/kernel/Footer/Cell.d.ts +11 -0
- package/lib/components/Table/internal/kernel/Footer/Cell.js +60 -0
- package/lib/components/Table/internal/kernel/Footer/Row.d.ts +8 -0
- package/lib/components/Table/internal/kernel/Footer/Row.js +31 -0
- package/lib/components/Table/internal/kernel/Footer/Summary.d.ts +14 -0
- package/lib/components/Table/internal/kernel/Footer/Summary.js +20 -0
- package/lib/components/Table/internal/kernel/Footer/SummaryContext.d.ts +11 -0
- package/lib/components/Table/internal/kernel/Footer/SummaryContext.js +13 -0
- package/lib/components/Table/internal/kernel/Footer/index.d.ts +16 -0
- package/lib/components/Table/internal/kernel/Footer/index.js +47 -0
- package/lib/components/Table/internal/kernel/Header/Header.d.ts +9 -0
- package/lib/components/Table/internal/kernel/Header/Header.js +120 -0
- package/lib/components/Table/internal/kernel/Header/HeaderRow.d.ts +18 -0
- package/lib/components/Table/internal/kernel/Header/HeaderRow.js +71 -0
- package/lib/components/Table/internal/kernel/Panel/index.d.ts +7 -0
- package/lib/components/Table/internal/kernel/Panel/index.js +25 -0
- package/lib/components/Table/internal/kernel/Table.d.ts +126 -0
- package/lib/components/Table/internal/kernel/Table.js +701 -0
- package/lib/components/Table/internal/kernel/VirtualTable/BodyGrid.d.ts +13 -0
- package/lib/components/Table/internal/kernel/VirtualTable/BodyGrid.js +299 -0
- package/lib/components/Table/internal/kernel/VirtualTable/BodyLine.d.ts +14 -0
- package/lib/components/Table/internal/kernel/VirtualTable/BodyLine.js +125 -0
- package/lib/components/Table/internal/kernel/VirtualTable/VirtualCell.d.ts +26 -0
- package/lib/components/Table/internal/kernel/VirtualTable/VirtualCell.js +117 -0
- package/lib/components/Table/internal/kernel/VirtualTable/context.d.ts +13 -0
- package/lib/components/Table/internal/kernel/VirtualTable/context.js +12 -0
- package/lib/components/Table/internal/kernel/VirtualTable/index.d.ts +17 -0
- package/lib/components/Table/internal/kernel/VirtualTable/index.js +101 -0
- package/lib/components/Table/internal/kernel/constant.d.ts +2 -0
- package/lib/components/Table/internal/kernel/constant.js +10 -0
- package/lib/components/Table/internal/kernel/context/PerfContext.d.ts +6 -0
- package/lib/components/Table/internal/kernel/context/PerfContext.js +18 -0
- package/lib/components/Table/internal/kernel/context/TableContext.d.ts +51 -0
- package/lib/components/Table/internal/kernel/context/TableContext.js +16 -0
- package/lib/components/Table/internal/kernel/hooks/useColumns/index.d.ts +31 -0
- package/lib/components/Table/internal/kernel/hooks/useColumns/index.js +223 -0
- package/lib/components/Table/internal/kernel/hooks/useColumns/useWidthColumns.d.ts +5 -0
- package/lib/components/Table/internal/kernel/hooks/useColumns/useWidthColumns.js +79 -0
- package/lib/components/Table/internal/kernel/hooks/useExpand.d.ts +10 -0
- package/lib/components/Table/internal/kernel/hooks/useExpand.js +95 -0
- package/lib/components/Table/internal/kernel/hooks/useFixedInfo.d.ts +2 -0
- package/lib/components/Table/internal/kernel/hooks/useFixedInfo.js +29 -0
- package/lib/components/Table/internal/kernel/hooks/useFlattenRecords.d.ts +19 -0
- package/lib/components/Table/internal/kernel/hooks/useFlattenRecords.js +64 -0
- package/lib/components/Table/internal/kernel/hooks/useFrame.d.ts +7 -0
- package/lib/components/Table/internal/kernel/hooks/useFrame.js +72 -0
- package/lib/components/Table/internal/kernel/hooks/useHover.d.ts +2 -0
- package/lib/components/Table/internal/kernel/hooks/useHover.js +30 -0
- package/lib/components/Table/internal/kernel/hooks/useRenderTimes.d.ts +5 -0
- package/lib/components/Table/internal/kernel/hooks/useRenderTimes.js +51 -0
- package/lib/components/Table/internal/kernel/hooks/useRowInfo.d.ts +11 -0
- package/lib/components/Table/internal/kernel/hooks/useRowInfo.js +70 -0
- package/lib/components/Table/internal/kernel/hooks/useSticky.d.ts +10 -0
- package/lib/components/Table/internal/kernel/hooks/useSticky.js +44 -0
- package/lib/components/Table/internal/kernel/hooks/useStickyOffsets.d.ts +6 -0
- package/lib/components/Table/internal/kernel/hooks/useStickyOffsets.js +38 -0
- package/lib/components/Table/internal/kernel/index.d.ts +12 -0
- package/lib/components/Table/internal/kernel/index.js +74 -0
- package/lib/components/Table/internal/kernel/interface.d.ts +202 -0
- package/lib/components/Table/internal/kernel/interface.js +6 -0
- package/lib/components/Table/internal/kernel/namePathType.d.ts +13 -0
- package/lib/components/Table/internal/kernel/namePathType.js +6 -0
- package/lib/components/Table/internal/kernel/selector-context/Immutable.d.ts +10 -0
- package/lib/components/Table/internal/kernel/selector-context/Immutable.js +82 -0
- package/lib/components/Table/internal/kernel/selector-context/context.d.ts +26 -0
- package/lib/components/Table/internal/kernel/selector-context/context.js +93 -0
- package/lib/components/Table/internal/kernel/selector-context/index.d.ts +7 -0
- package/lib/components/Table/internal/kernel/selector-context/index.js +34 -0
- package/lib/components/Table/internal/kernel/selector-context/isEqual.d.ts +5 -0
- package/lib/components/Table/internal/kernel/selector-context/isEqual.js +55 -0
- package/lib/components/Table/internal/kernel/stickyScrollBar.d.ts +12 -0
- package/lib/components/Table/internal/kernel/stickyScrollBar.js +203 -0
- package/lib/components/Table/internal/kernel/sugar/Column.d.ts +10 -0
- package/lib/components/Table/internal/kernel/sugar/Column.js +17 -0
- package/lib/components/Table/internal/kernel/sugar/ColumnGroup.d.ts +12 -0
- package/lib/components/Table/internal/kernel/sugar/ColumnGroup.js +17 -0
- package/lib/components/Table/internal/kernel/utils/dom/canUseDom.d.ts +1 -0
- package/lib/components/Table/internal/kernel/utils/dom/canUseDom.js +10 -0
- package/lib/components/Table/internal/kernel/utils/dom/isVisible.d.ts +2 -0
- package/lib/components/Table/internal/kernel/utils/dom/isVisible.js +34 -0
- package/lib/components/Table/internal/kernel/utils/expandUtil.d.ts +4 -0
- package/lib/components/Table/internal/kernel/utils/expandUtil.js +60 -0
- package/lib/components/Table/internal/kernel/utils/fixUtil.d.ts +21 -0
- package/lib/components/Table/internal/kernel/utils/fixUtil.js +70 -0
- package/lib/components/Table/internal/kernel/utils/get.d.ts +1 -0
- package/lib/components/Table/internal/kernel/utils/get.js +17 -0
- package/lib/components/Table/internal/kernel/utils/getScrollBarSize.d.ts +7 -0
- package/lib/components/Table/internal/kernel/utils/getScrollBarSize.js +45 -0
- package/lib/components/Table/internal/kernel/utils/legacyUtil.d.ts +5 -0
- package/lib/components/Table/internal/kernel/utils/legacyUtil.js +40 -0
- package/lib/components/Table/internal/kernel/utils/offsetUtil.d.ts +4 -0
- package/lib/components/Table/internal/kernel/utils/offsetUtil.js +21 -0
- package/lib/components/Table/internal/kernel/utils/pickAttrs.d.ts +6 -0
- package/lib/components/Table/internal/kernel/utils/pickAttrs.js +39 -0
- package/lib/components/Table/internal/kernel/utils/useMemo.d.ts +1 -0
- package/lib/components/Table/internal/kernel/utils/useMemo.js +19 -0
- package/lib/components/Table/internal/kernel/utils/valueUtil.d.ts +8 -0
- package/lib/components/Table/internal/kernel/utils/valueUtil.js +38 -0
- package/lib/components/Table/internal/kernel/utils/warning.d.ts +4 -0
- package/lib/components/Table/internal/kernel/utils/warning.js +26 -0
- package/lib/components/Table/renderers/BodyCell.d.ts +15 -0
- package/lib/components/Table/renderers/BodyCell.js +47 -0
- package/lib/components/Table/renderers/CellContent.d.ts +4 -0
- package/lib/components/Table/renderers/CellContent.js +32 -0
- package/lib/components/Table/renderers/EmptyState.d.ts +4 -0
- package/lib/components/Table/renderers/EmptyState.js +21 -0
- package/lib/components/Table/renderers/ExpandedRowContainer.d.ts +4 -0
- package/lib/components/Table/renderers/ExpandedRowContainer.js +16 -0
- package/lib/components/Table/renderers/HeaderCell.d.ts +7 -0
- package/lib/components/Table/renderers/HeaderCell.js +28 -0
- package/lib/components/Table/style/Table.css +1 -0
- package/lib/components/Table/style/Table.scss +376 -0
- package/lib/components/Table/style/css.js +12 -0
- package/lib/components/Table/style/index.d.ts +9 -0
- package/lib/components/Table/style/index.js +12 -0
- package/lib/components/Tabs/Tabs.d.ts +6 -0
- package/lib/components/Tabs/Tabs.js +121 -0
- package/lib/components/Tabs/index.d.ts +4 -0
- package/lib/components/Tabs/index.js +33 -0
- package/lib/components/Tabs/interface.d.ts +27 -0
- package/lib/components/Tabs/interface.js +6 -0
- package/lib/components/Tabs/style/Tabs.css +1 -0
- package/lib/components/Tabs/style/Tabs.scss +100 -0
- package/lib/components/Tabs/style/css.js +4 -0
- package/lib/components/Tabs/style/index.d.ts +1 -0
- package/lib/components/Tabs/style/index.js +4 -0
- package/lib/components/Tag/Tag.d.ts +6 -0
- package/lib/components/Tag/Tag.js +89 -0
- package/lib/components/Tag/constants.d.ts +18 -0
- package/lib/components/Tag/constants.js +34 -0
- package/lib/components/Tag/index.d.ts +5 -0
- package/lib/components/Tag/index.js +45 -0
- package/lib/components/Tag/interface.d.ts +15 -0
- package/lib/components/Tag/interface.js +6 -0
- package/lib/components/Tag/style/Tag.css +1 -0
- package/lib/components/Tag/style/Tag.scss +103 -0
- package/lib/components/Tag/style/css.js +4 -0
- package/lib/components/Tag/style/index.d.ts +1 -0
- package/lib/components/Tag/style/index.js +4 -0
- package/lib/components/Tooltip/Tooltip.d.ts +6 -0
- package/lib/components/Tooltip/Tooltip.js +71 -0
- package/lib/components/Tooltip/index.d.ts +4 -0
- package/lib/components/Tooltip/index.js +33 -0
- package/lib/components/Tooltip/interface.d.ts +20 -0
- package/lib/components/Tooltip/interface.js +6 -0
- package/lib/components/Tooltip/style/Tooltip.css +1 -0
- package/lib/components/Tooltip/style/Tooltip.scss +95 -0
- package/lib/components/Tooltip/style/css.js +4 -0
- package/lib/components/Tooltip/style/index.d.ts +1 -0
- package/lib/components/Tooltip/style/index.js +4 -0
- package/lib/components/Tour/Tour.d.ts +3 -0
- package/lib/components/Tour/Tour.js +250 -0
- package/lib/components/Tour/index.d.ts +4 -0
- package/lib/components/Tour/index.js +33 -0
- package/lib/components/Tour/interface.d.ts +46 -0
- package/lib/components/Tour/interface.js +6 -0
- package/lib/components/Trigger/Trigger.d.ts +5 -0
- package/lib/components/Trigger/Trigger.js +161 -0
- package/lib/components/Trigger/index.d.ts +3 -0
- package/lib/components/Trigger/index.js +35 -0
- package/lib/components/Trigger/interface.d.ts +52 -0
- package/lib/components/Trigger/interface.js +6 -0
- package/lib/components/Trigger/style/Trigger.css +1 -0
- package/lib/components/Trigger/style/Trigger.scss +18 -0
- package/lib/components/Trigger/style/css.js +4 -0
- package/lib/components/Trigger/style/index.d.ts +1 -0
- package/lib/components/Trigger/style/index.js +4 -0
- package/lib/components/Typography/Typography.d.ts +17 -0
- package/lib/components/Typography/Typography.js +207 -0
- package/lib/components/Typography/constants.d.ts +33 -0
- package/lib/components/Typography/constants.js +15 -0
- package/lib/components/Typography/index.d.ts +4 -0
- package/lib/components/Typography/index.js +79 -0
- package/lib/components/Typography/interface.d.ts +72 -0
- package/lib/components/Typography/interface.js +28 -0
- package/lib/components/Typography/render.d.ts +328 -0
- package/lib/components/Typography/render.js +116 -0
- package/lib/components/Typography/style/Typography.css +1 -0
- package/lib/components/Typography/style/Typography.scss +132 -0
- package/lib/components/Typography/style/css.js +6 -0
- package/lib/components/Typography/style/index.d.ts +3 -0
- package/lib/components/Typography/style/index.js +6 -0
- package/lib/components/Typography/useTypographyEnhancements.d.ts +43 -0
- package/lib/components/Typography/useTypographyEnhancements.js +117 -0
- package/lib/components/Typography/utils.d.ts +17 -0
- package/lib/components/Typography/utils.js +105 -0
- package/lib/components/Upload/Upload.d.ts +7 -0
- package/lib/components/Upload/Upload.js +97 -0
- package/lib/components/Upload/UploadFileBar.d.ts +6 -0
- package/lib/components/Upload/UploadFileBar.js +72 -0
- package/lib/components/Upload/index.d.ts +5 -0
- package/lib/components/Upload/index.js +41 -0
- package/lib/components/Upload/interface.d.ts +41 -0
- package/lib/components/Upload/interface.js +6 -0
- package/lib/components/Upload/style/Upload.css +1 -0
- package/lib/components/Upload/style/Upload.scss +44 -0
- package/lib/components/Upload/style/UploadFileBar.css +1 -0
- package/lib/components/Upload/style/UploadFileBar.scss +94 -0
- package/lib/components/Upload/style/css.js +5 -0
- package/lib/components/Upload/style/index.d.ts +2 -0
- package/lib/components/Upload/style/index.js +5 -0
- package/lib/components/VirtualList/Filler.d.ts +21 -0
- package/lib/components/VirtualList/Filler.js +66 -0
- package/lib/components/VirtualList/Item.d.ts +6 -0
- package/lib/components/VirtualList/Item.js +21 -0
- package/lib/components/VirtualList/ScrollBar.d.ts +22 -0
- package/lib/components/VirtualList/ScrollBar.js +247 -0
- package/lib/components/VirtualList/VirtualList.d.ts +62 -0
- package/lib/components/VirtualList/VirtualList.js +540 -0
- package/lib/components/VirtualList/constants.d.ts +4 -0
- package/lib/components/VirtualList/constants.js +11 -0
- package/lib/components/VirtualList/hooks/useChildren.d.ts +2 -0
- package/lib/components/VirtualList/hooks/useChildren.js +34 -0
- package/lib/components/VirtualList/hooks/useDiffItem.d.ts +2 -0
- package/lib/components/VirtualList/hooks/useDiffItem.js +25 -0
- package/lib/components/VirtualList/hooks/useFrameWheel.d.ts +10 -0
- package/lib/components/VirtualList/hooks/useFrameWheel.js +92 -0
- package/lib/components/VirtualList/hooks/useGetSize.d.ts +7 -0
- package/lib/components/VirtualList/hooks/useGetSize.js +57 -0
- package/lib/components/VirtualList/hooks/useHeights.d.ts +8 -0
- package/lib/components/VirtualList/hooks/useHeights.js +106 -0
- package/lib/components/VirtualList/hooks/useMobileTouchMove.d.ts +2 -0
- package/lib/components/VirtualList/hooks/useMobileTouchMove.js +91 -0
- package/lib/components/VirtualList/hooks/useOriginScroll.d.ts +2 -0
- package/lib/components/VirtualList/hooks/useOriginScroll.js +50 -0
- package/lib/components/VirtualList/hooks/useScrollDrag.d.ts +3 -0
- package/lib/components/VirtualList/hooks/useScrollDrag.js +87 -0
- package/lib/components/VirtualList/hooks/useScrollTo.d.ts +18 -0
- package/lib/components/VirtualList/hooks/useScrollTo.js +142 -0
- package/lib/components/VirtualList/index.d.ts +9 -0
- package/lib/components/VirtualList/index.js +31 -0
- package/lib/components/VirtualList/interface.d.ts +26 -0
- package/lib/components/VirtualList/interface.js +6 -0
- package/lib/components/VirtualList/style/VirtualList.css +1 -0
- package/lib/components/VirtualList/style/VirtualList.scss +5 -0
- package/lib/components/VirtualList/style/css.js +4 -0
- package/lib/components/VirtualList/style/index.d.ts +1 -0
- package/lib/components/VirtualList/style/index.js +4 -0
- package/lib/components/VirtualList/utils/CacheMap.d.ts +16 -0
- package/lib/components/VirtualList/utils/CacheMap.js +50 -0
- package/lib/components/VirtualList/utils/algorithmUtil.d.ts +23 -0
- package/lib/components/VirtualList/utils/algorithmUtil.js +84 -0
- package/lib/components/VirtualList/utils/isFirefox.d.ts +2 -0
- package/lib/components/VirtualList/utils/isFirefox.js +11 -0
- package/lib/components/VirtualList/utils/raf.d.ts +9 -0
- package/lib/components/VirtualList/utils/raf.js +53 -0
- package/lib/components/VirtualList/utils/scrollbarUtil.d.ts +1 -0
- package/lib/components/VirtualList/utils/scrollbarUtil.js +18 -0
- package/lib/index.css +1 -0
- package/lib/index.d.ts +89 -0
- package/lib/index.js +494 -0
- package/lib/styles/_api.scss +5 -0
- package/lib/styles/_settings.scss +5 -0
- package/lib/styles/index.css +1 -0
- package/lib/styles/index.scss +2 -0
- package/lib/styles/public/_index.scss +2 -0
- package/lib/styles/public/_system.scss +1 -0
- package/lib/styles/public/_theme.scss +3 -0
- package/lib/styles/recipes/_index.scss +1 -0
- package/lib/styles/recipes/_variants.scss +110 -0
- package/lib/styles/system/_index.scss +4 -0
- package/lib/styles/system/_props.scss +95 -0
- package/lib/styles/system/_public.scss +5 -0
- package/lib/styles/system/_sx.scss +81 -0
- package/lib/styles/theme/_breakpoints.scss +95 -0
- package/lib/styles/theme/_functions.scss +271 -0
- package/lib/styles/theme/_index.scss +6 -0
- package/lib/styles/theme/_mixins.scss +37 -0
- package/lib/styles/theme/_scales.scss +29 -0
- package/lib/styles/theme/_values.scss +68 -0
- package/lib/styles/tokens/_index.scss +11 -0
- package/lib/styles/tokens/breakpoint/_index.scss +2 -0
- package/lib/styles/tokens/breakpoint/_primitives.scss +8 -0
- package/lib/styles/tokens/color/_index.scss +3 -0
- package/lib/styles/tokens/color/_primitives.scss +42 -0
- package/lib/styles/tokens/color/_semantic-color.scss +172 -0
- package/lib/styles/tokens/opacity/_functions.scss +13 -0
- package/lib/styles/tokens/opacity/_index.scss +3 -0
- package/lib/styles/tokens/opacity/_primitives.scss +12 -0
- package/lib/styles/tokens/radius/_index.scss +2 -0
- package/lib/styles/tokens/radius/_primitives.scss +11 -0
- package/lib/styles/tokens/shadow/_index.scss +2 -0
- package/lib/styles/tokens/shadow/_primitives.scss +7 -0
- package/lib/styles/tokens/sizing/_functions.scss +17 -0
- package/lib/styles/tokens/sizing/_index.scss +4 -0
- package/lib/styles/tokens/sizing/_primitives.scss +12 -0
- package/lib/styles/tokens/sizing/_semantic-sizing.scss +11 -0
- package/lib/styles/tokens/spacing/_functions.scss +51 -0
- package/lib/styles/tokens/spacing/_index.scss +4 -0
- package/lib/styles/tokens/spacing/_primitives.scss +22 -0
- package/lib/styles/tokens/spacing/_semantic-spacing.scss +22 -0
- package/lib/styles/tokens/typography/_functions.scss +31 -0
- package/lib/styles/tokens/typography/_index.scss +4 -0
- package/lib/styles/tokens/typography/_primitives.scss +27 -0
- package/lib/styles/tokens/typography/_semantic-typography.scss +216 -0
- package/lib/styles/utilities/_generator.scss +55 -0
- package/lib/styles/utilities/_index.scss +14 -0
- package/lib/utils/classnames.d.ts +5 -0
- package/lib/utils/classnames.js +25 -0
- package/lib/utils/clipboard.d.ts +2 -0
- package/lib/utils/clipboard.js +56 -0
- package/lib/utils/ref.d.ts +4 -0
- package/lib/utils/ref.js +41 -0
- package/lib/utils/uuid.d.ts +2 -0
- package/lib/utils/uuid.js +23 -0
- package/package.json +442 -0
- package/patches/primereact.patch +323 -0
- package/patches/react-pro-sidebar.patch +6421 -0
- package/public/favicon.ico +0 -0
- package/public/fonts/Aeonik/Aeonik-Air.ttf +0 -0
- package/public/fonts/Aeonik/Aeonik-AirItalic.ttf +0 -0
- package/public/fonts/Aeonik/Aeonik-Black.ttf +0 -0
- package/public/fonts/Aeonik/Aeonik-BlackItalic.ttf +0 -0
- package/public/fonts/Aeonik/Aeonik-Bold.ttf +0 -0
- package/public/fonts/Aeonik/Aeonik-BoldItalic.ttf +0 -0
- package/public/fonts/Aeonik/Aeonik-Light.ttf +0 -0
- package/public/fonts/Aeonik/Aeonik-LightItalic.ttf +0 -0
- package/public/fonts/Aeonik/Aeonik-Medium.ttf +0 -0
- package/public/fonts/Aeonik/Aeonik-MediumItalic.ttf +0 -0
- package/public/fonts/Aeonik/Aeonik-Regular.ttf +0 -0
- package/public/fonts/Aeonik/Aeonik-RegularItalic.ttf +0 -0
- package/public/fonts/Aeonik/Aeonik-Thin.ttf +0 -0
- package/public/fonts/Aeonik/Aeonik-ThinItalic.ttf +0 -0
- package/public/fonts/Inter/Inter-Black.ttf +0 -0
- package/public/fonts/Inter/Inter-BlackItalic.ttf +0 -0
- package/public/fonts/Inter/Inter-Bold.ttf +0 -0
- package/public/fonts/Inter/Inter-BoldItalic.ttf +0 -0
- package/public/fonts/Inter/Inter-ExtraBold.ttf +0 -0
- package/public/fonts/Inter/Inter-ExtraBoldItalic.ttf +0 -0
- package/public/fonts/Inter/Inter-ExtraLight.ttf +0 -0
- package/public/fonts/Inter/Inter-ExtraLightItalic.ttf +0 -0
- package/public/fonts/Inter/Inter-Italic.ttf +0 -0
- package/public/fonts/Inter/Inter-Light.ttf +0 -0
- package/public/fonts/Inter/Inter-LightItalic.ttf +0 -0
- package/public/fonts/Inter/Inter-Medium.ttf +0 -0
- package/public/fonts/Inter/Inter-MediumItalic.ttf +0 -0
- package/public/fonts/Inter/Inter-Regular.ttf +0 -0
- package/public/fonts/Inter/Inter-SemiBold.ttf +0 -0
- package/public/fonts/Inter/Inter-SemiBoldItalic.ttf +0 -0
- package/public/fonts/Inter/Inter-Thin.ttf +0 -0
- package/public/fonts/Inter/Inter-ThinItalic.ttf +0 -0
- package/public/fonts/Outfit/Outfit-Black.ttf +0 -0
- package/public/fonts/Outfit/Outfit-Bold.ttf +0 -0
- package/public/fonts/Outfit/Outfit-ExtraBold.ttf +0 -0
- package/public/fonts/Outfit/Outfit-ExtraLight.ttf +0 -0
- package/public/fonts/Outfit/Outfit-Light.ttf +0 -0
- package/public/fonts/Outfit/Outfit-Medium.ttf +0 -0
- package/public/fonts/Outfit/Outfit-Regular.ttf +0 -0
- package/public/fonts/Outfit/Outfit-SemiBold.ttf +0 -0
- package/public/fonts/Outfit/Outfit-Thin.ttf +0 -0
- package/public/github-mark.svg +3 -0
- package/public/tokens/GYEN.svg +9 -0
- package/public/tokens/PYUSD.svg +9 -0
- package/public/tokens/USDT.svg +6 -0
- package/scripts/mcp-server/index.d.mts +1 -0
- package/scripts/mcp-server/index.mjs +45 -0
- package/scripts/mcp-server/resources.d.mts +1 -0
- package/scripts/mcp-server/resources.mjs +102 -0
- package/test/jsdom-global-register.d.ts +1 -0
- package/test/jsdom-global-register.js +1 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Item } from '../Item';
|
|
4
|
+
export default function useChildren(list, startIndex, endIndex, scrollWidth, offsetX, setNodeRef, renderFunc, _ref) {
|
|
5
|
+
var getKey = _ref.getKey;
|
|
6
|
+
return React.useMemo(function () {
|
|
7
|
+
return list.slice(startIndex, endIndex + 1).map(function (item, index) {
|
|
8
|
+
var eleIndex = startIndex + index;
|
|
9
|
+
var node = renderFunc(item, eleIndex, {
|
|
10
|
+
style: {
|
|
11
|
+
width: scrollWidth
|
|
12
|
+
},
|
|
13
|
+
offsetX: offsetX
|
|
14
|
+
});
|
|
15
|
+
var key = getKey(item);
|
|
16
|
+
return _jsx(Item, {
|
|
17
|
+
setRef: function setRef(ele) {
|
|
18
|
+
return setNodeRef(item, ele);
|
|
19
|
+
},
|
|
20
|
+
children: node
|
|
21
|
+
}, key);
|
|
22
|
+
});
|
|
23
|
+
}, [list, startIndex, endIndex, scrollWidth, offsetX, setNodeRef, renderFunc, getKey]);
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbXBvbmVudHMvVmlydHVhbExpc3QvaG9va3MvdXNlQ2hpbGRyZW4uanMiLCJjb21wb25lbnRzL1ZpcnR1YWxMaXN0L3NyYy9jb21wb25lbnRzL1ZpcnR1YWxMaXN0L2hvb2tzL3VzZUNoaWxkcmVuLnRzeCJdLCJuYW1lcyI6WyJqc3giLCJfanN4IiwiUmVhY3QiLCJJdGVtIiwidXNlQ2hpbGRyZW4iLCJsaXN0Iiwic3RhcnRJbmRleCIsImVuZEluZGV4Iiwic2Nyb2xsV2lkdGgiLCJvZmZzZXRYIiwic2V0Tm9kZVJlZiIsInJlbmRlckZ1bmMiLCJfcmVmIiwiZ2V0S2V5IiwidXNlTWVtbyIsInNsaWNlIiwibWFwIiwiaXRlbSIsImluZGV4IiwiZWxlSW5kZXgiLCJub2RlIiwic3R5bGUiLCJ3aWR0aCIsImtleSIsInNldFJlZiIsImVsZSIsImNoaWxkcmVuIl0sIm1hcHBpbmdzIjoiQUFBQ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mVmOiAoZWxlKSA9PiBzZXROb2RlUmVmKGl0ZW0sIGVsZSksIGNoaWxkcmVuOiBub2RlIH0sIGtleSkpO1xuICAgIH0pLCBbbGlzdCwgc3RhcnRJbmRleCwgZW5kSW5kZXgsIHNjcm9sbFdpZHRoLCBvZmZzZXRYLCBzZXROb2RlUmVmLCByZW5kZXJGdW5jLCBnZXRLZXldKTtcbn0iLG51bGxdLCJzb3VyY2VSb290IjoiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjIn0=
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { findListDiffIndex } from '../utils/algorithmUtil';
|
|
3
|
+
export default function useDiffItem(data, getKey, onDiff) {
|
|
4
|
+
var prevDataRef = React.useRef(data);
|
|
5
|
+
var diffItemRef = React.useRef(null);
|
|
6
|
+
if (prevDataRef.current !== data) {
|
|
7
|
+
var diff = findListDiffIndex(prevDataRef.current || [], data || [], getKey);
|
|
8
|
+
if ((diff === null || diff === void 0 ? void 0 : diff.index) !== undefined) {
|
|
9
|
+
onDiff === null || onDiff === void 0 ? void 0 : onDiff(diff.index);
|
|
10
|
+
diffItemRef.current = data[diff.index];
|
|
11
|
+
}
|
|
12
|
+
prevDataRef.current = data;
|
|
13
|
+
}
|
|
14
|
+
return [diffItemRef.current];
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbXBvbmVudHMvVmlydHVhbExpc3Qvc3JjL2NvbXBvbmVudHMvVmlydHVhbExpc3QvaG9va3MvdXNlRGlmZkl0ZW0udHMiXSwibmFtZXMiOlsiUmVhY3QiLCJmaW5kTGlzdERpZmZJbmRleCIsInVzZURpZmZJdGVtIiwiZGF0YSIsImdldEtleSIsIm9uRGlmZiIsInByZXZEYXRhUmVmIiwidXNlUmVmIiwiZGlmZkl0ZW1SZWYiLCJjdXJyZW50IiwiZ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pbGUiOiJjb21wb25lbnRzL1ZpcnR1YWxMaXN0L2hvb2tzL3VzZURpZmZJdGVtLmpzIiwic291cmNlc0NvbnRlbnQiOltudWxsXSwic291cmNlUm9vdCI6Ii4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYyJ9
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface FireFoxDOMMouseScrollEvent {
|
|
2
|
+
detail: number;
|
|
3
|
+
preventDefault: VoidFunction;
|
|
4
|
+
}
|
|
5
|
+
export default function useFrameWheel(inVirtual: boolean, isScrollAtTop: boolean, isScrollAtBottom: boolean, isScrollAtLeft: boolean, isScrollAtRight: boolean, horizontalScroll: boolean,
|
|
6
|
+
/***
|
|
7
|
+
* Return `true` when you need to prevent default event
|
|
8
|
+
*/
|
|
9
|
+
onWheelDelta: (offset: number, horizontal: boolean) => void): [(e: WheelEvent) => void, (e: FireFoxDOMMouseScrollEvent) => void];
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import raf from '../utils/raf';
|
|
2
|
+
import { useRef } from 'react';
|
|
3
|
+
import isFF from '../utils/isFirefox';
|
|
4
|
+
import useOriginScroll from './useOriginScroll';
|
|
5
|
+
export default function useFrameWheel(inVirtual, isScrollAtTop, isScrollAtBottom, isScrollAtLeft, isScrollAtRight, horizontalScroll,
|
|
6
|
+
/***
|
|
7
|
+
* Return `true` when you need to prevent default event
|
|
8
|
+
*/
|
|
9
|
+
onWheelDelta) {
|
|
10
|
+
var offsetRef = useRef(0);
|
|
11
|
+
var nextFrameRef = useRef(null);
|
|
12
|
+
// Firefox patch
|
|
13
|
+
var wheelValueRef = useRef(null);
|
|
14
|
+
var isMouseScrollRef = useRef(false);
|
|
15
|
+
// Scroll status sync
|
|
16
|
+
var originScroll = useOriginScroll(isScrollAtTop, isScrollAtBottom, isScrollAtLeft, isScrollAtRight);
|
|
17
|
+
function onWheelY(e, deltaY) {
|
|
18
|
+
raf.cancel(nextFrameRef.current);
|
|
19
|
+
// Do nothing when scroll at the edge, Skip check when is in scroll
|
|
20
|
+
if (originScroll(false, deltaY)) return;
|
|
21
|
+
// Skip if nest List has handled this event
|
|
22
|
+
var event = e;
|
|
23
|
+
if (!event._virtualHandled) {
|
|
24
|
+
event._virtualHandled = true;
|
|
25
|
+
} else {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
offsetRef.current += deltaY;
|
|
29
|
+
wheelValueRef.current = deltaY;
|
|
30
|
+
// Proxy of scroll events
|
|
31
|
+
if (!isFF) {
|
|
32
|
+
event.preventDefault();
|
|
33
|
+
}
|
|
34
|
+
nextFrameRef.current = raf(function () {
|
|
35
|
+
// Patch a multiple for Firefox to fix wheel number too small
|
|
36
|
+
var patchMultiple = isMouseScrollRef.current ? 10 : 1;
|
|
37
|
+
onWheelDelta(offsetRef.current * patchMultiple, false);
|
|
38
|
+
offsetRef.current = 0;
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
function onWheelX(event, deltaX) {
|
|
42
|
+
onWheelDelta(deltaX, true);
|
|
43
|
+
if (!isFF) {
|
|
44
|
+
event.preventDefault();
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
// Check for which direction does wheel do. `sx` means `shift + wheel`
|
|
48
|
+
var wheelDirectionRef = useRef(null);
|
|
49
|
+
var wheelDirectionCleanRef = useRef(null);
|
|
50
|
+
function onWheel(event) {
|
|
51
|
+
if (!inVirtual) return;
|
|
52
|
+
// Wait for 2 frame to clean direction
|
|
53
|
+
raf.cancel(wheelDirectionCleanRef.current);
|
|
54
|
+
wheelDirectionCleanRef.current = raf(function () {
|
|
55
|
+
wheelDirectionRef.current = null;
|
|
56
|
+
}, 2);
|
|
57
|
+
var deltaX = event.deltaX,
|
|
58
|
+
deltaY = event.deltaY,
|
|
59
|
+
shiftKey = event.shiftKey;
|
|
60
|
+
var mergedDeltaX = deltaX;
|
|
61
|
+
var mergedDeltaY = deltaY;
|
|
62
|
+
if (wheelDirectionRef.current === 'sx' || !wheelDirectionRef.current && (shiftKey || false) && deltaY && !deltaX) {
|
|
63
|
+
mergedDeltaX = deltaY;
|
|
64
|
+
mergedDeltaY = 0;
|
|
65
|
+
wheelDirectionRef.current = 'sx';
|
|
66
|
+
}
|
|
67
|
+
var absX = Math.abs(mergedDeltaX);
|
|
68
|
+
var absY = Math.abs(mergedDeltaY);
|
|
69
|
+
if (wheelDirectionRef.current === null) {
|
|
70
|
+
wheelDirectionRef.current = horizontalScroll && absX > absY ? 'x' : 'y';
|
|
71
|
+
}
|
|
72
|
+
if (wheelDirectionRef.current === 'y') {
|
|
73
|
+
onWheelY(event, mergedDeltaY);
|
|
74
|
+
} else {
|
|
75
|
+
onWheelX(event, mergedDeltaX);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
// A patch for firefox
|
|
79
|
+
function onFireFoxScroll(event) {
|
|
80
|
+
if (!inVirtual) return;
|
|
81
|
+
isMouseScrollRef.current = event.detail === wheelValueRef.current;
|
|
82
|
+
}
|
|
83
|
+
return [onWheel, onFireFoxScroll];
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbXBvbmVudHMvVmlydHVhbExpc3Qvc3JjL2NvbXBvbmVudHMvVmlydHVhbExpc3QvaG9va3MvdXNlRnJhbWVXaGVlbC50cyIsImNvbXBvbmVudHMvVmlydHVhbExpc3QvaG9va3MvdXNlRnJhbWVXaGVlbC5qcyJdLCJuYW1lcyI6WyJyYWYiLCJ1c2VSZWYiLCJpc0ZGIiwidXNlT3JpZ2luU2Nyb2xsIiwidXNlRnJhbWVXaGVlbCIsImluVmlydHVhbCIsImlzU2Nyb2xsQXRUb3AiLCJpc1Njcm9sbEF0Qm90dG9tIiwiaXNTY3JvbGxBdExlZnQiLCJpc1Njcm9sbEF0UmlnaHQiLCJob3Jpem9udGFsU2Nyb2xsIiwib25XaGVlbERlbHRhIiwib2Zmc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FZID0gMDtcbiAgICAgICAgICAgIHdoZWVsRGlyZWN0aW9uUmVmLmN1cnJlbnQgPSAnc3gnO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IGFic1ggPSBNYXRoLmFicyhtZXJnZWREZWx0YVgpO1xuICAgICAgICBjb25zdCBhYnNZID0gTWF0aC5hYnMobWVyZ2VkRGVsdGFZKTtcbiAgICAgICAgaWYgKHdoZWVsRGlyZWN0aW9uUmVmLmN1cnJlbnQgPT09IG51bGwpIHtcbiAgICAgICAgICAgIHdoZWVsRGlyZWN0aW9uUmVmLmN1cnJlbnQgPSBob3Jpem9udGFsU2Nyb2xsICYmIGFic1ggPiBhYnNZID8gJ3gnIDogJ3knO1xuICAgICAgICB9XG4gICAgICAgIGlmICh3aGVlbERpcmVjdGlvblJlZi5jdXJyZW50ID09PSAneScpIHtcbiAgICAgICAgICAgIG9uV2hlZWxZKGV2ZW50LCBtZXJnZWREZWx0YVkpO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgb25XaGVlbFgoZXZlbnQsIG1lcmdlZERlbHRhWCk7XG4gICAgICAgIH1cbiAgICB9XG4gICAgLy8gQSBwYXRjaCBmb3IgZmlyZWZveFxuICAgIGZ1bmN0aW9uIG9uRmlyZUZveFNjcm9sbChldmVudCkge1xuICAgICAgICBpZiAoIWluVmlydHVhbClcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgaXNNb3VzZVNjcm9sbFJlZi5jdXJyZW50ID0gZXZlbnQuZGV0YWlsID09PSB3aGVlbFZhbHVlUmVmLmN1cnJlbnQ7XG4gICAgfVxuICAgIHJldHVybiBbb25XaGVlbCwgb25GaXJlRm94U2Nyb2xsXTtcbn0iXSwic291cmNlUm9vdCI6Ii4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYyJ9
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type CacheMap from '../utils/CacheMap';
|
|
2
|
+
import type { GetKey, GetSize } from '../interface';
|
|
3
|
+
/**
|
|
4
|
+
* Size info need loop query for the `heights` which will has the perf issue.
|
|
5
|
+
* Let cache result for each render phase.
|
|
6
|
+
*/
|
|
7
|
+
export declare function useGetSize<T>(mergedData: T[], getKey: GetKey<T>, heights: CacheMap, itemHeight: number): GetSize;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Size info need loop query for the `heights` which will has the perf issue.
|
|
5
|
+
* Let cache result for each render phase.
|
|
6
|
+
*/
|
|
7
|
+
export function useGetSize(mergedData, getKey, heights, itemHeight) {
|
|
8
|
+
var _React$useMemo = React.useMemo(function () {
|
|
9
|
+
return [new Map(), []];
|
|
10
|
+
}, [mergedData, heights.id, itemHeight]),
|
|
11
|
+
_React$useMemo2 = _slicedToArray(_React$useMemo, 2),
|
|
12
|
+
key2Index = _React$useMemo2[0],
|
|
13
|
+
bottomList = _React$useMemo2[1];
|
|
14
|
+
var getSize = function getSize(startKey) {
|
|
15
|
+
var endKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : startKey;
|
|
16
|
+
var _a;
|
|
17
|
+
// Get from cache first
|
|
18
|
+
var startIndex = key2Index.get(startKey);
|
|
19
|
+
var endIndex = key2Index.get(endKey);
|
|
20
|
+
// Loop to fill the cache
|
|
21
|
+
if (startIndex === undefined || endIndex === undefined) {
|
|
22
|
+
var dataLen = mergedData.length;
|
|
23
|
+
for (var i = bottomList.length; i < dataLen; i += 1) {
|
|
24
|
+
var item = mergedData[i];
|
|
25
|
+
var key = getKey(item);
|
|
26
|
+
key2Index.set(key, i);
|
|
27
|
+
var cacheHeight = (_a = heights.get(key)) !== null && _a !== void 0 ? _a : itemHeight;
|
|
28
|
+
bottomList[i] = (bottomList[i - 1] || 0) + cacheHeight;
|
|
29
|
+
if (key === startKey) {
|
|
30
|
+
startIndex = i;
|
|
31
|
+
}
|
|
32
|
+
if (key === endKey) {
|
|
33
|
+
endIndex = i;
|
|
34
|
+
}
|
|
35
|
+
if (startIndex !== undefined && endIndex !== undefined) {
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
top: bottomList[startIndex - 1] || 0,
|
|
42
|
+
bottom: bottomList[endIndex]
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
return getSize;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbXBvbmVudHMvVmlydHVhbExpc3Qvc3JjL2NvbXBvbmVudHMvVmlydHVhbExpc3QvaG9va3MvdXNlR2V0U2l6ZS50cyIsImNvbXBvbmVudHMvVmlydHVhbExpc3QvaG9va3MvdXNlR2V0U2l6ZS5qcyJdLCJuYW1lcyI6WyJSZWFjdCIsInVzZUdldFNpemUiLCJtZXJnZWREYXRhIiwiZ2V0S2V5IiwiaGVpZ2h0cyIsIml0ZW1IZWlnaHQiLCJfUmVhY3QkdXNlTWVtbyIsInVzZU1lbW8iLCJNYXAiLCJpZCIsIl9SZWFjdCR1c2VNZW1vMiIsIl9zbGljZWRUb0FycmF5Iiwia2V5MkluZGV4IiwiYm90dG9tTGlzdCIsImdldFNpemUiLCJzdGFydEtleSIsImVuZEtleSIsImFyZ3VtZW50cyIsImxlbmd0aCIsInVuZGVmaW5lZCIsIl9hIiwic3RhcnRJbmRleCIsImdldCIsImVuZEluZGV4IiwiZGF0YUxlbiIsImkiLCJpdGVtIiwia2V5Iiwic2V0IiwiY2FjaGVIZWlnaHQiLCJ0b3AiLCJib3R0b20iXSwibWFwcGluZ3MiOiI7QUFFQSxPQUFPLEtBQUtBLEtBQUssTUFBTSxPQUFPO0FBRTlCO0FDRkE7QUFDQTtBQUNBO0FESUEsT0FBTSxTQUFVQyxVQUFVQSxDQUN4QkMsVUFBZSxFQU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tKTtcbiAgICAgICAgICAgICAgICBrZXkySW5kZXguc2V0KGtleSwgaSk7XG4gICAgICAgICAgICAgICAgY29uc3QgY2FjaGVIZWlnaHQgPSAoX2EgPSBoZWlnaHRzLmdldChrZXkpKSAhPT0gbnVsbCAmJiBfYSAhPT0gdm9pZCAwID8gX2EgOiBpdGVtSGVpZ2h0O1xuICAgICAgICAgICAgICAgIGJvdHRvbUxpc3RbaV0gPSAoYm90dG9tTGlzdFtpIC0gMV0gfHwgMCkgKyBjYWNoZUhlaWdodDtcbiAgICAgICAgICAgICAgICBpZiAoa2V5ID09PSBzdGFydEtleSkge1xuICAgICAgICAgICAgICAgICAgICBzdGFydEluZGV4ID0gaTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGtleSA9PT0gZW5kS2V5KSB7XG4gICAgICAgICAgICAgICAgICAgIGVuZEluZGV4ID0gaTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHN0YXJ0SW5kZXggIT09IHVuZGVmaW5lZCAmJiBlbmRJbmRleCAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgdG9wOiBib3R0b21MaXN0W3N0YXJ0SW5kZXggLSAxXSB8fCAwLFxuICAgICAgICAgICAgYm90dG9tOiBib3R0b21MaXN0W2VuZEluZGV4XSxcbiAgICAgICAgfTtcbiAgICB9O1xuICAgIHJldHVybiBnZXRTaXplO1xufSJdLCJzb3VyY2VSb290IjoiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjIn0=
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { GetKey } from '../interface';
|
|
2
|
+
import CacheMap from '../utils/CacheMap';
|
|
3
|
+
export default function useHeights<T>(getKey: GetKey<T>, onItemAdd?: (item: T) => void, onItemRemove?: (item: T) => void): [
|
|
4
|
+
setInstanceRef: (item: T, instance: HTMLElement) => void,
|
|
5
|
+
collectHeight: (sync?: boolean) => void,
|
|
6
|
+
cacheMap: CacheMap,
|
|
7
|
+
updatedMark: number
|
|
8
|
+
];
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useEffect, useRef } from 'react';
|
|
4
|
+
import CacheMap from '../utils/CacheMap';
|
|
5
|
+
function parseNumber(value) {
|
|
6
|
+
var num = parseFloat(value);
|
|
7
|
+
return isNaN(num) ? 0 : num;
|
|
8
|
+
}
|
|
9
|
+
export default function useHeights(getKey, onItemAdd, onItemRemove) {
|
|
10
|
+
var _React$useState = React.useState(0),
|
|
11
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
12
|
+
updatedMark = _React$useState2[0],
|
|
13
|
+
setUpdatedMark = _React$useState2[1];
|
|
14
|
+
var instanceRef = useRef(new Map());
|
|
15
|
+
var heightsRef = useRef(new CacheMap());
|
|
16
|
+
var marginCacheRef = useRef(new Map());
|
|
17
|
+
var promiseIdRef = useRef(0);
|
|
18
|
+
function cancelRaf() {
|
|
19
|
+
promiseIdRef.current += 1;
|
|
20
|
+
}
|
|
21
|
+
function collectHeight() {
|
|
22
|
+
var sync = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
23
|
+
cancelRaf();
|
|
24
|
+
var doCollect = function doCollect() {
|
|
25
|
+
var changed = false;
|
|
26
|
+
instanceRef.current.forEach(function (element, key) {
|
|
27
|
+
if (element && element.offsetParent) {
|
|
28
|
+
var offsetHeight = element.offsetHeight;
|
|
29
|
+
// Only call getComputedStyle when offsetHeight changes or no margin cache exists
|
|
30
|
+
var marginTop;
|
|
31
|
+
var marginBottom;
|
|
32
|
+
var cachedMargin = marginCacheRef.current.get(key);
|
|
33
|
+
var prevHeight = heightsRef.current.get(key);
|
|
34
|
+
if (!cachedMargin || prevHeight !== undefined && Math.abs(prevHeight - offsetHeight - (cachedMargin.marginTop + cachedMargin.marginBottom)) > 1) {
|
|
35
|
+
var style = getComputedStyle(element);
|
|
36
|
+
marginTop = parseNumber(style.marginTop);
|
|
37
|
+
marginBottom = parseNumber(style.marginBottom);
|
|
38
|
+
marginCacheRef.current.set(key, {
|
|
39
|
+
marginTop: marginTop,
|
|
40
|
+
marginBottom: marginBottom
|
|
41
|
+
});
|
|
42
|
+
} else {
|
|
43
|
+
marginTop = cachedMargin.marginTop;
|
|
44
|
+
marginBottom = cachedMargin.marginBottom;
|
|
45
|
+
}
|
|
46
|
+
var totalHeight = offsetHeight + marginTop + marginBottom;
|
|
47
|
+
if (heightsRef.current.get(key) !== totalHeight) {
|
|
48
|
+
heightsRef.current.set(key, totalHeight);
|
|
49
|
+
changed = true;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
// Always trigger update mark to tell parent that should re-calculate heights when resized
|
|
54
|
+
if (changed) {
|
|
55
|
+
setUpdatedMark(function (c) {
|
|
56
|
+
return c + 1;
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
if (sync) {
|
|
61
|
+
doCollect();
|
|
62
|
+
} else {
|
|
63
|
+
promiseIdRef.current += 1;
|
|
64
|
+
var id = promiseIdRef.current;
|
|
65
|
+
Promise.resolve().then(function () {
|
|
66
|
+
if (id === promiseIdRef.current) {
|
|
67
|
+
doCollect();
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
function setInstanceRef(item, instance) {
|
|
73
|
+
var key = getKey(item);
|
|
74
|
+
var origin = instanceRef.current.get(key);
|
|
75
|
+
if (instance) {
|
|
76
|
+
instanceRef.current.set(key, instance);
|
|
77
|
+
collectHeight();
|
|
78
|
+
} else {
|
|
79
|
+
instanceRef.current["delete"](key);
|
|
80
|
+
marginCacheRef.current["delete"](key);
|
|
81
|
+
}
|
|
82
|
+
// Instance changed
|
|
83
|
+
if (!origin !== !instance) {
|
|
84
|
+
if (instance) {
|
|
85
|
+
onItemAdd === null || onItemAdd === void 0 ? void 0 : onItemAdd(item);
|
|
86
|
+
} else {
|
|
87
|
+
onItemRemove === null || onItemRemove === void 0 ? void 0 : onItemRemove(item);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
useEffect(function () {
|
|
92
|
+
return cancelRaf;
|
|
93
|
+
}, []);
|
|
94
|
+
return [setInstanceRef, collectHeight, heightsRef.current, updatedMark];
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbXBvbmVudHMvVmlydHVhbExpc3Qvc3JjL2NvbXBvbmVudHMvVmlydHVhbExpc3QvaG9va3MvdXNlSGVpZ2h0cy50c3giXSwibmFtZXMiOlsiUmVhY3QiLCJ1c2VFZmZlY3QiLCJ1c2VSZWYiLCJDYWNoZU1hcCIsInBhcnNlTnVtYmVyIiwidmFsdWUiLCJudW0iLCJwYXJzZUZsb2F0IiwiaXNOYU4iLCJ1c2VIZWlnaHRzIiwiZ2V0S2V5Iiwib25JdGVtQWRkIiwib25JdGVtUmVtb3ZlIiwiX1JlYWN0JHVzZVN0YXRlIiwidXNlU3RhdGUiLCJfUmVhY3QkdXNlU3RhdGUyIiwiX3NsaWNlZFRvQXJyYXkiLCJ1cGRhdGVkTWFyayIsInNldFVwZGF0ZWRNYXJrIiwiaW5zdGFuY2VSZWYiLCJNYXAiLCJoZWlnaHRzUmVmIiwibWFyZ2luQ2FjaGVSZWYiLCJwcm9taXNlSWRSZWYiLCJjYW5jZWxSYWYiLCJjdXJyZW50IiwiY29sbGVjdEhlaWdodCIsInN5bmMiLCJhcmd1bWVudHMiLCJsZW5ndGgiLCJ1bmRlZmluZWQiLCJkb0NvbGxlY3QiLCJjaGFuZ2VkIi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NBQVMsS0FBQSxJQUFBLElBQVRBLFNBQVMsS0FBQSxLQUFBLENBQUEsR0FBQSxLQUFBLENBQUEsR0FBVEEsU0FBUyxDQUFHNEMsSUFBSSxDQUFDO01BQ25CLENBQUMsTUFBTTtRQUNMM0MsWUFBWSxLQUFBLElBQUEsSUFBWkEsWUFBWSxLQUFBLEtBQUEsQ0FBQSxHQUFBLEtBQUEsQ0FBQSxHQUFaQSxZQUFZLENBQUcyQyxJQUFJLENBQUM7TUFDdEI7SUFDRjtFQUNGO0VBRUF0RCxTQUFTLENBQUMsWUFBSztJQUNiLE9BQU91QixTQUFTO0VBQ2xCLENBQUMsRUFBRSxFQUFFLENBQUM7RUFFTixPQUFPLENBQUM4QixjQUFjLEVBQUU1QixhQUFhLEVBQUVMLFVBQVUsQ0FBQ0ksT0FBTyxFQUFFUixXQUFXLENBQUM7QUFDekUiLCJmaWxlIjoiY29tcG9uZW50cy9WaXJ0dWFsTGlzdC9ob29rcy91c2VIZWlnaHRzLmpzIiwic291cmNlc0NvbnRlbnQiOltudWxsXSwic291cmNlUm9vdCI6Ii4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYyJ9
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { useLayoutEffect } from '@1money/hooks';
|
|
2
|
+
import { useRef } from 'react';
|
|
3
|
+
var SMOOTH_PTG = 14 / 15;
|
|
4
|
+
export default function useMobileTouchMove(inVirtual, listRef, callback) {
|
|
5
|
+
var touchedRef = useRef(false);
|
|
6
|
+
var touchXRef = useRef(0);
|
|
7
|
+
var touchYRef = useRef(0);
|
|
8
|
+
var elementRef = useRef(null);
|
|
9
|
+
// Smooth scroll
|
|
10
|
+
var intervalRef = useRef(null);
|
|
11
|
+
var cleanUpEvents;
|
|
12
|
+
var onTouchMove = function onTouchMove(e) {
|
|
13
|
+
if (touchedRef.current) {
|
|
14
|
+
var currentX = Math.ceil(e.touches[0].pageX);
|
|
15
|
+
var currentY = Math.ceil(e.touches[0].pageY);
|
|
16
|
+
var offsetX = touchXRef.current - currentX;
|
|
17
|
+
var offsetY = touchYRef.current - currentY;
|
|
18
|
+
var isHorizontal = Math.abs(offsetX) > Math.abs(offsetY);
|
|
19
|
+
if (isHorizontal) {
|
|
20
|
+
touchXRef.current = currentX;
|
|
21
|
+
} else {
|
|
22
|
+
touchYRef.current = currentY;
|
|
23
|
+
}
|
|
24
|
+
var scrollHandled = callback(isHorizontal, isHorizontal ? offsetX : offsetY, false, e);
|
|
25
|
+
if (scrollHandled) {
|
|
26
|
+
e.preventDefault();
|
|
27
|
+
}
|
|
28
|
+
// Smooth interval
|
|
29
|
+
clearInterval(intervalRef.current);
|
|
30
|
+
if (scrollHandled) {
|
|
31
|
+
intervalRef.current = setInterval(function () {
|
|
32
|
+
if (isHorizontal) {
|
|
33
|
+
offsetX *= SMOOTH_PTG;
|
|
34
|
+
} else {
|
|
35
|
+
offsetY *= SMOOTH_PTG;
|
|
36
|
+
}
|
|
37
|
+
var offset = Math.floor(isHorizontal ? offsetX : offsetY);
|
|
38
|
+
if (!callback(isHorizontal, offset, true) || Math.abs(offset) <= 0.1) {
|
|
39
|
+
clearInterval(intervalRef.current);
|
|
40
|
+
}
|
|
41
|
+
}, 16);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
var onTouchEnd = function onTouchEnd() {
|
|
46
|
+
touchedRef.current = false;
|
|
47
|
+
cleanUpEvents();
|
|
48
|
+
};
|
|
49
|
+
var onTouchStart = function onTouchStart(e) {
|
|
50
|
+
cleanUpEvents();
|
|
51
|
+
if (e.touches.length === 1 && !touchedRef.current) {
|
|
52
|
+
touchedRef.current = true;
|
|
53
|
+
touchXRef.current = Math.ceil(e.touches[0].pageX);
|
|
54
|
+
touchYRef.current = Math.ceil(e.touches[0].pageY);
|
|
55
|
+
elementRef.current = e.target;
|
|
56
|
+
elementRef.current.addEventListener('touchmove', onTouchMove, {
|
|
57
|
+
passive: false
|
|
58
|
+
});
|
|
59
|
+
elementRef.current.addEventListener('touchend', onTouchEnd, {
|
|
60
|
+
passive: true
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
cleanUpEvents = function cleanUpEvents() {
|
|
65
|
+
if (elementRef.current) {
|
|
66
|
+
elementRef.current.removeEventListener('touchmove', onTouchMove);
|
|
67
|
+
elementRef.current.removeEventListener('touchend', onTouchEnd);
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
useLayoutEffect(function () {
|
|
71
|
+
var _a;
|
|
72
|
+
if (inVirtual) {
|
|
73
|
+
(_a = listRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener('touchstart', onTouchStart, {
|
|
74
|
+
passive: true
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
return function () {
|
|
78
|
+
var _a;
|
|
79
|
+
(_a = listRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('touchstart', onTouchStart);
|
|
80
|
+
cleanUpEvents();
|
|
81
|
+
clearInterval(intervalRef.current);
|
|
82
|
+
};
|
|
83
|
+
}, [inVirtual]);
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbXBvbmVudHMvVmlydHVhbExpc3Qvc3JjL2NvbXBvbmVudHMvVmlydHVhbExpc3QvaG9va3MvdXNlTW9iaWxlVG91Y2hNb3ZlLnRzIiwiY29tcG9uZW50cy9WaXJ0dWFsTGlzdC9ob29rcy91c2VNb2JpbGVUb3VjaE1vdmUuanMiXSwibmFtZXMiOlsidXNlTGF5b3V0RWZmZWN0IiwidXNlUmVmIiwiU01PT1RIX1BURyIsInVzZU1vYmlsZVRvdWNoTW92ZSIsImluVmlydHVhbCIsImxpc3RSZWYiLCJjYWxsYmFjayIsInRvdWNoZWRSZWYiLCJ0b3VjaFhSZWYiLCJ0b3VjaFlSZWYiLCJlbGVtZW50UmVmIiwiaW50ZXJ2YWxSZWYiL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xuICAgIGxldCBjbGVhblVwRXZlbnRzO1xuICAgIGNvbnN0IG9uVG91Y2hNb3ZlID0gKGUpID0+IHtcbiAgICAgICAgaWYgKHRvdWNoZWRSZWYuY3VycmVudCkge1xuICAgICAgICAgICAgY29uc3QgY3VycmVudFggPSBNYXRoLmNlaWwoZS50b3VjaGVzWzBdLnBhZ2VYKTtcbiAgICAgICAgICAgIGNvbnN0IGN1cnJlbnRZID0gTWF0aC5jZWlsKGUudG91Y2hlc1swXS5wYWdlWSk7XG4gICAgICAgICAgICBsZXQgb2Zmc2V0WCA9IHRvdWNoWFJlZi5jdXJyZW50IC0gY3VycmVudFg7XG4gICAgICAgICAgICBsZXQgb2Zmc2V0WSA9IHRvdWNoWVJlZi5jdXJyZW50IC0gY3VycmVudFk7XG4gICAgICAgICAgICBjb25zdCBpc0hvcml6b250YWwgPSBNYXRoLmFicyhvZmZzZXRYKSA+IE1hdGguYWJzKG9mZnNldFkpO1xuICAgICAgICAgICAgaWYgKGlzSG9yaXpvbnRhbCkge1xuICAgICAgICAgICAgICAgIHRvdWNoWFJlZi5jdXJyZW50ID0gY3VycmVudFg7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICB0b3VjaFlSZWYuY3VycmVudCA9IGN1cnJlbnRZO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY29uc3Qgc2Nyb2xsSGFuZGxlZCA9IGNhbGxiYWNrKGlzSG9yaXpvbnRhbCwgaXNIb3Jpem9udGFsID8gb2Zmc2V0WCA6IG9mZnNldFksIGZhbHNlLCBlKTtcbiAgICAgICAgICAgIGlmIChzY3JvbGxIYW5kbGVkKSB7XG4gICAgICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gU21vb3RoIGludGVydmFsXG4gICAgICAgICAgICBjbGVhckludGVydmFsKGludGVydmFsUmVmLmN1cnJlbnQpO1xuICAgICAgICAgICAgaWYgKHNjcm9sbEhhbmRsZWQpIHtcbiAgICAgICAgICAgICAgICBpbnRlcnZhbFJlZi5jdXJyZW50ID0gc2V0SW50ZXJ2YWwoKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoaXNIb3Jpem9udGFsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBvZmZzZXRYICo9IFNNT09USF9QVEc7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBvZmZzZXRZICo9IFNNT09USF9QVEc7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY29uc3Qgb2Zmc2V0ID0gTWF0aC5mbG9vcihpc0hvcml6b250YWwgPyBvZmZzZXRYIDogb2Zmc2V0WSk7XG4gICAgICAgICAgICAgICAgICAgIGlmICghY2FsbGJhY2soaXNIb3Jpem9udGFsLCBvZmZzZXQsIHRydWUpIHx8IE1hdGguYWJzKG9mZnNldCkgPD0gMC4xKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjbGVhckludGVydmFsKGludGVydmFsUmVmLmN1cnJlbnQpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSwgMTYpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfTtcbiAgICBjb25zdCBvblRvdWNoRW5kID0gKCkgPT4ge1xuICAgICAgICB0b3VjaGVkUmVmLmN1cnJlbnQgPSBmYWxzZTtcbiAgICAgICAgY2xlYW5VcEV2ZW50cygpO1xuICAgIH07XG4gICAgY29uc3Qgb25Ub3VjaFN0YXJ0ID0gKGUpID0+IHtcbiAgICAgICAgY2xlYW5VcEV2ZW50cygpO1xuICAgICAgICBpZiAoZS50b3VjaGVzLmxlbmd0aCA9PT0gMSAmJiAhdG91Y2hlZFJlZi5jdXJyZW50KSB7XG4gICAgICAgICAgICB0b3VjaGVkUmVmLmN1cnJlbn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cGFzc2l2ZTogdHJ1ZSB9KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gKCkgPT4ge1xuICAgICAgICAgICAgdmFyIF9hO1xuICAgICAgICAgICAgKF9hID0gbGlzdFJlZi5jdXJyZW50KSA9PT0gbnVsbCB8fCBfYSA9PT0gdm9pZCAwID8gdm9pZCAwIDogX2EucmVtb3ZlRXZlbnRMaXN0ZW5lcigndG91Y2hzdGFydCcsIG9uVG91Y2hTdGFydCk7XG4gICAgICAgICAgICBjbGVhblVwRXZlbnRzKCk7XG4gICAgICAgICAgICBjbGVhckludGVydmFsKGludGVydmFsUmVmLmN1cnJlbnQpO1xuICAgICAgICB9O1xuICAgIH0sIFtpblZpcnR1YWxdKTtcbn0iXSwic291cmNlUm9vdCI6Ii4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYyJ9
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { useRef } from 'react';
|
|
2
|
+
export default (function (isScrollAtTop, isScrollAtBottom, isScrollAtLeft, isScrollAtRight) {
|
|
3
|
+
// Do lock for a wheel when scrolling
|
|
4
|
+
var lockRef = useRef(false);
|
|
5
|
+
var lockTimeoutRef = useRef(null);
|
|
6
|
+
function lockScroll() {
|
|
7
|
+
clearTimeout(lockTimeoutRef.current);
|
|
8
|
+
lockRef.current = true;
|
|
9
|
+
lockTimeoutRef.current = setTimeout(function () {
|
|
10
|
+
lockRef.current = false;
|
|
11
|
+
}, 50);
|
|
12
|
+
}
|
|
13
|
+
// Pass to ref since global add is in closure
|
|
14
|
+
var scrollPingRef = useRef({
|
|
15
|
+
top: isScrollAtTop,
|
|
16
|
+
bottom: isScrollAtBottom,
|
|
17
|
+
left: isScrollAtLeft,
|
|
18
|
+
right: isScrollAtRight
|
|
19
|
+
});
|
|
20
|
+
scrollPingRef.current.top = isScrollAtTop;
|
|
21
|
+
scrollPingRef.current.bottom = isScrollAtBottom;
|
|
22
|
+
scrollPingRef.current.left = isScrollAtLeft;
|
|
23
|
+
scrollPingRef.current.right = isScrollAtRight;
|
|
24
|
+
return function (isHorizontal, delta) {
|
|
25
|
+
var smoothOffset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
26
|
+
var originScroll = isHorizontal ?
|
|
27
|
+
// Pass origin wheel when on the left
|
|
28
|
+
delta < 0 && scrollPingRef.current.left ||
|
|
29
|
+
// Pass origin wheel when on the right
|
|
30
|
+
delta > 0 && scrollPingRef.current.right // Pass origin wheel when on the top
|
|
31
|
+
: delta < 0 && scrollPingRef.current.top ||
|
|
32
|
+
// Pass origin wheel when on the bottom
|
|
33
|
+
delta > 0 && scrollPingRef.current.bottom;
|
|
34
|
+
if (smoothOffset && originScroll) {
|
|
35
|
+
// No need lock anymore when it's smooth offset from touchMove interval
|
|
36
|
+
clearTimeout(lockTimeoutRef.current);
|
|
37
|
+
lockRef.current = false;
|
|
38
|
+
} else if (!originScroll || lockRef.current) {
|
|
39
|
+
lockScroll();
|
|
40
|
+
}
|
|
41
|
+
return !lockRef.current && originScroll;
|
|
42
|
+
};
|
|
43
|
+
});
|
|
44
|
+
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbXBvbmVudHMvVmlydHVhbExpc3Qvc3JjL2NvbXBvbmVudHMvVmlydHVhbExpc3QvaG9va3MvdXNlT3JpZ2luU2Nyb2xsLnRzIiwiY29tcG9uZW50cy9WaXJ0dWFsTGlzdC9ob29rcy91c2VPcmlnaW5TY3JvbGwuanMiXSwibmFtZXMiOlsidXNlUmVmIiwiaXNTY3JvbGxBdFRvcCIsImlzU2Nyb2xsQXRCb3R0b20iLCJpc1Njcm9sbEF0TGVmdCIsImlzU2Nyb2xsQXRSaWdodCIsImxvY2tSZWYiLCJsb2NrVGltZW91dFJlZiIsImxvY2tTY3JvbGwiLCJjbGVhclRpbWVvdXQiLCJjdXJyZW50Iiwic2V0VGltZW91dCIsInNjcm9sbFBpbmdSZWYiLCJ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vdXRSZWYuY3VycmVudCk7XG4gICAgICAgICAgICBsb2NrUmVmLmN1cnJlbnQgPSBmYWxzZTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmICghb3JpZ2luU2Nyb2xsIHx8IGxvY2tSZWYuY3VycmVudCkge1xuICAgICAgICAgICAgbG9ja1Njcm9sbCgpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiAhbG9ja1JlZi5jdXJyZW50ICYmIG9yaWdpblNjcm9sbDtcbiAgICB9O1xufTsiXSwic291cmNlUm9vdCI6Ii4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYyJ9
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare function getPageXY(e: React.MouseEvent | React.TouchEvent | MouseEvent | TouchEvent, horizontal: boolean): number;
|
|
3
|
+
export default function useScrollDrag(inVirtual: boolean, componentRef: React.RefObject<HTMLElement | null>, onScrollOffset: (offset: number) => void): void;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import raf from '../utils/raf';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
function smoothScrollOffset(offset) {
|
|
4
|
+
return Math.floor(Math.pow(offset, 0.5));
|
|
5
|
+
}
|
|
6
|
+
export function getPageXY(e, horizontal) {
|
|
7
|
+
var obj = 'touches' in e ? e.touches[0] : e;
|
|
8
|
+
return obj[horizontal ? 'pageX' : 'pageY'] - window[horizontal ? 'scrollX' : 'scrollY'];
|
|
9
|
+
}
|
|
10
|
+
export default function useScrollDrag(inVirtual, componentRef, onScrollOffset) {
|
|
11
|
+
React.useEffect(function () {
|
|
12
|
+
var ele = componentRef.current;
|
|
13
|
+
if (inVirtual && ele) {
|
|
14
|
+
var mouseDownLock = false;
|
|
15
|
+
var rafId;
|
|
16
|
+
var offset;
|
|
17
|
+
var stopScroll = function stopScroll() {
|
|
18
|
+
raf.cancel(rafId);
|
|
19
|
+
};
|
|
20
|
+
var _continueScroll = function continueScroll() {
|
|
21
|
+
stopScroll();
|
|
22
|
+
rafId = raf(function () {
|
|
23
|
+
onScrollOffset(offset);
|
|
24
|
+
_continueScroll();
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
var clearDragState = function clearDragState() {
|
|
28
|
+
mouseDownLock = false;
|
|
29
|
+
stopScroll();
|
|
30
|
+
};
|
|
31
|
+
var onMouseDown = function onMouseDown(e) {
|
|
32
|
+
// Skip if element set draggable
|
|
33
|
+
if (e.target.draggable || e.button !== 0) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
// Skip if nest List has handled this event
|
|
37
|
+
var event = e;
|
|
38
|
+
if (!event._virtualHandled) {
|
|
39
|
+
event._virtualHandled = true;
|
|
40
|
+
mouseDownLock = true;
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
var onMouseMove = function onMouseMove(e) {
|
|
44
|
+
if (mouseDownLock) {
|
|
45
|
+
var mouseY = getPageXY(e, false);
|
|
46
|
+
var _ele$getBoundingClien = ele.getBoundingClientRect(),
|
|
47
|
+
top = _ele$getBoundingClien.top,
|
|
48
|
+
bottom = _ele$getBoundingClien.bottom;
|
|
49
|
+
if (mouseY <= top) {
|
|
50
|
+
var diff = top - mouseY;
|
|
51
|
+
offset = -smoothScrollOffset(diff);
|
|
52
|
+
_continueScroll();
|
|
53
|
+
} else if (mouseY >= bottom) {
|
|
54
|
+
var _diff = mouseY - bottom;
|
|
55
|
+
offset = smoothScrollOffset(_diff);
|
|
56
|
+
_continueScroll();
|
|
57
|
+
} else {
|
|
58
|
+
stopScroll();
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
ele.addEventListener('mousedown', onMouseDown);
|
|
63
|
+
ele.ownerDocument.addEventListener('mouseup', clearDragState);
|
|
64
|
+
ele.ownerDocument.addEventListener('mousemove', onMouseMove);
|
|
65
|
+
ele.ownerDocument.addEventListener('dragend', clearDragState);
|
|
66
|
+
return function () {
|
|
67
|
+
ele.removeEventListener('mousedown', onMouseDown);
|
|
68
|
+
ele.ownerDocument.removeEventListener('mouseup', clearDragState);
|
|
69
|
+
ele.ownerDocument.removeEventListener('mousemove', onMouseMove);
|
|
70
|
+
ele.ownerDocument.removeEventListener('dragend', clearDragState);
|
|
71
|
+
stopScroll();
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
}, [inVirtual]);
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbXBvbmVudHMvVmlydHVhbExpc3Qvc3JjL2NvbXBvbmVudHMvVmlydHVhbExpc3QvaG9va3MvdXNlU2Nyb2xsRHJhZy50cyJdLCJuYW1lcyI6WyJyYWYiLCJSZWFjdCIsInNtb290aFNjcm9sbE9mZnNldCIsIm9mZnNldCIsIk1hdGgiLCJmbG9vciIsInBvdyIsImdldFBhZ2VYWSIsImUiLCJob3Jpem9udGFsIiwib2JqIiwidG91Y2hlcyIsIndpbmRvdyIsInVzZVNjcm9sbERyYWciLCJpblZpcnR1YWwiLCJjb21wb25lbnRSZWYiLCJvblNjcm9sbE9mZnNldCIsInVzZUVmZmVjdCIsImVsZSIsImN1cnJlbnQiLCJtb3VzZURvd25Mb2NrIiwicmFmSWQiLCJzdG9wU2Nyb2xsIiwiY2FuY2VsIiwiY29udGludWVTY3JvbGwiLCJjbGVhckRyYWdTdGF0ZSIsIm9uTW91c2VEb3duIiwidGFyZ2V0IiwiZHJhZ2dhYmxlIiwiYnV0dG9uIiwiZXZlbnQiLCJfdmlydHVhbEhhbmRsZWQiLCJvbk1vdXNlTW92ZSIsIm1vdXNlWSIsIl9lbGUkZ2V0Qm91bmRpbmdDbGllbiIsImdldEJvdW5kaW5nQ2xpZW50UmVjdCIsInRvcCIsImJvdHRvbSIsImRpZmYiLCJhZGRFdmVudExpc3RlbmVyIiwib3duZXJEb2N1bWVudCIsInJlbW92ZUV2ZW50TGlzdGVuZXIiXSwibWFw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QVcsRUFBRVQsV0FBVyxDQUFDO1FBRS9EZCxHQUFHLENBQUNzQixhQUFhLENBQUNDLG1CQUFtQixDQUFDLFNBQVMsRUFBRWhCLGNBQWMsQ0FBQztRQUNoRUgsVUFBVSxDQUFBLENBQUU7TUFDZCxDQUFDO0lBQ0g7RUFDRixDQUFDLEVBQUUsQ0FBQ1IsU0FBUyxDQUFDLENBQUM7QUFDakIiLCJmaWxlIjoiY29tcG9uZW50cy9WaXJ0dWFsTGlzdC9ob29rcy91c2VTY3JvbGxEcmFnLmpzIiwic291cmNlc0NvbnRlbnQiOltudWxsXSwic291cmNlUm9vdCI6Ii4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYyJ9
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { GetKey } from '../interface';
|
|
3
|
+
import type CacheMap from '../utils/CacheMap';
|
|
4
|
+
export type ScrollAlign = 'top' | 'bottom' | 'auto';
|
|
5
|
+
export type ScrollPos = {
|
|
6
|
+
left?: number;
|
|
7
|
+
top?: number;
|
|
8
|
+
};
|
|
9
|
+
export type ScrollTarget = {
|
|
10
|
+
index: number;
|
|
11
|
+
align?: ScrollAlign;
|
|
12
|
+
offset?: number;
|
|
13
|
+
} | {
|
|
14
|
+
key: React.Key;
|
|
15
|
+
align?: ScrollAlign;
|
|
16
|
+
offset?: number;
|
|
17
|
+
};
|
|
18
|
+
export default function useScrollTo<T>(containerRef: React.RefObject<HTMLDivElement | null>, data: T[], heights: CacheMap, itemHeight: number, getKey: GetKey<T>, collectHeight: () => void, syncScrollTop: (newTop: number) => void, triggerFlash: () => void): (arg: number | ScrollTarget) => void;
|