@worldresources/wri-design-systems 2.148.12 → 2.149.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +15 -15
- package/dist/index.esm.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -3555,7 +3555,7 @@ function Zd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3555
3555
|
padding: 0px;
|
|
3556
3556
|
padding-top: 8px;
|
|
3557
3557
|
color: ${i?h("neutral",500):"inherit"};
|
|
3558
|
-
`),children:o.children}):null]},`${o.label}-${o.value}`);var i,a}))})}),exports.CloseButton=oe,exports.ClusterPoint=({onClick:e,triggerRef:t,showFocusState:n,count:r,mode:i,variant:a="cluster"})=>o.jsx(kn,{count:r,mode:i,onClick:e,ref:t,showFocusState:n,variant:a}),exports.ExtendableCard=({children:n,header:r,footer:o})=>t.jsx(e.Box,{css:Ji,children:t.jsx(e.Accordion.Root,{multiple:!0,children:t.jsxs(e.Accordion.Item,{value:"extendable-card-item",children:[t.jsxs(e.Accordion.ItemTrigger,{css:Qi,alignItems:"center",children:[t.jsx(e.Flex,{gap:3,flex:"1",overflow:"hidden",alignItems:"center",children:r}),t.jsx(e.Accordion.ItemIndicator,{children:t.jsx($,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsxs(e.Accordion.ItemContent,{children:[n,o]})]})})}),exports.Footer=({children:e,label:n="© World Resources Institute",fixed:r,filled:o,maxWidth:i})=>{const a=(new Date).getFullYear();return t.jsx("footer",{css:$h(r,o),children:t.jsxs("div",{css:Sh(i),children:[t.jsx("div",{children:t.jsx(I,{height:"32px",width:"91px"})}),t.jsx("div",{css:Eh,children:e}),t.jsx("div",{children:t.jsxs("p",{css:Rh,children:[n," ",a]})})]})})},exports.IconButton=re,exports.IconMarker=kn,exports.IconMarkers=$n,exports.InlineMessage=({label:e,caption:n,variant:r,size:o="large",icon:i=t.jsx(k,{height:"16px",width:"16px"}),onActionClick:a,actionLabel:s,isButtonRight:l})=>{let c=Lf;return"info-grey"===r?c=Tf:"success"===r?c=Pf:"warning"===r?c=Mf:"error"===r&&(c=_f),t.jsxs("div",{css:[Sf(o,l),c],"aria-roledescription":"Note",children:[t.jsxs("div",{children:[t.jsxs("div",{css:Ef,children:[i,t.jsx("p",{css:Rf(o),children:e})]}),t.jsx("p",{css:Of(o),children:n})]}),s?t.jsx(b,{label:s,variant:"info-white"===r||"info-grey"===r?"primary":"secondary",size:"large"===o?"default":"small",onClick:a}):null]})},exports.InputWithUnits=({label:r,caption:o,errorMessage:i,units:a,unitsPosition:s="end",defaultUnit:l="",defaultValue:c="",onChange:u,required:d,disabled:p})=>{const[h,f]=n.useState(c),[x,g]=n.useState(l?[l]:[a[0].value]),v=(e,t)=>{u&&u("end"===s?""+(t?`${h} ${e}`:`${e} ${x}`):""+(t?`${e} ${h}`:`${x} ${e}`))};return t.jsxs("div",{css:it,children:[i?t.jsx("div",{css:lt}):null,t.jsxs("div",{style:{marginLeft:i?"19px":"0px"},children:[t.jsxs("p",{css:at(p),"aria-label":r,children:[d?t.jsx("span",{children:"*"}):null,r]}),t.jsx("p",{css:st(p),"aria-label":o,children:o}),i?t.jsx("p",{css:ct,"aria-label":i,children:i}):null,t.jsxs(e.Group,{css:ut(!!i,s),attached:!0,children:["start"===s?t.jsx(Ft,{placeholder:"",value:x,items:a,disabled:p,onChange:e=>{g(e),v(e?.[0],!0)}}):null,t.jsx(vt,{type:"number",value:h,disabled:p,onChange:e=>{f(e.target.value),v(e.target.value)}}),"end"===s?t.jsx(Ft,{placeholder:"",value:x,items:a,disabled:p,onChange:e=>{g(e),v(e?.[0],!0)}}):null]})]})]})},exports.ItemCount=Oi,exports.LayerGroup=({label:r,caption:o,value:i,layerItems:a,onChangeForRadioVariant:s})=>{const[l,c]=n.useState({}),[u]=n.useState((e=>{const t=e.find((e=>"radio"===e.variant&&e.isDefaultSelected));return t?.name})(a));n.useEffect((()=>{let e={...l};a.forEach((t=>{t.isDefaultSelected&&(e={...e,["radio"===t.variant?r:t.name]:t.isDefaultSelected})})),c(e)}),[]);const d=(e,t,n,r)=>{const o={...l,[e]:t};c(o),n&&n(e,t,r)},p=Object.values(l).filter((e=>!0===e)).length,h=`${r}, ${p} Active layers on the map${o?`, ${o}`:""}`;return t.jsxs(e.Accordion.Item,{value:i,width:"100%",children:[t.jsxs(e.Accordion.ItemTrigger,{css:Ho,alignItems:"flex-start","aria-label":h,children:[t.jsxs(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:[t.jsxs("span",{css:Fo,children:[r,t.jsx(zt,{label:`${p} Active`,size:"small",variant:p>0?"success":"info-grey"})]}),t.jsx("div",{css:Zo,children:o})]}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx($,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{paddingLeft:"16px",paddingRight:"16px",children:t.jsx(Be,{name:r,defaultValue:u,customGap:"0px",onChange:(e,t)=>d(e,!!t,s,t),children:a.map((e=>t.jsx(Yo,{...e,onChange:(t,n)=>d(t,n,e.onChange)},e.label)))})})]})},exports.LayerGroupContainer=({children:n,defaultValue:r,...o})=>t.jsx("div",{css:Bo,style:{width:"100%"},children:t.jsx(e.Accordion.Root,{css:{},defaultValue:r,multiple:!0,...o,children:n})}),exports.LayerItem=Yo,exports.LayerParameters=({label:r,children:o,openedByDefault:i})=>t.jsx("div",{children:t.jsx(e.Accordion.Root,{defaultValue:i?[r]:[],multiple:!0,children:t.jsxs(e.Accordion.Item,{css:Ko,value:r,children:[t.jsxs(e.Accordion.ItemTrigger,{css:Jo,children:[t.jsx(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:t.jsx("p",{css:Qo,children:r})}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx($,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{css:ei,children:n.Children.map(o,(e=>t.jsx("div",{className:"ds-layer-parameters-item-child",children:e})))})]})})}),exports.LegendItem=({layerName:e,dataUnit:n,onDrag:r,onUpClick:o,onDownClick:i,onRemoveClick:a,children:s,onInfoClick:l,onOpacityChanged:c})=>t.jsxs("div",{css:ti,children:[t.jsxs("div",{css:ni,children:[t.jsx(re,{icon:t.jsx(P,{}),"aria-label":"Drag and drop","aria-hidden":!0,onClick:r,style:{display:"none",marginBottom:"12px"}}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:[t.jsx(re,{icon:t.jsx($,{rotate:"180"}),"aria-label":"Up",onClick:o}),t.jsx(re,{icon:t.jsx($,{}),"aria-label":"Down",onClick:i})]})]}),t.jsxs("div",{style:{width:"100%"},children:[t.jsxs("div",{css:ri,children:[t.jsxs("div",{children:[t.jsx("h3",{css:oi,children:e}),t.jsx("p",{css:ii,children:n})]}),t.jsx(b,{label:"Remove",size:"small",variant:"secondary",rightIcon:t.jsx(R,{}),onClick:a})]}),s,t.jsxs("div",{css:ai,children:[t.jsx(b,{label:"About data",size:"small",variant:"secondary",leftIcon:t.jsx(k,{}),onClick:l}),t.jsx(di,{defaultValue:80,onOpacityChanged:c})]})]})]}),exports.List=({items:n,noBorder:r})=>t.jsx(e.Box,{css:Li(r),children:n.map((e=>t.jsx(Ni,{id:e.id,icon:e.icon,label:e.label,caption:e.caption,value:e.value,variant:e.variant??"data",onItemClick:e.onItemClick},e.id??e.label)))}),exports.MapControlsToolbar=({onZoomInClick:e,onZoomOutClick:t,onExpandClick:n,onShareClick:r,onPrintClick:i,onSettingsClick:a,onQuestionClick:s,vertical:l,expanded:c,showExpandedToggle:u,ariaLabel:d})=>{const p=[{icon:o.jsx(V,{}),label:"Zoom in",ariaLabel:"zoom in",onClick:e},{icon:o.jsx(A,{}),label:"Zoom out",ariaLabel:"zoom out",onClick:t,gap:!0},{icon:o.jsx(z,{}),label:"Expand",ariaLabel:"expand",onClick:n,gap:!0},{icon:o.jsx(B,{}),label:"Share",ariaLabel:"share",onClick:r,gap:!0},{icon:o.jsx(H,{}),label:"Print",ariaLabel:"print",onClick:i,gap:!0},{icon:o.jsx(F,{}),label:"Settings",ariaLabel:"settings",onClick:a,gap:!0},{icon:o.jsx(Z,{}),label:"Help",ariaLabel:"question",onClick:s}];return o.jsx(xe,{items:p,vertical:l,expanded:c,showExpandedToggle:u,ariaLabel:d||"Map controls toolbar"})},exports.MapPopUp=({open:e,onOpenChange:r,anchorRef:o,header:i,content:a,footer:s,placement:c="bottom",offset:u=30,closeOnEscape:d=!0,closeOnOutsideClick:p=!1})=>{const h=n.useRef(null),{refs:f,floatingStyles:x,context:g,middlewareData:v,placement:m}=Po({open:e,onOpenChange:r,placement:c,whileElementsMounted:Qr,middleware:[po(u),(b={fallbackAxisSideDirection:"start"},{...no(b),options:[b,y]}),ho({padding:8}),fo({element:h})]});var b,y;n.useEffect((()=>{o?.current&&f.setReference(o.current)}),[o,f]);const w=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:u="pointerdown",referencePress:d=!1,referencePressEvent:p="pointerdown",ancestorScroll:h=!1,bubbles:f,capture:x}=t,g=Eo(),v=Pr("function"==typeof c?c:()=>!1),m="function"==typeof c?v:c,b=l.useRef(!1),{escapeKey:y,outsidePress:w}=Lo(f),{escapeKey:C,outsidePress:j}=Lo(x),k=l.useRef(!1),$=Pr((e=>{var t;if(!n||!a||!s||"Escape"!==e.key)return;if(k.current)return;const o=null==(t=i.current.floatingContext)?void 0:t.nodeId,l=g?Or(g.nodesRef.current,o):[];if(!y&&(e.stopPropagation(),l.length>0)){let e=!0;if(l.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)})),!e)return}r(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")})),S=Pr((e=>{var t;const n=()=>{var t;$(e),null==(t=Sr(e))||t.removeEventListener("keydown",n)};null==(t=Sr(e))||t.addEventListener("keydown",n)})),E=Pr((e=>{var t;const n=i.current.insideReactTree;i.current.insideReactTree=!1;const a=b.current;if(b.current=!1,"click"===u&&a)return;if(n)return;if("function"==typeof m&&!m(e))return;const s=Sr(e),l="[data-floating-ui-inert]",c=Rr(o.floating).querySelectorAll(l);let d=Tn(s)?s:null;for(;d&&!qn(d);){const e=Xn(d);if(qn(e)||!Tn(e))break;d=e}if(c.length&&Tn(s)&&!s.matches("html,body")&&!$r(s,o.floating)&&Array.from(c).every((e=>!$r(d,e))))return;if(Pn(s)&&L){const t=qn(s),n=Gn(s),r=/auto|scroll/,o=t||r.test(n.overflowX),i=t||r.test(n.overflowY),a=o&&s.clientWidth>0&&s.scrollWidth>s.clientWidth,l=i&&s.clientHeight>0&&s.scrollHeight>s.clientHeight,c="rtl"===n.direction,u=l&&(c?e.offsetX<=s.offsetWidth-s.clientWidth:e.offsetX>s.clientWidth),d=a&&e.offsetY>s.clientHeight;if(u||d)return}const p=null==(t=i.current.floatingContext)?void 0:t.nodeId,h=g&&Or(g.nodesRef.current,p).some((t=>{var n;return Er(e,null==(n=t.context)?void 0:n.elements.floating)}));if(Er(e,o.floating)||Er(e,o.domReference)||h)return;const f=g?Or(g.nodesRef.current,p):[];if(f.length>0){let e=!0;if(f.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)})),!e)return}r(!1,e,"outside-press")})),R=Pr((e=>{var t;const n=()=>{var t;E(e),null==(t=Sr(e))||t.removeEventListener(u,n)};null==(t=Sr(e))||t.addEventListener(u,n)}));l.useEffect((()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=y,i.current.__outsidePressBubbles=w;let e=-1;function t(e){r(!1,e,"ancestor-scroll")}function l(){window.clearTimeout(e),k.current=!0}function c(){e=window.setTimeout((()=>{k.current=!1}),Zn()?5:0)}const d=Rr(o.floating);s&&(d.addEventListener("keydown",C?S:$,C),d.addEventListener("compositionstart",l),d.addEventListener("compositionend",c)),m&&d.addEventListener(u,j?R:E,j);let p=[];return h&&(Tn(o.domReference)&&(p=Kn(o.domReference)),Tn(o.floating)&&(p=p.concat(Kn(o.floating))),!Tn(o.reference)&&o.reference&&o.reference.contextElement&&(p=p.concat(Kn(o.reference.contextElement)))),p=p.filter((e=>{var t;return e!==(null==(t=d.defaultView)?void 0:t.visualViewport)})),p.forEach((e=>{e.addEventListener("scroll",t,{passive:!0})})),()=>{s&&(d.removeEventListener("keydown",C?S:$,C),d.removeEventListener("compositionstart",l),d.removeEventListener("compositionend",c)),m&&d.removeEventListener(u,j?R:E,j),p.forEach((e=>{e.removeEventListener("scroll",t)})),window.clearTimeout(e)}}),[i,o,s,m,u,n,r,h,a,y,w,$,C,S,E,j,R]),l.useEffect((()=>{i.current.insideReactTree=!1}),[i,m,u]);const O=l.useMemo((()=>({onKeyDown:$,...d&&{[Ro[p]]:e=>{r(!1,e.nativeEvent,"reference-press")},..."click"!==p&&{onClick(e){r(!1,e.nativeEvent,"reference-press")}}}})),[$,r,d,p]),L=l.useMemo((()=>({onKeyDown:$,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[Oo[u]]:()=>{i.current.insideReactTree=!0}})),[$,u,i]);return l.useMemo((()=>a?{reference:O,floating:L}:{}),[a,O,L])}(g,{escapeKey:d,outsidePress:p}),C=Do(g,{role:"dialog"}),{getFloatingProps:j}=function(e){void 0===e&&(e=[]);const t=e.map((e=>null==e?void 0:e.reference)),n=e.map((e=>null==e?void 0:e.floating)),r=e.map((e=>null==e?void 0:e.item)),o=l.useCallback((t=>Mo(t,e,"reference")),t),i=l.useCallback((t=>Mo(t,e,"floating")),n),a=l.useCallback((t=>Mo(t,e,"item")),r);return l.useMemo((()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a})),[o,i,a])}([w,C]),{x:k,y:$}=v.arrow??{x:null,y:null},S={top:"bottom",right:"left",bottom:"top",left:"right"}[m.split("-")[0]];if(!e)return null;let E=u-1,R=4;return"left"!==S&&"right"!==S||(E=4,R=u-1),t.jsxs(t.Fragment,{children:[t.jsxs("div",{ref:f.setFloating,style:x,"aria-modal":!0,...j(),css:Io,children:[t.jsxs("div",{css:No,children:[i,t.jsx(oe,{onClick:()=>r(!1),className:"ds-map-pop-up-close-button","aria-label":"Close"})]}),t.jsx("div",{css:Vo,children:a}),s?t.jsx("div",{css:Ao,children:s}):null,t.jsx("div",{ref:h,css:zo(E,R,k,$,S,u)})]}),t.jsx("div",{className:"fixed inset-0 z-[999] bg-black/20 backdrop-blur-[1px]",onClick:()=>p&&r(!1)})]})},exports.Menu=pe,exports.MobileTabBar=({defaultValue:r,tabs:o,onTabClick:i,hideLabels:a,activationMode:s="manual"})=>{const l=o.length,[c,u]=n.useState((()=>Mh(o,r)));return t.jsx("div",{css:Oh,children:t.jsx(e.Tabs.Root,{width:"full",defaultValue:r||o?.[0]?.value,onValueChange:({value:e})=>(e=>{const t=Mh(o,e);u(t),i&&i(e)})(e),activationMode:s,children:t.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:o.map(((n,r)=>{const{label:o,icon:i,bagdeCount:s,"aria-label":u,"aria-describedby":d,disabled:p,...h}=n,f=`${n.value}-str-status`,x=[`tab ${r+1} of ${l}`,c===r?"selected":"not selected"];p&&x.push("disabled");const g=[d,f].filter(Boolean).join(" ")||void 0;return t.jsxs(e.Tabs.Trigger,{css:Lh,"aria-label":u||o,"aria-disabled":!!p||void 0,"aria-describedby":g,disabled:p,...h,children:[t.jsxs("div",{css:Th,children:[i,s?t.jsx("div",{css:Ph,className:"ds-badge-count",children:s}):null]}),a?null:t.jsx("p",{children:o}),t.jsx(e.VisuallyHidden,{id:f,children:x.join(", ")})]},n.value)}))})})})},exports.Modal=({header:n,content:r,footer:o,size:i="medium",draggable:a,blocking:s,open:l,onClose:c})=>l?t.jsx(e.Dialog.Root,{open:l,onOpenChange:c,placement:"center",scrollBehavior:"inside",closeOnInteractOutside:!a&&!s,preventScroll:!a&&!s,closeOnEscape:!s,defaultOpen:!0,children:t.jsxs(e.Portal,{children:[a?null:t.jsx(e.Dialog.Backdrop,{}),t.jsx(ts,{disabled:!a,children:t.jsx(e.Dialog.Positioner,{children:t.jsxs(e.Dialog.Content,{css:ns(i),children:[t.jsxs(e.Dialog.Header,{css:rs,children:[n,s?null:t.jsx(e.Dialog.CloseTrigger,{css:os,asChild:!0,children:t.jsx(oe,{})})]}),t.jsx(e.Dialog.Body,{css:is,children:r}),o?t.jsx(e.Dialog.Footer,{padding:"12px",children:o}):null]})})})]})}):null,exports.MultiActionButton=({variant:r="primary",size:o="default",mainActionLabel:i,mainActionOnClick:a=()=>{},otherActions:s=[],disabled:l,...c})=>{const[u,d]=n.useState(!1),p=l?`${i} action button with menu, disabled`:void 0;return t.jsxs(e.Group,{css:be,attached:!0,tabIndex:l?0:void 0,"aria-disabled":l,"aria-label":p,role:"group",children:[t.jsx(b,{css:{},label:i,variant:r,size:o,onClick:a,disabled:l,...c}),t.jsxs(e.Menu.Root,{onOpenChange:({open:e})=>d(e),positioning:{placement:"bottom-end"},children:[t.jsx(e.Menu.Trigger,{css:ve(r),"data-group-item":!0,"data-last":!0,asChild:!0,children:t.jsx(b,{variant:r,size:o,leftIcon:t.jsx($,{rotate:u?"180":"0",color:h("accessible","text-on-primary-mids")||h("primary",900)}),disabled:l})}),t.jsx(ye,{children:s.map((({label:n,value:r,onClick:i})=>t.jsx(e.Menu.Item,{css:me(o),onClick:i,value:r,children:n},r)))})]})]})},exports.Navbar=({logo:e,linkRouter:o,pathname:i,navigationSection:a,utilitySection:s,actionsSection:l,maxWidth:c,fixed:u,onNavbarHeightChange:d})=>{const p=n.useRef(null),f=n.useRef(null),x=n.useRef(null),[g,v]=n.useState(!1),[m,y]=n.useState(-1),[w,C]=n.useState("undefined"!=typeof window&&window?.innerWidth<=tf),[j,k]=n.useState(!1),$=o,S=n.useCallback((()=>{if(f.current&&p.current&&x.current){const e=p.current.getBoundingClientRect(),t=f.current.getBoundingClientRect(),n=x.current.getBoundingClientRect();t.width,e.width,window.innerWidth<=tf||window.innerWidth<=m?(d?.(96),v(!0)):window.innerWidth>tf&&window.innerWidth<=1440?e.right>=t.left?(d?.(96),v(!0),y(window.innerWidth)):window.innerWidth>m&&(d?.(48),v(!1),y(-1)):(d?.(48),v(!1),y(-1)),g&&(window.innerWidth<=tf||n.right>=t.left?(C(!0),d?.(48)):(C(!1),d?.(96)))}}),[m,g]);return n.useEffect((()=>(S(),window.addEventListener("resize",S),()=>{window.removeEventListener("resize",S)})),[S]),t.jsxs("nav",{css:_h(g&&!w,u),children:[t.jsxs("div",{css:Ih(g&&!w,c),children:[t.jsxs("div",{css:(E=g&&!w,r.css`
|
|
3558
|
+
`),children:o.children}):null]},`${o.label}-${o.value}`);var i,a}))})}),exports.CloseButton=oe,exports.ClusterPoint=({onClick:e,triggerRef:t,showFocusState:n,count:r,mode:i,variant:a="cluster"})=>o.jsx(kn,{count:r,mode:i,onClick:e,ref:t,showFocusState:n,variant:a}),exports.ExtendableCard=({children:n,header:r,footer:o})=>t.jsx(e.Box,{css:Ji,children:t.jsx(e.Accordion.Root,{multiple:!0,children:t.jsxs(e.Accordion.Item,{value:"extendable-card-item",children:[t.jsxs(e.Accordion.ItemTrigger,{css:Qi,alignItems:"center",children:[t.jsx(e.Flex,{gap:3,flex:"1",overflow:"hidden",alignItems:"center",children:r}),t.jsx(e.Accordion.ItemIndicator,{children:t.jsx($,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsxs(e.Accordion.ItemContent,{children:[n,o]})]})})}),exports.Footer=({children:e,label:n="© World Resources Institute",fixed:r,filled:o,maxWidth:i})=>{const a=(new Date).getFullYear();return t.jsx("footer",{css:$h(r,o),children:t.jsxs("div",{css:Sh(i),children:[t.jsx("div",{children:t.jsx(I,{height:"32px",width:"91px"})}),t.jsx("div",{css:Eh,children:e}),t.jsx("div",{children:t.jsxs("p",{css:Rh,children:[n," ",a]})})]})})},exports.IconButton=re,exports.InlineMessage=({label:e,caption:n,variant:r,size:o="large",icon:i=t.jsx(k,{height:"16px",width:"16px"}),onActionClick:a,actionLabel:s,isButtonRight:l})=>{let c=Lf;return"info-grey"===r?c=Tf:"success"===r?c=Pf:"warning"===r?c=Mf:"error"===r&&(c=_f),t.jsxs("div",{css:[Sf(o,l),c],"aria-roledescription":"Note",children:[t.jsxs("div",{children:[t.jsxs("div",{css:Ef,children:[i,t.jsx("p",{css:Rf(o),children:e})]}),t.jsx("p",{css:Of(o),children:n})]}),s?t.jsx(b,{label:s,variant:"info-white"===r||"info-grey"===r?"primary":"secondary",size:"large"===o?"default":"small",onClick:a}):null]})},exports.InputWithUnits=({label:r,caption:o,errorMessage:i,units:a,unitsPosition:s="end",defaultUnit:l="",defaultValue:c="",onChange:u,required:d,disabled:p})=>{const[h,f]=n.useState(c),[x,g]=n.useState(l?[l]:[a[0].value]),v=(e,t)=>{u&&u("end"===s?""+(t?`${h} ${e}`:`${e} ${x}`):""+(t?`${e} ${h}`:`${x} ${e}`))};return t.jsxs("div",{css:it,children:[i?t.jsx("div",{css:lt}):null,t.jsxs("div",{style:{marginLeft:i?"19px":"0px"},children:[t.jsxs("p",{css:at(p),"aria-label":r,children:[d?t.jsx("span",{children:"*"}):null,r]}),t.jsx("p",{css:st(p),"aria-label":o,children:o}),i?t.jsx("p",{css:ct,"aria-label":i,children:i}):null,t.jsxs(e.Group,{css:ut(!!i,s),attached:!0,children:["start"===s?t.jsx(Ft,{placeholder:"",value:x,items:a,disabled:p,onChange:e=>{g(e),v(e?.[0],!0)}}):null,t.jsx(vt,{type:"number",value:h,disabled:p,onChange:e=>{f(e.target.value),v(e.target.value)}}),"end"===s?t.jsx(Ft,{placeholder:"",value:x,items:a,disabled:p,onChange:e=>{g(e),v(e?.[0],!0)}}):null]})]})]})},exports.ItemCount=Oi,exports.LayerGroup=({label:r,caption:o,value:i,layerItems:a,onChangeForRadioVariant:s})=>{const[l,c]=n.useState({}),[u]=n.useState((e=>{const t=e.find((e=>"radio"===e.variant&&e.isDefaultSelected));return t?.name})(a));n.useEffect((()=>{let e={...l};a.forEach((t=>{t.isDefaultSelected&&(e={...e,["radio"===t.variant?r:t.name]:t.isDefaultSelected})})),c(e)}),[]);const d=(e,t,n,r)=>{const o={...l,[e]:t};c(o),n&&n(e,t,r)},p=Object.values(l).filter((e=>!0===e)).length,h=`${r}, ${p} Active layers on the map${o?`, ${o}`:""}`;return t.jsxs(e.Accordion.Item,{value:i,width:"100%",children:[t.jsxs(e.Accordion.ItemTrigger,{css:Ho,alignItems:"flex-start","aria-label":h,children:[t.jsxs(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:[t.jsxs("span",{css:Fo,children:[r,t.jsx(zt,{label:`${p} Active`,size:"small",variant:p>0?"success":"info-grey"})]}),t.jsx("div",{css:Zo,children:o})]}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx($,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{paddingLeft:"16px",paddingRight:"16px",children:t.jsx(Be,{name:r,defaultValue:u,customGap:"0px",onChange:(e,t)=>d(e,!!t,s,t),children:a.map((e=>t.jsx(Yo,{...e,onChange:(t,n)=>d(t,n,e.onChange)},e.label)))})})]})},exports.LayerGroupContainer=({children:n,defaultValue:r,...o})=>t.jsx("div",{css:Bo,style:{width:"100%"},children:t.jsx(e.Accordion.Root,{css:{},defaultValue:r,multiple:!0,...o,children:n})}),exports.LayerItem=Yo,exports.LayerParameters=({label:r,children:o,openedByDefault:i})=>t.jsx("div",{children:t.jsx(e.Accordion.Root,{defaultValue:i?[r]:[],multiple:!0,children:t.jsxs(e.Accordion.Item,{css:Ko,value:r,children:[t.jsxs(e.Accordion.ItemTrigger,{css:Jo,children:[t.jsx(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:t.jsx("p",{css:Qo,children:r})}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx($,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{css:ei,children:n.Children.map(o,(e=>t.jsx("div",{className:"ds-layer-parameters-item-child",children:e})))})]})})}),exports.LegendItem=({layerName:e,dataUnit:n,onDrag:r,onUpClick:o,onDownClick:i,onRemoveClick:a,children:s,onInfoClick:l,onOpacityChanged:c})=>t.jsxs("div",{css:ti,children:[t.jsxs("div",{css:ni,children:[t.jsx(re,{icon:t.jsx(P,{}),"aria-label":"Drag and drop","aria-hidden":!0,onClick:r,style:{display:"none",marginBottom:"12px"}}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:[t.jsx(re,{icon:t.jsx($,{rotate:"180"}),"aria-label":"Up",onClick:o}),t.jsx(re,{icon:t.jsx($,{}),"aria-label":"Down",onClick:i})]})]}),t.jsxs("div",{style:{width:"100%"},children:[t.jsxs("div",{css:ri,children:[t.jsxs("div",{children:[t.jsx("h3",{css:oi,children:e}),t.jsx("p",{css:ii,children:n})]}),t.jsx(b,{label:"Remove",size:"small",variant:"secondary",rightIcon:t.jsx(R,{}),onClick:a})]}),s,t.jsxs("div",{css:ai,children:[t.jsx(b,{label:"About data",size:"small",variant:"secondary",leftIcon:t.jsx(k,{}),onClick:l}),t.jsx(di,{defaultValue:80,onOpacityChanged:c})]})]})]}),exports.List=({items:n,noBorder:r})=>t.jsx(e.Box,{css:Li(r),children:n.map((e=>t.jsx(Ni,{id:e.id,icon:e.icon,label:e.label,caption:e.caption,value:e.value,variant:e.variant??"data",onItemClick:e.onItemClick},e.id??e.label)))}),exports.MapControlsToolbar=({onZoomInClick:e,onZoomOutClick:t,onExpandClick:n,onShareClick:r,onPrintClick:i,onSettingsClick:a,onQuestionClick:s,vertical:l,expanded:c,showExpandedToggle:u,ariaLabel:d})=>{const p=[{icon:o.jsx(V,{}),label:"Zoom in",ariaLabel:"zoom in",onClick:e},{icon:o.jsx(A,{}),label:"Zoom out",ariaLabel:"zoom out",onClick:t,gap:!0},{icon:o.jsx(z,{}),label:"Expand",ariaLabel:"expand",onClick:n,gap:!0},{icon:o.jsx(B,{}),label:"Share",ariaLabel:"share",onClick:r,gap:!0},{icon:o.jsx(H,{}),label:"Print",ariaLabel:"print",onClick:i,gap:!0},{icon:o.jsx(F,{}),label:"Settings",ariaLabel:"settings",onClick:a,gap:!0},{icon:o.jsx(Z,{}),label:"Help",ariaLabel:"question",onClick:s}];return o.jsx(xe,{items:p,vertical:l,expanded:c,showExpandedToggle:u,ariaLabel:d||"Map controls toolbar"})},exports.MapMarker=kn,exports.MapMarkers=$n,exports.MapPopUp=({open:e,onOpenChange:r,anchorRef:o,header:i,content:a,footer:s,placement:c="bottom",offset:u=30,closeOnEscape:d=!0,closeOnOutsideClick:p=!1})=>{const h=n.useRef(null),{refs:f,floatingStyles:x,context:g,middlewareData:v,placement:m}=Po({open:e,onOpenChange:r,placement:c,whileElementsMounted:Qr,middleware:[po(u),(b={fallbackAxisSideDirection:"start"},{...no(b),options:[b,y]}),ho({padding:8}),fo({element:h})]});var b,y;n.useEffect((()=>{o?.current&&f.setReference(o.current)}),[o,f]);const w=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:u="pointerdown",referencePress:d=!1,referencePressEvent:p="pointerdown",ancestorScroll:h=!1,bubbles:f,capture:x}=t,g=Eo(),v=Pr("function"==typeof c?c:()=>!1),m="function"==typeof c?v:c,b=l.useRef(!1),{escapeKey:y,outsidePress:w}=Lo(f),{escapeKey:C,outsidePress:j}=Lo(x),k=l.useRef(!1),$=Pr((e=>{var t;if(!n||!a||!s||"Escape"!==e.key)return;if(k.current)return;const o=null==(t=i.current.floatingContext)?void 0:t.nodeId,l=g?Or(g.nodesRef.current,o):[];if(!y&&(e.stopPropagation(),l.length>0)){let e=!0;if(l.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)})),!e)return}r(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")})),S=Pr((e=>{var t;const n=()=>{var t;$(e),null==(t=Sr(e))||t.removeEventListener("keydown",n)};null==(t=Sr(e))||t.addEventListener("keydown",n)})),E=Pr((e=>{var t;const n=i.current.insideReactTree;i.current.insideReactTree=!1;const a=b.current;if(b.current=!1,"click"===u&&a)return;if(n)return;if("function"==typeof m&&!m(e))return;const s=Sr(e),l="[data-floating-ui-inert]",c=Rr(o.floating).querySelectorAll(l);let d=Tn(s)?s:null;for(;d&&!qn(d);){const e=Xn(d);if(qn(e)||!Tn(e))break;d=e}if(c.length&&Tn(s)&&!s.matches("html,body")&&!$r(s,o.floating)&&Array.from(c).every((e=>!$r(d,e))))return;if(Pn(s)&&L){const t=qn(s),n=Gn(s),r=/auto|scroll/,o=t||r.test(n.overflowX),i=t||r.test(n.overflowY),a=o&&s.clientWidth>0&&s.scrollWidth>s.clientWidth,l=i&&s.clientHeight>0&&s.scrollHeight>s.clientHeight,c="rtl"===n.direction,u=l&&(c?e.offsetX<=s.offsetWidth-s.clientWidth:e.offsetX>s.clientWidth),d=a&&e.offsetY>s.clientHeight;if(u||d)return}const p=null==(t=i.current.floatingContext)?void 0:t.nodeId,h=g&&Or(g.nodesRef.current,p).some((t=>{var n;return Er(e,null==(n=t.context)?void 0:n.elements.floating)}));if(Er(e,o.floating)||Er(e,o.domReference)||h)return;const f=g?Or(g.nodesRef.current,p):[];if(f.length>0){let e=!0;if(f.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)})),!e)return}r(!1,e,"outside-press")})),R=Pr((e=>{var t;const n=()=>{var t;E(e),null==(t=Sr(e))||t.removeEventListener(u,n)};null==(t=Sr(e))||t.addEventListener(u,n)}));l.useEffect((()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=y,i.current.__outsidePressBubbles=w;let e=-1;function t(e){r(!1,e,"ancestor-scroll")}function l(){window.clearTimeout(e),k.current=!0}function c(){e=window.setTimeout((()=>{k.current=!1}),Zn()?5:0)}const d=Rr(o.floating);s&&(d.addEventListener("keydown",C?S:$,C),d.addEventListener("compositionstart",l),d.addEventListener("compositionend",c)),m&&d.addEventListener(u,j?R:E,j);let p=[];return h&&(Tn(o.domReference)&&(p=Kn(o.domReference)),Tn(o.floating)&&(p=p.concat(Kn(o.floating))),!Tn(o.reference)&&o.reference&&o.reference.contextElement&&(p=p.concat(Kn(o.reference.contextElement)))),p=p.filter((e=>{var t;return e!==(null==(t=d.defaultView)?void 0:t.visualViewport)})),p.forEach((e=>{e.addEventListener("scroll",t,{passive:!0})})),()=>{s&&(d.removeEventListener("keydown",C?S:$,C),d.removeEventListener("compositionstart",l),d.removeEventListener("compositionend",c)),m&&d.removeEventListener(u,j?R:E,j),p.forEach((e=>{e.removeEventListener("scroll",t)})),window.clearTimeout(e)}}),[i,o,s,m,u,n,r,h,a,y,w,$,C,S,E,j,R]),l.useEffect((()=>{i.current.insideReactTree=!1}),[i,m,u]);const O=l.useMemo((()=>({onKeyDown:$,...d&&{[Ro[p]]:e=>{r(!1,e.nativeEvent,"reference-press")},..."click"!==p&&{onClick(e){r(!1,e.nativeEvent,"reference-press")}}}})),[$,r,d,p]),L=l.useMemo((()=>({onKeyDown:$,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[Oo[u]]:()=>{i.current.insideReactTree=!0}})),[$,u,i]);return l.useMemo((()=>a?{reference:O,floating:L}:{}),[a,O,L])}(g,{escapeKey:d,outsidePress:p}),C=Do(g,{role:"dialog"}),{getFloatingProps:j}=function(e){void 0===e&&(e=[]);const t=e.map((e=>null==e?void 0:e.reference)),n=e.map((e=>null==e?void 0:e.floating)),r=e.map((e=>null==e?void 0:e.item)),o=l.useCallback((t=>Mo(t,e,"reference")),t),i=l.useCallback((t=>Mo(t,e,"floating")),n),a=l.useCallback((t=>Mo(t,e,"item")),r);return l.useMemo((()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a})),[o,i,a])}([w,C]),{x:k,y:$}=v.arrow??{x:null,y:null},S={top:"bottom",right:"left",bottom:"top",left:"right"}[m.split("-")[0]];if(!e)return null;let E=u-1,R=4;return"left"!==S&&"right"!==S||(E=4,R=u-1),t.jsxs(t.Fragment,{children:[t.jsxs("div",{ref:f.setFloating,style:x,"aria-modal":!0,...j(),css:Io,children:[t.jsxs("div",{css:No,children:[i,t.jsx(oe,{onClick:()=>r(!1),className:"ds-map-pop-up-close-button","aria-label":"Close"})]}),t.jsx("div",{css:Vo,children:a}),s?t.jsx("div",{css:Ao,children:s}):null,t.jsx("div",{ref:h,css:zo(E,R,k,$,S,u)})]}),t.jsx("div",{className:"fixed inset-0 z-[999] bg-black/20 backdrop-blur-[1px]",onClick:()=>p&&r(!1)})]})},exports.Menu=pe,exports.MobileTabBar=({defaultValue:r,tabs:o,onTabClick:i,hideLabels:a,activationMode:s="manual"})=>{const l=o.length,[c,u]=n.useState((()=>Mh(o,r)));return t.jsx("div",{css:Oh,children:t.jsx(e.Tabs.Root,{width:"full",defaultValue:r||o?.[0]?.value,onValueChange:({value:e})=>(e=>{const t=Mh(o,e);u(t),i&&i(e)})(e),activationMode:s,children:t.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:o.map(((n,r)=>{const{label:o,icon:i,bagdeCount:s,"aria-label":u,"aria-describedby":d,disabled:p,...h}=n,f=`${n.value}-str-status`,x=[`tab ${r+1} of ${l}`,c===r?"selected":"not selected"];p&&x.push("disabled");const g=[d,f].filter(Boolean).join(" ")||void 0;return t.jsxs(e.Tabs.Trigger,{css:Lh,"aria-label":u||o,"aria-disabled":!!p||void 0,"aria-describedby":g,disabled:p,...h,children:[t.jsxs("div",{css:Th,children:[i,s?t.jsx("div",{css:Ph,className:"ds-badge-count",children:s}):null]}),a?null:t.jsx("p",{children:o}),t.jsx(e.VisuallyHidden,{id:f,children:x.join(", ")})]},n.value)}))})})})},exports.Modal=({header:n,content:r,footer:o,size:i="medium",draggable:a,blocking:s,open:l,onClose:c})=>l?t.jsx(e.Dialog.Root,{open:l,onOpenChange:c,placement:"center",scrollBehavior:"inside",closeOnInteractOutside:!a&&!s,preventScroll:!a&&!s,closeOnEscape:!s,defaultOpen:!0,children:t.jsxs(e.Portal,{children:[a?null:t.jsx(e.Dialog.Backdrop,{}),t.jsx(ts,{disabled:!a,children:t.jsx(e.Dialog.Positioner,{children:t.jsxs(e.Dialog.Content,{css:ns(i),children:[t.jsxs(e.Dialog.Header,{css:rs,children:[n,s?null:t.jsx(e.Dialog.CloseTrigger,{css:os,asChild:!0,children:t.jsx(oe,{})})]}),t.jsx(e.Dialog.Body,{css:is,children:r}),o?t.jsx(e.Dialog.Footer,{padding:"12px",children:o}):null]})})})]})}):null,exports.MultiActionButton=({variant:r="primary",size:o="default",mainActionLabel:i,mainActionOnClick:a=()=>{},otherActions:s=[],disabled:l,...c})=>{const[u,d]=n.useState(!1),p=l?`${i} action button with menu, disabled`:void 0;return t.jsxs(e.Group,{css:be,attached:!0,tabIndex:l?0:void 0,"aria-disabled":l,"aria-label":p,role:"group",children:[t.jsx(b,{css:{},label:i,variant:r,size:o,onClick:a,disabled:l,...c}),t.jsxs(e.Menu.Root,{onOpenChange:({open:e})=>d(e),positioning:{placement:"bottom-end"},children:[t.jsx(e.Menu.Trigger,{css:ve(r),"data-group-item":!0,"data-last":!0,asChild:!0,children:t.jsx(b,{variant:r,size:o,leftIcon:t.jsx($,{rotate:u?"180":"0",color:h("accessible","text-on-primary-mids")||h("primary",900)}),disabled:l})}),t.jsx(ye,{children:s.map((({label:n,value:r,onClick:i})=>t.jsx(e.Menu.Item,{css:me(o),onClick:i,value:r,children:n},r)))})]})]})},exports.Navbar=({logo:e,linkRouter:o,pathname:i,navigationSection:a,utilitySection:s,actionsSection:l,maxWidth:c,fixed:u,onNavbarHeightChange:d})=>{const p=n.useRef(null),f=n.useRef(null),x=n.useRef(null),[g,v]=n.useState(!1),[m,y]=n.useState(-1),[w,C]=n.useState("undefined"!=typeof window&&window?.innerWidth<=tf),[j,k]=n.useState(!1),$=o,S=n.useCallback((()=>{if(f.current&&p.current&&x.current){const e=p.current.getBoundingClientRect(),t=f.current.getBoundingClientRect(),n=x.current.getBoundingClientRect();t.width,e.width,window.innerWidth<=tf||window.innerWidth<=m?(d?.(96),v(!0)):window.innerWidth>tf&&window.innerWidth<=1440?e.right>=t.left?(d?.(96),v(!0),y(window.innerWidth)):window.innerWidth>m&&(d?.(48),v(!1),y(-1)):(d?.(48),v(!1),y(-1)),g&&(window.innerWidth<=tf||n.right>=t.left?(C(!0),d?.(48)):(C(!1),d?.(96)))}}),[m,g]);return n.useEffect((()=>(S(),window.addEventListener("resize",S),()=>{window.removeEventListener("resize",S)})),[S]),t.jsxs("nav",{css:_h(g&&!w,u),children:[t.jsxs("div",{css:Ih(g&&!w,c),children:[t.jsxs("div",{css:(E=g&&!w,r.css`
|
|
3559
3559
|
display: flex;
|
|
3560
3560
|
align-items: center;
|
|
3561
3561
|
justify-content: flex-start;
|
package/dist/index.d.ts
CHANGED
|
@@ -429,7 +429,7 @@ type BaseMapProps = {
|
|
|
429
429
|
|
|
430
430
|
declare const BaseMap: ({ title, caption, additionalSettings, options, onOptionSelected, maxHeight, maxWidth, }: BaseMapProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
431
431
|
|
|
432
|
-
type
|
|
432
|
+
type MapMarkerProps = {
|
|
433
433
|
ariaLabel?: string;
|
|
434
434
|
icon?: React.ReactNode;
|
|
435
435
|
backgroundColor?: string;
|
|
@@ -440,30 +440,30 @@ type IconMarkerProps = {
|
|
|
440
440
|
variant?: 'cluster' | 'simple-pin' | 'icon';
|
|
441
441
|
};
|
|
442
442
|
|
|
443
|
-
declare const
|
|
443
|
+
declare const MapMarker: React$1.ForwardRefExoticComponent<MapMarkerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
444
444
|
|
|
445
|
-
type
|
|
445
|
+
type GenericMapMarkersProps$1 = {
|
|
446
446
|
onClick?: () => void;
|
|
447
447
|
triggerRef?: React__default.Ref<HTMLButtonElement>;
|
|
448
448
|
showFocusState?: boolean;
|
|
449
|
-
count?:
|
|
450
|
-
mode?:
|
|
451
|
-
variant?:
|
|
449
|
+
count?: MapMarkerProps['count'];
|
|
450
|
+
mode?: MapMarkerProps['mode'];
|
|
451
|
+
variant?: MapMarkerProps['variant'];
|
|
452
452
|
};
|
|
453
|
-
declare const ClusterPoint: ({ onClick, triggerRef, showFocusState, count, mode, variant, }:
|
|
454
|
-
declare const SimpleMapPin: ({ onClick, triggerRef, showFocusState, count, mode, variant, }:
|
|
453
|
+
declare const ClusterPoint: ({ onClick, triggerRef, showFocusState, count, mode, variant, }: GenericMapMarkersProps$1) => react_jsx_runtime.JSX.Element;
|
|
454
|
+
declare const SimpleMapPin: ({ onClick, triggerRef, showFocusState, count, mode, variant, }: GenericMapMarkersProps$1) => react_jsx_runtime.JSX.Element;
|
|
455
455
|
|
|
456
|
-
type
|
|
456
|
+
type GenericMapMarkersProps = {
|
|
457
457
|
ariaLabel?: string;
|
|
458
458
|
onClick?: () => void;
|
|
459
459
|
triggerRef?: React__default.Ref<HTMLButtonElement>;
|
|
460
460
|
showFocusState?: boolean;
|
|
461
461
|
};
|
|
462
|
-
declare const
|
|
463
|
-
Paper: ({ ariaLabel, onClick, triggerRef, showFocusState, }:
|
|
464
|
-
Drop: ({ ariaLabel, onClick, triggerRef, showFocusState, }:
|
|
465
|
-
Plant: ({ ariaLabel, onClick, triggerRef, showFocusState, }:
|
|
466
|
-
Point: ({ ariaLabel, onClick, triggerRef, showFocusState, }:
|
|
462
|
+
declare const MapMarkers: {
|
|
463
|
+
Paper: ({ ariaLabel, onClick, triggerRef, showFocusState, }: GenericMapMarkersProps) => react_jsx_runtime.JSX.Element;
|
|
464
|
+
Drop: ({ ariaLabel, onClick, triggerRef, showFocusState, }: GenericMapMarkersProps) => react_jsx_runtime.JSX.Element;
|
|
465
|
+
Plant: ({ ariaLabel, onClick, triggerRef, showFocusState, }: GenericMapMarkersProps) => react_jsx_runtime.JSX.Element;
|
|
466
|
+
Point: ({ ariaLabel, onClick, triggerRef, showFocusState, }: GenericMapMarkersProps) => react_jsx_runtime.JSX.Element;
|
|
467
467
|
};
|
|
468
468
|
|
|
469
469
|
type MapPopUpProps = {
|
|
@@ -862,4 +862,4 @@ type ToastProps = {
|
|
|
862
862
|
|
|
863
863
|
declare const showToast: (props: ToastProps) => void;
|
|
864
864
|
|
|
865
|
-
export { AnalysisWidget, Avatar, Badge, BaseMap, Breadcrumb, Button, Checkbox, CheckboxList, CheckboxOptionCard, CloseButton, ClusterPoint, ExtendableCard, Footer, IconButton,
|
|
865
|
+
export { AnalysisWidget, Avatar, Badge, BaseMap, Breadcrumb, Button, Checkbox, CheckboxList, CheckboxOptionCard, CloseButton, ClusterPoint, ExtendableCard, Footer, IconButton, InlineMessage, InputWithUnits, ItemCount, LayerGroup, LayerGroupContainer, LayerItem, LayerParameters, LegendItem, List, MapControlsToolbar, MapMarker, MapMarkers, MapPopUp, Menu, MobileTabBar, Modal, MultiActionButton, Navbar, NavigationRail, OptionCard, Pagination, Panel, Password, ProgressBar, QualitativeAttribute, Radio, RadioGroup, RadioList, SSOButtons, ScaleBar, Select, Sheet, SimpleMapPin, Slider, SliderInput, StepProgressIndicator, Switch, TabBar, Table, TableCell, TableRow, Tag, TextInput, Textarea, Toast, Toolbar, Tooltip, designSystemStyles, designSystemStylesForTailwind, getThemedColor, showToast };
|
package/dist/index.esm.js
CHANGED
|
@@ -3594,4 +3594,4 @@ function Ch(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3594
3594
|
padding: 6px;
|
|
3595
3595
|
`,jv=le`
|
|
3596
3596
|
padding: 6px;
|
|
3597
|
-
`,Vv={pauseOnPageIdle:!0,offsets:"24px"},Iv={"top-start":A({placement:"top-start",...Vv}),"top-end":A({placement:"top-end",...Vv}),"bottom-start":A({placement:"bottom-start",...Vv}),"bottom-end":A({placement:"bottom-end",...Vv})},Av=e=>{Iv[e.placement].create({title:e.label,description:e.caption,duration:e.duration||5e3,meta:{closable:e.closable,icon:e.icon,closableLabel:e.closableLabel},...e})},zv=()=>Object.keys(Iv).map((e=>Z(l,{children:Z(z,{toaster:Iv[e],insetInline:{mdDown:"4"},children:t=>F(H.Root,{css:_v,width:{md:"sm"},children:[F(B,{flexDirection:"row",className:"ds-toast-icon-container",children:["info"===t.type?t.meta?.icon?t.meta.icon:Z(Le,{color:"var(--chakra-colors-neutral-700)"}):null,"loading"===t.type?Z(i,{size:"lg",borderWidth:"3px",color:"var(--chakra-colors-primary-500)"}):null,"success"===t.type?t.meta?.icon?t.meta.icon:Z(Ie,{color:"var(--chakra-colors-success-500)"}):null,"warning"===t.type?t.meta?.icon?t.meta.icon:Z(Ae,{color:"var(--chakra-colors-warning-500)"}):null,"error"===t.type?t.meta?.icon?t.meta.icon:Z(ze,{color:"var(--chakra-colors-error-500)"}):null,F(B,{gap:"1",flex:"1",maxWidth:"100%",children:[Z(H.Title,{css:Mv,"aria-label":`${t.title}`,children:t.title}),t.description?Z(H.Title,{css:Dv,"aria-label":`${t.description}`,children:t.description}):null]})]}),t.action||t.meta?.closable?F(B,{flexDirection:"row",children:[t.action?Z(ke,{css:Nv,label:t.action.label,size:"small",variant:"info"===t.type?"primary":"secondary",onClick:()=>{t?.action?.onClick&&t.action.onClick(),Iv[e].dismiss()}}):null,t.meta?.closable?Z(ke,{css:jv,label:t.meta.closableLabel,"aria-label":t.meta?.closableLabel||"Dismiss",leftIcon:Z(Me,{height:"10px!",width:"10px!"}),size:"small",variant:"secondary",onClick:()=>Iv[e].dismiss()}):null]}):null]})})},e)));export{Ml as AnalysisWidget,rv as Avatar,uv as Badge,Ar as BaseMap,og as Breadcrumb,ke as Button,_t as Checkbox,vn as CheckboxList,At as CheckboxOptionCard,ct as CloseButton,Br as ClusterPoint,Rl as ExtendableCard,dg as Footer,st as IconButton,
|
|
3597
|
+
`,Vv={pauseOnPageIdle:!0,offsets:"24px"},Iv={"top-start":A({placement:"top-start",...Vv}),"top-end":A({placement:"top-end",...Vv}),"bottom-start":A({placement:"bottom-start",...Vv}),"bottom-end":A({placement:"bottom-end",...Vv})},Av=e=>{Iv[e.placement].create({title:e.label,description:e.caption,duration:e.duration||5e3,meta:{closable:e.closable,icon:e.icon,closableLabel:e.closableLabel},...e})},zv=()=>Object.keys(Iv).map((e=>Z(l,{children:Z(z,{toaster:Iv[e],insetInline:{mdDown:"4"},children:t=>F(H.Root,{css:_v,width:{md:"sm"},children:[F(B,{flexDirection:"row",className:"ds-toast-icon-container",children:["info"===t.type?t.meta?.icon?t.meta.icon:Z(Le,{color:"var(--chakra-colors-neutral-700)"}):null,"loading"===t.type?Z(i,{size:"lg",borderWidth:"3px",color:"var(--chakra-colors-primary-500)"}):null,"success"===t.type?t.meta?.icon?t.meta.icon:Z(Ie,{color:"var(--chakra-colors-success-500)"}):null,"warning"===t.type?t.meta?.icon?t.meta.icon:Z(Ae,{color:"var(--chakra-colors-warning-500)"}):null,"error"===t.type?t.meta?.icon?t.meta.icon:Z(ze,{color:"var(--chakra-colors-error-500)"}):null,F(B,{gap:"1",flex:"1",maxWidth:"100%",children:[Z(H.Title,{css:Mv,"aria-label":`${t.title}`,children:t.title}),t.description?Z(H.Title,{css:Dv,"aria-label":`${t.description}`,children:t.description}):null]})]}),t.action||t.meta?.closable?F(B,{flexDirection:"row",children:[t.action?Z(ke,{css:Nv,label:t.action.label,size:"small",variant:"info"===t.type?"primary":"secondary",onClick:()=>{t?.action?.onClick&&t.action.onClick(),Iv[e].dismiss()}}):null,t.meta?.closable?Z(ke,{css:jv,label:t.meta.closableLabel,"aria-label":t.meta?.closableLabel||"Dismiss",leftIcon:Z(Me,{height:"10px!",width:"10px!"}),size:"small",variant:"secondary",onClick:()=>Iv[e].dismiss()}):null]}):null]})})},e)));export{Ml as AnalysisWidget,rv as Avatar,uv as Badge,Ar as BaseMap,og as Breadcrumb,ke as Button,_t as Checkbox,vn as CheckboxList,At as CheckboxOptionCard,ct as CloseButton,Br as ClusterPoint,Rl as ExtendableCard,dg as Footer,st as IconButton,wv as InlineMessage,nr as InputWithUnits,tl as ItemCount,ma as LayerGroup,xa as LayerGroupContainer,va as LayerItem,$a as LayerParameters,Na as LegendItem,dl as List,wt as MapControlsToolbar,Hr as MapMarker,Zr as MapMarkers,aa as MapPopUp,mt as Menu,vg as MobileTabBar,js as Modal,Ot as MultiActionButton,Ag as Navbar,Wg as NavigationRail,qt as OptionCard,gl as Pagination,Fs as Panel,dr as Password,kv as ProgressBar,Za as QualitativeAttribute,Yt as Radio,Kt as RadioGroup,xr as RadioList,ot as SSOButtons,Ka as ScaleBar,tr as Select,tg as Sheet,Fr as SimpleMapPin,ln as Slider,Cr as SliderInput,Pv as StepProgressIndicator,cn as Switch,Qg as TabBar,$l as Table,Sl as TableCell,kl as TableRow,Jn as Tag,Ln as TextInput,Tr as Textarea,zv as Toast,yt as Toolbar,Tt as Tooltip,me as designSystemStyles,ve as designSystemStylesForTailwind,xe as getThemedColor,Av as showToast};
|