@geckou/ui-vue 0.3.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 (75) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +253 -0
  3. package/dist/assets/scss/functions.scss +6 -0
  4. package/dist/assets/scss/mixin.scss +33 -0
  5. package/dist/components/ArticleList/Card/Artistic.vue +310 -0
  6. package/dist/components/ArticleList/Card/Entertainment.vue +244 -0
  7. package/dist/components/ArticleList/Card/Gallery.vue +254 -0
  8. package/dist/components/ArticleList/Card/Grid.vue +247 -0
  9. package/dist/components/ArticleList/Card/News.vue +150 -0
  10. package/dist/components/ArticleList/Card/Rounded.vue +154 -0
  11. package/dist/components/ArticleList/Card/Row.vue +167 -0
  12. package/dist/components/ArticleList/Card/Simple.vue +232 -0
  13. package/dist/components/ArticleList/Card/Standard.vue +187 -0
  14. package/dist/components/ArticleList/Card/Tile.vue +171 -0
  15. package/dist/components/ArticleList/GenericArticleList.vue +143 -0
  16. package/dist/components/ArticleList/List/Artistic.vue +24 -0
  17. package/dist/components/ArticleList/List/Entertainment.vue +24 -0
  18. package/dist/components/ArticleList/List/Gallery.vue +24 -0
  19. package/dist/components/ArticleList/List/Grid.vue +216 -0
  20. package/dist/components/ArticleList/List/News.vue +24 -0
  21. package/dist/components/ArticleList/List/Rounded.vue +24 -0
  22. package/dist/components/ArticleList/List/Row.vue +24 -0
  23. package/dist/components/ArticleList/List/Simple.vue +24 -0
  24. package/dist/components/ArticleList/List/Standard.vue +24 -0
  25. package/dist/components/ArticleList/List/Tile.vue +24 -0
  26. package/dist/components/ArticleList/Parts/AuthorInfo.vue +100 -0
  27. package/dist/components/ArticleList/Parts/CardContainer.vue +23 -0
  28. package/dist/components/ArticleList/Parts/CardHeading.vue +43 -0
  29. package/dist/components/ArticleList/Parts/CategoryList.vue +41 -0
  30. package/dist/components/ArticleList/Parts/ExcerptText.vue +43 -0
  31. package/dist/components/ArticleList/Parts/MetadataList.vue +120 -0
  32. package/dist/components/ArticleList/Parts/NoImage.vue +36 -0
  33. package/dist/components/ArticleList/Parts/PostedDate.vue +41 -0
  34. package/dist/components/ArticleList/Parts/TagList.vue +41 -0
  35. package/dist/components/ArticleList/Parts/ThumbnailImage.vue +85 -0
  36. package/dist/components/BasicButton.vue +143 -0
  37. package/dist/components/CheckBox.vue +140 -0
  38. package/dist/components/CheckBoxes.vue +100 -0
  39. package/dist/components/CheckButton.vue +127 -0
  40. package/dist/components/DatePicker.vue +234 -0
  41. package/dist/components/DateRangePicker.vue +85 -0
  42. package/dist/components/DateSelector.vue +273 -0
  43. package/dist/components/DropdownUi.vue +118 -0
  44. package/dist/components/ErrorMessage.vue +61 -0
  45. package/dist/components/Icon/CalendarIcon.vue +8 -0
  46. package/dist/components/Icon/CheckIcon.vue +8 -0
  47. package/dist/components/Icon/CloseIcon.vue +8 -0
  48. package/dist/components/Icon/Folder.vue +8 -0
  49. package/dist/components/Icon/Image.vue +14 -0
  50. package/dist/components/Icon/KeyboardArrowDownIcon.vue +8 -0
  51. package/dist/components/Icon/Tag.vue +8 -0
  52. package/dist/components/InputBox.vue +134 -0
  53. package/dist/components/InputGroup.vue +41 -0
  54. package/dist/components/LabeledCheckbox.vue +82 -0
  55. package/dist/components/LabeledFieldset.vue +41 -0
  56. package/dist/components/LoadingSpinner.vue +56 -0
  57. package/dist/components/ModalBox.vue +192 -0
  58. package/dist/components/PopupBox.vue +93 -0
  59. package/dist/components/RadioButtons.vue +163 -0
  60. package/dist/components/SelectBox.vue +166 -0
  61. package/dist/components/SlideDownUi.vue +123 -0
  62. package/dist/components/TabUI.vue +123 -0
  63. package/dist/components/TextArea.vue +115 -0
  64. package/dist/components/TextBox.vue +111 -0
  65. package/dist/components/TextButton.vue +47 -0
  66. package/dist/components/ToggleButton.vue +179 -0
  67. package/dist/const/index.ts +2 -0
  68. package/dist/const/list-theme.ts +62 -0
  69. package/dist/index.ts +126 -0
  70. package/dist/scripts/form-validation-manager.ts +63 -0
  71. package/dist/scripts/utils.ts +36 -0
  72. package/dist/types/custom.d.ts +1 -0
  73. package/dist/types/index.d.ts +93 -0
  74. package/dist/types/vue-shim.d.ts +5 -0
  75. package/package.json +44 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Geckou LLC
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,253 @@
1
+ # @geckou/ui-vue
2
+
3
+ Vue 3 用の再利用可能な UI コンポーネント集。
4
+ 入力フォーム系のコンポーネントと、WordPress REST API の記事データをそのまま渡せる記事一覧コンポーネント(10 レイアウト)を収録しています。
5
+
6
+ バリデーション・日付処理などのロジックは [`@geckou/ui-core`](../core) が持ちます。
7
+ 同じ core を [`@geckou/ui-react`](../react) も使うため、両者の挙動は一致します。
8
+
9
+ **デモサイト: https://ui.geckou.net/**
10
+
11
+ ## Installation
12
+
13
+ ```bash
14
+ yarn add @geckou/ui-vue
15
+ ```
16
+
17
+ Vue 本体は同梱していません。プロジェクト側の Vue 3.0 以上を使います(`peerDependencies`)。
18
+
19
+ ## Usage
20
+
21
+ ```ts
22
+ import { createApp } from 'vue'
23
+ import GeckouUi from '@geckou/ui-vue'
24
+ import App from './App.vue'
25
+
26
+ createApp(App).use(GeckouUi).mount('#app')
27
+ ```
28
+
29
+ ```ts
30
+ // 個別インポート
31
+ import { TextBox, StandardList } from '@geckou/ui-vue'
32
+ ```
33
+
34
+ デザイントークン(CSS カスタムプロパティ)の定義はリポジトリの [README](../../README.md#design-tokens) を参照してください。
35
+
36
+ ## Components
37
+
38
+ ### Form
39
+
40
+ `TextBox` / `TextArea` / `SelectBox` / `CheckBox` / `CheckBoxes` / `CheckButton` /
41
+ `LabeledCheckbox` / `LabeledFieldset` / `RadioButtons` / `ToggleButton` / `BasicButton` /
42
+ `TextButton` / `InputBox` / `InputGroup` / `TabUI` / `SlideDownUi` / `DropdownUi` /
43
+ `ModalBox` / `PopupBox` / `LoadingSpinner` / `ErrorMessage`
44
+
45
+ ### Date
46
+
47
+ `DatePicker` / `DateRangePicker` / `DateSelector`
48
+
49
+ `FormValidationManager` を渡すと、フォーム内の各入力の検証結果をまとめて追跡できます。
50
+
51
+ ```vue
52
+ <script setup lang="ts">
53
+ import { ref } from 'vue'
54
+ import { DatePicker, DateRangePicker, FormValidationManager } from '@geckou/ui-vue'
55
+
56
+ const manager = new FormValidationManager()
57
+ const startedOn = ref('')
58
+ const period = ref({ start: '', end: '' })
59
+ // manager.isAllValid.value / manager.invalidNames.value で状態を参照する
60
+ </script>
61
+
62
+ <template>
63
+ <DatePicker
64
+ v-model="startedOn"
65
+ name="startedOn"
66
+ :formValidationManager="manager"
67
+ isRequired
68
+ />
69
+ <DateRangePicker
70
+ v-model="period"
71
+ name="period"
72
+ />
73
+ <button :disabled="!manager.isAllValid.value">送信</button>
74
+ </template>
75
+ ```
76
+
77
+ | Component | modelValue | 主な props |
78
+ |-----------|-----------|-----------|
79
+ | `DatePicker` | `string`(`YYYY-MM-DD` / `type="month"` なら `YYYY-MM`) | `name` / `isRequired` / `isDisabled` / `minDate` / `maxDate` / `size` / `type` / `formValidationManager` |
80
+ | `DateRangePicker` | `{ start: string; end: string }` | `DatePicker` と同じ(開始日と終了日の min / max が自動連動) |
81
+ | `DateSelector` | `string`(`YYYY-MM-DD`) | `name` / `isRequired` / `type` / `formValidationManager` |
82
+
83
+ ### Article List
84
+
85
+ `StandardList` / `RoundedList` / `ArtisticList` / `TileList` / `SimpleList` /
86
+ `RowList` / `NewsList` / `EntertainmentList` / `GalleryList` / `GridList`
87
+
88
+ WordPress REST API(`?_embed` 付き)のレスポンス配列をそのまま渡せます。
89
+
90
+ ```vue
91
+ <script setup lang="ts">
92
+ import type { Category, ListSettings } from '@geckou/ui-vue'
93
+ import { StandardList } from '@geckou/ui-vue'
94
+
95
+ const settings: ListSettings = {
96
+ domainToUse: 'example.com',
97
+ postConfig : {
98
+ article_page_path: '/article/',
99
+ query_key_name : 'article',
100
+ useAuthor : true,
101
+ useCategory : true,
102
+ useTag : true,
103
+ },
104
+ isEnabledPickUp: true,
105
+ }
106
+
107
+ const categories: Category[] = [{ id: '1', name: 'デザイン' }]
108
+ const articles = ref<any[]>([])
109
+ </script>
110
+
111
+ <template>
112
+ <StandardList
113
+ :articles="articles"
114
+ :categories="categories"
115
+ :settings="settings"
116
+ />
117
+ </template>
118
+ ```
119
+
120
+ | Prop | Type | Required | Description |
121
+ |------|------|----------|-------------|
122
+ | `articles` | `any[]` | ✅ | WordPress REST API のレスポンス配列 |
123
+ | `categories` | `Category[]` | ✅ | カテゴリ ID と表示名の対応 |
124
+ | `settings` | `ListSettings` | ✅ | 記事リンクの組み立て設定と表示オプション |
125
+ | `columnNumber` | `number` | `GridList` のみ ✅ | グリッドのカラム数 |
126
+
127
+ ## Types
128
+
129
+ ### `BorderStyle`
130
+
131
+ | Prop Name | Type | Required | Description |
132
+ |---------------------|-----------------|----------|------------------------------------------------------------|
133
+ | `color` | `string` | ✅ | ボーダーの色 |
134
+ | `size` | `string` | ✅ | ボーダーの太さ |
135
+ | `radius` | `string` | ✅ | 角丸の大きさ |
136
+
137
+ ### `InputBoxStyle`
138
+
139
+ | Prop Name | Type | Required | Description |
140
+ |---------------------|-----------------|----------|------------------------------------------------------------|
141
+ | `textColor` | `string` | ❌ | テキストの色 |
142
+ | `placeholderColor` | `string` | ❌ | プレスホルダーの色 |
143
+ | `border` | `BorderStyle` | ❌ | ボーダーのスタイル |
144
+ | `backgroundColor` | `string` | ❌ | 背景色 |
145
+ | `boxShadow` | `string` | ❌ | 影のスタイル |
146
+
147
+ ### `InputBoxStyleForEachStatus`
148
+
149
+ | Prop Name | Type | Required | Description |
150
+ |-----------|------------------------|----------|------------------------------------------------------------|
151
+ | `default` | `InputBoxStyle` | ✅ | デフォルトのスタイル |
152
+ | `error` | `InputBoxStyle` | ❌ | エラー時のスタイル |
153
+ | `disabled`| `InputBoxStyle` | ❌ | 非活性時のスタイル |
154
+ | `valid` | `InputBoxStyle` | ❌ | 入力した値が有効な時のスタイル |
155
+ | `focus` | `InputBoxStyle` | ❌ | フォーカス時のスタイル |
156
+
157
+ ### `ButtonStyle`
158
+
159
+ | Prop Name | Type | Required | Description |
160
+ |--------------------|-----------------|----------|------------------------------------------------------------|
161
+ | `textColor` | `string` | ❌ | Specifies the button text color. |
162
+ | `border` | `BorderStyle` | ❌ | Defines the border style for the button. |
163
+ | `backgroundColor` | `string` | ❌ | Specifies the button's background color. |
164
+ | `backgroundImage` | `string` | ❌ | Specifies the background image or gradient. |
165
+ | `boxShadow` | `string` | ❌ | Specifies the box shadow for the button. |
166
+
167
+ ### `ButtonStyleForEachStatus`
168
+
169
+ | Prop Name | Type | Required | Description |
170
+ |-----------|-----------------|----------|------------------------------------------------------------|
171
+ | `default` | `ButtonStyle` | ✅ | The style applied in the default state. |
172
+ | `hover` | `ButtonStyle` | ❌ | The style applied when the button is hovered. |
173
+ | `disabled`| `ButtonStyle` | ❌ | The style applied when the button is disabled. |
174
+
175
+ ### `CheckBoxStyle`
176
+
177
+ | Prop Name | Type | Required | Description |
178
+ |--------------------|-----------------|----------|------------------------------------------------------------|
179
+ | `border` | `BorderStyle` | ❌ | Defines the border style for the checkbox. |
180
+ | `backgroundColor` | `string` | ❌ | Specifies the background color for the checkbox. |
181
+
182
+ ### `CheckBoxStyleForEachStatus`
183
+
184
+ | Prop Name | Type | Required | Description |
185
+ |-----------|------------------|----------|------------------------------------------------------------|
186
+ | `default` | `CheckBoxStyle` | ✅ | The style applied in the default state. |
187
+ | `disabled`| `CheckBoxStyle` | ❌ | The style applied when the checkbox is disabled. |
188
+
189
+ ### `RadioButtonStyle`
190
+
191
+ | Prop Name | Type | Required | Description |
192
+ |--------------------|--------------------------------|----------|------------------------------------------------------------|
193
+ | `border` | `Omit<BorderStyle, 'radius'>` | ❌ | Defines the border style without a border radius. |
194
+ | `backgroundColor` | `string` | ❌ | Specifies the background color for the radio button. |
195
+
196
+ ### `RadioButtonStyleForEachStatus`
197
+
198
+ | Prop Name | Type | Required | Description |
199
+ |-----------|----------------------|----------|------------------------------------------------------------|
200
+ | `default` | `RadioButtonStyle` | ✅ | The style applied in the default state. |
201
+ | `disabled`| `RadioButtonStyle` | ❌ | The style applied when the radio button is disabled. |
202
+
203
+ ### `Validates`
204
+
205
+ | Prop Name | Type | Required | Description |
206
+ |------------|------------|----------|------------------------------------------------------------|
207
+ | `regex` | `RegExp` | ✅ | The regular expression used for validation. |
208
+ | `message` | `string` | ✅ | The error message displayed when validation fails. |
209
+
210
+ ### `Category`
211
+
212
+ | Prop Name | Type | Required | Description |
213
+ |-----------|----------|----------|--------------------------------|
214
+ | `id` | `string` | ✅ | WordPress のカテゴリ ID |
215
+ | `name` | `string` | ✅ | 表示するカテゴリ名 |
216
+
217
+ ### `PostConfig`
218
+
219
+ | Prop Name | Type | Required | Description |
220
+ |---------------------|-----------|----------|------------------------------------------------------|
221
+ | `article_page_path` | `string` | ✅ | 記事詳細ページのパス |
222
+ | `query_key_name` | `string` | ✅ | 記事 ID を渡すクエリキー |
223
+ | `useAuthor` | `boolean` | ❌ | 著者を表示するか |
224
+ | `useCategory` | `boolean` | ❌ | カテゴリを表示するか |
225
+ | `useTag` | `boolean` | ❌ | タグを表示するか |
226
+
227
+ ### `ListSettings`
228
+
229
+ | Prop Name | Type | Required | Description |
230
+ |-------------------|--------------|----------|--------------------------------------------|
231
+ | `domainToUse` | `string` | ✅ | 記事リンクに使うドメイン |
232
+ | `postConfig` | `PostConfig` | ✅ | 記事詳細ページの組み立て設定 |
233
+ | `isEnabledPickUp` | `boolean` | ✅ | 先頭の記事を大きく表示するか |
234
+
235
+ ## Component Props (Form)
236
+ ### `TextBox`
237
+
238
+ | Prop Name | Type | Required | Default | Description |
239
+ |--------------------|-----------------------------|----------|--------------------|------------------------------------------------|
240
+ | `modelValue` | `string \| number` | ✅ | - | テキストボックスの値 |
241
+ | `name` | `string` | ✅ | - | `name`属性 |
242
+ | `cssStyle` | `InputBoxStyleForEachStatus`| ❌ | - | テキストボックスのスタイル |
243
+ | `type` | `string` | ❌ | `text` | テキストボックスのタイプ |
244
+ | `isDisabled` | `boolean` | ❌ | `false` | テキストボックスの活性/非活性 |
245
+ | `isRequired` | `boolean` | ❌ | `false` | 必須項目かどうか |
246
+ | `maxLength` | `number` | ❌ | `30` | 最大入力文字数 |
247
+ | `autocomplete` | `string` | ❌ | `off` | `autocomplete`属性 |
248
+ | `validates` | `Validates[]` | ❌ | `[]` | バリデーションの設定 |
249
+
250
+
251
+ ## License
252
+
253
+ [MIT](../../LICENSE)
@@ -0,0 +1,6 @@
1
+ @function calcClamp($minValuePx, $maxValuePx, $minViewport, $maxViewport) {
2
+ $variablePart: calc(($maxValuePx - $minValuePx) / ($maxViewport - $minViewport));
3
+ $constant: calc(($maxValuePx - $maxViewport * $variablePart) / 16);
4
+
5
+ @return clamp(#{calc($minValuePx / 16)}rem, #{$constant}rem + #{100 * $variablePart}vw, #{calc($maxValuePx / 16)}rem);
6
+ }
@@ -0,0 +1,33 @@
1
+ @mixin textEllipsis($line: 1) {
2
+ display: -webkit-box;
3
+ -webkit-line-clamp: $line;
4
+ -webkit-box-orient: vertical;
5
+ overflow: hidden;
6
+ }
7
+
8
+ @mixin icon($size: var(--medium-icon-size), $color: var(--text-color)) {
9
+ width : 100%;
10
+ height : 100%;
11
+ max-width : $size;
12
+ max-height: $size;
13
+ fill : $color;
14
+ }
15
+
16
+ $tabletLowerWidth : 576px;
17
+ $desktopLowerWidth: 992px;
18
+ $contentsMaxWidth : 1200px;
19
+
20
+ @mixin media($range) {
21
+ @if $range == 'mobile' {
22
+ @container (width <= #{$tabletLowerWidth}) { @content; }
23
+ } @else if $range == 'tablet' {
24
+ @container (#{$tabletLowerWidth} <= width) { @content; }
25
+ } @else if $range == 'desktop' {
26
+ @container (#{$desktopLowerWidth} <= width) { @content; }
27
+ }
28
+ }
29
+
30
+
31
+
32
+
33
+
@@ -0,0 +1,310 @@
1
+ <script setup lang="ts">
2
+ import type {
3
+ Article,
4
+ Category,
5
+ PostConfig,
6
+ } from '../../../types'
7
+ import CardContainer from '../../../components/ArticleList/Parts/CardContainer.vue'
8
+ import ThumbnailImage from '../../../components/ArticleList/Parts/ThumbnailImage.vue'
9
+ import AuthorInfo from '../../../components/ArticleList/Parts/AuthorInfo.vue'
10
+ import CardHeading from '../../../components/ArticleList/Parts/CardHeading.vue'
11
+ import CategoryList from '../../../components/ArticleList/Parts/CategoryList.vue'
12
+ import TagList from '../../../components/ArticleList/Parts/TagList.vue'
13
+ import PostedDate from '../../../components/ArticleList/Parts/PostedDate.vue'
14
+ import ExcerptText from '../../../components/ArticleList/Parts/ExcerptText.vue'
15
+
16
+ defineProps<{
17
+ article: Article
18
+ path: string
19
+ isPickUpItem: boolean
20
+ postConfig: PostConfig
21
+ categories: Category[]
22
+ }>()
23
+ </script>
24
+
25
+ <template>
26
+ <div :class="[$style.wrapper, { [$style.pickup]: isPickUpItem }]">
27
+ <CardContainer
28
+ v-if="article"
29
+ :class="$style.container"
30
+ :path="path"
31
+ >
32
+ <ThumbnailImage
33
+ :article="article"
34
+ :aspectRatio="{
35
+ desktop: isPickUpItem ? '21/9' : '4/3',
36
+ tablet : isPickUpItem ? '21/9' : '4/3',
37
+ mobile : '4/3',
38
+ }"
39
+ :class="$style.thumbnail"
40
+ style="grid-area: thumbnail;"
41
+ />
42
+ <div :class="$style.overlay">
43
+ <ExcerptText
44
+ :excerpt="article.excerpt.rendered"
45
+ :class="$style.excerpt"
46
+ color="var(--white)"
47
+ style="grid-area: excerpt;"
48
+ />
49
+ </div>
50
+ <PostedDate
51
+ :date="article.date"
52
+ formatString="yy.M.d"
53
+ :class="$style.date"
54
+ style="grid-area: date;"
55
+ />
56
+ <CardHeading
57
+ :heading="article.title.rendered"
58
+ :class="$style.heading"
59
+ style="grid-area: heading;"
60
+ />
61
+ <TagList
62
+ v-if="postConfig.tag"
63
+ :article="article"
64
+ :label="{
65
+ color : 'var(--text-color)',
66
+ fontSize: 'smaller',
67
+ }"
68
+ :class="$style.tag"
69
+ delimiter="/"
70
+ style="grid-area: tag;"
71
+ />
72
+ <AuthorInfo
73
+ v-if="postConfig.author"
74
+ :avatarUrls="article._embedded.author[0].avatar_urls"
75
+ :thumbnail="{
76
+ size: 'large',
77
+ shape: 'circle'
78
+ }"
79
+ :class="$style.author"
80
+ style="grid-area: author;"
81
+ />
82
+ <CategoryList
83
+ v-if="postConfig.category && article.categories"
84
+ :categoryIds="article.categories"
85
+ :categoryData="categories"
86
+ :label="{
87
+ backgroundColor: 'var(--main-color)',
88
+ color : 'var(--white)',
89
+ fontSize : 'small',
90
+ }"
91
+ :class="$style.category"
92
+ style="grid-area: category;"
93
+ />
94
+ </CardContainer>
95
+ </div>
96
+ </template>
97
+
98
+ <style lang="scss" module>
99
+ @use '../../../assets/scss/mixin' as *;
100
+
101
+ @mixin borderOnHover {
102
+ content : '';
103
+ display : block;
104
+ background-color: var(--primary-color);
105
+ position : absolute;
106
+ transition : all var(--animation-duration);
107
+ }
108
+
109
+ .wrapper {
110
+ display : block;
111
+ width : 100%;
112
+ height : 100%;
113
+ position : relative;
114
+ box-shadow: 0 0 var(--sp-medium) 0 rgba(var(--black-rgb), .1);
115
+
116
+ &::before,
117
+ &::after {
118
+ @include borderOnHover;
119
+ width : 0;
120
+ height: 2px;
121
+ }
122
+
123
+ &::before {
124
+ top : -2px;
125
+ left: -2px;
126
+ }
127
+
128
+ &::after {
129
+ bottom: -2px;
130
+ right : -2px;
131
+ }
132
+
133
+ &:hover {
134
+ &::before,
135
+ &::after {
136
+ width: calc(100% + 4px);
137
+ }
138
+
139
+ .container {
140
+ &::before,
141
+ &::after {
142
+ height: calc(100% + 4px);
143
+ }
144
+ }
145
+
146
+ .overlay,
147
+ .excerpt {
148
+ opacity: 1;
149
+ }
150
+ }
151
+
152
+ &.pickup {
153
+ @include media('tablet') {
154
+ aspect-ratio: 21/9;
155
+
156
+ .container {
157
+ grid-template-rows: 0 0 0 auto auto 1fr 0;
158
+ grid-template-areas:
159
+ 'excerpt'
160
+ 'category'
161
+ 'thumbnail'
162
+ 'heading'
163
+ 'date'
164
+ 'tag'
165
+ 'author';
166
+ }
167
+
168
+ .thumbnail {
169
+ opacity: .4;
170
+ position: absolute;
171
+ top : 0;
172
+ left : 0;
173
+ }
174
+
175
+ .heading,
176
+ .date,
177
+ .tag,
178
+ .author,
179
+ .category {
180
+ position: relative;
181
+ z-index : 2;
182
+ }
183
+
184
+ .category,
185
+ .author {
186
+ position: absolute;
187
+ }
188
+
189
+ .excerpt {
190
+ display : flex;
191
+ align-items : flex-end;
192
+ padding-block-end: var(--sp-large);
193
+ }
194
+
195
+ .category {
196
+ top : 0;
197
+ left: 0;
198
+ }
199
+
200
+ .author {
201
+ margin: 0;
202
+ bottom: var(--sp-large);
203
+ right : var(--sp-large);
204
+ }
205
+
206
+ .heading {
207
+ padding-block-start: var(--sp-large);
208
+ font-size : xx-large;
209
+ }
210
+
211
+ .tag {
212
+ display : flex;
213
+ align-items: flex-start;
214
+ margin : 0;
215
+ }
216
+ }
217
+ }
218
+ }
219
+
220
+ .container {
221
+ grid-template-columns: 1fr;
222
+ grid-template-rows : 0 fit-content(55%) auto auto 1fr auto auto;
223
+ grid-template-areas :
224
+ 'excerpt'
225
+ 'thumbnail'
226
+ 'date'
227
+ 'heading'
228
+ 'tag'
229
+ 'author'
230
+ 'category';
231
+ text-align: center;
232
+ position : relative;
233
+ height : 100%;
234
+
235
+ &::before,
236
+ &::after {
237
+ @include borderOnHover;
238
+ width : 2px;
239
+ height: 0;
240
+ }
241
+
242
+ &::before {
243
+ bottom: -2px;
244
+ left : -2px;
245
+ }
246
+
247
+ &::after {
248
+ top : -2px;
249
+ right: -2px;
250
+ }
251
+ }
252
+
253
+ .overlay,
254
+ .excerpt {
255
+ width : 100%;
256
+ max-height : 100%;
257
+ position : absolute;
258
+ opacity : 1;
259
+ aspect-ratio: 4/3;
260
+
261
+ @include media('desktop') {
262
+ opacity: 0;
263
+ }
264
+ }
265
+
266
+ .date {
267
+ display : flex;
268
+ justify-content: center;
269
+ margin-block : calc(var(--bv) * 2) var(--bv);
270
+ }
271
+
272
+ .heading {
273
+ padding: 0 calc(var(--bv) * 2);
274
+ }
275
+
276
+ .excerpt {
277
+ display : flex;
278
+ justify-content: center;
279
+ align-items : center;
280
+ height : 100%;
281
+ padding : 0 calc(var(--bv) * 2);
282
+ position : absolute;
283
+ top : 0;
284
+ }
285
+
286
+ .author {
287
+ justify-content: center;
288
+ margin-block : var(--sp-large);
289
+ }
290
+
291
+ .category {
292
+ display : flex;
293
+ justify-content: center;
294
+ }
295
+
296
+ .overlay {
297
+ background-image: linear-gradient(to bottom,
298
+ rgb(var(--black-rgb), 0) 0%,
299
+ rgba(var(--black-rgb), .5) 66%,
300
+ rgba(var(--black-rgb), .8) 100%);
301
+ backdrop-filter : blur(4px);
302
+ }
303
+
304
+ .tag {
305
+ display : flex;
306
+ align-items : center;
307
+ justify-content: center;
308
+ margin-block : var(--sp-medium);
309
+ }
310
+ </style>