@foundrykit/primitives 2.0.6 → 2.0.8
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 +18 -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,162 @@
|
|
|
1
|
+
// src/components/typography/index.tsx
|
|
2
|
+
import { cn } from "@foundrykit/utils";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
function TypographyH1({ className, ...props }) {
|
|
5
|
+
return /* @__PURE__ */ jsx(
|
|
6
|
+
"h1",
|
|
7
|
+
{
|
|
8
|
+
"data-slot": "typography-h1",
|
|
9
|
+
className: cn(
|
|
10
|
+
"scroll-m-20 text-4xl font-extrabold tracking-tight text-balance",
|
|
11
|
+
className
|
|
12
|
+
),
|
|
13
|
+
...props
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
function TypographyH2({ className, ...props }) {
|
|
18
|
+
return /* @__PURE__ */ jsx(
|
|
19
|
+
"h2",
|
|
20
|
+
{
|
|
21
|
+
"data-slot": "typography-h2",
|
|
22
|
+
className: cn(
|
|
23
|
+
"scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight first:mt-0",
|
|
24
|
+
className
|
|
25
|
+
),
|
|
26
|
+
...props
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
function TypographyH3({ className, ...props }) {
|
|
31
|
+
return /* @__PURE__ */ jsx(
|
|
32
|
+
"h3",
|
|
33
|
+
{
|
|
34
|
+
"data-slot": "typography-h3",
|
|
35
|
+
className: cn(
|
|
36
|
+
"scroll-m-20 text-2xl font-semibold tracking-tight",
|
|
37
|
+
className
|
|
38
|
+
),
|
|
39
|
+
...props
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
function TypographyH4({ className, ...props }) {
|
|
44
|
+
return /* @__PURE__ */ jsx(
|
|
45
|
+
"h4",
|
|
46
|
+
{
|
|
47
|
+
"data-slot": "typography-h4",
|
|
48
|
+
className: cn(
|
|
49
|
+
"scroll-m-20 text-xl font-semibold tracking-tight",
|
|
50
|
+
className
|
|
51
|
+
),
|
|
52
|
+
...props
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
function TypographyP({ className, ...props }) {
|
|
57
|
+
return /* @__PURE__ */ jsx(
|
|
58
|
+
"p",
|
|
59
|
+
{
|
|
60
|
+
"data-slot": "typography-p",
|
|
61
|
+
className: cn("leading-7 [&:not(:first-child)]:mt-6", className),
|
|
62
|
+
...props
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
function TypographyBlockquote({
|
|
67
|
+
className,
|
|
68
|
+
...props
|
|
69
|
+
}) {
|
|
70
|
+
return /* @__PURE__ */ jsx(
|
|
71
|
+
"blockquote",
|
|
72
|
+
{
|
|
73
|
+
"data-slot": "typography-blockquote",
|
|
74
|
+
className: cn("mt-6 border-l-2 pl-6 italic", className),
|
|
75
|
+
...props
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
function TypographyList({ className, ...props }) {
|
|
80
|
+
return /* @__PURE__ */ jsx(
|
|
81
|
+
"ul",
|
|
82
|
+
{
|
|
83
|
+
"data-slot": "typography-list",
|
|
84
|
+
className: cn("my-6 ml-6 list-disc [&>li]:mt-2", className),
|
|
85
|
+
...props
|
|
86
|
+
}
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
function TypographyInlineCode({
|
|
90
|
+
className,
|
|
91
|
+
...props
|
|
92
|
+
}) {
|
|
93
|
+
return /* @__PURE__ */ jsx(
|
|
94
|
+
"code",
|
|
95
|
+
{
|
|
96
|
+
"data-slot": "typography-inline-code",
|
|
97
|
+
className: cn(
|
|
98
|
+
"bg-muted relative rounded px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold",
|
|
99
|
+
className
|
|
100
|
+
),
|
|
101
|
+
...props
|
|
102
|
+
}
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
function TypographyLead({ className, ...props }) {
|
|
106
|
+
return /* @__PURE__ */ jsx(
|
|
107
|
+
"p",
|
|
108
|
+
{
|
|
109
|
+
"data-slot": "typography-lead",
|
|
110
|
+
className: cn("text-muted-foreground text-xl", className),
|
|
111
|
+
...props
|
|
112
|
+
}
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
function TypographyLarge({ className, ...props }) {
|
|
116
|
+
return /* @__PURE__ */ jsx(
|
|
117
|
+
"div",
|
|
118
|
+
{
|
|
119
|
+
"data-slot": "typography-large",
|
|
120
|
+
className: cn("text-lg font-semibold", className),
|
|
121
|
+
...props
|
|
122
|
+
}
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
function TypographySmall({
|
|
126
|
+
className,
|
|
127
|
+
...props
|
|
128
|
+
}) {
|
|
129
|
+
return /* @__PURE__ */ jsx(
|
|
130
|
+
"small",
|
|
131
|
+
{
|
|
132
|
+
"data-slot": "typography-small",
|
|
133
|
+
className: cn("text-sm leading-none font-medium", className),
|
|
134
|
+
...props
|
|
135
|
+
}
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
function TypographyMuted({ className, ...props }) {
|
|
139
|
+
return /* @__PURE__ */ jsx(
|
|
140
|
+
"p",
|
|
141
|
+
{
|
|
142
|
+
"data-slot": "typography-muted",
|
|
143
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
144
|
+
...props
|
|
145
|
+
}
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export {
|
|
150
|
+
TypographyH1,
|
|
151
|
+
TypographyH2,
|
|
152
|
+
TypographyH3,
|
|
153
|
+
TypographyH4,
|
|
154
|
+
TypographyP,
|
|
155
|
+
TypographyBlockquote,
|
|
156
|
+
TypographyList,
|
|
157
|
+
TypographyInlineCode,
|
|
158
|
+
TypographyLead,
|
|
159
|
+
TypographyLarge,
|
|
160
|
+
TypographySmall,
|
|
161
|
+
TypographyMuted
|
|
162
|
+
};
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
// src/components/field/index.tsx
|
|
2
|
+
import { cn } from "@foundrykit/utils";
|
|
3
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
var fieldVariants = cva(
|
|
8
|
+
"group/field data-[invalid=true]:text-destructive flex w-full gap-3",
|
|
9
|
+
{
|
|
10
|
+
variants: {
|
|
11
|
+
orientation: {
|
|
12
|
+
vertical: ["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],
|
|
13
|
+
horizontal: [
|
|
14
|
+
"flex-row items-center",
|
|
15
|
+
"[&>[data-slot=field-label]]:flex-auto",
|
|
16
|
+
"has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox]]:mt-px has-[>[data-slot=field-content]]:[&>[role=radio]]:mt-px"
|
|
17
|
+
],
|
|
18
|
+
responsive: [
|
|
19
|
+
"flex-col @md/field-group:flex-row @md/field-group:items-center [&>*]:w-full @md/field-group:[&>*]:w-auto [&>.sr-only]:w-auto",
|
|
20
|
+
"@md/field-group:[&>[data-slot=field-label]]:flex-auto",
|
|
21
|
+
"@md/field-group:has-[>[data-slot=field-content]]:items-start"
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
defaultVariants: {
|
|
26
|
+
orientation: "vertical"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
function Field({
|
|
31
|
+
className,
|
|
32
|
+
orientation = "vertical",
|
|
33
|
+
...props
|
|
34
|
+
}) {
|
|
35
|
+
return /* @__PURE__ */ jsx(
|
|
36
|
+
"div",
|
|
37
|
+
{
|
|
38
|
+
role: "group",
|
|
39
|
+
"data-slot": "field",
|
|
40
|
+
"data-orientation": orientation,
|
|
41
|
+
className: cn(fieldVariants({ orientation }), className),
|
|
42
|
+
...props
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
function FieldSet({ className, ...props }) {
|
|
47
|
+
return /* @__PURE__ */ jsx(
|
|
48
|
+
"fieldset",
|
|
49
|
+
{
|
|
50
|
+
"data-slot": "field-set",
|
|
51
|
+
className: cn(
|
|
52
|
+
"flex flex-col gap-6",
|
|
53
|
+
"has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
|
|
54
|
+
className
|
|
55
|
+
),
|
|
56
|
+
...props
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
function FieldLegend({
|
|
61
|
+
className,
|
|
62
|
+
variant = "legend",
|
|
63
|
+
...props
|
|
64
|
+
}) {
|
|
65
|
+
return /* @__PURE__ */ jsx(
|
|
66
|
+
"legend",
|
|
67
|
+
{
|
|
68
|
+
"data-slot": "field-legend",
|
|
69
|
+
"data-variant": variant,
|
|
70
|
+
className: cn(
|
|
71
|
+
"mb-3 font-medium",
|
|
72
|
+
"data-[variant=legend]:text-base",
|
|
73
|
+
"data-[variant=label]:text-sm",
|
|
74
|
+
className
|
|
75
|
+
),
|
|
76
|
+
...props
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
function FieldGroup({ className, ...props }) {
|
|
81
|
+
return /* @__PURE__ */ jsx(
|
|
82
|
+
"div",
|
|
83
|
+
{
|
|
84
|
+
"data-slot": "field-group",
|
|
85
|
+
className: cn(
|
|
86
|
+
"group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4",
|
|
87
|
+
className
|
|
88
|
+
),
|
|
89
|
+
...props
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
function FieldContent({ className, ...props }) {
|
|
94
|
+
return /* @__PURE__ */ jsx(
|
|
95
|
+
"div",
|
|
96
|
+
{
|
|
97
|
+
"data-slot": "field-content",
|
|
98
|
+
className: cn(
|
|
99
|
+
"group/field-content flex flex-1 flex-col gap-1.5 leading-snug",
|
|
100
|
+
className
|
|
101
|
+
),
|
|
102
|
+
...props
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
function FieldLabel({
|
|
107
|
+
className,
|
|
108
|
+
...props
|
|
109
|
+
}) {
|
|
110
|
+
return /* @__PURE__ */ jsx(
|
|
111
|
+
LabelPrimitive.Root,
|
|
112
|
+
{
|
|
113
|
+
"data-slot": "field-label",
|
|
114
|
+
className: cn(
|
|
115
|
+
"group/field-label peer/field-label flex w-fit gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50",
|
|
116
|
+
"has-[[data-slot=field]]:w-full has-[[data-slot=field]]:flex-col has-[[data-slot=field]]:rounded-md has-[[data-slot=field]]:border",
|
|
117
|
+
className
|
|
118
|
+
),
|
|
119
|
+
...props
|
|
120
|
+
}
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
function FieldTitle({ className, ...props }) {
|
|
124
|
+
return /* @__PURE__ */ jsx(
|
|
125
|
+
"div",
|
|
126
|
+
{
|
|
127
|
+
"data-slot": "field-title",
|
|
128
|
+
className: cn(
|
|
129
|
+
"flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50",
|
|
130
|
+
className
|
|
131
|
+
),
|
|
132
|
+
...props
|
|
133
|
+
}
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
function FieldDescription({ className, ...props }) {
|
|
137
|
+
return /* @__PURE__ */ jsx(
|
|
138
|
+
"p",
|
|
139
|
+
{
|
|
140
|
+
"data-slot": "field-description",
|
|
141
|
+
className: cn(
|
|
142
|
+
"text-muted-foreground text-sm leading-normal font-normal group-has-[[data-orientation=horizontal]]/field:text-balance",
|
|
143
|
+
"last:mt-0 [[data-variant=legend]+&]:-mt-1.5",
|
|
144
|
+
"[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
|
|
145
|
+
className
|
|
146
|
+
),
|
|
147
|
+
...props
|
|
148
|
+
}
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
function FieldSeparator({
|
|
152
|
+
children,
|
|
153
|
+
className,
|
|
154
|
+
...props
|
|
155
|
+
}) {
|
|
156
|
+
return /* @__PURE__ */ jsxs(
|
|
157
|
+
"div",
|
|
158
|
+
{
|
|
159
|
+
"data-slot": "field-separator",
|
|
160
|
+
"data-content": !!children,
|
|
161
|
+
className: cn("relative -my-2 h-5 text-sm", className),
|
|
162
|
+
...props,
|
|
163
|
+
children: [
|
|
164
|
+
/* @__PURE__ */ jsx("div", { className: "bg-border absolute inset-0 top-1/2 h-px" }),
|
|
165
|
+
children && /* @__PURE__ */ jsx(
|
|
166
|
+
"span",
|
|
167
|
+
{
|
|
168
|
+
className: "bg-background text-muted-foreground relative mx-auto block w-fit px-2",
|
|
169
|
+
"data-slot": "field-separator-content",
|
|
170
|
+
children
|
|
171
|
+
}
|
|
172
|
+
)
|
|
173
|
+
]
|
|
174
|
+
}
|
|
175
|
+
);
|
|
176
|
+
}
|
|
177
|
+
function FieldError({
|
|
178
|
+
className,
|
|
179
|
+
children,
|
|
180
|
+
errors,
|
|
181
|
+
...props
|
|
182
|
+
}) {
|
|
183
|
+
const content = React.useMemo(() => {
|
|
184
|
+
if (children) {
|
|
185
|
+
return children;
|
|
186
|
+
}
|
|
187
|
+
if (!errors) {
|
|
188
|
+
return null;
|
|
189
|
+
}
|
|
190
|
+
if (errors.length === 1 && errors[0]?.message) {
|
|
191
|
+
return errors[0].message;
|
|
192
|
+
}
|
|
193
|
+
return /* @__PURE__ */ jsx("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: errors.map(
|
|
194
|
+
(error, index) => error?.message && /* @__PURE__ */ jsx("li", { children: error.message }, index)
|
|
195
|
+
) });
|
|
196
|
+
}, [children, errors]);
|
|
197
|
+
if (!content) {
|
|
198
|
+
return null;
|
|
199
|
+
}
|
|
200
|
+
return /* @__PURE__ */ jsx(
|
|
201
|
+
"div",
|
|
202
|
+
{
|
|
203
|
+
role: "alert",
|
|
204
|
+
"data-slot": "field-error",
|
|
205
|
+
className: cn("text-destructive text-sm font-normal", className),
|
|
206
|
+
...props,
|
|
207
|
+
children: content
|
|
208
|
+
}
|
|
209
|
+
);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
export {
|
|
213
|
+
fieldVariants,
|
|
214
|
+
Field,
|
|
215
|
+
FieldSet,
|
|
216
|
+
FieldLegend,
|
|
217
|
+
FieldGroup,
|
|
218
|
+
FieldContent,
|
|
219
|
+
FieldLabel,
|
|
220
|
+
FieldTitle,
|
|
221
|
+
FieldDescription,
|
|
222
|
+
FieldSeparator,
|
|
223
|
+
FieldError
|
|
224
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// src/components/hover-card/index.tsx
|
|
2
|
+
import { cn } from "@foundrykit/utils";
|
|
3
|
+
import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
function HoverCard({
|
|
6
|
+
...props
|
|
7
|
+
}) {
|
|
8
|
+
return /* @__PURE__ */ jsx(HoverCardPrimitive.Root, { "data-slot": "hover-card", ...props });
|
|
9
|
+
}
|
|
10
|
+
function HoverCardTrigger({
|
|
11
|
+
...props
|
|
12
|
+
}) {
|
|
13
|
+
return /* @__PURE__ */ jsx(HoverCardPrimitive.Trigger, { "data-slot": "hover-card-trigger", ...props });
|
|
14
|
+
}
|
|
15
|
+
function HoverCardContent({
|
|
16
|
+
className,
|
|
17
|
+
align = "center",
|
|
18
|
+
sideOffset = 4,
|
|
19
|
+
...props
|
|
20
|
+
}) {
|
|
21
|
+
return /* @__PURE__ */ jsx(HoverCardPrimitive.Portal, { "data-slot": "hover-card-portal", children: /* @__PURE__ */ jsx(
|
|
22
|
+
HoverCardPrimitive.Content,
|
|
23
|
+
{
|
|
24
|
+
"data-slot": "hover-card-content",
|
|
25
|
+
align,
|
|
26
|
+
sideOffset,
|
|
27
|
+
className: cn(
|
|
28
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
|
|
29
|
+
className
|
|
30
|
+
),
|
|
31
|
+
...props
|
|
32
|
+
}
|
|
33
|
+
) });
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export {
|
|
37
|
+
HoverCard,
|
|
38
|
+
HoverCardTrigger,
|
|
39
|
+
HoverCardContent
|
|
40
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// src/components/sonner/index.tsx
|
|
2
|
+
import { useTheme } from "next-themes";
|
|
3
|
+
import { Toaster as Sonner, toast } from "sonner";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
function Toaster({ ...props }) {
|
|
6
|
+
const { theme = "system" } = useTheme();
|
|
7
|
+
return /* @__PURE__ */ jsx(
|
|
8
|
+
Sonner,
|
|
9
|
+
{
|
|
10
|
+
theme,
|
|
11
|
+
className: "toaster group",
|
|
12
|
+
style: {
|
|
13
|
+
"--normal-bg": "var(--popover)",
|
|
14
|
+
"--normal-text": "var(--popover-foreground)",
|
|
15
|
+
"--normal-border": "var(--border)"
|
|
16
|
+
},
|
|
17
|
+
...props
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export {
|
|
23
|
+
toast,
|
|
24
|
+
Toaster
|
|
25
|
+
};
|
|
@@ -7,7 +7,7 @@ function Textarea({ className, ...props }) {
|
|
|
7
7
|
{
|
|
8
8
|
"data-slot": "textarea",
|
|
9
9
|
className: cn(
|
|
10
|
-
"border-input placeholder:text-muted-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 dark:bg-input/30 field-sizing-content
|
|
10
|
+
"border-input placeholder:text-muted-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 dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
11
11
|
className
|
|
12
12
|
),
|
|
13
13
|
...props
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// src/components/direction/index.tsx
|
|
2
|
+
import {
|
|
3
|
+
DirectionProvider as DirectionProviderPrimitive,
|
|
4
|
+
useDirection
|
|
5
|
+
} from "@radix-ui/react-direction";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
function DirectionProvider({
|
|
8
|
+
...props
|
|
9
|
+
}) {
|
|
10
|
+
return /* @__PURE__ */ jsx(DirectionProviderPrimitive, { ...props });
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export {
|
|
14
|
+
useDirection,
|
|
15
|
+
DirectionProvider
|
|
16
|
+
};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from))
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
|
|
31
|
+
// src/components/accordion/index.tsx
|
|
32
|
+
var accordion_exports = {};
|
|
33
|
+
__export(accordion_exports, {
|
|
34
|
+
Accordion: () => Accordion,
|
|
35
|
+
AccordionContent: () => AccordionContent,
|
|
36
|
+
AccordionItem: () => AccordionItem,
|
|
37
|
+
AccordionTrigger: () => AccordionTrigger
|
|
38
|
+
});
|
|
39
|
+
module.exports = __toCommonJS(accordion_exports);
|
|
40
|
+
var import_utils = require("@foundrykit/utils");
|
|
41
|
+
var AccordionPrimitive = __toESM(require("@radix-ui/react-accordion"), 1);
|
|
42
|
+
var import_lucide_react = require("lucide-react");
|
|
43
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
44
|
+
function Accordion({
|
|
45
|
+
...props
|
|
46
|
+
}) {
|
|
47
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionPrimitive.Root, { "data-slot": "accordion", ...props });
|
|
48
|
+
}
|
|
49
|
+
function AccordionItem({
|
|
50
|
+
className,
|
|
51
|
+
...props
|
|
52
|
+
}) {
|
|
53
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
54
|
+
AccordionPrimitive.Item,
|
|
55
|
+
{
|
|
56
|
+
"data-slot": "accordion-item",
|
|
57
|
+
className: (0, import_utils.cn)("border-b last:border-b-0", className),
|
|
58
|
+
...props
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
function AccordionTrigger({
|
|
63
|
+
className,
|
|
64
|
+
children,
|
|
65
|
+
...props
|
|
66
|
+
}) {
|
|
67
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
68
|
+
AccordionPrimitive.Trigger,
|
|
69
|
+
{
|
|
70
|
+
"data-slot": "accordion-trigger",
|
|
71
|
+
className: (0, import_utils.cn)(
|
|
72
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
|
|
73
|
+
className
|
|
74
|
+
),
|
|
75
|
+
...props,
|
|
76
|
+
children: [
|
|
77
|
+
children,
|
|
78
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ChevronDownIcon, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
) });
|
|
82
|
+
}
|
|
83
|
+
function AccordionContent({
|
|
84
|
+
className,
|
|
85
|
+
children,
|
|
86
|
+
...props
|
|
87
|
+
}) {
|
|
88
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
89
|
+
AccordionPrimitive.Content,
|
|
90
|
+
{
|
|
91
|
+
"data-slot": "accordion-content",
|
|
92
|
+
className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
|
|
93
|
+
...props,
|
|
94
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: (0, import_utils.cn)("pt-0 pb-4", className), children })
|
|
95
|
+
}
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
99
|
+
0 && (module.exports = {
|
|
100
|
+
Accordion,
|
|
101
|
+
AccordionContent,
|
|
102
|
+
AccordionItem,
|
|
103
|
+
AccordionTrigger
|
|
104
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Vertically stacked set of interactive headings built on Radix
|
|
7
|
+
* `Accordion.Root`. Compose with {@link AccordionItem},
|
|
8
|
+
* {@link AccordionTrigger} and {@link AccordionContent}.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <Accordion type="single" collapsible>
|
|
13
|
+
* <AccordionItem value="item-1">
|
|
14
|
+
* <AccordionTrigger>Is it accessible?</AccordionTrigger>
|
|
15
|
+
* <AccordionContent>Yes. It follows WAI-ARIA.</AccordionContent>
|
|
16
|
+
* </AccordionItem>
|
|
17
|
+
* </Accordion>
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
declare function Accordion({ ...props }: React.ComponentProps<typeof AccordionPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
21
|
+
declare function AccordionItem({ className, ...props }: React.ComponentProps<typeof AccordionPrimitive.Item>): react_jsx_runtime.JSX.Element;
|
|
22
|
+
declare function AccordionTrigger({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
23
|
+
declare function AccordionContent({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
24
|
+
|
|
25
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Vertically stacked set of interactive headings built on Radix
|
|
7
|
+
* `Accordion.Root`. Compose with {@link AccordionItem},
|
|
8
|
+
* {@link AccordionTrigger} and {@link AccordionContent}.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <Accordion type="single" collapsible>
|
|
13
|
+
* <AccordionItem value="item-1">
|
|
14
|
+
* <AccordionTrigger>Is it accessible?</AccordionTrigger>
|
|
15
|
+
* <AccordionContent>Yes. It follows WAI-ARIA.</AccordionContent>
|
|
16
|
+
* </AccordionItem>
|
|
17
|
+
* </Accordion>
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
declare function Accordion({ ...props }: React.ComponentProps<typeof AccordionPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
21
|
+
declare function AccordionItem({ className, ...props }: React.ComponentProps<typeof AccordionPrimitive.Item>): react_jsx_runtime.JSX.Element;
|
|
22
|
+
declare function AccordionTrigger({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
23
|
+
declare function AccordionContent({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
24
|
+
|
|
25
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
|