naive-ui 2.20.3 → 2.21.3
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/scrollbar/src/ScrollBar.d.ts +1 -0
- package/es/_internal/scrollbar/src/ScrollBar.js +9 -4
- package/es/_internal/select-menu/src/SelectMenu.d.ts +4 -0
- package/es/_internal/selection/src/Selection.d.ts +4 -0
- package/es/_internal/suffix/src/Suffix.d.ts +4 -1
- package/es/_internal/suffix/src/Suffix.js +4 -1
- package/es/_styles/common/dark.js +2 -1
- package/es/_styles/common/light.d.ts +4 -0
- package/es/_styles/common/light.js +5 -2
- package/es/_styles/global/index.cssr.js +9 -4
- package/es/_styles/transitions/icon-switch.cssr.js +6 -2
- package/es/_utils/naive/extract-public-props.d.ts +1 -1
- package/es/alert/src/Alert.d.ts +4 -0
- package/es/auto-complete/src/AutoComplete.d.ts +9 -1
- package/es/auto-complete/src/AutoComplete.js +5 -2
- package/es/avatar/src/Avatar.d.ts +8 -1
- package/es/avatar/src/Avatar.js +41 -9
- package/es/avatar/src/styles/index.cssr.js +2 -2
- package/es/button/src/Button.d.ts +149 -52
- package/es/button/src/Button.js +128 -56
- package/es/button/src/interface.d.ts +1 -1
- package/es/button/styles/dark.js +3 -0
- package/es/button/styles/light.d.ts +14 -5
- package/es/button/styles/light.js +10 -3
- package/es/calendar/src/Calendar.d.ts +144 -50
- package/es/calendar/styles/light.d.ts +14 -5
- package/es/card/src/Card.d.ts +4 -0
- package/es/cascader/src/Cascader.d.ts +4 -0
- package/es/cascader/src/CascaderOption.d.ts +4 -0
- package/es/cascader/src/CascaderSelectMenu.d.ts +4 -0
- package/es/cascader/src/CascaderSubmenu.d.ts +4 -0
- package/es/checkbox/src/Checkbox.d.ts +9 -5
- package/es/checkbox/src/Checkbox.js +3 -3
- package/es/collapse/src/Collapse.d.ts +4 -0
- package/es/color-picker/src/ColorInputUnit.d.ts +18 -5
- package/es/color-picker/src/ColorPicker.d.ts +126 -45
- package/es/color-picker/styles/light.d.ts +14 -5
- package/es/data-table/src/DataTable.d.ts +184 -51
- package/es/data-table/src/DataTable.js +11 -6
- package/es/data-table/src/HeaderButton/FilterButton.d.ts +21 -5
- package/es/data-table/src/HeaderButton/FilterMenu.d.ts +22 -6
- package/es/data-table/src/TableParts/Body.d.ts +26 -6
- package/es/data-table/src/TableParts/Body.js +77 -39
- package/es/data-table/src/TableParts/BodyCheckbox.js +1 -1
- package/es/data-table/src/TableParts/Cell.d.ts +42 -10
- package/es/data-table/src/TableParts/Header.d.ts +21 -5
- package/es/data-table/src/TableParts/Header.js +1 -1
- package/es/data-table/src/interface.d.ts +4 -1
- package/es/data-table/src/styles/index.cssr.js +14 -19
- package/es/data-table/src/use-table-data.js +3 -3
- package/es/data-table/styles/light.d.ts +20 -5
- package/es/data-table/styles/light.js +4 -4
- package/es/date-picker/src/DatePicker.d.ts +299 -105
- package/es/date-picker/src/panel/date.d.ts +47 -16
- package/es/date-picker/src/panel/daterange.d.ts +48 -17
- package/es/date-picker/src/panel/datetime.d.ts +47 -16
- package/es/date-picker/src/panel/datetimerange.d.ts +48 -17
- package/es/date-picker/src/panel/month.d.ts +47 -16
- package/es/date-picker/src/panel/use-calendar.d.ts +47 -16
- package/es/date-picker/src/panel/use-calendar.js +2 -0
- package/es/date-picker/src/panel/use-dual-calendar.d.ts +48 -17
- package/es/date-picker/src/panel/use-dual-calendar.js +4 -0
- package/es/date-picker/src/panel/use-panel-common.d.ts +46 -15
- package/es/date-picker/styles/light.d.ts +28 -10
- package/es/dialog/src/Dialog.d.ts +102 -35
- package/es/dialog/src/styles/index.cssr.js +1 -0
- package/es/dialog/styles/light.d.ts +14 -5
- package/es/drawer/src/Drawer.d.ts +4 -0
- package/es/drawer/src/DrawerBodyWrapper.d.ts +4 -0
- package/es/drawer/src/DrawerContent.d.ts +4 -0
- package/es/dropdown/index.d.ts +1 -1
- package/es/dropdown/src/Dropdown.d.ts +11 -7
- package/es/dropdown/src/DropdownGroup.d.ts +2 -3
- package/es/dropdown/src/DropdownGroupHeader.js +3 -3
- package/es/dropdown/src/DropdownMenu.d.ts +3 -4
- package/es/dropdown/src/DropdownMenu.js +5 -4
- package/es/dropdown/src/DropdownOption.d.ts +3 -4
- package/es/dropdown/src/DropdownOption.js +5 -4
- package/es/dropdown/src/DropdownRenderOption.d.ts +2 -3
- package/es/dropdown/src/interface.d.ts +9 -30
- package/es/dynamic-input/src/DynamicInput.d.ts +144 -50
- package/es/dynamic-input/src/InputPreset.d.ts +18 -5
- package/es/dynamic-input/src/PairPreset.d.ts +18 -5
- package/es/dynamic-input/styles/light.d.ts +14 -5
- package/es/dynamic-tags/src/DynamicTags.d.ts +145 -50
- package/es/dynamic-tags/styles/light.d.ts +14 -5
- package/es/ellipsis/src/Ellipsis.d.ts +4 -0
- package/es/global-style/src/GlobalStyle.js +2 -0
- package/es/image/src/Image.d.ts +25 -16
- package/es/image/src/Image.js +33 -5
- package/es/image/src/ImageGroup.js +2 -2
- package/es/image/src/ImagePreview.d.ts +1 -0
- package/es/image/src/ImagePreview.js +51 -4
- package/es/image/src/interface.d.ts +6 -0
- package/es/image/src/interface.js +1 -0
- package/es/image/src/styles/index.cssr.js +4 -3
- package/es/input/src/Input.d.ts +5 -0
- package/es/input/src/Input.js +6 -0
- package/es/input/src/interface.d.ts +1 -0
- package/es/input/src/styles/input.cssr.js +2 -1
- package/es/input-number/src/InputNumber.d.ts +179 -50
- package/es/input-number/src/InputNumber.js +26 -7
- package/es/input-number/src/utils.d.ts +1 -0
- package/es/input-number/src/utils.js +4 -0
- package/es/input-number/styles/light.d.ts +14 -5
- package/es/layout/src/Layout.d.ts +8 -0
- package/es/layout/src/LayoutContent.d.ts +4 -0
- package/es/layout/src/LayoutSider.d.ts +4 -0
- package/es/log/src/Log.d.ts +10 -25
- package/es/log/src/Log.js +2 -11
- package/es/log/src/LogLine.d.ts +1 -0
- package/es/log/src/LogLine.js +12 -10
- package/es/mention/src/Mention.d.ts +5 -0
- package/es/menu/index.d.ts +1 -1
- package/es/menu/src/Menu.d.ts +20 -6
- package/es/menu/src/Menu.js +2 -1
- package/es/menu/src/MenuDivider.d.ts +2 -0
- package/es/menu/src/MenuDivider.js +11 -0
- package/es/menu/src/MenuOption.d.ts +9 -1
- package/es/menu/src/MenuOptionContent.d.ts +4 -1
- package/es/menu/src/Submenu.d.ts +18 -16
- package/es/menu/src/interface.d.ts +23 -4
- package/es/menu/src/styles/index.cssr.js +6 -1
- package/es/menu/src/utils.d.ts +4 -2
- package/es/menu/src/utils.js +16 -2
- package/es/menu/styles/light.d.ts +2 -0
- package/es/menu/styles/light.js +3 -2
- package/es/modal/src/BodyWrapper.d.ts +32 -10
- package/es/modal/src/Modal.d.ts +169 -61
- package/es/modal/styles/light.d.ts +14 -5
- package/es/notification/src/NotificationContainer.d.ts +11 -0
- package/es/notification/src/NotificationContainer.js +7 -2
- package/es/notification/src/NotificationProvider.d.ts +17 -0
- package/es/notification/src/NotificationProvider.js +38 -3
- package/es/notification/src/styles/index.cssr.d.ts +2 -1
- package/es/notification/src/styles/index.cssr.js +41 -12
- package/es/pagination/src/Pagination.d.ts +5 -0
- package/es/popconfirm/src/Popconfirm.d.ts +149 -55
- package/es/popconfirm/styles/light.d.ts +14 -5
- package/es/popover/src/Popover.d.ts +6 -6
- package/es/popover/src/Popover.js +2 -5
- package/es/popover/src/PopoverBody.d.ts +5 -5
- package/es/popover/src/PopoverBody.js +2 -1
- package/es/popover/src/styles/index.cssr.js +0 -1
- package/es/popselect/src/Popselect.d.ts +9 -5
- package/es/popselect/src/PopselectPanel.d.ts +4 -0
- package/es/radio/src/Radio.d.ts +3 -0
- package/es/radio/src/RadioButton.d.ts +3 -0
- package/es/radio/src/use-radio.d.ts +2 -0
- package/es/radio/src/use-radio.js +6 -3
- package/es/select/src/Select.d.ts +4 -0
- package/es/slider/src/Slider.d.ts +71 -91
- package/es/slider/src/Slider.js +342 -583
- package/es/slider/src/interface.d.ts +1 -1
- package/es/slider/src/styles/index.cssr.js +86 -16
- package/es/slider/src/utils.d.ts +10 -1
- package/es/slider/src/utils.js +9 -0
- package/es/slider/styles/_common.d.ts +1 -0
- package/es/slider/styles/_common.js +1 -0
- package/es/slider/styles/light.d.ts +1 -0
- package/es/space/src/Space.js +2 -0
- package/es/steps/src/Step.js +1 -1
- package/es/switch/src/Switch.d.ts +16 -1
- package/es/switch/src/Switch.js +17 -4
- package/es/switch/src/styles/index.cssr.js +1 -1
- package/es/table/src/Table.d.ts +35 -0
- package/es/table/src/Table.js +8 -4
- package/es/table/src/styles/index.cssr.js +1 -1
- package/es/table/styles/light.d.ts +3 -0
- package/es/table/styles/light.js +2 -2
- package/es/tabs/index.d.ts +2 -0
- package/es/tabs/index.js +1 -0
- package/es/tabs/src/Tab.d.ts +35 -18
- package/es/tabs/src/Tab.js +11 -12
- package/es/tabs/src/Tabs.js +58 -18
- package/es/tag/src/Tag.d.ts +8 -3
- package/es/tag/src/Tag.js +10 -2
- package/es/tag/src/styles/index.cssr.js +10 -5
- package/es/tag/src/styles/rtl.cssr.js +7 -1
- package/es/theme-editor/src/ThemeEditor.d.ts +4 -0
- package/es/theme-editor/src/ThemeEditor.js +9 -2
- package/es/time-picker/src/Panel.d.ts +18 -5
- package/es/time-picker/src/TimePicker.d.ts +145 -50
- package/es/time-picker/styles/light.d.ts +14 -5
- package/es/tooltip/src/Tooltip.d.ts +9 -5
- package/es/transfer/src/Transfer.d.ts +144 -50
- package/es/transfer/src/TransferFilter.d.ts +18 -5
- package/es/transfer/src/TransferList.d.ts +18 -5
- package/es/transfer/src/TransferListItem.d.ts +18 -5
- package/es/transfer/styles/light.d.ts +14 -5
- package/es/tree/src/Tree.d.ts +12 -4
- package/es/tree/src/Tree.js +32 -6
- package/es/tree/src/TreeNodeCheckbox.d.ts +4 -0
- package/es/tree-select/src/TreeSelect.d.ts +4 -0
- package/es/upload/index.d.ts +1 -2
- package/es/upload/src/Upload.d.ts +151 -59
- package/es/upload/src/Upload.js +69 -16
- package/es/upload/src/UploadFile.d.ts +18 -5
- package/es/upload/src/UploadProgress.d.ts +18 -5
- package/es/upload/src/interface.d.ts +14 -1
- package/es/upload/styles/light.d.ts +14 -5
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/_internal/scrollbar/src/ScrollBar.d.ts +1 -0
- package/lib/_internal/scrollbar/src/ScrollBar.js +9 -4
- package/lib/_internal/select-menu/src/SelectMenu.d.ts +4 -0
- package/lib/_internal/selection/src/Selection.d.ts +4 -0
- package/lib/_internal/suffix/src/Suffix.d.ts +4 -1
- package/lib/_internal/suffix/src/Suffix.js +4 -1
- package/lib/_styles/common/dark.js +2 -1
- package/lib/_styles/common/light.d.ts +4 -0
- package/lib/_styles/common/light.js +5 -2
- package/lib/_styles/global/index.cssr.js +10 -5
- package/lib/_styles/transitions/icon-switch.cssr.js +7 -2
- package/lib/_utils/naive/extract-public-props.d.ts +1 -1
- package/lib/alert/src/Alert.d.ts +4 -0
- package/lib/auto-complete/src/AutoComplete.d.ts +9 -1
- package/lib/auto-complete/src/AutoComplete.js +5 -2
- package/lib/avatar/src/Avatar.d.ts +8 -1
- package/lib/avatar/src/Avatar.js +40 -8
- package/lib/avatar/src/styles/index.cssr.js +2 -2
- package/lib/button/src/Button.d.ts +149 -52
- package/lib/button/src/Button.js +126 -54
- package/lib/button/src/interface.d.ts +1 -1
- package/lib/button/styles/dark.js +3 -0
- package/lib/button/styles/light.d.ts +14 -5
- package/lib/button/styles/light.js +10 -3
- package/lib/calendar/src/Calendar.d.ts +144 -50
- package/lib/calendar/styles/light.d.ts +14 -5
- package/lib/card/src/Card.d.ts +4 -0
- package/lib/cascader/src/Cascader.d.ts +4 -0
- package/lib/cascader/src/CascaderOption.d.ts +4 -0
- package/lib/cascader/src/CascaderSelectMenu.d.ts +4 -0
- package/lib/cascader/src/CascaderSubmenu.d.ts +4 -0
- package/lib/checkbox/src/Checkbox.d.ts +9 -5
- package/lib/checkbox/src/Checkbox.js +3 -3
- package/lib/collapse/src/Collapse.d.ts +4 -0
- package/lib/color-picker/src/ColorInputUnit.d.ts +18 -5
- package/lib/color-picker/src/ColorPicker.d.ts +126 -45
- package/lib/color-picker/styles/light.d.ts +14 -5
- package/lib/data-table/src/DataTable.d.ts +184 -51
- package/lib/data-table/src/DataTable.js +11 -6
- package/lib/data-table/src/HeaderButton/FilterButton.d.ts +21 -5
- package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +22 -6
- package/lib/data-table/src/TableParts/Body.d.ts +26 -6
- package/lib/data-table/src/TableParts/Body.js +77 -39
- package/lib/data-table/src/TableParts/BodyCheckbox.js +1 -1
- package/lib/data-table/src/TableParts/Cell.d.ts +42 -10
- package/lib/data-table/src/TableParts/Header.d.ts +21 -5
- package/lib/data-table/src/TableParts/Header.js +1 -1
- package/lib/data-table/src/interface.d.ts +4 -1
- package/lib/data-table/src/styles/index.cssr.js +14 -19
- package/lib/data-table/src/use-table-data.js +3 -3
- package/lib/data-table/styles/light.d.ts +20 -5
- package/lib/data-table/styles/light.js +4 -4
- package/lib/date-picker/src/DatePicker.d.ts +299 -105
- package/lib/date-picker/src/panel/date.d.ts +47 -16
- package/lib/date-picker/src/panel/daterange.d.ts +48 -17
- package/lib/date-picker/src/panel/datetime.d.ts +47 -16
- package/lib/date-picker/src/panel/datetimerange.d.ts +48 -17
- package/lib/date-picker/src/panel/month.d.ts +47 -16
- package/lib/date-picker/src/panel/use-calendar.d.ts +47 -16
- package/lib/date-picker/src/panel/use-calendar.js +2 -0
- package/lib/date-picker/src/panel/use-dual-calendar.d.ts +48 -17
- package/lib/date-picker/src/panel/use-dual-calendar.js +4 -0
- package/lib/date-picker/src/panel/use-panel-common.d.ts +46 -15
- package/lib/date-picker/styles/light.d.ts +28 -10
- package/lib/dialog/src/Dialog.d.ts +102 -35
- package/lib/dialog/src/styles/index.cssr.js +1 -0
- package/lib/dialog/styles/light.d.ts +14 -5
- package/lib/drawer/src/Drawer.d.ts +4 -0
- package/lib/drawer/src/DrawerBodyWrapper.d.ts +4 -0
- package/lib/drawer/src/DrawerContent.d.ts +4 -0
- package/lib/dropdown/index.d.ts +1 -1
- package/lib/dropdown/src/Dropdown.d.ts +11 -7
- package/lib/dropdown/src/DropdownGroup.d.ts +2 -3
- package/lib/dropdown/src/DropdownGroupHeader.js +3 -3
- package/lib/dropdown/src/DropdownMenu.d.ts +3 -4
- package/lib/dropdown/src/DropdownMenu.js +5 -4
- package/lib/dropdown/src/DropdownOption.d.ts +3 -4
- package/lib/dropdown/src/DropdownOption.js +5 -4
- package/lib/dropdown/src/DropdownRenderOption.d.ts +2 -3
- package/lib/dropdown/src/interface.d.ts +9 -30
- package/lib/dynamic-input/src/DynamicInput.d.ts +144 -50
- package/lib/dynamic-input/src/InputPreset.d.ts +18 -5
- package/lib/dynamic-input/src/PairPreset.d.ts +18 -5
- package/lib/dynamic-input/styles/light.d.ts +14 -5
- package/lib/dynamic-tags/src/DynamicTags.d.ts +145 -50
- package/lib/dynamic-tags/styles/light.d.ts +14 -5
- package/lib/ellipsis/src/Ellipsis.d.ts +4 -0
- package/lib/global-style/src/GlobalStyle.js +2 -0
- package/lib/image/src/Image.d.ts +25 -16
- package/lib/image/src/Image.js +32 -4
- package/lib/image/src/ImageGroup.js +2 -2
- package/lib/image/src/ImagePreview.d.ts +1 -0
- package/lib/image/src/ImagePreview.js +51 -4
- package/lib/image/src/interface.d.ts +6 -0
- package/lib/image/src/interface.js +2 -0
- package/lib/image/src/styles/index.cssr.js +3 -2
- package/lib/input/src/Input.d.ts +5 -0
- package/lib/input/src/Input.js +6 -0
- package/lib/input/src/interface.d.ts +1 -0
- package/lib/input/src/styles/input.cssr.js +2 -1
- package/lib/input-number/src/InputNumber.d.ts +179 -50
- package/lib/input-number/src/InputNumber.js +25 -6
- package/lib/input-number/src/utils.d.ts +1 -0
- package/lib/input-number/src/utils.js +6 -1
- package/lib/input-number/styles/light.d.ts +14 -5
- package/lib/layout/src/Layout.d.ts +8 -0
- package/lib/layout/src/LayoutContent.d.ts +4 -0
- package/lib/layout/src/LayoutSider.d.ts +4 -0
- package/lib/log/src/Log.d.ts +10 -25
- package/lib/log/src/Log.js +2 -11
- package/lib/log/src/LogLine.d.ts +1 -0
- package/lib/log/src/LogLine.js +11 -9
- package/lib/mention/src/Mention.d.ts +5 -0
- package/lib/menu/index.d.ts +1 -1
- package/lib/menu/src/Menu.d.ts +20 -6
- package/lib/menu/src/Menu.js +2 -1
- package/lib/menu/src/MenuDivider.d.ts +2 -0
- package/lib/menu/src/MenuDivider.js +13 -0
- package/lib/menu/src/MenuOption.d.ts +9 -1
- package/lib/menu/src/MenuOptionContent.d.ts +4 -1
- package/lib/menu/src/Submenu.d.ts +18 -16
- package/lib/menu/src/interface.d.ts +23 -4
- package/lib/menu/src/styles/index.cssr.js +6 -1
- package/lib/menu/src/utils.d.ts +4 -2
- package/lib/menu/src/utils.js +22 -3
- package/lib/menu/styles/light.d.ts +2 -0
- package/lib/menu/styles/light.js +3 -2
- package/lib/modal/src/BodyWrapper.d.ts +32 -10
- package/lib/modal/src/Modal.d.ts +169 -61
- package/lib/modal/styles/light.d.ts +14 -5
- package/lib/notification/src/NotificationContainer.d.ts +11 -0
- package/lib/notification/src/NotificationContainer.js +7 -2
- package/lib/notification/src/NotificationProvider.d.ts +17 -0
- package/lib/notification/src/NotificationProvider.js +38 -3
- package/lib/notification/src/styles/index.cssr.d.ts +2 -1
- package/lib/notification/src/styles/index.cssr.js +41 -12
- package/lib/pagination/src/Pagination.d.ts +5 -0
- package/lib/popconfirm/src/Popconfirm.d.ts +149 -55
- package/lib/popconfirm/styles/light.d.ts +14 -5
- package/lib/popover/src/Popover.d.ts +6 -6
- package/lib/popover/src/Popover.js +2 -5
- package/lib/popover/src/PopoverBody.d.ts +5 -5
- package/lib/popover/src/PopoverBody.js +2 -1
- package/lib/popover/src/styles/index.cssr.js +0 -1
- package/lib/popselect/src/Popselect.d.ts +9 -5
- package/lib/popselect/src/PopselectPanel.d.ts +4 -0
- package/lib/radio/src/Radio.d.ts +3 -0
- package/lib/radio/src/RadioButton.d.ts +3 -0
- package/lib/radio/src/use-radio.d.ts +2 -0
- package/lib/radio/src/use-radio.js +6 -3
- package/lib/select/src/Select.d.ts +4 -0
- package/lib/slider/src/Slider.d.ts +71 -91
- package/lib/slider/src/Slider.js +340 -581
- package/lib/slider/src/interface.d.ts +1 -1
- package/lib/slider/src/styles/index.cssr.js +86 -16
- package/lib/slider/src/utils.d.ts +10 -1
- package/lib/slider/src/utils.js +11 -1
- package/lib/slider/styles/_common.d.ts +1 -0
- package/lib/slider/styles/_common.js +1 -0
- package/lib/slider/styles/light.d.ts +1 -0
- package/lib/space/src/Space.js +2 -0
- package/lib/steps/src/Step.js +1 -1
- package/lib/switch/src/Switch.d.ts +16 -1
- package/lib/switch/src/Switch.js +17 -4
- package/lib/switch/src/styles/index.cssr.js +1 -1
- package/lib/table/src/Table.d.ts +35 -0
- package/lib/table/src/Table.js +8 -4
- package/lib/table/src/styles/index.cssr.js +1 -1
- package/lib/table/styles/light.d.ts +3 -0
- package/lib/table/styles/light.js +2 -2
- package/lib/tabs/index.d.ts +2 -0
- package/lib/tabs/index.js +3 -1
- package/lib/tabs/src/Tab.d.ts +35 -18
- package/lib/tabs/src/Tab.js +10 -11
- package/lib/tabs/src/Tabs.js +57 -17
- package/lib/tag/src/Tag.d.ts +8 -3
- package/lib/tag/src/Tag.js +10 -1
- package/lib/tag/src/styles/index.cssr.js +10 -5
- package/lib/tag/src/styles/rtl.cssr.js +7 -1
- package/lib/theme-editor/src/ThemeEditor.d.ts +4 -0
- package/lib/theme-editor/src/ThemeEditor.js +9 -2
- package/lib/time-picker/src/Panel.d.ts +18 -5
- package/lib/time-picker/src/TimePicker.d.ts +145 -50
- package/lib/time-picker/styles/light.d.ts +14 -5
- package/lib/tooltip/src/Tooltip.d.ts +9 -5
- package/lib/transfer/src/Transfer.d.ts +144 -50
- package/lib/transfer/src/TransferFilter.d.ts +18 -5
- package/lib/transfer/src/TransferList.d.ts +18 -5
- package/lib/transfer/src/TransferListItem.d.ts +18 -5
- package/lib/transfer/styles/light.d.ts +14 -5
- package/lib/tree/src/Tree.d.ts +12 -4
- package/lib/tree/src/Tree.js +32 -6
- package/lib/tree/src/TreeNodeCheckbox.d.ts +4 -0
- package/lib/tree-select/src/TreeSelect.d.ts +4 -0
- package/lib/upload/index.d.ts +1 -2
- package/lib/upload/src/Upload.d.ts +151 -59
- package/lib/upload/src/Upload.js +69 -16
- package/lib/upload/src/UploadFile.d.ts +18 -5
- package/lib/upload/src/UploadProgress.d.ts +18 -5
- package/lib/upload/src/interface.d.ts +14 -1
- package/lib/upload/styles/light.d.ts +14 -5
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +8 -7
- package/web-types.json +245 -14
|
@@ -80,9 +80,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
80
80
|
tableHeaderColor: string;
|
|
81
81
|
hoverColor: string;
|
|
82
82
|
tableColorHover: string;
|
|
83
|
+
tableColorStriped: string;
|
|
83
84
|
pressedColor: string;
|
|
84
85
|
opacityDisabled: string;
|
|
85
86
|
inputColorDisabled: string;
|
|
87
|
+
buttonColor2: string;
|
|
88
|
+
buttonColor2Hover: string;
|
|
89
|
+
buttonColor2Pressed: string;
|
|
86
90
|
boxShadow1: string;
|
|
87
91
|
boxShadow2: string;
|
|
88
92
|
boxShadow3: string;
|
|
@@ -142,20 +146,30 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
142
146
|
fontSizeMedium: string;
|
|
143
147
|
fontSizeLarge: string;
|
|
144
148
|
opacityDisabled: string;
|
|
149
|
+
colorOpacitySecondary: string;
|
|
150
|
+
colorOpacitySecondaryHover: string;
|
|
151
|
+
colorOpacitySecondaryPressed: string;
|
|
152
|
+
colorSecondary: string;
|
|
153
|
+
colorSecondaryHover: string;
|
|
154
|
+
colorSecondaryPressed: string;
|
|
155
|
+
colorTertiary: string;
|
|
156
|
+
colorTertiaryHover: string;
|
|
157
|
+
colorTertiaryPressed: string;
|
|
158
|
+
colorQuaternary: string;
|
|
159
|
+
colorQuaternaryHover: string;
|
|
160
|
+
colorQuaternaryPressed: string;
|
|
145
161
|
color: string;
|
|
146
162
|
colorHover: string;
|
|
147
163
|
colorPressed: string;
|
|
148
164
|
colorFocus: string;
|
|
149
165
|
colorDisabled: string;
|
|
150
166
|
textColor: string;
|
|
167
|
+
textColorTertiary: string;
|
|
151
168
|
textColorHover: string;
|
|
152
169
|
textColorPressed: string;
|
|
153
170
|
textColorFocus: string;
|
|
154
171
|
textColorDisabled: string;
|
|
155
172
|
textColorText: string;
|
|
156
|
-
textColorTextDepth1: string;
|
|
157
|
-
textColorTextDepth2: string;
|
|
158
|
-
textColorTextDepth3: string;
|
|
159
173
|
textColorTextHover: string;
|
|
160
174
|
textColorTextPressed: string;
|
|
161
175
|
textColorTextFocus: string;
|
|
@@ -302,9 +316,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
302
316
|
borderDisabledError: string;
|
|
303
317
|
rippleColorError: string;
|
|
304
318
|
waveOpacity: string;
|
|
305
|
-
fontWeightText: string;
|
|
306
319
|
fontWeight: string;
|
|
307
|
-
|
|
320
|
+
fontWeightStrong: string;
|
|
308
321
|
paddingTiny: string;
|
|
309
322
|
paddingSmall: string;
|
|
310
323
|
paddingMedium: string;
|
|
@@ -21,7 +21,7 @@ export declare type OnChange = (data: {
|
|
|
21
21
|
}) => void;
|
|
22
22
|
export declare type OnFinish = ({ file, event }: {
|
|
23
23
|
file: FileInfo;
|
|
24
|
-
event
|
|
24
|
+
event?: Event;
|
|
25
25
|
}) => FileInfo | undefined;
|
|
26
26
|
export declare type OnRemove = (data: {
|
|
27
27
|
file: FileInfo;
|
|
@@ -85,3 +85,16 @@ export declare type OnBeforeUpload = (data: {
|
|
|
85
85
|
export declare type listType = 'text' | 'image' | 'image-card';
|
|
86
86
|
export declare type OnPreview = (file: FileInfo) => void;
|
|
87
87
|
export declare type CreateThumbnailUrl = (file: File) => Promise<string>;
|
|
88
|
+
export interface CustomRequestOptions {
|
|
89
|
+
file: FileInfo;
|
|
90
|
+
action?: string;
|
|
91
|
+
withCredentials?: boolean;
|
|
92
|
+
data?: FuncOrRecordOrUndef;
|
|
93
|
+
headers?: FuncOrRecordOrUndef;
|
|
94
|
+
onProgress: (e: {
|
|
95
|
+
percent: number;
|
|
96
|
+
}) => void;
|
|
97
|
+
onFinish: () => void;
|
|
98
|
+
onError: () => void;
|
|
99
|
+
}
|
|
100
|
+
export declare type CustomRequest = (options: CustomRequestOptions) => void;
|
|
@@ -48,20 +48,30 @@ declare const uploadLight: import("../../_mixins").Theme<"Upload", {
|
|
|
48
48
|
fontSizeMedium: string;
|
|
49
49
|
fontSizeLarge: string;
|
|
50
50
|
opacityDisabled: string;
|
|
51
|
+
colorOpacitySecondary: string;
|
|
52
|
+
colorOpacitySecondaryHover: string;
|
|
53
|
+
colorOpacitySecondaryPressed: string;
|
|
54
|
+
colorSecondary: string;
|
|
55
|
+
colorSecondaryHover: string;
|
|
56
|
+
colorSecondaryPressed: string;
|
|
57
|
+
colorTertiary: string;
|
|
58
|
+
colorTertiaryHover: string;
|
|
59
|
+
colorTertiaryPressed: string;
|
|
60
|
+
colorQuaternary: string;
|
|
61
|
+
colorQuaternaryHover: string;
|
|
62
|
+
colorQuaternaryPressed: string;
|
|
51
63
|
color: string;
|
|
52
64
|
colorHover: string;
|
|
53
65
|
colorPressed: string;
|
|
54
66
|
colorFocus: string;
|
|
55
67
|
colorDisabled: string;
|
|
56
68
|
textColor: string;
|
|
69
|
+
textColorTertiary: string;
|
|
57
70
|
textColorHover: string;
|
|
58
71
|
textColorPressed: string;
|
|
59
72
|
textColorFocus: string;
|
|
60
73
|
textColorDisabled: string;
|
|
61
74
|
textColorText: string;
|
|
62
|
-
textColorTextDepth1: string;
|
|
63
|
-
textColorTextDepth2: string;
|
|
64
|
-
textColorTextDepth3: string;
|
|
65
75
|
textColorTextHover: string;
|
|
66
76
|
textColorTextPressed: string;
|
|
67
77
|
textColorTextFocus: string;
|
|
@@ -208,9 +218,8 @@ declare const uploadLight: import("../../_mixins").Theme<"Upload", {
|
|
|
208
218
|
borderDisabledError: string;
|
|
209
219
|
rippleColorError: string;
|
|
210
220
|
waveOpacity: string;
|
|
211
|
-
fontWeightText: string;
|
|
212
221
|
fontWeight: string;
|
|
213
|
-
|
|
222
|
+
fontWeightStrong: string;
|
|
214
223
|
paddingTiny: string;
|
|
215
224
|
paddingSmall: string;
|
|
216
225
|
paddingMedium: string;
|
package/es/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "2.
|
|
1
|
+
declare const _default: "2.21.3";
|
|
2
2
|
export default _default;
|
package/es/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '2.
|
|
1
|
+
export default '2.21.3';
|
|
@@ -120,6 +120,7 @@ declare const Scrollbar: import("vue").DefineComponent<{
|
|
|
120
120
|
scrollTo: ScrollTo;
|
|
121
121
|
mergedClsPrefix: import("vue").ComputedRef<string>;
|
|
122
122
|
containerScrollTop: import("vue").Ref<number>;
|
|
123
|
+
wrapperRef: import("vue").Ref<HTMLElement | null>;
|
|
123
124
|
containerRef: import("vue").Ref<HTMLElement | null>;
|
|
124
125
|
contentRef: import("vue").Ref<HTMLElement | null>;
|
|
125
126
|
yRailRef: import("vue").Ref<HTMLElement | null>;
|
|
@@ -33,6 +33,7 @@ const Scrollbar = (0, vue_1.defineComponent)({
|
|
|
33
33
|
setup(props) {
|
|
34
34
|
const { mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
|
|
35
35
|
// dom ref
|
|
36
|
+
const wrapperRef = (0, vue_1.ref)(null);
|
|
36
37
|
const containerRef = (0, vue_1.ref)(null);
|
|
37
38
|
const contentRef = (0, vue_1.ref)(null);
|
|
38
39
|
const yRailRef = (0, vue_1.ref)(null);
|
|
@@ -291,6 +292,10 @@ const Scrollbar = (0, vue_1.defineComponent)({
|
|
|
291
292
|
syncPositionState();
|
|
292
293
|
syncScrollState();
|
|
293
294
|
}
|
|
295
|
+
function isMouseUpAway(e) {
|
|
296
|
+
var _a;
|
|
297
|
+
return !((_a = wrapperRef.value) === null || _a === void 0 ? void 0 : _a.contains(e.target));
|
|
298
|
+
}
|
|
294
299
|
function handleXScrollMouseDown(e) {
|
|
295
300
|
e.preventDefault();
|
|
296
301
|
e.stopPropagation();
|
|
@@ -335,8 +340,7 @@ const Scrollbar = (0, vue_1.defineComponent)({
|
|
|
335
340
|
(0, evtd_1.off)('mouseup', window, handleXScrollMouseUp, true);
|
|
336
341
|
xBarPressed = false;
|
|
337
342
|
sync();
|
|
338
|
-
|
|
339
|
-
if (!(container === null || container === void 0 ? void 0 : container.contains(e.target))) {
|
|
343
|
+
if (isMouseUpAway(e)) {
|
|
340
344
|
hideBar();
|
|
341
345
|
}
|
|
342
346
|
}
|
|
@@ -381,8 +385,7 @@ const Scrollbar = (0, vue_1.defineComponent)({
|
|
|
381
385
|
(0, evtd_1.off)('mouseup', window, handleYScrollMouseUp, true);
|
|
382
386
|
yBarPressed = false;
|
|
383
387
|
sync();
|
|
384
|
-
|
|
385
|
-
if (!(container === null || container === void 0 ? void 0 : container.contains(e.target))) {
|
|
388
|
+
if (isMouseUpAway(e)) {
|
|
386
389
|
hideBar();
|
|
387
390
|
}
|
|
388
391
|
}
|
|
@@ -438,6 +441,7 @@ const Scrollbar = (0, vue_1.defineComponent)({
|
|
|
438
441
|
scrollTo,
|
|
439
442
|
mergedClsPrefix: mergedClsPrefixRef,
|
|
440
443
|
containerScrollTop: containerScrollTopRef,
|
|
444
|
+
wrapperRef,
|
|
441
445
|
containerRef,
|
|
442
446
|
contentRef,
|
|
443
447
|
yRailRef,
|
|
@@ -476,6 +480,7 @@ const Scrollbar = (0, vue_1.defineComponent)({
|
|
|
476
480
|
if (!this.scrollable)
|
|
477
481
|
return (0, vue_1.renderSlot)($slots, 'default');
|
|
478
482
|
const createChildren = () => (0, vue_1.h)('div', (0, vue_1.mergeProps)(this.$attrs, {
|
|
483
|
+
ref: 'wrapperRef',
|
|
479
484
|
class: `${mergedClsPrefix}-scrollbar`,
|
|
480
485
|
style: this.cssVars,
|
|
481
486
|
onMouseenter: this.handleMouseEnterWrapper,
|
|
@@ -279,9 +279,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
279
279
|
tableHeaderColor: string;
|
|
280
280
|
hoverColor: string;
|
|
281
281
|
tableColorHover: string;
|
|
282
|
+
tableColorStriped: string;
|
|
282
283
|
pressedColor: string;
|
|
283
284
|
opacityDisabled: string;
|
|
284
285
|
inputColorDisabled: string;
|
|
286
|
+
buttonColor2: string;
|
|
287
|
+
buttonColor2Hover: string;
|
|
288
|
+
buttonColor2Pressed: string;
|
|
285
289
|
boxShadow1: string;
|
|
286
290
|
boxShadow2: string;
|
|
287
291
|
boxShadow3: string;
|
|
@@ -332,9 +332,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
332
332
|
tableHeaderColor: string;
|
|
333
333
|
hoverColor: string;
|
|
334
334
|
tableColorHover: string;
|
|
335
|
+
tableColorStriped: string;
|
|
335
336
|
pressedColor: string;
|
|
336
337
|
opacityDisabled: string;
|
|
337
338
|
inputColorDisabled: string;
|
|
339
|
+
buttonColor2: string;
|
|
340
|
+
buttonColor2Hover: string;
|
|
341
|
+
buttonColor2Pressed: string;
|
|
338
342
|
boxShadow1: string;
|
|
339
343
|
boxShadow2: string;
|
|
340
344
|
boxShadow3: string;
|
|
@@ -12,7 +12,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
12
12
|
type: BooleanConstructor;
|
|
13
13
|
default: undefined;
|
|
14
14
|
};
|
|
15
|
-
loading:
|
|
15
|
+
loading: {
|
|
16
|
+
type: BooleanConstructor;
|
|
17
|
+
default: boolean;
|
|
18
|
+
};
|
|
16
19
|
onClear: PropType<(e: MouseEvent) => void>;
|
|
17
20
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
18
21
|
clsPrefix?: unknown;
|
|
@@ -23,6 +23,7 @@ const base = {
|
|
|
23
23
|
alphaDisabledInput: '0.06',
|
|
24
24
|
alphaPending: '0.09',
|
|
25
25
|
alphaTablePending: '0.06',
|
|
26
|
+
alphaTableStriped: '0.05',
|
|
26
27
|
alphaPressed: '0.05',
|
|
27
28
|
alphaAvatar: '0.18',
|
|
28
29
|
alphaRail: '0.2',
|
|
@@ -92,5 +93,5 @@ const derived = Object.assign(Object.assign({ name: 'common' }, _common_1.defaul
|
|
|
92
93
|
// close
|
|
93
94
|
closeColorHover: overlay(Number(base.alphaClose) * 1.25), closeColor: overlay(Number(base.alphaClose)), closeColorPressed: overlay(Number(base.alphaClose) * 0.8), closeColorDisabled: overlay(base.alpha4),
|
|
94
95
|
// clear
|
|
95
|
-
clearColor: overlay(base.alpha4), clearColorHover: (0, seemly_1.scaleColor)(overlay(base.alpha4), { alpha: 1.25 }), clearColorPressed: (0, seemly_1.scaleColor)(overlay(base.alpha4), { alpha: 0.8 }), scrollbarColor: overlay(base.alphaScrollbar), scrollbarColorHover: overlay(base.alphaScrollbarHover), scrollbarWidth: '5px', scrollbarHeight: '5px', scrollbarBorderRadius: '5px', progressRailColor: overlay(base.alphaProgressRail), railColor: overlay(base.alphaRail), popoverColor: base.neutralPopover, tableColor: base.neutralCard, cardColor: base.neutralCard, modalColor: base.neutralModal, bodyColor: base.neutralBody, tagColor: neutral(base.alphaTag), avatarColor: overlay(base.alphaAvatar), invertedColor: base.neutralBase, inputColor: overlay(base.alphaInput), codeColor: overlay(base.alphaCode), tabColor: overlay(base.alphaTab), actionColor: overlay(base.alphaAction), tableHeaderColor: overlay(base.alphaAction), hoverColor: overlay(base.alphaPending), tableColorHover: overlay(base.alphaTablePending), pressedColor: overlay(base.alphaPressed), opacityDisabled: base.alphaDisabled, inputColorDisabled: overlay(base.alphaDisabledInput), boxShadow1: '0 1px 2px -2px rgba(0, 0, 0, .24), 0 3px 6px 0 rgba(0, 0, 0, .18), 0 5px 12px 4px rgba(0, 0, 0, .12)', boxShadow2: '0 3px 6px -4px rgba(0, 0, 0, .24), 0 6px 12px 0 rgba(0, 0, 0, .16), 0 9px 18px 8px rgba(0, 0, 0, .10)', boxShadow3: '0 6px 16px -9px rgba(0, 0, 0, .08), 0 9px 28px 0 rgba(0, 0, 0, .05), 0 12px 48px 16px rgba(0, 0, 0, .03)' });
|
|
96
|
+
clearColor: overlay(base.alpha4), clearColorHover: (0, seemly_1.scaleColor)(overlay(base.alpha4), { alpha: 1.25 }), clearColorPressed: (0, seemly_1.scaleColor)(overlay(base.alpha4), { alpha: 0.8 }), scrollbarColor: overlay(base.alphaScrollbar), scrollbarColorHover: overlay(base.alphaScrollbarHover), scrollbarWidth: '5px', scrollbarHeight: '5px', scrollbarBorderRadius: '5px', progressRailColor: overlay(base.alphaProgressRail), railColor: overlay(base.alphaRail), popoverColor: base.neutralPopover, tableColor: base.neutralCard, cardColor: base.neutralCard, modalColor: base.neutralModal, bodyColor: base.neutralBody, tagColor: neutral(base.alphaTag), avatarColor: overlay(base.alphaAvatar), invertedColor: base.neutralBase, inputColor: overlay(base.alphaInput), codeColor: overlay(base.alphaCode), tabColor: overlay(base.alphaTab), actionColor: overlay(base.alphaAction), tableHeaderColor: overlay(base.alphaAction), hoverColor: overlay(base.alphaPending), tableColorHover: overlay(base.alphaTablePending), tableColorStriped: overlay(base.alphaTableStriped), pressedColor: overlay(base.alphaPressed), opacityDisabled: base.alphaDisabled, inputColorDisabled: overlay(base.alphaDisabledInput), buttonColor2: 'rgba(255, 255, 255, .06)', buttonColor2Hover: 'rgba(255, 255, 255, .09)', buttonColor2Pressed: 'rgba(255, 255, 255, .05)', boxShadow1: '0 1px 2px -2px rgba(0, 0, 0, .24), 0 3px 6px 0 rgba(0, 0, 0, .18), 0 5px 12px 4px rgba(0, 0, 0, .12)', boxShadow2: '0 3px 6px -4px rgba(0, 0, 0, .24), 0 6px 12px 0 rgba(0, 0, 0, .16), 0 9px 18px 8px rgba(0, 0, 0, .10)', boxShadow3: '0 6px 16px -9px rgba(0, 0, 0, .08), 0 9px 28px 0 rgba(0, 0, 0, .05), 0 12px 48px 16px rgba(0, 0, 0, .03)' });
|
|
96
97
|
exports.default = derived;
|
|
@@ -67,9 +67,13 @@ declare const derived: {
|
|
|
67
67
|
tableHeaderColor: string;
|
|
68
68
|
hoverColor: string;
|
|
69
69
|
tableColorHover: string;
|
|
70
|
+
tableColorStriped: string;
|
|
70
71
|
pressedColor: string;
|
|
71
72
|
opacityDisabled: string;
|
|
72
73
|
inputColorDisabled: string;
|
|
74
|
+
buttonColor2: string;
|
|
75
|
+
buttonColor2Hover: string;
|
|
76
|
+
buttonColor2Pressed: string;
|
|
73
77
|
boxShadow1: string;
|
|
74
78
|
boxShadow2: string;
|
|
75
79
|
boxShadow3: string;
|
|
@@ -85,7 +85,7 @@ const derived = Object.assign(Object.assign({ name: 'common' }, _common_1.defaul
|
|
|
85
85
|
// error color
|
|
86
86
|
errorColor: base.errorDefault, errorColorHover: base.errorHover, errorColorPressed: base.errorActive, errorColorSuppl: base.errorSuppl,
|
|
87
87
|
// text color
|
|
88
|
-
textColorBase: base.neutralTextBase, textColor1: 'rgb(31, 34, 37)', textColor2: 'rgb(51, 54, 57)', textColor3: 'rgb(
|
|
88
|
+
textColorBase: base.neutralTextBase, textColor1: 'rgb(31, 34, 37)', textColor2: 'rgb(51, 54, 57)', textColor3: 'rgb(118, 124, 130)',
|
|
89
89
|
// textColor4: neutral(base.alpha4), // disabled, placeholder, icon
|
|
90
90
|
// textColor5: neutral(base.alpha5),
|
|
91
91
|
textColorDisabled: neutral(base.alpha4), placeholderColor: neutral(base.alpha4), placeholderColorDisabled: neutral(base.alpha5), iconColor: neutral(base.alpha4), iconColorHover: (0, seemly_1.scaleColor)(neutral(base.alpha4), { lightness: 0.75 }), iconColorPressed: (0, seemly_1.scaleColor)(neutral(base.alpha4), { lightness: 0.9 }), iconColorDisabled: neutral(base.alpha5), opacity1: base.alpha1, opacity2: base.alpha2, opacity3: base.alpha3, opacity4: base.alpha4, opacity5: base.alpha5, dividerColor: 'rgb(239, 239, 245)', borderColor: 'rgb(224, 224, 230)',
|
|
@@ -94,5 +94,8 @@ const derived = Object.assign(Object.assign({ name: 'common' }, _common_1.defaul
|
|
|
94
94
|
// clear
|
|
95
95
|
clearColor: neutral(base.alpha4), clearColorHover: (0, seemly_1.scaleColor)(neutral(base.alpha4), { lightness: 0.75 }), clearColorPressed: (0, seemly_1.scaleColor)(neutral(base.alpha4), { lightness: 0.9 }), scrollbarColor: overlay(base.alphaScrollbar), scrollbarColorHover: overlay(base.alphaScrollbarHover), scrollbarWidth: '5px', scrollbarHeight: '5px', scrollbarBorderRadius: '5px', progressRailColor: neutral(base.alphaProgressRail), railColor: 'rgb(219, 219, 223)', popoverColor: base.neutralPopover, tableColor: base.neutralCard, cardColor: base.neutralCard, modalColor: base.neutralModal, bodyColor: base.neutralBody, tagColor: 'rgb(250, 250, 252)', avatarColor: neutral(base.alphaAvatar), invertedColor: 'rgb(0, 20, 40)', inputColor: neutral(base.alphaInput), codeColor: 'rgb(244, 244, 248)', tabColor: 'rgb(247, 247, 250)', actionColor: 'rgb(250, 250, 252)', tableHeaderColor: 'rgb(250, 250, 252)', hoverColor: 'rgb(243, 243, 245)',
|
|
96
96
|
// use color with alpha since it can be nested with header filter & sorter effect
|
|
97
|
-
tableColorHover: 'rgba(0, 0, 100, 0.
|
|
97
|
+
tableColorHover: 'rgba(0, 0, 100, 0.03)', tableColorStriped: 'rgba(0, 0, 100, 0.02)', pressedColor: 'rgb(237, 237, 239)', opacityDisabled: base.alphaDisabled, inputColorDisabled: 'rgb(250, 250, 252)',
|
|
98
|
+
// secondary button color
|
|
99
|
+
// can also be used in tertiary button & quaternary button
|
|
100
|
+
buttonColor2: 'rgba(46, 51, 56, .05)', buttonColor2Hover: 'rgba(46, 51, 56, .09)', buttonColor2Pressed: 'rgba(46, 51, 56, .13)', boxShadow1: '0 1px 2px -2px rgba(0, 0, 0, .08), 0 3px 6px 0 rgba(0, 0, 0, .06), 0 5px 12px 4px rgba(0, 0, 0, .04)', boxShadow2: '0 3px 6px -4px rgba(0, 0, 0, .12), 0 6px 16px 0 rgba(0, 0, 0, .08), 0 9px 28px 8px rgba(0, 0, 0, .05)', boxShadow3: '0 6px 16px -9px rgba(0, 0, 0, .08), 0 9px 28px 0 rgba(0, 0, 0, .05), 0 12px 48px 16px rgba(0, 0, 0, .03)' });
|
|
98
101
|
exports.default = derived;
|
|
@@ -12,7 +12,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
12
12
|
|
|
13
13
|
const cssr_1 = require("../../_utils/cssr");
|
|
14
14
|
|
|
15
|
-
const _common_1 = __importDefault(require("../common/_common"));
|
|
15
|
+
const _common_1 = __importDefault(require("../common/_common"));
|
|
16
|
+
|
|
17
|
+
const {
|
|
18
|
+
fontSize,
|
|
19
|
+
fontFamily,
|
|
20
|
+
lineHeight
|
|
21
|
+
} = _common_1.default; // All the components need the style
|
|
16
22
|
// It is static and won't be changed in the app's lifetime
|
|
17
23
|
// If user want to overrides it they need to use `n-global-style` is provided
|
|
18
24
|
//
|
|
@@ -23,12 +29,11 @@ const _common_1 = __importDefault(require("../common/_common")); // All the comp
|
|
|
23
29
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-tap-highlight-color
|
|
24
30
|
// In some android devices, there will be the style.
|
|
25
31
|
|
|
26
|
-
|
|
27
32
|
exports.default = (0, cssr_1.c)('body', `
|
|
28
33
|
margin: 0;
|
|
29
|
-
font-size: ${
|
|
30
|
-
font-family: ${
|
|
31
|
-
line-height: ${
|
|
34
|
+
font-size: ${fontSize};
|
|
35
|
+
font-family: ${fontFamily};
|
|
36
|
+
line-height: ${lineHeight};
|
|
32
37
|
-webkit-text-size-adjust: 100%;
|
|
33
38
|
-webkit-tap-highlight-color: transparent;
|
|
34
39
|
`, [(0, cssr_1.c)('input', `
|
|
@@ -14,11 +14,16 @@ const cssr_1 = require("../../_utils/cssr");
|
|
|
14
14
|
|
|
15
15
|
const _common_1 = __importDefault(require("../common/_common"));
|
|
16
16
|
|
|
17
|
+
const {
|
|
18
|
+
cubicBezierEaseInOut,
|
|
19
|
+
transformDebounceScale
|
|
20
|
+
} = _common_1.default;
|
|
21
|
+
|
|
17
22
|
function default_1({
|
|
18
23
|
originalTransform = '',
|
|
19
24
|
left = 0,
|
|
20
25
|
top = 0,
|
|
21
|
-
transition = `all .3s ${
|
|
26
|
+
transition = `all .3s ${cubicBezierEaseInOut} !important`
|
|
22
27
|
} = {}) {
|
|
23
28
|
return [(0, cssr_1.c)('&.icon-switch-transition-enter-from, &.icon-switch-transition-leave-to', {
|
|
24
29
|
transform: originalTransform + ' scale(0.75)',
|
|
@@ -26,7 +31,7 @@ function default_1({
|
|
|
26
31
|
top,
|
|
27
32
|
opacity: 0
|
|
28
33
|
}), (0, cssr_1.c)('&.icon-switch-transition-enter-to, &.icon-switch-transition-leave-from', {
|
|
29
|
-
transform: `${
|
|
34
|
+
transform: `${transformDebounceScale} ${originalTransform}`,
|
|
30
35
|
left,
|
|
31
36
|
top,
|
|
32
37
|
opacity: 1
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExtractPropTypes } from 'vue';
|
|
2
2
|
import { useTheme } from '../../_mixins';
|
|
3
3
|
declare type themePropKeys = keyof typeof useTheme.props;
|
|
4
|
-
export declare type ExtractPublicPropTypes<T> = Omit<Partial<ExtractPropTypes<T>>, themePropKeys | Extract<keyof T, `internal${string}`>>;
|
|
4
|
+
export declare type ExtractPublicPropTypes<T> = Omit<Partial<ExtractPropTypes<T>>, Exclude<themePropKeys, 'themeOverrides'> | Extract<keyof T, `internal${string}`>>;
|
|
5
5
|
export declare type ExtractInternalPropTypes<T> = Partial<ExtractPropTypes<T>>;
|
|
6
6
|
export {};
|
package/lib/alert/src/Alert.d.ts
CHANGED
|
@@ -437,9 +437,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
437
437
|
tableHeaderColor: string;
|
|
438
438
|
hoverColor: string;
|
|
439
439
|
tableColorHover: string;
|
|
440
|
+
tableColorStriped: string;
|
|
440
441
|
pressedColor: string;
|
|
441
442
|
opacityDisabled: string;
|
|
442
443
|
inputColorDisabled: string;
|
|
444
|
+
buttonColor2: string;
|
|
445
|
+
buttonColor2Hover: string;
|
|
446
|
+
buttonColor2Pressed: string;
|
|
443
447
|
boxShadow1: string;
|
|
444
448
|
boxShadow2: string;
|
|
445
449
|
boxShadow3: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
1
|
+
import { PropType, InputHTMLAttributes } from 'vue';
|
|
2
2
|
import { TreeNode } from 'treemate';
|
|
3
3
|
import { MaybeArray } from '../../_utils';
|
|
4
4
|
import type { ExtractPublicPropTypes } from '../../_utils';
|
|
@@ -34,6 +34,7 @@ declare const autoCompleteProps: {
|
|
|
34
34
|
readonly blurAfterSelect: BooleanConstructor;
|
|
35
35
|
readonly clearAfterSelect: BooleanConstructor;
|
|
36
36
|
readonly getShow: PropType<(inputValue: string) => boolean>;
|
|
37
|
+
readonly inputProps: PropType<InputHTMLAttributes>;
|
|
37
38
|
readonly size: PropType<"small" | "medium" | "large">;
|
|
38
39
|
readonly options: {
|
|
39
40
|
readonly type: PropType<AutoCompleteOptions>;
|
|
@@ -430,6 +431,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
430
431
|
readonly blurAfterSelect: BooleanConstructor;
|
|
431
432
|
readonly clearAfterSelect: BooleanConstructor;
|
|
432
433
|
readonly getShow: PropType<(inputValue: string) => boolean>;
|
|
434
|
+
readonly inputProps: PropType<InputHTMLAttributes>;
|
|
433
435
|
readonly size: PropType<"small" | "medium" | "large">;
|
|
434
436
|
readonly options: {
|
|
435
437
|
readonly type: PropType<AutoCompleteOptions>;
|
|
@@ -889,9 +891,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
889
891
|
tableHeaderColor: string;
|
|
890
892
|
hoverColor: string;
|
|
891
893
|
tableColorHover: string;
|
|
894
|
+
tableColorStriped: string;
|
|
892
895
|
pressedColor: string;
|
|
893
896
|
opacityDisabled: string;
|
|
894
897
|
inputColorDisabled: string;
|
|
898
|
+
buttonColor2: string;
|
|
899
|
+
buttonColor2Hover: string;
|
|
900
|
+
buttonColor2Pressed: string;
|
|
895
901
|
boxShadow1: string;
|
|
896
902
|
boxShadow2: string;
|
|
897
903
|
boxShadow3: string;
|
|
@@ -1084,6 +1090,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1084
1090
|
readonly blurAfterSelect?: unknown;
|
|
1085
1091
|
readonly clearAfterSelect?: unknown;
|
|
1086
1092
|
readonly getShow?: unknown;
|
|
1093
|
+
readonly inputProps?: unknown;
|
|
1087
1094
|
readonly size?: unknown;
|
|
1088
1095
|
readonly options?: unknown;
|
|
1089
1096
|
readonly zIndex?: unknown;
|
|
@@ -1463,6 +1470,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1463
1470
|
loading?: boolean | undefined;
|
|
1464
1471
|
bordered?: boolean | undefined;
|
|
1465
1472
|
clearable?: boolean | undefined;
|
|
1473
|
+
inputProps?: InputHTMLAttributes | undefined;
|
|
1466
1474
|
"onUpdate:value"?: MaybeArray<OnUpdateValue> | undefined;
|
|
1467
1475
|
onUpdateValue?: MaybeArray<OnUpdateValue> | undefined;
|
|
1468
1476
|
getShow?: ((inputValue: string) => boolean) | undefined;
|
|
@@ -31,7 +31,7 @@ const autoCompleteProps = Object.assign(Object.assign({}, _mixins_1.useTheme.pro
|
|
|
31
31
|
}, disabled: {
|
|
32
32
|
type: Boolean,
|
|
33
33
|
default: undefined
|
|
34
|
-
}, placeholder: String, value: String, blurAfterSelect: Boolean, clearAfterSelect: Boolean, getShow: Function, size: String, options: {
|
|
34
|
+
}, placeholder: String, value: String, blurAfterSelect: Boolean, clearAfterSelect: Boolean, getShow: Function, inputProps: Object, size: String, options: {
|
|
35
35
|
type: Array,
|
|
36
36
|
default: () => []
|
|
37
37
|
}, zIndex: Number, 'onUpdate:value': [Function, Array], onUpdateValue: [Function, Array], onSelect: [Function, Array], onBlur: [Function, Array], onFocus: [Function, Array],
|
|
@@ -237,7 +237,10 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
237
237
|
});
|
|
238
238
|
}
|
|
239
239
|
const { mergedTheme } = this;
|
|
240
|
-
return ((0, vue_1.h)(input_1.NInput, { theme: mergedTheme.peers.Input, themeOverrides: mergedTheme.peerOverrides.Input, bordered: this.mergedBordered, value: this.mergedValue, placeholder: this.placeholder, size: this.mergedSize, disabled: this.mergedDisabled, clearable: this.clearable, loading: this.loading, onClear: this.handleClear, onFocus: this.handleFocus, onUpdateValue: this.handleInput, onBlur: this.handleBlur }
|
|
240
|
+
return ((0, vue_1.h)(input_1.NInput, { theme: mergedTheme.peers.Input, themeOverrides: mergedTheme.peerOverrides.Input, bordered: this.mergedBordered, value: this.mergedValue, placeholder: this.placeholder, size: this.mergedSize, disabled: this.mergedDisabled, clearable: this.clearable, loading: this.loading, inputProps: this.inputProps, onClear: this.handleClear, onFocus: this.handleFocus, onUpdateValue: this.handleInput, onBlur: this.handleBlur }, {
|
|
241
|
+
suffix: this.$slots.suffix,
|
|
242
|
+
prefix: this.$slots.prefix
|
|
243
|
+
}));
|
|
241
244
|
}
|
|
242
245
|
}),
|
|
243
246
|
(0, vue_1.h)(vueuc_1.VFollower, { show: this.active, to: this.adjustedTo, containerClass: this.namespace, zIndex: this.zIndex, teleportDisabled: this.adjustedTo === _utils_1.useAdjustedTo.tdkey, placement: "bottom-start", width: "target" }, {
|
|
@@ -14,6 +14,7 @@ declare const avatarProps: {
|
|
|
14
14
|
};
|
|
15
15
|
readonly round: BooleanConstructor;
|
|
16
16
|
readonly onError: PropType<(e: Event) => void>;
|
|
17
|
+
readonly fallbackSrc: StringConstructor;
|
|
17
18
|
readonly theme: PropType<import("../../_mixins").Theme<"Avatar", {
|
|
18
19
|
borderRadius: string;
|
|
19
20
|
fontSize: string;
|
|
@@ -60,6 +61,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
60
61
|
};
|
|
61
62
|
readonly round: BooleanConstructor;
|
|
62
63
|
readonly onError: PropType<(e: Event) => void>;
|
|
64
|
+
readonly fallbackSrc: StringConstructor;
|
|
63
65
|
readonly theme: PropType<import("../../_mixins").Theme<"Avatar", {
|
|
64
66
|
borderRadius: string;
|
|
65
67
|
fontSize: string;
|
|
@@ -93,6 +95,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
93
95
|
}, {
|
|
94
96
|
textRef: import("vue").Ref<HTMLElement | null>;
|
|
95
97
|
selfRef: import("vue").Ref<HTMLElement | null>;
|
|
98
|
+
mergedRoundRef: import("vue").ComputedRef<boolean>;
|
|
96
99
|
mergedClsPrefix: import("vue").ComputedRef<string>;
|
|
97
100
|
fitTextTransform: () => void;
|
|
98
101
|
cssVars: import("vue").ComputedRef<{
|
|
@@ -100,8 +103,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
100
103
|
'--border-radius': string;
|
|
101
104
|
'--color': string;
|
|
102
105
|
'--bezier': string;
|
|
103
|
-
'--size': string;
|
|
106
|
+
'--merged-size': string;
|
|
104
107
|
}>;
|
|
108
|
+
hasLoadError: import("vue").Ref<boolean>;
|
|
109
|
+
handleError: (e: Event) => void;
|
|
105
110
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
106
111
|
readonly size?: unknown;
|
|
107
112
|
readonly src?: unknown;
|
|
@@ -110,6 +115,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
110
115
|
readonly objectFit?: unknown;
|
|
111
116
|
readonly round?: unknown;
|
|
112
117
|
readonly onError?: unknown;
|
|
118
|
+
readonly fallbackSrc?: unknown;
|
|
113
119
|
readonly theme?: unknown;
|
|
114
120
|
readonly themeOverrides?: unknown;
|
|
115
121
|
readonly builtinThemeOverrides?: unknown;
|
|
@@ -152,6 +158,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
152
158
|
heightHuge: string;
|
|
153
159
|
color: string;
|
|
154
160
|
}, any>> | undefined;
|
|
161
|
+
fallbackSrc?: string | undefined;
|
|
155
162
|
}>, {
|
|
156
163
|
round: boolean;
|
|
157
164
|
size: number | "small" | "medium" | "large";
|
package/lib/avatar/src/Avatar.js
CHANGED
|
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const vue_1 = require("vue");
|
|
7
7
|
const vueuc_1 = require("vueuc");
|
|
8
|
+
const Tag_1 = require("../../tag/src/Tag");
|
|
8
9
|
const _mixins_1 = require("../../_mixins");
|
|
9
10
|
const styles_1 = require("../styles");
|
|
10
11
|
const _utils_1 = require("../../_utils");
|
|
@@ -15,12 +16,13 @@ const avatarProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props), {
|
|
|
15
16
|
}, src: String, circle: Boolean, color: String, objectFit: {
|
|
16
17
|
type: String,
|
|
17
18
|
default: 'fill'
|
|
18
|
-
}, round: Boolean, onError: Function });
|
|
19
|
+
}, round: Boolean, onError: Function, fallbackSrc: String });
|
|
19
20
|
exports.default = (0, vue_1.defineComponent)({
|
|
20
21
|
name: 'Avatar',
|
|
21
22
|
props: avatarProps,
|
|
22
23
|
setup(props) {
|
|
23
24
|
const { mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
|
|
25
|
+
const hasLoadErrorRef = (0, vue_1.ref)(false);
|
|
24
26
|
let memoedTextHtml = null;
|
|
25
27
|
const textRef = (0, vue_1.ref)(null);
|
|
26
28
|
const selfRef = (0, vue_1.ref)(null);
|
|
@@ -41,13 +43,31 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
41
43
|
}
|
|
42
44
|
};
|
|
43
45
|
const themeRef = (0, _mixins_1.useTheme)('Avatar', 'Avatar', index_cssr_1.default, styles_1.avatarLight, props, mergedClsPrefixRef);
|
|
46
|
+
const TagInjection = (0, vue_1.inject)(Tag_1.tagInjectionKey, null);
|
|
47
|
+
const mergedRoundRef = (0, vue_1.computed)(() => {
|
|
48
|
+
if (props.round || props.circle)
|
|
49
|
+
return true;
|
|
50
|
+
if (TagInjection) {
|
|
51
|
+
return TagInjection.roundRef.value;
|
|
52
|
+
}
|
|
53
|
+
return false;
|
|
54
|
+
});
|
|
55
|
+
const handleError = (e) => {
|
|
56
|
+
hasLoadErrorRef.value = true;
|
|
57
|
+
const { onError } = props;
|
|
58
|
+
if (onError) {
|
|
59
|
+
onError(e);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
(0, vue_1.watch)(() => props.src, () => (hasLoadErrorRef.value = false));
|
|
44
63
|
return {
|
|
45
64
|
textRef,
|
|
46
65
|
selfRef,
|
|
66
|
+
mergedRoundRef,
|
|
47
67
|
mergedClsPrefix: mergedClsPrefixRef,
|
|
48
68
|
fitTextTransform,
|
|
49
69
|
cssVars: (0, vue_1.computed)(() => {
|
|
50
|
-
const { size
|
|
70
|
+
const { size } = props;
|
|
51
71
|
const { self: { borderRadius, fontSize, color }, common: { cubicBezierEaseInOut } } = themeRef.value;
|
|
52
72
|
let height;
|
|
53
73
|
if (typeof size === 'number') {
|
|
@@ -58,18 +78,30 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
58
78
|
}
|
|
59
79
|
return {
|
|
60
80
|
'--font-size': fontSize,
|
|
61
|
-
'--border-radius':
|
|
81
|
+
'--border-radius': mergedRoundRef.value ? '50%' : borderRadius,
|
|
62
82
|
'--color': color,
|
|
63
83
|
'--bezier': cubicBezierEaseInOut,
|
|
64
|
-
'--size': height
|
|
84
|
+
'--merged-size': `var(--avatar-size-override, ${height})`
|
|
65
85
|
};
|
|
66
|
-
})
|
|
86
|
+
}),
|
|
87
|
+
hasLoadError: hasLoadErrorRef,
|
|
88
|
+
handleError
|
|
67
89
|
};
|
|
68
90
|
},
|
|
69
91
|
render() {
|
|
70
92
|
const { $slots, src, mergedClsPrefix } = this;
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
93
|
+
let img;
|
|
94
|
+
if (this.hasLoadError) {
|
|
95
|
+
img = (0, vue_1.h)("img", { src: this.fallbackSrc, style: { objectFit: this.objectFit } });
|
|
96
|
+
}
|
|
97
|
+
else if (!(!$slots.default && src)) {
|
|
98
|
+
img = ((0, vue_1.h)(vueuc_1.VResizeObserver, { onResize: this.fitTextTransform }, {
|
|
99
|
+
default: () => ((0, vue_1.h)("span", { ref: "textRef", class: `${mergedClsPrefix}-avatar__text`, style: { background: this.color } }, $slots))
|
|
100
|
+
}));
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
img = ((0, vue_1.h)("img", { src: src, onError: this.handleError, style: { objectFit: this.objectFit } }));
|
|
104
|
+
}
|
|
105
|
+
return ((0, vue_1.h)("span", { ref: "selfRef", class: `${mergedClsPrefix}-avatar`, style: this.cssVars }, img));
|
|
74
106
|
}
|
|
75
107
|
});
|
|
@@ -13,8 +13,8 @@ const cssr_1 = require("../../../_utils/cssr"); // vars:
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
exports.default = (0, cssr_1.cB)('avatar', `
|
|
16
|
-
width: var(--size);
|
|
17
|
-
height: var(--size);
|
|
16
|
+
width: var(--merged-size);
|
|
17
|
+
height: var(--merged-size);
|
|
18
18
|
color: #FFF;
|
|
19
19
|
font-size: var(--font-size);
|
|
20
20
|
display: inline-flex;
|