Upload folder using huggingface_hub
Browse files
6.2.1/dropdown/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"name": "@gradio/dropdown",
|
| 3 |
-
"version": "0.11.
|
| 4 |
"description": "Gradio UI packages",
|
| 5 |
"type": "module",
|
| 6 |
"author": "",
|
|
|
|
| 1 |
{
|
| 2 |
"name": "@gradio/dropdown",
|
| 3 |
+
"version": "0.11.1",
|
| 4 |
"description": "Gradio UI packages",
|
| 5 |
"type": "module",
|
| 6 |
"author": "",
|
6.2.1/dropdown/shared/Multiselect.svelte
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
<script lang="ts">
|
| 2 |
import { _ } from "svelte-i18n";
|
| 3 |
-
import { BlockTitle } from "@gradio/atoms";
|
| 4 |
import { Remove, DropdownArrow } from "@gradio/icons";
|
| 5 |
import type { Gradio } from "@gradio/utils";
|
| 6 |
import DropdownOptions from "./DropdownOptions.svelte";
|
|
@@ -14,6 +14,7 @@
|
|
| 14 |
let filter_input: HTMLElement;
|
| 15 |
let input_text = $state("");
|
| 16 |
let label = $derived(gradio.shared.label || "Multiselect");
|
|
|
|
| 17 |
|
| 18 |
let choices_names: string[] = $derived.by(() => {
|
| 19 |
return gradio.props.choices.map((c) => c[0]);
|
|
@@ -183,9 +184,16 @@
|
|
| 183 |
gradio.dispatch("change");
|
| 184 |
}
|
| 185 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
| 186 |
</script>
|
| 187 |
|
| 188 |
<label class:container={gradio.shared.container}>
|
|
|
|
|
|
|
|
|
|
| 189 |
<BlockTitle show_label={gradio.shared.show_label} info={gradio.props.info}
|
| 190 |
>{label}</BlockTitle
|
| 191 |
>
|
|
|
|
| 1 |
<script lang="ts">
|
| 2 |
import { _ } from "svelte-i18n";
|
| 3 |
+
import { BlockTitle, IconButtonWrapper } from "@gradio/atoms";
|
| 4 |
import { Remove, DropdownArrow } from "@gradio/icons";
|
| 5 |
import type { Gradio } from "@gradio/utils";
|
| 6 |
import DropdownOptions from "./DropdownOptions.svelte";
|
|
|
|
| 14 |
let filter_input: HTMLElement;
|
| 15 |
let input_text = $state("");
|
| 16 |
let label = $derived(gradio.shared.label || "Multiselect");
|
| 17 |
+
let buttons = $derived(gradio.props.buttons);
|
| 18 |
|
| 19 |
let choices_names: string[] = $derived.by(() => {
|
| 20 |
return gradio.props.choices.map((c) => c[0]);
|
|
|
|
| 184 |
gradio.dispatch("change");
|
| 185 |
}
|
| 186 |
});
|
| 187 |
+
|
| 188 |
+
function on_custom_button_click(id: number) {
|
| 189 |
+
gradio.dispatch("custom_button_click", { id });
|
| 190 |
+
}
|
| 191 |
</script>
|
| 192 |
|
| 193 |
<label class:container={gradio.shared.container}>
|
| 194 |
+
{#if gradio.shared.show_label && buttons && buttons.length > 0}
|
| 195 |
+
<IconButtonWrapper {buttons} {on_custom_button_click} />
|
| 196 |
+
{/if}
|
| 197 |
<BlockTitle show_label={gradio.shared.show_label} info={gradio.props.info}
|
| 198 |
>{label}</BlockTitle
|
| 199 |
>
|