@sysvale/cuida 3.25.3 → 3.26.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.
@@ -17314,10 +17314,10 @@ const PB = {
17314
17314
  }
17315
17315
  },
17316
17316
  mounted() {
17317
- console.log("\u{1F680} -> file: LineChart.vue:257 -> this.scales:", this.scales), this.chartOptions = {
17317
+ this.chartOptions = {
17318
17318
  ...this.chartOptions,
17319
17319
  ...this.scales
17320
- }, console.log("\u{1F680} -> file: LineChart.vue:256 -> chartOptions:", this.chartOptions);
17320
+ };
17321
17321
  },
17322
17322
  methods: {
17323
17323
  paleteBuilder: Ur,
@@ -17382,7 +17382,7 @@ function LB(t, e, n, i, s, r) {
17382
17382
  ])
17383
17383
  ]);
17384
17384
  }
17385
- const zB = /* @__PURE__ */ me(PB, [["render", LB], ["__scopeId", "data-v-b0fa56a0"]]);
17385
+ const zB = /* @__PURE__ */ me(PB, [["render", LB], ["__scopeId", "data-v-88deb5d1"]]);
17386
17386
  const VB = {
17387
17387
  components: {
17388
17388
  Pie: FL
@@ -17724,6 +17724,12 @@ const jB = {
17724
17724
  default: "green",
17725
17725
  validator: (t) => ["green", "turquoise", "blue", "indigo", "violet", "pink", "red", "orange", "amber", "gray", "dark"].includes(t)
17726
17726
  },
17727
+ theme: {
17728
+ type: String,
17729
+ required: !1,
17730
+ default: "",
17731
+ validator: (t) => ["green", "teal", "turquoise", "blue", "indigo", "violet", "pink", "red", "orange", "amber", "gray", "dark"].includes(t)
17732
+ },
17727
17733
  labels: {
17728
17734
  type: Array,
17729
17735
  required: !0,
@@ -17817,12 +17823,12 @@ const jB = {
17817
17823
  methods: {
17818
17824
  paleteBuilder: Ur,
17819
17825
  palete() {
17820
- this.palletColors = this.paleteBuilder(this.sassColorVariables.palete), this.removeFirstElement();
17826
+ this.theme.length ? this.palletColors = this.paleteBuilder(this.sassColorVariables.chartThemes) : (this.palletColors = this.paleteBuilder(this.sassColorVariables.palete), this.removeFirstTwoElements());
17821
17827
  },
17822
- removeFirstElement() {
17828
+ removeFirstTwoElements() {
17823
17829
  for (let t = 0; t < this.palletColors.length; t++) {
17824
17830
  const e = this.palletColors[t];
17825
- this.deleteFirstTwoColors === !1 && (e.colorShades.splice(0, 1), e.colorTokens.splice(0, 2), e.colorData.splice(0, 1));
17831
+ this.deleteFirstTwoColors === !1 && (e.colorShades.splice(0, 2), e.colorTokens.splice(0, 2), e.colorData.splice(0, 2));
17826
17832
  }
17827
17833
  },
17828
17834
  addDataSetNames() {
@@ -17833,33 +17839,32 @@ const jB = {
17833
17839
  });
17834
17840
  },
17835
17841
  mergeChartDataNoSelect(t) {
17836
- var i;
17837
17842
  const e = { labels: this.localLabels, datasets: [] };
17838
- this.addDataSetNames(), t.forEach((s) => {
17839
- s.datasets.forEach((r) => {
17840
- const a = {
17841
- label: r.label,
17842
- data: r.data,
17843
- name: r.name,
17844
- variant: r.variant,
17843
+ this.addDataSetNames(), t.forEach((i) => {
17844
+ i.datasets.forEach((s) => {
17845
+ const r = {
17846
+ label: s.label,
17847
+ data: s.data,
17848
+ name: s.name,
17845
17849
  borderRadius: 6
17846
17850
  };
17847
- e.datasets.push(a);
17851
+ e.datasets.push(r);
17848
17852
  });
17849
- });
17850
- const n = typeof ((i = this.data[0].datasets[0]) == null ? void 0 : i.variant) < "u";
17851
- if (this.palete(), n)
17852
- this.setMultiColors(e.datasets), this.localChartData = e;
17853
- else {
17854
- const s = this.getPalete();
17855
- this.setColors(e.datasets, s), this.localChartData = e;
17856
- }
17853
+ }), this.palete();
17854
+ const n = this.generateBackgroundColor();
17855
+ this.setColors(e.datasets, n), this.localChartData = e;
17857
17856
  },
17858
17857
  getPalete(t = this.variant) {
17859
17858
  const e = t.toLowerCase(), n = this.palletColors.find((i) => i.variantName.toLowerCase().includes(e));
17860
17859
  if (n)
17861
17860
  return n.colorShades;
17862
17861
  },
17862
+ generateBackgroundColor() {
17863
+ let t = this.variant.toLowerCase();
17864
+ this.theme.length && (t = this.theme.toLowerCase());
17865
+ const e = this.palletColors.find((n) => n.variantName.toLowerCase() === t);
17866
+ return e ? this.fill ? e.colorShades.map((i) => i + "80") : e.colorShades : [];
17867
+ },
17863
17868
  setMultiColors(t) {
17864
17869
  const e = {};
17865
17870
  let n = 0;
@@ -17892,7 +17897,7 @@ function qB(t, e, n, i, s, r) {
17892
17897
  ])
17893
17898
  ]);
17894
17899
  }
17895
- const GB = /* @__PURE__ */ me(jB, [["render", qB], ["__scopeId", "data-v-53c28ee2"]]);
17900
+ const GB = /* @__PURE__ */ me(jB, [["render", qB], ["__scopeId", "data-v-a0e865bb"]]);
17896
17901
  const ip = {
17897
17902
  props: {
17898
17903
  padding: {
@@ -29218,7 +29223,7 @@ function rse(t, e, n, i, s, r) {
29218
29223
  }, null, 8, ["text", "variant"]))
29219
29224
  ]);
29220
29225
  }
29221
- const ase = /* @__PURE__ */ me(ese, [["render", rse], ["__scopeId", "data-v-a4be2019"]]);
29226
+ const ase = /* @__PURE__ */ me(ese, [["render", rse], ["__scopeId", "data-v-2b71d10e"]]);
29222
29227
  const Pp = {
29223
29228
  components: {
29224
29229
  CdsIcon: mt
@@ -29601,7 +29606,7 @@ const Sse = {
29601
29606
  this.$emit("update:modelValue", t);
29602
29607
  },
29603
29608
  modelValue(t) {
29604
- console.log("v-model", t), this.isActive = t;
29609
+ this.isActive = t;
29605
29610
  }
29606
29611
  },
29607
29612
  mounted() {
@@ -29711,7 +29716,7 @@ function Pse(t, e, n, i, s, r) {
29711
29716
  ])
29712
29717
  ], 10, Cse);
29713
29718
  }
29714
- const Ese = /* @__PURE__ */ me(Sse, [["render", Pse], ["__scopeId", "data-v-24ad8b5d"]]);
29719
+ const Ese = /* @__PURE__ */ me(Sse, [["render", Pse], ["__scopeId", "data-v-544de446"]]);
29715
29720
  const Ep = {
29716
29721
  props: {
29717
29722
  value: {