@functionalcms/svelte-components 2.12.12 → 2.12.13

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.
@@ -1,38 +1,26 @@
1
1
  <style>
2
- :global(.box) {
3
- text-align: center;
4
- justify-content: center !important;
5
- }
6
- img {
7
- width: 100%;
8
- }
9
2
  </style>
10
3
 
11
- <script>import {} from "./ShowItem";
4
+ <script>import { AlignItmes, Justify, Orientation } from "../Styling.js";
5
+ import {} from "./ShowItem";
12
6
  import { Card } from "agnostic-svelte";
13
7
  export let items = [];
14
8
  export let galleryCss = "";
15
- export let cardCss = "";
9
+ export let justify = Justify.Between;
10
+ export let alignItems = AlignItmes.Center;
11
+ export let orientation = Orientation.Row;
16
12
  $:
17
13
  galleryKlasses = [
18
14
  "flex",
19
15
  "flex-row-dynamic",
20
- galleryCss
21
- ].filter((c) => c).join(" ");
22
- $:
23
- cardKlasses = [
24
- "box",
25
- cardCss
16
+ galleryCss,
17
+ `${orientation}`,
18
+ `${justify}`,
19
+ `${alignItems}`
26
20
  ].filter((c) => c).join(" ");
27
21
  </script>
28
22
  <Card css={galleryKlasses}>
29
23
  {#each items as item}
30
- <Card css={cardKlasses}>
31
- <a href={item?.path}>
32
- <img src={item?.image} alt={item.title} />
33
- <h2>{item.title}</h2>
34
- <p>{item.short}</p>
35
- </a>
36
- </Card>
24
+ <slot item={item}></slot>
37
25
  {/each}
38
26
  </Card>
@@ -1,15 +1,22 @@
1
1
  import { SvelteComponent } from "svelte";
2
+ import { AlignItmes, Justify, Orientation } from '../Styling.js';
2
3
  import { type ShowItem } from './ShowItem';
3
4
  declare const __propDef: {
4
5
  props: {
5
6
  items?: ShowItem[] | undefined;
6
7
  galleryCss?: string | undefined;
7
- cardCss?: string | undefined;
8
+ justify?: Justify | undefined;
9
+ alignItems?: AlignItmes | undefined;
10
+ orientation?: Orientation | undefined;
8
11
  };
9
12
  events: {
10
13
  [evt: string]: CustomEvent<any>;
11
14
  };
12
- slots: {};
15
+ slots: {
16
+ default: {
17
+ item: ShowItem;
18
+ };
19
+ };
13
20
  };
14
21
  export type GalleryProps = typeof __propDef.props;
15
22
  export type GalleryEvents = typeof __propDef.events;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@functionalcms/svelte-components",
3
- "version": "2.12.12",
3
+ "version": "2.12.13",
4
4
  "watch": {
5
5
  "build": {
6
6
  "patterns": [