naive-ui 2.18.0 → 2.19.1
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/es/_internal/clear/src/Clear.d.ts +1 -4
- package/es/_internal/clear/src/Clear.js +1 -4
- package/es/_internal/icons/Checkmark.js +3 -2
- package/es/_internal/select-menu/src/SelectMenu.d.ts +173 -0
- package/es/_internal/select-menu/src/SelectMenu.js +9 -6
- package/es/_internal/select-menu/src/SelectOption.js +2 -1
- package/es/_internal/select-menu/src/styles/index.cssr.js +32 -28
- package/es/_internal/select-menu/styles/light.d.ts +2 -0
- package/es/_internal/select-menu/styles/light.js +1 -1
- package/es/_internal/selection/src/Selection.d.ts +8 -0
- package/es/_internal/selection/src/Selection.js +34 -14
- package/es/_internal/selection/src/styles/index.cssr.js +16 -14
- package/es/_internal/selection/styles/_common.d.ts +1 -0
- package/es/_internal/selection/styles/_common.js +2 -1
- package/es/_internal/selection/styles/light.d.ts +2 -0
- package/es/_styles/common/light.js +1 -1
- package/es/_utils/naive/mutable.d.ts +2 -2
- package/es/anchor/src/AnchorAdapter.d.ts +13 -8
- package/es/anchor/src/AnchorAdapter.js +3 -5
- package/es/anchor/src/BaseAnchor.d.ts +14 -1
- package/es/anchor/src/BaseAnchor.js +20 -7
- package/es/anchor/src/Link.js +5 -5
- package/es/anchor/src/styles/index.cssr.js +25 -16
- package/es/auto-complete/index.d.ts +1 -0
- package/es/auto-complete/src/AutoComplete.d.ts +10 -0
- package/es/auto-complete/src/interface.d.ts +1 -1
- package/es/auto-complete/styles/light.d.ts +1 -0
- package/es/badge/src/styles/index.cssr.js +1 -0
- package/es/card/src/Card.d.ts +17 -1
- package/es/card/src/Card.js +3 -2
- package/es/card/styles/dark.js +6 -1
- package/es/card/styles/light.d.ts +1 -0
- package/es/card/styles/light.js +2 -2
- package/es/cascader/src/Cascader.d.ts +20 -0
- package/es/cascader/src/Cascader.js +28 -19
- package/es/cascader/src/CascaderMenu.js +17 -15
- package/es/cascader/src/CascaderOption.d.ts +2 -0
- package/es/cascader/src/CascaderSelectMenu.d.ts +2 -0
- package/es/cascader/src/CascaderSubmenu.d.ts +2 -0
- package/es/cascader/src/interface.d.ts +2 -2
- package/es/cascader/src/styles/index.cssr.js +6 -1
- package/es/cascader/styles/light.d.ts +2 -0
- package/es/composables/use-theme-vars.js +5 -5
- package/es/config-provider/src/internal-interface.d.ts +2 -0
- package/es/data-table/src/DataTable.d.ts +22 -0
- package/es/data-table/src/HeaderButton/FilterButton.d.ts +4 -0
- package/es/data-table/src/HeaderButton/FilterMenu.d.ts +4 -0
- package/es/data-table/src/TableParts/Body.d.ts +4 -0
- package/es/data-table/src/TableParts/Cell.d.ts +8 -0
- package/es/data-table/src/TableParts/Header.d.ts +4 -0
- package/es/data-table/styles/light.d.ts +2 -0
- package/es/date-picker/src/DatePicker.d.ts +8 -3
- package/es/date-picker/src/DatePicker.js +2 -2
- package/es/date-picker/src/panel/date.d.ts +3 -3
- package/es/date-picker/src/panel/date.js +10 -1
- package/es/date-picker/src/panel/daterange.js +10 -1
- package/es/date-picker/src/panel/datetimerange.js +10 -1
- package/es/descriptions/src/Descriptions.d.ts +4 -17
- package/es/descriptions/src/Descriptions.js +2 -8
- package/es/dialog/src/Dialog.d.ts +4 -16
- package/es/dialog/src/Dialog.js +2 -8
- package/es/dialog/src/DialogEnvironment.d.ts +28 -36
- package/es/dialog/src/DialogEnvironment.js +2 -2
- package/es/dialog/src/DialogProvider.d.ts +18 -15
- package/es/dialog/src/DialogProvider.js +2 -1
- package/es/dropdown/src/Dropdown.d.ts +9 -23
- package/es/dynamic-tags/src/DynamicTags.js +2 -1
- package/es/empty/src/Empty.d.ts +6 -1
- package/es/empty/src/Empty.js +16 -4
- package/es/form/src/FormItemGridItem.d.ts +1 -1
- package/es/form/src/FormItemGridItem.js +2 -2
- package/es/grid/src/GridItem.d.ts +2 -2
- package/es/grid/src/GridItem.js +1 -1
- package/es/input-number/src/InputNumber.d.ts +5 -0
- package/es/input-number/src/InputNumber.js +9 -8
- package/es/layout/src/Layout.d.ts +18 -4
- package/es/layout/src/LayoutContent.d.ts +9 -2
- package/es/layout/src/LayoutFooter.d.ts +9 -0
- package/es/layout/src/LayoutHeader.d.ts +6 -0
- package/es/layout/src/LayoutSider.d.ts +11 -0
- package/es/layout/src/LayoutSider.js +4 -2
- package/es/layout/src/ToggleButton.js +7 -3
- package/es/layout/src/styles/layout-sider.cssr.js +31 -15
- package/es/layout/styles/dark.js +3 -2
- package/es/layout/styles/light.d.ts +2 -0
- package/es/layout/styles/light.js +3 -2
- package/es/locales/common/enUS.js +1 -1
- package/es/locales/common/ruRU.js +1 -1
- package/es/locales/common/zhCN.js +1 -1
- 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 +6 -1
- package/es/menu/src/Menu.js +10 -1
- package/es/menu/src/MenuOption.d.ts +3 -1
- package/es/menu/src/MenuOptionContent.d.ts +3 -1
- package/es/menu/src/Submenu.d.ts +3 -1
- package/es/modal/src/BodyWrapper.d.ts +7 -8
- package/es/modal/src/Modal.d.ts +40 -71
- package/es/modal/src/Modal.js +18 -39
- package/es/modal/src/presetProps.d.ts +4 -9
- package/es/modal/styles/light.d.ts +1 -0
- package/es/notification/src/Notification.d.ts +1 -1
- package/es/notification/src/NotificationEnvironment.d.ts +1 -1
- package/es/notification/src/NotificationProvider.d.ts +16 -16
- package/es/page-header/src/PageHeader.d.ts +1 -0
- package/es/page-header/src/PageHeader.js +8 -2
- package/es/page-header/src/styles/rtl.cssr.d.ts +2 -0
- package/es/page-header/src/styles/rtl.cssr.js +19 -0
- package/es/page-header/styles/index.d.ts +1 -0
- package/es/page-header/styles/index.js +1 -0
- package/es/page-header/styles/rtl.d.ts +5 -0
- package/es/page-header/styles/rtl.js +5 -0
- package/es/pagination/src/Pagination.d.ts +23 -1
- package/es/pagination/styles/light.d.ts +2 -0
- package/es/popconfirm/src/Popconfirm.d.ts +8 -22
- package/es/popover/src/Popover.d.ts +12 -32
- package/es/popover/src/Popover.js +25 -18
- package/es/popover/src/PopoverBody.d.ts +2 -2
- package/es/popover/src/PopoverBody.js +4 -2
- package/es/popselect/src/Popselect.d.ts +18 -22
- package/es/popselect/src/PopselectPanel.d.ts +1 -0
- package/es/popselect/src/PopselectPanel.js +38 -19
- package/es/popselect/styles/light.d.ts +1 -0
- package/es/select/src/Select.d.ts +31 -3
- package/es/select/src/Select.js +55 -56
- package/es/select/src/interface.d.ts +2 -2
- package/es/select/styles/light.d.ts +2 -0
- package/es/spin/src/Spin.d.ts +34 -25
- package/es/spin/src/Spin.js +27 -20
- package/es/spin/src/styles/index.cssr.js +23 -9
- package/es/spin/styles/light.d.ts +2 -0
- package/es/spin/styles/light.js +3 -1
- package/es/steps/src/Steps.js +2 -2
- package/es/styles.d.ts +1 -0
- package/es/styles.js +1 -0
- package/es/tabs/src/Tab.d.ts +1 -1
- package/es/tabs/src/Tab.js +4 -6
- package/es/tabs/src/Tabs.d.ts +133 -42
- package/es/tabs/src/Tabs.js +37 -38
- package/es/tabs/src/interface.d.ts +2 -1
- package/es/tabs/src/styles/index.cssr.js +34 -10
- package/es/tabs/styles/_common.d.ts +6 -0
- package/es/tabs/styles/_common.js +6 -0
- package/es/tabs/styles/dark.js +7 -1
- package/es/tabs/styles/light.d.ts +13 -0
- package/es/tabs/styles/light.js +3 -3
- package/es/tag/src/styles/index.cssr.js +1 -1
- package/es/time/src/Time.d.ts +14 -22
- package/es/time/src/Time.js +32 -18
- package/es/time-picker/src/TimePicker.d.ts +5 -0
- package/es/time-picker/src/TimePicker.js +2 -2
- package/es/timeline/src/Timeline.d.ts +67 -0
- package/es/timeline/src/Timeline.js +1 -1
- package/es/timeline/src/TimelineItem.d.ts +2 -0
- package/es/timeline/src/TimelineItem.js +11 -11
- package/es/timeline/src/styles/index.cssr.js +26 -17
- package/es/timeline/styles/_common.d.ts +2 -0
- package/es/timeline/styles/_common.js +3 -1
- package/es/timeline/styles/dark.js +1 -1
- package/es/timeline/styles/light.d.ts +7 -0
- package/es/timeline/styles/light.js +1 -1
- package/es/tooltip/src/Tooltip.d.ts +8 -22
- package/es/transfer/src/TransferList.d.ts +1 -1
- package/es/tree/src/Tree.d.ts +25 -10
- package/es/tree/src/Tree.js +34 -11
- package/es/tree/src/TreeNode.js +5 -2
- package/es/tree/src/interface.d.ts +2 -2
- package/es/tree-select/src/TreeSelect.d.ts +23 -1
- package/es/tree-select/src/TreeSelect.js +36 -40
- package/es/tree-select/src/interface.d.ts +2 -2
- package/es/tree-select/styles/light.d.ts +1 -0
- package/es/typography/src/blockquote.d.ts +2 -8
- package/es/typography/src/blockquote.js +1 -4
- package/es/typography/src/ol.d.ts +2 -8
- package/es/typography/src/ol.js +1 -4
- package/es/typography/src/p.d.ts +2 -2
- package/es/typography/src/p.js +1 -1
- package/es/typography/src/text.d.ts +14 -58
- package/es/typography/src/text.js +2 -23
- package/es/typography/src/ul.d.ts +2 -8
- package/es/typography/src/ul.js +1 -4
- package/es/upload/index.d.ts +2 -0
- package/es/upload/index.js +2 -0
- package/es/upload/src/Upload.d.ts +16 -68
- package/es/upload/src/Upload.js +71 -98
- package/es/upload/src/UploadDragger.js +7 -1
- package/es/upload/src/UploadFileList.d.ts +2 -0
- package/es/upload/src/UploadFileList.js +34 -0
- package/es/upload/src/UploadProgress.d.ts +0 -7
- package/es/upload/src/UploadProgress.js +1 -5
- package/es/upload/src/UploadTrigger.d.ts +12 -0
- package/es/upload/src/UploadTrigger.js +63 -0
- package/es/upload/src/interface.d.ts +13 -2
- package/es/upload/src/styles/index.cssr.js +40 -32
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/_internal/clear/src/Clear.d.ts +1 -4
- package/lib/_internal/clear/src/Clear.js +1 -4
- package/lib/_internal/icons/Checkmark.js +3 -2
- package/lib/_internal/select-menu/src/SelectMenu.d.ts +173 -0
- package/lib/_internal/select-menu/src/SelectMenu.js +9 -6
- package/lib/_internal/select-menu/src/SelectOption.js +2 -1
- package/lib/_internal/select-menu/src/styles/index.cssr.js +32 -28
- package/lib/_internal/select-menu/styles/light.d.ts +2 -0
- package/lib/_internal/select-menu/styles/light.js +1 -1
- package/lib/_internal/selection/src/Selection.d.ts +8 -0
- package/lib/_internal/selection/src/Selection.js +34 -14
- package/lib/_internal/selection/src/styles/index.cssr.js +16 -14
- package/lib/_internal/selection/styles/_common.d.ts +1 -0
- package/lib/_internal/selection/styles/_common.js +2 -1
- package/lib/_internal/selection/styles/light.d.ts +2 -0
- package/lib/_styles/common/light.js +1 -1
- package/lib/_utils/naive/mutable.d.ts +2 -2
- package/lib/anchor/src/AnchorAdapter.d.ts +13 -8
- package/lib/anchor/src/AnchorAdapter.js +3 -5
- package/lib/anchor/src/BaseAnchor.d.ts +14 -1
- package/lib/anchor/src/BaseAnchor.js +19 -6
- package/lib/anchor/src/Link.js +5 -5
- package/lib/anchor/src/styles/index.cssr.js +25 -16
- package/lib/auto-complete/index.d.ts +1 -0
- package/lib/auto-complete/src/AutoComplete.d.ts +10 -0
- package/lib/auto-complete/src/interface.d.ts +1 -1
- package/lib/auto-complete/styles/light.d.ts +1 -0
- package/lib/badge/src/styles/index.cssr.js +1 -0
- package/lib/card/src/Card.d.ts +17 -1
- package/lib/card/src/Card.js +3 -2
- package/lib/card/styles/dark.js +6 -1
- package/lib/card/styles/light.d.ts +1 -0
- package/lib/card/styles/light.js +2 -2
- package/lib/cascader/src/Cascader.d.ts +20 -0
- package/lib/cascader/src/Cascader.js +28 -19
- package/lib/cascader/src/CascaderMenu.js +16 -14
- package/lib/cascader/src/CascaderOption.d.ts +2 -0
- package/lib/cascader/src/CascaderSelectMenu.d.ts +2 -0
- package/lib/cascader/src/CascaderSubmenu.d.ts +2 -0
- package/lib/cascader/src/interface.d.ts +2 -2
- package/lib/cascader/src/styles/index.cssr.js +6 -1
- package/lib/cascader/styles/light.d.ts +2 -0
- package/lib/composables/use-theme-vars.js +5 -5
- package/lib/config-provider/src/internal-interface.d.ts +2 -0
- package/lib/data-table/src/DataTable.d.ts +22 -0
- package/lib/data-table/src/HeaderButton/FilterButton.d.ts +4 -0
- package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +4 -0
- package/lib/data-table/src/TableParts/Body.d.ts +4 -0
- package/lib/data-table/src/TableParts/Cell.d.ts +8 -0
- package/lib/data-table/src/TableParts/Header.d.ts +4 -0
- package/lib/data-table/styles/light.d.ts +2 -0
- package/lib/date-picker/src/DatePicker.d.ts +8 -3
- package/lib/date-picker/src/DatePicker.js +2 -2
- package/lib/date-picker/src/panel/date.d.ts +3 -3
- package/lib/date-picker/src/panel/date.js +9 -0
- package/lib/date-picker/src/panel/daterange.js +9 -0
- package/lib/date-picker/src/panel/datetimerange.js +9 -0
- package/lib/descriptions/src/Descriptions.d.ts +4 -17
- package/lib/descriptions/src/Descriptions.js +2 -8
- package/lib/dialog/src/Dialog.d.ts +4 -16
- package/lib/dialog/src/Dialog.js +2 -8
- package/lib/dialog/src/DialogEnvironment.d.ts +28 -36
- package/lib/dialog/src/DialogEnvironment.js +2 -2
- package/lib/dialog/src/DialogProvider.d.ts +18 -15
- package/lib/dialog/src/DialogProvider.js +2 -1
- package/lib/dropdown/src/Dropdown.d.ts +9 -23
- package/lib/dynamic-tags/src/DynamicTags.js +2 -1
- package/lib/empty/src/Empty.d.ts +6 -1
- package/lib/empty/src/Empty.js +15 -3
- package/lib/form/src/FormItemGridItem.d.ts +1 -1
- package/lib/form/src/FormItemGridItem.js +2 -2
- package/lib/grid/src/GridItem.d.ts +2 -2
- package/lib/grid/src/GridItem.js +1 -1
- package/lib/input-number/src/InputNumber.d.ts +5 -0
- package/lib/input-number/src/InputNumber.js +9 -8
- package/lib/layout/src/Layout.d.ts +18 -4
- package/lib/layout/src/LayoutContent.d.ts +9 -2
- package/lib/layout/src/LayoutFooter.d.ts +9 -0
- package/lib/layout/src/LayoutHeader.d.ts +6 -0
- package/lib/layout/src/LayoutSider.d.ts +11 -0
- package/lib/layout/src/LayoutSider.js +4 -2
- package/lib/layout/src/ToggleButton.js +7 -3
- package/lib/layout/src/styles/layout-sider.cssr.js +31 -15
- package/lib/layout/styles/dark.js +3 -2
- package/lib/layout/styles/light.d.ts +2 -0
- package/lib/layout/styles/light.js +3 -2
- package/lib/locales/common/enUS.js +1 -1
- package/lib/locales/common/ruRU.js +1 -1
- package/lib/locales/common/zhCN.js +1 -1
- 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 +6 -1
- package/lib/menu/src/Menu.js +10 -1
- package/lib/menu/src/MenuOption.d.ts +3 -1
- package/lib/menu/src/MenuOptionContent.d.ts +3 -1
- package/lib/menu/src/Submenu.d.ts +3 -1
- package/lib/modal/src/BodyWrapper.d.ts +7 -8
- package/lib/modal/src/Modal.d.ts +40 -71
- package/lib/modal/src/Modal.js +17 -38
- package/lib/modal/src/presetProps.d.ts +4 -9
- package/lib/modal/styles/light.d.ts +1 -0
- package/lib/notification/src/Notification.d.ts +1 -1
- package/lib/notification/src/NotificationEnvironment.d.ts +1 -1
- package/lib/notification/src/NotificationProvider.d.ts +16 -16
- package/lib/page-header/src/PageHeader.d.ts +1 -0
- package/lib/page-header/src/PageHeader.js +8 -2
- package/lib/page-header/src/styles/rtl.cssr.d.ts +2 -0
- package/lib/page-header/src/styles/rtl.cssr.js +26 -0
- package/lib/page-header/styles/index.d.ts +1 -0
- package/lib/page-header/styles/index.js +3 -1
- package/lib/page-header/styles/rtl.d.ts +5 -0
- package/lib/page-header/styles/rtl.js +7 -0
- package/lib/pagination/src/Pagination.d.ts +23 -1
- package/lib/pagination/styles/light.d.ts +2 -0
- package/lib/popconfirm/src/Popconfirm.d.ts +8 -22
- package/lib/popover/src/Popover.d.ts +12 -32
- package/lib/popover/src/Popover.js +23 -16
- package/lib/popover/src/PopoverBody.d.ts +2 -2
- package/lib/popover/src/PopoverBody.js +4 -2
- package/lib/popselect/src/Popselect.d.ts +18 -22
- package/lib/popselect/src/PopselectPanel.d.ts +1 -0
- package/lib/popselect/src/PopselectPanel.js +38 -19
- package/lib/popselect/styles/light.d.ts +1 -0
- package/lib/select/src/Select.d.ts +31 -3
- package/lib/select/src/Select.js +55 -56
- package/lib/select/src/interface.d.ts +2 -2
- package/lib/select/styles/light.d.ts +2 -0
- package/lib/spin/src/Spin.d.ts +34 -25
- package/lib/spin/src/Spin.js +25 -18
- package/lib/spin/src/styles/index.cssr.js +23 -9
- package/lib/spin/styles/light.d.ts +2 -0
- package/lib/spin/styles/light.js +3 -1
- package/lib/steps/src/Steps.js +1 -1
- package/lib/styles.d.ts +1 -0
- package/lib/styles.js +63 -61
- package/lib/tabs/src/Tab.d.ts +1 -1
- package/lib/tabs/src/Tab.js +4 -6
- package/lib/tabs/src/Tabs.d.ts +133 -42
- package/lib/tabs/src/Tabs.js +36 -37
- package/lib/tabs/src/interface.d.ts +2 -1
- package/lib/tabs/src/styles/index.cssr.js +34 -10
- package/lib/tabs/styles/_common.d.ts +6 -0
- package/lib/tabs/styles/_common.js +6 -0
- package/lib/tabs/styles/dark.js +7 -1
- package/lib/tabs/styles/light.d.ts +13 -0
- package/lib/tabs/styles/light.js +3 -3
- package/lib/tag/src/styles/index.cssr.js +1 -1
- package/lib/time/src/Time.d.ts +14 -22
- package/lib/time/src/Time.js +31 -17
- package/lib/time-picker/src/TimePicker.d.ts +5 -0
- package/lib/time-picker/src/TimePicker.js +2 -2
- package/lib/timeline/src/Timeline.d.ts +67 -0
- package/lib/timeline/src/Timeline.js +1 -1
- package/lib/timeline/src/TimelineItem.d.ts +2 -0
- package/lib/timeline/src/TimelineItem.js +10 -10
- package/lib/timeline/src/styles/index.cssr.js +27 -18
- package/lib/timeline/styles/_common.d.ts +2 -0
- package/lib/timeline/styles/_common.js +3 -1
- package/lib/timeline/styles/dark.js +1 -1
- package/lib/timeline/styles/light.d.ts +7 -0
- package/lib/timeline/styles/light.js +1 -1
- package/lib/tooltip/src/Tooltip.d.ts +8 -22
- package/lib/transfer/src/TransferList.d.ts +1 -1
- package/lib/tree/src/Tree.d.ts +25 -10
- package/lib/tree/src/Tree.js +34 -11
- package/lib/tree/src/TreeNode.js +5 -2
- package/lib/tree/src/interface.d.ts +2 -2
- package/lib/tree-select/src/TreeSelect.d.ts +23 -1
- package/lib/tree-select/src/TreeSelect.js +36 -40
- package/lib/tree-select/src/interface.d.ts +2 -2
- package/lib/tree-select/styles/light.d.ts +1 -0
- package/lib/typography/src/blockquote.d.ts +2 -8
- package/lib/typography/src/blockquote.js +1 -4
- package/lib/typography/src/ol.d.ts +2 -8
- package/lib/typography/src/ol.js +1 -4
- package/lib/typography/src/p.d.ts +2 -2
- package/lib/typography/src/p.js +1 -1
- package/lib/typography/src/text.d.ts +14 -58
- package/lib/typography/src/text.js +2 -23
- package/lib/typography/src/ul.d.ts +2 -8
- package/lib/typography/src/ul.js +1 -4
- package/lib/upload/index.d.ts +2 -0
- package/lib/upload/index.js +5 -1
- package/lib/upload/src/Upload.d.ts +16 -68
- package/lib/upload/src/Upload.js +68 -95
- package/lib/upload/src/UploadDragger.js +7 -1
- package/lib/upload/src/UploadFileList.d.ts +2 -0
- package/lib/upload/src/UploadFileList.js +36 -0
- package/lib/upload/src/UploadProgress.d.ts +0 -7
- package/lib/upload/src/UploadProgress.js +1 -5
- package/lib/upload/src/UploadTrigger.d.ts +12 -0
- package/lib/upload/src/UploadTrigger.js +65 -0
- package/lib/upload/src/interface.d.ts +13 -2
- package/lib/upload/src/styles/index.cssr.js +40 -32
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +8 -6
- package/web-types.json +248 -13
package/es/card/src/Card.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export declare const cardBaseProps: {
|
|
|
10
10
|
readonly contentStyle: PropType<string | CSSProperties>;
|
|
11
11
|
readonly headerStyle: PropType<string | CSSProperties>;
|
|
12
12
|
readonly footerStyle: PropType<string | CSSProperties>;
|
|
13
|
+
readonly embedded: BooleanConstructor;
|
|
13
14
|
readonly segmented: {
|
|
14
15
|
readonly type: PropType<boolean | Segmented>;
|
|
15
16
|
readonly default: false;
|
|
@@ -29,12 +30,13 @@ export declare const cardBaseProps: {
|
|
|
29
30
|
readonly hoverable: BooleanConstructor;
|
|
30
31
|
readonly onClose: PropType<MaybeArray<() => void>>;
|
|
31
32
|
};
|
|
32
|
-
export declare const cardBasePropKeys: ("size" | "title" | "contentStyle" | "bordered" | "onClose" | "closable" | "hoverable" | "headerStyle" | "footerStyle" | "segmented")[];
|
|
33
|
+
export declare const cardBasePropKeys: ("size" | "title" | "contentStyle" | "bordered" | "onClose" | "closable" | "hoverable" | "headerStyle" | "footerStyle" | "embedded" | "segmented")[];
|
|
33
34
|
declare const cardProps: {
|
|
34
35
|
title: StringConstructor;
|
|
35
36
|
contentStyle: PropType<string | CSSProperties>;
|
|
36
37
|
headerStyle: PropType<string | CSSProperties>;
|
|
37
38
|
footerStyle: PropType<string | CSSProperties>;
|
|
39
|
+
embedded: BooleanConstructor;
|
|
38
40
|
segmented: {
|
|
39
41
|
readonly type: PropType<boolean | Segmented>;
|
|
40
42
|
readonly default: false;
|
|
@@ -59,6 +61,7 @@ declare const cardProps: {
|
|
|
59
61
|
colorModal: string;
|
|
60
62
|
colorPopover: string;
|
|
61
63
|
colorTarget: string;
|
|
64
|
+
colorEmbedded: string;
|
|
62
65
|
textColor: string;
|
|
63
66
|
titleTextColor: string;
|
|
64
67
|
borderColor: string;
|
|
@@ -89,6 +92,7 @@ declare const cardProps: {
|
|
|
89
92
|
colorModal: string;
|
|
90
93
|
colorPopover: string;
|
|
91
94
|
colorTarget: string;
|
|
95
|
+
colorEmbedded: string;
|
|
92
96
|
textColor: string;
|
|
93
97
|
titleTextColor: string;
|
|
94
98
|
borderColor: string;
|
|
@@ -119,6 +123,7 @@ declare const cardProps: {
|
|
|
119
123
|
colorModal: string;
|
|
120
124
|
colorPopover: string;
|
|
121
125
|
colorTarget: string;
|
|
126
|
+
colorEmbedded: string;
|
|
122
127
|
textColor: string;
|
|
123
128
|
titleTextColor: string;
|
|
124
129
|
borderColor: string;
|
|
@@ -150,6 +155,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
150
155
|
contentStyle: PropType<string | CSSProperties>;
|
|
151
156
|
headerStyle: PropType<string | CSSProperties>;
|
|
152
157
|
footerStyle: PropType<string | CSSProperties>;
|
|
158
|
+
embedded: BooleanConstructor;
|
|
153
159
|
segmented: {
|
|
154
160
|
readonly type: PropType<boolean | Segmented>;
|
|
155
161
|
readonly default: false;
|
|
@@ -174,6 +180,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
174
180
|
colorModal: string;
|
|
175
181
|
colorPopover: string;
|
|
176
182
|
colorTarget: string;
|
|
183
|
+
colorEmbedded: string;
|
|
177
184
|
textColor: string;
|
|
178
185
|
titleTextColor: string;
|
|
179
186
|
borderColor: string;
|
|
@@ -204,6 +211,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
204
211
|
colorModal: string;
|
|
205
212
|
colorPopover: string;
|
|
206
213
|
colorTarget: string;
|
|
214
|
+
colorEmbedded: string;
|
|
207
215
|
textColor: string;
|
|
208
216
|
titleTextColor: string;
|
|
209
217
|
borderColor: string;
|
|
@@ -234,6 +242,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
234
242
|
colorModal: string;
|
|
235
243
|
colorPopover: string;
|
|
236
244
|
colorTarget: string;
|
|
245
|
+
colorEmbedded: string;
|
|
237
246
|
textColor: string;
|
|
238
247
|
titleTextColor: string;
|
|
239
248
|
borderColor: string;
|
|
@@ -367,6 +376,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
367
376
|
colorModal: string;
|
|
368
377
|
colorPopover: string;
|
|
369
378
|
colorTarget: string;
|
|
379
|
+
colorEmbedded: string;
|
|
370
380
|
textColor: string;
|
|
371
381
|
titleTextColor: string;
|
|
372
382
|
borderColor: string;
|
|
@@ -426,6 +436,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
426
436
|
contentStyle?: unknown;
|
|
427
437
|
headerStyle?: unknown;
|
|
428
438
|
footerStyle?: unknown;
|
|
439
|
+
embedded?: unknown;
|
|
429
440
|
segmented?: unknown;
|
|
430
441
|
size?: unknown;
|
|
431
442
|
bordered?: unknown;
|
|
@@ -440,6 +451,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
440
451
|
bordered: boolean;
|
|
441
452
|
closable: boolean;
|
|
442
453
|
hoverable: boolean;
|
|
454
|
+
embedded: boolean;
|
|
443
455
|
segmented: boolean | Segmented;
|
|
444
456
|
} & {
|
|
445
457
|
title?: string | undefined;
|
|
@@ -449,6 +461,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
449
461
|
colorModal: string;
|
|
450
462
|
colorPopover: string;
|
|
451
463
|
colorTarget: string;
|
|
464
|
+
colorEmbedded: string;
|
|
452
465
|
textColor: string;
|
|
453
466
|
titleTextColor: string;
|
|
454
467
|
borderColor: string;
|
|
@@ -479,6 +492,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
479
492
|
colorModal: string;
|
|
480
493
|
colorPopover: string;
|
|
481
494
|
colorTarget: string;
|
|
495
|
+
colorEmbedded: string;
|
|
482
496
|
textColor: string;
|
|
483
497
|
titleTextColor: string;
|
|
484
498
|
borderColor: string;
|
|
@@ -509,6 +523,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
509
523
|
colorModal: string;
|
|
510
524
|
colorPopover: string;
|
|
511
525
|
colorTarget: string;
|
|
526
|
+
colorEmbedded: string;
|
|
512
527
|
textColor: string;
|
|
513
528
|
titleTextColor: string;
|
|
514
529
|
borderColor: string;
|
|
@@ -542,6 +557,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
542
557
|
bordered: boolean;
|
|
543
558
|
closable: boolean;
|
|
544
559
|
hoverable: boolean;
|
|
560
|
+
embedded: boolean;
|
|
545
561
|
segmented: boolean | Segmented;
|
|
546
562
|
}>;
|
|
547
563
|
export default _default;
|
package/es/card/src/Card.js
CHANGED
|
@@ -11,6 +11,7 @@ export const cardBaseProps = {
|
|
|
11
11
|
contentStyle: [Object, String],
|
|
12
12
|
headerStyle: [Object, String],
|
|
13
13
|
footerStyle: [Object, String],
|
|
14
|
+
embedded: Boolean,
|
|
14
15
|
segmented: {
|
|
15
16
|
type: [Boolean, Object],
|
|
16
17
|
default: false
|
|
@@ -51,12 +52,12 @@ export default defineComponent({
|
|
|
51
52
|
handleCloseClick,
|
|
52
53
|
cssVars: computed(() => {
|
|
53
54
|
const { size } = props;
|
|
54
|
-
const { self: { color, colorModal, colorTarget, textColor, titleTextColor, titleFontWeight, borderColor, actionColor, borderRadius, closeColor, closeColorHover, closeColorPressed, lineHeight, closeSize, boxShadow, colorPopover, [createKey('padding', size)]: padding, [createKey('fontSize', size)]: fontSize, [createKey('titleFontSize', size)]: titleFontSize }, common: { cubicBezierEaseInOut } } = themeRef.value;
|
|
55
|
+
const { self: { color, colorModal, colorTarget, textColor, titleTextColor, titleFontWeight, borderColor, actionColor, borderRadius, closeColor, closeColorHover, closeColorPressed, lineHeight, closeSize, boxShadow, colorPopover, colorEmbedded, [createKey('padding', size)]: padding, [createKey('fontSize', size)]: fontSize, [createKey('titleFontSize', size)]: titleFontSize }, common: { cubicBezierEaseInOut } } = themeRef.value;
|
|
55
56
|
const { top: paddingTop, left: paddingLeft, bottom: paddingBottom } = getPadding(padding);
|
|
56
57
|
return {
|
|
57
58
|
'--bezier': cubicBezierEaseInOut,
|
|
58
59
|
'--border-radius': borderRadius,
|
|
59
|
-
'--color': color,
|
|
60
|
+
'--color': props.embedded ? colorEmbedded : color,
|
|
60
61
|
'--color-modal': colorModal,
|
|
61
62
|
'--color-popover': colorPopover,
|
|
62
63
|
'--color-target': colorTarget,
|
package/es/card/styles/dark.js
CHANGED
|
@@ -3,6 +3,11 @@ import { self } from './light';
|
|
|
3
3
|
const cardDark = {
|
|
4
4
|
name: 'Card',
|
|
5
5
|
common: commonDark,
|
|
6
|
-
self
|
|
6
|
+
self(vars) {
|
|
7
|
+
const commonSelf = self(vars);
|
|
8
|
+
const { cardColor } = vars;
|
|
9
|
+
commonSelf.colorEmbedded = cardColor;
|
|
10
|
+
return commonSelf;
|
|
11
|
+
}
|
|
7
12
|
};
|
|
8
13
|
export default cardDark;
|
package/es/card/styles/light.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { commonLight } from '../../_styles/common';
|
|
2
2
|
import commonVariables from './_common';
|
|
3
3
|
export const self = (vars) => {
|
|
4
|
-
const { primaryColor, borderRadius, lineHeight, fontSize, cardColor, textColor2, textColor1, dividerColor,
|
|
5
|
-
return Object.assign(Object.assign({}, commonVariables), { lineHeight, color: cardColor, colorModal: modalColor, colorPopover: popoverColor, colorTarget: primaryColor, textColor: textColor2, titleTextColor: textColor1, borderColor: dividerColor, actionColor: actionColor, titleFontWeight: fontWeightStrong, closeColor: closeColor, closeColorHover: closeColorHover, closeColorPressed: closeColorPressed, fontSizeSmall: fontSize, fontSizeMedium: fontSize, fontSizeLarge: fontSize, fontSizeHuge: fontSize, boxShadow: boxShadow1, borderRadius });
|
|
4
|
+
const { primaryColor, borderRadius, lineHeight, fontSize, cardColor, textColor2, textColor1, dividerColor, fontWeightStrong, closeColor, closeColorHover, closeColorPressed, modalColor, boxShadow1, popoverColor, actionColor } = vars;
|
|
5
|
+
return Object.assign(Object.assign({}, commonVariables), { lineHeight, color: cardColor, colorModal: modalColor, colorPopover: popoverColor, colorTarget: primaryColor, colorEmbedded: actionColor, textColor: textColor2, titleTextColor: textColor1, borderColor: dividerColor, actionColor: actionColor, titleFontWeight: fontWeightStrong, closeColor: closeColor, closeColorHover: closeColorHover, closeColorPressed: closeColorPressed, fontSizeSmall: fontSize, fontSizeMedium: fontSize, fontSizeLarge: fontSize, fontSizeHuge: fontSize, boxShadow: boxShadow1, borderRadius });
|
|
6
6
|
};
|
|
7
7
|
const cardLight = {
|
|
8
8
|
name: 'Card',
|
|
@@ -122,6 +122,7 @@ declare const cascaderProps: {
|
|
|
122
122
|
optionOpacityDisabled: string;
|
|
123
123
|
optionCheckColor: string;
|
|
124
124
|
optionColorPending: string;
|
|
125
|
+
optionColorActive: string;
|
|
125
126
|
actionTextColor: string;
|
|
126
127
|
loadingColor: string;
|
|
127
128
|
height: string;
|
|
@@ -204,6 +205,7 @@ declare const cascaderProps: {
|
|
|
204
205
|
fontSizeLarge: string;
|
|
205
206
|
paddingSingle: string;
|
|
206
207
|
clearSize: string;
|
|
208
|
+
arrowSize: string;
|
|
207
209
|
}, {
|
|
208
210
|
Popover: import("../../_mixins").Theme<"Popover", {
|
|
209
211
|
fontSize: string;
|
|
@@ -290,6 +292,7 @@ declare const cascaderProps: {
|
|
|
290
292
|
optionOpacityDisabled: string;
|
|
291
293
|
optionCheckColor: string;
|
|
292
294
|
optionColorPending: string;
|
|
295
|
+
optionColorActive: string;
|
|
293
296
|
actionTextColor: string;
|
|
294
297
|
loadingColor: string;
|
|
295
298
|
height: string;
|
|
@@ -372,6 +375,7 @@ declare const cascaderProps: {
|
|
|
372
375
|
fontSizeLarge: string;
|
|
373
376
|
paddingSingle: string;
|
|
374
377
|
clearSize: string;
|
|
378
|
+
arrowSize: string;
|
|
375
379
|
}, {
|
|
376
380
|
Popover: import("../../_mixins").Theme<"Popover", {
|
|
377
381
|
fontSize: string;
|
|
@@ -458,6 +462,7 @@ declare const cascaderProps: {
|
|
|
458
462
|
optionOpacityDisabled: string;
|
|
459
463
|
optionCheckColor: string;
|
|
460
464
|
optionColorPending: string;
|
|
465
|
+
optionColorActive: string;
|
|
461
466
|
actionTextColor: string;
|
|
462
467
|
loadingColor: string;
|
|
463
468
|
height: string;
|
|
@@ -540,6 +545,7 @@ declare const cascaderProps: {
|
|
|
540
545
|
fontSizeLarge: string;
|
|
541
546
|
paddingSingle: string;
|
|
542
547
|
clearSize: string;
|
|
548
|
+
arrowSize: string;
|
|
543
549
|
}, {
|
|
544
550
|
Popover: import("../../_mixins").Theme<"Popover", {
|
|
545
551
|
fontSize: string;
|
|
@@ -709,6 +715,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
709
715
|
optionOpacityDisabled: string;
|
|
710
716
|
optionCheckColor: string;
|
|
711
717
|
optionColorPending: string;
|
|
718
|
+
optionColorActive: string;
|
|
712
719
|
actionTextColor: string;
|
|
713
720
|
loadingColor: string;
|
|
714
721
|
height: string;
|
|
@@ -791,6 +798,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
791
798
|
fontSizeLarge: string;
|
|
792
799
|
paddingSingle: string;
|
|
793
800
|
clearSize: string;
|
|
801
|
+
arrowSize: string;
|
|
794
802
|
}, {
|
|
795
803
|
Popover: import("../../_mixins").Theme<"Popover", {
|
|
796
804
|
fontSize: string;
|
|
@@ -877,6 +885,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
877
885
|
optionOpacityDisabled: string;
|
|
878
886
|
optionCheckColor: string;
|
|
879
887
|
optionColorPending: string;
|
|
888
|
+
optionColorActive: string;
|
|
880
889
|
actionTextColor: string;
|
|
881
890
|
loadingColor: string;
|
|
882
891
|
height: string;
|
|
@@ -959,6 +968,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
959
968
|
fontSizeLarge: string;
|
|
960
969
|
paddingSingle: string;
|
|
961
970
|
clearSize: string;
|
|
971
|
+
arrowSize: string;
|
|
962
972
|
}, {
|
|
963
973
|
Popover: import("../../_mixins").Theme<"Popover", {
|
|
964
974
|
fontSize: string;
|
|
@@ -1045,6 +1055,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1045
1055
|
optionOpacityDisabled: string;
|
|
1046
1056
|
optionCheckColor: string;
|
|
1047
1057
|
optionColorPending: string;
|
|
1058
|
+
optionColorActive: string;
|
|
1048
1059
|
actionTextColor: string;
|
|
1049
1060
|
loadingColor: string;
|
|
1050
1061
|
height: string;
|
|
@@ -1127,6 +1138,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1127
1138
|
fontSizeLarge: string;
|
|
1128
1139
|
paddingSingle: string;
|
|
1129
1140
|
clearSize: string;
|
|
1141
|
+
arrowSize: string;
|
|
1130
1142
|
}, {
|
|
1131
1143
|
Popover: import("../../_mixins").Theme<"Popover", {
|
|
1132
1144
|
fontSize: string;
|
|
@@ -1372,6 +1384,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1372
1384
|
optionOpacityDisabled: string;
|
|
1373
1385
|
optionCheckColor: string;
|
|
1374
1386
|
optionColorPending: string;
|
|
1387
|
+
optionColorActive: string;
|
|
1375
1388
|
actionTextColor: string;
|
|
1376
1389
|
loadingColor: string;
|
|
1377
1390
|
height: string;
|
|
@@ -1454,6 +1467,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1454
1467
|
fontSizeLarge: string;
|
|
1455
1468
|
paddingSingle: string;
|
|
1456
1469
|
clearSize: string;
|
|
1470
|
+
arrowSize: string;
|
|
1457
1471
|
}, {
|
|
1458
1472
|
Popover: import("../../_mixins").Theme<"Popover", {
|
|
1459
1473
|
fontSize: string;
|
|
@@ -1677,6 +1691,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1677
1691
|
optionOpacityDisabled: string;
|
|
1678
1692
|
optionCheckColor: string;
|
|
1679
1693
|
optionColorPending: string;
|
|
1694
|
+
optionColorActive: string;
|
|
1680
1695
|
actionTextColor: string;
|
|
1681
1696
|
loadingColor: string;
|
|
1682
1697
|
height: string;
|
|
@@ -1759,6 +1774,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1759
1774
|
fontSizeLarge: string;
|
|
1760
1775
|
paddingSingle: string;
|
|
1761
1776
|
clearSize: string;
|
|
1777
|
+
arrowSize: string;
|
|
1762
1778
|
}, {
|
|
1763
1779
|
Popover: import("../../_mixins").Theme<"Popover", {
|
|
1764
1780
|
fontSize: string;
|
|
@@ -1845,6 +1861,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1845
1861
|
optionOpacityDisabled: string;
|
|
1846
1862
|
optionCheckColor: string;
|
|
1847
1863
|
optionColorPending: string;
|
|
1864
|
+
optionColorActive: string;
|
|
1848
1865
|
actionTextColor: string;
|
|
1849
1866
|
loadingColor: string;
|
|
1850
1867
|
height: string;
|
|
@@ -1927,6 +1944,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1927
1944
|
fontSizeLarge: string;
|
|
1928
1945
|
paddingSingle: string;
|
|
1929
1946
|
clearSize: string;
|
|
1947
|
+
arrowSize: string;
|
|
1930
1948
|
}, {
|
|
1931
1949
|
Popover: import("../../_mixins").Theme<"Popover", {
|
|
1932
1950
|
fontSize: string;
|
|
@@ -2013,6 +2031,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2013
2031
|
optionOpacityDisabled: string;
|
|
2014
2032
|
optionCheckColor: string;
|
|
2015
2033
|
optionColorPending: string;
|
|
2034
|
+
optionColorActive: string;
|
|
2016
2035
|
actionTextColor: string;
|
|
2017
2036
|
loadingColor: string;
|
|
2018
2037
|
height: string;
|
|
@@ -2095,6 +2114,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2095
2114
|
fontSizeLarge: string;
|
|
2096
2115
|
paddingSingle: string;
|
|
2097
2116
|
clearSize: string;
|
|
2117
|
+
arrowSize: string;
|
|
2098
2118
|
}, {
|
|
2099
2119
|
Popover: import("../../_mixins").Theme<"Popover", {
|
|
2100
2120
|
fontSize: string;
|
|
@@ -161,15 +161,16 @@ export default defineComponent({
|
|
|
161
161
|
}
|
|
162
162
|
});
|
|
163
163
|
}
|
|
164
|
-
function doUpdateValue(value) {
|
|
164
|
+
function doUpdateValue(value, option) {
|
|
165
165
|
const { onUpdateValue, 'onUpdate:value': _onUpdateValue, onChange } = props;
|
|
166
166
|
const { nTriggerFormInput, nTriggerFormChange } = formItem;
|
|
167
167
|
if (onUpdateValue)
|
|
168
|
-
call(onUpdateValue, value);
|
|
169
|
-
if (_onUpdateValue)
|
|
170
|
-
call(_onUpdateValue, value);
|
|
168
|
+
call(onUpdateValue, value, option);
|
|
169
|
+
if (_onUpdateValue) {
|
|
170
|
+
call(_onUpdateValue, value, option);
|
|
171
|
+
}
|
|
171
172
|
if (onChange)
|
|
172
|
-
call(onChange, value);
|
|
173
|
+
call(onChange, value, option);
|
|
173
174
|
uncontrolledValueRef.value = value;
|
|
174
175
|
nTriggerFormInput();
|
|
175
176
|
nTriggerFormChange();
|
|
@@ -182,22 +183,23 @@ export default defineComponent({
|
|
|
182
183
|
}
|
|
183
184
|
function doCheck(key) {
|
|
184
185
|
const { cascade, multiple, filterable } = props;
|
|
186
|
+
const { value: { check, getNode } } = treeMateRef;
|
|
185
187
|
if (multiple) {
|
|
186
188
|
try {
|
|
187
|
-
const { checkedKeys } =
|
|
189
|
+
const { checkedKeys } = check(key, mergedKeysRef.value.checkedKeys, {
|
|
188
190
|
cascade,
|
|
189
191
|
checkStrategy: mergedCheckStrategyRef.value
|
|
190
192
|
});
|
|
191
|
-
doUpdateValue(checkedKeys);
|
|
193
|
+
doUpdateValue(checkedKeys, checkedKeys.map((checkedKey) => { var _a; return ((_a = getNode(checkedKey)) === null || _a === void 0 ? void 0 : _a.rawNode) || null; }));
|
|
192
194
|
if (filterable)
|
|
193
195
|
focusSelectionInput();
|
|
194
196
|
}
|
|
195
197
|
catch (err) {
|
|
196
198
|
if (err instanceof SubtreeNotLoadedError) {
|
|
197
199
|
if (cascaderMenuInstRef.value) {
|
|
198
|
-
const
|
|
199
|
-
if (
|
|
200
|
-
cascaderMenuInstRef.value.showErrorMessage(
|
|
200
|
+
const tmNode = getNode(key);
|
|
201
|
+
if (tmNode !== null) {
|
|
202
|
+
cascaderMenuInstRef.value.showErrorMessage(tmNode.rawNode[props.labelField]);
|
|
201
203
|
}
|
|
202
204
|
}
|
|
203
205
|
}
|
|
@@ -208,16 +210,17 @@ export default defineComponent({
|
|
|
208
210
|
}
|
|
209
211
|
else {
|
|
210
212
|
if (mergedCheckStrategyRef.value === 'child') {
|
|
211
|
-
const
|
|
212
|
-
if (
|
|
213
|
-
doUpdateValue(key);
|
|
213
|
+
const tmNode = getNode(key);
|
|
214
|
+
if (tmNode === null || tmNode === void 0 ? void 0 : tmNode.isLeaf) {
|
|
215
|
+
doUpdateValue(key, tmNode.rawNode);
|
|
214
216
|
}
|
|
215
217
|
else {
|
|
216
218
|
return false;
|
|
217
219
|
}
|
|
218
220
|
}
|
|
219
221
|
else {
|
|
220
|
-
|
|
222
|
+
const tmNode = getNode(key);
|
|
223
|
+
doUpdateValue(key, (tmNode === null || tmNode === void 0 ? void 0 : tmNode.rawNode) || null);
|
|
221
224
|
}
|
|
222
225
|
}
|
|
223
226
|
return true;
|
|
@@ -225,11 +228,12 @@ export default defineComponent({
|
|
|
225
228
|
function doUncheck(key) {
|
|
226
229
|
const { cascade, multiple } = props;
|
|
227
230
|
if (multiple) {
|
|
228
|
-
const {
|
|
231
|
+
const { value: { uncheck, getNode } } = treeMateRef;
|
|
232
|
+
const { checkedKeys } = uncheck(key, mergedKeysRef.value.checkedKeys, {
|
|
229
233
|
cascade,
|
|
230
234
|
checkStrategy: mergedCheckStrategyRef.value
|
|
231
235
|
});
|
|
232
|
-
doUpdateValue(checkedKeys);
|
|
236
|
+
doUpdateValue(checkedKeys, checkedKeys.map((checkedKey) => { var _a; return ((_a = getNode(checkedKey)) === null || _a === void 0 ? void 0 : _a.rawNode) || null; }));
|
|
233
237
|
}
|
|
234
238
|
}
|
|
235
239
|
const selectedOptionsRef = computed(() => {
|
|
@@ -521,7 +525,12 @@ export default defineComponent({
|
|
|
521
525
|
// --- search
|
|
522
526
|
function handleClear(e) {
|
|
523
527
|
e.stopPropagation();
|
|
524
|
-
|
|
528
|
+
if (props.multiple) {
|
|
529
|
+
doUpdateValue([], []);
|
|
530
|
+
}
|
|
531
|
+
else {
|
|
532
|
+
doUpdateValue(null, null);
|
|
533
|
+
}
|
|
525
534
|
}
|
|
526
535
|
function handleTriggerFocus(e) {
|
|
527
536
|
var _a;
|
|
@@ -586,7 +595,7 @@ export default defineComponent({
|
|
|
586
595
|
doUncheck(option[valueField]);
|
|
587
596
|
}
|
|
588
597
|
else {
|
|
589
|
-
doUpdateValue(null);
|
|
598
|
+
doUpdateValue(null, null);
|
|
590
599
|
}
|
|
591
600
|
}
|
|
592
601
|
function handleKeyDown(e) {
|
|
@@ -712,7 +721,7 @@ export default defineComponent({
|
|
|
712
721
|
h(VTarget, null, {
|
|
713
722
|
default: () => (h(NInternalSelection, { ref: "triggerInstRef", clsPrefix: mergedClsPrefix, maxTagCount: this.maxTagCount, bordered: this.mergedBordered, size: this.mergedSize, theme: this.mergedTheme.peers.InternalSelection, themeOverrides: this.mergedTheme.peerOverrides.InternalSelection, active: this.mergedShow, pattern: this.pattern, placeholder: this.localizedPlaceholder, selectedOption: this.selectedOption, selectedOptions: this.selectedOptions, multiple: this.multiple, filterable: this.filterable, clearable: this.clearable, disabled: this.mergedDisabled, focused: this.focused, onFocus: this.handleTriggerFocus, onBlur: this.handleTriggerBlur, onClick: this.handleTriggerClick, onClear: this.handleClear, onDeleteOption: this.handleDeleteOption, onPatternInput: this.handlePatternInput, onKeydown: this.handleKeyDown, onKeyup: this.handleKeyUp }))
|
|
714
723
|
}),
|
|
715
|
-
h(VFollower, { key: "cascaderMenu", ref: "cascaderMenuFollowerRef", show: this.mergedShow && !this.showSelectMenu, containerClass: this.namespace, placement: "bottom-start", teleportDisabled: this.adjustedTo === useAdjustedTo.tdkey, to: this.adjustedTo }, {
|
|
724
|
+
h(VFollower, { key: "cascaderMenu", ref: "cascaderMenuFollowerRef", show: this.mergedShow && !this.showSelectMenu, containerClass: this.namespace, placement: "bottom-start", width: !this.options.length ? 'target' : undefined, teleportDisabled: this.adjustedTo === useAdjustedTo.tdkey, to: this.adjustedTo }, {
|
|
716
725
|
default: () => (h(CascaderMenu, { ref: "cascaderMenuInstRef", value: this.mergedValue, show: this.mergedShow && !this.showSelectMenu, menuModel: this.menuModel, style: this.cssVars, onFocus: this.handleMenuFocus, onBlur: this.handleMenuBlur, onKeyup: this.handleMenuKeyUp, onMousedown: this.handleMenuMousedown, onTabout: this.handleMenuTabout }, this.$slots.action && {
|
|
717
726
|
action: this.$slots.action
|
|
718
727
|
}))
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { h, ref, defineComponent, watch, toRef, inject, nextTick, Transition, withDirectives } from 'vue';
|
|
1
|
+
import { h, ref, defineComponent, watch, toRef, inject, nextTick, Transition, withDirectives, renderSlot } from 'vue';
|
|
2
2
|
import { clickoutside } from 'vdirs';
|
|
3
|
+
import { NEmpty } from '../../empty';
|
|
3
4
|
import { NBaseMenuMask } from '../../_internal';
|
|
4
5
|
import NCascaderSubmenu from './CascaderSubmenu';
|
|
5
6
|
import { cascaderInjectionKey } from './interface';
|
|
@@ -99,23 +100,24 @@ export default defineComponent({
|
|
|
99
100
|
render() {
|
|
100
101
|
const { submenuInstRefs, mergedClsPrefix, $slots } = this;
|
|
101
102
|
return (h(Transition, { name: "fade-in-scale-up-transition", appear: this.isMounted }, {
|
|
102
|
-
default: () =>
|
|
103
|
-
|
|
103
|
+
default: () => {
|
|
104
|
+
if (!this.show)
|
|
105
|
+
return null;
|
|
106
|
+
return withDirectives(h("div", { tabindex: "0", ref: "selfElRef", class: `${mergedClsPrefix}-cascader-menu`, onMousedown: this.onMousedown, onFocusin: this.handleFocusin, onFocusout: this.handleFocusout, onKeyup: this.onKeyup, style: {
|
|
104
107
|
'--col-count': this.menuModel.length
|
|
105
108
|
} },
|
|
106
|
-
h("div", { class: `${mergedClsPrefix}-cascader-submenu-wrapper` },
|
|
107
|
-
this.menuModel.map((submenuOptions, index) => {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}),
|
|
113
|
-
|
|
114
|
-
$slots.action ? (h("div", { class: `${mergedClsPrefix}-cascader-menu-action`, "data-action": true }, {
|
|
109
|
+
this.menuModel[0].length ? (h("div", { class: `${mergedClsPrefix}-cascader-submenu-wrapper` },
|
|
110
|
+
this.menuModel.map((submenuOptions, index) => (h(NCascaderSubmenu, { ref: ((instance) => {
|
|
111
|
+
if (instance) {
|
|
112
|
+
submenuInstRefs[index] = instance;
|
|
113
|
+
}
|
|
114
|
+
}), key: index, tmNodes: submenuOptions, depth: index + 1 }))),
|
|
115
|
+
h(NBaseMenuMask, { clsPrefix: mergedClsPrefix, ref: "maskInstRef" }))) : (h("div", { class: `${mergedClsPrefix}-cascader-menu__empty` }, renderSlot($slots, 'empty', undefined, () => [h(NEmpty, null)]))),
|
|
116
|
+
$slots.action && (h("div", { class: `${mergedClsPrefix}-cascader-menu-action`, "data-action": true }, {
|
|
115
117
|
default: $slots.action
|
|
116
|
-
}))
|
|
117
|
-
h(FocusDetector, { onFocus: this.onTabout })), [[clickoutside, this.handleClickOutside]])
|
|
118
|
-
|
|
118
|
+
})),
|
|
119
|
+
h(FocusDetector, { onFocus: this.onTabout })), [[clickoutside, this.handleClickOutside]]);
|
|
120
|
+
}
|
|
119
121
|
}));
|
|
120
122
|
}
|
|
121
123
|
});
|
|
@@ -157,6 +157,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
157
157
|
optionOpacityDisabled: string;
|
|
158
158
|
optionCheckColor: string;
|
|
159
159
|
optionColorPending: string;
|
|
160
|
+
optionColorActive: string;
|
|
160
161
|
actionTextColor: string;
|
|
161
162
|
loadingColor: string;
|
|
162
163
|
height: string;
|
|
@@ -239,6 +240,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
239
240
|
fontSizeLarge: string;
|
|
240
241
|
paddingSingle: string;
|
|
241
242
|
clearSize: string;
|
|
243
|
+
arrowSize: string;
|
|
242
244
|
}, {
|
|
243
245
|
Popover: import("../../_mixins").Theme<"Popover", {
|
|
244
246
|
fontSize: string;
|
|
@@ -164,6 +164,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
164
164
|
optionOpacityDisabled: string;
|
|
165
165
|
optionCheckColor: string;
|
|
166
166
|
optionColorPending: string;
|
|
167
|
+
optionColorActive: string;
|
|
167
168
|
actionTextColor: string;
|
|
168
169
|
loadingColor: string;
|
|
169
170
|
height: string;
|
|
@@ -246,6 +247,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
246
247
|
fontSizeLarge: string;
|
|
247
248
|
paddingSingle: string;
|
|
248
249
|
clearSize: string;
|
|
250
|
+
arrowSize: string;
|
|
249
251
|
}, {
|
|
250
252
|
Popover: import("../../_mixins").Theme<"Popover", {
|
|
251
253
|
fontSize: string;
|
|
@@ -150,6 +150,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
150
150
|
optionOpacityDisabled: string;
|
|
151
151
|
optionCheckColor: string;
|
|
152
152
|
optionColorPending: string;
|
|
153
|
+
optionColorActive: string;
|
|
153
154
|
actionTextColor: string;
|
|
154
155
|
loadingColor: string;
|
|
155
156
|
height: string;
|
|
@@ -232,6 +233,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
232
233
|
fontSizeLarge: string;
|
|
233
234
|
paddingSingle: string;
|
|
234
235
|
clearSize: string;
|
|
236
|
+
arrowSize: string;
|
|
235
237
|
}, {
|
|
236
238
|
Popover: import("../../_mixins").Theme<"Popover", {
|
|
237
239
|
fontSize: string;
|
|
@@ -17,8 +17,8 @@ export declare type ExpandTrigger = 'hover' | 'click';
|
|
|
17
17
|
export declare type TmNode = TreeNode<CascaderOption>;
|
|
18
18
|
export declare type Filter = (pattern: string, option: CascaderOption, path: CascaderOption[]) => boolean;
|
|
19
19
|
export declare type OnLoad = (option: CascaderOption) => Promise<void>;
|
|
20
|
-
export declare type OnUpdateValue =
|
|
21
|
-
export declare type OnUpdateValueImpl = (value: Value | null) => void;
|
|
20
|
+
export declare type OnUpdateValue = (value: string & number & string[] & number[] & Array<string | number> & (string | null) & (number | null) & (string[] | null) & (number[] | null) & (Array<string | number> | null), option: CascaderOption & null & CascaderOption[] & Array<CascaderOption | null>) => void;
|
|
21
|
+
export declare type OnUpdateValueImpl = (value: Value | null, option: CascaderOption | null | Array<CascaderOption | null>) => void;
|
|
22
22
|
export declare type MenuModel = TmNode[][];
|
|
23
23
|
export interface CascaderInjection {
|
|
24
24
|
mergedClsPrefixRef: Ref<string>;
|
|
@@ -30,7 +30,12 @@ export default c([cB('cascader-menu', `
|
|
|
30
30
|
`, [fadeInScaleUpTransition({
|
|
31
31
|
transformOrigin: 'inherit',
|
|
32
32
|
duration: '0.2s'
|
|
33
|
-
}),
|
|
33
|
+
}), cE('empty', `
|
|
34
|
+
display: flex;
|
|
35
|
+
padding: 12px 32px;
|
|
36
|
+
flex: 1;
|
|
37
|
+
justify-content: center;
|
|
38
|
+
`), cB('scrollbar', {
|
|
34
39
|
// if width not set, cascader select menu's inner scroll area's width is
|
|
35
40
|
// not correct, which won't change after select menu width is set
|
|
36
41
|
width: '100%'
|
|
@@ -54,6 +54,7 @@ declare const cascaderLight: import("../../_mixins").Theme<"Cascader", {
|
|
|
54
54
|
optionOpacityDisabled: string;
|
|
55
55
|
optionCheckColor: string;
|
|
56
56
|
optionColorPending: string;
|
|
57
|
+
optionColorActive: string;
|
|
57
58
|
actionTextColor: string;
|
|
58
59
|
loadingColor: string;
|
|
59
60
|
height: string;
|
|
@@ -136,6 +137,7 @@ declare const cascaderLight: import("../../_mixins").Theme<"Cascader", {
|
|
|
136
137
|
fontSizeLarge: string;
|
|
137
138
|
paddingSingle: string;
|
|
138
139
|
clearSize: string;
|
|
140
|
+
arrowSize: string;
|
|
139
141
|
}, {
|
|
140
142
|
Popover: import("../../_mixins").Theme<"Popover", {
|
|
141
143
|
fontSize: string;
|
|
@@ -6,13 +6,13 @@ export function useThemeVars() {
|
|
|
6
6
|
const configProviderInjection = inject(configProviderInjectionKey, null);
|
|
7
7
|
if (configProviderInjection === null)
|
|
8
8
|
return commonLight;
|
|
9
|
-
const { mergedThemeRef: { value: mergedTheme } } = configProviderInjection;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return
|
|
9
|
+
const { mergedThemeRef: { value: mergedTheme }, mergedThemeOverridesRef: { value: mergedThemeOverrides } } = configProviderInjection;
|
|
10
|
+
const currentThemeVars = (mergedTheme === null || mergedTheme === void 0 ? void 0 : mergedTheme.common) || commonLight;
|
|
11
|
+
if (mergedThemeOverrides === null || mergedThemeOverrides === void 0 ? void 0 : mergedThemeOverrides.common) {
|
|
12
|
+
return Object.assign({}, currentThemeVars, mergedThemeOverrides.common);
|
|
13
13
|
}
|
|
14
14
|
else {
|
|
15
|
-
return
|
|
15
|
+
return currentThemeVars;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
}
|
|
@@ -84,6 +84,7 @@ import { Size as ButtonSize } from '../../button/src/interface';
|
|
|
84
84
|
import { DataTableRenderFilter, DataTableRenderSorter } from '../../data-table';
|
|
85
85
|
import { IconPlacement } from '../../dialog/src/interface';
|
|
86
86
|
import type { GlobalTheme, GlobalThemeOverrides } from './interface';
|
|
87
|
+
import type { EmptyProps } from '../../empty';
|
|
87
88
|
export interface GlobalThemeWithoutCommon {
|
|
88
89
|
Alert?: AlertTheme;
|
|
89
90
|
Anchor?: AnchorTheme;
|
|
@@ -179,6 +180,7 @@ export interface GlobalComponentConfig {
|
|
|
179
180
|
DynamicInput?: {
|
|
180
181
|
buttonSize?: ButtonSize;
|
|
181
182
|
};
|
|
183
|
+
Empty?: Pick<EmptyProps, 'description' | 'renderIcon'>;
|
|
182
184
|
}
|
|
183
185
|
export interface GlobalIconConfig {
|
|
184
186
|
attach?: () => VNodeChild;
|