@undrr/undrr-mangrove 2.0.0-beta.1 → 2.0.0-rc.1
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 +5 -5
- package/components/BookCard.js +5 -2
- package/components/Breadcrumbs.js +5 -2
- package/components/Checkbox.js +5 -2
- package/components/Chips.js +5 -2
- package/components/CopyButton.js +9 -0
- package/components/CopyButton.js.LICENSE.txt +15 -0
- package/components/CtaButton.js +5 -2
- package/components/Drawer.js +9 -0
- package/components/Drawer.js.LICENSE.txt +17 -0
- package/components/EmbedContainer.js +5 -2
- package/components/Footer.js +5 -2
- package/components/FormAction.js +5 -2
- package/components/FormErrorSummary.js +5 -2
- package/components/FormGroup.js +5 -2
- package/components/FullWidth.js +5 -2
- package/components/Gallery.js +5 -2
- package/components/Hero.js +5 -2
- package/components/HighlightBox.js +5 -2
- package/components/HorizontalBookCard.js +5 -2
- package/components/HorizontalCard.js +5 -2
- package/components/IconCard.js +5 -2
- package/components/Legend.js +9 -0
- package/components/Legend.js.LICENSE.txt +9 -0
- package/components/Loader.js +5 -2
- package/components/MegaMenu.js +5 -2
- package/components/Notice.js +9 -0
- package/components/Notice.js.LICENSE.txt +15 -0
- package/components/PageHeader.js +6 -3
- package/components/Pager.js +5 -2
- package/components/QuoteHighlight.js +5 -2
- package/components/Radio.js +5 -2
- package/components/Range.js +9 -0
- package/components/Range.js.LICENSE.txt +15 -0
- package/components/ScrollContainer.js +5 -2
- package/components/Select.js +5 -2
- package/components/ServiceNotice.js +9 -0
- package/components/ServiceNotice.js.LICENSE.txt +15 -0
- package/components/ShareButtons.js +5 -2
- package/components/ShowMore.js +5 -2
- package/components/SkipLink.js +5 -2
- package/components/StatsCard.js +5 -2
- package/components/SyndicationSearchWidget.js +5 -2
- package/components/Tab.js +5 -2
- package/components/TextCta.js +5 -2
- package/components/TextInput.js +5 -2
- package/components/Textarea.js +5 -2
- package/components/Tree.js +9 -0
- package/components/Tree.js.LICENSE.txt +15 -0
- package/components/UserFeedback.js +5 -2
- package/components/VerticalCard.js +5 -2
- package/components/assets/a4133008bd4d2c4a42e5ca0c6db8fe9b.svg +22 -0
- package/components/assets/f1605b17c97ebdc56cfaa75033e7283d.svg +21 -0
- package/components/hydrate.js +5 -2
- package/css/style-all.css +716 -69
- package/css/style-all.css.map +1 -1
- package/css/style-delta.css +715 -68
- package/css/style-delta.css.map +1 -1
- package/css/style-gutenberg.css +77 -17
- package/css/style-gutenberg.css.map +1 -1
- package/css/style-irp.css +716 -69
- package/css/style-irp.css.map +1 -1
- package/css/style-mcr.css +716 -69
- package/css/style-mcr.css.map +1 -1
- package/css/style-preventionweb.css +716 -69
- package/css/style-preventionweb.css.map +1 -1
- package/css/style.css +715 -68
- package/css/style.css.map +1 -1
- 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/README.md +7 -6
- package/js/__tests__/copy-button.test.js +112 -0
- package/js/copy-button.js +136 -0
- package/package.json +1 -1
- package/scss/Atom/BaseTypography/Abbr/abbr.scss +8 -0
- package/scss/Atom/BaseTypography/Blockquote/blockquote.scss +10 -2
- package/scss/Atom/BaseTypography/Cite/cite.scss +8 -0
- package/scss/Atom/BaseTypography/Code/code.scss +10 -2
- package/scss/Atom/BaseTypography/Mark/mark.scss +10 -2
- package/scss/Atom/BaseTypography/Quotation/quotation.scss +8 -0
- package/scss/Atom/BaseTypography/Small/small.scss +8 -0
- package/scss/Atom/Colors/color.scss +8 -0
- package/scss/Atom/EmptyState/empty-state.scss +8 -0
- package/scss/Atom/Icons/_icon-definitions.scss +82 -2
- package/scss/Atom/Icons/icons.scss +8 -0
- package/scss/Atom/Images/AuthorImage/author-image.scss +205 -55
- package/scss/Atom/Images/Image/image.scss +8 -0
- package/scss/Atom/Images/ImageCaptionCredit/image-caption-credit.scss +10 -2
- package/scss/Atom/Images/ImageCredit/image-credit.scss +10 -2
- package/scss/Atom/Layout/Container/container.scss +8 -0
- package/scss/Atom/Layout/Grid/grid.scss +8 -0
- package/scss/Atom/Layout/Spacing/spacing.scss +8 -0
- package/scss/Atom/Logo/logo.scss +45 -0
- package/scss/Atom/Navigation/Breadcrumb/breadcrumb.scss +8 -0
- package/scss/Atom/Navigation/MenuItems/menu-items.scss +8 -0
- package/scss/Atom/ReachElement/Details/details.scss +132 -1
- package/scss/Atom/ReachElement/Figcaption/figcaption.scss +8 -0
- package/scss/Atom/StatusLabel/status-label.scss +17 -0
- package/scss/Atom/Table/table.scss +112 -2
- package/scss/Atom/Tag/tag.scss +33 -1
- package/scss/Atom/Video/video.scss +8 -0
- package/scss/Components/Boilerplate/boilerplate.scss +8 -0
- package/scss/Components/Breadcrumbs/breadcrumbs.scss +9 -1
- package/scss/Components/Buttons/Chips/chips.scss +9 -1
- package/scss/Components/Buttons/CopyButton/copy-button.scss +81 -0
- package/scss/Components/Buttons/CtaButton/buttons.scss +8 -0
- package/scss/Components/Buttons/CtaButton/cta-button.scss +89 -0
- package/scss/Components/Buttons/ShareButtons/share-buttons.scss +11 -3
- package/scss/Components/Cards/Card/card.scss +25 -7
- package/scss/Components/Cards/StatsCard/stats-card.scss +22 -14
- package/scss/Components/CookieConsentBanner/cookie-consent-banner.scss +8 -0
- package/scss/Components/DataViz/Legend/legend.scss +203 -0
- package/scss/Components/ErrorPages/error-pages.scss +8 -0
- package/scss/Components/Footer/footer.scss +11 -3
- package/scss/Components/Forms/Checkbox/checkbox.scss +8 -0
- package/scss/Components/Forms/FormAction/form-action.scss +8 -0
- package/scss/Components/Forms/FormGroup/form-group.scss +8 -0
- package/scss/Components/Forms/InputFields/input-fields.scss +8 -0
- package/scss/Components/Forms/Radio/radio.scss +8 -0
- package/scss/Components/Forms/Range/range.scss +142 -0
- package/scss/Components/Forms/Select/select.scss +8 -0
- package/scss/Components/Forms/TextInput/text-input.scss +8 -0
- package/scss/Components/Forms/Textarea/textarea.scss +8 -0
- package/scss/Components/Forms/_form-base.scss +103 -5
- package/scss/Components/Gallery/gallery.scss +15 -7
- package/scss/Components/Hero/hero.scss +11 -4
- package/scss/Components/HighlightBox/highlight-box.scss +8 -0
- package/scss/Components/MegaMenu/mega-menu.scss +44 -7
- package/scss/Components/MegaMenu/megamenu.scss +8 -0
- package/scss/Components/Navigation/Drawer/drawer.scss +151 -0
- package/scss/Components/Navigation/Tree/tree.scss +95 -0
- package/scss/Components/Notice/notice.scss +181 -0
- package/scss/Components/OnThisPageNav/on-this-page-nav.scss +10 -2
- package/scss/Components/PageHeader/page-header.scss +14 -32
- package/scss/Components/Pager/pager.scss +15 -7
- package/scss/Components/PreviewAccess/preview-access.scss +16 -8
- package/scss/Components/QuoteHighlight/quote-highlight.scss +12 -4
- package/scss/Components/ScrollContainer/scroll-container.scss +42 -6
- package/scss/Components/Snackbar/snackbar.scss +27 -112
- package/scss/Components/SyndicationSearchWidget/SyndicationSearchWidget.scss +8 -0
- package/scss/Components/SyndicationSearchWidget/_deprecated-teaser-hide.scss +8 -0
- package/scss/Components/SyndicationSearchWidget/syndication-search-widget.scss +32 -33
- package/scss/Components/Tab/tab.scss +8 -0
- package/scss/Components/TableOfContents/TableOfContents.scss +8 -0
- package/scss/Components/TableOfContents/table-of-contents.scss +9 -1
- package/scss/Components/TextCta/text-cta.scss +36 -8
- package/scss/Components/TextCta/textcta.scss +8 -0
- package/scss/Components/UserFeedback/user-feedback.scss +9 -1
- package/scss/Molecules/ImageCaption/image-caption.scss +10 -2
- package/scss/Molecules/SectionHeader/section-header.scss +8 -0
- package/scss/Molecules/SectionHeader/sectionheader.scss +8 -0
- package/scss/Patterns/HubHeader/hub-header.scss +8 -1
- package/scss/Patterns/_shared/pattern-demo.scss +9 -1
- package/scss/Utilities/EmbedContainer/embed-container.scss +8 -0
- package/scss/Utilities/FullWidth/FullWidth.scss +8 -0
- package/scss/Utilities/FullWidth/full-width.scss +8 -0
- package/scss/Utilities/Loader/loader.scss +8 -0
- package/scss/Utilities/Normalize/normalize.scss +8 -0
- package/scss/Utilities/PagePatterns/page-patterns.scss +8 -0
- package/scss/Utilities/ShowMore/ShowMore.scss +8 -0
- package/scss/Utilities/ShowMore/show-more.scss +8 -0
- package/scss/Utilities/SkipLink/skip-link.scss +8 -0
- package/scss/assets/scss/_components.scss +7 -0
- package/scss/assets/scss/_foundational.scss +6 -6
- package/scss/assets/scss/_mixins.scss +6 -6
- package/scss/assets/scss/_utility.scss +14 -14
- package/scss/assets/scss/_variables.scss +21 -14
- package/scss/assets/scss/generated/_tokens-irp.scss +9 -0
- package/scss/assets/scss/generated/_tokens-mangrove.scss +38 -0
- package/scss/assets/scss/generated/_tokens-mcr.scss +8 -0
- package/scss/assets/scss/generated/_tokens-preventionweb.scss +9 -0
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
[](https://www.npmjs.com/package/@undrr/undrr-mangrove)
|
|
2
|
-
[](https://
|
|
2
|
+
[](https://preventionweb.github.io/undrr-mangrove/)
|
|
3
3
|
[](https://github.com/unisdr/undrr-mangrove/actions)
|
|
4
4
|
[](https://github.com/unisdr/undrr-mangrove/blob/main/LICENSE)
|
|
5
5
|
<!-- React Doctor score is a periodic snapshot, not live. Refresh after audit sweeps by re-running `npx -y react-doctor@latest .` and updating the s/e/w/f params below. See docs/AI-CODING-AGENTS.md#component-quality-checks-with-react-doctor. -->
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
Mangrove is UNDRR's component library for accessible, reusable UI across React and server-rendered sites.
|
|
12
12
|
|
|
13
|
-
- Storybook docs and live examples: <https://
|
|
13
|
+
- Storybook docs and live examples: <https://preventionweb.github.io/undrr-mangrove/>
|
|
14
14
|
- npm package: <https://www.npmjs.com/package/@undrr/undrr-mangrove>
|
|
15
15
|
- Issue tracker: <https://github.com/unisdr/undrr-mangrove/issues>
|
|
16
16
|
|
|
@@ -21,7 +21,7 @@ Mangrove is UNDRR's component library for accessible, reusable UI across React a
|
|
|
21
21
|
```html
|
|
22
22
|
<link
|
|
23
23
|
rel="stylesheet"
|
|
24
|
-
href="https://assets.undrr.org/mangrove/2.0.0-
|
|
24
|
+
href="https://assets.undrr.org/mangrove/2.0.0-rc.1/css/style.css"
|
|
25
25
|
/>
|
|
26
26
|
```
|
|
27
27
|
|
|
@@ -71,8 +71,8 @@ yarn build
|
|
|
71
71
|
|
|
72
72
|
Mangrove publishes static metadata for coding agents after Storybook deploy:
|
|
73
73
|
|
|
74
|
-
- `llms.txt`: <https://
|
|
75
|
-
- component index: <https://
|
|
74
|
+
- `llms.txt`: <https://preventionweb.github.io/undrr-mangrove/llms.txt>
|
|
75
|
+
- component index: <https://preventionweb.github.io/undrr-mangrove/ai-components/index.json>
|
|
76
76
|
- per-component details: `ai-components/{id}.json`
|
|
77
77
|
|
|
78
78
|
Guide: [`docs/AI-MCP-INTEGRATION.md`](docs/AI-MCP-INTEGRATION.md)
|
package/components/BookCard.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* UNDRR Mangrove component library
|
|
3
|
+
* Storybook: https://preventionweb.github.io/undrr-mangrove/
|
|
4
|
+
* LLMs context: https://preventionweb.github.io/undrr-mangrove/llms.txt
|
|
5
|
+
* Repository: https://github.com/unisdr/undrr-mangrove
|
|
6
|
+
* Compiled on: 2026-09-16T20:25:59.498Z
|
|
4
7
|
*/
|
|
5
8
|
/*! For license information please see BookCard.js.LICENSE.txt */
|
|
6
9
|
import"react";var r={2694(r,e,t){var n=t(6925);function a(){}function o(){}o.resetWarningCache=a,r.exports=function(){function r(r,e,t,a,o,i){if(i!==n){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function e(){return r}r.isRequired=r;var t={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:e,element:r,elementType:r,instanceOf:e,node:r,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:o,resetWarningCache:a};return t.PropTypes=t,t}},5556(r,e,t){r.exports=t(2694)()},6925(r){r.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}};const e={};function t(n){const a=e[n];if(void 0!==a)return a.exports;const o=e[n]={exports:{}};return r[n](o,o.exports,t),o.exports}t.n=r=>{const e=r&&r.__esModule?()=>r.default:()=>r;return t.d(e,{a:e}),e},t.cw=r=>{var e;return()=>{if(r){var t=r;r=0,e={exports:{}},t.call(e.exports,e,e.exports)}return e.exports}},t.d=(r,e)=>{for(var n in e)t.o(e,n)&&!t.o(r,n)&&Object.defineProperty(r,n,{enumerable:!0,get:e[n]})},t.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e);var n=t.cw(function(r,e){var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function a(r,e,n){var a=null;if(void 0!==n&&(a=""+n),void 0!==e.key&&(a=""+e.key),"key"in e)for(var o in n={},e)"key"!==o&&(n[o]=e[o]);else n=e;return e=n.ref,{$$typeof:t,type:r,key:a,ref:void 0!==e?e:null,props:n}}e.Fragment=n,e.jsx=a,e.jsxs=a}),a=t.cw(function(r,e){r.exports=n()}),o=t(5556),i=t.n(o);function s({title:r,link:e=null,target:t,rel:a}){const o=r?.trim();return(0,n().jsx)("header",{className:"mg-card__title",children:e?(0,n().jsx)("a",{href:e,target:t,rel:a,children:o}):o})}a(),s.propTypes={title:i().string,link:i().string,target:i().string,rel:i().string},i().string,i().string;const c=(...r)=>r.filter(Boolean).length>0?r.filter(Boolean).join(" "):null;function l({data:r,variant:e="primary",className:t}){const a=e&&"primary"!==e?`mg-card--${e}`:null;return(0,n().jsx)(n().Fragment,{children:r.map((r,e)=>{const o="string"==typeof(i=r.link)&&""!==i.trim()?i:null;var i;return(0,n().jsxs)("article",{className:c("mg-card","mg-card__vc","mg-card__book",a,!o&&"mg-card--no-link",t),children:[r.imgback&&(0,n().jsx)("div",{className:"mg-card__visual",children:(0,n().jsx)("img",{src:r.imgback,alt:r.imgalt,className:"mg-card__image"})}),(0,n().jsx)("div",{className:"mg-card__content",children:(0,n().jsx)(s,{title:r.title,link:o,target:r.target,rel:r.rel})})]},e)})})}l.propTypes={data:i().array.isRequired,variant:i().oneOf(["primary","secondary","tertiary","quaternary"]),className:i().string};export{l as BookCard};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* UNDRR Mangrove component library
|
|
3
|
+
* Storybook: https://preventionweb.github.io/undrr-mangrove/
|
|
4
|
+
* LLMs context: https://preventionweb.github.io/undrr-mangrove/llms.txt
|
|
5
|
+
* Repository: https://github.com/unisdr/undrr-mangrove
|
|
6
|
+
* Compiled on: 2026-09-16T20:25:59.498Z
|
|
4
7
|
*/
|
|
5
8
|
/*! For license information please see Breadcrumbs.js.LICENSE.txt */
|
|
6
9
|
import"react";var e={2694(e,r,t){var n=t(6925);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,r,t,o,a,i){if(i!==n){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function r(){return e}e.isRequired=e;var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:a,resetWarningCache:o};return t.PropTypes=t,t}},5556(e,r,t){e.exports=t(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}};const r={};function t(n){const o=r[n];if(void 0!==o)return o.exports;const a=r[n]={exports:{}};return e[n](a,a.exports,t),a.exports}t.n=e=>{const r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},t.cw=e=>{var r;return()=>{if(e){var t=e;e=0,r={exports:{}},t.call(r.exports,r,r.exports)}return r.exports}},t.d=(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var n=t.cw(function(e,r){var t=Symbol.for("react.transitional.element");Symbol.for("react.fragment"),r.jsx=function(e,r,n){var o=null;if(void 0!==n&&(o=""+n),void 0!==r.key&&(o=""+r.key),"key"in r)for(var a in n={},r)"key"!==a&&(n[a]=r[a]);else n=r;return r=n.ref,{$$typeof:t,type:e,key:o,ref:void 0!==r?r:null,props:n}}}),o=t.cw(function(e,r){e.exports=n()}),a=t(5556),i=t.n(a);function s({data:e,Color:r,navLabel:t="breadcrumbs",...o}){const a=e.length-1;let i="";return"White"==r&&(i="mg-breadcrumb--white"),(0,n().jsx)("nav",{"aria-label":t,className:["mg-breadcrumb",`${i}`].join(" ").trim(),children:(0,n().jsx)("ul",{children:e.map((e,r)=>r===a?(0,n().jsx)("li",{"aria-current":"page",children:e.text},r):(0,n().jsx)("li",{children:(0,n().jsx)("a",{href:"#",children:e.text})},r))})})}o(),s.propTypes={data:i().arrayOf(i().shape({text:i().string.isRequired})).isRequired,Color:i().string,navLabel:i().string};export{s as Breadcrumbcomponent};
|
package/components/Checkbox.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* UNDRR Mangrove component library
|
|
3
|
+
* Storybook: https://preventionweb.github.io/undrr-mangrove/
|
|
4
|
+
* LLMs context: https://preventionweb.github.io/undrr-mangrove/llms.txt
|
|
5
|
+
* Repository: https://github.com/unisdr/undrr-mangrove
|
|
6
|
+
* Compiled on: 2026-09-16T20:25:59.498Z
|
|
4
7
|
*/
|
|
5
8
|
/*! For license information please see Checkbox.js.LICENSE.txt */
|
|
6
9
|
import{useId as e}from"react";var r={2694(e,r,o){var t=o(6925);function n(){}function a(){}a.resetWarningCache=n,e.exports=function(){function e(e,r,o,n,a,i){if(i!==t){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function r(){return e}e.isRequired=e;var o={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:a,resetWarningCache:n};return o.PropTypes=o,o}},5556(e,r,o){e.exports=o(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}};const o={};function t(e){const n=o[e];if(void 0!==n)return n.exports;const a=o[e]={exports:{}};return r[e](a,a.exports,t),a.exports}t.n=e=>{const r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},t.cw=e=>{var r;return()=>{if(e){var o=e;e=0,r={exports:{}},o.call(r.exports,r,r.exports)}return r.exports}},t.d=(e,r)=>{for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var n=t.cw(function(e,r){var o=Symbol.for("react.transitional.element");function t(e,r,t){var n=null;if(void 0!==t&&(n=""+t),void 0!==r.key&&(n=""+r.key),"key"in r)for(var a in t={},r)"key"!==a&&(t[a]=r[a]);else t=r;return r=t.ref,{$$typeof:o,type:e,key:n,ref:void 0!==r?r:null,props:t}}Symbol.for("react.fragment"),r.jsx=t,r.jsxs=t}),a=t.cw(function(e,r){e.exports=n()}),i=t(5556),s=t.n(i);function c({id:r,name:o,label:t,value:a,checked:i,defaultChecked:s,onChange:c,disabled:l=!1,error:p=!1,errorText:f,labelPosition:d="after",className:u,...m}){const b=e(),h=r||b,y=p&&f?`${h}-error`:void 0,g=["mg-form-check__input","mg-form-check__input--checkbox",l&&"mg-form-check__input--disabled",p&&"mg-form-check__input--error"].filter(Boolean).join(" "),v=t&&(0,n().jsx)("label",{className:"mg-form-check__label",htmlFor:h,children:t});return(0,n().jsxs)("div",{className:["mg-form-check",u].filter(Boolean).join(" "),children:["before"===d&&v,(0,n().jsx)("input",{className:g,type:"checkbox",id:h,name:o,value:a,checked:i,defaultChecked:s,onChange:c,disabled:l,"aria-invalid":p||void 0,"aria-describedby":y,...t?{}:{"aria-label":a},...m}),"after"===d&&v,p&&f&&(0,n().jsx)("p",{className:"mg-form-error",id:y,role:"alert",children:f})]})}a(),c.propTypes={id:s().string,name:s().string,label:s().string,value:s().string,checked:s().bool,defaultChecked:s().bool,onChange:s().func,disabled:s().bool,error:s().bool,errorText:s().string,labelPosition:s().oneOf(["before","after"]),className:s().string};const l=c;export{c as Checkbox,l as default};
|
package/components/Chips.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* UNDRR Mangrove component library
|
|
3
|
+
* Storybook: https://preventionweb.github.io/undrr-mangrove/
|
|
4
|
+
* LLMs context: https://preventionweb.github.io/undrr-mangrove/llms.txt
|
|
5
|
+
* Repository: https://github.com/unisdr/undrr-mangrove
|
|
6
|
+
* Compiled on: 2026-09-16T20:25:59.498Z
|
|
4
7
|
*/
|
|
5
8
|
/*! For license information please see Chips.js.LICENSE.txt */
|
|
6
9
|
import"react";var e={2694(e,r,t){var o=t(6925);function n(){}function a(){}a.resetWarningCache=n,e.exports=function(){function e(e,r,t,n,a,s){if(s!==o){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function r(){return e}e.isRequired=e;var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:a,resetWarningCache:n};return t.PropTypes=t,t}},5556(e,r,t){e.exports=t(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}};const r={};function t(o){const n=r[o];if(void 0!==n)return n.exports;const a=r[o]={exports:{}};return e[o](a,a.exports,t),a.exports}t.n=e=>{const r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},t.cw=e=>{var r;return()=>{if(e){var t=e;e=0,r={exports:{}},t.call(r.exports,r,r.exports)}return r.exports}},t.d=(e,r)=>{for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var o=t.cw(function(e,r){var t=Symbol.for("react.transitional.element");Symbol.for("react.fragment"),r.jsx=function(e,r,o){var n=null;if(void 0!==o&&(n=""+o),void 0!==r.key&&(n=""+r.key),"key"in r)for(var a in o={},r)"key"!==a&&(o[a]=r[a]);else o=r;return r=o.ref,{$$typeof:t,type:e,key:n,ref:void 0!==r?r:null,props:o}}}),n=t.cw(function(e,r){e.exports=o()}),a=t(5556),s=t.n(a);function i({label:e,Type:r="Default",href:t="#",onDismiss:n,removeLabel:a,className:s,...i}){const p=["mg-chip","With X"===r&&"mg-chip__cross",s].filter(Boolean).join(" ");return"With X"===r?(0,o().jsx)("button",{...i,type:"button",className:p,"aria-label":a||`Remove filter: ${e}`,onClick:n,children:e}):(0,o().jsx)("a",{...i,className:p,href:t,children:e})}n(),i.propTypes={label:s().string.isRequired,Type:s().oneOf(["Default","With X"]),href:s().string,onDismiss:s().func,removeLabel:s().string,className:s().string};export{i as Chips};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* UNDRR Mangrove component library
|
|
3
|
+
* Storybook: https://preventionweb.github.io/undrr-mangrove/
|
|
4
|
+
* LLMs context: https://preventionweb.github.io/undrr-mangrove/llms.txt
|
|
5
|
+
* Repository: https://github.com/unisdr/undrr-mangrove
|
|
6
|
+
* Compiled on: 2026-09-16T20:25:59.498Z
|
|
7
|
+
*/
|
|
8
|
+
/*! For license information please see CopyButton.js.LICENSE.txt */
|
|
9
|
+
import{useEffect as e,useRef as t,useState as o}from"react";var a={2694(e,t,o){var a=o(6925);function r(){}function n(){}n.resetWarningCache=r,e.exports=function(){function e(e,t,o,r,n,i){if(i!==a){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var o={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:n,resetWarningCache:r};return o.PropTypes=o,o}},5556(e,t,o){e.exports=o(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6942(e,t){var o;!function(){var a={}.hasOwnProperty;function r(){for(var e="",t=0;t<arguments.length;t++){var o=arguments[t];o&&(e=i(e,n(o)))}return e}function n(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return r.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var o in e)a.call(e,o)&&e[o]&&(t=i(t,o));return t}function i(e,t){return t?e?e+" "+t:e+t:e}e.exports?(r.default=r,e.exports=r):void 0===(o=function(){return r}.apply(t,[]))||(e.exports=o)}()}};const r={};function n(e){const t=r[e];if(void 0!==t)return t.exports;const o=r[e]={exports:{}};return a[e](o,o.exports,n),o.exports}n.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.cw=e=>{var t;return()=>{if(e){var o=e;e=0,t={exports:{}},o.call(t.exports,t,t.exports)}return t.exports}},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var i=n.cw(function(e,t){var o=Symbol.for("react.transitional.element");function a(e,t,a){var r=null;if(void 0!==a&&(r=""+a),void 0!==t.key&&(r=""+t.key),"key"in t)for(var n in a={},t)"key"!==n&&(a[n]=t[n]);else a=t;return t=a.ref,{$$typeof:o,type:e,key:r,ref:void 0!==t?t:null,props:a}}Symbol.for("react.fragment"),t.jsx=a,t.jsxs=a}),l=n.cw(function(e,t){e.exports=i()}),s=n(5556),c=n.n(s),p=n(6942),u=n.n(p);l();const b={},d={outline:"mg-button-primary mg-button-outline",primary:"mg-button-primary",secondary:"mg-button-secondary mg-button-outline"},f=({textToCopy:a="",className:r,labels:n=b,ariaLabel:l,copiedLabel:s,tooltipLabel:c,variant:p="outline",size:f})=>{const y=l||n.ariaLabel||"Copy to clipboard",m=s||n.copiedLabel||"Copied to clipboard.",g=c||n.tooltipLabel||"Copied!",[v,L]=o("idle"),x="copied"===v,T="failed"===v,h=n.failedLabel||"Copy failed. Select the text and copy it manually.",_=n.failedTooltipLabel||"Copy failed",O=t(null);e(()=>()=>{O.current&&clearTimeout(O.current)},[]);const k=(e,t)=>{L(e),O.current&&clearTimeout(O.current),O.current=setTimeout(()=>{L("idle")},t)};return(0,i().jsxs)("button",{type:"button",className:u()("mg-button",d[p]||d.outline,"mg-button--icon",{"mg-button--small":"small"===f,"mg-button--large":"large"===f,"mg-copy-button--copied":x},"mg-copy-button",r),onClick:async()=>{try{await navigator.clipboard.writeText(a),k("copied",2e3)}catch(e){console.error("Failed to copy!",e),k("failed",5e3)}},"aria-label":y,children:[(0,i().jsx)("span",{className:"mg-icon mg-icon-copy mg-button__icon","aria-hidden":"true"}),(0,i().jsx)("span",{className:u()("mg-copy-button__feedback",{"mg-copy-button__feedback--visible":x||T,"mg-copy-button__feedback--error":T}),"aria-hidden":"true",children:T?_:g}),(0,i().jsxs)("span",{className:"mg-u-sr-only","aria-live":"polite",children:[x?m:"",T?h:""]})]})};function y(e){const{dataset:t}=e;let o={};if(t.labels)try{o=JSON.parse(t.labels)}catch{o={}}const a=t.ariaLabel||t.label||t.copyLabel||o.ariaLabel||void 0,r=t.copiedLabel||t.ariaLiveText||o.copiedLabel||void 0,n=t.tooltipLabel||t.feedbackText||o.tooltipLabel||void 0;return{textToCopy:t.textToCopy||t.text||t.copyText||"",ariaLabel:a,copiedLabel:r,tooltipLabel:n,labels:(()=>{const e={...o};return t.failedLabel&&(e.failedLabel=t.failedLabel),t.failedTooltipLabel&&(e.failedTooltipLabel=t.failedTooltipLabel),Object.keys(e).length>0?e:void 0})(),variant:t.variant||"outline",size:t.size||void 0,className:t.className||void 0}}f.propTypes={textToCopy:c().string,className:c().string,labels:c().shape({ariaLabel:c().string,copiedLabel:c().string,tooltipLabel:c().string,failedLabel:c().string,failedTooltipLabel:c().string}),ariaLabel:c().string,copiedLabel:c().string,tooltipLabel:c().string,variant:c().oneOf(["outline","primary","secondary"]),size:c().oneOf(["small","large"])};export{f as CopyButton,f as default,y as fromElement};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
Copyright (c) 2018 Jed Watson.
|
|
3
|
+
Licensed under the MIT License (MIT), see
|
|
4
|
+
http://jedwatson.github.io/classnames
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @license React
|
|
9
|
+
* react-jsx-runtime.production.js
|
|
10
|
+
*
|
|
11
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
12
|
+
*
|
|
13
|
+
* This source code is licensed under the MIT license found in the
|
|
14
|
+
* LICENSE file in the root directory of this source tree.
|
|
15
|
+
*/
|
package/components/CtaButton.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* UNDRR Mangrove component library
|
|
3
|
+
* Storybook: https://preventionweb.github.io/undrr-mangrove/
|
|
4
|
+
* LLMs context: https://preventionweb.github.io/undrr-mangrove/llms.txt
|
|
5
|
+
* Repository: https://github.com/unisdr/undrr-mangrove
|
|
6
|
+
* Compiled on: 2026-09-16T20:25:59.498Z
|
|
4
7
|
*/
|
|
5
8
|
/*! For license information please see CtaButton.js.LICENSE.txt */
|
|
6
9
|
import"react";var e={2694(e,r,t){var n=t(6925);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,r,t,o,a,i){if(i!==n){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function r(){return e}e.isRequired=e;var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:a,resetWarningCache:o};return t.PropTypes=t,t}},5556(e,r,t){e.exports=t(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}};const r={};function t(n){const o=r[n];if(void 0!==o)return o.exports;const a=r[n]={exports:{}};return e[n](a,a.exports,t),a.exports}t.n=e=>{const r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},t.cw=e=>{var r;return()=>{if(e){var t=e;e=0,r={exports:{}},t.call(r.exports,r,r.exports)}return r.exports}},t.d=(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var n=t.cw(function(e,r){var t=Symbol.for("react.transitional.element");Symbol.for("react.fragment"),r.jsx=function(e,r,n){var o=null;if(void 0!==n&&(o=""+n),void 0!==r.key&&(o=""+r.key),"key"in r)for(var a in n={},r)"key"!==a&&(n[a]=r[a]);else n=r;return r=n.ref,{$$typeof:t,type:e,key:o,ref:void 0!==r?r:null,props:n}}}),o=t.cw(function(e,r){e.exports=n()}),a=t(5556),i=t.n(a);function s({label:e,Type:r="Primary",Variant:t="Default",Outline:o=!1,State:a="Default",href:i="#",onClick:s,className:c,...l}){const p="Disabled"===a,f=["mg-button","CTA"===t&&"mg-button-cta","mg-button-"+("Secondary"===r?"secondary":"primary"),o&&"mg-button-outline",p&&"disabled",c].filter(Boolean).join(" ");return(0,n().jsx)("a",{className:f,...l,...p?{"aria-disabled":"true",tabIndex:-1}:{href:i,onClick:s},children:e})}o(),s.propTypes={label:i().string.isRequired,Type:i().oneOf(["Primary","Secondary"]),Variant:i().oneOf(["Default","CTA"]),Outline:i().bool,State:i().oneOf(["Default","Disabled"]),href:i().string,onClick:i().func,className:i().string};export{s as CtaButton};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* UNDRR Mangrove component library
|
|
3
|
+
* Storybook: https://preventionweb.github.io/undrr-mangrove/
|
|
4
|
+
* LLMs context: https://preventionweb.github.io/undrr-mangrove/llms.txt
|
|
5
|
+
* Repository: https://github.com/unisdr/undrr-mangrove
|
|
6
|
+
* Compiled on: 2026-09-16T20:25:59.498Z
|
|
7
|
+
*/
|
|
8
|
+
/*! For license information please see Drawer.js.LICENSE.txt */
|
|
9
|
+
import{useEffect as e,useId as t,useRef as n,useState as r}from"react";var o={2694(e,t,n){var r=n(6925);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},5556(e,t,n){e.exports=n(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6942(e,t){var n;!function(){var r={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,i(n)))}return e}function i(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=a(t,n));return t}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()}};const i={};function a(e){const t=i[e];if(void 0!==t)return t.exports;const n=i[e]={exports:{}};return o[e](n,n.exports,a),n.exports}a.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.cw=e=>{var t;return()=>{if(e){var n=e;e=0,t={exports:{}},n.call(t.exports,t,t.exports)}return t.exports}},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var l=a.cw(function(e,t){var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(e,t,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==t.key&&(o=""+t.key),"key"in t)for(var i in r={},t)"key"!==i&&(r[i]=t[i]);else r=t;return t=r.ref,{$$typeof:n,type:e,key:o,ref:void 0!==t?t:null,props:r}}t.Fragment=r,t.jsx=o,t.jsxs=o}),c=a.cw(function(e,t){e.exports=l()}),s=a(5556),u=a.n(s),f=a(6942),p=a.n(f);function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t);else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return m(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const h=Object.entries,g=Object.setPrototypeOf,y=Object.isFrozen,b=Object.getPrototypeOf,v=Object.getOwnPropertyDescriptor;let S=Object.freeze,T=Object.seal,E=Object.create,w="undefined"!=typeof Reflect&&Reflect,A=w.apply,x=w.construct;S||(S=function(e){return e}),T||(T=function(e){return e}),A||(A=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return e.apply(t,r)}),x||(x=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});const _=q(Array.prototype.forEach),O=q(Array.prototype.lastIndexOf),N=q(Array.prototype.pop),k=q(Array.prototype.push),D=q(Array.prototype.splice),C=Array.isArray,R=q(String.prototype.toLowerCase),L=q(String.prototype.toString),I=q(String.prototype.match),M=q(String.prototype.replace),P=q(String.prototype.indexOf),z=q(String.prototype.trim),U=q(Number.prototype.toString),j=q(Boolean.prototype.toString),F="undefined"==typeof BigInt?null:q(BigInt.prototype.toString),H="undefined"==typeof Symbol?null:q(Symbol.prototype.toString),B=q(Object.prototype.hasOwnProperty),W=q(Object.prototype.toString),Y=q(RegExp.prototype.test),$=(G=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return x(G,t)});var G;function q(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return A(e,t,r)}}function K(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:R;if(g&&g(e,null),!C(t))return e;let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(y(t)||(t[r]=e),o=e)}e[o]=!0}return e}function X(e){for(let t=0;t<e.length;t++)B(e,t)||(e[t]=null);return e}function V(e){const t=E(null);for(const r of h(e)){var n=d(r,2);const o=n[0],i=n[1];B(e,o)&&(C(i)?t[o]=X(i):i&&"object"==typeof i&&i.constructor===Object?t[o]=V(i):t[o]=i)}return t}function Z(e,t){for(;null!==e;){const n=v(e,t);if(n){if(n.get)return q(n.get);if("function"==typeof n.value)return q(n.value)}e=b(e)}return function(){return null}}const J=S(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Q=S(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ee=S(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),te=S(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ne=S(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),re=S(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),oe=S(["#text"]),ie=S(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),ae=S(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),le=S(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ce=S(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),se=T(/{{[\w\W]*|^[\w\W]*}}/g),ue=T(/<%[\w\W]*|^[\w\W]*%>/g),fe=T(/\${[\w\W]*/g),pe=T(/^data-[\-\w.\u00B7-\uFFFF]+$/),me=T(/^aria-[\-\w]+$/),de=T(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),he=T(/^(?:\w+script|data):/i),ge=T(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ye=T(/^html$/i),be=T(/^[a-z][.\w]*(-[.\w]+)+$/i),ve=T(/<[/\w!]/g),Se=T(/<[/\w]/g),Te=T(/<\/no(script|embed|frames)/i),Ee=T(/\/>/i),we=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],Ae=S(K({},we)),xe=function(){const e={};return _(we,t=>{e[t]=T(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),S(e)}(),_e=function(){return"undefined"==typeof window?null:window},Oe=function(e,t,n,r){return B(e,t)&&C(e[t])?K(r.base?V(r.base):{},e[t],r.transform):n},Ne=function(e,t,n){const r=B(e,t)?e[t]:void 0;return r&&"object"==typeof r?V(r):n()};var ke=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_e();const n=t=>e(t);if(n.version="3.4.15",n.removed=[],!t||!t.document||9!==t.document.nodeType||!t.Element)return n.isSupported=!1,n;let r=t.document;const o=r,i=o.currentScript;t.DocumentFragment;const a=t.HTMLTemplateElement,l=t.Node,c=t.Element,s=t.NodeFilter;void 0===t.NamedNodeMap&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;const u=t.DOMParser,f=t.trustedTypes,p=c.prototype,m=Z(p,"cloneNode"),d=Z(p,"remove"),g=Z(p,"removeAttributeNode"),y=Z(p,"nextSibling"),b=Z(p,"childNodes"),v=Z(p,"parentNode"),w=Z(p,"shadowRoot"),A=Z(p,"attributes"),x=l&&l.prototype?Z(l.prototype,"nodeType"):null,G=l&&l.prototype?Z(l.prototype,"nodeName"):null,q=l&&l.prototype?Z(l.prototype,"ownerDocument"):null,X=function(e){return x?x(e):e.nodeType},we=function(e){return G?G(e):e.nodeName};if("function"==typeof a){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let ke,De,Ce="",Re=!1,Le=0;const Ie=function(){if(Le>0)throw $('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},Me=function(e){Ie(),Le++;try{return ke.createHTML(e)}finally{Le--}},Pe=r,ze=Pe.implementation,Ue=Pe.createNodeIterator,je=Pe.createDocumentFragment,Fe=Pe.getElementsByTagName,He=o.importNode;let Be={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof h&&"function"==typeof v&&ze&&void 0!==ze.createHTMLDocument;const We=se,Ye=ue,$e=fe,Ge=pe,qe=me,Ke=he,Xe=ge,Ve=be;let Ze=de,Je=null;const Qe=K({},[...J,...Q,...ee,...ne,...oe]);let et=null;const tt=K({},[...ie,...ae,...le,...ce]);let nt=Object.seal(E(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),rt=null,ot=null;const it=Object.seal(E(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let at=!0,lt=!0,ct=!1,st=!0,ut=!1,ft=!0,pt=!1,mt=!1,dt=null,ht=null,gt=!1,yt=!1,bt=!1,vt=!1,St=!0,Tt=!1;const Et="user-content-";let wt=!0,At=!1,xt={},_t=null;const Ot=K({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Nt=null;const kt=K({},["audio","video","img","source","image","track"]);let Dt=null;const Ct=K({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Rt="http://www.w3.org/1998/Math/MathML",Lt="http://www.w3.org/2000/svg",It="http://www.w3.org/1999/xhtml";let Mt=It,Pt=!1,zt=null;const Ut=K({},[Rt,Lt,It],L),jt=S(["mi","mo","mn","ms","mtext"]);let Ft=K({},jt);const Ht=S(["annotation-xml"]);let Bt=K({},Ht);const Wt=K({},["title","style","font","a","script"]);let Yt=null;const $t=["application/xhtml+xml","text/html"];let Gt=null,qt=null;const Kt=r.createElement("form"),Xt=function(e){return e instanceof RegExp||e instanceof Function},Vt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(qt&&qt===e)return;e&&"object"==typeof e||(e={}),e=V(e),Yt=-1===$t.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Gt="application/xhtml+xml"===Yt?L:R,Je=Oe(e,"ALLOWED_TAGS",Qe,{transform:Gt}),et=Oe(e,"ALLOWED_ATTR",tt,{transform:Gt}),zt=Oe(e,"ALLOWED_NAMESPACES",Ut,{transform:L}),Dt=Oe(e,"ADD_URI_SAFE_ATTR",Ct,{transform:Gt,base:Ct}),Nt=Oe(e,"ADD_DATA_URI_TAGS",kt,{transform:Gt,base:kt}),_t=Oe(e,"FORBID_CONTENTS",Ot,{transform:Gt}),rt=Oe(e,"FORBID_TAGS",V({}),{transform:Gt}),ot=Oe(e,"FORBID_ATTR",V({}),{transform:Gt}),xt=!!B(e,"USE_PROFILES")&&(e.USE_PROFILES&&"object"==typeof e.USE_PROFILES?V(e.USE_PROFILES):e.USE_PROFILES),at=!1!==e.ALLOW_ARIA_ATTR,lt=!1!==e.ALLOW_DATA_ATTR,ct=e.ALLOW_UNKNOWN_PROTOCOLS||!1,st=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,ut=e.SAFE_FOR_TEMPLATES||!1,ft=!1!==e.SAFE_FOR_XML,pt=e.WHOLE_DOCUMENT||!1,yt=e.RETURN_DOM||!1,bt=e.RETURN_DOM_FRAGMENT||!1,vt=e.RETURN_TRUSTED_TYPE||!1,gt=e.FORCE_BODY||!1,St=!1!==e.SANITIZE_DOM,Tt=e.SANITIZE_NAMED_PROPS||!1,wt=!1!==e.KEEP_CONTENT,At=e.IN_PLACE||!1,Ze=function(e){try{return Y(e,""),!0}catch(e){return!1}}(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:de,Mt="string"==typeof e.NAMESPACE?e.NAMESPACE:It,Ft=Ne(e,"MATHML_TEXT_INTEGRATION_POINTS",()=>K({},jt)),Bt=Ne(e,"HTML_INTEGRATION_POINTS",()=>K({},Ht));const t=Ne(e,"CUSTOM_ELEMENT_HANDLING",()=>E(null));if(nt=E(null),B(t,"tagNameCheck")&&Xt(t.tagNameCheck)&&(nt.tagNameCheck=t.tagNameCheck),B(t,"attributeNameCheck")&&Xt(t.attributeNameCheck)&&(nt.attributeNameCheck=t.attributeNameCheck),B(t,"allowCustomizedBuiltInElements")&&"boolean"==typeof t.allowCustomizedBuiltInElements&&(nt.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),T(nt),ut&&(lt=!1),bt&&(yt=!0),xt&&(Je=K({},oe),et=E(null),!0===xt.html&&(K(Je,J),K(et,ie)),!0===xt.svg&&(K(Je,Q),K(et,ae),K(et,ce)),!0===xt.svgFilters&&(K(Je,ee),K(et,ae),K(et,ce)),!0===xt.mathMl&&(K(Je,ne),K(et,le),K(et,ce))),it.tagCheck=null,it.attributeCheck=null,B(e,"ADD_TAGS")&&("function"==typeof e.ADD_TAGS?it.tagCheck=e.ADD_TAGS:C(e.ADD_TAGS)&&(Je===Qe&&(Je=V(Je)),K(Je,e.ADD_TAGS,Gt))),B(e,"ADD_ATTR")&&("function"==typeof e.ADD_ATTR?it.attributeCheck=e.ADD_ATTR:C(e.ADD_ATTR)&&(et===tt&&(et=V(et)),K(et,e.ADD_ATTR,Gt))),B(e,"ADD_FORBID_CONTENTS")&&C(e.ADD_FORBID_CONTENTS)&&(_t===Ot&&(_t=V(_t)),K(_t,e.ADD_FORBID_CONTENTS,Gt)),wt&&(Je["#text"]=!0),pt&&K(Je,["html","head","body"]),Je.table&&(K(Je,["tbody"]),delete rt.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw $('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw $('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const t=ke;ke=e.TRUSTED_TYPES_POLICY;try{Ce=Me("")}catch(e){throw ke=t,e}}else null===e.TRUSTED_TYPES_POLICY?(ke=void 0,Ce=""):(void 0===ke&&(Re||(De=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(f,i),Re=!0),ke=De),ke&&"string"==typeof Ce&&(Ce=Me("")));S&&S(e),qt=e},Zt=K({},[...Q,...ee,...te]),Jt=K({},[...ne,...re]),Qt=function(e){k(n.removed,{element:e});try{v(e).removeChild(e)}catch(t){if(d(e),!v(e))throw $("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},en=function(e,t,n){try{g(e,t)}catch(t){try{e.removeAttribute(n)}catch(e){}}},tn=function(e){on(e);const t=b(e);if(t){const e=[];_(t,t=>{k(e,t)}),_(e,e=>{try{d(e)}catch(e){}})}const n=A(e);if(n)for(let t=n.length-1;t>=0;--t){const r=n[t],o=r&&r.name;"string"==typeof o&&en(e,r,o)}},nn=function(e,t,r){if(!r)try{r=t.getAttributeNode(e)}catch(e){r=null}k(n.removed,{attribute:r||null,from:t});try{r?g(t,r):t.removeAttribute(e)}catch(n){try{t.removeAttribute(e)}catch(e){}}if("is"===e)if(yt||bt)try{Qt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},rn=function(e){const t=A(e);if(t)for(let n=t.length-1;n>=0;--n){const r=t[n],o=r&&r.name;"string"!=typeof o||et[Gt(o)]||en(e,r,o)}},on=function(e){const t=[e];for(;t.length>0;){const e=t.pop();1===X(e)&&rn(e);const n=b(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},an=function(e,t){return!!ft&&("patchsrc"===e||"for"===e&&"label"!==t&&"output"!==t)},ln=function(e){let t=null,n=null;if(gt)e="<remove></remove>"+e;else{const t=I(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Yt&&Mt===It&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=ke?Me(e):e;if(Mt===It)try{t=(new u).parseFromString(o,Yt)}catch(e){}if(!t||!t.documentElement){t=ze.createDocument(Mt,"template",null);try{t.documentElement.innerHTML=Pt?Ce:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),Mt===It?Fe.call(t,pt?"html":"body")[0]:pt?t.documentElement:i},cn=function(e){const t=q?q(e):e.ownerDocument;return Ue.call(t||e,e,s.SHOW_ELEMENT|s.SHOW_COMMENT|s.SHOW_TEXT|s.SHOW_PROCESSING_INSTRUCTION|s.SHOW_CDATA_SECTION,null)},sn=function(e){return e=M(e,We," "),e=M(e,Ye," "),M(e,$e," ")},un=function(e){var t;e.normalize();const n=q?q(e):e.ownerDocument,r=Ue.call(n||e,e,s.SHOW_TEXT|s.SHOW_COMMENT|s.SHOW_CDATA_SECTION|s.SHOW_PROCESSING_INSTRUCTION,null);let o=r.nextNode();for(;o;)o.data=sn(o.data),o=r.nextNode();const i=null===(t=e.querySelectorAll)||void 0===t?void 0:t.call(e,"template");i&&_(i,e=>{pn(e.content)&&un(e.content)})},fn=function(e){const t=G?G(e):null;return"string"==typeof t&&"form"===Gt(t)&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||e.attributes!==A(e)||"function"!=typeof e.removeAttribute||"function"!=typeof e.removeAttributeNode||"function"!=typeof e.getAttributeNode||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes||e.nodeType!==x(e)||e.childNodes!==b(e))},pn=function(e){if(!x||"object"!=typeof e||null===e)return!1;try{return 11===x(e)}catch(e){return!1}},mn=function(e){if(!x||"object"!=typeof e||null===e)return!1;try{return"number"==typeof x(e)}catch(e){return!1}};function dn(e,t,r){0!==e.length&&_(e,e=>{e.call(n,t,r,qt)})}const hn=function(e,t){if(e instanceof RegExp)return Y(e,t);if(e instanceof Function){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return Boolean(e(t,...r))}return!1},gn=function(e,t,n,r){return 0===e.length?t:t===n||t===r?V(t):t},yn=function(e,t){return e!==t&&null===v(e)&&(At&&on(e),!0)},bn=function(e,t){if(dn(Be.beforeSanitizeElements,e,null),yn(e,t))return!0;if(fn(e))return Qt(e),!0;const r=Gt(we(e));if(Je=gn(Be.uponSanitizeElement,Je,Qe,dt),dn(Be.uponSanitizeElement,e,{tagName:r,allowedTags:Je}),yn(e,t))return!0;if(function(e,t){return!!(ft&&e.hasChildNodes()&&!mn(e.firstElementChild)&&Y(ve,e.textContent)&&Y(ve,e.innerHTML))||!!(ft&&e.namespaceURI===It&&Ae[t]&&(mn(e.firstElementChild)||"string"==typeof e.textContent&&Y(xe[t],e.textContent)))||7===e.nodeType||!(!ft||8!==e.nodeType||!Y(Se,e.data))}(e,r))return Qt(e),!0;if(rt[r]||!(it.tagCheck instanceof Function&&it.tagCheck(r))&&!Je[r]){const n=function(e,t,n){if(!rt[t]&&Tn(t)&&hn(nt.tagNameCheck,t))return!1;if(wt&&!_t[t]){const t=v(e),r=b(e);if(r&&t)for(let o=r.length-1;o>=0;--o){const i=e===n?m(r[o],!0):r[o];t.insertBefore(i,y(e))}}return Qt(e),!0}(e,r,t);return!1===n&&dn(Be.afterSanitizeElements,e,null),n}if(1===X(e)&&!function(e){let t=v(e);t&&t.tagName||(t={namespaceURI:Mt,tagName:"template"});const n=R(e.tagName),r=R(t.tagName);return!!zt[e.namespaceURI]&&(e.namespaceURI===Lt?function(e,t,n){return t.namespaceURI===It?"svg"===e:t.namespaceURI===Rt?"svg"===e&&("annotation-xml"===n||Ft[n]):Boolean(Zt[e])}(n,t,r):e.namespaceURI===Rt?function(e,t,n){return t.namespaceURI===It?"math"===e:t.namespaceURI===Lt?"math"===e&&Bt[n]:Boolean(Jt[e])}(n,t,r):e.namespaceURI===It?function(e,t,n){return!(t.namespaceURI===Lt&&!Bt[n])&&!(t.namespaceURI===Rt&&!Ft[n])&&!Jt[e]&&(Wt[e]||!Zt[e])}(n,t,r):!("application/xhtml+xml"!==Yt||!zt[e.namespaceURI]))}(e))return Qt(e),!0;if(("noscript"===r||"noembed"===r||"noframes"===r)&&Y(Te,e.innerHTML))return Qt(e),!0;if(ut&&3===e.nodeType){const t=sn(e.textContent);e.textContent!==t&&(k(n.removed,{element:e.cloneNode()}),e.textContent=t)}return dn(Be.afterSanitizeElements,e,null),!1},vn=function(e,t,n){if(ot[t])return!1;if(an(t,e))return!1;if(St&&("id"===t||"name"===t)&&(n in r||n in Kt))return!1;const o=et[t]||it.attributeCheck instanceof Function&&it.attributeCheck(t,e);return!(!lt||!Y(Ge,t))||!(!at||!Y(qe,t))||(o?!(!Dt[t]&&!Y(Ze,M(n,Xe,""))&&("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==P(n,"data:")||!Nt[e])&&(!ct||Y(Ke,M(n,Xe,"")))&&n):Tn(e)&&hn(nt.tagNameCheck,e)&&hn(nt.attributeNameCheck,t,e)||"is"===t&&nt.allowCustomizedBuiltInElements&&hn(nt.tagNameCheck,n))},Sn=K({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Tn=function(e){return!Sn[R(e)]&&Y(Ve,e)},En=function(e,t,n,r){if(ke&&"object"==typeof f&&"function"==typeof f.getAttributeType&&!n)switch(f.getAttributeType(e,t)){case"TrustedHTML":return Me(r);case"TrustedScriptURL":return function(e){Ie(),Le++;try{return ke.createScriptURL(e)}finally{Le--}}(r)}return r},wn=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),!fn(e)||(Qt(e),!1)}catch(n){return nn(t,e),!1}},An=function(e){dn(Be.beforeSanitizeAttributes,e,null);const t=e.attributes;if(!t||fn(e))return;et=gn(Be.uponSanitizeAttribute,et,tt,ht);const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:et,forceKeepAttr:void 0};let o=t.length;const i=Gt(e.nodeName);for(;o--;){const a=t[o],l=a.name,c=a.namespaceURI,s=a.value,u=Gt(l),f=s;let p="value"===l?f:z(f),m=!1;r.attrName=u,r.attrValue=p,r.keepAttr=!0,r.forceKeepAttr=void 0,dn(Be.uponSanitizeAttribute,e,r),p=r.attrValue,!Tt||"id"!==u&&"name"!==u||0===P(p,Et)||(nn(l,e,a),p=Et+p,m=!0),ft&&Y(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,p)||"attributename"===u&&I(p,"href")?nn(l,e,a):r.forceKeepAttr||(r.keepAttr&&(st||!Y(Ee,p))?(ut&&(p=sn(p)),vn(i,u,p)?(p=En(i,u,c,p),p!==f&&wn(e,l,c,p)&&m&&N(n.removed)):nn(l,e,a)):nn(l,e,a))}dn(Be.afterSanitizeAttributes,e,null)},xn=function(e){let t=null;const n=cn(e);for(dn(Be.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(dn(Be.uponSanitizeShadowNode,t,null),bn(t,e),An(t),pn(t.content)&&xn(t.content),1===X(t)){const e=w(t);pn(e)&&(_n(e),xn(e))}dn(Be.afterSanitizeShadowDOM,e,null)},_n=function(e){const t=[{node:e,shadow:null}];for(;t.length>0;){const e=t.pop();if(e.shadow){xn(e.shadow);continue}const n=e.node,r=1===X(n),o=b(n);if(o)for(let e=o.length-1;e>=0;--e)t.push({node:o[e],shadow:null});if(r){const e=G?G(n):null;if("string"==typeof e&&"template"===Gt(e)){const e=n.content;pn(e)&&t.push({node:e,shadow:null})}}if(r){const e=w(n);pn(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,a=null,l=null;if(Pt=!e,Pt&&(e="\x3c!--\x3e"),"string"!=typeof e&&!mn(e)&&"string"!=typeof(e=function(e){switch(typeof e){case"string":return e;case"number":return U(e);case"boolean":return j(e);case"bigint":return F?F(e):"0";case"symbol":return H?H(e):"Symbol()";case"undefined":default:return W(e);case"function":case"object":{if(null===e)return W(e);const t=e,n=Z(t,"toString");if("function"==typeof n){const e=n(t);return"string"==typeof e?e:W(e)}return W(e)}}}(e)))throw $("dirty is not a string, aborting");if(!n.isSupported)return e;mt?(Je=dt,et=ht):Vt(t),(Be.uponSanitizeElement.length>0||Be.uponSanitizeAttribute.length>0)&&(Je=V(Je)),Be.uponSanitizeAttribute.length>0&&(et=V(et)),n.removed=[];const c=At&&"string"!=typeof e&&mn(e);if(c){!function(e){if(!ft)return;const t=[e];for(;t.length>0;){const e=t.pop(),n=X(e);if(7===n||8===n&&Y(Se,e.data)){try{d(e)}catch(e){}continue}if(1===n){const t=e,n=Gt(we(e));try{t.hasAttribute&&t.hasAttribute("patchsrc")&&t.removeAttribute("patchsrc"),t.hasAttribute&&t.hasAttribute("for")&&an("for",n)&&t.removeAttribute("for")}catch(e){}}const r=b(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}}(e);const t=we(e);if("string"==typeof t){const n=Gt(t);if(!Je[n]||rt[n])throw tn(e),$("root node is forbidden and cannot be sanitized in-place")}if(fn(e))throw tn(e),$("root node is clobbered and cannot be sanitized in-place");try{_n(e)}catch(t){throw tn(e),t}}else if(mn(e))r=ln("\x3c!----\x3e"),i=r.ownerDocument.importNode(e,!0),1===i.nodeType&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i),_n(r);else{if(!yt&&!ut&&!pt&&-1===e.indexOf("<"))return ke&&vt?Me(e):e;if(r=ln(e),!r)return yt?null:vt?Ce:""}r&>&&Qt(r.firstChild);const s=c?e:r;try{const e=cn(s);for(;a=e.nextNode();)bn(a,s),An(a),pn(a.content)&&xn(a.content)}catch(t){throw c&&(tn(e),_(n.removed,e=>{e.element&&on(e.element)})),t}if(c)return _(n.removed,e=>{e.element&&on(e.element)}),ut&&un(e),e;if(yt){if(ut&&un(r),bt)for(l=je.call(r.ownerDocument);r.firstChild;)l.appendChild(r.firstChild);else l=r;return(et.shadowroot||et.shadowrootmode)&&(l=He.call(o,l,!0)),l}let u=pt?r.outerHTML:r.innerHTML;return pt&&Je["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&Y(ye,r.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+u),ut&&(u=sn(u)),ke&&vt?Me(u):u},n.setConfig=function(){Vt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),mt=!0,dt=Je,ht=et},n.clearConfig=function(){qt=null,mt=!1,dt=null,ht=null,ke=De,Ce=""},n.isValidAttribute=function(e,t,n){qt||Vt({});const r=Gt(e),o=Gt(t);return vn(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&B(Be,e)&&k(Be[e],t)},n.removeHook=function(e,t){if(B(Be,e)){if(void 0!==t){const n=O(Be[e],t);return-1===n?void 0:D(Be[e],n,1)[0]}return N(Be[e])}},n.removeHooks=function(e){B(Be,e)&&(Be[e]=[])},n.removeAllHooks=function(){Be={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();const De={closeLabel:"Close"};c();const Ce=e=>({__html:ke.sanitize(e)}),Re=({isOpen:r=!1,onClose:o,position:i="start",title:a,children:c,footer:s,bodyHtml:u,footerHtml:f,labels:m={},className:d,backdrop:h=!0,isFloatingPanel:g=!1,...y})=>{const{closeLabel:b}={...De,...m},v=n(null),S=n(null),T=n(null),E=n(o);E.current=o;const w=t(),A=h&&!g,x=g?"mg-floating-panel":"mg-drawer";e(()=>{const e=e=>{"Escape"===e.key&&r&&E.current&&E.current()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[r]),e(()=>{const e=v.current;if(!e)return;if(e.inert=!r,r)return T.current=document.activeElement,void(S.current||e).focus();const t=T.current;T.current=null,t&&t.isConnected&&"function"==typeof t.focus&&(!e.contains(document.activeElement)&&document.activeElement&&document.activeElement!==document.body||t.focus())},[r]);const _=p()(x,{"is-open":r,[`${x}--${i}`]:!g&&i},d);let O=c;u&&(O=(0,l().jsx)("div",{dangerouslySetInnerHTML:Ce(u)}));let N=s;return f&&(N=(0,l().jsx)("div",{dangerouslySetInnerHTML:Ce(f)})),(0,l().jsxs)(l().Fragment,{children:[A&&r&&(0,l().jsx)("div",{className:"mg-drawer__backdrop",onClick:o,"aria-hidden":"true"}),(0,l().jsxs)("div",{ref:v,className:_,"aria-hidden":r?void 0:"true",tabIndex:"-1",role:"dialog","aria-modal":A&&r?"true":void 0,"aria-labelledby":a?w:void 0,onKeyDown:e=>{if(!A||!r||"Tab"!==e.key)return;const t=Array.from(v.current.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'));if(0===t.length)return void e.preventDefault();const n=t[0],o=t[t.length-1];e.shiftKey&&document.activeElement===n?(e.preventDefault(),o.focus()):e.shiftKey||document.activeElement!==o||(e.preventDefault(),n.focus())},...y,children:[(0,l().jsxs)("div",{className:`${x}__header`,children:[a&&(0,l().jsx)("h2",{id:w,className:`${x}__title`,children:a}),(0,l().jsx)("button",{ref:S,type:"button",className:`mg-icon-button mg-icon-button--small ${x}__close`,onClick:o,"aria-label":b,children:(0,l().jsx)("span",{className:"mg-icon mg-icon-close","aria-hidden":"true"})})]}),(0,l().jsx)("div",{className:`${x}__body`,children:O}),N&&(0,l().jsx)("div",{className:`${x}__footer`,children:N})]})]})};Re.propTypes={isOpen:u().bool,onClose:u().func,position:u().oneOf(["start","end","bottom"]),title:u().node,children:u().node,footer:u().node,bodyHtml:u().string,footerHtml:u().string,labels:u().shape({closeLabel:u().string}),className:u().string,backdrop:u().bool,isFloatingPanel:u().bool};const Le="mg-drawer:open",Ie="mg-drawer:close",Me="mg-drawer:toggle",Pe=({isOpen:t=!1,controlsId:n,...o})=>{const[i,a]=r(t);return e(()=>{if(!n)return;const e=e=>{const t=e.target.closest?.("[data-mg-drawer-trigger]");t&&t.getAttribute("data-mg-drawer-trigger")===n&&(e.preventDefault(),a(e=>!e))},t=()=>a(!0),r=()=>a(!1),o=()=>a(e=>!e);document.addEventListener("click",e);const i=document.getElementById(n);return i?.addEventListener(Le,t),i?.addEventListener(Ie,r),i?.addEventListener(Me,o),()=>{document.removeEventListener("click",e),i?.removeEventListener(Le,t),i?.removeEventListener(Ie,r),i?.removeEventListener(Me,o)}},[n]),e(()=>{n&&document.querySelectorAll("[data-mg-drawer-trigger]").forEach(e=>{e.getAttribute("data-mg-drawer-trigger")===n&&(e.setAttribute("aria-expanded",String(i)),e.setAttribute("aria-controls",n))})},[n,i]),(0,l().jsx)(Re,{...o,isOpen:i,onClose:()=>a(!1)})};function ze(e){const{dataset:t}=e,n="true"===t.isFloatingPanel||e.classList.contains("mg-floating-panel"),r=n?"mg-floating-panel":"mg-drawer",o=e.querySelector(`.${r}__body`),i=e.querySelector(`.${r}__footer`),a=e.querySelector(`.${r}__title`),l=t.title||(a?a.textContent.trim():void 0);let c=o?o.innerHTML.trim():"";return c||a||i||(c=e.innerHTML.trim()),{isOpen:"true"===t.isOpen||e.classList.contains("is-open"),position:t.position||"start",title:l||void 0,backdrop:"false"!==t.backdrop,isFloatingPanel:n,bodyHtml:c||void 0,footerHtml:i?i.innerHTML.trim():void 0,labels:t.closeLabel?{closeLabel:t.closeLabel}:void 0,controlsId:e.id||void 0,className:t.className||void 0}}Pe.propTypes={isOpen:u().bool,controlsId:u().string};export{Re as Drawer,Pe as HydratedDrawer,Pe as default,ze as fromElement};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
Copyright (c) 2018 Jed Watson.
|
|
3
|
+
Licensed under the MIT License (MIT), see
|
|
4
|
+
http://jedwatson.github.io/classnames
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/*! @license DOMPurify 3.4.15 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.15/LICENSE */
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* UNDRR Mangrove component library
|
|
3
|
+
* Storybook: https://preventionweb.github.io/undrr-mangrove/
|
|
4
|
+
* LLMs context: https://preventionweb.github.io/undrr-mangrove/llms.txt
|
|
5
|
+
* Repository: https://github.com/unisdr/undrr-mangrove
|
|
6
|
+
* Compiled on: 2026-09-16T20:25:59.498Z
|
|
4
7
|
*/
|
|
5
8
|
/*! For license information please see EmbedContainer.js.LICENSE.txt */
|
|
6
9
|
import"react";var e={2694(e,r,t){var n=t(6925);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,r,t,o,a,s){if(s!==n){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function r(){return e}e.isRequired=e;var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:a,resetWarningCache:o};return t.PropTypes=t,t}},5556(e,r,t){e.exports=t(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}};const r={};function t(n){const o=r[n];if(void 0!==o)return o.exports;const a=r[n]={exports:{}};return e[n](a,a.exports,t),a.exports}t.n=e=>{const r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},t.cw=e=>{var r;return()=>{if(e){var t=e;e=0,r={exports:{}},t.call(r.exports,r,r.exports)}return r.exports}},t.d=(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var n=t.cw(function(e,r){var t=Symbol.for("react.transitional.element");Symbol.for("react.fragment"),r.jsx=function(e,r,n){var o=null;if(void 0!==n&&(o=""+n),void 0!==r.key&&(o=""+r.key),"key"in r)for(var a in n={},r)"key"!==a&&(n[a]=r[a]);else n=r;return r=n.ref,{$$typeof:t,type:e,key:o,ref:void 0!==r?r:null,props:n}}}),o=t.cw(function(e,r){e.exports=n()}),a=t(5556),s=t.n(a);function c({children:e,aspectRatio:r="16x9",className:t="",as:o="div"}){const a=["mg-embed-container","16x9"!==r&&`mg-embed-container--${r}`,t].filter(Boolean).join(" ");return(0,n().jsx)(o,{className:a,children:e})}o(),c.propTypes={children:s().node,aspectRatio:s().oneOf(["16x9","4x3","1x1","21x9"]),className:s().string,as:s().string};const i=c;export{c as EmbedContainer,i as default};
|
package/components/Footer.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* UNDRR Mangrove component library
|
|
3
|
+
* Storybook: https://preventionweb.github.io/undrr-mangrove/
|
|
4
|
+
* LLMs context: https://preventionweb.github.io/undrr-mangrove/llms.txt
|
|
5
|
+
* Repository: https://github.com/unisdr/undrr-mangrove
|
|
6
|
+
* Compiled on: 2026-09-16T20:25:59.498Z
|
|
4
7
|
*/
|
|
5
8
|
/*! For license information please see Footer.js.LICENSE.txt */
|
|
6
9
|
import{useEffect as e,useMemo as n,useRef as t}from"react";var r={2694(e,n,t){var r=t(6925);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,n,t,o,i,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function n(){return e}e.isRequired=e;var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:i,resetWarningCache:o};return t.PropTypes=t,t}},5556(e,n,t){e.exports=t(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}};const o={};function i(e){const n=o[e];if(void 0!==n)return n.exports;const t=o[e]={exports:{}};return r[e](t,t.exports,i),t.exports}i.n=e=>{const n=e&&e.__esModule?()=>e.default:()=>e;return i.d(n,{a:n}),n},i.cw=e=>{var n;return()=>{if(e){var t=e;e=0,n={exports:{}},t.call(n.exports,n,n.exports)}return n.exports}},i.d=(e,n)=>{for(var t in n)i.o(n,t)&&!i.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},i.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n);var a=i.cw(function(e,n){var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(e,n,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==n.key&&(o=""+n.key),"key"in n)for(var i in r={},n)"key"!==i&&(r[i]=n[i]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:o,ref:void 0!==n?n:null,props:r}}n.Fragment=r,n.jsx=o,n.jsxs=o}),s=i.cw(function(e,n){e.exports=a()}),c=i(5556),l=i.n(c);s();const p=(...e)=>e.filter(Boolean).length>0?e.filter(Boolean).join(" "):null,d={contenttype:"landingpage",pageid:"83835",includemetatags:!1,includecss:!1,suffixID:"footer",activedomain:"www.undrr.org"},u={};function f({variant:r="default",enableSyndication:o=!0,syndicationConfig:i=u,complementaryContent:s=null,children:c,className:l,...f}){const y=t(null),m=n(()=>({...d,...i}),[i]);return e(()=>{if(!o)return;const e=document.querySelector('script[src*="preventionweb.net/widget.js"]'),n=()=>{const e=document.createElement("script");e.type="text/javascript",e.innerHTML=`\n if (window.PW_Widget) {\n new PW_Widget.initialize({\n contenttype: "${m.contenttype}",\n pageid: "${m.pageid}",\n includemetatags: ${m.includemetatags},\n includecss: ${m.includecss},\n suffixID: "${m.suffixID}",\n activedomain: "${m.activedomain}"\n });\n }\n `,document.head.appendChild(e)};if(e)n();else{const e=document.createElement("script");e.type="text/javascript",e.src="https://publish.preventionweb.net/widget.js?rand=3d797b",document.head.appendChild(e),e.onload=()=>{n()},e.onerror=()=>{console.warn("Failed to load UNDRR syndication widget"),y.current&&(y.current.innerHTML="<p>Unable to load syndicated footer content.</p>")}}return()=>{y.current&&(y.current.innerHTML="")}},[o,m]),(0,a().jsxs)("footer",{className:p("mg-footer",l),...f,children:[(s||c)&&(0,a().jsx)(a().Fragment,{children:s||c}),o&&(0,a().jsx)("div",{className:`pw-widget-${m.suffixID}`,ref:y,children:"Loading UNDRR footer content…"})]})}f.propTypes={variant:l().string,enableSyndication:l().bool,syndicationConfig:l().shape({contenttype:l().string,pageid:l().string,includemetatags:l().bool,includecss:l().bool,suffixID:l().string,activedomain:l().string}),complementaryContent:l().node,children:l().node,className:l().string};export{f as Footer};
|
package/components/FormAction.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* UNDRR Mangrove component library
|
|
3
|
+
* Storybook: https://preventionweb.github.io/undrr-mangrove/
|
|
4
|
+
* LLMs context: https://preventionweb.github.io/undrr-mangrove/llms.txt
|
|
5
|
+
* Repository: https://github.com/unisdr/undrr-mangrove
|
|
6
|
+
* Compiled on: 2026-09-16T20:25:59.498Z
|
|
4
7
|
*/
|
|
5
8
|
/*! For license information please see FormAction.js.LICENSE.txt */
|
|
6
9
|
import{cloneElement as e,useId as r}from"react";var o={2694(e,r,o){var t=o(6925);function n(){}function a(){}a.resetWarningCache=n,e.exports=function(){function e(e,r,o,n,a,s){if(s!==t){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function r(){return e}e.isRequired=e;var o={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:a,resetWarningCache:n};return o.PropTypes=o,o}},5556(e,r,o){e.exports=o(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}};const t={};function n(e){const r=t[e];if(void 0!==r)return r.exports;const a=t[e]={exports:{}};return o[e](a,a.exports,n),a.exports}n.n=e=>{const r=e&&e.__esModule?()=>e.default:()=>e;return n.d(r,{a:r}),r},n.cw=e=>{var r;return()=>{if(e){var o=e;e=0,r={exports:{}},o.call(r.exports,r,r.exports)}return r.exports}},n.d=(e,r)=>{for(var o in r)n.o(r,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var a=n.cw(function(e,r){var o=Symbol.for("react.transitional.element");function t(e,r,t){var n=null;if(void 0!==t&&(n=""+t),void 0!==r.key&&(n=""+r.key),"key"in r)for(var a in t={},r)"key"!==a&&(t[a]=r[a]);else t=r;return r=t.ref,{$$typeof:o,type:e,key:n,ref:void 0!==r?r:null,props:t}}Symbol.for("react.fragment"),r.jsx=t,r.jsxs=t}),s=n.cw(function(e,r){e.exports=a()}),i=n(5556),l=n.n(i);s();const c=(e,r)=>[e,r].filter(Boolean).join(" ");function p({control:o,action:t,label:n,hideLabel:s=!1,helpText:i,errorText:l,stackOnMobile:p=!1,className:m}){const f=r(),d=o.props.id||f,u=i?`${d}-help`:void 0,y=l?`${d}-error`:void 0,b=[o.props["aria-describedby"],u,y].filter(Boolean).join(" ")||void 0,x=e(o,{key:o.key||"control",id:d,className:c(o.props.className,"mg-form-action__control"),"aria-describedby":b,"aria-invalid":l?"true":o.props["aria-invalid"]}),v=e(t,{key:t.key||"action",className:c(t.props.className,"mg-form-action__action")});return(0,a().jsxs)("div",{className:["mg-form-field",m].filter(Boolean).join(" "),children:[n&&(0,a().jsx)("label",{className:s?"mg-u-sr-only":"mg-form-label",htmlFor:d,children:n}),(0,a().jsxs)("div",{className:["mg-form-action",p&&"mg-form-action--stack-mobile"].filter(Boolean).join(" "),children:[x,v]}),i&&(0,a().jsx)("p",{className:"mg-form-help",id:u,children:i}),l&&(0,a().jsx)("p",{className:"mg-form-error",id:y,role:"alert",children:l})]})}p.propTypes={control:l().element.isRequired,action:l().element.isRequired,label:l().string,hideLabel:l().bool,helpText:l().string,errorText:l().string,stackOnMobile:l().bool,className:l().string};const m=p;export{p as FormAction,m as default};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* UNDRR Mangrove component library
|
|
3
|
+
* Storybook: https://preventionweb.github.io/undrr-mangrove/
|
|
4
|
+
* LLMs context: https://preventionweb.github.io/undrr-mangrove/llms.txt
|
|
5
|
+
* Repository: https://github.com/unisdr/undrr-mangrove
|
|
6
|
+
* Compiled on: 2026-09-16T20:25:59.498Z
|
|
4
7
|
*/
|
|
5
8
|
/*! For license information please see FormErrorSummary.js.LICENSE.txt */
|
|
6
9
|
import{useEffect as e,useRef as r}from"react";var t={2694(e,r,t){var n=t(6925);function o(){}function s(){}s.resetWarningCache=o,e.exports=function(){function e(e,r,t,o,s,a){if(a!==n){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function r(){return e}e.isRequired=e;var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:s,resetWarningCache:o};return t.PropTypes=t,t}},5556(e,r,t){e.exports=t(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}};const n={};function o(e){const r=n[e];if(void 0!==r)return r.exports;const s=n[e]={exports:{}};return t[e](s,s.exports,o),s.exports}o.n=e=>{const r=e&&e.__esModule?()=>e.default:()=>e;return o.d(r,{a:r}),r},o.cw=e=>{var r;return()=>{if(e){var t=e;e=0,r={exports:{}},t.call(r.exports,r,r.exports)}return r.exports}},o.d=(e,r)=>{for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var s=o.cw(function(e,r){var t=Symbol.for("react.transitional.element");function n(e,r,n){var o=null;if(void 0!==n&&(o=""+n),void 0!==r.key&&(o=""+r.key),"key"in r)for(var s in n={},r)"key"!==s&&(n[s]=r[s]);else n=r;return r=n.ref,{$$typeof:t,type:e,key:o,ref:void 0!==r?r:null,props:n}}Symbol.for("react.fragment"),r.jsx=n,r.jsxs=n}),a=o.cw(function(e,r){e.exports=s()}),i=o(5556),c=o.n(i);function l({title:t="There is a problem",errors:n,className:o,...a}){const i=r(null),c=r(!1);return e(()=>{n?.length>0&&i.current&&!c.current&&(i.current.focus(),c.current=!0)},[n]),n&&0!==n.length?(0,s().jsxs)("div",{className:["mg-form-error-summary",o].filter(Boolean).join(" "),role:"alert",tabIndex:-1,ref:i,...a,children:[(0,s().jsx)("h2",{className:"mg-form-error-summary__title",children:t}),(0,s().jsx)("ul",{className:"mg-form-error-summary__list",children:n.map(e=>(0,s().jsx)("li",{children:(0,s().jsx)("a",{href:`#${e.id}`,children:e.message})},e.id))})]}):null}a(),l.propTypes={title:c().string,errors:c().arrayOf(c().shape({id:c().string.isRequired,message:c().string.isRequired})).isRequired,className:c().string};const p=l;export{l as FormErrorSummary,p as default};
|
package/components/FormGroup.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* UNDRR Mangrove component library
|
|
3
|
+
* Storybook: https://preventionweb.github.io/undrr-mangrove/
|
|
4
|
+
* LLMs context: https://preventionweb.github.io/undrr-mangrove/llms.txt
|
|
5
|
+
* Repository: https://github.com/unisdr/undrr-mangrove
|
|
6
|
+
* Compiled on: 2026-09-16T20:25:59.498Z
|
|
4
7
|
*/
|
|
5
8
|
/*! For license information please see FormGroup.js.LICENSE.txt */
|
|
6
9
|
import{useId as e}from"react";var r={2694(e,r,o){var n=o(6925);function t(){}function s(){}s.resetWarningCache=t,e.exports=function(){function e(e,r,o,t,s,a){if(a!==n){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function r(){return e}e.isRequired=e;var o={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:s,resetWarningCache:t};return o.PropTypes=o,o}},5556(e,r,o){e.exports=o(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}};const o={};function n(e){const t=o[e];if(void 0!==t)return t.exports;const s=o[e]={exports:{}};return r[e](s,s.exports,n),s.exports}n.n=e=>{const r=e&&e.__esModule?()=>e.default:()=>e;return n.d(r,{a:r}),r},n.cw=e=>{var r;return()=>{if(e){var o=e;e=0,r={exports:{}},o.call(r.exports,r,r.exports)}return r.exports}},n.d=(e,r)=>{for(var o in r)n.o(r,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var t=n.cw(function(e,r){var o=Symbol.for("react.transitional.element");function n(e,r,n){var t=null;if(void 0!==n&&(t=""+n),void 0!==r.key&&(t=""+r.key),"key"in r)for(var s in n={},r)"key"!==s&&(n[s]=r[s]);else n=r;return r=n.ref,{$$typeof:o,type:e,key:t,ref:void 0!==r?r:null,props:n}}Symbol.for("react.fragment"),r.jsx=n,r.jsxs=n}),s=n.cw(function(e,r){e.exports=t()}),a=n(5556),i=n.n(a);function l({children:r,legend:o,disabled:n=!1,error:s=!1,errorText:a,hideLegend:i=!1,className:l,...c}){const p=e(),d=s&&a?`${p}-error`:void 0,f=["mg-form-group",n&&"mg-form-group--disabled",s&&"mg-form-group--error",l].filter(Boolean).join(" "),u=["mg-form-group__legend",i&&"mg-u-sr-only"].filter(Boolean).join(" ");return(0,t().jsxs)("fieldset",{className:f,disabled:n,"aria-describedby":d,...c,children:[(0,t().jsx)("legend",{className:u,children:o}),r,s&&a&&(0,t().jsx)("p",{className:"mg-form-error",id:d,role:"alert",children:a})]})}s(),l.propTypes={children:i().node.isRequired,legend:i().string.isRequired,disabled:i().bool,error:i().bool,errorText:i().string,hideLegend:i().bool,className:i().string};const c=l;export{l as FormGroup,c as default};
|
package/components/FullWidth.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* UNDRR Mangrove component library
|
|
3
|
+
* Storybook: https://preventionweb.github.io/undrr-mangrove/
|
|
4
|
+
* LLMs context: https://preventionweb.github.io/undrr-mangrove/llms.txt
|
|
5
|
+
* Repository: https://github.com/unisdr/undrr-mangrove
|
|
6
|
+
* Compiled on: 2026-09-16T20:25:59.498Z
|
|
4
7
|
*/
|
|
5
8
|
/*! For license information please see FullWidth.js.LICENSE.txt */
|
|
6
9
|
import"react";var e={2694(e,r,t){var n=t(6925);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,r,t,o,a,s){if(s!==n){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function r(){return e}e.isRequired=e;var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:a,resetWarningCache:o};return t.PropTypes=t,t}},5556(e,r,t){e.exports=t(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}};const r={};function t(n){const o=r[n];if(void 0!==o)return o.exports;const a=r[n]={exports:{}};return e[n](a,a.exports,t),a.exports}t.n=e=>{const r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},t.cw=e=>{var r;return()=>{if(e){var t=e;e=0,r={exports:{}},t.call(r.exports,r,r.exports)}return r.exports}},t.d=(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var n=t.cw(function(e,r){var t=Symbol.for("react.transitional.element");Symbol.for("react.fragment"),r.jsx=function(e,r,n){var o=null;if(void 0!==n&&(o=""+n),void 0!==r.key&&(o=""+r.key),"key"in r)for(var a in n={},r)"key"!==a&&(n[a]=r[a]);else n=r;return r=n.ref,{$$typeof:t,type:e,key:o,ref:void 0!==r?r:null,props:n}}}),o=t.cw(function(e,r){e.exports=n()}),a=t(5556),s=t.n(a);function c({children:e,className:r=""}){const t=["mg-container-full-width",r].filter(Boolean).join(" ");return(0,n().jsx)("section",{className:t,children:e})}o(),c.propTypes={children:s().node,className:s().string};const i=c;export{c as FullWidth,i as default};
|
package/components/Gallery.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* UNDRR Mangrove component library
|
|
3
|
+
* Storybook: https://preventionweb.github.io/undrr-mangrove/
|
|
4
|
+
* LLMs context: https://preventionweb.github.io/undrr-mangrove/llms.txt
|
|
5
|
+
* Repository: https://github.com/unisdr/undrr-mangrove
|
|
6
|
+
* Compiled on: 2026-09-16T20:25:59.498Z
|
|
4
7
|
*/
|
|
5
8
|
/*! For license information please see Gallery.js.LICENSE.txt */
|
|
6
9
|
import{default as e,useCallback as r,useEffect as a,useRef as l,useState as t}from"react";var n={2694(e,r,a){var l=a(6925);function t(){}function n(){}n.resetWarningCache=t,e.exports=function(){function e(e,r,a,t,n,i){if(i!==l){var o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function r(){return e}e.isRequired=e;var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a}},5556(e,r,a){e.exports=a(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}};const i={};function o(e){const r=i[e];if(void 0!==r)return r.exports;const a=i[e]={exports:{}};return n[e](a,a.exports,o),a.exports}o.n=e=>{const r=e&&e.__esModule?()=>e.default:()=>e;return o.d(r,{a:r}),r},o.cw=e=>{var r;return()=>{if(e){var a=e;e=0,r={exports:{}},a.call(r.exports,r,r.exports)}return r.exports}},o.d=(e,r)=>{for(var a in r)o.o(r,a)&&!o.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:r[a]})},o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var s=o.cw(function(e,r){var a=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function t(e,r,l){var t=null;if(void 0!==l&&(t=""+l),void 0!==r.key&&(t=""+r.key),"key"in r)for(var n in l={},r)"key"!==n&&(l[n]=r[n]);else l=r;return r=l.ref,{$$typeof:a,type:e,key:t,ref:void 0!==r?r:null,props:l}}r.Fragment=l,r.jsx=t,r.jsxs=t}),c=o.cw(function(e,r){e.exports=s()}),d=o(5556),m=o.n(d);c();const g=(...e)=>e.filter(Boolean).length>0?e.filter(Boolean).join(" "):null,u={galleryAriaLabel:"Gallery",prevLabel:"Previous item",nextLabel:"Next item",loadingLabel:"Loading media"};function b({media:e,initialIndex:n=0,showThumbnails:i=!0,thumbnailPosition:o="left",showArrows:c=!0,arrowStyle:d="overlay",showDescription:m=!0,enableKeyboard:b=!0,loop:p=!1,onMediaChange:y,labels:h={}}){const{galleryAriaLabel:_,prevLabel:f,nextLabel:v,loadingLabel:x}={...u,...h},[w,j]=t(n),[N,k]=t(!1),L=l(null),T=l(null),O=l(null),S=l([]),I=l(null),P=l(null),C=e[w];a(()=>{"video"===C.type||"embed"===C.type?k(!0):k(!1)},[w,C.type]);const D=r(r=>{j(r),y&&y(r,e[r]),S.current[r]&&S.current[r].scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})},[e,y]),A=r(()=>{w<e.length-1?D(w+1):p&&D(0)},[w,e.length,D,p]),E=r(()=>{w>0?D(w-1):p&&D(e.length-1)},[w,D,p,e.length]),R=r(r=>{if(b)switch(r.key){case"ArrowLeft":r.preventDefault(),E();break;case"ArrowRight":r.preventDefault(),A();break;case"Home":r.preventDefault(),D(0);break;case"End":r.preventDefault(),D(e.length-1)}},[b,A,E,D,e.length]),M=g("mg-gallery","bottom"===o&&"mg-gallery--thumbnails-bottom");return(0,s().jsxs)("div",{ref:L,className:M,role:"region","aria-label":_,tabIndex:b?0:void 0,onKeyDown:R,children:[(0,s().jsxs)("div",{className:"mg-gallery__main",role:"group",children:[(0,s().jsxs)("div",{className:"mg-gallery__image-wrapper",onTouchStart:e=>{I.current=e.touches[0].clientX,P.current=null},onTouchMove:e=>{P.current=e.touches[0].clientX},onTouchEnd:()=>{if(!I.current||!P.current)return;const e=I.current-P.current;Math.abs(e)>50&&(e>0?A():E()),I.current=null,P.current=null},children:[(!C.type||"image"===C.type)&&(0,s().jsx)("img",{ref:T,src:C.src,alt:C.alt,className:"mg-gallery__image","aria-describedby":m&&C.description?"gallery-description":void 0}),"video"===C.type&&(0,s().jsxs)("video",{ref:T,src:C.src,className:"mg-gallery__image mg-gallery__video",controls:!0,poster:C.poster,onLoadedData:()=>k(!1),onLoadStart:()=>k(!0),"aria-describedby":m&&C.description?"gallery-description":void 0,children:[(0,s().jsx)("track",{kind:"captions"}),"Your browser does not support the video tag."]}),"embed"===C.type&&(0,s().jsx)("iframe",{ref:T,src:C.embedUrl||C.src,className:"mg-gallery__image mg-gallery__embed",title:C.title||C.alt,allowFullScreen:!0,onLoad:()=>k(!1),"aria-describedby":m&&C.description?"gallery-description":void 0}),"html"===C.type&&(0,s().jsx)("div",{ref:T,className:"mg-gallery__image mg-gallery__html",dangerouslySetInnerHTML:{__html:C.html},"aria-describedby":m&&C.description?"gallery-description":void 0}),N&&(0,s().jsx)("div",{className:"mg-gallery__loading","aria-live":"polite","aria-label":x,children:(0,s().jsx)("div",{className:"mg-gallery__spinner"})})]}),c&&"overlay"===d&&(0,s().jsxs)(s().Fragment,{children:[(0,s().jsx)("button",{className:"mg-gallery__arrow mg-gallery__arrow--prev",onClick:E,disabled:!p&&0===w,"aria-label":f,type:"button",children:"‹"}),(0,s().jsx)("button",{className:"mg-gallery__arrow mg-gallery__arrow--next",onClick:A,disabled:!p&&w===e.length-1,"aria-label":v,type:"button",children:"›"})]}),c&&"corner"===d&&(0,s().jsxs)("div",{className:"mg-gallery__arrow-controls",children:[(0,s().jsx)("button",{className:"mg-gallery__arrow-button mg-gallery__arrow-button--prev",onClick:E,disabled:!p&&0===w,"aria-label":f,type:"button",children:"‹"}),(0,s().jsx)("button",{className:"mg-gallery__arrow-button mg-gallery__arrow-button--next",onClick:A,disabled:!p&&w===e.length-1,"aria-label":v,type:"button",children:"›"})]})]}),m&&(C.title||C.description)&&(0,s().jsxs)("div",{className:"mg-gallery__description",id:"gallery-description",children:[C.title&&(0,s().jsx)("div",{className:"mg-gallery__title",children:C.title}),C.description&&(0,s().jsx)("p",{className:"mg-gallery__caption",children:C.description})]}),i&&(0,s().jsx)("div",{ref:O,className:"mg-gallery__thumbnails",role:"tablist","aria-label":"Gallery thumbnails",children:e.map((e,r)=>(0,s().jsxs)("button",{ref:e=>S.current[r]=e,className:g("mg-gallery__thumbnail",r===w&&"mg-gallery__thumbnail--active","html"===e.type&&!e.thumbnail&&"mg-gallery__thumbnail--html"),onClick:()=>D(r),role:"tab","aria-selected":r===w,"aria-current":r===w?"true":void 0,"aria-label":`View ${e.title||e.alt||"content"}`,type:"button",children:["html"===e.type&&!e.thumbnail&&e.html?(0,s().jsx)("div",{className:"mg-gallery__thumbnail-html-preview","aria-hidden":"true",children:(0,s().jsx)("div",{className:"mg-gallery__thumbnail-html-content",dangerouslySetInnerHTML:{__html:e.html}})}):e.thumbnail||e.src?(0,s().jsx)("img",{src:e.thumbnail||e.src,alt:"",loading:"lazy"}):(0,s().jsx)("span",{className:"mg-gallery__thumbnail-placeholder","aria-hidden":"true",children:"◫"}),("video"===e.type||"embed"===e.type)&&(0,s().jsx)("span",{className:"mg-gallery__thumbnail-indicator","aria-hidden":"true",children:"▶"})]},e.id))})]})}b.propTypes={media:m().arrayOf(m().shape({id:m().string.isRequired,type:m().oneOf(["image","video","embed","html"]),src:m().string,alt:m().string,title:m().string,description:m().string,thumbnail:m().string,poster:m().string,embedUrl:m().string,html:m().string})).isRequired,initialIndex:m().number,showThumbnails:m().bool,thumbnailPosition:m().oneOf(["left","bottom"]),showArrows:m().bool,arrowStyle:m().oneOf(["overlay","corner"]),showDescription:m().bool,enableKeyboard:m().bool,loop:m().bool,onMediaChange:m().func,labels:m().shape({galleryAriaLabel:m().string,prevLabel:m().string,nextLabel:m().string,loadingLabel:m().string})};const p=e.memo(b);function y(e){const{dataset:r}=e,a={initialIndex:r.initialIndex?parseInt(r.initialIndex,10):0,showThumbnails:"false"!==r.showThumbnails,thumbnailPosition:r.thumbnailPosition||"left",showArrows:"false"!==r.showArrows,arrowStyle:r.arrowStyle||"overlay",showDescription:"false"!==r.showDescription,enableKeyboard:"false"!==r.enableKeyboard,loop:"true"===r.loop};try{a.media=r.media?JSON.parse(r.media):[]}catch{a.media=[]}return a}export{p as Gallery,p as default,y as fromElement};
|
package/components/Hero.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* UNDRR Mangrove component library
|
|
3
|
+
* Storybook: https://preventionweb.github.io/undrr-mangrove/
|
|
4
|
+
* LLMs context: https://preventionweb.github.io/undrr-mangrove/llms.txt
|
|
5
|
+
* Repository: https://github.com/unisdr/undrr-mangrove
|
|
6
|
+
* Compiled on: 2026-09-16T20:25:59.498Z
|
|
4
7
|
*/
|
|
5
8
|
/*! For license information please see Hero.js.LICENSE.txt */
|
|
6
9
|
import"react";var e={2694(e,r,t){var a=t(6925);function n(){}function i(){}i.resetWarningCache=n,e.exports=function(){function e(e,r,t,n,i,o){if(o!==a){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function r(){return e}e.isRequired=e;var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:i,resetWarningCache:n};return t.PropTypes=t,t}},5556(e,r,t){e.exports=t(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}};const r={};function t(a){const n=r[a];if(void 0!==n)return n.exports;const i=r[a]={exports:{}};return e[a](i,i.exports,t),i.exports}t.n=e=>{const r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},t.cw=e=>{var r;return()=>{if(e){var t=e;e=0,r={exports:{}},t.call(r.exports,r,r.exports)}return r.exports}},t.d=(e,r)=>{for(var a in r)t.o(r,a)&&!t.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:r[a]})},t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var a=t.cw(function(e,r){var t=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function n(e,r,a){var n=null;if(void 0!==a&&(n=""+a),void 0!==r.key&&(n=""+r.key),"key"in r)for(var i in a={},r)"key"!==i&&(a[i]=r[i]);else a=r;return r=a.ref,{$$typeof:t,type:e,key:n,ref:void 0!==r?r:null,props:a}}r.Fragment=a,r.jsx=n,r.jsxs=n}),n=t.cw(function(e,r){e.exports=a()}),i=t(5556),o=t.n(i);function s({label:e,Type:r="Primary",Variant:t="Default",Outline:n=!1,State:i="Default",href:o="#",onClick:s,className:l,...m}){const c="Disabled"===i,d=["mg-button","CTA"===t&&"mg-button-cta","mg-button-"+("Secondary"===r?"secondary":"primary"),n&&"mg-button-outline",c&&"disabled",l].filter(Boolean).join(" ");return(0,a().jsx)("a",{className:d,...m,...c?{"aria-disabled":"true",tabIndex:-1}:{href:o,onClick:s},children:e})}n(),s.propTypes={label:o().string.isRequired,Type:o().oneOf(["Primary","Secondary"]),Variant:o().oneOf(["Default","CTA"]),Outline:o().bool,State:o().oneOf(["Default","Disabled"]),href:o().string,onClick:o().func,className:o().string};const l=(...e)=>e.filter(Boolean).length>0?e.filter(Boolean).join(" "):null,m={primary:"",secondary:"secondary",tertiary:"tertiary",quaternary:"quaternary"},c={"2/3":"2-3","1/2":"1-2","1/3":"1-3"};function d({item:e,HeadingTag:r}){return e.link?(0,a().jsx)(r,{className:"mg-hero__title",children:(0,a().jsx)("a",{href:e.link,dangerouslySetInnerHTML:{__html:e.title}})}):(0,a().jsx)(r,{className:"mg-hero__title",dangerouslySetInnerHTML:{__html:e.title}})}function g({media:e}){if(!e)return null;const r=e.type||"image";return"video"===r?(0,a().jsx)("div",{className:"mg-hero__media mg-hero__media--video",children:(0,a().jsx)("iframe",{src:e.src,title:e.title||"Embedded video",className:"mg-hero__media-iframe",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowFullScreen:!0})}):"html"===r?(0,a().jsx)("div",{className:"mg-hero__media mg-hero__media--html",dangerouslySetInnerHTML:{__html:e.html||""}}):(0,a().jsx)("div",{className:"mg-hero__media",children:(0,a().jsx)("img",{src:e.src,alt:e.alt||"",className:"mg-hero__media-img"})})}function u({item:e,HeadingTag:r}){const t=e.buttons||[e.primary_button&&{label:e.primary_button,type:"Primary"},e.secondary_button&&{label:e.secondary_button,type:"Secondary"}].filter(Boolean);return(0,a().jsxs)("article",{className:"mg-hero__content",children:[e.logo?.src&&(0,a().jsx)("img",{className:"mg-hero__logo",src:e.logo.src,alt:e.logo.alt||""}),(0,a().jsx)("div",{className:"mg-hero__meta",children:e.label&&(0,a().jsx)("span",{className:"mg-hero__label",children:e.label})}),(0,a().jsx)(d,{item:e,HeadingTag:r}),(0,a().jsx)("div",{className:"mg-hero__summaryText",children:(0,a().jsx)("span",{dangerouslySetInnerHTML:{__html:e.summaryText}})}),(0,a().jsx)("div",{className:"mg-hero__meta meta-detail",children:e.detail&&(0,a().jsx)("span",{className:"mg-hero__label detail",children:e.detail})}),t.length>0&&(0,a().jsx)("div",{className:"mg-hero__buttons",children:t.map((e,r)=>(0,a().jsx)(s,{Type:e.type,Variant:"CTA",label:e.label,href:e.url,onClick:e.onClick,target:e.target,rel:e.rel},`${e.label}-${r}`))})]})}function p({data:e,variant:r="primary",layout:t="background",headingLevel:n="h1",split:i="2/3",size:o="default",contained:s=!1}){const d=m[r],p=n;if("split"===t){const r=c[i]||"2-3";return(0,a().jsx)(a().Fragment,{children:e.map((e,t)=>(0,a().jsx)("section",{className:l("mg-hero","mg-hero--split",`mg-hero--split-${r}`,"immersive"===o&&"mg-hero--immersive",s&&"mg-hero--contained",d&&`mg-hero--${d}`),children:(0,a().jsxs)("div",{className:l("mg-hero__split-grid","mg-container",!e.media&&"mg-hero__split-grid--no-media"),children:[(0,a().jsx)(u,{item:e,HeadingTag:p}),e.media&&(0,a().jsx)(g,{media:e.media})]})},t))})}return(0,a().jsx)(a().Fragment,{children:e.map((e,r)=>(0,a().jsx)("section",{className:l("mg-hero","immersive"===o&&"mg-hero--immersive",s&&"mg-hero--contained",d&&`mg-hero--${d}`),style:{backgroundImage:`url(${e.imgback})`},children:(0,a().jsx)("div",{className:"mg-hero__overlay",children:(0,a().jsx)(u,{item:e,HeadingTag:p})})},r))})}p.propTypes={data:o().arrayOf(o().shape({imgback:o().string,label:o().string,title:o().string.isRequired,link:o().string,summaryText:o().string,detail:o().string,primary_button:o().string,secondary_button:o().string,logo:o().shape({src:o().string.isRequired,alt:o().string}),buttons:o().arrayOf(o().shape({label:o().string.isRequired,url:o().string,type:o().oneOf(["Primary","Secondary"]),onClick:o().func,target:o().string,rel:o().string})),media:o().shape({type:o().oneOf(["image","video","html"]),src:o().string,alt:o().string,title:o().string,html:o().string})})).isRequired,variant:o().oneOf(["primary","secondary","tertiary","quaternary"]),layout:o().oneOf(["background","split"]),headingLevel:o().oneOf(["h1","h2","h3"]),split:o().oneOf(["2/3","1/2","1/3"]),size:o().oneOf(["default","immersive"]),contained:o().bool};export{p as Hero,m as variantOptions};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* UNDRR Mangrove component library
|
|
3
|
+
* Storybook: https://preventionweb.github.io/undrr-mangrove/
|
|
4
|
+
* LLMs context: https://preventionweb.github.io/undrr-mangrove/llms.txt
|
|
5
|
+
* Repository: https://github.com/unisdr/undrr-mangrove
|
|
6
|
+
* Compiled on: 2026-09-16T20:25:59.498Z
|
|
4
7
|
*/
|
|
5
8
|
/*! For license information please see HighlightBox.js.LICENSE.txt */
|
|
6
9
|
import"react";var e={2694(e,r,t){var o=t(6925);function n(){}function a(){}a.resetWarningCache=n,e.exports=function(){function e(e,r,t,n,a,i){if(i!==o){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function r(){return e}e.isRequired=e;var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:a,resetWarningCache:n};return t.PropTypes=t,t}},5556(e,r,t){e.exports=t(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}};const r={};function t(o){const n=r[o];if(void 0!==n)return n.exports;const a=r[o]={exports:{}};return e[o](a,a.exports,t),a.exports}t.n=e=>{const r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},t.cw=e=>{var r;return()=>{if(e){var t=e;e=0,r={exports:{}},t.call(r.exports,r,r.exports)}return r.exports}},t.d=(e,r)=>{for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var o=t.cw(function(e,r){var t=Symbol.for("react.transitional.element");Symbol.for("react.fragment"),r.jsx=function(e,r,o){var n=null;if(void 0!==o&&(n=""+o),void 0!==r.key&&(n=""+r.key),"key"in r)for(var a in o={},r)"key"!==a&&(o[a]=r[a]);else o=r;return r=o.ref,{$$typeof:t,type:e,key:n,ref:void 0!==r?r:null,props:o}}}),n=t.cw(function(e,r){e.exports=o()}),a=t(5556),i=t.n(a);function s({children:e,variant:r="default",centered:t=!1,float:n=null,className:a=""}){const i=["mg-highlight-box","default"!==r&&`mg-highlight-box--${r}`,t&&"mg-highlight-box--centered",n&&`mg-highlight-box--float-${n}`,a].filter(Boolean).join(" ");return(0,o().jsx)("div",{className:i,children:e})}n(),s.propTypes={children:i().node,variant:i().oneOf(["default","primary","secondary"]),centered:i().bool,float:i().oneOf(["start","end"]),className:i().string};const c=s;export{s as HighlightBox,c as default};
|