@wow-two-beta/fe 0.0.50 → 0.0.51
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/dist/index.js +392 -383
- package/dist/index.js.map +1 -1
- package/dist/presentation/actions/button/Button.variants.d.ts +12 -0
- package/dist/presentation/actions/button/Button.variants.js +18 -2
- package/dist/presentation/actions/button/Button.variants.js.map +1 -1
- package/dist/presentation/actions/button/Button.vue.d.ts +8 -1
- package/dist/presentation/actions/button/Button.vue.js +106 -58
- package/dist/presentation/actions/button/Button.vue.js.map +1 -1
- package/dist/presentation/actions/refreshButton/RefreshButton.vue.js.map +1 -1
- package/dist/presentation/display/badge/Badge.variants.d.ts +23 -1
- package/dist/presentation/display/badge/Badge.variants.js +18 -3
- package/dist/presentation/display/badge/Badge.variants.js.map +1 -1
- package/dist/presentation/display/badge/Badge.vue.d.ts +3 -0
- package/dist/presentation/display/badge/Badge.vue.js +10 -4
- package/dist/presentation/display/badge/Badge.vue.js.map +1 -1
- package/dist/presentation/display/carousel/Carousel.variants.d.ts +65 -0
- package/dist/presentation/display/carousel/Carousel.variants.js +56 -0
- package/dist/presentation/display/carousel/Carousel.variants.js.map +1 -0
- package/dist/presentation/display/carousel/Carousel.vue.d.ts +7 -0
- package/dist/presentation/display/carousel/Carousel.vue.js +7 -2
- package/dist/presentation/display/carousel/Carousel.vue.js.map +1 -1
- package/dist/presentation/display/carousel/CarouselContext.d.ts +10 -0
- package/dist/presentation/display/carousel/CarouselContext.js.map +1 -1
- package/dist/presentation/display/carousel/CarouselNext.vue.d.ts +6 -2
- package/dist/presentation/display/carousel/CarouselNext.vue.js +12 -4
- package/dist/presentation/display/carousel/CarouselNext.vue.js.map +1 -1
- package/dist/presentation/display/carousel/CarouselPrev.vue.d.ts +6 -2
- package/dist/presentation/display/carousel/CarouselPrev.vue.js +12 -4
- package/dist/presentation/display/carousel/CarouselPrev.vue.js.map +1 -1
- package/dist/presentation/display/carousel/CarouselViewport.vue.d.ts +13 -2
- package/dist/presentation/display/carousel/CarouselViewport.vue.js +54 -2
- package/dist/presentation/display/carousel/CarouselViewport.vue.js.map +1 -1
- package/dist/presentation/display/carousel/index.d.ts +1 -0
- package/dist/presentation/display/index.d.ts +1 -0
- package/dist/presentation/display/index.js +120 -111
- package/dist/presentation/display/index.js.map +1 -1
- package/dist/presentation/display/mediaCard/MediaCard.vue.d.ts +41 -0
- package/dist/presentation/display/mediaCard/MediaCard.vue.js +108 -0
- package/dist/presentation/display/mediaCard/MediaCard.vue.js.map +1 -0
- package/dist/presentation/display/mediaCard/MediaCard2.vue.js +5 -0
- package/dist/presentation/display/mediaCard/MediaCard2.vue.js.map +1 -0
- package/dist/presentation/display/mediaCard/index.d.ts +1 -0
- package/dist/presentation/display/metaInlineText/MetaInlineItem.vue.d.ts +37 -0
- package/dist/presentation/display/metaInlineText/MetaInlineItem.vue.js +72 -0
- package/dist/presentation/display/metaInlineText/MetaInlineItem.vue.js.map +1 -0
- package/dist/presentation/display/metaInlineText/MetaInlineItem2.vue.js +7 -0
- package/dist/presentation/display/metaInlineText/MetaInlineItem2.vue.js.map +1 -0
- package/dist/presentation/display/metaInlineText/index.d.ts +1 -0
- package/dist/presentation/layout/navbar/Navbar.vue.js.map +1 -1
- package/dist/presentation/nav/accountMenu/AccountMenu.vue.d.ts +1 -1
- package/dist/presentation/overlays/hoverCard/HoverCard.vue.d.ts +1 -1
- package/dist/presentation/overlays/tooltip/Tooltip.vue.d.ts +1 -1
- package/package.json +1 -1
|
@@ -71,64 +71,67 @@ import { default as default71 } from "./listGroup/ListGroup.vue.js";
|
|
|
71
71
|
import { default as default72 } from "./listGroup/ListGroupItem.vue.js";
|
|
72
72
|
import { default as default73 } from "./markText/MarkText.vue.js";
|
|
73
73
|
import { default as default74, MarqueeGroupDirection } from "./marqueeGroup/MarqueeGroup.vue.js";
|
|
74
|
-
import { default as default75 } from "./
|
|
75
|
-
import { default as default76 } from "./
|
|
76
|
-
import { default as default77,
|
|
77
|
-
import { default as default78 } from "./
|
|
78
|
-
import { default as default79 } from "./
|
|
79
|
-
import { default as default80
|
|
80
|
-
import { default as
|
|
81
|
-
import { default as
|
|
82
|
-
import { default as default84 } from "./
|
|
83
|
-
import { default as default85 } from "./
|
|
84
|
-
import { default as default86 } from "./
|
|
85
|
-
import { default as default87 } from "./
|
|
86
|
-
import { default as default88 } from "./
|
|
87
|
-
import { default as default89 } from "./
|
|
88
|
-
import { default as default90 } from "./
|
|
89
|
-
import { default as default91 } from "./
|
|
90
|
-
import { default as default92 } from "./
|
|
91
|
-
import { default as default93
|
|
92
|
-
import { default as default94
|
|
93
|
-
import { default as default95,
|
|
94
|
-
import { default as default96,
|
|
95
|
-
import { default as default97,
|
|
96
|
-
import { default as default98,
|
|
97
|
-
import { default as default99 } from "./
|
|
98
|
-
import { default as default100 } from "./
|
|
99
|
-
import { default as default101 } from "./
|
|
100
|
-
import { default as default102 } from "./stepperGroup/
|
|
101
|
-
import { default as default103 } from "./stepperGroup/
|
|
102
|
-
import { default as default104 } from "./
|
|
103
|
-
import { default as default105 } from "./
|
|
104
|
-
import { default as default106 } from "./table/
|
|
105
|
-
import { default as default107 } from "./table/
|
|
106
|
-
import { default as default108 } from "./table/
|
|
107
|
-
import { default as default109
|
|
108
|
-
import { default as default110 } from "./table/
|
|
109
|
-
import { default as default111 } from "./table/
|
|
110
|
-
import { default as default112 } from "./
|
|
111
|
-
import { default as default113 } from "./
|
|
112
|
-
import { default as default114 } from "./tabsGroup/
|
|
113
|
-
import { default as default115 } from "./tabsGroup/
|
|
114
|
-
import { default as default116 } from "./
|
|
115
|
-
import { default as default117 } from "./
|
|
116
|
-
import { default as default118 } from "./
|
|
117
|
-
import { default as default119 } from "./
|
|
118
|
-
import { default as default120 } from "./
|
|
119
|
-
import { default as default121 } from "./timeline/
|
|
120
|
-
import { default as default122 } from "./timeline/
|
|
121
|
-
import { default as default123 } from "./
|
|
122
|
-
import { default as default124 } from "./
|
|
123
|
-
import { default as default125 } from "./treeViewer/
|
|
124
|
-
import { default as default126 } from "./
|
|
125
|
-
import { default as default127 } from "./
|
|
126
|
-
import { default as default128 } from "./
|
|
127
|
-
import { default as default129 } from "./
|
|
128
|
-
import { default as default130
|
|
74
|
+
import { default as default75 } from "./mediaCard/MediaCard.vue.js";
|
|
75
|
+
import { default as default76 } from "./messageGroup/MessageGroup.vue.js";
|
|
76
|
+
import { default as default77, MetaInlineItemTone } from "./metaInlineText/MetaInlineItem.vue.js";
|
|
77
|
+
import { default as default78 } from "./metaInlineText/MetaInlineText.vue.js";
|
|
78
|
+
import { default as default79, MetricBadgeSize, MetricBadgeTone } from "./metricBadge/MetricBadge.vue.js";
|
|
79
|
+
import { default as default80 } from "./notificationCenterGroup/NotificationCenterButton.vue.js";
|
|
80
|
+
import { default as default81 } from "./notificationCenterGroup/NotificationCenterGroup.vue.js";
|
|
81
|
+
import { default as default82, default as default83 } from "./notificationCenterGroup/NotificationCenterGroupItem.vue.js";
|
|
82
|
+
import { default as default84, NotificationIndicatorSize, NotificationIndicatorTone } from "./notificationIndicator/NotificationIndicator.vue.js";
|
|
83
|
+
import { default as default85, useOnboardingChecklist } from "./onboardingChecklistCard/OnboardingChecklistCard.vue.js";
|
|
84
|
+
import { default as default86 } from "./onboardingChecklistCard/OnboardingChecklistCardTask.vue.js";
|
|
85
|
+
import { default as default87 } from "./overflowGroup/OverflowGroup.vue.js";
|
|
86
|
+
import { default as default88 } from "./pdfViewer/PdfViewer.vue.js";
|
|
87
|
+
import { default as default89 } from "./pricingCard/PricingCard.vue.js";
|
|
88
|
+
import { default as default90 } from "./quoteText/QuoteText.vue.js";
|
|
89
|
+
import { default as default91 } from "./radiusGlyph/RadiusGlyph.vue.js";
|
|
90
|
+
import { default as default92 } from "./reactionBar/ReactionBar.vue.js";
|
|
91
|
+
import { default as default93 } from "./relativeTime/RelativeTime.vue.js";
|
|
92
|
+
import { default as default94 } from "./scheduleView/ScheduleView.vue.js";
|
|
93
|
+
import { default as default95, ScrollRevealGroupEffect } from "./scrollRevealGroup/ScrollRevealGroup.vue.js";
|
|
94
|
+
import { default as default96, SectionHeadingSize } from "./sectionHeading/SectionHeading.vue.js";
|
|
95
|
+
import { default as default97, SnippetTextVariant } from "./snippetText/SnippetText.vue.js";
|
|
96
|
+
import { default as default98, SparklineTone, SparklineVariant } from "./sparkline/Sparkline.vue.js";
|
|
97
|
+
import { default as default99, StatCardSize } from "./statCard/StatCard.vue.js";
|
|
98
|
+
import { default as default100, StatusSize } from "./status/Status.vue.js";
|
|
99
|
+
import { default as default101 } from "./stepCard/StepCard.vue.js";
|
|
100
|
+
import { default as default102 } from "./stepperGroup/StepperGroup.vue.js";
|
|
101
|
+
import { default as default103 } from "./stepperGroup/StepperGroupList.vue.js";
|
|
102
|
+
import { default as default104 } from "./stepperGroup/StepperGroupPanel.vue.js";
|
|
103
|
+
import { default as default105 } from "./stepperGroup/StepperGroupStep.vue.js";
|
|
104
|
+
import { default as default106 } from "./table/Table.vue.js";
|
|
105
|
+
import { default as default107 } from "./table/TableBody.vue.js";
|
|
106
|
+
import { default as default108 } from "./table/TableCaption.vue.js";
|
|
107
|
+
import { default as default109 } from "./table/TableCell.vue.js";
|
|
108
|
+
import { default as default110 } from "./table/TableFooter.vue.js";
|
|
109
|
+
import { default as default111, TableHeadVariant } from "./table/TableHead.vue.js";
|
|
110
|
+
import { default as default112 } from "./table/TableHeaderCell.vue.js";
|
|
111
|
+
import { default as default113 } from "./table/TableRow.vue.js";
|
|
112
|
+
import { default as default114 } from "./tabsGroup/TabsGroup.vue.js";
|
|
113
|
+
import { default as default115 } from "./tabsGroup/TabsGroupList.vue.js";
|
|
114
|
+
import { default as default116 } from "./tabsGroup/TabsGroupPanel.vue.js";
|
|
115
|
+
import { default as default117 } from "./tabsGroup/TabsGroupTab.vue.js";
|
|
116
|
+
import { default as default118 } from "./tag/Tag.vue.js";
|
|
117
|
+
import { default as default119 } from "./text/Text.vue.js";
|
|
118
|
+
import { default as default120 } from "./threadView/ThreadView.vue.js";
|
|
119
|
+
import { default as default121 } from "./timeline/Timeline.vue.js";
|
|
120
|
+
import { default as default122 } from "./timeline/TimelineDescription.vue.js";
|
|
121
|
+
import { default as default123 } from "./timeline/TimelineItem.vue.js";
|
|
122
|
+
import { default as default124 } from "./timeline/TimelineTitle.vue.js";
|
|
123
|
+
import { default as default125 } from "./treeViewer/TreeViewer.vue.js";
|
|
124
|
+
import { default as default126 } from "./treeViewer/TreeViewerGroup.vue.js";
|
|
125
|
+
import { default as default127 } from "./treeViewer/TreeViewerItem.vue.js";
|
|
126
|
+
import { default as default128 } from "./truncatedText/TruncatedText.vue.js";
|
|
127
|
+
import { default as default129 } from "./typewriterText/TypewriterText.vue.js";
|
|
128
|
+
import { default as default130 } from "./versionBadge/VersionBadge.vue.js";
|
|
129
|
+
import { default as default131 } from "./moduleGlyphs/VerticalBarsGlyph.vue.js";
|
|
130
|
+
import { default as default132, VideoTrackKind } from "./videoPlayer/VideoPlayer.vue.js";
|
|
129
131
|
import { AccordionGroupType, useAccordionContext, useAccordionItemContext } from "./accordionGroup/AccordionGroupContext.js";
|
|
130
132
|
import { AvatarBackground, AvatarRing, AvatarShape, AvatarTone, avatarVariants } from "./avatar/Avatar.variants.js";
|
|
131
133
|
import { BadgeBorderStyle, BadgeVariant, badgeVariants } from "./badge/Badge.variants.js";
|
|
134
|
+
import { CarouselControls, CarouselNavVariant, carouselNavVariants } from "./carousel/Carousel.variants.js";
|
|
132
135
|
import { CodeTextVariant, codeVariants } from "./codeText/CodeText.variants.js";
|
|
133
136
|
import { CollapsibleGroupKey, useCollapsibleContext } from "./collapsibleGroup/CollapsibleGroupContext.js";
|
|
134
137
|
import { ColorSwatchPreviewSize, SwatchShape, colorSwatchVariants } from "./colorSwatchPreview/ColorSwatchPreview.variants.js";
|
|
@@ -178,8 +181,10 @@ export {
|
|
|
178
181
|
default21 as CardLink,
|
|
179
182
|
default22 as CardTitle,
|
|
180
183
|
default23 as Carousel,
|
|
184
|
+
CarouselControls,
|
|
181
185
|
default24 as CarouselDot,
|
|
182
186
|
default25 as CarouselDots,
|
|
187
|
+
CarouselNavVariant,
|
|
183
188
|
default26 as CarouselNext,
|
|
184
189
|
default27 as CarouselPrev,
|
|
185
190
|
default28 as CarouselSlide,
|
|
@@ -253,91 +258,95 @@ export {
|
|
|
253
258
|
default73 as MarkText,
|
|
254
259
|
default74 as MarqueeGroup,
|
|
255
260
|
MarqueeGroupDirection,
|
|
256
|
-
default75 as
|
|
257
|
-
default76 as
|
|
258
|
-
default77 as
|
|
261
|
+
default75 as MediaCard,
|
|
262
|
+
default76 as MessageGroup,
|
|
263
|
+
default77 as MetaInlineItem,
|
|
264
|
+
MetaInlineItemTone,
|
|
265
|
+
default78 as MetaInlineText,
|
|
266
|
+
default79 as MetricBadge,
|
|
259
267
|
MetricBadgeSize,
|
|
260
268
|
MetricBadgeTone,
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
269
|
+
default80 as NotificationCenterButton,
|
|
270
|
+
default81 as NotificationCenterGroup,
|
|
271
|
+
default82 as NotificationCenterGroupItem,
|
|
272
|
+
default84 as NotificationIndicator,
|
|
265
273
|
NotificationIndicatorSize,
|
|
266
274
|
NotificationIndicatorTone,
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
275
|
+
default83 as NotificationItem,
|
|
276
|
+
default85 as OnboardingChecklistCard,
|
|
277
|
+
default86 as OnboardingChecklistCardTask,
|
|
278
|
+
default87 as OverflowGroup,
|
|
279
|
+
default88 as PdfViewer,
|
|
280
|
+
default89 as PricingCard,
|
|
281
|
+
default90 as QuoteText,
|
|
282
|
+
default91 as RadiusGlyph,
|
|
283
|
+
default92 as ReactionBar,
|
|
284
|
+
default93 as RelativeTime,
|
|
285
|
+
default94 as ScheduleView,
|
|
286
|
+
default95 as ScrollRevealGroup,
|
|
279
287
|
ScrollRevealGroupEffect,
|
|
280
|
-
|
|
288
|
+
default96 as SectionHeading,
|
|
281
289
|
SectionHeadingSize,
|
|
282
|
-
|
|
290
|
+
default97 as SnippetText,
|
|
283
291
|
SnippetTextVariant,
|
|
284
292
|
SortDirection,
|
|
285
|
-
|
|
293
|
+
default98 as Sparkline,
|
|
286
294
|
SparklineTone,
|
|
287
295
|
SparklineVariant,
|
|
288
|
-
|
|
296
|
+
default99 as StatCard,
|
|
289
297
|
StatCardSize,
|
|
290
|
-
|
|
298
|
+
default100 as Status,
|
|
291
299
|
StatusSize,
|
|
292
|
-
|
|
300
|
+
default101 as StepCard,
|
|
293
301
|
StepStatus,
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
302
|
+
default102 as StepperGroup,
|
|
303
|
+
default103 as StepperGroupList,
|
|
304
|
+
default104 as StepperGroupPanel,
|
|
305
|
+
default105 as StepperGroupStep,
|
|
298
306
|
SwatchShape,
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
307
|
+
default106 as Table,
|
|
308
|
+
default107 as TableBody,
|
|
309
|
+
default108 as TableCaption,
|
|
310
|
+
default109 as TableCell,
|
|
303
311
|
TableDensity,
|
|
304
|
-
|
|
305
|
-
|
|
312
|
+
default110 as TableFooter,
|
|
313
|
+
default111 as TableHead,
|
|
306
314
|
TableHeadVariant,
|
|
307
|
-
|
|
315
|
+
default112 as TableHeaderCell,
|
|
308
316
|
TablePhoneLayout,
|
|
309
317
|
TableRadius,
|
|
310
|
-
|
|
311
|
-
|
|
318
|
+
default113 as TableRow,
|
|
319
|
+
default114 as TabsGroup,
|
|
312
320
|
TabsGroupActivationMode,
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
321
|
+
default115 as TabsGroupList,
|
|
322
|
+
default116 as TabsGroupPanel,
|
|
323
|
+
default117 as TabsGroupTab,
|
|
324
|
+
default118 as Tag,
|
|
317
325
|
TagVariant,
|
|
318
|
-
|
|
326
|
+
default119 as Text,
|
|
319
327
|
TextAlign,
|
|
320
328
|
TextColor,
|
|
321
329
|
TextWeight,
|
|
322
|
-
|
|
323
|
-
|
|
330
|
+
default120 as ThreadView,
|
|
331
|
+
default121 as Timeline,
|
|
324
332
|
TimelineAlign,
|
|
325
|
-
|
|
326
|
-
|
|
333
|
+
default122 as TimelineDescription,
|
|
334
|
+
default123 as TimelineItem,
|
|
327
335
|
TimelineKey,
|
|
328
336
|
TimelineStatus,
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
337
|
+
default124 as TimelineTitle,
|
|
338
|
+
default125 as TreeViewer,
|
|
339
|
+
default126 as TreeViewerGroup,
|
|
340
|
+
default127 as TreeViewerItem,
|
|
341
|
+
default128 as TruncatedText,
|
|
342
|
+
default129 as TypewriterText,
|
|
343
|
+
default130 as VersionBadge,
|
|
344
|
+
default131 as VerticalBarsGlyph,
|
|
345
|
+
default132 as VideoPlayer,
|
|
338
346
|
VideoTrackKind,
|
|
339
347
|
avatarVariants,
|
|
340
348
|
badgeVariants,
|
|
349
|
+
carouselNavVariants,
|
|
341
350
|
codeVariants,
|
|
342
351
|
colorSwatchVariants,
|
|
343
352
|
dotsIndicatorWindowOf,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/** Defines props for the image-first card whose text sits on a faded glass panel over the media. */
|
|
2
|
+
export interface MediaCardProps {
|
|
3
|
+
/** The card's width divided by its height, held at any column width. Default `4 / 5`. */
|
|
4
|
+
readonly ratio?: number;
|
|
5
|
+
/**
|
|
6
|
+
* The address the card opens: the text panel becomes one link stretched over the whole card. For an in-app route,
|
|
7
|
+
* omit it and put a `CardLink` (`as-child` around an `AppLink`) around the title in the default slot instead.
|
|
8
|
+
*/
|
|
9
|
+
readonly href?: string;
|
|
10
|
+
/** Draws the media in grayscale — a subject that is gone or inactive. Default `false`. */
|
|
11
|
+
readonly isDimmed?: boolean;
|
|
12
|
+
/** The text panel's fixed height, any CSS length, so the cards of a row line up. Default `8.5rem`. */
|
|
13
|
+
readonly panelHeight?: string;
|
|
14
|
+
}
|
|
15
|
+
declare const _default: __VLS_WithSlots<import('vue').DefineComponent<MediaCardProps, {
|
|
16
|
+
el: Readonly<import('vue').ShallowRef<HTMLDivElement | null>>;
|
|
17
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<MediaCardProps> & Readonly<{}>, {
|
|
18
|
+
readonly href: string;
|
|
19
|
+
readonly ratio: number;
|
|
20
|
+
readonly isDimmed: boolean;
|
|
21
|
+
readonly panelHeight: string;
|
|
22
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
|
|
23
|
+
/** The media filling the card — an `img`, a `video` or a `Carousel`. */
|
|
24
|
+
media?(): unknown;
|
|
25
|
+
/** The content of the soft tile shown when there is no media, such as the subject's icon. */
|
|
26
|
+
fallback?(): unknown;
|
|
27
|
+
/** The text panel — pills, the title, a meta line. */
|
|
28
|
+
default?(): unknown;
|
|
29
|
+
/** The controls at the top start corner. */
|
|
30
|
+
topStart?(): unknown;
|
|
31
|
+
/** The content at the top centre, such as a glass pill around a `DotsIndicator`. */
|
|
32
|
+
topCenter?(): unknown;
|
|
33
|
+
/** The controls at the top end corner, such as an open-original button. */
|
|
34
|
+
topEnd?(): unknown;
|
|
35
|
+
}>;
|
|
36
|
+
export default _default;
|
|
37
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
38
|
+
new (): {
|
|
39
|
+
$slots: S;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { defineComponent, useAttrs, useTemplateRef, computed, normalizeStyle, openBlock, createElementBlock, mergeProps, createElementVNode, normalizeClass, createBlock, withCtx, renderSlot, createCommentVNode } from "vue";
|
|
2
|
+
import { UrlExtensions } from "../../../foundation/dom/UrlExtensions.js";
|
|
3
|
+
import { cn } from "../../../foundation/styles/Cn.js";
|
|
4
|
+
import _sfc_main$1 from "../card/CardLink.vue.js";
|
|
5
|
+
const _hoisted_1 = ["data-dimmed"];
|
|
6
|
+
const _hoisted_2 = {
|
|
7
|
+
key: 2,
|
|
8
|
+
"data-media-card-top": "start",
|
|
9
|
+
class: "absolute start-3 top-3 z-20 flex items-center gap-1.5"
|
|
10
|
+
};
|
|
11
|
+
const _hoisted_3 = {
|
|
12
|
+
key: 3,
|
|
13
|
+
"data-media-card-top": "center",
|
|
14
|
+
class: "absolute top-3 left-1/2 z-20 flex -translate-x-1/2 items-center"
|
|
15
|
+
};
|
|
16
|
+
const _hoisted_4 = {
|
|
17
|
+
key: 4,
|
|
18
|
+
"data-media-card-top": "end",
|
|
19
|
+
class: "absolute end-3 top-3 z-20 flex items-center gap-1.5"
|
|
20
|
+
};
|
|
21
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
22
|
+
...{ name: "MediaCard", inheritAttrs: false },
|
|
23
|
+
__name: "MediaCard",
|
|
24
|
+
props: {
|
|
25
|
+
ratio: { default: 4 / 5 },
|
|
26
|
+
href: { default: void 0 },
|
|
27
|
+
isDimmed: { type: Boolean, default: false },
|
|
28
|
+
panelHeight: { default: "8.5rem" }
|
|
29
|
+
},
|
|
30
|
+
setup(__props, { expose: __expose }) {
|
|
31
|
+
const props = __props;
|
|
32
|
+
const RootClass = "group/media-card relative isolate flex min-w-0 flex-col justify-end overflow-hidden rounded-2xl border border-border bg-muted transition-colors has-[[data-card-link]]:hover:border-primary/40 has-[[data-card-link]:focus-visible]:outline-2 has-[[data-card-link]:focus-visible]:outline-offset-2 has-[[data-card-link]:focus-visible]:outline-ring";
|
|
33
|
+
const MediaClass = "absolute inset-0 *:size-full [&>img]:object-cover [&>video]:object-cover motion-safe:[&_img]:transition-transform motion-safe:[&_img]:duration-500 motion-safe:[&_video]:transition-transform motion-safe:[&_video]:duration-500 motion-safe:group-hover/media-card:[&_img]:scale-105 motion-safe:group-hover/media-card:[&_video]:scale-105";
|
|
34
|
+
const DimmedMediaClass = "[&_img]:grayscale [&_video]:grayscale";
|
|
35
|
+
const FallbackClass = "absolute inset-0 grid place-items-center bg-gradient-to-br from-primary-soft to-muted text-muted-foreground";
|
|
36
|
+
const BlurClass = "pointer-events-none absolute inset-x-0 bottom-0 h-3/5 bg-gradient-to-t from-black/80 via-black/45 to-transparent backdrop-blur-xl [-webkit-mask-image:linear-gradient(to_top,black_50%,transparent)] [mask-image:linear-gradient(to_top,black_50%,transparent)]";
|
|
37
|
+
const PanelClass = "dark z-10 flex min-w-0 shrink-0 flex-col justify-end gap-2 overflow-hidden p-4 text-white";
|
|
38
|
+
const attrs = useAttrs();
|
|
39
|
+
const el = useTemplateRef("el");
|
|
40
|
+
const safeHref = computed(() => UrlExtensions.safeNavigation(props.href));
|
|
41
|
+
const classes = computed(() => cn(RootClass, attrs.class));
|
|
42
|
+
const styles = computed(() => normalizeStyle([{ aspectRatio: `${props.ratio}` }, attrs.style]));
|
|
43
|
+
const mediaClasses = computed(() => cn(MediaClass, props.isDimmed && DimmedMediaClass));
|
|
44
|
+
const fallbackClasses = computed(() => cn(FallbackClass, props.isDimmed && "grayscale"));
|
|
45
|
+
const rest = computed(() => {
|
|
46
|
+
const { class: _class, style: _style, ...others } = attrs;
|
|
47
|
+
return others;
|
|
48
|
+
});
|
|
49
|
+
__expose({ el });
|
|
50
|
+
return (_ctx, _cache) => {
|
|
51
|
+
return openBlock(), createElementBlock("div", mergeProps({
|
|
52
|
+
ref_key: "el",
|
|
53
|
+
ref: el,
|
|
54
|
+
"data-dimmed": props.isDimmed || void 0
|
|
55
|
+
}, rest.value, {
|
|
56
|
+
class: classes.value,
|
|
57
|
+
style: styles.value
|
|
58
|
+
}), [
|
|
59
|
+
createElementVNode("div", {
|
|
60
|
+
"data-media-card-panel": "",
|
|
61
|
+
class: normalizeClass(PanelClass),
|
|
62
|
+
style: normalizeStyle({ height: props.panelHeight })
|
|
63
|
+
}, [
|
|
64
|
+
safeHref.value ? (openBlock(), createBlock(_sfc_main$1, {
|
|
65
|
+
key: 0,
|
|
66
|
+
href: safeHref.value,
|
|
67
|
+
class: "flex min-w-0 flex-col justify-end gap-2"
|
|
68
|
+
}, {
|
|
69
|
+
default: withCtx(() => [
|
|
70
|
+
renderSlot(_ctx.$slots, "default")
|
|
71
|
+
]),
|
|
72
|
+
_: 3
|
|
73
|
+
}, 8, ["href"])) : renderSlot(_ctx.$slots, "default", {}, void 0, void 0, 1)
|
|
74
|
+
], 4),
|
|
75
|
+
_ctx.$slots.media ? (openBlock(), createElementBlock("div", {
|
|
76
|
+
key: 0,
|
|
77
|
+
"data-media-card-media": "",
|
|
78
|
+
class: normalizeClass(mediaClasses.value)
|
|
79
|
+
}, [
|
|
80
|
+
renderSlot(_ctx.$slots, "media")
|
|
81
|
+
], 2)) : (openBlock(), createElementBlock("div", {
|
|
82
|
+
key: 1,
|
|
83
|
+
"data-media-card-fallback": "",
|
|
84
|
+
class: normalizeClass(fallbackClasses.value)
|
|
85
|
+
}, [
|
|
86
|
+
renderSlot(_ctx.$slots, "fallback")
|
|
87
|
+
], 2)),
|
|
88
|
+
createElementVNode("div", {
|
|
89
|
+
class: normalizeClass(BlurClass),
|
|
90
|
+
"aria-hidden": "true"
|
|
91
|
+
}),
|
|
92
|
+
_ctx.$slots.topStart ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
93
|
+
renderSlot(_ctx.$slots, "topStart")
|
|
94
|
+
])) : createCommentVNode("", true),
|
|
95
|
+
_ctx.$slots.topCenter ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
96
|
+
renderSlot(_ctx.$slots, "topCenter")
|
|
97
|
+
])) : createCommentVNode("", true),
|
|
98
|
+
_ctx.$slots.topEnd ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
99
|
+
renderSlot(_ctx.$slots, "topEnd")
|
|
100
|
+
])) : createCommentVNode("", true)
|
|
101
|
+
], 16, _hoisted_1);
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
export {
|
|
106
|
+
_sfc_main as default
|
|
107
|
+
};
|
|
108
|
+
//# sourceMappingURL=MediaCard.vue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MediaCard.vue.js","sources":["../../../../src/presentation/display/mediaCard/MediaCard.vue"],"sourcesContent":["<script lang=\"ts\">\n/** Defines props for the image-first card whose text sits on a faded glass panel over the media. */\nexport interface MediaCardProps {\n /** The card's width divided by its height, held at any column width. Default `4 / 5`. */\n readonly ratio?: number;\n\n /**\n * The address the card opens: the text panel becomes one link stretched over the whole card. For an in-app route,\n * omit it and put a `CardLink` (`as-child` around an `AppLink`) around the title in the default slot instead.\n */\n readonly href?: string;\n\n /** Draws the media in grayscale — a subject that is gone or inactive. Default `false`. */\n readonly isDimmed?: boolean;\n\n /** The text panel's fixed height, any CSS length, so the cards of a row line up. Default `8.5rem`. */\n readonly panelHeight?: string;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, normalizeStyle, useAttrs, useTemplateRef } from 'vue';\nimport { UrlExtensions } from '../../../foundation/dom';\nimport { cn } from '../../../foundation/styles';\nimport CardLink from '../card/CardLink.vue';\n\n/**\n * Renders an image-first card: the media fills the card at a fixed ratio, and the text sits on a panel at the\n * bottom where a blur fades upward into the image over a dark gradient. One link spans the whole card; the controls\n * in the top slots, and media controls raised with `z-20`, sit above it.\n */\ndefineOptions({ name: 'MediaCard', inheritAttrs: false });\n\ndefineSlots<{\n /** The media filling the card — an `img`, a `video` or a `Carousel`. */\n media?(): unknown;\n /** The content of the soft tile shown when there is no media, such as the subject's icon. */\n fallback?(): unknown;\n /** The text panel — pills, the title, a meta line. */\n default?(): unknown;\n /** The controls at the top start corner. */\n topStart?(): unknown;\n /** The content at the top centre, such as a glass pill around a `DotsIndicator`. */\n topCenter?(): unknown;\n /** The controls at the top end corner, such as an open-original button. */\n topEnd?(): unknown;\n}>();\n\nconst props = withDefaults(defineProps<MediaCardProps>(), {\n ratio: 4 / 5,\n href: undefined,\n isDimmed: false,\n panelHeight: '8.5rem',\n});\n\n/*\n * The link's pseudo-element covers the card, the nearest positioned ancestor; the card draws its focus ring. The\n * panel is a flex item lifted with `z-10` but never positioned, so the link it holds still spans the whole card.\n */\nconst RootClass =\n 'group/media-card relative isolate flex min-w-0 flex-col justify-end overflow-hidden rounded-2xl border ' +\n 'border-border bg-muted transition-colors has-[[data-card-link]]:hover:border-primary/40 ' +\n 'has-[[data-card-link]:focus-visible]:outline-2 has-[[data-card-link]:focus-visible]:outline-offset-2 ' +\n 'has-[[data-card-link]:focus-visible]:outline-ring';\n\n/*\n * Zoom and grayscale act on the images, never on this layer: a transform or a filter here would trap a carousel's\n * raised arrows under the link.\n */\nconst MediaClass =\n 'absolute inset-0 *:size-full [&>img]:object-cover [&>video]:object-cover ' +\n 'motion-safe:[&_img]:transition-transform motion-safe:[&_img]:duration-500 ' +\n 'motion-safe:[&_video]:transition-transform motion-safe:[&_video]:duration-500 ' +\n 'motion-safe:group-hover/media-card:[&_img]:scale-105 motion-safe:group-hover/media-card:[&_video]:scale-105';\n\nconst DimmedMediaClass = '[&_img]:grayscale [&_video]:grayscale';\n\nconst FallbackClass =\n 'absolute inset-0 grid place-items-center bg-gradient-to-br from-primary-soft to-muted text-muted-foreground';\n\n/* The blur covers the lower 60 % and fades out upward, so it reads as a soft edge rather than a strip. */\nconst BlurClass =\n 'pointer-events-none absolute inset-x-0 bottom-0 h-3/5 bg-gradient-to-t from-black/80 via-black/45 ' +\n 'to-transparent backdrop-blur-xl [-webkit-mask-image:linear-gradient(to_top,black_50%,transparent)] ' +\n '[mask-image:linear-gradient(to_top,black_50%,transparent)]';\n\n/* A dark stage in both themes: `dark` resolves the tokens inside it, such as a meta item tone, to dark values. */\nconst PanelClass = 'dark z-10 flex min-w-0 shrink-0 flex-col justify-end gap-2 overflow-hidden p-4 text-white';\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\n/** The link target, kept only for a navigation scheme — a `javascript:` address renders no link. */\nconst safeHref = computed(() => UrlExtensions.safeNavigation(props.href));\n\nconst classes = computed(() => cn(RootClass, attrs.class as string | undefined));\n\n/** `normalizeStyle` merges left → right, so a caller's `style` lands last and wins. */\nconst styles = computed(() => normalizeStyle([{ aspectRatio: `${props.ratio}` }, attrs.style]));\n\nconst mediaClasses = computed(() => cn(MediaClass, props.isDimmed && DimmedMediaClass));\n\nconst fallbackClasses = computed(() => cn(FallbackClass, props.isDimmed && 'grayscale'));\n\n/** Everything but `class` / `style`, both re-applied above. */\nconst rest = computed(() => {\n const { class: _class, style: _style, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div ref=\"el\" :data-dimmed=\"props.isDimmed || undefined\" v-bind=\"rest\" :class=\"classes\" :style=\"styles\">\n <div data-media-card-panel :class=\"PanelClass\" :style=\"{ height: props.panelHeight }\">\n <CardLink v-if=\"safeHref\" :href=\"safeHref\" class=\"flex min-w-0 flex-col justify-end gap-2\"><slot /></CardLink>\n <slot v-else />\n </div>\n <div v-if=\"$slots.media\" data-media-card-media :class=\"mediaClasses\"><slot name=\"media\" /></div>\n <div v-else data-media-card-fallback :class=\"fallbackClasses\"><slot name=\"fallback\" /></div>\n <div :class=\"BlurClass\" aria-hidden=\"true\"></div>\n <div\n v-if=\"$slots.topStart\"\n data-media-card-top=\"start\"\n class=\"absolute start-3 top-3 z-20 flex items-center gap-1.5\"\n >\n <slot name=\"topStart\" />\n </div>\n <div\n v-if=\"$slots.topCenter\"\n data-media-card-top=\"center\"\n class=\"absolute top-3 left-1/2 z-20 flex -translate-x-1/2 items-center\"\n >\n <slot name=\"topCenter\" />\n </div>\n <div v-if=\"$slots.topEnd\" data-media-card-top=\"end\" class=\"absolute end-3 top-3 z-20 flex items-center gap-1.5\">\n <slot name=\"topEnd\" />\n </div>\n </div>\n</template>\n"],"names":["_openBlock","_createElementBlock","_mergeProps","_createElementVNode","_normalizeStyle","_createBlock","CardLink","_renderSlot","$slots"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDA,UAAM,QAAQ;AAWd,UAAM,YACJ;AASF,UAAM,aACJ;AAKF,UAAM,mBAAmB;AAEzB,UAAM,gBACJ;AAGF,UAAM,YACJ;AAKF,UAAM,aAAa;AAEnB,UAAM,QAAQ,SAAA;AACd,UAAM,KAAK,eAA+B,IAAI;AAG9C,UAAM,WAAW,SAAS,MAAM,cAAc,eAAe,MAAM,IAAI,CAAC;AAExE,UAAM,UAAU,SAAS,MAAM,GAAG,WAAW,MAAM,KAA2B,CAAC;AAG/E,UAAM,SAAS,SAAS,MAAM,eAAe,CAAC,EAAE,aAAa,GAAG,MAAM,KAAK,GAAA,GAAM,MAAM,KAAK,CAAC,CAAC;AAE9F,UAAM,eAAe,SAAS,MAAM,GAAG,YAAY,MAAM,YAAY,gBAAgB,CAAC;AAEtF,UAAM,kBAAkB,SAAS,MAAM,GAAG,eAAe,MAAM,YAAY,WAAW,CAAC;AAGvF,UAAM,OAAO,SAAS,MAAM;AAC1B,YAAM,EAAE,OAAO,QAAQ,OAAO,QAAQ,GAAG,WAAW;AACpD,aAAO;AAAA,IACT,CAAC;AAED,aAAa,EAAE,IAAI;;AAIjB,aAAAA,UAAA,GAAAC,mBAyBM,OAzBNC,WAyBM;AAAA,iBAzBG;AAAA,QAAJ,KAAI;AAAA,QAAM,eAAa,MAAM,YAAY;AAAA,MAAA,GAAmB,KAAA,OAAI;AAAA,QAAG,OAAO,QAAA;AAAA,QAAU,OAAO,OAAA;AAAA,MAAA;QAC9FC,mBAGM,OAAA;AAAA,UAHD,yBAAA;AAAA,UAAuB,sBAAO,UAAU;AAAA,UAAG,OAAKC,eAAA,EAAA,QAAY,MAAM,aAAW;AAAA,QAAA;UAChE,SAAA,sBAAhBC,YAA8GC,aAAA;AAAA;YAAnF,MAAM,SAAA;AAAA,YAAU,OAAM;AAAA,UAAA;6BAA0C,MAAQ;AAAA,cAARC,WAAQ,KAAA,QAAA,SAAA;AAAA,YAAA;;6BACnGA,WAAe,KAAA,QAAA,WAAA,CAAA,GAAA,QAAA,QAAA,CAAA;AAAA,QAAA;QAENC,KAAAA,OAAO,sBAAlBP,mBAAgG,OAAA;AAAA;UAAvE,yBAAA;AAAA,UAAuB,sBAAO,aAAA,KAAY;AAAA,QAAA;UAAEM,WAAqB,KAAA,QAAA,OAAA;AAAA,QAAA,uBAC1FN,mBAA4F,OAAA;AAAA;UAAhF,4BAAA;AAAA,UAA0B,sBAAO,gBAAA,KAAe;AAAA,QAAA;UAAEM,WAAwB,KAAA,QAAA,UAAA;AAAA,QAAA;QACtFJ,mBAAiD,OAAA;AAAA,UAA3C,sBAAO,SAAS;AAAA,UAAE,eAAY;AAAA,QAAA;QAE5BK,KAAAA,OAAO,YADfR,aAAAC,mBAMM,OANN,YAMM;AAAA,UADJM,WAAwB,KAAA,QAAA,UAAA;AAAA,QAAA;QAGlBC,KAAAA,OAAO,aADfR,aAAAC,mBAMM,OANN,YAMM;AAAA,UADJM,WAAyB,KAAA,QAAA,WAAA;AAAA,QAAA;QAEhBC,KAAAA,OAAO,UAAlBR,aAAAC,mBAEM,OAFN,YAEM;AAAA,UADJM,WAAsB,KAAA,QAAA,QAAA;AAAA,QAAA;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MediaCard2.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as MediaCard, type MediaCardProps } from './MediaCard.vue';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/** Defines the colour a meta item's icon and text take. */
|
|
2
|
+
export declare const MetaInlineItemTone: {
|
|
3
|
+
/** Refers to the surrounding text colour. */
|
|
4
|
+
readonly Default: "default";
|
|
5
|
+
/** Refers to a live, positive state, such as an event that is on now. */
|
|
6
|
+
readonly Success: "success";
|
|
7
|
+
/** Refers to a past or inactive state, such as an event that has ended. */
|
|
8
|
+
readonly Muted: "muted";
|
|
9
|
+
};
|
|
10
|
+
export type MetaInlineItemTone = (typeof MetaInlineItemTone)[keyof typeof MetaInlineItemTone];
|
|
11
|
+
/** Defines props for one icon-led item of a meta line. */
|
|
12
|
+
export interface MetaInlineItemProps {
|
|
13
|
+
/**
|
|
14
|
+
* The fuller phrase assistive technology reads in place of the visible text — `posted 3 days ago` for `3 days`.
|
|
15
|
+
* The visible text is then hidden from assistive technology.
|
|
16
|
+
*/
|
|
17
|
+
readonly label?: string;
|
|
18
|
+
/** The colour of the item's icon and text. Default `default`. */
|
|
19
|
+
readonly tone?: MetaInlineItemTone;
|
|
20
|
+
}
|
|
21
|
+
declare const _default: __VLS_WithSlots<import('vue').DefineComponent<MetaInlineItemProps, {
|
|
22
|
+
el: Readonly<import('vue').ShallowRef<HTMLSpanElement | null>>;
|
|
23
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<MetaInlineItemProps> & Readonly<{}>, {
|
|
24
|
+
readonly tone: MetaInlineItemTone;
|
|
25
|
+
readonly label: string;
|
|
26
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
|
|
27
|
+
/** The leading icon; decorative, so it is hidden from assistive technology. */
|
|
28
|
+
icon?(): unknown;
|
|
29
|
+
/** The visible text, hidden from assistive technology when `label` is set. */
|
|
30
|
+
default?(): unknown;
|
|
31
|
+
}>;
|
|
32
|
+
export default _default;
|
|
33
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
34
|
+
new (): {
|
|
35
|
+
$slots: S;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { defineComponent, useAttrs, useTemplateRef, computed, openBlock, createElementBlock, mergeProps, renderSlot, createCommentVNode, createElementVNode, createBlock, unref, withCtx, createTextVNode, toDisplayString } from "vue";
|
|
2
|
+
import { cn } from "../../../foundation/styles/Cn.js";
|
|
3
|
+
import _sfc_main$1 from "../../../foundation/primitives/visuallyHidden/VisuallyHidden.vue.js";
|
|
4
|
+
const _hoisted_1 = ["data-tone"];
|
|
5
|
+
const _hoisted_2 = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "inline-flex shrink-0",
|
|
8
|
+
"aria-hidden": "true"
|
|
9
|
+
};
|
|
10
|
+
const _hoisted_3 = ["aria-hidden"];
|
|
11
|
+
const MetaInlineItemTone = {
|
|
12
|
+
/** Refers to the surrounding text colour. */
|
|
13
|
+
Default: "default",
|
|
14
|
+
/** Refers to a live, positive state, such as an event that is on now. */
|
|
15
|
+
Success: "success",
|
|
16
|
+
/** Refers to a past or inactive state, such as an event that has ended. */
|
|
17
|
+
Muted: "muted"
|
|
18
|
+
};
|
|
19
|
+
const ToneClass = {
|
|
20
|
+
default: "",
|
|
21
|
+
success: "text-success-soft-foreground",
|
|
22
|
+
muted: "text-muted-foreground"
|
|
23
|
+
};
|
|
24
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
25
|
+
...{ name: "MetaInlineItem", inheritAttrs: false },
|
|
26
|
+
__name: "MetaInlineItem",
|
|
27
|
+
props: {
|
|
28
|
+
label: { default: void 0 },
|
|
29
|
+
tone: { default: "default" }
|
|
30
|
+
},
|
|
31
|
+
setup(__props, { expose: __expose }) {
|
|
32
|
+
const props = __props;
|
|
33
|
+
const attrs = useAttrs();
|
|
34
|
+
const el = useTemplateRef("el");
|
|
35
|
+
const classes = computed(
|
|
36
|
+
() => cn("inline-flex min-w-0 max-w-full items-center gap-1", ToneClass[props.tone], attrs.class)
|
|
37
|
+
);
|
|
38
|
+
const rest = computed(() => {
|
|
39
|
+
const { class: _class, ...others } = attrs;
|
|
40
|
+
return others;
|
|
41
|
+
});
|
|
42
|
+
__expose({ el });
|
|
43
|
+
return (_ctx, _cache) => {
|
|
44
|
+
return openBlock(), createElementBlock("span", mergeProps({
|
|
45
|
+
ref_key: "el",
|
|
46
|
+
ref: el,
|
|
47
|
+
"data-tone": props.tone
|
|
48
|
+
}, rest.value, { class: classes.value }), [
|
|
49
|
+
_ctx.$slots.icon ? (openBlock(), createElementBlock("span", _hoisted_2, [
|
|
50
|
+
renderSlot(_ctx.$slots, "icon")
|
|
51
|
+
])) : createCommentVNode("", true),
|
|
52
|
+
createElementVNode("span", {
|
|
53
|
+
class: "min-w-0 truncate",
|
|
54
|
+
"aria-hidden": props.label ? "true" : void 0
|
|
55
|
+
}, [
|
|
56
|
+
renderSlot(_ctx.$slots, "default")
|
|
57
|
+
], 8, _hoisted_3),
|
|
58
|
+
props.label ? (openBlock(), createBlock(unref(_sfc_main$1), { key: 1 }, {
|
|
59
|
+
default: withCtx(() => [
|
|
60
|
+
createTextVNode(toDisplayString(props.label), 1)
|
|
61
|
+
]),
|
|
62
|
+
_: 1
|
|
63
|
+
})) : createCommentVNode("", true)
|
|
64
|
+
], 16, _hoisted_1);
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
export {
|
|
69
|
+
MetaInlineItemTone,
|
|
70
|
+
_sfc_main as default
|
|
71
|
+
};
|
|
72
|
+
//# sourceMappingURL=MetaInlineItem.vue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MetaInlineItem.vue.js","sources":["../../../../src/presentation/display/metaInlineText/MetaInlineItem.vue"],"sourcesContent":["<script lang=\"ts\">\n/** Defines the colour a meta item's icon and text take. */\nexport const MetaInlineItemTone = {\n /** Refers to the surrounding text colour. */\n Default: 'default',\n /** Refers to a live, positive state, such as an event that is on now. */\n Success: 'success',\n /** Refers to a past or inactive state, such as an event that has ended. */\n Muted: 'muted',\n} as const;\n\nexport type MetaInlineItemTone = (typeof MetaInlineItemTone)[keyof typeof MetaInlineItemTone];\n\n/** Defines props for one icon-led item of a meta line. */\nexport interface MetaInlineItemProps {\n /**\n * The fuller phrase assistive technology reads in place of the visible text — `posted 3 days ago` for `3 days`.\n * The visible text is then hidden from assistive technology.\n */\n readonly label?: string;\n\n /** The colour of the item's icon and text. Default `default`. */\n readonly tone?: MetaInlineItemTone;\n}\n\n/* `muted` and `success` use the text tokens, which hold AA on page surfaces and on a dark media panel alike. */\nconst ToneClass: Record<MetaInlineItemTone, string> = {\n default: '',\n success: 'text-success-soft-foreground',\n muted: 'text-muted-foreground',\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { VisuallyHidden } from '../../../foundation/primitives';\nimport { cn } from '../../../foundation/styles';\n\n/**\n * Renders one item of a meta line behind its icon — an event's dates, a post's age — with an optional fuller phrase\n * for screen readers and a tone. It keeps one line: in a narrow row the text cuts with an ellipsis and the icon stays.\n */\ndefineOptions({ name: 'MetaInlineItem', inheritAttrs: false });\n\ndefineSlots<{\n /** The leading icon; decorative, so it is hidden from assistive technology. */\n icon?(): unknown;\n /** The visible text, hidden from assistive technology when `label` is set. */\n default?(): unknown;\n}>();\n\nconst props = withDefaults(defineProps<MetaInlineItemProps>(), { label: undefined, tone: 'default' });\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLSpanElement>('el');\n\nconst classes = computed(() =>\n cn('inline-flex min-w-0 max-w-full items-center gap-1', ToneClass[props.tone], attrs.class as string | undefined),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <span ref=\"el\" :data-tone=\"props.tone\" v-bind=\"rest\" :class=\"classes\">\n <span v-if=\"$slots.icon\" class=\"inline-flex shrink-0\" aria-hidden=\"true\"><slot name=\"icon\" /></span>\n <span class=\"min-w-0 truncate\" :aria-hidden=\"props.label ? 'true' : undefined\"><slot /></span>\n <VisuallyHidden v-if=\"props.label\">{{ props.label }}</VisuallyHidden>\n </span>\n</template>\n"],"names":["_openBlock","_createElementBlock","_mergeProps","$slots","_renderSlot","_createElementVNode","_createBlock","_unref","VisuallyHidden","_createTextVNode","_toDisplayString"],"mappings":";;;;;;;;;;AAEO,MAAM,qBAAqB;AAAA;AAAA,EAEhC,SAAS;AAAA;AAAA,EAET,SAAS;AAAA;AAAA,EAET,OAAO;AACT;AAiBA,MAAM,YAAgD;AAAA,EACpD,SAAS;AAAA,EACT,SAAS;AAAA,EACT,OAAO;AACT;;;;;;;;;AAqBA,UAAM,QAAQ;AAEd,UAAM,QAAQ,SAAA;AACd,UAAM,KAAK,eAAgC,IAAI;AAE/C,UAAM,UAAU;AAAA,MAAS,MACvB,GAAG,qDAAqD,UAAU,MAAM,IAAI,GAAG,MAAM,KAA2B;AAAA,IAAA;AAIlH,UAAM,OAAO,SAAS,MAAM;AAC1B,YAAM,EAAE,OAAO,QAAQ,GAAG,WAAW;AACrC,aAAO;AAAA,IACT,CAAC;AAED,aAAa,EAAE,IAAI;;AAIjB,aAAAA,UAAA,GAAAC,mBAIO,QAJPC,WAIO;AAAA,iBAJG;AAAA,QAAJ,KAAI;AAAA,QAAM,aAAW,MAAM;AAAA,MAAA,GAAc,KAAA,OAAI,EAAG,OAAO,QAAA,MAAA,CAAO,GAAA;AAAA,QACtDC,KAAAA,OAAO,QAAnBH,aAAAC,mBAAoG,QAApG,YAAoG;AAAA,UAA3BG,WAAoB,KAAA,QAAA,MAAA;AAAA,QAAA;QAC7FC,mBAA8F,QAAA;AAAA,UAAxF,OAAM;AAAA,UAAoB,eAAa,MAAM,iBAAiB;AAAA,QAAA;UAAWD,WAAQ,KAAA,QAAA,SAAA;AAAA,QAAA;QACjE,MAAM,sBAA5BE,YAAqEC,MAAAC,WAAA,GAAA,EAAA,KAAA,KAAA;AAAA,2BAAlC,MAAiB;AAAA,YAAdC,gBAAAC,gBAAA,MAAM,KAAK,GAAA,CAAA;AAAA,UAAA;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MetaInlineItem2.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|