gradio-pr-bot commited on
Commit
40ce306
·
verified ·
1 Parent(s): b389820

Upload folder using huggingface_hub

Browse files
6.14.1/colorpicker/Index.svelte CHANGED
@@ -24,7 +24,7 @@
24
  $effect(() => {
25
  if (old_value !== gradio.props.value) {
26
  old_value = gradio.props.value;
27
- gradio.dispatch("change");
28
  }
29
  });
30
  </script>
 
24
  $effect(() => {
25
  if (old_value !== gradio.props.value) {
26
  old_value = gradio.props.value;
27
+ gradio.dispatch("change", gradio.props.value);
28
  }
29
  });
30
  </script>
6.14.1/colorpicker/package.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "name": "@gradio/colorpicker",
3
- "version": "0.5.11",
4
  "description": "Gradio UI packages",
5
  "type": "module",
6
  "author": "",
 
1
  {
2
  "name": "@gradio/colorpicker",
3
+ "version": "0.5.12",
4
  "description": "Gradio UI packages",
5
  "type": "module",
6
  "author": "",
6.14.1/colorpicker/shared/Colorpicker.svelte CHANGED
@@ -168,6 +168,7 @@
168
  <BlockTitle {show_label} {info}>{label}</BlockTitle>
169
  <button
170
  class="dialog-button"
 
171
  style:background={value}
172
  {disabled}
173
  onfocus={on_focus}
@@ -182,9 +183,12 @@
182
 
183
  {#if dialog_open}
184
  <div class="color-picker" use:click_outside={handle_click_outside}>
185
- <!-- svelte-ignore a11y-no-static-element-interactions -->
186
  <div
187
  class="color-gradient"
 
 
 
 
188
  onmousedown={handle_sl_down}
189
  style="--hue:{hue}"
190
  bind:this={sl_wrap}
@@ -195,8 +199,17 @@
195
  style:background={value}
196
  />
197
  </div>
198
- <!-- svelte-ignore a11y-no-static-element-interactions -->
199
- <div class="hue-slider" onmousedown={handle_hue_down} bind:this={hue_wrap}>
 
 
 
 
 
 
 
 
 
200
  <div
201
  class="marker"
202
  style:background={"hsl(" + hue + ", 100%, 50%)"}
 
168
  <BlockTitle {show_label} {info}>{label}</BlockTitle>
169
  <button
170
  class="dialog-button"
171
+ aria-label={label}
172
  style:background={value}
173
  {disabled}
174
  onfocus={on_focus}
 
183
 
184
  {#if dialog_open}
185
  <div class="color-picker" use:click_outside={handle_click_outside}>
 
186
  <div
187
  class="color-gradient"
188
+ role="slider"
189
+ aria-label="Saturation and brightness"
190
+ aria-valuetext={value}
191
+ tabindex="0"
192
  onmousedown={handle_sl_down}
193
  style="--hue:{hue}"
194
  bind:this={sl_wrap}
 
199
  style:background={value}
200
  />
201
  </div>
202
+ <div
203
+ class="hue-slider"
204
+ role="slider"
205
+ aria-label="Hue"
206
+ aria-valuemin={0}
207
+ aria-valuemax={360}
208
+ aria-valuenow={Math.round(hue)}
209
+ tabindex="0"
210
+ onmousedown={handle_hue_down}
211
+ bind:this={hue_wrap}
212
+ >
213
  <div
214
  class="marker"
215
  style:background={"hsl(" + hue + ", 100%, 50%)"}
6.14.1/colorpicker/types.ts CHANGED
@@ -4,7 +4,7 @@ export interface ColorPickerProps {
4
  }
5
 
6
  export interface ColorPickerEvents {
7
- change: never;
8
  input: never;
9
  release: string;
10
  submit: never;
 
4
  }
5
 
6
  export interface ColorPickerEvents {
7
+ change: string;
8
  input: never;
9
  release: string;
10
  submit: never;