@mtn-ui/components 0.0.7 → 0.0.9

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.
Files changed (45) hide show
  1. package/dist/button/index.js +1 -1
  2. package/dist/chunks/{Button.vue_vue_type_script_setup_true_lang-C2Vc6-OE.js → Button.vue_vue_type_script_setup_true_lang-C7ip0O23.js} +73 -66
  3. package/dist/chunks/{Button.vue_vue_type_script_setup_true_lang-C2Vc6-OE.js.map → Button.vue_vue_type_script_setup_true_lang-C7ip0O23.js.map} +1 -1
  4. package/dist/index/index.js +24198 -14622
  5. package/dist/index/index.js.map +1 -1
  6. package/dist/index/style.css +1 -1
  7. package/dist/resolver/index.js +8 -6
  8. package/dist/resolver/index.js.map +1 -1
  9. package/dist/types/base-modal/BaseModal.d.ts +25 -0
  10. package/dist/types/base-modal/index.d.ts +1 -0
  11. package/dist/types/button/Button.d.ts +1 -1
  12. package/dist/types/confirm-button/ConfirmButton.d.ts +10 -1
  13. package/dist/types/confirm-button/types.d.ts +1 -1
  14. package/dist/types/copy-text/CopyText.d.ts +45 -0
  15. package/dist/types/copy-text/index.d.ts +2 -0
  16. package/dist/types/copy-text/types.d.ts +15 -0
  17. package/dist/types/delete-button/DeleteButton.d.ts +8 -0
  18. package/dist/types/delete-button/types.d.ts +1 -1
  19. package/dist/types/dict-badge/types.d.ts +1 -1
  20. package/dist/types/dict-checkbox/types.d.ts +1 -1
  21. package/dist/types/dict-radio/types.d.ts +1 -1
  22. package/dist/types/dict-select/types.d.ts +1 -1
  23. package/dist/types/dict-tag/types.d.ts +1 -1
  24. package/dist/types/form/Form.d.ts +34 -0
  25. package/dist/types/form/context.d.ts +19 -0
  26. package/dist/types/form/index.d.ts +2 -0
  27. package/dist/types/form-item/types.d.ts +1 -1
  28. package/dist/types/form-renderer/types.d.ts +8 -0
  29. package/dist/types/index.d.ts +10 -1
  30. package/dist/types/section-title/SectionTitle.d.ts +42 -0
  31. package/dist/types/section-title/index.d.ts +2 -0
  32. package/dist/types/section-title/types.d.ts +12 -0
  33. package/dist/types/section-title/variants.d.ts +7 -0
  34. package/dist/types/table/Table.d.ts +84 -0
  35. package/dist/types/table/components/TableColumnConfigurator.d.ts +50 -0
  36. package/dist/types/table/components/TableDensityControl.d.ts +34 -0
  37. package/dist/types/table/components/TableSearchBar.d.ts +46 -0
  38. package/dist/types/table/components/TableToolbar.d.ts +48 -0
  39. package/dist/types/table/index.d.ts +5 -0
  40. package/dist/types/table/types.d.ts +97 -0
  41. package/dist/types/table-action-group/TableActionGroup.d.ts +33 -0
  42. package/dist/types/table-action-group/TableActionItem.d.ts +16 -0
  43. package/dist/types/table-action-group/index.d.ts +2 -0
  44. package/dist/types/table-action-group/types.d.ts +25 -0
  45. package/package.json +3 -2
