tanxin-ui 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +45 -0
- package/README.md +11 -0
- package/dist/logo.png +0 -0
- package/dist/style.css +1 -0
- package/dist/tanxin-ui.es.js +23163 -0
- package/dist/tanxin-ui.umd.js +17 -0
- package/es/affix/index.d.ts +100 -0
- package/es/affix/index.js +4 -0
- package/es/affix/src/affix.d.ts +30 -0
- package/es/affix/src/affix.js +139 -0
- package/es/alert/index.d.ts +183 -0
- package/es/alert/index.js +4 -0
- package/es/alert/src/alert.d.ts +65 -0
- package/es/alert/src/alert.js +156 -0
- package/es/anchor/index.d.ts +114 -0
- package/es/anchor/index.js +6 -0
- package/es/anchor/src/anchor-link.d.ts +6 -0
- package/es/anchor/src/anchor-link.js +69 -0
- package/es/anchor/src/anchor.d.ts +10 -0
- package/es/anchor/src/anchor.js +163 -0
- package/es/anchor/src/context.d.ts +11 -0
- package/es/anchor/src/context.js +9 -0
- package/es/avatar/index.d.ts +193 -0
- package/es/avatar/index.js +4 -0
- package/es/avatar/src/avatar.d.ts +73 -0
- package/es/avatar/src/avatar.js +137 -0
- package/es/back-top/index.d.ts +133 -0
- package/es/back-top/index.js +4 -0
- package/es/back-top/src/back-top.d.ts +45 -0
- package/es/back-top/src/back-top.js +163 -0
- package/es/badge/index.d.ts +111 -0
- package/es/badge/index.js +4 -0
- package/es/badge/src/badge.d.ts +33 -0
- package/es/badge/src/badge.js +76 -0
- package/es/breadcrumb/index.d.ts +154 -0
- package/es/breadcrumb/index.js +6 -0
- package/es/breadcrumb/src/breadcrumb-item.d.ts +28 -0
- package/es/breadcrumb/src/breadcrumb-item.js +14 -0
- package/es/breadcrumb/src/breadcrumb.d.ts +23 -0
- package/es/breadcrumb/src/breadcrumb.js +81 -0
- package/es/button/index.d.ts +530 -0
- package/es/button/index.js +4 -0
- package/es/button/src/button.d.ts +292 -0
- package/es/button/src/button.js +214 -0
- package/es/calendar/index.d.ts +254 -0
- package/es/calendar/index.js +4 -0
- package/es/calendar/src/calendar.d.ts +101 -0
- package/es/calendar/src/calendar.js +329 -0
- package/es/card/index.d.ts +206 -0
- package/es/card/index.js +4 -0
- package/es/card/src/card.d.ts +78 -0
- package/es/card/src/card.js +76 -0
- package/es/carousel/index.d.ts +240 -0
- package/es/carousel/index.js +4 -0
- package/es/carousel/src/carousel.d.ts +103 -0
- package/es/carousel/src/carousel.js +354 -0
- package/es/cascader/index.d.ts +631 -0
- package/es/cascader/index.js +4 -0
- package/es/cascader/src/cascader.d.ts +282 -0
- package/es/cascader/src/cascader.js +328 -0
- package/es/cascader-panel/index.d.ts +444 -0
- package/es/cascader-panel/index.js +4 -0
- package/es/cascader-panel/src/cascader-panel.d.ts +188 -0
- package/es/cascader-panel/src/cascader-panel.js +514 -0
- package/es/cascader-panel/src/context.d.ts +101 -0
- package/es/cascader-panel/src/context.js +33 -0
- package/es/checkbox/index.d.ts +495 -0
- package/es/checkbox/index.js +6 -0
- package/es/checkbox/src/checkbox-group.d.ts +77 -0
- package/es/checkbox/src/checkbox-group.js +77 -0
- package/es/checkbox/src/checkbox.d.ts +118 -0
- package/es/checkbox/src/checkbox.js +202 -0
- package/es/checkbox/src/context.d.ts +15 -0
- package/es/checkbox/src/context.js +9 -0
- package/es/color-picker/index.d.ts +328 -0
- package/es/color-picker/index.js +4 -0
- package/es/color-picker/src/color-picker-content.d.ts +88 -0
- package/es/color-picker/src/color-picker-content.js +568 -0
- package/es/color-picker/src/color-picker.d.ts +133 -0
- package/es/color-picker/src/color-picker.js +262 -0
- package/es/color-picker/src/context.d.ts +17 -0
- package/es/color-picker/src/context.js +9 -0
- package/es/components.d.ts +59 -0
- package/es/components.js +59 -0
- package/es/config-provider/index.d.ts +80 -0
- package/es/config-provider/index.js +4 -0
- package/es/config-provider/src/config-provider.d.ts +25 -0
- package/es/config-provider/src/config-provider.js +21 -0
- package/es/config-provider/src/context.d.ts +10 -0
- package/es/config-provider/src/context.js +11 -0
- package/es/date-picker/index.d.ts +493 -0
- package/es/date-picker/index.js +4 -0
- package/es/date-picker/src/context.d.ts +45 -0
- package/es/date-picker/src/context.js +9 -0
- package/es/date-picker/src/date-picker-date.d.ts +168 -0
- package/es/date-picker/src/date-picker-date.js +571 -0
- package/es/date-picker/src/date-picker-time.d.ts +157 -0
- package/es/date-picker/src/date-picker-time.js +324 -0
- package/es/date-picker/src/date-picker-week.d.ts +167 -0
- package/es/date-picker/src/date-picker-week.js +546 -0
- package/es/date-picker/src/date-picker-year.d.ts +135 -0
- package/es/date-picker/src/date-picker-year.js +329 -0
- package/es/date-picker/src/date-picker.d.ts +218 -0
- package/es/date-picker/src/date-picker.js +962 -0
- package/es/divider/index.d.ts +50 -0
- package/es/divider/index.js +4 -0
- package/es/divider/src/divider.d.ts +4 -0
- package/es/divider/src/divider.js +62 -0
- package/es/drawer/index.d.ts +488 -0
- package/es/drawer/index.js +4 -0
- package/es/drawer/src/drawer.d.ts +302 -0
- package/es/drawer/src/drawer.js +346 -0
- package/es/dropdown/index.d.ts +571 -0
- package/es/dropdown/index.js +8 -0
- package/es/dropdown/src/context.d.ts +32 -0
- package/es/dropdown/src/context.js +9 -0
- package/es/dropdown/src/dropdown-group.d.ts +20 -0
- package/es/dropdown/src/dropdown-group.js +12 -0
- package/es/dropdown/src/dropdown-item.d.ts +63 -0
- package/es/dropdown/src/dropdown-item.js +29 -0
- package/es/dropdown/src/dropdown.d.ts +155 -0
- package/es/dropdown/src/dropdown.js +490 -0
- package/es/empty/index.d.ts +50 -0
- package/es/empty/index.js +4 -0
- package/es/empty/src/empty.d.ts +4 -0
- package/es/empty/src/empty.js +112 -0
- package/es/form/index.d.ts +534 -0
- package/es/form/index.js +6 -0
- package/es/form/src/context.d.ts +36 -0
- package/es/form/src/context.js +9 -0
- package/es/form/src/form-item.d.ts +86 -0
- package/es/form/src/form-item.js +304 -0
- package/es/form/src/form.d.ts +128 -0
- package/es/form/src/form.js +166 -0
- package/es/grid/index.d.ts +379 -0
- package/es/grid/index.js +6 -0
- package/es/grid/src/context.d.ts +17 -0
- package/es/grid/src/context.js +9 -0
- package/es/grid/src/grid-col.d.ts +57 -0
- package/es/grid/src/grid-col.js +100 -0
- package/es/grid/src/grid.d.ts +88 -0
- package/es/grid/src/grid.js +123 -0
- package/es/icon/index.d.ts +112 -0
- package/es/icon/index.js +4 -0
- package/es/icon/src/icon.d.ts +34 -0
- package/es/icon/src/icon.js +45 -0
- package/es/index.d.ts +7 -0
- package/es/index.js +73 -0
- package/es/input/index.d.ts +514 -0
- package/es/input/index.js +4 -0
- package/es/input/src/input.d.ts +214 -0
- package/es/input/src/input.js +344 -0
- package/es/input-number/index.d.ts +608 -0
- package/es/input-number/index.js +4 -0
- package/es/input-number/src/input-number.d.ts +266 -0
- package/es/input-number/src/input-number.js +429 -0
- package/es/layout/index.d.ts +632 -0
- package/es/layout/index.js +12 -0
- package/es/layout/src/content.d.ts +25 -0
- package/es/layout/src/content.js +36 -0
- package/es/layout/src/context.d.ts +8 -0
- package/es/layout/src/context.js +9 -0
- package/es/layout/src/footer.d.ts +25 -0
- package/es/layout/src/footer.js +36 -0
- package/es/layout/src/header.d.ts +25 -0
- package/es/layout/src/header.js +36 -0
- package/es/layout/src/layout.d.ts +25 -0
- package/es/layout/src/layout.js +45 -0
- package/es/layout/src/sider.d.ts +97 -0
- package/es/layout/src/sider.js +202 -0
- package/es/line-grid/index.d.ts +915 -0
- package/es/line-grid/index.js +8 -0
- package/es/line-grid/src/col.d.ts +100 -0
- package/es/line-grid/src/col.js +130 -0
- package/es/line-grid/src/context.d.ts +12 -0
- package/es/line-grid/src/context.js +13 -0
- package/es/line-grid/src/flex.d.ts +111 -0
- package/es/line-grid/src/flex.js +135 -0
- package/es/line-grid/src/row.d.ts +50 -0
- package/es/line-grid/src/row.js +95 -0
- package/es/link/index.d.ts +50 -0
- package/es/link/index.js +4 -0
- package/es/link/src/link.d.ts +4 -0
- package/es/link/src/link.js +68 -0
- package/es/list/index.d.ts +271 -0
- package/es/list/index.js +6 -0
- package/es/list/src/context.d.ts +11 -0
- package/es/list/src/context.js +9 -0
- package/es/list/src/list-item.d.ts +31 -0
- package/es/list/src/list-item.js +89 -0
- package/es/list/src/list.d.ts +58 -0
- package/es/list/src/list.js +86 -0
- package/es/loading/index.d.ts +224 -0
- package/es/loading/index.js +4 -0
- package/es/loading/src/loading.d.ts +86 -0
- package/es/loading/src/loading.js +264 -0
- package/es/loading-bar/index.d.ts +2 -0
- package/es/loading-bar/index.js +4 -0
- package/es/loading-bar/src/loading-bar-item.d.ts +80 -0
- package/es/loading-bar/src/loading-bar-item.js +124 -0
- package/es/loading-bar/src/loading-bar.d.ts +10 -0
- package/es/loading-bar/src/loading-bar.js +62 -0
- package/es/logo.png +0 -0
- package/es/menu/index.d.ts +552 -0
- package/es/menu/index.js +8 -0
- package/es/menu/src/context.d.ts +91 -0
- package/es/menu/src/context.js +25 -0
- package/es/menu/src/menu-group.d.ts +20 -0
- package/es/menu/src/menu-group.js +12 -0
- package/es/menu/src/menu-item.d.ts +63 -0
- package/es/menu/src/menu-item.js +17 -0
- package/es/menu/src/menu.d.ts +147 -0
- package/es/menu/src/menu.js +170 -0
- package/es/menu/src/use-horizontal.d.ts +3 -0
- package/es/menu/src/use-horizontal.js +161 -0
- package/es/menu/src/use-pop.d.ts +3 -0
- package/es/menu/src/use-pop.js +213 -0
- package/es/menu/src/use-vertical.d.ts +3 -0
- package/es/menu/src/use-vertical.js +195 -0
- package/es/message/index.d.ts +12 -0
- package/es/message/index.js +4 -0
- package/es/message/src/message-item.d.ts +130 -0
- package/es/message/src/message-item.js +171 -0
- package/es/message/src/message-list.d.ts +126 -0
- package/es/message/src/message-list.js +99 -0
- package/es/message/src/message.d.ts +26 -0
- package/es/message/src/message.js +63 -0
- package/es/message-box/index.d.ts +2 -0
- package/es/message-box/index.js +4 -0
- package/es/message-box/src/message-box-item.d.ts +310 -0
- package/es/message-box/src/message-box-item.js +298 -0
- package/es/message-box/src/message-box.d.ts +16 -0
- package/es/message-box/src/message-box.js +60 -0
- package/es/modal/index.d.ts +584 -0
- package/es/modal/index.js +4 -0
- package/es/modal/src/modal.d.ts +369 -0
- package/es/modal/src/modal.js +455 -0
- package/es/notification/index.d.ts +11 -0
- package/es/notification/index.js +4 -0
- package/es/notification/src/notification-item.d.ts +150 -0
- package/es/notification/src/notification-item.js +170 -0
- package/es/notification/src/notification-list.d.ts +103 -0
- package/es/notification/src/notification-list.js +93 -0
- package/es/notification/src/notification.d.ts +25 -0
- package/es/notification/src/notification.js +85 -0
- package/es/pagination/index.d.ts +444 -0
- package/es/pagination/index.js +4 -0
- package/es/pagination/src/pagination.d.ts +270 -0
- package/es/pagination/src/pagination.js +350 -0
- package/es/popconfirm/index.d.ts +278 -0
- package/es/popconfirm/index.js +4 -0
- package/es/popconfirm/src/popconfirm.d.ts +108 -0
- package/es/popconfirm/src/popconfirm.js +185 -0
- package/es/popover/index.d.ts +193 -0
- package/es/popover/index.js +4 -0
- package/es/popover/src/popover.d.ts +71 -0
- package/es/popover/src/popover.js +56 -0
- package/es/popper/index.d.ts +435 -0
- package/es/popper/index.js +4 -0
- package/es/popper/src/popper.d.ts +193 -0
- package/es/popper/src/popper.js +497 -0
- package/es/progress/index.d.ts +232 -0
- package/es/progress/index.js +4 -0
- package/es/progress/src/circle.d.ts +90 -0
- package/es/progress/src/circle.js +182 -0
- package/es/progress/src/line.d.ts +130 -0
- package/es/progress/src/line.js +166 -0
- package/es/progress/src/progress.d.ts +90 -0
- package/es/progress/src/progress.js +24 -0
- package/es/radio/index.d.ts +402 -0
- package/es/radio/index.js +6 -0
- package/es/radio/src/context.d.ts +15 -0
- package/es/radio/src/context.js +9 -0
- package/es/radio/src/radio-group.d.ts +75 -0
- package/es/radio/src/radio-group.js +78 -0
- package/es/radio/src/radio.d.ts +76 -0
- package/es/radio/src/radio.js +148 -0
- package/es/select/index.d.ts +786 -0
- package/es/select/index.js +8 -0
- package/es/select/src/context.d.ts +45 -0
- package/es/select/src/context.js +9 -0
- package/es/select/src/select-content.d.ts +130 -0
- package/es/select/src/select-content.js +553 -0
- package/es/select/src/select-group.d.ts +16 -0
- package/es/select/src/select-group.js +11 -0
- package/es/select/src/select-option.d.ts +81 -0
- package/es/select/src/select-option.js +15 -0
- package/es/select/src/select-trigger.d.ts +141 -0
- package/es/select/src/select-trigger.js +215 -0
- package/es/select/src/select.d.ts +242 -0
- package/es/select/src/select.js +449 -0
- package/es/skeleton/index.d.ts +175 -0
- package/es/skeleton/index.js +6 -0
- package/es/skeleton/src/skeleton-item.d.ts +18 -0
- package/es/skeleton/src/skeleton-item.js +81 -0
- package/es/skeleton/src/skeleton.d.ts +25 -0
- package/es/skeleton/src/skeleton.js +51 -0
- package/es/slider/index.d.ts +325 -0
- package/es/slider/index.js +4 -0
- package/es/slider/src/slider.d.ts +140 -0
- package/es/slider/src/slider.js +430 -0
- package/es/space/index.d.ts +219 -0
- package/es/space/index.js +4 -0
- package/es/space/src/space.d.ts +87 -0
- package/es/space/src/space.js +147 -0
- package/es/status/index.d.ts +76 -0
- package/es/status/index.js +4 -0
- package/es/status/src/status.d.ts +16 -0
- package/es/status/src/status.js +54 -0
- package/es/steps/index.d.ts +207 -0
- package/es/steps/index.js +6 -0
- package/es/steps/src/step.d.ts +39 -0
- package/es/steps/src/step.js +20 -0
- package/es/steps/src/steps.d.ts +39 -0
- package/es/steps/src/steps.js +176 -0
- package/es/switch/index.d.ts +250 -0
- package/es/switch/index.js +4 -0
- package/es/switch/src/switch.d.ts +98 -0
- package/es/switch/src/switch.js +222 -0
- package/es/table/index.d.ts +580 -0
- package/es/table/index.js +4 -0
- package/es/table/src/context.d.ts +36 -0
- package/es/table/src/context.js +9 -0
- package/es/table/src/table-body.d.ts +129 -0
- package/es/table/src/table-body.js +206 -0
- package/es/table/src/table-header.d.ts +111 -0
- package/es/table/src/table-header.js +219 -0
- package/es/table/src/table.d.ts +363 -0
- package/es/table/src/table.js +403 -0
- package/es/tabs/index.d.ts +240 -0
- package/es/tabs/index.js +6 -0
- package/es/tabs/src/context.d.ts +8 -0
- package/es/tabs/src/context.js +9 -0
- package/es/tabs/src/tab.d.ts +48 -0
- package/es/tabs/src/tab.js +40 -0
- package/es/tabs/src/tabs.d.ts +44 -0
- package/es/tabs/src/tabs.js +163 -0
- package/es/tag/index.d.ts +203 -0
- package/es/tag/index.js +4 -0
- package/es/tag/src/tag.d.ts +76 -0
- package/es/tag/src/tag.js +188 -0
- package/es/textarea/index.d.ts +318 -0
- package/es/textarea/index.js +4 -0
- package/es/textarea/src/textarea.d.ts +130 -0
- package/es/textarea/src/textarea.js +308 -0
- package/es/time-picker/index.d.ts +50 -0
- package/es/time-picker/index.js +4 -0
- package/es/time-picker/src/time-picker.d.ts +4 -0
- package/es/time-picker/src/time-picker.js +26 -0
- package/es/tooltip/index.d.ts +204 -0
- package/es/tooltip/index.js +4 -0
- package/es/tooltip/src/tooltip.d.ts +74 -0
- package/es/tooltip/src/tooltip.js +99 -0
- package/es/tree/index.d.ts +512 -0
- package/es/tree/index.js +4 -0
- package/es/tree/src/context.d.ts +109 -0
- package/es/tree/src/context.js +33 -0
- package/es/tree/src/tree.d.ts +220 -0
- package/es/tree/src/tree.js +422 -0
- package/es/tree-select/index.d.ts +726 -0
- package/es/tree-select/index.js +4 -0
- package/es/tree-select/src/tree-select.d.ts +327 -0
- package/es/tree-select/src/tree-select.js +315 -0
- package/es/upload/index.d.ts +559 -0
- package/es/upload/index.js +4 -0
- package/es/upload/src/request.d.ts +21 -0
- package/es/upload/src/request.js +69 -0
- package/es/upload/src/upload.d.ts +264 -0
- package/es/upload/src/upload.js +684 -0
- package/es/utils/ScrollbarWidth2.js +24 -0
- package/es/utils/colorPalette.d.ts +4 -0
- package/es/utils/colorPalette.js +161 -0
- package/es/utils/common.d.ts +80 -0
- package/es/utils/common.js +128 -0
- package/es/utils/compare.d.ts +3 -0
- package/es/utils/compare.js +55 -0
- package/es/utils/components/icons/AddOutline.d.ts +2 -0
- package/es/utils/components/icons/AddOutline.js +25 -0
- package/es/utils/components/icons/AlertCircle.d.ts +2 -0
- package/es/utils/components/icons/AlertCircle.js +14 -0
- package/es/utils/components/icons/AlertCircleOutline.d.ts +2 -0
- package/es/utils/components/icons/AlertCircleOutline.js +27 -0
- package/es/utils/components/icons/ArrowDropDownSharp.d.ts +2 -0
- package/es/utils/components/icons/ArrowDropDownSharp.js +14 -0
- package/es/utils/components/icons/ArrowDropUpSharp.d.ts +2 -0
- package/es/utils/components/icons/ArrowDropUpSharp.js +14 -0
- package/es/utils/components/icons/ArrowForward.d.ts +2 -0
- package/es/utils/components/icons/ArrowForward.js +25 -0
- package/es/utils/components/icons/ArrowForwardIosFilled.d.ts +2 -0
- package/es/utils/components/icons/ArrowForwardIosFilled.js +14 -0
- package/es/utils/components/icons/ArrowNext24Filled.d.ts +2 -0
- package/es/utils/components/icons/ArrowNext24Filled.js +16 -0
- package/es/utils/components/icons/ArrowPrevious24Filled.d.ts +2 -0
- package/es/utils/components/icons/ArrowPrevious24Filled.js +16 -0
- package/es/utils/components/icons/ArrowUp.d.ts +2 -0
- package/es/utils/components/icons/ArrowUp.js +25 -0
- package/es/utils/components/icons/ArrowUpCircle.d.ts +2 -0
- package/es/utils/components/icons/ArrowUpCircle.js +13 -0
- package/es/utils/components/icons/ArrowsMaximize.d.ts +2 -0
- package/es/utils/components/icons/ArrowsMaximize.js +33 -0
- package/es/utils/components/icons/ArrowsMinimize.d.ts +2 -0
- package/es/utils/components/icons/ArrowsMinimize.js +33 -0
- package/es/utils/components/icons/Bars.d.ts +2 -0
- package/es/utils/components/icons/Bars.js +13 -0
- package/es/utils/components/icons/CalendarClearOutline.d.ts +2 -0
- package/es/utils/components/icons/CalendarClearOutline.js +42 -0
- package/es/utils/components/icons/Checkmark.d.ts +2 -0
- package/es/utils/components/icons/Checkmark.js +18 -0
- package/es/utils/components/icons/CheckmarkCircle.d.ts +2 -0
- package/es/utils/components/icons/CheckmarkCircle.js +14 -0
- package/es/utils/components/icons/CheckmarkCircleOutline.d.ts +2 -0
- package/es/utils/components/icons/CheckmarkCircleOutline.js +24 -0
- package/es/utils/components/icons/CheckmarkOutline.d.ts +2 -0
- package/es/utils/components/icons/CheckmarkOutline.js +18 -0
- package/es/utils/components/icons/CheckmarkSharp.d.ts +2 -0
- package/es/utils/components/icons/CheckmarkSharp.js +18 -0
- package/es/utils/components/icons/ChevronDoubleLeft16Filled.d.ts +2 -0
- package/es/utils/components/icons/ChevronDoubleLeft16Filled.js +16 -0
- package/es/utils/components/icons/ChevronDoubleRight16Filled.d.ts +2 -0
- package/es/utils/components/icons/ChevronDoubleRight16Filled.js +16 -0
- package/es/utils/components/icons/ChevronDown.d.ts +2 -0
- package/es/utils/components/icons/ChevronDown.js +14 -0
- package/es/utils/components/icons/ChevronForward.d.ts +2 -0
- package/es/utils/components/icons/ChevronForward.js +18 -0
- package/es/utils/components/icons/ChevronLeft24Filled.d.ts +2 -0
- package/es/utils/components/icons/ChevronLeft24Filled.js +16 -0
- package/es/utils/components/icons/ChevronRight24Filled.d.ts +2 -0
- package/es/utils/components/icons/ChevronRight24Filled.js +16 -0
- package/es/utils/components/icons/ChevronUp.d.ts +2 -0
- package/es/utils/components/icons/ChevronUp.js +14 -0
- package/es/utils/components/icons/Close.d.ts +2 -0
- package/es/utils/components/icons/Close.js +14 -0
- package/es/utils/components/icons/CloseCircle.d.ts +2 -0
- package/es/utils/components/icons/CloseCircle.js +14 -0
- package/es/utils/components/icons/CloseCircleOutline.d.ts +2 -0
- package/es/utils/components/icons/CloseCircleOutline.js +31 -0
- package/es/utils/components/icons/CloseOutline.d.ts +2 -0
- package/es/utils/components/icons/CloseOutline.js +25 -0
- package/es/utils/components/icons/CloudUploadOutline.d.ts +2 -0
- package/es/utils/components/icons/CloudUploadOutline.js +32 -0
- package/es/utils/components/icons/EllipsisHorizontal.d.ts +2 -0
- package/es/utils/components/icons/EllipsisHorizontal.js +26 -0
- package/es/utils/components/icons/Empty.d.ts +2 -0
- package/es/utils/components/icons/Empty.js +17 -0
- package/es/utils/components/icons/EyeOffOutline.d.ts +2 -0
- package/es/utils/components/icons/EyeOffOutline.js +26 -0
- package/es/utils/components/icons/EyeOutline.d.ts +2 -0
- package/es/utils/components/icons/EyeOutline.js +26 -0
- package/es/utils/components/icons/HelpCircleSharp.d.ts +2 -0
- package/es/utils/components/icons/HelpCircleSharp.js +17 -0
- package/es/utils/components/icons/ImageOutline.d.ts +2 -0
- package/es/utils/components/icons/ImageSharp.d.ts +2 -0
- package/es/utils/components/icons/ImageSharp.js +14 -0
- package/es/utils/components/icons/InformationCircle.d.ts +2 -0
- package/es/utils/components/icons/InformationCircle.js +14 -0
- package/es/utils/components/icons/InformationCircleOutline.d.ts +2 -0
- package/es/utils/components/icons/InformationCircleOutline.js +34 -0
- package/es/utils/components/icons/IosArrowBack.d.ts +2 -0
- package/es/utils/components/icons/IosArrowBack.js +17 -0
- package/es/utils/components/icons/IosArrowDown.d.ts +2 -0
- package/es/utils/components/icons/IosArrowDown.js +17 -0
- package/es/utils/components/icons/IosArrowForward.d.ts +2 -0
- package/es/utils/components/icons/IosArrowForward.js +17 -0
- package/es/utils/components/icons/IosCheckmark.d.ts +2 -0
- package/es/utils/components/icons/IosCheckmark.js +16 -0
- package/es/utils/components/icons/KeyboardArrowLeftRound.d.ts +2 -0
- package/es/utils/components/icons/KeyboardArrowLeftRound.js +14 -0
- package/es/utils/components/icons/KeyboardArrowRightRound.d.ts +2 -0
- package/es/utils/components/icons/KeyboardArrowRightRound.js +14 -0
- package/es/utils/components/icons/KeyboardDoubleArrowLeftRound.d.ts +2 -0
- package/es/utils/components/icons/KeyboardDoubleArrowLeftRound.js +17 -0
- package/es/utils/components/icons/KeyboardDoubleArrowRightRound.d.ts +2 -0
- package/es/utils/components/icons/KeyboardDoubleArrowRightRound.js +17 -0
- package/es/utils/components/icons/LoadingOutlined.d.ts +2 -0
- package/es/utils/components/icons/LoadingOutlined.js +14 -0
- package/es/utils/components/icons/MenuFoldOutlined.d.ts +2 -0
- package/es/utils/components/icons/MenuFoldOutlined.js +14 -0
- package/es/utils/components/icons/Pause.d.ts +2 -0
- package/es/utils/components/icons/Pause.js +17 -0
- package/es/utils/components/icons/QuestionCircle24Regular.d.ts +2 -0
- package/es/utils/components/icons/QuestionCircle24Regular.js +16 -0
- package/es/utils/components/icons/Refresh.d.ts +2 -0
- package/es/utils/components/icons/Refresh.js +25 -0
- package/es/utils/components/icons/RemoveOutline.d.ts +2 -0
- package/es/utils/components/icons/RemoveOutline.js +18 -0
- package/es/utils/components/icons/TimeOutline.d.ts +2 -0
- package/es/utils/components/icons/TimeOutline.js +24 -0
- package/es/utils/components/icons/UploadFileFilled.d.ts +2 -0
- package/es/utils/components/icons/UploadFileFilled.js +14 -0
- package/es/utils/components/icons/index.d.ts +57 -0
- package/es/utils/components/resize-observer.d.ts +27 -0
- package/es/utils/components/resize-observer.js +64 -0
- package/es/utils/components/transition/dropdown-transition.d.ts +4 -0
- package/es/utils/components/transition/dropdown-transition.js +54 -0
- package/es/utils/components/transition/slide-up-transition.d.ts +4 -0
- package/es/utils/components/transition/slide-up-transition.js +57 -0
- package/es/utils/directives/click-outside.js +137 -0
- package/es/utils/dom.d.ts +1 -0
- package/es/utils/dom.js +9 -0
- package/es/utils/element.d.ts +17 -0
- package/es/utils/element.js +59 -0
- package/es/utils/error.d.ts +1 -0
- package/es/utils/getElementRect.d.ts +1 -0
- package/es/utils/hooks/useConfig.d.ts +9 -0
- package/es/utils/hooks/useConfig.js +17 -0
- package/es/utils/hooks/useGetSlot.d.ts +2 -0
- package/es/utils/hooks/useGetSlot.js +12 -0
- package/es/utils/hooks/useMediaQuery.d.ts +2 -0
- package/es/utils/hooks/useMediaQuery.js +12 -0
- package/es/utils/scrollbarWidth.js +65 -0
- package/es/utils/transition.d.ts +2 -0
- package/es/utils/transition.js +31 -0
- package/es/utils/type.d.ts +26 -0
- package/es/utils/type.js +50 -0
- package/es/utils/validator-messages/cn.d.ts +3 -0
- package/es/utils/validator-messages/cn.js +56 -0
- package/lib/affix/index.d.ts +100 -0
- package/lib/affix/index.js +6 -0
- package/lib/affix/src/affix.d.ts +30 -0
- package/lib/affix/src/affix.js +141 -0
- package/lib/alert/index.d.ts +183 -0
- package/lib/alert/index.js +6 -0
- package/lib/alert/src/alert.d.ts +65 -0
- package/lib/alert/src/alert.js +158 -0
- package/lib/anchor/index.d.ts +114 -0
- package/lib/anchor/index.js +9 -0
- package/lib/anchor/src/anchor-link.d.ts +6 -0
- package/lib/anchor/src/anchor-link.js +71 -0
- package/lib/anchor/src/anchor.d.ts +10 -0
- package/lib/anchor/src/anchor.js +165 -0
- package/lib/anchor/src/context.d.ts +11 -0
- package/lib/anchor/src/context.js +13 -0
- package/lib/avatar/index.d.ts +193 -0
- package/lib/avatar/index.js +6 -0
- package/lib/avatar/src/avatar.d.ts +73 -0
- package/lib/avatar/src/avatar.js +139 -0
- package/lib/back-top/index.d.ts +133 -0
- package/lib/back-top/index.js +6 -0
- package/lib/back-top/src/back-top.d.ts +45 -0
- package/lib/back-top/src/back-top.js +165 -0
- package/lib/badge/index.d.ts +111 -0
- package/lib/badge/index.js +6 -0
- package/lib/badge/src/badge.d.ts +33 -0
- package/lib/badge/src/badge.js +78 -0
- package/lib/breadcrumb/index.d.ts +154 -0
- package/lib/breadcrumb/index.js +9 -0
- package/lib/breadcrumb/src/breadcrumb-item.d.ts +28 -0
- package/lib/breadcrumb/src/breadcrumb-item.js +17 -0
- package/lib/breadcrumb/src/breadcrumb.d.ts +23 -0
- package/lib/breadcrumb/src/breadcrumb.js +83 -0
- package/lib/button/index.d.ts +530 -0
- package/lib/button/index.js +6 -0
- package/lib/button/src/button.d.ts +292 -0
- package/lib/button/src/button.js +217 -0
- package/lib/calendar/index.d.ts +254 -0
- package/lib/calendar/index.js +6 -0
- package/lib/calendar/src/calendar.d.ts +101 -0
- package/lib/calendar/src/calendar.js +337 -0
- package/lib/card/index.d.ts +206 -0
- package/lib/card/index.js +6 -0
- package/lib/card/src/card.d.ts +78 -0
- package/lib/card/src/card.js +78 -0
- package/lib/carousel/index.d.ts +240 -0
- package/lib/carousel/index.js +6 -0
- package/lib/carousel/src/carousel.d.ts +103 -0
- package/lib/carousel/src/carousel.js +362 -0
- package/lib/cascader/index.d.ts +631 -0
- package/lib/cascader/index.js +6 -0
- package/lib/cascader/src/cascader.d.ts +282 -0
- package/lib/cascader/src/cascader.js +330 -0
- package/lib/cascader-panel/index.d.ts +444 -0
- package/lib/cascader-panel/index.js +6 -0
- package/lib/cascader-panel/src/cascader-panel.d.ts +188 -0
- package/lib/cascader-panel/src/cascader-panel.js +520 -0
- package/lib/cascader-panel/src/context.d.ts +101 -0
- package/lib/cascader-panel/src/context.js +35 -0
- package/lib/checkbox/index.d.ts +495 -0
- package/lib/checkbox/index.js +9 -0
- package/lib/checkbox/src/checkbox-group.d.ts +77 -0
- package/lib/checkbox/src/checkbox-group.js +79 -0
- package/lib/checkbox/src/checkbox.d.ts +118 -0
- package/lib/checkbox/src/checkbox.js +208 -0
- package/lib/checkbox/src/context.d.ts +15 -0
- package/lib/checkbox/src/context.js +13 -0
- package/lib/color-picker/index.d.ts +328 -0
- package/lib/color-picker/index.js +6 -0
- package/lib/color-picker/src/color-picker-content.d.ts +88 -0
- package/lib/color-picker/src/color-picker-content.js +574 -0
- package/lib/color-picker/src/color-picker.d.ts +133 -0
- package/lib/color-picker/src/color-picker.js +264 -0
- package/lib/color-picker/src/context.d.ts +17 -0
- package/lib/color-picker/src/context.js +13 -0
- package/lib/components.d.ts +59 -0
- package/lib/components.js +142 -0
- package/lib/config-provider/index.d.ts +80 -0
- package/lib/config-provider/index.js +6 -0
- package/lib/config-provider/src/config-provider.d.ts +25 -0
- package/lib/config-provider/src/config-provider.js +24 -0
- package/lib/config-provider/src/context.d.ts +10 -0
- package/lib/config-provider/src/context.js +15 -0
- package/lib/date-picker/index.d.ts +493 -0
- package/lib/date-picker/index.js +6 -0
- package/lib/date-picker/src/context.d.ts +45 -0
- package/lib/date-picker/src/context.js +13 -0
- package/lib/date-picker/src/date-picker-date.d.ts +168 -0
- package/lib/date-picker/src/date-picker-date.js +580 -0
- package/lib/date-picker/src/date-picker-time.d.ts +157 -0
- package/lib/date-picker/src/date-picker-time.js +330 -0
- package/lib/date-picker/src/date-picker-week.d.ts +167 -0
- package/lib/date-picker/src/date-picker-week.js +555 -0
- package/lib/date-picker/src/date-picker-year.d.ts +135 -0
- package/lib/date-picker/src/date-picker-year.js +335 -0
- package/lib/date-picker/src/date-picker.d.ts +218 -0
- package/lib/date-picker/src/date-picker.js +972 -0
- package/lib/divider/index.d.ts +50 -0
- package/lib/divider/index.js +6 -0
- package/lib/divider/src/divider.d.ts +4 -0
- package/lib/divider/src/divider.js +64 -0
- package/lib/drawer/index.d.ts +488 -0
- package/lib/drawer/index.js +6 -0
- package/lib/drawer/src/drawer.d.ts +302 -0
- package/lib/drawer/src/drawer.js +349 -0
- package/lib/dropdown/index.d.ts +571 -0
- package/lib/dropdown/index.js +12 -0
- package/lib/dropdown/src/context.d.ts +32 -0
- package/lib/dropdown/src/context.js +13 -0
- package/lib/dropdown/src/dropdown-group.d.ts +20 -0
- package/lib/dropdown/src/dropdown-group.js +15 -0
- package/lib/dropdown/src/dropdown-item.d.ts +63 -0
- package/lib/dropdown/src/dropdown-item.js +32 -0
- package/lib/dropdown/src/dropdown.d.ts +155 -0
- package/lib/dropdown/src/dropdown.js +496 -0
- package/lib/empty/index.d.ts +50 -0
- package/lib/empty/index.js +6 -0
- package/lib/empty/src/empty.d.ts +4 -0
- package/lib/empty/src/empty.js +114 -0
- package/lib/form/index.d.ts +534 -0
- package/lib/form/index.js +9 -0
- package/lib/form/src/context.d.ts +36 -0
- package/lib/form/src/context.js +13 -0
- package/lib/form/src/form-item.d.ts +86 -0
- package/lib/form/src/form-item.js +311 -0
- package/lib/form/src/form.d.ts +128 -0
- package/lib/form/src/form.js +168 -0
- package/lib/grid/index.d.ts +379 -0
- package/lib/grid/index.js +9 -0
- package/lib/grid/src/context.d.ts +17 -0
- package/lib/grid/src/context.js +13 -0
- package/lib/grid/src/grid-col.d.ts +57 -0
- package/lib/grid/src/grid-col.js +102 -0
- package/lib/grid/src/grid.d.ts +88 -0
- package/lib/grid/src/grid.js +125 -0
- package/lib/icon/index.d.ts +112 -0
- package/lib/icon/index.js +6 -0
- package/lib/icon/src/icon.d.ts +34 -0
- package/lib/icon/src/icon.js +47 -0
- package/lib/index.d.ts +7 -0
- package/lib/index.js +157 -0
- package/lib/input/index.d.ts +514 -0
- package/lib/input/index.js +6 -0
- package/lib/input/src/input.d.ts +214 -0
- package/lib/input/src/input.js +346 -0
- package/lib/input-number/index.d.ts +608 -0
- package/lib/input-number/index.js +6 -0
- package/lib/input-number/src/input-number.d.ts +266 -0
- package/lib/input-number/src/input-number.js +431 -0
- package/lib/layout/index.d.ts +632 -0
- package/lib/layout/index.js +18 -0
- package/lib/layout/src/content.d.ts +25 -0
- package/lib/layout/src/content.js +38 -0
- package/lib/layout/src/context.d.ts +8 -0
- package/lib/layout/src/context.js +13 -0
- package/lib/layout/src/footer.d.ts +25 -0
- package/lib/layout/src/footer.js +38 -0
- package/lib/layout/src/header.d.ts +25 -0
- package/lib/layout/src/header.js +38 -0
- package/lib/layout/src/layout.d.ts +25 -0
- package/lib/layout/src/layout.js +47 -0
- package/lib/layout/src/sider.d.ts +97 -0
- package/lib/layout/src/sider.js +204 -0
- package/lib/line-grid/index.d.ts +915 -0
- package/lib/line-grid/index.js +12 -0
- package/lib/line-grid/src/col.d.ts +100 -0
- package/lib/line-grid/src/col.js +132 -0
- package/lib/line-grid/src/context.d.ts +12 -0
- package/lib/line-grid/src/context.js +19 -0
- package/lib/line-grid/src/flex.d.ts +111 -0
- package/lib/line-grid/src/flex.js +137 -0
- package/lib/line-grid/src/row.d.ts +50 -0
- package/lib/line-grid/src/row.js +97 -0
- package/lib/link/index.d.ts +50 -0
- package/lib/link/index.js +6 -0
- package/lib/link/src/link.d.ts +4 -0
- package/lib/link/src/link.js +70 -0
- package/lib/list/index.d.ts +271 -0
- package/lib/list/index.js +9 -0
- package/lib/list/src/context.d.ts +11 -0
- package/lib/list/src/context.js +13 -0
- package/lib/list/src/list-item.d.ts +31 -0
- package/lib/list/src/list-item.js +91 -0
- package/lib/list/src/list.d.ts +58 -0
- package/lib/list/src/list.js +88 -0
- package/lib/loading/index.d.ts +224 -0
- package/lib/loading/index.js +6 -0
- package/lib/loading/src/loading.d.ts +86 -0
- package/lib/loading/src/loading.js +266 -0
- package/lib/loading-bar/index.d.ts +2 -0
- package/lib/loading-bar/index.js +6 -0
- package/lib/loading-bar/src/loading-bar-item.d.ts +80 -0
- package/lib/loading-bar/src/loading-bar-item.js +127 -0
- package/lib/loading-bar/src/loading-bar.d.ts +10 -0
- package/lib/loading-bar/src/loading-bar.js +64 -0
- package/lib/menu/index.d.ts +552 -0
- package/lib/menu/index.js +12 -0
- package/lib/menu/src/context.d.ts +91 -0
- package/lib/menu/src/context.js +27 -0
- package/lib/menu/src/menu-group.d.ts +20 -0
- package/lib/menu/src/menu-group.js +15 -0
- package/lib/menu/src/menu-item.d.ts +63 -0
- package/lib/menu/src/menu-item.js +20 -0
- package/lib/menu/src/menu.d.ts +147 -0
- package/lib/menu/src/menu.js +172 -0
- package/lib/menu/src/use-horizontal.d.ts +3 -0
- package/lib/menu/src/use-horizontal.js +163 -0
- package/lib/menu/src/use-pop.d.ts +3 -0
- package/lib/menu/src/use-pop.js +215 -0
- package/lib/menu/src/use-vertical.d.ts +3 -0
- package/lib/menu/src/use-vertical.js +197 -0
- package/lib/message/index.d.ts +12 -0
- package/lib/message/index.js +6 -0
- package/lib/message/src/message-item.d.ts +130 -0
- package/lib/message/src/message-item.js +174 -0
- package/lib/message/src/message-list.d.ts +126 -0
- package/lib/message/src/message-list.js +102 -0
- package/lib/message/src/message.d.ts +26 -0
- package/lib/message/src/message.js +65 -0
- package/lib/message-box/index.d.ts +2 -0
- package/lib/message-box/index.js +6 -0
- package/lib/message-box/src/message-box-item.d.ts +310 -0
- package/lib/message-box/src/message-box-item.js +301 -0
- package/lib/message-box/src/message-box.d.ts +16 -0
- package/lib/message-box/src/message-box.js +62 -0
- package/lib/modal/index.d.ts +584 -0
- package/lib/modal/index.js +6 -0
- package/lib/modal/src/modal.d.ts +369 -0
- package/lib/modal/src/modal.js +458 -0
- package/lib/notification/index.d.ts +11 -0
- package/lib/notification/index.js +6 -0
- package/lib/notification/src/notification-item.d.ts +150 -0
- package/lib/notification/src/notification-item.js +173 -0
- package/lib/notification/src/notification-list.d.ts +103 -0
- package/lib/notification/src/notification-list.js +97 -0
- package/lib/notification/src/notification.d.ts +25 -0
- package/lib/notification/src/notification.js +87 -0
- package/lib/pagination/index.d.ts +444 -0
- package/lib/pagination/index.js +6 -0
- package/lib/pagination/src/pagination.d.ts +270 -0
- package/lib/pagination/src/pagination.js +352 -0
- package/lib/popconfirm/index.d.ts +278 -0
- package/lib/popconfirm/index.js +6 -0
- package/lib/popconfirm/src/popconfirm.d.ts +108 -0
- package/lib/popconfirm/src/popconfirm.js +187 -0
- package/lib/popover/index.d.ts +193 -0
- package/lib/popover/index.js +6 -0
- package/lib/popover/src/popover.d.ts +71 -0
- package/lib/popover/src/popover.js +58 -0
- package/lib/popper/index.d.ts +435 -0
- package/lib/popper/index.js +6 -0
- package/lib/popper/src/popper.d.ts +193 -0
- package/lib/popper/src/popper.js +500 -0
- package/lib/progress/index.d.ts +232 -0
- package/lib/progress/index.js +6 -0
- package/lib/progress/src/circle.d.ts +90 -0
- package/lib/progress/src/circle.js +184 -0
- package/lib/progress/src/line.d.ts +130 -0
- package/lib/progress/src/line.js +169 -0
- package/lib/progress/src/progress.d.ts +90 -0
- package/lib/progress/src/progress.js +26 -0
- package/lib/radio/index.d.ts +402 -0
- package/lib/radio/index.js +9 -0
- package/lib/radio/src/context.d.ts +15 -0
- package/lib/radio/src/context.js +13 -0
- package/lib/radio/src/radio-group.d.ts +75 -0
- package/lib/radio/src/radio-group.js +80 -0
- package/lib/radio/src/radio.d.ts +76 -0
- package/lib/radio/src/radio.js +150 -0
- package/lib/select/index.d.ts +786 -0
- package/lib/select/index.js +12 -0
- package/lib/select/src/context.d.ts +45 -0
- package/lib/select/src/context.js +13 -0
- package/lib/select/src/select-content.d.ts +130 -0
- package/lib/select/src/select-content.js +555 -0
- package/lib/select/src/select-group.d.ts +16 -0
- package/lib/select/src/select-group.js +13 -0
- package/lib/select/src/select-option.d.ts +81 -0
- package/lib/select/src/select-option.js +18 -0
- package/lib/select/src/select-trigger.d.ts +141 -0
- package/lib/select/src/select-trigger.js +217 -0
- package/lib/select/src/select.d.ts +242 -0
- package/lib/select/src/select.js +451 -0
- package/lib/skeleton/index.d.ts +175 -0
- package/lib/skeleton/index.js +9 -0
- package/lib/skeleton/src/skeleton-item.d.ts +18 -0
- package/lib/skeleton/src/skeleton-item.js +83 -0
- package/lib/skeleton/src/skeleton.d.ts +25 -0
- package/lib/skeleton/src/skeleton.js +53 -0
- package/lib/slider/index.d.ts +325 -0
- package/lib/slider/index.js +6 -0
- package/lib/slider/src/slider.d.ts +140 -0
- package/lib/slider/src/slider.js +432 -0
- package/lib/space/index.d.ts +219 -0
- package/lib/space/index.js +6 -0
- package/lib/space/src/space.d.ts +87 -0
- package/lib/space/src/space.js +149 -0
- package/lib/status/index.d.ts +76 -0
- package/lib/status/index.js +6 -0
- package/lib/status/src/status.d.ts +16 -0
- package/lib/status/src/status.js +56 -0
- package/lib/steps/index.d.ts +207 -0
- package/lib/steps/index.js +9 -0
- package/lib/steps/src/step.d.ts +39 -0
- package/lib/steps/src/step.js +23 -0
- package/lib/steps/src/steps.d.ts +39 -0
- package/lib/steps/src/steps.js +178 -0
- package/lib/switch/index.d.ts +250 -0
- package/lib/switch/index.js +6 -0
- package/lib/switch/src/switch.d.ts +98 -0
- package/lib/switch/src/switch.js +224 -0
- package/lib/table/index.d.ts +580 -0
- package/lib/table/index.js +6 -0
- package/lib/table/src/context.d.ts +36 -0
- package/lib/table/src/context.js +13 -0
- package/lib/table/src/table-body.d.ts +129 -0
- package/lib/table/src/table-body.js +212 -0
- package/lib/table/src/table-header.d.ts +111 -0
- package/lib/table/src/table-header.js +224 -0
- package/lib/table/src/table.d.ts +363 -0
- package/lib/table/src/table.js +410 -0
- package/lib/tabs/index.d.ts +240 -0
- package/lib/tabs/index.js +9 -0
- package/lib/tabs/src/context.d.ts +8 -0
- package/lib/tabs/src/context.js +13 -0
- package/lib/tabs/src/tab.d.ts +48 -0
- package/lib/tabs/src/tab.js +43 -0
- package/lib/tabs/src/tabs.d.ts +44 -0
- package/lib/tabs/src/tabs.js +165 -0
- package/lib/tag/index.d.ts +203 -0
- package/lib/tag/index.js +6 -0
- package/lib/tag/src/tag.d.ts +76 -0
- package/lib/tag/src/tag.js +194 -0
- package/lib/textarea/index.d.ts +318 -0
- package/lib/textarea/index.js +6 -0
- package/lib/textarea/src/textarea.d.ts +130 -0
- package/lib/textarea/src/textarea.js +310 -0
- package/lib/time-picker/index.d.ts +50 -0
- package/lib/time-picker/index.js +6 -0
- package/lib/time-picker/src/time-picker.d.ts +4 -0
- package/lib/time-picker/src/time-picker.js +28 -0
- package/lib/tooltip/index.d.ts +204 -0
- package/lib/tooltip/index.js +6 -0
- package/lib/tooltip/src/tooltip.d.ts +74 -0
- package/lib/tooltip/src/tooltip.js +101 -0
- package/lib/tree/index.d.ts +512 -0
- package/lib/tree/index.js +6 -0
- package/lib/tree/src/context.d.ts +109 -0
- package/lib/tree/src/context.js +35 -0
- package/lib/tree/src/tree.d.ts +220 -0
- package/lib/tree/src/tree.js +428 -0
- package/lib/tree-select/index.d.ts +726 -0
- package/lib/tree-select/index.js +6 -0
- package/lib/tree-select/src/tree-select.d.ts +327 -0
- package/lib/tree-select/src/tree-select.js +317 -0
- package/lib/upload/index.d.ts +559 -0
- package/lib/upload/index.js +6 -0
- package/lib/upload/src/request.d.ts +21 -0
- package/lib/upload/src/request.js +71 -0
- package/lib/upload/src/upload.d.ts +264 -0
- package/lib/upload/src/upload.js +690 -0
- package/lib/utils/ScrollbarWidth2.js +26 -0
- package/lib/utils/colorPalette.d.ts +4 -0
- package/lib/utils/colorPalette.js +166 -0
- package/lib/utils/common.d.ts +80 -0
- package/lib/utils/common.js +144 -0
- package/lib/utils/compare.d.ts +3 -0
- package/lib/utils/compare.js +59 -0
- package/lib/utils/components/icons/AddOutline.d.ts +2 -0
- package/lib/utils/components/icons/AddOutline.js +27 -0
- package/lib/utils/components/icons/AlertCircle.d.ts +2 -0
- package/lib/utils/components/icons/AlertCircle.js +16 -0
- package/lib/utils/components/icons/AlertCircleOutline.d.ts +2 -0
- package/lib/utils/components/icons/AlertCircleOutline.js +29 -0
- package/lib/utils/components/icons/ArrowDropDownSharp.d.ts +2 -0
- package/lib/utils/components/icons/ArrowDropDownSharp.js +16 -0
- package/lib/utils/components/icons/ArrowDropUpSharp.d.ts +2 -0
- package/lib/utils/components/icons/ArrowDropUpSharp.js +16 -0
- package/lib/utils/components/icons/ArrowForward.d.ts +2 -0
- package/lib/utils/components/icons/ArrowForward.js +27 -0
- package/lib/utils/components/icons/ArrowForwardIosFilled.d.ts +2 -0
- package/lib/utils/components/icons/ArrowForwardIosFilled.js +16 -0
- package/lib/utils/components/icons/ArrowNext24Filled.d.ts +2 -0
- package/lib/utils/components/icons/ArrowNext24Filled.js +18 -0
- package/lib/utils/components/icons/ArrowPrevious24Filled.d.ts +2 -0
- package/lib/utils/components/icons/ArrowPrevious24Filled.js +18 -0
- package/lib/utils/components/icons/ArrowUp.d.ts +2 -0
- package/lib/utils/components/icons/ArrowUp.js +27 -0
- package/lib/utils/components/icons/ArrowUpCircle.d.ts +2 -0
- package/lib/utils/components/icons/ArrowUpCircle.js +14 -0
- package/lib/utils/components/icons/ArrowsMaximize.d.ts +2 -0
- package/lib/utils/components/icons/ArrowsMaximize.js +35 -0
- package/lib/utils/components/icons/ArrowsMinimize.d.ts +2 -0
- package/lib/utils/components/icons/ArrowsMinimize.js +35 -0
- package/lib/utils/components/icons/Bars.d.ts +2 -0
- package/lib/utils/components/icons/Bars.js +14 -0
- package/lib/utils/components/icons/CalendarClearOutline.d.ts +2 -0
- package/lib/utils/components/icons/CalendarClearOutline.js +44 -0
- package/lib/utils/components/icons/Checkmark.d.ts +2 -0
- package/lib/utils/components/icons/Checkmark.js +20 -0
- package/lib/utils/components/icons/CheckmarkCircle.d.ts +2 -0
- package/lib/utils/components/icons/CheckmarkCircle.js +16 -0
- package/lib/utils/components/icons/CheckmarkCircleOutline.d.ts +2 -0
- package/lib/utils/components/icons/CheckmarkCircleOutline.js +26 -0
- package/lib/utils/components/icons/CheckmarkOutline.d.ts +2 -0
- package/lib/utils/components/icons/CheckmarkOutline.js +20 -0
- package/lib/utils/components/icons/CheckmarkSharp.d.ts +2 -0
- package/lib/utils/components/icons/CheckmarkSharp.js +20 -0
- package/lib/utils/components/icons/ChevronDoubleLeft16Filled.d.ts +2 -0
- package/lib/utils/components/icons/ChevronDoubleLeft16Filled.js +18 -0
- package/lib/utils/components/icons/ChevronDoubleRight16Filled.d.ts +2 -0
- package/lib/utils/components/icons/ChevronDoubleRight16Filled.js +18 -0
- package/lib/utils/components/icons/ChevronDown.d.ts +2 -0
- package/lib/utils/components/icons/ChevronDown.js +16 -0
- package/lib/utils/components/icons/ChevronForward.d.ts +2 -0
- package/lib/utils/components/icons/ChevronForward.js +20 -0
- package/lib/utils/components/icons/ChevronLeft24Filled.d.ts +2 -0
- package/lib/utils/components/icons/ChevronLeft24Filled.js +18 -0
- package/lib/utils/components/icons/ChevronRight24Filled.d.ts +2 -0
- package/lib/utils/components/icons/ChevronRight24Filled.js +18 -0
- package/lib/utils/components/icons/ChevronUp.d.ts +2 -0
- package/lib/utils/components/icons/ChevronUp.js +16 -0
- package/lib/utils/components/icons/Close.d.ts +2 -0
- package/lib/utils/components/icons/Close.js +16 -0
- package/lib/utils/components/icons/CloseCircle.d.ts +2 -0
- package/lib/utils/components/icons/CloseCircle.js +16 -0
- package/lib/utils/components/icons/CloseCircleOutline.d.ts +2 -0
- package/lib/utils/components/icons/CloseCircleOutline.js +33 -0
- package/lib/utils/components/icons/CloseOutline.d.ts +2 -0
- package/lib/utils/components/icons/CloseOutline.js +27 -0
- package/lib/utils/components/icons/CloudUploadOutline.d.ts +2 -0
- package/lib/utils/components/icons/CloudUploadOutline.js +34 -0
- package/lib/utils/components/icons/EllipsisHorizontal.d.ts +2 -0
- package/lib/utils/components/icons/EllipsisHorizontal.js +28 -0
- package/lib/utils/components/icons/Empty.d.ts +2 -0
- package/lib/utils/components/icons/Empty.js +19 -0
- package/lib/utils/components/icons/EyeOffOutline.d.ts +2 -0
- package/lib/utils/components/icons/EyeOffOutline.js +28 -0
- package/lib/utils/components/icons/EyeOutline.d.ts +2 -0
- package/lib/utils/components/icons/EyeOutline.js +28 -0
- package/lib/utils/components/icons/HelpCircleSharp.d.ts +2 -0
- package/lib/utils/components/icons/HelpCircleSharp.js +19 -0
- package/lib/utils/components/icons/ImageOutline.d.ts +2 -0
- package/lib/utils/components/icons/ImageSharp.d.ts +2 -0
- package/lib/utils/components/icons/ImageSharp.js +16 -0
- package/lib/utils/components/icons/InformationCircle.d.ts +2 -0
- package/lib/utils/components/icons/InformationCircle.js +16 -0
- package/lib/utils/components/icons/InformationCircleOutline.d.ts +2 -0
- package/lib/utils/components/icons/InformationCircleOutline.js +36 -0
- package/lib/utils/components/icons/IosArrowBack.d.ts +2 -0
- package/lib/utils/components/icons/IosArrowBack.js +19 -0
- package/lib/utils/components/icons/IosArrowDown.d.ts +2 -0
- package/lib/utils/components/icons/IosArrowDown.js +19 -0
- package/lib/utils/components/icons/IosArrowForward.d.ts +2 -0
- package/lib/utils/components/icons/IosArrowForward.js +19 -0
- package/lib/utils/components/icons/IosCheckmark.d.ts +2 -0
- package/lib/utils/components/icons/IosCheckmark.js +17 -0
- package/lib/utils/components/icons/KeyboardArrowLeftRound.d.ts +2 -0
- package/lib/utils/components/icons/KeyboardArrowLeftRound.js +16 -0
- package/lib/utils/components/icons/KeyboardArrowRightRound.d.ts +2 -0
- package/lib/utils/components/icons/KeyboardArrowRightRound.js +16 -0
- package/lib/utils/components/icons/KeyboardDoubleArrowLeftRound.d.ts +2 -0
- package/lib/utils/components/icons/KeyboardDoubleArrowLeftRound.js +19 -0
- package/lib/utils/components/icons/KeyboardDoubleArrowRightRound.d.ts +2 -0
- package/lib/utils/components/icons/KeyboardDoubleArrowRightRound.js +19 -0
- package/lib/utils/components/icons/LoadingOutlined.d.ts +2 -0
- package/lib/utils/components/icons/LoadingOutlined.js +16 -0
- package/lib/utils/components/icons/MenuFoldOutlined.d.ts +2 -0
- package/lib/utils/components/icons/MenuFoldOutlined.js +16 -0
- package/lib/utils/components/icons/Pause.d.ts +2 -0
- package/lib/utils/components/icons/Pause.js +19 -0
- package/lib/utils/components/icons/QuestionCircle24Regular.d.ts +2 -0
- package/lib/utils/components/icons/QuestionCircle24Regular.js +18 -0
- package/lib/utils/components/icons/Refresh.d.ts +2 -0
- package/lib/utils/components/icons/Refresh.js +27 -0
- package/lib/utils/components/icons/RemoveOutline.d.ts +2 -0
- package/lib/utils/components/icons/RemoveOutline.js +20 -0
- package/lib/utils/components/icons/TimeOutline.d.ts +2 -0
- package/lib/utils/components/icons/TimeOutline.js +26 -0
- package/lib/utils/components/icons/UploadFileFilled.d.ts +2 -0
- package/lib/utils/components/icons/UploadFileFilled.js +16 -0
- package/lib/utils/components/icons/index.d.ts +57 -0
- package/lib/utils/components/resize-observer.d.ts +27 -0
- package/lib/utils/components/resize-observer.js +70 -0
- package/lib/utils/components/transition/dropdown-transition.d.ts +4 -0
- package/lib/utils/components/transition/dropdown-transition.js +56 -0
- package/lib/utils/components/transition/slide-up-transition.d.ts +4 -0
- package/lib/utils/components/transition/slide-up-transition.js +59 -0
- package/lib/utils/directives/click-outside.js +139 -0
- package/lib/utils/dom.d.ts +1 -0
- package/lib/utils/dom.js +11 -0
- package/lib/utils/element.d.ts +17 -0
- package/lib/utils/element.js +64 -0
- package/lib/utils/error.d.ts +1 -0
- package/lib/utils/getElementRect.d.ts +1 -0
- package/lib/utils/hooks/useConfig.d.ts +9 -0
- package/lib/utils/hooks/useConfig.js +19 -0
- package/lib/utils/hooks/useGetSlot.d.ts +2 -0
- package/lib/utils/hooks/useGetSlot.js +14 -0
- package/lib/utils/hooks/useMediaQuery.d.ts +2 -0
- package/lib/utils/hooks/useMediaQuery.js +14 -0
- package/lib/utils/scrollbarWidth.js +69 -0
- package/lib/utils/transition.d.ts +2 -0
- package/lib/utils/transition.js +33 -0
- package/lib/utils/type.d.ts +26 -0
- package/lib/utils/type.js +62 -0
- package/lib/utils/validator-messages/cn.d.ts +3 -0
- package/lib/utils/validator-messages/cn.js +59 -0
- package/package.json +138 -0
|
@@ -0,0 +1,972 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
+
var __spreadValues = (a, b) => {
|
|
10
|
+
for (var prop in b || (b = {}))
|
|
11
|
+
if (__hasOwnProp.call(b, prop))
|
|
12
|
+
__defNormalProp(a, prop, b[prop]);
|
|
13
|
+
if (__getOwnPropSymbols)
|
|
14
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
15
|
+
if (__propIsEnum.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
}
|
|
18
|
+
return a;
|
|
19
|
+
};
|
|
20
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
22
|
+
var vue = require("vue");
|
|
23
|
+
var type = require("../../utils/type.js");
|
|
24
|
+
var index$1 = require("../../popper/index.js");
|
|
25
|
+
var index = require("../../input/index.js");
|
|
26
|
+
require("../../utils/components/icons/Checkmark.js");
|
|
27
|
+
require("../../utils/components/icons/CheckmarkCircle.js");
|
|
28
|
+
require("../../utils/components/icons/CheckmarkSharp.js");
|
|
29
|
+
require("../../utils/components/icons/CheckmarkCircleOutline.js");
|
|
30
|
+
require("../../utils/components/icons/AlertCircle.js");
|
|
31
|
+
require("../../utils/components/icons/AlertCircleOutline.js");
|
|
32
|
+
require("../../utils/components/icons/InformationCircle.js");
|
|
33
|
+
require("../../utils/components/icons/InformationCircleOutline.js");
|
|
34
|
+
require("../../utils/components/icons/CloseCircle.js");
|
|
35
|
+
var CloseCircleOutline = require("../../utils/components/icons/CloseCircleOutline.js");
|
|
36
|
+
require("../../utils/components/icons/HelpCircleSharp.js");
|
|
37
|
+
require("../../utils/components/icons/EyeOffOutline.js");
|
|
38
|
+
require("../../utils/components/icons/EyeOutline.js");
|
|
39
|
+
require("../../utils/components/icons/LoadingOutlined.js");
|
|
40
|
+
require("../../utils/components/icons/Close.js");
|
|
41
|
+
require("../../utils/components/icons/CloseOutline.js");
|
|
42
|
+
require("../../utils/components/icons/ArrowsMaximize.js");
|
|
43
|
+
require("../../utils/components/icons/ArrowsMinimize.js");
|
|
44
|
+
require("../../utils/components/icons/AddOutline.js");
|
|
45
|
+
require("../../utils/components/icons/RemoveOutline.js");
|
|
46
|
+
require("../../utils/components/icons/ChevronUp.js");
|
|
47
|
+
require("../../utils/components/icons/ChevronDown.js");
|
|
48
|
+
require("../../utils/components/icons/ChevronForward.js");
|
|
49
|
+
require("../../utils/components/icons/ChevronLeft24Filled.js");
|
|
50
|
+
require("../../utils/components/icons/ChevronRight24Filled.js");
|
|
51
|
+
require("../../utils/components/icons/ChevronDoubleLeft16Filled.js");
|
|
52
|
+
require("../../utils/components/icons/ChevronDoubleRight16Filled.js");
|
|
53
|
+
require("../../utils/components/icons/CheckmarkOutline.js");
|
|
54
|
+
require("../../utils/components/icons/IosCheckmark.js");
|
|
55
|
+
require("../../utils/components/icons/Empty.js");
|
|
56
|
+
require("../../utils/components/icons/Bars.js");
|
|
57
|
+
require("../../utils/components/icons/ArrowUpCircle.js");
|
|
58
|
+
require("../../utils/components/icons/ArrowUp.js");
|
|
59
|
+
var ArrowForward = require("../../utils/components/icons/ArrowForward.js");
|
|
60
|
+
var TimeOutline = require("../../utils/components/icons/TimeOutline.js");
|
|
61
|
+
var CalendarClearOutline = require("../../utils/components/icons/CalendarClearOutline.js");
|
|
62
|
+
require("../../utils/components/icons/KeyboardArrowLeftRound.js");
|
|
63
|
+
require("../../utils/components/icons/KeyboardArrowRightRound.js");
|
|
64
|
+
require("../../utils/components/icons/KeyboardDoubleArrowLeftRound.js");
|
|
65
|
+
require("../../utils/components/icons/KeyboardDoubleArrowRightRound.js");
|
|
66
|
+
require("../../utils/components/icons/MenuFoldOutlined.js");
|
|
67
|
+
require("../../utils/components/icons/IosArrowDown.js");
|
|
68
|
+
require("../../utils/components/icons/IosArrowBack.js");
|
|
69
|
+
require("../../utils/components/icons/IosArrowForward.js");
|
|
70
|
+
require("../../utils/components/icons/ImageSharp.js");
|
|
71
|
+
require("../../utils/components/icons/Pause.js");
|
|
72
|
+
require("../../utils/components/icons/Refresh.js");
|
|
73
|
+
require("../../utils/components/icons/QuestionCircle24Regular.js");
|
|
74
|
+
require("../../utils/components/icons/CloudUploadOutline.js");
|
|
75
|
+
require("../../utils/components/icons/UploadFileFilled.js");
|
|
76
|
+
require("../../utils/components/icons/EllipsisHorizontal.js");
|
|
77
|
+
require("../../utils/components/icons/ArrowNext24Filled.js");
|
|
78
|
+
require("../../utils/components/icons/ArrowPrevious24Filled.js");
|
|
79
|
+
require("../../utils/components/icons/ArrowDropDownSharp.js");
|
|
80
|
+
require("../../utils/components/icons/ArrowDropUpSharp.js");
|
|
81
|
+
require("../../utils/components/icons/ArrowForwardIosFilled.js");
|
|
82
|
+
var context = require("./context.js");
|
|
83
|
+
var useConfig = require("../../utils/hooks/useConfig.js");
|
|
84
|
+
var dayjs = require("dayjs");
|
|
85
|
+
var cloneDeep = require("lodash-es/cloneDeep");
|
|
86
|
+
var datePickerDate = require("./date-picker-date.js");
|
|
87
|
+
var datePickerTime = require("./date-picker-time.js");
|
|
88
|
+
var datePickerWeek = require("./date-picker-week.js");
|
|
89
|
+
var datePickerYear = require("./date-picker-year.js");
|
|
90
|
+
var index$2 = require("../../message/index.js");
|
|
91
|
+
var clickOutside = require("../../utils/directives/click-outside.js");
|
|
92
|
+
var weekOfYear = require("dayjs/plugin/weekOfYear");
|
|
93
|
+
var advancedFormat = require("dayjs/plugin/advancedFormat");
|
|
94
|
+
var quarterOfYear = require("dayjs/plugin/quarterOfYear");
|
|
95
|
+
var popper = require("../../popper/src/popper.js");
|
|
96
|
+
function _interopDefaultLegacy(e) {
|
|
97
|
+
return e && typeof e === "object" && "default" in e ? e : { "default": e };
|
|
98
|
+
}
|
|
99
|
+
var dayjs__default = /* @__PURE__ */ _interopDefaultLegacy(dayjs);
|
|
100
|
+
var cloneDeep__default = /* @__PURE__ */ _interopDefaultLegacy(cloneDeep);
|
|
101
|
+
var weekOfYear__default = /* @__PURE__ */ _interopDefaultLegacy(weekOfYear);
|
|
102
|
+
var advancedFormat__default = /* @__PURE__ */ _interopDefaultLegacy(advancedFormat);
|
|
103
|
+
var quarterOfYear__default = /* @__PURE__ */ _interopDefaultLegacy(quarterOfYear);
|
|
104
|
+
dayjs__default["default"].extend(advancedFormat__default["default"]);
|
|
105
|
+
dayjs__default["default"].extend(weekOfYear__default["default"]);
|
|
106
|
+
dayjs__default["default"].extend(quarterOfYear__default["default"]);
|
|
107
|
+
const datePickerProps = {
|
|
108
|
+
size: type.PropTypes.oneOf(["xs", "sm", "md", "lg", "xl"]).def("md"),
|
|
109
|
+
type: {
|
|
110
|
+
type: String,
|
|
111
|
+
default: "date"
|
|
112
|
+
},
|
|
113
|
+
readonly: type.PropTypes.bool.def(false),
|
|
114
|
+
disabled: {
|
|
115
|
+
type: [Boolean, Array]
|
|
116
|
+
},
|
|
117
|
+
loading: type.PropTypes.bool.def(false),
|
|
118
|
+
range: type.PropTypes.bool.def(false),
|
|
119
|
+
format: type.PropTypes.string,
|
|
120
|
+
placeholder: [String, Array],
|
|
121
|
+
value: [Array, String, Object],
|
|
122
|
+
panelDate: [Array, String, Object],
|
|
123
|
+
clearable: type.PropTypes.bool.def(true),
|
|
124
|
+
unbound: type.PropTypes.bool.def(false),
|
|
125
|
+
week: type.PropTypes.bool.def(false),
|
|
126
|
+
showFooter: type.PropTypes.bool.def(false),
|
|
127
|
+
prefix: type.PropTypes.string,
|
|
128
|
+
suffix: type.PropTypes.string,
|
|
129
|
+
placement: type.PropTypes.oneOf(popper.placementList).def("bottomLeft"),
|
|
130
|
+
disabledDates: {
|
|
131
|
+
type: Function
|
|
132
|
+
},
|
|
133
|
+
disabledHours: {
|
|
134
|
+
type: Array,
|
|
135
|
+
default: () => []
|
|
136
|
+
},
|
|
137
|
+
disabledMinutes: {
|
|
138
|
+
type: Array,
|
|
139
|
+
default: () => []
|
|
140
|
+
},
|
|
141
|
+
disabledSeconds: {
|
|
142
|
+
type: Array,
|
|
143
|
+
default: () => []
|
|
144
|
+
},
|
|
145
|
+
hourStep: type.PropTypes.number.def(1),
|
|
146
|
+
minuteStep: type.PropTypes.number.def(1),
|
|
147
|
+
secondStep: type.PropTypes.number.def(1),
|
|
148
|
+
years: {
|
|
149
|
+
type: Array,
|
|
150
|
+
default: () => [1900, 2100]
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
var DatePicker = vue.defineComponent({
|
|
154
|
+
name: "TDatePicker",
|
|
155
|
+
components: {
|
|
156
|
+
TInput: index.TInput,
|
|
157
|
+
TPopper: index$1.TPopper,
|
|
158
|
+
CloseCircleOutline: CloseCircleOutline["default"],
|
|
159
|
+
TimeOutline: TimeOutline["default"],
|
|
160
|
+
ArrowForward: ArrowForward["default"],
|
|
161
|
+
DatePickerDate: datePickerDate["default"],
|
|
162
|
+
DatePickerYear: datePickerYear["default"],
|
|
163
|
+
DatePickerTime: datePickerTime["default"],
|
|
164
|
+
CalendarClearOutline: CalendarClearOutline["default"]
|
|
165
|
+
},
|
|
166
|
+
directives: {
|
|
167
|
+
clickOutside: clickOutside.directive
|
|
168
|
+
},
|
|
169
|
+
inheritAttrs: false,
|
|
170
|
+
props: datePickerProps,
|
|
171
|
+
setup(props, {
|
|
172
|
+
slots,
|
|
173
|
+
emit,
|
|
174
|
+
attrs
|
|
175
|
+
}) {
|
|
176
|
+
var _a;
|
|
177
|
+
const currentValue = vue.ref([null, null]);
|
|
178
|
+
const {
|
|
179
|
+
prefixCls
|
|
180
|
+
} = useConfig.useConfig("date-picker", props);
|
|
181
|
+
const currentIndex = vue.ref(0);
|
|
182
|
+
const refPanel = [vue.ref(), vue.ref(), vue.ref(), vue.ref()];
|
|
183
|
+
const refInput = [vue.ref(), vue.ref()];
|
|
184
|
+
const refTrigger = vue.ref();
|
|
185
|
+
const innerIndex = vue.ref(0);
|
|
186
|
+
const showClear = vue.ref(false);
|
|
187
|
+
const disabled = vue.computed(() => {
|
|
188
|
+
let values = [false, false];
|
|
189
|
+
if (props.disabled) {
|
|
190
|
+
if (!type.isArray(props.disabled))
|
|
191
|
+
values = [props.disabled, props.disabled];
|
|
192
|
+
else
|
|
193
|
+
values = props.disabled;
|
|
194
|
+
}
|
|
195
|
+
return values;
|
|
196
|
+
});
|
|
197
|
+
const format = vue.computed(() => {
|
|
198
|
+
if (props.format)
|
|
199
|
+
return props.format;
|
|
200
|
+
switch (props.type) {
|
|
201
|
+
case "time":
|
|
202
|
+
return "HH:mm:ss";
|
|
203
|
+
case "datetime":
|
|
204
|
+
return "YYYY-MM-DD HH:mm:ss";
|
|
205
|
+
case "week":
|
|
206
|
+
return "YYYY-ww[\u5468]";
|
|
207
|
+
case "year":
|
|
208
|
+
return "YYYY";
|
|
209
|
+
case "month":
|
|
210
|
+
return "YYYY-MM";
|
|
211
|
+
case "quarter":
|
|
212
|
+
return "YYYY-[Q]Q";
|
|
213
|
+
default:
|
|
214
|
+
return "YYYY-MM-DD";
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
const placeholder = vue.computed(() => {
|
|
218
|
+
if (props.range) {
|
|
219
|
+
if (props.placeholder == void 0)
|
|
220
|
+
return ["\u5F00\u59CB\u65F6\u95F4", "\u7ED3\u675F\u65F6\u95F4"];
|
|
221
|
+
else if (type.isString(props.placeholder))
|
|
222
|
+
return [props.placeholder, props.placeholder];
|
|
223
|
+
else
|
|
224
|
+
return props.placeholder;
|
|
225
|
+
} else {
|
|
226
|
+
if (props.placeholder == void 0)
|
|
227
|
+
return ["\u5F00\u59CB\u65F6\u95F4"];
|
|
228
|
+
else
|
|
229
|
+
return [props.placeholder];
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
const selections = vue.ref({
|
|
233
|
+
year: [],
|
|
234
|
+
month: [],
|
|
235
|
+
quarter: [],
|
|
236
|
+
hour: [],
|
|
237
|
+
minute: [],
|
|
238
|
+
second: []
|
|
239
|
+
});
|
|
240
|
+
const reverseSelections = vue.ref({
|
|
241
|
+
year: [],
|
|
242
|
+
month: [],
|
|
243
|
+
quarter: [],
|
|
244
|
+
hour: [],
|
|
245
|
+
minute: [],
|
|
246
|
+
second: []
|
|
247
|
+
});
|
|
248
|
+
const formatValue = (value) => {
|
|
249
|
+
if (dayjs.isDayjs(value))
|
|
250
|
+
return value;
|
|
251
|
+
else if (value == "")
|
|
252
|
+
return null;
|
|
253
|
+
else if (value == void 0)
|
|
254
|
+
return null;
|
|
255
|
+
if (props.type == "time")
|
|
256
|
+
return dayjs__default["default"](`${dayjs__default["default"]().format("YYYY-MM-DD")} ${value}`);
|
|
257
|
+
else
|
|
258
|
+
return dayjs__default["default"](value);
|
|
259
|
+
};
|
|
260
|
+
const initValue = () => {
|
|
261
|
+
if (type.isArray(props.value)) {
|
|
262
|
+
currentValue.value = [formatValue(props.value[0] || null), formatValue(props.value[1] || null)];
|
|
263
|
+
} else
|
|
264
|
+
currentValue.value = [formatValue(props.value), null];
|
|
265
|
+
};
|
|
266
|
+
const initTimeSelections = () => {
|
|
267
|
+
selections.value["hour"] = [...Array(24)].map((item, index2) => index2).filter((item, index2) => index2 % props.hourStep == 0);
|
|
268
|
+
selections.value["minute"] = [...Array(60)].map((item, index2) => index2).filter((item, index2) => index2 % props.minuteStep == 0);
|
|
269
|
+
selections.value["second"] = [...Array(60)].map((item, index2) => index2).filter((item, index2) => index2 % props.secondStep == 0);
|
|
270
|
+
reverseSelections.value["hour"] = cloneDeep__default["default"](selections.value["hour"]).reverse();
|
|
271
|
+
reverseSelections.value["minute"] = cloneDeep__default["default"](selections.value["minute"]).reverse();
|
|
272
|
+
reverseSelections.value["second"] = cloneDeep__default["default"](selections.value["second"]).reverse();
|
|
273
|
+
};
|
|
274
|
+
const initYearSelections = () => {
|
|
275
|
+
selections.value["year"] = Array.from(new Array(props.years[1] + 1).keys()).slice(props.years[0]);
|
|
276
|
+
selections.value["month"] = [...Array(12)].map((item, index2) => index2 + 1);
|
|
277
|
+
selections.value["quarter"] = [...Array(4)].map((item, index2) => index2 + 1);
|
|
278
|
+
reverseSelections.value["year"] = cloneDeep__default["default"](selections.value["year"]).reverse();
|
|
279
|
+
reverseSelections.value["month"] = cloneDeep__default["default"](selections.value["month"]).reverse();
|
|
280
|
+
reverseSelections.value["quarter"] = cloneDeep__default["default"](selections.value["quarter"]).reverse();
|
|
281
|
+
};
|
|
282
|
+
const initPanelDate = () => {
|
|
283
|
+
let valueArr = [null, null];
|
|
284
|
+
if (props.panelDate) {
|
|
285
|
+
if (type.isArray(props.panelDate))
|
|
286
|
+
valueArr = props.panelDate;
|
|
287
|
+
else
|
|
288
|
+
valueArr[0] = props.panelDate;
|
|
289
|
+
if (valueArr[0] && type.isString(valueArr[0]))
|
|
290
|
+
panelDate.value[0] = dayjs__default["default"](valueArr[0]);
|
|
291
|
+
if (valueArr[1] && type.isString(valueArr[1]))
|
|
292
|
+
panelDate.value[1] = dayjs__default["default"](valueArr[1]);
|
|
293
|
+
}
|
|
294
|
+
if (disabled.value[0] != disabled.value[1]) {
|
|
295
|
+
if (disabled.value[0] && currentValue.value[0]) {
|
|
296
|
+
const value0 = currentValue.value[0];
|
|
297
|
+
if (value0.isBefore(dayjs__default["default"]()))
|
|
298
|
+
panelDate.value[1] = dayjs__default["default"]().startOf("month");
|
|
299
|
+
else
|
|
300
|
+
panelDate.value[1] = value0.startOf("month");
|
|
301
|
+
} else if (disabled.value[1] && currentValue.value[1]) {
|
|
302
|
+
const value1 = currentValue.value[1];
|
|
303
|
+
if (value1.isAfter(dayjs__default["default"]()))
|
|
304
|
+
panelDate.value[0] = dayjs__default["default"]().startOf("month");
|
|
305
|
+
else
|
|
306
|
+
panelDate.value[1] = value1.startOf("month");
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
};
|
|
310
|
+
vue.onBeforeMount(() => {
|
|
311
|
+
if (["time", "datetime"].includes(props.type))
|
|
312
|
+
initTimeSelections();
|
|
313
|
+
if (["datetime", "date", "year", "month", "quarter", "week"].includes(props.type))
|
|
314
|
+
initYearSelections();
|
|
315
|
+
initValue();
|
|
316
|
+
initPanelDate();
|
|
317
|
+
});
|
|
318
|
+
const getFormatValue = (value) => {
|
|
319
|
+
if (!value)
|
|
320
|
+
return "";
|
|
321
|
+
else if (props.type == "week")
|
|
322
|
+
return value.format("YYYY-MM-DD HH:mm:ss");
|
|
323
|
+
else if (props.type == "quarter")
|
|
324
|
+
return value.format("YYYY-MM");
|
|
325
|
+
else
|
|
326
|
+
return value.format(format.value);
|
|
327
|
+
};
|
|
328
|
+
const getCurrentValue = () => {
|
|
329
|
+
if (currentValue.value[0] == void 0 && currentValue.value[1] == void 0)
|
|
330
|
+
return void 0;
|
|
331
|
+
return props.range ? [getFormatValue(currentValue.value[0]), getFormatValue(currentValue.value[1])] : getFormatValue(currentValue.value[0]);
|
|
332
|
+
};
|
|
333
|
+
const commitValue = () => {
|
|
334
|
+
emit("update:value", getCurrentValue());
|
|
335
|
+
if (currentValue.value[0] == void 0 && currentValue.value[1] == void 0) {
|
|
336
|
+
emit("change", {
|
|
337
|
+
value: null
|
|
338
|
+
});
|
|
339
|
+
} else {
|
|
340
|
+
emit("change", {
|
|
341
|
+
value: currentValue.value
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
};
|
|
345
|
+
const setValue = (type2, value, index2, closePanel = true, innerUse = false, nInnerIndex = 0) => {
|
|
346
|
+
if (!dayjs.isDayjs(currentValue.value[index2])) {
|
|
347
|
+
currentValue.value[index2] = dayjs__default["default"]();
|
|
348
|
+
}
|
|
349
|
+
if (type2 == "year")
|
|
350
|
+
currentValue.value[index2] = currentValue.value[index2].year(value);
|
|
351
|
+
else if (type2 == "month")
|
|
352
|
+
currentValue.value[index2] = currentValue.value[index2].month(value);
|
|
353
|
+
else if (type2 == "quarter")
|
|
354
|
+
currentValue.value[index2] = currentValue.value[index2].quarter(value);
|
|
355
|
+
else if (type2 == "date") {
|
|
356
|
+
const day = value;
|
|
357
|
+
currentValue.value[index2] = currentValue.value[index2].year(day.year()).month(day.month()).date(day.date());
|
|
358
|
+
} else if (type2 == "hour")
|
|
359
|
+
currentValue.value[index2] = currentValue.value[index2].hour(value);
|
|
360
|
+
else if (type2 == "minute")
|
|
361
|
+
currentValue.value[index2] = currentValue.value[index2].minute(value);
|
|
362
|
+
else if (type2 == "second")
|
|
363
|
+
currentValue.value[index2] = currentValue.value[index2].second(value);
|
|
364
|
+
refInput[index2].value.focus();
|
|
365
|
+
if (innerUse) {
|
|
366
|
+
if (closePanel)
|
|
367
|
+
popVisible.value[index2] = false;
|
|
368
|
+
} else if (closePanel) {
|
|
369
|
+
commitValue();
|
|
370
|
+
popVisible.value[index2] = false;
|
|
371
|
+
close();
|
|
372
|
+
} else {
|
|
373
|
+
commitValue();
|
|
374
|
+
innerIndex.value = nInnerIndex;
|
|
375
|
+
}
|
|
376
|
+
};
|
|
377
|
+
const setTime = (time, index2, closePanel = true) => {
|
|
378
|
+
currentValue.value[index2] = time;
|
|
379
|
+
if (closePanel) {
|
|
380
|
+
commitValue();
|
|
381
|
+
close();
|
|
382
|
+
} else {
|
|
383
|
+
refInput[index2].value.focus();
|
|
384
|
+
}
|
|
385
|
+
};
|
|
386
|
+
const close = (commit = false) => {
|
|
387
|
+
visible.value = false;
|
|
388
|
+
if (commit)
|
|
389
|
+
commitValue();
|
|
390
|
+
};
|
|
391
|
+
const handleConfirm = () => {
|
|
392
|
+
close();
|
|
393
|
+
refInput[currentIndex.value].value.focus();
|
|
394
|
+
};
|
|
395
|
+
const hoverValue = vue.ref(null);
|
|
396
|
+
const hoverColumnIndex = vue.ref(0);
|
|
397
|
+
const hoverDate = vue.ref([null, null]);
|
|
398
|
+
const panelDate = vue.ref([null, null]);
|
|
399
|
+
const setHoverDate = (oneDay, twoDay, bBeforeHover = false) => {
|
|
400
|
+
hoverDate.value = [oneDay, twoDay];
|
|
401
|
+
if (bBeforeHover)
|
|
402
|
+
beforeHover.value = bBeforeHover;
|
|
403
|
+
refInput[currentIndex.value].value.focus();
|
|
404
|
+
};
|
|
405
|
+
const clearHoverDate = () => {
|
|
406
|
+
hoverDate.value = [null, null];
|
|
407
|
+
};
|
|
408
|
+
const setPanelDate = (day, index2) => {
|
|
409
|
+
panelDate.value[index2] = day;
|
|
410
|
+
};
|
|
411
|
+
const setHoverValue = (day) => {
|
|
412
|
+
hoverValue.value = day;
|
|
413
|
+
};
|
|
414
|
+
const setRangeValue = (oneDay, twoDay, closePanel = false, nInnerIndex = 0) => {
|
|
415
|
+
clearHoverDate();
|
|
416
|
+
innerIndex.value = nInnerIndex;
|
|
417
|
+
if (props.type == "datetime")
|
|
418
|
+
refInput[currentIndex.value].value.focus();
|
|
419
|
+
else
|
|
420
|
+
refInput[0].value.focus();
|
|
421
|
+
if (dayjs.isDayjs(oneDay) && dayjs.isDayjs(twoDay)) {
|
|
422
|
+
currentValue.value = oneDay.isAfter(twoDay) ? [twoDay, oneDay] : [oneDay, twoDay];
|
|
423
|
+
} else
|
|
424
|
+
currentValue.value = [oneDay, twoDay];
|
|
425
|
+
commitValue();
|
|
426
|
+
if (closePanel) {
|
|
427
|
+
close();
|
|
428
|
+
}
|
|
429
|
+
};
|
|
430
|
+
const beforeHover = vue.ref(false);
|
|
431
|
+
const setFocus = () => {
|
|
432
|
+
refInput[currentIndex.value].value.focus();
|
|
433
|
+
};
|
|
434
|
+
context.provideDatePicker({
|
|
435
|
+
visible: vue.computed(() => visible.value),
|
|
436
|
+
popVisible: vue.computed(() => popVisible.value),
|
|
437
|
+
value: vue.computed(() => currentValue.value),
|
|
438
|
+
disabled: vue.computed(() => disabled.value),
|
|
439
|
+
beforeHover: vue.computed(() => beforeHover.value),
|
|
440
|
+
focusIndex: vue.computed(() => currentIndex.value),
|
|
441
|
+
innerIndex: vue.computed(() => innerIndex.value),
|
|
442
|
+
hoverValue: vue.computed(() => hoverValue.value),
|
|
443
|
+
hoverColumnIndex: vue.computed(() => hoverColumnIndex.value),
|
|
444
|
+
selections: vue.computed(() => selections.value),
|
|
445
|
+
reverseSelections: vue.computed(() => reverseSelections.value),
|
|
446
|
+
hoverDate: vue.computed(() => hoverDate.value),
|
|
447
|
+
panelDate: vue.computed(() => panelDate.value),
|
|
448
|
+
setValue,
|
|
449
|
+
setRangeValue,
|
|
450
|
+
setPanelDate,
|
|
451
|
+
setTime,
|
|
452
|
+
setHoverValue,
|
|
453
|
+
setHoverDate,
|
|
454
|
+
close,
|
|
455
|
+
setFocus
|
|
456
|
+
});
|
|
457
|
+
const visible = vue.ref(false);
|
|
458
|
+
const popVisible = vue.ref([false, false]);
|
|
459
|
+
const isFocus = vue.ref(false);
|
|
460
|
+
const refPopper = vue.ref(null);
|
|
461
|
+
const handleClickOutside = (event) => {
|
|
462
|
+
if (refTrigger.value.contains(event.target))
|
|
463
|
+
return;
|
|
464
|
+
if (!inputFocus.value[0] && !inputFocus.value[1])
|
|
465
|
+
isFocus.value = false;
|
|
466
|
+
};
|
|
467
|
+
const handleClick = () => {
|
|
468
|
+
if (disabled.value[0] && disabled.value[1])
|
|
469
|
+
return;
|
|
470
|
+
isFocus.value = true;
|
|
471
|
+
if (disabled.value[0]) {
|
|
472
|
+
currentIndex.value = 1;
|
|
473
|
+
refInput[1].value.focus();
|
|
474
|
+
} else if (disabled.value[1]) {
|
|
475
|
+
currentIndex.value = 0;
|
|
476
|
+
refInput[0].value.focus();
|
|
477
|
+
}
|
|
478
|
+
setHoverValue(null);
|
|
479
|
+
};
|
|
480
|
+
vue.watch(() => props.value, () => {
|
|
481
|
+
initValue();
|
|
482
|
+
}, {
|
|
483
|
+
deep: true
|
|
484
|
+
});
|
|
485
|
+
let prefixElement = null;
|
|
486
|
+
if (props.prefix || slots.prefix) {
|
|
487
|
+
prefixElement = vue.createVNode("span", {
|
|
488
|
+
"class": `${prefixCls.value}-prefix`
|
|
489
|
+
}, [((_a = slots.prefix) == null ? void 0 : _a.call(slots)) || props.prefix]);
|
|
490
|
+
}
|
|
491
|
+
const handleClearClick = (event) => {
|
|
492
|
+
if (disabled.value[0] && disabled.value[1])
|
|
493
|
+
return;
|
|
494
|
+
event.stopPropagation();
|
|
495
|
+
event.preventDefault();
|
|
496
|
+
if (!disabled.value[0])
|
|
497
|
+
currentValue.value[0] = void 0;
|
|
498
|
+
if (!disabled.value[1])
|
|
499
|
+
currentValue.value[1] = void 0;
|
|
500
|
+
close();
|
|
501
|
+
commitValue();
|
|
502
|
+
emit("clear", event);
|
|
503
|
+
refInput[currentIndex.value].value.focus();
|
|
504
|
+
};
|
|
505
|
+
const getWeekDate = (valueStr) => {
|
|
506
|
+
const pattern = /^[0-9]{4}\-[0-9]{1,2}周$/;
|
|
507
|
+
if (!pattern.test(valueStr))
|
|
508
|
+
return null;
|
|
509
|
+
let [year, week] = valueStr.split("-");
|
|
510
|
+
week = week.replace("\u5468", "");
|
|
511
|
+
return dayjs__default["default"]().year(parseInt(year)).week(parseInt(week));
|
|
512
|
+
};
|
|
513
|
+
const getQuarterDate = (valueStr) => {
|
|
514
|
+
const pattern = /^[0-9]{4}\-Q[1-4]$/;
|
|
515
|
+
if (!pattern.test(valueStr))
|
|
516
|
+
return null;
|
|
517
|
+
let [year, quarter] = valueStr.split("-");
|
|
518
|
+
quarter = quarter.replace("Q", "");
|
|
519
|
+
return dayjs__default["default"]().year(parseInt(year)).quarter(parseInt(quarter));
|
|
520
|
+
};
|
|
521
|
+
const handleChange = (event, index2, enableUpdate = true) => {
|
|
522
|
+
event.stopPropagation();
|
|
523
|
+
event.preventDefault();
|
|
524
|
+
const str = event.target.value || "";
|
|
525
|
+
const value = props.type == "week" ? getWeekDate(str) : props.type == "quarter" ? getQuarterDate(str) : dayjs__default["default"](str);
|
|
526
|
+
let closePanel = true;
|
|
527
|
+
if (props.range && index2 == 0)
|
|
528
|
+
closePanel = false;
|
|
529
|
+
if (event.key != "Enter") {
|
|
530
|
+
if (enableUpdate) {
|
|
531
|
+
if (value && value.isValid())
|
|
532
|
+
setTime(value, index2, closePanel);
|
|
533
|
+
else
|
|
534
|
+
setTime(null, index2, closePanel);
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
clearHoverDate();
|
|
538
|
+
commitValue();
|
|
539
|
+
emit("change", {
|
|
540
|
+
value: getCurrentValue(),
|
|
541
|
+
index: index2
|
|
542
|
+
});
|
|
543
|
+
};
|
|
544
|
+
const handleFocus = (index2) => {
|
|
545
|
+
inputFocus.value[index2] = true;
|
|
546
|
+
isFocus.value = true;
|
|
547
|
+
currentIndex.value = index2;
|
|
548
|
+
emit("focus", {
|
|
549
|
+
index: index2
|
|
550
|
+
});
|
|
551
|
+
};
|
|
552
|
+
const handleInput = () => {
|
|
553
|
+
if (!visible.value) {
|
|
554
|
+
visible.value = true;
|
|
555
|
+
}
|
|
556
|
+
};
|
|
557
|
+
const inputFocus = vue.ref([false, false]);
|
|
558
|
+
const handleBlur = (index2) => {
|
|
559
|
+
inputFocus.value[index2] = false;
|
|
560
|
+
if (!inputFocus.value[0] && !inputFocus.value[1] && !visible.value)
|
|
561
|
+
isFocus.value = false;
|
|
562
|
+
emit("blur", {
|
|
563
|
+
index: index2
|
|
564
|
+
});
|
|
565
|
+
};
|
|
566
|
+
const handleTab = (event) => {
|
|
567
|
+
if (!visible.value)
|
|
568
|
+
return;
|
|
569
|
+
event.preventDefault();
|
|
570
|
+
if (props.type == "datetime") {
|
|
571
|
+
if (props.range) {
|
|
572
|
+
innerIndex.value = innerIndex.value ? 0 : 1;
|
|
573
|
+
if (innerIndex.value == 0) {
|
|
574
|
+
refInput[currentIndex.value ? 0 : 1].value.focus();
|
|
575
|
+
setHoverValue(null);
|
|
576
|
+
}
|
|
577
|
+
} else {
|
|
578
|
+
innerIndex.value = innerIndex.value ? 0 : 1;
|
|
579
|
+
}
|
|
580
|
+
} else if (props.type == "date" && props.range) {
|
|
581
|
+
refInput[currentIndex.value ? 0 : 1].value.focus();
|
|
582
|
+
if (!hoverDate.value[0] || beforeHover.value) {
|
|
583
|
+
beforeHover.value = true;
|
|
584
|
+
hoverDate.value[0] = panelDate.value[currentIndex.value];
|
|
585
|
+
hoverValue.value = hoverDate.value[0];
|
|
586
|
+
} else {
|
|
587
|
+
if (currentIndex.value == 1)
|
|
588
|
+
setHoverDate(hoverDate.value[0], panelDate.value[1]);
|
|
589
|
+
else
|
|
590
|
+
setHoverDate(hoverDate.value[0], panelDate.value[0].endOf("month"));
|
|
591
|
+
}
|
|
592
|
+
} else if (props.range) {
|
|
593
|
+
refInput[currentIndex.value ? 0 : 1].value.focus();
|
|
594
|
+
setHoverValue(currentValue.value[currentIndex.value]);
|
|
595
|
+
}
|
|
596
|
+
};
|
|
597
|
+
const handleEnter = (event, index2) => {
|
|
598
|
+
event.preventDefault();
|
|
599
|
+
let enableUpdate = true;
|
|
600
|
+
if (visible.value) {
|
|
601
|
+
if (popVisible.value[currentIndex.value]) {
|
|
602
|
+
popVisible.value[currentIndex.value] = false;
|
|
603
|
+
return;
|
|
604
|
+
}
|
|
605
|
+
if (props.range) {
|
|
606
|
+
if (props.type == "date" || props.type == "week") {
|
|
607
|
+
if (hoverDate.value[1]) {
|
|
608
|
+
enableUpdate = false;
|
|
609
|
+
setRangeValue(hoverDate.value[0], hoverDate.value[1], true);
|
|
610
|
+
} else if (beforeHover.value) {
|
|
611
|
+
beforeHover.value = false;
|
|
612
|
+
return;
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
close(true);
|
|
617
|
+
} else
|
|
618
|
+
refPopper.value.handleClick(event);
|
|
619
|
+
handleChange(event, index2, enableUpdate);
|
|
620
|
+
};
|
|
621
|
+
const handleKeydown = (event, index2) => {
|
|
622
|
+
switch (event.code) {
|
|
623
|
+
case "Escape":
|
|
624
|
+
event.preventDefault();
|
|
625
|
+
clearHoverDate();
|
|
626
|
+
close();
|
|
627
|
+
break;
|
|
628
|
+
case "ArrowDown":
|
|
629
|
+
case "ArrowUp":
|
|
630
|
+
case "ArrowLeft":
|
|
631
|
+
case "ArrowRight":
|
|
632
|
+
event.preventDefault();
|
|
633
|
+
if (innerIndex.value == 0) {
|
|
634
|
+
switch (props.type) {
|
|
635
|
+
case "datetime":
|
|
636
|
+
if (props.range)
|
|
637
|
+
refPanel[0].value.handleKeydown(event.code);
|
|
638
|
+
else
|
|
639
|
+
refPanel[currentIndex.value].value.handleKeydown(event.code);
|
|
640
|
+
break;
|
|
641
|
+
default:
|
|
642
|
+
refPanel[currentIndex.value].value.handleKeydown(event.code);
|
|
643
|
+
break;
|
|
644
|
+
}
|
|
645
|
+
} else {
|
|
646
|
+
refPanel[2].value.handleKeydown(event.code);
|
|
647
|
+
}
|
|
648
|
+
break;
|
|
649
|
+
case "Enter":
|
|
650
|
+
handleEnter(event, index2);
|
|
651
|
+
break;
|
|
652
|
+
case "Tab":
|
|
653
|
+
handleTab(event);
|
|
654
|
+
break;
|
|
655
|
+
}
|
|
656
|
+
emit("keydown", {
|
|
657
|
+
index: index2
|
|
658
|
+
});
|
|
659
|
+
};
|
|
660
|
+
const triggerClasses = vue.computed(() => {
|
|
661
|
+
const values = [`${prefixCls.value}-input`, {
|
|
662
|
+
[`is-focus`]: isFocus.value,
|
|
663
|
+
[`is-open`]: visible.value,
|
|
664
|
+
[`is-range`]: props.range,
|
|
665
|
+
[`is-disabled`]: disabled.value[0] && disabled.value[1] || props.loading,
|
|
666
|
+
[`is-readonly`]: props.readonly,
|
|
667
|
+
[`no-prefix`]: !props.prefix,
|
|
668
|
+
[`size-${props.size}`]: props.size
|
|
669
|
+
}];
|
|
670
|
+
return values;
|
|
671
|
+
});
|
|
672
|
+
const contentClasses = vue.computed(() => {
|
|
673
|
+
const values = [`${prefixCls.value}-content`, {
|
|
674
|
+
[`size-${props.size}`]: props.size,
|
|
675
|
+
[`is-range`]: props.range,
|
|
676
|
+
[`is-disabled`]: disabled.value[0] && disabled.value[1] || props.loading,
|
|
677
|
+
[`is-readonly`]: props.readonly
|
|
678
|
+
}];
|
|
679
|
+
return values;
|
|
680
|
+
});
|
|
681
|
+
const handleClickNow = () => {
|
|
682
|
+
var _a2;
|
|
683
|
+
if (disabled.value[0] && disabled.value[1])
|
|
684
|
+
return;
|
|
685
|
+
const time = dayjs__default["default"]();
|
|
686
|
+
if (((_a2 = props.disabledDates) == null ? void 0 : _a2.call(props, time)) || props.disabledHours.includes(time.hour()) || props.disabledMinutes.includes(time.minute()) || props.disabledSeconds.includes(time.second())) {
|
|
687
|
+
index$2.TMessage.warning("\u5F53\u524D\u65F6\u95F4\u4E0D\u53EF\u9009\u62E9");
|
|
688
|
+
return;
|
|
689
|
+
}
|
|
690
|
+
const close2 = false;
|
|
691
|
+
if (props.type == "datetime" && props.range) {
|
|
692
|
+
if (currentIndex.value == 0)
|
|
693
|
+
setRangeValue(time, currentValue.value[1], close2);
|
|
694
|
+
else
|
|
695
|
+
setRangeValue(currentValue.value[0], time, close2);
|
|
696
|
+
} else
|
|
697
|
+
setTime(time, currentIndex.value, close2);
|
|
698
|
+
};
|
|
699
|
+
const render = () => {
|
|
700
|
+
var _a2;
|
|
701
|
+
const contentProps = {
|
|
702
|
+
class: contentClasses.value,
|
|
703
|
+
range: props.range
|
|
704
|
+
};
|
|
705
|
+
const timeProps = {
|
|
706
|
+
type: props.type,
|
|
707
|
+
format: props.type == "time" ? format.value : format.value.split(" ")[1],
|
|
708
|
+
readonly: props.readonly,
|
|
709
|
+
disabled: disabled.value[0],
|
|
710
|
+
disabledDates: props.disabledDates,
|
|
711
|
+
disabledHours: props.disabledHours,
|
|
712
|
+
disabledMinutes: props.disabledMinutes,
|
|
713
|
+
disabledSeconds: props.disabledSeconds,
|
|
714
|
+
hourStep: props.hourStep,
|
|
715
|
+
minuteStep: props.minuteStep,
|
|
716
|
+
secondStep: props.secondStep
|
|
717
|
+
};
|
|
718
|
+
const singleProps = {
|
|
719
|
+
type: props.type,
|
|
720
|
+
week: props.week,
|
|
721
|
+
unbound: props.unbound,
|
|
722
|
+
disabledDates: props.disabledDates
|
|
723
|
+
};
|
|
724
|
+
const singlePanelElement = vue.computed(() => {
|
|
725
|
+
switch (props.type) {
|
|
726
|
+
case "time":
|
|
727
|
+
return vue.createVNode(vue.Fragment, null, [vue.createVNode(datePickerTime["default"], vue.mergeProps({
|
|
728
|
+
"ref": refPanel[0],
|
|
729
|
+
"index": 0,
|
|
730
|
+
"innerIndex": 0
|
|
731
|
+
}, timeProps), null)]);
|
|
732
|
+
case "datetime":
|
|
733
|
+
return vue.createVNode(vue.Fragment, null, [vue.createVNode(datePickerDate["default"], vue.mergeProps({
|
|
734
|
+
"ref": refPanel[0],
|
|
735
|
+
"index": 0,
|
|
736
|
+
"innerIndex": 0
|
|
737
|
+
}, singleProps), null), vue.createVNode(datePickerTime["default"], vue.mergeProps({
|
|
738
|
+
"ref": refPanel[2],
|
|
739
|
+
"index": 0,
|
|
740
|
+
"innerIndex": 1
|
|
741
|
+
}, timeProps, {
|
|
742
|
+
"showHeader": true
|
|
743
|
+
}), null)]);
|
|
744
|
+
case "week":
|
|
745
|
+
return vue.createVNode(vue.Fragment, null, [vue.createVNode(datePickerWeek["default"], vue.mergeProps({
|
|
746
|
+
"ref": refPanel[0]
|
|
747
|
+
}, singleProps), null)]);
|
|
748
|
+
case "year":
|
|
749
|
+
case "month":
|
|
750
|
+
case "quarter":
|
|
751
|
+
return vue.createVNode(vue.Fragment, null, [vue.createVNode(datePickerYear["default"], vue.mergeProps({
|
|
752
|
+
"ref": refPanel[0]
|
|
753
|
+
}, singleProps), null)]);
|
|
754
|
+
default:
|
|
755
|
+
return vue.createVNode(datePickerDate["default"], vue.mergeProps({
|
|
756
|
+
"ref": refPanel[0]
|
|
757
|
+
}, singleProps), null);
|
|
758
|
+
}
|
|
759
|
+
});
|
|
760
|
+
const rangeProps = {
|
|
761
|
+
type: props.type,
|
|
762
|
+
week: props.week,
|
|
763
|
+
unbound: disabled.value[0] != disabled.value[1] ? true : props.unbound,
|
|
764
|
+
range: disabled.value[0] != disabled.value[1] ? false : true,
|
|
765
|
+
disabledDates: props.disabledDates
|
|
766
|
+
};
|
|
767
|
+
const arrowElement = vue.computed(() => vue.createVNode("div", {
|
|
768
|
+
"class": `${prefixCls.value}-arrow`
|
|
769
|
+
}, [vue.createVNode(vue.resolveComponent("t-icon"), null, {
|
|
770
|
+
default: () => [vue.createVNode(ArrowForward["default"], null, null)]
|
|
771
|
+
})]));
|
|
772
|
+
const rangePanelElement = () => {
|
|
773
|
+
if (disabled.value[0] != disabled.value[1]) {
|
|
774
|
+
rangeProps["disabledDates"] = (date) => {
|
|
775
|
+
if (props.disabledDates) {
|
|
776
|
+
if (props.disabledDates(date))
|
|
777
|
+
return true;
|
|
778
|
+
}
|
|
779
|
+
if (disabled.value[0]) {
|
|
780
|
+
if (date.isBefore(currentValue.value[0]))
|
|
781
|
+
return true;
|
|
782
|
+
} else if (disabled.value[1]) {
|
|
783
|
+
if (date.isAfter(currentValue.value[1]))
|
|
784
|
+
return true;
|
|
785
|
+
}
|
|
786
|
+
return false;
|
|
787
|
+
};
|
|
788
|
+
}
|
|
789
|
+
switch (props.type) {
|
|
790
|
+
case "time":
|
|
791
|
+
return vue.createVNode(vue.Fragment, null, [!disabled.value[0] ? vue.createVNode(datePickerTime["default"], vue.mergeProps({
|
|
792
|
+
"ref": refPanel[0],
|
|
793
|
+
"index": 0,
|
|
794
|
+
"range": true
|
|
795
|
+
}, timeProps), null) : null, arrowElement.value, !disabled.value[1] ? vue.createVNode(datePickerTime["default"], vue.mergeProps({
|
|
796
|
+
"ref": refPanel[1],
|
|
797
|
+
"index": 1,
|
|
798
|
+
"range": true
|
|
799
|
+
}, timeProps), null) : null]);
|
|
800
|
+
case "datetime":
|
|
801
|
+
rangeProps["unbound"] = true;
|
|
802
|
+
rangeProps["disabled"] = disabled.value[currentIndex.value];
|
|
803
|
+
return vue.createVNode(vue.Fragment, null, [vue.createVNode(datePickerDate["default"], vue.mergeProps({
|
|
804
|
+
"ref": refPanel[0],
|
|
805
|
+
"index": currentIndex.value,
|
|
806
|
+
"innerIndex": 0
|
|
807
|
+
}, rangeProps), null), vue.createVNode(datePickerTime["default"], vue.mergeProps({
|
|
808
|
+
"ref": refPanel[2],
|
|
809
|
+
"index": currentIndex.value,
|
|
810
|
+
"innerIndex": 1,
|
|
811
|
+
"range": true
|
|
812
|
+
}, timeProps, {
|
|
813
|
+
"showHeader": true
|
|
814
|
+
}), null)]);
|
|
815
|
+
case "week":
|
|
816
|
+
return vue.createVNode(vue.Fragment, null, [!disabled.value[0] ? vue.createVNode(datePickerWeek["default"], vue.mergeProps({
|
|
817
|
+
"ref": refPanel[0],
|
|
818
|
+
"index": 0
|
|
819
|
+
}, rangeProps, {
|
|
820
|
+
"disabled": disabled.value[0]
|
|
821
|
+
}), null) : null, !disabled.value[1] ? vue.createVNode(datePickerWeek["default"], vue.mergeProps({
|
|
822
|
+
"ref": refPanel[1],
|
|
823
|
+
"index": 1
|
|
824
|
+
}, rangeProps, {
|
|
825
|
+
"disabled": disabled.value[1]
|
|
826
|
+
}), null) : null]);
|
|
827
|
+
case "year":
|
|
828
|
+
case "month":
|
|
829
|
+
case "quarter":
|
|
830
|
+
return vue.createVNode(vue.Fragment, null, [vue.createVNode(datePickerYear["default"], vue.mergeProps({
|
|
831
|
+
"ref": refPanel[0],
|
|
832
|
+
"index": 0
|
|
833
|
+
}, rangeProps, {
|
|
834
|
+
"disabled": disabled.value[0]
|
|
835
|
+
}), null), arrowElement.value, vue.createVNode(datePickerYear["default"], vue.mergeProps({
|
|
836
|
+
"ref": refPanel[1],
|
|
837
|
+
"index": 1
|
|
838
|
+
}, rangeProps, {
|
|
839
|
+
"disabled": disabled.value[1]
|
|
840
|
+
}), null)]);
|
|
841
|
+
default:
|
|
842
|
+
return vue.createVNode(vue.Fragment, null, [!disabled.value[0] ? vue.createVNode(datePickerDate["default"], vue.mergeProps({
|
|
843
|
+
"ref": refPanel[0],
|
|
844
|
+
"index": 0
|
|
845
|
+
}, rangeProps, {
|
|
846
|
+
"disabled": disabled.value[0]
|
|
847
|
+
}), null) : null, !disabled.value[1] ? vue.createVNode(datePickerDate["default"], vue.mergeProps({
|
|
848
|
+
"ref": refPanel[1],
|
|
849
|
+
"index": 1
|
|
850
|
+
}, rangeProps, {
|
|
851
|
+
"disabled": disabled.value[1]
|
|
852
|
+
}), null) : null]);
|
|
853
|
+
}
|
|
854
|
+
};
|
|
855
|
+
const footerElement = vue.computed(() => vue.createVNode("div", {
|
|
856
|
+
"class": [`${prefixCls.value}-footer`, {
|
|
857
|
+
[`only-year`]: props.type == "year" && !props.range
|
|
858
|
+
}]
|
|
859
|
+
}, [vue.createVNode(vue.resolveComponent("t-button"), {
|
|
860
|
+
"type": "primary",
|
|
861
|
+
"size": "xs",
|
|
862
|
+
"ghost": true,
|
|
863
|
+
"onClick": handleClickNow,
|
|
864
|
+
"disabled": props.readonly || disabled.value[0] && disabled.value[1]
|
|
865
|
+
}, {
|
|
866
|
+
default: () => [vue.createTextVNode("\u6B64\u65F6")]
|
|
867
|
+
}), vue.withDirectives(vue.createVNode(vue.resolveComponent("t-button"), {
|
|
868
|
+
"type": "primary",
|
|
869
|
+
"size": "xs",
|
|
870
|
+
"onClick": handleConfirm
|
|
871
|
+
}, {
|
|
872
|
+
default: () => [vue.createTextVNode("\u786E\u5B9A")]
|
|
873
|
+
}), [[vue.vShow, props.type != "year" || props.range]])]));
|
|
874
|
+
const showFooter = vue.computed(() => {
|
|
875
|
+
if (props.showFooter)
|
|
876
|
+
return true;
|
|
877
|
+
if (!props.range) {
|
|
878
|
+
return ["time", "datetime", "month", "quarter", "year"].includes(props.type);
|
|
879
|
+
} else {
|
|
880
|
+
return ["time", "datetime", "year", "month", "quarter"].includes(props.type);
|
|
881
|
+
}
|
|
882
|
+
});
|
|
883
|
+
const contentElement = vue.createVNode("div", contentProps, [vue.createVNode("div", {
|
|
884
|
+
"class": `${prefixCls.value}-panels`
|
|
885
|
+
}, [props.range ? rangePanelElement() : singlePanelElement.value]), showFooter.value ? footerElement.value : null]);
|
|
886
|
+
const getControlProps = (index2) => {
|
|
887
|
+
return __spreadProps(__spreadValues({}, attrs), {
|
|
888
|
+
value: dayjs.isDayjs(currentValue.value[index2]) ? currentValue.value[index2].format(format.value) : null,
|
|
889
|
+
placeholder: placeholder.value[index2],
|
|
890
|
+
disabled: disabled.value[index2],
|
|
891
|
+
readonly: props.readonly,
|
|
892
|
+
onFocus: () => handleFocus(index2),
|
|
893
|
+
onBlur: () => handleBlur(index2),
|
|
894
|
+
onChange: (event) => handleChange(event, index2),
|
|
895
|
+
onKeydown: (event) => handleKeydown(event, index2),
|
|
896
|
+
onInput: () => handleInput(),
|
|
897
|
+
class: {
|
|
898
|
+
[`is-focus`]: isFocus.value && currentIndex.value == index2,
|
|
899
|
+
[`range-focus`]: props.range
|
|
900
|
+
}
|
|
901
|
+
});
|
|
902
|
+
};
|
|
903
|
+
const inputElement = props.range ? vue.createVNode("div", {
|
|
904
|
+
"class": `${prefixCls.value}-input-container`
|
|
905
|
+
}, [vue.createVNode("input", vue.mergeProps({
|
|
906
|
+
"ref": refInput[0]
|
|
907
|
+
}, getControlProps(0)), null), vue.createVNode("div", {
|
|
908
|
+
"class": "is-arrow"
|
|
909
|
+
}, [vue.createVNode(vue.resolveComponent("t-icon"), null, {
|
|
910
|
+
default: () => [vue.createVNode(ArrowForward["default"], null, null)]
|
|
911
|
+
})]), vue.createVNode("input", vue.mergeProps({
|
|
912
|
+
"ref": refInput[1]
|
|
913
|
+
}, getControlProps(1)), null)]) : vue.createVNode("input", vue.mergeProps({
|
|
914
|
+
"ref": refInput[0]
|
|
915
|
+
}, getControlProps(0)), null);
|
|
916
|
+
const suffixElement = vue.createVNode("span", {
|
|
917
|
+
"class": `${prefixCls.value}-suffix`
|
|
918
|
+
}, [showClear.value && !props.readonly && (currentValue.value[0] || currentValue.value[1]) ? vue.createVNode(vue.resolveComponent("t-icon"), {
|
|
919
|
+
"class": "is-action",
|
|
920
|
+
"onClick": handleClearClick
|
|
921
|
+
}, {
|
|
922
|
+
default: () => [vue.createVNode(CloseCircleOutline["default"], null, null)]
|
|
923
|
+
}) : slots.suffix ? (_a2 = slots.suffix) == null ? void 0 : _a2.call(slots) : props.suffix ? props.suffix : vue.createVNode(vue.resolveComponent("t-icon"), null, {
|
|
924
|
+
default: () => [props.type == "time" ? vue.createVNode(TimeOutline["default"], null, null) : vue.createVNode(CalendarClearOutline["default"], null, null)]
|
|
925
|
+
})]);
|
|
926
|
+
const triggerProps = {};
|
|
927
|
+
if ((!disabled.value[0] || !disabled.value[1]) && props.clearable) {
|
|
928
|
+
triggerProps["onMouseenter"] = () => {
|
|
929
|
+
showClear.value = true;
|
|
930
|
+
};
|
|
931
|
+
triggerProps["onMouseleave"] = () => {
|
|
932
|
+
showClear.value = false;
|
|
933
|
+
};
|
|
934
|
+
}
|
|
935
|
+
const triggerElement = vue.withDirectives(vue.createVNode("div", vue.mergeProps({
|
|
936
|
+
"ref": refTrigger,
|
|
937
|
+
"class": triggerClasses.value
|
|
938
|
+
}, triggerProps), [prefixElement, inputElement, suffixElement]), [[vue.resolveDirective("clickOutside"), handleClickOutside]]);
|
|
939
|
+
const inSlots = {
|
|
940
|
+
trigger: () => triggerElement,
|
|
941
|
+
content: () => contentElement
|
|
942
|
+
};
|
|
943
|
+
const popperProps = {
|
|
944
|
+
placement: props.placement,
|
|
945
|
+
trigger: "click",
|
|
946
|
+
transitionName: "slide-up",
|
|
947
|
+
sameWidth: false,
|
|
948
|
+
isToggle: false,
|
|
949
|
+
disabled: disabled.value[0] && disabled.value[1] || props.readonly,
|
|
950
|
+
offset: 6,
|
|
951
|
+
showArrow: false,
|
|
952
|
+
minWidth: "60px",
|
|
953
|
+
maxWidth: "1000px"
|
|
954
|
+
};
|
|
955
|
+
if (!disabled.value[0] || !disabled.value[1])
|
|
956
|
+
popperProps[`onClick`] = handleClick;
|
|
957
|
+
return vue.createVNode(vue.Fragment, null, [vue.createVNode(vue.resolveComponent("t-popper"), vue.mergeProps({
|
|
958
|
+
"ref": refPopper,
|
|
959
|
+
"class": props.type == "time" ? "is-time" : "is-date",
|
|
960
|
+
"visible": visible.value,
|
|
961
|
+
"onUpdate:visible": ($event) => visible.value = $event
|
|
962
|
+
}, popperProps), inSlots)]);
|
|
963
|
+
};
|
|
964
|
+
return {
|
|
965
|
+
render
|
|
966
|
+
};
|
|
967
|
+
},
|
|
968
|
+
render() {
|
|
969
|
+
return this.render();
|
|
970
|
+
}
|
|
971
|
+
});
|
|
972
|
+
exports["default"] = DatePicker;
|