odj-svelte-ui 0.5.3 → 0.5.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.
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { browser } from "$app/environment";
|
|
3
3
|
import { type SelectProps as Props, select as selectCls } from ".";
|
|
4
4
|
|
|
5
|
-
let { children, items, value = $bindable(), underline, size = "md", class: className, placeholder = "Choose option...", placeholderValue = undefined,
|
|
5
|
+
let { children, items, value = $bindable(), underline, size = "md", class: className, placeholder = "Choose option...", placeholderValue = undefined, enableCustomSelect = false, ...restProps }: Props<T> = $props();
|
|
6
6
|
|
|
7
|
-
const customSelect = $derived(browser ?
|
|
7
|
+
const customSelect = $derived(browser ? enableCustomSelect && CSS.supports("appearance: base-select") : enableCustomSelect);
|
|
8
8
|
const selectStyle = $derived(selectCls({ underline, size, customSelect, className }));
|
|
9
9
|
</script>
|
|
10
10
|
|
|
@@ -8,12 +8,13 @@ type SelectOptionType<T> = {
|
|
|
8
8
|
};
|
|
9
9
|
interface SelectProps<T> extends Omit<HTMLSelectAttributes, "size"> {
|
|
10
10
|
children?: Snippet;
|
|
11
|
+
class: string;
|
|
11
12
|
items?: SelectOptionType<T>[];
|
|
12
13
|
underline?: boolean;
|
|
13
14
|
size?: SelectSize;
|
|
14
15
|
placeholder?: string;
|
|
15
16
|
placeholderValue?: any;
|
|
16
|
-
|
|
17
|
+
enableCustomSelect?: boolean;
|
|
17
18
|
}
|
|
18
19
|
interface MultiSelectProps<T> extends MultiSelectParameters {
|
|
19
20
|
outerDivClass?: string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "odj-svelte-ui",
|
|
3
3
|
"author": "orbitadajogatina",
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.4",
|
|
5
5
|
"description": "This is a fork from Flowbite Svelte 5 with Runes. I just made some changes that fits better my taste.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "dist/index.js",
|