kb-ui-vue 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. package/LICENSE +21 -0
  2. package/dist/components/Affix/Affix.vue.d.ts +36 -0
  3. package/dist/components/Affix/index.d.ts +4 -0
  4. package/dist/components/Anchor/Anchor.vue.d.ts +25 -0
  5. package/dist/components/Anchor/index.d.ts +4 -0
  6. package/dist/components/AutoComplete/AutoComplete.vue.d.ts +52 -0
  7. package/dist/components/AutoComplete/index.d.ts +4 -0
  8. package/dist/components/BackTop/BackTop.vue.d.ts +35 -0
  9. package/dist/components/BackTop/index.d.ts +4 -0
  10. package/dist/components/Cascader/Cascader.vue.d.ts +1 -0
  11. package/dist/components/ConfigProvider/ConfigProvider.vue.d.ts +30 -0
  12. package/dist/components/ConfigProvider/index.d.ts +4 -0
  13. package/dist/components/ContextMenu/ContextMenu.vue.d.ts +42 -0
  14. package/dist/components/ContextMenu/index.d.ts +4 -0
  15. package/dist/components/DatePicker/DatePicker.vue.d.ts +1 -0
  16. package/dist/components/Empty/Empty.vue.d.ts +1 -1
  17. package/dist/components/FloatButton/FloatButton.vue.d.ts +48 -0
  18. package/dist/components/FloatButton/FloatButtonGroup.vue.d.ts +38 -0
  19. package/dist/components/FloatButton/index.d.ts +5 -0
  20. package/dist/components/Image/Image.vue.d.ts +37 -0
  21. package/dist/components/Image/index.d.ts +4 -0
  22. package/dist/components/ImagePreview/ImagePreview.vue.d.ts +28 -0
  23. package/dist/components/ImagePreview/index.d.ts +4 -0
  24. package/dist/components/Layout/Content.vue.d.ts +13 -0
  25. package/dist/components/Layout/Footer.vue.d.ts +13 -0
  26. package/dist/components/Layout/Header.vue.d.ts +13 -0
  27. package/dist/components/Layout/Layout.vue.d.ts +19 -0
  28. package/dist/components/Layout/Sider.vue.d.ts +37 -0
  29. package/dist/components/Layout/constants.d.ts +7 -0
  30. package/dist/components/Layout/index.d.ts +8 -0
  31. package/dist/components/List/List.vue.d.ts +1 -0
  32. package/dist/components/Mentions/Mentions.vue.d.ts +37 -0
  33. package/dist/components/Mentions/index.d.ts +5 -0
  34. package/dist/components/Mentions/types.d.ts +10 -0
  35. package/dist/components/Popconfirm/Popconfirm.vue.d.ts +2 -1
  36. package/dist/components/QRCode/QRCode.vue.d.ts +36 -0
  37. package/dist/components/QRCode/index.d.ts +4 -0
  38. package/dist/components/QRCode/qrcode.d.ts +34 -0
  39. package/dist/components/Search/Search.vue.d.ts +4 -0
  40. package/dist/components/Splitter/Splitter.vue.d.ts +34 -0
  41. package/dist/components/Splitter/index.d.ts +4 -0
  42. package/dist/components/Table/Table.vue.d.ts +1 -0
  43. package/dist/components/TimePicker/TimePicker.vue.d.ts +28 -0
  44. package/dist/components/TimePicker/index.d.ts +4 -0
  45. package/dist/components/Tour/Tour.vue.d.ts +37 -0
  46. package/dist/components/Tour/index.d.ts +4 -0
  47. package/dist/components/TreeSelect/TreeSelect.vue.d.ts +32 -0
  48. package/dist/components/TreeSelect/index.d.ts +4 -0
  49. package/dist/components/VirtualList/VirtualList.vue.d.ts +29 -0
  50. package/dist/components/VirtualList/index.d.ts +4 -0
  51. package/dist/components/VirtualList/types.d.ts +12 -0
  52. package/dist/composables/useGlobalConfig.d.ts +45 -0
  53. package/dist/global.d.ts +90 -0
  54. package/dist/index.cjs +3 -1
  55. package/dist/index.d.ts +40 -0
  56. package/dist/index.js +3857 -1107
  57. package/dist/locale/en-US.d.ts +2 -0
  58. package/dist/locale/index.d.ts +23 -0
  59. package/dist/locale/types.d.ts +227 -0
  60. package/dist/locale/zh-CN.d.ts +2 -0
  61. package/dist/resolver-map.d.ts +14 -0
  62. package/dist/resolver.cjs +1 -0
  63. package/dist/resolver.d.ts +36 -0
  64. package/dist/resolver.js +32 -0
  65. package/dist/styles/Affix.css +8 -0
  66. package/dist/styles/Alert.css +68 -68
  67. package/dist/styles/Anchor.css +56 -0
  68. package/dist/styles/AutoComplete.css +102 -0
  69. package/dist/styles/Avatar.css +31 -31
  70. package/dist/styles/BackTop.css +39 -0
  71. package/dist/styles/Badge.css +49 -49
  72. package/dist/styles/Breadcrumb.css +28 -28
  73. package/dist/styles/Button.css +108 -108
  74. package/dist/styles/Calendar.css +89 -89
  75. package/dist/styles/Card.css +40 -40
  76. package/dist/styles/Carousel.css +87 -87
  77. package/dist/styles/Cascader.css +121 -121
  78. package/dist/styles/Checkbox.css +77 -77
  79. package/dist/styles/Collapse.css +49 -49
  80. package/dist/styles/ColorPicker.css +36 -36
  81. package/dist/styles/ContextMenu.css +58 -0
  82. package/dist/styles/CountUp.css +4 -4
  83. package/dist/styles/DatePicker.css +63 -63
  84. package/dist/styles/Descriptions.css +44 -44
  85. package/dist/styles/Dialog.css +42 -42
  86. package/dist/styles/Divider.css +37 -37
  87. package/dist/styles/Drawer.css +81 -81
  88. package/dist/styles/Dropdown.css +40 -40
  89. package/dist/styles/Empty.css +24 -24
  90. package/dist/styles/FloatButton.css +214 -0
  91. package/dist/styles/Form.css +33 -33
  92. package/dist/styles/Grid.css +194 -194
  93. package/dist/styles/Icon.css +5 -5
  94. package/dist/styles/Image.css +48 -0
  95. package/dist/styles/ImagePreview.css +99 -0
  96. package/dist/styles/Input.css +79 -79
  97. package/dist/styles/InputNumber.css +40 -40
  98. package/dist/styles/InputPassword.css +42 -42
  99. package/dist/styles/Layout.css +83 -0
  100. package/dist/styles/List.css +29 -29
  101. package/dist/styles/Loading.css +27 -27
  102. package/dist/styles/Mentions.css +74 -0
  103. package/dist/styles/Message.css +32 -32
  104. package/dist/styles/Notification.css +50 -50
  105. package/dist/styles/Pagination.css +57 -57
  106. package/dist/styles/Popconfirm.css +53 -53
  107. package/dist/styles/Popover.css +54 -54
  108. package/dist/styles/Progress.css +38 -38
  109. package/dist/styles/QRCode.css +37 -0
  110. package/dist/styles/Radio.css +60 -60
  111. package/dist/styles/Rate.css +21 -21
  112. package/dist/styles/Result.css +41 -41
  113. package/dist/styles/Search.css +46 -46
  114. package/dist/styles/Segmented.css +32 -32
  115. package/dist/styles/Select.css +108 -108
  116. package/dist/styles/Skeleton.css +40 -40
  117. package/dist/styles/Slider.css +46 -46
  118. package/dist/styles/Space.css +27 -27
  119. package/dist/styles/Splitter.css +59 -0
  120. package/dist/styles/Statistic.css +31 -31
  121. package/dist/styles/Steps.css +83 -83
  122. package/dist/styles/Switch.css +39 -39
  123. package/dist/styles/Table.css +132 -132
  124. package/dist/styles/Tabs.css +41 -41
  125. package/dist/styles/Tag.css +71 -71
  126. package/dist/styles/Textarea.css +43 -43
  127. package/dist/styles/TimePicker.css +98 -0
  128. package/dist/styles/Timeline.css +70 -70
  129. package/dist/styles/Tooltip.css +42 -42
  130. package/dist/styles/Tour.css +102 -0
  131. package/dist/styles/Transfer.css +142 -142
  132. package/dist/styles/Tree.css +89 -89
  133. package/dist/styles/TreeSelect.css +121 -0
  134. package/dist/styles/Upload.css +66 -66
  135. package/dist/styles/VirtualList.css +42 -0
  136. package/dist/styles/Watermark.css +17 -17
  137. package/dist/styles/all.css +110 -103
  138. package/dist/styles/dark.css +10 -10
  139. package/dist/styles/index.css +4520 -3260
  140. package/dist/styles/themes/amber.css +14 -14
  141. package/dist/styles/themes/aurora.css +15 -15
  142. package/dist/styles/themes/autumn.css +18 -18
  143. package/dist/styles/themes/business.css +20 -20
  144. package/dist/styles/themes/candy.css +21 -21
  145. package/dist/styles/themes/cartoon.css +31 -31
  146. package/dist/styles/themes/coffee.css +18 -18
  147. package/dist/styles/themes/cyber.css +37 -37
  148. package/dist/styles/themes/cyberpunk.css +32 -32
  149. package/dist/styles/themes/danqing.css +27 -27
  150. package/dist/styles/themes/flat.css +18 -18
  151. package/dist/styles/themes/forest.css +20 -20
  152. package/dist/styles/themes/gameboy.css +33 -33
  153. package/dist/styles/themes/glass.css +39 -39
  154. package/dist/styles/themes/gold.css +26 -26
  155. package/dist/styles/themes/gothic.css +20 -20
  156. package/dist/styles/themes/gradient.css +18 -18
  157. package/dist/styles/themes/ink.css +16 -16
  158. package/dist/styles/themes/lava.css +15 -15
  159. package/dist/styles/themes/macaron.css +27 -27
  160. package/dist/styles/themes/matcha.css +18 -18
  161. package/dist/styles/themes/memphis.css +25 -25
  162. package/dist/styles/themes/midnight.css +27 -27
  163. package/dist/styles/themes/minimal.css +36 -36
  164. package/dist/styles/themes/mint.css +20 -20
  165. package/dist/styles/themes/mono.css +36 -36
  166. package/dist/styles/themes/morandi.css +18 -18
  167. package/dist/styles/themes/neon.css +16 -16
  168. package/dist/styles/themes/neonlight.css +20 -20
  169. package/dist/styles/themes/ocean.css +20 -20
  170. package/dist/styles/themes/pastel.css +21 -21
  171. package/dist/styles/themes/pop.css +33 -33
  172. package/dist/styles/themes/retro.css +35 -35
  173. package/dist/styles/themes/rose.css +14 -14
  174. package/dist/styles/themes/rounded.css +18 -18
  175. package/dist/styles/themes/sakura.css +20 -20
  176. package/dist/styles/themes/sky.css +20 -20
  177. package/dist/styles/themes/spring.css +18 -18
  178. package/dist/styles/themes/starry.css +15 -15
  179. package/dist/styles/themes/sunset.css +18 -18
  180. package/dist/styles/themes/teal.css +14 -14
  181. package/dist/styles/themes/terminal.css +44 -44
  182. package/dist/styles/themes/vaporwave.css +27 -27
  183. package/dist/styles/themes/violet.css +14 -14
  184. package/dist/styles/themes/wabi.css +27 -27
  185. package/dist/styles/themes/winter.css +20 -20
  186. package/dist/styles/tokens.css +59 -55
  187. package/package.json +78 -46
