@functionalcms/svelte-components 4.20.0 → 4.21.0

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.
@@ -70,15 +70,19 @@
70
70
  isRequired={field.isRequired || false}
71
71
  />
72
72
  {:else if field.type === FieldType.Radio}
73
- <label>
74
- <input type="radio" name={field.name} value={field.label} required={field.isRequired} />
75
- {field.label}
76
- </label>
73
+ {#each field.options as option}
74
+ <label>
75
+ <input type="radio" name={field.name} value={option.value} required={field.isRequired} />
76
+ {option.label}
77
+ </label>
78
+ {/each}
77
79
  {:else if field.type === FieldType.Checkbox}
78
- <label>
79
- <input type="checkbox" name={field.name} required={field.isRequired} />
80
- {field.label}
81
- </label>
80
+ {#each field.options as option}
81
+ <label>
82
+ <input type="checkbox" name={field.name} value={option.value} required={field.isRequired} />
83
+ {option.label}
84
+ </label>
85
+ {/each}
82
86
  {/if}
83
87
  {/each}
84
88
 
@@ -32,4 +32,8 @@ export interface Field {
32
32
  subType?: InputType;
33
33
  isRequired?: boolean;
34
34
  placeholder?: string;
35
+ options?: Array<{
36
+ label: string;
37
+ value: string;
38
+ }>;
35
39
  }
@@ -22,7 +22,7 @@
22
22
  containerCss = '',
23
23
  leftCss = 'w50p',
24
24
  rightCss = 'w50p'
25
- }: TwoColumnLayoutProps = $props();
25
+ }: Partial<TwoColumnLayoutProps> = $props();
26
26
 
27
27
  let containerCssEx = cn(
28
28
  'flex flex-row-dynamic',
@@ -1,5 +1,5 @@
1
1
  import type { Snippet } from 'svelte';
2
- interface TwoColumnLayoutProps {
2
+ declare const TwoColumnsLayout: import("svelte").Component<Partial<{
3
3
  leftRender: Snippet;
4
4
  rightRender: Snippet;
5
5
  containerCss: string;
@@ -7,7 +7,6 @@ interface TwoColumnLayoutProps {
7
7
  rightCss: string;
8
8
  isFullWidth: boolean;
9
9
  isFullHeight: boolean;
10
- }
11
- declare const TwoColumnsLayout: import("svelte").Component<TwoColumnLayoutProps, {}, "">;
10
+ }>, {}, "">;
12
11
  type TwoColumnsLayout = ReturnType<typeof TwoColumnsLayout>;
13
12
  export default TwoColumnsLayout;
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@functionalcms/svelte-components",
3
- "version": "4.20.0",
3
+ "version": "4.21.0",
4
+ "license": "MIT",
4
5
  "watch": {
5
6
  "build": {
6
7
  "patterns": [