@designsystem-se/af 32.3.0 → 32.3.1-beta.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/components/digi-bar-chart.js +4 -4
- package/components/digi-chart-line.js +7 -4
- package/dist/cjs/digi-arbetsformedlingen.cjs.js +1 -1
- package/dist/cjs/digi-bar-chart.cjs.entry.js +4 -4
- package/dist/cjs/{digi-chart-line.cjs.entry.js → digi-button_6.cjs.entry.js} +224 -5
- package/dist/cjs/digi-calendar-datepicker.cjs.entry.js +2 -1
- package/dist/cjs/digi-code-block_3.cjs.entry.js +2 -1
- package/dist/cjs/digi-dialog.cjs.entry.js +2 -1
- package/dist/cjs/digi-expandable-accordion.cjs.entry.js +2 -1
- package/dist/cjs/digi-footer.cjs.entry.js +2 -1
- package/dist/cjs/digi-form-error-list.cjs.entry.js +2 -1
- package/dist/cjs/digi-form-receipt.cjs.entry.js +2 -1
- package/dist/cjs/digi-form-select-filter.cjs.entry.js +2 -1
- package/dist/cjs/digi-header-navigation.cjs.entry.js +2 -1
- package/dist/cjs/digi-header.cjs.entry.js +2 -1
- package/dist/cjs/digi-link.cjs.entry.js +78 -0
- package/dist/cjs/{digi-link_2.cjs.entry.js → digi-logo_2.cjs.entry.js} +24 -72
- package/dist/cjs/digi-navigation-pagination.cjs.entry.js +2 -1
- package/dist/cjs/digi-notification-alert.cjs.entry.js +2 -1
- package/dist/cjs/digi-notification-error-page.cjs.entry.js +2 -1
- package/dist/cjs/digi-tools-feedback.cjs.entry.js +2 -1
- package/dist/cjs/index-cfa8e9be.js +10 -26
- package/dist/cjs/index.cjs.js +13 -12
- package/dist/cjs/link-variation.enum-e6d243b1.js +7 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{logo-variation.enum-3632e1e1.js → logo-variation.enum-607fadb4.js} +0 -6
- package/dist/collection/components/_chart/bar-chart/bar-chart.js +4 -4
- package/dist/collection/components/_chart/chart-line/chart-line.js +7 -4
- package/dist/collection/design-tokens/components/_navigation-context-menu.variables.scss +6 -0
- package/dist/digi-arbetsformedlingen/design-tokens/components/_navigation-context-menu.variables.scss +6 -8
- package/dist/digi-arbetsformedlingen/digi-arbetsformedlingen.esm.js +1 -1
- package/dist/digi-arbetsformedlingen/index.esm.js +1 -1
- package/dist/digi-arbetsformedlingen/p-02646d18.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-0873a381.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-125dd887.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-195cf497.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-25faef21.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-290d1746.js +1 -0
- package/dist/digi-arbetsformedlingen/p-4028ad65.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-45fe2828.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-4c6f74fb.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-52b4119a.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-81e86ac1.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/{p-c2ee26cb.js → p-8fc1143f.js} +1 -1
- package/dist/digi-arbetsformedlingen/p-a272c883.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-ad9a707b.js +1 -0
- package/dist/digi-arbetsformedlingen/p-d7fe697e.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-e661462a.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-e8ae7a8d.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-edda9cea.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-f4c3f47e.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-fb8ac3de.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-fc4dc147.entry.js +1 -0
- package/dist/esm/digi-arbetsformedlingen.js +1 -1
- package/dist/esm/digi-bar-chart.entry.js +5 -5
- package/dist/esm/{digi-chart-line.entry.js → digi-button_6.entry.js} +222 -8
- package/dist/esm/digi-calendar-datepicker.entry.js +2 -1
- package/dist/esm/digi-code-block_3.entry.js +2 -1
- package/dist/esm/digi-dialog.entry.js +2 -1
- package/dist/esm/digi-expandable-accordion.entry.js +2 -1
- package/dist/esm/digi-footer.entry.js +2 -1
- package/dist/esm/digi-form-error-list.entry.js +2 -1
- package/dist/esm/digi-form-receipt.entry.js +2 -1
- package/dist/esm/digi-form-select-filter.entry.js +2 -1
- package/dist/esm/digi-header-navigation.entry.js +2 -1
- package/dist/esm/digi-header.entry.js +2 -1
- package/dist/esm/digi-link.entry.js +74 -0
- package/dist/esm/{digi-link_2.entry.js → digi-logo_2.entry.js} +25 -73
- package/dist/esm/digi-navigation-pagination.entry.js +2 -1
- package/dist/esm/digi-notification-alert.entry.js +2 -1
- package/dist/esm/digi-notification-error-page.entry.js +2 -1
- package/dist/esm/digi-tools-feedback.entry.js +2 -1
- package/dist/esm/index-8e318bb2.js +10 -26
- package/dist/esm/index.js +2 -1
- package/dist/esm/{linear-ef018ffb.js → linear-f59f8318.js} +1 -1
- package/dist/esm/link-variation.enum-3e259c8a.js +7 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{logo-variation.enum-636315cc.js → logo-variation.enum-5b68b79f.js} +1 -7
- package/hydrate/index.js +11 -8
- package/hydrate/index.mjs +11 -8
- package/package.json +1 -1
- package/dist/cjs/digi-button.cjs.entry.js +0 -130
- package/dist/cjs/digi-icon-chart_2.cjs.entry.js +0 -53
- package/dist/cjs/digi-icon-x.cjs.entry.js +0 -30
- package/dist/cjs/digi-navigation-sidebar-button.cjs.entry.js +0 -30
- package/dist/cjs/digi-typography.cjs.entry.js +0 -30
- package/dist/digi-arbetsformedlingen/p-19538845.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-1b90267f.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-210dca34.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-311c00ad.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-365fcbbc.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-48572c26.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-67a69bb7.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-6d23aabd.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-6f3ef3b6.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-77ef8788.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-7975d958.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-80232e3f.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-81cac8dd.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-a13f2c2f.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-ab8c8a0e.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-b0170be7.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-b1855b86.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-d0db545e.js +0 -1
- package/dist/digi-arbetsformedlingen/p-e86ddfd3.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-eab849c4.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-ecd749b9.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-fa7824e9.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-ff728780.entry.js +0 -1
- package/dist/esm/digi-button.entry.js +0 -126
- package/dist/esm/digi-icon-chart_2.entry.js +0 -48
- package/dist/esm/digi-icon-x.entry.js +0 -26
- package/dist/esm/digi-navigation-sidebar-button.entry.js +0 -26
- package/dist/esm/digi-typography.entry.js +0 -26
|
@@ -603,7 +603,7 @@ const barChart = /*@__PURE__*/ proxyCustomElement(class barChart extends H {
|
|
|
603
603
|
adjustment = Math.ceil((newSize - mSize) / (size / d.length));
|
|
604
604
|
}
|
|
605
605
|
// Slicing the text up, saving atleast 3 characters
|
|
606
|
-
return (d.slice(0, Math.max(Math.floor((mSize / (size + this._ellipsisSize)) * d.length) - adjustment, 3)) + '...');
|
|
606
|
+
return (d.slice(0, Math.max(Math.floor((mSize / (size + this._ellipsisSize)) * d.length) - adjustment, 3)).trim() + '...');
|
|
607
607
|
}));
|
|
608
608
|
}
|
|
609
609
|
else {
|
|
@@ -624,13 +624,13 @@ const barChart = /*@__PURE__*/ proxyCustomElement(class barChart extends H {
|
|
|
624
624
|
const mSize = this._margin.left;
|
|
625
625
|
if (size < mSize)
|
|
626
626
|
return d;
|
|
627
|
-
const newSize = this.getTextSize(d.slice(0, Math.max(Math.floor((mSize / (size + this._ellipsisSize)) * d.length), 3)) + '...');
|
|
627
|
+
const newSize = this.getTextSize(d.slice(0, Math.max(Math.floor((mSize / (size + this._ellipsisSize)) * d.length), 3)).trim() + '...');
|
|
628
628
|
let adjustment = 0;
|
|
629
629
|
if (newSize > mSize) {
|
|
630
630
|
adjustment = Math.ceil((newSize - mSize) / (size / d.length));
|
|
631
631
|
}
|
|
632
632
|
// Slicing the text up, saving atleast 3 characters
|
|
633
|
-
return (d.slice(0, Math.max(Math.floor((mSize / (size + this._ellipsisSize)) * d.length) - adjustment, 3)) + '...');
|
|
633
|
+
return (d.slice(0, Math.max(Math.floor((mSize / (size + this._ellipsisSize)) * d.length) - adjustment, 3)).trim() + '...');
|
|
634
634
|
}));
|
|
635
635
|
}
|
|
636
636
|
}
|
|
@@ -1476,7 +1476,7 @@ const barChart = /*@__PURE__*/ proxyCustomElement(class barChart extends H {
|
|
|
1476
1476
|
heading = `<${this.afHeadingLevel}>${this._chartData.title}</${this.afHeadingLevel}><p>${this._chartData.subTitle}
|
|
1477
1477
|
<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>`;
|
|
1478
1478
|
}
|
|
1479
|
-
return (h(Host, { key: '
|
|
1479
|
+
return (h(Host, { key: '1e65613b383c823e2612b4e3b66c2aab2b6a63ee', ref: (el) => (this._host = el) }, h("div", { key: '0722c740fe78699676bb98247d5aa9b8a2ac6ec4', class: "topWrapper", ref: (el) => (this._titleDiv = el) }, h("digi-typography", { key: '7e318220350058798accc80bcac29764e460c854', class: "chartTitle", innerHTML: heading }), h("digi-button", { key: '37799980afd2cf93d1c924220b34a018c03d943b', class: "buttonWrapper tableButton", "af-size": "medium", "af-variation": "function", "af-full-width": "false", onAfOnClick: this.activateTable, afAriaLabel: `Visa tabell ${this._chartData.title ? this._chartData.title.toLowerCase() : ''}` }, h("digi-icon-table", { key: '0018a24d271ff038b42623f01b42d781538eeca1', slot: "icon" }), "Visa tabell"), h("digi-button", { key: 'b52b57a35abd23e47f97ad8aadaf74847d77092c', style: { display: 'none' }, class: "buttonWrapper chartButton", "af-size": "medium", "af-variation": "function", "af-full-width": "false", onAfOnClick: this.reInitChart, afAriaLabel: `Visa diagram ${this._chartData.title ? this._chartData.title.toLowerCase() : ''}` }, h("digi-icon-chart", { key: 'd644be20ea9cb15fbd8cf3308e452b9e993da833', slot: "icon" }), "Visa diagram"), h("div", { key: '8e396c518fdcf565d8295f67f9ee22b88c1aad94', class: "scChartStatus", role: "status", ref: (el) => (this._status = el) })), h("div", { key: '6b95d5b67649fe88aee0fccd276d726a63490c41', class: "chartTooltip", id: this.afId }, h("div", { key: 'c1ee45d3d3e2949da0edb7f5ae7f5d824fec7149', class: "tooltipBody" }), h("digi-icon-x", { key: '34cb0be40388ae734b974201975e7ca347c34866', class: "close" }), this.afVariation === BarChartVariation.Horizontal ? (h("digi-icon-caret-up", null)) : (h("digi-icon-caret-down", null))), h("div", { key: 'af236d72c75cf21e1549151c2ad8244d3ec64f8e', ref: (el) => (this._chartDiv = el) }, " "), h("div", { key: '09ffd8c2a0278de23ec262ca110c629b9e6e3d01', class: "legend", ref: (el) => (this._legendDiv = el) }), h("div", { key: '510d6eb3e641d7ba0f763426a5d1bd055f1ae68f', class: "table", ref: (el) => (this._tableDiv = el) }, ' ')));
|
|
1480
1480
|
}
|
|
1481
1481
|
get hostElement() { return this; }
|
|
1482
1482
|
static get watchers() { return {
|
|
@@ -2163,9 +2163,10 @@ const ChartLine = /*@__PURE__*/ proxyCustomElement(class ChartLine extends H {
|
|
|
2163
2163
|
.data([text])
|
|
2164
2164
|
.join('text')
|
|
2165
2165
|
.attr('font-size', this.fontSize)
|
|
2166
|
+
.attr('font-family', 'sans-serif')
|
|
2166
2167
|
.text((d) => d)
|
|
2167
2168
|
.each((...[, i, nodelist]) => {
|
|
2168
|
-
const thisWidth = nodelist[i].getComputedTextLength();
|
|
2169
|
+
const thisWidth = nodelist[i].getComputedTextLength() + 5; // A little extra padding, text sizes seems to be a little small compared to real life
|
|
2169
2170
|
textWidth.push(thisWidth);
|
|
2170
2171
|
nodelist[i].remove();
|
|
2171
2172
|
});
|
|
@@ -2174,16 +2175,18 @@ const ChartLine = /*@__PURE__*/ proxyCustomElement(class ChartLine extends H {
|
|
|
2174
2175
|
}
|
|
2175
2176
|
// Goes through all tick values and checks the biggest in size, this one will decide the default tick-size
|
|
2176
2177
|
setTickSize() {
|
|
2178
|
+
// Padding on both sides comined
|
|
2179
|
+
const textPadding = 25; // 12.5 pixel padding on each side
|
|
2177
2180
|
if (this._chartData.data.xValueNames) {
|
|
2178
2181
|
for (const elem of this._chartData.data.xValueNames) {
|
|
2179
|
-
const size = this.getTextSize(elem);
|
|
2182
|
+
const size = this.getTextSize(elem) + textPadding;
|
|
2180
2183
|
if (size > this._tickSize)
|
|
2181
2184
|
this._tickSize = size;
|
|
2182
2185
|
}
|
|
2183
2186
|
}
|
|
2184
2187
|
else {
|
|
2185
2188
|
for (const elem of this._chartData.data.xValues) {
|
|
2186
|
-
const size = this.getTextSize(elem.toString());
|
|
2189
|
+
const size = this.getTextSize(elem.toString()) + textPadding;
|
|
2187
2190
|
if (size > this._tickSize)
|
|
2188
2191
|
this._tickSize = size;
|
|
2189
2192
|
}
|
|
@@ -2301,7 +2304,7 @@ const ChartLine = /*@__PURE__*/ proxyCustomElement(class ChartLine extends H {
|
|
|
2301
2304
|
heading = `<${this.afHeadingLevel}>${this._chartData.title}</${this.afHeadingLevel}>`;
|
|
2302
2305
|
else
|
|
2303
2306
|
heading = `<${this.afHeadingLevel}>${this._chartData.title}</${this.afHeadingLevel}><p>${this._chartData.subTitle}</p>`;
|
|
2304
|
-
return (h("host", { key: '
|
|
2307
|
+
return (h("host", { key: '23524b77e8aa2bb1cae912a08c4f35791074a769', ref: (el) => (this._host = el) }, h("div", { key: '75c7c1a8be55953b5547c5a3dd956027af73fbd1', class: "topWrapper", ref: (el) => (this._titleDiv = el) }, h("digi-typography", { key: '76e755f765d16611ecf82c2980f660f28cb0239a', class: "chartTitle", innerHTML: heading }), h("digi-button", { key: '6665f4a0c7f9ea09b938bd690f1ad2f2838f0c9c', class: "buttonWrapper tableButton", "af-size": "medium", "af-variation": "function", "af-full-width": "false", onAfOnClick: this.activateTable, afAriaLabel: `Visa tabell ${this._chartData.title ? this._chartData.title.toLowerCase() : ''}` }, h("digi-icon-table", { key: '05aee665d9cd4d743c37cda816a3f5a3fe3128f5', slot: "icon" }), "Visa tabell"), h("digi-button", { key: '9f42b7ac02cb3f45d5d2503a9e12836bd76ce862', style: { display: 'none' }, class: "buttonWrapper chartButton", "af-size": "medium", "af-variation": "function", "af-full-width": "false", onAfOnClick: this.reInitChart, afAriaLabel: `Visa diagram ${this._chartData.title ? this._chartData.title.toLowerCase() : ''}` }, h("digi-icon-chart", { key: '43e9db95020bf3d24c68a24b269a179d70d8d056', slot: "icon" }), "Visa diagram"), h("div", { key: 'fc14ac6bf87466a5655dc5416bac08d0627a41ef', class: "scChartStatus", role: "status", ref: (el) => (this._status = el) })), h("div", { key: 'd65b4ea0b2a3a0abdc7a94e1cfb82e425ba50d2e', class: "chartTooltip", id: this.afId }, h("div", { key: '0ecff411dd746d6f21b53ae0d39729a55bedd957', class: "tooltipBody" }), h("digi-icon-x", { key: '9dd0ba013b81972e3e74b2e068b808f443ba7bf4', class: "close" }), ' '), h("div", { key: '371ba97658cd0e4f3a251bff860c45a43e9da9f1', class: "chart", ref: (el) => (this._chartDiv = el) }), h("div", { key: 'b4f5e4c1bc605f857910ec423f9de0285ac27e88', class: "legend", ref: (el) => (this._legendDiv = el) }), h("div", { key: '6bcc5645b85e62d321a2c37cd365b2d36b577b9a', class: "table", ref: (el) => (this._tableDiv = el) }, ' ')));
|
|
2305
2308
|
}
|
|
2306
2309
|
get element() { return this; }
|
|
2307
2310
|
static get watchers() { return {
|