cclkit4svelte 1.2.5 → 1.2.7
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/Card.svelte +2 -1
- package/dist/Carousel.svelte +16 -6
- package/dist/Table.svelte +15 -14
- package/dist/Table.svelte.d.ts +2 -2
- package/package.json +1 -1
package/dist/Card.svelte
CHANGED
|
@@ -23,7 +23,8 @@ function getBodyColor(borderColor2) {
|
|
|
23
23
|
return CCLPastelColor.PEACH_PINK;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
|
|
26
|
+
$:
|
|
27
|
+
bodyColor = getBodyColor(borderColor);
|
|
27
28
|
</script>
|
|
28
29
|
|
|
29
30
|
<div class="CardWrapper" style="--border-color: var({borderColor})">
|
package/dist/Carousel.svelte
CHANGED
|
@@ -3,9 +3,13 @@ export let src;
|
|
|
3
3
|
export let csWidth;
|
|
4
4
|
let currentIndex = 0;
|
|
5
5
|
const nextSlide = () => {
|
|
6
|
+
if (src.length === 0)
|
|
7
|
+
return;
|
|
6
8
|
currentIndex = (currentIndex + 1) % src.length;
|
|
7
9
|
};
|
|
8
10
|
const prevSlide = () => {
|
|
11
|
+
if (src.length === 0)
|
|
12
|
+
return;
|
|
9
13
|
currentIndex = (currentIndex - 1 + src.length) % src.length;
|
|
10
14
|
};
|
|
11
15
|
</script>
|
|
@@ -34,17 +38,23 @@ const prevSlide = () => {
|
|
|
34
38
|
transform: translateX(var(--translate-x));
|
|
35
39
|
}
|
|
36
40
|
.slide {
|
|
37
|
-
width: 100%;
|
|
38
|
-
height: 100%;
|
|
41
|
+
min-width: 100%;
|
|
39
42
|
}
|
|
40
43
|
.buttons {
|
|
41
44
|
position: absolute;
|
|
42
45
|
top: 50%;
|
|
43
|
-
width: 100%;
|
|
44
|
-
display: flex;
|
|
45
|
-
justify-content: space-between;
|
|
46
46
|
transform: translateY(-50%);
|
|
47
|
-
|
|
47
|
+
width: 100%;
|
|
48
|
+
}
|
|
49
|
+
.buttons button:first-child {
|
|
50
|
+
position: absolute;
|
|
51
|
+
left: 20px;
|
|
52
|
+
z-index: 1;
|
|
53
|
+
}
|
|
54
|
+
.buttons button:last-child {
|
|
55
|
+
position: absolute;
|
|
56
|
+
right: 20px;
|
|
57
|
+
z-index: 1;
|
|
48
58
|
}
|
|
49
59
|
button {
|
|
50
60
|
background: white;
|
package/dist/Table.svelte
CHANGED
|
@@ -22,7 +22,8 @@ function getBodyColor(tableColor2) {
|
|
|
22
22
|
return CCLPastelColor.PEACH_PINK;
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
$:
|
|
26
|
+
bodyColor = getBodyColor(tableColor);
|
|
26
27
|
</script>
|
|
27
28
|
|
|
28
29
|
<!--汎用テーブル-->
|
|
@@ -30,20 +31,20 @@ bodyColor = getBodyColor(tableColor);
|
|
|
30
31
|
<table>
|
|
31
32
|
<!--テーブルヘッダー-->
|
|
32
33
|
<thead class="table-header" style="--bgColor: var({tableColor})">
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
{/each}
|
|
37
|
-
</tr>
|
|
38
|
-
</thead>
|
|
39
|
-
<tbody>
|
|
40
|
-
{#each tableData as row}
|
|
41
|
-
<tr class="table-body-style" style="--table-body-color: var({bodyColor})">
|
|
42
|
-
{#each row as data}
|
|
43
|
-
<td>{data}</td>
|
|
34
|
+
<tr>
|
|
35
|
+
{#each dataHeader as title}
|
|
36
|
+
<th>{title}</th>
|
|
44
37
|
{/each}
|
|
45
38
|
</tr>
|
|
46
|
-
|
|
39
|
+
</thead>
|
|
40
|
+
<tbody>
|
|
41
|
+
{#each tableData as row}
|
|
42
|
+
<tr class="table-body-style" style="--table-body-color: var({bodyColor})">
|
|
43
|
+
{#each row as data}
|
|
44
|
+
<td>{data}</td>
|
|
45
|
+
{/each}
|
|
46
|
+
</tr>
|
|
47
|
+
{/each}
|
|
47
48
|
</tbody>
|
|
48
49
|
</table>
|
|
49
50
|
</div>
|
|
@@ -84,4 +85,4 @@ bodyColor = getBodyColor(tableColor);
|
|
|
84
85
|
.table-body-style:nth-child(odd) {
|
|
85
86
|
background-color: var(--table-body-color);
|
|
86
87
|
}
|
|
87
|
-
</style>
|
|
88
|
+
</style>
|
package/dist/Table.svelte.d.ts
CHANGED
|
@@ -16,8 +16,8 @@ declare const __propDef: {
|
|
|
16
16
|
/**
|
|
17
17
|
* テーブルにいれるデータ
|
|
18
18
|
* 2次元の配列で自由長
|
|
19
|
-
* @type Array<string | number
|
|
20
|
-
*/ tableData: string | number[][];
|
|
19
|
+
* @type Array<Array<string | number>>
|
|
20
|
+
*/ tableData: (string | number)[][];
|
|
21
21
|
};
|
|
22
22
|
events: {
|
|
23
23
|
[evt: string]: CustomEvent<any>;
|