@gradio/multimodaltextbox 0.9.11 → 0.9.13

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,22 @@
1
1
  # @gradio/multimodaltextbox
2
2
 
3
+ ## 0.9.13
4
+
5
+ ### Fixes
6
+
7
+ - [#10902](https://github.com/gradio-app/gradio/pull/10902) [`b9b8d08`](https://github.com/gradio-app/gradio/commit/b9b8d08bd2cfb4c89444f5ca3066b1d733c8a807) - Fix disabling buttons in `MultimodalTextbox` when `interactive=False`. Thanks @lara-gfaria!
8
+
9
+ ## 0.9.12
10
+
11
+ ### Dependency updates
12
+
13
+ - @gradio/video@0.14.6
14
+ - @gradio/atoms@0.14.1
15
+ - @gradio/statustracker@0.10.6
16
+ - @gradio/client@1.14.0
17
+ - @gradio/upload@0.15.6
18
+ - @gradio/image@0.21.6
19
+
3
20
  ## 0.9.11
4
21
 
5
22
  ### Dependency updates
@@ -179,9 +179,9 @@ export default class Index extends SvelteComponent<IndexProps, IndexEvents, Inde
179
179
  get root(): string;
180
180
  /**accessor*/
181
181
  set root(_: string);
182
- get file_count(): "single" | "multiple" | "directory";
182
+ get file_count(): "multiple" | "single" | "directory";
183
183
  /**accessor*/
184
- set file_count(_: "single" | "multiple" | "directory");
184
+ set file_count(_: "multiple" | "single" | "directory");
185
185
  get max_plain_text_length(): number;
186
186
  /**accessor*/
187
187
  set max_plain_text_length(_: number);
@@ -333,7 +333,7 @@ function handle_drop(event) {
333
333
  />
334
334
  {/if}
335
335
  <div class="input-container">
336
- {#if sources && sources.includes("upload") && !disabled && !(file_count === "single" && value.files.length > 0)}
336
+ {#if sources && sources.includes("upload") && !(file_count === "single" && value.files.length > 0)}
337
337
  <Upload
338
338
  bind:this={upload_component}
339
339
  on:load={handle_upload}
@@ -354,7 +354,9 @@ function handle_drop(event) {
354
354
  <button
355
355
  data-testid="upload-button"
356
356
  class="upload-button"
357
- on:click={handle_upload_click}><Paperclip /></button
357
+ {disabled}
358
+ on:click={disabled ? undefined : handle_upload_click}
359
+ ><Paperclip /></button
358
360
  >
359
361
  {/if}
360
362
  {#if sources && sources.includes("microphone")}
@@ -362,9 +364,13 @@ function handle_drop(event) {
362
364
  data-testid="microphone-button"
363
365
  class="microphone-button"
364
366
  class:recording
365
- on:click={() => {
366
- active_source = active_source !== "microphone" ? "microphone" : null;
367
- }}
367
+ {disabled}
368
+ on:click={disabled
369
+ ? undefined
370
+ : () => {
371
+ active_source =
372
+ active_source !== "microphone" ? "microphone" : null;
373
+ }}
368
374
  >
369
375
  <Microphone />
370
376
  </button>
@@ -398,7 +404,8 @@ function handle_drop(event) {
398
404
  <button
399
405
  class="submit-button"
400
406
  class:padded-button={submit_btn !== true}
401
- on:click={handle_submit}
407
+ {disabled}
408
+ on:click={disabled ? undefined : handle_submit}
402
409
  >
403
410
  {#if submit_btn === true}
404
411
  <Send />
@@ -512,10 +519,10 @@ function handle_drop(event) {
512
519
  background: var(--button-secondary-background-fill);
513
520
  }
514
521
 
515
- .microphone-button:hover,
516
- .stop-button:hover,
517
- .upload-button:hover,
518
- .submit-button:hover {
522
+ .microphone-button:hover:not(:disabled),
523
+ .stop-button:hover:not(:disabled),
524
+ .upload-button:hover:not(:disabled),
525
+ .submit-button:hover:not(:disabled) {
519
526
  background: var(--button-secondary-background-fill-hover);
520
527
  }
521
528
 
@@ -524,7 +531,7 @@ function handle_drop(event) {
524
531
  .upload-button:disabled,
525
532
  .submit-button:disabled {
526
533
  background: var(--button-secondary-background-fill);
527
- cursor: initial;
534
+ cursor: not-allowed;
528
535
  }
529
536
  .microphone-button:active,
530
537
  .stop-button:active,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradio/multimodaltextbox",
3
- "version": "0.9.11",
3
+ "version": "0.9.13",
4
4
  "description": "Gradio UI packages",
5
5
  "type": "module",
6
6
  "author": "",
@@ -22,14 +22,14 @@
22
22
  "./package.json": "./package.json"
23
23
  },
24
24
  "dependencies": {
25
- "@gradio/atoms": "^0.14.0",
26
25
  "@gradio/icons": "^0.10.0",
26
+ "@gradio/atoms": "^0.14.1",
27
+ "@gradio/statustracker": "^0.10.6",
28
+ "@gradio/upload": "^0.15.6",
27
29
  "@gradio/utils": "^0.10.1",
28
- "@gradio/statustracker": "^0.10.5",
29
- "@gradio/image": "^0.21.5",
30
- "@gradio/upload": "^0.15.5",
31
- "@gradio/video": "^0.14.5",
32
- "@gradio/client": "^1.13.1"
30
+ "@gradio/image": "^0.21.6",
31
+ "@gradio/video": "^0.14.6",
32
+ "@gradio/client": "^1.14.0"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@gradio/preview": "^0.13.0"
@@ -388,7 +388,7 @@
388
388
  />
389
389
  {/if}
390
390
  <div class="input-container">
391
- {#if sources && sources.includes("upload") && !disabled && !(file_count === "single" && value.files.length > 0)}
391
+ {#if sources && sources.includes("upload") && !(file_count === "single" && value.files.length > 0)}
392
392
  <Upload
393
393
  bind:this={upload_component}
394
394
  on:load={handle_upload}
@@ -409,7 +409,9 @@
409
409
  <button
410
410
  data-testid="upload-button"
411
411
  class="upload-button"
412
- on:click={handle_upload_click}><Paperclip /></button
412
+ {disabled}
413
+ on:click={disabled ? undefined : handle_upload_click}
414
+ ><Paperclip /></button
413
415
  >
414
416
  {/if}
415
417
  {#if sources && sources.includes("microphone")}
@@ -417,9 +419,13 @@
417
419
  data-testid="microphone-button"
418
420
  class="microphone-button"
419
421
  class:recording
420
- on:click={() => {
421
- active_source = active_source !== "microphone" ? "microphone" : null;
422
- }}
422
+ {disabled}
423
+ on:click={disabled
424
+ ? undefined
425
+ : () => {
426
+ active_source =
427
+ active_source !== "microphone" ? "microphone" : null;
428
+ }}
423
429
  >
424
430
  <Microphone />
425
431
  </button>
@@ -453,7 +459,8 @@
453
459
  <button
454
460
  class="submit-button"
455
461
  class:padded-button={submit_btn !== true}
456
- on:click={handle_submit}
462
+ {disabled}
463
+ on:click={disabled ? undefined : handle_submit}
457
464
  >
458
465
  {#if submit_btn === true}
459
466
  <Send />
@@ -567,10 +574,10 @@
567
574
  background: var(--button-secondary-background-fill);
568
575
  }
569
576
 
570
- .microphone-button:hover,
571
- .stop-button:hover,
572
- .upload-button:hover,
573
- .submit-button:hover {
577
+ .microphone-button:hover:not(:disabled),
578
+ .stop-button:hover:not(:disabled),
579
+ .upload-button:hover:not(:disabled),
580
+ .submit-button:hover:not(:disabled) {
574
581
  background: var(--button-secondary-background-fill-hover);
575
582
  }
576
583
 
@@ -579,7 +586,7 @@
579
586
  .upload-button:disabled,
580
587
  .submit-button:disabled {
581
588
  background: var(--button-secondary-background-fill);
582
- cursor: initial;
589
+ cursor: not-allowed;
583
590
  }
584
591
  .microphone-button:active,
585
592
  .stop-button:active,