Sign In

@isoftdata/svelte-checkbox

Package Overview
Dependencies
Maintainers
12
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@isoftdata/svelte-checkbox - npm Package Compare versions

Comparing version
2.3.0
to
2.4.0
+8
-2
dist/RadioButtonGroup.svelte

@@ -38,2 +38,4 @@ <script

interface Props {
allowUnset?: boolean
btnGroupClass?: ClassValue
disabled?: boolean

@@ -50,2 +52,3 @@ hint?: ComponentProps<typeof Label>['hint']

title?: string
unsetValue?: T
value: T

@@ -60,2 +63,4 @@ color?: ButtonColors

//
allowUnset = false,
btnGroupClass,
disabled = false,

@@ -72,2 +77,3 @@ hint,

title,
unsetValue,
value = $bindable(),

@@ -91,3 +97,3 @@ color = 'secondary',

{/if}
<div class={['btn-group', size && `btn-group-${size}`, bs5 && 'btn-group-toggle']}>
<div class={['btn-group', size && `btn-group-${size}`, !bs5 && 'btn-group-toggle', btnGroupClass]}>
{#each options as option}

@@ -117,3 +123,3 @@ {@const colorClass = option.color ?? color}

onclick={() => {
value = option.value
value = value === option.value && allowUnset ? (unsetValue ?? ('' as T)) : option.value
change?.(option.value)

@@ -120,0 +126,0 @@ }}

+3
-0

@@ -8,2 +8,4 @@ import { type ComponentProps } from 'svelte';

props(): {
allowUnset?: boolean;
btnGroupClass?: ClassValue;
disabled?: boolean;

@@ -26,2 +28,3 @@ hint?: ComponentProps<typeof Label>["hint"];

title?: string;
unsetValue?: T | undefined;
value: T;

@@ -28,0 +31,0 @@ color?: ButtonColors;

{
"name": "@isoftdata/svelte-checkbox",
"version": "2.3.0",
"version": "2.4.0",
"exports": {

@@ -5,0 +5,0 @@ ".": {

# Svelte Checkbox
![Screenshot of the attachment component](screenshot.png?raw=true "Screenshot")

@@ -3,0 +4,0 @@ Checkbox and radio button components for Svelte 5