naive-ui 2.35.0 → 2.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/README.zh-CN.md +1 -0
- package/dist/index.js +2433 -667
- package/dist/index.prod.js +2 -2
- package/es/_internal/fade-in-expand-transition/src/FadeInExpandTransition.js +1 -0
- package/es/_internal/scrollbar/src/Scrollbar.js +11 -6
- package/es/_internal/select-menu/src/SelectMenu.d.ts +3 -3
- package/es/_internal/select-menu/src/SelectMenu.js +1 -0
- package/es/_internal/select-menu/src/styles/index.cssr.js +8 -0
- package/es/_internal/selection/src/Selection.d.ts +3 -1
- package/es/_internal/selection/src/Selection.js +4 -2
- package/es/_styles/common/_common.js +1 -1
- package/es/_styles/common/light.js +2 -2
- package/es/_utils/composable/use-collection.d.ts +1 -1
- package/es/_utils/composable/use-collection.js +2 -0
- package/es/_utils/css/color-to-class.js +1 -1
- package/es/affix/src/Affix.d.ts +2 -2
- package/es/affix/src/Affix.js +4 -2
- package/es/alert/src/Alert.js +3 -1
- package/es/anchor/src/AnchorAdapter.d.ts +1 -1
- package/es/auto-complete/src/AutoComplete.d.ts +1 -1
- package/es/button/src/Button.d.ts +1 -1
- package/es/button/src/Button.js +1 -1
- package/es/card/src/Card.d.ts +17 -1
- package/es/card/src/Card.js +12 -5
- package/es/carousel/src/Carousel.d.ts +5 -5
- package/es/carousel/src/Carousel.js +2 -1
- package/es/checkbox/src/Checkbox.d.ts +6 -6
- package/es/color-picker/src/ColorPickerSwatches.js +4 -3
- package/es/components.d.ts +3 -0
- package/es/components.js +3 -0
- package/es/config-provider/src/config.js +5 -5
- package/es/config-provider/src/internal-interface.d.ts +4 -0
- package/es/data-table/src/DataTable.d.ts +3 -3
- package/es/data-table/src/DataTable.js +1 -0
- package/es/data-table/src/MainTable.js +1 -0
- package/es/data-table/src/TableParts/Body.d.ts +3 -3
- package/es/data-table/src/TableParts/Body.js +5 -3
- package/es/data-table/src/interface.d.ts +1 -1
- package/es/date-picker/src/panel/date.d.ts +2 -2
- package/es/date-picker/src/panel/daterange.d.ts +2 -2
- package/es/date-picker/src/panel/datetime.d.ts +2 -2
- package/es/date-picker/src/panel/datetimerange.d.ts +2 -2
- package/es/date-picker/src/panel/month.d.ts +2 -2
- package/es/date-picker/src/panel/monthrange.d.ts +2 -2
- package/es/date-picker/src/panel/panelHeader.d.ts +720 -773
- package/es/date-picker/src/panel/use-calendar.d.ts +2 -2
- package/es/date-picker/src/panel/use-calendar.js +2 -2
- package/es/date-picker/src/panel/use-dual-calendar.d.ts +2 -2
- package/es/date-picker/src/panel/use-dual-calendar.js +4 -4
- package/es/date-picker/src/utils.js +1 -6
- package/es/date-picker/styles/_common.js +1 -1
- package/es/descriptions/src/Descriptions.d.ts +6 -0
- package/es/descriptions/src/Descriptions.js +22 -7
- package/es/descriptions/src/DescriptionsItem.d.ts +6 -0
- package/es/descriptions/src/DescriptionsItem.js +2 -0
- package/es/dialog/src/Dialog.js +6 -2
- package/es/dialog/src/DialogEnvironment.d.ts +1 -1
- package/es/dialog/src/DialogProvider.d.ts +3 -3
- package/es/dialog/src/dialogProps.d.ts +1 -1
- package/es/dropdown/src/Dropdown.d.ts +18 -0
- package/es/dropdown/src/Dropdown.js +1 -1
- package/es/dropdown/src/DropdownMenu.js +4 -1
- package/es/dropdown/src/DropdownOption.d.ts +5 -4
- package/es/dropdown/src/DropdownOption.js +2 -4
- package/es/dynamic-input/src/DynamicInput.d.ts +3 -0
- package/es/dynamic-input/src/DynamicInput.js +3 -3
- package/es/dynamic-tags/src/DynamicTags.d.ts +6 -0
- package/es/dynamic-tags/src/DynamicTags.js +4 -4
- package/es/equation/index.d.ts +1 -0
- package/es/equation/src/Equation.d.ts +2 -0
- package/es/form/src/FormItem.d.ts +1 -1
- package/es/form/src/utils.d.ts +1 -1
- package/es/input/src/Input.d.ts +4 -4
- package/es/input/src/styles/input.cssr.js +1 -1
- package/es/layout/src/Layout.d.ts +6 -0
- package/es/layout/src/Layout.js +8 -1
- package/es/layout/src/LayoutContent.d.ts +2 -0
- package/es/layout/src/LayoutSider.d.ts +9 -0
- package/es/layout/src/LayoutSider.js +12 -3
- package/es/legacy-grid/src/styles/index.cssr.js +2 -3
- package/es/legacy-grid/src/styles/rtl.cssr.js +2 -3
- package/es/loading-bar/src/LoadingBar.d.ts +2 -0
- package/es/loading-bar/src/LoadingBar.js +3 -1
- package/es/loading-bar/src/LoadingBarProvider.d.ts +3 -0
- package/es/loading-bar/src/LoadingBarProvider.js +2 -2
- package/es/locales/common/frFR.js +1 -1
- package/es/log/src/Log.d.ts +3 -3
- package/es/mention/src/Mention.d.ts +1 -1
- package/es/mention/src/utils.js +4 -4
- package/es/menu/src/Menu.d.ts +30 -13
- package/es/menu/src/Menu.js +101 -7
- package/es/menu/src/MenuOptionContent.d.ts +3 -0
- package/es/menu/src/MenuOptionContent.js +7 -2
- package/es/menu/src/Submenu.d.ts +23 -12
- package/es/menu/src/Submenu.js +9 -8
- package/es/menu/src/interface.d.ts +1 -0
- package/es/menu/src/styles/index.cssr.js +8 -4
- package/es/menu/src/use-menu-child.js +5 -5
- package/es/message/src/Message.d.ts +1 -1
- package/es/message/src/MessageProvider.d.ts +7 -4
- package/es/message/src/MessageProvider.js +3 -2
- package/es/modal/src/BodyWrapper.d.ts +12 -4
- package/es/modal/src/Modal.d.ts +16 -4
- package/es/modal/src/presetProps.d.ts +5 -1
- package/es/notification/src/NotificationEnvironment.js +1 -1
- package/es/notification/src/NotificationProvider.d.ts +3 -0
- package/es/notification/src/NotificationProvider.js +2 -2
- package/es/popconfirm/src/Popconfirm.d.ts +18 -0
- package/es/popover/src/Popover.d.ts +24 -0
- package/es/popover/src/Popover.js +7 -0
- package/es/popover/src/PopoverBody.d.ts +22 -1
- package/es/popover/src/PopoverBody.js +26 -10
- package/es/popover/src/interface.d.ts +1 -1
- package/es/popselect/src/Popselect.d.ts +18 -0
- package/es/popselect/src/Popselect.js +2 -1
- package/es/popselect/src/PopselectPanel.js +1 -0
- package/es/progress/src/Progress.d.ts +1 -1
- package/es/qr-code/index.d.ts +2 -0
- package/es/qr-code/index.js +1 -0
- package/es/qr-code/src/QrCode.d.ts +154 -0
- package/es/qr-code/src/QrCode.js +146 -0
- package/es/qr-code/src/qrcodegen.d.ts +94 -0
- package/es/qr-code/src/qrcodegen.js +948 -0
- package/es/qr-code/src/styles/index.cssr.d.ts +2 -0
- package/es/qr-code/src/styles/index.cssr.js +8 -0
- package/es/qr-code/styles/dark.d.ts +3 -0
- package/es/qr-code/styles/dark.js +11 -0
- package/es/qr-code/styles/index.d.ts +3 -0
- package/es/qr-code/styles/index.js +2 -0
- package/es/qr-code/styles/light.d.ts +9 -0
- package/es/qr-code/styles/light.js +12 -0
- package/es/radio/src/RadioGroup.d.ts +1 -0
- package/es/radio/src/RadioGroup.js +2 -1
- package/es/radio/src/styles/radio-group.cssr.js +1 -0
- package/es/result/src/Result.d.ts +1 -1
- package/es/scrollbar/src/Scrollbar.js +2 -0
- package/es/select/src/Select.d.ts +1 -1
- package/es/skeleton/src/Skeleton.js +4 -7
- package/es/slider/src/Slider.d.ts +6 -0
- package/es/slider/src/Slider.js +10 -3
- package/es/slider/src/utils.d.ts +2 -2
- package/es/slider/src/utils.js +4 -4
- package/es/space/src/Space.d.ts +3 -0
- package/es/space/src/Space.js +3 -3
- package/es/spin/src/Spin.d.ts +7 -1
- package/es/spin/src/Spin.js +4 -3
- package/es/split/index.d.ts +2 -0
- package/es/split/index.js +1 -0
- package/es/split/src/Split.d.ts +135 -0
- package/es/split/src/Split.js +145 -0
- package/es/split/src/styles/index.cssr.d.ts +2 -0
- package/es/split/src/styles/index.cssr.js +25 -0
- package/es/split/styles/dark.d.ts +3 -0
- package/es/split/styles/dark.js +6 -0
- package/es/split/styles/index.d.ts +3 -0
- package/es/split/styles/index.js +2 -0
- package/es/split/styles/light.d.ts +9 -0
- package/es/split/styles/light.js +13 -0
- package/es/steps/src/Steps.d.ts +1 -1
- package/es/tabs/src/Tab.js +3 -1
- package/es/tabs/src/Tabs.d.ts +6 -6
- package/es/tabs/src/Tabs.js +2 -2
- package/es/tabs/src/styles/index.cssr.js +12 -2
- package/es/theme-editor/src/ThemeEditor.d.ts +2 -2
- package/es/themes/dark.js +5 -1
- package/es/themes/light.js +5 -1
- package/es/thing/src/Thing.d.ts +6 -0
- package/es/thing/src/Thing.js +13 -4
- package/es/tooltip/src/Tooltip.d.ts +18 -0
- package/es/tree/index.d.ts +1 -0
- package/es/tree/index.js +1 -0
- package/es/tree/src/Tree.d.ts +11 -0
- package/es/tree/src/Tree.js +6 -3
- package/es/tree/src/TreeNode.js +30 -19
- package/es/tree/src/TreeNodeCheckbox.d.ts +1 -0
- package/es/tree/src/TreeNodeSwitcher.d.ts +1 -1
- package/es/tree/src/styles/index.cssr.js +4 -3
- package/es/tree/src/utils.d.ts +1 -0
- package/es/tree/src/utils.js +12 -0
- package/es/tree/styles/light.d.ts +2 -0
- package/es/tree/styles/light.js +3 -2
- package/es/tree-select/src/TreeSelect.d.ts +17 -10
- package/es/tree-select/src/TreeSelect.js +2 -2
- package/es/tree-select/styles/light.d.ts +1 -0
- package/es/upload/src/Upload.d.ts +6 -0
- package/es/upload/src/Upload.js +8 -3
- package/es/upload/src/UploadFileList.js +3 -2
- package/es/upload/src/UploadTrigger.js +3 -2
- package/es/upload/src/interface.d.ts +2 -0
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/es/virtual-list/index.d.ts +2 -0
- package/es/virtual-list/index.js +1 -0
- package/es/virtual-list/src/VirtualList.d.ts +146 -0
- package/es/virtual-list/src/VirtualList.js +102 -0
- package/es/watermark/src/Watermark.js +7 -0
- package/lib/_internal/fade-in-expand-transition/src/FadeInExpandTransition.js +1 -0
- package/lib/_internal/scrollbar/src/Scrollbar.js +11 -6
- package/lib/_internal/select-menu/src/SelectMenu.d.ts +3 -3
- package/lib/_internal/select-menu/src/SelectMenu.js +1 -0
- package/lib/_internal/select-menu/src/styles/index.cssr.js +8 -0
- package/lib/_internal/selection/src/Selection.d.ts +3 -1
- package/lib/_internal/selection/src/Selection.js +4 -2
- package/lib/_styles/common/_common.js +1 -1
- package/lib/_styles/common/light.js +2 -2
- package/lib/_utils/composable/use-collection.d.ts +1 -1
- package/lib/_utils/composable/use-collection.js +2 -0
- package/lib/_utils/css/color-to-class.js +1 -1
- package/lib/affix/src/Affix.d.ts +2 -2
- package/lib/affix/src/Affix.js +4 -2
- package/lib/alert/src/Alert.js +3 -1
- package/lib/anchor/src/AnchorAdapter.d.ts +1 -1
- package/lib/auto-complete/src/AutoComplete.d.ts +1 -1
- package/lib/button/src/Button.d.ts +1 -1
- package/lib/button/src/Button.js +1 -1
- package/lib/card/src/Card.d.ts +17 -1
- package/lib/card/src/Card.js +12 -5
- package/lib/carousel/src/Carousel.d.ts +5 -5
- package/lib/carousel/src/Carousel.js +2 -1
- package/lib/checkbox/src/Checkbox.d.ts +6 -6
- package/lib/color-picker/src/ColorPickerSwatches.js +4 -3
- package/lib/components.d.ts +3 -0
- package/lib/components.js +3 -0
- package/lib/config-provider/src/config.js +5 -5
- package/lib/config-provider/src/internal-interface.d.ts +4 -0
- package/lib/data-table/src/DataTable.d.ts +3 -3
- package/lib/data-table/src/DataTable.js +1 -0
- package/lib/data-table/src/MainTable.js +1 -0
- package/lib/data-table/src/TableParts/Body.d.ts +3 -3
- package/lib/data-table/src/TableParts/Body.js +5 -3
- package/lib/data-table/src/interface.d.ts +1 -1
- package/lib/date-picker/src/panel/date.d.ts +2 -2
- package/lib/date-picker/src/panel/daterange.d.ts +2 -2
- package/lib/date-picker/src/panel/datetime.d.ts +2 -2
- package/lib/date-picker/src/panel/datetimerange.d.ts +2 -2
- package/lib/date-picker/src/panel/month.d.ts +2 -2
- package/lib/date-picker/src/panel/monthrange.d.ts +2 -2
- package/lib/date-picker/src/panel/panelHeader.d.ts +720 -773
- package/lib/date-picker/src/panel/use-calendar.d.ts +2 -2
- package/lib/date-picker/src/panel/use-calendar.js +2 -2
- package/lib/date-picker/src/panel/use-dual-calendar.d.ts +2 -2
- package/lib/date-picker/src/panel/use-dual-calendar.js +4 -4
- package/lib/date-picker/src/utils.js +1 -6
- package/lib/date-picker/styles/_common.js +1 -1
- package/lib/descriptions/src/Descriptions.d.ts +6 -0
- package/lib/descriptions/src/Descriptions.js +22 -7
- package/lib/descriptions/src/DescriptionsItem.d.ts +6 -0
- package/lib/descriptions/src/DescriptionsItem.js +2 -0
- package/lib/dialog/src/Dialog.js +6 -2
- package/lib/dialog/src/DialogEnvironment.d.ts +1 -1
- package/lib/dialog/src/DialogProvider.d.ts +3 -3
- package/lib/dialog/src/dialogProps.d.ts +1 -1
- package/lib/dropdown/src/Dropdown.d.ts +18 -0
- package/lib/dropdown/src/Dropdown.js +1 -1
- package/lib/dropdown/src/DropdownMenu.js +4 -1
- package/lib/dropdown/src/DropdownOption.d.ts +5 -4
- package/lib/dropdown/src/DropdownOption.js +2 -4
- package/lib/dynamic-input/src/DynamicInput.d.ts +3 -0
- package/lib/dynamic-input/src/DynamicInput.js +3 -3
- package/lib/dynamic-tags/src/DynamicTags.d.ts +6 -0
- package/lib/dynamic-tags/src/DynamicTags.js +4 -4
- package/lib/equation/index.d.ts +1 -0
- package/lib/equation/src/Equation.d.ts +2 -0
- package/lib/form/src/FormItem.d.ts +1 -1
- package/lib/form/src/utils.d.ts +1 -1
- package/lib/input/src/Input.d.ts +4 -4
- package/lib/input/src/styles/input.cssr.js +1 -1
- package/lib/layout/src/Layout.d.ts +6 -0
- package/lib/layout/src/Layout.js +8 -1
- package/lib/layout/src/LayoutContent.d.ts +2 -0
- package/lib/layout/src/LayoutSider.d.ts +9 -0
- package/lib/layout/src/LayoutSider.js +12 -3
- package/lib/legacy-grid/src/styles/index.cssr.js +2 -3
- package/lib/legacy-grid/src/styles/rtl.cssr.js +2 -3
- package/lib/loading-bar/src/LoadingBar.d.ts +2 -0
- package/lib/loading-bar/src/LoadingBar.js +3 -1
- package/lib/loading-bar/src/LoadingBarProvider.d.ts +3 -0
- package/lib/loading-bar/src/LoadingBarProvider.js +2 -2
- package/lib/locales/common/frFR.js +1 -1
- package/lib/log/src/Log.d.ts +3 -3
- package/lib/mention/src/Mention.d.ts +1 -1
- package/lib/mention/src/utils.js +4 -4
- package/lib/menu/src/Menu.d.ts +30 -13
- package/lib/menu/src/Menu.js +101 -7
- package/lib/menu/src/MenuOptionContent.d.ts +3 -0
- package/lib/menu/src/MenuOptionContent.js +7 -2
- package/lib/menu/src/Submenu.d.ts +23 -12
- package/lib/menu/src/Submenu.js +9 -8
- package/lib/menu/src/interface.d.ts +1 -0
- package/lib/menu/src/styles/index.cssr.js +8 -4
- package/lib/menu/src/use-menu-child.js +5 -5
- package/lib/message/src/Message.d.ts +1 -1
- package/lib/message/src/MessageProvider.d.ts +7 -4
- package/lib/message/src/MessageProvider.js +3 -2
- package/lib/modal/src/BodyWrapper.d.ts +12 -4
- package/lib/modal/src/Modal.d.ts +16 -4
- package/lib/modal/src/presetProps.d.ts +5 -1
- package/lib/notification/src/NotificationEnvironment.js +1 -1
- package/lib/notification/src/NotificationProvider.d.ts +3 -0
- package/lib/notification/src/NotificationProvider.js +2 -2
- package/lib/popconfirm/src/Popconfirm.d.ts +18 -0
- package/lib/popover/src/Popover.d.ts +24 -0
- package/lib/popover/src/Popover.js +7 -0
- package/lib/popover/src/PopoverBody.d.ts +22 -1
- package/lib/popover/src/PopoverBody.js +26 -10
- package/lib/popover/src/interface.d.ts +1 -1
- package/lib/popselect/src/Popselect.d.ts +18 -0
- package/lib/popselect/src/Popselect.js +2 -1
- package/lib/popselect/src/PopselectPanel.js +1 -0
- package/lib/progress/src/Progress.d.ts +1 -1
- package/lib/qr-code/index.d.ts +2 -0
- package/lib/qr-code/index.js +9 -0
- package/lib/qr-code/src/QrCode.d.ts +154 -0
- package/lib/qr-code/src/QrCode.js +152 -0
- package/lib/qr-code/src/qrcodegen.d.ts +94 -0
- package/lib/qr-code/src/qrcodegen.js +949 -0
- package/lib/qr-code/src/styles/index.cssr.d.ts +2 -0
- package/lib/qr-code/src/styles/index.cssr.js +13 -0
- package/lib/qr-code/styles/dark.d.ts +3 -0
- package/lib/qr-code/styles/dark.js +13 -0
- package/lib/qr-code/styles/index.d.ts +3 -0
- package/lib/qr-code/styles/index.js +10 -0
- package/lib/qr-code/styles/light.d.ts +9 -0
- package/lib/qr-code/styles/light.js +14 -0
- package/lib/radio/src/RadioGroup.d.ts +1 -0
- package/lib/radio/src/RadioGroup.js +2 -1
- package/lib/radio/src/styles/radio-group.cssr.js +1 -0
- package/lib/result/src/Result.d.ts +1 -1
- package/lib/scrollbar/src/Scrollbar.js +2 -0
- package/lib/select/src/Select.d.ts +1 -1
- package/lib/skeleton/src/Skeleton.js +3 -6
- package/lib/slider/src/Slider.d.ts +6 -0
- package/lib/slider/src/Slider.js +10 -3
- package/lib/slider/src/utils.d.ts +2 -2
- package/lib/slider/src/utils.js +3 -3
- package/lib/space/src/Space.d.ts +3 -0
- package/lib/space/src/Space.js +3 -3
- package/lib/spin/src/Spin.d.ts +7 -1
- package/lib/spin/src/Spin.js +4 -3
- package/lib/split/index.d.ts +2 -0
- package/lib/split/index.js +9 -0
- package/lib/split/src/Split.d.ts +135 -0
- package/lib/split/src/Split.js +151 -0
- package/lib/split/src/styles/index.cssr.d.ts +2 -0
- package/lib/split/src/styles/index.cssr.js +30 -0
- package/lib/split/styles/dark.d.ts +3 -0
- package/lib/split/styles/dark.js +8 -0
- package/lib/split/styles/index.d.ts +3 -0
- package/lib/split/styles/index.js +10 -0
- package/lib/split/styles/light.d.ts +9 -0
- package/lib/split/styles/light.js +17 -0
- package/lib/steps/src/Steps.d.ts +1 -1
- package/lib/tabs/src/Tab.js +3 -1
- package/lib/tabs/src/Tabs.d.ts +6 -6
- package/lib/tabs/src/Tabs.js +2 -2
- package/lib/tabs/src/styles/index.cssr.js +12 -2
- package/lib/theme-editor/src/ThemeEditor.d.ts +2 -2
- package/lib/themes/dark.js +56 -52
- package/lib/themes/light.js +56 -52
- package/lib/thing/src/Thing.d.ts +6 -0
- package/lib/thing/src/Thing.js +13 -4
- package/lib/tooltip/src/Tooltip.d.ts +18 -0
- package/lib/tree/index.d.ts +1 -0
- package/lib/tree/index.js +3 -1
- package/lib/tree/src/Tree.d.ts +11 -0
- package/lib/tree/src/Tree.js +6 -3
- package/lib/tree/src/TreeNode.js +30 -19
- package/lib/tree/src/TreeNodeCheckbox.d.ts +1 -0
- package/lib/tree/src/TreeNodeSwitcher.d.ts +1 -1
- package/lib/tree/src/styles/index.cssr.js +4 -3
- package/lib/tree/src/utils.d.ts +1 -0
- package/lib/tree/src/utils.js +14 -1
- package/lib/tree/styles/light.d.ts +2 -0
- package/lib/tree/styles/light.js +3 -2
- package/lib/tree-select/src/TreeSelect.d.ts +17 -10
- package/lib/tree-select/src/TreeSelect.js +2 -2
- package/lib/tree-select/styles/light.d.ts +1 -0
- package/lib/upload/src/Upload.d.ts +6 -0
- package/lib/upload/src/Upload.js +8 -3
- package/lib/upload/src/UploadFileList.js +3 -2
- package/lib/upload/src/UploadTrigger.js +3 -2
- package/lib/upload/src/interface.d.ts +2 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/virtual-list/index.d.ts +2 -0
- package/lib/virtual-list/index.js +9 -0
- package/lib/virtual-list/src/VirtualList.d.ts +146 -0
- package/lib/virtual-list/src/VirtualList.js +105 -0
- package/lib/watermark/src/Watermark.js +7 -0
- package/package.json +15 -15
- package/volar.d.ts +4 -0
- package/web-types.json +773 -18
package/lib/themes/light.js
CHANGED
|
@@ -59,32 +59,34 @@ const styles_52 = require("../popconfirm/styles");
|
|
|
59
59
|
const styles_53 = require("../popover/styles");
|
|
60
60
|
const styles_54 = require("../popselect/styles");
|
|
61
61
|
const styles_55 = require("../progress/styles");
|
|
62
|
-
const styles_56 = require("../
|
|
63
|
-
const styles_57 = require("../
|
|
64
|
-
const styles_58 = require("../
|
|
65
|
-
const styles_59 = require("../
|
|
66
|
-
const styles_60 = require("../
|
|
67
|
-
const styles_61 = require("../
|
|
68
|
-
const styles_62 = require("../
|
|
69
|
-
const styles_63 = require("../
|
|
70
|
-
const styles_64 = require("../
|
|
71
|
-
const styles_65 = require("../
|
|
72
|
-
const styles_66 = require("../
|
|
73
|
-
const styles_67 = require("../
|
|
74
|
-
const styles_68 = require("../
|
|
75
|
-
const styles_69 = require("../
|
|
76
|
-
const styles_70 = require("../
|
|
77
|
-
const styles_71 = require("../
|
|
78
|
-
const styles_72 = require("../
|
|
79
|
-
const styles_73 = require("../
|
|
80
|
-
const styles_74 = require("../
|
|
81
|
-
const styles_75 = require("../
|
|
82
|
-
const styles_76 = require("../
|
|
83
|
-
const styles_77 = require("../
|
|
84
|
-
const styles_78 = require("../
|
|
85
|
-
const styles_79 = require("../tree
|
|
86
|
-
const styles_80 = require("../
|
|
87
|
-
const styles_81 = require("../
|
|
62
|
+
const styles_56 = require("../qr-code/styles");
|
|
63
|
+
const styles_57 = require("../radio/styles");
|
|
64
|
+
const styles_58 = require("../rate/styles");
|
|
65
|
+
const styles_59 = require("../result/styles");
|
|
66
|
+
const styles_60 = require("../legacy-grid/styles");
|
|
67
|
+
const styles_61 = require("../_internal/scrollbar/styles");
|
|
68
|
+
const styles_62 = require("../select/styles");
|
|
69
|
+
const styles_63 = require("../skeleton/styles");
|
|
70
|
+
const styles_64 = require("../slider/styles");
|
|
71
|
+
const styles_65 = require("../space/styles");
|
|
72
|
+
const styles_66 = require("../spin/styles");
|
|
73
|
+
const styles_67 = require("../statistic/styles");
|
|
74
|
+
const styles_68 = require("../steps/styles");
|
|
75
|
+
const styles_69 = require("../switch/styles");
|
|
76
|
+
const styles_70 = require("../table/styles");
|
|
77
|
+
const styles_71 = require("../tabs/styles");
|
|
78
|
+
const styles_72 = require("../tag/styles");
|
|
79
|
+
const styles_73 = require("../thing/styles");
|
|
80
|
+
const styles_74 = require("../time-picker/styles");
|
|
81
|
+
const styles_75 = require("../timeline/styles");
|
|
82
|
+
const styles_76 = require("../tooltip/styles");
|
|
83
|
+
const styles_77 = require("../transfer/styles");
|
|
84
|
+
const styles_78 = require("../typography/styles");
|
|
85
|
+
const styles_79 = require("../tree/styles");
|
|
86
|
+
const styles_80 = require("../tree-select/styles");
|
|
87
|
+
const styles_81 = require("../upload/styles");
|
|
88
|
+
const styles_82 = require("../watermark/styles");
|
|
89
|
+
const styles_83 = require("../split/styles");
|
|
88
90
|
exports.lightTheme = {
|
|
89
91
|
name: 'light',
|
|
90
92
|
common: common_1.commonLight,
|
|
@@ -143,30 +145,32 @@ exports.lightTheme = {
|
|
|
143
145
|
Popover: styles_53.popoverLight,
|
|
144
146
|
Popselect: styles_54.popselectLight,
|
|
145
147
|
Progress: styles_55.progressLight,
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
148
|
+
QrCode: styles_56.qrcodeLight,
|
|
149
|
+
Radio: styles_57.radioLight,
|
|
150
|
+
Rate: styles_58.rateLight,
|
|
151
|
+
Row: styles_60.rowLight,
|
|
152
|
+
Result: styles_59.resultLight,
|
|
153
|
+
Scrollbar: styles_61.scrollbarLight,
|
|
154
|
+
Skeleton: styles_63.skeletonLight,
|
|
155
|
+
Select: styles_62.selectLight,
|
|
156
|
+
Slider: styles_64.sliderLight,
|
|
157
|
+
Space: styles_65.spaceLight,
|
|
158
|
+
Spin: styles_66.spinLight,
|
|
159
|
+
Statistic: styles_67.statisticLight,
|
|
160
|
+
Steps: styles_68.stepsLight,
|
|
161
|
+
Switch: styles_69.switchLight,
|
|
162
|
+
Table: styles_70.tableLight,
|
|
163
|
+
Tabs: styles_71.tabsLight,
|
|
164
|
+
Tag: styles_72.tagLight,
|
|
165
|
+
Thing: styles_73.thingLight,
|
|
166
|
+
TimePicker: styles_74.timePickerLight,
|
|
167
|
+
Timeline: styles_75.timelineLight,
|
|
168
|
+
Tooltip: styles_76.tooltipLight,
|
|
169
|
+
Transfer: styles_77.transferLight,
|
|
170
|
+
Tree: styles_79.treeLight,
|
|
171
|
+
TreeSelect: styles_80.treeSelectLight,
|
|
172
|
+
Typography: styles_78.typographyLight,
|
|
173
|
+
Upload: styles_81.uploadLight,
|
|
174
|
+
Watermark: styles_82.watermarkLight,
|
|
175
|
+
Split: styles_83.splitLight
|
|
172
176
|
};
|
package/lib/thing/src/Thing.d.ts
CHANGED
|
@@ -4,8 +4,10 @@ export declare const thingProps: {
|
|
|
4
4
|
title: StringConstructor;
|
|
5
5
|
titleExtra: StringConstructor;
|
|
6
6
|
description: StringConstructor;
|
|
7
|
+
descriptionClass: StringConstructor;
|
|
7
8
|
descriptionStyle: PropType<string | CSSProperties>;
|
|
8
9
|
content: StringConstructor;
|
|
10
|
+
contentClass: StringConstructor;
|
|
9
11
|
contentStyle: PropType<string | CSSProperties>;
|
|
10
12
|
contentIndented: BooleanConstructor;
|
|
11
13
|
theme: PropType<import("../../_mixins").Theme<"Thing", {
|
|
@@ -32,8 +34,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
32
34
|
title: StringConstructor;
|
|
33
35
|
titleExtra: StringConstructor;
|
|
34
36
|
description: StringConstructor;
|
|
37
|
+
descriptionClass: StringConstructor;
|
|
35
38
|
descriptionStyle: PropType<string | CSSProperties>;
|
|
36
39
|
content: StringConstructor;
|
|
40
|
+
contentClass: StringConstructor;
|
|
37
41
|
contentStyle: PropType<string | CSSProperties>;
|
|
38
42
|
contentIndented: BooleanConstructor;
|
|
39
43
|
theme: PropType<import("../../_mixins").Theme<"Thing", {
|
|
@@ -58,8 +62,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
58
62
|
title: StringConstructor;
|
|
59
63
|
titleExtra: StringConstructor;
|
|
60
64
|
description: StringConstructor;
|
|
65
|
+
descriptionClass: StringConstructor;
|
|
61
66
|
descriptionStyle: PropType<string | CSSProperties>;
|
|
62
67
|
content: StringConstructor;
|
|
68
|
+
contentClass: StringConstructor;
|
|
63
69
|
contentStyle: PropType<string | CSSProperties>;
|
|
64
70
|
contentIndented: BooleanConstructor;
|
|
65
71
|
theme: PropType<import("../../_mixins").Theme<"Thing", {
|
package/lib/thing/src/Thing.js
CHANGED
|
@@ -8,7 +8,7 @@ const vue_1 = require("vue");
|
|
|
8
8
|
const _mixins_1 = require("../../_mixins");
|
|
9
9
|
const styles_1 = require("../styles");
|
|
10
10
|
const index_cssr_1 = __importDefault(require("./styles/index.cssr"));
|
|
11
|
-
exports.thingProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props), { title: String, titleExtra: String, description: String, descriptionStyle: [String, Object], content: String, contentStyle: [String, Object], contentIndented: Boolean });
|
|
11
|
+
exports.thingProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props), { title: String, titleExtra: String, description: String, descriptionClass: String, descriptionStyle: [String, Object], content: String, contentClass: String, contentStyle: [String, Object], contentIndented: Boolean });
|
|
12
12
|
exports.default = (0, vue_1.defineComponent)({
|
|
13
13
|
name: 'Thing',
|
|
14
14
|
props: exports.thingProps,
|
|
@@ -59,7 +59,10 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
59
59
|
slots['header-extra'] || props.titleExtra ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-thing-header__extra` }, slots['header-extra']
|
|
60
60
|
? slots['header-extra']()
|
|
61
61
|
: props.titleExtra)) : null),
|
|
62
|
-
slots.description || props.description ? ((0, vue_1.h)("div", { class:
|
|
62
|
+
slots.description || props.description ? ((0, vue_1.h)("div", { class: [
|
|
63
|
+
`${mergedClsPrefix}-thing-main__description`,
|
|
64
|
+
props.descriptionClass
|
|
65
|
+
], style: props.descriptionStyle }, slots.description
|
|
63
66
|
? slots.description()
|
|
64
67
|
: props.description)) : null)) : null)) : ((0, vue_1.h)(vue_1.Fragment, null,
|
|
65
68
|
slots.header ||
|
|
@@ -70,10 +73,16 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
70
73
|
slots['header-extra'] || props.titleExtra ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-thing-header__extra` }, slots['header-extra']
|
|
71
74
|
? slots['header-extra']()
|
|
72
75
|
: props.titleExtra)) : null)) : null,
|
|
73
|
-
slots.description || props.description ? ((0, vue_1.h)("div", { class:
|
|
76
|
+
slots.description || props.description ? ((0, vue_1.h)("div", { class: [
|
|
77
|
+
`${mergedClsPrefix}-thing-main__description`,
|
|
78
|
+
props.descriptionClass
|
|
79
|
+
], style: props.descriptionStyle }, slots.description
|
|
74
80
|
? slots.description()
|
|
75
81
|
: props.description)) : null)),
|
|
76
|
-
slots.default || props.content ? ((0, vue_1.h)("div", { class:
|
|
82
|
+
slots.default || props.content ? ((0, vue_1.h)("div", { class: [
|
|
83
|
+
`${mergedClsPrefix}-thing-main__content`,
|
|
84
|
+
props.contentClass
|
|
85
|
+
], style: props.contentStyle }, slots.default ? slots.default() : props.content)) : null,
|
|
77
86
|
slots.footer ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-thing-main__footer` }, slots.footer())) : null,
|
|
78
87
|
slots.action ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-thing-main__action` }, slots.action())) : null)));
|
|
79
88
|
};
|
|
@@ -103,7 +103,10 @@ export declare const tooltipProps: {
|
|
|
103
103
|
type: import("vue").PropType<"show" | "if">;
|
|
104
104
|
default: string;
|
|
105
105
|
};
|
|
106
|
+
arrowClass: StringConstructor;
|
|
106
107
|
arrowStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
108
|
+
arrowWrapperClass: StringConstructor;
|
|
109
|
+
arrowWrapperStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
107
110
|
flip: {
|
|
108
111
|
type: BooleanConstructor;
|
|
109
112
|
default: boolean;
|
|
@@ -127,8 +130,11 @@ export declare const tooltipProps: {
|
|
|
127
130
|
default: undefined;
|
|
128
131
|
};
|
|
129
132
|
scrollable: BooleanConstructor;
|
|
133
|
+
contentClass: StringConstructor;
|
|
130
134
|
contentStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
135
|
+
headerClass: StringConstructor;
|
|
131
136
|
headerStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
137
|
+
footerClass: StringConstructor;
|
|
132
138
|
footerStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
133
139
|
onClickoutside: import("vue").PropType<(e: MouseEvent) => void>;
|
|
134
140
|
'onUpdate:show': import("vue").PropType<import("../../_utils").MaybeArray<(value: boolean) => void>>;
|
|
@@ -256,7 +262,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
256
262
|
type: import("vue").PropType<"show" | "if">;
|
|
257
263
|
default: string;
|
|
258
264
|
};
|
|
265
|
+
arrowClass: StringConstructor;
|
|
259
266
|
arrowStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
267
|
+
arrowWrapperClass: StringConstructor;
|
|
268
|
+
arrowWrapperStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
260
269
|
flip: {
|
|
261
270
|
type: BooleanConstructor;
|
|
262
271
|
default: boolean;
|
|
@@ -280,8 +289,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
280
289
|
default: undefined;
|
|
281
290
|
};
|
|
282
291
|
scrollable: BooleanConstructor;
|
|
292
|
+
contentClass: StringConstructor;
|
|
283
293
|
contentStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
294
|
+
headerClass: StringConstructor;
|
|
284
295
|
headerStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
296
|
+
footerClass: StringConstructor;
|
|
285
297
|
footerStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
286
298
|
onClickoutside: import("vue").PropType<(e: MouseEvent) => void>;
|
|
287
299
|
'onUpdate:show': import("vue").PropType<import("../../_utils").MaybeArray<(value: boolean) => void>>;
|
|
@@ -558,7 +570,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
558
570
|
type: import("vue").PropType<"show" | "if">;
|
|
559
571
|
default: string;
|
|
560
572
|
};
|
|
573
|
+
arrowClass: StringConstructor;
|
|
561
574
|
arrowStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
575
|
+
arrowWrapperClass: StringConstructor;
|
|
576
|
+
arrowWrapperStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
562
577
|
flip: {
|
|
563
578
|
type: BooleanConstructor;
|
|
564
579
|
default: boolean;
|
|
@@ -582,8 +597,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
582
597
|
default: undefined;
|
|
583
598
|
};
|
|
584
599
|
scrollable: BooleanConstructor;
|
|
600
|
+
contentClass: StringConstructor;
|
|
585
601
|
contentStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
602
|
+
headerClass: StringConstructor;
|
|
586
603
|
headerStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
604
|
+
footerClass: StringConstructor;
|
|
587
605
|
footerStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
588
606
|
onClickoutside: import("vue").PropType<(e: MouseEvent) => void>;
|
|
589
607
|
'onUpdate:show': import("vue").PropType<import("../../_utils").MaybeArray<(value: boolean) => void>>;
|
package/lib/tree/index.d.ts
CHANGED
package/lib/tree/index.js
CHANGED
|
@@ -3,7 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.treeProps = exports.NTree = void 0;
|
|
6
|
+
exports.treeGetClickTarget = exports.treeProps = exports.NTree = void 0;
|
|
7
7
|
var Tree_1 = require("./src/Tree");
|
|
8
8
|
Object.defineProperty(exports, "NTree", { enumerable: true, get: function () { return __importDefault(Tree_1).default; } });
|
|
9
9
|
Object.defineProperty(exports, "treeProps", { enumerable: true, get: function () { return Tree_1.treeProps; } });
|
|
10
|
+
var utils_1 = require("./src/utils");
|
|
11
|
+
Object.defineProperty(exports, "treeGetClickTarget", { enumerable: true, get: function () { return utils_1.treeGetClickTarget; } });
|
package/lib/tree/src/Tree.d.ts
CHANGED
|
@@ -223,6 +223,7 @@ export declare const treeProps: {
|
|
|
223
223
|
nodeTextColorDisabled: string;
|
|
224
224
|
loadingColor: string;
|
|
225
225
|
dropMarkColor: string;
|
|
226
|
+
lineColor: string;
|
|
226
227
|
}, {
|
|
227
228
|
Checkbox: import("../../_mixins").Theme<"Checkbox", {
|
|
228
229
|
labelLineHeight: string;
|
|
@@ -286,6 +287,7 @@ export declare const treeProps: {
|
|
|
286
287
|
nodeTextColorDisabled: string;
|
|
287
288
|
loadingColor: string;
|
|
288
289
|
dropMarkColor: string;
|
|
290
|
+
lineColor: string;
|
|
289
291
|
}, {
|
|
290
292
|
Checkbox: import("../../_mixins").Theme<"Checkbox", {
|
|
291
293
|
labelLineHeight: string;
|
|
@@ -349,6 +351,7 @@ export declare const treeProps: {
|
|
|
349
351
|
nodeTextColorDisabled: string;
|
|
350
352
|
loadingColor: string;
|
|
351
353
|
dropMarkColor: string;
|
|
354
|
+
lineColor: string;
|
|
352
355
|
}, {
|
|
353
356
|
Checkbox: import("../../_mixins").Theme<"Checkbox", {
|
|
354
357
|
labelLineHeight: string;
|
|
@@ -554,6 +557,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
554
557
|
nodeTextColorDisabled: string;
|
|
555
558
|
loadingColor: string;
|
|
556
559
|
dropMarkColor: string;
|
|
560
|
+
lineColor: string;
|
|
557
561
|
}, {
|
|
558
562
|
Checkbox: import("../../_mixins").Theme<"Checkbox", {
|
|
559
563
|
labelLineHeight: string;
|
|
@@ -617,6 +621,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
617
621
|
nodeTextColorDisabled: string;
|
|
618
622
|
loadingColor: string;
|
|
619
623
|
dropMarkColor: string;
|
|
624
|
+
lineColor: string;
|
|
620
625
|
}, {
|
|
621
626
|
Checkbox: import("../../_mixins").Theme<"Checkbox", {
|
|
622
627
|
labelLineHeight: string;
|
|
@@ -680,6 +685,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
680
685
|
nodeTextColorDisabled: string;
|
|
681
686
|
loadingColor: string;
|
|
682
687
|
dropMarkColor: string;
|
|
688
|
+
lineColor: string;
|
|
683
689
|
}, {
|
|
684
690
|
Checkbox: import("../../_mixins").Theme<"Checkbox", {
|
|
685
691
|
labelLineHeight: string;
|
|
@@ -851,6 +857,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
851
857
|
nodeTextColorDisabled: string;
|
|
852
858
|
loadingColor: string;
|
|
853
859
|
dropMarkColor: string;
|
|
860
|
+
lineColor: string;
|
|
854
861
|
};
|
|
855
862
|
peers: {
|
|
856
863
|
Checkbox: import("../../_mixins").Theme<"Checkbox", {
|
|
@@ -1209,6 +1216,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1209
1216
|
'--n-line-offset-bottom': string;
|
|
1210
1217
|
'--n-node-content-height': string;
|
|
1211
1218
|
'--n-line-height': string;
|
|
1219
|
+
'--n-line-color': string;
|
|
1212
1220
|
}> | undefined;
|
|
1213
1221
|
themeClass: import("vue").Ref<string> | undefined;
|
|
1214
1222
|
onRender: (() => void) | undefined;
|
|
@@ -1378,6 +1386,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1378
1386
|
nodeTextColorDisabled: string;
|
|
1379
1387
|
loadingColor: string;
|
|
1380
1388
|
dropMarkColor: string;
|
|
1389
|
+
lineColor: string;
|
|
1381
1390
|
}, {
|
|
1382
1391
|
Checkbox: import("../../_mixins").Theme<"Checkbox", {
|
|
1383
1392
|
labelLineHeight: string;
|
|
@@ -1441,6 +1450,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1441
1450
|
nodeTextColorDisabled: string;
|
|
1442
1451
|
loadingColor: string;
|
|
1443
1452
|
dropMarkColor: string;
|
|
1453
|
+
lineColor: string;
|
|
1444
1454
|
}, {
|
|
1445
1455
|
Checkbox: import("../../_mixins").Theme<"Checkbox", {
|
|
1446
1456
|
labelLineHeight: string;
|
|
@@ -1504,6 +1514,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1504
1514
|
nodeTextColorDisabled: string;
|
|
1505
1515
|
loadingColor: string;
|
|
1506
1516
|
dropMarkColor: string;
|
|
1517
|
+
lineColor: string;
|
|
1507
1518
|
}, {
|
|
1508
1519
|
Checkbox: import("../../_mixins").Theme<"Checkbox", {
|
|
1509
1520
|
labelLineHeight: string;
|
package/lib/tree/src/Tree.js
CHANGED
|
@@ -1178,7 +1178,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
1178
1178
|
}
|
|
1179
1179
|
};
|
|
1180
1180
|
const cssVarsRef = (0, vue_1.computed)(() => {
|
|
1181
|
-
const { common: { cubicBezierEaseInOut }, self: { fontSize, nodeBorderRadius, nodeColorHover, nodeColorPressed, nodeColorActive, arrowColor, loadingColor, nodeTextColor, nodeTextColorDisabled, dropMarkColor, nodeWrapperPadding, nodeHeight, lineHeight } } = themeRef.value;
|
|
1181
|
+
const { common: { cubicBezierEaseInOut }, self: { fontSize, nodeBorderRadius, nodeColorHover, nodeColorPressed, nodeColorActive, arrowColor, loadingColor, nodeTextColor, nodeTextColorDisabled, dropMarkColor, nodeWrapperPadding, nodeHeight, lineHeight, lineColor } } = themeRef.value;
|
|
1182
1182
|
const lineOffsetTop = (0, seemly_1.getPadding)(nodeWrapperPadding, 'top');
|
|
1183
1183
|
const lineOffsetBottom = (0, seemly_1.getPadding)(nodeWrapperPadding, 'bottom');
|
|
1184
1184
|
const nodeContentHeight = (0, seemly_1.pxfy)((0, seemly_1.depx)(nodeHeight) - (0, seemly_1.depx)(lineOffsetTop) - (0, seemly_1.depx)(lineOffsetBottom));
|
|
@@ -1198,7 +1198,8 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
1198
1198
|
'--n-line-offset-top': `-${lineOffsetTop}`,
|
|
1199
1199
|
'--n-line-offset-bottom': `-${lineOffsetBottom}`,
|
|
1200
1200
|
'--n-node-content-height': nodeContentHeight,
|
|
1201
|
-
'--n-line-height': lineHeight
|
|
1201
|
+
'--n-line-height': lineHeight,
|
|
1202
|
+
'--n-line-color': lineColor
|
|
1202
1203
|
};
|
|
1203
1204
|
});
|
|
1204
1205
|
const themeClassHandle = inlineThemeDisabled
|
|
@@ -1241,7 +1242,9 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
1241
1242
|
default: () => {
|
|
1242
1243
|
var _a;
|
|
1243
1244
|
(_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
1244
|
-
return ((0,
|
|
1245
|
+
return !fNodes.length ? ((0, _utils_1.resolveSlot)(this.$slots.empty, () => [
|
|
1246
|
+
(0, vue_1.h)(empty_1.NEmpty, { class: `${mergedClsPrefix}-tree__empty`, theme: this.mergedTheme.peers.Empty, themeOverrides: this.mergedTheme.peerOverrides.Empty })
|
|
1247
|
+
])) : ((0, vue_1.h)(vueuc_1.VVirtualList, { ref: "virtualListInstRef", items: this.fNodes, itemSize: (0, seemly_1.depx)(mergedTheme.self.nodeHeight), ignoreItemResize: this.aip, paddingTop: padding.top, paddingBottom: padding.bottom, class: this.themeClass, style: [
|
|
1245
1248
|
this.cssVars,
|
|
1246
1249
|
{
|
|
1247
1250
|
paddingLeft: padding.left,
|
package/lib/tree/src/TreeNode.js
CHANGED
|
@@ -28,7 +28,7 @@ const TreeNode = (0, vue_1.defineComponent)({
|
|
|
28
28
|
setup(props) {
|
|
29
29
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
30
30
|
const NTree = (0, vue_1.inject)(interface_1.treeInjectionKey);
|
|
31
|
-
const { droppingNodeParentRef, droppingMouseNodeRef, draggingNodeRef, droppingPositionRef, droppingOffsetLevelRef, nodePropsRef, indentRef, blockLineRef, checkboxPlacementRef, checkOnClickRef, disabledFieldRef, showLineRef } = NTree;
|
|
31
|
+
const { droppingNodeParentRef, droppingMouseNodeRef, draggingNodeRef, droppingPositionRef, droppingOffsetLevelRef, nodePropsRef, indentRef, blockLineRef, checkboxPlacementRef, checkOnClickRef, disabledFieldRef, showLineRef, renderSwitcherIconRef } = NTree;
|
|
32
32
|
const checkboxDisabledRef = (0, vooks_1.useMemo)(() => !!props.tmNode.rawNode.checkboxDisabled);
|
|
33
33
|
const nodeIsDisabledRef = (0, vooks_1.useMemo)(() => {
|
|
34
34
|
return (0, utils_1.isNodeDisabled)(props.tmNode, disabledFieldRef.value);
|
|
@@ -49,29 +49,40 @@ const TreeNode = (0, vue_1.defineComponent)({
|
|
|
49
49
|
contentElRef.value = contentInstRef.value.$el;
|
|
50
50
|
});
|
|
51
51
|
function handleSwitcherClick() {
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
if (!
|
|
55
|
-
NTree.loadingKeysRef.value.
|
|
52
|
+
const callback = () => {
|
|
53
|
+
const { tmNode } = props;
|
|
54
|
+
if (!tmNode.isLeaf && !tmNode.shallowLoaded) {
|
|
55
|
+
if (!NTree.loadingKeysRef.value.has(tmNode.key)) {
|
|
56
|
+
NTree.loadingKeysRef.value.add(tmNode.key);
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
const { onLoadRef: { value: onLoad } } = NTree;
|
|
62
|
+
if (onLoad) {
|
|
63
|
+
void onLoad(tmNode.rawNode)
|
|
64
|
+
.then((value) => {
|
|
65
|
+
if (value !== false) {
|
|
66
|
+
NTree.handleSwitcherClick(tmNode);
|
|
67
|
+
}
|
|
68
|
+
})
|
|
69
|
+
.finally(() => {
|
|
70
|
+
NTree.loadingKeysRef.value.delete(tmNode.key);
|
|
71
|
+
});
|
|
72
|
+
}
|
|
56
73
|
}
|
|
57
74
|
else {
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
const { onLoadRef: { value: onLoad } } = NTree;
|
|
61
|
-
if (onLoad) {
|
|
62
|
-
void onLoad(tmNode.rawNode)
|
|
63
|
-
.then((value) => {
|
|
64
|
-
if (value !== false) {
|
|
65
|
-
NTree.handleSwitcherClick(tmNode);
|
|
66
|
-
}
|
|
67
|
-
})
|
|
68
|
-
.finally(() => {
|
|
69
|
-
NTree.loadingKeysRef.value.delete(tmNode.key);
|
|
70
|
-
});
|
|
75
|
+
NTree.handleSwitcherClick(tmNode);
|
|
71
76
|
}
|
|
77
|
+
};
|
|
78
|
+
if (renderSwitcherIconRef.value) {
|
|
79
|
+
// if renderSwitcherIcon is set, icon dom may be altered before event
|
|
80
|
+
// bubbles to parent dom, so that target check fails. Call it in next
|
|
81
|
+
// event loop so that event bubble phase is finishes.
|
|
82
|
+
setTimeout(callback, 0);
|
|
72
83
|
}
|
|
73
84
|
else {
|
|
74
|
-
|
|
85
|
+
callback();
|
|
75
86
|
}
|
|
76
87
|
}
|
|
77
88
|
const selectableRef = (0, vooks_1.useMemo)(() => !nodeIsDisabledRef.value &&
|
|
@@ -22,6 +22,7 @@ const iconSwitchTransitionNode = (0, icon_switch_cssr_1.iconSwitchTransition)();
|
|
|
22
22
|
// --n-line-offset-bottom
|
|
23
23
|
// --n-node-content-height
|
|
24
24
|
// --n-line-height
|
|
25
|
+
// --n-line-color
|
|
25
26
|
exports.default = (0, cssr_1.cB)('tree', `
|
|
26
27
|
font-size: var(--n-font-size);
|
|
27
28
|
outline: none;
|
|
@@ -53,9 +54,9 @@ exports.default = (0, cssr_1.cB)('tree', `
|
|
|
53
54
|
min-width: 0;
|
|
54
55
|
`)]), (0, cssr_1.cNotM)('block-line', [(0, cssr_1.cB)('tree-node', [(0, cssr_1.cNotM)('disabled', [(0, cssr_1.cB)('tree-node-content', [(0, cssr_1.c)('&:hover', 'background: var(--n-node-color-hover);')]), (0, cssr_1.cM)('selectable', [(0, cssr_1.cB)('tree-node-content', [(0, cssr_1.c)('&:active', 'background: var(--n-node-color-pressed);')])]), (0, cssr_1.cM)('pending', [(0, cssr_1.cB)('tree-node-content', `
|
|
55
56
|
background: var(--n-node-color-hover);
|
|
56
|
-
`)]), (0, cssr_1.cM)('selected', [(0, cssr_1.cB)('tree-node-content', 'background: var(--n-node-color-active);')])])])
|
|
57
|
+
`)])]), (0, cssr_1.cM)('selected', [(0, cssr_1.cB)('tree-node-content', 'background: var(--n-node-color-active);')])])]), (0, cssr_1.cM)('block-line', [(0, cssr_1.cB)('tree-node', [(0, cssr_1.cNotM)('disabled', [(0, cssr_1.c)('&:hover', 'background: var(--n-node-color-hover);'), (0, cssr_1.cM)('pending', `
|
|
57
58
|
background: var(--n-node-color-hover);
|
|
58
|
-
`), (0, cssr_1.cM)('selectable', [(0, cssr_1.cNotM)('selected', [(0, cssr_1.c)('&:active', 'background: var(--n-node-color-pressed);')])]), (0, cssr_1.cM)('selected', 'background: var(--n-node-color-active);')]), (0, cssr_1.cM)('disabled', `
|
|
59
|
+
`), (0, cssr_1.cM)('selectable', [(0, cssr_1.cNotM)('selected', [(0, cssr_1.c)('&:active', 'background: var(--n-node-color-pressed);')])]), (0, cssr_1.cM)('selected', 'background: var(--n-node-color-active);')]), (0, cssr_1.cM)('selected', 'background: var(--n-node-color-active);'), (0, cssr_1.cM)('disabled', `
|
|
59
60
|
cursor: not-allowed;
|
|
60
61
|
`)])]), (0, cssr_1.cB)('tree-node-indent', `
|
|
61
62
|
flex-grow: 0;
|
|
@@ -63,7 +64,7 @@ exports.default = (0, cssr_1.cB)('tree', `
|
|
|
63
64
|
`, [(0, cssr_1.cM)('show-line', 'position: relative', [(0, cssr_1.c)('&::before', `
|
|
64
65
|
position: absolute;
|
|
65
66
|
left: 50%;
|
|
66
|
-
border-left: 1px solid var(--n-
|
|
67
|
+
border-left: 1px solid var(--n-line-color);
|
|
67
68
|
transition: border-color .3s var(--n-bezier);
|
|
68
69
|
transform: translate(-50%);
|
|
69
70
|
content: "";
|
package/lib/tree/src/utils.d.ts
CHANGED
package/lib/tree/src/utils.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.filterTree = exports.emptyImage = exports.keysWithFilter = exports.isNodeDisabled = exports.useMergedCheckStrategy = void 0;
|
|
3
|
+
exports.treeGetClickTarget = exports.filterTree = exports.emptyImage = exports.keysWithFilter = exports.isNodeDisabled = exports.useMergedCheckStrategy = void 0;
|
|
4
4
|
const vue_1 = require("vue");
|
|
5
5
|
const _utils_1 = require("../../_utils");
|
|
6
|
+
const seemly_1 = require("seemly");
|
|
6
7
|
function useMergedCheckStrategy(props) {
|
|
7
8
|
return (0, vue_1.computed)(() => (props.leafOnly ? 'child' : props.checkStrategy));
|
|
8
9
|
}
|
|
@@ -120,3 +121,15 @@ function filterTree(tree, filter, pattern, keyField, childrenField) {
|
|
|
120
121
|
};
|
|
121
122
|
}
|
|
122
123
|
exports.filterTree = filterTree;
|
|
124
|
+
function treeGetClickTarget(e) {
|
|
125
|
+
if ((0, seemly_1.happensIn)(e, 'checkbox')) {
|
|
126
|
+
return 'checkbox';
|
|
127
|
+
}
|
|
128
|
+
else if ((0, seemly_1.happensIn)(e, 'switcher')) {
|
|
129
|
+
return 'switcher';
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
return 'node';
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
exports.treeGetClickTarget = treeGetClickTarget;
|
|
@@ -13,6 +13,7 @@ export declare const self: (vars: ThemeCommonVars) => {
|
|
|
13
13
|
nodeTextColorDisabled: string;
|
|
14
14
|
loadingColor: string;
|
|
15
15
|
dropMarkColor: string;
|
|
16
|
+
lineColor: string;
|
|
16
17
|
};
|
|
17
18
|
export type TreeThemeVars = ReturnType<typeof self>;
|
|
18
19
|
declare const treeLight: import("../../_mixins/use-theme").Theme<"Tree", {
|
|
@@ -29,6 +30,7 @@ declare const treeLight: import("../../_mixins/use-theme").Theme<"Tree", {
|
|
|
29
30
|
nodeTextColorDisabled: string;
|
|
30
31
|
loadingColor: string;
|
|
31
32
|
dropMarkColor: string;
|
|
33
|
+
lineColor: string;
|
|
32
34
|
}, {
|
|
33
35
|
Checkbox: import("../../_mixins/use-theme").Theme<"Checkbox", {
|
|
34
36
|
labelLineHeight: string;
|
package/lib/tree/styles/light.js
CHANGED
|
@@ -8,7 +8,7 @@ const styles_3 = require("../../_internal/scrollbar/styles");
|
|
|
8
8
|
const common_1 = require("../../_styles/common");
|
|
9
9
|
const use_theme_1 = require("../../_mixins/use-theme");
|
|
10
10
|
const self = (vars) => {
|
|
11
|
-
const { borderRadiusSmall, hoverColor, pressedColor, primaryColor, textColor3, textColor2, textColorDisabled, fontSize } = vars;
|
|
11
|
+
const { borderRadiusSmall, dividerColor, hoverColor, pressedColor, primaryColor, textColor3, textColor2, textColorDisabled, fontSize } = vars;
|
|
12
12
|
return {
|
|
13
13
|
fontSize,
|
|
14
14
|
lineHeight: '1.5',
|
|
@@ -22,7 +22,8 @@ const self = (vars) => {
|
|
|
22
22
|
nodeTextColor: textColor2,
|
|
23
23
|
nodeTextColorDisabled: textColorDisabled,
|
|
24
24
|
loadingColor: primaryColor,
|
|
25
|
-
dropMarkColor: primaryColor
|
|
25
|
+
dropMarkColor: primaryColor,
|
|
26
|
+
lineColor: dividerColor
|
|
26
27
|
};
|
|
27
28
|
};
|
|
28
29
|
exports.self = self;
|