@worldresources/wri-design-systems 2.209.0 → 2.210.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 +17 -22
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +15 -20
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -4327,8 +4327,7 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4327
4327
|
color: ${o};
|
|
4328
4328
|
background-color: ${r};
|
|
4329
4329
|
${a?`border: ${l} solid ${s};\n border-radius: ${$(300)};`:`border-bottom: ${l} solid ${s};\n border-radius: ${$(100)};`}
|
|
4330
|
-
.chakra-
|
|
4331
|
-
.chakra-alert__description {
|
|
4330
|
+
.chakra-alert__content {
|
|
4332
4331
|
font-size: ${C(400)};
|
|
4333
4332
|
line-height: ${S(600)};
|
|
4334
4333
|
font-weight: 400;
|
|
@@ -4345,36 +4344,32 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4345
4344
|
width: ${k(400)};
|
|
4346
4345
|
height: ${k(400)};
|
|
4347
4346
|
}
|
|
4348
|
-
`},eA=i.css`
|
|
4349
|
-
display: flex;
|
|
4350
|
-
align-items: center;
|
|
4351
|
-
gap: ${k(400)};
|
|
4352
|
-
`,tA=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(tm,{}):"warning"===i?r.jsx(nm,{}):"error"===i?r.jsx(rm,{}):r.jsx(Kf,{});return p?r.jsxs(e.Alert.Root,{css:YL(i,d,c),children:[r.jsx(e.Alert.Indicator,{css:QL(i),children:o||m}),n?r.jsx(e.Alert.Content,{flex:c?"initial":void 0,children:r.jsxs("div",{css:eA,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:"0.75rem",insetEnd:"0.75rem",onClick:()=>{f(!1),s?.()}})]}):null})),nA=i.css`
|
|
4347
|
+
`},eA=l.forwardRef((({children:t,icon:n,variant:o,onClose:i,labels:s,isCentered:a=!1,width:c="full-width"},d)=>{const u=Vf("AlertBanner",s),[h,p]=l.useState(!0),f="success"===o?r.jsx(tm,{}):"warning"===o?r.jsx(nm,{}):"error"===o?r.jsx(rm,{}):r.jsx(Kf,{});return h?r.jsxs(e.Alert.Root,{css:YL(o,c,a),children:[r.jsx(e.Alert.Indicator,{css:QL(o),children:n||f}),r.jsx(e.Alert.Content,{flex:a?"initial":"1",children:t}),r.jsx(Sg,{"aria-label":u.closeAlertLabel,pos:"absolute",top:"0.75rem",insetEnd:"0.75rem",onClick:()=>{p(!1),i?.()}})]}):null})),tA=i.css`
|
|
4353
4348
|
height: ${k(200)};
|
|
4354
4349
|
width: 100%;
|
|
4355
4350
|
background-color: ${w("neutral",300)};
|
|
4356
4351
|
display: flex;
|
|
4357
4352
|
align-items: center;
|
|
4358
4353
|
justify-content: flex-start;
|
|
4359
|
-
`,
|
|
4354
|
+
`,nA=(e,t)=>i.css`
|
|
4360
4355
|
height: 100%;
|
|
4361
4356
|
width: ${e}%;
|
|
4362
4357
|
background-color: ${t??w("primary",500)};
|
|
4363
4358
|
transition: width 0.5s ease-in-out;
|
|
4364
|
-
`,
|
|
4359
|
+
`,rA=i.css`
|
|
4365
4360
|
width: 100%;
|
|
4366
4361
|
display: flex;
|
|
4367
4362
|
align-items: center;
|
|
4368
4363
|
justify-content: space-between;
|
|
4369
4364
|
position: relative;
|
|
4370
|
-
`,
|
|
4365
|
+
`,oA=i.css`
|
|
4371
4366
|
height: 3.75rem;
|
|
4372
4367
|
width: ${k(2e3)};
|
|
4373
4368
|
display: flex;
|
|
4374
4369
|
flex-direction: column;
|
|
4375
4370
|
align-items: center;
|
|
4376
4371
|
justify-content: space-between;
|
|
4377
|
-
`,
|
|
4372
|
+
`,iA=(e,t)=>i.css`
|
|
4378
4373
|
height: ${k(800)};
|
|
4379
4374
|
width: ${k(800)};
|
|
4380
4375
|
display: flex;
|
|
@@ -4410,12 +4405,12 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4410
4405
|
}
|
|
4411
4406
|
|
|
4412
4407
|
${t?`\n background-color: ${w("neutral",300)};\n \n &:hover {\n background-color: ${w("neutral",300)};\n box-shadow: none;\n }\n `:""}
|
|
4413
|
-
`,
|
|
4408
|
+
`,sA=e=>i.css`
|
|
4414
4409
|
color: ${w("neutral",e?800:600)};
|
|
4415
4410
|
font-size: ${C(300)};
|
|
4416
4411
|
line-height: ${S(500)};
|
|
4417
4412
|
font-weight: 400;
|
|
4418
|
-
`,
|
|
4413
|
+
`,aA=i.css`
|
|
4419
4414
|
height: ${j(100)};
|
|
4420
4415
|
width: 100%;
|
|
4421
4416
|
padding: 0 1.875rem;
|
|
@@ -4423,25 +4418,25 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4423
4418
|
top: ${k(400)};
|
|
4424
4419
|
left: 0;
|
|
4425
4420
|
z-index: -1;
|
|
4426
|
-
`,
|
|
4421
|
+
`,lA=i.css`
|
|
4427
4422
|
height: ${j(100)};
|
|
4428
4423
|
width: 100%;
|
|
4429
4424
|
background-color: ${w("neutral",400)};
|
|
4430
|
-
`,
|
|
4425
|
+
`,cA=i.css`
|
|
4431
4426
|
font-size: ${C(500)};
|
|
4432
4427
|
line-height: ${S(700)};
|
|
4433
4428
|
font-weight: 400;
|
|
4434
4429
|
color: ${w("neutral",800)};
|
|
4435
|
-
`,
|
|
4430
|
+
`,dA=i.css`
|
|
4436
4431
|
font-size: ${C(400)};
|
|
4437
4432
|
line-height: ${S(600)};
|
|
4438
4433
|
font-weight: 400;
|
|
4439
4434
|
color: ${w("neutral",700)};
|
|
4440
|
-
`,
|
|
4435
|
+
`,uA=i.css`
|
|
4441
4436
|
padding: 0.375rem;
|
|
4442
|
-
`,
|
|
4437
|
+
`,hA=i.css`
|
|
4443
4438
|
padding: 0.375rem;
|
|
4444
|
-
`;let
|
|
4439
|
+
`;let pA=!1;const fA=new Set,mA=e=>{let t,n=!1;const r=()=>{n&&(n=!1,(()=>{pA=!1;const[e]=fA;e&&(fA.delete(e),e())})())},o=()=>{pA=!0,n=!0,t=void 0,e()};return pA?(t=()=>o(),fA.add(t)):o(),()=>{n?r():t&&fA.delete(t)}},gA={pauseOnPageIdle:!0,offsets:"1.5rem"},bA={"top-start":e.createToaster({placement:"top-start",...gA}),top:e.createToaster({placement:"top",...gA}),"top-end":e.createToaster({placement:"top-end",...gA}),"bottom-start":e.createToaster({placement:"bottom-start",...gA}),bottom:e.createToaster({placement:"bottom",...gA}),"bottom-end":e.createToaster({placement:"bottom-end",...gA})};exports.AlertBanner=eA,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:FC,children:r.jsxs(e.Accordion.Root,{multiple:!0,value:a?void 0:[u],defaultValue:s?[u]:[],children:[r.jsxs(e.Accordion.Item,{css:WC,value:u,children:[o&&r.jsx(e.Accordion.ItemTrigger,{id:f,"aria-expanded":h,css:qC,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:UC,children:i})]})]}),c&&i&&r.jsx(e.Box,{css:UC,children:i})]})})},exports.Avatar=JL,exports.Badge=ZL,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:dw(l,c),children:r.jsxs("div",{className:"ds-base-map-scroll-content",children:[r.jsxs("div",{css:uw,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:hw,children:[o?r.jsx("div",{css:pw,children:o.map((e=>r.jsxs("div",{children:[r.jsx(cb,{css:{},checked:e.checked,onCheckedChange:({checked:t})=>e.onCheckedChange({checked:Boolean(t)}),children:e.label}),e.checked&&e.children?r.jsx("div",{css:fw,children:e.children}):null]},e.label)))}):null,s?r.jsx("div",{css:mw,children:s.map((e=>{return r.jsxs("div",{css:gw(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`
|
|
4445
4440
|
height: ${k(800)};
|
|
4446
4441
|
width: ${k(800)};
|
|
4447
4442
|
border: ${j(100)} solid ${w("neutral",300)};
|
|
@@ -4573,14 +4568,14 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4573
4568
|
font-weight: 700;
|
|
4574
4569
|
color: ${w("medium"===y?"warning":"strong"===y||"very-strong"===y?"success":"error",900)};
|
|
4575
4570
|
}
|
|
4576
|
-
`),"aria-live":"polite",role:"status",children:[u.strengthPrefix," ",r.jsx("span",{children:v[g.strength]})]}),r.jsx("div",{css:Cv(g.strength),children:r.jsx("div",{})}),r.jsxs("div",{css:kv(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(Xf,{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:kv(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(Xf,{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:kv(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(Xf,{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:kv(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(Xf,{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:kv(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(Xf,{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:
|
|
4571
|
+
`),"aria-live":"polite",role:"status",children:[u.strengthPrefix," ",r.jsx("span",{children:v[g.strength]})]}),r.jsx("div",{css:Cv(g.strength),children:r.jsx("div",{})}),r.jsxs("div",{css:kv(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(Xf,{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:kv(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(Xf,{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:kv(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(Xf,{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:kv(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(Xf,{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:kv(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(Xf,{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:tA,role:"progressbar","aria-label":o.progressAriaLabel(i),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":i,children:r.jsx("div",{css:nA(i,n)})})},exports.QualitativeAttribute=({type:e,label:t,caption:o,color:i,onActionClick:s,showActionButton:a,pointIcon:l=r.jsx(pm,{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:Zw,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:Jw,children:[r.jsxs("div",{children:[g&&r.jsx("div",{css:Uw(i)}),b&&r.jsx("div",{css:Kw(i)}),v&&r.jsx("div",{css:Gw(i),children:l})]}),r.jsxs("div",{children:[r.jsx("p",{id:f,css:Xw,children:t}),o?r.jsx("p",{id:m,css:Yw,children:o}):null]})]}),s&&a?r.jsx("div",{css:Qw,children:r.jsx(Bf,{type:"button",variant:"borderless",label:String(w),rightIcon:h?r.jsx(em,{}):r.jsx(Qf,{}),"aria-pressed":h,"aria-labelledby":`${y} ${f}`,onClick:()=>{p((e=>!e)),s?.()}})}):null]})},exports.Radio=$b,exports.RadioGroup=jb,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(jb,{name:n,value:i,onChange:s,horizontal:l&&"card"!==c,children:o.map((e=>r.jsx($b,{css:"card"===c?Sv:{},...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:eC,children:[o?r.jsx("div",{css:(s=iC(e),i.css`
|
|
4577
4572
|
height: ${k(500)};
|
|
4578
4573
|
width: 100%;
|
|
4579
4574
|
margin-bottom: ${k(200)};
|
|
4580
4575
|
border: ${j(100)} solid ${w("neutral",300)};
|
|
4581
4576
|
border-radius: ${$(300)};
|
|
4582
4577
|
${s?`background: ${s};`:""}
|
|
4583
|
-
`)}):r.jsx("div",{css:tC,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:nC,children:t?.map((e=>r.jsx("div",{style:{width:o?"auto":`calc(100% / ${t.length})`,display:"flex",justifyContent:"center"},children:r.jsx("p",{css:rC,children:e})},e)))}),n&&n.length?r.jsx("div",{css:nC,children:n.map((e=>r.jsx("div",{style:{width:o?"auto":`calc(100% / ${t.length})`,display:"flex",justifyContent:"center"},children:r.jsx("p",{css:oC,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),[$,j]=n.useState(-1),[M,E]=n.useState(!1),[T,O]=n.useState("pointer"),L=n.useRef(null),{contentRef:A,placement:R}=Ov(),N=`search-results-${n.useId()}`,D=e=>{const t=s.find((t=>t.id===e||PL(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)||PL(e).toLowerCase().includes(t)||e.caption?.toLowerCase().includes(t)})).map((e=>({id:e.id??PL(e),label:e.label,searchLabel:e.searchLabel,caption:e.caption,variant:"select",icon:e.icon,onItemClick:()=>D(e.id||PL(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):M&&(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:AL,"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:()=>E(!0),onBlur:()=>E(!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"),j((e=>Math.min(e+1,k.length-1)))),"ArrowUp"===e.key&&(e.preventDefault(),O("keyboard"),j((e=>Math.max(e-1,0)))),"Enter"===e.key&&(e.preventDefault(),$>=0)){const e=k[$];D(e.id||PL(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:RL,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(IL,{highlightedIndex:$,items:k,query:b,onSelect:D}),"list"===c&&!l&&r.jsx(yC,{items:k,highlightedIndex:$})]})})})]})},exports.Select=vv,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=uO(v,w);e>0&&e<w.length-1?C=m.makeFullScreenLabel:e===w.length-1&&(C=m.expandedSheetLabel)}const k=!(null==v||!w.length||uO(v,w)!==w.length-1);return r.jsx(lO,{ref:g,css:dO(!!e,p),className:u,open:i,onDismiss:s,header:r.jsxs("div",{children:[r.jsx("button",{type:"button",disabled:k,"aria-label":C,css:cO,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(yw,{count:o,mode:i,onClick:e,ref:n,showFocusState:r,variant:s}),exports.Slider=Bb,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:$v,children:[i.step&&i.marks?r.jsx(vv,{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(Bb,{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:oA,children:[e.map(((e,n)=>r.jsxs("div",{css:iA,children:[r.jsx("button",{css:sA(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:aA(t===n+1),children:e.label}):null]},`${e.label}-${n}`))),r.jsx("div",{css:lA,children:r.jsx("div",{css:cA})})]})},exports.Switch=_b,exports.TabBar=({variant:t="panel",defaultValue:o,tabs:i,onTabClick:s,activationMode:a="manual"})=>{const[l,c]=n.useState(TL(i,o)||0);return r.jsx("div",{css:kL(t),children:r.jsx(e.Tabs.Root,{width:"full",defaultValue:o||i?.[0]?.value,onValueChange:({value:e})=>{return c(TL(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,s)=>r.jsxs(n.Fragment,{children:["view"===t&&1===s&&"left"===OL(l)?r.jsx("div",{css:jL}):null,r.jsx(e.Tabs.Trigger,{css:[SL,"view"===t&&ML,"panel"===t&&$L,"transparent"===t&&EL],"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===s&&s<i.length-1&&"right"===OL(l)?r.jsx("div",{css:jL}):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({}),j=n.useRef(null),[M,E]=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((()=>zC(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!==M[DC]?[DC]:[],...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[DC]=0,o+=n.offsetWidth),i.forEach((e=>{r[e.key]=o,o+=t[e.key]?.offsetWidth||0})),r})(o,$.current,d?j.current:void 0);E(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=>PC(M,e.key,q),K=e=>((e,t,n,r)=>({...IC(e,n),...PC(t,n,r)}))(_,M,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,{...PC(s,DC,a),children:t.jsx(cb,{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:M,lastStickyColumnKey:q,getSelectRowLabel:(e,t)=>C.selectRowLabel(e,t)}),J=s||Z;return r.jsxs("div",{children:[r.jsx("div",{css:y?RC(y):void 0,children:r.jsxs(e.Table.Root,{css:$C(h,l),striped:a,stickyHeader:l,interactive:!0,children:[r.jsx(e.Table.Header,{css:jC(h),children:r.jsxs(e.Table.Row,{children:[d?r.jsx(e.Table.ColumnHeader,{ref:j,...PC(M,DC,q),children:r.jsx(cb,{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,IC(_,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:MC,children:[t.label,t.sortable?r.jsxs("div",{css:EC,children:[r.jsx(_f,{css:TC(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:TC(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:AC(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:NC,children:r.jsx(e.Spinner,{size:"lg",color:w("primary",500)})}):null,r.jsxs("div",{css:OC,children:[N?r.jsx(dC,{pageSize:R,currentPage:A,totalItems:L,onPageSizeChange:f,showItemCountText:D}):null,c?r.jsx("div",{css:LC,children:r.jsx(SC,{totalItems:L,pageSize:R,currentPage:A,onPageChange:m})}):null]})]})},exports.TableCell=BC,exports.TableRow=VC,exports.Tag=mv,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),[$,j]=n.useState(!1),[M,E]=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),j(!1),E(x.enterAtLeastChars(m-e))):m&&0===e&&E(x.minChars(m)),g&&e>0?(S(!1),j(e>g),E(x.charsRemaining(g-e))):g&&0===e&&E(x.maxChars(g))}),[]);const N=!!s||k||$,D=[o?L:null,N?A:null,M?R:null].filter(Boolean).join(" ")||void 0,I=Boolean(O),P=mg(p,f),z=M&&!$&&!k,V=k&&!!m||$&&!!g||z?r.jsxs(r.Fragment,{children:[k&&m?r.jsx(e.Field.ErrorText,{id:A,css:Mv,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:Mv,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:jv,"aria-live":"polite",children:M}):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:Ev(c,I),onChange:e=>{T||C(e.target.value);const{length:t}=e.target.value;m&&g?(S(t<m),j(t>g),E(x.charsRemaining(g-t))):m?(S(t<m),j(!1),E(t<m?x.enterAtLeastChars(m-t):"")):g&&(j(t>g),S(!1),E(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 o=Vf("Toast",t),[s,a]=n.useState(!1);return n.useEffect((()=>{const e=gA((()=>a(!0)));return()=>{e(),a(!1)}}),[]),s?Object.keys(vA).map((t=>r.jsx(e.Portal,{children:r.jsx(e.Toaster,{toaster:vA[t],insetInline:{mdDown:"4"},children:n=>{return r.jsxs(e.Toast.Root,{css:(s=n.meta?.maxWidth,i.css`
|
|
4578
|
+
`)}):r.jsx("div",{css:tC,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:nC,children:t?.map((e=>r.jsx("div",{style:{width:o?"auto":`calc(100% / ${t.length})`,display:"flex",justifyContent:"center"},children:r.jsx("p",{css:rC,children:e})},e)))}),n&&n.length?r.jsx("div",{css:nC,children:n.map((e=>r.jsx("div",{style:{width:o?"auto":`calc(100% / ${t.length})`,display:"flex",justifyContent:"center"},children:r.jsx("p",{css:oC,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),[$,j]=n.useState(-1),[M,E]=n.useState(!1),[T,O]=n.useState("pointer"),L=n.useRef(null),{contentRef:A,placement:R}=Ov(),N=`search-results-${n.useId()}`,D=e=>{const t=s.find((t=>t.id===e||PL(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)||PL(e).toLowerCase().includes(t)||e.caption?.toLowerCase().includes(t)})).map((e=>({id:e.id??PL(e),label:e.label,searchLabel:e.searchLabel,caption:e.caption,variant:"select",icon:e.icon,onItemClick:()=>D(e.id||PL(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):M&&(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:AL,"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:()=>E(!0),onBlur:()=>E(!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"),j((e=>Math.min(e+1,k.length-1)))),"ArrowUp"===e.key&&(e.preventDefault(),O("keyboard"),j((e=>Math.max(e-1,0)))),"Enter"===e.key&&(e.preventDefault(),$>=0)){const e=k[$];D(e.id||PL(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:RL,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(IL,{highlightedIndex:$,items:k,query:b,onSelect:D}),"list"===c&&!l&&r.jsx(yC,{items:k,highlightedIndex:$})]})})})]})},exports.Select=vv,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=uO(v,w);e>0&&e<w.length-1?C=m.makeFullScreenLabel:e===w.length-1&&(C=m.expandedSheetLabel)}const k=!(null==v||!w.length||uO(v,w)!==w.length-1);return r.jsx(lO,{ref:g,css:dO(!!e,p),className:u,open:i,onDismiss:s,header:r.jsxs("div",{children:[r.jsx("button",{type:"button",disabled:k,"aria-label":C,css:cO,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(yw,{count:o,mode:i,onClick:e,ref:n,showFocusState:r,variant:s}),exports.Slider=Bb,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:$v,children:[i.step&&i.marks?r.jsx(vv,{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(Bb,{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:rA,children:[e.map(((e,n)=>r.jsxs("div",{css:oA,children:[r.jsx("button",{css:iA(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:sA(t===n+1),children:e.label}):null]},`${e.label}-${n}`))),r.jsx("div",{css:aA,children:r.jsx("div",{css:lA})})]})},exports.Switch=_b,exports.TabBar=({variant:t="panel",defaultValue:o,tabs:i,onTabClick:s,activationMode:a="manual"})=>{const[l,c]=n.useState(TL(i,o)||0);return r.jsx("div",{css:kL(t),children:r.jsx(e.Tabs.Root,{width:"full",defaultValue:o||i?.[0]?.value,onValueChange:({value:e})=>{return c(TL(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,s)=>r.jsxs(n.Fragment,{children:["view"===t&&1===s&&"left"===OL(l)?r.jsx("div",{css:jL}):null,r.jsx(e.Tabs.Trigger,{css:[SL,"view"===t&&ML,"panel"===t&&$L,"transparent"===t&&EL],"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===s&&s<i.length-1&&"right"===OL(l)?r.jsx("div",{css:jL}):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({}),j=n.useRef(null),[M,E]=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((()=>zC(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!==M[DC]?[DC]:[],...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[DC]=0,o+=n.offsetWidth),i.forEach((e=>{r[e.key]=o,o+=t[e.key]?.offsetWidth||0})),r})(o,$.current,d?j.current:void 0);E(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=>PC(M,e.key,q),K=e=>((e,t,n,r)=>({...IC(e,n),...PC(t,n,r)}))(_,M,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,{...PC(s,DC,a),children:t.jsx(cb,{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:M,lastStickyColumnKey:q,getSelectRowLabel:(e,t)=>C.selectRowLabel(e,t)}),J=s||Z;return r.jsxs("div",{children:[r.jsx("div",{css:y?RC(y):void 0,children:r.jsxs(e.Table.Root,{css:$C(h,l),striped:a,stickyHeader:l,interactive:!0,children:[r.jsx(e.Table.Header,{css:jC(h),children:r.jsxs(e.Table.Row,{children:[d?r.jsx(e.Table.ColumnHeader,{ref:j,...PC(M,DC,q),children:r.jsx(cb,{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,IC(_,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:MC,children:[t.label,t.sortable?r.jsxs("div",{css:EC,children:[r.jsx(_f,{css:TC(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:TC(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:AC(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:NC,children:r.jsx(e.Spinner,{size:"lg",color:w("primary",500)})}):null,r.jsxs("div",{css:OC,children:[N?r.jsx(dC,{pageSize:R,currentPage:A,totalItems:L,onPageSizeChange:f,showItemCountText:D}):null,c?r.jsx("div",{css:LC,children:r.jsx(SC,{totalItems:L,pageSize:R,currentPage:A,onPageChange:m})}):null]})]})},exports.TableCell=BC,exports.TableRow=VC,exports.Tag=mv,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),[$,j]=n.useState(!1),[M,E]=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),j(!1),E(x.enterAtLeastChars(m-e))):m&&0===e&&E(x.minChars(m)),g&&e>0?(S(!1),j(e>g),E(x.charsRemaining(g-e))):g&&0===e&&E(x.maxChars(g))}),[]);const N=!!s||k||$,D=[o?L:null,N?A:null,M?R:null].filter(Boolean).join(" ")||void 0,I=Boolean(O),P=mg(p,f),z=M&&!$&&!k,V=k&&!!m||$&&!!g||z?r.jsxs(r.Fragment,{children:[k&&m?r.jsx(e.Field.ErrorText,{id:A,css:Mv,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:Mv,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:jv,"aria-live":"polite",children:M}):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:Ev(c,I),onChange:e=>{T||C(e.target.value);const{length:t}=e.target.value;m&&g?(S(t<m),j(t>g),E(x.charsRemaining(g-t))):m?(S(t<m),j(!1),E(t<m?x.enterAtLeastChars(m-t):"")):g&&(j(t>g),S(!1),E(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 o=Vf("Toast",t),[s,a]=n.useState(!1);return n.useEffect((()=>{const e=mA((()=>a(!0)));return()=>{e(),a(!1)}}),[]),s?Object.keys(bA).map((t=>r.jsx(e.Portal,{children:r.jsx(e.Toaster,{toaster:bA[t],insetInline:{mdDown:"4"},children:n=>{return r.jsxs(e.Toast.Root,{css:(s=n.meta?.maxWidth,i.css`
|
|
4584
4579
|
justify-content: space-between;
|
|
4585
4580
|
align-items: center;
|
|
4586
4581
|
gap: ${k(200)};
|
|
@@ -4624,4 +4619,4 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4624
4619
|
color: ${w("error",900)};
|
|
4625
4620
|
}
|
|
4626
4621
|
}
|
|
4627
|
-
`),width:{md:"sm"},children:[r.jsxs(e.Stack,{flexDirection:"row",className:"ds-toast-icon-container",alignItems:n.description?"flex-start":"center",children:["info"===n.type?n.meta?.icon?n.meta.icon:r.jsx(Kf,{color:"var(--chakra-colors-neutral-700)"}):null,"loading"===n.type?r.jsx(e.Spinner,{size:"lg",borderWidth:"0.1875rem",color:"var(--chakra-colors-primary-700)"}):null,"success"===n.type?n.meta?.icon?n.meta.icon:r.jsx(tm,{color:"var(--chakra-colors-success-500)"}):null,"warning"===n.type?n.meta?.icon?n.meta.icon:r.jsx(nm,{color:"var(--chakra-colors-warning-500)"}):null,"error"===n.type?n.meta?.icon?n.meta.icon:r.jsx(rm,{color:"var(--chakra-colors-error-500)"}):null,r.jsxs(e.Stack,{gap:"1",flex:"1",maxWidth:"100%",children:[r.jsx(e.Toast.Title,{css:
|
|
4622
|
+
`),width:{md:"sm"},children:[r.jsxs(e.Stack,{flexDirection:"row",className:"ds-toast-icon-container",alignItems:n.description?"flex-start":"center",children:["info"===n.type?n.meta?.icon?n.meta.icon:r.jsx(Kf,{color:"var(--chakra-colors-neutral-700)"}):null,"loading"===n.type?r.jsx(e.Spinner,{size:"lg",borderWidth:"0.1875rem",color:"var(--chakra-colors-primary-700)"}):null,"success"===n.type?n.meta?.icon?n.meta.icon:r.jsx(tm,{color:"var(--chakra-colors-success-500)"}):null,"warning"===n.type?n.meta?.icon?n.meta.icon:r.jsx(nm,{color:"var(--chakra-colors-warning-500)"}):null,"error"===n.type?n.meta?.icon?n.meta.icon:r.jsx(rm,{color:"var(--chakra-colors-error-500)"}):null,r.jsxs(e.Stack,{gap:"1",flex:"1",maxWidth:"100%",children:[r.jsx(e.Toast.Title,{css:cA,"aria-label":`${n.title}`,children:n.title}),n.description?r.jsx(e.Toast.Title,{css:dA,"aria-label":`${n.description}`,children:n.description}):null]})]}),n.action||n.meta?.closable?r.jsxs(e.Stack,{flexDirection:"row",children:[n.action?r.jsx(Bf,{css:uA,label:n.action.label,size:"small",variant:"info"===n.type?"primary":"secondary",onClick:()=>{n?.action?.onClick&&n.action.onClick(),bA[t].dismiss(n.id)}}):null,n.meta?.closable?r.jsx(Bf,{css:hA,label:n.meta.closableLabel,"aria-label":n.meta?.closableLabel||o.dismissLabel,leftIcon:r.jsx(Xf,{height:"0.625rem!",width:"0.625rem!"}),size:"small",variant:"secondary",onClick:()=>{n.meta?.onClose&&n.meta.onClose(),bA[t].dismiss(n.id)}}):null]}):null]});var s}})},t))):null},exports.Toolbar=Jg,exports.Tooltip=Fm,exports.closeToast=e=>{Object.values(bA).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=>{bA[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
|
@@ -1898,8 +1898,8 @@ type InlineMessageProps = {
|
|
|
1898
1898
|
|
|
1899
1899
|
declare const InlineMessage: ({ label, caption, variant, size, icon, onActionClick, actionLabel, actionButtonVariant, isButtonRight, buttonLeftIcon, buttonRightIcon, labels, }: InlineMessageProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1900
1900
|
|
|
1901
|
-
interface AlertProps extends Omit<Alert.RootProps, 'title' | 'variant' | 'width'> {
|
|
1902
|
-
|
|
1901
|
+
interface AlertProps extends Omit<Alert.RootProps, 'title' | 'variant' | 'width' | 'children'> {
|
|
1902
|
+
children: React.ReactNode;
|
|
1903
1903
|
icon?: React.ReactElement;
|
|
1904
1904
|
onClose?: () => void;
|
|
1905
1905
|
isCentered?: boolean;
|
package/dist/index.esm.js
CHANGED
|
@@ -4466,8 +4466,7 @@ function kL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4466
4466
|
color: ${o};
|
|
4467
4467
|
background-color: ${r};
|
|
4468
4468
|
${s?`border: ${a} solid ${i};\n border-radius: ${Be(300)};`:`border-bottom: ${a} solid ${i};\n border-radius: ${Be(100)};`}
|
|
4469
|
-
.chakra-
|
|
4470
|
-
.chakra-alert__description {
|
|
4469
|
+
.chakra-alert__content {
|
|
4471
4470
|
font-size: ${ze(400)};
|
|
4472
4471
|
line-height: ${He(600)};
|
|
4473
4472
|
font-weight: 400;
|
|
@@ -4484,36 +4483,32 @@ function kL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4484
4483
|
width: ${Ve(400)};
|
|
4485
4484
|
height: ${Ve(400)};
|
|
4486
4485
|
}
|
|
4487
|
-
`},eD=ke`
|
|
4488
|
-
display: flex;
|
|
4489
|
-
align-items: center;
|
|
4490
|
-
gap: ${Ve(400)};
|
|
4491
|
-
`,tD=ee.forwardRef((({title:e,children:t,icon:n,variant:r,onClose:o,labels:i,isCentered:s=!1,width:a="full-width"},l)=>{const c=tg("AlertBanner",i),[d,u]=ee.useState(!0),h=ve("success"===r?bg:"warning"===r?vg:"error"===r?yg:cg,{});return d?be(U.Root,{css:YR(r,a,s),children:[ve(U.Indicator,{css:QR(r),children:n||h}),t?ve(U.Content,{flex:s?"initial":void 0,children:be("div",{css:eD,children:[ve(U.Title,{children:e}),ve(U.Description,{children:t})]})}):ve(U.Title,{flex:s?"initial":"1",children:e}),ve(jb,{"aria-label":c.closeAlertLabel,pos:"absolute",top:"0.75rem",insetEnd:"0.75rem",onClick:()=>{u(!1),o?.()}})]}):null})),nD=ke`
|
|
4486
|
+
`},eD=ee.forwardRef((({children:e,icon:t,variant:n,onClose:r,labels:o,isCentered:i=!1,width:s="full-width"},a)=>{const l=tg("AlertBanner",o),[c,d]=ee.useState(!0),u=ve("success"===n?bg:"warning"===n?vg:"error"===n?yg:cg,{});return c?be(U.Root,{css:YR(n,s,i),children:[ve(U.Indicator,{css:QR(n),children:t||u}),ve(U.Content,{flex:i?"initial":"1",children:e}),ve(jb,{"aria-label":l.closeAlertLabel,pos:"absolute",top:"0.75rem",insetEnd:"0.75rem",onClick:()=>{d(!1),r?.()}})]}):null})),tD=ke`
|
|
4492
4487
|
height: ${Ve(200)};
|
|
4493
4488
|
width: 100%;
|
|
4494
4489
|
background-color: ${Ie("neutral",300)};
|
|
4495
4490
|
display: flex;
|
|
4496
4491
|
align-items: center;
|
|
4497
4492
|
justify-content: flex-start;
|
|
4498
|
-
`,
|
|
4493
|
+
`,nD=(e,t)=>ke`
|
|
4499
4494
|
height: 100%;
|
|
4500
4495
|
width: ${e}%;
|
|
4501
4496
|
background-color: ${t??Ie("primary",500)};
|
|
4502
4497
|
transition: width 0.5s ease-in-out;
|
|
4503
|
-
`,
|
|
4498
|
+
`,rD=({progress:e,labels:t,color:n})=>{const r=tg("ProgressBar",t);let o=e;return o>100&&(o=100),o<0&&(o=0),ve("div",{css:tD,role:"progressbar","aria-label":r.progressAriaLabel(o),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":o,children:ve("div",{css:nD(o,n)})})},oD=ke`
|
|
4504
4499
|
width: 100%;
|
|
4505
4500
|
display: flex;
|
|
4506
4501
|
align-items: center;
|
|
4507
4502
|
justify-content: space-between;
|
|
4508
4503
|
position: relative;
|
|
4509
|
-
`,
|
|
4504
|
+
`,iD=ke`
|
|
4510
4505
|
height: 3.75rem;
|
|
4511
4506
|
width: ${Ve(2e3)};
|
|
4512
4507
|
display: flex;
|
|
4513
4508
|
flex-direction: column;
|
|
4514
4509
|
align-items: center;
|
|
4515
4510
|
justify-content: space-between;
|
|
4516
|
-
`,
|
|
4511
|
+
`,sD=(e,t)=>ke`
|
|
4517
4512
|
height: ${Ve(800)};
|
|
4518
4513
|
width: ${Ve(800)};
|
|
4519
4514
|
display: flex;
|
|
@@ -4549,12 +4544,12 @@ function kL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4549
4544
|
}
|
|
4550
4545
|
|
|
4551
4546
|
${t?`\n background-color: ${Ie("neutral",300)};\n \n &:hover {\n background-color: ${Ie("neutral",300)};\n box-shadow: none;\n }\n `:""}
|
|
4552
|
-
`,
|
|
4547
|
+
`,aD=e=>ke`
|
|
4553
4548
|
color: ${Ie("neutral",e?800:600)};
|
|
4554
4549
|
font-size: ${ze(300)};
|
|
4555
4550
|
line-height: ${He(500)};
|
|
4556
4551
|
font-weight: 400;
|
|
4557
|
-
`,
|
|
4552
|
+
`,lD=ke`
|
|
4558
4553
|
height: ${_e(100)};
|
|
4559
4554
|
width: 100%;
|
|
4560
4555
|
padding: 0 1.875rem;
|
|
@@ -4562,25 +4557,25 @@ function kL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4562
4557
|
top: ${Ve(400)};
|
|
4563
4558
|
left: 0;
|
|
4564
4559
|
z-index: -1;
|
|
4565
|
-
`,
|
|
4560
|
+
`,cD=ke`
|
|
4566
4561
|
height: ${_e(100)};
|
|
4567
4562
|
width: 100%;
|
|
4568
4563
|
background-color: ${Ie("neutral",400)};
|
|
4569
|
-
`,
|
|
4564
|
+
`,dD=({steps:e,currentStep:t,labels:n})=>{const r=tg("StepProgressIndicator",n);return be("div",{css:oD,children:[e.map(((e,n)=>be("div",{css:iD,children:[ve("button",{css:sD(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?ve(ag,{height:"1rem",width:"1rem"}):n+1}),e.label?ve("p",{css:aD(t===n+1),children:e.label}):null]},`${e.label}-${n}`))),ve("div",{css:lD,children:ve("div",{css:cD})})]})},uD=ke`
|
|
4570
4565
|
font-size: ${ze(500)};
|
|
4571
4566
|
line-height: ${He(700)};
|
|
4572
4567
|
font-weight: 400;
|
|
4573
4568
|
color: ${Ie("neutral",800)};
|
|
4574
|
-
`,
|
|
4569
|
+
`,hD=ke`
|
|
4575
4570
|
font-size: ${ze(400)};
|
|
4576
4571
|
line-height: ${He(600)};
|
|
4577
4572
|
font-weight: 400;
|
|
4578
4573
|
color: ${Ie("neutral",700)};
|
|
4579
|
-
`,
|
|
4574
|
+
`,pD=ke`
|
|
4580
4575
|
padding: 0.375rem;
|
|
4581
|
-
`,
|
|
4576
|
+
`,fD=ke`
|
|
4582
4577
|
padding: 0.375rem;
|
|
4583
|
-
`;let
|
|
4578
|
+
`;let mD=!1;const gD=new Set,bD=e=>{let t,n=!1;const r=()=>{n&&(n=!1,(()=>{mD=!1;const[e]=gD;e&&(gD.delete(e),e())})())},o=()=>{mD=!0,n=!0,t=void 0,e()};return mD?(t=()=>o(),gD.add(t)):o(),()=>{n?r():t&&gD.delete(t)}},vD={pauseOnPageIdle:!0,offsets:"1.5rem"},yD={"top-start":K({placement:"top-start",...vD}),top:K({placement:"top",...vD}),"top-end":K({placement:"top-end",...vD}),"bottom-start":K({placement:"bottom-start",...vD}),bottom:K({placement:"bottom",...vD}),"bottom-end":K({placement:"bottom-end",...vD})},wD=e=>{yD[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})},xD=e=>{Object.values(yD).forEach((t=>{t.dismiss(e)}))},CD=({labels:e})=>{const t=tg("Toast",e),[n,r]=ae(!1);return ce((()=>{const e=bD((()=>r(!0)));return()=>{e(),r(!1)}}),[]),n?Object.keys(yD).map((e=>ve(a,{children:ve(G,{toaster:yD[e],insetInline:{mdDown:"4"},children:n=>{return be(Z.Root,{css:(r=n.meta?.maxWidth,ke`
|
|
4584
4579
|
justify-content: space-between;
|
|
4585
4580
|
align-items: center;
|
|
4586
4581
|
gap: ${Ve(200)};
|
|
@@ -4624,4 +4619,4 @@ function kL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4624
4619
|
color: ${Ie("error",900)};
|
|
4625
4620
|
}
|
|
4626
4621
|
}
|
|
4627
|
-
`),width:{md:"sm"},children:[be(J,{flexDirection:"row",className:"ds-toast-icon-container",alignItems:n.description?"flex-start":"center",children:["info"===n.type?n.meta?.icon?n.meta.icon:ve(cg,{color:"var(--chakra-colors-neutral-700)"}):null,"loading"===n.type?ve(o,{size:"lg",borderWidth:"0.1875rem",color:"var(--chakra-colors-primary-700)"}):null,"success"===n.type?n.meta?.icon?n.meta.icon:ve(bg,{color:"var(--chakra-colors-success-500)"}):null,"warning"===n.type?n.meta?.icon?n.meta.icon:ve(vg,{color:"var(--chakra-colors-warning-500)"}):null,"error"===n.type?n.meta?.icon?n.meta.icon:ve(yg,{color:"var(--chakra-colors-error-500)"}):null,be(J,{gap:"1",flex:"1",maxWidth:"100%",children:[ve(Z.Title,{css:
|
|
4622
|
+
`),width:{md:"sm"},children:[be(J,{flexDirection:"row",className:"ds-toast-icon-container",alignItems:n.description?"flex-start":"center",children:["info"===n.type?n.meta?.icon?n.meta.icon:ve(cg,{color:"var(--chakra-colors-neutral-700)"}):null,"loading"===n.type?ve(o,{size:"lg",borderWidth:"0.1875rem",color:"var(--chakra-colors-primary-700)"}):null,"success"===n.type?n.meta?.icon?n.meta.icon:ve(bg,{color:"var(--chakra-colors-success-500)"}):null,"warning"===n.type?n.meta?.icon?n.meta.icon:ve(vg,{color:"var(--chakra-colors-warning-500)"}):null,"error"===n.type?n.meta?.icon?n.meta.icon:ve(yg,{color:"var(--chakra-colors-error-500)"}):null,be(J,{gap:"1",flex:"1",maxWidth:"100%",children:[ve(Z.Title,{css:uD,"aria-label":`${n.title}`,children:n.title}),n.description?ve(Z.Title,{css:hD,"aria-label":`${n.description}`,children:n.description}):null]})]}),n.action||n.meta?.closable?be(J,{flexDirection:"row",children:[n.action?ve(ng,{css:pD,label:n.action.label,size:"small",variant:"info"===n.type?"primary":"secondary",onClick:()=>{n?.action?.onClick&&n.action.onClick(),yD[e].dismiss(n.id)}}):null,n.meta?.closable?ve(ng,{css:fD,label:n.meta.closableLabel,"aria-label":n.meta?.closableLabel||t.dismissLabel,leftIcon:ve(pg,{height:"0.625rem!",width:"0.625rem!"}),size:"small",variant:"secondary",onClick:()=>{n.meta?.onClose&&n.meta.onClose(),yD[e].dismiss(n.id)}}):null]}):null]});var r}})},e))):null};export{eD as AlertBanner,P$ as AnalysisWidget,JR as Avatar,ZR as Badge,ZC as BaseMap,NN as Breadcrumb,ng as Button,Lv as Checkbox,yy as CheckboxList,zv as CheckboxOptionCard,jb as CloseButton,YC as ClusterPoint,bw as Combobox,Fe as DesignSystemLocaleProvider,L$ as ExtendableCard,kb as FieldWrapper,VN as Footer,Tv as FormContainer,BC as GuidedTour,og as IconButton,mN as InlineMessage,Fy as InputWithUnits,Jk as ItemCount,uk as LayerGroup,hk as LayerGroupContainer,dk as LayerItem,bk as LayerParameters,Ok as LegendItem,i$ as List,mv as MapControlsToolbar,XC as MapMarker,ek as MapMarkers,RC as MapPopUp,nb as Menu,TN as MobileSearch,qN as MobileTabBar,PS as Modal,kv as MultiActionButton,fR as Navbar,wR as NavigationRail,Tk as OpacityControl,qv as OptionCard,d$ as Pagination,jS as Panel,Zy as Password,rD as ProgressBar,Vk as QualitativeAttribute,Gv as Radio,Zv as RadioGroup,Xy as RadioList,Hb as RichTextEditor,Bb as SSOButtons,Wk as ScaleBar,zR as Search,jy as Select,rN as Sheet,QC as SimpleMapPin,cy as Slider,Qy as SliderInput,dD as StepProgressIndicator,uy as Switch,OR as TabBar,S$ as Table,E$ as TableCell,M$ as TableRow,Hy as Tag,Nb as TextInput,rw as Textarea,CD as Toast,fv as Toolbar,ib as Tooltip,xD as closeToast,Pe as designSystemStyles,De as designSystemStylesForTailwind,_e as getThemedBorderWidth,Ie as getThemedColor,ze as getThemedFontSize,He as getThemedLineHeight,Be as getThemedRadius,Ve as getThemedSpacing,wD as showToast};
|