naive-ui 2.21.5 → 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 +8 -8
- package/es/_internal/icons/Close.js +1 -1
- package/es/_internal/scrollbar/src/ScrollBar.d.ts +10 -6
- package/es/_internal/scrollbar/src/ScrollBar.js +15 -11
- 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 +55 -53
- package/es/_internal/selection/src/styles/index.cssr.js +84 -80
- 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 +12 -9
- package/es/alert/src/Alert.d.ts +22 -22
- package/es/alert/src/Alert.js +22 -22
- package/es/alert/src/styles/index.cssr.js +45 -45
- package/es/anchor/src/AnchorAdapter.js +12 -12
- package/es/anchor/src/styles/index.cssr.js +41 -41
- package/es/auto-complete/src/AutoComplete.d.ts +2 -2
- package/es/auto-complete/src/AutoComplete.js +2 -2
- package/es/auto-complete/src/styles/index.cssr.js +4 -4
- package/es/avatar/index.d.ts +2 -0
- package/es/avatar/index.js +1 -0
- package/es/avatar/src/Avatar.d.ts +77 -36
- package/es/avatar/src/Avatar.js +46 -16
- 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 +21 -18
- package/es/avatar/styles/light.d.ts +3 -0
- package/es/avatar/styles/light.js +6 -2
- package/es/back-top/src/BackTop.d.ts +13 -13
- package/es/back-top/src/BackTop.js +13 -13
- package/es/back-top/src/styles/index.cssr.js +29 -29
- package/es/badge/src/Badge.d.ts +6 -6
- package/es/badge/src/Badge.js +6 -6
- package/es/badge/src/styles/index.cssr.js +15 -15
- 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/button/src/Button.d.ts +43 -38
- package/es/button/src/Button.js +124 -116
- package/es/button/src/styles/button.cssr.js +83 -80
- package/es/button/styles/light.js +1 -1
- package/es/calendar/src/Calendar.d.ts +23 -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 +160 -17
- package/es/cascader/src/Cascader.js +32 -24
- package/es/cascader/src/CascaderMenu.d.ts +345 -0
- package/es/cascader/src/CascaderMenu.js +7 -6
- package/es/cascader/src/CascaderOption.d.ts +18 -0
- package/es/cascader/src/CascaderSelectMenu.d.ts +18 -0
- package/es/cascader/src/CascaderSubmenu.d.ts +18 -0
- package/es/cascader/src/styles/index.cssr.js +44 -44
- package/es/cascader/styles/dark.js +3 -1
- package/es/cascader/styles/light.d.ts +13 -0
- package/es/cascader/styles/light.js +4 -2
- 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/config-provider/src/ConfigProvider.d.ts +6 -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 +49 -55
- package/es/data-table/src/MainTable.js +2 -3
- package/es/data-table/src/TableParts/Body.d.ts +15 -4
- package/es/data-table/src/TableParts/Body.js +82 -28
- package/es/data-table/src/TableParts/Cell.js +2 -3
- package/es/data-table/src/TableParts/Header.js +2 -2
- package/es/data-table/src/interface.d.ts +4 -1
- package/es/data-table/src/styles/index.cssr.js +133 -132
- package/es/data-table/src/use-check.js +6 -2
- package/es/data-table/src/use-scroll.d.ts +2 -0
- package/es/data-table/src/use-scroll.js +34 -4
- package/es/data-table/src/use-table-data.js +3 -1
- package/es/data-table/styles/_common.js +1 -1
- package/es/date-picker/src/DatePicker.d.ts +70 -46
- package/es/date-picker/src/DatePicker.js +61 -52
- package/es/date-picker/src/config.d.ts +1 -1
- package/es/date-picker/src/interface.d.ts +2 -1
- package/es/date-picker/src/panel/date.d.ts +13 -10
- package/es/date-picker/src/panel/date.js +2 -2
- package/es/date-picker/src/panel/daterange.d.ts +11 -9
- package/es/date-picker/src/panel/daterange.js +2 -2
- package/es/date-picker/src/panel/datetime.d.ts +13 -16
- package/es/date-picker/src/panel/datetime.js +2 -2
- package/es/date-picker/src/panel/datetimerange.d.ts +11 -9
- package/es/date-picker/src/panel/datetimerange.js +2 -2
- package/es/date-picker/src/panel/month.d.ts +17 -20
- package/es/date-picker/src/panel/month.js +23 -12
- package/es/date-picker/src/panel/use-calendar.d.ts +13 -39
- package/es/date-picker/src/panel/use-calendar.js +41 -23
- package/es/date-picker/src/panel/use-dual-calendar.d.ts +9 -36
- package/es/date-picker/src/panel/use-dual-calendar.js +35 -21
- package/es/date-picker/src/panel/use-panel-common.d.ts +9 -32
- package/es/date-picker/src/panel/use-panel-common.js +4 -8
- package/es/date-picker/src/styles/index.cssr.js +115 -115
- package/es/date-picker/src/utils.d.ts +19 -3
- package/es/date-picker/src/utils.js +40 -5
- 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 +4 -0
- 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 +24 -24
- package/es/dialog/src/Dialog.js +22 -22
- package/es/dialog/src/DialogEnvironment.d.ts +2 -2
- package/es/dialog/src/DialogProvider.d.ts +1 -1
- package/es/dialog/src/styles/index.cssr.js +45 -45
- package/es/divider/src/Divider.d.ts +4 -4
- package/es/divider/src/Divider.js +4 -4
- package/es/divider/src/styles/index.cssr.js +12 -12
- 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/dynamic-tags/src/DynamicTags.d.ts +1 -1
- package/es/dynamic-tags/src/DynamicTags.js +1 -1
- package/es/dynamic-tags/src/styles/index.cssr.js +1 -1
- 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/Form.d.ts +27 -27
- package/es/form/src/FormItem.d.ts +42 -42
- package/es/form/src/FormItem.js +15 -15
- package/es/form/src/FormItemCol.d.ts +33 -27
- package/es/form/src/FormItemCol.js +1 -0
- package/es/form/src/FormItemGridItem.d.ts +33 -27
- package/es/form/src/FormItemGridItem.js +1 -0
- package/es/form/src/FormItemRow.d.ts +33 -27
- package/es/form/src/FormItemRow.js +1 -0
- package/es/form/src/styles/form-item.cssr.js +37 -37
- package/es/form/styles/_common.d.ts +0 -3
- package/es/form/styles/_common.js +0 -3
- package/es/form/styles/light.d.ts +3 -3
- package/es/form/styles/light.js +2 -2
- 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/Image.js +8 -12
- 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/deDE.js +2 -0
- package/es/locales/common/enUS.d.ts +2 -0
- package/es/locales/common/enUS.js +2 -0
- package/es/locales/common/frFR.js +7 -5
- package/es/locales/common/idID.js +2 -0
- package/es/locales/common/jaJP.js +2 -0
- package/es/locales/common/nbNO.js +2 -0
- package/es/locales/common/ruRU.js +2 -0
- package/es/locales/common/ukUA.js +2 -0
- package/es/locales/common/zhCN.js +2 -0
- package/es/locales/common/zhTW.d.ts +3 -0
- package/es/locales/common/zhTW.js +100 -0
- package/es/locales/date/zhTW.d.ts +3 -0
- package/es/locales/date/zhTW.js +6 -0
- package/es/locales/index.d.ts +2 -0
- package/es/locales/index.js +2 -0
- package/es/log/src/Log.d.ts +6 -6
- package/es/log/src/Log.js +6 -6
- package/es/log/src/styles/index.cssr.js +16 -18
- 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 +13 -13
- package/es/page-header/src/styles/index.cssr.js +25 -27
- 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/Popover.js +4 -1
- package/es/popover/src/PopoverBody.js +18 -18
- package/es/popover/src/styles/index.cssr.js +62 -62
- package/es/popselect/src/Popselect.d.ts +2 -11
- package/es/popselect/src/Popselect.js +2 -2
- package/es/popselect/src/PopselectPanel.d.ts +3 -11
- package/es/popselect/src/PopselectPanel.js +17 -11
- 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 +18 -18
- package/es/radio/src/RadioButton.js +4 -5
- 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 +51 -47
- package/es/radio/src/styles/radio.cssr.js +44 -40
- package/es/radio/src/use-radio.d.ts +0 -3
- package/es/radio/src/use-radio.js +1 -26
- 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/steps/src/Step.d.ts +12 -12
- package/es/steps/src/Step.js +12 -12
- package/es/steps/src/styles/index.cssr.js +46 -46
- package/es/switch/src/Switch.d.ts +19 -19
- package/es/switch/src/Switch.js +26 -19
- package/es/switch/src/styles/index.cssr.js +59 -57
- 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 +5 -1
- package/es/tabs/styles/light.js +1 -1
- package/es/tag/src/Tag.d.ts +27 -26
- package/es/tag/src/Tag.js +27 -26
- package/es/tag/src/styles/index.cssr.js +55 -55
- package/es/tag/src/styles/rtl.cssr.js +1 -1
- 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 +19 -19
- package/es/time-picker/src/TimePicker.js +17 -17
- package/es/time-picker/src/styles/index.cssr.js +47 -47
- package/es/timeline/src/TimelineItem.d.ts +12 -12
- package/es/timeline/src/TimelineItem.js +12 -12
- package/es/timeline/src/styles/index.cssr.js +44 -44
- 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 +47 -42
- package/es/tree/src/Tree.d.ts +11 -11
- package/es/tree/src/Tree.js +11 -11
- package/es/tree/src/dnd.js +2 -2
- package/es/tree/src/styles/index.cssr.js +33 -33
- package/es/tree-select/src/TreeSelect.d.ts +43 -6
- package/es/tree-select/src/TreeSelect.js +29 -14
- package/es/tree-select/src/styles/index.cssr.js +20 -11
- package/es/tree-select/styles/light.d.ts +6 -0
- package/es/tree-select/styles/light.js +5 -2
- package/es/typography/src/a.d.ts +2 -2
- package/es/typography/src/a.js +2 -2
- package/es/typography/src/blockquote.d.ts +5 -5
- package/es/typography/src/blockquote.js +5 -5
- package/es/typography/src/create-header.d.ts +8 -8
- package/es/typography/src/create-header.js +8 -8
- package/es/typography/src/headers.d.ts +48 -48
- package/es/typography/src/hr.d.ts +2 -1
- package/es/typography/src/hr.js +3 -1
- package/es/typography/src/ol.d.ts +7 -7
- package/es/typography/src/ol.js +7 -7
- package/es/typography/src/p.d.ts +5 -5
- package/es/typography/src/p.js +5 -5
- package/es/typography/src/styles/a.cssr.js +6 -6
- package/es/typography/src/styles/blockquote.cssr.js +11 -11
- package/es/typography/src/styles/header.cssr.js +19 -19
- package/es/typography/src/styles/hr.cssr.js +3 -3
- package/es/typography/src/styles/list.cssr.js +15 -15
- package/es/typography/src/styles/p.cssr.js +10 -10
- package/es/typography/src/styles/text.cssr.js +18 -18
- package/es/typography/src/text.d.ts +8 -7
- package/es/typography/src/text.js +9 -8
- package/es/typography/src/ul.d.ts +7 -7
- package/es/typography/src/ul.js +7 -7
- package/es/upload/src/Upload.d.ts +1 -1
- package/es/upload/src/Upload.js +16 -16
- package/es/upload/src/styles/index.cssr.js +36 -36
- 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 +8 -8
- package/lib/_internal/icons/Close.js +1 -1
- package/lib/_internal/scrollbar/src/ScrollBar.d.ts +10 -6
- package/lib/_internal/scrollbar/src/ScrollBar.js +15 -11
- 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 +55 -53
- package/lib/_internal/selection/src/styles/index.cssr.js +84 -80
- 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 +12 -9
- package/lib/alert/src/Alert.d.ts +22 -22
- package/lib/alert/src/Alert.js +22 -22
- package/lib/alert/src/styles/index.cssr.js +45 -45
- package/lib/anchor/src/AnchorAdapter.js +12 -12
- package/lib/anchor/src/styles/index.cssr.js +41 -41
- package/lib/auto-complete/src/AutoComplete.d.ts +2 -2
- package/lib/auto-complete/src/AutoComplete.js +2 -2
- package/lib/auto-complete/src/styles/index.cssr.js +4 -4
- package/lib/avatar/index.d.ts +2 -0
- package/lib/avatar/index.js +3 -1
- package/lib/avatar/src/Avatar.d.ts +77 -36
- package/lib/avatar/src/Avatar.js +48 -17
- 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 +20 -17
- package/lib/avatar/styles/light.d.ts +3 -0
- package/lib/avatar/styles/light.js +6 -2
- package/lib/back-top/src/BackTop.d.ts +13 -13
- package/lib/back-top/src/BackTop.js +13 -13
- package/lib/back-top/src/styles/index.cssr.js +29 -29
- package/lib/badge/src/Badge.d.ts +6 -6
- package/lib/badge/src/Badge.js +6 -6
- package/lib/badge/src/styles/index.cssr.js +15 -15
- 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/button/src/Button.d.ts +43 -38
- package/lib/button/src/Button.js +123 -115
- package/lib/button/src/styles/button.cssr.js +83 -80
- package/lib/button/styles/light.js +1 -1
- package/lib/calendar/src/Calendar.d.ts +23 -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 +160 -17
- package/lib/cascader/src/Cascader.js +32 -24
- package/lib/cascader/src/CascaderMenu.d.ts +345 -0
- package/lib/cascader/src/CascaderMenu.js +7 -6
- package/lib/cascader/src/CascaderOption.d.ts +18 -0
- package/lib/cascader/src/CascaderSelectMenu.d.ts +18 -0
- package/lib/cascader/src/CascaderSubmenu.d.ts +18 -0
- package/lib/cascader/src/styles/index.cssr.js +44 -44
- package/lib/cascader/styles/dark.js +3 -1
- package/lib/cascader/styles/light.d.ts +13 -0
- package/lib/cascader/styles/light.js +4 -2
- 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/config-provider/src/ConfigProvider.d.ts +6 -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 +48 -54
- package/lib/data-table/src/MainTable.js +1 -2
- package/lib/data-table/src/TableParts/Body.d.ts +15 -4
- package/lib/data-table/src/TableParts/Body.js +80 -26
- package/lib/data-table/src/TableParts/Cell.js +2 -3
- package/lib/data-table/src/TableParts/Header.js +2 -2
- package/lib/data-table/src/interface.d.ts +4 -1
- package/lib/data-table/src/styles/index.cssr.js +133 -132
- package/lib/data-table/src/use-check.js +6 -2
- package/lib/data-table/src/use-scroll.d.ts +2 -0
- package/lib/data-table/src/use-scroll.js +34 -4
- package/lib/data-table/src/use-table-data.js +3 -1
- package/lib/data-table/styles/_common.js +1 -1
- package/lib/date-picker/src/DatePicker.d.ts +70 -46
- package/lib/date-picker/src/DatePicker.js +61 -52
- package/lib/date-picker/src/config.d.ts +1 -1
- package/lib/date-picker/src/interface.d.ts +2 -1
- package/lib/date-picker/src/panel/date.d.ts +13 -10
- package/lib/date-picker/src/panel/date.js +1 -1
- package/lib/date-picker/src/panel/daterange.d.ts +11 -9
- package/lib/date-picker/src/panel/daterange.js +1 -1
- package/lib/date-picker/src/panel/datetime.d.ts +13 -16
- package/lib/date-picker/src/panel/datetime.js +1 -1
- package/lib/date-picker/src/panel/datetimerange.d.ts +11 -9
- package/lib/date-picker/src/panel/datetimerange.js +2 -2
- package/lib/date-picker/src/panel/month.d.ts +17 -20
- package/lib/date-picker/src/panel/month.js +23 -12
- package/lib/date-picker/src/panel/use-calendar.d.ts +13 -39
- package/lib/date-picker/src/panel/use-calendar.js +40 -21
- package/lib/date-picker/src/panel/use-dual-calendar.d.ts +9 -36
- package/lib/date-picker/src/panel/use-dual-calendar.js +34 -19
- package/lib/date-picker/src/panel/use-panel-common.d.ts +9 -32
- package/lib/date-picker/src/panel/use-panel-common.js +5 -8
- package/lib/date-picker/src/styles/index.cssr.js +115 -115
- package/lib/date-picker/src/utils.d.ts +19 -3
- package/lib/date-picker/src/utils.js +41 -4
- 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 +4 -0
- 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 +24 -24
- package/lib/dialog/src/Dialog.js +22 -22
- package/lib/dialog/src/DialogEnvironment.d.ts +2 -2
- package/lib/dialog/src/DialogProvider.d.ts +1 -1
- package/lib/dialog/src/styles/index.cssr.js +45 -45
- package/lib/divider/src/Divider.d.ts +4 -4
- package/lib/divider/src/Divider.js +4 -4
- package/lib/divider/src/styles/index.cssr.js +12 -12
- 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/dynamic-tags/src/DynamicTags.d.ts +1 -1
- package/lib/dynamic-tags/src/DynamicTags.js +1 -1
- package/lib/dynamic-tags/src/styles/index.cssr.js +1 -1
- 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/Form.d.ts +27 -27
- package/lib/form/src/FormItem.d.ts +42 -42
- package/lib/form/src/FormItem.js +15 -15
- package/lib/form/src/FormItemCol.d.ts +33 -27
- package/lib/form/src/FormItemCol.js +1 -0
- package/lib/form/src/FormItemGridItem.d.ts +33 -27
- package/lib/form/src/FormItemGridItem.js +1 -0
- package/lib/form/src/FormItemRow.d.ts +33 -27
- package/lib/form/src/FormItemRow.js +1 -0
- package/lib/form/src/styles/form-item.cssr.js +37 -37
- package/lib/form/styles/_common.d.ts +0 -3
- package/lib/form/styles/_common.js +0 -3
- package/lib/form/styles/light.d.ts +3 -3
- package/lib/form/styles/light.js +2 -2
- 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/Image.js +7 -11
- 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/deDE.js +2 -0
- package/lib/locales/common/enUS.d.ts +2 -0
- package/lib/locales/common/enUS.js +2 -0
- package/lib/locales/common/frFR.js +7 -5
- package/lib/locales/common/idID.js +2 -0
- package/lib/locales/common/jaJP.js +2 -0
- package/lib/locales/common/nbNO.js +2 -0
- package/lib/locales/common/ruRU.js +2 -0
- package/lib/locales/common/ukUA.js +2 -0
- package/lib/locales/common/zhCN.js +2 -0
- package/lib/locales/common/zhTW.d.ts +3 -0
- package/lib/locales/common/zhTW.js +102 -0
- package/lib/locales/date/zhTW.d.ts +3 -0
- package/lib/locales/date/zhTW.js +11 -0
- package/lib/locales/index.d.ts +2 -0
- package/lib/locales/index.js +5 -1
- package/lib/log/src/Log.d.ts +6 -6
- package/lib/log/src/Log.js +6 -6
- package/lib/log/src/styles/index.cssr.js +16 -18
- 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 +13 -13
- package/lib/page-header/src/styles/index.cssr.js +25 -27
- 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/Popover.js +4 -1
- package/lib/popover/src/PopoverBody.js +18 -18
- package/lib/popover/src/styles/index.cssr.js +62 -62
- package/lib/popselect/src/Popselect.d.ts +2 -11
- package/lib/popselect/src/Popselect.js +2 -2
- package/lib/popselect/src/PopselectPanel.d.ts +3 -11
- package/lib/popselect/src/PopselectPanel.js +16 -10
- 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 +18 -18
- package/lib/radio/src/RadioButton.js +4 -5
- 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 +51 -47
- package/lib/radio/src/styles/radio.cssr.js +44 -40
- package/lib/radio/src/use-radio.d.ts +0 -3
- package/lib/radio/src/use-radio.js +1 -26
- 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/steps/src/Step.d.ts +12 -12
- package/lib/steps/src/Step.js +12 -12
- package/lib/steps/src/styles/index.cssr.js +46 -46
- package/lib/switch/src/Switch.d.ts +19 -19
- package/lib/switch/src/Switch.js +26 -19
- package/lib/switch/src/styles/index.cssr.js +59 -57
- 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 +5 -1
- package/lib/tabs/styles/light.js +1 -1
- package/lib/tag/src/Tag.d.ts +27 -26
- package/lib/tag/src/Tag.js +27 -26
- package/lib/tag/src/styles/index.cssr.js +55 -55
- package/lib/tag/src/styles/rtl.cssr.js +1 -1
- 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 +19 -19
- package/lib/time-picker/src/TimePicker.js +17 -17
- package/lib/time-picker/src/styles/index.cssr.js +47 -47
- package/lib/timeline/src/TimelineItem.d.ts +12 -12
- package/lib/timeline/src/TimelineItem.js +12 -12
- package/lib/timeline/src/styles/index.cssr.js +44 -44
- 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 +47 -42
- package/lib/tree/src/Tree.d.ts +11 -11
- package/lib/tree/src/Tree.js +11 -11
- package/lib/tree/src/dnd.js +2 -2
- package/lib/tree/src/styles/index.cssr.js +33 -33
- package/lib/tree-select/src/TreeSelect.d.ts +43 -6
- package/lib/tree-select/src/TreeSelect.js +28 -13
- package/lib/tree-select/src/styles/index.cssr.js +20 -11
- package/lib/tree-select/styles/light.d.ts +6 -0
- package/lib/tree-select/styles/light.js +5 -2
- package/lib/typography/src/a.d.ts +2 -2
- package/lib/typography/src/a.js +2 -2
- package/lib/typography/src/blockquote.d.ts +5 -5
- package/lib/typography/src/blockquote.js +5 -5
- package/lib/typography/src/create-header.d.ts +8 -8
- package/lib/typography/src/create-header.js +8 -8
- package/lib/typography/src/headers.d.ts +48 -48
- package/lib/typography/src/hr.d.ts +2 -1
- package/lib/typography/src/hr.js +3 -1
- package/lib/typography/src/ol.d.ts +7 -7
- package/lib/typography/src/ol.js +7 -7
- package/lib/typography/src/p.d.ts +5 -5
- package/lib/typography/src/p.js +5 -5
- package/lib/typography/src/styles/a.cssr.js +6 -6
- package/lib/typography/src/styles/blockquote.cssr.js +11 -11
- package/lib/typography/src/styles/header.cssr.js +19 -19
- package/lib/typography/src/styles/hr.cssr.js +3 -3
- package/lib/typography/src/styles/list.cssr.js +15 -15
- package/lib/typography/src/styles/p.cssr.js +10 -10
- package/lib/typography/src/styles/text.cssr.js +18 -18
- package/lib/typography/src/text.d.ts +8 -7
- package/lib/typography/src/text.js +9 -8
- package/lib/typography/src/ul.d.ts +7 -7
- package/lib/typography/src/ul.js +7 -7
- package/lib/upload/src/Upload.d.ts +1 -1
- package/lib/upload/src/Upload.js +16 -16
- package/lib/upload/src/styles/index.cssr.js +36 -36
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +38 -36
- package/web-types.json +252 -11
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useCalendar = void 0;
|
|
3
|
+
exports.useCalendarProps = exports.useCalendar = void 0;
|
|
4
4
|
const vue_1 = require("vue");
|
|
5
5
|
const date_fns_1 = require("date-fns");
|
|
6
6
|
const utils_1 = require("../utils");
|
|
7
|
-
const use_panel_common_1 = require("./use-panel-common");
|
|
8
7
|
const interface_1 = require("../interface");
|
|
9
|
-
const
|
|
8
|
+
const use_panel_common_1 = require("./use-panel-common");
|
|
9
|
+
const useCalendarProps = Object.assign(Object.assign({}, use_panel_common_1.usePanelCommonProps), { actions: {
|
|
10
10
|
type: Array,
|
|
11
11
|
default: () => ['now', 'clear', 'confirm']
|
|
12
12
|
} });
|
|
13
|
+
exports.useCalendarProps = useCalendarProps;
|
|
13
14
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
14
15
|
function useCalendar(props, type) {
|
|
15
16
|
const panelCommon = (0, use_panel_common_1.usePanelCommon)(props);
|
|
16
|
-
const { isValueInvalidRef, isDateDisabledRef, isDateInvalidRef, isTimeInvalidRef, isDateTimeInvalidRef, isHourDisabledRef, isMinuteDisabledRef, isSecondDisabledRef, localeRef, firstDayOfWeekRef, datePickerSlots,
|
|
17
|
+
const { isValueInvalidRef, isDateDisabledRef, isDateInvalidRef, isTimeInvalidRef, isDateTimeInvalidRef, isHourDisabledRef, isMinuteDisabledRef, isSecondDisabledRef, localeRef, firstDayOfWeekRef, datePickerSlots, scrollPickerColumns
|
|
17
18
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
18
19
|
} = (0, vue_1.inject)(interface_1.datePickerInjectionKey);
|
|
19
20
|
const validation = {
|
|
@@ -26,9 +27,10 @@ function useCalendar(props, type) {
|
|
|
26
27
|
isMinuteDisabled: isMinuteDisabledRef,
|
|
27
28
|
isSecondDisabled: isSecondDisabledRef
|
|
28
29
|
};
|
|
30
|
+
const mergedDateFormatRef = (0, vue_1.computed)(() => props.dateFormat || localeRef.value.dateFormat);
|
|
29
31
|
const dateInputValueRef = (0, vue_1.ref)(props.value === null || Array.isArray(props.value)
|
|
30
32
|
? ''
|
|
31
|
-
: (0, date_fns_1.format)(props.value,
|
|
33
|
+
: (0, date_fns_1.format)(props.value, mergedDateFormatRef.value));
|
|
32
34
|
const calendarValueRef = (0, vue_1.ref)(props.value === null || Array.isArray(props.value)
|
|
33
35
|
? Date.now()
|
|
34
36
|
: props.value);
|
|
@@ -46,6 +48,9 @@ function useCalendar(props, type) {
|
|
|
46
48
|
const yearArrayRef = (0, vue_1.computed)(() => {
|
|
47
49
|
return (0, utils_1.yearArray)(calendarValueRef.value, props.value, nowRef.value);
|
|
48
50
|
});
|
|
51
|
+
const querterArrayRef = (0, vue_1.computed)(() => {
|
|
52
|
+
return (0, utils_1.quarterArray)(calendarValueRef.value, props.value, nowRef.value);
|
|
53
|
+
});
|
|
49
54
|
const weekdaysRef = (0, vue_1.computed)(() => {
|
|
50
55
|
return dateArrayRef.value.slice(0, 7).map((dateItem) => {
|
|
51
56
|
const { ts } = dateItem;
|
|
@@ -65,7 +70,7 @@ function useCalendar(props, type) {
|
|
|
65
70
|
});
|
|
66
71
|
(0, vue_1.watch)((0, vue_1.computed)(() => props.value), (value) => {
|
|
67
72
|
if (value !== null && !Array.isArray(value)) {
|
|
68
|
-
dateInputValueRef.value = (0, date_fns_1.format)(value,
|
|
73
|
+
dateInputValueRef.value = (0, date_fns_1.format)(value, mergedDateFormatRef.value, panelCommon.dateFnsOptions.value);
|
|
69
74
|
calendarValueRef.value = value;
|
|
70
75
|
}
|
|
71
76
|
else {
|
|
@@ -79,6 +84,8 @@ function useCalendar(props, type) {
|
|
|
79
84
|
return (0, date_fns_1.getTime)((0, date_fns_1.startOfMonth)(value));
|
|
80
85
|
if (type === 'year')
|
|
81
86
|
return (0, date_fns_1.getTime)((0, date_fns_1.startOfYear)(value));
|
|
87
|
+
if (type === 'quarter')
|
|
88
|
+
return (0, date_fns_1.getTime)((0, date_fns_1.startOfQuarter)(value));
|
|
82
89
|
return (0, date_fns_1.getTime)((0, date_fns_1.startOfDay)(value));
|
|
83
90
|
}
|
|
84
91
|
function mergedIsDateDisabled(ts) {
|
|
@@ -88,7 +95,7 @@ function useCalendar(props, type) {
|
|
|
88
95
|
return isDateDisabled(ts);
|
|
89
96
|
}
|
|
90
97
|
function handleDateInput(value) {
|
|
91
|
-
const date = (0, utils_1.strictParse)(value,
|
|
98
|
+
const date = (0, utils_1.strictParse)(value, mergedDateFormatRef.value, new Date(), panelCommon.dateFnsOptions.value);
|
|
92
99
|
if ((0, date_fns_1.isValid)(date)) {
|
|
93
100
|
if (props.value === null) {
|
|
94
101
|
panelCommon.doUpdateValue((0, date_fns_1.getTime)(sanitizeValue(Date.now())), false);
|
|
@@ -107,7 +114,7 @@ function useCalendar(props, type) {
|
|
|
107
114
|
}
|
|
108
115
|
}
|
|
109
116
|
function handleDateInputBlur() {
|
|
110
|
-
const date = (0, utils_1.strictParse)(dateInputValueRef.value,
|
|
117
|
+
const date = (0, utils_1.strictParse)(dateInputValueRef.value, mergedDateFormatRef.value, new Date(), panelCommon.dateFnsOptions.value);
|
|
111
118
|
if ((0, date_fns_1.isValid)(date)) {
|
|
112
119
|
if (props.value === null) {
|
|
113
120
|
panelCommon.doUpdateValue((0, date_fns_1.getTime)(sanitizeValue(Date.now())), false);
|
|
@@ -146,17 +153,30 @@ function useCalendar(props, type) {
|
|
|
146
153
|
else {
|
|
147
154
|
newValue = Date.now();
|
|
148
155
|
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
scrollYearMonth(newValue);
|
|
156
|
+
if (type === 'datetime' &&
|
|
157
|
+
props.defaultTime !== null &&
|
|
158
|
+
!Array.isArray(props.defaultTime)) {
|
|
159
|
+
const time = (0, utils_1.getDefaultTime)(props.defaultTime);
|
|
160
|
+
if (time) {
|
|
161
|
+
newValue = (0, date_fns_1.getTime)((0, date_fns_1.set)(newValue, time)); // setDate getTime(addMilliseconds(startOfDay(newValue), time))
|
|
162
|
+
}
|
|
157
163
|
}
|
|
158
|
-
|
|
159
|
-
|
|
164
|
+
newValue = (0, date_fns_1.getTime)(dateItem.type === 'quarter' && dateItem.dateObject.quarter
|
|
165
|
+
? (0, date_fns_1.setQuarter)((0, date_fns_1.setYear)(newValue, dateItem.dateObject.year), dateItem.dateObject.quarter)
|
|
166
|
+
: (0, date_fns_1.set)(newValue, dateItem.dateObject));
|
|
167
|
+
panelCommon.doUpdateValue(sanitizeValue(newValue), type === 'date' || type === 'year');
|
|
168
|
+
switch (type) {
|
|
169
|
+
case 'date':
|
|
170
|
+
case 'year':
|
|
171
|
+
panelCommon.doClose();
|
|
172
|
+
break;
|
|
173
|
+
case 'month':
|
|
174
|
+
panelCommon.disableTransitionOneTick();
|
|
175
|
+
scrollPickerColumns(newValue);
|
|
176
|
+
break;
|
|
177
|
+
case 'quarter':
|
|
178
|
+
scrollPickerColumns(newValue);
|
|
179
|
+
break;
|
|
160
180
|
}
|
|
161
181
|
}
|
|
162
182
|
function deriveDateInputValue(time) {
|
|
@@ -169,7 +189,7 @@ function useCalendar(props, type) {
|
|
|
169
189
|
if (time === undefined) {
|
|
170
190
|
time = props.value;
|
|
171
191
|
}
|
|
172
|
-
dateInputValueRef.value = (0, date_fns_1.format)(time,
|
|
192
|
+
dateInputValueRef.value = (0, date_fns_1.format)(time, mergedDateFormatRef.value, panelCommon.dateFnsOptions.value);
|
|
173
193
|
}
|
|
174
194
|
function handleConfirmClick() {
|
|
175
195
|
if (validation.isDateInvalid.value || validation.isTimeInvalid.value) {
|
|
@@ -230,7 +250,7 @@ function useCalendar(props, type) {
|
|
|
230
250
|
panelCommon.clearPendingValue();
|
|
231
251
|
handleConfirmClick();
|
|
232
252
|
}
|
|
233
|
-
return Object.assign(Object.assign(Object.assign({ dateArray: dateArrayRef, monthArray: monthArrayRef, yearArray: yearArrayRef, calendarYear: calendarYearRef, calendarMonth: calendarMonthRef, weekdays: weekdaysRef, mergedIsDateDisabled,
|
|
253
|
+
return Object.assign(Object.assign(Object.assign({ dateArray: dateArrayRef, monthArray: monthArrayRef, yearArray: yearArrayRef, quarterArray: querterArrayRef, calendarYear: calendarYearRef, calendarMonth: calendarMonthRef, weekdays: weekdaysRef, mergedIsDateDisabled,
|
|
234
254
|
nextYear,
|
|
235
255
|
prevYear,
|
|
236
256
|
nextMonth,
|
|
@@ -253,4 +273,3 @@ function useCalendar(props, type) {
|
|
|
253
273
|
scrollbarInstRef });
|
|
254
274
|
}
|
|
255
275
|
exports.useCalendar = useCalendar;
|
|
256
|
-
useCalendar.props = useCalendarProps;
|
|
@@ -1,25 +1,23 @@
|
|
|
1
1
|
import { ExtractPropTypes } from 'vue';
|
|
2
2
|
import { DateItem } from '../utils';
|
|
3
|
-
import { Shortcuts } from '../interface';
|
|
3
|
+
import type { Shortcuts } from '../interface';
|
|
4
4
|
declare const useDualCalendarProps: {
|
|
5
5
|
readonly actions: {
|
|
6
6
|
readonly type: ArrayConstructor;
|
|
7
7
|
readonly default: () => string[];
|
|
8
8
|
};
|
|
9
9
|
readonly active: BooleanConstructor;
|
|
10
|
-
readonly dateFormat:
|
|
11
|
-
readonly type: StringConstructor;
|
|
12
|
-
readonly default: "yyyy-MM-dd";
|
|
13
|
-
};
|
|
10
|
+
readonly dateFormat: StringConstructor;
|
|
14
11
|
readonly timeFormat: {
|
|
15
12
|
readonly type: StringConstructor;
|
|
16
|
-
readonly
|
|
13
|
+
readonly value: "HH:mm:ss";
|
|
17
14
|
};
|
|
18
15
|
readonly value: {
|
|
19
16
|
readonly type: import("vue").PropType<import("../interface").Value | null>;
|
|
20
17
|
readonly default: null;
|
|
21
18
|
};
|
|
22
19
|
readonly shortcuts: import("vue").PropType<Shortcuts>;
|
|
20
|
+
readonly defaultTime: import("vue").PropType<import("../interface").DefaultTime>;
|
|
23
21
|
readonly onConfirm: FunctionConstructor;
|
|
24
22
|
readonly onClose: import("vue").PropType<import("../interface").OnClose>;
|
|
25
23
|
readonly onTabOut: FunctionConstructor;
|
|
@@ -210,12 +208,14 @@ declare function useDualCalendar(props: ExtractPropTypes<typeof useDualCalendarP
|
|
|
210
208
|
calendarLeftPaddingDatetimerange: string;
|
|
211
209
|
calendarLeftPaddingMonth: string;
|
|
212
210
|
calendarLeftPaddingYear: string;
|
|
211
|
+
calendarLeftPaddingQuarter: string;
|
|
213
212
|
calendarRightPaddingDate: string;
|
|
214
213
|
calendarRightPaddingDatetime: string;
|
|
215
214
|
calendarRightPaddingDaterange: string;
|
|
216
215
|
calendarRightPaddingDatetimerange: string;
|
|
217
216
|
calendarRightPaddingMonth: string;
|
|
218
217
|
calendarRightPaddingYear: string;
|
|
218
|
+
calendarRightPaddingQuarter: string;
|
|
219
219
|
};
|
|
220
220
|
peers: {
|
|
221
221
|
Input: import("../../../_mixins").Theme<"Input", {
|
|
@@ -1076,6 +1076,7 @@ declare function useDualCalendar(props: ExtractPropTypes<typeof useDualCalendarP
|
|
|
1076
1076
|
monthTypeFormat: string;
|
|
1077
1077
|
dateFormat: string;
|
|
1078
1078
|
dateTimeFormat: string;
|
|
1079
|
+
quarterFormat: string;
|
|
1079
1080
|
clear: string;
|
|
1080
1081
|
now: string;
|
|
1081
1082
|
confirm: string;
|
|
@@ -1085,6 +1086,7 @@ declare function useDualCalendar(props: ExtractPropTypes<typeof useDualCalendarP
|
|
|
1085
1086
|
datetimePlaceholder: string;
|
|
1086
1087
|
monthPlaceholder: string;
|
|
1087
1088
|
yearPlaceholder: string;
|
|
1089
|
+
quarterPlaceholder: string;
|
|
1088
1090
|
startDatePlaceholder: string;
|
|
1089
1091
|
endDatePlaceholder: string;
|
|
1090
1092
|
startDatetimePlaceholder: string;
|
|
@@ -1133,33 +1135,4 @@ declare function useDualCalendar(props: ExtractPropTypes<typeof useDualCalendarP
|
|
|
1133
1135
|
handleRangeShortcutMouseenter: (shortcut: Shortcuts[string]) => void;
|
|
1134
1136
|
handleRangeShortcutClick: (shortcut: Shortcuts[string]) => void;
|
|
1135
1137
|
};
|
|
1136
|
-
|
|
1137
|
-
var props: {
|
|
1138
|
-
readonly actions: {
|
|
1139
|
-
readonly type: ArrayConstructor;
|
|
1140
|
-
readonly default: () => string[];
|
|
1141
|
-
};
|
|
1142
|
-
readonly active: BooleanConstructor;
|
|
1143
|
-
readonly dateFormat: {
|
|
1144
|
-
readonly type: StringConstructor;
|
|
1145
|
-
readonly default: "yyyy-MM-dd";
|
|
1146
|
-
};
|
|
1147
|
-
readonly timeFormat: {
|
|
1148
|
-
readonly type: StringConstructor;
|
|
1149
|
-
readonly default: "HH:mm:ss";
|
|
1150
|
-
};
|
|
1151
|
-
readonly value: {
|
|
1152
|
-
readonly type: import("vue").PropType<import("../interface").Value | null>;
|
|
1153
|
-
readonly default: null;
|
|
1154
|
-
};
|
|
1155
|
-
readonly shortcuts: import("vue").PropType<Shortcuts>;
|
|
1156
|
-
readonly onConfirm: FunctionConstructor;
|
|
1157
|
-
readonly onClose: import("vue").PropType<import("../interface").OnClose>;
|
|
1158
|
-
readonly onTabOut: FunctionConstructor;
|
|
1159
|
-
readonly onUpdateValue: {
|
|
1160
|
-
readonly type: import("vue").PropType<import("../interface").OnPanelUpdateValue>;
|
|
1161
|
-
readonly required: true;
|
|
1162
|
-
};
|
|
1163
|
-
};
|
|
1164
|
-
}
|
|
1165
|
-
export { useDualCalendar };
|
|
1138
|
+
export { useDualCalendar, useDualCalendarProps };
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useDualCalendar = void 0;
|
|
3
|
+
exports.useDualCalendarProps = exports.useDualCalendar = void 0;
|
|
4
4
|
const vue_1 = require("vue");
|
|
5
5
|
const date_fns_1 = require("date-fns");
|
|
6
6
|
const utils_1 = require("../utils");
|
|
7
|
-
const use_panel_common_1 = require("./use-panel-common");
|
|
8
7
|
const interface_1 = require("../interface");
|
|
9
|
-
const
|
|
8
|
+
const use_panel_common_1 = require("./use-panel-common");
|
|
9
|
+
const useDualCalendarProps = Object.assign(Object.assign({}, use_panel_common_1.usePanelCommonProps), { actions: {
|
|
10
10
|
type: Array,
|
|
11
11
|
default: () => ['clear', 'confirm']
|
|
12
12
|
} });
|
|
13
|
+
exports.useDualCalendarProps = useDualCalendarProps;
|
|
13
14
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
14
15
|
function useDualCalendar(props, type = 'datetime') {
|
|
15
16
|
const { isDateDisabledRef, isStartHourDisabledRef, isEndHourDisabledRef, isStartMinuteDisabledRef, isEndMinuteDisabledRef, isStartSecondDisabledRef, isEndSecondDisabledRef, isStartDateInvalidRef, isEndDateInvalidRef, isStartTimeInvalidRef, isEndTimeInvalidRef, isStartValueInvalidRef, isEndValueInvalidRef, isRangeInvalidRef, localeRef, rangesRef, closeOnSelectRef, updateValueOnCloseRef, firstDayOfWeekRef, datePickerSlots
|
|
@@ -39,12 +40,13 @@ function useDualCalendar(props, type = 'datetime') {
|
|
|
39
40
|
const nowRef = (0, vue_1.ref)(Date.now());
|
|
40
41
|
const isSelectingRef = (0, vue_1.ref)(false);
|
|
41
42
|
const memorizedStartDateTimeRef = (0, vue_1.ref)(0);
|
|
42
|
-
const
|
|
43
|
+
const mergedDateFormatRef = (0, vue_1.computed)(() => props.dateFormat || localeRef.value.dateFormat);
|
|
44
|
+
const { value } = props;
|
|
43
45
|
const startDateInput = (0, vue_1.ref)(Array.isArray(value)
|
|
44
|
-
? (0, date_fns_1.format)(value[0],
|
|
46
|
+
? (0, date_fns_1.format)(value[0], mergedDateFormatRef.value, panelCommon.dateFnsOptions.value)
|
|
45
47
|
: '');
|
|
46
48
|
const endDateInputRef = (0, vue_1.ref)(Array.isArray(value)
|
|
47
|
-
? (0, date_fns_1.format)(value[1],
|
|
49
|
+
? (0, date_fns_1.format)(value[1], mergedDateFormatRef.value, panelCommon.dateFnsOptions.value)
|
|
48
50
|
: '');
|
|
49
51
|
if (Array.isArray(value)) {
|
|
50
52
|
syncCalendarTimeWithValue(value);
|
|
@@ -101,9 +103,8 @@ function useDualCalendar(props, type = 'datetime') {
|
|
|
101
103
|
(0, vue_1.watch)((0, vue_1.computed)(() => props.value), (value) => {
|
|
102
104
|
if (value !== null && Array.isArray(value)) {
|
|
103
105
|
const [startMoment, endMoment] = value;
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
endDateInputRef.value = (0, date_fns_1.format)(endMoment, dateFormat, panelCommon.dateFnsOptions.value);
|
|
106
|
+
startDateInput.value = (0, date_fns_1.format)(startMoment, mergedDateFormatRef.value, panelCommon.dateFnsOptions.value);
|
|
107
|
+
endDateInputRef.value = (0, date_fns_1.format)(endMoment, mergedDateFormatRef.value, panelCommon.dateFnsOptions.value);
|
|
107
108
|
if (!isSelectingRef.value) {
|
|
108
109
|
syncCalendarTimeWithValue(value);
|
|
109
110
|
}
|
|
@@ -290,8 +291,24 @@ function useDualCalendar(props, type = 'datetime') {
|
|
|
290
291
|
if (typeof startTime !== 'number') {
|
|
291
292
|
startTime = (0, date_fns_1.getTime)(startTime);
|
|
292
293
|
}
|
|
293
|
-
|
|
294
|
-
|
|
294
|
+
let startDefaultTime;
|
|
295
|
+
let endDefaultTime;
|
|
296
|
+
if (type === 'datetimerange') {
|
|
297
|
+
const { defaultTime } = props;
|
|
298
|
+
if (Array.isArray(defaultTime)) {
|
|
299
|
+
startDefaultTime = (0, utils_1.getDefaultTime)(defaultTime[0]);
|
|
300
|
+
endDefaultTime = (0, utils_1.getDefaultTime)(defaultTime[1]);
|
|
301
|
+
}
|
|
302
|
+
else {
|
|
303
|
+
startDefaultTime = (0, utils_1.getDefaultTime)(defaultTime);
|
|
304
|
+
endDefaultTime = startDefaultTime;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
if (startDefaultTime) {
|
|
308
|
+
startTime = (0, date_fns_1.getTime)((0, date_fns_1.set)(startTime, startDefaultTime));
|
|
309
|
+
}
|
|
310
|
+
if (endDefaultTime) {
|
|
311
|
+
endTime = (0, date_fns_1.getTime)((0, date_fns_1.set)(endTime, endDefaultTime));
|
|
295
312
|
}
|
|
296
313
|
panelCommon.doUpdateValue([startTime, endTime], false);
|
|
297
314
|
}
|
|
@@ -305,7 +322,7 @@ function useDualCalendar(props, type = 'datetime') {
|
|
|
305
322
|
}
|
|
306
323
|
}
|
|
307
324
|
function handleStartDateInput(value) {
|
|
308
|
-
const date = (0, utils_1.strictParse)(value,
|
|
325
|
+
const date = (0, utils_1.strictParse)(value, mergedDateFormatRef.value, new Date(), panelCommon.dateFnsOptions.value);
|
|
309
326
|
if ((0, date_fns_1.isValid)(date)) {
|
|
310
327
|
if (!props.value) {
|
|
311
328
|
const newValue = (0, date_fns_1.set)(new Date(), {
|
|
@@ -330,7 +347,7 @@ function useDualCalendar(props, type = 'datetime') {
|
|
|
330
347
|
}
|
|
331
348
|
function handleEndDateInput(value) {
|
|
332
349
|
/** strict check when input */
|
|
333
|
-
const date = (0, utils_1.strictParse)(value,
|
|
350
|
+
const date = (0, utils_1.strictParse)(value, mergedDateFormatRef.value, new Date(), panelCommon.dateFnsOptions.value);
|
|
334
351
|
if ((0, date_fns_1.isValid)(date)) {
|
|
335
352
|
if (props.value === null) {
|
|
336
353
|
const newValue = (0, date_fns_1.set)(new Date(), {
|
|
@@ -354,7 +371,7 @@ function useDualCalendar(props, type = 'datetime') {
|
|
|
354
371
|
}
|
|
355
372
|
}
|
|
356
373
|
function handleStartDateInputBlur() {
|
|
357
|
-
const date = (0, utils_1.strictParse)(startDateInput.value,
|
|
374
|
+
const date = (0, utils_1.strictParse)(startDateInput.value, mergedDateFormatRef.value, new Date(), panelCommon.dateFnsOptions.value);
|
|
358
375
|
const { value } = props;
|
|
359
376
|
if ((0, date_fns_1.isValid)(date)) {
|
|
360
377
|
if (value === null) {
|
|
@@ -379,7 +396,7 @@ function useDualCalendar(props, type = 'datetime') {
|
|
|
379
396
|
}
|
|
380
397
|
}
|
|
381
398
|
function handleEndDateInputBlur() {
|
|
382
|
-
const date = (0, utils_1.strictParse)(endDateInputRef.value,
|
|
399
|
+
const date = (0, utils_1.strictParse)(endDateInputRef.value, mergedDateFormatRef.value, new Date(), panelCommon.dateFnsOptions.value);
|
|
383
400
|
const { value } = props;
|
|
384
401
|
if ((0, date_fns_1.isValid)(date)) {
|
|
385
402
|
if (value === null) {
|
|
@@ -412,12 +429,11 @@ function useDualCalendar(props, type = 'datetime') {
|
|
|
412
429
|
endDateInputRef.value = '';
|
|
413
430
|
return;
|
|
414
431
|
}
|
|
415
|
-
const { dateFormat } = props;
|
|
416
432
|
if (times === undefined) {
|
|
417
433
|
times = value;
|
|
418
434
|
}
|
|
419
|
-
startDateInput.value = (0, date_fns_1.format)(times[0],
|
|
420
|
-
endDateInputRef.value = (0, date_fns_1.format)(times[1],
|
|
435
|
+
startDateInput.value = (0, date_fns_1.format)(times[0], mergedDateFormatRef.value, panelCommon.dateFnsOptions.value);
|
|
436
|
+
endDateInputRef.value = (0, date_fns_1.format)(times[1], mergedDateFormatRef.value, panelCommon.dateFnsOptions.value);
|
|
421
437
|
}
|
|
422
438
|
function handleStartTimePickerChange(value) {
|
|
423
439
|
if (value === null)
|
|
@@ -471,4 +487,3 @@ function useDualCalendar(props, type = 'datetime') {
|
|
|
471
487
|
datePickerSlots, shortcuts: shortcutsRef });
|
|
472
488
|
}
|
|
473
489
|
exports.useDualCalendar = useDualCalendar;
|
|
474
|
-
useDualCalendar.props = useDualCalendarProps;
|
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
import { PropType, ExtractPropTypes } from 'vue';
|
|
2
|
-
import { Value, OnPanelUpdateValue, OnClose, Shortcuts } from '../interface';
|
|
2
|
+
import { Value, OnPanelUpdateValue, OnClose, Shortcuts, DefaultTime } from '../interface';
|
|
3
3
|
declare const usePanelCommonProps: {
|
|
4
4
|
readonly active: BooleanConstructor;
|
|
5
|
-
readonly dateFormat:
|
|
6
|
-
readonly type: StringConstructor;
|
|
7
|
-
readonly default: "yyyy-MM-dd";
|
|
8
|
-
};
|
|
5
|
+
readonly dateFormat: StringConstructor;
|
|
9
6
|
readonly timeFormat: {
|
|
10
7
|
readonly type: StringConstructor;
|
|
11
|
-
readonly
|
|
8
|
+
readonly value: "HH:mm:ss";
|
|
12
9
|
};
|
|
13
10
|
readonly value: {
|
|
14
11
|
readonly type: PropType<Value | null>;
|
|
15
12
|
readonly default: null;
|
|
16
13
|
};
|
|
17
14
|
readonly shortcuts: PropType<Shortcuts>;
|
|
15
|
+
readonly defaultTime: PropType<DefaultTime>;
|
|
18
16
|
readonly onConfirm: FunctionConstructor;
|
|
19
17
|
readonly onClose: PropType<OnClose>;
|
|
20
18
|
readonly onTabOut: FunctionConstructor;
|
|
@@ -176,12 +174,14 @@ declare function usePanelCommon(props: UsePanelCommonProps): {
|
|
|
176
174
|
calendarLeftPaddingDatetimerange: string;
|
|
177
175
|
calendarLeftPaddingMonth: string;
|
|
178
176
|
calendarLeftPaddingYear: string;
|
|
177
|
+
calendarLeftPaddingQuarter: string;
|
|
179
178
|
calendarRightPaddingDate: string;
|
|
180
179
|
calendarRightPaddingDatetime: string;
|
|
181
180
|
calendarRightPaddingDaterange: string;
|
|
182
181
|
calendarRightPaddingDatetimerange: string;
|
|
183
182
|
calendarRightPaddingMonth: string;
|
|
184
183
|
calendarRightPaddingYear: string;
|
|
184
|
+
calendarRightPaddingQuarter: string;
|
|
185
185
|
};
|
|
186
186
|
peers: {
|
|
187
187
|
Input: import("../../../_mixins").Theme<"Input", {
|
|
@@ -1043,6 +1043,7 @@ declare function usePanelCommon(props: UsePanelCommonProps): {
|
|
|
1043
1043
|
monthTypeFormat: string;
|
|
1044
1044
|
dateFormat: string;
|
|
1045
1045
|
dateTimeFormat: string;
|
|
1046
|
+
quarterFormat: string;
|
|
1046
1047
|
clear: string;
|
|
1047
1048
|
now: string;
|
|
1048
1049
|
confirm: string;
|
|
@@ -1052,6 +1053,7 @@ declare function usePanelCommon(props: UsePanelCommonProps): {
|
|
|
1052
1053
|
datetimePlaceholder: string;
|
|
1053
1054
|
monthPlaceholder: string;
|
|
1054
1055
|
yearPlaceholder: string;
|
|
1056
|
+
quarterPlaceholder: string;
|
|
1055
1057
|
startDatePlaceholder: string;
|
|
1056
1058
|
endDatePlaceholder: string;
|
|
1057
1059
|
startDatetimePlaceholder: string;
|
|
@@ -1075,29 +1077,4 @@ declare function usePanelCommon(props: UsePanelCommonProps): {
|
|
|
1075
1077
|
getShortcutValue: (shortcut: Shortcuts[string]) => number | [number, number];
|
|
1076
1078
|
handleShortcutMouseleave: () => void;
|
|
1077
1079
|
};
|
|
1078
|
-
|
|
1079
|
-
var props: {
|
|
1080
|
-
readonly active: BooleanConstructor;
|
|
1081
|
-
readonly dateFormat: {
|
|
1082
|
-
readonly type: StringConstructor;
|
|
1083
|
-
readonly default: "yyyy-MM-dd";
|
|
1084
|
-
};
|
|
1085
|
-
readonly timeFormat: {
|
|
1086
|
-
readonly type: StringConstructor;
|
|
1087
|
-
readonly default: "HH:mm:ss";
|
|
1088
|
-
};
|
|
1089
|
-
readonly value: {
|
|
1090
|
-
readonly type: PropType<Value | null>;
|
|
1091
|
-
readonly default: null;
|
|
1092
|
-
};
|
|
1093
|
-
readonly shortcuts: PropType<Shortcuts>;
|
|
1094
|
-
readonly onConfirm: FunctionConstructor;
|
|
1095
|
-
readonly onClose: PropType<OnClose>;
|
|
1096
|
-
readonly onTabOut: FunctionConstructor;
|
|
1097
|
-
readonly onUpdateValue: {
|
|
1098
|
-
readonly type: PropType<OnPanelUpdateValue>;
|
|
1099
|
-
readonly required: true;
|
|
1100
|
-
};
|
|
1101
|
-
};
|
|
1102
|
-
}
|
|
1103
|
-
export { usePanelCommon };
|
|
1080
|
+
export { usePanelCommon, usePanelCommonProps };
|
|
@@ -1,26 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.usePanelCommon = void 0;
|
|
3
|
+
exports.usePanelCommonProps = exports.usePanelCommon = void 0;
|
|
4
4
|
const vue_1 = require("vue");
|
|
5
5
|
const vooks_1 = require("vooks");
|
|
6
6
|
const interface_1 = require("../interface");
|
|
7
|
-
const DATE_FORMAT = 'yyyy-MM-dd';
|
|
8
7
|
const TIME_FORMAT = 'HH:mm:ss';
|
|
9
8
|
const usePanelCommonProps = {
|
|
10
9
|
active: Boolean,
|
|
11
|
-
dateFormat:
|
|
12
|
-
type: String,
|
|
13
|
-
default: DATE_FORMAT
|
|
14
|
-
},
|
|
10
|
+
dateFormat: String,
|
|
15
11
|
timeFormat: {
|
|
16
12
|
type: String,
|
|
17
|
-
|
|
13
|
+
value: TIME_FORMAT
|
|
18
14
|
},
|
|
19
15
|
value: {
|
|
20
16
|
type: [Array, Number],
|
|
21
17
|
default: null
|
|
22
18
|
},
|
|
23
19
|
shortcuts: Object,
|
|
20
|
+
defaultTime: [Number, String, Array],
|
|
24
21
|
onConfirm: Function,
|
|
25
22
|
onClose: Function,
|
|
26
23
|
onTabOut: Function,
|
|
@@ -29,6 +26,7 @@ const usePanelCommonProps = {
|
|
|
29
26
|
required: true
|
|
30
27
|
}
|
|
31
28
|
};
|
|
29
|
+
exports.usePanelCommonProps = usePanelCommonProps;
|
|
32
30
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
33
31
|
function usePanelCommon(props) {
|
|
34
32
|
const { dateLocaleRef, timePickerSizeRef, localeRef, mergedClsPrefixRef, mergedThemeRef
|
|
@@ -143,4 +141,3 @@ function usePanelCommon(props) {
|
|
|
143
141
|
};
|
|
144
142
|
}
|
|
145
143
|
exports.usePanelCommon = usePanelCommon;
|
|
146
|
-
usePanelCommon.props = usePanelCommonProps;
|