naive-ui 2.23.1 → 2.23.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/_internal/clear/src/styles/index.cssr.js +10 -10
- package/es/_internal/close/src/styles/index.cssr.js +9 -10
- package/es/_internal/icons/Close.js +1 -1
- package/es/_internal/scrollbar/src/ScrollBar.d.ts +6 -6
- package/es/_internal/scrollbar/src/ScrollBar.js +11 -10
- package/es/_internal/scrollbar/src/styles/index.cssr.js +15 -15
- package/es/_internal/select-menu/src/SelectMenu.d.ts +21 -21
- package/es/_internal/select-menu/src/SelectMenu.js +21 -21
- package/es/_internal/select-menu/src/styles/index.cssr.js +35 -35
- package/es/_internal/select-menu/styles/_common.js +1 -1
- package/es/_internal/selection/src/Selection.d.ts +44 -44
- package/es/_internal/selection/src/Selection.js +44 -44
- package/es/_internal/selection/src/styles/index.cssr.js +78 -78
- package/es/_mixins/common.d.ts +1 -0
- package/es/_mixins/common.js +1 -0
- package/es/_mixins/index.d.ts +1 -0
- package/es/_mixins/index.js +1 -0
- package/es/_mixins/use-css-vars-class.d.ts +2 -0
- package/es/_mixins/use-css-vars-class.js +22 -0
- package/es/_mixins/use-rtl.js +2 -0
- package/es/_mixins/use-style.js +3 -0
- package/es/_mixins/use-theme.js +3 -0
- package/es/_utils/composable/use-houdini.js +2 -2
- package/es/alert/src/Alert.d.ts +2 -2
- package/es/avatar/index.d.ts +2 -0
- package/es/avatar/index.js +1 -0
- package/es/avatar/src/Avatar.d.ts +67 -28
- package/es/avatar/src/Avatar.js +39 -11
- package/es/avatar/src/AvatarGroup.d.ts +52 -0
- package/es/avatar/src/AvatarGroup.js +61 -0
- package/es/avatar/src/interface.d.ts +2 -0
- package/es/avatar/src/interface.js +1 -0
- package/es/avatar/src/styles/avatar-group.cssr.d.ts +2 -0
- package/es/avatar/src/styles/avatar-group.cssr.js +14 -0
- package/es/avatar/src/styles/index.cssr.js +8 -3
- package/es/avatar/styles/light.d.ts +3 -0
- package/es/avatar/styles/light.js +6 -2
- package/es/breadcrumb/src/Breadcrumb.d.ts +8 -8
- package/es/breadcrumb/src/Breadcrumb.js +8 -8
- package/es/breadcrumb/src/styles/index.cssr.js +23 -23
- package/es/calendar/src/Calendar.d.ts +21 -21
- package/es/calendar/src/Calendar.js +21 -21
- package/es/calendar/src/styles/index.cssr.js +57 -57
- package/es/card/src/Card.d.ts +28 -23
- package/es/card/src/Card.js +24 -23
- package/es/card/src/styles/index.cssr.js +71 -69
- package/es/carousel/src/Carousel.d.ts +5 -5
- package/es/carousel/src/Carousel.js +5 -5
- package/es/carousel/src/styles/index.cssr.js +10 -10
- package/es/cascader/src/Cascader.d.ts +25 -17
- package/es/cascader/src/Cascader.js +30 -20
- package/es/cascader/src/CascaderMenu.js +1 -1
- package/es/cascader/src/styles/index.cssr.js +44 -44
- package/es/cascader/styles/light.js +1 -1
- package/es/checkbox/src/Checkbox.d.ts +23 -23
- package/es/checkbox/src/Checkbox.js +23 -23
- package/es/checkbox/src/styles/index.cssr.js +58 -58
- package/es/code/src/Code.d.ts +14 -14
- package/es/code/src/Code.js +26 -17
- package/es/code/src/styles/index.cssr.js +28 -28
- package/es/collapse/src/Collapse.d.ts +8 -8
- package/es/collapse/src/Collapse.js +8 -8
- package/es/collapse/src/styles/index.cssr.js +24 -24
- package/es/collapse-transition/src/CollapseTransition.d.ts +1 -1
- package/es/collapse-transition/src/CollapseTransition.js +1 -1
- package/es/color-picker/src/ColorPicker.d.ts +10 -10
- package/es/color-picker/src/ColorPicker.js +10 -10
- package/es/color-picker/src/styles/index.cssr.js +28 -28
- package/es/components.d.ts +2 -0
- package/es/components.js +2 -0
- package/es/countdown/index.d.ts +2 -0
- package/es/countdown/index.js +1 -0
- package/es/countdown/src/Countdown.d.ts +72 -0
- package/es/countdown/src/Countdown.js +126 -0
- package/es/countdown/src/utils.d.ts +0 -0
- package/es/countdown/src/utils.js +1 -0
- package/es/data-table/src/DataTable.d.ts +39 -39
- package/es/data-table/src/DataTable.js +42 -42
- package/es/data-table/src/TableParts/Body.js +6 -4
- package/es/data-table/src/styles/index.cssr.js +130 -130
- package/es/date-picker/src/DatePicker.d.ts +45 -45
- package/es/date-picker/src/DatePicker.js +45 -45
- package/es/date-picker/src/styles/index.cssr.js +115 -115
- package/es/descriptions/src/Descriptions.d.ts +18 -18
- package/es/descriptions/src/Descriptions.js +19 -20
- package/es/descriptions/src/styles/index.cssr.js +61 -61
- package/es/dialog/src/Dialog.d.ts +3 -3
- package/es/dialog/src/Dialog.js +3 -3
- package/es/dialog/src/DialogEnvironment.d.ts +2 -2
- package/es/dialog/src/DialogProvider.d.ts +1 -1
- package/es/drawer/src/Drawer.d.ts +19 -19
- package/es/drawer/src/Drawer.js +19 -19
- package/es/drawer/src/styles/index.cssr.js +41 -40
- package/es/dropdown/src/Dropdown.js +34 -32
- package/es/dropdown/src/styles/index.cssr.js +59 -59
- package/es/empty/src/Empty.d.ts +19 -15
- package/es/empty/src/Empty.js +12 -12
- package/es/empty/src/styles/index.cssr.js +20 -19
- package/es/form/src/FormItem.d.ts +15 -15
- package/es/form/src/FormItem.js +15 -15
- package/es/form/src/FormItemCol.d.ts +6 -0
- package/es/form/src/FormItemCol.js +1 -0
- package/es/form/src/FormItemGridItem.d.ts +6 -0
- package/es/form/src/FormItemGridItem.js +1 -0
- package/es/form/src/FormItemRow.d.ts +6 -0
- package/es/form/src/FormItemRow.js +1 -0
- package/es/form/src/styles/form-item.cssr.js +37 -37
- package/es/gradient-text/src/GradientText.d.ts +5 -5
- package/es/gradient-text/src/GradientText.js +5 -5
- package/es/gradient-text/src/styles/index.cssr.js +9 -9
- package/es/icon/src/Icon.d.ts +6 -6
- package/es/icon/src/Icon.js +4 -4
- package/es/icon/src/styles/index.cssr.js +7 -7
- package/es/image/src/ImagePreview.d.ts +2 -2
- package/es/image/src/ImagePreview.js +13 -12
- package/es/image/src/styles/index.cssr.js +5 -5
- package/es/input/src/Input.d.ts +52 -47
- package/es/input/src/Input.js +54 -49
- package/es/input/src/InputGroupLabel.d.ts +8 -8
- package/es/input/src/InputGroupLabel.js +8 -8
- package/es/input/src/styles/input-group-label.cssr.js +18 -18
- package/es/input/src/styles/input.cssr.js +108 -109
- package/es/input-number/src/InputNumber.d.ts +11 -0
- package/es/input-number/src/InputNumber.js +5 -2
- package/es/input-number/src/utils.js +2 -1
- package/es/layout/src/Layout.d.ts +6 -6
- package/es/layout/src/Layout.js +3 -3
- package/es/layout/src/LayoutContent.d.ts +3 -3
- package/es/layout/src/LayoutFooter.js +7 -7
- package/es/layout/src/LayoutHeader.js +7 -7
- package/es/layout/src/LayoutSider.js +13 -13
- package/es/layout/src/styles/layout-footer.cssr.js +11 -11
- package/es/layout/src/styles/layout-header.cssr.js +11 -11
- package/es/layout/src/styles/layout-sider.cssr.js +32 -32
- package/es/layout/src/styles/layout.cssr.js +8 -8
- package/es/list/src/List.d.ts +10 -10
- package/es/list/src/List.js +10 -10
- package/es/list/src/styles/index.cssr.js +30 -30
- package/es/loading-bar/src/LoadingBar.d.ts +3 -3
- package/es/loading-bar/src/LoadingBar.js +3 -3
- package/es/loading-bar/src/styles/index.cssr.js +7 -7
- package/es/locales/common/frFR.js +7 -8
- package/es/mention/src/Mention.d.ts +1 -1
- package/es/mention/src/Mention.js +1 -1
- package/es/mention/src/styles/index.cssr.js +2 -2
- package/es/menu/src/Menu.js +43 -40
- package/es/menu/src/styles/index.cssr.js +71 -71
- package/es/message/src/Message.d.ts +22 -22
- package/es/message/src/Message.js +22 -22
- package/es/message/src/styles/index.cssr.js +48 -48
- package/es/modal/src/BodyWrapper.d.ts +11 -2
- package/es/modal/src/BodyWrapper.js +23 -17
- package/es/modal/src/Modal.d.ts +14 -8
- package/es/modal/src/Modal.js +13 -7
- package/es/modal/src/presetProps.d.ts +2 -1
- package/es/modal/src/styles/index.cssr.js +8 -8
- package/es/notification/src/Notification.d.ts +24 -24
- package/es/notification/src/Notification.js +24 -24
- package/es/notification/src/styles/index.cssr.js +65 -65
- package/es/number-animation/index.d.ts +3 -0
- package/es/number-animation/index.js +1 -0
- package/es/number-animation/src/NumberAnimation.d.ts +79 -0
- package/es/number-animation/src/NumberAnimation.js +81 -0
- package/es/number-animation/src/utils.d.ts +8 -0
- package/es/number-animation/src/utils.js +17 -0
- package/es/page-header/src/PageHeader.d.ts +10 -10
- package/es/page-header/src/PageHeader.js +10 -10
- package/es/page-header/src/styles/index.cssr.js +23 -23
- package/es/pagination/src/Pagination.d.ts +42 -41
- package/es/pagination/src/Pagination.js +52 -45
- package/es/pagination/src/styles/index.cssr.js +81 -81
- package/es/popconfirm/src/Popconfirm.d.ts +2 -2
- package/es/popconfirm/src/PopconfirmPanel.d.ts +4 -4
- package/es/popconfirm/src/PopconfirmPanel.js +4 -4
- package/es/popconfirm/src/styles/index.cssr.js +8 -8
- package/es/popover/src/PopoverBody.js +15 -15
- package/es/popover/src/styles/index.cssr.js +62 -62
- package/es/progress/src/Progress.d.ts +14 -14
- package/es/progress/src/Progress.js +14 -14
- package/es/progress/src/styles/index.cssr.js +53 -53
- package/es/radio/src/Radio.d.ts +15 -15
- package/es/radio/src/Radio.js +15 -15
- package/es/radio/src/RadioGroup.d.ts +14 -14
- package/es/radio/src/RadioGroup.js +14 -14
- package/es/radio/src/styles/radio-group.cssr.js +43 -43
- package/es/radio/src/styles/radio.cssr.js +36 -36
- package/es/rate/src/Rate.d.ts +4 -4
- package/es/rate/src/Rate.js +4 -4
- package/es/rate/src/styles/index.cssr.js +11 -11
- package/es/result/src/Result.d.ts +9 -9
- package/es/result/src/Result.js +9 -9
- package/es/result/src/styles/index.cssr.js +20 -20
- package/es/select/src/Select.d.ts +1 -1
- package/es/select/src/Select.js +1 -1
- package/es/select/src/styles/index.cssr.js +2 -2
- package/es/skeleton/src/Skeleton.d.ts +3 -3
- package/es/skeleton/src/Skeleton.js +3 -3
- package/es/skeleton/src/styles/index.cssr.js +12 -12
- package/es/slider/src/Slider.d.ts +29 -29
- package/es/slider/src/Slider.js +29 -29
- package/es/slider/src/styles/index.cssr.js +87 -87
- package/es/spin/src/Spin.d.ts +5 -5
- package/es/spin/src/Spin.js +5 -5
- package/es/spin/src/styles/index.cssr.js +15 -15
- package/es/statistic/src/Statistic.d.ts +25 -45
- package/es/statistic/src/Statistic.js +12 -19
- package/es/statistic/src/styles/index.cssr.js +19 -19
- package/es/table/src/Table.d.ts +21 -21
- package/es/table/src/Table.js +21 -21
- package/es/table/src/styles/index.cssr.js +55 -55
- package/es/tabs/src/styles/index.cssr.js +4 -1
- package/es/tabs/styles/light.js +1 -1
- package/es/tag/src/Tag.d.ts +1 -0
- package/es/tag/src/Tag.js +1 -0
- package/es/thing/src/Thing.js +5 -5
- package/es/thing/src/styles/index.cssr.js +11 -11
- package/es/time-picker/src/TimePicker.d.ts +2 -2
- package/es/transfer/src/Transfer.d.ts +21 -21
- package/es/transfer/src/Transfer.js +21 -21
- package/es/transfer/src/TransferList.js +5 -7
- package/es/transfer/src/styles/index.cssr.js +38 -38
- package/es/upload/src/Upload.d.ts +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/_internal/clear/src/styles/index.cssr.js +10 -10
- package/lib/_internal/close/src/styles/index.cssr.js +9 -10
- package/lib/_internal/icons/Close.js +1 -1
- package/lib/_internal/scrollbar/src/ScrollBar.d.ts +6 -6
- package/lib/_internal/scrollbar/src/ScrollBar.js +11 -10
- package/lib/_internal/scrollbar/src/styles/index.cssr.js +15 -15
- package/lib/_internal/select-menu/src/SelectMenu.d.ts +21 -21
- package/lib/_internal/select-menu/src/SelectMenu.js +21 -21
- package/lib/_internal/select-menu/src/styles/index.cssr.js +35 -35
- package/lib/_internal/select-menu/styles/_common.js +1 -1
- package/lib/_internal/selection/src/Selection.d.ts +44 -44
- package/lib/_internal/selection/src/Selection.js +44 -44
- package/lib/_internal/selection/src/styles/index.cssr.js +78 -78
- package/lib/_mixins/common.d.ts +1 -0
- package/lib/_mixins/common.js +4 -0
- package/lib/_mixins/index.d.ts +1 -0
- package/lib/_mixins/index.js +3 -1
- package/lib/_mixins/use-css-vars-class.d.ts +2 -0
- package/lib/_mixins/use-css-vars-class.js +29 -0
- package/lib/_mixins/use-rtl.js +2 -0
- package/lib/_mixins/use-style.js +3 -0
- package/lib/_mixins/use-theme.js +3 -0
- package/lib/_utils/composable/use-houdini.js +2 -2
- package/lib/alert/src/Alert.d.ts +2 -2
- package/lib/avatar/index.d.ts +2 -0
- package/lib/avatar/index.js +3 -1
- package/lib/avatar/src/Avatar.d.ts +67 -28
- package/lib/avatar/src/Avatar.js +41 -12
- package/lib/avatar/src/AvatarGroup.d.ts +52 -0
- package/lib/avatar/src/AvatarGroup.js +67 -0
- package/lib/avatar/src/interface.d.ts +2 -0
- package/lib/avatar/src/interface.js +2 -0
- package/lib/avatar/src/styles/avatar-group.cssr.d.ts +2 -0
- package/lib/avatar/src/styles/avatar-group.cssr.js +21 -0
- package/lib/avatar/src/styles/index.cssr.js +7 -2
- package/lib/avatar/styles/light.d.ts +3 -0
- package/lib/avatar/styles/light.js +6 -2
- package/lib/breadcrumb/src/Breadcrumb.d.ts +8 -8
- package/lib/breadcrumb/src/Breadcrumb.js +8 -8
- package/lib/breadcrumb/src/styles/index.cssr.js +23 -23
- package/lib/calendar/src/Calendar.d.ts +21 -21
- package/lib/calendar/src/Calendar.js +21 -21
- package/lib/calendar/src/styles/index.cssr.js +57 -57
- package/lib/card/src/Card.d.ts +28 -23
- package/lib/card/src/Card.js +24 -23
- package/lib/card/src/styles/index.cssr.js +71 -69
- package/lib/carousel/src/Carousel.d.ts +5 -5
- package/lib/carousel/src/Carousel.js +5 -5
- package/lib/carousel/src/styles/index.cssr.js +10 -10
- package/lib/cascader/src/Cascader.d.ts +25 -17
- package/lib/cascader/src/Cascader.js +30 -20
- package/lib/cascader/src/CascaderMenu.js +1 -1
- package/lib/cascader/src/styles/index.cssr.js +44 -44
- package/lib/cascader/styles/light.js +1 -1
- package/lib/checkbox/src/Checkbox.d.ts +23 -23
- package/lib/checkbox/src/Checkbox.js +23 -23
- package/lib/checkbox/src/styles/index.cssr.js +58 -58
- package/lib/code/src/Code.d.ts +14 -14
- package/lib/code/src/Code.js +26 -17
- package/lib/code/src/styles/index.cssr.js +28 -28
- package/lib/collapse/src/Collapse.d.ts +8 -8
- package/lib/collapse/src/Collapse.js +8 -8
- package/lib/collapse/src/styles/index.cssr.js +24 -24
- package/lib/collapse-transition/src/CollapseTransition.d.ts +1 -1
- package/lib/collapse-transition/src/CollapseTransition.js +1 -1
- package/lib/color-picker/src/ColorPicker.d.ts +10 -10
- package/lib/color-picker/src/ColorPicker.js +10 -10
- package/lib/color-picker/src/styles/index.cssr.js +28 -28
- package/lib/components.d.ts +2 -0
- package/lib/components.js +2 -0
- package/lib/countdown/index.d.ts +2 -0
- package/lib/countdown/index.js +8 -0
- package/lib/countdown/src/Countdown.d.ts +72 -0
- package/lib/countdown/src/Countdown.js +128 -0
- package/lib/countdown/src/utils.d.ts +0 -0
- package/lib/countdown/src/utils.js +1 -0
- package/lib/data-table/src/DataTable.d.ts +39 -39
- package/lib/data-table/src/DataTable.js +42 -42
- package/lib/data-table/src/TableParts/Body.js +6 -4
- package/lib/data-table/src/styles/index.cssr.js +130 -130
- package/lib/date-picker/src/DatePicker.d.ts +45 -45
- package/lib/date-picker/src/DatePicker.js +45 -45
- package/lib/date-picker/src/styles/index.cssr.js +115 -115
- package/lib/descriptions/src/Descriptions.d.ts +18 -18
- package/lib/descriptions/src/Descriptions.js +19 -20
- package/lib/descriptions/src/styles/index.cssr.js +61 -61
- package/lib/dialog/src/Dialog.d.ts +3 -3
- package/lib/dialog/src/Dialog.js +3 -3
- package/lib/dialog/src/DialogEnvironment.d.ts +2 -2
- package/lib/dialog/src/DialogProvider.d.ts +1 -1
- package/lib/drawer/src/Drawer.d.ts +19 -19
- package/lib/drawer/src/Drawer.js +19 -19
- package/lib/drawer/src/styles/index.cssr.js +41 -40
- package/lib/dropdown/src/Dropdown.js +34 -32
- package/lib/dropdown/src/styles/index.cssr.js +59 -59
- package/lib/empty/src/Empty.d.ts +19 -15
- package/lib/empty/src/Empty.js +12 -12
- package/lib/empty/src/styles/index.cssr.js +19 -18
- package/lib/form/src/FormItem.d.ts +15 -15
- package/lib/form/src/FormItem.js +15 -15
- package/lib/form/src/FormItemCol.d.ts +6 -0
- package/lib/form/src/FormItemCol.js +1 -0
- package/lib/form/src/FormItemGridItem.d.ts +6 -0
- package/lib/form/src/FormItemGridItem.js +1 -0
- package/lib/form/src/FormItemRow.d.ts +6 -0
- package/lib/form/src/FormItemRow.js +1 -0
- package/lib/form/src/styles/form-item.cssr.js +37 -37
- package/lib/gradient-text/src/GradientText.d.ts +5 -5
- package/lib/gradient-text/src/GradientText.js +5 -5
- package/lib/gradient-text/src/styles/index.cssr.js +9 -9
- package/lib/icon/src/Icon.d.ts +6 -6
- package/lib/icon/src/Icon.js +4 -4
- package/lib/icon/src/styles/index.cssr.js +7 -7
- package/lib/image/src/ImagePreview.d.ts +2 -2
- package/lib/image/src/ImagePreview.js +12 -11
- package/lib/image/src/styles/index.cssr.js +5 -5
- package/lib/input/src/Input.d.ts +52 -47
- package/lib/input/src/Input.js +54 -49
- package/lib/input/src/InputGroupLabel.d.ts +8 -8
- package/lib/input/src/InputGroupLabel.js +8 -8
- package/lib/input/src/styles/input-group-label.cssr.js +18 -18
- package/lib/input/src/styles/input.cssr.js +108 -109
- package/lib/input-number/src/InputNumber.d.ts +11 -0
- package/lib/input-number/src/InputNumber.js +5 -2
- package/lib/input-number/src/utils.js +2 -1
- package/lib/layout/src/Layout.d.ts +6 -6
- package/lib/layout/src/Layout.js +3 -3
- package/lib/layout/src/LayoutContent.d.ts +3 -3
- package/lib/layout/src/LayoutFooter.js +7 -7
- package/lib/layout/src/LayoutHeader.js +7 -7
- package/lib/layout/src/LayoutSider.js +13 -13
- package/lib/layout/src/styles/layout-footer.cssr.js +11 -11
- package/lib/layout/src/styles/layout-header.cssr.js +11 -11
- package/lib/layout/src/styles/layout-sider.cssr.js +32 -32
- package/lib/layout/src/styles/layout.cssr.js +8 -8
- package/lib/list/src/List.d.ts +10 -10
- package/lib/list/src/List.js +10 -10
- package/lib/list/src/styles/index.cssr.js +30 -30
- package/lib/loading-bar/src/LoadingBar.d.ts +3 -3
- package/lib/loading-bar/src/LoadingBar.js +3 -3
- package/lib/loading-bar/src/styles/index.cssr.js +7 -7
- package/lib/locales/common/frFR.js +7 -8
- package/lib/mention/src/Mention.d.ts +1 -1
- package/lib/mention/src/Mention.js +1 -1
- package/lib/mention/src/styles/index.cssr.js +2 -2
- package/lib/menu/src/Menu.js +43 -40
- package/lib/menu/src/styles/index.cssr.js +71 -71
- package/lib/message/src/Message.d.ts +22 -22
- package/lib/message/src/Message.js +22 -22
- package/lib/message/src/styles/index.cssr.js +48 -48
- package/lib/modal/src/BodyWrapper.d.ts +11 -2
- package/lib/modal/src/BodyWrapper.js +23 -17
- package/lib/modal/src/Modal.d.ts +14 -8
- package/lib/modal/src/Modal.js +13 -7
- package/lib/modal/src/presetProps.d.ts +2 -1
- package/lib/modal/src/styles/index.cssr.js +8 -8
- package/lib/notification/src/Notification.d.ts +24 -24
- package/lib/notification/src/Notification.js +24 -24
- package/lib/notification/src/styles/index.cssr.js +65 -65
- package/lib/number-animation/index.d.ts +3 -0
- package/lib/number-animation/index.js +8 -0
- package/lib/number-animation/src/NumberAnimation.d.ts +79 -0
- package/lib/number-animation/src/NumberAnimation.js +83 -0
- package/lib/number-animation/src/utils.d.ts +8 -0
- package/lib/number-animation/src/utils.js +21 -0
- package/lib/page-header/src/PageHeader.d.ts +10 -10
- package/lib/page-header/src/PageHeader.js +10 -10
- package/lib/page-header/src/styles/index.cssr.js +23 -23
- package/lib/pagination/src/Pagination.d.ts +42 -41
- package/lib/pagination/src/Pagination.js +52 -45
- package/lib/pagination/src/styles/index.cssr.js +81 -81
- package/lib/popconfirm/src/Popconfirm.d.ts +2 -2
- package/lib/popconfirm/src/PopconfirmPanel.d.ts +4 -4
- package/lib/popconfirm/src/PopconfirmPanel.js +4 -4
- package/lib/popconfirm/src/styles/index.cssr.js +8 -8
- package/lib/popover/src/PopoverBody.js +15 -15
- package/lib/popover/src/styles/index.cssr.js +62 -62
- package/lib/progress/src/Progress.d.ts +14 -14
- package/lib/progress/src/Progress.js +14 -14
- package/lib/progress/src/styles/index.cssr.js +53 -53
- package/lib/radio/src/Radio.d.ts +15 -15
- package/lib/radio/src/Radio.js +15 -15
- package/lib/radio/src/RadioGroup.d.ts +14 -14
- package/lib/radio/src/RadioGroup.js +14 -14
- package/lib/radio/src/styles/radio-group.cssr.js +43 -43
- package/lib/radio/src/styles/radio.cssr.js +36 -36
- package/lib/rate/src/Rate.d.ts +4 -4
- package/lib/rate/src/Rate.js +4 -4
- package/lib/rate/src/styles/index.cssr.js +11 -11
- package/lib/result/src/Result.d.ts +9 -9
- package/lib/result/src/Result.js +9 -9
- package/lib/result/src/styles/index.cssr.js +20 -20
- package/lib/select/src/Select.d.ts +1 -1
- package/lib/select/src/Select.js +1 -1
- package/lib/select/src/styles/index.cssr.js +2 -2
- package/lib/skeleton/src/Skeleton.d.ts +3 -3
- package/lib/skeleton/src/Skeleton.js +3 -3
- package/lib/skeleton/src/styles/index.cssr.js +12 -12
- package/lib/slider/src/Slider.d.ts +29 -29
- package/lib/slider/src/Slider.js +29 -29
- package/lib/slider/src/styles/index.cssr.js +87 -87
- package/lib/spin/src/Spin.d.ts +5 -5
- package/lib/spin/src/Spin.js +5 -5
- package/lib/spin/src/styles/index.cssr.js +15 -15
- package/lib/statistic/src/Statistic.d.ts +25 -45
- package/lib/statistic/src/Statistic.js +12 -19
- package/lib/statistic/src/styles/index.cssr.js +19 -19
- package/lib/table/src/Table.d.ts +21 -21
- package/lib/table/src/Table.js +21 -21
- package/lib/table/src/styles/index.cssr.js +55 -55
- package/lib/tabs/src/styles/index.cssr.js +4 -1
- package/lib/tabs/styles/light.js +1 -1
- package/lib/tag/src/Tag.d.ts +1 -0
- package/lib/tag/src/Tag.js +1 -0
- package/lib/thing/src/Thing.js +5 -5
- package/lib/thing/src/styles/index.cssr.js +11 -11
- package/lib/time-picker/src/TimePicker.d.ts +2 -2
- package/lib/transfer/src/Transfer.d.ts +21 -21
- package/lib/transfer/src/Transfer.js +21 -21
- package/lib/transfer/src/TransferList.js +5 -7
- package/lib/transfer/src/styles/index.cssr.js +38 -38
- package/lib/upload/src/Upload.d.ts +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +11 -10
- package/web-types.json +230 -7
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
+
import type { Size, ObjectFit } from './interface';
|
|
2
3
|
import type { ExtractPublicPropTypes } from '../../_utils';
|
|
3
|
-
declare const avatarProps: {
|
|
4
|
-
readonly size:
|
|
5
|
-
readonly type: PropType<number | "small" | "medium" | "large">;
|
|
6
|
-
readonly default: "medium";
|
|
7
|
-
};
|
|
4
|
+
export declare const avatarProps: {
|
|
5
|
+
readonly size: PropType<Size>;
|
|
8
6
|
readonly src: StringConstructor;
|
|
9
|
-
readonly circle:
|
|
10
|
-
|
|
11
|
-
readonly
|
|
12
|
-
|
|
7
|
+
readonly circle: {
|
|
8
|
+
readonly type: BooleanConstructor;
|
|
9
|
+
readonly default: undefined;
|
|
10
|
+
};
|
|
11
|
+
readonly objectFit: PropType<ObjectFit>;
|
|
12
|
+
readonly round: {
|
|
13
|
+
readonly type: BooleanConstructor;
|
|
14
|
+
readonly default: undefined;
|
|
15
|
+
};
|
|
16
|
+
readonly bordered: {
|
|
17
|
+
readonly type: BooleanConstructor;
|
|
18
|
+
readonly default: undefined;
|
|
13
19
|
};
|
|
14
|
-
readonly round: BooleanConstructor;
|
|
15
20
|
readonly onError: PropType<(e: Event) => void>;
|
|
16
21
|
readonly fallbackSrc: StringConstructor;
|
|
17
22
|
/** @deprecated */
|
|
@@ -19,47 +24,60 @@ declare const avatarProps: {
|
|
|
19
24
|
readonly theme: PropType<import("../../_mixins").Theme<"Avatar", {
|
|
20
25
|
borderRadius: string;
|
|
21
26
|
fontSize: string;
|
|
27
|
+
border: string;
|
|
22
28
|
heightTiny: string;
|
|
23
29
|
heightSmall: string;
|
|
24
30
|
heightMedium: string;
|
|
25
31
|
heightLarge: string;
|
|
26
32
|
heightHuge: string;
|
|
27
33
|
color: string;
|
|
34
|
+
colorModal: string;
|
|
35
|
+
colorPopover: string;
|
|
28
36
|
}, any>>;
|
|
29
37
|
readonly themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Avatar", {
|
|
30
38
|
borderRadius: string;
|
|
31
39
|
fontSize: string;
|
|
40
|
+
border: string;
|
|
32
41
|
heightTiny: string;
|
|
33
42
|
heightSmall: string;
|
|
34
43
|
heightMedium: string;
|
|
35
44
|
heightLarge: string;
|
|
36
45
|
heightHuge: string;
|
|
37
46
|
color: string;
|
|
47
|
+
colorModal: string;
|
|
48
|
+
colorPopover: string;
|
|
38
49
|
}, any>>>;
|
|
39
50
|
readonly builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Avatar", {
|
|
40
51
|
borderRadius: string;
|
|
41
52
|
fontSize: string;
|
|
53
|
+
border: string;
|
|
42
54
|
heightTiny: string;
|
|
43
55
|
heightSmall: string;
|
|
44
56
|
heightMedium: string;
|
|
45
57
|
heightLarge: string;
|
|
46
58
|
heightHuge: string;
|
|
47
59
|
color: string;
|
|
60
|
+
colorModal: string;
|
|
61
|
+
colorPopover: string;
|
|
48
62
|
}, any>>>;
|
|
49
63
|
};
|
|
50
64
|
export declare type AvatarProps = ExtractPublicPropTypes<typeof avatarProps>;
|
|
51
65
|
declare const _default: import("vue").DefineComponent<{
|
|
52
|
-
readonly size:
|
|
53
|
-
readonly type: PropType<number | "small" | "medium" | "large">;
|
|
54
|
-
readonly default: "medium";
|
|
55
|
-
};
|
|
66
|
+
readonly size: PropType<Size>;
|
|
56
67
|
readonly src: StringConstructor;
|
|
57
|
-
readonly circle:
|
|
58
|
-
|
|
59
|
-
readonly
|
|
60
|
-
|
|
68
|
+
readonly circle: {
|
|
69
|
+
readonly type: BooleanConstructor;
|
|
70
|
+
readonly default: undefined;
|
|
71
|
+
};
|
|
72
|
+
readonly objectFit: PropType<ObjectFit>;
|
|
73
|
+
readonly round: {
|
|
74
|
+
readonly type: BooleanConstructor;
|
|
75
|
+
readonly default: undefined;
|
|
76
|
+
};
|
|
77
|
+
readonly bordered: {
|
|
78
|
+
readonly type: BooleanConstructor;
|
|
79
|
+
readonly default: undefined;
|
|
61
80
|
};
|
|
62
|
-
readonly round: BooleanConstructor;
|
|
63
81
|
readonly onError: PropType<(e: Event) => void>;
|
|
64
82
|
readonly fallbackSrc: StringConstructor;
|
|
65
83
|
/** @deprecated */
|
|
@@ -67,43 +85,55 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
67
85
|
readonly theme: PropType<import("../../_mixins").Theme<"Avatar", {
|
|
68
86
|
borderRadius: string;
|
|
69
87
|
fontSize: string;
|
|
88
|
+
border: string;
|
|
70
89
|
heightTiny: string;
|
|
71
90
|
heightSmall: string;
|
|
72
91
|
heightMedium: string;
|
|
73
92
|
heightLarge: string;
|
|
74
93
|
heightHuge: string;
|
|
75
94
|
color: string;
|
|
95
|
+
colorModal: string;
|
|
96
|
+
colorPopover: string;
|
|
76
97
|
}, any>>;
|
|
77
98
|
readonly themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Avatar", {
|
|
78
99
|
borderRadius: string;
|
|
79
100
|
fontSize: string;
|
|
101
|
+
border: string;
|
|
80
102
|
heightTiny: string;
|
|
81
103
|
heightSmall: string;
|
|
82
104
|
heightMedium: string;
|
|
83
105
|
heightLarge: string;
|
|
84
106
|
heightHuge: string;
|
|
85
107
|
color: string;
|
|
108
|
+
colorModal: string;
|
|
109
|
+
colorPopover: string;
|
|
86
110
|
}, any>>>;
|
|
87
111
|
readonly builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Avatar", {
|
|
88
112
|
borderRadius: string;
|
|
89
113
|
fontSize: string;
|
|
114
|
+
border: string;
|
|
90
115
|
heightTiny: string;
|
|
91
116
|
heightSmall: string;
|
|
92
117
|
heightMedium: string;
|
|
93
118
|
heightLarge: string;
|
|
94
119
|
heightHuge: string;
|
|
95
120
|
color: string;
|
|
121
|
+
colorModal: string;
|
|
122
|
+
colorPopover: string;
|
|
96
123
|
}, any>>>;
|
|
97
124
|
}, {
|
|
98
125
|
textRef: import("vue").Ref<HTMLElement | null>;
|
|
99
126
|
selfRef: import("vue").Ref<HTMLElement | null>;
|
|
100
|
-
mergedRoundRef: import("vue").ComputedRef<boolean>;
|
|
127
|
+
mergedRoundRef: import("vue").ComputedRef<boolean | undefined>;
|
|
101
128
|
mergedClsPrefix: import("vue").ComputedRef<string>;
|
|
102
129
|
fitTextTransform: () => void;
|
|
103
130
|
cssVars: import("vue").ComputedRef<{
|
|
104
131
|
'--n-font-size': string;
|
|
132
|
+
'--n-border': string;
|
|
105
133
|
'--n-border-radius': string;
|
|
106
134
|
'--n-color': string;
|
|
135
|
+
'--n-color-modal': string;
|
|
136
|
+
'--n-color-popover': string;
|
|
107
137
|
'--n-bezier': string;
|
|
108
138
|
'--n-merged-size': string;
|
|
109
139
|
}>;
|
|
@@ -115,56 +145,65 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
115
145
|
readonly circle?: unknown;
|
|
116
146
|
readonly objectFit?: unknown;
|
|
117
147
|
readonly round?: unknown;
|
|
148
|
+
readonly bordered?: unknown;
|
|
118
149
|
readonly onError?: unknown;
|
|
119
150
|
readonly fallbackSrc?: unknown;
|
|
120
151
|
readonly color?: unknown;
|
|
121
152
|
readonly theme?: unknown;
|
|
122
153
|
readonly themeOverrides?: unknown;
|
|
123
154
|
readonly builtinThemeOverrides?: unknown;
|
|
124
|
-
} & {
|
|
125
|
-
round: boolean;
|
|
126
|
-
size: number | "small" | "medium" | "large";
|
|
127
|
-
circle: boolean;
|
|
128
|
-
objectFit: "fill" | "none" | "contain" | "cover" | "scale-down";
|
|
129
|
-
} & {
|
|
155
|
+
} & {} & {
|
|
130
156
|
onError?: ((e: Event) => void) | undefined;
|
|
131
157
|
color?: string | undefined;
|
|
158
|
+
round?: boolean | undefined;
|
|
159
|
+
size?: Size | undefined;
|
|
160
|
+
circle?: boolean | undefined;
|
|
161
|
+
objectFit?: ObjectFit | undefined;
|
|
132
162
|
src?: string | undefined;
|
|
133
163
|
theme?: import("../../_mixins").Theme<"Avatar", {
|
|
134
164
|
borderRadius: string;
|
|
135
165
|
fontSize: string;
|
|
166
|
+
border: string;
|
|
136
167
|
heightTiny: string;
|
|
137
168
|
heightSmall: string;
|
|
138
169
|
heightMedium: string;
|
|
139
170
|
heightLarge: string;
|
|
140
171
|
heightHuge: string;
|
|
141
172
|
color: string;
|
|
173
|
+
colorModal: string;
|
|
174
|
+
colorPopover: string;
|
|
142
175
|
}, any> | undefined;
|
|
143
176
|
themeOverrides?: import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Avatar", {
|
|
144
177
|
borderRadius: string;
|
|
145
178
|
fontSize: string;
|
|
179
|
+
border: string;
|
|
146
180
|
heightTiny: string;
|
|
147
181
|
heightSmall: string;
|
|
148
182
|
heightMedium: string;
|
|
149
183
|
heightLarge: string;
|
|
150
184
|
heightHuge: string;
|
|
151
185
|
color: string;
|
|
186
|
+
colorModal: string;
|
|
187
|
+
colorPopover: string;
|
|
152
188
|
}, any>> | undefined;
|
|
153
189
|
builtinThemeOverrides?: import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Avatar", {
|
|
154
190
|
borderRadius: string;
|
|
155
191
|
fontSize: string;
|
|
192
|
+
border: string;
|
|
156
193
|
heightTiny: string;
|
|
157
194
|
heightSmall: string;
|
|
158
195
|
heightMedium: string;
|
|
159
196
|
heightLarge: string;
|
|
160
197
|
heightHuge: string;
|
|
161
198
|
color: string;
|
|
199
|
+
colorModal: string;
|
|
200
|
+
colorPopover: string;
|
|
162
201
|
}, any>> | undefined;
|
|
202
|
+
bordered?: boolean | undefined;
|
|
163
203
|
fallbackSrc?: string | undefined;
|
|
164
204
|
}>, {
|
|
165
205
|
round: boolean;
|
|
166
|
-
size: number | "small" | "medium" | "large";
|
|
167
206
|
circle: boolean;
|
|
168
|
-
|
|
207
|
+
bordered: boolean;
|
|
169
208
|
}>;
|
|
170
209
|
export default _default;
|
package/lib/avatar/src/Avatar.js
CHANGED
|
@@ -3,25 +3,30 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.avatarProps = void 0;
|
|
6
7
|
const vue_1 = require("vue");
|
|
7
8
|
const vueuc_1 = require("vueuc");
|
|
9
|
+
const AvatarGroup_1 = require("./AvatarGroup");
|
|
8
10
|
const Tag_1 = require("../../tag/src/Tag");
|
|
9
11
|
const _mixins_1 = require("../../_mixins");
|
|
10
12
|
const styles_1 = require("../styles");
|
|
11
13
|
const _utils_1 = require("../../_utils");
|
|
12
14
|
const index_cssr_1 = __importDefault(require("./styles/index.cssr"));
|
|
13
|
-
|
|
14
|
-
type:
|
|
15
|
-
default:
|
|
16
|
-
},
|
|
17
|
-
type:
|
|
18
|
-
default:
|
|
19
|
-
},
|
|
15
|
+
exports.avatarProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props), { size: [String, Number], src: String, circle: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: undefined
|
|
18
|
+
}, objectFit: String, round: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: undefined
|
|
21
|
+
}, bordered: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: undefined
|
|
24
|
+
}, onError: Function, fallbackSrc: String,
|
|
20
25
|
/** @deprecated */
|
|
21
26
|
color: String });
|
|
22
27
|
exports.default = (0, vue_1.defineComponent)({
|
|
23
28
|
name: 'Avatar',
|
|
24
|
-
props: avatarProps,
|
|
29
|
+
props: exports.avatarProps,
|
|
25
30
|
setup(props) {
|
|
26
31
|
const { mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
|
|
27
32
|
const hasLoadErrorRef = (0, vue_1.ref)(false);
|
|
@@ -44,16 +49,34 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
44
49
|
}
|
|
45
50
|
}
|
|
46
51
|
};
|
|
52
|
+
const NAvatarGroup = (0, vue_1.inject)(AvatarGroup_1.avatarGroupInjectionKey, null);
|
|
53
|
+
const mergedSizeRef = (0, vue_1.computed)(() => {
|
|
54
|
+
const { size } = props;
|
|
55
|
+
if (size)
|
|
56
|
+
return size;
|
|
57
|
+
const { size: avatarGroupSize } = NAvatarGroup || {};
|
|
58
|
+
if (avatarGroupSize)
|
|
59
|
+
return avatarGroupSize;
|
|
60
|
+
return 'medium';
|
|
61
|
+
});
|
|
47
62
|
const themeRef = (0, _mixins_1.useTheme)('Avatar', 'Avatar', index_cssr_1.default, styles_1.avatarLight, props, mergedClsPrefixRef);
|
|
48
63
|
const TagInjection = (0, vue_1.inject)(Tag_1.tagInjectionKey, null);
|
|
49
64
|
const mergedRoundRef = (0, vue_1.computed)(() => {
|
|
50
|
-
if (
|
|
65
|
+
if (NAvatarGroup)
|
|
51
66
|
return true;
|
|
67
|
+
const { round, circle } = props;
|
|
68
|
+
if (round !== undefined || circle !== undefined)
|
|
69
|
+
return round || circle;
|
|
52
70
|
if (TagInjection) {
|
|
53
71
|
return TagInjection.roundRef.value;
|
|
54
72
|
}
|
|
55
73
|
return false;
|
|
56
74
|
});
|
|
75
|
+
const mergedBorderedRef = (0, vue_1.computed)(() => {
|
|
76
|
+
if (NAvatarGroup)
|
|
77
|
+
return true;
|
|
78
|
+
return props.bordered || false;
|
|
79
|
+
});
|
|
57
80
|
const handleError = (e) => {
|
|
58
81
|
hasLoadErrorRef.value = true;
|
|
59
82
|
const { onError } = props;
|
|
@@ -69,8 +92,11 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
69
92
|
mergedClsPrefix: mergedClsPrefixRef,
|
|
70
93
|
fitTextTransform,
|
|
71
94
|
cssVars: (0, vue_1.computed)(() => {
|
|
72
|
-
const
|
|
73
|
-
const
|
|
95
|
+
const size = mergedSizeRef.value;
|
|
96
|
+
const round = mergedRoundRef.value;
|
|
97
|
+
const bordered = mergedBorderedRef.value;
|
|
98
|
+
const { color: propColor } = props;
|
|
99
|
+
const { self: { borderRadius, fontSize, color, border, colorModal, colorPopover }, common: { cubicBezierEaseInOut } } = themeRef.value;
|
|
74
100
|
let height;
|
|
75
101
|
if (typeof size === 'number') {
|
|
76
102
|
height = `${size}px`;
|
|
@@ -80,8 +106,11 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
80
106
|
}
|
|
81
107
|
return {
|
|
82
108
|
'--n-font-size': fontSize,
|
|
83
|
-
'--n-border
|
|
109
|
+
'--n-border': bordered ? border : 'none',
|
|
110
|
+
'--n-border-radius': round ? '50%' : borderRadius,
|
|
84
111
|
'--n-color': propColor || color,
|
|
112
|
+
'--n-color-modal': propColor || colorModal,
|
|
113
|
+
'--n-color-popover': propColor || colorPopover,
|
|
85
114
|
'--n-bezier': cubicBezierEaseInOut,
|
|
86
115
|
'--n-merged-size': `var(--n-avatar-size-override, ${height})`
|
|
87
116
|
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { PropType, CSSProperties, InjectionKey } from 'vue';
|
|
2
|
+
import type { Size } from './interface';
|
|
3
|
+
import type { ExtractPublicPropTypes } from '../../_utils';
|
|
4
|
+
export interface AvatarGroupInjection {
|
|
5
|
+
size?: Size | undefined;
|
|
6
|
+
}
|
|
7
|
+
interface AvatarOption {
|
|
8
|
+
src: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const avatarGroupInjectionKey: InjectionKey<AvatarGroupInjection>;
|
|
11
|
+
declare const avatarGroupProps: {
|
|
12
|
+
readonly max: NumberConstructor;
|
|
13
|
+
readonly maxStyle: PropType<string | CSSProperties>;
|
|
14
|
+
readonly options: {
|
|
15
|
+
readonly type: PropType<AvatarOption[]>;
|
|
16
|
+
readonly default: () => never[];
|
|
17
|
+
};
|
|
18
|
+
readonly vertical: BooleanConstructor;
|
|
19
|
+
readonly size: PropType<Size | undefined>;
|
|
20
|
+
};
|
|
21
|
+
export declare type AvatarGroupProps = ExtractPublicPropTypes<typeof avatarGroupProps>;
|
|
22
|
+
declare const _default: import("vue").DefineComponent<{
|
|
23
|
+
readonly max: NumberConstructor;
|
|
24
|
+
readonly maxStyle: PropType<string | CSSProperties>;
|
|
25
|
+
readonly options: {
|
|
26
|
+
readonly type: PropType<AvatarOption[]>;
|
|
27
|
+
readonly default: () => never[];
|
|
28
|
+
};
|
|
29
|
+
readonly vertical: BooleanConstructor;
|
|
30
|
+
readonly size: PropType<Size | undefined>;
|
|
31
|
+
}, {
|
|
32
|
+
mergedClsPrefix: import("vue").ComputedRef<string>;
|
|
33
|
+
restOptions: import("vue").ComputedRef<AvatarOption[] | undefined>;
|
|
34
|
+
displayedOptions: import("vue").ComputedRef<AvatarOption[]>;
|
|
35
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
36
|
+
readonly max?: unknown;
|
|
37
|
+
readonly maxStyle?: unknown;
|
|
38
|
+
readonly options?: unknown;
|
|
39
|
+
readonly vertical?: unknown;
|
|
40
|
+
readonly size?: unknown;
|
|
41
|
+
} & {
|
|
42
|
+
vertical: boolean;
|
|
43
|
+
options: AvatarOption[];
|
|
44
|
+
} & {
|
|
45
|
+
size?: Size | undefined;
|
|
46
|
+
max?: number | undefined;
|
|
47
|
+
maxStyle?: string | CSSProperties | undefined;
|
|
48
|
+
}>, {
|
|
49
|
+
vertical: boolean;
|
|
50
|
+
options: AvatarOption[];
|
|
51
|
+
}>;
|
|
52
|
+
export default _default;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.avatarGroupInjectionKey = void 0;
|
|
7
|
+
const vue_1 = require("vue");
|
|
8
|
+
const Avatar_1 = __importDefault(require("./Avatar"));
|
|
9
|
+
const _mixins_1 = require("../../_mixins");
|
|
10
|
+
const avatar_group_cssr_1 = __importDefault(require("./styles/avatar-group.cssr"));
|
|
11
|
+
exports.avatarGroupInjectionKey = Symbol('avatar-group');
|
|
12
|
+
const avatarGroupProps = {
|
|
13
|
+
max: Number,
|
|
14
|
+
maxStyle: [Object, String],
|
|
15
|
+
options: {
|
|
16
|
+
type: Array,
|
|
17
|
+
default: () => []
|
|
18
|
+
},
|
|
19
|
+
vertical: Boolean,
|
|
20
|
+
size: [String, Number]
|
|
21
|
+
};
|
|
22
|
+
exports.default = (0, vue_1.defineComponent)({
|
|
23
|
+
name: 'AvatarGroup',
|
|
24
|
+
props: avatarGroupProps,
|
|
25
|
+
setup(props) {
|
|
26
|
+
const { mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
|
|
27
|
+
(0, _mixins_1.useStyle)('AvatarGroup', avatar_group_cssr_1.default, mergedClsPrefixRef);
|
|
28
|
+
(0, vue_1.provide)(exports.avatarGroupInjectionKey, props);
|
|
29
|
+
const restOptionsRef = (0, vue_1.computed)(() => {
|
|
30
|
+
const { max } = props;
|
|
31
|
+
if (max === undefined)
|
|
32
|
+
return undefined;
|
|
33
|
+
const { options } = props;
|
|
34
|
+
return options.slice(max, options.length);
|
|
35
|
+
});
|
|
36
|
+
const displayedOptionsRef = (0, vue_1.computed)(() => {
|
|
37
|
+
const { options, max } = props;
|
|
38
|
+
if (max === undefined)
|
|
39
|
+
return options;
|
|
40
|
+
if (options.length > max)
|
|
41
|
+
return options.slice(0, max - 1);
|
|
42
|
+
if (options.length === max)
|
|
43
|
+
return options.slice(0, max);
|
|
44
|
+
return options;
|
|
45
|
+
});
|
|
46
|
+
return {
|
|
47
|
+
mergedClsPrefix: mergedClsPrefixRef,
|
|
48
|
+
restOptions: restOptionsRef,
|
|
49
|
+
displayedOptions: displayedOptionsRef
|
|
50
|
+
};
|
|
51
|
+
},
|
|
52
|
+
render() {
|
|
53
|
+
const { mergedClsPrefix, displayedOptions, restOptions, $slots } = this;
|
|
54
|
+
return ((0, vue_1.h)("div", { class: [
|
|
55
|
+
`${mergedClsPrefix}-avatar-group`,
|
|
56
|
+
this.vertical && `${mergedClsPrefix}-avatar-group--vertical`
|
|
57
|
+
], role: "group" },
|
|
58
|
+
displayedOptions.map((option) => {
|
|
59
|
+
return $slots.avatar ? ($slots.avatar({ option })) : ((0, vue_1.h)(Avatar_1.default, { src: option.src }));
|
|
60
|
+
}),
|
|
61
|
+
restOptions !== undefined &&
|
|
62
|
+
restOptions.length > 0 &&
|
|
63
|
+
($slots.rest ? ($slots.rest({ options: restOptions, rest: restOptions.length })) : ((0, vue_1.h)(Avatar_1.default, { style: this.maxStyle }, {
|
|
64
|
+
default: () => `+${restOptions.length}`
|
|
65
|
+
})))));
|
|
66
|
+
}
|
|
67
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
const index_1 = require("../../../_utils/cssr/index");
|
|
8
|
+
|
|
9
|
+
exports.default = (0, index_1.cB)('avatar-group', `
|
|
10
|
+
flex-wrap: nowrap;
|
|
11
|
+
display: inline-flex;
|
|
12
|
+
position: relative;
|
|
13
|
+
`, [(0, index_1.cNotM)('vertical', {
|
|
14
|
+
flexDirection: 'row'
|
|
15
|
+
}, [(0, index_1.cB)('avatar', [(0, index_1.c)('&:not(:first-child)', `
|
|
16
|
+
margin-left: -12px;
|
|
17
|
+
`)])]), (0, index_1.cM)('vertical', {
|
|
18
|
+
flexDirection: 'column'
|
|
19
|
+
}, [(0, index_1.cB)('avatar', [(0, index_1.c)('&:not(:first-child)', `
|
|
20
|
+
margin-top: -12px;
|
|
21
|
+
`)])])]);
|
|
@@ -8,6 +8,8 @@ const cssr_1 = require("../../../_utils/cssr"); // vars:
|
|
|
8
8
|
// --n-font-size
|
|
9
9
|
// --n-border-radius
|
|
10
10
|
// --n-color
|
|
11
|
+
// --n-color-modal
|
|
12
|
+
// --n-color-popover
|
|
11
13
|
// --n-bezier
|
|
12
14
|
// --n-merged-size
|
|
13
15
|
|
|
@@ -21,12 +23,15 @@ exports.default = (0, cssr_1.cB)('avatar', `
|
|
|
21
23
|
position: relative;
|
|
22
24
|
overflow: hidden;
|
|
23
25
|
text-align: center;
|
|
26
|
+
border: var(--n-border);
|
|
24
27
|
border-radius: var(--n-border-radius);
|
|
25
|
-
|
|
28
|
+
--n-merged-color: var(--n-color);
|
|
29
|
+
background-color: var(--n-merged-color);
|
|
26
30
|
transition:
|
|
31
|
+
border-color .3s var(--n-bezier),
|
|
27
32
|
background-color .3s var(--n-bezier),
|
|
28
33
|
color .3s var(--n-bezier);
|
|
29
|
-
`, [(0, cssr_1.c)('img', `
|
|
34
|
+
`, [(0, cssr_1.insideModal)((0, cssr_1.c)('&', '--n-merged-color: var(--n-color-modal);')), (0, cssr_1.insidePopover)((0, cssr_1.c)('&', '--n-merged-color: var(--n-color-popover);')), (0, cssr_1.c)('img', `
|
|
30
35
|
width: 100%;
|
|
31
36
|
height: 100%;
|
|
32
37
|
`), (0, cssr_1.cE)('text', `
|
|
@@ -3,12 +3,15 @@ import type { Theme } from '../../_mixins';
|
|
|
3
3
|
export declare const self: (vars: ThemeCommonVars) => {
|
|
4
4
|
borderRadius: string;
|
|
5
5
|
fontSize: string;
|
|
6
|
+
border: string;
|
|
6
7
|
heightTiny: string;
|
|
7
8
|
heightSmall: string;
|
|
8
9
|
heightMedium: string;
|
|
9
10
|
heightLarge: string;
|
|
10
11
|
heightHuge: string;
|
|
11
12
|
color: string;
|
|
13
|
+
colorModal: string;
|
|
14
|
+
colorPopover: string;
|
|
12
15
|
};
|
|
13
16
|
export declare type AvatarThemeVars = ReturnType<typeof self>;
|
|
14
17
|
declare const avatarLight: Theme<'Avatar', AvatarThemeVars>;
|
|
@@ -2,17 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.self = void 0;
|
|
4
4
|
const common_1 = require("../../_styles/common");
|
|
5
|
+
const seemly_1 = require("seemly");
|
|
5
6
|
const self = (vars) => {
|
|
6
|
-
const { borderRadius, avatarColor, fontSize, heightTiny, heightSmall, heightMedium, heightLarge, heightHuge } = vars;
|
|
7
|
+
const { borderRadius, avatarColor, cardColor, fontSize, heightTiny, heightSmall, heightMedium, heightLarge, heightHuge, modalColor, popoverColor } = vars;
|
|
7
8
|
return {
|
|
8
9
|
borderRadius,
|
|
9
10
|
fontSize,
|
|
11
|
+
border: `2px solid ${cardColor}`,
|
|
10
12
|
heightTiny,
|
|
11
13
|
heightSmall,
|
|
12
14
|
heightMedium,
|
|
13
15
|
heightLarge,
|
|
14
16
|
heightHuge,
|
|
15
|
-
color: avatarColor
|
|
17
|
+
color: (0, seemly_1.composite)(cardColor, avatarColor),
|
|
18
|
+
colorModal: (0, seemly_1.composite)(modalColor, avatarColor),
|
|
19
|
+
colorPopover: (0, seemly_1.composite)(popoverColor, avatarColor)
|
|
16
20
|
};
|
|
17
21
|
};
|
|
18
22
|
exports.self = self;
|
|
@@ -74,14 +74,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
74
74
|
}, {
|
|
75
75
|
mergedClsPrefix: import("vue").ComputedRef<string>;
|
|
76
76
|
cssVars: import("vue").ComputedRef<{
|
|
77
|
-
'--font-size': string;
|
|
78
|
-
'--bezier': string;
|
|
79
|
-
'--item-text-color': string;
|
|
80
|
-
'--item-text-color-hover': string;
|
|
81
|
-
'--item-text-color-pressed': string;
|
|
82
|
-
'--item-text-color-active': string;
|
|
83
|
-
'--separator-color': string;
|
|
84
|
-
'--font-weight-active': string;
|
|
77
|
+
'--n-font-size': string;
|
|
78
|
+
'--n-bezier': string;
|
|
79
|
+
'--n-item-text-color': string;
|
|
80
|
+
'--n-item-text-color-hover': string;
|
|
81
|
+
'--n-item-text-color-pressed': string;
|
|
82
|
+
'--n-item-text-color-active': string;
|
|
83
|
+
'--n-separator-color': string;
|
|
84
|
+
'--n-font-weight-active': string;
|
|
85
85
|
}>;
|
|
86
86
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
87
87
|
readonly separator?: unknown;
|
|
@@ -28,14 +28,14 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
28
28
|
cssVars: (0, vue_1.computed)(() => {
|
|
29
29
|
const { common: { cubicBezierEaseInOut }, self: { separatorColor, itemTextColor, itemTextColorHover, itemTextColorPressed, itemTextColorActive, fontSize, fontWeightActive } } = themeRef.value;
|
|
30
30
|
return {
|
|
31
|
-
'--font-size': fontSize,
|
|
32
|
-
'--bezier': cubicBezierEaseInOut,
|
|
33
|
-
'--item-text-color': itemTextColor,
|
|
34
|
-
'--item-text-color-hover': itemTextColorHover,
|
|
35
|
-
'--item-text-color-pressed': itemTextColorPressed,
|
|
36
|
-
'--item-text-color-active': itemTextColorActive,
|
|
37
|
-
'--separator-color': separatorColor,
|
|
38
|
-
'--font-weight-active': fontWeightActive
|
|
31
|
+
'--n-font-size': fontSize,
|
|
32
|
+
'--n-bezier': cubicBezierEaseInOut,
|
|
33
|
+
'--n-item-text-color': itemTextColor,
|
|
34
|
+
'--n-item-text-color-hover': itemTextColorHover,
|
|
35
|
+
'--n-item-text-color-pressed': itemTextColorPressed,
|
|
36
|
+
'--n-item-text-color-active': itemTextColorActive,
|
|
37
|
+
'--n-separator-color': separatorColor,
|
|
38
|
+
'--n-font-weight-active': fontWeightActive
|
|
39
39
|
};
|
|
40
40
|
})
|
|
41
41
|
};
|