@foundrykit/components 2.2.0 → 2.2.3

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.
Files changed (105) hide show
  1. package/dist/chunk-4WYKNDYY.js +91 -0
  2. package/dist/chunk-4WYKNDYY.js.map +1 -0
  3. package/dist/chunk-5CXNMTIN.js +84 -0
  4. package/dist/chunk-5CXNMTIN.js.map +1 -0
  5. package/dist/chunk-B5ZTF5MZ.js +203 -0
  6. package/dist/chunk-B5ZTF5MZ.js.map +1 -0
  7. package/dist/chunk-EDNWBEKV.js +51 -0
  8. package/dist/chunk-EDNWBEKV.js.map +1 -0
  9. package/dist/chunk-ID7BFTID.js +248 -0
  10. package/dist/chunk-ID7BFTID.js.map +1 -0
  11. package/dist/chunk-IYBHXVCH.js +181 -0
  12. package/dist/chunk-IYBHXVCH.js.map +1 -0
  13. package/dist/chunk-KQZEF7PS.js +71 -0
  14. package/dist/chunk-KQZEF7PS.js.map +1 -0
  15. package/dist/chunk-P3GSYR7O.js +889 -0
  16. package/dist/chunk-P3GSYR7O.js.map +1 -0
  17. package/dist/chunk-PKSRYDN4.js +168 -0
  18. package/dist/chunk-PKSRYDN4.js.map +1 -0
  19. package/dist/chunk-SFM7ZMG2.js +104 -0
  20. package/dist/chunk-SFM7ZMG2.js.map +1 -0
  21. package/dist/chunk-TLQQZJUR.js +126 -0
  22. package/dist/chunk-TLQQZJUR.js.map +1 -0
  23. package/dist/chunk-UE7CDYEN.js +59 -0
  24. package/dist/chunk-UE7CDYEN.js.map +1 -0
  25. package/dist/chunk-UG7YS3D5.js +198 -0
  26. package/dist/chunk-UG7YS3D5.js.map +1 -0
  27. package/dist/components/advanced-search-bar/index.d.ts +308 -0
  28. package/dist/components/advanced-search-bar/index.js +34 -0
  29. package/dist/components/advanced-search-bar/index.js.map +1 -0
  30. package/dist/components/calendar/index.d.ts +20 -0
  31. package/dist/components/calendar/index.js +11 -0
  32. package/dist/components/calendar/index.js.map +1 -0
  33. package/dist/components/carousel/index.d.ts +40 -0
  34. package/dist/components/carousel/index.js +17 -0
  35. package/dist/components/carousel/index.js.map +1 -0
  36. package/dist/components/chart/index.d.ts +59 -0
  37. package/dist/components/chart/index.js +21 -0
  38. package/dist/components/chart/index.js.map +1 -0
  39. package/dist/components/combobox/index.d.ts +33 -0
  40. package/dist/components/combobox/index.js +10 -0
  41. package/dist/components/combobox/index.js.map +1 -0
  42. package/dist/components/command/index.d.ts +33 -0
  43. package/dist/components/command/index.js +25 -0
  44. package/dist/components/command/index.js.map +1 -0
  45. package/dist/components/data-table/index.d.ts +17 -0
  46. package/dist/components/data-table/index.js +9 -0
  47. package/dist/components/data-table/index.js.map +1 -0
  48. package/dist/components/date-picker/index.d.ts +17 -0
  49. package/dist/components/date-picker/index.js +9 -0
  50. package/dist/components/date-picker/index.js.map +1 -0
  51. package/dist/components/form/index.d.ts +37 -0
  52. package/dist/components/form/index.js +23 -0
  53. package/dist/components/form/index.js.map +1 -0
  54. package/dist/components/input-otp/index.d.ts +30 -0
  55. package/dist/components/input-otp/index.js +15 -0
  56. package/dist/components/input-otp/index.js.map +1 -0
  57. package/dist/components/pagination/index.d.ts +26 -0
  58. package/dist/components/pagination/index.js +20 -0
  59. package/dist/components/pagination/index.js.map +1 -0
  60. package/dist/components/search-bar/index.d.ts +17 -0
  61. package/dist/components/search-bar/index.js +9 -0
  62. package/dist/components/search-bar/index.js.map +1 -0
  63. package/dist/components/sidebar/index.d.ts +70 -0
  64. package/dist/components/sidebar/index.js +652 -0
  65. package/dist/components/sidebar/index.js.map +1 -0
  66. package/dist/components/theme-toggle/index.d.ts +20 -0
  67. package/dist/components/theme-toggle/index.js +9 -0
  68. package/dist/components/theme-toggle/index.js.map +1 -0
  69. package/dist/index.d.ts +27 -605
  70. package/dist/index.js +73 -2337
  71. package/dist/index.js.map +1 -1
  72. package/package.json +17 -10
  73. package/CHANGELOG.md +0 -362
  74. package/src/components/advanced-search-bar/config.ts +0 -223
  75. package/src/components/advanced-search-bar/index.tsx +0 -1415
  76. package/src/components/calendar/config.ts +0 -51
  77. package/src/components/calendar/index.tsx +0 -225
  78. package/src/components/carousel/config.ts +0 -28
  79. package/src/components/carousel/index.tsx +0 -258
  80. package/src/components/chart/config.ts +0 -28
  81. package/src/components/chart/index.tsx +0 -365
  82. package/src/components/combobox/config.ts +0 -28
  83. package/src/components/combobox/index.tsx +0 -111
  84. package/src/components/command/config.ts +0 -804
  85. package/src/components/command/index.tsx +0 -195
  86. package/src/components/data-table/config.ts +0 -28
  87. package/src/components/data-table/index.tsx +0 -124
  88. package/src/components/date-picker/config.ts +0 -55
  89. package/src/components/date-picker/index.tsx +0 -207
  90. package/src/components/form/config.ts +0 -21
  91. package/src/components/form/index.tsx +0 -150
  92. package/src/components/input-otp/config.ts +0 -28
  93. package/src/components/input-otp/index.tsx +0 -92
  94. package/src/components/pagination/config.ts +0 -367
  95. package/src/components/pagination/index.tsx +0 -135
  96. package/src/components/search-bar/config.ts +0 -58
  97. package/src/components/search-bar/index.tsx +0 -70
  98. package/src/components/sidebar/config.ts +0 -29
  99. package/src/components/sidebar/index.tsx +0 -723
  100. package/src/components/theme-toggle/config.ts +0 -27
  101. package/src/components/theme-toggle/index.tsx +0 -63
  102. package/src/index.ts +0 -83
  103. package/tsconfig.json +0 -12
  104. package/tsconfig.lint.json +0 -8
  105. package/tsup.config.ts +0 -11
