@opentiny/tiny-robot 0.2.0-alpha.0 → 0.2.0-alpha.2

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.
Files changed (164) hide show
  1. package/dist/action-group/ActionGroup.vue.d.ts +26 -0
  2. package/dist/action-group/ActionGroupItem.vue.d.ts +18 -0
  3. package/dist/action-group/index.d.ts +12 -0
  4. package/dist/action-group/index.type.d.ts +17 -0
  5. package/dist/bubble/index.d.ts +2 -2
  6. package/dist/bubble/index.type.d.ts +16 -18
  7. package/dist/feedback/components/SourceList.vue.d.ts +11 -0
  8. package/dist/feedback/components/index.d.ts +1 -0
  9. package/dist/feedback/index.d.ts +7 -0
  10. package/dist/feedback/index.type.d.ts +25 -0
  11. package/dist/feedback/index.vue.d.ts +13 -0
  12. package/dist/history/components/index.d.ts +2 -0
  13. package/dist/history/components/item-tag.vue.d.ts +5 -0
  14. package/dist/history/components/search-empty.vue.d.ts +7 -0
  15. package/dist/history/composables/index.d.ts +1 -0
  16. package/dist/history/composables/useEditItemTitle.d.ts +12 -0
  17. package/dist/history/index.d.ts +6 -0
  18. package/dist/history/index.type.d.ts +43 -0
  19. package/dist/history/index.vue.d.ts +2 -0
  20. package/dist/icon-button/index.d.ts +7 -0
  21. package/dist/icon-button/index.type.d.ts +6 -0
  22. package/dist/icon-button/index.vue.d.ts +6 -0
  23. package/dist/index.d.ts +10 -1
  24. package/dist/index.js +57 -27
  25. package/dist/node_modules/.pnpm/@opentiny_utils@3.22.0/node_modules/@opentiny/utils/dist/index.es.js +1335 -884
  26. package/dist/node_modules/.pnpm/@opentiny_vue-common@3.22.0/node_modules/@opentiny/vue-common/lib/index.js +660 -144
  27. package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/vue-popper.js +85 -0
  28. package/dist/node_modules/.pnpm/@opentiny_vue-locale@3.22.0/node_modules/@opentiny/vue-locale/lib/index.js +1783 -0
  29. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/tooltip/index.js +77 -0
  30. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/tooltip/vue.js +90 -0
  31. package/dist/node_modules/.pnpm/@opentiny_vue-tooltip@3.22.0/node_modules/@opentiny/vue-tooltip/lib/index.js +176 -0
  32. package/dist/node_modules/.pnpm/@opentiny_vue-tooltip@3.22.0/node_modules/@opentiny/vue-tooltip/lib/pc.js +248 -0
  33. package/dist/node_modules/.pnpm/@vueuse_core@13.1.0_vue@3.5.13/node_modules/@vueuse/core/index.js +310 -0
  34. package/dist/node_modules/.pnpm/@vueuse_shared@13.1.0_vue@3.5.13/node_modules/@vueuse/shared/index.js +110 -0
  35. package/dist/packages/components/src/action-group/ActionGroup.vue.js +7 -0
  36. package/dist/packages/components/src/action-group/ActionGroup.vue2.js +121 -0
  37. package/dist/packages/components/src/action-group/ActionGroupItem.vue.js +14 -0
  38. package/dist/packages/components/src/action-group/ActionGroupItem.vue2.js +4 -0
  39. package/dist/packages/components/src/action-group/index.js +17 -0
  40. package/dist/packages/components/src/bubble/Bubble.vue.js +7 -0
  41. package/dist/packages/components/src/bubble/Bubble.vue2.js +76 -0
  42. package/dist/packages/components/src/bubble/BubbleList.vue.js +7 -0
  43. package/dist/packages/components/src/bubble/BubbleList.vue2.js +50 -0
  44. package/dist/packages/components/src/bubble/index.js +2 -2
  45. package/dist/packages/components/src/container/index.vue.js +2 -2
  46. package/dist/packages/components/src/container/index.vue2.js +36 -36
  47. package/dist/packages/components/src/feedback/components/SourceList.vue.js +7 -0
  48. package/dist/packages/components/src/feedback/components/SourceList.vue2.js +52 -0
  49. package/dist/packages/components/src/feedback/index.js +9 -0
  50. package/dist/packages/components/src/feedback/index.vue.js +7 -0
  51. package/dist/packages/components/src/feedback/index.vue2.js +143 -0
  52. package/dist/packages/components/src/history/components/item-tag.vue.js +7 -0
  53. package/dist/packages/components/src/history/components/item-tag.vue2.js +21 -0
  54. package/dist/packages/components/src/history/components/search-empty.vue.js +7 -0
  55. package/dist/packages/components/src/history/components/search-empty.vue2.js +20 -0
  56. package/dist/packages/components/src/history/composables/useEditItemTitle.js +43 -0
  57. package/dist/packages/components/src/history/index.js +11 -0
  58. package/dist/packages/components/src/history/index.vue.js +7 -0
  59. package/dist/packages/components/src/history/index.vue2.js +130 -0
  60. package/dist/packages/components/src/icon-button/index.js +9 -0
  61. package/dist/packages/components/src/icon-button/index.vue.js +7 -0
  62. package/dist/packages/components/src/icon-button/index.vue2.js +22 -0
  63. package/dist/packages/components/src/prompts/prompt.vue.js +2 -2
  64. package/dist/packages/components/src/prompts/prompt.vue2.js +17 -15
  65. package/dist/packages/components/src/question/components/HotQuestions.vue.js +23 -23
  66. package/dist/packages/components/src/question/index.vue.js +18 -18
  67. package/dist/packages/components/src/sender/components/TemplateEditor.vue.js +7 -0
  68. package/dist/packages/components/src/sender/components/TemplateEditor.vue2.js +175 -0
  69. package/dist/packages/components/src/sender/index.vue.js +149 -128
  70. package/dist/packages/components/src/suggestion/components/CategoryNav.vue.js +38 -0
  71. package/dist/packages/components/src/suggestion/components/CategoryNav.vue2.js +4 -0
  72. package/dist/packages/components/src/suggestion/components/SuggestionCapsule.vue.js +107 -0
  73. package/dist/packages/components/src/suggestion/components/SuggestionCapsule.vue2.js +4 -0
  74. package/dist/packages/components/src/suggestion/components/SuggestionPanel.vue.js +123 -0
  75. package/dist/packages/components/src/suggestion/components/SuggestionPanel.vue2.js +4 -0
  76. package/dist/packages/components/src/suggestion/composables/useKeyboardNavigation.js +45 -0
  77. package/dist/packages/components/src/suggestion/composables/useTriggerDetection.js +17 -0
  78. package/dist/packages/components/src/suggestion/index.js +9 -0
  79. package/dist/packages/components/src/suggestion/index.vue.js +179 -0
  80. package/dist/packages/components/src/suggestion/index.vue2.js +4 -0
  81. package/dist/packages/components/src/suggestion/utils/dom.js +18 -0
  82. package/dist/packages/svgs/dist/tiny-robot-svgs.js +306 -90
  83. package/dist/question/components/HotQuestions.vue.d.ts +2 -2
  84. package/dist/sender/components/TemplateEditor.vue.d.ts +18 -0
  85. package/dist/sender/index.type.d.ts +47 -0
  86. package/dist/sender/index.vue.d.ts +70 -5
  87. package/dist/style.css +1 -1
  88. package/dist/suggestion/components/CategoryNav.vue.d.ts +45 -0
  89. package/dist/suggestion/components/SuggestionCapsule.vue.d.ts +32 -0
  90. package/dist/suggestion/components/SuggestionPanel.vue.d.ts +84 -0
  91. package/dist/suggestion/composables/useKeyboardNavigation.d.ts +18 -0
  92. package/dist/suggestion/composables/useSuggestionFilter.d.ts +10 -0
  93. package/dist/suggestion/composables/useTriggerDetection.d.ts +11 -0
  94. package/dist/suggestion/index.d.ts +7 -0
  95. package/dist/suggestion/index.type.d.ts +94 -0
  96. package/dist/suggestion/index.vue.d.ts +343 -0
  97. package/dist/suggestion/utils/dom.d.ts +20 -0
  98. package/package.json +4 -3
  99. package/src/action-group/ActionGroup.vue +247 -0
  100. package/src/action-group/ActionGroupItem.vue +9 -0
  101. package/src/action-group/index.ts +25 -0
  102. package/src/action-group/index.type.ts +21 -0
  103. package/src/bubble/Bubble.vue +153 -0
  104. package/src/bubble/BubbleList.vue +55 -0
  105. package/src/bubble/index.ts +2 -2
  106. package/src/bubble/index.type.ts +7 -21
  107. package/src/container/index.vue +10 -36
  108. package/src/feedback/components/SourceList.vue +112 -0
  109. package/src/feedback/components/index.ts +1 -0
  110. package/src/feedback/index.ts +12 -0
  111. package/src/feedback/index.type.ts +27 -0
  112. package/src/feedback/index.vue +166 -0
  113. package/src/history/components/index.ts +2 -0
  114. package/src/history/components/item-tag.vue +49 -0
  115. package/src/history/components/search-empty.vue +38 -0
  116. package/src/history/composables/index.ts +1 -0
  117. package/src/history/composables/useEditItemTitle.ts +75 -0
  118. package/src/history/index.ts +12 -0
  119. package/src/history/index.type.ts +50 -0
  120. package/src/history/index.vue +292 -0
  121. package/src/icon-button/index.ts +12 -0
  122. package/src/icon-button/index.type.ts +7 -0
  123. package/src/icon-button/index.vue +58 -0
  124. package/src/index.ts +33 -1
  125. package/src/prompts/prompt.vue +7 -21
  126. package/src/question/components/HotQuestions.vue +1 -1
  127. package/src/question/index.less +9 -10
  128. package/src/sender/components/TemplateEditor.vue +465 -0
  129. package/src/sender/index.less +17 -7
  130. package/src/sender/index.type.ts +51 -0
  131. package/src/sender/index.vue +56 -8
  132. package/src/sender/vars.less +3 -3
  133. package/src/suggestion/components/CategoryNav.vue +38 -0
  134. package/src/suggestion/components/SuggestionCapsule.vue +183 -0
  135. package/src/suggestion/components/SuggestionPanel.vue +147 -0
  136. package/src/suggestion/composables/useKeyboardNavigation.ts +101 -0
  137. package/src/suggestion/composables/useSuggestionFilter.ts +34 -0
  138. package/src/suggestion/composables/useTriggerDetection.ts +46 -0
  139. package/src/suggestion/index.less +497 -0
  140. package/src/suggestion/index.ts +12 -0
  141. package/src/suggestion/index.type.ts +101 -0
  142. package/src/suggestion/index.vue +338 -0
  143. package/src/suggestion/utils/dom.ts +66 -0
  144. package/src/suggestion/vars.less +141 -0
  145. package/dist/bubble/components/actions/copy.vue.d.ts +0 -10
  146. package/dist/bubble/components/actions/index.d.ts +0 -2
  147. package/dist/bubble/components/actions/refresh.vue.d.ts +0 -2
  148. package/dist/bubble/useScroll.d.ts +0 -4
  149. package/dist/packages/components/src/bubble/bubble-list.vue.js +0 -7
  150. package/dist/packages/components/src/bubble/bubble-list.vue2.js +0 -37
  151. package/dist/packages/components/src/bubble/bubble.vue.js +0 -7
  152. package/dist/packages/components/src/bubble/bubble.vue2.js +0 -118
  153. package/dist/packages/components/src/bubble/components/actions/copy.vue.js +0 -7
  154. package/dist/packages/components/src/bubble/components/actions/copy.vue2.js +0 -35
  155. package/dist/packages/components/src/bubble/components/actions/refresh.vue.js +0 -7
  156. package/dist/packages/components/src/bubble/components/actions/refresh.vue2.js +0 -16
  157. package/dist/packages/components/src/bubble/useScroll.js +0 -13
  158. package/src/bubble/bubble-list.vue +0 -42
  159. package/src/bubble/bubble.vue +0 -247
  160. package/src/bubble/components/actions/copy.vue +0 -54
  161. package/src/bubble/components/actions/index.ts +0 -2
  162. package/src/bubble/components/actions/refresh.vue +0 -31
  163. package/src/bubble/useScroll.ts +0 -14
  164. /package/dist/bubble/{bubble-list.vue.d.ts → BubbleList.vue.d.ts} +0 -0
