@gradio/tabitem 0.1.0-beta.8 → 0.2.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,17 @@
1
1
  # @gradio/tabitem
2
2
 
3
+ ## 0.2.0
4
+
5
+ ### Features
6
+
7
+ - [#7018](https://github.com/gradio-app/gradio/pull/7018) [`ec28b4e`](https://github.com/gradio-app/gradio/commit/ec28b4e7c47a9233d9e3a725cc9fe8f9044dfa94) - Add `visible` and `interactive` params to `gr.Tab()`. Thanks [@hannahblair](https://github.com/hannahblair)!
8
+
9
+ ## 0.1.0
10
+
11
+ ### Features
12
+
13
+ - [#5498](https://github.com/gradio-app/gradio/pull/5498) [`287fe6782`](https://github.com/gradio-app/gradio/commit/287fe6782825479513e79a5cf0ba0fbfe51443d7) - Publish all components to npm. Thanks [@pngwn](https://github.com/pngwn)!
14
+
3
15
  ## 0.1.0-beta.8
4
16
 
5
17
  ### Patch Changes
@@ -70,4 +82,4 @@ These improvements will be particularly beneficial to large applications.
70
82
  - Corrected an issue that was causing markdown to re-render infinitely.
71
83
  - Ensured that the `gr.3DModel` does re-render prematurely.
72
84
 
73
- Thanks [@pngwn](https://github.com/pngwn)!
85
+ Thanks [@pngwn](https://github.com/pngwn)!
package/Index.svelte CHANGED
@@ -9,12 +9,16 @@
9
9
  export let gradio: Gradio<{
10
10
  select: SelectData;
11
11
  }>;
12
+ export let visible = true;
13
+ export let interactive = true;
12
14
  </script>
13
15
 
14
16
  <TabItem
15
17
  {elem_id}
16
18
  {elem_classes}
17
19
  name={label}
20
+ {visible}
21
+ {interactive}
18
22
  {id}
19
23
  on:select={({ detail }) => gradio.dispatch("select", detail)}
20
24
  >
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradio/tabitem",
3
- "version": "0.1.0-beta.8",
3
+ "version": "0.2.0",
4
4
  "description": "Gradio UI packages",
5
5
  "type": "module",
6
6
  "author": "",
@@ -12,8 +12,8 @@
12
12
  "./package.json": "./package.json"
13
13
  },
14
14
  "dependencies": {
15
- "@gradio/column": "^0.1.0-beta.3",
16
- "@gradio/tabs": "^0.1.0-beta.8",
17
- "@gradio/utils": "^0.2.0-beta.6"
15
+ "@gradio/utils": "^0.2.0",
16
+ "@gradio/tabs": "^0.2.0",
17
+ "@gradio/column": "^0.1.0"
18
18
  }
19
19
  }
@@ -8,13 +8,17 @@
8
8
  export let elem_classes: string[] = [];
9
9
  export let name: string;
10
10
  export let id: string | number | object = {};
11
+ export let visible: boolean;
12
+ export let interactive: boolean;
11
13
 
12
14
  const dispatch = createEventDispatcher<{ select: SelectData }>();
13
15
 
14
16
  const { register_tab, unregister_tab, selected_tab, selected_tab_index } =
15
17
  getContext(TABS) as any;
16
18
 
17
- let tab_index = register_tab({ name, id, elem_id });
19
+ let tab_index: number;
20
+
21
+ $: tab_index = register_tab({ name, id, elem_id, visible, interactive });
18
22
 
19
23
  onMount(() => {
20
24
  return (): void => unregister_tab({ name, id, elem_id });
@@ -28,6 +32,7 @@
28
32
  id={elem_id}
29
33
  class="tabitem {elem_classes.join(' ')}"
30
34
  style:display={$selected_tab === id ? "block" : "none"}
35
+ role="tabpanel"
31
36
  >
32
37
  <Column>
33
38
  <slot />