@foundrykit/primitives 2.0.9 → 2.0.10
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/chunk-3NQR7JZR.js +128 -0
- package/dist/chunk-B5YCE3UP.js +57 -0
- package/dist/chunk-F2TEA6ER.js +138 -0
- package/dist/chunk-SIQHWNPH.js +45 -0
- package/dist/components/dialog/index.cjs +182 -0
- package/dist/components/dialog/index.d.cts +38 -0
- package/dist/components/dialog/index.d.ts +38 -0
- package/dist/components/dialog/index.js +25 -0
- package/dist/components/input-group/index.cjs +270 -0
- package/dist/components/input-group/index.d.cts +44 -0
- package/dist/components/input-group/index.d.ts +44 -0
- package/dist/components/input-group/index.js +153 -0
- package/dist/components/sheet/index.cjs +170 -0
- package/dist/components/sheet/index.d.cts +31 -0
- package/dist/components/sheet/index.d.ts +31 -0
- package/dist/components/sheet/index.js +21 -0
- package/dist/components/toggle/index.cjs +81 -0
- package/dist/components/toggle/index.d.cts +26 -0
- package/dist/components/toggle/index.d.ts +26 -0
- package/dist/components/toggle/index.js +9 -0
- package/dist/components/tooltip/index.cjs +95 -0
- package/dist/components/tooltip/index.d.cts +25 -0
- package/dist/components/tooltip/index.d.ts +25 -0
- package/dist/components/tooltip/index.js +13 -0
- package/dist/index.d.cts +11 -105
- package/dist/index.d.ts +11 -105
- package/dist/index.js +93 -399
- package/package.json +200 -8
- package/CHANGELOG.md +0 -230
- package/postcss.config.mjs +0 -6
- package/registry.json +0 -64
- package/src/components/accordion/config.ts +0 -28
- package/src/components/accordion/index.tsx +0 -80
- package/src/components/alert/config.ts +0 -40
- package/src/components/alert/index.tsx +0 -80
- package/src/components/alert-dialog/config.ts +0 -28
- package/src/components/alert-dialog/index.tsx +0 -188
- package/src/components/aspect-ratio/config.ts +0 -27
- package/src/components/aspect-ratio/index.tsx +0 -24
- package/src/components/avatar/config.ts +0 -46
- package/src/components/avatar/index.tsx +0 -67
- package/src/components/badge/config.ts +0 -56
- package/src/components/badge/index.tsx +0 -56
- package/src/components/breadcrumb/config.ts +0 -121
- package/src/components/breadcrumb/index.tsx +0 -127
- package/src/components/button/config.ts +0 -97
- package/src/components/button/index.tsx +0 -86
- package/src/components/button-group/config.ts +0 -39
- package/src/components/button-group/index.tsx +0 -99
- package/src/components/card/config.ts +0 -89
- package/src/components/card/index.tsx +0 -90
- package/src/components/checkbox/config.ts +0 -46
- package/src/components/checkbox/index.tsx +0 -41
- package/src/components/collapsible/config.ts +0 -27
- package/src/components/collapsible/index.tsx +0 -47
- package/src/components/context-menu/config.ts +0 -28
- package/src/components/context-menu/index.tsx +0 -271
- package/src/components/dialog/config.ts +0 -582
- package/src/components/dialog/index.tsx +0 -162
- package/src/components/direction/config.ts +0 -28
- package/src/components/direction/index.tsx +0 -27
- package/src/components/drawer/config.ts +0 -28
- package/src/components/drawer/index.tsx +0 -153
- package/src/components/dropdown/config.ts +0 -262
- package/src/components/dropdown/index.tsx +0 -280
- package/src/components/empty/config.ts +0 -38
- package/src/components/empty/index.tsx +0 -127
- package/src/components/field/config.ts +0 -40
- package/src/components/field/index.tsx +0 -252
- package/src/components/hover-card/config.ts +0 -27
- package/src/components/hover-card/index.tsx +0 -56
- package/src/components/input/config.ts +0 -64
- package/src/components/input/index.tsx +0 -32
- package/src/components/input-group/config.ts +0 -209
- package/src/components/input-group/index.tsx +0 -177
- package/src/components/item/config.ts +0 -52
- package/src/components/item/index.tsx +0 -215
- package/src/components/kbd/config.ts +0 -38
- package/src/components/kbd/index.tsx +0 -40
- package/src/components/label/config.ts +0 -72
- package/src/components/label/index.tsx +0 -32
- package/src/components/menubar/config.ts +0 -28
- package/src/components/menubar/index.tsx +0 -295
- package/src/components/native-select/config.ts +0 -40
- package/src/components/native-select/index.tsx +0 -40
- package/src/components/navigation-menu/config.ts +0 -32
- package/src/components/navigation-menu/index.tsx +0 -188
- package/src/components/popover/config.ts +0 -222
- package/src/components/popover/index.tsx +0 -60
- package/src/components/progress/config.ts +0 -42
- package/src/components/progress/index.tsx +0 -39
- package/src/components/radio-group/config.ts +0 -303
- package/src/components/radio-group/index.tsx +0 -58
- package/src/components/resizable/config.ts +0 -28
- package/src/components/resizable/index.tsx +0 -67
- package/src/components/scroll-area/config.ts +0 -17
- package/src/components/scroll-area/index.tsx +0 -70
- package/src/components/select/config.ts +0 -277
- package/src/components/select/index.tsx +0 -202
- package/src/components/separator/config.ts +0 -63
- package/src/components/separator/index.tsx +0 -38
- package/src/components/sheet/config.ts +0 -16
- package/src/components/sheet/index.tsx +0 -153
- package/src/components/skeleton/config.ts +0 -77
- package/src/components/skeleton/index.tsx +0 -22
- package/src/components/slider/config.ts +0 -46
- package/src/components/slider/index.tsx +0 -76
- package/src/components/sonner/config.ts +0 -27
- package/src/components/sonner/index.tsx +0 -37
- package/src/components/spinner/config.ts +0 -40
- package/src/components/spinner/index.tsx +0 -30
- package/src/components/switch/config.ts +0 -171
- package/src/components/switch/index.tsx +0 -40
- package/src/components/table/config.ts +0 -38
- package/src/components/table/index.tsx +0 -135
- package/src/components/tabs/config.ts +0 -335
- package/src/components/tabs/index.tsx +0 -82
- package/src/components/textarea/config.ts +0 -117
- package/src/components/textarea/index.tsx +0 -26
- package/src/components/toggle/config.ts +0 -67
- package/src/components/toggle/index.tsx +0 -59
- package/src/components/toggle-group/config.ts +0 -46
- package/src/components/toggle-group/index.tsx +0 -106
- package/src/components/tooltip/config.ts +0 -16
- package/src/components/tooltip/index.tsx +0 -75
- package/src/components/typography/config.ts +0 -38
- package/src/components/typography/index.tsx +0 -172
- package/src/index.ts +0 -291
- package/tsconfig.json +0 -9
- package/tsconfig.lint.json +0 -8
- package/tsup.config.ts +0 -55
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import type { ComponentConfig } from '@foundrykit/types';
|
|
2
|
-
|
|
3
|
-
export const ToggleGroupConfig: ComponentConfig = {
|
|
4
|
-
name: 'Toggle Group',
|
|
5
|
-
description:
|
|
6
|
-
'A set of two-state buttons that can be toggled on or off, individually or as a single selection.',
|
|
7
|
-
category: 'primitives',
|
|
8
|
-
tags: ['toggle-group', 'input', 'form'],
|
|
9
|
-
preview: {
|
|
10
|
-
type: 'static',
|
|
11
|
-
html: '<div class="flex h-12 w-full items-center px-3"><div class="flex w-fit items-center rounded-md border border-gray-300"><span class="h-9 rounded-l-md bg-gray-200 px-3 py-2 text-sm text-gray-600">B</span><span class="h-9 px-3 py-2 text-sm text-gray-600">I</span><span class="h-9 rounded-r-md px-3 py-2 text-sm text-gray-600">U</span></div></div>',
|
|
12
|
-
},
|
|
13
|
-
variants: [
|
|
14
|
-
{
|
|
15
|
-
name: 'Default',
|
|
16
|
-
description: 'Multiple-selection toggle group',
|
|
17
|
-
code: '<ToggleGroup type="multiple"><ToggleGroupItem value="bold">B</ToggleGroupItem></ToggleGroup>',
|
|
18
|
-
preview: {
|
|
19
|
-
type: 'component',
|
|
20
|
-
component: 'ToggleGroup',
|
|
21
|
-
props: {
|
|
22
|
-
type: 'multiple',
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
name: 'Outline',
|
|
28
|
-
description: 'Outline single-selection toggle group',
|
|
29
|
-
code: '<ToggleGroup type="single" variant="outline"><ToggleGroupItem value="left">L</ToggleGroupItem></ToggleGroup>',
|
|
30
|
-
preview: {
|
|
31
|
-
type: 'component',
|
|
32
|
-
component: 'ToggleGroup',
|
|
33
|
-
props: {
|
|
34
|
-
type: 'single',
|
|
35
|
-
variant: 'outline',
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
],
|
|
40
|
-
dependencies: ['utils'],
|
|
41
|
-
packageDependencies: [
|
|
42
|
-
'@radix-ui/react-toggle-group',
|
|
43
|
-
'class-variance-authority',
|
|
44
|
-
],
|
|
45
|
-
files: ['components/primitives/toggle-group/index.tsx'],
|
|
46
|
-
};
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { cn } from '@foundrykit/utils';
|
|
4
|
-
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
5
|
-
import { cva, type VariantProps } from 'class-variance-authority';
|
|
6
|
-
import * as React from 'react';
|
|
7
|
-
|
|
8
|
-
const toggleGroupItemVariants = cva(
|
|
9
|
-
"hover:bg-muted hover:text-muted-foreground data-[state=on]:bg-accent data-[state=on]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
10
|
-
{
|
|
11
|
-
variants: {
|
|
12
|
-
variant: {
|
|
13
|
-
default: 'bg-transparent',
|
|
14
|
-
outline:
|
|
15
|
-
'border-input hover:bg-accent hover:text-accent-foreground border bg-transparent shadow-xs',
|
|
16
|
-
},
|
|
17
|
-
size: {
|
|
18
|
-
default: 'h-9 min-w-9 px-2',
|
|
19
|
-
sm: 'h-8 min-w-8 px-1.5',
|
|
20
|
-
lg: 'h-10 min-w-10 px-2.5',
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
defaultVariants: {
|
|
24
|
-
variant: 'default',
|
|
25
|
-
size: 'default',
|
|
26
|
-
},
|
|
27
|
-
}
|
|
28
|
-
);
|
|
29
|
-
|
|
30
|
-
const ToggleGroupContext = React.createContext<
|
|
31
|
-
VariantProps<typeof toggleGroupItemVariants>
|
|
32
|
-
>({
|
|
33
|
-
size: 'default',
|
|
34
|
-
variant: 'default',
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Set of two-state buttons built on Radix `ToggleGroup.Root`. Choose single- or
|
|
39
|
-
* multiple-selection with `type`, and share `variant`/`size` with every
|
|
40
|
-
* {@link ToggleGroupItem} via context.
|
|
41
|
-
*
|
|
42
|
-
* @example
|
|
43
|
-
* ```tsx
|
|
44
|
-
* <ToggleGroup type="single" variant="outline">
|
|
45
|
-
* <ToggleGroupItem value="left"><AlignLeft /></ToggleGroupItem>
|
|
46
|
-
* <ToggleGroupItem value="center"><AlignCenter /></ToggleGroupItem>
|
|
47
|
-
* </ToggleGroup>
|
|
48
|
-
* ```
|
|
49
|
-
*/
|
|
50
|
-
function ToggleGroup({
|
|
51
|
-
className,
|
|
52
|
-
variant,
|
|
53
|
-
size,
|
|
54
|
-
children,
|
|
55
|
-
...props
|
|
56
|
-
}: React.ComponentProps<typeof ToggleGroupPrimitive.Root> &
|
|
57
|
-
VariantProps<typeof toggleGroupItemVariants>) {
|
|
58
|
-
return (
|
|
59
|
-
<ToggleGroupPrimitive.Root
|
|
60
|
-
data-slot='toggle-group'
|
|
61
|
-
data-variant={variant}
|
|
62
|
-
data-size={size}
|
|
63
|
-
className={cn(
|
|
64
|
-
'group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs',
|
|
65
|
-
className
|
|
66
|
-
)}
|
|
67
|
-
{...props}
|
|
68
|
-
>
|
|
69
|
-
<ToggleGroupContext.Provider value={{ variant, size }}>
|
|
70
|
-
{children}
|
|
71
|
-
</ToggleGroupContext.Provider>
|
|
72
|
-
</ToggleGroupPrimitive.Root>
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
function ToggleGroupItem({
|
|
77
|
-
className,
|
|
78
|
-
children,
|
|
79
|
-
variant,
|
|
80
|
-
size,
|
|
81
|
-
...props
|
|
82
|
-
}: React.ComponentProps<typeof ToggleGroupPrimitive.Item> &
|
|
83
|
-
VariantProps<typeof toggleGroupItemVariants>) {
|
|
84
|
-
const context = React.useContext(ToggleGroupContext);
|
|
85
|
-
|
|
86
|
-
return (
|
|
87
|
-
<ToggleGroupPrimitive.Item
|
|
88
|
-
data-slot='toggle-group-item'
|
|
89
|
-
data-variant={context.variant || variant}
|
|
90
|
-
data-size={context.size || size}
|
|
91
|
-
className={cn(
|
|
92
|
-
toggleGroupItemVariants({
|
|
93
|
-
variant: context.variant || variant,
|
|
94
|
-
size: context.size || size,
|
|
95
|
-
}),
|
|
96
|
-
'min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l',
|
|
97
|
-
className
|
|
98
|
-
)}
|
|
99
|
-
{...props}
|
|
100
|
-
>
|
|
101
|
-
{children}
|
|
102
|
-
</ToggleGroupPrimitive.Item>
|
|
103
|
-
);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export { ToggleGroup, ToggleGroupItem };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { ComponentConfig } from '@foundrykit/types';
|
|
2
|
-
|
|
3
|
-
export const tooltipConfig: ComponentConfig = {
|
|
4
|
-
name: 'Tooltip',
|
|
5
|
-
description: 'Tooltip component for displaying content in a floating panel',
|
|
6
|
-
category: 'primitives',
|
|
7
|
-
tags: ['overlay', 'interactive', 'ui'],
|
|
8
|
-
preview: {
|
|
9
|
-
type: 'static',
|
|
10
|
-
html: '<div class="flex h-12 w-full items-center justify-center rounded-md bg-gray-200"><div class="relative"><div class="h-8 w-20 rounded border border-gray-400 bg-white flex items-center justify-center text-xs">Trigger</div><div class="absolute top-full left-0 mt-1 w-32 rounded border border-gray-300 bg-white shadow-lg p-2"><div class="text-xs">Tooltip content</div></div></div></div>',
|
|
11
|
-
},
|
|
12
|
-
variants: [],
|
|
13
|
-
dependencies: ['utils'],
|
|
14
|
-
packageDependencies: ['@radix-ui/react-tooltip'],
|
|
15
|
-
files: ['components/primitives/tooltip/index.tsx'],
|
|
16
|
-
};
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { cn } from '@foundrykit/utils';
|
|
4
|
-
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
5
|
-
import type * as React from 'react';
|
|
6
|
-
|
|
7
|
-
/** Radix `Tooltip.Provider` wrapper (default `delayDuration` 0); wrap the app to share tooltip timing. */
|
|
8
|
-
function TooltipProvider({
|
|
9
|
-
delayDuration = 0,
|
|
10
|
-
...props
|
|
11
|
-
}: React.ComponentProps<typeof TooltipPrimitive.Provider>) {
|
|
12
|
-
return (
|
|
13
|
-
<TooltipPrimitive.Provider
|
|
14
|
-
data-slot='tooltip-provider'
|
|
15
|
-
delayDuration={delayDuration}
|
|
16
|
-
{...props}
|
|
17
|
-
/>
|
|
18
|
-
);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Tooltip root built on Radix `Tooltip.Root`. Wraps itself in a
|
|
23
|
-
* {@link TooltipProvider} (default `delayDuration` 0), so it works standalone.
|
|
24
|
-
* Compose with {@link TooltipTrigger} and {@link TooltipContent} (portalled,
|
|
25
|
-
* animated, with an arrow).
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* ```tsx
|
|
29
|
-
* <Tooltip>
|
|
30
|
-
* <TooltipTrigger>Hover</TooltipTrigger>
|
|
31
|
-
* <TooltipContent>Details</TooltipContent>
|
|
32
|
-
* </Tooltip>
|
|
33
|
-
* ```
|
|
34
|
-
*/
|
|
35
|
-
function Tooltip({
|
|
36
|
-
...props
|
|
37
|
-
}: React.ComponentProps<typeof TooltipPrimitive.Root>) {
|
|
38
|
-
return (
|
|
39
|
-
<TooltipProvider>
|
|
40
|
-
<TooltipPrimitive.Root data-slot='tooltip' {...props} />
|
|
41
|
-
</TooltipProvider>
|
|
42
|
-
);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
function TooltipTrigger({
|
|
46
|
-
...props
|
|
47
|
-
}: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {
|
|
48
|
-
return <TooltipPrimitive.Trigger data-slot='tooltip-trigger' {...props} />;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
function TooltipContent({
|
|
52
|
-
className,
|
|
53
|
-
sideOffset = 0,
|
|
54
|
-
children,
|
|
55
|
-
...props
|
|
56
|
-
}: React.ComponentProps<typeof TooltipPrimitive.Content>) {
|
|
57
|
-
return (
|
|
58
|
-
<TooltipPrimitive.Portal>
|
|
59
|
-
<TooltipPrimitive.Content
|
|
60
|
-
data-slot='tooltip-content'
|
|
61
|
-
sideOffset={sideOffset}
|
|
62
|
-
className={cn(
|
|
63
|
-
'bg-primary text-primary-foreground animate-in fade-in-0 motion-safe:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 motion-safe:data-[state=closed]:zoom-out-95 motion-safe:data-[side=bottom]:slide-in-from-top-2 motion-safe:data-[side=left]:slide-in-from-right-2 motion-safe:data-[side=right]:slide-in-from-left-2 motion-safe:data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance',
|
|
64
|
-
className
|
|
65
|
-
)}
|
|
66
|
-
{...props}
|
|
67
|
-
>
|
|
68
|
-
{children}
|
|
69
|
-
<TooltipPrimitive.Arrow className='bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]' />
|
|
70
|
-
</TooltipPrimitive.Content>
|
|
71
|
-
</TooltipPrimitive.Portal>
|
|
72
|
-
);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { ComponentConfig } from '@foundrykit/types';
|
|
2
|
-
|
|
3
|
-
export const TypographyConfig: ComponentConfig = {
|
|
4
|
-
name: 'Typography',
|
|
5
|
-
description:
|
|
6
|
-
'Presentational text styles for headings, body copy and inline content.',
|
|
7
|
-
category: 'primitives',
|
|
8
|
-
tags: ['typography', 'text', 'content'],
|
|
9
|
-
preview: {
|
|
10
|
-
type: 'static',
|
|
11
|
-
html: '<div class="flex h-12 w-full items-center rounded-md border border-gray-300 bg-gray-100 px-3"><span class="text-sm text-gray-600">Typography</span></div>',
|
|
12
|
-
},
|
|
13
|
-
variants: [
|
|
14
|
-
{
|
|
15
|
-
name: 'Heading',
|
|
16
|
-
description: 'Level one heading',
|
|
17
|
-
code: '<TypographyH1>The quick brown fox</TypographyH1>',
|
|
18
|
-
preview: {
|
|
19
|
-
type: 'component',
|
|
20
|
-
component: 'TypographyH1',
|
|
21
|
-
props: {},
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
name: 'Paragraph',
|
|
26
|
-
description: 'Body paragraph',
|
|
27
|
-
code: '<TypographyP>The quick brown fox jumps over the lazy dog.</TypographyP>',
|
|
28
|
-
preview: {
|
|
29
|
-
type: 'component',
|
|
30
|
-
component: 'TypographyP',
|
|
31
|
-
props: {},
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
],
|
|
35
|
-
dependencies: ['utils'],
|
|
36
|
-
packageDependencies: [],
|
|
37
|
-
files: ['components/primitives/typography/index.tsx'],
|
|
38
|
-
};
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
import { cn } from '@foundrykit/utils';
|
|
2
|
-
import type * as React from 'react';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Presentational typography primitives that apply the design system's text
|
|
6
|
-
* styles to native elements. Each component accepts `className` and `children`
|
|
7
|
-
* and renders a semantic tag (heading, paragraph, list, etc.).
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* ```tsx
|
|
11
|
-
* <TypographyH1>Heading</TypographyH1>
|
|
12
|
-
* <TypographyP>Body copy goes here.</TypographyP>
|
|
13
|
-
* ```
|
|
14
|
-
*/
|
|
15
|
-
function TypographyH1({ className, ...props }: React.ComponentProps<'h1'>) {
|
|
16
|
-
return (
|
|
17
|
-
<h1
|
|
18
|
-
data-slot='typography-h1'
|
|
19
|
-
className={cn(
|
|
20
|
-
'scroll-m-20 text-4xl font-extrabold tracking-tight text-balance',
|
|
21
|
-
className
|
|
22
|
-
)}
|
|
23
|
-
{...props}
|
|
24
|
-
/>
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
function TypographyH2({ className, ...props }: React.ComponentProps<'h2'>) {
|
|
29
|
-
return (
|
|
30
|
-
<h2
|
|
31
|
-
data-slot='typography-h2'
|
|
32
|
-
className={cn(
|
|
33
|
-
'scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight first:mt-0',
|
|
34
|
-
className
|
|
35
|
-
)}
|
|
36
|
-
{...props}
|
|
37
|
-
/>
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function TypographyH3({ className, ...props }: React.ComponentProps<'h3'>) {
|
|
42
|
-
return (
|
|
43
|
-
<h3
|
|
44
|
-
data-slot='typography-h3'
|
|
45
|
-
className={cn(
|
|
46
|
-
'scroll-m-20 text-2xl font-semibold tracking-tight',
|
|
47
|
-
className
|
|
48
|
-
)}
|
|
49
|
-
{...props}
|
|
50
|
-
/>
|
|
51
|
-
);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function TypographyH4({ className, ...props }: React.ComponentProps<'h4'>) {
|
|
55
|
-
return (
|
|
56
|
-
<h4
|
|
57
|
-
data-slot='typography-h4'
|
|
58
|
-
className={cn(
|
|
59
|
-
'scroll-m-20 text-xl font-semibold tracking-tight',
|
|
60
|
-
className
|
|
61
|
-
)}
|
|
62
|
-
{...props}
|
|
63
|
-
/>
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
function TypographyP({ className, ...props }: React.ComponentProps<'p'>) {
|
|
68
|
-
return (
|
|
69
|
-
<p
|
|
70
|
-
data-slot='typography-p'
|
|
71
|
-
className={cn('leading-7 [&:not(:first-child)]:mt-6', className)}
|
|
72
|
-
{...props}
|
|
73
|
-
/>
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
function TypographyBlockquote({
|
|
78
|
-
className,
|
|
79
|
-
...props
|
|
80
|
-
}: React.ComponentProps<'blockquote'>) {
|
|
81
|
-
return (
|
|
82
|
-
<blockquote
|
|
83
|
-
data-slot='typography-blockquote'
|
|
84
|
-
className={cn('mt-6 border-l-2 pl-6 italic', className)}
|
|
85
|
-
{...props}
|
|
86
|
-
/>
|
|
87
|
-
);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
function TypographyList({ className, ...props }: React.ComponentProps<'ul'>) {
|
|
91
|
-
return (
|
|
92
|
-
<ul
|
|
93
|
-
data-slot='typography-list'
|
|
94
|
-
className={cn('my-6 ml-6 list-disc [&>li]:mt-2', className)}
|
|
95
|
-
{...props}
|
|
96
|
-
/>
|
|
97
|
-
);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
function TypographyInlineCode({
|
|
101
|
-
className,
|
|
102
|
-
...props
|
|
103
|
-
}: React.ComponentProps<'code'>) {
|
|
104
|
-
return (
|
|
105
|
-
<code
|
|
106
|
-
data-slot='typography-inline-code'
|
|
107
|
-
className={cn(
|
|
108
|
-
'bg-muted relative rounded px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold',
|
|
109
|
-
className
|
|
110
|
-
)}
|
|
111
|
-
{...props}
|
|
112
|
-
/>
|
|
113
|
-
);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
function TypographyLead({ className, ...props }: React.ComponentProps<'p'>) {
|
|
117
|
-
return (
|
|
118
|
-
<p
|
|
119
|
-
data-slot='typography-lead'
|
|
120
|
-
className={cn('text-muted-foreground text-xl', className)}
|
|
121
|
-
{...props}
|
|
122
|
-
/>
|
|
123
|
-
);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
function TypographyLarge({ className, ...props }: React.ComponentProps<'div'>) {
|
|
127
|
-
return (
|
|
128
|
-
<div
|
|
129
|
-
data-slot='typography-large'
|
|
130
|
-
className={cn('text-lg font-semibold', className)}
|
|
131
|
-
{...props}
|
|
132
|
-
/>
|
|
133
|
-
);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
function TypographySmall({
|
|
137
|
-
className,
|
|
138
|
-
...props
|
|
139
|
-
}: React.ComponentProps<'small'>) {
|
|
140
|
-
return (
|
|
141
|
-
<small
|
|
142
|
-
data-slot='typography-small'
|
|
143
|
-
className={cn('text-sm leading-none font-medium', className)}
|
|
144
|
-
{...props}
|
|
145
|
-
/>
|
|
146
|
-
);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
function TypographyMuted({ className, ...props }: React.ComponentProps<'p'>) {
|
|
150
|
-
return (
|
|
151
|
-
<p
|
|
152
|
-
data-slot='typography-muted'
|
|
153
|
-
className={cn('text-muted-foreground text-sm', className)}
|
|
154
|
-
{...props}
|
|
155
|
-
/>
|
|
156
|
-
);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
export {
|
|
160
|
-
TypographyBlockquote,
|
|
161
|
-
TypographyH1,
|
|
162
|
-
TypographyH2,
|
|
163
|
-
TypographyH3,
|
|
164
|
-
TypographyH4,
|
|
165
|
-
TypographyInlineCode,
|
|
166
|
-
TypographyLarge,
|
|
167
|
-
TypographyLead,
|
|
168
|
-
TypographyList,
|
|
169
|
-
TypographyMuted,
|
|
170
|
-
TypographyP,
|
|
171
|
-
TypographySmall,
|
|
172
|
-
};
|