naive-ui 2.21.4 → 2.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/_internal/close/src/styles/index.cssr.js +6 -5
- package/es/_internal/scrollbar/src/ScrollBar.d.ts +4 -0
- package/es/_internal/scrollbar/src/ScrollBar.js +5 -2
- package/es/_internal/selection/src/Selection.js +11 -9
- package/es/_internal/selection/src/styles/index.cssr.js +6 -2
- package/es/_utils/composable/use-houdini.js +10 -7
- package/es/alert/src/Alert.d.ts +20 -20
- 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/src/Avatar.d.ts +10 -8
- package/es/avatar/src/Avatar.js +11 -9
- package/es/avatar/src/styles/index.cssr.js +14 -16
- 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/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 +6 -0
- package/es/cascader/src/Cascader.d.ts +135 -0
- package/es/cascader/src/Cascader.js +2 -4
- package/es/cascader/src/CascaderMenu.d.ts +345 -0
- package/es/cascader/src/CascaderMenu.js +6 -5
- 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/styles/dark.js +3 -1
- package/es/cascader/styles/light.d.ts +13 -0
- package/es/cascader/styles/light.js +3 -1
- package/es/config-provider/src/ConfigProvider.d.ts +18 -0
- package/es/data-table/src/DataTable.js +7 -13
- 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 +80 -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 +4 -3
- 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 +30 -5
- package/es/date-picker/src/DatePicker.js +32 -9
- package/es/date-picker/src/config.d.ts +1 -9
- package/es/date-picker/src/config.js +0 -8
- package/es/date-picker/src/interface.d.ts +2 -1
- package/es/date-picker/src/panel/date.d.ts +17 -10
- package/es/date-picker/src/panel/date.js +2 -2
- package/es/date-picker/src/panel/daterange.d.ts +15 -9
- package/es/date-picker/src/panel/daterange.js +2 -2
- package/es/date-picker/src/panel/datetime.d.ts +17 -16
- package/es/date-picker/src/panel/datetime.js +2 -2
- package/es/date-picker/src/panel/datetimerange.d.ts +15 -9
- package/es/date-picker/src/panel/datetimerange.js +2 -2
- package/es/date-picker/src/panel/month.d.ts +21 -20
- package/es/date-picker/src/panel/month.js +23 -12
- package/es/date-picker/src/panel/use-calendar.d.ts +17 -39
- package/es/date-picker/src/panel/use-calendar.js +41 -23
- package/es/date-picker/src/panel/use-dual-calendar.d.ts +13 -36
- package/es/date-picker/src/panel/use-dual-calendar.js +35 -21
- package/es/date-picker/src/panel/use-panel-common.d.ts +13 -32
- package/es/date-picker/src/panel/use-panel-common.js +4 -8
- 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/dialog/src/Dialog.d.ts +21 -21
- package/es/dialog/src/Dialog.js +23 -23
- 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/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/form/src/Form.d.ts +27 -27
- package/es/form/src/FormItem.d.ts +27 -27
- package/es/form/src/FormItemCol.d.ts +27 -27
- package/es/form/src/FormItemGridItem.d.ts +27 -27
- package/es/form/src/FormItemRow.d.ts +27 -27
- 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/image/src/Image.js +8 -12
- package/es/input/src/Input.js +2 -0
- package/es/input-number/src/InputNumber.js +2 -0
- package/es/input-number/src/utils.js +1 -1
- package/es/locales/common/deDE.js +6 -0
- package/es/locales/common/enUS.d.ts +6 -0
- package/es/locales/common/enUS.js +7 -1
- package/es/locales/common/frFR.d.ts +3 -0
- package/es/locales/common/frFR.js +101 -0
- package/es/locales/common/idID.d.ts +2 -94
- package/es/locales/common/idID.js +6 -0
- package/es/locales/common/jaJP.js +6 -0
- package/es/locales/common/nbNO.js +6 -0
- package/es/locales/common/ruRU.js +6 -0
- package/es/locales/common/ukUA.js +6 -0
- package/es/locales/common/zhCN.js +6 -0
- package/es/locales/common/zhTW.d.ts +3 -0
- package/es/locales/common/zhTW.js +100 -0
- package/es/locales/date/frFR.d.ts +3 -0
- package/es/locales/date/frFR.js +6 -0
- package/es/locales/date/idID.d.ts +1 -6
- package/es/locales/date/zhTW.d.ts +3 -0
- package/es/locales/date/zhTW.js +6 -0
- package/es/locales/index.d.ts +4 -0
- package/es/locales/index.js +4 -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/page-header/src/PageHeader.js +3 -3
- package/es/page-header/src/styles/index.cssr.js +2 -4
- package/es/popover/src/Popover.js +4 -1
- package/es/popover/src/PopoverBody.js +3 -3
- 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/radio/src/Radio.js +3 -3
- package/es/radio/src/RadioButton.js +4 -5
- package/es/radio/src/styles/radio-group.cssr.js +8 -4
- package/es/radio/src/styles/radio.cssr.js +8 -4
- package/es/radio/src/use-radio.d.ts +0 -3
- package/es/radio/src/use-radio.js +1 -26
- 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/tabs/src/styles/index.cssr.js +1 -0
- package/es/tag/src/Tag.d.ts +26 -26
- package/es/tag/src/Tag.js +26 -26
- package/es/tag/src/styles/index.cssr.js +55 -55
- package/es/tag/src/styles/rtl.cssr.js +1 -1
- package/es/time-picker/src/TimePicker.d.ts +17 -17
- 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/styles/index.cssr.js +9 -4
- 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.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/close/src/styles/index.cssr.js +6 -5
- package/lib/_internal/scrollbar/src/ScrollBar.d.ts +4 -0
- package/lib/_internal/scrollbar/src/ScrollBar.js +5 -2
- package/lib/_internal/selection/src/Selection.js +11 -9
- package/lib/_internal/selection/src/styles/index.cssr.js +6 -2
- package/lib/_utils/composable/use-houdini.js +10 -7
- package/lib/alert/src/Alert.d.ts +20 -20
- 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/src/Avatar.d.ts +10 -8
- package/lib/avatar/src/Avatar.js +11 -9
- package/lib/avatar/src/styles/index.cssr.js +14 -16
- 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/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 +6 -0
- package/lib/cascader/src/Cascader.d.ts +135 -0
- package/lib/cascader/src/Cascader.js +2 -4
- package/lib/cascader/src/CascaderMenu.d.ts +345 -0
- package/lib/cascader/src/CascaderMenu.js +6 -5
- 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/styles/dark.js +3 -1
- package/lib/cascader/styles/light.d.ts +13 -0
- package/lib/cascader/styles/light.js +3 -1
- package/lib/config-provider/src/ConfigProvider.d.ts +18 -0
- package/lib/data-table/src/DataTable.js +6 -12
- 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 +78 -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 +4 -3
- 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 +30 -5
- package/lib/date-picker/src/DatePicker.js +31 -8
- package/lib/date-picker/src/config.d.ts +1 -9
- package/lib/date-picker/src/config.js +1 -9
- package/lib/date-picker/src/interface.d.ts +2 -1
- package/lib/date-picker/src/panel/date.d.ts +17 -10
- package/lib/date-picker/src/panel/date.js +1 -1
- package/lib/date-picker/src/panel/daterange.d.ts +15 -9
- package/lib/date-picker/src/panel/daterange.js +1 -1
- package/lib/date-picker/src/panel/datetime.d.ts +17 -16
- package/lib/date-picker/src/panel/datetime.js +1 -1
- package/lib/date-picker/src/panel/datetimerange.d.ts +15 -9
- package/lib/date-picker/src/panel/datetimerange.js +2 -2
- package/lib/date-picker/src/panel/month.d.ts +21 -20
- package/lib/date-picker/src/panel/month.js +23 -12
- package/lib/date-picker/src/panel/use-calendar.d.ts +17 -39
- package/lib/date-picker/src/panel/use-calendar.js +40 -21
- package/lib/date-picker/src/panel/use-dual-calendar.d.ts +13 -36
- package/lib/date-picker/src/panel/use-dual-calendar.js +34 -19
- package/lib/date-picker/src/panel/use-panel-common.d.ts +13 -32
- package/lib/date-picker/src/panel/use-panel-common.js +5 -8
- 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/dialog/src/Dialog.d.ts +21 -21
- package/lib/dialog/src/Dialog.js +23 -23
- 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/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/form/src/Form.d.ts +27 -27
- package/lib/form/src/FormItem.d.ts +27 -27
- package/lib/form/src/FormItemCol.d.ts +27 -27
- package/lib/form/src/FormItemGridItem.d.ts +27 -27
- package/lib/form/src/FormItemRow.d.ts +27 -27
- 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/image/src/Image.js +7 -11
- package/lib/input/src/Input.js +2 -0
- package/lib/input-number/src/InputNumber.js +2 -0
- package/lib/input-number/src/utils.js +1 -1
- package/lib/locales/common/deDE.js +6 -0
- package/lib/locales/common/enUS.d.ts +6 -0
- package/lib/locales/common/enUS.js +7 -1
- package/lib/locales/common/frFR.d.ts +3 -0
- package/lib/locales/common/frFR.js +103 -0
- package/lib/locales/common/idID.d.ts +2 -94
- package/lib/locales/common/idID.js +6 -0
- package/lib/locales/common/jaJP.js +6 -0
- package/lib/locales/common/nbNO.js +6 -0
- package/lib/locales/common/ruRU.js +6 -0
- package/lib/locales/common/ukUA.js +6 -0
- package/lib/locales/common/zhCN.js +6 -0
- package/lib/locales/common/zhTW.d.ts +3 -0
- package/lib/locales/common/zhTW.js +102 -0
- package/lib/locales/date/frFR.d.ts +3 -0
- package/lib/locales/date/frFR.js +11 -0
- package/lib/locales/date/idID.d.ts +1 -6
- package/lib/locales/date/zhTW.d.ts +3 -0
- package/lib/locales/date/zhTW.js +11 -0
- package/lib/locales/index.d.ts +4 -0
- package/lib/locales/index.js +9 -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/page-header/src/PageHeader.js +3 -3
- package/lib/page-header/src/styles/index.cssr.js +2 -4
- package/lib/popover/src/Popover.js +4 -1
- package/lib/popover/src/PopoverBody.js +3 -3
- 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/radio/src/Radio.js +3 -3
- package/lib/radio/src/RadioButton.js +4 -5
- package/lib/radio/src/styles/radio-group.cssr.js +8 -4
- package/lib/radio/src/styles/radio.cssr.js +8 -4
- package/lib/radio/src/use-radio.d.ts +0 -3
- package/lib/radio/src/use-radio.js +1 -26
- 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/tabs/src/styles/index.cssr.js +1 -0
- package/lib/tag/src/Tag.d.ts +26 -26
- package/lib/tag/src/Tag.js +26 -26
- package/lib/tag/src/styles/index.cssr.js +55 -55
- package/lib/tag/src/styles/rtl.cssr.js +1 -1
- package/lib/time-picker/src/TimePicker.d.ts +17 -17
- 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/styles/index.cssr.js +9 -4
- 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.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 +29 -28
- package/web-types.json +25 -7
|
@@ -4,19 +4,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4
4
|
readonly default: () => string[];
|
|
5
5
|
};
|
|
6
6
|
readonly active: BooleanConstructor;
|
|
7
|
-
readonly dateFormat:
|
|
8
|
-
readonly type: StringConstructor;
|
|
9
|
-
readonly default: "yyyy-MM-dd";
|
|
10
|
-
};
|
|
7
|
+
readonly dateFormat: StringConstructor;
|
|
11
8
|
readonly timeFormat: {
|
|
12
9
|
readonly type: StringConstructor;
|
|
13
|
-
readonly
|
|
10
|
+
readonly value: "HH:mm:ss";
|
|
14
11
|
};
|
|
15
12
|
readonly value: {
|
|
16
13
|
readonly type: import("vue").PropType<import("../interface").Value | null>;
|
|
17
14
|
readonly default: null;
|
|
18
15
|
};
|
|
19
16
|
readonly shortcuts: import("vue").PropType<import("../interface").Shortcuts>;
|
|
17
|
+
readonly defaultTime: import("vue").PropType<import("../interface").DefaultTime>;
|
|
20
18
|
readonly onConfirm: FunctionConstructor;
|
|
21
19
|
readonly onClose: import("vue").PropType<import("../interface").OnClose>;
|
|
22
20
|
readonly onTabOut: FunctionConstructor;
|
|
@@ -25,7 +23,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
25
23
|
readonly required: true;
|
|
26
24
|
};
|
|
27
25
|
}, {
|
|
28
|
-
handleDateClick: (dateItem: import("../utils").DateItem | import("../utils").MonthItem | import("../utils").YearItem) => void;
|
|
26
|
+
handleDateClick: (dateItem: import("../utils").DateItem | import("../utils").MonthItem | import("../utils").YearItem | import("../utils").QuarterItem) => void;
|
|
29
27
|
handleDateInputBlur: () => void;
|
|
30
28
|
handleDateInput: (value: string) => void;
|
|
31
29
|
handleTimePickerChange: (value: number | null) => void;
|
|
@@ -143,12 +141,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
143
141
|
fontWeightStrong: string;
|
|
144
142
|
cubicBezierEaseInOut: string;
|
|
145
143
|
cubicBezierEaseOut: string;
|
|
146
|
-
/**
|
|
147
|
-
* DateTime Panel
|
|
148
|
-
* Update picker value on:
|
|
149
|
-
* 1. confirm click
|
|
150
|
-
* 2. clear click
|
|
151
|
-
*/
|
|
152
144
|
cubicBezierEaseIn: string;
|
|
153
145
|
borderRadius: string;
|
|
154
146
|
borderRadiusSmall: string;
|
|
@@ -214,12 +206,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
214
206
|
calendarLeftPaddingDatetimerange: string;
|
|
215
207
|
calendarLeftPaddingMonth: string;
|
|
216
208
|
calendarLeftPaddingYear: string;
|
|
209
|
+
calendarLeftPaddingQuarter: string;
|
|
217
210
|
calendarRightPaddingDate: string;
|
|
218
211
|
calendarRightPaddingDatetime: string;
|
|
219
212
|
calendarRightPaddingDaterange: string;
|
|
220
213
|
calendarRightPaddingDatetimerange: string;
|
|
221
214
|
calendarRightPaddingMonth: string;
|
|
222
215
|
calendarRightPaddingYear: string;
|
|
216
|
+
calendarRightPaddingQuarter: string;
|
|
223
217
|
};
|
|
224
218
|
peers: {
|
|
225
219
|
Input: import("../../../_mixins").Theme<"Input", {
|
|
@@ -1076,6 +1070,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1076
1070
|
yearFormat: string;
|
|
1077
1071
|
monthFormat: string;
|
|
1078
1072
|
dayFormat: string;
|
|
1073
|
+
yearTypeFormat: string;
|
|
1074
|
+
monthTypeFormat: string;
|
|
1075
|
+
dateFormat: string;
|
|
1076
|
+
dateTimeFormat: string;
|
|
1077
|
+
quarterFormat: string;
|
|
1079
1078
|
clear: string;
|
|
1080
1079
|
now: string;
|
|
1081
1080
|
confirm: string;
|
|
@@ -1085,6 +1084,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1085
1084
|
datetimePlaceholder: string;
|
|
1086
1085
|
monthPlaceholder: string;
|
|
1087
1086
|
yearPlaceholder: string;
|
|
1087
|
+
quarterPlaceholder: string;
|
|
1088
1088
|
startDatePlaceholder: string;
|
|
1089
1089
|
endDatePlaceholder: string;
|
|
1090
1090
|
startDatetimePlaceholder: string;
|
|
@@ -1118,6 +1118,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1118
1118
|
dateArray: import("vue").ComputedRef<import("../utils").DateItem[]>;
|
|
1119
1119
|
monthArray: import("vue").ComputedRef<import("../utils").MonthItem[]>;
|
|
1120
1120
|
yearArray: import("vue").ComputedRef<import("../utils").YearItem[]>;
|
|
1121
|
+
quarterArray: import("vue").ComputedRef<import("../utils").QuarterItem[]>;
|
|
1121
1122
|
calendarYear: import("vue").ComputedRef<string>;
|
|
1122
1123
|
calendarMonth: import("vue").ComputedRef<string>;
|
|
1123
1124
|
weekdays: import("vue").ComputedRef<string[]>;
|
|
@@ -1137,6 +1138,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1137
1138
|
readonly timeFormat?: unknown;
|
|
1138
1139
|
readonly value?: unknown;
|
|
1139
1140
|
readonly shortcuts?: unknown;
|
|
1141
|
+
readonly defaultTime?: unknown;
|
|
1140
1142
|
readonly onConfirm?: unknown;
|
|
1141
1143
|
readonly onClose?: unknown;
|
|
1142
1144
|
readonly onTabOut?: unknown;
|
|
@@ -1144,21 +1146,20 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1144
1146
|
} & {
|
|
1145
1147
|
value: import("../interface").Value | null;
|
|
1146
1148
|
active: boolean;
|
|
1147
|
-
dateFormat: string;
|
|
1148
1149
|
onUpdateValue: import("../interface").OnPanelUpdateValue;
|
|
1149
1150
|
actions: string[];
|
|
1150
|
-
timeFormat: string;
|
|
1151
1151
|
} & {
|
|
1152
|
+
dateFormat?: string | undefined;
|
|
1152
1153
|
onTabOut?: Function | undefined;
|
|
1153
1154
|
onClose?: import("../interface").OnClose | undefined;
|
|
1154
1155
|
onConfirm?: Function | undefined;
|
|
1156
|
+
defaultTime?: import("../interface").DefaultTime | undefined;
|
|
1157
|
+
timeFormat?: string | undefined;
|
|
1155
1158
|
shortcuts?: import("../interface").Shortcuts | undefined;
|
|
1156
1159
|
}>, {
|
|
1157
1160
|
value: import("../interface").Value | null;
|
|
1158
1161
|
active: boolean;
|
|
1159
|
-
dateFormat: string;
|
|
1160
1162
|
actions: string[];
|
|
1161
|
-
timeFormat: string;
|
|
1162
1163
|
}>;
|
|
1163
1164
|
/**
|
|
1164
1165
|
* DateTime Panel
|
|
@@ -4,7 +4,7 @@ import { NTimePicker } from '../../../time-picker';
|
|
|
4
4
|
import { NInput } from '../../../input';
|
|
5
5
|
import { BackwardIcon, FastBackwardIcon, ForwardIcon, FastForwardIcon } from '../../../_internal/icons';
|
|
6
6
|
import { NBaseFocusDetector } from '../../../_internal';
|
|
7
|
-
import { useCalendar } from './use-calendar';
|
|
7
|
+
import { useCalendar, useCalendarProps } from './use-calendar';
|
|
8
8
|
/**
|
|
9
9
|
* DateTime Panel
|
|
10
10
|
* Update picker value on:
|
|
@@ -13,7 +13,7 @@ import { useCalendar } from './use-calendar';
|
|
|
13
13
|
*/
|
|
14
14
|
export default defineComponent({
|
|
15
15
|
name: 'DateTimePanel',
|
|
16
|
-
props:
|
|
16
|
+
props: useCalendarProps,
|
|
17
17
|
setup(props) {
|
|
18
18
|
return useCalendar(props, 'datetime');
|
|
19
19
|
},
|
|
@@ -4,19 +4,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4
4
|
readonly default: () => string[];
|
|
5
5
|
};
|
|
6
6
|
readonly active: BooleanConstructor;
|
|
7
|
-
readonly dateFormat:
|
|
8
|
-
readonly type: StringConstructor;
|
|
9
|
-
readonly default: "yyyy-MM-dd";
|
|
10
|
-
};
|
|
7
|
+
readonly dateFormat: StringConstructor;
|
|
11
8
|
readonly timeFormat: {
|
|
12
9
|
readonly type: StringConstructor;
|
|
13
|
-
readonly
|
|
10
|
+
readonly value: "HH:mm:ss";
|
|
14
11
|
};
|
|
15
12
|
readonly value: {
|
|
16
13
|
readonly type: import("vue").PropType<import("../interface").Value | null>;
|
|
17
14
|
readonly default: null;
|
|
18
15
|
};
|
|
19
16
|
readonly shortcuts: import("vue").PropType<import("../interface").Shortcuts>;
|
|
17
|
+
readonly defaultTime: import("vue").PropType<import("../interface").DefaultTime>;
|
|
20
18
|
readonly onConfirm: FunctionConstructor;
|
|
21
19
|
readonly onClose: import("vue").PropType<import("../interface").OnClose>;
|
|
22
20
|
readonly onTabOut: FunctionConstructor;
|
|
@@ -206,12 +204,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
206
204
|
calendarLeftPaddingDatetimerange: string;
|
|
207
205
|
calendarLeftPaddingMonth: string;
|
|
208
206
|
calendarLeftPaddingYear: string;
|
|
207
|
+
calendarLeftPaddingQuarter: string;
|
|
209
208
|
calendarRightPaddingDate: string;
|
|
210
209
|
calendarRightPaddingDatetime: string;
|
|
211
210
|
calendarRightPaddingDaterange: string;
|
|
212
211
|
calendarRightPaddingDatetimerange: string;
|
|
213
212
|
calendarRightPaddingMonth: string;
|
|
214
213
|
calendarRightPaddingYear: string;
|
|
214
|
+
calendarRightPaddingQuarter: string;
|
|
215
215
|
};
|
|
216
216
|
peers: {
|
|
217
217
|
Input: import("../../../_mixins").Theme<"Input", {
|
|
@@ -1068,6 +1068,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1068
1068
|
yearFormat: string;
|
|
1069
1069
|
monthFormat: string;
|
|
1070
1070
|
dayFormat: string;
|
|
1071
|
+
yearTypeFormat: string;
|
|
1072
|
+
monthTypeFormat: string;
|
|
1073
|
+
dateFormat: string;
|
|
1074
|
+
dateTimeFormat: string;
|
|
1075
|
+
quarterFormat: string;
|
|
1071
1076
|
clear: string;
|
|
1072
1077
|
now: string;
|
|
1073
1078
|
confirm: string;
|
|
@@ -1077,6 +1082,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1077
1082
|
datetimePlaceholder: string;
|
|
1078
1083
|
monthPlaceholder: string;
|
|
1079
1084
|
yearPlaceholder: string;
|
|
1085
|
+
quarterPlaceholder: string;
|
|
1080
1086
|
startDatePlaceholder: string;
|
|
1081
1087
|
endDatePlaceholder: string;
|
|
1082
1088
|
startDatetimePlaceholder: string;
|
|
@@ -1131,6 +1137,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1131
1137
|
readonly timeFormat?: unknown;
|
|
1132
1138
|
readonly value?: unknown;
|
|
1133
1139
|
readonly shortcuts?: unknown;
|
|
1140
|
+
readonly defaultTime?: unknown;
|
|
1134
1141
|
readonly onConfirm?: unknown;
|
|
1135
1142
|
readonly onClose?: unknown;
|
|
1136
1143
|
readonly onTabOut?: unknown;
|
|
@@ -1138,20 +1145,19 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1138
1145
|
} & {
|
|
1139
1146
|
value: import("../interface").Value | null;
|
|
1140
1147
|
active: boolean;
|
|
1141
|
-
dateFormat: string;
|
|
1142
1148
|
onUpdateValue: import("../interface").OnPanelUpdateValue;
|
|
1143
1149
|
actions: unknown[];
|
|
1144
|
-
timeFormat: string;
|
|
1145
1150
|
} & {
|
|
1151
|
+
dateFormat?: string | undefined;
|
|
1146
1152
|
onTabOut?: Function | undefined;
|
|
1147
1153
|
onClose?: import("../interface").OnClose | undefined;
|
|
1148
1154
|
onConfirm?: Function | undefined;
|
|
1155
|
+
defaultTime?: import("../interface").DefaultTime | undefined;
|
|
1156
|
+
timeFormat?: string | undefined;
|
|
1149
1157
|
shortcuts?: import("../interface").Shortcuts | undefined;
|
|
1150
1158
|
}>, {
|
|
1151
1159
|
value: import("../interface").Value | null;
|
|
1152
1160
|
active: boolean;
|
|
1153
|
-
dateFormat: string;
|
|
1154
1161
|
actions: unknown[];
|
|
1155
|
-
timeFormat: string;
|
|
1156
1162
|
}>;
|
|
1157
1163
|
export default _default;
|
|
@@ -4,11 +4,11 @@ import { NInput } from '../../../input';
|
|
|
4
4
|
import { NTimePicker } from '../../../time-picker';
|
|
5
5
|
import { BackwardIcon, FastBackwardIcon, ForwardIcon, FastForwardIcon } from '../../../_internal/icons';
|
|
6
6
|
import { NBaseFocusDetector } from '../../../_internal';
|
|
7
|
-
import { useDualCalendar } from './use-dual-calendar';
|
|
8
7
|
import { warnOnce } from '../../../_utils';
|
|
8
|
+
import { useDualCalendar, useDualCalendarProps } from './use-dual-calendar';
|
|
9
9
|
export default defineComponent({
|
|
10
10
|
name: 'DateTimeRangePanel',
|
|
11
|
-
props:
|
|
11
|
+
props: useDualCalendarProps,
|
|
12
12
|
setup(props) {
|
|
13
13
|
if (process.env.NODE_ENV !== 'production') {
|
|
14
14
|
watchEffect(() => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { VNode, PropType } from 'vue';
|
|
2
|
-
import type { MonthItem, YearItem } from '../utils';
|
|
2
|
+
import type { MonthItem, YearItem, QuarterItem } from '../utils';
|
|
3
3
|
declare const _default: import("vue").DefineComponent<{
|
|
4
4
|
type: {
|
|
5
|
-
type: PropType<"month" | "year">;
|
|
5
|
+
type: PropType<"month" | "year" | "quarter">;
|
|
6
6
|
required: true;
|
|
7
7
|
};
|
|
8
8
|
actions: {
|
|
@@ -10,19 +10,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
10
10
|
readonly default: () => string[];
|
|
11
11
|
};
|
|
12
12
|
active: BooleanConstructor;
|
|
13
|
-
dateFormat:
|
|
14
|
-
readonly type: StringConstructor;
|
|
15
|
-
readonly default: "yyyy-MM-dd";
|
|
16
|
-
};
|
|
13
|
+
dateFormat: StringConstructor;
|
|
17
14
|
timeFormat: {
|
|
18
15
|
readonly type: StringConstructor;
|
|
19
|
-
readonly
|
|
16
|
+
readonly value: "HH:mm:ss";
|
|
20
17
|
};
|
|
21
18
|
value: {
|
|
22
19
|
readonly type: PropType<import("../interface").Value | null>;
|
|
23
20
|
readonly default: null;
|
|
24
21
|
};
|
|
25
22
|
shortcuts: PropType<import("../interface").Shortcuts>;
|
|
23
|
+
defaultTime: PropType<import("../interface").DefaultTime>;
|
|
26
24
|
onConfirm: FunctionConstructor;
|
|
27
25
|
onClose: PropType<import("../interface").OnClose>;
|
|
28
26
|
onTabOut: FunctionConstructor;
|
|
@@ -31,8 +29,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
31
29
|
readonly required: true;
|
|
32
30
|
};
|
|
33
31
|
}, {
|
|
34
|
-
renderItem: (item: YearItem | MonthItem, i: number, mergedClsPrefix: string) => VNode;
|
|
35
|
-
handleDateClick: (dateItem: import("../utils").DateItem | MonthItem | YearItem) => void;
|
|
32
|
+
renderItem: (item: YearItem | MonthItem | QuarterItem, i: number, mergedClsPrefix: string) => VNode;
|
|
33
|
+
handleDateClick: (dateItem: import("../utils").DateItem | MonthItem | YearItem | QuarterItem) => void;
|
|
36
34
|
handleDateInputBlur: () => void;
|
|
37
35
|
handleDateInput: (value: string) => void;
|
|
38
36
|
handleTimePickerChange: (value: number | null) => void;
|
|
@@ -149,12 +147,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
149
147
|
fontWeight: string;
|
|
150
148
|
fontWeightStrong: string;
|
|
151
149
|
cubicBezierEaseInOut: string;
|
|
152
|
-
/**
|
|
153
|
-
* Month Panel
|
|
154
|
-
* Update picker value on:
|
|
155
|
-
* 1. item click
|
|
156
|
-
* 2. clear click
|
|
157
|
-
*/
|
|
158
150
|
cubicBezierEaseOut: string;
|
|
159
151
|
cubicBezierEaseIn: string;
|
|
160
152
|
borderRadius: string;
|
|
@@ -221,12 +213,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
221
213
|
calendarLeftPaddingDatetimerange: string;
|
|
222
214
|
calendarLeftPaddingMonth: string;
|
|
223
215
|
calendarLeftPaddingYear: string;
|
|
216
|
+
calendarLeftPaddingQuarter: string;
|
|
224
217
|
calendarRightPaddingDate: string;
|
|
225
218
|
calendarRightPaddingDatetime: string;
|
|
226
219
|
calendarRightPaddingDaterange: string;
|
|
227
220
|
calendarRightPaddingDatetimerange: string;
|
|
228
221
|
calendarRightPaddingMonth: string;
|
|
229
222
|
calendarRightPaddingYear: string;
|
|
223
|
+
calendarRightPaddingQuarter: string;
|
|
230
224
|
};
|
|
231
225
|
peers: {
|
|
232
226
|
Input: import("../../../_mixins").Theme<"Input", {
|
|
@@ -1083,6 +1077,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1083
1077
|
yearFormat: string;
|
|
1084
1078
|
monthFormat: string;
|
|
1085
1079
|
dayFormat: string;
|
|
1080
|
+
yearTypeFormat: string;
|
|
1081
|
+
monthTypeFormat: string;
|
|
1082
|
+
dateFormat: string;
|
|
1083
|
+
dateTimeFormat: string;
|
|
1084
|
+
quarterFormat: string;
|
|
1086
1085
|
clear: string;
|
|
1087
1086
|
now: string;
|
|
1088
1087
|
confirm: string;
|
|
@@ -1092,6 +1091,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1092
1091
|
datetimePlaceholder: string;
|
|
1093
1092
|
monthPlaceholder: string;
|
|
1094
1093
|
yearPlaceholder: string;
|
|
1094
|
+
quarterPlaceholder: string;
|
|
1095
1095
|
startDatePlaceholder: string;
|
|
1096
1096
|
endDatePlaceholder: string;
|
|
1097
1097
|
startDatetimePlaceholder: string;
|
|
@@ -1125,6 +1125,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1125
1125
|
dateArray: import("vue").ComputedRef<import("../utils").DateItem[]>;
|
|
1126
1126
|
monthArray: import("vue").ComputedRef<MonthItem[]>;
|
|
1127
1127
|
yearArray: import("vue").ComputedRef<YearItem[]>;
|
|
1128
|
+
quarterArray: import("vue").ComputedRef<QuarterItem[]>;
|
|
1128
1129
|
calendarYear: import("vue").ComputedRef<string>;
|
|
1129
1130
|
calendarMonth: import("vue").ComputedRef<string>;
|
|
1130
1131
|
weekdays: import("vue").ComputedRef<string[]>;
|
|
@@ -1145,29 +1146,29 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1145
1146
|
timeFormat?: unknown;
|
|
1146
1147
|
value?: unknown;
|
|
1147
1148
|
shortcuts?: unknown;
|
|
1149
|
+
defaultTime?: unknown;
|
|
1148
1150
|
onConfirm?: unknown;
|
|
1149
1151
|
onClose?: unknown;
|
|
1150
1152
|
onTabOut?: unknown;
|
|
1151
1153
|
onUpdateValue?: unknown;
|
|
1152
1154
|
} & {
|
|
1153
|
-
type: "month" | "year";
|
|
1155
|
+
type: "month" | "year" | "quarter";
|
|
1154
1156
|
value: import("../interface").Value | null;
|
|
1155
1157
|
active: boolean;
|
|
1156
|
-
dateFormat: string;
|
|
1157
1158
|
onUpdateValue: import("../interface").OnPanelUpdateValue;
|
|
1158
1159
|
actions: string[];
|
|
1159
|
-
timeFormat: string;
|
|
1160
1160
|
} & {
|
|
1161
|
+
dateFormat?: string | undefined;
|
|
1161
1162
|
onTabOut?: Function | undefined;
|
|
1162
1163
|
onClose?: import("../interface").OnClose | undefined;
|
|
1163
1164
|
onConfirm?: Function | undefined;
|
|
1165
|
+
defaultTime?: import("../interface").DefaultTime | undefined;
|
|
1166
|
+
timeFormat?: string | undefined;
|
|
1164
1167
|
shortcuts?: import("../interface").Shortcuts | undefined;
|
|
1165
1168
|
}>, {
|
|
1166
1169
|
value: import("../interface").Value | null;
|
|
1167
1170
|
active: boolean;
|
|
1168
|
-
dateFormat: string;
|
|
1169
1171
|
actions: string[];
|
|
1170
|
-
timeFormat: string;
|
|
1171
1172
|
}>;
|
|
1172
1173
|
/**
|
|
1173
1174
|
* Month Panel
|
|
@@ -2,8 +2,8 @@ import { h, defineComponent } from 'vue';
|
|
|
2
2
|
import { VirtualList } from 'vueuc';
|
|
3
3
|
import { NButton, NxButton } from '../../../button';
|
|
4
4
|
import { NBaseFocusDetector, NScrollbar } from '../../../_internal';
|
|
5
|
-
import { useCalendar } from './use-calendar';
|
|
6
5
|
import { MONTH_ITEM_HEIGHT } from '../config';
|
|
6
|
+
import { useCalendar, useCalendarProps } from './use-calendar';
|
|
7
7
|
/**
|
|
8
8
|
* Month Panel
|
|
9
9
|
* Update picker value on:
|
|
@@ -12,32 +12,41 @@ import { MONTH_ITEM_HEIGHT } from '../config';
|
|
|
12
12
|
*/
|
|
13
13
|
export default defineComponent({
|
|
14
14
|
name: 'MonthPanel',
|
|
15
|
-
props: Object.assign(Object.assign({},
|
|
15
|
+
props: Object.assign(Object.assign({}, useCalendarProps), { type: {
|
|
16
16
|
type: String,
|
|
17
17
|
required: true
|
|
18
18
|
} }),
|
|
19
19
|
setup(props) {
|
|
20
20
|
const useCalendarRef = useCalendar(props, props.type);
|
|
21
|
+
const getRenderContent = (item) => {
|
|
22
|
+
switch (item.type) {
|
|
23
|
+
case 'year':
|
|
24
|
+
return item.dateObject.year;
|
|
25
|
+
case 'month':
|
|
26
|
+
return item.dateObject.month + 1;
|
|
27
|
+
case 'quarter':
|
|
28
|
+
return `Q ${item.dateObject.quarter}`;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
21
31
|
const renderItem = (item, i, mergedClsPrefix) => {
|
|
22
32
|
const { mergedIsDateDisabled, handleDateClick } = useCalendarRef;
|
|
23
33
|
return (h("div", { "data-n-date": true, key: i, class: [
|
|
24
34
|
`${mergedClsPrefix}-date-panel-month-calendar__picker-col-item`,
|
|
25
35
|
{
|
|
26
|
-
[`${mergedClsPrefix}-date-panel-month-calendar__picker-col-item--current`]: item.
|
|
27
|
-
? item.isCurrentMonth
|
|
28
|
-
: item.isCurrentYear,
|
|
36
|
+
[`${mergedClsPrefix}-date-panel-month-calendar__picker-col-item--current`]: item.isCurrent,
|
|
29
37
|
[`${mergedClsPrefix}-date-panel-month-calendar__picker-col-item--selected`]: item.selected,
|
|
30
38
|
[`${mergedClsPrefix}-date-panel-month-calendar__picker-col-item--disabled`]: mergedIsDateDisabled(item.ts)
|
|
31
39
|
}
|
|
32
|
-
], onClick: () => handleDateClick(item) }, item
|
|
33
|
-
? item.dateObject.month + 1
|
|
34
|
-
: item.dateObject.year));
|
|
40
|
+
], onClick: () => handleDateClick(item) }, getRenderContent(item)));
|
|
35
41
|
};
|
|
36
42
|
return Object.assign(Object.assign({}, useCalendarRef), { renderItem });
|
|
37
43
|
},
|
|
38
44
|
render() {
|
|
39
45
|
const { mergedClsPrefix, mergedTheme, shortcuts, actions, renderItem, type } = this;
|
|
40
|
-
return (h("div", { ref: "selfRef", tabindex: 0, class:
|
|
46
|
+
return (h("div", { ref: "selfRef", tabindex: 0, class: [
|
|
47
|
+
`${mergedClsPrefix}-date-panel`,
|
|
48
|
+
`${mergedClsPrefix}-date-panel--month`
|
|
49
|
+
], onFocus: this.handlePanelFocus, onKeydown: this.handlePanelKeyDown },
|
|
41
50
|
h("div", { class: `${mergedClsPrefix}-date-panel-month-calendar` },
|
|
42
51
|
h(NScrollbar, { ref: "scrollbarInstRef", class: `${mergedClsPrefix}-date-panel-month-calendar__picker-col`, theme: mergedTheme.peers.Scrollbar, themeOverrides: mergedTheme.peerOverrides.Scrollbar, container: this.virtualListContainer, content: this.virtualListContent, horizontalRailStyle: { zIndex: 1 }, verticalRailStyle: { zIndex: 1 } }, {
|
|
43
52
|
default: () => (h(VirtualList, { ref: "yearScrollRef", items: this.yearArray, itemSize: MONTH_ITEM_HEIGHT, showScrollbar: false, keyField: "ts", onScroll: this.handleVirtualListScroll, paddingBottom: 4 }, {
|
|
@@ -46,11 +55,13 @@ export default defineComponent({
|
|
|
46
55
|
}
|
|
47
56
|
}))
|
|
48
57
|
}),
|
|
49
|
-
type === 'month' ? (h("div", { class: `${mergedClsPrefix}-date-panel-month-calendar__picker-col` },
|
|
58
|
+
type === 'month' || type === 'quarter' ? (h("div", { class: `${mergedClsPrefix}-date-panel-month-calendar__picker-col` },
|
|
50
59
|
h(NScrollbar, { ref: "monthScrollRef", theme: mergedTheme.peers.Scrollbar, themeOverrides: mergedTheme.peerOverrides.Scrollbar }, {
|
|
51
60
|
default: () => [
|
|
52
|
-
|
|
53
|
-
|
|
61
|
+
(type === 'month'
|
|
62
|
+
? this.monthArray
|
|
63
|
+
: this.quarterArray).map((item, i) => renderItem(item, i, mergedClsPrefix)),
|
|
64
|
+
h("div", { class: `${mergedClsPrefix}-date-panel-${type}-calendar__padding` })
|
|
54
65
|
]
|
|
55
66
|
}))) : null),
|
|
56
67
|
this.datePickerSlots.footer ? (h("div", { class: `${mergedClsPrefix}-date-panel-footer` }, {
|
|
@@ -1,25 +1,23 @@
|
|
|
1
1
|
import { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
-
import { Shortcuts } from '../interface';
|
|
3
|
-
import type { DateItem, MonthItem, YearItem } from '../utils';
|
|
2
|
+
import type { Shortcuts } from '../interface';
|
|
3
|
+
import type { DateItem, MonthItem, YearItem, QuarterItem } from '../utils';
|
|
4
4
|
declare const useCalendarProps: {
|
|
5
5
|
readonly actions: {
|
|
6
6
|
readonly type: PropType<string[]>;
|
|
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: PropType<import("../interface").Value | null>;
|
|
20
17
|
readonly default: null;
|
|
21
18
|
};
|
|
22
19
|
readonly shortcuts: PropType<Shortcuts>;
|
|
20
|
+
readonly defaultTime: PropType<import("../interface").DefaultTime>;
|
|
23
21
|
readonly onConfirm: FunctionConstructor;
|
|
24
22
|
readonly onClose: PropType<import("../interface").OnClose>;
|
|
25
23
|
readonly onTabOut: FunctionConstructor;
|
|
@@ -28,8 +26,8 @@ declare const useCalendarProps: {
|
|
|
28
26
|
readonly required: true;
|
|
29
27
|
};
|
|
30
28
|
};
|
|
31
|
-
declare function useCalendar(props: ExtractPropTypes<typeof useCalendarProps>, type: 'date' | 'datetime' | 'month' | 'year'): {
|
|
32
|
-
handleDateClick: (dateItem: DateItem | MonthItem | YearItem) => void;
|
|
29
|
+
declare function useCalendar(props: ExtractPropTypes<typeof useCalendarProps>, type: 'date' | 'datetime' | 'month' | 'year' | 'quarter'): {
|
|
30
|
+
handleDateClick: (dateItem: DateItem | MonthItem | YearItem | QuarterItem) => void;
|
|
33
31
|
handleDateInputBlur: () => void;
|
|
34
32
|
handleDateInput: (value: string) => void;
|
|
35
33
|
handleTimePickerChange: (value: number | null) => void;
|
|
@@ -212,12 +210,14 @@ declare function useCalendar(props: ExtractPropTypes<typeof useCalendarProps>, t
|
|
|
212
210
|
calendarLeftPaddingDatetimerange: string;
|
|
213
211
|
calendarLeftPaddingMonth: string;
|
|
214
212
|
calendarLeftPaddingYear: string;
|
|
213
|
+
calendarLeftPaddingQuarter: string;
|
|
215
214
|
calendarRightPaddingDate: string;
|
|
216
215
|
calendarRightPaddingDatetime: string;
|
|
217
216
|
calendarRightPaddingDaterange: string;
|
|
218
217
|
calendarRightPaddingDatetimerange: string;
|
|
219
218
|
calendarRightPaddingMonth: string;
|
|
220
219
|
calendarRightPaddingYear: string;
|
|
220
|
+
calendarRightPaddingQuarter: string;
|
|
221
221
|
};
|
|
222
222
|
peers: {
|
|
223
223
|
Input: import("../../../_mixins").Theme<"Input", {
|
|
@@ -1074,6 +1074,11 @@ declare function useCalendar(props: ExtractPropTypes<typeof useCalendarProps>, t
|
|
|
1074
1074
|
yearFormat: string;
|
|
1075
1075
|
monthFormat: string;
|
|
1076
1076
|
dayFormat: string;
|
|
1077
|
+
yearTypeFormat: string;
|
|
1078
|
+
monthTypeFormat: string;
|
|
1079
|
+
dateFormat: string;
|
|
1080
|
+
dateTimeFormat: string;
|
|
1081
|
+
quarterFormat: string;
|
|
1077
1082
|
clear: string;
|
|
1078
1083
|
now: string;
|
|
1079
1084
|
confirm: string;
|
|
@@ -1083,6 +1088,7 @@ declare function useCalendar(props: ExtractPropTypes<typeof useCalendarProps>, t
|
|
|
1083
1088
|
datetimePlaceholder: string;
|
|
1084
1089
|
monthPlaceholder: string;
|
|
1085
1090
|
yearPlaceholder: string;
|
|
1091
|
+
quarterPlaceholder: string;
|
|
1086
1092
|
startDatePlaceholder: string;
|
|
1087
1093
|
endDatePlaceholder: string;
|
|
1088
1094
|
startDatetimePlaceholder: string;
|
|
@@ -1116,6 +1122,7 @@ declare function useCalendar(props: ExtractPropTypes<typeof useCalendarProps>, t
|
|
|
1116
1122
|
dateArray: import("vue").ComputedRef<DateItem[]>;
|
|
1117
1123
|
monthArray: import("vue").ComputedRef<MonthItem[]>;
|
|
1118
1124
|
yearArray: import("vue").ComputedRef<YearItem[]>;
|
|
1125
|
+
quarterArray: import("vue").ComputedRef<QuarterItem[]>;
|
|
1119
1126
|
calendarYear: import("vue").ComputedRef<string>;
|
|
1120
1127
|
calendarMonth: import("vue").ComputedRef<string>;
|
|
1121
1128
|
weekdays: import("vue").ComputedRef<string[]>;
|
|
@@ -1129,33 +1136,4 @@ declare function useCalendar(props: ExtractPropTypes<typeof useCalendarProps>, t
|
|
|
1129
1136
|
handleSingleShortcutMouseenter: (shortcut: Shortcuts[string]) => void;
|
|
1130
1137
|
handleSingleShortcutClick: (shortcut: Shortcuts[string]) => void;
|
|
1131
1138
|
};
|
|
1132
|
-
|
|
1133
|
-
var props: {
|
|
1134
|
-
readonly actions: {
|
|
1135
|
-
readonly type: PropType<string[]>;
|
|
1136
|
-
readonly default: () => string[];
|
|
1137
|
-
};
|
|
1138
|
-
readonly active: BooleanConstructor;
|
|
1139
|
-
readonly dateFormat: {
|
|
1140
|
-
readonly type: StringConstructor;
|
|
1141
|
-
readonly default: "yyyy-MM-dd";
|
|
1142
|
-
};
|
|
1143
|
-
readonly timeFormat: {
|
|
1144
|
-
readonly type: StringConstructor;
|
|
1145
|
-
readonly default: "HH:mm:ss";
|
|
1146
|
-
};
|
|
1147
|
-
readonly value: {
|
|
1148
|
-
readonly type: PropType<import("../interface").Value | null>;
|
|
1149
|
-
readonly default: null;
|
|
1150
|
-
};
|
|
1151
|
-
readonly shortcuts: PropType<Shortcuts>;
|
|
1152
|
-
readonly onConfirm: FunctionConstructor;
|
|
1153
|
-
readonly onClose: PropType<import("../interface").OnClose>;
|
|
1154
|
-
readonly onTabOut: FunctionConstructor;
|
|
1155
|
-
readonly onUpdateValue: {
|
|
1156
|
-
readonly type: PropType<import("../interface").OnPanelUpdateValue>;
|
|
1157
|
-
readonly required: true;
|
|
1158
|
-
};
|
|
1159
|
-
};
|
|
1160
|
-
}
|
|
1161
|
-
export { useCalendar };
|
|
1139
|
+
export { useCalendar, useCalendarProps };
|