@tuspe/components 1.8.11 → 1.8.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -203,14 +203,15 @@ Allows users to toggle between checked and unchecked states.
203
203
 
204
204
  ```TypeScript
205
205
  interface Props {
206
+ checked?: boolean
206
207
  children: Snippet
207
- onchange?: () => void
208
- checked: boolean
209
208
  disabled?: boolean
210
209
  group?: boolean
211
210
  id?: string
211
+ onchange?: () => void
212
212
  outerClass?: string
213
- value?: string
213
+ required?: boolean
214
+ value?: number | string
214
215
  }
215
216
  ```
216
217
 
@@ -9,33 +9,17 @@
9
9
  disabled?: boolean
10
10
  group?: boolean
11
11
  id?: string
12
- noLineHeight?: boolean
13
12
  outerClass?: string
14
13
  required?: boolean
15
14
  value?: number | string
16
15
  }
17
16
 
18
- let {
19
- children,
20
- onchange,
21
- checked = $bindable(false),
22
- disabled,
23
- group = $bindable(),
24
- id,
25
- noLineHeight = false,
26
- outerClass,
27
- required,
28
- value,
29
- ...props
30
- }: Props = $props()
17
+ let {children, onchange, checked = $bindable(false), disabled, group = $bindable(), id, outerClass, required, value, ...props}: Props = $props()
31
18
 
32
19
  let classes = $state('input-checkbox')
33
20
  if (outerClass) {
34
21
  classes += ` ${outerClass}`
35
22
  }
36
- if (noLineHeight) {
37
- classes += ' leading-none'
38
- }
39
23
  </script>
40
24
 
41
25
  <label class={classes}>
@@ -51,6 +35,7 @@
51
35
  accent-color: var(--color-primary);
52
36
  border: 1px solid var(--color-border);
53
37
  height: 20px;
38
+ margin-top: 4px;
54
39
  outline: none;
55
40
  vertical-align: middle;
56
41
  width: 20px;
@@ -67,7 +52,6 @@
67
52
  }
68
53
 
69
54
  label {
70
- align-items: center;
71
55
  cursor: pointer;
72
56
  display: grid;
73
57
  font-size: 1rem;
@@ -75,10 +59,6 @@
75
59
  grid-template-columns: 20px 1fr;
76
60
  }
77
61
 
78
- label:not(.leading-none) {
79
- line-height: 1.25;
80
- }
81
-
82
62
  sup {
83
63
  color: darkred;
84
64
  }
@@ -6,7 +6,6 @@ interface Props {
6
6
  disabled?: boolean;
7
7
  group?: boolean;
8
8
  id?: string;
9
- noLineHeight?: boolean;
10
9
  outerClass?: string;
11
10
  required?: boolean;
12
11
  value?: number | string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuspe/components",
3
- "version": "1.8.11",
3
+ "version": "1.8.13",
4
4
  "description": "A reusable SvelteKit component library for form elements, breadcrumbs, prices and images.",
5
5
  "keywords": [
6
6
  "svelteKit",
@@ -79,4 +79,4 @@
79
79
  "typescript": "^5.8.3",
80
80
  "vite": "^6.3.5"
81
81
  }
82
- }
82
+ }