@phillips/seldon 1.57.1 → 1.58.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -9,6 +9,7 @@ export interface TextProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
9
9
|
* The OOTB style to apply to the text
|
|
10
10
|
*/
|
|
11
11
|
variant?: TextVariants;
|
|
12
|
+
superScript?: string;
|
|
12
13
|
}
|
|
13
14
|
/**
|
|
14
15
|
* ## Overview
|
|
@@ -19,5 +20,5 @@ export interface TextProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
19
20
|
*
|
|
20
21
|
* [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-text--overview)
|
|
21
22
|
*/
|
|
22
|
-
declare const Text: ({ children, className, element: CustomElement, variant, ...props }: TextProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
declare const Text: ({ children, className, element: CustomElement, variant, superScript, ...props }: TextProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
24
|
export default Text;
|
|
@@ -1,20 +1,30 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { getCommonProps as
|
|
1
|
+
import { jsxs as i, jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { getCommonProps as x } from "../../utils/index.js";
|
|
3
3
|
import { TextVariants as f } from "./types.js";
|
|
4
|
-
import { determineDefaultTextElement as
|
|
5
|
-
import
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
import { determineDefaultTextElement as d, determineTextClassName as N } from "./utils.js";
|
|
5
|
+
import o from "../../node_modules/classnames/index.js";
|
|
6
|
+
const j = ({
|
|
7
|
+
children: r,
|
|
8
|
+
className: a,
|
|
9
|
+
element: n,
|
|
10
|
+
variant: e = f.body2,
|
|
11
|
+
superScript: m = "",
|
|
12
|
+
...s
|
|
13
|
+
}) => {
|
|
14
|
+
const l = n || d(e), { className: t, ...c } = x(s, "Text");
|
|
15
|
+
return /* @__PURE__ */ i(
|
|
16
|
+
l,
|
|
10
17
|
{
|
|
11
|
-
...
|
|
12
|
-
className:
|
|
13
|
-
...
|
|
14
|
-
children:
|
|
18
|
+
...c,
|
|
19
|
+
className: o(t, a, N(e)),
|
|
20
|
+
...s,
|
|
21
|
+
children: [
|
|
22
|
+
r,
|
|
23
|
+
m ? /* @__PURE__ */ p("span", { className: o(`${t}--super-script`), children: m }) : null
|
|
24
|
+
]
|
|
15
25
|
}
|
|
16
26
|
);
|
|
17
27
|
};
|
|
18
28
|
export {
|
|
19
|
-
|
|
29
|
+
j as default
|
|
20
30
|
};
|