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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PropType, InputHTMLAttributes, HTMLAttributes } from 'vue';
|
|
2
2
|
import { TreeNode } from 'treemate';
|
|
3
3
|
import { FollowerPlacement } from 'vueuc';
|
|
4
|
-
import { RenderLabel, RenderOption } from '../../_internal/select-menu/src/interface';
|
|
4
|
+
import { RenderLabel, RenderOption, NodeProps } from '../../_internal/select-menu/src/interface';
|
|
5
5
|
import { RenderTag } from '../../_internal/selection/src/interface';
|
|
6
6
|
import type { FormValidationStatus } from '../../form/src/interface';
|
|
7
7
|
import type { MaybeArray, ExtractPublicPropTypes } from '../../_utils';
|
|
@@ -89,6 +89,7 @@ export declare const selectProps: {
|
|
|
89
89
|
readonly renderTag: PropType<RenderTag>;
|
|
90
90
|
readonly 'onUpdate:value': PropType<MaybeArray<OnUpdateValue> | undefined>;
|
|
91
91
|
readonly inputProps: PropType<InputHTMLAttributes>;
|
|
92
|
+
readonly nodeProps: PropType<NodeProps>;
|
|
92
93
|
readonly onUpdateValue: PropType<MaybeArray<OnUpdateValue> | undefined>;
|
|
93
94
|
readonly onBlur: PropType<MaybeArray<(e: FocusEvent) => void> | undefined>;
|
|
94
95
|
readonly onClear: PropType<MaybeArray<() => void> | undefined>;
|
|
@@ -576,6 +577,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
576
577
|
readonly renderTag: PropType<RenderTag>;
|
|
577
578
|
readonly 'onUpdate:value': PropType<MaybeArray<OnUpdateValue> | undefined>;
|
|
578
579
|
readonly inputProps: PropType<InputHTMLAttributes>;
|
|
580
|
+
readonly nodeProps: PropType<NodeProps>;
|
|
579
581
|
readonly onUpdateValue: PropType<MaybeArray<OnUpdateValue> | undefined>;
|
|
580
582
|
readonly onBlur: PropType<MaybeArray<(e: FocusEvent) => void> | undefined>;
|
|
581
583
|
readonly onClear: PropType<MaybeArray<() => void> | undefined>;
|
|
@@ -1399,6 +1401,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1399
1401
|
readonly renderTag: PropType<RenderTag>;
|
|
1400
1402
|
readonly 'onUpdate:value': PropType<MaybeArray<OnUpdateValue> | undefined>;
|
|
1401
1403
|
readonly inputProps: PropType<InputHTMLAttributes>;
|
|
1404
|
+
readonly nodeProps: PropType<NodeProps>;
|
|
1402
1405
|
readonly onUpdateValue: PropType<MaybeArray<OnUpdateValue> | undefined>;
|
|
1403
1406
|
readonly onBlur: PropType<MaybeArray<(e: FocusEvent) => void> | undefined>;
|
|
1404
1407
|
readonly onClear: PropType<MaybeArray<() => void> | undefined>;
|
package/es/select/src/Select.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h, ref, computed, toRef, defineComponent, watch, Transition, withDirectives, vShow, watchEffect } from 'vue';
|
|
2
|
-
import { happensIn } from 'seemly';
|
|
2
|
+
import { getPreciseEventTarget, happensIn } from 'seemly';
|
|
3
3
|
import { createTreeMate } from 'treemate';
|
|
4
4
|
import { VBinder, VFollower, VTarget } from 'vueuc';
|
|
5
5
|
import { useIsMounted, useMergedState, useCompitable } from 'vooks';
|
|
@@ -55,7 +55,7 @@ export const selectProps = Object.assign(Object.assign({}, useTheme.props), { to
|
|
|
55
55
|
}, childrenField: {
|
|
56
56
|
type: String,
|
|
57
57
|
default: 'children'
|
|
58
|
-
}, renderLabel: Function, renderOption: Function, renderTag: Function, 'onUpdate:value': [Function, Array], inputProps: Object,
|
|
58
|
+
}, renderLabel: Function, renderOption: Function, renderTag: Function, 'onUpdate:value': [Function, Array], inputProps: Object, nodeProps: Function,
|
|
59
59
|
// for jsx
|
|
60
60
|
onUpdateValue: [Function, Array], onBlur: [Function, Array], onClear: [Function, Array], onFocus: [Function, Array], onScroll: [Function, Array], onSearch: [Function, Array], onUpdateShow: [Function, Array], 'onUpdate:show': [Function, Array], displayDirective: {
|
|
61
61
|
type: String,
|
|
@@ -364,7 +364,7 @@ export default defineComponent({
|
|
|
364
364
|
function handleMenuClickOutside(e) {
|
|
365
365
|
var _a;
|
|
366
366
|
if (mergedShowRef.value) {
|
|
367
|
-
if (!((_a = triggerRef.value) === null || _a === void 0 ? void 0 : _a.$el.contains(e
|
|
367
|
+
if (!((_a = triggerRef.value) === null || _a === void 0 ? void 0 : _a.$el.contains(getPreciseEventTarget(e)))) {
|
|
368
368
|
// outside select, don't need to return focus
|
|
369
369
|
closeMenu();
|
|
370
370
|
}
|
|
@@ -656,7 +656,7 @@ export default defineComponent({
|
|
|
656
656
|
`${this.mergedClsPrefix}-select-menu`,
|
|
657
657
|
this.themeClass,
|
|
658
658
|
(_b = this.menuProps) === null || _b === void 0 ? void 0 : _b.class
|
|
659
|
-
], clsPrefix: this.mergedClsPrefix, focusable: true, labelField: this.labelField, valueField: this.valueField, autoPending: true, theme: this.mergedTheme.peers.InternalSelectMenu, themeOverrides: this.mergedTheme.peerOverrides
|
|
659
|
+
], clsPrefix: this.mergedClsPrefix, focusable: true, labelField: this.labelField, valueField: this.valueField, autoPending: true, nodeProps: this.nodeProps, theme: this.mergedTheme.peers.InternalSelectMenu, themeOverrides: this.mergedTheme.peerOverrides
|
|
660
660
|
.InternalSelectMenu, treeMate: this.treeMate, multiple: this.multiple, size: "medium", renderOption: this.renderOption, renderLabel: this.renderLabel, value: this.mergedValue, style: [(_c = this.menuProps) === null || _c === void 0 ? void 0 : _c.style, this.cssVars], onToggle: this.handleToggle, onScroll: this.handleMenuScroll, onFocus: this.handleMenuFocus, onBlur: this.handleMenuBlur, onKeydown: this.handleMenuKeydown, onTabOut: this.handleMenuTabOut, onMousedown: this.handleMenuMousedown, show: this.mergedShow, showCheckmark: this.internalShowCheckmark, resetMenuOnOptionsChange: this.resetMenuOnOptionsChange }), {
|
|
661
661
|
empty: () => { var _a, _b; return [(_b = (_a = this.$slots).empty) === null || _b === void 0 ? void 0 : _b.call(_a)]; },
|
|
662
662
|
action: () => { var _a, _b; return [(_b = (_a = this.$slots).action) === null || _b === void 0 ? void 0 : _b.call(_a)]; }
|
|
@@ -66,7 +66,7 @@ export default defineComponent({
|
|
|
66
66
|
// Maybe it's a bug of chrome
|
|
67
67
|
const child = h('div', mergeProps({
|
|
68
68
|
class: `${mergedClsPrefix}-skeleton`,
|
|
69
|
-
style
|
|
69
|
+
style
|
|
70
70
|
}, $attrs));
|
|
71
71
|
if (repeat > 1) {
|
|
72
72
|
return (h(Fragment, null, Array.apply(null, { length: repeat }).map((_) => [
|
package/es/slider/styles/dark.js
CHANGED
|
@@ -6,7 +6,8 @@ const sliderDark = {
|
|
|
6
6
|
self(vars) {
|
|
7
7
|
const boxShadow = '0 2px 8px 0 rgba(0, 0, 0, 0.12)';
|
|
8
8
|
const { railColor, modalColor, primaryColorSuppl, popoverColor, textColor2, cardColor, borderRadius, fontSize, opacityDisabled } = vars;
|
|
9
|
-
return Object.assign(Object.assign({}, sizeVariables), { fontSize,
|
|
9
|
+
return Object.assign(Object.assign({}, sizeVariables), { fontSize,
|
|
10
|
+
railColor, railColorHover: railColor, fillColor: primaryColorSuppl, fillColorHover: primaryColorSuppl, opacityDisabled, handleColor: '#FFF', dotColor: cardColor, dotColorModal: modalColor, dotColorPopover: popoverColor, handleBoxShadow: '0px 2px 4px 0 rgba(0, 0, 0, 0.4)', handleBoxShadowHover: '0px 2px 4px 0 rgba(0, 0, 0, 0.4)', handleBoxShadowActive: '0px 2px 4px 0 rgba(0, 0, 0, 0.4)', handleBoxShadowFocus: '0px 2px 4px 0 rgba(0, 0, 0, 0.4)', indicatorColor: popoverColor, indicatorBoxShadow: boxShadow, indicatorTextColor: textColor2, indicatorBorderRadius: borderRadius, dotBorder: `2px solid ${railColor}`, dotBorderActive: `2px solid ${primaryColorSuppl}`, dotBoxShadow: '' });
|
|
10
11
|
}
|
|
11
12
|
};
|
|
12
13
|
export default sliderDark;
|
|
@@ -4,7 +4,8 @@ const self = (vars) => {
|
|
|
4
4
|
const indicatorColor = 'rgba(0, 0, 0, .85)';
|
|
5
5
|
const boxShadow = '0 2px 8px 0 rgba(0, 0, 0, 0.12)';
|
|
6
6
|
const { railColor, primaryColor, baseColor, cardColor, modalColor, popoverColor, borderRadius, fontSize, opacityDisabled } = vars;
|
|
7
|
-
return Object.assign(Object.assign({}, sizeVariables), { fontSize,
|
|
7
|
+
return Object.assign(Object.assign({}, sizeVariables), { fontSize,
|
|
8
|
+
railColor, railColorHover: railColor, fillColor: primaryColor, fillColorHover: primaryColor, opacityDisabled, handleColor: '#FFF', dotColor: cardColor, dotColorModal: modalColor, dotColorPopover: popoverColor, handleBoxShadow: '0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)', handleBoxShadowHover: '0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)', handleBoxShadowActive: '0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)', handleBoxShadowFocus: '0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)', indicatorColor, indicatorBoxShadow: boxShadow, indicatorTextColor: baseColor, indicatorBorderRadius: borderRadius, dotBorder: `2px solid ${railColor}`, dotBorderActive: `2px solid ${primaryColor}`, dotBoxShadow: '' });
|
|
8
9
|
};
|
|
9
10
|
const sliderLight = {
|
|
10
11
|
name: 'Slider',
|
|
@@ -7,6 +7,7 @@ export declare const statisticProps: {
|
|
|
7
7
|
labelFontSize: string;
|
|
8
8
|
labelFontWeight: string;
|
|
9
9
|
valueFontWeight: string;
|
|
10
|
+
valueFontSize: string;
|
|
10
11
|
labelTextColor: string;
|
|
11
12
|
valuePrefixTextColor: string;
|
|
12
13
|
valueSuffixTextColor: string;
|
|
@@ -16,6 +17,7 @@ export declare const statisticProps: {
|
|
|
16
17
|
labelFontSize: string;
|
|
17
18
|
labelFontWeight: string;
|
|
18
19
|
valueFontWeight: string;
|
|
20
|
+
valueFontSize: string;
|
|
19
21
|
labelTextColor: string;
|
|
20
22
|
valuePrefixTextColor: string;
|
|
21
23
|
valueSuffixTextColor: string;
|
|
@@ -25,6 +27,7 @@ export declare const statisticProps: {
|
|
|
25
27
|
labelFontSize: string;
|
|
26
28
|
labelFontWeight: string;
|
|
27
29
|
valueFontWeight: string;
|
|
30
|
+
valueFontSize: string;
|
|
28
31
|
labelTextColor: string;
|
|
29
32
|
valuePrefixTextColor: string;
|
|
30
33
|
valueSuffixTextColor: string;
|
|
@@ -40,6 +43,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
40
43
|
labelFontSize: string;
|
|
41
44
|
labelFontWeight: string;
|
|
42
45
|
valueFontWeight: string;
|
|
46
|
+
valueFontSize: string;
|
|
43
47
|
labelTextColor: string;
|
|
44
48
|
valuePrefixTextColor: string;
|
|
45
49
|
valueSuffixTextColor: string;
|
|
@@ -49,6 +53,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
49
53
|
labelFontSize: string;
|
|
50
54
|
labelFontWeight: string;
|
|
51
55
|
valueFontWeight: string;
|
|
56
|
+
valueFontSize: string;
|
|
52
57
|
labelTextColor: string;
|
|
53
58
|
valuePrefixTextColor: string;
|
|
54
59
|
valueSuffixTextColor: string;
|
|
@@ -58,6 +63,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
58
63
|
labelFontSize: string;
|
|
59
64
|
labelFontWeight: string;
|
|
60
65
|
valueFontWeight: string;
|
|
66
|
+
valueFontSize: string;
|
|
61
67
|
labelTextColor: string;
|
|
62
68
|
valuePrefixTextColor: string;
|
|
63
69
|
valueSuffixTextColor: string;
|
|
@@ -72,6 +78,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
72
78
|
'--n-label-font-weight': string;
|
|
73
79
|
'--n-label-text-color': string;
|
|
74
80
|
'--n-value-font-weight': string;
|
|
81
|
+
'--n-value-font-size': string;
|
|
75
82
|
'--n-value-prefix-text-color': string;
|
|
76
83
|
'--n-value-suffix-text-color': string;
|
|
77
84
|
'--n-value-text-color': string;
|
|
@@ -86,6 +93,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
86
93
|
labelFontSize: string;
|
|
87
94
|
labelFontWeight: string;
|
|
88
95
|
valueFontWeight: string;
|
|
96
|
+
valueFontSize: string;
|
|
89
97
|
labelTextColor: string;
|
|
90
98
|
valuePrefixTextColor: string;
|
|
91
99
|
valueSuffixTextColor: string;
|
|
@@ -95,6 +103,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
95
103
|
labelFontSize: string;
|
|
96
104
|
labelFontWeight: string;
|
|
97
105
|
valueFontWeight: string;
|
|
106
|
+
valueFontSize: string;
|
|
98
107
|
labelTextColor: string;
|
|
99
108
|
valuePrefixTextColor: string;
|
|
100
109
|
valueSuffixTextColor: string;
|
|
@@ -104,6 +113,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
104
113
|
labelFontSize: string;
|
|
105
114
|
labelFontWeight: string;
|
|
106
115
|
valueFontWeight: string;
|
|
116
|
+
valueFontSize: string;
|
|
107
117
|
labelTextColor: string;
|
|
108
118
|
valuePrefixTextColor: string;
|
|
109
119
|
valueSuffixTextColor: string;
|
|
@@ -12,13 +12,14 @@ export default defineComponent({
|
|
|
12
12
|
const themeRef = useTheme('Statistic', '-statistic', style, statisticLight, props, mergedClsPrefixRef);
|
|
13
13
|
const rtlEnabledRef = useRtl('Statistic', mergedRtlRef, mergedClsPrefixRef);
|
|
14
14
|
const cssVarsRef = computed(() => {
|
|
15
|
-
const { self: { labelFontWeight, valueFontWeight, valuePrefixTextColor, labelTextColor, valueSuffixTextColor, valueTextColor, labelFontSize }, common: { cubicBezierEaseInOut } } = themeRef.value;
|
|
15
|
+
const { self: { labelFontWeight, valueFontSize, valueFontWeight, valuePrefixTextColor, labelTextColor, valueSuffixTextColor, valueTextColor, labelFontSize }, common: { cubicBezierEaseInOut } } = themeRef.value;
|
|
16
16
|
return {
|
|
17
17
|
'--n-bezier': cubicBezierEaseInOut,
|
|
18
18
|
'--n-label-font-size': labelFontSize,
|
|
19
19
|
'--n-label-font-weight': labelFontWeight,
|
|
20
20
|
'--n-label-text-color': labelTextColor,
|
|
21
21
|
'--n-value-font-weight': valueFontWeight,
|
|
22
|
+
'--n-value-font-size': valueFontSize,
|
|
22
23
|
'--n-value-prefix-text-color': valuePrefixTextColor,
|
|
23
24
|
'--n-value-suffix-text-color': valueSuffixTextColor,
|
|
24
25
|
'--n-value-text-color': valueTextColor
|
|
@@ -4,6 +4,7 @@ import { cB, cE } from '../../../_utils/cssr'; // vars:
|
|
|
4
4
|
// --n-label-font-weight
|
|
5
5
|
// --n-label-text-color
|
|
6
6
|
// --n-value-font-weight
|
|
7
|
+
// --n-value-font-size
|
|
7
8
|
// --n-value-prefix-text-color
|
|
8
9
|
// --n-value-suffix-text-color
|
|
9
10
|
// --n-value-text-color
|
|
@@ -18,18 +19,18 @@ export default cB('statistic', [cE('label', `
|
|
|
18
19
|
font-weight: var(--n-value-font-weight);
|
|
19
20
|
`, [cE('prefix', `
|
|
20
21
|
margin: 0 4px 0 0;
|
|
21
|
-
font-size:
|
|
22
|
+
font-size: var(--n-value-font-size);
|
|
22
23
|
transition: .3s color var(--n-bezier);
|
|
23
24
|
color: var(--n-value-prefix-text-color);
|
|
24
25
|
`, [cB('icon', {
|
|
25
26
|
verticalAlign: '-0.125em'
|
|
26
27
|
})]), cE('content', `
|
|
27
|
-
font-size:
|
|
28
|
+
font-size: var(--n-value-font-size);
|
|
28
29
|
transition: .3s color var(--n-bezier);
|
|
29
30
|
color: var(--n-value-text-color);
|
|
30
31
|
`), cE('suffix', `
|
|
31
32
|
margin: 0 0 0 4px;
|
|
32
|
-
font-size:
|
|
33
|
+
font-size: var(--n-value-font-size);
|
|
33
34
|
transition: .3s color var(--n-bezier);
|
|
34
35
|
color: var(--n-value-suffix-text-color);
|
|
35
36
|
`, [cB('icon', {
|
package/es/steps/src/Steps.d.ts
CHANGED
|
@@ -249,6 +249,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
249
249
|
}, any>>>;
|
|
250
250
|
}, {
|
|
251
251
|
mergedClsPrefix: import("vue").ComputedRef<string>;
|
|
252
|
+
rtlEnabled: Ref<import("../../config-provider/src/internal-interface").RtlItem | undefined> | undefined;
|
|
252
253
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
253
254
|
current: NumberConstructor;
|
|
254
255
|
status: {
|
package/es/steps/src/Steps.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h, defineComponent, provide } from 'vue';
|
|
2
|
-
import { useConfig, useTheme } from '../../_mixins';
|
|
2
|
+
import { useConfig, useTheme, useRtl } from '../../_mixins';
|
|
3
3
|
import { createInjectionKey, flatten, getSlot } from '../../_utils';
|
|
4
4
|
import { stepsLight } from '../styles';
|
|
5
5
|
import style from './styles/index.cssr';
|
|
@@ -27,7 +27,8 @@ export default defineComponent({
|
|
|
27
27
|
name: 'Steps',
|
|
28
28
|
props: stepsProps,
|
|
29
29
|
setup(props, { slots }) {
|
|
30
|
-
const { mergedClsPrefixRef } = useConfig(props);
|
|
30
|
+
const { mergedClsPrefixRef, mergedRtlRef } = useConfig(props);
|
|
31
|
+
const rtlEnabledRef = useRtl('Steps', mergedRtlRef, mergedClsPrefixRef);
|
|
31
32
|
const themeRef = useTheme('Steps', '-steps', style, stepsLight, props, mergedClsPrefixRef);
|
|
32
33
|
provide(stepsInjectionKey, {
|
|
33
34
|
props,
|
|
@@ -36,13 +37,15 @@ export default defineComponent({
|
|
|
36
37
|
stepsSlots: slots
|
|
37
38
|
});
|
|
38
39
|
return {
|
|
39
|
-
mergedClsPrefix: mergedClsPrefixRef
|
|
40
|
+
mergedClsPrefix: mergedClsPrefixRef,
|
|
41
|
+
rtlEnabled: rtlEnabledRef
|
|
40
42
|
};
|
|
41
43
|
},
|
|
42
44
|
render() {
|
|
43
45
|
const { mergedClsPrefix } = this;
|
|
44
46
|
return (h("div", { class: [
|
|
45
47
|
`${mergedClsPrefix}-steps`,
|
|
48
|
+
this.rtlEnabled && `${mergedClsPrefix}-steps--rtl`,
|
|
46
49
|
this.vertical && `${mergedClsPrefix}-steps--vertical`
|
|
47
50
|
] }, stepsWithIndex(flatten(getSlot(this)))));
|
|
48
51
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { c, cB, cM, cE } from '../../../_utils/cssr';
|
|
2
|
+
export default c([cB('steps', [cM('rtl', `
|
|
3
|
+
direction: rtl;
|
|
4
|
+
text-align: right;
|
|
5
|
+
`, [cB('step-content', [cB('step-content-header', `
|
|
6
|
+
margin-left: 0;
|
|
7
|
+
margin-right: 9px;
|
|
8
|
+
`), cE('description', `
|
|
9
|
+
margin-left: 0;
|
|
10
|
+
margin-right: 9px;
|
|
11
|
+
`)]), cM('vertical', [c('>', [cB('step', [c('>', [cB('step-indicator', [c('>', [cB('step-splitor', `
|
|
12
|
+
left: unset;
|
|
13
|
+
right: calc(var(--n-indicator-size) / 2);
|
|
14
|
+
`)])])])])])])])])]);
|
package/es/steps/styles/index.js
CHANGED
package/es/styles.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export { badgeDark, badgeRtl as unstableBadgeRtl } from './badge/styles';
|
|
|
9
9
|
export { breadcrumbDark } from './breadcrumb/styles';
|
|
10
10
|
export { buttonDark, buttonRtl as unstableButtonRtl } from './button/styles';
|
|
11
11
|
export { notificationRtl as unstableNotificationRtl } from './notification/styles';
|
|
12
|
+
export { messageRtl as unstableMessageRtl } from './message/styles';
|
|
12
13
|
export { buttonGroupDark, buttonGroupRtl as unstableButtonGroupRtl } from './button-group/styles';
|
|
13
14
|
export { cardDark, cardRtl as unstableCardRtl } from './card/styles';
|
|
14
15
|
export { cascaderDark } from './cascader/styles';
|
|
@@ -21,7 +22,7 @@ export { datePickerDark } from './date-picker/styles';
|
|
|
21
22
|
export { descriptionsDark } from './descriptions/styles';
|
|
22
23
|
export { dialogDark } from './dialog/styles';
|
|
23
24
|
export { dividerDark } from './divider/styles';
|
|
24
|
-
export { drawerDark } from './drawer/styles';
|
|
25
|
+
export { drawerDark, drawerRtl as unstableDrawerRtl } from './drawer/styles';
|
|
25
26
|
export { dropdownDark } from './dropdown/styles';
|
|
26
27
|
export { dynamicInputDark, dynamicInputRtl as unstableDynamicInputRtl } from './dynamic-input/styles';
|
|
27
28
|
export { dynamicTagsDark } from './dynamic-tags/styles';
|
|
@@ -33,7 +34,7 @@ export { iconDark } from './icon/styles';
|
|
|
33
34
|
export { inputDark, inputRtl as unstableInputRtl } from './input/styles';
|
|
34
35
|
export { inputNumberDark, inputNumberRtl as unstableInputNumberRtl } from './input-number/styles';
|
|
35
36
|
export { layoutDark } from './layout/styles';
|
|
36
|
-
export { listDark } from './list/styles';
|
|
37
|
+
export { listDark, listRtl as unstableListRtl } from './list/styles';
|
|
37
38
|
export { loadingBarDark } from './loading-bar/styles';
|
|
38
39
|
export { logDark } from './log/styles';
|
|
39
40
|
export { mentionDark } from './mention/styles';
|
|
@@ -55,7 +56,7 @@ export { sliderDark } from './slider/styles';
|
|
|
55
56
|
export { spaceDark, spaceRtl as unstableSpaceRtl } from './space/styles';
|
|
56
57
|
export { spinDark } from './spin/styles';
|
|
57
58
|
export { statisticDark, statisticRtl as unstableStatisticRtl } from './statistic/styles';
|
|
58
|
-
export { stepsDark } from './steps/styles';
|
|
59
|
+
export { stepsDark, stepsRtl as unstableStepsRtl } from './steps/styles';
|
|
59
60
|
export { switchDark } from './switch/styles';
|
|
60
61
|
export { tableDark, tableRtl as unstableTableRtl } from './table/styles';
|
|
61
62
|
export { tabsDark } from './tabs/styles';
|
package/es/styles.js
CHANGED
|
@@ -9,6 +9,7 @@ export { badgeDark, badgeRtl as unstableBadgeRtl } from './badge/styles';
|
|
|
9
9
|
export { breadcrumbDark } from './breadcrumb/styles';
|
|
10
10
|
export { buttonDark, buttonRtl as unstableButtonRtl } from './button/styles';
|
|
11
11
|
export { notificationRtl as unstableNotificationRtl } from './notification/styles';
|
|
12
|
+
export { messageRtl as unstableMessageRtl } from './message/styles';
|
|
12
13
|
export { buttonGroupDark, buttonGroupRtl as unstableButtonGroupRtl } from './button-group/styles';
|
|
13
14
|
export { cardDark, cardRtl as unstableCardRtl } from './card/styles';
|
|
14
15
|
export { cascaderDark } from './cascader/styles';
|
|
@@ -21,7 +22,7 @@ export { datePickerDark } from './date-picker/styles';
|
|
|
21
22
|
export { descriptionsDark } from './descriptions/styles';
|
|
22
23
|
export { dialogDark } from './dialog/styles';
|
|
23
24
|
export { dividerDark } from './divider/styles';
|
|
24
|
-
export { drawerDark } from './drawer/styles';
|
|
25
|
+
export { drawerDark, drawerRtl as unstableDrawerRtl } from './drawer/styles';
|
|
25
26
|
export { dropdownDark } from './dropdown/styles';
|
|
26
27
|
export { dynamicInputDark, dynamicInputRtl as unstableDynamicInputRtl } from './dynamic-input/styles';
|
|
27
28
|
export { dynamicTagsDark } from './dynamic-tags/styles';
|
|
@@ -33,7 +34,7 @@ export { iconDark } from './icon/styles';
|
|
|
33
34
|
export { inputDark, inputRtl as unstableInputRtl } from './input/styles';
|
|
34
35
|
export { inputNumberDark, inputNumberRtl as unstableInputNumberRtl } from './input-number/styles';
|
|
35
36
|
export { layoutDark } from './layout/styles';
|
|
36
|
-
export { listDark } from './list/styles';
|
|
37
|
+
export { listDark, listRtl as unstableListRtl } from './list/styles';
|
|
37
38
|
export { loadingBarDark } from './loading-bar/styles';
|
|
38
39
|
export { logDark } from './log/styles';
|
|
39
40
|
export { mentionDark } from './mention/styles';
|
|
@@ -55,7 +56,7 @@ export { sliderDark } from './slider/styles';
|
|
|
55
56
|
export { spaceDark, spaceRtl as unstableSpaceRtl } from './space/styles';
|
|
56
57
|
export { spinDark } from './spin/styles';
|
|
57
58
|
export { statisticDark, statisticRtl as unstableStatisticRtl } from './statistic/styles';
|
|
58
|
-
export { stepsDark } from './steps/styles';
|
|
59
|
+
export { stepsDark, stepsRtl as unstableStepsRtl } from './steps/styles';
|
|
59
60
|
export { switchDark } from './switch/styles';
|
|
60
61
|
export { tableDark, tableRtl as unstableTableRtl } from './table/styles';
|
|
61
62
|
export { tabsDark } from './tabs/styles';
|
package/es/switch/src/Switch.js
CHANGED
|
@@ -33,6 +33,7 @@ export const switchProps = Object.assign(Object.assign({}, useTheme.props), { si
|
|
|
33
33
|
},
|
|
34
34
|
/** @deprecated */
|
|
35
35
|
onChange: [Function, Array] });
|
|
36
|
+
let supportCssMax;
|
|
36
37
|
export default defineComponent({
|
|
37
38
|
name: 'Switch',
|
|
38
39
|
props: switchProps,
|
|
@@ -44,6 +45,21 @@ export default defineComponent({
|
|
|
44
45
|
}
|
|
45
46
|
});
|
|
46
47
|
}
|
|
48
|
+
if (supportCssMax === undefined) {
|
|
49
|
+
if (typeof CSS !== 'undefined') {
|
|
50
|
+
if (typeof CSS.supports !== 'undefined') {
|
|
51
|
+
supportCssMax = CSS.supports('width', 'max(1px)');
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
supportCssMax = false;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
// If you are using SSR, we assume that you are targeting browsers with
|
|
59
|
+
// recent versions
|
|
60
|
+
supportCssMax = true;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
47
63
|
const { mergedClsPrefixRef, inlineThemeDisabled } = useConfig(props);
|
|
48
64
|
const themeRef = useTheme('Switch', '-switch', style, switchLight, props, mergedClsPrefixRef);
|
|
49
65
|
const formItem = useFormItem(props);
|
|
@@ -126,11 +142,22 @@ export default defineComponent({
|
|
|
126
142
|
const cssVarsRef = computed(() => {
|
|
127
143
|
const { value: size } = mergedSizeRef;
|
|
128
144
|
const { self: { opacityDisabled, railColor, railColorActive, buttonBoxShadow, buttonColor, boxShadowFocus, loadingColor, textColor, iconColor, [createKey('buttonHeight', size)]: buttonHeight, [createKey('buttonWidth', size)]: buttonWidth, [createKey('buttonWidthPressed', size)]: buttonWidthPressed, [createKey('railHeight', size)]: railHeight, [createKey('railWidth', size)]: railWidth, [createKey('railBorderRadius', size)]: railBorderRadius, [createKey('buttonBorderRadius', size)]: buttonBorderRadius }, common: { cubicBezierEaseInOut } } = themeRef.value;
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
145
|
+
let offset;
|
|
146
|
+
let height;
|
|
147
|
+
let width;
|
|
148
|
+
if (supportCssMax) {
|
|
149
|
+
offset = `calc((${railHeight} - ${buttonHeight}) / 2)`;
|
|
150
|
+
height = `max(${railHeight}, ${buttonHeight})`;
|
|
151
|
+
width = `max(${railWidth}, calc(${railWidth} + ${buttonHeight} - ${railHeight}))`;
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
offset = pxfy((depx(railHeight) - depx(buttonHeight)) / 2);
|
|
155
|
+
height = pxfy(Math.max(depx(railHeight), depx(buttonHeight)));
|
|
156
|
+
width =
|
|
157
|
+
depx(railHeight) > depx(buttonHeight)
|
|
158
|
+
? railWidth
|
|
159
|
+
: pxfy(depx(railWidth) + depx(buttonHeight) - depx(railHeight));
|
|
160
|
+
}
|
|
134
161
|
return {
|
|
135
162
|
'--n-bezier': cubicBezierEaseInOut,
|
|
136
163
|
'--n-button-border-radius': buttonBorderRadius,
|
|
@@ -74,7 +74,7 @@ export default cB('switch', `
|
|
|
74
74
|
padding-left: calc(1.25 * var(--n-rail-height) - var(--n-offset));
|
|
75
75
|
`), c('&:focus', [cE('rail', `
|
|
76
76
|
box-shadow: var(--n-box-shadow-focus);
|
|
77
|
-
`)]), cM('round', [cE('rail', 'border-radius: calc(var(--n-rail-height) / 2);', [cE('button', 'border-radius: calc(var(--n-button-height) / 2);')])]), cNotM('disabled', [cNotM('icon', [cM('rubber-band', [cM('pressed', [cE('rail', [cE('button', 'max-width: var(--n-button-width-pressed);')])]), cE('rail', [c('&:active', [cE('button', 'max-width: var(--n-button-width-pressed);')])]), cM('active', [cM('pressed', [cE('rail', [cE('button', 'left: calc(100% - var(--n-offset) - var(--n-button-width-pressed));')])]), cE('rail', [c('&:active', [cE('button', 'left: calc(100% - var(--n-offset) - var(--n-button-width-pressed));')])])])])])]), cM('active', [cE('rail', [cE('button', 'left: calc(100% -
|
|
77
|
+
`)]), cM('round', [cE('rail', 'border-radius: calc(var(--n-rail-height) / 2);', [cE('button', 'border-radius: calc(var(--n-button-height) / 2);')])]), cNotM('disabled', [cNotM('icon', [cM('rubber-band', [cM('pressed', [cE('rail', [cE('button', 'max-width: var(--n-button-width-pressed);')])]), cE('rail', [c('&:active', [cE('button', 'max-width: var(--n-button-width-pressed);')])]), cM('active', [cM('pressed', [cE('rail', [cE('button', 'left: calc(100% - var(--n-offset) - var(--n-button-width-pressed));')])]), cE('rail', [c('&:active', [cE('button', 'left: calc(100% - var(--n-offset) - var(--n-button-width-pressed));')])])])])])]), cM('active', [cE('rail', [cE('button', 'left: calc(100% - var(--n-button-width) - var(--n-offset))')])]), cE('rail', `
|
|
78
78
|
overflow: hidden;
|
|
79
79
|
height: var(--n-rail-height);
|
|
80
80
|
min-width: var(--n-rail-width);
|
|
@@ -103,7 +103,7 @@ export default cB('switch', `
|
|
|
103
103
|
align-items: center;
|
|
104
104
|
top: var(--n-offset);
|
|
105
105
|
left: var(--n-offset);
|
|
106
|
-
height: var(--n-button-
|
|
106
|
+
height: var(--n-button-height);
|
|
107
107
|
width: var(--n-button-width-pressed);
|
|
108
108
|
max-width: var(--n-button-width);
|
|
109
109
|
border-radius: var(--n-button-border-radius);
|
package/es/tag/src/Tag.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export declare const tagProps: {
|
|
|
14
14
|
checked: BooleanConstructor;
|
|
15
15
|
checkable: BooleanConstructor;
|
|
16
16
|
strong: BooleanConstructor;
|
|
17
|
+
triggerClickOnClose: BooleanConstructor;
|
|
17
18
|
onClose: PropType<MaybeArray<(e: MouseEvent) => void>>;
|
|
18
19
|
onMouseenter: PropType<(e: MouseEvent) => void>;
|
|
19
20
|
onMouseleave: PropType<(e: MouseEvent) => void>;
|
|
@@ -23,7 +24,6 @@ export declare const tagProps: {
|
|
|
23
24
|
type: BooleanConstructor;
|
|
24
25
|
default: boolean;
|
|
25
26
|
};
|
|
26
|
-
internalStopClickPropagation: BooleanConstructor;
|
|
27
27
|
onCheckedChange: {
|
|
28
28
|
type: PropType<(checked: boolean) => void>;
|
|
29
29
|
validator: () => boolean;
|
|
@@ -325,6 +325,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
325
325
|
checked: BooleanConstructor;
|
|
326
326
|
checkable: BooleanConstructor;
|
|
327
327
|
strong: BooleanConstructor;
|
|
328
|
+
triggerClickOnClose: BooleanConstructor;
|
|
328
329
|
onClose: PropType<MaybeArray<(e: MouseEvent) => void>>;
|
|
329
330
|
onMouseenter: PropType<(e: MouseEvent) => void>;
|
|
330
331
|
onMouseleave: PropType<(e: MouseEvent) => void>;
|
|
@@ -334,7 +335,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
334
335
|
type: BooleanConstructor;
|
|
335
336
|
default: boolean;
|
|
336
337
|
};
|
|
337
|
-
internalStopClickPropagation: BooleanConstructor;
|
|
338
338
|
onCheckedChange: {
|
|
339
339
|
type: PropType<(checked: boolean) => void>;
|
|
340
340
|
validator: () => boolean;
|
|
@@ -674,6 +674,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
674
674
|
checked: BooleanConstructor;
|
|
675
675
|
checkable: BooleanConstructor;
|
|
676
676
|
strong: BooleanConstructor;
|
|
677
|
+
triggerClickOnClose: BooleanConstructor;
|
|
677
678
|
onClose: PropType<MaybeArray<(e: MouseEvent) => void>>;
|
|
678
679
|
onMouseenter: PropType<(e: MouseEvent) => void>;
|
|
679
680
|
onMouseleave: PropType<(e: MouseEvent) => void>;
|
|
@@ -683,7 +684,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
683
684
|
type: BooleanConstructor;
|
|
684
685
|
default: boolean;
|
|
685
686
|
};
|
|
686
|
-
internalStopClickPropagation: BooleanConstructor;
|
|
687
687
|
onCheckedChange: {
|
|
688
688
|
type: PropType<(checked: boolean) => void>;
|
|
689
689
|
validator: () => boolean;
|
|
@@ -981,8 +981,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
981
981
|
bordered: boolean | undefined;
|
|
982
982
|
closable: boolean;
|
|
983
983
|
checkable: boolean;
|
|
984
|
+
triggerClickOnClose: boolean;
|
|
984
985
|
internalCloseFocusable: boolean;
|
|
985
|
-
internalStopClickPropagation: boolean;
|
|
986
986
|
onCheckedChange: (checked: boolean) => void;
|
|
987
987
|
}>;
|
|
988
988
|
export default _default;
|
package/es/tag/src/Tag.js
CHANGED
|
@@ -9,12 +9,12 @@ import style from './styles/index.cssr';
|
|
|
9
9
|
export const tagProps = Object.assign(Object.assign(Object.assign({}, useTheme.props), commonProps), { bordered: {
|
|
10
10
|
type: Boolean,
|
|
11
11
|
default: undefined
|
|
12
|
-
}, checked: Boolean, checkable: Boolean, strong: Boolean, onClose: [Array, Function], onMouseenter: Function, onMouseleave: Function, 'onUpdate:checked': Function, onUpdateChecked: Function,
|
|
12
|
+
}, checked: Boolean, checkable: Boolean, strong: Boolean, triggerClickOnClose: Boolean, onClose: [Array, Function], onMouseenter: Function, onMouseleave: Function, 'onUpdate:checked': Function, onUpdateChecked: Function,
|
|
13
13
|
// private
|
|
14
14
|
internalCloseFocusable: {
|
|
15
15
|
type: Boolean,
|
|
16
16
|
default: true
|
|
17
|
-
},
|
|
17
|
+
},
|
|
18
18
|
// deprecated
|
|
19
19
|
onCheckedChange: {
|
|
20
20
|
type: Function,
|
|
@@ -52,7 +52,7 @@ export default defineComponent({
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
function handleCloseClick(e) {
|
|
55
|
-
if (props.
|
|
55
|
+
if (!props.triggerClickOnClose) {
|
|
56
56
|
e.stopPropagation();
|
|
57
57
|
}
|
|
58
58
|
if (!props.disabled) {
|
package/es/tag/styles/light.js
CHANGED
|
@@ -8,7 +8,10 @@ const self = (vars) => {
|
|
|
8
8
|
// checked
|
|
9
9
|
textColorCheckable: textColor2, textColorHoverCheckable: textColor2, textColorPressedCheckable: textColor2, textColorChecked: baseColor, colorCheckable: '#0000', colorHoverCheckable: buttonColor2Hover, colorPressedCheckable: buttonColor2Pressed, colorChecked: primaryColor, colorCheckedHover: primaryColorHover, colorCheckedPressed: primaryColorPressed,
|
|
10
10
|
// default
|
|
11
|
-
border: `1px solid ${borderColor}`, textColor: textColor2, color: tagColor, colorBordered: 'rgb(250, 250, 252)', closeIconColor
|
|
11
|
+
border: `1px solid ${borderColor}`, textColor: textColor2, color: tagColor, colorBordered: 'rgb(250, 250, 252)', closeIconColor,
|
|
12
|
+
closeIconColorHover,
|
|
13
|
+
closeIconColorPressed,
|
|
14
|
+
closeColorHover,
|
|
12
15
|
closeColorPressed, borderPrimary: `1px solid ${changeColor(primaryColor, { alpha: 0.3 })}`, textColorPrimary: primaryColor, colorPrimary: changeColor(primaryColor, { alpha: 0.12 }), colorBorderedPrimary: changeColor(primaryColor, { alpha: 0.1 }), closeIconColorPrimary: primaryColor, closeIconColorHoverPrimary: primaryColor, closeIconColorPressedPrimary: primaryColor, closeColorHoverPrimary: changeColor(primaryColor, { alpha: 0.12 }), closeColorPressedPrimary: changeColor(primaryColor, { alpha: 0.18 }), borderInfo: `1px solid ${changeColor(infoColor, { alpha: 0.3 })}`, textColorInfo: infoColor, colorInfo: changeColor(infoColor, { alpha: 0.12 }), colorBorderedInfo: changeColor(infoColor, { alpha: 0.1 }), closeIconColorInfo: infoColor, closeIconColorHoverInfo: infoColor, closeIconColorPressedInfo: infoColor, closeColorHoverInfo: changeColor(infoColor, { alpha: 0.12 }), closeColorPressedInfo: changeColor(infoColor, { alpha: 0.18 }), borderSuccess: `1px solid ${changeColor(successColor, { alpha: 0.3 })}`, textColorSuccess: successColor, colorSuccess: changeColor(successColor, { alpha: 0.12 }), colorBorderedSuccess: changeColor(successColor, { alpha: 0.1 }), closeIconColorSuccess: successColor, closeIconColorHoverSuccess: successColor, closeIconColorPressedSuccess: successColor, closeColorHoverSuccess: changeColor(successColor, { alpha: 0.12 }), closeColorPressedSuccess: changeColor(successColor, { alpha: 0.18 }), borderWarning: `1px solid ${changeColor(warningColor, { alpha: 0.35 })}`, textColorWarning: warningColor, colorWarning: changeColor(warningColor, { alpha: 0.15 }), colorBorderedWarning: changeColor(warningColor, { alpha: 0.12 }), closeIconColorWarning: warningColor, closeIconColorHoverWarning: warningColor, closeIconColorPressedWarning: warningColor, closeColorHoverWarning: changeColor(warningColor, { alpha: 0.12 }), closeColorPressedWarning: changeColor(warningColor, { alpha: 0.18 }), borderError: `1px solid ${changeColor(errorColor, { alpha: 0.23 })}`, textColorError: errorColor, colorError: changeColor(errorColor, { alpha: 0.1 }), colorBorderedError: changeColor(errorColor, { alpha: 0.08 }), closeIconColorError: errorColor, closeIconColorHoverError: errorColor, closeIconColorPressedError: errorColor, closeColorHoverError: changeColor(errorColor, { alpha: 0.12 }), closeColorPressedError: changeColor(errorColor, { alpha: 0.18 }) });
|
|
13
16
|
};
|
|
14
17
|
const tagLight = {
|