Upload folder using huggingface_hub
Browse files
6.2.0/checkboxgroup/Index.svelte
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
|
| 3 |
<script lang="ts">
|
| 4 |
import { Gradio } from "@gradio/utils";
|
| 5 |
-
import { Block, BlockTitle } from "@gradio/atoms";
|
| 6 |
import { StatusTracker } from "@gradio/statustracker";
|
| 7 |
import { dequal } from "dequal";
|
| 8 |
import type { CheckboxGroupProps, CheckboxGroupEvents } from "./types";
|
|
@@ -70,6 +70,14 @@
|
|
| 70 |
on_clear_status={() =>
|
| 71 |
gradio.dispatch("clear_status", gradio.shared.loading_status)}
|
| 72 |
/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
<BlockTitle
|
| 74 |
show_label={gradio.shared.show_label ||
|
| 75 |
(gradio.props.show_select_all && gradio.shared.interactive)}
|
|
|
|
| 2 |
|
| 3 |
<script lang="ts">
|
| 4 |
import { Gradio } from "@gradio/utils";
|
| 5 |
+
import { Block, BlockTitle, IconButtonWrapper } from "@gradio/atoms";
|
| 6 |
import { StatusTracker } from "@gradio/statustracker";
|
| 7 |
import { dequal } from "dequal";
|
| 8 |
import type { CheckboxGroupProps, CheckboxGroupEvents } from "./types";
|
|
|
|
| 70 |
on_clear_status={() =>
|
| 71 |
gradio.dispatch("clear_status", gradio.shared.loading_status)}
|
| 72 |
/>
|
| 73 |
+
{#if gradio.shared.show_label && gradio.props.buttons && gradio.props.buttons.length > 0}
|
| 74 |
+
<IconButtonWrapper
|
| 75 |
+
buttons={gradio.props.buttons}
|
| 76 |
+
on_custom_button_click={(id) => {
|
| 77 |
+
gradio.dispatch("custom_button_click", { id });
|
| 78 |
+
}}
|
| 79 |
+
/>
|
| 80 |
+
{/if}
|
| 81 |
<BlockTitle
|
| 82 |
show_label={gradio.shared.show_label ||
|
| 83 |
(gradio.props.show_select_all && gradio.shared.interactive)}
|
6.2.0/checkboxgroup/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"name": "@gradio/checkboxgroup",
|
| 3 |
-
"version": "0.
|
| 4 |
"description": "Gradio UI packages",
|
| 5 |
"type": "module",
|
| 6 |
"author": "",
|
|
|
|
| 1 |
{
|
| 2 |
"name": "@gradio/checkboxgroup",
|
| 3 |
+
"version": "0.9.0",
|
| 4 |
"description": "Gradio UI packages",
|
| 5 |
"type": "module",
|
| 6 |
"author": "",
|
6.2.0/checkboxgroup/types.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
| 1 |
-
import type { SelectData } from "@gradio/utils";
|
| 2 |
|
| 3 |
export interface CheckboxGroupProps {
|
| 4 |
value: (string | number)[];
|
| 5 |
choices: [string, string | number][];
|
| 6 |
info: string;
|
| 7 |
show_select_all: boolean;
|
|
|
|
| 8 |
}
|
| 9 |
|
| 10 |
export interface CheckboxGroupEvents {
|
|
@@ -12,4 +13,5 @@ export interface CheckboxGroupEvents {
|
|
| 12 |
input: (string | number)[];
|
| 13 |
select: SelectData;
|
| 14 |
clear_status: void;
|
|
|
|
| 15 |
}
|
|
|
|
| 1 |
+
import type { SelectData, CustomButton } from "@gradio/utils";
|
| 2 |
|
| 3 |
export interface CheckboxGroupProps {
|
| 4 |
value: (string | number)[];
|
| 5 |
choices: [string, string | number][];
|
| 6 |
info: string;
|
| 7 |
show_select_all: boolean;
|
| 8 |
+
buttons: (string | CustomButton)[] | null;
|
| 9 |
}
|
| 10 |
|
| 11 |
export interface CheckboxGroupEvents {
|
|
|
|
| 13 |
input: (string | number)[];
|
| 14 |
select: SelectData;
|
| 15 |
clear_status: void;
|
| 16 |
+
custom_button_click: { id: number };
|
| 17 |
}
|