vant 4.0.0-rc.6 → 4.0.0-rc.7

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 (81) hide show
  1. package/es/action-sheet/index.css +1 -1
  2. package/es/composables/use-sync-prop-ref.d.ts +2 -0
  3. package/es/composables/use-sync-prop-ref.mjs +18 -0
  4. package/es/date-picker/DatePicker.mjs +4 -1
  5. package/es/image-preview/ImagePreview.d.ts +2 -1
  6. package/es/image-preview/ImagePreview.mjs +6 -3
  7. package/es/image-preview/ImagePreviewItem.d.ts +2 -1
  8. package/es/image-preview/ImagePreviewItem.mjs +15 -11
  9. package/es/image-preview/index.d.ts +2 -1
  10. package/es/index.d.ts +1 -1
  11. package/es/index.mjs +1 -1
  12. package/es/lazyload/vue-lazyload/lazy-image.mjs +5 -5
  13. package/es/picker/Picker.mjs +4 -2
  14. package/es/picker/PickerColumn.mjs +5 -4
  15. package/es/popover/Popover.mjs +13 -8
  16. package/es/skeleton/Skeleton.d.ts +23 -23
  17. package/es/skeleton/Skeleton.mjs +28 -23
  18. package/es/skeleton/SkeletonAvatar.d.ts +26 -0
  19. package/es/skeleton/SkeletonAvatar.mjs +22 -0
  20. package/es/skeleton/SkeletonImage.d.ts +26 -0
  21. package/es/skeleton/SkeletonImage.mjs +26 -0
  22. package/es/skeleton/SkeletonParagraph.d.ts +27 -0
  23. package/es/skeleton/SkeletonParagraph.mjs +31 -0
  24. package/es/skeleton/SkeletonTitle.d.ts +16 -0
  25. package/es/skeleton/SkeletonTitle.mjs +26 -0
  26. package/es/skeleton/index.css +1 -1
  27. package/es/skeleton/index.d.ts +85 -18
  28. package/es/skeleton/index.mjs +22 -2
  29. package/es/skeleton/style/index.mjs +2 -0
  30. package/es/skeleton/types.d.ts +7 -3
  31. package/es/stepper/Stepper.d.ts +1 -1
  32. package/es/stepper/Stepper.mjs +1 -2
  33. package/es/stepper/index.d.ts +1 -1
  34. package/es/time-picker/TimePicker.mjs +4 -1
  35. package/es/uploader/Uploader.mjs +4 -4
  36. package/es/utils/constant.d.ts +1 -0
  37. package/es/utils/constant.mjs +3 -1
  38. package/lib/action-sheet/index.css +1 -1
  39. package/lib/composables/use-sync-prop-ref.d.ts +2 -0
  40. package/lib/composables/use-sync-prop-ref.js +37 -0
  41. package/lib/date-picker/DatePicker.js +4 -1
  42. package/lib/image-preview/ImagePreview.d.ts +2 -1
  43. package/lib/image-preview/ImagePreview.js +6 -3
  44. package/lib/image-preview/ImagePreviewItem.d.ts +2 -1
  45. package/lib/image-preview/ImagePreviewItem.js +14 -10
  46. package/lib/image-preview/index.d.ts +2 -1
  47. package/lib/index.css +1 -1
  48. package/lib/index.d.ts +1 -1
  49. package/lib/index.js +1 -1
  50. package/lib/lazyload/vue-lazyload/lazy-image.js +6 -6
  51. package/lib/picker/Picker.js +3 -1
  52. package/lib/picker/PickerColumn.js +5 -4
  53. package/lib/popover/Popover.js +13 -8
  54. package/lib/skeleton/Skeleton.d.ts +23 -23
  55. package/lib/skeleton/Skeleton.js +34 -23
  56. package/lib/skeleton/SkeletonAvatar.d.ts +26 -0
  57. package/lib/skeleton/SkeletonAvatar.js +41 -0
  58. package/lib/skeleton/SkeletonImage.d.ts +26 -0
  59. package/lib/skeleton/SkeletonImage.js +45 -0
  60. package/lib/skeleton/SkeletonParagraph.d.ts +27 -0
  61. package/lib/skeleton/SkeletonParagraph.js +50 -0
  62. package/lib/skeleton/SkeletonTitle.d.ts +16 -0
  63. package/lib/skeleton/SkeletonTitle.js +45 -0
  64. package/lib/skeleton/index.css +1 -1
  65. package/lib/skeleton/index.d.ts +85 -18
  66. package/lib/skeleton/index.js +22 -2
  67. package/lib/skeleton/style/index.js +2 -0
  68. package/lib/skeleton/types.d.ts +7 -3
  69. package/lib/stepper/Stepper.d.ts +1 -1
  70. package/lib/stepper/Stepper.js +1 -2
  71. package/lib/stepper/index.d.ts +1 -1
  72. package/lib/time-picker/TimePicker.js +4 -1
  73. package/lib/uploader/Uploader.js +3 -3
  74. package/lib/utils/constant.d.ts +1 -0
  75. package/lib/utils/constant.js +3 -1
  76. package/lib/vant.cjs.js +900 -778
  77. package/lib/vant.es.js +900 -778
  78. package/lib/vant.js +894 -778
  79. package/lib/vant.min.js +1 -1
  80. package/lib/web-types.json +1 -12164
  81. package/package.json +1 -1
