@foundrykit/primitives 0.1.0 → 0.1.1

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.
@@ -0,0 +1,68 @@
1
+
2
+ 
3
+ > @foundrykit/primitives@0.1.0 build /Users/isaacsneddon-jenkins/Desktop/projects/umi/projects/foundrykit/packages/primitives
4
+ > tsup
5
+
6
+ CLI Building entry: src/index.ts, src/components/avatar/index.tsx, src/components/badge/index.tsx, src/components/breadcrumb/index.tsx, src/components/button/index.tsx, src/components/card/index.tsx, src/components/checkbox/index.tsx, src/components/dropdown/index.tsx, src/components/input/index.tsx, src/components/label/index.tsx, src/components/popover/index.tsx, src/components/radio-group/index.tsx, src/components/select/index.tsx, src/components/separator/index.tsx, src/components/skeleton/index.tsx, src/components/switch/index.tsx, src/components/tabs/index.tsx, src/components/textarea/index.tsx
7
+ CLI Using tsconfig: tsconfig.json
8
+ CLI tsup v8.5.0
9
+ CLI Using tsup config: /Users/isaacsneddon-jenkins/Desktop/projects/umi/projects/foundrykit/packages/primitives/tsup.config.ts
10
+ CLI Target: es2022
11
+ CLI Cleaning output folder
12
+ ESM Build start
13
+ ESM dist/components/popover/index.js 195.00 B
14
+ ESM dist/components/radio-group/index.js 131.00 B
15
+ ESM dist/components/select/index.js 411.00 B
16
+ ESM dist/components/label/index.js 85.00 B
17
+ ESM dist/components/skeleton/index.js 77.00 B
18
+ ESM dist/components/separator/index.js 93.00 B
19
+ ESM dist/components/dropdown/index.js 757.00 B
20
+ ESM dist/components/textarea/index.js 77.00 B
21
+ ESM dist/components/tabs/index.js 167.00 B
22
+ ESM dist/chunk-FYCANIVJ.js 1.87 KB
23
+ ESM dist/index.js 2.44 KB
24
+ ESM dist/components/input/index.js 71.00 B
25
+ ESM dist/chunk-KZMSLRLW.js 806.00 B
26
+ ESM dist/components/switch/index.js 87.00 B
27
+ ESM dist/chunk-J4CRGO2P.js 1.49 KB
28
+ ESM dist/chunk-AADRFFPH.js 5.89 KB
29
+ ESM dist/chunk-J57CV3VT.js 690.00 B
30
+ ESM dist/chunk-I44GXEPN.js 809.00 B
31
+ ESM dist/chunk-QL4XJD7Y.js 627.00 B
32
+ ESM dist/chunk-VVNIYCKH.js 1.04 KB
33
+ ESM dist/components/badge/index.js 105.00 B
34
+ ESM dist/components/avatar/index.js 153.00 B
35
+ ESM dist/components/breadcrumb/index.js 315.00 B
36
+ ESM dist/chunk-VSXKLSEP.js 2.45 KB
37
+ ESM dist/chunk-XQAJQKO7.js 1.46 KB
38
+ ESM dist/components/button/index.js 109.00 B
39
+ ESM dist/chunk-SKR3J46C.js 363.00 B
40
+ ESM dist/chunk-UZIMC7AQ.js 1.61 KB
41
+ ESM dist/chunk-U2EIVYWP.js 1.21 KB
42
+ ESM dist/chunk-A3U73FA7.js 1.25 KB
43
+ ESM dist/components/checkbox/index.js 91.00 B
44
+ ESM dist/chunk-FUWID6MC.js 1.52 KB
45
+ ESM dist/chunk-YTUI6MCB.js 1.98 KB
46
+ ESM dist/chunk-PHMEWMFS.js 7.52 KB
47
+ ESM dist/components/card/index.js 219.00 B
48
+ ESM ⚡️ Build success in 207ms
49
+ DTS Build start
50
+ DTS ⚡️ Build success in 9157ms
51
+ DTS dist/index.d.ts 2.05 KB
52
+ DTS dist/components/avatar/index.d.ts 611.00 B
53
+ DTS dist/components/badge/index.d.ts 653.00 B
54
+ DTS dist/components/breadcrumb/index.d.ts 1.06 KB
55
+ DTS dist/components/button/index.d.ts 806.00 B
56
+ DTS dist/components/card/index.d.ts 947.00 B
57
+ DTS dist/components/checkbox/index.d.ts 310.00 B
58
+ DTS dist/components/dropdown/index.d.ts 2.84 KB
59
+ DTS dist/components/input/index.d.ts 252.00 B
60
+ DTS dist/components/label/index.d.ts 295.00 B
61
+ DTS dist/components/popover/index.d.ts 768.00 B
62
+ DTS dist/components/radio-group/index.d.ts 481.00 B
63
+ DTS dist/components/select/index.d.ts 1.75 KB
64
+ DTS dist/components/separator/index.d.ts 340.00 B
65
+ DTS dist/components/skeleton/index.d.ts 191.00 B
66
+ DTS dist/components/switch/index.d.ts 300.00 B
67
+ DTS dist/components/tabs/index.d.ts 734.00 B
68
+ DTS dist/components/textarea/index.d.ts 228.00 B
@@ -0,0 +1,5 @@
1
+
2
+ 
3
+ > @foundrykit/primitives@0.1.0 type-check /Users/isaacsneddon-jenkins/Desktop/projects/umi/projects/foundrykit/packages/primitives
4
+ > tsc --noEmit
5
+
package/CHANGELOG.md ADDED
@@ -0,0 +1,10 @@
1
+ # @foundrykit/primitives
2
+
3
+ ## 0.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - basic test
8
+ - Updated dependencies
9
+ - @foundrykit/types@0.1.1
10
+ - @foundrykit/utils@0.1.1
package/README.md ADDED
@@ -0,0 +1,151 @@
1
+ # @foundrykit/primitives
2
+
3
+ A collection of accessible, unstyled UI primitives built on top of Radix UI primitives. These components provide the foundation for building consistent, accessible user interfaces.
4
+
5
+ ## Features
6
+
7
+ - **Accessible by default** - Built on Radix UI primitives with proper ARIA attributes
8
+ - **Unstyled** - No default styling, allowing complete customization
9
+ - **TypeScript support** - Full type safety with comprehensive TypeScript definitions
10
+ - **Composable** - Components are built from sub-components for maximum flexibility
11
+ - **Themeable** - Designed to work with any styling solution
12
+
13
+ ## Installation
14
+
15
+ ```bash
16
+ pnpm add @foundrykit/primitives
17
+ ```
18
+
19
+ ## Available Components
20
+
21
+ ### Form Components
22
+ - **Button** - Accessible button with various variants and states
23
+ - **Input** - Form input with proper labeling and validation states
24
+ - **Textarea** - Multi-line text input
25
+ - **Checkbox** - Accessible checkbox with proper keyboard navigation
26
+ - **Radio Group** - Radio button group with proper form integration
27
+ - **Select** - Dropdown select with search and keyboard navigation
28
+ - **Switch** - Toggle switch component
29
+ - **Label** - Accessible form labels
30
+
31
+ ### Layout Components
32
+ - **Card** - Container component with header, content, and footer sections
33
+ - **Separator** - Visual divider for content organization
34
+ - **Skeleton** - Loading placeholder components
35
+
36
+ ### Navigation Components
37
+ - **Tabs** - Tabbed interface with keyboard navigation
38
+ - **Breadcrumb** - Navigation breadcrumbs
39
+ - **Dropdown** - Dropdown menu with sub-menus
40
+
41
+ ### Overlay Components
42
+ - **Dialog** - Modal dialog with proper focus management
43
+ - **Popover** - Floating content overlay
44
+ - **Avatar** - User avatar with fallback support
45
+
46
+ ### Display Components
47
+ - **Badge** - Status indicators and labels
48
+
49
+ ## Usage
50
+
51
+ ### Basic Example
52
+
53
+ ```tsx
54
+ import { Button, ButtonRoot, ButtonContent } from '@foundrykit/primitives/button'
55
+ import { Input, InputRoot, InputField } from '@foundrykit/primitives/input'
56
+
57
+ function MyForm() {
58
+ return (
59
+ <form>
60
+ <Input>
61
+ <InputRoot>
62
+ <InputField placeholder="Enter your name" />
63
+ </InputRoot>
64
+ </Input>
65
+
66
+ <Button>
67
+ <ButtonRoot>
68
+ <ButtonContent>Submit</ButtonContent>
69
+ </ButtonRoot>
70
+ </Button>
71
+ </form>
72
+ )
73
+ }
74
+ ```
75
+
76
+ ### Composable Pattern
77
+
78
+ All components follow a composable pattern where you can use either the complete component or individual sub-components:
79
+
80
+ ```tsx
81
+ // Complete component (recommended for most cases)
82
+ import { Button } from '@foundrykit/primitives/button'
83
+
84
+ // Individual sub-components (for maximum customization)
85
+ import { ButtonRoot, ButtonContent, ButtonIcon } from '@foundrykit/primitives/button'
86
+ ```
87
+
88
+ ### Styling
89
+
90
+ Since these are unstyled primitives, you'll need to add your own styling:
91
+
92
+ ```tsx
93
+ import { Button } from '@foundrykit/primitives/button'
94
+ import { cn } from '@foundrykit/utils'
95
+
96
+ function StyledButton({ className, ...props }) {
97
+ return (
98
+ <Button
99
+ className={cn(
100
+ "px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600",
101
+ className
102
+ )}
103
+ {...props}
104
+ />
105
+ )
106
+ }
107
+ ```
108
+
109
+ ## Component Structure
110
+
111
+ Each component is organized as follows:
112
+
113
+ ```
114
+ component/
115
+ ├── config.ts # Component configuration and variants
116
+ ├── index.tsx # Main component exports
117
+ └── README.md # Component-specific documentation
118
+ ```
119
+
120
+ ## Accessibility
121
+
122
+ All components follow WCAG guidelines and include:
123
+
124
+ - Proper ARIA attributes
125
+ - Keyboard navigation support
126
+ - Focus management
127
+ - Screen reader compatibility
128
+ - Color contrast considerations
129
+
130
+ ## Dependencies
131
+
132
+ - **Radix UI** - For accessibility primitives
133
+ - **React** - UI framework
134
+ - **TypeScript** - Type safety
135
+ - **class-variance-authority** - For component variants
136
+ - **clsx** - For conditional class names
137
+ - **tailwind-merge** - For class merging
138
+
139
+ ## Contributing
140
+
141
+ When adding new primitives:
142
+
143
+ 1. Follow the existing component structure
144
+ 2. Ensure proper accessibility
145
+ 3. Add TypeScript definitions
146
+ 4. Include usage examples
147
+ 5. Update this README
148
+
149
+ ## License
150
+
151
+ MIT
package/dist/index.js CHANGED
@@ -1,18 +1,15 @@
1
1
  import {
2
- Tabs,
3
- TabsContent,
4
- TabsList,
5
- TabsTrigger
6
- } from "./chunk-FYCANIVJ.js";
2
+ Switch
3
+ } from "./chunk-U2EIVYWP.js";
7
4
  import {
8
5
  Textarea
9
6
  } from "./chunk-I44GXEPN.js";
