@tuspe/components 1.8.10 → 1.8.12

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,16 @@ 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
+ noLineHeight?: boolean
212
+ onchange?: () => void
212
213
  outerClass?: string
213
- value?: string
214
+ required?: boolean
215
+ value?: number | string
214
216
  }
215
217
  ```
216
218
 
@@ -9,17 +9,33 @@
9
9
  disabled?: boolean
10
10
  group?: boolean
11
11
  id?: string
12
+ noLineHeight?: boolean
12
13
  outerClass?: string
13
14
  required?: boolean
14
15
  value?: number | string
15
16
  }
16
17
 
17
- let {children, onchange, checked = $bindable(false), disabled, group = $bindable(), id, outerClass, required, value, ...props}: Props = $props()
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()
18
31
 
19
32
  let classes = $state('input-checkbox')
20
33
  if (outerClass) {
21
34
  classes += ` ${outerClass}`
22
35
  }
36
+ if (noLineHeight) {
37
+ classes += ' lh-none'
38
+ }
23
39
  </script>
24
40
 
25
41
  <label class={classes}>
@@ -59,6 +75,10 @@
59
75
  grid-template-columns: 20px 1fr;
60
76
  }
61
77
 
78
+ label:not(.lh-none) {
79
+ line-height: 1.25;
80
+ }
81
+
62
82
  sup {
63
83
  color: darkred;
64
84
  }
@@ -6,6 +6,7 @@ interface Props {
6
6
  disabled?: boolean;
7
7
  group?: boolean;
8
8
  id?: string;
9
+ noLineHeight?: boolean;
9
10
  outerClass?: string;
10
11
  required?: boolean;
11
12
  value?: number | string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuspe/components",
3
- "version": "1.8.10",
3
+ "version": "1.8.12",
4
4
  "description": "A reusable SvelteKit component library for form elements, breadcrumbs, prices and images.",
5
5
  "keywords": [
6
6
  "svelteKit",