@gradio/button 0.2.0-beta.4 → 0.2.0-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Button.stories.svelte +1 -1
- package/CHANGELOG.md +28 -15
- package/{static/StaticButton.svelte → Index.svelte} +7 -3
- package/README.md +21 -5
- package/package.json +7 -9
- package/{static → shared}/Button.svelte +3 -3
- package/static/index.ts +0 -2
package/Button.stories.svelte
CHANGED
package/CHANGELOG.md
CHANGED
@@ -1,40 +1,53 @@
|
|
1
1
|
# @gradio/button
|
2
2
|
|
3
|
-
## 0.2.0-beta.
|
3
|
+
## 0.2.0-beta.7
|
4
4
|
|
5
5
|
### Features
|
6
6
|
|
7
|
-
- [#
|
7
|
+
- [#6143](https://github.com/gradio-app/gradio/pull/6143) [`e4f7b4b40`](https://github.com/gradio-app/gradio/commit/e4f7b4b409323b01aa01b39e15ce6139e29aa073) - fix circular dependency with client + upload. Thanks [@pngwn](https://github.com/pngwn)!
|
8
|
+
- [#6136](https://github.com/gradio-app/gradio/pull/6136) [`667802a6c`](https://github.com/gradio-app/gradio/commit/667802a6cdbfb2ce454a3be5a78e0990b194548a) - JS Component Documentation. Thanks [@freddyaboulton](https://github.com/freddyaboulton)!
|
9
|
+
- [#6149](https://github.com/gradio-app/gradio/pull/6149) [`90318b1dd`](https://github.com/gradio-app/gradio/commit/90318b1dd118ae08a695a50e7c556226234ab6dc) - swap `mode` on the frontned to `interactive` to match the backend. Thanks [@pngwn](https://github.com/pngwn)!
|
8
10
|
|
9
|
-
## 0.2.0-beta.
|
11
|
+
## 0.2.0-beta.6
|
12
|
+
|
13
|
+
### Fixes
|
14
|
+
|
15
|
+
- [#6046](https://github.com/gradio-app/gradio/pull/6046) [`dbb7de5e0`](https://github.com/gradio-app/gradio/commit/dbb7de5e02c53fee05889d696d764d212cb96c74) - fix tests. Thanks [@pngwn](https://github.com/pngwn)!
|
16
|
+
|
17
|
+
## 0.2.0-beta.5
|
18
|
+
|
19
|
+
### Features
|
20
|
+
|
21
|
+
- [#5960](https://github.com/gradio-app/gradio/pull/5960) [`319c30f3f`](https://github.com/gradio-app/gradio/commit/319c30f3fccf23bfe1da6c9b132a6a99d59652f7) - rererefactor frontend files. Thanks [@pngwn](https://github.com/pngwn)!
|
22
|
+
- [#5938](https://github.com/gradio-app/gradio/pull/5938) [`13ed8a485`](https://github.com/gradio-app/gradio/commit/13ed8a485d5e31d7d75af87fe8654b661edcca93) - V4: Use beta release versions for '@gradio' packages. Thanks [@freddyaboulton](https://github.com/freddyaboulton)!
|
23
|
+
|
24
|
+
## 0.2.3
|
10
25
|
|
11
26
|
### Patch Changes
|
12
27
|
|
13
|
-
- Updated dependencies [
|
14
|
-
- @gradio/
|
15
|
-
- @gradio/upload@0.3.0-beta.3
|
28
|
+
- Updated dependencies []:
|
29
|
+
- @gradio/upload@0.3.3
|
16
30
|
|
17
|
-
## 0.2.
|
31
|
+
## 0.2.2
|
18
32
|
|
19
33
|
### Patch Changes
|
20
34
|
|
21
|
-
- Updated dependencies [
|
22
|
-
- @gradio/utils@0.
|
23
|
-
- @gradio/upload@0.3.
|
35
|
+
- Updated dependencies []:
|
36
|
+
- @gradio/utils@0.1.2
|
37
|
+
- @gradio/upload@0.3.2
|
24
38
|
|
25
|
-
## 0.2.
|
39
|
+
## 0.2.1
|
26
40
|
|
27
41
|
### Patch Changes
|
28
42
|
|
29
43
|
- Updated dependencies []:
|
30
|
-
- @gradio/
|
31
|
-
- @gradio/upload@0.3.0-beta.1
|
44
|
+
- @gradio/upload@0.3.1
|
32
45
|
|
33
|
-
## 0.2.0
|
46
|
+
## 0.2.0
|
34
47
|
|
35
48
|
### Features
|
36
49
|
|
37
|
-
- [#
|
50
|
+
- [#5554](https://github.com/gradio-app/gradio/pull/5554) [`75ddeb390`](https://github.com/gradio-app/gradio/commit/75ddeb390d665d4484667390a97442081b49a423) - Accessibility Improvements. Thanks [@hannahblair](https://github.com/hannahblair)!
|
38
51
|
|
39
52
|
## 0.1.3
|
40
53
|
|
@@ -1,14 +1,18 @@
|
|
1
|
+
<script context="module" lang="ts">
|
2
|
+
export { default as BaseButton } from "./shared/Button.svelte";
|
3
|
+
</script>
|
4
|
+
|
1
5
|
<script lang="ts">
|
2
6
|
import type { Gradio, ShareData } from "@gradio/utils";
|
3
7
|
|
4
|
-
import Button from "./Button.svelte";
|
8
|
+
import Button from "./shared/Button.svelte";
|
5
9
|
|
6
10
|
export let elem_id = "";
|
7
11
|
export let elem_classes: string[] = [];
|
8
12
|
export let visible = true;
|
9
13
|
export let value: string;
|
10
14
|
export let variant: "primary" | "secondary" | "stop" = "secondary";
|
11
|
-
export let
|
15
|
+
export let interactive: boolean;
|
12
16
|
export let size: "sm" | "lg" = "lg";
|
13
17
|
export let scale: number | null = null;
|
14
18
|
export let icon: string | null = null;
|
@@ -34,7 +38,7 @@
|
|
34
38
|
{visible}
|
35
39
|
{root}
|
36
40
|
{root_url}
|
37
|
-
disabled={
|
41
|
+
disabled={!interactive}
|
38
42
|
on:click={() => gradio.dispatch("click")}
|
39
43
|
>
|
40
44
|
{gradio.i18n(value)}
|
package/README.md
CHANGED
@@ -1,11 +1,27 @@
|
|
1
1
|
# `@gradio/button`
|
2
2
|
|
3
|
-
```
|
3
|
+
```javascript
|
4
4
|
<script>
|
5
|
-
import {
|
5
|
+
import { BaseButton } from "@gradio/button";
|
6
|
+
import { createEventDispatcher, tick, getContext } from "svelte";
|
7
|
+
const dispatch = createEventDispatcher();
|
6
8
|
</script>
|
7
9
|
|
8
|
-
<
|
9
|
-
|
10
|
-
|
10
|
+
<BaseButton
|
11
|
+
{value}
|
12
|
+
{variant}
|
13
|
+
{elem_id}
|
14
|
+
{elem_classes}
|
15
|
+
{size}
|
16
|
+
{scale}
|
17
|
+
{link}
|
18
|
+
{icon}
|
19
|
+
{min_width}
|
20
|
+
{visible}
|
21
|
+
{root}
|
22
|
+
{root_url}
|
23
|
+
on:click={() => dispatch("click")}
|
24
|
+
>
|
25
|
+
{"My Button"}
|
26
|
+
</Button>
|
11
27
|
```
|
package/package.json
CHANGED
@@ -1,22 +1,20 @@
|
|
1
1
|
{
|
2
2
|
"name": "@gradio/button",
|
3
|
-
"version": "0.2.0-beta.
|
3
|
+
"version": "0.2.0-beta.7",
|
4
4
|
"description": "Gradio UI packages",
|
5
5
|
"type": "module",
|
6
|
-
"main": "./static/index.ts",
|
7
6
|
"author": "",
|
8
7
|
"license": "ISC",
|
9
8
|
"private": false,
|
10
9
|
"dependencies": {
|
11
|
-
"@gradio/
|
12
|
-
"@gradio/
|
10
|
+
"@gradio/client": "^0.7.0-beta.1",
|
11
|
+
"@gradio/upload": "^0.3.0-beta.6",
|
12
|
+
"@gradio/utils": "^0.2.0-beta.6"
|
13
13
|
},
|
14
|
+
"main": "./Index.svelte",
|
14
15
|
"main_changeset": true,
|
15
16
|
"exports": {
|
16
|
-
".": "./
|
17
|
-
"./package.json": "./package.json"
|
18
|
-
"./interactive": "./interactive/index.ts",
|
19
|
-
"./static": "./static/index.ts",
|
20
|
-
"./example": "./example/index.ts"
|
17
|
+
".": "./Index.svelte",
|
18
|
+
"./package.json": "./package.json"
|
21
19
|
}
|
22
20
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<script lang="ts">
|
2
|
-
import { get_fetchable_url_or_file } from "@gradio/
|
2
|
+
import { get_fetchable_url_or_file } from "@gradio/client";
|
3
3
|
|
4
4
|
export let elem_id = "";
|
5
5
|
export let elem_classes: string[] = [];
|
@@ -34,7 +34,7 @@
|
|
34
34
|
id={elem_id}
|
35
35
|
>
|
36
36
|
{#if icon}
|
37
|
-
<img class="button-icon" src={icon_path} alt={`${value}
|
37
|
+
<img class="button-icon" src={icon_path} alt={`${value} icon`} />
|
38
38
|
{/if}
|
39
39
|
<slot />
|
40
40
|
</a>
|
@@ -52,7 +52,7 @@
|
|
52
52
|
{disabled}
|
53
53
|
>
|
54
54
|
{#if icon}
|
55
|
-
<img class="button-icon" src={icon_path} alt={`${value}
|
55
|
+
<img class="button-icon" src={icon_path} alt={`${value} icon`} />
|
56
56
|
{/if}
|
57
57
|
<slot />
|
58
58
|
</button>
|
package/static/index.ts
DELETED