@tuspe/components 1.7.2 → 1.7.4

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.
@@ -9,15 +9,19 @@
9
9
  disabled?: boolean
10
10
  id?: string
11
11
  outerClass?: string
12
+ required?: boolean
12
13
  value?: string
13
14
  }
14
15
 
15
- let {children, onchange, checked = $bindable(false), disabled, id, outerClass, value}: Props = $props()
16
+ let {children, onchange, checked = $bindable(false), disabled, id, outerClass, required, value}: Props = $props()
16
17
  </script>
17
18
 
18
19
  <label class={outerClass}>
19
- <input bind:checked disabled={disabled || $loading} {id} {onchange} type="checkbox" {value} />
20
- <span>{@render children?.()}</span>
20
+ <input bind:checked disabled={disabled || $loading} {id} {onchange} {required} type="checkbox" {value} />
21
+ <span>
22
+ {@render children?.()}
23
+ {#if required}<sup>*</sup>{/if}
24
+ </span>
21
25
  </label>
22
26
 
23
27
  <style scoped>
@@ -49,4 +53,8 @@
49
53
  grid-template-columns: 20px 1fr;
50
54
  line-height: 1.25;
51
55
  }
56
+
57
+ sup {
58
+ color: darkred;
59
+ }
52
60
  </style>
@@ -6,6 +6,7 @@ interface Props {
6
6
  disabled?: boolean;
7
7
  id?: string;
8
8
  outerClass?: string;
9
+ required?: boolean;
9
10
  value?: string;
10
11
  }
11
12
  declare const Checkbox: import("svelte").Component<Props, {}, "checked">;
package/dist/Modal.svelte CHANGED
@@ -51,17 +51,15 @@
51
51
  background-color: #fff;
52
52
  border-radius: 1rem;
53
53
  border: 2px solid var(--color-primary);
54
- box-shadow: var(--shadow-md);
55
54
  margin-left: auto;
56
55
  margin-right: auto;
57
- max-height: 85vh;
58
56
  max-width: 95vw;
59
57
  overflow: hidden;
60
58
  overscroll-behavior: contain;
61
59
  position: relative;
62
60
  }
63
61
  #modal-body {
64
- max-height: 45vh;
62
+ max-height: 70vh;
65
63
  overflow-x: hidden;
66
64
  overflow-y: auto;
67
65
  padding: 1rem;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuspe/components",
3
- "version": "1.7.2",
3
+ "version": "1.7.4",
4
4
  "description": "A reusable SvelteKit component library for form elements, breadcrumbs, prices and images.",
5
5
  "keywords": [
6
6
  "svelteKit",