Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@opentiny/vue-switch

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentiny/vue-switch - npm Package Compare versions

Comparing version 3.12.0 to 3.13.0-alpha.0

10

lib/index.js

@@ -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;

@@ -102,3 +104,3 @@ }

});
var version = "3.12.0";
var version = "3.13.0-alpha.0";
Switch.model = {

@@ -105,0 +107,0 @@ prop: "modelValue",

14

lib/mobile-first.js
import { renderless, api } from "@opentiny/vue-renderless/switch/vue";
import { defineComponent, props, setup as _setup } from "@opentiny/vue-common";
import { openBlock, createElementBlock, normalizeClass, withKeys, createElementVNode, renderSlot, createTextVNode, createCommentVNode } from "vue";
import { openBlock, createElementBlock, normalizeClass, withKeys, createElementVNode, renderSlot, createTextVNode, toDisplayString, createCommentVNode } from "vue";
function _createForOfIteratorHelperLoose_tiny(o, allowArrayLike) {

@@ -211,7 +211,15 @@ var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];

}, function() {
return [createTextVNode("A")];
return [createTextVNode(
toDisplayString(_ctx.t("yes")),
1
/* TEXT */
)];
}) : createCommentVNode("v-if", true), _ctx.state.currentValue === _ctx.falseValue ? renderSlot(_ctx.$slots, "close", {
key: 1
}, function() {
return [createTextVNode("B")];
return [createTextVNode(
toDisplayString(_ctx.t("no")),
1
/* TEXT */
)];
}) : createCommentVNode("v-if", true)])) : createCommentVNode("v-if", true), _ctx.types === "icon" ? (openBlock(), createElementBlock("div", _hoisted_3, [_ctx.state.currentValue === _ctx.trueValue ? renderSlot(_ctx.$slots, "open", {

@@ -218,0 +226,0 @@ key: 0

import { renderless, api } from "@opentiny/vue-renderless/switch/vue";
import { defineComponent, props, setup as _setup } from "@opentiny/vue-common";
import "@opentiny/vue-theme/switch/index.css";
import { openBlock, createElementBlock, normalizeClass, withKeys, createElementVNode, renderSlot, createTextVNode, createCommentVNode } from "vue";
import { openBlock, createElementBlock, normalizeClass, withKeys, createElementVNode, renderSlot, createTextVNode, createCommentVNode, toDisplayString } from "vue";
function _createForOfIteratorHelperLoose_tiny(o, allowArrayLike) {

@@ -66,4 +66,8 @@ var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];

};
var _hoisted_3 = {
key: 1
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createElementBlock("span", {
return !_ctx.state.isDisplayOnly ? (openBlock(), createElementBlock("span", {
key: 0,
class: normalizeClass([_ctx.state.wrapClasses, _ctx.state.showText ? "tiny-switch__text" : ""]),

@@ -93,3 +97,19 @@ tabindex: _ctx.tabindex,

/* CLASS */
)], 42, _hoisted_1);
)], 42, _hoisted_1)) : (openBlock(), createElementBlock("span", _hoisted_3, [_ctx.state.currentValue === _ctx.trueValue ? renderSlot(_ctx.$slots, "open", {
key: 0
}, function() {
return [createTextVNode(
toDisplayString(_ctx.t("yes")),
1
/* TEXT */
)];
}) : createCommentVNode("v-if", true), _ctx.state.currentValue === _ctx.falseValue ? renderSlot(_ctx.$slots, "close", {
key: 1
}, function() {
return [createTextVNode(
toDisplayString(_ctx.t("no")),
1
/* TEXT */
)];
}) : createCommentVNode("v-if", true)]));
}

@@ -96,0 +116,0 @@ var pc = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);

{
"name": "@opentiny/vue-switch",
"version": "3.12.0",
"version": "3.13.0-alpha.0",
"description": "",

@@ -10,4 +10,4 @@ "main": "./lib/index.js",

"dependencies": {
"@opentiny/vue-renderless": "~3.12.0",
"@opentiny/vue-common": "~3.12.0"
"@opentiny/vue-renderless": "~3.13.0-alpha.0",
"@opentiny/vue-common": "~3.13.0-alpha.0"
},

@@ -14,0 +14,0 @@ "license": "MIT",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc