@element-plus/nightly 0.0.20220105 → 0.0.20220106

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 (61) hide show
  1. package/attributes.json +1 -1
  2. package/dist/index.css +1 -1
  3. package/dist/index.full.js +3 -5
  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 +3 -5
  9. package/es/components/index.mjs +2 -2
  10. package/es/components/radio/index.mjs +2 -2
  11. package/es/components/radio/src/radio-button.mjs +11 -5
  12. package/es/components/radio/src/radio-button.mjs.map +1 -1
  13. package/es/components/radio/src/radio-button.vue_vue_type_script_lang.mjs +1 -1
  14. package/es/components/radio/src/radio-button2.mjs +5 -11
  15. package/es/components/radio/src/radio-button2.mjs.map +1 -1
  16. package/es/components/skeleton/index.mjs +2 -2
  17. package/es/components/skeleton/src/skeleton.mjs +24 -5
  18. package/es/components/skeleton/src/skeleton.mjs.map +1 -1
  19. package/es/components/skeleton/src/skeleton.vue_vue_type_script_lang.mjs +1 -1
  20. package/es/components/skeleton/src/skeleton2.mjs +5 -24
  21. package/es/components/skeleton/src/skeleton2.mjs.map +1 -1
  22. package/es/hooks/use-id/index.mjs +2 -2
  23. package/es/hooks/use-id/index.mjs.map +1 -1
  24. package/es/hooks/use-popper-container/index.mjs +2 -2
  25. package/es/hooks/use-popper-container/index.mjs.map +1 -1
  26. package/es/index.mjs +2 -2
  27. package/es/version.d.ts +1 -1
  28. package/es/version.mjs +1 -1
  29. package/es/version.mjs.map +1 -1
  30. package/lib/components/index.js +2 -2
  31. package/lib/components/radio/index.js +2 -2
  32. package/lib/components/radio/src/radio-button.js +10 -5
  33. package/lib/components/radio/src/radio-button.js.map +1 -1
  34. package/lib/components/radio/src/radio-button.vue_vue_type_script_lang.js +1 -1
  35. package/lib/components/radio/src/radio-button2.js +5 -10
  36. package/lib/components/radio/src/radio-button2.js.map +1 -1
  37. package/lib/components/skeleton/index.js +2 -2
  38. package/lib/components/skeleton/src/skeleton.js +23 -5
  39. package/lib/components/skeleton/src/skeleton.js.map +1 -1
  40. package/lib/components/skeleton/src/skeleton.vue_vue_type_script_lang.js +1 -1
  41. package/lib/components/skeleton/src/skeleton2.js +5 -23
  42. package/lib/components/skeleton/src/skeleton2.js.map +1 -1
  43. package/lib/hooks/use-id/index.js +2 -2
  44. package/lib/hooks/use-id/index.js.map +1 -1
  45. package/lib/hooks/use-popper-container/index.js +2 -2
  46. package/lib/hooks/use-popper-container/index.js.map +1 -1
  47. package/lib/index.js +2 -2
  48. package/lib/version.d.ts +1 -1
  49. package/lib/version.js +1 -1
  50. package/lib/version.js.map +1 -1
  51. package/package.json +2 -2
  52. package/theme-chalk/el-select-v2.css +1 -1
  53. package/theme-chalk/index.css +1 -1
  54. package/theme-chalk/src/select-v2.scss +2 -3
  55. package/web-types.json +1 -1
  56. package/es/utils/isServer.d.ts +0 -2
  57. package/es/utils/isServer.mjs +0 -4
  58. package/es/utils/isServer.mjs.map +0 -1
  59. package/lib/utils/isServer.d.ts +0 -2
  60. package/lib/utils/isServer.js +0 -8
  61. package/lib/utils/isServer.js.map +0 -1
@@ -1,4 +1,4 @@
1
- /*! Element Plus v0.0.20220105 */
1
+ /*! Element Plus v0.0.20220106 */
2
2
 
3
3
  import { getCurrentInstance, computed, warn, readonly, getCurrentScope, onScopeDispose, shallowRef, watchSyncEffect, ref, unref, watch, inject, provide, isRef, onMounted, onUnmounted, h as h$1, Teleport, onBeforeUnmount, onBeforeMount, nextTick, defineComponent, reactive, openBlock, createElementBlock, normalizeStyle, createElementVNode, normalizeClass, renderSlot, mergeProps, resolveComponent, createBlock, Transition, withCtx, withDirectives, resolveDynamicComponent, createCommentVNode, createTextVNode, toDisplayString, Fragment, createVNode, vShow, onUpdated, withModifiers, toRef, cloneVNode, Text, Comment, resolveDirective, renderList, withKeys, createSlots, normalizeProps, guardReactiveProps, toRefs, vModelCheckbox, vModelRadio, onBeforeUpdate, vModelText, toHandlers, watchEffect, isVNode, camelize as camelize$1, effectScope, markRaw, toRaw, triggerRef, TransitionGroup, createApp, render as render$26 } from 'vue';
4
4
 
@@ -4228,8 +4228,6 @@ const useTransitionFallthrough = () => {
4228
4228
  };
4229
4229
  };
4230
4230
 
