@3birds/midori-ui 0.0.20 → 0.0.22
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.
- package/dist/assets/file-tree-outline.svg +1 -0
- package/dist/components/Alert.svelte +1 -1
- package/dist/components/Breadcrumbs.svelte +27 -0
- package/dist/components/Breadcrumbs.svelte.d.ts +8 -0
- package/dist/components/Btn.svelte +1 -0
- package/dist/components/Filter.svelte +31 -0
- package/dist/components/Filter.svelte.d.ts +9 -0
- package/dist/components/Input.svelte +7 -1
- package/dist/components/Input.svelte.d.ts +6 -0
- package/dist/constants/index.d.ts +2 -0
- package/dist/constants/index.js +7 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/types/index.d.ts +14 -1
- package/package.json +1 -1
|
@@ -0,0 +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,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import { alertSvg, checkCircleSvg, closeCircleSvg, informationSvg } from '..';
|
|
2
3
|
import { alert } from '../alert';
|
|
3
|
-
import { alertSvg, checkCircleSvg, closeCircleSvg, informationSvg } from '@3birds/midori-ui';
|
|
4
4
|
|
|
5
5
|
let popover: HTMLButtonElement | undefined = $state(undefined);
|
|
6
6
|
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { fileTreeOutlineSvg } from '..';
|
|
3
|
+
import type { BreadcrumbsItem } from '../types';
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
items,
|
|
7
|
+
class: className
|
|
8
|
+
}: {
|
|
9
|
+
items: BreadcrumbsItem[];
|
|
10
|
+
class?: string;
|
|
11
|
+
} = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<nav class="breadcrumbs text-sm {className}">
|
|
15
|
+
<ul class="flex-wrap items-center">
|
|
16
|
+
<img src={fileTreeOutlineSvg} alt="パンくずリスト" class="mr-2 size-4" />
|
|
17
|
+
{#each items as item}
|
|
18
|
+
<li class={item.href ? 'shrink-0' : 'min-w-0'}>
|
|
19
|
+
{#if item.href}
|
|
20
|
+
<a href={item.href}>{item.text}</a>
|
|
21
|
+
{:else}
|
|
22
|
+
<span class="block truncate hover:cursor-default hover:no-underline">{item.text}</span>
|
|
23
|
+
{/if}
|
|
24
|
+
</li>
|
|
25
|
+
{/each}
|
|
26
|
+
</ul>
|
|
27
|
+
</nav>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { BreadcrumbsItem } from '../types';
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
items: BreadcrumbsItem[];
|
|
4
|
+
class?: string;
|
|
5
|
+
};
|
|
6
|
+
declare const Breadcrumbs: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
7
|
+
type Breadcrumbs = ReturnType<typeof Breadcrumbs>;
|
|
8
|
+
export default Breadcrumbs;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Btn, closeSvg } from '..';
|
|
3
|
+
import type { FilterItem } from '../types';
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
value = $bindable(),
|
|
7
|
+
items,
|
|
8
|
+
class: className
|
|
9
|
+
}: {
|
|
10
|
+
value: any[];
|
|
11
|
+
items: FilterItem[];
|
|
12
|
+
class?: string;
|
|
13
|
+
} = $props();
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<form class="filter my-4 items-center {className}">
|
|
17
|
+
<p class="text-sm text-base-content/60">絞り込み:</p>
|
|
18
|
+
{#each items as item}
|
|
19
|
+
<input
|
|
20
|
+
class="btn m-0.5 rounded-full btn-sm"
|
|
21
|
+
type="checkbox"
|
|
22
|
+
name="frameworks"
|
|
23
|
+
aria-label={item.label}
|
|
24
|
+
value={item.value}
|
|
25
|
+
bind:group={value}
|
|
26
|
+
/>
|
|
27
|
+
{/each}
|
|
28
|
+
<Btn class="m-0.5 btn-circle btn-sm" type="reset">
|
|
29
|
+
<img src={closeSvg} alt="クリア" class="size-4" />
|
|
30
|
+
</Btn>
|
|
31
|
+
</form>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { FilterItem } from '../types';
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
value: any[];
|
|
4
|
+
items: FilterItem[];
|
|
5
|
+
class?: string;
|
|
6
|
+
};
|
|
7
|
+
declare const Filter: import("svelte").Component<$$ComponentProps, {}, "value">;
|
|
8
|
+
type Filter = ReturnType<typeof Filter>;
|
|
9
|
+
export default Filter;
|
|
@@ -15,7 +15,9 @@
|
|
|
15
15
|
icon,
|
|
16
16
|
placeholder,
|
|
17
17
|
option,
|
|
18
|
-
value = $bindable()
|
|
18
|
+
value = $bindable(),
|
|
19
|
+
oninput,
|
|
20
|
+
onchange
|
|
19
21
|
}: {
|
|
20
22
|
type: InputType;
|
|
21
23
|
required?: boolean;
|
|
@@ -31,6 +33,8 @@
|
|
|
31
33
|
placeholder?: string;
|
|
32
34
|
option?: string;
|
|
33
35
|
value: any;
|
|
36
|
+
oninput?: (e: Event & { currentTarget: EventTarget & HTMLInputElement }) => void;
|
|
37
|
+
onchange?: (e: Event & { currentTarget: EventTarget & HTMLInputElement }) => void;
|
|
34
38
|
} = $props();
|
|
35
39
|
</script>
|
|
36
40
|
|
|
@@ -54,6 +58,8 @@
|
|
|
54
58
|
{max}
|
|
55
59
|
{placeholder}
|
|
56
60
|
bind:value
|
|
61
|
+
{oninput}
|
|
62
|
+
{onchange}
|
|
57
63
|
/>
|
|
58
64
|
</label>
|
|
59
65
|
{#if option}
|
|
@@ -14,6 +14,12 @@ type $$ComponentProps = {
|
|
|
14
14
|
placeholder?: string;
|
|
15
15
|
option?: string;
|
|
16
16
|
value: any;
|
|
17
|
+
oninput?: (e: Event & {
|
|
18
|
+
currentTarget: EventTarget & HTMLInputElement;
|
|
19
|
+
}) => void;
|
|
20
|
+
onchange?: (e: Event & {
|
|
21
|
+
currentTarget: EventTarget & HTMLInputElement;
|
|
22
|
+
}) => void;
|
|
17
23
|
};
|
|
18
24
|
declare const Input: import("svelte").Component<$$ComponentProps, {}, "value">;
|
|
19
25
|
type Input = ReturnType<typeof Input>;
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ export { default as Fab } from './components/Fab.svelte';
|
|
|
4
4
|
export { default as Input } from './components/Input.svelte';
|
|
5
5
|
export { default as Modal } from './components/Modal.svelte';
|
|
6
6
|
export { default as Alert } from './components/Alert.svelte';
|
|
7
|
+
export { default as Breadcrumbs } from './components/Breadcrumbs.svelte';
|
|
8
|
+
export { default as Filter } from './components/Filter.svelte';
|
|
7
9
|
export { default as accountSvg } from './assets/account.svg';
|
|
8
10
|
export { default as alertSvg } from './assets/alert.svg';
|
|
9
11
|
export { default as calendarMonthSvg } from './assets/calendar-month.svg';
|
|
@@ -19,6 +21,7 @@ export { default as faceAgentSvg } from './assets/face-agent.svg';
|
|
|
19
21
|
export { default as faceManSvg } from './assets/face-man.svg';
|
|
20
22
|
export { default as faceManWhiteSvg } from './assets/face-man-white.svg';
|
|
21
23
|
export { default as faviconSvg } from './assets/favicon.svg';
|
|
24
|
+
export { default as fileTreeOutlineSvg } from './assets/file-tree-outline.svg';
|
|
22
25
|
export { default as forestOutlineSvg } from './assets/forest-outline.svg';
|
|
23
26
|
export { default as heartOutlineSvg } from './assets/heart-outline.svg';
|
|
24
27
|
export { default as homeOutlineSvg } from './assets/home-outline.svg';
|
package/dist/index.js
CHANGED
|
@@ -5,6 +5,8 @@ export { default as Fab } from './components/Fab.svelte';
|
|
|
5
5
|
export { default as Input } from './components/Input.svelte';
|
|
6
6
|
export { default as Modal } from './components/Modal.svelte';
|
|
7
7
|
export { default as Alert } from './components/Alert.svelte';
|
|
8
|
+
export { default as Breadcrumbs } from './components/Breadcrumbs.svelte';
|
|
9
|
+
export { default as Filter } from './components/Filter.svelte';
|
|
8
10
|
export { default as accountSvg } from './assets/account.svg';
|
|
9
11
|
export { default as alertSvg } from './assets/alert.svg';
|
|
10
12
|
export { default as calendarMonthSvg } from './assets/calendar-month.svg';
|
|
@@ -20,6 +22,7 @@ export { default as faceAgentSvg } from './assets/face-agent.svg';
|
|
|
20
22
|
export { default as faceManSvg } from './assets/face-man.svg';
|
|
21
23
|
export { default as faceManWhiteSvg } from './assets/face-man-white.svg';
|
|
22
24
|
export { default as faviconSvg } from './assets/favicon.svg';
|
|
25
|
+
export { default as fileTreeOutlineSvg } from './assets/file-tree-outline.svg';
|
|
23
26
|
export { default as forestOutlineSvg } from './assets/forest-outline.svg';
|
|
24
27
|
export { default as heartOutlineSvg } from './assets/heart-outline.svg';
|
|
25
28
|
export { default as homeOutlineSvg } from './assets/home-outline.svg';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type BtnType = 'button' | 'submit';
|
|
1
|
+
export type BtnType = 'button' | 'submit' | 'reset';
|
|
2
2
|
export type InputType = 'text' | 'email' | 'search' | 'tel' | 'url' | 'none' | 'numeric' | 'decimal' | 'password' | 'datetime-local' | 'date';
|
|
3
3
|
export type AlertType = 'info' | 'success' | 'error' | 'warning';
|
|
4
4
|
export interface AlertState {
|
|
@@ -7,3 +7,16 @@ export interface AlertState {
|
|
|
7
7
|
type: AlertType;
|
|
8
8
|
duration: number;
|
|
9
9
|
}
|
|
10
|
+
export interface BreadcrumbsItem {
|
|
11
|
+
text: string;
|
|
12
|
+
href?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface FilterItem {
|
|
15
|
+
label: string;
|
|
16
|
+
value: any;
|
|
17
|
+
}
|
|
18
|
+
export type Priority = '50' | '40' | '20' | '10' | '5';
|
|
19
|
+
export interface PriorityChoice {
|
|
20
|
+
label: string;
|
|
21
|
+
value: Priority;
|
|
22
|
+
}
|