@worldresources/wri-design-systems 2.177.0 → 2.177.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +103 -99
- package/dist/index.d.ts +5 -2
- package/dist/index.esm.js +100 -96
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -213,16 +213,17 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as o,Ic
|
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
|
-
`),"aria-label":t,disabled:l,onClick:s,mr:c&&!d?"16px":"0",mb:c&&d?"16px":"0",children:q(r,{display:"flex",overflow:"hidden",style:{justifyContent:"flex-end",alignItems:"center"},whiteSpace:"nowrap",transition:"max-width 0.3s ease, opacity 0.2s ease, margin-left 0.3s ease",maxWidth:e?"150px":"32px",padding:"8px",margin:e?"8px":"0",children:[o&&G(r,{as:"span",mr:o&&e?"8px":"0px",children:G(yt,{content:a,disabled:!a,children:o})}),i&&G(r,{"aria-hidden":!e,overflow:"hidden",maxWidth:e?"150px":"0px",whiteSpace:"nowrap",transition:"max-width 0.3s ease, opacity 0.2s ease, margin-left 0.3s ease",children:G(yt,{content:a,disabled:!a,children:i})})]})});var u};const Ct=({items:e,vertical:t=!1,expanded:n=!1,showExpandedToggle:r,autoCollapse:o=!1,ariaLabel:i,defaultGaps:a})=>{const[d,u]=J(n),{containerRef:p,visibleNumberOfItems:h,shouldForceCollapse:f}=function({itemsCount:e,isExpanded:t,isVertical:n,collapsedWidth:r,expandedLabelWidth:o,gap:i=0,showExpandedToggle:a,autoCollapse:l}){const s=Q(null),[c,d]=J(0),[u,p]=J(e),[h,f]=J(!1);return ee((()=>{if(!s.current)return;const e=new ResizeObserver((e=>{const t=e[0];d(Math.floor(t.contentRect.width))}));return e.observe(s.current),()=>e.disconnect()}),[]),ee((()=>{if(0===c)return;if(!l)return f(!1),void p(e);const s=c-(a?r+i:0),d=r+i;f(e*(t?o+i:d)-i>s),e>1&&!n&&p(Math.floor(s/d))}),[c,e,t,n,r,o,i,a,l]),{containerRef:s,visibleNumberOfItems:u,shouldForceCollapse:h}}({itemsCount:e.length,isExpanded:d,isVertical:t,collapsedWidth:48,expandedLabelWidth:100,gap:16,showExpandedToggle:r,autoCollapse:o});ee((()=>{u(n)}),[n]);const g=e.slice(0,h),v=e.slice(h,e.length),m=v.map((e=>({label:e.label,startIcon:e.icon,disabled:e.disabled,onClick:e.onClick,itemAriaLabel:e.ariaLabel}))),x=G("div",{style:{position:"relative",display:"flex",width:"48px"},children:G(wt,{isExpanded:d,ariaLabel:d?"Collapse":"Expand",icon:G(Ve,{}),showGap:!1,vertical:t})}),[b,y]=J(!1);return G("div",{role:"toolbar","aria-label":i,css:vt,children:q(s,{ref:p,orientation:t?"vertical":"horizontal",attached:!0,display:"grid",borderCollapse:"collapse",gridAutoFlow:t||1===e.length?"row":"column",children:[g.map((e=>{const n=a&&!1!==e.gap||!a&&!0===e.gap;return G(wt,{isExpanded:d&&!f,ariaLabel:e.ariaLabel,icon:e.icon,label:e.label,tooltip:e.tooltip,disabled:e.disabled,onClick:e.onClick,showGap:n,vertical:t},e.ariaLabel)})),f&&m.length>1&&q(c.Root,{onSelect:({value:e})=>(e=>{const t=v.find((t=>t.label===e));t&&t.onClick&&t.onClick()})(e),onOpenChange:({open:e})=>y(e),open:b,children:[G(c.Trigger,{asChild:!0,children:x}),G(l,{children:G(c.Positioner,{children:G(c.Content,{style:{minWidth:0,padding:0},children:m.map((({label:e,startIcon:n,onClick:r,itemAriaLabel:o},a)=>G(c.Item,{css:mt,value:e||i||a.toString(),role:"menuitem",children:G(wt,{isExpanded:!1,icon:n,ariaLabel:o,label:"",onClick:r,showGap:!1,vertical:t})})))})})})]}),r&&!o&&!f&&G(wt,{isExpanded:d,ariaLabel:d?"Collapse":"Expand",icon:G(d?st:ct,{}),label:"Collapse",onClick:()=>u(!d),showGap:!1,vertical:t})]})})},$t=({onZoomInClick:e,onZoomOutClick:t,onExpandClick:n,onShareClick:r,onPrintClick:o,onSettingsClick:i,onQuestionClick:a,vertical:l,expanded:s,showExpandedToggle:c,ariaLabel:d})=>{const u=[{icon:ue(We,{}),label:"Zoom in",ariaLabel:"zoom in",onClick:e},{icon:ue(qe,{}),label:"Zoom out",ariaLabel:"zoom out",onClick:t,gap:!0},{icon:ue(Ge,{}),label:"Expand",ariaLabel:"expand",onClick:n,gap:!0},{icon:ue(Ue,{}),label:"Share",ariaLabel:"share",onClick:r,gap:!0},{icon:ue(Xe,{}),label:"Print",ariaLabel:"print",onClick:o,gap:!0},{icon:ue(Ye,{}),label:"Settings",ariaLabel:"settings",onClick:i,gap:!0},{icon:ue(Ke,{}),label:"Help",ariaLabel:"question",onClick:a}];return ue(Ct,{items:u,vertical:l,expanded:s,showExpandedToggle:c,ariaLabel:d||"Map controls toolbar"})},kt=de`
|
|
216
|
+
`),"aria-label":t,disabled:l,onClick:s,mr:c&&!d?"16px":"0",mb:c&&d?"16px":"0",children:q(r,{display:"flex",overflow:"hidden",style:{justifyContent:"flex-end",alignItems:"center"},whiteSpace:"nowrap",transition:"max-width 0.3s ease, opacity 0.2s ease, margin-left 0.3s ease",maxWidth:e?"150px":"32px",padding:"8px",margin:e?"8px":"0",children:[o&&G(r,{as:"span",mr:o&&e?"8px":"0px",children:G(yt,{content:a,disabled:!a,children:o})}),i&&G(r,{"aria-hidden":!e,overflow:"hidden",maxWidth:e?"150px":"0px",whiteSpace:"nowrap",transition:"max-width 0.3s ease, opacity 0.2s ease, margin-left 0.3s ease",children:G(yt,{content:a,disabled:!a,children:i})})]})});var u};const Ct=({items:e,vertical:t=!1,expanded:n=!1,showExpandedToggle:r,autoCollapse:o=!1,ariaLabel:i,defaultGaps:a})=>{const[d,u]=J(n),{containerRef:p,visibleNumberOfItems:h,shouldForceCollapse:f}=function({itemsCount:e,isExpanded:t,isVertical:n,collapsedWidth:r,expandedLabelWidth:o,gap:i=0,showExpandedToggle:a,autoCollapse:l}){const s=Q(null),[c,d]=J(0),[u,p]=J(e),[h,f]=J(!1);return ee((()=>{if(!s.current)return;const e=new ResizeObserver((e=>{const t=e[0];d(Math.floor(t.contentRect.width))}));return e.observe(s.current),()=>e.disconnect()}),[]),ee((()=>{if(0===c)return;if(!l)return f(!1),void p(e);const s=c-(a?r+i:0),d=r+i;f(e*(t?o+i:d)-i>s),e>1&&!n&&p(Math.floor(s/d))}),[c,e,t,n,r,o,i,a,l]),{containerRef:s,visibleNumberOfItems:u,shouldForceCollapse:h}}({itemsCount:e.length,isExpanded:d,isVertical:t,collapsedWidth:48,expandedLabelWidth:100,gap:16,showExpandedToggle:r,autoCollapse:o});ee((()=>{u(n)}),[n]);const g=e.slice(0,h),v=e.slice(h,e.length),m=v.map((e=>({label:e.label,startIcon:e.icon,disabled:e.disabled,onClick:e.onClick,itemAriaLabel:e.ariaLabel}))),x=G("div",{style:{position:"relative",display:"flex",width:"48px"},children:G(wt,{isExpanded:d,ariaLabel:d?"Collapse":"Expand",icon:G(Ve,{}),showGap:!1,vertical:t})}),[b,y]=J(!1);return G("div",{role:"toolbar","aria-label":i,css:vt,children:q(s,{ref:p,orientation:t?"vertical":"horizontal",attached:!0,display:"grid",borderCollapse:"collapse",gridAutoFlow:t||1===e.length?"row":"column",children:[g.map((e=>{const n=a&&!1!==e.gap||!a&&!0===e.gap;return G(wt,{isExpanded:d&&!f,ariaLabel:e.ariaLabel,icon:e.icon,label:e.label,tooltip:e.tooltip,disabled:e.disabled,onClick:e.onClick,showGap:n,vertical:t},e.ariaLabel)})),f&&m.length>1&&q(c.Root,{onSelect:({value:e})=>(e=>{const t=v.find((t=>t.label===e));t&&t.onClick&&t.onClick()})(e),onOpenChange:({open:e})=>y(e),open:b,children:[G(c.Trigger,{asChild:!0,children:x}),G(l,{children:G(c.Positioner,{children:G(c.Content,{style:{minWidth:0,padding:0},children:m.map((({label:e,startIcon:n,onClick:r,itemAriaLabel:o},a)=>G(c.Item,{css:mt,value:e||i||a.toString(),role:"menuitem",children:G(wt,{isExpanded:!1,icon:n,ariaLabel:o,label:"",onClick:r,showGap:!1,vertical:t})})))})})})]}),r&&!o&&!f&&G(wt,{isExpanded:d,ariaLabel:d?"Collapse":"Expand",icon:G(d?st:ct,{}),label:"Collapse",onClick:()=>u(!d),showGap:!1,vertical:t})]})})},$t=({onZoomInClick:e,onZoomOutClick:t,onExpandClick:n,onShareClick:r,onPrintClick:o,onSettingsClick:i,onQuestionClick:a,vertical:l,expanded:s,showExpandedToggle:c,ariaLabel:d})=>{const u=[{icon:ue(We,{}),label:"Zoom in",ariaLabel:"zoom in",onClick:e},{icon:ue(qe,{}),label:"Zoom out",ariaLabel:"zoom out",onClick:t,gap:!0},{icon:ue(Ge,{}),label:"Expand",ariaLabel:"expand",onClick:n,gap:!0},{icon:ue(Ue,{}),label:"Share",ariaLabel:"share",onClick:r,gap:!0},{icon:ue(Xe,{}),label:"Print",ariaLabel:"print",onClick:o,gap:!0},{icon:ue(Ye,{}),label:"Settings",ariaLabel:"settings",onClick:i,gap:!0},{icon:ue(Ke,{}),label:"Help",ariaLabel:"question",onClick:a}];return ue(Ct,{items:u,vertical:l,expanded:s,showExpandedToggle:c,ariaLabel:d||"Map controls toolbar"})},kt=e=>de`
|
|
217
217
|
display: flex;
|
|
218
218
|
align-items: center;
|
|
219
219
|
justify-content: center;
|
|
220
220
|
gap: 4px;
|
|
221
221
|
padding: 2px 12px;
|
|
222
222
|
cursor: pointer;
|
|
223
|
-
|
|
223
|
+
color: ${"dark"===e?we("neutral",100):"default"};
|
|
224
|
+
background-color: ${"dark"===e?"default":"transparent"};
|
|
224
225
|
&:hover {
|
|
225
|
-
background-color: ${we("neutral",200)};
|
|
226
|
+
background-color: ${"dark"===e?"default":we("neutral",200)};
|
|
226
227
|
}
|
|
227
228
|
|
|
228
229
|
&:focus-visible {
|
|
@@ -379,7 +380,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as o,Ic
|
|
|
379
380
|
width: 100%;
|
|
380
381
|
margin-left: ${n?"8px":"0"};
|
|
381
382
|
margin-right: ${r?"8px":"0"};
|
|
382
|
-
`),children:[q("div",{css:Ot,children:[G("p",{className:"ds-menu-item-label",children:e.label}),e.command?G(c.ItemCommand,{"aria-label":`Shortcut ${e.command}`,children:e.command}):null]}),e.caption?G("p",{className:"ds-menu-item-caption",children:e.caption}):null]}),e.endIcon]})}),t?null:G(c.Separator,{borderColor:"var(--chakra-colors-neutral-300)"})]});var n,r},Pt=({
|
|
383
|
+
`),children:[q("div",{css:Ot,children:[G("p",{className:"ds-menu-item-label",children:e.label}),e.command?G(c.ItemCommand,{"aria-label":`Shortcut ${e.command}`,children:e.command}):null]}),e.caption?G("p",{className:"ds-menu-item-caption",children:e.caption}):null]}),e.endIcon]})}),t?null:G(c.Separator,{borderColor:"var(--chakra-colors-neutral-300)"})]});var n,r},Pt=({theme:e="light",label:t,items:n,groups:r,onSelect:o,customTrigger:i})=>{const[a,s]=J(!1);return q(c.Root,{onSelect:({value:e})=>o&&o(e),onOpenChange:({open:e})=>s(e),open:a,children:[G(c.Trigger,{css:kt(e),asChild:!0,children:i||q("button",{type:"button",children:[t,G(Me,{marginLeft:"6px",rotate:a?"180":"0",height:"14px",width:"14px"})]})}),G(l,{children:G(c.Positioner,{children:q(c.Content,{css:St,role:"menu","aria-label":t||"Menu",children:[n?.map(((e,t)=>{if(e.submenu){const[n,r]=J(!1);return q(c.Root,{positioning:{placement:"right-start",gutter:2},onSelect:({value:e})=>o&&o(e),onOpenChange:({open:e})=>r(e),open:n,children:[q(c.TriggerItem,{css:Et,role:"menuitem","aria-haspopup":"true","aria-expanded":n?"true":"false",children:[e.label,G(Me,{rotate:"270",color:"var(--chakra-colors-neutral-700)"})]}),G(l,{children:G(c.Positioner,{children:G(c.Content,{css:St,role:"menu","aria-label":`${e.label} submenu`,children:e.submenu.map(((t,n)=>G(Tt,{item:t,isLast:n===(e.submenu?.length||0)-1},t.value)))})})})]},`${e.value}-${t}`)}return G(Tt,{item:e,isLast:t===n.length-1},`${e.value}-${t}`)})),r?.map(((e,t)=>q(Y.Fragment,{children:[q(c.ItemGroup,{role:"group","aria-labelledby":`group-${t}`,children:[G(c.ItemGroupLabel,{id:`group-${t}`,css:Rt,children:e.title}),e.items?.map((e=>G(Tt,{item:e,isLast:r.length-1===t},e.value)))]}),t!==r.length-1?G(c.Separator,{borderColor:"var(--chakra-colors-neutral-300)"}):null]},e.title)))]})})})]})},_t=de`
|
|
383
384
|
width: 200px;
|
|
384
385
|
border: 1px solid ${we("neutral",600)};
|
|
385
386
|
border-radius: 4px;
|
|
@@ -2758,37 +2759,46 @@ function Mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2758
2759
|
display: flex;
|
|
2759
2760
|
justify-content: center;
|
|
2760
2761
|
align-items: center;
|
|
2761
|
-
`,Og=(e,t)=>Math.max(0,e.findIndex((e=>e.value===t))),Rg=({defaultValue:e,tabs:t,onTabClick:n,hideLabels:r,activationMode:o="manual"})=>{const i=t.length,[a,l]=J((()=>Og(t,e)));return G("div",{css:kg,children:G(N.Root,{width:"full",defaultValue:e||t?.[0]?.value,onValueChange:({value:e})=>(e=>{const r=Og(t,e);l(r),n&&n(e)})(e),activationMode:o,children:G(N.List,{alignItems:"center",border:"none",children:t.map(((e,t)=>{const{label:n,icon:o,bagdeCount:l,"aria-label":s,"aria-describedby":c,disabled:d,...u}=e,p=`${e.value}-str-status`,h=[`tab ${t+1} of ${i}`,a===t?"selected":"not selected"];d&&h.push("disabled");const f=[c,p].filter(Boolean).join(" ")||void 0;return q(N.Trigger,{css:Sg,"aria-label":s||n,"aria-disabled":!!d||void 0,"aria-describedby":f,disabled:d,...u,children:[q("div",{css:Eg,children:[o,l?G("div",{css:Lg,className:"ds-badge-count",children:l}):null]}),r?null:G("p",{children:n}),G(V,{id:p,children:h.join(", ")})]},e.value)}))})})})},Tg=(e,t,n)=>de`
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
height: 48px;
|
|
2762
|
+
`,Og=(e,t)=>Math.max(0,e.findIndex((e=>e.value===t))),Rg=({defaultValue:e,tabs:t,onTabClick:n,hideLabels:r,activationMode:o="manual"})=>{const i=t.length,[a,l]=J((()=>Og(t,e)));return G("div",{css:kg,children:G(N.Root,{width:"full",defaultValue:e||t?.[0]?.value,onValueChange:({value:e})=>(e=>{const r=Og(t,e);l(r),n&&n(e)})(e),activationMode:o,children:G(N.List,{alignItems:"center",border:"none",children:t.map(((e,t)=>{const{label:n,icon:o,bagdeCount:l,"aria-label":s,"aria-describedby":c,disabled:d,...u}=e,p=`${e.value}-str-status`,h=[`tab ${t+1} of ${i}`,a===t?"selected":"not selected"];d&&h.push("disabled");const f=[c,p].filter(Boolean).join(" ")||void 0;return q(N.Trigger,{css:Sg,"aria-label":s||n,"aria-disabled":!!d||void 0,"aria-describedby":f,disabled:d,...u,children:[q("div",{css:Eg,children:[o,l?G("div",{css:Lg,className:"ds-badge-count",children:l}):null]}),r?null:G("p",{children:n}),G(V,{id:p,children:h.join(", ")})]},e.value)}))})})})},Tg=(e,t,n,r,o)=>{let i="48px";return e?i="96px":o&&(i="28px"),de`
|
|
2763
|
+
max-height: ${i};
|
|
2764
|
+
width: 100%;
|
|
2765
|
+
background-color: ${we("neutral",n||"dark"===r?800:100)};
|
|
2766
|
+
position: ${t?"sticky":"absolute"};
|
|
2767
|
+
top: 0;
|
|
2768
|
+
left: 0;
|
|
2769
|
+
z-index: 102;
|
|
2770
|
+
border-bottom: 1px solid ${we("neutral",400)};
|
|
2771
|
+
`},Pg=(e,t)=>de`
|
|
2772
|
+
height: ${t?"28px":"48px"};
|
|
2772
2773
|
width: 100%;
|
|
2773
|
-
background-color: ${we("neutral",100)};
|
|
2774
|
-
border-bottom: 1px solid
|
|
2774
|
+
background-color: ${we("neutral","dark"===e?800:100)};
|
|
2775
|
+
border-bottom: 1px solid
|
|
2776
|
+
${we("neutral","dark"===e?800:400)};
|
|
2775
2777
|
display: flex;
|
|
2776
2778
|
align-items: center;
|
|
2777
2779
|
justify-content: flex-start;
|
|
2778
2780
|
gap: 0px;
|
|
2779
|
-
padding: 8px 16px;
|
|
2780
|
-
`,_g=(e,t)=>de`
|
|
2781
|
-
height: 48px;
|
|
2781
|
+
padding: ${t?"0px":"8px 16px"};
|
|
2782
|
+
`,_g=(e,t,n)=>de`
|
|
2783
|
+
height: ${n?"28px":"48px"};
|
|
2782
2784
|
width: 100%;
|
|
2783
2785
|
max-width: ${t?`${t}px`:"100%"};
|
|
2784
2786
|
background-color: ${e?we("neutral",800):"transparent"};
|
|
2785
2787
|
display: flex;
|
|
2786
|
-
align-items: center;
|
|
2788
|
+
align-items: ${n?"start":"center"};
|
|
2789
|
+
|
|
2787
2790
|
justify-content: space-between;
|
|
2788
2791
|
margin: 0 auto;
|
|
2789
|
-
padding: 8px 16px;
|
|
2790
|
-
`,Mg=de`
|
|
2792
|
+
padding: ${n?"0px":"8px 16px"};
|
|
2793
|
+
`,Mg=(e,t)=>de`
|
|
2794
|
+
display: flex;
|
|
2795
|
+
margin: ${t?"-1px":"0px"};
|
|
2796
|
+
justify-content: flex-start;
|
|
2797
|
+
gap: 12px;
|
|
2798
|
+
color: ${we("neutral",e?100:900)};
|
|
2799
|
+
`,Dg=de`
|
|
2791
2800
|
outline: none;
|
|
2801
|
+
|
|
2792
2802
|
a {
|
|
2793
2803
|
&:focus-visible {
|
|
2794
2804
|
border-radius: 0px;
|
|
@@ -2798,20 +2808,20 @@ function Mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2798
2808
|
outline-width: 2px;
|
|
2799
2809
|
}
|
|
2800
2810
|
}
|
|
2801
|
-
`,
|
|
2811
|
+
`,Ng=e=>de`
|
|
2802
2812
|
display: ${e?"none":"flex"};
|
|
2803
2813
|
align-items: center;
|
|
2804
2814
|
justify-content: flex-start;
|
|
2805
2815
|
gap: 0px;
|
|
2806
|
-
`,
|
|
2816
|
+
`,Vg=(e,t)=>de`
|
|
2807
2817
|
font-size: 16px;
|
|
2808
2818
|
line-height: 24px;
|
|
2809
2819
|
font-weight: 400;
|
|
2810
|
-
color: ${we("neutral",900)};
|
|
2820
|
+
color: ${we("neutral","dark"===t?200:900)};
|
|
2811
2821
|
padding: 2px 12px;
|
|
2812
2822
|
|
|
2813
2823
|
&:hover {
|
|
2814
|
-
background-color: ${we("neutral",200)};
|
|
2824
|
+
background-color: ${"dark"===t?"default":we("neutral",200)};
|
|
2815
2825
|
}
|
|
2816
2826
|
|
|
2817
2827
|
&:focus-visible {
|
|
@@ -2828,12 +2838,12 @@ function Mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2828
2838
|
font-weight: 700;
|
|
2829
2839
|
color: ${we("accessible","controls-on-neutral-lights")};
|
|
2830
2840
|
`:""}
|
|
2831
|
-
`,
|
|
2832
|
-
height: 48px;
|
|
2841
|
+
`,jg=e=>de`
|
|
2842
|
+
height: ${e?"28px":"48px"};
|
|
2833
2843
|
display: flex;
|
|
2834
2844
|
align-items: center;
|
|
2835
2845
|
justify-content: flex-end;
|
|
2836
|
-
`,
|
|
2846
|
+
`,Ig=e=>de`
|
|
2837
2847
|
height: 100%;
|
|
2838
2848
|
font-size: 16px;
|
|
2839
2849
|
line-height: 24px;
|
|
@@ -2852,7 +2862,7 @@ function Mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2852
2862
|
}
|
|
2853
2863
|
}
|
|
2854
2864
|
`:""}
|
|
2855
|
-
`,
|
|
2865
|
+
`,Ag=e=>de`
|
|
2856
2866
|
height: 100%;
|
|
2857
2867
|
display: flex;
|
|
2858
2868
|
align-items: center;
|
|
@@ -2860,19 +2870,19 @@ function Mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2860
2870
|
gap: 20px;
|
|
2861
2871
|
padding-left: 16px;
|
|
2862
2872
|
border-left: 1px solid ${we("neutral",e?700:300)};
|
|
2863
|
-
`,
|
|
2873
|
+
`,zg=e=>de`
|
|
2864
2874
|
background-color: none;
|
|
2865
2875
|
border: none;
|
|
2866
2876
|
cursor: pointer;
|
|
2867
2877
|
padding: 0px;
|
|
2868
|
-
color: ${we("neutral",800)};
|
|
2878
|
+
color: ${we("neutral","dark"===e?100:800)};
|
|
2869
2879
|
display: flex;
|
|
2870
2880
|
justify-content: center;
|
|
2871
2881
|
align-items: center;
|
|
2872
2882
|
gap: 8px;
|
|
2873
2883
|
|
|
2874
2884
|
&:hover {
|
|
2875
|
-
background-color: ${we("neutral",200)};
|
|
2885
|
+
background-color: ${"dark"===e?"default":we("neutral",200)};
|
|
2876
2886
|
}
|
|
2877
2887
|
|
|
2878
2888
|
&:focus-visible {
|
|
@@ -2885,7 +2895,7 @@ function Mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2885
2895
|
outline-width: 2px;
|
|
2886
2896
|
background-color: ${we("neutral",200)};
|
|
2887
2897
|
}
|
|
2888
|
-
`,
|
|
2898
|
+
`,Hg=e=>de`
|
|
2889
2899
|
position: absolute;
|
|
2890
2900
|
top: 48px;
|
|
2891
2901
|
right: 0;
|
|
@@ -2898,11 +2908,11 @@ function Mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2898
2908
|
justify-content: flex-start;
|
|
2899
2909
|
gap: 16px;
|
|
2900
2910
|
transition: width 0.5s ease-in-out;
|
|
2901
|
-
`,
|
|
2911
|
+
`,Bg=de`
|
|
2902
2912
|
height: 100%;
|
|
2903
2913
|
width: 100%;
|
|
2904
|
-
`,
|
|
2905
|
-
background-color: ${we("neutral",200)};
|
|
2914
|
+
`,Fg=e=>de`
|
|
2915
|
+
background-color: ${we("neutral","dark"===e?800:200)};
|
|
2906
2916
|
border-bottom: 1px solid ${we("neutral",300)};
|
|
2907
2917
|
|
|
2908
2918
|
.ds-utility-item {
|
|
@@ -2921,13 +2931,13 @@ function Mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2921
2931
|
margin-left: -12px;
|
|
2922
2932
|
}
|
|
2923
2933
|
}
|
|
2924
|
-
`,Fg=de`
|
|
2925
|
-
background-color: ${we("neutral",100)};
|
|
2926
2934
|
`,Zg=de`
|
|
2935
|
+
background-color: ${we("neutral",100)};
|
|
2936
|
+
`,Wg=de`
|
|
2927
2937
|
min-height: 100vh;
|
|
2928
2938
|
width: 100%;
|
|
2929
2939
|
overflow-y: scroll;
|
|
2930
|
-
`;de``;const
|
|
2940
|
+
`;de``;const qg=e=>de`
|
|
2931
2941
|
display: inline-block;
|
|
2932
2942
|
width: 100%;
|
|
2933
2943
|
padding: 12px 16px;
|
|
@@ -2956,7 +2966,7 @@ function Mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2956
2966
|
outline-width: 2px;
|
|
2957
2967
|
background-color: ${we("neutral",200)};
|
|
2958
2968
|
}
|
|
2959
|
-
`,
|
|
2969
|
+
`,Gg=de`
|
|
2960
2970
|
width: 100%;
|
|
2961
2971
|
padding: 12px 16px;
|
|
2962
2972
|
display: flex;
|
|
@@ -2980,7 +2990,7 @@ function Mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2980
2990
|
outline-width: 2px;
|
|
2981
2991
|
background-color: ${we("neutral",200)};
|
|
2982
2992
|
}
|
|
2983
|
-
`,
|
|
2993
|
+
`,Ug=e=>de`
|
|
2984
2994
|
position: absolute;
|
|
2985
2995
|
top: 0px;
|
|
2986
2996
|
right: 0;
|
|
@@ -2992,7 +3002,7 @@ function Mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2992
3002
|
align-items: flex-start;
|
|
2993
3003
|
justify-content: flex-start;
|
|
2994
3004
|
transition: width 0.5s ease-in-out;
|
|
2995
|
-
`,
|
|
3005
|
+
`,Xg=de`
|
|
2996
3006
|
height: 48px;
|
|
2997
3007
|
width: 100%;
|
|
2998
3008
|
display: flex;
|
|
@@ -3003,7 +3013,7 @@ function Mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3003
3013
|
position: relative;
|
|
3004
3014
|
top: 0;
|
|
3005
3015
|
left: 0;
|
|
3006
|
-
`,
|
|
3016
|
+
`,Yg=de`
|
|
3007
3017
|
position: absolute;
|
|
3008
3018
|
bottom: 0;
|
|
3009
3019
|
left: 0;
|
|
@@ -3018,13 +3028,7 @@ function Mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3018
3028
|
button {
|
|
3019
3029
|
width: calc(48% - 24px);
|
|
3020
3030
|
}
|
|
3021
|
-
`,
|
|
3022
|
-
display: flex;
|
|
3023
|
-
align-items: center;
|
|
3024
|
-
justify-content: flex-start;
|
|
3025
|
-
gap: 12px;
|
|
3026
|
-
color: ${we("neutral",$?100:900)};
|
|
3027
|
-
`),ref:d,children:[e?G("div",{ref:p,css:Mg,children:e}):null,G("div",{css:Dg(h),children:r?.map((e=>e.link?G(w,{to:e.link,href:e.link,css:Ng(n===e.link),children:e.label},e.label):G(Pt,{label:e.label,items:e.items||[]},e.label)))})]}),G("div",{css:Vg,ref:u,children:m?q("button",{type:"button",onClick:()=>y(!b),"aria-label":"Open menu",css:Ag,children:[b?"Close":"Menu",G(b?Ne:at,{height:"16px",width:"16px"})]}):q(U,{children:[G("div",{css:Vg,children:o?.map(((e,t)=>G("div",{css:jg(h),children:e},t)))}),i?G("div",{css:Ig(h),children:i.map((e=>G(Le,{...e},e.ariaLabel)))}):null]})})]}),h&&!m?G("div",{css:Pg,children:r?.map((e=>e.link?G(w,{to:e.link,href:e.link,css:Ng(n===e.link),children:e.label},e.label):G(Pt,{label:e.label,items:e.items||[]},e.label)))}):null,m?G(Yg,{navigationSection:r,utilitySection:o,actionsSection:i,linkRouter:t,isOpen:b,setIsOpen:y,pathname:n}):null]});var $},Qg=de`
|
|
3031
|
+
`,Kg=({theme:e="light",navigationSection:t,utilitySection:n,actionsSection:r,linkRouter:o,isOpen:i,setIsOpen:a,pathname:l})=>{const[s,c]=J(void 0),[d,u]=J(-1),p=Q(null),h=Q([]),f=o;return q(U,{children:[G("div",{css:Hg(i),children:i&&q("div",{css:Bg,children:[q("div",{style:{overflowY:"scroll",width:"100%",height:"100%",paddingBottom:"72px"},children:[n?G("div",{css:Fg(e),children:n?.map((e=>G("div",{className:"ds-utility-item",children:e})))}):null,t?G("div",{css:Zg,children:t.map(((e,t)=>e.link?G(f,{to:e.link,href:e.link,onClick:()=>{c(void 0),u(-1),a(!1)},css:qg(l===e.link),children:e.label},e.label):q("button",{css:Gg,type:"button",ref:e=>h.current[t]=e,onClick:()=>{e.items&&(c(e),u(t),setTimeout((()=>{p.current?.focus()}),100))},children:[e.label,e.items?G(Me,{rotate:"270",color:"var(--chakra-colors-neutral-700)"}):null]},e.label)))}):null]}),r?G("div",{css:Yg,children:r.map((e=>G(Le,{...e,onClick:t=>{e?.onClick?.(t),c(void 0),u(-1),a(!1)}},e.ariaLabel)))}):null]})}),G("div",{css:Ug(!!s?.items),children:s?.items?q(U,{children:[q("div",{css:Xg,children:[q("button",{type:"button",onClick:()=>{c(void 0),u(-1),h.current[d]?.focus()},"aria-label":"Go back",css:zg,ref:p,children:[G(Me,{rotate:"90",color:"var(--chakra-colors-neutral-700)"}),s?.label]}),q("button",{type:"button",onClick:()=>{c(void 0),u(-1),a(!1)},"aria-label":"Close menu",css:zg,children:["Close",G(Ne,{height:"16px",width:"16px"})]})]}),G("div",{css:Wg,children:s?.items?.map((e=>G(f,{to:e.link,href:e.link,css:qg(),onClick:()=>{c(void 0),u(-1),a(!1)},children:e.label},e.label)))})]}):null})]})},Jg=1023,Qg=({variant:e="default",theme:t="light",logo:n,linkRouter:r,pathname:o,navigationSection:i,utilitySection:a,actionsSection:l,maxWidth:s,fixed:c,onNavbarHeightChange:d,backgroundColor:u})=>{const p=Q(null),h=Q(null),f=Q(null),[g,v]=J(!1),[m,x]=J(-1),[b,y]=J("undefined"!=typeof window&&window?.innerWidth<=Jg),[w,C]=J(!1),$=r,k=ie((()=>{if(h.current&&p.current&&f.current){const e=p.current.getBoundingClientRect(),t=h.current.getBoundingClientRect(),n=f.current.getBoundingClientRect();t.width,e.width,window.innerWidth<=Jg||window.innerWidth<=m?(d?.(96),v(!0)):window.innerWidth>Jg&&window.innerWidth<=1440?e.right>=t.left?(d?.(96),v(!0),x(window.innerWidth)):window.innerWidth>m&&(d?.(48),v(!1),x(-1)):(d?.(48),v(!1),x(-1)),g&&(window.innerWidth<=Jg||n.right>=t.left?(y(!0),d?.(48)):(y(!1),d?.(96)))}}),[m,g]);ee((()=>(k(),window.addEventListener("resize",k),()=>{window.removeEventListener("resize",k)})),[k]);const S="condensed"===e;return q("nav",{css:Tg(g&&!b,c,u,t,S),children:[q("div",{css:_g(g&&!b,s,S),children:[q("div",{css:Mg(g&&!b||"dark"===t,S),ref:p,children:[n?G("div",{ref:f,css:Dg,children:n}):null,G("div",{css:Ng(g),children:i?.map((e=>e.link?G($,{to:e.link,href:e.link,css:Vg(o===e.link,t),children:e.label},e.label):G(Pt,{theme:t,label:e.label,items:e.items||[]},e.label)))})]}),G("div",{css:jg(S),ref:h,children:b?q("button",{type:"button",onClick:()=>C(!w),"aria-label":"Open menu",css:zg(t),children:[w?"Close":"Menu",G(w?Ne:at,{height:"16px",width:"16px"})]}):q(U,{children:[G("div",{css:jg(S),children:a?.map(((e,t)=>G("div",{css:Ig(g),children:e},t)))}),l?.length?G("div",{css:Ag(g),children:l.map((e=>G(Le,{...e},e.ariaLabel)))}):null]})})]}),g&&!b?G("div",{css:Pg(t,S),children:i?.map((e=>e.link?G($,{to:e.link,href:e.link,css:Vg(o===e.link,t),children:e.label},e.label):G(Pt,{theme:t,label:e.label,items:e.items||[]},e.label)))}):null,b?G(Kg,{theme:t,navigationSection:i,utilitySection:a,actionsSection:l,linkRouter:r,isOpen:w,setIsOpen:C,pathname:o}):null]})},ev=de`
|
|
3028
3032
|
width: 64px;
|
|
3029
3033
|
height: 100%;
|
|
3030
3034
|
z-index: 100;
|
|
@@ -3033,7 +3037,7 @@ function Mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3033
3037
|
display: flex;
|
|
3034
3038
|
flex-direction: column;
|
|
3035
3039
|
justify-content: space-between;
|
|
3036
|
-
`,
|
|
3040
|
+
`,tv=de`
|
|
3037
3041
|
width: 64px;
|
|
3038
3042
|
height: 64px;
|
|
3039
3043
|
background-color: ${we("neutral",200)};
|
|
@@ -3123,7 +3127,7 @@ function Mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3123
3127
|
}
|
|
3124
3128
|
}
|
|
3125
3129
|
}
|
|
3126
|
-
`,
|
|
3130
|
+
`,nv=de`
|
|
3127
3131
|
display: flex;
|
|
3128
3132
|
justify-content: center;
|
|
3129
3133
|
align-items: center;
|
|
@@ -3136,7 +3140,7 @@ function Mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3136
3140
|
fill: ${we("neutral",600)};
|
|
3137
3141
|
}
|
|
3138
3142
|
}
|
|
3139
|
-
`,
|
|
3143
|
+
`,rv=de`
|
|
3140
3144
|
width: 64px;
|
|
3141
3145
|
height: 64px;
|
|
3142
3146
|
background-color: ${we("neutral",200)};
|
|
@@ -3174,7 +3178,7 @@ function Mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3174
3178
|
text-align: center;
|
|
3175
3179
|
color: ${we("neutral",600)};
|
|
3176
3180
|
}
|
|
3177
|
-
`,
|
|
3181
|
+
`,ov=de`
|
|
3178
3182
|
width: 320px;
|
|
3179
3183
|
height: 100%;
|
|
3180
3184
|
z-index: 100;
|
|
@@ -3183,7 +3187,7 @@ function Mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3183
3187
|
overflow-y: auto;
|
|
3184
3188
|
overflow-x: hidden;
|
|
3185
3189
|
border-right: 1px solid ${we("neutral",300)};
|
|
3186
|
-
`,
|
|
3190
|
+
`,iv=({tabs:e=[],defaultValue:t,onTabClick:n,children:o,onOpenChange:i})=>{const[a,l]=J(!1),[s,c]=J(t||e?.[0]?.value),d=e=>{c(e),n&&n(e)},[u]=j(["(max-width: 768px)"]);return u?q(N.Root,{defaultValue:s,onValueChange:({value:e})=>d(e),children:[G(N.List,{style:{display:"flex",overflowX:"auto",whiteSpace:"nowrap",padding:"8px",gap:"8px"},children:e.map((e=>G(N.Trigger,{value:e.value,css:{"--indicator-color":we("primary",500),flexShrink:0,padding:"10px 16px",color:we("neutral",600),"&[data-selected]":{color:we("neutral",800),fontWeight:600}},children:e.label},e.value)))}),e.map((e=>G(N.Content,{value:e.value,children:o},e.value)))]}):q("div",{style:{height:"calc(100vh - 48px - 56px)",position:"fixed",top:"48px",left:0,display:"flex"},children:[q("div",{css:ev,children:[G(N.Root,{defaultValue:t||e?.[0]?.value,orientation:"horizontal",width:"full",onValueChange:({value:e})=>{d(e)},role:"tablist",children:G(N.List,{alignItems:"center",border:"none",style:{flexDirection:"column"},children:e.map((e=>G(N.Trigger,{css:tv,"aria-label":e["aria-label"]||e.label,...e,children:q(r,{display:"flex",alignItems:"center",flexDirection:"column",gap:"5px",className:"ds-tab-label",children:[e.icon?G("div",{css:nv,children:e.icon}):null,G("p",{children:e.label})]})},e.label)))})}),o?G(I.Root,{onOpenChange:({open:e})=>{l(e),i&&i(!e)},children:q(I.Trigger,{css:rv,children:[G("div",{css:nv,children:G(a?Re:Oe,{})}),q("div",{className:"ds-tab-label",children:[G("p",{children:a?"Show":"Hide"}),G("p",{children:"Sidebar"})]})]})}):null]}),o?G(I.Root,{defaultOpen:!0,open:!a,children:G(I.Content,{height:"100%",children:G("div",{css:ov,role:"tabpanel","aria-labelledby":s,children:o})})}):null]})},av=e=>de`
|
|
3187
3191
|
width: 100%;
|
|
3188
3192
|
display: flex;
|
|
3189
3193
|
align-items: center;
|
|
@@ -3192,7 +3196,7 @@ function Mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3192
3196
|
${"view"===e&&`\n border: 1px solid ${we("neutral",400)};\n background-color: ${we("neutral",200)};\n border-radius: 4px;\n padding: 4px;\n `}
|
|
3193
3197
|
|
|
3194
3198
|
${"transparent"===e&&"\n border: none;\n background-color: transparent;\n border-radius: 4px;\n padding: 0px 16px;\n\n .chakra-tabs__list {\n gap: 32px;\n }\n "}
|
|
3195
|
-
`,
|
|
3199
|
+
`,lv=de`
|
|
3196
3200
|
width: 99%;
|
|
3197
3201
|
height: 40px;
|
|
3198
3202
|
padding: 8px 16px;
|
|
@@ -3208,7 +3212,7 @@ function Mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3208
3212
|
&:focus-visible {
|
|
3209
3213
|
box-shadow: none;
|
|
3210
3214
|
}
|
|
3211
|
-
`,
|
|
3215
|
+
`,sv=de`
|
|
3212
3216
|
background-color: ${we("neutral",200)};
|
|
3213
3217
|
color: ${we("neutral",700)};
|
|
3214
3218
|
|
|
@@ -3265,11 +3269,11 @@ function Mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3265
3269
|
opacity: 1;
|
|
3266
3270
|
}
|
|
3267
3271
|
}
|
|
3268
|
-
`,
|
|
3272
|
+
`,cv=de`
|
|
3269
3273
|
width: 4px;
|
|
3270
3274
|
height: 24px;
|
|
3271
3275
|
background-color: ${we("neutral",400)};
|
|
3272
|
-
`,
|
|
3276
|
+
`,dv=de`
|
|
3273
3277
|
height: 32px;
|
|
3274
3278
|
border-radius: 2px;
|
|
3275
3279
|
background-color: ${we("neutral",200)};
|
|
@@ -3342,7 +3346,7 @@ function Mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3342
3346
|
opacity: 1;
|
|
3343
3347
|
}
|
|
3344
3348
|
}
|
|
3345
|
-
`,
|
|
3349
|
+
`,uv=de`
|
|
3346
3350
|
background-color: transparent;
|
|
3347
3351
|
color: ${we("neutral",600)};
|
|
3348
3352
|
width: auto;
|
|
@@ -3413,7 +3417,7 @@ function Mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3413
3417
|
}
|
|
3414
3418
|
}
|
|
3415
3419
|
}
|
|
3416
|
-
`,
|
|
3420
|
+
`,pv=(e,t)=>Math.max(0,e.findIndex((e=>e.value===t))),hv=e=>1===e?"none":2===e?"left":"right",fv=({variant:e="panel",defaultValue:t,tabs:n,onTabClick:o,activationMode:i="manual"})=>{const[a,l]=J(pv(n,t)||0);return G("div",{css:av(e),children:G(N.Root,{width:"full",defaultValue:t||n?.[0]?.value,onValueChange:({value:e})=>{return l(pv(n,t=e)),void(o&&o(t));var t},activationMode:i,children:G(N.List,{alignItems:"center",border:"none",children:n.map(((t,n)=>q(ce,{children:["view"===e&&1===n&&"left"===hv(a)?G("div",{css:cv}):null,G(N.Trigger,{css:[lv,"view"===e&&dv,"panel"===e&&sv,"transparent"===e&&uv],"aria-label":t["aria-label"]||t.label,...t,children:q(r,{display:"flex",alignItems:"center",gap:"5px",children:[t.icon,t.label]})},t.label),"view"===e&&1===n&&"right"===hv(a)?G("div",{css:cv}):null]},t.label)))})})})},gv=({text:e,query:t})=>{if(!t)return e;const n=new RegExp(`(${t})`,"ig"),r=e.split(n);return ue(he,{children:r.map((e=>n.test(e)?ue("strong",{children:e},e):ue("span",{children:e},e)))})},vv=({items:e,query:t,onSelect:n,highlightedIndex:o})=>{const i=Q(null);return ee((()=>{if(!i.current)return;const e=i.current.children[o];e&&e.scrollIntoView({block:"nearest"})}),[o]),ue(r,{padding:"8px",children:e.map(((e,a)=>ue(r,{ref:i,padding:"6px 8px",borderRadius:"md",cursor:"pointer",bg:a===o?"gray.100":void 0,_hover:{background:"gray.50"},onClick:()=>n(e.id||e.label),children:ue(gv,{text:e.label,query:t})},e.id)))})},mv=({placeholder:e,disabled:t,size:n="default",options:i=[],resultsMaxHeight:a="200px",isLoading:s=!1,displayResults:c="text",onSelect:d,onQueryChange:u,onClear:p,renderResults:h})=>{const[f,g]=J(""),{open:v,onOpen:m,onClose:x}=A(),[b,y]=J(i),[w,C]=J(-1),$=Q(null),k=`search-results-${te()}`,S=e=>{const t=i.find((t=>t.id===e||t.label===e));t&&(d?.(t),g(""),x())};ee((()=>{if(u?.(f),!f)return void y(i);const e=i.filter((e=>e.id?.toLowerCase().includes(f.toLowerCase())||e.label.toLowerCase().includes(f.toLowerCase())||e.caption?.toLowerCase().includes(f.toLowerCase()))).map((e=>({id:e.id,label:e.label,caption:e.caption,variant:"select",icon:e.icon,onItemClick:()=>S(e.id||e.label)})));y(e),m()}),[f]),ee((()=>{function e(e){v&&$.current&&!$.current.contains(e.target)&&x()}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[v]);const E=f.length?G(gt,{style:{marginTop:"-12px"},onClick:()=>{g(""),p?.()}}):null,L="none"!==c&&!!f.length&&b.length>0&&v;return q("div",{ref:$,style:{position:"relative",width:"100%"},children:[G(z,{startElement:G(dt,{fill:t?we("neutral",500):we("primary",700),style:{marginTop:"-12px"}}),endElement:E,children:G(In,{autoComplete:"off",placeholder:e||"Filter",onChange:e=>{const{value:t}=e.target;g(t)},value:f,label:"",style:{paddingLeft:"40px"},type:"search","aria-label":e||"Search filter","aria-expanded":L,"aria-controls":k,role:"combobox","aria-autocomplete":"list",disabled:t,size:n,onKeyDown:e=>{if(L){if("ArrowDown"===e.key&&(e.preventDefault(),C((e=>Math.min(e+1,b.length-1)))),"ArrowUp"===e.key&&(e.preventDefault(),C((e=>Math.max(e-1,0)))),"Enter"===e.key&&(e.preventDefault(),w>=0)){const e=b[w];S(e.id||e.label)}"Escape"===e.key&&x()}}})}),(L||s&&!!f.length)&&"custom"===c&&h&&!s&&h({items:b,highlightedIndex:w,query:f,onSelect:S}),(L||s&&!!f.length)&&G(l,{container:$,children:q(r,{position:"absolute",marginTop:"-20px",width:"100%",backgroundColor:"white",border:"1px solid",borderColor:"gray.200",borderRadius:"md",boxShadow:"md",zIndex:1e3,overflowY:"auto",maxHeight:a,children:[s&&G(r,{padding:"1rem",children:G(o,{})}),"text"===c&&!s&&G(vv,{highlightedIndex:w,items:b,query:f,onSelect:S}),"list"===c&&!s&&G(bl,{items:b,highlightedIndex:w})]})})]})},xv={small:"16px",medium:"24px",large:"40px",default:"16px"};function bv(e,t,n,r){const o=function(e,t){return"string"==typeof t&&""!==t.trim()?t:e&&xv[e]?xv[e]:xv.default}(e,t),i=n?we("neutral",200):we("primary",300),a=r??i,l=r&&n?"opacity: 0.7;":"",s=we("neutral",n?400:800);return de`
|
|
3417
3421
|
height: ${o};
|
|
3418
3422
|
width: ${o};
|
|
3419
3423
|
border-radius: 50%;
|
|
@@ -3447,17 +3451,17 @@ function Mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3447
3451
|
background-color: ${we("primary",500)};
|
|
3448
3452
|
}
|
|
3449
3453
|
}
|
|
3450
|
-
`}const
|
|
3454
|
+
`}const yv=e=>de`
|
|
3451
3455
|
width: ${e||"16px"};
|
|
3452
3456
|
position: absolute;
|
|
3453
3457
|
top: -8px;
|
|
3454
3458
|
left: 15px;
|
|
3455
|
-
`,
|
|
3459
|
+
`,wv=de`
|
|
3456
3460
|
font-size: 12px;
|
|
3457
3461
|
line-height: 16px;
|
|
3458
3462
|
font-weight: 700;
|
|
3459
3463
|
color: ${we("primary",800)};
|
|
3460
|
-
`,
|
|
3464
|
+
`,Cv=K((({name:e,ariaLabel:t,size:n="medium",customSize:r="",src:o,srcSet:i,onClick:a,notificationCount:l,disabled:s=!0,customBackgroundColor:c=""},d)=>{const u=()=>{s||a?.()},p=(()=>{let e="";return l&&l>0&&(e=`${l>99?"99+":l}`),e})();let h="16px";l&&l>99?h="28px":l&&l>9&&(h="22px");const f=!!o||!!i,g=a&&!s;return q(H.Root,{"aria-label":t||e,ref:d,css:bv(n,r,s,c),onClick:u,onKeyDown:e=>{s||"Enter"!==e.key||u()},role:g?"button":void 0,tabIndex:g?0:void 0,"aria-disabled":s,children:[f&&G(H.Image,{src:o,srcSet:i}),!f&&e&&G(H.Fallback,{name:e,css:wv}),!f&&!e&&G(lt,{size:"100%",style:{padding:"15%",color:s?we("neutral",400):void 0}}),p.length>0?G("div",{css:yv(h),children:G("div",{css:de`
|
|
3461
3465
|
height: 16px;
|
|
3462
3466
|
width: auto;
|
|
3463
3467
|
background-color: ${we("error",500)};
|
|
@@ -3469,16 +3473,16 @@ function Mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3469
3473
|
font-size: 12px;
|
|
3470
3474
|
font-weight: 700;
|
|
3471
3475
|
color: ${we("error",100)};
|
|
3472
|
-
`,children:G("p",{"aria-label":`${l} unread message`,children:p})})}):null]})}))
|
|
3476
|
+
`,children:G("p",{"aria-label":`${l} unread message`,children:p})})}):null]})})),$v=de`
|
|
3473
3477
|
display: flex;
|
|
3474
3478
|
justify-content: flex-start;
|
|
3475
3479
|
align-items: center;
|
|
3476
3480
|
gap: 8px;
|
|
3477
|
-
|
|
3481
|
+
`,kv=e=>de`
|
|
3478
3482
|
width: ${e||"16px"};
|
|
3479
3483
|
position: relative;
|
|
3480
3484
|
display: flex;
|
|
3481
|
-
`,
|
|
3485
|
+
`,Sv=de`
|
|
3482
3486
|
height: 4px;
|
|
3483
3487
|
width: 4px;
|
|
3484
3488
|
background-color: ${we("error",500)};
|
|
@@ -3486,7 +3490,7 @@ function Mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3486
3490
|
position: absolute;
|
|
3487
3491
|
top: 0px;
|
|
3488
3492
|
right: 0px;
|
|
3489
|
-
`,
|
|
3493
|
+
`,Ev=de`
|
|
3490
3494
|
height: 10px;
|
|
3491
3495
|
background-color: ${we("error",500)};
|
|
3492
3496
|
padding: 0 3px 1px 3px;
|
|
@@ -3497,11 +3501,11 @@ function Mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3497
3501
|
position: absolute;
|
|
3498
3502
|
top: -2px;
|
|
3499
3503
|
left: 9px;
|
|
3500
|
-
`,
|
|
3504
|
+
`,Lv=de`
|
|
3501
3505
|
font-size: 9px;
|
|
3502
3506
|
font-weight: 700;
|
|
3503
3507
|
color: ${we("error",100)};
|
|
3504
|
-
`,
|
|
3508
|
+
`,Ov=de`
|
|
3505
3509
|
height: 16px;
|
|
3506
3510
|
min-width: 16px;
|
|
3507
3511
|
background-color: ${we("error",500)};
|
|
@@ -3510,11 +3514,11 @@ function Mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3510
3514
|
justify-content: center;
|
|
3511
3515
|
align-items: center;
|
|
3512
3516
|
padding: 0px 4px 1px 4px;
|
|
3513
|
-
`,
|
|
3517
|
+
`,Rv=de`
|
|
3514
3518
|
font-size: 16px;
|
|
3515
3519
|
font-weight: 700;
|
|
3516
3520
|
color: ${we("error",100)};
|
|
3517
|
-
`,
|
|
3521
|
+
`,Tv=({hasNotification:e,notificationCount:t,label:n})=>{const[r,o]=J(!1);ee((()=>{const e=()=>{window.innerWidth<1024?o(!0):o(!1)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const i=(()=>{let e="";return t&&t>0&&(e=`${t>99?"99+":t}`),e})();let a="16px";return t&&t>99?a="28px":t&&t>9&&(a="22px"),q("div",r?{css:$v,role:"status","aria-live":"polite",children:[q("div",{css:kv(),children:[G(Ze,{color:"currentColor",height:"16px",width:"16px"}),!e||t||n?null:G("div",{css:Sv,"aria-hidden":!0})]}),n?G("p",{children:n}):null,i.length>0?G("div",{css:Ov,children:G("p",{css:Rv,"aria-label":`${t} unread message`,children:i})}):null]}:{css:$v,role:"status","aria-live":"polite",children:[n?G("p",{children:n}):null,q("div",{css:kv(a),children:[i.length>0?G("div",{css:Ev,children:G("p",{css:Lv,"aria-label":`${t} unread message`,children:i})}):null,e&&!t?G("div",{css:Sv,"aria-hidden":!0}):null,G(Ze,{color:"currentColor",height:"16px",width:"16px"})]})]})},Pv=(e,t)=>de`
|
|
3518
3522
|
width: 100%;
|
|
3519
3523
|
max-width: ${"small"===e?"234px":"320px"};
|
|
3520
3524
|
border-radius: 4px;
|
|
@@ -3529,7 +3533,7 @@ function Mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3529
3533
|
button {
|
|
3530
3534
|
margin-left: ${t?0:"24px"};
|
|
3531
3535
|
}
|
|
3532
|
-
`,
|
|
3536
|
+
`,_v=de`
|
|
3533
3537
|
display: flex;
|
|
3534
3538
|
align-items: flex-start;
|
|
3535
3539
|
gap: 8px;
|
|
@@ -3537,28 +3541,28 @@ function Mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3537
3541
|
svg {
|
|
3538
3542
|
margin-top: 6px;
|
|
3539
3543
|
}
|
|
3540
|
-
`,
|
|
3544
|
+
`,Mv=e=>de`
|
|
3541
3545
|
color: ${we("neutral",800)};
|
|
3542
3546
|
font-size: ${"small"===e?"14px":"18px"};
|
|
3543
3547
|
line-height: ${"small"===e?"20px":"28px"};
|
|
3544
3548
|
font-weight: 400;
|
|
3545
3549
|
text-align: left;
|
|
3546
|
-
`,
|
|
3550
|
+
`,Dv=e=>de`
|
|
3547
3551
|
color: ${we("neutral",700)};
|
|
3548
3552
|
font-size: ${"small"===e?"12px":"16px"};
|
|
3549
3553
|
line-height: ${"small"===e?"16px":"24px"};
|
|
3550
3554
|
font-weight: 400;
|
|
3551
3555
|
margin-left: 24px;
|
|
3552
3556
|
text-align: left;
|
|
3553
|
-
`,
|
|
3557
|
+
`,Nv=de`
|
|
3554
3558
|
background-color: ${we("neutral",100)};
|
|
3555
3559
|
border: 1px solid ${we("neutral",300)};
|
|
3556
3560
|
color: ${we("neutral",700)};
|
|
3557
|
-
`,
|
|
3561
|
+
`,Vv=de`
|
|
3558
3562
|
background-color: ${we("neutral",200)};
|
|
3559
3563
|
border: 1px solid ${we("neutral",300)};
|
|
3560
3564
|
color: ${we("neutral",700)};
|
|
3561
|
-
`,
|
|
3565
|
+
`,jv=de`
|
|
3562
3566
|
background-color: ${we("success",100)};
|
|
3563
3567
|
border: 1px solid ${we("success",300)};
|
|
3564
3568
|
color: ${we("success",500)};
|
|
@@ -3566,7 +3570,7 @@ function Mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3566
3570
|
p {
|
|
3567
3571
|
color: ${we("success",900)};
|
|
3568
3572
|
}
|
|
3569
|
-
`,
|
|
3573
|
+
`,Iv=de`
|
|
3570
3574
|
background-color: ${we("warning",100)};
|
|
3571
3575
|
border: 1px solid ${we("warning",300)};
|
|
3572
3576
|
color: ${we("warning",500)};
|
|
@@ -3574,7 +3578,7 @@ function Mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3574
3578
|
p {
|
|
3575
3579
|
color: ${we("warning",900)};
|
|
3576
3580
|
}
|
|
3577
|
-
`,
|
|
3581
|
+
`,Av=de`
|
|
3578
3582
|
background-color: ${we("error",100)};
|
|
3579
3583
|
border: 1px solid ${we("error",300)};
|
|
3580
3584
|
color: ${we("error",500)};
|
|
@@ -3582,32 +3586,32 @@ function Mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3582
3586
|
p {
|
|
3583
3587
|
color: ${we("error",900)};
|
|
3584
3588
|
}
|
|
3585
|
-
`,
|
|
3589
|
+
`,zv=({label:e,caption:t,variant:n,size:r="large",icon:o=G(_e,{height:"16px",width:"16px"}),onActionClick:i,actionLabel:a,isButtonRight:l})=>{let s=Nv;return"info-grey"===n?s=Vv:"success"===n?s=jv:"warning"===n?s=Iv:"error"===n&&(s=Av),q("div",{css:[Pv(r,l),s],"aria-roledescription":"Note",children:[q("div",{children:[q("div",{css:_v,children:[o,G("p",{css:Mv(r),children:e})]}),G("p",{css:Dv(r),children:t})]}),a?G(Le,{label:a,variant:"info-white"===n||"info-grey"===n?"primary":"secondary",size:"large"===r?"default":"small",onClick:i}):null]})},Hv=de`
|
|
3586
3590
|
height: 8px;
|
|
3587
3591
|
width: 100%;
|
|
3588
3592
|
background-color: ${we("neutral",300)};
|
|
3589
3593
|
display: flex;
|
|
3590
3594
|
align-items: center;
|
|
3591
3595
|
justify-content: flex-start;
|
|
3592
|
-
`,
|
|
3596
|
+
`,Bv=e=>de`
|
|
3593
3597
|
height: 100%;
|
|
3594
3598
|
width: ${e}%;
|
|
3595
3599
|
background-color: ${we("primary",500)};
|
|
3596
3600
|
transition: width 0.5s ease-in-out;
|
|
3597
|
-
`,
|
|
3601
|
+
`,Fv=({progress:e})=>{let t=e;return t>100&&(t=100),t<0&&(t=0),G("div",{css:Hv,role:"progressbar","aria-label":`Progress: ${t}%`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":t,children:G("div",{css:Bv(t)})})},Zv=de`
|
|
3598
3602
|
width: 100%;
|
|
3599
3603
|
display: flex;
|
|
3600
3604
|
align-items: center;
|
|
3601
3605
|
justify-content: space-between;
|
|
3602
3606
|
position: relative;
|
|
3603
|
-
`,
|
|
3607
|
+
`,Wv=de`
|
|
3604
3608
|
height: 60px;
|
|
3605
3609
|
width: 80px;
|
|
3606
3610
|
display: flex;
|
|
3607
3611
|
flex-direction: column;
|
|
3608
3612
|
align-items: center;
|
|
3609
3613
|
justify-content: space-between;
|
|
3610
|
-
`,
|
|
3614
|
+
`,qv=(e,t)=>de`
|
|
3611
3615
|
height: 32px;
|
|
3612
3616
|
width: 32px;
|
|
3613
3617
|
display: flex;
|
|
@@ -3643,12 +3647,12 @@ function Mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3643
3647
|
}
|
|
3644
3648
|
|
|
3645
3649
|
${t?`\n background-color: ${we("neutral",300)};\n \n &:hover {\n background-color: ${we("neutral",300)};\n box-shadow: none;\n }\n `:""}
|
|
3646
|
-
`,
|
|
3650
|
+
`,Gv=e=>de`
|
|
3647
3651
|
color: ${we("neutral",e?800:600)};
|
|
3648
3652
|
font-size: 14px;
|
|
3649
3653
|
line-height: 20px;
|
|
3650
3654
|
font-weight: 400;
|
|
3651
|
-
`,
|
|
3655
|
+
`,Uv=de`
|
|
3652
3656
|
height: 1px;
|
|
3653
3657
|
width: 100%;
|
|
3654
3658
|
padding: 0 30px;
|
|
@@ -3656,11 +3660,11 @@ function Mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3656
3660
|
top: 16px;
|
|
3657
3661
|
left: 0;
|
|
3658
3662
|
z-index: -1;
|
|
3659
|
-
`,
|
|
3663
|
+
`,Xv=de`
|
|
3660
3664
|
height: 1px;
|
|
3661
3665
|
width: 100%;
|
|
3662
3666
|
background-color: ${we("neutral",400)};
|
|
3663
|
-
`,
|
|
3667
|
+
`,Yv=({steps:e,currentStep:t})=>q("div",{css:Zv,children:[e.map(((e,n)=>q("div",{css:Wv,children:[G("button",{css:qv(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":`Current Step ${n}${e.label?` ${e.label}`:""}`,"data-active":t>=n+1,children:t>n+1?G(Te,{height:"16px",width:"16px"}):n+1}),e.label?G("p",{css:Gv(t===n+1),children:e.label}):null]},`${e.label}-${n}`))),G("div",{css:Uv,children:G("div",{css:Xv})})]}),Kv=de`
|
|
3664
3668
|
justify-content: space-between;
|
|
3665
3669
|
align-items: center;
|
|
3666
3670
|
gap: 8px;
|
|
@@ -3703,18 +3707,18 @@ function Mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3703
3707
|
color: ${we("error",900)};
|
|
3704
3708
|
}
|
|
3705
3709
|
}
|
|
3706
|
-
`,
|
|
3710
|
+
`,Jv=de`
|
|
3707
3711
|
font-size: 18px;
|
|
3708
3712
|
line-height: 28px;
|
|
3709
3713
|
font-weight: 400;
|
|
3710
3714
|
color: ${we("neutral",800)};
|
|
3711
|
-
`,
|
|
3715
|
+
`,Qv=de`
|
|
3712
3716
|
font-size: 16px;
|
|
3713
3717
|
line-height: 24px;
|
|
3714
3718
|
font-weight: 400;
|
|
3715
3719
|
color: ${we("neutral",700)};
|
|
3716
|
-
`,Qv=de`
|
|
3717
|
-
padding: 6px;
|
|
3718
3720
|
`,em=de`
|
|
3719
3721
|
padding: 6px;
|
|
3720
|
-
`,tm=
|
|
3722
|
+
`,tm=de`
|
|
3723
|
+
padding: 6px;
|
|
3724
|
+
`,nm={pauseOnPageIdle:!0,offsets:"24px"},rm={"top-start":B({placement:"top-start",...nm}),"top-end":B({placement:"top-end",...nm}),"bottom-start":B({placement:"bottom-start",...nm}),"bottom-end":B({placement:"bottom-end",...nm})},om=e=>{rm[e.placement].create({title:e.label,description:e.caption,duration:e.duration||5e3,meta:{closable:e.closable,icon:e.icon,closableLabel:e.closableLabel},...e})},im=()=>Object.keys(rm).map((e=>G(l,{children:G(F,{toaster:rm[e],insetInline:{mdDown:"4"},children:t=>q(Z.Root,{css:Kv,width:{md:"sm"},children:[q(W,{flexDirection:"row",className:"ds-toast-icon-container",children:["info"===t.type?t.meta?.icon?t.meta.icon:G(_e,{color:"var(--chakra-colors-neutral-700)"}):null,"loading"===t.type?G(o,{size:"lg",borderWidth:"3px",color:"var(--chakra-colors-primary-500)"}):null,"success"===t.type?t.meta?.icon?t.meta.icon:G(ze,{color:"var(--chakra-colors-success-500)"}):null,"warning"===t.type?t.meta?.icon?t.meta.icon:G(He,{color:"var(--chakra-colors-warning-500)"}):null,"error"===t.type?t.meta?.icon?t.meta.icon:G(Be,{color:"var(--chakra-colors-error-500)"}):null,q(W,{gap:"1",flex:"1",maxWidth:"100%",children:[G(Z.Title,{css:Jv,"aria-label":`${t.title}`,children:t.title}),t.description?G(Z.Title,{css:Qv,"aria-label":`${t.description}`,children:t.description}):null]})]}),t.action||t.meta?.closable?q(W,{flexDirection:"row",children:[t.action?G(Le,{css:em,label:t.action.label,size:"small",variant:"info"===t.type?"primary":"secondary",onClick:()=>{t?.action?.onClick&&t.action.onClick(),rm[e].dismiss()}}):null,t.meta?.closable?G(Le,{css:tm,label:t.meta.closableLabel,"aria-label":t.meta?.closableLabel||"Dismiss",leftIcon:G(Ne,{height:"10px!",width:"10px!"}),size:"small",variant:"secondary",onClick:()=>rm[e].dismiss()}):null]}):null]})})},e)));export{Zl as AnalysisWidget,Cv as Avatar,Tv as Badge,Ur as BaseMap,xg as Breadcrumb,Le as Button,At as Checkbox,Sn as CheckboxList,qt as CheckboxOptionCard,gt as CloseButton,Kr as ClusterPoint,Al as ExtendableCard,$g as Footer,ft as IconButton,zv as InlineMessage,ur as InputWithUnits,dl as ItemCount,Ea as LayerGroup,La as LayerGroupContainer,Sa as LayerItem,_a as LayerParameters,Za as LegendItem,bl as List,$t as MapControlsToolbar,Yr as MapMarker,Qr as MapMarkers,ga as MapPopUp,Pt as Menu,Rg as MobileTabBar,Gs as Modal,jt as MultiActionButton,Qg as Navbar,iv as NavigationRail,Qt as OptionCard,kl as Pagination,ec as Panel,br as Password,Fv as ProgressBar,Qa as QualitativeAttribute,rn as Radio,on as RadioGroup,Lr as RadioList,ut as SSOButtons,al as ScaleBar,mv as Search,dr as Select,fg as Sheet,Jr as SimpleMapPin,fn as Slider,Pr as SliderInput,Yv as StepProgressIndicator,vn as Switch,fv as TabBar,Dl as Table,Vl as TableCell,Nl as TableRow,lr as Tag,In as TextInput,Ar as Textarea,im as Toast,Ct as Toolbar,yt as Tooltip,ye as designSystemStyles,be as designSystemStylesForTailwind,we as getThemedColor,om as showToast};
|