@machinemetrics/mm-react-components 0.2.3-0 → 0.2.3-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.
Files changed (98) hide show
  1. package/README.md +119 -33
  2. package/agent-docs/agent-documentation-reference.md +247 -0
  3. package/agent-docs/ai-agent-guide.md +554 -0
  4. package/agent-docs/ai-agent-init-guide.md +461 -0
  5. package/agent-docs/chakra-migration-readme.md +265 -0
  6. package/agent-docs/chakra-migration-troubleshooting.md +649 -0
  7. package/agent-docs/component-mapping-reference.md +466 -0
  8. package/agent-docs/init-readme.md +283 -0
  9. package/agent-docs/init-troubleshooting.md +550 -0
  10. package/agent-docs/setup-reference.md +365 -0
  11. package/dist/App.d.ts.map +1 -1
  12. package/dist/README.md +332 -0
  13. package/dist/components/ui/alert-dialog.d.ts +15 -0
  14. package/dist/components/ui/alert-dialog.d.ts.map +1 -0
  15. package/dist/components/ui/alert.d.ts +10 -0
  16. package/dist/components/ui/alert.d.ts.map +1 -0
  17. package/dist/components/ui/avatar.d.ts +7 -0
  18. package/dist/components/ui/avatar.d.ts.map +1 -0
  19. package/dist/components/ui/breadcrumb.d.ts +12 -0
  20. package/dist/components/ui/breadcrumb.d.ts.map +1 -0
  21. package/dist/components/ui/button.d.ts +1 -1
  22. package/dist/components/ui/button.d.ts.map +1 -1
  23. package/dist/components/ui/card.d.ts +10 -0
  24. package/dist/components/ui/card.d.ts.map +1 -0
  25. package/dist/components/ui/chart.d.ts +41 -0
  26. package/dist/components/ui/chart.d.ts.map +1 -0
  27. package/dist/components/ui/form.d.ts +25 -0
  28. package/dist/components/ui/form.d.ts.map +1 -0
  29. package/dist/components/ui/progress.d.ts +1 -0
  30. package/dist/components/ui/progress.d.ts.map +1 -1
  31. package/dist/components/ui/separator.d.ts +5 -0
  32. package/dist/components/ui/separator.d.ts.map +1 -0
  33. package/dist/components/ui/sonner.d.ts +4 -0
  34. package/dist/components/ui/sonner.d.ts.map +1 -0
  35. package/dist/components/ui/textarea.d.ts +4 -0
  36. package/dist/components/ui/textarea.d.ts.map +1 -0
  37. package/dist/docs/GETTING_STARTED.md +293 -0
  38. package/dist/docs/TAILWIND_SETUP.md +8 -1
  39. package/dist/index.d.ts +18 -3
  40. package/dist/index.d.ts.map +1 -1
  41. package/dist/lib/mm-react-components.css +1 -0
  42. package/dist/main.d.ts +0 -1
  43. package/dist/main.d.ts.map +1 -1
  44. package/dist/mm-react-components.es.js +11015 -926
  45. package/dist/mm-react-components.es.js.map +1 -1
  46. package/dist/mm-react-components.umd.js +27 -9
  47. package/dist/mm-react-components.umd.js.map +1 -1
  48. package/dist/preview/AlertDialogPreview.d.ts +2 -0
  49. package/dist/preview/AlertDialogPreview.d.ts.map +1 -0
  50. package/dist/preview/AlertPreview.d.ts +2 -0
  51. package/dist/preview/AlertPreview.d.ts.map +1 -0
  52. package/dist/preview/AvatarPreview.d.ts +2 -0
  53. package/dist/preview/AvatarPreview.d.ts.map +1 -0
  54. package/dist/preview/BreadcrumbPreview.d.ts +2 -0
  55. package/dist/preview/BreadcrumbPreview.d.ts.map +1 -0
  56. package/dist/preview/CardPreview.d.ts +2 -0
  57. package/dist/preview/CardPreview.d.ts.map +1 -0
  58. package/dist/preview/ChartPreview.d.ts +2 -0
  59. package/dist/preview/ChartPreview.d.ts.map +1 -0
  60. package/dist/preview/CheckboxPreview.d.ts.map +1 -1
  61. package/dist/preview/DataTablePreview.d.ts.map +1 -1
  62. package/dist/preview/FormPreview.d.ts +2 -0
  63. package/dist/preview/FormPreview.d.ts.map +1 -0
  64. package/dist/preview/InputPreview.d.ts.map +1 -1
  65. package/dist/preview/LabelPreview.d.ts.map +1 -1
  66. package/dist/preview/RadioGroupPreview.d.ts.map +1 -1
  67. package/dist/preview/SeparatorPreview.d.ts +2 -0
  68. package/dist/preview/SeparatorPreview.d.ts.map +1 -0
  69. package/dist/preview/SonnerPreview.d.ts +2 -0
  70. package/dist/preview/SonnerPreview.d.ts.map +1 -0
  71. package/dist/preview/TabsPreview.d.ts.map +1 -1
  72. package/dist/preview/TextareaPreview.d.ts +2 -0
  73. package/dist/preview/TextareaPreview.d.ts.map +1 -0
  74. package/dist/preview/data-table/data-table-preview_column-content.d.ts +1 -1
  75. package/dist/preview/data-table/data-table-preview_column-content.d.ts.map +1 -1
  76. package/dist/preview/page-header/PageHeaderPreview.d.ts.map +1 -1
  77. package/dist/scripts/chakra-to-shadcn-migrator/chakra-to-shadcn.config.json +512 -0
  78. package/dist/scripts/chakra-to-shadcn-migrator/lib/args.js +63 -0
  79. package/dist/scripts/chakra-to-shadcn-migrator/lib/colors.js +14 -0
  80. package/dist/scripts/chakra-to-shadcn-migrator/lib/config.js +15 -0
  81. package/dist/scripts/chakra-to-shadcn-migrator/lib/deps.js +125 -0
  82. package/dist/scripts/chakra-to-shadcn-migrator/lib/file-io.js +44 -0
  83. package/dist/scripts/chakra-to-shadcn-migrator/lib/render.js +89 -0
  84. package/dist/scripts/chakra-to-shadcn-migrator/lib/transform.js +550 -0
  85. package/dist/scripts/chakra-to-shadcn-migrator/package.json +11 -0
  86. package/dist/scripts/init.cjs +207 -0
  87. package/dist/tailwind.base.config.js +88 -0
  88. package/dist/themes/carbide.css +187 -32
  89. package/docs/TAILWIND_SETUP.md +8 -1
  90. package/package.json +59 -9
  91. package/src/index.css +99 -498
  92. package/dist/index.css +0 -536
  93. package/dist/tailwind.config.export.js +0 -153
  94. package/scripts/README.md +0 -171
  95. package/scripts/chakra-to-shadcn-migrator/README.md +0 -107
  96. package/src/themes/carbide.css +0 -1257
  97. package/tailwind.config.export.js +0 -153
  98. /package/{scripts → dist/scripts}/chakra-to-shadcn-migrator/bin/chakra-to-shadcn.js +0 -0
