myoperator-ui 0.0.233 → 0.0.234-beta.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/index.js +61 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -29632,6 +29632,39 @@ var CSS_VARIABLES_V3 = `@import "./lib/myoperator-ui-theme.css";
|
|
|
29632
29632
|
@tailwind components;
|
|
29633
29633
|
@tailwind utilities;
|
|
29634
29634
|
|
|
29635
|
+
/* Reset Bootstrap button styles for myOperator UI components */
|
|
29636
|
+
@layer components {
|
|
29637
|
+
.inline-flex[class*="rounded"],
|
|
29638
|
+
button.bg-\\[\\#343E55\\],
|
|
29639
|
+
button.bg-\\[\\#E8EAED\\],
|
|
29640
|
+
button.bg-transparent {
|
|
29641
|
+
border: none;
|
|
29642
|
+
box-shadow: none;
|
|
29643
|
+
}
|
|
29644
|
+
}
|
|
29645
|
+
`;
|
|
29646
|
+
var CSS_VARIABLES_V3_BOOTSTRAP = `@import "./lib/myoperator-ui-theme.css";
|
|
29647
|
+
|
|
29648
|
+
@tailwind base;
|
|
29649
|
+
@tailwind components;
|
|
29650
|
+
@tailwind utilities;
|
|
29651
|
+
|
|
29652
|
+
/*
|
|
29653
|
+
* Scoped preflight for Tailwind components (tw- prefix).
|
|
29654
|
+
* Since preflight is disabled to avoid breaking Bootstrap,
|
|
29655
|
+
* we manually apply the essential border reset for elements
|
|
29656
|
+
* that use tw-border utilities.
|
|
29657
|
+
*/
|
|
29658
|
+
[class*="tw-"] {
|
|
29659
|
+
&,
|
|
29660
|
+
&::before,
|
|
29661
|
+
&::after {
|
|
29662
|
+
border-width: 0;
|
|
29663
|
+
border-style: solid;
|
|
29664
|
+
border-color: theme("colors.border", currentColor);
|
|
29665
|
+
}
|
|
29666
|
+
}
|
|
29667
|
+
|
|
29635
29668
|
/* Reset Bootstrap button styles for myOperator UI components */
|
|
29636
29669
|
@layer components {
|
|
29637
29670
|
.inline-flex[class*="rounded"],
|
|
@@ -29647,7 +29680,10 @@ var getTailwindConfig = (prefix = "tw-", hasBootstrap = false) => `/** @type {im
|
|
|
29647
29680
|
export default {
|
|
29648
29681
|
darkMode: ["class"],
|
|
29649
29682
|
prefix: "${prefix}",${hasBootstrap ? `
|
|
29650
|
-
important: true, // Required to override Bootstrap styles
|
|
29683
|
+
important: true, // Required to override Bootstrap styles
|
|
29684
|
+
corePlugins: {
|
|
29685
|
+
preflight: false, // Disable Tailwind's CSS reset - Bootstrap handles base styles
|
|
29686
|
+
},` : ""}
|
|
29651
29687
|
content: [
|
|
29652
29688
|
"./src/components/ui/**/*.{js,ts,jsx,tsx}",
|
|
29653
29689
|
"./src/components/custom/**/*.{js,ts,jsx,tsx}",
|
|
@@ -30054,7 +30090,7 @@ export function cn(...inputs: ClassValue[]) {
|
|
|
30054
30090
|
if (tailwindVersion === "v4") {
|
|
30055
30091
|
cssContent = hasBootstrap ? CSS_VARIABLES_V4_BOOTSTRAP : CSS_VARIABLES_V4;
|
|
30056
30092
|
} else {
|
|
30057
|
-
cssContent = CSS_VARIABLES_V3;
|
|
30093
|
+
cssContent = hasBootstrap ? CSS_VARIABLES_V3_BOOTSTRAP : CSS_VARIABLES_V3;
|
|
30058
30094
|
}
|
|
30059
30095
|
let cssUpdated = false;
|
|
30060
30096
|
if (!await fs5.pathExists(globalCssPath)) {
|
|
@@ -30064,7 +30100,25 @@ export function cn(...inputs: ClassValue[]) {
|
|
|
30064
30100
|
} else {
|
|
30065
30101
|
const existingCss = await fs5.readFile(globalCssPath, "utf-8");
|
|
30066
30102
|
const hasThemeImport = existingCss.includes("myoperator-ui-theme.css");
|
|
30067
|
-
|
|
30103
|
+
const needsScopedPreflight = hasBootstrap && !existingCss.includes('[class*="tw-"]');
|
|
30104
|
+
if (needsScopedPreflight) {
|
|
30105
|
+
const lines = existingCss.split("\n");
|
|
30106
|
+
const customLines = lines.filter((line) => {
|
|
30107
|
+
const trimmed = line.trim();
|
|
30108
|
+
if (!trimmed || trimmed.startsWith("/*") || trimmed.startsWith("*") || trimmed.startsWith("//")) return false;
|
|
30109
|
+
if (trimmed.startsWith("@tailwind")) return false;
|
|
30110
|
+
if (trimmed.startsWith("@import") && trimmed.includes("myoperator-ui-theme")) return false;
|
|
30111
|
+
if (trimmed.startsWith("@import") || trimmed.startsWith("@use")) return true;
|
|
30112
|
+
return false;
|
|
30113
|
+
});
|
|
30114
|
+
const importsToKeep = customLines.join("\n");
|
|
30115
|
+
if (importsToKeep) {
|
|
30116
|
+
await fs5.writeFile(globalCssPath, cssContent + "\n" + importsToKeep + "\n");
|
|
30117
|
+
} else {
|
|
30118
|
+
await fs5.writeFile(globalCssPath, cssContent);
|
|
30119
|
+
}
|
|
30120
|
+
cssUpdated = true;
|
|
30121
|
+
} else if (!hasThemeImport) {
|
|
30068
30122
|
spinner.stop();
|
|
30069
30123
|
const result = await prompts2({
|
|
30070
30124
|
type: "confirm",
|
|
@@ -30097,6 +30151,7 @@ export function cn(...inputs: ClassValue[]) {
|
|
|
30097
30151
|
const existingConfig2 = await fs5.readFile(tailwindConfigPath, "utf-8");
|
|
30098
30152
|
const hasLegacyColors = existingConfig2.includes("hsl(var(--destructive))") || existingConfig2.includes("hsl(var(--ring))");
|
|
30099
30153
|
const hasSemanticColors = existingConfig2.includes("semantic-text-primary");
|
|
30154
|
+
const needsBootstrapUpdate = hasBootstrap && !existingConfig2.includes("preflight");
|
|
30100
30155
|
if (!hasLegacyColors && !hasSemanticColors) {
|
|
30101
30156
|
await fs5.writeFile(tailwindConfigPath, getTailwindConfig(userPrefix, hasBootstrap));
|
|
30102
30157
|
tailwindUpdated = true;
|
|
@@ -30113,6 +30168,9 @@ export function cn(...inputs: ClassValue[]) {
|
|
|
30113
30168
|
await fs5.writeFile(tailwindConfigPath, getTailwindConfig(userPrefix, hasBootstrap));
|
|
30114
30169
|
tailwindUpdated = true;
|
|
30115
30170
|
}
|
|
30171
|
+
} else if (needsBootstrapUpdate) {
|
|
30172
|
+
await fs5.writeFile(tailwindConfigPath, getTailwindConfig(userPrefix, hasBootstrap));
|
|
30173
|
+
tailwindUpdated = true;
|
|
30116
30174
|
}
|
|
30117
30175
|
}
|
|
30118
30176
|
}
|