@functionalcms/svelte-components 4.10.6 → 4.10.8

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.
@@ -35,7 +35,7 @@
35
35
  label = type || 'choice input',
36
36
  size = '',
37
37
  // Provides bind:checked capabilities that consumer can use
38
- checked = [],
38
+ checked = $bindable([]),
39
39
  ...restProps
40
40
  }: Partial<Props & HtmlParts> = $props();
41
41
 
@@ -12,6 +12,6 @@ declare const ChoiceInput: import("svelte").Component<Partial<{
12
12
  label: string;
13
13
  size: ChoiceInputSize;
14
14
  checked: string[];
15
- } & HtmlParts>, {}, "">;
15
+ } & HtmlParts>, {}, "checked">;
16
16
  type ChoiceInput = ReturnType<typeof ChoiceInput>;
17
17
  export default ChoiceInput;
@@ -1,4 +1,4 @@
1
- <script lang="ts" module>
1
+ <!-- <script lang="ts" module>
2
2
  import type { Snippet } from 'svelte';
3
3
  import type { HTMLInputAttributes } from 'svelte/elements';
4
4
 
@@ -44,7 +44,7 @@
44
44
  */
45
45
  accept?: string;
46
46
  }
47
- </script>
47
+ </script> -->
48
48
 
49
49
  <script lang="ts">
50
50
  import { displaySize } from './dropzone.js';
@@ -1,44 +1,3 @@
1
- import type { Snippet } from 'svelte';
2
- import type { HTMLInputAttributes } from 'svelte/elements';
3
- export type FileRejectedReason = 'Maximum file size exceeded' | 'File type not allowed' | 'Maximum files uploaded';
4
- export interface FileDropZoneProps extends Omit<HTMLInputAttributes, 'multiple'> {
5
- /** Called with the uploaded files when the user drops or clicks and selects their files.
6
- *
7
- * @param files
8
- */
9
- onUpload: (files: File[]) => Promise<void>;
10
- /** The maximum amount files allowed to be uploaded */
11
- maxFiles?: number;
12
- fileCount?: number;
13
- /** The maximum size of a file in bytes */
14
- maxFileSize?: number;
15
- children?: Snippet<[]>;
16
- css: string;
17
- /** Called when a file does not meet the upload criteria (size, or type) */
18
- onFileRejected?: (opts: {
19
- reason: FileRejectedReason;
20
- file: File;
21
- }) => void;
22
- /** Takes a comma separated list of one or more file types.
23
- *
24
- * [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept)
25
- *
26
- * ### Usage
27
- * ```svelte
28
- * <FileDropZone
29
- * accept=".doc,.docx,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document"
30
- * />
31
- * ```
32
- *
33
- * ### Common Values
34
- * ```svelte
35
- * <FileDropZone accept="audio/*"/>
36
- * <FileDropZone accept="image/*"/>
37
- * <FileDropZone accept="video/*"/>
38
- * ```
39
- */
40
- accept?: string;
41
- }
42
1
  declare const Dropzone: import("svelte").Component<FileDropZoneProps, {}, "">;
43
2
  type Dropzone = ReturnType<typeof Dropzone>;
44
3
  export default Dropzone;
@@ -4,7 +4,7 @@
4
4
  interface Props {
5
5
  id: string;
6
6
  name: string;
7
- labelCopy: string;
7
+ label: string;
8
8
  options: Array<{ value: string; label: string }>;
9
9
  size: string;
10
10
  multipleSize: number;
@@ -21,7 +21,7 @@
21
21
  let {
22
22
  id = '',
23
23
  name = '',
24
- labelCopy = '',
24
+ label = '',
25
25
  options = [],
26
26
  size = '',
27
27
  multipleSize = 1,
@@ -48,7 +48,7 @@
48
48
  css ? `${css}` : ''));
49
49
  </script>
50
50
 
51
- <label class="screenreader-only" for={id}> {labelCopy} </label>
51
+ <label class="screenreader-only" for={id}> {label} </label>
52
52
  {#if isMultiple}
53
53
  <select
54
54
  id={id}
@@ -1,7 +1,7 @@
1
1
  declare const Select: import("svelte").Component<Partial<{
2
2
  id: string;
3
3
  name: string;
4
- labelCopy: string;
4
+ label: string;
5
5
  options: Array<{
6
6
  value: string;
7
7
  label: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@functionalcms/svelte-components",
3
- "version": "4.10.6",
3
+ "version": "4.10.8",
4
4
  "watch": {
5
5
  "build": {
6
6
  "patterns": [