forstok-ui-lib 6.0.2 → 6.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "forstok-ui-lib",
3
- "version": "6.0.2",
3
+ "version": "6.1.0",
4
4
  "description": "Forstok UI Components Library",
5
5
  "path": "dist",
6
6
  "main": "dist/index.js",
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
2
+ <svg fill="#000000" width="auto" height="auto" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg">
3
+ <path d="M16.114-0.011c-6.559 0-12.114 5.587-12.114 12.204 0 6.93 6.439 14.017 10.77 18.998 0.017 0.020 0.717 0.797 1.579 0.797h0.076c0.863 0 1.558-0.777 1.575-0.797 4.064-4.672 10-12.377 10-18.998 0-6.618-4.333-12.204-11.886-12.204zM16.515 29.849c-0.035 0.035-0.086 0.074-0.131 0.107-0.046-0.032-0.096-0.072-0.133-0.107l-0.523-0.602c-4.106-4.71-9.729-11.161-9.729-17.055 0-5.532 4.632-10.205 10.114-10.205 6.829 0 9.886 5.125 9.886 10.205 0 4.474-3.192 10.416-9.485 17.657zM16.035 6.044c-3.313 0-6 2.686-6 6s2.687 6 6 6 6-2.687 6-6-2.686-6-6-6zM16.035 16.044c-2.206 0-4.046-1.838-4.046-4.044s1.794-4 4-4c2.207 0 4 1.794 4 4 0.001 2.206-1.747 4.044-3.954 4.044z"></path>
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
2
+ <svg width="auto" height="auto" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ <path d="M10.0376 5.31617L10.6866 6.4791C11.2723 7.52858 11.0372 8.90532 10.1147 9.8278C10.1147 9.8278 10.1147 9.8278 10.1147 9.8278C10.1146 9.82792 8.99588 10.9468 11.0245 12.9755C13.0525 15.0035 14.1714 13.8861 14.1722 13.8853C14.1722 13.8853 14.1722 13.8853 14.1722 13.8853C15.0947 12.9628 16.4714 12.7277 17.5209 13.3134L18.6838 13.9624C20.2686 14.8468 20.4557 17.0692 19.0628 18.4622C18.2258 19.2992 17.2004 19.9505 16.0669 19.9934C14.1588 20.0658 10.9183 19.5829 7.6677 16.3323C4.41713 13.0817 3.93421 9.84122 4.00655 7.93309C4.04952 6.7996 4.7008 5.77423 5.53781 4.93723C6.93076 3.54428 9.15317 3.73144 10.0376 5.31617Z" stroke="#1C274C" stroke-width="1.5" stroke-linecap="round"/>
4
+ </svg>
@@ -3460,9 +3460,9 @@ export const NavList = styled.ul`
3460
3460
  ${clearList}
3461
3461
  position: fixed;
3462
3462
  overflow: auto;
3463
- height: calc(100vh - 50px);
3464
- width: 256px;
3465
- padding: 20px 1em 0 1.275em;
3463
+ height: calc(100vh - 48px);
3464
+ width: 187px;
3465
+ padding: .5rem .5rem 0;
3466
3466
  @media only screen and (min-width: 1366px) {
3467
3467
  width: 220px;
3468
3468
  }
@@ -3470,68 +3470,170 @@ export const NavList = styled.ul`
3470
3470
  width: 80%;
3471
3471
  }
