@opentiny/vue-button
Advanced tools
Comparing version 3.12.0 to 3.13.0-alpha.0
@@ -20,9 +20,11 @@ function _extends() { | ||
var template = function template2(mode) { | ||
if ("pc" === (process.env.TINY_MODE || mode)) { | ||
var _process$env; | ||
var tinyMode = typeof process === "object" ? (_process$env = process.env) == null ? void 0 : _process$env.TINY_MODE : null; | ||
if ("pc" === (tinyMode || mode)) { | ||
return PcTemplate; | ||
} | ||
if ("mobile" === (process.env.TINY_MODE || mode)) { | ||
if ("mobile" === (tinyMode || mode)) { | ||
return MobileTemplate; | ||
} | ||
if ("mobile-first" === (process.env.TINY_MODE || mode)) { | ||
if ("mobile-first" === (tinyMode || mode)) { | ||
return MobileFirstTemplate; | ||
@@ -57,2 +59,6 @@ } | ||
}, | ||
href: { | ||
type: String, | ||
default: "" | ||
}, | ||
size: { | ||
@@ -78,3 +84,4 @@ type: String, | ||
default: false | ||
} | ||
}, | ||
ghost: Boolean | ||
}); | ||
@@ -97,3 +104,3 @@ var Button = defineComponent({ | ||
}); | ||
var version = "3.12.0"; | ||
var version = "3.13.0-alpha.0"; | ||
Button.install = function(Vue) { | ||
@@ -100,0 +107,0 @@ Vue.component(Button.name, Button); |
@@ -51,3 +51,3 @@ import { renderless, api } from "@opentiny/vue-renderless/button/vue"; | ||
var classes = { | ||
"button": "inline-block text-center overflow-hidden overflow-ellipsis whitespace-nowrap transition-button duration-300 delay-[0ms]", | ||
"button": "inline-block text-center overflow-hidden overflow-ellipsis whitespace-nowrap transition-button duration-300 delay-[0ms] active:transition-all active:scale-[0.95] active:ease-[cubic-bezier(0.33,0,0.67,1)]", | ||
"button-base-width": "sm:max-w-[theme(spacing.36)]", | ||
@@ -54,0 +54,0 @@ "size-default": "h-10 text-sm sm:h-7 sm:text-xs", |
import { renderless, api } from "@opentiny/vue-renderless/button/vue"; | ||
import { defineComponent, props, setup as _setup } from "@opentiny/vue-common"; | ||
import { iconLoading } from "@opentiny/vue-icon"; | ||
import "@opentiny/vue-theme-mobile/button/index.css"; | ||
import { resolveComponent, openBlock, createElementBlock, mergeProps, createBlock, createCommentVNode, resolveDynamicComponent, renderSlot, createElementVNode, normalizeStyle, toDisplayString } from "vue"; | ||
import { openBlock, createElementBlock, mergeProps, normalizeClass, createCommentVNode, createBlock, resolveDynamicComponent, renderSlot, createElementVNode, normalizeStyle, toDisplayString } from "vue"; | ||
function _createForOfIteratorHelperLoose_tiny(o, allowArrayLike) { | ||
@@ -53,6 +52,4 @@ var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; | ||
emits: ["hook-updated", "click"], | ||
props: [].concat(props, ["type", "text", "size", "icon", "resetTime", "nativeType", "loading", "disabled", "plain", "round", "customClass"]), | ||
components: { | ||
IconLoading: iconLoading() | ||
}, | ||
props: [].concat(props, ["type", "text", "size", "icon", "resetTime", "nativeType", "loading", "disabled", "customClass"]), | ||
components: {}, | ||
setup: function setup(props2, context) { | ||
@@ -68,10 +65,17 @@ return _setup({ | ||
var _hoisted_1 = ["disabled", "type"]; | ||
var _hoisted_2 = /* @__PURE__ */ createElementVNode( | ||
"div", | ||
{ | ||
class: "tiny-mobile-button-loading-inner" | ||
}, | ||
null, | ||
-1 | ||
/* HOISTED */ | ||
); | ||
var _hoisted_3 = [_hoisted_2]; | ||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { | ||
var _component_icon_loading = resolveComponent("icon-loading"); | ||
return openBlock(), createElementBlock("button", mergeProps({ | ||
class: ["tiny-mobile-button", [_ctx.type ? "tiny-mobile-button--" + _ctx.type : "", _ctx.size ? "tiny-mobile-button--" + _ctx.size : "", { | ||
"is-disabled": _ctx.state.buttonDisabled, | ||
"is-loading": _ctx.loading, | ||
"is-plain": _ctx.state.plain, | ||
"is-round": _ctx.round | ||
"is-loading": _ctx.loading | ||
}]], | ||
@@ -83,9 +87,15 @@ onClick: _cache[0] || (_cache[0] = function() { | ||
type: _ctx.nativeType | ||
}, _ctx.a(_ctx.$attrs, ["class", "style"], true)), [_ctx.loading ? (openBlock(), createBlock(_component_icon_loading, { | ||
key: 0, | ||
class: "tiny-icon-loading" | ||
})) : createCommentVNode("v-if", true), _ctx.icon && !_ctx.loading ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon), { | ||
}, _ctx.a(_ctx.$attrs, ["class", "style"], true)), [_ctx.loading ? (openBlock(), createElementBlock( | ||
"div", | ||
{ | ||
key: 0, | ||
class: normalizeClass(["tiny-mobile-button-loading", "tiny-mobile-button-loading-" + (_ctx.type === "primary" ? "white" : "black")]) | ||
}, | ||
_hoisted_3, | ||
2 | ||
/* CLASS */ | ||
)) : createCommentVNode("v-if", true), _ctx.icon && !_ctx.loading ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon), { | ||
key: 1, | ||
class: "tiny-icon is-icon" | ||
})) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "default", {}, function() { | ||
class: normalizeClass(["tiny-icon", "is-icon", _ctx.text ? "small" : null]) | ||
}, null, 8, ["class"])) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "default", {}, function() { | ||
return [createElementVNode( | ||
@@ -92,0 +102,0 @@ "span", |
@@ -53,3 +53,3 @@ import { renderless, api } from "@opentiny/vue-renderless/button/vue"; | ||
emits: ["click", "hook-updated"], | ||
props: [].concat(props, ["type", "text", "size", "icon", "resetTime", "nativeType", "loading", "disabled", "plain", "autofocus", "round", "circle", "tabindex", "customClass"]), | ||
props: [].concat(props, ["type", "text", "size", "icon", "resetTime", "nativeType", "loading", "disabled", "plain", "autofocus", "round", "circle", "tabindex", "customClass", "ghost"]), | ||
components: { | ||
@@ -75,2 +75,3 @@ IconLoading: iconLoading() | ||
"is-plain": _ctx.state.plain, | ||
"is-ghost": _ctx.ghost, | ||
"is-round": _ctx.round, | ||
@@ -77,0 +78,0 @@ "is-circle": _ctx.circle, |
{ | ||
"name": "@opentiny/vue-button", | ||
"version": "3.12.0", | ||
"version": "3.13.0-alpha.0", | ||
"description": "", | ||
@@ -10,5 +10,5 @@ "main": "./lib/index.js", | ||
"dependencies": { | ||
"@opentiny/vue-common": "~3.12.0", | ||
"@opentiny/vue-icon": "~3.12.0", | ||
"@opentiny/vue-renderless": "~3.12.0" | ||
"@opentiny/vue-common": "~3.13.0-alpha.0", | ||
"@opentiny/vue-icon": "~3.13.0-alpha.0", | ||
"@opentiny/vue-renderless": "~3.13.0-alpha.0" | ||
}, | ||
@@ -15,0 +15,0 @@ "license": "MIT", |
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
0
100
2
23069
6
479
2
+ Added@opentiny/vue-common@3.13.1(transitive)
+ Added@opentiny/vue-icon@3.13.0(transitive)
+ Added@opentiny/vue-locale@3.13.0(transitive)
+ Added@opentiny/vue-renderless@3.13.2(transitive)
+ Added@opentiny/vue-theme@3.13.3(transitive)
+ Added@opentiny/vue-theme-mobile@3.13.0(transitive)
- Removed@opentiny/vue-common@3.12.0(transitive)
- Removed@opentiny/vue-icon@3.12.0(transitive)
- Removed@opentiny/vue-locale@3.12.0(transitive)
- Removed@opentiny/vue-renderless@3.12.1(transitive)
- Removed@opentiny/vue-theme@3.12.1(transitive)
- Removed@opentiny/vue-theme-mobile@3.12.0(transitive)