@neoptocom/neopto-ui 0.9.7 → 0.9.9
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.cjs +3 -2
- package/dist/index.js +3 -2
- package/package.json +1 -1
- package/src/components/Button.tsx +1 -1
- package/src/components/Modal.tsx +2 -1
package/dist/index.cjs
CHANGED
|
@@ -301,7 +301,8 @@ function Modal({
|
|
|
301
301
|
}, [open, onClose]);
|
|
302
302
|
if (!mounted) return null;
|
|
303
303
|
const hasMaxWidth = className?.includes("max-w-");
|
|
304
|
-
const
|
|
304
|
+
const hasMaxHeight = className?.includes("max-h-");
|
|
305
|
+
const modalClasses = `w-full ${!hasMaxWidth ? "max-w-lg" : ""} ${!hasMaxHeight ? "max-h-[80vh]" : ""} ${className || ""}`.trim();
|
|
305
306
|
const modal = /* @__PURE__ */ jsxRuntime.jsx("div", { className: isDark ? "dark" : "", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
306
307
|
BackgroundBlur,
|
|
307
308
|
{
|
|
@@ -991,7 +992,7 @@ function getButtonClasses(variant = "primary", size = "md", fullWidth, className
|
|
|
991
992
|
const variants = {
|
|
992
993
|
primary: "bg-cyan-500 text-white hover:bg-cyan-400 active:bg-cyan-600 disabled:bg-neutral-400",
|
|
993
994
|
secondary: "border border-cyan-500 text-cyan-500 bg-transparent hover:bg-cyan-50 active:bg-cyan-100 disabled:border-neutral-400 disabled:text-neutral-400",
|
|
994
|
-
ghost: "bg-transparent text-
|
|
995
|
+
ghost: "bg-transparent text-[var(--fg)] hover:bg-[var(--muted)] active:bg-[var(--muted)] disabled:opacity-50"
|
|
995
996
|
};
|
|
996
997
|
const sizes = {
|
|
997
998
|
sm: "h-9 px-3",
|
package/dist/index.js
CHANGED
|
@@ -280,7 +280,8 @@ function Modal({
|
|
|
280
280
|
}, [open, onClose]);
|
|
281
281
|
if (!mounted) return null;
|
|
282
282
|
const hasMaxWidth = className?.includes("max-w-");
|
|
283
|
-
const
|
|
283
|
+
const hasMaxHeight = className?.includes("max-h-");
|
|
284
|
+
const modalClasses = `w-full ${!hasMaxWidth ? "max-w-lg" : ""} ${!hasMaxHeight ? "max-h-[80vh]" : ""} ${className || ""}`.trim();
|
|
284
285
|
const modal = /* @__PURE__ */ jsx("div", { className: isDark ? "dark" : "", children: /* @__PURE__ */ jsx(
|
|
285
286
|
BackgroundBlur,
|
|
286
287
|
{
|
|
@@ -970,7 +971,7 @@ function getButtonClasses(variant = "primary", size = "md", fullWidth, className
|
|
|
970
971
|
const variants = {
|
|
971
972
|
primary: "bg-cyan-500 text-white hover:bg-cyan-400 active:bg-cyan-600 disabled:bg-neutral-400",
|
|
972
973
|
secondary: "border border-cyan-500 text-cyan-500 bg-transparent hover:bg-cyan-50 active:bg-cyan-100 disabled:border-neutral-400 disabled:text-neutral-400",
|
|
973
|
-
ghost: "bg-transparent text-
|
|
974
|
+
ghost: "bg-transparent text-[var(--fg)] hover:bg-[var(--muted)] active:bg-[var(--muted)] disabled:opacity-50"
|
|
974
975
|
};
|
|
975
976
|
const sizes = {
|
|
976
977
|
sm: "h-9 px-3",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neoptocom/neopto-ui",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.9",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A modern React component library built with Tailwind CSS v4 and TypeScript. Features dark mode, design tokens, and comprehensive Storybook documentation. Requires Tailwind v4+.",
|
|
6
6
|
"keywords": [
|
|
@@ -25,7 +25,7 @@ function getButtonClasses(
|
|
|
25
25
|
const variants = {
|
|
26
26
|
primary: "bg-cyan-500 text-white hover:bg-cyan-400 active:bg-cyan-600 disabled:bg-neutral-400",
|
|
27
27
|
secondary: "border border-cyan-500 text-cyan-500 bg-transparent hover:bg-cyan-50 active:bg-cyan-100 disabled:border-neutral-400 disabled:text-neutral-400",
|
|
28
|
-
ghost: "bg-transparent text-
|
|
28
|
+
ghost: "bg-transparent text-[var(--fg)] hover:bg-[var(--muted)] active:bg-[var(--muted)] disabled:opacity-50"
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
const sizes = {
|
package/src/components/Modal.tsx
CHANGED
|
@@ -84,7 +84,8 @@ export function Modal({
|
|
|
84
84
|
|
|
85
85
|
// Smart class merging: only add defaults if not provided
|
|
86
86
|
const hasMaxWidth = className?.includes("max-w-");
|
|
87
|
-
const
|
|
87
|
+
const hasMaxHeight = className?.includes("max-h-");
|
|
88
|
+
const modalClasses = `w-full ${!hasMaxWidth ? "max-w-lg" : ""} ${!hasMaxHeight ? "max-h-[80vh]" : ""} ${className || ""}`.trim();
|
|
88
89
|
|
|
89
90
|
const modal = (
|
|
90
91
|
<div className={isDark ? "dark" : ""}>
|