bkui-vue 0.0.2-beta.9 → 0.0.2-table-refactor.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (249) hide show
  1. package/dist/index.cjs.js +69 -61
  2. package/dist/index.esm.js +15945 -15487
  3. package/dist/index.umd.js +69 -61
  4. package/dist/locale/en.esm.js +1 -1
  5. package/dist/locale/en.esm.js.map +1 -1
  6. package/dist/locale/en.umd.js +1 -1
  7. package/dist/locale/en.umd.js.map +1 -1
  8. package/dist/locale/zh-cn.esm.js +1 -1
  9. package/dist/locale/zh-cn.esm.js.map +1 -1
  10. package/dist/locale/zh-cn.umd.js +1 -1
  11. package/dist/locale/zh-cn.umd.js.map +1 -1
  12. package/dist/style.css +1 -1
  13. package/dist/style.variable.css +1 -1
  14. package/lib/affix/affix.d.ts +1 -1
  15. package/lib/affix/index.d.ts +4 -4
  16. package/lib/alert/alert.css +7 -0
  17. package/lib/alert/alert.d.ts +5 -5
  18. package/lib/alert/alert.less +16 -6
  19. package/lib/alert/alert.variable.css +7 -0
  20. package/lib/alert/index.d.ts +10 -10
  21. package/lib/animate-number/index.d.ts +1 -1
  22. package/lib/backtop/index.d.ts +1 -1
  23. package/lib/badge/badge.d.ts +2 -2
  24. package/lib/badge/index.d.ts +7 -7
  25. package/lib/breadcrumb/index.d.ts +2 -2
  26. package/lib/button/button.css +20 -0
  27. package/lib/button/button.less +105 -94
  28. package/lib/button/button.variable.css +20 -0
  29. package/lib/button/index.d.ts +2 -2
  30. package/lib/card/card.d.ts +1 -1
  31. package/lib/card/index.d.ts +4 -4
  32. package/lib/cascader/cascader.d.ts +1 -0
  33. package/lib/cascader/index.d.ts +5 -2
  34. package/lib/cascader/index.js +1 -1
  35. package/lib/cascader/interface.d.ts +1 -1
  36. package/lib/checkbox/checkbox-group.d.ts +6 -3
  37. package/lib/checkbox/checkbox.d.ts +4 -4
  38. package/lib/checkbox/index.d.ts +22 -19
  39. package/lib/checkbox/index.js +1 -1
  40. package/lib/code-diff/index.d.ts +1 -1
  41. package/lib/collapse/index.d.ts +2 -2
  42. package/lib/collapse-transition/index.d.ts +128 -2
  43. package/lib/collapse-transition/index.js +1 -1
  44. package/lib/color-picker/color-picker.d.ts +16 -0
  45. package/lib/color-picker/components/recommend-colors.d.ts +16 -0
  46. package/lib/color-picker/index.d.ts +19 -1
  47. package/lib/color-picker/index.js +1 -1
  48. package/lib/config-provider/config-provider.d.ts +3 -0
  49. package/lib/config-provider/index.d.ts +5 -1
  50. package/lib/config-provider/index.js +1 -1
  51. package/lib/config-provider/token.d.ts +1 -0
  52. package/lib/config-provider/use-global-config.d.ts +2 -0
  53. package/lib/config-provider/use-prefix.d.ts +2 -0
  54. package/lib/container/index.d.ts +2 -2
  55. package/lib/date-picker/date-picker.d.ts +3 -1
  56. package/lib/date-picker/index.d.ts +12 -5
  57. package/lib/date-picker/index.js +1 -1
  58. package/lib/date-picker/panel/date-range.d.ts +2 -1
  59. package/lib/dialog/dialog.css +2 -0
  60. package/lib/dialog/dialog.variable.css +2 -0
  61. package/lib/dialog/index.d.ts +1 -1
  62. package/lib/directives/index.js +1 -1
  63. package/lib/directives/tooltips.d.ts +3 -2
  64. package/lib/divider/index.d.ts +1 -1
  65. package/lib/dropdown/dropdown.css +1 -0
  66. package/lib/dropdown/dropdown.variable.css +1 -0
  67. package/lib/dropdown/index.d.ts +2 -2
  68. package/lib/exception/index.d.ts +2 -2
  69. package/lib/fixed-navbar/index.d.ts +1 -1
  70. package/lib/form/index.d.ts +3 -3
  71. package/lib/form/index.js +1 -1
  72. package/lib/hooks.d.ts +1 -1
  73. package/lib/hooks.js +1 -1
  74. package/lib/icon/assistant.d.ts +4 -0
  75. package/lib/icon/assistant.js +1 -0
  76. package/lib/icon/index.d.ts +1 -0
  77. package/lib/icon/index.js +1 -1
  78. package/lib/image/index.d.ts +1 -1
  79. package/lib/image/index.js +1 -1
  80. package/lib/info-box/index.js +1 -1
  81. package/lib/info-box/info-box.css +2 -0
  82. package/lib/info-box/info-box.less +2 -1
  83. package/lib/info-box/info-box.variable.css +2 -0
  84. package/lib/input/index.d.ts +146 -50
  85. package/lib/input/index.js +2 -1
  86. package/lib/input/index.js.LICENSE.txt +1 -0
  87. package/lib/input/input.css +34 -6
  88. package/lib/input/input.d.ts +100 -11
  89. package/lib/input/input.less +53 -14
  90. package/lib/input/input.variable.css +34 -6
  91. package/lib/input/util.d.ts +6 -0
  92. package/lib/link/index.d.ts +4 -4
  93. package/lib/link/link.d.ts +1 -1
  94. package/lib/loading/index.d.ts +2 -2
  95. package/lib/locale/index.js +1 -1
  96. package/lib/locale/lang/en.d.ts +1 -0
  97. package/lib/menu/index.d.ts +2 -2
  98. package/lib/message/index.js +1 -1
  99. package/lib/message/message.css +33 -9
  100. package/lib/message/message.less +78 -54
  101. package/lib/message/message.variable.css +33 -9
  102. package/lib/message/messageConstructor.d.ts +25 -4
  103. package/lib/modal/index.d.ts +2 -2
  104. package/lib/modal/index.js +1 -1
  105. package/lib/modal/modal.css +2 -0
  106. package/lib/modal/modal.variable.css +2 -0
  107. package/lib/navigation/index.d.ts +4 -1
  108. package/lib/navigation/index.js +1 -1
  109. package/lib/navigation/navigation.d.ts +1 -0
  110. package/lib/notify/index.js +1 -1
  111. package/lib/notify/notifyConstructor.d.ts +1 -1
  112. package/lib/overflow-title/components/overflow-title.d.ts +257 -1
  113. package/lib/overflow-title/index.d.ts +387 -2
  114. package/lib/overflow-title/index.js +1 -1
  115. package/lib/overflow-title/props.d.ts +129 -0
  116. package/lib/pagination/index.d.ts +2 -2
  117. package/lib/plugin-popover/index.js +1 -1
  118. package/lib/pop-confirm/index.d.ts +1 -1
  119. package/lib/popover/content.d.ts +33 -0
  120. package/lib/popover/index.d.ts +74 -16
  121. package/lib/popover/index.js +1 -1
  122. package/lib/popover/popover.css +1 -0
  123. package/lib/popover/popover.d.ts +40 -7
  124. package/lib/popover/popover.less +3 -2
  125. package/lib/popover/popover.variable.css +1 -0
  126. package/lib/popover/props.d.ts +25 -2
  127. package/lib/popover/use-floating.d.ts +1 -1
  128. package/lib/popover/use-popover-init.d.ts +2 -1
  129. package/lib/popover2/index.d.ts +1 -1
  130. package/lib/preset.d.ts +2 -0
  131. package/lib/process/index.d.ts +1 -1
  132. package/lib/progress/index.d.ts +1 -1
  133. package/lib/radio/index.d.ts +23 -23
  134. package/lib/radio/radio-button.d.ts +4 -4
  135. package/lib/radio/radio-group.d.ts +4 -4
  136. package/lib/radio/radio.d.ts +4 -4
  137. package/lib/rate/index.d.ts +8 -4
  138. package/lib/rate/index.js +1 -1
  139. package/lib/rate/rate.d.ts +2 -1
  140. package/lib/resize-layout/index.d.ts +4 -4
  141. package/lib/resize-layout/index.js +1 -1
  142. package/lib/resize-layout/resize-layout.css +12 -0
  143. package/lib/resize-layout/resize-layout.d.ts +1 -1
  144. package/lib/resize-layout/resize-layout.less +12 -0
  145. package/lib/resize-layout/resize-layout.variable.css +12 -0
  146. package/lib/search-select/index.d.ts +62 -29
  147. package/lib/search-select/index.js +1 -1
  148. package/lib/search-select/input.d.ts +5 -1
  149. package/lib/search-select/menu.d.ts +33 -2
  150. package/lib/search-select/search-select.css +31 -11
  151. package/lib/search-select/search-select.d.ts +23 -20
  152. package/lib/search-select/search-select.less +29 -10
  153. package/lib/search-select/search-select.variable.css +31 -11
  154. package/lib/search-select/selected.d.ts +5 -1
  155. package/lib/search-select/utils.d.ts +13 -5
  156. package/lib/select/common.d.ts +1 -0
  157. package/lib/select/index.d.ts +203 -72
  158. package/lib/select/index.js +1 -1
  159. package/lib/select/option.d.ts +11 -0
  160. package/lib/select/select.css +9 -1
  161. package/lib/select/select.d.ts +86 -31
  162. package/lib/select/select.less +11 -1
  163. package/lib/select/select.variable.css +9 -1
  164. package/lib/select/selectTagInput.d.ts +8 -5
  165. package/lib/shared/helper.d.ts +1 -1
  166. package/lib/shared/index.js +1 -1
  167. package/lib/shared/mask-manager.d.ts +3 -4
  168. package/lib/shared/pop-manager.d.ts +6 -2
  169. package/lib/shared/popover.d.ts +2 -2
  170. package/lib/shared/vue-types.d.ts +3 -2
  171. package/lib/sideslider/index.d.ts +1 -1
  172. package/lib/slider/index.d.ts +1 -1
  173. package/lib/slider/index.js +1 -1
  174. package/lib/steps/index.d.ts +1 -1
  175. package/lib/steps/index.js +1 -1
  176. package/lib/styles/mixins/clearfix.css +8 -0
  177. package/lib/styles/mixins/clearfix.less +10 -0
  178. package/lib/styles/mixins/clearfix.variable.css +8 -0
  179. package/lib/styles/mixins/mixins.css +72 -0
  180. package/lib/styles/mixins/mixins.less +5 -0
  181. package/lib/styles/mixins/mixins.variable.css +72 -0
  182. package/lib/styles/mixins/popper.less +6 -5
  183. package/lib/swiper/index.d.ts +1 -1
  184. package/lib/swiper/index.js +1 -1
  185. package/lib/swiper/swiper.css +0 -6
  186. package/lib/swiper/swiper.less +0 -8
  187. package/lib/swiper/swiper.variable.css +0 -6
  188. package/lib/switcher/index.d.ts +30 -16
  189. package/lib/switcher/index.js +1 -1
  190. package/lib/switcher/switcher.d.ts +74 -5
  191. package/lib/tab/index.d.ts +3 -3
  192. package/lib/tab/tab-nav.d.ts +12 -2
  193. package/lib/tab/tab-panel.d.ts +1 -1
  194. package/lib/table/components/table-cell.d.ts +22 -24
  195. package/lib/table/components/table-column.d.ts +123 -81
  196. package/lib/table/const.d.ts +18 -2
  197. package/lib/table/events.d.ts +26 -26
  198. package/lib/table/index.d.ts +279 -294
  199. package/lib/table/index.js +1 -1
  200. package/lib/table/plugins/head-filter.css +3 -0
  201. package/lib/table/plugins/head-filter.less +3 -0
  202. package/lib/table/plugins/head-filter.variable.css +3 -0
  203. package/lib/table/plugins/settings.d.ts +7 -17
  204. package/lib/table/plugins/use-column-resize.d.ts +30 -10
  205. package/lib/table/plugins/use-fixed-column.d.ts +6 -5
  206. package/lib/table/plugins/use-pagination.d.ts +7 -4
  207. package/lib/table/props.d.ts +117 -58
  208. package/lib/table/render.d.ts +7 -17
  209. package/lib/table/table.css +79 -10
  210. package/lib/table/table.d.ts +95 -72
  211. package/lib/table/table.less +55 -20
  212. package/lib/table/table.variable.css +79 -10
  213. package/lib/table/use-attributes.d.ts +55 -0
  214. package/lib/table/use-column.d.ts +175 -49
  215. package/lib/table/use-common.d.ts +1608 -88
  216. package/lib/table/use-render.d.ts +11 -0
  217. package/lib/table/utils.d.ts +30 -29
  218. package/lib/table-column/index.d.ts +235 -405
  219. package/lib/table-column/index.js +1 -1
  220. package/lib/tag/index.d.ts +10 -10
  221. package/lib/tag/index.js +1 -1
  222. package/lib/tag/tag.d.ts +5 -5
  223. package/lib/tag-input/index.d.ts +49 -7
  224. package/lib/tag-input/index.js +1 -1
  225. package/lib/tag-input/tag-input.css +9 -1
  226. package/lib/tag-input/tag-input.d.ts +46 -6
  227. package/lib/tag-input/tag-input.less +13 -4
  228. package/lib/tag-input/tag-input.variable.css +9 -1
  229. package/lib/tag-input/tag-props.d.ts +16 -2
  230. package/lib/time-picker/index.d.ts +1 -1
  231. package/lib/timeline/index.d.ts +1 -1
  232. package/lib/transfer/index.d.ts +1 -1
  233. package/lib/tree/constant.d.ts +2 -2
  234. package/lib/tree/index.d.ts +37 -7
  235. package/lib/tree/index.js +1 -1
  236. package/lib/tree/props.d.ts +8 -1
  237. package/lib/tree/tree.d.ts +20 -2
  238. package/lib/tree/use-node-action.d.ts +3 -2
  239. package/lib/tree/use-node-attribute.d.ts +15 -8
  240. package/lib/tree/use-tree-init.d.ts +1 -2
  241. package/lib/tree/util.d.ts +7 -2
  242. package/lib/upload/index.d.ts +1 -1
  243. package/lib/virtual-render/index.d.ts +43 -1
  244. package/lib/virtual-render/index.js +1 -1
  245. package/lib/virtual-render/props.d.ts +15 -0
  246. package/lib/virtual-render/v-virtual-render.d.ts +1 -0
  247. package/lib/virtual-render/virtual-render.d.ts +27 -2
  248. package/lib/volar.components.d.ts +24 -24
  249. package/package.json +17 -16
