@gradio/tabitem 0.4.6 → 0.5.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,16 @@
1
1
  # @gradio/tabitem
2
2
 
3
+ ## 0.5.0
4
+
5
+ ### Features
6
+
7
+ - [#11427](https://github.com/gradio-app/gradio/pull/11427) [`6b2bcd0`](https://github.com/gradio-app/gradio/commit/6b2bcd097ae5ef999a7fb273ecf7c7e4c0eab305) - Improve load times of the Gradio front-end. Thanks @pngwn!
8
+
9
+ ### Dependency updates
10
+
11
+ - @gradio/column@0.2.1
12
+ - @gradio/tabs@0.4.5
13
+
3
14
  ## 0.4.6
4
15
 
5
16
  ### Dependency updates
package/Index.svelte CHANGED
@@ -32,5 +32,7 @@
32
32
  {scale}
33
33
  on:select={({ detail }) => gradio?.dispatch("select", detail)}
34
34
  >
35
- <slot />
35
+ {#if visible}
36
+ <slot />
37
+ {/if}
36
38
  </TabItem>
package/dist/Index.svelte CHANGED
@@ -24,5 +24,7 @@ export let scale;
24
24
  {scale}
25
25
  on:select={({ detail }) => gradio?.dispatch("select", detail)}
26
26
  >
27
- <slot />
27
+ {#if visible}
28
+ <slot />
29
+ {/if}
28
30
  </TabItem>
@@ -24,21 +24,20 @@ $:
24
24
  $selected_tab_index === tab_index && tick().then(() => dispatch("select", { value: label, index: tab_index }));
25
25
  </script>
26
26
 
27
- <!-- {#if $selected_tab === id && visible} -->
28
- <div
29
- id={elem_id}
30
- class="tabitem {elem_classes.join(' ')}"
31
- class:grow-children={scale >= 1}
32
- style:display={$selected_tab === id && visible ? "flex" : "none"}
33
- style:flex-grow={scale}
34
- role="tabpanel"
35
- >
36
- <Column scale={scale >= 1 ? scale : null}>
37
- <slot />
38
- </Column>
39
- </div>
40
-
41
- <!-- {/if} -->
27
+ {#if $selected_tab === id && visible}
28
+ <div
29
+ id={elem_id}
30
+ class="tabitem {elem_classes.join(' ')}"
31
+ class:grow-children={scale >= 1}
32
+ style:display={$selected_tab === id && visible ? "flex" : "none"}
33
+ style:flex-grow={scale}
34
+ role="tabpanel"
35
+ >
36
+ <Column scale={scale >= 1 ? scale : null}>
37
+ <slot />
38
+ </Column>
39
+ </div>
40
+ {/if}
42
41
 
43
42
  <style>
44
43
  div {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradio/tabitem",
3
- "version": "0.4.6",
3
+ "version": "0.5.0",
4
4
  "description": "Gradio UI packages",
5
5
  "type": "module",
6
6
  "author": "",
@@ -21,7 +21,7 @@
21
21
  "@gradio/utils": "^0.10.2"
22
22
  },
23
23
  "devDependencies": {
24
- "@gradio/preview": "^0.13.2"
24
+ "@gradio/preview": "^0.14.0"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "svelte": "^4.0.0"
@@ -33,21 +33,20 @@
33
33
  tick().then(() => dispatch("select", { value: label, index: tab_index }));
34
34
  </script>
35
35
 
36
- <!-- {#if $selected_tab === id && visible} -->
37
- <div
38
- id={elem_id}
39
- class="tabitem {elem_classes.join(' ')}"
40
- class:grow-children={scale >= 1}
41
- style:display={$selected_tab === id && visible ? "flex" : "none"}
42
- style:flex-grow={scale}
43
- role="tabpanel"
44
- >
45
- <Column scale={scale >= 1 ? scale : null}>
46
- <slot />
47
- </Column>
48
- </div>
49
-
50
- <!-- {/if} -->
36
+ {#if $selected_tab === id && visible}
37
+ <div
38
+ id={elem_id}
39
+ class="tabitem {elem_classes.join(' ')}"
40
+ class:grow-children={scale >= 1}
41
+ style:display={$selected_tab === id && visible ? "flex" : "none"}
42
+ style:flex-grow={scale}
43
+ role="tabpanel"
44
+ >
45
+ <Column scale={scale >= 1 ? scale : null}>
46
+ <slot />
47
+ </Column>
48
+ </div>
49
+ {/if}
51
50
 
52
51
  <style>
53
52
  div {