4231
- var isServer = !(globalThis ? globalThis.document : window);
4232
-
4233
4231
  const defaultIdInjection = {
4234
4232
  prefix: Math.floor(Math.random() * 1e4),
4235
4233
  current: 0
@@ -4261,7 +4259,7 @@ const POPPER_CONTAINER_ID = `el-popper-container-${generateId()}`;
4261
4259
  const POPPER_CONTAINER_SELECTOR = `#${POPPER_CONTAINER_ID}`;
4262
4260
  const usePopperContainer = () => {
4263
4261
  onBeforeMount(() => {
4264
- if (isServer)
4262
+ if (!isClient)
4265
4263
  return;
4266
4264
  if (!cachedContainer) {
4267
4265
  const container = document.createElement("div");
@@ -4527,7 +4525,7 @@ if (isClient) {
4527
4525
  });
4528
4526
  }
4529
4527
 
4530
- const version$1 = "0.0.20220105";
4528
+ const version$1 = "0.0.20220106";
4531
4529
 
4532
4530
  const INSTALLED_KEY = Symbol("INSTALLED_KEY");
4533
4531
  const makeInstaller = (components = []) => {
@@ -111,7 +111,7 @@ export { POPPER_CONTENT_INJECTION_KEY, POPPER_INJECTION_KEY } from './popper/src
111
111
  export { progressProps } from './progress/src/progress.mjs';
112
112
  export { radioEmits, radioProps, radioPropsBase, useRadio } from './radio/src/radio.mjs';
113
113
  export { radioGroupEmits, radioGroupProps } from './radio/src/radio-group.mjs';
114
- export { radioButtonProps } from './radio/src/radio-button2.mjs';
114
+ export { radioButtonProps } from './radio/src/radio-button.mjs';
115
115
  export { rateEmits, rateProps } from './rate/src/rate.mjs';
116
116
  export { IconComponentMap, IconMap, resultProps } from './result/src/result.mjs';
117
117
  export { rowProps } from './row/src/row.mjs';
@@ -120,7 +120,7 @@ export { scrollbarEmits, scrollbarProps } from './scrollbar/src/scrollbar.mjs';
120
120
  export { barProps } from './scrollbar/src/bar.mjs';
121
121
  export { selectGroupKey, selectKey } from './select/src/token.mjs';
122
122
  export { selectV2InjectionKey } from './select-v2/src/token.mjs';
123
- export { skeletonProps } from './skeleton/src/skeleton2.mjs';
123
+ export { skeletonProps } from './skeleton/src/skeleton.mjs';
124
124
  export { skeletonItemProps } from './skeleton/src/skeleton-item.mjs';
125
125
  export { spaceProps } from './space/src/space.mjs';
126
126
  export { useSpace } from './space/src/use-space.mjs';
@@ -1,10 +1,10 @@
1
1
  import { withInstall, withNoopInstall } from '../../utils/with-install.mjs';
2
2
  import './src/radio2.mjs';
3
- import './src/radio-button.mjs';
3
+ import './src/radio-button2.mjs';
4
4
  import './src/radio-group2.mjs';
5
5
  export { radioEmits, radioProps, radioPropsBase, useRadio } from './src/radio.mjs';
6
6
  export { radioGroupEmits, radioGroupProps } from './src/radio-group.mjs';
7
- export { radioButtonProps } from './src/radio-button2.mjs';
7
+ export { radioButtonProps } from './src/radio-button.mjs';
8
8
  import script from './src/radio.vue_vue_type_script_lang.mjs';
9
9
  import script$1 from './src/radio-button.vue_vue_type_script_lang.mjs';
10
10
  import script$2 from './src/radio-group.vue_vue_type_script_lang.mjs';
@@ -1,7 +1,13 @@
1
- import script from './radio-button.vue_vue_type_script_lang.mjs';
2
- export { default } from './radio-button.vue_vue_type_script_lang.mjs';
3
- import { render } from './radio-button.vue_vue_type_template_id_14e266b0_lang.mjs';
1
+ import { buildProps } from '../../../utils/props.mjs';
2
+ import { radioPropsBase } from './radio.mjs';
4
3
 
5
- script.render = render;
6
- script.__file = "packages/components/radio/src/radio-button.vue";
4
+ const radioButtonProps = buildProps({
5
+ ...radioPropsBase,
6
+ name: {
7
+ type: String,
8
+ default: ""
9
+ }
10
+ });
11
+
12
+ export { radioButtonProps };
7
13
  //# sourceMappingURL=radio-button.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"radio-button.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
1
+ {"version":3,"file":"radio-button.mjs","sources":["../../../../../../packages/components/radio/src/radio-button.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils/props'\nimport { radioPropsBase } from './radio'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const radioButtonProps = buildProps({\n ...radioPropsBase,\n name: {\n type: String,\n default: '',\n },\n} as const)\n\nexport type RadioButtonProps = ExtractPropTypes<typeof radioButtonProps>\n"],"names":[],"mappings":";;;AAEY,MAAC,gBAAgB,GAAG,UAAU,CAAC;AAC3C,EAAE,GAAG,cAAc;AACnB,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, computed } from 'vue';
2
2
  import { useRadio } from './radio.mjs';
3
- import { radioButtonProps } from './radio-button2.mjs';
3
+ import { radioButtonProps } from './radio-button.mjs';
4
4
 
5
5
  var script = defineComponent({
6
6
  name: "ElRadioButton",
@@ -1,13 +1,7 @@
1
- import { buildProps } from '../../../utils/props.mjs';
2
- import { radioPropsBase } from './radio.mjs';
1
+ import script from './radio-button.vue_vue_type_script_lang.mjs';
2
+ export { default } from './radio-button.vue_vue_type_script_lang.mjs';
3
+ import { render } from './radio-button.vue_vue_type_template_id_14e266b0_lang.mjs';
3
4
 
4
- const radioButtonProps = buildProps({
5
- ...radioPropsBase,
6
- name: {
7
- type: String,
8
- default: ""
9
- }
10
- });
11
-
12
- export { radioButtonProps };
5
+ script.render = render;
6
+ script.__file = "packages/components/radio/src/radio-button.vue";
13
7
  //# sourceMappingURL=radio-button2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"radio-button2.mjs","sources":["../../../../../../packages/components/radio/src/radio-button.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils/props'\nimport { radioPropsBase } from './radio'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const radioButtonProps = buildProps({\n ...radioPropsBase,\n name: {\n type: String,\n default: '',\n },\n} as const)\n\nexport type RadioButtonProps = ExtractPropTypes<typeof radioButtonProps>\n"],"names":[],"mappings":";;;AAEY,MAAC,gBAAgB,GAAG,UAAU,CAAC;AAC3C,EAAE,GAAG,cAAc;AACnB,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"radio-button2.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { withInstall, withNoopInstall } from '../../utils/with-install.mjs';
2
- import './src/skeleton.mjs';
2
+ import './src/skeleton2.mjs';
3
3
  import './src/skeleton-item2.mjs';
4
- export { skeletonProps } from './src/skeleton2.mjs';
4
+ export { skeletonProps } from './src/skeleton.mjs';
5
5
  export { skeletonItemProps } from './src/skeleton-item.mjs';
6
6
  import script from './src/skeleton.vue_vue_type_script_lang.mjs';
7
7
  import script$1 from './src/skeleton-item.vue_vue_type_script_lang.mjs';
@@ -1,7 +1,26 @@
1
- import script from './skeleton.vue_vue_type_script_lang.mjs';
2
- export { default } from './skeleton.vue_vue_type_script_lang.mjs';
3
- import { render } from './skeleton.vue_vue_type_template_id_26fa9225_lang.mjs';
1
+ import { buildProps } from '../../../utils/props.mjs';
4
2
 
5
- script.render = render;
6
- script.__file = "packages/components/skeleton/src/skeleton.vue";
3
+ const skeletonProps = buildProps({
4
+ animated: {
5
+ type: Boolean,
6
+ default: false
7
+ },
8
+ count: {
9
+ type: Number,
10
+ default: 1
11
+ },
12
+ rows: {
13
+ type: Number,
14
+ default: 3
15
+ },
16
+ loading: {
17
+ type: Boolean,
18
+ default: true
19
+ },
20
+ throttle: {
21
+ type: Number
22
+ }
23
+ });
24
+
25
+ export { skeletonProps };
7
26
  //# sourceMappingURL=skeleton.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"skeleton.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
1
+ {"version":3,"file":"skeleton.mjs","sources":["../../../../../../packages/components/skeleton/src/skeleton.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils/props'\nimport type Skeleton from './skeleton.vue'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const skeletonProps = buildProps({\n animated: {\n type: Boolean,\n default: false,\n },\n count: {\n type: Number,\n default: 1,\n },\n rows: {\n type: Number,\n default: 3,\n },\n loading: {\n type: Boolean,\n default: true,\n },\n throttle: {\n type: Number,\n },\n} as const)\nexport type SkeletonProps = ExtractPropTypes<typeof skeletonProps>\n\nexport type SkeletonInstance = InstanceType<typeof Skeleton>\n"],"names":[],"mappings":";;AACY,MAAC,aAAa,GAAG,UAAU,CAAC;AACxC,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,GAAG;AACH,CAAC;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, computed } from 'vue';
2
2
  import '../../../hooks/index.mjs';
3
3
  import './skeleton-item2.mjs';
4
- import { skeletonProps } from './skeleton2.mjs';
4
+ import { skeletonProps } from './skeleton.mjs';
5
5
  import script$1 from './skeleton-item.vue_vue_type_script_lang.mjs';
6
6
  import { useThrottleRender } from '../../../hooks/use-throttle-render/index.mjs';
7
7
 
@@ -1,26 +1,7 @@
1
- import { buildProps } from '../../../utils/props.mjs';
1
+ import script from './skeleton.vue_vue_type_script_lang.mjs';
2
+ export { default } from './skeleton.vue_vue_type_script_lang.mjs';
3
+ import { render } from './skeleton.vue_vue_type_template_id_26fa9225_lang.mjs';
2
4
 
3
- const skeletonProps = buildProps({
4
- animated: {
5
- type: Boolean,
6
- default: false
7
- },
8
- count: {
9
- type: Number,
10
- default: 1
11
- },
12
- rows: {
13
- type: Number,
14
- default: 3
15
- },
16
- loading: {
17
- type: Boolean,
18
- default: true
19
- },
20
- throttle: {
21
- type: Number
22
- }
23
- });
24
-
25
- export { skeletonProps };
5
+ script.render = render;
6
+ script.__file = "packages/components/skeleton/src/skeleton.vue";
26
7
  //# sourceMappingURL=skeleton2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"skeleton2.mjs","sources":["../../../../../../packages/components/skeleton/src/skeleton.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils/props'\nimport type Skeleton from './skeleton.vue'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const skeletonProps = buildProps({\n animated: {\n type: Boolean,\n default: false,\n },\n count: {\n type: Number,\n default: 1,\n },\n rows: {\n type: Number,\n default: 3,\n },\n loading: {\n type: Boolean,\n default: true,\n },\n throttle: {\n type: Number,\n },\n} as const)\nexport type SkeletonProps = ExtractPropTypes<typeof skeletonProps>\n\nexport type SkeletonInstance = InstanceType<typeof Skeleton>\n"],"names":[],"mappings":";;AACY,MAAC,aAAa,GAAG,UAAU,CAAC;AACxC,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,GAAG;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"skeleton2.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { inject, computed, unref } from 'vue';
2
- import isServer from '../../utils/isServer.mjs';
2
+ import { isClient } from '@vueuse/core';
3
3
  import { debugWarn } from '../../utils/error.mjs';
4
4
 
5
5
  const defaultIdInjection = {
@@ -9,7 +9,7 @@ const defaultIdInjection = {
9
9
  const ID_INJECTION_KEY = Symbol("elIdInjection");
10
10
  const useId = (deterministicId) => {
11
11
  const idInjection = inject(ID_INJECTION_KEY, defaultIdInjection);
12
- if (isServer && idInjection === defaultIdInjection) {
12
+ if (!isClient && idInjection === defaultIdInjection) {
13
13
  debugWarn("IdInjection", `Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
14
14
  usage: app.provide(ID_INJECTION_KEY, {
15
15
  prefix: number,
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../../packages/hooks/use-id/index.ts"],"sourcesContent":["import { computed, inject, unref } from 'vue'\nimport isServer from '@element-plus/utils/isServer'\nimport { debugWarn } from '@element-plus/utils/error'\n\nimport type { InjectionKey, Ref } from 'vue'\nimport type { MaybeRef } from '@vueuse/core'\n\nexport type ElIdInjectionContext = {\n prefix: number\n current: number\n}\n\nconst defaultIdInjection = {\n prefix: Math.floor(Math.random() * 10000),\n current: 0,\n}\n\nexport const ID_INJECTION_KEY: InjectionKey<ElIdInjectionContext> =\n Symbol('elIdInjection')\n\nexport const useId = (deterministicId?: MaybeRef<string>): Ref<string> => {\n const idInjection = inject(ID_INJECTION_KEY, defaultIdInjection)\n\n if (isServer && idInjection === defaultIdInjection) {\n debugWarn(\n 'IdInjection',\n `Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed\nusage: app.provide(ID_INJECTION_KEY, {\n prefix: number,\n current: number,\n})`\n )\n }\n\n const idRef = computed(\n () =>\n unref(deterministicId) ||\n `el-id-${idInjection.prefix}-${idInjection.current++}`\n )\n\n return idRef\n}\n"],"names":[],"mappings":";;;;AAGA,MAAM,kBAAkB,GAAG;AAC3B,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC;AACzC,EAAE,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC;AACU,MAAC,gBAAgB,GAAG,MAAM,CAAC,eAAe,EAAE;AAC5C,MAAC,KAAK,GAAG,CAAC,eAAe,KAAK;AAC1C,EAAE,MAAM,WAAW,GAAG,MAAM,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,CAAC;AACnE,EAAE,IAAI,QAAQ,IAAI,WAAW,KAAK,kBAAkB,EAAE;AACtD,IAAI,SAAS,CAAC,aAAa,EAAE,CAAC;AAC9B;AACA;AACA;AACA,EAAE,CAAC,CAAC,CAAC;AACL,GAAG;AACH,EAAE,MAAM,KAAK,GAAG,QAAQ,CAAC,MAAM,KAAK,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,EAAE,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;AACjH,EAAE,OAAO,KAAK,CAAC;AACf;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../packages/hooks/use-id/index.ts"],"sourcesContent":["import { computed, inject, unref } from 'vue'\nimport { isClient } from '@vueuse/core'\nimport { debugWarn } from '@element-plus/utils/error'\n\nimport type { InjectionKey, Ref } from 'vue'\nimport type { MaybeRef } from '@vueuse/core'\n\nexport type ElIdInjectionContext = {\n prefix: number\n current: number\n}\n\nconst defaultIdInjection = {\n prefix: Math.floor(Math.random() * 10000),\n current: 0,\n}\n\nexport const ID_INJECTION_KEY: InjectionKey<ElIdInjectionContext> =\n Symbol('elIdInjection')\n\nexport const useId = (deterministicId?: MaybeRef<string>): Ref<string> => {\n const idInjection = inject(ID_INJECTION_KEY, defaultIdInjection)\n\n if (!isClient && idInjection === defaultIdInjection) {\n debugWarn(\n 'IdInjection',\n `Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed\nusage: app.provide(ID_INJECTION_KEY, {\n prefix: number,\n current: number,\n})`\n )\n }\n\n const idRef = computed(\n () =>\n unref(deterministicId) ||\n `el-id-${idInjection.prefix}-${idInjection.current++}`\n )\n\n return idRef\n}\n"],"names":[],"mappings":";;;;AAGA,MAAM,kBAAkB,GAAG;AAC3B,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC;AACzC,EAAE,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC;AACU,MAAC,gBAAgB,GAAG,MAAM,CAAC,eAAe,EAAE;AAC5C,MAAC,KAAK,GAAG,CAAC,eAAe,KAAK;AAC1C,EAAE,MAAM,WAAW,GAAG,MAAM,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,CAAC;AACnE,EAAE,IAAI,CAAC,QAAQ,IAAI,WAAW,KAAK,kBAAkB,EAAE;AACvD,IAAI,SAAS,CAAC,aAAa,EAAE,CAAC;AAC9B;AACA;AACA;AACA,EAAE,CAAC,CAAC,CAAC;AACL,GAAG;AACH,EAAE,MAAM,KAAK,GAAG,QAAQ,CAAC,MAAM,KAAK,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,EAAE,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;AACjH,EAAE,OAAO,KAAK,CAAC;AACf;;;;"}
@@ -1,13 +1,13 @@
1
1
  import { onBeforeMount } from 'vue';
2
+ import { isClient } from '@vueuse/core';
2
3
  import { generateId } from '../../utils/util.mjs';
3
- import isServer from '../../utils/isServer.mjs';
4
4
 
5
5
  let cachedContainer;
6
6
  const POPPER_CONTAINER_ID = `el-popper-container-${generateId()}`;
7
7
  const POPPER_CONTAINER_SELECTOR = `#${POPPER_CONTAINER_ID}`;
8
8
  const usePopperContainer = () => {
9
9
  onBeforeMount(() => {
10
- if (isServer)
10
+ if (!isClient)
11
11
  return;
12
12
  if (process.env.NODE_ENV === "test" || !cachedContainer) {
13
13
  const container = document.createElement("div");
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../../packages/hooks/use-popper-container/index.ts"],"sourcesContent":["import { onBeforeMount } from 'vue'\nimport { generateId } from '@element-plus/utils/util'\nimport isServer from '@element-plus/utils/isServer'\n\nlet cachedContainer: HTMLElement\n\nexport const POPPER_CONTAINER_ID = `el-popper-container-${generateId()}`\n\nexport const POPPER_CONTAINER_SELECTOR = `#${POPPER_CONTAINER_ID}`\n\nexport const usePopperContainer = () => {\n onBeforeMount(() => {\n if (isServer) return\n\n // This is for bypassing the error that when under testing env, we often encounter\n // document.body.innerHTML = '' situation\n // for this we need to disable the caching since it's not really needed\n if (process.env.NODE_ENV === 'test' || !cachedContainer) {\n const container = document.createElement('div')\n container.id = POPPER_CONTAINER_ID\n document.body.appendChild(container)\n cachedContainer = container\n }\n })\n}\n"],"names":[],"mappings":";;;;AAGA,IAAI,eAAe,CAAC;AACR,MAAC,mBAAmB,GAAG,CAAC,oBAAoB,EAAE,UAAU,EAAE,CAAC,EAAE;AAC7D,MAAC,yBAAyB,GAAG,CAAC,CAAC,EAAE,mBAAmB,CAAC,EAAE;AACvD,MAAC,kBAAkB,GAAG,MAAM;AACxC,EAAE,aAAa,CAAC,MAAM;AACtB,IAAI,IAAI,QAAQ;AAChB,MAAM,OAAO;AACb,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,IAAI,CAAC,eAAe,EAAE;AAC7D,MAAM,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;AACtD,MAAM,SAAS,CAAC,EAAE,GAAG,mBAAmB,CAAC;AACzC,MAAM,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;AAC3C,MAAM,eAAe,GAAG,SAAS,CAAC;AAClC,KAAK;AACL,GAAG,CAAC,CAAC;AACL;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../packages/hooks/use-popper-container/index.ts"],"sourcesContent":["import { onBeforeMount } from 'vue'\nimport { isClient } from '@vueuse/core'\nimport { generateId } from '@element-plus/utils/util'\n\nlet cachedContainer: HTMLElement\n\nexport const POPPER_CONTAINER_ID = `el-popper-container-${generateId()}`\n\nexport const POPPER_CONTAINER_SELECTOR = `#${POPPER_CONTAINER_ID}`\n\nexport const usePopperContainer = () => {\n onBeforeMount(() => {\n if (!isClient) return\n\n // This is for bypassing the error that when under testing env, we often encounter\n // document.body.innerHTML = '' situation\n // for this we need to disable the caching since it's not really needed\n if (process.env.NODE_ENV === 'test' || !cachedContainer) {\n const container = document.createElement('div')\n container.id = POPPER_CONTAINER_ID\n document.body.appendChild(container)\n cachedContainer = container\n }\n })\n}\n"],"names":[],"mappings":";;;;AAGA,IAAI,eAAe,CAAC;AACR,MAAC,mBAAmB,GAAG,CAAC,oBAAoB,EAAE,UAAU,EAAE,CAAC,EAAE;AAC7D,MAAC,yBAAyB,GAAG,CAAC,CAAC,EAAE,mBAAmB,CAAC,EAAE;AACvD,MAAC,kBAAkB,GAAG,MAAM;AACxC,EAAE,aAAa,CAAC,MAAM;AACtB,IAAI,IAAI,CAAC,QAAQ;AACjB,MAAM,OAAO;AACb,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,IAAI,CAAC,eAAe,EAAE;AAC7D,MAAM,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;AACtD,MAAM,SAAS,CAAC,EAAE,GAAG,mBAAmB,CAAC;AACzC,MAAM,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;AAC3C,MAAM,eAAe,GAAG,SAAS,CAAC;AAClC,KAAK;AACL,GAAG,CAAC,CAAC;AACL;;;;"}
package/es/index.mjs CHANGED
@@ -88,7 +88,7 @@ export { progressProps } from './components/progress/src/progress.mjs';
88
88
  export { ElProgress } from './components/progress/index.mjs';
89
89
  export { radioEmits, radioProps, radioPropsBase, useRadio } from './components/radio/src/radio.mjs';
90
90
  export { radioGroupEmits, radioGroupProps } from './components/radio/src/radio-group.mjs';
91
- export { radioButtonProps } from './components/radio/src/radio-button2.mjs';
91
+ export { radioButtonProps } from './components/radio/src/radio-button.mjs';
92
92
  export { ElRadio, ElRadioButton, ElRadioGroup } from './components/radio/index.mjs';
93
93
  export { rateEmits, rateProps } from './components/rate/src/rate.mjs';
94
94
  export { ElRate } from './components/rate/index.mjs';
@@ -104,7 +104,7 @@ export { selectGroupKey, selectKey } from './components/select/src/token.mjs';
104
104
  export { ElOption, ElOptionGroup, ElSelect } from './components/select/index.mjs';
105
105
  export { selectV2InjectionKey } from './components/select-v2/src/token.mjs';
106
106
  export { ElSelectV2 } from './components/select-v2/index.mjs';
107
- export { skeletonProps } from './components/skeleton/src/skeleton2.mjs';
107
+ export { skeletonProps } from './components/skeleton/src/skeleton.mjs';
108
108
  export { skeletonItemProps } from './components/skeleton/src/skeleton-item.mjs';
109
109
  export { ElSkeleton, ElSkeletonItem } from './components/skeleton/index.mjs';
110
110
  export { ElSlider } from './components/slider/index.mjs';
package/es/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "0.0.20220105";
1
+ export declare const version = "0.0.20220106";
package/es/version.mjs CHANGED
@@ -1,4 +1,4 @@
1
- const version = "0.0.20220105";
1
+ const version = "0.0.20220106";
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.20220105'\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.20220106'\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"}
@@ -115,7 +115,7 @@ var tokens = require('./popper/src/tokens.js');
115
115
  var progress = require('./progress/src/progress.js');
116
116
  var radio = require('./radio/src/radio.js');
117
117
  var radioGroup = require('./radio/src/radio-group.js');
118
- var radioButton = require('./radio/src/radio-button2.js');
118
+ var radioButton = require('./radio/src/radio-button.js');
119
119
  var rate = require('./rate/src/rate.js');
120
120
  var result = require('./result/src/result.js');
121
121
  var row = require('./row/src/row.js');
@@ -124,7 +124,7 @@ var scrollbar = require('./scrollbar/src/scrollbar.js');
124
124
  var bar = require('./scrollbar/src/bar.js');
125
125
  var token = require('./select/src/token.js');
126
126
  var token$1 = require('./select-v2/src/token.js');
127
- var skeleton = require('./skeleton/src/skeleton2.js');
127
+ var skeleton = require('./skeleton/src/skeleton.js');
128
128
  var skeletonItem = require('./skeleton/src/skeleton-item.js');
129
129
  var space = require('./space/src/space.js');
130
130
  var useSpace = require('./space/src/use-space.js');
@@ -4,11 +4,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var withInstall = require('../../utils/with-install.js');
6
6
  require('./src/radio2.js');
7
- require('./src/radio-button.js');
7
+ require('./src/radio-button2.js');
8
8
  require('./src/radio-group2.js');
9
9
  var radio = require('./src/radio.js');
10
10
  var radioGroup = require('./src/radio-group.js');
11
- var radioButton = require('./src/radio-button2.js');
11
+ var radioButton = require('./src/radio-button.js');
12
12
  var radio_vue_vue_type_script_lang = require('./src/radio.vue_vue_type_script_lang.js');
13
13
  var radioButton_vue_vue_type_script_lang = require('./src/radio-button.vue_vue_type_script_lang.js');
14
14
  var radioGroup_vue_vue_type_script_lang = require('./src/radio-group.vue_vue_type_script_lang.js');
@@ -2,11 +2,16 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var radioButton_vue_vue_type_script_lang = require('./radio-button.vue_vue_type_script_lang.js');
6
- var radioButton_vue_vue_type_template_id_14e266b0_lang = require('./radio-button.vue_vue_type_template_id_14e266b0_lang.js');
5
+ var props = require('../../../utils/props.js');
6
+ var radio = require('./radio.js');
7
7
 
8
- radioButton_vue_vue_type_script_lang["default"].render = radioButton_vue_vue_type_template_id_14e266b0_lang.render;
9
- radioButton_vue_vue_type_script_lang["default"].__file = "packages/components/radio/src/radio-button.vue";
8
+ const radioButtonProps = props.buildProps({
9
+ ...radio.radioPropsBase,
10
+ name: {
11
+ type: String,
12
+ default: ""
13
+ }
14
+ });
10
15
 
11
- exports["default"] = radioButton_vue_vue_type_script_lang["default"];
16
+ exports.radioButtonProps = radioButtonProps;
12
17
  //# sourceMappingURL=radio-button.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"radio-button.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
1
+ {"version":3,"file":"radio-button.js","sources":["../../../../../../packages/components/radio/src/radio-button.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils/props'\nimport { radioPropsBase } from './radio'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const radioButtonProps = buildProps({\n ...radioPropsBase,\n name: {\n type: String,\n default: '',\n },\n} as const)\n\nexport type RadioButtonProps = ExtractPropTypes<typeof radioButtonProps>\n"],"names":["buildProps","radioPropsBase"],"mappings":";;;;;;;AAEY,MAAC,gBAAgB,GAAGA,gBAAU,CAAC;AAC3C,EAAE,GAAGC,oBAAc;AACnB,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC;;;;"}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var vue = require('vue');
6
6
  var radio = require('./radio.js');
7
- var radioButton = require('./radio-button2.js');
7
+ var radioButton = require('./radio-button.js');
8
8
 
9
9
  var script = vue.defineComponent({
10
10
  name: "ElRadioButton",
@@ -2,16 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var props = require('../../../utils/props.js');
6
- var radio = require('./radio.js');
5
+ var radioButton_vue_vue_type_script_lang = require('./radio-button.vue_vue_type_script_lang.js');
6
+ var radioButton_vue_vue_type_template_id_14e266b0_lang = require('./radio-button.vue_vue_type_template_id_14e266b0_lang.js');
7
7
 
8
- const radioButtonProps = props.buildProps({
9
- ...radio.radioPropsBase,
10
- name: {
11
- type: String,
12
- default: ""
13
- }
14
- });
8
+ radioButton_vue_vue_type_script_lang["default"].render = radioButton_vue_vue_type_template_id_14e266b0_lang.render;
9
+ radioButton_vue_vue_type_script_lang["default"].__file = "packages/components/radio/src/radio-button.vue";
15
10
 
16
- exports.radioButtonProps = radioButtonProps;
11
+ exports["default"] = radioButton_vue_vue_type_script_lang["default"];
17
12
  //# sourceMappingURL=radio-button2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"radio-button2.js","sources":["../../../../../../packages/components/radio/src/radio-button.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils/props'\nimport { radioPropsBase } from './radio'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const radioButtonProps = buildProps({\n ...radioPropsBase,\n name: {\n type: String,\n default: '',\n },\n} as const)\n\nexport type RadioButtonProps = ExtractPropTypes<typeof radioButtonProps>\n"],"names":["buildProps","radioPropsBase"],"mappings":";;;;;;;AAEY,MAAC,gBAAgB,GAAGA,gBAAU,CAAC;AAC3C,EAAE,GAAGC,oBAAc;AACnB,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"radio-button2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
@@ -3,9 +3,9 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var withInstall = require('../../utils/with-install.js');
6
- require('./src/skeleton.js');
6
+ require('./src/skeleton2.js');
7
7
  require('./src/skeleton-item2.js');
8
- var skeleton = require('./src/skeleton2.js');
8
+ var skeleton = require('./src/skeleton.js');
9
9
  var skeletonItem = require('./src/skeleton-item.js');
10
10
  var skeleton_vue_vue_type_script_lang = require('./src/skeleton.vue_vue_type_script_lang.js');
11
11
  var skeletonItem_vue_vue_type_script_lang = require('./src/skeleton-item.vue_vue_type_script_lang.js');
@@ -2,11 +2,29 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var skeleton_vue_vue_type_script_lang = require('./skeleton.vue_vue_type_script_lang.js');
6
- var skeleton_vue_vue_type_template_id_26fa9225_lang = require('./skeleton.vue_vue_type_template_id_26fa9225_lang.js');
5
+ var props = require('../../../utils/props.js');
7
6
 
8
- skeleton_vue_vue_type_script_lang["default"].render = skeleton_vue_vue_type_template_id_26fa9225_lang.render;
9
- skeleton_vue_vue_type_script_lang["default"].__file = "packages/components/skeleton/src/skeleton.vue";
7
+ const skeletonProps = props.buildProps({
8
+ animated: {
9
+ type: Boolean,
10
+ default: false
11
+ },
12
+ count: {
13
+ type: Number,
14
+ default: 1
15
+ },
16
+ rows: {
17
+ type: Number,
18
+ default: 3
19
+ },
20
+ loading: {
21
+ type: Boolean,
22
+ default: true
23
+ },
24
+ throttle: {
25
+ type: Number
26
+ }
27
+ });
10
28
 
11
- exports["default"] = skeleton_vue_vue_type_script_lang["default"];
29
+ exports.skeletonProps = skeletonProps;
12
30
  //# sourceMappingURL=skeleton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"skeleton.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
1
+ {"version":3,"file":"skeleton.js","sources":["../../../../../../packages/components/skeleton/src/skeleton.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils/props'\nimport type Skeleton from './skeleton.vue'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const skeletonProps = buildProps({\n animated: {\n type: Boolean,\n default: false,\n },\n count: {\n type: Number,\n default: 1,\n },\n rows: {\n type: Number,\n default: 3,\n },\n loading: {\n type: Boolean,\n default: true,\n },\n throttle: {\n type: Number,\n },\n} as const)\nexport type SkeletonProps = ExtractPropTypes<typeof skeletonProps>\n\nexport type SkeletonInstance = InstanceType<typeof Skeleton>\n"],"names":["buildProps"],"mappings":";;;;;;AACY,MAAC,aAAa,GAAGA,gBAAU,CAAC;AACxC,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,GAAG;AACH,CAAC;;;;"}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var vue = require('vue');
6
6
  require('../../../hooks/index.js');
7
7
  require('./skeleton-item2.js');
8
- var skeleton = require('./skeleton2.js');
8
+ var skeleton = require('./skeleton.js');
9
9
  var skeletonItem_vue_vue_type_script_lang = require('./skeleton-item.vue_vue_type_script_lang.js');
10
10
  var index = require('../../../hooks/use-throttle-render/index.js');
11
11
 
@@ -2,29 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var props = require('../../../utils/props.js');
5
+ var skeleton_vue_vue_type_script_lang = require('./skeleton.vue_vue_type_script_lang.js');
6
+ var skeleton_vue_vue_type_template_id_26fa9225_lang = require('./skeleton.vue_vue_type_template_id_26fa9225_lang.js');
6
7
 
7
- const skeletonProps = props.buildProps({
8
- animated: {
9
- type: Boolean,
10
- default: false
11
- },
12
- count: {
13
- type: Number,
14
- default: 1
15
- },
16
- rows: {
17
- type: Number,
18
- default: 3
19
- },
20
- loading: {
21
- type: Boolean,
22
- default: true
23
- },
24
- throttle: {
25
- type: Number
26
- }
27
- });
8
+ skeleton_vue_vue_type_script_lang["default"].render = skeleton_vue_vue_type_template_id_26fa9225_lang.render;
9
+ skeleton_vue_vue_type_script_lang["default"].__file = "packages/components/skeleton/src/skeleton.vue";
28
10
 
29
- exports.skeletonProps = skeletonProps;
11
+ exports["default"] = skeleton_vue_vue_type_script_lang["default"];
30
12
  //# sourceMappingURL=skeleton2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"skeleton2.js","sources":["../../../../../../packages/components/skeleton/src/skeleton.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils/props'\nimport type Skeleton from './skeleton.vue'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const skeletonProps = buildProps({\n animated: {\n type: Boolean,\n default: false,\n },\n count: {\n type: Number,\n default: 1,\n },\n rows: {\n type: Number,\n default: 3,\n },\n loading: {\n type: Boolean,\n default: true,\n },\n throttle: {\n type: Number,\n },\n} as const)\nexport type SkeletonProps = ExtractPropTypes<typeof skeletonProps>\n\nexport type SkeletonInstance = InstanceType<typeof Skeleton>\n"],"names":["buildProps"],"mappings":";;;;;;AACY,MAAC,aAAa,GAAGA,gBAAU,CAAC;AACxC,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,GAAG;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"skeleton2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var vue = require('vue');
6
- var isServer = require('../../utils/isServer.js');
6
+ var core = require('@vueuse/core');
7
7
  var error = require('../../utils/error.js');
8
8
 
9
9
  const defaultIdInjection = {
@@ -13,7 +13,7 @@ const defaultIdInjection = {
13
13
  const ID_INJECTION_KEY = Symbol("elIdInjection");
14
14
  const useId = (deterministicId) => {
15
15
  const idInjection = vue.inject(ID_INJECTION_KEY, defaultIdInjection);
16
- if (isServer["default"] && idInjection === defaultIdInjection) {
16
+ if (!core.isClient && idInjection === defaultIdInjection) {
17
17
  error.debugWarn("IdInjection", `Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
18
18
  usage: app.provide(ID_INJECTION_KEY, {
19
19
  prefix: number,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../packages/hooks/use-id/index.ts"],"sourcesContent":["import { computed, inject, unref } from 'vue'\nimport isServer from '@element-plus/utils/isServer'\nimport { debugWarn } from '@element-plus/utils/error'\n\nimport type { InjectionKey, Ref } from 'vue'\nimport type { MaybeRef } from '@vueuse/core'\n\nexport type ElIdInjectionContext = {\n prefix: number\n current: number\n}\n\nconst defaultIdInjection = {\n prefix: Math.floor(Math.random() * 10000),\n current: 0,\n}\n\nexport const ID_INJECTION_KEY: InjectionKey<ElIdInjectionContext> =\n Symbol('elIdInjection')\n\nexport const useId = (deterministicId?: MaybeRef<string>): Ref<string> => {\n const idInjection = inject(ID_INJECTION_KEY, defaultIdInjection)\n\n if (isServer && idInjection === defaultIdInjection) {\n debugWarn(\n 'IdInjection',\n `Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed\nusage: app.provide(ID_INJECTION_KEY, {\n prefix: number,\n current: number,\n})`\n )\n }\n\n const idRef = computed(\n () =>\n unref(deterministicId) ||\n `el-id-${idInjection.prefix}-${idInjection.current++}`\n )\n\n return idRef\n}\n"],"names":["inject","isServer","debugWarn","computed","unref"],"mappings":";;;;;;;;AAGA,MAAM,kBAAkB,GAAG;AAC3B,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC;AACzC,EAAE,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC;AACU,MAAC,gBAAgB,GAAG,MAAM,CAAC,eAAe,EAAE;AAC5C,MAAC,KAAK,GAAG,CAAC,eAAe,KAAK;AAC1C,EAAE,MAAM,WAAW,GAAGA,UAAM,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,CAAC;AACnE,EAAE,IAAIC,mBAAQ,IAAI,WAAW,KAAK,kBAAkB,EAAE;AACtD,IAAIC,eAAS,CAAC,aAAa,EAAE,CAAC;AAC9B;AACA;AACA;AACA,EAAE,CAAC,CAAC,CAAC;AACL,GAAG;AACH,EAAE,MAAM,KAAK,GAAGC,YAAQ,CAAC,MAAMC,SAAK,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,EAAE,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;AACjH,EAAE,OAAO,KAAK,CAAC;AACf;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../packages/hooks/use-id/index.ts"],"sourcesContent":["import { computed, inject, unref } from 'vue'\nimport { isClient } from '@vueuse/core'\nimport { debugWarn } from '@element-plus/utils/error'\n\nimport type { InjectionKey, Ref } from 'vue'\nimport type { MaybeRef } from '@vueuse/core'\n\nexport type ElIdInjectionContext = {\n prefix: number\n current: number\n}\n\nconst defaultIdInjection = {\n prefix: Math.floor(Math.random() * 10000),\n current: 0,\n}\n\nexport const ID_INJECTION_KEY: InjectionKey<ElIdInjectionContext> =\n Symbol('elIdInjection')\n\nexport const useId = (deterministicId?: MaybeRef<string>): Ref<string> => {\n const idInjection = inject(ID_INJECTION_KEY, defaultIdInjection)\n\n if (!isClient && idInjection === defaultIdInjection) {\n debugWarn(\n 'IdInjection',\n `Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed\nusage: app.provide(ID_INJECTION_KEY, {\n prefix: number,\n current: number,\n})`\n )\n }\n\n const idRef = computed(\n () =>\n unref(deterministicId) ||\n `el-id-${idInjection.prefix}-${idInjection.current++}`\n )\n\n return idRef\n}\n"],"names":["inject","isClient","debugWarn","computed","unref"],"mappings":";;;;;;;;AAGA,MAAM,kBAAkB,GAAG;AAC3B,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC;AACzC,EAAE,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC;AACU,MAAC,gBAAgB,GAAG,MAAM,CAAC,eAAe,EAAE;AAC5C,MAAC,KAAK,GAAG,CAAC,eAAe,KAAK;AAC1C,EAAE,MAAM,WAAW,GAAGA,UAAM,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,CAAC;AACnE,EAAE,IAAI,CAACC,aAAQ,IAAI,WAAW,KAAK,kBAAkB,EAAE;AACvD,IAAIC,eAAS,CAAC,aAAa,EAAE,CAAC;AAC9B;AACA;AACA;AACA,EAAE,CAAC,CAAC,CAAC;AACL,GAAG;AACH,EAAE,MAAM,KAAK,GAAGC,YAAQ,CAAC,MAAMC,SAAK,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,EAAE,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;AACjH,EAAE,OAAO,KAAK,CAAC;AACf;;;;;"}
@@ -3,15 +3,15 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var vue = require('vue');
6
+ var core = require('@vueuse/core');
6
7
  var util = require('../../utils/util.js');
7
- var isServer = require('../../utils/isServer.js');
8
8
 
9
9
  let cachedContainer;
10
10
  const POPPER_CONTAINER_ID = `el-popper-container-${util.generateId()}`;
11
11
  const POPPER_CONTAINER_SELECTOR = `#${POPPER_CONTAINER_ID}`;
12
12
  const usePopperContainer = () => {
13
13
  vue.onBeforeMount(() => {
14
- if (isServer["default"])
14
+ if (!core.isClient)
15
15
  return;
16
16
  if (process.env.NODE_ENV === "test" || !cachedContainer) {
17
17
  const container = document.createElement("div");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../packages/hooks/use-popper-container/index.ts"],"sourcesContent":["import { onBeforeMount } from 'vue'\nimport { generateId } from '@element-plus/utils/util'\nimport isServer from '@element-plus/utils/isServer'\n\nlet cachedContainer: HTMLElement\n\nexport const POPPER_CONTAINER_ID = `el-popper-container-${generateId()}`\n\nexport const POPPER_CONTAINER_SELECTOR = `#${POPPER_CONTAINER_ID}`\n\nexport const usePopperContainer = () => {\n onBeforeMount(() => {\n if (isServer) return\n\n // This is for bypassing the error that when under testing env, we often encounter\n // document.body.innerHTML = '' situation\n // for this we need to disable the caching since it's not really needed\n if (process.env.NODE_ENV === 'test' || !cachedContainer) {\n const container = document.createElement('div')\n container.id = POPPER_CONTAINER_ID\n document.body.appendChild(container)\n cachedContainer = container\n }\n })\n}\n"],"names":["generateId","onBeforeMount","isServer"],"mappings":";;;;;;;;AAGA,IAAI,eAAe,CAAC;AACR,MAAC,mBAAmB,GAAG,CAAC,oBAAoB,EAAEA,eAAU,EAAE,CAAC,EAAE;AAC7D,MAAC,yBAAyB,GAAG,CAAC,CAAC,EAAE,mBAAmB,CAAC,EAAE;AACvD,MAAC,kBAAkB,GAAG,MAAM;AACxC,EAAEC,iBAAa,CAAC,MAAM;AACtB,IAAI,IAAIC,mBAAQ;AAChB,MAAM,OAAO;AACb,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,IAAI,CAAC,eAAe,EAAE;AAC7D,MAAM,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;AACtD,MAAM,SAAS,CAAC,EAAE,GAAG,mBAAmB,CAAC;AACzC,MAAM,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;AAC3C,MAAM,eAAe,GAAG,SAAS,CAAC;AAClC,KAAK;AACL,GAAG,CAAC,CAAC;AACL;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../packages/hooks/use-popper-container/index.ts"],"sourcesContent":["import { onBeforeMount } from 'vue'\nimport { isClient } from '@vueuse/core'\nimport { generateId } from '@element-plus/utils/util'\n\nlet cachedContainer: HTMLElement\n\nexport const POPPER_CONTAINER_ID = `el-popper-container-${generateId()}`\n\nexport const POPPER_CONTAINER_SELECTOR = `#${POPPER_CONTAINER_ID}`\n\nexport const usePopperContainer = () => {\n onBeforeMount(() => {\n if (!isClient) return\n\n // This is for bypassing the error that when under testing env, we often encounter\n // document.body.innerHTML = '' situation\n // for this we need to disable the caching since it's not really needed\n if (process.env.NODE_ENV === 'test' || !cachedContainer) {\n const container = document.createElement('div')\n container.id = POPPER_CONTAINER_ID\n document.body.appendChild(container)\n cachedContainer = container\n }\n })\n}\n"],"names":["generateId","onBeforeMount","isClient"],"mappings":";;;;;;;;AAGA,IAAI,eAAe,CAAC;AACR,MAAC,mBAAmB,GAAG,CAAC,oBAAoB,EAAEA,eAAU,EAAE,CAAC,EAAE;AAC7D,MAAC,yBAAyB,GAAG,CAAC,CAAC,EAAE,mBAAmB,CAAC,EAAE;AACvD,MAAC,kBAAkB,GAAG,MAAM;AACxC,EAAEC,iBAAa,CAAC,MAAM;AACtB,IAAI,IAAI,CAACC,aAAQ;AACjB,MAAM,OAAO;AACb,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,IAAI,CAAC,eAAe,EAAE;AAC7D,MAAM,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;AACtD,MAAM,SAAS,CAAC,EAAE,GAAG,mBAAmB,CAAC;AACzC,MAAM,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;AAC3C,MAAM,eAAe,GAAG,SAAS,CAAC;AAClC,KAAK;AACL,GAAG,CAAC,CAAC;AACL;;;;;;"}