@elliemae/ds-truncated-tooltip-text 2.2.0-alpha.4 → 3.0.0-next.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.
@@ -1,74 +1,78 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
- }
18
- return target;
19
- };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
- };
23
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
- return (module2, temp) => {
25
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
- };
27
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
- var TooltipTextProvider_exports = {};
29
- __export(TooltipTextProvider_exports, {
30
- TooltipTextProvider: () => TooltipTextProvider,
31
- TruncatedTooltipContext: () => TruncatedTooltipContext,
32
- default: () => TooltipTextProvider_default
33
- });
34
- var React = __toESM(require("react"));
35
- var import_react = __toESM(require("react"));
36
- var import_ds_popover = require("@elliemae/ds-popover");
37
- const TruncatedTooltipContext = import_react.default.createContext();
38
- const { Provider } = TruncatedTooltipContext;
39
- function TooltipTextProvider({
40
- children,
41
- tooltipDelay = 200,
42
- placement = "top",
43
- ...tooltipOptions
44
- }) {
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var _jsx2 = require('@babel/runtime/helpers/jsx');
6
+ var _defineProperty = require('@babel/runtime/helpers/defineProperty');
7
+ var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
8
+ require('core-js/modules/web.dom-collections.iterator.js');
9
+ require('core-js/modules/esnext.async-iterator.filter.js');
10
+ require('core-js/modules/esnext.iterator.constructor.js');
11
+ require('core-js/modules/esnext.iterator.filter.js');
12
+ require('core-js/modules/esnext.async-iterator.for-each.js');
13
+ require('core-js/modules/esnext.iterator.for-each.js');
14
+ var React = require('react');
15
+ var DSPopover = require('@elliemae/ds-popover');
16
+ var jsxRuntime = require('react/jsx-runtime');
17
+
18
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
19
+
20
+ var _jsx2__default = /*#__PURE__*/_interopDefaultLegacy(_jsx2);
21
+ var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
22
+ var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
23
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
24
+ var DSPopover__default = /*#__PURE__*/_interopDefaultLegacy(DSPopover);
25
+
26
+ const _excluded = ["children", "tooltipDelay", "placement"];
27
+
28
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
29
+
30
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
31
+ const TruncatedTooltipContext = /*#__PURE__*/React__default["default"].createContext();
32
+ const {
33
+ Provider
34
+ } = TruncatedTooltipContext;
35
+
36
+ function TooltipTextProvider(_ref) {
37
+ let {
38
+ children,
39
+ tooltipDelay = 200,
40
+ placement = 'top'
41
+ } = _ref,
42
+ tooltipOptions = _objectWithoutProperties__default["default"](_ref, _excluded);
43
+
45
44
  const {
46
45
  show: showTooltip,
47
46
  hide: hideTooltip,
48
47
  state: tooltipState
49
- } = (0, import_ds_popover.usePopoverProviderState)({ delay: tooltipDelay });
50
- const [zIndex, setZIndex] = (0, import_react.useState)(110);
51
- const value = (0, import_react.useMemo)(() => ({
48
+ } = DSPopover.usePopoverProviderState({
49
+ delay: tooltipDelay
50
+ });
51
+ const [zIndex, setZIndex] = React.useState(110);
52
+ const value = React.useMemo(() => ({
52
53
  showTooltip,
53
54
  hideTooltip,
54
55
  setZIndex
55
56
  }), []);
56
- return /* @__PURE__ */ import_react.default.createElement(Provider, {
57
- value
58
- }, children, tooltipState.visible ? /* @__PURE__ */ import_react.default.createElement(import_ds_popover.DSPopover, {
57
+ return /*#__PURE__*/_jsx2__default["default"](Provider, {
58
+ value: value
59
+ }, void 0, children, tooltipState.visible ? /*#__PURE__*/jsxRuntime.jsx(DSPopover__default["default"], _objectSpread(_objectSpread(_objectSpread({
59
60
  boundaries: "window",
60
- placement,
61
- showArrow: true,
62
- ...tooltipOptions,
63
- ...tooltipState.options || {},
61
+ placement: placement,
62
+ showArrow: true
63
+ }, tooltipOptions), tooltipState.options || {}), {}, {
64
64
  content: tooltipState.value,
65
65
  referenceEl: tooltipState.reference,
66
- style: { pointerEvents: "none", zIndex },
66
+ style: {
67
+ pointerEvents: 'none',
68
+ zIndex
69
+ },
67
70
  visible: tooltipState.visible
68
- }) : null);
71
+ })) : null);
69
72
  }
70
- TooltipTextProvider.propTypes = {};
73
+
71
74
  TooltipTextProvider.defaultProps = {};
72
- var TooltipTextProvider_default = TooltipTextProvider;
73
- module.exports = __toCommonJS(TooltipTextProvider_exports);
74
- //# sourceMappingURL=TooltipTextProvider.js.map
75
+
76
+ exports.TooltipTextProvider = TooltipTextProvider;
77
+ exports.TruncatedTooltipContext = TruncatedTooltipContext;
78
+ exports["default"] = TooltipTextProvider;
package/cjs/index.js CHANGED
@@ -1,45 +1,19 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
- }
18
- return target;
19
- };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
- };
23
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
- return (module2, temp) => {
25
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
- };
27
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
- var src_exports = {};
29
- __export(src_exports, {
30
- DSTruncateTextWithTooltip: () => import_DSTruncateTextWithTooltip.DSTruncateTextWithTooltip,
31
- DSTruncateTextWithTooltipDatatestId: () => import_DSTruncateTextWithTooltip.DSTruncateTextWithTooltipDatatestId,
32
- DSTruncatedTooltipText: () => import_DSTruncatedTooltipText.DSTruncatedTooltipText,
33
- SimpleTruncatedTooltipText: () => import_SimpleTruncatedTooltipText.SimpleTruncatedTooltipText,
34
- TooltipTextProvider: () => import_TooltipTextProvider.TooltipTextProvider,
35
- TruncatedTooltipContext: () => import_TooltipTextProvider.TruncatedTooltipContext,
36
- TruncatedTooltipTextWithSchema: () => import_DSTruncatedTooltipText.TruncatedTooltipTextWithSchema,
37
- default: () => import_DSTruncatedTooltipText.default
38
- });
39
- var React = __toESM(require("react"));
40
- var import_TooltipTextProvider = require("./TooltipTextProvider");
41
- var import_SimpleTruncatedTooltipText = require("./SimpleTruncatedTooltipText");
42
- var import_DSTruncatedTooltipText = require("./DSTruncatedTooltipText");
43
- var import_DSTruncateTextWithTooltip = require("./DSTruncateTextWithTooltip");
44
- module.exports = __toCommonJS(src_exports);
45
- //# sourceMappingURL=index.js.map
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var TooltipTextProvider = require('./TooltipTextProvider.js');
6
+ var SimpleTruncatedTooltipText = require('./SimpleTruncatedTooltipText.js');
7
+ var DSTruncatedTooltipText = require('./DSTruncatedTooltipText.js');
8
+ var DSTruncateTextWithTooltip = require('./DSTruncateTextWithTooltip.js');
9
+
10
+
11
+
12
+ exports.TooltipTextProvider = TooltipTextProvider.TooltipTextProvider;
13
+ exports.TruncatedTooltipContext = TooltipTextProvider.TruncatedTooltipContext;
14
+ exports.SimpleTruncatedTooltipText = SimpleTruncatedTooltipText.SimpleTruncatedTooltipText;
15
+ exports.DSTruncatedTooltipText = DSTruncatedTooltipText.DSTruncatedTooltipText;
16
+ exports.TruncatedTooltipTextWithSchema = DSTruncatedTooltipText.TruncatedTooltipTextWithSchema;
17
+ exports["default"] = DSTruncatedTooltipText.DSTruncatedTooltipText;
18
+ exports.DSTruncateTextWithTooltip = DSTruncateTextWithTooltip.DSTruncateTextWithTooltip;
19
+ exports.DSTruncateTextWithTooltipDatatestId = DSTruncateTextWithTooltip.DSTruncateTextWithTooltipDatatestId;
@@ -1,57 +1,65 @@
1
- import * as React from "react";
2
- import React2, { useState, useMemo, useEffect } from "react";
3
- import { DSTooltipV3 } from "@elliemae/ds-tooltip";
4
- import styled from "styled-components";
5
- const Text = styled.span`
6
- text-overflow: ellipsis;
7
- white-space: nowrap;
8
- overflow: hidden;
9
- display: inline-block;
10
- max-width: 100%;
11
- :focus {
12
- border: none;
13
- outline: none;
14
- background: ${(props) => props.theme.colors.brand["200"]};
15
- }
16
- `;
17
- const DSTruncateTextWithTooltipDatatestId = "DS-TruncateTextWithTooltip";
18
- const DSTruncateTextWithTooltip = ({ text, tooltipProps = {} }) => {
19
- const [textWrapperEl, setTextWrapperEl] = useState();
20
- const [isShowingEllipsis, setIsShowingEllipsis] = useState(false);
21
- const resizeObserver = useMemo(() => new ResizeObserver((entries) => {
1
+ import 'core-js/modules/esnext.async-iterator.filter.js';
2
+ import 'core-js/modules/esnext.iterator.constructor.js';
3
+ import 'core-js/modules/esnext.iterator.filter.js';
4
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
5
+ import 'core-js/modules/esnext.iterator.for-each.js';
6
+ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
7
+ import 'core-js/modules/web.dom-collections.iterator.js';
8
+ import { useState, useMemo, useEffect } from 'react';
9
+ import { DSTooltipV3 } from '@elliemae/ds-tooltip';
10
+ import styled from 'styled-components';
11
+ import { jsx } from 'react/jsx-runtime';
12
+
13
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
14
+
15
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
16
+ const Text = /*#__PURE__*/styled.span.withConfig({
17
+ componentId: "sc-1w57q5j-0"
18
+ })(["text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:inline-block;max-width:100%;:focus{border:none;outline:none;background:", ";}"], props => props.theme.colors.brand['200']);
19
+ const DSTruncateTextWithTooltipDatatestId = 'DS-TruncateTextWithTooltip';
20
+ const DSTruncateTextWithTooltip = _ref => {
21
+ let {
22
+ text,
23
+ tooltipProps = {}
24
+ } = _ref;
25
+ const [textWrapperEl, setTextWrapperEl] = useState(); // const textWrapperEl = useRef<HTMLSpanElement>();
26
+
27
+ const [isShowingEllipsis, setIsShowingEllipsis] = useState(false); // const isShowingEllipsis = textWrapperEl?.scrollWidth > textWrapperEl?.clientWidth;
28
+
29
+ const resizeObserver = useMemo(() => new ResizeObserver(entries => {
22
30
  if (entries.length) {
23
31
  const [textWrapperEntry] = entries;
24
32
  const el = textWrapperEntry.target;
25
- setIsShowingEllipsis(el?.scrollWidth > el?.clientWidth);
33
+ setIsShowingEllipsis((el === null || el === void 0 ? void 0 : el.scrollWidth) > (el === null || el === void 0 ? void 0 : el.clientWidth));
26
34
  }
27
35
  }), []);
28
36
  useEffect(() => {
29
37
  if (textWrapperEl) {
30
- setIsShowingEllipsis(textWrapperEl?.scrollWidth > textWrapperEl?.clientWidth);
38
+ setIsShowingEllipsis((textWrapperEl === null || textWrapperEl === void 0 ? void 0 : textWrapperEl.scrollWidth) > (textWrapperEl === null || textWrapperEl === void 0 ? void 0 : textWrapperEl.clientWidth));
31
39
  resizeObserver.observe(textWrapperEl);
32
40
  }
41
+
33
42
  return () => {
34
43
  if (textWrapperEl) {
35
44
  resizeObserver.unobserve(textWrapperEl);
36
45
  }
37
46
  };
38
47
  }, [resizeObserver, textWrapperEl]);
39
- if (isShowingEllipsis)
40
- return /* @__PURE__ */ React2.createElement(DSTooltipV3, {
41
- text,
42
- ...tooltipProps
43
- }, /* @__PURE__ */ React2.createElement(Text, {
48
+ if (isShowingEllipsis) return /*#__PURE__*/jsx(DSTooltipV3, _objectSpread(_objectSpread({
49
+ text: text
50
+ }, tooltipProps), {}, {
51
+ children: /*#__PURE__*/jsx(Text, {
44
52
  ref: setTextWrapperEl,
45
53
  tabIndex: 0,
46
- "data-testid": DSTruncateTextWithTooltipDatatestId
47
- }, text));
48
- return /* @__PURE__ */ React2.createElement(Text, {
54
+ "data-testid": DSTruncateTextWithTooltipDatatestId,
55
+ children: text
56
+ })
57
+ }));
58
+ return /*#__PURE__*/jsx(Text, {
49
59
  ref: setTextWrapperEl,
50
- "data-testid": DSTruncateTextWithTooltipDatatestId
51
- }, text);
60
+ "data-testid": DSTruncateTextWithTooltipDatatestId,
61
+ children: text
62
+ });
52
63
  };
53
- export {
54
- DSTruncateTextWithTooltip,
55
- DSTruncateTextWithTooltipDatatestId
56
- };
57
- //# sourceMappingURL=DSTruncateTextWithTooltip.js.map
64
+
65
+ export { DSTruncateTextWithTooltip, DSTruncateTextWithTooltipDatatestId };
@@ -1,33 +1,59 @@
1
- import * as React from "react";
2
- import React2, { useContext, useEffect } from "react";
3
- import { describe, PropTypes } from "react-desc";
4
- import styled from "styled-components";
5
- import { PopperPositions as positions } from "@elliemae/ds-popper";
6
- import { TruncatedTooltipContext } from "./TooltipTextProvider";
7
- const isEllipsisActive = ({ offsetWidth, scrollWidth }) => offsetWidth < scrollWidth;
8
- const Text = styled.span`
9
- text-overflow: ellipsis;
10
- white-space: nowrap;
11
- overflow: hidden;
12
- display: inline-block;
13
- max-width: 100%;
14
- `;
15
- const DSTruncatedTooltipText = ({
16
- containerProps = {},
17
- value = "",
18
- zIndex = 110,
19
- ...otherTextProps
20
- }) => {
1
+ import 'core-js/modules/esnext.async-iterator.filter.js';
2
+ import 'core-js/modules/esnext.iterator.constructor.js';
3
+ import 'core-js/modules/esnext.iterator.filter.js';
4
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
5
+ import 'core-js/modules/esnext.iterator.for-each.js';
6
+ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
7
+ import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
8
+ import { useContext, useEffect } from 'react';
9
+ import { PropTypes, describe } from 'react-desc';
10
+ import styled from 'styled-components';
11
+ import { PopperPositions } from '@elliemae/ds-popper';
12
+ import { TruncatedTooltipContext } from './TooltipTextProvider.js';
13
+ import { jsx } from 'react/jsx-runtime';
14
+
15
+ const _excluded = ["containerProps", "value", "zIndex"];
16
+
17
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
18
+
19
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
20
+
21
+ const isEllipsisActive = _ref => {
22
+ let {
23
+ offsetWidth,
24
+ scrollWidth
25
+ } = _ref;
26
+ return offsetWidth < scrollWidth;
27
+ }; // reduce the possibility of error showing the tooltip (text-overflow: ellipsis) https://jira.elliemae.io/browse/PUI-1755
28
+
29
+
30
+ const Text = /*#__PURE__*/styled.span.withConfig({
31
+ componentId: "sc-1olo1o7-0"
32
+ })(["text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:inline-block;max-width:100%;"]);
33
+
34
+ const DSTruncatedTooltipText = _ref2 => {
35
+ let {
36
+ containerProps = {},
37
+ value = '',
38
+ zIndex = 110
39
+ } = _ref2,
40
+ otherTextProps = _objectWithoutProperties(_ref2, _excluded);
41
+
21
42
  const tooltipContext = useContext(TruncatedTooltipContext);
22
43
  useEffect(() => {
23
- if (zIndex && tooltipContext)
24
- tooltipContext.setZIndex(zIndex);
44
+ if (zIndex && tooltipContext) tooltipContext.setZIndex(zIndex);
25
45
  }, [zIndex]);
26
- if (!tooltipContext)
27
- return value;
28
- const { showTooltip, hideTooltip } = tooltipContext;
29
- const handleMouseEnter = (e) => {
30
- const { target } = e;
46
+ if (!tooltipContext) return value;
47
+ const {
48
+ showTooltip,
49
+ hideTooltip
50
+ } = tooltipContext;
51
+
52
+ const handleMouseEnter = e => {
53
+ const {
54
+ target
55
+ } = e;
56
+
31
57
  if (target && isEllipsisActive(target, target.getBoundingClientRect())) {
32
58
  showTooltip({
33
59
  value,
@@ -35,56 +61,40 @@ const DSTruncatedTooltipText = ({
35
61
  }, e);
36
62
  }
37
63
  };
38
- const handleMouseLeave = (e) => {
39
- hideTooltip({ reference: e.target });
64
+
65
+ const handleMouseLeave = e => {
66
+ hideTooltip({
67
+ reference: e.target
68
+ });
40
69
  };
41
- const handlers = showTooltip ? { onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave } : {};
42
- return /* @__PURE__ */ React2.createElement(Text, {
43
- ...containerProps,
44
- ...otherTextProps,
45
- ...handlers
46
- }, value);
70
+
71
+ const handlers = showTooltip ? {
72
+ onMouseEnter: handleMouseEnter,
73
+ onMouseLeave: handleMouseLeave
74
+ } : {};
75
+ return /*#__PURE__*/jsx(Text, _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, containerProps), otherTextProps), handlers), {}, {
76
+ children: value
77
+ }));
47
78
  };
79
+
48
80
  DSTruncatedTooltipText.defaultProps = {
49
- value: "",
81
+ value: '',
50
82
  zIndex: 110
51
83
  };
52
84
  const truncatedTooltipTextProps = {
53
- containerProps: PropTypes.object.description("Set of Properties attached to the main container"),
54
- value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description("Text that when truncated will trigger the tooltip interaction"),
55
- tooltipPlacement: PropTypes.oneOf([
56
- positions.AUTO_START,
57
- positions.AUTO_END,
58
- positions.AUTO,
59
- positions.TOP_START,
60
- positions.TOP,
61
- positions.TOP_END,
62
- positions.RIGHT_START,
63
- positions.RIGHT,
64
- positions.RIGHT_END,
65
- positions.BOTTOM_START,
66
- positions.BOTTOM,
67
- positions.BOTTOM_END,
68
- positions.LEFT_START,
69
- positions.LEFT,
70
- positions.LEFT_END
71
- ]).description("Position of the tooltip"),
72
- tooltipDelay: PropTypes.number.description("Delay to show the tooltip"),
73
- zIndex: PropTypes.number.description("override default zIndex").defaultValue(110)
85
+ containerProps: PropTypes.object.description('Set of Properties attached to the main container'),
86
+ value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('Text that when truncated will trigger the tooltip interaction'),
87
+ tooltipPlacement: PropTypes.oneOf([PopperPositions.AUTO_START, PopperPositions.AUTO_END, PopperPositions.AUTO, PopperPositions.TOP_START, PopperPositions.TOP, PopperPositions.TOP_END, PopperPositions.RIGHT_START, PopperPositions.RIGHT, PopperPositions.RIGHT_END, PopperPositions.BOTTOM_START, PopperPositions.BOTTOM, PopperPositions.BOTTOM_END, PopperPositions.LEFT_START, PopperPositions.LEFT, PopperPositions.LEFT_END]).description('Position of the tooltip'),
88
+ tooltipDelay: PropTypes.number.description('Delay to show the tooltip'),
89
+ zIndex: PropTypes.number.description('override default zIndex').defaultValue(110)
74
90
  };
75
91
  DSTruncatedTooltipText.defaultProps = {
76
92
  containerProps: {},
77
- value: "",
78
- tooltipPlacement: void 0,
79
- tooltipDelay: void 0
93
+ value: '',
94
+ tooltipPlacement: undefined,
95
+ tooltipDelay: undefined
80
96
  };
81
- DSTruncatedTooltipText.propTypes = truncatedTooltipTextProps;
82
97
  const TruncatedTooltipTextWithSchema = describe(DSTruncatedTooltipText);
83
98
  TruncatedTooltipTextWithSchema.propTypes = truncatedTooltipTextProps;
84
- var DSTruncatedTooltipText_default = DSTruncatedTooltipText;
85
- export {
86
- DSTruncatedTooltipText,
87
- TruncatedTooltipTextWithSchema,
88
- DSTruncatedTooltipText_default as default
89
- };
90
- //# sourceMappingURL=DSTruncatedTooltipText.js.map
99
+
100
+ export { DSTruncatedTooltipText, TruncatedTooltipTextWithSchema, DSTruncatedTooltipText as default };