@opentiny/vue-popconfirm
Advanced tools
Comparing version 3.11.0 to 3.12.0
@@ -50,4 +50,4 @@ function _extends() { | ||
}, | ||
content: String, | ||
popperClass: String, | ||
message: String, | ||
customClass: String, | ||
trigger: { | ||
@@ -57,3 +57,3 @@ type: String, | ||
validator: function validator(value) { | ||
return Boolean(~["click", "hover"].indexOf(value)); | ||
return ["click", "hover"].includes(value); | ||
} | ||
@@ -84,3 +84,3 @@ }, | ||
}); | ||
var version = "3.11.0"; | ||
var version = "3.12.0"; | ||
Popconfirm.install = function(Vue) { | ||
@@ -87,0 +87,0 @@ Vue.component(Popconfirm.name, Popconfirm); |
import { defineComponent, $prefix, setup as _setup } from "@opentiny/vue-common"; | ||
import { renderless, api } from "@opentiny/vue-renderless/popconfirm/vue"; | ||
import Popover from "@opentiny/vue-popover"; | ||
import Modal from "@opentiny/vue-modal"; | ||
import Button from "@opentiny/vue-button"; | ||
import { IconSuccess, IconInfoSolid, IconWarning, IconError } from "@opentiny/vue-icon"; | ||
import { resolveComponent, openBlock, createElementBlock, createElementVNode, createVNode, withCtx, renderSlot, createBlock, resolveDynamicComponent, normalizeClass, createCommentVNode, toDisplayString, createTextVNode } from "vue"; | ||
import { iconSuccess, iconInfoSolid, iconWarning, iconError } from "@opentiny/vue-icon"; | ||
import { resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createElementVNode, createBlock, resolveDynamicComponent, normalizeClass, createCommentVNode, toDisplayString, renderSlot, createTextVNode } from "vue"; | ||
function _createForOfIteratorHelperLoose_tiny(o, allowArrayLike) { | ||
@@ -53,2 +52,10 @@ var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; | ||
var $constants = { | ||
ICON_MAP: { | ||
success: "icon-success", | ||
error: "icon-error", | ||
info: "icon-info-solid", | ||
warning: "icon-warning" | ||
} | ||
}; | ||
var _sfc_main = defineComponent({ | ||
@@ -58,8 +65,7 @@ name: $prefix + "Popconfirm", | ||
TinyPopover: Popover, | ||
TinyModal: Modal, | ||
TinyButton: Button, | ||
IconSuccess: IconSuccess(), | ||
IconInfoSolid: IconInfoSolid(), | ||
IconWarning: IconWarning(), | ||
IconError: IconError() | ||
IconSuccess: iconSuccess(), | ||
IconInfoSolid: iconInfoSolid(), | ||
IconWarning: iconWarning(), | ||
IconError: iconError() | ||
}, | ||
@@ -73,4 +79,4 @@ props: { | ||
}, | ||
content: String, | ||
popperClass: String, | ||
message: String, | ||
customClass: String, | ||
trigger: { | ||
@@ -80,3 +86,3 @@ type: String, | ||
validator: function validator(value) { | ||
return Boolean(~["click", "hover"].indexOf(value)); | ||
return ~["click", "hover"].indexOf(value); | ||
} | ||
@@ -97,5 +103,7 @@ }, | ||
}, | ||
type: [String, Object] | ||
type: [String, Object], | ||
reference: {}, | ||
events: Object | ||
}, | ||
emits: ["hide", "show", "confirm"], | ||
emits: ["hide", "show", "confirm", "handleEmit"], | ||
setup: function setup(props, context) { | ||
@@ -115,28 +123,25 @@ return _setup({ | ||
var _hoisted_2 = { | ||
class: "hidden sm:inline-block" | ||
"data-tag": "tiny-popconfirm-header", | ||
class: "flex items-center leading-6 sm:pt-1" | ||
}; | ||
var _hoisted_3 = { | ||
class: "py-1 text-xs text-color-text-primary" | ||
class: "flex-auto" | ||
}; | ||
var _hoisted_4 = { | ||
"data-tag": "tiny-popconfirm-header", | ||
class: "flex items-center leading-6" | ||
"data-tag": "tiny-popconfirm-content" | ||
}; | ||
var _hoisted_5 = { | ||
class: "flex-auto" | ||
class: "sm:leading-6 sm:text-xs sm:text-color-text-secondary" | ||
}; | ||
var _hoisted_6 = { | ||
"data-tag": "tiny-popconfirm-content", | ||
class: "text-color-text-secondary leading-6" | ||
"data-tag": "tiny-popconfirm-footer", | ||
class: "sm:pb-1" | ||
}; | ||
var _hoisted_7 = { | ||
class: "flex mt-4 justify-end" | ||
class: "hidden sm:flex mt-4 justify-end" | ||
}; | ||
var _hoisted_8 = { | ||
class: "sm:hidden inline-block" | ||
class: "flex sm:hidden text-base justify-center" | ||
}; | ||
var _hoisted_9 = { | ||
class: "flex text-base justify-center" | ||
}; | ||
var _hoisted_10 = { | ||
key: 1, | ||
@@ -148,4 +153,3 @@ class: "border-r border-r-color-border-separator" | ||
var _component_tiny_popover = resolveComponent("tiny-popover"); | ||
var _component_tiny_modal = resolveComponent("tiny-modal"); | ||
return openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("div", _hoisted_2, [createVNode(_component_tiny_popover, { | ||
return openBlock(), createElementBlock("div", _hoisted_1, [createVNode(_component_tiny_popover, { | ||
ref: "popover", | ||
@@ -160,25 +164,14 @@ tiny_mode: "mobile-first", | ||
width: _ctx.width, | ||
"popper-class": _ctx.m("min-w-[10.5rem] max-w-[21.875rem] hidden sm:block", _ctx.popperClass), | ||
onShow: _ctx.show, | ||
onHide: _ctx.hide | ||
title: _ctx.title, | ||
"popper-class": _ctx.m("min-w-[theme(spacing.44)] max-w-[theme(spacing.96)]", _ctx.customClass), | ||
reference: _ctx.reference, | ||
onShow: _cache[3] || (_cache[3] = function($event) { | ||
return _ctx.handleEmit("show"); | ||
}), | ||
onHide: _cache[4] || (_cache[4] = function($event) { | ||
return _ctx.handleEmit("hide"); | ||
}) | ||
}, { | ||
reference: withCtx(function() { | ||
return [createElementVNode( | ||
"div", | ||
{ | ||
class: "inline-block", | ||
onClick: _cache[0] || (_cache[0] = function($event) { | ||
return _ctx.show("click"); | ||
}), | ||
onMouseover: _cache[1] || (_cache[1] = function($event) { | ||
return _ctx.show("hover"); | ||
}) | ||
}, | ||
[renderSlot(_ctx.$slots, "reference")], | ||
32 | ||
/* HYDRATE_EVENTS */ | ||
)]; | ||
}), | ||
default: withCtx(function() { | ||
return [createElementVNode("div", _hoisted_3, [createElementVNode("div", _hoisted_4, [_ctx.type ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.state.getIcon), { | ||
header: withCtx(function() { | ||
return [createElementVNode("div", _hoisted_2, [_ctx.type ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.state.getIcon), { | ||
key: 0, | ||
@@ -196,13 +189,19 @@ class: normalizeClass(_ctx.m("h-6 w-6 mr-2", { | ||
"div", | ||
_hoisted_5, | ||
_hoisted_3, | ||
toDisplayString(_ctx.title), | ||
1 | ||
/* TEXT */ | ||
)]), createElementVNode( | ||
)])]; | ||
}), | ||
default: withCtx(function() { | ||
return [createElementVNode("div", _hoisted_4, [createElementVNode( | ||
"div", | ||
_hoisted_6, | ||
toDisplayString(_ctx.content), | ||
_hoisted_5, | ||
toDisplayString(_ctx.message), | ||
1 | ||
/* TEXT */ | ||
), createElementVNode("div", _hoisted_7, [renderSlot(_ctx.$slots, "footer", {}, function() { | ||
)])]; | ||
}), | ||
footer: withCtx(function() { | ||
return [createElementVNode("div", _hoisted_6, [createElementVNode("div", _hoisted_7, [renderSlot(_ctx.$slots, "footer", {}, function() { | ||
return [_ctx.cancelButton ? (openBlock(), createBlock(_component_tiny_button, { | ||
@@ -241,43 +240,6 @@ key: 0, | ||
}, 8, ["onClick"])]; | ||
})])])]; | ||
}), | ||
_: 3 | ||
/* FORWARDED */ | ||
}, 8, ["modelValue", "placement", "width", "popper-class", "onShow", "onHide"])]), createElementVNode("div", _hoisted_8, [createElementVNode( | ||
"div", | ||
{ | ||
class: "inline-block", | ||
onClick: _cache[3] || (_cache[3] = function($event) { | ||
return _ctx.show("click"); | ||
}), | ||
onMouseover: _cache[4] || (_cache[4] = function($event) { | ||
return _ctx.show("hover"); | ||
}) | ||
}, | ||
[renderSlot(_ctx.$slots, "reference")], | ||
32 | ||
/* HYDRATE_EVENTS */ | ||
), createVNode(_component_tiny_modal, { | ||
ref: "modal", | ||
tiny_mode: "mobile-first", | ||
class: "sm:hidden", | ||
modelValue: _ctx.state.showPopover, | ||
"onUpdate:modelValue": _cache[5] || (_cache[5] = function($event) { | ||
return _ctx.state.showPopover = $event; | ||
}), | ||
title: _ctx.title, | ||
"show-footer": "" | ||
}, { | ||
default: withCtx(function() { | ||
return [createTextVNode( | ||
toDisplayString(_ctx.content), | ||
1 | ||
/* TEXT */ | ||
)]; | ||
}), | ||
footer: withCtx(function() { | ||
return [createElementVNode("div", _hoisted_9, [renderSlot(_ctx.$slots, "footer", {}, function() { | ||
})]), createElementVNode("div", _hoisted_8, [renderSlot(_ctx.$slots, "footer", {}, function() { | ||
return [_ctx.cancelButton ? (openBlock(), createBlock(_component_tiny_button, { | ||
key: 0, | ||
class: "flex-1 text-color-text-secondary", | ||
"custom-class": "flex-1 text-color-text-secondary", | ||
tiny_mode: "mobile-first", | ||
@@ -296,4 +258,4 @@ type: "text", | ||
/* STABLE */ | ||
}, 8, ["onClick"])) : createCommentVNode("v-if", true), _ctx.cancelButton ? (openBlock(), createElementBlock("span", _hoisted_10)) : createCommentVNode("v-if", true), createVNode(_component_tiny_button, { | ||
class: "flex-1 text-color-brand tiny-modal-mf-button", | ||
}, 8, ["onClick"])) : createCommentVNode("v-if", true), _ctx.cancelButton ? (openBlock(), createElementBlock("span", _hoisted_9)) : createCommentVNode("v-if", true), createVNode(_component_tiny_button, { | ||
"custom-class": "flex-1 text-color-brand tiny-modal-mf-button", | ||
tiny_mode: "mobile-first", | ||
@@ -313,7 +275,24 @@ type: "text", | ||
}, 8, ["onClick"])]; | ||
})])]; | ||
})])])]; | ||
}), | ||
reference: withCtx(function() { | ||
return [createElementVNode( | ||
"div", | ||
{ | ||
class: "inline-block", | ||
onClick: _cache[0] || (_cache[0] = function($event) { | ||
return _ctx.show("click"); | ||
}), | ||
onMouseover: _cache[1] || (_cache[1] = function($event) { | ||
return _ctx.show("hover"); | ||
}) | ||
}, | ||
[renderSlot(_ctx.$slots, "reference")], | ||
32 | ||
/* NEED_HYDRATION */ | ||
)]; | ||
}), | ||
_: 3 | ||
/* FORWARDED */ | ||
}, 8, ["modelValue", "title"])])]); | ||
}, 8, ["modelValue", "placement", "width", "title", "popper-class", "reference"])]); | ||
} | ||
@@ -320,0 +299,0 @@ var mobileFirst = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]); |
import { defineComponent, $prefix, setup as _setup } from "@opentiny/vue-common"; | ||
import { renderless, api } from "@opentiny/vue-renderless/popconfirm/vue"; | ||
import Popover from "@opentiny/vue-popover"; | ||
import Modal from "@opentiny/vue-modal"; | ||
import Button from "@opentiny/vue-button"; | ||
@@ -58,3 +57,2 @@ import { iconSuccess, iconInfoSolid, iconWarning, iconError } from "@opentiny/vue-icon"; | ||
TinyPopover: Popover, | ||
TinyModal: Modal, | ||
TinyButton: Button, | ||
@@ -73,4 +71,4 @@ IconSuccess: iconSuccess(), | ||
}, | ||
content: String, | ||
popperClass: String, | ||
message: String, | ||
customClass: String, | ||
trigger: { | ||
@@ -80,3 +78,3 @@ type: String, | ||
validator: function validator(value) { | ||
return Boolean(~["click", "hover"].indexOf(value)); | ||
return ["click", "hover"].includes(value); | ||
} | ||
@@ -139,3 +137,3 @@ }, | ||
width: _ctx.width, | ||
"popper-class": _ctx.m("tiny-popconfirm-popover", _ctx.popperClass) | ||
"popper-class": _ctx.m("tiny-popconfirm-popover", _ctx.customClass) | ||
}, { | ||
@@ -156,3 +154,3 @@ reference: withCtx(function() { | ||
32 | ||
/* HYDRATE_EVENTS */ | ||
/* NEED_HYDRATION */ | ||
)]; | ||
@@ -181,3 +179,3 @@ }), | ||
_hoisted_5, | ||
toDisplayString(_ctx.content), | ||
toDisplayString(_ctx.message), | ||
1 | ||
@@ -184,0 +182,0 @@ /* TEXT */ |
{ | ||
"name": "@opentiny/vue-popconfirm", | ||
"version": "3.11.0", | ||
"version": "3.12.0", | ||
"description": "", | ||
@@ -10,10 +10,10 @@ "main": "./lib/index.js", | ||
"dependencies": { | ||
"@opentiny/vue-button": "~3.11.0", | ||
"@opentiny/vue-common": "~3.11.0", | ||
"@opentiny/vue-icon": "~3.11.0", | ||
"@opentiny/vue-modal": "~3.11.0", | ||
"@opentiny/vue-popover": "~3.11.0", | ||
"@opentiny/vue-renderless": "~3.11.0", | ||
"@opentiny/vue-theme": "~3.11.0", | ||
"@opentiny/vue-theme-mobile": "~3.11.0" | ||
"@opentiny/vue-button": "~3.12.0", | ||
"@opentiny/vue-common": "~3.12.0", | ||
"@opentiny/vue-icon": "~3.12.0", | ||
"@opentiny/vue-modal": "~3.12.0", | ||
"@opentiny/vue-popover": "~3.12.0", | ||
"@opentiny/vue-renderless": "~3.12.0", | ||
"@opentiny/vue-theme": "~3.12.0", | ||
"@opentiny/vue-theme-mobile": "~3.12.0" | ||
}, | ||
@@ -20,0 +20,0 @@ "license": "MIT", |
@@ -17,4 +17,4 @@ declare const _default: import("@vue/runtime-core").DefineComponent<{ | ||
}; | ||
content: StringConstructor; | ||
popperClass: StringConstructor; | ||
message: StringConstructor; | ||
customClass: StringConstructor; | ||
trigger: { | ||
@@ -63,4 +63,4 @@ type: StringConstructor; | ||
}; | ||
content: StringConstructor; | ||
popperClass: StringConstructor; | ||
message: StringConstructor; | ||
customClass: StringConstructor; | ||
trigger: { | ||
@@ -67,0 +67,0 @@ type: StringConstructor; |
@@ -1,64 +0,2 @@ | ||
declare const _default: import("@vue/runtime-core").DefineComponent<{ | ||
_constants: { | ||
type: ObjectConstructor; | ||
default: () => any; | ||
}; | ||
content: StringConstructor; | ||
popperClass: StringConstructor; | ||
trigger: { | ||
type: StringConstructor; | ||
default: string; | ||
validator: (value: string) => boolean; | ||
}; | ||
cancelButton: { | ||
type: BooleanConstructor; | ||
default: boolean; | ||
}; | ||
title: StringConstructor; | ||
placement: { | ||
type: StringConstructor; | ||
default: string; | ||
}; | ||
width: { | ||
type: (StringConstructor | NumberConstructor)[]; | ||
default: string; | ||
}; | ||
type: (ObjectConstructor | StringConstructor)[]; | ||
}, any, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("confirm" | "hide" | "show")[], "confirm" | "hide" | "show", import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{ | ||
_constants: { | ||
type: ObjectConstructor; | ||
default: () => any; | ||
}; | ||
content: StringConstructor; | ||
popperClass: StringConstructor; | ||
trigger: { | ||
type: StringConstructor; | ||
default: string; | ||
validator: (value: string) => boolean; | ||
}; | ||
cancelButton: { | ||
type: BooleanConstructor; | ||
default: boolean; | ||
}; | ||
title: StringConstructor; | ||
placement: { | ||
type: StringConstructor; | ||
default: string; | ||
}; | ||
width: { | ||
type: (StringConstructor | NumberConstructor)[]; | ||
default: string; | ||
}; | ||
type: (ObjectConstructor | StringConstructor)[]; | ||
}>> & { | ||
onConfirm?: ((...args: any[]) => any) | undefined; | ||
onHide?: ((...args: any[]) => any) | undefined; | ||
onShow?: ((...args: any[]) => any) | undefined; | ||
}, { | ||
_constants: Record<string, any>; | ||
width: string | number; | ||
trigger: string; | ||
placement: string; | ||
cancelButton: boolean; | ||
}, {}>; | ||
declare const _default: (props: Record<string, any> & {}) => any; | ||
export default _default; |
@@ -6,4 +6,4 @@ declare const _default: import("@vue/runtime-core").DefineComponent<{ | ||
}; | ||
content: StringConstructor; | ||
popperClass: StringConstructor; | ||
message: StringConstructor; | ||
customClass: StringConstructor; | ||
trigger: { | ||
@@ -33,4 +33,4 @@ type: StringConstructor; | ||
}; | ||
content: StringConstructor; | ||
popperClass: StringConstructor; | ||
message: StringConstructor; | ||
customClass: StringConstructor; | ||
trigger: { | ||
@@ -37,0 +37,0 @@ type: StringConstructor; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25872
766
+ Added@opentiny/vue-button@3.12.0(transitive)
+ Added@opentiny/vue-common@3.12.0(transitive)
+ Added@opentiny/vue-icon@3.12.0(transitive)
+ Added@opentiny/vue-locale@3.12.0(transitive)
+ Added@opentiny/vue-modal@3.12.0(transitive)
+ Added@opentiny/vue-popover@3.12.0(transitive)
+ Added@opentiny/vue-renderless@3.12.1(transitive)
+ Added@opentiny/vue-theme@3.12.1(transitive)
+ Added@opentiny/vue-theme-mobile@3.12.0(transitive)
- Removed@opentiny/vue-button@3.11.0(transitive)
- Removed@opentiny/vue-common@3.11.0(transitive)
- Removed@opentiny/vue-icon@3.11.0(transitive)
- Removed@opentiny/vue-locale@3.11.0(transitive)
- Removed@opentiny/vue-modal@3.11.0(transitive)
- Removed@opentiny/vue-popover@3.11.0(transitive)
- Removed@opentiny/vue-renderless@3.11.8(transitive)
- Removed@opentiny/vue-theme@3.11.6(transitive)
- Removed@opentiny/vue-theme-mobile@3.11.1(transitive)
Updated@opentiny/vue-button@~3.12.0
Updated@opentiny/vue-common@~3.12.0
Updated@opentiny/vue-icon@~3.12.0
Updated@opentiny/vue-modal@~3.12.0
Updated@opentiny/vue-theme@~3.12.0