@@ -12,9 +12,9 @@ declare const BkRadio: {
12
12
  class?: unknown;
13
13
  readonly label: string | number | boolean;
14
14
  style?: unknown;
15
- onChange?: (value: string | number | boolean) => any;
16
- key?: string | number | symbol;
15
+ onChange?: (value: any) => any;
17
16
  ref?: import("vue").VNodeRef;
17
+ key?: string | number | symbol;
18
18
  ref_for?: boolean;
19
19
  ref_key?: string;
20
20
  onVnodeBeforeMount?: ((vnode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
@@ -55,7 +55,7 @@ declare const BkRadio: {
55
55
  }>) => void) | ((vnode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
56
56
  [key: string]: any;
57
57
  }>) => void)[];
58
- "onUpdate:modelValue"?: (value: string | number | boolean) => any;
58
+ "onUpdate:modelValue"?: (value: any) => any;
59
59
  };
60
60
  $attrs: {
61
61
  [x: string]: unknown;
@@ -68,7 +68,7 @@ declare const BkRadio: {
68
68
  }>;
69
69
  $root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}>;
70
70
  $parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}>;
71
- $emit: ((event: "change", value: string | number | boolean) => void) & ((event: "update:modelValue", value: string | number | boolean) => void);
71
+ $emit: ((event: "change", value: any) => void) & ((event: "update:modelValue", value: any) => void);
72
72
  $el: any;
