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