gradio/js/atoms
Hannah 73268ee2e3
Improve source selection UX (#6766)
* Add new source option styling for pasting from clipboard
Use SourceSelect in Image component

* prevent device selection cut off
tweak source selection ux

* Check for dupe sources in source selection
Set sources[0] to active_source in Image

* tweaks

* tweak

* add image interaction test

* more tests

* improve light/dark mode color contrast

* add changeset

* remove unused prop

* add no device found placeholder
change T<sources> -> T<source_types>

* style tweak

* allow pasting on click + add e2e test

* fix e2e tests

* formatting

* add timeout to e2e test

* tweak

* tweak test

* change `getByLabel` to `getByText`

* value tweak

* logic tweak

* test

* formatting

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-19 19:24:08 +00:00
..
src Improve source selection UX (#6766) 2023-12-19 19:24:08 +00:00
CHANGELOG.md chore: update versions (#6670) 2023-12-12 18:32:54 -08:00
package.json chore: update versions (#6670) 2023-12-12 18:32:54 -08:00
README.md Version 4 development branch (#5498) 2023-10-31 04:46:02 +00:00

@gradio/atoms

<script lang="ts">
	import { Block, BlockTitle, BlockLabel, IconButton, Empty, Info, ShareButton, UploadText} from "@gradio/atoms";
</script>

Block:

	export let height: number | undefined = undefined;
	export let width: number | undefined = undefined;
	export let elem_id = "";
	export let elem_classes: string[] = [];
	export let variant: "solid" | "dashed" | "none" = "solid";
	export let border_mode: "base" | "focus" = "base";
	export let padding = true;
	export let type: "normal" | "fieldset" = "normal";
	export let test_id: string | undefined = undefined;
	export let explicit_call = false;
	export let container = true;
	export let visible = true;
	export let allow_overflow = true;
	export let scale: number | null = null;
	export let min_width = 0;

BlockTitle:

	export let show_label = true;
	export let info: string | undefined = undefined;

BlockLabel:

	export let label: string | null = null;
	export let Icon: any;
	export let show_label = true;
	export let disable = false;
	export let float = true;

IconButton:

	export let Icon: any;
	export let label = "";
	export let show_label = false;
	export let pending = false;

Empty:

	export let size: "small" | "large" = "small";
	export let unpadded_box = false;

ShareButton:

	export let formatter: (arg0: any) => Promise<string>;
	export let value: any;
	export let i18n: I18nFormatter;

UploadText:

	export let type: "video" | "image" | "audio" | "file" | "csv" = "file";
	export let i18n: I18nFormatter;