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/lib/select/src/Select.js
CHANGED
|
@@ -59,7 +59,7 @@ const selectProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props), {
|
|
|
59
59
|
default: true
|
|
60
60
|
}, renderLabel: Function, renderOption: Function, renderTag: Function, 'onUpdate:value': [Function, Array],
|
|
61
61
|
// for jsx
|
|
62
|
-
onUpdateValue: [Function, Array], onBlur: [Function, Array], onClear: [Function, Array], onFocus: [Function, Array], onScroll: [Function, Array], onSearch: [Function, Array],
|
|
62
|
+
onUpdateValue: [Function, Array], onBlur: [Function, Array], onClear: [Function, Array], onFocus: [Function, Array], onScroll: [Function, Array], onSearch: [Function, Array], onUpdateShow: [Function, Array], 'onUpdate:show': [Function, Array],
|
|
63
63
|
/** deprecated */
|
|
64
64
|
onChange: {
|
|
65
65
|
type: [Function, Array],
|
|
@@ -139,68 +139,60 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
});
|
|
142
|
+
function getMergedOptions(values) {
|
|
143
|
+
const remote = props.remote;
|
|
144
|
+
const { value: memoValOptMap } = memoValOptMapRef;
|
|
145
|
+
const { value: valOptMap } = valOptMapRef;
|
|
146
|
+
const { value: wrappedFallbackOption } = wrappedFallbackOptionRef;
|
|
147
|
+
const options = [];
|
|
148
|
+
values.forEach((value) => {
|
|
149
|
+
if (valOptMap.has(value)) {
|
|
150
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
151
|
+
options.push(valOptMap.get(value));
|
|
152
|
+
}
|
|
153
|
+
else if (remote && memoValOptMap.has(value)) {
|
|
154
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
155
|
+
options.push(memoValOptMap.get(value));
|
|
156
|
+
}
|
|
157
|
+
else if (wrappedFallbackOption) {
|
|
158
|
+
const option = wrappedFallbackOption(value);
|
|
159
|
+
if (option) {
|
|
160
|
+
options.push(option);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
return options;
|
|
165
|
+
}
|
|
142
166
|
const selectedOptionsRef = (0, vue_1.computed)(() => {
|
|
143
167
|
if (props.multiple) {
|
|
144
168
|
const { value: values } = mergedValueRef;
|
|
145
169
|
if (!Array.isArray(values))
|
|
146
170
|
return [];
|
|
147
|
-
|
|
148
|
-
const { value: memoValOptMap } = memoValOptMapRef;
|
|
149
|
-
const { value: valOptMap } = valOptMapRef;
|
|
150
|
-
const { value: wrappedFallbackOption } = wrappedFallbackOptionRef;
|
|
151
|
-
const options = [];
|
|
152
|
-
values.forEach((value) => {
|
|
153
|
-
if (valOptMap.has(value)) {
|
|
154
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
155
|
-
options.push(valOptMap.get(value));
|
|
156
|
-
}
|
|
157
|
-
else if (remote && memoValOptMap.has(value)) {
|
|
158
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
159
|
-
options.push(memoValOptMap.get(value));
|
|
160
|
-
}
|
|
161
|
-
else if (wrappedFallbackOption) {
|
|
162
|
-
const option = wrappedFallbackOption(value);
|
|
163
|
-
if (option) {
|
|
164
|
-
options.push(option);
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
});
|
|
168
|
-
return options;
|
|
171
|
+
return getMergedOptions(values);
|
|
169
172
|
}
|
|
170
173
|
return null;
|
|
171
174
|
});
|
|
172
175
|
const selectedOptionRef = (0, vue_1.computed)(() => {
|
|
173
176
|
const { value: mergedValue } = mergedValueRef;
|
|
174
177
|
if (!props.multiple && !Array.isArray(mergedValue)) {
|
|
175
|
-
const { value: valOptMap } = valOptMapRef;
|
|
176
|
-
const { value: wrappedFallbackOption } = wrappedFallbackOptionRef;
|
|
177
178
|
if (mergedValue === null)
|
|
178
179
|
return null;
|
|
179
|
-
|
|
180
|
-
if (valOptMap.has(mergedValue)) {
|
|
181
|
-
selectedOption = valOptMap.get(mergedValue);
|
|
182
|
-
}
|
|
183
|
-
else if (props.remote) {
|
|
184
|
-
selectedOption = memoValOptMapRef.value.get(mergedValue);
|
|
185
|
-
}
|
|
186
|
-
return (selectedOption ||
|
|
187
|
-
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain
|
|
188
|
-
(wrappedFallbackOption && wrappedFallbackOption(mergedValue)) ||
|
|
189
|
-
null);
|
|
180
|
+
return getMergedOptions([mergedValue])[0] || null;
|
|
190
181
|
}
|
|
191
182
|
return null;
|
|
192
183
|
});
|
|
193
184
|
const formItem = (0, _mixins_1.useFormItem)(props);
|
|
194
185
|
const { mergedSizeRef, mergedDisabledRef } = formItem;
|
|
195
|
-
function doUpdateValue(value) {
|
|
186
|
+
function doUpdateValue(value, option) {
|
|
196
187
|
const { onChange, 'onUpdate:value': _onUpdateValue, onUpdateValue } = props;
|
|
197
188
|
const { nTriggerFormChange, nTriggerFormInput } = formItem;
|
|
198
189
|
if (onChange)
|
|
199
|
-
(0, _utils_1.call)(onChange, value);
|
|
190
|
+
(0, _utils_1.call)(onChange, value, option);
|
|
200
191
|
if (onUpdateValue)
|
|
201
|
-
(0, _utils_1.call)(onUpdateValue, value);
|
|
202
|
-
if (_onUpdateValue)
|
|
203
|
-
(0, _utils_1.call)(_onUpdateValue, value);
|
|
192
|
+
(0, _utils_1.call)(onUpdateValue, value, option);
|
|
193
|
+
if (_onUpdateValue) {
|
|
194
|
+
(0, _utils_1.call)(_onUpdateValue, value, option);
|
|
195
|
+
}
|
|
204
196
|
uncontrolledValueRef.value = value;
|
|
205
197
|
nTriggerFormChange();
|
|
206
198
|
nTriggerFormInput();
|
|
@@ -254,9 +246,18 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
254
246
|
}
|
|
255
247
|
}
|
|
256
248
|
// menu related methods
|
|
249
|
+
function doUpdateShow(value) {
|
|
250
|
+
const { onUpdateShow, 'onUpdate:show': _onUpdateShow } = props;
|
|
251
|
+
if (onUpdateShow)
|
|
252
|
+
(0, _utils_1.call)(onUpdateShow, value);
|
|
253
|
+
if (_onUpdateShow)
|
|
254
|
+
(0, _utils_1.call)(_onUpdateShow, value);
|
|
255
|
+
uncontrolledShowRef.value = value;
|
|
256
|
+
}
|
|
257
257
|
function openMenu() {
|
|
258
258
|
if (!mergedDisabledRef.value) {
|
|
259
259
|
patternRef.value = '';
|
|
260
|
+
doUpdateShow(true);
|
|
260
261
|
uncontrolledShowRef.value = true;
|
|
261
262
|
if (props.filterable) {
|
|
262
263
|
focusSelectionInput();
|
|
@@ -264,7 +265,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
264
265
|
}
|
|
265
266
|
}
|
|
266
267
|
function closeMenu() {
|
|
267
|
-
|
|
268
|
+
doUpdateShow(false);
|
|
268
269
|
}
|
|
269
270
|
function handleMenuLeave() {
|
|
270
271
|
patternRef.value = '';
|
|
@@ -377,8 +378,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
377
378
|
changedValue.push(option.value);
|
|
378
379
|
patternRef.value = '';
|
|
379
380
|
}
|
|
380
|
-
|
|
381
|
-
doUpdateValue(changedValue);
|
|
381
|
+
doUpdateValue(changedValue, getMergedOptions(changedValue));
|
|
382
382
|
}
|
|
383
383
|
else {
|
|
384
384
|
if (tag && !remote) {
|
|
@@ -394,7 +394,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
394
394
|
}
|
|
395
395
|
focusSelection();
|
|
396
396
|
closeMenu();
|
|
397
|
-
doUpdateValue(option.value);
|
|
397
|
+
doUpdateValue(option.value, option);
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
400
|
function getCreatedOptionIndex(optionValue) {
|
|
@@ -432,10 +432,10 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
432
432
|
}
|
|
433
433
|
doClear();
|
|
434
434
|
if (multiple) {
|
|
435
|
-
doUpdateValue([]);
|
|
435
|
+
doUpdateValue([], []);
|
|
436
436
|
}
|
|
437
437
|
else {
|
|
438
|
-
doUpdateValue(null);
|
|
438
|
+
doUpdateValue(null, null);
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
441
|
function handleMenuMousedown(e) {
|
|
@@ -449,7 +449,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
449
449
|
// keyboard events
|
|
450
450
|
// also for menu keyup
|
|
451
451
|
function handleKeyUp(e) {
|
|
452
|
-
var _a, _b, _c;
|
|
452
|
+
var _a, _b, _c, _d;
|
|
453
453
|
switch (e.code) {
|
|
454
454
|
case 'Space':
|
|
455
455
|
if (props.filterable)
|
|
@@ -458,12 +458,11 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
458
458
|
case 'Enter':
|
|
459
459
|
case 'NumpadEnter':
|
|
460
460
|
if (mergedShowRef.value) {
|
|
461
|
-
const
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
handleToggleByTmNode(pendingOptionData);
|
|
461
|
+
const pendingTmNode = (_a = menuRef.value) === null || _a === void 0 ? void 0 : _a.getPendingTmNode();
|
|
462
|
+
if (pendingTmNode) {
|
|
463
|
+
handleToggleByTmNode(pendingTmNode);
|
|
465
464
|
}
|
|
466
|
-
else {
|
|
465
|
+
else if (!props.filterable) {
|
|
467
466
|
closeMenu();
|
|
468
467
|
focusSelection();
|
|
469
468
|
}
|
|
@@ -477,14 +476,14 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
477
476
|
if (props.loading)
|
|
478
477
|
return;
|
|
479
478
|
if (mergedShowRef.value) {
|
|
480
|
-
(
|
|
479
|
+
(_b = menuRef.value) === null || _b === void 0 ? void 0 : _b.prev();
|
|
481
480
|
}
|
|
482
481
|
break;
|
|
483
482
|
case 'ArrowDown':
|
|
484
483
|
if (props.loading)
|
|
485
484
|
return;
|
|
486
485
|
if (mergedShowRef.value) {
|
|
487
|
-
(
|
|
486
|
+
(_c = menuRef.value) === null || _c === void 0 ? void 0 : _c.next();
|
|
488
487
|
}
|
|
489
488
|
else {
|
|
490
489
|
openMenu();
|
|
@@ -492,7 +491,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
492
491
|
break;
|
|
493
492
|
case 'Escape':
|
|
494
493
|
closeMenu();
|
|
495
|
-
(
|
|
494
|
+
(_d = triggerRef.value) === null || _d === void 0 ? void 0 : _d.focus();
|
|
496
495
|
break;
|
|
497
496
|
}
|
|
498
497
|
}
|
|
@@ -31,8 +31,8 @@ export interface SelectIgnoredOption {
|
|
|
31
31
|
}
|
|
32
32
|
export declare type ValueAtom = string | number;
|
|
33
33
|
export declare type Value = ValueAtom | string[] | number[] | ValueAtom[];
|
|
34
|
-
export declare type OnUpdateValue = (value: string & number & ValueAtom & string[] & number[] & ValueAtom[] & (ValueAtom | null) & (string[] | null) & (number[] | null) & (ValueAtom[] | null)) => void;
|
|
35
|
-
export declare type OnUpdateValueImpl = (value: ValueAtom | string[] | number[] | ValueAtom[] | (ValueAtom | null) | (string[] | null) | (number[] | null) | (ValueAtom[] | null)) => void;
|
|
34
|
+
export declare type OnUpdateValue = (value: string & number & ValueAtom & string[] & number[] & ValueAtom[] & (ValueAtom | null) & (string[] | null) & (number[] | null) & (ValueAtom[] | null), option: SelectBaseOption & null & SelectBaseOption[]) => void;
|
|
35
|
+
export declare type OnUpdateValueImpl = (value: ValueAtom | string[] | number[] | ValueAtom[] | (ValueAtom | null) | (string[] | null) | (number[] | null) | (ValueAtom[] | null), option: SelectBaseOption | null | SelectBaseOption[]) => void;
|
|
36
36
|
export declare type SelectTreeMate = TreeMate<SelectBaseOption, SelectGroupOption, SelectIgnoredOption>;
|
|
37
37
|
export declare type Size = 'small' | 'medium' | 'large';
|
|
38
38
|
export declare type SelectOption = SelectBaseOption<string | number>;
|
|
@@ -56,6 +56,7 @@ declare const selectLight: import("../../_mixins").Theme<"Select", {
|
|
|
56
56
|
fontSizeLarge: string;
|
|
57
57
|
paddingSingle: string;
|
|
58
58
|
clearSize: string;
|
|
59
|
+
arrowSize: string;
|
|
59
60
|
}, {
|
|
60
61
|
Popover: import("../../_mixins").Theme<"Popover", {
|
|
61
62
|
fontSize: string;
|
|
@@ -92,6 +93,7 @@ declare const selectLight: import("../../_mixins").Theme<"Select", {
|
|
|
92
93
|
optionOpacityDisabled: string;
|
|
93
94
|
optionCheckColor: string;
|
|
94
95
|
optionColorPending: string;
|
|
96
|
+
optionColorActive: string;
|
|
95
97
|
actionTextColor: string;
|
|
96
98
|
loadingColor: string;
|
|
97
99
|
height: string;
|
package/lib/spin/src/Spin.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
2
|
import { ExtractPublicPropTypes } from '../../_utils';
|
|
3
3
|
declare const spinProps: {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
default: undefined;
|
|
7
|
-
};
|
|
4
|
+
description: StringConstructor;
|
|
5
|
+
stroke: StringConstructor;
|
|
8
6
|
size: {
|
|
9
7
|
type: PropType<number | "small" | "medium" | "large">;
|
|
10
8
|
default: string;
|
|
@@ -13,20 +11,19 @@ declare const spinProps: {
|
|
|
13
11
|
type: BooleanConstructor;
|
|
14
12
|
default: boolean;
|
|
15
13
|
};
|
|
16
|
-
strokeWidth:
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
strokeWidth: NumberConstructor;
|
|
15
|
+
rotate: {
|
|
16
|
+
type: BooleanConstructor;
|
|
17
|
+
default: boolean;
|
|
19
18
|
};
|
|
20
19
|
spinning: {
|
|
21
20
|
type: BooleanConstructor;
|
|
22
21
|
validator: () => boolean;
|
|
23
22
|
default: undefined;
|
|
24
23
|
};
|
|
25
|
-
rotate: {
|
|
26
|
-
type: BooleanConstructor;
|
|
27
|
-
default: boolean;
|
|
28
|
-
};
|
|
29
24
|
theme: PropType<import("../../_mixins").Theme<"Spin", {
|
|
25
|
+
fontSize: string;
|
|
26
|
+
textColor: string;
|
|
30
27
|
sizeTiny: string;
|
|
31
28
|
sizeSmall: string;
|
|
32
29
|
sizeMedium: string;
|
|
@@ -36,6 +33,8 @@ declare const spinProps: {
|
|
|
36
33
|
opacitySpinning: string;
|
|
37
34
|
}, any>>;
|
|
38
35
|
themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Spin", {
|
|
36
|
+
fontSize: string;
|
|
37
|
+
textColor: string;
|
|
39
38
|
sizeTiny: string;
|
|
40
39
|
sizeSmall: string;
|
|
41
40
|
sizeMedium: string;
|
|
@@ -45,6 +44,8 @@ declare const spinProps: {
|
|
|
45
44
|
opacitySpinning: string;
|
|
46
45
|
}, any>>>;
|
|
47
46
|
builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Spin", {
|
|
47
|
+
fontSize: string;
|
|
48
|
+
textColor: string;
|
|
48
49
|
sizeTiny: string;
|
|
49
50
|
sizeSmall: string;
|
|
50
51
|
sizeMedium: string;
|
|
@@ -56,10 +57,8 @@ declare const spinProps: {
|
|
|
56
57
|
};
|
|
57
58
|
export declare type SpinProps = ExtractPublicPropTypes<typeof spinProps>;
|
|
58
59
|
declare const _default: import("vue").DefineComponent<{
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
default: undefined;
|
|
62
|
-
};
|
|
60
|
+
description: StringConstructor;
|
|
61
|
+
stroke: StringConstructor;
|
|
63
62
|
size: {
|
|
64
63
|
type: PropType<number | "small" | "medium" | "large">;
|
|
65
64
|
default: string;
|
|
@@ -68,20 +67,19 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
68
67
|
type: BooleanConstructor;
|
|
69
68
|
default: boolean;
|
|
70
69
|
};
|
|
71
|
-
strokeWidth:
|
|
72
|
-
|
|
73
|
-
|
|
70
|
+
strokeWidth: NumberConstructor;
|
|
71
|
+
rotate: {
|
|
72
|
+
type: BooleanConstructor;
|
|
73
|
+
default: boolean;
|
|
74
74
|
};
|
|
75
75
|
spinning: {
|
|
76
76
|
type: BooleanConstructor;
|
|
77
77
|
validator: () => boolean;
|
|
78
78
|
default: undefined;
|
|
79
79
|
};
|
|
80
|
-
rotate: {
|
|
81
|
-
type: BooleanConstructor;
|
|
82
|
-
default: boolean;
|
|
83
|
-
};
|
|
84
80
|
theme: PropType<import("../../_mixins").Theme<"Spin", {
|
|
81
|
+
fontSize: string;
|
|
82
|
+
textColor: string;
|
|
85
83
|
sizeTiny: string;
|
|
86
84
|
sizeSmall: string;
|
|
87
85
|
sizeMedium: string;
|
|
@@ -91,6 +89,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
91
89
|
opacitySpinning: string;
|
|
92
90
|
}, any>>;
|
|
93
91
|
themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Spin", {
|
|
92
|
+
fontSize: string;
|
|
93
|
+
textColor: string;
|
|
94
94
|
sizeTiny: string;
|
|
95
95
|
sizeSmall: string;
|
|
96
96
|
sizeMedium: string;
|
|
@@ -100,6 +100,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
100
100
|
opacitySpinning: string;
|
|
101
101
|
}, any>>>;
|
|
102
102
|
builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Spin", {
|
|
103
|
+
fontSize: string;
|
|
104
|
+
textColor: string;
|
|
103
105
|
sizeTiny: string;
|
|
104
106
|
sizeSmall: string;
|
|
105
107
|
sizeMedium: string;
|
|
@@ -117,14 +119,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
117
119
|
'--opacity-spinning': string;
|
|
118
120
|
'--size': string;
|
|
119
121
|
'--color': string;
|
|
122
|
+
'--text-color': string;
|
|
120
123
|
}>;
|
|
121
124
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
125
|
+
description?: unknown;
|
|
122
126
|
stroke?: unknown;
|
|
123
127
|
size?: unknown;
|
|
124
128
|
show?: unknown;
|
|
125
129
|
strokeWidth?: unknown;
|
|
126
|
-
spinning?: unknown;
|
|
127
130
|
rotate?: unknown;
|
|
131
|
+
spinning?: unknown;
|
|
128
132
|
theme?: unknown;
|
|
129
133
|
themeOverrides?: unknown;
|
|
130
134
|
builtinThemeOverrides?: unknown;
|
|
@@ -133,9 +137,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
133
137
|
show: boolean;
|
|
134
138
|
rotate: boolean;
|
|
135
139
|
} & {
|
|
140
|
+
description?: string | undefined;
|
|
136
141
|
stroke?: string | undefined;
|
|
137
142
|
strokeWidth?: number | undefined;
|
|
138
143
|
theme?: import("../../_mixins").Theme<"Spin", {
|
|
144
|
+
fontSize: string;
|
|
145
|
+
textColor: string;
|
|
139
146
|
sizeTiny: string;
|
|
140
147
|
sizeSmall: string;
|
|
141
148
|
sizeMedium: string;
|
|
@@ -145,6 +152,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
145
152
|
opacitySpinning: string;
|
|
146
153
|
}, any> | undefined;
|
|
147
154
|
themeOverrides?: import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Spin", {
|
|
155
|
+
fontSize: string;
|
|
156
|
+
textColor: string;
|
|
148
157
|
sizeTiny: string;
|
|
149
158
|
sizeSmall: string;
|
|
150
159
|
sizeMedium: string;
|
|
@@ -154,6 +163,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
154
163
|
opacitySpinning: string;
|
|
155
164
|
}, any>> | undefined;
|
|
156
165
|
builtinThemeOverrides?: import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Spin", {
|
|
166
|
+
fontSize: string;
|
|
167
|
+
textColor: string;
|
|
157
168
|
sizeTiny: string;
|
|
158
169
|
sizeSmall: string;
|
|
159
170
|
sizeMedium: string;
|
|
@@ -166,9 +177,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
166
177
|
}>, {
|
|
167
178
|
size: number | "small" | "medium" | "large";
|
|
168
179
|
show: boolean;
|
|
169
|
-
stroke: string;
|
|
170
180
|
rotate: boolean;
|
|
171
|
-
strokeWidth: number;
|
|
172
181
|
spinning: boolean;
|
|
173
182
|
}>;
|
|
174
183
|
export default _default;
|
package/lib/spin/src/Spin.js
CHANGED
|
@@ -13,33 +13,33 @@ const STROKE_WIDTH = {
|
|
|
13
13
|
medium: 18,
|
|
14
14
|
large: 16
|
|
15
15
|
};
|
|
16
|
-
const spinProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props), { stroke: {
|
|
17
|
-
type: String,
|
|
18
|
-
default: undefined
|
|
19
|
-
}, size: {
|
|
16
|
+
const spinProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props), { description: String, stroke: String, size: {
|
|
20
17
|
type: [String, Number],
|
|
21
18
|
default: 'medium'
|
|
22
19
|
}, show: {
|
|
23
20
|
type: Boolean,
|
|
24
21
|
default: true
|
|
25
|
-
}, strokeWidth: {
|
|
26
|
-
type:
|
|
27
|
-
default:
|
|
22
|
+
}, strokeWidth: Number, rotate: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: true
|
|
28
25
|
}, spinning: {
|
|
29
26
|
type: Boolean,
|
|
30
27
|
validator: () => {
|
|
31
|
-
(0, _utils_1.warn)('spin', '`spinning` is deprecated, please use `show` instead.');
|
|
32
28
|
return true;
|
|
33
29
|
},
|
|
34
30
|
default: undefined
|
|
35
|
-
}, rotate: {
|
|
36
|
-
type: Boolean,
|
|
37
|
-
default: true
|
|
38
31
|
} });
|
|
39
32
|
exports.default = (0, vue_1.defineComponent)({
|
|
40
33
|
name: 'Spin',
|
|
41
34
|
props: spinProps,
|
|
42
35
|
setup(props) {
|
|
36
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
37
|
+
(0, vue_1.watchEffect)(() => {
|
|
38
|
+
if (props.spinning !== undefined) {
|
|
39
|
+
(0, _utils_1.warnOnce)('spin', '`spinning` is deprecated, please use `show` instead.');
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
43
|
const { mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
|
|
44
44
|
const themeRef = (0, _mixins_1.useTheme)('Spin', 'Spin', index_cssr_1.default, styles_1.spinLight, props, mergedClsPrefixRef);
|
|
45
45
|
return {
|
|
@@ -55,7 +55,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
55
55
|
cssVars: (0, vue_1.computed)(() => {
|
|
56
56
|
const { size: spinSize } = props;
|
|
57
57
|
const { common: { cubicBezierEaseInOut }, self } = themeRef.value;
|
|
58
|
-
const { opacitySpinning, color } = self;
|
|
58
|
+
const { opacitySpinning, color, textColor } = self;
|
|
59
59
|
const size = typeof spinSize === 'number'
|
|
60
60
|
? (0, seemly_1.pxfy)(spinSize)
|
|
61
61
|
: self[(0, _utils_1.createKey)('size', spinSize)];
|
|
@@ -63,18 +63,25 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
63
63
|
'--bezier': cubicBezierEaseInOut,
|
|
64
64
|
'--opacity-spinning': opacitySpinning,
|
|
65
65
|
'--size': size,
|
|
66
|
-
'--color': color
|
|
66
|
+
'--color': color,
|
|
67
|
+
'--text-color': textColor
|
|
67
68
|
};
|
|
68
69
|
})
|
|
69
70
|
};
|
|
70
71
|
},
|
|
71
72
|
render() {
|
|
72
|
-
|
|
73
|
+
var _a;
|
|
74
|
+
const { $slots, mergedClsPrefix, description } = this;
|
|
73
75
|
const rotate = $slots.icon && this.rotate;
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
const descriptionNode = (description || $slots.description) && ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-spin-description` }, description || ((_a = $slots.description) === null || _a === void 0 ? void 0 : _a.call($slots))));
|
|
77
|
+
const icon = $slots.icon ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-spin-body` },
|
|
78
|
+
(0, vue_1.h)("div", { class: [
|
|
79
|
+
`${mergedClsPrefix}-spin`,
|
|
80
|
+
rotate && `${mergedClsPrefix}-spin--rotate`
|
|
81
|
+
], style: $slots.default ? '' : this.cssVars }, $slots.icon()),
|
|
82
|
+
descriptionNode)) : ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-spin-body` },
|
|
83
|
+
(0, vue_1.h)(_internal_1.NBaseLoading, { clsPrefix: mergedClsPrefix, style: $slots.default ? '' : this.cssVars, stroke: this.stroke, "stroke-width": this.mergedStrokeWidth, class: `${mergedClsPrefix}-spin` }),
|
|
84
|
+
descriptionNode));
|
|
78
85
|
return $slots.default ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-spin-container`, style: this.cssVars },
|
|
79
86
|
(0, vue_1.h)("div", { class: [
|
|
80
87
|
`${mergedClsPrefix}-spin-content`,
|
|
@@ -11,6 +11,8 @@ const fade_in_cssr_1 = require("../../../_styles/transitions/fade-in.cssr"); //
|
|
|
11
11
|
// --opacity-spinning
|
|
12
12
|
// --size
|
|
13
13
|
// --color
|
|
14
|
+
// --text-color
|
|
15
|
+
// --font-size
|
|
14
16
|
|
|
15
17
|
|
|
16
18
|
exports.default = (0, cssr_1.c)([(0, cssr_1.c)('@keyframes spin-rotate', `
|
|
@@ -22,19 +24,17 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.c)('@keyframes spin-rotate', `
|
|
|
22
24
|
}
|
|
23
25
|
`), (0, cssr_1.cB)('spin-container', {
|
|
24
26
|
position: 'relative'
|
|
25
|
-
}, [(0, cssr_1.cB)('spin', `
|
|
27
|
+
}, [(0, cssr_1.cB)('spin-body', `
|
|
26
28
|
position: absolute;
|
|
27
29
|
top: 50%;
|
|
28
30
|
left: 50%;
|
|
29
31
|
transform: translateX(-50%) translateY(-50%);
|
|
30
|
-
`, [(0, fade_in_cssr_1.default)()]), (0, cssr_1.cB)('spin-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
opacity: 'var(--opacity-spinning)'
|
|
37
|
-
})])]), (0, cssr_1.cB)('spin', `
|
|
32
|
+
`, [(0, fade_in_cssr_1.default)()])]), (0, cssr_1.cB)('spin-body', `
|
|
33
|
+
display: inline-flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
justify-content: center;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
`), (0, cssr_1.cB)('spin', `
|
|
38
38
|
display: inline-flex;
|
|
39
39
|
height: var(--size);
|
|
40
40
|
width: var(--size);
|
|
@@ -42,4 +42,18 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.c)('@keyframes spin-rotate', `
|
|
|
42
42
|
color: var(--color);
|
|
43
43
|
`, [(0, cssr_1.cM)('rotate', `
|
|
44
44
|
animation: spin-rotate 2s linear infinite;
|
|
45
|
+
`)]), (0, cssr_1.cB)('spin-description', `
|
|
46
|
+
display: inline-block;
|
|
47
|
+
font-size: var(--font-size);
|
|
48
|
+
color: var(--text-color);
|
|
49
|
+
transition: color .3s var(--bezier);
|
|
50
|
+
margin-top: 8px;
|
|
51
|
+
`), (0, cssr_1.cB)('spin-content', `
|
|
52
|
+
opacity: 1;
|
|
53
|
+
transition: opacity .3s var(--bezier);
|
|
54
|
+
pointer-events: all;
|
|
55
|
+
`, [(0, cssr_1.cM)('spinning', `
|
|
56
|
+
user-select: none;
|
|
57
|
+
pointer-events: none;
|
|
58
|
+
opacity: var(--opacity-spinning);
|
|
45
59
|
`)])]);
|
package/lib/spin/styles/light.js
CHANGED
|
@@ -3,8 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.self = void 0;
|
|
4
4
|
const common_1 = require("../../_styles/common");
|
|
5
5
|
const self = (vars) => {
|
|
6
|
-
const { opacityDisabled, heightTiny, heightSmall, heightMedium, heightLarge, heightHuge, primaryColor } = vars;
|
|
6
|
+
const { opacityDisabled, heightTiny, heightSmall, heightMedium, heightLarge, heightHuge, primaryColor, fontSize } = vars;
|
|
7
7
|
return {
|
|
8
|
+
fontSize,
|
|
9
|
+
textColor: primaryColor,
|
|
8
10
|
sizeTiny: heightTiny,
|
|
9
11
|
sizeSmall: heightSmall,
|
|
10
12
|
sizeMedium: heightMedium,
|
package/lib/steps/src/Steps.js
CHANGED
|
@@ -47,6 +47,6 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
47
47
|
return ((0, vue_1.h)("div", { class: [
|
|
48
48
|
`${mergedClsPrefix}-steps`,
|
|
49
49
|
this.vertical && `${mergedClsPrefix}-steps--vertical`
|
|
50
|
-
] }, stepsWithIndex((0, _utils_1.getSlot)(this))));
|
|
50
|
+
] }, stepsWithIndex((0, _utils_1.flatten)((0, _utils_1.getSlot)(this)))));
|
|
51
51
|
}
|
|
52
52
|
});
|
package/lib/styles.d.ts
CHANGED
|
@@ -38,6 +38,7 @@ export { messageDark } from './message/styles';
|
|
|
38
38
|
export { modalDark } from './modal/styles';
|
|
39
39
|
export { notificationDark } from './notification/styles';
|
|
40
40
|
export { paginationDark } from './pagination/styles';
|
|
41
|
+
export { pageHeaderRtl as unstablePageHeaderRtl } from './page-header/styles';
|
|
41
42
|
export { popconfirmDark } from './popconfirm/styles';
|
|
42
43
|
export { popoverDark } from './popover/styles';
|
|
43
44
|
export { popselectDark } from './popselect/styles';
|