@neoptocom/neopto-ui 0.9.8 → 0.10.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.cjs +2 -1
- package/dist/index.js +2 -1
- package/package.json +1 -1
- package/src/components/Modal.tsx +2 -1
- package/src/styles/library.css +62 -0
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
|
{
|
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
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neoptocom/neopto-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
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": [
|
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" : ""}>
|
package/src/styles/library.css
CHANGED
|
@@ -33,3 +33,65 @@
|
|
|
33
33
|
.btn { @apply inline-flex items-center justify-center gap-2 rounded-[--radius-lg] px-4 py-2 text-sm font-medium transition; }
|
|
34
34
|
.btn-outline { @apply border border-[--color-brand] text-[--color-brand] bg-[--surface] hover:bg-[--color-brand]/10; }
|
|
35
35
|
.btn-primary { @apply bg-[--color-brand] text-white hover:opacity-90 active:opacity-80; }
|
|
36
|
+
|
|
37
|
+
/* Unified Scrollbar Styles */
|
|
38
|
+
:root {
|
|
39
|
+
--scrollbar-width: 6px;
|
|
40
|
+
--scrollbar-thumb: #797980;
|
|
41
|
+
--scrollbar-thumb-hover: #9C9C9C;
|
|
42
|
+
--scrollbar-track: transparent;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.dark {
|
|
46
|
+
--scrollbar-thumb: #4b4d59;
|
|
47
|
+
--scrollbar-thumb-hover: #797980;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* Default scrollbar - applies to most scrollable containers */
|
|
51
|
+
* {
|
|
52
|
+
scrollbar-width: thin;
|
|
53
|
+
scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
*::-webkit-scrollbar {
|
|
57
|
+
width: var(--scrollbar-width);
|
|
58
|
+
height: var(--scrollbar-width);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
*::-webkit-scrollbar-track {
|
|
62
|
+
background: var(--scrollbar-track);
|
|
63
|
+
border-radius: 1rem;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
*::-webkit-scrollbar-thumb {
|
|
67
|
+
background: var(--scrollbar-thumb);
|
|
68
|
+
border-radius: 1rem;
|
|
69
|
+
border: 2px solid transparent;
|
|
70
|
+
background-clip: padding-box;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
*::-webkit-scrollbar-thumb:hover {
|
|
74
|
+
background: var(--scrollbar-thumb-hover);
|
|
75
|
+
background-clip: padding-box;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* Scrollbar width variants */
|
|
79
|
+
.scrollbar-thin::-webkit-scrollbar {
|
|
80
|
+
width: 6px;
|
|
81
|
+
height: 6px;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.scrollbar-medium::-webkit-scrollbar {
|
|
85
|
+
width: 8px;
|
|
86
|
+
height: 8px;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* Hide scrollbar utility */
|
|
90
|
+
.hide-scrollbar {
|
|
91
|
+
scrollbar-width: none;
|
|
92
|
+
-ms-overflow-style: none;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.hide-scrollbar::-webkit-scrollbar {
|
|
96
|
+
display: none;
|
|
97
|
+
}
|