ankiutils 0.0.11 → 0.0.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/dist/components/BaseSelect.svelte +3 -1
- package/dist/components/BaseSelect.svelte.d.ts +1 -0
- package/dist/components/MultiSelect.svelte +3 -0
- package/dist/components/MultiSelect.svelte.d.ts +1 -0
- package/dist/components/Select.svelte +3 -0
- package/dist/components/Select.svelte.d.ts +1 -0
- package/dist/components/SelectOptions.svelte +2 -2
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { filterSelectOptions } from './utils.js';
|
|
6
6
|
interface Props {
|
|
7
7
|
id?: string;
|
|
8
|
+
className?: string,
|
|
8
9
|
options: SelectOption[];
|
|
9
10
|
selectedOptions: string[];
|
|
10
11
|
placeholder?: string;
|
|
@@ -17,6 +18,7 @@
|
|
|
17
18
|
|
|
18
19
|
let {
|
|
19
20
|
id,
|
|
21
|
+
className = "",
|
|
20
22
|
options,
|
|
21
23
|
selectedOptions = $bindable<string[]>([]),
|
|
22
24
|
placeholder = 'Select an option...',
|
|
@@ -139,7 +141,7 @@
|
|
|
139
141
|
});
|
|
140
142
|
</script>
|
|
141
143
|
|
|
142
|
-
<div class="dropdown w-full" bind:this={containerElement}>
|
|
144
|
+
<div class="{className} dropdown w-full" bind:this={containerElement}>
|
|
143
145
|
<div class="flex gap-2">
|
|
144
146
|
<input
|
|
145
147
|
bind:this={inputElement}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
interface Props {
|
|
6
6
|
id?: string;
|
|
7
|
+
className?: string,
|
|
7
8
|
options: SelectOption[];
|
|
8
9
|
selectedOptions: string[];
|
|
9
10
|
placeholder?: string;
|
|
@@ -15,6 +16,7 @@
|
|
|
15
16
|
|
|
16
17
|
let {
|
|
17
18
|
id,
|
|
19
|
+
className,
|
|
18
20
|
options,
|
|
19
21
|
selectedOptions = $bindable<string[]>([]),
|
|
20
22
|
placeholder,
|
|
@@ -27,6 +29,7 @@
|
|
|
27
29
|
|
|
28
30
|
<BaseSelect
|
|
29
31
|
{id}
|
|
32
|
+
{className}
|
|
30
33
|
{options}
|
|
31
34
|
bind:selectedOptions
|
|
32
35
|
{placeholder}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { type SelectOption } from './types.js';
|
|
4
4
|
interface Props {
|
|
5
5
|
id?: string;
|
|
6
|
+
className?: string,
|
|
6
7
|
options: SelectOption[];
|
|
7
8
|
value?: string;
|
|
8
9
|
placeholder?: string;
|
|
@@ -14,6 +15,7 @@
|
|
|
14
15
|
|
|
15
16
|
let {
|
|
16
17
|
id,
|
|
18
|
+
className,
|
|
17
19
|
options,
|
|
18
20
|
value = $bindable(''),
|
|
19
21
|
placeholder,
|
|
@@ -32,6 +34,7 @@
|
|
|
32
34
|
|
|
33
35
|
<BaseSelect
|
|
34
36
|
{id}
|
|
37
|
+
{className}
|
|
35
38
|
{options}
|
|
36
39
|
bind:selectedOptions
|
|
37
40
|
{placeholder}
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
<input
|
|
67
67
|
bind:this={optionElements[index]}
|
|
68
68
|
type="checkbox"
|
|
69
|
-
class="btn"
|
|
69
|
+
class="btn w-full"
|
|
70
70
|
class:btn-primary={checked}
|
|
71
71
|
class:btn-outline={highlighted}
|
|
72
72
|
{checked}
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
<button
|
|
78
78
|
bind:this={optionElements[index]}
|
|
79
79
|
type="button"
|
|
80
|
-
class="btn"
|
|
80
|
+
class="btn w-full"
|
|
81
81
|
class:btn-primary={checked}
|
|
82
82
|
class:btn-outline={highlighted}
|
|
83
83
|
onclick={() => selectOption(option)}
|