@asd20/ui 3.2.658 → 3.2.659

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.
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "*.scss",
6
6
  "*.vue"
7
7
  ],
8
- "version": "3.2.658",
8
+ "version": "3.2.659",
9
9
  "private": false,
10
10
  "license": "MIT",
11
11
  "repository": {
@@ -0,0 +1,60 @@
1
+ import { storiesOf } from '@storybook/vue'
2
+ import { withKnobs, boolean } from '@storybook/addon-knobs'
3
+
4
+ import mockPageMixin from '../../../mixins/mockPageMixin'
5
+
6
+ import Asd20DetailImageFullTemplate from '.'
7
+ import pageQueryResult from '../../../data/page-queries/sublanding-page-query-result.json'
8
+ import notifications from '../../../data/messages/notifications'
9
+
10
+ const info = {
11
+ summary: 'Detail Image Page Full Template',
12
+ }
13
+
14
+ const wrapper = {
15
+ mixins: [mockPageMixin],
16
+ components: {
17
+ Asd20DetailImageFullTemplate,
18
+ },
19
+
20
+ data: () => ({ pageQueryResult, languageCode: 'en' }),
21
+
22
+
23
+ computed: {
24
+ activeNotificationsByType() {
25
+ const empty = {
26
+ inline: [],
27
+ banner: [],
28
+ floating: [],
29
+ status: [],
30
+ }
31
+ return boolean('Show Notifications', false)
32
+ ? notifications || empty
33
+ : empty
34
+ },
35
+ },
36
+ }
37
+
38
+ const stories = storiesOf('Templates - Asd20DetailImageFullTemplate', module)
39
+ stories.addDecorator(withKnobs)
40
+
41
+ stories.add(
42
+ 'Default',
43
+ () => ({
44
+ ...wrapper,
45
+ template: `
46
+ <Asd20DetailImageFullTemplate
47
+ v-bind="templateProps"
48
+ :menu-open.sync="menuOpen"
49
+ :search-open.sync="searchOpen"
50
+ :languageCode.sync="languageCode"
51
+
52
+ @announcements-in-view="loadAnnouncements"
53
+ @stories-in-view="loadStories"
54
+ @events-in-view="loadEvents"
55
+ @files-in-view="loadFiles"
56
+
57
+ />`,
58
+ }),
59
+ { info }
60
+ )
@@ -0,0 +1,273 @@
1
+ <template>
2
+ <div class="asd20-template-detail-image-full">
3
+ <!-- Skip Nav -->
4
+ <asd20-skip-to />
5
+
6
+ <!-- Site Navigation -->
7
+ <asd20-site-navigation
8
+ :navigation="navigation"
9
+ :action-items="actionItems"
10
+ @update:menuOpen="$emit('update:menuOpen', $event)"
11
+ :menu-open="menuOpen"
12
+ @update:searchOpen="$emit('update:searchOpen', $event)"
13
+ :search-open="searchOpen"
14
+ :organization="organization"
15
+ :organization-options="organizationOptions"
16
+ >
17
+ </asd20-site-navigation>
18
+
19
+ <!-- Banner Notifications -->
20
+ <client-only>
21
+ <asd20-notification-group
22
+ :notifications="activeNotificationsByType.banner"
23
+ group-type="banner"
24
+ @dismiss="$emit('dismiss-notification', $event)"
25
+ @toggle-all="$emit('toggle-all')"
26
+ />
27
+ </client-only>
28
+
29
+ <!-- Page Header -->
30
+ <asd20-image-header
31
+ id="image-header"
32
+ v-if="pageHeaderContent"
33
+ v-bind="pageHeaderContent"
34
+ :organization="organization"
35
+ :organization-options="organizationOptions"
36
+ :languageCode="languageCode"
37
+ :breadcrumb-links="breadcrumbLinks"
38
+ :publishDateTime="parentPage ? '' : publishDateTime"
39
+ :modifiedDateTime="parentPage ? '' : modifiedDateTime"
40
+ :categories="parentPage ? [] : messageCategories"
41
+ v-on="$listeners"
42
+ >
43
+ <!-- Floating Notifications -->
44
+ <template slot="top">
45
+ <client-only>
46
+ <asd20-notification-group
47
+ class="asd20-notification-group--floating"
48
+ :notifications="activeNotificationsByType.floating"
49
+ :total-dismissed-notifications="totalDismissedNotifications"
50
+ group-type="floating"
51
+ @dismiss="$emit('dismiss-notification', $event)"
52
+ @toggle-all="$emit('toggle-all')"
53
+ ></asd20-notification-group>
54
+ </client-only>
55
+ </template>
56
+ </asd20-image-header>
57
+
58
+ <!-- Inline-Notifications -->
59
+ <client-only>
60
+ <asd20-notification-group
61
+ :notifications="activeNotificationsByType.inline"
62
+ group-type="inline"
63
+ @dismiss="$emit('dismiss-notification', $event)"
64
+ @toggle-all="$emit('toggle-all')"
65
+ ></asd20-notification-group>
66
+ </client-only>
67
+
68
+ <!-- Page Content -->
69
+ <asd20-page-content
70
+ :primary-messages="primaryDetailMessages"
71
+ :secondary-messages="secondaryMessages"
72
+ omit-detail-links
73
+ omit-calls-to-action
74
+ >
75
+ <!-- Sidebar Widgets -->
76
+ <!-- <asd20-widgets-section
77
+ v-if="widgetsSectionProps.sidebar"
78
+ v-bind="widgetsSectionProps.sidebar"
79
+ @events-in-view="$emit('events-in-view')"
80
+ @files-in-view="$emit('files-in-view')"
81
+ @people-in-view="$emit('people-in-view')"
82
+ ></asd20-widgets-section> -->
83
+ </asd20-page-content>
84
+
85
+ <!-- Feeds -->
86
+ <asd20-feeds-section
87
+ :announcements="announcements"
88
+ :announcements-feed-props="announcementsFeedProps"
89
+ @announcements-in-view="$emit('announcements-in-view')"
90
+ :stories="stories"
91
+ :stories-feed-props="storiesFeedProps"
92
+ @stories-in-view="$emit('stories-in-view')"
93
+ :events="events"
94
+ :events-feed-props="eventsFeedProps"
95
+ @events-in-view="$emit('events-in-view')"
96
+ ></asd20-feeds-section>
97
+
98
+ <asd20-media-section
99
+ v-if="combinedMessageImages.length > 1 || combinedMessageVideos.length"
100
+ :images="this.combinedMessageImages || []"
101
+ :videos="this.combinedMessageVideos || []"
102
+ >
103
+ </asd20-media-section>
104
+
105
+ <!-- Bottom Widgets -->
106
+ <asd20-widgets-section
107
+ v-if="widgetsSectionProps.sidebar"
108
+ v-bind="widgetsSectionProps.sidebar"
109
+ @events-in-view="$emit('events-in-view')"
110
+ @files-in-view="$emit('files-in-view')"
111
+ @people-in-view="$emit('people-in-view')"
112
+ ></asd20-widgets-section>
113
+ <asd20-widgets-section
114
+ v-if="widgetsSectionProps.footer || $slots.widgets"
115
+ v-bind="widgetsSectionProps.footer"
116
+ @events-in-view="$emit('events-in-view')"
117
+ @files-in-view="$emit('files-in-view')"
118
+ full
119
+ ><slot name="widgets"
120
+ /></asd20-widgets-section>
121
+
122
+ <!-- Quick Links -->
123
+ <asd20-quicklinks-menu slot="before-footer" :quick-links="quickLinks">
124
+ <slot name="quicklinks-menu" />
125
+ </asd20-quicklinks-menu>
126
+
127
+ <!-- Footer -->
128
+ <asd20-page-footer
129
+ :organization="organization"
130
+ :socialLinks="socialLinks"
131
+ :disclosureLinks="disclosureLinks"
132
+ :websiteLogoProps="websiteLogoProps"
133
+ >
134
+ <slot name="page-footer" />
135
+ </asd20-page-footer>
136
+ </div>
137
+ </template>
138
+
139
+ <script>
140
+ // Components
141
+ import Asd20SkipTo from '../../../components/atoms/Asd20SkipTo'
142
+ import Asd20ImageHeader from '../../../components/organisms/Asd20ImageHeader'
143
+
144
+ import Asd20SiteNavigation from '../../../components/organisms/Asd20SiteNavigation'
145
+ import Asd20PageContent from '../../../components/organisms/Asd20PageContent'
146
+
147
+ import Asd20WidgetsSection from '../../../components/organisms/Asd20WidgetsSection'
148
+ import Asd20FeedsSection from '../../../components/organisms/Asd20FeedsSection'
149
+ import Asd20MediaSection from '../../../components/organisms/Asd20MediaSection'
150
+
151
+ import Asd20PageFooter from '../../../components/organisms/Asd20PageFooter'
152
+ import Asd20QuicklinksMenu from '../../../components/organisms/Asd20QuicklinksMenu'
153
+ import Asd20NotificationGroup from '@asd20/notifications-ui/src/components/Asd20NotificationGroup'
154
+
155
+ // Mixins
156
+ import pageTemplateMixin from '../../../mixins/pageTemplateMixin'
157
+
158
+ export default {
159
+ name: 'Asd20DetailImageTemplate',
160
+ mixins: [pageTemplateMixin],
161
+ components: {
162
+ Asd20PageContent,
163
+ Asd20SkipTo,
164
+ Asd20ImageHeader,
165
+ Asd20PageFooter,
166
+ Asd20SiteNavigation,
167
+ Asd20WidgetsSection,
168
+ Asd20FeedsSection,
169
+ Asd20NotificationGroup,
170
+ Asd20QuicklinksMenu,
171
+ Asd20MediaSection,
172
+ },
173
+ }
174
+ </script>
175
+
176
+ <style lang="scss">
177
+ @import '../../../design/_variables.scss';
178
+ @import '../../../design/_mixins.scss';
179
+ @import '../../../design/_typography.scss';
180
+ @import '../../../design/_template.scss';
181
+ @import '../../../design/_print.scss';
182
+ @import '../../../design/tokens.css';
183
+
184
+ .asd20-template-detail-image-full {
185
+ @include typography;
186
+ @include template;
187
+ display: flex;
188
+ flex-direction: column;
189
+ flex-grow: 1;
190
+ flex-shrink: 0;
191
+ overflow: hidden;
192
+ margin-top: space(2.25);
193
+ .asd20-notification-group--floating {
194
+ position: absolute;
195
+ top: space(1.5375);
196
+ // .bell {
197
+ // box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.125) !important;
198
+ // svg {
199
+ // fill: var(--color__accent) !important;
200
+ // }
201
+ // span {
202
+ // background: var(--color__accent) !important;
203
+ // top: inherit !important;
204
+ // right: inherit !important;
205
+ // width: 1.2rem !important;
206
+ // height: 1.2rem !important;
207
+ // font-size: 0.75rem !important;
208
+ // }
209
+ // }
210
+ }
211
+ // .asd20-page-content h2 {
212
+ // font-size: 20.8px !important;
213
+ // }
214
+ }
215
+
216
+ @media (min-width: 768px) {
217
+ .asd20-template-detail-image-full {
218
+ .asd20-notification-group--floating {
219
+ position: absolute;
220
+ top: space(0.5);
221
+ // .bell {
222
+ // box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.125) !important;
223
+ // svg {
224
+ // fill: var(--color__accent) !important;
225
+ // }
226
+ // span {
227
+ // background: var(--color__accent) !important;
228
+ // top: inherit !important;
229
+ // right: inherit !important;
230
+ // width: 1.2rem !important;
231
+ // height: 1.2rem !important;
232
+ // font-size: 0.75rem !important;
233
+ // }
234
+ // }
235
+ }
236
+ }
237
+ }
238
+
239
+ @media (min-width: 1024px) {
240
+ .asd20-template-detail-image-full {
241
+ @include template-desktop;
242
+ margin-left: space(3);
243
+ margin-top: 0;
244
+ .asd20-notification-group--floating {
245
+ position: absolute;
246
+ top: space(1);
247
+ }
248
+ .notification-group--inline {
249
+ margin: space(2) space(3) space(1) space(3);
250
+ flex-basis: 100%;
251
+ margin-bottom: 0 !important;
252
+ }
253
+
254
+ .asd20-page-content {
255
+ // margin-top: space(1);
256
+ display: flex;
257
+ justify-content: space-between;
258
+ align-items: stretch;
259
+ flex-wrap: wrap;
260
+ // .asd20-widgets-section {
261
+ // flex-basis: 30%;
262
+ // padding: space(2) space(2) 0 0;
263
+ // background: none;
264
+ // }
265
+ .primary-messaging-section {
266
+ display: block;
267
+ padding: space(2);
268
+ // max-width: 50vw;
269
+ }
270
+ }
271
+ }
272
+ }
273
+ </style>