@hkdigital/lib-sveltekit 0.1.49 → 0.1.51

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.
@@ -43,16 +43,13 @@
43
43
  * } & { [attr: string]: any }}
44
44
  */
45
45
  let {
46
+ initialValue,
46
47
  value = $bindable(''),
47
48
 
48
49
  isValid = $bindable(true),
49
50
  isPristine = $bindable(true),
50
51
  hasFocus = $bindable(false),
51
52
 
52
- ...otherProps
53
- } = $props();
54
-
55
- let {
56
53
  // Fieldset
57
54
  base = 'px-10p pb-10p',
58
55
  borderShape = 'border-1p rounded-xs',
@@ -90,16 +87,16 @@
90
87
  validate,
91
88
 
92
89
  ...attrs
93
- } = otherProps;
90
+ } = $props();
94
91
 
95
92
  let inputRef = $state();
96
93
  let validationMessage = $state('');
97
- let initialValue = $state('');
94
+ // let initialValue = $state('');
98
95
 
99
96
  $effect(() => {
100
97
  if (!inputRef) return;
101
- initialValue = value;
102
- validateInput(inputRef, value);
98
+ validateInput(inputRef, initialValue);
99
+ value = initialValue;
103
100
  });
104
101
 
105
102
  function validateInput(input, currentValue) {
@@ -185,7 +182,7 @@
185
182
  {type}
186
183
  {required}
187
184
  {disabled}
188
- {value}
185
+ bind:value
189
186
  {placeholder}
190
187
  class="{inputBase} {inputClasses}"
191
188
  aria-invalid={!isValid}
@@ -8,7 +8,7 @@
8
8
  * nextSlideLabel?: string,
9
9
  * presenter?: { gotoSlide: (name: string) => void, getCurrentSlideName: () => string },
10
10
  * getLoadingController?: () => { loaded: () => void, cancel: () => void }
11
- * fit?: string,
11
+ * fit?: 'contain' | 'cover' | 'fill',
12
12
  * position?: string,
13
13
  * [attr: string]: any
14
14
  * }}
@@ -12,6 +12,6 @@ declare const ImageSlide: import("svelte").Component<{
12
12
  loaded: () => void;
13
13
  cancel: () => void;
14
14
  };
15
- fit?: string;
15
+ fit?: "contain" | "cover" | "fill";
16
16
  position?: string;
17
17
  }, {}, "">;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hkdigital/lib-sveltekit",
3
- "version": "0.1.49",
3
+ "version": "0.1.51",
4
4
  "author": {
5
5
  "name": "HKdigital",
6
6
  "url": "https://hkdigital.nl"