@opentiny/vue-drawer 3.10.0 → 3.11.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -97,7 +97,7 @@ var Drawer = {
97
97
  });
98
98
  }
99
99
  };
100
- var version = "3.10.0";
100
+ var version = "3.11.0-alpha.2";
101
101
  Drawer.model = {
102
102
  prop: "modelValue",
103
103
  event: "update:modelValue"
@@ -3,7 +3,7 @@ import { props, setup as _setup } from "@opentiny/vue-common";
3
3
  import { IconClose } from "@opentiny/vue-icon";
4
4
  import Button from "@opentiny/vue-button";
5
5
  import { resolveComponent, withDirectives, openBlock, createElementBlock, normalizeClass, createCommentVNode, createElementVNode, normalizeStyle, renderSlot, toDisplayString, createVNode, withCtx, createTextVNode, vShow } from "vue";
6
- function _createForOfIteratorHelperLoose(o, allowArrayLike) {
6
+ function _createForOfIteratorHelperLoose_tiny(o, allowArrayLike) {
7
7
  var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
8
8
  if (it)
9
9
  return (it = it.call(o)).next.bind(it);
@@ -41,7 +41,7 @@ function _arrayLikeToArray(arr, len) {
41
41
  }
42
42
  var _export_sfc = function _export_sfc2(sfc, props) {
43
43
  var target = sfc.__vccOpts || sfc;
44
- for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
44
+ for (var _iterator = _createForOfIteratorHelperLoose_tiny(props), _step; !(_step = _iterator()).done; ) {
45
45
  var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
46
46
  target[key] = val;
47
47
  }
package/lib/pc.js CHANGED
@@ -3,8 +3,8 @@ import { props, setup as _setup } from "@opentiny/vue-common";
3
3
  import "@opentiny/vue-theme/drawer/index.css";
4
4
  import { IconClose } from "@opentiny/vue-icon";
5
5
  import Button from "@opentiny/vue-button";
6
- import { resolveComponent, withDirectives, openBlock, createElementBlock, normalizeClass, normalizeStyle, createCommentVNode, createElementVNode, renderSlot, toDisplayString, createVNode, withCtx, createTextVNode, vShow } from "vue";
7
- function _createForOfIteratorHelperLoose(o, allowArrayLike) {
6
+ import { resolveComponent, openBlock, createElementBlock, createVNode, Transition, withCtx, normalizeClass, normalizeStyle, createCommentVNode, withDirectives, createElementVNode, renderSlot, toDisplayString, createTextVNode, vShow } from "vue";
7
+ function _createForOfIteratorHelperLoose_tiny(o, allowArrayLike) {
8
8
  var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
9
9
  if (it)
10
10
  return (it = it.call(o)).next.bind(it);
@@ -42,7 +42,7 @@ function _arrayLikeToArray(arr, len) {
42
42
  }
43
43
  var _export_sfc = function _export_sfc2(sfc, props) {
44
44
  var target = sfc.__vccOpts || sfc;
45
- for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
45
+ for (var _iterator = _createForOfIteratorHelperLoose_tiny(props), _step; !(_step = _iterator()).done; ) {
46
46
  var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
47
47
  target[key] = val;
48
48
  }
@@ -102,127 +102,138 @@ var _hoisted_8 = {
102
102
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
103
103
  var _component_icon_close = resolveComponent("icon-close");
104
104
  var _component_tiny_button = resolveComponent("tiny-button");
105
- return withDirectives((openBlock(), createElementBlock(
106
- "div",
107
- _hoisted_1,
108
- [$props.mask ? (openBlock(), createElementBlock(
109
- "div",
110
- {
111
- key: 0,
112
- ref: "mask",
113
- class: normalizeClass(["tiny-drawer__mask", {
114
- "show-bg-color": _ctx.state.toggle
115
- }]),
116
- style: normalizeStyle({
117
- zIndex: $props.zIndex
118
- }),
119
- onClick: _cache[0] || (_cache[0] = function($event) {
120
- return $props.maskClosable && _ctx.close();
121
- })
122
- },
123
- null,
124
- 6
125
- /* CLASS, STYLE */
126
- )) : createCommentVNode("v-if", true), createElementVNode(
127
- "div",
128
- {
129
- "data-tag": "tiny-drawer-main",
130
- ref: "drawerBox",
131
- class: normalizeClass(["tiny-drawer__main", {
132
- "is-left": $props.placement === "left",
133
- "is-right": $props.placement === "right",
134
- "is-top": $props.placement === "top",
135
- "is-bottom": $props.placement === "bottom",
136
- "drag-effects": !_ctx.state.dragEvent.isDrag
137
- }, $props.customClass]),
138
- style: normalizeStyle({
139
- width: ["left", "right"].includes($props.placement) ? _ctx.state.computedWidth : null,
140
- zIndex: $props.zIndex
141
- })
142
- },
143
- [$props.dragable ? (openBlock(), createElementBlock(
105
+ return openBlock(), createElementBlock("div", _hoisted_1, [createVNode(Transition, {
106
+ name: "drawer-fade"
107
+ }, {
108
+ default: withCtx(function() {
109
+ return [$props.mask && $props.visible ? (openBlock(), createElementBlock(
144
110
  "div",
145
- _hoisted_2,
146
- null,
147
- 512
148
- /* NEED_PATCH */
149
- )) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_3, [$props.showHeader ? (openBlock(), createElementBlock(
150
- "div",
151
- _hoisted_4,
152
- [renderSlot(_ctx.$slots, "header", {}, function() {
153
- return [createElementVNode("div", _hoisted_5, [$props.title ? (openBlock(), createElementBlock(
154
- "div",
155
- _hoisted_6,
156
- toDisplayString($props.title),
157
- 1
158
- /* TEXT */
159
- )) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_7, [renderSlot(_ctx.$slots, "header-right")])])];
160
- }), $props.showClose ? (openBlock(), createElementBlock("button", {
111
+ {
161
112
  key: 0,
162
- type: "button",
163
- class: "tiny-drawer__headerbtn",
164
- "aria-label": "Close",
165
- onClick: _cache[1] || (_cache[1] = function() {
166
- return _ctx.close && _ctx.close.apply(_ctx, arguments);
113
+ ref: "mask",
114
+ class: normalizeClass(["tiny-drawer__mask", {
115
+ "show-bg-color": _ctx.state.toggle
116
+ }]),
117
+ style: normalizeStyle({
118
+ zIndex: $props.zIndex
119
+ }),
120
+ onClick: _cache[0] || (_cache[0] = function($event) {
121
+ return $props.maskClosable && _ctx.close();
167
122
  })
168
- }, [createVNode(_component_icon_close, {
169
- class: "tiny-svg-size tiny-drawer__close"
170
- })])) : createCommentVNode("v-if", true)],
171
- 512
172
- /* NEED_PATCH */
173
- )) : createCommentVNode("v-if", true), createElementVNode(
123
+ },
124
+ null,
125
+ 6
126
+ /* CLASS, STYLE */
127
+ )) : createCommentVNode("v-if", true)];
128
+ }),
129
+ _: 1
130
+ /* STABLE */
131
+ }), createVNode(Transition, {
132
+ name: "drawer-slideRight",
133
+ persisted: ""
134
+ }, {
135
+ default: withCtx(function() {
136
+ return [withDirectives(createElementVNode(
174
137
  "div",
175
138
  {
176
- "data-tag": "drawer-body",
177
- ref: "body",
178
- class: normalizeClass(["tiny-drawer__body", {
179
- "flex flex-col": $props.flex
180
- }])
139
+ "data-tag": "tiny-drawer-main",
140
+ ref: "drawerBox",
141
+ class: normalizeClass(["tiny-drawer__main", {
142
+ "is-left": $props.placement === "left",
143
+ "is-right": $props.placement === "right",
144
+ "is-top": $props.placement === "top",
145
+ "is-bottom": $props.placement === "bottom",
146
+ "drag-effects": !_ctx.state.dragEvent.isDrag
147
+ }, $props.customClass]),
148
+ style: normalizeStyle({
149
+ width: ["left", "right"].includes($props.placement) ? _ctx.state.computedWidth : null,
150
+ zIndex: $props.zIndex
151
+ })
181
152
  },
182
- [renderSlot(_ctx.$slots, "default")],
183
- 2
184
- /* CLASS */
185
- ), $props.showFooter ? (openBlock(), createElementBlock(
186
- "div",
187
- _hoisted_8,
188
- [renderSlot(_ctx.$slots, "footer", {}, function() {
189
- return [createVNode(_component_tiny_button, {
190
- type: "primary",
191
- onClick: _ctx.confirm
192
- }, {
193
- default: withCtx(function() {
194
- return [createTextVNode(
195
- toDisplayString(_ctx.t("ui.button.confirm")),
196
- 1
197
- /* TEXT */
198
- )];
199
- }),
200
- _: 1
201
- /* STABLE */
202
- }, 8, ["onClick"]), createVNode(_component_tiny_button, {
203
- plain: "",
204
- onClick: _ctx.close
205
- }, {
206
- default: withCtx(function() {
207
- return [createTextVNode(
208
- toDisplayString(_ctx.t("ui.button.cancel")),
209
- 1
210
- /* TEXT */
211
- )];
212
- }),
213
- _: 1
214
- /* STABLE */
215
- }, 8, ["onClick"])];
216
- })],
217
- 512
218
- /* NEED_PATCH */
219
- )) : createCommentVNode("v-if", true)])],
220
- 6
221
- /* CLASS, STYLE */
222
- )],
223
- 512
224
- /* NEED_PATCH */
225
- )), [[vShow, $props.visible]]);
153
+ [$props.dragable ? (openBlock(), createElementBlock(
154
+ "div",
155
+ _hoisted_2,
156
+ null,
157
+ 512
158
+ /* NEED_PATCH */
159
+ )) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_3, [$props.showHeader ? (openBlock(), createElementBlock(
160
+ "div",
161
+ _hoisted_4,
162
+ [renderSlot(_ctx.$slots, "header", {}, function() {
163
+ return [createElementVNode("div", _hoisted_5, [$props.title ? (openBlock(), createElementBlock(
164
+ "div",
165
+ _hoisted_6,
166
+ toDisplayString($props.title),
167
+ 1
168
+ /* TEXT */
169
+ )) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_7, [renderSlot(_ctx.$slots, "header-right")])])];
170
+ }), $props.showClose ? (openBlock(), createElementBlock("button", {
171
+ key: 0,
172
+ type: "button",
173
+ class: "tiny-drawer__headerbtn",
174
+ "aria-label": "Close",
175
+ onClick: _cache[1] || (_cache[1] = function() {
176
+ return _ctx.close && _ctx.close.apply(_ctx, arguments);
177
+ })
178
+ }, [createVNode(_component_icon_close, {
179
+ class: "tiny-svg-size tiny-drawer__close"
180
+ })])) : createCommentVNode("v-if", true)],
181
+ 512
182
+ /* NEED_PATCH */
183
+ )) : createCommentVNode("v-if", true), createElementVNode(
184
+ "div",
185
+ {
186
+ "data-tag": "drawer-body",
187
+ ref: "body",
188
+ class: normalizeClass(["tiny-drawer__body", {
189
+ "flex flex-col": $props.flex
190
+ }])
191
+ },
192
+ [renderSlot(_ctx.$slots, "default")],
193
+ 2
194
+ /* CLASS */
195
+ ), $props.showFooter ? (openBlock(), createElementBlock(
196
+ "div",
197
+ _hoisted_8,
198
+ [renderSlot(_ctx.$slots, "footer", {}, function() {
199
+ return [createVNode(_component_tiny_button, {
200
+ type: "primary",
201
+ onClick: _ctx.confirm
202
+ }, {
203
+ default: withCtx(function() {
204
+ return [createTextVNode(
205
+ toDisplayString(_ctx.t("ui.button.confirm")),
206
+ 1
207
+ /* TEXT */
208
+ )];
209
+ }),
210
+ _: 1
211
+ /* STABLE */
212
+ }, 8, ["onClick"]), createVNode(_component_tiny_button, {
213
+ plain: "",
214
+ onClick: _ctx.close
215
+ }, {
216
+ default: withCtx(function() {
217
+ return [createTextVNode(
218
+ toDisplayString(_ctx.t("ui.button.cancel")),
219
+ 1
220
+ /* TEXT */
221
+ )];
222
+ }),
223
+ _: 1
224
+ /* STABLE */
225
+ }, 8, ["onClick"])];
226
+ })],
227
+ 512
228
+ /* NEED_PATCH */
229
+ )) : createCommentVNode("v-if", true)])],
230
+ 6
231
+ /* CLASS, STYLE */
232
+ ), [[vShow, $props.visible]])];
233
+ }),
234
+ _: 3
235
+ /* FORWARDED */
236
+ })]);
226
237
  }
227
238
  var pc = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
228
239
  export {
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@opentiny/vue-drawer",
3
- "version": "3.10.0",
3
+ "version": "3.11.0-alpha.2",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",
7
7
  "sideEffects": false,
8
8
  "type": "module",
9
9
  "dependencies": {
10
- "@opentiny/vue-button": "~3.10.0",
11
- "@opentiny/vue-common": "~3.10.0",
12
- "@opentiny/vue-renderless": "~3.10.0"
10
+ "@opentiny/vue-button": "~3.11.0-alpha.0",
11
+ "@opentiny/vue-common": "~3.11.0-alpha.0",
12
+ "@opentiny/vue-renderless": "~3.11.0-alpha.0"
13
13
  },
14
14
  "license": "MIT",
15
15
  "types": "index.d.ts"
@@ -1,5 +1,23 @@
1
1
  declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
2
- [x: string]: any;
2
+ title?: any;
3
+ tiny_mode?: any;
4
+ tiny_mode_root?: any;
5
+ tiny_template?: any;
6
+ tiny_renderless?: any;
7
+ _constants?: any;
8
+ tiny_theme?: any;
9
+ tiny_chart_theme?: any;
10
+ width?: any;
11
+ placement?: any;
12
+ mask?: any;
13
+ visible?: any;
14
+ customClass?: any;
15
+ showHeader?: any;
16
+ showFooter?: any;
17
+ maskClosable?: any;
18
+ flex?: any;
19
+ lockScroll?: any;
20
+ dragable?: any;
3
21
  }>, {
4
22
  t: (this: any, path: any, options?: any) => any;
5
23
  vm: any;
@@ -10,8 +28,44 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
10
28
  gcls: (key: any) => any;
11
29
  m: (...cssClasses: any[]) => string;
12
30
  }, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
13
- [x: string]: any;
31
+ title?: any;
32
+ tiny_mode?: any;
33
+ tiny_mode_root?: any;
34
+ tiny_template?: any;
35
+ tiny_renderless?: any;
36
+ _constants?: any;
37
+ tiny_theme?: any;
38
+ tiny_chart_theme?: any;
39
+ width?: any;
40
+ placement?: any;
41
+ mask?: any;
42
+ visible?: any;
43
+ customClass?: any;
44
+ showHeader?: any;
45
+ showFooter?: any;
46
+ maskClosable?: any;
47
+ flex?: any;
48
+ lockScroll?: any;
49
+ dragable?: any;
14
50
  }>>>, {
15
- [x: string]: any;
51
+ readonly title?: any;
52
+ readonly tiny_mode?: any;
53
+ readonly tiny_mode_root?: any;
54
+ readonly tiny_template?: any;
55
+ readonly tiny_renderless?: any;
56
+ readonly _constants?: any;
57
+ readonly tiny_theme?: any;
58
+ readonly tiny_chart_theme?: any;
59
+ readonly width?: any;
60
+ readonly placement?: any;
61
+ readonly mask?: any;
62
+ readonly visible?: any;
63
+ readonly customClass?: any;
64
+ readonly showHeader?: any;
65
+ readonly showFooter?: any;
66
+ readonly maskClosable?: any;
67
+ readonly flex?: any;
68
+ readonly lockScroll?: any;
69
+ readonly dragable?: any;
16
70
  }, {}>;
17
71
  export default _default;
package/src/pc.vue.d.ts CHANGED
@@ -1,5 +1,25 @@
1
1
  declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
2
- [x: string]: any;
2
+ title?: any;
3
+ tiny_mode?: any;
4
+ tiny_mode_root?: any;
5
+ tiny_template?: any;
6
+ tiny_renderless?: any;
7
+ _constants?: any;
8
+ tiny_theme?: any;
9
+ tiny_chart_theme?: any;
10
+ width?: any;
11
+ placement?: any;
12
+ zIndex?: any;
13
+ mask?: any;
14
+ visible?: any;
15
+ customClass?: any;
16
+ showHeader?: any;
17
+ showFooter?: any;
18
+ maskClosable?: any;
19
+ flex?: any;
20
+ showClose?: any;
21
+ lockScroll?: any;
22
+ dragable?: any;
3
23
  }>, {
4
24
  t: (this: any, path: any, options?: any) => any;
5
25
  vm: any;
@@ -10,8 +30,48 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
10
30
  gcls: (key: any) => any;
11
31
  m: (...cssClasses: any[]) => string;
12
32
  }, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
13
- [x: string]: any;
33
+ title?: any;
34
+ tiny_mode?: any;
35
+ tiny_mode_root?: any;
36
+ tiny_template?: any;
37
+ tiny_renderless?: any;
38
+ _constants?: any;
39
+ tiny_theme?: any;
40
+ tiny_chart_theme?: any;
41
+ width?: any;
42
+ placement?: any;
43
+ zIndex?: any;
44
+ mask?: any;
45
+ visible?: any;
46
+ customClass?: any;
47
+ showHeader?: any;
48
+ showFooter?: any;
49
+ maskClosable?: any;
50
+ flex?: any;
51
+ showClose?: any;
52
+ lockScroll?: any;
53
+ dragable?: any;
14
54
  }>>>, {
15
- [x: string]: any;
55
+ readonly title?: any;
56
+ readonly tiny_mode?: any;
57
+ readonly tiny_mode_root?: any;
58
+ readonly tiny_template?: any;
59
+ readonly tiny_renderless?: any;
60
+ readonly _constants?: any;
61
+ readonly tiny_theme?: any;
62
+ readonly tiny_chart_theme?: any;
63
+ readonly width?: any;
64
+ readonly placement?: any;
65
+ readonly zIndex?: any;
66
+ readonly mask?: any;
67
+ readonly visible?: any;
68
+ readonly customClass?: any;
69
+ readonly showHeader?: any;
70
+ readonly showFooter?: any;
71
+ readonly maskClosable?: any;
72
+ readonly flex?: any;
73
+ readonly showClose?: any;
74
+ readonly lockScroll?: any;
75
+ readonly dragable?: any;
16
76
  }, {}>;
17
77
  export default _default;