cynx-ui 1.2.23 → 1.2.25
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/components/Input.jsx +2 -2
- package/components/Modal.jsx +4 -16
- package/package.json +1 -1
package/components/Input.jsx
CHANGED
|
@@ -123,11 +123,11 @@ export default function Input({
|
|
|
123
123
|
...style,
|
|
124
124
|
}}
|
|
125
125
|
value={value}
|
|
126
|
+
{...props}
|
|
126
127
|
onFocus={e => { setFocused(true); props.onFocus?.(e); }}
|
|
127
|
-
onBlur={e => { setFocused(false); props.onBlur?.(e); }}
|
|
128
|
+
onBlur={e => { setFocused(false); setHovered(false); props.onBlur?.(e); }}
|
|
128
129
|
onMouseEnter={() => setHovered(true)}
|
|
129
130
|
onMouseLeave={() => setHovered(false)}
|
|
130
|
-
{...props}
|
|
131
131
|
/>
|
|
132
132
|
|
|
133
133
|
{showClear && (
|
package/components/Modal.jsx
CHANGED
|
@@ -30,8 +30,8 @@ const STYLES = `
|
|
|
30
30
|
}
|
|
31
31
|
.modal-card {
|
|
32
32
|
background: var(--surface); border: 1px solid var(--border);
|
|
33
|
-
border-radius: 14px; width: 100%; max-width: 480px;
|
|
34
|
-
box-shadow: var(--shadow-lg); overflow:
|
|
33
|
+
border-radius: 14px; width: 100%; max-width: 480px; max-height: 60vh;
|
|
34
|
+
box-shadow: var(--shadow-lg); overflow: hidden;
|
|
35
35
|
display: flex; flex-direction: column;
|
|
36
36
|
}
|
|
37
37
|
.modal-close {
|
|
@@ -148,9 +148,9 @@ export function Modal({ open, onClose, onBeforeClose, title, children, footer, m
|
|
|
148
148
|
className="modal-card"
|
|
149
149
|
style={{
|
|
150
150
|
background: 'var(--surface)', border: '1px solid var(--border)',
|
|
151
|
-
borderRadius: 14, width: '100%', maxWidth,
|
|
151
|
+
borderRadius: 14, width: '100%', maxWidth, maxHeight: '60vh',
|
|
152
152
|
boxShadow: '0 20px 60px rgba(0,0,0,.25)',
|
|
153
|
-
overflow: '
|
|
153
|
+
overflow: 'hidden', display: 'flex', flexDirection: 'column',
|
|
154
154
|
animation: `${closing ? 'modalCardOut' : 'modalCardIn'} .26s cubic-bezier(.4,0,.2,1) forwards`,
|
|
155
155
|
}}
|
|
156
156
|
onMouseDown={e => e.stopPropagation()}
|
|
@@ -161,18 +161,6 @@ export function Modal({ open, onClose, onBeforeClose, title, children, footer, m
|
|
|
161
161
|
borderRadius: '14px 14px 0 0',
|
|
162
162
|
}}>
|
|
163
163
|
<span className="modal-title" style={{ fontSize: '.88rem', fontWeight: 700, letterSpacing: '-.01em' }}>{title}</span>
|
|
164
|
-
<button className="modal-close" onClick={close} style={{
|
|
165
|
-
background: 'none', border: 'none', cursor: 'pointer', padding: 4, borderRadius: 6,
|
|
166
|
-
color: 'var(--muted)', display: 'flex', alignItems: 'center', transition: 'all .14s',
|
|
167
|
-
}}
|
|
168
|
-
onMouseEnter={e => { e.currentTarget.style.color = 'var(--primary-text)'; e.currentTarget.style.background = 'var(--grey-1)'; }}
|
|
169
|
-
onMouseLeave={e => { e.currentTarget.style.color = 'var(--muted)'; e.currentTarget.style.background = 'none'; }}>
|
|
170
|
-
<svg width="13" height="13" viewBox="0 0 13 13" fill="none" stroke="currentColor"
|
|
171
|
-
strokeWidth="2" strokeLinecap="round">
|
|
172
|
-
<line x1="1.5" y1="1.5" x2="11.5" y2="11.5"/>
|
|
173
|
-
<line x1="11.5" y1="1.5" x2="1.5" y2="11.5"/>
|
|
174
|
-
</svg>
|
|
175
|
-
</button>
|
|
176
164
|
</div>
|
|
177
165
|
<div className="modal-body" style={{ padding: 20, overflowX: 'hidden', overflowY: 'auto', flex: 1, minHeight: 0, ...bodyStyle }}>{resolvedChildren}</div>
|
|
178
166
|
{resolvedFooter && <div className="modal-footer" style={{
|