@opentiny/vue-popup
Advanced tools
Comparing version 3.6.0 to 3.6.1-alpha.0
@@ -13,3 +13,2 @@ /** | ||
import Popup from './src/index.vue'; | ||
import '@opentiny/vue-theme-mobile/popup/index.css'; | ||
export default Popup; |
173
lib/index.js
@@ -1,13 +0,57 @@ | ||
import { $prefix, setup } from '@opentiny/vue-common'; | ||
import { renderless, api } from '@opentiny/vue-renderless/popup/vue'; | ||
import { iconClose } from '@opentiny/vue-icon'; | ||
import { resolveComponent, openBlock, createElementBlock, createVNode, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, renderSlot, createBlock, createCommentVNode, vShow } from 'vue'; | ||
import '@opentiny/vue-theme-mobile/popup/index.css'; | ||
import { defineComponent, $prefix, setup as _setup } from "@opentiny/vue-common"; | ||
import { renderless, api } from "@opentiny/vue-renderless/popup/vue"; | ||
import { iconClose } from "@opentiny/vue-icon"; | ||
import { resolveComponent, openBlock, createElementBlock, createVNode, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, renderSlot, createBlock, createCommentVNode, vShow } from "vue"; | ||
function _createForOfIteratorHelperLoose(o, allowArrayLike) { | ||
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; | ||
if (it) | ||
return (it = it.call(o)).next.bind(it); | ||
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { | ||
if (it) | ||
o = it; | ||
var i = 0; | ||
return function() { | ||
if (i >= o.length) | ||
return { done: true }; | ||
return { done: false, value: o[i++] }; | ||
}; | ||
} | ||
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | ||
} | ||
function _unsupportedIterableToArray(o, minLen) { | ||
if (!o) | ||
return; | ||
if (typeof o === "string") | ||
return _arrayLikeToArray(o, minLen); | ||
var n = Object.prototype.toString.call(o).slice(8, -1); | ||
if (n === "Object" && o.constructor) | ||
n = o.constructor.name; | ||
if (n === "Map" || n === "Set") | ||
return Array.from(o); | ||
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) | ||
return _arrayLikeToArray(o, minLen); | ||
} | ||
function _arrayLikeToArray(arr, len) { | ||
if (len == null || len > arr.length) | ||
len = arr.length; | ||
for (var i = 0, arr2 = new Array(len); i < len; i++) | ||
arr2[i] = arr[i]; | ||
return arr2; | ||
} | ||
var _export_sfc = function _export_sfc2(sfc, props) { | ||
var target = sfc.__vccOpts || sfc; | ||
for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) { | ||
var _step$value = _step.value, key = _step$value[0], val = _step$value[1]; | ||
target[key] = val; | ||
} | ||
return target; | ||
}; | ||
import "@opentiny/vue-theme-mobile/popup/index.css"; | ||
var $constants = { | ||
OVERFLOWHIDDEN: 'tiny-overflow-hidde' | ||
OVERFLOWHIDDEN: "tiny-overflow-hidde" | ||
}; | ||
var script = { | ||
name: $prefix + 'Popup', | ||
emits: ['open', 'close', 'update:modelValue', 'click-overlay', 'closed', 'opened', 'click'], | ||
var _sfc_main = /* @__PURE__ */ defineComponent({ | ||
name: $prefix + "Popup", | ||
emits: ["open", "close", "update:modelValue", "click-overlay", "closed", "opened", "click"], | ||
components: { | ||
@@ -25,7 +69,7 @@ IconClose: iconClose() | ||
type: String, | ||
default: 'cross' | ||
default: "cross" | ||
}, | ||
closeIconPosition: { | ||
type: String, | ||
default: 'top-right' | ||
default: "top-right" | ||
}, | ||
@@ -60,3 +104,3 @@ closeOnClickOverlay: { | ||
type: String, | ||
default: 'center' | ||
default: "center" | ||
}, | ||
@@ -68,14 +112,13 @@ round: Boolean, | ||
}, | ||
setup: function setup$1(props, context) { | ||
return setup({ | ||
props: props, | ||
context: context, | ||
renderless: renderless, | ||
api: api, | ||
setup: function setup(props, context) { | ||
return _setup({ | ||
props, | ||
context, | ||
renderless, | ||
api, | ||
mono: true | ||
}); | ||
} | ||
}; | ||
function render(_ctx, _cache, $props, $setup, $data, $options) { | ||
}); | ||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { | ||
var _component_icon_close = resolveComponent("icon-close"); | ||
@@ -85,48 +128,64 @@ return openBlock(), createElementBlock("div", null, [createVNode(Transition, { | ||
onAfterEnter: _ctx.opened, | ||
onAfterLeave: _ctx.closed | ||
onAfterLeave: _ctx.closed, | ||
persisted: "" | ||
}, { | ||
default: withCtx(function () { | ||
return [withDirectives(createElementVNode("div", { | ||
ref: "popup", | ||
class: normalizeClass(["tiny-popup", [$props.round ? 'tiny-popup--round' : '', $props.position ? 'tiny-popup--' + $props.position : '', $props.popupClass]]), | ||
style: normalizeStyle(_ctx.state.style), | ||
onClick: _cache[0] || (_cache[0] = function ($event) { | ||
return _ctx.$emit('click'); | ||
}) | ||
}, [renderSlot(_ctx.$slots, "default"), $props.closeable ? (openBlock(), createBlock(_component_icon_close, { | ||
key: 0, | ||
class: "tiny-popup__close-icon tiny-popup__close-icon--top-right", | ||
fill: "#c8c9cc", | ||
tabindex: "0", | ||
onClick: _ctx.close | ||
}, null, 8, ["onClick"])) : createCommentVNode("", true)], 6), [[vShow, $props.modelValue]])]; | ||
default: withCtx(function() { | ||
return [withDirectives(createElementVNode( | ||
"div", | ||
{ | ||
ref: "popup", | ||
class: normalizeClass(["tiny-popup", [_ctx.round ? "tiny-popup--round" : "", _ctx.position ? "tiny-popup--" + _ctx.position : "", _ctx.popupClass]]), | ||
style: normalizeStyle(_ctx.state.style), | ||
onClick: _cache[0] || (_cache[0] = function($event) { | ||
return _ctx.$emit("click"); | ||
}) | ||
}, | ||
[renderSlot(_ctx.$slots, "default"), _ctx.closeable ? (openBlock(), createBlock(_component_icon_close, { | ||
key: 0, | ||
class: "tiny-popup__close-icon tiny-popup__close-icon--top-right", | ||
fill: "#c8c9cc", | ||
tabindex: "0", | ||
onClick: _ctx.close | ||
}, null, 8, ["onClick"])) : createCommentVNode("v-if", true)], | ||
6 | ||
/* CLASS, STYLE */ | ||
), [[vShow, _ctx.modelValue]])]; | ||
}), | ||
_: 3 | ||
/* FORWARDED */ | ||
}, 8, ["name", "onAfterEnter", "onAfterLeave"]), createVNode(Transition, { | ||
name: "tiny-fade" | ||
name: "tiny-fade", | ||
persisted: "" | ||
}, { | ||
default: withCtx(function () { | ||
return [withDirectives(createElementVNode("div", { | ||
style: normalizeStyle(_ctx.state.overlayStyle), | ||
class: normalizeClass([$props.overlayClass, "tiny-overlay"]), | ||
onClick: _cache[1] || (_cache[1] = function () { | ||
return _ctx.clickOverlay && _ctx.clickOverlay.apply(_ctx, arguments); | ||
}) | ||
}, [renderSlot(_ctx.$slots, "overlay")], 6), [[vShow, _ctx.state.opened && $props.overlay]])]; | ||
default: withCtx(function() { | ||
return [withDirectives(createElementVNode( | ||
"div", | ||
{ | ||
style: normalizeStyle(_ctx.state.overlayStyle), | ||
class: normalizeClass([_ctx.overlayClass, "tiny-overlay"]), | ||
onClick: _cache[1] || (_cache[1] = function() { | ||
return _ctx.clickOverlay && _ctx.clickOverlay.apply(_ctx, arguments); | ||
}) | ||
}, | ||
[renderSlot(_ctx.$slots, "overlay")], | ||
6 | ||
/* CLASS, STYLE */ | ||
), [[vShow, _ctx.state.opened && _ctx.overlay]])]; | ||
}), | ||
_: 3 | ||
/* FORWARDED */ | ||
})]); | ||
} | ||
script.render = render; | ||
script.model = { | ||
prop: 'modelValue', | ||
event: 'update:modelValue' | ||
var Popup = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]); | ||
var version = "3.7.0"; | ||
Popup.model = { | ||
prop: "modelValue", | ||
event: "update:modelValue" | ||
}; | ||
script.install = function (Vue) { | ||
Vue.component(script.name, script); | ||
Popup.install = function(Vue) { | ||
Vue.component(Popup.name, Popup); | ||
}; | ||
script.version = '3.6.0'; | ||
export { script as default }; | ||
Popup.version = version; | ||
export { | ||
Popup as default | ||
}; |
{ | ||
"name": "@opentiny/vue-popup", | ||
"version": "3.6.0", | ||
"version": "3.6.1-alpha.0", | ||
"description": "", | ||
"main": "lib/index.js", | ||
"scripts": { | ||
"lint": "eslint src/**/*{.js,.html,.vue} --quiet", | ||
"build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", | ||
"build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" | ||
}, | ||
"main": "./lib/index.js", | ||
"dependencies": { | ||
"@opentiny/vue-common": "~3.6.0", | ||
"@opentiny/vue-icon": "~3.6.0", | ||
"@opentiny/vue-renderless": "~3.6.0", | ||
"@opentiny/vue-theme": "~3.6.0", | ||
"@opentiny/vue-theme-mobile": "~3.6.0" | ||
"@opentiny/vue-common": "~3.6.1-alpha.0", | ||
"@opentiny/vue-icon": "~3.6.1-alpha.0", | ||
"@opentiny/vue-renderless": "~3.6.1-alpha.0" | ||
}, | ||
"license": "MIT", | ||
"types": "index.d.ts", | ||
"sideEffects": false | ||
"scripts": { | ||
"build": "pnpm -w build:ui $npm_package_name", | ||
"//postversion": "pnpm build" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
declare const _default: import("vue").DefineComponent<{ | ||
declare const _sfc_main: import("@vue/runtime-core").DefineComponent<{ | ||
_constants: { | ||
@@ -51,3 +51,3 @@ type: ObjectConstructor; | ||
}, { | ||
t: any; | ||
t: (this: any, path: any, options?: any) => any; | ||
vm: any; | ||
@@ -58,3 +58,3 @@ f: (props: any, attrs?: {}) => {}; | ||
dp: (props: any) => void; | ||
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "update:modelValue" | "close" | "open" | "opened" | "closed" | "click-overlay")[], "click" | "update:modelValue" | "close" | "open" | "opened" | "closed" | "click-overlay", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{ | ||
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "update:modelValue" | "close" | "open" | "click-overlay" | "closed" | "opened")[], "click" | "update:modelValue" | "close" | "open" | "click-overlay" | "closed" | "opened", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{ | ||
_constants: { | ||
@@ -109,17 +109,15 @@ type: ObjectConstructor; | ||
}>> & { | ||
onClick?: ((...args: any[]) => any) | undefined; | ||
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined; | ||
onClose?: ((...args: any[]) => any) | undefined; | ||
onClick?: ((...args: any[]) => any) | undefined; | ||
onOpen?: ((...args: any[]) => any) | undefined; | ||
"onClick-overlay"?: ((...args: any[]) => any) | undefined; | ||
onClosed?: ((...args: any[]) => any) | undefined; | ||
onOpened?: ((...args: any[]) => any) | undefined; | ||
onClosed?: ((...args: any[]) => any) | undefined; | ||
"onClick-overlay"?: ((...args: any[]) => any) | undefined; | ||
}, { | ||
_constants: Record<string, any>; | ||
round: boolean; | ||
modelValue: boolean; | ||
round: boolean; | ||
lockScroll: boolean; | ||
closeOnClickOverlay: boolean; | ||
overlay: boolean; | ||
closeOnClickOverlay: boolean; | ||
position: string; | ||
_constants: Record<string, any>; | ||
closeIcon: string; | ||
@@ -129,4 +127,6 @@ closeIconPosition: string; | ||
lazyRender: boolean; | ||
lockScroll: boolean; | ||
position: string; | ||
safeAreaInsetBottom: boolean; | ||
}>; | ||
export default _default; | ||
export default _sfc_main; |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
11812
3
5
328
2