@@ -0,0 +1,207 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * MM React Components - Zero-Config Init Script
5
+ *
6
+ * Simple initialization script for the MachineMetrics React Components library
7
+ * Uses the zero-config approach with pre-compiled CSS (no build tools needed)
8
+ */
9
+
10
+ /* eslint-disable no-undef */
11
+
12
+ const { execSync } = require('child_process');
13
+ const fs = require('fs');
14
+ const path = require('path');
15
+ const readline = require('readline');
16
+
17
+ // Colors for console output
18
+ const colors = {
19
+ reset: '\x1b[0m',
20
+ bright: '\x1b[1m',
21
+ green: '\x1b[32m',
22
+ blue: '\x1b[34m',
23
+ cyan: '\x1b[36m',
24
+ yellow: '\x1b[33m',
25
+ };
26
+
27
+ function log(message, color = 'reset') {
28
+ console.log(`${colors[color]}${message}${colors.reset}`);
29
+ }
30
+
31
+ function detectChakraUI() {
32
+ const packageJsonPath = path.join(process.cwd(), 'package.json');
33
+ if (!fs.existsSync(packageJsonPath)) {
34
+ return false;
35
+ }
36
+
37
+ const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
38
+ const deps = { ...packageJson.dependencies, ...packageJson.devDependencies };
39
+
40
+ return (
41
+ deps['@chakra-ui/react'] ||
42
+ deps['@chakra-ui/core'] ||
43
+ deps['@chakra-ui/system']
44
+ );
45
+ }
46
+
47
+ function askQuestion(question) {
48
+ const rl = readline.createInterface({
49
+ input: process.stdin,
50
+ output: process.stdout,
51
+ });
52
+
53
+ return new Promise((resolve) => {
54
+ rl.question(question, (answer) => {
55
+ rl.close();
56
+ resolve(answer);
57
+ });
58
+ });
59
+ }
60
+
61
+ async function main() {
62
+ log('🚀 MM React Components - Zero-Config Setup', 'bright');
63
+ log(
64
+ 'Installing MachineMetrics React Components with pre-compiled CSS...\n',
65
+ 'blue',
66
+ );
67
+
68
+ try {
69
+ // Check for Chakra UI before installation
70
+ const hasChakra = detectChakraUI();
71
+
72
+ // Install the component library
73
+ log('📦 Installing MM React Components...', 'cyan');
74
+ execSync('npm install @machinemetrics/mm-react-components@beta', {
75
+ stdio: 'inherit',
76
+ });
77
+ log('✅ MM React Components installed', 'green');
78
+
79
+ log('\n💡 Zero-config mode: No build tools needed!', 'yellow');
80
+ log(' Using pre-compiled CSS (118 KB, 18 KB gzipped)\n', 'cyan');
81
+
82
+ // Create simple CSS import (zero-config approach)
83
+ const srcPath = path.join(process.cwd(), 'src');
84
+ const indexCssPath = path.join(srcPath, 'index.css');
85
+
86
+ // Ensure src directory exists
87
+ if (!fs.existsSync(srcPath)) {
88
+ fs.mkdirSync(srcPath, { recursive: true });
89
+ log('✅ Created src/ directory', 'green');
90
+ }
91
+
92
+ if (fs.existsSync(indexCssPath)) {
93
+ const cssContent = fs.readFileSync(indexCssPath, 'utf8');
94
+ if (!cssContent.includes('@machinemetrics/mm-react-components')) {
95
+ const newCssContent = `/* MM React Components - Pre-compiled CSS (zero-config) */
96
+ @import '@machinemetrics/mm-react-components/styles';
97
+
98
+ ${cssContent}`;
99
+ fs.writeFileSync(indexCssPath, newCssContent);
100
+ log('✅ Added MM styles import to existing index.css', 'green');
101
+ } else {
102
+ log('✅ MM styles import already present in index.css', 'green');
103
+ }
104
+ } else {
105
+ const cssContent = `/* MM React Components - Pre-compiled CSS (zero-config) */
106
+ @import '@machinemetrics/mm-react-components/styles';
107
+ `;
108
+
109
+ fs.writeFileSync(indexCssPath, cssContent);
110
+ log('✅ Created index.css with MM styles import', 'green');
111
+ }
112
+
113
+ // Success message
114
+ log('\n🎉 Zero-Config Setup Complete!', 'green');
115
+ log('\n📚 Next steps:', 'bright');
116
+ log(' 1. Add Carbide class to your root element:');
117
+ log(' document.documentElement.classList.add("carbide")', 'cyan');
118
+ log(' 2. Import components:');
119
+ log(
120
+ ' import { Button, Input } from "@machinemetrics/mm-react-components"',
121
+ 'cyan',
122
+ );
123
+ log(' 3. Use components - everything is pre-styled and ready!');
124
+
125
+ log('\n✅ What you got:', 'bright');
126
+ log(' • Pre-compiled CSS with all Tailwind utilities');
127
+ log(' • Carbide industrial theme');
128
+ log(' • Dark mode support');
129
+ log(' • All component styles (focus, hover, etc.)');
130
+ log(' • Google Fonts included');
131
+
132
+ log('\n💡 No build tools needed!', 'yellow');
133
+ log(' This is a zero-config setup - everything just works!');
134
+
135
+ log('\n📖 Advanced setup (optional):', 'bright');
136
+ log(' Want custom Tailwind config? See docs/DEPENDENCIES.md');
137
+ log(' For theme-only CSS, see docs/CSS_EXPORTS.md');
138
+
139
+ // Offer Chakra migration if detected
140
+ if (hasChakra) {
141
+ log('\n🔄 Chakra UI Detected!', 'yellow');
142
+ log(
143
+ ' We can help you migrate from Chakra UI to MM React Components\n',
144
+ 'cyan',
145
+ );
146
+
147
+ const answer = await askQuestion(
148
+ ' Would you like to run the Chakra UI migration now? (y/N): ',
149
+ );
150
+
151
+ if (answer.toLowerCase() === 'y' || answer.toLowerCase() === 'yes') {
152
+ log('\n🔄 Starting Chakra UI migration...', 'cyan');
153
+
154
+ const migrationScriptPath = path.join(
155
+ __dirname,
156
+ 'chakra-to-shadcn-migrator',
157
+ 'chakra-to-shadcn.js',
158
+ );
159
+
160
+ if (fs.existsSync(migrationScriptPath)) {
161
+ try {
162
+ execSync(`node "${migrationScriptPath}" --apply`, {
163
+ stdio: 'inherit',
164
+ });
165
+ log('\n✅ Chakra UI migration complete!', 'green');
166
+ } catch (error) {
167
+ log('\n⚠️ Migration encountered issues', 'yellow');
168
+ log(` ${error.message}`, 'yellow');
169
+ log(
170
+ ' You can run it manually: node scripts/chakra-to-shadcn-migrator/chakra-to-shadcn.js',
171
+ 'cyan',
172
+ );
173
+ }
174
+ } else {
175
+ log(
176
+ '\n⚠️ Migration script not found at expected location',
177
+ 'yellow',
178
+ );
179
+ log(
180
+ ' Clone the repo to access migration tools: https://github.com/machinemetrics/mm-react-components',
181
+ 'cyan',
182
+ );
183
+ }
184
+ } else {
185
+ log('\n No problem! You can migrate later with:', 'cyan');
186
+ log(
187
+ ' node scripts/chakra-to-shadcn-migrator/chakra-to-shadcn.js --apply',
188
+ 'cyan',
189
+ );
190
+ }
191
+ }
192
+
193
+ log('\n🚀 Happy coding!', 'cyan');
194
+ } catch (error) {
195
+ log(`❌ Setup failed: ${error.message}`, 'red');
196
+ process.exit(1);
197
+ }
198
+ }
199
+
200
+ if (require.main === module) {
201
+ main().catch((error) => {
202
+ log(`❌ Setup failed: ${error.message}`, 'red');
203
+ process.exit(1);
204
+ });
205
+ }
206
+
207
+ module.exports = { main };
@@ -0,0 +1,88 @@
1
+ /** @type {import('tailwindcss').Config} */
2
+ export default {
3
+ darkMode: 'class',
4
+ content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'],
5
+ theme: {
6
+ extend: {
7
+ colors: {
8
+ background: 'var(--background)',
9
+ foreground: 'var(--foreground)',
10
+ card: 'var(--card)',
11
+ 'card-foreground': 'var(--card-foreground)',
12
+ popover: 'var(--popover)',
13
+ 'popover-foreground': 'var(--popover-foreground)',
14
+ primary: 'var(--primary)',
15
+ 'primary-foreground': 'var(--primary-foreground)',
16
+ secondary: 'var(--secondary)',
17
+ 'secondary-foreground': 'var(--secondary-foreground)',
18
+ muted: 'var(--muted)',
19
+ 'muted-foreground': 'var(--muted-foreground)',
20
+ accent: 'var(--accent)',
21
+ 'accent-foreground': 'var(--accent-foreground)',
22
+ destructive: 'var(--destructive)',
23
+ border: 'var(--border)',
24
+ input: 'var(--input)',
25
+ 'bg-input': 'var(--bg-input)',
26
+ 'border-input': 'var(--border-input)',
27
+ ring: 'var(--ring)',
28
+ },
29
+ borderRadius: {
30
+ sm: 'var(--radius-sm)',
31
+ md: 'var(--radius-md)',
32
+ lg: 'var(--radius-lg)',
33
+ xl: 'var(--radius-xl)',
34
+ },
35
+ fontFamily: {
36
+ sans: [
37
+ 'Inter',
38
+ 'ui-sans-serif',
39
+ 'system-ui',
40
+ '-apple-system',
41
+ 'BlinkMacSystemFont',
42
+ 'Segoe UI',
43
+ 'Roboto',
44
+ 'Helvetica Neue',
45
+ 'Arial',
46
+ 'Noto Sans',
47
+ 'sans-serif',
48
+ 'Apple Color Emoji',
49
+ 'Segoe UI Emoji',
50
+ 'Segoe UI Symbol',
51
+ 'Noto Color Emoji',
52
+ ],
53
+ },
54
+ fontWeight: {
55
+ normal: '400',
56
+ medium: '500',
57
+ semibold: '600',
58
+ bold: 'var(--font-weight-bold)',
59
+ },
60
+ keyframes: {
61
+ 'collapsible-down': {
62
+ from: { height: '0' },
63
+ to: { height: 'var(--radix-collapsible-content-height)' },
64
+ },
65
+ 'collapsible-up': {
66
+ from: { height: 'var(--radix-collapsible-content-height)' },
67
+ to: { height: '0' },
68
+ },
69
+ 'accordion-down': {
70
+ from: { height: '0' },
71
+ to: { height: 'var(--radix-accordion-content-height)' },
72
+ },
73
+ 'accordion-up': {
74
+ from: { height: 'var(--radix-accordion-content-height)' },
75
+ to: { height: '0' },
76
+ },
77
+ },
78
+ animation: {
79
+ 'collapsible-down':
80
+ 'collapsible-down 0.3s cubic-bezier(0.4, 0, 0.2, 1)',
81
+ 'collapsible-up': 'collapsible-up 0.3s cubic-bezier(0.4, 0, 0.2, 1)',
82
+ 'accordion-down': 'accordion-down 0.3s cubic-bezier(0.4, 0, 0.2, 1)',
83
+ 'accordion-up': 'accordion-up 0.3s cubic-bezier(0.4, 0, 0.2, 1)',
84
+ },
85
+ },
86
+ },
87
+ plugins: [],
88
+ };
@@ -1,7 +1,162 @@
1
+ /* Note: Font imports are now handled in src/lib/styles.css to avoid @import ordering issues */
2
+
3
+ :root {
4
+ --radius: 0.5rem;
5
+ --radius-sm: 4px;
6
+ --radius-md: calc(var(--radius) - 2px);
7
+ --radius-lg: var(--radius);
8
+ --radius-xl: calc(var(--radius) + 4px);
9
+ --background: oklch(1 0 0);
10
+ --foreground: oklch(0.145 0 0);
11
+ --card: oklch(1 0 0);
12
+ --card-foreground: oklch(0.145 0 0);
13
+ --popover: oklch(1 0 0);
14
+ --popover-foreground: oklch(0.145 0 0);
15
+ --primary: oklch(0.205 0 0);
16
+ --primary-foreground: oklch(0.985 0 0);
17
+ --secondary: oklch(0.97 0 0);
18
+ --secondary-foreground: oklch(0.205 0 0);
19
+ --muted: oklch(0.97 0 0);
20
+ --muted-foreground: oklch(0.556 0 0);
21
+ --accent: oklch(0.97 0 0);
22
+ --accent-foreground: oklch(0.205 0 0);
23
+ --destructive: oklch(0.577 0.245 27.325);
24
+ --border: oklch(0.922 0 0);
25
+ --input: oklch(0.922 0 0);
26
+ --ring: oklch(0.708 0 0);
27
+ --chart-1: #5a67d8;
28
+ --chart-2: #319795;
29
+ --chart-3: #38a169;
30
+ --chart-4: #dd6b20;
31
+ --chart-5: #805ad5;
32
+ --sidebar: oklch(0.985 0 0);
33
+ --sidebar-foreground: oklch(0.145 0 0);
34
+ --sidebar-primary: oklch(0.205 0 0);
35
+ --sidebar-primary-foreground: oklch(0.985 0 0);
36
+ --sidebar-accent: oklch(0.97 0 0);
37
+ --sidebar-accent-foreground: oklch(0.205 0 0);
38
+ --sidebar-border: oklch(0.922 0 0);
39
+ --sidebar-ring: oklch(0.708 0 0);
40
+
41
+ /* Overlay token (base) */
42
+ --overlay-bg: rgba(0, 0, 0, 0.8);
43
+
44
+ /* --- Typography tokens (shadcn/ui reference) --- */
45
+ --font-sans:
46
+ ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
47
+ Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif,
48
+ 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
49
+ --font-mono:
50
+ ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono',
51
+ 'Courier New', monospace;
52
+ --font-heading: var(--font-sans);
53
+ --font-body: var(--font-sans);
54
+
55
+ --text-base-size: 1rem; /* 16px */
56
+ --text-sm-size: 0.875rem; /* 14px */
57
+ --text-lg-size: 1.125rem; /* 18px */
58
+
59
+ --font-weight-normal: 400;
60
+ --font-weight-medium: 500;
61
+ --font-weight-bold: 700;
62
+
63
+ --leading-tight: 1.25;
64
+ --leading-normal: 1.5;
65
+
66
+ --tracking-tight: -0.015em;
67
+ --tracking-normal: 0;
68
+ }
69
+
70
+ .dark {
71
+ --background: oklch(0.145 0 0);
72
+ --foreground: oklch(0.985 0 0);
73
+ --card: oklch(0.205 0 0);
74
+ --card-foreground: oklch(0.985 0 0);
75
+ --popover: oklch(0.205 0 0);
76
+ --popover-foreground: oklch(0.985 0 0);
77
+ --primary: oklch(0.922 0 0);
78
+ --primary-foreground: oklch(0.205 0 0);
79
+ --secondary: oklch(0.269 0 0);
80
+ --secondary-foreground: oklch(0.985 0 0);
81
+ --muted: oklch(0.269 0 0);
82
+ --muted-foreground: oklch(0.708 0 0);
83
+ --accent: oklch(0.269 0 0);
84
+ --accent-foreground: oklch(0.985 0 0);
85
+ --destructive: oklch(0.704 0.191 22.216);
86
+ --border: oklch(1 0 0 / 10%);
87
+ --input: oklch(1 0 0 / 15%);
88
+ --ring: oklch(0.556 0 0);
89
+ --chart-1: #667eea;
90
+ --chart-2: #4fd1c5;
91
+ --chart-3: #48bb78;
92
+ --chart-4: #ed8936;
93
+ --chart-5: #9f7aea;
94
+ --sidebar: oklch(0.205 0 0);
95
+ --sidebar-foreground: oklch(0.985 0 0);
96
+ --sidebar-primary: oklch(0.488 0.243 264.376);
97
+ --sidebar-primary-foreground: oklch(0.985 0 0);
98
+ --sidebar-accent: oklch(0.269 0 0);
99
+ --sidebar-accent-foreground: oklch(0.985 0 0);
100
+ --sidebar-border: oklch(1 0 0 / 10%);
101
+ --sidebar-ring: oklch(0.556 0 0);
102
+ }
103
+
104
+ /* Collapsible animations using Radix-provided height variable */
105
+ @keyframes mm-collapsible-down {
106
+ from {
107
+ height: 0;
108
+ opacity: 0;
109
+ }
110
+ to {
111
+ height: var(--radix-collapsible-content-height);
112
+ opacity: 1;
113
+ }
114
+ }
115
+
116
+ @keyframes mm-collapsible-up {
117
+ from {
118
+ height: var(--radix-collapsible-content-height);
119
+ opacity: 1;
120
+ }
121
+ to {
122
+ height: 0;
123
+ opacity: 0;
124
+ }
125
+ }
126
+
127
+ /* Accordion animations (core theme) */
128
+ @keyframes accordion-down {
129
+ from {
130
+ height: 0;
131
+ }
132
+ to {
133
+ height: var(--radix-accordion-content-height);
134
+ }
135
+ }
136
+
137
+ @keyframes accordion-up {
138
+ from {
139
+ height: var(--radix-accordion-content-height);
140
+ }
141
+ to {
142
+ height: 0;
143
+ }
144
+ }
145
+
146
+ /* JS-driven height animation now handles height. Keep only overflow hidden. */
147
+ [data-slot='collapsible-content'] {
148
+ overflow: hidden;
149
+ }
150
+ /* Radix sets hidden on closed when forceMount is used; override to enable CSS animation */
151
+ [data-slot='collapsible-content'][hidden] {
152
+ display: block !important;
153
+ }
154
+ /* JS controls height now; avoid conflicting state heights */
155
+
1
156
  .carbide {
2
157
  /* =============================
3
- TYPOGRAPHY
4
- ============================= */
158
+ TYPOGRAPHY
159
+ ============================= */
5
160
 
6
161
  /* Core Fonts */
7
162
  --font-sans:
@@ -17,8 +172,8 @@
17
172
  --font-weight-bold: 600;
18
173
 
19
174
  /* =============================
20
- COLORS
21
- ============================= */
175
+ COLORS
176
+ ============================= */
22
177
 
23
178
  /* Brand */
24
179
  --brand-green: #15a500;
@@ -193,13 +348,13 @@
193
348
 
194
349
  /* =============================
195
350
  SURFACES (GENERIC)
196
- ============================= */
351
+ ============================= */
197
352
  /* Neutral control rail/background surface used across components */
198
353
  --surface-neutral: var(--grey-300);
199
354
 
200
355
  /* =============================
201
356
  TABLIST
202
- ============================= */
357
+ ============================= */
203
358
  --tablist-bg: var(--grey-200);
204
359
  --tablist-fg: var(--grey-700);
205
360
  --tablist-active-bg: var(--grey-00);
@@ -208,14 +363,14 @@
208
363
 
209
364
  /* =============================
210
365
  TABLE HEADER
211
- ============================= */
366
+ ============================= */
212
367
  --tablehead-bg: var(--muted);
213
368
  --tablehead-fg: var(--foreground);
214
369
  --tablehead-border: var(--border);
215
370
 
216
371
  /* =============================
217
372
  BUTTONS
218
- ============================= */
373
+ ============================= */
219
374
  --button-secondary-bg: transparent;
220
375
  --button-secondary-border: var(--grey-700);
221
376
  --button-secondary-hover-bg: var(--grey-150);
@@ -234,7 +389,7 @@
234
389
 
235
390
  /* =============================
236
391
  INPUT/OUTLINE/OVERLAY SURFACES
237
- ============================= */
392
+ ============================= */
238
393
  --input-surface-bg: #202734;
239
394
  --input-surface-border: #2d3748;
240
395
  --input-surface-hover-bg: #242c3a;
@@ -242,14 +397,14 @@
242
397
 
243
398
  /* =============================
244
399
  BADGE: TYPOGRAPHY
245
- ============================= */
400
+ ============================= */
246
401
  .carbide [data-slot='badge'] {
247
402
  font-weight: 400;
248
403
  }
249
404
 
250
405
  /* =============================
251
406
  KNOWLEDGE HUB STATUS BADGES
252
- ============================= */
407
+ ============================= */
253
408
  .carbide .mmc-khub [data-slot='badge'] {
254
409
  border-radius: 9999px;
255
410
  }
@@ -312,7 +467,7 @@
312
467
 
313
468
  /* =============================
314
469
  BUTTON: ICON SIZE DEFAULT
315
- ============================= */
470
+ ============================= */
316
471
  /* Default all button icons to 16px; :where() keeps specificity low so consumers can override */
317
472
  .carbide [data-slot='button'] svg {
318
473
  width: 16px;
@@ -321,7 +476,7 @@
321
476
 
322
477
  /* =============================
323
478
  BUTTON VARIANTS (LIGHT)
324
- ============================= */
479
+ ============================= */
325
480
  .carbide [data-slot='button'][data-variant='default']:not([disabled]) {
326
481
  background-color: var(--primary);
327
482
  color: var(--primary-foreground);
@@ -457,7 +612,7 @@
457
612
 
458
613
  /* =============================
459
614
  BUTTON VARIANTS (DARK)
460
- ============================= */
615
+ ============================= */
461
616
  .carbide.dark [data-slot='button'][data-variant='default']:not([disabled]) {
462
617
  background-color: var(--primary);
463
618
  color: var(--primary-foreground);
@@ -514,7 +669,7 @@
514
669
 
515
670
  /* =============================
516
671
  INPUT
517
- ============================= */
672
+ ============================= */
518
673
  .carbide [data-slot='input'] {
519
674
  background-color: var(--bg-input);
520
675
  border-color: var(--border-input);
@@ -575,7 +730,7 @@
575
730
 
576
731
  /* =============================
577
732
  SELECT
578
- ============================= */
733
+ ============================= */
579
734
  .carbide [data-slot='select-trigger'] {
580
735
  background-color: var(--bg-input);
581
736
  border-color: var(--border-input);
@@ -648,7 +803,7 @@
648
803
 
649
804
  /* =============================
650
805
  DROPDOWN MENU
651
- ============================= */
806
+ ============================= */
652
807
  .carbide [data-slot='dropdown-menu-content'] {
653
808
  background-color: var(--popover);
654
809
  color: var(--popover-foreground);
@@ -736,7 +891,7 @@
736
891
 
737
892
  /* =============================
738
893
  TOOLTIP
739
- ============================= */
894
+ ============================= */
740
895
  .carbide [data-slot='tooltip-content'] {
741
896
  background-color: var(--foreground);
742
897
  color: var(--background);
@@ -755,7 +910,7 @@
755
910
 
756
911
  /* =============================
757
912
  OVERLAYS & DIALOG/SHEET/DRAWER
758
- ============================= */
913
+ ============================= */
759
914
  .carbide [data-slot='dialog-overlay'],
760
915
  .carbide [data-slot='sheet-overlay'],
761
916
  .carbide [data-slot='drawer-overlay'] {
@@ -838,7 +993,7 @@
838
993
 
839
994
  /* =============================
840
995
  TABLE
841
- ============================= */
996
+ ============================= */
842
997
  .carbide [data-slot='table-wrapper'] {
843
998
  background-color: var(--card);
844
999
  color: var(--card-foreground);
@@ -852,7 +1007,7 @@
852
1007
 
853
1008
  /* =============================
854
1009
  TABS
855
- ============================= */
1010
+ ============================= */
856
1011
  .carbide [data-slot='tabs-list'][data-variant='default'] {
857
1012
  background-color: var(--tablist-bg);
858
1013
  color: var(--tablist-fg);
@@ -905,7 +1060,7 @@
905
1060
  }
906
1061
  /* =============================
907
1062
  UTILITY OVERRIDES
908
- ============================= */
1063
+ ============================= */
909
1064
 
910
1065
  /*
911
1066
  Force correct text color for destructive badges and elements using text-destructive-foreground.
@@ -932,7 +1087,7 @@
932
1087
 
933
1088
  /* =============================
934
1089
  PROGRESS (SEMANTIC HOOK)
935
- ============================= */
1090
+ ============================= */
936
1091
  .carbide [data-slot='progress'] {
937
1092
  background-color: var(--surface-neutral);
938
1093
  }
@@ -943,7 +1098,7 @@
943
1098
 
944
1099
  /* =============================
945
1100
  ACCORDION
946
- ============================= */
1101
+ ============================= */
947
1102
  .carbide [data-slot='accordion'] [data-slot='accordion-item'] {
948
1103
  border-bottom: 1px solid var(--border);
949
1104
  }
@@ -953,7 +1108,7 @@
953
1108
 
954
1109
  /* =============================
955
1110
  POPOVER
956
- ============================= */
1111
+ ============================= */
957
1112
  .carbide [data-slot='popover-content'] {
958
1113
  background-color: var(--popover);
959
1114
  color: var(--popover-foreground);
@@ -969,10 +1124,10 @@
969
1124
 
970
1125
  /* =============================
971
1126
  SLIDER (SEMANTIC HOOK)
972
- ============================= */
1127
+ ============================= */
973
1128
  /* =============================
974
1129
  CHECKBOX (SEMANTIC HOOK)
975
- ============================= */
1130
+ ============================= */
976
1131
  .carbide [data-slot='checkbox'] {
977
1132
  border-color: var(--border-input) !important;
978
1133
  background-color: var(--bg-input);
@@ -998,7 +1153,7 @@
998
1153
 
999
1154
  /* =============================
1000
1155
  RADIO GROUP ITEM
1001
- ============================= */
1156
+ ============================= */
1002
1157
  .carbide [data-slot='radio-group-item'] {
1003
1158
  border-color: var(--border-input);
1004
1159
  background-color: var(--bg-input);
@@ -1023,7 +1178,7 @@
1023
1178
 
1024
1179
  /* =============================
1025
1180
  FORM CONTROL FOCUS + INVALID STATES
1026
- ============================= */
1181
+ ============================= */
1027
1182
  .carbide [data-slot='checkbox']:focus-visible,
1028
1183
  .carbide [data-slot='radio-group-item']:focus-visible,
1029
1184
  .carbide [data-slot='switch']:focus-visible {
@@ -1046,7 +1201,7 @@
1046
1201
 
1047
1202
  /* =============================
1048
1203
  SWITCH (SEMANTIC HOOK)
1049
- ============================= */
1204
+ ============================= */
1050
1205
  .carbide [data-slot='switch'] {
1051
1206
  border-color: transparent;
1052
1207
  }
@@ -1074,7 +1229,7 @@
1074
1229
 
1075
1230
  /* =============================
1076
1231
  CALENDAR (SEMANTIC HOOK)
1077
- ============================= */
1232
+ ============================= */
1078
1233
  .carbide [data-slot='calendar'] {
1079
1234
  background-color: var(--card);
1080
1235
  color: var(--card-foreground);
@@ -1125,7 +1280,7 @@
1125
1280
 
1126
1281
  /* =============================
1127
1282
  DATA TABLE: ALIGNMENT BASELINE FIX
1128
- ============================= */
1283
+ ============================= */
1129
1284
  /* Unify left-aligned body cells to the sortable-header baseline (0.25rem) */
1130
1285
  .carbide
1131
1286
  td.text-left[data-col-id]:not([data-col-id='select']):not(