@tedi-design-system/react 15.0.0-rc.1 → 15.0.0-rc.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tedi-design-system/react",
3
- "version": "15.0.0-rc.1",
3
+ "version": "15.0.0-rc.3",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "exports": {
@@ -4,7 +4,6 @@ export * from './components/typography/text/text';
4
4
  export * from './components/button/button';
5
5
  export * from './components/anchor/anchor';
6
6
  export * from './components/layout';
7
- export * from './components/ellipsis/ellipsis';
8
7
  export * from './components/dropdown/dropdown';
9
8
  export * from './components/stepper';
10
9
  export * from './components/card';
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),i=require("react"),f=require("../../../tedi/helpers/hooks/use-element-size.cjs.js"),o=require("./ellipsis.module.scss.cjs.js"),g=require("../tooltip/tooltip-provider.cjs.js"),q=require("../tooltip/tooltip-trigger.cjs.js"),T=require("../tooltip/tooltip.cjs.js"),h=require("../card/card.cjs.js"),j=require("../card/card-content/card-content.cjs.js"),n=c=>{const{children:r,lineClamp:s=2,showTooltip:u=!0,...d}=c,e=i.useRef(null),[a,p]=i.useState(!1),m=f.useElementSize(e);i.useEffect(()=>{e.current&&p(e.current.scrollHeight>e.current.clientHeight)},[e,m]);const l=t.jsx("div",{"data-name":"ellipsis",...d,ref:e,className:o.default.ellipsis,style:{lineClamp:s,WebkitLineClamp:s},children:r});return a&&u?t.jsxs(g.TooltipProvider,{children:[t.jsx(q.TooltipTrigger,{children:l}),t.jsx(T.Tooltip,{children:t.jsx(h.Card,{borderless:!0,className:o.default.ellipsis__tooltip,children:t.jsx(j.CardContent,{padding:.75,children:r})})})]}):l};exports.Ellipsis=n;exports.default=n;
@@ -1,19 +0,0 @@
1
- import { default as React } from 'react';
2
- export interface EllipsisProps {
3
- /**
4
- * Any content
5
- */
6
- children: React.ReactNode;
7
- /**
8
- * What is max lines before Ellipsis
9
- * @default 2
10
- */
11
- lineClamp?: number;
12
- /**
13
- * Render Ellipsis with Tooltip
14
- * @default true
15
- */
16
- showTooltip?: boolean;
17
- }
18
- export declare const Ellipsis: (props: EllipsisProps) => JSX.Element;
19
- export default Ellipsis;
@@ -1,34 +0,0 @@
1
- import { jsx as t, jsxs as d } from "react/jsx-runtime";
2
- import r from "react";
3
- import { useElementSize as u } from "../../../tedi/helpers/hooks/use-element-size.es.js";
4
- import s from "./ellipsis.module.scss.es.js";
5
- import { TooltipProvider as h } from "../tooltip/tooltip-provider.es.js";
6
- import { TooltipTrigger as T } from "../tooltip/tooltip-trigger.es.js";
7
- import { Tooltip as g } from "../tooltip/tooltip.es.js";
8
- import { Card as C } from "../card/card.es.js";
9
- import { CardContent as R } from "../card/card-content/card-content.es.js";
10
- const H = (n) => {
11
- const { children: i, lineClamp: o = 2, showTooltip: m = !0, ...p } = n, e = r.useRef(null), [c, a] = r.useState(!1), f = u(e);
12
- r.useEffect(() => {
13
- e.current && a(e.current.scrollHeight > e.current.clientHeight);
14
- }, [e, f]);
15
- const l = /* @__PURE__ */ t(
16
- "div",
17
- {
18
- "data-name": "ellipsis",
19
- ...p,
20
- ref: e,
21
- className: s.ellipsis,
22
- style: { lineClamp: o, WebkitLineClamp: o },
23
- children: i
24
- }
25
- );
26
- return c && m ? /* @__PURE__ */ d(h, { children: [
27
- /* @__PURE__ */ t(T, { children: l }),
28
- /* @__PURE__ */ t(g, { children: /* @__PURE__ */ t(C, { borderless: !0, className: s.ellipsis__tooltip, children: /* @__PURE__ */ t(R, { padding: 0.75, children: i }) }) })
29
- ] }) : l;
30
- };
31
- export {
32
- H as Ellipsis,
33
- H as default
34
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l="ellipsis-619434e4",s="ellipsis__tooltip-9735eba5",e={ellipsis:l,ellipsis__tooltip:s};exports.default=e;exports.ellipsis=l;exports.ellipsis__tooltip=s;
@@ -1,9 +0,0 @@
1
- const s = "ellipsis-619434e4", l = "ellipsis__tooltip-9735eba5", i = {
2
- ellipsis: s,
3
- ellipsis__tooltip: l
4
- };
5
- export {
6
- i as default,
7
- s as ellipsis,
8
- l as ellipsis__tooltip
9
- };