@react-magma/charts 11.0.0-next.0 → 11.0.0-next.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/charts +13 -13
- package/dist/charts.js +1 -1
- package/dist/charts.js.map +1 -1
- package/dist/charts.map +1 -1
- package/dist/charts.modern.module.js +1 -1
- package/dist/charts.modern.module.js.map +1 -1
- package/dist/charts.umd.js +1 -1
- package/dist/charts.umd.js.map +1 -1
- package/dist/components/CarbonChart/CarbonChart.d.ts +10 -1
- package/dist/components/CarbonChart/CarbonChartArea.stories.d.ts +3 -0
- package/dist/components/CarbonChart/CarbonChartAreaStacked.stories.d.ts +1 -0
- package/dist/components/CarbonChart/CarbonChartBarGrouped.stories.d.ts +1 -0
- package/dist/components/CarbonChart/CarbonChartBarStacked.stories.d.ts +1 -0
- package/dist/components/CarbonChart/CarbonChartBoxplot.stories.d.ts +4 -0
- package/dist/components/CarbonChart/CarbonChartBubble.stories.d.ts +4 -0
- package/dist/components/CarbonChart/CarbonChartBullet.stories.d.ts +4 -0
- package/dist/components/CarbonChart/CarbonChartCombo.stories.d.ts +4 -0
- package/dist/components/CarbonChart/CarbonChartGauge.stories.d.ts +4 -0
- package/dist/components/CarbonChart/CarbonChartHistogram.stories.d.ts +4 -0
- package/dist/components/CarbonChart/CarbonChartLine.stories.d.ts +11 -0
- package/dist/components/CarbonChart/CarbonChartMeter.stories.d.ts +4 -0
- package/dist/components/CarbonChart/CarbonChartRadar.stories.d.ts +4 -0
- package/dist/components/CarbonChart/CarbonChartScatter.stories.d.ts +4 -0
- package/dist/components/CarbonChart/CarbonChartSparkline.stories.d.ts +4 -0
- package/dist/components/CarbonChart/CarbonChartStep.stories.d.ts +4 -0
- package/package.json +1 -1
- package/src/components/CarbonChart/CarbonChart.tsx +28 -1
- package/src/components/CarbonChart/CarbonChartArea.stories.tsx +272 -0
- package/src/components/CarbonChart/CarbonChartAreaStacked.stories.tsx +152 -0
- package/src/components/CarbonChart/CarbonChartBarGrouped.stories.tsx +124 -0
- package/src/components/CarbonChart/CarbonChartBarStacked.stories.tsx +125 -0
- package/src/components/CarbonChart/CarbonChartBoxplot.stories.tsx +274 -0
- package/src/components/CarbonChart/CarbonChartBubble.stories.tsx +606 -0
- package/src/components/CarbonChart/CarbonChartBullet.stories.tsx +89 -0
- package/src/components/CarbonChart/CarbonChartCombo.stories.tsx +1418 -0
- package/src/components/CarbonChart/CarbonChartGauge.stories.tsx +80 -0
- package/src/components/CarbonChart/CarbonChartHistogram.stories.tsx +767 -0
- package/src/components/CarbonChart/CarbonChartLine.stories.tsx +1050 -0
- package/src/components/CarbonChart/CarbonChartMeter.stories.tsx +216 -0
- package/src/components/CarbonChart/CarbonChartRadar.stories.tsx +479 -0
- package/src/components/CarbonChart/CarbonChartScatter.stories.tsx +467 -0
- package/src/components/CarbonChart/CarbonChartSparkline.stories.tsx +222 -0
- package/src/components/CarbonChart/CarbonChartStep.stories.tsx +173 -0
package/dist/charts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import*as e from"react";import{css as t}from"@emotion/react";import{KeyboardIcon as n}from"react-magma-icons";import{Point as r,LineSegment as o,VictoryChart as a,VictoryVoronoiContainer as i,VictoryTooltip as s,VictoryAxis as l,VictoryLine as c,VictoryScatter as d}from"victory";import{StyledTooltip as p,ThemeContext as u,TooltipPosition as f,TooltipArrow as h,useForceUpdate as m,Checkbox as
|
|
1
|
+
import*as e from"react";import{css as t}from"@emotion/react";import{KeyboardIcon as n}from"react-magma-icons";import{Point as r,LineSegment as o,VictoryChart as a,VictoryVoronoiContainer as i,VictoryTooltip as s,VictoryAxis as l,VictoryLine as c,VictoryScatter as d}from"victory";import{StyledTooltip as p,ThemeContext as u,TooltipPosition as f,TooltipArrow as h,useForceUpdate as m,Checkbox as b,I18nContext as g,Card as v,Datagrid as x,Spinner as y,styled as k,Paragraph as w,TabsContainer as I,TabPanel as S,useDescendants as $,TypographyVisualStyle as F,Tabs as P,Tab as L,Tooltip as z,IconButton as C,ButtonVariant as E,Announce as A,TabPanelsContainer as j,useIsInverse as O}from"react-magma-dom";import R from"@emotion/styled";import{jsx as W,jsxs as D,Fragment as T}from"react/jsx-runtime";import{AreaChart as H,StackedAreaChart as q,SimpleBarChart as _,GroupedBarChart as M,StackedBarChart as G,DonutChart as B,LineChart as K,LollipopChart as V,PieChart as Y,RadarChart as N,BoxplotChart as U,BubbleChart as X,BulletChart as Z,GaugeChart as J,HistogramChart as Q,MeterChart as ee,ScatterChart as te,ComboChart as ne}from"@carbon/charts-react";function re(){return re=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},re.apply(this,arguments)}function oe(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}const ae=["#00507A","#8F0033","#B84900","#255200","#711E6E","#005249"],ie={width:350,height:350,padding:50},se={fontFamily:'"Work Sans",Helvetica,sans-serif',fontSize:12,letterSpacing:"normal",padding:8,fill:"#3F3F3F",stroke:"transparent",strokeWidth:0},le=re({textAnchor:"middle"},se),ce={area:re({style:{data:{fill:"pink"},labels:se}},ie),axis:re({style:{axis:{fill:"transparent",stroke:"#8F8F8F",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"},axisLabel:re({},le,{padding:8,stroke:"transparent"}),grid:{fill:"none",stroke:"#dfdfdf",strokeLinecap:"round",strokeLinejoin:"round",pointerEvents:"painted"},ticks:{fill:"transparent",size:0,stroke:"#8F8F8F",strokeWidth:0,strokeLinecap:"round",strokeLinejoin:"round"},tickLabels:re({},se,{fill:"#3F3F3F"})}},ie),polarDependentAxis:{style:{ticks:{fill:"transparent",size:1,stroke:"transparent"}}},bar:re({style:{data:{fill:"#3F3F3F",padding:8,strokeWidth:0},labels:se}},ie),boxplot:re({style:{max:{padding:8,stroke:"#3F3F3F",strokeWidth:1},maxLabels:re({},se,{padding:3}),median:{padding:8,stroke:"#3F3F3F",strokeWidth:1},medianLabels:re({},se,{padding:3}),min:{padding:8,stroke:"#3F3F3F",strokeWidth:1},minLabels:re({},se,{padding:3}),q1:{padding:8,fill:"#3F3F3F"},q1Labels:re({},se,{padding:3}),q3:{padding:8,fill:"#3F3F3F"},q3Labels:re({},se,{padding:3})},boxWidth:20},ie),candlestick:re({style:{data:{stroke:"#3F3F3F"},labels:re({},se,{padding:5})},candleColors:{positive:"#ffffff",negative:"#3F3F3F"}},ie),chart:ie,errorbar:re({borderWidth:8,style:{data:{fill:"transparent",opacity:1,stroke:"#3F3F3F",strokeWidth:2},labels:se}},ie),group:re({colorScale:ae},ie),histogram:re({style:{data:{fill:"#3F3F3F",stroke:"pink",strokeWidth:2},labels:se}},ie),legend:{colorScale:ae,gutter:10,orientation:"vertical",titleOrientation:"top",style:{data:{type:"circle"},labels:se,title:re({},se,{padding:5})}},line:re({style:{data:{fill:"transparent",opacity:1,stroke:"#3F3F3F",strokeWidth:2},labels:se}},ie),pie:re({colorScale:ae,style:{data:{padding:8,stroke:"#DFDFDF",strokeWidth:1},labels:re({},se,{padding:20})}},ie),scatter:re({style:{data:{fill:"#3F3F3F",opacity:1,stroke:"transparent",strokeWidth:0},labels:se}},ie),stack:re({colorScale:ae},ie),tooltip:{style:re({},se,{padding:0,pointerEvents:"none"}),flyoutStyle:{stroke:"pink",strokeWidth:1,fill:"#f0f0f0",pointerEvents:"none"},flyoutPadding:5,cornerRadius:5,pointerLength:10},voronoi:re({style:{data:{fill:"transparent",stroke:"transparent",strokeWidth:0},labels:re({},se,{padding:5,pointerEvents:"none"}),flyout:{stroke:"pink",strokeWidth:1,fill:"#f0f0f0",pointerEvents:"none"}}},ie)};let de,pe,ue=e=>e;const fe=R(p)(de||(de=ue`
|
|
2
2
|
background: ${0};
|
|
3
3
|
border: 1px solid ${0};
|
|
4
4
|
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
|
|
@@ -18,42 +18,42 @@ import*as e from"react";import{css as t}from"@emotion/react";import{KeyboardIcon
|
|
|
18
18
|
margin-bottom: 0;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
`),e=>e.theme.colors.neutral100,e=>e.theme.colors.neutral300,e=>e.theme.colors.neutral,e=>e.theme.typeScale.size02.fontSize,e=>e.theme.typeScale.size02.lineHeight),
|
|
21
|
+
`),e=>e.theme.colors.neutral100,e=>e.theme.colors.neutral300,e=>e.theme.colors.neutral,e=>e.theme.typeScale.size02.fontSize,e=>e.theme.typeScale.size02.lineHeight),he=R.span(pe||(pe=ue`
|
|
22
22
|
background: ${0};
|
|
23
23
|
border: ${0};
|
|
24
24
|
border-radius: 4px;
|
|
25
25
|
height: 20px;
|
|
26
26
|
width: 20px;
|
|
27
27
|
margin-right: 8px;
|
|
28
|
-
`),e=>e.color,e=>e.color?"none":"3px solid black"),
|
|
28
|
+
`),e=>e.color,e=>e.color?"none":"3px solid black"),me=t=>{const{datum:n,index:r,showTooltip:o,x:a,y:i}=t,s=e.useContext(u);return o===`${r}-${n.index}`?W("g",{style:{pointerEvents:"none"},children:W("foreignObject",{x:a,y:i,width:"275",height:"100%",children:D(fe,{position:f.top,role:"tooltip",theme:s,children:[D("div",{children:[W(he,{color:s.iterableColors[r]}),W("span",{children:n.label})]}),W(h,{theme:s})]})})}):null},be=t=>{const{x:n,y:r,activePoints:o,hiddenData:a,dataLength:i}=t,s=Array.from(Array(i-0),(e,t)=>t+0).filter(e=>!a.includes(e)),l=e.useContext(u);return W("g",{style:{pointerEvents:"none"},children:W("foreignObject",{x:n,y:r,width:"275",height:"100%",children:D(fe,{"data-testid":"axis-tooltip",position:f.top,role:"tooltip",theme:l,children:[o.map((e,t)=>D("div",{children:[W(he,{color:l.iterableColors[s[t]]}),W("span",{children:e.label})]},t)),W(h,{theme:l})]})})})},ge=["datum","index","lineIndex","pointRefArray","registerPoint","unregisterPoint"],ve=["lineIndex","pointRefArray","pointIndex","registerPoint","unregisterPoint"],xe=e=>{const{datum:t,index:n,lineIndex:o,pointRefArray:a,registerPoint:i,unregisterPoint:s}=e,l=oe(e,ge);return W(r,re({},l,{ariaLabel:t.label,pathComponent:W(ye,{lineIndex:o,pointIndex:n,pointRefArray:a,registerPoint:i,unregisterPoint:s}),role:"button",tabIndex:0}))},ye=t=>{const{lineIndex:n,pointRefArray:r,pointIndex:o,registerPoint:a,unregisterPoint:i}=t,s=oe(t,ve),l=m(),c=e.useRef(null);return e.useEffect(()=>(a(r,c),l(),()=>i(r,c)),[]),W("path",re({ref:c,"data-line-index":n,"data-point-index":o},s))},ke=["events"],we=e=>{let{events:t}=e,n=oe(e,ke);return D("g",{children:[W(o,re({},n,{events:t,style:{strokeWidth:"50px",stroke:"transparent"}})),W(o,re({},n,{events:t,style:{strokeWidth:"1px",stroke:"black",strokeOpacity:"0.2"}}))]})},Ie=["children","color","dataIndex","isHidden","onClick","name","focusCurrentLine","resetLineFocus"],Se=e.forwardRef((t,n)=>{const{color:r,dataIndex:o,isHidden:a,onClick:i,name:s,focusCurrentLine:l,resetLineFocus:c}=t,d=oe(t,Ie);function p(){a||l&&"function"==typeof l&&l(o)}const f=e.useContext(u);return W("div",{style:{display:"inline-flex"},onMouseEnter:p,onMouseLeave:c,children:W(b,re({checked:!a,color:r,containerStyle:{alignItems:"center",border:"0",boxShadow:"0 0 0",color:f.colors.neutral,display:"inline-flex",margin:"0 36px 20px 0",padding:"0"},inputStyle:{border:r?"none":`2px solid ${f.colors.neutral800}`,borderRadius:"4px"},labelText:s,onBlur:c,onClick:function(){i&&"function"==typeof i&&i(o),a||c&&"function"==typeof c&&c()},onFocus:p,ref:n,theme:f},d))})}),$e=["axisLabel","tickLabels"],Fe=["style"],Pe=["axisLabel","tickLabels"],Le=["style"];let ze,Ce,Ee,Ae,je=e=>e;const Oe=R.div(ze||(ze=je`
|
|
29
29
|
max-height: 600px;
|
|
30
30
|
max-width: 800px;
|
|
31
31
|
svg {
|
|
32
32
|
overflow: visible;
|
|
33
33
|
}
|
|
34
|
-
`)),
|
|
34
|
+
`)),Re=R.div(Ce||(Ce=je``)),We=R.div(Ee||(Ee=je`
|
|
35
35
|
padding-bottom: 24px;
|
|
36
|
-
`)),
|
|
36
|
+
`)),De=R.p(Ae||(Ae=je`
|
|
37
37
|
color: ${0};
|
|
38
38
|
font-size: ${0};
|
|
39
|
-
`),e=>e.theme.colors.neutral,e=>e.theme.typeScale.size02.fontSize);function
|
|
39
|
+
`),e=>e.theme.colors.neutral,e=>e.theme.typeScale.size02.fontSize);function Te(t){const{componentProps:{chart:n={},line:r={},scatter:o={},xAxis:{style:{axisLabel:p,tickLabels:f}={}}={style:{}},yAxis:{style:{axisLabel:h,tickLabels:m}={}}={style:{}}}={},data:b=[],lastFocusedScatterPoint:v,pointRefArray:x,registerPoint:y,unregisterPoint:k,tabRef:w,x:I,y:S}=t,$=oe(t.componentProps.xAxis.style,$e),F=oe(t.componentProps.xAxis,Fe),P=oe(t.componentProps.yAxis.style,Pe),L=oe(t.componentProps.yAxis,Le),z=e.useContext(u),C=e.useContext(g),[E,A]=e.useState([]),[j,O]=e.useState(800),[R,H]=e.useState(null),[q,_]=e.useState(null),[M,G]=e.useState(!0),[B,K]=e.useState(!1),V=e.useRef(null),Y=e.useRef(null);e.useEffect(()=>(Z(),window.addEventListener("resize",Z),window.addEventListener("keydown",J),()=>{window.removeEventListener("resize",Z),window.removeEventListener("keydown",J)}),[]),e.useEffect(()=>(window.addEventListener("mousemove",Q),()=>{window.removeEventListener("mousemove",Q)}),[q]);const N=b.map((e,t)=>`scatter-${t}`),U=re({tickLabels:re({color:"#3f3f3f",fontSize:12},f),axisLabel:re({color:"#3f3f3f",padding:44,fontSize:14,fontWeight:"bold"},p)},$),X=re({tickLabels:re({fontSize:12},m),axisLabel:re({color:"#3f3f3f",padding:64,fontSize:14,fontWeight:"bold"},h)},P);function Z(){V.current&&O(V.current.clientWidth)}function J(e){"Escape"===e.key&&(_(null),G(!1))}function Q(){!q&&G(!0)}function ee(e){return null===R||R===e?1:.1}function te(e){E.includes(e)?A(E.filter(t=>t!==e)):A(E.concat([e]))}function ne(e){H(e)}function ae(){H(null)}const ie=(e,t)=>{if(t.current){const n=parseInt(t.current.getAttribute("data-line-index"),10);!e.includes(n)&&e.push(parseInt(t.current.getAttribute("data-line-index"),10))}return e},se=e=>{const t=parseInt(e.current.getAttribute("data-line-index"),10),n=parseInt(e.current.getAttribute("data-point-index"),10),r=x.current.reduce(ie,[]);return{currentLineIndex:t,currentPointIndex:n,lineIndexes:r,lowestLineIndex:r[0],highestLineIndex:r[r.length-1]}},le=(e,t)=>n=>n.current&&parseInt(n.current.getAttribute("data-line-index"),10)===e&&parseInt(n.current.getAttribute("data-point-index"),10)===t;function de(e){const{key:t,shiftKey:n}=e;"Tab"===t&&n&&v&&v.current&&x.current.find(e=>e.current===v.current)&&(e.preventDefault(),v.current.focus())}return D(Oe,{ref:V,children:[W(Re,{onKeyDown:function(e){const{key:t,shiftKey:n}=e;switch(t){case"Tab":e.preventDefault(),v.current=x.current.find(e=>e.current===document.activeElement).current,n?w.current&&w.current.focus():Y.current&&Y.current.focus();break;case"ArrowRight":{const e=x.current.findIndex(e=>e.current===document.activeElement);var r;void 0!==e&&(e===x.current.length-1?null==(r=x.current[0])||null==(r=r.current)||r.focus():x.current[e+1].current.focus());break}case"ArrowLeft":{const e=x.current.findIndex(e=>e.current===document.activeElement);void 0!==e&&(0===e?x.current[x.current.length-1].current.focus():x.current[e-1].current.focus());break}case"ArrowUp":{e.preventDefault();const t=x.current.find(e=>e.current===document.activeElement);if(t&&t.current){const{currentLineIndex:e,currentPointIndex:n,lineIndexes:r,lowestLineIndex:o,highestLineIndex:a}=se(t);if(e===o)x.current.find(le(a,n)).current.focus();else{const t=r[r.indexOf(e)-1];x.current.find(le(t,n)).current.focus()}}break}case"ArrowDown":{e.preventDefault();const t=x.current.find(e=>e.current===document.activeElement);if(t&&t.current){const{currentLineIndex:e,currentPointIndex:n,lineIndexes:r,lowestLineIndex:o,highestLineIndex:a}=se(t);if(e===a)x.current.find(le(o,n)).current.focus();else{const t=r[r.indexOf(e)+1];x.current.find(le(t,n)).current.focus()}}break}}},children:D(a,re({domainPadding:32,height:400,padding:{top:0,left:80,right:0,bottom:62},theme:ce,width:j,containerComponent:W(i,{name:"xAxisGroupLabel",voronoiBlacklist:N,voronoiDimension:"x",labels:B&&M?()=>" ":void 0,labelComponent:M?W(s,{flyoutComponent:W(be,{dataLength:b.length,hiddenData:E})}):void 0,role:"presentation",voronoiPadding:32})},n,{children:[W(l,re({},L,{dependentAxis:!0,style:X})),b.map(({data:e},t)=>!E.includes(t)&&W(c,re({style:{data:{opacity:ee(t),stroke:z.iterableColors[t],strokeWidth:"3"},parent:{border:z.colors.neutral400}},data:e,labelComponent:W(T,{}),x:I,y:S},r),`line${t}`)),W(l,re({},F,{style:U,gridComponent:W(we,{events:{onMouseEnter:()=>K(!0),onMouseLeave:()=>K(!1)}})})),b.map(({data:e},t)=>!E.includes(t)&&W(d,re({name:`scatter-${t}`,events:[{target:"data",eventHandlers:{onBlur:()=>(G(!0),_(null),[{target:"labels",mutation:()=>({active:void 0})}]),onClick:()=>[{target:"labels",mutation:e=>(_(`${e.datum.lineIndex}-${e.datum.index}`),{active:!0})}],onFocus:()=>(G(!1),[{target:"labels",mutation:e=>(_(`${e.datum.lineIndex}-${e.datum.index}`),{active:!0})}]),onMouseEnter:()=>(G(!1),[{target:"labels",mutation:e=>(_(`${e.datum.lineIndex}-${e.datum.index}`),{active:!0})}]),onMouseLeave:()=>{_(null),G(!0)}}}],style:{data:{fill:z.colors.neutral100,opacity:ee(t),stroke:z.iterableColors[t],strokeWidth:2}},size:5,data:e.map((e,n)=>re({index:n,lineIndex:t},e)),dataComponent:W(xe,{lineIndex:t,pointRefArray:x,registerPoint:y,unregisterPoint:k}),labels:()=>"",labelComponent:W(s,{text:"",flyoutComponent:W(me,{index:t,showTooltip:q})}),x:I,y:S},o),`scatter${t}`))]}))}),D(We,{children:[W(De,{theme:z,children:C.charts.line.dataLegendsLabel}),b.map(({name:e},t)=>{const n=C.charts.line.legendButtonAriaLabel.replace(/\{name\}/g,e);return W(Se,{"aria-label":n,color:z.iterableColors[t],dataIndex:t,isHidden:E.includes(t),name:e,onClick:te,onKeyDown:0===t?de:void 0,focusCurrentLine:ne,ref:0===t?Y:void 0,resetLineFocus:ae},t)})]})]})}function He(e){return e.toLowerCase().replace(/[^a-z 0-9]/gi,"").replace(/(?:^\w|[A-Z]|\b\w)/g,(e,t)=>0===t?e.toLowerCase():e.toUpperCase()).replace(/\s+/g,"")}const qe=t=>{const{data:n=[],xData:{keyValue:r,label:o,tickFormat:a,tickValues:i},yData:{keyValue:s,tickFormat:l}}=t,[c,d]=e.useState({columns:[],rows:[]});return e.useEffect(()=>{d(function(){const e=He(r||o||"x"),t=n.reduce((e,{data:t})=>(t.forEach(t=>{const n=t.x||r&&t[r];!e.includes(n)&&e.push(n)}),e),[]);let c={columns:t.length>0?[{field:e,header:o||r||"X",isRowHeader:!0}]:[],rows:t.reduce((n,r,o)=>{const s=i&&"number"==typeof r&&i.length===t.length?a&&"function"==typeof a?a(i[r-1]):i[r-1]:a&&Array.isArray(a)?a[r-1]:a&&"function"==typeof a?a(r):r;return n.push({[e]:s,id:o}),n},[])};return n.reduce((e,t)=>{const{name:n,data:r}=t,o=He(n);return e.columns.push({field:o,header:n}),r.forEach((t,n)=>{const r=t.y||0===t.y?t.y:s&&t[s];e.rows[n]=re({},e.rows[n],{id:c.rows.length>0?n+1:n,[o]:l&&"function"==typeof l?l(r):r})}),e},c)}())},[n]),W(v,{children:c.rows.length>0?W(x,{hasPagination:!1,columns:c.columns,rows:c.rows}):W(y,{})})},_e=["description","title","testId","type"];let Me,Ge,Be,Ke,Ve,Ye,Ne=e=>e;const Ue=k.span(Me||(Me=Ne`
|
|
40
40
|
color: ${0};
|
|
41
41
|
font-size: ${0};
|
|
42
42
|
font-weight: 600;
|
|
43
43
|
font-family: ${0};
|
|
44
44
|
line-height: ${0};
|
|
45
45
|
margin: 0 0 12px 0;
|
|
46
|
-
`),e=>e.theme.colors.neutral,e=>e.theme.typeScale.size04.fontSize,e=>e.theme.bodyFont,e=>e.theme.typeScale.size04.lineHeight),
|
|
46
|
+
`),e=>e.theme.colors.neutral,e=>e.theme.typeScale.size04.fontSize,e=>e.theme.bodyFont,e=>e.theme.typeScale.size04.lineHeight),Xe=k(w)(Ge||(Ge=Ne`
|
|
47
47
|
font-size: ${0};
|
|
48
48
|
margin: 0 0 18px 0;
|
|
49
|
-
`),e=>e.theme.typeScale.size02.fontSize),
|
|
49
|
+
`),e=>e.theme.typeScale.size02.fontSize),Ze=k(I)(Be||(Be=Ne`
|
|
50
50
|
width: 800px;
|
|
51
51
|
ul {
|
|
52
52
|
box-shadow: inset 0 -1px 0 ${0};
|
|
53
53
|
}
|
|
54
|
-
`),e=>e.theme.colors.neutral300),
|
|
54
|
+
`),e=>e.theme.colors.neutral300),Je=k(S)(Ke||(Ke=Ne`
|
|
55
55
|
padding: 22px 0;
|
|
56
|
-
`)),
|
|
56
|
+
`)),Qe=k(v)(Ve||(Ve=Ne`
|
|
57
57
|
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
|
|
58
58
|
display: ${0};
|
|
59
59
|
right: ${0};
|
|
@@ -69,10 +69,10 @@ import*as e from"react";import{css as t}from"@emotion/react";import{KeyboardIcon
|
|
|
69
69
|
z-index: 2;
|
|
70
70
|
|
|
71
71
|
${0}
|
|
72
|
-
`),e=>e.isOpen?"block":"none",e=>e.theme.spaceScale.spacing02,e=>e.maxHeight?e.maxHeight:e.theme.dropdown.content.maxHeight,e=>e.isOpen?"1":"0",e=>e.theme.spaceScale.spacing05,e=>e.theme.spaceScale.spacing05,e=>e.width&&t(
|
|
72
|
+
`),e=>e.isOpen?"block":"none",e=>e.theme.spaceScale.spacing02,e=>e.maxHeight?e.maxHeight:e.theme.dropdown.content.maxHeight,e=>e.isOpen?"1":"0",e=>e.theme.spaceScale.spacing05,e=>e.theme.spaceScale.spacing05,e=>e.width&&t(Ye||(Ye=Ne`
|
|
73
73
|
white-space: normal;
|
|
74
74
|
width: ${0};
|
|
75
|
-
`),e.width));function Ke(t,r){var o,a,i;const{description:s,title:l,type:c}=t,d=U(t,Ae),p=e.useRef(null),f=e.useRef(null),h=e.useContext(u),m=e.useContext(b),[g,v,x]=$(),[y,k]=e.useState(!1);return D("div",{ref:r,children:[W(qe,{theme:h,children:l}),s&&W(_e,{theme:h,visualStyle:F.bodySmall,children:s}),D(Me,{theme:h,children:[D(P,{children:[W(L,{children:m.charts.line.chartTabLabel}),W(L,{children:m.charts.line.dataTabLabel}),D("div",{onBlur:function(){k(!1)},style:{display:"inline-block",marginLeft:"auto"},children:[W(z,{content:m.charts.line.keyboardInstructionsTooltip,ref:p,children:W(C,{"aria-controls":"keyboardInstructions","aria-label":m.charts.line.keyboardInstructionsTooltip,"aria-expanded":Boolean(y),icon:W(n,{}),onClick:function(){k(e=>!e)},onKeyDown:function(e){const{key:t,shiftKey:n}=e;switch(t){case"Escape":k(!1);break;case"Tab":!n&&f&&f.current&&g.current.find(e=>e.current===f.current)&&(e.preventDefault(),f.current.focus())}},variant:E.link})}),W(A,{children:D(Be,{id:"keyboardInstructions",isOpen:y,theme:h,width:"350px",children:[W(w,{visualStyle:F.headingXSmall,style:{margin:"0 0 16px"},children:m.charts.line.keyboardInstructionsHeader}),m.charts.line.keyboardInstructions]})})]})]}),D(j,{children:[W(Ge,{theme:h,children:"line"===c&&W(ze,N({},d,{lastFocusedScatterPoint:f,pointRefArray:g,registerPoint:v,tabRef:p,unregisterPoint:x}))}),W(Ge,{theme:h,children:W(Ee,{data:d.data,xData:{keyValue:d.x,label:null==(o=d.componentProps)||null==(o=o.xAxis)?void 0:o.label,tickFormat:null==(a=d.componentProps)||null==(a=a.xAxis)?void 0:a.tickFormat},yData:{keyValue:d.y,tickFormat:null==(i=d.componentProps)||null==(i=i.yAxis)?void 0:i.tickFormat}})})]})]})]})}const Ve=e.forwardRef(Ke);function Ye(){return Ye=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ye.apply(this,arguments)}function Ne(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ue(e,t){return Ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ue(e,t)}function Xe(e){return Xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Xe(e)}function Ze(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ze=function(){return!!e})()}function Je(e,t,n){if(Ze())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&Ue(o,n.prototype),o}function Qe(e){var t="function"==typeof Map?new Map:void 0;return Qe=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return Je(e,arguments,Xe(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Ue(n,e)},Qe(e)}var et={1:"Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }).\n\n",2:"Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }).\n\n",3:"Passed an incorrect argument to a color function, please pass a string representation of a color.\n\n",4:"Couldn't generate valid rgb string from %s, it returned %s.\n\n",5:"Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.\n\n",6:"Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, blue: 100 }).\n\n",7:"Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green: 205, blue: 100, alpha: 0.75 }).\n\n",8:"Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.\n\n",9:"Please provide a number of steps to the modularScale helper.\n\n",10:"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\n\n",11:'Invalid value passed as base to modularScale, expected number or em string but got "%s"\n\n',12:'Expected a string ending in "px" or a number passed as the first argument to %s(), got "%s" instead.\n\n',13:'Expected a string ending in "px" or a number passed as the second argument to %s(), got "%s" instead.\n\n',14:'Passed invalid pixel value ("%s") to %s(), please pass a value like "12px" or 12.\n\n',15:'Passed invalid base value ("%s") to %s(), please pass a value like "12px" or 12.\n\n',16:"You must provide a template to this method.\n\n",17:"You passed an unsupported selector state to this method.\n\n",18:"minScreen and maxScreen must be provided as stringified numbers with the same units.\n\n",19:"fromSize and toSize must be provided as stringified numbers with the same units.\n\n",20:"expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\n\n",21:"expects the objects in the first argument array to have the properties `prop`, `fromSize`, and `toSize`.\n\n",22:"expects the first argument object to have the properties `prop`, `fromSize`, and `toSize`.\n\n",23:"fontFace expects a name of a font-family.\n\n",24:"fontFace expects either the path to the font file(s) or a name of a local copy.\n\n",25:"fontFace expects localFonts to be an array.\n\n",26:"fontFace expects fileFormats to be an array.\n\n",27:"radialGradient requries at least 2 color-stops to properly render.\n\n",28:"Please supply a filename to retinaImage() as the first argument.\n\n",29:"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\n\n",30:"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",31:"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation\n\n",32:"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s')\n\n",33:"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation\n\n",34:"borderRadius expects a radius value as a string or number as the second argument.\n\n",35:'borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.\n\n',36:"Property must be a string value.\n\n",37:"Syntax Error at %s.\n\n",38:"Formula contains a function that needs parentheses at %s.\n\n",39:"Formula is missing closing parenthesis at %s.\n\n",40:"Formula has too many closing parentheses at %s.\n\n",41:"All values in a formula must have the same unit or be unitless.\n\n",42:"Please provide a number of steps to the modularScale helper.\n\n",43:"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\n\n",44:"Invalid value passed as base to modularScale, expected number or em/rem string but got %s.\n\n",45:"Passed invalid argument to hslToColorString, please pass a HslColor or HslaColor object.\n\n",46:"Passed invalid argument to rgbToColorString, please pass a RgbColor or RgbaColor object.\n\n",47:"minScreen and maxScreen must be provided as stringified numbers with the same units.\n\n",48:"fromSize and toSize must be provided as stringified numbers with the same units.\n\n",49:"Expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\n\n",50:"Expects the objects in the first argument array to have the properties prop, fromSize, and toSize.\n\n",51:"Expects the first argument object to have the properties prop, fromSize, and toSize.\n\n",52:"fontFace expects either the path to the font file(s) or a name of a local copy.\n\n",53:"fontFace expects localFonts to be an array.\n\n",54:"fontFace expects fileFormats to be an array.\n\n",55:"fontFace expects a name of a font-family.\n\n",56:"linearGradient requries at least 2 color-stops to properly render.\n\n",57:"radialGradient requries at least 2 color-stops to properly render.\n\n",58:"Please supply a filename to retinaImage() as the first argument.\n\n",59:"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\n\n",60:"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",61:"Property must be a string value.\n\n",62:"borderRadius expects a radius value as a string or number as the second argument.\n\n",63:'borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.\n\n',64:"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation.\n\n",65:"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s').\n\n",66:"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation.\n\n",67:"You must provide a template to this method.\n\n",68:"You passed an unsupported selector state to this method.\n\n",69:'Expected a string ending in "px" or a number passed as the first argument to %s(), got %s instead.\n\n',70:'Expected a string ending in "px" or a number passed as the second argument to %s(), got %s instead.\n\n',71:'Passed invalid pixel value %s to %s(), please pass a value like "12px" or 12.\n\n',72:'Passed invalid base value %s to %s(), please pass a value like "12px" or 12.\n\n',73:"Please provide a valid CSS variable.\n\n",74:"CSS variable not found.\n\n",75:"fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen.\n"};function tt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,o=t[0],a=[];for(r=1;r<t.length;r+=1)a.push(t[r]);return a.forEach(function(e){o=o.replace(/%[a-z]/,e)}),o}var nt=function(e){var t,n;function r(t){var n;if("production"===process.env.NODE_ENV)n=e.call(this,"An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#"+t+" for more information.")||this;else{for(var r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];n=e.call(this,tt.apply(void 0,[et[t]].concat(o)))||this}return Ne(n)}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,Ue(t,n),r}(Qe(Error));function rt(e){return Math.round(255*e)}function ot(e,t,n){return rt(e)+","+rt(t)+","+rt(n)}function at(e,t,n,r){if(void 0===r&&(r=ot),0===t)return r(n,n,n);var o=(e%360+360)%360/60,a=(1-Math.abs(2*n-1))*t,i=a*(1-Math.abs(o%2-1)),s=0,l=0,c=0;o>=0&&o<1?(s=a,l=i):o>=1&&o<2?(s=i,l=a):o>=2&&o<3?(l=a,c=i):o>=3&&o<4?(l=i,c=a):o>=4&&o<5?(s=i,c=a):o>=5&&o<6&&(s=a,c=i);var d=n-a/2;return r(s+d,l+d,c+d)}var it={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},st=/^#[a-fA-F0-9]{6}$/,lt=/^#[a-fA-F0-9]{8}$/,ct=/^#[a-fA-F0-9]{3}$/,dt=/^#[a-fA-F0-9]{4}$/,pt=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i,ut=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i,ft=/^hsl\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,ht=/^hsla\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i,mt=function(e){return 7===e.length&&e[1]===e[2]&&e[3]===e[4]&&e[5]===e[6]?"#"+e[1]+e[3]+e[5]:e};function gt(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function bt(e,t,n){return function(){var r=n.concat(Array.prototype.slice.call(arguments));return r.length>=t?e.apply(this,r):bt(e,t,r)}}function vt(e){return bt(e,e.length,[])}function xt(e,t){if("transparent"===t)return t;var n,r=function(e){if("string"!=typeof e)throw new nt(3);var t=function(e){if("string"!=typeof e)return e;var t=e.toLowerCase();return it[t]?"#"+it[t]:e}(e);if(t.match(st))return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16)};if(t.match(lt)){var n=parseFloat((parseInt(""+t[7]+t[8],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16),alpha:n}}if(t.match(ct))return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16)};if(t.match(dt)){var r=parseFloat((parseInt(""+t[4]+t[4],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16),alpha:r}}var o=pt.exec(t);if(o)return{red:parseInt(""+o[1],10),green:parseInt(""+o[2],10),blue:parseInt(""+o[3],10)};var a=ut.exec(t.substring(0,50));if(a)return{red:parseInt(""+a[1],10),green:parseInt(""+a[2],10),blue:parseInt(""+a[3],10),alpha:parseFloat(""+a[4])};var i=ft.exec(t);if(i){var s="rgb("+at(parseInt(""+i[1],10),parseInt(""+i[2],10)/100,parseInt(""+i[3],10)/100)+")",l=pt.exec(s);if(!l)throw new nt(4,t,s);return{red:parseInt(""+l[1],10),green:parseInt(""+l[2],10),blue:parseInt(""+l[3],10)}}var c=ht.exec(t.substring(0,50));if(c){var d="rgb("+at(parseInt(""+c[1],10),parseInt(""+c[2],10)/100,parseInt(""+c[3],10)/100)+")",p=pt.exec(d);if(!p)throw new nt(4,t,d);return{red:parseInt(""+p[1],10),green:parseInt(""+p[2],10),blue:parseInt(""+p[3],10),alpha:parseFloat(""+c[4])}}throw new nt(5)}(t);return function(e,t,n,r){if("object"==typeof e)return e.alpha>=1?function(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return mt("#"+gt(e)+gt(t)+gt(n));if("object"==typeof e&&void 0===t&&void 0===n)return mt("#"+gt(e.red)+gt(e.green)+gt(e.blue));throw new nt(6)}(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")";throw new nt(7)}(Ye({},r,{alpha:(n=+(100*("number"==typeof r.alpha?r.alpha:1)-100*parseFloat(e)).toFixed(2)/100,Math.max(0,Math.min(1,n)))}))}var yt=vt(xt);const kt=["children","testId","isInverse","type","dataSet","options"];let wt;var It;!function(e){e.area="area",e.areaStacked="areaStacked",e.bar="bar",e.barGrouped="barGrouped",e.barStacked="barStacked",e.donut="donut",e.line="line",e.pie="pie",e.lollipop="lollipop"}(It||(It={}));const St=R.div(wt||(wt=(e=>e)`
|
|
75
|
+
`),e.width));function et(t,r){var o,a,i;const{description:s,title:l,type:c}=t,d=oe(t,_e),p=e.useRef(null),f=e.useRef(null),h=e.useContext(u),m=e.useContext(g),[b,v,x]=$(),[y,k]=e.useState(!1);return D("div",{ref:r,children:[W(Ue,{theme:h,children:l}),s&&W(Xe,{theme:h,visualStyle:F.bodySmall,children:s}),D(Ze,{theme:h,children:[D(P,{children:[W(L,{children:m.charts.line.chartTabLabel}),W(L,{children:m.charts.line.dataTabLabel}),D("div",{onBlur:function(){k(!1)},style:{display:"inline-block",marginLeft:"auto"},children:[W(z,{content:m.charts.line.keyboardInstructionsTooltip,ref:p,children:W(C,{"aria-controls":"keyboardInstructions","aria-label":m.charts.line.keyboardInstructionsTooltip,"aria-expanded":Boolean(y),icon:W(n,{}),onClick:function(){k(e=>!e)},onKeyDown:function(e){const{key:t,shiftKey:n}=e;switch(t){case"Escape":k(!1);break;case"Tab":!n&&f&&f.current&&b.current.find(e=>e.current===f.current)&&(e.preventDefault(),f.current.focus())}},variant:E.link})}),W(A,{children:D(Qe,{id:"keyboardInstructions",isOpen:y,theme:h,width:"350px",children:[W(w,{visualStyle:F.headingXSmall,style:{margin:"0 0 16px"},children:m.charts.line.keyboardInstructionsHeader}),m.charts.line.keyboardInstructions]})})]})]}),D(j,{children:[W(Je,{theme:h,children:"line"===c&&W(Te,re({},d,{lastFocusedScatterPoint:f,pointRefArray:b,registerPoint:v,tabRef:p,unregisterPoint:x}))}),W(Je,{theme:h,children:W(qe,{data:d.data,xData:{keyValue:d.x,label:null==(o=d.componentProps)||null==(o=o.xAxis)?void 0:o.label,tickFormat:null==(a=d.componentProps)||null==(a=a.xAxis)?void 0:a.tickFormat},yData:{keyValue:d.y,tickFormat:null==(i=d.componentProps)||null==(i=i.yAxis)?void 0:i.tickFormat}})})]})]})]})}const tt=e.forwardRef(et);function nt(){return nt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nt.apply(this,arguments)}function rt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ot(e,t){return ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ot(e,t)}function at(e){return at=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},at(e)}function it(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(it=function(){return!!e})()}function st(e,t,n){if(it())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&ot(o,n.prototype),o}function lt(e){var t="function"==typeof Map?new Map:void 0;return lt=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return st(e,arguments,at(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),ot(n,e)},lt(e)}var ct={1:"Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }).\n\n",2:"Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }).\n\n",3:"Passed an incorrect argument to a color function, please pass a string representation of a color.\n\n",4:"Couldn't generate valid rgb string from %s, it returned %s.\n\n",5:"Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.\n\n",6:"Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, blue: 100 }).\n\n",7:"Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green: 205, blue: 100, alpha: 0.75 }).\n\n",8:"Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.\n\n",9:"Please provide a number of steps to the modularScale helper.\n\n",10:"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\n\n",11:'Invalid value passed as base to modularScale, expected number or em string but got "%s"\n\n',12:'Expected a string ending in "px" or a number passed as the first argument to %s(), got "%s" instead.\n\n',13:'Expected a string ending in "px" or a number passed as the second argument to %s(), got "%s" instead.\n\n',14:'Passed invalid pixel value ("%s") to %s(), please pass a value like "12px" or 12.\n\n',15:'Passed invalid base value ("%s") to %s(), please pass a value like "12px" or 12.\n\n',16:"You must provide a template to this method.\n\n",17:"You passed an unsupported selector state to this method.\n\n",18:"minScreen and maxScreen must be provided as stringified numbers with the same units.\n\n",19:"fromSize and toSize must be provided as stringified numbers with the same units.\n\n",20:"expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\n\n",21:"expects the objects in the first argument array to have the properties `prop`, `fromSize`, and `toSize`.\n\n",22:"expects the first argument object to have the properties `prop`, `fromSize`, and `toSize`.\n\n",23:"fontFace expects a name of a font-family.\n\n",24:"fontFace expects either the path to the font file(s) or a name of a local copy.\n\n",25:"fontFace expects localFonts to be an array.\n\n",26:"fontFace expects fileFormats to be an array.\n\n",27:"radialGradient requries at least 2 color-stops to properly render.\n\n",28:"Please supply a filename to retinaImage() as the first argument.\n\n",29:"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\n\n",30:"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",31:"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation\n\n",32:"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s')\n\n",33:"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation\n\n",34:"borderRadius expects a radius value as a string or number as the second argument.\n\n",35:'borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.\n\n',36:"Property must be a string value.\n\n",37:"Syntax Error at %s.\n\n",38:"Formula contains a function that needs parentheses at %s.\n\n",39:"Formula is missing closing parenthesis at %s.\n\n",40:"Formula has too many closing parentheses at %s.\n\n",41:"All values in a formula must have the same unit or be unitless.\n\n",42:"Please provide a number of steps to the modularScale helper.\n\n",43:"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\n\n",44:"Invalid value passed as base to modularScale, expected number or em/rem string but got %s.\n\n",45:"Passed invalid argument to hslToColorString, please pass a HslColor or HslaColor object.\n\n",46:"Passed invalid argument to rgbToColorString, please pass a RgbColor or RgbaColor object.\n\n",47:"minScreen and maxScreen must be provided as stringified numbers with the same units.\n\n",48:"fromSize and toSize must be provided as stringified numbers with the same units.\n\n",49:"Expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\n\n",50:"Expects the objects in the first argument array to have the properties prop, fromSize, and toSize.\n\n",51:"Expects the first argument object to have the properties prop, fromSize, and toSize.\n\n",52:"fontFace expects either the path to the font file(s) or a name of a local copy.\n\n",53:"fontFace expects localFonts to be an array.\n\n",54:"fontFace expects fileFormats to be an array.\n\n",55:"fontFace expects a name of a font-family.\n\n",56:"linearGradient requries at least 2 color-stops to properly render.\n\n",57:"radialGradient requries at least 2 color-stops to properly render.\n\n",58:"Please supply a filename to retinaImage() as the first argument.\n\n",59:"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\n\n",60:"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",61:"Property must be a string value.\n\n",62:"borderRadius expects a radius value as a string or number as the second argument.\n\n",63:'borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.\n\n',64:"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation.\n\n",65:"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s').\n\n",66:"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation.\n\n",67:"You must provide a template to this method.\n\n",68:"You passed an unsupported selector state to this method.\n\n",69:'Expected a string ending in "px" or a number passed as the first argument to %s(), got %s instead.\n\n',70:'Expected a string ending in "px" or a number passed as the second argument to %s(), got %s instead.\n\n',71:'Passed invalid pixel value %s to %s(), please pass a value like "12px" or 12.\n\n',72:'Passed invalid base value %s to %s(), please pass a value like "12px" or 12.\n\n',73:"Please provide a valid CSS variable.\n\n",74:"CSS variable not found.\n\n",75:"fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen.\n"};function dt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,o=t[0],a=[];for(r=1;r<t.length;r+=1)a.push(t[r]);return a.forEach(function(e){o=o.replace(/%[a-z]/,e)}),o}var pt=function(e){var t,n;function r(t){var n;if("production"===process.env.NODE_ENV)n=e.call(this,"An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#"+t+" for more information.")||this;else{for(var r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];n=e.call(this,dt.apply(void 0,[ct[t]].concat(o)))||this}return rt(n)}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,ot(t,n),r}(lt(Error));function ut(e){return Math.round(255*e)}function ft(e,t,n){return ut(e)+","+ut(t)+","+ut(n)}function ht(e,t,n,r){if(void 0===r&&(r=ft),0===t)return r(n,n,n);var o=(e%360+360)%360/60,a=(1-Math.abs(2*n-1))*t,i=a*(1-Math.abs(o%2-1)),s=0,l=0,c=0;o>=0&&o<1?(s=a,l=i):o>=1&&o<2?(s=i,l=a):o>=2&&o<3?(l=a,c=i):o>=3&&o<4?(l=i,c=a):o>=4&&o<5?(s=i,c=a):o>=5&&o<6&&(s=a,c=i);var d=n-a/2;return r(s+d,l+d,c+d)}var mt={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},bt=/^#[a-fA-F0-9]{6}$/,gt=/^#[a-fA-F0-9]{8}$/,vt=/^#[a-fA-F0-9]{3}$/,xt=/^#[a-fA-F0-9]{4}$/,yt=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i,kt=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i,wt=/^hsl\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,It=/^hsla\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i,St=function(e){return 7===e.length&&e[1]===e[2]&&e[3]===e[4]&&e[5]===e[6]?"#"+e[1]+e[3]+e[5]:e};function $t(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function Ft(e,t,n){return function(){var r=n.concat(Array.prototype.slice.call(arguments));return r.length>=t?e.apply(this,r):Ft(e,t,r)}}function Pt(e){return Ft(e,e.length,[])}function Lt(e,t){if("transparent"===t)return t;var n,r=function(e){if("string"!=typeof e)throw new pt(3);var t=function(e){if("string"!=typeof e)return e;var t=e.toLowerCase();return mt[t]?"#"+mt[t]:e}(e);if(t.match(bt))return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16)};if(t.match(gt)){var n=parseFloat((parseInt(""+t[7]+t[8],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16),alpha:n}}if(t.match(vt))return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16)};if(t.match(xt)){var r=parseFloat((parseInt(""+t[4]+t[4],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16),alpha:r}}var o=yt.exec(t);if(o)return{red:parseInt(""+o[1],10),green:parseInt(""+o[2],10),blue:parseInt(""+o[3],10)};var a=kt.exec(t.substring(0,50));if(a)return{red:parseInt(""+a[1],10),green:parseInt(""+a[2],10),blue:parseInt(""+a[3],10),alpha:parseFloat(""+a[4])};var i=wt.exec(t);if(i){var s="rgb("+ht(parseInt(""+i[1],10),parseInt(""+i[2],10)/100,parseInt(""+i[3],10)/100)+")",l=yt.exec(s);if(!l)throw new pt(4,t,s);return{red:parseInt(""+l[1],10),green:parseInt(""+l[2],10),blue:parseInt(""+l[3],10)}}var c=It.exec(t.substring(0,50));if(c){var d="rgb("+ht(parseInt(""+c[1],10),parseInt(""+c[2],10)/100,parseInt(""+c[3],10)/100)+")",p=yt.exec(d);if(!p)throw new pt(4,t,d);return{red:parseInt(""+p[1],10),green:parseInt(""+p[2],10),blue:parseInt(""+p[3],10),alpha:parseFloat(""+c[4])}}throw new pt(5)}(t);return function(e,t,n,r){if("object"==typeof e)return e.alpha>=1?function(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return St("#"+$t(e)+$t(t)+$t(n));if("object"==typeof e&&void 0===t&&void 0===n)return St("#"+$t(e.red)+$t(e.green)+$t(e.blue));throw new pt(6)}(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")";throw new pt(7)}(nt({},r,{alpha:(n=+(100*("number"==typeof r.alpha?r.alpha:1)-100*parseFloat(e)).toFixed(2)/100,Math.max(0,Math.min(1,n)))}))}var zt=Pt(Lt);const Ct=["children","testId","isInverse","type","dataSet","options"];let Et;var At;!function(e){e.area="area",e.areaStacked="areaStacked",e.bar="bar",e.barGrouped="barGrouped",e.barStacked="barStacked",e.boxplot="boxplot",e.bubble="bubble",e.bullet="bullet",e.donut="donut",e.gauge="gauge",e.histogram="histogram",e.line="line",e.lollipop="lollipop",e.meter="meter",e.pie="pie",e.radar="radar",e.scatter="scatter",e.combo="combo"}(At||(At={}));const jt=R.div(Et||(Et=(e=>e)`
|
|
76
76
|
.cds--data-table thead tr th {
|
|
77
77
|
background: ${0} !important;
|
|
78
78
|
}
|
|
@@ -362,5 +362,5 @@ import*as e from"react";import{css as t}from"@emotion/react";import{KeyboardIcon
|
|
|
362
362
|
position: relative;
|
|
363
363
|
}
|
|
364
364
|
}
|
|
365
|
-
`),e=>e.isInverse?e.theme.colors.primary700:"",e=>e.theme.colors.neutral700,e=>e.isInverse?e.theme.colors.neutral100:"",e=>e.theme.typeScale.size02.fontSize,e=>e.theme.spaceScale.spacing02,e=>e.isInverse?e.theme.colors.neutral100:e.theme.colors.neutral700,e=>e.theme.borderRadius,e=>e.isInverse?e.theme.colors.primary700:"",e=>e.isInverse?e.theme.colors.primary600:"",e=>e.isInverse?
|
|
365
|
+
`),e=>e.isInverse?e.theme.colors.primary700:"",e=>e.theme.colors.neutral700,e=>e.isInverse?e.theme.colors.neutral100:"",e=>e.theme.typeScale.size02.fontSize,e=>e.theme.spaceScale.spacing02,e=>e.isInverse?e.theme.colors.neutral100:e.theme.colors.neutral700,e=>e.theme.borderRadius,e=>e.isInverse?e.theme.colors.primary700:"",e=>e.isInverse?e.theme.colors.primary600:"",e=>e.isInverse?zt(.8,e.theme.colors.neutral100):"inherit",e=>e.isInverse?zt(.8,e.theme.colors.neutral100):"inherit",e=>e.isInverse?"#202565":"",e=>e.isInverse?e.theme.colors.primary600:"",e=>e.theme.bodyFont,e=>e.isInverse?e.theme.colors.neutral100:e.theme.colors.neutral700,e=>e.isInverse?e.theme.colors.neutral900:e.theme.colors.neutral100,e=>e.theme.spaceScale.spacing05,e=>e.theme.spaceScale.spacing05,e=>e.theme.typeScale.size03.fontSize,e=>e.theme.spaceScale.spacing03,e=>e.isInverse?e.theme.colors.neutral100:e.theme.colors.neutral900,e=>e.isInverse?e.theme.colors.neutral100:"",e=>e.isInverse?e.theme.colors.neutral100:"",e=>e.isInverse?zt(.5,e.theme.colors.neutral100):"",e=>e.isInverse?e.theme.colors.neutral100:"",e=>e.isInverse?"invert(1)":"",e=>e.isInverse?e.theme.colors.primary600:e.theme.colors.neutral100,e=>e.isInverse?e.theme.colors.primary600:e.theme.colors.neutral100,e=>e.isInverse?e.theme.colors.primary600:e.theme.colors.neutral100,e=>e.isInverse?e.theme.colors.primary600:e.theme.colors.neutral100,e=>e.isInverse?e.theme.colors.primary600:e.theme.colors.neutral100,e=>e.isInverse?e.theme.colors.primary600:e.theme.colors.neutral100,e=>e.isInverse?e.theme.colors.primary600:e.theme.colors.neutral100,e=>e.isInverse?e.theme.colors.primary600:e.theme.colors.neutral100,e=>e.isInverse?e.theme.colors.focusInverse:"",e=>e.theme.typeScale.size03.lineHeight,e=>e.theme.spaceScale.spacing13,e=>e.theme.spaceScale.spacing04,e=>e.theme.bodyFont,e=>e.theme.typeScale.size03.fontSize,e=>e.theme.borderRadius,e=>e.isInverse?e.theme.colors.tertiary500:e.theme.colors.primary,e=>e.isInverse?e.theme.colors.neutral900:"",e=>e.isInverse?e.theme.colors.focusInverse:e.theme.colors.focus,e=>e.isInverse?e.theme.colors.focusInverse:e.theme.colors.focus,e=>e.isInverse?`1px solid ${e.theme.colors.focusInverse}`:"",e=>e.isInverse?e.theme.colors.focusInverse:e.theme.colors.focus,e=>e.isInverse?e.theme.colors.focusInverse:e.theme.colors.focus,e=>e.isInverse?e.theme.colors.primary600:e.theme.colors.neutral100,e=>e.isInverse?zt(.8,e.theme.colors.neutral100):e.theme.colors.neutral300,e=>e.isInverse?e.theme.colors.focusInverse:e.theme.colors.focus,e=>e.isInverse?zt(.8,e.theme.colors.neutral100):e.theme.colors.neutral300,e=>e.isInverse?e.theme.colors.primary600:e.theme.colors.neutral100,e=>e.theme.typeScale.size02.fontSize,e=>e.isInverse?e.theme.colors.neutral100:"");var Ot;!function(e){e.WHITE="white",e.G100="g100",e.G90="g90",e.G10="g10"}(Ot||(Ot={}));const Rt=e.forwardRef((t,n)=>{const{testId:r,isInverse:o,type:a,dataSet:i,options:s}=t,l=oe(t,Ct),c=e.useContext(u),d=O(o),p={area:H,areaStacked:q,bar:_,barGrouped:M,barStacked:G,donut:B,line:K,lollipop:V,pie:Y,radar:N,boxplot:U,bubble:X,bullet:Z,gauge:J,histogram:Q,meter:ee,scatter:te,combo:ne},f=re({},s,{theme:d?Ot.G100:Ot.WHITE,color:{scale:function(){let e={};const t=i.map(e=>"group"in e?e.group:null),n=t.filter((e,n)=>t.indexOf(e)===n);return n.forEach((t,r)=>n.length<=c.chartColors.length?e[t||"null"]=d?c.chartColorsInverse[r]:c.chartColors[r]:{}),e}()},tooltip:{truncation:{type:"none"}}}),h=p[a];return e.useEffect(()=>{document.querySelectorAll(".graph-frame ").forEach(e=>{e.setAttribute("aria-label","Interactive chart")})}),W(jt,re({"data-testid":r,ref:n,isInverse:d,theme:c,className:"carbon-chart-wrapper"},l,{children:W(h,{data:i,options:f})}))});export{Rt as CarbonChart,At as CarbonChartType,tt as Chart};
|
|
366
366
|
//# sourceMappingURL=charts.map
|
package/dist/charts.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e=require("react"),n=require("@emotion/react"),t=require("react-magma-icons"),r=require("victory"),o=require("react-magma-dom"),a=require("@emotion/styled"),i=require("react/jsx-runtime"),s=require("@carbon/charts-react");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function c(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach(function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}}),n.default=e,n}var d=c(e),u=l(a);function f(){return f=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},f.apply(this,arguments)}function p(e,n){if(null==e)return{};var t={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(n.indexOf(r)>=0)continue;t[r]=e[r]}return t}function h(e,n){return n||(n=e.slice(0)),e.raw=n,e}var m,g,b,v,x,y,k=["#00507A","#8F0033","#B84900","#255200","#711E6E","#005249"],w={width:350,height:350,padding:50},I={fontFamily:'"Work Sans",Helvetica,sans-serif',fontSize:12,letterSpacing:"normal",padding:8,fill:"#3F3F3F",stroke:"transparent",strokeWidth:0},S=f({textAnchor:"middle"},I),j={area:f({style:{data:{fill:"pink"},labels:I}},w),axis:f({style:{axis:{fill:"transparent",stroke:"#8F8F8F",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"},axisLabel:f({},S,{padding:8,stroke:"transparent"}),grid:{fill:"none",stroke:"#dfdfdf",strokeLinecap:"round",strokeLinejoin:"round",pointerEvents:"painted"},ticks:{fill:"transparent",size:0,stroke:"#8F8F8F",strokeWidth:0,strokeLinecap:"round",strokeLinejoin:"round"},tickLabels:f({},I,{fill:"#3F3F3F"})}},w),polarDependentAxis:{style:{ticks:{fill:"transparent",size:1,stroke:"transparent"}}},bar:f({style:{data:{fill:"#3F3F3F",padding:8,strokeWidth:0},labels:I}},w),boxplot:f({style:{max:{padding:8,stroke:"#3F3F3F",strokeWidth:1},maxLabels:f({},I,{padding:3}),median:{padding:8,stroke:"#3F3F3F",strokeWidth:1},medianLabels:f({},I,{padding:3}),min:{padding:8,stroke:"#3F3F3F",strokeWidth:1},minLabels:f({},I,{padding:3}),q1:{padding:8,fill:"#3F3F3F"},q1Labels:f({},I,{padding:3}),q3:{padding:8,fill:"#3F3F3F"},q3Labels:f({},I,{padding:3})},boxWidth:20},w),candlestick:f({style:{data:{stroke:"#3F3F3F"},labels:f({},I,{padding:5})},candleColors:{positive:"#ffffff",negative:"#3F3F3F"}},w),chart:w,errorbar:f({borderWidth:8,style:{data:{fill:"transparent",opacity:1,stroke:"#3F3F3F",strokeWidth:2},labels:I}},w),group:f({colorScale:k},w),histogram:f({style:{data:{fill:"#3F3F3F",stroke:"pink",strokeWidth:2},labels:I}},w),legend:{colorScale:k,gutter:10,orientation:"vertical",titleOrientation:"top",style:{data:{type:"circle"},labels:I,title:f({},I,{padding:5})}},line:f({style:{data:{fill:"transparent",opacity:1,stroke:"#3F3F3F",strokeWidth:2},labels:I}},w),pie:f({colorScale:k,style:{data:{padding:8,stroke:"#DFDFDF",strokeWidth:1},labels:f({},I,{padding:20})}},w),scatter:f({style:{data:{fill:"#3F3F3F",opacity:1,stroke:"transparent",strokeWidth:0},labels:I}},w),stack:f({colorScale:k},w),tooltip:{style:f({},I,{padding:0,pointerEvents:"none"}),flyoutStyle:{stroke:"pink",strokeWidth:1,fill:"#f0f0f0",pointerEvents:"none"},flyoutPadding:5,cornerRadius:5,pointerLength:10},voronoi:f({style:{data:{fill:"transparent",stroke:"transparent",strokeWidth:0},labels:f({},I,{padding:5,pointerEvents:"none"}),flyout:{stroke:"pink",strokeWidth:1,fill:"#f0f0f0",pointerEvents:"none"}}},w)},F=u.default(o.StyledTooltip)(m||(m=h(["\n background: ",";\n border: 1px solid ",";\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);\n box-sizing: border-box;\n color: ",";\n font-size: ",";\n font-weight: normal;\n line-height: ",";\n margin: 0;\n padding: 8px;\n width: fit-content;\n div {\n margin-bottom: 8px;\n display: flex;\n align-items: flex-start;\n &:last-of-type {\n margin-bottom: 0;\n }\n }\n"])),function(e){return e.theme.colors.neutral100},function(e){return e.theme.colors.neutral300},function(e){return e.theme.colors.neutral},function(e){return e.theme.typeScale.size02.fontSize},function(e){return e.theme.typeScale.size02.lineHeight}),C=u.default.span(g||(g=h(["\n background: ",";\n border: ",";\n border-radius: 4px;\n height: 20px;\n width: 20px;\n margin-right: 8px;\n"])),function(e){return e.color},function(e){return e.color?"none":"3px solid black"}),P=function(e){var n=e.datum,t=e.index,r=e.showTooltip,a=e.x,s=e.y,l=d.useContext(o.ThemeContext);return r===t+"-"+n.index?i.jsx("g",{style:{pointerEvents:"none"},children:i.jsx("foreignObject",{x:a,y:s,width:"275",height:"100%",children:i.jsxs(F,{position:o.TooltipPosition.top,role:"tooltip",theme:l,children:[i.jsxs("div",{children:[i.jsx(C,{color:l.iterableColors[t]}),i.jsx("span",{children:n.label})]}),i.jsx(o.TooltipArrow,{theme:l})]})})}):null},L=function(e){var n=e.x,t=e.y,r=e.activePoints,a=e.hiddenData,s=Array.from(Array(e.dataLength-0),function(e,n){return n+0}).filter(function(e){return!a.includes(e)}),l=d.useContext(o.ThemeContext);return i.jsx("g",{style:{pointerEvents:"none"},children:i.jsx("foreignObject",{x:n,y:t,width:"275",height:"100%",children:i.jsxs(F,{"data-testid":"axis-tooltip",position:o.TooltipPosition.top,role:"tooltip",theme:l,children:[r.map(function(e,n){return i.jsxs("div",{children:[i.jsx(C,{color:l.iterableColors[s[n]]}),i.jsx("span",{children:e.label})]},n)}),i.jsx(o.TooltipArrow,{theme:l})]})})})},z=["datum","index","lineIndex","pointRefArray","registerPoint","unregisterPoint"],A=["lineIndex","pointRefArray","pointIndex","registerPoint","unregisterPoint"],E=function(e){var n=e.datum,t=e.index,o=e.lineIndex,a=e.pointRefArray,s=e.registerPoint,l=e.unregisterPoint,c=p(e,z);return i.jsx(r.Point,f({},c,{ariaLabel:n.label,pathComponent:i.jsx(T,{lineIndex:o,pointIndex:t,pointRefArray:a,registerPoint:s,unregisterPoint:l}),role:"button",tabIndex:0}))},T=function(e){var n=e.lineIndex,t=e.pointRefArray,r=e.pointIndex,a=e.registerPoint,s=e.unregisterPoint,l=p(e,A),c=o.useForceUpdate(),u=d.useRef(null);return d.useEffect(function(){return a(t,u),c(),function(){return s(t,u)}},[]),i.jsx("path",f({ref:u,"data-line-index":n,"data-point-index":r},l))},O=["events"],R=function(e){var n=e.events,t=p(e,O);return i.jsxs("g",{children:[i.jsx(r.LineSegment,f({},t,{events:n,style:{strokeWidth:"50px",stroke:"transparent"}})),i.jsx(r.LineSegment,f({},t,{events:n,style:{strokeWidth:"1px",stroke:"black",strokeOpacity:"0.2"}}))]})},D=["children","color","dataIndex","isHidden","onClick","name","focusCurrentLine","resetLineFocus"],W=d.forwardRef(function(e,n){var t=e.color,r=e.dataIndex,a=e.isHidden,s=e.onClick,l=e.name,c=e.focusCurrentLine,u=e.resetLineFocus,h=p(e,D);function m(){a||c&&"function"==typeof c&&c(r)}var g=d.useContext(o.ThemeContext);return i.jsx("div",{style:{display:"inline-flex"},onMouseEnter:m,onMouseLeave:u,children:i.jsx(o.Checkbox,f({checked:!a,color:t,containerStyle:{alignItems:"center",border:"0",boxShadow:"0 0 0",color:g.colors.neutral,display:"inline-flex",margin:"0 36px 20px 0",padding:"0"},inputStyle:{border:t?"none":"2px solid "+g.colors.neutral800,borderRadius:"4px"},labelText:l,onBlur:u,onClick:function(){s&&"function"==typeof s&&s(r),a||u&&"function"==typeof u&&u()},onFocus:m,ref:n,theme:g},h))})}),q=["axisLabel","tickLabels"],H=["style"],_=["axisLabel","tickLabels"],V=["style"],B=u.default.div(b||(b=h(["\n max-height: 600px;\n max-width: 800px;\n svg {\n overflow: visible;\n }\n"]))),M=u.default.div(v||(v=h([""]))),G=u.default.div(x||(x=h(["\n padding-bottom: 24px;\n"]))),$=u.default.p(y||(y=h(["\n color: ",";\n font-size: ",";\n"])),function(e){return e.theme.colors.neutral},function(e){return e.theme.typeScale.size02.fontSize});function K(e){var n=e.componentProps,t=void 0===n?{}:n,a=t.chart,s=void 0===a?{}:a,l=t.line,c=void 0===l?{}:l,u=t.scatter,h=void 0===u?{}:u,m=t.xAxis,g=void 0===m?{style:{}}:m,b=g.style,v=void 0===b?{}:b,x=v.axisLabel,y=void 0===x?void 0:x,k=v.tickLabels,w=void 0===k?void 0:k,I=p(v,q),S=p(g,H),F=t.yAxis,C=void 0===F?{style:{}}:F,z=C.style,A=void 0===z?{}:z,T=A.axisLabel,O=void 0===T?void 0:T,D=A.tickLabels,K=void 0===D?void 0:D,Y=p(A,_),N=p(C,V),U=e.data,X=void 0===U?[]:U,Z=e.lastFocusedScatterPoint,J=e.pointRefArray,Q=e.registerPoint,ee=e.unregisterPoint,ne=e.tabRef,te=e.x,re=e.y,oe=d.useContext(o.ThemeContext),ae=d.useContext(o.I18nContext),ie=d.useState([]),se=ie[0],le=ie[1],ce=d.useState(800),de=ce[0],ue=ce[1],fe=d.useState(null),pe=fe[0],he=fe[1],me=d.useState(null),ge=me[0],be=me[1],ve=d.useState(!0),xe=ve[0],ye=ve[1],ke=d.useState(!1),we=ke[0],Ie=ke[1],Se=d.useRef(null),je=d.useRef(null);d.useEffect(function(){return Le(),window.addEventListener("resize",Le),window.addEventListener("keydown",ze),function(){window.removeEventListener("resize",Le),window.removeEventListener("keydown",ze)}},[]),d.useEffect(function(){return window.addEventListener("mousemove",Ae),function(){window.removeEventListener("mousemove",Ae)}},[ge]);var Fe=X.map(function(e,n){return"scatter-"+n}),Ce=f({tickLabels:f({color:"#3f3f3f",fontSize:12},w),axisLabel:f({color:"#3f3f3f",padding:44,fontSize:14,fontWeight:"bold"},y)},I),Pe=f({tickLabels:f({fontSize:12},K),axisLabel:f({color:"#3f3f3f",padding:64,fontSize:14,fontWeight:"bold"},O)},Y);function Le(){Se.current&&ue(Se.current.clientWidth)}function ze(e){"Escape"===e.key&&(be(null),ye(!1))}function Ae(){!ge&&ye(!0)}function Ee(e){return null===pe||pe===e?1:.1}function Te(e){se.includes(e)?le(se.filter(function(n){return n!==e})):le(se.concat([e]))}function Oe(e){he(e)}function Re(){he(null)}var De=function(e,n){if(n.current){var t=parseInt(n.current.getAttribute("data-line-index"),10);!e.includes(t)&&e.push(parseInt(n.current.getAttribute("data-line-index"),10))}return e},We=function(e){var n=parseInt(e.current.getAttribute("data-line-index"),10),t=parseInt(e.current.getAttribute("data-point-index"),10),r=J.current.reduce(De,[]);return{currentLineIndex:n,currentPointIndex:t,lineIndexes:r,lowestLineIndex:r[0],highestLineIndex:r[r.length-1]}},qe=function(e,n){return function(t){return t.current&&parseInt(t.current.getAttribute("data-line-index"),10)===e&&parseInt(t.current.getAttribute("data-point-index"),10)===n}};function He(e){"Tab"===e.key&&e.shiftKey&&Z&&Z.current&&J.current.find(function(e){return e.current===Z.current})&&(e.preventDefault(),Z.current.focus())}return i.jsxs(B,{ref:Se,children:[i.jsx(M,{onKeyDown:function(e){var n=e.shiftKey;switch(e.key){case"Tab":e.preventDefault(),Z.current=J.current.find(function(e){return e.current===document.activeElement}).current,n?ne.current&&ne.current.focus():je.current&&je.current.focus();break;case"ArrowRight":var t,r=J.current.findIndex(function(e){return e.current===document.activeElement});void 0!==r&&(r===J.current.length-1?null==(t=J.current[0])||null==(t=t.current)||t.focus():J.current[r+1].current.focus());break;case"ArrowLeft":var o=J.current.findIndex(function(e){return e.current===document.activeElement});void 0!==o&&(0===o?J.current[J.current.length-1].current.focus():J.current[o-1].current.focus());break;case"ArrowUp":e.preventDefault();var a=J.current.find(function(e){return e.current===document.activeElement});if(a&&a.current){var i=We(a),s=i.currentLineIndex,l=i.currentPointIndex,c=i.lineIndexes;if(s===i.lowestLineIndex)J.current.find(qe(i.highestLineIndex,l)).current.focus();else{var d=c[c.indexOf(s)-1];J.current.find(qe(d,l)).current.focus()}}break;case"ArrowDown":e.preventDefault();var u=J.current.find(function(e){return e.current===document.activeElement});if(u&&u.current){var f=We(u),p=f.currentLineIndex,h=f.currentPointIndex,m=f.lineIndexes;if(p===f.highestLineIndex)J.current.find(qe(f.lowestLineIndex,h)).current.focus();else{var g=m[m.indexOf(p)+1];J.current.find(qe(g,h)).current.focus()}}}},children:i.jsxs(r.VictoryChart,f({domainPadding:32,height:400,padding:{top:0,left:80,right:0,bottom:62},theme:j,width:de,containerComponent:i.jsx(r.VictoryVoronoiContainer,{name:"xAxisGroupLabel",voronoiBlacklist:Fe,voronoiDimension:"x",labels:we&&xe?function(){return" "}:void 0,labelComponent:xe?i.jsx(r.VictoryTooltip,{flyoutComponent:i.jsx(L,{dataLength:X.length,hiddenData:se})}):void 0,role:"presentation",voronoiPadding:32})},s,{children:[i.jsx(r.VictoryAxis,f({},N,{dependentAxis:!0,style:Pe})),X.map(function(e,n){var t=e.data;return!se.includes(n)&&i.jsx(r.VictoryLine,f({style:{data:{opacity:Ee(n),stroke:oe.iterableColors[n],strokeWidth:"3"},parent:{border:oe.colors.neutral400}},data:t,labelComponent:i.jsx(i.Fragment,{}),x:te,y:re},c),"line"+n)}),i.jsx(r.VictoryAxis,f({},S,{style:Ce,gridComponent:i.jsx(R,{events:{onMouseEnter:function(){return Ie(!0)},onMouseLeave:function(){return Ie(!1)}}})})),X.map(function(e,n){var t=e.data;return!se.includes(n)&&i.jsx(r.VictoryScatter,f({name:"scatter-"+n,events:[{target:"data",eventHandlers:{onBlur:function(){return ye(!0),be(null),[{target:"labels",mutation:function(){return{active:void 0}}}]},onClick:function(){return[{target:"labels",mutation:function(e){return be(e.datum.lineIndex+"-"+e.datum.index),{active:!0}}}]},onFocus:function(){return ye(!1),[{target:"labels",mutation:function(e){return be(e.datum.lineIndex+"-"+e.datum.index),{active:!0}}}]},onMouseEnter:function(){return ye(!1),[{target:"labels",mutation:function(e){return be(e.datum.lineIndex+"-"+e.datum.index),{active:!0}}}]},onMouseLeave:function(){be(null),ye(!0)}}}],style:{data:{fill:oe.colors.neutral100,opacity:Ee(n),stroke:oe.iterableColors[n],strokeWidth:2}},size:5,data:t.map(function(e,t){return f({index:t,lineIndex:n},e)}),dataComponent:i.jsx(E,{lineIndex:n,pointRefArray:J,registerPoint:Q,unregisterPoint:ee}),labels:function(){return""},labelComponent:i.jsx(r.VictoryTooltip,{text:"",flyoutComponent:i.jsx(P,{index:n,showTooltip:ge})}),x:te,y:re},h),"scatter"+n)})]}))}),i.jsxs(G,{children:[i.jsx($,{theme:oe,children:ae.charts.line.dataLegendsLabel}),X.map(function(e,n){var t=e.name,r=ae.charts.line.legendButtonAriaLabel.replace(/\{name\}/g,t);return i.jsx(W,{"aria-label":r,color:oe.iterableColors[n],dataIndex:n,isHidden:se.includes(n),name:t,onClick:Te,onKeyDown:0===n?He:void 0,focusCurrentLine:Oe,ref:0===n?je:void 0,resetLineFocus:Re},n)})]})]})}function Y(e){return e.toLowerCase().replace(/[^a-z 0-9]/gi,"").replace(/(?:^\w|[A-Z]|\b\w)/g,function(e,n){return 0===n?e.toLowerCase():e.toUpperCase()}).replace(/\s+/g,"")}var N,U,X,Z,J,Q,ee=function(e){var n=e.data,t=void 0===n?[]:n,r=e.xData,a=r.keyValue,s=r.label,l=r.tickFormat,c=r.tickValues,u=e.yData,p=u.keyValue,h=u.tickFormat,m=d.useState({columns:[],rows:[]}),g=m[0],b=m[1];return d.useEffect(function(){var e,n,r;b((e=Y(a||s||"x"),n=t.reduce(function(e,n){return n.data.forEach(function(n){var t=n.x||a&&n[a];!e.includes(t)&&e.push(t)}),e},[]),r={columns:n.length>0?[{field:e,header:s||a||"X",isRowHeader:!0}]:[],rows:n.reduce(function(t,r,o){var a,i=c&&"number"==typeof r&&c.length===n.length?l&&"function"==typeof l?l(c[r-1]):c[r-1]:l&&Array.isArray(l)?l[r-1]:l&&"function"==typeof l?l(r):r;return t.push(((a={})[e]=i,a.id=o,a)),t},[])},t.reduce(function(e,n){var t=n.name,o=n.data,a=Y(t);return e.columns.push({field:a,header:t}),o.forEach(function(n,t){var o,i=n.y||0===n.y?n.y:p&&n[p];e.rows[t]=f({},e.rows[t],((o={id:r.rows.length>0?t+1:t})[a]=h&&"function"==typeof h?h(i):i,o))}),e},r)))},[t]),i.jsx(o.Card,{children:g.rows.length>0?i.jsx(o.Datagrid,{hasPagination:!1,columns:g.columns,rows:g.rows}):i.jsx(o.Spinner,{})})},ne=["description","title","testId","type"],te=o.styled.span(N||(N=h(["\n color: ",";\n font-size: ",";\n font-weight: 600;\n font-family: ",";\n line-height: ",";\n margin: 0 0 12px 0;\n"])),function(e){return e.theme.colors.neutral},function(e){return e.theme.typeScale.size04.fontSize},function(e){return e.theme.bodyFont},function(e){return e.theme.typeScale.size04.lineHeight}),re=o.styled(o.Paragraph)(U||(U=h(["\n font-size: ",";\n margin: 0 0 18px 0;\n"])),function(e){return e.theme.typeScale.size02.fontSize}),oe=o.styled(o.TabsContainer)(X||(X=h(["\n width: 800px;\n ul {\n box-shadow: inset 0 -1px 0 ",";\n }\n"])),function(e){return e.theme.colors.neutral300}),ae=o.styled(o.TabPanel)(Z||(Z=h(["\n padding: 22px 0;\n"]))),ie=o.styled(o.Card)(J||(J=h(["\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);\n display: ",";\n right: ",";\n max-height: ",";\n opacity: ",";\n outline: 0;\n overflow-y: auto;\n padding: ","\n ",";\n position: absolute;\n transition: opacity 0.3s;\n white-space: nowrap;\n z-index: 2;\n\n ","\n"])),function(e){return e.isOpen?"block":"none"},function(e){return e.theme.spaceScale.spacing02},function(e){return e.maxHeight?e.maxHeight:e.theme.dropdown.content.maxHeight},function(e){return e.isOpen?"1":"0"},function(e){return e.theme.spaceScale.spacing05},function(e){return e.theme.spaceScale.spacing05},function(e){return e.width&&n.css(Q||(Q=h(["\n white-space: normal;\n width: ",";\n "])),e.width)});function se(e,n){var r,a,s,l=e.description,c=e.title,u=e.type,h=p(e,ne),m=d.useRef(null),g=d.useRef(null),b=d.useContext(o.ThemeContext),v=d.useContext(o.I18nContext),x=o.useDescendants(),y=x[0],k=x[1],w=x[2],I=d.useState(!1),S=I[0],j=I[1];return i.jsxs("div",{ref:n,children:[i.jsx(te,{theme:b,children:c}),l&&i.jsx(re,{theme:b,visualStyle:o.TypographyVisualStyle.bodySmall,children:l}),i.jsxs(oe,{theme:b,children:[i.jsxs(o.Tabs,{children:[i.jsx(o.Tab,{children:v.charts.line.chartTabLabel}),i.jsx(o.Tab,{children:v.charts.line.dataTabLabel}),i.jsxs("div",{onBlur:function(){j(!1)},style:{display:"inline-block",marginLeft:"auto"},children:[i.jsx(o.Tooltip,{content:v.charts.line.keyboardInstructionsTooltip,ref:m,children:i.jsx(o.IconButton,{"aria-controls":"keyboardInstructions","aria-label":v.charts.line.keyboardInstructionsTooltip,"aria-expanded":Boolean(S),icon:i.jsx(t.KeyboardIcon,{}),onClick:function(){j(function(e){return!e})},onKeyDown:function(e){var n=e.shiftKey;switch(e.key){case"Escape":j(!1);break;case"Tab":!n&&g&&g.current&&y.current.find(function(e){return e.current===g.current})&&(e.preventDefault(),g.current.focus())}},variant:o.ButtonVariant.link})}),i.jsx(o.Announce,{children:i.jsxs(ie,{id:"keyboardInstructions",isOpen:S,theme:b,width:"350px",children:[i.jsx(o.Paragraph,{visualStyle:o.TypographyVisualStyle.headingXSmall,style:{margin:"0 0 16px"},children:v.charts.line.keyboardInstructionsHeader}),v.charts.line.keyboardInstructions]})})]})]}),i.jsxs(o.TabPanelsContainer,{children:[i.jsx(ae,{theme:b,children:"line"===u&&i.jsx(K,f({},h,{lastFocusedScatterPoint:g,pointRefArray:y,registerPoint:k,tabRef:m,unregisterPoint:w}))}),i.jsx(ae,{theme:b,children:i.jsx(ee,{data:h.data,xData:{keyValue:h.x,label:null==(r=h.componentProps)||null==(r=r.xAxis)?void 0:r.label,tickFormat:null==(a=h.componentProps)||null==(a=a.xAxis)?void 0:a.tickFormat},yData:{keyValue:h.y,tickFormat:null==(s=h.componentProps)||null==(s=s.yAxis)?void 0:s.tickFormat}})})]})]})]})}var le=d.forwardRef(se);function ce(){return ce=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},ce.apply(this,arguments)}function de(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ue(e,n){return ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},ue(e,n)}function fe(e){return fe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},fe(e)}function pe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(pe=function(){return!!e})()}function he(e,n,t){if(pe())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,n);var o=new(e.bind.apply(e,r));return t&&ue(o,t.prototype),o}function me(e){var n="function"==typeof Map?new Map:void 0;return me=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(n){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return he(e,arguments,fe(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),ue(t,e)},me(e)}var ge={1:"Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }).\n\n",2:"Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }).\n\n",3:"Passed an incorrect argument to a color function, please pass a string representation of a color.\n\n",4:"Couldn't generate valid rgb string from %s, it returned %s.\n\n",5:"Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.\n\n",6:"Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, blue: 100 }).\n\n",7:"Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green: 205, blue: 100, alpha: 0.75 }).\n\n",8:"Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.\n\n",9:"Please provide a number of steps to the modularScale helper.\n\n",10:"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\n\n",11:'Invalid value passed as base to modularScale, expected number or em string but got "%s"\n\n',12:'Expected a string ending in "px" or a number passed as the first argument to %s(), got "%s" instead.\n\n',13:'Expected a string ending in "px" or a number passed as the second argument to %s(), got "%s" instead.\n\n',14:'Passed invalid pixel value ("%s") to %s(), please pass a value like "12px" or 12.\n\n',15:'Passed invalid base value ("%s") to %s(), please pass a value like "12px" or 12.\n\n',16:"You must provide a template to this method.\n\n",17:"You passed an unsupported selector state to this method.\n\n",18:"minScreen and maxScreen must be provided as stringified numbers with the same units.\n\n",19:"fromSize and toSize must be provided as stringified numbers with the same units.\n\n",20:"expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\n\n",21:"expects the objects in the first argument array to have the properties `prop`, `fromSize`, and `toSize`.\n\n",22:"expects the first argument object to have the properties `prop`, `fromSize`, and `toSize`.\n\n",23:"fontFace expects a name of a font-family.\n\n",24:"fontFace expects either the path to the font file(s) or a name of a local copy.\n\n",25:"fontFace expects localFonts to be an array.\n\n",26:"fontFace expects fileFormats to be an array.\n\n",27:"radialGradient requries at least 2 color-stops to properly render.\n\n",28:"Please supply a filename to retinaImage() as the first argument.\n\n",29:"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\n\n",30:"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",31:"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation\n\n",32:"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s')\n\n",33:"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation\n\n",34:"borderRadius expects a radius value as a string or number as the second argument.\n\n",35:'borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.\n\n',36:"Property must be a string value.\n\n",37:"Syntax Error at %s.\n\n",38:"Formula contains a function that needs parentheses at %s.\n\n",39:"Formula is missing closing parenthesis at %s.\n\n",40:"Formula has too many closing parentheses at %s.\n\n",41:"All values in a formula must have the same unit or be unitless.\n\n",42:"Please provide a number of steps to the modularScale helper.\n\n",43:"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\n\n",44:"Invalid value passed as base to modularScale, expected number or em/rem string but got %s.\n\n",45:"Passed invalid argument to hslToColorString, please pass a HslColor or HslaColor object.\n\n",46:"Passed invalid argument to rgbToColorString, please pass a RgbColor or RgbaColor object.\n\n",47:"minScreen and maxScreen must be provided as stringified numbers with the same units.\n\n",48:"fromSize and toSize must be provided as stringified numbers with the same units.\n\n",49:"Expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\n\n",50:"Expects the objects in the first argument array to have the properties prop, fromSize, and toSize.\n\n",51:"Expects the first argument object to have the properties prop, fromSize, and toSize.\n\n",52:"fontFace expects either the path to the font file(s) or a name of a local copy.\n\n",53:"fontFace expects localFonts to be an array.\n\n",54:"fontFace expects fileFormats to be an array.\n\n",55:"fontFace expects a name of a font-family.\n\n",56:"linearGradient requries at least 2 color-stops to properly render.\n\n",57:"radialGradient requries at least 2 color-stops to properly render.\n\n",58:"Please supply a filename to retinaImage() as the first argument.\n\n",59:"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\n\n",60:"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",61:"Property must be a string value.\n\n",62:"borderRadius expects a radius value as a string or number as the second argument.\n\n",63:'borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.\n\n',64:"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation.\n\n",65:"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s').\n\n",66:"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation.\n\n",67:"You must provide a template to this method.\n\n",68:"You passed an unsupported selector state to this method.\n\n",69:'Expected a string ending in "px" or a number passed as the first argument to %s(), got %s instead.\n\n',70:'Expected a string ending in "px" or a number passed as the second argument to %s(), got %s instead.\n\n',71:'Passed invalid pixel value %s to %s(), please pass a value like "12px" or 12.\n\n',72:'Passed invalid base value %s to %s(), please pass a value like "12px" or 12.\n\n',73:"Please provide a valid CSS variable.\n\n",74:"CSS variable not found.\n\n",75:"fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen.\n"};function be(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];var r,o=n[0],a=[];for(r=1;r<n.length;r+=1)a.push(n[r]);return a.forEach(function(e){o=o.replace(/%[a-z]/,e)}),o}var ve=function(e){var n,t;function r(n){var t;if("production"===process.env.NODE_ENV)t=e.call(this,"An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#"+n+" for more information.")||this;else{for(var r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];t=e.call(this,be.apply(void 0,[ge[n]].concat(o)))||this}return de(t)}return t=e,(n=r).prototype=Object.create(t.prototype),n.prototype.constructor=n,ue(n,t),r}(me(Error));function xe(e){return Math.round(255*e)}function ye(e,n,t){return xe(e)+","+xe(n)+","+xe(t)}function ke(e,n,t,r){if(void 0===r&&(r=ye),0===n)return r(t,t,t);var o=(e%360+360)%360/60,a=(1-Math.abs(2*t-1))*n,i=a*(1-Math.abs(o%2-1)),s=0,l=0,c=0;o>=0&&o<1?(s=a,l=i):o>=1&&o<2?(s=i,l=a):o>=2&&o<3?(l=a,c=i):o>=3&&o<4?(l=i,c=a):o>=4&&o<5?(s=i,c=a):o>=5&&o<6&&(s=a,c=i);var d=t-a/2;return r(s+d,l+d,c+d)}var we={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Ie=/^#[a-fA-F0-9]{6}$/,Se=/^#[a-fA-F0-9]{8}$/,je=/^#[a-fA-F0-9]{3}$/,Fe=/^#[a-fA-F0-9]{4}$/,Ce=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i,Pe=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i,Le=/^hsl\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,ze=/^hsla\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i,Ae=function(e){return 7===e.length&&e[1]===e[2]&&e[3]===e[4]&&e[5]===e[6]?"#"+e[1]+e[3]+e[5]:e};function Ee(e){var n=e.toString(16);return 1===n.length?"0"+n:n}function Te(e,n,t){return function(){var r=t.concat(Array.prototype.slice.call(arguments));return r.length>=n?e.apply(this,r):Te(e,n,r)}}function Oe(e){return Te(e,e.length,[])}function Re(e,n){if("transparent"===n)return n;var t,r=function(e){if("string"!=typeof e)throw new ve(3);var n=function(e){if("string"!=typeof e)return e;var n=e.toLowerCase();return we[n]?"#"+we[n]:e}(e);if(n.match(Ie))return{red:parseInt(""+n[1]+n[2],16),green:parseInt(""+n[3]+n[4],16),blue:parseInt(""+n[5]+n[6],16)};if(n.match(Se)){var t=parseFloat((parseInt(""+n[7]+n[8],16)/255).toFixed(2));return{red:parseInt(""+n[1]+n[2],16),green:parseInt(""+n[3]+n[4],16),blue:parseInt(""+n[5]+n[6],16),alpha:t}}if(n.match(je))return{red:parseInt(""+n[1]+n[1],16),green:parseInt(""+n[2]+n[2],16),blue:parseInt(""+n[3]+n[3],16)};if(n.match(Fe)){var r=parseFloat((parseInt(""+n[4]+n[4],16)/255).toFixed(2));return{red:parseInt(""+n[1]+n[1],16),green:parseInt(""+n[2]+n[2],16),blue:parseInt(""+n[3]+n[3],16),alpha:r}}var o=Ce.exec(n);if(o)return{red:parseInt(""+o[1],10),green:parseInt(""+o[2],10),blue:parseInt(""+o[3],10)};var a=Pe.exec(n.substring(0,50));if(a)return{red:parseInt(""+a[1],10),green:parseInt(""+a[2],10),blue:parseInt(""+a[3],10),alpha:parseFloat(""+a[4])};var i=Le.exec(n);if(i){var s="rgb("+ke(parseInt(""+i[1],10),parseInt(""+i[2],10)/100,parseInt(""+i[3],10)/100)+")",l=Ce.exec(s);if(!l)throw new ve(4,n,s);return{red:parseInt(""+l[1],10),green:parseInt(""+l[2],10),blue:parseInt(""+l[3],10)}}var c=ze.exec(n.substring(0,50));if(c){var d="rgb("+ke(parseInt(""+c[1],10),parseInt(""+c[2],10)/100,parseInt(""+c[3],10)/100)+")",u=Ce.exec(d);if(!u)throw new ve(4,n,d);return{red:parseInt(""+u[1],10),green:parseInt(""+u[2],10),blue:parseInt(""+u[3],10),alpha:parseFloat(""+c[4])}}throw new ve(5)}(n);return function(e,n,t,r){if("object"==typeof e)return e.alpha>=1?function(e,n,t){if("number"==typeof e&&"number"==typeof n&&"number"==typeof t)return Ae("#"+Ee(e)+Ee(n)+Ee(t));if("object"==typeof e&&void 0===n&&void 0===t)return Ae("#"+Ee(e.red)+Ee(e.green)+Ee(e.blue));throw new ve(6)}(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")";throw new ve(7)}(ce({},r,{alpha:(t=+(100*("number"==typeof r.alpha?r.alpha:1)-100*parseFloat(e)).toFixed(2)/100,Math.max(0,Math.min(1,t)))}))}var De,We,qe=Oe(Re),He=["children","testId","isInverse","type","dataSet","options"];exports.CarbonChartType=void 0,(We=exports.CarbonChartType||(exports.CarbonChartType={})).area="area",We.areaStacked="areaStacked",We.bar="bar",We.barGrouped="barGrouped",We.barStacked="barStacked",We.donut="donut",We.line="line",We.pie="pie",We.lollipop="lollipop";var _e,Ve=u.default.div(De||(De=h(["\n .cds--data-table thead tr th {\n background: "," !important;\n }\n .cds--data-table td,\n .cds--data-table tbody th {\n color: ",";\n }\n .cds--data-table tbody tr,\n .cds--data-table tbody tr td,\n .cds--data-table tbody tr th {\n color: ",";\n }\n .cds--data-table tr {\n block-size: 2.5rem;\n }\n\n .cds--cc--tooltip .content-box .datapoint-tooltip p {\n font-size: ",";\n padding: ",";\n color: ",";\n max-width:142px;\n white-space: normal;\n }\n\n .cds--modal-container {\n clip-path: inset(0% 0% 0% 0% round ",");\n background: ",";\n .cds--data-table th {\n background: ",";\n }\n .cds--data-table td {\n border-top: 1px solid\n ",";\n border-bottom: 1px solid\n ",";\n background: ",";\n }\n .cds--data-table tr:hover td {\n background: ",";\n }\n }\n\n p,\n div,\n text,\n .cds--cc--axes g.axis .axis-title,\n .cds--cc--title p.title,\n .cds--cc--axes g.axis g.tick text {\n font-family: "," !important;\n color: ",";\n }\n\n .cds--cc--axes {\n overflow: visible;\n }\n\n div.cds--cc--legend {\n div.legend-item {\n div.checkbox {\n background: ",";\n border: none;\n width: ",";\n height: ",";\n svg {\n left: 2px;\n position: relative;\n }\n }\n p {\n font-size: ",";\n margin: 0 "," 0 0;\n }\n }\n }\n div.cds--cc--legend.has-deactivated-items {\n div.legend-item {\n div.checkbox {\n border: 1px solid\n ",";\n }\n div.checkbox.active {\n border: 1px solid transparent;\n }\n }\n }\n .chart-holder {\n .cds--cc--axes g.axis g.tick text {\n fill: ",";\n }\n .cds--cc--axes g.axis path.domain {\n stroke: ",";\n }\n .cds--cc--grid g.x.grid g.tick line,\n .cds--cc--grid g.y.grid g.tick line {\n stroke: ",";\n }\n .cds--cc--grid rect.chart-grid-backdrop.stroked{\n stroke: ","\n }\n .cds--cc--skeleton .shimmer-effect-lines {\n filter: ",";\n }\n /* .chart-holder.cds--chart-holder.filled,\n .cds--cc--skeleton rect.chart-skeleton-backdrop,\n .cds--cc--grid rect.chart-grid-backdrop {\n } */\n \n .cds--cc--grid rect.chart-grid-backdrop{\n fill:transparent;\n }\n .cds--cc--scatter circle.dot.hovered {\n padding: 10px;\n }\n .cds--cc--scatter-stacked circle.dot.hovered,\n .cds--cc--scatter-stacked circle.dot.unfilled,\n .cds--cc--scatter circle.dot.unfilled{\n stroke-width: 6px;\n transition: 0.1s all linear;\n \n }\n .cds--cc--scatter circle.dot.hovered {\n stroke-width: 0.5em;\n transition: 0.1s all linear;\n filter: \n drop-shadow( 1px 0px 0px ",") \n drop-shadow(-1px 0px 0px ",")\n drop-shadow( 0px 1px 0px ",") \n drop-shadow( 0px -1px 0px ",");\n }\n .cds--cc--lollipop circle.dot.filled,\n .cds--cc--lollipop circle.dot.hovered {\n stroke-width: 15px;\n }\n .cds--cc--scatter-stacked circle.dot.hovered,\n .cds--cc--scatter-stacked circle.dot.unfilled,\n .cds--cc--scatter circle.dot.unfilled,\n .cds--cc--lollipop circle.dot.filled,\n .cds--cc--lollipop circle.dot.hovered{\n transition: 0.1s all linear;\n filter: \n drop-shadow( 1px 0px 0px ",")\n drop-shadow(-1px 0px 0px ",")\n drop-shadow( 0px 1px 0px ",")\n drop-shadow( 0px -1px 0px ",");\n }\n .cds--cc--lollipop .cds--cc--scatter circle.dot.hovered{\n transition: 0.1s all linear;\n stroke-width: 1.1em;\n }\n\n .cds--overflow-menu-options__btn:focus {\n outline-color: ",";\n }\n\n .cds--btn {\n min-height: auto;\n display: flex;\n flex: 0 auto;\n align-items: center;\n text-align: center;\n padding: 20px;\n margin: 0;\n line-height: ",";\n margin: 0;\n min-width: ",";\n overflow: hidden;\n padding: ;\n position: relative;\n right: ",";\n text-align: center;\n height: 40px;\n font-family: ",";\n font-size: ",";\n border-radius: ",";\n font-weight: 500;\n }\n\n .cds--btn--primary {\n background: ",";\n color: ",";\n }\n\n *:focus {\n outline: 2px solid\n "," !important;\n outline-offset: 0;\n }\n .cds--overflow-menu-options__btn:focus,\n .cds--overflow-menu:focus,\n .cds--overflow-menu__trigger:focus,\n .toolbar-control:focus {\n outline: 2px solid\n "," !important;\n }\n div.cds--cc--legend.clickable\n div.legend-item:not(.additional):focus\n div.checkbox,\n div.cds--cc--legend.clickable\n div.legend-item:not(.additional):hover\n div.checkbox {\n border: ",";\n }\n div.cds--cc--legend.clickable\n div.legend-item:not(.additional):hover\n div.checkbox {\n box-shadow: 0 0 0 2px\n "," !important;\n }\n\n .cds--btn--primary {\n &:focus {\n outline: 2px solid\n ",";\n }\n outline-offset: 2px;\n border: none;\n box-shadow: none;\n }\n .cds--modal-header {\n background: ",";\n margin-bottom: 0;\n border-bottom: 1px solid\n ",";\n }\n .cds--modal-header__heading {\n font-weight: 600;\n }\n\n .cds--modal-close {\n position: absolute;\n top: 0;\n right: 0;\n &:focus {\n outline: 2px solid\n ",";\n border-color: none;\n }\n outline-offset: 0;\n border: none;\n }\n }\n\n .cds--modal-footer.cds--modal-footer {\n display: flex;\n align-items: center;\n border-top: 1px solid\n ",";\n background: "," !important;\n }\n .layout-child.header {\n height: auto !important;\n p {\n text-overflow: inherit;\n overflow: auto;\n white-space: normal;\n }\n }\n\n svg:not(:root) {\n overflow: visible;\n }\n\n .cds--cc--chart-wrapper text {\n font-size: ",";\n }\n\n g.center text,\n .pie-label{\n fill: "," ;\n }\n\n // Zoom responsive tweaks\n\n @media screen and (max-width: 760px) {\n .cds--modal-container {\n overflow-y: auto;\n }\n .cds--chart-holder .cds--modal .cds--modal-container .cds--modal-content {\n overflow: visible;\n }\n .cds--chart-holder\n .cds--modal\n .cds--modal-container\n .cds--modal-content\n table\n th {\n position: relative;\n }\n }\n"])),function(e){return e.isInverse?e.theme.colors.primary700:""},function(e){return e.theme.colors.neutral700},function(e){return e.isInverse?e.theme.colors.neutral100:""},function(e){return e.theme.typeScale.size02.fontSize},function(e){return e.theme.spaceScale.spacing02},function(e){return e.isInverse?e.theme.colors.neutral100:e.theme.colors.neutral700},function(e){return e.theme.borderRadius},function(e){return e.isInverse?e.theme.colors.primary700:""},function(e){return e.isInverse?e.theme.colors.primary600:""},function(e){return e.isInverse?qe(.8,e.theme.colors.neutral100):"inherit"},function(e){return e.isInverse?qe(.8,e.theme.colors.neutral100):"inherit"},function(e){return e.isInverse?"#202565":""},function(e){return e.isInverse?e.theme.colors.primary600:""},function(e){return e.theme.bodyFont},function(e){return e.isInverse?e.theme.colors.neutral100:e.theme.colors.neutral700},function(e){return e.isInverse?e.theme.colors.neutral900:e.theme.colors.neutral100},function(e){return e.theme.spaceScale.spacing05},function(e){return e.theme.spaceScale.spacing05},function(e){return e.theme.typeScale.size03.fontSize},function(e){return e.theme.spaceScale.spacing03},function(e){return e.isInverse?e.theme.colors.neutral100:e.theme.colors.neutral900},function(e){return e.isInverse?e.theme.colors.neutral100:""},function(e){return e.isInverse?e.theme.colors.neutral100:""},function(e){return e.isInverse?qe(.5,e.theme.colors.neutral100):""},function(e){return e.isInverse?e.theme.colors.neutral100:""},function(e){return e.isInverse?"invert(1)":""},function(e){return e.isInverse?e.theme.colors.primary600:e.theme.colors.neutral100},function(e){return e.isInverse?e.theme.colors.primary600:e.theme.colors.neutral100},function(e){return e.isInverse?e.theme.colors.primary600:e.theme.colors.neutral100},function(e){return e.isInverse?e.theme.colors.primary600:e.theme.colors.neutral100},function(e){return e.isInverse?e.theme.colors.primary600:e.theme.colors.neutral100},function(e){return e.isInverse?e.theme.colors.primary600:e.theme.colors.neutral100},function(e){return e.isInverse?e.theme.colors.primary600:e.theme.colors.neutral100},function(e){return e.isInverse?e.theme.colors.primary600:e.theme.colors.neutral100},function(e){return e.isInverse?e.theme.colors.focusInverse:""},function(e){return e.theme.typeScale.size03.lineHeight},function(e){return e.theme.spaceScale.spacing13},function(e){return e.theme.spaceScale.spacing04},function(e){return e.theme.bodyFont},function(e){return e.theme.typeScale.size03.fontSize},function(e){return e.theme.borderRadius},function(e){return e.isInverse?e.theme.colors.tertiary500:e.theme.colors.primary},function(e){return e.isInverse?e.theme.colors.neutral900:""},function(e){return e.isInverse?e.theme.colors.focusInverse:e.theme.colors.focus},function(e){return e.isInverse?e.theme.colors.focusInverse:e.theme.colors.focus},function(e){return e.isInverse?"1px solid "+e.theme.colors.focusInverse:""},function(e){return e.isInverse?e.theme.colors.focusInverse:e.theme.colors.focus},function(e){return e.isInverse?e.theme.colors.focusInverse:e.theme.colors.focus},function(e){return e.isInverse?e.theme.colors.primary600:e.theme.colors.neutral100},function(e){return e.isInverse?qe(.8,e.theme.colors.neutral100):e.theme.colors.neutral300},function(e){return e.isInverse?e.theme.colors.focusInverse:e.theme.colors.focus},function(e){return e.isInverse?qe(.8,e.theme.colors.neutral100):e.theme.colors.neutral300},function(e){return e.isInverse?e.theme.colors.primary600:e.theme.colors.neutral100},function(e){return e.theme.typeScale.size02.fontSize},function(e){return e.isInverse?e.theme.colors.neutral100:""});!function(e){e.WHITE="white",e.G100="g100",e.G90="g90",e.G10="g10"}(_e||(_e={})),exports.CarbonChart=d.forwardRef(function(e,n){var t,r,a,l=e.testId,c=e.isInverse,u=e.type,h=e.dataSet,m=e.options,g=p(e,He),b=d.useContext(o.ThemeContext),v=o.useIsInverse(c),x={area:s.AreaChart,areaStacked:s.StackedAreaChart,bar:s.SimpleBarChart,barGrouped:s.GroupedBarChart,barStacked:s.StackedBarChart,donut:s.DonutChart,line:s.LineChart,lollipop:s.LollipopChart,pie:s.PieChart},y=f({},m,{theme:v?_e.G100:_e.WHITE,color:{scale:(t={},r=h.map(function(e){return"group"in e?e.group:null}),a=r.filter(function(e,n){return r.indexOf(e)===n}),a.forEach(function(e,n){return a.length<=b.chartColors.length?t[e||"null"]=v?b.chartColorsInverse[n]:b.chartColors[n]:{}}),t)},tooltip:{truncation:{type:"none"}}}),k=x[u];return d.useEffect(function(){document.querySelectorAll(".graph-frame ").forEach(function(e){e.setAttribute("aria-label","Interactive chart")})}),i.jsx(Ve,f({"data-testid":l,ref:n,isInverse:v,theme:b,className:"carbon-chart-wrapper"},g,{children:i.jsx(k,{data:h,options:y})}))}),exports.Chart=le;
|
|
1
|
+
var e=require("react"),n=require("@emotion/react"),t=require("react-magma-icons"),r=require("victory"),o=require("react-magma-dom"),a=require("@emotion/styled"),i=require("react/jsx-runtime"),s=require("@carbon/charts-react");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function c(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach(function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}}),n.default=e,n}var d=c(e),u=l(a);function f(){return f=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},f.apply(this,arguments)}function p(e,n){if(null==e)return{};var t={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(n.indexOf(r)>=0)continue;t[r]=e[r]}return t}function h(e,n){return n||(n=e.slice(0)),e.raw=n,e}var m,b,g,x,v,y,k=["#00507A","#8F0033","#B84900","#255200","#711E6E","#005249"],w={width:350,height:350,padding:50},I={fontFamily:'"Work Sans",Helvetica,sans-serif',fontSize:12,letterSpacing:"normal",padding:8,fill:"#3F3F3F",stroke:"transparent",strokeWidth:0},S=f({textAnchor:"middle"},I),j={area:f({style:{data:{fill:"pink"},labels:I}},w),axis:f({style:{axis:{fill:"transparent",stroke:"#8F8F8F",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"},axisLabel:f({},S,{padding:8,stroke:"transparent"}),grid:{fill:"none",stroke:"#dfdfdf",strokeLinecap:"round",strokeLinejoin:"round",pointerEvents:"painted"},ticks:{fill:"transparent",size:0,stroke:"#8F8F8F",strokeWidth:0,strokeLinecap:"round",strokeLinejoin:"round"},tickLabels:f({},I,{fill:"#3F3F3F"})}},w),polarDependentAxis:{style:{ticks:{fill:"transparent",size:1,stroke:"transparent"}}},bar:f({style:{data:{fill:"#3F3F3F",padding:8,strokeWidth:0},labels:I}},w),boxplot:f({style:{max:{padding:8,stroke:"#3F3F3F",strokeWidth:1},maxLabels:f({},I,{padding:3}),median:{padding:8,stroke:"#3F3F3F",strokeWidth:1},medianLabels:f({},I,{padding:3}),min:{padding:8,stroke:"#3F3F3F",strokeWidth:1},minLabels:f({},I,{padding:3}),q1:{padding:8,fill:"#3F3F3F"},q1Labels:f({},I,{padding:3}),q3:{padding:8,fill:"#3F3F3F"},q3Labels:f({},I,{padding:3})},boxWidth:20},w),candlestick:f({style:{data:{stroke:"#3F3F3F"},labels:f({},I,{padding:5})},candleColors:{positive:"#ffffff",negative:"#3F3F3F"}},w),chart:w,errorbar:f({borderWidth:8,style:{data:{fill:"transparent",opacity:1,stroke:"#3F3F3F",strokeWidth:2},labels:I}},w),group:f({colorScale:k},w),histogram:f({style:{data:{fill:"#3F3F3F",stroke:"pink",strokeWidth:2},labels:I}},w),legend:{colorScale:k,gutter:10,orientation:"vertical",titleOrientation:"top",style:{data:{type:"circle"},labels:I,title:f({},I,{padding:5})}},line:f({style:{data:{fill:"transparent",opacity:1,stroke:"#3F3F3F",strokeWidth:2},labels:I}},w),pie:f({colorScale:k,style:{data:{padding:8,stroke:"#DFDFDF",strokeWidth:1},labels:f({},I,{padding:20})}},w),scatter:f({style:{data:{fill:"#3F3F3F",opacity:1,stroke:"transparent",strokeWidth:0},labels:I}},w),stack:f({colorScale:k},w),tooltip:{style:f({},I,{padding:0,pointerEvents:"none"}),flyoutStyle:{stroke:"pink",strokeWidth:1,fill:"#f0f0f0",pointerEvents:"none"},flyoutPadding:5,cornerRadius:5,pointerLength:10},voronoi:f({style:{data:{fill:"transparent",stroke:"transparent",strokeWidth:0},labels:f({},I,{padding:5,pointerEvents:"none"}),flyout:{stroke:"pink",strokeWidth:1,fill:"#f0f0f0",pointerEvents:"none"}}},w)},F=u.default(o.StyledTooltip)(m||(m=h(["\n background: ",";\n border: 1px solid ",";\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);\n box-sizing: border-box;\n color: ",";\n font-size: ",";\n font-weight: normal;\n line-height: ",";\n margin: 0;\n padding: 8px;\n width: fit-content;\n div {\n margin-bottom: 8px;\n display: flex;\n align-items: flex-start;\n &:last-of-type {\n margin-bottom: 0;\n }\n }\n"])),function(e){return e.theme.colors.neutral100},function(e){return e.theme.colors.neutral300},function(e){return e.theme.colors.neutral},function(e){return e.theme.typeScale.size02.fontSize},function(e){return e.theme.typeScale.size02.lineHeight}),C=u.default.span(b||(b=h(["\n background: ",";\n border: ",";\n border-radius: 4px;\n height: 20px;\n width: 20px;\n margin-right: 8px;\n"])),function(e){return e.color},function(e){return e.color?"none":"3px solid black"}),P=function(e){var n=e.datum,t=e.index,r=e.showTooltip,a=e.x,s=e.y,l=d.useContext(o.ThemeContext);return r===t+"-"+n.index?i.jsx("g",{style:{pointerEvents:"none"},children:i.jsx("foreignObject",{x:a,y:s,width:"275",height:"100%",children:i.jsxs(F,{position:o.TooltipPosition.top,role:"tooltip",theme:l,children:[i.jsxs("div",{children:[i.jsx(C,{color:l.iterableColors[t]}),i.jsx("span",{children:n.label})]}),i.jsx(o.TooltipArrow,{theme:l})]})})}):null},L=function(e){var n=e.x,t=e.y,r=e.activePoints,a=e.hiddenData,s=Array.from(Array(e.dataLength-0),function(e,n){return n+0}).filter(function(e){return!a.includes(e)}),l=d.useContext(o.ThemeContext);return i.jsx("g",{style:{pointerEvents:"none"},children:i.jsx("foreignObject",{x:n,y:t,width:"275",height:"100%",children:i.jsxs(F,{"data-testid":"axis-tooltip",position:o.TooltipPosition.top,role:"tooltip",theme:l,children:[r.map(function(e,n){return i.jsxs("div",{children:[i.jsx(C,{color:l.iterableColors[s[n]]}),i.jsx("span",{children:e.label})]},n)}),i.jsx(o.TooltipArrow,{theme:l})]})})})},z=["datum","index","lineIndex","pointRefArray","registerPoint","unregisterPoint"],A=["lineIndex","pointRefArray","pointIndex","registerPoint","unregisterPoint"],E=function(e){var n=e.datum,t=e.index,o=e.lineIndex,a=e.pointRefArray,s=e.registerPoint,l=e.unregisterPoint,c=p(e,z);return i.jsx(r.Point,f({},c,{ariaLabel:n.label,pathComponent:i.jsx(T,{lineIndex:o,pointIndex:t,pointRefArray:a,registerPoint:s,unregisterPoint:l}),role:"button",tabIndex:0}))},T=function(e){var n=e.lineIndex,t=e.pointRefArray,r=e.pointIndex,a=e.registerPoint,s=e.unregisterPoint,l=p(e,A),c=o.useForceUpdate(),u=d.useRef(null);return d.useEffect(function(){return a(t,u),c(),function(){return s(t,u)}},[]),i.jsx("path",f({ref:u,"data-line-index":n,"data-point-index":r},l))},O=["events"],R=function(e){var n=e.events,t=p(e,O);return i.jsxs("g",{children:[i.jsx(r.LineSegment,f({},t,{events:n,style:{strokeWidth:"50px",stroke:"transparent"}})),i.jsx(r.LineSegment,f({},t,{events:n,style:{strokeWidth:"1px",stroke:"black",strokeOpacity:"0.2"}}))]})},D=["children","color","dataIndex","isHidden","onClick","name","focusCurrentLine","resetLineFocus"],W=d.forwardRef(function(e,n){var t=e.color,r=e.dataIndex,a=e.isHidden,s=e.onClick,l=e.name,c=e.focusCurrentLine,u=e.resetLineFocus,h=p(e,D);function m(){a||c&&"function"==typeof c&&c(r)}var b=d.useContext(o.ThemeContext);return i.jsx("div",{style:{display:"inline-flex"},onMouseEnter:m,onMouseLeave:u,children:i.jsx(o.Checkbox,f({checked:!a,color:t,containerStyle:{alignItems:"center",border:"0",boxShadow:"0 0 0",color:b.colors.neutral,display:"inline-flex",margin:"0 36px 20px 0",padding:"0"},inputStyle:{border:t?"none":"2px solid "+b.colors.neutral800,borderRadius:"4px"},labelText:l,onBlur:u,onClick:function(){s&&"function"==typeof s&&s(r),a||u&&"function"==typeof u&&u()},onFocus:m,ref:n,theme:b},h))})}),q=["axisLabel","tickLabels"],H=["style"],_=["axisLabel","tickLabels"],V=["style"],B=u.default.div(g||(g=h(["\n max-height: 600px;\n max-width: 800px;\n svg {\n overflow: visible;\n }\n"]))),M=u.default.div(x||(x=h([""]))),G=u.default.div(v||(v=h(["\n padding-bottom: 24px;\n"]))),$=u.default.p(y||(y=h(["\n color: ",";\n font-size: ",";\n"])),function(e){return e.theme.colors.neutral},function(e){return e.theme.typeScale.size02.fontSize});function K(e){var n=e.componentProps,t=void 0===n?{}:n,a=t.chart,s=void 0===a?{}:a,l=t.line,c=void 0===l?{}:l,u=t.scatter,h=void 0===u?{}:u,m=t.xAxis,b=void 0===m?{style:{}}:m,g=b.style,x=void 0===g?{}:g,v=x.axisLabel,y=void 0===v?void 0:v,k=x.tickLabels,w=void 0===k?void 0:k,I=p(x,q),S=p(b,H),F=t.yAxis,C=void 0===F?{style:{}}:F,z=C.style,A=void 0===z?{}:z,T=A.axisLabel,O=void 0===T?void 0:T,D=A.tickLabels,K=void 0===D?void 0:D,Y=p(A,_),N=p(C,V),U=e.data,X=void 0===U?[]:U,Z=e.lastFocusedScatterPoint,J=e.pointRefArray,Q=e.registerPoint,ee=e.unregisterPoint,ne=e.tabRef,te=e.x,re=e.y,oe=d.useContext(o.ThemeContext),ae=d.useContext(o.I18nContext),ie=d.useState([]),se=ie[0],le=ie[1],ce=d.useState(800),de=ce[0],ue=ce[1],fe=d.useState(null),pe=fe[0],he=fe[1],me=d.useState(null),be=me[0],ge=me[1],xe=d.useState(!0),ve=xe[0],ye=xe[1],ke=d.useState(!1),we=ke[0],Ie=ke[1],Se=d.useRef(null),je=d.useRef(null);d.useEffect(function(){return Le(),window.addEventListener("resize",Le),window.addEventListener("keydown",ze),function(){window.removeEventListener("resize",Le),window.removeEventListener("keydown",ze)}},[]),d.useEffect(function(){return window.addEventListener("mousemove",Ae),function(){window.removeEventListener("mousemove",Ae)}},[be]);var Fe=X.map(function(e,n){return"scatter-"+n}),Ce=f({tickLabels:f({color:"#3f3f3f",fontSize:12},w),axisLabel:f({color:"#3f3f3f",padding:44,fontSize:14,fontWeight:"bold"},y)},I),Pe=f({tickLabels:f({fontSize:12},K),axisLabel:f({color:"#3f3f3f",padding:64,fontSize:14,fontWeight:"bold"},O)},Y);function Le(){Se.current&&ue(Se.current.clientWidth)}function ze(e){"Escape"===e.key&&(ge(null),ye(!1))}function Ae(){!be&&ye(!0)}function Ee(e){return null===pe||pe===e?1:.1}function Te(e){se.includes(e)?le(se.filter(function(n){return n!==e})):le(se.concat([e]))}function Oe(e){he(e)}function Re(){he(null)}var De=function(e,n){if(n.current){var t=parseInt(n.current.getAttribute("data-line-index"),10);!e.includes(t)&&e.push(parseInt(n.current.getAttribute("data-line-index"),10))}return e},We=function(e){var n=parseInt(e.current.getAttribute("data-line-index"),10),t=parseInt(e.current.getAttribute("data-point-index"),10),r=J.current.reduce(De,[]);return{currentLineIndex:n,currentPointIndex:t,lineIndexes:r,lowestLineIndex:r[0],highestLineIndex:r[r.length-1]}},qe=function(e,n){return function(t){return t.current&&parseInt(t.current.getAttribute("data-line-index"),10)===e&&parseInt(t.current.getAttribute("data-point-index"),10)===n}};function He(e){"Tab"===e.key&&e.shiftKey&&Z&&Z.current&&J.current.find(function(e){return e.current===Z.current})&&(e.preventDefault(),Z.current.focus())}return i.jsxs(B,{ref:Se,children:[i.jsx(M,{onKeyDown:function(e){var n=e.shiftKey;switch(e.key){case"Tab":e.preventDefault(),Z.current=J.current.find(function(e){return e.current===document.activeElement}).current,n?ne.current&&ne.current.focus():je.current&&je.current.focus();break;case"ArrowRight":var t,r=J.current.findIndex(function(e){return e.current===document.activeElement});void 0!==r&&(r===J.current.length-1?null==(t=J.current[0])||null==(t=t.current)||t.focus():J.current[r+1].current.focus());break;case"ArrowLeft":var o=J.current.findIndex(function(e){return e.current===document.activeElement});void 0!==o&&(0===o?J.current[J.current.length-1].current.focus():J.current[o-1].current.focus());break;case"ArrowUp":e.preventDefault();var a=J.current.find(function(e){return e.current===document.activeElement});if(a&&a.current){var i=We(a),s=i.currentLineIndex,l=i.currentPointIndex,c=i.lineIndexes;if(s===i.lowestLineIndex)J.current.find(qe(i.highestLineIndex,l)).current.focus();else{var d=c[c.indexOf(s)-1];J.current.find(qe(d,l)).current.focus()}}break;case"ArrowDown":e.preventDefault();var u=J.current.find(function(e){return e.current===document.activeElement});if(u&&u.current){var f=We(u),p=f.currentLineIndex,h=f.currentPointIndex,m=f.lineIndexes;if(p===f.highestLineIndex)J.current.find(qe(f.lowestLineIndex,h)).current.focus();else{var b=m[m.indexOf(p)+1];J.current.find(qe(b,h)).current.focus()}}}},children:i.jsxs(r.VictoryChart,f({domainPadding:32,height:400,padding:{top:0,left:80,right:0,bottom:62},theme:j,width:de,containerComponent:i.jsx(r.VictoryVoronoiContainer,{name:"xAxisGroupLabel",voronoiBlacklist:Fe,voronoiDimension:"x",labels:we&&ve?function(){return" "}:void 0,labelComponent:ve?i.jsx(r.VictoryTooltip,{flyoutComponent:i.jsx(L,{dataLength:X.length,hiddenData:se})}):void 0,role:"presentation",voronoiPadding:32})},s,{children:[i.jsx(r.VictoryAxis,f({},N,{dependentAxis:!0,style:Pe})),X.map(function(e,n){var t=e.data;return!se.includes(n)&&i.jsx(r.VictoryLine,f({style:{data:{opacity:Ee(n),stroke:oe.iterableColors[n],strokeWidth:"3"},parent:{border:oe.colors.neutral400}},data:t,labelComponent:i.jsx(i.Fragment,{}),x:te,y:re},c),"line"+n)}),i.jsx(r.VictoryAxis,f({},S,{style:Ce,gridComponent:i.jsx(R,{events:{onMouseEnter:function(){return Ie(!0)},onMouseLeave:function(){return Ie(!1)}}})})),X.map(function(e,n){var t=e.data;return!se.includes(n)&&i.jsx(r.VictoryScatter,f({name:"scatter-"+n,events:[{target:"data",eventHandlers:{onBlur:function(){return ye(!0),ge(null),[{target:"labels",mutation:function(){return{active:void 0}}}]},onClick:function(){return[{target:"labels",mutation:function(e){return ge(e.datum.lineIndex+"-"+e.datum.index),{active:!0}}}]},onFocus:function(){return ye(!1),[{target:"labels",mutation:function(e){return ge(e.datum.lineIndex+"-"+e.datum.index),{active:!0}}}]},onMouseEnter:function(){return ye(!1),[{target:"labels",mutation:function(e){return ge(e.datum.lineIndex+"-"+e.datum.index),{active:!0}}}]},onMouseLeave:function(){ge(null),ye(!0)}}}],style:{data:{fill:oe.colors.neutral100,opacity:Ee(n),stroke:oe.iterableColors[n],strokeWidth:2}},size:5,data:t.map(function(e,t){return f({index:t,lineIndex:n},e)}),dataComponent:i.jsx(E,{lineIndex:n,pointRefArray:J,registerPoint:Q,unregisterPoint:ee}),labels:function(){return""},labelComponent:i.jsx(r.VictoryTooltip,{text:"",flyoutComponent:i.jsx(P,{index:n,showTooltip:be})}),x:te,y:re},h),"scatter"+n)})]}))}),i.jsxs(G,{children:[i.jsx($,{theme:oe,children:ae.charts.line.dataLegendsLabel}),X.map(function(e,n){var t=e.name,r=ae.charts.line.legendButtonAriaLabel.replace(/\{name\}/g,t);return i.jsx(W,{"aria-label":r,color:oe.iterableColors[n],dataIndex:n,isHidden:se.includes(n),name:t,onClick:Te,onKeyDown:0===n?He:void 0,focusCurrentLine:Oe,ref:0===n?je:void 0,resetLineFocus:Re},n)})]})]})}function Y(e){return e.toLowerCase().replace(/[^a-z 0-9]/gi,"").replace(/(?:^\w|[A-Z]|\b\w)/g,function(e,n){return 0===n?e.toLowerCase():e.toUpperCase()}).replace(/\s+/g,"")}var N,U,X,Z,J,Q,ee=function(e){var n=e.data,t=void 0===n?[]:n,r=e.xData,a=r.keyValue,s=r.label,l=r.tickFormat,c=r.tickValues,u=e.yData,p=u.keyValue,h=u.tickFormat,m=d.useState({columns:[],rows:[]}),b=m[0],g=m[1];return d.useEffect(function(){var e,n,r;g((e=Y(a||s||"x"),n=t.reduce(function(e,n){return n.data.forEach(function(n){var t=n.x||a&&n[a];!e.includes(t)&&e.push(t)}),e},[]),r={columns:n.length>0?[{field:e,header:s||a||"X",isRowHeader:!0}]:[],rows:n.reduce(function(t,r,o){var a,i=c&&"number"==typeof r&&c.length===n.length?l&&"function"==typeof l?l(c[r-1]):c[r-1]:l&&Array.isArray(l)?l[r-1]:l&&"function"==typeof l?l(r):r;return t.push(((a={})[e]=i,a.id=o,a)),t},[])},t.reduce(function(e,n){var t=n.name,o=n.data,a=Y(t);return e.columns.push({field:a,header:t}),o.forEach(function(n,t){var o,i=n.y||0===n.y?n.y:p&&n[p];e.rows[t]=f({},e.rows[t],((o={id:r.rows.length>0?t+1:t})[a]=h&&"function"==typeof h?h(i):i,o))}),e},r)))},[t]),i.jsx(o.Card,{children:b.rows.length>0?i.jsx(o.Datagrid,{hasPagination:!1,columns:b.columns,rows:b.rows}):i.jsx(o.Spinner,{})})},ne=["description","title","testId","type"],te=o.styled.span(N||(N=h(["\n color: ",";\n font-size: ",";\n font-weight: 600;\n font-family: ",";\n line-height: ",";\n margin: 0 0 12px 0;\n"])),function(e){return e.theme.colors.neutral},function(e){return e.theme.typeScale.size04.fontSize},function(e){return e.theme.bodyFont},function(e){return e.theme.typeScale.size04.lineHeight}),re=o.styled(o.Paragraph)(U||(U=h(["\n font-size: ",";\n margin: 0 0 18px 0;\n"])),function(e){return e.theme.typeScale.size02.fontSize}),oe=o.styled(o.TabsContainer)(X||(X=h(["\n width: 800px;\n ul {\n box-shadow: inset 0 -1px 0 ",";\n }\n"])),function(e){return e.theme.colors.neutral300}),ae=o.styled(o.TabPanel)(Z||(Z=h(["\n padding: 22px 0;\n"]))),ie=o.styled(o.Card)(J||(J=h(["\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);\n display: ",";\n right: ",";\n max-height: ",";\n opacity: ",";\n outline: 0;\n overflow-y: auto;\n padding: ","\n ",";\n position: absolute;\n transition: opacity 0.3s;\n white-space: nowrap;\n z-index: 2;\n\n ","\n"])),function(e){return e.isOpen?"block":"none"},function(e){return e.theme.spaceScale.spacing02},function(e){return e.maxHeight?e.maxHeight:e.theme.dropdown.content.maxHeight},function(e){return e.isOpen?"1":"0"},function(e){return e.theme.spaceScale.spacing05},function(e){return e.theme.spaceScale.spacing05},function(e){return e.width&&n.css(Q||(Q=h(["\n white-space: normal;\n width: ",";\n "])),e.width)});function se(e,n){var r,a,s,l=e.description,c=e.title,u=e.type,h=p(e,ne),m=d.useRef(null),b=d.useRef(null),g=d.useContext(o.ThemeContext),x=d.useContext(o.I18nContext),v=o.useDescendants(),y=v[0],k=v[1],w=v[2],I=d.useState(!1),S=I[0],j=I[1];return i.jsxs("div",{ref:n,children:[i.jsx(te,{theme:g,children:c}),l&&i.jsx(re,{theme:g,visualStyle:o.TypographyVisualStyle.bodySmall,children:l}),i.jsxs(oe,{theme:g,children:[i.jsxs(o.Tabs,{children:[i.jsx(o.Tab,{children:x.charts.line.chartTabLabel}),i.jsx(o.Tab,{children:x.charts.line.dataTabLabel}),i.jsxs("div",{onBlur:function(){j(!1)},style:{display:"inline-block",marginLeft:"auto"},children:[i.jsx(o.Tooltip,{content:x.charts.line.keyboardInstructionsTooltip,ref:m,children:i.jsx(o.IconButton,{"aria-controls":"keyboardInstructions","aria-label":x.charts.line.keyboardInstructionsTooltip,"aria-expanded":Boolean(S),icon:i.jsx(t.KeyboardIcon,{}),onClick:function(){j(function(e){return!e})},onKeyDown:function(e){var n=e.shiftKey;switch(e.key){case"Escape":j(!1);break;case"Tab":!n&&b&&b.current&&y.current.find(function(e){return e.current===b.current})&&(e.preventDefault(),b.current.focus())}},variant:o.ButtonVariant.link})}),i.jsx(o.Announce,{children:i.jsxs(ie,{id:"keyboardInstructions",isOpen:S,theme:g,width:"350px",children:[i.jsx(o.Paragraph,{visualStyle:o.TypographyVisualStyle.headingXSmall,style:{margin:"0 0 16px"},children:x.charts.line.keyboardInstructionsHeader}),x.charts.line.keyboardInstructions]})})]})]}),i.jsxs(o.TabPanelsContainer,{children:[i.jsx(ae,{theme:g,children:"line"===u&&i.jsx(K,f({},h,{lastFocusedScatterPoint:b,pointRefArray:y,registerPoint:k,tabRef:m,unregisterPoint:w}))}),i.jsx(ae,{theme:g,children:i.jsx(ee,{data:h.data,xData:{keyValue:h.x,label:null==(r=h.componentProps)||null==(r=r.xAxis)?void 0:r.label,tickFormat:null==(a=h.componentProps)||null==(a=a.xAxis)?void 0:a.tickFormat},yData:{keyValue:h.y,tickFormat:null==(s=h.componentProps)||null==(s=s.yAxis)?void 0:s.tickFormat}})})]})]})]})}var le=d.forwardRef(se);function ce(){return ce=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},ce.apply(this,arguments)}function de(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ue(e,n){return ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},ue(e,n)}function fe(e){return fe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},fe(e)}function pe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(pe=function(){return!!e})()}function he(e,n,t){if(pe())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,n);var o=new(e.bind.apply(e,r));return t&&ue(o,t.prototype),o}function me(e){var n="function"==typeof Map?new Map:void 0;return me=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(n){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return he(e,arguments,fe(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),ue(t,e)},me(e)}var be={1:"Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }).\n\n",2:"Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }).\n\n",3:"Passed an incorrect argument to a color function, please pass a string representation of a color.\n\n",4:"Couldn't generate valid rgb string from %s, it returned %s.\n\n",5:"Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.\n\n",6:"Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, blue: 100 }).\n\n",7:"Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green: 205, blue: 100, alpha: 0.75 }).\n\n",8:"Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.\n\n",9:"Please provide a number of steps to the modularScale helper.\n\n",10:"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\n\n",11:'Invalid value passed as base to modularScale, expected number or em string but got "%s"\n\n',12:'Expected a string ending in "px" or a number passed as the first argument to %s(), got "%s" instead.\n\n',13:'Expected a string ending in "px" or a number passed as the second argument to %s(), got "%s" instead.\n\n',14:'Passed invalid pixel value ("%s") to %s(), please pass a value like "12px" or 12.\n\n',15:'Passed invalid base value ("%s") to %s(), please pass a value like "12px" or 12.\n\n',16:"You must provide a template to this method.\n\n",17:"You passed an unsupported selector state to this method.\n\n",18:"minScreen and maxScreen must be provided as stringified numbers with the same units.\n\n",19:"fromSize and toSize must be provided as stringified numbers with the same units.\n\n",20:"expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\n\n",21:"expects the objects in the first argument array to have the properties `prop`, `fromSize`, and `toSize`.\n\n",22:"expects the first argument object to have the properties `prop`, `fromSize`, and `toSize`.\n\n",23:"fontFace expects a name of a font-family.\n\n",24:"fontFace expects either the path to the font file(s) or a name of a local copy.\n\n",25:"fontFace expects localFonts to be an array.\n\n",26:"fontFace expects fileFormats to be an array.\n\n",27:"radialGradient requries at least 2 color-stops to properly render.\n\n",28:"Please supply a filename to retinaImage() as the first argument.\n\n",29:"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\n\n",30:"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",31:"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation\n\n",32:"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s')\n\n",33:"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation\n\n",34:"borderRadius expects a radius value as a string or number as the second argument.\n\n",35:'borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.\n\n',36:"Property must be a string value.\n\n",37:"Syntax Error at %s.\n\n",38:"Formula contains a function that needs parentheses at %s.\n\n",39:"Formula is missing closing parenthesis at %s.\n\n",40:"Formula has too many closing parentheses at %s.\n\n",41:"All values in a formula must have the same unit or be unitless.\n\n",42:"Please provide a number of steps to the modularScale helper.\n\n",43:"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\n\n",44:"Invalid value passed as base to modularScale, expected number or em/rem string but got %s.\n\n",45:"Passed invalid argument to hslToColorString, please pass a HslColor or HslaColor object.\n\n",46:"Passed invalid argument to rgbToColorString, please pass a RgbColor or RgbaColor object.\n\n",47:"minScreen and maxScreen must be provided as stringified numbers with the same units.\n\n",48:"fromSize and toSize must be provided as stringified numbers with the same units.\n\n",49:"Expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\n\n",50:"Expects the objects in the first argument array to have the properties prop, fromSize, and toSize.\n\n",51:"Expects the first argument object to have the properties prop, fromSize, and toSize.\n\n",52:"fontFace expects either the path to the font file(s) or a name of a local copy.\n\n",53:"fontFace expects localFonts to be an array.\n\n",54:"fontFace expects fileFormats to be an array.\n\n",55:"fontFace expects a name of a font-family.\n\n",56:"linearGradient requries at least 2 color-stops to properly render.\n\n",57:"radialGradient requries at least 2 color-stops to properly render.\n\n",58:"Please supply a filename to retinaImage() as the first argument.\n\n",59:"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\n\n",60:"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",61:"Property must be a string value.\n\n",62:"borderRadius expects a radius value as a string or number as the second argument.\n\n",63:'borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.\n\n',64:"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation.\n\n",65:"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s').\n\n",66:"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation.\n\n",67:"You must provide a template to this method.\n\n",68:"You passed an unsupported selector state to this method.\n\n",69:'Expected a string ending in "px" or a number passed as the first argument to %s(), got %s instead.\n\n',70:'Expected a string ending in "px" or a number passed as the second argument to %s(), got %s instead.\n\n',71:'Passed invalid pixel value %s to %s(), please pass a value like "12px" or 12.\n\n',72:'Passed invalid base value %s to %s(), please pass a value like "12px" or 12.\n\n',73:"Please provide a valid CSS variable.\n\n",74:"CSS variable not found.\n\n",75:"fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen.\n"};function ge(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];var r,o=n[0],a=[];for(r=1;r<n.length;r+=1)a.push(n[r]);return a.forEach(function(e){o=o.replace(/%[a-z]/,e)}),o}var xe=function(e){var n,t;function r(n){var t;if("production"===process.env.NODE_ENV)t=e.call(this,"An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#"+n+" for more information.")||this;else{for(var r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];t=e.call(this,ge.apply(void 0,[be[n]].concat(o)))||this}return de(t)}return t=e,(n=r).prototype=Object.create(t.prototype),n.prototype.constructor=n,ue(n,t),r}(me(Error));function ve(e){return Math.round(255*e)}function ye(e,n,t){return ve(e)+","+ve(n)+","+ve(t)}function ke(e,n,t,r){if(void 0===r&&(r=ye),0===n)return r(t,t,t);var o=(e%360+360)%360/60,a=(1-Math.abs(2*t-1))*n,i=a*(1-Math.abs(o%2-1)),s=0,l=0,c=0;o>=0&&o<1?(s=a,l=i):o>=1&&o<2?(s=i,l=a):o>=2&&o<3?(l=a,c=i):o>=3&&o<4?(l=i,c=a):o>=4&&o<5?(s=i,c=a):o>=5&&o<6&&(s=a,c=i);var d=t-a/2;return r(s+d,l+d,c+d)}var we={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Ie=/^#[a-fA-F0-9]{6}$/,Se=/^#[a-fA-F0-9]{8}$/,je=/^#[a-fA-F0-9]{3}$/,Fe=/^#[a-fA-F0-9]{4}$/,Ce=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i,Pe=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i,Le=/^hsl\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,ze=/^hsla\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i,Ae=function(e){return 7===e.length&&e[1]===e[2]&&e[3]===e[4]&&e[5]===e[6]?"#"+e[1]+e[3]+e[5]:e};function Ee(e){var n=e.toString(16);return 1===n.length?"0"+n:n}function Te(e,n,t){return function(){var r=t.concat(Array.prototype.slice.call(arguments));return r.length>=n?e.apply(this,r):Te(e,n,r)}}function Oe(e){return Te(e,e.length,[])}function Re(e,n){if("transparent"===n)return n;var t,r=function(e){if("string"!=typeof e)throw new xe(3);var n=function(e){if("string"!=typeof e)return e;var n=e.toLowerCase();return we[n]?"#"+we[n]:e}(e);if(n.match(Ie))return{red:parseInt(""+n[1]+n[2],16),green:parseInt(""+n[3]+n[4],16),blue:parseInt(""+n[5]+n[6],16)};if(n.match(Se)){var t=parseFloat((parseInt(""+n[7]+n[8],16)/255).toFixed(2));return{red:parseInt(""+n[1]+n[2],16),green:parseInt(""+n[3]+n[4],16),blue:parseInt(""+n[5]+n[6],16),alpha:t}}if(n.match(je))return{red:parseInt(""+n[1]+n[1],16),green:parseInt(""+n[2]+n[2],16),blue:parseInt(""+n[3]+n[3],16)};if(n.match(Fe)){var r=parseFloat((parseInt(""+n[4]+n[4],16)/255).toFixed(2));return{red:parseInt(""+n[1]+n[1],16),green:parseInt(""+n[2]+n[2],16),blue:parseInt(""+n[3]+n[3],16),alpha:r}}var o=Ce.exec(n);if(o)return{red:parseInt(""+o[1],10),green:parseInt(""+o[2],10),blue:parseInt(""+o[3],10)};var a=Pe.exec(n.substring(0,50));if(a)return{red:parseInt(""+a[1],10),green:parseInt(""+a[2],10),blue:parseInt(""+a[3],10),alpha:parseFloat(""+a[4])};var i=Le.exec(n);if(i){var s="rgb("+ke(parseInt(""+i[1],10),parseInt(""+i[2],10)/100,parseInt(""+i[3],10)/100)+")",l=Ce.exec(s);if(!l)throw new xe(4,n,s);return{red:parseInt(""+l[1],10),green:parseInt(""+l[2],10),blue:parseInt(""+l[3],10)}}var c=ze.exec(n.substring(0,50));if(c){var d="rgb("+ke(parseInt(""+c[1],10),parseInt(""+c[2],10)/100,parseInt(""+c[3],10)/100)+")",u=Ce.exec(d);if(!u)throw new xe(4,n,d);return{red:parseInt(""+u[1],10),green:parseInt(""+u[2],10),blue:parseInt(""+u[3],10),alpha:parseFloat(""+c[4])}}throw new xe(5)}(n);return function(e,n,t,r){if("object"==typeof e)return e.alpha>=1?function(e,n,t){if("number"==typeof e&&"number"==typeof n&&"number"==typeof t)return Ae("#"+Ee(e)+Ee(n)+Ee(t));if("object"==typeof e&&void 0===n&&void 0===t)return Ae("#"+Ee(e.red)+Ee(e.green)+Ee(e.blue));throw new xe(6)}(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")";throw new xe(7)}(ce({},r,{alpha:(t=+(100*("number"==typeof r.alpha?r.alpha:1)-100*parseFloat(e)).toFixed(2)/100,Math.max(0,Math.min(1,t)))}))}var De,We,qe=Oe(Re),He=["children","testId","isInverse","type","dataSet","options"];exports.CarbonChartType=void 0,(We=exports.CarbonChartType||(exports.CarbonChartType={})).area="area",We.areaStacked="areaStacked",We.bar="bar",We.barGrouped="barGrouped",We.barStacked="barStacked",We.boxplot="boxplot",We.bubble="bubble",We.bullet="bullet",We.donut="donut",We.gauge="gauge",We.histogram="histogram",We.line="line",We.lollipop="lollipop",We.meter="meter",We.pie="pie",We.radar="radar",We.scatter="scatter",We.combo="combo";var _e,Ve=u.default.div(De||(De=h(["\n .cds--data-table thead tr th {\n background: "," !important;\n }\n .cds--data-table td,\n .cds--data-table tbody th {\n color: ",";\n }\n .cds--data-table tbody tr,\n .cds--data-table tbody tr td,\n .cds--data-table tbody tr th {\n color: ",";\n }\n .cds--data-table tr {\n block-size: 2.5rem;\n }\n\n .cds--cc--tooltip .content-box .datapoint-tooltip p {\n font-size: ",";\n padding: ",";\n color: ",";\n max-width:142px;\n white-space: normal;\n }\n\n .cds--modal-container {\n clip-path: inset(0% 0% 0% 0% round ",");\n background: ",";\n .cds--data-table th {\n background: ",";\n }\n .cds--data-table td {\n border-top: 1px solid\n ",";\n border-bottom: 1px solid\n ",";\n background: ",";\n }\n .cds--data-table tr:hover td {\n background: ",";\n }\n }\n\n p,\n div,\n text,\n .cds--cc--axes g.axis .axis-title,\n .cds--cc--title p.title,\n .cds--cc--axes g.axis g.tick text {\n font-family: "," !important;\n color: ",";\n }\n\n .cds--cc--axes {\n overflow: visible;\n }\n\n div.cds--cc--legend {\n div.legend-item {\n div.checkbox {\n background: ",";\n border: none;\n width: ",";\n height: ",";\n svg {\n left: 2px;\n position: relative;\n }\n }\n p {\n font-size: ",";\n margin: 0 "," 0 0;\n }\n }\n }\n div.cds--cc--legend.has-deactivated-items {\n div.legend-item {\n div.checkbox {\n border: 1px solid\n ",";\n }\n div.checkbox.active {\n border: 1px solid transparent;\n }\n }\n }\n .chart-holder {\n .cds--cc--axes g.axis g.tick text {\n fill: ",";\n }\n .cds--cc--axes g.axis path.domain {\n stroke: ",";\n }\n .cds--cc--grid g.x.grid g.tick line,\n .cds--cc--grid g.y.grid g.tick line {\n stroke: ",";\n }\n .cds--cc--grid rect.chart-grid-backdrop.stroked{\n stroke: ","\n }\n .cds--cc--skeleton .shimmer-effect-lines {\n filter: ",";\n }\n /* .chart-holder.cds--chart-holder.filled,\n .cds--cc--skeleton rect.chart-skeleton-backdrop,\n .cds--cc--grid rect.chart-grid-backdrop {\n } */\n \n .cds--cc--grid rect.chart-grid-backdrop{\n fill:transparent;\n }\n .cds--cc--scatter circle.dot.hovered {\n padding: 10px;\n }\n .cds--cc--scatter-stacked circle.dot.hovered,\n .cds--cc--scatter-stacked circle.dot.unfilled,\n .cds--cc--scatter circle.dot.unfilled{\n stroke-width: 6px;\n transition: 0.1s all linear;\n \n }\n .cds--cc--scatter circle.dot.hovered {\n stroke-width: 0.5em;\n transition: 0.1s all linear;\n filter: \n drop-shadow( 1px 0px 0px ",") \n drop-shadow(-1px 0px 0px ",")\n drop-shadow( 0px 1px 0px ",") \n drop-shadow( 0px -1px 0px ",");\n }\n .cds--cc--lollipop circle.dot.filled,\n .cds--cc--lollipop circle.dot.hovered {\n stroke-width: 15px;\n }\n .cds--cc--scatter-stacked circle.dot.hovered,\n .cds--cc--scatter-stacked circle.dot.unfilled,\n .cds--cc--scatter circle.dot.unfilled,\n .cds--cc--lollipop circle.dot.filled,\n .cds--cc--lollipop circle.dot.hovered{\n transition: 0.1s all linear;\n filter: \n drop-shadow( 1px 0px 0px ",")\n drop-shadow(-1px 0px 0px ",")\n drop-shadow( 0px 1px 0px ",")\n drop-shadow( 0px -1px 0px ",");\n }\n .cds--cc--lollipop .cds--cc--scatter circle.dot.hovered{\n transition: 0.1s all linear;\n stroke-width: 1.1em;\n }\n\n .cds--overflow-menu-options__btn:focus {\n outline-color: ",";\n }\n\n .cds--btn {\n min-height: auto;\n display: flex;\n flex: 0 auto;\n align-items: center;\n text-align: center;\n padding: 20px;\n margin: 0;\n line-height: ",";\n margin: 0;\n min-width: ",";\n overflow: hidden;\n padding: ;\n position: relative;\n right: ",";\n text-align: center;\n height: 40px;\n font-family: ",";\n font-size: ",";\n border-radius: ",";\n font-weight: 500;\n }\n\n .cds--btn--primary {\n background: ",";\n color: ",";\n }\n\n *:focus {\n outline: 2px solid\n "," !important;\n outline-offset: 0;\n }\n .cds--overflow-menu-options__btn:focus,\n .cds--overflow-menu:focus,\n .cds--overflow-menu__trigger:focus,\n .toolbar-control:focus {\n outline: 2px solid\n "," !important;\n }\n div.cds--cc--legend.clickable\n div.legend-item:not(.additional):focus\n div.checkbox,\n div.cds--cc--legend.clickable\n div.legend-item:not(.additional):hover\n div.checkbox {\n border: ",";\n }\n div.cds--cc--legend.clickable\n div.legend-item:not(.additional):hover\n div.checkbox {\n box-shadow: 0 0 0 2px\n "," !important;\n }\n\n .cds--btn--primary {\n &:focus {\n outline: 2px solid\n ",";\n }\n outline-offset: 2px;\n border: none;\n box-shadow: none;\n }\n .cds--modal-header {\n background: ",";\n margin-bottom: 0;\n border-bottom: 1px solid\n ",";\n }\n .cds--modal-header__heading {\n font-weight: 600;\n }\n\n .cds--modal-close {\n position: absolute;\n top: 0;\n right: 0;\n &:focus {\n outline: 2px solid\n ",";\n border-color: none;\n }\n outline-offset: 0;\n border: none;\n }\n }\n\n .cds--modal-footer.cds--modal-footer {\n display: flex;\n align-items: center;\n border-top: 1px solid\n ",";\n background: "," !important;\n }\n .layout-child.header {\n height: auto !important;\n p {\n text-overflow: inherit;\n overflow: auto;\n white-space: normal;\n }\n }\n\n svg:not(:root) {\n overflow: visible;\n }\n\n .cds--cc--chart-wrapper text {\n font-size: ",";\n }\n\n g.center text,\n .pie-label{\n fill: "," ;\n }\n\n // Zoom responsive tweaks\n\n @media screen and (max-width: 760px) {\n .cds--modal-container {\n overflow-y: auto;\n }\n .cds--chart-holder .cds--modal .cds--modal-container .cds--modal-content {\n overflow: visible;\n }\n .cds--chart-holder\n .cds--modal\n .cds--modal-container\n .cds--modal-content\n table\n th {\n position: relative;\n }\n }\n"])),function(e){return e.isInverse?e.theme.colors.primary700:""},function(e){return e.theme.colors.neutral700},function(e){return e.isInverse?e.theme.colors.neutral100:""},function(e){return e.theme.typeScale.size02.fontSize},function(e){return e.theme.spaceScale.spacing02},function(e){return e.isInverse?e.theme.colors.neutral100:e.theme.colors.neutral700},function(e){return e.theme.borderRadius},function(e){return e.isInverse?e.theme.colors.primary700:""},function(e){return e.isInverse?e.theme.colors.primary600:""},function(e){return e.isInverse?qe(.8,e.theme.colors.neutral100):"inherit"},function(e){return e.isInverse?qe(.8,e.theme.colors.neutral100):"inherit"},function(e){return e.isInverse?"#202565":""},function(e){return e.isInverse?e.theme.colors.primary600:""},function(e){return e.theme.bodyFont},function(e){return e.isInverse?e.theme.colors.neutral100:e.theme.colors.neutral700},function(e){return e.isInverse?e.theme.colors.neutral900:e.theme.colors.neutral100},function(e){return e.theme.spaceScale.spacing05},function(e){return e.theme.spaceScale.spacing05},function(e){return e.theme.typeScale.size03.fontSize},function(e){return e.theme.spaceScale.spacing03},function(e){return e.isInverse?e.theme.colors.neutral100:e.theme.colors.neutral900},function(e){return e.isInverse?e.theme.colors.neutral100:""},function(e){return e.isInverse?e.theme.colors.neutral100:""},function(e){return e.isInverse?qe(.5,e.theme.colors.neutral100):""},function(e){return e.isInverse?e.theme.colors.neutral100:""},function(e){return e.isInverse?"invert(1)":""},function(e){return e.isInverse?e.theme.colors.primary600:e.theme.colors.neutral100},function(e){return e.isInverse?e.theme.colors.primary600:e.theme.colors.neutral100},function(e){return e.isInverse?e.theme.colors.primary600:e.theme.colors.neutral100},function(e){return e.isInverse?e.theme.colors.primary600:e.theme.colors.neutral100},function(e){return e.isInverse?e.theme.colors.primary600:e.theme.colors.neutral100},function(e){return e.isInverse?e.theme.colors.primary600:e.theme.colors.neutral100},function(e){return e.isInverse?e.theme.colors.primary600:e.theme.colors.neutral100},function(e){return e.isInverse?e.theme.colors.primary600:e.theme.colors.neutral100},function(e){return e.isInverse?e.theme.colors.focusInverse:""},function(e){return e.theme.typeScale.size03.lineHeight},function(e){return e.theme.spaceScale.spacing13},function(e){return e.theme.spaceScale.spacing04},function(e){return e.theme.bodyFont},function(e){return e.theme.typeScale.size03.fontSize},function(e){return e.theme.borderRadius},function(e){return e.isInverse?e.theme.colors.tertiary500:e.theme.colors.primary},function(e){return e.isInverse?e.theme.colors.neutral900:""},function(e){return e.isInverse?e.theme.colors.focusInverse:e.theme.colors.focus},function(e){return e.isInverse?e.theme.colors.focusInverse:e.theme.colors.focus},function(e){return e.isInverse?"1px solid "+e.theme.colors.focusInverse:""},function(e){return e.isInverse?e.theme.colors.focusInverse:e.theme.colors.focus},function(e){return e.isInverse?e.theme.colors.focusInverse:e.theme.colors.focus},function(e){return e.isInverse?e.theme.colors.primary600:e.theme.colors.neutral100},function(e){return e.isInverse?qe(.8,e.theme.colors.neutral100):e.theme.colors.neutral300},function(e){return e.isInverse?e.theme.colors.focusInverse:e.theme.colors.focus},function(e){return e.isInverse?qe(.8,e.theme.colors.neutral100):e.theme.colors.neutral300},function(e){return e.isInverse?e.theme.colors.primary600:e.theme.colors.neutral100},function(e){return e.theme.typeScale.size02.fontSize},function(e){return e.isInverse?e.theme.colors.neutral100:""});!function(e){e.WHITE="white",e.G100="g100",e.G90="g90",e.G10="g10"}(_e||(_e={})),exports.CarbonChart=d.forwardRef(function(e,n){var t,r,a,l=e.testId,c=e.isInverse,u=e.type,h=e.dataSet,m=e.options,b=p(e,He),g=d.useContext(o.ThemeContext),x=o.useIsInverse(c),v={area:s.AreaChart,areaStacked:s.StackedAreaChart,bar:s.SimpleBarChart,barGrouped:s.GroupedBarChart,barStacked:s.StackedBarChart,donut:s.DonutChart,line:s.LineChart,lollipop:s.LollipopChart,pie:s.PieChart,radar:s.RadarChart,boxplot:s.BoxplotChart,bubble:s.BubbleChart,bullet:s.BulletChart,gauge:s.GaugeChart,histogram:s.HistogramChart,meter:s.MeterChart,scatter:s.ScatterChart,combo:s.ComboChart},y=f({},m,{theme:x?_e.G100:_e.WHITE,color:{scale:(t={},r=h.map(function(e){return"group"in e?e.group:null}),a=r.filter(function(e,n){return r.indexOf(e)===n}),a.forEach(function(e,n){return a.length<=g.chartColors.length?t[e||"null"]=x?g.chartColorsInverse[n]:g.chartColors[n]:{}}),t)},tooltip:{truncation:{type:"none"}}}),k=v[u];return d.useEffect(function(){document.querySelectorAll(".graph-frame ").forEach(function(e){e.setAttribute("aria-label","Interactive chart")})}),i.jsx(Ve,f({"data-testid":l,ref:n,isInverse:x,theme:g,className:"carbon-chart-wrapper"},b,{children:i.jsx(k,{data:h,options:y})}))}),exports.Chart=le;
|
|
2
2
|
//# sourceMappingURL=charts.js.map
|