@worldresources/wri-design-systems 2.202.7 → 2.202.9
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 +74 -62
- package/dist/index.d.ts +8 -4
- package/dist/index.esm.js +1609 -1597
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1953,7 +1953,7 @@
|
|
|
1953
1953
|
padding: ${k(200)} ${k(300)};
|
|
1954
1954
|
border-bottom: ${M(100)} solid
|
|
1955
1955
|
${w("neutral",300)};
|
|
1956
|
-
min-height: ${k(
|
|
1956
|
+
min-height: ${k(1e3)};
|
|
1957
1957
|
|
|
1958
1958
|
.ds-map-pop-up-close-button {
|
|
1959
1959
|
margin-top: ${k(100)};
|
|
@@ -3906,86 +3906,98 @@ function _E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3906
3906
|
line-height: ${S(400)};
|
|
3907
3907
|
font-weight: 700;
|
|
3908
3908
|
color: ${w("error",100)};
|
|
3909
|
-
`,children:r.jsx("p",{"aria-label":m.unreadMessagesLabel(d||0),children:b})})}):null]})})),YO=i.css`
|
|
3909
|
+
`,children:r.jsx("p",{"aria-label":m.unreadMessagesLabel(d||0),children:b})})}):null]})})),YO={small:{fontSize:h(8),boxSize:h(10),padding:h(2)},large:{fontSize:h(12),boxSize:h(20),padding:`${h(2)} ${h(4)}`}},QO=i.css`
|
|
3910
3910
|
display: flex;
|
|
3911
3911
|
justify-content: flex-start;
|
|
3912
3912
|
align-items: center;
|
|
3913
3913
|
gap: ${k(200)};
|
|
3914
|
-
`,
|
|
3915
|
-
width: ${e||k(400)};
|
|
3914
|
+
`,eL=e=>i.css`
|
|
3916
3915
|
position: relative;
|
|
3917
3916
|
display: flex;
|
|
3918
|
-
`,
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
border-radius: ${$(500)};
|
|
3931
|
-
display: flex;
|
|
3932
|
-
justify-content: center;
|
|
3933
|
-
align-items: center;
|
|
3934
|
-
position: absolute;
|
|
3935
|
-
top: -${k(50)};
|
|
3936
|
-
left: 0.5625rem;
|
|
3937
|
-
`,nL=i.css`
|
|
3938
|
-
font-size: ${C(200)};
|
|
3939
|
-
line-height: ${S(400)};
|
|
3940
|
-
font-weight: 700;
|
|
3941
|
-
color: ${w("error",100)};
|
|
3942
|
-
`,rL=i.css`
|
|
3943
|
-
height: ${k(400)};
|
|
3944
|
-
min-width: ${k(400)};
|
|
3945
|
-
background-color: ${w("error",500)};
|
|
3946
|
-
border-radius: ${$(700)};
|
|
3947
|
-
display: flex;
|
|
3948
|
-
justify-content: center;
|
|
3949
|
-
align-items: center;
|
|
3950
|
-
padding: 0rem ${k(100)} 0.0625rem ${k(100)};
|
|
3951
|
-
`,oL=i.css`
|
|
3952
|
-
font-size: ${C(400)};
|
|
3953
|
-
line-height: ${S(600)};
|
|
3954
|
-
font-weight: 700;
|
|
3955
|
-
color: ${w("error",100)};
|
|
3956
|
-
`,iL=e=>{let t="",n="",r="";return"success"===e?(t=w("success",100),n=w("success",500),r=w("success",300)):"warning"===e?(t=w("warning",100),n=w("warning",500),r=w("warning",300)):"error"===e?(t=w("error",100),n=w("error",500),r=w("error",300)):"information"===e?(t=w("secondary",100),n=w("secondary",500),r=w("secondary",200)):"general-grey"===e?(t=w("neutral",200),n=w("neutral",700),r=w("neutral",300)):(t=w("neutral",100),n=w("neutral",700),r=w("neutral",300)),i.css`
|
|
3917
|
+
`,tL=(e="large")=>{const t=k("small"===e?100:200);return i.css`
|
|
3918
|
+
height: ${t};
|
|
3919
|
+
width: ${t};
|
|
3920
|
+
background-color: ${w("error",500)};
|
|
3921
|
+
border-radius: ${$(900)};
|
|
3922
|
+
position: absolute;
|
|
3923
|
+
top: 0rem;
|
|
3924
|
+
right: 0rem;
|
|
3925
|
+
`},nL=(e="large")=>{const{boxSize:t,padding:n}=YO[e];return i.css`
|
|
3926
|
+
background-color: ${w("error",500)};
|
|
3927
|
+
padding: ${n};
|
|
3928
|
+
border-radius: 9999px;
|
|
3957
3929
|
display: flex;
|
|
3958
|
-
|
|
3930
|
+
justify-content: center;
|
|
3959
3931
|
align-items: center;
|
|
3960
|
-
|
|
3961
|
-
|
|
3932
|
+
position: absolute;
|
|
3933
|
+
top: 0;
|
|
3934
|
+
left: calc(100% - ${t} / 2);
|
|
3935
|
+
transform: translateY(-25%);
|
|
3936
|
+
width: auto;
|
|
3937
|
+
min-width: ${t};
|
|
3938
|
+
height: ${t};
|
|
3939
|
+
`},rL=(e="large")=>{const{fontSize:t}=YO[e];return i.css`
|
|
3940
|
+
font-size: ${t};
|
|
3941
|
+
line-height: 1;
|
|
3942
|
+
font-weight: 700;
|
|
3943
|
+
color: ${w("error",100)};
|
|
3944
|
+
`},oL=(e="large")=>{const{boxSize:t}=YO[e];return i.css`
|
|
3945
|
+
height: ${t};
|
|
3946
|
+
min-width: ${t};
|
|
3947
|
+
background-color: ${w("error",500)};
|
|
3948
|
+
border-radius: ${$(700)};
|
|
3949
|
+
display: flex;
|
|
3950
|
+
justify-content: center;
|
|
3951
|
+
align-items: center;
|
|
3952
|
+
padding: 0rem ${k(100)} 0.0625rem ${k(100)};
|
|
3953
|
+
`},iL=(e="large")=>{const{fontSize:t}=YO[e];return i.css`
|
|
3954
|
+
font-size: ${t};
|
|
3955
|
+
line-height: ${S(600)};
|
|
3956
|
+
font-weight: 700;
|
|
3957
|
+
color: ${w("error",100)};
|
|
3958
|
+
`},sL=(e,t="full-width",n=!1)=>{let r="",o="",s="";return"success"===e?(r=w("success",100),o=w("success",500),s=w("success",300)):"warning"===e?(r=w("warning",100),o=w("warning",500),s=w("warning",300)):"error"===e?(r=w("error",100),o=w("error",500),s=w("error",300)):"information"===e?(r=w("secondary",100),o=w("secondary",500),s=w("secondary",200)):"general-grey"===e?(r=w("neutral",200),o=w("neutral",700),s=w("neutral",300)):(r=w("neutral",100),o=w("neutral",700),s=w("neutral",300)),i.css`
|
|
3959
|
+
display: ${"inline"===t?"inline-flex":"flex"};
|
|
3960
|
+
width: ${"inline"===t?"fit-content":"100%"};
|
|
3961
|
+
max-width: 100%;
|
|
3962
|
+
color: ${o};
|
|
3963
|
+
align-items: flex-start;
|
|
3964
|
+
padding-right: 2.5rem;
|
|
3965
|
+
justify-content: ${n?"center":"flex-start"};
|
|
3966
|
+
background-color: ${r};
|
|
3967
|
+
border-bottom: ${M(100)} solid ${s};
|
|
3962
3968
|
border-radius: 0;
|
|
3963
|
-
`},
|
|
3969
|
+
`},aL=e=>i.css`
|
|
3970
|
+
rotate: ${"error"===e?"180deg":""};
|
|
3971
|
+
svg {
|
|
3972
|
+
width: 1rem;
|
|
3973
|
+
height: 1rem;
|
|
3974
|
+
}
|
|
3975
|
+
`,lL=l.forwardRef((({title:t,children:n,icon:o,variant:i,onClose:s,labels:a,isCentered:c=!1,width:d="full-width"},u)=>{const h=Vf("AlertBanner",a),[p,f]=l.useState(!0),m="success"===i?r.jsx(em,{}):"warning"===i?r.jsx(tm,{}):r.jsx(Kf,{});return p?r.jsxs(e.Alert.Root,{css:sL(i,d,c),children:[r.jsx(e.Alert.Indicator,{css:aL(i),children:o||m}),n?r.jsx(e.Alert.Content,{flex:c?"initial":void 0,children:r.jsxs("div",{style:{display:"flex",gap:"0.75rem",alignItems:"center"},children:[r.jsx(e.Alert.Title,{children:t}),r.jsx(e.Alert.Description,{children:n})]})}):r.jsx(e.Alert.Title,{flex:c?"initial":"1",children:t}),r.jsx(Sg,{"aria-label":h.closeAlertLabel,pos:"absolute",top:"1rem",insetEnd:"2",onClick:()=>{f(!1),s?.()}})]}):null})),cL=i.css`
|
|
3964
3976
|
height: ${k(200)};
|
|
3965
3977
|
width: 100%;
|
|
3966
3978
|
background-color: ${w("neutral",300)};
|
|
3967
3979
|
display: flex;
|
|
3968
3980
|
align-items: center;
|
|
3969
3981
|
justify-content: flex-start;
|
|
3970
|
-
`,
|
|
3982
|
+
`,dL=(e,t)=>i.css`
|
|
3971
3983
|
height: 100%;
|
|
3972
3984
|
width: ${e}%;
|
|
3973
3985
|
background-color: ${t??w("primary",500)};
|
|
3974
3986
|
transition: width 0.5s ease-in-out;
|
|
3975
|
-
`,
|
|
3987
|
+
`,uL=i.css`
|
|
3976
3988
|
width: 100%;
|
|
3977
3989
|
display: flex;
|
|
3978
3990
|
align-items: center;
|
|
3979
3991
|
justify-content: space-between;
|
|
3980
3992
|
position: relative;
|
|
3981
|
-
`,
|
|
3993
|
+
`,hL=i.css`
|
|
3982
3994
|
height: 3.75rem;
|
|
3983
3995
|
width: ${k(2e3)};
|
|
3984
3996
|
display: flex;
|
|
3985
3997
|
flex-direction: column;
|
|
3986
3998
|
align-items: center;
|
|
3987
3999
|
justify-content: space-between;
|
|
3988
|
-
`,
|
|
4000
|
+
`,pL=(e,t)=>i.css`
|
|
3989
4001
|
height: ${k(800)};
|
|
3990
4002
|
width: ${k(800)};
|
|
3991
4003
|
display: flex;
|
|
@@ -4021,12 +4033,12 @@ function _E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4021
4033
|
}
|
|
4022
4034
|
|
|
4023
4035
|
${t?`\n background-color: ${w("neutral",300)};\n \n &:hover {\n background-color: ${w("neutral",300)};\n box-shadow: none;\n }\n `:""}
|
|
4024
|
-
`,
|
|
4036
|
+
`,fL=e=>i.css`
|
|
4025
4037
|
color: ${w("neutral",e?800:600)};
|
|
4026
4038
|
font-size: ${C(300)};
|
|
4027
4039
|
line-height: ${S(500)};
|
|
4028
4040
|
font-weight: 400;
|
|
4029
|
-
`,
|
|
4041
|
+
`,mL=i.css`
|
|
4030
4042
|
height: ${M(100)};
|
|
4031
4043
|
width: 100%;
|
|
4032
4044
|
padding: 0 1.875rem;
|
|
@@ -4034,25 +4046,25 @@ function _E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4034
4046
|
top: ${k(400)};
|
|
4035
4047
|
left: 0;
|
|
4036
4048
|
z-index: -1;
|
|
4037
|
-
`,
|
|
4049
|
+
`,gL=i.css`
|
|
4038
4050
|
height: ${M(100)};
|
|
4039
4051
|
width: 100%;
|
|
4040
4052
|
background-color: ${w("neutral",400)};
|
|
4041
|
-
`,
|
|
4053
|
+
`,bL=i.css`
|
|
4042
4054
|
font-size: ${C(500)};
|
|
4043
4055
|
line-height: ${S(700)};
|
|
4044
4056
|
font-weight: 400;
|
|
4045
4057
|
color: ${w("neutral",800)};
|
|
4046
|
-
`,
|
|
4058
|
+
`,vL=i.css`
|
|
4047
4059
|
font-size: ${C(400)};
|
|
4048
4060
|
line-height: ${S(600)};
|
|
4049
4061
|
font-weight: 400;
|
|
4050
4062
|
color: ${w("neutral",700)};
|
|
4051
|
-
`,
|
|
4063
|
+
`,yL=i.css`
|
|
4052
4064
|
padding: 0.375rem;
|
|
4053
|
-
`,
|
|
4065
|
+
`,xL=i.css`
|
|
4054
4066
|
padding: 0.375rem;
|
|
4055
|
-
`,
|
|
4067
|
+
`,wL={pauseOnPageIdle:!0,offsets:"1.5rem"},CL={"top-start":e.createToaster({placement:"top-start",...wL}),top:e.createToaster({placement:"top",...wL}),"top-end":e.createToaster({placement:"top-end",...wL}),"bottom-start":e.createToaster({placement:"bottom-start",...wL}),bottom:e.createToaster({placement:"bottom",...wL}),"bottom-end":e.createToaster({placement:"bottom-end",...wL})};exports.AlertBanner=lL,exports.AnalysisWidget=({children:t,header:o,footer:i,expanded:s=!0,collapsible:a=!0,actions:l,showFooterOnCollapsed:c=!1,labels:d})=>{Vf("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(Bf,{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(Gf,{"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=XO,exports.Badge=({hasNotification:e,notificationCount:t,label:o,labels:i,children:s,size:a="large"})=>{const l=Vf("Badge",i),[c,d]=n.useState(!1);n.useEffect((()=>{const e=()=>{window.innerWidth<1024?d(!0):d(!1)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const u=(()=>{let e="";return t&&t>0&&(e=`${t>99?"99+":t}`),e})(),h="small"===a?"1rem":"1.5rem";return c?r.jsxs("div",{css:QO,role:"status","aria-live":"polite",children:[r.jsxs("div",{css:eL(),children:[r.jsx(om,{color:"currentColor",height:h,width:h}),!e||t||o?null:r.jsx("div",{css:tL(a),"aria-hidden":!0})]}),o?r.jsx("p",{children:o}):null,u.length>0?r.jsx("div",{css:oL(a),children:r.jsx("p",{css:iL(a),"aria-label":l.unreadMessagesLabel(t||0),children:u})}):null]}):r.jsxs("div",{css:QO,role:"status","aria-live":"polite",children:[o?r.jsx("p",{children:o}):null,r.jsxs("div",{css:eL(),children:[u.length>0?r.jsx("div",{css:nL(a),children:r.jsx("p",{css:rL(a),"aria-label":l.unreadMessagesLabel(t||0),children:u})}):null,e&&!t?r.jsx("div",{css:tL(a),"aria-hidden":!0}):null,s??r.jsx(om,{color:"currentColor",height:h,width:h})]})]})},exports.BaseMap=({title:e,caption:t,additionalSettings:o,options:s,onOptionSelected:a,maxHeight:l="25rem",maxWidth:c="16.25rem",labels:d})=>{const u=Vf("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:av(l,c),children:r.jsxs("div",{className:"ds-base-map-scroll-content",children:[r.jsxs("div",{css:lv,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:cv,children:[o?r.jsx("div",{css:dv,children:o.map((e=>r.jsxs("div",{children:[r.jsx(_g,{css:{},checked:e.checked,onCheckedChange:({checked:t})=>e.onCheckedChange({checked:Boolean(t)}),children:e.label}),e.checked&&e.children?r.jsx("div",{css:uv,children:e.children}):null]},e.label)))}):null,s?r.jsx("div",{css:hv,children:s.map((e=>{return r.jsxs("div",{css:pv(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`
|
|
4056
4068
|
height: ${k(800)};
|
|
4057
4069
|
width: ${k(800)};
|
|
4058
4070
|
border: ${M(100)} solid ${w("neutral",300)};
|
|
@@ -4171,14 +4183,14 @@ function _E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4171
4183
|
font-weight: 700;
|
|
4172
4184
|
color: ${w("medium"===y?"warning":"strong"===y||"very-strong"===y?"success":"error",900)};
|
|
4173
4185
|
}
|
|
4174
|
-
`),"aria-live":"polite",role:"status",children:[u.strengthPrefix," ",r.jsx("span",{children:v[g.strength]})]}),r.jsx("div",{css:Kb(g.strength),children:r.jsx("div",{})}),r.jsxs("div",{css:Gb(g.length),"aria-label":`${u.minLengthRule(l)}. ${g.length?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.length?r.jsx(Wf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(Jf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.minLengthRule(l)})]}),s?.uppercase?null:r.jsxs("div",{css:Gb(g.uppercase),"aria-label":`${u.uppercaseRule}. ${g.uppercase?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.uppercase?r.jsx(Wf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(Jf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.uppercaseRule})]}),s?.lowercase?null:r.jsxs("div",{css:Gb(g.lowercase),"aria-label":`${u.lowercaseRule}. ${g.lowercase?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.lowercase?r.jsx(Wf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(Jf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.lowercaseRule})]}),s?.numbers?null:r.jsxs("div",{css:Gb(g.numbers),"aria-label":`${u.numberRule}. ${g.numbers?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.numbers?r.jsx(Wf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(Jf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.numberRule})]}),s?.specialCharacters?null:r.jsxs("div",{css:Gb(g.specialCharacters),"aria-label":`${u.specialCharRule}. ${g.specialCharacters?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.specialCharacters?r.jsx(Wf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(Jf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.specialCharRule})]})]}):null]})});var y},exports.ProgressBar=({progress:e,labels:t,color:n})=>{const o=Vf("ProgressBar",t);let i=e;return i>100&&(i=100),i<0&&(i=0),r.jsx("div",{css:
|
|
4186
|
+
`),"aria-live":"polite",role:"status",children:[u.strengthPrefix," ",r.jsx("span",{children:v[g.strength]})]}),r.jsx("div",{css:Kb(g.strength),children:r.jsx("div",{})}),r.jsxs("div",{css:Gb(g.length),"aria-label":`${u.minLengthRule(l)}. ${g.length?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.length?r.jsx(Wf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(Jf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.minLengthRule(l)})]}),s?.uppercase?null:r.jsxs("div",{css:Gb(g.uppercase),"aria-label":`${u.uppercaseRule}. ${g.uppercase?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.uppercase?r.jsx(Wf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(Jf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.uppercaseRule})]}),s?.lowercase?null:r.jsxs("div",{css:Gb(g.lowercase),"aria-label":`${u.lowercaseRule}. ${g.lowercase?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.lowercase?r.jsx(Wf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(Jf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.lowercaseRule})]}),s?.numbers?null:r.jsxs("div",{css:Gb(g.numbers),"aria-label":`${u.numberRule}. ${g.numbers?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.numbers?r.jsx(Wf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(Jf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.numberRule})]}),s?.specialCharacters?null:r.jsxs("div",{css:Gb(g.specialCharacters),"aria-label":`${u.specialCharRule}. ${g.specialCharacters?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.specialCharacters?r.jsx(Wf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(Jf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.specialCharRule})]})]}):null]})});var y},exports.ProgressBar=({progress:e,labels:t,color:n})=>{const o=Vf("ProgressBar",t);let i=e;return i>100&&(i=100),i<0&&(i=0),r.jsx("div",{css:cL,role:"progressbar","aria-label":o.progressAriaLabel(i),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":i,children:r.jsx("div",{css:dL(i,n)})})},exports.QualitativeAttribute=({type:e,label:t,caption:o,color:i,onActionClick:s,showActionButton:a,pointIcon:l=r.jsx(hm,{color:"#006D2C"}),ariaLabelType:c="",labels:d})=>{const u=Vf("QualitativeAttribute",d),[h,p]=n.useState(!0),f=n.useId(),m=n.useId(),g="raster"===e,b="line"===e,v="point"===e,y=n.useId(),x=n.useMemo((()=>{const e=h?u.visibleText:u.hiddenText;let n=c??`${c},`;return b&&(n=u.linePrefix),u.currentlyTemplate(String(t),o,n,e)}),[h,e,t,o,c,u]),w=h?u.hideLabel:u.showLabel;return r.jsxs("div",{css:sw,children:[r.jsx("p",{id:y,css:{position:"absolute",width:1,height:1,margin:-1,padding:0,border:0,clip:"rect(0 0 0 0)",overflow:"hidden"},children:x}),r.jsxs("div",{css:aw,children:[r.jsxs("div",{children:[g&&r.jsx("div",{css:rw(i)}),b&&r.jsx("div",{css:ow(i)}),v&&r.jsx("div",{css:iw(i),children:l})]}),r.jsxs("div",{children:[r.jsx("p",{id:f,css:lw,children:t}),o?r.jsx("p",{id:m,css:cw,children:o}):null]})]}),s&&a?r.jsx("div",{css:dw,children:r.jsx(Bf,{type:"button",variant:"borderless",label:String(w),rightIcon:h?r.jsx(Qf,{}):r.jsx(Yf,{}),"aria-pressed":h,"aria-labelledby":`${y} ${f}`,onClick:()=>{p((e=>!e)),s?.()}})}):null]})},exports.Radio=ob,exports.RadioGroup=ib,exports.RadioList=({label:e,caption:t,name:n,radios:o,defaultValue:i,onCheckedChange:s,errorMessage:a,horizontal:l,variant:c="default",required:d,labels:u})=>{const h=Vf("RadioList",u),p=`${e}. ${t?`${t}.`:""} ${d?h.requiredLabel:h.optionalLabel} ${a?`${h.errorPrefix} ${a}.`:""} `;return r.jsx(ag,{label:e,caption:t,errorMessage:a,required:d,showOptionalLabel:!1,noMarginBottom:!0,semantics:"group",labels:{requiredSymbolLabel:h.requiredSymbolLabel},containerProps:{"aria-roledescription":"group","aria-label":p},children:r.jsx(ib,{name:n,value:i,onChange:s,horizontal:l&&"card"!==c,children:o.map((e=>r.jsx(ob,{css:"card"===c?Zb:{},...e},e.value)))})})},exports.RichTextEditor=({defaultValue:e="",disabled:t=!1,ariaLabel:n,placeholder:o,minHeight:i,visibleControls:s=wg,onChange:a,labels:c})=>{const d=Vf("RichTextEditor",c),u=n||d.editorAriaLabel,h=o||d.placeholder,p=i,f=pf({extensions:[ap.configure({link:!1}),ru.configure({openOnClick:!0,autolink:!0,defaultProtocol:"https"}),oc,ip,qu.configure({placeholder:h,emptyEditorClass:"is-editor-empty"}),Wu,Uu,Ku.configure({types:["paragraph","heading"]}),th],content:e,editable:!t,shouldRerenderOnTransaction:!0,immediatelyRender:!1,onUpdate:({editor:e})=>{a?.(e.getHTML())},editorProps:{attributes:{"aria-label":u}}},[h,u]);return l.useEffect((()=>{f&&f.setEditable(!t)}),[f,t]),r.jsxs(xg.Root,{editor:f,disabled:t,css:{"& .ProseMirror":{minHeight:p||0}},children:[r.jsx(xg.Toolbar,{children:r.jsxs(xg.ControlGroup,{children:[s.includes("undo")?r.jsx(ng,{label:d.undoTooltip}):null,s.includes("redo")?r.jsx(rg,{label:d.redoTooltip}):null,s.includes("textType")?r.jsx(Km,{label:d.textTypeTooltip}):null,s.includes("alignment")?r.jsx(ig,{label:d.alignmentTooltip,alignLeftLabel:d.alignLeftOptionLabel,alignCenterLabel:d.alignCenterOptionLabel,alignRightLabel:d.alignRightOptionLabel,alignJustifyLabel:d.alignJustifyOptionLabel}):null,s.includes("fontSize")?r.jsx(Gm,{label:d.fontSizeTooltip}):null,s.includes("bold")?r.jsx(Zm,{label:d.boldTooltip,icon:r.jsx("strong",{css:{fontSize:C(600),lineHeight:1},children:d.boldIconText})}):null,s.includes("italic")?r.jsx(Jm,{label:d.italicTooltip,icon:r.jsx("em",{css:{fontStyle:"italic",fontSize:C(600),lineHeight:1},children:d.italicIconText})}):null,s.includes("underline")?r.jsx(Xm,{label:d.underlineTooltip,icon:r.jsx("span",{css:{fontSize:C(600),lineHeight:1,textDecoration:"underline"},children:d.underlineIconText})}):null,s.includes("strikethrough")?r.jsx(Ym,{label:d.strikethroughTooltip,icon:r.jsx("span",{css:{fontSize:C(600),lineHeight:1,textDecoration:"line-through"},children:d.strikethroughIconText})}):null,s.includes("bulletList")?r.jsx(Qm,{label:d.bulletListTooltip}):null,s.includes("orderedList")?r.jsx(eg,{label:d.orderedListTooltip}):null,s.includes("link")?r.jsx(bg,{label:d.linkTooltip,urlPlaceholder:d.linkUrlPlaceholder,labelPlaceholder:d.linkLabelPlaceholder,labelInputAriaLabel:d.linkLabelAriaLabel,applyLabel:d.linkApplyLabel,removeLabel:d.linkRemoveLabel,invalidUrlMessage:d.linkInvalidUrlMessage}):null,s.includes("image")?r.jsx(tg,{label:d.imageTooltip}):null]})}),r.jsx(xg.Content,{})]})},exports.SSOButtons=Cg,exports.ScaleBar=({colors:e,values:t,subLabels:n,isGradient:o})=>{return r.jsxs("div",{css:uw,children:[o?r.jsx("div",{css:(s=gw(e),i.css`
|
|
4175
4187
|
height: ${k(500)};
|
|
4176
4188
|
width: 100%;
|
|
4177
4189
|
margin-bottom: ${k(200)};
|
|
4178
4190
|
border: ${M(100)} solid ${w("neutral",300)};
|
|
4179
4191
|
border-radius: ${$(300)};
|
|
4180
4192
|
${s?`background: ${s};`:""}
|
|
4181
|
-
`)}):r.jsx("div",{css:hw,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:pw,children:t?.map((e=>r.jsx("div",{style:{width:o?"auto":`calc(100% / ${t.length})`,display:"flex",justifyContent:"center"},children:r.jsx("p",{css:fw,children:e})},e)))}),n&&n.length?r.jsx("div",{css:pw,children:n.map((e=>r.jsx("div",{style:{width:o?"auto":`calc(100% / ${t.length})`,display:"flex",justifyContent:"center"},children:r.jsx("p",{css:mw,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=Vf("Search",m),[b,v]=n.useState(""),{open:y,onOpen:x,onClose:C}=e.useDisclosure(),[k,S]=n.useState(s),[$,M]=n.useState(-1),[E,j]=n.useState(!1),[T,O]=n.useState("pointer"),L=n.useRef(null),{contentRef:A,placement:R}=tv(),N=`search-results-${n.useId()}`,D=e=>{const t=s.find((t=>t.id===e||UO(t)===e));t&&(d?.(t),v(""),C())};n.useEffect((()=>{if(h?.(b),!b)return void S(s);const e=s.filter((e=>{const t=b.toLowerCase();return e.id?.toLowerCase().includes(t)||UO(e).toLowerCase().includes(t)||e.caption?.toLowerCase().includes(t)})).map((e=>({id:e.id??UO(e),label:e.label,searchLabel:e.searchLabel,caption:e.caption,variant:"select",icon:e.icon,onItemClick:()=>D(e.id||UO(e))})));S(e),x()}),[b]);const I=b.length?r.jsx(Sg,{onClick:()=>{v(""),p?.()}}):null,P="none"!==c&&!!b.length&&k.length>0&&y,z=(P||l&&!!b.length)&&"custom"!==c;let V=w("neutral",500);o?V=w("neutral",500):E&&(V=w("primary",700));const B="small"===i?"1rem":"1.25rem",H=u(a);return r.jsxs(e.Popover.Root,{open:z,onOpenChange:e=>{e.open||C()},autoFocus:!1,closeOnEscape:!1,positioning:{sameWidth:!0,gutter:0},children:[r.jsxs("div",{ref:L,css:HO,"data-open":z||void 0,"data-placement":R,children:[r.jsx(e.Popover.Anchor,{children:r.jsx(e.InputGroup,{startElement:r.jsx(Sm,{width:B,height:B,fill:V}),endElement:I,children:r.jsx(gg,{autoComplete:"off",placeholder:t||g.filterPlaceholder,onChange:e=>{const{value:t}=e.target;v(t)},onFocus:()=>j(!0),onBlur:()=>j(!1),value:b,label:"",style:{paddingLeft:"2.5rem"},type:"search","aria-label":t||g.filterAriaLabel,"aria-expanded":P,"aria-controls":N,role:"combobox","aria-autocomplete":"list",disabled:o,size:i,noMarginBottom:!0,onKeyDown:e=>{if(P){if("ArrowDown"===e.key&&(e.preventDefault(),O("keyboard"),M((e=>Math.min(e+1,k.length-1)))),"ArrowUp"===e.key&&(e.preventDefault(),O("keyboard"),M((e=>Math.max(e-1,0)))),"Enter"===e.key&&(e.preventDefault(),$>=0)){const e=k[$];D(e.id||UO(e))}"Escape"===e.key&&C()}}})})}),(P||l&&!!b.length)&&"custom"===c&&f&&!l&&f({items:k,highlightedIndex:$,query:b,onSelect:D})]}),r.jsx(e.Portal,{children:r.jsx(e.Popover.Positioner,{children:r.jsxs(e.Popover.Content,{ref:A,css:_O,style:{maxHeight:H},"data-nav-source":T,onPointerMove:()=>O("pointer"),children:[l&&r.jsx(e.Box,{padding:"1rem",children:r.jsx(e.Spinner,{})}),"text"===c&&!l&&r.jsx(WO,{highlightedIndex:$,items:k,query:b,onSelect:D}),"list"===c&&!l&&r.jsx(Tw,{items:k,highlightedIndex:$})]})})})]})},exports.Select=Fb,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,labels:f})=>{const m=Vf("Sheet",f),g=n.useRef(null),b=n.useRef([]),[v,y]=n.useState(null),x=window.innerWidth>768,w=b.current;let C=m.expandSheetLabel;if(null!=v){const e=wT(v,w);e>0&&e<w.length-1?C=m.makeFullScreenLabel:e===w.length-1&&(C=m.expandedSheetLabel)}const k=!(null==v||!w.length||wT(v,w)!==w.length-1);return r.jsx(vT,{ref:g,css:xT(!!e,p),className:u,open:i,onDismiss:s,header:r.jsxs("div",{children:[r.jsx("button",{type:"button",disabled:k,"aria-label":C,css:yT,onKeyDown:e=>{if("Enter"!==e.key&&" "!==e.key)return;e.preventDefault();const t=w[w.length-1];if(x)return void g.current?.snapTo?.((()=>t));const n=v??w[0];let r=w.findIndex((e=>e>n));-1===r&&(r=w.length-1);const o=w[r];g.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:C}),e]}),footer:o,snapPoints:({headerHeight:e,maxHeight:t,footerHeight:n})=>{const r=[20,a||e,l+(o?n:0),c||t-t/6];return b.current=r,r},onSpringEnd:()=>{const e=g.current?.height;e&&y(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(gv,{count:o,mode:i,onClick:e,ref:n,showFocusState:r,variant:s}),exports.Slider=fb,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.jsx(ag,{label:e,caption:t,required:s,size:o,showOptionalLabel:!1,noMarginBottom:!0,semantics:"group",children:r.jsxs("div",{css:Jb,children:[i.step&&i.marks?r.jsx(Fb,{items:i.marks.map((e=>{const t="number"==typeof e?e:e.value;return{label:`${"number"==typeof e?e:e.label}`,value:`${t}`}})),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(gg,{"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(),noMarginBottom:!0}),r.jsx(fb,{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(gg,{"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(),noMarginBottom:!0}):null]})})},exports.StepProgressIndicator=({steps:e,currentStep:t,labels:n})=>{const o=Vf("StepProgressIndicator",n);return r.jsxs("div",{css:cL,children:[e.map(((e,n)=>r.jsxs("div",{css:dL,children:[r.jsx("button",{css:uL(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(Wf,{height:"1rem",width:"1rem"}):n+1}),e.label?r.jsx("p",{css:hL(t===n+1),children:e.label}):null]},`${e.label}-${n}`))),r.jsx("div",{css:pL,children:r.jsx("div",{css:fL})})]})},exports.Switch=gb,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:b,loading:v,height:y,labels:x})=>{const C=Vf("Table",x),[k,S]=n.useState({key:"",order:""}),$=n.useRef({}),M=n.useRef(null),[E,j]=n.useState({}),[T,O]=n.useState([]),{totalItems:L=i.length,currentPage:A=1,pageSize:R=10,showItemCount:N,showItemCountText:D}=c||{},I=Boolean(p),P=n.useMemo((()=>Gw(i,k,I)),[i,I,k]),z=(e,t)=>{S({key:e,order:t}),p&&p({key:e,order:t})},V=u??T,B=P.length>0&&V.length===P.length,H=V.length>0&&V.length<P.length,_=n.useMemo((()=>(e=>e.reduce(((e,t)=>(e[t.key]=t,e)),{}))(o)),[o]),F=n.useMemo((()=>(e=>e.filter((e=>e.sticky)).map((e=>e.key)))(o)),[o]),q=(e=>e.length>0?e[e.length-1]:void 0)([...void 0!==E[Ww]?[Ww]:[],...F]),W=n.useCallback((()=>{const e=((e,t,n)=>{const r={};let o=0;const i=e.filter((e=>e.sticky));return n&&i.length>0&&(r[Ww]=0,o+=n.offsetWidth),i.forEach((e=>{r[e.key]=o,o+=t[e.key]?.offsetWidth||0})),r})(o,$.current,d?M.current:void 0);j(e)}),[o,d]);n.useEffect((()=>{W()}),[W,i.length]),n.useEffect((()=>{const e=()=>{W()};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[W]),n.useEffect((()=>{void 0===u&&O((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 U=e=>Kw(E,e.key,q),K=e=>((e,t,n,r)=>({...Uw(e,n),...Kw(t,n,r)}))(_,E,e,q),G=e=>((e,t)=>e.some((e=>e.id===t.id)))(V,e),Z=(({columns:n,selectable:r,isRowSelected:o,onRowSelected:i,stickyOffsets:s={},lastStickyColumnKey:a,getSelectRowLabel:l})=>(c,d)=>{const{id:u,name:h}=c;return t.jsxs(e.Table.Row,{className:d?.className,children:[r?t.jsx(e.Table.Cell,{...Kw(s,Ww,a),children:t.jsx(_g,{name:`checkbox-${u}`,"aria-label":l(h,u),checked:o(c),onCheckedChange:({checked:e})=>{i(c,e)}})}):null,n.map((n=>t.jsx(e.Table.Cell,{...d?.getCellProps(n.key),children:n.cell?n.cell(c):c?.[n.key]},n.key)))]})})({columns:o,selectable:d,isRowSelected:G,onRowSelected:(e,t)=>{void 0===u&&O((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))),b&&b(e,t)},stickyOffsets:E,lastStickyColumnKey:q,getSelectRowLabel:(e,t)=>C.selectRowLabel(e,t)}),J=s||Z;return r.jsxs("div",{children:[r.jsx("div",{css:y?Fw(y):void 0,children:r.jsxs(e.Table.Root,{css:Dw(h,l),striped:a,stickyHeader:l,interactive:!0,children:[r.jsx(e.Table.Header,{css:Iw(h),children:r.jsxs(e.Table.Row,{children:[d?r.jsx(e.Table.ColumnHeader,{ref:M,...Kw(E,Ww,q),children:r.jsx(_g,{name:"header-checkbox","aria-label":C.selectAllRowsLabel,checked:B,indeterminate:H,onCheckedChange:({checked:e})=>{void 0===u&&O(e?P:[]),g&&g(e)}})}):null,o.map((t=>{return r.jsx(e.Table.ColumnHeader,{ref:e=>{$.current[t.key]=e},...(n=t.key,Uw(_,n)),role:t.sortable?"columnheader":void 0,"aria-sort":t.sortable&&"asc"===k.order?"ascending":t.sortable&&"desc"===k.order?"descending":void 0,...U(t),children:r.jsxs("div",{css:Pw,children:[t.label,t.sortable?r.jsxs("div",{css:zw,children:[r.jsx(_f,{css:Vw(k.key===t.key&&"asc"===k.order),icon:r.jsx(Gf,{style:{transform:"rotate(180deg)"}}),onClick:()=>z(t.key,"asc"),"aria-label":C.ascendingLabel}),r.jsx(_f,{css:Vw(k.key===t.key&&"desc"===k.order),icon:r.jsx(Gf,{}),onClick:()=>z(t.key,"desc"),"aria-label":C.descendingLabel})]}):null]})},t.key);var n}))]})}),r.jsx(e.Table.Body,{css:_w(a),children:P.map((e=>r.jsx(n.Fragment,{children:J(e,{className:G(e)?"selected":void 0,getCellProps:K})},e.id)))})]})}),v?r.jsx("div",{css:qw,children:r.jsx(e.Spinner,{size:"lg",color:w("primary",500)})}):null,r.jsxs("div",{css:Bw,children:[r.jsx("div",{children:N?r.jsx(xw,{pageSize:R,currentPage:A,totalItems:L,onPageSizeChange:f,showItemCountText:D}):null}),c?r.jsx("div",{css:Hw,children:r.jsx(Nw,{totalItems:L,pageSize:R,currentPage:A,onPageChange:m})}):null]})]})},exports.TableCell=Jw,exports.TableRow=Zw,exports.Tag=Bb,exports.TextInput=gg,exports.Textarea=({label:t,caption:o,placeholder:i,errorMessage:s,required:a,disabled:l,size:c="default",showOptionalLabel:d=!0,defaultValue:u="",onChange:h,onFocus:p,onBlur:f,minLength:m,maxLength:g,labels:b,value:v,...y})=>{const x=Vf("Textarea",b),[w,C]=n.useState(u),[k,S]=n.useState(!1),[$,M]=n.useState(!1),[E,j]=n.useState(""),T=void 0!==v,O=T?String(v??""):w,L=n.useId(),A=n.useId(),R=n.useId();n.useEffect((()=>{const{length:e}=u;m&&e<m&&e>0?(S(e<m),M(!1),j(x.enterAtLeastChars(m-e))):m&&0===e&&j(x.minChars(m)),g&&e>0?(S(!1),M(e>g),j(x.charsRemaining(g-e))):g&&0===e&&j(x.maxChars(g))}),[]);const N=!!s||k||$,D=[o?L:null,N?A:null,E?R:null].filter(Boolean).join(" ")||void 0,I=Boolean(O),P=mg(p,f),z=E&&!$&&!k,V=k&&!!m||$&&!!g||z?r.jsxs(r.Fragment,{children:[k&&m?r.jsx(e.Field.ErrorText,{id:A,css:Yb,style:{fontSize:"0.75rem",lineHeight:"1rem"},"aria-live":"polite",children:x.needMoreChars(m-O.length)}):null,$&&g?r.jsx(e.Field.ErrorText,{id:A,css:Yb,style:{fontSize:"0.75rem",lineHeight:"1rem"},"aria-live":"polite",children:x.tooManyChars(O.length-g)}):null,z?r.jsx(e.Field.HelperText,{id:R,css:Xb,"aria-live":"polite",children:E}):null]}):null;return r.jsx(ag,{label:t,caption:o,errorMessage:s,invalid:N,required:a,disabled:l,size:c,showOptionalLabel:d,labels:{requiredSymbolLabel:x.requiredSymbolLabel,optionalSuffix:x.optionalSuffix},captionId:L,errorId:s?A:void 0,footer:V,semantics:"field",children:r.jsx(e.Textarea,{placeholder:i,disabled:l,focusVisibleRing:"none",css:Qb(c,I),onChange:e=>{T||C(e.target.value);const{length:t}=e.target.value;m&&g?(S(t<m),M(t>g),j(x.charsRemaining(g-t))):m?(S(t<m),M(!1),j(t<m?x.enterAtLeastChars(m-t):"")):g&&(M(t>g),S(!1),j(x.charsRemaining(g-t))),h&&h(e)},value:O,"aria-label":t||i,"aria-describedby":D,"aria-invalid":N||void 0,_placeholder:{color:"var(--chakra-colors-neutral-700)"},...y,"data-focus-visible":P.isTabFocused||void 0,onFocus:P.onFocus,onBlur:P.onBlur})})},exports.Toast=({labels:t})=>{const n=Vf("Toast",t);return Object.keys(xL).map((t=>r.jsx(e.Portal,{children:r.jsx(e.Toaster,{toaster:xL[t],insetInline:{mdDown:"4"},children:o=>{return r.jsxs(e.Toast.Root,{css:(s=o.meta?.maxWidth,i.css`
|
|
4193
|
+
`)}):r.jsx("div",{css:hw,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:pw,children:t?.map((e=>r.jsx("div",{style:{width:o?"auto":`calc(100% / ${t.length})`,display:"flex",justifyContent:"center"},children:r.jsx("p",{css:fw,children:e})},e)))}),n&&n.length?r.jsx("div",{css:pw,children:n.map((e=>r.jsx("div",{style:{width:o?"auto":`calc(100% / ${t.length})`,display:"flex",justifyContent:"center"},children:r.jsx("p",{css:mw,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=Vf("Search",m),[b,v]=n.useState(""),{open:y,onOpen:x,onClose:C}=e.useDisclosure(),[k,S]=n.useState(s),[$,M]=n.useState(-1),[E,j]=n.useState(!1),[T,O]=n.useState("pointer"),L=n.useRef(null),{contentRef:A,placement:R}=tv(),N=`search-results-${n.useId()}`,D=e=>{const t=s.find((t=>t.id===e||UO(t)===e));t&&(d?.(t),v(""),C())};n.useEffect((()=>{if(h?.(b),!b)return void S(s);const e=s.filter((e=>{const t=b.toLowerCase();return e.id?.toLowerCase().includes(t)||UO(e).toLowerCase().includes(t)||e.caption?.toLowerCase().includes(t)})).map((e=>({id:e.id??UO(e),label:e.label,searchLabel:e.searchLabel,caption:e.caption,variant:"select",icon:e.icon,onItemClick:()=>D(e.id||UO(e))})));S(e),x()}),[b]);const I=b.length?r.jsx(Sg,{onClick:()=>{v(""),p?.()}}):null,P="none"!==c&&!!b.length&&k.length>0&&y,z=(P||l&&!!b.length)&&"custom"!==c;let V=w("neutral",500);o?V=w("neutral",500):E&&(V=w("primary",700));const B="small"===i?"1rem":"1.25rem",H=u(a);return r.jsxs(e.Popover.Root,{open:z,onOpenChange:e=>{e.open||C()},autoFocus:!1,closeOnEscape:!1,positioning:{sameWidth:!0,gutter:0},children:[r.jsxs("div",{ref:L,css:HO,"data-open":z||void 0,"data-placement":R,children:[r.jsx(e.Popover.Anchor,{children:r.jsx(e.InputGroup,{startElement:r.jsx(Sm,{width:B,height:B,fill:V}),endElement:I,children:r.jsx(gg,{autoComplete:"off",placeholder:t||g.filterPlaceholder,onChange:e=>{const{value:t}=e.target;v(t)},onFocus:()=>j(!0),onBlur:()=>j(!1),value:b,label:"",style:{paddingLeft:"2.5rem"},type:"search","aria-label":t||g.filterAriaLabel,"aria-expanded":P,"aria-controls":N,role:"combobox","aria-autocomplete":"list",disabled:o,size:i,noMarginBottom:!0,onKeyDown:e=>{if(P){if("ArrowDown"===e.key&&(e.preventDefault(),O("keyboard"),M((e=>Math.min(e+1,k.length-1)))),"ArrowUp"===e.key&&(e.preventDefault(),O("keyboard"),M((e=>Math.max(e-1,0)))),"Enter"===e.key&&(e.preventDefault(),$>=0)){const e=k[$];D(e.id||UO(e))}"Escape"===e.key&&C()}}})})}),(P||l&&!!b.length)&&"custom"===c&&f&&!l&&f({items:k,highlightedIndex:$,query:b,onSelect:D})]}),r.jsx(e.Portal,{children:r.jsx(e.Popover.Positioner,{children:r.jsxs(e.Popover.Content,{ref:A,css:_O,style:{maxHeight:H},"data-nav-source":T,onPointerMove:()=>O("pointer"),children:[l&&r.jsx(e.Box,{padding:"1rem",children:r.jsx(e.Spinner,{})}),"text"===c&&!l&&r.jsx(WO,{highlightedIndex:$,items:k,query:b,onSelect:D}),"list"===c&&!l&&r.jsx(Tw,{items:k,highlightedIndex:$})]})})})]})},exports.Select=Fb,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,labels:f})=>{const m=Vf("Sheet",f),g=n.useRef(null),b=n.useRef([]),[v,y]=n.useState(null),x=window.innerWidth>768,w=b.current;let C=m.expandSheetLabel;if(null!=v){const e=wT(v,w);e>0&&e<w.length-1?C=m.makeFullScreenLabel:e===w.length-1&&(C=m.expandedSheetLabel)}const k=!(null==v||!w.length||wT(v,w)!==w.length-1);return r.jsx(vT,{ref:g,css:xT(!!e,p),className:u,open:i,onDismiss:s,header:r.jsxs("div",{children:[r.jsx("button",{type:"button",disabled:k,"aria-label":C,css:yT,onKeyDown:e=>{if("Enter"!==e.key&&" "!==e.key)return;e.preventDefault();const t=w[w.length-1];if(x)return void g.current?.snapTo?.((()=>t));const n=v??w[0];let r=w.findIndex((e=>e>n));-1===r&&(r=w.length-1);const o=w[r];g.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:C}),e]}),footer:o,snapPoints:({headerHeight:e,maxHeight:t,footerHeight:n})=>{const r=[20,a||e,l+(o?n:0),c||t-t/6];return b.current=r,r},onSpringEnd:()=>{const e=g.current?.height;e&&y(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(gv,{count:o,mode:i,onClick:e,ref:n,showFocusState:r,variant:s}),exports.Slider=fb,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.jsx(ag,{label:e,caption:t,required:s,size:o,showOptionalLabel:!1,noMarginBottom:!0,semantics:"group",children:r.jsxs("div",{css:Jb,children:[i.step&&i.marks?r.jsx(Fb,{items:i.marks.map((e=>{const t="number"==typeof e?e:e.value;return{label:`${"number"==typeof e?e:e.label}`,value:`${t}`}})),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(gg,{"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(),noMarginBottom:!0}),r.jsx(fb,{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(gg,{"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(),noMarginBottom:!0}):null]})})},exports.StepProgressIndicator=({steps:e,currentStep:t,labels:n})=>{const o=Vf("StepProgressIndicator",n);return r.jsxs("div",{css:uL,children:[e.map(((e,n)=>r.jsxs("div",{css:hL,children:[r.jsx("button",{css:pL(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(Wf,{height:"1rem",width:"1rem"}):n+1}),e.label?r.jsx("p",{css:fL(t===n+1),children:e.label}):null]},`${e.label}-${n}`))),r.jsx("div",{css:mL,children:r.jsx("div",{css:gL})})]})},exports.Switch=gb,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:b,loading:v,height:y,labels:x})=>{const C=Vf("Table",x),[k,S]=n.useState({key:"",order:""}),$=n.useRef({}),M=n.useRef(null),[E,j]=n.useState({}),[T,O]=n.useState([]),{totalItems:L=i.length,currentPage:A=1,pageSize:R=10,showItemCount:N,showItemCountText:D}=c||{},I=Boolean(p),P=n.useMemo((()=>Gw(i,k,I)),[i,I,k]),z=(e,t)=>{S({key:e,order:t}),p&&p({key:e,order:t})},V=u??T,B=P.length>0&&V.length===P.length,H=V.length>0&&V.length<P.length,_=n.useMemo((()=>(e=>e.reduce(((e,t)=>(e[t.key]=t,e)),{}))(o)),[o]),F=n.useMemo((()=>(e=>e.filter((e=>e.sticky)).map((e=>e.key)))(o)),[o]),q=(e=>e.length>0?e[e.length-1]:void 0)([...void 0!==E[Ww]?[Ww]:[],...F]),W=n.useCallback((()=>{const e=((e,t,n)=>{const r={};let o=0;const i=e.filter((e=>e.sticky));return n&&i.length>0&&(r[Ww]=0,o+=n.offsetWidth),i.forEach((e=>{r[e.key]=o,o+=t[e.key]?.offsetWidth||0})),r})(o,$.current,d?M.current:void 0);j(e)}),[o,d]);n.useEffect((()=>{W()}),[W,i.length]),n.useEffect((()=>{const e=()=>{W()};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[W]),n.useEffect((()=>{void 0===u&&O((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 U=e=>Kw(E,e.key,q),K=e=>((e,t,n,r)=>({...Uw(e,n),...Kw(t,n,r)}))(_,E,e,q),G=e=>((e,t)=>e.some((e=>e.id===t.id)))(V,e),Z=(({columns:n,selectable:r,isRowSelected:o,onRowSelected:i,stickyOffsets:s={},lastStickyColumnKey:a,getSelectRowLabel:l})=>(c,d)=>{const{id:u,name:h}=c;return t.jsxs(e.Table.Row,{className:d?.className,children:[r?t.jsx(e.Table.Cell,{...Kw(s,Ww,a),children:t.jsx(_g,{name:`checkbox-${u}`,"aria-label":l(h,u),checked:o(c),onCheckedChange:({checked:e})=>{i(c,e)}})}):null,n.map((n=>t.jsx(e.Table.Cell,{...d?.getCellProps(n.key),children:n.cell?n.cell(c):c?.[n.key]},n.key)))]})})({columns:o,selectable:d,isRowSelected:G,onRowSelected:(e,t)=>{void 0===u&&O((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))),b&&b(e,t)},stickyOffsets:E,lastStickyColumnKey:q,getSelectRowLabel:(e,t)=>C.selectRowLabel(e,t)}),J=s||Z;return r.jsxs("div",{children:[r.jsx("div",{css:y?Fw(y):void 0,children:r.jsxs(e.Table.Root,{css:Dw(h,l),striped:a,stickyHeader:l,interactive:!0,children:[r.jsx(e.Table.Header,{css:Iw(h),children:r.jsxs(e.Table.Row,{children:[d?r.jsx(e.Table.ColumnHeader,{ref:M,...Kw(E,Ww,q),children:r.jsx(_g,{name:"header-checkbox","aria-label":C.selectAllRowsLabel,checked:B,indeterminate:H,onCheckedChange:({checked:e})=>{void 0===u&&O(e?P:[]),g&&g(e)}})}):null,o.map((t=>{return r.jsx(e.Table.ColumnHeader,{ref:e=>{$.current[t.key]=e},...(n=t.key,Uw(_,n)),role:t.sortable?"columnheader":void 0,"aria-sort":t.sortable&&"asc"===k.order?"ascending":t.sortable&&"desc"===k.order?"descending":void 0,...U(t),children:r.jsxs("div",{css:Pw,children:[t.label,t.sortable?r.jsxs("div",{css:zw,children:[r.jsx(_f,{css:Vw(k.key===t.key&&"asc"===k.order),icon:r.jsx(Gf,{style:{transform:"rotate(180deg)"}}),onClick:()=>z(t.key,"asc"),"aria-label":C.ascendingLabel}),r.jsx(_f,{css:Vw(k.key===t.key&&"desc"===k.order),icon:r.jsx(Gf,{}),onClick:()=>z(t.key,"desc"),"aria-label":C.descendingLabel})]}):null]})},t.key);var n}))]})}),r.jsx(e.Table.Body,{css:_w(a),children:P.map((e=>r.jsx(n.Fragment,{children:J(e,{className:G(e)?"selected":void 0,getCellProps:K})},e.id)))})]})}),v?r.jsx("div",{css:qw,children:r.jsx(e.Spinner,{size:"lg",color:w("primary",500)})}):null,r.jsxs("div",{css:Bw,children:[r.jsx("div",{children:N?r.jsx(xw,{pageSize:R,currentPage:A,totalItems:L,onPageSizeChange:f,showItemCountText:D}):null}),c?r.jsx("div",{css:Hw,children:r.jsx(Nw,{totalItems:L,pageSize:R,currentPage:A,onPageChange:m})}):null]})]})},exports.TableCell=Jw,exports.TableRow=Zw,exports.Tag=Bb,exports.TextInput=gg,exports.Textarea=({label:t,caption:o,placeholder:i,errorMessage:s,required:a,disabled:l,size:c="default",showOptionalLabel:d=!0,defaultValue:u="",onChange:h,onFocus:p,onBlur:f,minLength:m,maxLength:g,labels:b,value:v,...y})=>{const x=Vf("Textarea",b),[w,C]=n.useState(u),[k,S]=n.useState(!1),[$,M]=n.useState(!1),[E,j]=n.useState(""),T=void 0!==v,O=T?String(v??""):w,L=n.useId(),A=n.useId(),R=n.useId();n.useEffect((()=>{const{length:e}=u;m&&e<m&&e>0?(S(e<m),M(!1),j(x.enterAtLeastChars(m-e))):m&&0===e&&j(x.minChars(m)),g&&e>0?(S(!1),M(e>g),j(x.charsRemaining(g-e))):g&&0===e&&j(x.maxChars(g))}),[]);const N=!!s||k||$,D=[o?L:null,N?A:null,E?R:null].filter(Boolean).join(" ")||void 0,I=Boolean(O),P=mg(p,f),z=E&&!$&&!k,V=k&&!!m||$&&!!g||z?r.jsxs(r.Fragment,{children:[k&&m?r.jsx(e.Field.ErrorText,{id:A,css:Yb,style:{fontSize:"0.75rem",lineHeight:"1rem"},"aria-live":"polite",children:x.needMoreChars(m-O.length)}):null,$&&g?r.jsx(e.Field.ErrorText,{id:A,css:Yb,style:{fontSize:"0.75rem",lineHeight:"1rem"},"aria-live":"polite",children:x.tooManyChars(O.length-g)}):null,z?r.jsx(e.Field.HelperText,{id:R,css:Xb,"aria-live":"polite",children:E}):null]}):null;return r.jsx(ag,{label:t,caption:o,errorMessage:s,invalid:N,required:a,disabled:l,size:c,showOptionalLabel:d,labels:{requiredSymbolLabel:x.requiredSymbolLabel,optionalSuffix:x.optionalSuffix},captionId:L,errorId:s?A:void 0,footer:V,semantics:"field",children:r.jsx(e.Textarea,{placeholder:i,disabled:l,focusVisibleRing:"none",css:Qb(c,I),onChange:e=>{T||C(e.target.value);const{length:t}=e.target.value;m&&g?(S(t<m),M(t>g),j(x.charsRemaining(g-t))):m?(S(t<m),M(!1),j(t<m?x.enterAtLeastChars(m-t):"")):g&&(M(t>g),S(!1),j(x.charsRemaining(g-t))),h&&h(e)},value:O,"aria-label":t||i,"aria-describedby":D,"aria-invalid":N||void 0,_placeholder:{color:"var(--chakra-colors-neutral-700)"},...y,"data-focus-visible":P.isTabFocused||void 0,onFocus:P.onFocus,onBlur:P.onBlur})})},exports.Toast=({labels:t})=>{const n=Vf("Toast",t);return Object.keys(CL).map((t=>r.jsx(e.Portal,{children:r.jsx(e.Toaster,{toaster:CL[t],insetInline:{mdDown:"4"},children:o=>{return r.jsxs(e.Toast.Root,{css:(s=o.meta?.maxWidth,i.css`
|
|
4182
4194
|
justify-content: space-between;
|
|
4183
4195
|
align-items: center;
|
|
4184
4196
|
gap: ${k(200)};
|
|
@@ -4222,4 +4234,4 @@ function _E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4222
4234
|
color: ${w("error",900)};
|
|
4223
4235
|
}
|
|
4224
4236
|
}
|
|
4225
|
-
`),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(Kf,{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(em,{color:"var(--chakra-colors-success-500)"}):null,"warning"===o.type?o.meta?.icon?o.meta.icon:r.jsx(tm,{color:"var(--chakra-colors-warning-500)"}):null,"error"===o.type?o.meta?.icon?o.meta.icon:r.jsx(nm,{color:"var(--chakra-colors-error-500)"}):null,r.jsxs(e.Stack,{gap:"1",flex:"1",maxWidth:"100%",children:[r.jsx(e.Toast.Title,{css:
|
|
4237
|
+
`),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(Kf,{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(em,{color:"var(--chakra-colors-success-500)"}):null,"warning"===o.type?o.meta?.icon?o.meta.icon:r.jsx(tm,{color:"var(--chakra-colors-warning-500)"}):null,"error"===o.type?o.meta?.icon?o.meta.icon:r.jsx(nm,{color:"var(--chakra-colors-error-500)"}):null,r.jsxs(e.Stack,{gap:"1",flex:"1",maxWidth:"100%",children:[r.jsx(e.Toast.Title,{css:bL,"aria-label":`${o.title}`,children:o.title}),o.description?r.jsx(e.Toast.Title,{css:vL,"aria-label":`${o.description}`,children:o.description}):null]})]}),o.action||o.meta?.closable?r.jsxs(e.Stack,{flexDirection:"row",children:[o.action?r.jsx(Bf,{css:yL,label:o.action.label,size:"small",variant:"info"===o.type?"primary":"secondary",onClick:()=>{o?.action?.onClick&&o.action.onClick(),CL[t].dismiss()}}):null,o.meta?.closable?r.jsx(Bf,{css:xL,label:o.meta.closableLabel,"aria-label":o.meta?.closableLabel||n.dismissLabel,leftIcon:r.jsx(Jf,{height:"0.625rem!",width:"0.625rem!"}),size:"small",variant:"secondary",onClick:()=>{o.meta?.onClose&&o.meta.onClose(),CL[t].dismiss()}}):null]}):null]});var s}})},t)))},exports.Toolbar=Tg,exports.Tooltip=Fm,exports.closeToast=e=>{Object.values(CL).forEach((t=>{t.dismiss(e)}))},exports.designSystemStyles=x,exports.designSystemStylesForTailwind=y,exports.getThemedBorderWidth=M,exports.getThemedColor=w,exports.getThemedFontSize=C,exports.getThemedLineHeight=S,exports.getThemedRadius=$,exports.getThemedSpacing=k,exports.showToast=e=>{CL[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
|
@@ -1749,15 +1749,17 @@ type AvatarProps = {
|
|
|
1749
1749
|
|
|
1750
1750
|
declare const Avatar: React$1.ForwardRefExoticComponent<AvatarProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1751
1751
|
|
|
1752
|
+
type BadgeSize = 'small' | 'large';
|
|
1752
1753
|
type BadgeProps = {
|
|
1753
1754
|
hasNotification?: boolean;
|
|
1754
1755
|
notificationCount?: number;
|
|
1755
1756
|
label?: string;
|
|
1756
|
-
|
|
1757
|
+
size?: BadgeSize;
|
|
1757
1758
|
labels?: Partial<BadgeLabels>;
|
|
1759
|
+
children?: ReactNode;
|
|
1758
1760
|
};
|
|
1759
1761
|
|
|
1760
|
-
declare const Badge: ({ hasNotification, notificationCount, label, labels, }: BadgeProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1762
|
+
declare const Badge: ({ hasNotification, notificationCount, label, labels, children, size, }: BadgeProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1761
1763
|
|
|
1762
1764
|
type InlineMessageProps = {
|
|
1763
1765
|
label: string | React.ReactNode;
|
|
@@ -1776,10 +1778,12 @@ type InlineMessageProps = {
|
|
|
1776
1778
|
|
|
1777
1779
|
declare const InlineMessage: ({ label, caption, variant, size, icon, onActionClick, actionLabel, isButtonRight, buttonLeftIcon, buttonRightIcon, labels, }: InlineMessageProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1778
1780
|
|
|
1779
|
-
interface AlertProps extends Omit<Alert.RootProps, 'title' | 'variant'> {
|
|
1781
|
+
interface AlertProps extends Omit<Alert.RootProps, 'title' | 'variant' | 'width'> {
|
|
1780
1782
|
title?: React.ReactNode;
|
|
1781
1783
|
icon?: React.ReactElement;
|
|
1782
1784
|
onClose?: () => void;
|
|
1785
|
+
isCentered?: boolean;
|
|
1786
|
+
width?: 'full-width' | 'inline';
|
|
1783
1787
|
variant?: 'general-white' | 'general-grey' | 'information' | 'success' | 'warning' | 'error';
|
|
1784
1788
|
/** Override internal UI labels for internationalization support. */
|
|
1785
1789
|
labels?: Partial<AlertBannerLabels>;
|
|
@@ -1839,4 +1843,4 @@ declare const Toast: React__default.FC<ToastComponentProps>;
|
|
|
1839
1843
|
declare const showToast: (props: ToastProps) => void;
|
|
1840
1844
|
declare const closeToast: (id?: string) => void;
|
|
1841
1845
|
|
|
1842
|
-
export { AlertBanner, type AlertBannerLabels, type AlertProps, AnalysisWidget, type AnalysisWidgetActionsProps, type AnalysisWidgetLabels, type AnalysisWidgetProps, Avatar, type AvatarLabels, type AvatarProps, Badge, type BadgeLabels, 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 ComboboxLabels, type ComboboxProps, type DesignSystemLabels, DesignSystemLocaleProvider, type DesignSystemLocaleProviderProps, ExtendableCard, type ExtendableCardProps, FieldWrapper, type FieldWrapperLabels, type FieldWrapperProps, type FieldWrapperSize, 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 LayerItemLabels, type LayerItemProps, LayerParameters, type LayerParametersProps, LegendItem, type LegendItemLabels, type LegendItemProps, List, type ListItemProps, type ListItemVariant, type ListProps, MapControlsToolbar, type MapControlsToolbarLabels, type MapControlsToolbarProps, MapMarker, type MapMarkerLabels, type MapMarkerProps, MapMarkers, MapPopUp, type MapPopUpLabels, type MapPopUpProps, Menu, type MenuItemProps, type MenuLabels, type MenuProps, MobileSearch, type MobileSearchLabels, type MobileSearchProps, MobileTabBar, type MobileTabBarItemProps, type MobileTabBarLabels, type MobileTabBarProps, Modal, type ModalLabels, 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 ProgressBarLabels, 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 SheetLabels, type SheetProps, SimpleMapPin, Slider, SliderInput, type SliderInputProps, type SliderMarksProps, type SliderProps, StepProgressIndicator, type StepProgressIndicatorLabels, type StepProgressIndicatorProps, type StrengthLevel, Switch, type SwitchLabels, type SwitchProps, TabBar, type TabBarItemProps, type TabBarProps, Table, TableCell, type TableLabels, type TableProps, TableRow, Tag, type TagLabels, 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 };
|
|
1846
|
+
export { AlertBanner, type AlertBannerLabels, type AlertProps, AnalysisWidget, type AnalysisWidgetActionsProps, type AnalysisWidgetLabels, type AnalysisWidgetProps, Avatar, type AvatarLabels, type AvatarProps, Badge, type BadgeLabels, type BadgeProps, type BadgeSize, 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 ComboboxLabels, type ComboboxProps, type DesignSystemLabels, DesignSystemLocaleProvider, type DesignSystemLocaleProviderProps, ExtendableCard, type ExtendableCardProps, FieldWrapper, type FieldWrapperLabels, type FieldWrapperProps, type FieldWrapperSize, 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 LayerItemLabels, type LayerItemProps, LayerParameters, type LayerParametersProps, LegendItem, type LegendItemLabels, type LegendItemProps, List, type ListItemProps, type ListItemVariant, type ListProps, MapControlsToolbar, type MapControlsToolbarLabels, type MapControlsToolbarProps, MapMarker, type MapMarkerLabels, type MapMarkerProps, MapMarkers, MapPopUp, type MapPopUpLabels, type MapPopUpProps, Menu, type MenuItemProps, type MenuLabels, type MenuProps, MobileSearch, type MobileSearchLabels, type MobileSearchProps, MobileTabBar, type MobileTabBarItemProps, type MobileTabBarLabels, type MobileTabBarProps, Modal, type ModalLabels, 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 ProgressBarLabels, 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 SheetLabels, type SheetProps, SimpleMapPin, Slider, SliderInput, type SliderInputProps, type SliderMarksProps, type SliderProps, StepProgressIndicator, type StepProgressIndicatorLabels, type StepProgressIndicatorProps, type StrengthLevel, Switch, type SwitchLabels, type SwitchProps, TabBar, type TabBarItemProps, type TabBarProps, Table, TableCell, type TableLabels, type TableProps, TableRow, Tag, type TagLabels, 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 };
|