@foundrykit/primitives 2.0.6 → 2.0.7
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/.turbo/turbo-build.log +233 -108
- package/.turbo/turbo-type-check.log +1 -1
- package/CHANGELOG.md +10 -0
- package/README.md +39 -136
- package/dist/chunk-25N35Z5M.js +42 -0
- package/dist/chunk-2JOT4DV4.js +66 -0
- package/dist/chunk-2PXD7LAX.js +172 -0
- package/dist/{chunk-VSXKLSEP.js → chunk-3BAO7TAS.js} +2 -2
- package/dist/chunk-3MEIDBWZ.js +225 -0
- package/dist/{chunk-A3U73FA7.js → chunk-3UKWAM5M.js} +2 -2
- package/dist/chunk-44I6VK3H.js +105 -0
- package/dist/chunk-46UI3AUE.js +62 -0
- package/dist/{chunk-AADRFFPH.js → chunk-5OSYIETI.js} +4 -4
- package/dist/chunk-67UXTT4O.js +116 -0
- package/dist/{chunk-J57CV3VT.js → chunk-6DRII3XC.js} +2 -2
- package/dist/chunk-727ACUWN.js +82 -0
- package/dist/chunk-76APYFRN.js +29 -0
- package/dist/chunk-AJAAMJYH.js +12 -0
- package/dist/chunk-BIFBYERK.js +69 -0
- package/dist/{chunk-PHMEWMFS.js → chunk-D4X2ZO5T.js} +7 -7
- package/dist/{chunk-UZIMC7AQ.js → chunk-DFGLEAZI.js} +2 -2
- package/dist/chunk-DKBMAFIR.js +65 -0
- package/dist/{chunk-U2EIVYWP.js → chunk-DXZ4GUQO.js} +2 -2
- package/dist/chunk-ED6T7ZZN.js +130 -0
- package/dist/{chunk-J4CRGO2P.js → chunk-EDKSYP4L.js} +2 -2
- package/dist/chunk-EEAK2RWF.js +23 -0
- package/dist/{chunk-FYCANIVJ.js → chunk-FF5D53KL.js} +2 -2
- package/dist/chunk-FIRYLO5W.js +253 -0
- package/dist/chunk-GPEL656S.js +84 -0
- package/dist/chunk-JKKCRFYB.js +36 -0
- package/dist/chunk-JTSIBZS4.js +194 -0
- package/dist/{chunk-QL4XJD7Y.js → chunk-MCXSVXO4.js} +2 -2
- package/dist/chunk-MMZJQ7RW.js +33 -0
- package/dist/{chunk-4GPFVBO2.js → chunk-MYIUX3DT.js} +3 -3
- package/dist/chunk-PAO3DSEF.js +48 -0
- package/dist/chunk-PLLG76QJ.js +32 -0
- package/dist/chunk-R3IEOV2B.js +155 -0
- package/dist/{chunk-KZMSLRLW.js → chunk-RDQF3IQE.js} +2 -2
- package/dist/{chunk-XQAJQKO7.js → chunk-SUEPE6OX.js} +3 -3
- package/dist/chunk-TA23RNS4.js +162 -0
- package/dist/chunk-TRXU4SOJ.js +224 -0
- package/dist/chunk-VA4MKQN7.js +40 -0
- package/dist/chunk-VPBVKBZ7.js +25 -0
- package/dist/{chunk-I44GXEPN.js → chunk-XVIHRZGJ.js} +1 -1
- package/dist/chunk-YT2ZIMZI.js +16 -0
- package/dist/components/accordion/index.cjs +104 -0
- package/dist/components/accordion/index.d.cts +25 -0
- package/dist/components/accordion/index.d.ts +25 -0
- package/dist/components/accordion/index.js +13 -0
- package/dist/components/alert/index.cjs +96 -0
- package/dist/components/alert/index.d.cts +28 -0
- package/dist/components/alert/index.d.ts +28 -0
- package/dist/components/alert/index.js +12 -0
- package/dist/components/alert-dialog/index.cjs +200 -0
- package/dist/components/alert-dialog/index.d.cts +42 -0
- package/dist/components/alert-dialog/index.d.ts +42 -0
- package/dist/components/alert-dialog/index.js +27 -0
- package/dist/components/aspect-ratio/index.cjs +47 -0
- package/dist/components/aspect-ratio/index.d.cts +19 -0
- package/dist/components/aspect-ratio/index.d.ts +19 -0
- package/dist/components/aspect-ratio/index.js +7 -0
- package/dist/components/avatar/index.cjs +1 -1
- package/dist/components/avatar/index.d.cts +16 -1
- package/dist/components/avatar/index.d.ts +16 -1
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/badge/index.cjs +5 -5
- package/dist/components/badge/index.d.cts +13 -2
- package/dist/components/badge/index.d.ts +13 -2
- package/dist/components/badge/index.js +1 -1
- package/dist/components/breadcrumb/index.cjs +2 -2
- package/dist/components/breadcrumb/index.d.cts +19 -0
- package/dist/components/breadcrumb/index.d.ts +19 -0
- package/dist/components/breadcrumb/index.js +1 -1
- package/dist/components/button/index.cjs +18 -8
- package/dist/components/button/index.d.cts +15 -2
- package/dist/components/button/index.d.ts +15 -2
- package/dist/components/button/index.js +1 -1
- package/dist/components/button-group/index.cjs +142 -0
- package/dist/components/button-group/index.d.cts +33 -0
- package/dist/components/button-group/index.d.ts +33 -0
- package/dist/components/button-group/index.js +13 -0
- package/dist/components/card/index.cjs +2 -2
- package/dist/components/card/index.d.cts +16 -0
- package/dist/components/card/index.d.ts +16 -0
- package/dist/components/card/index.js +1 -1
- package/dist/components/checkbox/index.cjs +2 -2
- package/dist/components/checkbox/index.d.cts +11 -1
- package/dist/components/checkbox/index.d.ts +11 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/collapsible/index.cjs +73 -0
- package/dist/components/collapsible/index.d.cts +22 -0
- package/dist/components/collapsible/index.d.ts +22 -0
- package/dist/components/collapsible/index.js +11 -0
- package/dist/components/context-menu/index.cjs +274 -0
- package/dist/components/context-menu/index.d.cts +48 -0
- package/dist/components/context-menu/index.d.ts +48 -0
- package/dist/components/context-menu/index.js +35 -0
- package/dist/components/direction/index.cjs +39 -0
- package/dist/components/direction/index.d.cts +20 -0
- package/dist/components/direction/index.d.ts +20 -0
- package/dist/components/direction/index.js +9 -0
- package/dist/components/drawer/index.cjs +164 -0
- package/dist/components/drawer/index.d.cts +35 -0
- package/dist/components/drawer/index.d.ts +35 -0
- package/dist/components/drawer/index.js +25 -0
- package/dist/components/dropdown/index.cjs +7 -7
- package/dist/components/dropdown/index.d.cts +25 -1
- package/dist/components/dropdown/index.d.ts +25 -1
- package/dist/components/dropdown/index.js +1 -1
- package/dist/components/empty/index.cjs +135 -0
- package/dist/components/empty/index.d.cts +38 -0
- package/dist/components/empty/index.d.ts +38 -0
- package/dist/components/empty/index.js +18 -0
- package/dist/components/field/index.cjs +269 -0
- package/dist/components/field/index.d.cts +42 -0
- package/dist/components/field/index.d.ts +42 -0
- package/dist/components/field/index.js +27 -0
- package/dist/components/hover-card/index.cjs +77 -0
- package/dist/components/hover-card/index.d.cts +22 -0
- package/dist/components/hover-card/index.d.ts +22 -0
- package/dist/components/hover-card/index.js +11 -0
- package/dist/components/input/index.cjs +2 -2
- package/dist/components/input/index.d.cts +11 -2
- package/dist/components/input/index.d.ts +11 -2
- package/dist/components/input/index.js +1 -1
- package/dist/components/item/index.cjs +262 -0
- package/dist/components/item/index.d.cts +47 -0
- package/dist/components/item/index.d.ts +47 -0
- package/dist/components/item/index.js +29 -0
- package/dist/components/kbd/index.cjs +57 -0
- package/dist/components/kbd/index.d.cts +19 -0
- package/dist/components/kbd/index.d.ts +19 -0
- package/dist/components/kbd/index.js +8 -0
- package/dist/components/label/index.cjs +2 -2
- package/dist/components/label/index.d.cts +10 -1
- package/dist/components/label/index.d.ts +10 -1
- package/dist/components/label/index.js +1 -1
- package/dist/components/menubar/index.cjs +303 -0
- package/dist/components/menubar/index.d.cts +49 -0
- package/dist/components/menubar/index.d.ts +49 -0
- package/dist/components/menubar/index.js +37 -0
- package/dist/components/native-select/index.cjs +53 -0
- package/dist/components/native-select/index.d.cts +19 -0
- package/dist/components/native-select/index.d.ts +19 -0
- package/dist/components/native-select/index.js +6 -0
- package/dist/components/navigation-menu/index.cjs +215 -0
- package/dist/components/navigation-menu/index.d.cts +37 -0
- package/dist/components/navigation-menu/index.d.ts +37 -0
- package/dist/components/navigation-menu/index.js +23 -0
- package/dist/components/popover/index.cjs +2 -2
- package/dist/components/popover/index.d.cts +14 -1
- package/dist/components/popover/index.d.ts +14 -1
- package/dist/components/popover/index.js +1 -1
- package/dist/components/progress/index.cjs +68 -0
- package/dist/components/progress/index.d.cts +16 -0
- package/dist/components/progress/index.d.ts +16 -0
- package/dist/components/progress/index.js +7 -0
- package/dist/components/radio-group/index.cjs +3 -3
- package/dist/components/radio-group/index.d.cts +15 -1
- package/dist/components/radio-group/index.d.ts +15 -1
- package/dist/components/radio-group/index.js +1 -1
- package/dist/components/resizable/index.cjs +75 -0
- package/dist/components/resizable/index.d.cts +25 -0
- package/dist/components/resizable/index.d.ts +25 -0
- package/dist/components/resizable/index.js +11 -0
- package/dist/components/scroll-area/index.cjs +3 -3
- package/dist/components/scroll-area/index.d.cts +14 -1
- package/dist/components/scroll-area/index.d.ts +14 -1
- package/dist/components/scroll-area/index.js +1 -1
- package/dist/components/select/index.cjs +4 -4
- package/dist/components/select/index.d.cts +19 -1
- package/dist/components/select/index.d.ts +19 -1
- package/dist/components/select/index.js +1 -1
- package/dist/components/separator/index.cjs +2 -2
- package/dist/components/separator/index.d.cts +12 -1
- package/dist/components/separator/index.d.ts +12 -1
- package/dist/components/separator/index.js +1 -1
- package/dist/components/skeleton/index.d.cts +9 -0
- package/dist/components/skeleton/index.d.ts +9 -0
- package/dist/components/slider/index.cjs +100 -0
- package/dist/components/slider/index.d.cts +18 -0
- package/dist/components/slider/index.d.ts +18 -0
- package/dist/components/slider/index.js +7 -0
- package/dist/components/sonner/index.cjs +51 -0
- package/dist/components/sonner/index.d.cts +18 -0
- package/dist/components/sonner/index.d.ts +18 -0
- package/dist/components/sonner/index.js +9 -0
- package/dist/components/spinner/index.cjs +47 -0
- package/dist/components/spinner/index.d.cts +17 -0
- package/dist/components/spinner/index.d.ts +17 -0
- package/dist/components/spinner/index.js +6 -0
- package/dist/components/switch/index.cjs +2 -2
- package/dist/components/switch/index.d.cts +11 -1
- package/dist/components/switch/index.d.ts +11 -1
- package/dist/components/switch/index.js +1 -1
- package/dist/components/table/index.cjs +147 -0
- package/dist/components/table/index.d.cts +35 -0
- package/dist/components/table/index.d.ts +35 -0
- package/dist/components/table/index.js +20 -0
- package/dist/components/tabs/index.cjs +2 -2
- package/dist/components/tabs/index.d.cts +18 -1
- package/dist/components/tabs/index.d.ts +18 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/textarea/index.cjs +1 -1
- package/dist/components/textarea/index.d.cts +9 -0
- package/dist/components/textarea/index.d.ts +9 -0
- package/dist/components/textarea/index.js +1 -1
- package/dist/components/toggle-group/index.cjs +120 -0
- package/dist/components/toggle-group/index.d.cts +27 -0
- package/dist/components/toggle-group/index.d.ts +27 -0
- package/dist/components/toggle-group/index.js +9 -0
- package/dist/components/typography/index.cjs +197 -0
- package/dist/components/typography/index.d.cts +28 -0
- package/dist/components/typography/index.d.ts +28 -0
- package/dist/components/typography/index.js +28 -0
- package/dist/index.cjs +3272 -781
- package/dist/index.d.cts +128 -24
- package/dist/index.d.ts +128 -24
- package/dist/index.js +485 -144
- package/package.json +25 -8
- package/postcss.config.mjs +1 -1
- package/registry.json +18 -5
- package/src/components/accordion/config.ts +28 -0
- package/src/components/accordion/index.tsx +80 -0
- package/src/components/alert/config.ts +40 -0
- package/src/components/alert/index.tsx +80 -0
- package/src/components/alert-dialog/config.ts +28 -0
- package/src/components/alert-dialog/index.tsx +188 -0
- package/src/components/aspect-ratio/config.ts +27 -0
- package/src/components/aspect-ratio/index.tsx +24 -0
- package/src/components/avatar/config.ts +1 -1
- package/src/components/avatar/index.tsx +18 -4
- package/src/components/badge/config.ts +1 -1
- package/src/components/badge/index.tsx +17 -7
- package/src/components/breadcrumb/config.ts +1 -1
- package/src/components/breadcrumb/index.tsx +24 -6
- package/src/components/button/config.ts +21 -1
- package/src/components/button/index.tsx +33 -9
- package/src/components/button-group/config.ts +39 -0
- package/src/components/button-group/index.tsx +99 -0
- package/src/components/card/config.ts +1 -1
- package/src/components/card/index.tsx +21 -6
- package/src/components/checkbox/config.ts +1 -1
- package/src/components/checkbox/index.tsx +13 -4
- package/src/components/collapsible/config.ts +27 -0
- package/src/components/collapsible/index.tsx +47 -0
- package/src/components/context-menu/config.ts +28 -0
- package/src/components/context-menu/index.tsx +271 -0
- package/src/components/dialog/config.ts +1 -1
- package/src/components/dialog/index.tsx +25 -6
- package/src/components/direction/config.ts +28 -0
- package/src/components/direction/index.tsx +27 -0
- package/src/components/drawer/config.ts +28 -0
- package/src/components/drawer/index.tsx +153 -0
- package/src/components/dropdown/config.ts +1 -1
- package/src/components/dropdown/index.tsx +37 -14
- package/src/components/empty/config.ts +38 -0
- package/src/components/empty/index.tsx +127 -0
- package/src/components/field/config.ts +40 -0
- package/src/components/field/index.tsx +252 -0
- package/src/components/hover-card/config.ts +27 -0
- package/src/components/hover-card/index.tsx +56 -0
- package/src/components/input/config.ts +1 -1
- package/src/components/input/index.tsx +13 -5
- package/src/components/input-group/index.tsx +33 -12
- package/src/components/item/config.ts +52 -0
- package/src/components/item/index.tsx +215 -0
- package/src/components/kbd/config.ts +38 -0
- package/src/components/kbd/index.tsx +40 -0
- package/src/components/label/config.ts +1 -1
- package/src/components/label/index.tsx +12 -4
- package/src/components/menubar/config.ts +28 -0
- package/src/components/menubar/index.tsx +295 -0
- package/src/components/native-select/config.ts +40 -0
- package/src/components/native-select/index.tsx +40 -0
- package/src/components/navigation-menu/config.ts +32 -0
- package/src/components/navigation-menu/index.tsx +188 -0
- package/src/components/popover/config.ts +1 -1
- package/src/components/popover/index.tsx +17 -5
- package/src/components/progress/config.ts +42 -0
- package/src/components/progress/index.tsx +39 -0
- package/src/components/radio-group/config.ts +1 -1
- package/src/components/radio-group/index.tsx +18 -5
- package/src/components/resizable/config.ts +28 -0
- package/src/components/resizable/index.tsx +67 -0
- package/src/components/scroll-area/index.tsx +17 -5
- package/src/components/select/config.ts +1 -1
- package/src/components/select/index.tsx +23 -6
- package/src/components/separator/config.ts +1 -1
- package/src/components/separator/index.tsx +14 -4
- package/src/components/sheet/index.tsx +21 -7
- package/src/components/skeleton/config.ts +1 -1
- package/src/components/skeleton/index.tsx +9 -0
- package/src/components/slider/config.ts +46 -0
- package/src/components/slider/index.tsx +73 -0
- package/src/components/sonner/config.ts +27 -0
- package/src/components/sonner/index.tsx +37 -0
- package/src/components/spinner/config.ts +40 -0
- package/src/components/spinner/index.tsx +30 -0
- package/src/components/switch/config.ts +1 -1
- package/src/components/switch/index.tsx +13 -4
- package/src/components/table/config.ts +38 -0
- package/src/components/table/index.tsx +135 -0
- package/src/components/tabs/config.ts +1 -1
- package/src/components/tabs/index.tsx +21 -5
- package/src/components/textarea/config.ts +1 -1
- package/src/components/textarea/index.tsx +11 -3
- package/src/components/toggle/index.tsx +20 -8
- package/src/components/toggle-group/config.ts +46 -0
- package/src/components/toggle-group/index.tsx +106 -0
- package/src/components/tooltip/index.tsx +19 -5
- package/src/components/typography/config.ts +38 -0
- package/src/components/typography/index.tsx +172 -0
- package/src/index.ts +239 -53
- package/tsup.config.ts +25 -0
- package/dist/chunk-FUWID6MC.js +0 -42
- package/dist/chunk-YTUI6MCB.js +0 -52
- package/eslint.config.js +0 -4
- package/dist/{chunk-VVNIYCKH.js → chunk-3TZXV53R.js} +1 -1
|
@@ -0,0 +1,172 @@
|
|
|
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
|
+
};
|
package/src/index.ts
CHANGED
|
@@ -1,49 +1,224 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export {
|
|
5
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
// Export utilities from utils package
|
|
4
|
+
export { cn } from '@foundrykit/utils';
|
|
5
|
+
// --- Added components ---
|
|
6
6
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
Accordion,
|
|
8
|
+
AccordionContent,
|
|
9
|
+
AccordionItem,
|
|
10
|
+
AccordionTrigger,
|
|
11
|
+
} from './components/accordion/index.js';
|
|
12
|
+
export {
|
|
13
|
+
Alert,
|
|
14
|
+
AlertDescription,
|
|
15
|
+
AlertTitle,
|
|
16
|
+
alertVariants,
|
|
17
|
+
} from './components/alert/index.js';
|
|
18
|
+
export {
|
|
19
|
+
AlertDialog,
|
|
20
|
+
AlertDialogAction,
|
|
21
|
+
AlertDialogCancel,
|
|
22
|
+
AlertDialogContent,
|
|
23
|
+
AlertDialogDescription,
|
|
24
|
+
AlertDialogFooter,
|
|
25
|
+
AlertDialogHeader,
|
|
26
|
+
AlertDialogOverlay,
|
|
27
|
+
AlertDialogPortal,
|
|
28
|
+
AlertDialogTitle,
|
|
29
|
+
AlertDialogTrigger,
|
|
30
|
+
} from './components/alert-dialog/index.js';
|
|
31
|
+
export { AspectRatio } from './components/aspect-ratio/index.js';
|
|
14
32
|
export {
|
|
15
33
|
Avatar,
|
|
16
|
-
AvatarImage,
|
|
17
34
|
AvatarFallback,
|
|
35
|
+
AvatarImage,
|
|
18
36
|
} from './components/avatar/index.js';
|
|
37
|
+
export { Badge, badgeVariants } from './components/badge/index.js';
|
|
19
38
|
export {
|
|
20
39
|
Breadcrumb,
|
|
21
|
-
|
|
40
|
+
BreadcrumbEllipsis,
|
|
22
41
|
BreadcrumbItem,
|
|
23
42
|
BreadcrumbLink,
|
|
43
|
+
BreadcrumbList,
|
|
24
44
|
BreadcrumbPage,
|
|
25
45
|
BreadcrumbSeparator,
|
|
26
|
-
BreadcrumbEllipsis,
|
|
27
46
|
} from './components/breadcrumb/index.js';
|
|
47
|
+
// The barrel bundles many client components into one module, so the whole
|
|
48
|
+
// entry is marked client. Consumers that need server-renderable primitives
|
|
49
|
+
// (Card, Badge, Separator, Skeleton, Label) can import them via their granular
|
|
50
|
+
// subpath export (e.g. `@foundrykit/primitives/components/card`), which keeps
|
|
51
|
+
// each component's own directive.
|
|
52
|
+
// Export all primitives
|
|
53
|
+
export { Button, buttonVariants } from './components/button/index.js';
|
|
54
|
+
export {
|
|
55
|
+
ButtonGroup,
|
|
56
|
+
ButtonGroupSeparator,
|
|
57
|
+
ButtonGroupText,
|
|
58
|
+
buttonGroupVariants,
|
|
59
|
+
} from './components/button-group/index.js';
|
|
60
|
+
export {
|
|
61
|
+
Card,
|
|
62
|
+
CardContent,
|
|
63
|
+
CardDescription,
|
|
64
|
+
CardFooter,
|
|
65
|
+
CardHeader,
|
|
66
|
+
CardTitle,
|
|
67
|
+
} from './components/card/index.js';
|
|
28
68
|
export { Checkbox } from './components/checkbox/index.js';
|
|
69
|
+
export {
|
|
70
|
+
Collapsible,
|
|
71
|
+
CollapsibleContent,
|
|
72
|
+
CollapsibleTrigger,
|
|
73
|
+
} from './components/collapsible/index.js';
|
|
74
|
+
export {
|
|
75
|
+
ContextMenu,
|
|
76
|
+
ContextMenuCheckboxItem,
|
|
77
|
+
ContextMenuContent,
|
|
78
|
+
ContextMenuGroup,
|
|
79
|
+
ContextMenuItem,
|
|
80
|
+
ContextMenuLabel,
|
|
81
|
+
ContextMenuPortal,
|
|
82
|
+
ContextMenuRadioGroup,
|
|
83
|
+
ContextMenuRadioItem,
|
|
84
|
+
ContextMenuSeparator,
|
|
85
|
+
ContextMenuShortcut,
|
|
86
|
+
ContextMenuSub,
|
|
87
|
+
ContextMenuSubContent,
|
|
88
|
+
ContextMenuSubTrigger,
|
|
89
|
+
ContextMenuTrigger,
|
|
90
|
+
} from './components/context-menu/index.js';
|
|
91
|
+
export {
|
|
92
|
+
Dialog,
|
|
93
|
+
DialogClose,
|
|
94
|
+
DialogContent,
|
|
95
|
+
DialogDescription,
|
|
96
|
+
DialogFooter,
|
|
97
|
+
DialogHeader,
|
|
98
|
+
DialogTitle,
|
|
99
|
+
DialogTrigger,
|
|
100
|
+
} from './components/dialog/index.js';
|
|
101
|
+
export {
|
|
102
|
+
DirectionProvider,
|
|
103
|
+
useDirection,
|
|
104
|
+
} from './components/direction/index.js';
|
|
105
|
+
export {
|
|
106
|
+
Drawer,
|
|
107
|
+
DrawerClose,
|
|
108
|
+
DrawerContent,
|
|
109
|
+
DrawerDescription,
|
|
110
|
+
DrawerFooter,
|
|
111
|
+
DrawerHeader,
|
|
112
|
+
DrawerOverlay,
|
|
113
|
+
DrawerPortal,
|
|
114
|
+
DrawerTitle,
|
|
115
|
+
DrawerTrigger,
|
|
116
|
+
} from './components/drawer/index.js';
|
|
29
117
|
export {
|
|
30
118
|
DropdownMenu,
|
|
31
|
-
|
|
32
|
-
DropdownMenuTrigger,
|
|
119
|
+
DropdownMenuCheckboxItem,
|
|
33
120
|
DropdownMenuContent,
|
|
34
121
|
DropdownMenuGroup,
|
|
35
|
-
DropdownMenuLabel,
|
|
36
122
|
DropdownMenuItem,
|
|
37
|
-
|
|
123
|
+
DropdownMenuLabel,
|
|
124
|
+
DropdownMenuPortal,
|
|
38
125
|
DropdownMenuRadioGroup,
|
|
39
126
|
DropdownMenuRadioItem,
|
|
40
127
|
DropdownMenuSeparator,
|
|
41
128
|
DropdownMenuShortcut,
|
|
42
129
|
DropdownMenuSub,
|
|
43
|
-
DropdownMenuSubTrigger,
|
|
44
130
|
DropdownMenuSubContent,
|
|
131
|
+
DropdownMenuSubTrigger,
|
|
132
|
+
DropdownMenuTrigger,
|
|
45
133
|
} from './components/dropdown/index.js';
|
|
134
|
+
export {
|
|
135
|
+
Empty,
|
|
136
|
+
EmptyContent,
|
|
137
|
+
EmptyDescription,
|
|
138
|
+
EmptyHeader,
|
|
139
|
+
EmptyMedia,
|
|
140
|
+
EmptyTitle,
|
|
141
|
+
emptyMediaVariants,
|
|
142
|
+
} from './components/empty/index.js';
|
|
143
|
+
export {
|
|
144
|
+
Field,
|
|
145
|
+
FieldContent,
|
|
146
|
+
FieldDescription,
|
|
147
|
+
FieldError,
|
|
148
|
+
FieldGroup,
|
|
149
|
+
FieldLabel,
|
|
150
|
+
FieldLegend,
|
|
151
|
+
FieldSeparator,
|
|
152
|
+
FieldSet,
|
|
153
|
+
FieldTitle,
|
|
154
|
+
fieldVariants,
|
|
155
|
+
} from './components/field/index.js';
|
|
156
|
+
export {
|
|
157
|
+
HoverCard,
|
|
158
|
+
HoverCardContent,
|
|
159
|
+
HoverCardTrigger,
|
|
160
|
+
} from './components/hover-card/index.js';
|
|
161
|
+
export { Input } from './components/input/index.js';
|
|
162
|
+
export {
|
|
163
|
+
Item,
|
|
164
|
+
ItemActions,
|
|
165
|
+
ItemContent,
|
|
166
|
+
ItemDescription,
|
|
167
|
+
ItemFooter,
|
|
168
|
+
ItemGroup,
|
|
169
|
+
ItemHeader,
|
|
170
|
+
ItemMedia,
|
|
171
|
+
ItemSeparator,
|
|
172
|
+
ItemTitle,
|
|
173
|
+
itemMediaVariants,
|
|
174
|
+
itemVariants,
|
|
175
|
+
} from './components/item/index.js';
|
|
176
|
+
export { Kbd, KbdGroup } from './components/kbd/index.js';
|
|
46
177
|
export { Label } from './components/label/index.js';
|
|
178
|
+
export {
|
|
179
|
+
Menubar,
|
|
180
|
+
MenubarCheckboxItem,
|
|
181
|
+
MenubarContent,
|
|
182
|
+
MenubarGroup,
|
|
183
|
+
MenubarItem,
|
|
184
|
+
MenubarLabel,
|
|
185
|
+
MenubarMenu,
|
|
186
|
+
MenubarPortal,
|
|
187
|
+
MenubarRadioGroup,
|
|
188
|
+
MenubarRadioItem,
|
|
189
|
+
MenubarSeparator,
|
|
190
|
+
MenubarShortcut,
|
|
191
|
+
MenubarSub,
|
|
192
|
+
MenubarSubContent,
|
|
193
|
+
MenubarSubTrigger,
|
|
194
|
+
MenubarTrigger,
|
|
195
|
+
} from './components/menubar/index.js';
|
|
196
|
+
export { NativeSelect } from './components/native-select/index.js';
|
|
197
|
+
export {
|
|
198
|
+
NavigationMenu,
|
|
199
|
+
NavigationMenuContent,
|
|
200
|
+
NavigationMenuIndicator,
|
|
201
|
+
NavigationMenuItem,
|
|
202
|
+
NavigationMenuLink,
|
|
203
|
+
NavigationMenuList,
|
|
204
|
+
NavigationMenuTrigger,
|
|
205
|
+
NavigationMenuViewport,
|
|
206
|
+
navigationMenuTriggerStyle,
|
|
207
|
+
} from './components/navigation-menu/index.js';
|
|
208
|
+
export {
|
|
209
|
+
Popover,
|
|
210
|
+
PopoverAnchor,
|
|
211
|
+
PopoverContent,
|
|
212
|
+
PopoverTrigger,
|
|
213
|
+
} from './components/popover/index.js';
|
|
214
|
+
export { Progress } from './components/progress/index.js';
|
|
215
|
+
export { RadioGroup, RadioGroupItem } from './components/radio-group/index.js';
|
|
216
|
+
export {
|
|
217
|
+
ResizableHandle,
|
|
218
|
+
ResizablePanel,
|
|
219
|
+
ResizablePanelGroup,
|
|
220
|
+
} from './components/resizable/index.js';
|
|
221
|
+
export { ScrollArea, ScrollBar } from './components/scroll-area/index.js';
|
|
47
222
|
export {
|
|
48
223
|
Select,
|
|
49
224
|
SelectContent,
|
|
@@ -56,50 +231,61 @@ export {
|
|
|
56
231
|
SelectTrigger,
|
|
57
232
|
SelectValue,
|
|
58
233
|
} from './components/select/index.js';
|
|
59
|
-
export { RadioGroup, RadioGroupItem } from './components/radio-group/index.js';
|
|
60
234
|
export { Separator } from './components/separator/index.js';
|
|
235
|
+
export {
|
|
236
|
+
Sheet,
|
|
237
|
+
SheetClose,
|
|
238
|
+
SheetContent,
|
|
239
|
+
SheetDescription,
|
|
240
|
+
SheetFooter,
|
|
241
|
+
SheetHeader,
|
|
242
|
+
SheetTitle,
|
|
243
|
+
SheetTrigger,
|
|
244
|
+
} from './components/sheet/index.js';
|
|
245
|
+
export { Skeleton } from './components/skeleton/index.js';
|
|
246
|
+
export { Slider } from './components/slider/index.js';
|
|
247
|
+
export { Toaster, toast } from './components/sonner/index.js';
|
|
248
|
+
export { Spinner } from './components/spinner/index.js';
|
|
61
249
|
export { Switch } from './components/switch/index.js';
|
|
250
|
+
export {
|
|
251
|
+
Table,
|
|
252
|
+
TableBody,
|
|
253
|
+
TableCaption,
|
|
254
|
+
TableCell,
|
|
255
|
+
TableFooter,
|
|
256
|
+
TableHead,
|
|
257
|
+
TableHeader,
|
|
258
|
+
TableRow,
|
|
259
|
+
} from './components/table/index.js';
|
|
62
260
|
export {
|
|
63
261
|
Tabs,
|
|
262
|
+
TabsContent,
|
|
64
263
|
TabsList,
|
|
65
264
|
TabsTrigger,
|
|
66
|
-
TabsContent,
|
|
67
265
|
} from './components/tabs/index.js';
|
|
68
266
|
export { Textarea } from './components/textarea/index.js';
|
|
69
|
-
export {
|
|
70
|
-
export {
|
|
71
|
-
Popover,
|
|
72
|
-
PopoverTrigger,
|
|
73
|
-
PopoverContent,
|
|
74
|
-
PopoverAnchor,
|
|
75
|
-
} from './components/popover/index.js';
|
|
267
|
+
export { Toggle, toggleVariants } from './components/toggle/index.js';
|
|
76
268
|
export {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
DialogHeader,
|
|
81
|
-
DialogFooter,
|
|
82
|
-
DialogTitle,
|
|
83
|
-
DialogDescription,
|
|
84
|
-
DialogClose,
|
|
85
|
-
} from './components/dialog/index.js';
|
|
86
|
-
export {
|
|
87
|
-
Sheet,
|
|
88
|
-
SheetTrigger,
|
|
89
|
-
SheetContent,
|
|
90
|
-
SheetHeader,
|
|
91
|
-
SheetFooter,
|
|
92
|
-
SheetTitle,
|
|
93
|
-
SheetDescription,
|
|
94
|
-
SheetClose,
|
|
95
|
-
} from './components/sheet/index.js';
|
|
269
|
+
ToggleGroup,
|
|
270
|
+
ToggleGroupItem,
|
|
271
|
+
} from './components/toggle-group/index.js';
|
|
96
272
|
export {
|
|
97
273
|
Tooltip,
|
|
98
|
-
TooltipTrigger,
|
|
99
274
|
TooltipContent,
|
|
100
275
|
TooltipProvider,
|
|
276
|
+
TooltipTrigger,
|
|
101
277
|
} from './components/tooltip/index.js';
|
|
102
|
-
export {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
278
|
+
export {
|
|
279
|
+
TypographyBlockquote,
|
|
280
|
+
TypographyH1,
|
|
281
|
+
TypographyH2,
|
|
282
|
+
TypographyH3,
|
|
283
|
+
TypographyH4,
|
|
284
|
+
TypographyInlineCode,
|
|
285
|
+
TypographyLarge,
|
|
286
|
+
TypographyLead,
|
|
287
|
+
TypographyList,
|
|
288
|
+
TypographyMuted,
|
|
289
|
+
TypographyP,
|
|
290
|
+
TypographySmall,
|
|
291
|
+
} from './components/typography/index.js';
|
package/tsup.config.ts
CHANGED
|
@@ -21,6 +21,31 @@ export default defineConfig({
|
|
|
21
21
|
'src/components/skeleton/index.tsx',
|
|
22
22
|
'src/components/popover/index.tsx',
|
|
23
23
|
'src/components/scroll-area/index.tsx',
|
|
24
|
+
'src/components/accordion/index.tsx',
|
|
25
|
+
'src/components/alert/index.tsx',
|
|
26
|
+
'src/components/alert-dialog/index.tsx',
|
|
27
|
+
'src/components/aspect-ratio/index.tsx',
|
|
28
|
+
'src/components/button-group/index.tsx',
|
|
29
|
+
'src/components/collapsible/index.tsx',
|
|
30
|
+
'src/components/context-menu/index.tsx',
|
|
31
|
+
'src/components/direction/index.tsx',
|
|
32
|
+
'src/components/drawer/index.tsx',
|
|
33
|
+
'src/components/empty/index.tsx',
|
|
34
|
+
'src/components/field/index.tsx',
|
|
35
|
+
'src/components/hover-card/index.tsx',
|
|
36
|
+
'src/components/item/index.tsx',
|
|
37
|
+
'src/components/kbd/index.tsx',
|
|
38
|
+
'src/components/menubar/index.tsx',
|
|
39
|
+
'src/components/native-select/index.tsx',
|
|
40
|
+
'src/components/navigation-menu/index.tsx',
|
|
41
|
+
'src/components/progress/index.tsx',
|
|
42
|
+
'src/components/resizable/index.tsx',
|
|
43
|
+
'src/components/slider/index.tsx',
|
|
44
|
+
'src/components/sonner/index.tsx',
|
|
45
|
+
'src/components/spinner/index.tsx',
|
|
46
|
+
'src/components/table/index.tsx',
|
|
47
|
+
'src/components/toggle-group/index.tsx',
|
|
48
|
+
'src/components/typography/index.tsx',
|
|
24
49
|
],
|
|
25
50
|
format: ['esm'],
|
|
26
51
|
dts: true,
|
package/dist/chunk-FUWID6MC.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
// src/components/badge/index.tsx
|
|
2
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
3
|
-
import { cva } from "class-variance-authority";
|
|
4
|
-
import { cn } from "@foundrykit/utils";
|
|
5
|
-
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
var badgeVariants = cva(
|
|
7
|
-
"inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
|
|
8
|
-
{
|
|
9
|
-
variants: {
|
|
10
|
-
variant: {
|
|
11
|
-
default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
12
|
-
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
13
|
-
destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
14
|
-
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
defaultVariants: {
|
|
18
|
-
variant: "default"
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
);
|
|
22
|
-
function Badge({
|
|
23
|
-
className,
|
|
24
|
-
variant,
|
|
25
|
-
asChild = false,
|
|
26
|
-
...props
|
|
27
|
-
}) {
|
|
28
|
-
const Comp = asChild ? Slot : "span";
|
|
29
|
-
return /* @__PURE__ */ jsx(
|
|
30
|
-
Comp,
|
|
31
|
-
{
|
|
32
|
-
"data-slot": "badge",
|
|
33
|
-
className: cn(badgeVariants({ variant }), className),
|
|
34
|
-
...props
|
|
35
|
-
}
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export {
|
|
40
|
-
badgeVariants,
|
|
41
|
-
Badge
|
|
42
|
-
};
|
package/dist/chunk-YTUI6MCB.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
// src/components/button/index.tsx
|
|
2
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
3
|
-
import { cva } from "class-variance-authority";
|
|
4
|
-
import { cn } from "@foundrykit/utils";
|
|
5
|
-
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
var buttonVariants = cva(
|
|
7
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
8
|
-
{
|
|
9
|
-
variants: {
|
|
10
|
-
variant: {
|
|
11
|
-
default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
|
|
12
|
-
destructive: "bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
13
|
-
outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
14
|
-
secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
|
|
15
|
-
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
16
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
17
|
-
},
|
|
18
|
-
size: {
|
|
19
|
-
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
20
|
-
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
21
|
-
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
22
|
-
icon: "size-9"
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
defaultVariants: {
|
|
26
|
-
variant: "default",
|
|
27
|
-
size: "default"
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
);
|
|
31
|
-
function Button({
|
|
32
|
-
className,
|
|
33
|
-
variant,
|
|
34
|
-
size,
|
|
35
|
-
asChild = false,
|
|
36
|
-
...props
|
|
37
|
-
}) {
|
|
38
|
-
const Comp = asChild ? Slot : "button";
|
|
39
|
-
return /* @__PURE__ */ jsx(
|
|
40
|
-
Comp,
|
|
41
|
-
{
|
|
42
|
-
"data-slot": "button",
|
|
43
|
-
className: cn(buttonVariants({ variant, size, className })),
|
|
44
|
-
...props
|
|
45
|
-
}
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export {
|
|
50
|
-
buttonVariants,
|
|
51
|
-
Button
|
|
52
|
-
};
|
package/eslint.config.js
DELETED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/components/avatar/index.tsx
|
|
2
|
-
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
3
2
|
import { cn } from "@foundrykit/utils";
|
|
3
|
+
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
function Avatar({
|
|
6
6
|
className,
|