@element-plus/nightly 0.0.20211230 → 0.0.20211231

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 (243) hide show
  1. package/README.md +0 -8
  2. package/dist/index.css +1 -1
  3. package/dist/index.full.js +5147 -5163
  4. package/dist/index.full.min.js +6 -6
  5. package/dist/index.full.min.js.map +1 -1
  6. package/dist/index.full.min.mjs +6 -6
  7. package/dist/index.full.min.mjs.map +1 -1
  8. package/dist/index.full.mjs +5148 -5164
  9. package/es/components/button/index.d.ts +1 -1
  10. package/es/components/button/src/button.vue.d.ts +1 -1
  11. package/es/components/cascader/index.d.ts +6 -6
  12. package/es/components/cascader/src/index.vue.d.ts +3 -3
  13. package/es/components/checkbox/index.d.ts +4 -4
  14. package/es/components/checkbox/src/checkbox-button.vue.d.ts +1 -1
  15. package/es/components/checkbox/src/checkbox.vue.d.ts +2 -2
  16. package/es/components/checkbox/src/useCheckbox.d.ts +2 -2
  17. package/es/components/color-picker/index.d.ts +2 -2
  18. package/es/components/color-picker/src/index.vue.d.ts +1 -1
  19. package/es/components/config-provider/index.d.ts +7 -3
  20. package/es/components/config-provider/index.mjs +1 -1
  21. package/es/components/config-provider/index.mjs.map +1 -1
  22. package/es/components/config-provider/src/config-provider.d.ts +26 -1
  23. package/es/components/config-provider/src/config-provider.mjs +28 -4
  24. package/es/components/config-provider/src/config-provider.mjs.map +1 -1
  25. package/es/components/date-picker/index.d.ts +6 -6
  26. package/es/components/date-picker/src/date-picker.d.ts +3 -3
  27. package/es/components/descriptions/index.d.ts +1 -1
  28. package/es/components/descriptions/src/descriptions-cell.mjs +12 -3
  29. package/es/components/descriptions/src/descriptions-cell.mjs.map +1 -1
  30. package/es/components/descriptions/src/index.vue.d.ts +1 -1
  31. package/es/components/descriptions/src/index.vue_vue_type_script_lang.mjs +7 -2
  32. package/es/components/descriptions/src/index.vue_vue_type_script_lang.mjs.map +1 -1
  33. package/es/components/descriptions/src/index.vue_vue_type_template_id_788d3854_lang.mjs +14 -17
  34. package/es/components/descriptions/src/index.vue_vue_type_template_id_788d3854_lang.mjs.map +1 -1
  35. package/es/components/dialog/index.d.ts +2 -2
  36. package/es/components/dialog/src/dialog.vue.d.ts +2 -2
  37. package/es/components/dialog/src/use-dialog.mjs +1 -1
  38. package/es/components/dialog/src/use-dialog.mjs.map +1 -1
  39. package/es/components/drawer/index.d.ts +2 -2
  40. package/es/components/drawer/src/drawer.vue.d.ts +2 -2
  41. package/es/components/dropdown/index.d.ts +1 -1
  42. package/es/components/dropdown/src/dropdown.vue.d.ts +1 -1
  43. package/es/components/image/index.d.ts +2 -2
  44. package/es/components/image/src/image.vue.d.ts +2 -2
  45. package/es/components/input/index.d.ts +1 -1
  46. package/es/components/input/src/input.vue.d.ts +1 -1
  47. package/es/components/input-number/index.d.ts +3 -3
  48. package/es/components/input-number/src/input-number.vue.d.ts +3 -3
  49. package/es/components/loading/src/service.mjs +1 -1
  50. package/es/components/loading/src/service.mjs.map +1 -1
  51. package/es/components/message/src/message-method.mjs +1 -1
  52. package/es/components/message/src/message-method.mjs.map +1 -1
  53. package/es/components/message-box/src/index.vue_vue_type_script_lang.mjs +1 -1
  54. package/es/components/message-box/src/index.vue_vue_type_script_lang.mjs.map +1 -1
  55. package/es/components/message-box/src/index.vue_vue_type_template_id_7035e868_lang.mjs.map +1 -1
  56. package/es/components/notification/src/notification.vue.d.ts +2 -2
  57. package/es/components/notification/src/notify.mjs +1 -1
  58. package/es/components/notification/src/notify.mjs.map +1 -1
  59. package/es/components/overlay/index.d.ts +1 -1
  60. package/es/components/overlay/src/overlay.d.ts +1 -1
  61. package/es/components/popover/src/usePopover.mjs +1 -1
  62. package/es/components/popover/src/usePopover.mjs.map +1 -1
  63. package/es/components/popper/src/use-popper/index.mjs +1 -1
  64. package/es/components/popper/src/use-popper/index.mjs.map +1 -1
  65. package/es/components/radio/index.d.ts +3 -3
  66. package/es/components/radio/src/radio-button.vue.d.ts +1 -1
  67. package/es/components/radio/src/radio.d.ts +1 -1
  68. package/es/components/radio/src/radio.vue.d.ts +1 -1
  69. package/es/components/select/index.d.ts +1 -1
  70. package/es/components/select/src/select.vue.d.ts +1 -1
  71. package/es/components/select/src/useSelect.d.ts +1 -1
  72. package/es/components/select-v2/index.d.ts +2 -2
  73. package/es/components/select-v2/src/select.vue.d.ts +1 -1
  74. package/es/components/select-v2/src/useSelect.d.ts +1 -1
  75. package/es/components/table/index.d.ts +1 -1
  76. package/es/components/table/src/table/style-helper.d.ts +1 -1
  77. package/es/components/table/src/table.vue.d.ts +1 -1
  78. package/es/components/table/src/util.mjs +1 -1
  79. package/es/components/table/src/util.mjs.map +1 -1
  80. package/es/components/teleport/index.d.ts +1 -1
  81. package/es/components/teleport/src/teleport.vue.d.ts +1 -1
  82. package/es/components/time-picker/index.d.ts +6 -6
  83. package/es/components/time-picker/src/common/picker.vue.d.ts +4 -4
  84. package/es/components/time-picker/src/common/props.d.ts +1 -1
  85. package/es/components/time-picker/src/common/props.mjs +1 -1
  86. package/es/components/time-picker/src/common/props.mjs.map +1 -1
  87. package/es/components/time-picker/src/time-picker.d.ts +3 -3
  88. package/es/defaults.d.ts +1 -1
  89. package/es/hooks/use-common-props/index.d.ts +1 -1
  90. package/es/hooks/use-common-props/index.mjs +1 -3
  91. package/es/hooks/use-common-props/index.mjs.map +1 -1
  92. package/es/hooks/use-global-config/index.mjs +4 -2
  93. package/es/hooks/use-global-config/index.mjs.map +1 -1
  94. package/es/hooks/use-popper/index.mjs +1 -1
  95. package/es/hooks/use-popper/index.mjs.map +1 -1
  96. package/es/index.d.ts +3 -2
  97. package/es/index.mjs.map +1 -1
  98. package/es/make-installer.d.ts +1 -2
  99. package/es/make-installer.mjs +4 -18
  100. package/es/make-installer.mjs.map +1 -1
  101. package/es/utils/popup-manager.d.ts +5 -3
  102. package/es/utils/popup-manager.mjs +21 -25
  103. package/es/utils/popup-manager.mjs.map +1 -1
  104. package/es/utils/util.d.ts +1 -8
  105. package/es/utils/util.mjs +2 -10
  106. package/es/utils/util.mjs.map +1 -1
  107. package/es/version.d.ts +1 -1
  108. package/es/version.mjs +1 -1
  109. package/es/version.mjs.map +1 -1
  110. package/global.d.ts +13 -0
  111. package/lib/components/button/index.d.ts +1 -1
  112. package/lib/components/button/src/button.vue.d.ts +1 -1
  113. package/lib/components/cascader/index.d.ts +6 -6
  114. package/lib/components/cascader/src/index.vue.d.ts +3 -3
  115. package/lib/components/checkbox/index.d.ts +4 -4
  116. package/lib/components/checkbox/src/checkbox-button.vue.d.ts +1 -1
  117. package/lib/components/checkbox/src/checkbox.vue.d.ts +2 -2
  118. package/lib/components/checkbox/src/useCheckbox.d.ts +2 -2
  119. package/lib/components/color-picker/index.d.ts +2 -2
  120. package/lib/components/color-picker/src/index.vue.d.ts +1 -1
  121. package/lib/components/config-provider/index.d.ts +7 -3
  122. package/lib/components/config-provider/index.js +1 -2
  123. package/lib/components/config-provider/index.js.map +1 -1
  124. package/lib/components/config-provider/src/config-provider.d.ts +26 -1
  125. package/lib/components/config-provider/src/config-provider.js +27 -2
  126. package/lib/components/config-provider/src/config-provider.js.map +1 -1
  127. package/lib/components/date-picker/index.d.ts +6 -6
  128. package/lib/components/date-picker/src/date-picker.d.ts +3 -3
  129. package/lib/components/descriptions/index.d.ts +1 -1
  130. package/lib/components/descriptions/src/descriptions-cell.js +12 -3
  131. package/lib/components/descriptions/src/descriptions-cell.js.map +1 -1
  132. package/lib/components/descriptions/src/index.vue.d.ts +1 -1
  133. package/lib/components/descriptions/src/index.vue_vue_type_script_lang.js +6 -1
  134. package/lib/components/descriptions/src/index.vue_vue_type_script_lang.js.map +1 -1
  135. package/lib/components/descriptions/src/index.vue_vue_type_template_id_788d3854_lang.js +13 -16
  136. package/lib/components/descriptions/src/index.vue_vue_type_template_id_788d3854_lang.js.map +1 -1
  137. package/lib/components/dialog/index.d.ts +2 -2
  138. package/lib/components/dialog/src/dialog.vue.d.ts +2 -2
  139. package/lib/components/dialog/src/use-dialog.js +2 -2
  140. package/lib/components/dialog/src/use-dialog.js.map +1 -1
  141. package/lib/components/drawer/index.d.ts +2 -2
  142. package/lib/components/drawer/src/drawer.vue.d.ts +2 -2
  143. package/lib/components/dropdown/index.d.ts +1 -1
  144. package/lib/components/dropdown/src/dropdown.vue.d.ts +1 -1
  145. package/lib/components/image/index.d.ts +2 -2
  146. package/lib/components/image/src/image.vue.d.ts +2 -2
  147. package/lib/components/input/index.d.ts +1 -1
  148. package/lib/components/input/src/input.vue.d.ts +1 -1
  149. package/lib/components/input-number/index.d.ts +3 -3
  150. package/lib/components/input-number/src/input-number.vue.d.ts +3 -3
  151. package/lib/components/loading/src/service.js +1 -1
  152. package/lib/components/loading/src/service.js.map +1 -1
  153. package/lib/components/message/src/message-method.js +1 -1
  154. package/lib/components/message/src/message-method.js.map +1 -1
  155. package/lib/components/message-box/src/index.vue_vue_type_script_lang.js +2 -2
  156. package/lib/components/message-box/src/index.vue_vue_type_script_lang.js.map +1 -1
  157. package/lib/components/message-box/src/index.vue_vue_type_template_id_7035e868_lang.js.map +1 -1
  158. package/lib/components/notification/src/notification.vue.d.ts +2 -2
  159. package/lib/components/notification/src/notify.js +1 -1
  160. package/lib/components/notification/src/notify.js.map +1 -1
  161. package/lib/components/overlay/index.d.ts +1 -1
  162. package/lib/components/overlay/src/overlay.d.ts +1 -1
  163. package/lib/components/popover/src/usePopover.js +2 -2
  164. package/lib/components/popover/src/usePopover.js.map +1 -1
  165. package/lib/components/popper/src/use-popper/index.js +2 -2
  166. package/lib/components/popper/src/use-popper/index.js.map +1 -1
  167. package/lib/components/radio/index.d.ts +3 -3
  168. package/lib/components/radio/src/radio-button.vue.d.ts +1 -1
  169. package/lib/components/radio/src/radio.d.ts +1 -1
  170. package/lib/components/radio/src/radio.vue.d.ts +1 -1
  171. package/lib/components/select/index.d.ts +1 -1
  172. package/lib/components/select/src/select.vue.d.ts +1 -1
  173. package/lib/components/select/src/useSelect.d.ts +1 -1
  174. package/lib/components/select-v2/index.d.ts +2 -2
  175. package/lib/components/select-v2/src/select.vue.d.ts +1 -1
  176. package/lib/components/select-v2/src/useSelect.d.ts +1 -1
  177. package/lib/components/table/index.d.ts +1 -1
  178. package/lib/components/table/src/table/style-helper.d.ts +1 -1
  179. package/lib/components/table/src/table.vue.d.ts +1 -1
  180. package/lib/components/table/src/util.js +1 -1
  181. package/lib/components/table/src/util.js.map +1 -1
  182. package/lib/components/teleport/index.d.ts +1 -1
  183. package/lib/components/teleport/src/teleport.vue.d.ts +1 -1
  184. package/lib/components/time-picker/index.d.ts +6 -6
  185. package/lib/components/time-picker/src/common/picker.vue.d.ts +4 -4
  186. package/lib/components/time-picker/src/common/props.d.ts +1 -1
  187. package/lib/components/time-picker/src/common/props.js +1 -1
  188. package/lib/components/time-picker/src/common/props.js.map +1 -1
  189. package/lib/components/time-picker/src/time-picker.d.ts +3 -3
  190. package/lib/defaults.d.ts +1 -1
  191. package/lib/hooks/use-common-props/index.d.ts +1 -1
  192. package/lib/hooks/use-common-props/index.js +1 -3
  193. package/lib/hooks/use-common-props/index.js.map +1 -1
  194. package/lib/hooks/use-global-config/index.js +3 -1
  195. package/lib/hooks/use-global-config/index.js.map +1 -1
  196. package/lib/hooks/use-popper/index.js +2 -2
  197. package/lib/hooks/use-popper/index.js.map +1 -1
  198. package/lib/index.d.ts +3 -2
  199. package/lib/index.js.map +1 -1
  200. package/lib/make-installer.d.ts +1 -2
  201. package/lib/make-installer.js +4 -18
  202. package/lib/make-installer.js.map +1 -1
  203. package/lib/utils/popup-manager.d.ts +5 -3
  204. package/lib/utils/popup-manager.js +21 -25
  205. package/lib/utils/popup-manager.js.map +1 -1
  206. package/lib/utils/util.d.ts +1 -8
  207. package/lib/utils/util.js +5 -13
  208. package/lib/utils/util.js.map +1 -1
  209. package/lib/version.d.ts +1 -1
  210. package/lib/version.js +1 -1
  211. package/lib/version.js.map +1 -1
  212. package/package.json +2 -2
  213. package/theme-chalk/el-button.css +1 -1
  214. package/theme-chalk/el-cascader-panel.css +1 -1
  215. package/theme-chalk/el-checkbox-button.css +1 -1
  216. package/theme-chalk/el-descriptions-item.css +1 -1
  217. package/theme-chalk/el-descriptions.css +1 -1
  218. package/theme-chalk/el-form.css +1 -1
  219. package/theme-chalk/el-input-number.css +1 -1
  220. package/theme-chalk/el-radio-button.css +1 -1
  221. package/theme-chalk/el-radio.css +1 -1
  222. package/theme-chalk/index.css +1 -1
  223. package/theme-chalk/src/cascader-panel.scss +1 -1
  224. package/theme-chalk/src/common/var.scss +2 -4
  225. package/theme-chalk/src/descriptions-item.scss +56 -2
  226. package/theme-chalk/src/descriptions.scss +75 -27
  227. package/theme-chalk/src/form.scss +2 -1
  228. package/theme-chalk/src/input-number.scss +13 -4
  229. package/theme-chalk/src/radio-button.scss +4 -4
  230. package/theme-chalk/src/radio.scss +1 -1
  231. package/web-types.json +1 -1
  232. package/es/components/config-provider/src/index.d.ts +0 -19
  233. package/es/components/config-provider/src/index.mjs +0 -22
  234. package/es/components/config-provider/src/index.mjs.map +0 -1
  235. package/es/utils/config.d.ts +0 -9
  236. package/es/utils/config.mjs +0 -10
  237. package/es/utils/config.mjs.map +0 -1
  238. package/lib/components/config-provider/src/index.d.ts +0 -19
  239. package/lib/components/config-provider/src/index.js +0 -26
  240. package/lib/components/config-provider/src/index.js.map +0 -1
  241. package/lib/utils/config.d.ts +0 -9
  242. package/lib/utils/config.js +0 -15
  243. package/lib/utils/config.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import { camelize, capitalize, extend, hasOwn, isArray, isObject, isString, looseEqual } from '@vue/shared';