@@ -0,0 +1,5 @@
1
+ import { default as Mentions } from './Mentions.vue';
2
+ export { Mentions };
3
+ export default Mentions;
4
+ export type { MentionsProps } from './Mentions.vue';
5
+ export type { MentionOption, MentionFilter } from './types';
@@ -0,0 +1,10 @@
1
+ /** 提及候选项 */
2
+ export interface MentionOption {
3
+ /** 插入文本时使用的值 */
4
+ value: string;
5
+ /** 展示文案,缺省用 value */
6
+ label?: string;
7
+ disabled?: boolean;
8
+ }
9
+ /** 自定义过滤函数;返回 true 表示保留 */
10
+ export type MentionFilter = (search: string, option: MentionOption) => boolean;
@@ -1,7 +1,8 @@
1
1
  export interface PopconfirmProps {
2
2
  title: string;
3
- /** 确定按钮文字 */
3
+ /** 确定按钮文字,不传时取语言包中的 `popconfirm.confirmText` */
4
4
  confirmText?: string;
5
+ /** 取消按钮文字,不传时取语言包中的 `popconfirm.cancelText` */
5
6
  cancelText?: string;
6
7
  }
7
8
  declare var __VLS_1: {};
@@ -0,0 +1,36 @@
1
+ import { ECLevelName } from './qrcode';
2
+ export interface QRCodeProps {
3
+ /** 编码内容(文本 / URL) */
4
+ value: string;
5
+ /** 渲染像素尺寸(含静默区),默认 160 */
6
+ size?: number;
7
+ /** 错误校正等级,默认 M */
8
+ level?: ECLevelName;
9
+ /** 静默区(quiet zone)模块数,默认 4(规范要求 ≥4) */
10
+ margin?: number;
11
+ /** 暗模块颜色,默认 #000000 */
12
+ color?: string;
13
+ /** 背景(亮模块)颜色,默认 #FFFFFF */
14
+ bgColor?: string;
15
+ /** 无障碍替代文本,默认等于 value */
16
+ alt?: string;
17
+ }
18
+ declare var __VLS_1: {};
19
+ type __VLS_Slots = {} & {
20
+ default?: (props: typeof __VLS_1) => any;
21
+ };
22
+ declare const __VLS_base: import('vue').DefineComponent<QRCodeProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<QRCodeProps> & Readonly<{}>, {
23
+ size: number;
24
+ color: string;
25
+ level: ECLevelName;
26
+ margin: number;
27
+ bgColor: string;
28
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
29
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
30
+ declare const _default: typeof __VLS_export;
31
+ export default _default;
32
+ type __VLS_WithSlots<T, S> = T & {
33
+ new (): {
34
+ $slots: S;
35
+ };
36
+ };
@@ -0,0 +1,4 @@
1
+ import { default as QRCode } from './QRCode.vue';
2
+ export { QRCode };
3
+ export default QRCode;
4
+ export type { QRCodeProps } from './QRCode.vue';
@@ -0,0 +1,34 @@
1
+ /**
2
+ * 自实现的 QR Code 编码器(零运行时依赖)。
3
+ *
4
+ * 严格遵循 ISO/IEC 18004:2006 规范,算法结构参考 MIT 许可的
5
+ * Kazuhiko Arase `qrcode-generator` / node `qrcode` 实现,
6
+ * 但全部代码为本库自有实现,便于 tree-shaking 与 SSR。
7
+ *
8
+ * 测试(`__tests__/QRCode.spec.ts`)会以固定 mode / version / maskPattern
9
+ * 与 `qrcode` 参考库逐模块比对,确保编码结果完全一致。
10
+ */
11
+ export type ECLevelName = 'L' | 'M' | 'Q' | 'H';
12
+ export type QRModeName = 'numeric' | 'alphanumeric' | 'byte';
13
+ export interface QRCreateOptions {
14
+ /** 错误校正等级,默认 M */
15
+ level?: ECLevelName;
16
+ /** 指定版本 1-40(不指定则自动选择能容纳数据的最小版本) */
17
+ version?: number;
18
+ /** 指定编码模式;不指定则按数据自动选择 */
19
+ mode?: QRModeName;
20
+ /** 指定掩码 0-7;不指定则由惩罚函数自动选择最优掩码 */
21
+ maskPattern?: number;
22
+ /** 强制使用 UTF-8 字节模式(用于含中文等非 ASCII 文本) */
23
+ utf8?: boolean;
24
+ }
25
+ export interface QRResult {
26
+ /** 模块矩阵,行优先,true = 暗模块 */
27
+ modules: boolean[];
28
+ /** 模块边长(不含静默区) */
29
+ moduleCount: number;
30
+ version: number;
31
+ level: ECLevelName;
32
+ maskPattern: number;
33
+ }
34
+ export declare function createQRMatrix(value: string, options?: QRCreateOptions): QRResult;
@@ -1,6 +1,9 @@
1
1
  export interface SearchProps {
2
2
  modelValue?: string;
3
+ /** 占位文案,不传时取语言包中的 `search.placeholder` */
3
4
  placeholder?: string;
5
+ /** 搜索按钮文案,不传时取语言包中的 `search.action` */
6
+ buttonText?: string;
4
7
  size?: 'small' | 'medium' | 'large';
5
8
  }
6
9
  declare const __VLS_export: import('vue').DefineComponent<SearchProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
@@ -13,6 +16,7 @@ declare const __VLS_export: import('vue').DefineComponent<SearchProps, {}, {}, {
13
16
  size: "small" | "medium" | "large";
14
17
  modelValue: string;
15
18
  placeholder: string;
19
+ buttonText: string;
16
20
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
17
21
  declare const _default: typeof __VLS_export;
18
22
  export default _default;
@@ -0,0 +1,34 @@
1
+ export interface SplitterProps {
2
+ /** 各面板的初始占比(百分比),长度即面板数量,默认两栏均分 */
3
+ modelValue?: number[];
4
+ /** 排列方向 */
5
+ layout?: 'horizontal' | 'vertical';
6
+ /** 最小占比(百分比),拖拽不会小于该值 */
7
+ min?: number;
8
+ /** 是否禁用拖拽 */
9
+ disabled?: boolean;
10
+ }
11
+ declare var __VLS_2: `panel-${number}`, __VLS_3: {
12
+ index: number;
13
+ };
14
+ type __VLS_Slots = {} & {
15
+ [K in NonNullable<typeof __VLS_2>]?: (props: typeof __VLS_3) => any;
16
+ };
17
+ declare const __VLS_base: import('vue').DefineComponent<SplitterProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
18
+ "update:modelValue": (value: number[]) => any;
19
+ }, string, import('vue').PublicProps, Readonly<SplitterProps> & Readonly<{
20
+ "onUpdate:modelValue"?: ((value: number[]) => any) | undefined;
21
+ }>, {
22
+ disabled: boolean;
23
+ modelValue: number[];
24
+ min: number;
25
+ layout: "horizontal" | "vertical";
26
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
27
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
28
+ declare const _default: typeof __VLS_export;
29
+ export default _default;
30
+ type __VLS_WithSlots<T, S> = T & {
31
+ new (): {
32
+ $slots: S;
33
+ };
34
+ };
@@ -0,0 +1,4 @@
1
+ import { default as Splitter } from './Splitter.vue';
2
+ export { Splitter };
3
+ export default Splitter;
4
+ export type { SplitterProps } from './Splitter.vue';
@@ -29,6 +29,7 @@ export interface TableProps {
29
29
  /** 已选行的 key,配合 v-model:selectedKeys */
30
30
  selectedKeys?: (string | number)[];
31
31
  /** 数据为空时的文案 */
32
+ /** 空数据文案,不传时取语言包中的 `table.emptyText` */
32
33
  emptyText?: string;
33
34
  }
34
35
  declare var __VLS_15: {
@@ -0,0 +1,28 @@
1
+ export interface TimePickerProps {
2
+ /** 时间字符串,如 '09:30' 或 '09:30:00' */
3
+ modelValue?: string;
4
+ /** 展示与录入格式,默认 'HH:mm';含 ss 时启用秒列 */
5
+ format?: string;
6
+ /** 占位文案,不传时取语言包中的 `timePicker.placeholder` */
7
+ placeholder?: string;
8
+ disabled?: boolean;
9
+ clearable?: boolean;
10
+ /** 分钟步长,默认 1 */
11
+ minuteStep?: number;
12
+ }
13
+ declare const __VLS_export: import('vue').DefineComponent<TimePickerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
14
+ "update:modelValue": (value: string) => any;
15
+ change: (value: string) => any;
16
+ }, string, import('vue').PublicProps, Readonly<TimePickerProps> & Readonly<{
17
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
18
+ onChange?: ((value: string) => any) | undefined;
19
+ }>, {
20
+ disabled: boolean;
21
+ modelValue: string;
22
+ placeholder: string;
23
+ clearable: boolean;
24
+ format: string;
25
+ minuteStep: number;
26
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
27
+ declare const _default: typeof __VLS_export;
28
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import { default as TimePicker } from './TimePicker.vue';
2
+ export { TimePicker };
3
+ export default TimePicker;
4
+ export type { TimePickerProps } from './TimePicker.vue';
@@ -0,0 +1,37 @@
1
+ export type TourPlacement = 'top' | 'bottom' | 'left' | 'right';
2
+ export interface TourStep {
3
+ /** 目标元素选择器,如 '#step-1';不传时气泡居中显示 */
4
+ target?: string;
5
+ title: string;
6
+ description?: string;
7
+ placement?: TourPlacement;
8
+ }
9
+ export interface TourProps {
10
+ /** 是否显示引导 */
11
+ modelValue?: boolean;
12
+ steps?: TourStep[];
13
+ current?: number;
14
+ /** 是否展示跳过按钮,默认 true */
15
+ showSkip?: boolean;
16
+ /** 遮罩是否允许点击关闭 */
17
+ maskClosable?: boolean;
18
+ }
19
+ declare const __VLS_export: import('vue').DefineComponent<TourProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
20
+ "update:modelValue": (value: boolean) => any;
21
+ change: (current: number) => any;
22
+ finish: () => any;
23
+ "update:current": (value: number) => any;
24
+ }, string, import('vue').PublicProps, Readonly<TourProps> & Readonly<{
25
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
26
+ onChange?: ((current: number) => any) | undefined;
27
+ onFinish?: (() => any) | undefined;
28
+ "onUpdate:current"?: ((value: number) => any) | undefined;
29
+ }>, {
30
+ modelValue: boolean;
31
+ current: number;
32
+ steps: TourStep[];
33
+ showSkip: boolean;
34
+ maskClosable: boolean;
35
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
36
+ declare const _default: typeof __VLS_export;
37
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import { default as Tour } from './Tour.vue';
2
+ export { Tour };
3
+ export default Tour;
4
+ export type { TourProps, TourStep, TourPlacement } from './Tour.vue';
@@ -0,0 +1,32 @@
1
+ export interface TreeSelectNode {
2
+ label: string;
3
+ value: string | number;
4
+ children?: TreeSelectNode[];
5
+ disabled?: boolean;
6
+ }
7
+ export interface TreeSelectProps {
8
+ options?: TreeSelectNode[];
9
+ modelValue?: string | number | undefined;
10
+ /** 占位文案,不传时取语言包中的 `common.placeholder` */
11
+ placeholder?: string;
12
+ disabled?: boolean;
13
+ clearable?: boolean;
14
+ /** 初始是否展开全部可展开节点 */
15
+ defaultExpandAll?: boolean;
16
+ }
17
+ declare const __VLS_export: import('vue').DefineComponent<TreeSelectProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
18
+ "update:modelValue": (value: string | number | undefined) => any;
19
+ change: (value: string | number | undefined) => any;
20
+ }, string, import('vue').PublicProps, Readonly<TreeSelectProps> & Readonly<{
21
+ "onUpdate:modelValue"?: ((value: string | number | undefined) => any) | undefined;
22
+ onChange?: ((value: string | number | undefined) => any) | undefined;
23
+ }>, {
24
+ disabled: boolean;
25
+ modelValue: string | number;
26
+ placeholder: string;
27
+ clearable: boolean;
28
+ options: TreeSelectNode[];
29
+ defaultExpandAll: boolean;
30
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
31
+ declare const _default: typeof __VLS_export;
32
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import { default as TreeSelect } from './TreeSelect.vue';
2
+ export { TreeSelect };
3
+ export default TreeSelect;
4
+ export type { TreeSelectProps, TreeSelectNode } from './TreeSelect.vue';
@@ -0,0 +1,29 @@
1
+ import { VirtualListProps } from './types';
2
+ declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
+ props: import('vue').PublicProps & __VLS_PrettifyLocal<VirtualListProps<T> & {
4
+ onScroll?: ((scrollTop: number) => any) | undefined;
5
+ onReachEnd?: (() => any) | undefined;
6
+ }> & (typeof globalThis extends {
7
+ __VLS_PROPS_FALLBACK: infer P;
8
+ } ? P : {});
9
+ expose: (exposed: {}) => void;
10
+ attrs: any;
11
+ slots: {
12
+ item?: (props: {
13
+ item: T;
14
+ index: number;
15
+ }) => any;
16
+ } & {
17
+ empty?: (props: {}) => any;
18
+ };
19
+ emit: ((evt: "scroll", scrollTop: number) => void) & ((evt: "reachEnd") => void);
20
+ }>) => import('vue').VNode & {
21
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
22
+ };
23
+ declare const _default: typeof __VLS_export;
24
+ export default _default;
25
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
26
+ [K in keyof T]: T[K];
27
+ } : {
28
+ [K in keyof T as K]: T[K];
29
+ }) & {};
@@ -0,0 +1,4 @@
1
+ import { default as VirtualList } from './VirtualList.vue';
2
+ export { VirtualList };
3
+ export default VirtualList;
4
+ export type { VirtualListProps } from './types';
@@ -0,0 +1,12 @@
1
+ export interface VirtualListProps<T = unknown> {
2
+ /** 数据源 */
3
+ items: T[];
4
+ /** 单项高度(px),固定高度模式 */
5
+ itemHeight: number;
6
+ /** 可视区高度(px) */
7
+ height: number;
8
+ /** 视口上下各额外渲染的项数,减少快速滚动时的白屏 */
9
+ buffer?: number;
10
+ /** 触发 reachEnd 的提前量(px) */
11
+ reachEndThreshold?: number;
12
+ }
@@ -0,0 +1,45 @@
1
+ import { InjectionKey, Ref } from 'vue';
2
+ import { getLocale, ProjectLocale } from '../locale';
3
+ import { LocalePath } from '../locale/types';
4
+ /** 组件统一尺寸 */
5
+ export type ComponentSize = 'small' | 'medium' | 'large';
6
+ /** 主题模式 */
7
+ export type ThemeMode = 'light' | 'dark';
8
+ /** 全局配置结构 */
9
+ export interface GlobalConfig {
10
+ /** 语言包 */
11
+ locale: ProjectLocale;
12
+ /** 组件默认尺寸 */
13
+ size: ComponentSize;
14
+ /** 弹层基础层级,实际层级在此基础上累加 */
15
+ zIndex: number;
16
+ /** 主题模式 */
17
+ theme: ThemeMode;
18
+ }
19
+ export declare const defaultGlobalConfig: GlobalConfig;
20
+ export declare const configKey: InjectionKey<GlobalConfig>;
21
+ /** 由 ConfigProvider 调用,向其子树注入配置 */
22
+ export declare function provideGlobalConfig(config: GlobalConfig): void;
23
+ /** 读取全局配置,未包裹 ConfigProvider 时返回默认配置 */
24
+ export declare function useGlobalConfig(): GlobalConfig;
25
+ /** 读取当前尺寸,允许组件自身的 size prop 优先覆盖 */
26
+ export declare function useSize(local?: ComponentSize): ComponentSize;
27
+ /** 读取弹层基础层级 */
28
+ export declare function useZIndex(): number;
29
+ export type Translate = (path: LocalePath, ...args: unknown[]) => string;
30
+ /**
31
+ * 读取语言包与取值函数
32
+ *
33
+ * 组件内置文案一律走 t(),这样 ConfigProvider 只需换 locale 即可整站切换语言。
34
+ *
35
+ * 两个返回值的响应式语义:
36
+ * - `t` 每次调用时才读取当前语言包,因此可安全地在 computed / 模板中使用,
37
+ * ConfigProvider 切换语言后会自动重渲染;
38
+ * - `locale` 是 ref,读取具体字段需写 `locale.value.xxx`(同样具备响应性)。
39
+ */
40
+ export declare function useLocale(): {
41
+ t: Translate;
42
+ locale: Ref<ProjectLocale>;
43
+ };
44
+ /** 按名称解析语言包,未知名称回退到默认语言 */
45
+ export { getLocale };
@@ -0,0 +1,90 @@
1
+ /* eslint-disable */
2
+ /* 由 scripts/build-global-types.mjs 自动生成,请勿手动修改 */
3
+ import type * as KB from './index'
4
+
5
+ declare module 'vue' {
6
+ export interface GlobalComponents {
7
+ KbAffix: typeof KB.KbAffix
8
+ KbAlert: typeof KB.KbAlert
9
+ KbAnchor: typeof KB.KbAnchor
10
+ KbAutoComplete: typeof KB.KbAutoComplete
11
+ KbAvatar: typeof KB.KbAvatar
12
+ KbBackTop: typeof KB.KbBackTop
13
+ KbBadge: typeof KB.KbBadge
14
+ KbBreadcrumb: typeof KB.KbBreadcrumb
15
+ KbButton: typeof KB.KbButton
16
+ KbCalendar: typeof KB.KbCalendar
17
+ KbCard: typeof KB.KbCard
18
+ KbCarousel: typeof KB.KbCarousel
19
+ KbCascader: typeof KB.KbCascader
20
+ KbCheckbox: typeof KB.KbCheckbox
21
+ KbCol: typeof KB.KbCol
22
+ KbCollapse: typeof KB.KbCollapse
23
+ KbColorPicker: typeof KB.KbColorPicker
24
+ KbConfigProvider: typeof KB.KbConfigProvider
25
+ KbContent: typeof KB.KbContent
26
+ KbContextMenu: typeof KB.KbContextMenu
27
+ KbCountUp: typeof KB.KbCountUp
28
+ KbDatePicker: typeof KB.KbDatePicker
29
+ KbDescriptions: typeof KB.KbDescriptions
30
+ KbDialog: typeof KB.KbDialog
31
+ KbDivider: typeof KB.KbDivider
32
+ KbDrawer: typeof KB.KbDrawer
33
+ KbDropdown: typeof KB.KbDropdown
34
+ KbEmpty: typeof KB.KbEmpty
35
+ KbFloatButton: typeof KB.KbFloatButton
36
+ KbFloatButtonGroup: typeof KB.KbFloatButtonGroup
37
+ KbFooter: typeof KB.KbFooter
38
+ KbForm: typeof KB.KbForm
39
+ KbFormItem: typeof KB.KbFormItem
40
+ KbHeader: typeof KB.KbHeader
41
+ KbIcon: typeof KB.KbIcon
42
+ KbImage: typeof KB.KbImage
43
+ KbImagePreview: typeof KB.KbImagePreview
44
+ KbInput: typeof KB.KbInput
45
+ KbInputNumber: typeof KB.KbInputNumber
46
+ KbInputPassword: typeof KB.KbInputPassword
47
+ KbLayout: typeof KB.KbLayout
48
+ KbList: typeof KB.KbList
49
+ KbLoading: typeof KB.KbLoading
50
+ KbMentions: typeof KB.KbMentions
51
+ KbMessage: typeof KB.KbMessage
52
+ KbNotification: typeof KB.KbNotification
53
+ KbPagination: typeof KB.KbPagination
54
+ KbPopconfirm: typeof KB.KbPopconfirm
55
+ KbPopover: typeof KB.KbPopover
56
+ KbProgress: typeof KB.KbProgress
57
+ KbQRCode: typeof KB.KbQRCode
58
+ KbRadio: typeof KB.KbRadio
59
+ KbRate: typeof KB.KbRate
60
+ KbResult: typeof KB.KbResult
61
+ KbRow: typeof KB.KbRow
62
+ KbSearch: typeof KB.KbSearch
63
+ KbSegmented: typeof KB.KbSegmented
64
+ KbSelect: typeof KB.KbSelect
65
+ KbSider: typeof KB.KbSider
66
+ KbSkeleton: typeof KB.KbSkeleton
67
+ KbSlider: typeof KB.KbSlider
68
+ KbSpace: typeof KB.KbSpace
69
+ KbSplitter: typeof KB.KbSplitter
70
+ KbStatistic: typeof KB.KbStatistic
71
+ KbSteps: typeof KB.KbSteps
72
+ KbSwitch: typeof KB.KbSwitch
73
+ KbTable: typeof KB.KbTable
74
+ KbTabs: typeof KB.KbTabs
75
+ KbTag: typeof KB.KbTag
76
+ KbTextarea: typeof KB.KbTextarea
77
+ KbTimePicker: typeof KB.KbTimePicker
78
+ KbTimeline: typeof KB.KbTimeline
79
+ KbTooltip: typeof KB.KbTooltip
80
+ KbTour: typeof KB.KbTour
81
+ KbTransfer: typeof KB.KbTransfer
82
+ KbTree: typeof KB.KbTree
83
+ KbTreeSelect: typeof KB.KbTreeSelect
84
+ KbUpload: typeof KB.KbUpload
85
+ KbVirtualList: typeof KB.KbVirtualList
86
+ KbWatermark: typeof KB.KbWatermark
87
+ }
88
+ }
89
+
90
+ export {}