@gradio/button 0.5.14-dev.2 → 0.6.0

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,30 @@
1
1
  # @gradio/button
2
2
 
3
+ ## 0.6.0
4
+
5
+ ### Features
6
+
7
+ - [#12524](https://github.com/gradio-app/gradio/pull/12524) [`d6be33e`](https://github.com/gradio-app/gradio/commit/d6be33e9f019979953991283edd6ddfa00b2207c) - feat: add link_target parameter to Button component. Thanks @ujjwaltwri!
8
+
9
+ ## 0.5.14
10
+
11
+ ### Dependency updates
12
+
13
+ - @gradio/utils@0.10.4
14
+
15
+ ## 0.5.14
16
+
17
+ ### Features
18
+
19
+ - [#12438](https://github.com/gradio-app/gradio/pull/12438) [`25ffc03`](https://github.com/gradio-app/gradio/commit/25ffc0398f8feb43d817c02b2ab970c16de6d797) - Svelte5 migration and bugfix
20
+
21
+ ### Dependencies
22
+
23
+ - @gradio/client@2.0.0
24
+ - @gradio/image@0.24.0
25
+ - @gradio/upload@0.17.2
26
+ - @gradio/utils@0.10.3
27
+
3
28
  ## 0.5.14-dev.2
4
29
 
5
30
  ### Dependency updates
package/Index.svelte CHANGED
@@ -28,6 +28,7 @@
28
28
  min_width={gradio.shared.min_width}
29
29
  visible={gradio.shared.visible}
30
30
  disabled={!gradio.shared.interactive}
31
+ link_target={gradio.props.link_target}
31
32
  on:click={handle_click}
32
33
  >
33
34
  {gradio.props.value ?? ""}
package/dist/Index.svelte CHANGED
@@ -28,6 +28,7 @@
28
28
  min_width={gradio.shared.min_width}
29
29
  visible={gradio.shared.visible}
30
30
  disabled={!gradio.shared.interactive}
31
+ link_target={gradio.props.link_target}
31
32
  on:click={handle_click}
32
33
  >
33
34
  {gradio.props.value ?? ""}
@@ -10,6 +10,7 @@
10
10
  export let size: "sm" | "md" | "lg" = "lg";
11
11
  export let value: string | null = null;
12
12
  export let link: string | null = null;
13
+ export let link_target: "_self" | "_blank" | "_parent" | "_top" = "_self";
13
14
  export let icon: FileData | null = null;
14
15
  export let disabled = false;
15
16
  export let scale: number | null = null;
@@ -19,7 +20,8 @@
19
20
  {#if link && link.length > 0}
20
21
  <a
21
22
  href={link}
22
- rel="noopener noreferrer"
23
+ target={link_target}
24
+ rel={link_target === "_blank" ? "noopener noreferrer" : undefined}
23
25
  class:hidden={visible === false || visible === "hidden"}
24
26
  class:disabled
25
27
  aria-disabled={disabled}
@@ -25,6 +25,7 @@ declare const Button: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWit
25
25
  size?: "sm" | "md" | "lg";
26
26
  value?: string | null;
27
27
  link?: string | null;
28
+ link_target?: "_self" | "_blank" | "_parent" | "_top";
28
29
  icon?: FileData | null;
29
30
  disabled?: boolean;
30
31
  scale?: number | null;
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@gradio/button",
3
- "version": "0.5.14-dev.2",
3
+ "version": "0.6.0",
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/client": "^2.0.0-dev.2",
11
- "@gradio/upload": "^0.17.2-dev.2",
12
- "@gradio/image": "^0.24.0-dev.2",
13
- "@gradio/utils": "^0.10.3-dev.0"
10
+ "@gradio/client": "^2.0.0",
11
+ "@gradio/utils": "^0.10.4",
12
+ "@gradio/image": "^0.24.0",
13
+ "@gradio/upload": "^0.17.2"
14
14
  },
15
15
  "devDependencies": {
16
- "@gradio/preview": "^0.15.0-dev.0"
16
+ "@gradio/preview": "^0.15.1"
17
17
  },
18
18
  "main": "./Index.svelte",
19
19
  "main_changeset": true,
@@ -10,6 +10,7 @@
10
10
  export let size: "sm" | "md" | "lg" = "lg";
11
11
  export let value: string | null = null;
12
12
  export let link: string | null = null;
13
+ export let link_target: "_self" | "_blank" | "_parent" | "_top" = "_self";
13
14
  export let icon: FileData | null = null;
14
15
  export let disabled = false;
15
16
  export let scale: number | null = null;
@@ -19,7 +20,8 @@
19
20
  {#if link && link.length > 0}
20
21
  <a
21
22
  href={link}
22
- rel="noopener noreferrer"
23
+ target={link_target}
24
+ rel={link_target === "_blank" ? "noopener noreferrer" : undefined}
23
25
  class:hidden={visible === false || visible === "hidden"}
24
26
  class:disabled
25
27
  aria-disabled={disabled}