naive-ui 2.32.0 → 2.32.2
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/README.zh-CN.md +1 -1
- package/dist/index.js +46388 -42920
- package/dist/index.prod.js +2 -2
- package/es/_internal/scrollbar/src/Scrollbar.js +2 -1
- package/es/_internal/select-menu/styles/light.js +1 -1
- package/es/_internal/selection/src/Selection.js +1 -1
- package/es/_utils/cssr/index.js +4 -4
- package/es/alert/src/Alert.d.ts +14 -0
- package/es/alert/src/Alert.js +11 -2
- package/es/alert/src/styles/index.cssr.js +11 -2
- package/es/alert/styles/dark.js +5 -1
- package/es/anchor/styles/light.js +2 -1
- package/es/auto-complete/src/AutoComplete.d.ts +14 -1
- package/es/auto-complete/src/AutoComplete.js +22 -16
- package/es/auto-complete/styles/light.d.ts +1 -0
- package/es/breadcrumb/styles/light.js +1 -1
- package/es/button/styles/light.js +5 -1
- package/es/card/styles/light.js +1 -1
- package/es/carousel/src/Carousel.js +7 -5
- package/es/cascader/src/Cascader.d.ts +13 -0
- package/es/cascader/src/Cascader.js +12 -4
- package/es/checkbox/src/CheckboxGroup.js +2 -2
- package/es/checkbox/styles/light.js +1 -1
- package/es/collapse/src/Collapse.d.ts +22 -0
- package/es/collapse/src/Collapse.js +4 -2
- package/es/collapse/src/CollapseItem.d.ts +6 -1
- package/es/collapse/src/CollapseItem.js +4 -2
- package/es/collapse/src/styles/index.cssr.js +10 -21
- package/es/collapse/styles/light.d.ts +2 -0
- package/es/collapse/styles/light.js +5 -3
- package/es/color-picker/src/ColorInputUnit.d.ts +1 -0
- package/es/color-picker/src/ColorPicker.d.ts +9 -0
- package/es/color-picker/src/ColorPicker.js +3 -2
- package/es/color-picker/styles/light.d.ts +1 -0
- package/es/countdown/src/Countdown.js +1 -1
- package/es/data-table/src/DataTable.d.ts +18 -0
- package/es/data-table/src/DataTable.js +6 -3
- package/es/data-table/src/HeaderButton/FilterButton.d.ts +2 -0
- package/es/data-table/src/HeaderButton/FilterMenu.d.ts +4 -2
- package/es/data-table/src/TableParts/Body.d.ts +6 -0
- package/es/data-table/src/TableParts/Body.js +22 -14
- package/es/data-table/src/TableParts/Cell.d.ts +4 -0
- package/es/data-table/src/TableParts/ExpandTrigger.d.ts +7 -1
- package/es/data-table/src/TableParts/ExpandTrigger.js +15 -9
- package/es/data-table/src/TableParts/Header.d.ts +3 -1
- package/es/data-table/src/interface.d.ts +6 -3
- package/es/data-table/src/styles/index.cssr.js +25 -7
- package/es/data-table/src/use-expand.d.ts +3 -1
- package/es/data-table/src/use-expand.js +15 -8
- package/es/data-table/src/use-group-header.js +1 -1
- package/es/data-table/src/use-sorter.js +1 -1
- package/es/data-table/src/use-table-data.js +1 -1
- package/es/data-table/styles/light.d.ts +1 -0
- package/es/date-picker/src/DatePicker.d.ts +23 -2
- package/es/date-picker/src/DatePicker.js +4 -4
- package/es/date-picker/src/panel/date.d.ts +6 -3
- package/es/date-picker/src/panel/daterange.d.ts +3 -0
- package/es/date-picker/src/panel/datetime.d.ts +3 -0
- package/es/date-picker/src/panel/datetimerange.d.ts +3 -0
- package/es/date-picker/src/panel/month.d.ts +3 -0
- package/es/date-picker/src/panel/monthrange.d.ts +3 -0
- package/es/date-picker/src/panel/panelHeader.d.ts +6 -0
- package/es/date-picker/src/panel/panelHeader.js +3 -1
- package/es/date-picker/src/panel/use-calendar.d.ts +3 -0
- package/es/date-picker/src/panel/use-dual-calendar.d.ts +3 -0
- package/es/date-picker/src/panel/use-panel-common.d.ts +3 -0
- package/es/date-picker/src/styles/index.cssr.js +6 -6
- package/es/date-picker/styles/light.d.ts +2 -0
- package/es/descriptions/styles/light.js +1 -1
- package/es/drawer/src/Drawer.d.ts +8 -8
- package/es/drawer/src/Drawer.js +3 -3
- package/es/drawer/src/DrawerBodyWrapper.d.ts +1 -0
- package/es/drawer/src/DrawerBodyWrapper.js +6 -0
- package/es/drawer/src/styles/rtl.cssr.d.ts +2 -0
- package/es/drawer/src/styles/rtl.cssr.js +8 -0
- package/es/drawer/styles/index.d.ts +1 -0
- package/es/drawer/styles/index.js +1 -0
- package/es/drawer/styles/rtl.d.ts +3 -0
- package/es/drawer/styles/rtl.js +8 -0
- package/es/dropdown/src/Dropdown.js +6 -6
- package/es/dropdown/src/styles/index.cssr.js +35 -33
- package/es/dynamic-input/src/DynamicInput.d.ts +10 -0
- package/es/dynamic-input/src/InputPreset.d.ts +1 -0
- package/es/dynamic-input/src/PairPreset.d.ts +1 -0
- package/es/dynamic-input/styles/light.d.ts +1 -0
- package/es/dynamic-tags/src/DynamicTags.d.ts +10 -0
- package/es/dynamic-tags/styles/light.d.ts +1 -0
- package/es/empty/styles/light.js +1 -1
- package/es/grid/src/Grid.d.ts +5 -0
- package/es/grid/src/Grid.js +18 -0
- package/es/grid/src/GridItem.d.ts +2 -0
- package/es/grid/src/GridItem.js +15 -2
- package/es/input/src/Input.d.ts +21 -1
- package/es/input/src/Input.js +23 -6
- package/es/input/src/InputGroupLabel.d.ts +9 -0
- package/es/input/src/styles/input.cssr.d.ts +1 -0
- package/es/input/src/styles/input.cssr.js +12 -4
- package/es/input/styles/dark.js +1 -1
- package/es/input/styles/light.d.ts +1 -0
- package/es/input/styles/light.js +1 -1
- package/es/input-number/src/InputNumber.d.ts +15 -5
- package/es/input-number/src/InputNumber.js +6 -8
- package/es/input-number/src/interface.d.ts +1 -0
- package/es/input-number/styles/light.d.ts +1 -0
- package/es/layout/src/Layout.js +3 -1
- package/es/legacy-grid/src/Row.js +2 -2
- package/es/legacy-transfer/src/Transfer.d.ts +10 -0
- package/es/legacy-transfer/src/TransferFilter.d.ts +1 -0
- package/es/legacy-transfer/src/TransferList.d.ts +1 -0
- package/es/legacy-transfer/src/TransferListItem.d.ts +1 -0
- package/es/legacy-transfer/styles/light.d.ts +1 -0
- package/es/list/src/List.d.ts +47 -3
- package/es/list/src/List.js +17 -7
- package/es/list/src/ListItem.d.ts +1 -0
- package/es/list/src/ListItem.js +3 -1
- package/es/list/src/styles/index.cssr.js +35 -12
- package/es/list/src/styles/rtl.cssr.d.ts +2 -0
- package/es/list/src/styles/rtl.cssr.js +11 -0
- package/es/list/styles/index.d.ts +1 -0
- package/es/list/styles/index.js +1 -0
- package/es/list/styles/light.d.ts +3 -0
- package/es/list/styles/light.js +4 -1
- package/es/list/styles/rtl.d.ts +2 -0
- package/es/list/styles/rtl.js +5 -0
- package/es/locales/common/viVN.js +7 -9
- package/es/mention/src/Mention.d.ts +10 -0
- package/es/mention/styles/light.d.ts +1 -0
- package/es/menu/src/Menu.d.ts +13 -0
- package/es/menu/src/Menu.js +4 -1
- package/es/menu/src/Submenu.js +1 -1
- package/es/menu/src/utils.d.ts +1 -1
- package/es/menu/src/utils.js +5 -1
- package/es/message/src/Message.d.ts +1 -0
- package/es/message/src/Message.js +8 -3
- package/es/message/src/styles/rtl.cssr.d.ts +2 -0
- package/es/message/src/styles/rtl.cssr.js +8 -0
- package/es/message/styles/index.d.ts +1 -0
- package/es/message/styles/index.js +1 -0
- package/es/message/styles/light.js +4 -1
- package/es/message/styles/rtl.d.ts +2 -0
- package/es/message/styles/rtl.js +5 -0
- package/es/modal/src/Modal.js +2 -1
- package/es/notification/styles/light.js +3 -1
- package/es/number-animation/src/NumberAnimation.js +1 -1
- package/es/pagination/src/Pagination.d.ts +31 -26
- package/es/pagination/src/Pagination.js +207 -164
- package/es/pagination/src/styles/index.cssr.js +7 -1
- package/es/pagination/styles/light.d.ts +1 -0
- package/es/popover/src/Popover.js +2 -2
- package/es/popover/src/PopoverBody.js +3 -2
- package/es/popselect/src/Popselect.d.ts +3 -3
- package/es/radio/styles/dark.js +1 -1
- package/es/radio/styles/light.js +1 -1
- package/es/select/index.d.ts +1 -1
- package/es/select/src/Select.d.ts +4 -1
- package/es/select/src/Select.js +4 -4
- package/es/skeleton/src/Skeleton.js +1 -1
- package/es/slider/styles/dark.js +2 -1
- package/es/slider/styles/light.js +2 -1
- package/es/statistic/src/Statistic.d.ts +10 -0
- package/es/statistic/src/Statistic.js +2 -1
- package/es/statistic/src/styles/index.cssr.js +4 -3
- package/es/statistic/styles/light.d.ts +1 -0
- package/es/statistic/styles/light.js +1 -0
- package/es/steps/src/Steps.d.ts +1 -0
- package/es/steps/src/Steps.js +6 -3
- package/es/steps/src/styles/rtl.cssr.d.ts +2 -0
- package/es/steps/src/styles/rtl.cssr.js +14 -0
- package/es/steps/styles/index.d.ts +1 -0
- package/es/steps/styles/index.js +1 -0
- package/es/steps/styles/rtl.d.ts +2 -0
- package/es/steps/styles/rtl.js +5 -0
- package/es/styles.d.ts +4 -3
- package/es/styles.js +4 -3
- package/es/switch/src/Switch.js +32 -5
- package/es/switch/src/styles/index.cssr.js +2 -2
- package/es/tag/src/Tag.d.ts +4 -4
- package/es/tag/src/Tag.js +3 -3
- package/es/tag/src/styles/index.cssr.js +0 -1
- package/es/tag/styles/light.js +4 -1
- package/es/thing/src/Thing.d.ts +19 -21
- package/es/thing/src/Thing.js +4 -7
- package/es/time-picker/src/Panel.d.ts +1 -0
- package/es/time-picker/src/TimePicker.d.ts +12 -2
- package/es/time-picker/src/TimePicker.js +4 -4
- package/es/time-picker/src/styles/index.cssr.js +12 -12
- package/es/time-picker/styles/light.d.ts +1 -0
- package/es/timeline/src/TimelineItem.js +1 -1
- package/es/tooltip/styles/dark.js +1 -1
- package/es/tooltip/styles/light.js +1 -1
- package/es/transfer/src/Transfer.d.ts +37 -6
- package/es/transfer/src/Transfer.js +32 -23
- package/es/transfer/src/TransferFilter.d.ts +1 -0
- package/es/transfer/src/TransferList.d.ts +1 -0
- package/es/transfer/src/TransferList.js +1 -1
- package/es/transfer/src/TransferListItem.d.ts +1 -0
- package/es/transfer/src/interface.d.ts +1 -1
- package/es/transfer/src/use-transfer-data.d.ts +11 -4
- package/es/transfer/src/use-transfer-data.js +59 -16
- package/es/transfer/styles/light.d.ts +1 -0
- package/es/tree/index.d.ts +1 -1
- package/es/tree/src/Tree.d.ts +34 -1
- package/es/tree/src/Tree.js +25 -11
- package/es/tree/src/interface.d.ts +5 -0
- package/es/tree/src/keyboard.d.ts +4 -1
- package/es/tree/src/keyboard.js +3 -1
- package/es/tree-select/src/TreeSelect.d.ts +13 -0
- package/es/tree-select/src/TreeSelect.js +4 -4
- package/es/typography/styles/light.js +1 -1
- package/es/upload/src/Upload.d.ts +10 -0
- package/es/upload/src/Upload.js +1 -1
- package/es/upload/src/UploadFile.js +4 -2
- package/es/upload/src/utils.d.ts +1 -0
- package/es/upload/src/utils.js +12 -0
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/_internal/scrollbar/src/Scrollbar.js +2 -1
- package/lib/_internal/select-menu/styles/light.js +1 -1
- package/lib/_internal/selection/src/Selection.js +1 -1
- package/lib/_utils/cssr/index.js +2 -2
- package/lib/alert/src/Alert.d.ts +14 -0
- package/lib/alert/src/Alert.js +11 -2
- package/lib/alert/src/styles/index.cssr.js +11 -2
- package/lib/alert/styles/dark.js +5 -1
- package/lib/anchor/styles/light.js +2 -1
- package/lib/auto-complete/src/AutoComplete.d.ts +14 -1
- package/lib/auto-complete/src/AutoComplete.js +22 -16
- package/lib/auto-complete/styles/light.d.ts +1 -0
- package/lib/breadcrumb/styles/light.js +1 -1
- package/lib/button/styles/light.js +5 -1
- package/lib/card/styles/light.js +1 -1
- package/lib/carousel/src/Carousel.js +7 -5
- package/lib/cascader/src/Cascader.d.ts +13 -0
- package/lib/cascader/src/Cascader.js +11 -3
- package/lib/checkbox/src/CheckboxGroup.js +2 -2
- package/lib/checkbox/styles/light.js +1 -1
- package/lib/collapse/src/Collapse.d.ts +22 -0
- package/lib/collapse/src/Collapse.js +4 -2
- package/lib/collapse/src/CollapseItem.d.ts +6 -1
- package/lib/collapse/src/CollapseItem.js +4 -2
- package/lib/collapse/src/styles/index.cssr.js +10 -21
- package/lib/collapse/styles/light.d.ts +2 -0
- package/lib/collapse/styles/light.js +5 -3
- package/lib/color-picker/src/ColorInputUnit.d.ts +1 -0
- package/lib/color-picker/src/ColorPicker.d.ts +9 -0
- package/lib/color-picker/src/ColorPicker.js +2 -1
- package/lib/color-picker/styles/light.d.ts +1 -0
- package/lib/countdown/src/Countdown.js +1 -1
- package/lib/data-table/src/DataTable.d.ts +18 -0
- package/lib/data-table/src/DataTable.js +6 -3
- package/lib/data-table/src/HeaderButton/FilterButton.d.ts +2 -0
- package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +4 -2
- package/lib/data-table/src/TableParts/Body.d.ts +6 -0
- package/lib/data-table/src/TableParts/Body.js +22 -14
- package/lib/data-table/src/TableParts/Cell.d.ts +4 -0
- package/lib/data-table/src/TableParts/ExpandTrigger.d.ts +7 -1
- package/lib/data-table/src/TableParts/ExpandTrigger.js +15 -9
- package/lib/data-table/src/TableParts/Header.d.ts +3 -1
- package/lib/data-table/src/interface.d.ts +6 -3
- package/lib/data-table/src/styles/index.cssr.js +25 -7
- package/lib/data-table/src/use-expand.d.ts +3 -1
- package/lib/data-table/src/use-expand.js +15 -8
- package/lib/data-table/src/use-group-header.js +1 -1
- package/lib/data-table/src/use-sorter.js +1 -1
- package/lib/data-table/src/use-table-data.js +1 -1
- package/lib/data-table/styles/light.d.ts +1 -0
- package/lib/date-picker/src/DatePicker.d.ts +23 -2
- package/lib/date-picker/src/DatePicker.js +3 -3
- package/lib/date-picker/src/panel/date.d.ts +6 -3
- package/lib/date-picker/src/panel/daterange.d.ts +3 -0
- package/lib/date-picker/src/panel/datetime.d.ts +3 -0
- package/lib/date-picker/src/panel/datetimerange.d.ts +3 -0
- package/lib/date-picker/src/panel/month.d.ts +3 -0
- package/lib/date-picker/src/panel/monthrange.d.ts +3 -0
- package/lib/date-picker/src/panel/panelHeader.d.ts +6 -0
- package/lib/date-picker/src/panel/panelHeader.js +3 -1
- package/lib/date-picker/src/panel/use-calendar.d.ts +3 -0
- package/lib/date-picker/src/panel/use-dual-calendar.d.ts +3 -0
- package/lib/date-picker/src/panel/use-panel-common.d.ts +3 -0
- package/lib/date-picker/src/styles/index.cssr.js +6 -6
- package/lib/date-picker/styles/light.d.ts +2 -0
- package/lib/descriptions/styles/light.js +1 -1
- package/lib/drawer/src/Drawer.d.ts +8 -8
- package/lib/drawer/src/Drawer.js +3 -3
- package/lib/drawer/src/DrawerBodyWrapper.d.ts +1 -0
- package/lib/drawer/src/DrawerBodyWrapper.js +6 -0
- package/lib/drawer/src/styles/rtl.cssr.d.ts +2 -0
- package/lib/drawer/src/styles/rtl.cssr.js +15 -0
- package/lib/drawer/styles/index.d.ts +1 -0
- package/lib/drawer/styles/index.js +3 -1
- package/lib/drawer/styles/rtl.d.ts +3 -0
- package/lib/drawer/styles/rtl.js +14 -0
- package/lib/dropdown/src/Dropdown.js +6 -6
- package/lib/dropdown/src/styles/index.cssr.js +35 -33
- package/lib/dynamic-input/src/DynamicInput.d.ts +10 -0
- package/lib/dynamic-input/src/InputPreset.d.ts +1 -0
- package/lib/dynamic-input/src/PairPreset.d.ts +1 -0
- package/lib/dynamic-input/styles/light.d.ts +1 -0
- package/lib/dynamic-tags/src/DynamicTags.d.ts +10 -0
- package/lib/dynamic-tags/styles/light.d.ts +1 -0
- package/lib/empty/styles/light.js +1 -1
- package/lib/grid/src/Grid.d.ts +5 -0
- package/lib/grid/src/Grid.js +18 -0
- package/lib/grid/src/GridItem.d.ts +2 -0
- package/lib/grid/src/GridItem.js +14 -1
- package/lib/input/src/Input.d.ts +21 -1
- package/lib/input/src/Input.js +45 -5
- package/lib/input/src/InputGroupLabel.d.ts +9 -0
- package/lib/input/src/styles/input.cssr.d.ts +1 -0
- package/lib/input/src/styles/input.cssr.js +13 -4
- package/lib/input/styles/dark.js +1 -1
- package/lib/input/styles/light.d.ts +1 -0
- package/lib/input/styles/light.js +1 -1
- package/lib/input-number/src/InputNumber.d.ts +15 -5
- package/lib/input-number/src/InputNumber.js +6 -8
- package/lib/input-number/src/interface.d.ts +1 -0
- package/lib/input-number/styles/light.d.ts +1 -0
- package/lib/layout/src/Layout.js +3 -1
- package/lib/legacy-grid/src/Row.js +2 -2
- package/lib/legacy-transfer/src/Transfer.d.ts +10 -0
- package/lib/legacy-transfer/src/TransferFilter.d.ts +1 -0
- package/lib/legacy-transfer/src/TransferList.d.ts +1 -0
- package/lib/legacy-transfer/src/TransferListItem.d.ts +1 -0
- package/lib/legacy-transfer/styles/light.d.ts +1 -0
- package/lib/list/src/List.d.ts +47 -3
- package/lib/list/src/List.js +15 -5
- package/lib/list/src/ListItem.d.ts +1 -0
- package/lib/list/src/ListItem.js +3 -1
- package/lib/list/src/styles/index.cssr.js +35 -12
- package/lib/list/src/styles/rtl.cssr.d.ts +2 -0
- package/lib/list/src/styles/rtl.cssr.js +18 -0
- package/lib/list/styles/index.d.ts +1 -0
- package/lib/list/styles/index.js +3 -1
- package/lib/list/styles/light.d.ts +3 -0
- package/lib/list/styles/light.js +4 -1
- package/lib/list/styles/rtl.d.ts +2 -0
- package/lib/list/styles/rtl.js +11 -0
- package/lib/locales/common/viVN.js +7 -9
- package/lib/mention/src/Mention.d.ts +10 -0
- package/lib/mention/styles/light.d.ts +1 -0
- package/lib/menu/src/Menu.d.ts +13 -0
- package/lib/menu/src/Menu.js +4 -1
- package/lib/menu/src/Submenu.js +1 -1
- package/lib/menu/src/utils.d.ts +1 -1
- package/lib/menu/src/utils.js +5 -1
- package/lib/message/src/Message.d.ts +1 -0
- package/lib/message/src/Message.js +7 -2
- package/lib/message/src/styles/rtl.cssr.d.ts +2 -0
- package/lib/message/src/styles/rtl.cssr.js +15 -0
- package/lib/message/styles/index.d.ts +1 -0
- package/lib/message/styles/index.js +3 -1
- package/lib/message/styles/light.js +4 -1
- package/lib/message/styles/rtl.d.ts +2 -0
- package/lib/message/styles/rtl.js +11 -0
- package/lib/modal/src/Modal.js +2 -1
- package/lib/notification/styles/light.js +3 -1
- package/lib/number-animation/src/NumberAnimation.js +1 -1
- package/lib/pagination/src/Pagination.d.ts +31 -26
- package/lib/pagination/src/Pagination.js +206 -163
- package/lib/pagination/src/styles/index.cssr.js +7 -1
- package/lib/pagination/styles/light.d.ts +1 -0
- package/lib/popover/src/Popover.js +2 -2
- package/lib/popover/src/PopoverBody.js +3 -2
- package/lib/popselect/src/Popselect.d.ts +3 -3
- package/lib/radio/styles/dark.js +1 -1
- package/lib/radio/styles/light.js +1 -1
- package/lib/select/index.d.ts +1 -1
- package/lib/select/src/Select.d.ts +4 -1
- package/lib/select/src/Select.js +3 -3
- package/lib/skeleton/src/Skeleton.js +1 -1
- package/lib/slider/styles/dark.js +2 -1
- package/lib/slider/styles/light.js +2 -1
- package/lib/statistic/src/Statistic.d.ts +10 -0
- package/lib/statistic/src/Statistic.js +2 -1
- package/lib/statistic/src/styles/index.cssr.js +4 -3
- package/lib/statistic/styles/light.d.ts +1 -0
- package/lib/statistic/styles/light.js +1 -0
- package/lib/steps/src/Steps.d.ts +1 -0
- package/lib/steps/src/Steps.js +5 -2
- package/lib/steps/src/styles/rtl.cssr.d.ts +2 -0
- package/lib/steps/src/styles/rtl.cssr.js +21 -0
- package/lib/steps/styles/index.d.ts +1 -0
- package/lib/steps/styles/index.js +3 -1
- package/lib/steps/styles/rtl.d.ts +2 -0
- package/lib/steps/styles/rtl.js +11 -0
- package/lib/styles.d.ts +4 -3
- package/lib/styles.js +154 -149
- package/lib/switch/src/Switch.js +32 -5
- package/lib/switch/src/styles/index.cssr.js +2 -2
- package/lib/tag/src/Tag.d.ts +4 -4
- package/lib/tag/src/Tag.js +3 -3
- package/lib/tag/src/styles/index.cssr.js +0 -1
- package/lib/tag/styles/light.js +4 -1
- package/lib/thing/src/Thing.d.ts +19 -21
- package/lib/thing/src/Thing.js +4 -7
- package/lib/time-picker/src/Panel.d.ts +1 -0
- package/lib/time-picker/src/TimePicker.d.ts +12 -2
- package/lib/time-picker/src/TimePicker.js +3 -3
- package/lib/time-picker/src/styles/index.cssr.js +12 -12
- package/lib/time-picker/styles/light.d.ts +1 -0
- package/lib/timeline/src/TimelineItem.js +1 -1
- package/lib/tooltip/styles/dark.js +1 -1
- package/lib/tooltip/styles/light.js +1 -1
- package/lib/transfer/src/Transfer.d.ts +37 -6
- package/lib/transfer/src/Transfer.js +32 -23
- package/lib/transfer/src/TransferFilter.d.ts +1 -0
- package/lib/transfer/src/TransferList.d.ts +1 -0
- package/lib/transfer/src/TransferList.js +1 -1
- package/lib/transfer/src/TransferListItem.d.ts +1 -0
- package/lib/transfer/src/interface.d.ts +1 -1
- package/lib/transfer/src/use-transfer-data.d.ts +11 -4
- package/lib/transfer/src/use-transfer-data.js +59 -16
- package/lib/transfer/styles/light.d.ts +1 -0
- package/lib/tree/index.d.ts +1 -1
- package/lib/tree/src/Tree.d.ts +34 -1
- package/lib/tree/src/Tree.js +25 -11
- package/lib/tree/src/interface.d.ts +5 -0
- package/lib/tree/src/keyboard.d.ts +4 -1
- package/lib/tree/src/keyboard.js +3 -1
- package/lib/tree-select/src/TreeSelect.d.ts +13 -0
- package/lib/tree-select/src/TreeSelect.js +3 -3
- package/lib/typography/styles/light.js +1 -1
- package/lib/upload/src/Upload.d.ts +10 -0
- package/lib/upload/src/Upload.js +1 -1
- package/lib/upload/src/UploadFile.js +3 -1
- package/lib/upload/src/utils.d.ts +1 -0
- package/lib/upload/src/utils.js +14 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +25 -19
- package/volar.d.ts +1 -1
- package/web-types.json +210 -3
package/es/thing/src/Thing.d.ts
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
+
import { CSSProperties, PropType } from 'vue';
|
|
1
2
|
import type { ExtractPublicPropTypes } from '../../_utils';
|
|
2
3
|
export declare const thingProps: {
|
|
3
4
|
title: StringConstructor;
|
|
4
5
|
titleExtra: StringConstructor;
|
|
5
6
|
description: StringConstructor;
|
|
7
|
+
descriptionStyle: PropType<string | CSSProperties>;
|
|
6
8
|
content: StringConstructor;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
theme: import("vue").PropType<import("../../_mixins").Theme<"Thing", {
|
|
9
|
+
contentStyle: PropType<string | CSSProperties>;
|
|
10
|
+
contentIndented: BooleanConstructor;
|
|
11
|
+
theme: PropType<import("../../_mixins").Theme<"Thing", {
|
|
12
12
|
fontSize: string;
|
|
13
13
|
titleTextColor: string;
|
|
14
14
|
textColor: string;
|
|
15
15
|
titleFontWeight: string;
|
|
16
16
|
}, any>>;
|
|
17
|
-
themeOverrides:
|
|
17
|
+
themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Thing", {
|
|
18
18
|
fontSize: string;
|
|
19
19
|
titleTextColor: string;
|
|
20
20
|
textColor: string;
|
|
21
21
|
titleFontWeight: string;
|
|
22
22
|
}, any>>>;
|
|
23
|
-
builtinThemeOverrides:
|
|
23
|
+
builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Thing", {
|
|
24
24
|
fontSize: string;
|
|
25
25
|
titleTextColor: string;
|
|
26
26
|
textColor: string;
|
|
@@ -32,24 +32,23 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
32
32
|
title: StringConstructor;
|
|
33
33
|
titleExtra: StringConstructor;
|
|
34
34
|
description: StringConstructor;
|
|
35
|
+
descriptionStyle: PropType<string | CSSProperties>;
|
|
35
36
|
content: StringConstructor;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
};
|
|
40
|
-
theme: import("vue").PropType<import("../../_mixins").Theme<"Thing", {
|
|
37
|
+
contentStyle: PropType<string | CSSProperties>;
|
|
38
|
+
contentIndented: BooleanConstructor;
|
|
39
|
+
theme: PropType<import("../../_mixins").Theme<"Thing", {
|
|
41
40
|
fontSize: string;
|
|
42
41
|
titleTextColor: string;
|
|
43
42
|
textColor: string;
|
|
44
43
|
titleFontWeight: string;
|
|
45
44
|
}, any>>;
|
|
46
|
-
themeOverrides:
|
|
45
|
+
themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Thing", {
|
|
47
46
|
fontSize: string;
|
|
48
47
|
titleTextColor: string;
|
|
49
48
|
textColor: string;
|
|
50
49
|
titleFontWeight: string;
|
|
51
50
|
}, any>>>;
|
|
52
|
-
builtinThemeOverrides:
|
|
51
|
+
builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Thing", {
|
|
53
52
|
fontSize: string;
|
|
54
53
|
titleTextColor: string;
|
|
55
54
|
textColor: string;
|
|
@@ -59,24 +58,23 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
59
58
|
title: StringConstructor;
|
|
60
59
|
titleExtra: StringConstructor;
|
|
61
60
|
description: StringConstructor;
|
|
61
|
+
descriptionStyle: PropType<string | CSSProperties>;
|
|
62
62
|
content: StringConstructor;
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
};
|
|
67
|
-
theme: import("vue").PropType<import("../../_mixins").Theme<"Thing", {
|
|
63
|
+
contentStyle: PropType<string | CSSProperties>;
|
|
64
|
+
contentIndented: BooleanConstructor;
|
|
65
|
+
theme: PropType<import("../../_mixins").Theme<"Thing", {
|
|
68
66
|
fontSize: string;
|
|
69
67
|
titleTextColor: string;
|
|
70
68
|
textColor: string;
|
|
71
69
|
titleFontWeight: string;
|
|
72
70
|
}, any>>;
|
|
73
|
-
themeOverrides:
|
|
71
|
+
themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Thing", {
|
|
74
72
|
fontSize: string;
|
|
75
73
|
titleTextColor: string;
|
|
76
74
|
textColor: string;
|
|
77
75
|
titleFontWeight: string;
|
|
78
76
|
}, any>>>;
|
|
79
|
-
builtinThemeOverrides:
|
|
77
|
+
builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Thing", {
|
|
80
78
|
fontSize: string;
|
|
81
79
|
titleTextColor: string;
|
|
82
80
|
textColor: string;
|
package/es/thing/src/Thing.js
CHANGED
|
@@ -2,10 +2,7 @@ import { h, defineComponent, computed, Fragment } from 'vue';
|
|
|
2
2
|
import { useConfig, useTheme, useThemeClass, useRtl } from '../../_mixins';
|
|
3
3
|
import { thingLight } from '../styles';
|
|
4
4
|
import style from './styles/index.cssr';
|
|
5
|
-
export const thingProps = Object.assign(Object.assign({}, useTheme.props), { title: String, titleExtra: String, description: String, content: String, contentIndented:
|
|
6
|
-
type: Boolean,
|
|
7
|
-
default: false
|
|
8
|
-
} });
|
|
5
|
+
export const thingProps = Object.assign(Object.assign({}, useTheme.props), { title: String, titleExtra: String, description: String, descriptionStyle: [String, Object], content: String, contentStyle: [String, Object], contentIndented: Boolean });
|
|
9
6
|
export default defineComponent({
|
|
10
7
|
name: 'Thing',
|
|
11
8
|
props: thingProps,
|
|
@@ -56,7 +53,7 @@ export default defineComponent({
|
|
|
56
53
|
slots['header-extra'] || props.titleExtra ? (h("div", { class: `${mergedClsPrefix}-thing-header__extra` }, slots['header-extra']
|
|
57
54
|
? slots['header-extra']()
|
|
58
55
|
: props.titleExtra)) : null),
|
|
59
|
-
slots.description || props.description ? (h("div", { class: `${mergedClsPrefix}-thing-main__description
|
|
56
|
+
slots.description || props.description ? (h("div", { class: `${mergedClsPrefix}-thing-main__description`, style: props.descriptionStyle }, slots.description
|
|
60
57
|
? slots.description()
|
|
61
58
|
: props.description)) : null)) : null)) : (h(Fragment, null,
|
|
62
59
|
slots.header ||
|
|
@@ -67,10 +64,10 @@ export default defineComponent({
|
|
|
67
64
|
slots['header-extra'] || props.titleExtra ? (h("div", { class: `${mergedClsPrefix}-thing-header__extra` }, slots['header-extra']
|
|
68
65
|
? slots['header-extra']()
|
|
69
66
|
: props.titleExtra)) : null)) : null,
|
|
70
|
-
slots.description || props.description ? (h("div", { class: `${mergedClsPrefix}-thing-main__description
|
|
67
|
+
slots.description || props.description ? (h("div", { class: `${mergedClsPrefix}-thing-main__description`, style: props.descriptionStyle }, slots.description
|
|
71
68
|
? slots.description()
|
|
72
69
|
: props.description)) : null)),
|
|
73
|
-
slots.default || props.content ? (h("div", { class: `${mergedClsPrefix}-thing-main__content
|
|
70
|
+
slots.default || props.content ? (h("div", { class: `${mergedClsPrefix}-thing-main__content`, style: props.contentStyle }, slots.default ? slots.default() : props.content)) : null,
|
|
74
71
|
slots.footer ? (h("div", { class: `${mergedClsPrefix}-thing-main__footer` }, slots.footer())) : null,
|
|
75
72
|
slots.action ? (h("div", { class: `${mergedClsPrefix}-thing-main__action` }, slots.action())) : null)));
|
|
76
73
|
};
|
|
@@ -409,6 +409,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
409
409
|
rippleDuration: string;
|
|
410
410
|
}, any>;
|
|
411
411
|
Input: import("../../_mixins").Theme<"Input", {
|
|
412
|
+
countTextColorDisabled: string;
|
|
412
413
|
countTextColor: string;
|
|
413
414
|
heightTiny: string;
|
|
414
415
|
heightSmall: string;
|
|
@@ -304,6 +304,7 @@ export declare const timePickerProps: {
|
|
|
304
304
|
rippleDuration: string;
|
|
305
305
|
}, any>;
|
|
306
306
|
Input: import("../../_mixins").Theme<"Input", {
|
|
307
|
+
countTextColorDisabled: string;
|
|
307
308
|
countTextColor: string;
|
|
308
309
|
heightTiny: string;
|
|
309
310
|
heightSmall: string;
|
|
@@ -590,6 +591,7 @@ export declare const timePickerProps: {
|
|
|
590
591
|
rippleDuration: string;
|
|
591
592
|
}, any>;
|
|
592
593
|
Input: import("../../_mixins").Theme<"Input", {
|
|
594
|
+
countTextColorDisabled: string;
|
|
593
595
|
countTextColor: string;
|
|
594
596
|
heightTiny: string;
|
|
595
597
|
heightSmall: string;
|
|
@@ -876,6 +878,7 @@ export declare const timePickerProps: {
|
|
|
876
878
|
rippleDuration: string;
|
|
877
879
|
}, any>;
|
|
878
880
|
Input: import("../../_mixins").Theme<"Input", {
|
|
881
|
+
countTextColorDisabled: string;
|
|
879
882
|
countTextColor: string;
|
|
880
883
|
heightTiny: string;
|
|
881
884
|
heightSmall: string;
|
|
@@ -1239,6 +1242,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1239
1242
|
rippleDuration: string;
|
|
1240
1243
|
}, any>;
|
|
1241
1244
|
Input: import("../../_mixins").Theme<"Input", {
|
|
1245
|
+
countTextColorDisabled: string;
|
|
1242
1246
|
countTextColor: string;
|
|
1243
1247
|
heightTiny: string;
|
|
1244
1248
|
heightSmall: string;
|
|
@@ -1525,6 +1529,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1525
1529
|
rippleDuration: string;
|
|
1526
1530
|
}, any>;
|
|
1527
1531
|
Input: import("../../_mixins").Theme<"Input", {
|
|
1532
|
+
countTextColorDisabled: string;
|
|
1528
1533
|
countTextColor: string;
|
|
1529
1534
|
heightTiny: string;
|
|
1530
1535
|
heightSmall: string;
|
|
@@ -1811,6 +1816,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1811
1816
|
rippleDuration: string;
|
|
1812
1817
|
}, any>;
|
|
1813
1818
|
Input: import("../../_mixins").Theme<"Input", {
|
|
1819
|
+
countTextColorDisabled: string;
|
|
1814
1820
|
countTextColor: string;
|
|
1815
1821
|
heightTiny: string;
|
|
1816
1822
|
heightSmall: string;
|
|
@@ -2318,6 +2324,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2318
2324
|
rippleDuration: string;
|
|
2319
2325
|
}, any>;
|
|
2320
2326
|
Input: import("../../_mixins").Theme<"Input", {
|
|
2327
|
+
countTextColorDisabled: string;
|
|
2321
2328
|
countTextColor: string;
|
|
2322
2329
|
heightTiny: string;
|
|
2323
2330
|
heightSmall: string;
|
|
@@ -2397,8 +2404,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2397
2404
|
};
|
|
2398
2405
|
}>;
|
|
2399
2406
|
triggerCssVars: import("vue").ComputedRef<{
|
|
2400
|
-
'--n-icon-color': string;
|
|
2401
|
-
'--n-icon-color-disabled': string;
|
|
2407
|
+
'--n-icon-color-override': string;
|
|
2408
|
+
'--n-icon-color-disabled-override': string;
|
|
2402
2409
|
'--n-bezier': string;
|
|
2403
2410
|
}> | undefined;
|
|
2404
2411
|
triggerThemeClass: import("vue").Ref<string> | undefined;
|
|
@@ -2722,6 +2729,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2722
2729
|
rippleDuration: string;
|
|
2723
2730
|
}, any>;
|
|
2724
2731
|
Input: import("../../_mixins").Theme<"Input", {
|
|
2732
|
+
countTextColorDisabled: string;
|
|
2725
2733
|
countTextColor: string;
|
|
2726
2734
|
heightTiny: string;
|
|
2727
2735
|
heightSmall: string;
|
|
@@ -3008,6 +3016,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3008
3016
|
rippleDuration: string;
|
|
3009
3017
|
}, any>;
|
|
3010
3018
|
Input: import("../../_mixins").Theme<"Input", {
|
|
3019
|
+
countTextColorDisabled: string;
|
|
3011
3020
|
countTextColor: string;
|
|
3012
3021
|
heightTiny: string;
|
|
3013
3022
|
heightSmall: string;
|
|
@@ -3294,6 +3303,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3294
3303
|
rippleDuration: string;
|
|
3295
3304
|
}, any>;
|
|
3296
3305
|
Input: import("../../_mixins").Theme<"Input", {
|
|
3306
|
+
countTextColorDisabled: string;
|
|
3297
3307
|
countTextColor: string;
|
|
3298
3308
|
heightTiny: string;
|
|
3299
3309
|
heightSmall: string;
|
|
@@ -2,7 +2,7 @@ import { h, ref, toRef, defineComponent, computed, withDirectives, Transition, p
|
|
|
2
2
|
import { useIsMounted, useKeyboard, useMergedState } from 'vooks';
|
|
3
3
|
import { VBinder, VTarget, VFollower } from 'vueuc';
|
|
4
4
|
import { clickoutside } from 'vdirs';
|
|
5
|
-
import { happensIn } from 'seemly';
|
|
5
|
+
import { getPreciseEventTarget, happensIn } from 'seemly';
|
|
6
6
|
import { isValid, startOfSecond, startOfMinute, startOfHour, format, set, setHours, setMinutes, setSeconds, getTime, getMinutes, getHours, getSeconds } from 'date-fns/esm';
|
|
7
7
|
import formatInTimeZone from 'date-fns-tz/esm/formatInTimeZone';
|
|
8
8
|
import { strictParse } from '../../date-picker/src/utils';
|
|
@@ -472,7 +472,7 @@ export default defineComponent({
|
|
|
472
472
|
function handleClickOutside(e) {
|
|
473
473
|
var _a, _b;
|
|
474
474
|
if (mergedShowRef.value &&
|
|
475
|
-
!((_b = (_a = inputInstRef.value) === null || _a === void 0 ? void 0 : _a.wrapperElRef) === null || _b === void 0 ? void 0 : _b.contains(e
|
|
475
|
+
!((_b = (_a = inputInstRef.value) === null || _a === void 0 ? void 0 : _a.wrapperElRef) === null || _b === void 0 ? void 0 : _b.contains(getPreciseEventTarget(e)))) {
|
|
476
476
|
closePanel({
|
|
477
477
|
returnFocus: false
|
|
478
478
|
});
|
|
@@ -569,8 +569,8 @@ export default defineComponent({
|
|
|
569
569
|
const triggerCssVarsRef = computed(() => {
|
|
570
570
|
const { common: { cubicBezierEaseInOut }, self: { iconColor, iconColorDisabled } } = themeRef.value;
|
|
571
571
|
return {
|
|
572
|
-
'--n-icon-color': iconColor,
|
|
573
|
-
'--n-icon-color-disabled': iconColorDisabled,
|
|
572
|
+
'--n-icon-color-override': iconColor,
|
|
573
|
+
'--n-icon-color-disabled-override': iconColorDisabled,
|
|
574
574
|
'--n-bezier': cubicBezierEaseInOut
|
|
575
575
|
};
|
|
576
576
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c, cE, cM, cB, cNotM } from '../../../_utils/cssr';
|
|
2
2
|
import { fadeInScaleUpTransition } from '../../../_styles/transitions/fade-in-scale-up.cssr'; // vars:
|
|
3
|
-
// --n-icon-color
|
|
4
|
-
// --n-icon-color-disabled
|
|
3
|
+
// --n-icon-color-override
|
|
4
|
+
// --n-icon-color-disabled-override
|
|
5
5
|
// --n-bezier
|
|
6
6
|
// --n-border-radius
|
|
7
7
|
// --n-item-color-hover
|
|
@@ -21,11 +21,11 @@ export default c([cB('time-picker', `
|
|
|
21
21
|
z-index: auto;
|
|
22
22
|
position: relative;
|
|
23
23
|
`, [cB('time-picker-icon', `
|
|
24
|
-
color: var(--n-icon-color);
|
|
24
|
+
color: var(--n-icon-color-override);
|
|
25
25
|
transition: color .3s var(--n-bezier);
|
|
26
|
-
`), cM('disabled', [cB('time-picker-icon',
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
`), cM('disabled', [cB('time-picker-icon', `
|
|
27
|
+
color: var(--n-icon-color-disabled-override);
|
|
28
|
+
`)])]), cB('time-picker-panel', `
|
|
29
29
|
transition:
|
|
30
30
|
box-shadow .3s var(--n-bezier),
|
|
31
31
|
background-color .3s var(--n-bezier);
|
|
@@ -54,9 +54,9 @@ export default c([cB('time-picker', `
|
|
|
54
54
|
height: calc(var(--n-item-height) * 6);
|
|
55
55
|
flex-direction: column;
|
|
56
56
|
transition: box-shadow .3s var(--n-bezier);
|
|
57
|
-
`, [cM('transition-disabled', [cE('item', 'transition: none;', [c('&::before', 'transition: none;')])]), cE('padding',
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
`, [cM('transition-disabled', [cE('item', 'transition: none;', [c('&::before', 'transition: none;')])]), cE('padding', `
|
|
58
|
+
height: calc(var(--n-item-height) * 5);
|
|
59
|
+
`), c('&:first-child', 'min-width: calc(var(--n-item-width) + 4px);', [cE('item', [c('&::before', 'left: 4px;')])]), cE('item', `
|
|
60
60
|
cursor: pointer;
|
|
61
61
|
height: var(--n-item-height);
|
|
62
62
|
display: flex;
|
|
@@ -84,9 +84,9 @@ export default c([cB('time-picker', `
|
|
|
84
84
|
top: 4px;
|
|
85
85
|
bottom: 0;
|
|
86
86
|
border-radius: var(--n-item-border-radius);
|
|
87
|
-
`), cNotM('disabled', [c('&:hover::before',
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
`), cNotM('disabled', [c('&:hover::before', `
|
|
88
|
+
background-color: var(--n-item-color-hover);
|
|
89
|
+
`)]), cM('active', `
|
|
90
90
|
color: var(--n-item-text-color-active);
|
|
91
91
|
`, [c('&::before', `
|
|
92
92
|
background-color: var(--n-item-color-hover);
|
|
@@ -243,6 +243,7 @@ declare const timePickerLight: import("../../_mixins").Theme<"TimePicker", {
|
|
|
243
243
|
rippleDuration: string;
|
|
244
244
|
}, any>;
|
|
245
245
|
Input: import("../../_mixins").Theme<"Input", {
|
|
246
|
+
countTextColorDisabled: string;
|
|
246
247
|
countTextColor: string;
|
|
247
248
|
heightTiny: string;
|
|
248
249
|
heightSmall: string;
|
|
@@ -71,7 +71,7 @@ export default defineComponent({
|
|
|
71
71
|
h("div", { class: `${mergedClsPrefix}-timeline-item-timeline` },
|
|
72
72
|
h("div", { class: `${mergedClsPrefix}-timeline-item-timeline__line` }),
|
|
73
73
|
resolveWrappedSlot($slots.icon, (children) => {
|
|
74
|
-
return children ? (h("div", { class: `${mergedClsPrefix}-timeline-item-timeline__icon`, style: { color
|
|
74
|
+
return children ? (h("div", { class: `${mergedClsPrefix}-timeline-item-timeline__icon`, style: { color } }, children)) : (h("div", { class: `${mergedClsPrefix}-timeline-item-timeline__circle`, style: { borderColor: color } }));
|
|
75
75
|
})),
|
|
76
76
|
h("div", { class: `${mergedClsPrefix}-timeline-item-content` },
|
|
77
77
|
resolveWrappedSlot($slots.header, (children) => {
|
|
@@ -9,7 +9,7 @@ const tooltipDark = {
|
|
|
9
9
|
},
|
|
10
10
|
self(vars) {
|
|
11
11
|
const { borderRadius, boxShadow2, popoverColor, textColor2 } = vars;
|
|
12
|
-
return Object.assign(Object.assign({}, commonVars), { borderRadius
|
|
12
|
+
return Object.assign(Object.assign({}, commonVars), { borderRadius, boxShadow: boxShadow2, color: popoverColor, textColor: textColor2 });
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
export default tooltipDark;
|
|
@@ -5,7 +5,7 @@ import { createTheme } from '../../_mixins/use-theme';
|
|
|
5
5
|
import { composite } from 'seemly';
|
|
6
6
|
const self = (vars) => {
|
|
7
7
|
const { borderRadius, boxShadow2, baseColor } = vars;
|
|
8
|
-
return Object.assign(Object.assign({}, commonVars), { borderRadius
|
|
8
|
+
return Object.assign(Object.assign({}, commonVars), { borderRadius, boxShadow: boxShadow2, color: composite(baseColor, 'rgba(0, 0, 0, .85)'), textColor: baseColor });
|
|
9
9
|
};
|
|
10
10
|
const tooltipLight = createTheme({
|
|
11
11
|
name: 'Tooltip',
|
|
@@ -19,7 +19,12 @@ export declare const transferProps: {
|
|
|
19
19
|
readonly virtualScroll: BooleanConstructor;
|
|
20
20
|
readonly sourceTitle: StringConstructor;
|
|
21
21
|
readonly targetTitle: StringConstructor;
|
|
22
|
-
readonly filterable:
|
|
22
|
+
readonly filterable: {
|
|
23
|
+
readonly type: BooleanConstructor;
|
|
24
|
+
readonly default: undefined;
|
|
25
|
+
};
|
|
26
|
+
readonly sourceFilterable: BooleanConstructor;
|
|
27
|
+
readonly targetFilterable: BooleanConstructor;
|
|
23
28
|
readonly sourceFilterPlaceholder: StringConstructor;
|
|
24
29
|
readonly targetFilterPlaceholder: StringConstructor;
|
|
25
30
|
readonly filter: {
|
|
@@ -104,6 +109,7 @@ export declare const transferProps: {
|
|
|
104
109
|
colorHover: string;
|
|
105
110
|
}, any>;
|
|
106
111
|
Input: import("../../_mixins").Theme<"Input", {
|
|
112
|
+
countTextColorDisabled: string;
|
|
107
113
|
countTextColor: string;
|
|
108
114
|
heightTiny: string;
|
|
109
115
|
heightSmall: string;
|
|
@@ -452,6 +458,7 @@ export declare const transferProps: {
|
|
|
452
458
|
colorHover: string;
|
|
453
459
|
}, any>;
|
|
454
460
|
Input: import("../../_mixins").Theme<"Input", {
|
|
461
|
+
countTextColorDisabled: string;
|
|
455
462
|
countTextColor: string;
|
|
456
463
|
heightTiny: string;
|
|
457
464
|
heightSmall: string;
|
|
@@ -800,6 +807,7 @@ export declare const transferProps: {
|
|
|
800
807
|
colorHover: string;
|
|
801
808
|
}, any>;
|
|
802
809
|
Input: import("../../_mixins").Theme<"Input", {
|
|
810
|
+
countTextColorDisabled: string;
|
|
803
811
|
countTextColor: string;
|
|
804
812
|
heightTiny: string;
|
|
805
813
|
heightSmall: string;
|
|
@@ -1096,7 +1104,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1096
1104
|
readonly virtualScroll: BooleanConstructor;
|
|
1097
1105
|
readonly sourceTitle: StringConstructor;
|
|
1098
1106
|
readonly targetTitle: StringConstructor;
|
|
1099
|
-
readonly filterable:
|
|
1107
|
+
readonly filterable: {
|
|
1108
|
+
readonly type: BooleanConstructor;
|
|
1109
|
+
readonly default: undefined;
|
|
1110
|
+
};
|
|
1111
|
+
readonly sourceFilterable: BooleanConstructor;
|
|
1112
|
+
readonly targetFilterable: BooleanConstructor;
|
|
1100
1113
|
readonly sourceFilterPlaceholder: StringConstructor;
|
|
1101
1114
|
readonly targetFilterPlaceholder: StringConstructor;
|
|
1102
1115
|
readonly filter: {
|
|
@@ -1181,6 +1194,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1181
1194
|
colorHover: string;
|
|
1182
1195
|
}, any>;
|
|
1183
1196
|
Input: import("../../_mixins").Theme<"Input", {
|
|
1197
|
+
countTextColorDisabled: string;
|
|
1184
1198
|
countTextColor: string;
|
|
1185
1199
|
heightTiny: string;
|
|
1186
1200
|
heightSmall: string;
|
|
@@ -1529,6 +1543,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1529
1543
|
colorHover: string;
|
|
1530
1544
|
}, any>;
|
|
1531
1545
|
Input: import("../../_mixins").Theme<"Input", {
|
|
1546
|
+
countTextColorDisabled: string;
|
|
1532
1547
|
countTextColor: string;
|
|
1533
1548
|
heightTiny: string;
|
|
1534
1549
|
heightSmall: string;
|
|
@@ -1877,6 +1892,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1877
1892
|
colorHover: string;
|
|
1878
1893
|
}, any>;
|
|
1879
1894
|
Input: import("../../_mixins").Theme<"Input", {
|
|
1895
|
+
countTextColorDisabled: string;
|
|
1880
1896
|
countTextColor: string;
|
|
1881
1897
|
heightTiny: string;
|
|
1882
1898
|
heightSmall: string;
|
|
@@ -2337,6 +2353,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2337
2353
|
colorHover: string;
|
|
2338
2354
|
}, any>;
|
|
2339
2355
|
Input: import("../../_mixins").Theme<"Input", {
|
|
2356
|
+
countTextColorDisabled: string;
|
|
2340
2357
|
countTextColor: string;
|
|
2341
2358
|
heightTiny: string;
|
|
2342
2359
|
heightSmall: string;
|
|
@@ -2643,12 +2660,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2643
2660
|
};
|
|
2644
2661
|
}>;
|
|
2645
2662
|
filteredSrcOpts: import("vue").ComputedRef<Option[]>;
|
|
2646
|
-
|
|
2663
|
+
filteredTgtOpts: import("vue").ComputedRef<Option[]>;
|
|
2647
2664
|
srcPattern: import("vue").Ref<string>;
|
|
2665
|
+
tgtPattern: import("vue").Ref<string>;
|
|
2648
2666
|
mergedSize: import("vue").ComputedRef<"small" | "medium" | "large">;
|
|
2667
|
+
mergedSrcFilterable: import("vue").ComputedRef<Boolean>;
|
|
2649
2668
|
handleSrcFilterUpdateValue: (value: string | null) => void;
|
|
2650
|
-
|
|
2651
|
-
|
|
2669
|
+
handleTgtFilterUpdateValue: (value: string | null) => void;
|
|
2670
|
+
handleSourceCheckAll: () => void;
|
|
2671
|
+
handleSourceUncheckAll: () => void;
|
|
2672
|
+
handleTargetClearAll: () => void;
|
|
2652
2673
|
handleItemCheck: (checked: boolean, optionValue: OptionValue) => void;
|
|
2653
2674
|
handleChecked: (optionValueList: OptionValue[]) => void;
|
|
2654
2675
|
cssVars: import("vue").ComputedRef<{
|
|
@@ -2695,7 +2716,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2695
2716
|
readonly virtualScroll: BooleanConstructor;
|
|
2696
2717
|
readonly sourceTitle: StringConstructor;
|
|
2697
2718
|
readonly targetTitle: StringConstructor;
|
|
2698
|
-
readonly filterable:
|
|
2719
|
+
readonly filterable: {
|
|
2720
|
+
readonly type: BooleanConstructor;
|
|
2721
|
+
readonly default: undefined;
|
|
2722
|
+
};
|
|
2723
|
+
readonly sourceFilterable: BooleanConstructor;
|
|
2724
|
+
readonly targetFilterable: BooleanConstructor;
|
|
2699
2725
|
readonly sourceFilterPlaceholder: StringConstructor;
|
|
2700
2726
|
readonly targetFilterPlaceholder: StringConstructor;
|
|
2701
2727
|
readonly filter: {
|
|
@@ -2780,6 +2806,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2780
2806
|
colorHover: string;
|
|
2781
2807
|
}, any>;
|
|
2782
2808
|
Input: import("../../_mixins").Theme<"Input", {
|
|
2809
|
+
countTextColorDisabled: string;
|
|
2783
2810
|
countTextColor: string;
|
|
2784
2811
|
heightTiny: string;
|
|
2785
2812
|
heightSmall: string;
|
|
@@ -3128,6 +3155,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3128
3155
|
colorHover: string;
|
|
3129
3156
|
}, any>;
|
|
3130
3157
|
Input: import("../../_mixins").Theme<"Input", {
|
|
3158
|
+
countTextColorDisabled: string;
|
|
3131
3159
|
countTextColor: string;
|
|
3132
3160
|
heightTiny: string;
|
|
3133
3161
|
heightSmall: string;
|
|
@@ -3476,6 +3504,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3476
3504
|
colorHover: string;
|
|
3477
3505
|
}, any>;
|
|
3478
3506
|
Input: import("../../_mixins").Theme<"Input", {
|
|
3507
|
+
countTextColorDisabled: string;
|
|
3479
3508
|
countTextColor: string;
|
|
3480
3509
|
heightTiny: string;
|
|
3481
3510
|
heightSmall: string;
|
|
@@ -3760,5 +3789,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3760
3789
|
readonly virtualScroll: boolean;
|
|
3761
3790
|
readonly filterable: boolean;
|
|
3762
3791
|
readonly defaultValue: OptionValue[] | null;
|
|
3792
|
+
readonly sourceFilterable: boolean;
|
|
3793
|
+
readonly targetFilterable: boolean;
|
|
3763
3794
|
}>;
|
|
3764
3795
|
export default _default;
|
|
@@ -21,7 +21,10 @@ export const transferProps = Object.assign(Object.assign({}, useTheme.props), {
|
|
|
21
21
|
}, disabled: {
|
|
22
22
|
type: Boolean,
|
|
23
23
|
default: undefined
|
|
24
|
-
}, virtualScroll: Boolean, sourceTitle: String, targetTitle: String, filterable:
|
|
24
|
+
}, virtualScroll: Boolean, sourceTitle: String, targetTitle: String, filterable: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: undefined
|
|
27
|
+
}, sourceFilterable: Boolean, targetFilterable: Boolean, sourceFilterPlaceholder: String, targetFilterPlaceholder: String, filter: {
|
|
25
28
|
type: Function,
|
|
26
29
|
default: (pattern, option) => {
|
|
27
30
|
if (!pattern)
|
|
@@ -40,6 +43,9 @@ export default defineComponent({
|
|
|
40
43
|
if (props.onChange !== undefined) {
|
|
41
44
|
warnOnce('transfer', '`on-change` is deprecated, please use `on-update:value` instead.');
|
|
42
45
|
}
|
|
46
|
+
if (props.filterable !== undefined) {
|
|
47
|
+
warnOnce('transfer', '`filterable` is deprecated, please use `source-filterable` or `target-filterable` instead.');
|
|
48
|
+
}
|
|
43
49
|
});
|
|
44
50
|
}
|
|
45
51
|
const { mergedClsPrefixRef } = useConfig(props);
|
|
@@ -51,7 +57,7 @@ export default defineComponent({
|
|
|
51
57
|
const { self: { [createKey('itemHeight', size)]: itemSize } } = themeRef.value;
|
|
52
58
|
return depx(itemSize);
|
|
53
59
|
});
|
|
54
|
-
const { uncontrolledValueRef, mergedValueRef, targetValueSetRef,
|
|
60
|
+
const { uncontrolledValueRef, mergedValueRef, targetValueSetRef, valueSetForCheckAllRef, valueSetForUncheckAllRef, valueSetForClearRef, filteredTgtOptionsRef, filteredSrcOptionsRef, targetOptionsRef, canNotSelectAnythingRef, canBeClearedRef, allCheckedRef, srcPatternRef, tgtPatternRef, mergedSrcFilterableRef, handleSrcFilterUpdateValue, handleTgtFilterUpdateValue } = useTransferData(props);
|
|
55
61
|
function doUpdateValue(value) {
|
|
56
62
|
const { onUpdateValue, 'onUpdate:value': _onUpdateValue, onChange } = props;
|
|
57
63
|
const { nTriggerFormInput, nTriggerFormChange } = formItem;
|
|
@@ -65,22 +71,21 @@ export default defineComponent({
|
|
|
65
71
|
nTriggerFormInput();
|
|
66
72
|
nTriggerFormChange();
|
|
67
73
|
}
|
|
68
|
-
function
|
|
69
|
-
doUpdateValue([...
|
|
74
|
+
function handleSourceCheckAll() {
|
|
75
|
+
doUpdateValue([...valueSetForCheckAllRef.value]);
|
|
70
76
|
}
|
|
71
|
-
function
|
|
72
|
-
doUpdateValue([...
|
|
77
|
+
function handleSourceUncheckAll() {
|
|
78
|
+
doUpdateValue([...valueSetForUncheckAllRef.value]);
|
|
79
|
+
}
|
|
80
|
+
function handleTargetClearAll() {
|
|
81
|
+
doUpdateValue([...valueSetForClearRef.value]);
|
|
73
82
|
}
|
|
74
83
|
function handleItemCheck(checked, optionValue) {
|
|
75
84
|
if (checked) {
|
|
76
|
-
doUpdateValue(
|
|
85
|
+
doUpdateValue((mergedValueRef.value || []).concat(optionValue));
|
|
77
86
|
}
|
|
78
87
|
else {
|
|
79
|
-
|
|
80
|
-
if (~index) {
|
|
81
|
-
;
|
|
82
|
-
(mergedValueRef.value || []).splice(index, 1);
|
|
83
|
-
}
|
|
88
|
+
doUpdateValue((mergedValueRef.value || []).filter((v) => v !== optionValue));
|
|
84
89
|
}
|
|
85
90
|
}
|
|
86
91
|
function handleChecked(optionValueList) {
|
|
@@ -107,12 +112,16 @@ export default defineComponent({
|
|
|
107
112
|
isMounted: useIsMounted(),
|
|
108
113
|
mergedTheme: themeRef,
|
|
109
114
|
filteredSrcOpts: filteredSrcOptionsRef,
|
|
110
|
-
|
|
115
|
+
filteredTgtOpts: filteredTgtOptionsRef,
|
|
111
116
|
srcPattern: srcPatternRef,
|
|
117
|
+
tgtPattern: tgtPatternRef,
|
|
112
118
|
mergedSize: mergedSizeRef,
|
|
119
|
+
mergedSrcFilterable: mergedSrcFilterableRef,
|
|
113
120
|
handleSrcFilterUpdateValue,
|
|
114
|
-
|
|
115
|
-
|
|
121
|
+
handleTgtFilterUpdateValue,
|
|
122
|
+
handleSourceCheckAll,
|
|
123
|
+
handleSourceUncheckAll,
|
|
124
|
+
handleTargetClearAll,
|
|
116
125
|
handleItemCheck,
|
|
117
126
|
handleChecked,
|
|
118
127
|
cssVars: computed(() => {
|
|
@@ -149,29 +158,29 @@ export default defineComponent({
|
|
|
149
158
|
};
|
|
150
159
|
},
|
|
151
160
|
render() {
|
|
152
|
-
const { mergedClsPrefix, renderSourceList, mergedTheme } = this;
|
|
161
|
+
const { mergedClsPrefix, renderSourceList, mergedTheme, mergedSrcFilterable, targetFilterable } = this;
|
|
153
162
|
return (h("div", { class: [
|
|
154
163
|
`${mergedClsPrefix}-transfer`,
|
|
155
|
-
this.mergedDisabled && `${mergedClsPrefix}-transfer--disabled
|
|
156
|
-
this.filterable && `${mergedClsPrefix}-transfer--filterable`
|
|
164
|
+
this.mergedDisabled && `${mergedClsPrefix}-transfer--disabled`
|
|
157
165
|
], style: this.cssVars },
|
|
158
166
|
h("div", { class: `${mergedClsPrefix}-transfer-list ${mergedClsPrefix}-transfer-list--source` },
|
|
159
|
-
h(NTransferHeader, { source: true, title: this.sourceTitle, onCheckedAll: this.
|
|
167
|
+
h(NTransferHeader, { source: true, title: this.sourceTitle, onCheckedAll: this.handleSourceCheckAll, onClearAll: this.handleSourceUncheckAll, size: this.mergedSize }),
|
|
160
168
|
h("div", { class: `${mergedClsPrefix}-transfer-list-body` },
|
|
161
|
-
|
|
169
|
+
mergedSrcFilterable ? (h(NTransferFilter, { onUpdateValue: this.handleSrcFilterUpdateValue, value: this.srcPattern, disabled: this.mergedDisabled, placeholder: this.sourceFilterPlaceholder })) : null,
|
|
162
170
|
h("div", { class: `${mergedClsPrefix}-transfer-list-flex-container` }, renderSourceList ? (h(NScrollbar, { theme: mergedTheme.peers.Scrollbar, themeOverrides: mergedTheme.peerOverrides.Scrollbar }, {
|
|
163
171
|
default: () => renderSourceList({
|
|
164
172
|
onCheck: this.handleChecked,
|
|
165
|
-
checkedOptions: this.
|
|
173
|
+
checkedOptions: this.filteredTgtOpts,
|
|
166
174
|
pattern: this.srcPattern
|
|
167
175
|
})
|
|
168
176
|
})) : (h(NTransferList, { source: true, options: this.filteredSrcOpts, disabled: this.mergedDisabled, virtualScroll: this.virtualScroll, itemSize: this.itemSize })))),
|
|
169
177
|
h("div", { class: `${mergedClsPrefix}-transfer-list__border` })),
|
|
170
178
|
h("div", { class: `${mergedClsPrefix}-transfer-list ${mergedClsPrefix}-transfer-list--target` },
|
|
171
|
-
h(NTransferHeader, { onClearAll: this.
|
|
179
|
+
h(NTransferHeader, { onClearAll: this.handleTargetClearAll, size: this.mergedSize, title: this.targetTitle }),
|
|
172
180
|
h("div", { class: `${mergedClsPrefix}-transfer-list-body` },
|
|
181
|
+
targetFilterable ? (h(NTransferFilter, { onUpdateValue: this.handleTgtFilterUpdateValue, value: this.tgtPattern, disabled: this.mergedDisabled, placeholder: this.sourceFilterPlaceholder })) : null,
|
|
173
182
|
h("div", { class: `${mergedClsPrefix}-transfer-list-flex-container` },
|
|
174
|
-
h(NTransferList, { options: this.
|
|
183
|
+
h(NTransferList, { options: this.filteredTgtOpts, disabled: this.mergedDisabled, virtualScroll: this.virtualScroll, itemSize: this.itemSize }))),
|
|
175
184
|
h("div", { class: `${mergedClsPrefix}-transfer-list__border` }))));
|
|
176
185
|
}
|
|
177
186
|
});
|
|
@@ -187,6 +187,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
187
187
|
colorHover: string;
|
|
188
188
|
}, any>;
|
|
189
189
|
Input: import("../../_mixins").Theme<"Input", {
|
|
190
|
+
countTextColorDisabled: string;
|
|
190
191
|
countTextColor: string;
|
|
191
192
|
heightTiny: string;
|
|
192
193
|
heightSmall: string;
|
|
@@ -197,6 +197,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
197
197
|
colorHover: string;
|
|
198
198
|
}, any>;
|
|
199
199
|
Input: import("../../_mixins").Theme<"Input", {
|
|
200
|
+
countTextColorDisabled: string;
|
|
200
201
|
countTextColor: string;
|
|
201
202
|
heightTiny: string;
|
|
202
203
|
heightSmall: string;
|
|
@@ -70,7 +70,7 @@ export default defineComponent({
|
|
|
70
70
|
const { source, disabled } = this;
|
|
71
71
|
return (h(NTransferListItem, { source: source, key: item.value, value: item.value, disabled: item.disabled || disabled, label: item.label, option: item }));
|
|
72
72
|
}
|
|
73
|
-
})) : (h("div", { class: `${mergedClsPrefix}-transfer-list-content` },
|
|
73
|
+
})) : (h("div", { class: `${mergedClsPrefix}-transfer-list-content` }, options.map((option) => (h(NTransferListItem, { source: source, key: option.value, value: option.value, disabled: option.disabled || disabled, label: option.label, option: option })))))
|
|
74
74
|
}));
|
|
75
75
|
}
|
|
76
76
|
});
|