@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
@@ -0,0 +1,244 @@
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
+ <CardContainer
27
+ v-if="article"
28
+ :class="[$style.container, { [$style.pickup]: isPickUpItem} ]"
29
+ :path="path"
30
+ >
31
+ <div :class="$style.date">
32
+ <PostedDate
33
+ :date="article.date"
34
+ :class="$style.year"
35
+ formatString="yyyy"
36
+ fontSize="medium"
37
+ fontWeight="bold"
38
+ color="var(--text-color)"
39
+ />
40
+ <PostedDate
41
+ :date="article.date"
42
+ :class="$style.month"
43
+ formatString="M"
44
+ fontSize="xxx-large"
45
+ fontWeight="bold"
46
+ color="var(--text-color)"
47
+ />
48
+ <PostedDate
49
+ :date="article.date"
50
+ :class="$style.day"
51
+ formatString="d"
52
+ fontSize="xxx-large"
53
+ fontWeight="bold"
54
+ color="var(--text-color)"
55
+ />
56
+ </div>
57
+ <ThumbnailImage
58
+ :article="article"
59
+ :aspectRatio="{
60
+ desktop: isPickUpItem ? '21/9' : '4/3',
61
+ tablet : isPickUpItem ? '16/9' : '4/3',
62
+ mobile : isPickUpItem ? '4/3' : '4/3',
63
+ }"
64
+ :class="$style.thumbnail"
65
+ />
66
+ <div :class="$style.contents">
67
+ <CategoryList
68
+ v-if="postConfig.category && article.categories"
69
+ :categoryIds="article.categories"
70
+ :categoryData="categories"
71
+ :label="{
72
+ color : 'var(--main-color)',
73
+ fontSize: 'small',
74
+ fontWeight: 'bold',
75
+ }"
76
+ :class="$style.category"
77
+ />
78
+ <CardHeading
79
+ :heading="article.title.rendered"
80
+ :class="$style.heading"
81
+ />
82
+ <div :class="$style.row">
83
+ <TagList
84
+ v-if="postConfig.tag"
85
+ :article="article"
86
+ :label="{
87
+ color : 'var(--text-color)',
88
+ fontSize: 'small',
89
+ }"
90
+ :class="$style.tag"
91
+ delimiter="/"
92
+ />
93
+ <AuthorInfo
94
+ v-if="postConfig.author"
95
+ :avatarUrls="article._embedded.author[0].avatar_urls"
96
+ :class="$style.author"
97
+ :thumbnail="{
98
+ size: 'medium',
99
+ shape: 'circle',
100
+ }"
101
+ />
102
+ </div>
103
+ <ExcerptText
104
+ :excerpt="article.excerpt.rendered"
105
+ :class="$style.excerpt"
106
+ />
107
+ </div>
108
+ </CardContainer>
109
+ </template>
110
+
111
+ <style lang="scss" module>
112
+ @use '../../../assets/scss/mixin' as *;
113
+
114
+ .thumbnail {
115
+ margin-top: calc(-1 * (var(--bv) * 2));
116
+ overflow : hidden;
117
+
118
+ img {
119
+ transition: scale var(--animation-duration);
120
+ }
121
+ }
122
+
123
+ .date {
124
+ display : flex;
125
+ align-items : flex-start;
126
+ justify-content : flex-end;
127
+ gap : var(--sp-small);
128
+ margin-inline-end: var(--sp-medium);
129
+ position : relative;
130
+ z-index : 2;
131
+ }
132
+
133
+ .year {
134
+ margin-block-start: var(--sp-small);
135
+ }
136
+
137
+ .month,
138
+ .day {
139
+ line-height: 1;
140
+ }
141
+
142
+ .month {
143
+ display : flex;
144
+ align-items: center;
145
+
146
+ &::after {
147
+ content : '';
148
+ position : relative;
149
+ margin-inline-start: var(--sp-small);
150
+ display : block;
151
+ width : 1px;
152
+ height : calc(1em - var(--sp-medium));
153
+ background-color : var(--text-color);
154
+ }
155
+ }
156
+
157
+ .contents {
158
+ display : flex;
159
+ flex-grow : 1;
160
+ flex-direction : column;
161
+ height : auto;
162
+ margin : calc(-1 * var(--sp-large)) var(--sp-medium) 0;
163
+ background-color: var(--white);
164
+ position : relative;
165
+ z-index : 1;
166
+ }
167
+
168
+ .category {
169
+ padding: var(--sp-medium);
170
+ }
171
+
172
+ .heading {
173
+ flex-grow: 1;
174
+ padding : 0 var(--sp-medium);
175
+ }
176
+
177
+ .row {
178
+ display: flex;
179
+ gap : var(--bv);
180
+ padding: var(--sp-medium);
181
+ justify-content: flex-end;
182
+ }
183
+
184
+ .author {
185
+ margin-inline-start: auto;
186
+ }
187
+
188
+ .excerpt {
189
+ --line-height: 1.8;
190
+ flex : 0 0 auto;
191
+ line-height : var(--line-height);
192
+ height : calc(var(--line-height) * 3 * 1em + var(--sp-medium) * 2);
193
+ padding : var(--sp-medium);
194
+ border-block-start: 1px solid var(--border-color);
195
+ }
196
+
197
+ .container {
198
+ display : flex;
199
+ flex-direction: column;
200
+ width : 100%;
201
+ height : 100%;
202
+ position : relative;
203
+
204
+ &:hover {
205
+ .thumbnail {
206
+ img {
207
+ scale: 1.1;
208
+ }
209
+ }
210
+ }
211
+
212
+ &.pickup {
213
+ @include media('tablet') {
214
+ aspect-ratio : 16/9;
215
+ justify-content: center;
216
+ align-items : flex-end;
217
+
218
+ .thumbnail {
219
+ margin : 0;
220
+ position: absolute;
221
+ top : 0;
222
+ left : 0;
223
+ }
224
+
225
+ .contents {
226
+ flex : 0 0 auto;
227
+ margin : 0;
228
+ margin-block-start: calc(-1 * var(--sp-medium));
229
+ background-color : rgba(255, 255, 255, .7);
230
+ }
231
+
232
+ .heading {
233
+ > h2 {
234
+ font-size: xx-large;
235
+ }
236
+ }
237
+ }
238
+
239
+ @include media('desktop') {
240
+ aspect-ratio: 21/9;
241
+ }
242
+ }
243
+ }
244
+ </style>
@@ -0,0 +1,254 @@
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
+ <CardContainer
27
+ v-if="article"
28
+ :class="[$style.container, { [$style.pickup]: isPickUpItem} ]"
29
+ :path="path"
30
+ >
31
+ <ThumbnailImage
32
+ :article="article"
33
+ :aspectRatio="{
34
+ desktop: isPickUpItem ? '2.85/1' : '4/3',
35
+ tablet : isPickUpItem ? '16/9' : '4/3',
36
+ mobile : isPickUpItem ? '4/3' : '4/3',
37
+ }"
38
+ :class="$style.thumbnail"
39
+ style="grid-area: thumbnail;"
40
+ />
41
+ <CardHeading
42
+ :heading="article.title.rendered"
43
+ :class="$style.heading"
44
+ color="var(--white)"
45
+ style="grid-area: heading;"
46
+ />
47
+ <PostedDate
48
+ :date="article.date"
49
+ :class="$style.date"
50
+ :fontSize="isPickUpItem ? 'medium' : 'small'"
51
+ formatString="yyyy.M.d"
52
+ color="var(--white)"
53
+ fontWeight="bold"
54
+ style="grid-area: date;"
55
+ />
56
+ <AuthorInfo
57
+ v-if="postConfig.author"
58
+ :name="article._embedded.author[0].name"
59
+ :class="$style.author"
60
+ :text="{
61
+ color : 'var(--white)',
62
+ fontSize : isPickUpItem ? 'medium' : 'small',
63
+ fontWeight: 'bold',
64
+ }"
65
+ style="grid-area: author;"
66
+ />
67
+ <CategoryList
68
+ v-if="postConfig.category && article.categories"
69
+ :categoryIds="article.categories"
70
+ :categoryData="categories"
71
+ :label="{
72
+ color : 'var(--white)',
73
+ fontSize: isPickUpItem ? 'medium': 'small',
74
+ }"
75
+ :class="$style.category"
76
+ style="grid-area: category;"
77
+ />
78
+ <TagList
79
+ v-if="postConfig.tag"
80
+ :article="article"
81
+ :label="{
82
+ color : 'var(--white)',
83
+ fontSize: isPickUpItem ? 'medium': 'small',
84
+ }"
85
+ :class="$style.tag"
86
+ delimiter="/"
87
+ style="grid-area: tag;"
88
+ />
89
+ <ExcerptText
90
+ :excerpt="article.excerpt.rendered"
91
+ :class="$style.excerpt"
92
+ color="var(--white)"
93
+ fontSize="small"
94
+ :row="2"
95
+ style="grid-area: excerpt;"
96
+ />
97
+ </CardContainer>
98
+ </template>
99
+
100
+ <style lang="scss" module>
101
+ @use '../../../assets/scss/mixin' as *;
102
+
103
+ .container {
104
+ grid-template-columns: auto 1fr;
105
+ grid-template-rows : 0 auto 1fr auto auto fit-content(20%);
106
+ grid-template-areas :
107
+ 'thumbnail thumbnail'
108
+ 'heading heading'
109
+ 'date author'
110
+ 'category category'
111
+ 'tag tag'
112
+ 'excerpt excerpt';
113
+ position : relative;
114
+ width : 100%;
115
+ aspect-ratio: 4/3;
116
+ overflow : hidden;
117
+
118
+ &:hover {
119
+ &::before {
120
+ opacity: 0;
121
+ }
122
+
123
+ &::after {
124
+ opacity: 1;
125
+ }
126
+
127
+ .thumbnail {
128
+ img {
129
+ filter: blur(2px);
130
+ scale: 1.04;
131
+ }
132
+ }
133
+
134
+ .category,
135
+ .tag,
136
+ .excerpt {
137
+ opacity: 1;
138
+ }
139
+ }
140
+
141
+ &::before,
142
+ &::after {
143
+ content : '';
144
+ display : block;
145
+ width : 100%;
146
+ height : 100%;
147
+ aspect-ratio : 4/3;
148
+ mix-blend-mode: hard-light;
149
+ position : absolute;
150
+ top : 0;
151
+ left : 0;
152
+ transition : all var(--animation-duration);
153
+ z-index : 2;
154
+ }
155
+
156
+ &::before {
157
+ background-image: linear-gradient(
158
+ to bottom,
159
+ rgba(var(--black-rgb), .6) 0%,
160
+ rgba(var(--black-rgb), 0) 62%,
161
+ rgba(var(--black-rgb), 0) 100%
162
+ );
163
+ opacity: 1;
164
+ }
165
+
166
+ &::after {
167
+ background-color: rgba(var(--black-rgb), .8);
168
+ opacity : 0;
169
+ }
170
+
171
+ > *:not(.thumbnail) {
172
+ transition : opacity var(--animation-duration);
173
+ position : relative;
174
+ z-index : 3;
175
+ padding-inline: var(--sp-medium);
176
+ }
177
+
178
+ @include media('tablet') {
179
+ &.pickup {
180
+ aspect-ratio: 16/9;
181
+
182
+ @include media('desktop') {
183
+ aspect-ratio: 2.85/1;
184
+ }
185
+
186
+ > *:not(.thumbnail) {
187
+ padding-left : var(--sp-large);
188
+ padding-right: var(--sp-large);
189
+ }
190
+
191
+ &::before {
192
+ aspect-ratio: 16/9;
193
+
194
+ @include media('desktop') {
195
+ aspect-ratio: 2.85/1;
196
+ }
197
+ }
198
+
199
+ .heading {
200
+ font-size: xx-large;
201
+ }
202
+
203
+ .tag {
204
+ margin-block: var(--sp-medium) var(--sp-large);
205
+ }
206
+
207
+ .excerpt {
208
+ padding: var(--sp-large);
209
+ }
210
+ }
211
+ }
212
+ }
213
+
214
+ .thumbnail {
215
+ position : absolute;
216
+ top : 0;
217
+ left : 0;
218
+ transition: filter var(--animation-duration);
219
+ z-index : 1;
220
+
221
+ > img {
222
+ transition: scale var(--animation-duration);
223
+ }
224
+ }
225
+
226
+ .category,
227
+ .tag,
228
+ .excerpt {
229
+ opacity: 0;
230
+ }
231
+
232
+ .heading {
233
+ margin-block: var(--sp-medium);
234
+ }
235
+
236
+ .date,
237
+ .author {
238
+ align-items: flex-start;
239
+ }
240
+
241
+ .author {
242
+ padding-left: 0;
243
+ }
244
+
245
+ .category,
246
+ .tag {
247
+ margin-block-end: var(--sp-medium);
248
+ }
249
+
250
+ .excerpt {
251
+ padding-block : var(--sp-medium);
252
+ border-block-start: 1px solid var(--white);
253
+ }
254
+ </style>