@melt-js/comps-vben 0.0.0-stage → 2026.11.8-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +10 -0
- package/README.md +91 -2
- package/hel_dist/assets/index-DaBGAjzb.js +478 -0
- package/hel_dist/assets/style-CcRbEt6_.css +2 -0
- package/hel_dist/entry.js +20 -0
- package/hel_dist/hel-meta.json +116 -0
- package/hel_dist/index.html +37 -0
- package/hel_proxy/entry.js +20 -0
- package/hel_proxy/entry.js.map +1 -0
- package/hel_proxy_es/entry.js +11 -0
- package/hel_proxy_es/entry.js.map +1 -0
- package/package.json +101 -3
- package/scripts/check-tdz.mjs +20 -0
- package/scripts/check.mjs +18 -0
- package/scripts/meta.mjs +28 -0
- package/scripts/prepublishOnly.mjs +42 -0
- package/scripts/publish-stage.mjs +25 -0
- package/src/common-ui/components/api-component/api-component.vue +273 -0
- package/src/common-ui/components/api-component/index.ts +7 -0
- package/src/common-ui/components/api-component/types.ts +72 -0
- package/src/common-ui/components/captcha/hooks/useCaptchaPoints.ts +19 -0
- package/src/common-ui/components/captcha/index.ts +7 -0
- package/src/common-ui/components/captcha/point-selection-captcha/index.vue +176 -0
- package/src/common-ui/components/captcha/point-selection-captcha/point-selection-captcha-card.vue +86 -0
- package/src/common-ui/components/captcha/slider-captcha/index.vue +254 -0
- package/src/common-ui/components/captcha/slider-captcha/slider-captcha-action.vue +65 -0
- package/src/common-ui/components/captcha/slider-captcha/slider-captcha-bar.vue +40 -0
- package/src/common-ui/components/captcha/slider-captcha/slider-captcha-content.vue +53 -0
- package/src/common-ui/components/captcha/slider-rotate-captcha/index.vue +213 -0
- package/src/common-ui/components/captcha/slider-translate-captcha/index.vue +311 -0
- package/src/common-ui/components/captcha/types.ts +210 -0
- package/src/common-ui/components/col-page/col-page.vue +111 -0
- package/src/common-ui/components/col-page/index.ts +2 -0
- package/src/common-ui/components/col-page/types.ts +26 -0
- package/src/common-ui/components/count-to/count-to.vue +123 -0
- package/src/common-ui/components/count-to/index.ts +2 -0
- package/src/common-ui/components/count-to/types.ts +53 -0
- package/src/common-ui/components/cropper/cropper.vue +981 -0
- package/src/common-ui/components/cropper/index.ts +1 -0
- package/src/common-ui/components/ellipsis-text/ellipsis-text.vue +232 -0
- package/src/common-ui/components/ellipsis-text/index.ts +1 -0
- package/src/common-ui/components/icon-picker/icon-picker.vue +322 -0
- package/src/common-ui/components/icon-picker/icons.ts +56 -0
- package/src/common-ui/components/icon-picker/index.ts +2 -0
- package/src/common-ui/components/icon-picker/types.ts +26 -0
- package/src/common-ui/components/index.ts +51 -0
- package/src/common-ui/components/json-viewer/index.ts +3 -0
- package/src/common-ui/components/json-viewer/index.vue +128 -0
- package/src/common-ui/components/json-viewer/style.scss +91 -0
- package/src/common-ui/components/json-viewer/types.ts +44 -0
- package/src/common-ui/components/loading/directive.ts +132 -0
- package/src/common-ui/components/loading/index.ts +3 -0
- package/src/common-ui/components/loading/loading.vue +39 -0
- package/src/common-ui/components/loading/spinner.vue +28 -0
- package/src/common-ui/components/page/index.ts +2 -0
- package/src/common-ui/components/page/page.vue +107 -0
- package/src/common-ui/components/page/types.ts +23 -0
- package/src/common-ui/components/resize/index.ts +1 -0
- package/src/common-ui/components/resize/resize.vue +1269 -0
- package/src/common-ui/components/tippy/directive.ts +100 -0
- package/src/common-ui/components/tippy/index.ts +67 -0
- package/src/common-ui/components/tree/index.ts +1 -0
- package/src/common-ui/components/tree/tree.vue +25 -0
- package/src/common-ui/index.ts +2 -0
- package/src/common-ui/ui/about/about.ts +14 -0
- package/src/common-ui/ui/about/about.vue +183 -0
- package/src/common-ui/ui/about/index.ts +1 -0
- package/src/common-ui/ui/authentication/auth-title.vue +13 -0
- package/src/common-ui/ui/authentication/code-login.vue +127 -0
- package/src/common-ui/ui/authentication/dingding-login.vue +113 -0
- package/src/common-ui/ui/authentication/forget-password.vue +116 -0
- package/src/common-ui/ui/authentication/index.ts +7 -0
- package/src/common-ui/ui/authentication/login-expired-modal.vue +95 -0
- package/src/common-ui/ui/authentication/login.vue +186 -0
- package/src/common-ui/ui/authentication/qrcode-login.vue +105 -0
- package/src/common-ui/ui/authentication/register.vue +121 -0
- package/src/common-ui/ui/authentication/third-party-login.vue +71 -0
- package/src/common-ui/ui/authentication/types.ts +70 -0
- package/src/common-ui/ui/dashboard/analysis/analysis-chart-card.vue +24 -0
- package/src/common-ui/ui/dashboard/analysis/analysis-charts-tabs.vue +40 -0
- package/src/common-ui/ui/dashboard/analysis/analysis-overview.vue +55 -0
- package/src/common-ui/ui/dashboard/analysis/index.ts +3 -0
- package/src/common-ui/ui/dashboard/index.ts +3 -0
- package/src/common-ui/ui/dashboard/typing.ts +50 -0
- package/src/common-ui/ui/dashboard/workbench/index.ts +5 -0
- package/src/common-ui/ui/dashboard/workbench/workbench-header.vue +48 -0
- package/src/common-ui/ui/dashboard/workbench/workbench-project.vue +73 -0
- package/src/common-ui/ui/dashboard/workbench/workbench-quick-nav.vue +56 -0
- package/src/common-ui/ui/dashboard/workbench/workbench-todo.vue +63 -0
- package/src/common-ui/ui/dashboard/workbench/workbench-trends.vue +64 -0
- package/src/common-ui/ui/fallback/fallback.ts +25 -0
- package/src/common-ui/ui/fallback/fallback.vue +164 -0
- package/src/common-ui/ui/fallback/icons/icon-403.vue +151 -0
- package/src/common-ui/ui/fallback/icons/icon-404.vue +154 -0
- package/src/common-ui/ui/fallback/icons/icon-500.vue +215 -0
- package/src/common-ui/ui/fallback/icons/icon-coming-soon.vue +262 -0
- package/src/common-ui/ui/fallback/icons/icon-offline.vue +112 -0
- package/src/common-ui/ui/fallback/icons/warning.svg +1 -0
- package/src/common-ui/ui/fallback/index.ts +2 -0
- package/src/common-ui/ui/index.ts +5 -0
- package/src/common-ui/ui/profile/base-setting.vue +58 -0
- package/src/common-ui/ui/profile/index.ts +6 -0
- package/src/common-ui/ui/profile/notification-setting.vue +52 -0
- package/src/common-ui/ui/profile/password-setting.vue +59 -0
- package/src/common-ui/ui/profile/profile.vue +64 -0
- package/src/common-ui/ui/profile/security-setting.vue +52 -0
- package/src/common-ui/ui/profile/types.ts +21 -0
- package/src/configs/subApp.ts +1 -0
- package/src/entrance/libProperties.ts +34 -0
- package/src/entrance/libTypes.js +9 -0
- package/src/form-ui/components/form-actions.vue +178 -0
- package/src/form-ui/components/form-field-array.vue +234 -0
- package/src/form-ui/config.ts +117 -0
- package/src/form-ui/deprecation.ts +18 -0
- package/src/form-ui/field-name.ts +106 -0
- package/src/form-ui/form-api.ts +766 -0
- package/src/form-ui/form-codec.ts +40 -0
- package/src/form-ui/form-render/context.ts +25 -0
- package/src/form-ui/form-render/dependencies.ts +305 -0
- package/src/form-ui/form-render/expandable.ts +105 -0
- package/src/form-ui/form-render/form-field.vue +644 -0
- package/src/form-ui/form-render/form-group.vue +126 -0
- package/src/form-ui/form-render/form-label.vue +35 -0
- package/src/form-ui/form-render/form.vue +205 -0
- package/src/form-ui/form-render/helper.ts +65 -0
- package/src/form-ui/form-render/index.ts +3 -0
- package/src/form-ui/form-render/schema.ts +534 -0
- package/src/form-ui/form-render/utils.ts +170 -0
- package/src/form-ui/form-runtime-field.ts +82 -0
- package/src/form-ui/form-runtime.ts +325 -0
- package/src/form-ui/form-value-transform.ts +235 -0
- package/src/form-ui/index.ts +39 -0
- package/src/form-ui/rule-registry.ts +17 -0
- package/src/form-ui/types.ts +1054 -0
- package/src/form-ui/use-custom-field-value.ts +124 -0
- package/src/form-ui/use-form-context.ts +148 -0
- package/src/form-ui/use-vben-form.ts +81 -0
- package/src/form-ui/vben-form.vue +79 -0
- package/src/form-ui/vben-use-form.vue +187 -0
- package/src/layout-ui/components/index.ts +5 -0
- package/src/layout-ui/components/layout-content.vue +75 -0
- package/src/layout-ui/components/layout-footer.vue +46 -0
- package/src/layout-ui/components/layout-header.vue +89 -0
- package/src/layout-ui/components/layout-sidebar.vue +484 -0
- package/src/layout-ui/components/layout-tabbar.vue +30 -0
- package/src/layout-ui/components/widgets/index.ts +2 -0
- package/src/layout-ui/components/widgets/sidebar-collapse-button.vue +25 -0
- package/src/layout-ui/components/widgets/sidebar-fixed-button.vue +27 -0
- package/src/layout-ui/header-scroll-state.ts +28 -0
- package/src/layout-ui/hooks/use-layout.ts +53 -0
- package/src/layout-ui/hooks/use-sidebar-drag.ts +152 -0
- package/src/layout-ui/index.ts +2 -0
- package/src/layout-ui/vben-layout.ts +188 -0
- package/src/layout-ui/vben-layout.vue +768 -0
- package/src/layouts/authentication/authentication.vue +196 -0
- package/src/layouts/authentication/form.vue +38 -0
- package/src/layouts/authentication/icons/slogan.vue +4568 -0
- package/src/layouts/authentication/index.ts +2 -0
- package/src/layouts/authentication/toolbar.vue +49 -0
- package/src/layouts/authentication/types.ts +1 -0
- package/src/layouts/basic/README.md +7 -0
- package/src/layouts/basic/content/content-spinner.vue +12 -0
- package/src/layouts/basic/content/content.vue +112 -0
- package/src/layouts/basic/content/index.ts +2 -0
- package/src/layouts/basic/content/use-content-spinner.ts +98 -0
- package/src/layouts/basic/copyright/copyright.vue +49 -0
- package/src/layouts/basic/copyright/index.ts +1 -0
- package/src/layouts/basic/footer/footer.vue +11 -0
- package/src/layouts/basic/footer/index.ts +1 -0
- package/src/layouts/basic/header/header.vue +408 -0
- package/src/layouts/basic/header/index.ts +1 -0
- package/src/layouts/basic/index.ts +1 -0
- package/src/layouts/basic/layout.vue +478 -0
- package/src/layouts/basic/menu/extra-menu.vue +41 -0
- package/src/layouts/basic/menu/index.ts +5 -0
- package/src/layouts/basic/menu/menu.vue +45 -0
- package/src/layouts/basic/menu/mixed-menu.vue +46 -0
- package/src/layouts/basic/menu/use-extra-menu.ts +179 -0
- package/src/layouts/basic/menu/use-mixed-menu.ts +181 -0
- package/src/layouts/basic/menu/use-navigation.ts +74 -0
- package/src/layouts/basic/tabbar/index.ts +2 -0
- package/src/layouts/basic/tabbar/tabbar.vue +84 -0
- package/src/layouts/basic/tabbar/use-tabbar.ts +229 -0
- package/src/layouts/basic/use-layout-scroll.ts +85 -0
- package/src/layouts/hooks/index.ts +98 -0
- package/src/layouts/iframe/iframe-router-view.vue +86 -0
- package/src/layouts/iframe/iframe-view.vue +3 -0
- package/src/layouts/iframe/index.ts +2 -0
- package/src/layouts/index.ts +4 -0
- package/src/layouts/route-cached/cached-tab-keys.ts +13 -0
- package/src/layouts/route-cached/index.ts +2 -0
- package/src/layouts/route-cached/route-cached-page.vue +36 -0
- package/src/layouts/route-cached/route-cached-view.vue +97 -0
- package/src/layouts/widgets/breadcrumb-routes.ts +41 -0
- package/src/layouts/widgets/breadcrumb.vue +78 -0
- package/src/layouts/widgets/check-updates/check-updates.vue +136 -0
- package/src/layouts/widgets/check-updates/index.ts +1 -0
- package/src/layouts/widgets/color-toggle.vue +64 -0
- package/src/layouts/widgets/global-search/global-search.vue +173 -0
- package/src/layouts/widgets/global-search/index.ts +1 -0
- package/src/layouts/widgets/global-search/search-panel.vue +299 -0
- package/src/layouts/widgets/index.ts +12 -0
- package/src/layouts/widgets/language-toggle.vue +48 -0
- package/src/layouts/widgets/layout-toggle.vue +64 -0
- package/src/layouts/widgets/lock-screen/index.ts +2 -0
- package/src/layouts/widgets/lock-screen/lock-screen-modal.vue +110 -0
- package/src/layouts/widgets/lock-screen/lock-screen.vue +167 -0
- package/src/layouts/widgets/notification/index.ts +3 -0
- package/src/layouts/widgets/notification/notification.vue +210 -0
- package/src/layouts/widgets/notification/types.ts +19 -0
- package/src/layouts/widgets/preferences/blocks/block.vue +22 -0
- package/src/layouts/widgets/preferences/blocks/checkbox-item.vue +63 -0
- package/src/layouts/widgets/preferences/blocks/custom/custom.vue +121 -0
- package/src/layouts/widgets/preferences/blocks/draggable-list.vue +138 -0
- package/src/layouts/widgets/preferences/blocks/general/animation.vue +56 -0
- package/src/layouts/widgets/preferences/blocks/general/general.vue +94 -0
- package/src/layouts/widgets/preferences/blocks/index.ts +21 -0
- package/src/layouts/widgets/preferences/blocks/input-item.vue +71 -0
- package/src/layouts/widgets/preferences/blocks/layout/breadcrumb.vue +61 -0
- package/src/layouts/widgets/preferences/blocks/layout/content.vue +53 -0
- package/src/layouts/widgets/preferences/blocks/layout/copyright.vue +56 -0
- package/src/layouts/widgets/preferences/blocks/layout/footer.vue +17 -0
- package/src/layouts/widgets/preferences/blocks/layout/header.vue +78 -0
- package/src/layouts/widgets/preferences/blocks/layout/layout.vue +112 -0
- package/src/layouts/widgets/preferences/blocks/layout/navigation.vue +50 -0
- package/src/layouts/widgets/preferences/blocks/layout/sidebar.vue +108 -0
- package/src/layouts/widgets/preferences/blocks/layout/tabbar.vue +106 -0
- package/src/layouts/widgets/preferences/blocks/layout/widget.vue +188 -0
- package/src/layouts/widgets/preferences/blocks/number-field-item.vue +74 -0
- package/src/layouts/widgets/preferences/blocks/select-item.vue +76 -0
- package/src/layouts/widgets/preferences/blocks/shortcut-keys/global.vue +55 -0
- package/src/layouts/widgets/preferences/blocks/switch-item.vue +55 -0
- package/src/layouts/widgets/preferences/blocks/theme/builtin.vue +162 -0
- package/src/layouts/widgets/preferences/blocks/theme/color-mode.vue +26 -0
- package/src/layouts/widgets/preferences/blocks/theme/font-size.vue +62 -0
- package/src/layouts/widgets/preferences/blocks/theme/radius.vue +38 -0
- package/src/layouts/widgets/preferences/blocks/theme/theme.vue +114 -0
- package/src/layouts/widgets/preferences/blocks/toggle-item.vue +46 -0
- package/src/layouts/widgets/preferences/icons/content-compact.vue +119 -0
- package/src/layouts/widgets/preferences/icons/full-content.vue +50 -0
- package/src/layouts/widgets/preferences/icons/header-mixed-nav.vue +202 -0
- package/src/layouts/widgets/preferences/icons/header-nav.vue +119 -0
- package/src/layouts/widgets/preferences/icons/header-sidebar-nav.vue +177 -0
- package/src/layouts/widgets/preferences/icons/index.ts +12 -0
- package/src/layouts/widgets/preferences/icons/mixed-nav.vue +161 -0
- package/src/layouts/widgets/preferences/icons/setting.vue +12 -0
- package/src/layouts/widgets/preferences/icons/sidebar-mixed-nav.vue +173 -0
- package/src/layouts/widgets/preferences/icons/sidebar-nav.vue +153 -0
- package/src/layouts/widgets/preferences/index.ts +3 -0
- package/src/layouts/widgets/preferences/preferences-button.vue +31 -0
- package/src/layouts/widgets/preferences/preferences-drawer.vue +674 -0
- package/src/layouts/widgets/preferences/preferences.vue +93 -0
- package/src/layouts/widgets/preferences/use-open-preferences.ts +16 -0
- package/src/layouts/widgets/theme-toggle/index.ts +1 -0
- package/src/layouts/widgets/theme-toggle/theme-button.vue +164 -0
- package/src/layouts/widgets/theme-toggle/theme-toggle.vue +83 -0
- package/src/layouts/widgets/timezone/index.ts +1 -0
- package/src/layouts/widgets/timezone/timezone-button.vue +92 -0
- package/src/layouts/widgets/user-dropdown/index.ts +1 -0
- package/src/layouts/widgets/user-dropdown/user-dropdown.vue +578 -0
- package/src/main.ts +17 -0
- package/src/menu-ui/components/collapse-transition.vue +96 -0
- package/src/menu-ui/components/index.ts +4 -0
- package/src/menu-ui/components/menu-badge-dot.vue +28 -0
- package/src/menu-ui/components/menu-badge.vue +57 -0
- package/src/menu-ui/components/menu-item.vue +140 -0
- package/src/menu-ui/components/menu.vue +880 -0
- package/src/menu-ui/components/normal-menu/index.ts +2 -0
- package/src/menu-ui/components/normal-menu/normal-menu.ts +27 -0
- package/src/menu-ui/components/normal-menu/normal-menu.vue +162 -0
- package/src/menu-ui/components/sub-menu-content.vue +105 -0
- package/src/menu-ui/components/sub-menu.vue +276 -0
- package/src/menu-ui/hooks/index.ts +2 -0
- package/src/menu-ui/hooks/use-menu-context.ts +55 -0
- package/src/menu-ui/hooks/use-menu-scroll.ts +46 -0
- package/src/menu-ui/hooks/use-menu.ts +48 -0
- package/src/menu-ui/index.ts +4 -0
- package/src/menu-ui/menu.vue +32 -0
- package/src/menu-ui/sub-menu.vue +71 -0
- package/src/menu-ui/types.ts +154 -0
- package/src/menu-ui/utils/index.ts +52 -0
- package/src/plugins/echarts/README.md +41 -0
- package/src/plugins/echarts/echarts-ui.vue +15 -0
- package/src/plugins/echarts/echarts.ts +40 -0
- package/src/plugins/echarts/index.ts +4 -0
- package/src/plugins/echarts/types.ts +28 -0
- package/src/plugins/echarts/use-echarts.ts +213 -0
- package/src/plugins/index.ts +2 -0
- package/src/plugins/motion/README.md +26 -0
- package/src/plugins/motion/index.ts +8 -0
- package/src/plugins/motion/types.ts +26 -0
- package/src/plugins/plugins-context.ts +39 -0
- package/src/plugins/tiptap/extensions.ts +452 -0
- package/src/plugins/tiptap/index.ts +4 -0
- package/src/plugins/tiptap/preview.vue +34 -0
- package/src/plugins/tiptap/style.css +112 -0
- package/src/plugins/tiptap/tiptap.vue +324 -0
- package/src/plugins/tiptap/toolbar.ts +374 -0
- package/src/plugins/tiptap/types.ts +87 -0
- package/src/plugins/tiptap/use-tiptap-toolbar.ts +176 -0
- package/src/plugins/types.ts +24 -0
- package/src/plugins/vxe-table/README.md +50 -0
- package/src/plugins/vxe-table/api.ts +202 -0
- package/src/plugins/vxe-table/extends.ts +150 -0
- package/src/plugins/vxe-table/index.ts +10 -0
- package/src/plugins/vxe-table/init.ts +151 -0
- package/src/plugins/vxe-table/style.css +128 -0
- package/src/plugins/vxe-table/types.ts +116 -0
- package/src/plugins/vxe-table/use-vxe-grid.ts +86 -0
- package/src/plugins/vxe-table/use-vxe-grid.vue +564 -0
- package/src/plugins/vxe-table/viewed-row/index.ts +8 -0
- package/src/plugins/vxe-table/viewed-row/types.ts +84 -0
- package/src/plugins/vxe-table/viewed-row/use-viewed-row.ts +590 -0
- package/src/popup-ui/alert/AlertBuilder.ts +244 -0
- package/src/popup-ui/alert/alert.ts +101 -0
- package/src/popup-ui/alert/alert.vue +220 -0
- package/src/popup-ui/alert/index.ts +14 -0
- package/src/popup-ui/drawer/drawer-api.ts +178 -0
- package/src/popup-ui/drawer/drawer.ts +192 -0
- package/src/popup-ui/drawer/drawer.vue +359 -0
- package/src/popup-ui/drawer/index.ts +7 -0
- package/src/popup-ui/drawer/use-drawer.ts +210 -0
- package/src/popup-ui/index.ts +3 -0
- package/src/popup-ui/modal/index.ts +7 -0
- package/src/popup-ui/modal/modal-api.ts +191 -0
- package/src/popup-ui/modal/modal.ts +212 -0
- package/src/popup-ui/modal/modal.vue +395 -0
- package/src/popup-ui/modal/use-modal-draggable.ts +141 -0
- package/src/popup-ui/modal/use-modal.ts +222 -0
- package/src/shadcn-ui/assets/index.css +1 -0
- package/src/shadcn-ui/components/avatar/avatar.vue +76 -0
- package/src/shadcn-ui/components/avatar/index.ts +1 -0
- package/src/shadcn-ui/components/back-top/back-top.vue +43 -0
- package/src/shadcn-ui/components/back-top/backtop.ts +38 -0
- package/src/shadcn-ui/components/back-top/index.ts +1 -0
- package/src/shadcn-ui/components/back-top/use-backtop.ts +45 -0
- package/src/shadcn-ui/components/breadcrumb/breadcrumb-background.vue +111 -0
- package/src/shadcn-ui/components/breadcrumb/breadcrumb-view.vue +39 -0
- package/src/shadcn-ui/components/breadcrumb/breadcrumb.vue +98 -0
- package/src/shadcn-ui/components/breadcrumb/index.ts +3 -0
- package/src/shadcn-ui/components/breadcrumb/types.ts +17 -0
- package/src/shadcn-ui/components/button/button-group.vue +98 -0
- package/src/shadcn-ui/components/button/button.ts +55 -0
- package/src/shadcn-ui/components/button/button.vue +42 -0
- package/src/shadcn-ui/components/button/check-button-group.vue +196 -0
- package/src/shadcn-ui/components/button/icon-button.vue +78 -0
- package/src/shadcn-ui/components/button/index.ts +5 -0
- package/src/shadcn-ui/components/checkbox/checkbox.vue +26 -0
- package/src/shadcn-ui/components/checkbox/index.ts +1 -0
- package/src/shadcn-ui/components/collapsible/collapsible-params-item.vue +123 -0
- package/src/shadcn-ui/components/collapsible/collapsible-params.vue +268 -0
- package/src/shadcn-ui/components/collapsible/collapsible.vue +79 -0
- package/src/shadcn-ui/components/collapsible/index.ts +4 -0
- package/src/shadcn-ui/components/collapsible/type.ts +22 -0
- package/src/shadcn-ui/components/context-menu/context-menu.vue +128 -0
- package/src/shadcn-ui/components/context-menu/index.ts +3 -0
- package/src/shadcn-ui/components/context-menu/interface.ts +42 -0
- package/src/shadcn-ui/components/count-to-animator/count-to-animator.vue +128 -0
- package/src/shadcn-ui/components/count-to-animator/index.ts +1 -0
- package/src/shadcn-ui/components/descriptions/descriptions-cell.vue +129 -0
- package/src/shadcn-ui/components/descriptions/descriptions-item.vue +57 -0
- package/src/shadcn-ui/components/descriptions/descriptions-row.vue +112 -0
- package/src/shadcn-ui/components/descriptions/descriptions.vue +91 -0
- package/src/shadcn-ui/components/descriptions/index.ts +4 -0
- package/src/shadcn-ui/components/descriptions/types.ts +93 -0
- package/src/shadcn-ui/components/descriptions/use-descriptions.ts +216 -0
- package/src/shadcn-ui/components/dropdown-menu/dropdown-menu.vue +49 -0
- package/src/shadcn-ui/components/dropdown-menu/dropdown-radio-menu.vue +52 -0
- package/src/shadcn-ui/components/dropdown-menu/index.ts +4 -0
- package/src/shadcn-ui/components/dropdown-menu/interface.ts +32 -0
- package/src/shadcn-ui/components/expandable-arrow/expandable-arrow.vue +31 -0
- package/src/shadcn-ui/components/expandable-arrow/index.ts +1 -0
- package/src/shadcn-ui/components/full-screen/full-screen.vue +41 -0
- package/src/shadcn-ui/components/full-screen/index.ts +1 -0
- package/src/shadcn-ui/components/hover-card/hover-card.vue +55 -0
- package/src/shadcn-ui/components/hover-card/index.ts +2 -0
- package/src/shadcn-ui/components/icon/icon.vue +35 -0
- package/src/shadcn-ui/components/icon/index.ts +1 -0
- package/src/shadcn-ui/components/index.ts +26 -0
- package/src/shadcn-ui/components/input-password/index.ts +1 -0
- package/src/shadcn-ui/components/input-password/input-password.vue +57 -0
- package/src/shadcn-ui/components/input-password/password-strength.vue +66 -0
- package/src/shadcn-ui/components/logo/index.ts +1 -0
- package/src/shadcn-ui/components/logo/logo.vue +152 -0
- package/src/shadcn-ui/components/pin-input/index.ts +3 -0
- package/src/shadcn-ui/components/pin-input/input.vue +122 -0
- package/src/shadcn-ui/components/pin-input/types.ts +30 -0
- package/src/shadcn-ui/components/popover/index.ts +1 -0
- package/src/shadcn-ui/components/popover/popover.vue +60 -0
- package/src/shadcn-ui/components/render-content/index.ts +1 -0
- package/src/shadcn-ui/components/render-content/render-content.vue +59 -0
- package/src/shadcn-ui/components/scrollbar/index.ts +1 -0
- package/src/shadcn-ui/components/scrollbar/scrollbar.vue +165 -0
- package/src/shadcn-ui/components/segmented/index.ts +3 -0
- package/src/shadcn-ui/components/segmented/segmented.vue +75 -0
- package/src/shadcn-ui/components/segmented/tabs-indicator.vue +37 -0
- package/src/shadcn-ui/components/segmented/types.ts +6 -0
- package/src/shadcn-ui/components/select/index.ts +1 -0
- package/src/shadcn-ui/components/select/select.vue +57 -0
- package/src/shadcn-ui/components/spine-text/index.ts +1 -0
- package/src/shadcn-ui/components/spine-text/spine-text.vue +49 -0
- package/src/shadcn-ui/components/spinner/index.ts +2 -0
- package/src/shadcn-ui/components/spinner/loading.vue +140 -0
- package/src/shadcn-ui/components/spinner/spinner.vue +138 -0
- package/src/shadcn-ui/components/table-action/action-dropdown-item.vue +116 -0
- package/src/shadcn-ui/components/table-action/action-item.vue +98 -0
- package/src/shadcn-ui/components/table-action/index.ts +3 -0
- package/src/shadcn-ui/components/table-action/table-action.vue +218 -0
- package/src/shadcn-ui/components/table-action/types.ts +75 -0
- package/src/shadcn-ui/components/tooltip/help-tooltip.vue +31 -0
- package/src/shadcn-ui/components/tooltip/index.ts +2 -0
- package/src/shadcn-ui/components/tooltip/tooltip.vue +44 -0
- package/src/shadcn-ui/components.json +15 -0
- package/src/shadcn-ui/index.ts +39 -0
- package/src/shadcn-ui/ui/accordion/Accordion.vue +16 -0
- package/src/shadcn-ui/ui/accordion/AccordionContent.vue +28 -0
- package/src/shadcn-ui/ui/accordion/AccordionItem.vue +29 -0
- package/src/shadcn-ui/ui/accordion/AccordionTrigger.vue +39 -0
- package/src/shadcn-ui/ui/accordion/index.ts +4 -0
- package/src/shadcn-ui/ui/alert-dialog/AlertDialog.vue +20 -0
- package/src/shadcn-ui/ui/alert-dialog/AlertDialogAction.vue +13 -0
- package/src/shadcn-ui/ui/alert-dialog/AlertDialogCancel.vue +13 -0
- package/src/shadcn-ui/ui/alert-dialog/AlertDialogContent.vue +101 -0
- package/src/shadcn-ui/ui/alert-dialog/AlertDialogDescription.vue +28 -0
- package/src/shadcn-ui/ui/alert-dialog/AlertDialogFooter.vue +20 -0
- package/src/shadcn-ui/ui/alert-dialog/AlertDialogHeader.vue +18 -0
- package/src/shadcn-ui/ui/alert-dialog/AlertDialogOverlay.vue +31 -0
- package/src/shadcn-ui/ui/alert-dialog/AlertDialogTitle.vue +26 -0
- package/src/shadcn-ui/ui/alert-dialog/AlertDialogTrigger.vue +13 -0
- package/src/shadcn-ui/ui/alert-dialog/index.ts +9 -0
- package/src/shadcn-ui/ui/avatar/Avatar.vue +25 -0
- package/src/shadcn-ui/ui/avatar/AvatarFallback.vue +31 -0
- package/src/shadcn-ui/ui/avatar/AvatarImage.vue +17 -0
- package/src/shadcn-ui/ui/avatar/index.ts +3 -0
- package/src/shadcn-ui/ui/badge/Badge.vue +33 -0
- package/src/shadcn-ui/ui/badge/badge.ts +25 -0
- package/src/shadcn-ui/ui/badge/index.ts +3 -0
- package/src/shadcn-ui/ui/breadcrumb/Breadcrumb.vue +13 -0
- package/src/shadcn-ui/ui/breadcrumb/BreadcrumbEllipsis.vue +25 -0
- package/src/shadcn-ui/ui/breadcrumb/BreadcrumbItem.vue +18 -0
- package/src/shadcn-ui/ui/breadcrumb/BreadcrumbLink.vue +27 -0
- package/src/shadcn-ui/ui/breadcrumb/BreadcrumbList.vue +23 -0
- package/src/shadcn-ui/ui/breadcrumb/BreadcrumbPage.vue +21 -0
- package/src/shadcn-ui/ui/breadcrumb/BreadcrumbSeparator.vue +24 -0
- package/src/shadcn-ui/ui/breadcrumb/index.ts +7 -0
- package/src/shadcn-ui/ui/button/Button.vue +36 -0
- package/src/shadcn-ui/ui/button/button.ts +35 -0
- package/src/shadcn-ui/ui/button/index.ts +3 -0
- package/src/shadcn-ui/ui/card/Card.vue +23 -0
- package/src/shadcn-ui/ui/card/CardAction.vue +23 -0
- package/src/shadcn-ui/ui/card/CardContent.vue +15 -0
- package/src/shadcn-ui/ui/card/CardDescription.vue +18 -0
- package/src/shadcn-ui/ui/card/CardFooter.vue +18 -0
- package/src/shadcn-ui/ui/card/CardHeader.vue +23 -0
- package/src/shadcn-ui/ui/card/CardTitle.vue +18 -0
- package/src/shadcn-ui/ui/card/index.ts +7 -0
- package/src/shadcn-ui/ui/checkbox/Checkbox.vue +49 -0
- package/src/shadcn-ui/ui/checkbox/index.ts +1 -0
- package/src/shadcn-ui/ui/context-menu/ContextMenu.vue +18 -0
- package/src/shadcn-ui/ui/context-menu/ContextMenuCheckboxItem.vue +51 -0
- package/src/shadcn-ui/ui/context-menu/ContextMenuContent.vue +44 -0
- package/src/shadcn-ui/ui/context-menu/ContextMenuGroup.vue +13 -0
- package/src/shadcn-ui/ui/context-menu/ContextMenuItem.vue +45 -0
- package/src/shadcn-ui/ui/context-menu/ContextMenuLabel.vue +32 -0
- package/src/shadcn-ui/ui/context-menu/ContextMenuPortal.vue +13 -0
- package/src/shadcn-ui/ui/context-menu/ContextMenuRadioGroup.vue +22 -0
- package/src/shadcn-ui/ui/context-menu/ContextMenuRadioItem.vue +51 -0
- package/src/shadcn-ui/ui/context-menu/ContextMenuSeparator.vue +24 -0
- package/src/shadcn-ui/ui/context-menu/ContextMenuShortcut.vue +20 -0
- package/src/shadcn-ui/ui/context-menu/ContextMenuSub.vue +16 -0
- package/src/shadcn-ui/ui/context-menu/ContextMenuSubContent.vue +37 -0
- package/src/shadcn-ui/ui/context-menu/ContextMenuSubTrigger.vue +39 -0
- package/src/shadcn-ui/ui/context-menu/ContextMenuTrigger.vue +15 -0
- package/src/shadcn-ui/ui/context-menu/index.ts +14 -0
- package/src/shadcn-ui/ui/dialog/Dialog.vue +16 -0
- package/src/shadcn-ui/ui/dialog/DialogClose.vue +13 -0
- package/src/shadcn-ui/ui/dialog/DialogContent.vue +149 -0
- package/src/shadcn-ui/ui/dialog/DialogDescription.vue +28 -0
- package/src/shadcn-ui/ui/dialog/DialogFooter.vue +33 -0
- package/src/shadcn-ui/ui/dialog/DialogHeader.vue +18 -0
- package/src/shadcn-ui/ui/dialog/DialogOverlay.vue +34 -0
- package/src/shadcn-ui/ui/dialog/DialogScrollContent.vue +69 -0
- package/src/shadcn-ui/ui/dialog/DialogTitle.vue +28 -0
- package/src/shadcn-ui/ui/dialog/DialogTrigger.vue +13 -0
- package/src/shadcn-ui/ui/dialog/index.ts +10 -0
- package/src/shadcn-ui/ui/dialog/use-dialog-state-events.ts +84 -0
- package/src/shadcn-ui/ui/dropdown-menu/DropdownMenu.vue +20 -0
- package/src/shadcn-ui/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +51 -0
- package/src/shadcn-ui/ui/dropdown-menu/DropdownMenuContent.vue +50 -0
- package/src/shadcn-ui/ui/dropdown-menu/DropdownMenuGroup.vue +13 -0
- package/src/shadcn-ui/ui/dropdown-menu/DropdownMenuItem.vue +44 -0
- package/src/shadcn-ui/ui/dropdown-menu/DropdownMenuLabel.vue +30 -0
- package/src/shadcn-ui/ui/dropdown-menu/DropdownMenuRadioGroup.vue +22 -0
- package/src/shadcn-ui/ui/dropdown-menu/DropdownMenuRadioItem.vue +52 -0
- package/src/shadcn-ui/ui/dropdown-menu/DropdownMenuSeparator.vue +26 -0
- package/src/shadcn-ui/ui/dropdown-menu/DropdownMenuShortcut.vue +20 -0
- package/src/shadcn-ui/ui/dropdown-menu/DropdownMenuSub.vue +20 -0
- package/src/shadcn-ui/ui/dropdown-menu/DropdownMenuSubContent.vue +37 -0
- package/src/shadcn-ui/ui/dropdown-menu/DropdownMenuSubTrigger.vue +38 -0
- package/src/shadcn-ui/ui/dropdown-menu/DropdownMenuTrigger.vue +18 -0
- package/src/shadcn-ui/ui/dropdown-menu/index.ts +16 -0
- package/src/shadcn-ui/ui/form/FormControl.vue +20 -0
- package/src/shadcn-ui/ui/form/FormDescription.vue +23 -0
- package/src/shadcn-ui/ui/form/FormField.vue +35 -0
- package/src/shadcn-ui/ui/form/FormItem.vue +24 -0
- package/src/shadcn-ui/ui/form/FormLabel.vue +25 -0
- package/src/shadcn-ui/ui/form/FormMessage.vue +24 -0
- package/src/shadcn-ui/ui/form/index.ts +10 -0
- package/src/shadcn-ui/ui/form/injectionKeys.ts +16 -0
- package/src/shadcn-ui/ui/form/useFormField.ts +35 -0
- package/src/shadcn-ui/ui/hover-card/HoverCard.vue +16 -0
- package/src/shadcn-ui/ui/hover-card/HoverCardContent.vue +42 -0
- package/src/shadcn-ui/ui/hover-card/HoverCardTrigger.vue +13 -0
- package/src/shadcn-ui/ui/hover-card/index.ts +3 -0
- package/src/shadcn-ui/ui/index.ts +32 -0
- package/src/shadcn-ui/ui/input/Input.vue +54 -0
- package/src/shadcn-ui/ui/input/index.ts +1 -0
- package/src/shadcn-ui/ui/label/Label.vue +29 -0
- package/src/shadcn-ui/ui/label/index.ts +1 -0
- package/src/shadcn-ui/ui/number-field/NumberField.vue +29 -0
- package/src/shadcn-ui/ui/number-field/NumberFieldContent.vue +22 -0
- package/src/shadcn-ui/ui/number-field/NumberFieldDecrement.vue +36 -0
- package/src/shadcn-ui/ui/number-field/NumberFieldIncrement.vue +36 -0
- package/src/shadcn-ui/ui/number-field/NumberFieldInput.vue +23 -0
- package/src/shadcn-ui/ui/number-field/index.ts +5 -0
- package/src/shadcn-ui/ui/pagination/Pagination.vue +31 -0
- package/src/shadcn-ui/ui/pagination/PaginationContent.vue +27 -0
- package/src/shadcn-ui/ui/pagination/PaginationEllipsis.vue +29 -0
- package/src/shadcn-ui/ui/pagination/PaginationFirst.vue +50 -0
- package/src/shadcn-ui/ui/pagination/PaginationItem.vue +47 -0
- package/src/shadcn-ui/ui/pagination/PaginationLast.vue +50 -0
- package/src/shadcn-ui/ui/pagination/PaginationNext.vue +50 -0
- package/src/shadcn-ui/ui/pagination/PaginationPrevious.vue +50 -0
- package/src/shadcn-ui/ui/pagination/index.ts +8 -0
- package/src/shadcn-ui/ui/pin-input/PinInput.vue +38 -0
- package/src/shadcn-ui/ui/pin-input/PinInputGroup.vue +26 -0
- package/src/shadcn-ui/ui/pin-input/PinInputSeparator.vue +17 -0
- package/src/shadcn-ui/ui/pin-input/PinInputSlot.vue +31 -0
- package/src/shadcn-ui/ui/pin-input/index.ts +4 -0
- package/src/shadcn-ui/ui/popover/Popover.vue +16 -0
- package/src/shadcn-ui/ui/popover/PopoverAnchor.vue +13 -0
- package/src/shadcn-ui/ui/popover/PopoverContent.vue +44 -0
- package/src/shadcn-ui/ui/popover/PopoverTrigger.vue +13 -0
- package/src/shadcn-ui/ui/popover/index.ts +4 -0
- package/src/shadcn-ui/ui/progress/Progress.vue +58 -0
- package/src/shadcn-ui/ui/progress/index.ts +1 -0
- package/src/shadcn-ui/ui/radio-group/RadioGroup.vue +30 -0
- package/src/shadcn-ui/ui/radio-group/RadioGroupItem.vue +43 -0
- package/src/shadcn-ui/ui/radio-group/index.ts +2 -0
- package/src/shadcn-ui/ui/resizable/ResizableHandle.vue +48 -0
- package/src/shadcn-ui/ui/resizable/ResizablePanel.vue +32 -0
- package/src/shadcn-ui/ui/resizable/ResizablePanelGroup.vue +32 -0
- package/src/shadcn-ui/ui/resizable/index.ts +3 -0
- package/src/shadcn-ui/ui/scroll-area/ScrollArea.vue +40 -0
- package/src/shadcn-ui/ui/scroll-area/ScrollBar.vue +41 -0
- package/src/shadcn-ui/ui/scroll-area/index.ts +2 -0
- package/src/shadcn-ui/ui/select/Select.vue +16 -0
- package/src/shadcn-ui/ui/select/SelectContent.vue +65 -0
- package/src/shadcn-ui/ui/select/SelectGroup.vue +13 -0
- package/src/shadcn-ui/ui/select/SelectItem.vue +49 -0
- package/src/shadcn-ui/ui/select/SelectItemText.vue +13 -0
- package/src/shadcn-ui/ui/select/SelectLabel.vue +22 -0
- package/src/shadcn-ui/ui/select/SelectScrollDownButton.vue +33 -0
- package/src/shadcn-ui/ui/select/SelectScrollUpButton.vue +33 -0
- package/src/shadcn-ui/ui/select/SelectSeparator.vue +24 -0
- package/src/shadcn-ui/ui/select/SelectTrigger.vue +43 -0
- package/src/shadcn-ui/ui/select/SelectValue.vue +13 -0
- package/src/shadcn-ui/ui/select/index.ts +11 -0
- package/src/shadcn-ui/ui/separator/Separator.vue +33 -0
- package/src/shadcn-ui/ui/separator/index.ts +1 -0
- package/src/shadcn-ui/ui/sheet/Sheet.vue +16 -0
- package/src/shadcn-ui/ui/sheet/SheetClose.vue +13 -0
- package/src/shadcn-ui/ui/sheet/SheetContent.vue +110 -0
- package/src/shadcn-ui/ui/sheet/SheetDescription.vue +26 -0
- package/src/shadcn-ui/ui/sheet/SheetFooter.vue +16 -0
- package/src/shadcn-ui/ui/sheet/SheetHeader.vue +16 -0
- package/src/shadcn-ui/ui/sheet/SheetOverlay.vue +11 -0
- package/src/shadcn-ui/ui/sheet/SheetTitle.vue +26 -0
- package/src/shadcn-ui/ui/sheet/SheetTrigger.vue +13 -0
- package/src/shadcn-ui/ui/sheet/index.ts +10 -0
- package/src/shadcn-ui/ui/sheet/sheet.ts +24 -0
- package/src/shadcn-ui/ui/switch/Switch.vue +45 -0
- package/src/shadcn-ui/ui/switch/index.ts +1 -0
- package/src/shadcn-ui/ui/tabs/Tabs.vue +29 -0
- package/src/shadcn-ui/ui/tabs/TabsContent.vue +26 -0
- package/src/shadcn-ui/ui/tabs/TabsList.vue +31 -0
- package/src/shadcn-ui/ui/tabs/TabsTrigger.vue +33 -0
- package/src/shadcn-ui/ui/tabs/index.ts +5 -0
- package/src/shadcn-ui/ui/textarea/Textarea.vue +35 -0
- package/src/shadcn-ui/ui/textarea/index.ts +1 -0
- package/src/shadcn-ui/ui/toggle/Toggle.vue +45 -0
- package/src/shadcn-ui/ui/toggle/index.ts +2 -0
- package/src/shadcn-ui/ui/toggle/toggle.ts +27 -0
- package/src/shadcn-ui/ui/toggle-group/ToggleGroup.vue +64 -0
- package/src/shadcn-ui/ui/toggle-group/ToggleGroupItem.vue +56 -0
- package/src/shadcn-ui/ui/toggle-group/index.ts +2 -0
- package/src/shadcn-ui/ui/tooltip/Tooltip.vue +16 -0
- package/src/shadcn-ui/ui/tooltip/TooltipContent.vue +55 -0
- package/src/shadcn-ui/ui/tooltip/TooltipProvider.vue +13 -0
- package/src/shadcn-ui/ui/tooltip/TooltipTrigger.vue +13 -0
- package/src/shadcn-ui/ui/tooltip/index.ts +4 -0
- package/src/shadcn-ui/ui/tree/index.ts +4 -0
- package/src/shadcn-ui/ui/tree/tree.vue +689 -0
- package/src/shadcn-ui/ui/tree/types.ts +70 -0
- package/src/styles/index.css +9 -0
- package/src/tabs-ui/components/index.ts +2 -0
- package/src/tabs-ui/components/tabs/tabs.vue +150 -0
- package/src/tabs-ui/components/tabs-chrome/tabs.vue +211 -0
- package/src/tabs-ui/components/widgets/index.ts +3 -0
- package/src/tabs-ui/components/widgets/tool-more.vue +18 -0
- package/src/tabs-ui/components/widgets/tool-refresh.vue +18 -0
- package/src/tabs-ui/components/widgets/tool-screen.vue +19 -0
- package/src/tabs-ui/index.ts +3 -0
- package/src/tabs-ui/tabs-view.vue +106 -0
- package/src/tabs-ui/types.ts +73 -0
- package/src/tabs-ui/use-tabs-drag.ts +129 -0
- package/src/tabs-ui/use-tabs-view-scroll.ts +202 -0
- package/src/types/shims.d.ts +2 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Component } from 'vue';
|
|
2
|
+
|
|
3
|
+
import type { BreadcrumbStyleType } from '@melt-js/libs-vben/typings';
|
|
4
|
+
|
|
5
|
+
export interface IBreadcrumb {
|
|
6
|
+
icon?: Component | string;
|
|
7
|
+
isHome?: boolean;
|
|
8
|
+
items?: IBreadcrumb[];
|
|
9
|
+
path?: string;
|
|
10
|
+
title?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface BreadcrumbProps {
|
|
14
|
+
breadcrumbs: IBreadcrumb[];
|
|
15
|
+
showIcon?: boolean;
|
|
16
|
+
styleType?: BreadcrumbStyleType;
|
|
17
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { cn } from '@melt-js/libs-vben/shared/utils';
|
|
3
|
+
|
|
4
|
+
defineOptions({ name: 'VbenButtonGroup' });
|
|
5
|
+
|
|
6
|
+
withDefaults(
|
|
7
|
+
defineProps<{
|
|
8
|
+
border?: boolean;
|
|
9
|
+
gap?: number;
|
|
10
|
+
size?: 'large' | 'middle' | 'small';
|
|
11
|
+
}>(),
|
|
12
|
+
{ border: false, gap: 0, size: 'middle' },
|
|
13
|
+
);
|
|
14
|
+
</script>
|
|
15
|
+
<template>
|
|
16
|
+
<div
|
|
17
|
+
:class="
|
|
18
|
+
cn(
|
|
19
|
+
'vben-button-group rounded-md',
|
|
20
|
+
`size-${size}`,
|
|
21
|
+
gap ? 'with-gap' : 'no-gap',
|
|
22
|
+
$attrs.class as string,
|
|
23
|
+
)
|
|
24
|
+
"
|
|
25
|
+
:style="{ gap: gap ? `${gap}px` : '0px' }"
|
|
26
|
+
>
|
|
27
|
+
<slot></slot>
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<style lang="scss" scoped>
|
|
32
|
+
.vben-button-group {
|
|
33
|
+
display: inline-flex;
|
|
34
|
+
|
|
35
|
+
&.size-large :deep(button) {
|
|
36
|
+
height: 2.25rem;
|
|
37
|
+
padding: 0.5rem 0.75rem;
|
|
38
|
+
font-size: 0.875rem;
|
|
39
|
+
line-height: 1.25rem;
|
|
40
|
+
|
|
41
|
+
.icon-wrapper {
|
|
42
|
+
margin-right: 0.4rem;
|
|
43
|
+
|
|
44
|
+
svg {
|
|
45
|
+
width: 1rem;
|
|
46
|
+
height: 1rem;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&.size-middle :deep(button) {
|
|
52
|
+
height: 2rem;
|
|
53
|
+
padding: 0.25rem 0.5rem;
|
|
54
|
+
font-size: 0.75rem;
|
|
55
|
+
line-height: 1rem;
|
|
56
|
+
|
|
57
|
+
.icon-wrapper {
|
|
58
|
+
margin-right: 0.2rem;
|
|
59
|
+
|
|
60
|
+
svg {
|
|
61
|
+
width: 0.75rem;
|
|
62
|
+
height: 0.75rem;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&.size-small :deep(button) {
|
|
68
|
+
height: 1.75rem;
|
|
69
|
+
padding: 0.2rem 0.4rem;
|
|
70
|
+
font-size: 0.65rem;
|
|
71
|
+
line-height: 0.75rem;
|
|
72
|
+
|
|
73
|
+
.icon-wrapper {
|
|
74
|
+
margin-right: 0.1rem;
|
|
75
|
+
|
|
76
|
+
svg {
|
|
77
|
+
width: 0.65rem;
|
|
78
|
+
height: 0.65rem;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&.no-gap > :deep(button):nth-of-type(1) {
|
|
84
|
+
border-radius: calc(var(--radius) - 2px) 0 0 calc(var(--radius) - 2px);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&.no-gap > :deep(button):last-of-type {
|
|
88
|
+
border-radius: 0 calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&.no-gap {
|
|
92
|
+
:deep(button + button) {
|
|
93
|
+
border-left-width: 0;
|
|
94
|
+
border-radius: 0;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
</style>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { AsTag } from 'reka-ui';
|
|
2
|
+
|
|
3
|
+
import type { Component } from 'vue';
|
|
4
|
+
|
|
5
|
+
import type { ButtonVariants } from '../../ui';
|
|
6
|
+
|
|
7
|
+
export interface VbenButtonProps {
|
|
8
|
+
/**
|
|
9
|
+
* The element or component this component should render as. Can be overwrite by `asChild`
|
|
10
|
+
* @defaultValue "div"
|
|
11
|
+
*/
|
|
12
|
+
as?: AsTag | Component;
|
|
13
|
+
/**
|
|
14
|
+
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
15
|
+
*
|
|
16
|
+
* Read our [Composition](https://www.reka-ui.com/docs/guides/composition) guide for more details.
|
|
17
|
+
*/
|
|
18
|
+
asChild?: boolean;
|
|
19
|
+
class?: any;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
loading?: boolean;
|
|
22
|
+
size?: ButtonVariants['size'];
|
|
23
|
+
variant?: ButtonVariants['variant'];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type CustomRenderType = (() => Component | string) | string;
|
|
27
|
+
|
|
28
|
+
export type ValueType = boolean | number | string;
|
|
29
|
+
|
|
30
|
+
export interface VbenButtonGroupProps extends Pick<
|
|
31
|
+
VbenButtonProps,
|
|
32
|
+
'disabled'
|
|
33
|
+
> {
|
|
34
|
+
/** 单选模式下允许清除选中 */
|
|
35
|
+
allowClear?: boolean;
|
|
36
|
+
/** 值改变前的回调 */
|
|
37
|
+
beforeChange?: (
|
|
38
|
+
value: ValueType,
|
|
39
|
+
isChecked: boolean,
|
|
40
|
+
) => boolean | PromiseLike<boolean | undefined> | undefined;
|
|
41
|
+
/** 按钮样式 */
|
|
42
|
+
btnClass?: any;
|
|
43
|
+
/** 按钮间隔距离 */
|
|
44
|
+
gap?: number;
|
|
45
|
+
/** 多选模式下限制最多选择的数量。0表示不限制 */
|
|
46
|
+
maxCount?: number;
|
|
47
|
+
/** 是否允许多选 */
|
|
48
|
+
multiple?: boolean;
|
|
49
|
+
/** 选项 */
|
|
50
|
+
options?: { [key: string]: any; label: CustomRenderType; value: ValueType }[];
|
|
51
|
+
/** 显示图标 */
|
|
52
|
+
showIcon?: boolean;
|
|
53
|
+
/** 尺寸 */
|
|
54
|
+
size?: 'large' | 'middle' | 'small';
|
|
55
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { VbenButtonProps } from './button';
|
|
3
|
+
|
|
4
|
+
import { computed } from 'vue';
|
|
5
|
+
|
|
6
|
+
import { LoaderCircle } from '@melt-js/libs-vben/core-icons';
|
|
7
|
+
import { cn } from '@melt-js/libs-vben/shared/utils';
|
|
8
|
+
|
|
9
|
+
import { Primitive } from 'reka-ui';
|
|
10
|
+
|
|
11
|
+
import { buttonVariants } from '../../ui';
|
|
12
|
+
|
|
13
|
+
interface Props extends VbenButtonProps {}
|
|
14
|
+
|
|
15
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
16
|
+
as: 'button',
|
|
17
|
+
class: '',
|
|
18
|
+
disabled: false,
|
|
19
|
+
loading: false,
|
|
20
|
+
size: 'default',
|
|
21
|
+
variant: 'default',
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
const isDisabled = computed(() => {
|
|
25
|
+
return props.disabled || props.loading;
|
|
26
|
+
});
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<template>
|
|
30
|
+
<Primitive
|
|
31
|
+
:as="as"
|
|
32
|
+
:as-child="asChild"
|
|
33
|
+
:class="cn(buttonVariants({ variant, size }), props.class)"
|
|
34
|
+
:disabled="isDisabled"
|
|
35
|
+
>
|
|
36
|
+
<LoaderCircle
|
|
37
|
+
v-if="loading"
|
|
38
|
+
class="text-md mr-2 size-4 shrink-0 animate-spin"
|
|
39
|
+
/>
|
|
40
|
+
<slot></slot>
|
|
41
|
+
</Primitive>
|
|
42
|
+
</template>
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import type { Arrayable } from '@vueuse/core';
|
|
3
|
+
|
|
4
|
+
import type { ValueType, VbenButtonGroupProps } from './button';
|
|
5
|
+
|
|
6
|
+
import { computed, ref, watch } from 'vue';
|
|
7
|
+
|
|
8
|
+
import { Circle, CircleCheckBig, LoaderCircle } from '@melt-js/libs-vben/core-icons';
|
|
9
|
+
import { cn, isFunction } from '@melt-js/libs-vben/shared/utils';
|
|
10
|
+
|
|
11
|
+
import { objectOmit } from '@vueuse/core';
|
|
12
|
+
|
|
13
|
+
import { VbenRenderContent } from '../render-content';
|
|
14
|
+
import VbenButtonGroup from './button-group.vue';
|
|
15
|
+
import Button from './button.vue';
|
|
16
|
+
|
|
17
|
+
const props = withDefaults(defineProps<VbenButtonGroupProps>(), {
|
|
18
|
+
gap: 0,
|
|
19
|
+
multiple: false,
|
|
20
|
+
showIcon: true,
|
|
21
|
+
size: 'middle',
|
|
22
|
+
allowClear: false,
|
|
23
|
+
maxCount: 0,
|
|
24
|
+
});
|
|
25
|
+
const emit = defineEmits(['btnClick']);
|
|
26
|
+
const btnDefaultProps = computed(() => {
|
|
27
|
+
return {
|
|
28
|
+
...objectOmit(props, ['options', 'btnClass', 'size', 'disabled']),
|
|
29
|
+
class: cn(props.btnClass),
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
const modelValue = defineModel<Arrayable<ValueType> | undefined>();
|
|
33
|
+
|
|
34
|
+
const innerValue = ref<Array<ValueType>>([]);
|
|
35
|
+
const loadingValues = ref<Array<ValueType>>([]);
|
|
36
|
+
watch(
|
|
37
|
+
() => props.multiple,
|
|
38
|
+
(val) => {
|
|
39
|
+
if (val) {
|
|
40
|
+
modelValue.value = innerValue.value;
|
|
41
|
+
} else {
|
|
42
|
+
modelValue.value =
|
|
43
|
+
innerValue.value.length > 0 ? innerValue.value[0] : undefined;
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
watch(
|
|
49
|
+
() => modelValue.value,
|
|
50
|
+
(val) => {
|
|
51
|
+
if (Array.isArray(val)) {
|
|
52
|
+
const arrVal = val.filter((v) => v !== undefined);
|
|
53
|
+
if (arrVal.length > 0) {
|
|
54
|
+
innerValue.value = props.multiple
|
|
55
|
+
? [...arrVal]
|
|
56
|
+
: [arrVal[0] as ValueType];
|
|
57
|
+
} else {
|
|
58
|
+
innerValue.value = [];
|
|
59
|
+
}
|
|
60
|
+
} else {
|
|
61
|
+
innerValue.value = val === undefined ? [] : [val as ValueType];
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
{ deep: true, immediate: true },
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
async function onBtnClick(value: ValueType) {
|
|
68
|
+
if (props.beforeChange && isFunction(props.beforeChange)) {
|
|
69
|
+
try {
|
|
70
|
+
loadingValues.value.push(value);
|
|
71
|
+
const canChange = await props.beforeChange(
|
|
72
|
+
value,
|
|
73
|
+
!innerValue.value.includes(value),
|
|
74
|
+
);
|
|
75
|
+
if (canChange === false) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
} finally {
|
|
79
|
+
loadingValues.value.splice(loadingValues.value.indexOf(value), 1);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if (props.multiple) {
|
|
84
|
+
if (innerValue.value.includes(value)) {
|
|
85
|
+
innerValue.value = innerValue.value.filter((item) => item !== value);
|
|
86
|
+
} else {
|
|
87
|
+
if (props.maxCount > 0 && innerValue.value.length >= props.maxCount) {
|
|
88
|
+
innerValue.value = innerValue.value.slice(0, props.maxCount - 1);
|
|
89
|
+
}
|
|
90
|
+
innerValue.value.push(value);
|
|
91
|
+
}
|
|
92
|
+
modelValue.value = innerValue.value;
|
|
93
|
+
} else {
|
|
94
|
+
if (props.allowClear && innerValue.value.includes(value)) {
|
|
95
|
+
innerValue.value = [];
|
|
96
|
+
modelValue.value = undefined;
|
|
97
|
+
emit('btnClick', undefined);
|
|
98
|
+
return;
|
|
99
|
+
} else {
|
|
100
|
+
innerValue.value = [value];
|
|
101
|
+
modelValue.value = value;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
emit('btnClick', value);
|
|
105
|
+
}
|
|
106
|
+
</script>
|
|
107
|
+
<template>
|
|
108
|
+
<VbenButtonGroup
|
|
109
|
+
:size="props.size"
|
|
110
|
+
:gap="props.gap"
|
|
111
|
+
class="vben-check-button-group"
|
|
112
|
+
>
|
|
113
|
+
<Button
|
|
114
|
+
v-for="(btn, index) in props.options"
|
|
115
|
+
:key="index"
|
|
116
|
+
:class="cn('border', props.btnClass)"
|
|
117
|
+
:disabled="
|
|
118
|
+
props.disabled ||
|
|
119
|
+
loadingValues.includes(btn.value) ||
|
|
120
|
+
(!props.multiple && loadingValues.length > 0)
|
|
121
|
+
"
|
|
122
|
+
v-bind="btnDefaultProps"
|
|
123
|
+
:variant="innerValue.includes(btn.value) ? 'default' : 'outline'"
|
|
124
|
+
@click="onBtnClick(btn.value)"
|
|
125
|
+
type="button"
|
|
126
|
+
>
|
|
127
|
+
<div class="icon-wrapper" v-if="props.showIcon">
|
|
128
|
+
<slot
|
|
129
|
+
name="icon"
|
|
130
|
+
:loading="loadingValues.includes(btn.value)"
|
|
131
|
+
:checked="innerValue.includes(btn.value)"
|
|
132
|
+
>
|
|
133
|
+
<LoaderCircle
|
|
134
|
+
class="animate-spin"
|
|
135
|
+
v-if="loadingValues.includes(btn.value)"
|
|
136
|
+
/>
|
|
137
|
+
<CircleCheckBig v-else-if="innerValue.includes(btn.value)" />
|
|
138
|
+
<Circle v-else />
|
|
139
|
+
</slot>
|
|
140
|
+
</div>
|
|
141
|
+
<slot name="option" :label="btn.label" :value="btn.value" :data="btn">
|
|
142
|
+
<VbenRenderContent :content="btn.label" />
|
|
143
|
+
</slot>
|
|
144
|
+
</Button>
|
|
145
|
+
</VbenButtonGroup>
|
|
146
|
+
</template>
|
|
147
|
+
<style lang="scss" scoped>
|
|
148
|
+
.vben-check-button-group {
|
|
149
|
+
display: flex;
|
|
150
|
+
flex-wrap: wrap;
|
|
151
|
+
|
|
152
|
+
&:deep(.size-large) button {
|
|
153
|
+
.icon-wrapper {
|
|
154
|
+
margin-right: 0.3rem;
|
|
155
|
+
|
|
156
|
+
svg {
|
|
157
|
+
width: 1rem;
|
|
158
|
+
height: 1rem;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
&:deep(.size-middle) button {
|
|
164
|
+
.icon-wrapper {
|
|
165
|
+
margin-right: 0.2rem;
|
|
166
|
+
|
|
167
|
+
svg {
|
|
168
|
+
width: 0.75rem;
|
|
169
|
+
height: 0.75rem;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
&:deep(.size-small) button {
|
|
175
|
+
.icon-wrapper {
|
|
176
|
+
margin-right: 0.1rem;
|
|
177
|
+
|
|
178
|
+
svg {
|
|
179
|
+
width: 0.65rem;
|
|
180
|
+
height: 0.65rem;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
&.no-gap > :deep(button):nth-of-type(1) {
|
|
186
|
+
border-right-width: 0;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
&.no-gap {
|
|
190
|
+
:deep(button + button) {
|
|
191
|
+
margin-right: -1px;
|
|
192
|
+
border-left-width: 1px;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
</style>
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { ButtonVariants } from '../../ui';
|
|
3
|
+
import type { VbenButtonProps } from './button';
|
|
4
|
+
|
|
5
|
+
import { computed, useSlots } from 'vue';
|
|
6
|
+
|
|
7
|
+
import { cn } from '@melt-js/libs-vben/shared/utils';
|
|
8
|
+
|
|
9
|
+
import { VbenTooltip } from '../tooltip';
|
|
10
|
+
import VbenButton from './button.vue';
|
|
11
|
+
|
|
12
|
+
interface Props extends VbenButtonProps {
|
|
13
|
+
class?: any;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
onClick?: ((e?: MouseEvent) => void)[] | ((e?: MouseEvent) => void);
|
|
16
|
+
tooltip?: string;
|
|
17
|
+
tooltipDelayDuration?: number;
|
|
18
|
+
tooltipSide?: 'bottom' | 'left' | 'right' | 'top';
|
|
19
|
+
variant?: ButtonVariants['variant'];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
23
|
+
disabled: false,
|
|
24
|
+
onClick: () => {},
|
|
25
|
+
tooltipDelayDuration: 200,
|
|
26
|
+
tooltipSide: 'bottom',
|
|
27
|
+
variant: 'ghost',
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
const slots = useSlots();
|
|
31
|
+
|
|
32
|
+
const showTooltip = computed(() => !!slots.tooltip || !!props.tooltip);
|
|
33
|
+
|
|
34
|
+
function handleClick(e: MouseEvent) {
|
|
35
|
+
if (Array.isArray(props.onClick)) {
|
|
36
|
+
for (const fn of props.onClick) {
|
|
37
|
+
fn?.(e);
|
|
38
|
+
}
|
|
39
|
+
} else {
|
|
40
|
+
props.onClick?.(e);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
<template>
|
|
46
|
+
<VbenButton
|
|
47
|
+
v-if="!showTooltip"
|
|
48
|
+
:class="cn('rounded-full', props.class)"
|
|
49
|
+
:disabled="disabled"
|
|
50
|
+
:variant="variant"
|
|
51
|
+
size="icon"
|
|
52
|
+
@click="handleClick"
|
|
53
|
+
>
|
|
54
|
+
<slot></slot>
|
|
55
|
+
</VbenButton>
|
|
56
|
+
|
|
57
|
+
<VbenTooltip
|
|
58
|
+
v-else
|
|
59
|
+
:delay-duration="tooltipDelayDuration"
|
|
60
|
+
:side="tooltipSide"
|
|
61
|
+
>
|
|
62
|
+
<template #trigger>
|
|
63
|
+
<VbenButton
|
|
64
|
+
:class="cn('rounded-full', props.class)"
|
|
65
|
+
:disabled="disabled"
|
|
66
|
+
:variant="variant"
|
|
67
|
+
size="icon"
|
|
68
|
+
@click="handleClick"
|
|
69
|
+
>
|
|
70
|
+
<slot></slot>
|
|
71
|
+
</VbenButton>
|
|
72
|
+
</template>
|
|
73
|
+
<slot v-if="slots.tooltip" name="tooltip"> </slot>
|
|
74
|
+
<template v-else>
|
|
75
|
+
{{ tooltip }}
|
|
76
|
+
</template>
|
|
77
|
+
</VbenTooltip>
|
|
78
|
+
</template>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type * from './button';
|
|
2
|
+
export { default as VbenButtonGroup } from './button-group.vue';
|
|
3
|
+
export { default as VbenButton } from './button.vue';
|
|
4
|
+
export { default as VbenCheckButtonGroup } from './check-button-group.vue';
|
|
5
|
+
export { default as VbenIconButton } from './icon-button.vue';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { CheckboxRootEmits, CheckboxRootProps } from 'reka-ui';
|
|
3
|
+
|
|
4
|
+
import { useId } from 'vue';
|
|
5
|
+
|
|
6
|
+
import { useForwardPropsEmits } from 'reka-ui';
|
|
7
|
+
|
|
8
|
+
import { Checkbox } from '../../ui/checkbox';
|
|
9
|
+
|
|
10
|
+
const props = defineProps<CheckboxRootProps & { indeterminate?: boolean }>();
|
|
11
|
+
|
|
12
|
+
const emits = defineEmits<CheckboxRootEmits>();
|
|
13
|
+
|
|
14
|
+
const checked = defineModel<boolean>();
|
|
15
|
+
|
|
16
|
+
const forwarded = useForwardPropsEmits(props, emits);
|
|
17
|
+
|
|
18
|
+
const id = useId();
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<template>
|
|
22
|
+
<div class="flex items-center">
|
|
23
|
+
<Checkbox v-bind="forwarded" :id="id" v-model="checked" />
|
|
24
|
+
<label :for="id" class="ml-2 cursor-pointer text-sm"> <slot></slot> </label>
|
|
25
|
+
</div>
|
|
26
|
+
</template>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as VbenCheckbox } from './checkbox.vue';
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { CollapsibleParamSchema } from './type';
|
|
3
|
+
|
|
4
|
+
import { computed } from 'vue';
|
|
5
|
+
|
|
6
|
+
import { globalShareState } from '@melt-js/libs-vben/shared/global-state';
|
|
7
|
+
|
|
8
|
+
interface Props {
|
|
9
|
+
data: CollapsibleParamSchema;
|
|
10
|
+
}
|
|
11
|
+
const props = defineProps<Props>();
|
|
12
|
+
|
|
13
|
+
const modelValue = defineModel('value');
|
|
14
|
+
|
|
15
|
+
const finalOption = computed(() => {
|
|
16
|
+
const { type, ...otherOption } = props.data.option;
|
|
17
|
+
|
|
18
|
+
if (type === 'number' || type === 'exponential') {
|
|
19
|
+
return {
|
|
20
|
+
step: props.data.option.step ?? 1,
|
|
21
|
+
min: props.data.option.min,
|
|
22
|
+
max: props.data.option.max,
|
|
23
|
+
precision: props.data.option.precision,
|
|
24
|
+
...otherOption,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return otherOption;
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
const components = globalShareState.getComponents();
|
|
32
|
+
|
|
33
|
+
const FieldComponent = computed(() => {
|
|
34
|
+
switch (props.data.option.type) {
|
|
35
|
+
case 'exponential':
|
|
36
|
+
case 'number': {
|
|
37
|
+
return components.InputNumber;
|
|
38
|
+
}
|
|
39
|
+
case 'select': {
|
|
40
|
+
return components.Select;
|
|
41
|
+
}
|
|
42
|
+
case 'string': {
|
|
43
|
+
return components.Input;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
default: {
|
|
47
|
+
return components.InputNumber;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
const limitDisplay = computed(() => {
|
|
53
|
+
if (
|
|
54
|
+
props.data.option.min !== null &&
|
|
55
|
+
props.data.option.min !== undefined &&
|
|
56
|
+
props.data.option.max !== null &&
|
|
57
|
+
props.data.option.max !== undefined
|
|
58
|
+
) {
|
|
59
|
+
return `[${props.data.option.min},${props.data.option.max}]`;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (props.data.option.min !== null && props.data.option.min !== undefined) {
|
|
63
|
+
return `min:${props.data.option.min}`;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if (props.data.option.max !== null && props.data.option.max !== undefined) {
|
|
67
|
+
return `max:${props.data.option.max}`;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return '';
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
function reset() {
|
|
74
|
+
modelValue.value = props.data.defaultValue;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
defineExpose({
|
|
78
|
+
reset,
|
|
79
|
+
});
|
|
80
|
+
</script>
|
|
81
|
+
|
|
82
|
+
<template>
|
|
83
|
+
<div
|
|
84
|
+
class="body-row flex items-center w-full flex-nowrap not-last-of-type:border-b"
|
|
85
|
+
>
|
|
86
|
+
<div
|
|
87
|
+
class="body-cell pt-2 pb-2 px-5 leading-[1.5rem] flex items-center flex-nowrap"
|
|
88
|
+
>
|
|
89
|
+
{{ data.key }}
|
|
90
|
+
</div>
|
|
91
|
+
<div
|
|
92
|
+
class="body-cell pt-2 pb-2 px-5 leading-[1.5rem] flex items-center flex-nowrap"
|
|
93
|
+
>
|
|
94
|
+
<div class="flex-auto w-full">
|
|
95
|
+
<component
|
|
96
|
+
:is="FieldComponent"
|
|
97
|
+
v-bind="finalOption"
|
|
98
|
+
v-model:value="modelValue"
|
|
99
|
+
/>
|
|
100
|
+
</div>
|
|
101
|
+
<div class="flex items-center flex-none text-muted-foreground pl-2 gap-2">
|
|
102
|
+
<span v-if="limitDisplay">
|
|
103
|
+
{{ limitDisplay }}
|
|
104
|
+
</span>
|
|
105
|
+
<span v-if="data.option.step && data.option.step !== 1">
|
|
106
|
+
step:{{ data.option.step }}
|
|
107
|
+
</span>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
<div
|
|
111
|
+
class="body-cell pt-2 pb-2 px-5 leading-[1.5rem] flex items-center flex-nowrap w-full"
|
|
112
|
+
>
|
|
113
|
+
<p
|
|
114
|
+
class="line-clamp-2"
|
|
115
|
+
v-tippy="{
|
|
116
|
+
content: data.description,
|
|
117
|
+
}"
|
|
118
|
+
>
|
|
119
|
+
{{ data.description }}
|
|
120
|
+
</p>
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
</template>
|