@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 +4 -0
- package/dist/CommonElements.d.ts +17 -17
- package/dist/CommonElements.js +55 -84
- package/dist/Ellipsis.d.ts +2 -2
- package/dist/Ellipsis.js +23 -27
- package/dist/Paragraph.d.ts +1 -1
- package/dist/Paragraph.js +13 -12
- package/dist/Text.d.ts +2 -4
- package/dist/Text.js +20 -24
- package/dist/Title.d.ts +2 -2
- package/dist/Title.js +21 -25
- package/dist/Title.types.d.ts +2 -2
- package/dist/Title.types.js +1 -1
- package/dist/Typography.js +4 -1
- package/dist/assets/style/index-tn0RQdqM.css +0 -0
- package/dist/index.js +16 -7
- package/dist/modules.d.js +1 -1
- package/dist/modules.d.ts +0 -0
- package/dist/style/macro-utils.d.ts +20 -20
- package/dist/style/macro-utils.js +43 -31
- package/package.json +5 -5
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
|
package/dist/CommonElements.d.ts
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
export declare const Description: import(
|
|
1
|
+
export declare const Description: import('styled-components').StyledComponent<"div", any, {
|
|
2
2
|
disabled?: boolean;
|
|
3
3
|
}, never>;
|
|
4
|
-
export declare const ErrorText: import(
|
|
5
|
-
export declare const Label: import(
|
|
6
|
-
export declare const MediumText: import(
|
|
7
|
-
export declare const SmallText: import(
|
|
8
|
-
export declare const XSmallText: import(
|
|
9
|
-
export declare const MediumParagraph: import(
|
|
10
|
-
export declare const SmallParagraph: import(
|
|
11
|
-
export declare const XSmallParagraph: import(
|
|
12
|
-
export declare const H1: import(
|
|
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(
|
|
15
|
+
export declare const H2: import('styled-components').StyledComponent<"h2", any, {
|
|
16
16
|
withoutMargin: boolean;
|
|
17
17
|
}, never>;
|
|
18
|
-
export declare const H3: import(
|
|
18
|
+
export declare const H3: import('styled-components').StyledComponent<"h3", any, {
|
|
19
19
|
withoutMargin: boolean;
|
|
20
20
|
}, never>;
|
|
21
|
-
export declare const H4: import(
|
|
21
|
+
export declare const H4: import('styled-components').StyledComponent<"h4", any, {
|
|
22
22
|
withoutMargin: boolean;
|
|
23
23
|
}, never>;
|
|
24
|
-
export declare const H5: import(
|
|
24
|
+
export declare const H5: import('styled-components').StyledComponent<"h5", any, {
|
|
25
25
|
withoutMargin: boolean;
|
|
26
26
|
}, never>;
|
|
27
|
-
export declare const H6: import(
|
|
27
|
+
export declare const H6: import('styled-components').StyledComponent<"h6", any, {
|
|
28
28
|
withoutMargin: boolean;
|
|
29
29
|
}, never>;
|
|
30
|
-
export declare const H7: import(
|
|
30
|
+
export declare const H7: import('styled-components').StyledComponent<"h6", any, {
|
|
31
31
|
withoutMargin: boolean;
|
|
32
32
|
}, never>;
|
|
33
|
-
export declare const EllipsisText: import(
|
|
33
|
+
export declare const EllipsisText: import('styled-components').StyledComponent<"div", any, {}, never>;
|
package/dist/CommonElements.js
CHANGED
|
@@ -1,118 +1,89 @@
|
|
|
1
|
-
import styled, { css } from
|
|
2
|
-
import {
|
|
3
|
-
|
|
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:", ";", ""],
|
|
7
|
-
|
|
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;"],
|
|
15
|
-
|
|
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;"],
|
|
21
|
-
|
|
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
|
-
})(["", ""],
|
|
27
|
-
|
|
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
|
-
})(["", ""],
|
|
33
|
-
|
|
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
|
-
})(["", ""],
|
|
39
|
-
|
|
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
|
-
})(["", ""],
|
|
45
|
-
|
|
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
|
-
})(["", ""],
|
|
51
|
-
|
|
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
|
-
})(["", ""],
|
|
57
|
-
|
|
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
|
-
})(["", " ", ""],
|
|
63
|
-
|
|
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
|
-
})(["", " ", ""],
|
|
71
|
-
|
|
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
|
-
})(["", " ", ""],
|
|
79
|
-
|
|
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
|
-
})(["", " ", ""],
|
|
87
|
-
|
|
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
|
-
})(["", " ", ""],
|
|
95
|
-
|
|
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
|
-
})(["", " ", ""],
|
|
103
|
-
|
|
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
|
-
})(["", " ", ""],
|
|
111
|
-
|
|
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
|
+
};
|
package/dist/Ellipsis.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React,
|
|
2
|
-
import {
|
|
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
|
-
|
|
2
|
-
import debounce from
|
|
3
|
-
import
|
|
4
|
-
import Tooltip from
|
|
5
|
-
import { EllipsisText } from
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
|
|
25
|
-
useEffect(
|
|
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
|
|
29
|
+
return () => {
|
|
31
30
|
resizeObserver.disconnect();
|
|
32
31
|
debouncedResize.cancel();
|
|
33
32
|
};
|
|
34
33
|
}, [resizeObserver, debouncedResize]);
|
|
35
|
-
return
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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
|
+
};
|
package/dist/Paragraph.d.ts
CHANGED
package/dist/Paragraph.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return
|
|
14
|
-
|
|
15
|
-
|
|
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,
|
|
2
|
-
import '
|
|
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
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
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
|
-
|
|
5
|
+
const MapSizeToComponent = {
|
|
8
6
|
medium: MediumText,
|
|
9
7
|
small: SmallText,
|
|
10
8
|
xsmall: XSmallText
|
|
11
9
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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 {
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
|
|
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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
|
28
|
+
return /* @__PURE__ */ jsx(Ellipsis, { ...ellipsis, children: content });
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
Title as default
|
|
35
32
|
};
|
|
36
|
-
export default Title;
|
package/dist/Title.types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
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;
|
package/dist/Title.types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
package/dist/Typography.js
CHANGED
|
File without changes
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import * as
|
|
7
|
-
export {
|
|
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
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
File without changes
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
export declare const heading: import(
|
|
2
|
-
export declare const regular: import(
|
|
3
|
-
export declare const h700: import(
|
|
4
|
-
export declare const h600: import(
|
|
5
|
-
export declare const h500: import(
|
|
6
|
-
export declare const h400: import(
|
|
7
|
-
export declare const h300: import(
|
|
8
|
-
export declare const h200: import(
|
|
9
|
-
export declare const h100: import(
|
|
10
|
-
export declare const medium: import(
|
|
11
|
-
export declare const small: import(
|
|
12
|
-
export declare const xsmall: import(
|
|
13
|
-
export declare const link: import(
|
|
14
|
-
export declare const linkbutton: import(
|
|
15
|
-
export declare const tag: import(
|
|
16
|
-
export declare const tooltip: import(
|
|
17
|
-
export declare const xsAvatar: import(
|
|
18
|
-
export declare const xlAvatar: import(
|
|
19
|
-
export declare const xlAvatarIcon: import(
|
|
20
|
-
export declare const flexCentered: import(
|
|
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
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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.
|
|
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": "
|
|
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": "
|
|
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.
|
|
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": "
|
|
51
|
+
"gitHead": "e4ecca8944fc9b41c1b9d59c8bcad5e5e2013225"
|
|
52
52
|
}
|