cclkit4svelte 2.0.6 → 3.0.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.
- package/dist/Accordion.svelte +40 -29
- package/dist/Accordion.svelte.d.ts +31 -22
- package/dist/AccordionItem.svelte +120 -87
- package/dist/AccordionItem.svelte.d.ts +43 -34
- package/dist/Alert.svelte +111 -82
- package/dist/Alert.svelte.d.ts +38 -36
- package/dist/Badge.svelte +84 -0
- package/dist/Badge.svelte.d.ts +34 -0
- package/dist/BookCard.svelte +127 -88
- package/dist/BookCard.svelte.d.ts +47 -45
- package/dist/Breadcrumb.svelte +91 -0
- package/dist/Breadcrumb.svelte.d.ts +37 -0
- package/dist/Button.svelte +72 -35
- package/dist/Button.svelte.d.ts +33 -31
- package/dist/Card.svelte +110 -75
- package/dist/Card.svelte.d.ts +38 -36
- package/dist/Carousel.svelte +91 -66
- package/dist/Carousel.svelte.d.ts +26 -24
- package/dist/ChangeHistory.svelte +188 -150
- package/dist/ChangeHistory.svelte.d.ts +29 -27
- package/dist/Checkbox.svelte +120 -89
- package/dist/Checkbox.svelte.d.ts +41 -39
- package/dist/CommonHeader.svelte +51 -24
- package/dist/CommonHeader.svelte.d.ts +38 -36
- package/dist/DatePicker.svelte +239 -188
- package/dist/DatePicker.svelte.d.ts +40 -38
- package/dist/Dialog.svelte +224 -0
- package/dist/Dialog.svelte.d.ts +50 -0
- package/dist/Drawer.svelte +158 -0
- package/dist/Drawer.svelte.d.ts +40 -0
- package/dist/Footer.svelte +32 -16
- package/dist/Footer.svelte.d.ts +21 -19
- package/dist/FormGroup.svelte +67 -43
- package/dist/FormGroup.svelte.d.ts +46 -37
- package/dist/Header.svelte +108 -98
- package/dist/Header.svelte.d.ts +25 -23
- package/dist/Input.svelte +154 -99
- package/dist/Input.svelte.d.ts +62 -60
- package/dist/Pagination.svelte +222 -0
- package/dist/Pagination.svelte.d.ts +35 -0
- package/dist/ProgressBar.svelte +49 -44
- package/dist/ProgressBar.svelte.d.ts +25 -23
- package/dist/RadioButton.svelte +92 -62
- package/dist/RadioButton.svelte.d.ts +40 -38
- package/dist/Select.svelte +94 -53
- package/dist/Select.svelte.d.ts +49 -47
- package/dist/ServiceCard.svelte +71 -64
- package/dist/ServiceCard.svelte.d.ts +27 -25
- package/dist/Skeleton.svelte +96 -0
- package/dist/Skeleton.svelte.d.ts +24 -0
- package/dist/SlideMenu.svelte +157 -0
- package/dist/SlideMenu.svelte.d.ts +42 -0
- package/dist/Spinner.svelte +25 -23
- package/dist/Spinner.svelte.d.ts +20 -18
- package/dist/TabPanel.svelte +42 -21
- package/dist/TabPanel.svelte.d.ts +40 -31
- package/dist/Table.svelte +114 -73
- package/dist/Table.svelte.d.ts +33 -31
- package/dist/Tabs.svelte +78 -72
- package/dist/Tabs.svelte.d.ts +18 -16
- package/dist/Textarea.svelte +101 -52
- package/dist/Textarea.svelte.d.ts +57 -55
- package/dist/Thumbnail.svelte +33 -15
- package/dist/Thumbnail.svelte.d.ts +34 -32
- package/dist/Toaster.svelte +144 -0
- package/dist/Toaster.svelte.d.ts +26 -0
- package/dist/Toggle.svelte +85 -61
- package/dist/Toggle.svelte.d.ts +36 -34
- package/dist/Tooltip.svelte +126 -122
- package/dist/Tooltip.svelte.d.ts +30 -21
- package/dist/const/colorMap.d.ts +5 -0
- package/dist/const/colorMap.js +21 -0
- package/dist/const/variables.css +21 -21
- package/dist/index.d.ts +10 -0
- package/dist/index.js +9 -0
- package/dist/toast.d.ts +29 -0
- package/dist/toast.js +66 -0
- package/dist/types/breadcrumb.d.ts +4 -0
- package/dist/types/breadcrumb.js +1 -0
- package/dist/types/slide-menu.d.ts +5 -0
- package/dist/types/slide-menu.js +1 -0
- package/package.json +87 -87
package/dist/Checkbox.svelte
CHANGED
|
@@ -1,97 +1,128 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { CCLVividColor } from './const/config';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* チェックボックスのラベル
|
|
6
|
+
* @default ''
|
|
7
|
+
* @type string
|
|
8
|
+
*/
|
|
9
|
+
export let label: string = '';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* チェックボックスの状態
|
|
13
|
+
* @default false
|
|
14
|
+
* @type boolean
|
|
15
|
+
*/
|
|
16
|
+
export let checked: boolean = false;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* チェックボックスの色
|
|
20
|
+
* @default '--soda-blue'
|
|
21
|
+
* @type string
|
|
22
|
+
*/
|
|
23
|
+
export let color: string = CCLVividColor.SODA_BLUE;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 非活性状態
|
|
27
|
+
* @default false
|
|
28
|
+
* @type boolean
|
|
29
|
+
*/
|
|
30
|
+
export let disabled: boolean = false;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* 状態が変更されたときのイベントハンドラ
|
|
34
|
+
* @type {() => void}
|
|
35
|
+
*/
|
|
36
|
+
export let onChange: () => void = () => {};
|
|
37
|
+
|
|
38
|
+
const checkMarkColor = 'white' as const;
|
|
39
|
+
|
|
40
|
+
function handleChange(event: Event) {
|
|
41
|
+
if (disabled) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
const target = event.target as HTMLInputElement;
|
|
45
|
+
checked = target.checked;
|
|
46
|
+
onChange();
|
|
12
47
|
}
|
|
13
|
-
const target = event.target;
|
|
14
|
-
checked = target.checked;
|
|
15
|
-
onChange();
|
|
16
|
-
}
|
|
17
48
|
</script>
|
|
18
49
|
|
|
19
50
|
<label class="checkboxWrapper" class:disabled>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
<input
|
|
52
|
+
type="checkbox"
|
|
53
|
+
bind:checked
|
|
54
|
+
on:change={handleChange}
|
|
55
|
+
{disabled}
|
|
56
|
+
aria-label={label}
|
|
57
|
+
name={label}
|
|
58
|
+
/>
|
|
59
|
+
<span
|
|
60
|
+
class="customCheckbox"
|
|
61
|
+
style="--bg-color: var({color}); --check-mark-color: {checkMarkColor};"
|
|
62
|
+
>
|
|
63
|
+
{#if checked}
|
|
64
|
+
<svg
|
|
65
|
+
class="checkMark"
|
|
66
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
67
|
+
width="16"
|
|
68
|
+
height="16"
|
|
69
|
+
viewBox="0 0 24 24"
|
|
70
|
+
fill="none"
|
|
71
|
+
stroke="currentColor"
|
|
72
|
+
stroke-width="3"
|
|
73
|
+
stroke-linecap="round"
|
|
74
|
+
stroke-linejoin="round"
|
|
75
|
+
>
|
|
76
|
+
<polyline points="20 6 9 17 4 12" />
|
|
77
|
+
</svg>
|
|
78
|
+
{/if}
|
|
79
|
+
</span>
|
|
80
|
+
{#if label}
|
|
81
|
+
<span class="label">{label}</span>
|
|
82
|
+
{/if}
|
|
52
83
|
</label>
|
|
53
84
|
|
|
54
85
|
<style>
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
86
|
+
.checkboxWrapper {
|
|
87
|
+
display: flex;
|
|
88
|
+
align-items: center;
|
|
89
|
+
cursor: pointer;
|
|
90
|
+
position: relative;
|
|
91
|
+
}
|
|
92
|
+
.checkboxWrapper.disabled {
|
|
93
|
+
cursor: not-allowed;
|
|
94
|
+
opacity: 0.6;
|
|
95
|
+
}
|
|
96
|
+
.checkboxWrapper input[type='checkbox'] {
|
|
97
|
+
border: 0;
|
|
98
|
+
clip: rect(0 0 0 0);
|
|
99
|
+
clip-path: inset(50%);
|
|
100
|
+
height: 1px;
|
|
101
|
+
margin: -1px;
|
|
102
|
+
overflow: hidden;
|
|
103
|
+
padding: 0;
|
|
104
|
+
position: absolute;
|
|
105
|
+
white-space: nowrap;
|
|
106
|
+
width: 1px;
|
|
107
|
+
}
|
|
108
|
+
.customCheckbox {
|
|
109
|
+
width: 20px;
|
|
110
|
+
height: 20px;
|
|
111
|
+
border: 2px solid var(--bg-color);
|
|
112
|
+
border-radius: 4px;
|
|
113
|
+
display: flex;
|
|
114
|
+
justify-content: center;
|
|
115
|
+
align-items: center;
|
|
116
|
+
transition: background-color 0.2s;
|
|
117
|
+
}
|
|
118
|
+
.checkboxWrapper input[type='checkbox']:checked + .customCheckbox {
|
|
119
|
+
background-color: var(--bg-color);
|
|
120
|
+
}
|
|
121
|
+
.checkMark {
|
|
122
|
+
stroke: var(--check-mark-color);
|
|
123
|
+
}
|
|
124
|
+
.label {
|
|
125
|
+
margin-left: 8px;
|
|
126
|
+
font-size: 16px;
|
|
127
|
+
}
|
|
97
128
|
</style>
|
|
@@ -1,41 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
* @default false
|
|
12
|
-
* @type boolean
|
|
13
|
-
*/ checked?: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* チェックボックスの色
|
|
16
|
-
* @default '--soda-blue'
|
|
17
|
-
* @type string
|
|
18
|
-
*/ color?: string;
|
|
19
|
-
/**
|
|
20
|
-
* 非活性状態
|
|
21
|
-
* @default false
|
|
22
|
-
* @type boolean
|
|
23
|
-
*/ disabled?: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* 状態が変更されたときのイベントハンドラ
|
|
26
|
-
* @type {() => void}
|
|
27
|
-
*/ onChange?: () => void;
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: Props & {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
28
11
|
};
|
|
29
|
-
|
|
30
|
-
[evt: string]: CustomEvent<any>;
|
|
31
|
-
};
|
|
32
|
-
slots: {};
|
|
33
|
-
exports?: {} | undefined;
|
|
34
|
-
bindings?: string | undefined;
|
|
35
|
-
};
|
|
36
|
-
export type CheckboxProps = typeof __propDef.props;
|
|
37
|
-
export type CheckboxEvents = typeof __propDef.events;
|
|
38
|
-
export type CheckboxSlots = typeof __propDef.slots;
|
|
39
|
-
export default class Checkbox extends SvelteComponent<CheckboxProps, CheckboxEvents, CheckboxSlots> {
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
40
13
|
}
|
|
41
|
-
|
|
14
|
+
declare const Checkbox: $$__sveltets_2_IsomorphicComponent<{
|
|
15
|
+
/**
|
|
16
|
+
* チェックボックスのラベル
|
|
17
|
+
* @default ''
|
|
18
|
+
* @type string
|
|
19
|
+
*/ label?: string;
|
|
20
|
+
/**
|
|
21
|
+
* チェックボックスの状態
|
|
22
|
+
* @default false
|
|
23
|
+
* @type boolean
|
|
24
|
+
*/ checked?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* チェックボックスの色
|
|
27
|
+
* @default '--soda-blue'
|
|
28
|
+
* @type string
|
|
29
|
+
*/ color?: string;
|
|
30
|
+
/**
|
|
31
|
+
* 非活性状態
|
|
32
|
+
* @default false
|
|
33
|
+
* @type boolean
|
|
34
|
+
*/ disabled?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* 状態が変更されたときのイベントハンドラ
|
|
37
|
+
* @type {() => void}
|
|
38
|
+
*/ onChange?: () => void;
|
|
39
|
+
}, {
|
|
40
|
+
[evt: string]: CustomEvent<any>;
|
|
41
|
+
}, {}, {}, string>;
|
|
42
|
+
type Checkbox = InstanceType<typeof Checkbox>;
|
|
43
|
+
export default Checkbox;
|
package/dist/CommonHeader.svelte
CHANGED
|
@@ -1,33 +1,60 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { ColorVar } from './const/config';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* ヘッダー背景色(CCLVividColor/CCLPastelColor の CSS 変数名)
|
|
6
|
+
* @default --strawberry-pink
|
|
7
|
+
*/
|
|
8
|
+
export let bgColor: ColorVar = '--strawberry-pink';
|
|
9
|
+
/**
|
|
10
|
+
* ヘッダー高さ(HeaderHeight の CSS 変数名)
|
|
11
|
+
* @default --hd-normal
|
|
12
|
+
*/
|
|
13
|
+
export let height: string = '--hd-normal';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* ヘッダーに表示するロゴ
|
|
17
|
+
* 基本的にsvg要素を読み込む
|
|
18
|
+
* @type string
|
|
19
|
+
*/
|
|
20
|
+
export let logo: string;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* ロゴの高さ
|
|
24
|
+
* @type string
|
|
25
|
+
*/
|
|
26
|
+
export let logoHeight: string;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* ロゴのリンク先
|
|
30
|
+
* @type string
|
|
31
|
+
*/
|
|
32
|
+
export let href: string;
|
|
6
33
|
</script>
|
|
7
34
|
|
|
8
35
|
<!--汎用ヘッダー-->
|
|
9
36
|
<header>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
37
|
+
<div class="wrapper" style="--bgColor: var({bgColor}); --height: var({height})">
|
|
38
|
+
{#if logo}
|
|
39
|
+
<a {href}>
|
|
40
|
+
<img style="height: {logoHeight}" src={logo} alt="SVG Image" />
|
|
41
|
+
</a>
|
|
42
|
+
{:else}
|
|
43
|
+
<p>SVGファイルが指定されていません</p>
|
|
44
|
+
{/if}
|
|
45
|
+
</div>
|
|
19
46
|
</header>
|
|
20
47
|
|
|
21
48
|
<style>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
49
|
+
.wrapper {
|
|
50
|
+
background: var(--bgColor);
|
|
51
|
+
height: var(--height);
|
|
52
|
+
display: flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
}
|
|
29
56
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
57
|
+
.a {
|
|
58
|
+
fill: #fff;
|
|
59
|
+
}
|
|
33
60
|
</style>
|
|
@@ -1,39 +1,41 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
1
|
import type { ColorVar } from './const/config';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* ヘッダーに表示するロゴ
|
|
15
|
-
* 基本的にsvg要素を読み込む
|
|
16
|
-
* @type string
|
|
17
|
-
*/ logo: string;
|
|
18
|
-
/**
|
|
19
|
-
* ロゴの高さ
|
|
20
|
-
* @type string
|
|
21
|
-
*/ logoHeight: string;
|
|
22
|
-
/**
|
|
23
|
-
* ロゴのリンク先
|
|
24
|
-
* @type string
|
|
25
|
-
*/ href: string;
|
|
2
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
3
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
|
+
$$bindings?: Bindings;
|
|
5
|
+
} & Exports;
|
|
6
|
+
(internal: unknown, props: Props & {
|
|
7
|
+
$$events?: Events;
|
|
8
|
+
$$slots?: Slots;
|
|
9
|
+
}): Exports & {
|
|
10
|
+
$set?: any;
|
|
11
|
+
$on?: any;
|
|
26
12
|
};
|
|
27
|
-
|
|
28
|
-
[evt: string]: CustomEvent<any>;
|
|
29
|
-
};
|
|
30
|
-
slots: {};
|
|
31
|
-
exports?: {} | undefined;
|
|
32
|
-
bindings?: string | undefined;
|
|
33
|
-
};
|
|
34
|
-
export type CommonHeaderProps = typeof __propDef.props;
|
|
35
|
-
export type CommonHeaderEvents = typeof __propDef.events;
|
|
36
|
-
export type CommonHeaderSlots = typeof __propDef.slots;
|
|
37
|
-
export default class CommonHeader extends SvelteComponent<CommonHeaderProps, CommonHeaderEvents, CommonHeaderSlots> {
|
|
13
|
+
z_$$bindings?: Bindings;
|
|
38
14
|
}
|
|
39
|
-
|
|
15
|
+
declare const CommonHeader: $$__sveltets_2_IsomorphicComponent<{
|
|
16
|
+
/**
|
|
17
|
+
* ヘッダー背景色(CCLVividColor/CCLPastelColor の CSS 変数名)
|
|
18
|
+
* @default --strawberry-pink
|
|
19
|
+
*/ bgColor?: ColorVar;
|
|
20
|
+
/**
|
|
21
|
+
* ヘッダー高さ(HeaderHeight の CSS 変数名)
|
|
22
|
+
* @default --hd-normal
|
|
23
|
+
*/ height?: string;
|
|
24
|
+
/**
|
|
25
|
+
* ヘッダーに表示するロゴ
|
|
26
|
+
* 基本的にsvg要素を読み込む
|
|
27
|
+
* @type string
|
|
28
|
+
*/ logo: string;
|
|
29
|
+
/**
|
|
30
|
+
* ロゴの高さ
|
|
31
|
+
* @type string
|
|
32
|
+
*/ logoHeight: string;
|
|
33
|
+
/**
|
|
34
|
+
* ロゴのリンク先
|
|
35
|
+
* @type string
|
|
36
|
+
*/ href: string;
|
|
37
|
+
}, {
|
|
38
|
+
[evt: string]: CustomEvent<any>;
|
|
39
|
+
}, {}, {}, string>;
|
|
40
|
+
type CommonHeader = InstanceType<typeof CommonHeader>;
|
|
41
|
+
export default CommonHeader;
|