myk-library 1.1.1 → 1.1.2

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.es.js CHANGED
@@ -247,7 +247,12 @@ import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import*as r from
247
247
  &:focus {
248
248
  outline: none;
249
249
  border-color: ${({theme:e})=>e.colors.primary[600]};
250
- box-shadow: 0 0 0 3px ${({theme:e})=>e.colors.primary[100]};
250
+ box-shadow: 0 0 0 3px ${({theme:e})=>e.colors.primary[200]};
251
+ }
252
+
253
+ &:active:not(:disabled) {
254
+ transform: translateY(1px);
255
+ transition: all 0.1s ease-in-out;
251
256
  }
252
257
  `;case"filled":return O`
253
258
  border: none;
@@ -262,7 +267,12 @@ import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import*as r from
262
267
  &:focus {
263
268
  outline: none;
264
269
  background-color: ${({theme:e})=>e.colors.gray[50]};
265
- border-bottom-color: ${({theme:e})=>e.colors.primary[500]};
270
+ border-bottom-color: ${({theme:e})=>e.colors.primary[600]};
271
+ }
272
+
273
+ &:active:not(:disabled) {
274
+ transform: translateY(1px);
275
+ transition: all 0.1s ease-in-out;
266
276
  }
267
277
  `;case"standard":return O`
268
278
  border: none;
@@ -277,7 +287,12 @@ import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import*as r from
277
287
  &:focus {
278
288
  outline: none;
279
289
  border-bottom-width: 2px;
280
- border-bottom-color: ${({theme:e})=>e.colors.primary[500]};
290
+ border-bottom-color: ${({theme:e})=>e.colors.primary[600]};
291
+ }
292
+
293
+ &:active:not(:disabled) {
294
+ transform: translateY(1px);
295
+ transition: all 0.1s ease-in-out;
281
296
  }
282
297
  `}})(e)}
283
298
  ${({$size:e})=>(e=>{switch(e){case"sm":return O`
@@ -299,10 +314,10 @@ import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import*as r from
299
314
  `}
300
315
 
301
316
  ${({$isError:e,theme:t})=>e&&O`
302
- border-color: ${t.colors.error[500]};
317
+ border-color: ${t.colors.error[600]};
303
318
 
304
319
  &:focus {
305
- border-color: ${t.colors.error[500]};
320
+ border-color: ${t.colors.error[600]};
306
321
  box-shadow: 0 0 0 3px ${t.colors.error[100]};
307
322
  }
308
323
  `}
@@ -372,8 +387,8 @@ import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import*as r from
372
387
  `}})(e)}
373
388
 
374
389
  ${({$checked:e,$indeterminate:t,theme:n})=>(e||t)&&O`
375
- background-color: ${n.colors.primary[500]};
376
- border-color: ${n.colors.primary[500]};
390
+ background-color: ${n.colors.primary[600]};
391
+ border-color: ${n.colors.primary[600]};
377
392
  `}
378
393
 
