@designsystem-se/af 35.4.1-beta.4 → 35.4.1-beta.6

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.
@@ -127,8 +127,6 @@ export class barChart {
127
127
  // Resizing chart while loading
128
128
  this.loadingResize = () => {
129
129
  const newHeight = this.setDims();
130
- this.setMargins(true);
131
- this.svg.attr('width', this.dims.width).attr('height', this.dims.height);
132
130
  this.barChartContainer.attr('transform', `translate(${this.margin.left + this.tickPadding + this.yTickSize},0)`);
133
131
  this.margin.right =
134
132
  this.getTextSize(this.xScale.domain()[1].toLocaleString()) / 2 +
@@ -153,10 +151,8 @@ export class barChart {
153
151
  0,
154
152
  this.dims.width - this.margin.right - this.margin.left
155
153
  ]);
156
- this.barSelection
157
- .attr('x', this.xFunction)
158
- .attr('width', this.widthFunction);
159
154
  this.setValueTicks();
155
+ this.adjustBarSize();
160
156
  };
161
157
  this.highlightBarGroup = (_event, datum) => {
162
158
  if (typeof datum === 'string') {
@@ -271,189 +267,33 @@ export class barChart {
271
267
  return 'barGroup' + key.replace(/[^A-Z0-9]+/gi, '');
272
268
  };
273
269
  this.updateBars = (fromLoading) => {
274
- this.barChartContainer
270
+ this.barSelection = this.barChartContainer.select('.interactiveElements')
275
271
  .selectAll('.barGroup')
276
272
  .data(this.mappedData)
277
- .join((enter) => {
278
- var _a, _b;
279
- const tempSelection = enter
280
- .append('g')
281
- .attr('class', 'barGroup')
282
- .attr('id', (d) => 'barGroup' + d.key.replace(/[^A-Z0-9]+/gi, ''));
283
- tempSelection
284
- .append('rect')
285
- .attr('class', 'bar')
286
- .style('cursor', 'pointer')
287
- .attr('ry', 4)
288
- .attr('rx', 4)
289
- .attr('y', (d) => this.afVariation === BarChartVariation.Horizontal
290
- ? this.yScale(d.key)
291
- : this.dims.height - this.margin.bottom)
292
- .attr('x', (d) => this.afVariation === BarChartVariation.Horizontal
293
- ? 2
294
- : this.xScale(d.key))
295
- .attr('width', () => this.afVariation === BarChartVariation.Horizontal
296
- ? 0
297
- : this.xScale.bandwidth())
298
- .attr('height', () => this.afVariation === BarChartVariation.Horizontal
299
- ? this.yScale.bandwidth()
300
- : 0)
301
- .on('mouseenter', this.hover)
302
- .on('mouseleave', this.hoverOut)
303
- .on('click', this.openTooltip)
304
- .transition()
305
- .duration(this.defaultDuration)
306
- .ease(d3.easePolyInOut)
307
- .attr('width', this.widthFunction)
308
- .attr('y', this.yFunction)
309
- .attr('height', this.heightFunction)
310
- .attr('fill', '#00005a');
311
- if (!((_b = (_a = this.chartData) === null || _a === void 0 ? void 0 : _a.meta) === null || _b === void 0 ? void 0 : _b.valueLabels))
312
- return tempSelection;
313
- tempSelection
314
- .append('text')
315
- .text((d) => d.value.toLocaleString())
316
- .attr('class', 'barText')
317
- .attr('font-size', this.fontSize)
318
- .attr('font-weight', '600')
319
- .attr('text-anchor', 'end')
320
- .style('pointer-events', 'none')
321
- .attr('y', (d) => this.afVariation === BarChartVariation.Horizontal
322
- ? this.yScale(d.key) + this.yScale.bandwidth() / 2
323
- : this.dims.height - this.margin.bottom)
324
- .attr('x', (d) => this.afVariation === BarChartVariation.Horizontal
325
- ? 2
326
- : this.xScale(d.key) + this.xScale.bandwidth() / 2)
327
- .transition()
328
- .duration(this.defaultDuration)
329
- .ease(d3.easePolyInOut)
330
- .attr('font-size', this.fontSize)
331
- .attr('font-weight', '600')
332
- .attr('x', (d) => this.afVariation === BarChartVariation.Horizontal
333
- ? this.xScale(d.value)
334
- : this.xScale(d.key) + this.xScale.bandwidth() / 2)
335
- .attr('y', (d) => this.afVariation === BarChartVariation.Horizontal
336
- ? this.yScale(d.key) + this.yScale.bandwidth() / 2
337
- : this.yScale(d.value))
338
- .attr('text-anchor', (d) => {
339
- if (this.afVariation === BarChartVariation.Vertical)
340
- return 'middle';
341
- return this.xScale(d.value) < d.len + this.tickPadding * 2
342
- ? 'start'
343
- : 'end';
344
- })
345
- .attr('dx', (d) => {
346
- if (this.afVariation === BarChartVariation.Horizontal)
347
- return this.xScale(d.value) < d.len + this.tickPadding * 2
348
- ? this.tickPadding
349
- : -this.tickPadding;
350
- return 0;
351
- })
352
- .attr('fill', (d) => {
353
- if (this.afVariation === BarChartVariation.Vertical)
354
- return 'black';
355
- return this.xScale(d.value) < d.len + this.tickPadding * 2
356
- ? 'black'
357
- : 'white';
358
- })
359
- .attr('dy', () => this.afVariation == BarChartVariation.Horizontal
360
- ? '0.35em'
361
- : '-0.25em')
362
- .style('pointer-events', 'none')
363
- .attrTween('text', (d, i, nodelist) => {
364
- const oldnum = parseFloat(nodelist[i].textContent.replace(/\s/g, ''))
365
- ? parseFloat(nodelist[i].textContent.replace(/\s/g, ''))
366
- : 0;
367
- const interpolatedValue = d3.interpolate(oldnum, d.value);
368
- return (t) => (nodelist[i].textContent = parseInt(interpolatedValue(t)).toLocaleString(undefined, this.numberFormat));
369
- });
370
- return tempSelection;
371
- }, (update) => {
372
- // Update ids to bars
373
- update.attr('id', (d) => 'barGroup' + d.key.replace(/[^A-Z0-9]+/gi, ''));
374
- // Mouse interaction to updated loading bars
375
- if (fromLoading) {
376
- update
377
- .select('rect')
378
- .on('mouseenter', this.hover)
379
- .on('mouseleave', this.hoverOut)
380
- .on('click', this.openTooltip)
381
- .attr('x', this.xFunction)
382
- .attr('y', (d) => this.afVariation === BarChartVariation.Horizontal
383
- ? this.yScale(d.key)
384
- : this.dims.height - this.margin.bottom)
385
- .attr('width', this.widthFunction)
386
- .attr('height', () => this.afVariation === BarChartVariation.Horizontal
387
- ? this.yScale.bandwidth()
388
- : 0)
389
- .attr('fill', '#00005a')
390
- .transition()
391
- .duration(this.defaultDuration)
392
- .ease(d3.easePolyInOut)
393
- .attr('y', this.yFunction)
394
- .attr('height', this.heightFunction)
395
- .on('end', () => this.barChartObserver.observe(this.chartDiv)); // Reset barchartObserver
396
- }
397
- else {
398
- update
399
- .select('rect')
400
- .transition()
401
- .duration(this.defaultDuration)
402
- .ease(d3.easePolyInOut)
403
- .attr('x', this.xFunction)
404
- .attr('y', this.yFunction)
405
- .attr('width', this.widthFunction)
406
- .attr('height', this.heightFunction)
407
- .attr('fill', '#00005a');
408
- }
409
- return update
410
- .select('text')
411
- .style('display', () => { var _a, _b; return ((_b = (_a = this.chartData) === null || _a === void 0 ? void 0 : _a.meta) === null || _b === void 0 ? void 0 : _b.valueLabels) ? null : 'none'; })
412
- .transition()
413
- .duration(this.defaultDuration)
414
- .ease(d3.easePolyInOut)
415
- .attr('font-size', this.fontSize)
416
- .attr('font-weight', '600')
417
- .attr('y', (d) => this.afVariation === BarChartVariation.Horizontal
418
- ? this.yScale(d.key) + this.yScale.bandwidth() / 2
419
- : this.yScale(d.value))
420
- .attr('x', (d) => this.afVariation === BarChartVariation.Horizontal
421
- ? this.xScale(d.value)
422
- : this.xScale(d.key) + this.xScale.bandwidth() / 2)
423
- .attr('text-anchor', (d) => {
424
- if (this.afVariation === BarChartVariation.Vertical)
425
- return 'middle';
426
- return this.xScale(d.value) < d.len + this.tickPadding * 2
427
- ? 'start'
428
- : 'end';
429
- })
430
- .attr('dx', (d) => {
431
- if (this.afVariation === BarChartVariation.Horizontal)
432
- return this.xScale(d.value) < d.len + this.tickPadding * 2
433
- ? this.tickPadding
434
- : -this.tickPadding;
435
- return 0;
436
- })
437
- .attr('fill', (d) => {
438
- if (this.afVariation === BarChartVariation.Vertical)
439
- return 'black';
440
- return this.xScale(d.value) < d.len + this.tickPadding * 2
441
- ? 'black'
442
- : 'white';
443
- })
444
- .attr('dy', () => this.afVariation == BarChartVariation.Horizontal
445
- ? '0.35em'
446
- : '-0.25em')
447
- .style('pointer-events', 'none')
448
- .attrTween('text', (d, i, nodelist) => {
449
- const oldnum = parseFloat(nodelist[i].textContent.replace(/\s/g, ''))
450
- ? parseFloat(nodelist[i].textContent.replace(/\s/g, ''))
451
- : 0;
452
- const interpolatedValue = d3.interpolate(oldnum, d.value);
453
- return (t) => (nodelist[i].textContent = parseInt(interpolatedValue(t)).toLocaleString(undefined, this.numberFormat));
454
- });
455
- }, (exit) => exit.remove());
456
- this.barSelection = this.barChartContainer.selectAll('rect');
273
+ .join('g')
274
+ .attr('class', 'barGroup')
275
+ .attr('id', (d) => this.barGroupID(d.key));
276
+ this.barSelection.selectAll('.bar')
277
+ .data((d) => {
278
+ return d.series;
279
+ })
280
+ .join('rect')
281
+ .attr('class', 'bar')
282
+ .style('cursor', 'pointer')
283
+ .attr('x', this.xFunction)
284
+ .attr('y', this.yFunction)
285
+ .attr('ry', 4)
286
+ .attr('rx', 4)
287
+ .attr('width', this.widthFunction)
288
+ .attr('height', this.heightFunction)
289
+ .attr('fill', (d) => this.colorFunction(d.serie))
290
+ .on('mouseenter', this.hover)
291
+ .on('mouseleave', this.hoverOut)
292
+ .on('click', this.openTooltip);
293
+ if (fromLoading) {
294
+ this.initLegend();
295
+ }
296
+ this.barSelection = this.barChartContainer.selectAll('.barGroup');
457
297
  this.textSelection = this.barChartContainer.selectAll('.barText');
458
298
  };
459
299
  // Setting position of text according to bar size
@@ -492,7 +332,7 @@ export class barChart {
492
332
  };
493
333
  this.reshapeData = () => {
494
334
  const toReturn = [];
495
- if (this.loading || !this.chartData) {
335
+ if (!this.chartData) {
496
336
  this.placeholderTicks.forEach((key) => {
497
337
  const tick = { key: key, series: [] };
498
338
  tick.series.push({
@@ -867,11 +707,11 @@ export class barChart {
867
707
  .html((d) => {
868
708
  return `<span>${d.serie}: <b style="font-weight:600;">${d.value.toLocaleString(undefined, this.numberFormat)}</b></span>`;
869
709
  });
870
- this.tooltip.style('visibility', 'visible');
710
+ this.tooltip.style('display', null);
871
711
  this.positionTooltip(this.tooltipData);
872
712
  };
873
713
  this.closeTooltip = () => {
874
- this.tooltip.style('visibility', 'hidden');
714
+ this.tooltip.style('display', 'none');
875
715
  };
876
716
  // Positions tooltip in horizontal mode
877
717
  this.positionTooltip = (data) => {
@@ -1010,12 +850,13 @@ export class barChart {
1010
850
  this.afChartData = undefined;
1011
851
  }
1012
852
  afChartDataUpdate(data) {
1013
- if (typeof data != 'string')
1014
- this.chartData = data;
1015
- else
1016
- this.chartData = JSON.parse(data);
1017
- if (this.chartData)
853
+ if (typeof data === 'string' && Object.keys(JSON.parse(data)).length > 0 || Object.keys(data).length > 0) {
854
+ if (typeof data != 'string')
855
+ this.chartData = data;
856
+ else
857
+ this.chartData = JSON.parse(data);
1018
858
  this.series = this.chartData.data.series.map(serie => serie.title);
859
+ }
1019
860
  this.mappedData = this.reshapeData();
1020
861
  // checking for width of each tick
1021
862
  this.mappedData.forEach((elem) => {
@@ -1108,7 +949,7 @@ export class barChart {
1108
949
  // Getting handle for tooltip
1109
950
  this.tooltip = d3.select('#' + this.afId);
1110
951
  this.tooltip.select('.tooltipClose').on('click', this.closeTooltip);
1111
- // Add heading placeholder for heading
952
+ this.tooltip.selectAll('.tooltipHeading').remove();
1112
953
  this.tooltip
1113
954
  .select('.tooltipHead')
1114
955
  .insert('h' + (parseInt(this.afHeadingLevel.replace(/\D/g, '')) + 1), ':first-child') // increment heading level by one
@@ -1116,7 +957,7 @@ export class barChart {
1116
957
  .style('font-size', '1rem')
1117
958
  .style('margin', '0 0.75rem 0.25rem 0 ')
1118
959
  .style('font-weight', '500');
1119
- this.tooltip.style('visibility', 'hidden');
960
+ this.tooltip.style('display', 'none');
1120
961
  }
1121
962
  initEmpty() {
1122
963
  d3.select(this.chartDiv).select('.chartSVG').remove();
@@ -1138,20 +979,20 @@ export class barChart {
1138
979
  .attr('role', 'img')
1139
980
  .attr('aria-label', this.chartData && this.chartData.title
1140
981
  ? 'Stapeldiagram om ' + this.chartData.title.toLowerCase()
1141
- : 'Stapeldiagram');
982
+ : 'Stapeldiagram').attr('style', 'display: flex;min-width: 0;width: 100%;height: auto;');
1142
983
  // Hide unusable components
1143
984
  d3.select(this.titleDiv)
1144
- .select(this.afHeadingLevel)
985
+ .append(this.afHeadingLevel)
986
+ .attr('class', 'loadingHeader')
1145
987
  .html(`${_t.loading}...`);
1146
988
  this.initYAxis(true);
1147
989
  this.initXAxis(true);
1148
990
  this.tooltip = d3.select('#' + this.afId);
1149
- this.tooltip.style('visibility', 'hidden');
991
+ this.tooltip.style('display', 'none');
1150
992
  this.loadingState(true);
1151
993
  }
1152
994
  loadingState(empty) {
1153
995
  this.loading = true;
1154
- console.log('loading!');
1155
996
  // close potentially open tooltip
1156
997
  if (this.tooltip)
1157
998
  this.closeTooltip();
@@ -1191,14 +1032,17 @@ export class barChart {
1191
1032
  this.xAxisHandle.attr('transform', `translate(0,${this.dims.height - this.margin.bottom})`);
1192
1033
  }
1193
1034
  const animateBars = () => {
1194
- this.barChartContainer.selectAll('.barGroup').remove();
1035
+ this.barChartContainer.selectAll('.interactiveElements').remove();
1195
1036
  this.barSelection = this.barChartContainer
1037
+ .append('g')
1038
+ .attr('class', 'interactiveElements')
1039
+ .style('isolation', 'isolate')
1196
1040
  .selectAll('barGroup')
1197
1041
  .data(this.mappedData)
1198
1042
  .join('g')
1199
1043
  .attr('class', 'barGroup')
1200
- .attr('id', (d) => 'barGroup' + d.key.replace(/[^A-Z0-9]+/gi, ''));
1201
- this.barSelection.selectAll('.barGroup')
1044
+ .attr('id', (d) => this.barGroupID(d.key));
1045
+ this.barSelection.selectAll('bar')
1202
1046
  .data((d) => {
1203
1047
  return d.series;
1204
1048
  })
@@ -1220,7 +1064,7 @@ export class barChart {
1220
1064
  .attr('y', this.yFunction)
1221
1065
  .attr('height', this.heightFunction);
1222
1066
  this.barChartContainer.selectAll('.bar')
1223
- .transition()
1067
+ .transition('animateBar')
1224
1068
  .duration(400)
1225
1069
  .ease(d3.easeLinear)
1226
1070
  .delay((...[, i]) => i * 150 + 400)
@@ -1235,8 +1079,8 @@ export class barChart {
1235
1079
  };
1236
1080
  const flattenBars = () => {
1237
1081
  this.barChartContainer
1238
- .selectAll('rect')
1239
- .transition()
1082
+ .selectAll('.bar')
1083
+ .transition('animateBar')
1240
1084
  .duration(200)
1241
1085
  .ease(d3.easeLinear)
1242
1086
  .attr('y', (d) => this.afVariation === BarChartVariation.Horizontal
@@ -1473,10 +1317,11 @@ export class barChart {
1473
1317
  ]);
1474
1318
  this.setNamedTicks(true);
1475
1319
  // Stop animation
1476
- this.barSelection.selectAll('.barGroup').on('end', null);
1320
+ this.barChartContainer.selectAll('.barGroup').on('end', null);
1321
+ d3.select(this.titleDiv).select('.loadingHeader').remove();
1477
1322
  this.loading = false;
1478
- this.barSelection
1479
- .transition()
1323
+ this.barChartContainer.selectAll('.bar').interrupt('animateBar');
1324
+ this.barChartContainer.selectAll('.bar').transition()
1480
1325
  .duration(this.defaultDuration)
1481
1326
  .attr('y', (d) => this.afVariation === BarChartVariation.Horizontal
1482
1327
  ? this.yScale(d.key)
@@ -1546,7 +1391,7 @@ export class barChart {
1546
1391
  this.averageLine();
1547
1392
  this.adjustBarSize();
1548
1393
  this.adjustBarText();
1549
- if (this.tooltip.style('visibility') !== 'hidden')
1394
+ if (this.tooltip.style('display') !== 'none')
1550
1395
  this.positionTooltip(this.tooltipData);
1551
1396
  }
1552
1397
  // Returns the longest text from an array of strings
@@ -1666,7 +1511,7 @@ export class barChart {
1666
1511
  <span style="display:block;margin-top:0.25rem;font-size:0.875rem;color:var(--digi--global--color--neutral--grayscale--darkest-3)">${this.chartData.infoText}</span></p>`;
1667
1512
  }
1668
1513
  }
1669
- return (h(Host, { key: '3b919d1bdd201ddf5e4e5e2955190ed34c5aced3', ref: (el) => (this.host = el) }, h("svg", { key: '380b1d30cc3c7a71bf05fa4cdf4bb00def16b090', xmlns: "http://www.w3.org/2000/svg", width: "0", height: "0" }, h("defs", { key: 'd39cde898124df9b34b994d0105fcc28e486a8f4' }, h("pattern", { key: '20d0ffdfa0e5310cad77ec994bf963f600de7b69', id: "prognosis", patternUnits: "userSpaceOnUse", width: "8", height: "8", patternTransform: "rotate(45)" }, h("line", { key: '17d98e16afa2c42146a22a441d3dd0922ae767f5', x1: "0", y: "0", x2: "0", y2: "12", stroke: this.evalColorVar(this.colorPalettes[0]), "stroke-width": "8" })), h("pattern", { key: '3dfdebb12e5f2eba8b216acd4ff846e82615ed66', id: "prognosisInactive", patternUnits: "userSpaceOnUse", width: "8", height: "8", patternTransform: "rotate(45)" }, h("line", { key: 'df76dde74f8e49e600f97b81c0c50e97147b9626', x1: "0", y: "0", x2: "0", y2: "12", stroke: this.evalColorVar('--digi--color--background--secondary-accent'), "stroke-width": "8" })), h("pattern", { key: '1d7a87ca509e067288af063e406d98962639560c', id: "prognosisHighlight", patternUnits: "userSpaceOnUse", width: "8", height: "8", patternTransform: "rotate(45)" }, h("line", { key: '1c9618f2b783704cc0ceab0c38d8b525b9fdc520', x1: "0", y: "0", x2: "0", y2: "12", stroke: this.adjustColor(this.colorFunction(0), 50), "stroke-width": "8" })))), h("div", { key: '5217e3c1b3063bcb77fee7bebf631296ea95ab6b', class: "topWrapper", ref: (el) => (this.titleDiv = el) }, h("digi-typography", { key: '904c16605d7947862bbf77b7f5dcbf581284ef97', class: "chartTitle", innerHTML: heading }), h("digi-button", { key: 'e285bef2d76e214a5615d4cee157bde5061e472a', class: "buttonWrapper tableButton", "af-size": "medium", "af-variation": "function", "af-full-width": "false", onAfOnClick: this.activateTable, afAriaLabel: `Visa tabell ${((_b = this.chartData) === null || _b === void 0 ? void 0 : _b.title) ? (_c = this.chartData) === null || _c === void 0 ? void 0 : _c.title.toLowerCase() : ''}` }, h("digi-icon-table", { key: '2b278678de6fc8feda2f02c494c6e0dc76d1b3bb', slot: "icon" }), "Visa tabell"), h("digi-button", { key: '85aa9d581cdf8332b87eebb80df10e2e654ec81e', style: { display: 'none' }, class: "buttonWrapper chartButton", "af-size": "medium", "af-variation": "function", "af-full-width": "false", onAfOnClick: this.reInitChart, afAriaLabel: `Visa diagram ${((_d = this.chartData) === null || _d === void 0 ? void 0 : _d.title) ? (_e = this.chartData) === null || _e === void 0 ? void 0 : _e.title.toLowerCase() : ''}` }, h("digi-icon-chart", { key: 'e4396b006704ebd6ffad155ebb4be3ae7abaf5d0', slot: "icon" }), "Visa diagram"), h("div", { key: '6c8a51169075d49b9da6f0158042c06e5d38a6e2', class: "scChartStatus", role: "status", ref: (el) => (this.status = el) })), h("div", { key: '8b0b7b63ba4f8b428f6d728d48cdc05ae791a605', class: "svgWrap", ref: (el) => (this.chartDiv = el) }, h("div", { key: 'fadf084df0bfcd6f39831b92983091e6c0fefbd0', class: "chartTooltip", id: this.afId }, h("div", { key: '3a0258527320c1719bffec8c221bc9884d77ee1f', class: "tooltipHead" }, h("digi-icon-x", { key: 'b1013c82580116f7806b2bf31b08eea205a47db1', class: "tooltipClose" })), h("div", { key: 'e98e704c7f03fe0e0c1a90a9088f2962b9661a5c', class: "tooltipBody" }), this.afVariation === BarChartVariation.Horizontal ? (h("digi-icon-caret-up", { class: "caret" })) : (h("digi-icon-caret-down", { class: "caret" })))), h("div", { key: '56da797be96540039f52ae28a2bf250d46f47f12', class: "legendWrap", ref: (el) => (this.legendDiv = el) }, h("div", { key: '3f3621240d161083d114df5d02a550d1f06613fa', class: "legend" })), h("div", { key: '427754c0a4b58f1cb334e89960d60c4ef22284f4', class: "table", ref: (el) => (this.tableDiv = el) }, ' ')));
1514
+ return (h(Host, { key: '2e011f2838668e9d58a6b4442e2832b6e1bac21b', ref: (el) => (this.host = el) }, h("svg", { key: 'a91c7bc7ed311fd10f0014d382daf46d97524087', xmlns: "http://www.w3.org/2000/svg", width: "0", height: "0" }, h("defs", { key: 'b28ad4ff2f0029eecd3a7b220d97ae81c646f6d0' }, h("pattern", { key: '2bb838607089932d089c05fdb568e06782cd6ef6', id: "prognosis", patternUnits: "userSpaceOnUse", width: "8", height: "8", patternTransform: "rotate(45)" }, h("line", { key: '4eca3d7dbb9cd2d47bc6367a8f07808ba3767902', x1: "0", y: "0", x2: "0", y2: "12", stroke: this.evalColorVar(this.colorPalettes[0]), "stroke-width": "8" })), h("pattern", { key: '87585e674cc45c2496650eb5309f4eee34f89b3a', id: "prognosisInactive", patternUnits: "userSpaceOnUse", width: "8", height: "8", patternTransform: "rotate(45)" }, h("line", { key: '42bfe1a59192f618e60486105e919b2569fef753', x1: "0", y: "0", x2: "0", y2: "12", stroke: this.evalColorVar('--digi--color--background--secondary-accent'), "stroke-width": "8" })), h("pattern", { key: '2ab36682ad76783cda635db815fc9f5f542fab21', id: "prognosisHighlight", patternUnits: "userSpaceOnUse", width: "8", height: "8", patternTransform: "rotate(45)" }, h("line", { key: 'd5b93bf96f259cdf093a3e61c38ef61bbfd565ba', x1: "0", y: "0", x2: "0", y2: "12", stroke: this.adjustColor(this.colorFunction(0), 50), "stroke-width": "8" })))), h("div", { key: 'f94c18afa372d176500c2d3844212df29c83f16b', class: "topWrapper", ref: (el) => (this.titleDiv = el) }, h("digi-typography", { key: '68dca23f7fd92f024f0b3d7eebc7b7214e636090', class: "chartTitle", innerHTML: heading }), h("digi-button", { key: '98d6ade579584a998a1d3e246168f42b19bd277f', class: "buttonWrapper tableButton", "af-size": "medium", "af-variation": "function", "af-full-width": "false", onAfOnClick: this.activateTable, afAriaLabel: `Visa tabell ${((_b = this.chartData) === null || _b === void 0 ? void 0 : _b.title) ? (_c = this.chartData) === null || _c === void 0 ? void 0 : _c.title.toLowerCase() : ''}` }, h("digi-icon-table", { key: '36d1e6f12b90215ba6ce00b814573616772820e7', slot: "icon" }), "Visa tabell"), h("digi-button", { key: 'c94200814deba4524301e7f2c07ad57e94b6381d', style: { display: 'none' }, class: "buttonWrapper chartButton", "af-size": "medium", "af-variation": "function", "af-full-width": "false", onAfOnClick: this.reInitChart, afAriaLabel: `Visa diagram ${((_d = this.chartData) === null || _d === void 0 ? void 0 : _d.title) ? (_e = this.chartData) === null || _e === void 0 ? void 0 : _e.title.toLowerCase() : ''}` }, h("digi-icon-chart", { key: 'ba94cf5a4ad7e4272d78f1965cd63eee99eb9f8f', slot: "icon" }), "Visa diagram"), h("div", { key: 'be79a632683428a30d01a96bf41f1e446b019061', class: "scChartStatus", role: "status", ref: (el) => (this.status = el) })), h("div", { key: 'd3644914ab02ae8cb8a054a1d4c90dc854fdaede', class: "svgWrap", ref: (el) => (this.chartDiv = el) }, h("div", { key: '6cb1113d71b8cd9ec156d351dc4ea402cdf3f372', class: "chartTooltip", id: this.afId }, h("div", { key: '0c601e94970dd3563bec5bfe070a3e02fd339124', class: "tooltipHead" }, h("digi-icon-x", { key: 'a478d1013f6630767b03029f4491222bc35dc118', class: "tooltipClose" })), h("div", { key: '04de1b3898023ef79ec8c69e501d107d8039351d', class: "tooltipBody" }), this.afVariation === BarChartVariation.Horizontal ? (h("digi-icon-caret-up", { class: "caret" })) : (h("digi-icon-caret-down", { class: "caret" })))), h("div", { key: '335550b9c1d64cadc9d72b14af008a2cffcfe58e', class: "legendWrap", ref: (el) => (this.legendDiv = el) }, h("div", { key: '1bd30ebd1a5c1c6342f102f7adc131c6f85bc8d8', class: "legend" })), h("div", { key: '69ddb91b0befa23212d518c27ed018f8c8912c06', class: "table", ref: (el) => (this.tableDiv = el) }, ' ')));
1670
1515
  }
1671
1516
  static get is() { return "digi-bar-chart"; }
1672
1517
  static get encapsulation() { return "scoped"; }
@@ -1,20 +1,17 @@
1
- @use '../../../../../../styles/src/digi-styles.utils' as *;
2
-
3
- @mixin digi-logo--variables() {
4
- --digi--logo--img--min-width: #{rem(256)};
5
- --digi--logo--img--max-width:#{rem(292)};
6
- --digi--logo--img--max-width--large: #{rem(368)};
7
- --digi--logo--img--max-width--system: #{rem(44)};
8
-
9
- --digi--logo--padding: 1.375rem;
10
- --digi--logo--padding--wide: var(--digi--gutter--larger);
11
- --digi--logo--padding--large: var(--digi--gutter--medium);
12
- --digi--logo--padding--large--wide: var(--digi--gutter--larger);
13
-
14
- --digi--logo--logotype-color: var(--digi--color--logotype-color);
15
- --digi--logo--color--primary: var(--digi--color--text--interactive--brand-primary);
16
- --digi--logo--color--secondary: var(--digi--color--text--secondary);
17
-
18
- --digi--logo--color--border--primary: var(--digi--color--text--primary);
19
- --digi--logo--color--border--secondary: var(--digi--color--text--secondary);
1
+ @mixin digi-title-logo--variables() {
2
+ --digi--title-logo-text-color: var(--digi--color--text--primary);
3
+ --digi--title-logo-font-weight: var(--digi--global--typography--font-weight--bold);
4
+ --digi--title-logo-font-size: var(--digi--typography--title-logo--font-size--mobile);
5
+ --digi--title-logo-font-size-small: var(--digi--global--typography--font-size--large);
6
+ --digi--title-logo-line-height-small: 1.25rem;
7
+ --digi--title-logo-symbol-color: var(--digi--color--logotype-color);
8
+ --digi--title-logo-symbol-width: 36px;
9
+ --digi--title-logo-symbol-height: 36px;
10
+ --digi--title-logo-symbol-width-mobile: 44px;
11
+ --digi--title-logo-symbol-height-mobile: 44px;
12
+ --digi--title-logo-text-height: 40px;
13
+ --digi--title-logo-border-width: var(--digi--global--border-width--base);
14
+ --digi--title-logo-vertical-padding: 1.375rem;
15
+ --digi--title-logo-gap: 9px;
16
+ }color--text--secondary);
20
17
  }
@@ -1,17 +1,20 @@
1
- @mixin digi-title-logo--variables() {
2
- --digi--title-logo-text-color: var(--digi--color--text--primary);
3
- --digi--title-logo-font-weight: var(--digi--global--typography--font-weight--bold);
4
- --digi--title-logo-font-size: var(--digi--typography--title-logo--font-size--mobile);
5
- --digi--title-logo-font-size-small: var(--digi--global--typography--font-size--large);
6
- --digi--title-logo-line-height-small: 1.25rem;
7
- --digi--title-logo-symbol-color: var(--digi--color--logotype-color);
8
- --digi--title-logo-symbol-width: 36px;
9
- --digi--title-logo-symbol-height: 36px;
10
- --digi--title-logo-symbol-width-mobile: 44px;
11
- --digi--title-logo-symbol-height-mobile: 44px;
12
- --digi--title-logo-text-height: 40px;
13
- --digi--title-logo-border-width: var(--digi--global--border-width--base);
14
- --digi--title-logo-vertical-padding: 1.375rem;
15
- --digi--title-logo-gap: 9px;
16
- }color--text--secondary);
1
+ @use '../../../../../../styles/src/digi-styles.utils' as *;
2
+
3
+ @mixin digi-logo--variables() {
4
+ --digi--logo--img--min-width: #{rem(256)};
5
+ --digi--logo--img--max-width:#{rem(292)};
6
+ --digi--logo--img--max-width--large: #{rem(368)};
7
+ --digi--logo--img--max-width--system: #{rem(44)};
8
+
9
+ --digi--logo--padding: 1.375rem;
10
+ --digi--logo--padding--wide: var(--digi--gutter--larger);
11
+ --digi--logo--padding--large: var(--digi--gutter--medium);
12
+ --digi--logo--padding--large--wide: var(--digi--gutter--larger);
13
+
14
+ --digi--logo--logotype-color: var(--digi--color--logotype-color);
15
+ --digi--logo--color--primary: var(--digi--color--text--interactive--brand-primary);
16
+ --digi--logo--color--secondary: var(--digi--color--text--secondary);
17
+
18
+ --digi--logo--color--border--primary: var(--digi--color--text--primary);
19
+ --digi--logo--color--border--secondary: var(--digi--color--text--secondary);
17
20
  }