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/list/src/List.js
CHANGED
|
@@ -1,27 +1,29 @@
|
|
|
1
|
-
import { computed, defineComponent, h, provide } from 'vue';
|
|
2
|
-
import { useConfig, useTheme, useThemeClass } from '../../_mixins';
|
|
1
|
+
import { computed, defineComponent, h, provide, toRef } from 'vue';
|
|
2
|
+
import { useConfig, useTheme, useThemeClass, useRtl } from '../../_mixins';
|
|
3
3
|
import { createInjectionKey } from '../../_utils';
|
|
4
4
|
import { listLight } from '../styles';
|
|
5
5
|
import style from './styles/index.cssr';
|
|
6
6
|
export const listProps = Object.assign(Object.assign({}, useTheme.props), { size: {
|
|
7
7
|
type: String,
|
|
8
8
|
default: 'medium'
|
|
9
|
-
}, bordered: {
|
|
9
|
+
}, bordered: Boolean, clickable: Boolean, hoverable: Boolean, showDivider: {
|
|
10
10
|
type: Boolean,
|
|
11
|
-
default:
|
|
11
|
+
default: true
|
|
12
12
|
} });
|
|
13
13
|
export const listInjectionKey = createInjectionKey('n-list');
|
|
14
14
|
export default defineComponent({
|
|
15
15
|
name: 'List',
|
|
16
16
|
props: listProps,
|
|
17
17
|
setup(props) {
|
|
18
|
-
const { mergedClsPrefixRef, inlineThemeDisabled } = useConfig(props);
|
|
18
|
+
const { mergedClsPrefixRef, inlineThemeDisabled, mergedRtlRef } = useConfig(props);
|
|
19
|
+
const rtlEnabledRef = useRtl('List', mergedRtlRef, mergedClsPrefixRef);
|
|
19
20
|
const themeRef = useTheme('List', '-list', style, listLight, props, mergedClsPrefixRef);
|
|
20
21
|
provide(listInjectionKey, {
|
|
22
|
+
showDividerRef: toRef(props, 'showDivider'),
|
|
21
23
|
mergedClsPrefixRef
|
|
22
24
|
});
|
|
23
25
|
const cssVarsRef = computed(() => {
|
|
24
|
-
const { common: { cubicBezierEaseInOut }, self: { fontSize, textColor, color, colorModal, colorPopover, borderColor, borderColorModal, borderColorPopover, borderRadius } } = themeRef.value;
|
|
26
|
+
const { common: { cubicBezierEaseInOut }, self: { fontSize, textColor, color, colorModal, colorPopover, borderColor, borderColorModal, borderColorPopover, borderRadius, colorHover, colorHoverModal, colorHoverPopover } } = themeRef.value;
|
|
25
27
|
return {
|
|
26
28
|
'--n-font-size': fontSize,
|
|
27
29
|
'--n-bezier': cubicBezierEaseInOut,
|
|
@@ -32,7 +34,10 @@ export default defineComponent({
|
|
|
32
34
|
'--n-border-color-modal': borderColorModal,
|
|
33
35
|
'--n-border-color-popover': borderColorPopover,
|
|
34
36
|
'--n-color-modal': colorModal,
|
|
35
|
-
'--n-color-popover': colorPopover
|
|
37
|
+
'--n-color-popover': colorPopover,
|
|
38
|
+
'--n-color-hover': colorHover,
|
|
39
|
+
'--n-color-hover-modal': colorHoverModal,
|
|
40
|
+
'--n-color-hover-popover': colorHoverPopover
|
|
36
41
|
};
|
|
37
42
|
});
|
|
38
43
|
const themeClassHandle = inlineThemeDisabled
|
|
@@ -40,6 +45,7 @@ export default defineComponent({
|
|
|
40
45
|
: undefined;
|
|
41
46
|
return {
|
|
42
47
|
mergedClsPrefix: mergedClsPrefixRef,
|
|
48
|
+
rtlEnabled: rtlEnabledRef,
|
|
43
49
|
cssVars: inlineThemeDisabled ? undefined : cssVarsRef,
|
|
44
50
|
themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
|
|
45
51
|
onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender
|
|
@@ -51,7 +57,11 @@ export default defineComponent({
|
|
|
51
57
|
onRender === null || onRender === void 0 ? void 0 : onRender();
|
|
52
58
|
return (h("ul", { class: [
|
|
53
59
|
`${mergedClsPrefix}-list`,
|
|
60
|
+
this.rtlEnabled && `${mergedClsPrefix}-list--rtl`,
|
|
54
61
|
this.bordered && `${mergedClsPrefix}-list--bordered`,
|
|
62
|
+
this.showDivider && `${mergedClsPrefix}-list--show-divider`,
|
|
63
|
+
this.hoverable && `${mergedClsPrefix}-list--hoverable`,
|
|
64
|
+
this.clickable && `${mergedClsPrefix}-list--clickable`,
|
|
55
65
|
this.themeClass
|
|
56
66
|
], style: this.cssVars },
|
|
57
67
|
$slots.header ? (h("div", { class: `${mergedClsPrefix}-list__header` }, $slots.header())) : null, (_a = $slots.default) === null || _a === void 0 ? void 0 :
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
+
showDivider: import("vue").Ref<boolean>;
|
|
2
3
|
mergedClsPrefix: import("vue").Ref<string>;
|
|
3
4
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
4
5
|
export default _default;
|
package/es/list/src/ListItem.js
CHANGED
|
@@ -9,6 +9,7 @@ export default defineComponent({
|
|
|
9
9
|
throwError('list-item', '`n-list-item` must be placed in `n-list`.');
|
|
10
10
|
}
|
|
11
11
|
return {
|
|
12
|
+
showDivider: listInjection.showDividerRef,
|
|
12
13
|
mergedClsPrefix: listInjection.mergedClsPrefixRef
|
|
13
14
|
};
|
|
14
15
|
},
|
|
@@ -17,6 +18,7 @@ export default defineComponent({
|
|
|
17
18
|
return (h("li", { class: `${mergedClsPrefix}-list-item` },
|
|
18
19
|
$slots.prefix ? (h("div", { class: `${mergedClsPrefix}-list-item__prefix` }, $slots.prefix())) : null,
|
|
19
20
|
$slots.default ? (h("div", { class: `${mergedClsPrefix}-list-item__main` }, $slots)) : null,
|
|
20
|
-
$slots.suffix ? (h("div", { class: `${mergedClsPrefix}-list-item__suffix` }, $slots.suffix())) : null
|
|
21
|
+
$slots.suffix ? (h("div", { class: `${mergedClsPrefix}-list-item__suffix` }, $slots.suffix())) : null,
|
|
22
|
+
this.showDivider && (h("div", { class: `${mergedClsPrefix}-list-item__divider` }))));
|
|
21
23
|
}
|
|
22
24
|
});
|
|
@@ -3,16 +3,21 @@ import { cB, c, cE, cM, insideModal, insidePopover } from '../../../_utils/cssr'
|
|
|
3
3
|
// --n-bezier
|
|
4
4
|
// --n-text-color
|
|
5
5
|
// --n-color
|
|
6
|
+
// --n-color-hover
|
|
6
7
|
// --n-border-radius
|
|
7
8
|
// --n-border-color
|
|
8
9
|
// --n-border-color-modal
|
|
9
10
|
// --n-border-color-popover
|
|
10
11
|
// --n-color-modal
|
|
11
12
|
// --n-color-popover
|
|
13
|
+
// --n-color-hover-modal
|
|
14
|
+
// --n-color-hover-popover
|
|
12
15
|
|
|
13
16
|
export default c([cB('list', `
|
|
14
17
|
--n-merged-border-color: var(--n-border-color);
|
|
15
18
|
--n-merged-color: var(--n-color);
|
|
19
|
+
--n-merged-color-hover: var(--n-color-hover);
|
|
20
|
+
margin: 0;
|
|
16
21
|
font-size: var(--n-font-size);
|
|
17
22
|
transition:
|
|
18
23
|
background-color .3s var(--n-bezier),
|
|
@@ -22,30 +27,39 @@ export default c([cB('list', `
|
|
|
22
27
|
list-style-type: none;
|
|
23
28
|
color: var(--n-text-color);
|
|
24
29
|
background-color: var(--n-merged-color);
|
|
25
|
-
`, [cM('
|
|
26
|
-
|
|
30
|
+
`, [cM('show-divider', [cB('list-item', [c('&:not(:last-child)', [cE('divider', `
|
|
31
|
+
background-color: var(--n-merged-border-color);
|
|
32
|
+
`)])])]), cM('clickable', [cB('list-item', `
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
`)]), cM('bordered', `
|
|
27
35
|
border: 1px solid var(--n-merged-border-color);
|
|
28
|
-
|
|
36
|
+
border-radius: var(--n-border-radius);
|
|
37
|
+
`), cM('hoverable', [cB('list-item', `
|
|
38
|
+
border-radius: var(--n-border-radius);
|
|
39
|
+
`, [c('&:hover', `
|
|
40
|
+
background-color: var(--n-merged-color-hover);
|
|
41
|
+
`, [cE('divider', `
|
|
42
|
+
background-color: transparent;
|
|
43
|
+
`)])])]), cM('bordered, hoverable', [cB('list-item', `
|
|
29
44
|
padding: 12px 20px;
|
|
30
|
-
|
|
31
|
-
border-bottom: 1px solid var(--n-merged-border-color);
|
|
32
|
-
`)]), cE('header, footer', `
|
|
45
|
+
`), cE('header, footer', `
|
|
33
46
|
padding: 12px 20px;
|
|
34
|
-
|
|
35
|
-
border-bottom: 1px solid var(--n-merged-border-color);
|
|
36
|
-
`)])]), cE('header, footer', `
|
|
47
|
+
`)]), cE('header, footer', `
|
|
37
48
|
padding: 12px 0;
|
|
38
49
|
box-sizing: border-box;
|
|
39
50
|
transition: border-color .3s var(--n-bezier);
|
|
40
51
|
`, [c('&:not(:last-child)', `
|
|
41
52
|
border-bottom: 1px solid var(--n-merged-border-color);
|
|
42
53
|
`)]), cB('list-item', `
|
|
54
|
+
position: relative;
|
|
43
55
|
padding: 12px 0;
|
|
44
56
|
box-sizing: border-box;
|
|
45
57
|
display: flex;
|
|
46
58
|
flex-wrap: nowrap;
|
|
47
59
|
align-items: center;
|
|
48
|
-
transition:
|
|
60
|
+
transition:
|
|
61
|
+
background-color .3s var(--n-bezier),
|
|
62
|
+
border-color .3s var(--n-bezier);
|
|
49
63
|
`, [cE('prefix', `
|
|
50
64
|
margin-right: 20px;
|
|
51
65
|
flex: 0;
|
|
@@ -54,12 +68,21 @@ export default c([cB('list', `
|
|
|
54
68
|
flex: 0;
|
|
55
69
|
`), cE('main', `
|
|
56
70
|
flex: 1;
|
|
57
|
-
`),
|
|
58
|
-
|
|
71
|
+
`), cE('divider', `
|
|
72
|
+
height: 1px;
|
|
73
|
+
position: absolute;
|
|
74
|
+
bottom: 0;
|
|
75
|
+
left: 0;
|
|
76
|
+
right: 0;
|
|
77
|
+
background-color: transparent;
|
|
78
|
+
transition: background-color .3s var(--n-bezier);
|
|
79
|
+
pointer-events: none;
|
|
59
80
|
`)])]), insideModal(cB('list', `
|
|
81
|
+
--n-merged-color-hover: var(--n-color-hover-modal);
|
|
60
82
|
--n-merged-color: var(--n-color-modal);
|
|
61
83
|
--n-merged-border-color: var(--n-border-color-modal);
|
|
62
84
|
`)), insidePopover(cB('list', `
|
|
85
|
+
--n-merged-color-hover: var(--n-color-hover-popover);
|
|
63
86
|
--n-merged-color: var(--n-color-popover);
|
|
64
87
|
--n-merged-border-color: var(--n-border-color-popover);
|
|
65
88
|
`))]);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { cB, cE, cM } from '../../../_utils/cssr';
|
|
2
|
+
export default cB('list', [cM('rtl', `
|
|
3
|
+
direction: rtl;
|
|
4
|
+
text-align: right;
|
|
5
|
+
`, [cB('list-item', [cE('prefix', `
|
|
6
|
+
margin-right: 0;
|
|
7
|
+
margin-left: 20px;
|
|
8
|
+
`), cE('suffix', `
|
|
9
|
+
margin-right: 20px;
|
|
10
|
+
margin-left: 0;
|
|
11
|
+
`)])])]);
|
package/es/list/styles/index.js
CHANGED
|
@@ -3,8 +3,11 @@ import { Theme } from '../../_mixins';
|
|
|
3
3
|
export declare const self: (vars: ThemeCommonVars) => {
|
|
4
4
|
textColor: string;
|
|
5
5
|
color: string;
|
|
6
|
+
colorHover: string;
|
|
6
7
|
colorModal: string;
|
|
8
|
+
colorHoverModal: string;
|
|
7
9
|
colorPopover: string;
|
|
10
|
+
colorHoverPopover: string;
|
|
8
11
|
borderColor: string;
|
|
9
12
|
borderColorModal: string;
|
|
10
13
|
borderColorPopover: string;
|
package/es/list/styles/light.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { composite } from 'seemly';
|
|
2
2
|
import { commonLight } from '../../_styles/common';
|
|
3
3
|
export const self = (vars) => {
|
|
4
|
-
const { textColor2, cardColor, modalColor, popoverColor, dividerColor, borderRadius, fontSize } = vars;
|
|
4
|
+
const { textColor2, cardColor, modalColor, popoverColor, dividerColor, borderRadius, fontSize, hoverColor } = vars;
|
|
5
5
|
return {
|
|
6
6
|
textColor: textColor2,
|
|
7
7
|
color: cardColor,
|
|
8
|
+
colorHover: hoverColor,
|
|
8
9
|
colorModal: modalColor,
|
|
10
|
+
colorHoverModal: composite(modalColor, hoverColor),
|
|
9
11
|
colorPopover: popoverColor,
|
|
12
|
+
colorHoverPopover: composite(popoverColor, hoverColor),
|
|
10
13
|
borderColor: dividerColor,
|
|
11
14
|
borderColorModal: composite(modalColor, dividerColor),
|
|
12
15
|
borderColorPopover: composite(popoverColor, dividerColor),
|
|
@@ -24,7 +24,7 @@ const viVN = {
|
|
|
24
24
|
dayFormat: 'eeeeee',
|
|
25
25
|
yearTypeFormat: 'yyyy',
|
|
26
26
|
monthTypeFormat: 'MM-yyyy',
|
|
27
|
-
dateFormat: '
|
|
27
|
+
dateFormat: 'dd-MM-yyyy',
|
|
28
28
|
dateTimeFormat: 'HH:mm:ss dd-MM-yyyy',
|
|
29
29
|
quarterFormat: 'qqq-yyyy',
|
|
30
30
|
clear: 'Xóa',
|
|
@@ -57,13 +57,12 @@ const viVN = {
|
|
|
57
57
|
sourceTitle: 'Nguồn',
|
|
58
58
|
targetTitle: 'Đích'
|
|
59
59
|
},
|
|
60
|
-
// TODO: translation
|
|
61
60
|
Transfer: {
|
|
62
|
-
selectAll: '
|
|
63
|
-
unselectAll: '
|
|
64
|
-
clearAll: '
|
|
65
|
-
total: (num) => `
|
|
66
|
-
selected: (num) => `${num}
|
|
61
|
+
selectAll: 'Chọn tất cả',
|
|
62
|
+
unselectAll: 'Bỏ chọn tất cả',
|
|
63
|
+
clearAll: 'Xoá tất cả',
|
|
64
|
+
total: (num) => `Tổng cộng ${num} mục`,
|
|
65
|
+
selected: (num) => `${num} mục được chọn`
|
|
67
66
|
},
|
|
68
67
|
Empty: {
|
|
69
68
|
description: 'Không có dữ liệu'
|
|
@@ -114,8 +113,7 @@ const viVN = {
|
|
|
114
113
|
tipZoomOut: 'Thu nhỏ',
|
|
115
114
|
tipZoomIn: 'Phóng to',
|
|
116
115
|
tipClose: 'Đóng (Esc)',
|
|
117
|
-
|
|
118
|
-
tipOriginalSize: 'Xem kích thớc gốc'
|
|
116
|
+
tipOriginalSize: 'Xem kích thước gốc'
|
|
119
117
|
}
|
|
120
118
|
};
|
|
121
119
|
export default viVN;
|
|
@@ -119,6 +119,7 @@ export declare const mentionProps: {
|
|
|
119
119
|
}, any>;
|
|
120
120
|
}>;
|
|
121
121
|
Input: import("../../_mixins").Theme<"Input", {
|
|
122
|
+
countTextColorDisabled: string;
|
|
122
123
|
countTextColor: string;
|
|
123
124
|
heightTiny: string;
|
|
124
125
|
heightSmall: string;
|
|
@@ -236,6 +237,7 @@ export declare const mentionProps: {
|
|
|
236
237
|
}, any>;
|
|
237
238
|
}>;
|
|
238
239
|
Input: import("../../_mixins").Theme<"Input", {
|
|
240
|
+
countTextColorDisabled: string;
|
|
239
241
|
countTextColor: string;
|
|
240
242
|
heightTiny: string;
|
|
241
243
|
heightSmall: string;
|
|
@@ -353,6 +355,7 @@ export declare const mentionProps: {
|
|
|
353
355
|
}, any>;
|
|
354
356
|
}>;
|
|
355
357
|
Input: import("../../_mixins").Theme<"Input", {
|
|
358
|
+
countTextColorDisabled: string;
|
|
356
359
|
countTextColor: string;
|
|
357
360
|
heightTiny: string;
|
|
358
361
|
heightSmall: string;
|
|
@@ -527,6 +530,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
527
530
|
}, any>;
|
|
528
531
|
}>;
|
|
529
532
|
Input: import("../../_mixins").Theme<"Input", {
|
|
533
|
+
countTextColorDisabled: string;
|
|
530
534
|
countTextColor: string;
|
|
531
535
|
heightTiny: string;
|
|
532
536
|
heightSmall: string;
|
|
@@ -644,6 +648,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
644
648
|
}, any>;
|
|
645
649
|
}>;
|
|
646
650
|
Input: import("../../_mixins").Theme<"Input", {
|
|
651
|
+
countTextColorDisabled: string;
|
|
647
652
|
countTextColor: string;
|
|
648
653
|
heightTiny: string;
|
|
649
654
|
heightSmall: string;
|
|
@@ -761,6 +766,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
761
766
|
}, any>;
|
|
762
767
|
}>;
|
|
763
768
|
Input: import("../../_mixins").Theme<"Input", {
|
|
769
|
+
countTextColorDisabled: string;
|
|
764
770
|
countTextColor: string;
|
|
765
771
|
heightTiny: string;
|
|
766
772
|
heightSmall: string;
|
|
@@ -991,6 +997,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
991
997
|
}, any>;
|
|
992
998
|
}>;
|
|
993
999
|
Input: import("../../_mixins").Theme<"Input", {
|
|
1000
|
+
countTextColorDisabled: string;
|
|
994
1001
|
countTextColor: string;
|
|
995
1002
|
heightTiny: string;
|
|
996
1003
|
heightSmall: string;
|
|
@@ -1232,6 +1239,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1232
1239
|
}, any>;
|
|
1233
1240
|
}>;
|
|
1234
1241
|
Input: import("../../_mixins").Theme<"Input", {
|
|
1242
|
+
countTextColorDisabled: string;
|
|
1235
1243
|
countTextColor: string;
|
|
1236
1244
|
heightTiny: string;
|
|
1237
1245
|
heightSmall: string;
|
|
@@ -1349,6 +1357,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1349
1357
|
}, any>;
|
|
1350
1358
|
}>;
|
|
1351
1359
|
Input: import("../../_mixins").Theme<"Input", {
|
|
1360
|
+
countTextColorDisabled: string;
|
|
1352
1361
|
countTextColor: string;
|
|
1353
1362
|
heightTiny: string;
|
|
1354
1363
|
heightSmall: string;
|
|
@@ -1466,6 +1475,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1466
1475
|
}, any>;
|
|
1467
1476
|
}>;
|
|
1468
1477
|
Input: import("../../_mixins").Theme<"Input", {
|
|
1478
|
+
countTextColorDisabled: string;
|
|
1469
1479
|
countTextColor: string;
|
|
1470
1480
|
heightTiny: string;
|
|
1471
1481
|
heightSmall: string;
|
package/es/menu/src/Menu.d.ts
CHANGED
|
@@ -59,6 +59,10 @@ export declare const menuProps: {
|
|
|
59
59
|
readonly default: undefined;
|
|
60
60
|
};
|
|
61
61
|
readonly disabled: BooleanConstructor;
|
|
62
|
+
readonly show: {
|
|
63
|
+
readonly type: BooleanConstructor;
|
|
64
|
+
readonly defalut: true;
|
|
65
|
+
};
|
|
62
66
|
readonly inverted: BooleanConstructor;
|
|
63
67
|
readonly 'onUpdate:expandedKeys': PropType<MaybeArray<OnUpdateKeys>>;
|
|
64
68
|
readonly onUpdateExpandedKeys: PropType<MaybeArray<OnUpdateKeys>>;
|
|
@@ -661,6 +665,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
661
665
|
readonly default: undefined;
|
|
662
666
|
};
|
|
663
667
|
readonly disabled: BooleanConstructor;
|
|
668
|
+
readonly show: {
|
|
669
|
+
readonly type: BooleanConstructor;
|
|
670
|
+
readonly defalut: true;
|
|
671
|
+
};
|
|
664
672
|
readonly inverted: BooleanConstructor;
|
|
665
673
|
readonly 'onUpdate:expandedKeys': PropType<MaybeArray<OnUpdateKeys>>;
|
|
666
674
|
readonly onUpdateExpandedKeys: PropType<MaybeArray<OnUpdateKeys>>;
|
|
@@ -1594,6 +1602,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1594
1602
|
readonly default: undefined;
|
|
1595
1603
|
};
|
|
1596
1604
|
readonly disabled: BooleanConstructor;
|
|
1605
|
+
readonly show: {
|
|
1606
|
+
readonly type: BooleanConstructor;
|
|
1607
|
+
readonly defalut: true;
|
|
1608
|
+
};
|
|
1597
1609
|
readonly inverted: BooleanConstructor;
|
|
1598
1610
|
readonly 'onUpdate:expandedKeys': PropType<MaybeArray<OnUpdateKeys>>;
|
|
1599
1611
|
readonly onUpdateExpandedKeys: PropType<MaybeArray<OnUpdateKeys>>;
|
|
@@ -2140,6 +2152,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2140
2152
|
}>>>;
|
|
2141
2153
|
}>>, {
|
|
2142
2154
|
readonly mode: "horizontal" | "vertical";
|
|
2155
|
+
readonly show: boolean;
|
|
2143
2156
|
readonly disabled: boolean;
|
|
2144
2157
|
readonly options: MenuMixedOption[];
|
|
2145
2158
|
readonly iconSize: number;
|
package/es/menu/src/Menu.js
CHANGED
|
@@ -45,7 +45,10 @@ export const menuProps = Object.assign(Object.assign({}, useTheme.props), { opti
|
|
|
45
45
|
}, watchProps: {
|
|
46
46
|
type: Array,
|
|
47
47
|
default: undefined
|
|
48
|
-
}, disabled: Boolean,
|
|
48
|
+
}, disabled: Boolean, show: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
defalut: true
|
|
51
|
+
}, inverted: Boolean, 'onUpdate:expandedKeys': [Function, Array], onUpdateExpandedKeys: [Function, Array], onUpdateValue: [Function, Array], 'onUpdate:value': [Function, Array], expandIcon: Function, renderIcon: Function, renderLabel: Function, renderExtra: Function, dropdownProps: Object, accordion: Boolean, nodeProps: Function,
|
|
49
52
|
// deprecated
|
|
50
53
|
items: Array, onOpenNamesChange: [Function, Array], onSelect: [Function, Array], onExpandedNamesChange: [Function, Array], expandedNames: Array, defaultExpandedNames: Array, dropdownPlacement: {
|
|
51
54
|
type: String,
|
package/es/menu/src/Submenu.js
CHANGED
|
@@ -99,7 +99,7 @@ export const NSubmenu = defineComponent({
|
|
|
99
99
|
const { isHorizontal, paddingLeft, collapsed, mergedDisabled, maxIconSize, activeIconSize, title, childActive, icon, handleClick, menuProps: { nodeProps }, dropdownShow, iconMarginRight, tmNode, mergedClsPrefix } = this;
|
|
100
100
|
const attrs = nodeProps === null || nodeProps === void 0 ? void 0 : nodeProps(tmNode.rawNode);
|
|
101
101
|
return (h("div", Object.assign({}, attrs, { class: [`${mergedClsPrefix}-menu-item`, attrs === null || attrs === void 0 ? void 0 : attrs.class], role: "menuitem" }),
|
|
102
|
-
h(NMenuOptionContent, { tmNode: tmNode, paddingLeft: paddingLeft, collapsed: collapsed, disabled: mergedDisabled, iconMarginRight: iconMarginRight, maxIconSize: maxIconSize, activeIconSize: activeIconSize, title: title, showArrow: !isHorizontal, childActive: childActive, clsPrefix: mergedClsPrefix, icon: icon, hover: dropdownShow, onClick: handleClick })));
|
|
102
|
+
h(NMenuOptionContent, { tmNode: tmNode, paddingLeft: paddingLeft, collapsed: collapsed, disabled: mergedDisabled, iconMarginRight: iconMarginRight, maxIconSize: maxIconSize, activeIconSize: activeIconSize, title: title, extra: this.extra, showArrow: !isHorizontal, childActive: childActive, clsPrefix: mergedClsPrefix, icon: icon, hover: dropdownShow, onClick: handleClick })));
|
|
103
103
|
};
|
|
104
104
|
const createSubmenuChildren = () => {
|
|
105
105
|
return (h(NFadeInExpandTransition, null, {
|
package/es/menu/src/utils.d.ts
CHANGED
|
@@ -4,4 +4,4 @@ import { MenuOption, MenuGroupOption, MenuIgnoredOption, MenuMixedOption } from
|
|
|
4
4
|
import type { MenuSetupProps } from './Menu';
|
|
5
5
|
export declare function isIgnoredNode(rawNode: MenuMixedOption): rawNode is MenuIgnoredOption;
|
|
6
6
|
export declare function isDividerNode(rawNode: MenuMixedOption): rawNode is MenuIgnoredOption;
|
|
7
|
-
export declare function itemRenderer(tmNode: TreeNode<MenuOption, MenuGroupOption, MenuIgnoredOption>, menuProps: MenuSetupProps): VNode |
|
|
7
|
+
export declare function itemRenderer(tmNode: TreeNode<MenuOption, MenuGroupOption, MenuIgnoredOption>, menuProps: MenuSetupProps): VNode | null;
|
package/es/menu/src/utils.js
CHANGED
|
@@ -17,11 +17,15 @@ export function isDividerNode(rawNode) {
|
|
|
17
17
|
}
|
|
18
18
|
export function itemRenderer(tmNode, menuProps) {
|
|
19
19
|
const { rawNode } = tmNode;
|
|
20
|
+
const { show } = rawNode;
|
|
21
|
+
if (typeof show === 'boolean' && !show) {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
20
24
|
if (isIgnoredNode(rawNode)) {
|
|
21
25
|
if (isDividerNode(rawNode)) {
|
|
22
26
|
return h(NMenuDivider, Object.assign({ key: tmNode.key }, rawNode.props));
|
|
23
27
|
}
|
|
24
|
-
return
|
|
28
|
+
return null;
|
|
25
29
|
}
|
|
26
30
|
const { labelField } = menuProps;
|
|
27
31
|
const { key, level, isGroup } = tmNode;
|
|
@@ -19,6 +19,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
19
19
|
onMouseleave: PropType<(e: MouseEvent) => void>;
|
|
20
20
|
}, {
|
|
21
21
|
mergedClsPrefix: import("vue").Ref<string>;
|
|
22
|
+
rtlEnabled: import("vue").Ref<import("../../config-provider/src/internal-interface").RtlItem | undefined> | undefined;
|
|
22
23
|
messageProviderProps: import("./MessageProvider").MessageProviderSetupProps;
|
|
23
24
|
handleClose(): void;
|
|
24
25
|
cssVars: import("vue").ComputedRef<{
|
|
@@ -2,7 +2,7 @@ import { computed, h, defineComponent, inject } from 'vue';
|
|
|
2
2
|
import { InfoIcon, SuccessIcon, WarningIcon, ErrorIcon } from '../../_internal/icons';
|
|
3
3
|
import { NIconSwitchTransition, NBaseLoading, NBaseIcon, NBaseClose } from '../../_internal';
|
|
4
4
|
import { render, createKey } from '../../_utils';
|
|
5
|
-
import { useConfig, useTheme, useThemeClass } from '../../_mixins';
|
|
5
|
+
import { useConfig, useTheme, useThemeClass, useRtl } from '../../_mixins';
|
|
6
6
|
import { messageLight } from '../styles';
|
|
7
7
|
import { messageProps } from './message-props';
|
|
8
8
|
import { messageProviderInjectionKey } from './context';
|
|
@@ -18,10 +18,11 @@ export default defineComponent({
|
|
|
18
18
|
name: 'Message',
|
|
19
19
|
props: Object.assign(Object.assign({}, messageProps), { render: Function }),
|
|
20
20
|
setup(props) {
|
|
21
|
-
const { inlineThemeDisabled } = useConfig();
|
|
21
|
+
const { inlineThemeDisabled, mergedRtlRef } = useConfig(props);
|
|
22
22
|
const { props: messageProviderProps, mergedClsPrefixRef
|
|
23
23
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
24
24
|
} = inject(messageProviderInjectionKey);
|
|
25
|
+
const rtlEnabledRef = useRtl('Message', mergedRtlRef, mergedClsPrefixRef);
|
|
25
26
|
const themeRef = useTheme('Message', '-message', style, messageLight, messageProviderProps, mergedClsPrefixRef);
|
|
26
27
|
const cssVarsRef = computed(() => {
|
|
27
28
|
const { type } = props;
|
|
@@ -60,6 +61,7 @@ export default defineComponent({
|
|
|
60
61
|
: undefined;
|
|
61
62
|
return {
|
|
62
63
|
mergedClsPrefix: mergedClsPrefixRef,
|
|
64
|
+
rtlEnabled: rtlEnabledRef,
|
|
63
65
|
messageProviderProps,
|
|
64
66
|
handleClose() {
|
|
65
67
|
var _a;
|
|
@@ -82,7 +84,10 @@ export default defineComponent({
|
|
|
82
84
|
: 'flex-end'
|
|
83
85
|
},
|
|
84
86
|
cssVars
|
|
85
|
-
] }, renderMessage ? (renderMessage(this.$props)) : (h("div", { class:
|
|
87
|
+
] }, renderMessage ? (renderMessage(this.$props)) : (h("div", { class: [
|
|
88
|
+
`${mergedClsPrefix}-message ${mergedClsPrefix}-message--${type}-type`,
|
|
89
|
+
this.rtlEnabled && `${mergedClsPrefix}-message--rtl`
|
|
90
|
+
] },
|
|
86
91
|
(iconNode = createIconVNode(icon, type, mergedClsPrefix)) &&
|
|
87
92
|
showIcon ? (h("div", { class: `${mergedClsPrefix}-message__icon ${mergedClsPrefix}-message__icon--${type}-type` },
|
|
88
93
|
h(NIconSwitchTransition, null, {
|
|
@@ -3,7 +3,10 @@ import { commonLight } from '../../_styles/common';
|
|
|
3
3
|
export const self = (vars) => {
|
|
4
4
|
const { textColor2, closeIconColor, closeIconColorHover, closeIconColorPressed, infoColor, successColor, errorColor, warningColor, popoverColor, boxShadow2, primaryColor, lineHeight, borderRadius, closeColorHover, closeColorPressed } = vars;
|
|
5
5
|
return Object.assign(Object.assign({}, commonVariables), { closeBorderRadius: borderRadius, textColor: textColor2, textColorInfo: textColor2, textColorSuccess: textColor2, textColorError: textColor2, textColorWarning: textColor2, textColorLoading: textColor2, color: popoverColor, colorInfo: popoverColor, colorSuccess: popoverColor, colorError: popoverColor, colorWarning: popoverColor, colorLoading: popoverColor, boxShadow: boxShadow2, boxShadowInfo: boxShadow2, boxShadowSuccess: boxShadow2, boxShadowError: boxShadow2, boxShadowWarning: boxShadow2, boxShadowLoading: boxShadow2, iconColor: textColor2, iconColorInfo: infoColor, iconColorSuccess: successColor, iconColorWarning: warningColor, iconColorError: errorColor, iconColorLoading: primaryColor, closeColorHover,
|
|
6
|
-
closeColorPressed,
|
|
6
|
+
closeColorPressed,
|
|
7
|
+
closeIconColor,
|
|
8
|
+
closeIconColorHover,
|
|
9
|
+
closeIconColorPressed, closeColorHoverInfo: closeColorHover, closeColorPressedInfo: closeColorPressed, closeIconColorInfo: closeIconColor, closeIconColorHoverInfo: closeIconColorHover, closeIconColorPressedInfo: closeIconColorPressed, closeColorHoverSuccess: closeColorHover, closeColorPressedSuccess: closeColorPressed, closeIconColorSuccess: closeIconColor, closeIconColorHoverSuccess: closeIconColorHover, closeIconColorPressedSuccess: closeIconColorPressed, closeColorHoverError: closeColorHover, closeColorPressedError: closeColorPressed, closeIconColorError: closeIconColor, closeIconColorHoverError: closeIconColorHover, closeIconColorPressedError: closeIconColorPressed, closeColorHoverWarning: closeColorHover, closeColorPressedWarning: closeColorPressed, closeIconColorWarning: closeIconColor, closeIconColorHoverWarning: closeIconColorHover, closeIconColorPressedWarning: closeIconColorPressed, closeColorHoverLoading: closeColorHover, closeColorPressedLoading: closeColorPressed, closeIconColorLoading: closeIconColor, closeIconColorHoverLoading: closeIconColorHover, closeIconColorPressedLoading: closeIconColorPressed, loadingColor: primaryColor, lineHeight,
|
|
7
10
|
borderRadius });
|
|
8
11
|
};
|
|
9
12
|
const messageLight = {
|
package/es/modal/src/Modal.js
CHANGED
|
@@ -2,6 +2,7 @@ import { h, withDirectives, Transition, ref, computed, defineComponent, provide,
|
|
|
2
2
|
import { zindexable } from 'vdirs';
|
|
3
3
|
import { useIsMounted, useClicked, useClickPosition } from 'vooks';
|
|
4
4
|
import { VLazyTeleport } from 'vueuc';
|
|
5
|
+
import { getPreciseEventTarget } from 'seemly';
|
|
5
6
|
import { dialogProviderInjectionKey } from '../../dialog/src/context';
|
|
6
7
|
import { useConfig, useTheme, useThemeClass } from '../../_mixins';
|
|
7
8
|
import { keep, call, warnOnce, useIsComposing, eventEffectNotPerformed } from '../../_utils';
|
|
@@ -142,7 +143,7 @@ export default defineComponent({
|
|
|
142
143
|
onMaskClick(e);
|
|
143
144
|
}
|
|
144
145
|
if (props.maskClosable) {
|
|
145
|
-
if ((_a = containerRef.value) === null || _a === void 0 ? void 0 : _a.contains(e
|
|
146
|
+
if ((_a = containerRef.value) === null || _a === void 0 ? void 0 : _a.contains(getPreciseEventTarget(e))) {
|
|
146
147
|
doUpdateShow(false);
|
|
147
148
|
}
|
|
148
149
|
}
|
|
@@ -6,7 +6,9 @@ export const self = (vars) => {
|
|
|
6
6
|
const { textColor2, successColor, infoColor, warningColor, errorColor, popoverColor, closeIconColor, closeIconColorHover, closeIconColorPressed, closeColorHover, closeColorPressed, textColor1, textColor3, borderRadius, fontWeightStrong, boxShadow2, lineHeight, fontSize } = vars;
|
|
7
7
|
return Object.assign(Object.assign({}, commonVars), { borderRadius,
|
|
8
8
|
lineHeight,
|
|
9
|
-
fontSize, headerFontWeight: fontWeightStrong, iconColor: textColor2, iconColorSuccess: successColor, iconColorInfo: infoColor, iconColorWarning: warningColor, iconColorError: errorColor, color: popoverColor, textColor: textColor2, closeIconColor
|
|
9
|
+
fontSize, headerFontWeight: fontWeightStrong, iconColor: textColor2, iconColorSuccess: successColor, iconColorInfo: infoColor, iconColorWarning: warningColor, iconColorError: errorColor, color: popoverColor, textColor: textColor2, closeIconColor,
|
|
10
|
+
closeIconColorHover,
|
|
11
|
+
closeIconColorPressed, closeBorderRadius: borderRadius, closeColorHover,
|
|
10
12
|
closeColorPressed, headerTextColor: textColor1, descriptionTextColor: textColor3, actionTextColor: textColor2, boxShadow: boxShadow2 });
|
|
11
13
|
};
|
|
12
14
|
const notificationLight = createTheme({
|