dash_mantine_components 2.2.1 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dash_mantine_components/async-AreaChart.js +1 -1
- package/dash_mantine_components/async-BarChart.js +1 -1
- package/dash_mantine_components/async-BubbleChart.js +1 -1
- package/dash_mantine_components/async-CodeHighlight.js +1 -1
- package/dash_mantine_components/async-CodeHighlightTabs.js +1 -1
- package/dash_mantine_components/async-CompositeChart.js +1 -1
- package/dash_mantine_components/async-DonutChart.js +1 -1
- package/dash_mantine_components/async-InlineCodeHighlight.js +1 -1
- package/dash_mantine_components/async-LineChart.js +1 -1
- package/dash_mantine_components/async-PieChart.js +1 -1
- package/dash_mantine_components/async-RadarChart.js +1 -1
- package/dash_mantine_components/async-RichTextEditor.js +2 -1
- package/dash_mantine_components/async-ScatterChart.js +1 -1
- package/dash_mantine_components/async-Sparkline.js +1 -1
- package/dash_mantine_components/dash_mantine_components-charts-shared.js +1 -1
- package/dash_mantine_components/dash_mantine_components.js +1 -1
- package/dash_mantine_components/proptypes.js +276 -106
- package/package.json +27 -29
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkdash_mantine_components=self.webpackChunkdash_mantine_components||[]).push([[172],{3343:(e,t,a)=>{a.r(t),a.d(t,{default:()=>Y});var r=a(1635),s=a(4848),o=a(295),i=a.n(o),n=a(7158),l=a(1915),c=a(5614),d=a(4653),m=a(9853),p=a(9107),h=a(7984),u=a(1706),x=a(3495),v=a(8687),y=a(7018),f=a(9396),k=a(6344),g=a(2412),A=a(6100),b=a(1101),C=a(9274),P=a(2837),S=a(4791),L=a(6585),D=a(5849),j=a(9133);function N(e,t){return e===t.x?"x":"y"}const w={withXAxis:!0,withYAxis:!0,withTooltip:!0,tooltipAnimationDuration:0,tickLine:"y",strokeDasharray:"5 5",gridAxis:"x"},z=(0,f.V)((
|
|
1
|
+
"use strict";(self.webpackChunkdash_mantine_components=self.webpackChunkdash_mantine_components||[]).push([[172],{3343:(e,t,a)=>{a.r(t),a.d(t,{default:()=>Y});var r=a(1635),s=a(4848),o=a(295),i=a.n(o),n=a(7158),l=a(1915),c=a(5614),d=a(4653),m=a(9853),p=a(9107),h=a(7984),u=a(1706),x=a(3495),v=a(8687),y=a(7018),f=a(9396),k=a(6344),g=a(2412),A=a(6100),b=a(1101),C=a(9274),P=a(2837),S=a(4791),L=a(6585),D=a(5849),j=a(9133);function N(e,t){return e===t.x?"x":"y"}const w={withXAxis:!0,withYAxis:!0,withTooltip:!0,tooltipAnimationDuration:0,tickLine:"y",strokeDasharray:"5 5",gridAxis:"x"},z=(0,f.V)((e,{textColor:t,gridColor:a})=>({root:{"--chart-text-color":t?(0,k.r)(t,e):void 0,"--chart-grid-color":a?(0,k.r)(a,e):void 0}})),_=(0,g.P9)((e,t)=>{const a=(0,A.Y)("ScatterChart",w,e),{classNames:r,className:i,style:f,styles:g,unstyled:_,vars:F,referenceLines:K,dir:T,withLegend:Y,withTooltip:M,withXAxis:W,withYAxis:X,xAxisProps:q,yAxisProps:B,orientation:E,scatterChartProps:I,legendProps:J,data:O,gridAxis:Q,tickLine:$,strokeDasharray:G,gridProps:H,tooltipAnimationDuration:R,tooltipProps:V,children:Z,onMouseLeave:U,dataKey:ee,textColor:te,gridColor:ae,xAxisLabel:re,yAxisLabel:se,unit:oe,labels:ie,valueFormatter:ne,scatterProps:le,pointLabels:ce,attributes:de,...me}=a,pe=e=>"function"==typeof ne?ne:ne?.[e],he=pe("x"),ue=pe("y"),xe=(0,b.xd)(),ve=O.map(e=>({...e,data:e.data.map(t=>({...t,name:e.name}))})),{resolvedClassNames:ye,resolvedStyles:fe}=(0,C.Y)({classNames:r,styles:g,props:a}),ke=(0,P.I)({name:"ScatterChart",classes:j.A,props:a,className:i,style:f,classNames:r,styles:g,unstyled:_,attributes:de,vars:F,varsResolver:z}),ge="none"!==Q&&("x"===$||"xy"===$),Ae="none"!==Q&&("y"===$||"xy"===$),[be,Ce]=(0,o.useState)(null),Pe=null!==be,Se=K?.map((e,t)=>{const a=(0,k.r)(e.color,xe);return(0,s.jsx)(n.e,{stroke:e.color?a:"var(--chart-grid-color)",strokeWidth:1,...e,label:{value:e.label,fill:e.color?a:"currentColor",fontSize:12,position:e.labelPosition??"insideBottomLeft"},...ke("referenceLine")},t)}),Le=ve.map((e,t)=>{const a=Pe&&be!==e.name;return(0,s.jsxs)(l.X,{data:e.data,fill:(0,k.r)(e.color,xe),isAnimationActive:!1,fillOpacity:a?.1:1,...le,children:[ce&&(0,s.jsx)(c.Z,{dataKey:ee[ce],fontSize:8,dy:10}),le?.children]},t)});return(0,s.jsx)(S.a,{ref:t,...ke("root"),onMouseLeave:e=>{Ce(null),U?.(e)},dir:T||"ltr",...me,children:(0,s.jsx)(d.u,{...ke("container"),children:(0,s.jsxs)(m.t,{margin:{bottom:re?30:void 0,left:se?10:void 0,right:se?5:void 0},...I,children:[(0,s.jsx)(p.d,{strokeDasharray:G,vertical:"y"===Q||"xy"===Q,horizontal:"x"===Q||"xy"===Q,...ke("grid"),...H}),(0,s.jsxs)(h.W,{type:"number",hide:!W,dataKey:ee.x,tick:{transform:"translate(0, 10)",fontSize:12,fill:"currentColor"},stroke:"",interval:"preserveStartEnd",tickLine:!!ge&&{stroke:"currentColor"},minTickGap:5,unit:oe?.x,tickFormatter:he,...ke("axis"),...q,children:[re&&(0,s.jsx)(u.J,{position:"insideBottom",offset:-20,fontSize:12,...ke("axisLabel"),children:re}),q?.children]}),(0,s.jsxs)(x.h,{type:"number",hide:!X,axisLine:!1,dataKey:ee.y,tickLine:!!Ae&&{stroke:"currentColor"},tick:{transform:"translate(-10, 0)",fontSize:12,fill:"currentColor"},allowDecimals:!0,unit:oe?.y,tickFormatter:ue,...ke("axis"),...B,children:[se&&(0,s.jsx)(u.J,{position:"insideLeft",angle:-90,textAnchor:"middle",fontSize:12,offset:-5,...ke("axisLabel"),children:se}),B?.children]}),M&&(0,s.jsx)(v.m,{animationDuration:R,isAnimationActive:0!==R,position:{y:0},cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1,strokeDasharray:G},content:({label:e,payload:t})=>(0,s.jsx)(D.I,{type:"scatter",label:e,payload:ie?t?.map(e=>({...e,name:ie[N(e.name,ee)]||e.name,value:pe(N(e.name,ee))?.(e.value)??e.value})):t?.map(e=>({...e,value:pe(N(e.name,ee))?.(e.value)??e.value})),classNames:ye,styles:fe,series:O,attributes:de}),...V}),Y&&(0,s.jsx)(y.s,{verticalAlign:"top",content:e=>(0,s.jsx)(L._,{payload:e.payload?.map((e,t)=>({...e,dataKey:O[t].name})),onHighlight:Ce,legendPosition:J?.verticalAlign||"top",classNames:ye,styles:fe,series:O,attributes:de}),height:44,...J}),Se,Le]})})})});_.displayName="@mantine/charts/ScatterChart",_.classes=j.A,a(9319);var F=a(3837),K=a(7479),T=a(8734);const Y=function(e){var t=e.setProps,a=e.loading_state,s=(e.clickData,e.hoverData,e.clickSeriesName,e.hoverSeriesName,e.scatterProps),o=e.valueFormatter,n=e.tooltipProps,l=(0,r.Tt)(e,["setProps","loading_state","clickData","hoverData","clickSeriesName","hoverSeriesName","scatterProps","valueFormatter","tooltipProps"]),c=(0,r.Cl)((0,r.Cl)({},s),{onClick:function(e){if((0,F.$Q)(e)){var a=(0,F.zD)(e);t({clickData:a,clickSeriesName:a.name})}},onMouseOver:function(e){if((0,F.$Q)(e)){var a=(0,F.zD)(e);t({hoverData:a,hoverSeriesName:a.name})}}});return i().createElement(_,(0,r.Cl)({"data-dash-is-loading":(0,K.A_)(a)||void 0,scatterProps:c,valueFormatter:(0,T.q)(o),tooltipProps:(0,T.q)(n)},l))}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkdash_mantine_components=self.webpackChunkdash_mantine_components||[]).push([[107],{9659:(e,t,s)=>{s.r(t),s.d(t,{default:()=>j});var a=s(1635),l=s(4848),r=s(295),n=s.n(r),i=s(4653),o=s(300),c=s(4124),d=s(9396),u=s(6344),p=s(2412),v=s(6100),h=s(2837),m=s(4791),y=s(1072);const f={},k={withGradient:!0,connectNulls:!0,fillOpacity:.6,strokeWidth:2,curveType:"linear"};function N(e,t){const s=e[0],a=e[e.length-1];return null===s||null===a?t.neutral||t.positive:s<a?t.positive:s>a?t.negative:t.neutral||t.positive}const x=(0,d.V)((
|
|
1
|
+
"use strict";(self.webpackChunkdash_mantine_components=self.webpackChunkdash_mantine_components||[]).push([[107],{9659:(e,t,s)=>{s.r(t),s.d(t,{default:()=>j});var a=s(1635),l=s(4848),r=s(295),n=s.n(r),i=s(4653),o=s(300),c=s(4124),d=s(9396),u=s(6344),p=s(2412),v=s(6100),h=s(2837),m=s(4791),y=s(1072);const f={},k={withGradient:!0,connectNulls:!0,fillOpacity:.6,strokeWidth:2,curveType:"linear"};function N(e,t){const s=e[0],a=e[e.length-1];return null===s||null===a?t.neutral||t.positive:s<a?t.positive:s>a?t.negative:t.neutral||t.positive}const x=(0,d.V)((e,{color:t,data:s,trendColors:a})=>({root:{"--chart-color":a?(0,u.r)(N(s,a),e):t?(0,u.r)(t,e):void 0}})),_=(0,p.P9)((e,t)=>{const s=(0,v.Y)("Sparkline",k,e),{classNames:a,className:n,style:d,styles:u,unstyled:p,vars:N,data:_,withGradient:b,fillOpacity:j,curveType:g,strokeWidth:w,trendColors:C,connectNulls:G,areaProps:O,attributes:P,...A}=s,S=(0,h.I)({name:"Sparkline",classes:f,props:s,className:n,style:d,classNames:a,styles:u,unstyled:p,attributes:P,vars:N,varsResolver:x}),T=(0,r.useId)(),W=(0,r.useMemo)(()=>_.map((e,t)=>({value:e,index:t})),[_]);return(0,l.jsx)(m.a,{ref:t,...S("root"),...A,dir:"ltr",children:(0,l.jsx)(i.u,{children:(0,l.jsxs)(o.Q,{data:W,children:[(0,l.jsx)(c.G,{dataKey:"value",type:g,fill:`url(#${T})`,stroke:"var(--chart-color, var(--mantine-color-blue-filled))",isAnimationActive:!1,connectNulls:G,strokeWidth:w,fillOpacity:1,...O}),(0,l.jsx)("defs",{children:(0,l.jsx)(y.s,{id:T,color:"var(--chart-color, var(--mantine-color-blue-filled))",fillOpacity:j,withGradient:b})})]})})})});_.displayName="@mantine/charts/Sparkline",_.classes=f,s(9319);var b=s(7479);const j=function(e){e.setProps;var t=e.loading_state,s=(0,a.Tt)(e,["setProps","loading_state"]);return n().createElement(_,(0,a.Cl)({"data-dash-is-loading":(0,b.A_)(t)||void 0},s))}}}]);
|