2
2
  import type { ComponentPublicInstance, CSSProperties, Ref } from 'vue';
3
- import type { TimeoutHandle, Nullable, ComponentSize } from './types';
3
+ import type { TimeoutHandle, Nullable } from './types';
4
4
  export declare const SCOPE = "Util";
5
5
  export declare function toObject<T>(arr: Array<T>): Record<string, T>;
6
6
  export declare const getValueByPath: (obj: any, paths?: string) => unknown;
@@ -32,13 +32,6 @@ export declare const clearTimer: (timer: Ref<TimeoutHandle>) => void;
32
32
  */
33
33
  export declare function getRandomInt(max: number): number;
34
34
  export declare function isUndefined(val: any): val is undefined;
35
- /**
36
- * @deprecated please use `useGlobalConfig` in hooks.
37
- */
38
- export declare function useGlobalConfig(): {
39
- size?: ComponentSize;
40
- zIndex?: number;
41
- };
42
35
  export declare function isEmpty(val: unknown): boolean;
43
36
  export declare function arrayFlat(arr: unknown[]): any;
44
37
  export declare function deduplicate<T>(arr: T[]): T[];
package/es/utils/util.mjs CHANGED
@@ -1,10 +1,9 @@
1
- import { getCurrentInstance } from 'vue';
2
- export { isVNode } from 'vue';
3
1
  import { extend, hasOwn, hyphenate, toRawType, isArray, isObject, isString, isFunction } from '@vue/shared';