379
394
  ${({$isError:e,theme:t})=>e&&O`
@@ -399,11 +414,26 @@ import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import*as r from
399
414
 
400
415
  ${Ee}:focus-visible + & {
401
416
  outline: none;
402
- box-shadow: 0 0 0 3px ${({theme:e})=>e.colors.primary[100]};
417
+ box-shadow: 0 0 0 3px ${({theme:e})=>e.colors.primary[200]};
403
418
  }
404
419
 
405
420
  ${Ee}:not(:disabled) + &:hover {
406
421
  border-color: ${({theme:e})=>e.colors.primary[400]};
422
+
423
+ ${({$checked:e,$indeterminate:t,theme:n})=>(e||t)&&O`
424
+ background-color: ${le(.1,n.colors.primary[600])};
425
+ border-color: ${le(.1,n.colors.primary[600])};
426
+ `}
427
+ }
428
+
429
+ ${Ee}:not(:disabled):active + & {
430
+ transform: translateY(1px);
431
+ transition: all 0.1s ease-in-out;
432
+
433
+ ${({$checked:e,$indeterminate:t,theme:n})=>(e||t)&&O`
434
+ background-color: ${le(.15,n.colors.primary[600])};
435
+ border-color: ${le(.15,n.colors.primary[600])};
436
+ `}
407
437
  }
408
438
 
409
439
  /* Checkmark icon */
@@ -425,6 +455,7 @@ import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import*as r from
425
455
  }
426
456
  `,Pe=k.span`
427
457
  font-size: ${({theme:e})=>e.fontSize.md};
458
+ font-weight: 500;
428
459
  color: ${({theme:e,$disabled:t})=>t?e.colors.gray[400]:e.colors.gray[900]};
429
460
  line-height: 1.5;
430
461
 
@@ -516,11 +547,36 @@ import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import*as r from
516
547
 
517
548
  ${_e}:focus-visible + & {
518
549
  outline: none;
519
- box-shadow: 0 0 0 3px ${({theme:e})=>e.colors.primary[100]};
550
+ box-shadow: 0 0 0 3px ${({theme:e})=>e.colors.primary[200]};
520
551
  }
521
552
 
522
553
  ${_e}:not(:disabled) + &:hover {
523
554
  border-color: ${({theme:e})=>e.colors.primary[400]};
555
+
556
+ ${({$checked:e,theme:t})=>e&&O`
557
+ border-color: ${le(.1,t.colors.primary[600])};
558
+ `}
559
+
560
+ &::after {
561
+ ${({$checked:e,theme:t})=>e&&O`
562
+ background-color: ${le(.1,t.colors.primary[600])};
563
+ `}
564
+ }
565
+ }
566
+
567
+ ${_e}:not(:disabled):active + & {
568
+ transform: translateY(1px);
569
+ transition: all 0.1s ease-in-out;
570
+
571
+ ${({$checked:e,theme:t})=>e&&O`
572
+ border-color: ${le(.15,t.colors.primary[600])};
573
+ `}
574
+
575
+ &::after {
576
+ ${({$checked:e,theme:t})=>e&&O`
577
+ background-color: ${le(.15,t.colors.primary[600])};
578
+ `}
579
+ }
524
580
  }
525
581
 
526
582
  /* Inner filled circle when checked */
@@ -533,6 +589,7 @@ import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import*as r from
533
589
  }
534
590
  `,Te=k.span`
535
591
  font-size: ${({theme:e})=>e.fontSize.md};
592
+ font-weight: 500;
536
593
  color: ${({theme:e,$disabled:t})=>t?e.colors.gray[400]:e.colors.gray[900]};
537
594
  line-height: 1.5;
538
595
 
@@ -587,8 +644,13 @@ import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import*as r from
587
644
 
588
645
  &:focus {
589
646
  outline: none;
590
- border-color: ${({theme:e})=>e.colors.primary[500]};
591
- box-shadow: 0 0 0 3px ${({theme:e})=>e.colors.primary[100]};
647
+ border-color: ${({theme:e})=>e.colors.primary[600]};
648
+ box-shadow: 0 0 0 3px ${({theme:e})=>e.colors.primary[200]};
649
+ }
650
+
651
+ &:active:not(:disabled) {
652
+ transform: translateY(1px);
653
+ transition: all 0.1s ease-in-out;
592
654
  }
593
655
  `;case"filled":return O`
594
656
  border: none;
@@ -603,7 +665,12 @@ import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import*as r from
603
665
  &:focus {
604
666
  outline: none;
605
667
  background-color: ${({theme:e})=>e.colors.gray[50]};
606
- border-bottom-color: ${({theme:e})=>e.colors.primary[500]};
668
+ border-bottom-color: ${({theme:e})=>e.colors.primary[600]};
669
+ }
670
+
671
+ &:active:not(:disabled) {
672
+ transform: translateY(1px);
673
+ transition: all 0.1s ease-in-out;
607
674
  }
608
675
  `;case"standard":return O`
609
676
  border: none;
@@ -618,7 +685,12 @@ import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import*as r from
618
685
  &:focus {
619
686
  outline: none;
620
687
  border-bottom-width: 2px;
621
- border-bottom-color: ${({theme:e})=>e.colors.primary[500]};
688
+ border-bottom-color: ${({theme:e})=>e.colors.primary[600]};
689
+ }
690
+
691
+ &:active:not(:disabled) {
692
+ transform: translateY(1px);
693
+ transition: all 0.1s ease-in-out;
622
694
  }
623
695
  `}})(e)}
