@gradio/tabs 0.0.6-beta.4 → 0.1.0-beta.6

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,38 +1,24 @@
1
1
  # @gradio/tabs
2
2
 
3
- ## 0.0.6-beta.4
3
+ ## 0.1.0-beta.6
4
4
 
5
5
  ### Features
6
6
 
7
- - [#5648](https://github.com/gradio-app/gradio/pull/5648) [`c573e2339`](https://github.com/gradio-app/gradio/commit/c573e2339b86c85b378dc349de5e9223a3c3b04a) - Publish all components to npm. Thanks [@freddyaboulton](https://github.com/freddyaboulton)!
7
+ - [#5960](https://github.com/gradio-app/gradio/pull/5960) [`319c30f3f`](https://github.com/gradio-app/gradio/commit/319c30f3fccf23bfe1da6c9b132a6a99d59652f7) - rererefactor frontend files. Thanks [@pngwn](https://github.com/pngwn)!
8
+ - [#5938](https://github.com/gradio-app/gradio/pull/5938) [`13ed8a485`](https://github.com/gradio-app/gradio/commit/13ed8a485d5e31d7d75af87fe8654b661edcca93) - V4: Use beta release versions for '@gradio' packages. Thanks [@freddyaboulton](https://github.com/freddyaboulton)!
8
9
 
9
- ## 0.0.6-beta.3
10
-
11
- ### Patch Changes
12
-
13
- - Updated dependencies [[`0b4fd5b6d`](https://github.com/gradio-app/gradio/commit/0b4fd5b6db96fc95a155e5e935e17e1ab11d1161)]:
14
- - @gradio/utils@0.2.0-beta.3
15
-
16
- ## 0.0.6-beta.2
17
-
18
- ### Patch Changes
19
-
20
- - Updated dependencies [[`14fc612d8`](https://github.com/gradio-app/gradio/commit/14fc612d84bf6b1408eccd3a40fab41f25477571)]:
21
- - @gradio/utils@0.2.0-beta.2
22
-
23
- ## 0.0.6-beta.1
10
+ ## 0.0.7
24
11
 
25
12
  ### Patch Changes
26
13
 
27
14
  - Updated dependencies []:
28
- - @gradio/utils@0.2.0-beta.1
15
+ - @gradio/utils@0.1.2
29
16
 
30
- ## 0.0.6-beta.0
17
+ ## 0.0.6
31
18
 
32
- ### Patch Changes
19
+ ### Features
33
20
 
34
- - Updated dependencies [[`681f10c31`](https://github.com/gradio-app/gradio/commit/681f10c315a75cc8cd0473c9a0167961af7696db), [`1385dc688`](https://github.com/gradio-app/gradio/commit/1385dc6881f2d8ae7a41106ec21d33e2ef04d6a9)]:
35
- - @gradio/utils@0.2.0-beta.0
21
+ - [#5590](https://github.com/gradio-app/gradio/pull/5590) [`d1ad1f671`](https://github.com/gradio-app/gradio/commit/d1ad1f671caef9f226eb3965f39164c256d8615c) - Attach `elem_classes` selectors to layout elements, and an id to the Tab button (for targeting via CSS/JS). Thanks [@abidlabs](https://github.com/abidlabs)!
36
22
 
37
23
  ## 0.0.5
38
24
 
@@ -1,7 +1,11 @@
1
+ <script context="module" lang="ts">
2
+ export { TABS } from "./shared/Tabs.svelte";
3
+ </script>
4
+
1
5
  <script lang="ts">
2
6
  import type { Gradio, SelectData } from "@gradio/utils";
3
7
  import { createEventDispatcher } from "svelte";
4
- import Tabs from "./Tabs.svelte";
8
+ import Tabs from "./shared/Tabs.svelte";
5
9
 
6
10
  const dispatch = createEventDispatcher();
7
11
 
package/package.json CHANGED
@@ -1,21 +1,17 @@
1
1
  {
2
2
  "name": "@gradio/tabs",
3
- "version": "0.0.6-beta.4",
3
+ "version": "0.1.0-beta.6",
4
4
  "description": "Gradio UI packages",
5
5
  "type": "module",
6
- "main": "./static/index.ts",
7
6
  "author": "",
8
7
  "license": "ISC",
9
8
  "private": false,
10
9
  "main_changeset": true,
11
10
  "exports": {
12
- ".": "./static/index.ts",
13
- "./package.json": "./package.json",
14
- "./interactive": "./interactive/index.ts",
15
- "./static": "./static/index.ts",
16
- "./example": "./example/index.ts"
11
+ ".": "./Index.svelte",
12
+ "./package.json": "./package.json"
17
13
  },
18
14
  "dependencies": {
19
- "@gradio/utils": "^0.2.0-beta.3"
15
+ "@gradio/utils": "^0.2.0-beta.4"
20
16
  }
21
17
  }
@@ -10,6 +10,7 @@
10
10
  interface Tab {
11
11
  name: string;
12
12
  id: object;
13
+ elem_id: string | undefined;
13
14
  }
14
15
 
15
16
  export let visible = true;
@@ -28,7 +29,7 @@
28
29
 
29
30
  setContext(TABS, {
30
31
  register_tab: (tab: Tab) => {
31
- tabs.push({ name: tab.name, id: tab.id });
32
+ tabs.push({ name: tab.name, id: tab.id, elem_id: tab.elem_id });
32
33
  selected_tab.update((current) => current ?? tab.id);
33
34
  tabs = tabs;
34
35
  return tabs.length - 1;
@@ -58,11 +59,12 @@
58
59
  <div class="tab-nav scroll-hide">
59
60
  {#each tabs as t, i (t.id)}
60
61
  {#if t.id === $selected_tab}
61
- <button class="selected">
62
+ <button class="selected" id={t.elem_id ? t.elem_id + "-button" : null}>
62
63
  {t.name}
63
64
  </button>
64
65
  {:else}
65
66
  <button
67
+ id={t.elem_id ? t.elem_id + "-button" : null}
66
68
  on:click={() => {
67
69
  change_tab(t.id);
68
70
  dispatch("select", { value: t.name, index: i });
package/static/index.ts DELETED
@@ -1,2 +0,0 @@
1
- export { default } from "./StaticTabs.svelte";
2
- export { TABS } from "./Tabs.svelte";