@opentiny/vue-dropdown-item 3.17.0 → 3.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -115,7 +115,7 @@ var DropdownItem = defineComponent({
115
115
  });
116
116
  }
117
117
  });
118
- var version = "3.17.0";
118
+ var version = "3.18.0";
119
119
  DropdownItem.model = {
120
120
  prop: "modelValue",
121
121
  event: "update:modelValue"
@@ -32,7 +32,7 @@ function _arrayLikeToArray(r, a) {
32
32
  var _export_sfc = function _export_sfc2(sfc, props) {
33
33
  var target = sfc.__vccOpts || sfc;
34
34
  for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
35
- var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
35
+ var _step$value2 = _step.value, key = _step$value2[0], val = _step$value2[1];
36
36
  target[key] = val;
37
37
  }
38
38
  return target;
package/lib/mobile.js CHANGED
@@ -37,7 +37,7 @@ function _arrayLikeToArray(r, a) {
37
37
  var _export_sfc = function _export_sfc2(sfc, props) {
38
38
  var target = sfc.__vccOpts || sfc;
39
39
  for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
40
- var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
40
+ var _step$value2 = _step.value, key = _step$value2[0], val = _step$value2[1];
41
41
  target[key] = val;
42
42
  }
43
43
  return target;
package/lib/pc.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { defineComponent, $prefix, props, setup } from '@opentiny/vue-common';
2
2
  import { renderless, api } from '@opentiny/vue-renderless/dropdown-item/vue';
3
3
  import { iconDeltaLeft } from '@opentiny/vue-icon';
4
- import Tooltip from '@opentiny/vue-tooltip';
5
4
  import '@opentiny/vue-theme/dropdown-item/index.css';
6
- import { resolveComponent, openBlock, createBlock, withCtx, createElementVNode, normalizeClass, withModifiers, createElementBlock, resolveDynamicComponent, createCommentVNode, renderSlot, toDisplayString, Fragment, renderList } from 'vue';
5
+ import { AutoTip } from '@opentiny/vue-directive';
6
+ import { resolveComponent, resolveDirective, withDirectives, openBlock, createElementBlock, normalizeClass, withModifiers, createElementVNode, createBlock, resolveDynamicComponent, createCommentVNode, renderSlot, toDisplayString, Fragment, renderList, withCtx } from 'vue';
7
7
 
8
8
  function _createForOfIteratorHelperLoose(r, e) {
9
9
  var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
@@ -35,7 +35,7 @@ function _arrayLikeToArray(r, a) {
35
35
  var _export_sfc = function _export_sfc2(sfc, props) {
36
36
  var target = sfc.__vccOpts || sfc;
37
37
  for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
38
- var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
38
+ var _step$value2 = _step.value, key = _step$value2[0], val = _step$value2[1];
39
39
  target[key] = val;
40
40
  }
41
41
  return target;
@@ -44,6 +44,9 @@ var _export_sfc = function _export_sfc2(sfc, props) {
44
44
  var _sfc_main = defineComponent({
45
45
  name: $prefix + "DropdownItem",
46
46
  componentName: $prefix + "DropdownItem",
47
+ directives: {
48
+ AutoTip
49
+ },
47
50
  emits: ["item-click", "update:modelValue", "change", "closed", "open", "opened", "close", "confirm", "reset"],
48
51
  props: [].concat(props, [
49
52
  "disabled",
@@ -66,8 +69,7 @@ var _sfc_main = defineComponent({
66
69
  "tipPosition"
67
70
  ]),
68
71
  components: {
69
- IconDeltaLeft: iconDeltaLeft(),
70
- TinyTooltip: Tooltip
72
+ IconDeltaLeft: iconDeltaLeft()
71
73
  },
72
74
  setup: function setup$1(props2, context) {
73
75
  return setup({
@@ -94,79 +96,75 @@ var _hoisted_5 = {
94
96
  };
95
97
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
96
98
  var _component_tiny_dropdown_item = resolveComponent("tiny-dropdown-item");
97
- var _component_tiny_tooltip = resolveComponent("tiny-tooltip");
98
- return openBlock(), createBlock(_component_tiny_tooltip, {
99
+ var _directive_auto_tip = resolveDirective("auto-tip");
100
+ return withDirectives((openBlock(), createElementBlock("li", {
101
+ class: normalizeClass(["tiny-dropdown-item tiny-dropdown-menu__item", {
102
+ "is-disabled": _ctx.disabled,
103
+ "tiny-dropdown-item--divided tiny-dropdown-menu__item--divided": _ctx.divided,
104
+ "tiny-dropdown-item--check-status": _ctx.state.checkedStatus && _ctx.selected,
105
+ "has-children": _ctx.itemData.children && _ctx.itemData.children.length
106
+ }]),
107
+ ref: "dropdownItem",
108
+ onClick: _cache[0] || (_cache[0] = withModifiers(function() {
109
+ return _ctx.handleClick && _ctx.handleClick.apply(_ctx, arguments);
110
+ }, ["stop"])),
111
+ onMousedown: _cache[1] || (_cache[1] = withModifiers(function() {
112
+ }, ["stop"])),
113
+ "aria-disabled": _ctx.disabled,
114
+ tabindex: _ctx.disabled ? null : -1
115
+ }, [createElementVNode("div", _hoisted_2, [_ctx.itemData.children && _ctx.itemData.children.length ? (openBlock(), createElementBlock("span", _hoisted_3, [(openBlock(), createBlock(resolveDynamicComponent(_ctx.state.getIcon)))])) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_4, [_ctx.icon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon), {
116
+ key: 0,
117
+ class: "tiny-svg-size"
118
+ })) : createCommentVNode("v-if", true), createElementVNode("span", _hoisted_5, [renderSlot(_ctx.$slots, "default", {
119
+ itemData: _ctx.itemData
120
+ }, function() {
121
+ return [createElementVNode(
122
+ "span",
123
+ null,
124
+ toDisplayString(_ctx.label),
125
+ 1
126
+ /* TEXT */
127
+ )];
128
+ })])]), _ctx.itemData.children && _ctx.itemData.children.length ? (openBlock(), createElementBlock(
129
+ "ul",
130
+ {
131
+ key: 1,
132
+ class: normalizeClass(["tiny-dropdown-menu", "tiny-dropdown-item--child tiny-dropdown-menu__item--child", _ctx.state.popperClass])
133
+ },
134
+ [(openBlock(true), createElementBlock(
135
+ Fragment,
136
+ null,
137
+ renderList(_ctx.itemData.children, function(item, index) {
138
+ return openBlock(), createBlock(_component_tiny_dropdown_item, {
139
+ key: index,
140
+ label: item[_ctx.state.textField],
141
+ "item-data": item,
142
+ icon: item.icon,
143
+ disabled: item.disabled,
144
+ divided: item.divided,
145
+ tip: item.tip,
146
+ "tip-position": item.tipPosition
147
+ }, {
148
+ default: withCtx(function() {
149
+ return [renderSlot(_ctx.$slots, "default", {
150
+ itemData: item
151
+ })];
152
+ }),
153
+ _: 2
154
+ /* DYNAMIC */
155
+ }, 1032, ["label", "item-data", "icon", "disabled", "divided", "tip", "tip-position"]);
156
+ }),
157
+ 128
158
+ /* KEYED_FRAGMENT */
159
+ ))],
160
+ 2
161
+ /* CLASS */
162
+ )) : createCommentVNode("v-if", true)])], 42, _hoisted_1)), [[_directive_auto_tip, {
163
+ always: true,
99
164
  content: _ctx.getTip,
165
+ effect: "dark",
100
166
  placement: _ctx.tipPosition
101
- }, {
102
- default: withCtx(function() {
103
- return [createElementVNode("li", {
104
- class: normalizeClass(["tiny-dropdown-item tiny-dropdown-menu__item", {
105
- "is-disabled": _ctx.disabled,
106
- "tiny-dropdown-item--divided tiny-dropdown-menu__item--divided": _ctx.divided,
107
- "tiny-dropdown-item--check-status": _ctx.state.checkedStatus && _ctx.selected,
108
- "has-children": _ctx.itemData.children && _ctx.itemData.children.length
109
- }]),
110
- ref: "dropdownItem",
111
- onClick: _cache[0] || (_cache[0] = withModifiers(function() {
112
- return _ctx.handleClick && _ctx.handleClick.apply(_ctx, arguments);
113
- }, ["stop"])),
114
- onMousedown: _cache[1] || (_cache[1] = withModifiers(function() {
115
- }, ["stop"])),
116
- "aria-disabled": _ctx.disabled,
117
- tabindex: _ctx.disabled ? null : -1
118
- }, [createElementVNode("div", _hoisted_2, [_ctx.itemData.children && _ctx.itemData.children.length ? (openBlock(), createElementBlock("span", _hoisted_3, [(openBlock(), createBlock(resolveDynamicComponent(_ctx.state.getIcon)))])) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_4, [_ctx.icon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon), {
119
- key: 0,
120
- class: "tiny-svg-size"
121
- })) : createCommentVNode("v-if", true), createElementVNode("span", _hoisted_5, [renderSlot(_ctx.$slots, "default", {
122
- itemData: _ctx.itemData
123
- }, function() {
124
- return [createElementVNode(
125
- "span",
126
- null,
127
- toDisplayString(_ctx.label),
128
- 1
129
- /* TEXT */
130
- )];
131
- })])]), _ctx.itemData.children && _ctx.itemData.children.length ? (openBlock(), createElementBlock(
132
- "ul",
133
- {
134
- key: 1,
135
- class: normalizeClass(["tiny-dropdown-menu", "tiny-dropdown-item--child tiny-dropdown-menu__item--child", _ctx.state.popperClass])
136
- },
137
- [(openBlock(true), createElementBlock(
138
- Fragment,
139
- null,
140
- renderList(_ctx.itemData.children, function(item, index) {
141
- return openBlock(), createBlock(_component_tiny_dropdown_item, {
142
- key: index,
143
- label: item[_ctx.state.textField],
144
- "item-data": item,
145
- icon: item.icon,
146
- disabled: item.disabled,
147
- divided: item.divided,
148
- tip: item.tip,
149
- "tip-position": item.tipPosition
150
- }, {
151
- default: withCtx(function() {
152
- return [renderSlot(_ctx.$slots, "default", {
153
- itemData: item
154
- })];
155
- }),
156
- _: 2
157
- /* DYNAMIC */
158
- }, 1032, ["label", "item-data", "icon", "disabled", "divided", "tip", "tip-position"]);
159
- }),
160
- 128
161
- /* KEYED_FRAGMENT */
162
- ))],
163
- 2
164
- /* CLASS */
165
- )) : createCommentVNode("v-if", true)])], 42, _hoisted_1)];
166
- }),
167
- _: 3
168
- /* FORWARDED */
169
- }, 8, ["content", "placement"]);
167
+ }]]);
170
168
  }
171
169
  var pc = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
172
170
 
package/package.json CHANGED
@@ -1,22 +1,22 @@
1
1
  {
2
2
  "name": "@opentiny/vue-dropdown-item",
3
- "version": "3.17.0",
3
+ "type": "module",
4
+ "version": "3.18.0",
4
5
  "description": "",
6
+ "license": "MIT",
7
+ "sideEffects": false,
5
8
  "main": "./lib/index.js",
6
9
  "module": "./lib/index.js",
7
- "sideEffects": false,
8
- "type": "module",
9
10
  "dependencies": {
10
- "@opentiny/vue-common": "~3.17.0",
11
- "@opentiny/vue-icon": "~3.17.0",
12
- "@opentiny/vue-renderless": "~3.17.0",
13
- "@opentiny/vue-popup": "~3.17.0",
14
- "@opentiny/vue-button": "~3.17.0",
15
- "@opentiny/vue-tooltip": "~3.17.0",
16
- "@opentiny/vue-theme-mobile": "~3.17.0",
17
- "@opentiny/vue-theme": "~3.17.0"
11
+ "@opentiny/vue-button": "~3.18.0",
12
+ "@opentiny/vue-common": "~3.18.0",
13
+ "@opentiny/vue-directive": "~3.18.0",
14
+ "@opentiny/vue-icon": "~3.18.0",
15
+ "@opentiny/vue-popup": "~3.18.0",
16
+ "@opentiny/vue-renderless": "~3.18.0",
17
+ "@opentiny/vue-theme": "~3.18.0",
18
+ "@opentiny/vue-theme-mobile": "~3.18.0"
18
19
  },
19
- "license": "MIT",
20
20
  "types": "index.d.ts",
21
21
  "scripts": {
22
22
  "build": "pnpm -w build:ui $npm_package_name",