@xhsreds/reds-rn-next 0.2.7 → 0.2.8
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/coverage/.tmp/coverage-0.json +1 -1
- package/coverage/.tmp/coverage-1.json +1 -1
- package/coverage/.tmp/coverage-10.json +1 -1
- package/coverage/.tmp/coverage-11.json +1 -1
- package/coverage/.tmp/coverage-12.json +1 -1
- package/coverage/.tmp/coverage-14.json +1 -1
- package/coverage/.tmp/coverage-15.json +1 -1
- package/coverage/.tmp/coverage-16.json +1 -1
- package/coverage/.tmp/coverage-17.json +1 -1
- package/coverage/.tmp/coverage-18.json +1 -1
- package/coverage/.tmp/coverage-19.json +1 -1
- package/coverage/.tmp/coverage-2.json +1 -1
- package/coverage/.tmp/coverage-20.json +1 -1
- package/coverage/.tmp/coverage-21.json +1 -1
- package/coverage/.tmp/coverage-22.json +1 -1
- package/coverage/.tmp/coverage-23.json +1 -1
- package/coverage/.tmp/coverage-24.json +1 -1
- package/coverage/.tmp/coverage-25.json +1 -1
- package/coverage/.tmp/coverage-26.json +1 -1
- package/coverage/.tmp/coverage-27.json +1 -1
- package/coverage/.tmp/coverage-28.json +1 -1
- package/coverage/.tmp/coverage-29.json +1 -1
- package/coverage/.tmp/coverage-3.json +1 -1
- package/coverage/.tmp/coverage-30.json +1 -1
- package/coverage/.tmp/coverage-31.json +1 -1
- package/coverage/.tmp/coverage-32.json +1 -1
- package/coverage/.tmp/coverage-33.json +1 -1
- package/coverage/.tmp/coverage-34.json +1 -1
- package/coverage/.tmp/coverage-35.json +1 -1
- package/coverage/.tmp/coverage-36.json +1 -1
- package/coverage/.tmp/coverage-37.json +1 -1
- package/coverage/.tmp/coverage-38.json +1 -1
- package/coverage/.tmp/coverage-39.json +1 -1
- package/coverage/.tmp/coverage-4.json +1 -1
- package/coverage/.tmp/coverage-5.json +1 -1
- package/coverage/.tmp/coverage-6.json +1 -1
- package/coverage/.tmp/coverage-7.json +1 -1
- package/coverage/.tmp/coverage-8.json +1 -1
- package/coverage/.tmp/coverage-9.json +1 -1
- package/lib/cjs/_chunks/BkoO2fb2.js.map +1 -1
- package/lib/cjs/_chunks/{BfpwjlZK.js → CA6JVADB.js} +4 -2
- package/lib/cjs/_chunks/CA6JVADB.js.map +1 -0
- package/lib/cjs/_chunks/{CR44hCQo.js → CXy-W3Rk.js} +12 -37
- package/lib/cjs/_chunks/CXy-W3Rk.js.map +1 -0
- package/lib/cjs/_chunks/{CKBIsVj5.js → CixyLsG1.js} +2 -2
- package/lib/cjs/_chunks/{CKBIsVj5.js.map → CixyLsG1.js.map} +1 -1
- package/lib/cjs/_chunks/CjOtUBRG.js.map +1 -1
- package/lib/cjs/_chunks/{Dj89ocWw.js → DvqbB3vc.js} +6 -2
- package/lib/cjs/_chunks/DvqbB3vc.js.map +1 -0
- package/lib/cjs/_chunks/{ShnnCuH9.js → DxhsD0tz.js} +1 -45
- package/lib/{esm/_chunks/BcioiUBf.js.map → cjs/_chunks/DxhsD0tz.js.map} +1 -1
- package/lib/cjs/components/ActionSheets/ActionSheets.js +1 -1
- package/lib/cjs/components/ActionSheets/ActionSheetsItem.js +1 -1
- package/lib/cjs/components/ActionSheets/index.js +1 -1
- package/lib/cjs/components/Alert/Alert.js +8 -14
- package/lib/cjs/components/Alert/Alert.js.map +1 -1
- package/lib/cjs/components/Alert/hooks/alert.js +7 -13
- package/lib/cjs/components/Alert/hooks/alert.js.map +1 -1
- package/lib/cjs/components/Alert/index.js +7 -13
- package/lib/cjs/components/Alert/index.js.map +1 -1
- package/lib/cjs/components/Alert/styles.js +3 -4
- package/lib/cjs/components/Alert/styles.js.map +1 -1
- package/lib/cjs/components/Avatar/Avatar.js +4 -5
- package/lib/cjs/components/Avatar/Avatar.js.map +1 -1
- package/lib/cjs/components/Avatar/index.js +1 -1
- package/lib/cjs/components/Avatar/styles.js +1 -1
- package/lib/cjs/components/AvatarGroup/AvatarGroup.js +7 -13
- package/lib/cjs/components/AvatarGroup/AvatarGroup.js.map +1 -1
- package/lib/cjs/components/AvatarGroup/index.js +7 -13
- package/lib/cjs/components/AvatarGroup/index.js.map +1 -1
- package/lib/cjs/components/Badge/Badge.js +1 -1
- package/lib/cjs/components/Badge/index.js +1 -1
- package/lib/cjs/components/Badge/styles.js +1 -1
- package/lib/cjs/components/BottomBar/BottomBar.js +1 -1
- package/lib/cjs/components/BottomBar/index.js +1 -1
- package/lib/cjs/components/Button/Button.js +3 -3
- package/lib/cjs/components/Button/Button.js.map +1 -1
- package/lib/cjs/components/Button/index.js +1 -1
- package/lib/cjs/components/Button/styleMap.js +4 -4
- package/lib/cjs/components/Button/styleMap.js.map +1 -1
- package/lib/cjs/components/Carousel/Carousel.js +7 -12
- package/lib/cjs/components/Carousel/Carousel.js.map +1 -1
- package/lib/cjs/components/Carousel/index.js +2 -2
- package/lib/cjs/components/Carousel/interface/index.js +1 -1
- package/lib/cjs/components/CheckBoxGroup/CheckBox.js +2 -2
- package/lib/cjs/components/CheckBoxGroup/CheckBoxGroup.js +10 -10
- package/lib/cjs/components/CheckBoxGroup/CheckBoxGroup.js.map +1 -1
- package/lib/cjs/components/CheckBoxGroup/index.js +2 -2
- package/lib/cjs/components/CheckBoxGroup/interface/index.js +1 -1
- package/lib/cjs/components/CheckBoxGroup/styles.js +10 -10
- package/lib/cjs/components/CheckBoxGroup/styles.js.map +1 -1
- package/lib/cjs/components/Collapse/Collapse.js +1 -1
- package/lib/cjs/components/Collapse/Item/Item.js +1 -1
- package/lib/cjs/components/Collapse/Item/styles.js +1 -1
- package/lib/cjs/components/Collapse/index.js +1 -1
- package/lib/cjs/components/ConfigProvider/ConfigProvider.js +1 -1
- package/lib/cjs/components/ConfigProvider/hooks/ConfigCache/ConfigCache.js +1 -1
- package/lib/cjs/components/ConfigProvider/hooks/ConfigCache/index.js +1 -1
- package/lib/cjs/components/ConfigProvider/hooks/themeToken/index.js +1 -1
- package/lib/cjs/components/ConfigProvider/hooks/themeToken/useThemeToken.js +7 -6
- package/lib/cjs/components/ConfigProvider/hooks/themeToken/useThemeToken.js.map +1 -1
- package/lib/cjs/components/ConfigProvider/index.js +1 -1
- package/lib/cjs/components/DatePicker/DatePicker.js +1 -1
- package/lib/cjs/components/DatePicker/index.js +1 -1
- package/lib/cjs/components/Divider/Divider.js +3 -4
- package/lib/cjs/components/Divider/Divider.js.map +1 -1
- package/lib/cjs/components/Divider/index.js +1 -1
- package/lib/cjs/components/Divider/styles.js +1 -1
- package/lib/cjs/components/DropDown/DropDown.js +1 -1
- package/lib/cjs/components/DropDown/DropDownItem.js +1 -1
- package/lib/cjs/components/DropDown/index.js +1 -1
- package/lib/cjs/components/DropDown/styles.js +1 -1
- package/lib/cjs/components/Empty/Empty.js +1 -1
- package/lib/cjs/components/Empty/index.js +1 -1
- package/lib/cjs/components/Empty/styles.js +1 -1
- package/lib/cjs/components/FAB/FAB.js +2 -2
- package/lib/cjs/components/FAB/FAB.js.map +1 -1
- package/lib/cjs/components/FAB/index.js +1 -1
- package/lib/cjs/components/Form/Form.js +1 -1
- package/lib/cjs/components/Form/Form.js.map +1 -1
- package/lib/cjs/components/Form/FormItem.js +1 -1
- package/lib/cjs/components/Form/FormItem.js.map +1 -1
- package/lib/cjs/components/Form/index.js +1 -1
- package/lib/cjs/components/Form/styles.js +1 -1
- package/lib/cjs/components/Icon/Icon.72.js +1 -1
- package/lib/cjs/components/Icon/Icon.js +1 -1
- package/lib/cjs/components/Icon/index.js +1 -1
- package/lib/cjs/components/Image/Image.js +1 -1
- package/lib/cjs/components/Image/Image.js.map +1 -1
- package/lib/cjs/components/Image/Image69.js +4 -5
- package/lib/cjs/components/Image/Image69.js.map +1 -1
- package/lib/cjs/components/Image/hook/index.js +1 -1
- package/lib/cjs/components/Image/index.js +4 -5
- package/lib/cjs/components/Image/index.js.map +1 -1
- package/lib/cjs/components/List/List.js +1 -1
- package/lib/cjs/components/List/ListItem/ListItem.js +1 -1
- package/lib/cjs/components/List/index.js +1 -1
- package/lib/cjs/components/List/styles.js +2 -4
- package/lib/cjs/components/List/styles.js.map +1 -1
- package/lib/cjs/components/NavigationBar/NavigationBar.js +5 -12
- package/lib/cjs/components/NavigationBar/NavigationBar.js.map +1 -1
- package/lib/cjs/components/NavigationBar/index.js +1 -1
- package/lib/cjs/components/NavigationBar/styles.js +37 -19
- package/lib/cjs/components/NavigationBar/styles.js.map +1 -1
- package/lib/cjs/components/Picker/Picker.js +1 -1
- package/lib/cjs/components/Picker/index.js +1 -1
- package/lib/cjs/components/PickerView/PickerView.js +1 -1
- package/lib/cjs/components/PickerView/Wheel.js +1 -1
- package/lib/cjs/components/PickerView/index.js +1 -1
- package/lib/cjs/components/Popover/Popover.js +27 -24
- package/lib/cjs/components/Popover/Popover.js.map +1 -1
- package/lib/cjs/components/Popover/component.js +2 -3
- package/lib/cjs/components/Popover/component.js.map +1 -1
- package/lib/cjs/components/Popover/hook.js +1 -1
- package/lib/cjs/components/Popover/index.js +5 -2
- package/lib/cjs/components/Popover/index.js.map +1 -1
- package/lib/cjs/components/Popover/interface/index.js +1 -1
- package/lib/cjs/components/Portal/core/PortalProvider.js +1 -1
- package/lib/cjs/components/Portal/index.js +1 -1
- package/lib/cjs/components/Progress/Progress.js +1 -1
- package/lib/cjs/components/Progress/index.js +1 -1
- package/lib/cjs/components/Progress/styles.js +1 -1
- package/lib/cjs/components/ProgressIndicator/ProgressIndicator.js +4 -4
- package/lib/cjs/components/ProgressIndicator/ProgressIndicator.js.map +1 -1
- package/lib/cjs/components/ProgressIndicator/index.js +1 -1
- package/lib/cjs/components/ProgressIndicator/styles.js +1 -1
- package/lib/cjs/components/PullRefresh/PullRefresh.js +1 -1
- package/lib/cjs/components/PullRefresh/component.js +1 -1
- package/lib/cjs/components/PullRefresh/index.js +1 -1
- package/lib/cjs/components/Radio/Radio.js +7 -13
- package/lib/cjs/components/Radio/Radio.js.map +1 -1
- package/lib/cjs/components/Radio/RadioGroup.js +1 -1
- package/lib/cjs/components/Radio/index.js +7 -13
- package/lib/cjs/components/Radio/index.js.map +1 -1
- package/lib/cjs/components/Radio/styles.js +1 -1
- package/lib/cjs/components/Rate/Rate.js +2 -2
- package/lib/cjs/components/Rate/Rate.js.map +1 -1
- package/lib/cjs/components/Rate/index.js +1 -1
- package/lib/cjs/components/Rate/styles.js +4 -1
- package/lib/cjs/components/Rate/styles.js.map +1 -1
- package/lib/cjs/components/Result/Result.js +1 -1
- package/lib/cjs/components/Result/index.js +1 -1
- package/lib/cjs/components/Result/styles.js +1 -1
- package/lib/cjs/components/Search/Search.js +1 -1
- package/lib/cjs/components/Search/index.js +1 -1
- package/lib/cjs/components/Search/styles.js +1 -1
- package/lib/cjs/components/Sheets/AnimatedSheets.js +79 -30
- package/lib/cjs/components/Sheets/AnimatedSheets.js.map +1 -1
- package/lib/cjs/components/Sheets/Sheets.js +1 -1
- package/lib/cjs/components/Sheets/api.js +1 -1
- package/lib/cjs/components/Sheets/index.js +1 -1
- package/lib/cjs/components/Skeleton/Item/SkeletonItem.js +1 -1
- package/lib/cjs/components/Skeleton/Item/SkeletonItem69.js +1 -1
- package/lib/cjs/components/Skeleton/Skeleton.js +1 -1
- package/lib/cjs/components/Skeleton/Skeleton69.js +1 -1
- package/lib/cjs/components/Skeleton/index.js +1 -1
- package/lib/cjs/components/Slider/Slider.js +1 -1
- package/lib/cjs/components/Slider/index.js +1 -1
- package/lib/cjs/components/SnackBar/SnackBar.js +5 -5
- package/lib/cjs/components/SnackBar/SnackBar.js.map +1 -1
- package/lib/cjs/components/SnackBar/index.js +1 -1
- package/lib/cjs/components/SnackBar/styles.js +1 -1
- package/lib/cjs/components/Stepper/Stepper.js +2 -2
- package/lib/cjs/components/Stepper/Stepper.js.map +1 -1
- package/lib/cjs/components/Stepper/index.js +1 -1
- package/lib/cjs/components/Stepper/styles.js +1 -1
- package/lib/cjs/components/Switch/Switch.js +1 -1
- package/lib/cjs/components/Switch/index.js +1 -1
- package/lib/cjs/components/Tab/Tabs.js +1 -1
- package/lib/cjs/components/Tab/index.js +1 -1
- package/lib/cjs/components/Tab/styles.js +1 -1
- package/lib/cjs/components/TabBar/TabBar.js +1 -1
- package/lib/cjs/components/TabBar/index.js +1 -1
- package/lib/cjs/components/TabBar/styles.js +1 -1
- package/lib/cjs/components/Tag/Tag.js +45 -42
- package/lib/cjs/components/Tag/Tag.js.map +1 -1
- package/lib/cjs/components/Tag/index.js +1 -1
- package/lib/cjs/components/Text/Text.js +1 -1
- package/lib/cjs/components/Text/hooks/cloneContainer.js +1 -1
- package/lib/cjs/components/Text/hooks/index.js +1 -1
- package/lib/cjs/components/Text/hooks/loadFontFromFile.js +1 -1
- package/lib/cjs/components/Text/index.js +1 -1
- package/lib/cjs/components/Text/styles.js +1 -1
- package/lib/cjs/components/TextField/TextField.js +1 -1
- package/lib/cjs/components/TextField/index.js +1 -1
- package/lib/cjs/components/TextField/styles.js +1 -1
- package/lib/cjs/components/TextView/TextView.js +1 -1
- package/lib/cjs/components/TextView/index.js +1 -1
- package/lib/cjs/components/TextView/styles.js +1 -1
- package/lib/cjs/components/Toast/Toast.js +1 -1
- package/lib/cjs/components/Toast/api.js +1 -1
- package/lib/cjs/components/Toast/index.js +1 -1
- package/lib/cjs/components/Toast/styles.js +1 -1
- package/lib/cjs/components/Uploader/Uploader.js +1 -1
- package/lib/cjs/components/Uploader/index.js +1 -1
- package/lib/cjs/components/Uploader/utils.js +1 -1
- package/lib/cjs/index.js +5 -14
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/pvCount/pvData.js +1 -1
- package/lib/esm/_chunks/BefIgmcR.js.map +1 -1
- package/lib/esm/_chunks/{DjJkQY7A.js → CaWGMJtg.js} +4 -2
- package/lib/esm/_chunks/CaWGMJtg.js.map +1 -0
- package/lib/esm/_chunks/{DZwp3uCD.js → CllFw02r.js} +50 -74
- package/lib/esm/_chunks/CllFw02r.js.map +1 -0
- package/lib/esm/_chunks/{D8jwXt03.js → DLmr30op.js} +6 -2
- package/lib/esm/_chunks/DLmr30op.js.map +1 -0
- package/lib/esm/_chunks/DpaXRu2q.js.map +1 -1
- package/lib/esm/_chunks/{BcioiUBf.js → Rk1G_m0d.js} +2 -44
- package/lib/{cjs/_chunks/ShnnCuH9.js.map → esm/_chunks/Rk1G_m0d.js.map} +1 -1
- package/lib/esm/_chunks/{CCdQ-4a6.js → X_gy9Nh1.js} +2 -2
- package/lib/esm/_chunks/{CCdQ-4a6.js.map → X_gy9Nh1.js.map} +1 -1
- package/lib/esm/components/ActionSheets/ActionSheets.js +15 -15
- package/lib/esm/components/ActionSheets/ActionSheets.js.map +1 -1
- package/lib/esm/components/ActionSheets/ActionSheetsItem.js +5 -5
- package/lib/esm/components/ActionSheets/ActionSheetsItem.js.map +1 -1
- package/lib/esm/components/ActionSheets/index.js +1 -1
- package/lib/esm/components/Alert/Alert.js +8 -14
- package/lib/esm/components/Alert/Alert.js.map +1 -1
- package/lib/esm/components/Alert/hooks/alert.js +7 -13
- package/lib/esm/components/Alert/hooks/alert.js.map +1 -1
- package/lib/esm/components/Alert/index.js +8 -14
- package/lib/esm/components/Alert/index.js.map +1 -1
- package/lib/esm/components/Alert/styles.js +3 -4
- package/lib/esm/components/Alert/styles.js.map +1 -1
- package/lib/esm/components/Avatar/Avatar.js +13 -14
- package/lib/esm/components/Avatar/Avatar.js.map +1 -1
- package/lib/esm/components/Avatar/index.js +1 -1
- package/lib/esm/components/Avatar/styles.js +1 -1
- package/lib/esm/components/AvatarGroup/AvatarGroup.js +7 -13
- package/lib/esm/components/AvatarGroup/AvatarGroup.js.map +1 -1
- package/lib/esm/components/AvatarGroup/index.js +7 -13
- package/lib/esm/components/AvatarGroup/index.js.map +1 -1
- package/lib/esm/components/Badge/Badge.js +5 -5
- package/lib/esm/components/Badge/Badge.js.map +1 -1
- package/lib/esm/components/Badge/index.js +1 -1
- package/lib/esm/components/Badge/styles.js +1 -1
- package/lib/esm/components/BottomBar/BottomBar.js +8 -8
- package/lib/esm/components/BottomBar/BottomBar.js.map +1 -1
- package/lib/esm/components/BottomBar/index.js +1 -1
- package/lib/esm/components/Button/Button.js +10 -10
- package/lib/esm/components/Button/Button.js.map +1 -1
- package/lib/esm/components/Button/index.js +1 -1
- package/lib/esm/components/Button/styleMap.js +4 -4
- package/lib/esm/components/Button/styleMap.js.map +1 -1
- package/lib/esm/components/Carousel/Carousel.js +22 -27
- package/lib/esm/components/Carousel/Carousel.js.map +1 -1
- package/lib/esm/components/Carousel/index.js +2 -2
- package/lib/esm/components/Carousel/interface/index.js +1 -1
- package/lib/esm/components/CheckBoxGroup/CheckBox.js +10 -10
- package/lib/esm/components/CheckBoxGroup/CheckBox.js.map +1 -1
- package/lib/esm/components/CheckBoxGroup/CheckBoxGroup.js +28 -28
- package/lib/esm/components/CheckBoxGroup/CheckBoxGroup.js.map +1 -1
- package/lib/esm/components/CheckBoxGroup/index.js +2 -2
- package/lib/esm/components/CheckBoxGroup/interface/index.js +1 -1
- package/lib/esm/components/CheckBoxGroup/styles.js +10 -10
- package/lib/esm/components/CheckBoxGroup/styles.js.map +1 -1
- package/lib/esm/components/Collapse/Collapse.js +3 -3
- package/lib/esm/components/Collapse/Collapse.js.map +1 -1
- package/lib/esm/components/Collapse/Item/Item.js +8 -8
- package/lib/esm/components/Collapse/Item/Item.js.map +1 -1
- package/lib/esm/components/Collapse/Item/styles.js +1 -1
- package/lib/esm/components/Collapse/index.js +1 -1
- package/lib/esm/components/ConfigProvider/ConfigProvider.js +3 -3
- package/lib/esm/components/ConfigProvider/ConfigProvider.js.map +1 -1
- package/lib/esm/components/ConfigProvider/hooks/ConfigCache/ConfigCache.js +1 -1
- package/lib/esm/components/ConfigProvider/hooks/ConfigCache/index.js +1 -1
- package/lib/esm/components/ConfigProvider/hooks/themeToken/index.js +1 -1
- package/lib/esm/components/ConfigProvider/hooks/themeToken/useThemeToken.js +7 -6
- package/lib/esm/components/ConfigProvider/hooks/themeToken/useThemeToken.js.map +1 -1
- package/lib/esm/components/ConfigProvider/index.js +1 -1
- package/lib/esm/components/DatePicker/DatePicker.js +3 -3
- package/lib/esm/components/DatePicker/DatePicker.js.map +1 -1
- package/lib/esm/components/DatePicker/index.js +1 -1
- package/lib/esm/components/Divider/Divider.js +10 -11
- package/lib/esm/components/Divider/Divider.js.map +1 -1
- package/lib/esm/components/Divider/index.js +1 -1
- package/lib/esm/components/Divider/styles.js +1 -1
- package/lib/esm/components/DropDown/DropDown.js +24 -24
- package/lib/esm/components/DropDown/DropDown.js.map +1 -1
- package/lib/esm/components/DropDown/DropDownItem.js +24 -24
- package/lib/esm/components/DropDown/DropDownItem.js.map +1 -1
- package/lib/esm/components/DropDown/index.js +1 -1
- package/lib/esm/components/DropDown/styles.js +1 -1
- package/lib/esm/components/Empty/Empty.js +7 -7
- package/lib/esm/components/Empty/Empty.js.map +1 -1
- package/lib/esm/components/Empty/index.js +1 -1
- package/lib/esm/components/Empty/styles.js +1 -1
- package/lib/esm/components/FAB/FAB.js +5 -5
- package/lib/esm/components/FAB/FAB.js.map +1 -1
- package/lib/esm/components/FAB/index.js +1 -1
- package/lib/esm/components/Form/Form.js +5 -5
- package/lib/esm/components/Form/Form.js.map +1 -1
- package/lib/esm/components/Form/FormItem.js +12 -12
- package/lib/esm/components/Form/FormItem.js.map +1 -1
- package/lib/esm/components/Form/index.js +1 -1
- package/lib/esm/components/Form/styles.js +1 -1
- package/lib/esm/components/Icon/Icon.72.js +6 -6
- package/lib/esm/components/Icon/Icon.72.js.map +1 -1
- package/lib/esm/components/Icon/Icon.js +5 -5
- package/lib/esm/components/Icon/Icon.js.map +1 -1
- package/lib/esm/components/Icon/index.js +1 -1
- package/lib/esm/components/Image/CircularProgress.js +6 -6
- package/lib/esm/components/Image/CircularProgress.js.map +1 -1
- package/lib/esm/components/Image/Image.js +9 -9
- package/lib/esm/components/Image/Image.js.map +1 -1
- package/lib/esm/components/Image/Image69.js +12 -13
- package/lib/esm/components/Image/Image69.js.map +1 -1
- package/lib/esm/components/Image/hook/index.js +1 -1
- package/lib/esm/components/Image/index.js +13 -14
- package/lib/esm/components/Image/index.js.map +1 -1
- package/lib/esm/components/List/List.js +7 -7
- package/lib/esm/components/List/List.js.map +1 -1
- package/lib/esm/components/List/ListItem/ArrowRight.js +3 -3
- package/lib/esm/components/List/ListItem/ArrowRight.js.map +1 -1
- package/lib/esm/components/List/ListItem/ListItem.js +16 -16
- package/lib/esm/components/List/ListItem/ListItem.js.map +1 -1
- package/lib/esm/components/List/index.js +1 -1
- package/lib/esm/components/List/styles.js +2 -4
- package/lib/esm/components/List/styles.js.map +1 -1
- package/lib/esm/components/NavigationBar/NavigationBar.js +21 -28
- package/lib/esm/components/NavigationBar/NavigationBar.js.map +1 -1
- package/lib/esm/components/NavigationBar/index.js +1 -1
- package/lib/esm/components/NavigationBar/styles.js +37 -20
- package/lib/esm/components/NavigationBar/styles.js.map +1 -1
- package/lib/esm/components/Picker/Picker.js +4 -4
- package/lib/esm/components/Picker/Picker.js.map +1 -1
- package/lib/esm/components/Picker/index.js +1 -1
- package/lib/esm/components/PickerView/PickerView.js +14 -14
- package/lib/esm/components/PickerView/PickerView.js.map +1 -1
- package/lib/esm/components/PickerView/Wheel.js +7 -7
- package/lib/esm/components/PickerView/Wheel.js.map +1 -1
- package/lib/esm/components/PickerView/index.js +1 -1
- package/lib/esm/components/Popover/Popover.js +35 -32
- package/lib/esm/components/Popover/Popover.js.map +1 -1
- package/lib/esm/components/Popover/component.js +6 -7
- package/lib/esm/components/Popover/component.js.map +1 -1
- package/lib/esm/components/Popover/hook.js +1 -1
- package/lib/esm/components/Popover/index.js +5 -2
- package/lib/esm/components/Popover/index.js.map +1 -1
- package/lib/esm/components/Popover/interface/index.js +1 -1
- package/lib/esm/components/Portal/core/PortalHost.js +2 -2
- package/lib/esm/components/Portal/core/PortalHost.js.map +1 -1
- package/lib/esm/components/Portal/core/PortalProvider.js +5 -5
- package/lib/esm/components/Portal/core/PortalProvider.js.map +1 -1
- package/lib/esm/components/Portal/index.js +1 -1
- package/lib/esm/components/Progress/Progress.js +8 -8
- package/lib/esm/components/Progress/Progress.js.map +1 -1
- package/lib/esm/components/Progress/index.js +1 -1
- package/lib/esm/components/Progress/styles.js +1 -1
- package/lib/esm/components/ProgressIndicator/ProgressIndicator.js +12 -12
- package/lib/esm/components/ProgressIndicator/ProgressIndicator.js.map +1 -1
- package/lib/esm/components/ProgressIndicator/index.js +1 -1
- package/lib/esm/components/ProgressIndicator/styles.js +1 -1
- package/lib/esm/components/PullRefresh/PullRefresh.js +8 -8
- package/lib/esm/components/PullRefresh/PullRefresh.js.map +1 -1
- package/lib/esm/components/PullRefresh/component.js +5 -5
- package/lib/esm/components/PullRefresh/component.js.map +1 -1
- package/lib/esm/components/PullRefresh/index.js +1 -1
- package/lib/esm/components/Radio/Radio.js +7 -13
- package/lib/esm/components/Radio/Radio.js.map +1 -1
- package/lib/esm/components/Radio/RadioGroup.js +7 -7
- package/lib/esm/components/Radio/RadioGroup.js.map +1 -1
- package/lib/esm/components/Radio/index.js +7 -13
- package/lib/esm/components/Radio/index.js.map +1 -1
- package/lib/esm/components/Radio/styles.js +1 -1
- package/lib/esm/components/Rate/Rate.js +12 -12
- package/lib/esm/components/Rate/Rate.js.map +1 -1
- package/lib/esm/components/Rate/index.js +1 -1
- package/lib/esm/components/Rate/styles.js +4 -1
- package/lib/esm/components/Rate/styles.js.map +1 -1
- package/lib/esm/components/Result/Result.js +9 -9
- package/lib/esm/components/Result/Result.js.map +1 -1
- package/lib/esm/components/Result/index.js +1 -1
- package/lib/esm/components/Result/styles.js +1 -1
- package/lib/esm/components/Search/Search.js +16 -16
- package/lib/esm/components/Search/Search.js.map +1 -1
- package/lib/esm/components/Search/index.js +1 -1
- package/lib/esm/components/Search/styles.js +1 -1
- package/lib/esm/components/Sheets/AnimatedSheets.js +106 -57
- package/lib/esm/components/Sheets/AnimatedSheets.js.map +1 -1
- package/lib/esm/components/Sheets/Sheets.js +25 -25
- package/lib/esm/components/Sheets/Sheets.js.map +1 -1
- package/lib/esm/components/Sheets/api.js +4 -4
- package/lib/esm/components/Sheets/api.js.map +1 -1
- package/lib/esm/components/Sheets/index.js +1 -1
- package/lib/esm/components/Skeleton/Item/SkeletonItem.js +9 -9
- package/lib/esm/components/Skeleton/Item/SkeletonItem.js.map +1 -1
- package/lib/esm/components/Skeleton/Item/SkeletonItem69.js +3 -3
- package/lib/esm/components/Skeleton/Item/SkeletonItem69.js.map +1 -1
- package/lib/esm/components/Skeleton/Skeleton.js +9 -9
- package/lib/esm/components/Skeleton/Skeleton.js.map +1 -1
- package/lib/esm/components/Skeleton/Skeleton69.js +3 -3
- package/lib/esm/components/Skeleton/Skeleton69.js.map +1 -1
- package/lib/esm/components/Skeleton/index.js +1 -1
- package/lib/esm/components/Slider/Slider.js +7 -7
- package/lib/esm/components/Slider/Slider.js.map +1 -1
- package/lib/esm/components/Slider/index.js +1 -1
- package/lib/esm/components/SnackBar/SnackBar.js +11 -11
- package/lib/esm/components/SnackBar/SnackBar.js.map +1 -1
- package/lib/esm/components/SnackBar/index.js +1 -1
- package/lib/esm/components/SnackBar/styles.js +1 -1
- package/lib/esm/components/StatusBar/StatusBar.js +2 -2
- package/lib/esm/components/StatusBar/StatusBar.js.map +1 -1
- package/lib/esm/components/Stepper/Stepper.js +11 -11
- package/lib/esm/components/Stepper/Stepper.js.map +1 -1
- package/lib/esm/components/Stepper/index.js +1 -1
- package/lib/esm/components/Stepper/styles.js +1 -1
- package/lib/esm/components/Switch/Switch.js +5 -5
- package/lib/esm/components/Switch/Switch.js.map +1 -1
- package/lib/esm/components/Switch/index.js +1 -1
- package/lib/esm/components/Tab/Tabs.js +26 -26
- package/lib/esm/components/Tab/Tabs.js.map +1 -1
- package/lib/esm/components/Tab/index.js +1 -1
- package/lib/esm/components/Tab/styles.js +1 -1
- package/lib/esm/components/TabBar/TabBar.js +12 -12
- package/lib/esm/components/TabBar/TabBar.js.map +1 -1
- package/lib/esm/components/TabBar/index.js +1 -1
- package/lib/esm/components/TabBar/styles.js +1 -1
- package/lib/esm/components/Tag/Tag.js +55 -52
- package/lib/esm/components/Tag/Tag.js.map +1 -1
- package/lib/esm/components/Tag/index.js +1 -1
- package/lib/esm/components/Text/Text.js +13 -13
- package/lib/esm/components/Text/Text.js.map +1 -1
- package/lib/esm/components/Text/hooks/cloneContainer.js +4 -4
- package/lib/esm/components/Text/hooks/cloneContainer.js.map +1 -1
- package/lib/esm/components/Text/hooks/getRenderText.js +3 -3
- package/lib/esm/components/Text/hooks/getRenderText.js.map +1 -1
- package/lib/esm/components/Text/hooks/index.js +1 -1
- package/lib/esm/components/Text/hooks/loadFontFromFile.js +1 -1
- package/lib/esm/components/Text/index.js +1 -1
- package/lib/esm/components/Text/styles.js +1 -1
- package/lib/esm/components/TextField/TextField.js +9 -9
- package/lib/esm/components/TextField/TextField.js.map +1 -1
- package/lib/esm/components/TextField/index.js +1 -1
- package/lib/esm/components/TextField/styles.js +1 -1
- package/lib/esm/components/TextView/TextView.js +12 -12
- package/lib/esm/components/TextView/TextView.js.map +1 -1
- package/lib/esm/components/TextView/index.js +1 -1
- package/lib/esm/components/TextView/styles.js +1 -1
- package/lib/esm/components/Toast/Toast.js +21 -21
- package/lib/esm/components/Toast/Toast.js.map +1 -1
- package/lib/esm/components/Toast/api.js +3 -3
- package/lib/esm/components/Toast/api.js.map +1 -1
- package/lib/esm/components/Toast/index.js +1 -1
- package/lib/esm/components/Toast/styles.js +1 -1
- package/lib/esm/components/Uploader/Uploader.js +37 -37
- package/lib/esm/components/Uploader/Uploader.js.map +1 -1
- package/lib/esm/components/Uploader/index.js +1 -1
- package/lib/esm/components/Uploader/utils.js +1 -1
- package/lib/esm/components/Video/Video.js +2 -2
- package/lib/esm/components/Video/Video.js.map +1 -1
- package/lib/esm/index.js +5 -11
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/pvCount/pvData.js +1 -1
- package/{types → lib}/src/components/ActionSheets/ActionSheets.d.ts +5 -5
- package/{types → lib}/src/components/ActionSheets/ActionSheetsItem.d.ts +5 -5
- package/lib/src/components/ActionSheets/interface/index.d.ts +28 -0
- package/lib/src/components/ActionSheets/styles.d.ts +54 -0
- package/lib/src/components/Alert/hooks/alert.d.ts +8 -0
- package/lib/src/components/Alert/interface/index.d.ts +36 -0
- package/lib/src/components/Alert/styles.d.ts +110 -0
- package/lib/src/components/Avatar/Avatar.d.ts +14 -0
- package/lib/src/components/Avatar/interface/index.d.ts +30 -0
- package/lib/src/components/Avatar/styles.d.ts +116 -0
- package/lib/src/components/AvatarGroup/AvatarGroup.d.ts +4 -0
- package/lib/src/components/AvatarGroup/interface/index.d.ts +15 -0
- package/lib/src/components/AvatarGroup/styles.d.ts +19 -0
- package/lib/src/components/Badge/interface/index.d.ts +22 -0
- package/lib/src/components/Badge/styles.d.ts +41 -0
- package/lib/src/components/BottomBar/interface/index.d.ts +18 -0
- package/lib/src/components/BottomBar/styles.d.ts +58 -0
- package/lib/src/components/Button/Button.d.ts +4 -0
- package/lib/src/components/Button/interface/index.d.ts +35 -0
- package/lib/src/components/Button/styleMap.d.ts +173 -0
- package/lib/src/components/Carousel/interface/index.d.ts +52 -0
- package/lib/src/components/Carousel/styles.d.ts +96 -0
- package/lib/src/components/CheckBoxGroup/CheckBox.d.ts +12 -0
- package/lib/src/components/CheckBoxGroup/CheckBoxGroup.d.ts +15 -0
- package/lib/src/components/CheckBoxGroup/interface/index.d.ts +67 -0
- package/lib/src/components/CheckBoxGroup/styles.d.ts +100 -0
- package/lib/src/components/Collapse/Collapse.d.ts +13 -0
- package/{types → lib}/src/components/Collapse/Item/Item.d.ts +2 -2
- package/lib/src/components/Collapse/Item/interface/index.d.ts +12 -0
- package/lib/src/components/Collapse/Item/styles.d.ts +19 -0
- package/lib/src/components/Collapse/interface/index.d.ts +25 -0
- package/lib/src/components/ConfigProvider/hooks/ConfigCache/ConfigCache.d.ts +19 -0
- package/lib/src/components/ConfigProvider/hooks/ConfigCache/interface.d.ts +73 -0
- package/{types → lib}/src/components/ConfigProvider/hooks/ConfigContext/ConfigContext.d.ts +2 -2
- package/{types → lib}/src/components/ConfigProvider/hooks/themeToken/useThemeToken.d.ts +3 -3
- package/lib/src/components/ConfigProvider/interface/index.d.ts +84 -0
- package/lib/src/components/DatePicker/DatePicker.d.ts +15 -0
- package/lib/src/components/DatePicker/interface/index.d.ts +34 -0
- package/lib/{types/components/ImagePreview → src/components/DatePicker}/styles.d.ts +1 -1
- package/{types → lib}/src/components/DatePicker/utils.d.ts +3 -6
- package/lib/src/components/Divider/Divider.d.ts +4 -0
- package/lib/src/components/Divider/interface/index.d.ts +15 -0
- package/lib/src/components/Divider/styles.d.ts +14 -0
- package/lib/src/components/DropDown/DropDown.d.ts +14 -0
- package/lib/src/components/DropDown/DropDownItem.d.ts +17 -0
- package/lib/src/components/DropDown/interface/index.d.ts +90 -0
- package/lib/src/components/DropDown/styles.d.ts +232 -0
- package/{types → lib}/src/components/Empty/Empty.d.ts +4 -4
- package/{types → lib}/src/components/Empty/interface/index.d.ts +4 -4
- package/lib/src/components/Empty/styles.d.ts +21 -0
- package/lib/src/components/FAB/FAB.d.ts +4 -0
- package/lib/src/components/FAB/interface/index.d.ts +30 -0
- package/lib/src/components/FAB/styles.d.ts +19 -0
- package/{types → lib}/src/components/Form/FormItem.d.ts +4 -4
- package/lib/src/components/Form/interface/index.d.ts +131 -0
- package/lib/src/components/Form/styles.d.ts +55 -0
- package/lib/src/components/Icon/interface/index.d.ts +25 -0
- package/lib/{types/components/Popover → src/components/Icon}/styles.d.ts +1 -1
- package/lib/src/components/Image/CircularProgress.d.ts +7 -0
- package/lib/src/components/Image/Image.d.ts +13 -0
- package/lib/src/components/Image/Image69.d.ts +13 -0
- package/lib/src/components/Image/hook/index.d.ts +14 -0
- package/lib/src/components/Image/index.d.ts +13 -0
- package/lib/src/components/Image/interface/index.d.ts +42 -0
- package/lib/src/components/Image/styles.d.ts +10 -0
- package/{types → lib}/src/components/List/List.d.ts +5 -5
- package/{types → lib}/src/components/List/ListItem/ListContext.d.ts +2 -2
- package/lib/src/components/List/ListItem/ListItem.d.ts +12 -0
- package/lib/src/components/List/interface/index.d.ts +23 -0
- package/lib/src/components/List/styles.d.ts +112 -0
- package/lib/src/components/NavigationBar/NavigationBar.d.ts +15 -0
- package/lib/src/components/NavigationBar/interface/index.d.ts +45 -0
- package/lib/src/components/NavigationBar/styles.d.ts +89 -0
- package/lib/src/components/Picker/Picker.d.ts +14 -0
- package/lib/src/components/Picker/interface/index.d.ts +22 -0
- package/lib/src/components/Picker/styles.d.ts +20 -0
- package/lib/src/components/PickerView/interface/index.d.ts +39 -0
- package/lib/src/components/PickerView/styles.d.ts +54 -0
- package/lib/src/components/Popover/Popover.d.ts +4 -0
- package/{types → lib}/src/components/Popover/component.d.ts +3 -5
- package/lib/src/components/Popover/hook.d.ts +68 -0
- package/lib/src/components/Popover/interface/index.d.ts +46 -0
- package/lib/src/components/Portal/core/Portal.d.ts +3 -0
- package/lib/src/components/Portal/core/PortalProvider.d.ts +5 -0
- package/lib/src/components/Portal/core/hooks/usePortal.d.ts +8 -0
- package/lib/src/components/Portal/interface/index.d.ts +111 -0
- package/lib/src/components/Progress/interface/index.d.ts +16 -0
- package/lib/src/components/Progress/styles.d.ts +30 -0
- package/lib/src/components/ProgressIndicator/ProgressIndicator.d.ts +13 -0
- package/lib/src/components/ProgressIndicator/interface/index.d.ts +20 -0
- package/lib/src/components/ProgressIndicator/lottie/index.d.ts +2120 -0
- package/lib/src/components/ProgressIndicator/styles.d.ts +24 -0
- package/{types → lib}/src/components/PullRefresh/PullRefresh.d.ts +7 -7
- package/lib/src/components/PullRefresh/component.d.ts +17 -0
- package/lib/src/components/PullRefresh/interface/index.d.ts +21 -0
- package/lib/src/components/PullRefresh/styles.d.ts +10 -0
- package/lib/src/components/Radio/Radio.d.ts +4 -0
- package/lib/src/components/Radio/interface/index.d.ts +47 -0
- package/{types → lib}/src/components/Radio/styles.d.ts +4 -13
- package/lib/src/components/Rate/Rate.d.ts +15 -0
- package/lib/src/components/Rate/interface/index.d.ts +40 -0
- package/lib/src/components/Rate/styles.d.ts +26 -0
- package/lib/src/components/Result/hooks/useDefaultIcon.d.ts +14 -0
- package/lib/src/components/Result/interface/index.d.ts +13 -0
- package/lib/src/components/Result/styles.d.ts +30 -0
- package/lib/src/components/Search/interface/index.d.ts +61 -0
- package/lib/src/components/Search/styles.d.ts +88 -0
- package/lib/src/components/Sheets/AnimatedSheets.d.ts +28 -0
- package/lib/src/components/Sheets/Sheets.d.ts +27 -0
- package/{types → lib}/src/components/Sheets/api.d.ts +4 -4
- package/lib/src/components/Sheets/interface/index.d.ts +64 -0
- package/lib/src/components/Sheets/styles.d.ts +85 -0
- package/lib/src/components/Skeleton/Item/SkeletonItem.d.ts +11 -0
- package/lib/src/components/Skeleton/Item/SkeletonItem69.d.ts +11 -0
- package/{types → lib}/src/components/Skeleton/Item/interface/index.d.ts +7 -7
- package/lib/src/components/Skeleton/Item/styles.d.ts +17 -0
- package/{types → lib}/src/components/Skeleton/Skeleton.d.ts +5 -5
- package/{types → lib}/src/components/Skeleton/Skeleton69.d.ts +5 -5
- package/{types → lib}/src/components/Skeleton/index.d.ts +11 -11
- package/lib/src/components/Skeleton/interface/index.d.ts +10 -0
- package/lib/src/components/Skeleton/styles.d.ts +10 -0
- package/lib/src/components/Slider/Slider.d.ts +20 -0
- package/lib/src/components/Slider/interface/index.d.ts +37 -0
- package/lib/src/components/Slider/styles.d.ts +20 -0
- package/lib/src/components/SnackBar/interface/index.d.ts +15 -0
- package/lib/src/components/SnackBar/styles.d.ts +48 -0
- package/{types → lib}/src/components/StatusBar/StatusBar.d.ts +4 -4
- package/{types → lib}/src/components/StatusBar/hook/getStatusHeight.d.ts +4 -6
- package/{types → lib}/src/components/StatusBar/interface/index.d.ts +4 -3
- package/lib/src/components/StatusBar/styles.d.ts +20 -0
- package/{types → lib}/src/components/Stepper/Stepper.d.ts +5 -5
- package/lib/src/components/Stepper/interface/index.d.ts +14 -0
- package/lib/src/components/Stepper/styles.d.ts +33 -0
- package/lib/src/components/Switch/Switch.d.ts +12 -0
- package/lib/{types/components/ImagePreview → src/components/Switch}/interface/index.d.ts +6 -6
- package/lib/src/components/Switch/styles.d.ts +20 -0
- package/lib/src/components/Tab/Tabs.d.ts +18 -0
- package/lib/src/components/Tab/interface/index.d.ts +92 -0
- package/lib/src/components/Tab/styles.d.ts +143 -0
- package/{types → lib}/src/components/TabBar/TabBar.d.ts +7 -7
- package/lib/src/components/TabBar/interface/index.d.ts +39 -0
- package/lib/src/components/TabBar/styles.d.ts +49 -0
- package/lib/src/components/Tag/interface/index.d.ts +37 -0
- package/lib/src/components/Tag/styles.d.ts +20 -0
- package/lib/src/components/Text/hooks/cloneContainer.d.ts +7 -0
- package/lib/src/components/Text/hooks/nativeEmojiMap/android.d.ts +6 -0
- package/lib/src/components/Text/hooks/nativeEmojiMap/ios.d.ts +6 -0
- package/lib/src/components/Text/interface/index.d.ts +76 -0
- package/lib/src/components/Text/styles.d.ts +16 -0
- package/lib/src/components/TextField/TextField.d.ts +19 -0
- package/lib/src/components/TextField/interface/index.d.ts +43 -0
- package/lib/src/components/TextField/styles.d.ts +47 -0
- package/lib/src/components/TextView/TextView.d.ts +16 -0
- package/lib/src/components/TextView/interface/index.d.ts +29 -0
- package/lib/src/components/TextView/styles.d.ts +66 -0
- package/lib/src/components/Toast/api.d.ts +10 -0
- package/lib/src/components/Toast/interface/index.d.ts +39 -0
- package/lib/src/components/Toast/styles.d.ts +73 -0
- package/lib/src/components/Uploader/Uploader.d.ts +18 -0
- package/lib/src/components/Uploader/interface/index.d.ts +53 -0
- package/lib/src/components/Uploader/styles.d.ts +173 -0
- package/{types → lib}/src/components/Uploader/utils.d.ts +8 -11
- package/lib/src/components/Video/Video.d.ts +22 -0
- package/lib/src/components/Video/interface/index.d.ts +45 -0
- package/lib/src/components/Video/styles.d.ts +20 -0
- package/{types → lib}/src/index.d.ts +0 -1
- package/lib/types/components/Alert/styles.d.ts +0 -1
- package/lib/types/components/Avatar/Avatar.d.ts +1 -1
- package/lib/types/components/AvatarGroup/AvatarGroup.d.ts +1 -1
- package/lib/types/components/Button/Button.d.ts +1 -1
- package/lib/types/components/Carousel/interface/index.d.ts +4 -0
- package/lib/types/components/CheckBoxGroup/interface/index.d.ts +1 -1
- package/lib/types/components/ConfigProvider/hooks/ConfigCache/interface.d.ts +1 -1
- package/lib/types/components/ConfigProvider/hooks/themeToken/useThemeToken.d.ts +1 -1
- package/lib/types/components/ConfigProvider/interface/index.d.ts +1 -1
- package/lib/types/components/Divider/Divider.d.ts +1 -2
- package/lib/types/components/FAB/FAB.d.ts +1 -1
- package/lib/types/components/Image/Image69.d.ts +11 -3
- package/lib/types/components/Image/index.d.ts +1 -1
- package/lib/types/components/List/styles.d.ts +0 -2
- package/lib/types/components/NavigationBar/NavigationBar.d.ts +3 -1
- package/lib/types/components/NavigationBar/styles.d.ts +10 -11
- package/lib/types/components/Popover/Popover.d.ts +1 -1
- package/lib/types/components/Popover/component.d.ts +5 -5
- package/lib/types/components/Popover/interface/index.d.ts +12 -2
- package/lib/types/components/ProgressIndicator/interface/index.d.ts +1 -0
- package/lib/types/components/Radio/Radio.d.ts +1 -2
- package/lib/types/components/Rate/styles.d.ts +3 -0
- package/lib/types/components/Sheets/AnimatedSheets.d.ts +6 -2
- package/lib/types/index.d.ts +0 -1
- package/package.json +2 -2
- package/src/components/Alert/styles.ts +1 -2
- package/src/components/Avatar/Avatar.tsx +4 -4
- package/src/components/AvatarGroup/AvatarGroup.tsx +4 -8
- package/src/components/Button/Button.tsx +3 -3
- package/src/components/Button/styleMap.ts +3 -3
- package/src/components/Carousel/Carousel.tsx +26 -27
- package/src/components/Carousel/doc/index.mdx +2 -0
- package/src/components/Carousel/interface/index.ts +4 -0
- package/src/components/CheckBoxGroup/CheckBoxGroup.tsx +8 -8
- package/src/components/CheckBoxGroup/demo/index.tsx +2 -2
- package/src/components/CheckBoxGroup/doc/index.mdx +1 -1
- package/src/components/CheckBoxGroup/interface/index.ts +2 -2
- package/src/components/CheckBoxGroup/styles.ts +9 -9
- package/src/components/ConfigProvider/hooks/ConfigCache/interface.ts +0 -1
- package/src/components/ConfigProvider/hooks/themeToken/useThemeToken.ts +12 -9
- package/src/components/ConfigProvider/interface/index.ts +0 -1
- package/src/components/Divider/Divider.tsx +4 -4
- package/src/components/FAB/FAB.tsx +3 -3
- package/src/components/Form/Form.tsx +2 -3
- package/src/components/Form/FormItem.tsx +2 -11
- package/src/components/Image/Image.tsx +1 -1
- package/src/components/Image/Image69.tsx +102 -94
- package/src/components/Image/index.tsx +104 -96
- package/src/components/List/styles.ts +1 -3
- package/src/components/NavigationBar/NavigationBar.tsx +4 -19
- package/src/components/NavigationBar/demo/index.tsx +144 -91
- package/src/components/NavigationBar/styles.ts +37 -18
- package/src/components/Picker/demo/index.tsx +1 -2
- package/src/components/Popover/Popover.tsx +34 -28
- package/src/components/Popover/component.tsx +20 -15
- package/src/components/Popover/demo/index.tsx +116 -103
- package/src/components/Popover/doc/index.mdx +17 -16
- package/src/components/Popover/interface/index.ts +8 -2
- package/src/components/Portal/demo/usePortal.Demo.tsx +14 -0
- package/src/components/ProgressIndicator/ProgressIndicator.tsx +3 -3
- package/src/components/ProgressIndicator/doc/index.mdx +11 -10
- package/src/components/ProgressIndicator/interface/index.ts +1 -0
- package/src/components/Radio/Radio.tsx +4 -4
- package/src/components/Radio/demo/index.tsx +7 -0
- package/src/components/Rate/Rate.tsx +1 -1
- package/src/components/Rate/styles.ts +3 -0
- package/src/components/Sheets/AnimatedSheets.tsx +88 -32
- package/src/components/Sheets/demo/index.tsx +1 -15
- package/src/components/SnackBar/SnackBar.tsx +3 -3
- package/src/components/SnackBar/demo/index.tsx +10 -2
- package/src/components/Stepper/Stepper.tsx +1 -1
- package/src/components/Tag/Tag.tsx +46 -42
- package/src/components/Tag/demo/index.tsx +741 -50
- package/src/index.ts +0 -1
- package/tsconfig.dts.json +1 -1
- package/tsconfig.dts.tsbuildinfo +1 -0
- package/lib/cjs/_chunks/BfpwjlZK.js.map +0 -1
- package/lib/cjs/_chunks/CR44hCQo.js.map +0 -1
- package/lib/cjs/_chunks/CZJKGXTT.js +0 -20
- package/lib/cjs/_chunks/CZJKGXTT.js.map +0 -1
- package/lib/cjs/_chunks/Dj89ocWw.js.map +0 -1
- package/lib/cjs/components/ImagePreview/Gesture/Pan.js +0 -46
- package/lib/cjs/components/ImagePreview/Gesture/Pan.js.map +0 -1
- package/lib/cjs/components/ImagePreview/Gesture/Pinch.js +0 -47
- package/lib/cjs/components/ImagePreview/Gesture/Pinch.js.map +0 -1
- package/lib/cjs/components/ImagePreview/Gesture/Tap.js +0 -55
- package/lib/cjs/components/ImagePreview/Gesture/Tap.js.map +0 -1
- package/lib/cjs/components/ImagePreview/Gesture/types.js +0 -3
- package/lib/cjs/components/ImagePreview/Gesture/types.js.map +0 -1
- package/lib/cjs/components/ImagePreview/Gesture/useGesture.js +0 -89
- package/lib/cjs/components/ImagePreview/Gesture/useGesture.js.map +0 -1
- package/lib/cjs/components/ImagePreview/ImageContainer.js +0 -23
- package/lib/cjs/components/ImagePreview/ImageContainer.js.map +0 -1
- package/lib/cjs/components/ImagePreview/ImagePreview.js +0 -215
- package/lib/cjs/components/ImagePreview/ImagePreview.js.map +0 -1
- package/lib/cjs/components/ImagePreview/ImageViewer.js +0 -89
- package/lib/cjs/components/ImagePreview/ImageViewer.js.map +0 -1
- package/lib/cjs/components/ImagePreview/ImageViewer2.js +0 -3
- package/lib/cjs/components/ImagePreview/ImageViewer2.js.map +0 -1
- package/lib/cjs/components/ImagePreview/ImageViewer3.js +0 -715
- package/lib/cjs/components/ImagePreview/ImageViewer3.js.map +0 -1
- package/lib/cjs/components/ImagePreview/index.js +0 -218
- package/lib/cjs/components/ImagePreview/index.js.map +0 -1
- package/lib/cjs/components/ImagePreview/interface/index.js +0 -9
- package/lib/cjs/components/ImagePreview/interface/index.js.map +0 -1
- package/lib/cjs/components/ImagePreview/styles.js +0 -29
- package/lib/cjs/components/ImagePreview/styles.js.map +0 -1
- package/lib/cjs/components/Popover/styles.js +0 -29
- package/lib/cjs/components/Popover/styles.js.map +0 -1
- package/lib/esm/_chunks/ByMDi00e.js +0 -17
- package/lib/esm/_chunks/ByMDi00e.js.map +0 -1
- package/lib/esm/_chunks/D8jwXt03.js.map +0 -1
- package/lib/esm/_chunks/DZwp3uCD.js.map +0 -1
- package/lib/esm/_chunks/DjJkQY7A.js.map +0 -1
- package/lib/esm/components/ImagePreview/Gesture/Pan.js +0 -43
- package/lib/esm/components/ImagePreview/Gesture/Pan.js.map +0 -1
- package/lib/esm/components/ImagePreview/Gesture/Pinch.js +0 -44
- package/lib/esm/components/ImagePreview/Gesture/Pinch.js.map +0 -1
- package/lib/esm/components/ImagePreview/Gesture/Tap.js +0 -52
- package/lib/esm/components/ImagePreview/Gesture/Tap.js.map +0 -1
- package/lib/esm/components/ImagePreview/Gesture/types.js +0 -2
- package/lib/esm/components/ImagePreview/Gesture/types.js.map +0 -1
- package/lib/esm/components/ImagePreview/Gesture/useGesture.js +0 -85
- package/lib/esm/components/ImagePreview/Gesture/useGesture.js.map +0 -1
- package/lib/esm/components/ImagePreview/ImageContainer.js +0 -19
- package/lib/esm/components/ImagePreview/ImageContainer.js.map +0 -1
- package/lib/esm/components/ImagePreview/ImagePreview.js +0 -207
- package/lib/esm/components/ImagePreview/ImagePreview.js.map +0 -1
- package/lib/esm/components/ImagePreview/ImageViewer.js +0 -85
- package/lib/esm/components/ImagePreview/ImageViewer.js.map +0 -1
- package/lib/esm/components/ImagePreview/ImageViewer2.js +0 -2
- package/lib/esm/components/ImagePreview/ImageViewer2.js.map +0 -1
- package/lib/esm/components/ImagePreview/ImageViewer3.js +0 -690
- package/lib/esm/components/ImagePreview/ImageViewer3.js.map +0 -1
- package/lib/esm/components/ImagePreview/index.js +0 -211
- package/lib/esm/components/ImagePreview/index.js.map +0 -1
- package/lib/esm/components/ImagePreview/interface/index.js +0 -3
- package/lib/esm/components/ImagePreview/interface/index.js.map +0 -1
- package/lib/esm/components/ImagePreview/styles.js +0 -25
- package/lib/esm/components/ImagePreview/styles.js.map +0 -1
- package/lib/esm/components/Popover/styles.js +0 -25
- package/lib/esm/components/Popover/styles.js.map +0 -1
- package/lib/types/components/ImagePreview/Gesture/Pan.d.ts +0 -8
- package/lib/types/components/ImagePreview/Gesture/Pinch.d.ts +0 -8
- package/lib/types/components/ImagePreview/Gesture/Tap.d.ts +0 -8
- package/lib/types/components/ImagePreview/Gesture/types.d.ts +0 -38
- package/lib/types/components/ImagePreview/Gesture/useGesture.d.ts +0 -8
- package/lib/types/components/ImagePreview/ImageContainer.d.ts +0 -3
- package/lib/types/components/ImagePreview/ImagePreview.d.ts +0 -12
- package/lib/types/components/ImagePreview/ImageViewer.d.ts +0 -3
- package/lib/types/components/ImagePreview/ImageViewer2.d.ts +0 -0
- package/lib/types/components/ImagePreview/ImageViewer3.d.ts +0 -219
- package/lib/types/components/ImagePreview/demo/index.d.ts +0 -2
- package/lib/types/components/ImagePreview/index.d.ts +0 -5
- package/lib/types/components/ImagePreview/test/index.bench.d.ts +0 -1
- package/lib/types/components/ImagePreview/test/index.test.d.ts +0 -1
- package/src/components/ImagePreview/Gesture/Pan.ts +0 -61
- package/src/components/ImagePreview/Gesture/Pinch.ts +0 -57
- package/src/components/ImagePreview/Gesture/Tap.ts +0 -66
- package/src/components/ImagePreview/Gesture/types.ts +0 -35
- package/src/components/ImagePreview/Gesture/useGesture.tsx +0 -65
- package/src/components/ImagePreview/ImageContainer.tsx +0 -22
- package/src/components/ImagePreview/ImagePreview.tsx +0 -37
- package/src/components/ImagePreview/ImageViewer.tsx +0 -96
- package/src/components/ImagePreview/ImageViewer2.tsx +0 -199
- package/src/components/ImagePreview/ImageViewer3.tsx +0 -931
- package/src/components/ImagePreview/demo/index.tsx +0 -40
- package/src/components/ImagePreview/doc/index.mdx +0 -26
- package/src/components/ImagePreview/index.ts +0 -6
- package/src/components/ImagePreview/interface/index.ts +0 -20
- package/src/components/ImagePreview/styles.ts +0 -24
- package/src/components/ImagePreview/test/index.bench.tsx +0 -13
- package/src/components/ImagePreview/test/index.test.tsx +0 -17
- package/src/components/Popover/styles.ts +0 -24
- package/types/src/components/ActionSheets/interface/index.d.ts +0 -27
- package/types/src/components/ActionSheets/styles.d.ts +0 -54
- package/types/src/components/Alert/hooks/alert.d.ts +0 -8
- package/types/src/components/Alert/interface/index.d.ts +0 -35
- package/types/src/components/Alert/styles.d.ts +0 -111
- package/types/src/components/Avatar/Avatar.d.ts +0 -16
- package/types/src/components/Avatar/interface/index.d.ts +0 -29
- package/types/src/components/Avatar/styles.d.ts +0 -121
- package/types/src/components/AvatarGroup/AvatarGroup.d.ts +0 -6
- package/types/src/components/AvatarGroup/interface/index.d.ts +0 -14
- package/types/src/components/AvatarGroup/styles.d.ts +0 -19
- package/types/src/components/Badge/interface/index.d.ts +0 -21
- package/types/src/components/Badge/styles.d.ts +0 -41
- package/types/src/components/BottomBar/interface/index.d.ts +0 -17
- package/types/src/components/BottomBar/styles.d.ts +0 -58
- package/types/src/components/Button/Button.d.ts +0 -6
- package/types/src/components/Button/interface/index.d.ts +0 -35
- package/types/src/components/Button/styleMap.d.ts +0 -197
- package/types/src/components/Carousel/interface/index.d.ts +0 -47
- package/types/src/components/Carousel/styles.d.ts +0 -96
- package/types/src/components/CheckBoxGroup/CheckBox.d.ts +0 -12
- package/types/src/components/CheckBoxGroup/CheckBoxGroup.d.ts +0 -15
- package/types/src/components/CheckBoxGroup/interface/index.d.ts +0 -66
- package/types/src/components/CheckBoxGroup/styles.d.ts +0 -122
- package/types/src/components/Collapse/Collapse.d.ts +0 -13
- package/types/src/components/Collapse/Item/interface/index.d.ts +0 -12
- package/types/src/components/Collapse/Item/styles.d.ts +0 -19
- package/types/src/components/Collapse/interface/index.d.ts +0 -24
- package/types/src/components/ConfigProvider/hooks/ConfigCache/ConfigCache.d.ts +0 -40
- package/types/src/components/ConfigProvider/hooks/ConfigCache/interface.d.ts +0 -119
- package/types/src/components/ConfigProvider/interface/index.d.ts +0 -129
- package/types/src/components/DatePicker/DatePicker.d.ts +0 -15
- package/types/src/components/DatePicker/interface/index.d.ts +0 -33
- package/types/src/components/DatePicker/styles.d.ts +0 -20
- package/types/src/components/Divider/Divider.d.ts +0 -7
- package/types/src/components/Divider/interface/index.d.ts +0 -14
- package/types/src/components/Divider/styles.d.ts +0 -14
- package/types/src/components/DropDown/DropDown.d.ts +0 -14
- package/types/src/components/DropDown/DropDownItem.d.ts +0 -21
- package/types/src/components/DropDown/interface/index.d.ts +0 -89
- package/types/src/components/DropDown/styles.d.ts +0 -232
- package/types/src/components/Empty/styles.d.ts +0 -21
- package/types/src/components/FAB/FAB.d.ts +0 -6
- package/types/src/components/FAB/interface/index.d.ts +0 -29
- package/types/src/components/FAB/styles.d.ts +0 -24
- package/types/src/components/Form/interface/index.d.ts +0 -130
- package/types/src/components/Form/styles.d.ts +0 -58
- package/types/src/components/Icon/interface/index.d.ts +0 -22
- package/types/src/components/Icon/styles.d.ts +0 -20
- package/types/src/components/Image/CircularProgress.d.ts +0 -11
- package/types/src/components/Image/Image.d.ts +0 -23
- package/types/src/components/Image/Image69.d.ts +0 -7
- package/types/src/components/Image/hook/index.d.ts +0 -18
- package/types/src/components/Image/index.d.ts +0 -32
- package/types/src/components/Image/interface/index.d.ts +0 -47
- package/types/src/components/Image/styles.d.ts +0 -10
- package/types/src/components/ImagePreview/Gesture/Pan.d.ts +0 -23
- package/types/src/components/ImagePreview/Gesture/Pinch.d.ts +0 -23
- package/types/src/components/ImagePreview/Gesture/Tap.d.ts +0 -23
- package/types/src/components/ImagePreview/Gesture/types.d.ts +0 -38
- package/types/src/components/ImagePreview/Gesture/useGesture.d.ts +0 -8
- package/types/src/components/ImagePreview/ImageContainer.d.ts +0 -3
- package/types/src/components/ImagePreview/ImagePreview.d.ts +0 -12
- package/types/src/components/ImagePreview/ImageViewer.d.ts +0 -3
- package/types/src/components/ImagePreview/ImageViewer2.d.ts +0 -0
- package/types/src/components/ImagePreview/ImageViewer3.d.ts +0 -222
- package/types/src/components/ImagePreview/index.d.ts +0 -5
- package/types/src/components/ImagePreview/interface/index.d.ts +0 -18
- package/types/src/components/ImagePreview/styles.d.ts +0 -20
- package/types/src/components/List/ListItem/ListItem.d.ts +0 -12
- package/types/src/components/List/interface/index.d.ts +0 -22
- package/types/src/components/List/styles.d.ts +0 -114
- package/types/src/components/NavigationBar/NavigationBar.d.ts +0 -18
- package/types/src/components/NavigationBar/interface/index.d.ts +0 -44
- package/types/src/components/NavigationBar/styles.d.ts +0 -90
- package/types/src/components/Picker/Picker.d.ts +0 -14
- package/types/src/components/Picker/interface/index.d.ts +0 -21
- package/types/src/components/Picker/styles.d.ts +0 -20
- package/types/src/components/PickerView/interface/index.d.ts +0 -38
- package/types/src/components/PickerView/styles.d.ts +0 -54
- package/types/src/components/Popover/Popover.d.ts +0 -21
- package/types/src/components/Popover/hook.d.ts +0 -76
- package/types/src/components/Popover/interface/index.d.ts +0 -35
- package/types/src/components/Popover/styles.d.ts +0 -20
- package/types/src/components/Portal/core/Portal.d.ts +0 -12
- package/types/src/components/Portal/core/PortalProvider.d.ts +0 -7
- package/types/src/components/Portal/core/hooks/usePortal.d.ts +0 -8
- package/types/src/components/Portal/interface/index.d.ts +0 -110
- package/types/src/components/Progress/interface/index.d.ts +0 -15
- package/types/src/components/Progress/styles.d.ts +0 -30
- package/types/src/components/ProgressIndicator/ProgressIndicator.d.ts +0 -13
- package/types/src/components/ProgressIndicator/interface/index.d.ts +0 -18
- package/types/src/components/ProgressIndicator/lottie/index.d.ts +0 -2207
- package/types/src/components/ProgressIndicator/styles.d.ts +0 -24
- package/types/src/components/PullRefresh/component.d.ts +0 -17
- package/types/src/components/PullRefresh/interface/index.d.ts +0 -20
- package/types/src/components/PullRefresh/styles.d.ts +0 -10
- package/types/src/components/Radio/Radio.d.ts +0 -7
- package/types/src/components/Radio/interface/index.d.ts +0 -47
- package/types/src/components/Rate/Rate.d.ts +0 -15
- package/types/src/components/Rate/interface/index.d.ts +0 -39
- package/types/src/components/Rate/styles.d.ts +0 -23
- package/types/src/components/Result/hooks/useDefaultIcon.d.ts +0 -14
- package/types/src/components/Result/interface/index.d.ts +0 -13
- package/types/src/components/Result/styles.d.ts +0 -30
- package/types/src/components/Search/interface/index.d.ts +0 -58
- package/types/src/components/Search/styles.d.ts +0 -88
- package/types/src/components/Sheets/AnimatedSheets.d.ts +0 -31
- package/types/src/components/Sheets/Sheets.d.ts +0 -34
- package/types/src/components/Sheets/interface/index.d.ts +0 -63
- package/types/src/components/Sheets/styles.d.ts +0 -85
- package/types/src/components/Skeleton/Item/SkeletonItem.d.ts +0 -11
- package/types/src/components/Skeleton/Item/SkeletonItem69.d.ts +0 -11
- package/types/src/components/Skeleton/Item/styles.d.ts +0 -22
- package/types/src/components/Skeleton/interface/index.d.ts +0 -9
- package/types/src/components/Skeleton/styles.d.ts +0 -10
- package/types/src/components/Slider/Slider.d.ts +0 -20
- package/types/src/components/Slider/interface/index.d.ts +0 -36
- package/types/src/components/Slider/styles.d.ts +0 -20
- package/types/src/components/SnackBar/interface/index.d.ts +0 -14
- package/types/src/components/SnackBar/styles.d.ts +0 -48
- package/types/src/components/StatusBar/styles.d.ts +0 -20
- package/types/src/components/Stepper/interface/index.d.ts +0 -13
- package/types/src/components/Stepper/styles.d.ts +0 -33
- package/types/src/components/Switch/Switch.d.ts +0 -21
- package/types/src/components/Switch/interface/index.d.ts +0 -18
- package/types/src/components/Switch/styles.d.ts +0 -20
- package/types/src/components/Tab/Tabs.d.ts +0 -18
- package/types/src/components/Tab/interface/index.d.ts +0 -91
- package/types/src/components/Tab/styles.d.ts +0 -146
- package/types/src/components/TabBar/interface/index.d.ts +0 -38
- package/types/src/components/TabBar/styles.d.ts +0 -49
- package/types/src/components/Tag/interface/index.d.ts +0 -36
- package/types/src/components/Tag/styles.d.ts +0 -20
- package/types/src/components/Text/hooks/cloneContainer.d.ts +0 -11
- package/types/src/components/Text/hooks/nativeEmojiMap/android.d.ts +0 -6
- package/types/src/components/Text/hooks/nativeEmojiMap/ios.d.ts +0 -6
- package/types/src/components/Text/interface/index.d.ts +0 -76
- package/types/src/components/Text/styles.d.ts +0 -18
- package/types/src/components/TextField/TextField.d.ts +0 -38
- package/types/src/components/TextField/interface/index.d.ts +0 -42
- package/types/src/components/TextField/styles.d.ts +0 -47
- package/types/src/components/TextView/TextView.d.ts +0 -31
- package/types/src/components/TextView/interface/index.d.ts +0 -29
- package/types/src/components/TextView/styles.d.ts +0 -66
- package/types/src/components/Toast/api.d.ts +0 -10
- package/types/src/components/Toast/interface/index.d.ts +0 -38
- package/types/src/components/Toast/styles.d.ts +0 -78
- package/types/src/components/Uploader/Uploader.d.ts +0 -18
- package/types/src/components/Uploader/interface/index.d.ts +0 -52
- package/types/src/components/Uploader/styles.d.ts +0 -176
- package/types/src/components/Video/Video.d.ts +0 -22
- package/types/src/components/Video/interface/index.d.ts +0 -44
- package/types/src/components/Video/styles.d.ts +0 -20
- /package/{types → lib}/src/components/ActionSheets/index.d.ts +0 -0
- /package/{types → lib}/src/components/Alert/Alert.d.ts +0 -0
- /package/{types → lib}/src/components/Alert/index.d.ts +0 -0
- /package/{types → lib}/src/components/Avatar/index.d.ts +0 -0
- /package/{types → lib}/src/components/AvatarGroup/index.d.ts +0 -0
- /package/{types → lib}/src/components/Badge/Badge.d.ts +0 -0
- /package/{types → lib}/src/components/Badge/index.d.ts +0 -0
- /package/{types → lib}/src/components/BottomBar/BottomBar.d.ts +0 -0
- /package/{types → lib}/src/components/BottomBar/index.d.ts +0 -0
- /package/{types → lib}/src/components/Button/index.d.ts +0 -0
- /package/{types → lib}/src/components/Carousel/Carousel.d.ts +0 -0
- /package/{types → lib}/src/components/Carousel/index.d.ts +0 -0
- /package/{types → lib}/src/components/CheckBoxGroup/hooks/useCheckBoxGroupContext.d.ts +0 -0
- /package/{types → lib}/src/components/CheckBoxGroup/index.d.ts +0 -0
- /package/{types → lib}/src/components/Collapse/hooks/useCollapseContext.d.ts +0 -0
- /package/{types → lib}/src/components/Collapse/index.d.ts +0 -0
- /package/{types → lib}/src/components/ConfigProvider/ConfigProvider.d.ts +0 -0
- /package/{types → lib}/src/components/ConfigProvider/hooks/ConfigCache/index.d.ts +0 -0
- /package/{types → lib}/src/components/ConfigProvider/hooks/themeToken/index.d.ts +0 -0
- /package/{types → lib}/src/components/ConfigProvider/hooks/themeToken/useColorMode.d.ts +0 -0
- /package/{types → lib}/src/components/ConfigProvider/index.d.ts +0 -0
- /package/{types → lib}/src/components/ConfigProvider/styles.d.ts +0 -0
- /package/{types → lib}/src/components/DatePicker/index.d.ts +0 -0
- /package/{types → lib}/src/components/Divider/index.d.ts +0 -0
- /package/{types → lib}/src/components/DropDown/index.d.ts +0 -0
- /package/{types → lib}/src/components/Empty/index.d.ts +0 -0
- /package/{types → lib}/src/components/FAB/index.d.ts +0 -0
- /package/{types → lib}/src/components/Form/Form.d.ts +0 -0
- /package/{types → lib}/src/components/Form/hooks/useFormContext.d.ts +0 -0
- /package/{types → lib}/src/components/Form/index.d.ts +0 -0
- /package/{types → lib}/src/components/Icon/Icon.72.d.ts +0 -0
- /package/{types → lib}/src/components/Icon/Icon.d.ts +0 -0
- /package/{types → lib}/src/components/Icon/index.d.ts +0 -0
- /package/{types → lib}/src/components/List/ListItem/ArrowRight.d.ts +0 -0
- /package/{types → lib}/src/components/List/index.d.ts +0 -0
- /package/{types → lib}/src/components/NavigationBar/index.d.ts +0 -0
- /package/{types → lib}/src/components/Picker/index.d.ts +0 -0
- /package/{types → lib}/src/components/PickerView/PickerView.d.ts +0 -0
- /package/{types → lib}/src/components/PickerView/Wheel.d.ts +0 -0
- /package/{types → lib}/src/components/PickerView/index.d.ts +0 -0
- /package/{types → lib}/src/components/Popover/index.d.ts +0 -0
- /package/{types → lib}/src/components/Portal/core/PortalContext.d.ts +0 -0
- /package/{types → lib}/src/components/Portal/core/PortalHost.d.ts +0 -0
- /package/{types → lib}/src/components/Portal/core/hooks/usePortalState.d.ts +0 -0
- /package/{types → lib}/src/components/Portal/index.d.ts +0 -0
- /package/{types → lib}/src/components/Progress/Progress.d.ts +0 -0
- /package/{types → lib}/src/components/Progress/index.d.ts +0 -0
- /package/{types → lib}/src/components/ProgressIndicator/index.d.ts +0 -0
- /package/{types → lib}/src/components/ProgressIndicator/lottie/getLottieSource.d.ts +0 -0
- /package/{types → lib}/src/components/PullRefresh/index.d.ts +0 -0
- /package/{types → lib}/src/components/Radio/RadioGroup.d.ts +0 -0
- /package/{types → lib}/src/components/Radio/index.d.ts +0 -0
- /package/{types → lib}/src/components/Rate/index.d.ts +0 -0
- /package/{types → lib}/src/components/Result/Result.d.ts +0 -0
- /package/{types → lib}/src/components/Result/index.d.ts +0 -0
- /package/{types → lib}/src/components/Search/Search.d.ts +0 -0
- /package/{types → lib}/src/components/Search/index.d.ts +0 -0
- /package/{types → lib}/src/components/Search/utils/index.d.ts +0 -0
- /package/{types → lib}/src/components/Sheets/index.d.ts +0 -0
- /package/{types → lib}/src/components/Slider/index.d.ts +0 -0
- /package/{types → lib}/src/components/SnackBar/SnackBar.d.ts +0 -0
- /package/{types → lib}/src/components/SnackBar/index.d.ts +0 -0
- /package/{types → lib}/src/components/StatusBar/hook/useStatusBarHeight.d.ts +0 -0
- /package/{types → lib}/src/components/StatusBar/index.d.ts +0 -0
- /package/{types → lib}/src/components/Stepper/index.d.ts +0 -0
- /package/{types → lib}/src/components/Switch/index.d.ts +0 -0
- /package/{types → lib}/src/components/Tab/index.d.ts +0 -0
- /package/{types → lib}/src/components/TabBar/index.d.ts +0 -0
- /package/{types → lib}/src/components/Tag/Tag.d.ts +0 -0
- /package/{types → lib}/src/components/Tag/index.d.ts +0 -0
- /package/{types → lib}/src/components/Text/Text.d.ts +0 -0
- /package/{types → lib}/src/components/Text/hooks/const.d.ts +0 -0
- /package/{types → lib}/src/components/Text/hooks/getRenderText.d.ts +0 -0
- /package/{types → lib}/src/components/Text/hooks/index.d.ts +0 -0
- /package/{types → lib}/src/components/Text/hooks/loadFontFromFile.d.ts +0 -0
- /package/{types → lib}/src/components/Text/index.d.ts +0 -0
- /package/{types → lib}/src/components/TextField/index.d.ts +0 -0
- /package/{types → lib}/src/components/TextView/index.d.ts +0 -0
- /package/{types → lib}/src/components/Toast/Toast.d.ts +0 -0
- /package/{types → lib}/src/components/Toast/index.d.ts +0 -0
- /package/{types → lib}/src/components/Uploader/index.d.ts +0 -0
- /package/{types → lib}/src/components/Video/index.d.ts +0 -0
- /package/{types → lib}/src/pvCount/pvData.d.ts +0 -0
- /package/{types → lib}/src/pvCount/useUnmountedProcess.d.ts +0 -0
- /package/{types → lib}/vitest.config.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.js","sources":["../../../../src/components/TextField/TextField.tsx"],"sourcesContent":["import React, { useState, useRef, useMemo, useEffect, useCallback } from \"react\";\nimport { View, TextInput, Text, TouchableWithoutFeedback } from \"react-native\";\nimport { RedsTextField, TextFieldDefaultProps } from \"./interface\";\nimport createStyles from \"./styles\";\nimport runes from \"runes\";\nimport { Icon, IconType } from \"../Icon\";\nimport { useColorMode } from \"../ConfigProvider\";\nimport useMounted from \"../../pvCount/useUnmountedProcess\";\n\nconst TextField = ({\n type,\n modelValue,\n clearable = false,\n maxLength,\n disabled = false,\n readonly,\n autofocus = false,\n showCount,\n placeholder,\n formatter,\n formatterTrigger,\n suffix,\n prefix,\n onFocus,\n onBlur,\n onChange,\n onClear,\n isFormItem,\n}: RedsTextField) => {\n useMounted(\"TextField\");\n const styles = createStyles(disabled);\n const [focused, setFocused] = useState(autofocus);\n const [value, setValue] = useState(modelValue || \"\");\n const [modelValueStringLength, setModelValueStringLength] = useState(0);\n const [showClear, setShowClear] = useState(false);\n const inputRef = useRef<TextInput>(null);\n const colorMode = useColorMode();\n\n const limitValueLength = useCallback(\n (value: string) => {\n const valueLength = runes(value || \"\").length;\n if (typeof maxLength === \"number\" && valueLength > maxLength) {\n const mValue = value;\n if (mValue && modelValueStringLength === +maxLength) {\n return mValue;\n }\n return runes.substr(value, 0, +maxLength);\n }\n return value;\n },\n [maxLength],\n );\n\n const updateValue = useCallback(\n (upValue: string, trigger: string = \"onChange\") => {\n let value = upValue;\n\n if (formatter && formatterTrigger === trigger) {\n value = formatter(value);\n }\n\n value = limitValueLength(value);\n setValue(value);\n onChange && onChange(value);\n },\n [formatter, onChange],\n );\n\n const handleChangeText = useCallback((value: string) => {\n updateValue(value);\n }, []);\n\n const handleClear = useCallback(() => {\n setValue(\"\");\n onClear && onClear(value);\n }, [onClear]);\n\n const handleFocus = useCallback(() => {\n if (readonly) {\n inputRef.current?.blur();\n }\n setFocused(true);\n onFocus && onFocus(value);\n }, [onFocus, readonly]);\n\n const handleBlur = useCallback(() => {\n setFocused(false);\n if (!readonly) {\n onBlur && onBlur(value);\n }\n }, [readonly, onBlur]);\n\n useEffect(() => {\n setValue(modelValue || \"\");\n }, [modelValue]);\n\n useEffect(() => {\n setShowClear(clearable && focused && value.length > 0);\n }, [clearable, focused, value]);\n\n useEffect(() => {\n setModelValueStringLength(runes(value).length);\n }, [value]);\n\n const CloseClear = useMemo(() => {\n if (colorMode === \"light\") {\n return \"https://picasso-static.xiaohongshu.com/fe-platform/451af80f830413a14a1fc5cdcb9b2e1401ca6f72.png\";\n } else {\n return \"https://picasso-static.xiaohongshu.com/fe-platform/c2d85533ba1c3496194d81cca563544bb7fd1d32.png\";\n }\n }, [colorMode]);\n\n return (\n <View style={[isFormItem ? {} : styles.wrapper]}>\n <View style={[styles.container, styles.centerItem]}>\n {prefix}\n <TextInput\n ref={inputRef}\n style={[styles.input]}\n value={value}\n onChangeText={handleChangeText}\n onFocus={handleFocus}\n onBlur={handleBlur}\n editable={!readonly && !disabled}\n keyboardType={type}\n placeholder={placeholder}\n selectionColor={styles.inputSelectionColor.color}\n placeholderTextColor={styles.inputPlaceHolder.color}\n />\n {showClear && (\n <View style={styles.rightItem}>\n <Icon icon={CloseClear} onClick={handleClear} size={20} type={IconType.iconType?.image} />\n </View>\n )}\n {showCount && (\n <View style={styles.rightItem}>\n <Text style={styles.count}>{`${modelValueStringLength}/${maxLength}`}</Text>\n </View>\n )}\n {suffix}\n </View>\n </View>\n );\n};\n\nTextField.defaultProps = TextFieldDefaultProps;\n\nexport default TextField;\n"],"names":["TextField","_IconType$iconType","type","_ref","modelValue","_ref$clearable","clearable","maxLength","_ref$disabled","disabled","readonly","_ref$autofocus","autofocus","showCount","placeholder","formatter","formatterTrigger","suffix","prefix","onFocus","onBlur","onChange","onClear","isFormItem","useMounted","styles","createStyles","_useState","useState","_useState2","_slicedToArray","focused","setFocused","_useState3","_useState4","value","setValue","_useState5","_useState6","modelValueStringLength","setModelValueStringLength","_useState7","_useState8","showClear","setShowClear","inputRef","useRef","colorMode","useColorMode","limitValueLength","useCallback","valueLength","runes","length","mValue","substr","updateValue","upValue","trigger","arguments","undefined","handleChangeText","handleClear","handleFocus","_inputRef$current","current","blur","handleBlur","useEffect","CloseClear","useMemo","View","style","wrapper","React","createElement","container","centerItem","TextInput","ref","input","onChangeText","editable","keyboardType","selectionColor","inputSelectionColor","color","placeholderTextColor","inputPlaceHolder","rightItem","Icon","icon","onClick","size","IconType","image","Text","count","concat","defaultProps","TextFieldDefaultProps"],"mappings":";;;;;;;;;;;;;;;;;AASA,IAAMA,YAAY,SAAZA,gBAmBe;AAAA,EAAA,IAAAC,kBAAA,CAAA;AAAA,EAAA,IAlBnBC,IAAA,GAAAC,IAAA,CAAAD,IAAA;IACAE,UAAA,GAAAD,IAAA,CAAAC,UAAA;IAAAC,cAAA,GAAAF,IAAA,CACAG,SAAY;AAAZA,IAAAA,SAAY,GAAAD,cAAA,KAAA,KAAA,CAAA,GAAA,KAAA,GAAAA,cAAA;IACZE,SAAA,GAAAJ,IAAA,CAAAI,SAAA;IAAAC,aAAA,GAAAL,IAAA,CACAM,QAAW;AAAXA,IAAAA,QAAW,GAAAD,aAAA,KAAA,KAAA,CAAA,GAAA,KAAA,GAAAA,aAAA;IACXE,QAAA,GAAAP,IAAA,CAAAO,QAAA;IAAAC,cAAA,GAAAR,IAAA,CACAS,SAAY;AAAZA,IAAAA,SAAY,GAAAD,cAAA,KAAA,KAAA,C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AA,QAAA,EAAU,CAACxE,QAAA,IAAY,CAACD,QAAA;AACxB0E,IAAAA,YAAc,EAAAjF,IAAA;AACdY,IAAAA,WAAA,EAAAA,WAAA;AACAsE,IAAAA,cAAA,EAAgB3D,OAAO4D,mBAAoB,CAAAC,KAAA;AAC3CC,IAAAA,oBAAA,EAAsB9D,OAAO+D,gBAAiB,CAAAF,KAAAA;GAChD,GACC3C,SACC,mBAAA+B,cAAA,CAAAC,aAAA,CAACJ;IAAKC,KAAO,EAAA/C,MAAA,CAAOgE,SAAAA;oBACjBf,cAAA,CAAAC,aAAA,CAAAe,IAAA,EAAA;AAAKC,IAAAA,IAAM,EAAAtB,UAAA;AAAYuB,IAAAA,SAAS9B,WAAa;AAAA+B,IAAAA,IAAA,EAAM;IAAI3F,IAAM,EAAA,CAAAD,kBAAA,GAAA6F,6CAAA7F,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,kBAAA,CAAmB8F,KAAAA;GAAO,CAC1F,CAED,EAAAlF,SAAA,gDACE0D,IAAK,EAAA;IAAAC,KAAA,EAAO/C,OAAOgE,SAAAA;AAClB,GAAA,iBAAAf,cAAA,CAAAC,aAAA,CAACqB;IAAKxB,KAAO,EAAA/C,MAAA,CAAOwE,KAAAA;AAAQ,GAAA,EAAAC,EAAAA,CAAAA,MAAA,CAAG3D,sBAAsB,OAAA2D,MAAA,CAAI3F,SAAS,CAAG,CACvE,CAAA,EAEDU,MACH,CACF,CAAA,CAAA;AAEJ,EAAA;AAEAjB,SAAA,CAAUmG,YAAe,GAAAC,qBAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"TextField.js","sources":["../../../../src/components/TextField/TextField.tsx"],"sourcesContent":["import React, { useState, useRef, useMemo, useEffect, useCallback } from \"react\";\nimport { View, TextInput, Text, TouchableWithoutFeedback } from \"react-native\";\nimport { RedsTextField, TextFieldDefaultProps } from \"./interface\";\nimport createStyles from \"./styles\";\nimport runes from \"runes\";\nimport { Icon, IconType } from \"../Icon\";\nimport { useColorMode } from \"../ConfigProvider\";\nimport useMounted from \"../../pvCount/useUnmountedProcess\";\n\nconst TextField = ({\n type,\n modelValue,\n clearable = false,\n maxLength,\n disabled = false,\n readonly,\n autofocus = false,\n showCount,\n placeholder,\n formatter,\n formatterTrigger,\n suffix,\n prefix,\n onFocus,\n onBlur,\n onChange,\n onClear,\n isFormItem,\n}: RedsTextField) => {\n useMounted(\"TextField\");\n const styles = createStyles(disabled);\n const [focused, setFocused] = useState(autofocus);\n const [value, setValue] = useState(modelValue || \"\");\n const [modelValueStringLength, setModelValueStringLength] = useState(0);\n const [showClear, setShowClear] = useState(false);\n const inputRef = useRef<TextInput>(null);\n const colorMode = useColorMode();\n\n const limitValueLength = useCallback(\n (value: string) => {\n const valueLength = runes(value || \"\").length;\n if (typeof maxLength === \"number\" && valueLength > maxLength) {\n const mValue = value;\n if (mValue && modelValueStringLength === +maxLength) {\n return mValue;\n }\n return runes.substr(value, 0, +maxLength);\n }\n return value;\n },\n [maxLength],\n );\n\n const updateValue = useCallback(\n (upValue: string, trigger: string = \"onChange\") => {\n let value = upValue;\n\n if (formatter && formatterTrigger === trigger) {\n value = formatter(value);\n }\n\n value = limitValueLength(value);\n setValue(value);\n onChange && onChange(value);\n },\n [formatter, onChange],\n );\n\n const handleChangeText = useCallback((value: string) => {\n updateValue(value);\n }, []);\n\n const handleClear = useCallback(() => {\n setValue(\"\");\n onClear && onClear(value);\n }, [onClear]);\n\n const handleFocus = useCallback(() => {\n if (readonly) {\n inputRef.current?.blur();\n }\n setFocused(true);\n onFocus && onFocus(value);\n }, [onFocus, readonly]);\n\n const handleBlur = useCallback(() => {\n setFocused(false);\n if (!readonly) {\n onBlur && onBlur(value);\n }\n }, [readonly, onBlur]);\n\n useEffect(() => {\n setValue(modelValue || \"\");\n }, [modelValue]);\n\n useEffect(() => {\n setShowClear(clearable && focused && value.length > 0);\n }, [clearable, focused, value]);\n\n useEffect(() => {\n setModelValueStringLength(runes(value).length);\n }, [value]);\n\n const CloseClear = useMemo(() => {\n if (colorMode === \"light\") {\n return \"https://picasso-static.xiaohongshu.com/fe-platform/451af80f830413a14a1fc5cdcb9b2e1401ca6f72.png\";\n } else {\n return \"https://picasso-static.xiaohongshu.com/fe-platform/c2d85533ba1c3496194d81cca563544bb7fd1d32.png\";\n }\n }, [colorMode]);\n\n return (\n <View style={[isFormItem ? {} : styles.wrapper]}>\n <View style={[styles.container, styles.centerItem]}>\n {prefix}\n <TextInput\n ref={inputRef}\n style={[styles.input]}\n value={value}\n onChangeText={handleChangeText}\n onFocus={handleFocus}\n onBlur={handleBlur}\n editable={!readonly && !disabled}\n keyboardType={type}\n placeholder={placeholder}\n selectionColor={styles.inputSelectionColor.color}\n placeholderTextColor={styles.inputPlaceHolder.color}\n />\n {showClear && (\n <View style={styles.rightItem}>\n <Icon icon={CloseClear} onClick={handleClear} size={20} type={IconType.iconType?.image} />\n </View>\n )}\n {showCount && (\n <View style={styles.rightItem}>\n <Text style={styles.count}>{`${modelValueStringLength}/${maxLength}`}</Text>\n </View>\n )}\n {suffix}\n </View>\n </View>\n );\n};\n\nTextField.defaultProps = TextFieldDefaultProps;\n\nexport default TextField;\n"],"names":["TextField","_IconType$iconType","type","_ref","modelValue","_ref$clearable","clearable","maxLength","_ref$disabled","disabled","readonly","_ref$autofocus","autofocus","showCount","placeholder","formatter","formatterTrigger","suffix","prefix","onFocus","onBlur","onChange","onClear","isFormItem","useMounted","styles","createStyles","_useState","useState","_useState2","_slicedToArray","focused","setFocused","_useState3","_useState4","value","setValue","_useState5","_useState6","modelValueStringLength","setModelValueStringLength","_useState7","_useState8","showClear","setShowClear","inputRef","useRef","colorMode","useColorMode","limitValueLength","useCallback","valueLength","runes","length","mValue","substr","updateValue","upValue","trigger","arguments","undefined","handleChangeText","handleClear","handleFocus","_inputRef$current","current","blur","handleBlur","useEffect","CloseClear","useMemo","View","style","wrapper","React","createElement","container","centerItem","TextInput","ref","input","onChangeText","editable","keyboardType","selectionColor","inputSelectionColor","color","placeholderTextColor","inputPlaceHolder","rightItem","Icon","icon","onClick","size","IconType","image","Text","count","concat","defaultProps","TextFieldDefaultProps"],"mappings":";;;;;;;;;;;;;;;;;AASA,IAAMA,YAAY,SAAZA,gBAmBe;AAAA,EAAA,IAAAC,kBAAA,CAAA;AAAA,EAAA,IAlBnBC,IAAA,GAAAC,IAAA,CAAAD,IAAA;IACAE,UAAA,GAAAD,IAAA,CAAAC,UAAA;IAAAC,cAAA,GAAAF,IAAA,CACAG,SAAY;AAAZA,IAAAA,SAAY,GAAAD,cAAA,KAAA,KAAA,CAAA,GAAA,KAAA,GAAAA,cAAA;IACZE,SAAA,GAAAJ,IAAA,CAAAI,SAAA;IAAAC,aAAA,GAAAL,IAAA,CACAM,QAAW;AAAXA,IAAAA,QAAW,GAAAD,aAAA,KAAA,KAAA,CAAA,GAAA,KAAA,GAAAA,aAAA;IACXE,QAAA,GAAAP,IAAA,CAAAO,QAAA;IAAAC,cAAA,GAAAR,IAAA,CACAS,SAAY;AAAZA,IAAAA,SAAY,GAAAD,cAAA,KAAA,KAAA,CAAA,GAAA,KAAA,GAAAA,cAAA;IACZE,SAAA,GAAAV,IAAA,CAAAU,SAAA;IACAC,WAAA,GAAAX,IAAA,CAAAW,WAAA;IACAC,SAAA,GAAAZ,IAAA,CAAAY,SAAA;IACAC,gBAAA,GAAAb,IAAA,CAAAa,gBAAA;IACAC,MAAA,GAAAd,IAAA,CAAAc,MAAA;IACAC,MAAA,GAAAf,IAAA,CAAAe,MAAA;IACAC,OAAA,GAAAhB,IAAA,CAAAgB,OAAA;IACAC,MAAA,GAAAjB,IAAA,CAAAiB,MAAA;IACAC,QAAA,GAAAlB,IAAA,CAAAkB,QAAA;IACAC,OAAA,GAAAnB,IAAA,CAAAmB,OAAA;IACAC,UAAA,GAAApB,IAAA,CAAAoB,UAAA,CAAA;EAEAC,UAAA,CAAW,WAAW,CAAA,CAAA;AAChB,EAAA,IAAAC,MAAA,GAASC,aAAajB,QAAQ,CAAA,CAAA;AACp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kBAAA,CAAmB8F,KAAAA;GAAO,CAC1F,CAED,EAAAlF,SAAA,uCACE0D,IAAK,EAAA;IAAAC,KAAA,EAAO/C,OAAOgE,SAAAA;AAClB,GAAA,iBAAAf,KAAA,CAAAC,aAAA,CAACqB;IAAKxB,KAAO,EAAA/C,MAAA,CAAOwE,KAAAA;AAAQ,GAAA,EAAAC,EAAAA,CAAAA,MAAA,CAAG3D,sBAAsB,OAAA2D,MAAA,CAAI3F,SAAS,CAAG,CACvE,CAAA,EAEDU,MACH,CACF,CAAA,CAAA;AAEJ,EAAA;AAEAjB,SAAA,CAAUmG,YAAe,GAAAC,qBAAA;;;;"}
|
|
@@ -3,7 +3,7 @@ import '../ConfigProvider/hooks/ConfigCache/ConfigCache.js';
|
|
|
3
3
|
import 'react';
|
|
4
4
|
import '@xhs/reds-apm/src/index.native';
|
|
5
5
|
import { useThemeColor, useThemeTypography } from '../ConfigProvider/hooks/themeToken/useThemeToken.js';
|
|
6
|
-
import '../../_chunks/
|
|
6
|
+
import '../../_chunks/Rk1G_m0d.js';
|
|
7
7
|
import '@xhsreds/reds-token-next';
|
|
8
8
|
import '../ConfigProvider/hooks/ConfigContext/ConfigContext.js';
|
|
9
9
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as _slicedToArray } from '../../_chunks/
|
|
2
|
-
import
|
|
1
|
+
import { _ as _slicedToArray } from '../../_chunks/Rk1G_m0d.js';
|
|
2
|
+
import React, { useState, useRef, useCallback, useEffect } from 'react';
|
|
3
3
|
import { View, TextInput, Text, TouchableWithoutFeedback } from 'react-native';
|
|
4
4
|
import { T as TextViewDefaultProps } from '../../_chunks/CAB-dv2J.js';
|
|
5
5
|
import createStyles from './styles.js';
|
|
@@ -105,11 +105,11 @@ var TextField = function TextField(_ref) {
|
|
|
105
105
|
useEffect(function () {
|
|
106
106
|
setShowActionArea(showClear || showCount);
|
|
107
107
|
}, [showClear, showCount]);
|
|
108
|
-
return /* @__PURE__ */
|
|
108
|
+
return /* @__PURE__ */React.createElement(View, {
|
|
109
109
|
style: [styles.wrapper]
|
|
110
|
-
}, /* @__PURE__ */
|
|
110
|
+
}, /* @__PURE__ */React.createElement(View, {
|
|
111
111
|
style: [styles.container, styles.centerItem]
|
|
112
|
-
}, /* @__PURE__ */
|
|
112
|
+
}, /* @__PURE__ */React.createElement(TextInput, {
|
|
113
113
|
ref: inputRef,
|
|
114
114
|
style: [styles.input, {
|
|
115
115
|
height: rows * 24
|
|
@@ -125,19 +125,19 @@ var TextField = function TextField(_ref) {
|
|
|
125
125
|
numberOfLines: rows,
|
|
126
126
|
selectionColor: styles.inputSelectionColor.color,
|
|
127
127
|
placeholderTextColor: styles.inputPlaceHolder.color
|
|
128
|
-
})), showActionArea && /* @__PURE__ */
|
|
128
|
+
})), showActionArea && /* @__PURE__ */React.createElement(View, {
|
|
129
129
|
style: styles.ButtomActionArea
|
|
130
|
-
}, showCount && maxLength && /* @__PURE__ */
|
|
130
|
+
}, showCount && maxLength && /* @__PURE__ */React.createElement(View, {
|
|
131
131
|
style: styles.rightItem
|
|
132
|
-
}, /* @__PURE__ */
|
|
132
|
+
}, /* @__PURE__ */React.createElement(Text, {
|
|
133
133
|
style: styles.count
|
|
134
|
-
}, "".concat(modelValueStringLength, "/").concat(maxLength))), showClear && /* @__PURE__ */
|
|
134
|
+
}, "".concat(modelValueStringLength, "/").concat(maxLength))), showClear && /* @__PURE__ */React.createElement(View, {
|
|
135
135
|
style: styles.rightItem
|
|
136
|
-
}, /* @__PURE__ */
|
|
136
|
+
}, /* @__PURE__ */React.createElement(TouchableWithoutFeedback, {
|
|
137
137
|
onPress: handleClear
|
|
138
|
-
}, /* @__PURE__ */
|
|
138
|
+
}, /* @__PURE__ */React.createElement(View, {
|
|
139
139
|
style: styles.clearIconContainer
|
|
140
|
-
}, /* @__PURE__ */
|
|
140
|
+
}, /* @__PURE__ */React.createElement(Text, {
|
|
141
141
|
style: styles.clearIcon
|
|
142
142
|
}, "\u6E05\u7A7A"))))));
|
|
143
143
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextView.js","sources":["../../../../src/components/TextView/TextView.tsx"],"sourcesContent":["import React, { useState, useRef, useEffect, useCallback } from \"react\";\nimport { View, TextInput, Text, TouchableWithoutFeedback } from \"react-native\";\nimport { RedsTextView, TextViewDefaultProps } from \"./interface\";\nimport createStyles from \"./styles\";\nimport runes from \"runes\";\nimport useMounted from \"../../pvCount/useUnmountedProcess\";\n\nconst TextField = ({\n type,\n modelValue,\n clearable = false,\n maxLength,\n disabled = false,\n readonly,\n autofocus = false,\n showCount = false,\n placeholder,\n rows = 3,\n onFocus,\n onBlur,\n onChange,\n onClear,\n}: RedsTextView) => {\n useMounted(\"TextView\");\n const styles = createStyles(disabled);\n const [focused, setFocused] = useState(autofocus);\n const [value, setValue] = useState(modelValue || \"\");\n const [modelValueStringLength, setModelValueStringLength] = useState(0);\n const [showClear, setShowClear] = useState(false);\n const [showActionArea, setShowActionArea] = useState(false);\n const inputRef = useRef<TextInput>(null);\n\n const limitValueLength = useCallback(\n (value: string) => {\n const valueLength = runes(value || \"\").length;\n if (typeof maxLength === \"number\" && valueLength > maxLength) {\n const mValue = value;\n if (mValue && modelValueStringLength === +maxLength) {\n return mValue;\n }\n return runes.substr(value, 0, +maxLength);\n }\n return value;\n },\n [maxLength],\n );\n\n const updateValue = useCallback(\n (upValue: string) => {\n let value = upValue;\n\n value = limitValueLength(value);\n onChange && onChange(value);\n setValue(value);\n },\n [onChange],\n );\n\n const handleChangeText = useCallback((value: string) => {\n updateValue(value);\n }, []);\n\n const handleClear = useCallback(() => {\n setValue(\"\");\n onClear && onClear(value);\n }, [onClear]);\n\n const handleFocus = useCallback(() => {\n if (readonly) {\n inputRef.current?.blur();\n }\n setFocused(true);\n onFocus && onFocus(value);\n }, [onFocus, readonly]);\n\n const handleBlur = useCallback(() => {\n setFocused(false);\n if (!readonly) {\n onBlur && onBlur(value);\n }\n }, [readonly, onBlur]);\n\n useEffect(() => {\n setValue(modelValue || \"\");\n }, [modelValue]);\n\n useEffect(() => {\n setShowClear(clearable && focused && value.length > 0);\n }, [clearable, focused, value]);\n\n useEffect(() => {\n setModelValueStringLength(runes(value).length);\n }, [value]);\n\n useEffect(() => {\n setShowActionArea(showClear || showCount);\n }, [showClear, showCount]);\n\n return (\n <View style={[styles.wrapper]}>\n <View style={[styles.container, styles.centerItem]}>\n <TextInput\n ref={inputRef}\n style={[styles.input, { height: rows * 24 }]}\n value={value}\n onChangeText={handleChangeText}\n onFocus={handleFocus}\n onBlur={handleBlur}\n editable={!readonly && !disabled}\n keyboardType={type}\n placeholder={placeholder}\n multiline\n numberOfLines={rows}\n selectionColor={styles.inputSelectionColor.color}\n placeholderTextColor={styles.inputPlaceHolder.color}\n />\n </View>\n {showActionArea && (\n <View style={styles.ButtomActionArea}>\n {showCount && maxLength && (\n <View style={styles.rightItem}>\n <Text style={styles.count}>{`${modelValueStringLength}/${maxLength}`}</Text>\n </View>\n )}\n {showClear && (\n <View style={styles.rightItem}>\n <TouchableWithoutFeedback onPress={handleClear}>\n <View style={styles.clearIconContainer}>\n <Text style={styles.clearIcon}>清空</Text>\n </View>\n </TouchableWithoutFeedback>\n </View>\n )}\n </View>\n )}\n </View>\n );\n};\n\nTextField.defaultProps = TextViewDefaultProps;\n\nexport default TextField;\n"],"names":["TextField","type","_ref","modelValue","_ref$clearable","clearable","maxLength","_ref$disabled","disabled","readonly","_ref$autofocus","autofocus","_ref$showCount","showCount","placeholder","_ref$rows","rows","onFocus","onBlur","onChange","onClear","useMounted","styles","createStyles","_useState","useState","_useState2","_slicedToArray","focused","setFocused","_useState3","_useState4","value","setValue","_useState5","_useState6","modelValueStringLength","setModelValueStringLength","_useState7","_useState8","showClear","setShowClear","_useState9","_useState10","showActionArea","setShowActionArea","inputRef","useRef","limitValueLength","useCallback","valueLength","runes","length","mValue","substr","updateValue","upValue","handleChangeText","handleClear","handleFocus","_inputRef$current","current","blur","handleBlur","useEffect","React","createElement","View","style","wrapper","container","centerItem","TextInput","ref","input","height","onChangeText","editable","keyboardType","multiline","numberOfLines","selectionColor","inputSelectionColor","color","placeholderTextColor","inputPlaceHolder","ButtomActionArea","rightItem","Text","count","concat","TouchableWithoutFeedback","onPress","clearIconContainer","clearIcon","defaultProps","TextViewDefaultProps"],"mappings":";;;;;;;;;;;;;;AAOA,IAAMA,YAAY,SAAZA,gBAec;AAAA,EAAA,IAdlBC,IAAA,GAAAC,IAAA,CAAAD,IAAA;IACAE,UAAA,GAAAD,IAAA,CAAAC,UAAA;IAAAC,cAAA,GAAAF,IAAA,CACAG,SAAY;AAAZA,IAAAA,SAAY,GAAAD,cAAA,KAAA,KAAA,CAAA,GAAA,KAAA,GAAAA,cAAA;IACZE,SAAA,GAAAJ,IAAA,CAAAI,SAAA;IAAAC,aAAA,GAAAL,IAAA,CACAM,QAAW;AAAXA,IAAAA,QAAW,GAAAD,aAAA,KAAA,KAAA,CAAA,GAAA,KAAA,GAAAA,aAAA;IACXE,QAAA,GAAAP,IAAA,CAAAO,QAAA;IAAAC,cAAA,GAAAR,IAAA,CACAS,SAAY;AAAZA,IAAAA,SAAY,GAAAD,cAAA,KAAA,KAAA,CAAA,GAAA,KAAA,GAAAA,cAAA;IAAAE,cAAA,GAAAV,IAAA,CACZW,SAAY;AAAZA,IAAAA,SAAY,GAAAD,cAAA,KAAA,KAAA,CAAA,GAAA,KAAA,GAAAA,cAAA;IACZE,WAAA,GAAAZ,IAAA,CAAAY,WAAA;IAAAC,SAAA,GAAAb,IAAA,CACAc,IAAO;AAAPA,IAAAA,IAAO,GAAAD,SAAA,KAAA,KAAA,CAAA,GAAA,CAAA,GAAAA,SAAA;IACPE,OAAA,GAAAf,IAAA,CAAAe,OAAA;IACAC,MAAA,GAAAhB,IAAA,CAAAgB,MAAA;IACAC,QAAA,GAAAjB,IAAA,CAAAiB,QAAA;IACAC,OAAA,GAAAlB,IAAA,CAAAkB,OAAA,CAAA;EAEAC,UAAA,CAAW,UAAU,CAAA,CAA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,EAAA;IAAKpB,KAAO,EAAA9C,MAAA,CAAOmE,KAAAA;eAAWrD,sBAAsB,OAAAsD,MAAA,CAAIpF,SAAS,CAAG,CACvE,GAEDkC,SACC,mBAAAyB,cAAA,CAAAC,aAAA,CAACC,IAAK,EAAA;IAAAC,KAAA,EAAO9C,MAAO,CAAAiE,SAAAA;AAAA,GAAA,8CACjBI,wBAAyB,EAAA;AAAAC,IAAAA,OAAA,EAASlC,WAAAA;AACjC,GAAA,iBAAAO,cAAA,CAAAC,aAAA,CAACC,IAAK,EAAA;IAAAC,KAAA,EAAO9C,OAAOuE,kBAAAA;AAClB,GAAA,iBAAA5B,cAAA,CAAAC,aAAA,CAACsB,IAAK,EAAA;IAAApB,KAAA,EAAO9C,MAAO,CAAAwE,SAAAA;AAAA,GAAA,EAAW,cAAE,CACnC,CACF,CACF,CAEJ,CAEJ,CAAA,CAAA;AAEJ,EAAA;AAEA9F,SAAA,CAAU+F,YAAe,GAAAC,oBAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"TextView.js","sources":["../../../../src/components/TextView/TextView.tsx"],"sourcesContent":["import React, { useState, useRef, useEffect, useCallback } from \"react\";\nimport { View, TextInput, Text, TouchableWithoutFeedback } from \"react-native\";\nimport { RedsTextView, TextViewDefaultProps } from \"./interface\";\nimport createStyles from \"./styles\";\nimport runes from \"runes\";\nimport useMounted from \"../../pvCount/useUnmountedProcess\";\n\nconst TextField = ({\n type,\n modelValue,\n clearable = false,\n maxLength,\n disabled = false,\n readonly,\n autofocus = false,\n showCount = false,\n placeholder,\n rows = 3,\n onFocus,\n onBlur,\n onChange,\n onClear,\n}: RedsTextView) => {\n useMounted(\"TextView\");\n const styles = createStyles(disabled);\n const [focused, setFocused] = useState(autofocus);\n const [value, setValue] = useState(modelValue || \"\");\n const [modelValueStringLength, setModelValueStringLength] = useState(0);\n const [showClear, setShowClear] = useState(false);\n const [showActionArea, setShowActionArea] = useState(false);\n const inputRef = useRef<TextInput>(null);\n\n const limitValueLength = useCallback(\n (value: string) => {\n const valueLength = runes(value || \"\").length;\n if (typeof maxLength === \"number\" && valueLength > maxLength) {\n const mValue = value;\n if (mValue && modelValueStringLength === +maxLength) {\n return mValue;\n }\n return runes.substr(value, 0, +maxLength);\n }\n return value;\n },\n [maxLength],\n );\n\n const updateValue = useCallback(\n (upValue: string) => {\n let value = upValue;\n\n value = limitValueLength(value);\n onChange && onChange(value);\n setValue(value);\n },\n [onChange],\n );\n\n const handleChangeText = useCallback((value: string) => {\n updateValue(value);\n }, []);\n\n const handleClear = useCallback(() => {\n setValue(\"\");\n onClear && onClear(value);\n }, [onClear]);\n\n const handleFocus = useCallback(() => {\n if (readonly) {\n inputRef.current?.blur();\n }\n setFocused(true);\n onFocus && onFocus(value);\n }, [onFocus, readonly]);\n\n const handleBlur = useCallback(() => {\n setFocused(false);\n if (!readonly) {\n onBlur && onBlur(value);\n }\n }, [readonly, onBlur]);\n\n useEffect(() => {\n setValue(modelValue || \"\");\n }, [modelValue]);\n\n useEffect(() => {\n setShowClear(clearable && focused && value.length > 0);\n }, [clearable, focused, value]);\n\n useEffect(() => {\n setModelValueStringLength(runes(value).length);\n }, [value]);\n\n useEffect(() => {\n setShowActionArea(showClear || showCount);\n }, [showClear, showCount]);\n\n return (\n <View style={[styles.wrapper]}>\n <View style={[styles.container, styles.centerItem]}>\n <TextInput\n ref={inputRef}\n style={[styles.input, { height: rows * 24 }]}\n value={value}\n onChangeText={handleChangeText}\n onFocus={handleFocus}\n onBlur={handleBlur}\n editable={!readonly && !disabled}\n keyboardType={type}\n placeholder={placeholder}\n multiline\n numberOfLines={rows}\n selectionColor={styles.inputSelectionColor.color}\n placeholderTextColor={styles.inputPlaceHolder.color}\n />\n </View>\n {showActionArea && (\n <View style={styles.ButtomActionArea}>\n {showCount && maxLength && (\n <View style={styles.rightItem}>\n <Text style={styles.count}>{`${modelValueStringLength}/${maxLength}`}</Text>\n </View>\n )}\n {showClear && (\n <View style={styles.rightItem}>\n <TouchableWithoutFeedback onPress={handleClear}>\n <View style={styles.clearIconContainer}>\n <Text style={styles.clearIcon}>清空</Text>\n </View>\n </TouchableWithoutFeedback>\n </View>\n )}\n </View>\n )}\n </View>\n );\n};\n\nTextField.defaultProps = TextViewDefaultProps;\n\nexport default TextField;\n"],"names":["TextField","type","_ref","modelValue","_ref$clearable","clearable","maxLength","_ref$disabled","disabled","readonly","_ref$autofocus","autofocus","_ref$showCount","showCount","placeholder","_ref$rows","rows","onFocus","onBlur","onChange","onClear","useMounted","styles","createStyles","_useState","useState","_useState2","_slicedToArray","focused","setFocused","_useState3","_useState4","value","setValue","_useState5","_useState6","modelValueStringLength","setModelValueStringLength","_useState7","_useState8","showClear","setShowClear","_useState9","_useState10","showActionArea","setShowActionArea","inputRef","useRef","limitValueLength","useCallback","valueLength","runes","length","mValue","substr","updateValue","upValue","handleChangeText","handleClear","handleFocus","_inputRef$current","current","blur","handleBlur","useEffect","React","createElement","View","style","wrapper","container","centerItem","TextInput","ref","input","height","onChangeText","editable","keyboardType","multiline","numberOfLines","selectionColor","inputSelectionColor","color","placeholderTextColor","inputPlaceHolder","ButtomActionArea","rightItem","Text","count","concat","TouchableWithoutFeedback","onPress","clearIconContainer","clearIcon","defaultProps","TextViewDefaultProps"],"mappings":";;;;;;;;;;;;;;AAOA,IAAMA,YAAY,SAAZA,gBAec;AAAA,EAAA,IAdlBC,IAAA,GAAAC,IAAA,CAAAD,IAAA;IACAE,UAAA,GAAAD,IAAA,CAAAC,UAAA;IAAAC,cAAA,GAAAF,IAAA,CACAG,SAAY;AAAZA,IAAAA,SAAY,GAAAD,cAAA,KAAA,KAAA,CAAA,GAAA,KAAA,GAAAA,cAAA;IACZE,SAAA,GAAAJ,IAAA,CAAAI,SAAA;IAAAC,aAAA,GAAAL,IAAA,CACAM,QAAW;AAAXA,IAAAA,QAAW,GAAAD,aAAA,KAAA,KAAA,CAAA,GAAA,KAAA,GAAAA,aAAA;IACXE,QAAA,GAAAP,IAAA,CAAAO,QAAA;IAAAC,cAAA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ConfigCache/ConfigCache.js';
|
|
|
3
3
|
import 'react';
|
|
4
4
|
import '@xhs/reds-apm/src/index.native';
|
|
5
5
|
import { useThemeColor, useThemeTypography } from '../ConfigProvider/hooks/themeToken/useThemeToken.js';
|
|
6
|
-
import '../../_chunks/
|
|
6
|
+
import '../../_chunks/Rk1G_m0d.js';
|
|
7
7
|
import '@xhsreds/reds-token-next';
|
|
8
8
|
import '../ConfigProvider/hooks/ConfigContext/ConfigContext.js';
|
|
9
9
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as _objectSpread2 } from '../../_chunks/
|
|
2
|
-
import
|
|
1
|
+
import { b as _objectSpread2 } from '../../_chunks/Rk1G_m0d.js';
|
|
2
|
+
import React, { useEffect, useMemo } from 'react';
|
|
3
3
|
import { Animated, View, Text } from 'react-native';
|
|
4
4
|
import Icon from '../Icon/Icon.js';
|
|
5
5
|
import { i as iconType } from '../../_chunks/xi-gXLIR.js';
|
|
@@ -46,8 +46,8 @@ var ToastContainer = function ToastContainer(p) {
|
|
|
46
46
|
onClick = props.onClick;
|
|
47
47
|
var themeColor = useThemeColor("Toast");
|
|
48
48
|
var colorMode = useColorMode();
|
|
49
|
-
var anim =
|
|
50
|
-
var fadeAnim =
|
|
49
|
+
var anim = React.useRef();
|
|
50
|
+
var fadeAnim = React.useRef(new Animated.Value(0));
|
|
51
51
|
useEffect(function () {
|
|
52
52
|
if (anim.current) {
|
|
53
53
|
anim.current = null;
|
|
@@ -86,32 +86,32 @@ var ToastContainer = function ToastContainer(p) {
|
|
|
86
86
|
var Check = useMemo(function () {
|
|
87
87
|
return "https://picasso-static.xiaohongshu.com/fe-platform/5dfb28256b75e7f4bb60755ab189632c3c08799a.png";
|
|
88
88
|
}, [colorMode]);
|
|
89
|
-
return /* @__PURE__ */
|
|
89
|
+
return /* @__PURE__ */React.createElement(Animated.View, {
|
|
90
90
|
style: [styles.ToastContainer, {
|
|
91
91
|
opacity: fadeAnim.current
|
|
92
92
|
}],
|
|
93
93
|
pointerEvents: mask ? void 0 : "none"
|
|
94
|
-
}, /* @__PURE__ */
|
|
94
|
+
}, /* @__PURE__ */React.createElement(View, {
|
|
95
95
|
style: [getContainerStyle(props), {
|
|
96
96
|
backgroundColor: "#303034"
|
|
97
97
|
}]
|
|
98
|
-
}, type === ToastBuiltInType.TEXT && !icon ? /* @__PURE__ */
|
|
98
|
+
}, type === ToastBuiltInType.TEXT && !icon ? /* @__PURE__ */React.createElement(Text, {
|
|
99
99
|
style: [styles.message]
|
|
100
|
-
}, message) : /* @__PURE__ */
|
|
100
|
+
}, message) : /* @__PURE__ */React.createElement(View, {
|
|
101
101
|
style: styles.center
|
|
102
|
-
}, icon ? icon : type === ToastBuiltInType.LOADING ? /* @__PURE__ */
|
|
102
|
+
}, icon ? icon : type === ToastBuiltInType.LOADING ? /* @__PURE__ */React.createElement(ProgressIndicator, {
|
|
103
103
|
type: "default",
|
|
104
104
|
strokeColor: "dark",
|
|
105
105
|
size: 48
|
|
106
|
-
}) : type === ToastBuiltInType.ERROR ? /* @__PURE__ */
|
|
106
|
+
}) : type === ToastBuiltInType.ERROR ? /* @__PURE__ */React.createElement(Icon, {
|
|
107
107
|
icon: Close,
|
|
108
108
|
size: 48,
|
|
109
109
|
type: (_IconType$iconType = iconType) === null || _IconType$iconType === void 0 ? void 0 : _IconType$iconType.image
|
|
110
|
-
}) : type === ToastBuiltInType.PROGRESS ? /* @__PURE__ */
|
|
110
|
+
}) : type === ToastBuiltInType.PROGRESS ? /* @__PURE__ */React.createElement(View, {
|
|
111
111
|
style: {
|
|
112
112
|
marginBottom: 12
|
|
113
113
|
}
|
|
114
|
-
}, /* @__PURE__ */
|
|
114
|
+
}, /* @__PURE__ */React.createElement(ProgressIndicator, {
|
|
115
115
|
percent: progressValue,
|
|
116
116
|
type: type,
|
|
117
117
|
strokeColor: "dark",
|
|
@@ -119,35 +119,35 @@ var ToastContainer = function ToastContainer(p) {
|
|
|
119
119
|
color: "#fff"
|
|
120
120
|
},
|
|
121
121
|
size: 56
|
|
122
|
-
})) : /* @__PURE__ */
|
|
122
|
+
})) : /* @__PURE__ */React.createElement(Icon, {
|
|
123
123
|
icon: Check,
|
|
124
124
|
type: (_IconType$iconType2 = iconType) === null || _IconType$iconType2 === void 0 ? void 0 : _IconType$iconType2.image,
|
|
125
125
|
size: 36
|
|
126
|
-
}), message ? /* @__PURE__ */
|
|
126
|
+
}), message ? /* @__PURE__ */React.createElement(Text, {
|
|
127
127
|
style: [styles.iconMessage, {
|
|
128
128
|
marginTop: type === ToastBuiltInType.PROGRESS ? 0 : 16
|
|
129
129
|
}]
|
|
130
|
-
}, message) : /* @__PURE__ */
|
|
130
|
+
}, message) : /* @__PURE__ */React.createElement(React.Fragment, null), onCancel ? /* @__PURE__ */React.createElement(View, {
|
|
131
131
|
style: styles.btn
|
|
132
|
-
}, /* @__PURE__ */
|
|
132
|
+
}, /* @__PURE__ */React.createElement(Button, {
|
|
133
133
|
onClick: onCancel,
|
|
134
134
|
size: "micro",
|
|
135
135
|
variant: "text"
|
|
136
|
-
}, /* @__PURE__ */
|
|
136
|
+
}, /* @__PURE__ */React.createElement(Text, {
|
|
137
137
|
style: [styles.btnText, {
|
|
138
138
|
color: themeColor.White
|
|
139
139
|
}]
|
|
140
|
-
}, "\u53D6\u6D88"))) : /* @__PURE__ */
|
|
140
|
+
}, "\u53D6\u6D88"))) : /* @__PURE__ */React.createElement(React.Fragment, null), onClick ? /* @__PURE__ */React.createElement(View, {
|
|
141
141
|
style: styles.btn
|
|
142
|
-
}, /* @__PURE__ */
|
|
142
|
+
}, /* @__PURE__ */React.createElement(Button, {
|
|
143
143
|
onClick: onClick,
|
|
144
144
|
size: "micro",
|
|
145
145
|
variant: "text"
|
|
146
|
-
}, /* @__PURE__ */
|
|
146
|
+
}, /* @__PURE__ */React.createElement(Text, {
|
|
147
147
|
style: [styles.btnText, {
|
|
148
148
|
color: themeColor.White
|
|
149
149
|
}]
|
|
150
|
-
}, "\u786E\u5B9A"))) : /* @__PURE__ */
|
|
150
|
+
}, "\u786E\u5B9A"))) : /* @__PURE__ */React.createElement(React.Fragment, null))));
|
|
151
151
|
};
|
|
152
152
|
|
|
153
153
|
export { ToastContainer as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.js","sources":["../../../../src/components/Toast/Toast.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport React, { useEffect, useMemo } from \"react\";\nimport { Animated, View, Text, TouchableWithoutFeedback } from \"react-native\";\nimport { Icon, IconType } from \"../Icon\";\nimport Button from \"../Button\";\nimport ProgressIndicator from \"../ProgressIndicator\";\nimport { useThemeColor, useColorMode } from \"../ConfigProvider\";\nimport { ToastBuiltInType, RedsToast, ToastDefaultProps } from \"./interface\";\nimport styles, { getContainerStyle } from \"./styles\";\nimport useMounted from \"../../pvCount/useUnmountedProcess\";\n\nconst ToastContainer: FC<RedsToast> = (p) => {\n useMounted(\"Toast\");\n const props = { ...ToastDefaultProps, ...p };\n const { icon, type, mask, duration, progressValue, message, onCancel, onClose, onClick } = props;\n\n const themeColor = useThemeColor(\"Toast\");\n\n const colorMode = useColorMode();\n\n const anim = React.useRef<Animated.CompositeAnimation | null>();\n const fadeAnim = React.useRef(new Animated.Value(0));\n\n useEffect(() => {\n if (anim.current) {\n anim.current = null;\n }\n const animArr = [\n Animated.timing(fadeAnim.current, {\n toValue: 1,\n duration: 400,\n useNativeDriver: true,\n }),\n Animated.delay(duration * 2),\n ];\n if (duration > 0) {\n animArr.push(\n Animated.timing(fadeAnim.current, {\n toValue: 0,\n duration: 400,\n useNativeDriver: true,\n }),\n );\n }\n anim.current = Animated.sequence(animArr);\n anim.current.start(() => {\n if (duration > 0) {\n anim.current = null;\n }\n });\n\n return () => {\n if (anim.current) {\n anim.current.stop();\n anim.current = null;\n }\n\n if (onClose) {\n onClose?.();\n }\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const Close = useMemo(() => {\n return \"https://picasso-static.xiaohongshu.com/fe-platform/c0ddb1ec3641b24cd7c22c021b46e72b16807017.png\";\n }, [colorMode]);\n\n const Check = useMemo(() => {\n return \"https://picasso-static.xiaohongshu.com/fe-platform/5dfb28256b75e7f4bb60755ab189632c3c08799a.png\";\n }, [colorMode]);\n\n return (\n <Animated.View\n style={[styles.ToastContainer, { opacity: fadeAnim.current }]}\n pointerEvents={mask ? undefined : \"none\"}\n >\n {/** @ts-ignore */}\n <View style={[getContainerStyle(props), { backgroundColor: \"#303034\" }]}>\n {type === ToastBuiltInType.TEXT && !icon ? (\n <Text style={[styles.message]}>{message}</Text>\n ) : (\n <View style={styles.center}>\n {icon ? (\n icon\n ) : type === ToastBuiltInType.LOADING ? (\n <ProgressIndicator type=\"default\" strokeColor={\"dark\"} size={48} />\n ) : type === ToastBuiltInType.ERROR ? (\n <Icon icon={Close} size={48} type={IconType.iconType?.image} />\n ) : type === ToastBuiltInType.PROGRESS ? (\n <View style={{ marginBottom: 12 }}>\n <ProgressIndicator\n percent={progressValue}\n type={type}\n strokeColor={\"dark\"}\n textStyle={{ color: \"#fff\" }}\n size={56}\n />\n </View>\n ) : (\n <Icon icon={Check} type={IconType.iconType?.image} size={36} />\n )}\n {message ? (\n <Text style={[styles.iconMessage, { marginTop: type === ToastBuiltInType.PROGRESS ? 0 : 16 }]}>\n {message}\n </Text>\n ) : (\n <></>\n )}\n\n {onCancel ? (\n <View style={styles.btn}>\n <Button onClick={onCancel} size=\"micro\" variant=\"text\">\n <Text style={[styles.btnText, { color: themeColor.White }]}>取消</Text>\n </Button>\n </View>\n ) : (\n <></>\n )}\n\n {onClick ? (\n <View style={styles.btn}>\n <Button onClick={onClick} size=\"micro\" variant=\"text\">\n <Text style={[styles.btnText, { color: themeColor.White }]}>确定</Text>\n </Button>\n </View>\n ) : (\n <></>\n )}\n </View>\n )}\n </View>\n </Animated.View>\n );\n};\n\nexport default ToastContainer;\n"],"names":["ToastContainer","p","_IconType$iconType","_IconType$iconType2","useMounted","props","_objectSpread","ToastDefaultProps","icon","type","mask","duration","progressValue","message","onCancel","onClose","onClick","themeColor","useThemeColor","colorMode","useColorMode","anim","React","useRef","fadeAnim","Animated","Value","useEffect","current","animArr","timing","toValue","useNativeDriver","delay","push","sequence","start","stop","Close","useMemo","Check","createElement","View","style","styles","opacity","pointerEvents","getContainerStyle","backgroundColor","ToastBuiltInType","TEXT","Text","center","LOADING","ProgressIndicator","strokeColor","size","ERROR","Icon","IconType","image","PROGRESS","marginBottom","percent","textStyle","color","iconMessage","marginTop","Fragment","btn","Button","variant","btnText","White"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,IAAMA,cAAA,GAAgC,SAAhCA,cAAAA,CAAiCC,CAAM,EAAA;EAAA,IAAAC,kBAAA,EAAAC,mBAAA,CAAA;EAC3CC,UAAA,CAAW,OAAO,CAAA,CAAA;EAClB,IAAMC,KAAQ,GAAAC,cAAA,CAAAA,cAAA,CAAKC,EAAAA,EAAAA,iBAAA,CAAsBN,EAAAA,CAAE,CAAA,CAAA;AACrC,EAAA,IAAEO,IAAM,GAA6EH,KAAA,CAAnFG,IAAM;IAAAC,IAAA,GAA6EJ,KAAA,CAA7EI,IAAA;IAAMC,IAAM,GAAiEL,KAAA,CAAvEK,IAAM;IAAAC,QAAA,GAAiEN,KAAA,CAAjEM,QAAA;IAAUC,gBAAuDP,KAAA,CAAvDO;IAAeC,OAAS,GAA+BR,KAAA,CAAxCQ,OAAS;IAAAC,QAAA,GAA+BT,KAAA,CAA/BS,QAAA;IAAUC,OAAS,GAAYV,KAAA,CAArBU,OAAS;IAAAC,OAAA,GAAYX,KAAA,CAAZW,OAAA,CAAA;AAEzE,EAAA,IAAAC,UAAA,GAAaC,cAAc,OAAO,CAAA,CAAA;AAExC,EAAA,IAAMC,YAAYC,YAAa,EAAA,CAAA;AAEzB,EAAA,IAAAC,IAAA,GAAOC,eAAMC,MAA2C,EAAA,CAAA;AAC9D,EAAA,IAAMC,WAAWF,cAAM,CAAAC,MAAA,CAAO,IAAI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EACzFhD,OACH,CAEA,kBAAAS,cAAA,CAAAmB,aAAA,CAAAnB,cAAA,CAAA8C,QAAA,EAAA,IAAE,GAGHtD,QACC,kBAAAQ,cAAA,CAAAmB,aAAA,CAACC;IAAKC,KAAO,EAAAC,MAAA,CAAOyB,GAAAA;oBACjB/C,cAAA,CAAAmB,aAAA,CAAA6B,MAAA,EAAA;AAAOtD,IAAAA,SAASF,QAAU;AAAA0C,IAAAA,IAAA,EAAK,OAAQ;AAAAe,IAAAA,OAAA,EAAQ,MAAA;AAC9C,GAAA,iBAAAjD,cAAA,CAAAmB,aAAA,CAACU;AAAKR,IAAAA,KAAO,EAAA,CAACC,OAAO4B,OAAS,EAAA;MAAEP,OAAOhD,UAAW,CAAAwD,KAAAA;KAAO,CAAA;GAAG,EAAA,cAAE,CAChE,CACF,CAAA,4EAEE,CAGH,EAAAzD,OAAA,+CACE0B,IAAK,EAAA;IAAAC,KAAA,EAAOC,MAAO,CAAAyB,GAAAA;AAAA,GAAA,iBACjB/C,cAAA,CAAAmB,aAAA,CAAA6B,MAAA,EAAA;AAAOtD,IAAAA,SAAAA;AAAkBwC,IAAAA,IAAK,EAAA,OAAA;AAAQe,IAAAA,SAAQ,MAAA;AAC7C,GAAA,iBAAAjD,cAAA,CAAAmB,aAAA,CAACU;AAAKR,IAAAA,KAAO,EAAA,CAACC,OAAO4B,OAAS,EAAA;MAAEP,OAAOhD,UAAW,CAAAwD,KAAAA;KAAO,CAAA;AAAG,GAAA,EAAA,cAAE,CAChE,CACF,CAAA,kBAEEnD,cAAA,CAAAmB,aAAA,CAAAnB,cAAA,CAAA8C,QAAA,EAAA,IAAA,CAEN,CAEJ,CACF,CAAA,CAAA;AAEJ;;;;"}
|
|
1
|
+
{"version":3,"file":"Toast.js","sources":["../../../../src/components/Toast/Toast.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport React, { useEffect, useMemo } from \"react\";\nimport { Animated, View, Text, TouchableWithoutFeedback } from \"react-native\";\nimport { Icon, IconType } from \"../Icon\";\nimport Button from \"../Button\";\nimport ProgressIndicator from \"../ProgressIndicator\";\nimport { useThemeColor, useColorMode } from \"../ConfigProvider\";\nimport { ToastBuiltInType, RedsToast, ToastDefaultProps } from \"./interface\";\nimport styles, { getContainerStyle } from \"./styles\";\nimport useMounted from \"../../pvCount/useUnmountedProcess\";\n\nconst ToastContainer: FC<RedsToast> = (p) => {\n useMounted(\"Toast\");\n const props = { ...ToastDefaultProps, ...p };\n const { icon, type, mask, duration, progressValue, message, onCancel, onClose, onClick } = props;\n\n const themeColor = useThemeColor(\"Toast\");\n\n const colorMode = useColorMode();\n\n const anim = React.useRef<Animated.CompositeAnimation | null>();\n const fadeAnim = React.useRef(new Animated.Value(0));\n\n useEffect(() => {\n if (anim.current) {\n anim.current = null;\n }\n const animArr = [\n Animated.timing(fadeAnim.current, {\n toValue: 1,\n duration: 400,\n useNativeDriver: true,\n }),\n Animated.delay(duration * 2),\n ];\n if (duration > 0) {\n animArr.push(\n Animated.timing(fadeAnim.current, {\n toValue: 0,\n duration: 400,\n useNativeDriver: true,\n }),\n );\n }\n anim.current = Animated.sequence(animArr);\n anim.current.start(() => {\n if (duration > 0) {\n anim.current = null;\n }\n });\n\n return () => {\n if (anim.current) {\n anim.current.stop();\n anim.current = null;\n }\n\n if (onClose) {\n onClose?.();\n }\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const Close = useMemo(() => {\n return \"https://picasso-static.xiaohongshu.com/fe-platform/c0ddb1ec3641b24cd7c22c021b46e72b16807017.png\";\n }, [colorMode]);\n\n const Check = useMemo(() => {\n return \"https://picasso-static.xiaohongshu.com/fe-platform/5dfb28256b75e7f4bb60755ab189632c3c08799a.png\";\n }, [colorMode]);\n\n return (\n <Animated.View\n style={[styles.ToastContainer, { opacity: fadeAnim.current }]}\n pointerEvents={mask ? undefined : \"none\"}\n >\n {/** @ts-ignore */}\n <View style={[getContainerStyle(props), { backgroundColor: \"#303034\" }]}>\n {type === ToastBuiltInType.TEXT && !icon ? (\n <Text style={[styles.message]}>{message}</Text>\n ) : (\n <View style={styles.center}>\n {icon ? (\n icon\n ) : type === ToastBuiltInType.LOADING ? (\n <ProgressIndicator type=\"default\" strokeColor={\"dark\"} size={48} />\n ) : type === ToastBuiltInType.ERROR ? (\n <Icon icon={Close} size={48} type={IconType.iconType?.image} />\n ) : type === ToastBuiltInType.PROGRESS ? (\n <View style={{ marginBottom: 12 }}>\n <ProgressIndicator\n percent={progressValue}\n type={type}\n strokeColor={\"dark\"}\n textStyle={{ color: \"#fff\" }}\n size={56}\n />\n </View>\n ) : (\n <Icon icon={Check} type={IconType.iconType?.image} size={36} />\n )}\n {message ? (\n <Text style={[styles.iconMessage, { marginTop: type === ToastBuiltInType.PROGRESS ? 0 : 16 }]}>\n {message}\n </Text>\n ) : (\n <></>\n )}\n\n {onCancel ? (\n <View style={styles.btn}>\n <Button onClick={onCancel} size=\"micro\" variant=\"text\">\n <Text style={[styles.btnText, { color: themeColor.White }]}>取消</Text>\n </Button>\n </View>\n ) : (\n <></>\n )}\n\n {onClick ? (\n <View style={styles.btn}>\n <Button onClick={onClick} size=\"micro\" variant=\"text\">\n <Text style={[styles.btnText, { color: themeColor.White }]}>确定</Text>\n </Button>\n </View>\n ) : (\n <></>\n )}\n </View>\n )}\n </View>\n </Animated.View>\n );\n};\n\nexport default ToastContainer;\n"],"names":["ToastContainer","p","_IconType$iconType","_IconType$iconType2","useMounted","props","_objectSpread","ToastDefaultProps","icon","type","mask","duration","progressValue","message","onCancel","onClose","onClick","themeColor","useThemeColor","colorMode","useColorMode","anim","React","useRef","fadeAnim","Animated","Value","useEffect","current","animArr","timing","toValue","useNativeDriver","delay","push","sequence","start","stop","Close","useMemo","Check","createElement","View","style","styles","opacity","pointerEvents","getContainerStyle","backgroundColor","ToastBuiltInType","TEXT","Text","center","LOADING","ProgressIndicator","strokeColor","size","ERROR","Icon","IconType","image","PROGRESS","marginBottom","percent","textStyle","color","iconMessage","marginTop","Fragment","btn","Button","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,MAAA;AAC9C,GAAA,iBAAAjD,KAAA,CAAAmB,aAAA,CAACU;AAAKR,IAAAA,KAAO,EAAA,CAACC,OAAO4B,OAAS,EAAA;MAAEP,OAAOhD,UAAW,CAAAwD,KAAAA;KAAO,CAAA;GAAG,EAAA,cAAE,CAChE,CACF,CAAA,0DAEE,CAGH,EAAAzD,OAAA,sCACE0B,IAAK,EAAA;IAAAC,KAAA,EAAOC,MAAO,CAAAyB,GAAAA;AAAA,GAAA,iBACjB/C,KAAA,CAAAmB,aAAA,CAAA6B,MAAA,EAAA;AAAOtD,IAAAA,SAAAA;AAAkBwC,IAAAA,IAAK,EAAA,OAAA;AAAQe,IAAAA,SAAQ,MAAA;AAC7C,GAAA,iBAAAjD,KAAA,CAAAmB,aAAA,CAACU;AAAKR,IAAAA,KAAO,EAAA,CAACC,OAAO4B,OAAS,EAAA;MAAEP,OAAOhD,UAAW,CAAAwD,KAAAA;KAAO,CAAA;AAAG,GAAA,EAAA,cAAE,CAChE,CACF,CAAA,kBAEEnD,KAAA,CAAAmB,aAAA,CAAAnB,KAAA,CAAA8C,QAAA,EAAA,IAAA,CAEN,CAEJ,CACF,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { e as _defineProperty, b as _objectSpread2 } from '../../_chunks/
|
|
2
|
-
import
|
|
1
|
+
import { e as _defineProperty, b as _objectSpread2 } from '../../_chunks/Rk1G_m0d.js';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
import { T as ToastBuiltInType, a as ToastDefaultProps } from '../../_chunks/C5vDf62k.js';
|
|
4
4
|
import ToastContainer from './Toast.js';
|
|
5
5
|
import '../Portal/core/Portal.js';
|
|
@@ -50,7 +50,7 @@ var useToast = function useToast() {
|
|
|
50
50
|
removePortal(toastKey);
|
|
51
51
|
}
|
|
52
52
|
toastKey = Math.random().toString();
|
|
53
|
-
addPortal(toastKey, /* @__PURE__ */
|
|
53
|
+
addPortal(toastKey, /* @__PURE__ */React.createElement(ToastContainer, _objectSpread2({}, propsObject)));
|
|
54
54
|
if ((propsObject === null || propsObject === void 0 ? void 0 : propsObject.duration) > 0) {
|
|
55
55
|
setTimeout(function () {
|
|
56
56
|
removePortal(toastKey);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sources":["../../../../src/components/Toast/api.tsx"],"sourcesContent":["import React from \"react\";\nimport { RedsToast, ToastDefaultProps, ToastBuiltInType } from \"./interface\";\nimport ToastContainer from \"./Toast\";\nimport { usePortal } from \"../Portal\";\n\nlet toastKey: string;\n\nconst useToast = () => {\n const { addPortal, removePortal } = usePortal();\n\n const show = (props: RedsToast | string) => {\n let propsObject = {\n ...ToastDefaultProps,\n ...parseOptions(props),\n };\n\n if (toastKey) {\n removePortal(toastKey);\n }\n\n toastKey = Math.random().toString();\n addPortal(toastKey, <ToastContainer {...propsObject} />);\n\n if (propsObject?.duration > 0) {\n setTimeout(() => {\n removePortal(toastKey);\n }, propsObject.duration);\n }\n };\n\n const remove = () => removePortal(toastKey);\n\n const base = (type: ToastBuiltInType) => {\n return (props: string | RedsToast) => show({ ...(props as RedsToast), type });\n };\n\n return {\n show,\n remove,\n [ToastBuiltInType.ERROR]: base(ToastBuiltInType.ERROR),\n [ToastBuiltInType.LOADING]: base(ToastBuiltInType.LOADING),\n [ToastBuiltInType.SUCCESS]: base(ToastBuiltInType.SUCCESS),\n [ToastBuiltInType.PROGRESS]: base(ToastBuiltInType.PROGRESS),\n };\n};\n\nfunction parseOptions(message?: RedsToast | string) {\n if (typeof message === \"string\") {\n return { message };\n }\n return message;\n}\n\nexport default useToast;\n"],"names":["toastKey","useToast","_usePortal","usePortal","addPortal","removePortal","show","props","propsObject","_objectSpread","ToastDefaultProps","parseOptions","Math","random","toString","React","createElement","ToastContainer","duration","setTimeout","remove","base","type","_defineProperty","ToastBuiltInType","ERROR","LOADING","SUCCESS","PROGRESS","message"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,IAAIA,QAAA,CAAA;AAEJ,IAAMC,WAAW,SAAXA,WAAiB;AACrB,EAAA,IAAAC,UAAA,GAAoCC,SAAU,EAAA;IAAtCC,SAAA,GAAAF,UAAA,CAAAE,SAAA;IAAWC,YAAa,GAAAH,UAAA,CAAbG,YAAa,CAAA;AAE1B,EAAA,IAAAC,IAAA,GAAO,SAAPA,IAAAA,CAAQC,KAA8B,EAAA;AAC1C,IAAA,IAAIC,WAAc,GAAAC,cAAA,CAAAA,cAAA,CAAA,EAAA,EACbC,iBAAA,CAAA,EACAC,aAAaJ,KAAK,CAAA,CACvB,CAAA;AAEA,IAAA,IAAIP,QAAU,EAAA;MACZK,YAAA,CAAaL,QAAQ,CAAA,CAAA;AACvB,KAAA;IAEWA,QAAA,GAAAY,IAAA,CAAKC,MAAO,EAAA,CAAEC,QAAS,EAAA,CAAA;AAClCV,IAAAA,SAAA,CAAUJ,QAAU,iBAAAe,
|
|
1
|
+
{"version":3,"file":"api.js","sources":["../../../../src/components/Toast/api.tsx"],"sourcesContent":["import React from \"react\";\nimport { RedsToast, ToastDefaultProps, ToastBuiltInType } from \"./interface\";\nimport ToastContainer from \"./Toast\";\nimport { usePortal } from \"../Portal\";\n\nlet toastKey: string;\n\nconst useToast = () => {\n const { addPortal, removePortal } = usePortal();\n\n const show = (props: RedsToast | string) => {\n let propsObject = {\n ...ToastDefaultProps,\n ...parseOptions(props),\n };\n\n if (toastKey) {\n removePortal(toastKey);\n }\n\n toastKey = Math.random().toString();\n addPortal(toastKey, <ToastContainer {...propsObject} />);\n\n if (propsObject?.duration > 0) {\n setTimeout(() => {\n removePortal(toastKey);\n }, propsObject.duration);\n }\n };\n\n const remove = () => removePortal(toastKey);\n\n const base = (type: ToastBuiltInType) => {\n return (props: string | RedsToast) => show({ ...(props as RedsToast), type });\n };\n\n return {\n show,\n remove,\n [ToastBuiltInType.ERROR]: base(ToastBuiltInType.ERROR),\n [ToastBuiltInType.LOADING]: base(ToastBuiltInType.LOADING),\n [ToastBuiltInType.SUCCESS]: base(ToastBuiltInType.SUCCESS),\n [ToastBuiltInType.PROGRESS]: base(ToastBuiltInType.PROGRESS),\n };\n};\n\nfunction parseOptions(message?: RedsToast | string) {\n if (typeof message === \"string\") {\n return { message };\n }\n return message;\n}\n\nexport default useToast;\n"],"names":["toastKey","useToast","_usePortal","usePortal","addPortal","removePortal","show","props","propsObject","_objectSpread","ToastDefaultProps","parseOptions","Math","random","toString","React","createElement","ToastContainer","duration","setTimeout","remove","base","type","_defineProperty","ToastBuiltInType","ERROR","LOADING","SUCCESS","PROGRESS","message"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,IAAIA,QAAA,CAAA;AAEJ,IAAMC,WAAW,SAAXA,WAAiB;AACrB,EAAA,IAAAC,UAAA,GAAoCC,SAAU,EAAA;IAAtCC,SAAA,GAAAF,UAAA,CAAAE,SAAA;IAAWC,YAAa,GAAAH,UAAA,CAAbG,YAAa,CAAA;AAE1B,EAAA,IAAAC,IAAA,GAAO,SAAPA,IAAAA,CAAQC,KAA8B,EAAA;AAC1C,IAAA,IAAIC,WAAc,GAAAC,cAAA,CAAAA,cAAA,CAAA,EAAA,EACbC,iBAAA,CAAA,EACAC,aAAaJ,KAAK,CAAA,CACvB,CAAA;AAEA,IAAA,IAAIP,QAAU,EAAA;MACZK,YAAA,CAAaL,QAAQ,CAAA,CAAA;AACvB,KAAA;IAEWA,QAAA,GAAAY,IAAA,CAAKC,MAAO,EAAA,CAAEC,QAAS,EAAA,CAAA;AAClCV,IAAAA,SAAA,CAAUJ,QAAU,iBAAAe,KAAA,CAAAC,aAAA,CAACC,cAAgB,EAAAR,cAAA,CAAA,EAAA,EAAGD,YAAa,CAAE,CAAA,CAAA;IAEnD,IAAA,CAAAA,WAAA,KAAA,IAAA,IAAAA,WAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAAA,WAAA,CAAaU,YAAW,CAAG,EAAA;AAC7BC,MA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_objectSpread2 } from '../../_chunks/
|
|
1
|
+
import { b as _objectSpread2 } from '../../_chunks/Rk1G_m0d.js';
|
|
2
2
|
import { StyleSheet, Dimensions } from 'react-native';
|
|
3
3
|
import { T as ToastBuiltInType, b as ToastPlacementType } from '../../_chunks/C5vDf62k.js';
|
|
4
4
|
import { typography, alwaysColor } from '@xhsreds/reds-token-next';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as _slicedToArray, b as _objectSpread2, c as _asyncToGenerator, d as _regeneratorRuntime, a as _toConsumableArray } from '../../_chunks/
|
|
2
|
-
import
|
|
1
|
+
import { _ as _slicedToArray, b as _objectSpread2, c as _asyncToGenerator, d as _regeneratorRuntime, a as _toConsumableArray } from '../../_chunks/Rk1G_m0d.js';
|
|
2
|
+
import React, { useState, useMemo, useEffect } from 'react';
|
|
3
3
|
import { View, Image, TouchableWithoutFeedback, Text } from 'react-native';
|
|
4
4
|
import { invoke } from '@xhs/ozone-schema';
|
|
5
5
|
import { U as UploaderType, a as UploaderDefaultProps } from '../../_chunks/gVOr7Fuf.js';
|
|
@@ -261,34 +261,34 @@ var Uploader = function Uploader(props) {
|
|
|
261
261
|
return "https://picasso-static.xiaohongshu.com/fe-platform/e5021b86d9477351022f6f91e20e735e2074283f.png";
|
|
262
262
|
}
|
|
263
263
|
}, [colorMode]);
|
|
264
|
-
return props.type === UploaderType.NORMAL ? /* @__PURE__ */
|
|
264
|
+
return props.type === UploaderType.NORMAL ? /* @__PURE__ */React.createElement(View, {
|
|
265
265
|
style: styles.container
|
|
266
266
|
}, props === null || props === void 0 || (_props$value7 = props.value) === null || _props$value7 === void 0 ? void 0 : _props$value7.map(function (item, index$1) {
|
|
267
|
-
return /* @__PURE__ */
|
|
267
|
+
return /* @__PURE__ */React.createElement(View, {
|
|
268
268
|
key: index$1,
|
|
269
269
|
style: styles.imageView
|
|
270
|
-
}, /* @__PURE__ */
|
|
270
|
+
}, /* @__PURE__ */React.createElement(Image, {
|
|
271
271
|
source: {
|
|
272
272
|
uri: item.content || item.url
|
|
273
273
|
},
|
|
274
274
|
style: styles.image
|
|
275
|
-
}), /* @__PURE__ */
|
|
275
|
+
}), /* @__PURE__ */React.createElement(TouchableWithoutFeedback, {
|
|
276
276
|
onPress: function onPress() {
|
|
277
277
|
return deleteFile(item, index$1);
|
|
278
278
|
}
|
|
279
|
-
}, /* @__PURE__ */
|
|
279
|
+
}, /* @__PURE__ */React.createElement(View, {
|
|
280
280
|
style: styles.closeImageContainer
|
|
281
|
-
}, /* @__PURE__ */
|
|
281
|
+
}, /* @__PURE__ */React.createElement(Image, {
|
|
282
282
|
style: styles.close,
|
|
283
283
|
source: {
|
|
284
284
|
uri: closeImage
|
|
285
285
|
}
|
|
286
|
-
}))), item.status && item.status !== "success" ? /* @__PURE__ */
|
|
286
|
+
}))), item.status && item.status !== "success" ? /* @__PURE__ */React.createElement(View, {
|
|
287
287
|
style: styles.progressIndicator
|
|
288
|
-
}, item.status === "initial" ? /* @__PURE__ */
|
|
288
|
+
}, item.status === "initial" ? /* @__PURE__ */React.createElement(ProgressIndicator, {
|
|
289
289
|
size: 18,
|
|
290
290
|
strokeColor: "#fff"
|
|
291
|
-
}) : /* @__PURE__ */
|
|
291
|
+
}) : /* @__PURE__ */React.createElement(React.Fragment, null), item.status === "uploading" ? /* @__PURE__ */React.createElement(ProgressIndicator, {
|
|
292
292
|
size: item.statusNumber === void 0 ? 18 : 40,
|
|
293
293
|
showPercent: !!item.statusNumber,
|
|
294
294
|
type: "progress",
|
|
@@ -298,72 +298,72 @@ var Uploader = function Uploader(props) {
|
|
|
298
298
|
color: "#fff",
|
|
299
299
|
fontSize: 10
|
|
300
300
|
}
|
|
301
|
-
}) : /* @__PURE__ */
|
|
301
|
+
}) : /* @__PURE__ */React.createElement(React.Fragment, null), item.status === "failed" ? /* @__PURE__ */React.createElement(Icon, {
|
|
302
302
|
icon: CloseClear,
|
|
303
303
|
size: 24,
|
|
304
304
|
type: iconType.image
|
|
305
|
-
}) : /* @__PURE__ */
|
|
305
|
+
}) : /* @__PURE__ */React.createElement(React.Fragment, null), /* @__PURE__ */React.createElement(Text, {
|
|
306
306
|
style: styles.progressDesc
|
|
307
|
-
}, item.status === "failed" ? "\u4E0A\u4F20\u5931\u8D25" : "\u4E0A\u4F20\u4E2D...")) : /* @__PURE__ */
|
|
308
|
-
}), !hideInput ? /* @__PURE__ */
|
|
307
|
+
}, item.status === "failed" ? "\u4E0A\u4F20\u5931\u8D25" : "\u4E0A\u4F20\u4E2D...")) : /* @__PURE__ */React.createElement(React.Fragment, null));
|
|
308
|
+
}), !hideInput ? /* @__PURE__ */React.createElement(TouchableWithoutFeedback, {
|
|
309
309
|
onPress: function onPress() {
|
|
310
310
|
return onChange();
|
|
311
311
|
}
|
|
312
|
-
}, /* @__PURE__ */
|
|
312
|
+
}, /* @__PURE__ */React.createElement(View, {
|
|
313
313
|
style: styles.upload
|
|
314
|
-
}, /* @__PURE__ */
|
|
314
|
+
}, /* @__PURE__ */React.createElement(View, {
|
|
315
315
|
style: styles.column
|
|
316
|
-
}, /* @__PURE__ */
|
|
316
|
+
}, /* @__PURE__ */React.createElement(Image, {
|
|
317
317
|
style: styles.add,
|
|
318
318
|
source: {
|
|
319
319
|
uri: uploadImage
|
|
320
320
|
}
|
|
321
|
-
}), desc ? /* @__PURE__ */
|
|
321
|
+
}), desc ? /* @__PURE__ */React.createElement(View, {
|
|
322
322
|
style: styles.descContainer
|
|
323
|
-
}, /* @__PURE__ */
|
|
323
|
+
}, /* @__PURE__ */React.createElement(Text, {
|
|
324
324
|
style: styles.desc
|
|
325
|
-
}, desc)) : /* @__PURE__ */
|
|
325
|
+
}, desc)) : /* @__PURE__ */React.createElement(React.Fragment, null)))) : /* @__PURE__ */React.createElement(React.Fragment, null)) : /* @__PURE__ */React.createElement(View, {
|
|
326
326
|
style: styles.container
|
|
327
327
|
}, identityList.map(function (item, index$1) {
|
|
328
|
-
return /* @__PURE__ */
|
|
328
|
+
return /* @__PURE__ */React.createElement(View, {
|
|
329
329
|
key: index$1,
|
|
330
330
|
style: styles.identityView
|
|
331
|
-
}, item.content || item.url ? /* @__PURE__ */
|
|
331
|
+
}, item.content || item.url ? /* @__PURE__ */React.createElement(React.Fragment, null, /* @__PURE__ */React.createElement(Image, {
|
|
332
332
|
source: {
|
|
333
333
|
uri: item.content || item.url
|
|
334
334
|
},
|
|
335
335
|
style: styles.identityImage
|
|
336
|
-
}), /* @__PURE__ */
|
|
336
|
+
}), /* @__PURE__ */React.createElement(TouchableWithoutFeedback, {
|
|
337
337
|
onPress: function onPress() {
|
|
338
338
|
return deleteFile(item, index$1);
|
|
339
339
|
}
|
|
340
|
-
}, /* @__PURE__ */
|
|
340
|
+
}, /* @__PURE__ */React.createElement(View, {
|
|
341
341
|
style: styles.closeImageContainer
|
|
342
|
-
}, /* @__PURE__ */
|
|
342
|
+
}, /* @__PURE__ */React.createElement(Image, {
|
|
343
343
|
style: styles.close,
|
|
344
344
|
source: {
|
|
345
345
|
uri: closeImage
|
|
346
346
|
}
|
|
347
|
-
})))) : /* @__PURE__ */
|
|
347
|
+
})))) : /* @__PURE__ */React.createElement(TouchableWithoutFeedback, {
|
|
348
348
|
onPress: function onPress() {
|
|
349
349
|
return onChange();
|
|
350
350
|
}
|
|
351
|
-
}, /* @__PURE__ */
|
|
351
|
+
}, /* @__PURE__ */React.createElement(View, {
|
|
352
352
|
style: styles.identityUpload
|
|
353
|
-
}, /* @__PURE__ */
|
|
353
|
+
}, /* @__PURE__ */React.createElement(View, {
|
|
354
354
|
style: styles.column
|
|
355
|
-
}, /* @__PURE__ */
|
|
355
|
+
}, /* @__PURE__ */React.createElement(Icon, {
|
|
356
356
|
type: iconType.image,
|
|
357
357
|
size: 24,
|
|
358
358
|
icon: User
|
|
359
|
-
}), /* @__PURE__ */
|
|
359
|
+
}), /* @__PURE__ */React.createElement(Text, {
|
|
360
360
|
style: styles.identifyDesc
|
|
361
|
-
}, item.desc)))), item.status && item.status !== "success" ? /* @__PURE__ */
|
|
361
|
+
}, item.desc)))), item.status && item.status !== "success" ? /* @__PURE__ */React.createElement(View, {
|
|
362
362
|
style: styles.identityProgressIndicator
|
|
363
|
-
}, item.status === "initial" ? /* @__PURE__ */
|
|
363
|
+
}, item.status === "initial" ? /* @__PURE__ */React.createElement(ProgressIndicator, {
|
|
364
364
|
size: 18,
|
|
365
365
|
strokeColor: "#fff"
|
|
366
|
-
}) : /* @__PURE__ */
|
|
366
|
+
}) : /* @__PURE__ */React.createElement(React.Fragment, null), item.status === "uploading" ? /* @__PURE__ */React.createElement(ProgressIndicator, {
|
|
367
367
|
size: item.statusNumber === void 0 ? 18 : 40,
|
|
368
368
|
showPercent: !!item.statusNumber,
|
|
369
369
|
type: "progress",
|
|
@@ -373,13 +373,13 @@ var Uploader = function Uploader(props) {
|
|
|
373
373
|
color: "#fff",
|
|
374
374
|
fontSize: 10
|
|
375
375
|
}
|
|
376
|
-
}) : /* @__PURE__ */
|
|
376
|
+
}) : /* @__PURE__ */React.createElement(React.Fragment, null), item.status === "failed" ? /* @__PURE__ */React.createElement(Icon, {
|
|
377
377
|
icon: CloseClear,
|
|
378
378
|
size: 24,
|
|
379
379
|
type: iconType.image
|
|
380
|
-
}) : /* @__PURE__ */
|
|
380
|
+
}) : /* @__PURE__ */React.createElement(React.Fragment, null), /* @__PURE__ */React.createElement(Text, {
|
|
381
381
|
style: styles.progressDesc
|
|
382
|
-
}, item.status === "failed" ? "\u4E0A\u4F20\u5931\u8D25" : "\u4E0A\u4F20\u4E2D...")) : /* @__PURE__ */
|
|
382
|
+
}, item.status === "failed" ? "\u4E0A\u4F20\u5931\u8D25" : "\u4E0A\u4F20\u4E2D...")) : /* @__PURE__ */React.createElement(React.Fragment, null));
|
|
383
383
|
}));
|
|
384
384
|
};
|
|
385
385
|
Uploader.defaultProps = UploaderDefaultProps;
|