@3birds/midori-ui 0.0.26 → 0.0.28

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.
@@ -0,0 +1,7 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
2
+ <title>calendar-month</title>
3
+ <path
4
+ fill="#747476"
5
+ d="M9,10V12H7V10H9M13,10V12H11V10H13M17,10V12H15V10H17M19,3A2,2 0 0,1 21,5V19A2,2 0 0,1 19,21H5C3.89,21 3,20.1 3,19V5A2,2 0 0,1 5,3H6V1H8V3H16V1H18V3H19M19,19V8H5V19H19M9,14V16H7V14H9M13,14V16H11V14H13M17,14V16H15V14H17Z"
6
+ />
7
+ </svg>
@@ -0,0 +1,17 @@
1
+ <svg width="1480" height="1571" viewBox="0 0 1480 1571" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect width="1480" height="1571" fill="#F5F5F5"/>
3
+ <path d="M530.593 1068.66L498.479 1019.67V1068.66H488V998.718H497.803L529.917 1047.71V998.718H540.396V1068.66H530.593Z" fill="black"/>
4
+ <path d="M609.355 1061.57C604.623 1066.3 598.538 1069 590.763 1069C583.326 1069 577.242 1066.3 572.509 1061.57C565.749 1054.81 565.749 1047.04 565.749 1033.52C565.749 1020.01 565.749 1012.23 572.509 1005.48C577.242 1000.75 583.326 998.042 590.763 998.042C598.2 998.042 604.285 1000.75 609.355 1005.48C616.116 1012.23 616.116 1020.01 616.116 1033.52C616.116 1047.04 616.116 1054.81 609.355 1061.57ZM601.243 1011.9C598.876 1009.19 594.82 1007.5 590.763 1007.5C586.707 1007.5 582.989 1009.19 580.284 1011.9C576.904 1015.61 576.228 1019.67 576.228 1033.52C576.228 1047.37 576.904 1051.43 580.284 1055.15C582.65 1057.85 586.707 1059.54 590.763 1059.54C594.82 1059.54 598.538 1057.85 601.243 1055.15C604.623 1051.43 605.299 1047.37 605.299 1033.52C605.299 1019.67 604.623 1015.61 601.243 1011.9Z" fill="black"/>
5
+ <path d="M674.597 1068.66V998.718H685.076V1068.66H674.597Z" fill="black"/>
6
+ <path d="M764.515 1068.66V1022.03L748.289 1056.16H740.514L723.95 1022.03V1068.66H713.471V998.718H723.95L744.233 1042.31L764.177 998.718H774.656V1068.66H764.515Z" fill="black"/>
7
+ <path d="M842.94 1068.66L838.207 1054.81H810.488L805.755 1068.66H794.6L820.291 998.718H828.742L854.433 1068.66H842.94ZM824.685 1014.6L813.868 1045.69H835.503L824.685 1014.6Z" fill="black"/>
8
+ <path d="M914.603 1061.23C909.195 1066.97 902.772 1069 895.335 1069C888.237 1069 881.814 1066.3 877.081 1061.57C870.32 1054.81 870.32 1047.04 870.32 1033.52C870.32 1020.01 870.32 1012.23 877.081 1005.48C881.814 1000.75 887.899 998.042 895.335 998.042C910.209 998.042 918.66 1007.84 920.688 1019.67H909.871C908.181 1011.9 903.11 1007.5 894.997 1007.5C890.941 1007.5 887.222 1009.19 884.856 1011.9C881.476 1015.61 880.8 1019.67 880.8 1033.52C880.8 1047.37 881.476 1051.43 884.856 1055.15C887.222 1057.85 890.941 1059.2 894.997 1059.2C899.73 1059.2 903.786 1057.51 906.491 1054.13C909.195 1051.09 909.871 1047.71 909.871 1043.32V1039.27H895.673V1030.14H921.026V1040.95C921.026 1050.42 919.336 1056.16 914.603 1061.23Z" fill="black"/>
9
+ <path d="M946.379 1068.66V998.718H991V1008.18H956.858V1028.45H985.929V1037.91H956.858V1058.86H991V1068.32H946.379V1068.66Z" fill="black"/>
10
+ <path d="M932.52 517.895L526.874 923.367" stroke="black" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>
11
+ <path d="M567.439 878.09C543.438 878.09 523.832 858.492 523.832 834.501V614.194C523.832 590.204 543.438 570.606 567.439 570.606H879.109" stroke="black" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>
12
+ <path d="M920.012 570.268C944.013 570.268 963.619 589.866 963.619 613.856V834.164C963.619 858.154 944.013 877.752 920.012 877.752H620.849" stroke="black" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>
13
+ <path d="M629.976 564.862L671.554 518.571C678.315 508.772 689.808 501 702.992 501H788.177C801.361 501 812.854 508.772 819.615 518.571L854.095 564.862" stroke="black" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>
14
+ <path d="M896.687 653.39C906.022 653.39 913.589 645.826 913.589 636.495C913.589 627.165 906.022 619.601 896.687 619.601C887.353 619.601 879.786 627.165 879.786 636.495C879.786 645.826 887.353 653.39 896.687 653.39Z" fill="black"/>
15
+ <path d="M825.023 676.705C834.15 690.896 839.559 707.453 840.235 725.362C841.587 778.073 800.347 821.661 747.613 823.351C725.978 824.027 705.696 817.269 689.47 805.443" stroke="black" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>
16
+ <path d="M665.47 784.493C653.638 768.612 646.878 749.014 646.878 727.727C646.878 675.016 689.47 632.441 742.204 632.441C761.134 632.441 778.712 637.847 793.586 647.308" stroke="black" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>
17
+ </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="#747476"
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>
@@ -0,0 +1,45 @@
1
+ <script lang="ts">
2
+ import { calendarMonthGraySvg, noImageSvg, StarGraySvg } from '..';
3
+ import type { ContentCasual } from '../types';
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
+ };
12
+ </script>
13
+
14
+ <a class="card w-full rounded-3xl card-sm" href="/contents/{content.id}">
15
+ <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
+ />
22
+ </figure>
23
+ <div class="card-body gap-0.5 px-1 py-2">
24
+ {#if content.schedules.length > 0}
25
+ <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" />
27
+ <span class="block min-w-0 truncate">{content.schedules.join(',')}</span>
28
+ </p>
29
+ {/if}
30
+ <div class="flex">
31
+ <h2 class="card-title min-w-0">
32
+ <span class="block min-w-0 truncate">{content.name}</span>
33
+ </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
+ </div>
39
+ {#if content.parents}
40
+ <p class="flex items-center gap-1 text-base-content/60">
41
+ <span class="block min-w-0 truncate">{content.parents}</span>
42
+ </p>
43
+ {/if}
44
+ </div>
45
+ </a>
@@ -0,0 +1,7 @@
1
+ import type { ContentCasual } from '../types';
2
+ type $$ComponentProps = {
3
+ content: ContentCasual;
4
+ };
5
+ declare const Crad: import("svelte").Component<$$ComponentProps, {}, "">;
6
+ type Crad = ReturnType<typeof Crad>;
7
+ export default Crad;
@@ -1,14 +1,16 @@
1
1
  <script lang="ts">
2
2
  let {
3
+ class: className,
3
4
  dial,
4
5
  children
5
6
  }: {
7
+ class?: string;
6
8
  dial: import('svelte').Snippet;
7
9
  children: import('svelte').Snippet;
8
10
  } = $props();
9
11
  </script>
10
12
 
11
- <div class="fab">
13
+ <div class="fab {className}">
12
14
  <div tabindex="0" role="button" class="btn btn-circle btn-primary btn-xl">
13
15
  {@render dial()}
14
16
  </div>
@@ -1,4 +1,5 @@
1
1
  type $$ComponentProps = {
2
+ class?: string;
2
3
  dial: import('svelte').Snippet;
3
4
  children: import('svelte').Snippet;
4
5
  };
@@ -0,0 +1,17 @@
1
+ <script lang="ts">
2
+ import { Btn } from '@3birds/midori-ui';
3
+
4
+ let { class: className, children }: { class?: string; children: import('svelte').Snippet } =
5
+ $props();
6
+ </script>
7
+
8
+ <header class="navbar top-0 hidden px-4 py-0 shadow-sm sm:flex {className}">
9
+ <div class="flex-1">
10
+ <Btn class="flex w-fit items-center btn-ghost text-2xl font-bold text-primary" href="/"
11
+ >Midori</Btn
12
+ >
13
+ </div>
14
+ <div class="flex gap-2">
15
+ {@render children()}
16
+ </div>
17
+ </header>
@@ -0,0 +1,7 @@
1
+ type $$ComponentProps = {
2
+ class?: string;
3
+ children: import('svelte').Snippet;
4
+ };
5
+ declare const Header: import("svelte").Component<$$ComponentProps, {}, "">;
6
+ type Header = ReturnType<typeof Header>;
7
+ export default Header;
@@ -3,11 +3,12 @@
3
3
 
4
4
  let {
5
5
  value = $bindable(),
6
+ class: className,
6
7
  children
7
- }: { value?: HTMLDialogElement; children: import('svelte').Snippet } = $props();
8
+ }: { value?: HTMLDialogElement; class?: string; children: import('svelte').Snippet } = $props();
8
9
  </script>
9
10
 
10
- <dialog bind:this={value} class="modal modal-bottom sm:modal-middle">
11
+ <dialog bind:this={value} class="modal modal-bottom sm:modal-middle {className}">
11
12
  <div class="modal-box rounded-t-3xl sm:rounded-3xl">
12
13
  {@render children()}
13
14
  <div class="modal-action">
@@ -1,5 +1,6 @@
1
1
  type $$ComponentProps = {
2
2
  value?: HTMLDialogElement;
3
+ class?: string;
3
4
  children: import('svelte').Snippet;
4
5
  };
5
6
  declare const Modal: import("svelte").Component<$$ComponentProps, {}, "value">;
@@ -0,0 +1,27 @@
1
+ <script lang="ts">
2
+ import { Btn } from '@3birds/midori-ui';
3
+
4
+ let {
5
+ value = $bindable(),
6
+ per,
7
+ deadend,
8
+ class: className
9
+ }: { value: number; per: number; deadend: boolean; class?: string } = $props();
10
+
11
+ const onClickPrev = () => {
12
+ value--;
13
+ };
14
+
15
+ const onClickNext = () => {
16
+ value++;
17
+ };
18
+ </script>
19
+
20
+ <div class="join col-span-8 col-start-3 grid grid-cols-2 {className}">
21
+ <Btn class="join-item rounded-r-none btn-outline" disabled={value === 1} onclick={onClickPrev}
22
+ >前の{per}件</Btn
23
+ >
24
+ <Btn class="join-item rounded-l-none btn-outline" disabled={deadend} onclick={onClickNext}
25
+ >次の{per}件</Btn
26
+ >
27
+ </div>
@@ -0,0 +1,9 @@
1
+ type $$ComponentProps = {
2
+ value: number;
3
+ per: number;
4
+ deadend: boolean;
5
+ class?: string;
6
+ };
7
+ declare const Pagination: import("svelte").Component<$$ComponentProps, {}, "value">;
8
+ type Pagination = ReturnType<typeof Pagination>;
9
+ export default Pagination;
package/dist/index.d.ts CHANGED
@@ -9,6 +9,7 @@ export { default as Filter } from './components/Filter.svelte';
9
9
  export { default as accountSvg } from './assets/account.svg';
10
10
  export { default as alertSvg } from './assets/alert.svg';
11
11
  export { default as calendarMonthSvg } from './assets/calendar-month.svg';
12
+ export { default as calendarMonthGraySvg } from './assets/calendar-month^gray.svg';
12
13
  export { default as checkCircleSvg } from './assets/check-circle.svg';
13
14
  export { default as clipboardTextOutlineSvg } from './assets/clipboard-text-outline.svg';
14
15
  export { default as closeCircleSvg } from './assets/close-circle.svg';
@@ -36,13 +37,16 @@ export { default as mapOutlineSvg } from './assets/map-outline.svg';
36
37
  export { default as menuSvg } from './assets/menu.svg';
37
38
  export { default as menuWhiteSvg } from './assets/menu-white.svg';
38
39
  export { default as messageStarOutlineSvg } from './assets/message-star-outline.svg';
40
+ export { default as noImageSvg } from './assets/no-image.svg';
39
41
  export { default as pencilSvg } from './assets/pencil.svg';
40
42
  export { default as refreshSvg } from './assets/refresh.svg';
41
43
  export { default as shapeOutlineSvg } from './assets/shape-outline.svg';
42
44
  export { default as StarSvg } from './assets/star.svg';
45
+ export { default as StarGraySvg } from './assets/star-gray.svg';
43
46
  export { alert } from './alert';
44
47
  export { authState } from './auth.svelte.ts';
45
48
  export * as firebase from './auth';
46
49
  export { auth } from './firebase';
50
+ export * as modal from './modals-context.ts';
47
51
  export { PRIORITIES } from './constants/index.ts';
48
52
  export type { BtnType, InputType, AlertType, AlertState, BreadcrumbsItem, FilterItem, Priority, PriorityChoice } from './types/index.ts';
package/dist/index.js CHANGED
@@ -10,6 +10,7 @@ export { default as Filter } from './components/Filter.svelte';
10
10
  export { default as accountSvg } from './assets/account.svg';
11
11
  export { default as alertSvg } from './assets/alert.svg';
12
12
  export { default as calendarMonthSvg } from './assets/calendar-month.svg';
13
+ export { default as calendarMonthGraySvg } from './assets/calendar-month^gray.svg';
13
14
  export { default as checkCircleSvg } from './assets/check-circle.svg';
14
15
  export { default as clipboardTextOutlineSvg } from './assets/clipboard-text-outline.svg';
15
16
  export { default as closeCircleSvg } from './assets/close-circle.svg';
@@ -37,12 +38,15 @@ export { default as mapOutlineSvg } from './assets/map-outline.svg';
37
38
  export { default as menuSvg } from './assets/menu.svg';
38
39
  export { default as menuWhiteSvg } from './assets/menu-white.svg';
39
40
  export { default as messageStarOutlineSvg } from './assets/message-star-outline.svg';
41
+ export { default as noImageSvg } from './assets/no-image.svg';
40
42
  export { default as pencilSvg } from './assets/pencil.svg';
41
43
  export { default as refreshSvg } from './assets/refresh.svg';
42
44
  export { default as shapeOutlineSvg } from './assets/shape-outline.svg';
43
45
  export { default as StarSvg } from './assets/star.svg';
46
+ export { default as StarGraySvg } from './assets/star-gray.svg';
44
47
  export { alert } from './alert';
45
48
  export { authState } from "./auth.svelte.js";
46
49
  export * as firebase from './auth';
47
50
  export { auth } from './firebase';
51
+ export * as modal from "./modals-context.js";
48
52
  export { PRIORITIES } from "./constants/index.js";
@@ -0,0 +1,7 @@
1
+ export type ModalsContext = {
2
+ openSignin: () => void;
3
+ openSignup: () => void;
4
+ openPassword: () => void;
5
+ };
6
+ export declare function setModalsContext(value: ModalsContext): void;
7
+ export declare function getModalsContext(): ModalsContext;
@@ -0,0 +1,8 @@
1
+ import { getContext, setContext } from 'svelte';
2
+ const MODALS_KEY = Symbol('modals');
3
+ export function setModalsContext(value) {
4
+ setContext(MODALS_KEY, value);
5
+ }
6
+ export function getModalsContext() {
7
+ return getContext(MODALS_KEY);
8
+ }
@@ -20,3 +20,14 @@ export interface PriorityChoice {
20
20
  label: string;
21
21
  value: Priority;
22
22
  }
23
+ export interface ContentCasual {
24
+ id: string;
25
+ name: string;
26
+ latitude: number;
27
+ longitude: number;
28
+ address: string;
29
+ thumbnail: string;
30
+ parents: string;
31
+ rate_average: number;
32
+ schedules: string[];
33
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@3birds/midori-ui",
3
- "version": "0.0.26",
3
+ "version": "0.0.28",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite dev",