@isoftdata/svelte-checkbox
Advanced tools
@@ -100,10 +100,11 @@ <script | ||
| for="radio-{option.value}-{id}" | ||
| title={option.title} | ||
| class={[ | ||
| 'btn', | ||
| 'cursor-pointer', | ||
| 'text-truncate', | ||
| 'btn cursor-pointer text-truncate', | ||
| value === option.value ? `btn-${colorClass}` : `btn-outline-${unselectedColor ?? colorClass}`, | ||
| { | ||
| active: !bs5 && value === option.value, | ||
| disabled, | ||
| }, | ||
| ]} | ||
| class:active={!bs5 && value === option.value} | ||
| class:disabled | ||
| > | ||
@@ -123,3 +124,8 @@ <!-- not using bind:group here b/c it was sometimes clearing the value right after render --> | ||
| // it was only added to keep from making a breaking change as it previously only supported string values and thus the unsetValue defaulted to an empty string | ||
| value = value === option.value && allowUnset ? (typeof value === 'string' ? unsetValue ?? ('' as T) : (unsetValue ?? (null as T))) : option.value | ||
| value = | ||
| value === option.value && allowUnset | ||
| ? typeof value === 'string' | ||
| ? (unsetValue ?? ('' as T)) | ||
| : (unsetValue ?? (null as T)) | ||
| : option.value | ||
| change?.(value) | ||
@@ -126,0 +132,0 @@ }} |
+13
-12
| { | ||
| "name": "@isoftdata/svelte-checkbox", | ||
| "version": "2.6.0", | ||
| "version": "2.6.1", | ||
| "scripts": { | ||
| "dev": "vite dev", | ||
| "build": "vite build && npm run package", | ||
| "preview": "vite preview", | ||
| "package": "svelte-kit sync && svelte-package && publint", | ||
| "prepublishOnly": "npm run package", | ||
| "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", | ||
| "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", | ||
| "lint": "prettier --plugin-search-dir . --check . && eslint .", | ||
| "format": "prettier --plugin-search-dir . --write ." | ||
| }, | ||
| "exports": { | ||
@@ -52,13 +63,3 @@ ".": { | ||
| "pnpm": "10.x" | ||
| }, | ||
| "scripts": { | ||
| "dev": "vite dev", | ||
| "build": "vite build && npm run package", | ||
| "preview": "vite preview", | ||
| "package": "svelte-kit sync && svelte-package && publint", | ||
| "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", | ||
| "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", | ||
| "lint": "prettier --plugin-search-dir . --check . && eslint .", | ||
| "format": "prettier --plugin-search-dir . --write ." | ||
| } | ||
| } | ||
| } |
16562
3.73%