myoperator-ui 0.0.11 → 0.0.13
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/index.js +29 -21
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -17,6 +17,9 @@ function prefixTailwindClasses(content, prefix) {
|
|
|
17
17
|
if (classString.includes("/") || classString.includes("::") || classString.includes("import")) {
|
|
18
18
|
return match;
|
|
19
19
|
}
|
|
20
|
+
if (/^[a-z][a-z0-9-]*$/.test(classString) && !classString.includes(" ")) {
|
|
21
|
+
return match;
|
|
22
|
+
}
|
|
20
23
|
if (!classString.includes(" ") && !classString.includes("-") && !classString.includes(":") && !classString.includes("[")) {
|
|
21
24
|
return match;
|
|
22
25
|
}
|
|
@@ -329,31 +332,36 @@ var CSS_VARIABLES_V4 = `@import "tailwindcss";
|
|
|
329
332
|
--ring: 212.7 26.8% 83.9%;
|
|
330
333
|
}
|
|
331
334
|
`;
|
|
332
|
-
var
|
|
333
|
-
@import "tailwindcss
|
|
335
|
+
var getCSS_VARIABLES_V4_BOOTSTRAP = (prefix) => `/* myOperator UI - Tailwind CSS for Bootstrap projects */
|
|
336
|
+
@import "tailwindcss" prefix(${prefix || "tw-"});
|
|
337
|
+
|
|
338
|
+
/* Disable Preflight (CSS reset) to avoid conflicts with Bootstrap */
|
|
339
|
+
@layer base {
|
|
340
|
+
/* Preflight disabled - using Bootstrap's reset instead */
|
|
341
|
+
}
|
|
334
342
|
|
|
335
343
|
/* Tell Tailwind to scan component files for utility classes */
|
|
336
344
|
@source "./src/components/**/*.{js,ts,jsx,tsx}";
|
|
337
345
|
@source "./src/lib/**/*.{js,ts,jsx,tsx}";
|
|
338
346
|
|
|
339
|
-
/* myOperator UI theme colors
|
|
340
|
-
|
|
341
|
-
--mo-background: 0 0% 100
|
|
342
|
-
--mo-foreground: 222.2 84% 4.9
|
|
343
|
-
--mo-primary: 222.2 47.4% 11.2
|
|
344
|
-
--mo-primary-foreground: 210 40% 98
|
|
345
|
-
--mo-secondary: 210 40% 96.1
|
|
346
|
-
--mo-secondary-foreground: 222.2 47.4% 11.2
|
|
347
|
-
--mo-muted: 210 40% 96.1
|
|
348
|
-
--mo-muted-foreground: 215.4 16.3% 46.9
|
|
349
|
-
--mo-accent: 210 40% 96.1
|
|
350
|
-
--mo-accent-foreground: 222.2 47.4% 11.2
|
|
351
|
-
--mo-destructive: 0 84.2% 60.2
|
|
352
|
-
--mo-destructive-foreground: 210 40% 98
|
|
353
|
-
--mo-border: 214.3 31.8% 91.4
|
|
354
|
-
--mo-input: 214.3 31.8% 91.4
|
|
355
|
-
--mo-ring: 222.2 84% 4.9
|
|
356
|
-
--mo
|
|
347
|
+
/* myOperator UI theme colors */
|
|
348
|
+
@theme {
|
|
349
|
+
--color-mo-background: hsl(0 0% 100%);
|
|
350
|
+
--color-mo-foreground: hsl(222.2 84% 4.9%);
|
|
351
|
+
--color-mo-primary: hsl(222.2 47.4% 11.2%);
|
|
352
|
+
--color-mo-primary-foreground: hsl(210 40% 98%);
|
|
353
|
+
--color-mo-secondary: hsl(210 40% 96.1%);
|
|
354
|
+
--color-mo-secondary-foreground: hsl(222.2 47.4% 11.2%);
|
|
355
|
+
--color-mo-muted: hsl(210 40% 96.1%);
|
|
356
|
+
--color-mo-muted-foreground: hsl(215.4 16.3% 46.9%);
|
|
357
|
+
--color-mo-accent: hsl(210 40% 96.1%);
|
|
358
|
+
--color-mo-accent-foreground: hsl(222.2 47.4% 11.2%);
|
|
359
|
+
--color-mo-destructive: hsl(0 84.2% 60.2%);
|
|
360
|
+
--color-mo-destructive-foreground: hsl(210 40% 98%);
|
|
361
|
+
--color-mo-border: hsl(214.3 31.8% 91.4%);
|
|
362
|
+
--color-mo-input: hsl(214.3 31.8% 91.4%);
|
|
363
|
+
--color-mo-ring: hsl(222.2 84% 4.9%);
|
|
364
|
+
--radius-mo: 0.5rem;
|
|
357
365
|
}
|
|
358
366
|
|
|
359
367
|
/* End myOperator UI imports */
|
|
@@ -623,7 +631,7 @@ export function cn(...inputs: ClassValue[]) {
|
|
|
623
631
|
const globalCssPath = path2.join(cwd, response.globalCss);
|
|
624
632
|
let cssContent;
|
|
625
633
|
if (response.tailwindVersion === "v4") {
|
|
626
|
-
cssContent = hasBootstrap
|
|
634
|
+
cssContent = hasBootstrap || prefix ? getCSS_VARIABLES_V4_BOOTSTRAP(prefix) : CSS_VARIABLES_V4;
|
|
627
635
|
} else {
|
|
628
636
|
cssContent = CSS_VARIABLES_V3;
|
|
629
637
|
}
|