@3birds/midori-ui 0.0.39 → 0.0.41

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 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M12 13H7V18H12V20H5V10H7V11H12V13M8 4V6H4V4H8M10 2H2V8H10V2M20 11V13H16V11H20M22 9H14V15H22V9M20 18V20H16V18H20M22 16H14V22H22V16Z" /></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#18181B99" d="M12 13H7V18H12V20H5V10H7V11H12V13M8 4V6H4V4H8M10 2H2V8H10V2M20 11V13H16V11H20M22 9H14V15H22V9M20 18V20H16V18H20M22 16H14V22H22V16Z" /></svg>
@@ -0,0 +1,7 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
2
+ <title>heart-outline</title>
3
+ <path
4
+ fill="#FF637D"
5
+ d="M12.1,18.55L12,18.65L11.89,18.55C7.14,14.24 4,11.39 4,8.5C4,6.5 5.5,5 7.5,5C9.04,5 10.54,6 11.07,7.36H12.93C13.46,6 14.96,5 16.5,5C18.5,5 20,6.5 20,8.5C20,11.39 16.86,14.24 12.1,18.55M16.5,3C14.76,3 13.09,3.81 12,5.08C10.91,3.81 9.24,3 7.5,3C4.42,3 2,5.41 2,8.5C2,12.27 5.4,15.36 10.55,20.03L12,21.35L13.45,20.03C18.6,15.36 22,12.27 22,8.5C22,5.41 19.58,3 16.5,3Z"
6
+ />
7
+ </svg>
@@ -0,0 +1,7 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
2
+ <title>star</title>
3
+ <path
4
+ fill="#FCB700"
5
+ d="M12,17.27L18.18,21L16.54,13.97L22,9.24L14.81,8.62L12,2L9.19,8.62L2,9.24L7.45,13.97L5.82,21L12,17.27Z"
6
+ />
7
+ </svg>
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import { alertSvg, checkCircleSvg, closeCircleSvg, informationSvg } from '..';
2
+ import { alertSvg, checkCircleSvg, closeCircleSvg, Img, informationSvg } from '..';
3
3
  import { alert } from '../alert';
4
4
 
5
5
  let popover: HTMLButtonElement | undefined = $state(undefined);
@@ -43,6 +43,6 @@
43
43
  class="alert rounded-3xl {color} fixed top-4 right-4 left-4 {$alert.show ? 'flex' : 'hidden'}"
44
44
  onclick={() => alert.close()}
45
45
  >
46
- <img src={icon} alt="アラート" class="size-6" />
46
+ <Img src={icon} alt="アラート" class="size-6" />
47
47
  {$alert.message}
48
48
  </button>
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import { fileTreeOutlineSvg, type BreadcrumbsItem } from '..';
2
+ import { fileTreeOutlineSvg, Img, type BreadcrumbsItem } from '..';
3
3
 
4
4
  let {
5
5
  items,
@@ -10,9 +10,9 @@
10
10
  } = $props();
11
11
  </script>
12
12
 
13
- <nav class="breadcrumbs p-0 text-sm {className}">
13
+ <nav class="breadcrumbs p-0 text-xs text-base-content/60 {className}">
14
14
  <ul class="flex-wrap items-center">
