@opentiny/vue-checkbox
Advanced tools
Comparing version 2.13.0 to 2.14.0
@@ -88,3 +88,7 @@ function _extends() { | ||
}, | ||
iconPosition: String | ||
iconPosition: String, | ||
shape: { | ||
type: String, | ||
default: "" | ||
} | ||
}); | ||
@@ -102,3 +106,3 @@ var Checkbox = defineComponent({ | ||
}); | ||
var version = "2.13.0"; | ||
var version = "2.14.0"; | ||
Checkbox.model = { | ||
@@ -105,0 +109,0 @@ prop: "modelValue", |
@@ -81,3 +81,5 @@ import { renderless, api } from "@opentiny/vue-renderless/checkbox/vue"; | ||
return _c("label", _vm._b({ | ||
class: _vm.m("inline-flex sm:items-center text-sm sm:py-2 leading-5 cursor-pointer", _vm.state.size === "medium" ? "sm:text-sm" : "sm:text-xs", _vm.customClass), | ||
class: _vm.m("inline-flex sm:items-center text-sm leading-5 cursor-pointer", _vm.state.size === "medium" ? "sm:text-sm" : "sm:text-xs", { | ||
"sm:py-2": _vm.state.vertical | ||
}, _vm.state.isDisplayOnly || _vm.state.isGroupDisplayOnly ? _vm.state.isChecked ? "cursor-default after:content-[';'] after:inline-block last:after:content-['']" : "hidden" : "", _vm.state.showLabel ? "inline-flex" : "", _vm.customClass), | ||
attrs: { | ||
@@ -89,3 +91,3 @@ "data-tag": "tiny-checkbox", | ||
}, "label", _vm.a(_vm.$attrs, ["class", "style", "onClick"], true), false), [_c("span", { | ||
class: ["relative w-11 h-11 sm:p-0", _vm.state.size === "medium" ? "sm:w-6 sm:h-6" : "sm:h-4 sm:w-4", _vm.state.isDisplayOnly || _vm.state.isGroupDisplayOnly ? "hidden" : ""], | ||
class: ["relative w-7 h-7 mr-2 sm:mr-0 sm:p-0", _vm.state.size === "medium" ? "sm:w-6 sm:h-6" : "sm:h-4 sm:w-4", _vm.state.isDisplayOnly || _vm.state.isGroupDisplayOnly ? "hidden" : ""], | ||
attrs: { | ||
@@ -121,3 +123,3 @@ "role": _vm.indeterminate ? "checkbox" : false, | ||
}], | ||
staticClass: "absolute inset-0 w-0 h-0 -z-10 opacity-0", | ||
staticClass: "absolute left-0 right-0 top-0 bottom-0 w-0 h-0 -z-10 opacity-0", | ||
attrs: { | ||
@@ -127,3 +129,3 @@ "type": "checkbox", | ||
"name": _vm.name, | ||
"disabled": _vm.state.isDisabled, | ||
"disabled": _vm.state.inputDisabled, | ||
"true-value": _vm.trueLabel, | ||
@@ -166,7 +168,7 @@ "false-value": _vm.falseLabel | ||
}], | ||
staticClass: "absolute inset-0 w-0 h-0 -z-10 opacity-0", | ||
staticClass: "absolute left-0 right-0 top-0 bottom-0 w-0 h-0 -z-10 opacity-0", | ||
attrs: { | ||
"type": "checkbox", | ||
"aria-hidden": _vm.indeterminate ? "true" : "false", | ||
"disabled": _vm.state.isDisabled, | ||
"disabled": _vm.state.inputDisabled, | ||
"name": _vm.name | ||
@@ -204,6 +206,8 @@ }, | ||
ref: "label", | ||
staticClass: "py-3 sm:py-0 pl-0 sm:pl-2 text-color-text-primary mr-5 flex-auto" | ||
class: _vm.m("py-0 pl-0 sm:pl-2 mr-5 flex-auto leading-7 sm:leading-none", _vm.state.isDisabled ? "cursor-not-allowed text-color-text-disabled" : "text-color-text-primary", _vm.state.isDisplayOnly || _vm.state.isGroupDisplayOnly ? "p-0 sm:p-0 m-0 text-color-text-primary cursor-default" : "") | ||
}, [_vm._t("default", function() { | ||
return [_vm._v(_vm._s(_vm.text || _vm.label))]; | ||
})], 2) : _vm._e()]); | ||
})], 2) : [_vm.state.isDisplayOnly ? _c("span", { | ||
staticClass: "text-color-text-primary cursor-default" | ||
}, [_vm._v(" " + _vm._s(_vm.state.displayLabel))]) : _vm._e()]], 2); | ||
}; | ||
@@ -210,0 +214,0 @@ var staticRenderFns = []; |
@@ -59,4 +59,4 @@ import { renderless, api } from "@opentiny/vue-renderless/checkbox/vue"; | ||
var __vue2_script = defineComponent({ | ||
inheritAttrs: false, | ||
props: [].concat(props, ["modelValue", "text", "events", "label", "indeterminate", "disabled", "checked", "name", "trueLabel", "falseLabel", "id", "iconPosition"]), | ||
emits: ["update:modelValue", "change", "complete", "click"], | ||
setup: function setup(props2, context) { | ||
@@ -63,0 +63,0 @@ return _setup({ |
@@ -5,2 +5,3 @@ import { renderless, api } from "@opentiny/vue-renderless/checkbox/vue"; | ||
import { iconHalfselect, iconCheckedSur, iconCheck } from "@opentiny/vue-icon"; | ||
import Tooltip from "@opentiny/vue-tooltip"; | ||
function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) { | ||
@@ -61,8 +62,9 @@ var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports; | ||
var __vue2_script = defineComponent({ | ||
emits: ["change", "update:modelValue", "complete"], | ||
props: [].concat(props, ["modelValue", "text", "events", "label", "indeterminate", "disabled", "checked", "name", "trueLabel", "falseLabel", "id", "controls", "size", "border", "validateEvent", "displayOnly"]), | ||
emits: ["update:modelValue", "change", "complete", "click"], | ||
props: [].concat(props, ["modelValue", "text", "events", "label", "indeterminate", "disabled", "checked", "name", "trueLabel", "falseLabel", "id", "controls", "size", "border", "validateEvent", "displayOnly", "shape"]), | ||
components: { | ||
IconHalfselect: iconHalfselect(), | ||
IconCheckedSur: iconCheckedSur(), | ||
IconCheck: iconCheck() | ||
IconCheck: iconCheck(), | ||
TinyTooltip: Tooltip | ||
}, | ||
@@ -94,2 +96,4 @@ setup: function setup(props2, context) { | ||
"is-display-only": _vm.state.isDisplayOnly | ||
}, { | ||
"is-filter": _vm.state.shape === "filter" | ||
}], | ||
@@ -117,3 +121,3 @@ attrs: { | ||
} | ||
}, [_vm.indeterminate ? _c("icon-halfselect", { | ||
}, [_vm.indeterminate && _vm.state.shape !== "filter" ? _c("icon-halfselect", { | ||
staticClass: "tiny-svg-size icon-halfselect" | ||
@@ -210,5 +214,24 @@ }) : _vm.state.isChecked ? _c("icon-checked-sur", { | ||
})]), _vm.slots.default && _vm.slots.default() || _vm.state.isShowText ? _c("span", { | ||
staticClass: "tiny-checkbox__label tiny-checkbox-display-only" | ||
staticClass: "tiny-checkbox__label tiny-checkbox-display-only", | ||
on: { | ||
"mouseenter": _vm.handleLabelMouseenter, | ||
"mouseleave": _vm.handleMouseleave | ||
} | ||
}, [_vm._t("default", function() { | ||
return [_vm._v(_vm._s(_vm.state.showText))]; | ||
}), _c("tiny-tooltip", { | ||
ref: "tooltip", | ||
attrs: { | ||
"manual": true, | ||
"effect": "light", | ||
"content": _vm.state.displayedValue, | ||
"placement": "top" | ||
}, | ||
model: { | ||
value: _vm.state.tooltipVisible, | ||
callback: function callback($$v) { | ||
_vm.$set(_vm.state, "tooltipVisible", $$v); | ||
}, | ||
expression: "state.tooltipVisible" | ||
} | ||
})], 2) : _vm._e()]); | ||
@@ -215,0 +238,0 @@ }; |
{ | ||
"name": "@opentiny/vue-checkbox", | ||
"version": "2.13.0", | ||
"version": "2.14.0", | ||
"description": "", | ||
@@ -10,4 +10,8 @@ "main": "./lib/index.js", | ||
"dependencies": { | ||
"@opentiny/vue-common": "~2.13.0", | ||
"@opentiny/vue-renderless": "~3.13.0" | ||
"@opentiny/vue-common": "~2.14.0", | ||
"@opentiny/vue-renderless": "~3.14.0", | ||
"@opentiny/vue-tooltip": "~2.14.0", | ||
"@opentiny/vue-icon": "~2.14.0", | ||
"@opentiny/vue-theme-mobile": "~3.14.0", | ||
"@opentiny/vue-theme": "~3.14.0" | ||
}, | ||
@@ -14,0 +18,0 @@ "license": "MIT", |
@@ -54,2 +54,6 @@ import type { PropType } from '@opentiny/vue-common'; | ||
iconPosition: PropType<IconPosition>; | ||
shape: { | ||
type: StringConstructor; | ||
default: string; | ||
}; | ||
tiny_mode: StringConstructor; | ||
@@ -56,0 +60,0 @@ tiny_mode_root: BooleanConstructor; |
31171
951
864
6
+ Added@opentiny/vue-icon@~2.14.0
+ Added@opentiny/vue-theme@~3.14.0
+ Added@opentiny/vue-common@2.14.0(transitive)
+ Added@opentiny/vue-icon@2.14.0(transitive)
+ Added@opentiny/vue-locale@2.14.0(transitive)
+ Added@opentiny/vue-renderless@3.14.1(transitive)
+ Added@opentiny/vue-theme@3.14.1(transitive)
+ Added@opentiny/vue-theme-mobile@3.14.2(transitive)
+ Added@opentiny/vue-tooltip@2.14.0(transitive)
+ Added@vue/composition-api@1.7.2(transitive)
+ Addedvue@2.6.14(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.13.1(transitive)
- Removed@opentiny/vue-locale@2.13.0(transitive)
- Removed@opentiny/vue-renderless@3.13.2(transitive)
- Removed@opentiny/vue-theme@3.13.3(transitive)
- Removed@opentiny/vue-theme-mobile@3.13.0(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.14.0