73
73
  $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
74
74
  name: import("vue-types").VueTypeValidableDef<string> & {
@@ -93,8 +93,8 @@ declare const BkRadio: {
93
93
  default: boolean;
94
94
  };
95
95
  }>> & {
96
- onChange?: (value: string | number | boolean) => any;
97
- "onUpdate:modelValue"?: (value: string | number | boolean) => any;
96
+ onChange?: (value: any) => any;
97
+ "onUpdate:modelValue"?: (value: any) => any;
98
98
  }, {
99
99
  isFocused: import("vue").Ref<boolean>;
100
100
  isChecked: import("vue").Ref<boolean>;
@@ -105,8 +105,8 @@ declare const BkRadio: {
105
105
  handleChange: (event: Event) => void;
106
106
  resolveClassName: (cls: string) => string;
107
107
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
108
- 'update:modelValue': (value: string | number | boolean) => boolean;
109
- change: (value: string | number | boolean) => boolean;
108
+ 'update:modelValue': (value: any) => boolean;
109
+ change: (value: any) => boolean;
110
110
  }, string, {
111
111
  name: string;
112
112
  disabled: boolean;
@@ -155,8 +155,8 @@ declare const BkRadio: {
155
155
  default: boolean;
156
156
  };
157
157
  }>> & {
158
- onChange?: (value: string | number | boolean) => any;
159
- "onUpdate:modelValue"?: (value: string | number | boolean) => any;
158
+ onChange?: (value: any) => any;
159
+ "onUpdate:modelValue"?: (value: any) => any;
160
160
  } & import("vue").ShallowUnwrapRef<{
161
161
  isFocused: import("vue").Ref<boolean>;
162
162
  isChecked: import("vue").Ref<boolean>;
@@ -193,8 +193,8 @@ declare const BkRadio: {
193
193
  default: boolean;
194
194
  };
195
195
  }>> & {
196
- onChange?: (value: string | number | boolean) => any;
197
- "onUpdate:modelValue"?: (value: string | number | boolean) => any;
196
+ onChange?: (value: any) => any;
197
+ "onUpdate:modelValue"?: (value: any) => any;
198
198
  }, {
199
199
  isFocused: import("vue").Ref<boolean>;
200
200
  isChecked: import("vue").Ref<boolean>;
@@ -205,8 +205,8 @@ declare const BkRadio: {
205
205
  handleChange: (event: Event) => void;
206
206
  resolveClassName: (cls: string) => string;
207
207
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
208
- 'update:modelValue': (value: string | number | boolean) => boolean;
209
- change: (value: string | number | boolean) => boolean;
208
+ 'update:modelValue': (value: any) => boolean;
209
+ change: (value: any) => boolean;
210
210
  }, string, {
211
211
  name: string;
212
212
  disabled: boolean;
@@ -234,8 +234,8 @@ declare const BkRadio: {
234
234
  }, {
235
235
  resolveClassName: (cls: string) => string;
236
236
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
237
- 'update:modelValue': (value: string | number | boolean) => boolean;
238
- change: (value: string | number | boolean) => boolean;
237
+ 'update:modelValue': (value: any) => boolean;
238
+ change: (value: any) => boolean;
239
239
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
240
240
  name: import("vue-types").VueTypeValidableDef<string> & {
241
241
  default: string;
@@ -255,8 +255,8 @@ declare const BkRadio: {
255
255
  default: string;
256
256
  };
257
257
  }>> & {
258
- onChange?: (value: string | number | boolean) => any;
259
- "onUpdate:modelValue"?: (value: string | number | boolean) => any;
258
+ onChange?: (value: any) => any;
259
+ "onUpdate:modelValue"?: (value: any) => any;
260
260
  }, {
261
261
  name: string;
262
262
  type: string;
@@ -296,8 +296,8 @@ declare const BkRadio: {
296
296
  handleChange: (event: Event) => void;
297
297
  resolveClassName: (cls: string) => string;
298
298
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
299
- 'update:modelValue': (value: string | number | boolean) => boolean;
300
- change: (value: string | number | boolean) => boolean;
299
+ 'update:modelValue': (value: any) => boolean;
300
+ change: (value: any) => boolean;
301
301
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
302
302
  name: import("vue-types").VueTypeValidableDef<string> & {
303
303
  default: string;
@@ -322,8 +322,8 @@ declare const BkRadio: {
322
322
  };
323
323
  size: import("vue-types").VueTypeDef<"default" | "small" | "large">;
324
324
  }>> & {
325
- onChange?: (value: string | number | boolean) => any;
326
- "onUpdate:modelValue"?: (value: string | number | boolean) => any;
325
+ onChange?: (value: any) => any;
326
+ "onUpdate:modelValue"?: (value: any) => any;
327
327
  }, {
328
328
  name: string;
329
329
  disabled: boolean;
@@ -332,4 +332,4 @@ declare const BkRadio: {
332
332
  }, {}>;
333
333
  }>;
334
334
  export default BkRadio;
335
- export { BkRadio, RadioGroup as BkRadioGroup, RadioButton as BkRadioButton, };
335
+ export { BkRadio, RadioGroup as BkRadioGroup, RadioButton as BkRadioButton };
@@ -57,8 +57,8 @@ declare const _default: import("vue").DefineComponent<{
57
57
  handleChange: (event: Event) => void;
58
58
  resolveClassName: (cls: string) => string;
59
59
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
60
- 'update:modelValue': (value: RadioButtonProps['modelValue']) => boolean;
61
- change: (value: RadioButtonProps['modelValue']) => boolean;
60
+ 'update:modelValue': (value: any) => boolean;
61
+ change: (value: any) => boolean;
62
62
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
63
63
  name: import("vue-types").VueTypeValidableDef<string> & {
64
64
  default: string;
@@ -83,8 +83,8 @@ declare const _default: import("vue").DefineComponent<{
83
83
  };
84
84
  size: import("vue-types").VueTypeDef<"default" | "small" | "large">;
85
85
  }>> & {
86
- onChange?: (value: string | number | boolean) => any;
87
- "onUpdate:modelValue"?: (value: string | number | boolean) => any;
86
+ onChange?: (value: any) => any;
87
+ "onUpdate:modelValue"?: (value: any) => any;
88
88
  }, {
89
89
  name: string;
90
90
  disabled: boolean;
@@ -40,8 +40,8 @@ declare const _default: import("vue").DefineComponent<{
40
40
  }, {
41
41
  resolveClassName: (cls: string) => string;
42
42
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
43
- 'update:modelValue': (value: RadioGroupProps['modelValue']) => boolean;
44
- change: (value: RadioGroupProps['modelValue']) => boolean;
43
+ 'update:modelValue': (value: any) => boolean;
44
+ change: (value: any) => boolean;
45
45
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
46
46
  name: import("vue-types").VueTypeValidableDef<string> & {
47
47
  default: string;
@@ -61,8 +61,8 @@ declare const _default: import("vue").DefineComponent<{
61
61
  default: string;
62
62
  };
63
63
  }>> & {
64
- onChange?: (value: string | number | boolean) => any;
65
- "onUpdate:modelValue"?: (value: string | number | boolean) => any;
64
+ onChange?: (value: any) => any;
65
+ "onUpdate:modelValue"?: (value: any) => any;
66
66
  }, {
67
67
  name: string;
68
68
  type: string;
@@ -55,8 +55,8 @@ declare const _default: import("vue").DefineComponent<{
55
55
  handleChange: (event: Event) => void;
56
56
  resolveClassName: (cls: string) => string;
57
57
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
58
- 'update:modelValue': (value: RadioProps['modelValue']) => boolean;
59
- change: (value: RadioProps['modelValue']) => boolean;
58
+ 'update:modelValue': (value: any) => boolean;
59
+ change: (value: any) => boolean;
60
60
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
61
61
  name: import("vue-types").VueTypeValidableDef<string> & {
62
62
  default: string;
@@ -80,8 +80,8 @@ declare const _default: import("vue").DefineComponent<{
80
80
  default: boolean;
81
81
  };
82
82
  }>> & {
83
- onChange?: (value: string | number | boolean) => any;
84
- "onUpdate:modelValue"?: (value: string | number | boolean) => any;
83
+ onChange?: (value: any) => any;
84
+ "onUpdate:modelValue"?: (value: any) => any;
85
85
  }, {
86
86
  name: string;
87
87
  disabled: boolean;
@@ -9,8 +9,8 @@ declare const BkRate: {
9
9
  class?: unknown;
10
10
  style?: unknown;
11
11
  onChange?: (...args: any[]) => any;
12
- key?: string | number | symbol;
13
12
  ref?: import("vue").VNodeRef;
13
+ key?: string | number | symbol;
14
14
  ref_for?: boolean;
15
15
  ref_key?: string;
16
16
  onVnodeBeforeMount?: ((vnode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
@@ -53,6 +53,7 @@ declare const BkRate: {
53
53
  }>) => void)[];
54
54
  readonly size?: "default" | "small" | "large";
55
55
  "onUpdate:modelValue"?: (...args: any[]) => any;
56
+ "onHover-change"?: (...args: any[]) => any;
56
57
  };
57
58
  $attrs: {
58
59
  [x: string]: unknown;
@@ -65,7 +66,7 @@ declare const BkRate: {
65
66
  }>;
66
67
  $root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}>;
67
68
  $parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}>;
68
- $emit: (event: "change" | "update:modelValue", ...args: any[]) => void;
69
+ $emit: (event: "change" | "update:modelValue" | "hover-change", ...args: any[]) => void;
69
70
  $el: any;
70
71
  $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
71
72
  modelValue: import("vue-types").VueTypeValidableDef<number> & {
@@ -87,7 +88,8 @@ declare const BkRate: {
87
88
  }>> & {
88
89
  onChange?: (...args: any[]) => any;
89
90
  "onUpdate:modelValue"?: (...args: any[]) => any;
90
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], string, {
91
+ "onHover-change"?: (...args: any[]) => any;
92
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue" | "hover-change")[], string, {
91
93
  modelValue: number;
92
94
  withValidate: boolean;
93
95
  editable: boolean;
@@ -131,6 +133,7 @@ declare const BkRate: {
131
133
  }>> & {
132
134
  onChange?: (...args: any[]) => any;
133
135
  "onUpdate:modelValue"?: (...args: any[]) => any;
136
+ "onHover-change"?: (...args: any[]) => any;
134
137
  } & import("vue").ShallowUnwrapRef<() => JSX.Element> & {} & import("vue").ComponentCustomProperties & {};
135
138
  __isFragment?: never;
136
139
  __isTeleport?: never;
@@ -155,7 +158,8 @@ declare const BkRate: {
155
158
  }>> & {
156
159
  onChange?: (...args: any[]) => any;
157
160
  "onUpdate:modelValue"?: (...args: any[]) => any;
158
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", {
161
+ "onHover-change"?: (...args: any[]) => any;
162
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue" | "hover-change")[], "change" | "update:modelValue" | "hover-change", {
159
163
  modelValue: number;
160
164
  withValidate: boolean;
161
165
  editable: boolean;
package/lib/rate/index.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("../config-provider"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../config-provider"],t);else{var r="object"==typeof exports?t(require("../shared"),require("vue"),require("../config-provider")):t(e["../shared"],e.vue,e["../config-provider"]);for(var o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(self,((e,t,r)=>(()=>{"use strict";var o={2717:e=>{e.exports=r},4212:t=>{t.exports=e},748:e=>{e.exports=t}},n={};function a(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={exports:{}};return o[e](r,r.exports,a),r.exports}a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{a.r(i),a.d(i,{default:()=>s});var e=a(4212);function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function r(e,r,o){return(r=function(e){var r=function(e,r){if("object"!==t(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,"string");if("object"!==t(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===t(r)?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o,e}var o=a(748),n=a(2717);const u=(0,o.defineComponent)({name:"Star",props:{rate:e.PropTypes.number.def(0),width:e.PropTypes.number.def(15),height:e.PropTypes.number.def(16),editable:e.PropTypes.bool.def(!0),hoverRate:e.PropTypes.number.def(0),max:e.PropTypes.number.def(5)},emits:["chooseRate","changeHover"],setup:function(t,a){var i=a.emit,u=(0,n.usePrefix)().resolveClassName,l=function(o){var n;return(0,e.classes)((r(n={},"".concat(u("is-select")),o<Math.floor(s.value)),r(n,"".concat(u("is-edit")),t.editable),r(n,"".concat(u("rate-star")),!0),n))},s=(0,o.computed)((function(){return t.hoverRate||t.rate})),c={width:"".concat(t.width,"px"),height:"".concat(t.height,"px"),minWidth:"".concat(t.width,"px")};return function(){return(0,o.createVNode)("p",{class:"".concat(u("rate-stars"))},[Array(t.max).fill(1).map((function(e,r){return(0,o.createVNode)("svg",{class:l(r),style:c,x:"0px",y:"0px",viewBox:"0 0 64 64",onClick:function(){return function(e){t.editable&&i("chooseRate",e+1)}(r)},onMouseenter:function(){return function(e){t.editable&&i("changeHover",e+1)}(r)}},[(0,o.createVNode)("g",{transform:"translate(-143.000000, -635.000000)"},[(0,o.createVNode)("g",{transform:"translate(83.000000, 114.000000)"},[(0,o.createVNode)("g",{transform:"translate(15.000000, 384.000000)"},[(0,o.createVNode)("g",{transform:"translate(29.000000, 137.000000)"},[(0,o.createVNode)("polygon",{class:"st1",points:"48,53 28.2,63.9 32,40.8 16,24.4 38.1,21 48,-0.1 57.8,21 79.9,24.4 63.9,40.8 67.7,63.9"},null)])])])])])}))])}}}),l=(0,o.defineComponent)({name:"Rate",components:{star:u},props:{modelValue:e.PropTypes.number.def(0),size:e.PropTypes.size(),editable:e.PropTypes.bool.def(!0),withValidate:e.PropTypes.bool.def(!0)},emits:["change","update:modelValue"],setup:function(t,a){var i=a.emit,l=(0,n.usePrefix)().resolveClassName,s=(0,e.useFormItem)(),c=(0,o.ref)(0),d=function(e){t.editable&&(i("update:modelValue",e),i("change",e))},p=function(e){c.value=e},f=(0,e.classes)(r({},"".concat(l("rate")),!0)),m={small:{width:12,height:12},large:{width:18,height:18}}[t.size]||{width:15,height:16},h=(0,o.computed)((function(){var e=Math.floor(t.modelValue),r=(m.width+3)*e,o=m.width*(t.modelValue-e);return{width:"".concat(r+o,"px")}})),v={width:m.width,height:m.height};return(0,o.watch)((function(){return t.modelValue}),(function(){var e;t.withValidate&&(null===(e=null==s?void 0:s.validate)||void 0===e||e.call(s,"change"))})),function(){return(0,o.createVNode)("p",{class:f},[t.editable?(0,o.createVNode)(u,(0,o.mergeProps)({rate:t.modelValue,"hover-rate":c.value,onChooseRate:d,onChangeHover:p,onMouseleave:function(){return p(0)}},v),null):[(0,o.createVNode)(u,(0,o.mergeProps)({rate:5,style:h.value,class:"".concat(l("score-real")),editable:!1},v),null),(0,o.createVNode)(u,(0,o.mergeProps)({rate:0,editable:!1},v),null)]])}}}),s=(0,e.withInstall)(l)})(),i})()));
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("../config-provider"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../config-provider"],t);else{var r="object"==typeof exports?t(require("../shared"),require("vue"),require("../config-provider")):t(e["../shared"],e.vue,e["../config-provider"]);for(var o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(self,((e,t,r)=>(()=>{"use strict";var o={2717:e=>{e.exports=r},4212:t=>{t.exports=e},748:e=>{e.exports=t}},n={};function a(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={exports:{}};return o[e](r,r.exports,a),r.exports}a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{a.r(i),a.d(i,{default:()=>s});var e=a(4212);function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function r(e,r,o){return(r=function(e){var r=function(e,r){if("object"!==t(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,"string");if("object"!==t(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===t(r)?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o,e}var o=a(748),n=a(2717);const u=(0,o.defineComponent)({name:"Star",props:{rate:e.PropTypes.number.def(0),width:e.PropTypes.number.def(15),height:e.PropTypes.number.def(16),editable:e.PropTypes.bool.def(!0),hoverRate:e.PropTypes.number.def(0),max:e.PropTypes.number.def(5)},emits:["chooseRate","changeHover"],setup:function(t,a){var i=a.emit,u=(0,n.usePrefix)().resolveClassName,l=function(o){var n;return(0,e.classes)((r(n={},"".concat(u("is-select")),o<Math.floor(s.value)),r(n,"".concat(u("is-edit")),t.editable),r(n,"".concat(u("rate-star")),!0),n))},s=(0,o.computed)((function(){return t.hoverRate||t.rate})),c={width:"".concat(t.width,"px"),height:"".concat(t.height,"px"),minWidth:"".concat(t.width,"px")};return function(){return(0,o.createVNode)("p",{class:"".concat(u("rate-stars"))},[Array(t.max).fill(1).map((function(e,r){return(0,o.createVNode)("svg",{class:l(r),style:c,x:"0px",y:"0px",viewBox:"0 0 64 64",onClick:function(){return function(e){t.editable&&i("chooseRate",e+1)}(r)},onMouseenter:function(){return function(e){t.editable&&i("changeHover",e+1)}(r)}},[(0,o.createVNode)("g",{transform:"translate(-143.000000, -635.000000)"},[(0,o.createVNode)("g",{transform:"translate(83.000000, 114.000000)"},[(0,o.createVNode)("g",{transform:"translate(15.000000, 384.000000)"},[(0,o.createVNode)("g",{transform:"translate(29.000000, 137.000000)"},[(0,o.createVNode)("polygon",{class:"st1",points:"48,53 28.2,63.9 32,40.8 16,24.4 38.1,21 48,-0.1 57.8,21 79.9,24.4 63.9,40.8 67.7,63.9"},null)])])])])])}))])}}}),l=(0,o.defineComponent)({name:"Rate",components:{star:u},props:{modelValue:e.PropTypes.number.def(0),size:e.PropTypes.size(),editable:e.PropTypes.bool.def(!0),withValidate:e.PropTypes.bool.def(!0)},emits:["change","hover-change","update:modelValue"],setup:function(t,a){var i=a.emit,l=(0,n.usePrefix)().resolveClassName,s=(0,e.useFormItem)(),c=(0,o.ref)(0),d=function(e){t.editable&&(i("update:modelValue",e),i("change",e))},p=function(e){c.value=e,i("hover-change",e)},f=(0,e.classes)(r({},"".concat(l("rate")),!0)),m={small:{width:12,height:12},large:{width:18,height:18}}[t.size]||{width:15,height:16},h=(0,o.computed)((function(){var e=Math.floor(t.modelValue),r=(m.width+3)*e,o=m.width*(t.modelValue-e);return{width:"".concat(r+o,"px")}})),v={width:m.width,height:m.height};return(0,o.watch)((function(){return t.modelValue}),(function(){var e;t.withValidate&&(null===(e=null==s?void 0:s.validate)||void 0===e||e.call(s,"change"))})),function(){return(0,o.createVNode)("p",{class:f},[t.editable?(0,o.createVNode)(u,(0,o.mergeProps)({rate:t.modelValue,"hover-rate":c.value,onChooseRate:d,onChangeHover:p,onMouseleave:function(){return p(0)}},v),null):[(0,o.createVNode)(u,(0,o.mergeProps)({rate:5,style:h.value,class:"".concat(l("score-real")),editable:!1},v),null),(0,o.createVNode)(u,(0,o.mergeProps)({rate:0,editable:!1},v),null)]])}}}),s=(0,e.withInstall)(l)})(),i})()));
@@ -15,7 +15,7 @@ declare const _default: import("vue").DefineComponent<{
15
15
  } & {
16
16
  default: boolean;
17
17
  };
18
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
18
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue" | "hover-change")[], "change" | "update:modelValue" | "hover-change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
19
19
  modelValue: import("vue-types").VueTypeValidableDef<number> & {
20
20
  default: number;
21
21
  } & {
@@ -35,6 +35,7 @@ declare const _default: import("vue").DefineComponent<{
35
35
  }>> & {
36
36
  onChange?: (...args: any[]) => any;
37
37
  "onUpdate:modelValue"?: (...args: any[]) => any;
38
+ "onHover-change"?: (...args: any[]) => any;
38
39
  }, {
39
40
  modelValue: number;
40
41
  withValidate: boolean;
@@ -16,8 +16,8 @@ declare const BkResizeLayout: {
16
16
  autoMinimize?: number | boolean;
17
17
  class?: unknown;
18
18
  style?: unknown;
19
- key?: string | number | symbol;
20
19
  ref?: import("vue").VNodeRef;
20
+ key?: string | number | symbol;
21
21
  ref_for?: boolean;
22
22
  ref_key?: string;
23
23
  onVnodeBeforeMount?: ((vnode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
@@ -132,7 +132,7 @@ declare const BkResizeLayout: {
132
132
  limitMax: any;
133
133
  state: any;
134
134
  vertical: import("vue").ComputedRef<boolean>;
135
- cssPropKey: import("vue").ComputedRef<"height" | "width">;
135
+ cssPropKey: import("vue").ComputedRef<"width" | "height">;
136
136
  bkResizeLayoutRef: import("vue").Ref<HTMLElement>;
137
137
  resizeProxyRef: import("vue").Ref<HTMLElement>;
138
138
  resizeMaskRef: import("vue").Ref<HTMLElement>;
@@ -234,7 +234,7 @@ declare const BkResizeLayout: {
234
234
  limitMax: any;
235
235
  state: any;
236
236
  vertical: import("vue").ComputedRef<boolean>;
237
- cssPropKey: import("vue").ComputedRef<"height" | "width">;
237
+ cssPropKey: import("vue").ComputedRef<"width" | "height">;
238
238
  bkResizeLayoutRef: import("vue").Ref<HTMLElement>;
239
239
  resizeProxyRef: import("vue").Ref<HTMLElement>;
240
240
  resizeMaskRef: import("vue").Ref<HTMLElement>;
@@ -308,7 +308,7 @@ declare const BkResizeLayout: {
308
308
  limitMax: any;
309
309
  state: any;
310
310
  vertical: import("vue").ComputedRef<boolean>;
311
- cssPropKey: import("vue").ComputedRef<"height" | "width">;
311
+ cssPropKey: import("vue").ComputedRef<"width" | "height">;
312
312
  bkResizeLayoutRef: import("vue").Ref<HTMLElement>;
313
313
  resizeProxyRef: import("vue").Ref<HTMLElement>;
314
314
  resizeMaskRef: import("vue").Ref<HTMLElement>;
@@ -1 +1 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("../config-provider"),require("../icon"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../config-provider","../icon"],t);else{var a="object"==typeof exports?t(require("../shared"),require("vue"),require("../config-provider"),require("../icon")):t(e["../shared"],e.vue,e["../config-provider"],e["../icon"]);for(var i in a)("object"==typeof exports?exports:e)[i]=a[i]}}(self,((e,t,a,i)=>(()=>{"use strict";var l={2717:e=>{e.exports=a},6870:e=>{e.exports=i},4212:t=>{t.exports=e},748:e=>{e.exports=t}},o={};function r(e){var t=o[e];if(void 0!==t)return t.exports;var a=o[e]={exports:{}};return l[e](a,a.exports,r),a.exports}r.d=(e,t)=>{for(var a in t)r.o(t,a)&&!r.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};return(()=>{r.r(s),r.d(s,{default:()=>u});var e=r(4212);function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function a(e,a,i){return(a=function(e){var a=function(e,a){if("object"!==t(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var l=i.call(e,"string");if("object"!==t(l))return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===t(a)?a:String(a)}(a))in e?Object.defineProperty(e,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[a]=i,e}var i=r(748),l=r(2717),o=r(6870);const n=(0,i.defineComponent)({name:"ResizeLayout",props:{placement:e.PropTypes.placement().def("left"),min:e.PropTypes.number.def(3),max:e.PropTypes.number.def(1/0),triggerWidth:e.PropTypes.number.def(5),triggerOffset:e.PropTypes.number.def(3),initialDivide:e.PropTypes.oneOfType([String,Number]).def("20%"),immediate:e.PropTypes.bool,disabled:e.PropTypes.bool,collapsible:e.PropTypes.bool,autoMinimize:e.PropTypes.oneOfType([Boolean,Number]).def(!1),border:e.PropTypes.bool.def(!0)},emits:["before-resize","resizing","after-resize","collapse-change"],setup:function(e,t){var o=t.emit,r=(0,i.toRefs)(e),s=r.placement,n=r.initialDivide,u=r.triggerOffset,c=r.triggerWidth,v=r.max,d=r.min,f=r.immediate,p=r.autoMinimize,m=(0,i.ref)(!1),y=(0,i.ref)(!0),h=(0,i.ref)(!1),b=(0,i.ref)(null),g=(0,i.ref)({}),z=(0,i.ref)(null),x=(0,i.ref)(null),C=(0,i.ref)(null),N=(0,i.ref)(null),w=(0,i.computed)((function(){return["left","right"].includes(s.value)})),P=(0,i.computed)((function(){return w.value?"width":"height"})),S=(0,i.computed)((function(){var e=n.value;return"number"==typeof e&&(e="".concat(e,"px")),a({},P.value,e)})),R=(0,i.computed)((function(){var e;return a(e={},"margin-".concat(s.value),"".concat(u.value-c.value,"px")),a(e,P.value,"".concat(c.value,"px")),e})),T=(0,i.computed)((function(){return p.value?"boolean"==typeof p.value?50:p.value:0})),k=new ResizeObserver((function(){var e=z.value.getBoundingClientRect();b.value=w.value?e.width:e.height})),M=function(){var t=N.value.getBoundingClientRect();j(!m.value),m.value?(N.value.setAttribute("data-".concat(P.value),"".concat(t[P.value],"px")),N.value.style[P.value]=e.collapsible?"0px":"5px"):(y.value=!0,N.value.style[P.value]=N.value.getAttribute("data-".concat(P.value)))},j=function(e){N.value.addEventListener("transitionend",(function t(){y.value=e,N.value.style.transition="",N.value.removeEventListener("transitionend",t)})),N.value.style.transition="".concat(P.value," cubic-bezier(0.4, 0, 0.2, 1) .3s")};(0,i.onMounted)((function(){k.observe(z.value)})),(0,i.onBeforeUnmount)((function(){z.value&&(k.unobserve(z.value),k=null)}));var O=(0,l.usePrefix)().resolveClassName;return{collapsed:m,asideContentVisible:y,minimized:h,limitMax:b,state:g,vertical:w,cssPropKey:P,bkResizeLayoutRef:z,resizeProxyRef:x,resizeMaskRef:C,asideRef:N,triggerStyle:R,asideStyle:S,handleMousedown:function(e){o("before-resize",e);var t=N.value.getBoundingClientRect();g.value=Object.freeze({mouse:{clientX:e.clientX,clientY:e.clientY},aside:{width:t.width,height:t.height}}),C.value.style.display="block",C.value.style.cursor=w.value?"col-resize":"row-resize",f.value||function(){switch(x.value.style.visibility="visible",s.value){case"left":x.value.style.inset="0 auto auto ".concat(g.value.aside.width,"px");break;case"right":x.value.style.inset="0 ".concat(g.value.aside.width,"px auto auto");break;case"top":x.value.style.inset="".concat(g.value.aside.height,"px auto auto 0");break;case"bottom":x.value.style.inset="auto auto ".concat(g.value.aside.height,"px 0")}}(),document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};var a=function(e){var t;switch(s.value){case"top":t=e.clientY-g.value.mouse.clientY;break;case"right":t=g.value.mouse.clientX-e.clientX;break;case"bottom":t=g.value.mouse.clientY-e.clientY;break;case"left":t=e.clientX-g.value.mouse.clientX}var a,i=(a=g.value.aside[P.value]+t,Math.min(v.value,Math.max(d.value,a),b.value-c.value)+u.value),l="".concat(i,"px");f.value?N.value.style[P.value]=l:x.value.style[s.value]=l,o("resizing",i)};document.addEventListener("mousemove",a),document.addEventListener("mouseup",(function e(){if(x.value.style.visibility="hidden",C.value.style.display="none",document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",e),document.onselectstart=null,document.ondragstart=null,(0,i.nextTick)((function(){(function(){if(!p.value)return!1;var e=N.value.getBoundingClientRect();if(h.value=m.value=e[P.value]<=T.value,!h.value)return y.value=!0,!1;M(),(0,i.nextTick)((function(){N.value.setAttribute("data-".concat(P.value),S.value[P.value])}))})(),o("after-resize",parseFloat(x.value.style[s.value]))})),f.value)return!1;N.value.style[P.value]=x.value.style[s.value]}))},setCollapse:function(e){m.value="boolean"==typeof e?e:!m.value,M(),o("collapse-change",m.value)},resolveClassName:O}},render:function(){var e,t,l,r,s,n,u,c=["".concat(this.resolveClassName("resize-layout")),"".concat(this.resolveClassName("resize-layout-".concat(this.placement))),(e={},a(e,"".concat(this.resolveClassName("resize-layout-collapsed")),this.collapsed),a(e,"".concat(this.resolveClassName("resize-layout-border")),this.border),a(e,"".concat(this.resolveClassName("resize-layout-collapsible")),this.collapsible),e)];return(0,i.createVNode)("div",{ref:"bkResizeLayoutRef",class:c},[(0,i.createVNode)("aside",{class:"".concat(this.resolveClassName("resize-layout-aside")),ref:"asideRef",style:this.asideStyle},[(0,i.withDirectives)((0,i.createVNode)("div",{class:"".concat(this.resolveClassName("resize-layout-aside-content"))},[null===(l=(t=this.$slots).aside)||void 0===l?void 0:l.call(t)]),[[i.vShow,this.asideContentVisible]]),(0,i.withDirectives)((0,i.createVNode)("i",{class:"".concat(this.resolveClassName("resize-trigger")),style:this.triggerStyle,onMousedown:(0,i.withModifiers)(this.handleMousedown,["left"])},null),[[i.vShow,!this.disabled&&(!this.collapsed||this.autoMinimize)]]),(0,i.withDirectives)((0,i.createVNode)("i",{class:["".concat(this.resolveClassName("resize-proxy")),this.placement],ref:"resizeProxyRef"},null),[[i.vShow,!this.collapsed||this.autoMinimize]]),this.collapsible&&((null===(s=(r=this.$slots)["collapse-trigger"])||void 0===s?void 0:s.call(r))||(this.collapsed?(0,i.createVNode)(o.AngleRight,{class:"".concat(this.resolveClassName("resize-collapse")),onClick:this.setCollapse},null):(0,i.createVNode)(o.AngleLeft,{class:"".concat(this.resolveClassName("resize-collapse")),onClick:this.setCollapse},null)))]),(0,i.createVNode)("main",{class:"".concat(this.resolveClassName("resize-layout-main"))},[null===(u=(n=this.$slots).main)||void 0===u?void 0:u.call(n)]),(0,i.createVNode)("div",{class:"".concat(this.resolveClassName("resize-mask")),ref:"resizeMaskRef"},null)])}}),u=(0,e.withInstall)(n)})(),s})()));
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("../config-provider"),require("../icon"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../config-provider","../icon"],t);else{var a="object"==typeof exports?t(require("../shared"),require("vue"),require("../config-provider"),require("../icon")):t(e["../shared"],e.vue,e["../config-provider"],e["../icon"]);for(var i in a)("object"==typeof exports?exports:e)[i]=a[i]}}(self,((e,t,a,i)=>(()=>{"use strict";var l={2717:e=>{e.exports=a},6870:e=>{e.exports=i},4212:t=>{t.exports=e},748:e=>{e.exports=t}},o={};function r(e){var t=o[e];if(void 0!==t)return t.exports;var a=o[e]={exports:{}};return l[e](a,a.exports,r),a.exports}r.d=(e,t)=>{for(var a in t)r.o(t,a)&&!r.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};return(()=>{r.r(s),r.d(s,{default:()=>u});var e=r(4212);function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function a(e,a,i){return(a=function(e){var a=function(e,a){if("object"!==t(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var l=i.call(e,"string");if("object"!==t(l))return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===t(a)?a:String(a)}(a))in e?Object.defineProperty(e,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[a]=i,e}var i=r(748),l=r(2717),o=r(6870);const n=(0,i.defineComponent)({name:"ResizeLayout",props:{placement:e.PropTypes.placement().def("left"),min:e.PropTypes.number.def(3),max:e.PropTypes.number.def(1/0),triggerWidth:e.PropTypes.number.def(5),triggerOffset:e.PropTypes.number.def(3),initialDivide:e.PropTypes.oneOfType([String,Number]).def("20%"),immediate:e.PropTypes.bool,disabled:e.PropTypes.bool,collapsible:e.PropTypes.bool,autoMinimize:e.PropTypes.oneOfType([Boolean,Number]).def(!1),border:e.PropTypes.bool.def(!0)},emits:["before-resize","resizing","after-resize","collapse-change"],setup:function(e,t){var o=t.emit,r=(0,i.toRefs)(e),s=r.placement,n=r.initialDivide,u=r.triggerOffset,c=r.triggerWidth,v=r.max,d=r.min,f=r.immediate,p=r.autoMinimize,m=(0,i.ref)(!1),y=(0,i.ref)(!0),h=(0,i.ref)(!1),b=(0,i.ref)(null),g=(0,i.ref)({}),z=(0,i.ref)(null),x=(0,i.ref)(null),w=(0,i.ref)(null),C=(0,i.ref)(null),N=(0,i.computed)((function(){return["left","right"].includes(s.value)})),P=(0,i.computed)((function(){return N.value?"width":"height"})),S=(0,i.computed)((function(){var e=n.value;return"number"==typeof e&&(e="".concat(e,"px")),a({},P.value,e)})),R=(0,i.computed)((function(){var e;return a(e={},"margin-".concat(s.value),"".concat(u.value-c.value,"px")),a(e,P.value,"".concat(c.value,"px")),e})),T=(0,i.computed)((function(){return p.value?"boolean"==typeof p.value?50:p.value:0})),k=new ResizeObserver((function(){var e=z.value.getBoundingClientRect();b.value=N.value?e.width:e.height})),M=function(){var t=C.value.getBoundingClientRect();j(!m.value),m.value?(C.value.setAttribute("data-".concat(P.value),"".concat(t[P.value],"px")),C.value.style[P.value]=e.collapsible?"0px":"5px"):(y.value=!0,C.value.style[P.value]=C.value.getAttribute("data-".concat(P.value)))},j=function(e){C.value.addEventListener("transitionend",(function t(){y.value=e,C.value.style.transition="",C.value.removeEventListener("transitionend",t)})),C.value.style.transition="".concat(P.value," cubic-bezier(0.4, 0, 0.2, 1) .3s")};(0,i.onMounted)((function(){k.observe(z.value)})),(0,i.onBeforeUnmount)((function(){z.value&&(k.unobserve(z.value),k=null)}));var O=(0,l.usePrefix)().resolveClassName;return{collapsed:m,asideContentVisible:y,minimized:h,limitMax:b,state:g,vertical:N,cssPropKey:P,bkResizeLayoutRef:z,resizeProxyRef:x,resizeMaskRef:w,asideRef:C,triggerStyle:R,asideStyle:S,handleMousedown:function(e){o("before-resize",e);var t=C.value.getBoundingClientRect();g.value=Object.freeze({mouse:{clientX:e.clientX,clientY:e.clientY},aside:{width:t.width,height:t.height}}),w.value.style.display="block",w.value.style.cursor=N.value?"col-resize":"row-resize",f.value||function(){switch(x.value.style.visibility="visible",s.value){case"left":x.value.style.inset="0 auto auto ".concat(g.value.aside.width,"px");break;case"right":x.value.style.inset="0 ".concat(g.value.aside.width,"px auto auto");break;case"top":x.value.style.inset="".concat(g.value.aside.height,"px auto auto 0");break;case"bottom":x.value.style.inset="auto auto ".concat(g.value.aside.height,"px 0")}}(),document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};var a=function(e){var t;switch(s.value){case"top":t=e.clientY-g.value.mouse.clientY;break;case"right":t=g.value.mouse.clientX-e.clientX;break;case"bottom":t=g.value.mouse.clientY-e.clientY;break;case"left":t=e.clientX-g.value.mouse.clientX}var a,i=(a=g.value.aside[P.value]+t,Math.min(v.value,Math.max(d.value,a),b.value-c.value)+u.value),l="".concat(i,"px");f.value?C.value.style[P.value]=l:x.value.style[s.value]=l,o("resizing",i)};document.addEventListener("mousemove",a),document.addEventListener("mouseup",(function e(){if(x.value.style.visibility="hidden",w.value.style.display="none",document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",e),document.onselectstart=null,document.ondragstart=null,(0,i.nextTick)((function(){(function(){if(!p.value)return!1;var e=C.value.getBoundingClientRect();if(h.value=m.value=e[P.value]<=T.value,!h.value)return y.value=!0,!1;M(),(0,i.nextTick)((function(){C.value.setAttribute("data-".concat(P.value),S.value[P.value])}))})(),o("after-resize",parseFloat(x.value.style[s.value]))})),f.value)return!1;C.value.style[P.value]=x.value.style[s.value]}))},setCollapse:function(e){m.value="boolean"==typeof e?e:!m.value,M(),o("collapse-change",m.value)},resolveClassName:O}},render:function(){var e,t,l,r,s,n,u,c=["".concat(this.resolveClassName("resize-layout")),"".concat(this.resolveClassName("resize-layout-".concat(this.placement))),(e={},a(e,"".concat(this.resolveClassName("resize-layout-collapsed")),this.collapsed),a(e,"".concat(this.resolveClassName("resize-layout-border")),this.border),a(e,"".concat(this.resolveClassName("resize-layout-collapsible")),this.collapsible),e)];return(0,i.createVNode)("div",{ref:"bkResizeLayoutRef",class:c},[(0,i.createVNode)("aside",{class:"".concat(this.resolveClassName("resize-layout-aside")),ref:"asideRef",style:this.asideStyle},[(0,i.withDirectives)((0,i.createVNode)("div",{class:"".concat(this.resolveClassName("resize-layout-aside-content"))},[null===(l=(t=this.$slots).aside)||void 0===l?void 0:l.call(t)]),[[i.vShow,this.asideContentVisible]]),(0,i.withDirectives)((0,i.createVNode)("i",{class:"".concat(this.resolveClassName("resize-trigger")),style:this.triggerStyle,onMousedown:(0,i.withModifiers)(this.handleMousedown,["left"])},null),[[i.vShow,!this.disabled&&(!this.collapsed||this.autoMinimize)]]),(0,i.withDirectives)((0,i.createVNode)("i",{class:["".concat(this.resolveClassName("resize-proxy")),this.placement],ref:"resizeProxyRef"},null),[[i.vShow,!this.collapsed||this.autoMinimize]]),this.collapsible&&((null===(s=(r=this.$slots)["collapse-trigger"])||void 0===s?void 0:s.call(r))||(this.collapsed?(0,i.createVNode)(o.AngleRight,{width:26,height:26,class:"".concat(this.resolveClassName("resize-collapse")),onClick:this.setCollapse},null):(0,i.createVNode)(o.AngleLeft,{width:26,height:26,class:"".concat(this.resolveClassName("resize-collapse")),onClick:this.setCollapse},null)))]),(0,i.createVNode)("main",{class:"".concat(this.resolveClassName("resize-layout-main"))},[null===(u=(n=this.$slots).main)||void 0===u?void 0:u.call(n)]),(0,i.createVNode)("div",{class:"".concat(this.resolveClassName("resize-mask")),ref:"resizeMaskRef"},null)])}}),u=(0,e.withInstall)(n)})(),s})()));
@@ -37,6 +37,9 @@
37
37
  left: 100%;
38
38
  transform: translateY(-50%);
39
39
  }
40
+ .bk-resize-layout-left > .bk-resize-layout-aside .bk-resize-collapse svg {
41
+ position: absolute;
42
+ }
40
43
  .bk-resize-layout-right {
41
44
  flex-direction: row-reverse;
42
45
  }
@@ -60,6 +63,9 @@
60
63
  right: 100%;
61
64
  transform: translateY(-50%) rotate(180deg);
62
65
  }
66
+ .bk-resize-layout-right > .bk-resize-layout-aside .bk-resize-collapse svg {
67
+ position: absolute;
68
+ }
63
69
  .bk-resize-layout-top {
64
70
  flex-direction: column;
65
71
  }
@@ -84,6 +90,9 @@
84
90
  margin-top: 8px;
85
91
  transform: translate3d(-50%, -50%, 0) rotate(90deg);
86
92
  }
93
+ .bk-resize-layout-top > .bk-resize-layout-aside .bk-resize-collapse svg {
94
+ position: absolute;
95
+ }
87
96
  .bk-resize-layout-bottom {
88
97
  flex-direction: column-reverse;
89
98
  }
@@ -108,6 +117,9 @@
108
117
  margin-bottom: 8px;
109
118
  transform: translate3d(50%, 50%, 0) rotate(-90deg);
