@foundrykit/primitives 2.0.8 → 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-D4X2ZO5T.js → chunk-2SBGU5XA.js} +2 -2
- package/dist/chunk-3NQR7JZR.js +128 -0
- package/dist/{chunk-3MEIDBWZ.js → chunk-3QUMCM5K.js} +2 -2
- package/dist/chunk-B5YCE3UP.js +57 -0
- package/dist/chunk-F2TEA6ER.js +138 -0
- package/dist/{chunk-5OSYIETI.js → chunk-FRIOQFPE.js} +1 -1
- package/dist/{chunk-EDKSYP4L.js → chunk-G2YBCHWR.js} +1 -1
- package/dist/{chunk-DKBMAFIR.js → chunk-GKCBSG2W.js} +2 -0
- package/dist/chunk-HS46TIMU.js +75 -0
- package/dist/{chunk-R3IEOV2B.js → chunk-P5KEJOBH.js} +1 -1
- package/dist/{chunk-FIRYLO5W.js → chunk-SDYKJVXX.js} +2 -2
- package/dist/chunk-SIQHWNPH.js +45 -0
- package/dist/{chunk-2PXD7LAX.js → chunk-U7JIOR7A.js} +3 -3
- package/dist/{chunk-VA4MKQN7.js → chunk-W4XY3SNY.js} +1 -1
- package/dist/chunk-XCPGTXEJ.js +23 -0
- package/dist/components/alert-dialog/index.cjs +1 -1
- package/dist/components/alert-dialog/index.js +1 -1
- package/dist/components/card/index.cjs +63 -61
- package/dist/components/card/index.d.cts +8 -7
- package/dist/components/card/index.d.ts +8 -7
- package/dist/components/card/index.js +1 -1
- package/dist/components/context-menu/index.cjs +2 -2
- package/dist/components/context-menu/index.js +1 -1
- 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/dropdown/index.cjs +2 -2
- package/dist/components/dropdown/index.js +1 -1
- package/dist/components/hover-card/index.cjs +1 -1
- package/dist/components/hover-card/index.js +1 -1
- package/dist/components/input/index.cjs +16 -28
- package/dist/components/input/index.d.cts +6 -5
- package/dist/components/input/index.d.ts +6 -5
- package/dist/components/input/index.js +1 -1
- 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/menubar/index.cjs +2 -2
- package/dist/components/menubar/index.js +1 -1
- package/dist/components/navigation-menu/index.cjs +3 -3
- package/dist/components/navigation-menu/index.js +1 -1
- package/dist/components/popover/index.cjs +1 -1
- package/dist/components/popover/index.js +1 -1
- package/dist/components/select/index.cjs +1 -1
- package/dist/components/select/index.js +1 -1
- 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/slider/index.cjs +2 -0
- package/dist/components/slider/index.d.cts +3 -2
- package/dist/components/slider/index.d.ts +3 -2
- package/dist/components/slider/index.js +1 -1
- 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.cjs +107 -95
- package/dist/index.d.cts +11 -105
- package/dist/index.d.ts +11 -105
- package/dist/index.js +108 -414
- package/package.json +200 -8
- package/.turbo/turbo-build.log +0 -235
- package/.turbo/turbo-type-check.log +0 -4
- package/CHANGELOG.md +0 -224
- package/dist/chunk-DFGLEAZI.js +0 -63
- package/dist/chunk-RDQF3IQE.js +0 -25
- 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 -98
- 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 -33
- 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 -73
- 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
package/CHANGELOG.md
DELETED
|
@@ -1,224 +0,0 @@
|
|
|
1
|
-
# @foundrykit/primitives
|
|
2
|
-
|
|
3
|
-
## 2.0.8
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- Updated dependencies [[`f8b9faa`](https://github.com/umi-labs/foundry/commit/f8b9faa49e747e6a25b05f2be11c9b18319706d0), [`66409bd`](https://github.com/umi-labs/foundry/commit/66409bd67c511a8fc0096b479d46e95c8ef2e0b6)]:
|
|
8
|
-
- @foundrykit/types@3.0.0
|
|
9
|
-
- @foundrykit/utils@1.0.8
|
|
10
|
-
|
|
11
|
-
## 2.0.7
|
|
12
|
-
|
|
13
|
-
### Patch Changes
|
|
14
|
-
|
|
15
|
-
- [#43](https://github.com/umi-labs/foundry/pull/43) [`b6fc94d`](https://github.com/umi-labs/foundry/commit/b6fc94d3b0f172aa309388f61bd5306af6405fdf) Thanks [@sneddonisaac](https://github.com/sneddonisaac)! - Package metadata now points at the `umi-labs/foundry` monorepo, and releases publish through npm trusted publishing.
|
|
16
|
-
|
|
17
|
-
- Updated dependencies [[`b6fc94d`](https://github.com/umi-labs/foundry/commit/b6fc94d3b0f172aa309388f61bd5306af6405fdf)]:
|
|
18
|
-
- @foundrykit/types@2.0.7
|
|
19
|
-
- @foundrykit/utils@1.0.7
|
|
20
|
-
|
|
21
|
-
## 2.0.6
|
|
22
|
-
|
|
23
|
-
### Patch Changes
|
|
24
|
-
|
|
25
|
-
- feat(storybook, maps): massive updates to maps packages spliting and
|
|
26
|
-
developing into full suites + storybook for easy of test
|
|
27
|
-
- Updated dependencies
|
|
28
|
-
- @foundrykit/types@2.0.6
|
|
29
|
-
|
|
30
|
-
## 2.0.5
|
|
31
|
-
|
|
32
|
-
### Patch Changes
|
|
33
|
-
|
|
34
|
-
- update
|
|
35
|
-
- Updated dependencies
|
|
36
|
-
- @foundrykit/types@2.0.5
|
|
37
|
-
|
|
38
|
-
## 2.0.4
|
|
39
|
-
|
|
40
|
-
### Patch Changes
|
|
41
|
-
|
|
42
|
-
- updates
|
|
43
|
-
- Updated dependencies
|
|
44
|
-
- @foundrykit/types@2.0.4
|
|
45
|
-
|
|
46
|
-
## 2.0.3
|
|
47
|
-
|
|
48
|
-
### Patch Changes
|
|
49
|
-
|
|
50
|
-
- updates
|
|
51
|
-
- Updated dependencies
|
|
52
|
-
- @foundrykit/types@2.0.3
|
|
53
|
-
|
|
54
|
-
## 2.0.2
|
|
55
|
-
|
|
56
|
-
### Patch Changes
|
|
57
|
-
|
|
58
|
-
- updates
|
|
59
|
-
- Updated dependencies
|
|
60
|
-
- @foundrykit/types@2.0.2
|
|
61
|
-
|
|
62
|
-
## 2.0.1
|
|
63
|
-
|
|
64
|
-
### Patch Changes
|
|
65
|
-
|
|
66
|
-
- updates and adding in new component
|
|
67
|
-
- Updated dependencies
|
|
68
|
-
- @foundrykit/types@2.0.1
|
|
69
|
-
|
|
70
|
-
## 2.0.0
|
|
71
|
-
|
|
72
|
-
### Major Changes
|
|
73
|
-
|
|
74
|
-
- changes to cli update logic for old repos
|
|
75
|
-
|
|
76
|
-
### Patch Changes
|
|
77
|
-
|
|
78
|
-
- Updated dependencies
|
|
79
|
-
- @foundrykit/types@2.0.0
|
|
80
|
-
|
|
81
|
-
## 1.0.15
|
|
82
|
-
|
|
83
|
-
### Patch Changes
|
|
84
|
-
|
|
85
|
-
- Updated dependencies
|
|
86
|
-
- @foundrykit/types@1.1.0
|
|
87
|
-
|
|
88
|
-
## 1.0.14
|
|
89
|
-
|
|
90
|
-
### Patch Changes
|
|
91
|
-
|
|
92
|
-
- Just a quick demo for Anvar
|
|
93
|
-
- Updated dependencies
|
|
94
|
-
- @foundrykit/types@1.0.9
|
|
95
|
-
- @foundrykit/utils@1.0.6
|
|
96
|
-
|
|
97
|
-
## 1.0.13
|
|
98
|
-
|
|
99
|
-
### Patch Changes
|
|
100
|
-
|
|
101
|
-
- Update to show query result in input after selection
|
|
102
|
-
|
|
103
|
-
## 1.0.12
|
|
104
|
-
|
|
105
|
-
### Patch Changes
|
|
106
|
-
|
|
107
|
-
- Updating wrapper and scroll functionality
|
|
108
|
-
|
|
109
|
-
## 1.0.11
|
|
110
|
-
|
|
111
|
-
### Patch Changes
|
|
112
|
-
|
|
113
|
-
- adding in the scroll-area primitive
|
|
114
|
-
|
|
115
|
-
## 1.0.10
|
|
116
|
-
|
|
117
|
-
### Patch Changes
|
|
118
|
-
|
|
119
|
-
- Updated dependencies
|
|
120
|
-
- @foundrykit/types@1.0.8
|
|
121
|
-
|
|
122
|
-
## 1.0.9
|
|
123
|
-
|
|
124
|
-
### Patch Changes
|
|
125
|
-
|
|
126
|
-
- Updating components and primitives as well as improving the registry demo
|
|
127
|
-
- Updated dependencies
|
|
128
|
-
- @foundrykit/utils@1.0.5
|
|
129
|
-
|
|
130
|
-
## 1.0.8
|
|
131
|
-
|
|
132
|
-
### Patch Changes
|
|
133
|
-
|
|
134
|
-
- Updating the file path in the config for sheet
|
|
135
|
-
|
|
136
|
-
## 1.0.7
|
|
137
|
-
|
|
138
|
-
### Patch Changes
|
|
139
|
-
|
|
140
|
-
- Update to the transformation of imports and the toggle file path in its config
|
|
141
|
-
- Updated dependencies
|
|
142
|
-
- @foundrykit/types@1.0.7
|
|
143
|
-
|
|
144
|
-
## 1.0.6
|
|
145
|
-
|
|
146
|
-
### Patch Changes
|
|
147
|
-
|
|
148
|
-
- Update to add command, import transformations and configs for many files
|
|
149
|
-
- Updated dependencies
|
|
150
|
-
- @foundrykit/types@1.0.6
|
|
151
|
-
- @foundrykit/utils@1.0.4
|
|
152
|
-
|
|
153
|
-
## 1.0.5
|
|
154
|
-
|
|
155
|
-
### Patch Changes
|
|
156
|
-
|
|
157
|
-
- Update to config version management and config paths
|
|
158
|
-
- Updated dependencies
|
|
159
|
-
- @foundrykit/types@1.0.5
|
|
160
|
-
- @foundrykit/utils@1.0.3
|
|
161
|
-
|
|
162
|
-
## 1.0.4
|
|
163
|
-
|
|
164
|
-
### Patch Changes
|
|
165
|
-
|
|
166
|
-
- refactoring for build errors
|
|
167
|
-
- Updated dependencies
|
|
168
|
-
- @foundrykit/types@1.0.4
|
|
169
|
-
- @foundrykit/utils@1.0.2
|
|
170
|
-
|
|
171
|
-
## 1.0.3
|
|
172
|
-
|
|
173
|
-
### Patch Changes
|
|
174
|
-
|
|
175
|
-
- Updating registry data
|
|
176
|
-
- Updated dependencies
|
|
177
|
-
- @foundrykit/types@1.0.3
|
|
178
|
-
- @foundrykit/utils@1.0.1
|
|
179
|
-
|
|
180
|
-
## 1.0.2
|
|
181
|
-
|
|
182
|
-
### Patch Changes
|
|
183
|
-
|
|
184
|
-
- Refactor package dependency handling
|
|
185
|
-
- Updated dependencies
|
|
186
|
-
- @foundrykit/types@1.0.2
|
|
187
|
-
|
|
188
|
-
## 1.0.1
|
|
189
|
-
|
|
190
|
-
### Patch Changes
|
|
191
|
-
|
|
192
|
-
- Updated dependencies
|
|
193
|
-
- @foundrykit/types@1.0.1
|
|
194
|
-
|
|
195
|
-
## 1.0.0
|
|
196
|
-
|
|
197
|
-
### Major Changes
|
|
198
|
-
|
|
199
|
-
- Version alignment push
|
|
200
|
-
|
|
201
|
-
### Patch Changes
|
|
202
|
-
|
|
203
|
-
- Updated dependencies
|
|
204
|
-
- @foundrykit/types@1.0.0
|
|
205
|
-
- @foundrykit/utils@1.0.0
|
|
206
|
-
|
|
207
|
-
## 0.1.2
|
|
208
|
-
|
|
209
|
-
### Patch Changes
|
|
210
|
-
|
|
211
|
-
- Updating versions to ensure they are inline
|
|
212
|
-
- Updated dependencies [015ff5f]
|
|
213
|
-
- Updated dependencies
|
|
214
|
-
- @foundrykit/types@0.1.2
|
|
215
|
-
- @foundrykit/utils@0.1.2
|
|
216
|
-
|
|
217
|
-
## 0.1.1
|
|
218
|
-
|
|
219
|
-
### Patch Changes
|
|
220
|
-
|
|
221
|
-
- basic test
|
|
222
|
-
- Updated dependencies
|
|
223
|
-
- @foundrykit/types@0.1.1
|
|
224
|
-
- @foundrykit/utils@0.1.1
|
package/dist/chunk-DFGLEAZI.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
// src/components/card/index.tsx
|
|
2
|
-
import { cn } from "@foundrykit/utils";
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
var Card = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6
|
-
"div",
|
|
7
|
-
{
|
|
8
|
-
ref,
|
|
9
|
-
className: cn(
|
|
10
|
-
"bg-card text-card-foreground rounded-xl border shadow",
|
|
11
|
-
className
|
|
12
|
-
),
|
|
13
|
-
...props
|
|
14
|
-
}
|
|
15
|
-
));
|
|
16
|
-
Card.displayName = "Card";
|
|
17
|
-
var CardHeader = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
18
|
-
"div",
|
|
19
|
-
{
|
|
20
|
-
ref,
|
|
21
|
-
className: cn("flex flex-col space-y-1.5 p-6", className),
|
|
22
|
-
...props
|
|
23
|
-
}
|
|
24
|
-
));
|
|
25
|
-
CardHeader.displayName = "CardHeader";
|
|
26
|
-
var CardTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
27
|
-
"h3",
|
|
28
|
-
{
|
|
29
|
-
ref,
|
|
30
|
-
className: cn("leading-none font-semibold tracking-tight", className),
|
|
31
|
-
...props
|
|
32
|
-
}
|
|
33
|
-
));
|
|
34
|
-
CardTitle.displayName = "CardTitle";
|
|
35
|
-
var CardDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
36
|
-
"p",
|
|
37
|
-
{
|
|
38
|
-
ref,
|
|
39
|
-
className: cn("text-muted-foreground text-sm", className),
|
|
40
|
-
...props
|
|
41
|
-
}
|
|
42
|
-
));
|
|
43
|
-
CardDescription.displayName = "CardDescription";
|
|
44
|
-
var CardContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("p-6 pt-0", className), ...props }));
|
|
45
|
-
CardContent.displayName = "CardContent";
|
|
46
|
-
var CardFooter = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
47
|
-
"div",
|
|
48
|
-
{
|
|
49
|
-
ref,
|
|
50
|
-
className: cn("flex items-center p-6 pt-0", className),
|
|
51
|
-
...props
|
|
52
|
-
}
|
|
53
|
-
));
|
|
54
|
-
CardFooter.displayName = "CardFooter";
|
|
55
|
-
|
|
56
|
-
export {
|
|
57
|
-
Card,
|
|
58
|
-
CardHeader,
|
|
59
|
-
CardTitle,
|
|
60
|
-
CardDescription,
|
|
61
|
-
CardContent,
|
|
62
|
-
CardFooter
|
|
63
|
-
};
|
package/dist/chunk-RDQF3IQE.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// src/components/input/index.tsx
|
|
2
|
-
import { cn } from "@foundrykit/utils";
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
var Input = React.forwardRef(
|
|
6
|
-
({ className, type, ...props }, ref) => {
|
|
7
|
-
return /* @__PURE__ */ jsx(
|
|
8
|
-
"input",
|
|
9
|
-
{
|
|
10
|
-
type,
|
|
11
|
-
className: cn(
|
|
12
|
-
"border-input file:text-foreground placeholder:text-muted-foreground focus-visible:ring-ring flex h-9 w-full rounded-md border bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
13
|
-
className
|
|
14
|
-
),
|
|
15
|
-
ref,
|
|
16
|
-
...props
|
|
17
|
-
}
|
|
18
|
-
);
|
|
19
|
-
}
|
|
20
|
-
);
|
|
21
|
-
Input.displayName = "Input";
|
|
22
|
-
|
|
23
|
-
export {
|
|
24
|
-
Input
|
|
25
|
-
};
|
package/postcss.config.mjs
DELETED
package/registry.json
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"package": "@foundrykit/primitives",
|
|
3
|
-
"category": "primitives",
|
|
4
|
-
"components": [
|
|
5
|
-
{
|
|
6
|
-
"name": "button",
|
|
7
|
-
"description": "Versatile button component with multiple variants",
|
|
8
|
-
"tags": ["form", "interactive"],
|
|
9
|
-
"files": ["components/button.tsx"],
|
|
10
|
-
"props": {
|
|
11
|
-
"variant": [
|
|
12
|
-
"default",
|
|
13
|
-
"destructive",
|
|
14
|
-
"outline",
|
|
15
|
-
"secondary",
|
|
16
|
-
"ghost",
|
|
17
|
-
"link"
|
|
18
|
-
],
|
|
19
|
-
"size": ["default", "sm", "lg", "icon"],
|
|
20
|
-
"asChild": "boolean"
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"name": "input",
|
|
25
|
-
"description": "Form input component with consistent styling",
|
|
26
|
-
"tags": ["form"],
|
|
27
|
-
"files": ["components/input.tsx"],
|
|
28
|
-
"props": {
|
|
29
|
-
"type": "string",
|
|
30
|
-
"placeholder": "string",
|
|
31
|
-
"disabled": "boolean"
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"name": "badge",
|
|
36
|
-
"description": "Small status indicators and labels",
|
|
37
|
-
"tags": ["status", "label"],
|
|
38
|
-
"files": ["components/badge.tsx"],
|
|
39
|
-
"props": {
|
|
40
|
-
"variant": ["default", "secondary", "destructive", "outline"]
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"name": "card",
|
|
45
|
-
"description": "Container for content sections",
|
|
46
|
-
"tags": ["layout", "container"],
|
|
47
|
-
"files": ["components/card.tsx"],
|
|
48
|
-
"subcomponents": [
|
|
49
|
-
"CardHeader",
|
|
50
|
-
"CardTitle",
|
|
51
|
-
"CardDescription",
|
|
52
|
-
"CardContent",
|
|
53
|
-
"CardFooter"
|
|
54
|
-
]
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
"name": "avatar",
|
|
58
|
-
"description": "User profile pictures with fallback",
|
|
59
|
-
"tags": ["user", "profile"],
|
|
60
|
-
"files": ["components/avatar.tsx"],
|
|
61
|
-
"subcomponents": ["AvatarImage", "AvatarFallback"]
|
|
62
|
-
}
|
|
63
|
-
]
|
|
64
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { ComponentConfig } from '@foundrykit/types';
|
|
2
|
-
|
|
3
|
-
export const AccordionConfig: ComponentConfig = {
|
|
4
|
-
name: 'Accordion',
|
|
5
|
-
description:
|
|
6
|
-
'A vertically stacked set of interactive headings that each reveal a section of content.',
|
|
7
|
-
category: 'primitives',
|
|
8
|
-
tags: ['accordion', 'disclosure', 'interactive'],
|
|
9
|
-
preview: {
|
|
10
|
-
type: 'static',
|
|
11
|
-
html: '<div class="flex h-12 w-full items-center justify-between rounded-md border border-gray-300 bg-gray-100 px-3"><span class="text-sm text-gray-600">Accordion</span><div class="h-2 w-2 rotate-45 border-b border-r border-gray-400"></div></div>',
|
|
12
|
-
},
|
|
13
|
-
variants: [
|
|
14
|
-
{
|
|
15
|
-
name: 'Default',
|
|
16
|
-
description: 'Default accordion',
|
|
17
|
-
code: '<Accordion type="single" collapsible>...</Accordion>',
|
|
18
|
-
preview: {
|
|
19
|
-
type: 'component',
|
|
20
|
-
component: 'Accordion',
|
|
21
|
-
props: {},
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
],
|
|
25
|
-
dependencies: ['utils'],
|
|
26
|
-
packageDependencies: ['@radix-ui/react-accordion', 'lucide-react'],
|
|
27
|
-
files: ['components/primitives/accordion/index.tsx'],
|
|
28
|
-
};
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { cn } from '@foundrykit/utils';
|
|
4
|
-
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
5
|
-
import { ChevronDownIcon } from 'lucide-react';
|
|
6
|
-
import type * as React from 'react';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Vertically stacked set of interactive headings built on Radix
|
|
10
|
-
* `Accordion.Root`. Compose with {@link AccordionItem},
|
|
11
|
-
* {@link AccordionTrigger} and {@link AccordionContent}.
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```tsx
|
|
15
|
-
* <Accordion type="single" collapsible>
|
|
16
|
-
* <AccordionItem value="item-1">
|
|
17
|
-
* <AccordionTrigger>Is it accessible?</AccordionTrigger>
|
|
18
|
-
* <AccordionContent>Yes. It follows WAI-ARIA.</AccordionContent>
|
|
19
|
-
* </AccordionItem>
|
|
20
|
-
* </Accordion>
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
|
-
function Accordion({
|
|
24
|
-
...props
|
|
25
|
-
}: React.ComponentProps<typeof AccordionPrimitive.Root>) {
|
|
26
|
-
return <AccordionPrimitive.Root data-slot='accordion' {...props} />;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function AccordionItem({
|
|
30
|
-
className,
|
|
31
|
-
...props
|
|
32
|
-
}: React.ComponentProps<typeof AccordionPrimitive.Item>) {
|
|
33
|
-
return (
|
|
34
|
-
<AccordionPrimitive.Item
|
|
35
|
-
data-slot='accordion-item'
|
|
36
|
-
className={cn('border-b last:border-b-0', className)}
|
|
37
|
-
{...props}
|
|
38
|
-
/>
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function AccordionTrigger({
|
|
43
|
-
className,
|
|
44
|
-
children,
|
|
45
|
-
...props
|
|
46
|
-
}: React.ComponentProps<typeof AccordionPrimitive.Trigger>) {
|
|
47
|
-
return (
|
|
48
|
-
<AccordionPrimitive.Header className='flex'>
|
|
49
|
-
<AccordionPrimitive.Trigger
|
|
50
|
-
data-slot='accordion-trigger'
|
|
51
|
-
className={cn(
|
|
52
|
-
'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',
|
|
53
|
-
className
|
|
54
|
-
)}
|
|
55
|
-
{...props}
|
|
56
|
-
>
|
|
57
|
-
{children}
|
|
58
|
-
<ChevronDownIcon className='text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200' />
|
|
59
|
-
</AccordionPrimitive.Trigger>
|
|
60
|
-
</AccordionPrimitive.Header>
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
function AccordionContent({
|
|
65
|
-
className,
|
|
66
|
-
children,
|
|
67
|
-
...props
|
|
68
|
-
}: React.ComponentProps<typeof AccordionPrimitive.Content>) {
|
|
69
|
-
return (
|
|
70
|
-
<AccordionPrimitive.Content
|
|
71
|
-
data-slot='accordion-content'
|
|
72
|
-
className='data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm'
|
|
73
|
-
{...props}
|
|
74
|
-
>
|
|
75
|
-
<div className={cn('pt-0 pb-4', className)}>{children}</div>
|
|
76
|
-
</AccordionPrimitive.Content>
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import type { ComponentConfig } from '@foundrykit/types';
|
|
2
|
-
|
|
3
|
-
export const AlertConfig: ComponentConfig = {
|
|
4
|
-
name: 'Alert',
|
|
5
|
-
description:
|
|
6
|
-
'Displays a callout for user attention with an optional icon, title, and description.',
|
|
7
|
-
category: 'primitives',
|
|
8
|
-
tags: ['alert', 'callout', 'feedback'],
|
|
9
|
-
preview: {
|
|
10
|
-
type: 'static',
|
|
11
|
-
html: '<div class="w-full rounded-lg border border-gray-300 bg-gray-100 px-4 py-3"><div class="mb-1 h-3 w-24 rounded bg-gray-400"></div><div class="h-2 w-40 rounded bg-gray-300"></div></div>',
|
|
12
|
-
},
|
|
13
|
-
variants: [
|
|
14
|
-
{
|
|
15
|
-
name: 'Default',
|
|
16
|
-
description: 'Default alert',
|
|
17
|
-
code: '<Alert><AlertTitle>Heads up!</AlertTitle><AlertDescription>You can add components.</AlertDescription></Alert>',
|
|
18
|
-
preview: {
|
|
19
|
-
type: 'component',
|
|
20
|
-
component: 'Alert',
|
|
21
|
-
props: {},
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
name: 'Destructive',
|
|
26
|
-
description: 'Destructive alert',
|
|
27
|
-
code: '<Alert variant="destructive"><AlertTitle>Error</AlertTitle><AlertDescription>Something went wrong.</AlertDescription></Alert>',
|
|
28
|
-
preview: {
|
|
29
|
-
type: 'component',
|
|
30
|
-
component: 'Alert',
|
|
31
|
-
props: {
|
|
32
|
-
variant: 'destructive',
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
],
|
|
37
|
-
dependencies: ['utils'],
|
|
38
|
-
packageDependencies: ['class-variance-authority'],
|
|
39
|
-
files: ['components/primitives/alert/index.tsx'],
|
|
40
|
-
};
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { cn } from '@foundrykit/utils';
|
|
2
|
-
import { cva, type VariantProps } from 'class-variance-authority';
|
|
3
|
-
import type * as React from 'react';
|
|
4
|
-
|
|
5
|
-
const alertVariants = cva(
|
|
6
|
-
'relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current',
|
|
7
|
-
{
|
|
8
|
-
variants: {
|
|
9
|
-
variant: {
|
|
10
|
-
default: 'bg-background text-foreground',
|
|
11
|
-
destructive:
|
|
12
|
-
'text-destructive bg-background *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current',
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
defaultVariants: {
|
|
16
|
-
variant: 'default',
|
|
17
|
-
},
|
|
18
|
-
}
|
|
19
|
-
);
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Callout banner for surfacing a short, important message. Compose with
|
|
23
|
-
* {@link AlertTitle} and {@link AlertDescription}, and optionally lead with a
|
|
24
|
-
* lucide icon. Styled via {@link alertVariants} with a `variant`
|
|
25
|
-
* (default, destructive).
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* ```tsx
|
|
29
|
-
* <Alert variant="destructive">
|
|
30
|
-
* <AlertCircleIcon />
|
|
31
|
-
* <AlertTitle>Something went wrong</AlertTitle>
|
|
32
|
-
* <AlertDescription>Please try again later.</AlertDescription>
|
|
33
|
-
* </Alert>
|
|
34
|
-
* ```
|
|
35
|
-
*/
|
|
36
|
-
function Alert({
|
|
37
|
-
className,
|
|
38
|
-
variant,
|
|
39
|
-
...props
|
|
40
|
-
}: React.ComponentProps<'div'> & VariantProps<typeof alertVariants>) {
|
|
41
|
-
return (
|
|
42
|
-
<div
|
|
43
|
-
data-slot='alert'
|
|
44
|
-
role='alert'
|
|
45
|
-
className={cn(alertVariants({ variant }), className)}
|
|
46
|
-
{...props}
|
|
47
|
-
/>
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
function AlertTitle({ className, ...props }: React.ComponentProps<'div'>) {
|
|
52
|
-
return (
|
|
53
|
-
<div
|
|
54
|
-
data-slot='alert-title'
|
|
55
|
-
className={cn(
|
|
56
|
-
'col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight',
|
|
57
|
-
className
|
|
58
|
-
)}
|
|
59
|
-
{...props}
|
|
60
|
-
/>
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
function AlertDescription({
|
|
65
|
-
className,
|
|
66
|
-
...props
|
|
67
|
-
}: React.ComponentProps<'div'>) {
|
|
68
|
-
return (
|
|
69
|
-
<div
|
|
70
|
-
data-slot='alert-description'
|
|
71
|
-
className={cn(
|
|
72
|
-
'text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed',
|
|
73
|
-
className
|
|
74
|
-
)}
|
|
75
|
-
{...props}
|
|
76
|
-
/>
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export { Alert, AlertDescription, AlertTitle, alertVariants };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { ComponentConfig } from '@foundrykit/types';
|
|
2
|
-
|
|
3
|
-
export const AlertDialogConfig: ComponentConfig = {
|
|
4
|
-
name: 'Alert Dialog',
|
|
5
|
-
description:
|
|
6
|
-
'A modal dialog that interrupts the user with important content and expects a response.',
|
|
7
|
-
category: 'primitives',
|
|
8
|
-
tags: ['alert-dialog', 'modal', 'overlay', 'confirmation'],
|
|
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">Alert Dialog</span></div>',
|
|
12
|
-
},
|
|
13
|
-
variants: [
|
|
14
|
-
{
|
|
15
|
-
name: 'Default',
|
|
16
|
-
description: 'Default alert dialog',
|
|
17
|
-
code: '<AlertDialog>...</AlertDialog>',
|
|
18
|
-
preview: {
|
|
19
|
-
type: 'component',
|
|
20
|
-
component: 'AlertDialog',
|
|
21
|
-
props: {},
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
],
|
|
25
|
-
dependencies: ['utils'],
|
|
26
|
-
packageDependencies: ['@radix-ui/react-alert-dialog'],
|
|
27
|
-
files: ['components/primitives/alert-dialog/index.tsx'],
|
|
28
|
-
};
|