3472
3472
  `
3473
+ export const NavMobileHeaderWrapper = styled.div`
3474
+ display: none;
3475
+ grid-template-columns: auto 15px;
3476
+ margin-bottom: 15px;
3477
+ @media (min-width: 1280px) {
3478
+ margin-bottom: 25px;
3479
+ }
3480
+ `
3481
+ export const NavContainerStyles = css`
3482
+ display: none;
3483
+ background-color: var(--pri-clr-bg);
3484
+ @keyframes navleftslide {
3485
+ 0% {
3486
+ left: -150px;
3487
+ }
3488
+ 100% {
3489
+ left: 0px;
3490
+ }
3491
+ }
3492
+ @media only screen and (min-width: 1280px) {
3493
+ position: relative;
3494
+ display: inline-grid;
3495
+ border-right: 1px solid var(--lay-clr-ln);
3496
+ min-height: calc(100vh - 48px);
3497
+ }
3498
+ @media only screen and (max-width: 1279px) {
3499
+ &.mobile-shown {
3500
+ top: 0px;
3501
+ display: block;
3502
+ position: fixed;
3503
+ z-index: 11;
3504
+ ${NavMobileOverlay} {
3505
+ display: block;
3506
+ }
3507
+ ${NavMobileHeaderWrapper} {
3508
+ display: grid;
3509
+ }
3510
+ ${NavList} {
3511
+ animation: navleftslide .15s ease;
3512
+ background: var(--pri-clr-bg);
3513
+ height: 100%;
3514
+ z-index: 102;
3515
+ }
3516
+ }
3517
+ }
3518
+ `
3519
+
3520
+ export const NavContainer = styled.nav`
3521
+ ${NavContainerStyles}
3522
+ `
3473
3523
  export const NavMainItem = styled.li<{ $activated?: boolean }>`
3524
+ line-height: 1.25rem;
3525
+ font-style: normal;
3526
+ font-weight: 400;
3527
+ color: var(--nav-clr);
3474
3528
  position: relative;
3475
- margin-bottom: 15px;
3529
+ margin-bottom: .35rem;
3476
3530
  ._refCollapseNav {
3477
3531
  cursor: pointer;
3478
3532
  &.is-active {
3479
- font-weight: 600;
3533
+ font-weight: 500;
3534
+ color: rgba(28, 32, 36, 1)
3480
3535
  }
3481
3536
  &::after {
3482
3537
  position: absolute;
3483
3538
  content: '';
3484
- right: 3px;
3485
- top: 4px;
3539
+ right: 10px;
3540
+ top: 14px;
3486
3541
  padding: 2px;
3487
3542
  border-style: solid;
3488
- border-width: 0 2px 2px 0;
3543
+ border-width: 0 1px 1px 0;
3489
3544
  transform: rotate(-45deg);
3490
3545
  margin-bottom: 2px;
3546
+ border-color: var(--nav-clr);
3491
3547
  }
3492
- &:hover {
3493
- color: var(--sec-clr-lnk__hvr);
3494
- }
3495
- }
3496
- @media only screen and (max-width: 767.9px) {
3497
- margin-bottom: 20px;
3498
3548
  }
