@gradio/button 0.4.6 → 0.4.8

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/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @gradio/button
2
2
 
3
+ ## 0.4.8
4
+
5
+ ### Dependency updates
6
+
7
+ - @gradio/upload@0.15.3
8
+ - @gradio/client@1.13.0
9
+ - @gradio/image@0.21.3
10
+
11
+ ## 0.4.7
12
+
13
+ ### Features
14
+
15
+ - [#10594](https://github.com/gradio-app/gradio/pull/10594) [`f0e4fd0`](https://github.com/gradio-app/gradio/commit/f0e4fd0522dd0f02701e0c4d3e694f6e6198db9d) - Fix `Blocks.serve_static_file` and `Button.svelte` to work on Lite. Thanks @whitphx!
16
+
17
+ ### Dependency updates
18
+
19
+ - @gradio/image@0.21.2
20
+ - @gradio/upload@0.15.2
21
+
3
22
  ## 0.4.6
4
23
 
5
24
  ### Dependency updates
@@ -1,4 +1,5 @@
1
1
  <script>import {} from "@gradio/client";
2
+ import { Image } from "@gradio/image/shared";
2
3
  export let elem_id = "";
3
4
  export let elem_classes = [];
4
5
  export let visible = true;
@@ -29,7 +30,7 @@ export let min_width = void 0;
29
30
  id={elem_id}
30
31
  >
31
32
  {#if icon}
32
- <img class="button-icon" src={icon.url} alt={`${value} icon`} />
33
+ <Image class="button-icon" src={icon.url} alt={`${value} icon`} />
33
34
  {/if}
34
35
  <slot />
35
36
  </a>
@@ -47,9 +48,8 @@ export let min_width = void 0;
47
48
  {disabled}
48
49
  >
49
50
  {#if icon}
50
- <img
51
- class="button-icon"
52
- class:right-padded={value}
51
+ <Image
52
+ class={`button-icon ${value ? "right-padded" : ""}`}
53
53
  src={icon.url}
54
54
  alt={`${value} icon`}
55
55
  />
@@ -185,11 +185,11 @@ export let min_width = void 0;
185
185
  font-size: var(--button-large-text-size);
186
186
  }
187
187
 
188
- .button-icon {
188
+ :global(.button-icon) {
189
189
  width: var(--text-xl);
190
190
  height: var(--text-xl);
191
191
  }
192
- .button-icon.right-padded {
192
+ :global(.button-icon.right-padded) {
193
193
  margin-right: var(--spacing-md);
194
194
  }
195
195
 
package/package.json CHANGED
@@ -1,14 +1,15 @@
1
1
  {
2
2
  "name": "@gradio/button",
3
- "version": "0.4.6",
3
+ "version": "0.4.8",
4
4
  "description": "Gradio UI packages",
5
5
  "type": "module",
6
6
  "author": "",
7
7
  "license": "ISC",
8
8
  "private": false,
9
9
  "dependencies": {
10
- "@gradio/upload": "^0.15.1",
11
- "@gradio/client": "^1.12.0",
10
+ "@gradio/client": "^1.13.0",
11
+ "@gradio/image": "^0.21.3",
12
+ "@gradio/upload": "^0.15.3",
12
13
  "@gradio/utils": "^0.10.1"
13
14
  },
14
15
  "devDependencies": {
@@ -1,5 +1,6 @@
1
1
  <script lang="ts">
2
2
  import { type FileData } from "@gradio/client";
3
+ import { Image } from "@gradio/image/shared";
3
4
 
4
5
  export let elem_id = "";
5
6
  export let elem_classes: string[] = [];
@@ -32,7 +33,7 @@
32
33
  id={elem_id}
33
34
  >
34
35
  {#if icon}
35
- <img class="button-icon" src={icon.url} alt={`${value} icon`} />
36
+ <Image class="button-icon" src={icon.url} alt={`${value} icon`} />
36
37
  {/if}
37
38
  <slot />
38
39
  </a>
@@ -50,9 +51,8 @@
50
51
  {disabled}
51
52
  >
52
53
  {#if icon}
53
- <img
54
- class="button-icon"
55
- class:right-padded={value}
54
+ <Image
55
+ class={`button-icon ${value ? "right-padded" : ""}`}
56
56
  src={icon.url}
57
57
  alt={`${value} icon`}
58
58
  />
@@ -188,11 +188,11 @@
188
188
  font-size: var(--button-large-text-size);
189
189
  }
190
190
 
191
- .button-icon {
191
+ :global(.button-icon) {
192
192
  width: var(--text-xl);
193
193
  height: var(--text-xl);
194
194
  }
195
- .button-icon.right-padded {
195
+ :global(.button-icon.right-padded) {
196
196
  margin-right: var(--spacing-md);
197
197
  }
198
198