@dialpad/dialtone-vue 3.127.0 → 3.129.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/dist/chunks/index-GVD15GIB.js +175 -0
- package/dist/chunks/index-GVD15GIB.js.map +1 -0
- package/dist/chunks/index-lu2o2f4r.js +169 -0
- package/dist/chunks/index-lu2o2f4r.js.map +1 -0
- package/dist/common/emoji.cjs +40 -163
- package/dist/common/emoji.cjs.map +1 -1
- package/dist/common/emoji.js +3 -146
- package/dist/common/emoji.js.map +1 -1
- package/dist/component-documentation.json +1 -1
- package/dist/dialtone-vue.cjs +3 -2
- package/dist/dialtone-vue.cjs.map +1 -1
- package/dist/dialtone-vue.js +4 -3
- package/dist/dialtone-vue.js.map +1 -1
- package/dist/lib/badge.cjs +21 -1
- package/dist/lib/badge.cjs.map +1 -1
- package/dist/lib/badge.js +21 -1
- package/dist/lib/badge.js.map +1 -1
- package/dist/lib/button.cjs +11 -2
- package/dist/lib/button.cjs.map +1 -1
- package/dist/lib/button.js +12 -3
- package/dist/lib/button.js.map +1 -1
- package/dist/lib/contact-centers-row.cjs +1 -2
- package/dist/lib/contact-centers-row.cjs.map +1 -1
- package/dist/lib/contact-centers-row.js +1 -2
- package/dist/lib/contact-centers-row.js.map +1 -1
- package/dist/lib/contact-row.cjs +1 -2
- package/dist/lib/contact-row.cjs.map +1 -1
- package/dist/lib/contact-row.js +1 -2
- package/dist/lib/contact-row.js.map +1 -1
- package/dist/lib/editor.cjs +1 -2
- package/dist/lib/editor.cjs.map +1 -1
- package/dist/lib/editor.js +1 -2
- package/dist/lib/editor.js.map +1 -1
- package/dist/lib/emoji-picker.cjs +50 -18
- package/dist/lib/emoji-picker.cjs.map +1 -1
- package/dist/lib/emoji-picker.js +51 -19
- package/dist/lib/emoji-picker.js.map +1 -1
- package/dist/lib/emoji-row.cjs +1 -2
- package/dist/lib/emoji-row.cjs.map +1 -1
- package/dist/lib/emoji-row.js +1 -2
- package/dist/lib/emoji-row.js.map +1 -1
- package/dist/lib/emoji-text-wrapper.cjs +1 -2
- package/dist/lib/emoji-text-wrapper.cjs.map +1 -1
- package/dist/lib/emoji-text-wrapper.js +1 -2
- package/dist/lib/emoji-text-wrapper.js.map +1 -1
- package/dist/lib/emoji.cjs +1 -2
- package/dist/lib/emoji.cjs.map +1 -1
- package/dist/lib/emoji.js +1 -2
- package/dist/lib/emoji.js.map +1 -1
- package/dist/lib/general-row.cjs +3 -4
- package/dist/lib/general-row.cjs.map +1 -1
- package/dist/lib/general-row.js +3 -4
- package/dist/lib/general-row.js.map +1 -1
- package/dist/lib/group-row.cjs +1 -2
- package/dist/lib/group-row.cjs.map +1 -1
- package/dist/lib/group-row.js +1 -2
- package/dist/lib/group-row.js.map +1 -1
- package/dist/lib/link.cjs +1 -0
- package/dist/lib/link.cjs.map +1 -1
- package/dist/lib/link.js +2 -1
- package/dist/lib/message-input.cjs +1 -2
- package/dist/lib/message-input.cjs.map +1 -1
- package/dist/lib/message-input.js +1 -2
- package/dist/lib/message-input.js.map +1 -1
- package/dist/lib/rich-text-editor.cjs +11 -177
- package/dist/lib/rich-text-editor.cjs.map +1 -1
- package/dist/lib/rich-text-editor.js +11 -177
- package/dist/lib/rich-text-editor.js.map +1 -1
- package/dist/lib/tooltip.cjs +31 -40
- package/dist/lib/tooltip.cjs.map +1 -1
- package/dist/lib/tooltip.js +32 -41
- package/dist/lib/tooltip.js.map +1 -1
- package/dist/types/common/emoji/index.d.ts +1 -0
- package/dist/types/common/emoji/index.d.ts.map +1 -1
- package/dist/types/components/badge/badge.vue.d.ts +32 -0
- package/dist/types/components/badge/badge.vue.d.ts.map +1 -1
- package/dist/types/components/button/button.vue.d.ts +21 -2
- package/dist/types/components/button/button.vue.d.ts.map +1 -1
- package/dist/types/components/emoji_picker/modules/emoji_search.vue.d.ts.map +1 -1
- package/dist/types/components/link/index.d.ts +1 -1
- package/dist/types/components/rich_text_editor/extensions/channels/channel.d.ts +0 -1
- package/dist/types/components/rich_text_editor/extensions/channels/channel.d.ts.map +1 -1
- package/dist/types/components/rich_text_editor/extensions/emoji/emoji.d.ts.map +1 -1
- package/dist/types/components/rich_text_editor/extensions/emoji/suggestion.d.ts +0 -1
- package/dist/types/components/rich_text_editor/extensions/emoji/suggestion.d.ts.map +1 -1
- package/dist/types/components/rich_text_editor/extensions/mentions/mention.d.ts +0 -1
- package/dist/types/components/rich_text_editor/extensions/mentions/mention.d.ts.map +1 -1
- package/dist/types/components/rich_text_editor/mention_suggestion.d.ts +2 -2
- package/dist/types/components/rich_text_editor/mention_suggestion.d.ts.map +1 -1
- package/dist/types/components/rich_text_editor/rich_text_editor.vue.d.ts +0 -10
- package/dist/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
- package/dist/types/components/tooltip/tooltip.vue.d.ts +10 -12
- package/dist/types/components/tooltip/tooltip.vue.d.ts.map +1 -1
- package/dist/types/recipes/leftbar/general_row/general_row_constants.d.ts +1 -1
- package/package.json +6 -6
package/dist/lib/tooltip.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.cjs","sources":["../../components/tooltip/tooltip.vue"],"sourcesContent":["<template>\n <div data-qa=\"dt-tooltip-container\">\n <!-- disabling as the below events are for capturing events from interactive\n elements within the span rather than on the span itself -->\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <span\n v-if=\"!externalAnchor\"\n ref=\"anchor\"\n data-qa=\"dt-tooltip-anchor\"\n @focusin=\"onEnterAnchor\"\n @focusout=\"onLeaveAnchor\"\n @mouseenter=\"onEnterAnchor\"\n @mouseleave=\"onLeaveAnchor\"\n @keydown.esc=\"onLeaveAnchor\"\n >\n <!-- @slot Slot for the anchor element -->\n <slot\n name=\"anchor\"\n />\n </span>\n <div\n :id=\"id\"\n ref=\"content\"\n data-qa=\"dt-tooltip\"\n :class=\"[\n 'd-tooltip',\n {\n [ TOOLTIP_KIND_MODIFIERS.inverted ]: inverted,\n },\n contentClass,\n ]\"\n v-on=\"tooltipListeners\"\n >\n <!-- In case when transitionend event doesn't work correct (for ex. tooltip component with custom trigger) -->\n <!-- after-leave event can be used instead of transitionend -->\n <!-- @slot Slot for the content, defaults to message prop -->\n <slot>\n {{ message }}\n </slot>\n </div>\n </div>\n</template>\n\n<script>\nimport {\n TOOLTIP_KIND_MODIFIERS,\n TOOLTIP_DIRECTIONS,\n TOOLTIP_STICKY_VALUES,\n TOOLTIP_DELAY_MS,\n} from './tooltip_constants.js';\nimport {\n POPOVER_APPEND_TO_VALUES,\n} from '../popover/popover_constants';\nimport { getUniqueString, hasSlotContent } from '@/common/utils';\nimport {\n createTippy,\n getAnchor,\n getPopperOptions,\n} from '@/components/popover/tippy_utils';\n\n/**\n * A tooltip is a floating label that briefly explains an action, function, or an element.\n * Its content is exclusively text and shouldn't be vital information for users.\n * If richer media is desired, consider using a popover instead.\n * @see https://dialtone.dialpad.com/components/tooltip.html\n */\nexport default {\n name: 'DtTooltip',\n\n props: {\n /**\n * The id of the tooltip\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * If the popover does not fit in the direction described by \"placement\",\n * it will attempt to change its direction to the \"fallbackPlacements\"\n * if defined, otherwise it will automatically position to a new location\n * as it sees best fit. See\n * <a\n * class=\"d-link\"\n * href=\"https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements\"\n * target=\"_blank\"\n * >\n * Popper.js docs\n * </a>\n * */\n fallbackPlacements: {\n type: Array,\n default: () => ['auto'],\n },\n\n /**\n * If true, applies inverted styles to the tooltip\n * @values true, false\n */\n inverted: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Displaces the tooltip from its reference element\n * by the specified number of pixels. See\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#offset\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n */\n offset: {\n type: Array,\n default: () => [0, 12],\n },\n\n /**\n * The direction the popover displays relative to the anchor. See\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#placement\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values top, top-start, top-end,\n * right, right-start, right-end,\n * left, left-start, left-end,\n * bottom, bottom-start, bottom-end,\n * auto, auto-start, auto-end\n */\n placement: {\n type: String,\n default: 'top',\n validator (placement) {\n return TOOLTIP_DIRECTIONS.includes(placement);\n },\n },\n\n /**\n * If the tooltip sticks to the anchor. This is usually not needed, but can be needed\n * if the reference element's position is animating, or to automatically update the popover\n * position in those cases the DOM layout changes the reference element's position.\n * `true` enables it, `reference` only checks the \"reference\" rect for changes and `popper` only\n * checks the \"popper\" rect for changes. See\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#sticky\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values true, false, reference, popper\n */\n sticky: {\n type: [Boolean, String],\n default: false,\n validator: (sticky) => {\n return TOOLTIP_STICKY_VALUES.includes(sticky);\n },\n },\n\n /**\n * Sets the element to which the tooltip is going to append to.\n * 'body' will append to the nearest body (supports shadow DOM).\n * This prop is not reactive, must be set on initial render.\n * @values 'body', 'parent', HTMLElement,\n */\n appendTo: {\n type: [HTMLElement, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n\n /**\n * Additional css classes for the tooltip content element.\n * Can accept all of String, Object, and Array, i.e. has the\n * same api as Vue's built-in handling of the class attribute.\n */\n contentClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * A provided message for the tooltip content\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Controls whether hover/focus causes the tooltip to appear.\n * Cannot be combined with the show prop. show value will be ignored.\n * by default this is true, if you override with false, the tooltip will never show up.\n */\n enabled: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Controls whether the tooltip is shown. Leaving this null will have the tooltip trigger on mouseover by default.\n * If you set this value, the default mouseover behavior will be disabled and you can control it as you need.\n * Supports .sync modifier\n * @values null, true, false\n */\n show: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Whether the tooltip should have a transition effect.\n */\n transition: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the tooltip will have a delay when being focused or moused over.\n * @values true, false\n */\n delay: {\n type: Boolean,\n default: true,\n },\n\n /**\n * External anchor id to use in those cases the anchor can't be provided via the slot.\n * For instance, using the combobox's input as the anchor for the popover.\n */\n externalAnchor: {\n type: String,\n default: null,\n },\n },\n\n emits: [\n /**\n * Emitted when tooltip is shown or hidden\n *\n * @event shown\n * @type {Boolean}\n */\n 'shown',\n\n /**\n * Sync show value\n *\n * @event update:show\n */\n 'update:show',\n ],\n\n data () {\n return {\n TOOLTIP_KIND_MODIFIERS,\n hasSlotContent,\n tip: null,\n\n inTimer: null,\n\n // Internal state for whether the tooltip is shown. Changing the prop\n // will update this.\n isShown: false,\n\n // this is where the placement currently is, this can be different than\n // the placement prop when there is not enough available room for the tip\n // to display and it uses a fallback placement.\n currentPlacement: this.placement,\n };\n },\n\n computed: {\n // whether the tooltip is visible or not.\n isVisible () {\n const hasMessage = !!this.message?.trim();\n const hasDefaultSlot = !!this.$slots?.default;\n const isDeviceCompatible = !this.isTouchDevice;\n\n const shouldBeVisible = this.isShown && this.enabled && (hasMessage || hasDefaultSlot);\n\n return shouldBeVisible && isDeviceCompatible;\n },\n\n tooltipListeners () {\n return {\n 'after-leave': () => {\n this.onLeaveTransitionComplete();\n },\n\n 'after-enter': () => {\n this.onEnterTransitionComplete();\n },\n };\n },\n\n tippyProps () {\n return {\n offset: this.offset,\n delay: this.delay ? TOOLTIP_DELAY_MS : false,\n placement: this.placement,\n sticky: this.sticky,\n theme: this.inverted ? 'inverted' : undefined,\n animation: this.transition ? 'fade' : false,\n\n popperOptions: getPopperOptions({\n fallbackPlacements: this.fallbackPlacements,\n hasHideModifierEnabled: true,\n onChangePlacement: this.onChangePlacement,\n }),\n };\n },\n\n anchor () {\n return this.externalAnchor ? document.body.querySelector(this.externalAnchor) : getAnchor(this.$refs.anchor);\n },\n },\n\n watch: {\n\n tippyProps: {\n handler: 'setProps',\n deep: true,\n },\n\n show: {\n handler: function (show) {\n if (show !== null) {\n this.isShown = show;\n }\n },\n\n immediate: true,\n },\n\n isShown (isShown) {\n if (isShown) {\n this.setProps();\n this.tip.show();\n } else {\n this.tip.hide();\n }\n },\n\n sticky (sticky) {\n this.tip.setProps({\n sticky,\n });\n },\n },\n\n mounted () {\n if (!this.enabled && this.show != null) {\n console.warn('Tooltip: You cannot use both the enabled and show props at the same time.');\n console.warn('The show prop will be ignored.');\n }\n\n this.externalAnchor && this.addExternalAnchorEventListeners();\n this.tip = createTippy(this.anchor, this.initOptions());\n\n // immediate watcher fires before mounted, so have this here in case\n // show prop was initially set to true.\n if (this.isShown) {\n this.tip.show();\n }\n },\n\n beforeUnmount () {\n this.externalAnchor && this.removeExternalAnchorEventListeners();\n\n if (this.tip) {\n this.tip?.destroy();\n }\n },\n\n methods: {\n calculateAnchorZindex () {\n // if a modal is currently active render at modal-element z-index, otherwise at tooltip z-index\n if (this.$el.getRootNode()\n .querySelector('.d-modal[aria-hidden=\"false\"], .d-modal--transparent[aria-hidden=\"false\"]') ||\n // Special case because we don't have any dialtone drawer component yet. Render at 651 when\n // anchor of popover is within a drawer.\n this.$el.closest('.d-zi-drawer')) {\n return 651;\n } else {\n return 400;\n }\n },\n\n hasVisibleFocus () {\n return this.anchor.matches(':focus-visible');\n },\n\n onEnterAnchor (e) {\n if (this.delay && this.inTimer === null) {\n this.inTimer = setTimeout(() => {\n this.triggerShow(e);\n }, TOOLTIP_DELAY_MS);\n } else {\n this.triggerShow(e);\n }\n },\n\n triggerShow (e) {\n if (e.type === 'focusin') {\n // only show tooltips on visible focus when triggered via focus.\n // when the user is using the mouse they only want tooltips to display\n // on mouseover.\n //\n // Example: anchor of a popover is a button with tooltip.\n // closing it with the mouse would trigger the tooltip to display as\n // the anchor is focused on close. Not what we want.\n if (this.show === null && this.hasVisibleFocus()) {\n this.isShown = true;\n }\n } else {\n if (this.show === null) this.isShown = true;\n }\n },\n\n onLeaveAnchor (e) {\n if (e.type === 'keydown' && e.code !== 'Escape') return;\n\n clearTimeout(this.inTimer);\n this.inTimer = null;\n this.triggerHide();\n },\n\n triggerHide () {\n if (this.show === null) this.isShown = false;\n },\n\n onChangePlacement (placement) {\n this.currentPlacement = placement;\n },\n\n onLeaveTransitionComplete () {\n this.tip?.unmount();\n this.$emit('shown', false);\n if (this.show !== null) {\n this.$emit('update:show', false);\n }\n },\n\n onEnterTransitionComplete () {\n this.$emit('shown', true);\n if (this.show !== null) {\n this.$emit('update:show', true);\n }\n },\n\n setProps () {\n if (this.tip && this.tip.setProps) {\n this.tip.setProps({\n ...this.tippyProps,\n // these need to be set here rather than in tippyProps because they are non-reactive\n appendTo: this.appendTo === 'body' ? this.anchor?.getRootNode()?.querySelector('body') : this.appendTo,\n zIndex: this.calculateAnchorZindex(),\n });\n }\n },\n\n onMount () {\n this.setProps();\n },\n\n onShow (tooltipInstance) {\n // don't show tooltip when no content\n if (tooltipInstance.props.content.textContent.trim().length === 0) {\n return false;\n }\n },\n\n // set initial options here. If any of the options need to dynamically change, they should be put in\n // tippyProps instead.\n initOptions () {\n const template = this.$refs.content;\n return {\n content: template,\n arrow: '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"7\"><path d=\"M 14.5,7 8,0 1.5,7 Z\"/></svg>',\n // transition duration - same as our custom fade delay in dialtone-globals.less\n duration: 180,\n interactive: false,\n trigger: 'manual',\n hideOnClick: false,\n // disable tooltip from displaying on touch devices\n touch: false,\n onMount: this.onMount,\n onShow: this.onShow,\n popperOptions: getPopperOptions({\n hasHideModifierEnabled: true,\n }),\n };\n },\n\n addExternalAnchorEventListeners () {\n ['focusin', 'mouseenter'].forEach(listener => {\n this.anchor.addEventListener(listener, (event) => this.onEnterAnchor(event));\n });\n ['focusout', 'mouseleave', 'keydown'].forEach(listener => {\n this.anchor.addEventListener(listener, (event) => this.onLeaveAnchor(event));\n });\n },\n\n removeExternalAnchorEventListeners () {\n ['focusin', 'mouseenter'].forEach(listener => {\n this.anchor.removeEventListener(listener, (event) => this.onEnterAnchor(event));\n });\n ['focusout', 'mouseleave', 'keydown'].forEach(listener => {\n this.anchor.removeEventListener(listener, (event) => this.onLeaveAnchor(event));\n });\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n@import 'tippy.js/dist/svg-arrow.css';\n\n.tippy-box[data-reference-hidden] {\n visibility: hidden;\n pointer-events: none;\n}\n\n.tippy-box > .tippy-svg-arrow {\n fill: var(--dt-color-surface-contrast);\n}\n\n.tippy-box[data-theme~='inverted'] > .tippy-svg-arrow {\n fill: var(--dt-color-surface-moderate);\n}\n\n.tippy-box[data-animation='fade'][data-state='hidden'] {\n opacity: 0;\n}\n</style>\n"],"names":["getUniqueString","TOOLTIP_DIRECTIONS","TOOLTIP_STICKY_VALUES","POPOVER_APPEND_TO_VALUES","TOOLTIP_KIND_MODIFIERS","hasSlotContent","TOOLTIP_DELAY_MS","getPopperOptions","getAnchor","createTippy","_openBlock","_createElementBlock","_renderSlot","_createElementVNode","_mergeProps","_toHandlers"],"mappings":";;;;;;;;AAkEA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,IAAI;AAAA,MACF,MAAM;AAAA,MACN,UAAW;AAAE,eAAOA,aAAe,gBAAA;AAAA,MAAK;AAAA,IACzC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAeD,oBAAoB;AAAA,MAClB,MAAM;AAAA,MACN,SAAS,MAAM,CAAC,MAAM;AAAA,IACvB;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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A,MAChF,CAAC;AAAA,IACF;AAAA,EACF;AACH;AA5gBO,MAAA,aAAA,EAAA,WAAQ,uBAAsB;;;AAAnC,SAAAG,cAAA,GAAAC,uBAuCM,OAvCN,YAuCM;AAAA,KAlCK,OAAc,mCADvBA,IAcO,mBAAA,QAAA;AAAA;MAZL,KAAI;AAAA,MACJ,WAAQ;AAAA,MACP,kDAAS,SAAa,iBAAA,SAAA,cAAA,GAAA,IAAA;AAAA,MACtB,mDAAU,SAAa,iBAAA,SAAA,cAAA,GAAA,IAAA;AAAA,MACvB,qDAAY,SAAa,iBAAA,SAAA,cAAA,GAAA,IAAA;AAAA,MACzB,qDAAY,SAAa,iBAAA,SAAA,cAAA,GAAA,IAAA;AAAA,MACzB,+DAAa,SAAa,iBAAA,SAAA,cAAA,GAAA,IAAA,GAAA,CAAA,KAAA,CAAA;AAAA;MAG3BC,eAEE,KAAA,QAAA,QAAA;AAAA;IAEJC,IAAA,mBAmBM,OAnBNC,eAmBM;AAAA,MAlBH,IAAI,OAAE;AAAA,MACP,KAAI;AAAA,MACJ,WAAQ;AAAA,MACP,OAAK;AAAA;;WAA+C,MAAsB,uBAAC,QAAQ,GAAI,OAAQ;AAAA;QAAqB,OAAY;AAAA;IAOjI,GAAAC,IAAA,WAAM,SAAgB,kBAAA,IAAA,CAAA,GAAA;AAAA,MAKtBH,IAAAA,WAEO,4BAFP,MAEO;AAAA,gDADF,OAAO,OAAA,GAAA,CAAA;AAAA;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"tooltip.cjs","sources":["../../components/tooltip/tooltip.vue"],"sourcesContent":["<template>\n <div data-qa=\"dt-tooltip-container\">\n <!-- disabling as the below events are for capturing events from interactive\n elements within the span rather than on the span itself -->\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <span\n v-if=\"!externalAnchor\"\n ref=\"anchor\"\n data-qa=\"dt-tooltip-anchor\"\n @focusin=\"onEnterAnchor\"\n @focusout=\"onLeaveAnchor\"\n @mouseenter=\"onEnterAnchor\"\n @mouseleave=\"onLeaveAnchor\"\n @keydown.esc=\"onLeaveAnchor\"\n >\n <!-- @slot Slot for the anchor element -->\n <slot\n name=\"anchor\"\n />\n </span>\n <div\n :id=\"id\"\n ref=\"content\"\n data-qa=\"dt-tooltip\"\n :class=\"[\n 'd-tooltip',\n {\n [ TOOLTIP_KIND_MODIFIERS.inverted ]: inverted,\n },\n contentClass,\n ]\"\n >\n <!-- In case when transitionend event doesn't work correct (for ex. tooltip component with custom trigger) -->\n <!-- after-leave event can be used instead of transitionend -->\n <!-- @slot Slot for the content, defaults to message prop -->\n <slot>\n {{ message }}\n </slot>\n </div>\n </div>\n</template>\n\n<script>\nimport {\n TOOLTIP_KIND_MODIFIERS,\n TOOLTIP_DIRECTIONS,\n TOOLTIP_STICKY_VALUES,\n TOOLTIP_DELAY_MS,\n} from './tooltip_constants.js';\nimport {\n POPOVER_APPEND_TO_VALUES,\n} from '../popover/popover_constants';\nimport { getUniqueString, hasSlotContent } from '@/common/utils';\nimport {\n createTippy,\n getAnchor,\n getPopperOptions,\n} from '@/components/popover/tippy_utils';\n\n/**\n * A tooltip is a floating label that briefly explains an action, function, or an element.\n * Its content is exclusively text and shouldn't be vital information for users.\n * If richer media is desired, consider using a popover instead.\n * @see https://dialtone.dialpad.com/components/tooltip.html\n */\nexport default {\n name: 'DtTooltip',\n\n props: {\n /**\n * The id of the tooltip\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * If the popover does not fit in the direction described by \"placement\",\n * it will attempt to change its direction to the \"fallbackPlacements\"\n * if defined, otherwise it will automatically position to a new location\n * as it sees best fit. See\n * <a\n * class=\"d-link\"\n * href=\"https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements\"\n * target=\"_blank\"\n * >\n * Popper.js docs\n * </a>\n * */\n fallbackPlacements: {\n type: Array,\n default: () => ['auto'],\n },\n\n /**\n * If true, applies inverted styles to the tooltip\n * @values true, false\n */\n inverted: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Displaces the tooltip from its reference element\n * by the specified number of pixels. See\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#offset\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n */\n offset: {\n type: Array,\n default: () => [0, 12],\n },\n\n /**\n * The direction the popover displays relative to the anchor. See\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#placement\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values top, top-start, top-end,\n * right, right-start, right-end,\n * left, left-start, left-end,\n * bottom, bottom-start, bottom-end,\n * auto, auto-start, auto-end\n */\n placement: {\n type: String,\n default: 'top',\n validator (placement) {\n return TOOLTIP_DIRECTIONS.includes(placement);\n },\n },\n\n /**\n * If the tooltip sticks to the anchor. This is usually not needed, but can be needed\n * if the reference element's position is animating, or to automatically update the popover\n * position in those cases the DOM layout changes the reference element's position.\n * `true` enables it, `reference` only checks the \"reference\" rect for changes and `popper` only\n * checks the \"popper\" rect for changes. See\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#sticky\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values true, false, reference, popper\n */\n sticky: {\n type: [Boolean, String],\n default: true,\n validator: (sticky) => {\n return TOOLTIP_STICKY_VALUES.includes(sticky);\n },\n },\n\n /**\n * Sets the element to which the tooltip is going to append to.\n * 'body' will append to the nearest body (supports shadow DOM).\n * This prop is not reactive, must be set on initial render.\n * @values 'body', 'parent', HTMLElement,\n */\n appendTo: {\n type: [HTMLElement, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n\n /**\n * Additional css classes for the tooltip content element.\n * Can accept all of String, Object, and Array, i.e. has the\n * same api as Vue's built-in handling of the class attribute.\n */\n contentClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * A provided message for the tooltip content\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Controls whether hover/focus causes the tooltip to appear.\n * Cannot be combined with the show prop. show value will be ignored.\n * by default this is true, if you override with false, the tooltip will never show up.\n */\n enabled: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Controls whether the tooltip is shown. Leaving this null will have the tooltip trigger on mouseover by default.\n * If you set this value, the default mouseover behavior will be disabled and you can control it as you need.\n * Supports .sync modifier\n * @values null, true, false\n */\n show: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Whether the tooltip should have a transition effect (fade).\n */\n transition: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the tooltip will have a delay when being focused or moused over.\n * @values true, false\n */\n delay: {\n type: Boolean,\n default: true,\n },\n\n /**\n * External anchor id to use in those cases the anchor can't be provided via the slot.\n * For instance, using the combobox's input as the anchor for the popover.\n */\n externalAnchor: {\n type: String,\n default: null,\n },\n },\n\n emits: [\n /**\n * Emitted when tooltip is shown or hidden\n *\n * @event shown\n * @type {Boolean}\n */\n 'shown',\n\n /**\n * Sync show value\n *\n * @event update:show\n */\n 'update:show',\n ],\n\n data () {\n return {\n TOOLTIP_KIND_MODIFIERS,\n hasSlotContent,\n tip: null,\n\n inTimer: null,\n\n // Internal state for whether the tooltip is shown. Changing the prop\n // will update this.\n internalShow: false,\n\n // this is where the placement currently is, this can be different than\n // the placement prop when there is not enough available room for the tip\n // to display and it uses a fallback placement.\n currentPlacement: this.placement,\n };\n },\n\n computed: {\n // eslint-disable-next-line complexity\n tippyProps () {\n return {\n offset: this.offset,\n delay: this.delay ? TOOLTIP_DELAY_MS : false,\n placement: this.placement,\n sticky: this.sticky,\n theme: this.inverted ? 'inverted' : undefined,\n animation: this.transition ? 'fade' : false,\n // onShown only triggers when transition is truthy\n onShown: (tooltipInstance) => this.onShow(tooltipInstance, 'onShown'),\n // onShown will always be called, but it will be called before the animation is complete\n onShow: (tooltipInstance) => this.onShow(tooltipInstance, 'onShow'),\n onHidden: this.onHide,\n\n popperOptions: getPopperOptions({\n fallbackPlacements: this.fallbackPlacements,\n hasHideModifierEnabled: true,\n onChangePlacement: this.onChangePlacement,\n }),\n };\n },\n\n anchor () {\n return this.externalAnchor ? document.body.querySelector(this.externalAnchor) : getAnchor(this.$refs.anchor);\n },\n },\n\n watch: {\n\n tippyProps: {\n handler: 'setProps',\n deep: true,\n },\n\n show: {\n handler: function (show) {\n if (show !== null) {\n this.internalShow = show;\n }\n },\n\n immediate: true,\n },\n\n internalShow (value) {\n if (value) {\n this.setProps();\n this.tip.show();\n } else {\n this.tip.hide();\n }\n },\n\n sticky (sticky) {\n this.tip.setProps({\n sticky,\n });\n },\n },\n\n mounted () {\n if (!this.enabled && this.show != null) {\n console.warn('Tooltip: You cannot use both the enabled and show props at the same time.');\n console.warn('The show prop will be ignored.');\n }\n\n this.externalAnchor && this.addExternalAnchorEventListeners();\n this.tip = createTippy(this.anchor, this.initOptions());\n },\n\n beforeUnmount () {\n this.externalAnchor && this.removeExternalAnchorEventListeners();\n\n if (this.tip) {\n this.tip?.destroy();\n }\n },\n\n methods: {\n calculateAnchorZindex () {\n // if a modal is currently active render at modal-element z-index, otherwise at tooltip z-index\n if (this.$el.getRootNode()\n .querySelector('.d-modal[aria-hidden=\"false\"], .d-modal--transparent[aria-hidden=\"false\"]') ||\n // Special case because we don't have any dialtone drawer component yet. Render at 651 when\n // anchor of popover is within a drawer.\n this.$el.closest('.d-zi-drawer')) {\n return 651;\n } else {\n return 400;\n }\n },\n\n hasVisibleFocus () {\n return this.anchor.matches(':focus-visible');\n },\n\n onEnterAnchor (e) {\n if (this.delay && this.inTimer === null) {\n this.inTimer = setTimeout(() => {\n this.triggerShow(e);\n }, TOOLTIP_DELAY_MS);\n } else {\n this.triggerShow(e);\n }\n },\n\n triggerShow (e) {\n if (e.type === 'focusin') {\n // only show tooltips on visible focus when triggered via focus.\n // when the user is using the mouse they only want tooltips to display\n // on mouseover.\n //\n // Example: anchor of a popover is a button with tooltip.\n // closing it with the mouse would trigger the tooltip to display as\n // the anchor is focused on close. Not what we want.\n if (this.show === null && this.hasVisibleFocus()) {\n this.internalShow = true;\n }\n } else {\n if (this.show === null) this.internalShow = true;\n }\n },\n\n onLeaveAnchor (e) {\n if (e.type === 'keydown' && e.code !== 'Escape') return;\n\n clearTimeout(this.inTimer);\n this.inTimer = null;\n this.triggerHide();\n },\n\n triggerHide () {\n if (this.show === null) this.internalShow = false;\n },\n\n onChangePlacement (placement) {\n this.currentPlacement = placement;\n },\n\n onHide () {\n this.tip?.unmount();\n this.$emit('shown', false);\n if (this.show !== null) {\n this.$emit('update:show', false);\n }\n },\n\n onShow (tooltipInstance, callingMethod) {\n if (!this.tooltipHasContent(tooltipInstance)) {\n return false;\n }\n if (this.transition && callingMethod === 'onShow') {\n return;\n }\n this.$emit('shown', true);\n if (this.show !== null) {\n this.$emit('update:show', true);\n }\n },\n\n setProps () {\n if (this.tip && this.tip.setProps) {\n this.tip.setProps({\n ...this.tippyProps,\n // these need to be set here rather than in tippyProps because they are non-reactive\n appendTo: this.appendTo === 'body' ? this.anchor?.getRootNode()?.querySelector('body') : this.appendTo,\n zIndex: this.calculateAnchorZindex(),\n });\n }\n },\n\n onMount () {\n this.setProps();\n },\n\n tooltipHasContent (tooltipInstance) {\n // don't show tooltip when no content\n if (tooltipInstance.props.content.textContent.trim().length === 0) {\n return false;\n }\n return true;\n },\n\n // set initial options here. If any of the options need to dynamically change, they should be put in\n // tippyProps instead.\n initOptions () {\n const template = this.$refs.content;\n return {\n content: template,\n arrow: '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"7\"><path d=\"M 14.5,7 8,0 1.5,7 Z\"/></svg>',\n // transition duration - same as our custom fade delay in dialtone-globals.less\n duration: 180,\n interactive: false,\n trigger: 'manual',\n hideOnClick: false,\n // disable tooltip from displaying on touch devices\n touch: false,\n onMount: this.onMount,\n showOnCreate: this.internalShow,\n popperOptions: getPopperOptions({\n hasHideModifierEnabled: true,\n }),\n };\n },\n\n addExternalAnchorEventListeners () {\n ['focusin', 'mouseenter'].forEach(listener => {\n this.anchor.addEventListener(listener, (event) => this.onEnterAnchor(event));\n });\n ['focusout', 'mouseleave', 'keydown'].forEach(listener => {\n this.anchor.addEventListener(listener, (event) => this.onLeaveAnchor(event));\n });\n },\n\n removeExternalAnchorEventListeners () {\n ['focusin', 'mouseenter'].forEach(listener => {\n this.anchor.removeEventListener(listener, (event) => this.onEnterAnchor(event));\n });\n ['focusout', 'mouseleave', 'keydown'].forEach(listener => {\n this.anchor.removeEventListener(listener, (event) => this.onLeaveAnchor(event));\n });\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n@import 'tippy.js/dist/svg-arrow.css';\n\n.tippy-box[data-reference-hidden] {\n visibility: hidden;\n pointer-events: none;\n}\n\n.tippy-box > .tippy-svg-arrow {\n fill: var(--dt-color-surface-contrast);\n}\n\n.tippy-box[data-theme~='inverted'] > .tippy-svg-arrow {\n fill: var(--dt-color-surface-moderate);\n}\n\n.tippy-box[data-animation='fade'][data-state='hidden'] {\n opacity: 0;\n}\n</style>\n"],"names":["getUniqueString","TOOLTIP_DIRECTIONS","TOOLTIP_STICKY_VALUES","POPOVER_APPEND_TO_VALUES","TOOLTIP_KIND_MODIFIERS","hasSlotContent","TOOLTIP_DELAY_MS","getPopperOptions","getAnchor","createTippy","_openBlock","_createElementBlock","_renderSlot","_createElementVNode","_normalizeClass"],"mappings":";;;;;;;;AAiEA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,IAAI;AAAA,MACF,MAAM;AAAA,MACN,UAAW;AAAE,eAAOA,aAAe,gBAAA;AAAA,MAAK;AAAA,IACzC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAeD,oBAAoB;AAAA,MAClB,MAAM;AAAA,MACN,SAAS,MAAM,CAAC,MAAM;AAAA,IACvB;AAA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;AAAA,EACF;AACH;AA3fO,MAAA,aAAA,EAAA,WAAQ,uBAAsB;;;AAAnC,SAAAG,cAAA,GAAAC,uBAsCM,OAtCN,YAsCM;AAAA,KAjCK,OAAc,mCADvBA,IAcO,mBAAA,QAAA;AAAA;MAZL,KAAI;AAAA,MACJ,WAAQ;AAAA,MACP,kDAAS,SAAa,iBAAA,SAAA,cAAA,GAAA,IAAA;AAAA,MACtB,mDAAU,SAAa,iBAAA,SAAA,cAAA,GAAA,IAAA;AAAA,MACvB,qDAAY,SAAa,iBAAA,SAAA,cAAA,GAAA,IAAA;AAAA,MACzB,qDAAY,SAAa,iBAAA,SAAA,cAAA,GAAA,IAAA;AAAA,MACzB,+DAAa,SAAa,iBAAA,SAAA,cAAA,GAAA,IAAA,GAAA,CAAA,KAAA,CAAA;AAAA;MAG3BC,eAEE,KAAA,QAAA,QAAA;AAAA;IAEJC,IAAAA,mBAkBM,OAAA;AAAA,MAjBH,IAAI,OAAE;AAAA,MACP,KAAI;AAAA,MACJ,WAAQ;AAAA,MACP,OAAKC,IAAAA,eAAA;AAAA;;WAA+C,MAAsB,uBAAC,QAAQ,GAAI,OAAQ;AAAA;QAAqB,OAAY;AAAA;;MAWjIF,IAAAA,WAEO,4BAFP,MAEO;AAAA,gDADF,OAAO,OAAA,GAAA,CAAA;AAAA;;;;;;;;;;;"}
|
package/dist/lib/tooltip.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TOOLTIP_DIRECTIONS, TOOLTIP_STICKY_VALUES, POPOVER_APPEND_TO_VALUES, TOOLTIP_KIND_MODIFIERS, TOOLTIP_DELAY_MS, getPopperOptions, getAnchor, createTippy } from "../chunks/popover_constants-kQaX7G4a.js";
|
|
2
2
|
import { TOOLTIP_HIDE_ON_CLICK_VARIANTS } from "../chunks/popover_constants-kQaX7G4a.js";
|
|
3
3
|
import { getUniqueString, hasSlotContent } from "../common/utils.js";
|
|
4
|
-
import { openBlock, createElementBlock, withKeys, renderSlot, createCommentVNode, createElementVNode,
|
|
4
|
+
import { openBlock, createElementBlock, withKeys, renderSlot, createCommentVNode, createElementVNode, normalizeClass, createTextVNode, toDisplayString } from "vue";
|
|
5
5
|
import { _export_sfc } from "../chunks/_plugin-vue_export-helper-caHeSgYY.js";
|
|
6
6
|
import "tippy.js";
|
|
7
7
|
import "../common/constants.js";
|
|
@@ -96,7 +96,7 @@ const _sfc_main = {
|
|
|
96
96
|
*/
|
|
97
97
|
sticky: {
|
|
98
98
|
type: [Boolean, String],
|
|
99
|
-
default:
|
|
99
|
+
default: true,
|
|
100
100
|
validator: (sticky) => {
|
|
101
101
|
return TOOLTIP_STICKY_VALUES.includes(sticky);
|
|
102
102
|
}
|
|
@@ -150,7 +150,7 @@ const _sfc_main = {
|
|
|
150
150
|
default: null
|
|
151
151
|
},
|
|
152
152
|
/**
|
|
153
|
-
* Whether the tooltip should have a transition effect.
|
|
153
|
+
* Whether the tooltip should have a transition effect (fade).
|
|
154
154
|
*/
|
|
155
155
|
transition: {
|
|
156
156
|
type: Boolean,
|
|
@@ -196,7 +196,7 @@ const _sfc_main = {
|
|
|
196
196
|
inTimer: null,
|
|
197
197
|
// Internal state for whether the tooltip is shown. Changing the prop
|
|
198
198
|
// will update this.
|
|
199
|
-
|
|
199
|
+
internalShow: false,
|
|
200
200
|
// this is where the placement currently is, this can be different than
|
|
201
201
|
// the placement prop when there is not enough available room for the tip
|
|
202
202
|
// to display and it uses a fallback placement.
|
|
@@ -204,25 +204,7 @@ const _sfc_main = {
|
|
|
204
204
|
};
|
|
205
205
|
},
|
|
206
206
|
computed: {
|
|
207
|
-
//
|
|
208
|
-
isVisible() {
|
|
209
|
-
var _a, _b;
|
|
210
|
-
const hasMessage = !!((_a = this.message) == null ? void 0 : _a.trim());
|
|
211
|
-
const hasDefaultSlot = !!((_b = this.$slots) == null ? void 0 : _b.default);
|
|
212
|
-
const isDeviceCompatible = !this.isTouchDevice;
|
|
213
|
-
const shouldBeVisible = this.isShown && this.enabled && (hasMessage || hasDefaultSlot);
|
|
214
|
-
return shouldBeVisible && isDeviceCompatible;
|
|
215
|
-
},
|
|
216
|
-
tooltipListeners() {
|
|
217
|
-
return {
|
|
218
|
-
"after-leave": () => {
|
|
219
|
-
this.onLeaveTransitionComplete();
|
|
220
|
-
},
|
|
221
|
-
"after-enter": () => {
|
|
222
|
-
this.onEnterTransitionComplete();
|
|
223
|
-
}
|
|
224
|
-
};
|
|
225
|
-
},
|
|
207
|
+
// eslint-disable-next-line complexity
|
|
226
208
|
tippyProps() {
|
|
227
209
|
return {
|
|
228
210
|
offset: this.offset,
|
|
@@ -231,6 +213,11 @@ const _sfc_main = {
|
|
|
231
213
|
sticky: this.sticky,
|
|
232
214
|
theme: this.inverted ? "inverted" : void 0,
|
|
233
215
|
animation: this.transition ? "fade" : false,
|
|
216
|
+
// onShown only triggers when transition is truthy
|
|
217
|
+
onShown: (tooltipInstance) => this.onShow(tooltipInstance, "onShown"),
|
|
218
|
+
// onShown will always be called, but it will be called before the animation is complete
|
|
219
|
+
onShow: (tooltipInstance) => this.onShow(tooltipInstance, "onShow"),
|
|
220
|
+
onHidden: this.onHide,
|
|
234
221
|
popperOptions: getPopperOptions({
|
|
235
222
|
fallbackPlacements: this.fallbackPlacements,
|
|
236
223
|
hasHideModifierEnabled: true,
|
|
@@ -250,13 +237,13 @@ const _sfc_main = {
|
|
|
250
237
|
show: {
|
|
251
238
|
handler: function(show) {
|
|
252
239
|
if (show !== null) {
|
|
253
|
-
this.
|
|
240
|
+
this.internalShow = show;
|
|
254
241
|
}
|
|
255
242
|
},
|
|
256
243
|
immediate: true
|
|
257
244
|
},
|
|
258
|
-
|
|
259
|
-
if (
|
|
245
|
+
internalShow(value) {
|
|
246
|
+
if (value) {
|
|
260
247
|
this.setProps();
|
|
261
248
|
this.tip.show();
|
|
262
249
|
} else {
|
|
@@ -276,9 +263,6 @@ const _sfc_main = {
|
|
|
276
263
|
}
|
|
277
264
|
this.externalAnchor && this.addExternalAnchorEventListeners();
|
|
278
265
|
this.tip = createTippy(this.anchor, this.initOptions());
|
|
279
|
-
if (this.isShown) {
|
|
280
|
-
this.tip.show();
|
|
281
|
-
}
|
|
282
266
|
},
|
|
283
267
|
beforeUnmount() {
|
|
284
268
|
var _a;
|
|
@@ -312,11 +296,11 @@ const _sfc_main = {
|
|
|
312
296
|
triggerShow(e) {
|
|
313
297
|
if (e.type === "focusin") {
|
|
314
298
|
if (this.show === null && this.hasVisibleFocus()) {
|
|
315
|
-
this.
|
|
299
|
+
this.internalShow = true;
|
|
316
300
|
}
|
|
317
301
|
} else {
|
|
318
302
|
if (this.show === null)
|
|
319
|
-
this.
|
|
303
|
+
this.internalShow = true;
|
|
320
304
|
}
|
|
321
305
|
},
|
|
322
306
|
onLeaveAnchor(e) {
|
|
@@ -328,12 +312,12 @@ const _sfc_main = {
|
|
|
328
312
|
},
|
|
329
313
|
triggerHide() {
|
|
330
314
|
if (this.show === null)
|
|
331
|
-
this.
|
|
315
|
+
this.internalShow = false;
|
|
332
316
|
},
|
|
333
317
|
onChangePlacement(placement) {
|
|
334
318
|
this.currentPlacement = placement;
|
|
335
319
|
},
|
|
336
|
-
|
|
320
|
+
onHide() {
|
|
337
321
|
var _a;
|
|
338
322
|
(_a = this.tip) == null ? void 0 : _a.unmount();
|
|
339
323
|
this.$emit("shown", false);
|
|
@@ -341,7 +325,13 @@ const _sfc_main = {
|
|
|
341
325
|
this.$emit("update:show", false);
|
|
342
326
|
}
|
|
343
327
|
},
|
|
344
|
-
|
|
328
|
+
onShow(tooltipInstance, callingMethod) {
|
|
329
|
+
if (!this.tooltipHasContent(tooltipInstance)) {
|
|
330
|
+
return false;
|
|
331
|
+
}
|
|
332
|
+
if (this.transition && callingMethod === "onShow") {
|
|
333
|
+
return;
|
|
334
|
+
}
|
|
345
335
|
this.$emit("shown", true);
|
|
346
336
|
if (this.show !== null) {
|
|
347
337
|
this.$emit("update:show", true);
|
|
@@ -361,10 +351,11 @@ const _sfc_main = {
|
|
|
361
351
|
onMount() {
|
|
362
352
|
this.setProps();
|
|
363
353
|
},
|
|
364
|
-
|
|
354
|
+
tooltipHasContent(tooltipInstance) {
|
|
365
355
|
if (tooltipInstance.props.content.textContent.trim().length === 0) {
|
|
366
356
|
return false;
|
|
367
357
|
}
|
|
358
|
+
return true;
|
|
368
359
|
},
|
|
369
360
|
// set initial options here. If any of the options need to dynamically change, they should be put in
|
|
370
361
|
// tippyProps instead.
|
|
@@ -381,7 +372,7 @@ const _sfc_main = {
|
|
|
381
372
|
// disable tooltip from displaying on touch devices
|
|
382
373
|
touch: false,
|
|
383
374
|
onMount: this.onMount,
|
|
384
|
-
|
|
375
|
+
showOnCreate: this.internalShow,
|
|
385
376
|
popperOptions: getPopperOptions({
|
|
386
377
|
hasHideModifierEnabled: true
|
|
387
378
|
})
|
|
@@ -421,22 +412,22 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
421
412
|
}, [
|
|
422
413
|
renderSlot(_ctx.$slots, "anchor")
|
|
423
414
|
], 544)) : createCommentVNode("", true),
|
|
424
|
-
createElementVNode("div",
|
|
415
|
+
createElementVNode("div", {
|
|
425
416
|
id: $props.id,
|
|
426
417
|
ref: "content",
|
|
427
418
|
"data-qa": "dt-tooltip",
|
|
428
|
-
class: [
|
|
419
|
+
class: normalizeClass([
|
|
429
420
|
"d-tooltip",
|
|
430
421
|
{
|
|
431
422
|
[$data.TOOLTIP_KIND_MODIFIERS.inverted]: $props.inverted
|
|
432
423
|
},
|
|
433
424
|
$props.contentClass
|
|
434
|
-
]
|
|
435
|
-
},
|
|
425
|
+
])
|
|
426
|
+
}, [
|
|
436
427
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
437
428
|
createTextVNode(toDisplayString($props.message), 1)
|
|
438
429
|
])
|
|
439
|
-
],
|
|
430
|
+
], 10, _hoisted_2)
|
|
440
431
|
]);
|
|
441
432
|
}
|
|
442
433
|
const DtTooltip = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
package/dist/lib/tooltip.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.js","sources":["../../components/tooltip/tooltip.vue"],"sourcesContent":["<template>\n <div data-qa=\"dt-tooltip-container\">\n <!-- disabling as the below events are for capturing events from interactive\n elements within the span rather than on the span itself -->\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <span\n v-if=\"!externalAnchor\"\n ref=\"anchor\"\n data-qa=\"dt-tooltip-anchor\"\n @focusin=\"onEnterAnchor\"\n @focusout=\"onLeaveAnchor\"\n @mouseenter=\"onEnterAnchor\"\n @mouseleave=\"onLeaveAnchor\"\n @keydown.esc=\"onLeaveAnchor\"\n >\n <!-- @slot Slot for the anchor element -->\n <slot\n name=\"anchor\"\n />\n </span>\n <div\n :id=\"id\"\n ref=\"content\"\n data-qa=\"dt-tooltip\"\n :class=\"[\n 'd-tooltip',\n {\n [ TOOLTIP_KIND_MODIFIERS.inverted ]: inverted,\n },\n contentClass,\n ]\"\n v-on=\"tooltipListeners\"\n >\n <!-- In case when transitionend event doesn't work correct (for ex. tooltip component with custom trigger) -->\n <!-- after-leave event can be used instead of transitionend -->\n <!-- @slot Slot for the content, defaults to message prop -->\n <slot>\n {{ message }}\n </slot>\n </div>\n </div>\n</template>\n\n<script>\nimport {\n TOOLTIP_KIND_MODIFIERS,\n TOOLTIP_DIRECTIONS,\n TOOLTIP_STICKY_VALUES,\n TOOLTIP_DELAY_MS,\n} from './tooltip_constants.js';\nimport {\n POPOVER_APPEND_TO_VALUES,\n} from '../popover/popover_constants';\nimport { getUniqueString, hasSlotContent } from '@/common/utils';\nimport {\n createTippy,\n getAnchor,\n getPopperOptions,\n} from '@/components/popover/tippy_utils';\n\n/**\n * A tooltip is a floating label that briefly explains an action, function, or an element.\n * Its content is exclusively text and shouldn't be vital information for users.\n * If richer media is desired, consider using a popover instead.\n * @see https://dialtone.dialpad.com/components/tooltip.html\n */\nexport default {\n name: 'DtTooltip',\n\n props: {\n /**\n * The id of the tooltip\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * If the popover does not fit in the direction described by \"placement\",\n * it will attempt to change its direction to the \"fallbackPlacements\"\n * if defined, otherwise it will automatically position to a new location\n * as it sees best fit. See\n * <a\n * class=\"d-link\"\n * href=\"https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements\"\n * target=\"_blank\"\n * >\n * Popper.js docs\n * </a>\n * */\n fallbackPlacements: {\n type: Array,\n default: () => ['auto'],\n },\n\n /**\n * If true, applies inverted styles to the tooltip\n * @values true, false\n */\n inverted: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Displaces the tooltip from its reference element\n * by the specified number of pixels. See\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#offset\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n */\n offset: {\n type: Array,\n default: () => [0, 12],\n },\n\n /**\n * The direction the popover displays relative to the anchor. See\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#placement\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values top, top-start, top-end,\n * right, right-start, right-end,\n * left, left-start, left-end,\n * bottom, bottom-start, bottom-end,\n * auto, auto-start, auto-end\n */\n placement: {\n type: String,\n default: 'top',\n validator (placement) {\n return TOOLTIP_DIRECTIONS.includes(placement);\n },\n },\n\n /**\n * If the tooltip sticks to the anchor. This is usually not needed, but can be needed\n * if the reference element's position is animating, or to automatically update the popover\n * position in those cases the DOM layout changes the reference element's position.\n * `true` enables it, `reference` only checks the \"reference\" rect for changes and `popper` only\n * checks the \"popper\" rect for changes. See\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#sticky\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values true, false, reference, popper\n */\n sticky: {\n type: [Boolean, String],\n default: false,\n validator: (sticky) => {\n return TOOLTIP_STICKY_VALUES.includes(sticky);\n },\n },\n\n /**\n * Sets the element to which the tooltip is going to append to.\n * 'body' will append to the nearest body (supports shadow DOM).\n * This prop is not reactive, must be set on initial render.\n * @values 'body', 'parent', HTMLElement,\n */\n appendTo: {\n type: [HTMLElement, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n\n /**\n * Additional css classes for the tooltip content element.\n * Can accept all of String, Object, and Array, i.e. has the\n * same api as Vue's built-in handling of the class attribute.\n */\n contentClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * A provided message for the tooltip content\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Controls whether hover/focus causes the tooltip to appear.\n * Cannot be combined with the show prop. show value will be ignored.\n * by default this is true, if you override with false, the tooltip will never show up.\n */\n enabled: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Controls whether the tooltip is shown. Leaving this null will have the tooltip trigger on mouseover by default.\n * If you set this value, the default mouseover behavior will be disabled and you can control it as you need.\n * Supports .sync modifier\n * @values null, true, false\n */\n show: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Whether the tooltip should have a transition effect.\n */\n transition: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the tooltip will have a delay when being focused or moused over.\n * @values true, false\n */\n delay: {\n type: Boolean,\n default: true,\n },\n\n /**\n * External anchor id to use in those cases the anchor can't be provided via the slot.\n * For instance, using the combobox's input as the anchor for the popover.\n */\n externalAnchor: {\n type: String,\n default: null,\n },\n },\n\n emits: [\n /**\n * Emitted when tooltip is shown or hidden\n *\n * @event shown\n * @type {Boolean}\n */\n 'shown',\n\n /**\n * Sync show value\n *\n * @event update:show\n */\n 'update:show',\n ],\n\n data () {\n return {\n TOOLTIP_KIND_MODIFIERS,\n hasSlotContent,\n tip: null,\n\n inTimer: null,\n\n // Internal state for whether the tooltip is shown. Changing the prop\n // will update this.\n isShown: false,\n\n // this is where the placement currently is, this can be different than\n // the placement prop when there is not enough available room for the tip\n // to display and it uses a fallback placement.\n currentPlacement: this.placement,\n };\n },\n\n computed: {\n // whether the tooltip is visible or not.\n isVisible () {\n const hasMessage = !!this.message?.trim();\n const hasDefaultSlot = !!this.$slots?.default;\n const isDeviceCompatible = !this.isTouchDevice;\n\n const shouldBeVisible = this.isShown && this.enabled && (hasMessage || hasDefaultSlot);\n\n return shouldBeVisible && isDeviceCompatible;\n },\n\n tooltipListeners () {\n return {\n 'after-leave': () => {\n this.onLeaveTransitionComplete();\n },\n\n 'after-enter': () => {\n this.onEnterTransitionComplete();\n },\n };\n },\n\n tippyProps () {\n return {\n offset: this.offset,\n delay: this.delay ? TOOLTIP_DELAY_MS : false,\n placement: this.placement,\n sticky: this.sticky,\n theme: this.inverted ? 'inverted' : undefined,\n animation: this.transition ? 'fade' : false,\n\n popperOptions: getPopperOptions({\n fallbackPlacements: this.fallbackPlacements,\n hasHideModifierEnabled: true,\n onChangePlacement: this.onChangePlacement,\n }),\n };\n },\n\n anchor () {\n return this.externalAnchor ? document.body.querySelector(this.externalAnchor) : getAnchor(this.$refs.anchor);\n },\n },\n\n watch: {\n\n tippyProps: {\n handler: 'setProps',\n deep: true,\n },\n\n show: {\n handler: function (show) {\n if (show !== null) {\n this.isShown = show;\n }\n },\n\n immediate: true,\n },\n\n isShown (isShown) {\n if (isShown) {\n this.setProps();\n this.tip.show();\n } else {\n this.tip.hide();\n }\n },\n\n sticky (sticky) {\n this.tip.setProps({\n sticky,\n });\n },\n },\n\n mounted () {\n if (!this.enabled && this.show != null) {\n console.warn('Tooltip: You cannot use both the enabled and show props at the same time.');\n console.warn('The show prop will be ignored.');\n }\n\n this.externalAnchor && this.addExternalAnchorEventListeners();\n this.tip = createTippy(this.anchor, this.initOptions());\n\n // immediate watcher fires before mounted, so have this here in case\n // show prop was initially set to true.\n if (this.isShown) {\n this.tip.show();\n }\n },\n\n beforeUnmount () {\n this.externalAnchor && this.removeExternalAnchorEventListeners();\n\n if (this.tip) {\n this.tip?.destroy();\n }\n },\n\n methods: {\n calculateAnchorZindex () {\n // if a modal is currently active render at modal-element z-index, otherwise at tooltip z-index\n if (this.$el.getRootNode()\n .querySelector('.d-modal[aria-hidden=\"false\"], .d-modal--transparent[aria-hidden=\"false\"]') ||\n // Special case because we don't have any dialtone drawer component yet. Render at 651 when\n // anchor of popover is within a drawer.\n this.$el.closest('.d-zi-drawer')) {\n return 651;\n } else {\n return 400;\n }\n },\n\n hasVisibleFocus () {\n return this.anchor.matches(':focus-visible');\n },\n\n onEnterAnchor (e) {\n if (this.delay && this.inTimer === null) {\n this.inTimer = setTimeout(() => {\n this.triggerShow(e);\n }, TOOLTIP_DELAY_MS);\n } else {\n this.triggerShow(e);\n }\n },\n\n triggerShow (e) {\n if (e.type === 'focusin') {\n // only show tooltips on visible focus when triggered via focus.\n // when the user is using the mouse they only want tooltips to display\n // on mouseover.\n //\n // Example: anchor of a popover is a button with tooltip.\n // closing it with the mouse would trigger the tooltip to display as\n // the anchor is focused on close. Not what we want.\n if (this.show === null && this.hasVisibleFocus()) {\n this.isShown = true;\n }\n } else {\n if (this.show === null) this.isShown = true;\n }\n },\n\n onLeaveAnchor (e) {\n if (e.type === 'keydown' && e.code !== 'Escape') return;\n\n clearTimeout(this.inTimer);\n this.inTimer = null;\n this.triggerHide();\n },\n\n triggerHide () {\n if (this.show === null) this.isShown = false;\n },\n\n onChangePlacement (placement) {\n this.currentPlacement = placement;\n },\n\n onLeaveTransitionComplete () {\n this.tip?.unmount();\n this.$emit('shown', false);\n if (this.show !== null) {\n this.$emit('update:show', false);\n }\n },\n\n onEnterTransitionComplete () {\n this.$emit('shown', true);\n if (this.show !== null) {\n this.$emit('update:show', true);\n }\n },\n\n setProps () {\n if (this.tip && this.tip.setProps) {\n this.tip.setProps({\n ...this.tippyProps,\n // these need to be set here rather than in tippyProps because they are non-reactive\n appendTo: this.appendTo === 'body' ? this.anchor?.getRootNode()?.querySelector('body') : this.appendTo,\n zIndex: this.calculateAnchorZindex(),\n });\n }\n },\n\n onMount () {\n this.setProps();\n },\n\n onShow (tooltipInstance) {\n // don't show tooltip when no content\n if (tooltipInstance.props.content.textContent.trim().length === 0) {\n return false;\n }\n },\n\n // set initial options here. If any of the options need to dynamically change, they should be put in\n // tippyProps instead.\n initOptions () {\n const template = this.$refs.content;\n return {\n content: template,\n arrow: '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"7\"><path d=\"M 14.5,7 8,0 1.5,7 Z\"/></svg>',\n // transition duration - same as our custom fade delay in dialtone-globals.less\n duration: 180,\n interactive: false,\n trigger: 'manual',\n hideOnClick: false,\n // disable tooltip from displaying on touch devices\n touch: false,\n onMount: this.onMount,\n onShow: this.onShow,\n popperOptions: getPopperOptions({\n hasHideModifierEnabled: true,\n }),\n };\n },\n\n addExternalAnchorEventListeners () {\n ['focusin', 'mouseenter'].forEach(listener => {\n this.anchor.addEventListener(listener, (event) => this.onEnterAnchor(event));\n });\n ['focusout', 'mouseleave', 'keydown'].forEach(listener => {\n this.anchor.addEventListener(listener, (event) => this.onLeaveAnchor(event));\n });\n },\n\n removeExternalAnchorEventListeners () {\n ['focusin', 'mouseenter'].forEach(listener => {\n this.anchor.removeEventListener(listener, (event) => this.onEnterAnchor(event));\n });\n ['focusout', 'mouseleave', 'keydown'].forEach(listener => {\n this.anchor.removeEventListener(listener, (event) => this.onLeaveAnchor(event));\n });\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n@import 'tippy.js/dist/svg-arrow.css';\n\n.tippy-box[data-reference-hidden] {\n visibility: hidden;\n pointer-events: none;\n}\n\n.tippy-box > .tippy-svg-arrow {\n fill: var(--dt-color-surface-contrast);\n}\n\n.tippy-box[data-theme~='inverted'] > .tippy-svg-arrow {\n fill: var(--dt-color-surface-moderate);\n}\n\n.tippy-box[data-animation='fade'][data-state='hidden'] {\n opacity: 0;\n}\n</style>\n"],"names":["_openBlock","_createElementBlock","_renderSlot","_createElementVNode","_mergeProps","_toHandlers"],"mappings":";;;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;;;;;"}
|
|
1
|
+
{"version":3,"file":"tooltip.js","sources":["../../components/tooltip/tooltip.vue"],"sourcesContent":["<template>\n <div data-qa=\"dt-tooltip-container\">\n <!-- disabling as the below events are for capturing events from interactive\n elements within the span rather than on the span itself -->\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <span\n v-if=\"!externalAnchor\"\n ref=\"anchor\"\n data-qa=\"dt-tooltip-anchor\"\n @focusin=\"onEnterAnchor\"\n @focusout=\"onLeaveAnchor\"\n @mouseenter=\"onEnterAnchor\"\n @mouseleave=\"onLeaveAnchor\"\n @keydown.esc=\"onLeaveAnchor\"\n >\n <!-- @slot Slot for the anchor element -->\n <slot\n name=\"anchor\"\n />\n </span>\n <div\n :id=\"id\"\n ref=\"content\"\n data-qa=\"dt-tooltip\"\n :class=\"[\n 'd-tooltip',\n {\n [ TOOLTIP_KIND_MODIFIERS.inverted ]: inverted,\n },\n contentClass,\n ]\"\n >\n <!-- In case when transitionend event doesn't work correct (for ex. tooltip component with custom trigger) -->\n <!-- after-leave event can be used instead of transitionend -->\n <!-- @slot Slot for the content, defaults to message prop -->\n <slot>\n {{ message }}\n </slot>\n </div>\n </div>\n</template>\n\n<script>\nimport {\n TOOLTIP_KIND_MODIFIERS,\n TOOLTIP_DIRECTIONS,\n TOOLTIP_STICKY_VALUES,\n TOOLTIP_DELAY_MS,\n} from './tooltip_constants.js';\nimport {\n POPOVER_APPEND_TO_VALUES,\n} from '../popover/popover_constants';\nimport { getUniqueString, hasSlotContent } from '@/common/utils';\nimport {\n createTippy,\n getAnchor,\n getPopperOptions,\n} from '@/components/popover/tippy_utils';\n\n/**\n * A tooltip is a floating label that briefly explains an action, function, or an element.\n * Its content is exclusively text and shouldn't be vital information for users.\n * If richer media is desired, consider using a popover instead.\n * @see https://dialtone.dialpad.com/components/tooltip.html\n */\nexport default {\n name: 'DtTooltip',\n\n props: {\n /**\n * The id of the tooltip\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * If the popover does not fit in the direction described by \"placement\",\n * it will attempt to change its direction to the \"fallbackPlacements\"\n * if defined, otherwise it will automatically position to a new location\n * as it sees best fit. See\n * <a\n * class=\"d-link\"\n * href=\"https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements\"\n * target=\"_blank\"\n * >\n * Popper.js docs\n * </a>\n * */\n fallbackPlacements: {\n type: Array,\n default: () => ['auto'],\n },\n\n /**\n * If true, applies inverted styles to the tooltip\n * @values true, false\n */\n inverted: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Displaces the tooltip from its reference element\n * by the specified number of pixels. See\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#offset\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n */\n offset: {\n type: Array,\n default: () => [0, 12],\n },\n\n /**\n * The direction the popover displays relative to the anchor. See\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#placement\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values top, top-start, top-end,\n * right, right-start, right-end,\n * left, left-start, left-end,\n * bottom, bottom-start, bottom-end,\n * auto, auto-start, auto-end\n */\n placement: {\n type: String,\n default: 'top',\n validator (placement) {\n return TOOLTIP_DIRECTIONS.includes(placement);\n },\n },\n\n /**\n * If the tooltip sticks to the anchor. This is usually not needed, but can be needed\n * if the reference element's position is animating, or to automatically update the popover\n * position in those cases the DOM layout changes the reference element's position.\n * `true` enables it, `reference` only checks the \"reference\" rect for changes and `popper` only\n * checks the \"popper\" rect for changes. See\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#sticky\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values true, false, reference, popper\n */\n sticky: {\n type: [Boolean, String],\n default: true,\n validator: (sticky) => {\n return TOOLTIP_STICKY_VALUES.includes(sticky);\n },\n },\n\n /**\n * Sets the element to which the tooltip is going to append to.\n * 'body' will append to the nearest body (supports shadow DOM).\n * This prop is not reactive, must be set on initial render.\n * @values 'body', 'parent', HTMLElement,\n */\n appendTo: {\n type: [HTMLElement, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n\n /**\n * Additional css classes for the tooltip content element.\n * Can accept all of String, Object, and Array, i.e. has the\n * same api as Vue's built-in handling of the class attribute.\n */\n contentClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * A provided message for the tooltip content\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Controls whether hover/focus causes the tooltip to appear.\n * Cannot be combined with the show prop. show value will be ignored.\n * by default this is true, if you override with false, the tooltip will never show up.\n */\n enabled: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Controls whether the tooltip is shown. Leaving this null will have the tooltip trigger on mouseover by default.\n * If you set this value, the default mouseover behavior will be disabled and you can control it as you need.\n * Supports .sync modifier\n * @values null, true, false\n */\n show: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Whether the tooltip should have a transition effect (fade).\n */\n transition: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the tooltip will have a delay when being focused or moused over.\n * @values true, false\n */\n delay: {\n type: Boolean,\n default: true,\n },\n\n /**\n * External anchor id to use in those cases the anchor can't be provided via the slot.\n * For instance, using the combobox's input as the anchor for the popover.\n */\n externalAnchor: {\n type: String,\n default: null,\n },\n },\n\n emits: [\n /**\n * Emitted when tooltip is shown or hidden\n *\n * @event shown\n * @type {Boolean}\n */\n 'shown',\n\n /**\n * Sync show value\n *\n * @event update:show\n */\n 'update:show',\n ],\n\n data () {\n return {\n TOOLTIP_KIND_MODIFIERS,\n hasSlotContent,\n tip: null,\n\n inTimer: null,\n\n // Internal state for whether the tooltip is shown. Changing the prop\n // will update this.\n internalShow: false,\n\n // this is where the placement currently is, this can be different than\n // the placement prop when there is not enough available room for the tip\n // to display and it uses a fallback placement.\n currentPlacement: this.placement,\n };\n },\n\n computed: {\n // eslint-disable-next-line complexity\n tippyProps () {\n return {\n offset: this.offset,\n delay: this.delay ? TOOLTIP_DELAY_MS : false,\n placement: this.placement,\n sticky: this.sticky,\n theme: this.inverted ? 'inverted' : undefined,\n animation: this.transition ? 'fade' : false,\n // onShown only triggers when transition is truthy\n onShown: (tooltipInstance) => this.onShow(tooltipInstance, 'onShown'),\n // onShown will always be called, but it will be called before the animation is complete\n onShow: (tooltipInstance) => this.onShow(tooltipInstance, 'onShow'),\n onHidden: this.onHide,\n\n popperOptions: getPopperOptions({\n fallbackPlacements: this.fallbackPlacements,\n hasHideModifierEnabled: true,\n onChangePlacement: this.onChangePlacement,\n }),\n };\n },\n\n anchor () {\n return this.externalAnchor ? document.body.querySelector(this.externalAnchor) : getAnchor(this.$refs.anchor);\n },\n },\n\n watch: {\n\n tippyProps: {\n handler: 'setProps',\n deep: true,\n },\n\n show: {\n handler: function (show) {\n if (show !== null) {\n this.internalShow = show;\n }\n },\n\n immediate: true,\n },\n\n internalShow (value) {\n if (value) {\n this.setProps();\n this.tip.show();\n } else {\n this.tip.hide();\n }\n },\n\n sticky (sticky) {\n this.tip.setProps({\n sticky,\n });\n },\n },\n\n mounted () {\n if (!this.enabled && this.show != null) {\n console.warn('Tooltip: You cannot use both the enabled and show props at the same time.');\n console.warn('The show prop will be ignored.');\n }\n\n this.externalAnchor && this.addExternalAnchorEventListeners();\n this.tip = createTippy(this.anchor, this.initOptions());\n },\n\n beforeUnmount () {\n this.externalAnchor && this.removeExternalAnchorEventListeners();\n\n if (this.tip) {\n this.tip?.destroy();\n }\n },\n\n methods: {\n calculateAnchorZindex () {\n // if a modal is currently active render at modal-element z-index, otherwise at tooltip z-index\n if (this.$el.getRootNode()\n .querySelector('.d-modal[aria-hidden=\"false\"], .d-modal--transparent[aria-hidden=\"false\"]') ||\n // Special case because we don't have any dialtone drawer component yet. Render at 651 when\n // anchor of popover is within a drawer.\n this.$el.closest('.d-zi-drawer')) {\n return 651;\n } else {\n return 400;\n }\n },\n\n hasVisibleFocus () {\n return this.anchor.matches(':focus-visible');\n },\n\n onEnterAnchor (e) {\n if (this.delay && this.inTimer === null) {\n this.inTimer = setTimeout(() => {\n this.triggerShow(e);\n }, TOOLTIP_DELAY_MS);\n } else {\n this.triggerShow(e);\n }\n },\n\n triggerShow (e) {\n if (e.type === 'focusin') {\n // only show tooltips on visible focus when triggered via focus.\n // when the user is using the mouse they only want tooltips to display\n // on mouseover.\n //\n // Example: anchor of a popover is a button with tooltip.\n // closing it with the mouse would trigger the tooltip to display as\n // the anchor is focused on close. Not what we want.\n if (this.show === null && this.hasVisibleFocus()) {\n this.internalShow = true;\n }\n } else {\n if (this.show === null) this.internalShow = true;\n }\n },\n\n onLeaveAnchor (e) {\n if (e.type === 'keydown' && e.code !== 'Escape') return;\n\n clearTimeout(this.inTimer);\n this.inTimer = null;\n this.triggerHide();\n },\n\n triggerHide () {\n if (this.show === null) this.internalShow = false;\n },\n\n onChangePlacement (placement) {\n this.currentPlacement = placement;\n },\n\n onHide () {\n this.tip?.unmount();\n this.$emit('shown', false);\n if (this.show !== null) {\n this.$emit('update:show', false);\n }\n },\n\n onShow (tooltipInstance, callingMethod) {\n if (!this.tooltipHasContent(tooltipInstance)) {\n return false;\n }\n if (this.transition && callingMethod === 'onShow') {\n return;\n }\n this.$emit('shown', true);\n if (this.show !== null) {\n this.$emit('update:show', true);\n }\n },\n\n setProps () {\n if (this.tip && this.tip.setProps) {\n this.tip.setProps({\n ...this.tippyProps,\n // these need to be set here rather than in tippyProps because they are non-reactive\n appendTo: this.appendTo === 'body' ? this.anchor?.getRootNode()?.querySelector('body') : this.appendTo,\n zIndex: this.calculateAnchorZindex(),\n });\n }\n },\n\n onMount () {\n this.setProps();\n },\n\n tooltipHasContent (tooltipInstance) {\n // don't show tooltip when no content\n if (tooltipInstance.props.content.textContent.trim().length === 0) {\n return false;\n }\n return true;\n },\n\n // set initial options here. If any of the options need to dynamically change, they should be put in\n // tippyProps instead.\n initOptions () {\n const template = this.$refs.content;\n return {\n content: template,\n arrow: '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"7\"><path d=\"M 14.5,7 8,0 1.5,7 Z\"/></svg>',\n // transition duration - same as our custom fade delay in dialtone-globals.less\n duration: 180,\n interactive: false,\n trigger: 'manual',\n hideOnClick: false,\n // disable tooltip from displaying on touch devices\n touch: false,\n onMount: this.onMount,\n showOnCreate: this.internalShow,\n popperOptions: getPopperOptions({\n hasHideModifierEnabled: true,\n }),\n };\n },\n\n addExternalAnchorEventListeners () {\n ['focusin', 'mouseenter'].forEach(listener => {\n this.anchor.addEventListener(listener, (event) => this.onEnterAnchor(event));\n });\n ['focusout', 'mouseleave', 'keydown'].forEach(listener => {\n this.anchor.addEventListener(listener, (event) => this.onLeaveAnchor(event));\n });\n },\n\n removeExternalAnchorEventListeners () {\n ['focusin', 'mouseenter'].forEach(listener => {\n this.anchor.removeEventListener(listener, (event) => this.onEnterAnchor(event));\n });\n ['focusout', 'mouseleave', 'keydown'].forEach(listener => {\n this.anchor.removeEventListener(listener, (event) => this.onLeaveAnchor(event));\n });\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n@import 'tippy.js/dist/svg-arrow.css';\n\n.tippy-box[data-reference-hidden] {\n visibility: hidden;\n pointer-events: none;\n}\n\n.tippy-box > .tippy-svg-arrow {\n fill: var(--dt-color-surface-contrast);\n}\n\n.tippy-box[data-theme~='inverted'] > .tippy-svg-arrow {\n fill: var(--dt-color-surface-moderate);\n}\n\n.tippy-box[data-animation='fade'][data-state='hidden'] {\n opacity: 0;\n}\n</style>\n"],"names":["_openBlock","_createElementBlock","_renderSlot","_createElementVNode","_normalizeClass"],"mappings":";;;;;;;AAiEA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,IAAI;AAAA,MACF,MAAM;AAAA,MACN,UAAW;AAAE,eAAO,gBAAe;AAAA,MAAK;AAAA,IACzC;AAA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CAAC,UAAU,KAAK,cAAc,KAAK,CAAC;AAAA,MAChF,CAAC;AAAA,IACF;AAAA,EACF;AACH;AA3fO,MAAA,aAAA,EAAA,WAAQ,uBAAsB;;;AAAnC,SAAAA,UAAA,GAAAC,mBAsCM,OAtCN,YAsCM;AAAA,KAjCK,OAAc,+BADvBA,mBAcO,QAAA;AAAA;MAZL,KAAI;AAAA,MACJ,WAAQ;AAAA,MACP,kDAAS,SAAa,iBAAA,SAAA,cAAA,GAAA,IAAA;AAAA,MACtB,mDAAU,SAAa,iBAAA,SAAA,cAAA,GAAA,IAAA;AAAA,MACvB,qDAAY,SAAa,iBAAA,SAAA,cAAA,GAAA,IAAA;AAAA,MACzB,qDAAY,SAAa,iBAAA,SAAA,cAAA,GAAA,IAAA;AAAA,MACzB,2DAAa,SAAa,iBAAA,SAAA,cAAA,GAAA,IAAA,GAAA,CAAA,KAAA,CAAA;AAAA;MAG3BC,WAEE,KAAA,QAAA,QAAA;AAAA;IAEJC,mBAkBM,OAAA;AAAA,MAjBH,IAAI,OAAE;AAAA,MACP,KAAI;AAAA,MACJ,WAAQ;AAAA,MACP,OAAKC,eAAA;AAAA;;WAA+C,MAAsB,uBAAC,QAAQ,GAAI,OAAQ;AAAA;QAAqB,OAAY;AAAA;;MAWjIF,WAEO,4BAFP,MAEO;AAAA,wCADF,OAAO,OAAA,GAAA,CAAA;AAAA;;;;;"}
|
|
@@ -14,6 +14,7 @@ export function codeToEmojiData(code: any): any;
|
|
|
14
14
|
export function findShortCodes(textContent: any): Set<any>;
|
|
15
15
|
export function filterValidShortCodes(shortcodes: any): Set<any>;
|
|
16
16
|
export function findEmojis(textContent: any): Set<any>;
|
|
17
|
+
export const emojiRegex: RegExp;
|
|
17
18
|
export const emojiVersion: "8.0";
|
|
18
19
|
export const defaultEmojiAssetUrl: string;
|
|
19
20
|
export let customEmojiAssetUrl: null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../common/emoji/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../common/emoji/index.js"],"names":[],"mappings":"AAoBA,oCAEC;AAED,8EAMC;AAED,8EAMC;AAED,kDAEC;AAED,oDAEC;AAED;;GAEG;AACH,yDA6DC;AAID,gEAqBC;AAUD,oDAWC;AAGD,kDAOC;AAGD,gDAUC;AAMD,2DAKC;AAED,iEAGC;AAKD,uDAIC;AA3MD,gCAAwD;AACxD,iCAAkC;AAClC,0CAAqH;AACrH,qCAAsC;AAGtC,sCAAqD;AACrD,2CAA4C;AAG5C,sCAAqD;AACrD,2CAA4C;AAE5C,4BAAuC;AAEvC,yCAA0D"}
|
|
@@ -60,6 +60,21 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
60
60
|
type: (ObjectConstructor | ArrayConstructor | StringConstructor)[];
|
|
61
61
|
default: string;
|
|
62
62
|
};
|
|
63
|
+
/**
|
|
64
|
+
* Shows a subtle appearance for the badge
|
|
65
|
+
* Currently only affects the badge when type is bulletin.
|
|
66
|
+
*/
|
|
67
|
+
subtle: {
|
|
68
|
+
type: BooleanConstructor;
|
|
69
|
+
default: boolean;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Outlines the badge with a border
|
|
73
|
+
*/
|
|
74
|
+
outlined: {
|
|
75
|
+
type: BooleanConstructor;
|
|
76
|
+
default: boolean;
|
|
77
|
+
};
|
|
63
78
|
}, any, {
|
|
64
79
|
BADGE_TYPE_MODIFIERS: {
|
|
65
80
|
default: string;
|
|
@@ -171,6 +186,21 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
171
186
|
type: (ObjectConstructor | ArrayConstructor | StringConstructor)[];
|
|
172
187
|
default: string;
|
|
173
188
|
};
|
|
189
|
+
/**
|
|
190
|
+
* Shows a subtle appearance for the badge
|
|
191
|
+
* Currently only affects the badge when type is bulletin.
|
|
192
|
+
*/
|
|
193
|
+
subtle: {
|
|
194
|
+
type: BooleanConstructor;
|
|
195
|
+
default: boolean;
|
|
196
|
+
};
|
|
197
|
+
/**
|
|
198
|
+
* Outlines the badge with a border
|
|
199
|
+
*/
|
|
200
|
+
outlined: {
|
|
201
|
+
type: BooleanConstructor;
|
|
202
|
+
default: boolean;
|
|
203
|
+
};
|
|
174
204
|
}>>, {
|
|
175
205
|
type: string;
|
|
176
206
|
text: string;
|
|
@@ -179,6 +209,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
179
209
|
kind: string;
|
|
180
210
|
decoration: string;
|
|
181
211
|
labelClass: string | Record<string, any> | unknown[];
|
|
212
|
+
subtle: boolean;
|
|
213
|
+
outlined: boolean;
|
|
182
214
|
}, {}>;
|
|
183
215
|
export default _default;
|
|
184
216
|
//# sourceMappingURL=badge.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.vue.d.ts","sourceRoot":"","sources":["../../../../components/badge/badge.vue.js"],"names":[],"mappings":";IAkBI;;;;OAIG;;;;;IAMH;;;OAGG;;;;;IAMH;;OAEG;;;;;IAMH;;;OAGG;;;;;;IAOH;;;OAGG;;;;;;IAOH;;;;;;OAMG;;;;;;IAOH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"badge.vue.d.ts","sourceRoot":"","sources":["../../../../components/badge/badge.vue.js"],"names":[],"mappings":";IAkBI;;;;OAIG;;;;;IAMH;;;OAGG;;;;;IAMH;;OAEG;;;;;IAMH;;;OAGG;;;;;;IAOH;;;OAGG;;;;;;IAOH;;;;;;OAMG;;;;;;IAOH;;OAEG;;;;;IAMH;;;OAGG;;;;;IAMH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;QA/EH;;;;WAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAJH;;;;OAIG;;;;;IAMH;;;OAGG;;;;;IAMH;;OAEG;;;;;IAMH;;;OAGG;;;;;;IAOH;;;OAGG;;;;;;IAOH;;;;;;OAMG;;;;;;IAOH;;OAEG;;;;;IAMH;;;OAGG;;;;;IAMH;;OAEG"}
|
|
@@ -36,7 +36,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
36
36
|
};
|
|
37
37
|
/**
|
|
38
38
|
* The color of the link and button if the button is styled as a link.
|
|
39
|
-
* @values default, warning, danger, success, muted
|
|
39
|
+
* @values default, warning, danger, success, muted
|
|
40
40
|
* @see DtLink
|
|
41
41
|
*/
|
|
42
42
|
linkKind: {
|
|
@@ -44,6 +44,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
44
44
|
default: string;
|
|
45
45
|
validator: (lk: unknown) => boolean;
|
|
46
46
|
};
|
|
47
|
+
/**
|
|
48
|
+
* Determines whether the link should have inverted styling if the button is styled as a link.
|
|
49
|
+
* @values true, false
|
|
50
|
+
* @see DtLink
|
|
51
|
+
*/
|
|
52
|
+
linkInverted: {
|
|
53
|
+
type: BooleanConstructor;
|
|
54
|
+
default: boolean;
|
|
55
|
+
};
|
|
47
56
|
/**
|
|
48
57
|
* HTML button disabled attribute
|
|
49
58
|
* <a
|
|
@@ -198,7 +207,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
198
207
|
};
|
|
199
208
|
/**
|
|
200
209
|
* The color of the link and button if the button is styled as a link.
|
|
201
|
-
* @values default, warning, danger, success, muted
|
|
210
|
+
* @values default, warning, danger, success, muted
|
|
202
211
|
* @see DtLink
|
|
203
212
|
*/
|
|
204
213
|
linkKind: {
|
|
@@ -206,6 +215,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
206
215
|
default: string;
|
|
207
216
|
validator: (lk: unknown) => boolean;
|
|
208
217
|
};
|
|
218
|
+
/**
|
|
219
|
+
* Determines whether the link should have inverted styling if the button is styled as a link.
|
|
220
|
+
* @values true, false
|
|
221
|
+
* @see DtLink
|
|
222
|
+
*/
|
|
223
|
+
linkInverted: {
|
|
224
|
+
type: BooleanConstructor;
|
|
225
|
+
default: boolean;
|
|
226
|
+
};
|
|
209
227
|
/**
|
|
210
228
|
* HTML button disabled attribute
|
|
211
229
|
* <a
|
|
@@ -315,6 +333,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
315
333
|
iconPosition: string;
|
|
316
334
|
importance: string;
|
|
317
335
|
linkKind: string;
|
|
336
|
+
linkInverted: boolean;
|
|
318
337
|
disabled: boolean;
|
|
319
338
|
width: string;
|
|
320
339
|
assertiveOnFocus: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.vue.d.ts","sourceRoot":"","sources":["../../../../components/button/button.vue.js"],"names":[],"mappings":";IA6BI;;;OAGG;;;;;IAMH;;;OAGG;;;;;;IAOH;;;OAGG;;;;;;IAOH;;;;OAIG;;;;;IAMH;;;;OAIG;;;;;;IAOH;;;;;;;;;;OAUG;;;;;IAMH;;;;;;;;;;OAUG;;;;;;IAOH;;;;;;OAMG;;;;;IAMH;;;OAGG;;;;;;IAOH;;OAEG;;;;;IAMH;;;OAGG;;;;;IAMH;;;OAGG;;;;;;IAOH;;;;;OAKG;;;;;IAMH;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"button.vue.d.ts","sourceRoot":"","sources":["../../../../components/button/button.vue.js"],"names":[],"mappings":";IA6BI;;;OAGG;;;;;IAMH;;;OAGG;;;;;;IAOH;;;OAGG;;;;;;IAOH;;;;OAIG;;;;;IAMH;;;;OAIG;;;;;;IAOH;;;;OAIG;;;;;IAMH;;;;;;;;;;OAUG;;;;;IAMH;;;;;;;;;;OAUG;;;;;;IAOH;;;;;;OAMG;;;;;IAMH;;;OAGG;;;;;;IAOH;;OAEG;;;;;IAMH;;;OAGG;;;;;IAMH;;;OAGG;;;;;;IAOH;;;;;OAKG;;;;;IAMH;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA7JH;;;OAGG;;;;;IAMH;;;OAGG;;;;;;IAOH;;;OAGG;;;;;;IAOH;;;;OAIG;;;;;IAMH;;;;OAIG;;;;;;IAOH;;;;OAIG;;;;;IAMH;;;;;;;;;;OAUG;;;;;IAMH;;;;;;;;;;OAUG;;;;;;IAOH;;;;;;OAMG;;;;;IAMH;;;OAGG;;;;;;IAOH;;OAEG;;;;;IAMH;;;OAGG;;;;;IAMH;;;OAGG;;;;;;IAOH;;;;;OAKG;;;;;IAMH;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;;;;;+BAvLwB,gBAAgB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emoji_search.vue.d.ts","sourceRoot":"","sources":["../../../../../components/emoji_picker/modules/emoji_search.vue.js"],"names":[],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"emoji_search.vue.d.ts","sourceRoot":"","sources":["../../../../../components/emoji_picker/modules/emoji_search.vue.js"],"names":[],"mappings":";;;;;;;;;;;AA6BA,0CAEC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../../../../../../components/rich_text_editor/extensions/channels/channel.js"],"names":[],"mappings":"AAQA,
|
|
1
|
+
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../../../../../../components/rich_text_editor/extensions/channels/channel.js"],"names":[],"mappings":"AAQA,iHA0CG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emoji.d.ts","sourceRoot":"","sources":["../../../../../../components/rich_text_editor/extensions/emoji/emoji.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"emoji.d.ts","sourceRoot":"","sources":["../../../../../../components/rich_text_editor/extensions/emoji/emoji.js"],"names":[],"mappings":"AAUA,4CAAqD;AA+BrD,mCA6GG;0BAlJuB,kBAAkB;qBAJwB,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suggestion.d.ts","sourceRoot":"","sources":["../../../../../../components/rich_text_editor/extensions/emoji/suggestion.js"],"names":[],"mappings":";IAUS
|
|
1
|
+
{"version":3,"file":"suggestion.d.ts","sourceRoot":"","sources":["../../../../../../components/rich_text_editor/extensions/emoji/suggestion.js"],"names":[],"mappings":";IAUS;;;;QAYN;IAEQ;;;;aA0BR;IAEO;;;;;MA0DP"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mention.d.ts","sourceRoot":"","sources":["../../../../../../components/rich_text_editor/extensions/mentions/mention.js"],"names":[],"mappings":"AAQA,
|
|
1
|
+
{"version":3,"file":"mention.d.ts","sourceRoot":"","sources":["../../../../../../components/rich_text_editor/extensions/mentions/mention.js"],"names":[],"mappings":"AAQA,iHAyCG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mention_suggestion.d.ts","sourceRoot":"","sources":["../../../../components/rich_text_editor/mention_suggestion.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"mention_suggestion.d.ts","sourceRoot":"","sources":["../../../../components/rich_text_editor/mention_suggestion.js"],"names":[],"mappings":";IA6CE;;;;;;SAMC"}
|