@datum-cloud/datum-ui 3.0.0 → 3.1.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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
declare const titleVariants: (props?: ({
|
|
4
|
-
level?: 1 | 2 | 3 | 4 | 5 | 6 | null | undefined;
|
|
4
|
+
level?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | null | undefined;
|
|
5
5
|
weight?: "bold" | "normal" | "medium" | "semibold" | "extrabold" | null | undefined;
|
|
6
6
|
textColor?: "default" | "secondary" | "destructive" | "success" | "info" | "warning" | "primary" | "muted" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -300,7 +300,13 @@ declare function Title({ className, level, weight, textColor, as, children, ...p
|
|
|
300
300
|
className: string;
|
|
301
301
|
}, HTMLElement>;
|
|
302
302
|
interface TextProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'color'>, VariantProps<typeof textVariants> {
|
|
303
|
-
|
|
303
|
+
/**
|
|
304
|
+
* Headings are allowed because the scale's display steps start at 16px
|
|
305
|
+
* (`Title` level 6), so a smaller heading — a card or section label at 13
|
|
306
|
+
* or 14px — has no `Title` level. Render it as `<Text as="h4">` rather than
|
|
307
|
+
* dropping to a raw size class.
|
|
308
|
+
*/
|
|
309
|
+
as?: 'span' | 'p' | 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
304
310
|
copyable?: boolean;
|
|
305
311
|
ellipsis?: boolean;
|
|
306
312
|
mark?: boolean;
|
package/dist/index.mjs
CHANGED
|
@@ -41,7 +41,7 @@ import { t as Switch } from "./switch-BaR-Vna4.mjs";
|
|
|
41
41
|
import { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow } from "./table/index.mjs";
|
|
42
42
|
import { Tabs, TabsContent, TabsLinkTrigger, TabsList, TabsTrigger } from "./tabs/index.mjs";
|
|
43
43
|
import { t as Textarea } from "./textarea-DiSGxCBO.mjs";
|
|
44
|
-
import { a as ListItem, c as Title, d as titleVariants, i as List, l as paragraphVariants, n as Code, o as Paragraph, r as Link, s as Text, t as Blockquote, u as textVariants } from "./typography-
|
|
44
|
+
import { a as ListItem, c as Title, d as titleVariants, i as List, l as paragraphVariants, n as Code, o as Paragraph, r as Link, s as Text, t as Blockquote, u as textVariants } from "./typography-q71iTG72.mjs";
|
|
45
45
|
import { t as VisuallyHidden } from "./visuallyhidden-D7L_qs8b.mjs";
|
|
46
46
|
import { a as hasActiveDescendant, i as findItemByHref, n as NavMenu, o as isNavItemActive, r as NavMenuItem, s as normalizePath, t as AppNavigation } from "./app-navigation-D52ikGN-.mjs";
|
|
47
47
|
import { n as EASE, t as DURATION } from "./motion-DvGRWdsm.mjs";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ListItem, c as Title, d as titleVariants, i as List, l as paragraphVariants, n as Code, o as Paragraph, r as Link, s as Text, t as Blockquote, u as textVariants } from "../typography-
|
|
1
|
+
import { a as ListItem, c as Title, d as titleVariants, i as List, l as paragraphVariants, n as Code, o as Paragraph, r as Link, s as Text, t as Blockquote, u as textVariants } from "../typography-q71iTG72.mjs";
|
|
2
2
|
export { Blockquote, Code, Link, List, ListItem, Paragraph, Text, Title, paragraphVariants, textVariants, titleVariants };
|
|
@@ -12,7 +12,8 @@ const titleVariants = cva("font-semibold leading-tight tracking-tight", {
|
|
|
12
12
|
3: "text-2xl",
|
|
13
13
|
4: "text-xl",
|
|
14
14
|
5: "text-lg",
|
|
15
|
-
6: "text-base"
|
|
15
|
+
6: "text-base",
|
|
16
|
+
7: "text-sm"
|
|
16
17
|
},
|
|
17
18
|
weight: {
|
|
18
19
|
normal: "font-normal",
|
|
@@ -115,7 +116,7 @@ const paragraphVariants = cva("leading-relaxed", {
|
|
|
115
116
|
}
|
|
116
117
|
});
|
|
117
118
|
function Title({ className, level, weight, textColor, as, children, ...props }) {
|
|
118
|
-
const Component = as ?? `h${level ?? 4}`;
|
|
119
|
+
const Component = as ?? `h${Math.min(level ?? 4, 6)}`;
|
|
119
120
|
return React.createElement(Component, {
|
|
120
121
|
className: cn(titleVariants({
|
|
121
122
|
level,
|