@timmbr/ui 1.4.1 → 1.4.2
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/dist/components/Text/Text.d.ts.map +1 -1
- package/dist/components/Text/Text.js +2 -0
- package/dist/components/Text/Text.styles.d.ts +1 -0
- package/dist/components/Text/Text.styles.d.ts.map +1 -1
- package/dist/components/Text/Text.styles.js +7 -1
- package/dist/components/Text/Text.types.d.ts +5 -0
- package/dist/components/Text/Text.types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../src/components/Text/Text.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,eAAO,MAAM,IAAI,+
|
|
1
|
+
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../src/components/Text/Text.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,eAAO,MAAM,IAAI,+EAyChB,CAAC"}
|
|
@@ -12,6 +12,7 @@ const Text = React.forwardRef(
|
|
|
12
12
|
as = "p",
|
|
13
13
|
variant = "body-1",
|
|
14
14
|
foreground = "default",
|
|
15
|
+
font = "sans",
|
|
15
16
|
weight,
|
|
16
17
|
italic,
|
|
17
18
|
asChild = false,
|
|
@@ -30,6 +31,7 @@ const Text = React.forwardRef(
|
|
|
30
31
|
textVariants({
|
|
31
32
|
variant,
|
|
32
33
|
foreground,
|
|
34
|
+
font,
|
|
33
35
|
weight,
|
|
34
36
|
italic,
|
|
35
37
|
className
|
|
@@ -2,6 +2,7 @@ import { type VariantProps } from 'class-variance-authority';
|
|
|
2
2
|
export declare const textVariants: (props?: ({
|
|
3
3
|
variant?: "caption" | "body-1" | "body-2" | "body-2-medium" | "body-2-semibold" | "body-2-light" | "body-3" | "body-3-light" | "subtitle-1" | "subtitle-2" | null | undefined;
|
|
4
4
|
foreground?: "default" | "destructive" | "inherit" | "white" | "subtle" | "primary" | "secondary" | "muted" | null | undefined;
|
|
5
|
+
font?: "title" | "display" | "sans" | null | undefined;
|
|
5
6
|
weight?: "bold" | "normal" | "medium" | "light" | "semibold" | null | undefined;
|
|
6
7
|
italic?: boolean | null | undefined;
|
|
7
8
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Text/Text.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"Text.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Text/Text.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,eAAO,MAAM,YAAY;;;;;;8EA8CvB,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,YAAY,CAAC,OAAO,YAAY,CAAC,CAAC"}
|
|
@@ -24,6 +24,11 @@ const textVariants = cva("font-sans transition-colors leading-[1.3]", {
|
|
|
24
24
|
white: "text-white",
|
|
25
25
|
inherit: "text-inherit"
|
|
26
26
|
},
|
|
27
|
+
font: {
|
|
28
|
+
sans: "font-sans",
|
|
29
|
+
display: "font-display",
|
|
30
|
+
title: "font-title"
|
|
31
|
+
},
|
|
27
32
|
weight: {
|
|
28
33
|
light: "font-light",
|
|
29
34
|
normal: "font-normal",
|
|
@@ -38,7 +43,8 @@ const textVariants = cva("font-sans transition-colors leading-[1.3]", {
|
|
|
38
43
|
},
|
|
39
44
|
defaultVariants: {
|
|
40
45
|
variant: "body-1",
|
|
41
|
-
foreground: "default"
|
|
46
|
+
foreground: "default",
|
|
47
|
+
font: "sans"
|
|
42
48
|
}
|
|
43
49
|
});
|
|
44
50
|
|
|
@@ -11,6 +11,11 @@ export interface TextProps extends React.HTMLAttributes<HTMLElement>, TextVarian
|
|
|
11
11
|
* If true, renders child element via Radix Slot while applying text styles.
|
|
12
12
|
*/
|
|
13
13
|
asChild?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Typographic font family ('sans' uses Manrope; 'display' uses DM Serif Display; 'title' uses Outfit).
|
|
16
|
+
* @default 'sans'
|
|
17
|
+
*/
|
|
18
|
+
font?: 'sans' | 'display' | 'title';
|
|
14
19
|
/**
|
|
15
20
|
* Font weight override.
|
|
16
21
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.types.d.ts","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,MAAM,MAAM,OAAO,GAAG,GAAG,GAAG,MAAM,CAAC;AAEnC,MAAM,WAAW,SACf,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EACvC,YAAY;IACd;;;OAGG;IACH,EAAE,CAAC,EAAE,OAAO,CAAC;IACb;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAC;IAC7D;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,UAAU,CAAC,EACP,SAAS,GACT,OAAO,GACP,QAAQ,GACR,SAAS,GACT,WAAW,GACX,aAAa,GACb,OAAO,GACP,SAAS,CAAC;CACf"}
|
|
1
|
+
{"version":3,"file":"Text.types.d.ts","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,MAAM,MAAM,OAAO,GAAG,GAAG,GAAG,MAAM,CAAC;AAEnC,MAAM,WAAW,SACf,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EACvC,YAAY;IACd;;;OAGG;IACH,EAAE,CAAC,EAAE,OAAO,CAAC;IACb;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;IACpC;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAC;IAC7D;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,UAAU,CAAC,EACP,SAAS,GACT,OAAO,GACP,QAAQ,GACR,SAAS,GACT,WAAW,GACX,aAAa,GACb,OAAO,GACP,SAAS,CAAC;CACf"}
|