@opentiny/vue-option
Advanced tools
Comparing version 3.17.0 to 3.18.0
@@ -65,3 +65,3 @@ function _extends() { | ||
}); | ||
var version = "3.17.0"; | ||
var version = "3.18.0"; | ||
Option.install = function(Vue) { | ||
@@ -68,0 +68,0 @@ Vue.component(Option.name, Option); |
import { renderless, api } from '@opentiny/vue-renderless/option/vue'; | ||
import { defineComponent, props, setup } from '@opentiny/vue-common'; | ||
import { AutoTip } from '@opentiny/vue-directive'; | ||
import { iconCheck, iconCheckedSur, iconFinish } from '@opentiny/vue-icon'; | ||
import { resolveComponent, withDirectives, openBlock, createElementBlock, withModifiers, normalizeClass, createBlock, resolveDynamicComponent, createCommentVNode, renderSlot, createElementVNode, toDisplayString, createVNode, vShow } from 'vue'; | ||
import { resolveComponent, resolveDirective, withDirectives, openBlock, createElementBlock, withModifiers, normalizeClass, createBlock, resolveDynamicComponent, createCommentVNode, renderSlot, createTextVNode, toDisplayString, createVNode, vShow } from 'vue'; | ||
@@ -36,3 +37,3 @@ function _createForOfIteratorHelperLoose(r, e) { | ||
for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) { | ||
var _step$value = _step.value, key = _step$value[0], val = _step$value[1]; | ||
var _step$value2 = _step.value, key = _step$value2[0], val = _step$value2[1]; | ||
target[key] = val; | ||
@@ -44,2 +45,5 @@ } | ||
var _sfc_main = defineComponent({ | ||
directives: { | ||
AutoTip | ||
}, | ||
components: { | ||
@@ -74,37 +78,47 @@ IconCheck: iconCheck(), | ||
var _component_icon_finish = resolveComponent("icon-finish"); | ||
return withDirectives((openBlock(), createElementBlock("div", { | ||
ref: "option", | ||
onMouseenter: _cache[0] || (_cache[0] = function() { | ||
return _ctx.hoverItem && _ctx.hoverItem.apply(_ctx, arguments); | ||
}), | ||
onClick: _cache[1] || (_cache[1] = withModifiers(function() { | ||
return _ctx.selectOptionClick && _ctx.selectOptionClick.apply(_ctx, arguments); | ||
}, ["stop"])), | ||
onMousedown: _cache[2] || (_cache[2] = withModifiers(function() { | ||
}, ["stop"])), | ||
"data-index": _ctx.state.index, | ||
class: normalizeClass(_ctx.m("h-fit flex items-center justify-between rounded text-color-text-primary text-sm sm:text-xs", "min-h-[40px] sm:min-h-[32px] cursor-pointer group sm:hover:bg-color-bg-4 sm:active:bg-color-bg-3 pl-0 pr-3 sm:px-3 my-1 sm:m-1", { | ||
"text-color-brand bg-color-bg-1 sm:bg-color-fill-6": _ctx.state.itemSelected && !_ctx.disabled, | ||
"text-color-text-disabled cursor-not-allowed [&_svg]:fill-color-icon-disabled [&_svg_path:first-of-type]:fill-color-bg-3": _ctx.disabled || _ctx.state.groupDisabled || _ctx.state.limitReached, | ||
"bg-color-bg-1 sm:bg-color-bg-4": _ctx.state.hover, | ||
"text-color-text-disabled cursor-not-allowed": _ctx.required | ||
}, _ctx.highlightClass)), | ||
"data-tag": "tiny-select-dropdown-item" | ||
}, [_ctx.state.selectMultiple ? (openBlock(), createElementBlock("span", _hoisted_2, [(openBlock(), createBlock(resolveDynamicComponent("icon-" + _ctx.state.selectCls), { | ||
class: normalizeClass(_ctx.m("fill-color-icon-secondary relative", { | ||
"group-hover:fill-color-brand-hover": _ctx.state.hover, | ||
"fill-color-brand": _ctx.state.itemSelected, | ||
"fill-color-brand-disabled": _ctx.state.itemSelected && _ctx.required | ||
})) | ||
}, null, 8, ["class"]))])) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "default", {}, function() { | ||
return [createElementVNode( | ||
"span", | ||
_hoisted_3, | ||
toDisplayString(_ctx.state.currentLabel), | ||
1 | ||
/* TEXT */ | ||
)]; | ||
}), !_ctx.state.selectMultiple && _ctx.state.itemSelected && !_ctx.disabled && !_ctx.state.groupDisabled ? (openBlock(), createElementBlock("span", _hoisted_4, [createVNode(_component_icon_finish, { | ||
"custom-class": "w-4 h-4 fill-color-brand" | ||
})])) : createCommentVNode("v-if", true)], 42, _hoisted_1)), [[vShow, _ctx.visible && _ctx.state.visible]]); | ||
var _directive_auto_tip = resolveDirective("auto-tip"); | ||
return withDirectives((openBlock(), createElementBlock( | ||
"div", | ||
{ | ||
ref: "option", | ||
onClick: _cache[0] || (_cache[0] = withModifiers(function() { | ||
return _ctx.selectOptionClick && _ctx.selectOptionClick.apply(_ctx, arguments); | ||
}, ["stop"])), | ||
onMousedown: _cache[1] || (_cache[1] = withModifiers(function() { | ||
}, ["stop"])), | ||
"data-index": _ctx.state.index, | ||
class: normalizeClass(_ctx.m("h-fit flex items-center justify-between rounded text-color-text-primary text-sm sm:text-xs", "min-h-[40px] sm:min-h-[32px] cursor-pointer group sm:hover:bg-color-bg-4 sm:active:bg-color-bg-3 pl-0 pr-3 sm:px-3 my-1 sm:m-1", { | ||
"text-color-brand bg-color-bg-1 sm:bg-color-fill-6": _ctx.state.itemSelected && !_ctx.disabled, | ||
"text-color-text-disabled cursor-not-allowed [&_svg]:fill-color-icon-disabled [&_svg_path:first-of-type]:fill-color-bg-3": _ctx.disabled || _ctx.state.groupDisabled || _ctx.state.limitReached, | ||
"bg-color-bg-1 sm:bg-color-bg-4": _ctx.state.hover, | ||
"text-color-text-disabled cursor-not-allowed": _ctx.required | ||
}, _ctx.highlightClass)), | ||
"data-tag": "tiny-select-dropdown-item" | ||
}, | ||
[_ctx.state.selectMultiple ? (openBlock(), createElementBlock("span", _hoisted_2, [(openBlock(), createBlock( | ||
resolveDynamicComponent("icon-" + _ctx.state.selectCls), | ||
{ | ||
class: normalizeClass(_ctx.m("fill-color-icon-secondary relative", { | ||
"group-hover:fill-color-brand-hover": _ctx.state.hover, | ||
"fill-color-brand": _ctx.state.itemSelected, | ||
"fill-color-brand-disabled": _ctx.state.itemSelected && _ctx.required | ||
})) | ||
}, | ||
null, | ||
8, | ||
["class"] | ||
))])) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "default", {}, function() { | ||
return [withDirectives((openBlock(), createElementBlock("span", _hoisted_3, [createTextVNode( | ||
toDisplayString(_ctx.state.currentLabel), | ||
1 | ||
/* TEXT */ | ||
)])), [[_directive_auto_tip, { | ||
placement: "right" | ||
}]])]; | ||
}), !_ctx.state.selectMultiple && _ctx.state.itemSelected && !_ctx.disabled && !_ctx.state.groupDisabled ? (openBlock(), createElementBlock("span", _hoisted_4, [createVNode(_component_icon_finish, { | ||
"custom-class": "w-4 h-4 fill-color-brand" | ||
})])) : createCommentVNode("v-if", true)], | ||
42, | ||
_hoisted_1 | ||
)), [[vShow, _ctx.visible && _ctx.state.visible]]); | ||
} | ||
@@ -111,0 +125,0 @@ var mobileFirst = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]); |
import { renderless, api } from '@opentiny/vue-renderless/option/vue'; | ||
import { defineComponent, $prefix, props, setup } from '@opentiny/vue-common'; | ||
import { AutoTip } from '@opentiny/vue-directive'; | ||
import '@opentiny/vue-theme/option/index.css'; | ||
import { IconCheck, IconCheckedSur, IconFinish } from '@opentiny/vue-icon'; | ||
import { withDirectives, openBlock, createElementBlock, withModifiers, normalizeClass, createBlock, resolveDynamicComponent, createCommentVNode, createElementVNode, renderSlot, toDisplayString, vShow } from 'vue'; | ||
import { resolveDirective, withDirectives, openBlock, createElementBlock, withModifiers, normalizeClass, createBlock, resolveDynamicComponent, createCommentVNode, createElementVNode, renderSlot, createTextVNode, toDisplayString, vShow } from 'vue'; | ||
@@ -37,3 +38,3 @@ function _createForOfIteratorHelperLoose(r, e) { | ||
for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) { | ||
var _step$value = _step.value, key = _step$value[0], val = _step$value[1]; | ||
var _step$value2 = _step.value, key = _step$value2[0], val = _step$value2[1]; | ||
target[key] = val; | ||
@@ -47,2 +48,5 @@ } | ||
componentName: "Option", | ||
directives: { | ||
AutoTip | ||
}, | ||
components: { | ||
@@ -68,13 +72,13 @@ IconCheck: IconCheck(), | ||
}; | ||
var _hoisted_3 = ["title"]; | ||
var _hoisted_3 = { | ||
class: "tiny-option-label" | ||
}; | ||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { | ||
var _directive_auto_tip = resolveDirective("auto-tip"); | ||
return withDirectives((openBlock(), createElementBlock("li", { | ||
ref: "option", | ||
onMouseenter: _cache[0] || (_cache[0] = function() { | ||
return _ctx.hoverItem && _ctx.hoverItem.apply(_ctx, arguments); | ||
}), | ||
onClick: _cache[1] || (_cache[1] = withModifiers(function() { | ||
onClick: _cache[0] || (_cache[0] = withModifiers(function() { | ||
return _ctx.selectOptionClick && _ctx.selectOptionClick.apply(_ctx, arguments); | ||
}, ["stop"])), | ||
onMousedown: _cache[2] || (_cache[2] = withModifiers(function() { | ||
onMousedown: _cache[1] || (_cache[1] = withModifiers(function() { | ||
}, ["stop"])), | ||
@@ -100,6 +104,9 @@ "data-tag": "tiny-option", | ||
[renderSlot(_ctx.$slots, "default", {}, function() { | ||
return [createElementVNode("span", { | ||
class: "tiny-option-label", | ||
title: _ctx.state.showTitle ? _ctx.state.currentLabel : "" | ||
}, toDisplayString(_ctx.state.currentLabel), 9, _hoisted_3)]; | ||
return [withDirectives((openBlock(), createElementBlock("span", _hoisted_3, [createTextVNode( | ||
toDisplayString(_ctx.state.currentLabel), | ||
1 | ||
/* TEXT */ | ||
)])), [[_directive_auto_tip, { | ||
placement: "right" | ||
}]])]; | ||
})], | ||
@@ -106,0 +113,0 @@ 2 |
{ | ||
"name": "@opentiny/vue-option", | ||
"version": "3.17.0", | ||
"type": "module", | ||
"version": "3.18.0", | ||
"description": "", | ||
"license": "MIT", | ||
"sideEffects": false, | ||
"main": "./lib/index.js", | ||
"module": "./lib/index.js", | ||
"sideEffects": false, | ||
"type": "module", | ||
"dependencies": { | ||
"@opentiny/vue-renderless": "~3.17.0", | ||
"@opentiny/vue-common": "~3.17.0", | ||
"@opentiny/vue-icon": "~3.17.0", | ||
"@opentiny/vue-theme": "~3.17.0" | ||
"@opentiny/vue-common": "~3.18.0", | ||
"@opentiny/vue-directive": "~3.18.0", | ||
"@opentiny/vue-icon": "~3.18.0", | ||
"@opentiny/vue-renderless": "~3.18.0", | ||
"@opentiny/vue-theme": "~3.18.0" | ||
}, | ||
"license": "MIT", | ||
"types": "index.d.ts", | ||
@@ -17,0 +18,0 @@ "scripts": { |
20686
539
5
+ Added@opentiny/vue-common@3.18.0(transitive)
+ Added@opentiny/vue-directive@3.18.0(transitive)
+ Added@opentiny/vue-icon@3.18.0(transitive)
+ Added@opentiny/vue-locale@3.18.0(transitive)
+ Added@opentiny/vue-renderless@3.18.8(transitive)
+ Added@opentiny/vue-theme@3.18.4(transitive)
+ Added@opentiny/vue-theme-mobile@3.18.0(transitive)
+ Added@opentiny/vue-tooltip@3.18.0(transitive)
- Removed@opentiny/vue-common@3.17.0(transitive)
- Removed@opentiny/vue-icon@3.17.0(transitive)
- Removed@opentiny/vue-locale@3.17.0(transitive)
- Removed@opentiny/vue-renderless@3.17.6(transitive)
- Removed@opentiny/vue-theme@3.17.5(transitive)
- Removed@opentiny/vue-theme-mobile@3.17.0(transitive)
Updated@opentiny/vue-common@~3.18.0
Updated@opentiny/vue-icon@~3.18.0
Updated@opentiny/vue-theme@~3.18.0