4
2
  export { camelize, capitalize, extend, hasOwn, isArray, isObject, isString, looseEqual } from '@vue/shared';
5
3
  import isEqualWith from 'lodash/isEqualWith';
6
4
  import { isClient } from '@vueuse/core';
7
5
  import { throwError, debugWarn } from './error.mjs';
6
+ export { isVNode } from 'vue';
8
7
 
9
8
  const SCOPE = "Util";
10
9
  function toObject(arr) {
@@ -106,13 +105,6 @@ function getRandomInt(max) {
106
105
  function isUndefined(val) {
107
106
  return val === void 0;
108
107
  }
109
- function useGlobalConfig() {
110
- const vm = getCurrentInstance();
111
- if ("$ELEMENT" in vm.proxy) {
112
- return vm.proxy.$ELEMENT;
113
- }
114
- return {};
115
- }
116
108
  function isEmpty(val) {
117
109
  if (!val && val !== 0 || isArray(val) && !val.length || isObject(val) && !Object.keys(val).length)
118
110
  return true;
@@ -147,5 +139,5 @@ const refAttacher = (ref) => {
147
139
  };
148
140
  };
149
141
 
150
- export { SCOPE, addUnit, arrayFlat, autoprefixer, clearTimer, coerceTruthyValueToArray, deduplicate, escapeRegexpString, generateId, getPropByPath, getRandomInt, getValueByPath, isBool, isEmpty, isEqualWithFunction, isFirefox, isHTMLElement, isNumber, isUndefined, kebabCase, rafThrottle, refAttacher, toObject, useGlobalConfig };
142
+ export { SCOPE, addUnit, arrayFlat, autoprefixer, clearTimer, coerceTruthyValueToArray, deduplicate, escapeRegexpString, generateId, getPropByPath, getRandomInt, getValueByPath, isBool, isEmpty, isEqualWithFunction, isFirefox, isHTMLElement, isNumber, isUndefined, kebabCase, rafThrottle, refAttacher, toObject };
151
143
  //# sourceMappingURL=util.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"util.mjs","sources":["../../../../packages/utils/util.ts"],"sourcesContent":["import { getCurrentInstance } from 'vue'\nimport {\n camelize,\n capitalize,\n extend,\n hasOwn,\n hyphenate,\n isArray,\n isObject,\n isString,\n isFunction,\n looseEqual,\n toRawType,\n} from '@vue/shared'\nimport isEqualWith from 'lodash/isEqualWith'\nimport { isClient } from '@vueuse/core'\nimport { debugWarn, throwError } from './error'\n\nimport type { ComponentPublicInstance, CSSProperties, Ref } from 'vue'\nimport type { TimeoutHandle, Nullable, ComponentSize } from './types'\n\nexport const SCOPE = 'Util'\n\nexport function toObject<T>(arr: Array<T>): Record<string, T> {\n const res = {}\n for (let i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i])\n }\n }\n return res\n}\n\nexport const getValueByPath = (obj, paths = ''): unknown => {\n let ret: unknown = obj\n paths.split('.').map((path) => {\n ret = ret?.[path]\n })\n return ret\n}\n\nexport function getPropByPath(\n obj: any,\n path: string,\n strict: boolean\n): {\n o: unknown\n k: string\n v: Nullable<unknown>\n} {\n let tempObj = obj\n let key, value\n\n if (obj && hasOwn(obj, path)) {\n key = path\n value = tempObj?.[path]\n } else {\n path = path.replace(/\\[(\\w+)\\]/g, '.$1')\n path = path.replace(/^\\./, '')\n\n const keyArr = path.split('.')\n let i = 0\n for (i; i < keyArr.length - 1; i++) {\n if (!tempObj && !strict) break\n const key = keyArr[i]\n\n if (key in tempObj) {\n tempObj = tempObj[key]\n } else {\n if (strict) {\n throwError(SCOPE, 'Please transfer a valid prop path to form item!')\n }\n break\n }\n }\n key = keyArr[i]\n value = tempObj?.[keyArr[i]]\n }\n return {\n o: tempObj,\n k: key,\n v: value,\n }\n}\n\n/**\n * Generate random number in range [0, 1000]\n * Maybe replace with [uuid](https://www.npmjs.com/package/uuid)\n */\nexport const generateId = (): number => Math.floor(Math.random() * 10000)\n\n// use isEqual instead\n// export const valueEquals\n\nexport const escapeRegexpString = (value = ''): string =>\n String(value).replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&')\n\n// Use native Array.find, Array.findIndex instead\n\n// coerce truthy value to array\nexport const coerceTruthyValueToArray = (arr) => {\n if (!arr && arr !== 0) {\n return []\n }\n return Array.isArray(arr) ? arr : [arr]\n}\n\n// drop IE and (Edge < 79) support\n// export const isIE\n// export const isEdge\n\nexport const isFirefox = function (): boolean {\n return isClient && !!window.navigator.userAgent.match(/firefox/i)\n}\n\nexport const autoprefixer = function (style: CSSProperties): CSSProperties {\n const rules = ['transform', 'transition', 'animation']\n const prefixes = ['ms-', 'webkit-']\n rules.forEach((rule) => {\n const value = style[rule]\n if (rule && value) {\n prefixes.forEach((prefix) => {\n style[prefix + rule] = value\n })\n }\n })\n return style\n}\n\nexport const kebabCase = hyphenate\n\n// reexport from lodash & vue shared\nexport { isVNode } from 'vue'\nexport {\n hasOwn,\n // isEmpty,\n // isEqual,\n isObject,\n isArray,\n isString,\n capitalize,\n camelize,\n looseEqual,\n extend,\n}\n\nexport const isBool = (val: unknown): val is boolean => typeof val === 'boolean'\nexport const isNumber = (val: unknown): val is number => typeof val === 'number'\nexport const isHTMLElement = (val: unknown) => toRawType(val).startsWith('HTML')\n\nexport function rafThrottle<T extends (...args: any) => any>(fn: T): T {\n let locked = false\n return function (this: ThisParameterType<T>, ...args: any[]) {\n if (locked) return\n locked = true\n\n window.requestAnimationFrame(() => {\n Reflect.apply(fn, this, args)\n locked = false\n })\n } as T\n}\n\nexport const clearTimer = (timer: Ref<TimeoutHandle>) => {\n clearTimeout(timer.value)\n timer.value = null\n}\n\n/**\n * Generating a random int in range (0, max - 1)\n * @param max {number}\n */\nexport function getRandomInt(max: number) {\n return Math.floor(Math.random() * Math.floor(max))\n}\n\nexport function isUndefined(val: any): val is undefined {\n return val === undefined\n}\n\n/**\n * @deprecated please use `useGlobalConfig` in hooks.\n */\nexport function useGlobalConfig(): { size?: ComponentSize; zIndex?: number } {\n const vm: any = getCurrentInstance()\n if ('$ELEMENT' in vm.proxy) {\n return vm.proxy.$ELEMENT\n }\n return {}\n}\n\nexport function isEmpty(val: unknown) {\n if (\n (!val && val !== 0) ||\n (isArray(val) && !val.length) ||\n (isObject(val) && !Object.keys(val).length)\n )\n return true\n\n return false\n}\n\nexport function arrayFlat(arr: unknown[]) {\n return arr.reduce((acm: unknown[], item) => {\n const val = Array.isArray(item) ? arrayFlat(item) : item\n return acm.concat(val)\n }, [])\n}\n\nexport function deduplicate<T>(arr: T[]) {\n return Array.from(new Set(arr))\n}\n\nexport function addUnit(value: string | number) {\n if (isString(value)) {\n return value\n } else if (isNumber(value)) {\n return `${value}px`\n }\n debugWarn(SCOPE, 'binding value must be a string or number')\n return ''\n}\n\n/**\n * Enhance `lodash.isEqual` for it always return false even two functions have completely same statements.\n * @param obj The value to compare\n * @param other The other value to compare\n * @returns Returns `true` if the values are equivalent, else `false`.\n * @example\n * lodash.isEqual(() => 1, () => 1) // false\n * isEqualWith(() => 1, () => 1) // true\n */\nexport function isEqualWithFunction(obj: any, other: any) {\n return isEqualWith(obj, other, (objVal, otherVal) => {\n return isFunction(objVal) && isFunction(otherVal)\n ? `${objVal}` === `${otherVal}`\n : undefined\n })\n}\n\n/**\n * Generate function for attach ref for the h renderer\n * @param ref Ref<HTMLElement | ComponentPublicInstance>\n * @returns (val: T) => void\n */\n\nexport const refAttacher = <T extends HTMLElement | ComponentPublicInstance>(\n ref: Ref<T>\n) => {\n return (val: T) => {\n ref.value = val\n }\n}\n"],"names":[],"mappings":";;;;;;;;AAiBY,MAAC,KAAK,GAAG,OAAO;AACrB,SAAS,QAAQ,CAAC,GAAG,EAAE;AAC9B,EAAE,MAAM,GAAG,GAAG,EAAE,CAAC;AACjB,EAAE,KAAK,I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,GAAG,CAAC;AACJ;;;;"}
1
+ {"version":3,"file":"util.mjs","sources":["../../../../packages/utils/util.ts"],"sourcesContent":["import {\n camelize,\n capitalize,\n extend,\n hasOwn,\n hyphenate,\n isArray,\n isObject,\n isString,\n isFunction,\n looseEqual,\n toRawType,\n} from '@vue/shared'\nimport isEqualWith from 'lodash/isEqualWith'\nimport { isClient } from '@vueuse/core'\nimport { debugWarn, throwError } from './error'\n\nimport type { ComponentPublicInstance, CSSProperties, Ref } from 'vue'\nimport type { TimeoutHandle, Nullable } from './types'\n\nexport const SCOPE = 'Util'\n\nexport function toObject<T>(arr: Array<T>): Record<string, T> {\n const res = {}\n for (let i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i])\n }\n }\n return res\n}\n\nexport const getValueByPath = (obj, paths = ''): unknown => {\n let ret: unknown = obj\n paths.split('.').map((path) => {\n ret = ret?.[path]\n })\n return ret\n}\n\nexport function getPropByPath(\n obj: any,\n path: string,\n strict: boolean\n): {\n o: unknown\n k: string\n v: Nullable<unknown>\n} {\n let tempObj = obj\n let key, value\n\n if (obj && hasOwn(obj, path)) {\n key = path\n value = tempObj?.[path]\n } else {\n path = path.replace(/\\[(\\w+)\\]/g, '.$1')\n path = path.replace(/^\\./, '')\n\n const keyArr = path.split('.')\n let i = 0\n for (i; i < keyArr.length - 1; i++) {\n if (!tempObj && !strict) break\n const key = keyArr[i]\n\n if (key in tempObj) {\n tempObj = tempObj[key]\n } else {\n if (strict) {\n throwError(SCOPE, 'Please transfer a valid prop path to form item!')\n }\n break\n }\n }\n key = keyArr[i]\n value = tempObj?.[keyArr[i]]\n }\n return {\n o: tempObj,\n k: key,\n v: value,\n }\n}\n\n/**\n * Generate random number in range [0, 1000]\n * Maybe replace with [uuid](https://www.npmjs.com/package/uuid)\n */\nexport const generateId = (): number => Math.floor(Math.random() * 10000)\n\n// use isEqual instead\n// export const valueEquals\n\nexport const escapeRegexpString = (value = ''): string =>\n String(value).replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&')\n\n// Use native Array.find, Array.findIndex instead\n\n// coerce truthy value to array\nexport const coerceTruthyValueToArray = (arr) => {\n if (!arr && arr !== 0) {\n return []\n }\n return Array.isArray(arr) ? arr : [arr]\n}\n\n// drop IE and (Edge < 79) support\n// export const isIE\n// export const isEdge\n\nexport const isFirefox = function (): boolean {\n return isClient && !!window.navigator.userAgent.match(/firefox/i)\n}\n\nexport const autoprefixer = function (style: CSSProperties): CSSProperties {\n const rules = ['transform', 'transition', 'animation']\n const prefixes = ['ms-', 'webkit-']\n rules.forEach((rule) => {\n const value = style[rule]\n if (rule && value) {\n prefixes.forEach((prefix) => {\n style[prefix + rule] = value\n })\n }\n })\n return style\n}\n\nexport const kebabCase = hyphenate\n\n// reexport from lodash & vue shared\nexport { isVNode } from 'vue'\nexport {\n hasOwn,\n // isEmpty,\n // isEqual,\n isObject,\n isArray,\n isString,\n capitalize,\n camelize,\n looseEqual,\n extend,\n}\n\nexport const isBool = (val: unknown): val is boolean => typeof val === 'boolean'\nexport const isNumber = (val: unknown): val is number => typeof val === 'number'\nexport const isHTMLElement = (val: unknown) => toRawType(val).startsWith('HTML')\n\nexport function rafThrottle<T extends (...args: any) => any>(fn: T): T {\n let locked = false\n return function (this: ThisParameterType<T>, ...args: any[]) {\n if (locked) return\n locked = true\n\n window.requestAnimationFrame(() => {\n Reflect.apply(fn, this, args)\n locked = false\n })\n } as T\n}\n\nexport const clearTimer = (timer: Ref<TimeoutHandle>) => {\n clearTimeout(timer.value)\n timer.value = null\n}\n\n/**\n * Generating a random int in range (0, max - 1)\n * @param max {number}\n */\nexport function getRandomInt(max: number) {\n return Math.floor(Math.random() * Math.floor(max))\n}\n\nexport function isUndefined(val: any): val is undefined {\n return val === undefined\n}\n\nexport function isEmpty(val: unknown) {\n if (\n (!val && val !== 0) ||\n (isArray(val) && !val.length) ||\n (isObject(val) && !Object.keys(val).length)\n )\n return true\n\n return false\n}\n\nexport function arrayFlat(arr: unknown[]) {\n return arr.reduce((acm: unknown[], item) => {\n const val = Array.isArray(item) ? arrayFlat(item) : item\n return acm.concat(val)\n }, [])\n}\n\nexport function deduplicate<T>(arr: T[]) {\n return Array.from(new Set(arr))\n}\n\nexport function addUnit(value: string | number) {\n if (isString(value)) {\n return value\n } else if (isNumber(value)) {\n return `${value}px`\n }\n debugWarn(SCOPE, 'binding value must be a string or number')\n return ''\n}\n\n/**\n * Enhance `lodash.isEqual` for it always return false even two functions have completely same statements.\n * @param obj The value to compare\n * @param other The other value to compare\n * @returns Returns `true` if the values are equivalent, else `false`.\n * @example\n * lodash.isEqual(() => 1, () => 1) // false\n * isEqualWith(() => 1, () => 1) // true\n */\nexport function isEqualWithFunction(obj: any, other: any) {\n return isEqualWith(obj, other, (objVal, otherVal) => {\n return isFunction(objVal) && isFunction(otherVal)\n ? `${objVal}` === `${otherVal}`\n : undefined\n })\n}\n\n/**\n * Generate function for attach ref for the h renderer\n * @param ref Ref<HTMLElement | ComponentPublicInstance>\n * @returns (val: T) => void\n */\n\nexport const refAttacher = <T extends HTMLElement | ComponentPublicInstance>(\n ref: Ref<T>\n) => {\n return (val: T) => {\n ref.value = val\n }\n}\n"],"names":[],"mappings":";;;;;;;AAgBY,MAAC,KAAK,GAAG,OAAO;AACrB,SAAS,QAAQ,CAAC,GAAG,EAAE;AAC9B,EAAE,MAAM,GAAG,GAAG,EAAE,CAAC;AACjB,EAAE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACvC,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE;AAChB,MAAM,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1B,KAAK;AACL,GAAG;AACH,EAAE,OAAO,GAAG,CAAC;AACb,CAAC;AACW,MAAC,cAAc,GAAG,CAAC,GAAG,EAAE,KAAK,GAAG,EAAE,KAAK;AACnD,EAAE,IAAI,GAAG,G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IAAI,OAAO,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC;AACxB,GAAG;AACH,EAAE,SAAS,CAAC,KAAK,EAAE,0CAA0C,CAAC,CAAC;AAC/D,EAAE,OAAO,EAAE,CAAC;AACZ,CAAC;AACM,SAAS,mBAAmB,CAAC,GAAG,EAAE,KAAK,EAAE;AAChD,EAAE,OAAO,WAAW,CAAC,GAAG,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,QAAQ,KAAK;AACvD,IAAI,OAAO,UAAU,CAAC,MAAM,CAAC,IAAI,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC;AAC/F,GAAG,CAAC,CAAC;AACL,CAAC;AACW,MAAC,WAAW,GAAG,CAAC,GAAG,KAAK;AACpC,EAAE,OAAO,CAAC,GAAG,KAAK;AAClB,IAAI,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC;AACpB,GAAG,CAAC;AACJ;;;;"}
package/es/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "0.0.20211230";
1
+ export declare const version = "0.0.20211231";
package/es/version.mjs CHANGED
@@ -1,4 +1,4 @@
1
- const version = "0.0.20211230";
1
+ const version = "0.0.20211231";
2
2
 
3
3
  export { version };
4
4
  //# sourceMappingURL=version.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.20211230'\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"}
1
+ {"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.20211231'\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"}
package/global.d.ts CHANGED
@@ -94,4 +94,17 @@ declare module 'vue' {
94
94
  }
95
95
  }
96
96
 
97
+ declare module '@vue/runtime-core' {
98
+ interface ComponentCustomProperties {
99
+ $message: typeof import('element-plus')['ElMessage']
100
+ $notify: typeof import('element-plus')['ElNotification']
101
+ $msgbox: typeof import('element-plus')['ElMessageBox']
102
+ $messageBox: typeof import('element-plus')['ElMessageBox']
103
+ $alert: typeof import('element-plus')['ElMessageBox']['alert']
104
+ $confirm: typeof import('element-plus')['ElMessageBox']['confirm']
105
+ $prompt: typeof import('element-plus')['ElMessageBox']['prompt']
106
+ $loading: typeof import('element-plus')['ElLoadingService']
107
+ }
108
+ }
109
+
97
110
  export {}
@@ -14,7 +14,7 @@ export declare const ElButton: import("../../utils/types").SFCWithInstall<import
14
14
  }, {
15
15
  buttonRef: import("vue").Ref<any>;
16
16
  buttonStyle: import("vue").ComputedRef<{}>;
17
- buttonSize: import("vue").ComputedRef<"medium" | "mini" | import("../../utils/types").ComponentSize>;
17
+ buttonSize: import("vue").ComputedRef<import("../../utils/types").ComponentSize>;
18
18
  buttonType: import("vue").ComputedRef<"" | "default" | "primary" | "success" | "warning" | "info" | "danger" | "text">;
19
19
  buttonDisabled: import("vue").ComputedRef<boolean>;
20
20
  shouldAddSpace: import("vue").ComputedRef<boolean>;
@@ -14,7 +14,7 @@ declare const _default: import("vue").DefineComponent<{
14
14
  }, {
15
15
  buttonRef: import("vue").Ref<any>;
16
16
  buttonStyle: import("vue").ComputedRef<{}>;
17
- buttonSize: import("vue").ComputedRef<"medium" | "mini" | import("../../../utils/types").ComponentSize>;
17
+ buttonSize: import("vue").ComputedRef<import("../../../utils/types").ComponentSize>;
18
18
  buttonType: import("vue").ComputedRef<"" | "default" | "primary" | "success" | "warning" | "info" | "danger" | "text">;
19
19
  buttonDisabled: import("vue").ComputedRef<boolean>;
20
20
  shouldAddSpace: import("vue").ComputedRef<boolean>;
@@ -3569,7 +3569,7 @@ declare const _Cascader: SFCWithInstall<import("vue").DefineComponent<{
3569
3569
  input: import("vue").Ref<HTMLInputElement | undefined>;
3570
3570
  textarea: import("vue").Ref<HTMLTextAreaElement | undefined>;
3571
3571
  attrs: import("vue").ComputedRef<Record<string, unknown>>;
3572
- inputSize: import("vue").ComputedRef<"medium" | "mini" | import("element-plus/es/utils/types").ComponentSize>;
3572
+ inputSize: import("vue").ComputedRef<import("element-plus/es/utils/types").ComponentSize>;
3573
3573
  validateState: import("vue").ComputedRef<string>;
3574
3574
  validateIcon: import("vue").ComputedRef<any>;
3575
3575
  containerStyle: import("vue").ComputedRef<import("element-plus/es/utils/types").StyleValue>;
@@ -3717,7 +3717,7 @@ declare const _Cascader: SFCWithInstall<import("vue").DefineComponent<{
3717
3717
  input: import("vue").Ref<HTMLInputElement | undefined>;
3718
3718
  textarea: import("vue").Ref<HTMLTextAreaElement | undefined>;
3719
3719
  attrs: import("vue").ComputedRef<Record<string, unknown>>;
3720
- inputSize: import("vue").ComputedRef<"medium" | "mini" | import("element-plus/es/utils/types").ComponentSize>;
3720
+ inputSize: import("vue").ComputedRef<import("element-plus/es/utils/types").ComponentSize>;
3721
3721
  validateState: import("vue").ComputedRef<string>;
3722
3722
  validateIcon: import("vue").ComputedRef<any>;
3723
3723
  containerStyle: import("vue").ComputedRef<import("element-plus/es/utils/types").StyleValue>;
@@ -4299,7 +4299,7 @@ declare const _Cascader: SFCWithInstall<import("vue").DefineComponent<{
4299
4299
  suggestions: import("vue").Ref<import("../cascader-panel/src/node").default[]>;
4300
4300
  isDisabled: import("vue").ComputedRef<boolean | undefined>;
4301
4301
  isOnComposition: import("vue").Ref<boolean>;
4302
- realSize: import("vue").ComputedRef<"medium" | "mini" | import("element-plus/es/utils/types").ComponentSize>;
4302
+ realSize: import("vue").ComputedRef<import("element-plus/es/utils/types").ComponentSize>;
4303
4303
  tagSize: import("vue").ComputedRef<"default" | "small">;
4304
4304
  multiple: import("vue").ComputedRef<boolean>;
4305
4305
  readonly: import("vue").ComputedRef<boolean>;
@@ -7947,7 +7947,7 @@ export declare const ElCascader: SFCWithInstall<import("vue").DefineComponent<{
7947
7947
  input: import("vue").Ref<HTMLInputElement | undefined>;
7948
7948
  textarea: import("vue").Ref<HTMLTextAreaElement | undefined>;
7949
7949
  attrs: import("vue").ComputedRef<Record<string, unknown>>;
7950
- inputSize: import("vue").ComputedRef<"medium" | "mini" | import("element-plus/es/utils/types").ComponentSize>;
7950
+ inputSize: import("vue").ComputedRef<import("element-plus/es/utils/types").ComponentSize>;
7951
7951
  validateState: import("vue").ComputedRef<string>;
7952
7952
  validateIcon: import("vue").ComputedRef<any>;
7953
7953
  containerStyle: import("vue").ComputedRef<import("element-plus/es/utils/types").StyleValue>;
@@ -8095,7 +8095,7 @@ export declare const ElCascader: SFCWithInstall<import("vue").DefineComponent<{
8095
8095
  input: import("vue").Ref<HTMLInputElement | undefined>;
8096
8096
  textarea: import("vue").Ref<HTMLTextAreaElement | undefined>;
8097
8097
  attrs: import("vue").ComputedRef<Record<string, unknown>>;
8098
- inputSize: import("vue").ComputedRef<"medium" | "mini" | import("element-plus/es/utils/types").ComponentSize>;
8098
+ inputSize: import("vue").ComputedRef<import("element-plus/es/utils/types").ComponentSize>;
8099
8099
  validateState: import("vue").ComputedRef<string>;
8100
8100
  validateIcon: import("vue").ComputedRef<any>;
8101
8101
  containerStyle: import("vue").ComputedRef<import("element-plus/es/utils/types").StyleValue>;
@@ -8677,7 +8677,7 @@ export declare const ElCascader: SFCWithInstall<import("vue").DefineComponent<{
8677
8677
  suggestions: import("vue").Ref<import("../cascader-panel/src/node").default[]>;
8678
8678
  isDisabled: import("vue").ComputedRef<boolean | undefined>;
8679
8679
  isOnComposition: import("vue").Ref<boolean>;
8680
- realSize: import("vue").ComputedRef<"medium" | "mini" | import("element-plus/es/utils/types").ComponentSize>;
8680
+ realSize: import("vue").ComputedRef<import("element-plus/es/utils/types").ComponentSize>;
8681
8681
  tagSize: import("vue").ComputedRef<"default" | "small">;
8682
8682
  multiple: import("vue").ComputedRef<boolean>;
8683
8683
  readonly: import("vue").ComputedRef<boolean>;
@@ -3574,7 +3574,7 @@ declare const _default: import("vue").DefineComponent<{
3574
3574
  input: Ref<HTMLInputElement | undefined>;
3575
3575
  textarea: Ref<HTMLTextAreaElement | undefined>;
3576
3576
  attrs: ComputedRef<Record<string, unknown>>;
3577
- inputSize: ComputedRef<"medium" | "mini" | ComponentSize>;
3577
+ inputSize: ComputedRef<ComponentSize>;
3578
3578
  validateState: ComputedRef<string>;
3579
3579
  validateIcon: ComputedRef<any>;
3580
3580
  containerStyle: ComputedRef<import("element-plus/es/utils/types").StyleValue>;
@@ -3722,7 +3722,7 @@ declare const _default: import("vue").DefineComponent<{
3722
3722
  input: Ref<HTMLInputElement | undefined>;
3723
3723
  textarea: Ref<HTMLTextAreaElement | undefined>;
3724
3724
  attrs: ComputedRef<Record<string, unknown>>;
3725
- inputSize: ComputedRef<"medium" | "mini" | ComponentSize>;
3725
+ inputSize: ComputedRef<ComponentSize>;
3726
3726
  validateState: ComputedRef<string>;
3727
3727
  validateIcon: ComputedRef<any>;
3728
3728
  containerStyle: ComputedRef<import("element-plus/es/utils/types").StyleValue>;
@@ -4304,7 +4304,7 @@ declare const _default: import("vue").DefineComponent<{
4304
4304
  suggestions: Ref<CascaderNode[]>;
4305
4305
  isDisabled: ComputedRef<boolean | undefined>;
4306
4306
  isOnComposition: Ref<boolean>;
4307
- realSize: ComputedRef<"medium" | "mini" | ComponentSize>;
4307
+ realSize: ComputedRef<ComponentSize>;
4308
4308
  tagSize: ComputedRef<"default" | "small">;
4309
4309
  multiple: ComputedRef<boolean>;
4310
4310
  readonly: ComputedRef<boolean>;
@@ -38,11 +38,11 @@ export declare const ElCheckbox: import("../../utils/types").SFCWithInstall<impo
38
38
  }, {
39
39
  isChecked: import("vue").ComputedRef<boolean>;
40
40
  isDisabled: import("vue").ComputedRef<boolean | undefined>;
41
- checkboxSize: import("vue").ComputedRef<"medium" | "mini" | import("../../utils/types").ComponentSize>;
41
+ checkboxSize: import("vue").ComputedRef<import("../../utils/types").ComponentSize>;
42
42
  model: import("vue").WritableComputedRef<any>;
43
43
  handleChange: (e: InputEvent) => void;
44
44
  focus: import("vue").Ref<boolean>;
45
- size: import("vue").ComputedRef<"medium" | "mini" | import("../../utils/types").ComponentSize>;
45
+ size: import("vue").ComputedRef<import("../../utils/types").ComponentSize>;
46
46
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
47
47
  modelValue?: unknown;
48
48
  label?: unknown;
@@ -124,7 +124,7 @@ export declare const ElCheckbox: import("../../utils/types").SFCWithInstall<impo
124
124
  color: string;
125
125
  boxShadow: string | null;
126
126
  }>;
127
- size: import("vue").ComputedRef<"medium" | "mini" | import("../../utils/types").ComponentSize>;
127
+ size: import("vue").ComputedRef<import("../../utils/types").ComponentSize>;
128
128
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
129
129
  modelValue?: unknown;
130
130
  label?: unknown;
@@ -262,7 +262,7 @@ export declare const ElCheckboxButton: import("../../utils/types").SFCWithInstal
262
262
  color: string;
263
263
  boxShadow: string | null;
264
264
  }>;
265
- size: import("vue").ComputedRef<"medium" | "mini" | import("../../utils/types").ComponentSize>;
265
+ size: import("vue").ComputedRef<import("../../utils/types").ComponentSize>;
266
266
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
267
267
  modelValue?: unknown;
268
268
  label?: unknown;
@@ -35,7 +35,7 @@ declare const _default: import("vue").DefineComponent<{
35
35
  color: string;
36
36
  boxShadow: string | null;
37
37
  }>;
38
- size: import("vue").ComputedRef<"medium" | "mini" | import("../../../utils/types").ComponentSize>;
38
+ size: import("vue").ComputedRef<import("../../../utils/types").ComponentSize>;
39
39
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
40
40
  modelValue?: unknown;
41
41
  label?: unknown;
@@ -40,11 +40,11 @@ declare const _default: import("vue").DefineComponent<{
40
40
  }, {
41
41
  isChecked: import("vue").ComputedRef<boolean>;
42
42
  isDisabled: import("vue").ComputedRef<boolean | undefined>;
43
- checkboxSize: import("vue").ComputedRef<"medium" | "mini" | ComponentSize>;
43
+ checkboxSize: import("vue").ComputedRef<ComponentSize>;
44
44
  model: import("vue").WritableComputedRef<any>;
45
45
  handleChange: (e: InputEvent) => void;
46
46
  focus: import("vue").Ref<boolean>;
47
- size: import("vue").ComputedRef<"medium" | "mini" | ComponentSize>;
47
+ size: import("vue").ComputedRef<ComponentSize>;
48
48
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
49
49
  modelValue?: unknown;
50
50
  label?: unknown;
@@ -38,9 +38,9 @@ export declare const useCheckboxGroup: () => {
38
38
  export declare const useCheckbox: (props: IUseCheckboxProps) => {
39
39
  isChecked: import("vue").ComputedRef<boolean>;
40
40
  isDisabled: import("vue").ComputedRef<boolean | undefined>;
41
- checkboxSize: import("vue").ComputedRef<"medium" | "mini" | import("element-plus/es/utils/types").ComponentSize>;
41
+ checkboxSize: import("vue").ComputedRef<import("element-plus/es/utils/types").ComponentSize>;
42
42
  model: import("vue").WritableComputedRef<any>;
43
43
  handleChange: (e: InputEvent) => void;
44
44
  focus: import("vue").Ref<boolean>;
45
- size: import("vue").ComputedRef<"medium" | "mini" | import("element-plus/es/utils/types").ComponentSize>;
45
+ size: import("vue").ComputedRef<import("element-plus/es/utils/types").ComponentSize>;
46
46
  };
@@ -14,7 +14,7 @@ declare const _ColorPicker: SFCWithInstall<import("vue").DefineComponent<{
14
14
  Effect: typeof import("..").Effect;
15
15
  color: import("./src/color").default;
16
16
  colorDisabled: import("vue").ComputedRef<boolean | undefined>;
17
- colorSize: import("vue").ComputedRef<"medium" | "mini" | import("element-plus/es/utils/types").ComponentSize>;
17
+ colorSize: import("vue").ComputedRef<import("element-plus/es/utils/types").ComponentSize>;
18
18
  displayedColor: import("vue").ComputedRef<string>;
19
19
  showPanelColor: import("vue").Ref<boolean>;
20
20
  showPicker: import("vue").Ref<boolean>;
@@ -70,7 +70,7 @@ export declare const ElColorPicker: SFCWithInstall<import("vue").DefineComponent
70
70
  Effect: typeof import("..").Effect;
71
71
  color: import("./src/color").default;
72
72
  colorDisabled: import("vue").ComputedRef<boolean | undefined>;
73
- colorSize: import("vue").ComputedRef<"medium" | "mini" | import("element-plus/es/utils/types").ComponentSize>;
73
+ colorSize: import("vue").ComputedRef<import("element-plus/es/utils/types").ComponentSize>;
74
74
  displayedColor: import("vue").ComputedRef<string>;
75
75
  showPanelColor: import("vue").Ref<boolean>;
76
76
  showPicker: import("vue").Ref<boolean>;
@@ -17,7 +17,7 @@ declare const _default: import("vue").DefineComponent<{
17
17
  Effect: typeof Effect;
18
18
  color: Color;
19
19
  colorDisabled: import("vue").ComputedRef<boolean | undefined>;
20
- colorSize: import("vue").ComputedRef<"medium" | "mini" | ComponentSize>;
20
+ colorSize: import("vue").ComputedRef<ComponentSize>;
21
21
  displayedColor: import("vue").ComputedRef<string>;
22
22
  showPanelColor: import("vue").Ref<boolean>;
23
23
  showPicker: import("vue").Ref<boolean>;
@@ -1,21 +1,25 @@
1
1
  export declare const ElConfigProvider: import("../../utils/types").SFCWithInstall<import("vue").DefineComponent<{
2
- readonly size: import("../../utils/props").BuildPropReturn<StringConstructor, unknown, unknown, "small" | "large" | "medium" | "mini", unknown>;
2
+ readonly size: import("../../utils/props").BuildPropReturn<StringConstructor, unknown, unknown, "small" | "default" | "large", unknown>;
3
3
  readonly button: import("../../utils/props").BuildPropReturn<import("../../utils/props").PropWrapper<import("..").ButtonConfigContext>, unknown, unknown, unknown, unknown>;
4
+ readonly zIndex: import("../../utils/props").BuildPropReturn<NumberConstructor, unknown, unknown, unknown, unknown>;
4
5
  readonly locale: import("../../utils/props").BuildPropReturn<import("../../utils/props").PropWrapper<import("../../locale").Language>, unknown, unknown, unknown, unknown>;
5
6
  }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
6
7
  [key: string]: any;
7
8
  }>[] | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
8
9
  readonly size?: unknown;
9
10
  readonly button?: unknown;
11
+ readonly zIndex?: unknown;
10
12
  readonly locale?: unknown;
11
13
  } & {} & {
12
14
  button?: import("..").ButtonConfigContext | undefined;
13
- size?: import("../../utils/props").BuildPropType<StringConstructor, "small" | "large" | "medium" | "mini", unknown> | undefined;
15
+ size?: import("../../utils/props").BuildPropType<StringConstructor, "small" | "default" | "large", unknown> | undefined;
14
16
  locale?: import("../../locale").Language | undefined;
17
+ zIndex?: number | undefined;
15
18
  }>, {
16
19
  button: import("..").ButtonConfigContext;
17
- size: import("../../utils/props").BuildPropType<StringConstructor, "small" | "large" | "medium" | "mini", unknown>;
20
+ size: import("../../utils/props").BuildPropType<StringConstructor, "small" | "default" | "large", unknown>;
18
21
  locale: import("../../locale").Language;
22
+ zIndex: number;
19
23
  }>> & Record<string, any>;
20
24
  export default ElConfigProvider;
21
25
  export * from './src/config-provider';
@@ -3,10 +3,9 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var withInstall = require('../../utils/with-install.js');
6
- var index = require('./src/index.js');
7
6
  var configProvider = require('./src/config-provider.js');
8
7
 
9
- const ElConfigProvider = withInstall.withInstall(index.ConfigProvider);
8
+ const ElConfigProvider = withInstall.withInstall(configProvider["default"]);
10
9
 
11
10
  exports.configProviderProps = configProvider.configProviderProps;
12
11
  exports.ElConfigProvider = ElConfigProvider;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../packages/components/config-provider/index.ts"],"sourcesContent":["import { withInstall } from '@element-plus/utils/with-install'\nimport { ConfigProvider } from './src'\n\nexport const ElConfigProvider = withInstall(ConfigProvider)\nexport default ElConfigProvider\n\nexport * from './src/config-provider'\n"],"names":["withInstall","ConfigProvider"],"mappings":";;;;;;;;AAEY,MAAC,gBAAgB,GAAGA,uBAAW,CAACC,oBAAc;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../packages/components/config-provider/index.ts"],"sourcesContent":["import { withInstall } from '@element-plus/utils/with-install'\n\nimport ConfigProvider from './src/config-provider'\n\nexport const ElConfigProvider = withInstall(ConfigProvider)\nexport default ElConfigProvider\n\nexport * from './src/config-provider'\n"],"names":["withInstall","ConfigProvider"],"mappings":";;;;;;;AAEY,MAAC,gBAAgB,GAAGA,uBAAW,CAACC,yBAAc;;;;;;"}
@@ -1,6 +1,31 @@
1
1
  import type { ButtonConfigContext } from 'element-plus/es/components/button';
2
2
  export declare const configProviderProps: {
3
- readonly size: import("element-plus/es/utils/props").BuildPropReturn<StringConstructor, unknown, unknown, "small" | "large" | "medium" | "mini", unknown>;
3
+ readonly size: import("element-plus/es/utils/props").BuildPropReturn<StringConstructor, unknown, unknown, "small" | "default" | "large", unknown>;
4
4
  readonly button: import("element-plus/es/utils/props").BuildPropReturn<import("element-plus/es/utils/props").PropWrapper<ButtonConfigContext>, unknown, unknown, unknown, unknown>;
5
+ readonly zIndex: import("element-plus/es/utils/props").BuildPropReturn<NumberConstructor, unknown, unknown, unknown, unknown>;
5
6
  readonly locale: import("element-plus/es/utils/props").BuildPropReturn<import("element-plus/es/utils/props").PropWrapper<import("../../../locale").Language>, unknown, unknown, unknown, unknown>;
6
7
  };
8
+ declare const _default: import("vue").DefineComponent<{
9
+ readonly size: import("element-plus/es/utils/props").BuildPropReturn<StringConstructor, unknown, unknown, "small" | "default" | "large", unknown>;
10
+ readonly button: import("element-plus/es/utils/props").BuildPropReturn<import("element-plus/es/utils/props").PropWrapper<ButtonConfigContext>, unknown, unknown, unknown, unknown>;
11
+ readonly zIndex: import("element-plus/es/utils/props").BuildPropReturn<NumberConstructor, unknown, unknown, unknown, unknown>;
12
+ readonly locale: import("element-plus/es/utils/props").BuildPropReturn<import("element-plus/es/utils/props").PropWrapper<import("../../../locale").Language>, unknown, unknown, unknown, unknown>;
13
+ }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
14
+ [key: string]: any;
15
+ }>[] | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
16
+ readonly size?: unknown;
17
+ readonly button?: unknown;
18
+ readonly zIndex?: unknown;
19
+ readonly locale?: unknown;
20
+ } & {} & {
21
+ button?: ButtonConfigContext | undefined;
22
+ size?: import("element-plus/es/utils/props").BuildPropType<StringConstructor, "small" | "default" | "large", unknown> | undefined;
23
+ locale?: import("../../../locale").Language | undefined;
24
+ zIndex?: number | undefined;
25
+ }>, {
26
+ button: ButtonConfigContext;
27
+ size: import("element-plus/es/utils/props").BuildPropType<StringConstructor, "small" | "default" | "large", unknown>;
28
+ locale: import("../../../locale").Language;
29
+ zIndex: number;
30
+ }>;
31
+ export default _default;
@@ -2,20 +2,45 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('../../../hooks/index.js');
5
+ var vue = require('vue');
6
6
  var props = require('../../../utils/props.js');
7
+ require('../../../hooks/index.js');
8
+ require('../../../tokens/index.js');
9
+ var popupManager = require('../../../utils/popup-manager.js');
10
+ var util = require('../../../utils/util.js');
7
11
  var index = require('../../../hooks/use-locale/index.js');
12
+ var configProvider = require('../../../tokens/config-provider.js');
8
13
 
9
14
  const configProviderProps = props.buildProps({
10
15
  ...index.useLocaleProps,
11
16
  size: {
12
17
  type: String,
13
- values: ["large", "medium", "small", "mini"]
18
+ values: ["large", "default", "small"]
14
19
  },
15
20
  button: {
16
21
  type: props.definePropType(Object)
22
+ },
23
+ zIndex: {
24
+ type: Number
25
+ }
26
+ });
27
+ var ConfigProvider = vue.defineComponent({
28
+ name: "ElConfigProvider",
29
+ props: configProviderProps,
30
+ setup(props, { slots }) {
31
+ index.provideLocale();
32
+ vue.provide(configProvider.configProviderContextKey, props);
33
+ vue.watch(() => props.zIndex, () => {
34
+ if (util.isNumber(props.zIndex))
35
+ popupManager.PopupManager.globalInitialZIndex = props.zIndex;
36
+ }, { immediate: true });
37
+ return () => {
38
+ var _a;
39
+ return (_a = slots.default) == null ? void 0 : _a.call(slots);
40
+ };
17
41
  }
18
42
  });
19
43
 
20
44
  exports.configProviderProps = configProviderProps;
45
+ exports["default"] = ConfigProvider;
21
46
  //# sourceMappingURL=config-provider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"config-provider.js","sources":["../../../../../../packages/components/config-provider/src/config-provider.ts"],"sourcesContent":["import { useLocaleProps } from '@element-plus/hooks'\nimport { buildProps, definePropType } from '@element-plus/utils/props'\nimport type { ButtonConfigContext } from '@element-plus/components/button'\n\nexport const configProviderProps = buildProps({\n ...useLocaleProps,\n\n size: {\n type: String,\n values: ['large', 'medium', 'small', 'mini'],\n },\n\n button: {\n type: definePropType<ButtonConfigContext>(Object),\n },\n} as const)\n"],"names":["buildProps","useLocaleProps","definePropType"],"mappings":";;;;;;;;AAEY,MAAC,mBAAmB,GAAGA,gBAAU,CAAC;AAC9C,EAAE,GAAGC,oBAAc;AACnB,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC;AAChD,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAEC,oBAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"config-provider.js","sources":["../../../../../../packages/components/config-provider/src/config-provider.ts"],"sourcesContent":["import { provide, defineComponent, watch } from 'vue'\nimport { buildProps, definePropType } from '@element-plus/utils/props'\nimport { useLocaleProps, provideLocale } from '@element-plus/hooks'\nimport { configProviderContextKey } from '@element-plus/tokens'\nimport { PopupManager } from '@element-plus/utils/popup-manager'\nimport { isNumber } from '@element-plus/utils/util'\nimport type { ButtonConfigContext } from '@element-plus/components/button'\n\nexport const configProviderProps = buildProps({\n ...useLocaleProps,\n\n size: {\n type: String,\n values: ['large', 'default', 'small'],\n },\n\n button: {\n type: definePropType<ButtonConfigContext>(Object),\n },\n\n zIndex: {\n type: Number,\n },\n} as const)\n\nexport default defineComponent({\n name: 'ElConfigProvider',\n props: configProviderProps,\n\n setup(props, { slots }) {\n provideLocale()\n provide(configProviderContextKey, props)\n\n watch(\n () => props.zIndex,\n () => {\n if (isNumber(props.zIndex))\n PopupManager.globalInitialZIndex = props.zIndex\n },\n { immediate: true }\n )\n\n return () => slots.default?.()\n },\n})\n"],"names":["buildProps","useLocaleProps","definePropType","defineComponent","provideLocale","provide","configProviderContextKey","watch","isNumber","PopupManager"],"mappings":";;;;;;;;;;;;;AAMY,MAAC,mBAAmB,GAAGA,gBAAU,CAAC;AAC9C,EAAE,GAAGC,oBAAc;AACnB,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC;AACzC,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAEC,oBAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,GAAG;AACH,CAAC,EAAE;AACH,qBAAeC,mBAAe,CAAC;AAC/B,EAAE,IAAI,EAAE,kBAAkB;AAC1B,EAAE,KAAK,EAAE,mBAAmB;AAC5B,EAAE,KAAK,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE;AAC1B,IAAIC,mBAAa,EAAE,CAAC;AACpB,IAAIC,WAAO,CAACC,uCAAwB,EAAE,KAAK,CAAC,CAAC;AAC7C,IAAIC,SAAK,CAAC,MAAM,KAAK,CAAC,MAAM,EAAE,MAAM;AACpC,MAAM,IAAIC,aAAQ,CAAC,KAAK,CAAC,MAAM,CAAC;AAChC,QAAQC,yBAAY,CAAC,mBAAmB,GAAG,KAAK,CAAC,MAAM,CAAC;AACxD,KAAK,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;AAC5B,IAAI,OAAO,MAAM;AACjB,MAAM,IAAI,EAAE,CAAC;AACb,MAAM,OAAO,CAAC,EAAE,GAAG,KAAK,CAAC,OAAO,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACpE,KAAK,CAAC;AACN,GAAG;AACH,CAAC,CAAC;;;;;"}
@@ -58,7 +58,7 @@ declare const _DatePicker: SFCWithInstall<import("vue").DefineComponent<{
58
58
  default: () => {};
59
59
  };
60
60
  modelValue: {
61
- type: import("vue").PropType<string | Date | (number | Date)[]>;
61
+ type: import("vue").PropType<string | number | Date | (string | number | Date)[]>;
62
62
  default: string;
63
63
  };
64
64
  rangeSeparator: {
@@ -143,7 +143,7 @@ declare const _DatePicker: SFCWithInstall<import("vue").DefineComponent<{
143
143
  type: import("./src/date-picker.type").IDatePickerType;
144
144
  disabled: boolean;
145
145
  name: string | unknown[];
146
- modelValue: string | Date | (number | Date)[];
146
+ modelValue: string | number | Date | (string | number | Date)[];
147
147
  editable: boolean;
148
148
  popperClass: string;
149
149
  popperOptions: Partial<import("@popperjs/core").Options>;
@@ -178,7 +178,7 @@ declare const _DatePicker: SFCWithInstall<import("vue").DefineComponent<{
178
178
  type: import("./src/date-picker.type").IDatePickerType;
179
179
  disabled: boolean;
180
180
  name: string | unknown[];
181
- modelValue: string | Date | (number | Date)[];
181
+ modelValue: string | number | Date | (string | number | Date)[];
182
182
  editable: boolean;
183
183
  popperClass: string;
184
184
  popperOptions: Partial<import("@popperjs/core").Options>;
@@ -254,7 +254,7 @@ export declare const ElDatePicker: SFCWithInstall<import("vue").DefineComponent<
254
254
  default: () => {};
255
255
  };
256
256
  modelValue: {
257
- type: import("vue").PropType<string | Date | (number | Date)[]>;
257
+ type: import("vue").PropType<string | number | Date | (string | number | Date)[]>;
258
258
  default: string;
259
259
  };
260
260
  rangeSeparator: {
@@ -339,7 +339,7 @@ export declare const ElDatePicker: SFCWithInstall<import("vue").DefineComponent<
339
339
  type: import("./src/date-picker.type").IDatePickerType;
340
340
  disabled: boolean;
341
341
  name: string | unknown[];
342
- modelValue: string | Date | (number | Date)[];
342
+ modelValue: string | number | Date | (string | number | Date)[];
343
343
  editable: boolean;
344
344
  popperClass: string;
345
345
  popperOptions: Partial<import("@popperjs/core").Options>;
@@ -374,7 +374,7 @@ export declare const ElDatePicker: SFCWithInstall<import("vue").DefineComponent<
374
374
  type: import("./src/date-picker.type").IDatePickerType;
375
375
  disabled: boolean;
376
376
  name: string | unknown[];
377
- modelValue: string | Date | (number | Date)[];
377
+ modelValue: string | number | Date | (string | number | Date)[];
378
378
  editable: boolean;
379
379
  popperClass: string;
380
380
  popperOptions: Partial<import("@popperjs/core").Options>;
@@ -59,7 +59,7 @@ declare const _default: import("vue").DefineComponent<{
59
59
  default: () => {};
60
60
  };
61
61
  modelValue: {
62
- type: PropType<string | Date | (number | Date)[]>;
62
+ type: PropType<string | number | Date | (string | number | Date)[]>;
63
63
  default: string;
64
64
  };
65
65
  rangeSeparator: {
@@ -144,7 +144,7 @@ declare const _default: import("vue").DefineComponent<{
144
144
  type: IDatePickerType;
145
145
  disabled: boolean;
146
146
  name: string | unknown[];
147
- modelValue: string | Date | (number | Date)[];
147
+ modelValue: string | number | Date | (string | number | Date)[];
148
148
  editable: boolean;
149
149
  popperClass: string;
150
150
  popperOptions: Partial<import("@popperjs/core").Options>;
@@ -179,7 +179,7 @@ declare const _default: import("vue").DefineComponent<{
179
179
  type: IDatePickerType;
180
180
  disabled: boolean;
181
181
  name: string | unknown[];
182
- modelValue: string | Date | (number | Date)[];
182
+ modelValue: string | number | Date | (string | number | Date)[];
183
183
  editable: boolean;
184
184
  popperClass: string;
185
185
  popperOptions: Partial<import("@popperjs/core").Options>;
@@ -24,7 +24,7 @@ export declare const ElDescriptions: import("../../utils/types").SFCWithInstall<
24
24
  default: string;
25
25
  };
26
26
  }, {
27
- descriptionsSize: import("vue").ComputedRef<"medium" | "mini" | import("../../utils/types").ComponentSize>;
27
+ descriptionKls: import("vue").ComputedRef<string[]>;
28
28
  getRows: () => never[];
29
29
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
30
30
  border?: unknown;