cclkit4svelte 0.2.4 → 0.2.6

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.
@@ -84,19 +84,14 @@ export let height;
84
84
 
85
85
  <style>
86
86
  .wrapper {
87
- position: relative;
88
87
  background: var(--bgColor);
89
88
  height: var(--height);
89
+ display: flex;
90
+ align-items: center;
91
+ justify-content: center;
90
92
  }
91
93
 
92
94
  svg {
93
- position: absolute;
94
- top: 0;
95
- bottom: 0;
96
- left: 0;
97
- right: 0;
98
- margin: auto;
99
- padding: 24px;
100
95
  height: 70%;
101
96
  width: 70%;
102
97
  }
package/dist/Table.svelte CHANGED
@@ -30,16 +30,17 @@ export let tableData;
30
30
  </script>
31
31
 
32
32
  <!--汎用テーブル-->
33
- <table class="table-wrapper">
34
- <!--テーブルヘッダー-->
35
- <thead class="table-header" style="--bgColor: var({tableColor})">
36
- <tr>
37
- {#each dataHeader as title, index}
38
- <th>{title}</th>
39
- {/each}
40
- </tr>
41
- </thead>
42
- <tbody>
33
+ <div class="table-wrapper">
34
+ <table>
35
+ <!--テーブルヘッダー-->
36
+ <thead class="table-header" style="--bgColor: var({tableColor})">
37
+ <tr>
38
+ {#each dataHeader as title, index}
39
+ <th>{title}</th>
40
+ {/each}
41
+ </tr>
42
+ </thead>
43
+ <tbody>
43
44
  {#each tableData as row}
44
45
  <tr class="table-body-style" style="--table-body-color: var({bodyColor})">
45
46
  {#each row as data}
@@ -47,17 +48,34 @@ export let tableData;
47
48
  {/each}
48
49
  </tr>
49
50
  {/each}
50
- </tbody>
51
- </table>
51
+ </tbody>
52
+ </table>
53
+ </div>
52
54
 
53
55
  <style>
54
56
  th {
55
57
  padding: 5px 60px;
56
58
  }
57
59
 
58
- .table-wrapper {
60
+ thead {
61
+ position: sticky;
62
+ top: 0;
63
+ left: 0;
64
+ white-space: nowrap;
65
+ }
66
+
67
+ table {
59
68
  border-collapse: collapse;
69
+ width: 100%;
60
70
  }
71
+
72
+ .table-wrapper {
73
+ overflow-y: auto;
74
+ max-width: 90%;
75
+ height: 200px;
76
+ -webkit-overflow-scrolling: touch;
77
+ }
78
+
61
79
  .table-header {
62
80
  background-color: var(--bgColor);
63
81
  color: #ffffff;
@@ -65,6 +83,7 @@ export let tableData;
65
83
  .table-body-style {
66
84
  text-align: center;
67
85
  color: var(--wrap-grey);
86
+ white-space: nowrap;
68
87
  }
69
88
  .table-body-style:nth-child(odd) {
70
89
  background-color: var(--table-body-color);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cclkit4svelte",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
4
4
  "author": "reiji1020 <sk@reiji1020.info>",
5
5
  "license": "MIT",
6
6
  "type": "module",