diff --git a/.vscode/settings.json b/.vscode/settings.json index 44a73ec3..3a997867 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,7 @@ { - "eslint.workingDirectories": [ - { - "mode": "auto" - } - ] + "eslint.workingDirectories": [ + { + "mode": "auto" + } + ] } diff --git a/infrastructure/eid-wallet/.storybook/main.ts b/infrastructure/eid-wallet/.storybook/main.ts index d3b27d2f..3602cf26 100644 --- a/infrastructure/eid-wallet/.storybook/main.ts +++ b/infrastructure/eid-wallet/.storybook/main.ts @@ -1,22 +1,22 @@ -import type { StorybookConfig } from '@storybook/sveltekit' -import { join, dirname } from 'path' +import type { StorybookConfig } from "@storybook/sveltekit"; +import { join, dirname } from "path"; function getAbsolutePath(value: string): any { - return dirname(require.resolve(join(value, 'package.json'))) + return dirname(require.resolve(join(value, "package.json"))); } const config: StorybookConfig = { - stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|ts)'], - addons: [ - getAbsolutePath('@storybook/addon-essentials'), - getAbsolutePath('@chromatic-com/storybook'), - getAbsolutePath('@storybook/experimental-addon-test'), - ], - framework: { - name: '@storybook/sveltekit', - options: {}, - }, + stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|ts)"], + addons: [ + getAbsolutePath("@storybook/addon-essentials"), + getAbsolutePath("@chromatic-com/storybook"), + getAbsolutePath("@storybook/experimental-addon-test"), + ], + framework: { + name: "@storybook/sveltekit", + options: {}, + }, - staticDirs: ['../static'], -} -export default config + staticDirs: ["../static"], +}; +export default config; diff --git a/infrastructure/eid-wallet/.storybook/preview.ts b/infrastructure/eid-wallet/.storybook/preview.ts index 7b596951..b2cb78f5 100644 --- a/infrastructure/eid-wallet/.storybook/preview.ts +++ b/infrastructure/eid-wallet/.storybook/preview.ts @@ -12,4 +12,4 @@ const preview: Preview = { }, }; -export default preview; \ No newline at end of file +export default preview; diff --git a/infrastructure/eid-wallet/.storybook/vitest.setup.ts b/infrastructure/eid-wallet/.storybook/vitest.setup.ts index e9000fa2..e427971e 100644 --- a/infrastructure/eid-wallet/.storybook/vitest.setup.ts +++ b/infrastructure/eid-wallet/.storybook/vitest.setup.ts @@ -1,9 +1,9 @@ -import { beforeAll } from 'vitest'; -import { setProjectAnnotations } from '@storybook/sveltekit'; -import * as projectAnnotations from './preview'; +import { beforeAll } from "vitest"; +import { setProjectAnnotations } from "@storybook/sveltekit"; +import * as projectAnnotations from "./preview"; // This is an important step to apply the right configuration when testing your stories. // More info at: https://storybook.js.org/docs/api/portable-stories/portable-stories-vitest#setprojectannotations const project = setProjectAnnotations([projectAnnotations]); -beforeAll(project.beforeAll); \ No newline at end of file +beforeAll(project.beforeAll); diff --git a/infrastructure/eid-wallet/.vscode/extensions.json b/infrastructure/eid-wallet/.vscode/extensions.json index 61343e9b..648a8aa6 100644 --- a/infrastructure/eid-wallet/.vscode/extensions.json +++ b/infrastructure/eid-wallet/.vscode/extensions.json @@ -1,7 +1,7 @@ { - "recommendations": [ - "svelte.svelte-vscode", - "tauri-apps.tauri-vscode", - "rust-lang.rust-analyzer" - ] + "recommendations": [ + "svelte.svelte-vscode", + "tauri-apps.tauri-vscode", + "rust-lang.rust-analyzer" + ] } diff --git a/infrastructure/eid-wallet/.vscode/settings.json b/infrastructure/eid-wallet/.vscode/settings.json index 2f86c501..69e59732 100644 --- a/infrastructure/eid-wallet/.vscode/settings.json +++ b/infrastructure/eid-wallet/.vscode/settings.json @@ -1,3 +1,3 @@ { - "svelte.enable-ts-plugin": true + "svelte.enable-ts-plugin": true } diff --git a/infrastructure/eid-wallet/biome.json b/infrastructure/eid-wallet/biome.json index e5fac3da..31df3c09 100644 --- a/infrastructure/eid-wallet/biome.json +++ b/infrastructure/eid-wallet/biome.json @@ -1,16 +1,16 @@ { - "$schema": "./node_modules/@biomejs/biome/configuration_schema.json", - "overrides": [ - { - "include": ["*.svelte", "*.astro", "*.vue"], - "linter": { - "rules": { - "style": { - "useConst": "off", - "useImportType": "off" - } - } - } - } - ] + "$schema": "./node_modules/@biomejs/biome/configuration_schema.json", + "overrides": [ + { + "include": ["*.svelte", "*.astro", "*.vue"], + "linter": { + "rules": { + "style": { + "useConst": "off", + "useImportType": "off" + } + } + } + } + ] } diff --git a/infrastructure/eid-wallet/package.json b/infrastructure/eid-wallet/package.json index ba7ce7f0..ef3fd680 100644 --- a/infrastructure/eid-wallet/package.json +++ b/infrastructure/eid-wallet/package.json @@ -1,66 +1,66 @@ { - "name": "eid-wallet", - "version": "0.1.0", - "description": "", - "type": "module", - "scripts": { - "dev": "vite dev", - "build": "vite build", - "preview": "vite preview", - "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json && npx @biomejs/biome check ./src", - "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", - "format": "npx @biomejs/biome format --write ./src", - "check-format": "npx @biomejs/biome format ./src", - "lint": "npx @biomejs/biome lint --write ./src", - "check-lint": "npx @biomejs/biome lint ./src", - "tauri": "tauri", - "storybook": "svelte-kit sync && storybook dev -p 6006", - "build-storybook": "storybook build" - }, - "license": "MIT", - "dependencies": { - "@biomejs/biome": "^1.9.4", - "@hugeicons/core-free-icons": "^1.0.13", - "@hugeicons/svelte": "^1.0.2", - "@tailwindcss/container-queries": "^0.1.1", - "@tauri-apps/api": "^2", - "@tauri-apps/plugin-opener": "^2", - "clsx": "^2.1.1", - "flag-icons": "^7.3.2", - "tailwind-merge": "^3.0.2" - }, - "devDependencies": { - "@chromatic-com/storybook": "^3", - "@storybook/addon-essentials": "^8.6.7", - "@storybook/addon-interactions": "^8.6.7", - "@storybook/blocks": "^8.6.7", - "@storybook/experimental-addon-test": "^8.6.7", - "@storybook/svelte": "^8.6.7", - "@storybook/sveltekit": "^8.6.7", - "@storybook/test": "^8.6.7", - "@storybook/testing-library": "^0.2.2", - "@sveltejs/adapter-static": "^3.0.6", - "@sveltejs/kit": "^2.9.0", - "@sveltejs/vite-plugin-svelte": "^5.0.0", - "@tailwindcss/forms": "^0.5.10", - "@tailwindcss/typography": "^0.5.16", - "@tailwindcss/vite": "^4.0.14", - "@tauri-apps/cli": "^2", - "@types/node": "^22.13.10", - "@vitest/browser": "^3.0.9", - "@vitest/coverage-v8": "^3.0.9", - "autoprefixer": "^10.4.21", - "cupertino-pane": "^1.4.22", - "daisyui": "^5.0.6", - "playwright": "^1.51.1", - "postcss": "^8.5.3", - "storybook": "^8.6.7", - "svelte": "^5.0.0", - "svelte-check": "^4.0.0", - "svelte-gestures": "^5.1.3", - "tailwindcss": "^4.0.14", - "typescript": "~5.6.2", - "vite": "^6.0.3", - "vitest": "^3.0.9" - } + "name": "eid-wallet", + "version": "0.1.0", + "description": "", + "type": "module", + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json && npx @biomejs/biome check ./src", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", + "format": "npx @biomejs/biome format --write ./src", + "check-format": "npx @biomejs/biome format ./src", + "lint": "npx @biomejs/biome lint --write ./src", + "check-lint": "npx @biomejs/biome lint ./src", + "tauri": "tauri", + "storybook": "svelte-kit sync && storybook dev -p 6006", + "build-storybook": "storybook build" + }, + "license": "MIT", + "dependencies": { + "@biomejs/biome": "^1.9.4", + "@hugeicons/core-free-icons": "^1.0.13", + "@hugeicons/svelte": "^1.0.2", + "@tailwindcss/container-queries": "^0.1.1", + "@tauri-apps/api": "^2", + "@tauri-apps/plugin-opener": "^2", + "clsx": "^2.1.1", + "flag-icons": "^7.3.2", + "tailwind-merge": "^3.0.2" + }, + "devDependencies": { + "@chromatic-com/storybook": "^3", + "@storybook/addon-essentials": "^8.6.7", + "@storybook/addon-interactions": "^8.6.7", + "@storybook/blocks": "^8.6.7", + "@storybook/experimental-addon-test": "^8.6.7", + "@storybook/svelte": "^8.6.7", + "@storybook/sveltekit": "^8.6.7", + "@storybook/test": "^8.6.7", + "@storybook/testing-library": "^0.2.2", + "@sveltejs/adapter-static": "^3.0.6", + "@sveltejs/kit": "^2.9.0", + "@sveltejs/vite-plugin-svelte": "^5.0.0", + "@tailwindcss/forms": "^0.5.10", + "@tailwindcss/typography": "^0.5.16", + "@tailwindcss/vite": "^4.0.14", + "@tauri-apps/cli": "^2", + "@types/node": "^22.13.10", + "@vitest/browser": "^3.0.9", + "@vitest/coverage-v8": "^3.0.9", + "autoprefixer": "^10.4.21", + "cupertino-pane": "^1.4.22", + "daisyui": "^5.0.6", + "playwright": "^1.51.1", + "postcss": "^8.5.3", + "storybook": "^8.6.7", + "svelte": "^5.0.0", + "svelte-check": "^4.0.0", + "svelte-gestures": "^5.1.3", + "tailwindcss": "^4.0.14", + "typescript": "~5.6.2", + "vite": "^6.0.3", + "vitest": "^3.0.9" + } } diff --git a/infrastructure/eid-wallet/src-tauri/capabilities/default.json b/infrastructure/eid-wallet/src-tauri/capabilities/default.json index 4cdbf49a..a6ed8523 100644 --- a/infrastructure/eid-wallet/src-tauri/capabilities/default.json +++ b/infrastructure/eid-wallet/src-tauri/capabilities/default.json @@ -1,10 +1,7 @@ { - "$schema": "../gen/schemas/desktop-schema.json", - "identifier": "default", - "description": "Capability for the main window", - "windows": ["main"], - "permissions": [ - "core:default", - "opener:default" - ] + "$schema": "../gen/schemas/desktop-schema.json", + "identifier": "default", + "description": "Capability for the main window", + "windows": ["main"], + "permissions": ["core:default", "opener:default"] } diff --git a/infrastructure/eid-wallet/src-tauri/gen/android/app/src/main/assets/tauri.conf.json b/infrastructure/eid-wallet/src-tauri/gen/android/app/src/main/assets/tauri.conf.json index a5d7a6b5..203f28ee 100644 --- a/infrastructure/eid-wallet/src-tauri/gen/android/app/src/main/assets/tauri.conf.json +++ b/infrastructure/eid-wallet/src-tauri/gen/android/app/src/main/assets/tauri.conf.json @@ -1 +1,101 @@ -{"$schema":"https://schema.tauri.app/config/2","productName":"eid-wallet","version":"0.1.0","identifier":"com.eid-wallet.app","app":{"windows":[{"label":"main","create":true,"url":"index.html","dragDropEnabled":true,"center":false,"width":800.0,"height":600.0,"resizable":true,"maximizable":true,"minimizable":true,"closable":true,"title":"eid-wallet","fullscreen":false,"focus":true,"transparent":false,"maximized":false,"visible":true,"decorations":true,"alwaysOnBottom":false,"alwaysOnTop":false,"visibleOnAllWorkspaces":false,"contentProtected":false,"skipTaskbar":false,"titleBarStyle":"Visible","hiddenTitle":false,"acceptFirstMouse":false,"shadow":true,"incognito":false,"zoomHotkeysEnabled":false,"browserExtensionsEnabled":false,"useHttpsScheme":false}],"security":{"freezePrototype":false,"dangerousDisableAssetCspModification":false,"assetProtocol":{"scope":[],"enable":false},"pattern":{"use":"brownfield"},"capabilities":[]},"macOSPrivateApi":false,"withGlobalTauri":false,"enableGTKAppId":false},"build":{"devUrl":"http://192.168.35.49:1420/","frontendDist":"../build","beforeDevCommand":"pnpm dev","beforeBuildCommand":"pnpm build"},"bundle":{"active":true,"targets":"all","createUpdaterArtifacts":false,"icon":["icons/32x32.png","icons/128x128.png","icons/128x128@2x.png","icons/icon.icns","icons/icon.ico"],"useLocalToolsDir":false,"windows":{"digestAlgorithm":null,"certificateThumbprint":null,"timestampUrl":null,"tsp":false,"webviewInstallMode":{"type":"downloadBootstrapper","silent":true},"allowDowngrades":true,"wix":null,"nsis":null,"signCommand":null},"linux":{"appimage":{"bundleMediaFramework":false,"files":{}},"deb":{"files":{}},"rpm":{"release":"1","epoch":0,"files":{}}},"macOS":{"files":{},"minimumSystemVersion":"10.13","hardenedRuntime":true,"dmg":{"windowSize":{"width":660,"height":400},"appPosition":{"x":180,"y":170},"applicationFolderPosition":{"x":480,"y":170}}},"iOS":{"minimumSystemVersion":"13.0"},"android":{"minSdkVersion":24}},"plugins":{}} \ No newline at end of file +{ + "$schema": "https://schema.tauri.app/config/2", + "productName": "eid-wallet", + "version": "0.1.0", + "identifier": "com.eid-wallet.app", + "app": { + "windows": [ + { + "label": "main", + "create": true, + "url": "index.html", + "dragDropEnabled": true, + "center": false, + "width": 800.0, + "height": 600.0, + "resizable": true, + "maximizable": true, + "minimizable": true, + "closable": true, + "title": "eid-wallet", + "fullscreen": false, + "focus": true, + "transparent": false, + "maximized": false, + "visible": true, + "decorations": true, + "alwaysOnBottom": false, + "alwaysOnTop": false, + "visibleOnAllWorkspaces": false, + "contentProtected": false, + "skipTaskbar": false, + "titleBarStyle": "Visible", + "hiddenTitle": false, + "acceptFirstMouse": false, + "shadow": true, + "incognito": false, + "zoomHotkeysEnabled": false, + "browserExtensionsEnabled": false, + "useHttpsScheme": false + } + ], + "security": { + "freezePrototype": false, + "dangerousDisableAssetCspModification": false, + "assetProtocol": { "scope": [], "enable": false }, + "pattern": { "use": "brownfield" }, + "capabilities": [] + }, + "macOSPrivateApi": false, + "withGlobalTauri": false, + "enableGTKAppId": false + }, + "build": { + "devUrl": "http://192.168.35.49:1420/", + "frontendDist": "../build", + "beforeDevCommand": "pnpm dev", + "beforeBuildCommand": "pnpm build" + }, + "bundle": { + "active": true, + "targets": "all", + "createUpdaterArtifacts": false, + "icon": [ + "icons/32x32.png", + "icons/128x128.png", + "icons/128x128@2x.png", + "icons/icon.icns", + "icons/icon.ico" + ], + "useLocalToolsDir": false, + "windows": { + "digestAlgorithm": null, + "certificateThumbprint": null, + "timestampUrl": null, + "tsp": false, + "webviewInstallMode": { "type": "downloadBootstrapper", "silent": true }, + "allowDowngrades": true, + "wix": null, + "nsis": null, + "signCommand": null + }, + "linux": { + "appimage": { "bundleMediaFramework": false, "files": {} }, + "deb": { "files": {} }, + "rpm": { "release": "1", "epoch": 0, "files": {} } + }, + "macOS": { + "files": {}, + "minimumSystemVersion": "10.13", + "hardenedRuntime": true, + "dmg": { + "windowSize": { "width": 660, "height": 400 }, + "appPosition": { "x": 180, "y": 170 }, + "applicationFolderPosition": { "x": 480, "y": 170 } + } + }, + "iOS": { "minimumSystemVersion": "13.0" }, + "android": { "minSdkVersion": 24 } + }, + "plugins": {} +} diff --git a/infrastructure/eid-wallet/src-tauri/tauri.conf.json b/infrastructure/eid-wallet/src-tauri/tauri.conf.json index b4319e14..b2213169 100644 --- a/infrastructure/eid-wallet/src-tauri/tauri.conf.json +++ b/infrastructure/eid-wallet/src-tauri/tauri.conf.json @@ -1,35 +1,35 @@ { - "$schema": "https://schema.tauri.app/config/2", - "productName": "eid-wallet", - "version": "0.1.0", - "identifier": "com.eid-wallet.app", - "build": { - "beforeDevCommand": "pnpm dev", - "devUrl": "http://localhost:1420", - "beforeBuildCommand": "pnpm build", - "frontendDist": "../build" - }, - "app": { - "windows": [ - { - "title": "eid-wallet", - "width": 800, - "height": 600 - } - ], - "security": { - "csp": null - } - }, - "bundle": { - "active": true, - "targets": "all", - "icon": [ - "icons/32x32.png", - "icons/128x128.png", - "icons/128x128@2x.png", - "icons/icon.icns", - "icons/icon.ico" - ] - } + "$schema": "https://schema.tauri.app/config/2", + "productName": "eid-wallet", + "version": "0.1.0", + "identifier": "com.eid-wallet.app", + "build": { + "beforeDevCommand": "pnpm dev", + "devUrl": "http://localhost:1420", + "beforeBuildCommand": "pnpm build", + "frontendDist": "../build" + }, + "app": { + "windows": [ + { + "title": "eid-wallet", + "width": 800, + "height": 600 + } + ], + "security": { + "csp": null + } + }, + "bundle": { + "active": true, + "targets": "all", + "icon": [ + "icons/32x32.png", + "icons/128x128.png", + "icons/128x128@2x.png", + "icons/icon.icns", + "icons/icon.ico" + ] + } } diff --git a/infrastructure/eid-wallet/src/app.css b/infrastructure/eid-wallet/src/app.css index 02b2703d..2aac3b41 100644 --- a/infrastructure/eid-wallet/src/app.css +++ b/infrastructure/eid-wallet/src/app.css @@ -1,56 +1,59 @@ @import "tailwindcss"; @import "flag-icons/css/flag-icons.min.css"; + @plugin "daisyui" { - themes: false; /* Disable built-in themes */ - darktheme: "light"; + /* biome-ignore lint/correctness/noUnknownProperty: DaisyUI v5 specific stuff, not handled yet by Biome */ + themes: false; + /* biome-ignore lint/correctness/noUnknownProperty: DaisyUI v5 specific stuff, not handled yet by Biome */ + darktheme: "light"; } @font-face { - font-family: "Archivo"; - src: url("/fonts/Archivo-VariableFont_wdth,wght.ttf") format("truetype"); - font-weight: 100 900; - font-style: normal; + font-family: "Archivo"; + src: url("/fonts/Archivo-VariableFont_wdth,wght.ttf") format("truetype"); + font-weight: 100 900; + font-style: normal; } @theme { - /* Custom theme */ - --color-primary: #8e52ff; - --color-primary-100: #e8dcff; - --color-primary-200: #d2baff; - --color-primary-300: #bb97ff; - --color-primary-400: #a575ff; - --color-primary-500: #8e52ff; - - --color-secondary: #73efd5; - --color-secondary-100: #e3fcf7; - --color-secondary-200: #c7f9ee; - --color-secondary-300: #abf6e6; - --color-secondary-400: #8ff2dd; - --color-secondary-500: #73efd5; - - --color-white: #ffffff; - --color-gray: #f5f5f5; - - --color-black: #1f1f1f; - --color-black-100: #d2d2d2; - --color-black-300: #a5a5a5; - --color-black-500: #797979; - --color-black-700: #4c4c4c; - --color-black-900: #1f1f1f; - - --color-danger: #ff5255; - --color-danger-100: #ffdcdd; - --color-danger-200: #ffb1a7; - --color-danger-300: #ff968e; - --color-danger-400: #ff7b77; - --color-danger-500: #ff5255; + /* Custom theme */ + --color-primary: #8e52ff; + --color-primary-100: #e8dcff; + --color-primary-200: #d2baff; + --color-primary-300: #bb97ff; + --color-primary-400: #a575ff; + --color-primary-500: #8e52ff; + + --color-secondary: #73efd5; + --color-secondary-100: #e3fcf7; + --color-secondary-200: #c7f9ee; + --color-secondary-300: #abf6e6; + --color-secondary-400: #8ff2dd; + --color-secondary-500: #73efd5; + + --color-white: #ffffff; + --color-gray: #f5f5f5; + + --color-black: #1f1f1f; + --color-black-100: #d2d2d2; + --color-black-300: #a5a5a5; + --color-black-500: #797979; + --color-black-700: #4c4c4c; + --color-black-900: #1f1f1f; + + --color-danger: #ff5255; + --color-danger-100: #ffdcdd; + --color-danger-200: #ffb1a7; + --color-danger-300: #ff968e; + --color-danger-400: #ff7b77; + --color-danger-500: #ff5255; } body { - font-family: "Archivo", sans-serif; + font-family: "Archivo", sans-serif; } /* Custom classes */ .spin-slow { - animation: spin 3s linear infinite; + animation: spin 3s linear infinite; } diff --git a/infrastructure/eid-wallet/src/lib/fragments/Header/Header.stories.ts b/infrastructure/eid-wallet/src/lib/fragments/Header/Header.stories.ts index 4b268e0b..f41b19a6 100644 --- a/infrastructure/eid-wallet/src/lib/fragments/Header/Header.stories.ts +++ b/infrastructure/eid-wallet/src/lib/fragments/Header/Header.stories.ts @@ -4,7 +4,11 @@ export default { title: "Fragments/Header", component: Header, tags: ["autodocs"], - render: (args: any) => ({ + render: (args: { + title: string; + isBackRequired: boolean; + isUserLoggedIn: boolean; + }) => ({ Component: Header, props: args, }), diff --git a/infrastructure/eid-wallet/src/lib/ui/Button/ButtonAction.stories.ts b/infrastructure/eid-wallet/src/lib/ui/Button/ButtonAction.stories.ts index 552bacaa..bc7ad728 100644 --- a/infrastructure/eid-wallet/src/lib/ui/Button/ButtonAction.stories.ts +++ b/infrastructure/eid-wallet/src/lib/ui/Button/ButtonAction.stories.ts @@ -1,59 +1,41 @@ -import type { Meta, StoryObj } from "@storybook/svelte"; +import type { ComponentProps } from "svelte"; import ButtonAction from "./ButtonAction.svelte"; import { ButtonText } from "./ButtonSnippets.svelte"; -const meta: Meta = { - title: "Components/ButtonAction", +export default { + title: "UI/ButtonAction", component: ButtonAction, - args: { - variant: "solid", - isLoading: false, - blockingClick: false, - children: "Click Me", // Ensure this is a function returning text - }, - argTypes: { - variant: { - control: { - type: "select", - options: ["solid", "soft", "danger", "danger-soft", "white"], - }, - }, - size: { - control: { - type: "select", - options: ["sm", "md"], - }, - }, - isLoading: { control: "boolean" }, - blockingClick: { control: "boolean" }, - callback: { action: "clicked" }, - }, + tags: ["autodocs"], + render: (args: { + Component: ButtonAction; + props: ComponentProps; + }) => ({ + Component: ButtonAction, + props: args, + }), }; -export default meta; -type Story = StoryObj; - -export const Solid: Story = { +export const Solid = { args: { variant: "solid", children: ButtonText }, }; -export const Soft: Story = { +export const Soft = { args: { variant: "soft", children: ButtonText }, }; -export const Danger: Story = { +export const Danger = { args: { variant: "danger", children: ButtonText }, }; -export const DangerSoft: Story = { +export const DangerSoft = { args: { variant: "danger-soft", children: ButtonText }, }; -export const Loading: Story = { +export const Loading = { args: { isLoading: true, children: ButtonText }, }; -export const BlockingClick: Story = { +export const BlockingClick = { args: { blockingClick: true, children: ButtonText, diff --git a/infrastructure/eid-wallet/src/lib/ui/Button/ButtonAction.svelte b/infrastructure/eid-wallet/src/lib/ui/Button/ButtonAction.svelte index 29be23bb..499a70c7 100644 --- a/infrastructure/eid-wallet/src/lib/ui/Button/ButtonAction.svelte +++ b/infrastructure/eid-wallet/src/lib/ui/Button/ButtonAction.svelte @@ -38,21 +38,21 @@ const handleClick = async () => { } }; - const variantClasses = { - solid: { background: 'bg-primary-500', text: 'text-white' }, - soft: { background: 'bg-primary-100', text: 'text-primary-500' }, - danger: { background: 'bg-danger-500', text: 'text-white' }, - 'danger-soft': { background: 'bg-danger-100', text: 'text-danger-500' }, - white: { background: 'bg-white', text: 'text-black' }, - } +const variantClasses = { + solid: { background: "bg-primary-500", text: "text-white" }, + soft: { background: "bg-primary-100", text: "text-primary-500" }, + danger: { background: "bg-danger-500", text: "text-white" }, + "danger-soft": { background: "bg-danger-100", text: "text-danger-500" }, + white: { background: "bg-white", text: "text-black" }, +}; - const disabledVariantClasses = { - solid: { background: 'bg-primary-300', text: 'text-white' }, - soft: { background: 'bg-primary-100', text: 'text-primary-300' }, - danger: { background: 'bg-danger-400', text: 'text-white' }, - 'danger-soft': { background: 'bg-danger-100', text: 'text-danger-400' }, - white: { background: 'bg-black-100', text: 'text-black-700' }, - } +const disabledVariantClasses = { + solid: { background: "bg-primary-300", text: "text-white" }, + soft: { background: "bg-primary-100", text: "text-primary-300" }, + danger: { background: "bg-danger-400", text: "text-white" }, + "danger-soft": { background: "bg-danger-100", text: "text-danger-400" }, + white: { background: "bg-black-100", text: "text-black-700" }, +}; const sizeVariant = { sm: "px-4 py-1.5 text-base h-11", @@ -76,31 +76,33 @@ let classes = $derived({