@@ -0,0 +1,77 @@
1
+ import { debounce as d, on as r, addClass as f, removeClass as a, off as c } from "../../../../../@opentiny_utils@3.22.0/node_modules/@opentiny/utils/dist/index.es.js";
2
+ const m = ({ api: e, state: o, props: t }) => (n) => {
3
+ const s = n && n.type === "mouseenter" ? 200 : 0;
4
+ if (t.visible === "auto") {
5
+ const { clientWidth: u, scrollWidth: i } = o.referenceElm;
6
+ if (i <= u)
7
+ return;
8
+ }
9
+ e.setExpectedState(!0), e.handleShowPopper(s);
10
+ }, h = (e) => () => {
11
+ e.setExpectedState(!1), e.debounceClose();
12
+ }, b = ({ api: e, state: o }) => () => {
13
+ o.focusing = !0, e.show();
14
+ }, g = ({ api: e, state: o }) => () => {
15
+ o.focusing = !1, e.hide();
16
+ }, w = ({ api: e, state: o }) => () => {
17
+ o.focusing = !1, e.show();
18
+ }, y = ({ props: e, state: o }) => (t) => {
19
+ !o.expectedState || e.manual || (clearTimeout(o.timeout), o.timeout = window.setTimeout(() => {
20
+ o.showPopper = !0;
21
+ }, e.openDelay || t), e.hideAfter > 0 && (o.timeoutPending = window.setTimeout(() => {
22
+ o.showPopper = !1;
23
+ }, e.hideAfter)));
24
+ }, P = ({ api: e, props: o, state: t }) => () => {
25
+ o.enterable && t.expectedState || o.manual || (clearTimeout(t.timeout), t.timeoutPending && clearTimeout(t.timeoutPending), t.showPopper = !1, o.disabled && e.doDestroy());
26
+ }, E = ({ props: e, api: o, state: t, popperVmRef: n }) => (l) => {
27
+ if (e.manual)
28
+ return;
29
+ const s = t.referenceElm, u = n.popper;
30
+ !u || !s || u.contains(l.target) || s.contains(l.target) || t.showPopper && (o.setExpectedState(!1), o.debounceClose());
31
+ }, x = ({ state: e }) => (o) => {
32
+ e.expectedState === !1 && clearTimeout(e.timeoutPending), e.expectedState = o;
33
+ }, C = ({ state: e, api: o, vm: t }) => () => {
34
+ const n = e.referenceElm;
35
+ e.showPopper = !1, n && n.nodeType === 1 && (c(document, "click", o.handleDocumentClick), c(n, "mouseenter", o.show), c(n, "mouseleave", o.hide), c(n, "focus", o.focusHandler), c(n, "blur", o.handleBlur), c(n, "click", o.removeFocusing)), t.popperVM && (typeof t.popperVM.$destroy == "function" && t.popperVM.$destroy(), t.popperVM = null);
36
+ }, S = ({ api: e, props: o }) => d(o.closeDelay, () => {
37
+ e.handleClosePopper();
38
+ }), T = (e) => (o) => {
39
+ o ? f(e.referenceElm, "focusing") : a(e.referenceElm, "focusing");
40
+ }, $ = ({ slots: e, api: o }) => () => {
41
+ if (!e.default || !e.default().length) {
42
+ o.handleFocus();
43
+ return;
44
+ }
45
+ let t = e.default()[0];
46
+ t = t.elm || t.el, t && t.focus ? t.focus() : o.handleFocus();
47
+ }, D = ({ api: e, state: o, vm: t }) => (n) => {
48
+ let l = null;
49
+ t.$el.nodeType === 8 ? l = n : t.$el.nodeType === 1 && (l = t.$el), !(!l || l.nodeType === 8 || o.referenceElm) && (o.referenceElm = l, l.setAttribute("aria-describedby", o.tooltipId), l.setAttribute("tabindex", o.tabindex.toString()), r(document, "click", e.handleDocumentClick), r(l, "mouseenter", e.show), r(l, "mouseleave", e.hide), r(l, "focus", e.focusHandler), r(l, "blur", e.handleBlur), r(l, "click", e.removeFocusing));
50
+ }, k = ({ state: e, popperVmRef: o }) => (t) => {
51
+ for (let n of t)
52
+ n.type === "attributes" && n.attributeName === "x-placement" && (e.xPlacement = o.popper.getAttribute("x-placement") || "bottom");
53
+ }, F = ({ vm: e, nextTick: o, popperVmRef: t }) => (n) => {
54
+ o(() => e.bindEvent(n));
55
+ let l = e.popperVM;
56
+ e.$refs.popper ? t.popper = e.$refs.popper : t.popper = l.$el, o(() => {
57
+ e.modelValue && e.updatePopper();
58
+ });
59
+ };
60
+ export {
61
+ D as bindEvent,
62
+ F as bindPopper,
63
+ S as debounceClose,
64
+ C as destroyed,
65
+ $ as focusHandler,
66
+ g as handleBlur,
67
+ P as handleClosePopper,
68
+ E as handleDocumentClick,
69
+ b as handleFocus,
70
+ y as handleShowPopper,
71
+ h as hide,
72
+ k as observeCallback,
73
+ w as removeFocusing,
74
+ x as setExpectedState,
75
+ m as show,
76
+ T as watchFocusing
77
+ };
@@ -0,0 +1,90 @@
1
+ import { observeCallback as y, handleDocumentClick as k, focusHandler as D, bindEvent as H, handleClosePopper as B, handleShowPopper as O, setExpectedState as $, debounceClose as M, handleFocus as V, handleBlur as j, removeFocusing as A, watchFocusing as I, bindPopper as J, destroyed as L, hide as R, show as W } from "./index.js";
2
+ import { guid as q } from "../../../../../@opentiny_utils@3.22.0/node_modules/@opentiny/utils/dist/index.es.js";
3
+ import { userPopper as z } from "../../../../../@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/vue-popper.js";
4
+ const U = [
5
+ "state",
6
+ "bindEvent",
7
+ "hide",
8
+ "show",
9
+ "doDestroy",
10
+ "handleFocus",
11
+ "debounceClose",
12
+ "handleShowPopper",
13
+ "handleClosePopper",
14
+ "setExpectedState",
15
+ "updatePopper",
16
+ "focusHandler"
17
+ ], G = ({ reactive: t, showPopper: a, popperElm: d, referenceElm: r, props: i, inject: p, popperJS: l, currentPlacement: c }) => t({
18
+ popperJS: l,
19
+ showPopper: a,
20
+ popperElm: d,
21
+ referenceElm: r,
22
+ currentPlacement: c,
23
+ timeout: null,
24
+ focusing: !1,
25
+ expectedState: void 0,
26
+ tooltipId: q("tiny-tooltip-", 4),
27
+ tabindex: i.tabindex,
28
+ xPlacement: "bottom",
29
+ showContent: p("showContent", null),
30
+ tipsMaxWidth: p("tips-max-width", null)
31
+ }), X = (t, {
32
+ watch: a,
33
+ toRefs: d,
34
+ reactive: r,
35
+ onBeforeUnmount: i,
36
+ onDeactivated: p,
37
+ onMounted: l,
38
+ onUnmounted: c,
39
+ inject: f
40
+ }, { vm: n, emit: m, slots: b, nextTick: u, parent: w }) => {
41
+ const e = {}, s = {}, P = { emit: m, props: t, nextTick: u, toRefs: d, reactive: r, parent: w.$parent, vm: n, popperVmRef: s };
42
+ Object.assign(P, { slots: b, onBeforeUnmount: i, onDeactivated: p, watch: a });
43
+ const { showPopper: C, updatePopper: g, popperElm: v, referenceElm: S, doDestroy: x, popperJS: E, currentPlacement: F } = z(
44
+ P
45
+ ), o = G({
46
+ reactive: r,
47
+ showPopper: C,
48
+ popperElm: v,
49
+ referenceElm: S,
50
+ props: t,
51
+ inject: f,
52
+ popperJS: E,
53
+ currentPlacement: F
54
+ });
55
+ return Object.assign(e, {
56
+ state: o,
57
+ doDestroy: x,
58
+ updatePopper: g,
59
+ show: W({ api: e, state: o, props: t }),
60
+ hide: R(e),
61
+ destroyed: L({ state: o, api: e, vm: n }),
62
+ bindPopper: J({ vm: n, nextTick: u, popperVmRef: s }),
63
+ watchFocusing: I(o),
64
+ removeFocusing: A({ api: e, state: o }),
65
+ handleBlur: j({ api: e, state: o }),
66
+ handleFocus: V({ api: e, state: o }),
67
+ debounceClose: M({ api: e, props: t }),
68
+ setExpectedState: $({ state: o }),
69
+ handleShowPopper: O({ props: t, state: o }),
70
+ handleClosePopper: B({ api: e, props: t, state: o }),
71
+ bindEvent: H({ api: e, state: o, vm: n }),
72
+ focusHandler: D({ slots: b, api: e }),
73
+ handleDocumentClick: k({ props: t, api: e, state: o, popperVmRef: s }),
74
+ observeCallback: y({ state: o, popperVmRef: s })
75
+ }), a(() => o.focusing, e.watchFocusing), a(
76
+ () => t.modelValue,
77
+ (h) => u(() => t.manual && (o.showPopper = h))
78
+ ), l(() => {
79
+ if (e.bindPopper(), t.genArrowByHtml) {
80
+ const h = { attributes: !0, childList: !1, subtree: !1 };
81
+ e.observer = new MutationObserver(e.observeCallback), e.observer.observe(s.popper, h);
82
+ }
83
+ }), n.$on("tooltip-update", e.bindPopper), c(() => {
84
+ e.destroyed(), e.observer && e.observer.disconnect(), n.$off("tooltip-update");
85
+ }), e;
86
+ };
87
+ export {
88
+ U as api,
89
+ X as renderless
90
+ };
@@ -0,0 +1,176 @@
1
+ import { defineComponent as l, $setup as f, $prefix as i, $props as p } from "../../../../../@opentiny_vue-common@3.22.0/node_modules/@opentiny/vue-common/lib/index.js";
2
+ import o from "./pc.js";
3
+ function a() {
4
+ return a = Object.assign ? Object.assign.bind() : function(e) {
5
+ for (var t = 1; t < arguments.length; t++) {
6
+ var n = arguments[t];
7
+ for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
8
+ }
9
+ return e;
10
+ }, a.apply(null, arguments);
11
+ }
12
+ var d = function(t) {
13
+ var n, r = typeof process == "object" ? (n = process.env) == null ? void 0 : n.TINY_MODE : null;
14
+ return (r || t) === "pc" ? o : (r || t) === "mobile-first" ? o : o;
15
+ }, c = a({}, p, {
16
+ visible: {
17
+ type: String,
18
+ default: function() {
19
+ return "always";
20
+ },
21
+ validator: function(t) {
22
+ return ["always", "auto"].includes(t);
23
+ }
24
+ },
25
+ adjustArrow: {
26
+ type: Boolean,
27
+ default: function() {
28
+ return !1;
29
+ }
30
+ },
31
+ appendToBody: {
32
+ type: Boolean,
33
+ default: function() {
34
+ return !0;
35
+ }
36
+ },
37
+ arrowOffset: {
38
+ type: Number,
39
+ default: function() {
40
+ return 0;
41
+ }
42
+ },
43
+ content: {
44
+ type: [String, Object]
45
+ },
46
+ disabled: {
47
+ type: Boolean
48
+ },
49
+ enterable: {
50
+ type: Boolean,
51
+ default: function() {
52
+ return !0;
53
+ }
54
+ },
55
+ hideAfter: {
56
+ type: Number,
57
+ default: function() {
58
+ return 0;
59
+ }
60
+ },
61
+ manual: {
62
+ type: Boolean
63
+ },
64
+ modelValue: {
65
+ type: Boolean
66
+ },
67
+ offset: {
68
+ default: function() {
69
+ return 0;
70
+ }
71
+ },
72
+ effect: {
73
+ type: String,
74
+ default: function() {
75
+ return "";
76
+ }
77
+ },
78
+ openDelay: {
79
+ type: Number,
80
+ default: function() {
81
+ return 0;
82
+ }
83
+ },
84
+ closeDelay: {
85
+ type: Number,
86
+ default: function() {
87
+ return 100;
88
+ }
89
+ },
90
+ placement: {
91
+ type: String,
92
+ default: function() {
93
+ return "bottom";
94
+ }
95
+ },
96
+ popper: {},
97
+ popperClass: {
98
+ type: String
99
+ },
100
+ popperOptions: {
101
+ default: function() {
102
+ return {};
103
+ }
104
+ },
105
+ pre: {
106
+ type: Boolean
107
+ },
108
+ reference: {},
109
+ renderContent: {
110
+ type: Function
111
+ },
112
+ tabindex: {
113
+ type: Number,
114
+ default: function() {
115
+ return 0;
116
+ }
117
+ },
118
+ transition: {
119
+ type: String,
120
+ default: function() {
121
+ return "tiny-fade-in-linear";
122
+ }
123
+ },
124
+ type: {
125
+ type: String,
126
+ validator: function(t) {
127
+ return !!~["normal", "warning", "error", "info", "success"].indexOf(t);
128
+ }
129
+ },
130
+ visibleArrow: {
131
+ type: Boolean,
132
+ default: function() {
133
+ return !0;
134
+ }
135
+ },
136
+ genArrowByHtml: {
137
+ type: Boolean,
138
+ default: function() {
139
+ return !0;
140
+ }
141
+ },
142
+ zIndex: {
143
+ type: String,
144
+ default: function() {
145
+ return "next";
146
+ }
147
+ },
148
+ contentMaxHeight: {
149
+ type: String,
150
+ default: function() {
151
+ return "80vh";
152
+ }
153
+ }
154
+ }), u = l({
155
+ name: i + "Tooltip",
156
+ componentName: "Tooltip",
157
+ props: c,
158
+ setup: function(t, n) {
159
+ return f({
160
+ props: t,
161
+ context: n,
162
+ template: d
163
+ });
164
+ }
165
+ }), s = "3.undefined";
166
+ u.model = {
167
+ prop: "modelValue",
168
+ event: "update:modelValue"
169
+ };
170
+ u.install = function(e) {
171
+ e.component(u.name, u);
172
+ };
173
+ u.version = s;
174
+ export {
175
+ u as default
176
+ };
@@ -0,0 +1,248 @@
1
+ import * as y from "vue";
2
+ import { withDirectives as h, createVNode as m, vShow as C } from "vue";
3
+ import { renderless as w, api as x } from "../../../../../@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/tooltip/vue.js";
4
+ import { defineComponent as S, createComponent as B, h as f, deduplicateCssClass as M, stringifyCssClass as O, setup as N, $prefix as P, parseVnode as E, isEmptyVnode as A, $props as D } from "../../../../../@opentiny_vue-common@3.22.0/node_modules/@opentiny/vue-common/lib/index.js";
5
+ /* empty css */
6
+ function d() {
7
+ return d = Object.assign ? Object.assign.bind() : function(t) {
8
+ for (var e = 1; e < arguments.length; e++) {
9
+ var u = arguments[e];
10
+ for (var a in u) ({}).hasOwnProperty.call(u, a) && (t[a] = u[a]);
11
+ }
12
+ return t;
13
+ }, d.apply(null, arguments);
14
+ }
15
+ var F = /* @__PURE__ */ S({
16
+ name: P + "Tooltip",
17
+ componentName: "Tooltip",
18
+ props: d({}, D, {
19
+ visible: {
20
+ type: String,
21
+ default: function() {
22
+ return "always";
23
+ },
24
+ validator: function(e) {
25
+ return ["always", "auto"].includes(e);
26
+ }
27
+ },
28
+ adjustArrow: {
29
+ type: Boolean,
30
+ default: function() {
31
+ return !1;
32
+ }
33
+ },
34
+ appendToBody: {
35
+ type: Boolean,
36
+ default: function() {
37
+ return !0;
38
+ }
39
+ },
40
+ arrowOffset: {
41
+ type: Number,
42
+ default: function() {
43
+ return 0;
44
+ }
45
+ },
46
+ boundariesPadding: {
47
+ type: Number,
48
+ default: function() {
49
+ return 5;
50
+ }
51
+ },
52
+ closeDelay: {
53
+ type: Number,
54
+ default: function() {
55
+ return 300;
56
+ }
57
+ },
58
+ content: {
59
+ type: [String, Object]
60
+ },
61
+ disabled: {
62
+ type: Boolean
63
+ },
64
+ effect: {
65
+ type: String,
66
+ default: function() {
67
+ return "dark";
68
+ }
69
+ },
70
+ enterable: {
71
+ type: Boolean,
72
+ default: function() {
73
+ return !0;
74
+ }
75
+ },
76
+ hideAfter: {
77
+ type: Number,
78
+ default: function() {
79
+ return 0;
80
+ }
81
+ },
82
+ manual: {
83
+ type: Boolean
84
+ },
85
+ modelValue: {
86
+ type: Boolean
87
+ },
88
+ offset: {
89
+ default: function() {
90
+ return 0;
91
+ }
92
+ },
93
+ openDelay: {
94
+ type: Number,
95
+ default: function() {
96
+ return 0;
97
+ }
98
+ },
99
+ placement: {
100
+ type: String,
101
+ default: function() {
102
+ return "bottom";
103
+ }
104
+ },
105
+ popper: {},
106
+ popperClass: {
107
+ type: String
108
+ },
109
+ popperOptions: {
110
+ default: function() {
111
+ return {
112
+ gpuAcceleration: !1,
113
+ boundariesPadding: 10
114
+ };
115
+ }
116
+ },
117
+ pre: {
118
+ type: Boolean
119
+ },
120
+ reference: {},
121
+ renderContent: {
122
+ type: Function
123
+ },
124
+ tabindex: {
125
+ type: Number,
126
+ default: function() {
127
+ return 0;
128
+ }
129
+ },
130
+ transition: {
131
+ type: String,
132
+ default: function() {
133
+ return "tiny-fade-in-linear";
134
+ }
135
+ },
136
+ type: {
137
+ type: String,
138
+ validator: function(e) {
139
+ return !!~["normal", "warning", "error", "info", "success"].indexOf(e);
140
+ }
141
+ },
142
+ visibleArrow: {
143
+ type: Boolean,
144
+ default: function() {
145
+ return !0;
146
+ }
147
+ },
148
+ zIndex: {
149
+ type: String,
150
+ default: function() {
151
+ return "next";
152
+ }
153
+ },
154
+ contentMaxHeight: {
155
+ type: String
156
+ }
157
+ }),
158
+ setup: function(e, u) {
159
+ return N({
160
+ props: e,
161
+ context: u,
162
+ renderless: w,
163
+ api: x
164
+ });
165
+ },
166
+ render: function() {
167
+ var e = this, u = function(n) {
168
+ var r = n.slots.content && n.slots.content();
169
+ if (r && (!y.Comment || r[0].type !== y.Comment))
170
+ return r;
171
+ var o;
172
+ return n.renderContent ? o = n.renderContent(f, n.content) : n.pre ? o = n.content ? f("pre", n.content) : null : o = n.content, o;
173
+ };
174
+ if (!Object.prototype.hasOwnProperty.call(this, "popperVM")) {
175
+ var a = {
176
+ value: null
177
+ };
178
+ this.d({
179
+ popperVM: {
180
+ get: function() {
181
+ return a.value || (a.value = B({
182
+ el: document.createElement("div"),
183
+ propsData: null,
184
+ component: {
185
+ render: function() {
186
+ var r = u(e), o = typeof r == "string", i = {
187
+ attrs: {
188
+ name: e.transition
189
+ },
190
+ on: {
191
+ "after-leave": e.doDestroy
192
+ }
193
+ }, g = "is-" + (e.type || e.effect || "dark"), b = function() {
194
+ return e.setExpectedState(!0);
195
+ }, _ = function() {
196
+ e.setExpectedState(!1), e.debounceClose();
197
+ };
198
+ return e.$nextTick(function() {
199
+ !e.disabled && e.state.showPopper && r && e.updatePopper();
200
+ }), f("transition", i, [h(m("div", {
201
+ ref: "popper",
202
+ id: e.state.tooltipId,
203
+ class: ["tiny-tooltip", "tiny-tooltip__popper", g, e.popperClass, {
204
+ "tiny-tooltip__show-tips": e.state.showContent
205
+ }],
206
+ style: "max-width:" + e.state.tipsMaxWidth + "px",
207
+ role: "tooltip",
208
+ "aria-hidden": e.disabled || !e.state.showPopper ? "true" : "false",
209
+ onMouseenter: function() {
210
+ return b();
211
+ },
212
+ onMouseleave: function() {
213
+ return _();
214
+ }
215
+ }, [o ? m("div", {
216
+ class: "tiny-tooltip__content-wrapper",
217
+ style: "max-height:" + e.contentMaxHeight
218
+ }, [r]) : r]), [[C, !e.disabled && e.state.showPopper && r]])]);
219
+ }
220
+ }
221
+ })), a.value;
222
+ },
223
+ set: function(n) {
224
+ return a.value = n;
225
+ }
226
+ }
227
+ });
228
+ }
229
+ var v = function() {
230
+ var n = e.slots.default && e.slots.default();
231
+ if (!Array.isArray(n)) return null;
232
+ for (var r = null, o = 0; o < n.length; o++) {
233
+ var i = E(n[o]);
234
+ if (!A(i)) {
235
+ r = i;
236
+ break;
237
+ }
238
+ }
239
+ return r;
240
+ }, l = v();
241
+ if (!l) return null;
242
+ var c = l.data || l.props || (l.props = {});
243
+ return c.class = M("tiny-tooltip " + O(c.class)), l;
244
+ }
245
+ });
246
+ export {
247
+ F as default
248
+ };