naive-ui 2.31.0 → 2.32.0
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/dist/index.js +3197 -1769
- package/dist/index.prod.js +1 -1
- package/es/_internal/scrollbar/src/Scrollbar.d.ts +5 -0
- package/es/_internal/scrollbar/src/Scrollbar.js +49 -26
- package/es/_internal/scrollbar/src/styles/index.cssr.js +1 -1
- package/es/_internal/scrollbar/src/styles/rtl.cssr.d.ts +2 -0
- package/es/_internal/scrollbar/src/styles/rtl.cssr.js +10 -0
- package/es/_internal/scrollbar/styles/index.d.ts +1 -0
- package/es/_internal/scrollbar/styles/index.js +1 -0
- package/es/_internal/scrollbar/styles/rtl.d.ts +3 -0
- package/es/_internal/scrollbar/styles/rtl.js +6 -0
- package/es/_internal/selection/src/Selection.js +4 -2
- package/es/_internal/selection/src/styles/index.cssr.js +4 -1
- package/es/_mixins/index.d.ts +1 -0
- package/es/_mixins/index.js +1 -0
- package/es/_utils/naive/extract-public-props.d.ts +4 -1
- package/es/auto-complete/src/AutoComplete.d.ts +1 -0
- package/es/avatar/src/Avatar.d.ts +0 -1
- package/es/avatar/src/Avatar.js +12 -10
- package/es/button/src/Button.js +3 -0
- package/es/carousel/src/Carousel.d.ts +16 -37
- package/es/carousel/src/Carousel.js +269 -272
- package/es/carousel/src/CarouselArrow.js +3 -5
- package/es/carousel/src/CarouselContext.d.ts +21 -0
- package/es/carousel/src/CarouselContext.js +11 -0
- package/es/carousel/src/CarouselDots.d.ts +1 -1
- package/es/carousel/src/CarouselDots.js +23 -31
- package/es/carousel/src/CarouselItem.d.ts +4 -4
- package/es/carousel/src/CarouselItem.js +17 -36
- package/es/carousel/src/interface.d.ts +12 -31
- package/es/carousel/src/interface.js +1 -3
- package/es/carousel/src/styles/index.cssr.js +8 -3
- package/es/carousel/src/{utils.d.ts → utils/duplicatedLogic.d.ts} +3 -8
- package/es/carousel/src/utils/duplicatedLogic.js +46 -0
- package/es/carousel/src/utils/event.d.ts +1 -0
- package/es/carousel/src/utils/event.js +3 -0
- package/es/carousel/src/utils/index.d.ts +6 -0
- package/es/carousel/src/{utils.js → utils/index.js} +3 -28
- package/es/checkbox/src/CheckboxGroup.d.ts +27 -22
- package/es/checkbox/src/CheckboxGroup.js +58 -28
- package/es/code/src/Code.d.ts +16 -0
- package/es/code/src/Code.js +53 -12
- package/es/code/src/styles/index.cssr.js +14 -2
- package/es/code/styles/dark.js +4 -2
- package/es/code/styles/light.d.ts +1 -0
- package/es/code/styles/light.js +4 -2
- package/es/components.d.ts +1 -0
- package/es/components.js +1 -0
- package/es/config-provider/src/ConfigProvider.d.ts +24 -3
- package/es/config-provider/src/internal-interface.d.ts +4 -0
- package/es/date-picker/src/DatePicker.d.ts +1 -0
- package/es/date-picker/src/panel/daterange.d.ts +0 -1
- package/es/date-picker/src/panel/daterange.js +1 -1
- package/es/date-picker/src/panel/datetimerange.d.ts +0 -1
- package/es/date-picker/src/panel/datetimerange.js +1 -1
- package/es/date-picker/src/panel/monthrange.d.ts +0 -1
- package/es/date-picker/src/panel/monthrange.js +1 -1
- package/es/date-picker/src/panel/use-dual-calendar.d.ts +0 -1
- package/es/date-picker/src/panel/use-dual-calendar.js +0 -11
- package/es/dialog/src/DialogEnvironment.d.ts +4 -0
- package/es/dialog/src/DialogEnvironment.js +11 -4
- package/es/dialog/src/DialogProvider.d.ts +1 -0
- package/es/dynamic-tags/src/DynamicTags.d.ts +1 -0
- package/es/image/src/utils.d.ts +1 -1
- package/es/input/src/Input.d.ts +1 -0
- package/es/input/src/Input.js +19 -8
- package/es/input/src/interface.d.ts +1 -0
- package/es/input/src/styles/input.cssr.js +1 -6
- package/es/input-number/src/InputNumber.d.ts +1 -0
- package/es/input-number/src/InputNumber.js +4 -0
- package/es/legacy-grid/src/Row.d.ts +1 -0
- package/es/legacy-grid/src/Row.js +8 -3
- package/es/legacy-grid/src/styles/rtl.cssr.d.ts +2 -0
- package/es/legacy-grid/src/styles/rtl.cssr.js +21 -0
- package/es/legacy-grid/styles/dark.d.ts +4 -0
- package/es/legacy-grid/styles/dark.js +6 -0
- package/es/legacy-grid/styles/index.d.ts +4 -0
- package/es/legacy-grid/styles/index.js +3 -0
- package/es/legacy-grid/styles/light.d.ts +4 -0
- package/es/legacy-grid/styles/light.js +6 -0
- package/es/legacy-grid/styles/rtl.d.ts +2 -0
- package/es/legacy-grid/styles/rtl.js +5 -0
- package/es/legacy-transfer/index.d.ts +3 -0
- package/es/legacy-transfer/index.js +1 -0
- package/es/legacy-transfer/src/Transfer.d.ts +3631 -0
- package/es/legacy-transfer/src/Transfer.js +214 -0
- package/es/legacy-transfer/src/TransferFilter.d.ts +509 -0
- package/es/legacy-transfer/src/TransferFilter.js +40 -0
- package/es/legacy-transfer/src/TransferHeader.d.ts +25 -0
- package/es/legacy-transfer/src/TransferHeader.js +47 -0
- package/es/legacy-transfer/src/TransferList.d.ts +556 -0
- package/es/legacy-transfer/src/TransferList.js +93 -0
- package/es/legacy-transfer/src/TransferListItem.d.ts +513 -0
- package/es/legacy-transfer/src/TransferListItem.js +65 -0
- package/es/legacy-transfer/src/interface.d.ts +31 -0
- package/es/legacy-transfer/src/interface.js +2 -0
- package/es/legacy-transfer/src/styles/index.cssr.d.ts +2 -0
- package/es/legacy-transfer/src/styles/index.cssr.js +215 -0
- package/es/legacy-transfer/src/use-transfer-data.d.ts +41 -0
- package/es/legacy-transfer/src/use-transfer-data.js +145 -0
- package/es/legacy-transfer/styles/_common.d.ts +5 -0
- package/es/legacy-transfer/styles/_common.js +4 -0
- package/es/legacy-transfer/styles/dark.d.ts +3 -0
- package/es/legacy-transfer/styles/dark.js +27 -0
- package/es/legacy-transfer/styles/index.d.ts +3 -0
- package/es/legacy-transfer/styles/index.js +2 -0
- package/es/legacy-transfer/styles/light.d.ts +363 -0
- package/es/legacy-transfer/styles/light.js +31 -0
- package/es/locales/common/deDE.js +11 -6
- package/es/locales/common/enGB.js +8 -1
- package/es/locales/common/enUS.d.ts +8 -1
- package/es/locales/common/enUS.js +8 -1
- package/es/locales/common/eo.js +10 -2
- package/es/locales/common/esAR.js +9 -1
- package/es/locales/common/frFR.js +9 -1
- package/es/locales/common/idID.js +9 -1
- package/es/locales/common/itIT.js +9 -1
- package/es/locales/common/jaJP.js +9 -1
- package/es/locales/common/koKR.js +9 -1
- package/es/locales/common/nbNO.js +9 -1
- package/es/locales/common/nlNL.js +9 -1
- package/es/locales/common/plPL.js +9 -1
- package/es/locales/common/ptBR.js +9 -1
- package/es/locales/common/ruRU.js +9 -1
- package/es/locales/common/skSK.js +9 -1
- package/es/locales/common/thTH.js +9 -1
- package/es/locales/common/ukUA.js +9 -1
- package/es/locales/common/viVN.js +9 -1
- package/es/locales/common/zhCN.js +8 -1
- package/es/locales/common/zhTW.js +9 -1
- package/es/log/src/Log.d.ts +10 -0
- package/es/log/styles/light.d.ts +1 -0
- package/es/mention/src/Mention.d.ts +1 -0
- package/es/notification/src/Notification.d.ts +11 -1
- package/es/notification/src/Notification.js +6 -4
- package/es/notification/src/NotificationEnvironment.d.ts +12 -0
- package/es/notification/src/NotificationEnvironment.js +27 -2
- package/es/notification/src/NotificationProvider.d.ts +7 -0
- package/es/notification/src/NotificationProvider.js +4 -2
- package/es/pagination/src/Pagination.d.ts +1 -0
- package/es/progress/src/Circle.js +3 -1
- package/es/select/src/Select.js +3 -0
- package/es/statistic/src/Statistic.d.ts +1 -0
- package/es/statistic/src/Statistic.js +9 -3
- package/es/statistic/src/styles/rtl.cssr.d.ts +2 -0
- package/es/statistic/src/styles/rtl.cssr.js +9 -0
- package/es/statistic/styles/index.d.ts +1 -0
- package/es/statistic/styles/index.js +1 -0
- package/es/statistic/styles/rtl.d.ts +2 -0
- package/es/statistic/styles/rtl.js +5 -0
- package/es/styles.d.ts +6 -3
- package/es/styles.js +6 -3
- package/es/themes/dark.js +4 -0
- package/es/themes/light.js +4 -0
- package/es/thing/src/Thing.js +9 -3
- package/es/thing/src/styles/rtl.cssr.d.ts +2 -0
- package/es/thing/src/styles/rtl.cssr.js +8 -0
- package/es/thing/styles/index.d.ts +1 -0
- package/es/thing/styles/index.js +1 -0
- package/es/thing/styles/rtl.d.ts +2 -0
- package/es/thing/styles/rtl.js +8 -0
- package/es/time-picker/src/TimePicker.d.ts +1 -0
- package/es/transfer/index.d.ts +1 -1
- package/es/transfer/src/Transfer.d.ts +210 -90
- package/es/transfer/src/Transfer.js +67 -106
- package/es/transfer/src/TransferFilter.d.ts +18 -21
- package/es/transfer/src/TransferFilter.js +2 -10
- package/es/transfer/src/TransferHeader.d.ts +10 -12
- package/es/transfer/src/TransferHeader.js +24 -29
- package/es/transfer/src/TransferList.d.ts +20 -29
- package/es/transfer/src/TransferList.js +15 -32
- package/es/transfer/src/TransferListItem.d.ts +32 -19
- package/es/transfer/src/TransferListItem.js +33 -29
- package/es/transfer/src/interface.d.ts +21 -15
- package/es/transfer/src/styles/index.cssr.js +75 -139
- package/es/transfer/src/use-transfer-data.d.ts +13 -31
- package/es/transfer/src/use-transfer-data.js +45 -121
- package/es/transfer/styles/_common.d.ts +11 -2
- package/es/transfer/styles/_common.js +11 -2
- package/es/transfer/styles/dark.js +8 -4
- package/es/transfer/styles/light.d.ts +36 -10
- package/es/transfer/styles/light.js +7 -5
- package/es/tree/src/Tree.d.ts +1 -0
- package/es/tree/src/Tree.js +22 -16
- package/es/tree/src/TreeNode.d.ts +1 -0
- package/es/tree/src/TreeNode.js +5 -3
- package/es/tree/src/styles/rtl.cssr.d.ts +2 -0
- package/es/tree/src/styles/rtl.cssr.js +17 -0
- package/es/tree/styles/index.d.ts +1 -0
- package/es/tree/styles/index.js +1 -0
- package/es/tree/styles/rtl.d.ts +2 -0
- package/es/tree/styles/rtl.js +5 -0
- package/es/upload/src/interface.d.ts +2 -2
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/es/watermark/src/Watermark.d.ts +13 -0
- package/es/watermark/src/Watermark.js +35 -14
- package/es/watermark/src/styles/index.cssr.js +13 -0
- package/lib/_internal/scrollbar/src/Scrollbar.d.ts +5 -0
- package/lib/_internal/scrollbar/src/Scrollbar.js +47 -24
- package/lib/_internal/scrollbar/src/styles/index.cssr.js +1 -1
- package/lib/_internal/scrollbar/src/styles/rtl.cssr.d.ts +2 -0
- package/lib/_internal/scrollbar/src/styles/rtl.cssr.js +17 -0
- package/lib/_internal/scrollbar/styles/index.d.ts +1 -0
- package/lib/_internal/scrollbar/styles/index.js +3 -1
- package/lib/_internal/scrollbar/styles/rtl.d.ts +3 -0
- package/lib/_internal/scrollbar/styles/rtl.js +12 -0
- package/lib/_internal/selection/src/Selection.js +4 -2
- package/lib/_internal/selection/src/styles/index.cssr.js +4 -1
- package/lib/_mixins/index.d.ts +1 -0
- package/lib/_mixins/index.js +3 -1
- package/lib/_utils/naive/extract-public-props.d.ts +4 -1
- package/lib/auto-complete/src/AutoComplete.d.ts +1 -0
- package/lib/avatar/src/Avatar.d.ts +0 -1
- package/lib/avatar/src/Avatar.js +12 -10
- package/lib/button/src/Button.js +3 -0
- package/lib/carousel/src/Carousel.d.ts +16 -37
- package/lib/carousel/src/Carousel.js +290 -270
- package/lib/carousel/src/CarouselArrow.js +2 -4
- package/lib/carousel/src/CarouselContext.d.ts +21 -0
- package/lib/carousel/src/CarouselContext.js +16 -0
- package/lib/carousel/src/CarouselDots.d.ts +1 -1
- package/lib/carousel/src/CarouselDots.js +22 -30
- package/lib/carousel/src/CarouselItem.d.ts +4 -4
- package/lib/carousel/src/CarouselItem.js +18 -35
- package/lib/carousel/src/interface.d.ts +12 -31
- package/lib/carousel/src/interface.js +0 -5
- package/lib/carousel/src/styles/index.cssr.js +8 -3
- package/lib/carousel/src/{utils.d.ts → utils/duplicatedLogic.d.ts} +3 -8
- package/lib/carousel/src/utils/duplicatedLogic.js +55 -0
- package/lib/carousel/src/utils/event.d.ts +1 -0
- package/lib/carousel/src/utils/event.js +7 -0
- package/lib/carousel/src/utils/index.d.ts +6 -0
- package/lib/carousel/src/utils/index.js +53 -0
- package/lib/checkbox/src/CheckboxGroup.d.ts +27 -22
- package/lib/checkbox/src/CheckboxGroup.js +56 -26
- package/lib/code/src/Code.d.ts +16 -0
- package/lib/code/src/Code.js +53 -12
- package/lib/code/src/styles/index.cssr.js +13 -1
- package/lib/code/styles/dark.js +4 -2
- package/lib/code/styles/light.d.ts +1 -0
- package/lib/code/styles/light.js +4 -2
- package/lib/components.d.ts +1 -0
- package/lib/components.js +1 -0
- package/lib/config-provider/src/ConfigProvider.d.ts +24 -3
- package/lib/config-provider/src/internal-interface.d.ts +4 -0
- package/lib/date-picker/src/DatePicker.d.ts +1 -0
- package/lib/date-picker/src/panel/daterange.d.ts +0 -1
- package/lib/date-picker/src/panel/daterange.js +1 -1
- package/lib/date-picker/src/panel/datetimerange.d.ts +0 -1
- package/lib/date-picker/src/panel/datetimerange.js +1 -1
- package/lib/date-picker/src/panel/monthrange.d.ts +0 -1
- package/lib/date-picker/src/panel/monthrange.js +1 -1
- package/lib/date-picker/src/panel/use-dual-calendar.d.ts +0 -1
- package/lib/date-picker/src/panel/use-dual-calendar.js +0 -11
- package/lib/dialog/src/DialogEnvironment.d.ts +4 -0
- package/lib/dialog/src/DialogEnvironment.js +11 -4
- package/lib/dialog/src/DialogProvider.d.ts +1 -0
- package/lib/dynamic-tags/src/DynamicTags.d.ts +1 -0
- package/lib/image/src/utils.d.ts +1 -1
- package/lib/input/src/Input.d.ts +1 -0
- package/lib/input/src/Input.js +19 -8
- package/lib/input/src/interface.d.ts +1 -0
- package/lib/input/src/styles/input.cssr.js +1 -6
- package/lib/input-number/src/InputNumber.d.ts +1 -0
- package/lib/input-number/src/InputNumber.js +4 -0
- package/lib/legacy-grid/src/Row.d.ts +1 -0
- package/lib/legacy-grid/src/Row.js +7 -2
- package/lib/legacy-grid/src/styles/rtl.cssr.d.ts +2 -0
- package/lib/legacy-grid/src/styles/rtl.cssr.js +28 -0
- package/lib/legacy-grid/styles/dark.d.ts +4 -0
- package/lib/legacy-grid/styles/dark.js +8 -0
- package/lib/legacy-grid/styles/index.d.ts +4 -0
- package/lib/legacy-grid/styles/index.js +12 -0
- package/lib/legacy-grid/styles/light.d.ts +4 -0
- package/lib/legacy-grid/styles/light.js +8 -0
- package/lib/legacy-grid/styles/rtl.d.ts +2 -0
- package/lib/legacy-grid/styles/rtl.js +11 -0
- package/lib/legacy-transfer/index.d.ts +3 -0
- package/lib/legacy-transfer/index.js +9 -0
- package/lib/legacy-transfer/src/Transfer.d.ts +3631 -0
- package/lib/legacy-transfer/src/Transfer.js +220 -0
- package/lib/legacy-transfer/src/TransferFilter.d.ts +509 -0
- package/lib/legacy-transfer/src/TransferFilter.js +42 -0
- package/lib/legacy-transfer/src/TransferHeader.d.ts +25 -0
- package/lib/legacy-transfer/src/TransferHeader.js +49 -0
- package/lib/legacy-transfer/src/TransferList.d.ts +556 -0
- package/lib/legacy-transfer/src/TransferList.js +98 -0
- package/lib/legacy-transfer/src/TransferListItem.d.ts +513 -0
- package/lib/legacy-transfer/src/TransferListItem.js +67 -0
- package/lib/legacy-transfer/src/interface.d.ts +31 -0
- package/lib/legacy-transfer/src/interface.js +5 -0
- package/lib/legacy-transfer/src/styles/index.cssr.d.ts +2 -0
- package/lib/legacy-transfer/src/styles/index.cssr.js +223 -0
- package/lib/legacy-transfer/src/use-transfer-data.d.ts +41 -0
- package/lib/legacy-transfer/src/use-transfer-data.js +149 -0
- package/lib/legacy-transfer/styles/_common.d.ts +5 -0
- package/lib/legacy-transfer/styles/_common.js +6 -0
- package/lib/legacy-transfer/styles/dark.d.ts +3 -0
- package/lib/legacy-transfer/styles/dark.js +32 -0
- package/lib/legacy-transfer/styles/index.d.ts +3 -0
- package/lib/legacy-transfer/styles/index.js +10 -0
- package/lib/legacy-transfer/styles/light.d.ts +363 -0
- package/lib/legacy-transfer/styles/light.js +36 -0
- package/lib/locales/common/deDE.js +11 -6
- package/lib/locales/common/enGB.js +8 -1
- package/lib/locales/common/enUS.d.ts +8 -1
- package/lib/locales/common/enUS.js +8 -1
- package/lib/locales/common/eo.js +10 -2
- package/lib/locales/common/esAR.js +9 -1
- package/lib/locales/common/frFR.js +9 -1
- package/lib/locales/common/idID.js +9 -1
- package/lib/locales/common/itIT.js +9 -1
- package/lib/locales/common/jaJP.js +9 -1
- package/lib/locales/common/koKR.js +9 -1
- package/lib/locales/common/nbNO.js +9 -1
- package/lib/locales/common/nlNL.js +9 -1
- package/lib/locales/common/plPL.js +9 -1
- package/lib/locales/common/ptBR.js +9 -1
- package/lib/locales/common/ruRU.js +9 -1
- package/lib/locales/common/skSK.js +9 -1
- package/lib/locales/common/thTH.js +9 -1
- package/lib/locales/common/ukUA.js +9 -1
- package/lib/locales/common/viVN.js +9 -1
- package/lib/locales/common/zhCN.js +8 -1
- package/lib/locales/common/zhTW.js +9 -1
- package/lib/log/src/Log.d.ts +10 -0
- package/lib/log/styles/light.d.ts +1 -0
- package/lib/mention/src/Mention.d.ts +1 -0
- package/lib/notification/src/Notification.d.ts +11 -1
- package/lib/notification/src/Notification.js +6 -4
- package/lib/notification/src/NotificationEnvironment.d.ts +12 -0
- package/lib/notification/src/NotificationEnvironment.js +27 -2
- package/lib/notification/src/NotificationProvider.d.ts +7 -0
- package/lib/notification/src/NotificationProvider.js +4 -2
- package/lib/pagination/src/Pagination.d.ts +1 -0
- package/lib/progress/src/Circle.js +3 -1
- package/lib/select/src/Select.js +3 -0
- package/lib/statistic/src/Statistic.d.ts +1 -0
- package/lib/statistic/src/Statistic.js +8 -2
- package/lib/statistic/src/styles/rtl.cssr.d.ts +2 -0
- package/lib/statistic/src/styles/rtl.cssr.js +16 -0
- package/lib/statistic/styles/index.d.ts +1 -0
- package/lib/statistic/styles/index.js +3 -1
- package/lib/statistic/styles/rtl.d.ts +2 -0
- package/lib/statistic/styles/rtl.js +11 -0
- package/lib/styles.d.ts +6 -3
- package/lib/styles.js +151 -142
- package/lib/themes/dark.js +82 -78
- package/lib/themes/light.js +82 -78
- package/lib/thing/src/Thing.js +8 -2
- package/lib/thing/src/styles/rtl.cssr.d.ts +2 -0
- package/lib/thing/src/styles/rtl.cssr.js +15 -0
- package/lib/thing/styles/index.d.ts +1 -0
- package/lib/thing/styles/index.js +3 -1
- package/lib/thing/styles/rtl.d.ts +2 -0
- package/lib/thing/styles/rtl.js +14 -0
- package/lib/time-picker/src/TimePicker.d.ts +1 -0
- package/lib/transfer/index.d.ts +1 -1
- package/lib/transfer/src/Transfer.d.ts +210 -90
- package/lib/transfer/src/Transfer.js +63 -102
- package/lib/transfer/src/TransferFilter.d.ts +18 -21
- package/lib/transfer/src/TransferFilter.js +2 -10
- package/lib/transfer/src/TransferHeader.d.ts +10 -12
- package/lib/transfer/src/TransferHeader.js +23 -28
- package/lib/transfer/src/TransferList.d.ts +20 -29
- package/lib/transfer/src/TransferList.js +14 -31
- package/lib/transfer/src/TransferListItem.d.ts +32 -19
- package/lib/transfer/src/TransferListItem.js +33 -29
- package/lib/transfer/src/interface.d.ts +21 -15
- package/lib/transfer/src/styles/index.cssr.js +74 -139
- package/lib/transfer/src/use-transfer-data.d.ts +13 -31
- package/lib/transfer/src/use-transfer-data.js +44 -120
- package/lib/transfer/styles/_common.d.ts +11 -2
- package/lib/transfer/styles/_common.js +11 -2
- package/lib/transfer/styles/dark.js +8 -4
- package/lib/transfer/styles/light.d.ts +36 -10
- package/lib/transfer/styles/light.js +7 -5
- package/lib/tree/src/Tree.d.ts +1 -0
- package/lib/tree/src/Tree.js +21 -15
- package/lib/tree/src/TreeNode.d.ts +1 -0
- package/lib/tree/src/TreeNode.js +5 -3
- package/lib/tree/src/styles/rtl.cssr.d.ts +2 -0
- package/lib/tree/src/styles/rtl.cssr.js +24 -0
- package/lib/tree/styles/index.d.ts +1 -0
- package/lib/tree/styles/index.js +3 -1
- package/lib/tree/styles/rtl.d.ts +2 -0
- package/lib/tree/styles/rtl.js +11 -0
- package/lib/upload/src/interface.d.ts +2 -2
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/watermark/src/Watermark.d.ts +13 -0
- package/lib/watermark/src/Watermark.js +34 -13
- package/lib/watermark/src/styles/index.cssr.js +13 -0
- package/package.json +4 -3
- package/volar.d.ts +1 -0
- package/web-types.json +183 -1
- package/lib/carousel/src/utils.js +0 -69
|
@@ -4,145 +4,69 @@ exports.useTransferData = void 0;
|
|
|
4
4
|
const vue_1 = require("vue");
|
|
5
5
|
const vooks_1 = require("vooks");
|
|
6
6
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
7
|
-
function useTransferData(props
|
|
7
|
+
function useTransferData(props) {
|
|
8
8
|
const uncontrolledValueRef = (0, vue_1.ref)(props.defaultValue);
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const optMapRef = (0, vue_1.computed)(() => {
|
|
9
|
+
const mergedValueRef = (0, vooks_1.useMergedState)((0, vue_1.toRef)(props, 'value'), uncontrolledValueRef);
|
|
10
|
+
const optionsMapRef = (0, vue_1.computed)(() => {
|
|
12
11
|
const map = new Map();
|
|
13
12
|
(props.options || []).forEach((opt) => map.set(opt.value, opt));
|
|
14
13
|
return map;
|
|
15
14
|
});
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
return (mergedValueRef.value || []).map((v) => optMap.get(v));
|
|
15
|
+
const targetValueSetRef = (0, vue_1.computed)(() => new Set(mergedValueRef.value || []));
|
|
16
|
+
const targetOptionsRef = (0, vue_1.computed)(() => {
|
|
17
|
+
const optionMap = optionsMapRef.value;
|
|
18
|
+
return (mergedValueRef.value || []).map((v) => optionMap.get(v));
|
|
21
19
|
});
|
|
22
20
|
const srcPatternRef = (0, vue_1.ref)('');
|
|
23
|
-
const
|
|
24
|
-
const filteredSrcOptsRef = (0, vue_1.computed)(() => {
|
|
21
|
+
const filteredSrcOptionsRef = (0, vue_1.computed)(() => {
|
|
25
22
|
if (!props.filterable)
|
|
26
|
-
return
|
|
23
|
+
return props.options;
|
|
27
24
|
const { filter } = props;
|
|
28
|
-
return
|
|
25
|
+
return props.options.filter((opt) => filter(srcPatternRef.value, opt));
|
|
29
26
|
});
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
return
|
|
27
|
+
const mergedValueSetRef = (0, vue_1.computed)(() => {
|
|
28
|
+
const { value } = mergedValueRef;
|
|
29
|
+
if (value === null)
|
|
30
|
+
return new Set();
|
|
31
|
+
return new Set(value);
|
|
35
32
|
});
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
.map((opt) => opt.value)));
|
|
42
|
-
const srcCheckedValuesRef = (0, vue_1.ref)([]);
|
|
43
|
-
const tgtCheckedValuesRef = (0, vue_1.ref)([]);
|
|
44
|
-
const srcCheckedStatusRef = (0, vue_1.computed)(() => {
|
|
45
|
-
const srcCheckedLength = srcCheckedValuesRef.value.filter((v) => avlSrcValueSetRef.value.has(v)).length;
|
|
46
|
-
const avlValueCount = avlSrcValueSetRef.value.size;
|
|
47
|
-
if (avlValueCount === 0) {
|
|
48
|
-
return {
|
|
49
|
-
checked: false,
|
|
50
|
-
indeterminate: false,
|
|
51
|
-
disabled: true
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
else if (srcCheckedLength === 0) {
|
|
55
|
-
return {
|
|
56
|
-
checked: false,
|
|
57
|
-
indeterminate: false
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
else if (srcCheckedLength === avlValueCount) {
|
|
61
|
-
return {
|
|
62
|
-
checked: true,
|
|
63
|
-
indeterminate: false
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
return {
|
|
68
|
-
checked: false,
|
|
69
|
-
indeterminate: true
|
|
70
|
-
};
|
|
71
|
-
}
|
|
33
|
+
const valueSetForSelectAllRef = (0, vue_1.computed)(() => {
|
|
34
|
+
const mergedValueSet = mergedValueSetRef.value;
|
|
35
|
+
return new Set(filteredSrcOptionsRef.value
|
|
36
|
+
.filter((option) => !option.disabled || mergedValueSet.has(option.value))
|
|
37
|
+
.map((option) => option.value));
|
|
72
38
|
});
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
checked: false,
|
|
79
|
-
indeterminate: false,
|
|
80
|
-
disabled: true
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
else if (tgtCheckedLength === 0) {
|
|
84
|
-
return {
|
|
85
|
-
checked: false,
|
|
86
|
-
indeterminate: false
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
else if (tgtCheckedLength === avlValueCount) {
|
|
90
|
-
return {
|
|
91
|
-
checked: true,
|
|
92
|
-
indeterminate: false
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
return {
|
|
97
|
-
checked: false,
|
|
98
|
-
indeterminate: true
|
|
99
|
-
};
|
|
100
|
-
}
|
|
39
|
+
const valueSetForUnselectAllRef = (0, vue_1.computed)(() => new Set(targetOptionsRef.value
|
|
40
|
+
.filter((option) => option.disabled)
|
|
41
|
+
.map((option) => option.value)));
|
|
42
|
+
const canNotSelectAnythingRef = (0, vue_1.computed)(() => {
|
|
43
|
+
return filteredSrcOptionsRef.value.every((option) => option.disabled);
|
|
101
44
|
});
|
|
102
|
-
const
|
|
103
|
-
if (
|
|
104
|
-
return
|
|
105
|
-
|
|
45
|
+
const allCheckedRef = (0, vue_1.computed)(() => {
|
|
46
|
+
if (!filteredSrcOptionsRef.value.length) {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
const mergedValueSet = mergedValueSetRef.value;
|
|
50
|
+
return filteredSrcOptionsRef.value.every((option) => option.disabled || mergedValueSet.has(option.value));
|
|
106
51
|
});
|
|
107
|
-
const
|
|
108
|
-
|
|
109
|
-
return true;
|
|
110
|
-
return srcCheckedValuesRef.value.length === 0;
|
|
52
|
+
const canBeClearedRef = (0, vue_1.computed)(() => {
|
|
53
|
+
return targetOptionsRef.value.some((option) => !option.disabled);
|
|
111
54
|
});
|
|
112
|
-
const isInputingRef = (0, vue_1.ref)(false);
|
|
113
|
-
function handleInputFocus() {
|
|
114
|
-
isInputingRef.value = true;
|
|
115
|
-
}
|
|
116
|
-
function handleInputBlur() {
|
|
117
|
-
isInputingRef.value = false;
|
|
118
|
-
}
|
|
119
55
|
function handleSrcFilterUpdateValue(value) {
|
|
120
56
|
srcPatternRef.value = value !== null && value !== void 0 ? value : '';
|
|
121
57
|
}
|
|
122
|
-
function handleTgtFilterUpdateValue(value) {
|
|
123
|
-
tgtPatternRef.value = value !== null && value !== void 0 ? value : '';
|
|
124
|
-
}
|
|
125
58
|
return {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
tgtCheckedStatus: tgtCheckedStatusRef,
|
|
138
|
-
srcPattern: srcPatternRef,
|
|
139
|
-
tgtPattern: tgtPatternRef,
|
|
140
|
-
isInputing: isInputingRef,
|
|
141
|
-
fromButtonDisabled: fromButtonDisabledRef,
|
|
142
|
-
toButtonDisabled: toButtonDisabledRef,
|
|
143
|
-
handleInputFocus,
|
|
144
|
-
handleInputBlur,
|
|
145
|
-
handleTgtFilterUpdateValue,
|
|
59
|
+
uncontrolledValueRef,
|
|
60
|
+
mergedValueRef,
|
|
61
|
+
targetValueSetRef,
|
|
62
|
+
valueSetForSelectAllRef,
|
|
63
|
+
valueSetForUnselectAllRef,
|
|
64
|
+
targetOptionsRef,
|
|
65
|
+
filteredSrcOptionsRef,
|
|
66
|
+
canNotSelectAnythingRef,
|
|
67
|
+
canBeClearedRef,
|
|
68
|
+
allCheckedRef,
|
|
69
|
+
srcPatternRef,
|
|
146
70
|
handleSrcFilterUpdateValue
|
|
147
71
|
};
|
|
148
72
|
}
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
extraFontSizeSmall: string;
|
|
3
|
+
extraFontSizeMedium: string;
|
|
4
|
+
extraFontSizeLarge: string;
|
|
5
|
+
titleFontSizeSmall: string;
|
|
6
|
+
titleFontSizeMedium: string;
|
|
7
|
+
titleFontSizeLarge: string;
|
|
8
|
+
closeSize: string;
|
|
9
|
+
closeIconSize: string;
|
|
10
|
+
headerHeightSmall: string;
|
|
11
|
+
headerHeightMedium: string;
|
|
12
|
+
headerHeightLarge: string;
|
|
4
13
|
};
|
|
5
14
|
export default _default;
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
extraFontSizeSmall: '12px',
|
|
5
|
+
extraFontSizeMedium: '12px',
|
|
6
|
+
extraFontSizeLarge: '14px',
|
|
7
|
+
titleFontSizeSmall: '14px',
|
|
8
|
+
titleFontSizeMedium: '16px',
|
|
9
|
+
titleFontSizeLarge: '16px',
|
|
10
|
+
closeSize: '20px',
|
|
11
|
+
closeIconSize: '16px',
|
|
12
|
+
headerHeightSmall: '44px',
|
|
13
|
+
headerHeightMedium: '44px',
|
|
14
|
+
headerHeightLarge: '50px'
|
|
6
15
|
};
|
|
@@ -21,12 +21,16 @@ const transferDark = {
|
|
|
21
21
|
Button: styles_5.buttonDark
|
|
22
22
|
},
|
|
23
23
|
self(vars) {
|
|
24
|
-
const {
|
|
25
|
-
return Object.assign(Object.assign({}, _common_1.default), { itemHeightSmall:
|
|
24
|
+
const { fontWeight, fontSizeLarge, fontSizeMedium, fontSizeSmall, heightLarge, heightMedium, borderRadius, inputColor, tableHeaderColor, textColor1, textColorDisabled, textColor2, textColor3, hoverColor, closeColorHover, closeColorPressed, closeIconColor, closeIconColorHover, closeIconColorPressed, dividerColor } = vars;
|
|
25
|
+
return Object.assign(Object.assign({}, _common_1.default), { itemHeightSmall: heightMedium, itemHeightMedium: heightMedium, itemHeightLarge: heightLarge, fontSizeSmall,
|
|
26
26
|
fontSizeMedium,
|
|
27
27
|
fontSizeLarge,
|
|
28
|
-
borderRadius,
|
|
29
|
-
|
|
28
|
+
borderRadius,
|
|
29
|
+
dividerColor, borderColor: '#0000', listColor: inputColor, headerColor: tableHeaderColor, titleTextColor: textColor1, titleTextColorDisabled: textColorDisabled, extraTextColor: textColor3, extraTextColorDisabled: textColorDisabled, itemTextColor: textColor2, itemTextColorDisabled: textColorDisabled, itemColorPending: hoverColor, titleFontWeight: fontWeight, closeColorHover,
|
|
30
|
+
closeColorPressed,
|
|
31
|
+
closeIconColor,
|
|
32
|
+
closeIconColorHover,
|
|
33
|
+
closeIconColorPressed });
|
|
30
34
|
}
|
|
31
35
|
};
|
|
32
36
|
exports.default = transferDark;
|
|
@@ -7,21 +7,34 @@ declare const self: (vars: ThemeCommonVars) => {
|
|
|
7
7
|
fontSizeMedium: string;
|
|
8
8
|
fontSizeLarge: string;
|
|
9
9
|
borderRadius: string;
|
|
10
|
+
dividerColor: string;
|
|
10
11
|
borderColor: string;
|
|
11
12
|
listColor: string;
|
|
12
13
|
headerColor: string;
|
|
13
14
|
titleTextColor: string;
|
|
14
15
|
titleTextColorDisabled: string;
|
|
15
16
|
extraTextColor: string;
|
|
16
|
-
|
|
17
|
+
extraTextColorDisabled: string;
|
|
17
18
|
itemTextColor: string;
|
|
18
19
|
itemTextColorDisabled: string;
|
|
19
20
|
itemColorPending: string;
|
|
20
21
|
titleFontWeight: string;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
closeColorHover: string;
|
|
23
|
+
closeColorPressed: string;
|
|
24
|
+
closeIconColor: string;
|
|
25
|
+
closeIconColorHover: string;
|
|
26
|
+
closeIconColorPressed: string;
|
|
27
|
+
extraFontSizeSmall: string;
|
|
28
|
+
extraFontSizeMedium: string;
|
|
29
|
+
extraFontSizeLarge: string;
|
|
30
|
+
titleFontSizeSmall: string;
|
|
31
|
+
titleFontSizeMedium: string;
|
|
32
|
+
titleFontSizeLarge: string;
|
|
33
|
+
closeSize: string;
|
|
34
|
+
closeIconSize: string;
|
|
35
|
+
headerHeightSmall: string;
|
|
36
|
+
headerHeightMedium: string;
|
|
37
|
+
headerHeightLarge: string;
|
|
25
38
|
};
|
|
26
39
|
export declare type TransferThemeVars = ReturnType<typeof self>;
|
|
27
40
|
declare const transferLight: import("../../_mixins").Theme<"Transfer", {
|
|
@@ -32,21 +45,34 @@ declare const transferLight: import("../../_mixins").Theme<"Transfer", {
|
|
|
32
45
|
fontSizeMedium: string;
|
|
33
46
|
fontSizeLarge: string;
|
|
34
47
|
borderRadius: string;
|
|
48
|
+
dividerColor: string;
|
|
35
49
|
borderColor: string;
|
|
36
50
|
listColor: string;
|
|
37
51
|
headerColor: string;
|
|
38
52
|
titleTextColor: string;
|
|
39
53
|
titleTextColorDisabled: string;
|
|
40
54
|
extraTextColor: string;
|
|
41
|
-
|
|
55
|
+
extraTextColorDisabled: string;
|
|
42
56
|
itemTextColor: string;
|
|
43
57
|
itemTextColorDisabled: string;
|
|
44
58
|
itemColorPending: string;
|
|
45
59
|
titleFontWeight: string;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
60
|
+
closeColorHover: string;
|
|
61
|
+
closeColorPressed: string;
|
|
62
|
+
closeIconColor: string;
|
|
63
|
+
closeIconColorHover: string;
|
|
64
|
+
closeIconColorPressed: string;
|
|
65
|
+
extraFontSizeSmall: string;
|
|
66
|
+
extraFontSizeMedium: string;
|
|
67
|
+
extraFontSizeLarge: string;
|
|
68
|
+
titleFontSizeSmall: string;
|
|
69
|
+
titleFontSizeMedium: string;
|
|
70
|
+
titleFontSizeLarge: string;
|
|
71
|
+
closeSize: string;
|
|
72
|
+
closeIconSize: string;
|
|
73
|
+
headerHeightSmall: string;
|
|
74
|
+
headerHeightMedium: string;
|
|
75
|
+
headerHeightLarge: string;
|
|
50
76
|
}, {
|
|
51
77
|
Checkbox: import("../../_mixins").Theme<"Checkbox", {
|
|
52
78
|
labelLineHeight: string;
|
|
@@ -13,13 +13,15 @@ const styles_4 = require("../../empty/styles");
|
|
|
13
13
|
const styles_5 = require("../../button/styles");
|
|
14
14
|
const _mixins_1 = require("../../_mixins");
|
|
15
15
|
const self = (vars) => {
|
|
16
|
-
const { fontWeight,
|
|
17
|
-
return Object.assign(Object.assign({}, _common_1.default), { itemHeightSmall:
|
|
16
|
+
const { fontWeight, fontSizeLarge, fontSizeMedium, fontSizeSmall, heightLarge, heightMedium, borderRadius, cardColor, tableHeaderColor, textColor1, textColorDisabled, textColor2, textColor3, borderColor, hoverColor, closeColorHover, closeColorPressed, closeIconColor, closeIconColorHover, closeIconColorPressed } = vars;
|
|
17
|
+
return Object.assign(Object.assign({}, _common_1.default), { itemHeightSmall: heightMedium, itemHeightMedium: heightMedium, itemHeightLarge: heightLarge, fontSizeSmall,
|
|
18
18
|
fontSizeMedium,
|
|
19
19
|
fontSizeLarge,
|
|
20
|
-
borderRadius,
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
borderRadius, dividerColor: borderColor, borderColor, listColor: cardColor, headerColor: (0, seemly_1.composite)(cardColor, tableHeaderColor), titleTextColor: textColor1, titleTextColorDisabled: textColorDisabled, extraTextColor: textColor3, extraTextColorDisabled: textColorDisabled, itemTextColor: textColor2, itemTextColorDisabled: textColorDisabled, itemColorPending: hoverColor, titleFontWeight: fontWeight, closeColorHover,
|
|
21
|
+
closeColorPressed,
|
|
22
|
+
closeIconColor,
|
|
23
|
+
closeIconColorHover,
|
|
24
|
+
closeIconColorPressed });
|
|
23
25
|
};
|
|
24
26
|
const transferLight = (0, _mixins_1.createTheme)({
|
|
25
27
|
name: 'Transfer',
|
package/lib/tree/src/Tree.d.ts
CHANGED
|
@@ -835,6 +835,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
835
835
|
} | undefined;
|
|
836
836
|
};
|
|
837
837
|
}>;
|
|
838
|
+
rtlEnabled: import("vue").Ref<import("../../config-provider/src/internal-interface").RtlItem | undefined> | undefined;
|
|
838
839
|
fNodes: import("vue").ComputedRef<({
|
|
839
840
|
key: import("treemate").Key;
|
|
840
841
|
rawNode: {
|
package/lib/tree/src/Tree.js
CHANGED
|
@@ -144,7 +144,8 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
144
144
|
}
|
|
145
145
|
});
|
|
146
146
|
}
|
|
147
|
-
const { mergedClsPrefixRef, inlineThemeDisabled } = (0, _mixins_1.useConfig)(props);
|
|
147
|
+
const { mergedClsPrefixRef, inlineThemeDisabled, mergedRtlRef } = (0, _mixins_1.useConfig)(props);
|
|
148
|
+
const rtlEnabledRef = (0, _mixins_1.useRtl)('Tree', mergedRtlRef, mergedClsPrefixRef);
|
|
148
149
|
const themeRef = (0, _mixins_1.useTheme)('Tree', '-tree', index_cssr_1.default, styles_1.treeLight, props, mergedClsPrefixRef);
|
|
149
150
|
const selfElRef = (0, vue_1.ref)(null);
|
|
150
151
|
const scrollbarInstRef = (0, vue_1.ref)(null);
|
|
@@ -428,19 +429,22 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
428
429
|
if (addedKey !== null) {
|
|
429
430
|
const expandedNodeIndex = afNodesRef.value.findIndex((node) => node.key === addedKey);
|
|
430
431
|
if (~expandedNodeIndex) {
|
|
431
|
-
const
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
:
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
:
|
|
443
|
-
|
|
432
|
+
const children = // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
433
|
+
afNodesRef.value[expandedNodeIndex].children;
|
|
434
|
+
// sometimes user will pass leaf keys in
|
|
435
|
+
if (children) {
|
|
436
|
+
const expandedChildren = (0, treemate_1.flatten)(children, value);
|
|
437
|
+
afNodesRef.value.splice(expandedNodeIndex + 1, 0, {
|
|
438
|
+
__motion: true,
|
|
439
|
+
mode: 'expand',
|
|
440
|
+
height: virtualScroll
|
|
441
|
+
? expandedChildren.length * ITEM_SIZE
|
|
442
|
+
: undefined,
|
|
443
|
+
nodes: virtualScroll
|
|
444
|
+
? expandedChildren.slice(0, viewportItemCount)
|
|
445
|
+
: expandedChildren
|
|
446
|
+
});
|
|
447
|
+
}
|
|
444
448
|
}
|
|
445
449
|
}
|
|
446
450
|
if (removedKey !== null) {
|
|
@@ -1100,6 +1104,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
1100
1104
|
return {
|
|
1101
1105
|
mergedClsPrefix: mergedClsPrefixRef,
|
|
1102
1106
|
mergedTheme: themeRef,
|
|
1107
|
+
rtlEnabled: rtlEnabledRef,
|
|
1103
1108
|
fNodes: mergedFNodesRef,
|
|
1104
1109
|
aip: aipRef,
|
|
1105
1110
|
selfElRef,
|
|
@@ -1124,11 +1129,12 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
1124
1129
|
if (!fNodes.length && internalRenderEmpty) {
|
|
1125
1130
|
return internalRenderEmpty();
|
|
1126
1131
|
}
|
|
1127
|
-
const { mergedClsPrefix, blockNode, blockLine, draggable, disabled, internalFocusable, checkable, handleKeydown, handleFocusout } = this;
|
|
1132
|
+
const { mergedClsPrefix, blockNode, blockLine, draggable, disabled, internalFocusable, checkable, handleKeydown, rtlEnabled, handleFocusout } = this;
|
|
1128
1133
|
const mergedFocusable = internalFocusable && !disabled;
|
|
1129
1134
|
const tabindex = mergedFocusable ? '0' : undefined;
|
|
1130
1135
|
const treeClass = [
|
|
1131
1136
|
`${mergedClsPrefix}-tree`,
|
|
1137
|
+
rtlEnabled && `${mergedClsPrefix}-tree--rtl`,
|
|
1132
1138
|
checkable && `${mergedClsPrefix}-tree--checkable`,
|
|
1133
1139
|
(blockLine || blockNode) && `${mergedClsPrefix}-tree--block-node`,
|
|
1134
1140
|
blockLine && `${mergedClsPrefix}-tree--block-line`
|
|
@@ -21,6 +21,7 @@ declare const TreeNode: import("vue").DefineComponent<{
|
|
|
21
21
|
expanded: import("vue").ComputedRef<boolean>;
|
|
22
22
|
disabled: import("vue").ComputedRef<boolean>;
|
|
23
23
|
checkable: import("vue").ComputedRef<boolean>;
|
|
24
|
+
mergedCheckOnClick: import("vue").ComputedRef<boolean>;
|
|
24
25
|
checkboxDisabled: import("vue").ComputedRef<boolean>;
|
|
25
26
|
selectable: import("vue").ComputedRef<boolean>;
|
|
26
27
|
expandOnClick: import("vue").Ref<boolean>;
|
package/lib/tree/src/TreeNode.js
CHANGED
|
@@ -92,7 +92,8 @@ const TreeNode = (0, vue_1.defineComponent)({
|
|
|
92
92
|
function _handleClick(e) {
|
|
93
93
|
const { value: expandOnClick } = NTree.expandOnClickRef;
|
|
94
94
|
const { value: selectable } = selectableRef;
|
|
95
|
-
|
|
95
|
+
const { value: mergedCheckOnClick } = mergedCheckOnClickRef;
|
|
96
|
+
if (!selectable && !expandOnClick && !mergedCheckOnClick)
|
|
96
97
|
return;
|
|
97
98
|
if ((0, seemly_1.happensIn)(e, 'checkbox') || (0, seemly_1.happensIn)(e, 'switcher'))
|
|
98
99
|
return;
|
|
@@ -103,7 +104,7 @@ const TreeNode = (0, vue_1.defineComponent)({
|
|
|
103
104
|
if (expandOnClick && !tmNode.isLeaf) {
|
|
104
105
|
handleSwitcherClick();
|
|
105
106
|
}
|
|
106
|
-
if (
|
|
107
|
+
if (mergedCheckOnClick) {
|
|
107
108
|
handleCheck(!checkedRef.value);
|
|
108
109
|
}
|
|
109
110
|
}
|
|
@@ -215,6 +216,7 @@ const TreeNode = (0, vue_1.defineComponent)({
|
|
|
215
216
|
expanded: (0, vooks_1.useMemo)(() => NTree.mergedExpandedKeysRef.value.includes(props.tmNode.key)),
|
|
216
217
|
disabled: disabledRef,
|
|
217
218
|
checkable: checkableRef,
|
|
219
|
+
mergedCheckOnClick: mergedCheckOnClickRef,
|
|
218
220
|
checkboxDisabled: (0, vue_1.computed)(() => !!props.tmNode.rawNode.checkboxDisabled),
|
|
219
221
|
selectable: selectableRef,
|
|
220
222
|
expandOnClick: NTree.expandOnClickRef,
|
|
@@ -269,7 +271,7 @@ const TreeNode = (0, vue_1.defineComponent)({
|
|
|
269
271
|
[`${clsPrefix}-tree-node--pending`]: pending,
|
|
270
272
|
[`${clsPrefix}-tree-node--disabled`]: disabled,
|
|
271
273
|
[`${clsPrefix}-tree-node--selectable`]: selectable,
|
|
272
|
-
[`${clsPrefix}-tree-node--clickable`]: selectable || expandOnClick
|
|
274
|
+
[`${clsPrefix}-tree-node--clickable`]: selectable || expandOnClick || this.mergedCheckOnClick
|
|
273
275
|
},
|
|
274
276
|
nodeProps === null || nodeProps === void 0 ? void 0 : nodeProps.class
|
|
275
277
|
], "data-key": dataKey, draggable: draggable && blockLine, onClick: this.handleLineClick, onDragstart: draggable && blockLine && !disabled
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
const cssr_1 = require("../../../_utils/cssr");
|
|
8
|
+
|
|
9
|
+
exports.default = (0, cssr_1.cB)('tree', [(0, cssr_1.cM)('rtl', `
|
|
10
|
+
direction: rtl;
|
|
11
|
+
text-align: right;
|
|
12
|
+
`, [(0, cssr_1.cB)('tree-node-switcher', `
|
|
13
|
+
transform: rotate(180deg);
|
|
14
|
+
`, [(0, cssr_1.cM)('expanded', `
|
|
15
|
+
transform: rotate(90deg);
|
|
16
|
+
`)]), (0, cssr_1.cB)('tree-node-checkbox', `
|
|
17
|
+
margin-right: 0;
|
|
18
|
+
margin-left: 4px;
|
|
19
|
+
`), (0, cssr_1.cB)('tree-node-content', [(0, cssr_1.cE)('prefix', `
|
|
20
|
+
margin-right: 0;
|
|
21
|
+
margin-left: 8px;
|
|
22
|
+
`)]), (0, cssr_1.cB)('tree-node-checkbox', [(0, cssr_1.cM)('right', `
|
|
23
|
+
margin-right: 4px;
|
|
24
|
+
`)])])]);
|
package/lib/tree/styles/index.js
CHANGED
|
@@ -3,8 +3,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.treeLight = exports.treeDark = void 0;
|
|
6
|
+
exports.treeRtl = exports.treeLight = exports.treeDark = void 0;
|
|
7
7
|
var dark_1 = require("./dark");
|
|
8
8
|
Object.defineProperty(exports, "treeDark", { enumerable: true, get: function () { return __importDefault(dark_1).default; } });
|
|
9
9
|
var light_1 = require("./light");
|
|
10
10
|
Object.defineProperty(exports, "treeLight", { enumerable: true, get: function () { return __importDefault(light_1).default; } });
|
|
11
|
+
var rtl_1 = require("./rtl");
|
|
12
|
+
Object.defineProperty(exports, "treeRtl", { enumerable: true, get: function () { return rtl_1.treeRtl; } });
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.treeRtl = void 0;
|
|
7
|
+
const rtl_cssr_1 = __importDefault(require("../src/styles/rtl.cssr"));
|
|
8
|
+
exports.treeRtl = {
|
|
9
|
+
name: 'Tree',
|
|
10
|
+
style: rtl_cssr_1.default
|
|
11
|
+
};
|
|
@@ -26,7 +26,7 @@ export declare type OnChange = (data: {
|
|
|
26
26
|
export declare type OnFinish = ({ file, event }: {
|
|
27
27
|
file: SettledFileInfo;
|
|
28
28
|
event?: ProgressEvent;
|
|
29
|
-
}) => FileInfo | undefined;
|
|
29
|
+
}) => FileInfo | undefined | void;
|
|
30
30
|
export declare type OnRemove = (data: {
|
|
31
31
|
file: SettledFileInfo;
|
|
32
32
|
fileList: SettledFileInfo[];
|
|
@@ -115,7 +115,7 @@ export declare type CustomRequest = (options: CustomRequestOptions) => void;
|
|
|
115
115
|
export declare type OnError = ({ file, event }: {
|
|
116
116
|
file: SettledFileInfo;
|
|
117
117
|
event?: ProgressEvent;
|
|
118
|
-
}) => FileInfo | undefined;
|
|
118
|
+
}) => FileInfo | undefined | void;
|
|
119
119
|
export interface FileAndEntry {
|
|
120
120
|
file: File;
|
|
121
121
|
entry: FileSystemFileEntry | null;
|
package/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "2.
|
|
1
|
+
declare const _default: "2.32.0";
|
|
2
2
|
export default _default;
|
package/lib/version.js
CHANGED
|
@@ -77,6 +77,10 @@ export declare const watermarkProps: {
|
|
|
77
77
|
readonly type: NumberConstructor;
|
|
78
78
|
readonly default: 14;
|
|
79
79
|
};
|
|
80
|
+
readonly globalRotate: {
|
|
81
|
+
readonly type: NumberConstructor;
|
|
82
|
+
readonly default: 0;
|
|
83
|
+
};
|
|
80
84
|
readonly theme: PropType<import("../../_mixins").Theme<"Watermark", {
|
|
81
85
|
fontFamily: string;
|
|
82
86
|
}, unknown>>;
|
|
@@ -165,6 +169,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
165
169
|
readonly type: NumberConstructor;
|
|
166
170
|
readonly default: 14;
|
|
167
171
|
};
|
|
172
|
+
readonly globalRotate: {
|
|
173
|
+
readonly type: NumberConstructor;
|
|
174
|
+
readonly default: 0;
|
|
175
|
+
};
|
|
168
176
|
readonly theme: PropType<import("../../_mixins").Theme<"Watermark", {
|
|
169
177
|
fontFamily: string;
|
|
170
178
|
}, unknown>>;
|
|
@@ -251,6 +259,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
251
259
|
readonly type: NumberConstructor;
|
|
252
260
|
readonly default: 14;
|
|
253
261
|
};
|
|
262
|
+
readonly globalRotate: {
|
|
263
|
+
readonly type: NumberConstructor;
|
|
264
|
+
readonly default: 0;
|
|
265
|
+
};
|
|
254
266
|
readonly theme: PropType<import("../../_mixins").Theme<"Watermark", {
|
|
255
267
|
fontFamily: string;
|
|
256
268
|
}, unknown>>;
|
|
@@ -281,5 +293,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
281
293
|
readonly xOffset: number;
|
|
282
294
|
readonly imageOpacity: number;
|
|
283
295
|
readonly fontColor: string;
|
|
296
|
+
readonly globalRotate: number;
|
|
284
297
|
}>;
|
|
285
298
|
export default _default;
|