@vaebe/ccui 2.0.1-beta.1 → 2.0.1-beta.3
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/README.md +1 -1
- package/affix/index.d.ts +10 -0
- package/affix/src/affix-types.d.ts +20 -0
- package/affix/src/affix.d.ts +20 -0
- package/alert/index.d.ts +10 -0
- package/alert/src/alert-types.d.ts +48 -0
- package/alert/src/alert.d.ts +36 -0
- package/anchor/index.d.ts +10 -0
- package/anchor/src/anchor-types.d.ts +37 -0
- package/anchor/src/anchor.d.ts +31 -0
- package/auto-complete/index.d.ts +10 -0
- package/auto-complete/index.es.js +1986 -0
- package/auto-complete/index.umd.js +1 -0
- package/auto-complete/src/auto-complete-types.d.ts +134 -0
- package/auto-complete/src/auto-complete.d.ts +94 -0
- package/auto-complete/style.css +2 -0
- package/avatar/index.d.ts +10 -0
- package/avatar/src/avatar-types.d.ts +53 -0
- package/avatar/src/avatar.d.ts +36 -0
- package/avatar/src/components/icon-body.d.ts +4 -0
- package/avatar/src/components/icon-img-error.d.ts +4 -0
- package/avatar/src/components/icon-nobody.d.ts +4 -0
- package/avatar/src/composables/use-get-background-color.d.ts +1 -0
- package/avatar/src/composables/use-get-display-name.d.ts +1 -0
- package/avatar-group/index.d.ts +12 -0
- package/avatar-group/index.es.js +119 -0
- package/avatar-group/index.umd.js +1 -0
- package/avatar-group/src/avatar-group-types.d.ts +56 -0
- package/avatar-group/src/avatar-group.d.ts +27 -0
- package/avatar-group/style.css +2 -0
- package/badge/index.d.ts +10 -0
- package/badge/src/badge-types.d.ts +52 -0
- package/badge/src/badge.d.ts +36 -0
- package/badge-ribbon/index.d.ts +12 -0
- package/badge-ribbon/index.es.js +84 -0
- package/badge-ribbon/index.umd.js +1 -0
- package/badge-ribbon/src/badge-ribbon-types.d.ts +30 -0
- package/badge-ribbon/src/badge-ribbon.d.ts +17 -0
- package/badge-ribbon/style.css +2 -0
- package/breadcrumb/index.d.ts +10 -0
- package/breadcrumb/src/breadcrumb-types.d.ts +29 -0
- package/breadcrumb/src/breadcrumb.d.ts +21 -0
- package/button/index.d.ts +12 -0
- package/button/src/button-group.d.ts +12 -0
- package/button/src/button-types.d.ts +168 -0
- package/button/src/button.d.ts +75 -0
- package/button-3d/index.d.ts +10 -0
- package/button-3d/src/button-3d-types.d.ts +27 -0
- package/button-3d/src/button-3d.d.ts +23 -0
- package/calendar/index.d.ts +10 -0
- package/calendar/src/calendar-types.d.ts +56 -0
- package/calendar/src/calendar.d.ts +27 -0
- package/card/index.d.ts +10 -0
- package/card/src/card-types.d.ts +34 -0
- package/card/src/card.d.ts +21 -0
- package/card-meta/index.d.ts +11 -0
- package/card-meta/index.es.js +53 -0
- package/card-meta/index.umd.js +1 -0
- package/card-meta/src/card-meta-types.d.ts +19 -0
- package/card-meta/src/card-meta.d.ts +14 -0
- package/card-meta/style.css +2 -0
- package/carousel/index.d.ts +10 -0
- package/carousel/index.es.js +306 -0
- package/carousel/index.umd.js +1 -0
- package/carousel/src/carousel-types.d.ts +72 -0
- package/carousel/src/carousel.d.ts +58 -0
- package/carousel/style.css +2 -0
- package/cascader/index.d.ts +12 -0
- package/cascader/index.es.js +2267 -0
- package/cascader/index.umd.js +1 -0
- package/cascader/src/cascader-types.d.ts +214 -0
- package/cascader/src/cascader.d.ts +133 -0
- package/cascader/style.css +2 -0
- package/check-box/index.d.ts +10 -0
- package/check-box/src/check-box-group.d.ts +31 -0
- package/check-box/src/check-box-types.d.ts +74 -0
- package/check-box/src/check-box.d.ts +28 -0
- package/check-box/src/components/icon-active.d.ts +2 -0
- package/check-box/src/components/icon-default.d.ts +2 -0
- package/checkable-tag/index.d.ts +13 -0
- package/checkable-tag/index.es.js +141 -0
- package/checkable-tag/index.umd.js +1 -0
- package/checkable-tag/src/checkable-tag-group.d.ts +26 -0
- package/checkable-tag/src/checkable-tag-types.d.ts +83 -0
- package/checkable-tag/src/checkable-tag.d.ts +20 -0
- package/checkable-tag/style.css +2 -0
- package/collapse/index.d.ts +11 -0
- package/collapse/src/collapse-item.d.ts +16 -0
- package/collapse/src/collapse-types.d.ts +52 -0
- package/collapse/src/collapse.d.ts +24 -0
- package/color-picker/index.d.ts +10 -0
- package/color-picker/index.es.js +1881 -0
- package/color-picker/index.umd.js +1 -0
- package/color-picker/src/color-picker-types.d.ts +121 -0
- package/color-picker/src/color-picker.d.ts +75 -0
- package/color-picker/style.css +2 -0
- package/config-provider/index.d.ts +10 -0
- package/config-provider/src/config-provider-types.d.ts +131 -0
- package/config-provider/src/config-provider.d.ts +24 -0
- package/date-picker/index.d.ts +10 -0
- package/date-picker/src/date-picker-types.d.ts +179 -0
- package/date-picker/src/date-picker.d.ts +113 -0
- package/descriptions/index.d.ts +11 -0
- package/descriptions/src/descriptions-item.d.ts +19 -0
- package/descriptions/src/descriptions-types.d.ts +64 -0
- package/descriptions/src/descriptions.d.ts +31 -0
- package/divider/index.d.ts +10 -0
- package/divider/src/divider-types.d.ts +31 -0
- package/divider/src/divider.d.ts +24 -0
- package/drawer/index.d.ts +10 -0
- package/drawer/src/drawer-types.d.ts +155 -0
- package/drawer/src/drawer.d.ts +79 -0
- package/dropdown/index.d.ts +10 -0
- package/dropdown/index.es.js +2 -2
- package/dropdown/index.umd.js +1 -1
- package/dropdown/src/dropdown-types.d.ts +41 -0
- package/dropdown/src/dropdown.d.ts +32 -0
- package/empty/index.d.ts +10 -0
- package/empty/src/empty-types.d.ts +16 -0
- package/empty/src/empty.d.ts +15 -0
- package/flex/index.d.ts +10 -0
- package/flex/src/flex-types.d.ts +36 -0
- package/flex/src/flex.d.ts +29 -0
- package/float-button/index.d.ts +11 -0
- package/float-button/src/back-top.d.ts +26 -0
- package/float-button/src/float-button-types.d.ts +65 -0
- package/float-button/src/float-button.d.ts +32 -0
- package/form/index.d.ts +14 -0
- package/form/src/form-item.d.ts +72 -0
- package/form/src/form-list.d.ts +12 -0
- package/form/src/form-provider.d.ts +7 -0
- package/form/src/form-types.d.ts +360 -0
- package/form/src/form.d.ts +64 -0
- package/form/src/utils.d.ts +10 -0
- package/grid/index.d.ts +10 -0
- package/grid/src/grid-types.d.ts +90 -0
- package/grid/src/grid.d.ts +58 -0
- package/icon/index.d.ts +12 -0
- package/icon/src/icon-registry.d.ts +5 -0
- package/icon/src/icon-types.d.ts +95 -0
- package/icon/src/icon.d.ts +63 -0
- package/image/index.d.ts +10 -0
- package/image/src/image-types.d.ts +56 -0
- package/image/src/image.d.ts +42 -0
- package/image-preview-group/index.d.ts +11 -0
- package/image-preview-group/index.es.js +162 -0
- package/image-preview-group/index.umd.js +1 -0
- package/image-preview-group/src/image-preview-group-types.d.ts +51 -0
- package/image-preview-group/src/image-preview-group.d.ts +25 -0
- package/image-preview-group/style.css +2 -0
- package/index.d.ts +93 -7
- package/input/index.d.ts +10 -0
- package/input/src/input-types.d.ts +164 -0
- package/input/src/input.d.ts +74 -0
- package/input-number/index.d.ts +10 -0
- package/input-number/src/input-number-types.d.ts +165 -0
- package/input-number/src/input-number.d.ts +66 -0
- package/input-otp/index.d.ts +11 -0
- package/input-otp/index.es.js +186 -0
- package/input-otp/index.umd.js +1 -0
- package/input-otp/src/input-otp-types.d.ts +68 -0
- package/input-otp/src/input-otp.d.ts +40 -0
- package/input-otp/style.css +2 -0
- package/input-search/index.d.ts +11 -0
- package/input-search/index.es.js +1228 -0
- package/input-search/index.umd.js +1 -0
- package/input-search/src/input-search-types.d.ts +106 -0
- package/input-search/src/input-search.d.ts +84 -0
- package/input-search/style.css +2 -0
- package/layout/index.d.ts +10 -0
- package/layout/src/layout-types.d.ts +70 -0
- package/layout/src/layout.d.ts +56 -0
- package/masonry/index.d.ts +10 -0
- package/masonry/src/masonry-types.d.ts +19 -0
- package/masonry/src/masonry.d.ts +16 -0
- package/mentions/index.d.ts +10 -0
- package/mentions/index.es.js +711 -0
- package/mentions/index.umd.js +1 -0
- package/mentions/src/mentions-types.d.ts +124 -0
- package/mentions/src/mentions.d.ts +79 -0
- package/mentions/style.css +2 -0
- package/menu/index.d.ts +10 -0
- package/menu/src/menu-types.d.ts +109 -0
- package/menu/src/menu.d.ts +63 -0
- package/message/index.d.ts +22 -0
- package/message/src/message-item.d.ts +46 -0
- package/message/src/message-types.d.ts +86 -0
- package/message/src/message.d.ts +21 -0
- package/message/src/use-message.d.ts +35 -0
- package/modal/index.d.ts +24 -0
- package/modal/src/confirm-types.d.ts +30 -0
- package/modal/src/confirm.d.ts +17 -0
- package/modal/src/modal-types.d.ts +175 -0
- package/modal/src/modal.d.ts +99 -0
- package/modal/src/use-modal.d.ts +34 -0
- package/notification/index.d.ts +21 -0
- package/notification/src/notification-item.d.ts +49 -0
- package/notification/src/notification-types.d.ts +91 -0
- package/notification/src/notification.d.ts +20 -0
- package/notification/src/use-notification.d.ts +34 -0
- package/package.json +611 -12
- package/pagination/index.d.ts +10 -0
- package/pagination/index.es.js +4 -2
- package/pagination/index.umd.js +1 -1
- package/pagination/src/pagination-types.d.ts +49 -0
- package/pagination/src/pagination.d.ts +43 -0
- package/popconfirm/index.d.ts +10 -0
- package/popconfirm/src/popconfirm-types.d.ts +82 -0
- package/popconfirm/src/popconfirm.d.ts +55 -0
- package/popover/index.d.ts +10 -0
- package/popover/src/popover-types.d.ts +235 -0
- package/popover/src/popover.d.ts +130 -0
- package/progress/index.d.ts +10 -0
- package/progress/src/progress-types.d.ts +48 -0
- package/progress/src/progress.d.ts +37 -0
- package/radio/index.d.ts +11 -0
- package/radio/src/components/icon-active.d.ts +2 -0
- package/radio/src/components/icon-circle.d.ts +2 -0
- package/radio/src/radio-group.d.ts +21 -0
- package/radio/src/radio-types.d.ts +55 -0
- package/radio/src/radio.d.ts +24 -0
- package/range-picker/index.d.ts +10 -0
- package/range-picker/index.es.js +2415 -0
- package/range-picker/index.umd.js +1 -0
- package/range-picker/src/range-picker-types.d.ts +169 -0
- package/range-picker/src/range-picker.d.ts +112 -0
- package/range-picker/style.css +2 -0
- package/rate/index.d.ts +10 -0
- package/rate/src/components/icon-default.d.ts +2 -0
- package/rate/src/rate-types.d.ts +34 -0
- package/rate/src/rate.d.ts +30 -0
- package/result/index.d.ts +10 -0
- package/result/src/result-types.d.ts +21 -0
- package/result/src/result.d.ts +18 -0
- package/segmented/index.d.ts +10 -0
- package/segmented/src/segmented-types.d.ts +32 -0
- package/segmented/src/segmented.d.ts +25 -0
- package/select/index.d.ts +10 -0
- package/select/src/composables/use-select.d.ts +29 -0
- package/select/src/select-types.d.ts +215 -0
- package/select/src/select.d.ts +149 -0
- package/skeleton/index.d.ts +10 -0
- package/skeleton/src/skeleton-types.d.ts +39 -0
- package/skeleton/src/skeleton.d.ts +27 -0
- package/skeleton-node/index.d.ts +11 -0
- package/skeleton-node/index.es.js +71 -0
- package/skeleton-node/index.umd.js +1 -0
- package/skeleton-node/src/skeleton-node-types.d.ts +23 -0
- package/skeleton-node/src/skeleton-node.d.ts +17 -0
- package/skeleton-node/style.css +2 -0
- package/slider/index.d.ts +10 -0
- package/slider/index.es.js +3 -3
- package/slider/index.umd.js +1 -1
- package/slider/src/composables/use-slider-tooltip.d.ts +18 -0
- package/slider/src/composables/use-slider.d.ts +68 -0
- package/slider/src/slider-types.d.ts +112 -0
- package/slider/src/slider.d.ts +149 -0
- package/space/index.d.ts +10 -0
- package/space/src/space-types.d.ts +28 -0
- package/space/src/space.d.ts +21 -0
- package/space-compact/index.d.ts +11 -0
- package/space-compact/index.es.js +59 -0
- package/space-compact/index.umd.js +1 -0
- package/space-compact/src/space-compact-types.d.ts +27 -0
- package/space-compact/src/space-compact.d.ts +15 -0
- package/space-compact/style.css +2 -0
- package/spin/index.d.ts +10 -0
- package/spin/src/spin-types.d.ts +29 -0
- package/spin/src/spin.d.ts +24 -0
- package/splitter/index.d.ts +10 -0
- package/splitter/src/splitter-types.d.ts +70 -0
- package/splitter/src/splitter.d.ts +62 -0
- package/status/index.d.ts +10 -0
- package/status/src/status-types.d.ts +10 -0
- package/status/src/status.d.ts +9 -0
- package/steps/index.d.ts +10 -0
- package/steps/src/steps-types.d.ts +48 -0
- package/steps/src/steps.d.ts +34 -0
- package/style.css +2 -0
- package/switch/index.d.ts +10 -0
- package/switch/src/switch-types.d.ts +45 -0
- package/switch/src/switch.d.ts +37 -0
- package/table/index.d.ts +11 -0
- package/table/src/table-types.d.ts +172 -0
- package/table/src/table.d.ts +67 -0
- package/table-column/index.d.ts +11 -0
- package/table-column/index.es.js +155 -0
- package/table-column/index.umd.js +1 -0
- package/table-column/src/table-column-types.d.ts +75 -0
- package/table-column/src/table-column.d.ts +63 -0
- package/table-column-group/index.d.ts +11 -0
- package/table-column-group/index.es.js +80 -0
- package/table-column-group/index.umd.js +1 -0
- package/table-column-group/src/table-column-group-types.d.ts +36 -0
- package/table-column-group/src/table-column-group.d.ts +20 -0
- package/table-summary/index.d.ts +11 -0
- package/table-summary/index.es.js +30 -0
- package/table-summary/index.umd.js +1 -0
- package/table-summary/src/table-summary-types.d.ts +29 -0
- package/table-summary/src/table-summary.d.ts +8 -0
- package/tabs/index.d.ts +11 -0
- package/tabs/src/components/tab/tab-types.d.ts +18 -0
- package/tabs/src/components/tab/tab.d.ts +15 -0
- package/tabs/src/components/tabs-nav/index.d.ts +26 -0
- package/tabs/src/tabs-types.d.ts +49 -0
- package/tabs/src/tabs.d.ts +27 -0
- package/tag/index.d.ts +10 -0
- package/tag/src/tag-types.d.ts +41 -0
- package/tag/src/tag.d.ts +24 -0
- package/textarea/index.d.ts +11 -0
- package/textarea/index.es.js +1241 -0
- package/textarea/index.umd.js +1 -0
- package/textarea/src/textarea-types.d.ts +150 -0
- package/textarea/src/textarea.d.ts +63 -0
- package/textarea/style.css +2 -0
- package/time-picker/index.d.ts +10 -0
- package/time-picker/index.es.js +2325 -0
- package/time-picker/index.umd.js +1 -0
- package/time-picker/src/time-picker-types.d.ts +168 -0
- package/time-picker/src/time-picker.d.ts +127 -0
- package/time-picker/style.css +2 -0
- package/time-range-picker/index.d.ts +10 -0
- package/time-range-picker/index.es.js +2568 -0
- package/time-range-picker/index.umd.js +1 -0
- package/time-range-picker/src/time-range-picker-types.d.ts +147 -0
- package/time-range-picker/src/time-range-picker.d.ts +124 -0
- package/time-range-picker/style.css +2 -0
- package/timeline/index.d.ts +11 -0
- package/timeline/src/timeline-item.d.ts +31 -0
- package/timeline/src/timeline-types.d.ts +72 -0
- package/timeline/src/timeline.d.ts +3 -0
- package/tooltip/index.d.ts +10 -0
- package/tooltip/src/tooltip-types.d.ts +201 -0
- package/tooltip/src/tooltip.d.ts +87 -0
- package/transfer/index.d.ts +10 -0
- package/transfer/index.es.js +1407 -0
- package/transfer/index.umd.js +1 -0
- package/transfer/src/transfer-types.d.ts +76 -0
- package/transfer/src/transfer.d.ts +59 -0
- package/transfer/style.css +2 -0
- package/tree/index.d.ts +10 -0
- package/tree/src/composables/use-tree-check.d.ts +9 -0
- package/tree/src/composables/use-tree-flatten.d.ts +11 -0
- package/tree/src/composables/use-tree-state.d.ts +17 -0
- package/tree/src/tree-types.d.ts +202 -0
- package/tree/src/tree.d.ts +122 -0
- package/tree-select/index.d.ts +12 -0
- package/tree-select/index.es.js +3009 -0
- package/tree-select/index.umd.js +1 -0
- package/tree-select/src/tree-select-types.d.ts +188 -0
- package/tree-select/src/tree-select.d.ts +128 -0
- package/tree-select/style.css +2 -0
- package/typography/index.d.ts +10 -0
- package/typography/src/typography-types.d.ts +316 -0
- package/typography/src/typography.d.ts +33 -0
- package/upload/index.d.ts +10 -0
- package/upload/index.es.js +1450 -0
- package/upload/index.umd.js +1 -0
- package/upload/src/upload-types.d.ts +99 -0
- package/upload/src/upload.d.ts +66 -0
- package/upload/style.css +2 -0
- package/upload-dragger/index.d.ts +10 -0
- package/upload-dragger/index.es.js +1472 -0
- package/upload-dragger/index.umd.js +1 -0
- package/upload-dragger/src/upload-dragger.d.ts +167 -0
- package/upload-dragger/style.css +2 -0
- package/util/index.d.ts +12 -0
- package/util/src/dom.d.ts +8 -0
- package/util/src/func.d.ts +7 -0
- package/util/src/type.d.ts +3 -0
- package/vue-ccui.es.js +11 -9
- package/vue-ccui.umd.js +1 -1
- package/watermark/index.d.ts +10 -0
- package/watermark/src/watermark-types.d.ts +47 -0
- package/watermark/src/watermark.d.ts +34 -0
- package/ccui-cli.css +0 -2
- package/nuxt/components/category.js +0 -2
- package/nuxt/components/install.js +0 -2
- package/nuxt/components/status.js +0 -2
- package/nuxt/components/title.js +0 -2
- package/nuxt/index.js +0 -13
- /package/affix/{ccui-cli.css → style.css} +0 -0
- /package/alert/{ccui-cli.css → style.css} +0 -0
- /package/anchor/{ccui-cli.css → style.css} +0 -0
- /package/avatar/{ccui-cli.css → style.css} +0 -0
- /package/badge/{ccui-cli.css → style.css} +0 -0
- /package/breadcrumb/{ccui-cli.css → style.css} +0 -0
- /package/button/{ccui-cli.css → style.css} +0 -0
- /package/button-3d/{ccui-cli.css → style.css} +0 -0
- /package/calendar/{ccui-cli.css → style.css} +0 -0
- /package/card/{ccui-cli.css → style.css} +0 -0
- /package/check-box/{ccui-cli.css → style.css} +0 -0
- /package/collapse/{ccui-cli.css → style.css} +0 -0
- /package/date-picker/{ccui-cli.css → style.css} +0 -0
- /package/descriptions/{ccui-cli.css → style.css} +0 -0
- /package/divider/{ccui-cli.css → style.css} +0 -0
- /package/drawer/{ccui-cli.css → style.css} +0 -0
- /package/dropdown/{ccui-cli.css → style.css} +0 -0
- /package/empty/{ccui-cli.css → style.css} +0 -0
- /package/flex/{ccui-cli.css → style.css} +0 -0
- /package/float-button/{ccui-cli.css → style.css} +0 -0
- /package/form/{ccui-cli.css → style.css} +0 -0
- /package/grid/{ccui-cli.css → style.css} +0 -0
- /package/icon/{ccui-cli.css → style.css} +0 -0
- /package/image/{ccui-cli.css → style.css} +0 -0
- /package/input/{ccui-cli.css → style.css} +0 -0
- /package/input-number/{ccui-cli.css → style.css} +0 -0
- /package/layout/{ccui-cli.css → style.css} +0 -0
- /package/masonry/{ccui-cli.css → style.css} +0 -0
- /package/menu/{ccui-cli.css → style.css} +0 -0
- /package/message/{ccui-cli.css → style.css} +0 -0
- /package/modal/{ccui-cli.css → style.css} +0 -0
- /package/notification/{ccui-cli.css → style.css} +0 -0
- /package/pagination/{ccui-cli.css → style.css} +0 -0
- /package/popconfirm/{ccui-cli.css → style.css} +0 -0
- /package/popover/{ccui-cli.css → style.css} +0 -0
- /package/progress/{ccui-cli.css → style.css} +0 -0
- /package/radio/{ccui-cli.css → style.css} +0 -0
- /package/rate/{ccui-cli.css → style.css} +0 -0
- /package/result/{ccui-cli.css → style.css} +0 -0
- /package/segmented/{ccui-cli.css → style.css} +0 -0
- /package/select/{ccui-cli.css → style.css} +0 -0
- /package/skeleton/{ccui-cli.css → style.css} +0 -0
- /package/slider/{ccui-cli.css → style.css} +0 -0
- /package/space/{ccui-cli.css → style.css} +0 -0
- /package/spin/{ccui-cli.css → style.css} +0 -0
- /package/splitter/{ccui-cli.css → style.css} +0 -0
- /package/status/{ccui-cli.css → style.css} +0 -0
- /package/steps/{ccui-cli.css → style.css} +0 -0
- /package/switch/{ccui-cli.css → style.css} +0 -0
- /package/table/{ccui-cli.css → style.css} +0 -0
- /package/tabs/{ccui-cli.css → style.css} +0 -0
- /package/tag/{ccui-cli.css → style.css} +0 -0
- /package/timeline/{ccui-cli.css → style.css} +0 -0
- /package/tooltip/{ccui-cli.css → style.css} +0 -0
- /package/tree/{ccui-cli.css → style.css} +0 -0
- /package/typography/{ccui-cli.css → style.css} +0 -0
- /package/watermark/{ccui-cli.css → style.css} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`vue`)):typeof define==`function`&&define.amd?define([`exports`,`vue`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.index={},e.Vue))})(this,function(e,t){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var n=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports);function r(e,t,n){let r=e;return t&&(r+=`__${t}`),n&&(r+=`--${n}`),r}function i(e,t=!1){let n=t?`.ccui-${e}`:`ccui-${e}`;return{b:()=>r(n),e:e=>e?r(n,e):``,m:e=>e?r(n,``,e):``,em:(e,t)=>e&&t?r(n,e,t):``,is:e=>`is-${e}`}}n(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){"use strict";var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),a=n-i<0,o=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:c,d:s,D:f,h:o,m:a,s:i,ms:r,Q:u}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},y=`en`,b={};b[y]=g;var x=`$isDayjsObject`,S=function(e){return e instanceof E||!(!e||!e[x])},C=function e(t,n,r){var i;if(!t)return y;if(typeof t==`string`){var a=t.toLowerCase();b[a]&&(i=a),n&&(b[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e)<this.startOf(t)},_.isBefore=function(e,t){return this.endOf(t)<w(e)},_.$g=function(e,t,n){return T.u(e)?this[t]:this.set(n,e)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(e,t){var n=this,r=!!T.u(t)||t,u=T.p(e),p=function(e,t){var i=T.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},m=function(e,t){return T.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},h=this.$W,g=this.$M,_=this.$D,v=`set`+(this.$u?`UTC`:``);switch(u){case d:return r?p(1,0):p(31,11);case l:return r?p(1,g):p(0,g+1);case c:var y=this.$locale().weekStart||0,b=(h<y?h+7:h)-y;return p(r?_-b:_+(6-b),g);case s:case f:return m(v+`Hours`,0);case o:return m(v+`Minutes`,1);case a:return m(v+`Seconds`,2);case i:return m(v+`Milliseconds`,3);default:return this.clone()}},_.endOf=function(e){return this.startOf(e,!1)},_.$set=function(e,t){var n,c=T.p(e),u=`set`+(this.$u?`UTC`:``),p=(n={},n[s]=u+`Date`,n[f]=u+`Date`,n[l]=u+`Month`,n[d]=u+`FullYear`,n[o]=u+`Hours`,n[a]=u+`Minutes`,n[i]=u+`Seconds`,n[r]=u+`Milliseconds`,n)[c],m=c===s?this.$D+(t-this.$W):t;if(c===l||c===d){var h=this.clone().set(f,1);h.$d[p](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},_.set=function(e,t){return this.clone().$set(e,t)},_.get=function(e){return this[T.p(e)]()},_.add=function(r,u){var f,p=this;r=Number(r);var m=T.p(u),h=function(e){var t=w(p);return T.w(t.date(t.date()+Math.round(e*r)),p)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return h(1);if(m===c)return h(7);var g=(f={},f[a]=t,f[o]=n,f[i]=e,f)[m]||1,_=this.$d.getTime()+r*g;return T.w(_,this)},_.subtract=function(e,t){return this.add(-1*e,t)},_.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||`YYYY-MM-DDTHH:mm:ssZ`,i=T.z(this),a=this.$H,o=this.$m,s=this.$M,c=n.weekdays,l=n.months,u=n.meridiem,d=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},f=function(e){return T.s(a%12||12,e,`0`)},m=u||function(e,t,n){var r=e<12?`AM`:`PM`;return n?r.toLowerCase():r};return r.replace(h,(function(e,r){return r||function(e){switch(e){case`YY`:return String(t.$y).slice(-2);case`YYYY`:return T.s(t.$y,4,`0`);case`M`:return s+1;case`MM`:return T.s(s+1,2,`0`);case`MMM`:return d(n.monthsShort,s,l,3);case`MMMM`:return d(l,s);case`D`:return t.$D;case`DD`:return T.s(t.$D,2,`0`);case`d`:return String(t.$W);case`dd`:return d(n.weekdaysMin,t.$W,c,2);case`ddd`:return d(n.weekdaysShort,t.$W,c,3);case`dddd`:return c[t.$W];case`H`:return String(a);case`HH`:return T.s(a,2,`0`);case`h`:return f(1);case`hh`:return f(2);case`a`:return m(a,o,!0);case`A`:return m(a,o,!1);case`m`:return String(o);case`mm`:return T.s(o,2,`0`);case`s`:return String(t.$s);case`ss`:return T.s(t.$s,2,`0`);case`SSS`:return T.s(t.$ms,3,`0`);case`Z`:return i}return null}(e)||i.replace(`:`,``)}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(r,f,p){var m,h=this,g=T.p(f),_=w(r),v=(_.utcOffset()-this.utcOffset())*t,y=this-_,b=function(){return T.m(h,_)};switch(g){case d:m=b()/12;break;case l:m=b();break;case u:m=b()/3;break;case c:m=(y-v)/6048e5;break;case s:m=(y-v)/864e5;break;case o:m=y/n;break;case a:m=y/t;break;case i:m=y/e;break;default:m=y}return p?m:T.a(m)},_.daysInMonth=function(){return this.endOf(l).$D},_.$locale=function(){return b[this.$L]},_.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=C(e,t,!0);return r&&(n.$L=r),n},_.clone=function(){return T.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},g}(),D=E.prototype;return w.prototype=D,[[`$ms`,r],[`$s`,i],[`$m`,a],[`$H`,o],[`$W`,s],[`$M`,l],[`$y`,d],[`$D`,f]].forEach((function(e){D[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),w.extend=function(e,t){return e.$i||=(e(t,E,w),!0),w},w.locale=C,w.isDayjs=S,w.unix=function(e){return w(1e3*e)},w.en=b[y],w.Ls=b,w.p={},w}))}))();var a={locale:`zh-CN`,Modal:{okText:`确 定`,cancelText:`取 消`,justOkText:`知道了`},Popconfirm:{okText:`确 定`,cancelText:`取 消`},Empty:{description:`暂无数据`},AutoComplete:{notFoundContent:`暂无数据`},Mentions:{notFoundContent:`暂无数据`},Cascader:{notFoundContent:`暂无数据`},TreeSelect:{notFoundContent:`暂无数据`,searchPlaceholder:`搜索`},Select:{notFoundContent:`暂无数据`},Pagination:{itemsPerPage:`条/页`,jumpTo:`跳至`,page:`页`,prevPage:`上一页`,nextPage:`下一页`,total:`共 {total} 条`,pagination:`分页`},Image:{loading:`加载中`,error:`加载失败`},DatePicker:{placeholder:`请选择日期`,rangePlaceholder:[`开始日期`,`结束日期`],timePlaceholder:`请选择时间`,weekdaysShort:[`日`,`一`,`二`,`三`,`四`,`五`,`六`],panelLabelFormat:`YYYY 年 M 月`,monthNamesShort:[`1 月`,`2 月`,`3 月`,`4 月`,`5 月`,`6 月`,`7 月`,`8 月`,`9 月`,`10 月`,`11 月`,`12 月`],quarterNames:[`一季度`,`二季度`,`三季度`,`四季度`],weekFormat:`{weekYear} 年第 {weekNumber} 周`,weekHeader:`周`,now:`此刻`,ok:`确定`,prevYearLabel:`前一年`,prevMonthLabel:`上个月`,nextYearLabel:`后一年`,nextMonthLabel:`下个月`,clearLabel:`清除`},Calendar:{weekdaysShort:[`日`,`一`,`二`,`三`,`四`,`五`,`六`],prevMonthLabel:`上个月`,nextMonthLabel:`下个月`,todayLabel:`今天`,monthFormat:`YYYY 年 M 月`}},o=Symbol(`ccui-config`);function s(){return(0,t.inject)(o,{prefixCls:`ccui`,componentSize:`middle`,locale:a,direction:`ltr`,theme:void 0,iconPrefixCls:`ccui-icon`})}var c=Symbol(`ccuiFormItem`),l={modelValue:{type:String,default:void 0},defaultValue:{type:String,default:``},options:{type:Array,default:()=>[]},prefix:{type:[String,Array],default:`@`},split:{type:String,default:` `},placeholder:{type:String,default:``},disabled:{type:Boolean,default:!1},rows:{type:Number,default:3},filterOption:{type:[Boolean,Function],default:!0},caseSensitive:{type:Boolean,default:!1},notFoundContent:{type:String,default:``},placement:{type:String,default:`bottom`},popupMaxHeight:{type:Number,default:256},autoSize:{type:[Boolean,Object],default:!1},searchDebounce:{type:Number,default:0},variant:{type:String,default:`outlined`},status:{type:String,default:``},classNames:{type:Object,default:void 0},styles:{type:Object,default:void 0}};function u(e){return typeof e==`string`?{value:e,label:e,disabled:!1,raw:{value:e,label:e}}:{value:e.value,label:e.label===void 0?e.value:String(e.label),disabled:!!e.disabled,raw:e}}function d(e,t,n){let r=e.slice(0,t),i=null;for(let e of n){let t=r.lastIndexOf(e);if(t===-1)continue;let n=r[t-1];if(t>0&&n!==void 0&&!/\s/.test(n))continue;let a=r.slice(t+e.length);if(/\s/.test(a))continue;let o={prefix:e,search:a,start:t};(!i||o.start>i.start)&&(i=o)}return i}var f=(0,t.defineComponent)({name:`CMentions`,props:l,emits:[`update:modelValue`,`change`,`select`,`search`,`focus`,`blur`],setup(e,{emit:n,slots:r}){let a=i(`mentions`),o=s(),l=(0,t.getCurrentInstance)()?.uid??0,f=`ccui-mentions-popup-${l}`,p=e=>`ccui-mentions-option-${l}-${e}`,m=(0,t.computed)(()=>e.notFoundContent||o.locale?.Mentions?.notFoundContent||`暂无数据`),h=(0,t.ref)(null),g=(0,t.ref)(null),_=(0,t.shallowRef)(!1),v=(0,t.shallowRef)(e.defaultValue??``),y=(0,t.shallowRef)(0),b=(0,t.shallowRef)(null),x=(0,t.inject)(c,null),S=(0,t.computed)(()=>x?.validateStatus.value??``),C=(0,t.computed)(()=>e.status||S.value),w=(0,t.computed)(()=>e.modelValue!==void 0),T=(0,t.computed)(()=>(w.value?e.modelValue:v.value)??``),E=(0,t.computed)(()=>{let t=e.prefix;return Array.isArray(t)?t:[t]}),D=(0,t.computed)(()=>(e.options||[]).map(e=>u(e))),O=(0,t.computed)(()=>{let t=e.filterOption;if(t===!1)return D.value;let n=b.value?.search??``;if(!n)return D.value;if(typeof t==`function`)return D.value.filter(e=>t(n,e.raw));let r=e.caseSensitive?n:n.toLowerCase();return D.value.filter(t=>(e.caseSensitive?t.label:t.label.toLowerCase()).includes(r))}),k=null;function A(e){w.value||(v.value=e),n(`update:modelValue`,e),n(`change`,e),x?.validate(`change`)}function j(){let t=g.value;if(!t||!e.autoSize)return;t.style.height=`auto`;let n=Number.parseInt(getComputedStyle(t).lineHeight)||20,r=typeof e.autoSize==`object`?e.autoSize:{},i=r.minRows?r.minRows*n:0,a=r.maxRows?r.maxRows*n:1/0,o=t.scrollHeight;t.style.height=`${Math.min(Math.max(o,i),a)}px`,a<1/0&&(t.style.overflowY=o>a?`auto`:`hidden`)}function M(){let t=g.value;if(!t)return;let r=t.selectionStart,i=d(T.value,r,E.value);b.value=i,i?(_.value||(_.value=!0,y.value=0),e.searchDebounce>0?(k&&clearTimeout(k),k=setTimeout(()=>n(`search`,i.search,i.prefix),e.searchDebounce)):n(`search`,i.search,i.prefix)):_.value&&=!1}function N(e){let n=e.target.value;A(n),(0,t.nextTick)(()=>{M(),j()})}function P(){M()}function F(){M()}function I(r){let i=g.value,a=b.value;if(!i||!a||r.disabled)return;let o=T.value.slice(0,a.start),s=T.value.slice(i.selectionStart),c=`${a.prefix}${r.value}${e.split}`;A(`${o}${c}${s}`),n(`select`,r.raw,a.prefix),_.value=!1,b.value=null;let l=o.length+c.length;(0,t.nextTick)(()=>{g.value&&(g.value.focus(),g.value.setSelectionRange(l,l))})}function L(t){if(e.disabled||!_.value)return;let n=O.value,r=n.filter(e=>!e.disabled);if(!(r.length===0&&(t.key===`ArrowUp`||t.key===`ArrowDown`||t.key===`Enter`)))if(t.key===`ArrowDown`){t.preventDefault();let e=r[(r.findIndex(e=>e===n[y.value])+1)%r.length];y.value=n.indexOf(e)}else if(t.key===`ArrowUp`){t.preventDefault();let e=r.findIndex(e=>e===n[y.value]),i=e<=0?r[r.length-1]:r[e-1];y.value=n.indexOf(i)}else t.key===`Enter`||t.key===`Tab`?n[y.value]&&(t.preventDefault(),I(n[y.value])):t.key===`Escape`&&(t.preventDefault(),_.value=!1,b.value=null)}function R(e){n(`focus`,e)}function z(e){n(`blur`,e),x?.validate(`blur`)}function B(e){if(!_.value)return;let t=e.target;t&&(h.value?.contains(t)||(_.value=!1))}(0,t.onMounted)(()=>{document.addEventListener(`mousedown`,B,!0),j()}),(0,t.onUnmounted)(()=>{document.removeEventListener(`mousedown`,B,!0),k&&=(clearTimeout(k),null)});function V(e,n){let i=[a.e(`option`),n===y.value?a.is(`active`):``,e.disabled?a.is(`disabled`):``];return(0,t.createVNode)(`li`,{key:`${e.value}-${n}`,id:p(n),class:i,role:`option`,"aria-selected":n===y.value,"aria-disabled":e.disabled,onMousedown:t=>{t.preventDefault(),I(e)},onMouseenter:()=>{e.disabled||(y.value=n)}},[r.option?r.option({option:e.raw,index:n}):e.label])}function H(){if(!_.value)return null;let n=O.value,r={maxHeight:`${e.popupMaxHeight}px`};return e.placement===`top`?(r.bottom=`100%`,r.marginBottom=`4px`):(r.top=`100%`,r.marginTop=`4px`),(0,t.createVNode)(`div`,{id:f,class:[a.e(`panel`),e.classNames?.popup],style:[r,e.styles?.popup],role:`listbox`},[n.length===0?(0,t.createVNode)(`div`,{class:a.e(`empty`)},[m.value]):(0,t.createVNode)(`ul`,{class:a.e(`options`)},[n.map((e,t)=>V(e,t))])])}return()=>(0,t.createVNode)(`div`,{ref:h,class:[a.b(),e.disabled?a.is(`disabled`):``,e.variant?a.m(`variant-${e.variant}`):``,C.value?a.m(`status-${C.value}`):``,e.classNames?.root],style:e.styles?.root},[(0,t.createVNode)(`textarea`,{ref:g,class:[a.e(`textarea`),e.classNames?.textarea],style:e.styles?.textarea,value:T.value,rows:e.rows,placeholder:e.placeholder,disabled:e.disabled,spellcheck:!1,role:`combobox`,"aria-autocomplete":`list`,"aria-haspopup":`listbox`,"aria-expanded":_.value,"aria-controls":f,"aria-activedescendant":_.value&&O.value[y.value]?p(y.value):void 0,onInput:N,onKeyup:P,onKeydown:L,onClick:F,onFocus:R,onBlur:z},null),H()])}});f.install=function(e){e.component(f.name,f)},e.Mentions=f,e.default={title:`Mentions 提及`,category:`数据录入`,status:`80%`,install(e){e.component(f.name,f)}}});
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import type { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
import type { CcSemanticClasses, CcSemanticStyles } from '../../shared/hooks/use-semantic';
|
|
3
|
+
export type MentionsPlacement = 'top' | 'bottom';
|
|
4
|
+
export interface MentionOption {
|
|
5
|
+
value: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
[extra: string]: unknown;
|
|
9
|
+
}
|
|
10
|
+
export type MentionsSourceItem = string | MentionOption;
|
|
11
|
+
export type FilterOption = boolean | ((input: string, option: MentionOption) => boolean);
|
|
12
|
+
export type MentionsVariant = 'outlined' | 'filled' | 'borderless' | 'underlined';
|
|
13
|
+
/**
|
|
14
|
+
* 校验状态。Form 联动会自动透传。
|
|
15
|
+
*/
|
|
16
|
+
export type MentionsStatus = '' | 'error' | 'warning';
|
|
17
|
+
export declare const mentionsProps: {
|
|
18
|
+
readonly modelValue: {
|
|
19
|
+
readonly type: PropType<string | null>;
|
|
20
|
+
readonly default: undefined;
|
|
21
|
+
};
|
|
22
|
+
readonly defaultValue: {
|
|
23
|
+
readonly type: StringConstructor;
|
|
24
|
+
readonly default: "";
|
|
25
|
+
};
|
|
26
|
+
readonly options: {
|
|
27
|
+
readonly type: PropType<MentionsSourceItem[]>;
|
|
28
|
+
readonly default: () => never[];
|
|
29
|
+
};
|
|
30
|
+
readonly prefix: {
|
|
31
|
+
readonly type: PropType<string | string[]>;
|
|
32
|
+
readonly default: "@";
|
|
33
|
+
};
|
|
34
|
+
readonly split: {
|
|
35
|
+
readonly type: StringConstructor;
|
|
36
|
+
readonly default: " ";
|
|
37
|
+
};
|
|
38
|
+
readonly placeholder: {
|
|
39
|
+
readonly type: StringConstructor;
|
|
40
|
+
readonly default: "";
|
|
41
|
+
};
|
|
42
|
+
readonly disabled: {
|
|
43
|
+
readonly type: BooleanConstructor;
|
|
44
|
+
readonly default: false;
|
|
45
|
+
};
|
|
46
|
+
readonly rows: {
|
|
47
|
+
readonly type: NumberConstructor;
|
|
48
|
+
readonly default: 3;
|
|
49
|
+
};
|
|
50
|
+
readonly filterOption: {
|
|
51
|
+
readonly type: PropType<FilterOption>;
|
|
52
|
+
readonly default: true;
|
|
53
|
+
};
|
|
54
|
+
readonly caseSensitive: {
|
|
55
|
+
readonly type: BooleanConstructor;
|
|
56
|
+
readonly default: false;
|
|
57
|
+
};
|
|
58
|
+
readonly notFoundContent: {
|
|
59
|
+
readonly type: StringConstructor;
|
|
60
|
+
readonly default: "";
|
|
61
|
+
};
|
|
62
|
+
readonly placement: {
|
|
63
|
+
readonly type: PropType<MentionsPlacement>;
|
|
64
|
+
readonly default: "bottom";
|
|
65
|
+
};
|
|
66
|
+
readonly popupMaxHeight: {
|
|
67
|
+
readonly type: NumberConstructor;
|
|
68
|
+
readonly default: 256;
|
|
69
|
+
};
|
|
70
|
+
readonly autoSize: {
|
|
71
|
+
readonly type: PropType<boolean | {
|
|
72
|
+
minRows?: number;
|
|
73
|
+
maxRows?: number;
|
|
74
|
+
}>;
|
|
75
|
+
readonly default: false;
|
|
76
|
+
};
|
|
77
|
+
readonly searchDebounce: {
|
|
78
|
+
readonly type: NumberConstructor;
|
|
79
|
+
readonly default: 0;
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* 录入组件统一 variant 形态。
|
|
83
|
+
* `'outlined' | 'filled' | 'borderless' | 'underlined'`,默认 `'outlined'`。
|
|
84
|
+
*/
|
|
85
|
+
readonly variant: {
|
|
86
|
+
readonly type: PropType<MentionsVariant>;
|
|
87
|
+
readonly default: "outlined";
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* 校验状态。`'error' | 'warning'`,Form 联动会自动透传。
|
|
91
|
+
*/
|
|
92
|
+
readonly status: {
|
|
93
|
+
readonly type: PropType<MentionsStatus>;
|
|
94
|
+
readonly default: "";
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* 语义化 DOM className 注入。可用 key:`root` / `textarea` / `popup`。
|
|
98
|
+
*/
|
|
99
|
+
readonly classNames: {
|
|
100
|
+
readonly type: PropType<CcSemanticClasses>;
|
|
101
|
+
readonly default: undefined;
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* 语义化 DOM style 注入。可用 key 与 classNames 一致。
|
|
105
|
+
*/
|
|
106
|
+
readonly styles: {
|
|
107
|
+
readonly type: PropType<CcSemanticStyles>;
|
|
108
|
+
readonly default: undefined;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
export type MentionsProps = ExtractPropTypes<typeof mentionsProps>;
|
|
112
|
+
export interface NormalizedOption {
|
|
113
|
+
value: string;
|
|
114
|
+
label: string;
|
|
115
|
+
disabled: boolean;
|
|
116
|
+
raw: MentionOption;
|
|
117
|
+
}
|
|
118
|
+
export declare function normalizeMention(item: MentionsSourceItem): NormalizedOption;
|
|
119
|
+
export interface MentionMatch {
|
|
120
|
+
prefix: string;
|
|
121
|
+
search: string;
|
|
122
|
+
start: number;
|
|
123
|
+
}
|
|
124
|
+
export declare function findActiveMention(text: string, cursorPos: number, prefixes: string[]): MentionMatch | null;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
readonly split: string;
|
|
4
|
+
readonly disabled: boolean;
|
|
5
|
+
readonly defaultValue: string;
|
|
6
|
+
readonly options: import("./mentions-types").MentionsSourceItem[];
|
|
7
|
+
readonly placeholder: string;
|
|
8
|
+
readonly status: import("./mentions-types").MentionsStatus;
|
|
9
|
+
readonly filterOption: import("./mentions-types").FilterOption;
|
|
10
|
+
readonly caseSensitive: boolean;
|
|
11
|
+
readonly notFoundContent: string;
|
|
12
|
+
readonly placement: import("./mentions-types").MentionsPlacement;
|
|
13
|
+
readonly popupMaxHeight: number;
|
|
14
|
+
readonly searchDebounce: number;
|
|
15
|
+
readonly variant: import("./mentions-types").MentionsVariant;
|
|
16
|
+
readonly prefix: string | string[];
|
|
17
|
+
readonly rows: number;
|
|
18
|
+
readonly autoSize: boolean | {
|
|
19
|
+
minRows?: number;
|
|
20
|
+
maxRows?: number;
|
|
21
|
+
};
|
|
22
|
+
readonly classNames?: import("../../shared/hooks/use-semantic").CcSemanticClasses | undefined;
|
|
23
|
+
readonly styles?: import("../../shared/hooks/use-semantic").CcSemanticStyles | undefined;
|
|
24
|
+
readonly modelValue?: string | null | undefined;
|
|
25
|
+
}, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("search" | "select" | "change" | "blur" | "focus" | "update:modelValue")[], "search" | "select" | "change" | "blur" | "focus" | "update:modelValue", import("vue").PublicProps, Readonly<{
|
|
26
|
+
readonly split: string;
|
|
27
|
+
readonly disabled: boolean;
|
|
28
|
+
readonly defaultValue: string;
|
|
29
|
+
readonly options: import("./mentions-types").MentionsSourceItem[];
|
|
30
|
+
readonly placeholder: string;
|
|
31
|
+
readonly status: import("./mentions-types").MentionsStatus;
|
|
32
|
+
readonly filterOption: import("./mentions-types").FilterOption;
|
|
33
|
+
readonly caseSensitive: boolean;
|
|
34
|
+
readonly notFoundContent: string;
|
|
35
|
+
readonly placement: import("./mentions-types").MentionsPlacement;
|
|
36
|
+
readonly popupMaxHeight: number;
|
|
37
|
+
readonly searchDebounce: number;
|
|
38
|
+
readonly variant: import("./mentions-types").MentionsVariant;
|
|
39
|
+
readonly prefix: string | string[];
|
|
40
|
+
readonly rows: number;
|
|
41
|
+
readonly autoSize: boolean | {
|
|
42
|
+
minRows?: number;
|
|
43
|
+
maxRows?: number;
|
|
44
|
+
};
|
|
45
|
+
readonly classNames?: import("../../shared/hooks/use-semantic").CcSemanticClasses | undefined;
|
|
46
|
+
readonly styles?: import("../../shared/hooks/use-semantic").CcSemanticStyles | undefined;
|
|
47
|
+
readonly modelValue?: string | null | undefined;
|
|
48
|
+
}> & Readonly<{
|
|
49
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
50
|
+
onSelect?: ((...args: any[]) => any) | undefined;
|
|
51
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
|
52
|
+
onFocus?: ((...args: any[]) => any) | undefined;
|
|
53
|
+
onSearch?: ((...args: any[]) => any) | undefined;
|
|
54
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
55
|
+
}>, {
|
|
56
|
+
readonly split: string;
|
|
57
|
+
readonly disabled: boolean;
|
|
58
|
+
readonly classNames: import("../../shared/hooks/use-semantic").CcSemanticClasses;
|
|
59
|
+
readonly styles: import("../../shared/hooks/use-semantic").CcSemanticStyles;
|
|
60
|
+
readonly modelValue: string | null;
|
|
61
|
+
readonly defaultValue: string;
|
|
62
|
+
readonly options: import("./mentions-types").MentionsSourceItem[];
|
|
63
|
+
readonly placeholder: string;
|
|
64
|
+
readonly status: import("./mentions-types").MentionsStatus;
|
|
65
|
+
readonly filterOption: import("./mentions-types").FilterOption;
|
|
66
|
+
readonly caseSensitive: boolean;
|
|
67
|
+
readonly notFoundContent: string;
|
|
68
|
+
readonly placement: import("./mentions-types").MentionsPlacement;
|
|
69
|
+
readonly popupMaxHeight: number;
|
|
70
|
+
readonly searchDebounce: number;
|
|
71
|
+
readonly variant: import("./mentions-types").MentionsVariant;
|
|
72
|
+
readonly prefix: string | string[];
|
|
73
|
+
readonly rows: number;
|
|
74
|
+
readonly autoSize: boolean | {
|
|
75
|
+
minRows?: number;
|
|
76
|
+
maxRows?: number;
|
|
77
|
+
};
|
|
78
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
79
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
:root{--ccui-global-bg:#f5f5f5;--ccui-global-bg-normal:#fff;--ccui-base-bg:#fff;--ccui-base-bg-dark:#000000d9;--ccui-brand:#1677ff;--ccui-brand-foil:#e6f4ff;--ccui-brand-hover:#4096ff;--ccui-brand-active:#0958d9;--ccui-brand-active-focus:#003eb3;--ccui-contrast:#ff4d4f;--ccui-text:#000000e0;--ccui-text-weak:#000000a6;--ccui-aide-text:#00000073;--ccui-aide-text-stress:#000000a6;--ccui-placeholder:#00000040;--ccui-light-text:#fff;--ccui-dark-text:#000000e0;--ccui-link:#1677ff;--ccui-link-active:#0958d9;--ccui-link-light:#4096ff;--ccui-link-light-active:#69b1ff;--ccui-line:#d9d9d9;--ccui-dividing-line:#f0f0f0;--ccui-block:#fff;--ccui-area:#fafafa;--ccui-danger:#ff4d4f;--ccui-warning:#faad14;--ccui-waiting:#00000073;--ccui-success:#52c41a;--ccui-info:#1677ff;--ccui-initial:#e6f4ff;--ccui-unavailable:#f5f5f5;--ccui-shadow:#00000026;--ccui-light-shadow:#0000000f;--ccui-icon-text:#000000e0;--ccui-icon-bg:#fff;--ccui-icon-fill:#00000073;--ccui-icon-fill-hover:#000000a6;--ccui-icon-fill-active:#1677ff;--ccui-icon-fill-active-hover:#4096ff;--ccui-form-control-line:#d9d9d9;--ccui-form-control-line-hover:#4096ff;--ccui-form-control-line-active:#1677ff;--ccui-form-control-line-active-hover:#0958d9;--ccui-list-item-active-bg:#1677ff;--ccui-list-item-active-text:#fff;--ccui-list-item-active-hover-bg:#4096ff;--ccui-list-item-hover-bg:#0000000a;--ccui-list-item-hover-text:#1677ff;--ccui-list-item-selected-bg:#e6f4ff;--ccui-list-item-strip-bg:#fafafa;--ccui-disabled-bg:#0000000a;--ccui-disabled-line:#d9d9d9;--ccui-disabled-text:#00000040;--ccui-primary-disabled:#91caff;--ccui-icon-fill-active-disabled:#91caff;--ccui-label-bg:#fafafa;--ccui-connected-overlay-bg:#fff;--ccui-connected-overlay-line:#1677ff;--ccui-fullscreen-overlay-bg:#fff;--ccui-feedback-overlay-bg:#000000d9;--ccui-feedback-overlay-text:#fff;--ccui-embed-search-bg:#fafafa;--ccui-embed-search-bg-hover:#f0f0f0;--ccui-float-block-shadow:#1677ff29;--ccui-highlight-overlay:#fffc;--ccui-range-item-hover-bg:#e6f4ff;--ccui-primary:#1677ff;--ccui-primary-hover:#4096ff;--ccui-primary-active:#0958d9;--ccui-contrast-hover:#ff7875;--ccui-contrast-active:#d9363e;--ccui-secondary:#000000a6;--ccui-danger-line:#ffccc7;--ccui-danger-bg:#fff2f0;--ccui-warning-line:#ffe58f;--ccui-warning-bg:#fffbe6;--ccui-info-line:#91caff;--ccui-info-bg:#e6f4ff;--ccui-success-line:#b7eb8f;--ccui-success-bg:#f6ffed;--ccui-primary-line:#91caff;--ccui-primary-bg:#e6f4ff;--ccui-default-line:#d9d9d9;--ccui-default-bg:#fff;--ccui-font-size:14px;--ccui-font-size-card-title:16px;--ccui-font-size-page-title:20px;--ccui-font-size-modal-title:16px;--ccui-font-size-price:24px;--ccui-font-size-data-overview:30px;--ccui-font-size-icon:16px;--ccui-font-size-sm:12px;--ccui-font-size-md:14px;--ccui-font-size-lg:16px;--ccui-font-title-weight:600;--ccui-font-content-weight:400;--ccui-line-height-base:1.57143;--ccui-border-radius:6px;--ccui-border-radius-feedback:8px;--ccui-border-radius-card:8px;--ccui-shadow-length-base:0 1px 2px 0;--ccui-shadow-length-slide-left:-6px 0 16px 0;--ccui-shadow-length-slide-right:6px 0 16px 0;--ccui-shadow-length-connected-overlay:0 6px 16px 0;--ccui-shadow-length-hover:0 6px 16px 0;--ccui-shadow-length-feedback-overlay:0 6px 16px 0;--ccui-shadow-fullscreen-overlay:0 6px 16px 0;--ccui-animation-duration-slow:.3s;--ccui-animation-duration-base:.2s;--ccui-animation-duration-fast:.1s;--ccui-animation-ease-in:cubic-bezier(.7, 0, .84, 0);--ccui-animation-ease-out:cubic-bezier(.215, .61, .355, 1);--ccui-animation-ease-in-out:cubic-bezier(.78, .14, .15, .86);--ccui-animation-ease-in-smooth:cubic-bezier(.645, .045, .355, 1);--ccui-animation-linear:cubic-bezier(0, 0, 1, 1);--ccui-z-index-full-page-overlay:1080;--ccui-z-index-pop-up:1060;--ccui-z-index-dropdown:1052;--ccui-z-index-modal:1050;--ccui-z-index-drawer:1040;--ccui-z-index-framework:1000;--ccui-size-sm:24px;--ccui-size-md:32px;--ccui-size-lg:40px;--ccui-color-primary:#1677ff;--ccui-color-primary-hover:#4096ff;--ccui-color-primary-active:#0958d9;--ccui-color-primary-bg:#e6f4ff;--ccui-color-primary-bg-hover:#bae0ff;--ccui-color-primary-border:#91caff;--ccui-color-primary-border-hover:#69b1ff;--ccui-color-success:#52c41a;--ccui-color-success-hover:#73d13d;--ccui-color-success-active:#389e0d;--ccui-color-success-bg:#f6ffed;--ccui-color-success-border:#b7eb8f;--ccui-color-warning:#faad14;--ccui-color-warning-hover:#ffc53d;--ccui-color-warning-active:#d48806;--ccui-color-warning-bg:#fffbe6;--ccui-color-warning-border:#ffe58f;--ccui-color-error:#ff4d4f;--ccui-color-error-hover:#ff7875;--ccui-color-error-active:#d9363e;--ccui-color-error-bg:#fff2f0;--ccui-color-error-border:#ffccc7;--ccui-color-info:#1677ff;--ccui-color-info-hover:#4096ff;--ccui-color-info-bg:#e6f4ff;--ccui-color-info-border:#91caff;--ccui-color-text:#000000e0;--ccui-color-text-secondary:#000000a6;--ccui-color-text-tertiary:#00000073;--ccui-color-text-quaternary:#00000040;--ccui-color-text-disabled:#00000040;--ccui-color-text-placeholder:#00000040;--ccui-color-text-heading:#000000e0;--ccui-color-text-light-solid:#fff;--ccui-color-bg-base:#fff;--ccui-color-bg-container:#fff;--ccui-color-bg-elevated:#fff;--ccui-color-bg-layout:#f5f5f5;--ccui-color-bg-spotlight:#000000d9;--ccui-color-bg-mask:#00000073;--ccui-color-bg-text-hover:#0000000f;--ccui-color-bg-text-active:#00000026;--ccui-color-border:#d9d9d9;--ccui-color-border-secondary:#f0f0f0;--ccui-color-border-disabled:#0000000a;--ccui-color-split:#0505050f;--ccui-color-fill:#00000026;--ccui-color-fill-secondary:#0000000f;--ccui-color-fill-tertiary:#0000000a;--ccui-color-fill-quaternary:#00000005;--ccui-control-outline:#0591ff1a;--ccui-control-outline-error:#ff26050f;--ccui-control-outline-warning:#ffd7051a;--ccui-red-1:#fff1f0;--ccui-red-2:#ffccc7;--ccui-red-3:#ffa39e;--ccui-red-4:#ff7875;--ccui-red-5:#ff4d4f;--ccui-red-6:#f5222d;--ccui-red-7:#cf1322;--ccui-red-8:#a8071a;--ccui-red-9:#820014;--ccui-red-10:#5c0011;--ccui-volcano-1:#fff2e8;--ccui-volcano-2:#ffd8bf;--ccui-volcano-3:#ffbb96;--ccui-volcano-4:#ff9c6e;--ccui-volcano-5:#ff7a45;--ccui-volcano-6:#fa541c;--ccui-volcano-7:#d4380d;--ccui-volcano-8:#ad2102;--ccui-volcano-9:#871400;--ccui-volcano-10:#610b00;--ccui-orange-1:#fff7e6;--ccui-orange-2:#ffe7ba;--ccui-orange-3:#ffd591;--ccui-orange-4:#ffc069;--ccui-orange-5:#ffa940;--ccui-orange-6:#fa8c16;--ccui-orange-7:#d46b08;--ccui-orange-8:#ad4e00;--ccui-orange-9:#873800;--ccui-orange-10:#612500;--ccui-gold-1:#fffbe6;--ccui-gold-2:#fff1b8;--ccui-gold-3:#ffe58f;--ccui-gold-4:#ffd666;--ccui-gold-5:#ffc53d;--ccui-gold-6:#faad14;--ccui-gold-7:#d48806;--ccui-gold-8:#ad6800;--ccui-gold-9:#874d00;--ccui-gold-10:#613400;--ccui-yellow-1:#feffe6;--ccui-yellow-2:#ffffb8;--ccui-yellow-3:#fffb8f;--ccui-yellow-4:#fff566;--ccui-yellow-5:#ffec3d;--ccui-yellow-6:#fadb14;--ccui-yellow-7:#d4b106;--ccui-yellow-8:#ad8b00;--ccui-yellow-9:#876800;--ccui-yellow-10:#614700;--ccui-lime-1:#fcffe6;--ccui-lime-2:#f4ffb8;--ccui-lime-3:#eaff8f;--ccui-lime-4:#d3f261;--ccui-lime-5:#bae637;--ccui-lime-6:#a0d911;--ccui-lime-7:#7cb305;--ccui-lime-8:#5b8c00;--ccui-lime-9:#3f6600;--ccui-lime-10:#254000;--ccui-green-1:#f6ffed;--ccui-green-2:#d9f7be;--ccui-green-3:#b7eb8f;--ccui-green-4:#95de64;--ccui-green-5:#73d13d;--ccui-green-6:#52c41a;--ccui-green-7:#389e0d;--ccui-green-8:#237804;--ccui-green-9:#135200;--ccui-green-10:#092b00;--ccui-cyan-1:#e6fffb;--ccui-cyan-2:#b5f5ec;--ccui-cyan-3:#87e8de;--ccui-cyan-4:#5cdbd3;--ccui-cyan-5:#36cfc9;--ccui-cyan-6:#13c2c2;--ccui-cyan-7:#08979c;--ccui-cyan-8:#006d75;--ccui-cyan-9:#00474f;--ccui-cyan-10:#002329;--ccui-blue-1:#e6f4ff;--ccui-blue-2:#bae0ff;--ccui-blue-3:#91caff;--ccui-blue-4:#69b1ff;--ccui-blue-5:#4096ff;--ccui-blue-6:#1677ff;--ccui-blue-7:#0958d9;--ccui-blue-8:#003eb3;--ccui-blue-9:#002c8c;--ccui-blue-10:#001d66;--ccui-geekblue-1:#f0f5ff;--ccui-geekblue-2:#d6e4ff;--ccui-geekblue-3:#adc6ff;--ccui-geekblue-4:#85a5ff;--ccui-geekblue-5:#597ef7;--ccui-geekblue-6:#2f54eb;--ccui-geekblue-7:#1d39c4;--ccui-geekblue-8:#10239e;--ccui-geekblue-9:#061178;--ccui-geekblue-10:#030852;--ccui-purple-1:#f9f0ff;--ccui-purple-2:#efdbff;--ccui-purple-3:#d3adf7;--ccui-purple-4:#b37feb;--ccui-purple-5:#9254de;--ccui-purple-6:#722ed1;--ccui-purple-7:#531dab;--ccui-purple-8:#391085;--ccui-purple-9:#22075e;--ccui-purple-10:#120338;--ccui-magenta-1:#fff0f6;--ccui-magenta-2:#ffd6e7;--ccui-magenta-3:#ffadd2;--ccui-magenta-4:#ff85c0;--ccui-magenta-5:#f759ab;--ccui-magenta-6:#eb2f96;--ccui-magenta-7:#c41d7f;--ccui-magenta-8:#9e1068;--ccui-magenta-9:#780650;--ccui-magenta-10:#520339;--ccui-pink-1:#fff0f6;--ccui-pink-6:#eb2f96;--ccui-border-radius-lg:8px;--ccui-border-radius-sm:4px;--ccui-border-radius-xs:2px;--ccui-border-radius-outer:4px;--ccui-font-size-xl:20px;--ccui-font-size-heading-1:38px;--ccui-font-size-heading-2:30px;--ccui-font-size-heading-3:24px;--ccui-font-size-heading-4:20px;--ccui-font-size-heading-5:16px;--ccui-line-height-lg:1.5;--ccui-line-height-sm:1.66;--ccui-line-height-heading-1:1.21052;--ccui-line-height-heading-2:1.26666;--ccui-line-height-heading-3:1.33333;--ccui-line-height-heading-4:1.4;--ccui-line-height-heading-5:1.5;--ccui-font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--ccui-font-family-code:SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace;--ccui-control-height:32px;--ccui-control-height-sm:24px;--ccui-control-height-lg:40px;--ccui-control-height-xs:16px;--ccui-box-shadow:0 6px 16px 0 #00000014, 0 3px 6px -4px #0000001f, 0 9px 28px 8px #0000000d;--ccui-box-shadow-secondary:0 6px 16px 0 #00000014, 0 3px 6px -4px #0000001f, 0 9px 28px 8px #0000000d;--ccui-box-shadow-tertiary:0 1px 2px 0 #00000008, 0 1px 6px -1px #00000005, 0 2px 4px 0 #00000005;--ccui-motion-duration-slow:.3s;--ccui-motion-duration-mid:.2s;--ccui-motion-duration-fast:.1s;--ccui-motion-ease-in-out:cubic-bezier(.645, .045, .355, 1);--ccui-motion-ease-out:cubic-bezier(.215, .61, .355, 1);--ccui-motion-ease-in:cubic-bezier(.55, .055, .675, .19);--ccui-motion-ease-out-back:cubic-bezier(.12, .4, .29, 1.46);--ccui-motion-ease-in-back:cubic-bezier(.71, -.46, .88, .6);--ccui-motion-ease-out-circ:cubic-bezier(.08, .82, .17, 1);--ccui-motion-ease-in-out-circ:cubic-bezier(.78, .14, .15, .86);--ccui-padding-xxs:4px;--ccui-padding-xs:8px;--ccui-padding-sm:12px;--ccui-padding:16px;--ccui-padding-md:20px;--ccui-padding-lg:24px;--ccui-padding-xl:32px;--ccui-margin-xxs:4px;--ccui-margin-xs:8px;--ccui-margin-sm:12px;--ccui-margin:16px;--ccui-margin-md:20px;--ccui-margin-lg:24px;--ccui-margin-xl:32px}.ccui-mentions{width:100%;display:inline-block;position:relative}.ccui-mentions.is-disabled{cursor:not-allowed}.ccui-mentions--variant-filled .ccui-mentions__textarea{background-color:var(--ccui-color-fill-secondary,#0000000f);border-color:#0000}.ccui-mentions--variant-filled .ccui-mentions__textarea:hover{background-color:var(--ccui-color-fill,#00000026);border-color:#0000}.ccui-mentions--variant-borderless .ccui-mentions__textarea{background-color:#0000;border-color:#0000}.ccui-mentions--variant-borderless .ccui-mentions__textarea:hover{border-color:#0000}.ccui-mentions--variant-underlined .ccui-mentions__textarea{border-color:#0000;border-bottom-color:var(--ccui-color-border,#d9d9d9);background-color:#0000;border-radius:0}.ccui-mentions--variant-underlined .ccui-mentions__textarea:hover{border-color:#0000;border-bottom-color:var(--ccui-color-primary-hover,#4096ff)}.ccui-mentions--status-error .ccui-mentions__textarea{border-color:var(--ccui-color-error,#ff4d4f)}.ccui-mentions--status-error .ccui-mentions__textarea:hover{border-color:var(--ccui-color-error-hover,#ff7875)}.ccui-mentions--status-error .ccui-mentions__textarea:focus{border-color:var(--ccui-color-error,#ff4d4f);box-shadow:0 0 0 2px var(--ccui-control-outline-error,#ff26050f)}.ccui-mentions--status-warning .ccui-mentions__textarea{border-color:var(--ccui-color-warning,#faad14)}.ccui-mentions--status-warning .ccui-mentions__textarea:hover{border-color:var(--ccui-color-warning-hover,#ffc53d)}.ccui-mentions--status-warning .ccui-mentions__textarea:focus{border-color:var(--ccui-color-warning,#faad14);box-shadow:0 0 0 2px var(--ccui-control-outline-warning,#ffd7051a)}.ccui-mentions__textarea{color:#000000e0;resize:vertical;box-sizing:border-box;background:#fff;border:1px solid #d9d9d9;border-radius:6px;outline:0;width:100%;padding:6px 12px;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color .2s,box-shadow .2s}.ccui-mentions__textarea:hover{border-color:var(--ccui-color-primary-hover,#4096ff)}.ccui-mentions__textarea:focus{border-color:var(--ccui-color-primary,#1677ff);box-shadow:0 0 0 2px var(--ccui-control-outline,#0591ff1a)}.ccui-mentions__textarea::placeholder{color:#00000040}.ccui-mentions__textarea:disabled{color:#0006;cursor:not-allowed;background:#f5f5f5}.ccui-mentions__panel{z-index:1050;background:#fff;border:1px solid #f0f0f0;border-radius:6px;min-width:160px;max-width:320px;position:absolute;left:0;overflow:auto;box-shadow:0 6px 16px #00000014,0 3px 6px -4px #0000001f}.ccui-mentions__options{margin:0;padding:4px 0;list-style:none}.ccui-mentions__option{color:#000000e0;cursor:pointer;padding:5px 12px;font-size:14px;transition:background .2s}.ccui-mentions__option.is-active{background:#0000000a}.ccui-mentions__option.is-disabled{color:#00000040;cursor:not-allowed;background:0 0}.ccui-mentions__empty{color:#00000073;text-align:center;padding:12px;font-size:13px}
|
|
2
|
+
/*$vite$:1*/
|
package/menu/index.d.ts
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import type { ExtractPropTypes, InjectionKey, PropType, Ref, VNodeChild } from 'vue';
|
|
2
|
+
export type MenuMode = 'vertical' | 'horizontal' | 'inline';
|
|
3
|
+
export type MenuTheme = 'light' | 'dark';
|
|
4
|
+
export type MenuKey = string | number;
|
|
5
|
+
export type MenuTriggerAction = 'click' | 'hover';
|
|
6
|
+
export interface MenuInfo {
|
|
7
|
+
key: MenuKey;
|
|
8
|
+
keyPath: MenuKey[];
|
|
9
|
+
item: MenuItem;
|
|
10
|
+
selectedKeys: MenuKey[];
|
|
11
|
+
domEvent?: MouseEvent | KeyboardEvent;
|
|
12
|
+
}
|
|
13
|
+
export interface MenuOpenInfo {
|
|
14
|
+
key: MenuKey;
|
|
15
|
+
open: boolean;
|
|
16
|
+
openKeys: MenuKey[];
|
|
17
|
+
keyPath: MenuKey[];
|
|
18
|
+
item: MenuItem;
|
|
19
|
+
domEvent?: MouseEvent | KeyboardEvent;
|
|
20
|
+
}
|
|
21
|
+
export interface MenuItem {
|
|
22
|
+
key: MenuKey;
|
|
23
|
+
label?: VNodeChild;
|
|
24
|
+
title?: string;
|
|
25
|
+
icon?: string;
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
danger?: boolean;
|
|
28
|
+
extra?: VNodeChild;
|
|
29
|
+
type?: 'item' | 'submenu' | 'group' | 'divider';
|
|
30
|
+
children?: MenuItem[];
|
|
31
|
+
}
|
|
32
|
+
export declare const menuProps: {
|
|
33
|
+
readonly mode: {
|
|
34
|
+
readonly type: PropType<MenuMode>;
|
|
35
|
+
readonly default: MenuMode;
|
|
36
|
+
};
|
|
37
|
+
readonly theme: {
|
|
38
|
+
readonly type: PropType<MenuTheme>;
|
|
39
|
+
readonly default: MenuTheme;
|
|
40
|
+
};
|
|
41
|
+
readonly selectedKeys: {
|
|
42
|
+
readonly type: PropType<MenuKey[]>;
|
|
43
|
+
readonly default: () => never[];
|
|
44
|
+
};
|
|
45
|
+
readonly defaultSelectedKeys: {
|
|
46
|
+
readonly type: PropType<MenuKey[]>;
|
|
47
|
+
readonly default: () => never[];
|
|
48
|
+
};
|
|
49
|
+
readonly openKeys: {
|
|
50
|
+
readonly type: PropType<MenuKey[]>;
|
|
51
|
+
readonly default: () => never[];
|
|
52
|
+
};
|
|
53
|
+
readonly defaultOpenKeys: {
|
|
54
|
+
readonly type: PropType<MenuKey[]>;
|
|
55
|
+
readonly default: () => never[];
|
|
56
|
+
};
|
|
57
|
+
readonly items: {
|
|
58
|
+
readonly type: PropType<MenuItem[]>;
|
|
59
|
+
readonly default: () => never[];
|
|
60
|
+
};
|
|
61
|
+
readonly inlineIndent: {
|
|
62
|
+
readonly type: NumberConstructor;
|
|
63
|
+
readonly default: 24;
|
|
64
|
+
};
|
|
65
|
+
readonly collapsed: {
|
|
66
|
+
readonly type: BooleanConstructor;
|
|
67
|
+
readonly default: false;
|
|
68
|
+
};
|
|
69
|
+
readonly inlineCollapsed: {
|
|
70
|
+
readonly type: BooleanConstructor;
|
|
71
|
+
readonly default: undefined;
|
|
72
|
+
};
|
|
73
|
+
readonly multiple: {
|
|
74
|
+
readonly type: BooleanConstructor;
|
|
75
|
+
readonly default: false;
|
|
76
|
+
};
|
|
77
|
+
readonly selectable: {
|
|
78
|
+
readonly type: BooleanConstructor;
|
|
79
|
+
readonly default: true;
|
|
80
|
+
};
|
|
81
|
+
readonly disabled: {
|
|
82
|
+
readonly type: BooleanConstructor;
|
|
83
|
+
readonly default: false;
|
|
84
|
+
};
|
|
85
|
+
readonly accordion: {
|
|
86
|
+
readonly type: BooleanConstructor;
|
|
87
|
+
readonly default: false;
|
|
88
|
+
};
|
|
89
|
+
readonly forceSubMenuRender: {
|
|
90
|
+
readonly type: BooleanConstructor;
|
|
91
|
+
readonly default: false;
|
|
92
|
+
};
|
|
93
|
+
readonly triggerSubMenuAction: {
|
|
94
|
+
readonly type: PropType<MenuTriggerAction>;
|
|
95
|
+
readonly default: MenuTriggerAction;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
export type MenuProps = ExtractPropTypes<typeof menuProps>;
|
|
99
|
+
export interface MenuContext {
|
|
100
|
+
mode: Ref<MenuMode>;
|
|
101
|
+
theme: Ref<MenuTheme>;
|
|
102
|
+
selectedKeys: Ref<MenuKey[]>;
|
|
103
|
+
openKeys: Ref<MenuKey[]>;
|
|
104
|
+
inlineIndent: Ref<number>;
|
|
105
|
+
collapsed: Ref<boolean>;
|
|
106
|
+
selectItem: (item: MenuItem, keyPath: MenuKey[], domEvent?: MouseEvent | KeyboardEvent) => void;
|
|
107
|
+
toggleSubmenu: (item: MenuItem, keyPath: MenuKey[], domEvent?: MouseEvent | KeyboardEvent, open?: boolean) => void;
|
|
108
|
+
}
|
|
109
|
+
export declare const menuContextKey: InjectionKey<MenuContext>;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { MenuItem, MenuKey } from './menu-types';
|
|
2
|
+
|
|
3
|
+
declare const _default: import("vue").DefineComponent<{
|
|
4
|
+
readonly multiple: boolean;
|
|
5
|
+
readonly disabled: boolean;
|
|
6
|
+
readonly items: MenuItem[];
|
|
7
|
+
readonly theme: import("./menu-types").MenuTheme;
|
|
8
|
+
readonly mode: import("./menu-types").MenuMode;
|
|
9
|
+
readonly accordion: boolean;
|
|
10
|
+
readonly collapsed: boolean;
|
|
11
|
+
readonly selectedKeys: MenuKey[];
|
|
12
|
+
readonly defaultSelectedKeys: MenuKey[];
|
|
13
|
+
readonly openKeys: MenuKey[];
|
|
14
|
+
readonly defaultOpenKeys: MenuKey[];
|
|
15
|
+
readonly inlineIndent: number;
|
|
16
|
+
readonly selectable: boolean;
|
|
17
|
+
readonly forceSubMenuRender: boolean;
|
|
18
|
+
readonly triggerSubMenuAction: import("./menu-types").MenuTriggerAction;
|
|
19
|
+
readonly inlineCollapsed?: boolean | undefined;
|
|
20
|
+
}, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "click" | "open-change" | "update:selectedKeys" | "update:openKeys" | "deselect" | "openChange")[], "select" | "click" | "open-change" | "update:selectedKeys" | "update:openKeys" | "deselect" | "openChange", import("vue").PublicProps, Readonly<{
|
|
21
|
+
readonly multiple: boolean;
|
|
22
|
+
readonly disabled: boolean;
|
|
23
|
+
readonly items: MenuItem[];
|
|
24
|
+
readonly theme: import("./menu-types").MenuTheme;
|
|
25
|
+
readonly mode: import("./menu-types").MenuMode;
|
|
26
|
+
readonly accordion: boolean;
|
|
27
|
+
readonly collapsed: boolean;
|
|
28
|
+
readonly selectedKeys: MenuKey[];
|
|
29
|
+
readonly defaultSelectedKeys: MenuKey[];
|
|
30
|
+
readonly openKeys: MenuKey[];
|
|
31
|
+
readonly defaultOpenKeys: MenuKey[];
|
|
32
|
+
readonly inlineIndent: number;
|
|
33
|
+
readonly selectable: boolean;
|
|
34
|
+
readonly forceSubMenuRender: boolean;
|
|
35
|
+
readonly triggerSubMenuAction: import("./menu-types").MenuTriggerAction;
|
|
36
|
+
readonly inlineCollapsed?: boolean | undefined;
|
|
37
|
+
}> & Readonly<{
|
|
38
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
39
|
+
onSelect?: ((...args: any[]) => any) | undefined;
|
|
40
|
+
"onOpen-change"?: ((...args: any[]) => any) | undefined;
|
|
41
|
+
"onUpdate:selectedKeys"?: ((...args: any[]) => any) | undefined;
|
|
42
|
+
"onUpdate:openKeys"?: ((...args: any[]) => any) | undefined;
|
|
43
|
+
onDeselect?: ((...args: any[]) => any) | undefined;
|
|
44
|
+
onOpenChange?: ((...args: any[]) => any) | undefined;
|
|
45
|
+
}>, {
|
|
46
|
+
readonly multiple: boolean;
|
|
47
|
+
readonly disabled: boolean;
|
|
48
|
+
readonly items: MenuItem[];
|
|
49
|
+
readonly theme: import("./menu-types").MenuTheme;
|
|
50
|
+
readonly mode: import("./menu-types").MenuMode;
|
|
51
|
+
readonly accordion: boolean;
|
|
52
|
+
readonly collapsed: boolean;
|
|
53
|
+
readonly selectedKeys: MenuKey[];
|
|
54
|
+
readonly defaultSelectedKeys: MenuKey[];
|
|
55
|
+
readonly openKeys: MenuKey[];
|
|
56
|
+
readonly defaultOpenKeys: MenuKey[];
|
|
57
|
+
readonly inlineIndent: number;
|
|
58
|
+
readonly inlineCollapsed: boolean;
|
|
59
|
+
readonly selectable: boolean;
|
|
60
|
+
readonly forceSubMenuRender: boolean;
|
|
61
|
+
readonly triggerSubMenuAction: import("./menu-types").MenuTriggerAction;
|
|
62
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
63
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { App } from 'vue';
|
|
2
|
+
import message from './src/message';
|
|
3
|
+
import { useMessage } from './src/use-message';
|
|
4
|
+
export { message, useMessage };
|
|
5
|
+
export type { UseMessageReturn } from './src/use-message';
|
|
6
|
+
export declare const Message: {
|
|
7
|
+
open: (options: import("./src/message-types").MessageOptions) => import("./src/message-types").MessageHandle;
|
|
8
|
+
info: (content: string | import("./src/message-types").MessageOptions, duration?: number) => import("./src/message-types").MessageHandle;
|
|
9
|
+
success: (content: string | import("./src/message-types").MessageOptions, duration?: number) => import("./src/message-types").MessageHandle;
|
|
10
|
+
warning: (content: string | import("./src/message-types").MessageOptions, duration?: number) => import("./src/message-types").MessageHandle;
|
|
11
|
+
error: (content: string | import("./src/message-types").MessageOptions, duration?: number) => import("./src/message-types").MessageHandle;
|
|
12
|
+
loading: (content: string | import("./src/message-types").MessageOptions, duration?: number) => import("./src/message-types").MessageHandle;
|
|
13
|
+
config(cfg: import("./src/message-types").MessageGlobalConfig): void;
|
|
14
|
+
destroy(): void;
|
|
15
|
+
};
|
|
16
|
+
declare const _default: {
|
|
17
|
+
title: string;
|
|
18
|
+
category: string;
|
|
19
|
+
status: string;
|
|
20
|
+
install(app: App): void;
|
|
21
|
+
};
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
readonly type: import("./message-types").MessageType;
|
|
3
|
+
readonly content: string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
}>;
|
|
6
|
+
readonly icon: string;
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly role: import("./message-types").MessageAriaRole;
|
|
9
|
+
readonly pauseOnHover: boolean;
|
|
10
|
+
readonly duration: number;
|
|
11
|
+
readonly showClose: boolean;
|
|
12
|
+
readonly customClass: string;
|
|
13
|
+
readonly classNames?: import("../../shared/hooks/use-semantic").CcSemanticClasses | undefined;
|
|
14
|
+
readonly styles?: import("../../shared/hooks/use-semantic").CcSemanticStyles | undefined;
|
|
15
|
+
}, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "destroy")[], "close" | "destroy", import("vue").PublicProps, Readonly<{
|
|
16
|
+
readonly type: import("./message-types").MessageType;
|
|
17
|
+
readonly content: string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
}>;
|
|
20
|
+
readonly icon: string;
|
|
21
|
+
readonly id: string;
|
|
22
|
+
readonly role: import("./message-types").MessageAriaRole;
|
|
23
|
+
readonly pauseOnHover: boolean;
|
|
24
|
+
readonly duration: number;
|
|
25
|
+
readonly showClose: boolean;
|
|
26
|
+
readonly customClass: string;
|
|
27
|
+
readonly classNames?: import("../../shared/hooks/use-semantic").CcSemanticClasses | undefined;
|
|
28
|
+
readonly styles?: import("../../shared/hooks/use-semantic").CcSemanticStyles | undefined;
|
|
29
|
+
}> & Readonly<{
|
|
30
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
31
|
+
onDestroy?: ((...args: any[]) => any) | undefined;
|
|
32
|
+
}>, {
|
|
33
|
+
readonly type: import("./message-types").MessageType;
|
|
34
|
+
readonly content: string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
35
|
+
[key: string]: any;
|
|
36
|
+
}>;
|
|
37
|
+
readonly icon: string;
|
|
38
|
+
readonly classNames: import("../../shared/hooks/use-semantic").CcSemanticClasses;
|
|
39
|
+
readonly styles: import("../../shared/hooks/use-semantic").CcSemanticStyles;
|
|
40
|
+
readonly role: import("./message-types").MessageAriaRole;
|
|
41
|
+
readonly pauseOnHover: boolean;
|
|
42
|
+
readonly duration: number;
|
|
43
|
+
readonly showClose: boolean;
|
|
44
|
+
readonly customClass: string;
|
|
45
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
46
|
+
export default _default;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type { ExtractPropTypes, PropType, VNode } from 'vue';
|
|
2
|
+
import type { CcSemanticClasses, CcSemanticStyles } from '../../shared/hooks/use-semantic';
|
|
3
|
+
export type MessageType = 'info' | 'success' | 'warning' | 'error' | 'loading';
|
|
4
|
+
export type MessagePlacement = 'top' | 'topLeft' | 'topRight' | 'bottom' | 'bottomLeft' | 'bottomRight';
|
|
5
|
+
export type MessageAriaRole = 'alert' | 'status';
|
|
6
|
+
export interface MessageOptions {
|
|
7
|
+
content: string | VNode;
|
|
8
|
+
type?: MessageType;
|
|
9
|
+
duration?: number;
|
|
10
|
+
showClose?: boolean;
|
|
11
|
+
onClose?: () => void;
|
|
12
|
+
icon?: string;
|
|
13
|
+
key?: string | number;
|
|
14
|
+
customClass?: string;
|
|
15
|
+
placement?: MessagePlacement;
|
|
16
|
+
role?: MessageAriaRole;
|
|
17
|
+
pauseOnHover?: boolean;
|
|
18
|
+
classNames?: CcSemanticClasses;
|
|
19
|
+
styles?: CcSemanticStyles;
|
|
20
|
+
}
|
|
21
|
+
export interface MessageGlobalConfig {
|
|
22
|
+
top?: number | string;
|
|
23
|
+
bottom?: number | string;
|
|
24
|
+
duration?: number;
|
|
25
|
+
maxCount?: number;
|
|
26
|
+
stack?: boolean;
|
|
27
|
+
pauseOnHover?: boolean;
|
|
28
|
+
role?: MessageAriaRole;
|
|
29
|
+
getContainer?: () => HTMLElement;
|
|
30
|
+
}
|
|
31
|
+
export declare const messageItemProps: {
|
|
32
|
+
readonly id: {
|
|
33
|
+
readonly type: StringConstructor;
|
|
34
|
+
readonly required: true;
|
|
35
|
+
};
|
|
36
|
+
readonly content: {
|
|
37
|
+
readonly type: PropType<string | VNode>;
|
|
38
|
+
readonly default: "";
|
|
39
|
+
};
|
|
40
|
+
readonly type: {
|
|
41
|
+
readonly type: PropType<MessageType>;
|
|
42
|
+
readonly default: MessageType;
|
|
43
|
+
};
|
|
44
|
+
readonly duration: {
|
|
45
|
+
readonly type: NumberConstructor;
|
|
46
|
+
readonly default: 3000;
|
|
47
|
+
};
|
|
48
|
+
readonly showClose: {
|
|
49
|
+
readonly type: BooleanConstructor;
|
|
50
|
+
readonly default: false;
|
|
51
|
+
};
|
|
52
|
+
readonly icon: {
|
|
53
|
+
readonly type: StringConstructor;
|
|
54
|
+
readonly default: "";
|
|
55
|
+
};
|
|
56
|
+
readonly customClass: {
|
|
57
|
+
readonly type: StringConstructor;
|
|
58
|
+
readonly default: "";
|
|
59
|
+
};
|
|
60
|
+
readonly role: {
|
|
61
|
+
readonly type: PropType<MessageAriaRole>;
|
|
62
|
+
readonly default: MessageAriaRole;
|
|
63
|
+
};
|
|
64
|
+
readonly pauseOnHover: {
|
|
65
|
+
readonly type: BooleanConstructor;
|
|
66
|
+
readonly default: true;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* 语义化 DOM className 注入。可用 key:`root` / `icon` / `content`。
|
|
70
|
+
*/
|
|
71
|
+
readonly classNames: {
|
|
72
|
+
readonly type: PropType<CcSemanticClasses>;
|
|
73
|
+
readonly default: undefined;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* 语义化 DOM style 注入。可用 key 与 classNames 一致。
|
|
77
|
+
*/
|
|
78
|
+
readonly styles: {
|
|
79
|
+
readonly type: PropType<CcSemanticStyles>;
|
|
80
|
+
readonly default: undefined;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
export type MessageItemProps = ExtractPropTypes<typeof messageItemProps>;
|
|
84
|
+
export interface MessageHandle {
|
|
85
|
+
close: () => void;
|
|
86
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { MessageAriaRole, MessageGlobalConfig, MessageHandle, MessageOptions, MessagePlacement } from './message-types';
|
|
2
|
+
|
|
3
|
+
declare function normalizeDuration(input: number | undefined, defaultSeconds: number): number;
|
|
4
|
+
declare function open(options: MessageOptions): MessageHandle;
|
|
5
|
+
declare const message: {
|
|
6
|
+
open: typeof open;
|
|
7
|
+
info: (content: string | MessageOptions, duration?: number) => MessageHandle;
|
|
8
|
+
success: (content: string | MessageOptions, duration?: number) => MessageHandle;
|
|
9
|
+
warning: (content: string | MessageOptions, duration?: number) => MessageHandle;
|
|
10
|
+
error: (content: string | MessageOptions, duration?: number) => MessageHandle;
|
|
11
|
+
loading: (content: string | MessageOptions, duration?: number) => MessageHandle;
|
|
12
|
+
config(cfg: MessageGlobalConfig): void;
|
|
13
|
+
destroy(): void;
|
|
14
|
+
};
|
|
15
|
+
export declare const _messageInternal: {
|
|
16
|
+
normalizeDuration: typeof normalizeDuration;
|
|
17
|
+
globalConfig: MessageGlobalConfig;
|
|
18
|
+
PLACEMENTS: MessagePlacement[];
|
|
19
|
+
};
|
|
20
|
+
export default message;
|
|
21
|
+
export type { MessageAriaRole };
|