kui-vue 6.2.1 → 6.3.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 (132) hide show
  1. package/ai/kui-components.json +1011 -452
  2. package/dist/index.js +2 -2
  3. package/es/index.js +6216 -4912
  4. package/es/locale/de.js +6 -2
  5. package/es/locale/el.js +6 -2
  6. package/es/locale/en.js +6 -2
  7. package/es/locale/fr.js +6 -2
  8. package/es/locale/it.js +6 -2
  9. package/es/locale/ja.js +6 -2
  10. package/es/locale/ko.js +6 -2
  11. package/es/locale/ru.js +6 -2
  12. package/es/locale/th.js +6 -2
  13. package/es/locale/uk.js +6 -2
  14. package/es/locale/vi.js +6 -2
  15. package/es/locale/zh-CN.js +6 -2
  16. package/es/locale/zh-TW.js +6 -2
  17. package/lib/index.cjs +2 -2
  18. package/lib/locale/de.cjs +2 -2
  19. package/lib/locale/el.cjs +2 -2
  20. package/lib/locale/en.cjs +2 -2
  21. package/lib/locale/fr.cjs +2 -2
  22. package/lib/locale/it.cjs +2 -2
  23. package/lib/locale/ja.cjs +2 -2
  24. package/lib/locale/ko.cjs +2 -2
  25. package/lib/locale/ru.cjs +2 -2
  26. package/lib/locale/th.cjs +2 -2
  27. package/lib/locale/uk.cjs +2 -2
  28. package/lib/locale/vi.cjs +2 -2
  29. package/lib/locale/zh-CN.cjs +2 -2
  30. package/lib/locale/zh-TW.cjs +2 -2
  31. package/package.json +4 -3
  32. package/style/base.css +2 -2
  33. package/style/components.css +2 -2
  34. package/style/index.css +2 -2
  35. package/style/motion.css +1 -1
  36. package/style/theme.css +2 -2
  37. package/types/alert/index.d.ts +5 -5
  38. package/types/auto-complete/index.d.ts +52 -0
  39. package/types/badge/index.d.ts +7 -17
  40. package/types/button/button.d.ts +3 -4
  41. package/types/card/index.d.ts +5 -5
  42. package/types/cascader/index.d.ts +9 -0
  43. package/types/cascader/types.d.ts +5 -0
  44. package/types/check-card/check-card-group.d.ts +5 -9
  45. package/types/check-card/check-card.d.ts +5 -9
  46. package/types/check-card/context.d.ts +3 -3
  47. package/types/check-card/index.d.ts +1 -1
  48. package/types/check-card/types.d.ts +2 -3
  49. package/types/checkbox/checkbox-group.d.ts +5 -5
  50. package/types/checkbox/checkbox.d.ts +2 -2
  51. package/types/collapse/collapse.d.ts +5 -5
  52. package/types/color-picker/index.d.ts +27 -0
  53. package/types/components.d.ts +2 -2
  54. package/types/config/context.d.ts +102 -1
  55. package/types/const/types.d.ts +11 -1
  56. package/types/const/var.d.ts +6 -1
  57. package/types/date-picker/index.d.ts +18 -0
  58. package/types/drawer/index.d.ts +21 -8
  59. package/types/dropdown/dropdown-button.d.ts +23 -4
  60. package/types/dropdown/dropdown-context.d.ts +5 -0
  61. package/types/dropdown/dropdown.d.ts +16 -0
  62. package/types/dropdown/trigger.d.ts +3 -3
  63. package/types/feature-card/index.d.ts +5 -5
  64. package/types/feedback-panel/feedback-panel.d.ts +5 -5
  65. package/types/flame-wrap/engine.d.ts +18 -0
  66. package/types/form/context.d.ts +2 -0
  67. package/types/global.d.ts +256 -0
  68. package/types/image/image.d.ts +5 -5
  69. package/types/input/input-group.d.ts +2 -6
  70. package/types/input-number/index.d.ts +37 -7
  71. package/types/kanban/index.d.ts +5 -4
  72. package/types/list-panel/index.d.ts +5 -5
  73. package/types/locale/de.d.cts +4 -0
  74. package/types/locale/de.d.ts +4 -0
  75. package/types/locale/el.d.cts +4 -0
  76. package/types/locale/el.d.ts +4 -0
  77. package/types/locale/en.d.cts +4 -0
  78. package/types/locale/en.d.ts +4 -0
  79. package/types/locale/fr.d.cts +4 -0
  80. package/types/locale/fr.d.ts +4 -0
  81. package/types/locale/it.d.cts +4 -0
  82. package/types/locale/it.d.ts +4 -0
  83. package/types/locale/ja.d.cts +4 -0
  84. package/types/locale/ja.d.ts +4 -0
  85. package/types/locale/ko.d.cts +4 -0
  86. package/types/locale/ko.d.ts +4 -0
  87. package/types/locale/ru.d.cts +4 -0
  88. package/types/locale/ru.d.ts +4 -0
  89. package/types/locale/th.d.cts +4 -0
  90. package/types/locale/th.d.ts +4 -0
  91. package/types/locale/uk.d.cts +4 -0
  92. package/types/locale/uk.d.ts +4 -0
  93. package/types/locale/vi.d.cts +4 -0
  94. package/types/locale/vi.d.ts +4 -0
  95. package/types/locale/zh-CN.d.cts +4 -0
  96. package/types/locale/zh-CN.d.ts +4 -0
  97. package/types/locale/zh-TW.d.cts +4 -0
  98. package/types/locale/zh-TW.d.ts +4 -0
  99. package/types/mentions/index.d.ts +16 -0
  100. package/types/menu/menu-keyboard.d.ts +23 -0
  101. package/types/modal/index.d.ts +8 -2
  102. package/types/modal/modal.d.ts +27 -4
  103. package/types/modal/toast.d.ts +5 -5
  104. package/types/page/index.d.ts +5 -5
  105. package/types/popconfirm/index.d.ts +16 -0
  106. package/types/poptip/index.d.ts +16 -0
  107. package/types/popup/layers.d.ts +2 -0
  108. package/types/qrcode/index.d.ts +5 -5
  109. package/types/radio/radio-button.d.ts +4 -4
  110. package/types/radio/radio-group.d.ts +2 -2
  111. package/types/radio/radio.d.ts +5 -5
  112. package/types/ripple/engine.d.ts +18 -0
  113. package/types/select/select.d.ts +5 -0
  114. package/types/stat-card/stat-card.d.ts +24 -6
  115. package/types/stat-card/utils/countup.d.ts +3 -3
  116. package/types/stat-card/utils/stat-item-key.d.ts +11 -0
  117. package/types/table/index.d.ts +21 -5
  118. package/types/table/types.d.ts +17 -1
  119. package/types/table/utils.d.ts +76 -0
  120. package/types/tag/index.d.ts +5 -5
  121. package/types/tooltip/index.d.ts +16 -0
  122. package/types/transfer/index.d.ts +5 -4
  123. package/types/tree/index.d.ts +2 -2
  124. package/types/tree-select/index.d.ts +5 -0
  125. package/types/utils/color.d.ts +13 -0
  126. package/types/utils/overlay-order.d.ts +6 -0
  127. package/types/utils/overlay-stack.d.ts +13 -0
  128. package/types/utils/promise.d.ts +5 -0
  129. package/types/utils/vnode.d.ts +25 -0
  130. package/vetur/attributes.json +529 -225
  131. package/vetur/tags.json +76 -28
  132. package/vetur/web-types.json +668 -284
