@foundrykit/components 2.1.4 → 2.2.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.
- package/dist/chunk-4WYKNDYY.js +91 -0
- package/dist/chunk-4WYKNDYY.js.map +1 -0
- package/dist/chunk-5CXNMTIN.js +84 -0
- package/dist/chunk-5CXNMTIN.js.map +1 -0
- package/dist/chunk-B5ZTF5MZ.js +203 -0
- package/dist/chunk-B5ZTF5MZ.js.map +1 -0
- package/dist/chunk-EDNWBEKV.js +51 -0
- package/dist/chunk-EDNWBEKV.js.map +1 -0
- package/dist/chunk-ID7BFTID.js +248 -0
- package/dist/chunk-ID7BFTID.js.map +1 -0
- package/dist/chunk-IYBHXVCH.js +181 -0
- package/dist/chunk-IYBHXVCH.js.map +1 -0
- package/dist/chunk-KQZEF7PS.js +71 -0
- package/dist/chunk-KQZEF7PS.js.map +1 -0
- package/dist/chunk-P3GSYR7O.js +889 -0
- package/dist/chunk-P3GSYR7O.js.map +1 -0
- package/dist/chunk-PKSRYDN4.js +168 -0
- package/dist/chunk-PKSRYDN4.js.map +1 -0
- package/dist/chunk-SFM7ZMG2.js +104 -0
- package/dist/chunk-SFM7ZMG2.js.map +1 -0
- package/dist/chunk-TLQQZJUR.js +126 -0
- package/dist/chunk-TLQQZJUR.js.map +1 -0
- package/dist/chunk-UE7CDYEN.js +59 -0
- package/dist/chunk-UE7CDYEN.js.map +1 -0
- package/dist/chunk-UG7YS3D5.js +198 -0
- package/dist/chunk-UG7YS3D5.js.map +1 -0
- package/dist/components/advanced-search-bar/index.d.ts +308 -0
- package/dist/components/advanced-search-bar/index.js +34 -0
- package/dist/components/advanced-search-bar/index.js.map +1 -0
- package/dist/components/calendar/index.d.ts +20 -0
- package/dist/components/calendar/index.js +11 -0
- package/dist/components/calendar/index.js.map +1 -0
- package/dist/components/carousel/index.d.ts +40 -0
- package/dist/components/carousel/index.js +17 -0
- package/dist/components/carousel/index.js.map +1 -0
- package/dist/components/chart/index.d.ts +59 -0
- package/dist/components/chart/index.js +21 -0
- package/dist/components/chart/index.js.map +1 -0
- package/dist/components/combobox/index.d.ts +33 -0
- package/dist/components/combobox/index.js +10 -0
- package/dist/components/combobox/index.js.map +1 -0
- package/dist/components/command/index.d.ts +33 -0
- package/dist/components/command/index.js +25 -0
- package/dist/components/command/index.js.map +1 -0
- package/dist/components/data-table/index.d.ts +17 -0
- package/dist/components/data-table/index.js +9 -0
- package/dist/components/data-table/index.js.map +1 -0
- package/dist/components/date-picker/index.d.ts +17 -0
- package/dist/components/date-picker/index.js +9 -0
- package/dist/components/date-picker/index.js.map +1 -0
- package/dist/components/form/index.d.ts +37 -0
- package/dist/components/form/index.js +23 -0
- package/dist/components/form/index.js.map +1 -0
- package/dist/components/input-otp/index.d.ts +30 -0
- package/dist/components/input-otp/index.js +15 -0
- package/dist/components/input-otp/index.js.map +1 -0
- package/dist/components/pagination/index.d.ts +26 -0
- package/dist/components/pagination/index.js +20 -0
- package/dist/components/pagination/index.js.map +1 -0
- package/dist/components/search-bar/index.d.ts +17 -0
- package/dist/components/search-bar/index.js +9 -0
- package/dist/components/search-bar/index.js.map +1 -0
- package/dist/components/sidebar/index.d.ts +70 -0
- package/dist/components/sidebar/index.js +652 -0
- package/dist/components/sidebar/index.js.map +1 -0
- package/dist/components/theme-toggle/index.d.ts +20 -0
- package/dist/components/theme-toggle/index.js +9 -0
- package/dist/components/theme-toggle/index.js.map +1 -0
- package/dist/index.d.ts +27 -582
- package/dist/index.js +74 -2280
- package/dist/index.js.map +1 -1
- package/package.json +15 -8
- package/.turbo/turbo-build.log +0 -17
- package/.turbo/turbo-type-check.log +0 -4
- package/CHANGELOG.md +0 -351
- package/src/components/advanced-search-bar/config.ts +0 -223
- package/src/components/advanced-search-bar/index.tsx +0 -1415
- package/src/components/calendar/config.ts +0 -51
- package/src/components/calendar/index.tsx +0 -225
- package/src/components/carousel/config.ts +0 -28
- package/src/components/carousel/index.tsx +0 -258
- package/src/components/chart/config.ts +0 -28
- package/src/components/chart/index.tsx +0 -365
- package/src/components/combobox/config.ts +0 -28
- package/src/components/combobox/index.tsx +0 -101
- package/src/components/command/config.ts +0 -804
- package/src/components/command/index.tsx +0 -195
- package/src/components/data-table/config.ts +0 -28
- package/src/components/data-table/index.tsx +0 -124
- package/src/components/date-picker/config.ts +0 -55
- package/src/components/date-picker/index.tsx +0 -207
- package/src/components/form/config.ts +0 -21
- package/src/components/form/index.tsx +0 -150
- package/src/components/input-otp/config.ts +0 -28
- package/src/components/input-otp/index.tsx +0 -92
- package/src/components/pagination/config.ts +0 -367
- package/src/components/pagination/index.tsx +0 -135
- package/src/components/search-bar/config.ts +0 -58
- package/src/components/search-bar/index.tsx +0 -70
- package/src/components/sidebar/config.ts +0 -29
- package/src/components/sidebar/index.tsx +0 -723
- package/src/components/theme-toggle/config.ts +0 -58
- package/src/components/theme-toggle/index.tsx +0 -35
- package/src/index.ts +0 -82
- package/tsconfig.json +0 -12
- package/tsconfig.lint.json +0 -8
- package/tsup.config.ts +0 -11
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import type { ComponentConfig } from '@foundrykit/types';
|
|
2
|
-
|
|
3
|
-
export const ThemeToggleConfig: ComponentConfig = {
|
|
4
|
-
name: 'Theme Toggle',
|
|
5
|
-
description: 'Toggle for changing the theme.',
|
|
6
|
-
category: 'components',
|
|
7
|
-
tags: ['toggle', 'input', 'form'],
|
|
8
|
-
preview: {
|
|
9
|
-
type: 'static',
|
|
10
|
-
html: '<div class="flex h-12 w-full items-center rounded-md border border-gray-300 bg-gray-100 px-3"><div class="h-2 w-12 rounded-full bg-gray-400"></div></div>',
|
|
11
|
-
},
|
|
12
|
-
variants: [
|
|
13
|
-
{
|
|
14
|
-
name: 'Default',
|
|
15
|
-
description: 'Default search bar',
|
|
16
|
-
code: '<SearchBar placeholder="Search..." onSearch={(query) => console.log(query)} />',
|
|
17
|
-
preview: {
|
|
18
|
-
type: 'component',
|
|
19
|
-
component: 'SearchBar',
|
|
20
|
-
props: {
|
|
21
|
-
placeholder: 'Search...',
|
|
22
|
-
onSearch: (query: string) => console.log(query),
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
name: 'With Value',
|
|
28
|
-
description: 'Search bar with initial value',
|
|
29
|
-
code: '<SearchBar placeholder="Search..." value="React" onSearch={(query) => console.log(query)} />',
|
|
30
|
-
preview: {
|
|
31
|
-
type: 'component',
|
|
32
|
-
component: 'SearchBar',
|
|
33
|
-
props: {
|
|
34
|
-
placeholder: 'Search...',
|
|
35
|
-
value: 'React',
|
|
36
|
-
onSearch: (query: string) => console.log(query),
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
name: 'Custom Style',
|
|
42
|
-
description: 'Search bar with custom styling',
|
|
43
|
-
code: '<SearchBar className="h-12 text-lg" placeholder="Search..." onSearch={(query) => console.log(query)} />',
|
|
44
|
-
preview: {
|
|
45
|
-
type: 'component',
|
|
46
|
-
component: 'SearchBar',
|
|
47
|
-
props: {
|
|
48
|
-
className: 'h-12 text-lg',
|
|
49
|
-
placeholder: 'Search...',
|
|
50
|
-
onSearch: (query: string) => console.log(query),
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
],
|
|
55
|
-
dependencies: ['utils', 'toggle'],
|
|
56
|
-
packageDependencies: ['lucide-react'],
|
|
57
|
-
files: ['components/theme-toggle/index.tsx'],
|
|
58
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { Toggle } from '@foundrykit/primitives';
|
|
4
|
-
import { MoonIcon, SunIcon } from 'lucide-react';
|
|
5
|
-
import { useState } from 'react';
|
|
6
|
-
|
|
7
|
-
export default function ThemeToggle() {
|
|
8
|
-
const [theme, setTheme] = useState<string>('light');
|
|
9
|
-
|
|
10
|
-
return (
|
|
11
|
-
<div>
|
|
12
|
-
<Toggle
|
|
13
|
-
variant='outline'
|
|
14
|
-
className='data-[state=on]:hover:bg-muted group size-9 data-[state=on]:bg-transparent'
|
|
15
|
-
pressed={theme === 'dark'}
|
|
16
|
-
onPressedChange={() =>
|
|
17
|
-
setTheme(prev => (prev === 'dark' ? 'light' : 'dark'))
|
|
18
|
-
}
|
|
19
|
-
aria-label={`Switch to ${theme === 'dark' ? 'light' : 'dark'} mode`}
|
|
20
|
-
>
|
|
21
|
-
{/* Note: After dark mode implementation, rely on dark: prefix rather than group-data-[state=on]: */}
|
|
22
|
-
<MoonIcon
|
|
23
|
-
size={16}
|
|
24
|
-
className='shrink-0 scale-0 opacity-0 transition-all group-data-[state=on]:scale-100 group-data-[state=on]:opacity-100'
|
|
25
|
-
aria-hidden='true'
|
|
26
|
-
/>
|
|
27
|
-
<SunIcon
|
|
28
|
-
size={16}
|
|
29
|
-
className='absolute shrink-0 scale-100 opacity-100 transition-all group-data-[state=on]:scale-0 group-data-[state=on]:opacity-0'
|
|
30
|
-
aria-hidden='true'
|
|
31
|
-
/>
|
|
32
|
-
</Toggle>
|
|
33
|
-
</div>
|
|
34
|
-
);
|
|
35
|
-
}
|
package/src/index.ts
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
// Export types from types package
|
|
4
|
-
export type {
|
|
5
|
-
SearchResult,
|
|
6
|
-
SearchSection as SearchSectionType,
|
|
7
|
-
} from '@foundrykit/types';
|
|
8
|
-
// Export utilities from utils package
|
|
9
|
-
export { cn } from '@foundrykit/utils';
|
|
10
|
-
export {
|
|
11
|
-
AdvancedSearchBar,
|
|
12
|
-
AdvancedSearchBarWrapper,
|
|
13
|
-
AdvancedSearchProvider,
|
|
14
|
-
SearchInput,
|
|
15
|
-
SearchItem,
|
|
16
|
-
SearchResults,
|
|
17
|
-
SearchSection,
|
|
18
|
-
SearchTrigger,
|
|
19
|
-
} from './components/advanced-search-bar/index.js';
|
|
20
|
-
export { Calendar } from './components/calendar/index.js';
|
|
21
|
-
export {
|
|
22
|
-
Carousel,
|
|
23
|
-
type CarouselApi,
|
|
24
|
-
CarouselContent,
|
|
25
|
-
CarouselItem,
|
|
26
|
-
CarouselNext,
|
|
27
|
-
CarouselPrevious,
|
|
28
|
-
} from './components/carousel/index.js';
|
|
29
|
-
export {
|
|
30
|
-
type ChartConfig,
|
|
31
|
-
ChartContainer,
|
|
32
|
-
ChartLegend,
|
|
33
|
-
ChartLegendContent,
|
|
34
|
-
ChartStyle,
|
|
35
|
-
ChartTooltip,
|
|
36
|
-
ChartTooltipContent,
|
|
37
|
-
useChart,
|
|
38
|
-
} from './components/chart/index.js';
|
|
39
|
-
// --- Added components ---
|
|
40
|
-
export { Combobox } from './components/combobox/index.js';
|
|
41
|
-
export {
|
|
42
|
-
Command,
|
|
43
|
-
CommandDialog,
|
|
44
|
-
CommandEmpty,
|
|
45
|
-
CommandGroup,
|
|
46
|
-
CommandInput,
|
|
47
|
-
CommandItem,
|
|
48
|
-
CommandList,
|
|
49
|
-
CommandSeparator,
|
|
50
|
-
CommandShortcut,
|
|
51
|
-
} from './components/command/index.js';
|
|
52
|
-
export { DataTable } from './components/data-table/index.js';
|
|
53
|
-
export { DatePicker } from './components/date-picker/index.js';
|
|
54
|
-
export {
|
|
55
|
-
Form,
|
|
56
|
-
FormControl,
|
|
57
|
-
FormDescription,
|
|
58
|
-
FormField,
|
|
59
|
-
FormItem,
|
|
60
|
-
FormLabel,
|
|
61
|
-
FormMessage,
|
|
62
|
-
useFormField,
|
|
63
|
-
} from './components/form/index.js';
|
|
64
|
-
export {
|
|
65
|
-
InputOTP,
|
|
66
|
-
InputOTPGroup,
|
|
67
|
-
InputOTPSeparator,
|
|
68
|
-
InputOTPSlot,
|
|
69
|
-
} from './components/input-otp/index.js';
|
|
70
|
-
export {
|
|
71
|
-
Pagination,
|
|
72
|
-
PaginationContent,
|
|
73
|
-
PaginationEllipsis,
|
|
74
|
-
PaginationItem,
|
|
75
|
-
PaginationLink,
|
|
76
|
-
PaginationNext,
|
|
77
|
-
PaginationPrevious,
|
|
78
|
-
} from './components/pagination/index.js';
|
|
79
|
-
// Bundled as a single entry, and every component here is interactive
|
|
80
|
-
// (react-hook-form, cmdk, date pickers, search), so the whole module is client.
|
|
81
|
-
// Export all components
|
|
82
|
-
export { SearchBar } from './components/search-bar/index.js';
|
package/tsconfig.json
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "@foundrykit/typescript-config/react-library.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"baseUrl": ".",
|
|
5
|
-
"paths": {
|
|
6
|
-
"@foundrykit/components/*": ["./src/*"],
|
|
7
|
-
"@foundrykit/hooks": ["../hooks/src/index.ts"]
|
|
8
|
-
}
|
|
9
|
-
},
|
|
10
|
-
"include": ["."],
|
|
11
|
-
"exclude": ["node_modules", "dist"]
|
|
12
|
-
}
|
package/tsconfig.lint.json
DELETED