@opentiny/vue-dropdown-item 3.9.0 → 3.11.0-alpha.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
@@ -12,7 +12,7 @@ function _extends() {
12
12
  };
13
13
  return _extends.apply(this, arguments);
14
14
  }
15
- import { defineComponent, $prefix, $props, $setup } from "@opentiny/vue-common";
15
+ import { defineComponent, $prefix, $setup, $props } from "@opentiny/vue-common";
16
16
  import PcTemplate from "./pc.js";
17
17
  import MobileTemplate from "./mobile.js";
18
18
  import MobileFirstTemplate from "./mobile-first.js";
@@ -33,69 +33,76 @@ var $constants = {
33
33
  leftWardArrow: "icon-delta-left"
34
34
  }
35
35
  };
36
+ var dropdownItemProps = _extends({}, $props, {
37
+ _constants: {
38
+ type: Object,
39
+ default: function _default() {
40
+ return $constants;
41
+ }
42
+ },
43
+ icon: [String, Object],
44
+ disabled: Boolean,
45
+ divided: Boolean,
46
+ itemData: {
47
+ type: [String, Object],
48
+ default: ""
49
+ },
50
+ title: String,
51
+ label: {
52
+ type: String,
53
+ default: ""
54
+ },
55
+ level: String,
56
+ titleClass: String,
57
+ options: {
58
+ type: Array,
59
+ default: function _default2() {
60
+ return [];
61
+ }
62
+ },
63
+ type: {
64
+ type: String,
65
+ default: "selection"
66
+ },
67
+ selected: {
68
+ type: Boolean,
69
+ default: false
70
+ },
71
+ selectedField: {
72
+ type: String,
73
+ default: "selected"
74
+ },
75
+ multiStage: {
76
+ type: Boolean,
77
+ default: false
78
+ },
79
+ currentIndex: {
80
+ type: Number,
81
+ default: function _default3() {
82
+ return -1;
83
+ }
84
+ },
85
+ appendToBody: {
86
+ type: Boolean,
87
+ default: true
88
+ },
89
+ textField: {
90
+ type: String,
91
+ default: "label"
92
+ },
93
+ tip: {
94
+ type: [String, Function],
95
+ default: ""
96
+ },
97
+ tipPosition: {
98
+ type: String,
99
+ default: "right"
100
+ }
101
+ });
36
102
  var DropdownItem = defineComponent({
37
103
  name: $prefix + "DropdownItem",
38
104
  componentName: "TinyDropdownItem",
39
- props: _extends({}, $props, {
40
- _constants: {
41
- type: Object,
42
- default: function _default() {
43
- return $constants;
44
- }
45
- },
46
- icon: [String, Object],
47
- disabled: Boolean,
48
- divided: Boolean,
49
- command: {},
50
- title: String,
51
- titleClass: String,
52
- options: {
53
- type: Array,
54
- default: function _default2() {
55
- return [];
56
- }
57
- },
58
- type: {
59
- type: String,
60
- default: "selection"
61
- },
62
- label: {
63
- type: String,
64
- default: ""
65
- },
66
- itemData: {
67
- type: Object,
68
- default: function _default3() {
69
- return {};
70
- }
71
- },
72
- appendToBody: {
73
- type: Boolean,
74
- default: true
75
- },
76
- textField: {
77
- type: String,
78
- default: "label"
79
- },
80
- selected: {
81
- type: Boolean,
82
- default: false
83
- },
84
- selectedField: {
85
- type: String,
86
- default: "selected"
87
- },
88
- multiStage: {
89
- type: Boolean,
90
- default: false
91
- },
92
- currentIndex: {
93
- type: Number,
94
- default: function _default4() {
95
- return -1;
96
- }
97
- }
98
- }),
105
+ props: dropdownItemProps,
99
106
  setup: function setup(props, context) {
100
107
  return $setup({
101
108
  props,
@@ -104,7 +111,7 @@ var DropdownItem = defineComponent({
104
111
  });
105
112
  }
106
113
  });
107
- var version = "3.9.0";
114
+ var version = "3.11.0-alpha.0";
108
115
  DropdownItem.model = {
109
116
  prop: "modelValue",
110
117
  event: "update:modelValue"
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, props, setup as _setup } from "@opentiny/vue-common";
2
2
  import { renderless, api } from "@opentiny/vue-renderless/dropdown-item/mf";
3
3
  import { openBlock, createElementBlock, normalizeClass, withModifiers, createElementVNode, createBlock, resolveDynamicComponent, createCommentVNode, renderSlot } from "vue";
4
- function _createForOfIteratorHelperLoose(o, allowArrayLike) {
4
+ function _createForOfIteratorHelperLoose_tiny(o, allowArrayLike) {
5
5
  var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
6
6
  if (it)
7
7
  return (it = it.call(o)).next.bind(it);
@@ -39,7 +39,7 @@ function _arrayLikeToArray(arr, len) {
39
39
  }
40
40
  var _export_sfc = function _export_sfc2(sfc, props) {
41
41
  var target = sfc.__vccOpts || sfc;
42
- for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
42
+ for (var _iterator = _createForOfIteratorHelperLoose_tiny(props), _step; !(_step = _iterator()).done; ) {
43
43
  var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
44
44
  target[key] = val;
45
45
  }
@@ -66,15 +66,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
66
66
  onMouseleave: _cache[1] || (_cache[1] = function() {
67
67
  return _ctx.mouseLeave && _ctx.mouseLeave.apply(_ctx, arguments);
68
68
  }),
69
- class: normalizeClass(["list-none leading-10 sm:leading-8 m-0 cursor-pointer outline-0 min-w-[4.5rem] max-w-[13.5rem] w-full [&_svg]:sm:w-3.5 [&_svg]:sm:h-3.5 [&_svg]:sm:mr-1.5 [&_svg]:mr-2 [&_svg]:align-text-bottom", {
70
- "text-color-text-primary active:bg-color-bg-4 visited:text-color-brand hover:bg-color-bg-4 focus:bg-color-bg-4": !_ctx.disabled
71
- }, {
72
- "cursor-not-allowed text-color-text-disabled [&_svg]:fill-color-text-disabled": _ctx.disabled
73
- }, {
69
+ class: normalizeClass(_ctx.m("list-none leading-10 sm:leading-8 m-0 outline-0 min-w-[theme(spacing.18)] max-w-[theme(spacing.52)] w-full [&_svg]:sm:w-3.5 [&_svg]:sm:h-3.5 [&_svg]:sm:mr-1.5 [&_svg]:mr-2 [&_svg]:align-text-bottom", _ctx.disabled ? "cursor-not-allowed text-color-text-disabled [&_svg]:fill-color-text-disabled" : "text-color-text-primary active:bg-color-bg-4 visited:text-color-brand hover:bg-color-bg-4 focus:bg-color-bg-4 cursor-pointer", {
74
70
  "text-color-brand-focus": _ctx.dataStore.checkedStatus && _ctx.selected
75
71
  }, {
76
- "!px-0 sm:!px-0": _ctx.dataStore.multiStage
77
- }]),
72
+ "!px-0": _ctx.dataStore.multiStage
73
+ })),
78
74
  onClick: _cache[2] || (_cache[2] = withModifiers(function() {
79
75
  return _ctx.handleClick && _ctx.handleClick.apply(_ctx, arguments);
80
76
  }, ["stop"])),
package/lib/mobile.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { renderless, api } from "@opentiny/vue-renderless/dropdown-item/vue";
2
- import { defineComponent, props, setup as _setup } from "@opentiny/vue-common";
2
+ import { defineComponent, directive, props, setup as _setup } from "@opentiny/vue-common";
3
3
  import { iconYes } from "@opentiny/vue-icon";
4
4
  import Popup from "@opentiny/vue-popup";
5
5
  import Button from "@opentiny/vue-button";
6
6
  import Clickoutside from "@opentiny/vue-renderless/common/deps/clickoutside";
7
7
  import "@opentiny/vue-theme-mobile/dropdown-item/index.css";
8
8
  import { resolveComponent, resolveDirective, withDirectives, openBlock, createElementBlock, normalizeClass, normalizeStyle, createVNode, withCtx, renderSlot, Fragment, renderList, createElementVNode, createBlock, resolveDynamicComponent, toDisplayString, createCommentVNode, createTextVNode, vShow } from "vue";
9
- function _createForOfIteratorHelperLoose(o, allowArrayLike) {
9
+ function _createForOfIteratorHelperLoose_tiny(o, allowArrayLike) {
10
10
  var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
11
11
  if (it)
12
12
  return (it = it.call(o)).next.bind(it);
@@ -44,7 +44,7 @@ function _arrayLikeToArray(arr, len) {
44
44
  }
45
45
  var _export_sfc = function _export_sfc2(sfc, props) {
46
46
  var target = sfc.__vccOpts || sfc;
47
- for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
47
+ for (var _iterator = _createForOfIteratorHelperLoose_tiny(props), _step; !(_step = _iterator()).done; ) {
48
48
  var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
49
49
  target[key] = val;
50
50
  }
@@ -52,9 +52,9 @@ var _export_sfc = function _export_sfc2(sfc, props) {
52
52
  };
53
53
 
54
54
  var _sfc_main = defineComponent({
55
- directives: {
55
+ directives: directive({
56
56
  Clickoutside
57
- },
57
+ }),
58
58
  props: [].concat(props, ["modelValue", "title", "disabled", "titleClass", "options", "icon", "type"]),
59
59
  components: {
60
60
  IconYes: iconYes(),
package/lib/pc.js CHANGED
@@ -1,9 +1,10 @@
1
1
  import { defineComponent, $prefix, props, setup as _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";
4
5
  import "@opentiny/vue-theme/dropdown-item/index.css";
5
- import { resolveComponent, openBlock, createElementBlock, normalizeClass, withModifiers, createElementVNode, createBlock, resolveDynamicComponent, createCommentVNode, renderSlot, toDisplayString, Fragment, renderList, withCtx } from "vue";
6
- function _createForOfIteratorHelperLoose(o, allowArrayLike) {
6
+ import { resolveComponent, openBlock, createBlock, withCtx, createElementVNode, normalizeClass, withModifiers, createElementBlock, resolveDynamicComponent, createCommentVNode, renderSlot, toDisplayString, Fragment, renderList } from "vue";
7
+ function _createForOfIteratorHelperLoose_tiny(o, allowArrayLike) {
7
8
  var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
8
9
  if (it)
9
10
  return (it = it.call(o)).next.bind(it);
@@ -41,7 +42,7 @@ function _arrayLikeToArray(arr, len) {
41
42
  }
42
43
  var _export_sfc = function _export_sfc2(sfc, props) {
43
44
  var target = sfc.__vccOpts || sfc;
44
- for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
45
+ for (var _iterator = _createForOfIteratorHelperLoose_tiny(props), _step; !(_step = _iterator()).done; ) {
45
46
  var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
46
47
  target[key] = val;
47
48
  }
@@ -52,9 +53,10 @@ var _sfc_main = defineComponent({
52
53
  name: $prefix + "DropdownItem",
53
54
  componentName: $prefix + "DropdownItem",
54
55
  emits: ["item-click"],
55
- props: [].concat(props, ["command", "disabled", "divided", "icon", "label", "itemData", "appendToBody", "textField"]),
56
+ props: [].concat(props, ["disabled", "divided", "icon", "itemData", "title", "titleClass", "options", "type", "label", "appendToBody", "textField", "selected", "selectedField", "multiStage", "currentIndex", "tip", "tipPosition"]),
56
57
  components: {
57
- IconDeltaLeft: iconDeltaLeft()
58
+ IconDeltaLeft: iconDeltaLeft(),
59
+ TinyTooltip: Tooltip
58
60
  },
59
61
  setup: function setup(props2, context) {
60
62
  return _setup({
@@ -78,66 +80,78 @@ var _hoisted_4 = {
78
80
  };
79
81
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
80
82
  var _component_tiny_dropdown_item = resolveComponent("tiny-dropdown-item");
81
- return openBlock(), createElementBlock("li", {
82
- class: normalizeClass(["tiny-dropdown-item tiny-dropdown-menu__item", {
83
- "is-disabled": _ctx.disabled,
84
- "tiny-dropdown-item--divided tiny-dropdown-menu__item--divided": _ctx.divided,
85
- "has-children": _ctx.itemData.children && _ctx.itemData.children.length
86
- }]),
87
- ref: "dropdownItem",
88
- onClick: _cache[0] || (_cache[0] = function() {
89
- return _ctx.handleClick && _ctx.handleClick.apply(_ctx, arguments);
90
- }),
91
- onMousedown: _cache[1] || (_cache[1] = withModifiers(function() {
92
- }, ["stop"])),
93
- "aria-disabled": _ctx.disabled,
94
- tabindex: _ctx.disabled ? null : -1
95
- }, [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), {
96
- key: 0,
97
- class: "tiny-svg-size"
98
- })) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "default", {
99
- itemData: _ctx.itemData
100
- }, function() {
101
- return [createElementVNode(
102
- "span",
103
- null,
104
- toDisplayString(_ctx.label),
105
- 1
106
- /* TEXT */
107
- )];
108
- })]), _ctx.itemData.children && _ctx.itemData.children.length ? (openBlock(), createElementBlock(
109
- "ul",
110
- {
111
- key: 1,
112
- class: normalizeClass(["tiny-dropdown-menu", "tiny-dropdown-item--child tiny-dropdown-menu__item--child", _ctx.state.popperClass])
113
- },
114
- [(openBlock(true), createElementBlock(
115
- Fragment,
116
- null,
117
- renderList(_ctx.itemData.children, function(item, index) {
118
- return openBlock(), createBlock(_component_tiny_dropdown_item, {
119
- key: index,
120
- label: item[_ctx.state.textField],
121
- "item-data": item,
122
- icon: item.icon,
123
- disabled: item.disabled,
124
- divided: item.divided
125
- }, {
126
- default: withCtx(function() {
127
- return [renderSlot(_ctx.$slots, "default", {
128
- itemData: item
129
- })];
83
+ var _component_tiny_tooltip = resolveComponent("tiny-tooltip");
84
+ return openBlock(), createBlock(_component_tiny_tooltip, {
85
+ content: _ctx.getTip,
86
+ placement: _ctx.tipPosition
87
+ }, {
88
+ default: withCtx(function() {
89
+ return [createElementVNode("li", {
90
+ class: normalizeClass(["tiny-dropdown-item tiny-dropdown-menu__item", {
91
+ "is-disabled": _ctx.disabled,
92
+ "tiny-dropdown-item--divided tiny-dropdown-menu__item--divided": _ctx.divided,
93
+ "has-children": _ctx.itemData.children && _ctx.itemData.children.length
94
+ }]),
95
+ ref: "dropdownItem",
96
+ onClick: _cache[0] || (_cache[0] = withModifiers(function() {
97
+ return _ctx.handleClick && _ctx.handleClick.apply(_ctx, arguments);
98
+ }, ["stop"])),
99
+ onMousedown: _cache[1] || (_cache[1] = withModifiers(function() {
100
+ }, ["stop"])),
101
+ "aria-disabled": _ctx.disabled,
102
+ tabindex: _ctx.disabled ? null : -1
103
+ }, [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), {
104
+ key: 0,
105
+ class: "tiny-svg-size"
106
+ })) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "default", {
107
+ itemData: _ctx.itemData
108
+ }, function() {
109
+ return [createElementVNode(
110
+ "span",
111
+ null,
112
+ toDisplayString(_ctx.label),
113
+ 1
114
+ /* TEXT */
115
+ )];
116
+ })]), _ctx.itemData.children && _ctx.itemData.children.length ? (openBlock(), createElementBlock(
117
+ "ul",
118
+ {
119
+ key: 1,
120
+ class: normalizeClass(["tiny-dropdown-menu", "tiny-dropdown-item--child tiny-dropdown-menu__item--child", _ctx.state.popperClass])
121
+ },
122
+ [(openBlock(true), createElementBlock(
123
+ Fragment,
124
+ null,
125
+ renderList(_ctx.itemData.children, function(item, index) {
126
+ return openBlock(), createBlock(_component_tiny_dropdown_item, {
127
+ key: index,
128
+ label: item[_ctx.state.textField],
129
+ "item-data": item,
130
+ icon: item.icon,
131
+ disabled: item.disabled,
132
+ divided: item.divided,
133
+ tip: item.tip,
134
+ "tip-position": item.tipPosition
135
+ }, {
136
+ default: withCtx(function() {
137
+ return [renderSlot(_ctx.$slots, "default", {
138
+ itemData: item
139
+ })];
140
+ }),
141
+ _: 2
142
+ /* DYNAMIC */
143
+ }, 1032, ["label", "item-data", "icon", "disabled", "divided", "tip", "tip-position"]);
130
144
  }),
131
- _: 2
132
- /* DYNAMIC */
133
- }, 1032, ["label", "item-data", "icon", "disabled", "divided"]);
134
- }),
135
- 128
136
- /* KEYED_FRAGMENT */
137
- ))],
138
- 2
139
- /* CLASS */
140
- )) : createCommentVNode("v-if", true)])], 42, _hoisted_1);
145
+ 128
146
+ /* KEYED_FRAGMENT */
147
+ ))],
148
+ 2
149
+ /* CLASS */
150
+ )) : createCommentVNode("v-if", true)])], 42, _hoisted_1)];
151
+ }),
152
+ _: 3
153
+ /* FORWARDED */
154
+ }, 8, ["content", "placement"]);
141
155
  }
142
156
  var pc = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
143
157
  export {
package/package.json CHANGED
@@ -1,16 +1,18 @@
1
1
  {
2
2
  "name": "@opentiny/vue-dropdown-item",
3
- "version": "3.9.0",
3
+ "version": "3.11.0-alpha.0",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",
7
7
  "sideEffects": false,
8
+ "type": "module",
8
9
  "dependencies": {
9
- "@opentiny/vue-common": "~3.9.0",
10
- "@opentiny/vue-icon": "~3.9.0",
11
- "@opentiny/vue-renderless": "~3.9.0",
12
- "@opentiny/vue-popup": "~3.9.0",
13
- "@opentiny/vue-button": "~3.9.0"
10
+ "@opentiny/vue-common": "~3.11.0-alpha.0",
11
+ "@opentiny/vue-icon": "~3.11.0-alpha.0",
12
+ "@opentiny/vue-renderless": "~3.11.0-alpha.0",
13
+ "@opentiny/vue-popup": "~3.11.0-alpha.0",
14
+ "@opentiny/vue-button": "~3.11.0-alpha.0",
15
+ "@opentiny/vue-tooltip": "~3.11.0-alpha.0"
14
16
  },
15
17
  "license": "MIT",
16
18
  "types": "index.d.ts",
package/src/index.d.ts CHANGED
@@ -1,4 +1,20 @@
1
- declare const _default: import("@vue/runtime-core").DefineComponent<{
1
+ /**
2
+ * Copyright (c) 2022 - present TinyVue Authors.
3
+ * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license.
6
+ *
7
+ * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
8
+ * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
9
+ * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
10
+ *
11
+ */
12
+ export declare const $constants: {
13
+ ICON_MAP: {
14
+ leftWardArrow: string;
15
+ };
16
+ };
17
+ export declare const dropdownItemProps: {
2
18
  _constants: {
3
19
  type: ObjectConstructor;
4
20
  default: () => {
@@ -10,8 +26,16 @@ declare const _default: import("@vue/runtime-core").DefineComponent<{
10
26
  icon: (ObjectConstructor | StringConstructor)[];
11
27
  disabled: BooleanConstructor;
12
28
  divided: BooleanConstructor;
13
- command: {};
29
+ itemData: {
30
+ type: (ObjectConstructor | StringConstructor)[];
31
+ default: string;
32
+ };
14
33
  title: StringConstructor;
34
+ label: {
35
+ type: StringConstructor;
36
+ default: string;
37
+ };
38
+ level: StringConstructor;
15
39
  titleClass: StringConstructor;
16
40
  options: {
17
41
  type: ArrayConstructor;
@@ -21,13 +45,21 @@ declare const _default: import("@vue/runtime-core").DefineComponent<{
21
45
  type: StringConstructor;
22
46
  default: string;
23
47
  };
24
- label: {
48
+ selected: {
49
+ type: BooleanConstructor;
50
+ default: boolean;
51
+ };
52
+ selectedField: {
25
53
  type: StringConstructor;
26
54
  default: string;
27
55
  };
28
- itemData: {
29
- type: ObjectConstructor;
30
- default: () => {};
56
+ multiStage: {
57
+ type: BooleanConstructor;
58
+ default: boolean;
59
+ };
60
+ currentIndex: {
61
+ type: NumberConstructor;
62
+ default: () => number;
31
63
  };
32
64
  appendToBody: {
33
65
  type: BooleanConstructor;
@@ -37,6 +69,52 @@ declare const _default: import("@vue/runtime-core").DefineComponent<{
37
69
  type: StringConstructor;
38
70
  default: string;
39
71
  };
72
+ tip: {
73
+ type: (StringConstructor | FunctionConstructor)[];
74
+ default: string;
75
+ };
76
+ tipPosition: {
77
+ type: StringConstructor;
78
+ default: string;
79
+ };
80
+ tiny_mode: StringConstructor;
81
+ tiny_mode_root: BooleanConstructor;
82
+ tiny_template: (ObjectConstructor | FunctionConstructor)[];
83
+ tiny_renderless: FunctionConstructor;
84
+ tiny_theme: StringConstructor;
85
+ tiny_chart_theme: ObjectConstructor;
86
+ };
87
+ declare const _default: import("@vue/runtime-core").DefineComponent<{
88
+ _constants: {
89
+ type: ObjectConstructor;
90
+ default: () => {
91
+ ICON_MAP: {
92
+ leftWardArrow: string;
93
+ };
94
+ };
95
+ };
96
+ icon: (ObjectConstructor | StringConstructor)[];
97
+ disabled: BooleanConstructor;
98
+ divided: BooleanConstructor;
99
+ itemData: {
100
+ type: (ObjectConstructor | StringConstructor)[];
101
+ default: string;
102
+ };
103
+ title: StringConstructor;
104
+ label: {
105
+ type: StringConstructor;
106
+ default: string;
107
+ };
108
+ level: StringConstructor;
109
+ titleClass: StringConstructor;
110
+ options: {
111
+ type: ArrayConstructor;
112
+ default: () => never[];
113
+ };
114
+ type: {
115
+ type: StringConstructor;
116
+ default: string;
117
+ };
40
118
  selected: {
41
119
  type: BooleanConstructor;
42
120
  default: boolean;
@@ -53,15 +131,31 @@ declare const _default: import("@vue/runtime-core").DefineComponent<{
53
131
  type: NumberConstructor;
54
132
  default: () => number;
55
133
  };
134
+ appendToBody: {
135
+ type: BooleanConstructor;
136
+ default: boolean;
137
+ };
138
+ textField: {
139
+ type: StringConstructor;
140
+ default: string;
141
+ };
142
+ tip: {
143
+ type: (StringConstructor | FunctionConstructor)[];
144
+ default: string;
145
+ };
146
+ tipPosition: {
147
+ type: StringConstructor;
148
+ default: string;
149
+ };
56
150
  tiny_mode: StringConstructor;
57
151
  tiny_mode_root: BooleanConstructor;
58
152
  tiny_template: (ObjectConstructor | FunctionConstructor)[];
59
153
  tiny_renderless: FunctionConstructor;
60
154
  tiny_theme: StringConstructor;
61
155
  tiny_chart_theme: ObjectConstructor;
62
- }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
156
+ }, () => import("@vue/runtime-core").VNode<import("@vue/runtime-core").RendererNode, import("@vue/runtime-core").RendererElement, {
63
157
  [key: string]: any;
64
- }>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
158
+ }>, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
65
159
  _constants: {
66
160
  type: ObjectConstructor;
67
161
  default: () => {
@@ -73,30 +167,22 @@ declare const _default: import("@vue/runtime-core").DefineComponent<{
73
167
  icon: (ObjectConstructor | StringConstructor)[];
74
168
  disabled: BooleanConstructor;
75
169
  divided: BooleanConstructor;
76
- command: {};
77
- title: StringConstructor;
78
- titleClass: StringConstructor;
79
- options: {
80
- type: ArrayConstructor;
81
- default: () => never[];
82
- };
83
- type: {
84
- type: StringConstructor;
170
+ itemData: {
171
+ type: (ObjectConstructor | StringConstructor)[];
85
172
  default: string;
86
173
  };
174
+ title: StringConstructor;
87
175
  label: {
88
176
  type: StringConstructor;
89
177
  default: string;
90
178
  };
91
- itemData: {
92
- type: ObjectConstructor;
93
- default: () => {};
94
- };
95
- appendToBody: {
96
- type: BooleanConstructor;
97
- default: boolean;
179
+ level: StringConstructor;
180
+ titleClass: StringConstructor;
181
+ options: {
182
+ type: ArrayConstructor;
183
+ default: () => never[];
98
184
  };
99
- textField: {
185
+ type: {
100
186
  type: StringConstructor;
101
187
  default: string;
102
188
  };
@@ -116,6 +202,22 @@ declare const _default: import("@vue/runtime-core").DefineComponent<{
116
202
  type: NumberConstructor;
117
203
  default: () => number;
118
204
  };
205
+ appendToBody: {
206
+ type: BooleanConstructor;
207
+ default: boolean;
208
+ };
209
+ textField: {
210
+ type: StringConstructor;
211
+ default: string;
212
+ };
213
+ tip: {
214
+ type: (StringConstructor | FunctionConstructor)[];
215
+ default: string;
216
+ };
217
+ tipPosition: {
218
+ type: StringConstructor;
219
+ default: string;
220
+ };
119
221
  tiny_mode: StringConstructor;
120
222
  tiny_mode_root: BooleanConstructor;
121
223
  tiny_template: (ObjectConstructor | FunctionConstructor)[];
@@ -123,19 +225,21 @@ declare const _default: import("@vue/runtime-core").DefineComponent<{
123
225
  tiny_theme: StringConstructor;
124
226
  tiny_chart_theme: ObjectConstructor;
125
227
  }>>, {
126
- label: string;
127
- options: unknown[];
128
- textField: string;
129
228
  type: string;
229
+ label: string;
230
+ selected: boolean;
231
+ disabled: boolean;
130
232
  tiny_mode_root: boolean;
131
233
  _constants: Record<string, any>;
132
- disabled: boolean;
133
- appendToBody: boolean;
134
- selected: boolean;
234
+ multiStage: boolean;
235
+ options: unknown[];
236
+ textField: string;
135
237
  divided: boolean;
136
- itemData: Record<string, any>;
238
+ itemData: string | Record<string, any>;
137
239
  selectedField: string;
138
- multiStage: boolean;
139
240
  currentIndex: number;
140
- }>;
241
+ appendToBody: boolean;
242
+ tip: string | Function;
243
+ tipPosition: string;
244
+ }, {}>;
141
245
  export default _default;
@@ -1,8 +1,47 @@
1
- declare const _sfc_main: import("@vue/runtime-core").DefineComponent<Readonly<{
2
- [x: string]: any;
3
- }>, any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
4
- [x: string]: any;
1
+ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
2
+ label?: any;
3
+ selected?: any;
4
+ disabled?: any;
5
+ tiny_mode?: any;
6
+ tiny_mode_root?: any;
7
+ tiny_template?: any;
8
+ tiny_renderless?: any;
9
+ _constants?: any;
10
+ tiny_theme?: any;
11
+ tiny_chart_theme?: any;
12
+ icon?: any;
13
+ itemData?: any;
14
+ level?: any;
15
+ currentIndex?: any;
16
+ }>, any, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
17
+ label?: any;
18
+ selected?: any;
19
+ disabled?: any;
20
+ tiny_mode?: any;
21
+ tiny_mode_root?: any;
22
+ tiny_template?: any;
23
+ tiny_renderless?: any;
24
+ _constants?: any;
25
+ tiny_theme?: any;
26
+ tiny_chart_theme?: any;
27
+ icon?: any;
28
+ itemData?: any;
29
+ level?: any;
30
+ currentIndex?: any;
5
31
  }>>>, {
6
- [x: string]: any;
7
- }>;
8
- export default _sfc_main;
32
+ readonly label?: any;
33
+ readonly selected?: any;
34
+ readonly disabled?: any;
35
+ readonly tiny_mode?: any;
36
+ readonly tiny_mode_root?: any;
37
+ readonly tiny_template?: any;
38
+ readonly tiny_renderless?: any;
39
+ readonly _constants?: any;
40
+ readonly tiny_theme?: any;
41
+ readonly tiny_chart_theme?: any;
42
+ readonly icon?: any;
43
+ readonly itemData?: any;
44
+ readonly level?: any;
45
+ readonly currentIndex?: any;
46
+ }, {}>;
47
+ export default _default;
@@ -1,2 +1,67 @@
1
- declare const _sfc_main: import("@vue/runtime-core").DefineComponent<unknown, object, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<unknown>, {}>;
2
- export default _sfc_main;
1
+ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
2
+ type?: any;
3
+ title?: any;
4
+ disabled?: any;
5
+ tiny_mode?: any;
6
+ tiny_mode_root?: any;
7
+ tiny_template?: any;
8
+ tiny_renderless?: any;
9
+ _constants?: any;
10
+ tiny_theme?: any;
11
+ tiny_chart_theme?: any;
12
+ modelValue?: any;
13
+ options?: any;
14
+ icon?: any;
15
+ titleClass?: any;
16
+ }>, {
17
+ t: (this: any, path: any, options?: any) => any;
18
+ vm: any;
19
+ f: (props: any, attrs?: {}) => {};
20
+ a: (attrs: any, filters: any, include: any) => {};
21
+ d: (props: any) => void;
22
+ dp: (props: any) => void;
23
+ gcls: (key: any) => any;
24
+ m: (...cssClasses: any[]) => string;
25
+ }, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("confirm" | "item-click" | "update:modelValue" | "close" | "click" | "change" | "reset" | "open" | "closed" | "opened")[], "confirm" | "item-click" | "update:modelValue" | "close" | "click" | "change" | "reset" | "open" | "closed" | "opened", import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
26
+ type?: any;
27
+ title?: any;
28
+ disabled?: any;
29
+ tiny_mode?: any;
30
+ tiny_mode_root?: any;
31
+ tiny_template?: any;
32
+ tiny_renderless?: any;
33
+ _constants?: any;
34
+ tiny_theme?: any;
35
+ tiny_chart_theme?: any;
36
+ modelValue?: any;
37
+ options?: any;
38
+ icon?: any;
39
+ titleClass?: any;
40
+ }>>> & {
41
+ "onItem-click"?: ((...args: any[]) => any) | undefined;
42
+ onChange?: ((...args: any[]) => any) | undefined;
43
+ onReset?: ((...args: any[]) => any) | undefined;
44
+ onClick?: ((...args: any[]) => any) | undefined;
45
+ onClose?: ((...args: any[]) => any) | undefined;
46
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
47
+ onConfirm?: ((...args: any[]) => any) | undefined;
48
+ onOpen?: ((...args: any[]) => any) | undefined;
49
+ onClosed?: ((...args: any[]) => any) | undefined;
50
+ onOpened?: ((...args: any[]) => any) | undefined;
51
+ }, {
52
+ readonly type?: any;
53
+ readonly title?: any;
54
+ readonly disabled?: any;
55
+ readonly tiny_mode?: any;
56
+ readonly tiny_mode_root?: any;
57
+ readonly tiny_template?: any;
58
+ readonly tiny_renderless?: any;
59
+ readonly _constants?: any;
60
+ readonly tiny_theme?: any;
61
+ readonly tiny_chart_theme?: any;
62
+ readonly modelValue?: any;
63
+ readonly options?: any;
64
+ readonly icon?: any;
65
+ readonly titleClass?: any;
66
+ }, {}>;
67
+ export default _default;
package/src/pc.vue.d.ts CHANGED
@@ -1,19 +1,80 @@
1
- declare const _sfc_main: import("@vue/runtime-core").DefineComponent<Readonly<{
2
- [x: string]: any;
3
- }>, {
4
- t: (this: any, path: any, options?: any) => any;
5
- vm: any;
6
- f: (props: any, attrs?: {}) => {};
7
- a: (attrs: any, filters: any, include: any) => {};
8
- d: (props: any) => void;
9
- dp: (props: any) => void;
10
- gcls: (key: any) => any;
11
- m: (...cssClasses: any[]) => string;
12
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "item-click"[], "item-click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
13
- [x: string]: any;
1
+ import type { IDropdownItemApi } from '@opentiny/vue-renderless/types/dropdown-item.type';
2
+ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
3
+ type?: any;
4
+ label?: any;
5
+ title?: any;
6
+ selected?: any;
7
+ disabled?: any;
8
+ tiny_mode?: any;
9
+ tiny_mode_root?: any;
10
+ tiny_template?: any;
11
+ tiny_renderless?: any;
12
+ _constants?: any;
13
+ tiny_theme?: any;
14
+ tiny_chart_theme?: any;
15
+ multiStage?: any;
16
+ options?: any;
17
+ textField?: any;
18
+ icon?: any;
19
+ divided?: any;
20
+ itemData?: any;
21
+ titleClass?: any;
22
+ selectedField?: any;
23
+ currentIndex?: any;
24
+ appendToBody?: any;
25
+ tip?: any;
26
+ tipPosition?: any;
27
+ }>, IDropdownItemApi, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, "item-click"[], "item-click", import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
28
+ type?: any;
29
+ label?: any;
30
+ title?: any;
31
+ selected?: any;
32
+ disabled?: any;
33
+ tiny_mode?: any;
34
+ tiny_mode_root?: any;
35
+ tiny_template?: any;
36
+ tiny_renderless?: any;
37
+ _constants?: any;
38
+ tiny_theme?: any;
39
+ tiny_chart_theme?: any;
40
+ multiStage?: any;
41
+ options?: any;
42
+ textField?: any;
43
+ icon?: any;
44
+ divided?: any;
45
+ itemData?: any;
46
+ titleClass?: any;
47
+ selectedField?: any;
48
+ currentIndex?: any;
49
+ appendToBody?: any;
50
+ tip?: any;
51
+ tipPosition?: any;
14
52
  }>>> & {
15
53
  "onItem-click"?: ((...args: any[]) => any) | undefined;
16
54
  }, {
17
- [x: string]: any;
18
- }>;
19
- export default _sfc_main;
55
+ readonly type?: any;
56
+ readonly label?: any;
57
+ readonly title?: any;
58
+ readonly selected?: any;
59
+ readonly disabled?: any;
60
+ readonly tiny_mode?: any;
61
+ readonly tiny_mode_root?: any;
62
+ readonly tiny_template?: any;
63
+ readonly tiny_renderless?: any;
64
+ readonly _constants?: any;
65
+ readonly tiny_theme?: any;
66
+ readonly tiny_chart_theme?: any;
67
+ readonly multiStage?: any;
68
+ readonly options?: any;
69
+ readonly textField?: any;
70
+ readonly icon?: any;
71
+ readonly divided?: any;
72
+ readonly itemData?: any;
73
+ readonly titleClass?: any;
74
+ readonly selectedField?: any;
75
+ readonly currentIndex?: any;
76
+ readonly appendToBody?: any;
77
+ readonly tip?: any;
78
+ readonly tipPosition?: any;
79
+ }, {}>;
80
+ export default _default;