@geckou/ui-vue 0.3.1 → 0.4.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.
Files changed (145) hide show
  1. package/README.md +8 -1
  2. package/dist/components/ArticleList/Card/Artistic.vue.d.ts +10 -0
  3. package/dist/components/ArticleList/Card/Entertainment.vue.d.ts +10 -0
  4. package/dist/components/ArticleList/Card/Gallery.vue.d.ts +10 -0
  5. package/dist/components/ArticleList/Card/Grid.vue.d.ts +11 -0
  6. package/dist/components/ArticleList/Card/News.vue.d.ts +9 -0
  7. package/dist/components/ArticleList/Card/Rounded.vue.d.ts +10 -0
  8. package/dist/components/ArticleList/Card/Row.vue.d.ts +9 -0
  9. package/dist/components/ArticleList/Card/Simple.vue.d.ts +10 -0
  10. package/dist/components/ArticleList/Card/Standard.vue.d.ts +10 -0
  11. package/dist/components/ArticleList/Card/Tile.vue.d.ts +10 -0
  12. package/dist/components/ArticleList/GenericArticleList.vue.d.ts +11 -0
  13. package/dist/components/ArticleList/List/Artistic.vue.d.ts +8 -0
  14. package/dist/components/ArticleList/List/Entertainment.vue.d.ts +8 -0
  15. package/dist/components/ArticleList/List/Gallery.vue.d.ts +8 -0
  16. package/dist/components/ArticleList/List/Grid.vue.d.ts +11 -0
  17. package/dist/components/ArticleList/List/News.vue.d.ts +8 -0
  18. package/dist/components/ArticleList/List/Rounded.vue.d.ts +8 -0
  19. package/dist/components/ArticleList/List/Row.vue.d.ts +8 -0
  20. package/dist/components/ArticleList/List/Simple.vue.d.ts +8 -0
  21. package/dist/components/ArticleList/List/Standard.vue.d.ts +8 -0
  22. package/dist/components/ArticleList/List/Tile.vue.d.ts +8 -0
  23. package/dist/components/ArticleList/Parts/AuthorInfo.vue.d.ts +31 -0
  24. package/dist/components/ArticleList/Parts/CardContainer.vue.d.ts +20 -0
  25. package/dist/components/ArticleList/Parts/CardHeading.vue.d.ts +12 -0
  26. package/dist/components/ArticleList/Parts/CategoryList.vue.d.ts +19 -0
  27. package/dist/components/ArticleList/Parts/ExcerptText.vue.d.ts +12 -0
  28. package/dist/components/ArticleList/Parts/MetadataList.vue.d.ts +32 -0
  29. package/dist/components/ArticleList/Parts/NoImage.vue.d.ts +2 -0
  30. package/dist/components/ArticleList/Parts/PostedDate.vue.d.ts +14 -0
  31. package/dist/components/ArticleList/Parts/TagList.vue.d.ts +18 -0
  32. package/dist/components/ArticleList/Parts/ThumbnailImage.vue.d.ts +17 -0
  33. package/dist/components/BasicButton.vue.d.ts +26 -0
  34. package/dist/components/CheckBox.vue.d.ts +34 -0
  35. package/dist/components/CheckBoxes.vue.d.ts +18 -0
  36. package/dist/components/CheckButton.vue.d.ts +31 -0
  37. package/dist/components/DatePicker.vue.d.ts +27 -0
  38. package/dist/components/DateRangePicker.vue.d.ts +31 -0
  39. package/dist/components/DateSelector.vue.d.ts +17 -0
  40. package/dist/components/DropdownUi.vue.d.ts +37 -0
  41. package/dist/components/ErrorMessage.vue.d.ts +9 -0
  42. package/dist/components/Icon/CalendarIcon.vue.d.ts +2 -0
  43. package/dist/components/Icon/CheckIcon.vue.d.ts +2 -0
  44. package/dist/components/Icon/CloseIcon.vue.d.ts +2 -0
  45. package/dist/components/Icon/Folder.vue.d.ts +2 -0
  46. package/dist/components/Icon/Image.vue.d.ts +2 -0
  47. package/dist/components/Icon/KeyboardArrowDownIcon.vue.d.ts +2 -0
  48. package/dist/components/Icon/Tag.vue.d.ts +2 -0
  49. package/dist/components/InputBox.vue.d.ts +27 -0
  50. package/dist/components/InputGroup.vue.d.ts +17 -0
  51. package/dist/components/LabeledCheckbox.vue.d.ts +20 -0
  52. package/dist/components/LabeledFieldset.vue.d.ts +21 -0
  53. package/dist/components/LoadingSpinner.vue.d.ts +2 -0
  54. package/dist/components/ModalBox.vue.d.ts +27 -0
  55. package/dist/components/PopupBox.vue.d.ts +30 -0
  56. package/dist/components/RadioButtons.vue.d.ts +20 -0
  57. package/dist/components/SelectBox.vue.d.ts +37 -0
  58. package/dist/components/SlideDownUi.vue.d.ts +37 -0
  59. package/dist/components/TabUI.vue.d.ts +54 -0
  60. package/dist/components/TextArea.vue.d.ts +33 -0
  61. package/dist/components/TextBox.vue.d.ts +44 -0
  62. package/dist/components/TextButton.vue.d.ts +10 -0
  63. package/dist/components/ToggleButton.vue.d.ts +23 -0
  64. package/dist/const/index.d.ts +1 -0
  65. package/dist/const/list-theme.d.ts +62 -0
  66. package/dist/index.d.ts +43 -0
  67. package/dist/index.js +3519 -0
  68. package/dist/scripts/form-validation-manager.d.ts +30 -0
  69. package/dist/scripts/unique-id.d.ts +1 -0
  70. package/dist/scripts/use-click-outside.d.ts +13 -0
  71. package/dist/scripts/utils.d.ts +15 -0
  72. package/dist/style.css +1 -0
  73. package/dist/types/index.d.ts +48 -77
  74. package/package.json +16 -8
  75. package/dist/assets/scss/functions.scss +0 -6
  76. package/dist/assets/scss/mixin.scss +0 -33
  77. package/dist/components/ArticleList/Card/Artistic.vue +0 -311
  78. package/dist/components/ArticleList/Card/Entertainment.vue +0 -245
  79. package/dist/components/ArticleList/Card/Gallery.vue +0 -255
  80. package/dist/components/ArticleList/Card/Grid.vue +0 -248
  81. package/dist/components/ArticleList/Card/News.vue +0 -151
  82. package/dist/components/ArticleList/Card/Rounded.vue +0 -155
  83. package/dist/components/ArticleList/Card/Row.vue +0 -168
  84. package/dist/components/ArticleList/Card/Simple.vue +0 -233
  85. package/dist/components/ArticleList/Card/Standard.vue +0 -188
  86. package/dist/components/ArticleList/Card/Tile.vue +0 -172
  87. package/dist/components/ArticleList/GenericArticleList.vue +0 -143
  88. package/dist/components/ArticleList/List/Artistic.vue +0 -24
  89. package/dist/components/ArticleList/List/Entertainment.vue +0 -24
  90. package/dist/components/ArticleList/List/Gallery.vue +0 -24
  91. package/dist/components/ArticleList/List/Grid.vue +0 -216
  92. package/dist/components/ArticleList/List/News.vue +0 -24
  93. package/dist/components/ArticleList/List/Rounded.vue +0 -24
  94. package/dist/components/ArticleList/List/Row.vue +0 -24
  95. package/dist/components/ArticleList/List/Simple.vue +0 -24
  96. package/dist/components/ArticleList/List/Standard.vue +0 -24
  97. package/dist/components/ArticleList/List/Tile.vue +0 -24
  98. package/dist/components/ArticleList/Parts/AuthorInfo.vue +0 -100
  99. package/dist/components/ArticleList/Parts/CardContainer.vue +0 -23
  100. package/dist/components/ArticleList/Parts/CardHeading.vue +0 -43
  101. package/dist/components/ArticleList/Parts/CategoryList.vue +0 -41
  102. package/dist/components/ArticleList/Parts/ExcerptText.vue +0 -43
  103. package/dist/components/ArticleList/Parts/MetadataList.vue +0 -120
  104. package/dist/components/ArticleList/Parts/NoImage.vue +0 -36
  105. package/dist/components/ArticleList/Parts/PostedDate.vue +0 -41
  106. package/dist/components/ArticleList/Parts/TagList.vue +0 -41
  107. package/dist/components/ArticleList/Parts/ThumbnailImage.vue +0 -85
  108. package/dist/components/BasicButton.vue +0 -143
  109. package/dist/components/CheckBox.vue +0 -140
  110. package/dist/components/CheckBoxes.vue +0 -101
  111. package/dist/components/CheckButton.vue +0 -127
  112. package/dist/components/DatePicker.vue +0 -234
  113. package/dist/components/DateRangePicker.vue +0 -85
  114. package/dist/components/DateSelector.vue +0 -273
  115. package/dist/components/DropdownUi.vue +0 -118
  116. package/dist/components/ErrorMessage.vue +0 -61
  117. package/dist/components/Icon/CalendarIcon.vue +0 -8
  118. package/dist/components/Icon/CheckIcon.vue +0 -8
  119. package/dist/components/Icon/CloseIcon.vue +0 -8
  120. package/dist/components/Icon/Folder.vue +0 -8
  121. package/dist/components/Icon/Image.vue +0 -14
  122. package/dist/components/Icon/KeyboardArrowDownIcon.vue +0 -8
  123. package/dist/components/Icon/Tag.vue +0 -8
  124. package/dist/components/InputBox.vue +0 -134
  125. package/dist/components/InputGroup.vue +0 -41
  126. package/dist/components/LabeledCheckbox.vue +0 -82
  127. package/dist/components/LabeledFieldset.vue +0 -41
  128. package/dist/components/LoadingSpinner.vue +0 -56
  129. package/dist/components/ModalBox.vue +0 -192
  130. package/dist/components/PopupBox.vue +0 -93
  131. package/dist/components/RadioButtons.vue +0 -163
  132. package/dist/components/SelectBox.vue +0 -166
  133. package/dist/components/SlideDownUi.vue +0 -123
  134. package/dist/components/TabUI.vue +0 -123
  135. package/dist/components/TextArea.vue +0 -115
  136. package/dist/components/TextBox.vue +0 -111
  137. package/dist/components/TextButton.vue +0 -47
  138. package/dist/components/ToggleButton.vue +0 -179
  139. package/dist/const/index.ts +0 -2
  140. package/dist/const/list-theme.ts +0 -62
  141. package/dist/index.ts +0 -126
  142. package/dist/scripts/form-validation-manager.ts +0 -63
  143. package/dist/scripts/utils.ts +0 -44
  144. package/dist/types/custom.d.ts +0 -1
  145. package/dist/types/vue-shim.d.ts +0 -5
