@synerise/ds-typography 1.1.12 → 1.1.13

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/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.1.13](https://github.com/synerise/synerise-design/compare/@synerise/ds-typography@1.1.12...@synerise/ds-typography@1.1.13) (2026-03-24)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-typography
9
+
6
10
  ## [1.1.12](https://github.com/synerise/synerise-design/compare/@synerise/ds-typography@1.1.11...@synerise/ds-typography@1.1.12) (2026-03-20)
7
11
 
8
12
  **Note:** Version bump only for package @synerise/ds-typography
@@ -1,33 +1,33 @@
1
- export declare const Description: import("styled-components").StyledComponent<"div", any, {
1
+ export declare const Description: import('styled-components').StyledComponent<"div", any, {
2
2
  disabled?: boolean;
3
3
  }, never>;
4
- export declare const ErrorText: import("styled-components").StyledComponent<"div", any, {}, never>;
5
- export declare const Label: import("styled-components").StyledComponent<"label", any, {}, never>;
6
- export declare const MediumText: import("styled-components").StyledComponent<"span", any, {}, never>;
7
- export declare const SmallText: import("styled-components").StyledComponent<"span", any, {}, never>;
8
- export declare const XSmallText: import("styled-components").StyledComponent<"span", any, {}, never>;
9
- export declare const MediumParagraph: import("styled-components").StyledComponent<"span", any, {}, never>;
10
- export declare const SmallParagraph: import("styled-components").StyledComponent<"span", any, {}, never>;
11
- export declare const XSmallParagraph: import("styled-components").StyledComponent<"span", any, {}, never>;
12
- export declare const H1: import("styled-components").StyledComponent<"h1", any, {
4
+ export declare const ErrorText: import('styled-components').StyledComponent<"div", any, {}, never>;
5
+ export declare const Label: import('styled-components').StyledComponent<"label", any, {}, never>;
6
+ export declare const MediumText: import('styled-components').StyledComponent<"span", any, {}, never>;
7
+ export declare const SmallText: import('styled-components').StyledComponent<"span", any, {}, never>;
8
+ export declare const XSmallText: import('styled-components').StyledComponent<"span", any, {}, never>;
9
+ export declare const MediumParagraph: import('styled-components').StyledComponent<"span", any, {}, never>;
10
+ export declare const SmallParagraph: import('styled-components').StyledComponent<"span", any, {}, never>;
11
+ export declare const XSmallParagraph: import('styled-components').StyledComponent<"span", any, {}, never>;
12
+ export declare const H1: import('styled-components').StyledComponent<"h1", any, {
13
13
  withoutMargin: boolean;
14
14
  }, never>;
15
- export declare const H2: import("styled-components").StyledComponent<"h2", any, {
15
+ export declare const H2: import('styled-components').StyledComponent<"h2", any, {
16
16
  withoutMargin: boolean;
17
17
  }, never>;
18
- export declare const H3: import("styled-components").StyledComponent<"h3", any, {
18
+ export declare const H3: import('styled-components').StyledComponent<"h3", any, {
19
19
  withoutMargin: boolean;
20
20
  }, never>;
21
- export declare const H4: import("styled-components").StyledComponent<"h4", any, {
21
+ export declare const H4: import('styled-components').StyledComponent<"h4", any, {
22
22
  withoutMargin: boolean;
23
23
  }, never>;
24
- export declare const H5: import("styled-components").StyledComponent<"h5", any, {
24
+ export declare const H5: import('styled-components').StyledComponent<"h5", any, {
25
25
  withoutMargin: boolean;
26
26
  }, never>;
27
- export declare const H6: import("styled-components").StyledComponent<"h6", any, {
27
+ export declare const H6: import('styled-components').StyledComponent<"h6", any, {
28
28
  withoutMargin: boolean;
29
29
  }, never>;
30
- export declare const H7: import("styled-components").StyledComponent<"h6", any, {
30
+ export declare const H7: import('styled-components').StyledComponent<"h6", any, {
31
31
  withoutMargin: boolean;
32
32
  }, never>;
33
- export declare const EllipsisText: import("styled-components").StyledComponent<"div", any, {}, never>;
33
+ export declare const EllipsisText: import('styled-components').StyledComponent<"div", any, {}, never>;
@@ -1,118 +1,89 @@
1
- import styled, { css } from 'styled-components';
2
- import { h100, h200, h300, h400, h500, h600, h700, medium, small, xsmall } from './style/macro-utils';
3
- export var Description = styled.div.withConfig({
1
+ import styled, { css } from "styled-components";
2
+ import { h700, h600, h500, h400, h300, h200, h100, medium, small, xsmall } from "./style/macro-utils.js";
3
+ const Description = /* @__PURE__ */ styled.div.withConfig({
4
4
  displayName: "CommonElements__Description",
5
5
  componentId: "sc-102d2aw-0"
6
- })(["color:", ";", ""], function (props) {
7
- return props.theme.palette['grey-600'];
8
- }, function (props) {
9
- return props.disabled ? "opacity: 0.4;" : '';
10
- });
11
- export var ErrorText = styled.div.withConfig({
6
+ })(["color:", ";", ""], (props) => props.theme.palette["grey-600"], (props) => props.disabled ? `opacity: 0.4;` : "");
7
+ const ErrorText = /* @__PURE__ */ styled.div.withConfig({
12
8
  displayName: "CommonElements__ErrorText",
13
9
  componentId: "sc-102d2aw-1"
14
- })(["color:", ";margin-bottom:4px;"], function (props) {
15
- return props.theme.palette['red-600'];
16
- });
17
- export var Label = styled.label.withConfig({
10
+ })(["color:", ";margin-bottom:4px;"], (props) => props.theme.palette["red-600"]);
11
+ const Label = /* @__PURE__ */ styled.label.withConfig({
18
12
  displayName: "CommonElements__Label",
19
13
  componentId: "sc-102d2aw-2"
20
- })(["color:", ";font-weight:500;display:block;cursor:pointer;"], function (props) {
21
- return props.theme.palette['grey-800'];
22
- });
23
- export var MediumText = styled.span.withConfig({
14
+ })(["color:", ";font-weight:500;display:block;cursor:pointer;"], (props) => props.theme.palette["grey-800"]);
15
+ const MediumText = /* @__PURE__ */ styled.span.withConfig({
24
16
  displayName: "CommonElements__MediumText",
25
17
  componentId: "sc-102d2aw-3"
26
- })(["", ""], function () {
27
- return css(["", ";"], medium);
28
- });
29
- export var SmallText = styled.span.withConfig({
18
+ })(["", ""], () => css(["", ";"], medium));
19
+ const SmallText = /* @__PURE__ */ styled.span.withConfig({
30
20
  displayName: "CommonElements__SmallText",
31
21
  componentId: "sc-102d2aw-4"
32
- })(["", ""], function () {
33
- return css(["", ";"], small);
34
- });
35
- export var XSmallText = styled.span.withConfig({
22
+ })(["", ""], () => css(["", ";"], small));
23
+ const XSmallText = /* @__PURE__ */ styled.span.withConfig({
36
24
  displayName: "CommonElements__XSmallText",
37
25
  componentId: "sc-102d2aw-5"
38
- })(["", ""], function () {
39
- return css(["", ";"], xsmall);
40
- });
41
- export var MediumParagraph = styled.span.withConfig({
26
+ })(["", ""], () => css(["", ";"], xsmall));
27
+ const MediumParagraph = /* @__PURE__ */ styled.span.withConfig({
42
28
  displayName: "CommonElements__MediumParagraph",
43
29
  componentId: "sc-102d2aw-6"
44
- })(["", ""], function () {
45
- return css(["", ";"], medium);
46
- });
47
- export var SmallParagraph = styled.span.withConfig({
30
+ })(["", ""], () => css(["", ";"], medium));
31
+ const SmallParagraph = /* @__PURE__ */ styled.span.withConfig({
48
32
  displayName: "CommonElements__SmallParagraph",
49
33
  componentId: "sc-102d2aw-7"
50
- })(["", ""], function () {
51
- return css(["", ";"], small);
52
- });
53
- export var XSmallParagraph = styled.span.withConfig({
34
+ })(["", ""], () => css(["", ";"], small));
35
+ const XSmallParagraph = /* @__PURE__ */ styled.span.withConfig({
54
36
  displayName: "CommonElements__XSmallParagraph",
55
37
  componentId: "sc-102d2aw-8"
56
- })(["", ""], function () {
57
- return css(["", ";"], xsmall);
58
- });
59
- export var H1 = styled.h1.withConfig({
38
+ })(["", ""], () => css(["", ";"], xsmall));
39
+ const H1 = /* @__PURE__ */ styled.h1.withConfig({
60
40
  displayName: "CommonElements__H1",
61
41
  componentId: "sc-102d2aw-9"
62
- })(["", " ", ""], function () {
63
- return css(["", ";"], h700);
64
- }, function (props) {
65
- return props.withoutMargin && css(["margin-bottom:0;"]);
66
- });
67
- export var H2 = styled.h2.withConfig({
42
+ })(["", " ", ""], () => css(["", ";"], h700), (props) => props.withoutMargin && css(["margin-bottom:0;"]));
43
+ const H2 = /* @__PURE__ */ styled.h2.withConfig({
68
44
  displayName: "CommonElements__H2",
69
45
  componentId: "sc-102d2aw-10"
70
- })(["", " ", ""], function () {
71
- return css(["", ";"], h600);
72
- }, function (props) {
73
- return props.withoutMargin && css(["margin-bottom:0;"]);
74
- });
75
- export var H3 = styled.h3.withConfig({
46
+ })(["", " ", ""], () => css(["", ";"], h600), (props) => props.withoutMargin && css(["margin-bottom:0;"]));
47
+ const H3 = /* @__PURE__ */ styled.h3.withConfig({
76
48
  displayName: "CommonElements__H3",
77
49
  componentId: "sc-102d2aw-11"
78
- })(["", " ", ""], function () {
79
- return css(["", ";"], h500);
80
- }, function (props) {
81
- return props.withoutMargin && css(["margin-bottom:0;"]);
82
- });
83
- export var H4 = styled.h4.withConfig({
50
+ })(["", " ", ""], () => css(["", ";"], h500), (props) => props.withoutMargin && css(["margin-bottom:0;"]));
51
+ const H4 = /* @__PURE__ */ styled.h4.withConfig({
84
52
  displayName: "CommonElements__H4",
85
53
  componentId: "sc-102d2aw-12"
86
- })(["", " ", ""], function () {
87
- return css(["", ";"], h400);
88
- }, function (props) {
89
- return props.withoutMargin && css(["margin-bottom:0;"]);
90
- });
91
- export var H5 = styled.h5.withConfig({
54
+ })(["", " ", ""], () => css(["", ";"], h400), (props) => props.withoutMargin && css(["margin-bottom:0;"]));
55
+ const H5 = /* @__PURE__ */ styled.h5.withConfig({
92
56
  displayName: "CommonElements__H5",
93
57
  componentId: "sc-102d2aw-13"
94
- })(["", " ", ""], function () {
95
- return css(["", ";"], h300);
96
- }, function (props) {
97
- return props.withoutMargin && css(["margin-bottom:0;"]);
98
- });
99
- export var H6 = styled.h6.withConfig({
58
+ })(["", " ", ""], () => css(["", ";"], h300), (props) => props.withoutMargin && css(["margin-bottom:0;"]));
59
+ const H6 = /* @__PURE__ */ styled.h6.withConfig({
100
60
  displayName: "CommonElements__H6",
101
61
  componentId: "sc-102d2aw-14"
102
- })(["", " ", ""], function () {
103
- return css(["", ";"], h200);
104
- }, function (props) {
105
- return props.withoutMargin && css(["margin-bottom:0;"]);
106
- });
107
- export var H7 = styled.h6.withConfig({
62
+ })(["", " ", ""], () => css(["", ";"], h200), (props) => props.withoutMargin && css(["margin-bottom:0;"]));
63
+ const H7 = /* @__PURE__ */ styled.h6.withConfig({
108
64
  displayName: "CommonElements__H7",
109
65
  componentId: "sc-102d2aw-15"
110
- })(["", " ", ""], function () {
111
- return css(["", ";"], h100);
112
- }, function (props) {
113
- return props.withoutMargin && css(["margin-bottom:0;"]);
114
- });
115
- export var EllipsisText = styled.div.withConfig({
66
+ })(["", " ", ""], () => css(["", ";"], h100), (props) => props.withoutMargin && css(["margin-bottom:0;"]));
67
+ const EllipsisText = /* @__PURE__ */ styled.div.withConfig({
116
68
  displayName: "CommonElements__EllipsisText",
117
69
  componentId: "sc-102d2aw-16"
118
- })(["display:block;white-space:nowrap;text-overflow:ellipsis;max-width:100%;overflow:hidden;", ",", ",", ",", ",", ",", ",", "{display:inline;}", ",", ",", "{font-size:inherit;color:inherit;line-height:inherit;font-weight:inherit;}"], H1, H2, H3, H4, H5, H6, H7, MediumText, SmallText, XSmallText);
70
+ })(["display:block;white-space:nowrap;text-overflow:ellipsis;max-width:100%;overflow:hidden;", ",", ",", ",", ",", ",", ",", "{display:inline;}", ",", ",", "{font-size:inherit;color:inherit;line-height:inherit;font-weight:inherit;}"], H1, H2, H3, H4, H5, H6, H7, MediumText, SmallText, XSmallText);
71
+ export {
72
+ Description,
73
+ EllipsisText,
74
+ ErrorText,
75
+ H1,
76
+ H2,
77
+ H3,
78
+ H4,
79
+ H5,
80
+ H6,
81
+ H7,
82
+ Label,
83
+ MediumParagraph,
84
+ MediumText,
85
+ SmallParagraph,
86
+ SmallText,
87
+ XSmallParagraph,
88
+ XSmallText
89
+ };
@@ -1,5 +1,5 @@
1
- import React, { type CSSProperties, type ReactNode } from 'react';
2
- import { type TooltipProps } from '@synerise/ds-tooltip';
1
+ import { default as React, CSSProperties, ReactNode } from 'react';
2
+ import { TooltipProps } from '@synerise/ds-tooltip';
3
3
  export type EllipsisProps = {
4
4
  tooltip?: ReactNode;
5
5
  tooltipProps?: TooltipProps;
package/dist/Ellipsis.js CHANGED
@@ -1,19 +1,18 @@
1
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
- import debounce from 'lodash.debounce';
3
- import React, { useEffect, useRef, useState } from 'react';
4
- import Tooltip from '@synerise/ds-tooltip';
5
- import { EllipsisText } from './CommonElements';
6
- export var Ellipsis = function Ellipsis(_ref) {
7
- var tooltip = _ref.tooltip,
8
- children = _ref.children,
9
- className = _ref.className,
10
- tooltipProps = _ref.tooltipProps,
11
- style = _ref.style;
12
- var textComponentRef = useRef(null);
13
- var _useState = useState(false),
14
- truncated = _useState[0],
15
- setTruncated = _useState[1];
16
- var debouncedResize = useRef(debounce(function () {
1
+ import { jsx } from "react/jsx-runtime";
2
+ import debounce from "lodash.debounce";
3
+ import { useRef, useState, useEffect } from "react";
4
+ import Tooltip from "@synerise/ds-tooltip";
5
+ import { EllipsisText } from "./CommonElements.js";
6
+ const Ellipsis = ({
7
+ tooltip,
8
+ children,
9
+ className,
10
+ tooltipProps,
11
+ style
12
+ }) => {
13
+ const textComponentRef = useRef(null);
14
+ const [truncated, setTruncated] = useState(false);
15
+ const debouncedResize = useRef(debounce(() => {
17
16
  if (textComponentRef && textComponentRef.current) {
18
17
  setTruncated(textComponentRef.current.offsetWidth < textComponentRef.current.scrollWidth);
19
18
  }
@@ -21,22 +20,19 @@ export var Ellipsis = function Ellipsis(_ref) {
21
20
  leading: true,
22
21
  trailing: true
23
22
  })).current;
24
- var resizeObserver = useRef(new ResizeObserver(debouncedResize)).current;
25
- useEffect(function () {
23
+ const resizeObserver = useRef(new ResizeObserver(debouncedResize)).current;
24
+ useEffect(() => {
26
25
  if (textComponentRef.current) {
27
26
  resizeObserver.observe(textComponentRef.current);
28
27
  resizeObserver.observe(document.body);
29
28
  }
30
- return function () {
29
+ return () => {
31
30
  resizeObserver.disconnect();
32
31
  debouncedResize.cancel();
33
32
  };
34
33
  }, [resizeObserver, debouncedResize]);
35
- return /*#__PURE__*/React.createElement(Tooltip, _extends({
36
- title: truncated ? tooltip : undefined
37
- }, truncated ? tooltipProps : {}), /*#__PURE__*/React.createElement(EllipsisText, {
38
- style: style,
39
- className: className,
40
- ref: textComponentRef
41
- }, children));
42
- };
34
+ return /* @__PURE__ */ jsx(Tooltip, { title: truncated ? tooltip : void 0, ...truncated ? tooltipProps : {}, children: /* @__PURE__ */ jsx(EllipsisText, { style, className, ref: textComponentRef, children }) });
35
+ };
36
+ export {
37
+ Ellipsis
38
+ };
@@ -1,4 +1,4 @@
1
- import React, { type ReactNode } from 'react';
1
+ import { default as React, ReactNode } from 'react';
2
2
  type TextProps = {
3
3
  size?: 'medium' | 'small' | 'xsmall';
4
4
  children?: ReactNode;
package/dist/Paragraph.js CHANGED
@@ -1,16 +1,17 @@
1
- import React from 'react';
2
- import { MediumParagraph, SmallParagraph, XSmallParagraph } from './CommonElements';
3
- var MapSizeToComponent = {
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { XSmallParagraph, SmallParagraph, MediumParagraph } from "./CommonElements.js";
3
+ const MapSizeToComponent = {
4
4
  medium: MediumParagraph,
5
5
  small: SmallParagraph,
6
6
  xsmall: XSmallParagraph
7
7
  };
8
- export var Paragraph = function Paragraph(_ref) {
9
- var _ref$size = _ref.size,
10
- size = _ref$size === void 0 ? 'medium' : _ref$size,
11
- children = _ref.children;
12
- var Component = MapSizeToComponent[size];
13
- return /*#__PURE__*/React.createElement(Component, {
14
- className: "ds-paragraph"
15
- }, children);
16
- };
8
+ const Paragraph = ({
9
+ size = "medium",
10
+ children
11
+ }) => {
12
+ const Component = MapSizeToComponent[size];
13
+ return /* @__PURE__ */ jsx(Component, { className: "ds-paragraph", children });
14
+ };
15
+ export {
16
+ Paragraph
17
+ };
package/dist/Text.d.ts CHANGED
@@ -1,7 +1,5 @@
1
- import React, { type CSSProperties, type ReactNode } from 'react';
2
- import '@synerise/ds-core/dist/js/style';
3
- import { type EllipsisProps } from './Ellipsis';
4
- import './style/index.less';
1
+ import { default as React, CSSProperties, ReactNode } from 'react';
2
+ import { EllipsisProps } from './Ellipsis';
5
3
  export type TextSize = 'medium' | 'small' | 'xsmall';
6
4
  type TextProps = {
7
5
  size?: TextSize;
package/dist/Text.js CHANGED
@@ -1,32 +1,28 @@
1
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
- import React from 'react';
3
- import '@synerise/ds-core/dist/js/style';
4
- import { MediumText, SmallText, XSmallText } from './CommonElements';
5
- import { Ellipsis } from './Ellipsis';
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { XSmallText, SmallText, MediumText } from "./CommonElements.js";
3
+ import { Ellipsis } from "./Ellipsis.js";
6
4
  import "./style/index.css";
7
- var MapSizeToComponent = {
5
+ const MapSizeToComponent = {
8
6
  medium: MediumText,
9
7
  small: SmallText,
10
8
  xsmall: XSmallText
11
9
  };
12
- export var Text = function Text(_ref) {
13
- var _ref$size = _ref.size,
14
- size = _ref$size === void 0 ? 'medium' : _ref$size,
15
- className = _ref.className,
16
- children = _ref.children,
17
- ellipsis = _ref.ellipsis,
18
- style = _ref.style;
19
- var Component = MapSizeToComponent[size];
20
- var textClassNames = "ds-text " + (!ellipsis && className);
21
- var content = /*#__PURE__*/React.createElement(Component, {
22
- className: textClassNames
23
- }, children);
24
- if (ellipsis === undefined) {
10
+ const Text = ({
11
+ size = "medium",
12
+ className,
13
+ children,
14
+ ellipsis,
15
+ style
16
+ }) => {
17
+ const Component = MapSizeToComponent[size];
18
+ const textClassNames = `ds-text ${!ellipsis && className}`;
19
+ const content = /* @__PURE__ */ jsx(Component, { className: textClassNames, children });
20
+ if (ellipsis === void 0) {
25
21
  return content;
26
22
  }
27
- return /*#__PURE__*/React.createElement(Ellipsis, _extends({
28
- className: className,
29
- style: style
30
- }, ellipsis), content);
23
+ return /* @__PURE__ */ jsx(Ellipsis, { className, style, ...ellipsis, children: content });
24
+ };
25
+ export {
26
+ Text,
27
+ Text as default
31
28
  };
32
- export default Text;
package/dist/Title.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import React from 'react';
2
- import { type Props } from './Title.types';
1
+ import { default as React } from 'react';
2
+ import { Props } from './Title.types';
3
3
  declare const Title: ({ level, withoutMargin, children, className, ellipsis, ...antdProps }: Props) => React.JSX.Element;
4
4
  export default Title;
package/dist/Title.js CHANGED
@@ -1,11 +1,8 @@
1
- var _excluded = ["level", "withoutMargin", "children", "className", "ellipsis"];
2
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
4
- import classNames from 'classnames';
5
- import React from 'react';
6
- import { H1, H2, H3, H4, H5, H6, H7 } from './CommonElements';
7
- import { Ellipsis } from './Ellipsis';
8
- var StyledElements = {
1
+ import { jsx } from "react/jsx-runtime";
2
+ import classNames from "classnames";
3
+ import { H7, H6, H5, H4, H3, H2, H1 } from "./CommonElements.js";
4
+ import { Ellipsis } from "./Ellipsis.js";
5
+ const StyledElements = {
9
6
  1: H1,
10
7
  2: H2,
11
8
  3: H3,
@@ -14,23 +11,22 @@ var StyledElements = {
14
11
  6: H6,
15
12
  7: H7
16
13
  };
17
- var Title = function Title(_ref) {
18
- var _ref$level = _ref.level,
19
- level = _ref$level === void 0 ? 1 : _ref$level,
20
- withoutMargin = _ref.withoutMargin,
21
- children = _ref.children,
22
- className = _ref.className,
23
- ellipsis = _ref.ellipsis,
24
- antdProps = _objectWithoutPropertiesLoose(_ref, _excluded);
25
- var TitleElement = StyledElements[level];
26
- var elementClassName = classNames('ds-title', className);
27
- var content = /*#__PURE__*/React.createElement(TitleElement, _extends({}, antdProps, {
28
- className: elementClassName,
29
- withoutMargin: Boolean(withoutMargin)
30
- }), children);
31
- if (ellipsis === undefined) {
14
+ const Title = ({
15
+ level = 1,
16
+ withoutMargin,
17
+ children,
18
+ className,
19
+ ellipsis,
20
+ ...antdProps
21
+ }) => {
22
+ const TitleElement = StyledElements[level];
23
+ const elementClassName = classNames("ds-title", className);
24
+ const content = /* @__PURE__ */ jsx(TitleElement, { ...antdProps, className: elementClassName, withoutMargin: Boolean(withoutMargin), children });
25
+ if (ellipsis === void 0) {
32
26
  return content;
33
27
  }
34
- return /*#__PURE__*/React.createElement(Ellipsis, ellipsis, content);
28
+ return /* @__PURE__ */ jsx(Ellipsis, { ...ellipsis, children: content });
29
+ };
30
+ export {
31
+ Title as default
35
32
  };
36
- export default Title;
@@ -1,5 +1,5 @@
1
- import type { TitleProps } from 'antd/es/typography/Title';
2
- import type { EllipsisProps } from './Ellipsis';
1
+ import { TitleProps } from 'antd/es/typography/Title';
2
+ import { EllipsisProps } from './Ellipsis';
3
3
  export type Props = Omit<TitleProps, 'level' | 'ellipsis'> & {
4
4
  level: 1 | 2 | 3 | 4 | 5 | 6 | 7;
5
5
  withoutMargin?: boolean;
@@ -1 +1 @@
1
- export {};
1
+
@@ -1 +1,4 @@
1
- export { default } from 'antd/lib/typography';
1
+ import { default as default2 } from "antd/lib/typography";
2
+ export {
3
+ default2 as default
4
+ };
File without changes
package/dist/index.js CHANGED
@@ -1,7 +1,16 @@
1
- export { default } from 'antd/lib/typography';
2
- export { Description, ErrorText, Label } from './CommonElements';
3
- export { default as Title } from './Title';
4
- export * from './Text';
5
- export * from './Paragraph';
6
- import * as _macro from './style/macro-utils';
7
- export { _macro as macro };
1
+ import { default as default2 } from "antd/lib/typography";
2
+ import { Description, ErrorText, Label } from "./CommonElements.js";
3
+ import { default as default3 } from "./Title.js";
4
+ import { Text } from "./Text.js";
5
+ import { Paragraph } from "./Paragraph.js";
6
+ import * as style_macroUtils from "./style/macro-utils.js";
7
+ export {
8
+ Description,
9
+ ErrorText,
10
+ Label,
11
+ Paragraph,
12
+ Text,
13
+ default3 as Title,
14
+ default2 as default,
15
+ style_macroUtils as macro
16
+ };
package/dist/modules.d.js CHANGED
@@ -1 +1 @@
1
- import '@testing-library/jest-dom';
1
+ import "@testing-library/jest-dom";
File without changes
@@ -1,20 +1,20 @@
1
- export declare const heading: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
2
- export declare const regular: import("styled-components").FlattenSimpleInterpolation;
3
- export declare const h700: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
4
- export declare const h600: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
5
- export declare const h500: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
6
- export declare const h400: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
7
- export declare const h300: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
8
- export declare const h200: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
9
- export declare const h100: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
10
- export declare const medium: import("styled-components").FlattenSimpleInterpolation;
11
- export declare const small: import("styled-components").FlattenSimpleInterpolation;
12
- export declare const xsmall: import("styled-components").FlattenSimpleInterpolation;
13
- export declare const link: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
14
- export declare const linkbutton: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
15
- export declare const tag: import("styled-components").FlattenSimpleInterpolation;
16
- export declare const tooltip: import("styled-components").FlattenSimpleInterpolation;
17
- export declare const xsAvatar: import("styled-components").FlattenSimpleInterpolation;
18
- export declare const xlAvatar: import("styled-components").FlattenSimpleInterpolation;
19
- export declare const xlAvatarIcon: import("styled-components").FlattenSimpleInterpolation;
20
- export declare const flexCentered: import("styled-components").FlattenSimpleInterpolation;
1
+ export declare const heading: import('styled-components').FlattenInterpolation<import('styled-components').ThemeProps<any>>;
2
+ export declare const regular: import('styled-components').FlattenSimpleInterpolation;
3
+ export declare const h700: import('styled-components').FlattenInterpolation<import('styled-components').ThemeProps<any>>;
4
+ export declare const h600: import('styled-components').FlattenInterpolation<import('styled-components').ThemeProps<any>>;
5
+ export declare const h500: import('styled-components').FlattenInterpolation<import('styled-components').ThemeProps<any>>;
6
+ export declare const h400: import('styled-components').FlattenInterpolation<import('styled-components').ThemeProps<any>>;
7
+ export declare const h300: import('styled-components').FlattenInterpolation<import('styled-components').ThemeProps<any>>;
8
+ export declare const h200: import('styled-components').FlattenInterpolation<import('styled-components').ThemeProps<any>>;
9
+ export declare const h100: import('styled-components').FlattenInterpolation<import('styled-components').ThemeProps<any>>;
10
+ export declare const medium: import('styled-components').FlattenSimpleInterpolation;
11
+ export declare const small: import('styled-components').FlattenSimpleInterpolation;
12
+ export declare const xsmall: import('styled-components').FlattenSimpleInterpolation;
13
+ export declare const link: import('styled-components').FlattenInterpolation<import('styled-components').ThemeProps<any>>;
14
+ export declare const linkbutton: import('styled-components').FlattenInterpolation<import('styled-components').ThemeProps<any>>;
15
+ export declare const tag: import('styled-components').FlattenSimpleInterpolation;
16
+ export declare const tooltip: import('styled-components').FlattenSimpleInterpolation;
17
+ export declare const xsAvatar: import('styled-components').FlattenSimpleInterpolation;
18
+ export declare const xlAvatar: import('styled-components').FlattenSimpleInterpolation;
19
+ export declare const xlAvatarIcon: import('styled-components').FlattenSimpleInterpolation;
20
+ export declare const flexCentered: import('styled-components').FlattenSimpleInterpolation;
@@ -1,31 +1,43 @@
1
- import { css } from 'styled-components';
2
- export var heading = css(["font-weight:500;color:", ";"], function (props) {
3
- return props.theme.palette['grey-800'];
4
- });
5
- export var regular = css(["font-weight:400;"]);
6
- export var h700 = css(["", ";font-size:24px;line-height:1.17;letter-spacing:-0.05px;"], heading);
7
- export var h600 = css(["", ";font-size:21px;line-height:1.24;letter-spacing:-0.05px;"], heading);
8
- export var h500 = css(["", ";font-size:18px;line-height:1.22;letter-spacing:-0.05px;"], heading);
9
- export var h400 = css(["", ";font-size:16px;line-height:1.25;letter-spacing:-0.05px;"], heading);
10
- export var h300 = css(["", ";font-size:14px;line-height:1.43;letter-spacing:0;"], heading);
11
- export var h200 = css(["", ";font-size:13px;line-height:1.38;letter-spacing:0;"], heading);
12
- export var h100 = css(["", ";font-size:10px;line-height:1.6;letter-spacing:0.05px;"], heading);
13
- export var medium = css(["", ";font-size:14px;line-height:1.43;"], regular);
14
- export var small = css(["", ";font-size:13px;line-height:1.38;"], regular);
15
- export var xsmall = css(["", ";font-size:11px;line-height:1.45;letter-spacing:0.05px;"], regular);
16
- export var link = css(["font-size:13px;font-weight:500;transition:0.2s ease-in-out;color:", ";&:hover{text-decoration:underline;color:", ";}"], function (props) {
17
- return props.theme.palette['blue-600'];
18
- }, function (props) {
19
- return props.theme.palette['blue-500'];
20
- });
21
- export var linkbutton = css(["", ";color:", ";&:hover{color:", ";}"], link, function (props) {
22
- return props.theme.palette['grey-600'];
23
- }, function (props) {
24
- return props.theme.palette['grey-800'];
25
- });
26
- export var tag = css(["font-size:11px;"]);
27
- export var tooltip = css(["font-size:11px;"]);
28
- export var xsAvatar = css(["font-size:11px;"]);
29
- export var xlAvatar = css(["font-size:21px;"]);
30
- export var xlAvatarIcon = css(["font-size:44px;"]);
31
- export var flexCentered = css(["display:flex;justify-content:center;align-items:center;"]);
1
+ import { css } from "styled-components";
2
+ const heading = /* @__PURE__ */ css(["font-weight:500;color:", ";"], (props) => props.theme.palette["grey-800"]);
3
+ const regular = /* @__PURE__ */ css(["font-weight:400;"]);
4
+ const h700 = /* @__PURE__ */ css(["", ";font-size:24px;line-height:1.17;letter-spacing:-0.05px;"], heading);
5
+ const h600 = /* @__PURE__ */ css(["", ";font-size:21px;line-height:1.24;letter-spacing:-0.05px;"], heading);
6
+ const h500 = /* @__PURE__ */ css(["", ";font-size:18px;line-height:1.22;letter-spacing:-0.05px;"], heading);
7
+ const h400 = /* @__PURE__ */ css(["", ";font-size:16px;line-height:1.25;letter-spacing:-0.05px;"], heading);
8
+ const h300 = /* @__PURE__ */ css(["", ";font-size:14px;line-height:1.43;letter-spacing:0;"], heading);
9
+ const h200 = /* @__PURE__ */ css(["", ";font-size:13px;line-height:1.38;letter-spacing:0;"], heading);
10
+ const h100 = /* @__PURE__ */ css(["", ";font-size:10px;line-height:1.6;letter-spacing:0.05px;"], heading);
11
+ const medium = /* @__PURE__ */ css(["", ";font-size:14px;line-height:1.43;"], regular);
12
+ const small = /* @__PURE__ */ css(["", ";font-size:13px;line-height:1.38;"], regular);
13
+ const xsmall = /* @__PURE__ */ css(["", ";font-size:11px;line-height:1.45;letter-spacing:0.05px;"], regular);
14
+ const link = /* @__PURE__ */ css(["font-size:13px;font-weight:500;transition:0.2s ease-in-out;color:", ";&:hover{text-decoration:underline;color:", ";}"], (props) => props.theme.palette["blue-600"], (props) => props.theme.palette["blue-500"]);
15
+ const linkbutton = /* @__PURE__ */ css(["", ";color:", ";&:hover{color:", ";}"], link, (props) => props.theme.palette["grey-600"], (props) => props.theme.palette["grey-800"]);
16
+ const tag = /* @__PURE__ */ css(["font-size:11px;"]);
17
+ const tooltip = /* @__PURE__ */ css(["font-size:11px;"]);
18
+ const xsAvatar = /* @__PURE__ */ css(["font-size:11px;"]);
19
+ const xlAvatar = /* @__PURE__ */ css(["font-size:21px;"]);
20
+ const xlAvatarIcon = /* @__PURE__ */ css(["font-size:44px;"]);
21
+ const flexCentered = /* @__PURE__ */ css(["display:flex;justify-content:center;align-items:center;"]);
22
+ export {
23
+ flexCentered,
24
+ h100,
25
+ h200,
26
+ h300,
27
+ h400,
28
+ h500,
29
+ h600,
30
+ h700,
31
+ heading,
32
+ link,
33
+ linkbutton,
34
+ medium,
35
+ regular,
36
+ small,
37
+ tag,
38
+ tooltip,
39
+ xlAvatar,
40
+ xlAvatarIcon,
41
+ xsAvatar,
42
+ xsmall
43
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-typography",
3
- "version": "1.1.12",
3
+ "version": "1.1.13",
4
4
  "description": "Typography UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "synerise/synerise-design",
@@ -16,10 +16,10 @@
16
16
  "access": "public"
17
17
  },
18
18
  "scripts": {
19
- "build": "pnpm run build:js && pnpm run build:css && pnpm run defs",
19
+ "build": "vite build",
20
20
  "build:css": "node ../../../scripts/style/less.js",
21
21
  "build:js": "babel --delete-dir-on-start --root-mode upward src --out-dir dist --extensions '.js,.ts,.tsx'",
22
- "build:watch": "pnpm run build:js -- --watch",
22
+ "build:watch": "vite build --watch",
23
23
  "defs": "tsc --declaration --outDir dist/ --emitDeclarationOnly",
24
24
  "pack:ci": "pnpm pack --pack-destination ../../storybook/storybook-static/static",
25
25
  "prepublish": "pnpm run build",
@@ -35,7 +35,7 @@
35
35
  ],
36
36
  "types": "dist/index.d.ts",
37
37
  "dependencies": {
38
- "@synerise/ds-tooltip": "^1.4.9",
38
+ "@synerise/ds-tooltip": "^1.4.10",
39
39
  "classnames": "^2.5.1",
40
40
  "lodash.debounce": "^4.0.8"
41
41
  },
@@ -48,5 +48,5 @@
48
48
  "react": ">=16.9.0 <= 18.3.1",
49
49
  "styled-components": "^5.3.3"
50
50
  },
51
- "gitHead": "8efc031fa688c0b87c7b3915bae93546bb63bcac"
51
+ "gitHead": "e4ecca8944fc9b41c1b9d59c8bcad5e5e2013225"
52
52
  }