@functionalcms/svelte-components 3.1.0 → 3.2.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.
@@ -13,15 +13,15 @@
13
13
  type = '',
14
14
  css = ''
15
15
  }: {
16
- isAnimated: boolean,
17
- isSkinned: boolean,
18
- isStacked: boolean,
19
- isShadow: boolean,
20
- isBorder: boolean,
21
- isRounded: boolean,
22
- orientation: Orientation,
23
- type: string,
24
- css: string,
16
+ isAnimated?: boolean,
17
+ isSkinned?: boolean,
18
+ isStacked?: boolean,
19
+ isShadow?: boolean,
20
+ isBorder?: boolean,
21
+ isRounded?: boolean,
22
+ orientation?: Orientation,
23
+ type?: string,
24
+ css?: string,
25
25
  } = $props();
26
26
 
27
27
  let klasses = mergedClasses(
@@ -2,20 +2,33 @@
2
2
  import Card from '../agnostic/Card/Card.svelte';
3
3
  import type { ShowItem } from './ShowItem.js';
4
4
  import { AlignItmes, Justify, Orientation } from '../Styling.js';
5
+ import { mergedClasses } from '../CssHelper';
6
+ let {
7
+ items = [],
8
+ renderItem,
9
+ css = '',
10
+ justify = Justify.Between,
11
+ alignItems = AlignItmes.Center,
12
+ orientation = Orientation.DynamicRow
13
+ }: {
14
+ items: Array<ShowItem>;
15
+ renderItem: any;
16
+ css: string;
17
+ justify: Justify;
18
+ alignItems: AlignItmes;
19
+ orientation: Orientation;
20
+ } = $props();
21
+ // export let items: Array<ShowItem> = [];
22
+ // export let css: string = '';
23
+ // export let justify: Justify = Justify.Between;
24
+ // export let alignItems: AlignItmes = AlignItmes.Center;
25
+ // export let orientation: Orientation = Orientation.DynamicRow;
5
26
 
6
- export let items: Array<ShowItem> = [];
7
- export let css: string = '';
8
- export let justify: Justify = Justify.Between;
9
- export let alignItems: AlignItmes = AlignItmes.Center;
10
- export let orientation: Orientation = Orientation.DynamicRow;
11
-
12
- $: galleryKlasses = ['flex', css, `${orientation}`, `${justify}`, `${alignItems}`]
13
- .filter((c) => c)
14
- .join(' ');
27
+ let galleryKlasses = mergedClasses('flex', css, `${orientation}`, `${justify}`, `${alignItems}`);
15
28
  </script>
16
29
 
17
30
  <Card css={galleryKlasses}>
18
- {#each items as item}
19
- <slot {item}></slot>
31
+ {#each items as entry}
32
+ {@render renderItem(entry)}
20
33
  {/each}
21
34
  </Card>
@@ -1,22 +1,10 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
- import type { ShowItem } from './ShowItem.js';
3
- import { AlignItmes, Justify, Orientation } from '../Styling.js';
4
2
  declare const __propDef: {
5
- props: {
6
- items?: Array<ShowItem>;
7
- css?: string;
8
- justify?: Justify;
9
- alignItems?: AlignItmes;
10
- orientation?: Orientation;
11
- };
3
+ props: Record<string, never>;
12
4
  events: {
13
5
  [evt: string]: CustomEvent<any>;
14
6
  };
15
- slots: {
16
- default: {
17
- item: ShowItem;
18
- };
19
- };
7
+ slots: {};
20
8
  };
21
9
  export type GalleryProps = typeof __propDef.props;
22
10
  export type GalleryEvents = typeof __propDef.events;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@functionalcms/svelte-components",
3
- "version": "3.1.0",
3
+ "version": "3.2.0",
4
4
  "watch": {
5
5
  "build": {
6
6
  "patterns": [