@@ -15,6 +15,11 @@ declare const colorPickerProps: {
15
15
  type: PropType<DropPlacementsType>;
16
16
  default: string;
17
17
  };
18
+ /** 关闭后是否销毁面板内容。默认销毁(重开时重新挂载);设为 false 可保留面板内的表单状态,代价是每个打开过的实例留一份隐藏 DOM。 */
19
+ destroyOnClose: {
20
+ type: BooleanType;
21
+ default: boolean;
22
+ };
18
23
  trigger: {
19
24
  type: PropType<"hover" | "click">;
20
25
  default: string;
@@ -49,6 +54,11 @@ declare const ColorPicker: import("vue").DefineComponent<ExtractPropTypes<{
49
54
  type: PropType<DropPlacementsType>;
50
55
  default: string;
51
56
  };
57
+ /** 关闭后是否销毁面板内容。默认销毁(重开时重新挂载);设为 false 可保留面板内的表单状态,代价是每个打开过的实例留一份隐藏 DOM。 */
58
+ destroyOnClose: {
59
+ type: BooleanType;
60
+ default: boolean;
61
+ };
52
62
  trigger: {
53
63
  type: PropType<"hover" | "click">;
54
64
  default: string;
@@ -86,6 +96,11 @@ declare const ColorPicker: import("vue").DefineComponent<ExtractPropTypes<{
86
96
  type: PropType<DropPlacementsType>;
87
97
  default: string;
88
98
  };
99
+ /** 关闭后是否销毁面板内容。默认销毁(重开时重新挂载);设为 false 可保留面板内的表单状态,代价是每个打开过的实例留一份隐藏 DOM。 */
100
+ destroyOnClose: {
101
+ type: BooleanType;
102
+ default: boolean;
103
+ };
89
104
  trigger: {
90
105
  type: PropType<"hover" | "click">;
91
106
  default: string;
@@ -115,6 +130,7 @@ declare const ColorPicker: import("vue").DefineComponent<ExtractPropTypes<{
115
130
  mode: ColorMode;
116
131
  trigger: "click" | "hover";
117
132
  placement: DropPlacementsType;
133
+ destroyOnClose: boolean | undefined;
118
134
  theme: ThemeType;
119
135
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
120
136
  export declare const ColorPickerPanel: ForwardedComponent<typeof ColorPicker>;
@@ -130,6 +146,11 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
130
146
  type: PropType<DropPlacementsType>;
131
147
  default: string;
132
148
  };
149
+ /** 关闭后是否销毁面板内容。默认销毁(重开时重新挂载);设为 false 可保留面板内的表单状态,代价是每个打开过的实例留一份隐藏 DOM。 */
150
+ destroyOnClose: {
151
+ type: BooleanType;
152
+ default: boolean;
153
+ };
133
154
  trigger: {
134
155
  type: PropType<"hover" | "click">;
135
156
  default: string;
@@ -167,6 +188,11 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
167
188
  type: PropType<DropPlacementsType>;
168
189
  default: string;
169
190
  };
191
+ /** 关闭后是否销毁面板内容。默认销毁(重开时重新挂载);设为 false 可保留面板内的表单状态,代价是每个打开过的实例留一份隐藏 DOM。 */
192
+ destroyOnClose: {
193
+ type: BooleanType;
194
+ default: boolean;
195
+ };
170
196
  trigger: {
171
197
  type: PropType<"hover" | "click">;
172
198
  default: string;
@@ -196,6 +222,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
196
222
  mode: ColorMode;
197
223
  trigger: "click" | "hover";
198
224
  placement: DropPlacementsType;
225
+ destroyOnClose: boolean | undefined;
199
226
  theme: ThemeType;
200
227
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
201
228
  export default _default;
@@ -35,7 +35,7 @@ export type { CarouselProps } from "./carousel";
35
35
  export { Checkbox, CheckboxGroup } from "./checkbox";
36
36
  export type { ChangeEvent, CheckboxChangeEvent, CheckboxGroupProps, CheckboxOption, CheckboxProps, CheckboxValue, } from "./checkbox";
37
37
  export { CheckCard, CheckCardGroup } from "./check-card";
38
- export type { CheckCardChangeEvent, CheckCardGroupProps, CheckCardOption, CheckCardProps, CheckCardTheme, CheckCardValue, } from "./check-card";
38
+ export type { CheckCardChangeEvent, CheckCardGroupProps, CheckCardOption, CheckCardProps, CheckCardValue, } from "./check-card";
39
39
  export { Collapse, CollapsePanel } from "./collapse";
40
40
  export type { CollapsePanelProps, CollapseProps } from "./collapse";
41
41
  export type { CollapseKey } from "./collapse/context";
@@ -161,6 +161,6 @@ export type { WatermarkFont, WatermarkLayoutType, WatermarkProps, WatermarkTextI
161
161
  export { default as VirtualList } from "./virtual-list";
162
162
  export type { VirtualListKey, VirtualListProps } from "./virtual-list";
163
163
  export { default as theme } from "./utils/theme";
164
- export type { AlignType, BooleanType, ButtonType, ColorType, DirectionType, DrawerPlacementsType, DropPlacementsType, PlacementsType, RadioType, ShapeType, SizeType, SpinModeType, SurfaceShapeType, ThemeType, UploadStatusType, ValueType, TriggerType, } from "./const/types";
164
+ export type { AlignType, BooleanType, ButtonType, ColorType, DirectionType, DrawerPlacementsType, DropPlacementsType, MarkThemeType, PlacementsType, RadioType, ShapeType, SizeType, SpinModeType, SurfaceShapeType, SurfaceThemeType, ThemeType, UploadStatusType, ValueType, TriggerType, } from "./const/types";
165
165
  export type { LayoutProps, SiderProps } from "./layout";
166
166
  export type { PopupContainerGetter } from "./config/popup";
@@ -1,5 +1,80 @@
1
1
  import { type AppContext, type ComponentInternalInstance, type ComputedRef, type InjectionKey } from "vue";
2
- import type { ShapeType, SizeType, ThemeType } from "../const/types";
2
+ import type { MarkThemeType, ShapeType, SizeType, SurfaceThemeType, ThemeType } from "../const/types";
3
+ /**
4
+ * 没有 ConfigProvider 兜底时用的语言。
5
+ * 默认值只有这一个出处,inject 的地方不许再各自写 zhCN 兜底;要改库级默认就改这里。
6
+ * 选 `en` 与文档口径一致,也和 dayjs 那侧对得上:中文语言包没注册时,月份和星期本来就是英文。
7
+ */
8
+ export declare const DEFAULT_LOCALE: {
9
+ name: string;
10
+ k: {
11
+ datePicker: {
12
+ year: string;
13
+ month: string;
14
+ selectYear: string;
15
+ selectMonth: string;
16
+ selectDate: string;
17
+ selectTime: string;
18
+ startDate: string;
19
+ endDate: string;
20
+ today: string;
21
+ now: string;
22
+ ok: string;
23
+ back: string;
24
+ };
25
+ form: {
26
+ required: string;
27
+ email: string;
28
+ phone: string;
29
+ number: string;
30
+ num_min: string;
31
+ num_max: string;
32
+ };
33
+ empty: {
34
+ description: string;
35
+ };
36
+ common: {
37
+ ok: string;
38
+ cancel: string;
39
+ };
40
+ page: {
41
+ page: string;
42
+ pageSize: string;
43
+ goto: string;
44
+ items: string;
45
+ total: string;
46
+ };
47
+ qrcode: {
48
+ expired: string;
49
+ scanned: string;
50
+ refresh: string;
51
+ loading: string;
52
+ };
53
+ select: {
54
+ placeholder: string;
55
+ loading: string;
56
+ emptyText: string;
57
+ };
58
+ table: {
59
+ emptyText: string;
60
+ columnSettings: string;
61
+ resetColumns: string;
62
+ expandRow: string;
63
+ collapseRow: string;
64
+ selectRow: string;
65
+ selectAllRows: string;
66
+ };
67
+ upload: {
68
+ successful: string;
69
+ failed: string;
70
+ errorFileSize: string;
71
+ releaseToUpload: string;
72
+ };
73
+ image: {
74
+ preview: string;
75
+ };
76
+ };
77
+ };
3
78
  export interface ConfigProviderContext {
4
79
  size: ComputedRef<SizeType | undefined>;
5
80
  theme: ComputedRef<ThemeType | undefined>;
@@ -16,6 +91,32 @@ export declare const useConfigAppearance: <T extends {
16
91
  shape: ComputedRef<T["shape"]>;
17
92
  surfaceShape: ComputedRef<"round" | T["shape"]>;
18
93
  };
94
+ /**
95
+ * Every component that paints tier classes resolves its value here instead of copying the comparison.
96
+ * Writing no `theme` at all is how a caller says "listen to the component", and this returns the tier
97
+ * that component was built to look like — the same class it reaches with no `theme`, so the two can
98
+ * never drift. A component's own default differs (input-family is `fill`, `collapse` is `outline`,
99
+ * `image` is `plain`), which is why the fallback is a parameter rather than a constant.
100
+ */
101
+ export declare function resolveTheme(theme: ThemeType | undefined, fallback: ThemeType): ThemeType;
102
+ /**
103
+ * The other shape of "listen to the component": some components own no tier class for their default
104
+ * look at all. Button's `k-btn-default` is a *type* class, and a tier the stylesheet never paints —
105
+ * `k-btn-underlined`, since an underline only means something on a control you type into — is a dead
106
+ * class. An unguarded `` [`k-<component>-${theme}`]: theme `` ships both, so a component in this shape
107
+ * resolves through here: a value outside the tiers it actually paints yields `undefined`, emits no tier
108
+ * class, and leaves the component's own look in place.
109
+ */
110
+ export declare function resolvePaintedTheme<T extends ThemeType>(theme: ThemeType | undefined, painted: readonly T[]): T | undefined;
111
+ /**
112
+ * The two painted sets as values, for the components that hand a tier *onward* instead of painting it:
113
+ * a group forwarding to its items, a dropdown forwarding to its buttons, a chip list forwarding to
114
+ * `Tag`. Those callers must vouch for what they pass — `theme` is typed by what the receiver paints —
115
+ * so they run the inherited value through the receiver's guard. A component that paints its own surface
116
+ * keeps a local `PAINTED_THEMES` instead, because the style contract reads that from its source.
117
+ */
118
+ export declare const SURFACE_THEMES: readonly SurfaceThemeType[];
119
+ export declare const MARK_THEMES: readonly MarkThemeType[];
19
120
  interface Point {
20
121
  x: number;
21
122
  y: number;
@@ -9,7 +9,17 @@ export type ShapeType = "circle" | "square" | "round" | "default";
9
9
  export type SurfaceShapeType = "square" | "round";
10
10
  export type BooleanType = PropType<boolean | undefined>;
11
11
  export type ButtonType = "primary" | "danger" | "warning" | "default" | "text" | "link";
12
- export type ThemeType = "outline" | "fill" | "plain" | "default" | "solid" | "dashed" | "underlined";
12
+ export type ThemeType = "outline" | "fill" | "plain" | "solid" | "dashed" | "underlined";
13
+ /**
14
+ * The five tiers a component that paints a *plate* actually draws: the surfaces (Card, Collapse,
15
+ * Alert, Page, Kanban, Transfer, ListPanel, CheckCard, Image, QRCode, FeedbackPanel) plus Tag and
16
+ * Button. `underlined` belongs to controls you type into, so a surface never accepts it and the
17
+ * guard (`resolvePaintedTheme`) lands anything outside these five on the plate the component was
18
+ * built to look like. `ThemeType` stays the wider vocabulary of `ConfigProvider` and `Form`.
19
+ */
20
+ export type SurfaceThemeType = "fill" | "outline" | "plain" | "solid" | "dashed";
21
+ /** The two tiers a mark actually draws; anything else lands on `fill`. */
22
+ export type MarkThemeType = "fill" | "outline";
13
23
  export type RadioType = "radio" | "button";
14
24
  export type DirectionType = "horizontal" | "vertical" | "inline";
15
25
  export type AlignType = "start" | "center" | "end";
@@ -1 +1,6 @@
1
- export declare const colors: readonly ["default", "red", "orange", "yellow", "olive", "green", "teal", "blue", "volcano", "violet", "cyan", "gold", "lime", "magenta", "purple", "pink", "brown", "gray"];
1
+ /**
2
+ * 预设色值名,`Tag` / `Badge` / `Button` / `Tooltip` 的 `color` 共用这一套。
3
+ * 里面只有能上色的名字:不传 `color` 就是组件自己的那张表面,给它再取一个名字只会让人以为
4
+ * 色板里存在一套跟主题无关的档。
5
+ */
6
+ export declare const colors: readonly ["red", "orange", "yellow", "olive", "green", "teal", "blue", "volcano", "violet", "cyan", "gold", "lime", "magenta", "purple", "pink", "brown", "gray"];
@@ -94,6 +94,11 @@ declare const datePickerProps: {
94
94
  type: PropType<DropPlacementsType>;
95
95
  default: string;
96
96
  };
97
+ /** 关闭后是否销毁面板内容。默认销毁(重开时重新挂载);设为 false 可保留面板内的表单状态,代价是每个打开过的实例留一份隐藏 DOM。 */
98
+ destroyOnClose: {
99
+ type: BooleanType;
100
+ default: boolean;
101
+ };
97
102
  };
98
103
  export type DatePickerProps = ExtractPropTypes<typeof datePickerProps>;
99
104
  type DatePickerModelValue = DatePickerOutput | DatePickerOutput[];
@@ -197,12 +202,18 @@ declare const DatePicker: import("vue").DefineComponent<ExtractPropTypes<{
197
202
  type: PropType<DropPlacementsType>;
198
203
  default: string;
199
204
  };
205
+ /** 关闭后是否销毁面板内容。默认销毁(重开时重新挂载);设为 false 可保留面板内的表单状态,代价是每个打开过的实例留一份隐藏 DOM。 */
206
+ destroyOnClose: {
207
+ type: BooleanType;
208
+ default: boolean;
209
+ };
200
210
  }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
201
211
  "update:modelValue": (value: DatePickerOutput | DatePickerOutput[]) => boolean;
202
212
  "update:startDate": (value: DatePickerOutput) => boolean;
203
213
  "update:endDate": (value: DatePickerOutput) => boolean;
204
214
  change: (value: DatePickerOutput | DatePickerOutput[], text: string | string[]) => boolean;
205
215
  openChange: (open: boolean) => boolean;
216
+ "update:opened": (open: boolean) => boolean;
206
217
  clear: () => true;
207
218
  }, string, import("vue").PublicProps, Readonly<ExtractPropTypes<{
208
219
  modelValue: {
@@ -287,6 +298,11 @@ declare const DatePicker: import("vue").DefineComponent<ExtractPropTypes<{
287
298
  type: PropType<DropPlacementsType>;
288
299
  default: string;
289
300
  };
301
+ /** 关闭后是否销毁面板内容。默认销毁(重开时重新挂载);设为 false 可保留面板内的表单状态,代价是每个打开过的实例留一份隐藏 DOM。 */
302
+ destroyOnClose: {
303
+ type: BooleanType;
304
+ default: boolean;
305
+ };
290
306
  }>> & Readonly<{
291
307
  onChange?: ((value: DatePickerOutput | DatePickerOutput[], text: string | string[]) => any) | undefined;
292
308
  onClear?: (() => any) | undefined;
@@ -294,9 +310,11 @@ declare const DatePicker: import("vue").DefineComponent<ExtractPropTypes<{
294
310
  "onUpdate:modelValue"?: ((value: DatePickerOutput | DatePickerOutput[]) => any) | undefined;
295
311
  "onUpdate:startDate"?: ((value: DatePickerOutput) => any) | undefined;
296
312
  "onUpdate:endDate"?: ((value: DatePickerOutput) => any) | undefined;
313
+ "onUpdate:opened"?: ((open: boolean) => any) | undefined;
297
314
  }>, {
298
315
  mode: DatePickerModeType;
299
316
  placement: DropPlacementsType;
317
+ destroyOnClose: boolean | undefined;
300
318
  theme: ThemeType;
301
319
  value: DatePickerInput | DatePickerInput[] | null;
302
320
  bordered: boolean | undefined;
@@ -1,4 +1,4 @@
1
- import { type ComponentPublicInstance, type ExtractPropTypes, type PropType } from "vue";
1
+ import { type ComponentPublicInstance, type ExtractPropTypes, type PropType, type VNodeChild } from "vue";
2
2
  import type { DrawerPlacementsType } from "../const/types";
3
3
  declare const drawerProps: {
4
4
  modelValue: {
@@ -7,8 +7,8 @@ declare const drawerProps: {
7
7
  };
8
8
  value: BooleanConstructor;
9
9
  title: {
10
- type: StringConstructor;
11
- default: string;
10
+ type: PropType<string | VNodeChild>;
11
+ default: undefined;
12
12
  };
13
13
  width: {
14
14
  type: PropType<number | string>;
@@ -51,6 +51,10 @@ declare const drawerProps: {
51
51
  type: BooleanConstructor;
52
52
  default: boolean;
53
53
  };
54
+ destroyOnClose: {
55
+ type: BooleanConstructor;
56
+ default: boolean;
57
+ };
54
58
  };
55
59
  export type DrawerProps = ExtractPropTypes<typeof drawerProps>;
56
60
  declare const Drawer: import("vue").DefineComponent<ExtractPropTypes<{
@@ -60,8 +64,8 @@ declare const Drawer: import("vue").DefineComponent<ExtractPropTypes<{
60
64
  };
61
65
  value: BooleanConstructor;
62
66
  title: {
63
- type: StringConstructor;
64
- default: string;
67
+ type: PropType<string | VNodeChild>;
68
+ default: undefined;
65
69
  };
66
70
  width: {
67
71
  type: PropType<number | string>;
@@ -104,6 +108,10 @@ declare const Drawer: import("vue").DefineComponent<ExtractPropTypes<{
104
108
  type: BooleanConstructor;
105
109
  default: boolean;
106
110
  };
111
+ destroyOnClose: {
112
+ type: BooleanConstructor;
113
+ default: boolean;
114
+ };
107
115
  }>, () => import("vue/jsx-runtime").JSX.Element | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
108
116
  "update:modelValue": (visible: boolean) => boolean;
109
117
  openChange: (visible: boolean) => boolean;
@@ -117,8 +125,8 @@ declare const Drawer: import("vue").DefineComponent<ExtractPropTypes<{
117
125
  };
118
126
  value: BooleanConstructor;
119
127
  title: {
120
- type: StringConstructor;
121
- default: string;
128
+ type: PropType<string | VNodeChild>;
129
+ default: undefined;
122
130
  };
123
131
  width: {
124
132
  type: PropType<number | string>;
@@ -161,6 +169,10 @@ declare const Drawer: import("vue").DefineComponent<ExtractPropTypes<{
161
169
  type: BooleanConstructor;
162
170
  default: boolean;
163
171
  };
172
+ destroyOnClose: {
173
+ type: BooleanConstructor;
174
+ default: boolean;
175
+ };
164
176
  }>> & Readonly<{
165
177
  onCancel?: (() => any) | undefined;
166
178
  onClose?: (() => any) | undefined;
@@ -172,9 +184,10 @@ declare const Drawer: import("vue").DefineComponent<ExtractPropTypes<{
172
184
  width: string | number;
173
185
  mask: boolean;
174
186
  footer: boolean;
175
- title: string;
187
+ title: VNodeChild;
176
188
  loading: boolean;
177
189
  placement: DrawerPlacementsType;
190
+ destroyOnClose: boolean;
178
191
  value: boolean;
179
192
  closable: boolean;
180
193
  modelValue: boolean;
@@ -1,17 +1,23 @@
1
1
  import { type ExtractPropTypes, type PropType } from "vue";
2
- import { type BooleanType, type DropPlacementsType, type ShapeType, type SizeType, type ThemeType } from "../const/types";
2
+ import { type BooleanType, type DropPlacementsType, type ShapeType, type SizeType, type SurfaceThemeType, type TriggerType } from "../const/types";
3
3
  import { type IconType } from "../icon";
4
4
  declare const dropdownButtonProps: {
5
5
  size: PropType<SizeType>;
6
6
  shape: PropType<ShapeType>;
7
7
  disabled: BooleanType;
8
8
  icon: PropType<IconType[]>;
9
- theme: PropType<ThemeType>;
9
+ theme: PropType<SurfaceThemeType>;
10
10
  arrow: BooleanType;
11
+ trigger: PropType<TriggerType>;
11
12
  placement: {
12
13
  type: PropType<DropPlacementsType>;
13
14
  default: string;
14
15
  };
16
+ /** 关闭后是否销毁面板内容。默认销毁(重开时重新挂载);设为 false 可保留面板内的表单状态,代价是每个打开过的实例留一份隐藏 DOM。 */
17
+ destroyOnClose: {
18
+ type: BooleanType;
19
+ default: boolean;
20
+ };
15
21
  };
16
22
  export type DropdownButtonProps = ExtractPropTypes<typeof dropdownButtonProps>;
17
23
  declare const DropdownButton: import("vue").DefineComponent<ExtractPropTypes<{
@@ -19,12 +25,18 @@ declare const DropdownButton: import("vue").DefineComponent<ExtractPropTypes<{
19
25
  shape: PropType<ShapeType>;
20
26
  disabled: BooleanType;
21
27
  icon: PropType<IconType[]>;
22
- theme: PropType<ThemeType>;
28
+ theme: PropType<SurfaceThemeType>;
23
29
  arrow: BooleanType;
30
+ trigger: PropType<TriggerType>;
24
31
  placement: {
25
32
  type: PropType<DropPlacementsType>;
26
33
  default: string;
27
34
  };
35
+ /** 关闭后是否销毁面板内容。默认销毁(重开时重新挂载);设为 false 可保留面板内的表单状态,代价是每个打开过的实例留一份隐藏 DOM。 */
36
+ destroyOnClose: {
37
+ type: BooleanType;
38
+ default: boolean;
39
+ };
28
40
  }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
29
41
  click: (event: MouseEvent) => boolean;
30
42
  }, string, import("vue").PublicProps, Readonly<ExtractPropTypes<{
@@ -32,15 +44,22 @@ declare const DropdownButton: import("vue").DefineComponent<ExtractPropTypes<{
32
44
  shape: PropType<ShapeType>;
33
45
  disabled: BooleanType;
34
46
  icon: PropType<IconType[]>;
35
- theme: PropType<ThemeType>;
47
+ theme: PropType<SurfaceThemeType>;
36
48
  arrow: BooleanType;
49
+ trigger: PropType<TriggerType>;
37
50
  placement: {
38
51
  type: PropType<DropPlacementsType>;
39
52
  default: string;
40
53
  };
54
+ /** 关闭后是否销毁面板内容。默认销毁(重开时重新挂载);设为 false 可保留面板内的表单状态,代价是每个打开过的实例留一份隐藏 DOM。 */
55
+ destroyOnClose: {
56
+ type: BooleanType;
57
+ default: boolean;
58
+ };
41
59
  }>> & Readonly<{
42
60
  onClick?: ((event: MouseEvent) => any) | undefined;
43
61
  }>, {
44
62
  placement: DropPlacementsType;
63
+ destroyOnClose: boolean | undefined;
45
64
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
46
65
  export default DropdownButton;
@@ -4,8 +4,13 @@ export interface DropdownContext {
4
4
  key: string;
5
5
  keyPath: string[];
6
6
  }) => void;
7
+ /** target 模式下的触发按钮(DropdownButton 右块)需要自己反映展开状态 */
8
+ expanded: () => boolean;
7
9
  triggerIn: () => void;
8
10
  triggerOut: () => void;
11
+ triggerClick: () => void;
12
+ triggerContextmenu: () => void;
13
+ triggerKeydown: (event: KeyboardEvent) => void;
9
14
  clearPopTimer: () => void;
10
15
  }
11
16
  export declare const DropdownContextKey: unique symbol;
@@ -15,6 +15,11 @@ declare const dropdownProps: {
15
15
  type: PropType<DropPlacementsType>;
16
16
  default: string;
17
17
  };
18
+ /** 关闭后是否销毁面板内容。默认销毁(重开时重新挂载);设为 false 可保留面板内的表单状态,代价是每个打开过的实例留一份隐藏 DOM。 */
19
+ destroyOnClose: {
20
+ type: BooleanType;
21
+ default: boolean;
22
+ };
18
23
  target: PropType<Ref<HTMLElement | ComponentPublicInstance | null>>;
19
24
  };
20
25
  export type DropdownProps = ExtractPropTypes<typeof dropdownProps>;
@@ -33,6 +38,11 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
33
38
  type: PropType<DropPlacementsType>;
34
39
  default: string;
35
40
  };
41
+ /** 关闭后是否销毁面板内容。默认销毁(重开时重新挂载);设为 false 可保留面板内的表单状态,代价是每个打开过的实例留一份隐藏 DOM。 */
42
+ destroyOnClose: {
43
+ type: BooleanType;
44
+ default: boolean;
45
+ };
36
46
  target: PropType<Ref<HTMLElement | ComponentPublicInstance | null>>;
37
47
  }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
38
48
  "update:show": (show: boolean) => boolean;
@@ -52,6 +62,11 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
52
62
  type: PropType<DropPlacementsType>;
53
63
  default: string;
54
64
  };
65
+ /** 关闭后是否销毁面板内容。默认销毁(重开时重新挂载);设为 false 可保留面板内的表单状态,代价是每个打开过的实例留一份隐藏 DOM。 */
66
+ destroyOnClose: {
67
+ type: BooleanType;
68
+ default: boolean;
69
+ };
55
70
  target: PropType<Ref<HTMLElement | ComponentPublicInstance | null>>;
56
71
  }>> & Readonly<{
57
72
  onOpenChange?: ((open: boolean) => any) | undefined;
@@ -60,5 +75,6 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
60
75
  trigger: TriggerType;
61
76
  placement: DropPlacementsType;
62
77
  arrow: boolean | undefined;
78
+ destroyOnClose: boolean | undefined;
63
79
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
64
80
  export default _default;
@@ -1,13 +1,13 @@
1
1
  import { type PropType } from "vue";
2
- import type { BooleanType, ThemeType } from "../const/types";
2
+ import type { BooleanType, SurfaceThemeType } from "../const/types";
3
3
  import { type IconType } from "../icon";
4
4
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
5
5
  icon: PropType<IconType[]>;
6
6
  disabled: BooleanType;
7
- theme: PropType<ThemeType>;
7
+ theme: PropType<SurfaceThemeType>;
8
8
  }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
9
9
  icon: PropType<IconType[]>;
10
10
  disabled: BooleanType;
11
- theme: PropType<ThemeType>;
11
+ theme: PropType<SurfaceThemeType>;
12
12
  }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
13
13
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import { type ExtractPropTypes, type PropType } from "vue";
2
- import type { BooleanType, SizeType, SurfaceShapeType, ThemeType } from "../const/types";
2
+ import type { BooleanType, SizeType, SurfaceShapeType, SurfaceThemeType } from "../const/types";
3
3
  import { type IconType } from "../icon";
4
4
  declare const featureCardProps: {
5
5
  icon: PropType<IconType[]>;
@@ -10,7 +10,7 @@ declare const featureCardProps: {
10
10
  default: boolean;
11
11
  };
12
12
  theme: {
13
- type: PropType<ThemeType>;
13
+ type: PropType<SurfaceThemeType>;
14
14
  default: string;
15
15
  };
16
16
  shape: {
@@ -40,7 +40,7 @@ declare const FeatureCard: import("vue").DefineComponent<ExtractPropTypes<{
40
40
  default: boolean;
41
41
  };
42
42
  theme: {
43
- type: PropType<ThemeType>;
43
+ type: PropType<SurfaceThemeType>;
44
44
  default: string;
45
45
  };
46
46
  shape: {
@@ -70,7 +70,7 @@ declare const FeatureCard: import("vue").DefineComponent<ExtractPropTypes<{
70
70
  default: boolean;
71
71
  };
72
72
  theme: {
73
- type: PropType<ThemeType>;
73
+ type: PropType<SurfaceThemeType>;
74
74
  default: string;
75
75
  };
76
76
  shape: {
@@ -94,7 +94,7 @@ declare const FeatureCard: import("vue").DefineComponent<ExtractPropTypes<{
94
94
  }>, {
95
95
  direction: "horizontal" | "vertical";
96
96
  size: SizeType;
97
- theme: ThemeType;
97
+ theme: SurfaceThemeType;
98
98
  shape: SurfaceShapeType;
99
99
  bordered: boolean | undefined;
100
100
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1,5 +1,5 @@
1
1
  import { type ExtractPropTypes, type PropType, type VNodeChild } from "vue";
2
- import type { FeedbackPanelKind, SurfaceShapeType, ThemeType } from "../const/types";
2
+ import type { FeedbackPanelKind, SurfaceShapeType, SurfaceThemeType } from "../const/types";
3
3
  import { type IconType } from "../icon";
4
4
  declare const feedbackPanelProps: {
5
5
  kind: {
@@ -11,7 +11,7 @@ declare const feedbackPanelProps: {
11
11
  symbol: PropType<IconType[]>;
12
12
  compact: BooleanConstructor;
13
13
  theme: {
14
- type: PropType<ThemeType>;
14
+ type: PropType<SurfaceThemeType>;
15
15
  default: string;
16
16
  };
17
17
  shape: {
@@ -30,7 +30,7 @@ declare const FeedbackPanel: import("vue").DefineComponent<ExtractPropTypes<{
30
30
  symbol: PropType<IconType[]>;
31
31
  compact: BooleanConstructor;
32
32
  theme: {
33
- type: PropType<ThemeType>;
33
+ type: PropType<SurfaceThemeType>;
34
34
  default: string;
35
35
  };
36
36
  shape: {
@@ -47,7 +47,7 @@ declare const FeedbackPanel: import("vue").DefineComponent<ExtractPropTypes<{
47
47
  symbol: PropType<IconType[]>;
48
48
  compact: BooleanConstructor;
49
49
  theme: {
50
- type: PropType<ThemeType>;
50
+ type: PropType<SurfaceThemeType>;
51
51
  default: string;
52
52
  };
53
53
  shape: {
@@ -56,7 +56,7 @@ declare const FeedbackPanel: import("vue").DefineComponent<ExtractPropTypes<{
56
56
  };
57
57
  }>> & Readonly<{}>, {
58
58
  compact: boolean;
59
- theme: ThemeType;
59
+ theme: SurfaceThemeType;
60
60
  shape: SurfaceShapeType;
61
61
  kind: FeedbackPanelKind;
62
62
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -61,5 +61,23 @@ export interface FlameWrapInstance {
61
61
  /** Stop the loop and release all GPU resources. */
62
62
  destroy: () => void;
63
63
  }
64
+ /**
65
+ * Attributes that turn a canvas into an HTML-in-Canvas host, and the matching
66
+ * opt-in for the element that gets drawn.
67
+ */
68
+ export interface HtmlInCanvasMarkup {
69
+ canvas: Record<string, string>;
70
+ element: Record<string, string>;
71
+ }
72
+ /**
73
+ * Chrome 156 renames the experimental boolean `layoutsubtree` to the
74
+ * standardized `content="drawable"`, and the element handed to
75
+ * `drawElementImage()` now declares itself with its own `drawable` attribute
76
+ * (WICG html-in-canvas issue #169). Browsers advertise the new spelling with a
77
+ * reflected `content` IDL attribute, so the shape is read off the prototype
78
+ * rather than sniffed from a version string: every release only ever sees the
79
+ * attribute it understands.
80
+ */
81
+ export declare function htmlInCanvasMarkup(): HtmlInCanvasMarkup;
64
82
  export declare function supportsHtmlInCanvas(): boolean;
65
83
  export declare function createFlameWrap(elements: FlameWrapElements, options?: FlameWrapOptions): FlameWrapInstance | null;
@@ -64,3 +64,5 @@ export declare const resolveFormControlAttrs: (attrs: Attrs, field: FormFieldCon
64
64
  };
65
65
  export declare const markFormFieldComponent: <T extends object>(component: T) => T;
66
66
  export declare const isFormFieldComponent: (component: unknown) => boolean;
67
+ export declare const markFormFieldWrapper: <T extends object>(component: T) => T;
68
+ export declare const isFormFieldWrapper: (component: unknown) => boolean;