@gradio/tabitem 0.4.5 → 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 +29 -0
- package/Index.svelte +3 -1
- package/dist/Index.svelte +3 -1
- package/dist/shared/TabItem.svelte +14 -15
- package/package.json +4 -4
- package/shared/TabItem.svelte +14 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
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
|
+
|
|
14
|
+
## 0.4.6
|
|
15
|
+
|
|
16
|
+
### Dependency updates
|
|
17
|
+
|
|
18
|
+
- @gradio/column@0.2.1
|
|
19
|
+
|
|
20
|
+
## 0.4.5
|
|
21
|
+
|
|
22
|
+
### Dependency updates
|
|
23
|
+
|
|
24
|
+
- @gradio/column@0.2.0
|
|
25
|
+
|
|
26
|
+
## 0.4.5
|
|
27
|
+
|
|
28
|
+
### Dependency updates
|
|
29
|
+
|
|
30
|
+
- @gradio/tabs@0.4.5
|
|
31
|
+
|
|
3
32
|
## 0.4.5
|
|
4
33
|
|
|
5
34
|
### Dependency updates
|
package/Index.svelte
CHANGED
package/dist/Index.svelte
CHANGED
|
@@ -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
|
-
|
|
28
|
-
<div
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
>
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Gradio UI packages",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "",
|
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
"./package.json": "./package.json"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
+
"@gradio/column": "^0.2.1",
|
|
19
20
|
"@gradio/tabs": "^0.4.5",
|
|
20
|
-
"@gradio/utils": "^0.10.2"
|
|
21
|
-
"@gradio/column": "^0.2.0"
|
|
21
|
+
"@gradio/utils": "^0.10.2"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@gradio/preview": "^0.
|
|
24
|
+
"@gradio/preview": "^0.14.0"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"svelte": "^4.0.0"
|
package/shared/TabItem.svelte
CHANGED
|
@@ -33,21 +33,20 @@
|
|
|
33
33
|
tick().then(() => dispatch("select", { value: label, index: tab_index }));
|
|
34
34
|
</script>
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
<div
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
>
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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 {
|