@isoftdata/svelte-checkbox
Advanced tools
@@ -22,13 +22,15 @@ <script | ||
| > | ||
| import type { IconName } from '@fortawesome/fontawesome-common-types' | ||
| import type { ClassValue } from 'svelte/elements' | ||
| import type { ButtonColors } from '@isoftdata/utility-bootstrap' | ||
| import type { IconName } from '@fortawesome/fontawesome-common-types' | ||
| import Label from '@isoftdata/svelte-label' | ||
| import Icon from '@isoftdata/svelte-icon' | ||
| import Icon, { getIconProps } from '@isoftdata/svelte-icon' | ||
| type Option = { | ||
| type IconProps = ComponentProps<typeof Icon> | ||
| interface Option { | ||
| value: T | ||
| label?: string | ||
| icon?: IconName | ||
| icon?: IconName | IconProps | ||
| title?: string | ||
@@ -134,6 +136,3 @@ color?: ButtonColors | ||
| {#if option.icon} | ||
| <Icon | ||
| icon={option.icon} | ||
| fixedWidth | ||
| ></Icon> | ||
| <Icon {...getIconProps(option.icon)} /> | ||
| {/if} | ||
@@ -140,0 +139,0 @@ {option.label} |
+14
-13
| { | ||
| "name": "@isoftdata/svelte-checkbox", | ||
| "version": "2.6.2", | ||
| "version": "2.7.0", | ||
| "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": { | ||
@@ -51,14 +62,4 @@ ".": { | ||
| "engines": { | ||
| "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 ." | ||
| "pnpm": "11.x" | ||
| } | ||
| } | ||
| } |
| import { type ComponentProps } from 'svelte'; | ||
| import type { IconName } from '@fortawesome/fontawesome-common-types'; | ||
| import type { ClassValue } from 'svelte/elements'; | ||
| import type { ButtonColors } from '@isoftdata/utility-bootstrap'; | ||
| import Label from '@isoftdata/svelte-label'; | ||
| declare function $$render<T>(): { | ||
| props: { | ||
| allowUnset?: boolean; | ||
| btnGroupClass?: ClassValue; | ||
| disabled?: boolean; | ||
| hint?: ComponentProps<typeof Label>["hint"]; | ||
| id?: string; | ||
| inline?: boolean; | ||
| label?: string; | ||
| labelClass?: ClassValue; | ||
| labelParentClass?: ClassValue; | ||
| options: Array<{ | ||
| value: T; | ||
| label?: string; | ||
| icon?: IconName; | ||
| title?: string; | ||
| color?: ButtonColors; | ||
| }>; | ||
| required?: boolean; | ||
| size?: "sm" | "" | "lg"; | ||
| title?: string; | ||
| unselectedColor?: ButtonColors; | ||
| unsetValue?: T; | ||
| value: T; | ||
| color?: ButtonColors; | ||
| change?: (value: T) => void; | ||
| }; | ||
| exports: {}; | ||
| bindings: "value"; | ||
| slots: {}; | ||
| events: {}; | ||
| }; | ||
| declare class __sveltets_Render<T> { | ||
| props(): ReturnType<typeof $$render<T>>['props']; | ||
| events(): ReturnType<typeof $$render<T>>['events']; | ||
| slots(): ReturnType<typeof $$render<T>>['slots']; | ||
| bindings(): "value"; | ||
| exports(): {}; | ||
| } | ||
| interface $$IsomorphicComponent { | ||
| new <T>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<T>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<T>['props']>, ReturnType<__sveltets_Render<T>['events']>, ReturnType<__sveltets_Render<T>['slots']>> & { | ||
| $$bindings?: ReturnType<__sveltets_Render<T>['bindings']>; | ||
| } & ReturnType<__sveltets_Render<T>['exports']>; | ||
| <T>(internal: unknown, props: ReturnType<__sveltets_Render<T>['props']> & {}): ReturnType<__sveltets_Render<T>['exports']>; | ||
| z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>; | ||
| } | ||
| declare const RadioButtonGroup: $$IsomorphicComponent; | ||
| type RadioButtonGroup<T> = InstanceType<typeof RadioButtonGroup<T>>; | ||
| export default RadioButtonGroup; |
14871
-12.07%7
-12.5%41
-57.29%