110
119
  }
120
+ .bk-resize-layout-bottom > .bk-resize-layout-aside .bk-resize-collapse svg {
121
+ position: absolute;
122
+ }
111
123
  .bk-resize-layout > .bk-resize-layout-aside {
112
124
  position: relative;
113
125
  }
@@ -49,7 +49,7 @@ declare const _default: import("vue").DefineComponent<{
49
49
  limitMax: any;
50
50
  state: any;
51
51
  vertical: import("vue").ComputedRef<boolean>;
52
- cssPropKey: import("vue").ComputedRef<"height" | "width">;
52
+ cssPropKey: import("vue").ComputedRef<"width" | "height">;
53
53
  bkResizeLayoutRef: import("vue").Ref<HTMLElement>;
54
54
  resizeProxyRef: import("vue").Ref<HTMLElement>;
55
55
  resizeMaskRef: import("vue").Ref<HTMLElement>;
@@ -51,6 +51,9 @@
51
51
  top: 50%;
52
52
  left: 100%;
53
53
  transform: translateY(-50%);
54
+ svg {
55
+ position: absolute;
56
+ }
54
57
  }
55
58
  }
56
59
  }
@@ -79,6 +82,9 @@
79
82
  top: 50%;
80
83
  right: 100%;
81
84
  transform: translateY(-50%) rotate(180deg);