15
- <img src={fileTreeOutlineSvg} alt="パンくずリスト" class="mr-2 size-4" />
15
+ <Img src={fileTreeOutlineSvg} alt="パンくずリスト" class="mr-2 size-4" />
16
16
  {#each items as item}
17
17
  <li class={item.href ? 'shrink-0' : 'min-w-0'}>
18
18
  {#if item.href}
@@ -1,40 +1,25 @@
1
1
  <script lang="ts">
2
- import { calendarMonthGraySvg, noImageSvg, StarGraySvg } from '..';
2
+ import { calendarMonthGraySvg, Img } from '..';
3
3
  import type { ContentCasual } from '../types';
4
4
 
5
- let { content }: { content: ContentCasual } = $props();
6
-
7
- const onErrorImage = (e: Event): void => {
8
- const target = e.currentTarget as HTMLImageElement;
9
- target.src = noImageSvg;
10
- target.onerror = null;
11
- };
5
+ let { content, searchParams = '' }: { content: ContentCasual; searchParams?: string } = $props();
12
6
  </script>
13
7
 
14
- <a class="card w-full rounded-3xl card-sm" href="/contents/{content.id}">
8
+ <a class="card w-full rounded-3xl card-sm" href="/contents/{content.id}{searchParams}">
15
9
  <figure class="aspect-3/2 rounded-3xl">
16
- <img
17
- src={content.thumbnail}
18
- alt={content.name}
19
- class="h-full w-full object-cover"
20
- onerror={onErrorImage}
21
- />
10
+ <Img src={content.thumbnail} alt={content.name} class="h-full w-full object-cover" />
22
11
  </figure>
23
12
  <div class="card-body gap-0.5 px-1 py-2">
24
13
  {#if content.schedules.length > 0}
25
14
  <p class="flex min-w-0 items-center gap-0.5 text-base-content/60">
26
- <img src={calendarMonthGraySvg} alt="スケジュール" class="size-3 shrink-0" />
15
+ <Img src={calendarMonthGraySvg} alt="スケジュール" class="size-3 shrink-0" />
27
16
  <span class="block min-w-0 truncate">{content.schedules.join(',')}</span>
28
17
  </p>
29
18
  {/if}
30
19
  <div class="flex">
31
- <h2 class="card-title min-w-0">
32
- <span class="block min-w-0 truncate">{content.name}</span>
20
+ <h2 class="card-title min-w-0 truncate">
21
+ {content.name}
33
22
  </h2>
34
- <p class="flex shrink-0 items-center justify-end gap-0.5 text-base-content/60">
35
- <img src={StarGraySvg} alt="評価" class="size-3 shrink-0" />
36
- {content.rate_average}
37
- </p>
38
23
  </div>
39
24
  {#if content.parents}
40
25
  <p class="flex items-center gap-1 text-base-content/60">
@@ -1,6 +1,7 @@
1
1
  import type { ContentCasual } from '../types';
2
2
  type $$ComponentProps = {
3
3
  content: ContentCasual;
4
+ searchParams?: string;
4
5
  };
5
6
  declare const Card: import("svelte").Component<$$ComponentProps, {}, "">;
6
7
  type Card = ReturnType<typeof Card>;
@@ -0,0 +1,17 @@
1
+ <script lang="ts">
2
+ import { Img, type ContentGeo } from '..';
3
+
4
+ let { content, searchParams = '' }: { content: ContentGeo; searchParams?: string } = $props();
5
+ </script>
6
+
7
+ <a
8
+ class="card fixed right-22 bottom-4 left-4 z-20 mx-auto card-side h-32 max-w-sm rounded-3xl bg-base-100 shadow-sm card-sm sm:right-4"
9
+ href="/contents/{content.id}{searchParams}"
10
+ >
11
+ <figure class="aspect-1">
12
+ <Img src={content.thumbnail} alt={content.name} class="h-full w-full object-cover" />
13
+ </figure>
14
+ <div class="card-body justify-center">
15
+ <h2 class="card-title">{content.name}</h2>
16
+ </div>
17
+ </a>
@@ -0,0 +1,8 @@
1
+ import { type ContentGeo } from '..';
2
+ type $$ComponentProps = {
3
+ content: ContentGeo;
4
+ searchParams?: string;
5
+ };
6
+ declare const CardSide: import("svelte").Component<$$ComponentProps, {}, "">;
7
+ type CardSide = ReturnType<typeof CardSide>;
8
+ export default CardSide;
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import { Btn, closeSvg, type FilterItem } from '..';
2
+ import { Btn, closeSvg, Img, type FilterItem } from '..';
3
3
 
4
4
  let {
5
5
  value = $bindable(),
@@ -16,7 +16,7 @@
16
16
  <p class="text-sm text-base-content/60">絞り込み:</p>
17
17
  {#each items as item}
18
18
  <input
19
- class="btn m-0.5 rounded-full btn-sm"
19
+ class="btn m-0.5 rounded-full btn-outline btn-sm"
20
20
  type="checkbox"
21
21
  name="frameworks"
22
22
  aria-label={item.label}
@@ -24,7 +24,7 @@
24
24
  bind:group={value}
25
25
  />
26
26
  {/each}
27
- <Btn class="m-0.5 btn-circle btn-sm" type="reset">
28
- <img src={closeSvg} alt="クリア" class="size-4" />
27
+ <Btn class="m-0.5 btn-circle btn-outline btn-sm" type="reset">
28
+ <Img src={closeSvg} alt="クリア" class="size-4" />
29
29
  </Btn>
30
30
  </form>
@@ -0,0 +1,13 @@
1
+ <script lang="ts">
2
+ import { noImageSvg } from '..';
3
+
4
+ let { src, alt, class: className }: { src: string; alt: string; class?: string } = $props();
5
+
6
+ const onerror = (e: Event): void => {
7
+ const target = e.currentTarget as HTMLImageElement;
8
+ target.src = noImageSvg;
9
+ target.onerror = null;
10
+ };
11
+ </script>
12
+
13
+ <img {src} {alt} class={className} {onerror} />
@@ -0,0 +1,8 @@
1
+ type $$ComponentProps = {
2
+ src: string;
3
+ alt: string;
4
+ class?: string;
5
+ };
6
+ declare const Img: import("svelte").Component<$$ComponentProps, {}, "">;
7
+ type Img = ReturnType<typeof Img>;
8
+ export default Img;
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import type { InputType } from '..';
2
+ import { Img, type InputType } from '..';
3
3
 
4
4
  let {
5
5
  type,
@@ -44,7 +44,7 @@
44
44
  {/if}
45
45
  <label class="input w-full rounded-full {icon ? '' : 'px-5'}">
46
46
  {#if icon}
47
- <img src={icon} class="size-4" alt="アイコン" />
47
+ <Img src={icon} class="size-4" alt="アイコン" />
48
48
  {/if}
49
49
  <input
50
50
  {type}
@@ -1,4 +1,4 @@
1
- import type { InputType } from '..';
1
+ import { type InputType } from '..';
2
2
  type $$ComponentProps = {
3
3
  type: InputType;
4
4
  required?: boolean;
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import { Btn, closeSvg } from '..';
2
+ import { Btn, closeSvg, Img } from '..';
3
3
 
4
4
  let {
5
5
  value = $bindable(),
@@ -14,7 +14,7 @@
14
14
  <div class="modal-action">
15
15
  <form method="dialog">
16
16
  <Btn class="absolute top-2 right-2 btn-circle btn-ghost btn-sm" type="submit">
17
- <img src={closeSvg} alt="閉じる" class="size-6" />
17
+ <Img src={closeSvg} alt="閉じる" class="size-6" />
18
18
  </Btn>
19
19
  </form>
20
20
  </div>
package/dist/index.d.ts CHANGED
@@ -7,8 +7,10 @@ export { default as Alert } from './components/Alert.svelte';
7
7
  export { default as Breadcrumbs } from './components/Breadcrumbs.svelte';
8
8
  export { default as Filter } from './components/Filter.svelte';
9
9
  export { default as Card } from './components/Card.svelte';
10
+ export { default as CardSide } from './components/CardSide.svelte';
10
11
  export { default as Header } from './components/Header.svelte';
11
12
  export { default as Pagination } from './components/Pagination.svelte';
13
+ export { default as Img } from './components/Img.svelte';
12
14
  export { default as accountSvg } from './assets/account.svg';
13
15
  export { default as alertSvg } from './assets/alert.svg';
14
16
  export { default as calendarMonthSvg } from './assets/calendar-month.svg';
@@ -28,6 +30,7 @@ export { default as faviconSvg } from './assets/favicon.svg';
28
30
  export { default as fileTreeOutlineSvg } from './assets/file-tree-outline.svg';
29
31
  export { default as forestOutlineSvg } from './assets/forest-outline.svg';
30
32
  export { default as heartOutlineSvg } from './assets/heart-outline.svg';
33
+ export { default as heartOutlineRedSvg } from './assets/heart-outline-red.svg';
31
34
  export { default as homeOutlineSvg } from './assets/home-outline.svg';
32
35
  export { default as humanMaleFemaleSvg } from './assets/human-male-female.svg';
33
36
  export { default as informationSvg } from './assets/information.svg';
@@ -47,6 +50,7 @@ export { default as refreshSvg } from './assets/refresh.svg';
47
50
  export { default as shapeOutlineSvg } from './assets/shape-outline.svg';
48
51
  export { default as StarSvg } from './assets/star.svg';
49
52
  export { default as StarGraySvg } from './assets/star-gray.svg';
53
+ export { default as StarYellowSvg } from './assets/star-yellow.svg';
50
54
  export { default as 北海道 } from './assets/prefs/北海道.svg';
51
55
  export { default as 青森県 } from './assets/prefs/青森県.svg';
52
56
  export { default as 岩手県 } from './assets/prefs/岩手県.svg';
package/dist/index.js CHANGED
@@ -8,8 +8,10 @@ export { default as Alert } from './components/Alert.svelte';
8
8
  export { default as Breadcrumbs } from './components/Breadcrumbs.svelte';
9
9
  export { default as Filter } from './components/Filter.svelte';
10
10
  export { default as Card } from './components/Card.svelte';
11
+ export { default as CardSide } from './components/CardSide.svelte';
11
12
  export { default as Header } from './components/Header.svelte';
12
13
  export { default as Pagination } from './components/Pagination.svelte';
14
+ export { default as Img } from './components/Img.svelte';
13
15
  export { default as accountSvg } from './assets/account.svg';
14
16
  export { default as alertSvg } from './assets/alert.svg';
15
17
  export { default as calendarMonthSvg } from './assets/calendar-month.svg';
@@ -29,6 +31,7 @@ export { default as faviconSvg } from './assets/favicon.svg';
29
31
  export { default as fileTreeOutlineSvg } from './assets/file-tree-outline.svg';
30
32
  export { default as forestOutlineSvg } from './assets/forest-outline.svg';
31
33
  export { default as heartOutlineSvg } from './assets/heart-outline.svg';
34
+ export { default as heartOutlineRedSvg } from './assets/heart-outline-red.svg';
32
35
  export { default as homeOutlineSvg } from './assets/home-outline.svg';
33
36
  export { default as humanMaleFemaleSvg } from './assets/human-male-female.svg';
34
37
  export { default as informationSvg } from './assets/information.svg';
@@ -48,6 +51,7 @@ export { default as refreshSvg } from './assets/refresh.svg';
48
51
  export { default as shapeOutlineSvg } from './assets/shape-outline.svg';
49
52
  export { default as StarSvg } from './assets/star.svg';
50
53
  export { default as StarGraySvg } from './assets/star-gray.svg';
54
+ export { default as StarYellowSvg } from './assets/star-yellow.svg';
51
55
  export { default as 北海道 } from './assets/prefs/北海道.svg';
52
56
  export { default as 青森県 } from './assets/prefs/青森県.svg';
53
57
  export { default as 岩手県 } from './assets/prefs/岩手県.svg';
@@ -24,6 +24,7 @@ export type ModalsContext = {
24
24
  openSignin: () => void;
25
25
  openSignup: () => void;
26
26
  openPassword: () => void;
27
+ openSearch: () => void;
27
28
  };
28
29
  export interface Data<T> {
29
30
  status: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@3birds/midori-ui",
3
- "version": "0.0.39",
3
+ "version": "0.0.41",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite dev",