naive-ui 2.20.0 → 2.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/_internal/select-menu/src/SelectMenu.d.ts +4 -1
- package/es/_internal/selection/src/Selection.d.ts +4 -1
- package/es/_internal/suffix/src/Suffix.d.ts +5 -2
- package/es/_internal/suffix/src/Suffix.js +4 -1
- package/es/_styles/common/dark.js +1 -1
- package/es/_styles/common/light.d.ts +3 -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 +3 -0
- package/es/alert/src/Alert.js +3 -3
- package/es/auto-complete/src/AutoComplete.d.ts +8 -1
- package/es/auto-complete/src/AutoComplete.js +2 -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 +131 -58
- package/es/button/src/interface.d.ts +1 -1
- package/es/button/src/styles/button.cssr.js +1 -0
- 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 +143 -50
- package/es/calendar/styles/light.d.ts +14 -5
- package/es/card/src/Card.d.ts +3 -0
- package/es/cascader/src/Cascader.d.ts +3 -0
- package/es/cascader/src/Cascader.js +2 -2
- package/es/cascader/src/CascaderOption.d.ts +3 -0
- package/es/cascader/src/CascaderSelectMenu.d.ts +3 -0
- package/es/cascader/src/CascaderSubmenu.d.ts +3 -0
- package/es/checkbox/src/Checkbox.d.ts +8 -5
- package/es/checkbox/src/Checkbox.js +8 -9
- package/es/collapse/src/Collapse.d.ts +3 -0
- package/es/color-picker/src/ColorInputUnit.d.ts +17 -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 +183 -51
- package/es/data-table/src/DataTable.js +11 -6
- package/es/data-table/src/HeaderButton/FilterButton.d.ts +20 -5
- package/es/data-table/src/HeaderButton/FilterMenu.d.ts +20 -5
- package/es/data-table/src/TableParts/Body.d.ts +25 -6
- package/es/data-table/src/TableParts/Body.js +60 -22
- package/es/data-table/src/TableParts/BodyCheckbox.js +1 -1
- package/es/data-table/src/TableParts/Cell.d.ts +40 -10
- package/es/data-table/src/TableParts/Header.d.ts +20 -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 +8 -9
- package/es/data-table/styles/light.d.ts +20 -5
- package/es/data-table/styles/light.js +3 -3
- package/es/date-picker/src/DatePicker.d.ts +328 -127
- package/es/date-picker/src/DatePicker.js +7 -17
- package/es/date-picker/src/config.d.ts +9 -0
- package/es/date-picker/src/config.js +8 -0
- package/es/date-picker/src/panel/date.d.ts +51 -19
- package/es/date-picker/src/panel/daterange.d.ts +49 -17
- package/es/date-picker/src/panel/datetime.d.ts +51 -19
- package/es/date-picker/src/panel/datetimerange.d.ts +49 -17
- package/es/date-picker/src/panel/month.d.ts +86 -60
- package/es/date-picker/src/panel/month.js +9 -6
- package/es/date-picker/src/panel/use-calendar.d.ts +59 -27
- package/es/date-picker/src/panel/use-calendar.js +7 -2
- package/es/date-picker/src/panel/use-dual-calendar.d.ts +47 -15
- package/es/date-picker/src/panel/use-panel-common.d.ts +47 -15
- package/es/date-picker/styles/_common.d.ts +2 -0
- package/es/date-picker/styles/_common.js +3 -1
- package/es/date-picker/styles/light.d.ts +32 -10
- package/es/dialog/src/Dialog.d.ts +104 -38
- package/es/dialog/src/DialogEnvironment.d.ts +2 -2
- package/es/dialog/src/DialogProvider.d.ts +2 -2
- package/es/dialog/styles/light.d.ts +14 -5
- package/es/drawer/src/Drawer.d.ts +3 -0
- package/es/drawer/src/DrawerBodyWrapper.d.ts +3 -0
- package/es/drawer/src/DrawerContent.d.ts +3 -0
- package/es/dropdown/index.d.ts +1 -1
- package/es/dropdown/src/Dropdown.d.ts +5 -2
- package/es/dropdown/src/DropdownGroup.d.ts +2 -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 +2 -2
- package/es/dropdown/src/DropdownRenderOption.d.ts +2 -3
- package/es/dropdown/src/interface.d.ts +9 -30
- package/es/dropdown/src/utils.d.ts +1 -0
- package/es/dropdown/src/utils.js +10 -0
- package/es/dynamic-input/src/DynamicInput.d.ts +143 -50
- package/es/dynamic-input/src/InputPreset.d.ts +17 -5
- package/es/dynamic-input/src/PairPreset.d.ts +17 -5
- package/es/dynamic-input/styles/light.d.ts +14 -5
- package/es/dynamic-tags/src/DynamicTags.d.ts +144 -50
- package/es/dynamic-tags/styles/light.d.ts +14 -5
- package/es/ellipsis/src/Ellipsis.d.ts +3 -0
- package/es/form/src/FormItemGridItem.d.ts +2 -2
- package/es/global-style/src/GlobalStyle.js +2 -0
- package/es/grid/src/Grid.js +1 -0
- package/es/grid/src/GridItem.d.ts +2 -2
- package/es/image/src/ImagePreview.js +3 -2
- package/es/image/src/icons.d.ts +1 -0
- package/es/image/src/icons.js +2 -0
- package/es/input/src/Input.d.ts +4 -0
- package/es/input/src/Input.js +9 -3
- package/es/input/src/interface.d.ts +1 -0
- package/es/input-number/src/InputNumber.d.ts +144 -50
- package/es/input-number/styles/light.d.ts +14 -5
- package/es/layout/src/Layout.d.ts +6 -0
- package/es/layout/src/LayoutContent.d.ts +3 -0
- package/es/layout/src/LayoutSider.d.ts +3 -0
- package/es/locales/common/deDE.d.ts +3 -0
- package/es/locales/common/deDE.js +93 -0
- package/es/locales/common/nbNO.d.ts +3 -0
- package/es/locales/common/nbNO.js +93 -0
- package/es/locales/date/deDE.d.ts +3 -0
- package/es/locales/date/deDE.js +6 -0
- package/es/locales/date/nbNO.d.ts +3 -0
- package/es/locales/date/nbNO.js +6 -0
- package/es/locales/index.d.ts +6 -0
- package/es/locales/index.js +5 -0
- package/es/locales/utils/index.d.ts +8 -0
- package/es/locales/utils/index.js +4 -0
- package/es/log/src/Log.d.ts +3 -0
- package/es/mention/src/Mention.d.ts +4 -0
- package/es/menu/index.d.ts +1 -1
- package/es/menu/src/Menu.d.ts +32 -8
- package/es/menu/src/Menu.js +32 -10
- package/es/menu/src/MenuDivider.d.ts +2 -0
- package/es/menu/src/MenuDivider.js +11 -0
- package/es/menu/src/MenuOption.d.ts +11 -2
- package/es/menu/src/MenuOptionContent.d.ts +7 -2
- package/es/menu/src/Submenu.d.ts +21 -17
- 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 +33 -12
- package/es/modal/src/BodyWrapper.js +6 -0
- package/es/modal/src/Modal.d.ts +185 -65
- package/es/modal/src/Modal.js +5 -1
- package/es/modal/src/interface.d.ts +1 -0
- package/es/modal/src/presetProps.d.ts +1 -1
- package/es/modal/styles/light.d.ts +14 -5
- package/es/notification/src/NotificationContainer.d.ts +3 -0
- package/es/pagination/index.d.ts +1 -1
- package/es/pagination/src/Pagination.d.ts +20 -12
- package/es/pagination/src/Pagination.js +16 -6
- package/es/pagination/src/interface.d.ts +2 -0
- package/es/popconfirm/src/Popconfirm.d.ts +145 -52
- package/es/popconfirm/src/PopconfirmPanel.d.ts +2 -2
- package/es/popconfirm/styles/light.d.ts +14 -5
- package/es/popselect/src/Popselect.d.ts +3 -0
- package/es/popselect/src/PopselectPanel.d.ts +3 -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 +9 -2
- package/es/select/src/Select.js +20 -14
- package/es/slider/src/Slider.d.ts +70 -91
- package/es/slider/src/Slider.js +326 -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/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 +14 -17
- package/es/tabs/src/TabPane.d.ts +1 -0
- package/es/tabs/src/TabPane.js +2 -1
- package/es/tabs/src/Tabs.d.ts +4 -0
- package/es/tabs/src/Tabs.js +65 -21
- package/es/tabs/src/interface.d.ts +3 -2
- 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 +3 -0
- package/es/time-picker/src/Panel.d.ts +17 -5
- package/es/time-picker/src/TimePicker.d.ts +144 -50
- package/es/time-picker/src/TimePicker.js +3 -0
- package/es/time-picker/styles/light.d.ts +14 -5
- package/es/tooltip/src/Tooltip.d.ts +3 -0
- package/es/transfer/src/Transfer.d.ts +145 -52
- package/es/transfer/src/TransferFilter.d.ts +17 -5
- package/es/transfer/src/TransferList.d.ts +17 -5
- package/es/transfer/src/TransferListItem.d.ts +17 -5
- package/es/transfer/styles/light.d.ts +14 -5
- package/es/tree/src/Tree.d.ts +13 -9
- package/es/tree/src/Tree.js +59 -23
- package/es/tree/src/TreeNode.js +4 -4
- package/es/tree/src/TreeNodeCheckbox.d.ts +3 -0
- package/es/tree/src/TreeNodeSwitcher.d.ts +1 -1
- package/es/tree/src/interface.d.ts +1 -1
- package/es/tree/src/utils.d.ts +1 -1
- package/es/tree/src/utils.js +4 -4
- package/es/tree-select/src/TreeSelect.d.ts +5 -2
- package/es/upload/src/Upload.d.ts +146 -52
- package/es/upload/src/Upload.js +6 -10
- package/es/upload/src/UploadFile.d.ts +18 -6
- package/es/upload/src/UploadFile.js +1 -1
- package/es/upload/src/UploadProgress.d.ts +17 -5
- package/es/upload/src/UploadTrigger.js +2 -2
- package/es/upload/src/interface.d.ts +2 -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/select-menu/src/SelectMenu.d.ts +4 -1
- package/lib/_internal/selection/src/Selection.d.ts +4 -1
- package/lib/_internal/suffix/src/Suffix.d.ts +5 -2
- package/lib/_internal/suffix/src/Suffix.js +4 -1
- package/lib/_styles/common/dark.js +1 -1
- package/lib/_styles/common/light.d.ts +3 -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 +3 -0
- package/lib/alert/src/Alert.js +3 -3
- package/lib/auto-complete/src/AutoComplete.d.ts +8 -1
- package/lib/auto-complete/src/AutoComplete.js +2 -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 +129 -56
- package/lib/button/src/interface.d.ts +1 -1
- package/lib/button/src/styles/button.cssr.js +1 -0
- 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 +143 -50
- package/lib/calendar/styles/light.d.ts +14 -5
- package/lib/card/src/Card.d.ts +3 -0
- package/lib/cascader/src/Cascader.d.ts +3 -0
- package/lib/cascader/src/Cascader.js +2 -2
- package/lib/cascader/src/CascaderOption.d.ts +3 -0
- package/lib/cascader/src/CascaderSelectMenu.d.ts +3 -0
- package/lib/cascader/src/CascaderSubmenu.d.ts +3 -0
- package/lib/checkbox/src/Checkbox.d.ts +8 -5
- package/lib/checkbox/src/Checkbox.js +8 -9
- package/lib/collapse/src/Collapse.d.ts +3 -0
- package/lib/color-picker/src/ColorInputUnit.d.ts +17 -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 +183 -51
- package/lib/data-table/src/DataTable.js +11 -6
- package/lib/data-table/src/HeaderButton/FilterButton.d.ts +20 -5
- package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +20 -5
- package/lib/data-table/src/TableParts/Body.d.ts +25 -6
- package/lib/data-table/src/TableParts/Body.js +60 -22
- package/lib/data-table/src/TableParts/BodyCheckbox.js +1 -1
- package/lib/data-table/src/TableParts/Cell.d.ts +40 -10
- package/lib/data-table/src/TableParts/Header.d.ts +20 -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 +8 -9
- package/lib/data-table/styles/light.d.ts +20 -5
- package/lib/data-table/styles/light.js +3 -3
- package/lib/date-picker/src/DatePicker.d.ts +328 -127
- package/lib/date-picker/src/DatePicker.js +7 -17
- package/lib/date-picker/src/config.d.ts +9 -0
- package/lib/date-picker/src/config.js +9 -1
- package/lib/date-picker/src/panel/date.d.ts +51 -19
- package/lib/date-picker/src/panel/daterange.d.ts +49 -17
- package/lib/date-picker/src/panel/datetime.d.ts +51 -19
- package/lib/date-picker/src/panel/datetimerange.d.ts +49 -17
- package/lib/date-picker/src/panel/month.d.ts +86 -60
- package/lib/date-picker/src/panel/month.js +9 -6
- package/lib/date-picker/src/panel/use-calendar.d.ts +59 -27
- package/lib/date-picker/src/panel/use-calendar.js +6 -1
- package/lib/date-picker/src/panel/use-dual-calendar.d.ts +47 -15
- package/lib/date-picker/src/panel/use-panel-common.d.ts +47 -15
- package/lib/date-picker/styles/_common.d.ts +2 -0
- package/lib/date-picker/styles/_common.js +3 -1
- package/lib/date-picker/styles/light.d.ts +32 -10
- package/lib/dialog/src/Dialog.d.ts +104 -38
- package/lib/dialog/src/DialogEnvironment.d.ts +2 -2
- package/lib/dialog/src/DialogProvider.d.ts +2 -2
- package/lib/dialog/styles/light.d.ts +14 -5
- package/lib/drawer/src/Drawer.d.ts +3 -0
- package/lib/drawer/src/DrawerBodyWrapper.d.ts +3 -0
- package/lib/drawer/src/DrawerContent.d.ts +3 -0
- package/lib/dropdown/index.d.ts +1 -1
- package/lib/dropdown/src/Dropdown.d.ts +5 -2
- package/lib/dropdown/src/DropdownGroup.d.ts +2 -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 +1 -1
- package/lib/dropdown/src/DropdownRenderOption.d.ts +2 -3
- package/lib/dropdown/src/interface.d.ts +9 -30
- package/lib/dropdown/src/utils.d.ts +1 -0
- package/lib/dropdown/src/utils.js +12 -1
- package/lib/dynamic-input/src/DynamicInput.d.ts +143 -50
- package/lib/dynamic-input/src/InputPreset.d.ts +17 -5
- package/lib/dynamic-input/src/PairPreset.d.ts +17 -5
- package/lib/dynamic-input/styles/light.d.ts +14 -5
- package/lib/dynamic-tags/src/DynamicTags.d.ts +144 -50
- package/lib/dynamic-tags/styles/light.d.ts +14 -5
- package/lib/ellipsis/src/Ellipsis.d.ts +3 -0
- package/lib/form/src/FormItemGridItem.d.ts +2 -2
- package/lib/global-style/src/GlobalStyle.js +2 -0
- package/lib/grid/src/Grid.js +1 -0
- package/lib/grid/src/GridItem.d.ts +2 -2
- package/lib/image/src/ImagePreview.js +2 -1
- package/lib/image/src/icons.d.ts +1 -0
- package/lib/image/src/icons.js +3 -1
- package/lib/input/src/Input.d.ts +4 -0
- package/lib/input/src/Input.js +9 -3
- package/lib/input/src/interface.d.ts +1 -0
- package/lib/input-number/src/InputNumber.d.ts +144 -50
- package/lib/input-number/styles/light.d.ts +14 -5
- package/lib/layout/src/Layout.d.ts +6 -0
- package/lib/layout/src/LayoutContent.d.ts +3 -0
- package/lib/layout/src/LayoutSider.d.ts +3 -0
- package/lib/locales/common/deDE.d.ts +3 -0
- package/lib/locales/common/deDE.js +95 -0
- package/lib/locales/common/nbNO.d.ts +3 -0
- package/lib/locales/common/nbNO.js +95 -0
- package/lib/locales/date/deDE.d.ts +3 -0
- package/lib/locales/date/deDE.js +11 -0
- package/lib/locales/date/nbNO.d.ts +3 -0
- package/lib/locales/date/nbNO.js +11 -0
- package/lib/locales/index.d.ts +6 -0
- package/lib/locales/index.js +11 -1
- package/lib/locales/utils/index.d.ts +8 -0
- package/lib/locales/utils/index.js +8 -0
- package/lib/log/src/Log.d.ts +3 -0
- package/lib/mention/src/Mention.d.ts +4 -0
- package/lib/menu/index.d.ts +1 -1
- package/lib/menu/src/Menu.d.ts +32 -8
- package/lib/menu/src/Menu.js +31 -9
- package/lib/menu/src/MenuDivider.d.ts +2 -0
- package/lib/menu/src/MenuDivider.js +13 -0
- package/lib/menu/src/MenuOption.d.ts +11 -2
- package/lib/menu/src/MenuOptionContent.d.ts +7 -2
- package/lib/menu/src/Submenu.d.ts +21 -17
- 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 +33 -12
- package/lib/modal/src/BodyWrapper.js +6 -0
- package/lib/modal/src/Modal.d.ts +185 -65
- package/lib/modal/src/Modal.js +5 -1
- package/lib/modal/src/interface.d.ts +1 -0
- package/lib/modal/src/presetProps.d.ts +1 -1
- package/lib/modal/styles/light.d.ts +14 -5
- package/lib/notification/src/NotificationContainer.d.ts +3 -0
- package/lib/pagination/index.d.ts +1 -1
- package/lib/pagination/src/Pagination.d.ts +20 -12
- package/lib/pagination/src/Pagination.js +16 -6
- package/lib/pagination/src/interface.d.ts +2 -0
- package/lib/popconfirm/src/Popconfirm.d.ts +145 -52
- package/lib/popconfirm/src/PopconfirmPanel.d.ts +2 -2
- package/lib/popconfirm/styles/light.d.ts +14 -5
- package/lib/popselect/src/Popselect.d.ts +3 -0
- package/lib/popselect/src/PopselectPanel.d.ts +3 -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 +9 -2
- package/lib/select/src/Select.js +20 -14
- package/lib/slider/src/Slider.d.ts +70 -91
- package/lib/slider/src/Slider.js +324 -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/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 +13 -16
- package/lib/tabs/src/TabPane.d.ts +1 -0
- package/lib/tabs/src/TabPane.js +2 -1
- package/lib/tabs/src/Tabs.d.ts +4 -0
- package/lib/tabs/src/Tabs.js +64 -20
- package/lib/tabs/src/interface.d.ts +3 -2
- 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 +3 -0
- package/lib/time-picker/src/Panel.d.ts +17 -5
- package/lib/time-picker/src/TimePicker.d.ts +144 -50
- package/lib/time-picker/src/TimePicker.js +3 -0
- package/lib/time-picker/styles/light.d.ts +14 -5
- package/lib/tooltip/src/Tooltip.d.ts +3 -0
- package/lib/transfer/src/Transfer.d.ts +145 -52
- package/lib/transfer/src/TransferFilter.d.ts +17 -5
- package/lib/transfer/src/TransferList.d.ts +17 -5
- package/lib/transfer/src/TransferListItem.d.ts +17 -5
- package/lib/transfer/styles/light.d.ts +14 -5
- package/lib/tree/src/Tree.d.ts +13 -9
- package/lib/tree/src/Tree.js +58 -22
- package/lib/tree/src/TreeNode.js +4 -4
- package/lib/tree/src/TreeNodeCheckbox.d.ts +3 -0
- package/lib/tree/src/TreeNodeSwitcher.d.ts +1 -1
- package/lib/tree/src/interface.d.ts +1 -1
- package/lib/tree/src/utils.d.ts +1 -1
- package/lib/tree/src/utils.js +4 -4
- package/lib/tree-select/src/TreeSelect.d.ts +5 -2
- package/lib/upload/src/Upload.d.ts +146 -52
- package/lib/upload/src/Upload.js +6 -10
- package/lib/upload/src/UploadFile.d.ts +18 -6
- package/lib/upload/src/UploadFile.js +1 -1
- package/lib/upload/src/UploadProgress.d.ts +17 -5
- package/lib/upload/src/UploadTrigger.js +2 -2
- package/lib/upload/src/interface.d.ts +2 -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 +5 -5
- package/web-types.json +182 -9
|
@@ -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: number;
|
|
52
|
+
colorOpacitySecondaryHover: number;
|
|
53
|
+
colorOpacitySecondaryPressed: number;
|
|
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.0";
|
|
2
2
|
export default _default;
|
package/es/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '2.
|
|
1
|
+
export default '2.21.0';
|
|
@@ -282,6 +282,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
282
282
|
pressedColor: string;
|
|
283
283
|
opacityDisabled: string;
|
|
284
284
|
inputColorDisabled: string;
|
|
285
|
+
buttonColor2: string;
|
|
286
|
+
buttonColor2Hover: string;
|
|
287
|
+
buttonColor2Pressed: string;
|
|
285
288
|
boxShadow1: string;
|
|
286
289
|
boxShadow2: string;
|
|
287
290
|
boxShadow3: string;
|
|
@@ -460,8 +463,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
460
463
|
show: boolean;
|
|
461
464
|
multiple: boolean;
|
|
462
465
|
focusable: boolean;
|
|
463
|
-
clsPrefix: string;
|
|
464
466
|
loading: boolean;
|
|
467
|
+
clsPrefix: string;
|
|
465
468
|
scrollable: boolean;
|
|
466
469
|
treeMate: SelectTreeMate;
|
|
467
470
|
autoPending: boolean;
|
|
@@ -335,6 +335,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
335
335
|
pressedColor: string;
|
|
336
336
|
opacityDisabled: string;
|
|
337
337
|
inputColorDisabled: string;
|
|
338
|
+
buttonColor2: string;
|
|
339
|
+
buttonColor2Hover: string;
|
|
340
|
+
buttonColor2Pressed: string;
|
|
338
341
|
boxShadow1: string;
|
|
339
342
|
boxShadow2: string;
|
|
340
343
|
boxShadow3: string;
|
|
@@ -569,8 +572,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
569
572
|
active: boolean;
|
|
570
573
|
disabled: boolean;
|
|
571
574
|
autofocus: boolean;
|
|
572
|
-
clsPrefix: string;
|
|
573
575
|
loading: boolean;
|
|
576
|
+
clsPrefix: string;
|
|
574
577
|
showArrow: boolean;
|
|
575
578
|
selectedOption: SelectBaseOption<string | number, string | ((option: SelectBaseOption<string | number, string | any>, selected: boolean) => import("vue").VNodeChild)> | null;
|
|
576
579
|
selectedOptions: SelectBaseOption<string | number, string | ((option: SelectBaseOption<string | number, string | any>, selected: boolean) => import("vue").VNodeChild)>[] | null;
|
|
@@ -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;
|
|
@@ -21,8 +24,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
21
24
|
loading?: unknown;
|
|
22
25
|
onClear?: unknown;
|
|
23
26
|
} & {
|
|
24
|
-
clsPrefix: string;
|
|
25
27
|
loading: boolean;
|
|
28
|
+
clsPrefix: string;
|
|
26
29
|
} & {
|
|
27
30
|
showArrow?: boolean | undefined;
|
|
28
31
|
onClear?: ((e: MouseEvent) => void) | undefined;
|
|
@@ -92,5 +92,5 @@ const derived = Object.assign(Object.assign({ name: 'common' }, _common_1.defaul
|
|
|
92
92
|
// close
|
|
93
93
|
closeColorHover: overlay(Number(base.alphaClose) * 1.25), closeColor: overlay(Number(base.alphaClose)), closeColorPressed: overlay(Number(base.alphaClose) * 0.8), closeColorDisabled: overlay(base.alpha4),
|
|
94
94
|
// 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)' });
|
|
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), 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
96
|
exports.default = derived;
|
|
@@ -70,6 +70,9 @@ declare const derived: {
|
|
|
70
70
|
pressedColor: string;
|
|
71
71
|
opacityDisabled: string;
|
|
72
72
|
inputColorDisabled: string;
|
|
73
|
+
buttonColor2: string;
|
|
74
|
+
buttonColor2Hover: string;
|
|
75
|
+
buttonColor2Pressed: string;
|
|
73
76
|
boxShadow1: string;
|
|
74
77
|
boxShadow2: string;
|
|
75
78
|
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.02)', pressedColor: 'rgb(237, 237, 239)', opacityDisabled: base.alphaDisabled, inputColorDisabled: 'rgb(250, 250, 252)',
|
|
97
|
+
tableColorHover: '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
|
@@ -440,6 +440,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
440
440
|
pressedColor: string;
|
|
441
441
|
opacityDisabled: string;
|
|
442
442
|
inputColorDisabled: string;
|
|
443
|
+
buttonColor2: string;
|
|
444
|
+
buttonColor2Hover: string;
|
|
445
|
+
buttonColor2Pressed: string;
|
|
443
446
|
boxShadow1: string;
|
|
444
447
|
boxShadow2: string;
|
|
445
448
|
boxShadow3: string;
|
package/lib/alert/src/Alert.js
CHANGED
|
@@ -45,7 +45,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
45
45
|
const themeRef = (0, _mixins_1.useTheme)('Alert', 'Alert', index_cssr_1.default, styles_1.alertLight, props, mergedClsPrefixRef);
|
|
46
46
|
const cssVars = (0, vue_1.computed)(() => {
|
|
47
47
|
const { common: { cubicBezierEaseInOut }, self } = themeRef.value;
|
|
48
|
-
const { fontSize, borderRadius, titleFontWeight, lineHeight,
|
|
48
|
+
const { fontSize, borderRadius, titleFontWeight, lineHeight, iconSize, iconMargin, closeSize, closeMargin, padding } = self;
|
|
49
49
|
const { type } = props;
|
|
50
50
|
const { left, right } = (0, seemly_1.getMargin)(iconMargin);
|
|
51
51
|
return {
|
|
@@ -56,8 +56,8 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
56
56
|
'--close-color-pressed': self[(0, _utils_1.createKey)('closeColorPressed', type)],
|
|
57
57
|
'--icon-color': self[(0, _utils_1.createKey)('iconColor', type)],
|
|
58
58
|
'--border': self[(0, _utils_1.createKey)('border', type)],
|
|
59
|
-
'--title-text-color': titleTextColor,
|
|
60
|
-
'--content-text-color': contentTextColor,
|
|
59
|
+
'--title-text-color': self[(0, _utils_1.createKey)('titleTextColor', type)],
|
|
60
|
+
'--content-text-color': self[(0, _utils_1.createKey)('contentTextColor', type)],
|
|
61
61
|
'--line-height': lineHeight,
|
|
62
62
|
'--border-radius': borderRadius,
|
|
63
63
|
'--font-size': fontSize,
|
|
@@ -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>;
|
|
@@ -892,6 +894,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
892
894
|
pressedColor: string;
|
|
893
895
|
opacityDisabled: string;
|
|
894
896
|
inputColorDisabled: string;
|
|
897
|
+
buttonColor2: string;
|
|
898
|
+
buttonColor2Hover: string;
|
|
899
|
+
buttonColor2Pressed: string;
|
|
895
900
|
boxShadow1: string;
|
|
896
901
|
boxShadow2: string;
|
|
897
902
|
boxShadow3: string;
|
|
@@ -1084,6 +1089,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1084
1089
|
readonly blurAfterSelect?: unknown;
|
|
1085
1090
|
readonly clearAfterSelect?: unknown;
|
|
1086
1091
|
readonly getShow?: unknown;
|
|
1092
|
+
readonly inputProps?: unknown;
|
|
1087
1093
|
readonly size?: unknown;
|
|
1088
1094
|
readonly options?: unknown;
|
|
1089
1095
|
readonly zIndex?: unknown;
|
|
@@ -1463,6 +1469,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1463
1469
|
loading?: boolean | undefined;
|
|
1464
1470
|
bordered?: boolean | undefined;
|
|
1465
1471
|
clearable?: boolean | undefined;
|
|
1472
|
+
inputProps?: InputHTMLAttributes | undefined;
|
|
1466
1473
|
"onUpdate:value"?: MaybeArray<OnUpdateValue> | undefined;
|
|
1467
1474
|
onUpdateValue?: MaybeArray<OnUpdateValue> | undefined;
|
|
1468
1475
|
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,7 @@ 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
241
|
}
|
|
242
242
|
}),
|
|
243
243
|
(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;
|