Upload folder using huggingface_hub
Browse files- 6.2.0/checkbox/Index.svelte +9 -1
- 6.2.0/checkbox/package.json +1 -1
- 6.2.0/checkbox/types.ts +3 -1
6.2.0/checkbox/Index.svelte
CHANGED
|
@@ -4,7 +4,7 @@
|
|
| 4 |
|
| 5 |
<script lang="ts">
|
| 6 |
import { Gradio } from "@gradio/utils";
|
| 7 |
-
import { Block, Info } from "@gradio/atoms";
|
| 8 |
import { StatusTracker } from "@gradio/statustracker";
|
| 9 |
import type { CheckboxProps, CheckboxEvents } from "./types";
|
| 10 |
import BaseCheckbox from "./shared/Checkbox.svelte";
|
|
@@ -25,6 +25,14 @@
|
|
| 25 |
on_clear_status={() =>
|
| 26 |
gradio.dispatch("clear_status", gradio.shared.loading_status)}
|
| 27 |
/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
<BaseCheckbox
|
| 29 |
label={gradio.shared.label || gradio.i18n("checkbox.checkbox")}
|
| 30 |
bind:value={gradio.props.value}
|
|
|
|
| 4 |
|
| 5 |
<script lang="ts">
|
| 6 |
import { Gradio } from "@gradio/utils";
|
| 7 |
+
import { Block, Info, IconButtonWrapper } from "@gradio/atoms";
|
| 8 |
import { StatusTracker } from "@gradio/statustracker";
|
| 9 |
import type { CheckboxProps, CheckboxEvents } from "./types";
|
| 10 |
import BaseCheckbox from "./shared/Checkbox.svelte";
|
|
|
|
| 25 |
on_clear_status={() =>
|
| 26 |
gradio.dispatch("clear_status", gradio.shared.loading_status)}
|
| 27 |
/>
|
| 28 |
+
{#if gradio.shared.show_label && gradio.props.buttons && gradio.props.buttons.length > 0}
|
| 29 |
+
<IconButtonWrapper
|
| 30 |
+
buttons={gradio.props.buttons}
|
| 31 |
+
on_custom_button_click={(id) => {
|
| 32 |
+
gradio.dispatch("custom_button_click", { id });
|
| 33 |
+
}}
|
| 34 |
+
/>
|
| 35 |
+
{/if}
|
| 36 |
<BaseCheckbox
|
| 37 |
label={gradio.shared.label || gradio.i18n("checkbox.checkbox")}
|
| 38 |
bind:value={gradio.props.value}
|
6.2.0/checkbox/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"name": "@gradio/checkbox",
|
| 3 |
-
"version": "0.
|
| 4 |
"description": "Gradio UI packages",
|
| 5 |
"type": "module",
|
| 6 |
"author": "",
|
|
|
|
| 1 |
{
|
| 2 |
"name": "@gradio/checkbox",
|
| 3 |
+
"version": "0.6.0",
|
| 4 |
"description": "Gradio UI packages",
|
| 5 |
"type": "module",
|
| 6 |
"author": "",
|
6.2.0/checkbox/types.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
| 1 |
-
import type { SelectData } from "@gradio/utils";
|
| 2 |
import type { LoadingStatus } from "js/statustracker";
|
| 3 |
|
| 4 |
export interface CheckboxProps {
|
| 5 |
value: boolean;
|
| 6 |
info: string;
|
|
|
|
| 7 |
}
|
| 8 |
|
| 9 |
export interface CheckboxEvents {
|
|
@@ -11,4 +12,5 @@ export interface CheckboxEvents {
|
|
| 11 |
input: boolean;
|
| 12 |
select: SelectData;
|
| 13 |
clear_status: LoadingStatus;
|
|
|
|
| 14 |
}
|
|
|
|
| 1 |
+
import type { SelectData, CustomButton } from "@gradio/utils";
|
| 2 |
import type { LoadingStatus } from "js/statustracker";
|
| 3 |
|
| 4 |
export interface CheckboxProps {
|
| 5 |
value: boolean;
|
| 6 |
info: string;
|
| 7 |
+
buttons: (string | CustomButton)[] | null;
|
| 8 |
}
|
| 9 |
|
| 10 |
export interface CheckboxEvents {
|
|
|
|
| 12 |
input: boolean;
|
| 13 |
select: SelectData;
|
| 14 |
clear_status: LoadingStatus;
|
| 15 |
+
custom_button_click: { id: number };
|
| 16 |
}
|