@@ -1 +1 @@
1
- @source "./**/*.{vue,ts,js,tsx,jsx}";.mtn-action-group-wrapper[data-v-6a4e52d6]{width:100%;position:relative;display:inline-block}.mtn-action-group-measure[data-v-6a4e52d6]{position:absolute;top:0;left:0;visibility:hidden;pointer-events:none;display:flex;white-space:nowrap}.measure-item[data-v-6a4e52d6]{padding:0 16px;font-size:14px}.mtn-action-group-container[data-v-6a4e52d6]{display:flex;align-items:center}.mtn-color-picker[data-v-95fc5ac1]{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap}.mtn-color-picker__trigger[data-v-95fc5ac1]{position:relative;display:inline-block;border-radius:4px;overflow:hidden;border:1px solid var(--color-border-base, #dcdfe6);cursor:pointer}.mtn-color-picker--small .mtn-color-picker__trigger[data-v-95fc5ac1]{width:24px;height:24px}.mtn-color-picker--middle .mtn-color-picker__trigger[data-v-95fc5ac1]{width:32px;height:32px}.mtn-color-picker--large .mtn-color-picker__trigger[data-v-95fc5ac1]{width:40px;height:40px}.mtn-color-picker__native[data-v-95fc5ac1]{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;opacity:0;cursor:pointer;border:none;padding:0}.mtn-color-picker__native[data-v-95fc5ac1]:disabled{cursor:not-allowed}.mtn-color-picker__swatch[data-v-95fc5ac1]{display:block;width:100%;height:100%;border-radius:2px}.mtn-color-picker__hex[data-v-95fc5ac1]{width:90px;padding:4px 8px;font-size:12px;font-family:ui-monospace,monospace;border:1px solid var(--color-border-base, #dcdfe6);border-radius:4px;outline:none}.mtn-color-picker__hex[data-v-95fc5ac1]:focus{border-color:var(--color-primary, #409eff);box-shadow:0 0 0 2px #409eff33}.mtn-color-picker__hex[data-v-95fc5ac1]:disabled{background:var(--color-bg-base, #f5f7fa);cursor:not-allowed}.mtn-color-picker--small .mtn-color-picker__hex[data-v-95fc5ac1]{padding:2px 6px;font-size:11px;width:72px}.mtn-color-picker--large .mtn-color-picker__hex[data-v-95fc5ac1]{padding:6px 10px;font-size:14px;width:100px}.mtn-color-picker__apply[data-v-95fc5ac1]{padding:4px 12px;font-size:12px;color:var(--color-primary, #409eff);background:transparent;border:1px solid var(--color-primary, #409eff);border-radius:4px;cursor:pointer;transition:all .2s}.mtn-color-picker__apply[data-v-95fc5ac1]:hover:not(:disabled){color:#fff;background:var(--color-primary, #409eff)}.mtn-color-picker__apply[data-v-95fc5ac1]:disabled{opacity:.5;cursor:not-allowed}.mtn-color-picker--small .mtn-color-picker__apply[data-v-95fc5ac1]{padding:2px 8px;font-size:11px}.mtn-color-picker--large .mtn-color-picker__apply[data-v-95fc5ac1]{padding:6px 16px;font-size:14px}.mtn-form-item__label-icon[data-v-bd63853e]{margin-bottom:2px}.mtn-content-container[data-v-0d6736e8]{box-sizing:border-box;background:#fff}.mtn-content-container.mtn-content-container--dark[data-v-0d6736e8]{background:#141414}.mtn-auto-tooltip__text[data-v-9de4908e]{display:inline-block;max-width:100%;vertical-align:middle}.mtn-auto-tooltip__text--single[data-v-9de4908e]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mtn-auto-tooltip__text--multiline[data-v-9de4908e]{overflow:hidden;white-space:normal}.mtn-dict-radio--vertical[data-v-b1285642],.mtn-dict-checkbox--vertical[data-v-736ed517]{display:flex;flex-direction:column;gap:8px}.mtn-search-bar[data-v-0b796aff]{margin-bottom:16px}.mtn-search-bar__row[data-v-0b796aff]{margin-bottom:0}.mtn-search-bar__actions[data-v-0b796aff]{display:flex;align-items:center;gap:8px;margin-top:16px}.mtn-search-bar--config .mtn-search-bar__form-inline[data-v-0b796aff]{display:flex;flex-wrap:wrap;gap:0 4px;align-items:flex-start}.mtn-search-bar--config .mtn-search-bar__form-item[data-v-0b796aff]{margin-bottom:16px;margin-inline-end:8px}.mtn-search-bar--config .mtn-search-bar__form-item--expand[data-v-0b796aff]{margin-inline-start:8px}.mtn-search-bar__expand-btn[data-v-0b796aff]{padding-inline:0}.mtn-search-bar__advanced[data-v-0b796aff]{margin-top:4px;padding:24px 16px 8px;background:#00000005;border-radius:8px}.mtn-search-bar__advanced-form[data-v-0b796aff],.mtn-search-bar__advanced-row[data-v-0b796aff]{margin-bottom:0}.mtn-search-bar__advanced-item[data-v-0b796aff]{margin-bottom:16px}
1
+ @source "./**/*.{vue,ts,js,tsx,jsx}";.mtn-action-group-wrapper[data-v-6a4e52d6]{width:100%;position:relative;display:inline-block}.mtn-action-group-measure[data-v-6a4e52d6]{position:absolute;top:0;left:0;visibility:hidden;pointer-events:none;display:flex;white-space:nowrap}.measure-item[data-v-6a4e52d6]{padding:0 16px;font-size:14px}.mtn-action-group-container[data-v-6a4e52d6]{display:flex;align-items:center}.mtn-color-picker[data-v-95fc5ac1]{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap}.mtn-color-picker__trigger[data-v-95fc5ac1]{position:relative;display:inline-block;border-radius:4px;overflow:hidden;border:1px solid var(--color-border-base, #dcdfe6);cursor:pointer}.mtn-color-picker--small .mtn-color-picker__trigger[data-v-95fc5ac1]{width:24px;height:24px}.mtn-color-picker--middle .mtn-color-picker__trigger[data-v-95fc5ac1]{width:32px;height:32px}.mtn-color-picker--large .mtn-color-picker__trigger[data-v-95fc5ac1]{width:40px;height:40px}.mtn-color-picker__native[data-v-95fc5ac1]{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;opacity:0;cursor:pointer;border:none;padding:0}.mtn-color-picker__native[data-v-95fc5ac1]:disabled{cursor:not-allowed}.mtn-color-picker__swatch[data-v-95fc5ac1]{display:block;width:100%;height:100%;border-radius:2px}.mtn-color-picker__hex[data-v-95fc5ac1]{width:90px;padding:4px 8px;font-size:12px;font-family:ui-monospace,monospace;border:1px solid var(--color-border-base, #dcdfe6);border-radius:4px;outline:none}.mtn-color-picker__hex[data-v-95fc5ac1]:focus{border-color:var(--color-primary, #409eff);box-shadow:0 0 0 2px #409eff33}.mtn-color-picker__hex[data-v-95fc5ac1]:disabled{background:var(--color-bg-base, #f5f7fa);cursor:not-allowed}.mtn-color-picker--small .mtn-color-picker__hex[data-v-95fc5ac1]{padding:2px 6px;font-size:11px;width:72px}.mtn-color-picker--large .mtn-color-picker__hex[data-v-95fc5ac1]{padding:6px 10px;font-size:14px;width:100px}.mtn-color-picker__apply[data-v-95fc5ac1]{padding:4px 12px;font-size:12px;color:var(--color-primary, #409eff);background:transparent;border:1px solid var(--color-primary, #409eff);border-radius:4px;cursor:pointer;transition:all .2s}.mtn-color-picker__apply[data-v-95fc5ac1]:hover:not(:disabled){color:#fff;background:var(--color-primary, #409eff)}.mtn-color-picker__apply[data-v-95fc5ac1]:disabled{opacity:.5;cursor:not-allowed}.mtn-color-picker--small .mtn-color-picker__apply[data-v-95fc5ac1]{padding:2px 8px;font-size:11px}.mtn-color-picker--large .mtn-color-picker__apply[data-v-95fc5ac1]{padding:6px 16px;font-size:14px}.mtn-form-item__label[data-v-5f05a3fb]{display:inline-flex;align-items:flex-start;gap:4px;max-width:100%}.mtn-form-item__label-text[data-v-5f05a3fb]{white-space:normal;word-break:break-word;line-height:22px}.mtn-form-item__label-icon[data-v-5f05a3fb]{flex:none;margin-top:4px}.mtn-content-container[data-v-0d6736e8]{box-sizing:border-box;background:#fff}.mtn-content-container.mtn-content-container--dark[data-v-0d6736e8]{background:#141414}.mtn-auto-tooltip__text[data-v-9de4908e]{display:inline-block;max-width:100%;vertical-align:middle}.mtn-auto-tooltip__text--single[data-v-9de4908e]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mtn-auto-tooltip__text--multiline[data-v-9de4908e]{overflow:hidden;white-space:normal}.mtn-copy-text[data-v-c42e60c9]{display:inline-flex;align-items:center;gap:6px}.mtn-copy-text__content[data-v-c42e60c9]{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mtn-copy-text__icon[data-v-c42e60c9]{cursor:pointer;color:#999;transition:color .2s,opacity .2s;flex-shrink:0;opacity:0}.mtn-copy-text__icon[data-v-c42e60c9]:hover{color:#1890ff}.mtn-copy-text:hover .mtn-copy-text__icon[data-v-c42e60c9]{opacity:1;color:#1890ff}.mtn-copy-text__icon--always[data-v-c42e60c9]{opacity:1}.mtn-table-action-group[data-v-3a1b624d]{display:inline-flex;align-items:center;gap:8px}.mtn-table-action-group__item[data-v-3a1b624d]{flex-shrink:0}.mtn-table-action-group__more[data-v-3a1b624d]{cursor:pointer;color:#999;font-size:14px;transition:color .2s}.mtn-table-action-group__more[data-v-3a1b624d]:hover{color:#1890ff}.mtn-table-action-group__popover[data-v-3a1b624d]{display:flex;flex-direction:column;gap:4px}.mtn-table-action-group__popover-item[data-v-3a1b624d]{display:flex;align-items:center}.section-title__row[data-v-1fd2395f]{display:flex;align-items:center;flex-shrink:0}.section-title__text[data-v-1fd2395f]{display:inline-flex;position:relative;align-items:center;flex-shrink:1;min-width:0;color:var(--mtn-section-title-color, var(--mtn-text-primary, #303133));font-weight:500;font-size:16px;padding-left:16px;line-height:1}.section-title__text[data-v-1fd2395f]:after{content:"";position:absolute;top:50%;left:0;transform:translateY(-50%);width:4px;height:16px;border-radius:2px;background-color:var(--mtn-section-title-accent, var(--mtn-color-primary, #409eff))}.section-title__subtitle[data-v-1fd2395f]{flex-shrink:0;margin-left:8px;color:var(--mtn-section-title-subtitle-color, var(--mtn-text-secondary, #909399));font-size:12px;font-weight:400;line-height:1}.mtn-dict-radio--vertical[data-v-b1285642],.mtn-dict-checkbox--vertical[data-v-736ed517]{display:flex;flex-direction:column;gap:8px}.mtn-search-bar[data-v-0b796aff]{margin-bottom:16px}.mtn-search-bar__row[data-v-0b796aff]{margin-bottom:0}.mtn-search-bar__actions[data-v-0b796aff]{display:flex;align-items:center;gap:8px;margin-top:16px}.mtn-search-bar--config .mtn-search-bar__form-inline[data-v-0b796aff]{display:flex;flex-wrap:wrap;gap:0 4px;align-items:flex-start}.mtn-search-bar--config .mtn-search-bar__form-item[data-v-0b796aff]{margin-bottom:16px;margin-inline-end:8px}.mtn-search-bar--config .mtn-search-bar__form-item--expand[data-v-0b796aff]{margin-inline-start:8px}.mtn-search-bar__expand-btn[data-v-0b796aff]{padding-inline:0}.mtn-search-bar__advanced[data-v-0b796aff]{margin-top:4px;padding:24px 16px 8px;background:#00000005;border-radius:8px}.mtn-search-bar__advanced-form[data-v-0b796aff],.mtn-search-bar__advanced-row[data-v-0b796aff]{margin-bottom:0}.mtn-search-bar__advanced-item[data-v-0b796aff]{margin-bottom:16px}.mtn-table-search[data-v-b940b62a]{display:flex;flex-direction:column;gap:0}.mtn-table-search__basic[data-v-b940b62a]{display:flex;flex-wrap:wrap;gap:8px 4px;align-items:flex-start;align-content:flex-start}.mtn-table-search-expand[data-v-b940b62a]{display:flex;align-items:center;margin-right:12px}.mtn-table-search-expand-btn[data-v-b940b62a]{padding-inline:0}.mtn-table-search-actions[data-v-b940b62a]{display:flex;align-items:center;gap:8px}.mtn-table-search-advanced[data-v-b940b62a]{margin-top:10px;padding:20px 16px 0;background:#00000005}.mtn-table-toolbar[data-v-c80cd00e]{display:flex;flex-direction:column;gap:8px;padding:12px 0}.mtn-table-toolbar__search[data-v-c80cd00e]{width:100%}.mtn-table-toolbar__actions[data-v-c80cd00e]{margin-top:4px}.mtn-table[data-v-a84b8125]{display:flex;flex-direction:column;width:100%;height:100%;padding-bottom:16px}.mtn-table-action-btn[data-v-d1cc1d41]{display:inline-flex;align-items:center;padding:4px;color:var(--ant-text-color-secondary, #595959);cursor:pointer;border-radius:4px;transition:all .3s}.mtn-table-action-btn[data-v-d1cc1d41]:hover{color:#1677ff;background-color:#1677ff14}.mtn-table-action-btn[data-v-d1cc1d41] svg{font-size:16px;transition:color .3s}.mtn-table-action-btn[data-v-1fbb2263]{display:inline-flex;align-items:center;padding:4px;color:var(--ant-text-color-secondary, #595959);cursor:pointer;border-radius:4px;transition:all .3s}.mtn-table-action-btn[data-v-1fbb2263]:hover{color:#1677ff;background-color:#1677ff14}.mtn-table-action-btn[data-v-1fbb2263] svg{font-size:16px;transition:color .3s}.mtn-table-column-popover .ant-popover-inner{width:300px;max-width:300px;padding:16px;border-radius:10px}.column-config[data-v-1fbb2263]{display:flex;flex-direction:column;gap:12px}.column-config__header[data-v-1fbb2263]{display:flex;align-items:center;justify-content:space-between}.column-config__body[data-v-1fbb2263]{display:flex;flex-direction:column;gap:12px;max-height:360px;padding-right:4px;overflow-y:auto}.column-config__section-title[data-v-1fbb2263]{margin-bottom:6px;font-size:12px;color:#8c8c8c}.column-config__section[data-v-1fbb2263]{display:flex;flex-direction:column}.column-config__droppable[data-v-1fbb2263]{display:flex;flex-direction:column;gap:6px;min-height:48px;padding:6px;background:#fafafa;border:1px solid #f0f0f0;border-radius:6px}.column-config__item[data-v-1fbb2263]{display:flex;gap:6px;align-items:center;padding:4px 6px;cursor:grab;background:#fff;border:1px solid transparent;border-radius:4px}.column-config__item[data-v-1fbb2263]:active{cursor:grabbing}.column-config__item[data-v-1fbb2263] .ant-checkbox-wrapper{flex:1}.column-config__drag-icon[data-v-1fbb2263]{font-size:14px;color:#bfbfbf}.column-config__empty[data-v-1fbb2263]{padding:10px 0;font-size:12px;color:#bfbfbf;text-align:center}.mtn-base-modal__body[data-v-84a948a3]{padding:20px 0 0;max-height:70vh;overflow-y:auto;overflow-x:hidden}
@@ -1,4 +1,4 @@
1
- function e(t) {
1
+ function o(t) {
2
2
  return t.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
3
3
  }
4
4
  const r = /* @__PURE__ */ new Set([
@@ -17,24 +17,26 @@ const r = /* @__PURE__ */ new Set([
17
17
  "DictBadge",
18
18
  "DictTag",
19
19
  "SearchBar",
20
- "AutoTooltip"
20
+ "AutoTooltip",
21
+ "SectionTitle",
22
+ "BaseModal"
21
23
  ]);
22
24
  function c() {
23
25
  return {
24
26
  type: "component",
25
27
  resolve: (t) => {
26
28
  if (t.startsWith("Mtn")) {
27
- const o = t.slice(3), n = e(o);
29
+ const e = t.slice(3), n = o(e);
28
30
  return {
29
- name: o,
31
+ name: e,
30
32
  from: `@mtn-ui/components/${n}`
31
33
  };
32
34
  }
33
35
  if (r.has(t)) {
34
- const o = e(t);
36
+ const e = o(t);
35
37
  return {
36
38
  name: t,
37
- from: `@mtn-ui/components/${o}`
39
+ from: `@mtn-ui/components/${e}`
38
40
  };
39
41
  }
40
42
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/resolver.ts"],"sourcesContent":["import type { ComponentResolver } from 'unplugin-vue-components/types'\n\n/**\n * MTN UI Components Resolver\n * \n * 用于 unplugin-vue-components 的组件解析器\n * 当在模板中使用 <MtnButton /> 时,自动解析组件和样式路径\n * \n * @example\n * ```ts\n * // vite.config.ts\n * import Components from 'unplugin-vue-components/vite'\n * import { MtnUIResolver } from '@mtn-ui/components/resolver'\n * \n * export default defineConfig({\n * plugins: [\n * Components({\n * resolvers: [MtnUIResolver()]\n * })\n * ]\n * })\n * ```\n */\n/**\n * 将 PascalCase 转换为 kebab-case\n * @example\n * PascalCaseToKebabCase('ConfirmButton') => 'confirm-button'\n * PascalCaseToKebabCase('Button') => 'button'\n */\nfunction pascalCaseToKebabCase(str: string): string {\n return str\n .replace(/([A-Z])/g, '-$1') // 在大写字母前添加连字符\n .toLowerCase() // 转为小写\n .replace(/^-/, '') // 移除开头的连字符\n}\n\n/** 仅解析以 Mtn 开头或在此白名单内的组件,避免把 AForm、ALayout 等 Ant Design Vue 组件误解析到 @mtn-ui/components */\nconst MTN_COMPONENT_NAMES = new Set([\n 'Button',\n 'ConfirmButton',\n 'DeleteButton',\n 'ActionGroup',\n 'ColorPicker',\n 'FormItem',\n 'FormRow',\n 'FormRenderer',\n 'ContentContainer',\n 'DictSelect',\n 'DictRadio',\n 'DictCheckbox',\n 'DictBadge',\n 'DictTag',\n 'SearchBar',\n 'AutoTooltip'\n])\n\nexport function MtnUIResolver(): ComponentResolver {\n return {\n type: 'component',\n resolve: (name: string) => {\n // 支持的组件名格式:\n // - MtnButton (PascalCase,移除 Mtn 前缀) → 解析\n // - Button(在白名单内)→ 解析\n // - AForm、ALayout 等非 Mtn 且不在白名单 → 不解析(return undefined),由其他 resolver 或用户手动从 ant-design-vue 导入\n\n if (name.startsWith('Mtn')) {\n const componentName = name.slice(3)\n const path = pascalCaseToKebabCase(componentName)\n return {\n name: componentName,\n from: `@mtn-ui/components/${path}`,\n }\n }\n\n if (MTN_COMPONENT_NAMES.has(name)) {\n const path = pascalCaseToKebabCase(name)\n return {\n name: name,\n from: `@mtn-ui/components/${path}`,\n }\n }\n\n return undefined\n },\n }\n}\n\n/**\n * 默认导出的 Resolver\n */\nexport default MtnUIResolver()\n"],"names":["pascalCaseToKebabCase","str","MTN_COMPONENT_NAMES","MtnUIResolver","name","componentName","path","resolver"],"mappings":"AA6BA,SAASA,EAAsBC,GAAqB;AAClD,SAAOA,EACJ,QAAQ,YAAY,KAAK,EACzB,cACA,QAAQ,MAAM,EAAE;AACrB;AAGA,MAAMC,wBAA0B,IAAI;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAEM,SAASC,IAAmC;AACjD,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS,CAACC,MAAiB;AAMzB,UAAIA,EAAK,WAAW,KAAK,GAAG;AAC1B,cAAMC,IAAgBD,EAAK,MAAM,CAAC,GAC5BE,IAAON,EAAsBK,CAAa;AAChD,eAAO;AAAA,UACL,MAAMA;AAAA,UACN,MAAM,sBAAsBC,CAAI;AAAA,QAAA;AAAA,MAEpC;AAEA,UAAIJ,EAAoB,IAAIE,CAAI,GAAG;AACjC,cAAME,IAAON,EAAsBI,CAAI;AACvC,eAAO;AAAA,UACL,MAAAA;AAAA,UACA,MAAM,sBAAsBE,CAAI;AAAA,QAAA;AAAA,MAEpC;AAAA,IAGF;AAAA,EAAA;AAEJ;AAKA,MAAAC,IAAeJ,EAAA;"}
1
+ {"version":3,"file":"index.js","sources":["../../src/resolver.ts"],"sourcesContent":["import type { ComponentResolver } from 'unplugin-vue-components/types'\n\n/**\n * MTN UI Components Resolver\n * \n * 用于 unplugin-vue-components 的组件解析器\n * 当在模板中使用 <MtnButton /> 时,自动解析组件和样式路径\n * \n * @example\n * ```ts\n * // vite.config.ts\n * import Components from 'unplugin-vue-components/vite'\n * import { MtnUIResolver } from '@mtn-ui/components/resolver'\n * \n * export default defineConfig({\n * plugins: [\n * Components({\n * resolvers: [MtnUIResolver()]\n * })\n * ]\n * })\n * ```\n */\n/**\n * 将 PascalCase 转换为 kebab-case\n * @example\n * PascalCaseToKebabCase('ConfirmButton') => 'confirm-button'\n * PascalCaseToKebabCase('Button') => 'button'\n */\nfunction pascalCaseToKebabCase(str: string): string {\n return str\n .replace(/([A-Z])/g, '-$1') // 在大写字母前添加连字符\n .toLowerCase() // 转为小写\n .replace(/^-/, '') // 移除开头的连字符\n}\n\n/** 仅解析以 Mtn 开头或在此白名单内的组件,避免把 AForm、ALayout 等 Ant Design Vue 组件误解析到 @mtn-ui/components */\nconst MTN_COMPONENT_NAMES = new Set([\n 'Button',\n 'ConfirmButton',\n 'DeleteButton',\n 'ActionGroup',\n 'ColorPicker',\n 'FormItem',\n 'FormRow',\n 'FormRenderer',\n 'ContentContainer',\n 'DictSelect',\n 'DictRadio',\n 'DictCheckbox',\n 'DictBadge',\n 'DictTag',\n 'SearchBar',\n 'AutoTooltip',\n 'SectionTitle',\n 'BaseModal'\n])\n\nexport function MtnUIResolver(): ComponentResolver {\n return {\n type: 'component',\n resolve: (name: string) => {\n // 支持的组件名格式:\n // - MtnButton (PascalCase,移除 Mtn 前缀) → 解析\n // - Button(在白名单内)→ 解析\n // - AForm、ALayout 等非 Mtn 且不在白名单 → 不解析(return undefined),由其他 resolver 或用户手动从 ant-design-vue 导入\n\n if (name.startsWith('Mtn')) {\n const componentName = name.slice(3)\n const path = pascalCaseToKebabCase(componentName)\n return {\n name: componentName,\n from: `@mtn-ui/components/${path}`,\n }\n }\n\n if (MTN_COMPONENT_NAMES.has(name)) {\n const path = pascalCaseToKebabCase(name)\n return {\n name: name,\n from: `@mtn-ui/components/${path}`,\n }\n }\n\n return undefined\n },\n }\n}\n\n/**\n * 默认导出的 Resolver\n */\nexport default MtnUIResolver()\n"],"names":["pascalCaseToKebabCase","str","MTN_COMPONENT_NAMES","MtnUIResolver","name","componentName","path","resolver"],"mappings":"AA6BA,SAASA,EAAsBC,GAAqB;AAClD,SAAOA,EACJ,QAAQ,YAAY,KAAK,EACzB,cACA,QAAQ,MAAM,EAAE;AACrB;AAGA,MAAMC,wBAA0B,IAAI;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAEM,SAASC,IAAmC;AACjD,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS,CAACC,MAAiB;AAMzB,UAAIA,EAAK,WAAW,KAAK,GAAG;AAC1B,cAAMC,IAAgBD,EAAK,MAAM,CAAC,GAC5BE,IAAON,EAAsBK,CAAa;AAChD,eAAO;AAAA,UACL,MAAMA;AAAA,UACN,MAAM,sBAAsBC,CAAI;AAAA,QAAA;AAAA,MAEpC;AAEA,UAAIJ,EAAoB,IAAIE,CAAI,GAAG;AACjC,cAAME,IAAON,EAAsBI,CAAI;AACvC,eAAO;AAAA,UACL,MAAAA;AAAA,UACA,MAAM,sBAAsBE,CAAI;AAAA,QAAA;AAAA,MAEpC;AAAA,IAGF;AAAA,EAAA;AAEJ;AAKA,MAAAC,IAAeJ,EAAA;"}
@@ -0,0 +1,25 @@
1
+ declare function __VLS_template(): {
2
+ default?(_: {}): any;
3
+ footer?(_: {}): any;
4
+ };
5
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
6
+ width?: number | string;
7
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
8
+ width?: number | string;
9
+ }>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
10
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
11
+ export default _default;
12
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
13
+ type __VLS_TypePropsToRuntimeProps<T> = {
14
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
15
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
16
+ } : {
17
+ type: import('vue').PropType<T[K]>;
18
+ required: true;
19
+ };
20
+ };
21
+ type __VLS_WithTemplateSlots<T, S> = T & {
22
+ new (): {
23
+ $slots: S;
24
+ };
25
+ };
@@ -0,0 +1 @@
1
+ export { default as BaseModal } from './BaseModal';
@@ -1,6 +1,6 @@
1
1
  import { ButtonProps as AntButtonProps } from 'ant-design-vue';
2
2
  import { MtnButtonVariantProps } from './variants';
3
- import { PermissionAction } from '@mtn-ui/utils';
3
+ import { PermissionAction } from '../../../utils/src';
4
4
 
5
5
  interface Props extends /* @vue-ignore */ Omit<AntButtonProps, 'class'>, /* @vue-ignore */ MtnButtonVariantProps {
6
6
  class?: string;
@@ -40,8 +40,14 @@ interface Props {
40
40
  * 默认不启用防抖
41
41
  */
42
42
  debounceMs?: number;
43
+ /**
44
+ * 警告类型
45
+ * - 'pop': hover 显示 Popover 确认框(默认)
46
+ * - 'modal': 点击显示 Modal.confirm
47
+ */
48
+ warnType?: 'pop' | 'modal';
43
49
  }
44
- declare function __VLS_template(): Partial<Record<string, (_: any) => any>> & {
50
+ declare function __VLS_template(): Partial<Record<string, (_: any) => any>> & Partial<Record<string, (_: any) => any>> & {
45
51
  description?(_: {}): any;
46
52
  };
47
53
  declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
@@ -50,6 +56,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
50
56
  cancelText: string;
51
57
  okType: string;
52
58
  permissionAction: string;
59
+ warnType: string;
53
60
  }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
54
61
  confirm: (e?: MouseEvent | undefined) => void;
55
62
  cancel: (e?: MouseEvent | undefined) => void;
@@ -59,6 +66,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
59
66
  cancelText: string;
60
67
  okType: string;
61
68
  permissionAction: string;
69
+ warnType: string;
62
70
  }>>> & Readonly<{
63
71
  onConfirm?: ((e?: MouseEvent | undefined) => any) | undefined;
64
72
  onCancel?: ((e?: MouseEvent | undefined) => any) | undefined;
@@ -68,6 +76,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
68
76
  okText: string;
69
77
  cancelText: string;
70
78
  okType: "primary" | "default" | "dashed" | "text" | "link";
79
+ warnType: "pop" | "modal";
71
80
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
72
81
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
73
82
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import { PopconfirmProps as APopconfirmProps } from 'ant-design-vue';
2
- import { PermissionAction } from '@mtn-ui/utils';
2
+ import { PermissionAction } from '../../../utils/src';
3
3
  import { ButtonProps as MtnButtonProps } from '../button/types';
4
4
 
5
5
  /**
@@ -0,0 +1,45 @@
1
+ import { CopyTextProps } from './types';
2
+
3
+ declare function __VLS_template(): {
4
+ icon?(_: {}): any;
5
+ };
6
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<CopyTextProps>, {
7
+ text: string;
8
+ iconSize: number;
9
+ iconDisplay: string;
10
+ successText: string;
11
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<CopyTextProps>, {
12
+ text: string;
13
+ iconSize: number;
14
+ iconDisplay: string;
15
+ successText: string;
16
+ }>>> & Readonly<{}>, {
17
+ text: string | number;
18
+ iconSize: number;
19
+ iconDisplay: "always" | "hover";
20
+ successText: string;
21
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
22
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
23
+ export default _default;
24
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
25
+ type __VLS_TypePropsToRuntimeProps<T> = {
26
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
27
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
28
+ } : {
29
+ type: import('vue').PropType<T[K]>;
30
+ required: true;
31
+ };
32
+ };
33
+ type __VLS_WithDefaults<P, D> = {
34
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
35
+ default: D[K];
36
+ }> : P[K];
37
+ };
38
+ type __VLS_Prettify<T> = {
39
+ [K in keyof T]: T[K];
40
+ } & {};
41
+ type __VLS_WithTemplateSlots<T, S> = T & {
42
+ new (): {
43
+ $slots: S;
44
+ };
45
+ };
@@ -0,0 +1,2 @@
1
+ export { default as CopyText } from './CopyText';
2
+ export type { CopyTextProps } from './types';
@@ -0,0 +1,15 @@
1
+ /**
2
+ * 复制文本组件属性
3
+ */
4
+ export interface CopyTextProps {
5
+ /** 要复制的文本 */
6
+ text: string | number;
7
+ /** 图标大小 */
8
+ iconSize?: number;
9
+ /** 图标显示方式 */
10
+ iconDisplay?: 'always' | 'hover';
11
+ /** 成功提示文本 */
12
+ successText?: string;
13
+ /** 自定义类名 */
14
+ class?: string;
15
+ }
@@ -25,6 +25,11 @@ interface Props {
25
25
  * 防抖延迟时间(毫秒)
26
26
  */
27
27
  debounceMs?: number;
28
+ /**
29
+ * 按钮类型
30
+ * @default 'text'
31
+ */
32
+ type?: 'primary' | 'default' | 'dashed' | 'text' | 'link';
28
33
  }
29
34
  declare function __VLS_template(): {
30
35
  icon?(_: {}): any;
@@ -33,14 +38,17 @@ declare function __VLS_template(): {
33
38
  declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
34
39
  title: string;
35
40
  showIcon: boolean;
41
+ type: string;
36
42
  }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
37
43
  confirm: (e?: MouseEvent | undefined) => void;
38
44
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
39
45
  title: string;
40
46
  showIcon: boolean;
47
+ type: string;
41
48
  }>>> & Readonly<{
42
49
  onConfirm?: ((e?: MouseEvent | undefined) => any) | undefined;
43
50
  }>, {
51
+ type: "primary" | "default" | "dashed" | "text" | "link";
44
52
  title: string;
45
53
  showIcon: boolean;
46
54
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -1,4 +1,4 @@
1
- import { PermissionAction } from '@mtn-ui/utils';
1
+ import { PermissionAction } from '../../../utils/src';
2
2
 
3
3
  /**
4
4
  * DeleteButton 组件属性接口
@@ -1,4 +1,4 @@
1
- import { DictItem } from '@mtn-ui/utils';
1
+ import { DictItem } from '../../../utils/src';
2
2
 
3
3
  export type { DictItem };
4
4
  export interface DictBadgeProps {
@@ -1,4 +1,4 @@
1
- import { DictItem } from '@mtn-ui/utils';
1
+ import { DictItem } from '../../../utils/src';
2
2
 
3
3
  export type { DictItem };
4
4
  export interface DictCheckboxProps {
@@ -1,4 +1,4 @@
1
- import { DictItem } from '@mtn-ui/utils';
1
+ import { DictItem } from '../../../utils/src';
2
2
 
3
3
  export type { DictItem };
4
4
  export interface DictRadioProps {
@@ -1,4 +1,4 @@
1
- import { DictItem } from '@mtn-ui/utils';
1
+ import { DictItem } from '../../../utils/src';
2
2
 
3
3
  export type { DictItem };
4
4
  export interface DictSelectProps {
@@ -1,4 +1,4 @@
1
- import { DictItem } from '@mtn-ui/utils';
1
+ import { DictItem } from '../../../utils/src';
2
2
 
3
3
  export type { DictItem };
4
4
  export interface DictTagProps {
@@ -0,0 +1,34 @@
1
+ declare function __VLS_template(): {
2
+ default?(_: {}): any;
3
+ };
4
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
5
+ labelCol?: {
6
+ span: number;
7
+ };
8
+ wrapperCol?: {
9
+ span: number;
10
+ };
11
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
12
+ labelCol?: {
13
+ span: number;
14
+ };
15
+ wrapperCol?: {
16
+ span: number;
17
+ };
18
+ }>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
19
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
20
+ export default _default;
21
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
22
+ type __VLS_TypePropsToRuntimeProps<T> = {
23
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
24
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
25
+ } : {
26
+ type: import('vue').PropType<T[K]>;
27
+ required: true;
28
+ };
29
+ };
30
+ type __VLS_WithTemplateSlots<T, S> = T & {
31
+ new (): {
32
+ $slots: S;
33
+ };
34
+ };
@@ -0,0 +1,19 @@
1
+ import { ComputedRef, InjectionKey } from 'vue';
2
+
3
+ export interface MtnFormContext {
4
+ labelCol: ComputedRef<{
5
+ span: number;
6
+ } | undefined>;
7
+ wrapperCol: ComputedRef<{
8
+ span: number;
9
+ } | undefined>;
10
+ }
11
+ export interface MtnFormProps {
12
+ labelCol?: {
13
+ span: number;
14
+ };
15
+ wrapperCol?: {
16
+ span: number;
17
+ };
18
+ }
19
+ export declare const FormContextKey: InjectionKey<MtnFormContext>;
@@ -0,0 +1,2 @@
1
+ export { FormContextKey, type MtnFormProps } from './context';
2
+ export { default as Form, default as MtnForm } from './Form';
@@ -5,7 +5,7 @@
5
5
  /** 基础表单项类型(Ant Design Vue 组件) */
6
6
  export type FormItemTypeBase = 'input' | 'text-area' | 'select' | 'radio' | 'checkbox' | 'date-picker' | 'input-number' | 'input-search';
7
7
  /** 扩展类型 */
8
- export type FormItemTypeExtended = 'tree-select' | 'custom';
8
+ export type FormItemTypeExtended = 'tree-select' | 'dict-select' | 'custom';
9
9
  /** 表单项 type 枚举 */
10
10
  export type FormItemType = FormItemTypeBase | FormItemTypeExtended;
11
11
  /** 表单项基础配置 */
@@ -10,4 +10,12 @@ export interface FormRendererProps {
10
10
  cols?: number;
11
11
  /** 列间距(传给 FormRow) */
12
12
  gutter?: number | [number, number];
13
+ /** 标签栅格列数 */
14
+ labelCol?: {
15
+ span: number;
16
+ };
17
+ /** 输入控件栅格列数 */
18
+ wrapperCol?: {
19
+ span: number;
20
+ };
13
21
  }
@@ -16,10 +16,16 @@ export * from './form-row';
16
16
  export type * from './form-row/types';
17
17
  export * from './form-renderer';
18
18
  export type * from './form-renderer/types';
19
+ export * from './form';
19
20
  export * from './content-container';
20
21
  export type * from './content-container/types';
21
22
  export * from './auto-tooltip';
22
23
  export type * from './auto-tooltip/types';
24
+ export * from './copy-text';
25
+ export type * from './copy-text/types';
26
+ export * from './table-action-group';
27
+ export type * from './table-action-group/types';
28
+ export * from './section-title';
23
29
  export { DictSelect } from './dict-select';
24
30
  export type { DictItem, DictSelectProps } from './dict-select/types';
25
31
  export { DictRadio } from './dict-radio';
@@ -32,6 +38,9 @@ export { DictTag } from './dict-tag';
32
38
  export type { DictTagProps } from './dict-tag/types';
33
39
  export { SearchBar } from './search-bar';
34
40
  export type { SearchBarProps, SearchConfigItem } from './search-bar/types';
41
+ export * from './table';
42
+ export type * from './table/types';
43
+ export * from './base-modal';
35
44
  export type * from './button/types';
36
45
  /**
37
46
  * MTN UI Vue Plugin
@@ -48,4 +57,4 @@ declare const MtnUI: Plugin;
48
57
  export default MtnUI;
49
58
  export declare const version = "1.0.0";
50
59
  export { MtnUIResolver, default as resolver } from './resolver';
51
- export { usePermission, type UsePermissionOptions, type UsePermissionReturn, type PermissionAction } from '@mtn-ui/utils';
60
+ export { usePermission, type UsePermissionOptions, type UsePermissionReturn, type PermissionAction } from '../../utils/src';
@@ -0,0 +1,42 @@
1
+ import { SectionTitleProps } from './types';
2
+
3
+ declare function __VLS_template(): {
4
+ default?(_: {}): any;
5
+ };
6
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SectionTitleProps>, {
7
+ noTop: boolean;
8
+ noPadding: boolean;
9
+ accentColor: string;
10
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SectionTitleProps>, {
11
+ noTop: boolean;
12
+ noPadding: boolean;
13
+ accentColor: string;
14
+ }>>> & Readonly<{}>, {
15
+ accentColor: string;
16
+ noTop: boolean;
17
+ noPadding: boolean;
18
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
19
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
20
+ export default _default;
21
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
22
+ type __VLS_TypePropsToRuntimeProps<T> = {
23
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
24
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
25
+ } : {
26
+ type: import('vue').PropType<T[K]>;
27
+ required: true;
28
+ };
29
+ };
30
+ type __VLS_WithDefaults<P, D> = {
31
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
32
+ default: D[K];
33
+ }> : P[K];
34
+ };
35
+ type __VLS_Prettify<T> = {
36
+ [K in keyof T]: T[K];
37
+ } & {};
38
+ type __VLS_WithTemplateSlots<T, S> = T & {
39
+ new (): {
40
+ $slots: S;
41
+ };
42
+ };
@@ -0,0 +1,2 @@
1
+ export { default as SectionTitle } from './SectionTitle';
2
+ export type { SectionTitleProps } from './types';
@@ -0,0 +1,12 @@
1
+ export interface SectionTitleProps {
2
+ /** 标题文本 */
3
+ title: string;
4
+ /** 副标题 */
5
+ subTitle?: string;
6
+ /** 去掉顶部 padding */
7
+ noTop?: boolean;
8
+ /** 去掉左侧 padding */
9
+ noPadding?: boolean;
10
+ /** 自定义高亮条颜色 */
11
+ accentColor?: string;
12
+ }
@@ -0,0 +1,7 @@
1
+ import { ClassValue } from 'clsx';
2
+
3
+ export declare function cn(...inputs: ClassValue[]): string;
4
+ export declare const sectionTitleVariants: (props?: ({
5
+ noTop?: boolean | null | undefined;
6
+ noPadding?: boolean | null | undefined;
7
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -0,0 +1,84 @@
1
+ import { TableColumn, SearchField } from './types';
2
+ import { ActionItem } from '../action-group/types';
3
+
4
+ interface PaginationConfig {
5
+ current?: number;
6
+ pageSize?: number;
7
+ page_size?: number;
8
+ total?: number;
9
+ [key: string]: unknown;
10
+ }
11
+ interface Props {
12
+ /** 列配置 */
13
+ columns: TableColumn[];
14
+ /** 数据源 */
15
+ dataSource?: unknown[];
16
+ /** 加载状态 */
17
+ loading?: boolean;
18
+ /** 分页配置 */
19
+ pagination?: boolean | PaginationConfig;
20
+ /** antd Table scroll 配置 */
21
+ scroll?: {
22
+ x?: number | string;
23
+ y?: number | string;
24
+ };
25
+ /** 行唯一标识字段(默认 'id') */
26
+ rowKey?: string;
27
+ /** 搜索字段配置 */
28
+ searchList?: SearchField[];
29
+ /** 操作按钮配置 */
30
+ optionsList?: ActionItem[];
31
+ /** 启用密度控制(默认 true) */
32
+ enableDensityControl?: boolean;
33
+ }
34
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
35
+ dataSource: () => never[];
36
+ loading: boolean;
37
+ pagination: boolean;
38
+ rowKey: string;
39
+ searchList: () => never[];
40
+ optionsList: () => never[];
41
+ enableDensityControl: boolean;
42
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
43
+ reset: () => void;
44
+ search: (params: Record<string, unknown>) => void;
45
+ change: (pagination: unknown) => void;
46
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
47
+ dataSource: () => never[];
48
+ loading: boolean;
49
+ pagination: boolean;
50
+ rowKey: string;
51
+ searchList: () => never[];
52
+ optionsList: () => never[];
53
+ enableDensityControl: boolean;
54
+ }>>> & Readonly<{
55
+ onReset?: (() => any) | undefined;
56
+ onSearch?: ((params: Record<string, unknown>) => any) | undefined;
57
+ onChange?: ((pagination: unknown) => any) | undefined;
58
+ }>, {
59
+ dataSource: unknown[];
60
+ loading: boolean;
61
+ pagination: boolean | PaginationConfig;
62
+ searchList: SearchField[];
63
+ optionsList: ActionItem[];
64
+ rowKey: string;
65
+ enableDensityControl: boolean;
66
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
67
+ export default _default;
68
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
69
+ type __VLS_TypePropsToRuntimeProps<T> = {
70
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
71
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
72
+ } : {
73
+ type: import('vue').PropType<T[K]>;
74
+ required: true;
75
+ };
76
+ };
77
+ type __VLS_WithDefaults<P, D> = {
78
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
79
+ default: D[K];
80
+ }> : P[K];
81
+ };
82
+ type __VLS_Prettify<T> = {
83
+ [K in keyof T]: T[K];
84
+ } & {};
@@ -0,0 +1,50 @@
1
+ import { ColumnConfigState, ColumnMeta } from '../types';
2
+
3
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
4
+ columns?: ColumnMeta[];
5
+ modelValue?: ColumnConfigState;
6
+ }>, {
7
+ columns: () => never[];
8
+ modelValue: () => {
9
+ order: never[];
10
+ fixedMap: {};
11
+ visible: never[];
12
+ };
13
+ }>>, {
14
+ draggable: import('vue').ObjectDirective<HTMLElement, [list: import('vue-draggable-plus').MaybeRef<any[]>, options?: import('vue-draggable-plus').MaybeRef<import('vue-draggable-plus').UseDraggableOptions<any>> | undefined] | import('vue-draggable-plus').MaybeRef<any[]>, string, any>;
15
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
16
+ "update:modelValue": (args_0: ColumnConfigState) => void;
17
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
18
+ columns?: ColumnMeta[];
19
+ modelValue?: ColumnConfigState;
20
+ }>, {
21
+ columns: () => never[];
22
+ modelValue: () => {
23
+ order: never[];
24
+ fixedMap: {};
25
+ visible: never[];
26
+ };
27
+ }>>> & Readonly<{
28
+ "onUpdate:modelValue"?: ((args_0: ColumnConfigState) => any) | undefined;
29
+ }>, {
30
+ modelValue: ColumnConfigState;
31
+ columns: ColumnMeta[];
32
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
33
+ export default _default;
34
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
35
+ type __VLS_TypePropsToRuntimeProps<T> = {
36
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
37
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
38
+ } : {
39
+ type: import('vue').PropType<T[K]>;
40
+ required: true;
41
+ };
42
+ };
43
+ type __VLS_WithDefaults<P, D> = {
44
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
45
+ default: D[K];
46
+ }> : P[K];
47
+ };
48
+ type __VLS_Prettify<T> = {
49
+ [K in keyof T]: T[K];
50
+ } & {};