@bikdotai/bik-component-library 0.0.455-analyticsv3-03 → 0.0.455-analyticsv3-05

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("chart.js"),i=require("react-chartjs-2"),o=require("../../../TypographyStyle.js"),a=require("../../../../constants/Theme.js"),n=require("./StackedBarChart.model.js"),l=require("./StackedBarChart.styles.js");t.Chart.register(t.CategoryScale,t.LinearScale,t.BarElement,t.Tooltip,t.Legend);exports.StackedBarChart=t=>{var r,s,d,c,O,A,u,x,v,g,R,p,y,T,C,F,N,S;const h=0===t.yAxis.data.length,b=t.colorSchema===n.COLOR_SCHEMA.PASTEL?["#E6C7FF","#FEC6C6","#FEDEF3","#DEEFFF","#FFD8B1","#C7E5FF","#FFD3E6","#C9FFE5","#FFE3C7","#D9D9FF"]:["#5E07BB","#9E77ED","#D2AEFF","#F7D7FF","#CDE1FF","#92AFFA","#3935E1"],E={barPercentage:.4,categoryPercentage:1,borderRadius:{topLeft:4,topRight:4,bottomLeft:4,bottomRight:4},pointStyle:"circle"},I={};t.yAxis.data.map((e=>{e.map((e=>{I[e.name]?I[e.name].push(e.value):I[e.name]=[e.value]}))}));const H=Object.keys(I).map(((e,t)=>Object.assign({label:e,data:I[e],backgroundColor:b[t]},E))),L={plugins:{legend:{display:!h,labels:{usePointStyle:!0,fontSize:2}},tooltip:{enabled:!h}},responsive:!0,maintainAspectRatio:!1,legend:{display:!0,labels:{usePointStyle:!0}},indexAxis:t.orientation===n.GRAPH_ORIENTATION.HORIZONTAL?"y":"x",scales:{x:{title:{display:!!(t.orientation===n.GRAPH_ORIENTATION.HORIZONTAL?null===(r=t.yAxis)||void 0===r?void 0:r.title:null===(s=t.xAxis)||void 0===s?void 0:s.title),text:t.orientation===n.GRAPH_ORIENTATION.HORIZONTAL?null===(d=t.yAxis)||void 0===d?void 0:d.title:null===(c=t.xAxis)||void 0===c?void 0:c.title,color:null!==(u=t.orientation===n.GRAPH_ORIENTATION.HORIZONTAL?null===(O=t.yAxis)||void 0===O?void 0:O.titleColor:null===(A=t.xAxis)||void 0===A?void 0:A.titleColor)&&void 0!==u?u:a.COLORS.content.secondary,font:{size:a.FONTS.caption.fontSize}},grid:{display:t.orientation===n.GRAPH_ORIENTATION.HORIZONTAL,color:a.COLORS.background.base},ticks:{fontSize:a.FONTS.caption.fontSize,color:null!==(x=t.yAxis.labelColor)&&void 0!==x?x:a.COLORS.content.secondary},stacked:!0},y:{title:{display:!!(t.orientation===n.GRAPH_ORIENTATION.HORIZONTAL?null===(v=t.xAxis)||void 0===v?void 0:v.title:null===(g=t.yAxis)||void 0===g?void 0:g.title),text:t.orientation===n.GRAPH_ORIENTATION.HORIZONTAL?null===(R=t.xAxis)||void 0===R?void 0:R.title:null===(p=t.yAxis)||void 0===p?void 0:p.title,color:null!==(C=t.orientation===n.GRAPH_ORIENTATION.HORIZONTAL?null===(y=t.xAxis)||void 0===y?void 0:y.titleColor:null===(T=t.yAxis)||void 0===T?void 0:T.titleColor)&&void 0!==C?C:a.COLORS.content.secondary,font:{size:a.FONTS.caption.fontSize}},grid:{display:t.orientation!==n.GRAPH_ORIENTATION.HORIZONTAL,color:a.COLORS.background.base},ticks:Object.assign({fontSize:a.FONTS.caption.fontSize,color:null!==(F=t.xAxis.labelColor)&&void 0!==F?F:a.COLORS.content.secondary},h?{min:0,max:2e3,stepSize:200}:{}),stacked:!0}},onClick:(e,i)=>{if(!t.onBarClick)return;const o=i[0].datasetIndex,a=i[0].index,n=e.chart.data.datasets[o].label,l=e.chart.data.labels[a];t.onBarClick(l,n)},onHover:(e,i)=>{t.onBarClick&&i.length&&(e.native.target.style.cursor="pointer")}},j={labels:t.xAxis.data.map((e=>"string"==typeof e?e:e.name)),datasets:h?[{data:[250,1e3,800,1500,300,600],backgroundColor:"rgba(0,0,0,0)"}]:H};return e.jsxs(l.GraphContainerWrapper,Object.assign({padding:t.outerPadding},{children:[t.chartHeading&&e.jsx("div",Object.assign({style:{marginBottom:24}},{children:e.jsx(o.TitleRegular,Object.assign({color:null!==(N=t.chartHeading.color)&&void 0!==N?N:a.COLORS.content.secondary},{children:t.chartHeading.heading}))})),e.jsx("div",Object.assign({style:{height:null!==(S=t.graphCanvasHeight)&&void 0!==S?S:500}},{children:e.jsx(i.Bar,{options:L,data:j})}))]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("chart.js"),i=require("react-chartjs-2"),o=require("../../../TypographyStyle.js"),a=require("../../../../constants/Theme.js"),n=require("./StackedBarChart.model.js"),l=require("./StackedBarChart.styles.js");t.Chart.register(t.CategoryScale,t.LinearScale,t.BarElement,t.Tooltip,t.Legend);exports.StackedBarChart=t=>{var r,s,d,c,O,A,u,v,x,R,g,p,T,y,C,N,S,F,I,h;const E=0===t.yAxis.data.length,b=t.colorSchema===n.COLOR_SCHEMA.PASTEL?["#E6C7FF","#FEC6C6","#FEDEF3","#DEEFFF","#FFD8B1","#C7E5FF","#FFD3E6","#C9FFE5","#FFE3C7","#D9D9FF"]:["#5E07BB","#9E77ED","#D2AEFF","#F7D7FF","#CDE1FF","#92AFFA","#3935E1"],H={barPercentage:.4,categoryPercentage:1,borderRadius:{topLeft:4,topRight:4,bottomLeft:4,bottomRight:4},pointStyle:"circle"},L={};t.yAxis.data.map((e=>{e.map((e=>{L[e.name]?L[e.name].push(e.value):L[e.name]=[e.value]}))}));const j=Object.keys(L).map(((e,t)=>Object.assign({label:e,data:L[e],backgroundColor:b[t]},H))),m={plugins:{legend:{display:!E,labels:{usePointStyle:!0,fontSize:2}},tooltip:{enabled:!E}},responsive:!0,maintainAspectRatio:!1,legend:{display:!0,labels:{usePointStyle:!0}},indexAxis:t.orientation===n.GRAPH_ORIENTATION.HORIZONTAL?"y":"x",scales:{x:{title:{display:!!(t.orientation===n.GRAPH_ORIENTATION.HORIZONTAL?null===(r=t.yAxis)||void 0===r?void 0:r.title:null===(s=t.xAxis)||void 0===s?void 0:s.title),text:t.orientation===n.GRAPH_ORIENTATION.HORIZONTAL?null===(d=t.yAxis)||void 0===d?void 0:d.title:null===(c=t.xAxis)||void 0===c?void 0:c.title,color:null!==(u=t.orientation===n.GRAPH_ORIENTATION.HORIZONTAL?null===(O=t.yAxis)||void 0===O?void 0:O.titleColor:null===(A=t.xAxis)||void 0===A?void 0:A.titleColor)&&void 0!==u?u:a.COLORS.content.secondary,font:{size:a.FONTS.caption.fontSize}},grid:{display:t.orientation===n.GRAPH_ORIENTATION.HORIZONTAL,color:a.COLORS.background.base},ticks:{fontSize:a.FONTS.caption.fontSize,color:null!==(v=t.yAxis.labelColor)&&void 0!==v?v:a.COLORS.content.secondary},stacked:!0},y:{title:{display:!!(t.orientation===n.GRAPH_ORIENTATION.HORIZONTAL?null===(x=t.xAxis)||void 0===x?void 0:x.title:null===(R=t.yAxis)||void 0===R?void 0:R.title),text:t.orientation===n.GRAPH_ORIENTATION.HORIZONTAL?null===(g=t.xAxis)||void 0===g?void 0:g.title:null===(p=t.yAxis)||void 0===p?void 0:p.title,color:null!==(C=t.orientation===n.GRAPH_ORIENTATION.HORIZONTAL?null===(T=t.xAxis)||void 0===T?void 0:T.titleColor:null===(y=t.yAxis)||void 0===y?void 0:y.titleColor)&&void 0!==C?C:a.COLORS.content.secondary,font:{size:a.FONTS.caption.fontSize}},grid:{display:t.orientation!==n.GRAPH_ORIENTATION.HORIZONTAL,color:a.COLORS.background.base},ticks:Object.assign({stepSize:t.orientation===n.GRAPH_ORIENTATION.HORIZONTAL?null===(N=t.xAxis)||void 0===N?void 0:N.stepSize:null===(S=t.yAxis)||void 0===S?void 0:S.stepSize,fontSize:a.FONTS.caption.fontSize,color:null!==(F=t.xAxis.labelColor)&&void 0!==F?F:a.COLORS.content.secondary},E?{min:0,max:2e3,stepSize:200}:{}),stacked:!0}},onClick:(e,i)=>{if(!t.onBarClick)return;const o=i[0].datasetIndex,a=i[0].index,n=e.chart.data.datasets[o].label,l=e.chart.data.labels[a];t.onBarClick(l,n)},onHover:(e,i)=>{t.onBarClick&&i.length&&(e.native.target.style.cursor="pointer")}},P={labels:t.xAxis.data.map((e=>"string"==typeof e?e:e.name)),datasets:E?[{data:[250,1e3,800,1500,300,600],backgroundColor:"rgba(0,0,0,0)"}]:j};return e.jsxs(l.GraphContainerWrapper,Object.assign({padding:t.outerPadding},{children:[t.chartHeading&&e.jsx("div",Object.assign({style:{marginBottom:24}},{children:e.jsx(o.TitleRegular,Object.assign({color:null!==(I=t.chartHeading.color)&&void 0!==I?I:a.COLORS.content.secondary},{children:t.chartHeading.heading}))})),e.jsx("div",Object.assign({style:{height:null!==(h=t.graphCanvasHeight)&&void 0!==h?h:500}},{children:e.jsx(i.Bar,{options:m,data:P})}))]}))};
@@ -3,6 +3,7 @@ export interface AxisDetailsI {
3
3
  titleColor?: string;
4
4
  data: XAxisDataI[] | string[];
5
5
  labelColor?: string;
6
+ stepSize?: number;
6
7
  }
7
8
  export interface XAxisDataI {
8
9
  name: string;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../constants/Theme.js"),r=require("../TypographyStyle.js");const n=(r,n)=>n?t.COLORS.surface.standard:"secondary"==r?t.COLORS.stroke.brand:t.COLORS.content.placeholder,e=t=>"medium"===t?"5px,\n\t\ttransparent 5px,\n\t\ttransparent 10px":"6px,\n\t\ttransparent 6px,\n\t\ttransparent 12px";exports.GetButtonTextComponent=(t,n)=>"dashRegular"===n?r.BodySecondary:"chip"===t?r.BodyCaption:"small"===t?r.ButtonRegular:r.ButtonLarge,exports.SpinnerColorMap=(r,n)=>n?"primary"===r?t.COLORS.content.primary:t.COLORS.content.primaryInverse:"destructive"===r?t.COLORS.content.negative:t.COLORS.content.brand,exports.generateDisabledStyling=(r,n,e)=>"chip"===n?"background-color: transparent;":"primary"===r||"destructive"===r?e?"background-color: rgba(255,255,255,0.3);":`background-color: ${t.COLORS.background.inactive};`:"secondary"===r?e?"border: 1px solid rgba(255, 255, 255, 0.5);":`border: 1px solid ${t.COLORS.stroke.primary};`:"",exports.generateInverseHoverBackground=(r,n)=>n?"":"primary"===r?`background-color: ${t.COLORS.stroke.warning.lightAlt};`:"background-color: rgba(255, 255, 255, 0.1)",exports.getBackgroundColor=(r,n,e,o)=>{if("chip"===n)return"text"===r?"transparent":o?t.COLORS.surface.hovered:t.COLORS.surface.subdued;switch(r){case"primary":return e?t.COLORS.background.warning.vibrant:t.COLORS.background.inverseLight;case"destructive":return t.COLORS.background.negative.vibrant;case"tertiary":return e?"transparent":t.COLORS.surface.standard;default:return"transparent"}},exports.getBorder=(r,e,o,a)=>"text"==e?"border: none;":"chip"===o?`border: ${"2.0"===r?.5:1}px solid ${t.COLORS.stroke.primary};`:a?"secondary"===e?`border: ${"2.0"===r?.5:1}px solid ${n(e,a)};`:"border: none;":"secondary"===e?`border: ${"2.0"===r?.5:1}px solid ${n(e)};`:"border: none;",exports.getBorderColor=n,exports.getButtonIconColor=(r,n,e,o,a,i)=>"chip"===r?o?t.COLORS.content.inactive:i?t.COLORS.content.primary:t.COLORS.content.secondary:a?"transparent":"primary"===n||"destructive"===n?e?o?"rgba(255, 255, 255, 0.5)":t.COLORS.content.primary:o?t.COLORS.content.inactive:t.COLORS.content.primaryInverse:"secondary"===n||"tertiary"===n?e?o?"rgba(255, 255, 255, 0.5)":t.COLORS.content.primaryInverse:o?t.COLORS.content.inactive:t.COLORS.content.brand:"tertiaryGray"===n||n.startsWith("dash")?o?t.COLORS.content.inactive:t.COLORS.content.secondary:void 0,exports.getClickEffect=(r,n,e)=>"text"===r?`background-color: ${t.COLORS.background.brandLight};\n\t\t\ttext-decoration-line: underline;\n\t\t\ttext-decoration-color: ${t.COLORS.content.brand};`:"chip"===n?`border: 1px solid ${t.COLORS.stroke.brandLightAlt};\n\t\tbackground-color: ${t.COLORS.background.brandLight};`:"primary"===r||"destructive"===r?e?`background-color: ${t.COLORS.background.warning.vibrant} !important;\n\t\t\tbox-shadow: inset 0px 4px 12px rgba(0, 0, 0, 0.35);\n\t\t\t`:"box-shadow: inset 0px 4px 12px rgba(0, 0, 0, 0.35);":"secondary"===r||"tertiary"===r||"tertiaryGray"===r||r.startsWith("dash")?e?`background-color: ${t.COLORS.background.inverseLight} !important;`:`background-color: ${t.COLORS.background.brandLight};`:void 0,exports.getColor=(r,n,e,o)=>{if("chip"===n)return"text"===r?e?t.COLORS.content.inactive:t.COLORS.content.brand:o?t.COLORS.content.primary:t.COLORS.content.secondary;switch(r){case"primary":return e?t.COLORS.content.primary:t.COLORS.content.primaryInverse;case"tertiaryGray":case"dashBold":case"dashRegular":return t.COLORS.content.secondary;case"destructive":return t.COLORS.content.primaryInverse;default:return e?t.COLORS.content.primaryInverse:t.COLORS.stroke.brand}},exports.getDashedBorderStyling=function(t,r){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n(t);return`\n\t.line-top {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\ttop: 0;\n\t\theight: 1px;\n\t\twidth: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto right,\n\t\t\t${o},\n\t\t\t${o}\n\t\t\t\t${e(r)}\n\t\t);\n\t}\n\t.line-right {\n\t\tposition: absolute;\n\t\tright: 0;\n\t\ttop: 0;\n\t\twidth: 1px;\n\t\theight: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto bottom,\n\t\t\t${o},\n\t\t\t${o}\n\t\t\t\t${e(r)}\n\t\t);\n\t}\n\t.line-bottom {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\tbottom: 0;\n\t\theight: 1px;\n\t\twidth: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto right,\n\t\t\t${o},\n\t\t\t${o}\n\t\t\t\t${e(r)}\n\t\t);\n\t}\n\t.line-left {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\ttop: 0;\n\t\twidth: 1px;\n\t\theight: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto bottom,\n\t\t\t${o},\n\t\t\t${o}\n\t\t\t\t${e(r)}\n\t\t);\n\t}\n\t`},exports.getDisabledTextColor=r=>r?"rgba(255, 255, 255, 0.5)":t.COLORS.content.inactive,exports.getHoverButtonBackground=(t,r)=>"text"===t?"background-color:transparent;":r||"primary"===t?"":"background-color: #000000;\n\t\t\t\topacity: 0.03;",exports.getHoverButtonTextDecorationStyle=(r,n)=>n?"":`text-decoration-line: underline;\n\t\t\ttext-decoration-color: ${t.COLORS.content.brand};`,exports.getLinearGradientValue=e,exports.getLoadingBackground=(r,n,e)=>"chip"===n?`background-color: ${t.COLORS.background.base};`:"primary"===r?`background-color: ${e?t.COLORS.background.warning.vibrant:t.COLORS.background.brandLight};`:"destructive"===r?`background-color: ${t.COLORS.background.negative.light};`:"background-color: transparent;",exports.getLoadingBorder=(r,n,e)=>"chip"===n?"border: none;":"secondary"===r?e?`border: 1px solid ${t.COLORS.content.secondary};`:`border: 1px solid ${t.COLORS.stroke.brandLightAlt};`:"",exports.getPadding=(t,r)=>{if("text"===t)return"0px";if("chip"===r)return"4px 8px";if("small"===r)switch(t){case"tertiary":case"tertiaryGray":return"6px 4px";default:return"6px 12px"}else if("medium"===r)switch(t){case"tertiary":case"tertiaryGray":return"10px 4px";default:return"10px 12px"}else if("large"===r)switch(t){case"tertiary":case"tertiaryGray":return"14px 4px";default:return"14px 12px"}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../constants/Theme.js"),r=require("../TypographyStyle.js");const n=(r,n)=>n?t.COLORS.surface.standard:"secondary"==r?t.COLORS.stroke.brand:t.COLORS.content.placeholder,e=t=>"medium"===t?"5px,\n\t\ttransparent 5px,\n\t\ttransparent 10px":"6px,\n\t\ttransparent 6px,\n\t\ttransparent 12px";exports.GetButtonTextComponent=(t,n)=>"dashRegular"===n?r.BodySecondary:"chip"===t?r.BodyCaption:"small"===t?r.ButtonRegular:r.ButtonLarge,exports.SpinnerColorMap=(r,n)=>n?"primary"===r?t.COLORS.content.primary:t.COLORS.content.primaryInverse:"destructive"===r?t.COLORS.content.negative:t.COLORS.content.brand,exports.generateDisabledStyling=(r,n,e)=>"chip"===n?"background-color: transparent;":"primary"===r||"destructive"===r?e?"background-color: rgba(255,255,255,0.3);":`background-color: ${t.COLORS.background.inactive};`:"secondary"===r?e?"border: 1px solid rgba(255, 255, 255, 0.5);":`border: 1px solid ${t.COLORS.stroke.primary};`:"",exports.generateInverseHoverBackground=(r,n)=>n?"":"primary"===r?`background-color: ${t.COLORS.stroke.warning.lightAlt};`:"background-color: rgba(255, 255, 255, 0.1)",exports.getBackgroundColor=(r,n,e,o)=>{if("chip"===n)return"text"===r?"transparent":o?t.COLORS.surface.hovered:t.COLORS.surface.subdued;switch(r){case"primary":return e?t.COLORS.background.warning.vibrant:t.COLORS.background.inverseLight;case"destructive":return t.COLORS.background.negative.vibrant;default:return"transparent"}},exports.getBorder=(r,e,o,a)=>"text"==e?"border: none;":"chip"===o?`border: ${"2.0"===r?.5:1}px solid ${t.COLORS.stroke.primary};`:a?"secondary"===e?`border: ${"2.0"===r?.5:1}px solid ${n(e,a)};`:"border: none;":"secondary"===e?`border: ${"2.0"===r?.5:1}px solid ${n(e)};`:"border: none;",exports.getBorderColor=n,exports.getButtonIconColor=(r,n,e,o,a,i)=>"chip"===r?o?t.COLORS.content.inactive:i?t.COLORS.content.primary:t.COLORS.content.secondary:a?"transparent":"primary"===n||"destructive"===n?e?o?"rgba(255, 255, 255, 0.5)":t.COLORS.content.primary:o?t.COLORS.content.inactive:t.COLORS.content.primaryInverse:"secondary"===n||"tertiary"===n?e?o?"rgba(255, 255, 255, 0.5)":t.COLORS.content.primaryInverse:o?t.COLORS.content.inactive:t.COLORS.content.brand:"tertiaryGray"===n||n.startsWith("dash")?o?t.COLORS.content.inactive:t.COLORS.content.secondary:void 0,exports.getClickEffect=(r,n,e)=>"text"===r?`background-color: ${t.COLORS.background.brandLight};\n\t\t\ttext-decoration-line: underline;\n\t\t\ttext-decoration-color: ${t.COLORS.content.brand};`:"chip"===n?`border: 1px solid ${t.COLORS.stroke.brandLightAlt};\n\t\tbackground-color: ${t.COLORS.background.brandLight};`:"primary"===r||"destructive"===r?e?`background-color: ${t.COLORS.background.warning.vibrant} !important;\n\t\t\tbox-shadow: inset 0px 4px 12px rgba(0, 0, 0, 0.35);\n\t\t\t`:"box-shadow: inset 0px 4px 12px rgba(0, 0, 0, 0.35);":"secondary"===r||"tertiary"===r||"tertiaryGray"===r||r.startsWith("dash")?e?`background-color: ${t.COLORS.background.inverseLight} !important;`:`background-color: ${t.COLORS.background.brandLight};`:void 0,exports.getColor=(r,n,e,o)=>{if("chip"===n)return"text"===r?e?t.COLORS.content.inactive:t.COLORS.content.brand:o?t.COLORS.content.primary:t.COLORS.content.secondary;switch(r){case"primary":return e?t.COLORS.content.primary:t.COLORS.content.primaryInverse;case"tertiaryGray":case"dashBold":case"dashRegular":return t.COLORS.content.secondary;case"destructive":return t.COLORS.content.primaryInverse;default:return e?t.COLORS.content.primaryInverse:t.COLORS.stroke.brand}},exports.getDashedBorderStyling=function(t,r){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n(t);return`\n\t.line-top {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\ttop: 0;\n\t\theight: 1px;\n\t\twidth: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto right,\n\t\t\t${o},\n\t\t\t${o}\n\t\t\t\t${e(r)}\n\t\t);\n\t}\n\t.line-right {\n\t\tposition: absolute;\n\t\tright: 0;\n\t\ttop: 0;\n\t\twidth: 1px;\n\t\theight: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto bottom,\n\t\t\t${o},\n\t\t\t${o}\n\t\t\t\t${e(r)}\n\t\t);\n\t}\n\t.line-bottom {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\tbottom: 0;\n\t\theight: 1px;\n\t\twidth: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto right,\n\t\t\t${o},\n\t\t\t${o}\n\t\t\t\t${e(r)}\n\t\t);\n\t}\n\t.line-left {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\ttop: 0;\n\t\twidth: 1px;\n\t\theight: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto bottom,\n\t\t\t${o},\n\t\t\t${o}\n\t\t\t\t${e(r)}\n\t\t);\n\t}\n\t`},exports.getDisabledTextColor=r=>r?"rgba(255, 255, 255, 0.5)":t.COLORS.content.inactive,exports.getHoverButtonBackground=(t,r)=>"text"===t?"background-color:transparent;":r||"primary"===t?"":"background-color: #000000;\n\t\t\t\topacity: 0.03;",exports.getHoverButtonTextDecorationStyle=(r,n)=>n?"":`text-decoration-line: underline;\n\t\t\ttext-decoration-color: ${t.COLORS.content.brand};`,exports.getLinearGradientValue=e,exports.getLoadingBackground=(r,n,e)=>"chip"===n?`background-color: ${t.COLORS.background.base};`:"primary"===r?`background-color: ${e?t.COLORS.background.warning.vibrant:t.COLORS.background.brandLight};`:"destructive"===r?`background-color: ${t.COLORS.background.negative.light};`:"background-color: transparent;",exports.getLoadingBorder=(r,n,e)=>"chip"===n?"border: none;":"secondary"===r?e?`border: 1px solid ${t.COLORS.content.secondary};`:`border: 1px solid ${t.COLORS.stroke.brandLightAlt};`:"",exports.getPadding=(t,r)=>{if("text"===t)return"0px";if("chip"===r)return"4px 8px";if("small"===r)switch(t){case"tertiary":case"tertiaryGray":return"6px 4px";default:return"6px 12px"}else if("medium"===r)switch(t){case"tertiary":case"tertiaryGray":return"10px 4px";default:return"10px 12px"}else if("large"===r)switch(t){case"tertiary":case"tertiaryGray":return"14px 4px";default:return"14px 12px"}};
@@ -1 +1 @@
1
- import{jsxs as t,jsx as o}from"react/jsx-runtime";import{Chart as i,CategoryScale as e,LinearScale as n,BarElement as a,Tooltip as l,Legend as r}from"chart.js";import{Bar as s}from"react-chartjs-2";import{TitleRegular as d}from"../../../TypographyStyle.js";import{COLORS as c,FONTS as v}from"../../../../constants/Theme.js";import{COLOR_SCHEMA as p,GRAPH_ORIENTATION as g}from"./StackedBarChart.model.js";import{GraphContainerWrapper as x}from"./StackedBarChart.styles.js";i.register(e,n,a,l,r);const y=i=>{var e,n,a,l,r,y,u,m,A,F,b,h,O,C,f,E,S,k;const j=0===i.yAxis.data.length,H=i.colorSchema===p.PASTEL?["#E6C7FF","#FEC6C6","#FEDEF3","#DEEFFF","#FFD8B1","#C7E5FF","#FFD3E6","#C9FFE5","#FFE3C7","#D9D9FF"]:["#5E07BB","#9E77ED","#D2AEFF","#F7D7FF","#CDE1FF","#92AFFA","#3935E1"],R={barPercentage:.4,categoryPercentage:1,borderRadius:{topLeft:4,topRight:4,bottomLeft:4,bottomRight:4},pointStyle:"circle"},L={};i.yAxis.data.map((t=>{t.map((t=>{L[t.name]?L[t.name].push(t.value):L[t.name]=[t.value]}))}));const T=Object.keys(L).map(((t,o)=>Object.assign({label:t,data:L[t],backgroundColor:H[o]},R))),z={plugins:{legend:{display:!j,labels:{usePointStyle:!0,fontSize:2}},tooltip:{enabled:!j}},responsive:!0,maintainAspectRatio:!1,legend:{display:!0,labels:{usePointStyle:!0}},indexAxis:i.orientation===g.HORIZONTAL?"y":"x",scales:{x:{title:{display:!!(i.orientation===g.HORIZONTAL?null===(e=i.yAxis)||void 0===e?void 0:e.title:null===(n=i.xAxis)||void 0===n?void 0:n.title),text:i.orientation===g.HORIZONTAL?null===(a=i.yAxis)||void 0===a?void 0:a.title:null===(l=i.xAxis)||void 0===l?void 0:l.title,color:null!==(u=i.orientation===g.HORIZONTAL?null===(r=i.yAxis)||void 0===r?void 0:r.titleColor:null===(y=i.xAxis)||void 0===y?void 0:y.titleColor)&&void 0!==u?u:c.content.secondary,font:{size:v.caption.fontSize}},grid:{display:i.orientation===g.HORIZONTAL,color:c.background.base},ticks:{fontSize:v.caption.fontSize,color:null!==(m=i.yAxis.labelColor)&&void 0!==m?m:c.content.secondary},stacked:!0},y:{title:{display:!!(i.orientation===g.HORIZONTAL?null===(A=i.xAxis)||void 0===A?void 0:A.title:null===(F=i.yAxis)||void 0===F?void 0:F.title),text:i.orientation===g.HORIZONTAL?null===(b=i.xAxis)||void 0===b?void 0:b.title:null===(h=i.yAxis)||void 0===h?void 0:h.title,color:null!==(f=i.orientation===g.HORIZONTAL?null===(O=i.xAxis)||void 0===O?void 0:O.titleColor:null===(C=i.yAxis)||void 0===C?void 0:C.titleColor)&&void 0!==f?f:c.content.secondary,font:{size:v.caption.fontSize}},grid:{display:i.orientation!==g.HORIZONTAL,color:c.background.base},ticks:Object.assign({fontSize:v.caption.fontSize,color:null!==(E=i.xAxis.labelColor)&&void 0!==E?E:c.content.secondary},j?{min:0,max:2e3,stepSize:200}:{}),stacked:!0}},onClick:(t,o)=>{if(!i.onBarClick)return;const e=o[0].datasetIndex,n=o[0].index,a=t.chart.data.datasets[e].label,l=t.chart.data.labels[n];i.onBarClick(l,a)},onHover:(t,o)=>{i.onBarClick&&o.length&&(t.native.target.style.cursor="pointer")}},D={labels:i.xAxis.data.map((t=>"string"==typeof t?t:t.name)),datasets:j?[{data:[250,1e3,800,1500,300,600],backgroundColor:"rgba(0,0,0,0)"}]:T};return t(x,Object.assign({padding:i.outerPadding},{children:[i.chartHeading&&o("div",Object.assign({style:{marginBottom:24}},{children:o(d,Object.assign({color:null!==(S=i.chartHeading.color)&&void 0!==S?S:c.content.secondary},{children:i.chartHeading.heading}))})),o("div",Object.assign({style:{height:null!==(k=i.graphCanvasHeight)&&void 0!==k?k:500}},{children:o(s,{options:z,data:D})}))]}))};export{y as StackedBarChart};
1
+ import{jsxs as t,jsx as i}from"react/jsx-runtime";import{Chart as o,CategoryScale as e,LinearScale as n,BarElement as a,Tooltip as l,Legend as r}from"chart.js";import{Bar as s}from"react-chartjs-2";import{TitleRegular as d}from"../../../TypographyStyle.js";import{COLORS as c,FONTS as v}from"../../../../constants/Theme.js";import{COLOR_SCHEMA as p,GRAPH_ORIENTATION as x}from"./StackedBarChart.model.js";import{GraphContainerWrapper as g}from"./StackedBarChart.styles.js";o.register(e,n,a,l,r);const u=o=>{var e,n,a,l,r,u,y,A,m,F,b,O,h,C,f,S,E,k,H,j;const R=0===o.yAxis.data.length,z=o.colorSchema===p.PASTEL?["#E6C7FF","#FEC6C6","#FEDEF3","#DEEFFF","#FFD8B1","#C7E5FF","#FFD3E6","#C9FFE5","#FFE3C7","#D9D9FF"]:["#5E07BB","#9E77ED","#D2AEFF","#F7D7FF","#CDE1FF","#92AFFA","#3935E1"],L={barPercentage:.4,categoryPercentage:1,borderRadius:{topLeft:4,topRight:4,bottomLeft:4,bottomRight:4},pointStyle:"circle"},T={};o.yAxis.data.map((t=>{t.map((t=>{T[t.name]?T[t.name].push(t.value):T[t.name]=[t.value]}))}));const I=Object.keys(T).map(((t,i)=>Object.assign({label:t,data:T[t],backgroundColor:z[i]},L))),D={plugins:{legend:{display:!R,labels:{usePointStyle:!0,fontSize:2}},tooltip:{enabled:!R}},responsive:!0,maintainAspectRatio:!1,legend:{display:!0,labels:{usePointStyle:!0}},indexAxis:o.orientation===x.HORIZONTAL?"y":"x",scales:{x:{title:{display:!!(o.orientation===x.HORIZONTAL?null===(e=o.yAxis)||void 0===e?void 0:e.title:null===(n=o.xAxis)||void 0===n?void 0:n.title),text:o.orientation===x.HORIZONTAL?null===(a=o.yAxis)||void 0===a?void 0:a.title:null===(l=o.xAxis)||void 0===l?void 0:l.title,color:null!==(y=o.orientation===x.HORIZONTAL?null===(r=o.yAxis)||void 0===r?void 0:r.titleColor:null===(u=o.xAxis)||void 0===u?void 0:u.titleColor)&&void 0!==y?y:c.content.secondary,font:{size:v.caption.fontSize}},grid:{display:o.orientation===x.HORIZONTAL,color:c.background.base},ticks:{fontSize:v.caption.fontSize,color:null!==(A=o.yAxis.labelColor)&&void 0!==A?A:c.content.secondary},stacked:!0},y:{title:{display:!!(o.orientation===x.HORIZONTAL?null===(m=o.xAxis)||void 0===m?void 0:m.title:null===(F=o.yAxis)||void 0===F?void 0:F.title),text:o.orientation===x.HORIZONTAL?null===(b=o.xAxis)||void 0===b?void 0:b.title:null===(O=o.yAxis)||void 0===O?void 0:O.title,color:null!==(f=o.orientation===x.HORIZONTAL?null===(h=o.xAxis)||void 0===h?void 0:h.titleColor:null===(C=o.yAxis)||void 0===C?void 0:C.titleColor)&&void 0!==f?f:c.content.secondary,font:{size:v.caption.fontSize}},grid:{display:o.orientation!==x.HORIZONTAL,color:c.background.base},ticks:Object.assign({stepSize:o.orientation===x.HORIZONTAL?null===(S=o.xAxis)||void 0===S?void 0:S.stepSize:null===(E=o.yAxis)||void 0===E?void 0:E.stepSize,fontSize:v.caption.fontSize,color:null!==(k=o.xAxis.labelColor)&&void 0!==k?k:c.content.secondary},R?{min:0,max:2e3,stepSize:200}:{}),stacked:!0}},onClick:(t,i)=>{if(!o.onBarClick)return;const e=i[0].datasetIndex,n=i[0].index,a=t.chart.data.datasets[e].label,l=t.chart.data.labels[n];o.onBarClick(l,a)},onHover:(t,i)=>{o.onBarClick&&i.length&&(t.native.target.style.cursor="pointer")}},N={labels:o.xAxis.data.map((t=>"string"==typeof t?t:t.name)),datasets:R?[{data:[250,1e3,800,1500,300,600],backgroundColor:"rgba(0,0,0,0)"}]:I};return t(g,Object.assign({padding:o.outerPadding},{children:[o.chartHeading&&i("div",Object.assign({style:{marginBottom:24}},{children:i(d,Object.assign({color:null!==(H=o.chartHeading.color)&&void 0!==H?H:c.content.secondary},{children:o.chartHeading.heading}))})),i("div",Object.assign({style:{height:null!==(j=o.graphCanvasHeight)&&void 0!==j?j:500}},{children:i(s,{options:D,data:N})}))]}))};export{u as StackedBarChart};
@@ -3,6 +3,7 @@ export interface AxisDetailsI {
3
3
  titleColor?: string;
4
4
  data: XAxisDataI[] | string[];
5
5
  labelColor?: string;
6
+ stepSize?: number;
6
7
  }
7
8
  export interface XAxisDataI {
8
9
  name: string;
@@ -1 +1 @@
1
- import{COLORS as t}from"../../constants/Theme.js";import{BodySecondary as r,BodyCaption as n,ButtonRegular as e,ButtonLarge as a}from"../TypographyStyle.js";const o=(r,n,e,a)=>{if("chip"===n)return"text"===r?"transparent":a?t.surface.hovered:t.surface.subdued;switch(r){case"primary":return e?t.background.warning.vibrant:t.background.inverseLight;case"destructive":return t.background.negative.vibrant;case"tertiary":return e?"transparent":t.surface.standard;default:return"transparent"}},i=(r,n,e,a)=>{if("chip"===n)return"text"===r?e?t.content.inactive:t.content.brand:a?t.content.primary:t.content.secondary;switch(r){case"primary":return e?t.content.primary:t.content.primaryInverse;case"tertiaryGray":case"dashBold":case"dashRegular":return t.content.secondary;case"destructive":return t.content.primaryInverse;default:return e?t.content.primaryInverse:t.stroke.brand}},c=r=>r?"rgba(255, 255, 255, 0.5)":t.content.inactive,d=(t,r)=>{if("text"===t)return"0px";if("chip"===r)return"4px 8px";if("small"===r)switch(t){case"tertiary":case"tertiaryGray":return"6px 4px";default:return"6px 12px"}else if("medium"===r)switch(t){case"tertiary":case"tertiaryGray":return"10px 4px";default:return"10px 12px"}else if("large"===r)switch(t){case"tertiary":case"tertiaryGray":return"14px 4px";default:return"14px 12px"}},s=(t,o)=>"dashRegular"===o?r:"chip"===t?n:"small"===t?e:a,p=(r,n)=>n?t.surface.standard:"secondary"==r?t.stroke.brand:t.content.placeholder,b=(r,n,e,a)=>"text"==n?"border: none;":"chip"===e?`border: ${"2.0"===r?.5:1}px solid ${t.stroke.primary};`:a?"secondary"===n?`border: ${"2.0"===r?.5:1}px solid ${p(n,a)};`:"border: none;":"secondary"===n?`border: ${"2.0"===r?.5:1}px solid ${p(n)};`:"border: none;",u=t=>"medium"===t?"5px,\n\t\ttransparent 5px,\n\t\ttransparent 10px":"6px,\n\t\ttransparent 6px,\n\t\ttransparent 12px",g=(t,r)=>"text"===t?"background-color:transparent;":r||"primary"===t?"":"background-color: #000000;\n\t\t\t\topacity: 0.03;",l=(r,n)=>n?"":`text-decoration-line: underline;\n\t\t\ttext-decoration-color: ${t.content.brand};`,y=(r,n)=>n?"":"primary"===r?`background-color: ${t.stroke.warning.lightAlt};`:"background-color: rgba(255, 255, 255, 0.1)",h=(r,n,e)=>"chip"===n?"background-color: transparent;":"primary"===r||"destructive"===r?e?"background-color: rgba(255,255,255,0.3);":`background-color: ${t.background.inactive};`:"secondary"===r?e?"border: 1px solid rgba(255, 255, 255, 0.5);":`border: 1px solid ${t.stroke.primary};`:"",x=function(t,r){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p(t);return`\n\t.line-top {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\ttop: 0;\n\t\theight: 1px;\n\t\twidth: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto right,\n\t\t\t${n},\n\t\t\t${n}\n\t\t\t\t${u(r)}\n\t\t);\n\t}\n\t.line-right {\n\t\tposition: absolute;\n\t\tright: 0;\n\t\ttop: 0;\n\t\twidth: 1px;\n\t\theight: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto bottom,\n\t\t\t${n},\n\t\t\t${n}\n\t\t\t\t${u(r)}\n\t\t);\n\t}\n\t.line-bottom {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\tbottom: 0;\n\t\theight: 1px;\n\t\twidth: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto right,\n\t\t\t${n},\n\t\t\t${n}\n\t\t\t\t${u(r)}\n\t\t);\n\t}\n\t.line-left {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\ttop: 0;\n\t\twidth: 1px;\n\t\theight: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto bottom,\n\t\t\t${n},\n\t\t\t${n}\n\t\t\t\t${u(r)}\n\t\t);\n\t}\n\t`},k=(r,n,e)=>"text"===r?`background-color: ${t.background.brandLight};\n\t\t\ttext-decoration-line: underline;\n\t\t\ttext-decoration-color: ${t.content.brand};`:"chip"===n?`border: 1px solid ${t.stroke.brandLightAlt};\n\t\tbackground-color: ${t.background.brandLight};`:"primary"===r||"destructive"===r?e?`background-color: ${t.background.warning.vibrant} !important;\n\t\t\tbox-shadow: inset 0px 4px 12px rgba(0, 0, 0, 0.35);\n\t\t\t`:"box-shadow: inset 0px 4px 12px rgba(0, 0, 0, 0.35);":"secondary"===r||"tertiary"===r||"tertiaryGray"===r||r.startsWith("dash")?e?`background-color: ${t.background.inverseLight} !important;`:`background-color: ${t.background.brandLight};`:void 0,m=(r,n,e)=>"chip"===n?`background-color: ${t.background.base};`:"primary"===r?`background-color: ${e?t.background.warning.vibrant:t.background.brandLight};`:"destructive"===r?`background-color: ${t.background.negative.light};`:"background-color: transparent;",$=(r,n,e)=>"chip"===n?"border: none;":"secondary"===r?e?`border: 1px solid ${t.content.secondary};`:`border: 1px solid ${t.stroke.brandLightAlt};`:"",v=(r,n)=>n?"primary"===r?t.content.primary:t.content.primaryInverse:"destructive"===r?t.content.negative:t.content.brand,f=(r,n,e,a,o,i)=>"chip"===r?a?t.content.inactive:i?t.content.primary:t.content.secondary:o?"transparent":"primary"===n||"destructive"===n?e?a?"rgba(255, 255, 255, 0.5)":t.content.primary:a?t.content.inactive:t.content.primaryInverse:"secondary"===n||"tertiary"===n?e?a?"rgba(255, 255, 255, 0.5)":t.content.primaryInverse:a?t.content.inactive:t.content.brand:"tertiaryGray"===n||n.startsWith("dash")?a?t.content.inactive:t.content.secondary:void 0;export{s as GetButtonTextComponent,v as SpinnerColorMap,h as generateDisabledStyling,y as generateInverseHoverBackground,o as getBackgroundColor,b as getBorder,p as getBorderColor,f as getButtonIconColor,k as getClickEffect,i as getColor,x as getDashedBorderStyling,c as getDisabledTextColor,g as getHoverButtonBackground,l as getHoverButtonTextDecorationStyle,u as getLinearGradientValue,m as getLoadingBackground,$ as getLoadingBorder,d as getPadding};
1
+ import{COLORS as t}from"../../constants/Theme.js";import{BodySecondary as r,BodyCaption as n,ButtonRegular as e,ButtonLarge as a}from"../TypographyStyle.js";const o=(r,n,e,a)=>{if("chip"===n)return"text"===r?"transparent":a?t.surface.hovered:t.surface.subdued;switch(r){case"primary":return e?t.background.warning.vibrant:t.background.inverseLight;case"destructive":return t.background.negative.vibrant;default:return"transparent"}},i=(r,n,e,a)=>{if("chip"===n)return"text"===r?e?t.content.inactive:t.content.brand:a?t.content.primary:t.content.secondary;switch(r){case"primary":return e?t.content.primary:t.content.primaryInverse;case"tertiaryGray":case"dashBold":case"dashRegular":return t.content.secondary;case"destructive":return t.content.primaryInverse;default:return e?t.content.primaryInverse:t.stroke.brand}},c=r=>r?"rgba(255, 255, 255, 0.5)":t.content.inactive,d=(t,r)=>{if("text"===t)return"0px";if("chip"===r)return"4px 8px";if("small"===r)switch(t){case"tertiary":case"tertiaryGray":return"6px 4px";default:return"6px 12px"}else if("medium"===r)switch(t){case"tertiary":case"tertiaryGray":return"10px 4px";default:return"10px 12px"}else if("large"===r)switch(t){case"tertiary":case"tertiaryGray":return"14px 4px";default:return"14px 12px"}},s=(t,o)=>"dashRegular"===o?r:"chip"===t?n:"small"===t?e:a,p=(r,n)=>n?t.surface.standard:"secondary"==r?t.stroke.brand:t.content.placeholder,b=(r,n,e,a)=>"text"==n?"border: none;":"chip"===e?`border: ${"2.0"===r?.5:1}px solid ${t.stroke.primary};`:a?"secondary"===n?`border: ${"2.0"===r?.5:1}px solid ${p(n,a)};`:"border: none;":"secondary"===n?`border: ${"2.0"===r?.5:1}px solid ${p(n)};`:"border: none;",g=t=>"medium"===t?"5px,\n\t\ttransparent 5px,\n\t\ttransparent 10px":"6px,\n\t\ttransparent 6px,\n\t\ttransparent 12px",u=(t,r)=>"text"===t?"background-color:transparent;":r||"primary"===t?"":"background-color: #000000;\n\t\t\t\topacity: 0.03;",l=(r,n)=>n?"":`text-decoration-line: underline;\n\t\t\ttext-decoration-color: ${t.content.brand};`,h=(r,n)=>n?"":"primary"===r?`background-color: ${t.stroke.warning.lightAlt};`:"background-color: rgba(255, 255, 255, 0.1)",y=(r,n,e)=>"chip"===n?"background-color: transparent;":"primary"===r||"destructive"===r?e?"background-color: rgba(255,255,255,0.3);":`background-color: ${t.background.inactive};`:"secondary"===r?e?"border: 1px solid rgba(255, 255, 255, 0.5);":`border: 1px solid ${t.stroke.primary};`:"",x=function(t,r){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p(t);return`\n\t.line-top {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\ttop: 0;\n\t\theight: 1px;\n\t\twidth: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto right,\n\t\t\t${n},\n\t\t\t${n}\n\t\t\t\t${g(r)}\n\t\t);\n\t}\n\t.line-right {\n\t\tposition: absolute;\n\t\tright: 0;\n\t\ttop: 0;\n\t\twidth: 1px;\n\t\theight: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto bottom,\n\t\t\t${n},\n\t\t\t${n}\n\t\t\t\t${g(r)}\n\t\t);\n\t}\n\t.line-bottom {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\tbottom: 0;\n\t\theight: 1px;\n\t\twidth: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto right,\n\t\t\t${n},\n\t\t\t${n}\n\t\t\t\t${g(r)}\n\t\t);\n\t}\n\t.line-left {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\ttop: 0;\n\t\twidth: 1px;\n\t\theight: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto bottom,\n\t\t\t${n},\n\t\t\t${n}\n\t\t\t\t${g(r)}\n\t\t);\n\t}\n\t`},k=(r,n,e)=>"text"===r?`background-color: ${t.background.brandLight};\n\t\t\ttext-decoration-line: underline;\n\t\t\ttext-decoration-color: ${t.content.brand};`:"chip"===n?`border: 1px solid ${t.stroke.brandLightAlt};\n\t\tbackground-color: ${t.background.brandLight};`:"primary"===r||"destructive"===r?e?`background-color: ${t.background.warning.vibrant} !important;\n\t\t\tbox-shadow: inset 0px 4px 12px rgba(0, 0, 0, 0.35);\n\t\t\t`:"box-shadow: inset 0px 4px 12px rgba(0, 0, 0, 0.35);":"secondary"===r||"tertiary"===r||"tertiaryGray"===r||r.startsWith("dash")?e?`background-color: ${t.background.inverseLight} !important;`:`background-color: ${t.background.brandLight};`:void 0,m=(r,n,e)=>"chip"===n?`background-color: ${t.background.base};`:"primary"===r?`background-color: ${e?t.background.warning.vibrant:t.background.brandLight};`:"destructive"===r?`background-color: ${t.background.negative.light};`:"background-color: transparent;",$=(r,n,e)=>"chip"===n?"border: none;":"secondary"===r?e?`border: 1px solid ${t.content.secondary};`:`border: 1px solid ${t.stroke.brandLightAlt};`:"",v=(r,n)=>n?"primary"===r?t.content.primary:t.content.primaryInverse:"destructive"===r?t.content.negative:t.content.brand,f=(r,n,e,a,o,i)=>"chip"===r?a?t.content.inactive:i?t.content.primary:t.content.secondary:o?"transparent":"primary"===n||"destructive"===n?e?a?"rgba(255, 255, 255, 0.5)":t.content.primary:a?t.content.inactive:t.content.primaryInverse:"secondary"===n||"tertiary"===n?e?a?"rgba(255, 255, 255, 0.5)":t.content.primaryInverse:a?t.content.inactive:t.content.brand:"tertiaryGray"===n||n.startsWith("dash")?a?t.content.inactive:t.content.secondary:void 0;export{s as GetButtonTextComponent,v as SpinnerColorMap,y as generateDisabledStyling,h as generateInverseHoverBackground,o as getBackgroundColor,b as getBorder,p as getBorderColor,f as getButtonIconColor,k as getClickEffect,i as getColor,x as getDashedBorderStyling,c as getDisabledTextColor,u as getHoverButtonBackground,l as getHoverButtonTextDecorationStyle,g as getLinearGradientValue,m as getLoadingBackground,$ as getLoadingBorder,d as getPadding};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bikdotai/bik-component-library",
3
- "version": "0.0.455-analyticsv3-03",
3
+ "version": "0.0.455-analyticsv3-05",
4
4
  "description": "Bik Component Library",
5
5
  "repository": {
6
6
  "type": "git",