85
+ svg {
86
+ position: absolute;
87
+ }
82
88
  }
83
89
  }
84
90
  }
@@ -108,6 +114,9 @@
108
114
  left: 50%;
109
115
  margin-top: 8px;
110
116
  transform: translate3d(-50%, -50%, 0) rotate(90deg);
117
+ svg {
118
+ position: absolute;
119
+ }
111
120
  }
112
121
  }
113
122
  }
@@ -137,6 +146,9 @@
137
146
  left: 50%;
138
147
  margin-bottom: 8px;
139
148
  transform: translate3d(50%, 50%, 0) rotate(-90deg);
149
+ svg {
150
+ position: absolute;
151
+ }
140
152
  }
141
153
  }
142
154
  }
@@ -159,6 +159,9 @@
159
159
  left: 100%;
160
160
  transform: translateY(-50%);
161
161
  }
162
+ .bk-resize-layout-left > .bk-resize-layout-aside .bk-resize-collapse svg {
163
+ position: absolute;
164
+ }
162
165
  .bk-resize-layout-right {
163
166
  flex-direction: row-reverse;
164
167
  }
@@ -182,6 +185,9 @@
182
185
  right: 100%;
183
186
  transform: translateY(-50%) rotate(180deg);
184
187
  }
188
+ .bk-resize-layout-right > .bk-resize-layout-aside .bk-resize-collapse svg {
189
+ position: absolute;
190
+ }
185
191
  .bk-resize-layout-top {
186
192
  flex-direction: column;
187
193
  }
@@ -206,6 +212,9 @@
206
212
  margin-top: 8px;
207
213
  transform: translate3d(-50%, -50%, 0) rotate(90deg);
208
214
  }
215
+ .bk-resize-layout-top > .bk-resize-layout-aside .bk-resize-collapse svg {
216
+ position: absolute;
217
+ }
209
218
  .bk-resize-layout-bottom {
210
219
  flex-direction: column-reverse;
211
220
  }
@@ -230,6 +239,9 @@
230
239
  margin-bottom: 8px;
231
240
  transform: translate3d(50%, 50%, 0) rotate(-90deg);
232
241
  }
242
+ .bk-resize-layout-bottom > .bk-resize-layout-aside .bk-resize-collapse svg {
243
+ position: absolute;
244
+ }
233
245
  .bk-resize-layout > .bk-resize-layout-aside {
234
246
  position: relative;
235
247
  }