lintje 0.1.1 → 0.2.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/dist-elements/actions.js +1 -1
- package/dist-elements/charts.js +1 -1
- package/dist-elements/chunks/{base-rBLTcEIv.js → base-Bg-IFOPG.js} +134 -105
- package/dist-elements/chunks/{date-format-B5DPGjAw.js → date-format-mHtZyBys.js} +28 -2
- package/dist-elements/chunks/disclosure-BXTX04gM.js +4 -0
- package/dist-elements/chunks/{disclosure-CHasOudX.js → disclosure-CMXhX-Vb.js} +7 -7
- package/dist-elements/chunks/download-y528pIHP.js +230 -0
- package/dist-elements/chunks/{focus-trap-w3vCamJ6.js → focus-trap-9BnE-xWv.js} +1 -1
- package/dist-elements/chunks/{input-jQVTln7H.js → input-BtuNFSWk.js} +13 -13
- package/dist-elements/chunks/{player-Bq9YGnpt.js → player-DXOZEyEy.js} +24 -24
- package/dist-elements/chunks/{sentence-CLNJOeXz.js → sentence-BI3lwEuT.js} +3 -3
- package/dist-elements/chunks/{stagger-9hYzxhMG.js → stagger-qGD3wmhg.js} +145 -123
- package/dist-elements/core.js +1 -1
- package/dist-elements/custom-elements.json +436 -26
- package/dist-elements/feedback.js +1 -1
- package/dist-elements/guides/dashboard.md +1 -1
- package/dist-elements/guides/events.md +3 -2
- package/dist-elements/guides/loading.md +3 -3
- package/dist-elements/guides/start.md +1 -1
- package/dist-elements/inputs.js +1 -0
- package/dist-elements/layout.js +1 -1
- package/dist-elements/lintje.js +22659 -22216
- package/dist-elements/map.js +1 -1
- package/dist-elements/overlays.js +1 -1
- package/dist-elements/tag/activity-log.js +11 -11
- package/dist-elements/tag/ai-label.js +7 -7
- package/dist-elements/tag/announcement.js +19 -19
- package/dist-elements/tag/app-search.js +21 -21
- package/dist-elements/tag/audio-player.js +34 -34
- package/dist-elements/tag/badge.js +1 -1
- package/dist-elements/tag/breadcrumbs.js +11 -11
- package/dist-elements/tag/button.js +1 -1
- package/dist-elements/tag/card-list.js +1 -1
- package/dist-elements/tag/card.js +25 -25
- package/dist-elements/tag/chart.d.ts +1 -0
- package/dist-elements/tag/chart.js +1868 -0
- package/dist-elements/tag/chat-answer.js +28 -28
- package/dist-elements/tag/chat-composer.js +20 -20
- package/dist-elements/tag/chat-message.js +9 -9
- package/dist-elements/tag/chat-strip.js +16 -16
- package/dist-elements/tag/chat-suggestions.js +1 -1
- package/dist-elements/tag/chat.js +27 -27
- package/dist-elements/tag/checkbox.js +6 -6
- package/dist-elements/tag/code.js +8 -8
- package/dist-elements/tag/combobox.js +13 -13
- package/dist-elements/tag/confirm-dialog.js +6 -6
- package/dist-elements/tag/conflict-alert.js +5 -5
- package/dist-elements/tag/copy-button.js +7 -7
- package/dist-elements/tag/data-table.js +179 -179
- package/dist-elements/tag/date-input.js +34 -42
- package/dist-elements/tag/date-range.js +33 -33
- package/dist-elements/tag/description-list.js +20 -20
- package/dist-elements/tag/document-viewer.js +19 -19
- package/dist-elements/tag/drawer.js +7 -7
- package/dist-elements/tag/empty-state.js +11 -11
- package/dist-elements/tag/error-summary.js +8 -8
- package/dist-elements/tag/expander.js +7 -7
- package/dist-elements/tag/explainer.js +9 -9
- package/dist-elements/tag/field.js +4 -4
- package/dist-elements/tag/file-upload.js +20 -20
- package/dist-elements/tag/filter-bar.js +35 -35
- package/dist-elements/tag/filter-sheet.js +6 -6
- package/dist-elements/tag/filter-zone.js +21 -21
- package/dist-elements/tag/footer.js +1 -1
- package/dist-elements/tag/form-actions.js +7 -7
- package/dist-elements/tag/form-section.js +3 -3
- package/dist-elements/tag/form.js +4 -4
- package/dist-elements/tag/gallery.js +6 -6
- package/dist-elements/tag/grid-item.js +1 -1
- package/dist-elements/tag/grid.js +1 -1
- package/dist-elements/tag/hero.js +6 -6
- package/dist-elements/tag/highlight.js +6 -6
- package/dist-elements/tag/icon-button.js +1 -1
- package/dist-elements/tag/icon.js +1 -1
- package/dist-elements/tag/job-list.js +6 -6
- package/dist-elements/tag/kpi-row.js +7 -5
- package/dist-elements/tag/kpi.js +259 -69
- package/dist-elements/tag/level-meter.js +5 -5
- package/dist-elements/tag/list.js +28 -28
- package/dist-elements/tag/logo.js +9 -9
- package/dist-elements/tag/map.d.ts +1 -0
- package/dist-elements/tag/map.js +21910 -0
- package/dist-elements/tag/menu-button.js +48 -47
- package/dist-elements/tag/modal.js +9 -9
- package/dist-elements/tag/multiselect.js +18 -18
- package/dist-elements/tag/note.js +4 -4
- package/dist-elements/tag/notifications.js +24 -24
- package/dist-elements/tag/number-input.js +8 -8
- package/dist-elements/tag/page-header.js +13 -13
- package/dist-elements/tag/pagination.js +27 -27
- package/dist-elements/tag/popover.js +1 -1
- package/dist-elements/tag/progress-bar.js +1 -1
- package/dist-elements/tag/prose.js +4 -4
- package/dist-elements/tag/qr-code.js +6 -6
- package/dist-elements/tag/radio-group.js +7 -7
- package/dist-elements/tag/range.js +13 -13
- package/dist-elements/tag/recording-status.js +8 -8
- package/dist-elements/tag/repeater.js +1 -1
- package/dist-elements/tag/segmented.js +7 -7
- package/dist-elements/tag/select.js +6 -6
- package/dist-elements/tag/session-expiry.js +13 -13
- package/dist-elements/tag/shell.js +168 -168
- package/dist-elements/tag/shortcuts.js +8 -8
- package/dist-elements/tag/skeleton.js +1 -1
- package/dist-elements/tag/slot-picker.d.ts +1 -0
- package/dist-elements/tag/slot-picker.js +74 -0
- package/dist-elements/tag/sortable-list.js +11 -11
- package/dist-elements/tag/spinner.js +1 -1
- package/dist-elements/tag/split-pane.js +4 -4
- package/dist-elements/tag/status-dot.js +1 -1
- package/dist-elements/tag/stepper.js +13 -13
- package/dist-elements/tag/streaming-text.js +15 -15
- package/dist-elements/tag/sub-nav.js +26 -26
- package/dist-elements/tag/tabs.js +13 -13
- package/dist-elements/tag/tag-input.js +14 -14
- package/dist-elements/tag/text-editor.js +7 -7
- package/dist-elements/tag/text-input.js +10 -10
- package/dist-elements/tag/textarea.js +6 -6
- package/dist-elements/tag/tile.js +1 -1
- package/dist-elements/tag/time-input.js +136 -42
- package/dist-elements/tag/toast.js +10 -10
- package/dist-elements/tag/toggle.js +6 -6
- package/dist-elements/tag/toggletip.js +11 -11
- package/dist-elements/tag/tooltip.js +1 -1
- package/dist-elements/tag/transcript.js +31 -31
- package/dist-elements/tag/translator.js +7 -7
- package/dist-elements/tag/tree-view.js +12 -12
- package/dist-elements/tag/user-menu.js +31 -30
- package/dist-elements/tag/video-player.js +13 -13
- package/dist-elements/tokens.css +2 -0
- package/dist-elements/types/bundle/charts.d.ts +1 -1
- package/dist-elements/types/bundle/index.d.ts +1 -1
- package/dist-elements/types/bundle/inputs.d.ts +1 -0
- package/dist-elements/types/bundle/map.d.ts +1 -1
- package/dist-elements/types/components/charts/{chart-tile/chart-tile.d.ts → chart/chart.d.ts} +7 -7
- package/dist-elements/types/components/charts/kpi/gauge.d.ts +18 -0
- package/dist-elements/types/components/charts/kpi/kpi.d.ts +28 -3
- package/dist-elements/types/components/chat/chat-answer/chat-answer.d.ts +1 -1
- package/dist-elements/types/components/index.d.ts +8 -5
- package/dist-elements/types/components/inputs/date-input/date-format.d.ts +4 -0
- package/dist-elements/types/components/inputs/slot-picker/slot-picker.d.ts +41 -0
- package/dist-elements/types/components/inputs/time-input/time-format.d.ts +4 -0
- package/dist-elements/types/components/inputs/time-input/time-input.d.ts +25 -6
- package/dist-elements/types/components/map/{map-tile/map-tile.d.ts → map/map.d.ts} +10 -6
- package/dist-elements/types/components/shared/charts/histogram-chart/histogram-chart.d.ts +33 -0
- package/dist-elements/types/components/shared/charts/index.d.ts +3 -1
- package/dist-elements/types/components/shared/charts/map-chart/area.d.ts +16 -0
- package/dist-elements/types/components/shared/charts/map-chart/drawings.d.ts +6 -2
- package/dist-elements/types/components/shared/charts/map-chart/geo.d.ts +6 -0
- package/dist-elements/types/components/shared/charts/map-chart/leaflet.d.ts +40 -2
- package/dist-elements/types/components/shared/charts/map-chart/map-chart.d.ts +17 -3
- package/dist-elements/types/components/shared/charts/map-chart/map-legend.d.ts +26 -0
- package/dist-elements/types/components/shared/charts/map-chart/marks.d.ts +47 -0
- package/dist-elements/types/components/shared/charts/map-chart/reveal.d.ts +1 -1
- package/dist-elements/types/components/shared/charts/scatter-chart/scatter-chart.d.ts +29 -0
- package/dist-elements/types/components/shared/charts/shared/axes.d.ts +21 -4
- package/dist-elements/types/components/shared/charts/shared/chart-icons.d.ts +4 -3
- package/dist-elements/types/components/shared/charts/shared/controller.d.ts +27 -15
- package/dist-elements/types/components/shared/charts/shared/types.d.ts +112 -6
- package/dist-elements/types/core/format.d.ts +5 -2
- package/dist-elements/types/icons/register.d.ts +1 -1
- package/dist-elements/types/primitives/shared/place.d.ts +1 -1
- package/dist-elements/types/primitives/tooltip/tooltip.d.ts +2 -0
- package/dist-elements/types/types.d.ts +37 -7
- package/dist-icons/functioneel-cirkelselectie.svg +1 -0
- package/dist-icons/functioneel-lasso.svg +1 -0
- package/dist-icons/functioneel-punaise-outline.svg +1 -0
- package/dist-icons/functioneel-punaise.svg +1 -0
- package/dist-icons/functioneel-rechthoekselectie.svg +1 -0
- package/dist-icons/functioneel-selectie.svg +1 -0
- package/package.json +1 -1
- package/dist-elements/chunks/disclosure-Z7Ny17sS.js +0 -4
- package/dist-elements/chunks/download-lFooAfD1.js +0 -226
- package/dist-elements/tag/chart-tile.d.ts +0 -1
- package/dist-elements/tag/chart-tile.js +0 -1474
- package/dist-elements/tag/map-tile.d.ts +0 -1
- package/dist-elements/tag/map-tile.js +0 -22292
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as e, Gt as t,
|
|
1
|
+
import { A as e, Gt as t, Jt as n, a as r, ht as i, l as a, mt as o, n as s, pt as c, qt as l, s as u, t as d, u as f, ut as p } from "./base-Bg-IFOPG.js";
|
|
2
2
|
//#region src/components/shared/charts/shared/scale.ts
|
|
3
3
|
var m = {
|
|
4
4
|
width: 900,
|
|
@@ -9,18 +9,18 @@ var m = {
|
|
|
9
9
|
bottom: 28
|
|
10
10
|
}, h = .25, g = 16, _ = 10, v = .3;
|
|
11
11
|
function y(e, t, { fontFamily: n = "" } = {}) {
|
|
12
|
-
let r = Math.min(320, Math.round(t * v)),
|
|
12
|
+
let r = Math.min(320, Math.round(t * v)), i = Math.ceil(Math.max(0, ...e.map((e) => a(e, n)))), o = Math.min(r, i);
|
|
13
13
|
return {
|
|
14
14
|
labelEnd: o,
|
|
15
15
|
barStart: o + _,
|
|
16
|
-
fit: (e) =>
|
|
16
|
+
fit: (e) => f(e, o, n)
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
19
|
function b(e, t, { minimum: n = g, fontFamily: i = "" } = {}) {
|
|
20
|
-
let
|
|
21
|
-
return
|
|
22
|
-
width: Math.min(
|
|
23
|
-
format:
|
|
20
|
+
let o = Math.min(96, Math.round(t * h)), s = (t) => Math.ceil(Math.max(0, ...e.map((e) => a(t(e), i))) + 8), c = u, l = s(c);
|
|
21
|
+
return l > o && (c = r, l = s(c)), {
|
|
22
|
+
width: Math.min(o, Math.max(n, l)),
|
|
23
|
+
format: c
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
26
|
function x(e) {
|
|
@@ -66,9 +66,9 @@ function T(e, t = {}) {
|
|
|
66
66
|
height: e.controller.height
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
|
-
var E = .35, D = 120, O = Array.from({ length: 21 }, (e, t) => t / 20), k = 0,
|
|
69
|
+
var E = .35, D = 120, O = Array.from({ length: 21 }, (e, t) => t / 20), k = 0, A = class {
|
|
70
70
|
constructor(e) {
|
|
71
|
-
this.id = `lintje-chart-${++k}`, this.width = m.width, this.height = m.height, this.inView = !1, this.tooltip = null, this.hoverIndex = null, this.status = "", this.hiddenSeries = [], this.hoverSegment = null, this.selectedCell = null, this.dimmedClass = null, this.
|
|
71
|
+
this.id = `lintje-chart-${++k}`, this.width = m.width, this.height = m.height, this.inView = !1, this.tooltip = null, this.hoverIndex = null, this.status = "", this.hiddenSeries = [], this.hiddenLayers = [], this.hoverSegment = null, this.selectedCell = null, this.dimmedClass = null, this.mapHint = null, this.mapHintTimer = null, this.mapSelection = null, this.mapTool = null, this.mapLastTool = null, this.mapMenuOpen = !1, this.mapMenuFocus = null, this.mapLegendOpen = !1, this.mapArea = null, this.hostArea = void 0, this.hostSelection = void 0, this.leaflet = null, this.leafletView = null, this.element = null, this.measuring = {}, this.resizeObserver = null, this.intersectionObserver = null, this.attach = (e) => {
|
|
72
72
|
e !== this.element && (this.unwatch(), e instanceof HTMLElement && (this.element = e, this.read(), this.watchSize(e), this.watchVisibility(e)));
|
|
73
73
|
}, this.onWindowKey = (e) => {
|
|
74
74
|
e.key === "Escape" && this.hideTooltip();
|
|
@@ -91,7 +91,7 @@ var E = .35, D = 120, O = Array.from({ length: 21 }, (e, t) => t / 20), k = 0, n
|
|
|
91
91
|
}), this.resizeObserver.observe(e)) : (this.resizeObserver?.disconnect(), this.resizeObserver = null);
|
|
92
92
|
}
|
|
93
93
|
detach() {
|
|
94
|
-
this.unwatch(), this.leaflet?.destroy(), this.leaflet = null;
|
|
94
|
+
this.unwatch(), this.mapHintTimer && clearTimeout(this.mapHintTimer), this.mapHintTimer = null, this.leaflet?.destroy(), this.leaflet = null;
|
|
95
95
|
}
|
|
96
96
|
unwatch() {
|
|
97
97
|
this.unwatchEscape(), this.resizeObserver?.disconnect(), this.intersectionObserver?.disconnect(), this.resizeObserver = null, this.intersectionObserver = null, this.element = null;
|
|
@@ -126,6 +126,9 @@ var E = .35, D = 120, O = Array.from({ length: 21 }, (e, t) => t / 20), k = 0, n
|
|
|
126
126
|
unwatchEscape() {
|
|
127
127
|
this.watching && (this.watching = !1, window.removeEventListener("keydown", this.onWindowKey));
|
|
128
128
|
}
|
|
129
|
+
toggleLayer(e) {
|
|
130
|
+
this.hiddenLayers = this.hiddenLayers.includes(e) ? this.hiddenLayers.filter((t) => t !== e) : [...this.hiddenLayers, e], this.requestUpdate();
|
|
131
|
+
}
|
|
129
132
|
toggleSeries(e) {
|
|
130
133
|
this.hiddenSeries = this.hiddenSeries.includes(e) ? this.hiddenSeries.filter((t) => t !== e) : [...this.hiddenSeries, e], this.requestUpdate();
|
|
131
134
|
}
|
|
@@ -155,11 +158,11 @@ var E = .35, D = 120, O = Array.from({ length: 21 }, (e, t) => t / 20), k = 0, n
|
|
|
155
158
|
enter() {
|
|
156
159
|
this.intersectionObserver?.disconnect(), this.intersectionObserver = null, !this.inView && (this.inView = !0, this.requestUpdate());
|
|
157
160
|
}
|
|
158
|
-
},
|
|
159
|
-
function
|
|
160
|
-
return typeof e == "string" &&
|
|
161
|
+
}, j = d;
|
|
162
|
+
function M(e) {
|
|
163
|
+
return typeof e == "string" && j.includes(e);
|
|
161
164
|
}
|
|
162
|
-
var
|
|
165
|
+
var ne = [
|
|
163
166
|
"circle",
|
|
164
167
|
"square",
|
|
165
168
|
"triangle",
|
|
@@ -178,20 +181,20 @@ var M = [
|
|
|
178
181
|
"rectangle",
|
|
179
182
|
"kite"
|
|
180
183
|
];
|
|
181
|
-
function
|
|
182
|
-
return
|
|
184
|
+
function re(e) {
|
|
185
|
+
return ne[j.indexOf(e)];
|
|
183
186
|
}
|
|
184
|
-
function
|
|
187
|
+
function ie(e) {
|
|
185
188
|
return Math.sqrt(2 * Math.PI / (e * Math.sin(2 * Math.PI / e)));
|
|
186
189
|
}
|
|
187
|
-
function
|
|
188
|
-
let r =
|
|
190
|
+
function N(e, t, n) {
|
|
191
|
+
let r = ie(e) * n;
|
|
189
192
|
return Array.from({ length: e }, (n, i) => {
|
|
190
193
|
let a = t + i * 2 * Math.PI / e;
|
|
191
194
|
return [r * Math.cos(a), r * Math.sin(a)];
|
|
192
195
|
});
|
|
193
196
|
}
|
|
194
|
-
function
|
|
197
|
+
function P(e, t = 0) {
|
|
195
198
|
let n = e * Math.sqrt(Math.PI / 5) / 2, r = Math.cos(t), i = Math.sin(t);
|
|
196
199
|
return [
|
|
197
200
|
[-n, -3 * n],
|
|
@@ -208,14 +211,14 @@ function I(e, t = 0) {
|
|
|
208
211
|
[-n, -n]
|
|
209
212
|
].map(([e, t]) => [e * r - t * i, e * i + t * r]);
|
|
210
213
|
}
|
|
211
|
-
function
|
|
214
|
+
function F(e, t) {
|
|
212
215
|
let n = .5, r = t * Math.sqrt(Math.PI / (e * n * Math.sin(Math.PI / e)));
|
|
213
216
|
return Array.from({ length: 2 * e }, (t, i) => {
|
|
214
217
|
let a = i % 2 == 0 ? r : n * r, o = -Math.PI / 2 + i * Math.PI / e;
|
|
215
218
|
return [a * Math.cos(o), a * Math.sin(o)];
|
|
216
219
|
});
|
|
217
220
|
}
|
|
218
|
-
function
|
|
221
|
+
function I(e) {
|
|
219
222
|
let t = e * Math.sqrt(Math.PI / 2), n = t / 2;
|
|
220
223
|
return [
|
|
221
224
|
[-t, -n],
|
|
@@ -224,7 +227,7 @@ function R(e) {
|
|
|
224
227
|
[-t, n]
|
|
225
228
|
];
|
|
226
229
|
}
|
|
227
|
-
function
|
|
230
|
+
function L(e) {
|
|
228
231
|
let t = e * Math.sqrt(Math.PI / 2.5), n = 1.25 * t;
|
|
229
232
|
return [
|
|
230
233
|
[-t, -n],
|
|
@@ -235,7 +238,7 @@ function z(e) {
|
|
|
235
238
|
[0, 0]
|
|
236
239
|
];
|
|
237
240
|
}
|
|
238
|
-
function
|
|
241
|
+
function R(e) {
|
|
239
242
|
let t = e * Math.sqrt(Math.PI);
|
|
240
243
|
return [
|
|
241
244
|
[0, -t],
|
|
@@ -244,85 +247,94 @@ function B(e) {
|
|
|
244
247
|
[-t / 2, 0]
|
|
245
248
|
];
|
|
246
249
|
}
|
|
247
|
-
function
|
|
250
|
+
function z(e, t = 1) {
|
|
248
251
|
let n = -Math.PI / 2;
|
|
249
252
|
switch (e) {
|
|
250
253
|
case "circle": return null;
|
|
251
|
-
case "square": return
|
|
252
|
-
case "diamond": return
|
|
253
|
-
case "triangle": return
|
|
254
|
-
case "triangle-down": return
|
|
255
|
-
case "pentagon": return
|
|
256
|
-
case "hexagon": return
|
|
257
|
-
case "plus": return
|
|
258
|
-
case "cross": return
|
|
259
|
-
case "octagon": return
|
|
260
|
-
case "triangle-right": return
|
|
261
|
-
case "triangle-left": return
|
|
262
|
-
case "star": return
|
|
263
|
-
case "star-4": return
|
|
264
|
-
case "hourglass": return
|
|
265
|
-
case "rectangle": return
|
|
266
|
-
case "kite": return
|
|
254
|
+
case "square": return N(4, Math.PI / 4, t);
|
|
255
|
+
case "diamond": return N(4, n, t);
|
|
256
|
+
case "triangle": return N(3, n, t);
|
|
257
|
+
case "triangle-down": return N(3, Math.PI / 2, t);
|
|
258
|
+
case "pentagon": return N(5, n, t);
|
|
259
|
+
case "hexagon": return N(6, n, t);
|
|
260
|
+
case "plus": return P(t);
|
|
261
|
+
case "cross": return P(t, Math.PI / 4);
|
|
262
|
+
case "octagon": return N(8, n, t);
|
|
263
|
+
case "triangle-right": return N(3, 0, t);
|
|
264
|
+
case "triangle-left": return N(3, Math.PI, t);
|
|
265
|
+
case "star": return F(5, t);
|
|
266
|
+
case "star-4": return F(4, t);
|
|
267
|
+
case "hourglass": return L(t);
|
|
268
|
+
case "rectangle": return I(t);
|
|
269
|
+
case "kite": return R(t);
|
|
267
270
|
}
|
|
268
271
|
}
|
|
269
|
-
function
|
|
270
|
-
let i =
|
|
272
|
+
function B(e, t = 1, n = 0, r = 0) {
|
|
273
|
+
let i = z(e, t);
|
|
271
274
|
if (!i) return `M ${n - t} ${r} a ${t} ${t} 0 1 0 ${t * 2} 0 a ${t} ${t} 0 1 0 ${-t * 2} 0 Z`;
|
|
272
275
|
let a = (e) => Number(e.toFixed(3));
|
|
273
276
|
return `${i.map(([e, t], i) => `${i === 0 ? "M" : "L"} ${a(n + e)} ${a(r + t)}`).join(" ")} Z`;
|
|
274
277
|
}
|
|
275
|
-
function
|
|
276
|
-
return
|
|
278
|
+
function V(e, t, n = 0, r = 0) {
|
|
279
|
+
return B(e ? re(e) : "circle", t, n, r);
|
|
277
280
|
}
|
|
278
281
|
//#endregion
|
|
279
282
|
//#region src/components/shared/charts/shared/colors.ts
|
|
280
|
-
var
|
|
281
|
-
...Object.fromEntries(
|
|
283
|
+
var H = "var(--color-chart-default)", U = {
|
|
284
|
+
...Object.fromEntries(d.map((e) => [e, s(e)])),
|
|
282
285
|
other: "var(--color-chart-other)",
|
|
283
286
|
remainder: "var(--color-chart-remainder)",
|
|
284
287
|
emphasis: "var(--color-chart-emphasis)"
|
|
285
288
|
};
|
|
286
|
-
function
|
|
287
|
-
if (e != null) return
|
|
289
|
+
function W(e) {
|
|
290
|
+
if (e != null) return U[e] ?? e;
|
|
288
291
|
}
|
|
289
|
-
function
|
|
290
|
-
return e ===
|
|
292
|
+
function G(e) {
|
|
293
|
+
return e === U["dark-yellow"] ? "var(--color-chart-dark-yellow-text)" : void 0;
|
|
291
294
|
}
|
|
292
|
-
function
|
|
293
|
-
if (e != null &&
|
|
295
|
+
function K(e) {
|
|
296
|
+
if (e != null && M(e)) return U[e];
|
|
294
297
|
}
|
|
295
298
|
//#endregion
|
|
296
299
|
//#region src/components/shared/charts/shared/axes.ts
|
|
297
|
-
function
|
|
298
|
-
let
|
|
299
|
-
|
|
300
|
+
function q(e, r, i) {
|
|
301
|
+
let a = G(r);
|
|
302
|
+
return n`<path d=${V(e, 4.5, i, i)} fill="currentColor"
|
|
303
|
+
stroke=${a ?? t} stroke-width=${a ? 1 : t} />`;
|
|
304
|
+
}
|
|
305
|
+
function J({ items: e, onToggle: t, position: n = "top" }) {
|
|
306
|
+
let r = (e) => l`
|
|
307
|
+
${e.symbol && e.shape === "point" ? l`<svg class="lintje-legend__marker lintje-legend__marker--symbol" viewBox="0 0 14 14"
|
|
308
|
+
${p({ color: e.color ?? "var(--color-chart-default)" })}
|
|
309
|
+
aria-hidden="true" focusable="false">
|
|
310
|
+
${q(e.symbol, e.color, 7)}
|
|
311
|
+
</svg>` : e.symbol ? l`<svg class="lintje-legend__marker lintje-legend__marker--symbol" viewBox="0 0 14 14"
|
|
300
312
|
${p({ color: e.color ?? "var(--color-chart-default)" })}
|
|
301
313
|
aria-hidden="true" focusable="false">
|
|
302
314
|
<line x1="0" x2="14" y1="7" y2="7" stroke="currentColor" stroke-width="3" />
|
|
303
|
-
<path d=${
|
|
304
|
-
</svg>` :
|
|
315
|
+
<path d=${V(e.symbol, 4, 7, 7)} fill="currentColor" />
|
|
316
|
+
</svg>` : l`<span class="lintje-legend__marker lintje-legend__marker--${e.shape ?? "square"}"
|
|
305
317
|
${p({ color: e.color ?? "var(--color-chart-default)" })}
|
|
306
318
|
aria-hidden="true"></span>`}
|
|
307
319
|
<span class="lintje-legend__label">${e.label}</span>
|
|
308
320
|
`;
|
|
309
|
-
return
|
|
310
|
-
<ul class="lintje-legend lintje-legend--${
|
|
311
|
-
${e.map((e) =>
|
|
321
|
+
return l`
|
|
322
|
+
<ul class="lintje-legend lintje-legend--${n}">
|
|
323
|
+
${e.map((e) => l`
|
|
312
324
|
<li class="lintje-legend__item ${e.hidden ? "is-hidden" : ""}">
|
|
313
|
-
${t ?
|
|
314
|
-
@click=${() => t(e.label)}
|
|
315
|
-
aria-pressed=${!e.hidden}>${
|
|
325
|
+
${t && !e.fixed ? l`<button type="button" class="lintje-legend__button"
|
|
326
|
+
@click=${() => t(e.key ?? e.label)}
|
|
327
|
+
aria-pressed=${!e.hidden}>${r(e)}</button>` : r(e)}
|
|
316
328
|
</li>
|
|
317
329
|
`)}
|
|
318
330
|
</ul>
|
|
319
331
|
`;
|
|
320
332
|
}
|
|
321
|
-
function
|
|
333
|
+
function Y(e) {
|
|
322
334
|
return e ? "group" : "img";
|
|
323
335
|
}
|
|
324
|
-
function
|
|
325
|
-
return
|
|
336
|
+
function X(e) {
|
|
337
|
+
return n`
|
|
326
338
|
<filter id="focus-${e}" filterUnits="userSpaceOnUse" x="-10%" y="-10%" width="120%" height="120%"
|
|
327
339
|
color-interpolation-filters="sRGB">
|
|
328
340
|
<feComponentTransfer in="SourceAlpha" result="shape"><feFuncA type="linear" slope="100" /></feComponentTransfer>
|
|
@@ -336,26 +348,32 @@ function Z(e) {
|
|
|
336
348
|
</filter>
|
|
337
349
|
`;
|
|
338
350
|
}
|
|
339
|
-
function
|
|
351
|
+
function Z(e) {
|
|
340
352
|
return { "--lintje-focus-ring": `url(#focus-${e})` };
|
|
341
353
|
}
|
|
342
|
-
var
|
|
343
|
-
function
|
|
354
|
+
var ae = 8, oe = 20;
|
|
355
|
+
function Q(e, t = "") {
|
|
344
356
|
if (e.length < 2) return e;
|
|
345
|
-
let n = e.map((e) =>
|
|
357
|
+
let n = e.map((e) => {
|
|
358
|
+
let n = a(e.label, t), r = e.anchor === "end" ? e.x - n : e.anchor === "start" ? e.x : e.x - n / 2;
|
|
359
|
+
return {
|
|
360
|
+
left: r,
|
|
361
|
+
right: r + n
|
|
362
|
+
};
|
|
363
|
+
}), r = (t) => {
|
|
346
364
|
for (let r = 0; r + t < e.length; r += t) {
|
|
347
|
-
let i =
|
|
348
|
-
if ((
|
|
365
|
+
let e = n[r], i = n[r + t];
|
|
366
|
+
if (Math.max(i.left - e.right, e.left - i.right) < ae) return !1;
|
|
349
367
|
}
|
|
350
368
|
return !0;
|
|
351
369
|
}, i = 1;
|
|
352
370
|
for (; i < e.length && !r(i);) i += 1;
|
|
353
371
|
return i === 1 ? e : e.filter((e, t) => t % i === 0);
|
|
354
372
|
}
|
|
355
|
-
function
|
|
356
|
-
return
|
|
373
|
+
function se({ area: e = m, ticks: r, max: i, axisTitle: a, xLabels: o, xTitle: s, description: c, defs: d, zeroLine: f = !0, formatTick: h = u, id: g, height: _, fontFamily: v, interactive: y, keys: b }, x) {
|
|
374
|
+
return l`
|
|
357
375
|
<figure class="lintje-chart">
|
|
358
|
-
${
|
|
376
|
+
${a ? l`<figcaption class="lintje-chart__axis-title">${a}</figcaption>` : t}
|
|
359
377
|
<!-- The viewBox is set 1:1 to the measured pixels, so 12 px axis text really is
|
|
360
378
|
12 px — however narrow the tile is. -->
|
|
361
379
|
<svg
|
|
@@ -364,75 +382,77 @@ function ae({ area: e = m, ticks: i, max: a, axisTitle: o, xLabels: s, descripti
|
|
|
364
382
|
width=${e.width}
|
|
365
383
|
height=${e.height}
|
|
366
384
|
${p({
|
|
367
|
-
height: `${
|
|
368
|
-
...
|
|
385
|
+
height: `${_ ?? e.height}px`,
|
|
386
|
+
...Z(g)
|
|
369
387
|
})}
|
|
370
|
-
role=${
|
|
371
|
-
aria-labelledby="${
|
|
372
|
-
tabindex=${
|
|
373
|
-
@keydown=${
|
|
374
|
-
@focus=${
|
|
375
|
-
@blur=${
|
|
388
|
+
role=${Y(y)}
|
|
389
|
+
aria-labelledby="${g}-desc"
|
|
390
|
+
tabindex=${b ? 0 : t}
|
|
391
|
+
@keydown=${b?.keydown}
|
|
392
|
+
@focus=${b?.focus}
|
|
393
|
+
@blur=${b?.blur}
|
|
376
394
|
>
|
|
377
|
-
<desc id="${
|
|
395
|
+
<desc id="${g}-desc">${c}</desc>
|
|
378
396
|
<defs>
|
|
379
|
-
<pattern id="hatch-${
|
|
397
|
+
<pattern id="hatch-${g}" width="6" height="6" patternUnits="userSpaceOnUse" patternTransform="rotate(45)">
|
|
380
398
|
<line x1="0" y1="0" x2="0" y2="6" stroke="var(--color-chart-hatch)" stroke-width="2" />
|
|
381
399
|
</pattern>
|
|
382
|
-
${
|
|
383
|
-
${
|
|
400
|
+
${X(g)}
|
|
401
|
+
${d}
|
|
384
402
|
</defs>
|
|
385
403
|
|
|
386
404
|
<!-- Grid + axis labels -->
|
|
387
|
-
${
|
|
388
|
-
let
|
|
389
|
-
return
|
|
405
|
+
${r.map((t) => {
|
|
406
|
+
let r = C(t, i, e), a = t === 0;
|
|
407
|
+
return n`
|
|
390
408
|
<g>
|
|
391
409
|
<line
|
|
392
|
-
x1=${e.left} x2=${e.width - e.right} y1=${
|
|
393
|
-
stroke=${
|
|
394
|
-
stroke-width=${
|
|
395
|
-
<text x=${e.left - 8} y=${
|
|
396
|
-
${
|
|
410
|
+
x1=${e.left} x2=${e.width - e.right} y1=${r} y2=${r}
|
|
411
|
+
stroke=${a && f ? "var(--color-chart-zero)" : "var(--color-chart-grid)"}
|
|
412
|
+
stroke-width=${a && f ? 1.5 : 1} />
|
|
413
|
+
<text x=${e.left - 8} y=${r + 4} text-anchor="end" class="lintje-chart__axis-label">
|
|
414
|
+
${h(t)}
|
|
397
415
|
</text>
|
|
398
416
|
</g>
|
|
399
417
|
`;
|
|
400
418
|
})}
|
|
401
419
|
|
|
402
|
-
${
|
|
420
|
+
${x}
|
|
403
421
|
|
|
404
422
|
<!-- x-axis labels -->
|
|
405
|
-
${
|
|
406
|
-
<text x=${t.x} y=${e.height -
|
|
423
|
+
${Q(o ?? [], v).map((t) => n`
|
|
424
|
+
<text x=${t.x} y=${e.height - e.bottom + oe} text-anchor=${t.anchor ?? "middle"} class="lintje-chart__axis-label">
|
|
407
425
|
${t.label}
|
|
408
426
|
</text>
|
|
409
427
|
`)}
|
|
428
|
+
${s ? n`<text x=${e.width - e.right} y=${e.height - e.bottom + 40} text-anchor="end"
|
|
429
|
+
class="lintje-chart__x-title">${s}</text>` : t}
|
|
410
430
|
</svg>
|
|
411
431
|
</figure>
|
|
412
432
|
`;
|
|
413
433
|
}
|
|
414
|
-
function
|
|
415
|
-
let
|
|
416
|
-
return
|
|
434
|
+
function ce({ area: e = m, index: r, count: i, label: a, lastValue: o, pendingHours: s }) {
|
|
435
|
+
let c = e.left + x(e) * r / (i - 1), l = s > 6, u = e.width - e.right - c, d = u > 140;
|
|
436
|
+
return l ? n`
|
|
417
437
|
<g>
|
|
418
|
-
<line x1=${
|
|
438
|
+
<line x1=${c} x2=${c} y1=${e.top} y2=${e.height - e.bottom}
|
|
419
439
|
stroke="var(--color-text-primary)" stroke-width="1.5" stroke-dasharray="4 3" />
|
|
420
|
-
<text x=${d ?
|
|
440
|
+
<text x=${d ? c + 6 : c - 6} y=${e.top + 12}
|
|
421
441
|
text-anchor=${d ? "start" : "end"} class="lintje-chart__as-of-label">
|
|
422
|
-
${
|
|
442
|
+
${a}
|
|
423
443
|
</text>
|
|
424
|
-
${
|
|
425
|
-
text-anchor=${d ? "start" : "end"} class="lintje-chart__axis-label">${
|
|
426
|
-
<text x=${
|
|
444
|
+
${o ? n`<text x=${d ? c + 6 : c - 6} y=${e.top + 26}
|
|
445
|
+
text-anchor=${d ? "start" : "end"} class="lintje-chart__axis-label">${o}</text>` : t}
|
|
446
|
+
<text x=${c + u / 2} y=${e.top + (e.height - e.top - e.bottom) / 2}
|
|
427
447
|
text-anchor="middle" class="lintje-chart__as-of-note">
|
|
428
|
-
nog geen gegevens · ${
|
|
448
|
+
nog geen gegevens · ${s} ${s === 1 ? "uur" : "uren"} volgen
|
|
429
449
|
</text>
|
|
430
450
|
</g>
|
|
431
451
|
` : t;
|
|
432
452
|
}
|
|
433
|
-
var
|
|
453
|
+
var le = c(class extends o {
|
|
434
454
|
constructor(e) {
|
|
435
|
-
if (super(e), e.type !==
|
|
455
|
+
if (super(e), e.type !== i.ELEMENT) throw Error("placeTooltip only works on an element");
|
|
436
456
|
}
|
|
437
457
|
render(e) {
|
|
438
458
|
return t;
|
|
@@ -446,17 +466,19 @@ var $ = c(class extends s {
|
|
|
446
466
|
}), t;
|
|
447
467
|
}
|
|
448
468
|
});
|
|
449
|
-
function
|
|
450
|
-
let
|
|
451
|
-
if (!
|
|
452
|
-
let { content:
|
|
453
|
-
return
|
|
454
|
-
<div class="lintje-chart-tooltip" ${
|
|
455
|
-
<p class="lintje-chart-tooltip__title">${
|
|
456
|
-
${
|
|
469
|
+
function $(e) {
|
|
470
|
+
let n = e.tooltip;
|
|
471
|
+
if (!n) return t;
|
|
472
|
+
let { content: r } = n;
|
|
473
|
+
return l`
|
|
474
|
+
<div class="lintje-chart-tooltip" ${le(n)}>
|
|
475
|
+
<p class="lintje-chart-tooltip__title">${r.title}</p>
|
|
476
|
+
${r.rows.map((e) => l`
|
|
457
477
|
<p class="lintje-chart-tooltip__row">
|
|
458
478
|
<span class="lintje-chart-tooltip__label">
|
|
459
|
-
|
|
479
|
+
${e.symbol ? l`<svg class="lintje-chart-tooltip__marker lintje-chart-tooltip__marker--symbol"
|
|
480
|
+
viewBox="0 0 14 14" ${p({ color: e.color })}
|
|
481
|
+
aria-hidden="true" focusable="false">${q(e.symbol, e.color, 7)}</svg>` : e.color ? l`<span class="lintje-chart-tooltip__marker" ${p({ background: e.color })}></span>` : t}
|
|
460
482
|
${e.label}
|
|
461
483
|
</span>
|
|
462
484
|
<span class="lintje-chart-tooltip__value">${e.value}</span>
|
|
@@ -467,12 +489,12 @@ function se(e) {
|
|
|
467
489
|
}
|
|
468
490
|
//#endregion
|
|
469
491
|
//#region src/components/shared/charts/shared/stagger.ts
|
|
470
|
-
function
|
|
492
|
+
function ue(e, t) {
|
|
471
493
|
return { "--lintje-stagger": String(t > 1 ? e / (t - 1) : 0) };
|
|
472
494
|
}
|
|
473
|
-
function
|
|
495
|
+
function de(e, t, n, r) {
|
|
474
496
|
let i = n > 1 ? e / (n - 1) : 0, a = r > 1 ? t / (r - 1) : 0;
|
|
475
497
|
return { "--lintje-stagger": String(.7 * i + .3 * a) };
|
|
476
498
|
}
|
|
477
499
|
//#endregion
|
|
478
|
-
export {
|
|
500
|
+
export { x as C, C as E, w as S, te as T, V as _, Z as a, b, X as c, H as d, W as f, M as g, j as h, Y as i, J as l, K as m, ue as n, ce as o, G as p, $ as r, se as s, de as t, Q as u, A as v, y as w, S as x, T as y };
|
package/dist-elements/core.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Tt as FrameStateController, gt as ICONS,
|
|
1
|
+
export { Tt as FrameStateController, gt as ICONS, Xt as LINTJE_VERSION, zt as LintjeElement, It as MOBILE, Lt as MediaController, Rt as WIDE, _t as ariaKeyShortcuts, Vt as baseStyles, vt as characterKeys, Bt as define, Dt as getFrameState, Q as iconGlyph, nt as iconIsMissing, rt as iconSource, $ as iconStyles, bt as isTypingTarget, xt as keyLabels, it as loadIcon, at as loadedIcon, ot as loadedIconNames, Nt as lockScroll, st as onIconChange, St as registerShortcut, et as renderIcon, Pt as scrollRoot, Ct as setCharacterKeys, Ot as setFrameState, Ft as setHostConfig, lt as setIconSource, kt as setScrolled, At as setTitleHidden, Ht as shadowCss, wt as shortcuts, jt as subscribeToFrameState, Ut as toShadowCss, Wt as tokenStyles } from "./chunks/base-Bg-IFOPG.js";
|