@@ -1,216 +0,0 @@
1
- <script setup lang="ts">
2
- import type {
3
- Article,
4
- Category,
5
- ListSettings,
6
- } from '../../../types'
7
- import { ref, computed, onMounted, onUnmounted } from 'vue'
8
- import { returnArticlePath, normalizePostConfig } from '../../../scripts/utils'
9
- import GridCard from '../../../components/ArticleList/Card/Grid.vue'
10
-
11
- const props = defineProps<{
12
- articles: Article[]
13
- categories: Category[]
14
- columnNumber: number
15
- settings: ListSettings
16
- }>()
17
-
18
- // settings は親から動的に差し替えられるため computed で参照する
19
- const domainToUse = computed(() => props.settings.domainToUse)
20
- const isEnabledPickUp = computed(() => props.settings.isEnabledPickUp)
21
- const postConfig = computed(() => normalizePostConfig(props.settings.postConfig))
22
-
23
- const listElement = ref<HTMLElement | null>(null)
24
- const listWidth = ref(0)
25
- const resizeTimeout = ref<number | null>(null)
26
-
27
- const deviceColumnNumber = computed(() => {
28
- if (listWidth.value > 992) return props.columnNumber
29
- else if (listWidth.value >= 576 && listWidth.value <= 992) return props.columnNumber - 1
30
- else return 1
31
- })
32
-
33
- const returnRowNumber = (index: number): number => {
34
- const itemNum = index + 1
35
- const actualColumnNumber = Number(deviceColumnNumber.value) - 1
36
- return Math.ceil(itemNum / actualColumnNumber)
37
- }
38
-
39
- const returnColumnNumber = (index: number): number => {
40
- const itemNum = index + 1
41
- const columns = Number(deviceColumnNumber.value)
42
- if (itemNum < columns) return itemNum
43
- if (columns === 1) return 1
44
- const remainder = itemNum % (columns - 1)
45
- return remainder === 0 ? columns - 1 : remainder
46
- }
47
-
48
- const calcGridRowValue = (index: number): string | undefined => {
49
- if (deviceColumnNumber.value === 4) {
50
- const rowNum = returnRowNumber(index)
51
- const actualRowNumber = Array.from({ length: 49 }, (_, i) => i + 1)
52
- .find(n => rowNum <= n * 2) || 0
53
- const adjustedRowNum = rowNum - 1 + actualRowNumber
54
-
55
- return returnItemDirection(index) === 'vertical'
56
- ? `${Number(adjustedRowNum)}/${Number(adjustedRowNum) + 2}`
57
- : rowNum % 2
58
- ? `${Number(adjustedRowNum)}/${Number(adjustedRowNum) + 1}`
59
- : `${Number(adjustedRowNum) + 1}/${Number(adjustedRowNum) + 2}`
60
- } else if (deviceColumnNumber.value === 3) {
61
- const itemNum = index + 1
62
- const division = itemNum % 3
63
- const count = Math.floor(itemNum / 3)
64
- const actualRowNumber = division ? count * 2 + 1 : count * 2
65
-
66
- return returnItemDirection(index) === 'horizontal'
67
- ? `${Number(actualRowNumber)}/${Number(actualRowNumber) + 1}`
68
- : `${Number(actualRowNumber)}/${Number(actualRowNumber) + 2}`
69
- }
70
- }
71
-
72
- const calcGridColumnValue = (index: number): string => {
73
- const division = (index + 1) % 6
74
-
75
- const columns = Number(deviceColumnNumber.value)
76
-
77
- if (columns === 4) {
78
- const colNum = returnColumnNumber(index)
79
- switch (true) {
80
- case !index || division === 1:
81
- return '1/3'
82
- case !division:
83
- return '3/5'
84
- default:
85
- return returnRowNumber(index) % 2
86
- ? `${colNum + 1}/${colNum + 2}`
87
- : `${colNum}/${colNum + 1}`
88
- }
89
- } else if (columns === 3) {
90
- const endCount = returnItemDirection(index) === 'horizontal' ? 2 : 1
91
- switch (division) {
92
- case 1:
93
- case 3:
94
- case 4:
95
- return `1/${1 + endCount}`
96
- case 5:
97
- case 0:
98
- return `2/${2 + endCount}`
99
- case 2:
100
- return `3/${3 + endCount}`
101
- default:
102
- return ''
103
- }
104
- }
105
-
106
- return ''
107
- }
108
-
109
- const returnItemDirection = (index: number): 'horizontal' | 'vertical' => {
110
- if (deviceColumnNumber.value === 1) {
111
- return 'vertical'
112
- } else if (deviceColumnNumber.value === 3) {
113
- const itemNum = index + 1
114
- const division = itemNum % 6
115
- return division !== 2 && division !== 4 ? 'horizontal' : 'vertical'
116
- } else {
117
- const gridValue = calcGridColumnValue(index)
118
- if (!gridValue.includes('/')) return 'horizontal'
119
- const values = gridValue.split('/').map(Number)
120
- return values[1] - values[0] >= 2 ? 'horizontal' : 'vertical'
121
- }
122
- }
123
-
124
- onMounted(() => {
125
- const resizeObserver = new ResizeObserver(entries => {
126
- if (resizeTimeout.value) clearTimeout(resizeTimeout.value)
127
- resizeTimeout.value = setTimeout(() => {
128
- listWidth.value = entries[0].contentRect.width
129
- }, 100) as unknown as number
130
- })
131
-
132
- if (listElement.value) resizeObserver.observe(listElement.value)
133
-
134
- onUnmounted(() => {
135
- if (listElement.value) resizeObserver.unobserve(listElement.value)
136
- resizeObserver.disconnect()
137
- if (resizeTimeout.value) clearTimeout(resizeTimeout.value)
138
- })
139
- })
140
- </script>
141
-
142
- <template>
143
- <ul
144
- ref="listElement"
145
- :style="{
146
- ['--column-number']: columnNumber,
147
- ['--tablet-column-number']: columnNumber - 1 ? columnNumber - 1 : 1,
148
- }"
149
- :class="$style.list"
150
- >
151
- <li
152
- v-for="(article, index) in articles"
153
- :key="article.id"
154
- :class="$style.item"
155
- :style="{
156
- animationDelay: `${Number(index) * .1}s`,
157
- gridRow: calcGridRowValue(Number(index)) || 'auto',
158
- gridColumn: calcGridColumnValue(Number(index)) || 'auto',
159
- }"
160
- >
161
- <GridCard
162
- :path="returnArticlePath(postConfig, domainToUse, article.id)"
163
- :article="article"
164
- :isPickUpItem="Number(index) === 0 && isEnabledPickUp"
165
- :postConfig="postConfig"
166
- :categories="categories"
167
- :direction="returnItemDirection(Number(index))"
168
- />
169
- </li>
170
- </ul>
171
- </template>
172
-
173
- <style lang="scss" module>
174
- @use '../../../assets/scss/mixin' as *;
175
-
176
- .list {
177
- --list-gap : var(--sp-medium);
178
- display : grid;
179
- gap : var(--list-gap);
180
- grid-template-rows: 1fr;
181
- width : 100%;
182
- list-style : none;
183
- grid-auto-flow : dense;
184
-
185
- @keyframes fadeIn {
186
- from {
187
- opacity: 0;
188
- }
189
-
190
- to {
191
- opacity: 1;
192
- }
193
- }
194
-
195
- @include media('mobile') {
196
- display : flex;
197
- flex-direction: column;
198
- gap : var(--sp-large);
199
- }
200
-
201
- @include media('tablet') {
202
- grid-template-columns : repeat(auto-fit, calc((100% - var(--list-gap) * (var(--tablet-column-number) - 1)) / var(--tablet-column-number)));
203
- }
204
-
205
- @include media('desktop') {
206
- grid-template-columns : repeat(auto-fit, calc((100% - var(--list-gap) * (var(--column-number) - 1)) / var(--column-number)));
207
- }
208
-
209
- > li {
210
- animation-name : fadeIn;
211
- animation-duration : 1s;
212
- animation-timing-function: ease-out;
213
- animation-fill-mode : backwards;
214
- }
215
- }
216
- </style>
@@ -1,24 +0,0 @@
1
- <script setup lang="ts">
2
- import type {
3
- Article,
4
- Category,
5
- ListSettings,
6
- } from '../../../types'
7
- import GenericArticleList from '../../../components/ArticleList/GenericArticleList.vue'
8
-
9
- defineProps<{
10
- articles: Article[]
11
- categories: Category[]
12
- settings: ListSettings
13
- }>()
14
- </script>
15
-
16
- <template>
17
- <GenericArticleList
18
- theme="news"
19
- :columnNumber="1"
20
- :articles="articles"
21
- :categories="categories"
22
- :settings="settings"
23
- />
24
- </template>
@@ -1,24 +0,0 @@
1
- <script setup lang="ts">
2
- import type {
3
- Article,
4
- Category,
5
- ListSettings,
6
- } from '../../../types'
7
- import GenericArticleList from '../../../components/ArticleList/GenericArticleList.vue'
8
-
9
- defineProps<{
10
- articles: Article[]
11
- categories: Category[]
12
- settings: ListSettings
13
- }>()
14
- </script>
15
-
16
- <template>
17
- <GenericArticleList
18
- theme="rounded"
19
- :columnNumber="3"
20
- :articles="articles"
21
- :categories="categories"
22
- :settings="settings"
23
- />
24
- </template>
@@ -1,24 +0,0 @@
1
- <script setup lang="ts">
2
- import type {
3
- Article,
4
- Category,
5
- ListSettings,
6
- } from '../../../types'
7
- import GenericArticleList from '../../../components/ArticleList/GenericArticleList.vue'
8
-
9
- defineProps<{
10
- articles: Article[]
11
- categories: Category[]
12
- settings: ListSettings
13
- }>()
14
- </script>
15
-
16
- <template>
17
- <GenericArticleList
18
- theme="row"
19
- :columnNumber="1"
20
- :articles="articles"
21
- :categories="categories"
22
- :settings="settings"
23
- />
24
- </template>
@@ -1,24 +0,0 @@
1
- <script setup lang="ts">
2
- import type {
3
- Article,
4
- Category,
5
- ListSettings,
6
- } from '../../../types'
7
- import GenericArticleList from '../../../components/ArticleList/GenericArticleList.vue'
8
-
9
- defineProps<{
10
- articles: Article[]
11
- categories: Category[]
12
- settings: ListSettings
13
- }>()
14
- </script>
15
-
16
- <template>
17
- <GenericArticleList
18
- theme="simple"
19
- :columnNumber="3"
20
- :articles="articles"
21
- :categories="categories"
22
- :settings="settings"
23
- />
24
- </template>
@@ -1,24 +0,0 @@
1
- <script setup lang="ts">
2
- import type {
3
- Article,
4
- Category,
5
- ListSettings,
6
- } from '../../../types'
7
- import GenericArticleList from '../../../components/ArticleList/GenericArticleList.vue'
8
-
9
- defineProps<{
10
- articles: Article[]
11
- categories: Category[]
12
- settings: ListSettings
13
- }>()
14
- </script>
15
-
16
- <template>
17
- <GenericArticleList
18
- theme="standard"
19
- :columnNumber="3"
20
- :articles="articles"
21
- :categories="categories"
22
- :settings="settings"
23
- />
24
- </template>
@@ -1,24 +0,0 @@
1
- <script setup lang="ts">
2
- import type {
3
- Article,
4
- Category,
5
- ListSettings,
6
- } from '../../../types'
7
- import GenericArticleList from '../../../components/ArticleList/GenericArticleList.vue'
8
-
9
- defineProps<{
10
- articles: Article[]
11
- categories: Category[]
12
- settings: ListSettings
13
- }>()
14
- </script>
15
-
16
- <template>
17
- <GenericArticleList
18
- theme="tile"
19
- :columnNumber="3"
20
- :articles="articles"
21
- :categories="categories"
22
- :settings="settings"
23
- />
24
- </template>
@@ -1,100 +0,0 @@
1
- <script setup lang="ts">
2
- withDefaults(defineProps<{
3
- avatarUrls?: Record<string, string> | null
4
- name?: string
5
- direction?: 'row' | 'row-reverse'
6
- thumbnail?: {
7
- size?: 'small' | 'medium' | 'large'
8
- shape?: 'square' | 'circle'
9
- }
10
- text?: {
11
- color?: string
12
- fontSize?: string
13
- fontWeight?: string
14
- preposition?: string
15
- }
16
- }>(), {
17
- avatarUrls: null,
18
- name : '',
19
- direction : 'row',
20
- thumbnail : () => ({
21
- size : 'medium',
22
- shape: 'square',
23
- }),
24
- text: () => ({
25
- color : 'var(--gray)',
26
- fontSize : 'medium',
27
- fontWeight : 'normal',
28
- preposition: '',
29
- }),
30
- })
31
- </script>
32
-
33
- <template>
34
- <div
35
- :class="$style.author_info"
36
- :style="{
37
- '--author-info-direction': direction,
38
- '--author-name-color': text.color,
39
- '--author-name-font-size': text.fontSize,
40
- '--author-name-font-weight': text.fontWeight,
41
- }"
42
- >
43
- <img
44
- v-if="avatarUrls"
45
- :src="avatarUrls['96']"
46
- :srcset="
47
- `${avatarUrls['96']} 1024w,
48
- ${['48']} 640w`"
49
- :alt="`${name} thumbnail`"
50
- loading="lazy"
51
- :class="[$style.thumbnail, $style[thumbnail.shape ?? 'square']]"
52
- :style="{
53
- '--thumbnail-size': thumbnail.size === 'small'
54
- ? 'calc(var(--bv) * 3)'
55
- : thumbnail.size === 'large'
56
- ? 'calc(var(--bv) * 6)'
57
- : 'calc(var(--bv) * 4)',
58
- }"
59
- >
60
- <span
61
- v-if="name"
62
- :data-preposition="text.preposition"
63
- >
64
- {{ name }}
65
- </span>
66
- </div>
67
- </template>
68
-
69
- <style lang="scss" module>
70
- .author_info {
71
- display : inline-flex;
72
- flex-direction: var(--author-info-direction);
73
- align-items : center;
74
- word-wrap : normal;
75
- gap : var(--sp-small);
76
-
77
- .thumbnail {
78
- width : var(--thumbnail-size);
79
- height : var(--thumbnail-size);
80
- object-fit: cover;
81
-
82
- &.circle {
83
- border-radius: 50%;
84
- }
85
- }
86
-
87
- > span {
88
- margin : 0;
89
- padding : 0;
90
- color : var(--author-name-color);
91
- font-size : var(--author-name-font-size);
92
- font-weight: var(--author-name-font-weight);
93
-
94
- &::before {
95
- content : attr(data-preposition);
96
- margin-inline-end: var(--sp-min);
97
- }
98
- }
99
- }
100
- </style>
@@ -1,23 +0,0 @@
1
- <script setup lang="ts">
2
- defineProps<{ path: string }>()
3
- </script>
4
-
5
- <template>
6
- <a
7
- :href="path"
8
- :class="$style.container"
9
- >
10
- <slot />
11
- </a>
12
- </template>
13
-
14
- <style lang="scss" module>
15
- .container {
16
- position : relative;
17
- display : grid;
18
- width : 100%;
19
- height : 100%;
20
- background-color: var(--base-color);
21
- text-decoration : none;
22
- }
23
- </style>
@@ -1,43 +0,0 @@
1
- <script setup lang="ts">
2
- withDefaults(defineProps<{
3
- heading: string
4
- color?: string
5
- fontSize?: string
6
- fontWeight?: string
7
- }>(), {
8
- color : 'var(--primary-color)',
9
- fontSize : 'larger',
10
- fontWeight: 'bold',
11
- })
12
- </script>
13
-
14
- <template>
15
- <div
16
- :class="$style.heading"
17
- :style="{
18
- '--heading-color' : color,
19
- '--heading-font-size' : fontSize,
20
- '--heading-font-weight': fontWeight,
21
- }"
22
- >
23
- <h2>
24
- {{ heading }}
25
- </h2>
26
- </div>
27
- </template>
28
-
29
- <style lang="scss" module>
30
- @use '../../../assets/scss/mixin' as *;
31
-
32
- .heading {
33
- @include textEllipsis(2);
34
- block-size: max-content;
35
-
36
- > h2 {
37
- color : var(--heading-color);
38
- font-size : var(--heading-font-size);
39
- font-weight: var(--heading-font-weight);
40
- margin : 0;
41
- }
42
- }
43
- </style>
@@ -1,41 +0,0 @@
1
- <script setup lang="ts">
2
- import type {
3
- Category,
4
- } from '../../../types'
5
- import type { ComputedRef } from 'vue'
6
- import { computed } from 'vue'
7
- import MetadataList from '../../../components/ArticleList/Parts/MetadataList.vue'
8
-
9
- const props = defineProps<{
10
- categoryIds: string[]
11
- categoryData: Category[]
12
- icon?: {
13
- color?: string
14
- size?: 'small' | 'medium'
15
- }
16
- label?: {
17
- backgroundColor?: string
18
- color?: string
19
- fontSize?: string
20
- fontWeight?: string
21
- shape?: | 'square' | 'rounded'
22
- }
23
- delimiter?: string
24
- }>()
25
-
26
- const returnCatNameFromCatId = (categories: Category[], categoryId: string) => categories.length ? categories.find(category => category.id === categoryId)?.name ?? '' : ''
27
- const categories: ComputedRef<string[]> = computed(() => props.categoryIds.map((id: string) => returnCatNameFromCatId(props.categoryData, id)))
28
- </script>
29
-
30
- <template>
31
- <MetadataList
32
- :metadata="categories"
33
- :icon="{
34
- name : icon?.color ? 'FolderIcon' : null,
35
- color: icon?.color,
36
- size : icon?.size,
37
- }"
38
- :label="label"
39
- :delimiter="delimiter"
40
- />
41
- </template>
@@ -1,43 +0,0 @@
1
- <script setup lang="ts">
2
- withDefaults(defineProps<{
3
- excerpt: string
4
- color?: string
5
- fontSize?: string
6
- row?: number
7
- }>(), {
8
- color : 'var(--text-color)',
9
- fontSize: 'medium',
10
- row : 3,
11
- })
12
- </script>
13
-
14
- <template>
15
- <!-- eslint-disable vue/no-v-html -- WordPress の excerpt.rendered は HTML を含むため意図的に描画する -->
16
- <div
17
- :class="$style.excerpt"
18
- :style="{
19
- '--excerpt-color': color,
20
- '--excerpt-font-size': fontSize,
21
- '--excerpt-row': row,
22
- }"
23
- v-html="excerpt"
24
- />
25
- </template>
26
-
27
- <style lang="scss" module>
28
- @use '../../../assets/scss/mixin' as *;
29
-
30
- .excerpt {
31
- color : var(--excerpt-color);
32
- font-size: var(--excerpt-font-size);
33
-
34
- > * {
35
- @include textEllipsis(var(--excerpt-row));
36
- margin: 0;
37
-
38
- &:not(:first-child) {
39
- display: none;
40
- }
41
- }
42
- }
43
- </style>