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,514 @@
|
|
|
1
|
+
import { defineComponent, ref, watch, onMounted, computed, createVNode, Transition, withDirectives, vShow, resolveComponent, nextTick } from "vue";
|
|
2
|
+
import { useConfig } from "../../utils/hooks/useConfig.js";
|
|
3
|
+
import { cascaderPanelProps } from "./context.js";
|
|
4
|
+
import { TCheckbox } from "../../checkbox/index.js";
|
|
5
|
+
import "../../utils/components/icons/Checkmark.js";
|
|
6
|
+
import "../../utils/components/icons/CheckmarkCircle.js";
|
|
7
|
+
import "../../utils/components/icons/CheckmarkSharp.js";
|
|
8
|
+
import "../../utils/components/icons/CheckmarkCircleOutline.js";
|
|
9
|
+
import "../../utils/components/icons/AlertCircle.js";
|
|
10
|
+
import "../../utils/components/icons/AlertCircleOutline.js";
|
|
11
|
+
import "../../utils/components/icons/InformationCircle.js";
|
|
12
|
+
import "../../utils/components/icons/InformationCircleOutline.js";
|
|
13
|
+
import "../../utils/components/icons/CloseCircle.js";
|
|
14
|
+
import "../../utils/components/icons/CloseCircleOutline.js";
|
|
15
|
+
import "../../utils/components/icons/HelpCircleSharp.js";
|
|
16
|
+
import "../../utils/components/icons/EyeOffOutline.js";
|
|
17
|
+
import "../../utils/components/icons/EyeOutline.js";
|
|
18
|
+
import LoadingOutlined from "../../utils/components/icons/LoadingOutlined.js";
|
|
19
|
+
import "../../utils/components/icons/Close.js";
|
|
20
|
+
import "../../utils/components/icons/CloseOutline.js";
|
|
21
|
+
import "../../utils/components/icons/ArrowsMaximize.js";
|
|
22
|
+
import "../../utils/components/icons/ArrowsMinimize.js";
|
|
23
|
+
import "../../utils/components/icons/AddOutline.js";
|
|
24
|
+
import "../../utils/components/icons/RemoveOutline.js";
|
|
25
|
+
import "../../utils/components/icons/ChevronUp.js";
|
|
26
|
+
import "../../utils/components/icons/ChevronDown.js";
|
|
27
|
+
import "../../utils/components/icons/ChevronForward.js";
|
|
28
|
+
import "../../utils/components/icons/ChevronLeft24Filled.js";
|
|
29
|
+
import "../../utils/components/icons/ChevronRight24Filled.js";
|
|
30
|
+
import "../../utils/components/icons/ChevronDoubleLeft16Filled.js";
|
|
31
|
+
import "../../utils/components/icons/ChevronDoubleRight16Filled.js";
|
|
32
|
+
import "../../utils/components/icons/CheckmarkOutline.js";
|
|
33
|
+
import "../../utils/components/icons/IosCheckmark.js";
|
|
34
|
+
import "../../utils/components/icons/Empty.js";
|
|
35
|
+
import "../../utils/components/icons/Bars.js";
|
|
36
|
+
import "../../utils/components/icons/ArrowUpCircle.js";
|
|
37
|
+
import "../../utils/components/icons/ArrowUp.js";
|
|
38
|
+
import "../../utils/components/icons/ArrowForward.js";
|
|
39
|
+
import "../../utils/components/icons/TimeOutline.js";
|
|
40
|
+
import "../../utils/components/icons/CalendarClearOutline.js";
|
|
41
|
+
import "../../utils/components/icons/KeyboardArrowLeftRound.js";
|
|
42
|
+
import "../../utils/components/icons/KeyboardArrowRightRound.js";
|
|
43
|
+
import "../../utils/components/icons/KeyboardDoubleArrowLeftRound.js";
|
|
44
|
+
import "../../utils/components/icons/KeyboardDoubleArrowRightRound.js";
|
|
45
|
+
import "../../utils/components/icons/MenuFoldOutlined.js";
|
|
46
|
+
import "../../utils/components/icons/IosArrowDown.js";
|
|
47
|
+
import "../../utils/components/icons/IosArrowBack.js";
|
|
48
|
+
import "../../utils/components/icons/IosArrowForward.js";
|
|
49
|
+
import "../../utils/components/icons/ImageSharp.js";
|
|
50
|
+
import "../../utils/components/icons/Pause.js";
|
|
51
|
+
import "../../utils/components/icons/Refresh.js";
|
|
52
|
+
import "../../utils/components/icons/QuestionCircle24Regular.js";
|
|
53
|
+
import "../../utils/components/icons/CloudUploadOutline.js";
|
|
54
|
+
import "../../utils/components/icons/UploadFileFilled.js";
|
|
55
|
+
import "../../utils/components/icons/EllipsisHorizontal.js";
|
|
56
|
+
import "../../utils/components/icons/ArrowNext24Filled.js";
|
|
57
|
+
import "../../utils/components/icons/ArrowPrevious24Filled.js";
|
|
58
|
+
import "../../utils/components/icons/ArrowDropDownSharp.js";
|
|
59
|
+
import "../../utils/components/icons/ArrowDropUpSharp.js";
|
|
60
|
+
import ArrowForwardIosFilled from "../../utils/components/icons/ArrowForwardIosFilled.js";
|
|
61
|
+
import { getLengthNumber, getLength } from "../../utils/common.js";
|
|
62
|
+
import DropdownTransition from "../../utils/components/transition/dropdown-transition.js";
|
|
63
|
+
import cloneDeep from "lodash-es/cloneDeep";
|
|
64
|
+
import { arrayEquals } from "../../utils/compare.js";
|
|
65
|
+
import { getTransitionGroupProps } from "../../utils/transition.js";
|
|
66
|
+
var CascaderPanel = defineComponent({
|
|
67
|
+
name: "TCascaderPanel",
|
|
68
|
+
components: {
|
|
69
|
+
TCheckbox,
|
|
70
|
+
LoadingOutlined,
|
|
71
|
+
ArrowForwardIosFilled,
|
|
72
|
+
DropdownTransition
|
|
73
|
+
},
|
|
74
|
+
inheritAttrs: true,
|
|
75
|
+
props: cascaderPanelProps,
|
|
76
|
+
emits: ["update:value", "nodeClicked", "nodeCheckedChange", "nodeLoaded"],
|
|
77
|
+
setup(props, {
|
|
78
|
+
emit
|
|
79
|
+
}) {
|
|
80
|
+
const {
|
|
81
|
+
prefixCls
|
|
82
|
+
} = useConfig("cascader-panel", props);
|
|
83
|
+
const initSingleValue = () => {
|
|
84
|
+
if (props.single && checkedValues.value.length > 0)
|
|
85
|
+
singleValue.value = checkedValues.value[0];
|
|
86
|
+
};
|
|
87
|
+
const checkedValues = ref(props.value);
|
|
88
|
+
const keyword = ref("");
|
|
89
|
+
const singleValue = ref();
|
|
90
|
+
const nodeList = ref(props.data);
|
|
91
|
+
const panelList = ref([]);
|
|
92
|
+
const expanded = ref(props.expanded);
|
|
93
|
+
const markedValues = ref([]);
|
|
94
|
+
const initData = (nodeList2, parentPath) => {
|
|
95
|
+
traverseData(nodeList2, parentPath, []);
|
|
96
|
+
expanded.value = [...new Set(expanded.value)];
|
|
97
|
+
markedValues.value = [...new Set(markedValues.value)];
|
|
98
|
+
setFatherChecked(nodeList2, markedValues.value);
|
|
99
|
+
};
|
|
100
|
+
const traverseData = (nodeList2, parentPath, labelPath) => {
|
|
101
|
+
nodeList2.forEach((item) => {
|
|
102
|
+
const path = cloneDeep(parentPath);
|
|
103
|
+
path.push(item[props.valueKey]);
|
|
104
|
+
item.keyPath = path;
|
|
105
|
+
item.indeterminate = false;
|
|
106
|
+
const itemLabelPath = [...labelPath, item[props.labelKey]];
|
|
107
|
+
item.labelPath = itemLabelPath.join(" / ");
|
|
108
|
+
const value = item[props.valueKey];
|
|
109
|
+
if (checkedValues.value.includes(value)) {
|
|
110
|
+
markedValues.value.push(...item.keyPath);
|
|
111
|
+
}
|
|
112
|
+
if (item.children) {
|
|
113
|
+
traverseData(item.children, path, itemLabelPath);
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
};
|
|
117
|
+
const addEmptyPanel = () => {
|
|
118
|
+
const panel = {
|
|
119
|
+
parentPath: [],
|
|
120
|
+
index: panelList.value.length,
|
|
121
|
+
nodeList: [],
|
|
122
|
+
visible: false
|
|
123
|
+
};
|
|
124
|
+
panelList.value.push(panel);
|
|
125
|
+
};
|
|
126
|
+
watch(() => props.data, () => {
|
|
127
|
+
nodeList.value = props.data;
|
|
128
|
+
initData(nodeList.value, []);
|
|
129
|
+
const panel = {
|
|
130
|
+
parentPath: [],
|
|
131
|
+
index: 0,
|
|
132
|
+
visible: true,
|
|
133
|
+
nodeList: nodeList.value
|
|
134
|
+
};
|
|
135
|
+
panelList.value = [panel];
|
|
136
|
+
addEmptyPanel();
|
|
137
|
+
});
|
|
138
|
+
watch(() => props.value, () => {
|
|
139
|
+
if (arrayEquals(props.value, checkedValues.value))
|
|
140
|
+
return;
|
|
141
|
+
checkedValues.value = props.value;
|
|
142
|
+
initSingleValue();
|
|
143
|
+
markedValues.value = [];
|
|
144
|
+
initData(nodeList.value, []);
|
|
145
|
+
}, {
|
|
146
|
+
deep: true
|
|
147
|
+
});
|
|
148
|
+
const initPanel = (nodeList2, parentIndex) => {
|
|
149
|
+
nodeList2.forEach((node) => {
|
|
150
|
+
const value = node[props.valueKey];
|
|
151
|
+
if (expanded.value.includes(value) && node.children) {
|
|
152
|
+
const panel = {
|
|
153
|
+
parentPath: node.keyPath,
|
|
154
|
+
index: ++parentIndex,
|
|
155
|
+
visible: true,
|
|
156
|
+
nodeList: node.children
|
|
157
|
+
};
|
|
158
|
+
panelList.value[parentIndex] = panel;
|
|
159
|
+
addEmptyPanel();
|
|
160
|
+
initPanel(node.children, parentIndex);
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
};
|
|
164
|
+
onMounted(() => {
|
|
165
|
+
initSingleValue();
|
|
166
|
+
initData(nodeList.value, []);
|
|
167
|
+
const panel = {
|
|
168
|
+
parentPath: [],
|
|
169
|
+
index: 0,
|
|
170
|
+
visible: true,
|
|
171
|
+
nodeList: nodeList.value
|
|
172
|
+
};
|
|
173
|
+
panelList.value = [panel];
|
|
174
|
+
addEmptyPanel();
|
|
175
|
+
initPanel(nodeList.value, 0);
|
|
176
|
+
});
|
|
177
|
+
const showExpandIcon = (item) => {
|
|
178
|
+
var _a, _b, _c;
|
|
179
|
+
if (((_a = item.children) == null ? void 0 : _a.length) > 0) {
|
|
180
|
+
return true;
|
|
181
|
+
}
|
|
182
|
+
if (props.loadMethod) {
|
|
183
|
+
if (!((_b = item.loaded) != null ? _b : false) || ((_c = item.children) == null ? void 0 : _c.length) > 0)
|
|
184
|
+
return true;
|
|
185
|
+
}
|
|
186
|
+
return false;
|
|
187
|
+
};
|
|
188
|
+
const shouldLoadData = (item) => {
|
|
189
|
+
var _a;
|
|
190
|
+
if (!props.loadMethod)
|
|
191
|
+
return false;
|
|
192
|
+
if (((_a = item.children) == null ? void 0 : _a.length) > 0)
|
|
193
|
+
return false;
|
|
194
|
+
if (item.loaded)
|
|
195
|
+
return false;
|
|
196
|
+
return true;
|
|
197
|
+
};
|
|
198
|
+
const handleExpandedChange = (event, item, panelIndex) => {
|
|
199
|
+
if (event instanceof Event)
|
|
200
|
+
event.stopPropagation();
|
|
201
|
+
if (shouldLoadData(item)) {
|
|
202
|
+
item.loading = true;
|
|
203
|
+
props.loadMethod(item, (item2, children) => {
|
|
204
|
+
item2.children = children;
|
|
205
|
+
item2.loaded = true;
|
|
206
|
+
item2.loading = false;
|
|
207
|
+
initData(nodeList.value, []);
|
|
208
|
+
emit("nodeLoaded", item2, children);
|
|
209
|
+
nextTick(() => {
|
|
210
|
+
execExpand(item2, panelIndex);
|
|
211
|
+
});
|
|
212
|
+
});
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
execExpand(item, panelIndex);
|
|
216
|
+
};
|
|
217
|
+
const execExpand = (item, panelIndex) => {
|
|
218
|
+
var _a, _b;
|
|
219
|
+
if (((_b = (_a = item == null ? void 0 : item.children) == null ? void 0 : _a.length) != null ? _b : 0) <= 0) {
|
|
220
|
+
panelList.value[panelIndex + 1].visible = false;
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
const newPanelIndex = panelIndex + 1;
|
|
224
|
+
const panel = {
|
|
225
|
+
parentPath: item.keyPath,
|
|
226
|
+
visible: true,
|
|
227
|
+
index: newPanelIndex,
|
|
228
|
+
nodeList: item.children
|
|
229
|
+
};
|
|
230
|
+
panelList.value[newPanelIndex] = panel;
|
|
231
|
+
if (panelList.value.length <= newPanelIndex + 1)
|
|
232
|
+
addEmptyPanel();
|
|
233
|
+
const keyPath = item.keyPath;
|
|
234
|
+
panelList.value.forEach((each, index) => {
|
|
235
|
+
const shouldShow = each.parentPath.some((x) => keyPath.includes(x));
|
|
236
|
+
if (!shouldShow && index > 0) {
|
|
237
|
+
each.visible = false;
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
};
|
|
241
|
+
const checkedChange = (item, checked) => {
|
|
242
|
+
if (props.checkRelated && !props.single) {
|
|
243
|
+
setSonChecked(item, checked);
|
|
244
|
+
const fatherKeyPath = cloneDeep(item.keyPath);
|
|
245
|
+
fatherKeyPath.pop();
|
|
246
|
+
setFatherChecked(nodeList.value, fatherKeyPath);
|
|
247
|
+
}
|
|
248
|
+
if (props.single) {
|
|
249
|
+
checkedValues.value = [singleValue.value];
|
|
250
|
+
}
|
|
251
|
+
emit("update:value", checkedValues.value);
|
|
252
|
+
emit("nodeCheckedChange", item, checkedValues.value);
|
|
253
|
+
};
|
|
254
|
+
const setFatherChecked = (nodeList2, fatherKeyPath) => {
|
|
255
|
+
if (!props.checkRelated || props.single)
|
|
256
|
+
return;
|
|
257
|
+
const index = nodeList2.findIndex((son) => fatherKeyPath.includes(son[props.valueKey]));
|
|
258
|
+
if (index >= 0) {
|
|
259
|
+
if (!nodeList2[index].hasOwnProperty("children"))
|
|
260
|
+
return;
|
|
261
|
+
setFatherChecked(nodeList2[index].children, fatherKeyPath);
|
|
262
|
+
const items = nodeList2[index].children.filter((item) => checkedValues.value.includes(item.id) && !item.indeterminate);
|
|
263
|
+
const hasChecked = nodeList2[index].children.some((item) => checkedValues.value.includes(item.id) || item.indeterminate);
|
|
264
|
+
const selectedValue = nodeList2[index][props.valueKey];
|
|
265
|
+
const selectedIndex = checkedValues.value.indexOf(selectedValue);
|
|
266
|
+
if (items.length == nodeList2[index].children.length) {
|
|
267
|
+
if (selectedIndex < 0)
|
|
268
|
+
checkedValues.value.push(selectedValue);
|
|
269
|
+
nodeList2[index].indeterminate = false;
|
|
270
|
+
} else {
|
|
271
|
+
if (selectedIndex >= 0)
|
|
272
|
+
checkedValues.value.splice(selectedIndex, 1);
|
|
273
|
+
if (hasChecked)
|
|
274
|
+
nodeList2[index].indeterminate = true;
|
|
275
|
+
else
|
|
276
|
+
nodeList2[index].indeterminate = false;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
};
|
|
280
|
+
const setSonChecked = (item, checked) => {
|
|
281
|
+
if (item.disabled)
|
|
282
|
+
return;
|
|
283
|
+
if (item.hasOwnProperty("children")) {
|
|
284
|
+
item.children.forEach((son) => {
|
|
285
|
+
setSonChecked(son, checked);
|
|
286
|
+
});
|
|
287
|
+
const checkedItems = item.children.filter((son) => checkedValues.value.includes(son.id) && !son.indeterminate);
|
|
288
|
+
item.indeterminate = checkedItems.length > 0 && checkedItems.length < item.children.length;
|
|
289
|
+
}
|
|
290
|
+
const index = checkedValues.value.indexOf(item.id);
|
|
291
|
+
if (checked) {
|
|
292
|
+
if (index < 0)
|
|
293
|
+
checkedValues.value.push(item.id);
|
|
294
|
+
} else {
|
|
295
|
+
if (index >= 0)
|
|
296
|
+
checkedValues.value.splice(index, 1);
|
|
297
|
+
}
|
|
298
|
+
};
|
|
299
|
+
const handleItemClick = (event, item, panelIndex) => {
|
|
300
|
+
var _a, _b, _c, _d, _e;
|
|
301
|
+
if (keyword.value == "") {
|
|
302
|
+
if (!expanded.value.includes(item[props.valueKey]))
|
|
303
|
+
expanded.value = item.keyPath;
|
|
304
|
+
handleExpandedChange(event, item, panelIndex);
|
|
305
|
+
}
|
|
306
|
+
if (item.disabled)
|
|
307
|
+
return;
|
|
308
|
+
if (props.loadMethod && ((_b = (_a = item.children) == null ? void 0 : _a.length) != null ? _b : 0) <= 0 && !((_c = item.loaded) != null ? _c : false))
|
|
309
|
+
return;
|
|
310
|
+
const shouldCheck = !props.onlyLeaf || ((_e = (_d = item.children) == null ? void 0 : _d.length) != null ? _e : 0) <= 0;
|
|
311
|
+
if (props.checkOnClick && shouldCheck) {
|
|
312
|
+
const value = item[props.valueKey];
|
|
313
|
+
const index = checkedValues.value.indexOf(value);
|
|
314
|
+
if (index >= 0) {
|
|
315
|
+
if (!props.single) {
|
|
316
|
+
checkedValues.value.splice(index, 1);
|
|
317
|
+
checkedChange(item, false);
|
|
318
|
+
} else
|
|
319
|
+
checkedChange(item, true);
|
|
320
|
+
} else {
|
|
321
|
+
if (props.single) {
|
|
322
|
+
singleValue.value = value;
|
|
323
|
+
checkedValues.value = [value];
|
|
324
|
+
} else
|
|
325
|
+
checkedValues.value.push(value);
|
|
326
|
+
checkedChange(item, true);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
emit("nodeClicked", item);
|
|
330
|
+
};
|
|
331
|
+
const handleCheckedChange = (e, node, panelIndex) => {
|
|
332
|
+
const checked = checkedValues.value.indexOf(node[props.valueKey]) >= 0;
|
|
333
|
+
handleExpandedChange(e, node, panelIndex);
|
|
334
|
+
checkedChange(node, checked);
|
|
335
|
+
};
|
|
336
|
+
const filterMethod = computed(() => {
|
|
337
|
+
if (props.filterMethod)
|
|
338
|
+
return props.filterMethod;
|
|
339
|
+
return (keyword2, item) => {
|
|
340
|
+
if (item[props.labelKey])
|
|
341
|
+
return item[props.labelKey].indexOf(keyword2) >= 0;
|
|
342
|
+
return false;
|
|
343
|
+
};
|
|
344
|
+
});
|
|
345
|
+
const traverseDataForFilter = (nodeList2, keyword2) => {
|
|
346
|
+
const notEmpty = keyword2 != "";
|
|
347
|
+
nodeList2.forEach((item) => {
|
|
348
|
+
const visible = filterMethod.value(keyword2, item);
|
|
349
|
+
if (visible && notEmpty) {
|
|
350
|
+
const matchedItem = {
|
|
351
|
+
icon: item.icon,
|
|
352
|
+
disabled: item.disabled,
|
|
353
|
+
loaded: item.loaded,
|
|
354
|
+
visible: true,
|
|
355
|
+
[props.valueKey]: item[props.valueKey],
|
|
356
|
+
[props.labelKey]: item[props.labelKey],
|
|
357
|
+
labelPath: item.labelPath
|
|
358
|
+
};
|
|
359
|
+
filterNodeList.value.push(matchedItem);
|
|
360
|
+
}
|
|
361
|
+
if (item.children) {
|
|
362
|
+
traverseDataForFilter(item.children, keyword2);
|
|
363
|
+
}
|
|
364
|
+
});
|
|
365
|
+
};
|
|
366
|
+
const filterNodeList = ref([]);
|
|
367
|
+
const filter = (inKeyword) => {
|
|
368
|
+
keyword.value = inKeyword;
|
|
369
|
+
filterNodeList.value = [];
|
|
370
|
+
if (inKeyword != "")
|
|
371
|
+
traverseDataForFilter(nodeList.value, inKeyword);
|
|
372
|
+
};
|
|
373
|
+
const transitionProps = computed(() => {
|
|
374
|
+
const transitionName = "slide-up";
|
|
375
|
+
return getTransitionGroupProps(transitionName);
|
|
376
|
+
});
|
|
377
|
+
const paddingLeft = getLengthNumber(props.paddingLeft);
|
|
378
|
+
const getItemStyles = () => {
|
|
379
|
+
const styles2 = {
|
|
380
|
+
paddingLeft: `${paddingLeft}px`
|
|
381
|
+
};
|
|
382
|
+
if (props.itemHeight)
|
|
383
|
+
styles2[`height`] = getLength(props.itemHeight);
|
|
384
|
+
return styles2;
|
|
385
|
+
};
|
|
386
|
+
const styles = computed(() => {
|
|
387
|
+
const styles2 = {};
|
|
388
|
+
if (props.maxHeight)
|
|
389
|
+
styles2[`--t-cascader-panel-max-height`] = getLength(props.maxHeight);
|
|
390
|
+
return styles2;
|
|
391
|
+
});
|
|
392
|
+
const isChecked = (node) => {
|
|
393
|
+
return checkedValues.value.includes(node[props.valueKey]);
|
|
394
|
+
};
|
|
395
|
+
const isExpanded = (node) => {
|
|
396
|
+
return expanded.value.includes(node[props.valueKey]);
|
|
397
|
+
};
|
|
398
|
+
const render = () => {
|
|
399
|
+
const renderArrow = (node) => {
|
|
400
|
+
var _a;
|
|
401
|
+
return createVNode("div", {
|
|
402
|
+
"class": `${prefixCls.value}-node-item-expand`
|
|
403
|
+
}, [((_a = node.loading) != null ? _a : false) ? createVNode(resolveComponent("t-icon"), {
|
|
404
|
+
"spin": true
|
|
405
|
+
}, {
|
|
406
|
+
default: () => [createVNode(LoadingOutlined, null, null)]
|
|
407
|
+
}) : showExpandIcon(node) ? createVNode(resolveComponent("t-icon"), null, {
|
|
408
|
+
default: () => [createVNode(ArrowForwardIosFilled, null, null)]
|
|
409
|
+
}) : null]);
|
|
410
|
+
};
|
|
411
|
+
const renderCheckbox = (node, panelIndex) => {
|
|
412
|
+
var _a, _b, _c, _d, _e;
|
|
413
|
+
if (!props.showCheckbox)
|
|
414
|
+
return;
|
|
415
|
+
if (props.onlyLeaf && ((_b = (_a = node.children) == null ? void 0 : _a.length) != null ? _b : 0) > 0)
|
|
416
|
+
return;
|
|
417
|
+
if (props.loadMethod && ((_d = (_c = node.children) == null ? void 0 : _c.length) != null ? _d : 0) <= 0 && !((_e = node.loaded) != null ? _e : false))
|
|
418
|
+
return;
|
|
419
|
+
return createVNode("div", {
|
|
420
|
+
"class": `${prefixCls.value}-node-item-checkbox`
|
|
421
|
+
}, [props.single ? createVNode(resolveComponent("t-radio"), {
|
|
422
|
+
"value": singleValue.value,
|
|
423
|
+
"onUpdate:value": ($event) => singleValue.value = $event,
|
|
424
|
+
"itemValue": node[props.valueKey],
|
|
425
|
+
"indeterminate": node.indeterminate,
|
|
426
|
+
"key": node[props.valueKey],
|
|
427
|
+
"disabled": node.disabled,
|
|
428
|
+
"onChange": (e) => handleCheckedChange(e, node, panelIndex)
|
|
429
|
+
}, null) : createVNode(resolveComponent("t-checkbox"), {
|
|
430
|
+
"value": checkedValues.value,
|
|
431
|
+
"onUpdate:value": ($event) => checkedValues.value = $event,
|
|
432
|
+
"itemValue": node[props.valueKey],
|
|
433
|
+
"indeterminate": node.indeterminate,
|
|
434
|
+
"disabled": node.disabled,
|
|
435
|
+
"key": node[props.valueKey],
|
|
436
|
+
"onChange": (e) => handleCheckedChange(e, node, panelIndex)
|
|
437
|
+
}, null)]);
|
|
438
|
+
};
|
|
439
|
+
const renderNode = (node, panelIndex, isFilter) => {
|
|
440
|
+
var _a, _b;
|
|
441
|
+
if (!((_a = node.visible) != null ? _a : true))
|
|
442
|
+
return;
|
|
443
|
+
return createVNode("div", {
|
|
444
|
+
"class": `${prefixCls.value}-node`
|
|
445
|
+
}, [createVNode("div", {
|
|
446
|
+
"class": [`${prefixCls.value}-node-item`, {
|
|
447
|
+
[`is-selected`]: isChecked(node),
|
|
448
|
+
[`is-expanded`]: isExpanded(node),
|
|
449
|
+
[`is-disabled`]: (_b = node == null ? void 0 : node.disabled) != null ? _b : false
|
|
450
|
+
}],
|
|
451
|
+
"tabindex": 0,
|
|
452
|
+
"onClick": (e) => handleItemClick(e, node, panelIndex),
|
|
453
|
+
"style": getItemStyles()
|
|
454
|
+
}, [renderCheckbox(node, panelIndex), node.icon ? createVNode(resolveComponent("t-icon"), {
|
|
455
|
+
"class": `${prefixCls.value}-node-item-icon`
|
|
456
|
+
}, {
|
|
457
|
+
default: () => [node.icon]
|
|
458
|
+
}) : null, createVNode("div", {
|
|
459
|
+
"class": `${prefixCls.value}-node-item-label`
|
|
460
|
+
}, [createVNode("span", null, [isFilter ? node.labelPath : node[props.labelKey]]), node.loaded ? null : createVNode("span", {
|
|
461
|
+
"class": `is-arrow`
|
|
462
|
+
}, [isFilter ? null : renderArrow(node)])])])]);
|
|
463
|
+
};
|
|
464
|
+
const showBorderRight = (panel) => {
|
|
465
|
+
if (!panel.visible)
|
|
466
|
+
return false;
|
|
467
|
+
return panelList.value[panel.index + 1].visible;
|
|
468
|
+
};
|
|
469
|
+
const renderPanel = (panel) => {
|
|
470
|
+
return createVNode(Transition, transitionProps.value, {
|
|
471
|
+
default: () => [withDirectives(createVNode("div", {
|
|
472
|
+
"class": [`${prefixCls.value}`, {
|
|
473
|
+
[`with-border-right`]: showBorderRight(panel)
|
|
474
|
+
}],
|
|
475
|
+
"style": styles.value
|
|
476
|
+
}, [panel.nodeList.map((node) => {
|
|
477
|
+
return renderNode(node, panel.index, false);
|
|
478
|
+
})]), [[vShow, panel.visible]])]
|
|
479
|
+
});
|
|
480
|
+
};
|
|
481
|
+
const promoteElement = createVNode("div", {
|
|
482
|
+
"class": `empty`
|
|
483
|
+
}, [props.emptyText]);
|
|
484
|
+
const panelListElement = panelList.value.map((panel) => {
|
|
485
|
+
return renderPanel(panel);
|
|
486
|
+
});
|
|
487
|
+
const filteredPanelElement = createVNode("div", {
|
|
488
|
+
"class": `${prefixCls.value}`
|
|
489
|
+
}, [filterNodeList.value.map((node) => {
|
|
490
|
+
return renderNode(node, 0, true);
|
|
491
|
+
})]);
|
|
492
|
+
if (keyword.value != "") {
|
|
493
|
+
return createVNode("div", {
|
|
494
|
+
"class": `${prefixCls.value}-list`
|
|
495
|
+
}, [filterNodeList.value.length > 0 ? filteredPanelElement : promoteElement]);
|
|
496
|
+
}
|
|
497
|
+
return createVNode("div", {
|
|
498
|
+
"class": `${prefixCls.value}-list`
|
|
499
|
+
}, [props.data.length > 0 ? panelListElement : promoteElement]);
|
|
500
|
+
};
|
|
501
|
+
const getCheckedValues = () => {
|
|
502
|
+
return checkedValues.value;
|
|
503
|
+
};
|
|
504
|
+
return {
|
|
505
|
+
render,
|
|
506
|
+
filter,
|
|
507
|
+
getCheckedValues
|
|
508
|
+
};
|
|
509
|
+
},
|
|
510
|
+
render() {
|
|
511
|
+
return this.render();
|
|
512
|
+
}
|
|
513
|
+
});
|
|
514
|
+
export { CascaderPanel as default };
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import type { PropType, ExtractPropTypes, VNode } from 'vue';
|
|
2
|
+
export declare type CascaderPanelNodeType = {
|
|
3
|
+
children?: Array<CascaderPanelNodeType>;
|
|
4
|
+
icon?: VNode | (() => VNode);
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
keyPath?: Array<string | number>;
|
|
7
|
+
indeterminate?: boolean;
|
|
8
|
+
loading?: boolean;
|
|
9
|
+
loaded?: boolean;
|
|
10
|
+
visible?: boolean;
|
|
11
|
+
labelPath?: string;
|
|
12
|
+
[x: string]: any;
|
|
13
|
+
};
|
|
14
|
+
export declare type CascaderPanelType = {
|
|
15
|
+
index: number;
|
|
16
|
+
parentPath: Array<string | number>;
|
|
17
|
+
visible: boolean;
|
|
18
|
+
nodeList: Array<CascaderPanelNodeType>;
|
|
19
|
+
};
|
|
20
|
+
export declare const cascaderPanelProps: {
|
|
21
|
+
prefixCls: import("vue-types").VueTypeValidableDef<string> & {
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
data: {
|
|
25
|
+
type: PropType<CascaderPanelNodeType[]>;
|
|
26
|
+
default: () => any[];
|
|
27
|
+
};
|
|
28
|
+
paddingLeft: import("vue-types").VueTypeDef<string | number> & {
|
|
29
|
+
default: string | number;
|
|
30
|
+
};
|
|
31
|
+
itemHeight: import("vue-types").VueTypeDef<string | number>;
|
|
32
|
+
maxHeight: import("vue-types").VueTypeDef<string | number>;
|
|
33
|
+
expanded: {
|
|
34
|
+
type: PropType<(string | number)[]>;
|
|
35
|
+
default: () => any[];
|
|
36
|
+
};
|
|
37
|
+
value: {
|
|
38
|
+
type: PropType<(string | number)[]>;
|
|
39
|
+
default: () => any[];
|
|
40
|
+
};
|
|
41
|
+
singleExpanded: import("vue-types").VueTypeValidableDef<boolean> & {
|
|
42
|
+
default: boolean;
|
|
43
|
+
} & {
|
|
44
|
+
default: boolean;
|
|
45
|
+
};
|
|
46
|
+
theme: import("vue-types").VueTypeValidableDef<string> & {
|
|
47
|
+
default: string;
|
|
48
|
+
} & {
|
|
49
|
+
default: string;
|
|
50
|
+
};
|
|
51
|
+
valueKey: import("vue-types").VueTypeValidableDef<string> & {
|
|
52
|
+
default: string;
|
|
53
|
+
} & {
|
|
54
|
+
default: string;
|
|
55
|
+
};
|
|
56
|
+
labelKey: import("vue-types").VueTypeValidableDef<string> & {
|
|
57
|
+
default: string;
|
|
58
|
+
} & {
|
|
59
|
+
default: string;
|
|
60
|
+
};
|
|
61
|
+
emptyText: import("vue-types").VueTypeValidableDef<string> & {
|
|
62
|
+
default: string;
|
|
63
|
+
} & {
|
|
64
|
+
default: string;
|
|
65
|
+
};
|
|
66
|
+
showCheckbox: import("vue-types").VueTypeValidableDef<boolean> & {
|
|
67
|
+
default: boolean;
|
|
68
|
+
} & {
|
|
69
|
+
default: boolean;
|
|
70
|
+
};
|
|
71
|
+
checkOnClick: import("vue-types").VueTypeValidableDef<boolean> & {
|
|
72
|
+
default: boolean;
|
|
73
|
+
} & {
|
|
74
|
+
default: boolean;
|
|
75
|
+
};
|
|
76
|
+
checkRelated: import("vue-types").VueTypeValidableDef<boolean> & {
|
|
77
|
+
default: boolean;
|
|
78
|
+
} & {
|
|
79
|
+
default: boolean;
|
|
80
|
+
};
|
|
81
|
+
single: import("vue-types").VueTypeValidableDef<boolean> & {
|
|
82
|
+
default: boolean;
|
|
83
|
+
} & {
|
|
84
|
+
default: boolean;
|
|
85
|
+
};
|
|
86
|
+
onlyLeaf: import("vue-types").VueTypeValidableDef<boolean> & {
|
|
87
|
+
default: boolean;
|
|
88
|
+
} & {
|
|
89
|
+
default: boolean;
|
|
90
|
+
};
|
|
91
|
+
loadMethod: {
|
|
92
|
+
type: PropType<(node: CascaderPanelNodeType, resolve: (node: CascaderPanelNodeType, children: CascaderPanelNodeType[]) => void) => void>;
|
|
93
|
+
};
|
|
94
|
+
filterMethod: {
|
|
95
|
+
type: PropType<(keyword: string, node: CascaderPanelNodeType) => boolean>;
|
|
96
|
+
};
|
|
97
|
+
remoteMethod: {
|
|
98
|
+
type: PropType<(keyword: string) => void>;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
export declare type cascaderPanelProps = ExtractPropTypes<typeof cascaderPanelProps>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { PropTypes } from "../../utils/type.js";
|
|
2
|
+
const cascaderPanelProps = {
|
|
3
|
+
prefixCls: PropTypes.string,
|
|
4
|
+
data: {
|
|
5
|
+
type: Array,
|
|
6
|
+
default: () => []
|
|
7
|
+
},
|
|
8
|
+
paddingLeft: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).def(16),
|
|
9
|
+
itemHeight: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
10
|
+
maxHeight: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
11
|
+
expanded: { type: Array, default: () => [] },
|
|
12
|
+
value: { type: Array, default: () => [] },
|
|
13
|
+
singleExpanded: PropTypes.bool.def(false),
|
|
14
|
+
theme: PropTypes.string.def("light"),
|
|
15
|
+
valueKey: PropTypes.string.def("id"),
|
|
16
|
+
labelKey: PropTypes.string.def("label"),
|
|
17
|
+
emptyText: PropTypes.string.def("\u6CA1\u6709\u6570\u636E"),
|
|
18
|
+
showCheckbox: PropTypes.bool.def(false),
|
|
19
|
+
checkOnClick: PropTypes.bool.def(false),
|
|
20
|
+
checkRelated: PropTypes.bool.def(true),
|
|
21
|
+
single: PropTypes.bool.def(false),
|
|
22
|
+
onlyLeaf: PropTypes.bool.def(false),
|
|
23
|
+
loadMethod: {
|
|
24
|
+
type: Function
|
|
25
|
+
},
|
|
26
|
+
filterMethod: {
|
|
27
|
+
type: Function
|
|
28
|
+
},
|
|
29
|
+
remoteMethod: {
|
|
30
|
+
type: Function
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
export { cascaderPanelProps };
|