@@ -1,27 +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: 'Toggles the .dark class on <html>',
16
- code: '<ThemeToggle />',
17
- preview: {
18
- type: 'component',
19
- component: 'ThemeToggle',
20
- props: {},
21
- },
22
- },
23
- ],
24
- dependencies: ['utils', 'toggle'],
25
- packageDependencies: ['lucide-react'],
26
- files: ['components/theme-toggle/index.tsx'],
27
- };
@@ -1,63 +0,0 @@
1
- 'use client';
2
-
3
- import { Toggle } from '@foundrykit/primitives';
4
- import { cn } from '@foundrykit/utils';
5
- import { MoonIcon, SunIcon } from 'lucide-react';
6
- import { useEffect, useState } from 'react';
7
-
8
- /**
9
- * Dark mode toggle. Flips the `.dark` class on `<html>`, which drives the
10
- * `@foundrykit/tailwind` dark tokens. Exposes one state to assistive tech:
11
- * a fixed "Dark mode" label with `aria-pressed`.
12
- *
13
- * While the class flips, `.theme-switching` is set on `<html>` so transitions
14
- * are suppressed (the rule ships in `@foundrykit/tailwind/globals.css`).
15
- *
16
- * @example
17
- * ```tsx
18
- * <ThemeToggle />
19
- * ```
20
- */
21
- export function ThemeToggle({ className }: { className?: string }) {
22
- const [dark, setDark] = useState(false);
23
-
24
- // Read the class after mount so the server and first client render match.
25
- useEffect(() => {
26
- setDark(document.documentElement.classList.contains('dark'));
27
- }, []);
28
-
29
- const toggle = (next: boolean) => {
30
- const root = document.documentElement;
31
- root.classList.add('theme-switching');
32
- root.classList.toggle('dark', next);
33
- setDark(next);
34
- // Re-enable transitions once the new theme has painted.
35
- requestAnimationFrame(() =>
36
- requestAnimationFrame(() => root.classList.remove('theme-switching'))
37
- );
38
- };
39
-
40
- return (
41
- <Toggle
42
- variant='outline'
43
- aria-label='Dark mode'
44
- pressed={dark}
45
- onPressedChange={toggle}
46
- className={cn(
47
- 'data-[state=on]:hover:bg-muted group size-9 transition-[color,box-shadow,scale] duration-150 ease-out data-[state=on]:bg-transparent motion-safe:active:scale-[0.97]',
48
- className
49
- )}
50
- >
51
- <MoonIcon
52
- size={16}
53
- className='hidden shrink-0 group-data-[state=on]:block'
54
- aria-hidden='true'
55
- />
56
- <SunIcon
57
- size={16}
58
- className='shrink-0 group-data-[state=on]:hidden'
59
- aria-hidden='true'
60
- />
61
- </Toggle>
62
- );
63
- }
package/src/index.ts DELETED
@@ -1,83 +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';
83
- export { ThemeToggle } from './components/theme-toggle/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
- }
@@ -1,8 +0,0 @@
1
- {
2
- "extends": "@foundrykit/typescript-config/react-library.json",
3
- "compilerOptions": {
4
- "outDir": "dist"
5
- },
6
- "include": ["src", "turbo"],
7
- "exclude": ["node_modules", "dist"]
8
- }
package/tsup.config.ts DELETED
@@ -1,11 +0,0 @@
1
- import { defineConfig } from 'tsup';
2
-
3
- export default defineConfig({
4
- entry: ['src/index.ts'],
5
- format: ['esm'],
6
- dts: true,
7
- splitting: false,
8
- sourcemap: true,
9
- clean: true,
10
- external: ['react', 'react-dom'],
11
- });