@worldresources/wri-design-systems 2.196.4 → 2.197.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 +49 -48
- package/dist/index.d.ts +4 -1
- package/dist/index.esm.js +16 -15
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -3877,63 +3877,20 @@ function _E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3877
3877
|
width: 100%;
|
|
3878
3878
|
background-color: ${w("neutral",400)};
|
|
3879
3879
|
`,dL=i.css`
|
|
3880
|
-
justify-content: space-between;
|
|
3881
|
-
align-items: center;
|
|
3882
|
-
gap: ${k(200)};
|
|
3883
|
-
border-radius: ${$(500)};
|
|
3884
|
-
padding: ${k(200)} ${k(300)};
|
|
3885
|
-
background-color: ${w("neutral",100)};
|
|
3886
|
-
border: ${j(100)} solid ${w("neutral",300)};
|
|
3887
|
-
box-shadow: 0rem 0.25rem 0.375rem -0.25rem #0000001a;
|
|
3888
|
-
box-shadow: 0rem 0.625rem 0.9375rem -0.1875rem #0000001a;
|
|
3889
|
-
|
|
3890
|
-
.ds-toast-icon-container svg {
|
|
3891
|
-
width: ${k(500)};
|
|
3892
|
-
height: ${k(500)};
|
|
3893
|
-
margin-top: 0.1875rem;
|
|
3894
|
-
}
|
|
3895
|
-
|
|
3896
|
-
&[data-type='success'] {
|
|
3897
|
-
background-color: ${w("success",100)};
|
|
3898
|
-
border: ${j(100)} solid ${w("success",500)};
|
|
3899
|
-
|
|
3900
|
-
.chakra-toast__title {
|
|
3901
|
-
color: ${w("success",900)};
|
|
3902
|
-
}
|
|
3903
|
-
}
|
|
3904
|
-
|
|
3905
|
-
&[data-type='warning'] {
|
|
3906
|
-
background-color: ${w("warning",100)};
|
|
3907
|
-
border: ${j(100)} solid ${w("warning",500)};
|
|
3908
|
-
|
|
3909
|
-
.chakra-toast__title {
|
|
3910
|
-
color: ${w("warning",900)};
|
|
3911
|
-
}
|
|
3912
|
-
}
|
|
3913
|
-
|
|
3914
|
-
&[data-type='error'] {
|
|
3915
|
-
background-color: ${w("error",100)};
|
|
3916
|
-
border: ${j(100)} solid ${w("error",500)};
|
|
3917
|
-
|
|
3918
|
-
.chakra-toast__title {
|
|
3919
|
-
color: ${w("error",900)};
|
|
3920
|
-
}
|
|
3921
|
-
}
|
|
3922
|
-
`,uL=i.css`
|
|
3923
3880
|
font-size: ${C(500)};
|
|
3924
3881
|
line-height: ${S(700)};
|
|
3925
3882
|
font-weight: 400;
|
|
3926
3883
|
color: ${w("neutral",800)};
|
|
3927
|
-
`,
|
|
3884
|
+
`,uL=i.css`
|
|
3928
3885
|
font-size: ${C(400)};
|
|
3929
3886
|
line-height: ${S(600)};
|
|
3930
3887
|
font-weight: 400;
|
|
3931
3888
|
color: ${w("neutral",700)};
|
|
3932
|
-
`,
|
|
3889
|
+
`,hL=i.css`
|
|
3933
3890
|
padding: 0.375rem;
|
|
3934
|
-
`,
|
|
3891
|
+
`,pL=i.css`
|
|
3935
3892
|
padding: 0.375rem;
|
|
3936
|
-
`,
|
|
3893
|
+
`,fL={pauseOnPageIdle:!0,offsets:"1.5rem"},mL={"top-start":e.createToaster({placement:"top-start",...fL}),top:e.createToaster({placement:"top",...fL}),"top-end":e.createToaster({placement:"top-end",...fL}),"bottom-start":e.createToaster({placement:"bottom-start",...fL}),bottom:e.createToaster({placement:"bottom",...fL}),"bottom-end":e.createToaster({placement:"bottom-end",...fL})};exports.AlertBanner=tL,exports.AnalysisWidget=({children:t,header:o,footer:i,expanded:s=!0,collapsible:a=!0,actions:l,showFooterOnCollapsed:c=!1,labels:d})=>{Ef("AnalysisWidget",d);const u="analysis-widget-item",[h,p]=n.useState(s),f=`analysis-widget-header-${u}`;return r.jsx(e.Box,{as:"section","aria-labelledby":f,css:Qw,children:r.jsxs(e.Accordion.Root,{multiple:!0,value:a?void 0:[u],defaultValue:s?[u]:[],children:[r.jsxs(e.Accordion.Item,{css:tC,value:u,children:[o&&r.jsx(e.Accordion.ItemTrigger,{id:f,"aria-expanded":h,css:eC,pointerEvents:a?"auto":"none",onClick:a?()=>{p(!h)}:void 0,children:r.jsxs(e.Flex,{gap:3,flex:"1",overflow:"hidden",alignItems:"top",justifyContent:"space-between",children:[o,l&&l.map((e=>r.jsx(Mf,{variant:"secondary",size:"small",label:e.label,onClick:t=>{e.onClick(),t.preventDefault(),t.stopPropagation()},leftIcon:e?.icon},e.label))),a&&r.jsx(e.Accordion.ItemIndicator,{height:"1rem",marginTop:"0.5rem",display:"flex",children:r.jsx(If,{"aria-hidden":"true",color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]})}),r.jsxs("div",{className:h?"item-content-open":"item-content-closed","aria-hidden":!h,children:[t,!c&&i&&r.jsx(e.Box,{css:nC,children:i})]})]}),c&&i&&r.jsx(e.Box,{css:nC,children:i})]})})},exports.Avatar=UO,exports.Badge=({hasNotification:e,notificationCount:t,label:o})=>{const[i,s]=n.useState(!1);n.useEffect((()=>{const e=()=>{window.innerWidth<1024?s(!0):s(!1)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const a=(()=>{let e="";return t&&t>0&&(e=`${t>99?"99+":t}`),e})();let l="1rem";return t&&t>99?l="1.75rem":t&&t>9&&(l="1.375rem"),i?r.jsxs("div",{css:KO,role:"status","aria-live":"polite",children:[r.jsxs("div",{css:GO(),children:[r.jsx(Uf,{color:"currentColor",height:"1rem",width:"1rem"}),!e||t||o?null:r.jsx("div",{css:ZO,"aria-hidden":!0})]}),o?r.jsx("p",{children:o}):null,a.length>0?r.jsx("div",{css:YO,children:r.jsx("p",{css:QO,"aria-label":`${t} unread message`,children:a})}):null]}):r.jsxs("div",{css:KO,role:"status","aria-live":"polite",children:[o?r.jsx("p",{children:o}):null,r.jsxs("div",{css:GO(l),children:[a.length>0?r.jsx("div",{css:JO,children:r.jsx("p",{css:XO,"aria-label":`${t} unread message`,children:a})}):null,e&&!t?r.jsx("div",{css:ZO,"aria-hidden":!0}):null,r.jsx(Uf,{color:"currentColor",height:"1rem",width:"1rem"})]})]})},exports.BaseMap=({title:e,caption:t,additionalSettings:o,options:s,onOptionSelected:a,maxHeight:l="25rem",maxWidth:c="16.25rem",labels:d})=>{const u=Ef("BaseMap",d),h=n.useRef(null),p=n.useRef(null);return n.useEffect((()=>{const e=h.current,t=p.current;if(!e||!t)return;const n=()=>{e.focus()};if("undefined"!=typeof IntersectionObserver){let e=!1;const r=new IntersectionObserver((([t])=>{t?.isIntersecting?(e||n(),e=!0):e=!1}),{threshold:.01});return r.observe(t),()=>r.disconnect()}const r=window.setTimeout(n,0);return()=>window.clearTimeout(r)}),[]),r.jsx("div",{ref:p,css:lb(l,c),children:r.jsxs("div",{className:"ds-base-map-scroll-content",children:[r.jsxs("div",{css:cb,children:[r.jsx("h2",{ref:h,className:"ds-base-map-header-title",tabIndex:-1,children:e}),r.jsx("p",{className:"ds-base-map-header-caption",children:t})]}),r.jsxs("div",{css:db,children:[o?r.jsx("div",{css:ub,children:o.map((e=>r.jsxs("div",{children:[r.jsx(kg,{css:{},checked:e.checked,onCheckedChange:({checked:t})=>e.onCheckedChange({checked:Boolean(t)}),children:e.label}),e.checked&&e.children?r.jsx("div",{css:hb,children:e.children}):null]},e.label)))}):null,s?r.jsx("div",{css:pb,children:s.map((e=>{return r.jsxs("div",{css:fb(e.active),role:"button","aria-label":`${e.label}${e.caption?`, ${e.caption}`:""}`,onClick:()=>a?.(e),tabIndex:0,onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),a?.(e))},children:[r.jsx("div",{css:(t=e.imageUrl,i.css`
|
|
3937
3894
|
height: ${k(800)};
|
|
3938
3895
|
width: ${k(800)};
|
|
3939
3896
|
border: ${j(100)} solid ${w("neutral",300)};
|
|
@@ -4035,4 +3992,48 @@ function _E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4035
3992
|
border: ${j(100)} solid ${w("neutral",300)};
|
|
4036
3993
|
border-radius: ${$(300)};
|
|
4037
3994
|
${s?`background: ${s};`:""}
|
|
4038
|
-
`)}):r.jsx("div",{css:pw,children:e?.map(((e,n)=>r.jsx("div",{"data-test":`${e}-${t?.[n]}`,style:{backgroundColor:e,width:"100%",height:"100%"}},`${e}-${t?.[n]}`)))}),r.jsx("div",{css:fw,children:t?.map((e=>r.jsx("div",{style:{width:o?"auto":`calc(100% / ${t.length})`,display:"flex",justifyContent:"center"},children:r.jsx("p",{css:mw,children:e})},e)))}),n&&n.length?r.jsx("div",{css:fw,children:n.map((e=>r.jsx("div",{style:{width:o?"auto":`calc(100% / ${t.length})`,display:"flex",justifyContent:"center"},children:r.jsx("p",{css:gw,style:{width:"100%"},children:e})},e)))}):null]});var s},exports.Search=({placeholder:t,disabled:o,size:i="default",options:s=[],resultsMaxHeight:a=50,isLoading:l=!1,displayResults:c="text",onSelect:d,onQueryChange:h,onClear:p,renderResults:f,labels:m})=>{const g=Ef("Search",m),[v,b]=n.useState(""),{open:y,onOpen:x,onClose:C}=e.useDisclosure(),[k,S]=n.useState(s),[$,j]=n.useState(-1),[E,M]=n.useState(!1),T=n.useRef(null),O=`search-results-${n.useId()}`,L=e=>{const t=s.find((t=>t.id===e||t.label===e));t&&(d?.(t),b(""),C())};n.useEffect((()=>{if(h?.(v),!v)return void S(s);const e=s.filter((e=>e.id?.toLowerCase().includes(v.toLowerCase())||e.label.toLowerCase().includes(v.toLowerCase())||e.caption?.toLowerCase().includes(v.toLowerCase()))).map((e=>({id:e.id,label:e.label,caption:e.caption,variant:"select",icon:e.icon,onItemClick:()=>L(e.id||e.label)})));S(e),x()}),[v]),n.useEffect((()=>{function e(e){y&&T.current&&!T.current.contains(e.target)&&C()}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[y]);const A=v.length?r.jsx(sg,{onClick:()=>{b(""),p?.()}}):null,R="none"!==c&&!!v.length&&k.length>0&&y;let N=w("neutral",500);o?N=w("neutral",500):E&&(N=w("primary",700));const D="small"===i?"1rem":"1.25rem",I=u(a);return r.jsxs("div",{ref:T,style:{position:"relative",width:"100%"},children:[r.jsx(e.InputGroup,{startElement:r.jsx(hm,{width:D,height:D,fill:N}),endElement:A,children:r.jsx(Ym,{autoComplete:"off",placeholder:t||g.filterPlaceholder,onChange:e=>{const{value:t}=e.target;b(t)},onFocus:()=>M(!0),onBlur:()=>M(!1),value:v,label:"",style:{paddingLeft:"2.5rem"},type:"search","aria-label":t||g.filterAriaLabel,"aria-expanded":R,"aria-controls":O,role:"combobox","aria-autocomplete":"list",disabled:o,size:i,noMarginBottom:!0,onKeyDown:e=>{if(R){if("ArrowDown"===e.key&&(e.preventDefault(),j((e=>Math.min(e+1,k.length-1)))),"ArrowUp"===e.key&&(e.preventDefault(),j((e=>Math.max(e-1,0)))),"Enter"===e.key&&(e.preventDefault(),$>=0)){const e=k[$];L(e.id||e.label)}"Escape"===e.key&&C()}}})}),(R||l&&!!v.length)&&"custom"===c&&f&&!l&&f({items:k,highlightedIndex:$,query:v,onSelect:L}),(R||l&&!!v.length)&&r.jsx(e.Portal,{container:T,children:r.jsxs(e.Box,{position:"absolute",width:"100%",backgroundColor:"white",border:"custom"===c?"none":"0.0625rem solid",borderColor:"gray.200",borderRadius:"md",zIndex:1e3,overflowY:"auto",maxHeight:I,children:[l&&r.jsx(e.Box,{padding:"1rem",children:r.jsx(e.Spinner,{})}),"text"===c&&!l&&r.jsx(BO,{highlightedIndex:$,items:k,query:v,onSelect:L}),"list"===c&&!l&&r.jsx(Ow,{items:k,highlightedIndex:$})]})})]})},exports.Select=Pv,exports.Sheet=({header:e,content:t,footer:o,open:i=!1,onClose:s,minimizedHeight:a,midHeight:l=200,maxFullHeight:c,defaultSnap:d="minimized",className:u,blocking:h,zIndex:p=1e3})=>{const f=n.useRef(null),m=n.useRef([]),[g,v]=n.useState(null),b=window.innerWidth>768,y=m.current;let x="Expand sheet";if(null!=g){const e=wT(g,y);e>0&&e<y.length-1?x="Make full screen":e===y.length-1&&(x="Expanded sheet")}const w=!(null==g||!y.length||wT(g,y)!==y.length-1);return r.jsx(bT,{ref:f,css:xT(!!e,p),className:u,open:i,onDismiss:s,header:r.jsxs("div",{children:[r.jsx("button",{type:"button",disabled:w,"aria-label":x,css:yT,onKeyDown:e=>{if("Enter"!==e.key&&" "!==e.key)return;e.preventDefault();const t=y[y.length-1];if(b)return void f.current?.snapTo?.((()=>t));const n=g??y[0];let r=y.findIndex((e=>e>n));-1===r&&(r=y.length-1);const o=y[r];f.current?.snapTo?.((()=>o))},children:r.jsx("div",{})}),r.jsx("span",{"aria-live":"polite",style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"},children:x}),e]}),footer:o,snapPoints:({headerHeight:e,maxHeight:t,footerHeight:n})=>{const r=[20,a||e,l+(o?n:0),c||t-t/6];return m.current=r,r},onSpringEnd:()=>{const e=f.current?.height;e&&v(e)},defaultSnap:({headerHeight:e,maxHeight:t,footerHeight:n})=>{let r=20;return"minimized"===d?r=a||e:"mid"===d?r=l+(o?n:0):"full"===d&&(r=c||t-t/6),r},blocking:h,children:i?t:null})},exports.SimpleMapPin=({onClick:e,triggerRef:n,showFocusState:r,count:o,mode:i,variant:s="simple-pin"})=>t.jsx(vb,{count:o,mode:i,onClick:e,ref:n,showFocusState:r,variant:s}),exports.Slider=Zg,exports.SliderInput=({label:e,caption:t,size:o="default",sliderItem:i,required:s,onChange:a})=>{const[l,c]=n.useState(i.value||[]),d=(e,t)=>{const n=e.target.value,r=[...l];let o=n?parseInt(n,10):n;const s=i.min||0,a=i.max||100;o=Number.isNaN(o)?s:o,o=o<s?s:o,o=o>a?a:o,r[t]=o,c(r)},u=(e,t)=>{const n=e.target.value||"0",r=[...l];let o=parseInt(n,10);const s=i.min||0,d=i.max||100;if(o=Number.isNaN(o)?s:o,o=o<s?s:o,o=o>d?d:o,2===l?.length){o=Number.isNaN(o)?s:o;const e=l[0],n=l[1];0===t?(o=o<s?s:o,o=o>n?n:o):1===t&&(o=o<e?e:o,o=o>d?d:o)}r[t]=o,c(r),a&&a(r)};return r.jsxs("div",{children:[r.jsxs("p",{css:Yv(o),"aria-label":e,children:[s?r.jsx("span",{children:"*"}):null,e]}),t?r.jsx("p",{css:Qv(o),"aria-label":t,children:t}):null,r.jsxs("div",{css:eb,children:[i.step&&i.marks?r.jsx(Pv,{items:i.marks.map((e=>({label:`${e.label}`,value:`${e.value}`}))),placeholder:"",style:{width:"5.625rem"},value:[`${l?.[0]}`],onChange:e=>{const t=e.map((e=>parseInt(e,10)));c(t),a&&a(t)}}):r.jsx(Ym,{"aria-label":e,min:i.min,max:i.max,value:l?.[0],type:"number",onChange:e=>d(e,0),onBlur:e=>u(e,0),className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}),r.jsx(Zg,{css:{},...i,value:l,"aria-label":2===l?.length?[`${e} minimum`,`${e} maximum`]:[e],onValueChangeEnd:e=>{c(e.value),a&&a(e.value)}}),2===l?.length?r.jsx(Ym,{"aria-label":e,min:i.min,max:i.max,value:l?.[1],type:"number",onChange:e=>d(e,1),onBlur:e=>u(e,1),className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}):null]})]})},exports.StepProgressIndicator=({steps:e,currentStep:t,labels:n})=>{const o=Ef("StepProgressIndicator",n);return r.jsxs("div",{css:oL,children:[e.map(((e,n)=>r.jsxs("div",{css:iL,children:[r.jsx("button",{css:sL(t>=n+1,t<n+1),type:"button",onClick:e.onClick,"aria-current":t===n+1,"aria-disabled":t<n+1,disabled:t<n+1,"aria-label":o.currentStepLabel(n+1,e.label||"",t>n+1),"data-active":t>=n+1,children:t>n+1?r.jsx(Rf,{height:"1rem",width:"1rem"}):n+1}),e.label?r.jsx("p",{css:aL(t===n+1),children:e.label}):null]},`${e.label}-${n}`))),r.jsx("div",{css:lL,children:r.jsx("div",{css:cL})})]})},exports.Switch=Xg,exports.TabBar=({variant:t="panel",defaultValue:o,tabs:i,onTabClick:s,activationMode:a="manual"})=>{const[l,c]=n.useState(zO(i,o)||0);return r.jsx("div",{css:AO(t),children:r.jsx(e.Tabs.Root,{width:"full",defaultValue:o||i?.[0]?.value,onValueChange:({value:e})=>{return c(zO(i,t=e)),void(s&&s(t));var t},activationMode:a,children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:i.map(((o,i)=>r.jsxs(n.Fragment,{children:["view"===t&&1===i&&"left"===VO(l)?r.jsx("div",{css:DO}):null,r.jsx(e.Tabs.Trigger,{css:[RO,"view"===t&&IO,"panel"===t&&NO,"transparent"===t&&PO],"aria-label":o["aria-label"]||o.label,...o,children:r.jsxs(e.Box,{display:"flex",alignItems:"center",gap:"0.3125rem",children:[o.icon,o.label]})},o.label),"view"===t&&1===i&&"right"===VO(l)?r.jsx("div",{css:DO}):null]},o.label)))})})})},exports.Table=({columns:o,data:i=[],renderRow:s,striped:a,stickyHeader:l,pagination:c,selectable:d,selectedRows:u,variant:h="default",onSortColumn:p,onPageSizeChange:f,onPageChange:m,onAllItemsSelected:g,onRowSelected:v,loading:b,height:y,labels:x})=>{const C=Ef("Table",x),[k,S]=n.useState({key:"",order:""}),$=n.useRef({}),[j,E]=n.useState({}),[M,T]=n.useState([]),{totalItems:O=i.length,currentPage:L=1,pageSize:A=10,showItemCount:R,showItemCountText:N}=c||{},D=Boolean(p),I=n.useMemo((()=>Gw(i,k,D)),[i,D,k]),P=(e,t)=>{S({key:e,order:t}),p&&p({key:e,order:t})},z=u??M,V=I.length>0&&z.length===I.length,H=z.length>0&&z.length<I.length,B=n.useMemo((()=>(e=>e.reduce(((e,t)=>(e[t.key]=t,e)),{}))(o)),[o]),_=n.useMemo((()=>(e=>e.filter((e=>e.sticky)).map((e=>e.key)))(o)),[o]),F=(e=>e.length>0?e[e.length-1]:void 0)(_),q=n.useCallback((()=>{const e=((e,t)=>{const n={};let r=0;return e.filter((e=>e.sticky)).forEach((e=>{n[e.key]=r,r+=t[e.key]?.offsetWidth||0})),n})(o,$.current);E(e)}),[o]);n.useEffect((()=>{q()}),[q,i.length]),n.useEffect((()=>{const e=()=>{q()};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[q]),n.useEffect((()=>{void 0===u&&T((e=>((e,t)=>{const n=e.filter((e=>t.some((t=>t.id===e.id)))),r=n.length===e.length&&n.every(((t,n)=>t.id===e[n]?.id));return r?e:n})(e,i)))}),[i,u]);const W=e=>Kw(j,e.key,F),U=e=>((e,t,n,r)=>({...Uw(e,n),...Kw(t,n,r)}))(B,j,e,F),K=e=>((e,t)=>e.some((e=>e.id===t.id)))(z,e),G=(({columns:n,selectable:r,isRowSelected:o,onRowSelected:i})=>(s,a)=>{const{id:l,name:c}=s;return t.jsxs(e.Table.Row,{className:a?.className,children:[r?t.jsx(e.Table.Cell,{children:t.jsx(kg,{name:`checkbox-${l}`,"aria-label":`Select row ${c||l}`,checked:o(s),onCheckedChange:({checked:e})=>{i(s,e)}})}):null,n.map((n=>t.jsx(e.Table.Cell,{...a?.getCellProps(n.key),children:n.cell?n.cell(s):s?.[n.key]},n.key)))]})})({columns:o,selectable:d,isRowSelected:K,onRowSelected:(e,t)=>{void 0===u&&T((n=>((e,t,n)=>n?e.some((e=>e.id===t.id))?e:[...e,t]:e.filter((e=>e.id!==t.id)))(n,e,t))),v&&v(e,t)}}),Z=s||G;return r.jsxs("div",{children:[r.jsx("div",{css:y?qw(y):void 0,children:r.jsxs(e.Table.Root,{css:Iw(h,l),striped:a,stickyHeader:l,interactive:!0,children:[r.jsx(e.Table.Header,{css:Pw(h),children:r.jsxs(e.Table.Row,{children:[d?r.jsx(e.Table.ColumnHeader,{children:r.jsx(kg,{name:"header-checkbox","aria-label":"Select all rows",checked:V,indeterminate:H,onCheckedChange:({checked:e})=>{void 0===u&&T(e?I:[]),g&&g(e)}})}):null,o.map((t=>{return r.jsx(e.Table.ColumnHeader,{ref:e=>{$.current[t.key]=e},...(n=t.key,Uw(B,n)),role:t.sortable?"columnheader":void 0,"aria-sort":t.sortable&&"asc"===k.order?"ascending":t.sortable&&"desc"===k.order?"descending":void 0,...W(t),children:r.jsxs("div",{css:zw,children:[t.label,t.sortable?r.jsxs("div",{css:Vw,children:[r.jsx(Of,{css:Hw(k.key===t.key&&"asc"===k.order),icon:r.jsx(If,{style:{transform:"rotate(180deg)"}}),onClick:()=>P(t.key,"asc"),"aria-label":C.ascendingLabel}),r.jsx(Of,{css:Hw(k.key===t.key&&"desc"===k.order),icon:r.jsx(If,{}),onClick:()=>P(t.key,"desc"),"aria-label":C.descendingLabel})]}):null]})},t.key);var n}))]})}),r.jsx(e.Table.Body,{css:Fw,children:I.map((e=>r.jsx(n.Fragment,{children:Z(e,{className:K(e)?"selected":void 0,getCellProps:U})},e.id)))})]})}),b?r.jsx("div",{css:Ww,children:r.jsx(e.Spinner,{size:"lg",color:w("primary",500)})}):null,r.jsxs("div",{css:Bw,children:[r.jsx("div",{children:R?r.jsx(ww,{pageSize:A,currentPage:L,totalItems:O,onPageSizeChange:f,showItemCountText:N}):null}),c?r.jsx("div",{css:_w,children:r.jsx(Dw,{totalItems:O,pageSize:A,currentPage:L,onPageChange:m})}):null]})]})},exports.TableCell=Jw,exports.TableRow=Zw,exports.Tag=Nv,exports.TextInput=Ym,exports.Textarea=({label:t,caption:o,placeholder:i,errorMessage:s,required:a,disabled:l,size:c="default",defaultValue:d="",onChange:u,minLength:h,maxLength:p,labels:f,...m})=>{const g=Ef("Textarea",f),[v,b]=n.useState(d),[y,x]=n.useState(!1),[w,C]=n.useState(!1),[k,S]=n.useState(""),$=n.useId(),j=n.useId(),E=n.useId();n.useEffect((()=>{const{length:e}=d;h&&e<h&&e>0?(x(e<h),C(!1),S(g.enterAtLeastChars(h-e))):h&&0===e&&S(g.minChars(h)),p&&e>0?(x(!1),C(e>p),S(g.charsRemaining(p-e))):p&&0===e&&S(g.maxChars(p))}),[]);const M=!!s||y||w,T=[o?$:null,M?j:null,k?E:null].filter(Boolean).join(" ")||void 0;return r.jsxs("div",{css:tb(c),children:[M?r.jsx("div",{css:nb}):null,r.jsxs(e.Field.Root,{required:a,invalid:M,gap:"0",style:{marginLeft:M?"1.1875rem":"0px"},children:[t?r.jsxs(e.Field.Label,{css:rb(c,l),"aria-label":t,children:[r.jsx(e.Field.RequiredIndicator,{"aria-label":g.requiredSymbolLabel}),t,a?"":r.jsx("span",{children:g.optionalSuffix})]}):null,o?r.jsx(e.Field.HelperText,{id:$,css:ob(c,l),children:o}):null,s?r.jsx(e.Field.ErrorText,{id:j,css:sb,"aria-label":`${g.errorPrefix} ${s}`,"aria-live":"polite",children:s}):null,r.jsx(e.Textarea,{placeholder:i,disabled:l,css:ab(c,v,d),onChange:e=>{b(e.target.value);const{length:t}=e.target.value;h&&p?(x(t<h),C(t>p),S(g.charsRemaining(p-t))):h?(x(t<h),C(!1),S(t<h?g.enterAtLeastChars(h-t):"")):p&&(C(t>p),x(!1),S(g.charsRemaining(p-t))),u&&u(e)},value:v,"aria-label":t||i,"aria-describedby":T,_placeholder:{color:"var(--chakra-colors-neutral-500)"},...m}),y&&h?r.jsx(e.Field.ErrorText,{id:j,css:sb,style:{marginTop:"0.5rem",fontSize:"0.75rem",lineHeight:"1rem"},"aria-live":"polite",children:g.needMoreChars(h-v.length)}):null,w&&p?r.jsx(e.Field.ErrorText,{id:j,css:sb,style:{marginTop:"0.5rem",fontSize:"0.75rem",lineHeight:"1rem"},"aria-live":"polite",children:g.tooManyChars(v.length-p)}):null,!k||w||y?null:r.jsx(e.Field.HelperText,{id:E,css:ib,"aria-live":"polite",children:k})]})]})},exports.Toast=({labels:t})=>{const n=Ef("Toast",t);return Object.keys(gL).map((t=>r.jsx(e.Portal,{children:r.jsx(e.Toaster,{toaster:gL[t],insetInline:{mdDown:"4"},children:o=>r.jsxs(e.Toast.Root,{css:dL,width:{md:"sm"},children:[r.jsxs(e.Stack,{flexDirection:"row",className:"ds-toast-icon-container",children:["info"===o.type?o.meta?.icon?o.meta.icon:r.jsx(Df,{color:"var(--chakra-colors-neutral-700)"}):null,"loading"===o.type?r.jsx(e.Spinner,{size:"lg",borderWidth:"0.1875rem",color:"var(--chakra-colors-primary-500)"}):null,"success"===o.type?o.meta?.icon?o.meta.icon:r.jsx(_f,{color:"var(--chakra-colors-success-500)"}):null,"warning"===o.type?o.meta?.icon?o.meta.icon:r.jsx(Ff,{color:"var(--chakra-colors-warning-500)"}):null,"error"===o.type?o.meta?.icon?o.meta.icon:r.jsx(qf,{color:"var(--chakra-colors-error-500)"}):null,r.jsxs(e.Stack,{gap:"1",flex:"1",maxWidth:"100%",children:[r.jsx(e.Toast.Title,{css:uL,"aria-label":`${o.title}`,children:o.title}),o.description?r.jsx(e.Toast.Title,{css:hL,"aria-label":`${o.description}`,children:o.description}):null]})]}),o.action||o.meta?.closable?r.jsxs(e.Stack,{flexDirection:"row",children:[o.action?r.jsx(Mf,{css:pL,label:o.action.label,size:"small",variant:"info"===o.type?"primary":"secondary",onClick:()=>{o?.action?.onClick&&o.action.onClick(),gL[t].dismiss()}}):null,o.meta?.closable?r.jsx(Mf,{css:fL,label:o.meta.closableLabel,"aria-label":o.meta?.closableLabel||n.dismissLabel,leftIcon:r.jsx(zf,{height:"0.625rem!",width:"0.625rem!"}),size:"small",variant:"secondary",onClick:()=>{o.meta?.onClose&&o.meta.onClose(),gL[t].dismiss()}}):null]}):null]})})},t)))},exports.Toolbar=ug,exports.Tooltip=Tm,exports.designSystemStyles=x,exports.designSystemStylesForTailwind=y,exports.getThemedBorderWidth=j,exports.getThemedColor=w,exports.getThemedFontSize=C,exports.getThemedLineHeight=S,exports.getThemedRadius=$,exports.getThemedSpacing=k,exports.showToast=e=>{gL[e.placement].create({title:e.label,description:e.caption,duration:e.duration||5e3,meta:{closable:e.closable,icon:e.icon,closableLabel:e.closableLabel,onClose:e.onClose},...e})};
|
|
3995
|
+
`)}):r.jsx("div",{css:pw,children:e?.map(((e,n)=>r.jsx("div",{"data-test":`${e}-${t?.[n]}`,style:{backgroundColor:e,width:"100%",height:"100%"}},`${e}-${t?.[n]}`)))}),r.jsx("div",{css:fw,children:t?.map((e=>r.jsx("div",{style:{width:o?"auto":`calc(100% / ${t.length})`,display:"flex",justifyContent:"center"},children:r.jsx("p",{css:mw,children:e})},e)))}),n&&n.length?r.jsx("div",{css:fw,children:n.map((e=>r.jsx("div",{style:{width:o?"auto":`calc(100% / ${t.length})`,display:"flex",justifyContent:"center"},children:r.jsx("p",{css:gw,style:{width:"100%"},children:e})},e)))}):null]});var s},exports.Search=({placeholder:t,disabled:o,size:i="default",options:s=[],resultsMaxHeight:a=50,isLoading:l=!1,displayResults:c="text",onSelect:d,onQueryChange:h,onClear:p,renderResults:f,labels:m})=>{const g=Ef("Search",m),[v,b]=n.useState(""),{open:y,onOpen:x,onClose:C}=e.useDisclosure(),[k,S]=n.useState(s),[$,j]=n.useState(-1),[E,M]=n.useState(!1),T=n.useRef(null),O=`search-results-${n.useId()}`,L=e=>{const t=s.find((t=>t.id===e||t.label===e));t&&(d?.(t),b(""),C())};n.useEffect((()=>{if(h?.(v),!v)return void S(s);const e=s.filter((e=>e.id?.toLowerCase().includes(v.toLowerCase())||e.label.toLowerCase().includes(v.toLowerCase())||e.caption?.toLowerCase().includes(v.toLowerCase()))).map((e=>({id:e.id,label:e.label,caption:e.caption,variant:"select",icon:e.icon,onItemClick:()=>L(e.id||e.label)})));S(e),x()}),[v]),n.useEffect((()=>{function e(e){y&&T.current&&!T.current.contains(e.target)&&C()}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[y]);const A=v.length?r.jsx(sg,{onClick:()=>{b(""),p?.()}}):null,R="none"!==c&&!!v.length&&k.length>0&&y;let N=w("neutral",500);o?N=w("neutral",500):E&&(N=w("primary",700));const D="small"===i?"1rem":"1.25rem",I=u(a);return r.jsxs("div",{ref:T,style:{position:"relative",width:"100%"},children:[r.jsx(e.InputGroup,{startElement:r.jsx(hm,{width:D,height:D,fill:N}),endElement:A,children:r.jsx(Ym,{autoComplete:"off",placeholder:t||g.filterPlaceholder,onChange:e=>{const{value:t}=e.target;b(t)},onFocus:()=>M(!0),onBlur:()=>M(!1),value:v,label:"",style:{paddingLeft:"2.5rem"},type:"search","aria-label":t||g.filterAriaLabel,"aria-expanded":R,"aria-controls":O,role:"combobox","aria-autocomplete":"list",disabled:o,size:i,noMarginBottom:!0,onKeyDown:e=>{if(R){if("ArrowDown"===e.key&&(e.preventDefault(),j((e=>Math.min(e+1,k.length-1)))),"ArrowUp"===e.key&&(e.preventDefault(),j((e=>Math.max(e-1,0)))),"Enter"===e.key&&(e.preventDefault(),$>=0)){const e=k[$];L(e.id||e.label)}"Escape"===e.key&&C()}}})}),(R||l&&!!v.length)&&"custom"===c&&f&&!l&&f({items:k,highlightedIndex:$,query:v,onSelect:L}),(R||l&&!!v.length)&&r.jsx(e.Portal,{container:T,children:r.jsxs(e.Box,{position:"absolute",width:"100%",backgroundColor:"white",border:"custom"===c?"none":"0.0625rem solid",borderColor:"gray.200",borderRadius:"md",zIndex:1e3,overflowY:"auto",maxHeight:I,children:[l&&r.jsx(e.Box,{padding:"1rem",children:r.jsx(e.Spinner,{})}),"text"===c&&!l&&r.jsx(BO,{highlightedIndex:$,items:k,query:v,onSelect:L}),"list"===c&&!l&&r.jsx(Ow,{items:k,highlightedIndex:$})]})})]})},exports.Select=Pv,exports.Sheet=({header:e,content:t,footer:o,open:i=!1,onClose:s,minimizedHeight:a,midHeight:l=200,maxFullHeight:c,defaultSnap:d="minimized",className:u,blocking:h,zIndex:p=1e3})=>{const f=n.useRef(null),m=n.useRef([]),[g,v]=n.useState(null),b=window.innerWidth>768,y=m.current;let x="Expand sheet";if(null!=g){const e=wT(g,y);e>0&&e<y.length-1?x="Make full screen":e===y.length-1&&(x="Expanded sheet")}const w=!(null==g||!y.length||wT(g,y)!==y.length-1);return r.jsx(bT,{ref:f,css:xT(!!e,p),className:u,open:i,onDismiss:s,header:r.jsxs("div",{children:[r.jsx("button",{type:"button",disabled:w,"aria-label":x,css:yT,onKeyDown:e=>{if("Enter"!==e.key&&" "!==e.key)return;e.preventDefault();const t=y[y.length-1];if(b)return void f.current?.snapTo?.((()=>t));const n=g??y[0];let r=y.findIndex((e=>e>n));-1===r&&(r=y.length-1);const o=y[r];f.current?.snapTo?.((()=>o))},children:r.jsx("div",{})}),r.jsx("span",{"aria-live":"polite",style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"},children:x}),e]}),footer:o,snapPoints:({headerHeight:e,maxHeight:t,footerHeight:n})=>{const r=[20,a||e,l+(o?n:0),c||t-t/6];return m.current=r,r},onSpringEnd:()=>{const e=f.current?.height;e&&v(e)},defaultSnap:({headerHeight:e,maxHeight:t,footerHeight:n})=>{let r=20;return"minimized"===d?r=a||e:"mid"===d?r=l+(o?n:0):"full"===d&&(r=c||t-t/6),r},blocking:h,children:i?t:null})},exports.SimpleMapPin=({onClick:e,triggerRef:n,showFocusState:r,count:o,mode:i,variant:s="simple-pin"})=>t.jsx(vb,{count:o,mode:i,onClick:e,ref:n,showFocusState:r,variant:s}),exports.Slider=Zg,exports.SliderInput=({label:e,caption:t,size:o="default",sliderItem:i,required:s,onChange:a})=>{const[l,c]=n.useState(i.value||[]),d=(e,t)=>{const n=e.target.value,r=[...l];let o=n?parseInt(n,10):n;const s=i.min||0,a=i.max||100;o=Number.isNaN(o)?s:o,o=o<s?s:o,o=o>a?a:o,r[t]=o,c(r)},u=(e,t)=>{const n=e.target.value||"0",r=[...l];let o=parseInt(n,10);const s=i.min||0,d=i.max||100;if(o=Number.isNaN(o)?s:o,o=o<s?s:o,o=o>d?d:o,2===l?.length){o=Number.isNaN(o)?s:o;const e=l[0],n=l[1];0===t?(o=o<s?s:o,o=o>n?n:o):1===t&&(o=o<e?e:o,o=o>d?d:o)}r[t]=o,c(r),a&&a(r)};return r.jsxs("div",{children:[r.jsxs("p",{css:Yv(o),"aria-label":e,children:[s?r.jsx("span",{children:"*"}):null,e]}),t?r.jsx("p",{css:Qv(o),"aria-label":t,children:t}):null,r.jsxs("div",{css:eb,children:[i.step&&i.marks?r.jsx(Pv,{items:i.marks.map((e=>({label:`${e.label}`,value:`${e.value}`}))),placeholder:"",style:{width:"5.625rem"},value:[`${l?.[0]}`],onChange:e=>{const t=e.map((e=>parseInt(e,10)));c(t),a&&a(t)}}):r.jsx(Ym,{"aria-label":e,min:i.min,max:i.max,value:l?.[0],type:"number",onChange:e=>d(e,0),onBlur:e=>u(e,0),className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}),r.jsx(Zg,{css:{},...i,value:l,"aria-label":2===l?.length?[`${e} minimum`,`${e} maximum`]:[e],onValueChangeEnd:e=>{c(e.value),a&&a(e.value)}}),2===l?.length?r.jsx(Ym,{"aria-label":e,min:i.min,max:i.max,value:l?.[1],type:"number",onChange:e=>d(e,1),onBlur:e=>u(e,1),className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}):null]})]})},exports.StepProgressIndicator=({steps:e,currentStep:t,labels:n})=>{const o=Ef("StepProgressIndicator",n);return r.jsxs("div",{css:oL,children:[e.map(((e,n)=>r.jsxs("div",{css:iL,children:[r.jsx("button",{css:sL(t>=n+1,t<n+1),type:"button",onClick:e.onClick,"aria-current":t===n+1,"aria-disabled":t<n+1,disabled:t<n+1,"aria-label":o.currentStepLabel(n+1,e.label||"",t>n+1),"data-active":t>=n+1,children:t>n+1?r.jsx(Rf,{height:"1rem",width:"1rem"}):n+1}),e.label?r.jsx("p",{css:aL(t===n+1),children:e.label}):null]},`${e.label}-${n}`))),r.jsx("div",{css:lL,children:r.jsx("div",{css:cL})})]})},exports.Switch=Xg,exports.TabBar=({variant:t="panel",defaultValue:o,tabs:i,onTabClick:s,activationMode:a="manual"})=>{const[l,c]=n.useState(zO(i,o)||0);return r.jsx("div",{css:AO(t),children:r.jsx(e.Tabs.Root,{width:"full",defaultValue:o||i?.[0]?.value,onValueChange:({value:e})=>{return c(zO(i,t=e)),void(s&&s(t));var t},activationMode:a,children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:i.map(((o,i)=>r.jsxs(n.Fragment,{children:["view"===t&&1===i&&"left"===VO(l)?r.jsx("div",{css:DO}):null,r.jsx(e.Tabs.Trigger,{css:[RO,"view"===t&&IO,"panel"===t&&NO,"transparent"===t&&PO],"aria-label":o["aria-label"]||o.label,...o,children:r.jsxs(e.Box,{display:"flex",alignItems:"center",gap:"0.3125rem",children:[o.icon,o.label]})},o.label),"view"===t&&1===i&&"right"===VO(l)?r.jsx("div",{css:DO}):null]},o.label)))})})})},exports.Table=({columns:o,data:i=[],renderRow:s,striped:a,stickyHeader:l,pagination:c,selectable:d,selectedRows:u,variant:h="default",onSortColumn:p,onPageSizeChange:f,onPageChange:m,onAllItemsSelected:g,onRowSelected:v,loading:b,height:y,labels:x})=>{const C=Ef("Table",x),[k,S]=n.useState({key:"",order:""}),$=n.useRef({}),[j,E]=n.useState({}),[M,T]=n.useState([]),{totalItems:O=i.length,currentPage:L=1,pageSize:A=10,showItemCount:R,showItemCountText:N}=c||{},D=Boolean(p),I=n.useMemo((()=>Gw(i,k,D)),[i,D,k]),P=(e,t)=>{S({key:e,order:t}),p&&p({key:e,order:t})},z=u??M,V=I.length>0&&z.length===I.length,H=z.length>0&&z.length<I.length,B=n.useMemo((()=>(e=>e.reduce(((e,t)=>(e[t.key]=t,e)),{}))(o)),[o]),_=n.useMemo((()=>(e=>e.filter((e=>e.sticky)).map((e=>e.key)))(o)),[o]),F=(e=>e.length>0?e[e.length-1]:void 0)(_),q=n.useCallback((()=>{const e=((e,t)=>{const n={};let r=0;return e.filter((e=>e.sticky)).forEach((e=>{n[e.key]=r,r+=t[e.key]?.offsetWidth||0})),n})(o,$.current);E(e)}),[o]);n.useEffect((()=>{q()}),[q,i.length]),n.useEffect((()=>{const e=()=>{q()};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[q]),n.useEffect((()=>{void 0===u&&T((e=>((e,t)=>{const n=e.filter((e=>t.some((t=>t.id===e.id)))),r=n.length===e.length&&n.every(((t,n)=>t.id===e[n]?.id));return r?e:n})(e,i)))}),[i,u]);const W=e=>Kw(j,e.key,F),U=e=>((e,t,n,r)=>({...Uw(e,n),...Kw(t,n,r)}))(B,j,e,F),K=e=>((e,t)=>e.some((e=>e.id===t.id)))(z,e),G=(({columns:n,selectable:r,isRowSelected:o,onRowSelected:i})=>(s,a)=>{const{id:l,name:c}=s;return t.jsxs(e.Table.Row,{className:a?.className,children:[r?t.jsx(e.Table.Cell,{children:t.jsx(kg,{name:`checkbox-${l}`,"aria-label":`Select row ${c||l}`,checked:o(s),onCheckedChange:({checked:e})=>{i(s,e)}})}):null,n.map((n=>t.jsx(e.Table.Cell,{...a?.getCellProps(n.key),children:n.cell?n.cell(s):s?.[n.key]},n.key)))]})})({columns:o,selectable:d,isRowSelected:K,onRowSelected:(e,t)=>{void 0===u&&T((n=>((e,t,n)=>n?e.some((e=>e.id===t.id))?e:[...e,t]:e.filter((e=>e.id!==t.id)))(n,e,t))),v&&v(e,t)}}),Z=s||G;return r.jsxs("div",{children:[r.jsx("div",{css:y?qw(y):void 0,children:r.jsxs(e.Table.Root,{css:Iw(h,l),striped:a,stickyHeader:l,interactive:!0,children:[r.jsx(e.Table.Header,{css:Pw(h),children:r.jsxs(e.Table.Row,{children:[d?r.jsx(e.Table.ColumnHeader,{children:r.jsx(kg,{name:"header-checkbox","aria-label":"Select all rows",checked:V,indeterminate:H,onCheckedChange:({checked:e})=>{void 0===u&&T(e?I:[]),g&&g(e)}})}):null,o.map((t=>{return r.jsx(e.Table.ColumnHeader,{ref:e=>{$.current[t.key]=e},...(n=t.key,Uw(B,n)),role:t.sortable?"columnheader":void 0,"aria-sort":t.sortable&&"asc"===k.order?"ascending":t.sortable&&"desc"===k.order?"descending":void 0,...W(t),children:r.jsxs("div",{css:zw,children:[t.label,t.sortable?r.jsxs("div",{css:Vw,children:[r.jsx(Of,{css:Hw(k.key===t.key&&"asc"===k.order),icon:r.jsx(If,{style:{transform:"rotate(180deg)"}}),onClick:()=>P(t.key,"asc"),"aria-label":C.ascendingLabel}),r.jsx(Of,{css:Hw(k.key===t.key&&"desc"===k.order),icon:r.jsx(If,{}),onClick:()=>P(t.key,"desc"),"aria-label":C.descendingLabel})]}):null]})},t.key);var n}))]})}),r.jsx(e.Table.Body,{css:Fw,children:I.map((e=>r.jsx(n.Fragment,{children:Z(e,{className:K(e)?"selected":void 0,getCellProps:U})},e.id)))})]})}),b?r.jsx("div",{css:Ww,children:r.jsx(e.Spinner,{size:"lg",color:w("primary",500)})}):null,r.jsxs("div",{css:Bw,children:[r.jsx("div",{children:R?r.jsx(ww,{pageSize:A,currentPage:L,totalItems:O,onPageSizeChange:f,showItemCountText:N}):null}),c?r.jsx("div",{css:_w,children:r.jsx(Dw,{totalItems:O,pageSize:A,currentPage:L,onPageChange:m})}):null]})]})},exports.TableCell=Jw,exports.TableRow=Zw,exports.Tag=Nv,exports.TextInput=Ym,exports.Textarea=({label:t,caption:o,placeholder:i,errorMessage:s,required:a,disabled:l,size:c="default",defaultValue:d="",onChange:u,minLength:h,maxLength:p,labels:f,...m})=>{const g=Ef("Textarea",f),[v,b]=n.useState(d),[y,x]=n.useState(!1),[w,C]=n.useState(!1),[k,S]=n.useState(""),$=n.useId(),j=n.useId(),E=n.useId();n.useEffect((()=>{const{length:e}=d;h&&e<h&&e>0?(x(e<h),C(!1),S(g.enterAtLeastChars(h-e))):h&&0===e&&S(g.minChars(h)),p&&e>0?(x(!1),C(e>p),S(g.charsRemaining(p-e))):p&&0===e&&S(g.maxChars(p))}),[]);const M=!!s||y||w,T=[o?$:null,M?j:null,k?E:null].filter(Boolean).join(" ")||void 0;return r.jsxs("div",{css:tb(c),children:[M?r.jsx("div",{css:nb}):null,r.jsxs(e.Field.Root,{required:a,invalid:M,gap:"0",style:{marginLeft:M?"1.1875rem":"0px"},children:[t?r.jsxs(e.Field.Label,{css:rb(c,l),"aria-label":t,children:[r.jsx(e.Field.RequiredIndicator,{"aria-label":g.requiredSymbolLabel}),t,a?"":r.jsx("span",{children:g.optionalSuffix})]}):null,o?r.jsx(e.Field.HelperText,{id:$,css:ob(c,l),children:o}):null,s?r.jsx(e.Field.ErrorText,{id:j,css:sb,"aria-label":`${g.errorPrefix} ${s}`,"aria-live":"polite",children:s}):null,r.jsx(e.Textarea,{placeholder:i,disabled:l,css:ab(c,v,d),onChange:e=>{b(e.target.value);const{length:t}=e.target.value;h&&p?(x(t<h),C(t>p),S(g.charsRemaining(p-t))):h?(x(t<h),C(!1),S(t<h?g.enterAtLeastChars(h-t):"")):p&&(C(t>p),x(!1),S(g.charsRemaining(p-t))),u&&u(e)},value:v,"aria-label":t||i,"aria-describedby":T,_placeholder:{color:"var(--chakra-colors-neutral-500)"},...m}),y&&h?r.jsx(e.Field.ErrorText,{id:j,css:sb,style:{marginTop:"0.5rem",fontSize:"0.75rem",lineHeight:"1rem"},"aria-live":"polite",children:g.needMoreChars(h-v.length)}):null,w&&p?r.jsx(e.Field.ErrorText,{id:j,css:sb,style:{marginTop:"0.5rem",fontSize:"0.75rem",lineHeight:"1rem"},"aria-live":"polite",children:g.tooManyChars(v.length-p)}):null,!k||w||y?null:r.jsx(e.Field.HelperText,{id:E,css:ib,"aria-live":"polite",children:k})]})]})},exports.Toast=({labels:t})=>{const n=Ef("Toast",t);return Object.keys(mL).map((t=>r.jsx(e.Portal,{children:r.jsx(e.Toaster,{toaster:mL[t],insetInline:{mdDown:"4"},children:o=>{return r.jsxs(e.Toast.Root,{css:(s=o.meta?.maxWidth,i.css`
|
|
3996
|
+
justify-content: space-between;
|
|
3997
|
+
align-items: center;
|
|
3998
|
+
gap: ${k(200)};
|
|
3999
|
+
border-radius: ${$(500)};
|
|
4000
|
+
padding: ${k(200)} ${k(300)};
|
|
4001
|
+
background-color: ${w("neutral",100)};
|
|
4002
|
+
border: ${j(100)} solid ${w("neutral",300)};
|
|
4003
|
+
box-shadow: 0rem 0.25rem 0.375rem -0.25rem #0000001a;
|
|
4004
|
+
box-shadow: 0rem 0.625rem 0.9375rem -0.1875rem #0000001a;
|
|
4005
|
+
width: ${s?`${s} !important`:"100%"};
|
|
4006
|
+
|
|
4007
|
+
.ds-toast-icon-container svg {
|
|
4008
|
+
width: ${k(500)};
|
|
4009
|
+
height: ${k(500)};
|
|
4010
|
+
margin-top: 0.1875rem;
|
|
4011
|
+
}
|
|
4012
|
+
|
|
4013
|
+
&[data-type='success'] {
|
|
4014
|
+
background-color: ${w("success",100)};
|
|
4015
|
+
border: ${j(100)} solid ${w("success",500)};
|
|
4016
|
+
|
|
4017
|
+
.chakra-toast__title {
|
|
4018
|
+
color: ${w("success",900)};
|
|
4019
|
+
}
|
|
4020
|
+
}
|
|
4021
|
+
|
|
4022
|
+
&[data-type='warning'] {
|
|
4023
|
+
background-color: ${w("warning",100)};
|
|
4024
|
+
border: ${j(100)} solid ${w("warning",500)};
|
|
4025
|
+
|
|
4026
|
+
.chakra-toast__title {
|
|
4027
|
+
color: ${w("warning",900)};
|
|
4028
|
+
}
|
|
4029
|
+
}
|
|
4030
|
+
|
|
4031
|
+
&[data-type='error'] {
|
|
4032
|
+
background-color: ${w("error",100)};
|
|
4033
|
+
border: ${j(100)} solid ${w("error",500)};
|
|
4034
|
+
|
|
4035
|
+
.chakra-toast__title {
|
|
4036
|
+
color: ${w("error",900)};
|
|
4037
|
+
}
|
|
4038
|
+
}
|
|
4039
|
+
`),width:{md:"sm"},children:[r.jsxs(e.Stack,{flexDirection:"row",className:"ds-toast-icon-container",alignItems:o.description?"flex-start":"center",children:["info"===o.type?o.meta?.icon?o.meta.icon:r.jsx(Df,{color:"var(--chakra-colors-neutral-700)"}):null,"loading"===o.type?r.jsx(e.Spinner,{size:"lg",borderWidth:"0.1875rem",color:"var(--chakra-colors-primary-500)"}):null,"success"===o.type?o.meta?.icon?o.meta.icon:r.jsx(_f,{color:"var(--chakra-colors-success-500)"}):null,"warning"===o.type?o.meta?.icon?o.meta.icon:r.jsx(Ff,{color:"var(--chakra-colors-warning-500)"}):null,"error"===o.type?o.meta?.icon?o.meta.icon:r.jsx(qf,{color:"var(--chakra-colors-error-500)"}):null,r.jsxs(e.Stack,{gap:"1",flex:"1",maxWidth:"100%",children:[r.jsx(e.Toast.Title,{css:dL,"aria-label":`${o.title}`,children:o.title}),o.description?r.jsx(e.Toast.Title,{css:uL,"aria-label":`${o.description}`,children:o.description}):null]})]}),o.action||o.meta?.closable?r.jsxs(e.Stack,{flexDirection:"row",children:[o.action?r.jsx(Mf,{css:hL,label:o.action.label,size:"small",variant:"info"===o.type?"primary":"secondary",onClick:()=>{o?.action?.onClick&&o.action.onClick(),mL[t].dismiss()}}):null,o.meta?.closable?r.jsx(Mf,{css:pL,label:o.meta.closableLabel,"aria-label":o.meta?.closableLabel||n.dismissLabel,leftIcon:r.jsx(zf,{height:"0.625rem!",width:"0.625rem!"}),size:"small",variant:"secondary",onClick:()=>{o.meta?.onClose&&o.meta.onClose(),mL[t].dismiss()}}):null]}):null]});var s}})},t)))},exports.Toolbar=ug,exports.Tooltip=Tm,exports.closeToast=e=>{Object.values(mL).forEach((t=>{t.dismiss(e)}))},exports.designSystemStyles=x,exports.designSystemStylesForTailwind=y,exports.getThemedBorderWidth=j,exports.getThemedColor=w,exports.getThemedFontSize=C,exports.getThemedLineHeight=S,exports.getThemedRadius=$,exports.getThemedSpacing=k,exports.showToast=e=>{mL[e.placement].create({title:e.label,description:e.caption,duration:e.duration||5e3,meta:{closable:e.closable,icon:e.icon,closableLabel:e.closableLabel,onClose:e.onClose,maxWidth:e.maxWidth},...e})};
|
package/dist/index.d.ts
CHANGED
|
@@ -1619,6 +1619,7 @@ type StepProgressIndicatorProps = {
|
|
|
1619
1619
|
declare const StepProgressIndicator: ({ steps, currentStep, labels, }: StepProgressIndicatorProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1620
1620
|
|
|
1621
1621
|
type ToastProps = {
|
|
1622
|
+
id?: string;
|
|
1622
1623
|
label: string;
|
|
1623
1624
|
caption?: React.ReactNode;
|
|
1624
1625
|
type: 'success' | 'warning' | 'error' | 'info' | 'loading';
|
|
@@ -1632,6 +1633,7 @@ type ToastProps = {
|
|
|
1632
1633
|
closable?: boolean;
|
|
1633
1634
|
closableLabel?: string;
|
|
1634
1635
|
onClose?: () => void;
|
|
1636
|
+
maxWidth?: string;
|
|
1635
1637
|
};
|
|
1636
1638
|
type ToastComponentProps = {
|
|
1637
1639
|
/** Override internal UI labels for internationalization support. */
|
|
@@ -1643,5 +1645,6 @@ type ToastComponentProps = {
|
|
|
1643
1645
|
declare const Toast: React__default.FC<ToastComponentProps>;
|
|
1644
1646
|
|
|
1645
1647
|
declare const showToast: (props: ToastProps) => void;
|
|
1648
|
+
declare const closeToast: (id?: string) => void;
|
|
1646
1649
|
|
|
1647
|
-
export { AlertBanner, type AlertProps, AnalysisWidget, type AnalysisWidgetActionsProps, type AnalysisWidgetLabels, type AnalysisWidgetProps, Avatar, type AvatarProps, Badge, type BadgeProps, BaseMap, type BaseMapLabels, type BaseMapOptionProps, type BaseMapProps, Breadcrumb, type BreadcrumbProps, Button, type ButtonLabels, type ButtonProps, Checkbox, CheckboxList, type CheckboxListLabel, type CheckboxListLabels, type CheckboxListProps, CheckboxOptionCard, type CheckboxOptionCardItemProps, type CheckboxOptionCardProps, type CheckboxProps, CloseButton, type CloseButtonLabels, type CloseButtonProps, ClusterPoint, Combobox, type ComboboxProps, type DesignSystemLabels, DesignSystemLocaleProvider, type DesignSystemLocaleProviderProps, ExtendableCard, type ExtendableCardProps, Footer, type FooterProps, FormContainer, type FormContainerProps, IconButton, type IconButtonProps, InlineMessage, type InlineMessageLabels, type InlineMessageProps, InputWithUnits, type InputWithUnitsProps, ItemCount, type ItemCountLabels, type ItemCountProps, LayerGroup, LayerGroupContainer, type LayerGroupContainerProps, type LayerGroupLabels, type LayerGroupProps, LayerItem, type LayerItemProps, LayerParameters, type LayerParametersProps, LegendItem, type LegendItemLabels, type LegendItemProps, List, type ListItemProps, type ListItemVariant, type ListProps, MapControlsToolbar, type MapControlsToolbarLabels, type MapControlsToolbarProps, MapMarker, type MapMarkerProps, MapMarkers, MapPopUp, type MapPopUpLabels, type MapPopUpProps, Menu, type MenuItemProps, type MenuProps, MobileSearch, type MobileSearchLabels, type MobileSearchProps, MobileTabBar, type MobileTabBarItemProps, type MobileTabBarProps, Modal, type ModalProps, MultiActionButton, type MultiActionButtonProps, Navbar, type NavbarLabels, type NavbarNavigationItemsProps, type NavbarProps, NavigationRail, type NavigationRailLabels, type NavigationRailProps, type NavigationRailTabProps, type OpacityControlLabels, OptionCard, type OptionCardItemProps, type OptionCardProps, Pagination, type PaginationLabels, type PaginationProps, Panel, type PanelProps, Password, type PasswordLabels, type PasswordProps, ProgressBar, type ProgressBarProps, QualitativeAttribute, type QualitativeAttributeLabels, type QualitativeAttributeProps, Radio, RadioGroup, type RadioGroupProps, RadioList, type RadioListLabels, type RadioListProps, type RadioProps, RichTextEditor, type RichTextEditorControlKey, type RichTextEditorLabels, type RichTextEditorProps, type RichTextEditorSize, SSOButtons, ScaleBar, type ScaleBarProps, Search, type SearchLabels, type SearchProps, Select, type SelectItemProps, type SelectLabels, type SelectProps, Sheet, type SheetProps, SimpleMapPin, Slider, SliderInput, type SliderInputProps, type SliderMarksProps, type SliderProps, StepProgressIndicator, type StepProgressIndicatorLabels, type StepProgressIndicatorProps, type StrengthLevel, Switch, type SwitchProps, TabBar, type TabBarItemProps, type TabBarProps, Table, TableCell, type TableLabels, type TableProps, TableRow, Tag, type TagProps, TextInput, type TextInputLabels, type TextInputProps, Textarea, type TextareaLabels, type TextareaProps, Toast, type ToastComponentProps, type ToastLabels, type ToastProps, Toolbar, type ToolbarButtonProps, type ToolbarItem, type ToolbarLabels, type ToolbarProps, Tooltip, type TooltipProps, designSystemStyles, designSystemStylesForTailwind, getThemedBorderWidth, getThemedColor, getThemedFontSize, getThemedLineHeight, getThemedRadius, getThemedSpacing, showToast };
|
|
1650
|
+
export { AlertBanner, type AlertProps, AnalysisWidget, type AnalysisWidgetActionsProps, type AnalysisWidgetLabels, type AnalysisWidgetProps, Avatar, type AvatarProps, Badge, type BadgeProps, BaseMap, type BaseMapLabels, type BaseMapOptionProps, type BaseMapProps, Breadcrumb, type BreadcrumbProps, Button, type ButtonLabels, type ButtonProps, Checkbox, CheckboxList, type CheckboxListLabel, type CheckboxListLabels, type CheckboxListProps, CheckboxOptionCard, type CheckboxOptionCardItemProps, type CheckboxOptionCardProps, type CheckboxProps, CloseButton, type CloseButtonLabels, type CloseButtonProps, ClusterPoint, Combobox, type ComboboxProps, type DesignSystemLabels, DesignSystemLocaleProvider, type DesignSystemLocaleProviderProps, ExtendableCard, type ExtendableCardProps, Footer, type FooterProps, FormContainer, type FormContainerProps, IconButton, type IconButtonProps, InlineMessage, type InlineMessageLabels, type InlineMessageProps, InputWithUnits, type InputWithUnitsProps, ItemCount, type ItemCountLabels, type ItemCountProps, LayerGroup, LayerGroupContainer, type LayerGroupContainerProps, type LayerGroupLabels, type LayerGroupProps, LayerItem, type LayerItemProps, LayerParameters, type LayerParametersProps, LegendItem, type LegendItemLabels, type LegendItemProps, List, type ListItemProps, type ListItemVariant, type ListProps, MapControlsToolbar, type MapControlsToolbarLabels, type MapControlsToolbarProps, MapMarker, type MapMarkerProps, MapMarkers, MapPopUp, type MapPopUpLabels, type MapPopUpProps, Menu, type MenuItemProps, type MenuProps, MobileSearch, type MobileSearchLabels, type MobileSearchProps, MobileTabBar, type MobileTabBarItemProps, type MobileTabBarProps, Modal, type ModalProps, MultiActionButton, type MultiActionButtonProps, Navbar, type NavbarLabels, type NavbarNavigationItemsProps, type NavbarProps, NavigationRail, type NavigationRailLabels, type NavigationRailProps, type NavigationRailTabProps, type OpacityControlLabels, OptionCard, type OptionCardItemProps, type OptionCardProps, Pagination, type PaginationLabels, type PaginationProps, Panel, type PanelProps, Password, type PasswordLabels, type PasswordProps, ProgressBar, type ProgressBarProps, QualitativeAttribute, type QualitativeAttributeLabels, type QualitativeAttributeProps, Radio, RadioGroup, type RadioGroupProps, RadioList, type RadioListLabels, type RadioListProps, type RadioProps, RichTextEditor, type RichTextEditorControlKey, type RichTextEditorLabels, type RichTextEditorProps, type RichTextEditorSize, SSOButtons, ScaleBar, type ScaleBarProps, Search, type SearchLabels, type SearchProps, Select, type SelectItemProps, type SelectLabels, type SelectProps, Sheet, type SheetProps, SimpleMapPin, Slider, SliderInput, type SliderInputProps, type SliderMarksProps, type SliderProps, StepProgressIndicator, type StepProgressIndicatorLabels, type StepProgressIndicatorProps, type StrengthLevel, Switch, type SwitchProps, TabBar, type TabBarItemProps, type TabBarProps, Table, TableCell, type TableLabels, type TableProps, TableRow, Tag, type TagProps, TextInput, type TextInputLabels, type TextInputProps, Textarea, type TextareaLabels, type TextareaProps, Toast, type ToastComponentProps, type ToastLabels, type ToastProps, Toolbar, type ToolbarButtonProps, type ToolbarItem, type ToolbarLabels, type ToolbarProps, Tooltip, type TooltipProps, closeToast, designSystemStyles, designSystemStylesForTailwind, getThemedBorderWidth, getThemedColor, getThemedFontSize, getThemedLineHeight, getThemedRadius, getThemedSpacing, showToast };
|
package/dist/index.esm.js
CHANGED
|
@@ -3979,6 +3979,20 @@ function DO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3979
3979
|
width: 100%;
|
|
3980
3980
|
background-color: ${ze("neutral",400)};
|
|
3981
3981
|
`,pR=({steps:e,currentStep:t,labels:n})=>{const r=qm("StepProgressIndicator",n);return be("div",{css:aR,children:[e.map(((e,n)=>be("div",{css:lR,children:[ye("button",{css:cR(t>=n+1,t<n+1),type:"button",onClick:e.onClick,"aria-current":t===n+1,"aria-disabled":t<n+1,disabled:t<n+1,"aria-label":r.currentStepLabel(n+1,e.label||"",t>n+1),"data-active":t>=n+1,children:t>n+1?ye(Jm,{height:"1rem",width:"1rem"}):n+1}),e.label?ye("p",{css:dR(t===n+1),children:e.label}):null]},`${e.label}-${n}`))),ye("div",{css:uR,children:ye("div",{css:hR})})]})},fR=$e`
|
|
3982
|
+
font-size: ${Ve(500)};
|
|
3983
|
+
line-height: ${_e(700)};
|
|
3984
|
+
font-weight: 400;
|
|
3985
|
+
color: ${ze("neutral",800)};
|
|
3986
|
+
`,mR=$e`
|
|
3987
|
+
font-size: ${Ve(400)};
|
|
3988
|
+
line-height: ${_e(600)};
|
|
3989
|
+
font-weight: 400;
|
|
3990
|
+
color: ${ze("neutral",700)};
|
|
3991
|
+
`,gR=$e`
|
|
3992
|
+
padding: 0.375rem;
|
|
3993
|
+
`,vR=$e`
|
|
3994
|
+
padding: 0.375rem;
|
|
3995
|
+
`,bR={pauseOnPageIdle:!0,offsets:"1.5rem"},yR={"top-start":Z({placement:"top-start",...bR}),top:Z({placement:"top",...bR}),"top-end":Z({placement:"top-end",...bR}),"bottom-start":Z({placement:"bottom-start",...bR}),bottom:Z({placement:"bottom",...bR}),"bottom-end":Z({placement:"bottom-end",...bR})},wR=e=>{yR[e.placement].create({title:e.label,description:e.caption,duration:e.duration||5e3,meta:{closable:e.closable,icon:e.icon,closableLabel:e.closableLabel,onClose:e.onClose,maxWidth:e.maxWidth},...e})},CR=e=>{Object.values(yR).forEach((t=>{t.dismiss(e)}))},xR=({labels:e})=>{const t=qm("Toast",e);return Object.keys(yR).map((e=>ye(a,{children:ye(G,{toaster:yR[e],insetInline:{mdDown:"4"},children:n=>{return be(J.Root,{css:(r=n.meta?.maxWidth,$e`
|
|
3982
3996
|
justify-content: space-between;
|
|
3983
3997
|
align-items: center;
|
|
3984
3998
|
gap: ${He(200)};
|
|
@@ -3988,6 +4002,7 @@ function DO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3988
4002
|
border: ${je(100)} solid ${ze("neutral",300)};
|
|
3989
4003
|
box-shadow: 0rem 0.25rem 0.375rem -0.25rem #0000001a;
|
|
3990
4004
|
box-shadow: 0rem 0.625rem 0.9375rem -0.1875rem #0000001a;
|
|
4005
|
+
width: ${r?`${r} !important`:"100%"};
|
|
3991
4006
|
|
|
3992
4007
|
.ds-toast-icon-container svg {
|
|
3993
4008
|
width: ${He(500)};
|
|
@@ -4021,18 +4036,4 @@ function DO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4021
4036
|
color: ${ze("error",900)};
|
|
4022
4037
|
}
|
|
4023
4038
|
}
|
|
4024
|
-
`,mR
|
|
4025
|
-
font-size: ${Ve(500)};
|
|
4026
|
-
line-height: ${_e(700)};
|
|
4027
|
-
font-weight: 400;
|
|
4028
|
-
color: ${ze("neutral",800)};
|
|
4029
|
-
`,gR=$e`
|
|
4030
|
-
font-size: ${Ve(400)};
|
|
4031
|
-
line-height: ${_e(600)};
|
|
4032
|
-
font-weight: 400;
|
|
4033
|
-
color: ${ze("neutral",700)};
|
|
4034
|
-
`,vR=$e`
|
|
4035
|
-
padding: 0.375rem;
|
|
4036
|
-
`,bR=$e`
|
|
4037
|
-
padding: 0.375rem;
|
|
4038
|
-
`,yR={pauseOnPageIdle:!0,offsets:"1.5rem"},wR={"top-start":Z({placement:"top-start",...yR}),top:Z({placement:"top",...yR}),"top-end":Z({placement:"top-end",...yR}),"bottom-start":Z({placement:"bottom-start",...yR}),bottom:Z({placement:"bottom",...yR}),"bottom-end":Z({placement:"bottom-end",...yR})},CR=e=>{wR[e.placement].create({title:e.label,description:e.caption,duration:e.duration||5e3,meta:{closable:e.closable,icon:e.icon,closableLabel:e.closableLabel,onClose:e.onClose},...e})},xR=({labels:e})=>{const t=qm("Toast",e);return Object.keys(wR).map((e=>ye(a,{children:ye(G,{toaster:wR[e],insetInline:{mdDown:"4"},children:n=>be(J.Root,{css:fR,width:{md:"sm"},children:[be(X,{flexDirection:"row",className:"ds-toast-icon-container",children:["info"===n.type?n.meta?.icon?n.meta.icon:ye(Ym,{color:"var(--chakra-colors-neutral-700)"}):null,"loading"===n.type?ye(o,{size:"lg",borderWidth:"0.1875rem",color:"var(--chakra-colors-primary-500)"}):null,"success"===n.type?n.meta?.icon?n.meta.icon:ye(ig,{color:"var(--chakra-colors-success-500)"}):null,"warning"===n.type?n.meta?.icon?n.meta.icon:ye(sg,{color:"var(--chakra-colors-warning-500)"}):null,"error"===n.type?n.meta?.icon?n.meta.icon:ye(ag,{color:"var(--chakra-colors-error-500)"}):null,be(X,{gap:"1",flex:"1",maxWidth:"100%",children:[ye(J.Title,{css:mR,"aria-label":`${n.title}`,children:n.title}),n.description?ye(J.Title,{css:gR,"aria-label":`${n.description}`,children:n.description}):null]})]}),n.action||n.meta?.closable?be(X,{flexDirection:"row",children:[n.action?ye(Wm,{css:vR,label:n.action.label,size:"small",variant:"info"===n.type?"primary":"secondary",onClick:()=>{n?.action?.onClick&&n.action.onClick(),wR[e].dismiss()}}):null,n.meta?.closable?ye(Wm,{css:bR,label:n.meta.closableLabel,"aria-label":n.meta?.closableLabel||t.dismissLabel,leftIcon:ye(tg,{height:"0.625rem!",width:"0.625rem!"}),size:"small",variant:"secondary",onClick:()=>{n.meta?.onClose&&n.meta.onClose(),wR[e].dismiss()}}):null]}):null]})})},e)))};export{rR as AlertBanner,Uk as AnalysisWidget,KN as Avatar,tR as Badge,Ky as BaseMap,jA as Breadcrumb,Wm as Button,Wv as Checkbox,Lb as CheckboxList,Yv as CheckboxOptionCard,Sv as CloseButton,Jy as ClusterPoint,Vy as Combobox,qe as DesignSystemLocaleProvider,Bk as ExtendableCard,ZA as Footer,Fv as FormContainer,Km as IconButton,SA as InlineMessage,cy as InputWithUnits,lk as ItemCount,$x as LayerGroup,Sx as LayerGroupContainer,kx as LayerItem,Lx as LayerParameters,jx as LegendItem,vk as List,Av as MapControlsToolbar,Gy as MapMarker,Yy as MapMarkers,px as MapPopUp,Fg as Menu,VA as MobileSearch,eN as MobileTabBar,U$ as Modal,Vv as MultiActionButton,$N as Navbar,LN as NavigationRail,ib as OptionCard,xk as Pagination,Q$ as Panel,vy as Password,sR as ProgressBar,Xx as QualitativeAttribute,cb as Radio,db as RadioGroup,Sy as RadioList,xv as RichTextEditor,kv as SSOButtons,ok as ScaleBar,jN as Search,ly as Select,fA as Sheet,Xy as SimpleMapPin,yb as Slider,Oy as SliderInput,pR as StepProgressIndicator,Cb as Switch,HN as TabBar,Ik as Table,Vk as TableCell,zk as TableRow,iy as Tag,mv as TextInput,zy as Textarea,xR as Toast,Lv as Toolbar,Ug as Tooltip,Ie as designSystemStyles,Pe as designSystemStylesForTailwind,je as getThemedBorderWidth,ze as getThemedColor,Ve as getThemedFontSize,_e as getThemedLineHeight,Be as getThemedRadius,He as getThemedSpacing,CR as showToast};
|
|
4039
|
+
`),width:{md:"sm"},children:[be(X,{flexDirection:"row",className:"ds-toast-icon-container",alignItems:n.description?"flex-start":"center",children:["info"===n.type?n.meta?.icon?n.meta.icon:ye(Ym,{color:"var(--chakra-colors-neutral-700)"}):null,"loading"===n.type?ye(o,{size:"lg",borderWidth:"0.1875rem",color:"var(--chakra-colors-primary-500)"}):null,"success"===n.type?n.meta?.icon?n.meta.icon:ye(ig,{color:"var(--chakra-colors-success-500)"}):null,"warning"===n.type?n.meta?.icon?n.meta.icon:ye(sg,{color:"var(--chakra-colors-warning-500)"}):null,"error"===n.type?n.meta?.icon?n.meta.icon:ye(ag,{color:"var(--chakra-colors-error-500)"}):null,be(X,{gap:"1",flex:"1",maxWidth:"100%",children:[ye(J.Title,{css:fR,"aria-label":`${n.title}`,children:n.title}),n.description?ye(J.Title,{css:mR,"aria-label":`${n.description}`,children:n.description}):null]})]}),n.action||n.meta?.closable?be(X,{flexDirection:"row",children:[n.action?ye(Wm,{css:gR,label:n.action.label,size:"small",variant:"info"===n.type?"primary":"secondary",onClick:()=>{n?.action?.onClick&&n.action.onClick(),yR[e].dismiss()}}):null,n.meta?.closable?ye(Wm,{css:vR,label:n.meta.closableLabel,"aria-label":n.meta?.closableLabel||t.dismissLabel,leftIcon:ye(tg,{height:"0.625rem!",width:"0.625rem!"}),size:"small",variant:"secondary",onClick:()=>{n.meta?.onClose&&n.meta.onClose(),yR[e].dismiss()}}):null]}):null]});var r}})},e)))};export{rR as AlertBanner,Uk as AnalysisWidget,KN as Avatar,tR as Badge,Ky as BaseMap,jA as Breadcrumb,Wm as Button,Wv as Checkbox,Lb as CheckboxList,Yv as CheckboxOptionCard,Sv as CloseButton,Jy as ClusterPoint,Vy as Combobox,qe as DesignSystemLocaleProvider,Bk as ExtendableCard,ZA as Footer,Fv as FormContainer,Km as IconButton,SA as InlineMessage,cy as InputWithUnits,lk as ItemCount,$x as LayerGroup,Sx as LayerGroupContainer,kx as LayerItem,Lx as LayerParameters,jx as LegendItem,vk as List,Av as MapControlsToolbar,Gy as MapMarker,Yy as MapMarkers,px as MapPopUp,Fg as Menu,VA as MobileSearch,eN as MobileTabBar,U$ as Modal,Vv as MultiActionButton,$N as Navbar,LN as NavigationRail,ib as OptionCard,xk as Pagination,Q$ as Panel,vy as Password,sR as ProgressBar,Xx as QualitativeAttribute,cb as Radio,db as RadioGroup,Sy as RadioList,xv as RichTextEditor,kv as SSOButtons,ok as ScaleBar,jN as Search,ly as Select,fA as Sheet,Xy as SimpleMapPin,yb as Slider,Oy as SliderInput,pR as StepProgressIndicator,Cb as Switch,HN as TabBar,Ik as Table,Vk as TableCell,zk as TableRow,iy as Tag,mv as TextInput,zy as Textarea,xR as Toast,Lv as Toolbar,Ug as Tooltip,CR as closeToast,Ie as designSystemStyles,Pe as designSystemStylesForTailwind,je as getThemedBorderWidth,ze as getThemedColor,Ve as getThemedFontSize,_e as getThemedLineHeight,Be as getThemedRadius,He as getThemedSpacing,wR as showToast};
|