File tree Expand file tree Collapse file tree 12 files changed +147
-102
lines changed
infrastructure/eid-wallet/src Expand file tree Collapse file tree 12 files changed +147
-102
lines changed Original file line number Diff line number Diff line change 11
11
@layer base {
12
12
/* Typography */
13
13
h1 {
14
- @apply text-[90px ] text-black font-semibold;
14
+ @apply text-[90px ]/ [ 1.5 ] text-black font-semibold;
15
15
}
16
16
17
17
h2 {
18
- @apply text-6xl text-black font-semibold;
18
+ @apply text-6xl/ [ 1.5 ] text-black font-semibold;
19
19
}
20
20
21
21
h3 {
22
- @apply text-3xl text-black font-semibold;
22
+ @apply text-3xl/ [ 1.5 ] text-black font-semibold;
23
23
}
24
24
25
25
h4 {
26
- @apply text-xl text-black font-semibold;
26
+ @apply text-xl/ [ 1.5 ] text-black font-semibold;
27
27
}
28
28
29
29
p {
30
- @apply text-base text-black font-normal;
30
+ @apply text-base/ [ 1.5 ] text-black font-normal;
31
31
}
32
32
33
33
.small {
34
- @apply text-xs text-black font-normal;
34
+ @apply text-xs/ [ 1.5 ] text-black font-normal;
35
35
}
36
36
}
37
37
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ import type { ComponentProps } from "svelte" ;
2
+ import Hero from "./Hero.svelte" ;
3
+
4
+ export default {
5
+ title : "Fragments/Hero" ,
6
+ component : Hero ,
7
+ tags : [ "autodocs" ] ,
8
+ render : ( args : {
9
+ Component : Hero ;
10
+ props : ComponentProps < typeof Hero > ;
11
+ } ) => ( {
12
+ Component : Hero ,
13
+ props : args ,
14
+ } ) ,
15
+ } ;
16
+
17
+ export const Basic = {
18
+ args : {
19
+ title : "Create PIN" ,
20
+ subtitle : "Create a PIN to protect your wallet" ,
21
+ } ,
22
+ } ;
23
+
24
+ export const WithSettings = {
25
+ args : {
26
+ title : "Good morning!" ,
27
+ subtitle : "Don't forget to drink water." ,
28
+ titleClasses : "-mb-2" ,
29
+ showSettings : true ,
30
+ } ,
31
+ } ;
Original file line number Diff line number Diff line change
1
+ <script lang =" ts" >
2
+ import * as Button from " $lib/ui/Button" ;
3
+ import { cn } from " $lib/utils" ;
4
+ import { Settings02Icon } from " @hugeicons/core-free-icons" ;
5
+ import type { HTMLAttributes } from " svelte/elements" ;
6
+
7
+ interface IHeroProps extends HTMLAttributes <HTMLElement > {
8
+ title? : string ;
9
+ subtitle? : string ;
10
+ showSettings? : boolean ;
11
+ titleClasses? : string ;
12
+ }
13
+ const {
14
+ title,
15
+ subtitle,
16
+ showSettings = false ,
17
+ titleClasses,
18
+ children,
19
+ ... restProps
20
+ }: IHeroProps = $props ();
21
+ const baseClasses = " w-full flex justify-between items-center" ;
22
+ </script >
23
+
24
+ <header {...restProps } class ={cn (baseClasses , restProps .class )}>
25
+ <div class =" flex flex-col items-start" >
26
+ <h3 class ={cn (titleClasses )}>
27
+ {@render children ?.()}
28
+ {title }
29
+ </h3 >
30
+ {#if subtitle }
31
+ <p class ="text-black-700 mt-2" >{subtitle }</p >
32
+ {/if }
33
+ </div >
34
+ {#if showSettings }
35
+ <Button .Nav href =" /settings" >
36
+ <Button .Icon
37
+ icon ={Settings02Icon }
38
+ iconSize =" lg"
39
+ />
40
+ </Button .Nav >
41
+ {:else }
42
+ <span aria-hidden =" true" ></span >
43
+ {/if }
44
+ </header >
45
+
46
+ <!--
47
+ @component
48
+ @name Hero
49
+ @description A component that displays a header with a title, subtitle, and optional settings icon.
50
+ @props
51
+ - title: string - The main title to display.
52
+ - subtitle: string - An optional subtitle to display below the title.
53
+ - showSettings: boolean - A flag to determine if the settings icon should be displayed.
54
+ - titleClasses: string - Additional classes to apply to the title element.
55
+ - children: Snippet - Optional child elements to render within the title.
56
+ @slots
57
+ - default - Slot for additional content to be rendered within the title.
58
+ @usage
59
+ ```svelte
60
+ <Hero
61
+ title="Good morning!"
62
+ subtitle="Don't forget to drink water."
63
+ class="mb-8"
64
+ titleClasses="-mb-2"
65
+ showSettings
66
+ >
67
+ </Hero>
68
+ ```
69
+ -->
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ $effect(() => {
41
41
});
42
42
</script >
43
43
44
- <div {...restProps } class ="relative {variant === ' eName' ? " bg-black-900" : variant === ' ePassport' ? " bg-primary" : " bg-gray" } rounded-xl w-full min-h-[150px] text-white overflow-hidden" >
44
+ <div {...restProps } class ="relative {variant === ' eName' ? " bg-black-900" : variant === ' ePassport' ? " bg-primary" : " bg-gray" } rounded-3xl w-full min-h-[150px] text-white overflow-hidden" >
45
45
<div class =" w-full h-full pointer-events-none flex gap-13 justify-end absolute right-15 bottom-20" >
46
46
<div class ="w-10 {variant === ' eVault' ? " bg-white/40" : " bg-white/10" } h-[300%] rotate-40" ></div >
47
47
<div class ="w-10 {variant === ' eVault' ? " bg-white/40" : " bg-white/10" } h-[300%] rotate-40" ></div >
Original file line number Diff line number Diff line change 1
- export { default as Header } from "./Header/Header .svelte" ;
1
+ export { default as Hero } from "./Hero/Hero .svelte" ;
2
2
export { default as IdentityCard } from "./IdentityCard/IdentityCard.svelte" ;
3
3
export { default as SettingsNavigationBtn } from "./SettingsNavigationBtn/SettingsNavigationBtn.svelte" ;
Original file line number Diff line number Diff line change 1
1
<script lang =" ts" >
2
+ import { Hero } from " $lib/fragments" ;
2
3
import IdentityCard from " $lib/fragments/IdentityCard/IdentityCard.svelte" ;
3
4
import { ButtonAction } from " $lib/ui" ;
4
5
@@ -20,8 +21,11 @@ const handleFinish = async () => {};
20
21
}}/>
21
22
</section >
22
23
<section class =" mt-[4vh] mb-[9vh]" >
23
- <h4 class =" mb-[0.5vh]" >Your eVault</h4 >
24
- <p class =" text-black-700 mb-[3vh]" >We’ve also created your eVault—secure cloud storage for your personal data. W3DS platforms access it directly, keeping you in control.</p >
24
+ <Hero
25
+ title =" Your ePassport and eVault are ready"
26
+ subtitle =" Log into any W3DS platform without passwords. It’s tied to this phone; if lost, you’ll need to revoke and reissue it on a new device."
27
+ class =" mb-2"
28
+ />
25
29
<IdentityCard variant = " eVault"
26
30
usedStorage = {15}
27
31
totalStorage = {80}/>
Original file line number Diff line number Diff line change 1
1
<script lang =" ts" >
2
2
import { goto } from " $app/navigation" ;
3
+ import { Hero } from " $lib/fragments" ;
3
4
import { ButtonAction , Drawer } from " $lib/ui" ;
4
5
5
6
let isPaneOpen = $state (false );
@@ -20,10 +21,15 @@ const handleNext = async () => {
20
21
<img class =" aspect-square w-full object-cover" src =" /images/Onboarding.svg" alt =" Infographic card" >
21
22
</article >
22
23
<section class =" mb-[9.3vh]" >
23
- <h2 class =" text-[42px]/[1] font-medium mb-[1vh]" >Your <br >
24
+ <Hero
25
+ subtitle =" Store your IDs, verify instantly with QR codes, and manage your digital identity with ease."
26
+ class =" mb-4"
27
+ titleClasses =" text-[42px]/[1.1] font-medium"
28
+ >
29
+ Your <br >
24
30
Digital Identity,
25
- Secured</ h2 >
26
- <p class = " text-black-700 " >Store your IDs, verify instantly with QR codes, and manage your digital identity with ease.</ p >
31
+ Secured
32
+ </ Hero >
27
33
</section >
28
34
<section >
29
35
<p class =" max-w-[300px] mx-[auto] text-center small text-black-500" >By continuing you agree to our <a href =" /" class =" text-primary underline underline-offset-5" >Terms & Conditions </a > and <a href =" /" class =" text-primary underline underline-offset-5" >privacy policy.</a ></p >
Original file line number Diff line number Diff line change 1
1
<script lang =" ts" >
2
2
import { goto } from " $app/navigation" ;
3
+ import { Hero } from " $lib/fragments" ;
3
4
import { ButtonAction , Drawer , InputPin } from " $lib/ui" ;
4
5
import { CircleLock01Icon , FaceIdIcon } from " @hugeicons/core-free-icons" ;
5
6
import { HugeiconsIcon } from " @hugeicons/svelte" ;
@@ -55,17 +56,23 @@ $effect(() => {
55
56
{#if firstStep }
56
57
<main class =" h-screen pt-[5.2vh] px-[5vw] pb-[4.5vh] flex flex-col justify-between" >
57
58
<section >
58
- <h3 class =" mb-[1vh]" >Create a pin</h3 >
59
- <p class =" text-black-700 mb-[14vh]" >Enter a 4-digit PIN code</p >
59
+ <Hero
60
+ title =" Create a pin"
61
+ subtitle =" Enter a 4-digit PIN code"
62
+ class =" mb-[14vh]"
63
+ />
60
64
<InputPin bind:pin />
61
65
</section >
62
66
<ButtonAction class ="w-full" variant ="soft" callback ={handleFirstStep }>Confirm</ButtonAction >
63
67
</main >
64
68
{:else }
65
69
<main class =" h-screen pt-[5.2vh] px-[5vw] pb-[4.5vh] flex flex-col justify-between" >
66
70
<section >
67
- <h3 class =" mb-[1vh]" >Re-enter your pin</h3 >
68
- <p class =" text-black-700 mb-[14vh]" >Confirm by entering pin again</p >
71
+ <Hero
72
+ title =" Re-enter your pin"
73
+ subtitle =" Confirm by entering pin again"
74
+ class =" mb-[14vh]"
75
+ />
69
76
<InputPin bind:pin ={repeatPin } {isError }/>
70
77
<p class ={` text-danger mt-[3.4vh] ${isError ? " block" : " hidden" } ` }>Your PIN does not match, try again.</p >
71
78
</section >
You can’t perform that action at this time.
0 commit comments