@undrr/undrr-mangrove 2.0.0 → 2.1.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/README.md +9 -5
- package/components/BookCard.js +2 -2
- package/components/Breadcrumbs.js +2 -2
- package/components/Checkbox.js +2 -2
- package/components/Chips.js +2 -2
- package/components/CopyButton.js +2 -2
- package/components/CtaButton.js +2 -2
- package/components/Drawer.js +3 -3
- package/components/Drawer.js.LICENSE.txt +3 -1
- package/components/EmbedContainer.js +2 -2
- package/components/Footer.js +2 -2
- package/components/FormAction.js +2 -2
- package/components/FormErrorSummary.js +2 -2
- package/components/FormGroup.js +2 -2
- package/components/FullWidth.js +2 -2
- package/components/Gallery.js +3 -3
- package/components/Hero.js +3 -3
- package/components/HighlightBox.js +2 -2
- package/components/HorizontalBookCard.js +3 -3
- package/components/HorizontalBookCard.js.LICENSE.txt +3 -1
- package/components/HorizontalCard.js +3 -3
- package/components/HorizontalCard.js.LICENSE.txt +3 -1
- package/components/IconCard.js +3 -3
- package/components/IconCard.js.LICENSE.txt +3 -1
- package/components/Legend.js +2 -2
- package/components/Loader.js +3 -3
- package/components/MegaMenu.js +3 -3
- package/components/Notice.js +2 -2
- package/components/PageHeader.js +2 -2
- package/components/Pager.js +2 -2
- package/components/ProgressBar.js +9 -0
- package/components/ProgressBar.js.LICENSE.txt +9 -0
- package/components/QuoteHighlight.js +3 -3
- package/components/QuoteHighlight.js.LICENSE.txt +3 -1
- package/components/Radio.js +2 -2
- package/components/Range.js +2 -2
- package/components/ScrollContainer.js +2 -2
- package/components/SegmentedControl.js +2 -2
- package/components/Select.js +2 -2
- package/components/ServiceNotice.js +2 -2
- package/components/ShareButtons.js +3 -3
- package/components/ShowMore.js +3 -3
- package/components/SkipLink.js +2 -2
- package/components/StatsCard.js +3 -3
- package/components/StatsCard.js.LICENSE.txt +3 -1
- package/components/SyndicationSearchWidget.js +3 -3
- package/components/Tab.js +2 -2
- package/components/TextCta.js +3 -3
- package/components/TextCta.js.LICENSE.txt +3 -1
- package/components/TextInput.js +2 -2
- package/components/Textarea.js +2 -2
- package/components/Tree.js +2 -2
- package/components/UserFeedback.js +2 -2
- package/components/VerticalCard.js +3 -3
- package/components/VerticalCard.js.LICENSE.txt +3 -1
- package/components/hydrate.js +3 -3
- package/css/style-all.css +147 -128
- package/css/style-all.css.map +1 -1
- package/css/style-delta.css +147 -128
- package/css/style-delta.css.map +1 -1
- package/css/style-gutenberg.css +12 -12
- package/css/style-gutenberg.css.map +1 -1
- package/css/style-irp.css +147 -128
- package/css/style-irp.css.map +1 -1
- package/css/style-mcr.css +147 -128
- package/css/style-mcr.css.map +1 -1
- package/css/style-preventionweb.css +147 -128
- package/css/style-preventionweb.css.map +1 -1
- package/css/style.css +147 -128
- package/css/style.css.map +1 -1
- package/docs/EDITORIAL-MANUAL.md +193 -0
- package/docs/llms-editorial-manual.txt +200 -0
- package/docs/llms-motion.txt +125 -0
- package/docs/llms-page-building.txt +1140 -0
- package/docs/llms-search-widget.txt +765 -0
- package/error-pages/401.html +1 -1
- package/error-pages/403.html +1 -1
- package/error-pages/404.html +1 -1
- package/error-pages/429.html +1 -1
- package/error-pages/500.html +1 -1
- package/error-pages/502.html +1 -1
- package/error-pages/503.html +1 -1
- package/error-pages/504.html +1 -1
- package/error-pages/5xx.html +1 -1
- package/error-pages/challenge.html +1 -1
- package/error-pages/managed-challenge.html +1 -1
- package/js/cite-this.js +994 -0
- package/js/on-this-page-nav.js +80 -1
- package/js/show-more.js +149 -21
- package/package.json +6 -1
- package/scss/Atom/BaseTypography/Abbr/abbr.scss +1 -1
- package/scss/Atom/BaseTypography/Blockquote/blockquote.scss +1 -1
- package/scss/Atom/BaseTypography/Cite/cite.scss +1 -1
- package/scss/Atom/BaseTypography/Code/code.scss +1 -1
- package/scss/Atom/BaseTypography/Mark/mark.scss +1 -1
- package/scss/Atom/BaseTypography/Quotation/quotation.scss +1 -1
- package/scss/Atom/BaseTypography/Small/small.scss +1 -1
- package/scss/Atom/Colors/color.scss +1 -1
- package/scss/Atom/EmptyState/empty-state.scss +1 -1
- package/scss/Atom/Icons/_icon-definitions.scss +35 -3
- package/scss/Atom/Icons/icons.scss +1 -1
- package/scss/Atom/Images/AuthorImage/author-image.scss +10 -3
- package/scss/Atom/Images/Image/image.scss +1 -1
- package/scss/Atom/Images/ImageCaptionCredit/image-caption-credit.scss +7 -2
- package/scss/Atom/Images/ImageCredit/image-credit.scss +1 -1
- package/scss/Atom/Layout/Container/container.scss +1 -1
- package/scss/Atom/Layout/Grid/grid.scss +1 -1
- package/scss/Atom/Layout/Spacing/spacing.scss +1 -1
- package/scss/Atom/Logo/logo.scss +1 -1
- package/scss/Atom/Navigation/Breadcrumb/breadcrumb.scss +1 -1
- package/scss/Atom/Navigation/MenuItems/menu-items.scss +1 -1
- package/scss/Atom/ReachElement/Details/details.scss +5 -3
- package/scss/Atom/ReachElement/Figcaption/figcaption.scss +1 -1
- package/scss/Atom/StatusLabel/status-label.scss +1 -1
- package/scss/Atom/Table/table.scss +1 -1
- package/scss/Atom/Tag/tag.scss +1 -1
- package/scss/Atom/Video/video.scss +1 -1
- package/scss/Components/Boilerplate/boilerplate.scss +1 -1
- package/scss/Components/Breadcrumbs/breadcrumbs.scss +1 -1
- package/scss/Components/Buttons/Chips/chips.scss +1 -1
- package/scss/Components/Buttons/CopyButton/copy-button.scss +1 -1
- package/scss/Components/Buttons/CtaButton/buttons.scss +1 -1
- package/scss/Components/Buttons/CtaButton/cta-button.scss +1 -1
- package/scss/Components/Buttons/ShareButtons/share-buttons.scss +90 -1
- package/scss/Components/Cards/Card/card.scss +9 -3
- package/scss/Components/Cards/StatsCard/stats-card.scss +9 -2
- package/scss/Components/CiteThis/cite-this.scss +339 -0
- package/scss/Components/CookieConsentBanner/cookie-consent-banner.scss +1 -1
- package/scss/Components/DataViz/Legend/legend.scss +1 -1
- package/scss/Components/ErrorPages/error-pages.scss +1 -1
- package/scss/Components/Footer/footer.scss +1 -1
- package/scss/Components/Forms/Checkbox/checkbox.scss +1 -1
- package/scss/Components/Forms/FormAction/form-action.scss +1 -1
- package/scss/Components/Forms/FormGroup/form-group.scss +1 -1
- package/scss/Components/Forms/InputFields/input-fields.scss +1 -1
- package/scss/Components/Forms/Radio/radio.scss +1 -1
- package/scss/Components/Forms/Range/range.scss +1 -1
- package/scss/Components/Forms/SegmentedControl/segmented-control.scss +1 -1
- package/scss/Components/Forms/Select/select.scss +1 -1
- package/scss/Components/Forms/TextInput/text-input.scss +1 -1
- package/scss/Components/Forms/Textarea/textarea.scss +1 -1
- package/scss/Components/Forms/_form-base.scss +1 -1
- package/scss/Components/Gallery/gallery.scss +41 -16
- package/scss/Components/Hero/hero.scss +166 -1
- package/scss/Components/HighlightBox/highlight-box.scss +1 -1
- package/scss/Components/MegaMenu/mega-menu.scss +43 -122
- package/scss/Components/MegaMenu/megamenu.scss +1 -1
- package/scss/Components/Navigation/Drawer/drawer.scss +11 -1
- package/scss/Components/Navigation/Tree/tree.scss +1 -1
- package/scss/Components/Notice/notice.scss +1 -1
- package/scss/Components/OnThisPageNav/on-this-page-nav.scss +109 -4
- package/scss/Components/PageHeader/page-header.scss +1 -1
- package/scss/Components/Pager/pager.scss +1 -1
- package/scss/Components/PreviewAccess/preview-access.scss +1 -1
- package/scss/Components/ProgressBar/progress-bar.scss +215 -0
- package/scss/Components/QuoteHighlight/quote-highlight.scss +1 -1
- package/scss/Components/ScrollContainer/scroll-container.scss +1 -1
- package/scss/Components/Snackbar/snackbar.scss +1 -1
- package/scss/Components/SyndicationSearchWidget/_deprecated-teaser-hide.scss +1 -1
- package/scss/Components/SyndicationSearchWidget/syndication-search-widget.scss +253 -128
- package/scss/Components/Tab/tab.scss +3 -2
- package/scss/Components/TableOfContents/table-of-contents.scss +1 -1
- package/scss/Components/TextCta/text-cta.scss +1 -1
- package/scss/Components/TextCta/textcta.scss +1 -1
- package/scss/Components/UserFeedback/user-feedback.scss +1 -1
- package/scss/Molecules/ImageCaption/image-caption.scss +17 -3
- package/scss/Molecules/SectionHeader/section-header.scss +1 -1
- package/scss/Molecules/SectionHeader/sectionheader.scss +1 -1
- package/scss/Patterns/HubHeader/hub-header.scss +1 -1
- package/scss/Patterns/RichContent/rich-content.scss +177 -0
- package/scss/Patterns/_shared/pattern-demo.scss +6 -1
- package/scss/Utilities/EmbedContainer/embed-container.scss +1 -1
- package/scss/Utilities/FullWidth/full-width.scss +1 -1
- package/scss/Utilities/Loader/loader.scss +133 -12
- package/scss/Utilities/Normalize/normalize.scss +1 -1
- package/scss/Utilities/PagePatterns/page-patterns.scss +1 -1
- package/scss/Utilities/ShowMore/show-more.scss +7 -1
- package/scss/Utilities/SkipLink/skip-link.scss +1 -1
- package/scss/assets/scss/_components.scss +5 -0
- package/scss/assets/scss/_foundational.scss +23 -8
- package/scss/assets/scss/_mixins.scss +5 -0
- package/scss/assets/scss/_variables.scss +2 -2
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Progress bar
|
|
3
|
+
*
|
|
4
|
+
* Determinate and indeterminate progress bar built on the native progress
|
|
5
|
+
* element, with an optional visible label, value and help text, and a thin
|
|
6
|
+
* flush variant for the top edge of a region or the viewport.
|
|
7
|
+
*
|
|
8
|
+
* Full documentation:
|
|
9
|
+
* https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Components/ProgressBar/ProgressBar.mdx
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
// The scanner is 30% of the track, and translateX percentages are of the
|
|
13
|
+
// scanner itself, so -100% starts it just before the inline-start edge and
|
|
14
|
+
// 340% ends it just past the inline-end edge (100 / 30 = 333%).
|
|
15
|
+
@keyframes mg-progress-bar-scan {
|
|
16
|
+
from {
|
|
17
|
+
transform: translateX(-100%);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
to {
|
|
21
|
+
transform: translateX(340%);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// translateX is physical, so right-to-left text sweeps the other way. The
|
|
26
|
+
// scanner is anchored with inset-inline-start, which is already the right
|
|
27
|
+
// edge there.
|
|
28
|
+
@keyframes mg-progress-bar-scan-rtl {
|
|
29
|
+
from {
|
|
30
|
+
transform: translateX(100%);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
to {
|
|
34
|
+
transform: translateX(-340%);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// The element order mirrors Drupal core's progress-bar.html.twig (label,
|
|
39
|
+
// track, percentage, description), so the template can be overridden one to
|
|
40
|
+
// one. The grid puts the value beside the label.
|
|
41
|
+
.mg-progress-bar {
|
|
42
|
+
// The indicator is the interactive colour, which every theme keeps at 4.5:1
|
|
43
|
+
// or more against white, so the filled part reaches 3:1 against the page
|
|
44
|
+
// and against this light track. The track itself cannot reach 3:1 against
|
|
45
|
+
// white without moving towards the indicator, so its extent is marked by a
|
|
46
|
+
// 1px edge in neutral-500 instead.
|
|
47
|
+
--mg-progress-bar-block-size: 0.5rem;
|
|
48
|
+
--mg-progress-bar-indicator: rgb(var(--mg-color-interactive));
|
|
49
|
+
--mg-progress-bar-track: rgb(var(--mg-color-neutral-50));
|
|
50
|
+
|
|
51
|
+
align-items: baseline;
|
|
52
|
+
column-gap: var(--mg-spacing-100);
|
|
53
|
+
display: grid;
|
|
54
|
+
grid-template-areas:
|
|
55
|
+
"label value"
|
|
56
|
+
"track track"
|
|
57
|
+
"help help";
|
|
58
|
+
grid-template-columns: 1fr auto;
|
|
59
|
+
row-gap: var(--mg-spacing-50);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.mg-progress-bar__label {
|
|
63
|
+
color: rgb(var(--mg-color-text));
|
|
64
|
+
font-family: var(--mg-font-family-ui);
|
|
65
|
+
font-size: var(--mg-font-size-300);
|
|
66
|
+
font-weight: 600;
|
|
67
|
+
grid-area: label;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.mg-progress-bar__value {
|
|
71
|
+
color: rgb(var(--mg-color-text));
|
|
72
|
+
font-family: var(--mg-font-family-ui);
|
|
73
|
+
font-size: var(--mg-font-size-300);
|
|
74
|
+
font-variant-numeric: tabular-nums;
|
|
75
|
+
grid-area: value;
|
|
76
|
+
text-align: end;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.mg-progress-bar__help {
|
|
80
|
+
color: rgb(var(--mg-color-neutral-500));
|
|
81
|
+
font-size: var(--mg-font-size-200);
|
|
82
|
+
grid-area: help;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.mg-progress-bar__track {
|
|
86
|
+
background-color: var(--mg-progress-bar-track);
|
|
87
|
+
block-size: var(--mg-progress-bar-block-size);
|
|
88
|
+
border-radius: 999px;
|
|
89
|
+
|
|
90
|
+
// An inset shadow paints under the native fill, so the edge shows only on
|
|
91
|
+
// the part of the track that is still empty.
|
|
92
|
+
box-shadow: inset 0 0 0 1px rgb(var(--mg-color-neutral-500));
|
|
93
|
+
grid-area: track;
|
|
94
|
+
overflow: hidden;
|
|
95
|
+
position: relative;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// The native element draws only the determinate fill; the track is drawn by
|
|
99
|
+
// the wrapper and the indeterminate scanner by the wrapper's ::after, which
|
|
100
|
+
// behave the same in every engine.
|
|
101
|
+
.mg-progress-bar__native {
|
|
102
|
+
appearance: none;
|
|
103
|
+
background: transparent;
|
|
104
|
+
block-size: 100%;
|
|
105
|
+
border: 0;
|
|
106
|
+
border-radius: inherit;
|
|
107
|
+
color: var(--mg-progress-bar-indicator);
|
|
108
|
+
display: block;
|
|
109
|
+
inline-size: 100%;
|
|
110
|
+
|
|
111
|
+
// Vendor pseudo-elements stay in separate rules: a browser drops a whole
|
|
112
|
+
// selector list that contains a pseudo-element it does not recognise.
|
|
113
|
+
&::-webkit-progress-bar {
|
|
114
|
+
background: transparent;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
&::-webkit-progress-value {
|
|
118
|
+
background-color: var(--mg-progress-bar-indicator);
|
|
119
|
+
border-radius: inherit;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&::-moz-progress-bar {
|
|
123
|
+
background-color: var(--mg-progress-bar-indicator);
|
|
124
|
+
border-radius: inherit;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// Firefox draws the indeterminate fill at full width; hide it everywhere.
|
|
128
|
+
&:indeterminate::-webkit-progress-value {
|
|
129
|
+
background: transparent;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
&:indeterminate::-moz-progress-bar {
|
|
133
|
+
background: transparent;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
137
|
+
&::-webkit-progress-value {
|
|
138
|
+
transition: width var(--mg-motion-duration-fast)
|
|
139
|
+
var(--mg-motion-easing-standard);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.mg-progress-bar__track::after {
|
|
145
|
+
background-color: var(--mg-progress-bar-indicator);
|
|
146
|
+
border-radius: inherit;
|
|
147
|
+
content: "";
|
|
148
|
+
display: none;
|
|
149
|
+
inline-size: 30%;
|
|
150
|
+
inset-block: 0;
|
|
151
|
+
inset-inline-start: 0;
|
|
152
|
+
position: absolute;
|
|
153
|
+
transform: translateX(-100%);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.mg-progress-bar__track:has(.mg-progress-bar__native:indeterminate)::after {
|
|
157
|
+
display: block;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// The sweep is only declared when motion is welcome. The site-wide reduced
|
|
161
|
+
// motion reset would otherwise run it once in 0.01ms and leave the segment
|
|
162
|
+
// where it stopped, which reads as a bar that is partly done.
|
|
163
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
164
|
+
.mg-progress-bar__track::after {
|
|
165
|
+
animation: mg-progress-bar-scan 1.5s ease-in-out infinite;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.mg-progress-bar__track:dir(rtl)::after {
|
|
169
|
+
animation-name: mg-progress-bar-scan-rtl;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// Reduced motion: a still, dashed bar across the whole track. It shows that
|
|
174
|
+
// work is going on without moving, and the gaps keep it from reading as a
|
|
175
|
+
// finished bar or as a partial value.
|
|
176
|
+
@media (prefers-reduced-motion: reduce) {
|
|
177
|
+
.mg-progress-bar__track::after {
|
|
178
|
+
animation: none;
|
|
179
|
+
background: repeating-linear-gradient(
|
|
180
|
+
to right,
|
|
181
|
+
var(--mg-progress-bar-indicator) 0 0.75rem,
|
|
182
|
+
transparent 0.75rem 1.25rem
|
|
183
|
+
);
|
|
184
|
+
border-radius: 0;
|
|
185
|
+
inline-size: 100%;
|
|
186
|
+
transform: none;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// A thin bar with no visible text, for the top edge of a region or the
|
|
191
|
+
// viewport. Positioning is left to the page; see the documentation.
|
|
192
|
+
.mg-progress-bar--flush {
|
|
193
|
+
--mg-progress-bar-block-size: 0.25rem;
|
|
194
|
+
|
|
195
|
+
display: block;
|
|
196
|
+
|
|
197
|
+
.mg-progress-bar__track {
|
|
198
|
+
border-radius: 0;
|
|
199
|
+
box-shadow: none;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// Forced colours replaces author backgrounds, which would hide the fill and
|
|
204
|
+
// the scanner. Opt out (the property is inherited, so this covers the native
|
|
205
|
+
// element and its pseudo-elements) and draw the bar in system colours.
|
|
206
|
+
@media (forced-colors: active) {
|
|
207
|
+
.mg-progress-bar__track {
|
|
208
|
+
--mg-progress-bar-indicator: CanvasText;
|
|
209
|
+
--mg-progress-bar-track: Canvas;
|
|
210
|
+
|
|
211
|
+
border: 1px solid CanvasText;
|
|
212
|
+
box-shadow: none;
|
|
213
|
+
forced-color-adjust: none;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Editorial pull quote banner with prominent quotation marks, author attribution, and source citation.
|
|
5
5
|
*
|
|
6
6
|
* Full documentation:
|
|
7
|
-
* https://github.com/
|
|
7
|
+
* https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Components/QuoteHighlight/QuoteHighlight.mdx
|
|
8
8
|
*/
|
|
9
9
|
.mg-quote-highlight {
|
|
10
10
|
display: flex;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Horizontal scroll wrapper with left/right scroll navigation buttons and themed scrollbars.
|
|
5
5
|
*
|
|
6
6
|
* Full documentation:
|
|
7
|
-
* https://github.com/
|
|
7
|
+
* https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Components/ScrollContainer/ScrollContainer.mdx
|
|
8
8
|
*/
|
|
9
9
|
.mg-scroll {
|
|
10
10
|
position: relative;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* The toast body is a Notice (.mg-notice); this file only positions and animates it.
|
|
6
6
|
*
|
|
7
7
|
* Full documentation:
|
|
8
|
-
* https://github.com/
|
|
8
|
+
* https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Components/Snackbar/Snackbar.mdx
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
.mg-snackbar-wrapper {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Legacy helper styles for hiding syndicated search teaser content.
|
|
5
5
|
*
|
|
6
6
|
* Full documentation:
|
|
7
|
-
* https://github.com/
|
|
7
|
+
* https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Components/SyndicationSearchWidget/SyndicationSearchWidget.mdx
|
|
8
8
|
*/
|
|
9
9
|
// ========================================
|
|
10
10
|
// DEPRECATED: Teaser Field Hiding Modifier Classes
|