thread-ui 0.9.0 → 0.12.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.
- package/README.md +7 -1
- package/dist/components/data-display/filter-controls/variants/filter-controls.js +1 -1
- package/dist/components/data-display/filter-controls/variants/filter-controls.js.map +1 -1
- package/dist/components/data-display/filter-controls/variants/inline-filter-controls.js +1 -1
- package/dist/components/data-display/filter-controls/variants/inline-filter-controls.js.map +1 -1
- package/dist/components/data-display/sort-controls/sort-controls.js +1 -1
- package/dist/components/data-display/sort-controls/sort-controls.js.map +1 -1
- package/dist/components/form-elements/form-label/form-label.js +1 -1
- package/dist/components/form-elements/form-label/form-label.js.map +1 -1
- package/dist/components/media/image-panel/image-panel.js +47 -47
- package/dist/components/media/image-panel/image-panel.js.map +1 -1
- package/dist/components/media/media-card/media-card.js +22 -5
- package/dist/components/media/media-card/media-card.js.map +1 -1
- package/dist/components/navigation/nav-menu/components/nav-link/nav-link.js +2 -4
- package/dist/components/navigation/nav-menu/components/nav-link/nav-link.js.map +1 -1
- package/dist/components/typography/body/body.types.d.ts +31 -0
- package/dist/components/typography/body/body.types.js +2 -0
- package/dist/components/typography/body/body.types.js.map +1 -0
- package/dist/components/typography/body/list.d.ts +15 -0
- package/dist/components/typography/body/list.js +47 -0
- package/dist/components/typography/body/list.js.map +1 -0
- package/dist/components/typography/body/text.d.ts +12 -0
- package/dist/components/typography/body/text.js +30 -0
- package/dist/components/typography/body/text.js.map +1 -0
- package/dist/components/typography/code/code.d.ts +2 -0
- package/dist/components/typography/code/code.js +23 -0
- package/dist/components/typography/code/code.js.map +1 -0
- package/dist/components/typography/code/code.types.d.ts +9 -0
- package/dist/components/typography/code/code.types.js +2 -0
- package/dist/components/typography/code/code.types.js.map +1 -0
- package/dist/components/typography/heading/heading.d.ts +38 -0
- package/dist/components/typography/heading/heading.js +53 -0
- package/dist/components/typography/heading/heading.js.map +1 -0
- package/dist/components/typography/heading/heading.types.d.ts +13 -0
- package/dist/components/typography/heading/heading.types.js +2 -0
- package/dist/components/typography/heading/heading.types.js.map +1 -0
- package/dist/components/typography/heading/render-heading.d.ts +16 -0
- package/dist/components/typography/heading/render-heading.js +52 -0
- package/dist/components/typography/heading/render-heading.js.map +1 -0
- package/dist/components/typography/index.d.ts +8 -2
- package/dist/components/typography/index.js +4 -1
- package/dist/components/typography/index.js.map +1 -1
- package/dist/components/typography/page-header/page-header.js +5 -8
- package/dist/components/typography/page-header/page-header.js.map +1 -1
- package/dist/components/typography/shared-utils/get-presentation-styles.d.ts +2 -0
- package/dist/components/typography/shared-utils/get-presentation-styles.js +31 -0
- package/dist/components/typography/shared-utils/get-presentation-styles.js.map +1 -0
- package/dist/components/typography/shared-utils/get-typography-styles.d.ts +3 -0
- package/dist/components/typography/shared-utils/get-typography-styles.js +56 -0
- package/dist/components/typography/shared-utils/get-typography-styles.js.map +1 -0
- package/dist/components/typography/typography.d.ts +55 -22
- package/dist/components/typography/typography.js +198 -127
- package/dist/components/typography/typography.js.map +1 -1
- package/dist/components/typography/typography.types.d.ts +23 -0
- package/dist/components/typography/typography.types.js +2 -0
- package/dist/components/typography/typography.types.js.map +1 -0
- package/dist/components/ui/card/card.js +3 -32
- package/dist/components/ui/card/card.js.map +1 -1
- package/dist/components/ui/divider/divider.d.ts +1 -1
- package/dist/components/ui/divider/divider.js +20 -6
- package/dist/components/ui/divider/divider.js.map +1 -1
- package/dist/components/ui/divider/divider.types.d.ts +3 -0
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/index.js +1 -0
- package/dist/components/ui/index.js.map +1 -1
- package/dist/components/ui/tab-view/components/tab-item-content.d.ts +5 -0
- package/dist/components/ui/tab-view/components/tab-item-content.js +23 -0
- package/dist/components/ui/tab-view/components/tab-item-content.js.map +1 -0
- package/dist/components/ui/tab-view/components/tab-view-content.d.ts +1 -0
- package/dist/components/ui/tab-view/components/tab-view-content.js +8 -0
- package/dist/components/ui/tab-view/components/tab-view-content.js.map +1 -0
- package/dist/components/ui/tab-view/components/tab-view-controls.d.ts +1 -0
- package/dist/components/ui/tab-view/components/tab-view-controls.js +66 -0
- package/dist/components/ui/tab-view/components/tab-view-controls.js.map +1 -0
- package/dist/components/ui/tab-view/index.d.ts +2 -0
- package/dist/components/ui/tab-view/index.js +2 -0
- package/dist/components/ui/tab-view/index.js.map +1 -0
- package/dist/components/ui/tab-view/tab-view-context.d.ts +34 -0
- package/dist/components/ui/tab-view/tab-view-context.js +4 -0
- package/dist/components/ui/tab-view/tab-view-context.js.map +1 -0
- package/dist/components/ui/tab-view/tab-view.d.ts +18 -0
- package/dist/components/ui/tab-view/tab-view.js +42 -0
- package/dist/components/ui/tab-view/tab-view.js.map +1 -0
- package/dist/components/ui/tab-view/tab-view.types.d.ts +39 -0
- package/dist/components/ui/tab-view/tab-view.types.js +2 -0
- package/dist/components/ui/tab-view/tab-view.types.js.map +1 -0
- package/dist/styled-system/styles.css +1 -1
- package/dist/styled-system/tokens/index.js +477 -353
- package/dist/styled-system/tokens/tokens.d.ts +19 -19
- package/dist/styles/panda.css +1 -1
- package/dist/styles/theme.css +37 -0
- package/dist/theme/css-name-configurations/theme-css-names.d.ts +54 -0
- package/dist/theme/css-name-configurations/theme-css-names.js +52 -0
- package/dist/theme/css-name-configurations/theme-css-names.js.map +1 -1
- package/dist/theme/default-theme.js +53 -0
- package/dist/theme/default-theme.js.map +1 -1
- package/dist/theme/index.d.ts +2 -1
- package/dist/theme/index.js +2 -1
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/theme-docs/misc-elements.d.ts +6 -0
- package/dist/theme/theme-docs/misc-elements.js +20 -0
- package/dist/theme/theme-docs/misc-elements.js.map +1 -0
- package/dist/theme/theme-surface-system.d.ts +2 -0
- package/dist/theme/theme-surface-system.js +8 -0
- package/dist/theme/theme-surface-system.js.map +1 -1
- package/dist/theme/theme-typography-system.d.ts +10 -0
- package/dist/theme/theme-typography-system.js +51 -0
- package/dist/theme/theme-typography-system.js.map +1 -0
- package/dist/types/theme/theme.types.d.ts +90 -7
- package/dist/utils/context/create-stateful-component-context/create-stateful-component-context.d.ts +11 -0
- package/dist/utils/context/create-stateful-component-context/create-stateful-component-context.js +21 -0
- package/dist/utils/context/create-stateful-component-context/create-stateful-component-context.js.map +1 -0
- package/dist/utils/context/create-stateful-component-context/index.d.ts +1 -0
- package/dist/utils/context/create-stateful-component-context/index.js +2 -0
- package/dist/utils/context/create-stateful-component-context/index.js.map +1 -0
- package/dist/utils/context/index.d.ts +1 -0
- package/dist/utils/context/index.js +1 -0
- package/dist/utils/context/index.js.map +1 -1
- package/dist/utils/theme-utilities/get-resolved-layer-values/get-resolved-layer-values.d.ts +1 -1
- package/dist/utils/theme-utilities/get-resolved-layer-values/get-resolved-layer-values.js +8 -1
- package/dist/utils/theme-utilities/get-resolved-layer-values/get-resolved-layer-values.js.map +1 -1
- package/dist/utils/theme-utilities/get-resolved-typography-values/get-resolved-typography-values.d.ts +12 -0
- package/dist/utils/theme-utilities/get-resolved-typography-values/get-resolved-typography-values.js +13 -0
- package/dist/utils/theme-utilities/get-resolved-typography-values/get-resolved-typography-values.js.map +1 -0
- package/dist/utils/theme-utilities/get-resolved-typography-values/index.d.ts +1 -0
- package/dist/utils/theme-utilities/get-resolved-typography-values/index.js +2 -0
- package/dist/utils/theme-utilities/get-resolved-typography-values/index.js.map +1 -0
- package/dist/utils/theme-utilities/get-surface-styles/get-surface-styles.d.ts +3 -0
- package/dist/utils/theme-utilities/get-surface-styles/get-surface-styles.js +38 -0
- package/dist/utils/theme-utilities/get-surface-styles/get-surface-styles.js.map +1 -0
- package/dist/utils/theme-utilities/get-surface-styles/index.d.ts +1 -0
- package/dist/utils/theme-utilities/get-surface-styles/index.js +2 -0
- package/dist/utils/theme-utilities/get-surface-styles/index.js.map +1 -0
- package/dist/utils/theme-utilities/get-text-color-styles/get-text-color-styles.d.ts +11 -0
- package/dist/utils/theme-utilities/get-text-color-styles/get-text-color-styles.js +34 -0
- package/dist/utils/theme-utilities/get-text-color-styles/get-text-color-styles.js.map +1 -0
- package/dist/utils/theme-utilities/get-text-color-styles/index.d.ts +1 -0
- package/dist/utils/theme-utilities/get-text-color-styles/index.js +2 -0
- package/dist/utils/theme-utilities/get-text-color-styles/index.js.map +1 -0
- package/dist/utils/theme-utilities/index.d.ts +3 -0
- package/dist/utils/theme-utilities/index.js +3 -0
- package/dist/utils/theme-utilities/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { SubtitleProps, TypographyHeadingProps } from './heading.types';
|
|
2
|
+
/**
|
|
3
|
+
* Display-level heading. Renders as `h1`
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* <Title align="center">Welcome</Title>
|
|
7
|
+
* <Title subtitle="Last updated March 2025">Welcome</Title>
|
|
8
|
+
*/
|
|
9
|
+
export declare const Title: (props: TypographyHeadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
/**
|
|
11
|
+
* Primary heading
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* <H1>Page Title</H1>
|
|
15
|
+
*/
|
|
16
|
+
export declare const H1: (props: TypographyHeadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
/**
|
|
18
|
+
* Secondary heading
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* <H2>Section Title</H2>
|
|
22
|
+
*/
|
|
23
|
+
export declare const H2: (props: TypographyHeadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
/**
|
|
25
|
+
* Tertiary heading
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* <H3>Subsection Title</H3>
|
|
29
|
+
*/
|
|
30
|
+
export declare const H3: (props: TypographyHeadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
/**
|
|
32
|
+
* Standalone secondary text rendered as an inline `span`.
|
|
33
|
+
* For subtitles attached to headings, use the `subtitle` prop on Title/H1/H2/H3 instead.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* <Subtitle>Last updated March 2025</Subtitle>
|
|
37
|
+
*/
|
|
38
|
+
export declare const Subtitle: ({ children, align, color, truncate, fontFamily, indent, }: SubtitleProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getResolvedTypographyValues, getTextColorStyles } from '../../../utils';
|
|
3
|
+
import { renderHeading } from './render-heading';
|
|
4
|
+
import { getTypographyStyles } from '../shared-utils/get-typography-styles';
|
|
5
|
+
import { getPresentationStyles } from '../shared-utils/get-presentation-styles';
|
|
6
|
+
import { cx } from '../../../styled-system/css';
|
|
7
|
+
/**
|
|
8
|
+
* Display-level heading. Renders as `h1`
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* <Title align="center">Welcome</Title>
|
|
12
|
+
* <Title subtitle="Last updated March 2025">Welcome</Title>
|
|
13
|
+
*/
|
|
14
|
+
export const Title = (props) => renderHeading('title', 'h1', props);
|
|
15
|
+
/**
|
|
16
|
+
* Primary heading
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* <H1>Page Title</H1>
|
|
20
|
+
*/
|
|
21
|
+
export const H1 = (props) => renderHeading('h1', 'h1', props);
|
|
22
|
+
/**
|
|
23
|
+
* Secondary heading
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* <H2>Section Title</H2>
|
|
27
|
+
*/
|
|
28
|
+
export const H2 = (props) => renderHeading('h2', 'h2', props);
|
|
29
|
+
/**
|
|
30
|
+
* Tertiary heading
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* <H3>Subsection Title</H3>
|
|
34
|
+
*/
|
|
35
|
+
export const H3 = (props) => renderHeading('h3', 'h3', props);
|
|
36
|
+
/**
|
|
37
|
+
* Standalone secondary text rendered as an inline `span`.
|
|
38
|
+
* For subtitles attached to headings, use the `subtitle` prop on Title/H1/H2/H3 instead.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* <Subtitle>Last updated March 2025</Subtitle>
|
|
42
|
+
*/
|
|
43
|
+
export const Subtitle = ({ children, align = 'left', color = 'secondary', truncate = false, fontFamily, indent, }) => {
|
|
44
|
+
const resolved = getResolvedTypographyValues({
|
|
45
|
+
role: 'body',
|
|
46
|
+
fontSize: 'body.sm',
|
|
47
|
+
marginBottom: 'none',
|
|
48
|
+
fontFamily,
|
|
49
|
+
});
|
|
50
|
+
const className = cx(getTypographyStyles(resolved), getPresentationStyles({ indent, align, truncate: truncate || undefined }), getTextColorStyles(color));
|
|
51
|
+
return (_jsx("span", { className: className, style: { display: 'block', marginTop: '0.2em' }, children: children }));
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=heading.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heading.js","sourceRoot":"","sources":["../../../../src/components/typography/heading/heading.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,2BAA2B,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE1E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,EAAE,EAAE,MAAM,qBAAqB,CAAC;AAEzC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,KAA6B,EAAE,EAAE,CAAC,aAAa,CAAC,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;AAE5F;;;;;GAKG;AACH,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAA6B,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;AAEtF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAA6B,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;AAEtF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAA6B,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;AAEtF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EACxB,QAAQ,EACR,KAAK,GAAG,MAAM,EACd,KAAK,GAAG,WAAW,EACnB,QAAQ,GAAG,KAAK,EAChB,UAAU,EACV,MAAM,GACS,EAAE,EAAE;IACnB,MAAM,QAAQ,GAAG,2BAA2B,CAAC;QAC5C,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,SAAS;QACnB,YAAY,EAAE,MAAM;QACpB,UAAU;KACV,CAAC,CAAC;IAEH,MAAM,SAAS,GAAG,EAAE,CACnB,mBAAmB,CAAC,QAAQ,CAAC,EAC7B,qBAAqB,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,IAAI,SAAS,EAAE,CAAC,EACzE,kBAAkB,CAAC,KAAK,CAAC,CACzB,CAAC;IAEF,OAAO,CACN,eAAM,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,YACzE,QAAQ,GACH,CACP,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { TypographyProps } from '../typography.types';
|
|
3
|
+
import { FontFamilyOptions, Prettify } from '../../../types';
|
|
4
|
+
/** Shared Heading Props */
|
|
5
|
+
export type TypographyHeadingProps = Prettify<TypographyProps & {
|
|
6
|
+
/** Optional subtitle rendered beneath the heading */
|
|
7
|
+
subtitle?: ReactNode;
|
|
8
|
+
}>;
|
|
9
|
+
/** Subtitle Component Props */
|
|
10
|
+
export type SubtitleProps = Prettify<TypographyProps & {
|
|
11
|
+
fontFamily?: Extract<FontFamilyOptions, 'body' | 'heading'>;
|
|
12
|
+
indent?: boolean;
|
|
13
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heading.types.js","sourceRoot":"","sources":["../../../../src/components/typography/heading/heading.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TypographyHeadingProps } from './heading.types';
|
|
2
|
+
/** Subtitle role mapping: subtitle under a heading uses one-step-down typography role. */
|
|
3
|
+
declare const SUBTITLE_ROLE_MAP: {
|
|
4
|
+
readonly title: "h1";
|
|
5
|
+
readonly h1: "h2";
|
|
6
|
+
readonly h2: "h3";
|
|
7
|
+
readonly h3: "body";
|
|
8
|
+
};
|
|
9
|
+
type HeadingRoleKey = keyof typeof SUBTITLE_ROLE_MAP;
|
|
10
|
+
/**
|
|
11
|
+
* Internal helper rendering a heading with optional subtitle.
|
|
12
|
+
* Wraps in <hgroup> when subtitle is present.
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
export declare const renderHeading: (role: HeadingRoleKey, HeadingTag: "h1" | "h2" | "h3", { children, align, inline, color, truncate, subtitle, }: TypographyHeadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { getResolvedTypographyValues, getTextColorStyles } from '../../../utils';
|
|
3
|
+
import { cx } from '../../../styled-system/css';
|
|
4
|
+
import { getTypographyStyles } from '../shared-utils/get-typography-styles';
|
|
5
|
+
import { getPresentationStyles } from '../shared-utils/get-presentation-styles';
|
|
6
|
+
/** Subtitle role mapping: subtitle under a heading uses one-step-down typography role. */
|
|
7
|
+
const SUBTITLE_ROLE_MAP = {
|
|
8
|
+
title: 'h1',
|
|
9
|
+
h1: 'h2',
|
|
10
|
+
h2: 'h3',
|
|
11
|
+
h3: 'body',
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Internal helper rendering a heading with optional subtitle.
|
|
15
|
+
* Wraps in <hgroup> when subtitle is present.
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
18
|
+
export const renderHeading = (role, HeadingTag, { children, align = 'left', inline = false, color = 'standard', truncate = false, subtitle, }) => {
|
|
19
|
+
// If no subtitle, pass marginBottom through unless inline
|
|
20
|
+
if (!subtitle) {
|
|
21
|
+
const resolved = getResolvedTypographyValues({
|
|
22
|
+
role,
|
|
23
|
+
marginBottom: inline ? 'none' : undefined,
|
|
24
|
+
});
|
|
25
|
+
const headingClass = cx(getTypographyStyles(resolved), getPresentationStyles({ align, truncate: truncate || undefined }), getTextColorStyles(color));
|
|
26
|
+
return _jsx(HeadingTag, { className: headingClass, children: children });
|
|
27
|
+
}
|
|
28
|
+
// Wrap subtitle and heading in hgroup, add margin to wrapper
|
|
29
|
+
const headingResolved = getResolvedTypographyValues({
|
|
30
|
+
role,
|
|
31
|
+
marginBottom: 'none',
|
|
32
|
+
});
|
|
33
|
+
const headingClass = cx(getTypographyStyles(headingResolved), getPresentationStyles({ align, truncate: truncate || undefined }), getTextColorStyles(color));
|
|
34
|
+
const subtitleRole = SUBTITLE_ROLE_MAP[role];
|
|
35
|
+
const subtitleResolved = getResolvedTypographyValues({
|
|
36
|
+
role: subtitleRole,
|
|
37
|
+
fontFamily: 'heading',
|
|
38
|
+
marginBottom: 'none',
|
|
39
|
+
});
|
|
40
|
+
const subtitleClass = cx(getTypographyStyles(subtitleResolved), getPresentationStyles({ align, truncate: truncate || undefined }), getTextColorStyles('text-secondary'));
|
|
41
|
+
// Derive hgroup outer margin from heading
|
|
42
|
+
const wrapperResolved = getResolvedTypographyValues({
|
|
43
|
+
role,
|
|
44
|
+
marginBottom: inline ? 'none' : undefined,
|
|
45
|
+
});
|
|
46
|
+
const wrapperClass = getTypographyStyles({
|
|
47
|
+
fontSize: wrapperResolved.fontSize,
|
|
48
|
+
marginBottom: wrapperResolved.marginBottom,
|
|
49
|
+
});
|
|
50
|
+
return (_jsxs("hgroup", { className: wrapperClass, children: [_jsx(HeadingTag, { className: headingClass, children: children }), _jsx("p", { className: subtitleClass, children: subtitle })] }));
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=render-heading.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-heading.js","sourceRoot":"","sources":["../../../../src/components/typography/heading/render-heading.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,2BAA2B,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE1E,OAAO,EAAE,EAAE,EAAE,MAAM,qBAAqB,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAEhF,0FAA0F;AAC1F,MAAM,iBAAiB,GAAG;IACzB,KAAK,EAAE,IAAI;IACX,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,MAAM;CACD,CAAC;AAIX;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAC5B,IAAoB,EACpB,UAA8B,EAC9B,EACC,QAAQ,EACR,KAAK,GAAG,MAAM,EACd,MAAM,GAAG,KAAK,EACd,KAAK,GAAG,UAAU,EAClB,QAAQ,GAAG,KAAK,EAChB,QAAQ,GACgB,EACxB,EAAE;IACH,0DAA0D;IAC1D,IAAI,CAAC,QAAQ,EAAE,CAAC;QACf,MAAM,QAAQ,GAAG,2BAA2B,CAAC;YAC5C,IAAI;YACJ,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;SACzC,CAAC,CAAC;QAEH,MAAM,YAAY,GAAG,EAAE,CACtB,mBAAmB,CAAC,QAAQ,CAAC,EAC7B,qBAAqB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,IAAI,SAAS,EAAE,CAAC,EACjE,kBAAkB,CAAC,KAAK,CAAC,CACzB,CAAC;QAEF,OAAO,KAAC,UAAU,IAAC,SAAS,EAAE,YAAY,YAAG,QAAQ,GAAc,CAAC;IACrE,CAAC;IAED,6DAA6D;IAC7D,MAAM,eAAe,GAAG,2BAA2B,CAAC;QACnD,IAAI;QACJ,YAAY,EAAE,MAAM;KACpB,CAAC,CAAC;IAEH,MAAM,YAAY,GAAG,EAAE,CACtB,mBAAmB,CAAC,eAAe,CAAC,EACpC,qBAAqB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,IAAI,SAAS,EAAE,CAAC,EACjE,kBAAkB,CAAC,KAAK,CAAC,CACzB,CAAC;IAEF,MAAM,YAAY,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAC7C,MAAM,gBAAgB,GAAG,2BAA2B,CAAC;QACpD,IAAI,EAAE,YAAY;QAClB,UAAU,EAAE,SAAS;QACrB,YAAY,EAAE,MAAM;KACpB,CAAC,CAAC;IAEH,MAAM,aAAa,GAAG,EAAE,CACvB,mBAAmB,CAAC,gBAAgB,CAAC,EACrC,qBAAqB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,IAAI,SAAS,EAAE,CAAC,EACjE,kBAAkB,CAAC,gBAAgB,CAAC,CACpC,CAAC;IAEF,0CAA0C;IAC1C,MAAM,eAAe,GAAG,2BAA2B,CAAC;QACnD,IAAI;QACJ,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;KACzC,CAAC,CAAC;IAEH,MAAM,YAAY,GAAG,mBAAmB,CAAC;QACxC,QAAQ,EAAE,eAAe,CAAC,QAAQ;QAClC,YAAY,EAAE,eAAe,CAAC,YAAY;KAC1C,CAAC,CAAC;IAEH,OAAO,CACN,kBAAQ,SAAS,EAAE,YAAY,aAC9B,KAAC,UAAU,IAAC,SAAS,EAAE,YAAY,YAAG,QAAQ,GAAc,EAC5D,YAAG,SAAS,EAAE,aAAa,YAAG,QAAQ,GAAK,IACnC,CACT,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
export type { TypographyProps,
|
|
2
|
-
export {
|
|
1
|
+
export type { BaseTypographyPresentationProps, ExpandedTypographyPresentationProps, TypographyProps, } from './typography.types';
|
|
2
|
+
export type { TypographyHeadingProps, SubtitleProps } from './heading/heading.types';
|
|
3
|
+
export type { TypographyBodyTypes, TextProps, ListProps, OrderedListProps, } from './body/body.types';
|
|
4
|
+
export type { CodeProps } from './code/code.types';
|
|
3
5
|
export * from './page-header';
|
|
6
|
+
export { Title, H1, H2, H3, Subtitle } from './heading/heading';
|
|
7
|
+
export { Text } from './body/text';
|
|
8
|
+
export { List, OrderedList } from './body/list';
|
|
9
|
+
export { Code } from './code/code';
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
export { Title, H1, H2, H3, Text, Subtitle, List, OrderedList } from './typography';
|
|
2
1
|
export * from './page-header';
|
|
2
|
+
export { Title, H1, H2, H3, Subtitle } from './heading/heading';
|
|
3
|
+
export { Text } from './body/text';
|
|
4
|
+
export { List, OrderedList } from './body/list';
|
|
5
|
+
export { Code } from './code/code';
|
|
3
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/typography/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/typography/index.ts"],"names":[],"mappings":"AAiBA,cAAc,eAAe,CAAC;AAE9B,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAEhE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
import { jsx as _jsx,
|
|
2
|
-
import { css
|
|
3
|
-
import {
|
|
4
|
-
import { Divider, Subtitle, Title } from '../../../components';
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { css } from '../../../styled-system/css';
|
|
3
|
+
import { Container, Divider, Subtitle, Title } from '../../../components';
|
|
5
4
|
const styles = {
|
|
6
|
-
container: cx(container(), css({
|
|
7
|
-
marginY: '4',
|
|
8
|
-
})),
|
|
9
5
|
caption: css({
|
|
10
6
|
width: { md: '50%' },
|
|
11
7
|
paddingX: { md: '1' },
|
|
12
8
|
marginX: 'auto',
|
|
9
|
+
marginY: '4',
|
|
13
10
|
}),
|
|
14
11
|
spacer: css({
|
|
15
12
|
display: 'inline-block',
|
|
@@ -23,6 +20,6 @@ const styles = {
|
|
|
23
20
|
* <PageHeader title="Our Team" caption="Meet the people behind the product." center />
|
|
24
21
|
*/
|
|
25
22
|
export const PageHeader = ({ title, caption, center }) => {
|
|
26
|
-
return (_jsxs(
|
|
23
|
+
return (_jsxs(Container, { children: [_jsx(Title, { align: "center", inline: true, children: title }), caption && (_jsx(_Fragment, { children: _jsx("div", { className: styles.caption, children: _jsx(Subtitle, { indent: center ? false : true, fontFamily: "heading", align: center ? 'center' : 'left', children: caption }) }) })), _jsx(Divider, { marginY: "16px", width: "33%" })] }));
|
|
27
24
|
};
|
|
28
25
|
//# sourceMappingURL=page-header.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-header.js","sourceRoot":"","sources":["../../../../src/components/typography/page-header/page-header.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"page-header.js","sourceRoot":"","sources":["../../../../src/components/typography/page-header/page-header.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAW,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAEnE,MAAM,MAAM,GAAG;IACd,OAAO,EAAE,GAAG,CAAC;QACZ,KAAK,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE;QACpB,QAAQ,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE;QACrB,OAAO,EAAE,MAAM;QACf,OAAO,EAAE,GAAG;KACZ,CAAC;IACF,MAAM,EAAE,GAAG,CAAC;QACX,OAAO,EAAE,cAAc;QACvB,WAAW,EAAE,GAAG;KAChB,CAAC;CACF,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAmB,EAAE,EAAE;IACzE,OAAO,CACN,MAAC,SAAS,eACT,KAAC,KAAK,IAAC,KAAK,EAAC,QAAQ,EAAC,MAAM,kBAC1B,KAAK,GACC,EACP,OAAO,IAAI,CACX,4BACC,cAAK,SAAS,EAAE,MAAM,CAAC,OAAO,YAC7B,KAAC,QAAQ,IACR,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAC7B,UAAU,EAAC,SAAS,EACpB,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,YAEhC,OAAO,GACE,GACN,GACJ,CACH,EACD,KAAC,OAAO,IAAC,OAAO,EAAC,MAAM,EAAC,KAAK,EAAC,KAAK,GAAG,IAC3B,CACZ,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { cva } from '../../../styled-system/css';
|
|
2
|
+
/** Presentation CVA for align/truncate. Not part of the typography chord. */
|
|
3
|
+
const getPresentationStylesCva = cva({
|
|
4
|
+
variants: {
|
|
5
|
+
align: {
|
|
6
|
+
left: { textAlign: 'left' },
|
|
7
|
+
center: { textAlign: 'center' },
|
|
8
|
+
},
|
|
9
|
+
truncate: {
|
|
10
|
+
true: {
|
|
11
|
+
overflow: 'hidden',
|
|
12
|
+
whiteSpace: 'nowrap',
|
|
13
|
+
textOverflow: 'ellipsis',
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
indent: {
|
|
17
|
+
true: {
|
|
18
|
+
textIndent: '4',
|
|
19
|
+
},
|
|
20
|
+
false: {},
|
|
21
|
+
},
|
|
22
|
+
underline: {
|
|
23
|
+
true: { textDecorationLine: 'underline' },
|
|
24
|
+
false: {},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
export const getPresentationStyles = (props) => {
|
|
29
|
+
return getPresentationStylesCva(props);
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=get-presentation-styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-presentation-styles.js","sourceRoot":"","sources":["../../../../src/components/typography/shared-utils/get-presentation-styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAG1C,6EAA6E;AAC7E,MAAM,wBAAwB,GAAG,GAAG,CAAC;IACpC,QAAQ,EAAE;QACT,KAAK,EAAE;YACN,IAAI,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE;YAC3B,MAAM,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE;SAC/B;QACD,QAAQ,EAAE;YACT,IAAI,EAAE;gBACL,QAAQ,EAAE,QAAQ;gBAClB,UAAU,EAAE,QAAQ;gBACpB,YAAY,EAAE,UAAU;aACxB;SACD;QACD,MAAM,EAAE;YACP,IAAI,EAAE;gBACL,UAAU,EAAE,GAAG;aACf;YACD,KAAK,EAAE,EAAE;SACT;QACD,SAAS,EAAE;YACV,IAAI,EAAE,EAAE,kBAAkB,EAAE,WAAW,EAAE;YACzC,KAAK,EAAE,EAAE;SACT;KACD;CACD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,KAA0C,EAAE,EAAE;IACnF,OAAO,wBAAwB,CAAC,KAAK,CAAC,CAAC;AACxC,CAAC,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { cva } from '../../../styled-system/css';
|
|
2
|
+
/** Typography CVA — map individual token keys to style declarations. */
|
|
3
|
+
const getTypographyStylesCva = cva({
|
|
4
|
+
variants: {
|
|
5
|
+
fontFamily: {
|
|
6
|
+
body: { fontFamily: 'body' },
|
|
7
|
+
heading: { fontFamily: 'heading' },
|
|
8
|
+
mono: { fontFamily: 'mono' },
|
|
9
|
+
},
|
|
10
|
+
fontSize: {
|
|
11
|
+
'heading.sm': { fontSize: 'heading.sm' },
|
|
12
|
+
'heading.md': { fontSize: 'heading.md' },
|
|
13
|
+
'heading.lg': { fontSize: 'heading.lg' },
|
|
14
|
+
'heading.xl': { fontSize: 'heading.xl' },
|
|
15
|
+
'body.xxs': { fontSize: 'body.xxs' },
|
|
16
|
+
'body.xs': { fontSize: 'body.xs' },
|
|
17
|
+
'body.sm': { fontSize: 'body.sm' },
|
|
18
|
+
'body.md': { fontSize: 'body.md' },
|
|
19
|
+
'body.lg': { fontSize: 'body.lg' },
|
|
20
|
+
'body.xl': { fontSize: 'body.xl' },
|
|
21
|
+
},
|
|
22
|
+
fontWeight: {
|
|
23
|
+
regular: { fontWeight: 'regular' },
|
|
24
|
+
medium: { fontWeight: 'medium' },
|
|
25
|
+
semibold: { fontWeight: 'semibold' },
|
|
26
|
+
bold: { fontWeight: 'bold' },
|
|
27
|
+
},
|
|
28
|
+
lineHeight: {
|
|
29
|
+
none: { lineHeight: 'none' },
|
|
30
|
+
tighter: { lineHeight: 'tighter' },
|
|
31
|
+
tight: { lineHeight: 'tight' },
|
|
32
|
+
normal: { lineHeight: 'normal' },
|
|
33
|
+
loose: { lineHeight: 'loose' },
|
|
34
|
+
looser: { lineHeight: 'looser' },
|
|
35
|
+
},
|
|
36
|
+
letterSpacing: {
|
|
37
|
+
tight: { letterSpacing: 'tight' },
|
|
38
|
+
normal: { letterSpacing: 'normal' },
|
|
39
|
+
wide: { letterSpacing: 'wide' },
|
|
40
|
+
},
|
|
41
|
+
marginBottom: {
|
|
42
|
+
none: { marginBottom: 'none' },
|
|
43
|
+
xxs: { marginBottom: 'xxs' },
|
|
44
|
+
xs: { marginBottom: 'xs' },
|
|
45
|
+
sm: { marginBottom: 'sm' },
|
|
46
|
+
md: { marginBottom: 'md' },
|
|
47
|
+
lg: { marginBottom: 'lg' },
|
|
48
|
+
xl: { marginBottom: 'xl' },
|
|
49
|
+
xxl: { marginBottom: 'xxl' },
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
export const getTypographyStyles = (props) => {
|
|
54
|
+
return getTypographyStylesCva(props);
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=get-typography-styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-typography-styles.js","sourceRoot":"","sources":["../../../../src/components/typography/shared-utils/get-typography-styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAK1C,wEAAwE;AACxE,MAAM,sBAAsB,GAAG,GAAG,CAAC;IAClC,QAAQ,EAAE;QACT,UAAU,EAAE;YACX,IAAI,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE;YAC5B,OAAO,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE;YAClC,IAAI,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE;SAC5B;QACD,QAAQ,EAAE;YACT,YAAY,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE;YACxC,YAAY,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE;YACxC,YAAY,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE;YACxC,YAAY,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE;YACxC,UAAU,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE;YACpC,SAAS,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE;YAClC,SAAS,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE;YAClC,SAAS,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE;YAClC,SAAS,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE;YAClC,SAAS,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE;SAClC;QACD,UAAU,EAAE;YACX,OAAO,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE;YAClC,MAAM,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE;YAChC,QAAQ,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE;YACpC,IAAI,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE;SAC5B;QACD,UAAU,EAAE;YACX,IAAI,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE;YAC5B,OAAO,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE;YAClC,KAAK,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE;YAC9B,MAAM,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE;YAChC,KAAK,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE;YAC9B,MAAM,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE;SAChC;QACD,aAAa,EAAE;YACd,KAAK,EAAE,EAAE,aAAa,EAAE,OAAO,EAAE;YACjC,MAAM,EAAE,EAAE,aAAa,EAAE,QAAQ,EAAE;YACnC,IAAI,EAAE,EAAE,aAAa,EAAE,MAAM,EAAE;SAC/B;QACD,YAAY,EAAE;YACb,IAAI,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE;YAC9B,GAAG,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE;YAC5B,EAAE,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;YAC1B,EAAE,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;YAC1B,EAAE,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;YAC1B,EAAE,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;YAC1B,EAAE,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;YAC1B,GAAG,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE;SAC5B;KACD;CACD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAAkC,EAAE,EAAE;IACzE,OAAO,sBAAsB,CAAC,KAAK,CAAC,CAAC;AACtC,CAAC,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { ColoredTextOptions } from '../../types';
|
|
2
|
-
import { ExpandedUtilitySizes } from '../../types/theme/theme.types';
|
|
1
|
+
import { BodyFontSizeOptions, ColoredTextOptions, FontFamilyOptions, FontWeightOptions, LetterSpacingOptions, LineHeightOptions, SpacingScaleOptions } from '../../types';
|
|
3
2
|
import { ReactNode } from 'react';
|
|
4
3
|
export type TypographyProps = {
|
|
5
4
|
children: ReactNode;
|
|
@@ -12,55 +11,78 @@ export type TypographyProps = {
|
|
|
12
11
|
/** Truncates text to a single line with ellipsis @default `false` */
|
|
13
12
|
truncate?: boolean;
|
|
14
13
|
};
|
|
14
|
+
export type HeadingProps = TypographyProps & {
|
|
15
|
+
/** Optional subtitle rendered beneath the heading */
|
|
16
|
+
subtitle?: ReactNode;
|
|
17
|
+
};
|
|
15
18
|
/**
|
|
16
|
-
* Display-level heading. Renders as `h1`
|
|
19
|
+
* Display-level heading. Renders as `h1`
|
|
17
20
|
*
|
|
18
21
|
* @example
|
|
19
22
|
* <Title align="center">Welcome</Title>
|
|
23
|
+
* <Title subtitle="Last updated March 2025">Welcome</Title>
|
|
20
24
|
*/
|
|
21
|
-
export declare const Title: (
|
|
25
|
+
export declare const Title: (props: HeadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
26
|
/**
|
|
23
|
-
* Primary heading
|
|
27
|
+
* Primary heading
|
|
24
28
|
*
|
|
25
29
|
* @example
|
|
26
30
|
* <H1>Page Title</H1>
|
|
27
31
|
*/
|
|
28
|
-
export declare const H1: (
|
|
32
|
+
export declare const H1: (props: HeadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
33
|
/**
|
|
30
|
-
* Secondary heading
|
|
34
|
+
* Secondary heading
|
|
31
35
|
*
|
|
32
36
|
* @example
|
|
33
37
|
* <H2>Section Title</H2>
|
|
34
38
|
*/
|
|
35
|
-
export declare const H2: (
|
|
39
|
+
export declare const H2: (props: HeadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
36
40
|
/**
|
|
37
|
-
* Tertiary heading
|
|
41
|
+
* Tertiary heading
|
|
38
42
|
*
|
|
39
43
|
* @example
|
|
40
44
|
* <H3>Subsection Title</H3>
|
|
41
45
|
*/
|
|
42
|
-
export declare const H3: (
|
|
43
|
-
export type
|
|
44
|
-
/**
|
|
45
|
-
|
|
46
|
-
/** Font
|
|
47
|
-
|
|
46
|
+
export declare const H3: (props: HeadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
export type BodyTextProps = TypographyProps & {
|
|
48
|
+
/** Font size — body scale only @default `'md'` */
|
|
49
|
+
size?: BodyFontSizeOptions;
|
|
50
|
+
/** Font weight override @default role default (`'regular'`) */
|
|
51
|
+
weight?: FontWeightOptions;
|
|
52
|
+
/** Line height override @default role default (`'normal'`) */
|
|
53
|
+
lineHeight?: LineHeightOptions;
|
|
54
|
+
/** Letter spacing override @default role default (`'normal'`) */
|
|
55
|
+
letterSpacing?: LetterSpacingOptions;
|
|
56
|
+
/** Bottom margin override @default role default (`'0.5em'`) */
|
|
57
|
+
marginBottom?: SpacingScaleOptions;
|
|
58
|
+
};
|
|
59
|
+
export type TextProps = BodyTextProps & {
|
|
60
|
+
indent?: boolean;
|
|
48
61
|
};
|
|
49
62
|
/**
|
|
50
63
|
* Body text. Renders as `p` by default or `span` when `inline` is true.
|
|
51
64
|
*
|
|
65
|
+
* Allows for individual attribute overrides for customization
|
|
66
|
+
*
|
|
52
67
|
* @example
|
|
53
|
-
* <Text
|
|
68
|
+
* <Text>Default Text</Text>
|
|
69
|
+
* @example
|
|
70
|
+
* <Text size="sm" weight="semibold">Important note</Text>
|
|
54
71
|
*/
|
|
55
|
-
export declare const Text: ({ children, align, inline, color,
|
|
72
|
+
export declare const Text: ({ children, align, inline, color, size, weight, lineHeight, letterSpacing, marginBottom, truncate, indent, }: TextProps) => import("react/jsx-runtime").JSX.Element;
|
|
73
|
+
export type SubtitleProps = TypographyProps & {
|
|
74
|
+
fontFamily?: Extract<FontFamilyOptions, 'body' | 'heading'>;
|
|
75
|
+
indent?: boolean;
|
|
76
|
+
};
|
|
56
77
|
/**
|
|
57
|
-
*
|
|
78
|
+
* Standalone secondary text rendered as an inline `span`.
|
|
79
|
+
* For subtitles attached to headings, use the `subtitle` prop on Title/H1/H2/H3 instead.
|
|
58
80
|
*
|
|
59
81
|
* @example
|
|
60
82
|
* <Subtitle>Last updated March 2025</Subtitle>
|
|
61
83
|
*/
|
|
62
|
-
export declare const Subtitle: ({ children, align, color, truncate, }:
|
|
63
|
-
export type ListProps = Omit<
|
|
84
|
+
export declare const Subtitle: ({ children, align, color, truncate, fontFamily, indent, }: SubtitleProps) => import("react/jsx-runtime").JSX.Element;
|
|
85
|
+
export type ListProps = Omit<BodyTextProps, 'children' | 'inline' | 'truncate' | 'marginBottom'> & {
|
|
64
86
|
/** Items to render in the list */
|
|
65
87
|
items: Array<string | ReactNode>;
|
|
66
88
|
/** List marker style @default `'disc'` */
|
|
@@ -72,7 +94,7 @@ export type ListProps = Omit<TextProps, 'bold' | 'children' | 'inline' | 'trunca
|
|
|
72
94
|
* @example
|
|
73
95
|
* <List items={['Apples', 'Oranges', 'Bananas']} decoration="circle" />
|
|
74
96
|
*/
|
|
75
|
-
export declare const List: ({ align, color, size, items, decoration, }: ListProps) => import("react/jsx-runtime").JSX.Element;
|
|
97
|
+
export declare const List: ({ align, color, size, weight, lineHeight, letterSpacing, items, decoration, }: ListProps) => import("react/jsx-runtime").JSX.Element;
|
|
76
98
|
export type OrderedListProps = Omit<ListProps, 'decoration'>;
|
|
77
99
|
/**
|
|
78
100
|
* Ordered list with decimal numbering.
|
|
@@ -80,4 +102,15 @@ export type OrderedListProps = Omit<ListProps, 'decoration'>;
|
|
|
80
102
|
* @example
|
|
81
103
|
* <OrderedList items={['First', 'Second', 'Third']} />
|
|
82
104
|
*/
|
|
83
|
-
export declare const OrderedList: ({ align, color, size, items, }: OrderedListProps) => import("react/jsx-runtime").JSX.Element;
|
|
105
|
+
export declare const OrderedList: ({ align, color, size, weight, lineHeight, letterSpacing, items, }: OrderedListProps) => import("react/jsx-runtime").JSX.Element;
|
|
106
|
+
/**
|
|
107
|
+
* Code typography component for code display. Renders as `<code>`.
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* <Text>Run <Code>npm install</Code> to get started.</Text>
|
|
111
|
+
*/
|
|
112
|
+
export type CodeProps = TypographyProps & {
|
|
113
|
+
/** Font size — body scale only @default `'sm'` */
|
|
114
|
+
size?: BodyFontSizeOptions;
|
|
115
|
+
};
|
|
116
|
+
export declare const Code: ({ children, align, color, size, truncate, }: CodeProps) => import("react/jsx-runtime").JSX.Element;
|