diff --git a/infrastructure/eid-wallet/src/app.css b/infrastructure/eid-wallet/src/app.css index af1e2ef3..5333d875 100644 --- a/infrastructure/eid-wallet/src/app.css +++ b/infrastructure/eid-wallet/src/app.css @@ -11,27 +11,27 @@ @layer base { /* Typography */ h1 { - @apply text-[90px] text-black font-semibold; + @apply text-[90px]/[1.5] text-black font-semibold; } h2 { - @apply text-6xl text-black font-semibold; + @apply text-6xl/[1.5] text-black font-semibold; } h3 { - @apply text-3xl text-black font-semibold; + @apply text-3xl/[1.5] text-black font-semibold; } h4 { - @apply text-xl text-black font-semibold; + @apply text-xl/[1.5] text-black font-semibold; } p { - @apply text-base text-black font-normal; + @apply text-base/[1.5] text-black font-normal; } .small { - @apply text-xs text-black font-normal; + @apply text-xs/[1.5] text-black font-normal; } } @@ -71,4 +71,8 @@ body { font-family: "Archivo", sans-serif; + padding-top: env(safe-area-inset-top); + padding-bottom: env(safe-area-inset-bottom); + padding-left: env(safe-area-inset-left); + padding-right: env(safe-area-inset-right); } diff --git a/infrastructure/eid-wallet/src/app.html b/infrastructure/eid-wallet/src/app.html index 92e7e333..33600a68 100644 --- a/infrastructure/eid-wallet/src/app.html +++ b/infrastructure/eid-wallet/src/app.html @@ -4,6 +4,7 @@ + Tauri + SvelteKit + Typescript App %sveltekit.head% diff --git a/infrastructure/eid-wallet/src/lib/fragments/Header/Header.stories.ts b/infrastructure/eid-wallet/src/lib/fragments/Header/Header.stories.ts deleted file mode 100644 index f41b19a6..00000000 --- a/infrastructure/eid-wallet/src/lib/fragments/Header/Header.stories.ts +++ /dev/null @@ -1,39 +0,0 @@ -import Header from "./Header.svelte"; - -export default { - title: "Fragments/Header", - component: Header, - tags: ["autodocs"], - render: (args: { - title: string; - isBackRequired: boolean; - isUserLoggedIn: boolean; - }) => ({ - Component: Header, - props: args, - }), -}; - -export const Primary = { - args: { - title: "Create PIN", - isBackRequired: false, - isUserLoggedIn: false, - }, -}; - -export const Secondary = { - args: { - title: "Create PIN", - isBackRequired: true, - isUserLoggedIn: false, - }, -}; - -export const Tertiary = { - args: { - title: "Create PIN", - isBackRequired: true, - isUserLoggedIn: true, - }, -}; diff --git a/infrastructure/eid-wallet/src/lib/fragments/Header/Header.svelte b/infrastructure/eid-wallet/src/lib/fragments/Header/Header.svelte deleted file mode 100644 index 0ae91a53..00000000 --- a/infrastructure/eid-wallet/src/lib/fragments/Header/Header.svelte +++ /dev/null @@ -1,42 +0,0 @@ - - -
- {#if isBackRequired} - - {:else} - -
\ No newline at end of file diff --git a/infrastructure/eid-wallet/src/lib/fragments/Hero/Hero.stories.ts b/infrastructure/eid-wallet/src/lib/fragments/Hero/Hero.stories.ts new file mode 100644 index 00000000..6978b3f9 --- /dev/null +++ b/infrastructure/eid-wallet/src/lib/fragments/Hero/Hero.stories.ts @@ -0,0 +1,31 @@ +import type { ComponentProps } from "svelte"; +import Hero from "./Hero.svelte"; + +export default { + title: "Fragments/Hero", + component: Hero, + tags: ["autodocs"], + render: (args: { + Component: Hero; + props: ComponentProps; + }) => ({ + Component: Hero, + props: args, + }), +}; + +export const Basic = { + args: { + title: "Create PIN", + subtitle: "Create a PIN to protect your wallet", + }, +}; + +export const WithSettings = { + args: { + title: "Good morning!", + subtitle: "Don't forget to drink water.", + titleClasses: "-mb-2", + showSettings: true, + }, +}; diff --git a/infrastructure/eid-wallet/src/lib/fragments/Hero/Hero.svelte b/infrastructure/eid-wallet/src/lib/fragments/Hero/Hero.svelte new file mode 100644 index 00000000..439f64ff --- /dev/null +++ b/infrastructure/eid-wallet/src/lib/fragments/Hero/Hero.svelte @@ -0,0 +1,46 @@ + + +
+
+

+ {@render children?.()} + {title} +

+ {#if subtitle} +

{subtitle}

+ {/if} +
+ {#if showSettings} + + + + {:else} + + {/if} +
\ No newline at end of file diff --git a/infrastructure/eid-wallet/src/lib/fragments/IdentityCard/IdentityCard.svelte b/infrastructure/eid-wallet/src/lib/fragments/IdentityCard/IdentityCard.svelte index 823c307a..eb0811f2 100644 --- a/infrastructure/eid-wallet/src/lib/fragments/IdentityCard/IdentityCard.svelte +++ b/infrastructure/eid-wallet/src/lib/fragments/IdentityCard/IdentityCard.svelte @@ -1,4 +1,5 @@ -
+
@@ -48,22 +49,17 @@ $effect(() => {
{#if variant === 'eName'} - -
- - -
+ +
+ + +
{:else if variant === 'ePassport'} -

HIGH SECURITY

- +

HIGH SECURITY

+ + {:else if variant === 'eVault'} -

{state.progressWidth} Used

+
{state.progressWidth} Used
{/if}
@@ -98,4 +94,5 @@ $effect(() => {
- + + \ No newline at end of file diff --git a/infrastructure/eid-wallet/src/lib/fragments/SplashScreen/SplashScreen.svelte b/infrastructure/eid-wallet/src/lib/fragments/SplashScreen/SplashScreen.svelte new file mode 100644 index 00000000..d344a848 --- /dev/null +++ b/infrastructure/eid-wallet/src/lib/fragments/SplashScreen/SplashScreen.svelte @@ -0,0 +1,21 @@ + + +
+
+ + illustration + illustration +
+

eAgency

+

Your self-sovereign digital entity

+
+ logo +
+
+ + \ No newline at end of file diff --git a/infrastructure/eid-wallet/src/lib/fragments/index.ts b/infrastructure/eid-wallet/src/lib/fragments/index.ts index 21e9aaf3..fa153456 100644 --- a/infrastructure/eid-wallet/src/lib/fragments/index.ts +++ b/infrastructure/eid-wallet/src/lib/fragments/index.ts @@ -1,3 +1,3 @@ -export { default as Header } from "./Header/Header.svelte"; +export { default as Hero } from "./Hero/Hero.svelte"; export { default as IdentityCard } from "./IdentityCard/IdentityCard.svelte"; export { default as SettingsNavigationBtn } from "./SettingsNavigationBtn/SettingsNavigationBtn.svelte"; diff --git a/infrastructure/eid-wallet/src/lib/ui/Button/ButtonIcon.stories.ts b/infrastructure/eid-wallet/src/lib/ui/Button/ButtonIcon.stories.ts index d43d0d56..9cdec274 100644 --- a/infrastructure/eid-wallet/src/lib/ui/Button/ButtonIcon.stories.ts +++ b/infrastructure/eid-wallet/src/lib/ui/Button/ButtonIcon.stories.ts @@ -1,4 +1,4 @@ -import { FlashlightIcon } from "@hugeicons/core-free-icons"; +import { FlashlightIcon, ViewIcon } from "@hugeicons/core-free-icons"; import type { ComponentProps } from "svelte"; import ButtonIcon from "./ButtonIcon.svelte"; @@ -6,10 +6,7 @@ export default { title: "UI/ButtonIcon", component: ButtonIcon, tags: ["autodocs"], - render: (args: { - Component: ButtonIcon<{ icon: typeof FlashlightIcon }>; - props: ComponentProps; - }) => ({ + render: (args: ComponentProps) => ({ Component: ButtonIcon, props: args, }), @@ -19,10 +16,26 @@ export const Default = { render: () => ({ Component: ButtonIcon, props: { - variant: "white", ariaLabel: "Default button", - size: "md", + bgSize: "md", // Predefined size + iconSize: "md", + icon: ViewIcon, + bgColor: "black", + iconColor: "white", + }, + }), +}; + +export const CustomSize = { + render: () => ({ + Component: ButtonIcon, + props: { + ariaLabel: "Custom sized button", + bgSize: "w-[120px] h-[120px]", // Custom Tailwind size + iconSize: 56, // Custom pixel size icon: FlashlightIcon, + bgColor: "bg-danger", + iconColor: "white", }, }), }; @@ -31,24 +44,32 @@ export const Loading = { render: () => ({ Component: ButtonIcon, props: { - variant: "white", ariaLabel: "Loading button", - size: "md", + bgSize: "md", + iconSize: "md", icon: FlashlightIcon, isLoading: true, + bgColor: "black", + iconColor: "white", }, }), }; -export const Active = { +export const WithCallback = { render: () => ({ Component: ButtonIcon, props: { - variant: "white", - ariaLabel: "Active button", - size: "md", + ariaLabel: "Button with async callback", + bgSize: "md", + iconSize: "md", icon: FlashlightIcon, - isActive: true, + callback: async () => { + await new Promise((resolve) => setTimeout(resolve, 2000)); + console.log("Action completed!"); + }, + blockingClick: true, + bgColor: "primary", + iconColor: "white", }, }), }; diff --git a/infrastructure/eid-wallet/src/lib/ui/Button/ButtonIcon.svelte b/infrastructure/eid-wallet/src/lib/ui/Button/ButtonIcon.svelte index 0fd927da..4e6be406 100644 --- a/infrastructure/eid-wallet/src/lib/ui/Button/ButtonIcon.svelte +++ b/infrastructure/eid-wallet/src/lib/ui/Button/ButtonIcon.svelte @@ -1,32 +1,49 @@ - +--> \ No newline at end of file diff --git a/infrastructure/eid-wallet/src/lib/ui/Drawer/Drawer.svelte b/infrastructure/eid-wallet/src/lib/ui/Drawer/Drawer.svelte index e804ff30..0af52cf9 100644 --- a/infrastructure/eid-wallet/src/lib/ui/Drawer/Drawer.svelte +++ b/infrastructure/eid-wallet/src/lib/ui/Drawer/Drawer.svelte @@ -1,7 +1,7 @@
-

Verify your account

-

Get your passport ready. You’ll be directed to a site where you can verify your account in a swift and secure process

-
- passport -
+ + passport
goto("/verify/id")}>I'm ready
\ No newline at end of file diff --git a/infrastructure/eid-wallet/src/routes/+layout.svelte b/infrastructure/eid-wallet/src/routes/+layout.svelte index 5d30d127..2ebf7008 100644 --- a/infrastructure/eid-wallet/src/routes/+layout.svelte +++ b/infrastructure/eid-wallet/src/routes/+layout.svelte @@ -1,26 +1,32 @@ - + {#if showSplashScreen} -
- illustration - illustration -
-

eAgency

-

Your self-sovereign digital entity

-
- logo -
+ {:else} {@render children?.()} -{/if} \ No newline at end of file +{/if}