3499
- ${({ $activated }:{ $activated?: boolean }) => {
3500
- if ($activated) {
3501
- return css`
3502
- > div > a {
3503
- font-weight: 600;
3504
- font-size: 14px;
3505
- }
3506
- `
3549
+ ${({ $activated }) => $activated && css`
3550
+ > div {
3551
+ background-color: var(--nav-clr-bg__hvr);
3552
+ border-radius: var(--nav-rd);
3507
3553
  }
3508
- }}
3554
+ > div > a {
3555
+ &, &:hover {
3556
+ color: var(--pri-clr-lnk__hvr) !important;
3557
+ }
3558
+ }
3559
+ `}
3509
3560
  `
3510
- export const NavMainItemWrapper = styled.div`
3511
- display: inline-grid;
3512
- grid-gap: 6px;
3513
- align-items: end;
3514
- font-size: 14px;
3561
+ export const NavChildLine = styled.hr`
3562
+ border-top: 1px solid var(--sec-clr-ln);
3563
+ margin: 0;
3564
+ height: 0px;
3565
+ border-bottom: 0;
3515
3566
  `
3516
- export const NavChildItem = styled.div<{ $activated?: boolean, $mode?: string }>`
3567
+ export const NavChildItem = styled.div<{ $activated?: boolean, $mode?: 'counter' }>`
3517
3568
  display: grid;
3518
3569
  position: relative;
3519
3570
  grid-gap: 6px;
3520
- margin-bottom: 13px;
3521
- align-items: end;
3571
+ margin-left: 1.5rem;
3572
+ margin-top: .125rem;
3573
+ margin-bottom: .125rem;
3574
+ padding-top: .25rem;
3575
+ padding-bottom: .25rem;
3576
+ padding-left: .5rem;
3577
+ padding-right: .5rem;
3578
+ font-weight: 400;
3579
+ align-items: center;
3580
+ height: auto;
3581
+ min-height: 32px;
3582
+ > a, > span {
3583
+ color: var(--nav-clr);
3584
+ }
3585
+ &:hover {
3586
+ background-color: var(--nav-clr-bg__hvr);
3587
+ border-radius: var(--nav-rd);
3588
+ > a, > span {
3589
+ &, &:hover {
3590
+ color: var(--nav-clr);
3591
+ }
3592
+ }
3593
+ }
3522
3594
  .counter > span {
3523
3595
  font-size: 11px;
3524
3596
  padding: 2px 4px;
3525
3597
  position: absolute;
3526
3598
  background-color: var(--mt-clr-bg__fc);
3527
3599
  border-radius: var(--ter-rd);
3528
- top: 0;
3529
- right: 0;
3600
+ top: 50%;
3601
+ right: 8px;
3602
+ line-height: 11px;
3603
+ transform: translateY(-50%);
3530
3604
  }
3531
- @media only screen and (max-width: 767px) {
3532
- margin-bottom: 18px;
3605
+ ${({ $activated }) => $activated && css`
3606
+ background-color: var(--nav-clr-bg__hvr);
3607
+ border-radius: var(--nav-rd);
3608
+ > a, > span {
3609
+ &, &:hover {
3610
+ color: var(--pri-clr-lnk__hvr) !important;
3611
+ }
3612
+ }
3613
+ `}
3614
+ ${({ $mode }) => $mode === 'counter' && css`
3615
+ grid-template-columns: auto 20px;
3616
+ `}
3617
+ `
3618
+ export const NavMainItemWrapper = styled.div`
3619
+ display: grid;
3620
+ grid-template-columns: 15px auto;
3621
+ grid-gap: .5rem;
3622
+ align-items: center;
3623
+ padding-top: .375rem;
3624
+ padding-bottom: .375rem;
3625
+ padding-left: .5rem;
3626
+ padding-right: .5rem;
3627
+ &:hover {
3628
+ background-color: var(--nav-clr-bg__hvr);
3629
+ border-radius: var(--nav-rd);
3630
+ > a {
3631
+ &,
3632
+ &:hover {
3633
+ color: var(--nav-clr);
3634
+ }
3635
+ }
3533
3636
  }
3534
- ${getNavChildItemModFunc}
3535
3637
  `
3536
3638
  export const TotalLabel = styled.span`
3537
3639
  letter-spacing: 1.25px;
@@ -9,6 +9,8 @@ import IconProductLeftNav from '../../assets/images/navs/left/products.svg';
9
9
  import IconWarningChat from '../../assets/images/icons/warning-agent.svg';
10
10
  import IconCheckChat from '../../assets/images/icons/check.svg';
11
11
  import IconCheckChatBlue from '../../assets/images/icons/check-blue.svg';
12
+ import IconPhone from '../../assets/images/icons/phone.svg';
13
+ import IconLocation from '../../assets/images/icons/location.svg';
12
14
 
13
15
  const NotificationStyled = css`
14
16
  width: 44px;
@@ -314,7 +316,21 @@ const getIconContainerStyled = ({ $mode, $name, $width, onClick }:{ $mode?: stri
314
316
  content: url(${IconCheckChatBlue});
315
317
  }
316
318
  `
317
- break;
319
+ break;
320
+ case 'phone':
321
+ style += `
322
+ &:before {
323
+ content: url(${IconPhone});
324
+ }
325
+ `
326
+ break;
327
+ case 'location':
328
+ style += `
329
+ &:before {
330
+ content: url(${IconLocation});
331
+ }
332
+ `
333
+ break;
318
334
  default:
319
335
  break;
320
336
  }