package/lib/index.d.ts CHANGED
@@ -93,4 +93,4 @@ declare namespace _default {
93
93
  }
94
94
  export default _default;
95
95
  export function install(app: any): void;
96
- export const version: "4.0.0-rc.6";
96
+ export const version: "4.0.0-rc.7";
package/lib/index.js CHANGED
@@ -200,7 +200,7 @@ __reExport(stdin_exports, require("./time-picker"), module.exports);
200
200
  __reExport(stdin_exports, require("./toast"), module.exports);
201
201
  __reExport(stdin_exports, require("./tree-select"), module.exports);
202
202
  __reExport(stdin_exports, require("./uploader"), module.exports);
203
- const version = "4.0.0-rc.6";
203
+ const version = "4.0.0-rc.7";
204
204
  function install(app) {
205
205
  const components = [
206
206
  import_action_bar.ActionBar,
@@ -23,6 +23,7 @@ module.exports = __toCommonJS(stdin_exports);
23
23
  var import_use = require("@vant/use");
24
24
  var import_util = require("./util");
25
25
  var import_utils = require("../../utils");
26
+ var import_vue = require("vue");
26
27
  var stdin_default = (lazyManager) => ({
27
28
  props: {
28
29
  src: [String, Object],
@@ -31,15 +32,14 @@ var stdin_default = (lazyManager) => ({
31
32
  default: "img"
32
33
  }
33
34
  },
34
- render(h) {
35
- return h(
35
+ render() {
36
+ var _a, _b;
37
+ return (0, import_vue.h)(
36
38
  this.tag,
37
39
  {
38
- attrs: {
39
- src: this.renderSrc
40
- }
40
+ src: this.renderSrc
41
41
  },
42
- this.$slots.default
42
+ (_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a)
43
43
  );
44
44
  },
45
45
  data() {
@@ -121,7 +121,9 @@ var stdin_default = (0, import_vue2.defineComponent)({
121
121
  const confirm = () => {
122
122
  children.forEach((child) => child.stopMomentum());
123
123
  const params = getEventParams();
124
- emit("confirm", params);
124
+ (0, import_vue2.nextTick)(() => {
125
+ emit("confirm", params);
126
+ });
125
127
  return params;
126
128
  };
127
129
  const cancel = () => emit("cancel", getEventParams());
@@ -78,8 +78,9 @@ var stdin_default = (0, import_vue2.defineComponent)({
78
78
  }
79
79
  currentOffset.value = offset;
80
80
  };
81
+ const isReadonly = () => props.readonly || !props.options.length;
81
82
  const onClickOption = (index) => {
82
- if (moving || props.readonly) {
83
+ if (moving || isReadonly()) {
83
84
  return;
84
85
  }
85
86
  transitionEndTrigger = null;
@@ -104,7 +105,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
104
105
  }
105
106
  };
106
107
  const onTouchStart = (event) => {
107
- if (props.readonly) {
108
+ if (isReadonly()) {
108
109
  return;
109
110
  }
110
111
  touch.start(event);
@@ -119,7 +120,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
119
120
  transitionEndTrigger = null;
120
121
  };
121
122
  const onTouchMove = (event) => {
122
- if (props.readonly) {
123
+ if (isReadonly()) {
123
124
  return;
124
125
  }
125
126
  touch.move(event);
@@ -135,7 +136,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
135
136
  }
136
137
  };
137
138
  const onTouchEnd = () => {
138
- if (props.readonly) {
139
+ if (isReadonly()) {
139
140
  return;
140
141
  }
141
142
  const distance = currentOffset.value - momentumOffset;
@@ -26,10 +26,11 @@ var import_vue2 = require("vue");
26
26
  var import_popperjs = require("@vant/popperjs");
27
27
  var import_utils = require("../utils");
28
28
  var import_use = require("@vant/use");
29
+ var import_use_sync_prop_ref = require("../composables/use-sync-prop-ref");
29
30
  var import_icon = require("../icon");
30
31
  var import_popup = require("../popup");
31
32
  const [name, bem] = (0, import_utils.createNamespace)("popover");
32
- const popupProps = ["show", "overlay", "duration", "teleport", "overlayStyle", "overlayClass", "closeOnClickOverlay"];
33
+ const popupProps = ["overlay", "duration", "teleport", "overlayStyle", "overlayClass", "closeOnClickOverlay"];
33
34
  const popoverProps = {
34
35
  show: Boolean,
35
36
  theme: (0, import_utils.makeStringProp)("light"),
@@ -67,6 +68,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
67
68
  const popupRef = (0, import_vue2.ref)();
68
69
  const wrapperRef = (0, import_vue2.ref)();
69
70
  const popoverRef = (0, import_vue2.ref)();
71
+ const show = (0, import_use_sync_prop_ref.useSyncPropRef)(() => props.show, (value) => emit("update:show", value));
70
72
  const getPopoverOptions = () => ({
71
73
  placement: props.placement,
72
74
  modifiers: [{
@@ -89,7 +91,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
89
91
  };
90
92
  const updateLocation = () => {
91
93
  (0, import_vue2.nextTick)(() => {
92
- if (!props.show) {
94
+ if (!show.value) {
93
95
  return;
94
96
  }
95
97
  if (!popper) {
@@ -99,10 +101,12 @@ var stdin_default = (0, import_vue2.defineComponent)({
99
101
  }
100
102
  });
101
103
  };
102
- const updateShow = (value) => emit("update:show", value);
104
+ const updateShow = (value) => {
105
+ show.value = value;
106
+ };
103
107
  const onClickWrapper = () => {
104
108
  if (props.trigger === "click") {
105
- updateShow(!props.show);
109
+ show.value = !show.value;
106
110
  }
107
111
  };
108
112
  const onClickAction = (action, index) => {
@@ -111,12 +115,12 @@ var stdin_default = (0, import_vue2.defineComponent)({
111
115
  }
112
116
  emit("select", action, index);
113
117
  if (props.closeOnClickAction) {
114
- updateShow(false);
118
+ show.value = false;
115
119
  }
116
120
  };
117
121
  const onClickAway = () => {
118
- if (props.show && props.closeOnClickOutside && (!props.overlay || props.closeOnClickOverlay)) {
119
- updateShow(false);
122
+ if (show.value && props.closeOnClickOutside && (!props.overlay || props.closeOnClickOverlay)) {
123
+ show.value = false;
120
124
  }
121
125
  };
122
126
  const renderActionContent = (action, index) => {
@@ -168,7 +172,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
168
172
  popper = null;
169
173
  }
170
174
  });
171
- (0, import_vue2.watch)(() => [props.show, props.offset, props.placement], updateLocation);
175
+ (0, import_vue2.watch)(() => [show.value, props.offset, props.placement], updateLocation);
172
176
  (0, import_use.useClickAway)([wrapperRef, popupRef], onClickAway, {
173
177
  eventName: "touchstart"
174
178
  });
@@ -180,6 +184,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
180
184
  "onClick": onClickWrapper
181
185
  }, [(_a = slots.reference) == null ? void 0 : _a.call(slots)]), (0, import_vue.createVNode)(import_popup.Popup, (0, import_vue.mergeProps)({
182
186
  "ref": popoverRef,
187
+ "show": show.value,
183
188
  "class": bem([props.theme]),
184
189
  "position": "",
185
190
  "transition": "van-popover-zoom",
@@ -1,14 +1,20 @@
1
1
  import { type PropType, type ExtractPropTypes } from 'vue';
2
2
  import { type Numeric } from '../utils';
3
- export declare type SkeletonAvatarShape = 'square' | 'round';
3
+ import type { SkeletonAvatarShape } from './types';
4
4
  export declare const skeletonProps: {
5
5
  row: {
6
6
  type: (NumberConstructor | StringConstructor)[];
7
7
  default: number;
8
8
  };
9
- title: BooleanConstructor;
10
9
  round: BooleanConstructor;
10
+ title: BooleanConstructor;
11
+ titleWidth: (NumberConstructor | StringConstructor)[];
11
12
  avatar: BooleanConstructor;
13
+ avatarSize: (NumberConstructor | StringConstructor)[];
14
+ avatarShape: {
15
+ type: PropType<SkeletonAvatarShape>;
16
+ default: SkeletonAvatarShape;
17
+ };
12
18
  loading: {
13
19
  type: BooleanConstructor;
14
20
  default: true;
@@ -17,12 +23,6 @@ export declare const skeletonProps: {
17
23
  type: BooleanConstructor;
18
24
  default: true;
19
25
  };
20
- avatarSize: (NumberConstructor | StringConstructor)[];
21
- titleWidth: (NumberConstructor | StringConstructor)[];
22
- avatarShape: {
23
- type: PropType<SkeletonAvatarShape>;
24
- default: SkeletonAvatarShape;
25
- };
26
26
  rowWidth: {
27
27
  type: PropType<Numeric | Numeric[]>;
28
28
  default: string;
@@ -34,9 +34,15 @@ declare const _default: import("vue").DefineComponent<{
34
34
  type: (NumberConstructor | StringConstructor)[];
35
35
  default: number;
36
36
  };
37
- title: BooleanConstructor;
38
37
  round: BooleanConstructor;
38
+ title: BooleanConstructor;
39
+ titleWidth: (NumberConstructor | StringConstructor)[];
39
40
  avatar: BooleanConstructor;
41
+ avatarSize: (NumberConstructor | StringConstructor)[];
42
+ avatarShape: {
43
+ type: PropType<SkeletonAvatarShape>;
44
+ default: SkeletonAvatarShape;
45
+ };
40
46
  loading: {
41
47
  type: BooleanConstructor;
42
48
  default: true;
@@ -45,12 +51,6 @@ declare const _default: import("vue").DefineComponent<{
45
51
  type: BooleanConstructor;
46
52
  default: true;
47
53
  };
48
- avatarSize: (NumberConstructor | StringConstructor)[];
49
- titleWidth: (NumberConstructor | StringConstructor)[];
50
- avatarShape: {
51
- type: PropType<SkeletonAvatarShape>;
52
- default: SkeletonAvatarShape;
53
- };
54
54
  rowWidth: {
55
55
  type: PropType<Numeric | Numeric[]>;
56
56
  default: string;
@@ -62,9 +62,15 @@ declare const _default: import("vue").DefineComponent<{
62
62
  type: (NumberConstructor | StringConstructor)[];
63
63
  default: number;
64
64
  };
65
- title: BooleanConstructor;
66
65
  round: BooleanConstructor;
66
+ title: BooleanConstructor;
67
+ titleWidth: (NumberConstructor | StringConstructor)[];
67
68
  avatar: BooleanConstructor;
69
+ avatarSize: (NumberConstructor | StringConstructor)[];
70
+ avatarShape: {
71
+ type: PropType<SkeletonAvatarShape>;
72
+ default: SkeletonAvatarShape;
73
+ };
68
74
  loading: {
69
75
  type: BooleanConstructor;
70
76
  default: true;
@@ -73,12 +79,6 @@ declare const _default: import("vue").DefineComponent<{
73
79
  type: BooleanConstructor;
74
80
  default: true;
75
81
  };
76
- avatarSize: (NumberConstructor | StringConstructor)[];
77
- titleWidth: (NumberConstructor | StringConstructor)[];
78
- avatarShape: {
79
- type: PropType<SkeletonAvatarShape>;
80
- default: SkeletonAvatarShape;
81
- };
82
82
  rowWidth: {
83
83
  type: PropType<Numeric | Numeric[]>;
84
84
  default: string;
@@ -89,8 +89,8 @@ declare const _default: import("vue").DefineComponent<{
89
89
  round: boolean;
90
90
  loading: boolean;
91
91
  row: string | number;
92
- avatar: boolean;
93
92
  avatarShape: SkeletonAvatarShape;
94
93
  rowWidth: Numeric | Numeric[];
94
+ avatar: boolean;
95
95
  }>;
96
96
  export default _default;
@@ -1,6 +1,8 @@
1
+ var __create = Object.create;
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
4
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
7
  var __export = (target, all) => {
6
8
  for (var name2 in all)
@@ -14,6 +16,10 @@ var __copyProps = (to, from, except, desc) => {
14
16
  }
15
17
  return to;
16
18
  };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
+ mod
22
+ ));
17
23
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
24
  var stdin_exports = {};
19
25
  __export(stdin_exports, {
@@ -24,22 +30,24 @@ module.exports = __toCommonJS(stdin_exports);
24
30
  var import_vue = require("vue");
25
31
  var import_vue2 = require("vue");
26
32
  var import_utils = require("../utils");
33
+ var import_SkeletonTitle = __toESM(require("./SkeletonTitle"));
34
+ var import_SkeletonAvatar = __toESM(require("./SkeletonAvatar"));
35
+ var import_SkeletonParagraph = __toESM(require("./SkeletonParagraph"));
27
36
  const [name, bem] = (0, import_utils.createNamespace)("skeleton");
28
- const DEFAULT_ROW_WIDTH = "100%";
29
37
  const DEFAULT_LAST_ROW_WIDTH = "60%";
30
38
  const skeletonProps = {
31
39
  row: (0, import_utils.makeNumericProp)(0),
32
- title: Boolean,
33
40
  round: Boolean,
41
+ title: Boolean,
42
+ titleWidth: import_utils.numericProp,
34
43
  avatar: Boolean,
35
- loading: import_utils.truthProp,
36
- animate: import_utils.truthProp,
37
44
  avatarSize: import_utils.numericProp,
38
- titleWidth: import_utils.numericProp,
39
45
  avatarShape: (0, import_utils.makeStringProp)("round"),
46
+ loading: import_utils.truthProp,
47
+ animate: import_utils.truthProp,
40
48
  rowWidth: {
41
49
  type: [Number, String, Array],
42
- default: DEFAULT_ROW_WIDTH
50
+ default: import_SkeletonParagraph.DEFAULT_ROW_WIDTH
43
51
  }
44
52
  };
45
53
  var stdin_default = (0, import_vue2.defineComponent)({
@@ -52,19 +60,17 @@ var stdin_default = (0, import_vue2.defineComponent)({
52
60
  }) {
53
61
  const renderAvatar = () => {
54
62
  if (props.avatar) {
55
- return (0, import_vue.createVNode)("div", {
56
- "class": bem("avatar", props.avatarShape),
57
- "style": (0, import_utils.getSizeStyle)(props.avatarSize)
63
+ return (0, import_vue.createVNode)(import_SkeletonAvatar.default, {
64
+ "avatarShape": props.avatarShape,
65
+ "avatarSize": props.avatarSize
58
66
  }, null);
59
67
  }
60
68
  };
61
69
  const renderTitle = () => {
62
70
  if (props.title) {
63
- return (0, import_vue.createVNode)("h3", {
64
- "class": bem("title"),
65
- "style": {
66
- width: (0, import_utils.addUnit)(props.titleWidth)
67
- }
71
+ return (0, import_vue.createVNode)(import_SkeletonTitle.default, {
72
+ "round": props.round,
73
+ "titleWidth": props.titleWidth
68
74
  }, null);
69
75
  }
70
76
  };
@@ -72,7 +78,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
72
78
  const {
73
79
  rowWidth
74
80
  } = props;
75
- if (rowWidth === DEFAULT_ROW_WIDTH && index === +props.row - 1) {
81
+ if (rowWidth === import_SkeletonParagraph.DEFAULT_ROW_WIDTH && index === +props.row - 1) {
76
82
  return DEFAULT_LAST_ROW_WIDTH;
77
83
  }
78
84
  if (Array.isArray(rowWidth)) {
@@ -80,12 +86,19 @@ var stdin_default = (0, import_vue2.defineComponent)({
80
86
  }
81
87
  return rowWidth;
82
88
  };
83
- const renderRows = () => Array(+props.row).fill("").map((_, i) => (0, import_vue.createVNode)("div", {
84
- "class": bem("row"),
85
- "style": {
86
- width: (0, import_utils.addUnit)(getRowWidth(i))
87
- }
89
+ const renderRows = () => Array(+props.row).fill("").map((_, i) => (0, import_vue.createVNode)(import_SkeletonParagraph.default, {
90
+ "key": i,
91
+ "round": props.round,
92
+ "rowWidth": (0, import_utils.addUnit)(getRowWidth(i))
88
93
  }, null));
94
+ const renderContents = () => {
95
+ if (slots.template) {
96
+ return slots.template();
97
+ }
98
+ return (0, import_vue.createVNode)(import_vue.Fragment, null, [renderAvatar(), (0, import_vue.createVNode)("div", {
99
+ "class": bem("content")
100
+ }, [renderTitle(), renderRows()])]);
101
+ };
89
102
  return () => {
90
103
  var _a;
91
104
  if (!props.loading) {
@@ -96,9 +109,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
96
109
  animate: props.animate,
97
110
  round: props.round
98
111
  })
99
- }, attrs), [renderAvatar(), (0, import_vue.createVNode)("div", {
100
- "class": bem("content")
101
- }, [renderTitle(), renderRows()])]);
112
+ }, attrs), [renderContents()]);
102
113
  };
103
114
  }
104
115
  });
@@ -0,0 +1,26 @@
1
+ import { ExtractPropTypes } from 'vue';
2
+ import type { SkeletonAvatarShape } from './types';
3
+ export declare const skeletonAvatarProps: {
4
+ avatarSize: (NumberConstructor | StringConstructor)[];
5
+ avatarShape: {
6
+ type: import("vue").PropType<SkeletonAvatarShape>;
7
+ default: SkeletonAvatarShape;
8
+ };
9
+ };
10
+ export declare type SkeletonAvatarProps = ExtractPropTypes<typeof skeletonAvatarProps>;
11
+ declare const _default: import("vue").DefineComponent<{
12
+ avatarSize: (NumberConstructor | StringConstructor)[];
13
+ avatarShape: {
14
+ type: import("vue").PropType<SkeletonAvatarShape>;
15
+ default: SkeletonAvatarShape;
16
+ };
17
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
18
+ avatarSize: (NumberConstructor | StringConstructor)[];
19
+ avatarShape: {
20
+ type: import("vue").PropType<SkeletonAvatarShape>;
21
+ default: SkeletonAvatarShape;
22
+ };
23
+ }>>, {
24
+ avatarShape: SkeletonAvatarShape;
25
+ }>;
26
+ export default _default;
@@ -0,0 +1,41 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name2 in all)
7
+ __defProp(target, name2, { get: all[name2], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var stdin_exports = {};
19
+ __export(stdin_exports, {
20
+ default: () => stdin_default,
21
+ skeletonAvatarProps: () => skeletonAvatarProps
22
+ });
23
+ module.exports = __toCommonJS(stdin_exports);
24
+ var import_vue = require("vue");
25
+ var import_vue2 = require("vue");
26
+ var import_utils = require("../utils");
27
+ const [name, bem] = (0, import_utils.createNamespace)("skeleton-avatar");
28
+ const skeletonAvatarProps = {
29
+ avatarSize: import_utils.numericProp,
30
+ avatarShape: (0, import_utils.makeStringProp)("round")
31
+ };
32
+ var stdin_default = (0, import_vue2.defineComponent)({
33
+ name,
34
+ props: skeletonAvatarProps,
35
+ setup(props) {
36
+ return () => (0, import_vue.createVNode)("div", {
37
+ "class": bem([props.avatarShape]),
38
+ "style": (0, import_utils.getSizeStyle)(props.avatarSize)
39
+ }, null);
40
+ }
41
+ });
@@ -0,0 +1,26 @@
1
+ import { type ExtractPropTypes } from 'vue';
2
+ import type { SkeletonImageShape } from './types';
3
+ export declare const skeletonImageProps: {
4
+ imageSize: (NumberConstructor | StringConstructor)[];
5
+ imageShape: {
6
+ type: import("vue").PropType<SkeletonImageShape>;
7
+ default: SkeletonImageShape;
8
+ };
9
+ };
10
+ export declare type SkeletonImageProps = ExtractPropTypes<typeof skeletonImageProps>;
11
+ declare const _default: import("vue").DefineComponent<{
12
+ imageSize: (NumberConstructor | StringConstructor)[];
13
+ imageShape: {
14
+ type: import("vue").PropType<SkeletonImageShape>;
15
+ default: SkeletonImageShape;
16
+ };
17
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
18
+ imageSize: (NumberConstructor | StringConstructor)[];
19
+ imageShape: {
20
+ type: import("vue").PropType<SkeletonImageShape>;
21
+ default: SkeletonImageShape;
22
+ };
23
+ }>>, {
24
+ imageShape: SkeletonImageShape;
25
+ }>;
26
+ export default _default;
@@ -0,0 +1,45 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name2 in all)
7
+ __defProp(target, name2, { get: all[name2], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var stdin_exports = {};
19
+ __export(stdin_exports, {
20
+ default: () => stdin_default,
21
+ skeletonImageProps: () => skeletonImageProps
22
+ });
23
+ module.exports = __toCommonJS(stdin_exports);
24
+ var import_vue = require("vue");
25
+ var import_vue2 = require("vue");
26
+ var import_utils = require("../utils");
27
+ var import_icon = require("../icon");
28
+ const [name, bem] = (0, import_utils.createNamespace)("skeleton-image");
29
+ const skeletonImageProps = {
30
+ imageSize: import_utils.numericProp,
31
+ imageShape: (0, import_utils.makeStringProp)("square")
32
+ };
33
+ var stdin_default = (0, import_vue2.defineComponent)({
34
+ name,
35
+ props: skeletonImageProps,
36
+ setup(props) {
37
+ return () => (0, import_vue.createVNode)("div", {
38
+ "class": bem([props.imageShape]),
39
+ "style": (0, import_utils.getSizeStyle)(props.imageSize)
40
+ }, [(0, import_vue.createVNode)(import_icon.Icon, {
41
+ "name": "photo",
42
+ "class": bem("icon")
43
+ }, null)]);
44
+ }
45
+ });
@@ -0,0 +1,27 @@
1
+ import { ExtractPropTypes } from 'vue';
2
+ export declare const DEFAULT_ROW_WIDTH = "100%";
3
+ export declare const skeletonParagraphProps: {
4
+ round: BooleanConstructor;
5
+ rowWidth: {
6
+ type: (NumberConstructor | StringConstructor)[];
7
+ default: string;
8
+ };
9
+ };
10
+ export declare type SkeletonParagraphProps = ExtractPropTypes<typeof skeletonParagraphProps>;
11
+ declare const _default: import("vue").DefineComponent<{
12
+ round: BooleanConstructor;
13
+ rowWidth: {
14
+ type: (NumberConstructor | StringConstructor)[];
15
+ default: string;
16
+ };
17
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
18
+ round: BooleanConstructor;
19
+ rowWidth: {
20
+ type: (NumberConstructor | StringConstructor)[];
21
+ default: string;
22
+ };
23
+ }>>, {
24
+ round: boolean;
25
+ rowWidth: string | number;
26
+ }>;
27
+ export default _default;
@@ -0,0 +1,50 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name2 in all)
7
+ __defProp(target, name2, { get: all[name2], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var stdin_exports = {};
19
+ __export(stdin_exports, {
20
+ DEFAULT_ROW_WIDTH: () => DEFAULT_ROW_WIDTH,
21
+ default: () => stdin_default,
22
+ skeletonParagraphProps: () => skeletonParagraphProps
23
+ });
24
+ module.exports = __toCommonJS(stdin_exports);
25
+ var import_vue = require("vue");
26
+ var import_vue2 = require("vue");
27
+ var import_utils = require("../utils");
28
+ const DEFAULT_ROW_WIDTH = "100%";
29
+ const skeletonParagraphProps = {
30
+ round: Boolean,
31
+ rowWidth: {
32
+ type: import_utils.numericProp,
33
+ default: DEFAULT_ROW_WIDTH
34
+ }
35
+ };
36
+ const [name, bem] = (0, import_utils.createNamespace)("skeleton-paragraph");
37
+ var stdin_default = (0, import_vue2.defineComponent)({
38
+ name,
39
+ props: skeletonParagraphProps,
40
+ setup(props) {
41
+ return () => (0, import_vue.createVNode)("div", {
42
+ "class": bem([{
43
+ round: props.round
44
+ }]),
45
+ "style": {
46
+ width: props.rowWidth
47
+ }
48
+ }, null);
49
+ }
50
+ });
@@ -0,0 +1,16 @@
1
+ import { type ExtractPropTypes } from 'vue';
2
+ export declare const skeletonTitleProps: {
3
+ round: BooleanConstructor;
4
+ titleWidth: (NumberConstructor | StringConstructor)[];
5
+ };
6
+ export declare type SkeletonTitleProps = ExtractPropTypes<typeof skeletonTitleProps>;
7
+ declare const _default: import("vue").DefineComponent<{
8
+ round: BooleanConstructor;
9
+ titleWidth: (NumberConstructor | StringConstructor)[];
10
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
11
+ round: BooleanConstructor;
12
+ titleWidth: (NumberConstructor | StringConstructor)[];
13
+ }>>, {
14
+ round: boolean;
15
+ }>;
16
+ export default _default;