@machinemetrics/mm-react-components 0.2.3-2 → 0.2.3-20

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 (160) hide show
  1. package/README.md +89 -30
  2. package/agent-docs/agent-documentation-reference.md +364 -0
  3. package/agent-docs/ai-agent-guide.md +558 -0
  4. package/agent-docs/ai-agent-init-guide.md +465 -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 +89 -30
  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.map +1 -1
  22. package/dist/components/ui/card.d.ts +10 -0
  23. package/dist/components/ui/card.d.ts.map +1 -0
  24. package/dist/components/ui/chart.d.ts +41 -0
  25. package/dist/components/ui/chart.d.ts.map +1 -0
  26. package/dist/components/ui/command.d.ts +19 -0
  27. package/dist/components/ui/command.d.ts.map +1 -0
  28. package/dist/components/ui/data-table/TableView.d.ts.map +1 -1
  29. package/dist/components/ui/data-table/cards/RowCard.d.ts.map +1 -1
  30. package/dist/components/ui/data-table/index.d.ts +3 -1
  31. package/dist/components/ui/data-table/index.d.ts.map +1 -1
  32. package/dist/components/ui/data-table/parts/BatchActionsToolbar.d.ts +6 -0
  33. package/dist/components/ui/data-table/parts/BatchActionsToolbar.d.ts.map +1 -0
  34. package/dist/components/ui/data-table/parts/CellContent.d.ts +7 -0
  35. package/dist/components/ui/data-table/parts/CellContent.d.ts.map +1 -0
  36. package/dist/components/ui/data-table/parts/ColGroup.d.ts +7 -0
  37. package/dist/components/ui/data-table/parts/ColGroup.d.ts.map +1 -0
  38. package/dist/components/ui/data-table/parts/SortableHeader.d.ts +13 -0
  39. package/dist/components/ui/data-table/parts/SortableHeader.d.ts.map +1 -0
  40. package/dist/components/ui/data-table/parts/TableBody.d.ts +11 -0
  41. package/dist/components/ui/data-table/parts/TableBody.d.ts.map +1 -0
  42. package/dist/components/ui/data-table/parts/TableHeader.d.ts +15 -0
  43. package/dist/components/ui/data-table/parts/TableHeader.d.ts.map +1 -0
  44. package/dist/components/ui/data-table/toolbar/DataTableToolbar.d.ts.map +1 -1
  45. package/dist/components/ui/data-table/types.d.ts +18 -10
  46. package/dist/components/ui/data-table/types.d.ts.map +1 -1
  47. package/dist/components/ui/data-table/utils.d.ts +2 -0
  48. package/dist/components/ui/data-table/utils.d.ts.map +1 -1
  49. package/dist/components/ui/date-picker.d.ts +36 -0
  50. package/dist/components/ui/date-picker.d.ts.map +1 -0
  51. package/dist/components/ui/dropdown-menu.d.ts +1 -1
  52. package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
  53. package/dist/components/ui/form.d.ts +25 -0
  54. package/dist/components/ui/form.d.ts.map +1 -0
  55. package/dist/components/ui/hero-metric-card/HeroMetricCard.d.ts +4 -0
  56. package/dist/components/ui/hero-metric-card/HeroMetricCard.d.ts.map +1 -0
  57. package/dist/components/ui/hero-metric-card/HeroMetricCardItem.d.ts +4 -0
  58. package/dist/components/ui/hero-metric-card/HeroMetricCardItem.d.ts.map +1 -0
  59. package/dist/components/ui/hero-metric-card/constants.d.ts +13 -0
  60. package/dist/components/ui/hero-metric-card/constants.d.ts.map +1 -0
  61. package/dist/components/ui/hero-metric-card/grid.d.ts +4 -0
  62. package/dist/components/ui/hero-metric-card/grid.d.ts.map +1 -0
  63. package/dist/components/ui/hero-metric-card/hooks.d.ts +6 -0
  64. package/dist/components/ui/hero-metric-card/hooks.d.ts.map +1 -0
  65. package/dist/components/ui/hero-metric-card/index.d.ts +5 -0
  66. package/dist/components/ui/hero-metric-card/index.d.ts.map +1 -0
  67. package/dist/components/ui/hero-metric-card/parsing.d.ts +11 -0
  68. package/dist/components/ui/hero-metric-card/parsing.d.ts.map +1 -0
  69. package/dist/components/ui/hero-metric-card/refs.d.ts +3 -0
  70. package/dist/components/ui/hero-metric-card/refs.d.ts.map +1 -0
  71. package/dist/components/ui/hero-metric-card/trend.d.ts +4 -0
  72. package/dist/components/ui/hero-metric-card/trend.d.ts.map +1 -0
  73. package/dist/components/ui/hero-metric-card/types.d.ts +60 -0
  74. package/dist/components/ui/hero-metric-card/types.d.ts.map +1 -0
  75. package/dist/components/ui/hero-metric-card/utils.d.ts +10 -0
  76. package/dist/components/ui/hero-metric-card/utils.d.ts.map +1 -0
  77. package/dist/components/ui/pagination.d.ts +14 -0
  78. package/dist/components/ui/pagination.d.ts.map +1 -0
  79. package/dist/components/ui/progress.d.ts +1 -0
  80. package/dist/components/ui/progress.d.ts.map +1 -1
  81. package/dist/components/ui/separator.d.ts +5 -0
  82. package/dist/components/ui/separator.d.ts.map +1 -0
  83. package/dist/components/ui/simple-pagination.d.ts +8 -0
  84. package/dist/components/ui/simple-pagination.d.ts.map +1 -0
  85. package/dist/components/ui/sonner.d.ts +4 -0
  86. package/dist/components/ui/sonner.d.ts.map +1 -0
  87. package/dist/components/ui/spinner-carbide.d.ts +5 -0
  88. package/dist/components/ui/spinner-carbide.d.ts.map +1 -0
  89. package/dist/components/ui/spinner.d.ts +4 -0
  90. package/dist/components/ui/spinner.d.ts.map +1 -0
  91. package/dist/components/ui/textarea.d.ts +4 -0
  92. package/dist/components/ui/textarea.d.ts.map +1 -0
  93. package/dist/docs/GETTING_STARTED.md +13 -5
  94. package/dist/index.d.ts +22 -0
  95. package/dist/index.d.ts.map +1 -1
  96. package/dist/lib/mm-react-components.css +1 -0
  97. package/dist/main.d.ts +1 -2
  98. package/dist/main.d.ts.map +1 -1
  99. package/dist/mm-react-components.es.js +16536 -7051
  100. package/dist/mm-react-components.es.js.map +1 -1
  101. package/dist/mm-react-components.umd.js +28 -11
  102. package/dist/mm-react-components.umd.js.map +1 -1
  103. package/dist/preview/AlertDialogPreview.d.ts +2 -0
  104. package/dist/preview/AlertDialogPreview.d.ts.map +1 -0
  105. package/dist/preview/AlertPreview.d.ts +2 -0
  106. package/dist/preview/AlertPreview.d.ts.map +1 -0
  107. package/dist/preview/AvatarPreview.d.ts +2 -0
  108. package/dist/preview/AvatarPreview.d.ts.map +1 -0
  109. package/dist/preview/BreadcrumbPreview.d.ts +2 -0
  110. package/dist/preview/BreadcrumbPreview.d.ts.map +1 -0
  111. package/dist/preview/CardPreview.d.ts +2 -0
  112. package/dist/preview/CardPreview.d.ts.map +1 -0
  113. package/dist/preview/ChartPreview.d.ts +2 -0
  114. package/dist/preview/ChartPreview.d.ts.map +1 -0
  115. package/dist/preview/ColorsPreview.d.ts +7 -0
  116. package/dist/preview/ColorsPreview.d.ts.map +1 -0
  117. package/dist/preview/CommandPreview.d.ts +2 -0
  118. package/dist/preview/CommandPreview.d.ts.map +1 -0
  119. package/dist/preview/DataTablePreview.d.ts.map +1 -1
  120. package/dist/preview/DatePickerPreview.d.ts +2 -0
  121. package/dist/preview/DatePickerPreview.d.ts.map +1 -0
  122. package/dist/preview/DateRangePickerPreview.d.ts.map +1 -1
  123. package/dist/preview/FormPreview.d.ts +2 -0
  124. package/dist/preview/FormPreview.d.ts.map +1 -0
  125. package/dist/preview/HeroMetricCardPreview.d.ts +2 -0
  126. package/dist/preview/HeroMetricCardPreview.d.ts.map +1 -0
  127. package/dist/preview/PaginationPreview.d.ts +2 -0
  128. package/dist/preview/PaginationPreview.d.ts.map +1 -0
  129. package/dist/preview/SeparatorPreview.d.ts +2 -0
  130. package/dist/preview/SeparatorPreview.d.ts.map +1 -0
  131. package/dist/preview/SonnerPreview.d.ts +2 -0
  132. package/dist/preview/SonnerPreview.d.ts.map +1 -0
  133. package/dist/preview/SpinnerPreview.d.ts +2 -0
  134. package/dist/preview/SpinnerPreview.d.ts.map +1 -0
  135. package/dist/preview/TextareaPreview.d.ts +2 -0
  136. package/dist/preview/TextareaPreview.d.ts.map +1 -0
  137. package/dist/scripts/chakra-to-shadcn-migrator/chakra-to-shadcn.config.json +577 -0
  138. package/dist/scripts/chakra-to-shadcn-migrator/lib/args.js +63 -0
  139. package/dist/scripts/chakra-to-shadcn-migrator/lib/colors.js +14 -0
  140. package/dist/scripts/chakra-to-shadcn-migrator/lib/config.js +15 -0
  141. package/dist/scripts/chakra-to-shadcn-migrator/lib/deps.js +125 -0
  142. package/dist/scripts/chakra-to-shadcn-migrator/lib/file-io.js +44 -0
  143. package/dist/scripts/chakra-to-shadcn-migrator/lib/render.js +89 -0
  144. package/dist/scripts/chakra-to-shadcn-migrator/lib/transform.js +550 -0
  145. package/dist/scripts/chakra-to-shadcn-migrator/package.json +11 -0
  146. package/dist/scripts/init.cjs +216 -0
  147. package/dist/scripts/npx-init.cjs +418 -0
  148. package/dist/tailwind.base.config.js +89 -0
  149. package/dist/themes/carbide.css +369 -91
  150. package/package.json +40 -10
  151. package/src/index.css +111 -498
  152. package/dist/index.css +0 -536
  153. package/dist/themes/base.css +0 -536
  154. package/dist/themes/complete.css +0 -8
  155. package/scripts/README.md +0 -171
  156. package/scripts/chakra-to-shadcn-migrator/README.md +0 -107
  157. package/src/themes/base.css +0 -536
  158. package/src/themes/carbide.css +0 -1257
  159. package/src/themes/complete.css +0 -8
  160. /package/{scripts → dist/scripts}/chakra-to-shadcn-migrator/bin/chakra-to-shadcn.js +0 -0
