gradio/js/column/Index.svelte

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

76 lines
1.6 KiB
Svelte
Raw Normal View History

2022-03-24 07:36:07 +08:00
<script lang="ts">
Improve rendering (#8398) * changes * add changeset * changes * changes * changes * changes * changes * changes * changeas * changes * add changeset * changes * add changeset * changes * changes * changes * changes * changes * changes * changes * changes * add changeset * changes * cganges * changes * changes * changes * changes * add changeset * changes * chagnes * changes * changes * changes * changes * changes * js * remove console log * changes * changes * changes * changes * changes * changes * changes * changes * changes * add changeset * changes * chnages * changes * cnages * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * add changeset * changes * changes * changes * changes * changes * changes * changes * add changeset * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * add changeset * Add `state.change` listener (#8297) * state changes * changes --------- Co-authored-by: Ali Abid <aliabid94@gmail.com> Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * changes * changes * add changeset * changes * changes * changes * changes * changes * changes * updates * changes * add changeset * changes * changes * add changeset * fix * changes * changes * changes * changes * changes * changes * add changeset * changes --------- Co-authored-by: Ali Abid <aliabid94@gmail.com> Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-05-30 02:24:57 +08:00
import { StatusTracker } from "@gradio/statustracker";
import type { LoadingStatus } from "@gradio/statustracker";
import type { Gradio } from "@gradio/utils";
export let scale: number | null = null;
export let gap = true;
export let min_width = 0;
export let elem_id = "";
export let elem_classes: string[] = [];
export let visible = true;
export let variant: "default" | "panel" | "compact" = "default";
Improve rendering (#8398) * changes * add changeset * changes * changes * changes * changes * changes * changes * changeas * changes * add changeset * changes * add changeset * changes * changes * changes * changes * changes * changes * changes * changes * add changeset * changes * cganges * changes * changes * changes * changes * add changeset * changes * chagnes * changes * changes * changes * changes * changes * js * remove console log * changes * changes * changes * changes * changes * changes * changes * changes * changes * add changeset * changes * chnages * changes * cnages * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * add changeset * changes * changes * changes * changes * changes * changes * changes * add changeset * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * add changeset * Add `state.change` listener (#8297) * state changes * changes --------- Co-authored-by: Ali Abid <aliabid94@gmail.com> Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * changes * changes * add changeset * changes * changes * changes * changes * changes * changes * updates * changes * add changeset * changes * changes * add changeset * fix * changes * changes * changes * changes * changes * changes * add changeset * changes --------- Co-authored-by: Ali Abid <aliabid94@gmail.com> Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-05-30 02:24:57 +08:00
export let loading_status: LoadingStatus | undefined = undefined;
export let gradio: Gradio | undefined = undefined;
export let show_progress = false;
2022-03-25 14:03:47 +08:00
</script>
2022-03-24 07:36:07 +08:00
<div
id={elem_id}
class={elem_classes.join(" ")}
class:gap
class:compact={variant === "compact"}
class:panel={variant === "panel"}
class:hide={!visible}
style:flex-grow={scale}
style:min-width="calc(min({min_width}px, 100%))"
>
Improve rendering (#8398) * changes * add changeset * changes * changes * changes * changes * changes * changes * changeas * changes * add changeset * changes * add changeset * changes * changes * changes * changes * changes * changes * changes * changes * add changeset * changes * cganges * changes * changes * changes * changes * add changeset * changes * chagnes * changes * changes * changes * changes * changes * js * remove console log * changes * changes * changes * changes * changes * changes * changes * changes * changes * add changeset * changes * chnages * changes * cnages * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * add changeset * changes * changes * changes * changes * changes * changes * changes * add changeset * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * add changeset * Add `state.change` listener (#8297) * state changes * changes --------- Co-authored-by: Ali Abid <aliabid94@gmail.com> Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * changes * changes * add changeset * changes * changes * changes * changes * changes * changes * updates * changes * add changeset * changes * changes * add changeset * fix * changes * changes * changes * changes * changes * changes * add changeset * changes --------- Co-authored-by: Ali Abid <aliabid94@gmail.com> Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-05-30 02:24:57 +08:00
{#if loading_status && show_progress && gradio}
<StatusTracker
autoscroll={gradio.autoscroll}
i18n={gradio.i18n}
{...loading_status}
status={loading_status
? loading_status.status == "pending"
? "generating"
: loading_status.status
: null}
/>
{/if}
<slot />
</div>
<style>
div {
display: flex;
position: relative;
flex-direction: column;
}
div > :global(*),
div > :global(.form > *) {
width: var(--size-full);
}
.gap {
Python backend to theming (#2931) * add theme + theme atoms * audio * buttons * chatbot * forms * start file * complete file * fixup workbench * gallery * highlighted text * label * json * upload * 3d model * atoms * chart * md + html * image * plot + build * table * tabs * tooltip * upload * tweaks * tweaks + more tooling * tweaks to padding/ lineheight * app components _ start api docs * format, more api docs * finish api docs * interpretation * todos * tweaks + cleanup * tweaks + cleanup * revert range tweaks * fix notebooks * fix test * remove tw * cleanup + login * fix gitignore * fix types * run css script * fix progress + tweaks * update demos * add css build to static check workflow * tweak ci * fix tests * tweak markdown * tweak chatbot + file * fix tabs * tweak tabs * cleanup * fix api docs * fix example gallery * add gradient to toast * fix min height for interfaces * revert tab changes * update notebooks * changes * changes * change * changes * changes * changes * changes * changes * changes * changes * changes * change * changes * changes * changes * changes * changes * changes * changes * fix * changes * changes * changes * changes * changes * changes * undo radius * undo radius * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * change * undo * Add absolute imports * mock theme in tests * clean * changes * changes --------- Co-authored-by: pngwn <hello@pngwn.io> Co-authored-by: freddyaboulton <alfonsoboulton@gmail.com> Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-03-07 04:52:31 +08:00
gap: var(--layout-gap);
}
.hide {
display: none;
}
.compact > :global(*),
.compact :global(.box) {
border-radius: 0;
}
.compact,
.panel {
Python backend to theming (#2931) * add theme + theme atoms * audio * buttons * chatbot * forms * start file * complete file * fixup workbench * gallery * highlighted text * label * json * upload * 3d model * atoms * chart * md + html * image * plot + build * table * tabs * tooltip * upload * tweaks * tweaks + more tooling * tweaks to padding/ lineheight * app components _ start api docs * format, more api docs * finish api docs * interpretation * todos * tweaks + cleanup * tweaks + cleanup * revert range tweaks * fix notebooks * fix test * remove tw * cleanup + login * fix gitignore * fix types * run css script * fix progress + tweaks * update demos * add css build to static check workflow * tweak ci * fix tests * tweak markdown * tweak chatbot + file * fix tabs * tweak tabs * cleanup * fix api docs * fix example gallery * add gradient to toast * fix min height for interfaces * revert tab changes * update notebooks * changes * changes * change * changes * changes * changes * changes * changes * changes * changes * changes * change * changes * changes * changes * changes * changes * changes * changes * fix * changes * changes * changes * changes * changes * changes * undo radius * undo radius * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * change * undo * Add absolute imports * mock theme in tests * clean * changes * changes --------- Co-authored-by: pngwn <hello@pngwn.io> Co-authored-by: freddyaboulton <alfonsoboulton@gmail.com> Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-03-07 04:52:31 +08:00
border: solid var(--panel-border-width) var(--panel-border-color);
border-radius: var(--container-radius);
More theme updates (#3497) * changes * changes * changes * changes * changes * Update gradio/themes/base.py Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * Update gradio/themes/base.py Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * Update guides/03_building-with-blocks/06_theming-guide Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * Update guides/03_building-with-blocks/06_theming-guide Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * Update guides/03_building-with-blocks/06_theming-guide Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * Update guides/03_building-with-blocks/06_theming-guide Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * Update guides/03_building-with-blocks/06_theming-guide Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * Update guides/03_building-with-blocks/06_theming-guide Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * Update guides/03_building-with-blocks/06_theming-guide Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * Update guides/03_building-with-blocks/06_theming-guide Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * Update guides/03_building-with-blocks/06_theming-guide Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * Update guides/03_building-with-blocks/06_theming-guide Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * Update guides/03_building-with-blocks/06_theming-guide Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * changes * changes * changes * changes * changes * undo merge break * changes * changes * changes * fix --------- Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-03-18 08:20:55 +08:00
background: var(--panel-background-fill);
Python backend to theming (#2931) * add theme + theme atoms * audio * buttons * chatbot * forms * start file * complete file * fixup workbench * gallery * highlighted text * label * json * upload * 3d model * atoms * chart * md + html * image * plot + build * table * tabs * tooltip * upload * tweaks * tweaks + more tooling * tweaks to padding/ lineheight * app components _ start api docs * format, more api docs * finish api docs * interpretation * todos * tweaks + cleanup * tweaks + cleanup * revert range tweaks * fix notebooks * fix test * remove tw * cleanup + login * fix gitignore * fix types * run css script * fix progress + tweaks * update demos * add css build to static check workflow * tweak ci * fix tests * tweak markdown * tweak chatbot + file * fix tabs * tweak tabs * cleanup * fix api docs * fix example gallery * add gradient to toast * fix min height for interfaces * revert tab changes * update notebooks * changes * changes * change * changes * changes * changes * changes * changes * changes * changes * changes * change * changes * changes * changes * changes * changes * changes * changes * fix * changes * changes * changes * changes * changes * changes * undo radius * undo radius * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * change * undo * Add absolute imports * mock theme in tests * clean * changes * changes --------- Co-authored-by: pngwn <hello@pngwn.io> Co-authored-by: freddyaboulton <alfonsoboulton@gmail.com> Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-03-07 04:52:31 +08:00
padding: var(--spacing-lg);
}
</style>