cynx-lib 1.3.70 → 1.3.71

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cynx-lib",
3
- "version": "1.3.70",
3
+ "version": "1.3.71",
4
4
  "type": "module",
5
5
  "main": "./index.cjs",
6
6
  "module": "./index.js",
@@ -44,6 +44,7 @@ export default function Select({
44
44
  createLabel,
45
45
  }) {
46
46
  const [open, setOpen] = useState(false);
47
+ const [hovered, setHovered] = useState(false);
47
48
  const [query, setQuery] = useState('');
48
49
  const [pos, setPos] = useState({ top: 0, left: 0, width: 0, openUp: false, maxHeight: 200 });
49
50
  const wrapRef = useRef(null);
@@ -218,6 +219,8 @@ export default function Select({
218
219
  >
219
220
  <div
220
221
  onClick={handleOpen}
222
+ onMouseEnter={() => setHovered(true)}
223
+ onMouseLeave={() => setHovered(false)}
221
224
  style={{
222
225
  width: '100%',
223
226
  boxSizing: 'border-box',
@@ -228,7 +231,7 @@ export default function Select({
228
231
  padding: paddingVal,
229
232
  height: heightVal,
230
233
  background: 'var(--sf,var(--surface, #ffffff))',
231
- border: `1px solid ${open ? 'var(--accent, #f99e2c)' : 'var(--bd2,var(--border, #e2e8f0))'}`,
234
+ border: `1px solid ${open ? 'var(--accent, #12675D)' : 'var(--bd,var(--border, #d7d8e0))'}`,
232
235
  borderRadius: radiusVal,
233
236
  cursor: 'pointer',
234
237
  fontFamily: 'var(--f,var(--sans,inherit))',
@@ -237,7 +240,7 @@ export default function Select({
237
240
  color: 'var(--t,var(--primary-text, #0f172a))',
238
241
  outline: 'none',
239
242
  transition: 'border-color var(--tr,.15s), box-shadow var(--tr,.15s)',
240
- boxShadow: open ? 'var(--infd, rgba(37,99,235,.1))' : 'var(--shadow,0 1px 3px rgba(20,22,41,.1))',
243
+ boxShadow: open ? 'var(--pd, rgba(18,103,93,.12)), var(--shadow,0 1px 3px rgba(20,22,41,.1))' : 'var(--shadow,0 1px 3px rgba(20,22,41,.1))',
241
244
  }}
242
245
  >
243
246
  <div style={{ flex: 1, minWidth: 0, display: 'flex', alignItems: 'center' }}>
@@ -375,7 +378,7 @@ export default function Select({
375
378
  padding: s.height <= 26 ? '2px 5px' : s.height <= 28 ? '3px 6px' : '7px 10px',
376
379
  height: s.searchHeight,
377
380
  background: 'var(--sf2,var(--grey-1, #f5f5f8))',
378
- border: '1.5px solid var(--bd2,var(--border, #e2e8f0))',
381
+ border: '1px solid var(--bd,var(--border, #d7d8e0))',
379
382
  borderRadius: s.height <= 26 ? '3px' : s.height <= 28 ? '4px' : 'var(--rmd,var(--rads, 8px))',
380
383
  fontFamily: 'var(--f,var(--sans, inherit))',
381
384
  fontSize: `${s.searchFont}px`,
@@ -106,6 +106,7 @@ const emit = defineEmits<{
106
106
 
107
107
  const slots = useSlots();
108
108
  const open = ref(false);
109
+ const hovered = ref(false);
109
110
  const query = ref("");
110
111
  const pos = ref({ top: 0, left: 0, width: 0, openUp: false, maxHeight: 200 });
111
112
  const wrapRef = ref<HTMLElement | null>(null);
@@ -361,7 +362,7 @@ function handleInputKeyDown(e: KeyboardEvent) {
361
362
  padding: `0 ${s.paddingH}px`,
362
363
  height: `${s.height}px`,
363
364
  background: 'var(--sf,var(--surface, #ffffff))',
364
- border: `1px solid ${open ? 'var(--accent, #f99e2c)' : 'var(--bd2,var(--border, #e2e8f0))'}`,
365
+ border: `1px solid ${open ? 'var(--accent, #12675D)' : 'var(--bd,var(--border, #d7d8e0))'}`,
365
366
  borderRadius: radiusVal,
366
367
  cursor: 'pointer',
367
368
  fontFamily: 'var(--f,var(--sans,inherit))',
@@ -371,9 +372,11 @@ function handleInputKeyDown(e: KeyboardEvent) {
371
372
  outline: 'none',
372
373
  transition: 'border-color var(--tr,.15s), box-shadow var(--tr,.15s)',
373
374
  boxShadow: open
374
- ? 'var(--infd, rgba(37,99,235,.1))'
375
+ ? 'var(--pd, rgba(18,103,93,.12)), var(--shadow, 0 1px 3px rgba(20,22,41,.1))'
375
376
  : 'var(--shadow,0 1px 3px rgba(20,22,41,.1))',
376
377
  }"
378
+ @mouseenter="hovered = true"
379
+ @mouseleave="hovered = false"
377
380
  @click="handleOpen"
378
381
  >
379
382
  <slot v-if="slots.prefix" name="prefix" />
@@ -555,7 +558,7 @@ function handleInputKeyDown(e: KeyboardEvent) {
555
558
  padding: s.height <= 26 ? '2px 5px' : s.height <= 28 ? '3px 6px' : '7px 10px',
556
559
  height: `${s.searchHeight}px`,
557
560
  background: 'var(--sf2,var(--grey-1, #f5f5f8))',
558
- border: '1.5px solid var(--bd2,var(--border, #e2e8f0))',
561
+ border: '1px solid var(--bd,var(--border, #d7d8e0))',
559
562
  borderRadius: s.height <= 26 ? '3px' : s.height <= 28 ? '4px' : 'var(--rmd,var(--rads, 8px))',
560
563
  fontFamily: 'var(--f,var(--sans, inherit))',
561
564
  fontSize: `${s.searchFont}px`,