@skeletonlabs/skeleton 2.2.0-dev.72862197 → 2.2.0-dev.75b7ea14

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.
@@ -5,7 +5,7 @@ const dispatch = createEventDispatcher();
5
5
  export let open = false;
6
6
  export let id = String(Math.random());
7
7
  const cBase = "";
8
- const cControl = "text-left w-full flex items-center space-x-4";
8
+ const cControl = "text-start w-full flex items-center space-x-4";
9
9
  const cControlCaret = "fill-current w-3 transition-transform duration-[200ms]";
10
10
  const cPanel = "";
11
11
  export let autocollapse = getContext("autocollapse");
@@ -1,10 +1,11 @@
1
1
  <script>export let files = void 0;
2
+ export let fileInput = void 0;
2
3
  export let name;
3
4
  export let width = "";
4
5
  export let button = "btn variant-filled";
5
- let elemFileInput;
6
6
  function onButtonClick() {
7
- elemFileInput.click();
7
+ if (fileInput)
8
+ fileInput.click();
8
9
  }
9
10
  function prunedRestProps() {
10
11
  delete $$restProps.class;
@@ -19,7 +20,7 @@ $:
19
20
  <div class="file-button {classesBase}" data-testid="file-button">
20
21
  <!-- NOTE: Don't use `hidden` as it prevents `required` from operating -->
21
22
  <div class="w-0 h-0 overflow-hidden">
22
- <input type="file" bind:this={elemFileInput} bind:files {name} {...prunedRestProps()} on:change />
23
+ <input type="file" bind:this={fileInput} bind:files {name} {...prunedRestProps()} on:change />
23
24
  </div>
24
25
  <!-- Button -->
25
26
  <button
@@ -4,6 +4,8 @@ declare const __propDef: {
4
4
  [x: string]: any;
5
5
  /** Bind FileList to the file input.*/
6
6
  files?: FileList | undefined;
7
+ /** File input reference.*/
8
+ fileInput?: HTMLInputElement | undefined;
7
9
  /** Required. Set a unique name for the file input.*/
8
10
  name: string;
9
11
  /** Provide classes to set the width.*/
@@ -1,4 +1,5 @@
1
1
  <script>export let files = void 0;
2
+ export let fileInput = void 0;
2
3
  export let name;
3
4
  export let border = "border-2 border-dashed";
4
5
  export let padding = "p-4 py-8";
@@ -28,6 +29,7 @@ function prunedRestProps() {
28
29
  <!-- NOTE: keep `bind:files` here, unlike FileButton -->
29
30
  <input
30
31
  bind:files
32
+ bind:this={fileInput}
31
33
  type="file"
32
34
  {name}
33
35
  class="dropzone-input {classesInput}"
@@ -41,6 +43,9 @@ function prunedRestProps() {
41
43
  on:keydown
42
44
  on:keyup
43
45
  on:keypress
46
+ on:focus
47
+ on:focusin
48
+ on:focusout
44
49
  />
45
50
  <!-- Interface -->
46
51
  <div class="dropzone-interface {classesInterface} {regionInterface}">
@@ -4,6 +4,8 @@ declare const __propDef: {
4
4
  [x: string]: any;
5
5
  /** Bind FileList to the file input.*/
6
6
  files?: FileList | undefined;
7
+ /** File input reference.*/
8
+ fileInput?: HTMLInputElement | undefined;
7
9
  /** Required. Set a unique name for the file input.*/
8
10
  name: string;
9
11
  /** Provide classes to set the border styles.*/
@@ -33,6 +35,9 @@ declare const __propDef: {
33
35
  keydown: KeyboardEvent;
34
36
  keyup: KeyboardEvent;
35
37
  keypress: KeyboardEvent;
38
+ focus: FocusEvent;
39
+ focusin: FocusEvent;
40
+ focusout: FocusEvent;
36
41
  } & {
37
42
  [evt: string]: CustomEvent<any>;
38
43
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skeletonlabs/skeleton",
3
- "version": "2.2.0-dev.72862197",
3
+ "version": "2.2.0-dev.75b7ea14",
4
4
  "description": "A SvelteKit component library.",
5
5
  "author": "endigo9740 <chris@skeletonlabs.dev>",
6
6
  "repository": {