624
696
  ${({$size:e})=>(e=>{switch(e){case"sm":return O`
@@ -643,10 +715,10 @@ import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import*as r from
643
715
  `}
644
716
 
645
717
  ${({$isError:e,theme:t})=>e&&O`
646
- border-color: ${t.colors.error[500]};
718
+ border-color: ${t.colors.error[600]};
647
719
 
648
720
  &:focus {
649
- border-color: ${t.colors.error[500]};
721
+ border-color: ${t.colors.error[600]};
650
722
  box-shadow: 0 0 0 3px ${t.colors.error[100]};
651
723
  }
652
724
  `}
@@ -2638,6 +2710,11 @@ import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import*as r from
2638
2710
  color: ${({theme:e})=>e.colors.gray[900]};
2639
2711
  transition: all ${({theme:e})=>e.transitions.fast};
2640
2712
 
2713
+ /* Text overflow handling */
2714
+ overflow: hidden;
2715
+ text-overflow: ellipsis;
2716
+ white-space: nowrap;
2717
+
2641
2718
  &::placeholder {
2642
2719
  color: ${({theme:e})=>e.colors.gray[400]};
2643
2720
  }
@@ -2650,7 +2727,12 @@ import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import*as r from
2650
2727
  outline: none;
2651
2728
  border-color: ${({theme:e,$error:t})=>t?e.colors.error[600]:e.colors.primary[600]};
2652
2729
  box-shadow: 0 0 0 3px
2653
- ${({theme:e,$error:t})=>t?e.colors.error[100]:e.colors.primary[100]};
2730
+ ${({theme:e,$error:t})=>t?e.colors.error[100]:e.colors.primary[200]};
2731
+ }
2732
+
2733
+ &:active:not(:disabled) {
2734
+ transform: translateY(1px);
2735
+ transition: all 0.1s ease-in-out;
2654
2736
  }
2655
2737
 
2656
2738
  &:disabled {
@@ -2675,11 +2757,23 @@ import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import*as r from
2675
2757
  padding: ${({theme:e})=>`${e.spacing.sm} ${e.spacing.md}`};
2676
2758
  cursor: pointer;
2677
2759
  background-color: ${({theme:e,$highlighted:t})=>t?e.colors.gray[100]:e.colors.white};
2678
- transition: background-color ${({theme:e})=>e.transitions.fast};
2760
+ transition: all ${({theme:e})=>e.transitions.normal};
2761
+ font-weight: 500;
2762
+
2763
+ /* Text overflow handling */
2764
+ overflow: hidden;
2765
+ text-overflow: ellipsis;
2766
+ white-space: nowrap;
2679
2767
 
2680
2768
  &:hover {
2681
2769
  background-color: ${({theme:e})=>e.colors.gray[100]};
2682
2770
  }
2771
+
2772
+ &:active {
2773
+ background-color: ${({theme:e})=>e.colors.gray[200]};
2774
+ transform: translateY(1px);
2775
+ transition: all 0.1s ease-in-out;
2776
+ }
2683
2777
  `,ho=k.div`
2684
2778
  padding: ${({theme:e})=>`${e.spacing.md} ${e.spacing.lg}`};
2685
2779
  color: ${({theme:e})=>e.colors.gray[500]};
@@ -2687,7 +2781,7 @@ import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import*as r from
2687
2781
  `,go=k.span`
2688
2782
  font-size: ${({theme:e})=>e.fontSize.xs};
2689
2783
  color: ${({theme:e,$error:t})=>t?e.colors.error[600]:e.colors.gray[600]};
2690
- `,mo=({options:n,value:r,onChange:o,placeholder:i="Search...",label:c,size:u="md",disabled:d=!1,error:f=!1,helperText:p,className:h,noOptionsText:g="No options found"})=>{const[m,y]=s(""),[v,b]=s(!1),[x,w]=s(-1),$=a(null),k=a(null),S=n.filter(e=>e.label.toLowerCase().includes(m.toLowerCase()));l(()=>{const e=n.find(e=>e.value===r);e&&y(e.label)},[r,n]),l(()=>{const e=e=>{$.current&&!$.current.contains(e.target)&&b(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);const O=c?.toLowerCase().replace(/\s+/g,"-");return e(so,{ref:$,className:h,children:[c&&t(co,{htmlFor:O,children:c}),t(uo,{id:O,ref:k,value:m,onChange:e=>{y(e.target.value),b(!0),w(-1)},onFocus:()=>{b(!0)},placeholder:i,disabled:d,$size:u,$error:f,"aria-invalid":f,"aria-expanded":v,"aria-autocomplete":"list",role:"combobox"}),t(fo,{$isOpen:v,role:"listbox",children:S.length>0?S.map((e,n)=>t(po,{onClick:()=>(e=>{y(e.label),o?.(e.value),b(!1)})(e),$highlighted:n===x,role:"option","aria-selected":e.value===r,children:e.label},e.value)):t(ho,{children:g})}),p&&t(go,{$error:f,children:p})]})},yo=k.div`
2784
+ `,mo=({options:n,value:r,onChange:o,placeholder:i="Search...",label:c,size:u="md",disabled:d=!1,error:f=!1,helperText:p,className:h,noOptionsText:g="No options found"})=>{const[m,y]=s(""),[v,b]=s(!1),[x,w]=s(-1),$=a(null),k=a(null),S=n.filter(e=>e.label.toLowerCase().includes(m.toLowerCase()));l(()=>{const e=n.find(e=>e.value===r);e&&y(e.label)},[r,n]),l(()=>{const e=e=>{$.current&&!$.current.contains(e.target)&&b(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);const O=c?.toLowerCase().replace(/\s+/g,"-");return e(so,{ref:$,className:h,children:[c&&t(co,{htmlFor:O,children:c}),t(uo,{id:O,ref:k,value:m,onChange:e=>{y(e.target.value),b(!0),w(-1)},onFocus:()=>{b(!0)},placeholder:i,disabled:d,$size:u,$error:f,"aria-invalid":f,"aria-expanded":v,"aria-autocomplete":"list",role:"combobox",title:m}),t(fo,{$isOpen:v,role:"listbox",children:S.length>0?S.map((e,n)=>t(po,{onClick:()=>(e=>{y(e.label),o?.(e.value),b(!1)})(e),$highlighted:n===x,role:"option","aria-selected":e.value===r,title:e.label,children:e.label},e.value)):t(ho,{children:g})}),p&&t(go,{$error:f,children:p})]})},yo=k.div`
2691
2785
  display: flex;
2692
2786
  flex-direction: column;
2693
2787
  gap: ${({theme:e})=>e.spacing.xs};