10
- import {
11
- Input
12
- } from "./chunk-KZMSLRLW.js";
13
7
  import {
14
8
  Label
15
9
  } from "./chunk-QL4XJD7Y.js";
10
+ import {
11
+ Input
12
+ } from "./chunk-KZMSLRLW.js";
16
13
  import {
17
14
  Popover,
18
15
  PopoverAnchor,
@@ -42,8 +39,11 @@ import {
42
39
  Skeleton
43
40
  } from "./chunk-SKR3J46C.js";
44
41
  import {
45
- Switch
46
- } from "./chunk-U2EIVYWP.js";
42
+ Tabs,
43
+ TabsContent,
44
+ TabsList,
45
+ TabsTrigger
46
+ } from "./chunk-FYCANIVJ.js";
47
47
  import {
48
48
  Avatar,
49
49
  AvatarFallback,
@@ -62,6 +62,9 @@ import {
62
62
  BreadcrumbPage,
63
63
  BreadcrumbSeparator
64
64
  } from "./chunk-VSXKLSEP.js";
65
+ import {
66
+ Checkbox
67
+ } from "./chunk-A3U73FA7.js";
65
68
  import {
66
69
  Button,
67
70
  buttonVariants
@@ -74,9 +77,6 @@ import {
74
77
  CardHeader,
75
78
  CardTitle
76
79
  } from "./chunk-UZIMC7AQ.js";
77
- import {
78
- Checkbox
79
- } from "./chunk-A3U73FA7.js";
80
80
  import {
81
81
  DropdownMenu,
82
82
  DropdownMenuCheckboxItem,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foundrykit/primitives",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "main": "./dist/index.js",
@@ -40,8 +40,8 @@
40
40
  "react-dom": "^19.1.1",
41
41
  "tailwind-merge": "^3.3.1",
42
42
  "zod": "^3.25.76",
43
- "@foundrykit/utils": "0.1.0",
44
- "@foundrykit/types": "0.1.0"
43
+ "@foundrykit/utils": "0.1.1",
44
+ "@foundrykit/types": "0.1.1"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@types/node": "^20.19.9",
@@ -51,8 +51,8 @@
51
51
  "fs-extra": "^11.2.0",
52
52
  "tsup": "^8.0.0",
53
53
  "typescript": "^5.9.2",
54
- "@foundrykit/eslint-config": "0.1.0",
55
- "@foundrykit/typescript-config": "0.1.0"
54
+ "@foundrykit/typescript-config": "0.1.1",
55
+ "@foundrykit/eslint-config": "0.1.1"
56
56
  },
57
57
  "peerDependencies": {
58
58
  "react": "^19.1.1",