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
|
@@ -9,6 +9,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
9
9
|
}, {
|
|
10
10
|
getScrollContainer: () => HTMLElement | null;
|
|
11
11
|
scrollTo: import("../../../scrollbar/src/Scrollbar").ScrollTo;
|
|
12
|
+
bodyWidth: import("vue").Ref<number | null>;
|
|
12
13
|
dataTableSlots: Readonly<{
|
|
13
14
|
[name: string]: import("vue").Slot | undefined;
|
|
14
15
|
}>;
|
|
@@ -658,6 +659,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
658
659
|
}>;
|
|
659
660
|
}>;
|
|
660
661
|
Input: import("../../../_mixins").Theme<"Input", {
|
|
662
|
+
countTextColorDisabled: string;
|
|
661
663
|
countTextColor: string;
|
|
662
664
|
heightTiny: string;
|
|
663
665
|
heightSmall: string;
|
|
@@ -990,6 +992,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
990
992
|
}>;
|
|
991
993
|
}>> | undefined;
|
|
992
994
|
Input?: import("../../../_mixins/use-theme").ExtractThemeOverrides<import("../../../_mixins").Theme<"Input", {
|
|
995
|
+
countTextColorDisabled: string;
|
|
993
996
|
countTextColor: string;
|
|
994
997
|
heightTiny: string;
|
|
995
998
|
heightSmall: string;
|
|
@@ -1202,6 +1205,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1202
1205
|
rowProps: import("vue").Ref<import("../interface").CreateRowProps<import("../interface").InternalRowData> | undefined>;
|
|
1203
1206
|
maxHeight: import("vue").Ref<string | number | undefined>;
|
|
1204
1207
|
loadingKeySet: import("vue").Ref<Set<RowKey>>;
|
|
1208
|
+
expandable: import("vue").Ref<import("../interface").Expandable<any> | undefined>;
|
|
1209
|
+
stickyExpandedRows: import("vue").Ref<boolean>;
|
|
1210
|
+
renderExpandIcon: import("vue").Ref<(() => import("vue").VNodeChild) | undefined>;
|
|
1205
1211
|
setHeaderScrollLeft: (scrollLeft: number) => void;
|
|
1206
1212
|
handleMouseenterTable: () => void;
|
|
1207
1213
|
handleVirtualListScroll: (e: Event) => void;
|
|
@@ -80,7 +80,7 @@ export default defineComponent({
|
|
|
80
80
|
bodyStyle: Object
|
|
81
81
|
},
|
|
82
82
|
setup(props) {
|
|
83
|
-
const { slots: dataTableSlots, mergedExpandedRowKeysRef, mergedClsPrefixRef, mergedThemeRef, scrollXRef, colsRef, paginatedDataRef, rawPaginatedDataRef, fixedColumnLeftMapRef, fixedColumnRightMapRef, mergedCurrentPageRef, rowClassNameRef, leftActiveFixedColKeyRef, leftActiveFixedChildrenColKeysRef, rightActiveFixedColKeyRef, rightActiveFixedChildrenColKeysRef, renderExpandRef, hoverKeyRef, summaryRef, mergedSortStateRef, virtualScrollRef, componentId, scrollPartRef, mergedTableLayoutRef, childTriggerColIndexRef, indentRef, rowPropsRef, maxHeightRef, stripedRef, loadingRef, onLoadRef, loadingKeySetRef, setHeaderScrollLeft, doUpdateExpandedRowKeys, handleTableBodyScroll, doCheck, doUncheck, renderCell
|
|
83
|
+
const { slots: dataTableSlots, bodyWidthRef, mergedExpandedRowKeysRef, mergedClsPrefixRef, mergedThemeRef, scrollXRef, colsRef, paginatedDataRef, rawPaginatedDataRef, fixedColumnLeftMapRef, fixedColumnRightMapRef, mergedCurrentPageRef, rowClassNameRef, leftActiveFixedColKeyRef, leftActiveFixedChildrenColKeysRef, rightActiveFixedColKeyRef, rightActiveFixedChildrenColKeysRef, renderExpandRef, hoverKeyRef, summaryRef, mergedSortStateRef, virtualScrollRef, componentId, scrollPartRef, mergedTableLayoutRef, childTriggerColIndexRef, indentRef, rowPropsRef, maxHeightRef, stripedRef, loadingRef, onLoadRef, loadingKeySetRef, expandableRef, stickyExpandedRowsRef, renderExpandIconRef, setHeaderScrollLeft, doUpdateExpandedRowKeys, handleTableBodyScroll, doCheck, doUncheck, renderCell
|
|
84
84
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
85
85
|
} = inject(dataTableInjectionKey);
|
|
86
86
|
const scrollbarInstRef = ref(null);
|
|
@@ -275,7 +275,7 @@ export default defineComponent({
|
|
|
275
275
|
id: `n-${componentId}`
|
|
276
276
|
});
|
|
277
277
|
});
|
|
278
|
-
return Object.assign({ dataTableSlots,
|
|
278
|
+
return Object.assign({ bodyWidth: bodyWidthRef, dataTableSlots,
|
|
279
279
|
componentId,
|
|
280
280
|
scrollbarInstRef,
|
|
281
281
|
virtualListRef,
|
|
@@ -307,7 +307,7 @@ export default defineComponent({
|
|
|
307
307
|
data,
|
|
308
308
|
hasChildren
|
|
309
309
|
};
|
|
310
|
-
}), rawPaginatedData: rawPaginatedDataRef, fixedColumnLeftMap: fixedColumnLeftMapRef, fixedColumnRightMap: fixedColumnRightMapRef, currentPage: mergedCurrentPageRef, rowClassName: rowClassNameRef, renderExpand: renderExpandRef, mergedExpandedRowKeySet: mergedExpandedRowKeySetRef, hoverKey: hoverKeyRef, mergedSortState: mergedSortStateRef, virtualScroll: virtualScrollRef, mergedTableLayout: mergedTableLayoutRef, childTriggerColIndex: childTriggerColIndexRef, indent: indentRef, rowProps: rowPropsRef, maxHeight: maxHeightRef, loadingKeySet: loadingKeySetRef, setHeaderScrollLeft,
|
|
310
|
+
}), rawPaginatedData: rawPaginatedDataRef, fixedColumnLeftMap: fixedColumnLeftMapRef, fixedColumnRightMap: fixedColumnRightMapRef, currentPage: mergedCurrentPageRef, rowClassName: rowClassNameRef, renderExpand: renderExpandRef, mergedExpandedRowKeySet: mergedExpandedRowKeySetRef, hoverKey: hoverKeyRef, mergedSortState: mergedSortStateRef, virtualScroll: virtualScrollRef, mergedTableLayout: mergedTableLayoutRef, childTriggerColIndex: childTriggerColIndexRef, indent: indentRef, rowProps: rowPropsRef, maxHeight: maxHeightRef, loadingKeySet: loadingKeySetRef, expandable: expandableRef, stickyExpandedRows: stickyExpandedRowsRef, renderExpandIcon: renderExpandIconRef, setHeaderScrollLeft,
|
|
311
311
|
handleMouseenterTable,
|
|
312
312
|
handleVirtualListScroll,
|
|
313
313
|
handleVirtualListResize,
|
|
@@ -340,7 +340,7 @@ export default defineComponent({
|
|
|
340
340
|
const cordToPass = {};
|
|
341
341
|
// coordinate to related hover keys
|
|
342
342
|
const cordKey = {};
|
|
343
|
-
const { cols, paginatedDataAndInfo, mergedTheme, fixedColumnLeftMap, fixedColumnRightMap, currentPage, rowClassName, mergedSortState, mergedExpandedRowKeySet, componentId, childTriggerColIndex, rowProps, handleMouseenterTable, handleMouseleaveTable, renderExpand, summary, handleCheckboxUpdateChecked, handleRadioUpdateChecked, handleUpdateExpanded } = this;
|
|
343
|
+
const { cols, paginatedDataAndInfo, mergedTheme, fixedColumnLeftMap, fixedColumnRightMap, currentPage, rowClassName, mergedSortState, mergedExpandedRowKeySet, stickyExpandedRows, componentId, childTriggerColIndex, expandable, rowProps, handleMouseenterTable, handleMouseleaveTable, renderExpand, summary, handleCheckboxUpdateChecked, handleRadioUpdateChecked, handleUpdateExpanded } = this;
|
|
344
344
|
const { length: colCount } = cols;
|
|
345
345
|
let mergedData;
|
|
346
346
|
// if there is children in data, we should expand mergedData first
|
|
@@ -388,7 +388,9 @@ export default defineComponent({
|
|
|
388
388
|
// Tile the data of the expanded row
|
|
389
389
|
const displayedData = [];
|
|
390
390
|
mergedData.forEach((rowInfo) => {
|
|
391
|
-
if (renderExpand &&
|
|
391
|
+
if (renderExpand &&
|
|
392
|
+
mergedExpandedRowKeySet.has(rowInfo.key) &&
|
|
393
|
+
(!expandable || expandable(rowInfo.tmNode.rawNode))) {
|
|
392
394
|
displayedData.push(rowInfo, {
|
|
393
395
|
isExpandedRow: true,
|
|
394
396
|
key: `${rowInfo.key}-expand`,
|
|
@@ -405,6 +407,8 @@ export default defineComponent({
|
|
|
405
407
|
paginatedData.forEach(({ tmNode }, rowIndex) => {
|
|
406
408
|
rowIndexToKey[rowIndex] = tmNode.key;
|
|
407
409
|
});
|
|
410
|
+
const bodyWidth = stickyExpandedRows ? this.bodyWidth : null;
|
|
411
|
+
const bodyWidthPx = bodyWidth === null ? undefined : `${bodyWidth}px`;
|
|
408
412
|
const renderRow = (rowInfo, displayedRowIndex, isVirtual) => {
|
|
409
413
|
const { index: actualRowIndex } = rowInfo;
|
|
410
414
|
if ('isExpandedRow' in rowInfo) {
|
|
@@ -415,7 +419,9 @@ export default defineComponent({
|
|
|
415
419
|
`${mergedClsPrefix}-data-table-td--last-col`,
|
|
416
420
|
displayedRowIndex + 1 === rowCount &&
|
|
417
421
|
`${mergedClsPrefix}-data-table-td--last-row`
|
|
418
|
-
], colspan: colCount },
|
|
422
|
+
], colspan: colCount }, stickyExpandedRows ? (h("div", { class: `${mergedClsPrefix}-data-table-expand`, style: {
|
|
423
|
+
width: bodyWidthPx
|
|
424
|
+
} }, renderExpand(rawNode, actualRowIndex))) : (renderExpand(rawNode, actualRowIndex)))));
|
|
419
425
|
}
|
|
420
426
|
const isSummary = 'isSummaryRow' in rowInfo;
|
|
421
427
|
const striped = !isSummary && rowInfo.striped;
|
|
@@ -509,23 +515,25 @@ export default defineComponent({
|
|
|
509
515
|
`${mergedClsPrefix}-data-table-td--fixed-${column.fixed}`,
|
|
510
516
|
column.align &&
|
|
511
517
|
`${mergedClsPrefix}-data-table-td--${column.align}-align`,
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
+
column.type === 'selection' &&
|
|
519
|
+
`${mergedClsPrefix}-data-table-td--selection`,
|
|
520
|
+
column.type === 'expand' &&
|
|
521
|
+
`${mergedClsPrefix}-data-table-td--expand`,
|
|
522
|
+
isLastCol &&
|
|
523
|
+
`${mergedClsPrefix}-data-table-td--last-col`,
|
|
524
|
+
isLastRow &&
|
|
525
|
+
`${mergedClsPrefix}-data-table-td--last-row`
|
|
518
526
|
] }),
|
|
519
527
|
hasChildren && colIndex === childTriggerColIndex
|
|
520
528
|
? [
|
|
521
529
|
repeat(isSummary ? 0 : rowInfo.tmNode.level, h("div", { class: `${mergedClsPrefix}-data-table-indent`, style: indentStyle })),
|
|
522
|
-
isSummary || rowInfo.tmNode.isLeaf ? (h("div", { class: `${mergedClsPrefix}-data-table-expand-placeholder` })) : (h(ExpandTrigger, { class: `${mergedClsPrefix}-data-table-expand-trigger`, clsPrefix: mergedClsPrefix, expanded: expanded, loading: loadingKeySet.has(rowInfo.key), onClick: () => {
|
|
530
|
+
isSummary || rowInfo.tmNode.isLeaf ? (h("div", { class: `${mergedClsPrefix}-data-table-expand-placeholder` })) : (h(ExpandTrigger, { class: `${mergedClsPrefix}-data-table-expand-trigger`, clsPrefix: mergedClsPrefix, expanded: expanded, renderExpandIcon: this.renderExpandIcon, loading: loadingKeySet.has(rowInfo.key), onClick: () => {
|
|
523
531
|
handleUpdateExpanded(rowKey, rowInfo.tmNode);
|
|
524
532
|
} }))
|
|
525
533
|
]
|
|
526
534
|
: null,
|
|
527
535
|
column.type === 'selection' ? (!isSummary ? (column.multiple === false ? (h(RenderSafeRadio, { key: currentPage, rowKey: rowKey, disabled: rowInfo.tmNode.disabled, onUpdateChecked: () => handleRadioUpdateChecked(rowInfo.tmNode) })) : (h(RenderSafeCheckbox, { key: currentPage, rowKey: rowKey, disabled: rowInfo.tmNode.disabled, onUpdateChecked: (checked, e) => handleCheckboxUpdateChecked(rowInfo.tmNode, checked, e.shiftKey) }))) : null) : column.type === 'expand' ? (!isSummary ? (!column.expandable ||
|
|
528
|
-
((_e = column.expandable) === null || _e === void 0 ? void 0 : _e.call(column, rowData)) ? (h(ExpandTrigger, { clsPrefix: mergedClsPrefix, expanded: expanded, onClick: () => handleUpdateExpanded(rowKey, null) })) : null) : null) : (h(Cell, { clsPrefix: mergedClsPrefix, index: actualRowIndex, row: rowData, column: column, isSummary: isSummary, mergedTheme: mergedTheme, renderCell: this.renderCell }))));
|
|
536
|
+
((_e = column.expandable) === null || _e === void 0 ? void 0 : _e.call(column, rowData)) ? (h(ExpandTrigger, { clsPrefix: mergedClsPrefix, expanded: expanded, renderExpandIcon: this.renderExpandIcon, onClick: () => handleUpdateExpanded(rowKey, null) })) : null) : null) : (h(Cell, { clsPrefix: mergedClsPrefix, index: actualRowIndex, row: rowData, column: column, isSummary: isSummary, mergedTheme: mergedTheme, renderCell: this.renderCell }))));
|
|
529
537
|
})));
|
|
530
538
|
return row;
|
|
531
539
|
};
|
|
@@ -644,6 +644,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
644
644
|
}>;
|
|
645
645
|
}>;
|
|
646
646
|
Input: import("../../../_mixins").Theme<"Input", {
|
|
647
|
+
countTextColorDisabled: string;
|
|
647
648
|
countTextColor: string;
|
|
648
649
|
heightTiny: string;
|
|
649
650
|
heightSmall: string;
|
|
@@ -976,6 +977,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
976
977
|
}>;
|
|
977
978
|
}>> | undefined;
|
|
978
979
|
Input?: import("../../../_mixins/use-theme").ExtractThemeOverrides<import("../../../_mixins").Theme<"Input", {
|
|
980
|
+
countTextColorDisabled: string;
|
|
979
981
|
countTextColor: string;
|
|
980
982
|
heightTiny: string;
|
|
981
983
|
heightSmall: string;
|
|
@@ -1798,6 +1800,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1798
1800
|
}>;
|
|
1799
1801
|
}>;
|
|
1800
1802
|
Input: import("../../../_mixins").Theme<"Input", {
|
|
1803
|
+
countTextColorDisabled: string;
|
|
1801
1804
|
countTextColor: string;
|
|
1802
1805
|
heightTiny: string;
|
|
1803
1806
|
heightSmall: string;
|
|
@@ -2130,6 +2133,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2130
2133
|
}>;
|
|
2131
2134
|
}>> | undefined;
|
|
2132
2135
|
Input?: import("../../../_mixins/use-theme").ExtractThemeOverrides<import("../../../_mixins").Theme<"Input", {
|
|
2136
|
+
countTextColorDisabled: string;
|
|
2133
2137
|
countTextColor: string;
|
|
2134
2138
|
heightTiny: string;
|
|
2135
2139
|
heightSmall: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
1
|
+
import { PropType, VNodeChild } from 'vue';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<{
|
|
3
3
|
clsPrefix: {
|
|
4
4
|
type: StringConstructor;
|
|
@@ -10,6 +10,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
10
10
|
type: PropType<() => void>;
|
|
11
11
|
required: true;
|
|
12
12
|
};
|
|
13
|
+
renderExpandIcon: {
|
|
14
|
+
type: PropType<() => VNodeChild>;
|
|
15
|
+
};
|
|
13
16
|
}, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
14
17
|
clsPrefix: {
|
|
15
18
|
type: StringConstructor;
|
|
@@ -21,6 +24,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
21
24
|
type: PropType<() => void>;
|
|
22
25
|
required: true;
|
|
23
26
|
};
|
|
27
|
+
renderExpandIcon: {
|
|
28
|
+
type: PropType<() => VNodeChild>;
|
|
29
|
+
};
|
|
24
30
|
}>>, {
|
|
25
31
|
expanded: boolean;
|
|
26
32
|
loading: boolean;
|
|
@@ -13,17 +13,23 @@ export default defineComponent({
|
|
|
13
13
|
onClick: {
|
|
14
14
|
type: Function,
|
|
15
15
|
required: true
|
|
16
|
+
},
|
|
17
|
+
renderExpandIcon: {
|
|
18
|
+
type: Function
|
|
16
19
|
}
|
|
17
20
|
},
|
|
18
21
|
render() {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
const { clsPrefix } = this;
|
|
23
|
+
return (h("div", { class: [
|
|
24
|
+
`${clsPrefix}-data-table-expand-trigger`,
|
|
25
|
+
this.expanded && `${clsPrefix}-data-table-expand-trigger--expanded`
|
|
26
|
+
], onClick: this.onClick },
|
|
27
|
+
h(NIconSwitchTransition, null, {
|
|
28
|
+
default: () => {
|
|
29
|
+
return this.loading ? (h(NBaseLoading, { key: "loading", clsPrefix: this.clsPrefix, radius: 85, strokeWidth: 15, scale: 0.88 })) : this.renderExpandIcon ? (this.renderExpandIcon()) : (h(NBaseIcon, { clsPrefix: clsPrefix, key: "base-icon" }, {
|
|
30
|
+
default: () => h(ChevronRightIcon, null)
|
|
31
|
+
}));
|
|
32
|
+
}
|
|
33
|
+
})));
|
|
28
34
|
}
|
|
29
35
|
});
|
|
@@ -647,6 +647,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
647
647
|
}>;
|
|
648
648
|
}>;
|
|
649
649
|
Input: import("../../../_mixins").Theme<"Input", {
|
|
650
|
+
countTextColorDisabled: string;
|
|
650
651
|
countTextColor: string;
|
|
651
652
|
heightTiny: string;
|
|
652
653
|
heightSmall: string;
|
|
@@ -979,6 +980,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
979
980
|
}>;
|
|
980
981
|
}>> | undefined;
|
|
981
982
|
Input?: import("../../../_mixins/use-theme").ExtractThemeOverrides<import("../../../_mixins").Theme<"Input", {
|
|
983
|
+
countTextColorDisabled: string;
|
|
982
984
|
countTextColor: string;
|
|
983
985
|
heightTiny: string;
|
|
984
986
|
heightSmall: string;
|
|
@@ -1154,7 +1156,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1154
1156
|
} | undefined;
|
|
1155
1157
|
};
|
|
1156
1158
|
}>;
|
|
1157
|
-
checkOptions: import("vue").Ref<import("../interface").DataTableSelectionOptions | undefined>;
|
|
1159
|
+
checkOptions: import("vue").Ref<import("../interface").DataTableSelectionOptions<import("../interface").InternalRowData> | undefined>;
|
|
1158
1160
|
mergedTableLayout: import("vue").Ref<"fixed" | "auto">;
|
|
1159
1161
|
headerCheckboxDisabled: import("vue").Ref<boolean>;
|
|
1160
1162
|
handleMouseenter: () => void;
|
|
@@ -84,7 +84,7 @@ export declare type TableSelectionColumn<T = InternalRowData> = {
|
|
|
84
84
|
type: 'selection';
|
|
85
85
|
multiple?: boolean;
|
|
86
86
|
disabled?: (row: T) => boolean;
|
|
87
|
-
options?: DataTableSelectionOptions
|
|
87
|
+
options?: DataTableSelectionOptions<T>;
|
|
88
88
|
sorter?: never;
|
|
89
89
|
filter?: never;
|
|
90
90
|
filterOptions?: never;
|
|
@@ -103,10 +103,10 @@ export interface TableExpandColumn<T = InternalRowData> extends Omit<TableSelect
|
|
|
103
103
|
}
|
|
104
104
|
export declare type TableColumn<T = InternalRowData> = TableColumnGroup<T> | TableBaseColumn<T> | TableSelectionColumn<T> | TableExpandColumn<T>;
|
|
105
105
|
export declare type TableColumns<T = InternalRowData> = Array<TableColumn<T>>;
|
|
106
|
-
export declare type DataTableSelectionOptions = Array<DataTableSelectionOption | {
|
|
106
|
+
export declare type DataTableSelectionOptions<T = InternalRowData> = Array<DataTableSelectionOption | {
|
|
107
107
|
label: string;
|
|
108
108
|
key: string | number;
|
|
109
|
-
onSelect: () => void;
|
|
109
|
+
onSelect: (pageData: T[]) => void;
|
|
110
110
|
}>;
|
|
111
111
|
export interface DataTableInjection {
|
|
112
112
|
slots: Slots;
|
|
@@ -164,6 +164,9 @@ export interface DataTableInjection {
|
|
|
164
164
|
onLoadRef: Ref<DataTableOnLoad | undefined>;
|
|
165
165
|
loadingKeySetRef: Ref<Set<RowKey>>;
|
|
166
166
|
paginationBehaviorOnFilterRef: Ref<'current' | 'first'>;
|
|
167
|
+
expandableRef: Ref<Expandable<any> | undefined>;
|
|
168
|
+
stickyExpandedRowsRef: Ref<boolean>;
|
|
169
|
+
renderExpandIconRef: Ref<undefined | (() => VNodeChild)>;
|
|
167
170
|
doUpdatePage: (page: number) => void;
|
|
168
171
|
doUpdateExpandedRowKeys: (keys: RowKey[]) => void;
|
|
169
172
|
doUpdateFilters: (filters: FilterState, sourceColumn: TableBaseColumn) => void;
|
|
@@ -83,6 +83,7 @@ c('&:last-child', 'flex-grow: 1;')])])])])])])]), c('>', [cB('base-loading', `
|
|
|
83
83
|
display: inline-block;
|
|
84
84
|
height: 1px;
|
|
85
85
|
`), cB('data-table-expand-trigger', `
|
|
86
|
+
display: inline-flex;
|
|
86
87
|
margin-right: 8px;
|
|
87
88
|
cursor: pointer;
|
|
88
89
|
font-size: 16px;
|
|
@@ -92,7 +93,11 @@ c('&:last-child', 'flex-grow: 1;')])])])])])])]), c('>', [cB('base-loading', `
|
|
|
92
93
|
height: 16px;
|
|
93
94
|
color: var(--n-td-text-color);
|
|
94
95
|
transition: color .3s var(--n-bezier);
|
|
95
|
-
`, [cB('
|
|
96
|
+
`, [cM('expanded', [cB('icon', 'transform: rotate(90deg);', [iconSwitchTransition({
|
|
97
|
+
originalTransform: 'rotate(90deg)'
|
|
98
|
+
})]), cB('base-icon', 'transform: rotate(90deg);', [iconSwitchTransition({
|
|
99
|
+
originalTransform: 'rotate(90deg)'
|
|
100
|
+
})])]), cB('base-loading', `
|
|
96
101
|
color: var(--n-loading-color);
|
|
97
102
|
transition: color .3s var(--n-bezier);
|
|
98
103
|
position: absolute;
|
|
@@ -100,20 +105,33 @@ c('&:last-child', 'flex-grow: 1;')])])])])])])]), c('>', [cB('base-loading', `
|
|
|
100
105
|
right: 0;
|
|
101
106
|
top: 0;
|
|
102
107
|
bottom: 0;
|
|
103
|
-
`, [iconSwitchTransition()]),
|
|
108
|
+
`, [iconSwitchTransition()]), cB('icon', `
|
|
104
109
|
position: absolute;
|
|
105
110
|
left: 0;
|
|
106
111
|
right: 0;
|
|
107
112
|
top: 0;
|
|
108
113
|
bottom: 0;
|
|
109
|
-
`, [iconSwitchTransition()])
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
114
|
+
`, [iconSwitchTransition()]), cB('base-icon', `
|
|
115
|
+
position: absolute;
|
|
116
|
+
left: 0;
|
|
117
|
+
right: 0;
|
|
118
|
+
top: 0;
|
|
119
|
+
bottom: 0;
|
|
120
|
+
`, [iconSwitchTransition()])]), cB('data-table-thead', `
|
|
121
|
+
transition: background-color .3s var(--n-bezier);
|
|
122
|
+
background-color: var(--n-merged-th-color);
|
|
123
|
+
`), cB('data-table-tr', `
|
|
113
124
|
box-sizing: border-box;
|
|
114
125
|
background-clip: padding-box;
|
|
115
126
|
transition: background-color .3s var(--n-bezier);
|
|
116
|
-
`, [
|
|
127
|
+
`, [cB('data-table-expand', `
|
|
128
|
+
position: sticky;
|
|
129
|
+
left: 0;
|
|
130
|
+
overflow: hidden;
|
|
131
|
+
margin: calc(var(--n-th-padding) * -1);
|
|
132
|
+
padding: var(--n-th-padding);
|
|
133
|
+
box-sizing: border-box;
|
|
134
|
+
`), cM('striped', 'background-color: var(--n-merged-td-color-striped);', [cB('data-table-td', 'background-color: var(--n-merged-td-color-striped);')]), cNotM('summary', [c('&:hover', 'background-color: var(--n-merged-td-color-hover);', [cB('data-table-td', 'background-color: var(--n-merged-td-color-hover);')])])]), cB('data-table-th', `
|
|
117
135
|
padding: var(--n-th-padding);
|
|
118
136
|
position: relative;
|
|
119
137
|
text-align: start;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
2
|
import { TreeMate } from 'treemate';
|
|
3
3
|
import type { DataTableSetupProps } from './DataTable';
|
|
4
|
-
import type { InternalRowData, RowKey } from './interface';
|
|
4
|
+
import type { Expandable, InternalRowData, RowKey } from './interface';
|
|
5
5
|
export declare function useExpand(props: DataTableSetupProps, treeMateRef: Ref<TreeMate<InternalRowData, InternalRowData, InternalRowData>>): {
|
|
6
|
+
stickyExpandedRowsRef: Ref<boolean>;
|
|
6
7
|
mergedExpandedRowKeysRef: import("vue").ComputedRef<import("treemate").Key[]>;
|
|
7
8
|
renderExpandRef: import("vue").ComputedRef<import("./interface").RenderExpand<any> | undefined>;
|
|
9
|
+
expandableRef: import("vue").ComputedRef<Expandable<any> | undefined>;
|
|
8
10
|
doUpdateExpandedRowKeys: (expandedKeys: RowKey[]) => void;
|
|
9
11
|
};
|
|
@@ -13,20 +13,24 @@ export function useExpand(props, treeMateRef) {
|
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
const expandableRef = useMemo(() => {
|
|
17
|
+
// It's not reactive
|
|
18
|
+
let expandable;
|
|
19
|
+
for (const col of props.columns) {
|
|
20
|
+
if (col.type === 'expand') {
|
|
21
|
+
expandable = col.expandable;
|
|
22
|
+
break;
|
|
23
|
+
}
|
|
22
24
|
}
|
|
23
|
-
|
|
25
|
+
return expandable;
|
|
26
|
+
});
|
|
24
27
|
const uncontrolledExpandedRowKeysRef = ref(props.defaultExpandAll
|
|
25
28
|
? (renderExpandRef === null || renderExpandRef === void 0 ? void 0 : renderExpandRef.value)
|
|
26
29
|
? (() => {
|
|
27
30
|
const expandedKeys = [];
|
|
28
31
|
treeMateRef.value.treeNodes.forEach((tmNode) => {
|
|
29
|
-
|
|
32
|
+
var _a;
|
|
33
|
+
if ((_a = expandableRef.value) === null || _a === void 0 ? void 0 : _a.call(expandableRef, tmNode.rawNode)) {
|
|
30
34
|
expandedKeys.push(tmNode.key);
|
|
31
35
|
}
|
|
32
36
|
});
|
|
@@ -35,6 +39,7 @@ export function useExpand(props, treeMateRef) {
|
|
|
35
39
|
: treeMateRef.value.getNonLeafKeys()
|
|
36
40
|
: props.defaultExpandedRowKeys);
|
|
37
41
|
const controlledExpandedRowKeysRef = toRef(props, 'expandedRowKeys');
|
|
42
|
+
const stickyExpandedRowsRef = toRef(props, 'stickyExpandedRows');
|
|
38
43
|
const mergedExpandedRowKeysRef = useMergedState(controlledExpandedRowKeysRef, uncontrolledExpandedRowKeysRef);
|
|
39
44
|
function doUpdateExpandedRowKeys(expandedKeys) {
|
|
40
45
|
const { onUpdateExpandedRowKeys, 'onUpdate:expandedRowKeys': _onUpdateExpandedRowKeys } = props;
|
|
@@ -47,8 +52,10 @@ export function useExpand(props, treeMateRef) {
|
|
|
47
52
|
uncontrolledExpandedRowKeysRef.value = expandedKeys;
|
|
48
53
|
}
|
|
49
54
|
return {
|
|
55
|
+
stickyExpandedRowsRef,
|
|
50
56
|
mergedExpandedRowKeysRef,
|
|
51
57
|
renderExpandRef,
|
|
58
|
+
expandableRef,
|
|
52
59
|
doUpdateExpandedRowKeys
|
|
53
60
|
};
|
|
54
61
|
}
|
|
@@ -302,7 +302,7 @@ export function useTableData(props, { dataRelatedColsRef }) {
|
|
|
302
302
|
paginatedDataRef,
|
|
303
303
|
rawPaginatedDataRef,
|
|
304
304
|
mergedFilterStateRef,
|
|
305
|
-
mergedSortStateRef
|
|
305
|
+
mergedSortStateRef,
|
|
306
306
|
hoverKeyRef: ref(null),
|
|
307
307
|
selectionColumnRef,
|
|
308
308
|
childTriggerColIndexRef,
|
|
@@ -567,6 +567,7 @@ declare const dataTableLight: import("../../_mixins").Theme<"DataTable", {
|
|
|
567
567
|
}>;
|
|
568
568
|
}>;
|
|
569
569
|
Input: import("../../_mixins").Theme<"Input", {
|
|
570
|
+
countTextColorDisabled: string;
|
|
570
571
|
countTextColor: string;
|
|
571
572
|
heightTiny: string;
|
|
572
573
|
heightSmall: string;
|
|
@@ -135,6 +135,7 @@ export declare const datePickerProps: {
|
|
|
135
135
|
calendarRightPaddingYearrange: string;
|
|
136
136
|
}, {
|
|
137
137
|
Input: import("../../_mixins").Theme<"Input", {
|
|
138
|
+
countTextColorDisabled: string;
|
|
138
139
|
countTextColor: string;
|
|
139
140
|
heightTiny: string;
|
|
140
141
|
heightSmall: string;
|
|
@@ -624,6 +625,7 @@ export declare const datePickerProps: {
|
|
|
624
625
|
rippleDuration: string;
|
|
625
626
|
}, any>;
|
|
626
627
|
Input: import("../../_mixins").Theme<"Input", {
|
|
628
|
+
countTextColorDisabled: string;
|
|
627
629
|
countTextColor: string;
|
|
628
630
|
heightTiny: string;
|
|
629
631
|
heightSmall: string;
|
|
@@ -753,6 +755,7 @@ export declare const datePickerProps: {
|
|
|
753
755
|
calendarRightPaddingYearrange: string;
|
|
754
756
|
}, {
|
|
755
757
|
Input: import("../../_mixins").Theme<"Input", {
|
|
758
|
+
countTextColorDisabled: string;
|
|
756
759
|
countTextColor: string;
|
|
757
760
|
heightTiny: string;
|
|
758
761
|
heightSmall: string;
|
|
@@ -1242,6 +1245,7 @@ export declare const datePickerProps: {
|
|
|
1242
1245
|
rippleDuration: string;
|
|
1243
1246
|
}, any>;
|
|
1244
1247
|
Input: import("../../_mixins").Theme<"Input", {
|
|
1248
|
+
countTextColorDisabled: string;
|
|
1245
1249
|
countTextColor: string;
|
|
1246
1250
|
heightTiny: string;
|
|
1247
1251
|
heightSmall: string;
|
|
@@ -1371,6 +1375,7 @@ export declare const datePickerProps: {
|
|
|
1371
1375
|
calendarRightPaddingYearrange: string;
|
|
1372
1376
|
}, {
|
|
1373
1377
|
Input: import("../../_mixins").Theme<"Input", {
|
|
1378
|
+
countTextColorDisabled: string;
|
|
1374
1379
|
countTextColor: string;
|
|
1375
1380
|
heightTiny: string;
|
|
1376
1381
|
heightSmall: string;
|
|
@@ -1860,6 +1865,7 @@ export declare const datePickerProps: {
|
|
|
1860
1865
|
rippleDuration: string;
|
|
1861
1866
|
}, any>;
|
|
1862
1867
|
Input: import("../../_mixins").Theme<"Input", {
|
|
1868
|
+
countTextColorDisabled: string;
|
|
1863
1869
|
countTextColor: string;
|
|
1864
1870
|
heightTiny: string;
|
|
1865
1871
|
heightSmall: string;
|
|
@@ -2058,6 +2064,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2058
2064
|
calendarRightPaddingYearrange: string;
|
|
2059
2065
|
}, {
|
|
2060
2066
|
Input: import("../../_mixins").Theme<"Input", {
|
|
2067
|
+
countTextColorDisabled: string;
|
|
2061
2068
|
countTextColor: string;
|
|
2062
2069
|
heightTiny: string;
|
|
2063
2070
|
heightSmall: string;
|
|
@@ -2547,6 +2554,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2547
2554
|
rippleDuration: string;
|
|
2548
2555
|
}, any>;
|
|
2549
2556
|
Input: import("../../_mixins").Theme<"Input", {
|
|
2557
|
+
countTextColorDisabled: string;
|
|
2550
2558
|
countTextColor: string;
|
|
2551
2559
|
heightTiny: string;
|
|
2552
2560
|
heightSmall: string;
|
|
@@ -2676,6 +2684,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2676
2684
|
calendarRightPaddingYearrange: string;
|
|
2677
2685
|
}, {
|
|
2678
2686
|
Input: import("../../_mixins").Theme<"Input", {
|
|
2687
|
+
countTextColorDisabled: string;
|
|
2679
2688
|
countTextColor: string;
|
|
2680
2689
|
heightTiny: string;
|
|
2681
2690
|
heightSmall: string;
|
|
@@ -3165,6 +3174,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3165
3174
|
rippleDuration: string;
|
|
3166
3175
|
}, any>;
|
|
3167
3176
|
Input: import("../../_mixins").Theme<"Input", {
|
|
3177
|
+
countTextColorDisabled: string;
|
|
3168
3178
|
countTextColor: string;
|
|
3169
3179
|
heightTiny: string;
|
|
3170
3180
|
heightSmall: string;
|
|
@@ -3294,6 +3304,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3294
3304
|
calendarRightPaddingYearrange: string;
|
|
3295
3305
|
}, {
|
|
3296
3306
|
Input: import("../../_mixins").Theme<"Input", {
|
|
3307
|
+
countTextColorDisabled: string;
|
|
3297
3308
|
countTextColor: string;
|
|
3298
3309
|
heightTiny: string;
|
|
3299
3310
|
heightSmall: string;
|
|
@@ -3783,6 +3794,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3783
3794
|
rippleDuration: string;
|
|
3784
3795
|
}, any>;
|
|
3785
3796
|
Input: import("../../_mixins").Theme<"Input", {
|
|
3797
|
+
countTextColorDisabled: string;
|
|
3786
3798
|
countTextColor: string;
|
|
3787
3799
|
heightTiny: string;
|
|
3788
3800
|
heightSmall: string;
|
|
@@ -4160,6 +4172,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4160
4172
|
};
|
|
4161
4173
|
peers: {
|
|
4162
4174
|
Input: import("../../_mixins").Theme<"Input", {
|
|
4175
|
+
countTextColorDisabled: string;
|
|
4163
4176
|
countTextColor: string;
|
|
4164
4177
|
heightTiny: string;
|
|
4165
4178
|
heightSmall: string;
|
|
@@ -4649,6 +4662,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4649
4662
|
rippleDuration: string;
|
|
4650
4663
|
}, any>;
|
|
4651
4664
|
Input: import("../../_mixins").Theme<"Input", {
|
|
4665
|
+
countTextColorDisabled: string;
|
|
4652
4666
|
countTextColor: string;
|
|
4653
4667
|
heightTiny: string;
|
|
4654
4668
|
heightSmall: string;
|
|
@@ -4936,6 +4950,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4936
4950
|
rippleDuration: string;
|
|
4937
4951
|
}, any>> | undefined;
|
|
4938
4952
|
Input?: import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Input", {
|
|
4953
|
+
countTextColorDisabled: string;
|
|
4939
4954
|
countTextColor: string;
|
|
4940
4955
|
heightTiny: string;
|
|
4941
4956
|
heightSmall: string;
|
|
@@ -5007,8 +5022,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5007
5022
|
actions: import("vue").ComputedRef<string[] | undefined>;
|
|
5008
5023
|
triggerCssVars: import("vue").ComputedRef<{
|
|
5009
5024
|
'--n-bezier': string;
|
|
5010
|
-
'--n-icon-color': string;
|
|
5011
|
-
'--n-icon-color-disabled': string;
|
|
5025
|
+
'--n-icon-color-override': string;
|
|
5026
|
+
'--n-icon-color-disabled-override': string;
|
|
5012
5027
|
}> | undefined;
|
|
5013
5028
|
triggerThemeClass: Ref<string> | undefined;
|
|
5014
5029
|
triggerOnRender: (() => void) | undefined;
|
|
@@ -5191,6 +5206,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5191
5206
|
calendarRightPaddingYearrange: string;
|
|
5192
5207
|
}, {
|
|
5193
5208
|
Input: import("../../_mixins").Theme<"Input", {
|
|
5209
|
+
countTextColorDisabled: string;
|
|
5194
5210
|
countTextColor: string;
|
|
5195
5211
|
heightTiny: string;
|
|
5196
5212
|
heightSmall: string;
|
|
@@ -5680,6 +5696,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5680
5696
|
rippleDuration: string;
|
|
5681
5697
|
}, any>;
|
|
5682
5698
|
Input: import("../../_mixins").Theme<"Input", {
|
|
5699
|
+
countTextColorDisabled: string;
|
|
5683
5700
|
countTextColor: string;
|
|
5684
5701
|
heightTiny: string;
|
|
5685
5702
|
heightSmall: string;
|
|
@@ -5809,6 +5826,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5809
5826
|
calendarRightPaddingYearrange: string;
|
|
5810
5827
|
}, {
|
|
5811
5828
|
Input: import("../../_mixins").Theme<"Input", {
|
|
5829
|
+
countTextColorDisabled: string;
|
|
5812
5830
|
countTextColor: string;
|
|
5813
5831
|
heightTiny: string;
|
|
5814
5832
|
heightSmall: string;
|
|
@@ -6298,6 +6316,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
6298
6316
|
rippleDuration: string;
|
|
6299
6317
|
}, any>;
|
|
6300
6318
|
Input: import("../../_mixins").Theme<"Input", {
|
|
6319
|
+
countTextColorDisabled: string;
|
|
6301
6320
|
countTextColor: string;
|
|
6302
6321
|
heightTiny: string;
|
|
6303
6322
|
heightSmall: string;
|
|
@@ -6427,6 +6446,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
6427
6446
|
calendarRightPaddingYearrange: string;
|
|
6428
6447
|
}, {
|
|
6429
6448
|
Input: import("../../_mixins").Theme<"Input", {
|
|
6449
|
+
countTextColorDisabled: string;
|
|
6430
6450
|
countTextColor: string;
|
|
6431
6451
|
heightTiny: string;
|
|
6432
6452
|
heightSmall: string;
|
|
@@ -6916,6 +6936,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
6916
6936
|
rippleDuration: string;
|
|
6917
6937
|
}, any>;
|
|
6918
6938
|
Input: import("../../_mixins").Theme<"Input", {
|
|
6939
|
+
countTextColorDisabled: string;
|
|
6919
6940
|
countTextColor: string;
|
|
6920
6941
|
heightTiny: string;
|
|
6921
6942
|
heightSmall: string;
|