gradio-pr-bot commited on
Commit
c2c2074
·
verified ·
1 Parent(s): 937eeb8

Upload folder using huggingface_hub

Browse files
6.3.0/accordion/Index.svelte CHANGED
@@ -31,11 +31,11 @@
31
  <Accordion
32
  {label}
33
  open={gradio.props.open}
34
- on:expand={() => {
35
  gradio.dispatch("expand");
36
  gradio.dispatch("gradio_expand");
37
  }}
38
- on:collapse={() => gradio.dispatch("collapse")}
39
  >
40
  <BaseColumn>
41
  <slot />
 
31
  <Accordion
32
  {label}
33
  open={gradio.props.open}
34
+ onexpand={() => {
35
  gradio.dispatch("expand");
36
  gradio.dispatch("gradio_expand");
37
  }}
38
+ oncollapse={() => gradio.dispatch("collapse")}
39
  >
40
  <BaseColumn>
41
  <slot />
6.3.0/accordion/package.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "name": "@gradio/accordion",
3
- "version": "0.5.27",
4
  "description": "Gradio UI packages",
5
  "type": "module",
6
  "author": "",
 
1
  {
2
  "name": "@gradio/accordion",
3
+ "version": "0.5.28",
4
  "description": "Gradio UI packages",
5
  "type": "module",
6
  "author": "",
6.3.0/accordion/shared/Accordion.svelte CHANGED
@@ -1,21 +1,24 @@
1
  <script lang="ts">
2
- import { createEventDispatcher } from "svelte";
3
- const dispatch = createEventDispatcher<{
4
- expand: void;
5
- collapse: void;
6
- }>();
7
-
8
- export let open = true;
9
- export let label = "";
 
 
 
10
  </script>
11
 
12
  <button
13
- on:click={() => {
14
  open = !open;
15
  if (open) {
16
- dispatch("expand");
17
  } else {
18
- dispatch("collapse");
19
  }
20
  }}
21
  class="label-wrap"
 
1
  <script lang="ts">
2
+ let {
3
+ open = $bindable(true),
4
+ label = "",
5
+ onexpand,
6
+ oncollapse
7
+ }: {
8
+ open: boolean;
9
+ label: string;
10
+ onexpand?: () => void;
11
+ oncollapse?: () => void;
12
+ } = $props();
13
  </script>
14
 
15
  <button
16
+ onclick={() => {
17
  open = !open;
18
  if (open) {
19
+ onexpand?.();
20
  } else {
21
+ oncollapse?.();
22
  }
23
  }}
24
  class="label-wrap"
6.3.0/accordion/types.ts CHANGED
@@ -5,4 +5,5 @@ export interface AccordionProps {
5
  export interface AccordionEvents {
6
  expand: never;
7
  collapse: never;
 
8
  }
 
5
  export interface AccordionEvents {
6
  expand: never;
7
  collapse: never;
8
+ gradio_expand: never;
9
  }