@@ -1,536 +0,0 @@
1
- @import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;500;600;700&display=swap');
2
- @import url('https://fonts.googleapis.com/css2?family=Inconsolata:wght@400;600;700&display=swap');
3
- @import 'tailwindcss';
4
- @import 'tw-animate-css';
5
-
6
- [data-slot='progress'] {
7
- /* Disabled/unknown visual base aligns with inputs/buttons disabled look */
8
- }
9
-
10
- .mmc-progress[data-unknown='true'] {
11
- opacity: 0.6;
12
- }
13
-
14
- .mmc-progress[data-unknown='true'] [data-slot='progress-indicator'] {
15
- filter: grayscale(0.2) brightness(0.9);
16
- }
17
-
18
- /* Shimmer overlay for active progress state */
19
- @keyframes mm-progress-shimmer {
20
- 0% {
21
- transform: translateX(-100%);
22
- opacity: 0;
23
- }
24
- 10% {
25
- opacity: 0.15;
26
- }
27
- 50% {
28
- opacity: 0.25;
29
- }
30
- 100% {
31
- transform: translateX(100%);
32
- opacity: 0;
33
- }
34
- }
35
-
36
- [data-slot='progress-indicator']::before {
37
- content: '';
38
- position: absolute;
39
- inset: 0;
40
- background: linear-gradient(
41
- 90deg,
42
- transparent 0%,
43
- rgba(255, 255, 255, 0.15) 50%,
44
- transparent 100%
45
- );
46
- transform: translateX(-100%);
47
- pointer-events: none;
48
- animation: mm-progress-shimmer 2.4s ease-in-out infinite;
49
- }
50
-
51
- @custom-variant dark (&:is(.dark *));
52
-
53
- @theme inline {
54
- --radius-sm: calc(var(--radius) - 4px);
55
- --radius-md: calc(var(--radius) - 2px);
56
- --radius-lg: var(--radius);
57
- --radius-xl: calc(var(--radius) + 4px);
58
- --color-background: var(--background);
59
- --color-foreground: var(--foreground);
60
- --color-card: var(--card);
61
- --color-card-foreground: var(--card-foreground);
62
- --color-popover: var(--popover);
63
- --color-popover-foreground: var(--popover-foreground);
64
- --color-primary: var(--primary);
65
- --color-primary-foreground: var(--primary-foreground);
66
- --color-secondary: var(--secondary);
67
- --color-secondary-foreground: var(--secondary-foreground);
68
- --color-muted: var(--muted);
69
- --color-muted-foreground: var(--muted-foreground);
70
- --color-accent: var(--accent);
71
- --color-accent-foreground: var(--accent-foreground);
72
- --color-destructive: var(--destructive);
73
- --color-border: var(--border);
74
- --color-input: var(--input);
75
- --color-ring: var(--ring);
76
- --color-chart-1: var(--chart-1);
77
- --color-chart-2: var(--chart-2);
78
- --color-chart-3: var(--chart-3);
79
- --color-chart-4: var(--chart-4);
80
- --color-chart-5: var(--chart-5);
81
- --color-sidebar: var(--sidebar);
82
- --color-sidebar-foreground: var(--sidebar-foreground);
83
- --color-sidebar-primary: var(--sidebar-primary);
84
- --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
85
- --color-sidebar-accent: var(--sidebar-accent);
86
- --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
87
- --color-sidebar-border: var(--sidebar-border);
88
- --color-sidebar-ring: var(--sidebar-ring);
89
- }
90
-
91
- :root {
92
- --radius: 0.5rem;
93
- --radius-sm: 4px;
94
- --radius-md: calc(var(--radius) - 2px);
95
- --radius-lg: var(--radius);
96
- --radius-xl: calc(var(--radius) + 4px);
97
- --background: oklch(1 0 0);
98
- --foreground: oklch(0.145 0 0);
99
- --card: oklch(1 0 0);
100
- --card-foreground: oklch(0.145 0 0);
101
- --popover: oklch(1 0 0);
102
- --popover-foreground: oklch(0.145 0 0);
103
- --primary: oklch(0.205 0 0);
104
- --primary-foreground: oklch(0.985 0 0);
105
- --secondary: oklch(0.97 0 0);
106
- --secondary-foreground: oklch(0.205 0 0);
107
- --muted: oklch(0.97 0 0);
108
- --muted-foreground: oklch(0.556 0 0);
109
- --accent: oklch(0.97 0 0);
110
- --accent-foreground: oklch(0.205 0 0);
111
- --destructive: oklch(0.577 0.245 27.325);
112
- --border: oklch(0.922 0 0);
113
- --input: oklch(0.922 0 0);
114
- --ring: oklch(0.708 0 0);
115
- --chart-1: oklch(0.646 0.222 41.116);
116
- --chart-2: oklch(0.6 0.118 184.704);
117
- --chart-3: oklch(0.398 0.07 227.392);
118
- --chart-4: oklch(0.828 0.189 84.429);
119
- --chart-5: oklch(0.769 0.188 70.08);
120
- --sidebar: oklch(0.985 0 0);
121
- --sidebar-foreground: oklch(0.145 0 0);
122
- --sidebar-primary: oklch(0.205 0 0);
123
- --sidebar-primary-foreground: oklch(0.985 0 0);
124
- --sidebar-accent: oklch(0.97 0 0);
125
- --sidebar-accent-foreground: oklch(0.205 0 0);
126
- --sidebar-border: oklch(0.922 0 0);
127
- --sidebar-ring: oklch(0.708 0 0);
128
-
129
- /* Overlay token (base) */
130
- --overlay-bg: rgba(0, 0, 0, 0.8);
131
-
132
- /* --- Typography tokens (shadcn/ui reference) --- */
133
- --font-sans:
134
- ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
135
- Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif,
136
- 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
137
- --font-mono:
138
- ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono',
139
- 'Courier New', monospace;
140
- --font-heading: var(--font-sans);
141
- --font-body: var(--font-sans);
142
-
143
- --text-base-size: 1rem; /* 16px */
144
- --text-sm-size: 0.875rem; /* 14px */
145
- --text-lg-size: 1.125rem; /* 18px */
146
-
147
- --font-weight-normal: 400;
148
- --font-weight-medium: 500;
149
- --font-weight-bold: 700;
150
-
151
- --leading-tight: 1.25;
152
- --leading-normal: 1.5;
153
-
154
- --tracking-tight: -0.015em;
155
- --tracking-normal: 0;
156
- }
157
-
158
- .dark {
159
- --background: oklch(0.145 0 0);
160
- --foreground: oklch(0.985 0 0);
161
- --card: oklch(0.205 0 0);
162
- --card-foreground: oklch(0.985 0 0);
163
- --popover: oklch(0.205 0 0);
164
- --popover-foreground: oklch(0.985 0 0);
165
- --primary: oklch(0.922 0 0);
166
- --primary-foreground: oklch(0.205 0 0);
167
- --secondary: oklch(0.269 0 0);
168
- --secondary-foreground: oklch(0.985 0 0);
169
- --muted: oklch(0.269 0 0);
170
- --muted-foreground: oklch(0.708 0 0);
171
- --accent: oklch(0.269 0 0);
172
- --accent-foreground: oklch(0.985 0 0);
173
- --destructive: oklch(0.704 0.191 22.216);
174
- --border: oklch(1 0 0 / 10%);
175
- --input: oklch(1 0 0 / 15%);
176
- --ring: oklch(0.556 0 0);
177
- --chart-1: oklch(0.488 0.243 264.376);
178
- --chart-2: oklch(0.696 0.17 162.48);
179
- --chart-3: oklch(0.769 0.188 70.08);
180
- --chart-4: oklch(0.627 0.265 303.9);
181
- --chart-5: oklch(0.645 0.246 16.439);
182
- --sidebar: oklch(0.205 0 0);
183
- --sidebar-foreground: oklch(0.985 0 0);
184
- --sidebar-primary: oklch(0.488 0.243 264.376);
185
- --sidebar-primary-foreground: oklch(0.985 0 0);
186
- --sidebar-accent: oklch(0.269 0 0);
187
- --sidebar-accent-foreground: oklch(0.985 0 0);
188
- --sidebar-border: oklch(1 0 0 / 10%);
189
- --sidebar-ring: oklch(0.556 0 0);
190
- }
191
-
192
- @layer base {
193
- * {
194
- @apply border-border outline-ring/50;
195
- }
196
- body {
197
- @apply bg-background text-foreground;
198
- }
199
- .lead {
200
- @apply text-xl text-muted-foreground;
201
- }
202
- .large {
203
- @apply text-lg font-semibold;
204
- }
205
- .small {
206
- @apply text-sm font-medium leading-none;
207
- }
208
- .muted {
209
- @apply text-sm text-muted-foreground;
210
- }
211
- :root {
212
- --sidebar-background: 0 0% 98%;
213
- --sidebar-foreground: 240 5.3% 26.1%;
214
- --sidebar-primary: 240 5.9% 10%;
215
- --sidebar-primary-foreground: 0 0% 98%;
216
- --sidebar-accent: 240 4.8% 95.9%;
217
- --sidebar-accent-foreground: 240 5.9% 10%;
218
- --sidebar-border: 220 13% 91%;
219
- --sidebar-ring: 217.2 91.2% 59.8%;
220
- }
221
-
222
- .dark {
223
- --sidebar-background: 240 5.9% 10%;
224
- --sidebar-foreground: 240 4.8% 95.9%;
225
- --sidebar-primary: 224.3 76.3% 48%;
226
- --sidebar-primary-foreground: 0 0% 100%;
227
- --sidebar-accent: 240 3.7% 15.9%;
228
- --sidebar-accent-foreground: 240 4.8% 95.9%;
229
- --sidebar-border: 240 3.7% 15.9%;
230
- --sidebar-ring: 217.2 91.2% 59.8%;
231
- }
232
-
233
- /* Centralized overlay class to keep overlays consistent */
234
- .mmc-overlay {
235
- background-color: var(--overlay-bg);
236
- -webkit-backdrop-filter: blur(4px);
237
- backdrop-filter: blur(4px);
238
- }
239
-
240
- /* Universal Carbide hover for input-like controls */
241
- .carbide
242
- :is(
243
- input:not([type]),
244
- input[type='text'],
245
- input[type='email'],
246
- input[type='password'],
247
- input[type='search'],
248
- input[type='number'],
249
- input[type='url'],
250
- input[type='tel'],
251
- textarea,
252
- [data-slot='checkbox'],
253
- [data-slot='radio-group-item'],
254
- [data-slot='toggle'],
255
- [data-slot='filter-section-trigger']
256
- ) {
257
- @apply transition-[background-color,box-shadow];
258
- }
259
-
260
- .carbide
261
- :is(
262
- input:not([type]),
263
- input[type='text'],
264
- input[type='email'],
265
- input[type='password'],
266
- input[type='search'],
267
- input[type='number'],
268
- input[type='url'],
269
- input[type='tel'],
270
- textarea,
271
- [data-slot='checkbox'],
272
- [data-slot='radio-group-item'],
273
- [data-slot='toggle'],
274
- [data-slot='filter-section-trigger']
275
- ):where(:not(:disabled)):hover {
276
- background-color: var(--accent);
277
- }
278
-
279
- .carbide.dark
280
- :is(
281
- input:not([type]),
282
- input[type='text'],
283
- input[type='email'],
284
- input[type='password'],
285
- input[type='search'],
286
- input[type='number'],
287
- input[type='url'],
288
- input[type='tel'],
289
- textarea,
290
- [data-slot='checkbox'],
291
- [data-slot='radio-group-item'],
292
- [data-slot='toggle'],
293
- [data-slot='filter-section-trigger']
294
- ):where(:not(:disabled)):hover {
295
- background-color: var(--input-surface-hover-bg);
296
- }
297
-
298
- /* Ensure elements styled via the bg-input utility also receive hover */
299
- .carbide .bg-input:where(:not(:disabled)):hover {
300
- background-color: var(--accent);
301
- }
302
- .carbide.dark .bg-input:where(:not(:disabled)):hover {
303
- background-color: var(--input-surface-hover-bg);
304
- }
305
-
306
- /* Table row hover vs action trigger hover contrast (base declaration) */
307
- .mmc-data-table-preview
308
- .mmc-table-action-trigger:where(:not(:disabled)):hover {
309
- background-color: color-mix(in oklab, var(--accent) 92%, black 8%);
310
- }
311
- .carbide.dark
312
- .mmc-data-table-preview
313
- .mmc-table-action-trigger:where(:not(:disabled)):hover {
314
- background-color: color-mix(
315
- in oklab,
316
- var(--input-surface-hover-bg) 90%,
317
- white 10%
318
- );
319
- }
320
-
321
- /* Put higher-precedence overrides in utilities layer to beat Tailwind utilities */
322
- @layer utilities {
323
- /* Animated ellipsis for in-progress labels */
324
- @keyframes mm-ellipsis {
325
- 0% {
326
- content: '';
327
- }
328
- 33% {
329
- content: '.';
330
- }
331
- 66% {
332
- content: '..';
333
- }
334
- 100% {
335
- content: '...';
336
- }
337
- }
338
- .mmc-animated-ellipsis::after {
339
- display: inline-block;
340
- width: 16px;
341
- text-align: left;
342
- content: '';
343
- animation: mm-ellipsis 1.5s steps(3, end) infinite;
344
- }
345
-
346
- /* In-progress status colors */
347
- .mmc-khub-status--in-progress .mmc-khub-status__label {
348
- color: var(--foreground);
349
- }
350
- .carbide.dark .mmc-khub-status--in-progress .mmc-khub-status__label {
351
- color: var(--foreground);
352
- }
353
- /* Consistent KHUB status layout */
354
- .mmc-khub {
355
- --khub-progress-width: 80px;
356
- --khub-status-gutter: 88px;
357
- }
358
- .mmc-khub-status {
359
- min-width: 0;
360
- }
361
- .mmc-khub-status__gutter {
362
- width: var(--khub-status-gutter);
363
- flex: 0 0 var(--khub-status-gutter);
364
- display: inline-flex;
365
- align-items: center;
366
- }
367
- .mmc-khub-status__label {
368
- display: inline-block;
369
- max-width: 100%;
370
- }
371
- .mmc-khub-status__progress {
372
- width: var(--khub-progress-width);
373
- flex: 0 0 var(--khub-progress-width);
374
- }
375
-
376
- /* Match in-progress text styling to badges */
377
- .mmc-khub-status--in-progress .mmc-khub-status__label {
378
- font-size: 0.75rem;
379
- line-height: 1rem;
380
- font-weight: 400;
381
- color: var(--grey-700) !important;
382
- }
383
- .carbide.dark .mmc-khub-status--in-progress .mmc-khub-status__label {
384
- color: var(--grey-200) !important;
385
- }
386
-
387
- /* Remove fade overflow mask for KHUB status cells */
388
- .mmc-table-cell__content:has(> .mmc-khub-status) {
389
- -webkit-mask-image: none !important;
390
- mask-image: none !important;
391
- }
392
- /* Elevate action trigger hover contrast above Tailwind utilities */
393
- .mmc-data-table-preview .mmc-table-action-trigger:hover {
394
- background-color: var(--table-action-hover-bg) !important;
395
- }
396
- .carbide.dark .mmc-data-table-preview .mmc-table-action-trigger:hover {
397
- background-color: var(--table-action-hover-bg) !important;
398
- }
399
- }
400
-
401
- /* Universal single-line overflow wrapper for table cell contents */
402
- .mmc-table-cell__content {
403
- display: block;
404
- width: 100%;
405
- white-space: nowrap;
406
- overflow: hidden;
407
- --fade-edge: 16px;
408
- }
409
- /* Apply masks ONLY when overflow is detected via JS-added modifier classes */
410
- .mmc-table-cell__content--fade-right {
411
- -webkit-mask-image: linear-gradient(
412
- to right,
413
- rgba(0, 0, 0, 1) calc(100% - var(--fade-edge)),
414
- rgba(0, 0, 0, 0) 100%
415
- );
416
- mask-image: linear-gradient(
417
- to right,
418
- rgba(0, 0, 0, 1) calc(100% - var(--fade-edge)),
419
- rgba(0, 0, 0, 0) 100%
420
- );
421
- }
422
- .mmc-table-cell__content--fade-left {
423
- -webkit-mask-image: linear-gradient(
424
- to left,
425
- rgba(0, 0, 0, 1) calc(100% - var(--fade-edge)),
426
- rgba(0, 0, 0, 0) 100%
427
- );
428
- mask-image: linear-gradient(
429
- to left,
430
- rgba(0, 0, 0, 1) calc(100% - var(--fade-edge)),
431
- rgba(0, 0, 0, 0) 100%
432
- );
433
- }
434
- .mmc-table-cell__content--fade-both {
435
- -webkit-mask-image: linear-gradient(
436
- to right,
437
- transparent 0,
438
- rgba(0, 0, 0, 1) var(--fade-edge),
439
- rgba(0, 0, 0, 1) calc(100% - var(--fade-edge)),
440
- transparent 100%
441
- );
442
- mask-image: linear-gradient(
443
- to right,
444
- transparent 0,
445
- rgba(0, 0, 0, 1) var(--fade-edge),
446
- rgba(0, 0, 0, 1) calc(100% - var(--fade-edge)),
447
- transparent 100%
448
- );
449
- }
450
- }
451
-
452
- /* Collapsible animations using Radix-provided height variable */
453
- @keyframes mm-collapsible-down {
454
- from {
455
- height: 0;
456
- opacity: 0;
457
- }
458
- to {
459
- height: var(--radix-collapsible-content-height);
460
- opacity: 1;
461
- }
462
- }
463
-
464
- @keyframes mm-collapsible-up {
465
- from {
466
- height: var(--radix-collapsible-content-height);
467
- opacity: 1;
468
- }
469
- to {
470
- height: 0;
471
- opacity: 0;
472
- }
473
- }
474
-
475
- /* JS-driven height animation now handles height. Keep only overflow hidden. */
476
- [data-slot='collapsible-content'] {
477
- overflow: hidden;
478
- }
479
- /* Radix sets hidden on closed when forceMount is used; override to enable CSS animation */
480
- [data-slot='collapsible-content'][hidden] {
481
- display: block !important;
482
- }
483
- /* JS controls height now; avoid conflicting state heights */
484
-
485
- /* Progress micro-interactions */
486
- @keyframes mm-progress-head-flash {
487
- 0% {
488
- opacity: 0;
489
- transform: translateX(0);
490
- }
491
- 30% {
492
- opacity: 0.6;
493
- }
494
- 100% {
495
- opacity: 0;
496
- transform: translateX(8px);
497
- }
498
- }
499
-
500
- @keyframes mm-progress-breathe {
501
- 0%,
502
- 100% {
503
- filter: brightness(1);
504
- opacity: 1;
505
- }
506
- 50% {
507
- filter: brightness(1.35);
508
- opacity: 0.8;
509
- }
510
- }
511
-
512
- [data-slot='progress'] [data-slot='progress-indicator']::after {
513
- content: '';
514
- position: absolute;
515
- right: -2px;
516
- top: 0;
517
- bottom: 0;
518
- width: 12px;
519
- pointer-events: none;
520
- /* Avoid color-mix/oklch for broader browser support; use simple alpha gradient */
521
- background: radial-gradient(
522
- 12px 12px at 100% 50%,
523
- rgba(255, 255, 255, 0.6),
524
- transparent 70%
525
- );
526
- opacity: 0;
527
- }
528
-
529
- .mmc-progress[data-animating='true'] [data-slot='progress-indicator']::after {
530
- animation: mm-progress-head-flash 600ms ease-out 1;
531
- }
532
-
533
- /* Always-on pulse for the fill, regardless of state */
534
- [data-slot='progress-indicator'] {
535
- animation: mm-progress-breathe 1.65s ease-in-out infinite;
536
- }
@@ -1,8 +0,0 @@
1
- /* Complete all-in-one CSS import for consuming applications */
2
- /* This file imports everything needed without duplicating styles */
3
-
4
- /* Import base theme (includes Tailwind reset, base variables, and component styles) */
5
- @import url('./base.css');
6
-
7
- /* Import Carbide theme (includes industrial styling overrides) */
8
- @import url('./carbide.css');
package/scripts/README.md DELETED
@@ -1,171 +0,0 @@
1
- # Scripts Directory
2
-
3
- This directory contains scripts for maintaining shadcn/ui components and visual regression tests.
4
-
5
- ## Component Creation Script
6
-
7
- ### Create New Component
8
-
9
- ```bash
10
- npm run create-component <component-name>
11
- ```
12
-
13
- Creates a new shadcn/ui component with automatic linting, formatting, and preview generation.
14
-
15
- **Options:**
16
-
17
- - `--skip-preview` - Skip generating preview component
18
- - `--skip-lint` - Skip running ESLint fixes
19
- - `--skip-format` - Skip running Prettier formatting
20
- - `--skip-tests` - Skip generating Playwright tests
21
- - `--help` - Show help message
22
-
23
- **Examples:**
24
-
25
- ```bash
26
- npm run create-component card
27
- npm run create-component dialog --skip-preview
28
- npm run create-component select --skip-lint --skip-format
29
- npm run create-component button --skip-tests
30
- ```
31
-
32
- **Workflow:**
33
-
34
- 1. Add component using shadcn CLI
35
- 2. Apply ESLint fixes (unless --skip-lint)
36
- 3. Apply Prettier formatting (unless --skip-format)
37
- 4. Generate preview component (unless --skip-preview)
38
- 5. Generate Playwright tests (unless --skip-tests)
39
- 6. Update main index.ts exports
40
-
41
- ## Component Update Scripts
42
-
43
- ### TypeScript Version
44
-
45
- ```bash
46
- npm run update-components
47
- ```
48
-
49
- ### Bash Version
50
-
51
- ```bash
52
- npm run update-components:bash
53
- ```
54
-
55
- ## Visual Test Generation Scripts
56
-
57
- ### Generate Missing Tests (Default)
58
-
59
- ```bash
60
- npm run generate-visual-tests
61
- ```
62
-
63
- Only generates tests for components that don't have test files yet. Existing tests are preserved.
64
-
65
- ### Generate All Tests (Overwrite)
66
-
67
- ```bash
68
- npm run generate-visual-tests:overwrite
69
- ```
70
-
71
- Regenerates all test files, overwriting existing ones. Useful after template changes or major updates.
72
-
73
- ## What the Component Update Scripts Do
74
-
75
- Both component update scripts will:
76
-
77
- 1. **Scan** `src/components/ui/` for all installed components
78
- 2. **Filter** out custom components (like `theme-toggle`)
79
- 3. **Update** each remaining component using `npx shadcn@latest add <component> --yes --overwrite`
80
- 4. **Report** a summary of what was updated, skipped, or failed
81
-
82
- The scripts automatically discover components from your folder - no need to maintain a hardcoded list!
83
-
84
- ## What the Visual Test Generation Scripts Do
85
-
86
- The visual test generation script will:
87
-
88
- 1. **Scan** all preview routes in `src/App.tsx` for component previews
89
- 2. **Check** existing test files in `tests/visual/`
90
- 3. **Generate** Playwright test files using TypeScript templates from `scripts/templates/`
91
- 4. **Smart Wait Logic**: Automatically adds table-specific wait conditions for data table components
92
- 5. **Skip or Overwrite**: Either skip existing tests (default) or overwrite them (with `--overwrite`)
93
- 6. **Report** a summary of generated, skipped, and total test files
94
-
95
- ### Generated Test Types
96
-
97
- Each component gets tests for:
98
-
99
- - **Main Component Screenshot**: Captures the component in its default state
100
- - **Mobile Responsive Screenshot**: Tests the component at mobile viewport (375x667)
101
-
102
- ## Features
103
-
104
- ### Component Creation Script
105
-
106
- - ✅ **Smart Component Detection**: Automatically detects component structure and exports
107
- - ✅ **Intelligent Preview Generation**: Creates appropriate preview components based on component type
108
- - ✅ **Special Component Handling**: Custom preview templates for complex components (card, dialog, etc.)
109
- - ✅ **Automatic Linting**: Applies ESLint fixes after component creation
110
- - ✅ **Automatic Formatting**: Applies Prettier formatting for consistent code style
111
- - ✅ **Playwright Test Generation**: Automatically generates visual regression tests
112
- - ✅ **Export Management**: Automatically updates index.ts with new component exports
113
- - ✅ **Error Handling**: Comprehensive error handling with detailed progress reporting
114
- - ✅ **Flexible Options**: Skip any step with command-line flags
115
- - ✅ **Help Documentation**: Built-in help with usage examples
116
-
117
- ### Component Update Scripts
118
-
119
- - ✅ **Auto-Discovery**: Automatically finds all components in your `ui/` folder
120
- - ✅ **Smart Filtering**: Skips custom components automatically
121
- - ✅ **CLI Validation**: Let shadcn CLI determine if components are valid/updatable
122
- - ✅ **Detailed Progress**: Shows real-time updates and comprehensive summary
123
- - ✅ **Error Handling**: Reports failures and continues with other components
124
- - ✅ **Overwrite**: Uses `--overwrite` flag to ensure components are properly updated
125
-
126
- ### Visual Test Generation Scripts
127
-
128
- - ✅ **TypeScript Templates**: Uses proper `.ts` template files for full linting and type-checking
129
- - ✅ **Smart Generation**: Only generates missing tests by default, preserves existing customizations
130
- - ✅ **Overwrite Mode**: `--overwrite` flag regenerates all tests when needed
131
- - ✅ **Dynamic Wait Logic**: Automatically adapts wait conditions for data tables vs regular components
132
- - ✅ **Mobile Testing**: Includes responsive testing at mobile viewport sizes
133
- - ✅ **Route Auto-Discovery**: Automatically finds all component preview routes
134
-
135
- ## Custom Components
136
-
137
- Components listed in `CUSTOM_COMPONENTS` will be skipped during updates:
138
-
139
- - `theme-toggle` - Custom component, not from shadcn/ui
140
-
141
- To add more custom components to skip, edit the `CUSTOM_COMPONENTS` array in either script.
142
-
143
- ## Requirements
144
-
145
- ### TypeScript Version
146
-
147
- - `tsx` package (included in devDependencies)
148
- - Node.js
149
-
150
- ### Bash Version
151
-
152
- - Bash shell
153
- - `npx` command available
154
-
155
- ## Help
156
-
157
- Both scripts support `--help` flag:
158
-
159
- ```bash
160
- npm run update-components -- --help
161
- ./scripts/update-components.sh --help
162
- ```
163
-
164
- ## Troubleshooting
165
-
166
- If updates fail:
167
-
168
- 1. Ensure you have internet connection
169
- 2. Make sure `npx` can access the shadcn CLI
170
- 3. Check that `src/components/ui/` directory exists
171
- 4. Verify you're in the project root directory