@rkosafo/cai.components 0.0.64 → 0.0.66
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.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { SelectProps } from '../../types/index.js';
|
|
3
|
+
import IconifyIcon from '../../ui/icons/IconifyIcon.svelte';
|
|
3
4
|
import Svelecte from 'svelecte';
|
|
4
5
|
|
|
5
6
|
let {
|
|
@@ -16,11 +17,13 @@
|
|
|
16
17
|
hasError,
|
|
17
18
|
minHeight,
|
|
18
19
|
hasSuccess,
|
|
20
|
+
loading,
|
|
19
21
|
...restProps
|
|
20
22
|
}: SelectProps = $props();
|
|
21
23
|
</script>
|
|
22
24
|
|
|
23
25
|
<div
|
|
26
|
+
class="relative"
|
|
24
27
|
style="--sv-min-height: {minHeight}px; --sv-border: 1px solid {hasError
|
|
25
28
|
? 'red'
|
|
26
29
|
: hasSuccess
|
|
@@ -39,6 +42,9 @@
|
|
|
39
42
|
{searchable}
|
|
40
43
|
{...restProps}
|
|
41
44
|
/>
|
|
45
|
+
<div class="absolute right-3 bottom-0 pb-1" class:hidden={!loading}>
|
|
46
|
+
<IconifyIcon icon="svg-spinners:180-ring-with-bg" />
|
|
47
|
+
</div>
|
|
42
48
|
</div>
|
|
43
49
|
|
|
44
50
|
<!-- <style>
|
package/dist/types/index.d.ts
CHANGED
|
@@ -454,6 +454,7 @@ export interface SelectProps {
|
|
|
454
454
|
controlClass?: string | null;
|
|
455
455
|
dropdownClass?: string | null;
|
|
456
456
|
optionClass?: string | null;
|
|
457
|
+
loading?: boolean;
|
|
457
458
|
}
|
|
458
459
|
export interface RadioProps<T> extends RadioVariants, Omit<HTMLInputAttributes, 'color'> {
|
|
459
460
|
group?: T;
|