diff --git a/package.json b/package.json index b8487ddf..477cebaa 100644 --- a/package.json +++ b/package.json @@ -33,51 +33,51 @@ "prepare": "husky install" }, "devDependencies": { - "@commitlint/cli": "^17.2.0", - "@commitlint/config-conventional": "^17.2.0", - "@sveltejs/adapter-auto": "next", - "@sveltejs/adapter-vercel": "next", - "@sveltejs/kit": "next", - "@sveltejs/package": "1.0.0-next.5", + "@commitlint/cli": "^17.4.2", + "@commitlint/config-conventional": "^17.4.2", + "@sveltejs/adapter-auto": "1.0.2", + "@sveltejs/adapter-vercel": "1.0.6", + "@sveltejs/kit": "1.3.10", + "@sveltejs/package": "1.0.2", "@tailwindcss/forms": "^0.5.3", - "@testing-library/dom": "^8.19.0", + "@testing-library/dom": "^8.20.0", "@testing-library/svelte": "^3.2.2", "@types/cookie": "^0.5.1", - "@typescript-eslint/eslint-plugin": "^5.42.0", - "@typescript-eslint/parser": "^5.42.0", - "@vitest/coverage-c8": "^0.24.5", + "@typescript-eslint/eslint-plugin": "^5.50.0", + "@typescript-eslint/parser": "^5.50.0", + "@vitest/coverage-c8": "^0.28.4", "autoprefixer": "^10.4.13", "c8": "^7.12.0", - "eslint": "^8.26.0", - "eslint-config-prettier": "^8.5.0", + "eslint": "^8.33.0", + "eslint-config-prettier": "^8.6.0", "eslint-plugin-svelte3": "^4.0.0", - "highlight.js": "^11.6.0", - "husky": "^8.0.1", - "jsdom": "^20.0.2", - "lint-staged": "^13.0.3", - "postcss": "^8.4.18", - "prettier": "^2.7.1", - "prettier-plugin-svelte": "^2.8.0", - "svelte": "^3.52.0", - "svelte-check": "^2.9.2", - "svelte-preprocess": "^4.10.7", - "svelte2tsx": "^0.5.20", - "tailwindcss": "^3.2.2", - "tslib": "^2.4.1", - "typescript": "^4.8.4", - "vite": "^3.2.2", - "vitest": "^0.24.5" + "highlight.js": "^11.7.0", + "husky": "^8.0.3", + "jsdom": "^21.1.0", + "lint-staged": "^13.1.0", + "postcss": "^8.4.21", + "prettier": "^2.8.3", + "prettier-plugin-svelte": "^2.9.0", + "svelte": "^3.55.1", + "svelte-check": "^3.0.3", + "svelte-preprocess": "^5.0.1", + "svelte2tsx": "^0.6.1", + "tailwindcss": "^3.2.4", + "tslib": "^2.5.0", + "typescript": "^4.9.5", + "vite": "^4.1.1", + "vitest": "^0.28.4" }, "svelte": "./index.js", "type": "module", "types": "index.d.ts", "dependencies": { - "dayjs": "^1.11.6", - "tailwind-merge": "^1.7.0", + "dayjs": "^1.11.7", + "tailwind-merge": "^1.9.1", "tippy.js": "^6.3.7" }, "peerDependencies": { - "svelte": "^3.52.0" + "svelte": "^3.55.1" }, "exports": { ".": "./index.js", diff --git a/src/lib/components/autocomplete/Label.svelte b/src/lib/components/autocomplete/Label.svelte index 64120c08..fac85ae6 100644 --- a/src/lib/components/autocomplete/Label.svelte +++ b/src/lib/components/autocomplete/Label.svelte @@ -12,7 +12,7 @@ const error: Writable = getContext('autocomplete-error'); let defaultClass = 'block text-sm font-medium'; - if (error) { + $: if ($error && $error.length > 0) { defaultClass = defaultClass + ' text-danger'; } else { defaultClass = defaultClass + ' text-light-secondary-content dark:text-dark-secondary-content'; diff --git a/src/lib/components/radio/Radio.svelte b/src/lib/components/radio/Radio.svelte index d23f5ad4..75753bc7 100644 --- a/src/lib/components/radio/Radio.svelte +++ b/src/lib/components/radio/Radio.svelte @@ -17,8 +17,11 @@ $selected = value; } + $: console.log('selected', $selected); + $: console.log('value', value); + let defaultClass = ''; - if (type === 'default') { + $: if (type === 'default') { defaultClass = 'radio bg-light-surface dark:bg-dark-surface text-light-surface dark:text-dark-surface light-border dark:dark-border checked:bg-none border checked:border-primary group-hover:border-primary dark:checked:border-primary dark:group-hover:border-primary group-focus:border-primary dark:group-focus:border-primary active:border-primary dark:active:border-primary focus:active:border-primary dark:focus:active:border-primary rounded-full cursor-pointer h-6 w-6'; } else if (type === 'pill') { @@ -33,7 +36,9 @@