@cratis/showrunner.marquee.react 2.10.0 → 2.11.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.
- package/Banner/MarqueeBanner.tsx +76 -19
- package/Dialog/MarqueeDialog.tsx +14 -3
- package/Icons.tsx +24 -0
- package/Labels/MarqueeLabels.ts +6 -0
- package/Labels/defaultMarqueeLabels.ts +2 -0
- package/Markdown/MarqueeInlineMarkdown.tsx +37 -0
- package/Markdown/MarqueeLink.tsx +14 -0
- package/Markdown/MarqueeMarkdown.tsx +3 -8
- package/Markdown/index.ts +2 -0
- package/Markdown/markdownText.ts +46 -0
- package/README.md +18 -4
- package/Selection/announcementSelection.ts +18 -3
- package/dist/cjs/Banner/MarqueeBanner.d.ts +1 -1
- package/dist/cjs/Banner/MarqueeBanner.d.ts.map +1 -1
- package/dist/cjs/Banner/MarqueeBanner.js +81 -24
- package/dist/cjs/Banner/MarqueeBanner.js.map +1 -1
- package/dist/cjs/Banner/MarqueeBanner.stories.d.ts +6 -0
- package/dist/cjs/Banner/MarqueeBanner.stories.d.ts.map +1 -1
- package/dist/cjs/Dialog/MarqueeDialog.d.ts.map +1 -1
- package/dist/cjs/Dialog/MarqueeDialog.js +16 -2
- package/dist/cjs/Dialog/MarqueeDialog.js.map +1 -1
- package/dist/cjs/Dialog/MarqueeDialog.stories.d.ts +2 -0
- package/dist/cjs/Dialog/MarqueeDialog.stories.d.ts.map +1 -1
- package/dist/cjs/Examples/LocalizedMarquee.d.ts.map +1 -1
- package/dist/cjs/Icons.d.ts +4 -0
- package/dist/cjs/Icons.d.ts.map +1 -1
- package/dist/cjs/Icons.js +16 -0
- package/dist/cjs/Icons.js.map +1 -1
- package/dist/cjs/Labels/MarqueeLabels.d.ts +2 -0
- package/dist/cjs/Labels/MarqueeLabels.d.ts.map +1 -1
- package/dist/cjs/Labels/defaultMarqueeLabels.d.ts.map +1 -1
- package/dist/cjs/Labels/defaultMarqueeLabels.js +2 -0
- package/dist/cjs/Labels/defaultMarqueeLabels.js.map +1 -1
- package/dist/cjs/Markdown/MarqueeInlineMarkdown.d.ts +6 -0
- package/dist/cjs/Markdown/MarqueeInlineMarkdown.d.ts.map +1 -0
- package/dist/cjs/Markdown/MarqueeInlineMarkdown.js +37 -0
- package/dist/cjs/Markdown/MarqueeInlineMarkdown.js.map +1 -0
- package/dist/cjs/Markdown/MarqueeLink.d.ts +5 -0
- package/dist/cjs/Markdown/MarqueeLink.d.ts.map +1 -0
- package/dist/cjs/Markdown/MarqueeLink.js +21 -0
- package/dist/cjs/Markdown/MarqueeLink.js.map +1 -0
- package/dist/cjs/Markdown/MarqueeMarkdown.d.ts.map +1 -1
- package/dist/cjs/Markdown/MarqueeMarkdown.js +2 -10
- package/dist/cjs/Markdown/MarqueeMarkdown.js.map +1 -1
- package/dist/cjs/Markdown/index.d.ts +2 -0
- package/dist/cjs/Markdown/index.d.ts.map +1 -1
- package/dist/cjs/Markdown/markdownText.d.ts +3 -0
- package/dist/cjs/Markdown/markdownText.d.ts.map +1 -0
- package/dist/cjs/Markdown/markdownText.js +35 -0
- package/dist/cjs/Markdown/markdownText.js.map +1 -0
- package/dist/cjs/Marquee.js +1 -0
- package/dist/cjs/Marquee.js.map +1 -1
- package/dist/cjs/Selection/announcementSelection.d.ts.map +1 -1
- package/dist/cjs/Selection/announcementSelection.js +15 -3
- package/dist/cjs/Selection/announcementSelection.js.map +1 -1
- package/dist/cjs/index.js +6 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/Banner/MarqueeBanner.d.ts +1 -1
- package/dist/esm/Banner/MarqueeBanner.d.ts.map +1 -1
- package/dist/esm/Banner/MarqueeBanner.js +82 -25
- package/dist/esm/Banner/MarqueeBanner.js.map +1 -1
- package/dist/esm/Banner/MarqueeBanner.stories.d.ts +6 -0
- package/dist/esm/Banner/MarqueeBanner.stories.d.ts.map +1 -1
- package/dist/esm/Banner/MarqueeBanner.stories.js +18 -1
- package/dist/esm/Banner/MarqueeBanner.stories.js.map +1 -1
- package/dist/esm/Dialog/MarqueeDialog.d.ts.map +1 -1
- package/dist/esm/Dialog/MarqueeDialog.js +16 -2
- package/dist/esm/Dialog/MarqueeDialog.js.map +1 -1
- package/dist/esm/Dialog/MarqueeDialog.stories.d.ts +2 -0
- package/dist/esm/Dialog/MarqueeDialog.stories.d.ts.map +1 -1
- package/dist/esm/Dialog/MarqueeDialog.stories.js +3 -0
- package/dist/esm/Dialog/MarqueeDialog.stories.js.map +1 -1
- package/dist/esm/Examples/CustomBanner.js +2 -2
- package/dist/esm/Examples/CustomBanner.js.map +1 -1
- package/dist/esm/Examples/CustomDialog.js +2 -2
- package/dist/esm/Examples/CustomDialog.js.map +1 -1
- package/dist/esm/Examples/LocalizedMarquee.d.ts.map +1 -1
- package/dist/esm/Examples/LocalizedMarquee.js +2 -0
- package/dist/esm/Examples/LocalizedMarquee.js.map +1 -1
- package/dist/esm/Examples/OwnSurface.js +2 -2
- package/dist/esm/Examples/OwnSurface.js.map +1 -1
- package/dist/esm/Icons.d.ts +4 -0
- package/dist/esm/Icons.d.ts.map +1 -1
- package/dist/esm/Icons.js +16 -1
- package/dist/esm/Icons.js.map +1 -1
- package/dist/esm/Labels/MarqueeLabels.d.ts +2 -0
- package/dist/esm/Labels/MarqueeLabels.d.ts.map +1 -1
- package/dist/esm/Labels/defaultMarqueeLabels.d.ts.map +1 -1
- package/dist/esm/Labels/defaultMarqueeLabels.js +2 -0
- package/dist/esm/Labels/defaultMarqueeLabels.js.map +1 -1
- package/dist/esm/Markdown/MarqueeInlineMarkdown.d.ts +6 -0
- package/dist/esm/Markdown/MarqueeInlineMarkdown.d.ts.map +1 -0
- package/dist/esm/Markdown/MarqueeInlineMarkdown.js +35 -0
- package/dist/esm/Markdown/MarqueeInlineMarkdown.js.map +1 -0
- package/dist/esm/Markdown/MarqueeLink.d.ts +5 -0
- package/dist/esm/Markdown/MarqueeLink.d.ts.map +1 -0
- package/dist/esm/Markdown/MarqueeLink.js +19 -0
- package/dist/esm/Markdown/MarqueeLink.js.map +1 -0
- package/dist/esm/Markdown/MarqueeMarkdown.d.ts.map +1 -1
- package/dist/esm/Markdown/MarqueeMarkdown.js +2 -10
- package/dist/esm/Markdown/MarqueeMarkdown.js.map +1 -1
- package/dist/esm/Markdown/index.d.ts +2 -0
- package/dist/esm/Markdown/index.d.ts.map +1 -1
- package/dist/esm/Markdown/index.js +2 -0
- package/dist/esm/Markdown/index.js.map +1 -1
- package/dist/esm/Markdown/markdownText.d.ts +3 -0
- package/dist/esm/Markdown/markdownText.d.ts.map +1 -0
- package/dist/esm/Markdown/markdownText.js +32 -0
- package/dist/esm/Markdown/markdownText.js.map +1 -0
- package/dist/esm/Marquee.js +1 -0
- package/dist/esm/Marquee.js.map +1 -1
- package/dist/esm/Selection/announcementSelection.d.ts.map +1 -1
- package/dist/esm/Selection/announcementSelection.js +15 -3
- package/dist/esm/Selection/announcementSelection.js.map +1 -1
- package/dist/esm/index.js +3 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +2 -2
- package/styles.css +106 -7
|
@@ -1,39 +1,66 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { useId, useState } from 'react';
|
|
3
|
+
import { ImportanceIcon, ChevronIcon } from '../Icons.js';
|
|
4
|
+
import { MarqueeInlineMarkdown } from '../Markdown/MarqueeInlineMarkdown.js';
|
|
3
5
|
import { MarqueeMarkdown } from '../Markdown/MarqueeMarkdown.js';
|
|
6
|
+
import { hasMarkdown } from '../Markdown/markdownText.js';
|
|
4
7
|
import '@cratis/showrunner.marquee';
|
|
5
8
|
import { importancePresentation } from '../Selection/importancePresentation.js';
|
|
6
9
|
|
|
7
10
|
// Copyright (c) Cratis. All rights reserved.
|
|
8
11
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
12
|
+
const MarqueeBannerItem = ({ announcement, labels, markdown: Markdown })=>{
|
|
13
|
+
const presentation = importancePresentation(announcement.importance, labels);
|
|
14
|
+
const identifier = useId();
|
|
15
|
+
const messageId = `${identifier}-message`;
|
|
16
|
+
const tooltipId = `${identifier}-tooltip`;
|
|
17
|
+
const [expanded, setExpanded] = useState(false);
|
|
18
|
+
const [tooltipVisible, setTooltipVisible] = useState(false);
|
|
19
|
+
const hasMessage = hasMarkdown(announcement.body);
|
|
20
|
+
const handleKeyDown = (event)=>{
|
|
21
|
+
if (event.key === 'Escape') {
|
|
22
|
+
setTooltipVisible(false);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
26
|
+
className: `marquee-banner__item marquee-banner__item--${presentation.modifier}`,
|
|
27
|
+
children: [
|
|
28
|
+
/*#__PURE__*/ jsxs("div", {
|
|
29
|
+
className: "marquee-banner__row",
|
|
24
30
|
children: [
|
|
25
31
|
/*#__PURE__*/ jsx(ImportanceIcon, {
|
|
26
32
|
presentation: presentation
|
|
27
33
|
}),
|
|
28
|
-
/*#__PURE__*/
|
|
29
|
-
className: "marquee-
|
|
34
|
+
/*#__PURE__*/ jsx("span", {
|
|
35
|
+
className: "marquee-banner__title",
|
|
36
|
+
children: /*#__PURE__*/ jsx(MarqueeInlineMarkdown, {
|
|
37
|
+
source: announcement.title
|
|
38
|
+
})
|
|
39
|
+
}),
|
|
40
|
+
hasMessage && /*#__PURE__*/ jsxs("span", {
|
|
41
|
+
className: "marquee-banner__more",
|
|
42
|
+
onMouseEnter: ()=>setTooltipVisible(true),
|
|
43
|
+
onMouseLeave: ()=>setTooltipVisible(false),
|
|
44
|
+
onFocus: ()=>setTooltipVisible(true),
|
|
45
|
+
onBlur: ()=>setTooltipVisible(false),
|
|
46
|
+
onKeyDown: handleKeyDown,
|
|
30
47
|
children: [
|
|
31
|
-
/*#__PURE__*/ jsx("
|
|
32
|
-
|
|
33
|
-
|
|
48
|
+
/*#__PURE__*/ jsx("button", {
|
|
49
|
+
type: "button",
|
|
50
|
+
className: "marquee-banner__toggle",
|
|
51
|
+
"aria-expanded": expanded,
|
|
52
|
+
"aria-controls": messageId,
|
|
53
|
+
"aria-describedby": tooltipId,
|
|
54
|
+
"aria-label": expanded ? labels.collapse : labels.expand,
|
|
55
|
+
onClick: ()=>setExpanded(!expanded),
|
|
56
|
+
children: /*#__PURE__*/ jsx(ChevronIcon, {
|
|
57
|
+
expanded: expanded
|
|
58
|
+
})
|
|
34
59
|
}),
|
|
35
|
-
/*#__PURE__*/ jsx("
|
|
36
|
-
|
|
60
|
+
/*#__PURE__*/ jsx("span", {
|
|
61
|
+
id: tooltipId,
|
|
62
|
+
role: "tooltip",
|
|
63
|
+
className: tooltipVisible && !expanded ? 'marquee-banner__tooltip marquee-banner__tooltip--visible' : 'marquee-banner__tooltip',
|
|
37
64
|
children: /*#__PURE__*/ jsx(Markdown, {
|
|
38
65
|
source: announcement.body,
|
|
39
66
|
compact: true
|
|
@@ -42,8 +69,38 @@ import { importancePresentation } from '../Selection/importancePresentation.js';
|
|
|
42
69
|
]
|
|
43
70
|
})
|
|
44
71
|
]
|
|
45
|
-
},
|
|
46
|
-
|
|
72
|
+
}),
|
|
73
|
+
hasMessage && /*#__PURE__*/ jsx("div", {
|
|
74
|
+
id: messageId,
|
|
75
|
+
className: "marquee-banner__message",
|
|
76
|
+
hidden: !expanded,
|
|
77
|
+
children: /*#__PURE__*/ jsx(Markdown, {
|
|
78
|
+
source: announcement.body
|
|
79
|
+
})
|
|
80
|
+
})
|
|
81
|
+
]
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* The banners at the top of the application, one row for each, with the icon and the color of its importance.
|
|
86
|
+
*
|
|
87
|
+
* A banner shows its title only, with inline Markdown such as a link. When the announcement has a message, the row ends
|
|
88
|
+
* in a button that shows the message inline below the title, or hides it again, and hovering or focusing the button
|
|
89
|
+
* shows the message in a tooltip. Without a message there is no button and no tooltip.
|
|
90
|
+
*
|
|
91
|
+
* The region is announced politely when a row appears, and is always rendered, because a live region that is added
|
|
92
|
+
* with its content is not reliably announced. It takes no space while it is empty. A banner has no close button: it
|
|
93
|
+
* stays until it is withdrawn or its window ends.
|
|
94
|
+
*/ const MarqueeBanner = ({ announcements, labels, markdown = MarqueeMarkdown })=>/*#__PURE__*/ jsx("div", {
|
|
95
|
+
className: "marquee-banner",
|
|
96
|
+
role: "status",
|
|
97
|
+
"aria-live": "polite",
|
|
98
|
+
"aria-label": labels.banners,
|
|
99
|
+
children: announcements.map((announcement)=>/*#__PURE__*/ jsx(MarqueeBannerItem, {
|
|
100
|
+
announcement: announcement,
|
|
101
|
+
labels: labels,
|
|
102
|
+
markdown: markdown
|
|
103
|
+
}, announcement.id.toString()))
|
|
47
104
|
});
|
|
48
105
|
|
|
49
106
|
export { MarqueeBanner };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarqueeBanner.js","sources":["../../../Banner/MarqueeBanner.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { AnnouncementForMe } from '@cratis/showrunner.marquee';\nimport { ComponentType } from 'react';\nimport { ImportanceIcon } from '../Icons.js';\nimport { MarqueeLabels } from '../Labels/index.js';\nimport { MarqueeMarkdown, MarqueeMarkdownProps } from '../Markdown/index.js';\nimport { importancePresentation } from '../Selection/index.js';\n\n/**\n * Props for {@link MarqueeBanner}, and for the component given to the `banner` slot of {@link Marquee}.\n */\nexport interface MarqueeBannerProps {\n /** The banners to show, the most important first. Empty when there is none. */\n announcements: AnnouncementForMe[];\n\n /** The texts to show. */\n labels: MarqueeLabels;\n\n /** Renders the Markdown of a
|
|
1
|
+
{"version":3,"file":"MarqueeBanner.js","sources":["../../../Banner/MarqueeBanner.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { AnnouncementForMe } from '@cratis/showrunner.marquee';\nimport { ComponentType, KeyboardEvent, useId, useState } from 'react';\nimport { ChevronIcon, ImportanceIcon } from '../Icons.js';\nimport { MarqueeLabels } from '../Labels/index.js';\nimport { hasMarkdown, MarqueeInlineMarkdown, MarqueeMarkdown, MarqueeMarkdownProps } from '../Markdown/index.js';\nimport { importancePresentation } from '../Selection/index.js';\n\n/**\n * Props for {@link MarqueeBanner}, and for the component given to the `banner` slot of {@link Marquee}.\n */\nexport interface MarqueeBannerProps {\n /** The banners to show, the most important first. Empty when there is none. */\n announcements: AnnouncementForMe[];\n\n /** The texts to show. */\n labels: MarqueeLabels;\n\n /** Renders the Markdown of a message; the `markdown` slot of {@link Marquee}. */\n markdown?: ComponentType<MarqueeMarkdownProps>;\n}\n\ninterface MarqueeBannerItemProps {\n announcement: AnnouncementForMe;\n labels: MarqueeLabels;\n markdown: ComponentType<MarqueeMarkdownProps>;\n}\n\nconst MarqueeBannerItem = ({ announcement, labels, markdown: Markdown }: MarqueeBannerItemProps) => {\n const presentation = importancePresentation(announcement.importance, labels);\n const identifier = useId();\n const messageId = `${identifier}-message`;\n const tooltipId = `${identifier}-tooltip`;\n const [expanded, setExpanded] = useState(false);\n const [tooltipVisible, setTooltipVisible] = useState(false);\n const hasMessage = hasMarkdown(announcement.body);\n\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n setTooltipVisible(false);\n }\n };\n\n return (\n <div className={`marquee-banner__item marquee-banner__item--${presentation.modifier}`}>\n <div className='marquee-banner__row'>\n <ImportanceIcon presentation={presentation} />\n <span className='marquee-banner__title'>\n <MarqueeInlineMarkdown source={announcement.title} />\n </span>\n {hasMessage && (\n <span\n className='marquee-banner__more'\n onMouseEnter={() => setTooltipVisible(true)}\n onMouseLeave={() => setTooltipVisible(false)}\n onFocus={() => setTooltipVisible(true)}\n onBlur={() => setTooltipVisible(false)}\n onKeyDown={handleKeyDown}>\n <button\n type='button'\n className='marquee-banner__toggle'\n aria-expanded={expanded}\n aria-controls={messageId}\n aria-describedby={tooltipId}\n aria-label={expanded ? labels.collapse : labels.expand}\n onClick={() => setExpanded(!expanded)}>\n <ChevronIcon expanded={expanded} />\n </button>\n <span\n id={tooltipId}\n role='tooltip'\n className={tooltipVisible && !expanded ? 'marquee-banner__tooltip marquee-banner__tooltip--visible' : 'marquee-banner__tooltip'}>\n <Markdown source={announcement.body} compact />\n </span>\n </span>\n )}\n </div>\n {hasMessage && (\n <div id={messageId} className='marquee-banner__message' hidden={!expanded}>\n <Markdown source={announcement.body} />\n </div>\n )}\n </div>\n );\n};\n\n/**\n * The banners at the top of the application, one row for each, with the icon and the color of its importance.\n *\n * A banner shows its title only, with inline Markdown such as a link. When the announcement has a message, the row ends\n * in a button that shows the message inline below the title, or hides it again, and hovering or focusing the button\n * shows the message in a tooltip. Without a message there is no button and no tooltip.\n *\n * The region is announced politely when a row appears, and is always rendered, because a live region that is added\n * with its content is not reliably announced. It takes no space while it is empty. A banner has no close button: it\n * stays until it is withdrawn or its window ends.\n */\nexport const MarqueeBanner = ({ announcements, labels, markdown = MarqueeMarkdown }: MarqueeBannerProps) => (\n <div className='marquee-banner' role='status' aria-live='polite' aria-label={labels.banners}>\n {announcements.map(announcement => (\n <MarqueeBannerItem key={announcement.id.toString()} announcement={announcement} labels={labels} markdown={markdown} />\n ))}\n </div>\n);\n"],"names":["MarqueeBannerItem","announcement","labels","markdown","Markdown","presentation","importancePresentation","importance","identifier","useId","messageId","tooltipId","expanded","setExpanded","useState","tooltipVisible","setTooltipVisible","hasMessage","hasMarkdown","body","handleKeyDown","event","key","_jsxs","div","className","modifier","_jsx","ImportanceIcon","span","MarqueeInlineMarkdown","source","title","onMouseEnter","onMouseLeave","onFocus","onBlur","onKeyDown","button","type","aria-expanded","aria-controls","aria-describedby","aria-label","collapse","expand","onClick","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H,KAAAA,EAAAA;gBAAIwB,EAAAA,EAAItC,SAAAA;gBAAWe,SAAAA,EAAU,yBAAA;AAA0B0B,gBAAAA,MAAAA,EAAQ,CAACvC,QAAAA;AAC7D,gBAAA,QAAA,gBAAAe,GAAA,CAACvB,QAAAA,EAAAA;AAAS2B,oBAAAA,MAAAA,EAAQ9B,aAAakB;;;;;AAKnD,CAAA;AAEA;;;;;;;;;;AAUC,IACM,MAAMiC,aAAAA,GAAgB,CAAC,EAAEC,aAAa,EAAEnD,MAAM,EAAEC,QAAAA,GAAWmD,eAAe,EAAsB,iBACnG3B,GAAA,CAACH,KAAAA,EAAAA;QAAIC,SAAAA,EAAU,gBAAA;QAAiBwB,IAAAA,EAAK,QAAA;QAASM,WAAAA,EAAU,QAAA;AAASZ,QAAAA,YAAAA,EAAYzC,OAAOsD,OAAO;AACtFH,QAAAA,QAAAA,EAAAA,aAAAA,CAAcI,GAAG,CAACxD,CAAAA,YAAAA,iBACf0B,GAAA,CAAC3B,iBAAAA,EAAAA;gBAAmDC,YAAAA,EAAcA,YAAAA;gBAAcC,MAAAA,EAAQA,MAAAA;gBAAQC,QAAAA,EAAUA;eAAlFF,YAAAA,CAAa+C,EAAE,CAACU,QAAQ,EAAA,CAAA;AAG1D,KAAA;;"}
|
|
@@ -8,4 +8,10 @@ export declare const Warning: Story;
|
|
|
8
8
|
export declare const Critical: Story;
|
|
9
9
|
export declare const Several: Story;
|
|
10
10
|
export declare const None: Story;
|
|
11
|
+
export declare const WithoutMessage: Story;
|
|
12
|
+
export declare const WithMessage: Story;
|
|
13
|
+
export declare const Expanded: Story;
|
|
14
|
+
export declare const Tooltip: Story;
|
|
15
|
+
export declare const MarkdownTitle: Story;
|
|
16
|
+
export declare const Permanent: Story;
|
|
11
17
|
//# sourceMappingURL=MarqueeBanner.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarqueeBanner.stories.d.ts","sourceRoot":"","sources":["../../../Banner/MarqueeBanner.stories.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"MarqueeBanner.stories.d.ts","sourceRoot":"","sources":["../../../Banner/MarqueeBanner.stories.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAI5D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,aAAa,CAIpC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,aAAa,CAAC,CAAC;AAE5C,eAAO,MAAM,WAAW,EAAE,KAAkE,CAAC;AAC7F,eAAO,MAAM,OAAO,EAAE,KAAkE,CAAC;AACzF,eAAO,MAAM,QAAQ,EAAE,KAAkE,CAAC;AAC1F,eAAO,MAAM,OAAO,EAAE,KAA4E,CAAC;AACnG,eAAO,MAAM,IAAI,EAAE,KAAuC,CAAC;AAG3D,eAAO,MAAM,cAAc,EAAE,KAA2D,CAAC;AAGzF,eAAO,MAAM,WAAW,EAAE,KAAwD,CAAC;AAGnF,eAAO,MAAM,QAAQ,EAAE,KAKtB,CAAC;AAGF,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAGF,eAAO,MAAM,aAAa,EAAE,KAA8D,CAAC;AAG3F,eAAO,MAAM,SAAS,EAAE,KAAsD,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { userEvent, within } from 'storybook/test';
|
|
2
|
+
import { bannersOfEveryImportance, bannerWithMarkdownTitle, bannerWithMessage, bannerWithoutMessage, permanentBanner } from '../given/storyAnnouncements.js';
|
|
2
3
|
import { defaultMarqueeLabels } from '../Labels/index.js';
|
|
3
4
|
import { MarqueeBanner } from './MarqueeBanner.js';
|
|
4
5
|
const meta = {
|
|
@@ -12,4 +13,20 @@ export const Warning = { args: { announcements: [bannersOfEveryImportance[1]] }
|
|
|
12
13
|
export const Critical = { args: { announcements: [bannersOfEveryImportance[2]] } };
|
|
13
14
|
export const Several = { args: { announcements: [...bannersOfEveryImportance].reverse() } };
|
|
14
15
|
export const None = { args: { announcements: [] } };
|
|
16
|
+
export const WithoutMessage = { args: { announcements: [bannerWithoutMessage] } };
|
|
17
|
+
export const WithMessage = { args: { announcements: [bannerWithMessage] } };
|
|
18
|
+
export const Expanded = {
|
|
19
|
+
args: { announcements: [bannerWithMessage] },
|
|
20
|
+
play: async ({ canvasElement }) => {
|
|
21
|
+
await userEvent.click(within(canvasElement).getByRole('button', { name: defaultMarqueeLabels.expand }));
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
export const Tooltip = {
|
|
25
|
+
args: { announcements: [bannerWithMessage] },
|
|
26
|
+
play: async ({ canvasElement }) => {
|
|
27
|
+
await userEvent.hover(within(canvasElement).getByRole('button', { name: defaultMarqueeLabels.expand }));
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
export const MarkdownTitle = { args: { announcements: [bannerWithMarkdownTitle] } };
|
|
31
|
+
export const Permanent = { args: { announcements: [permanentBanner] } };
|
|
15
32
|
//# sourceMappingURL=MarqueeBanner.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarqueeBanner.stories.js","sourceRoot":"","sources":["../../../Banner/MarqueeBanner.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"MarqueeBanner.stories.js","sourceRoot":"","sources":["../../../Banner/MarqueeBanner.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE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iBAAiB,CAAC,EAAE;IAC5C,IAAI,EAAE,KAAK,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE;QAC9B,MAAM,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,oBAAoB,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IAC5G,CAAC;CACJ,CAAC;AAGF,MAAM,CAAC,MAAM,OAAO,GAAU;IAC1B,IAAI,EAAE,EAAE,aAAa,EAAE,CAAC,iBAAiB,CAAC,EAAE;IAC5C,IAAI,EAAE,KAAK,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE;QAC9B,MAAM,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,oBAAoB,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IAC5G,CAAC;CACJ,CAAC;AAGF,MAAM,CAAC,MAAM,aAAa,GAAU,EAAE,IAAI,EAAE,EAAE,aAAa,EAAE,CAAC,uBAAuB,CAAC,EAAE,EAAE,CAAC;AAG3F,MAAM,CAAC,MAAM,SAAS,GAAU,EAAE,IAAI,EAAE,EAAE,aAAa,EAAE,CAAC,eAAe,CAAC,EAAE,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarqueeDialog.d.ts","sourceRoot":"","sources":["../../../Dialog/MarqueeDialog.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,
|
|
1
|
+
{"version":3,"file":"MarqueeDialog.d.ts","sourceRoot":"","sources":["../../../Dialog/MarqueeDialog.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAA4E,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAMtI,MAAM,WAAW,kBAAkB;IAE/B,YAAY,EAAE,iBAAiB,CAAC;IAGhC,OAAO,EAAE,OAAO,CAAC;IAGjB,OAAO,EAAE,MAAM,IAAI,CAAC;IAGpB,MAAM,EAAE,aAAa,CAAC;IAGtB,QAAQ,CAAC,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;CAClD;AAUD,eAAO,MAAM,aAAa,GAAI,gEAAkF,kBAAkB,gCA4BjI,CAAC"}
|
|
@@ -2,17 +2,25 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
2
2
|
import { DialogButtons } from '@cratis/arc.react/dialogs';
|
|
3
3
|
import { Dialog, DialogInitialFocus } from '@cratis/components/Dialogs';
|
|
4
4
|
import { ImportanceIcon } from '../Icons.js';
|
|
5
|
+
import { MarqueeInlineMarkdown } from '../Markdown/MarqueeInlineMarkdown.js';
|
|
5
6
|
import { MarqueeMarkdown } from '../Markdown/MarqueeMarkdown.js';
|
|
7
|
+
import { markdownToPlainText, hasMarkdown } from '../Markdown/markdownText.js';
|
|
6
8
|
import '@cratis/showrunner.marquee';
|
|
7
9
|
import { importancePresentation } from '../Selection/importancePresentation.js';
|
|
8
10
|
|
|
9
11
|
/**
|
|
10
12
|
* One announcement in a dialog. Focus moves into the dialog and is kept in it until it is closed, and lands on the
|
|
11
13
|
* title instead of the button, so the Enter or Space that was being pressed when it opened does not close it unread.
|
|
14
|
+
*
|
|
15
|
+
* The heading is the title as plain text, with the Markdown taken out, as a dialog heading is a string. A title that
|
|
16
|
+
* uses Markdown, such as a link, is shown again with its formatting at the top of the content. The message is optional
|
|
17
|
+
* and is left out when there is none.
|
|
12
18
|
*/ const MarqueeDialog = ({ announcement, hasMore, onClose, labels, markdown: Markdown = MarqueeMarkdown })=>{
|
|
13
19
|
const presentation = importancePresentation(announcement.importance, labels);
|
|
20
|
+
const plainTitle = markdownToPlainText(announcement.title);
|
|
21
|
+
const titleHasMarkdown = announcement.title.trim() !== plainTitle;
|
|
14
22
|
return /*#__PURE__*/ jsx(Dialog, {
|
|
15
|
-
title:
|
|
23
|
+
title: plainTitle,
|
|
16
24
|
width: "34rem",
|
|
17
25
|
buttons: DialogButtons.Ok,
|
|
18
26
|
okLabel: hasMore ? labels.next : labels.acknowledge,
|
|
@@ -29,7 +37,13 @@ import { importancePresentation } from '../Selection/importancePresentation.js';
|
|
|
29
37
|
presentation: presentation
|
|
30
38
|
})
|
|
31
39
|
}),
|
|
32
|
-
/*#__PURE__*/ jsx(
|
|
40
|
+
titleHasMarkdown && /*#__PURE__*/ jsx("p", {
|
|
41
|
+
className: "marquee-dialog__title",
|
|
42
|
+
children: /*#__PURE__*/ jsx(MarqueeInlineMarkdown, {
|
|
43
|
+
source: announcement.title
|
|
44
|
+
})
|
|
45
|
+
}),
|
|
46
|
+
hasMarkdown(announcement.body) && /*#__PURE__*/ jsx(Markdown, {
|
|
33
47
|
source: announcement.body
|
|
34
48
|
})
|
|
35
49
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarqueeDialog.js","sources":["../../../Dialog/MarqueeDialog.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { DialogButtons } from '@cratis/arc.react/dialogs';\nimport { Dialog, DialogInitialFocus } from '@cratis/components/Dialogs';\nimport { AnnouncementForMe } from '@cratis/showrunner.marquee';\nimport { ComponentType } from 'react';\nimport { ImportanceIcon } from '../Icons.js';\nimport { MarqueeLabels } from '../Labels/index.js';\nimport { MarqueeMarkdown, MarqueeMarkdownProps } from '../Markdown/index.js';\nimport { importancePresentation } from '../Selection/index.js';\n\n/**\n * Props for {@link MarqueeDialog}, and for the component given to the `dialog` slot of {@link Marquee}.\n */\nexport interface MarqueeDialogProps {\n /** The announcement to show. */\n announcement: AnnouncementForMe;\n\n /** Whether more dialogs follow this one; the button then moves on instead of finishing. */\n hasMore: boolean;\n\n /** Called when the person closes the dialog, with the button, Escape or the close button of the header. */\n onClose: () => void;\n\n /** The texts to show. */\n labels: MarqueeLabels;\n\n /** Renders the Markdown of a body; the `markdown` slot of {@link Marquee}. */\n markdown?: ComponentType<MarqueeMarkdownProps>;\n}\n\n/**\n * One announcement in a dialog. Focus moves into the dialog and is kept in it until it is closed, and lands on the\n * title instead of the button, so the Enter or Space that was being pressed when it opened does not close it unread.\n */\nexport const MarqueeDialog = ({ announcement, hasMore, onClose, labels, markdown: Markdown = MarqueeMarkdown }: MarqueeDialogProps) => {\n const presentation = importancePresentation(announcement.importance, labels);\n\n return (\n <Dialog\n title={
|
|
1
|
+
{"version":3,"file":"MarqueeDialog.js","sources":["../../../Dialog/MarqueeDialog.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { DialogButtons } from '@cratis/arc.react/dialogs';\nimport { Dialog, DialogInitialFocus } from '@cratis/components/Dialogs';\nimport { AnnouncementForMe } from '@cratis/showrunner.marquee';\nimport { ComponentType } from 'react';\nimport { ImportanceIcon } from '../Icons.js';\nimport { MarqueeLabels } from '../Labels/index.js';\nimport { hasMarkdown, markdownToPlainText, MarqueeInlineMarkdown, MarqueeMarkdown, MarqueeMarkdownProps } from '../Markdown/index.js';\nimport { importancePresentation } from '../Selection/index.js';\n\n/**\n * Props for {@link MarqueeDialog}, and for the component given to the `dialog` slot of {@link Marquee}.\n */\nexport interface MarqueeDialogProps {\n /** The announcement to show. */\n announcement: AnnouncementForMe;\n\n /** Whether more dialogs follow this one; the button then moves on instead of finishing. */\n hasMore: boolean;\n\n /** Called when the person closes the dialog, with the button, Escape or the close button of the header. */\n onClose: () => void;\n\n /** The texts to show. */\n labels: MarqueeLabels;\n\n /** Renders the Markdown of a body; the `markdown` slot of {@link Marquee}. */\n markdown?: ComponentType<MarqueeMarkdownProps>;\n}\n\n/**\n * One announcement in a dialog. Focus moves into the dialog and is kept in it until it is closed, and lands on the\n * title instead of the button, so the Enter or Space that was being pressed when it opened does not close it unread.\n *\n * The heading is the title as plain text, with the Markdown taken out, as a dialog heading is a string. A title that\n * uses Markdown, such as a link, is shown again with its formatting at the top of the content. The message is optional\n * and is left out when there is none.\n */\nexport const MarqueeDialog = ({ announcement, hasMore, onClose, labels, markdown: Markdown = MarqueeMarkdown }: MarqueeDialogProps) => {\n const presentation = importancePresentation(announcement.importance, labels);\n const plainTitle = markdownToPlainText(announcement.title);\n const titleHasMarkdown = announcement.title.trim() !== plainTitle;\n\n return (\n <Dialog\n title={plainTitle}\n width='34rem'\n buttons={DialogButtons.Ok}\n okLabel={hasMore ? labels.next : labels.acknowledge}\n closeAriaLabel={labels.close}\n initialFocus={DialogInitialFocus.Content}\n onConfirm={onClose}\n onCancel={onClose}>\n <div className='marquee-dialog'>\n <div className={`marquee-dialog__importance marquee-dialog__importance--${presentation.modifier}`}>\n <ImportanceIcon presentation={presentation} />\n </div>\n {titleHasMarkdown && (\n <p className='marquee-dialog__title'>\n <MarqueeInlineMarkdown source={announcement.title} />\n </p>\n )}\n {hasMarkdown(announcement.body) && <Markdown source={announcement.body} />}\n </div>\n </Dialog>\n );\n};\n"],"names":["MarqueeDialog","announcement","hasMore","onClose","labels","markdown","Markdown","MarqueeMarkdown","presentation","importancePresentation","importance","plainTitle","markdownToPlainText","title","titleHasMarkdown","trim","_jsx","Dialog","width","buttons","DialogButtons","Ok","okLabel","next","acknowledge","closeAriaLabel","close","initialFocus","DialogInitialFocus","Content","onConfirm","onCancel","_jsxs","div","className","modifier","ImportanceIcon","p","MarqueeInlineMarkdown","source","hasMarkdown","body"],"mappings":";;;;;;;;;;AAgCA;;;;;;;AAOC,IACM,MAAMA,aAAAA,GAAgB,CAAC,EAAEC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CAAYvC,YAAAA,CAAawC,IAAI,CAAA,kBAAKzB,GAAA,CAACV,QAAAA,EAAAA;AAASiC,oBAAAA,MAAAA,EAAQtC,aAAawC;;;;;AAIlF;;"}
|
|
@@ -10,4 +10,6 @@ export declare const DialogEverySessionInformation: Story;
|
|
|
10
10
|
export declare const DialogEverySessionWarning: Story;
|
|
11
11
|
export declare const DialogEverySessionCritical: Story;
|
|
12
12
|
export declare const WithMoreToFollow: Story;
|
|
13
|
+
export declare const MarkdownTitle: Story;
|
|
14
|
+
export declare const WithoutMessage: Story;
|
|
13
15
|
//# sourceMappingURL=MarqueeDialog.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarqueeDialog.stories.d.ts","sourceRoot":"","sources":["../../../Dialog/MarqueeDialog.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"MarqueeDialog.stories.d.ts","sourceRoot":"","sources":["../../../Dialog/MarqueeDialog.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAI5D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,aAAa,CAIpC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,aAAa,CAAC,CAAC;AAE5C,eAAO,MAAM,qBAAqB,EAAE,KAAuF,CAAC;AAC5H,eAAO,MAAM,iBAAiB,EAAE,KAAmF,CAAC;AACpH,eAAO,MAAM,kBAAkB,EAAE,KAAoF,CAAC;AACtH,eAAO,MAAM,6BAA6B,EAAE,KAA+F,CAAC;AAC5I,eAAO,MAAM,yBAAyB,EAAE,KAA2F,CAAC;AACpI,eAAO,MAAM,0BAA0B,EAAE,KAA4F,CAAC;AACtI,eAAO,MAAM,gBAAgB,EAAE,KAAkG,CAAC;AAGlI,eAAO,MAAM,aAAa,EAAE,KAAgK,CAAC;AAG7L,eAAO,MAAM,cAAc,EAAE,KAA2H,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Display, Importance } from '@cratis/showrunner.marquee';
|
|
2
|
+
import { anAnnouncement } from '../given/an_announcement.js';
|
|
2
3
|
import { aDialog } from '../given/storyAnnouncements.js';
|
|
3
4
|
import { defaultMarqueeLabels } from '../Labels/index.js';
|
|
4
5
|
import { MarqueeDialog } from './MarqueeDialog.js';
|
|
@@ -15,4 +16,6 @@ export const DialogEverySessionInformation = { args: { announcement: aDialog(Imp
|
|
|
15
16
|
export const DialogEverySessionWarning = { args: { announcement: aDialog(Importance.warning, Display.dialogEverySession) } };
|
|
16
17
|
export const DialogEverySessionCritical = { args: { announcement: aDialog(Importance.critical, Display.dialogEverySession) } };
|
|
17
18
|
export const WithMoreToFollow = { args: { announcement: aDialog(Importance.warning, Display.dialogOnce), hasMore: true } };
|
|
19
|
+
export const MarkdownTitle = { args: { announcement: anAnnouncement({ title: 'Maintenance tonight. [Read more here.](https://status.example.com)', display: Display.dialogOnce }) } };
|
|
20
|
+
export const WithoutMessage = { args: { announcement: anAnnouncement({ title: 'Maintenance tonight', body: '', display: Display.dialogOnce }) } };
|
|
18
21
|
//# sourceMappingURL=MarqueeDialog.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarqueeDialog.stories.js","sourceRoot":"","sources":["../../../Dialog/MarqueeDialog.stories.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAEjE,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,C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EAAE,EAAE,YAAY,EAAE,OAAO,CAAC,UAAU,CAAC,WAAW,EAAE,OAAO,CAAC,kBAAkB,CAAC,EAAE,EAAE,CAAC;AAC5I,MAAM,CAAC,MAAM,yBAAyB,GAAU,EAAE,IAAI,EAAE,EAAE,YAAY,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC,kBAAkB,CAAC,EAAE,EAAE,CAAC;AACpI,MAAM,CAAC,MAAM,0BAA0B,GAAU,EAAE,IAAI,EAAE,EAAE,YAAY,EAAE,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE,OAAO,CAAC,kBAAkB,CAAC,EAAE,EAAE,CAAC;AACtI,MAAM,CAAC,MAAM,gBAAgB,GAAU,EAAE,IAAI,EAAE,EAAE,YAAY,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC;AAGlI,MAAM,CAAC,MAAM,aAAa,GAAU,EAAE,IAAI,EAAE,EAAE,YAAY,EAAE,cAAc,CAAC,EAAE,KAAK,EAAE,oEAAoE,EAAE,OAAO,EAAE,OAAO,CAAC,UAAU,EAAE,CAAC,EAAE,EAAE,CAAC;AAG7L,MAAM,CAAC,MAAM,cAAc,GAAU,EAAE,IAAI,EAAE,EAAE,YAAY,EAAE,cAAc,CAAC,EAAE,KAAK,EAAE,qBAAqB,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,UAAU,EAAE,CAAC,EAAE,EAAE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Marquee } from '@cratis/showrunner.marquee.react';
|
|
3
|
-
const OneLineBanner = ({ announcements, labels, markdown: Markdown }) => (_jsx("div", { role: 'status', "aria-live": 'polite', "aria-label": labels.banners, children: announcements.map(announcement => (_jsxs("p", { children: [_jsx("strong", { children: announcement.title }), Markdown && _jsx(Markdown, { source: announcement.body, compact: true })] }, announcement.id.toString()))) }));
|
|
2
|
+
import { hasMarkdown, Marquee, MarqueeInlineMarkdown } from '@cratis/showrunner.marquee.react';
|
|
3
|
+
const OneLineBanner = ({ announcements, labels, markdown: Markdown }) => (_jsx("div", { role: 'status', "aria-live": 'polite', "aria-label": labels.banners, children: announcements.map(announcement => (_jsxs("p", { children: [_jsx("strong", { children: _jsx(MarqueeInlineMarkdown, { source: announcement.title }) }), Markdown && hasMarkdown(announcement.body) && _jsx(Markdown, { source: announcement.body, compact: true })] }, announcement.id.toString()))) }));
|
|
4
4
|
export const MarqueeWithOneLineBanner = () => _jsx(Marquee, { banner: OneLineBanner });
|
|
5
5
|
//# sourceMappingURL=CustomBanner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomBanner.js","sourceRoot":"","sources":["../../../Examples/CustomBanner.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,OAAO,EAAsB,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"CustomBanner.js","sourceRoot":"","sources":["../../../Examples/CustomBanner.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAsB,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAEnH,MAAM,aAAa,GAAG,CAAC,EAAE,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAsB,EAAE,EAAE,CAAC,CACzF,cAAK,IAAI,EAAC,QAAQ,eAAW,QAAQ,gBAAa,MAAM,CAAC,OAAO,YAC3D,aAAa,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC,CAC/B,wBACI,2BAAQ,KAAC,qBAAqB,IAAC,MAAM,EAAE,YAAY,CAAC,KAAK,GAAI,GAAS,EACrE,QAAQ,IAAI,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,KAAC,QAAQ,IAAC,MAAM,EAAE,YAAY,CAAC,IAAI,EAAE,OAAO,SAAG,KAF1F,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,CAG9B,CACP,CAAC,GACA,CACT,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,EAAE,CAAC,KAAC,OAAO,IAAC,MAAM,EAAE,aAAa,GAAI,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Marquee } from '@cratis/showrunner.marquee.react';
|
|
3
|
-
const SheetDialog = ({ announcement, hasMore, onClose, labels, markdown: Markdown }) => (_jsxs("dialog", { open: true, "aria-label": announcement.title, children: [_jsx("h2", { children: announcement.title }), Markdown && _jsx(Markdown, { source: announcement.body }), _jsx("button", { type: 'button', onClick: onClose, children: hasMore ? labels.next : labels.acknowledge })] }));
|
|
2
|
+
import { hasMarkdown, markdownToPlainText, Marquee, MarqueeInlineMarkdown } from '@cratis/showrunner.marquee.react';
|
|
3
|
+
const SheetDialog = ({ announcement, hasMore, onClose, labels, markdown: Markdown }) => (_jsxs("dialog", { open: true, "aria-label": markdownToPlainText(announcement.title), children: [_jsx("h2", { children: _jsx(MarqueeInlineMarkdown, { source: announcement.title }) }), Markdown && hasMarkdown(announcement.body) && _jsx(Markdown, { source: announcement.body }), _jsx("button", { type: 'button', onClick: onClose, children: hasMore ? labels.next : labels.acknowledge })] }));
|
|
4
4
|
export const MarqueeWithSheetDialog = () => _jsx(Marquee, { dialog: SheetDialog });
|
|
5
5
|
//# sourceMappingURL=CustomDialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomDialog.js","sourceRoot":"","sources":["../../../Examples/CustomDialog.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,OAAO,EAAsB,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"CustomDialog.js","sourceRoot":"","sources":["../../../Examples/CustomDialog.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,OAAO,EAAsB,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAExI,MAAM,WAAW,GAAG,CAAC,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAsB,EAAE,EAAE,CAAC,CACxG,kBAAQ,IAAI,sBAAa,mBAAmB,CAAC,YAAY,CAAC,KAAK,CAAC,aAC5D,uBAAI,KAAC,qBAAqB,IAAC,MAAM,EAAE,YAAY,CAAC,KAAK,GAAI,GAAK,EAC7D,QAAQ,IAAI,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,KAAC,QAAQ,IAAC,MAAM,EAAE,YAAY,CAAC,IAAI,GAAI,EACtF,iBAAQ,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,OAAO,YAAG,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,GAAU,IACxF,CACZ,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,EAAE,CAAC,KAAC,OAAO,IAAC,MAAM,EAAE,WAAW,GAAI,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocalizedMarquee.d.ts","sourceRoot":"","sources":["../../../Examples/LocalizedMarquee.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"LocalizedMarquee.d.ts","sourceRoot":"","sources":["../../../Examples/LocalizedMarquee.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB,mCAc5B,CAAC"}
|
|
@@ -5,6 +5,8 @@ export const LocalizedMarquee = () => (_jsx(Marquee, { checkInterval: 30_000, la
|
|
|
5
5
|
acknowledge: 'Forstått',
|
|
6
6
|
next: 'Neste',
|
|
7
7
|
close: 'Lukk',
|
|
8
|
+
expand: 'Vis meldingen',
|
|
9
|
+
collapse: 'Skjul meldingen',
|
|
8
10
|
information: 'Informasjon',
|
|
9
11
|
warning: 'Advarsel',
|
|
10
12
|
critical: 'Kritisk'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocalizedMarquee.js","sourceRoot":"","sources":["../../../Examples/LocalizedMarquee.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAE3D,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE,CAAC,CAClC,KAAC,OAAO,IACJ,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE;QACJ,OAAO,EAAE,eAAe;QACxB,WAAW,EAAE,UAAU;QACvB,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,MAAM;QACb,WAAW,EAAE,aAAa;QAC1B,OAAO,EAAE,UAAU;QACnB,QAAQ,EAAE,SAAS;KACtB,GAAI,CACZ,CAAC"}
|
|
1
|
+
{"version":3,"file":"LocalizedMarquee.js","sourceRoot":"","sources":["../../../Examples/LocalizedMarquee.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAE3D,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE,CAAC,CAClC,KAAC,OAAO,IACJ,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE;QACJ,OAAO,EAAE,eAAe;QACxB,WAAW,EAAE,UAAU;QACvB,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,eAAe;QACvB,QAAQ,EAAE,iBAAiB;QAC3B,WAAW,EAAE,aAAa;QAC1B,OAAO,EAAE,UAAU;QACnB,QAAQ,EAAE,SAAS;KACtB,GAAI,CACZ,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useAnnouncements } from '@cratis/showrunner.marquee.react';
|
|
2
|
+
import { markdownToPlainText, useAnnouncements } from '@cratis/showrunner.marquee.react';
|
|
3
3
|
export const AnnouncementBell = () => {
|
|
4
4
|
const { banners, dialogs, close } = useAnnouncements();
|
|
5
|
-
return (_jsxs("section", { "aria-label": 'Announcements', children: [_jsxs("p", { children: [banners.length, " standing"] }), _jsx("ul", { children: dialogs.map(announcement => (_jsxs("li", { children: [announcement.title, _jsx("button", { type: 'button', onClick: () => void close(announcement), children: "Mark as read" })] }, announcement.id.toString()))) })] }));
|
|
5
|
+
return (_jsxs("section", { "aria-label": 'Announcements', children: [_jsxs("p", { children: [banners.length, " standing"] }), _jsx("ul", { children: dialogs.map(announcement => (_jsxs("li", { children: [markdownToPlainText(announcement.title), _jsx("button", { type: 'button', onClick: () => void close(announcement), children: "Mark as read" })] }, announcement.id.toString()))) })] }));
|
|
6
6
|
};
|
|
7
7
|
//# sourceMappingURL=OwnSurface.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OwnSurface.js","sourceRoot":"","sources":["../../../Examples/OwnSurface.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"OwnSurface.js","sourceRoot":"","sources":["../../../Examples/OwnSurface.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEzF,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACjC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,gBAAgB,EAAE,CAAC;IAEvD,OAAO,CACH,iCAAoB,eAAe,aAC/B,wBAAI,OAAO,CAAC,MAAM,iBAAc,EAChC,uBACK,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC,CACzB,yBACK,mBAAmB,CAAC,YAAY,CAAC,KAAK,CAAC,EACxC,iBAAQ,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,KAAK,CAAC,YAAY,CAAC,6BAAuB,KAF/E,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,CAG9B,CACR,CAAC,GACD,IACC,CACb,CAAC;AACN,CAAC,CAAC"}
|
package/dist/esm/Icons.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { ImportancePresentation } from './Selection/index.js';
|
|
2
|
+
export interface ChevronIconProps {
|
|
3
|
+
expanded: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare const ChevronIcon: ({ expanded }: ChevronIconProps) => import("react").JSX.Element;
|
|
2
6
|
export interface ImportanceIconProps {
|
|
3
7
|
presentation: ImportancePresentation;
|
|
4
8
|
}
|
package/dist/esm/Icons.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icons.d.ts","sourceRoot":"","sources":["../../Icons.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAW9D,MAAM,WAAW,mBAAmB;IAEhC,YAAY,EAAE,sBAAsB,CAAC;CACxC;AAKD,eAAO,MAAM,cAAc,GAAI,kBAAkB,mBAAmB,gCAWnE,CAAC"}
|
|
1
|
+
{"version":3,"file":"Icons.d.ts","sourceRoot":"","sources":["../../Icons.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAW9D,MAAM,WAAW,gBAAgB;IAE7B,QAAQ,EAAE,OAAO,CAAC;CACrB;AAMD,eAAO,MAAM,WAAW,GAAI,cAAc,gBAAgB,gCAUzD,CAAC;AAKF,MAAM,WAAW,mBAAmB;IAEhC,YAAY,EAAE,sBAAsB,CAAC;CACxC;AAKD,eAAO,MAAM,cAAc,GAAI,kBAAkB,mBAAmB,gCAWnE,CAAC"}
|
package/dist/esm/Icons.js
CHANGED
|
@@ -7,6 +7,21 @@ const paths = {
|
|
|
7
7
|
warning: 'M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z',
|
|
8
8
|
critical: 'M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z'
|
|
9
9
|
};
|
|
10
|
+
/**
|
|
11
|
+
* The chevron on the button of a banner that shows or hides its message. It is decorative: the button is named by its
|
|
12
|
+
* label and says whether it is expanded.
|
|
13
|
+
*/ const ChevronIcon = ({ expanded })=>/*#__PURE__*/ jsx("svg", {
|
|
14
|
+
className: expanded ? 'marquee-chevron marquee-chevron--expanded' : 'marquee-chevron',
|
|
15
|
+
viewBox: "0 0 24 24",
|
|
16
|
+
width: "1em",
|
|
17
|
+
height: "1em",
|
|
18
|
+
"aria-hidden": "true",
|
|
19
|
+
focusable: "false",
|
|
20
|
+
children: /*#__PURE__*/ jsx("path", {
|
|
21
|
+
fill: "currentColor",
|
|
22
|
+
d: "M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"
|
|
23
|
+
})
|
|
24
|
+
});
|
|
10
25
|
/**
|
|
11
26
|
* The icon of an importance, named for screen readers so the level is read out with the announcement.
|
|
12
27
|
*/ const ImportanceIcon = ({ presentation })=>/*#__PURE__*/ jsx("svg", {
|
|
@@ -23,5 +38,5 @@ const paths = {
|
|
|
23
38
|
})
|
|
24
39
|
});
|
|
25
40
|
|
|
26
|
-
export { ImportanceIcon };
|
|
41
|
+
export { ChevronIcon, ImportanceIcon };
|
|
27
42
|
//# sourceMappingURL=Icons.js.map
|
package/dist/esm/Icons.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icons.js","sources":["../../Icons.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ImportancePresentation } from './Selection/index.js';\n\nconst paths: Record<ImportancePresentation['modifier'], string> = {\n information: 'M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z',\n warning: 'M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z',\n critical: 'M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z'\n};\n\n/**\n * Props for {@link ImportanceIcon}.\n */\nexport interface ImportanceIconProps {\n /** How the importance is presented. */\n presentation: ImportancePresentation;\n}\n\n/**\n * The icon of an importance, named for screen readers so the level is read out with the announcement.\n */\nexport const ImportanceIcon = ({ presentation }: ImportanceIconProps) => (\n <svg\n className={`marquee-icon marquee-icon--${presentation.modifier}`}\n viewBox='0 0 24 24'\n width='1em'\n height='1em'\n role='img'\n aria-label={presentation.label}\n focusable='false'>\n <path fill='currentColor' d={paths[presentation.modifier]} />\n </svg>\n);\n"],"names":["paths","information","warning","critical","
|
|
1
|
+
{"version":3,"file":"Icons.js","sources":["../../Icons.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ImportancePresentation } from './Selection/index.js';\n\nconst paths: Record<ImportancePresentation['modifier'], string> = {\n information: 'M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z',\n warning: 'M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z',\n critical: 'M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z'\n};\n\n/**\n * Props for {@link ChevronIcon}.\n */\nexport interface ChevronIconProps {\n /** Whether the message it controls is shown; the chevron then points up instead of down. */\n expanded: boolean;\n}\n\n/**\n * The chevron on the button of a banner that shows or hides its message. It is decorative: the button is named by its\n * label and says whether it is expanded.\n */\nexport const ChevronIcon = ({ expanded }: ChevronIconProps) => (\n <svg\n className={expanded ? 'marquee-chevron marquee-chevron--expanded' : 'marquee-chevron'}\n viewBox='0 0 24 24'\n width='1em'\n height='1em'\n aria-hidden='true'\n focusable='false'>\n <path fill='currentColor' d='M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z' />\n </svg>\n);\n\n/**\n * Props for {@link ImportanceIcon}.\n */\nexport interface ImportanceIconProps {\n /** How the importance is presented. */\n presentation: ImportancePresentation;\n}\n\n/**\n * The icon of an importance, named for screen readers so the level is read out with the announcement.\n */\nexport const ImportanceIcon = ({ presentation }: ImportanceIconProps) => (\n <svg\n className={`marquee-icon marquee-icon--${presentation.modifier}`}\n viewBox='0 0 24 24'\n width='1em'\n height='1em'\n role='img'\n aria-label={presentation.label}\n focusable='false'>\n <path fill='currentColor' d={paths[presentation.modifier]} />\n </svg>\n);\n"],"names":["paths","information","warning","critical","ChevronIcon","expanded","_jsx","svg","className","viewBox","width","height","aria-hidden","focusable","path","fill","d","ImportanceIcon","presentation","modifier","role","aria-label","label"],"mappings":";;AAAA;AACA;AAIA,MAAMA,KAAAA,GAA4D;IAC9DC,WAAAA,EAAa,wEAAA;IACbC,OAAAA,EAAS,oDAAA;IACTC,QAAAA,EAAU;AACd,CAAA;AAUA;;;UAIaC,WAAAA,GAAc,CAAC,EAAEC,QAAQ,EAAoB,iBACtDC,GAAA,CAACC,KAAAA,EAAAA;AACGC,QAAAA,SAAAA,EAAWH,WAAW,2CAAA,GAA8C,iBAAA;QACpEI,OAAAA,EAAQ,WAAA;QACRC,KAAAA,EAAM,KAAA;QACNC,MAAAA,EAAO,KAAA;QACPC,aAAAA,EAAY,MAAA;QACZC,SAAAA,EAAU,OAAA;AACV,QAAA,QAAA,gBAAAP,GAAA,CAACQ,MAAAA,EAAAA;YAAKC,IAAAA,EAAK,cAAA;YAAeC,CAAAA,EAAE;;AAElC,KAAA;AAUF;;UAGaC,cAAAA,GAAiB,CAAC,EAAEC,YAAY,EAAuB,iBAChEZ,GAAA,CAACC,KAAAA,EAAAA;AACGC,QAAAA,SAAAA,EAAW,CAAC,2BAA2B,EAAEU,YAAAA,CAAaC,QAAQ,CAAA,CAAE;QAChEV,OAAAA,EAAQ,WAAA;QACRC,KAAAA,EAAM,KAAA;QACNC,MAAAA,EAAO,KAAA;QACPS,IAAAA,EAAK,KAAA;AACLC,QAAAA,YAAAA,EAAYH,aAAaI,KAAK;QAC9BT,SAAAA,EAAU,OAAA;AACV,QAAA,QAAA,gBAAAP,GAAA,CAACQ,MAAAA,EAAAA;YAAKC,IAAAA,EAAK,cAAA;AAAeC,YAAAA,CAAAA,EAAGhB,KAAK,CAACkB,YAAAA,CAAaC,QAAQ;;AAE9D,KAAA;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarqueeLabels.d.ts","sourceRoot":"","sources":["../../../Labels/MarqueeLabels.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,aAAa;IAE1B,OAAO,EAAE,MAAM,CAAC;IAGhB,WAAW,EAAE,MAAM,CAAC;IAGpB,IAAI,EAAE,MAAM,CAAC;IAGb,KAAK,EAAE,MAAM,CAAC;IAGd,WAAW,EAAE,MAAM,CAAC;IAGpB,OAAO,EAAE,MAAM,CAAC;IAGhB,QAAQ,EAAE,MAAM,CAAC;CACpB"}
|
|
1
|
+
{"version":3,"file":"MarqueeLabels.d.ts","sourceRoot":"","sources":["../../../Labels/MarqueeLabels.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,aAAa;IAE1B,OAAO,EAAE,MAAM,CAAC;IAGhB,WAAW,EAAE,MAAM,CAAC;IAGpB,IAAI,EAAE,MAAM,CAAC;IAGb,KAAK,EAAE,MAAM,CAAC;IAGd,MAAM,EAAE,MAAM,CAAC;IAGf,QAAQ,EAAE,MAAM,CAAC;IAGjB,WAAW,EAAE,MAAM,CAAC;IAGpB,OAAO,EAAE,MAAM,CAAC;IAGhB,QAAQ,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultMarqueeLabels.d.ts","sourceRoot":"","sources":["../../../Labels/defaultMarqueeLabels.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAKnD,eAAO,MAAM,oBAAoB,EAAE,
|
|
1
|
+
{"version":3,"file":"defaultMarqueeLabels.d.ts","sourceRoot":"","sources":["../../../Labels/defaultMarqueeLabels.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAKnD,eAAO,MAAM,oBAAoB,EAAE,aAUlC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultMarqueeLabels.js","sources":["../../../Labels/defaultMarqueeLabels.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { MarqueeLabels } from './MarqueeLabels.js';\n\n/**\n * The English texts Marquee shows without overrides.\n */\nexport const defaultMarqueeLabels: MarqueeLabels = {\n banners: 'Announcements',\n acknowledge: 'Got it',\n next: 'Next',\n close: 'Close',\n information: 'Information',\n warning: 'Warning',\n critical: 'Critical'\n};\n"],"names":["defaultMarqueeLabels","banners","acknowledge","next","close","information","warning","critical"],"mappings":"AAAA;AACA;AAIA;;UAGaA,oBAAAA,GAAsC;IAC/CC,OAAAA,EAAS,eAAA;IACTC,WAAAA,EAAa,QAAA;IACbC,IAAAA,EAAM,MAAA;IACNC,KAAAA,EAAO,OAAA;IACPC,WAAAA,EAAa,aAAA;IACbC,OAAAA,EAAS,SAAA;IACTC,QAAAA,EAAU;AACd;;"}
|
|
1
|
+
{"version":3,"file":"defaultMarqueeLabels.js","sources":["../../../Labels/defaultMarqueeLabels.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { MarqueeLabels } from './MarqueeLabels.js';\n\n/**\n * The English texts Marquee shows without overrides.\n */\nexport const defaultMarqueeLabels: MarqueeLabels = {\n banners: 'Announcements',\n acknowledge: 'Got it',\n next: 'Next',\n close: 'Close',\n expand: 'Show the message',\n collapse: 'Hide the message',\n information: 'Information',\n warning: 'Warning',\n critical: 'Critical'\n};\n"],"names":["defaultMarqueeLabels","banners","acknowledge","next","close","expand","collapse","information","warning","critical"],"mappings":"AAAA;AACA;AAIA;;UAGaA,oBAAAA,GAAsC;IAC/CC,OAAAA,EAAS,eAAA;IACTC,WAAAA,EAAa,QAAA;IACbC,IAAAA,EAAM,MAAA;IACNC,KAAAA,EAAO,OAAA;IACPC,MAAAA,EAAQ,kBAAA;IACRC,QAAAA,EAAU,kBAAA;IACVC,WAAAA,EAAa,aAAA;IACbC,OAAAA,EAAS,SAAA;IACTC,QAAAA,EAAU;AACd;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarqueeInlineMarkdown.d.ts","sourceRoot":"","sources":["../../../Markdown/MarqueeInlineMarkdown.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAQtC,MAAM,WAAW,0BAA0B;IAEvC,MAAM,EAAE,MAAM,CAAC;CAClB;AAWD,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAAC,0BAA0B,CAW3E,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import ReactMarkdown from 'react-markdown';
|
|
3
|
+
import { MarqueeLink } from './MarqueeLink.js';
|
|
4
|
+
import { safeLinkOrEmpty } from './safeLink.js';
|
|
5
|
+
|
|
6
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
7
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
8
|
+
const inlineElements = [
|
|
9
|
+
'a',
|
|
10
|
+
'em',
|
|
11
|
+
'strong',
|
|
12
|
+
'code'
|
|
13
|
+
];
|
|
14
|
+
/**
|
|
15
|
+
* Renders the inline Markdown of an announcement title, `Maintenance tonight. [Read more here.](https://status.example.com)`,
|
|
16
|
+
* as React elements inside a `span`: links, emphasis and code only. Block elements, such as paragraphs, headings, lists
|
|
17
|
+
* and code blocks, are not rendered, and their text runs on in the line. It follows the same safety rules as
|
|
18
|
+
* {@link MarqueeMarkdown}: raw HTML is dropped, images are left out, a link opens in a new tab with `noopener noreferrer`,
|
|
19
|
+
* and only `https`, `mailto` and `tel` links are links at all.
|
|
20
|
+
*/ const MarqueeInlineMarkdown = ({ source })=>/*#__PURE__*/ jsx("span", {
|
|
21
|
+
className: "marquee-inline-markdown",
|
|
22
|
+
children: /*#__PURE__*/ jsx(ReactMarkdown, {
|
|
23
|
+
skipHtml: true,
|
|
24
|
+
allowedElements: inlineElements,
|
|
25
|
+
unwrapDisallowed: true,
|
|
26
|
+
urlTransform: safeLinkOrEmpty,
|
|
27
|
+
components: {
|
|
28
|
+
a: MarqueeLink
|
|
29
|
+
},
|
|
30
|
+
children: source
|
|
31
|
+
})
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
export { MarqueeInlineMarkdown };
|
|
35
|
+
//# sourceMappingURL=MarqueeInlineMarkdown.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarqueeInlineMarkdown.js","sources":["../../../Markdown/MarqueeInlineMarkdown.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ComponentType } from 'react';\nimport ReactMarkdown from 'react-markdown';\nimport { MarqueeLink } from './MarqueeLink.js';\nimport { safeLinkOrEmpty } from './safeLink.js';\n\n/**\n * Props for {@link MarqueeInlineMarkdown}.\n */\nexport interface MarqueeInlineMarkdownProps {\n /** The inline Markdown source, such as the title of an announcement. */\n source: string;\n}\n\nconst inlineElements = ['a', 'em', 'strong', 'code'];\n\n/**\n * Renders the inline Markdown of an announcement title, `Maintenance tonight. [Read more here.](https://status.example.com)`,\n * as React elements inside a `span`: links, emphasis and code only. Block elements, such as paragraphs, headings, lists\n * and code blocks, are not rendered, and their text runs on in the line. It follows the same safety rules as\n * {@link MarqueeMarkdown}: raw HTML is dropped, images are left out, a link opens in a new tab with `noopener noreferrer`,\n * and only `https`, `mailto` and `tel` links are links at all.\n */\nexport const MarqueeInlineMarkdown: ComponentType<MarqueeInlineMarkdownProps> = ({ source }: MarqueeInlineMarkdownProps) => (\n <span className='marquee-inline-markdown'>\n <ReactMarkdown\n skipHtml\n allowedElements={inlineElements}\n unwrapDisallowed\n urlTransform={safeLinkOrEmpty}\n components={{ a: MarqueeLink }}>\n {source}\n </ReactMarkdown>\n </span>\n);\n"],"names":["inlineElements","MarqueeInlineMarkdown","source","_jsx","span","className","ReactMarkdown","skipHtml","allowedElements","unwrapDisallowed","urlTransform","safeLinkOrEmpty","components","a","MarqueeLink"],"mappings":";;;;;AAAA;AACA;AAeA,MAAMA,cAAAA,GAAiB;AAAC,IAAA,GAAA;AAAK,IAAA,IAAA;AAAM,IAAA,QAAA;AAAU,IAAA;AAAO,CAAA;AAEpD;;;;;;UAOaC,qBAAAA,GAAmE,CAAC,EAAEC,MAAM,EAA8B,iBACnHC,GAAA,CAACC,MAAAA,EAAAA;QAAKC,SAAAA,EAAU,yBAAA;AACZ,QAAA,QAAA,gBAAAF,GAAA,CAACG,aAAAA,EAAAA;YACGC,QAAQ,EAAA,IAAA;YACRC,eAAAA,EAAiBR,cAAAA;YACjBS,gBAAgB,EAAA,IAAA;YAChBC,YAAAA,EAAcC,eAAAA;YACdC,UAAAA,EAAY;gBAAEC,CAAAA,EAAGC;AAAY,aAAA;AAC5BZ,YAAAA,QAAAA,EAAAA;;AAGX,KAAA;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarqueeLink.d.ts","sourceRoot":"","sources":["../../../Markdown/MarqueeLink.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvC,KAAK,SAAS,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC;AAMrC,eAAO,MAAM,WAAW,GAAI,2BAA2B,SAAS,gCAEnC,CAAC"}
|