@opentiny/vue-switch
Advanced tools
Comparing version 2.6.7 to 2.7.0
@@ -18,7 +18,14 @@ function _extends() { | ||
import MobileTemplate from "./mobile.js"; | ||
import MobileFirstTemplate from "./mobile-first.js"; | ||
var template = function template2(mode) { | ||
if ("mobile" === (process.env.TINY_MODE || mode)) | ||
if ("pc" === (process.env.TINY_MODE || mode)) { | ||
return PcTemplate; | ||
} | ||
if ("mobile" === (process.env.TINY_MODE || mode)) { | ||
return MobileTemplate; | ||
else | ||
return PcTemplate; | ||
} | ||
if ("mobile-first" === (process.env.TINY_MODE || mode)) { | ||
return MobileFirstTemplate; | ||
} | ||
return PcTemplate; | ||
}; | ||
@@ -47,4 +54,4 @@ var $constants = { | ||
showText: { | ||
type: Boolean, | ||
default: false | ||
type: Boolean || void 0, | ||
default: void 0 | ||
}, | ||
@@ -74,3 +81,7 @@ falseColor: String, | ||
}, | ||
beforeChange: Function | ||
beforeChange: Function, | ||
displayOnly: { | ||
type: Boolean, | ||
default: false | ||
} | ||
}), | ||
@@ -85,3 +96,3 @@ setup: function setup(props, context) { | ||
}); | ||
var version = "3.7.0"; | ||
var version = "2.7.0"; | ||
Switch.model = { | ||
@@ -88,0 +99,0 @@ prop: "modelValue", |
@@ -58,3 +58,3 @@ import { renderless, api } from "@opentiny/vue-renderless/switch/vue"; | ||
var __vue2_script = defineComponent({ | ||
var _sfc_main = defineComponent({ | ||
props: [].concat(props, ["modelValue", "trueValue", "falseValue", "disabled"]), | ||
@@ -70,6 +70,5 @@ setup: function setup(props2, context) { | ||
}); | ||
var render = function render2() { | ||
var _vm = this; | ||
var _h = _vm.$createElement; | ||
var _c = _vm._self._c || _h; | ||
var _sfc_render = function render() { | ||
var _vm = this, _c = _vm._self._c; | ||
_vm._self._setupProxy; | ||
return _c("span", { | ||
@@ -91,15 +90,7 @@ class: _vm.state.wrapClasses, | ||
}; | ||
var staticRenderFns = []; | ||
var __cssModules = {}; | ||
var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles, null, null, null); | ||
function __vue2_injectStyles(context) { | ||
for (var o in __cssModules) { | ||
this[o] = __cssModules[o]; | ||
} | ||
} | ||
var mobile = /* @__PURE__ */ function() { | ||
return __component__.exports; | ||
}(); | ||
var _sfc_staticRenderFns = []; | ||
var __component__ = /* @__PURE__ */ normalizeComponent(_sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, null, null, null); | ||
var mobile = __component__.exports; | ||
export { | ||
mobile as default | ||
}; |
@@ -58,3 +58,3 @@ import { renderless, api } from "@opentiny/vue-renderless/switch/vue"; | ||
var __vue2_script = defineComponent({ | ||
var _sfc_main = defineComponent({ | ||
emits: ["change", "update:modelValue"], | ||
@@ -71,8 +71,7 @@ props: [].concat(props, ["modelValue", "trueValue", "falseValue", "disabled", "mini", "tabindex", "showText", "beforeChange"]), | ||
}); | ||
var render = function render2() { | ||
var _vm = this; | ||
var _h = _vm.$createElement; | ||
var _c = _vm._self._c || _h; | ||
var _sfc_render = function render() { | ||
var _vm = this, _c = _vm._self._c; | ||
_vm._self._setupProxy; | ||
return _c("span", { | ||
class: [_vm.state.wrapClasses, _vm.showText ? "tiny-switch__text" : ""], | ||
class: [_vm.state.wrapClasses, _vm.state.showText ? "tiny-switch__text" : ""], | ||
attrs: { | ||
@@ -91,3 +90,3 @@ "tabindex": _vm.tabindex | ||
class: _vm.state.innerClasses | ||
}, [!_vm.mini && _vm.showText ? _c("div", [_vm.state.currentValue === _vm.trueValue ? _vm._t("open", function() { | ||
}, [!_vm.mini && _vm.state.showText ? _c("div", [_vm.state.currentValue === _vm.trueValue ? _vm._t("open", function() { | ||
return [_vm._v("ON")]; | ||
@@ -98,15 +97,7 @@ }) : _vm._e(), _vm.state.currentValue === _vm.falseValue ? _vm._t("close", function() { | ||
}; | ||
var staticRenderFns = []; | ||
var __cssModules = {}; | ||
var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles, null, null, null); | ||
function __vue2_injectStyles(context) { | ||
for (var o in __cssModules) { | ||
this[o] = __cssModules[o]; | ||
} | ||
} | ||
var pc = /* @__PURE__ */ function() { | ||
return __component__.exports; | ||
}(); | ||
var _sfc_staticRenderFns = []; | ||
var __component__ = /* @__PURE__ */ normalizeComponent(_sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, null, null, null); | ||
var pc = __component__.exports; | ||
export { | ||
pc as default | ||
}; |
{ | ||
"name": "@opentiny/vue-switch", | ||
"version": "2.6.7", | ||
"version": "2.7.0", | ||
"description": "", | ||
"main": "./lib/index.js", | ||
"module": "./lib/index.js", | ||
"sideEffects": false, | ||
"dependencies": { | ||
"@opentiny/vue-renderless": "~3.6.6", | ||
"@opentiny/vue-common": "~2.6.7" | ||
"@opentiny/vue-renderless": "~3.9.0", | ||
"@opentiny/vue-common": "~2.7.0" | ||
}, | ||
@@ -10,0 +12,0 @@ "license": "MIT", |
@@ -1,2 +0,2 @@ | ||
declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<() => import("vue").VNode> & import("@vue/composition-api").Data, {}, {}, { | ||
declare const _default: import("@opentiny/vue-common").DefineComponent<{ | ||
_constants: { | ||
@@ -17,7 +17,59 @@ type: ObjectConstructor; | ||
type: BooleanConstructor; | ||
default: undefined; | ||
}; | ||
falseColor: StringConstructor; | ||
falseValue: { | ||
type: (BooleanConstructor | NumberConstructor | StringConstructor)[]; | ||
default: boolean; | ||
}; | ||
mini: { | ||
type: BooleanConstructor; | ||
default: boolean; | ||
}; | ||
modelValue: { | ||
type: (BooleanConstructor | NumberConstructor | StringConstructor)[]; | ||
default: boolean; | ||
}; | ||
size: (NumberConstructor | StringConstructor)[]; | ||
tabindex: { | ||
type: StringConstructor; | ||
default: string; | ||
}; | ||
trueColor: StringConstructor; | ||
trueValue: { | ||
type: (BooleanConstructor | NumberConstructor | StringConstructor)[]; | ||
default: boolean; | ||
}; | ||
beforeChange: FunctionConstructor; | ||
displayOnly: { | ||
type: BooleanConstructor; | ||
default: boolean; | ||
}; | ||
tiny_mode: StringConstructor; | ||
tiny_mode_root: BooleanConstructor; | ||
tiny_template: (ObjectConstructor | FunctionConstructor)[]; | ||
tiny_renderless: FunctionConstructor; | ||
tiny_theme: StringConstructor; | ||
tiny_chart_theme: ObjectConstructor; | ||
}, () => import("vue").VNode, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("@opentiny/vue-common").ExtractPropTypes<{ | ||
_constants: { | ||
type: ObjectConstructor; | ||
default: () => { | ||
PC_PREFIXCLS: string; | ||
MOBILE_PREFIXCLS: string; | ||
Mode: string; | ||
prefixcls(mode: any): string; | ||
}; | ||
}; | ||
disabled: { | ||
type: BooleanConstructor; | ||
default: boolean; | ||
}; | ||
showText: { | ||
type: BooleanConstructor; | ||
default: undefined; | ||
}; | ||
falseColor: StringConstructor; | ||
falseValue: { | ||
type: (StringConstructor | BooleanConstructor | NumberConstructor)[]; | ||
type: (BooleanConstructor | NumberConstructor | StringConstructor)[]; | ||
default: boolean; | ||
@@ -30,6 +82,6 @@ }; | ||
modelValue: { | ||
type: (StringConstructor | BooleanConstructor | NumberConstructor)[]; | ||
type: (BooleanConstructor | NumberConstructor | StringConstructor)[]; | ||
default: boolean; | ||
}; | ||
size: (StringConstructor | NumberConstructor)[]; | ||
size: (NumberConstructor | StringConstructor)[]; | ||
tabindex: { | ||
@@ -41,39 +93,23 @@ type: StringConstructor; | ||
trueValue: { | ||
type: (StringConstructor | BooleanConstructor | NumberConstructor)[]; | ||
type: (BooleanConstructor | NumberConstructor | StringConstructor)[]; | ||
default: boolean; | ||
}; | ||
beforeChange: FunctionConstructor; | ||
}, { | ||
disabled: boolean; | ||
tabindex: string; | ||
displayOnly: { | ||
type: BooleanConstructor; | ||
default: boolean; | ||
}; | ||
tiny_mode: StringConstructor; | ||
tiny_mode_root: BooleanConstructor; | ||
tiny_template: (ObjectConstructor | FunctionConstructor)[]; | ||
tiny_renderless: FunctionConstructor; | ||
tiny_theme: StringConstructor; | ||
tiny_chart_theme: ObjectConstructor; | ||
}>>, { | ||
modelValue: string | number | boolean; | ||
tiny_mode_root: boolean; | ||
_constants: Record<string, any>; | ||
mini: boolean; | ||
showText: boolean; | ||
falseValue: string | number | boolean; | ||
trueValue: string | number | boolean; | ||
} & { | ||
size?: string | number | undefined; | ||
beforeChange?: Function | undefined; | ||
falseColor?: string | undefined; | ||
trueColor?: string | undefined; | ||
}> & import("vue").VueConstructor<import("vue").default> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{ | ||
disabled: boolean; | ||
tabindex: string; | ||
modelValue: string | number | boolean; | ||
_constants: Record<string, any>; | ||
mini: boolean; | ||
showText: boolean; | ||
falseValue: string | number | boolean; | ||
trueValue: string | number | boolean; | ||
} & { | ||
size?: string | number | undefined; | ||
beforeChange?: Function | undefined; | ||
falseColor?: string | undefined; | ||
trueColor?: string | undefined; | ||
}, import("@vue/composition-api").ShallowUnwrapRef<() => import("vue").VNode>, import("@vue/composition-api").Data, {}, {}, { | ||
disabled: boolean; | ||
tabindex: string; | ||
modelValue: string | number | boolean; | ||
_constants: Record<string, any>; | ||
displayOnly: boolean; | ||
mini: boolean; | ||
@@ -83,17 +119,3 @@ showText: boolean; | ||
trueValue: string | number | boolean; | ||
} & { | ||
size?: string | number | undefined; | ||
beforeChange?: Function | undefined; | ||
falseColor?: string | undefined; | ||
trueColor?: string | undefined; | ||
}, { | ||
disabled: boolean; | ||
tabindex: string; | ||
modelValue: string | number | boolean; | ||
_constants: Record<string, any>; | ||
mini: boolean; | ||
showText: boolean; | ||
falseValue: string | number | boolean; | ||
trueValue: string | number | boolean; | ||
}, true>); | ||
}>; | ||
export default _default; |
@@ -1,15 +0,4 @@ | ||
declare const _sfc_main: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{ | ||
t: (this: any, path: any, options?: any) => any; | ||
vm: any; | ||
f: (props: any, attrs?: {}) => {}; | ||
a: (attrs: any, filters: any, include: any) => {}; | ||
d: (props: any) => void; | ||
dp: (props: any) => void; | ||
}> & import("@vue/composition-api").Data, {}, {}, Readonly<{ | ||
declare const _sfc_main: import("@opentiny/vue-common").DefineComponent<Readonly<{ | ||
[x: string]: any; | ||
}>, { | ||
[x: string]: any; | ||
} & {}> & import("vue").VueConstructor<import("vue").default> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{ | ||
[x: string]: any; | ||
} & {}, import("@vue/composition-api").ShallowUnwrapRef<{ | ||
t: (this: any, path: any, options?: any) => any; | ||
@@ -21,7 +10,9 @@ vm: any; | ||
dp: (props: any) => void; | ||
}>, import("@vue/composition-api").Data, {}, {}, { | ||
gcls: (key: any) => any; | ||
m: (...cssClasses: any[]) => string; | ||
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("@opentiny/vue-common").ExtractPropTypes<Readonly<{ | ||
[x: string]: any; | ||
} & {}, { | ||
}>>>, { | ||
[x: string]: any; | ||
}, true>); | ||
}>; | ||
export default _sfc_main; |
@@ -1,15 +0,4 @@ | ||
declare const _sfc_main: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{ | ||
t: (this: any, path: any, options?: any) => any; | ||
vm: any; | ||
f: (props: any, attrs?: {}) => {}; | ||
a: (attrs: any, filters: any, include: any) => {}; | ||
d: (props: any) => void; | ||
dp: (props: any) => void; | ||
}> & import("@vue/composition-api").Data, {}, {}, Readonly<{ | ||
declare const _sfc_main: import("@opentiny/vue-common").DefineComponent<Readonly<{ | ||
[x: string]: any; | ||
}>, { | ||
[x: string]: any; | ||
} & {}> & import("vue").VueConstructor<import("vue").default> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{ | ||
[x: string]: any; | ||
} & {}, import("@vue/composition-api").ShallowUnwrapRef<{ | ||
t: (this: any, path: any, options?: any) => any; | ||
@@ -21,7 +10,9 @@ vm: any; | ||
dp: (props: any) => void; | ||
}>, import("@vue/composition-api").Data, {}, {}, { | ||
gcls: (key: any) => any; | ||
m: (...cssClasses: any[]) => string; | ||
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, ("update:modelValue" | "change")[], string, Readonly<import("@opentiny/vue-common").ExtractPropTypes<Readonly<{ | ||
[x: string]: any; | ||
} & {}, { | ||
}>>>, { | ||
[x: string]: any; | ||
}, true>); | ||
}>; | ||
export default _sfc_main; |
27877
12
697
4
+ Added@opentiny/vue-common@2.7.0(transitive)
+ Added@opentiny/vue-locale@2.7.0(transitive)
+ Added@opentiny/vue-renderless@3.9.3(transitive)
+ Added@opentiny/vue-theme@3.9.4(transitive)
+ Added@opentiny/vue-theme-mobile@3.9.0(transitive)
+ Addedtailwind-merge@1.14.0(transitive)
- Removed@babel/helper-string-parser@7.25.9(transitive)
- Removed@babel/helper-validator-identifier@7.25.9(transitive)
- Removed@babel/parser@7.26.9(transitive)
- Removed@babel/types@7.26.9(transitive)
- Removed@opentiny/vue-common@2.6.7(transitive)
- Removed@opentiny/vue-locale@2.6.7(transitive)
- Removed@opentiny/vue-renderless@3.6.8(transitive)
- Removed@opentiny/vue-theme@3.6.7(transitive)
- Removed@opentiny/vue-theme-mobile@3.6.6(transitive)
- Removed@vue/compiler-sfc@2.7.16(transitive)
- Removed@vue/composition-api@1.2.4(transitive)
- Removedcsstype@3.1.3(transitive)
- Removednanoid@3.3.8(transitive)
- Removedpicocolors@1.1.1(transitive)
- Removedpostcss@8.5.2(transitive)
- Removedprettier@2.8.8(transitive)
- Removedsource-map@0.6.1(transitive)
- Removedsource-map-js@1.2.1(transitive)
- Removedtslib@2.8.1(transitive)
- Removedvue@2.7.16(transitive)
Updated@opentiny/vue-common@~2.7.0