myoperator-ui 0.0.233 → 0.0.234-beta.0
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 +47 -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,11 @@ 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
|
+
await fs5.writeFile(globalCssPath, cssContent);
|
|
30106
|
+
cssUpdated = true;
|
|
30107
|
+
} else if (!hasThemeImport) {
|
|
30068
30108
|
spinner.stop();
|
|
30069
30109
|
const result = await prompts2({
|
|
30070
30110
|
type: "confirm",
|
|
@@ -30097,6 +30137,7 @@ export function cn(...inputs: ClassValue[]) {
|
|
|
30097
30137
|
const existingConfig2 = await fs5.readFile(tailwindConfigPath, "utf-8");
|
|
30098
30138
|
const hasLegacyColors = existingConfig2.includes("hsl(var(--destructive))") || existingConfig2.includes("hsl(var(--ring))");
|
|
30099
30139
|
const hasSemanticColors = existingConfig2.includes("semantic-text-primary");
|
|
30140
|
+
const needsBootstrapUpdate = hasBootstrap && !existingConfig2.includes("preflight");
|
|
30100
30141
|
if (!hasLegacyColors && !hasSemanticColors) {
|
|
30101
30142
|
await fs5.writeFile(tailwindConfigPath, getTailwindConfig(userPrefix, hasBootstrap));
|
|
30102
30143
|
tailwindUpdated = true;
|
|
@@ -30113,6 +30154,9 @@ export function cn(...inputs: ClassValue[]) {
|
|
|
30113
30154
|
await fs5.writeFile(tailwindConfigPath, getTailwindConfig(userPrefix, hasBootstrap));
|
|
30114
30155
|
tailwindUpdated = true;
|
|
30115
30156
|
}
|
|
30157
|
+
} else if (needsBootstrapUpdate) {
|
|
30158
|
+
await fs5.writeFile(tailwindConfigPath, getTailwindConfig(userPrefix, hasBootstrap));
|
|
30159
|
+
tailwindUpdated = true;
|
|
30116
30160
|
}
|
|
30117
30161
|
}
|
|
30118
30162
|
}
|