lintje 0.13.0 → 0.13.2
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/chunks/addon-CpQCmf0a.js +5 -0
- package/dist-elements/chunks/{avatar-LhpMTvpD.js → avatar-B6dKdtGU.js} +1 -1
- package/dist-elements/chunks/axes-Ce4tMvPe.js +129 -0
- package/dist-elements/chunks/base-D8Q8sQCj.js +252 -0
- package/dist-elements/chunks/chart-styles-nx70xRzE.js +45 -0
- package/dist-elements/chunks/{controls-DksmKkWN.js → controls-DHkjleqE.js} +1 -1
- package/dist-elements/chunks/date-format-imsP7-Nh.js +1 -0
- package/dist-elements/chunks/dialog-D4xqY347.js +1 -0
- package/dist-elements/chunks/{disclosure-CCO3GRDT.js → disclosure-DK8aIhWl.js} +5 -5
- package/dist-elements/chunks/{download-DXiWLTI2.js → download-Fdo7dKWd.js} +2 -2
- package/dist-elements/chunks/focus-trap-DmfusP3B.js +1 -0
- package/dist-elements/chunks/input-CgCrHxiZ.js +1 -0
- package/dist-elements/chunks/input-DyOCwq6h.js +8 -0
- package/dist-elements/chunks/{month-grid-S8RlqdwA.js → month-grid-BsW9jRNi.js} +8 -8
- package/dist-elements/chunks/{other-DoAwQm3o.js → other-BnXhCURa.js} +2 -1
- package/dist-elements/chunks/{player-BvpcNxBe.js → player-CnoXMz2g.js} +21 -21
- package/dist-elements/chunks/sentence-CxM-gm_8.js +3 -0
- package/dist-elements/chunks/{sheet-D7wJCRja.js → sheet-DKBISOgH.js} +2 -2
- package/dist-elements/chunks/stagger-VUPHAfRM.js +28 -0
- package/dist-elements/core.js +1 -1
- package/dist-elements/custom-elements.json +274 -28
- package/dist-elements/data-types.json +179 -11
- package/dist-elements/feedback.js +1 -1
- package/dist-elements/guides/dashboard.md +3 -1
- package/dist-elements/guides/page-contents.md +2 -1
- package/dist-elements/guides/start.md +6 -2
- package/dist-elements/layout.js +1 -1
- package/dist-elements/lintje.js +1417 -1293
- package/dist-elements/overlays.js +1 -1
- package/dist-elements/tag/accordion.js +3 -3
- package/dist-elements/tag/ai-label.js +5 -5
- package/dist-elements/tag/announcement.js +10 -10
- package/dist-elements/tag/app-search.js +44 -39
- package/dist-elements/tag/attachment.js +28 -27
- package/dist-elements/tag/audio-player.js +54 -49
- package/dist-elements/tag/badge.js +1 -1
- package/dist-elements/tag/breadcrumbs.js +14 -14
- package/dist-elements/tag/button.js +1 -1
- package/dist-elements/tag/card-list.js +10 -9
- package/dist-elements/tag/card.js +41 -41
- package/dist-elements/tag/chart.js +636 -599
- package/dist-elements/tag/chat-answer.js +23 -23
- package/dist-elements/tag/chat-composer.js +57 -54
- package/dist-elements/tag/chat-message.js +16 -16
- package/dist-elements/tag/chat-questions.js +79 -68
- package/dist-elements/tag/chat-steps.js +29 -27
- package/dist-elements/tag/chat-strip.js +25 -25
- package/dist-elements/tag/chat-suggestions.js +5 -5
- package/dist-elements/tag/chat.js +62 -61
- package/dist-elements/tag/checkbox-group.js +15 -12
- package/dist-elements/tag/checkbox.js +9 -9
- package/dist-elements/tag/code.js +7 -7
- package/dist-elements/tag/combobox.js +21 -21
- package/dist-elements/tag/conflict-alert.js +2 -2
- package/dist-elements/tag/copy-button.js +10 -8
- package/dist-elements/tag/data-table.js +303 -297
- package/dist-elements/tag/date-input.js +15 -15
- package/dist-elements/tag/date-range.js +18 -18
- package/dist-elements/tag/description-list.js +24 -24
- package/dist-elements/tag/dialog.js +7 -7
- package/dist-elements/tag/document-viewer.js +32 -32
- package/dist-elements/tag/drawer.js +9 -9
- package/dist-elements/tag/empty-state.js +1 -1
- package/dist-elements/tag/error-page.js +14 -14
- package/dist-elements/tag/error-summary.js +15 -15
- package/dist-elements/tag/expander.js +4 -4
- package/dist-elements/tag/explainer.js +6 -6
- package/dist-elements/tag/field.js +5 -5
- package/dist-elements/tag/file-upload.js +19 -18
- package/dist-elements/tag/filter-bar.js +45 -44
- package/dist-elements/tag/filter-sheet.js +7 -7
- package/dist-elements/tag/filter-zone.js +23 -23
- package/dist-elements/tag/find.js +14 -14
- package/dist-elements/tag/footer.js +13 -13
- package/dist-elements/tag/form-actions.js +5 -2
- package/dist-elements/tag/form-section.js +4 -4
- package/dist-elements/tag/form.js +3 -3
- package/dist-elements/tag/gallery.js +11 -11
- package/dist-elements/tag/graph.js +58 -58
- package/dist-elements/tag/grid-item.js +1 -1
- package/dist-elements/tag/grid.js +1 -1
- package/dist-elements/tag/hero.js +7 -7
- package/dist-elements/tag/highlight.js +3 -3
- package/dist-elements/tag/icon-button.js +1 -1
- package/dist-elements/tag/icon.js +1 -1
- package/dist-elements/tag/job-list.js +4 -4
- package/dist-elements/tag/key.js +1 -1
- package/dist-elements/tag/kpi-row.js +25 -22
- package/dist-elements/tag/kpi.js +85 -82
- package/dist-elements/tag/language-nav.js +20 -20
- package/dist-elements/tag/level-meter.js +7 -7
- package/dist-elements/tag/list.js +54 -48
- package/dist-elements/tag/log-viewer.js +96 -97
- package/dist-elements/tag/logo.js +23 -23
- package/dist-elements/tag/map.js +173 -168
- package/dist-elements/tag/menu-button.js +49 -49
- package/dist-elements/tag/modal.js +12 -10
- package/dist-elements/tag/multiselect.js +21 -21
- package/dist-elements/tag/note.js +6 -6
- package/dist-elements/tag/notifications.js +37 -37
- package/dist-elements/tag/number-input.js +19 -18
- package/dist-elements/tag/page-header.js +17 -17
- package/dist-elements/tag/pagination.js +41 -40
- package/dist-elements/tag/person-group.js +10 -10
- package/dist-elements/tag/person.js +7 -7
- package/dist-elements/tag/popover.js +1 -1
- package/dist-elements/tag/progress-bar.js +1 -1
- package/dist-elements/tag/prose.js +1 -1
- package/dist-elements/tag/qr-code.js +5 -5
- package/dist-elements/tag/radio-group.js +18 -17
- package/dist-elements/tag/range.js +25 -25
- package/dist-elements/tag/recording-status.js +9 -9
- package/dist-elements/tag/repeater.js +4 -4
- package/dist-elements/tag/segmented.js +11 -11
- package/dist-elements/tag/select.js +7 -7
- package/dist-elements/tag/shell.js +360 -354
- package/dist-elements/tag/skeleton.js +1 -1
- package/dist-elements/tag/slot-picker.js +12 -12
- package/dist-elements/tag/sortable-list.js +23 -23
- package/dist-elements/tag/spinner.js +1 -1
- package/dist-elements/tag/split-pane.js +9 -9
- package/dist-elements/tag/status-dot.js +1 -1
- package/dist-elements/tag/stepper.js +18 -18
- package/dist-elements/tag/streaming-text.js +13 -13
- package/dist-elements/tag/sub-nav.js +26 -26
- package/dist-elements/tag/tabs.js +40 -40
- package/dist-elements/tag/tag-input.js +32 -29
- package/dist-elements/tag/text-editor.js +21 -19
- package/dist-elements/tag/text-input.js +21 -21
- package/dist-elements/tag/textarea.js +13 -11
- package/dist-elements/tag/tile.js +1 -1
- package/dist-elements/tag/time-input.js +16 -16
- package/dist-elements/tag/timeline.js +74 -71
- package/dist-elements/tag/toast.js +14 -12
- package/dist-elements/tag/toggle.js +6 -6
- package/dist-elements/tag/toggletip.js +6 -6
- package/dist-elements/tag/token-value.js +1 -1
- package/dist-elements/tag/tooltip.js +1 -1
- package/dist-elements/tag/transcript.js +34 -35
- package/dist-elements/tag/translator.js +4 -3
- package/dist-elements/tag/tree-view.js +22 -22
- package/dist-elements/tag/user-menu.js +58 -57
- package/dist-elements/tag/video-player.js +12 -12
- package/dist-elements/tokens.css +34 -16
- package/dist-elements/tokens.json +12 -2
- package/dist-elements/types/components/actions/copy-button/copy-button.d.ts +5 -0
- package/dist-elements/types/components/actions/menu-button/menu-button.d.ts +6 -1
- package/dist-elements/types/components/charts/kpi/kpi.d.ts +7 -0
- package/dist-elements/types/components/charts/kpi-row/kpi-row.d.ts +10 -2
- package/dist-elements/types/components/chat/chat/chat.d.ts +1 -1
- package/dist-elements/types/components/chat/chat-composer/chat-composer.d.ts +0 -2
- package/dist-elements/types/components/chat/chat-questions/chat-questions.d.ts +2 -1
- package/dist-elements/types/components/chat/shared/chat-terms.d.ts +2 -0
- package/dist-elements/types/components/content/attachment/attachment.d.ts +6 -1
- package/dist-elements/types/components/content/audio-player/audio-player.d.ts +6 -0
- package/dist-elements/types/components/content/log-viewer/log-viewer.d.ts +4 -0
- package/dist-elements/types/components/content/translator/translator.d.ts +5 -0
- package/dist-elements/types/components/feedback/toast/toast.d.ts +5 -1
- package/dist-elements/types/components/filters/filter-zone/filter-zone.d.ts +3 -1
- package/dist-elements/types/components/forms/form-actions/form-actions.d.ts +4 -1
- package/dist-elements/types/components/forms/stepper/stepper.d.ts +1 -0
- package/dist-elements/types/components/frame/app-search/app-search.d.ts +2 -0
- package/dist-elements/types/components/frame/shell/header.d.ts +5 -1
- package/dist-elements/types/components/frame/shell/navigation.d.ts +0 -2
- package/dist-elements/types/components/frame/shell/shell.d.ts +5 -0
- package/dist-elements/types/components/frame/user-menu/user-menu.d.ts +2 -0
- package/dist-elements/types/components/inputs/checkbox-group/checkbox-group.d.ts +2 -1
- package/dist-elements/types/components/inputs/date-input/date-input.d.ts +5 -0
- package/dist-elements/types/components/inputs/radio-group/radio-group.d.ts +1 -2
- package/dist-elements/types/components/inputs/shared/field-foot.d.ts +6 -0
- package/dist-elements/types/components/inputs/shared/input.d.ts +17 -2
- package/dist-elements/types/components/inputs/tag-input/tag-input.d.ts +2 -0
- package/dist-elements/types/components/inputs/text-input/text-input.d.ts +5 -2
- package/dist-elements/types/components/inputs/textarea/textarea.d.ts +11 -0
- package/dist-elements/types/components/overlays/tooltip/tooltip.d.ts +4 -1
- package/dist-elements/types/components/shared/charts/dual-axis-chart/dual-axis-chart.d.ts +2 -2
- package/dist-elements/types/components/shared/charts/dumbbell-chart/dumbbell-chart.d.ts +4 -1
- package/dist-elements/types/components/shared/charts/histogram-chart/histogram-chart.d.ts +2 -1
- package/dist-elements/types/components/shared/charts/map-chart/leaflet.d.ts +4 -0
- package/dist-elements/types/components/shared/charts/map-chart/map-chart.d.ts +10 -1
- package/dist-elements/types/components/shared/charts/map-chart/marks.d.ts +3 -1
- package/dist-elements/types/components/shared/charts/map-chart/reveal.d.ts +2 -2
- package/dist-elements/types/components/shared/charts/pie-chart/pie-chart.d.ts +4 -3
- package/dist-elements/types/components/shared/charts/scatter-chart/scatter-chart.d.ts +2 -1
- package/dist-elements/types/components/shared/charts/shared/axes.d.ts +7 -6
- package/dist-elements/types/components/shared/charts/shared/colors.d.ts +12 -7
- package/dist-elements/types/components/shared/charts/shared/controller.d.ts +88 -5
- package/dist-elements/types/components/shared/charts/shared/fold.d.ts +38 -0
- package/dist-elements/types/components/shared/charts/shared/forecast.d.ts +6 -1
- package/dist-elements/types/components/shared/charts/shared/mark-select.d.ts +4 -3
- package/dist-elements/types/components/shared/charts/shared/nearest-mark.d.ts +25 -0
- package/dist-elements/types/components/shared/charts/shared/plot-keys.d.ts +9 -1
- package/dist-elements/types/components/shared/charts/shared/scale.d.ts +5 -4
- package/dist-elements/types/components/shared/charts/stacked-bar-chart/stacked-bar-chart.d.ts +4 -1
- package/dist-elements/types/components/shared/charts/treemap-chart/treemap-chart.d.ts +7 -0
- package/dist-elements/types/components/shared/charts/treemap-chart/treemap-labels.d.ts +3 -2
- package/dist-elements/types/components/shared/date-format.d.ts +3 -3
- package/dist-elements/types/components/shared/other.d.ts +2 -1
- package/dist-elements/types/components/tables/data-table/data-table.d.ts +7 -3
- package/dist-elements/types/components/tables/data-table/filters.d.ts +2 -1
- package/dist-elements/types/components/tables/list/list.d.ts +2 -0
- package/dist-elements/types/components/tables/pagination/pagination.d.ts +1 -0
- package/dist-elements/types/core/format.d.ts +15 -3
- package/dist-elements/types/core/scroll-room.d.ts +16 -0
- package/dist-elements/types/types.d.ts +6 -1
- package/package.json +1 -1
- package/dist-elements/chunks/addon-uVno0du7.js +0 -5
- package/dist-elements/chunks/axes-Bvby71Kw.js +0 -129
- package/dist-elements/chunks/base-CA5SqOS7.js +0 -252
- package/dist-elements/chunks/chart-styles-DOqcYbwm.js +0 -45
- package/dist-elements/chunks/date-format-DvDaZtFc.js +0 -1
- package/dist-elements/chunks/dialog-IENGotYb.js +0 -1
- package/dist-elements/chunks/focus-trap-BQYLu24z.js +0 -1
- package/dist-elements/chunks/input-Ca1jedrl.js +0 -8
- package/dist-elements/chunks/input-_KQsbmkp.js +0 -1
- package/dist-elements/chunks/sentence-C9bcudIj.js +0 -3
- package/dist-elements/chunks/stagger-w2eZPjUS.js +0 -27
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A tap beside a small mark: a drawn mark under the pointer answers itself, and elsewhere in the
|
|
3
|
+
* plot the nearest clickable mark within half of `--h-target` does (WCAG 2.5.8), as the scatter
|
|
4
|
+
* picks its nearest point. A thin bar, a thin part of a stack or a bar among many on a phone is
|
|
5
|
+
* then a full target, without a neighbour's target covering it.
|
|
6
|
+
*/
|
|
7
|
+
import { type SVGTemplateResult } from 'lit';
|
|
8
|
+
import type { MarkAttributes } from './mark-select.js';
|
|
9
|
+
import type { PlotArea } from './scale.js';
|
|
10
|
+
import type { SvgSlot } from './axes.js';
|
|
11
|
+
/** A mark as drawn, in the drawing's own pixels. */
|
|
12
|
+
export interface MarkBox {
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
mark: MarkAttributes | undefined;
|
|
18
|
+
}
|
|
19
|
+
/** The clickable mark nearest to a point, by its distance to the box; `null` past `reach`. */
|
|
20
|
+
export declare function nearestMark(boxes: MarkBox[], px: number, py: number, reach: number): MarkAttributes | null;
|
|
21
|
+
/**
|
|
22
|
+
* The marks over a transparent hit area of the plot that sends a click beside them to the
|
|
23
|
+
* nearest. Without a clickable mark the marks stay as they are.
|
|
24
|
+
*/
|
|
25
|
+
export declare function nearestHit(area: PlotArea, boxes: MarkBox[], marks: SvgSlot): SVGTemplateResult;
|
|
@@ -16,11 +16,19 @@ export interface PlotPoint {
|
|
|
16
16
|
/** Where the tooltip ends when it does not fit right of `x` (`TooltipState.flip`). */
|
|
17
17
|
flip?: number;
|
|
18
18
|
}
|
|
19
|
-
/** What the drawing (the `<svg>`) takes. */
|
|
19
|
+
/** What the drawing (the `<svg>`) takes, and its marks. */
|
|
20
20
|
export interface PlotKeys {
|
|
21
21
|
keydown: (event: KeyboardEvent) => void;
|
|
22
22
|
focus: (event: FocusEvent) => void;
|
|
23
23
|
blur: () => void;
|
|
24
|
+
/**
|
|
25
|
+
* The pointer on category `index`, or the focus on its mark (`now`): the keyboard's tooltip at
|
|
26
|
+
* the keyboard's place, without the status. The pointer's follows to another category only
|
|
27
|
+
* after a moment, so the pointer can reach it (`ChartController.pointTo`).
|
|
28
|
+
*/
|
|
29
|
+
point: (event: Event, index: number, now?: boolean) => void;
|
|
30
|
+
/** The pointer left the marks. */
|
|
31
|
+
leave: () => void;
|
|
24
32
|
}
|
|
25
33
|
/** The tooltip's text as one sentence, for a screen reader. */
|
|
26
34
|
export declare function tooltipSentence(content: TooltipContent): string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** Scale helpers for the hand-made SVG charts. Pure geometry. */
|
|
2
|
+
import { type TextFont } from '../../../../core/format.js';
|
|
2
3
|
export interface PlotArea {
|
|
3
4
|
width: number;
|
|
4
5
|
height: number;
|
|
@@ -25,8 +26,8 @@ export interface RowLabelColumn {
|
|
|
25
26
|
* The label column of a chart with a label per row: as wide as the widest label, capped at
|
|
26
27
|
* `ROW_LABEL_SHARE` of the chart and `ROW_LABEL_MAX`.
|
|
27
28
|
*/
|
|
28
|
-
export declare function rowLabelColumn(labels: string[], chartWidth: number, {
|
|
29
|
-
|
|
29
|
+
export declare function rowLabelColumn(labels: string[], chartWidth: number, { font }?: {
|
|
30
|
+
font?: TextFont | string;
|
|
30
31
|
}): RowLabelColumn;
|
|
31
32
|
export interface AxisColumn {
|
|
32
33
|
width: number;
|
|
@@ -37,9 +38,9 @@ export interface AxisColumn {
|
|
|
37
38
|
* The column an axis takes: its widest tick label (measured) plus the gap, capped by
|
|
38
39
|
* `AXIS_COLUMN_MAX` and `AXIS_COLUMN_SHARE`; past the caps the ticks go compact ("1,2 mln").
|
|
39
40
|
*/
|
|
40
|
-
export declare function axisColumn(ticks: number[], chartWidth: number, { minimum,
|
|
41
|
+
export declare function axisColumn(ticks: number[], chartWidth: number, { minimum, font }?: {
|
|
41
42
|
minimum?: number;
|
|
42
|
-
|
|
43
|
+
font?: TextFont | string;
|
|
43
44
|
}): AxisColumn;
|
|
44
45
|
export declare function plotWidth(v: PlotArea): number;
|
|
45
46
|
export declare function axisScale(max: number, steps?: number): {
|
package/dist-elements/types/components/shared/charts/stacked-bar-chart/stacked-bar-chart.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* Stacked bars, sequential and normalized to 100 %: tints of one color, darkest at the bottom.
|
|
3
|
+
* Past five parts in the ladder the smallest fold into "Overig" (`foldStack`).
|
|
4
|
+
*/
|
|
2
5
|
import { type TemplateResult } from 'lit';
|
|
3
6
|
import { type ChartOptions } from '../shared/controller.js';
|
|
4
7
|
import type { ChartSpec } from '../shared/types.js';
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
import { type TemplateResult } from 'lit';
|
|
10
10
|
import type { ChartOptions } from '../shared/controller.js';
|
|
11
11
|
import type { ChartSpec } from '../shared/types.js';
|
|
12
|
+
import { type TreemapRect } from './squarify.js';
|
|
12
13
|
export { squarify } from './squarify.js';
|
|
13
14
|
export { fitLabel } from './treemap-labels.js';
|
|
14
15
|
export { treemapModel, treemapRows } from './treemap-parts.js';
|
|
@@ -16,3 +17,9 @@ type TreemapSpec = Extract<ChartSpec, {
|
|
|
16
17
|
kind: 'treemap';
|
|
17
18
|
}>;
|
|
18
19
|
export declare function renderTreemapChart(spec: TreemapSpec, options: ChartOptions): TemplateResult;
|
|
20
|
+
/**
|
|
21
|
+
* The part a click at a point chooses over the one under it: a clickable part thinner than `size`
|
|
22
|
+
* takes `size` across its thin side, centred on it, over its neighbours (WCAG 2.5.8), and the
|
|
23
|
+
* nearest of two such wins. `null` leaves the click to the part under the pointer.
|
|
24
|
+
*/
|
|
25
|
+
export declare function thinPartAt(boxes: TreemapRect[], clickable: boolean[], x: number, y: number, size: number): number | null;
|
|
@@ -28,9 +28,10 @@ export declare const LINE_HEIGHT: {
|
|
|
28
28
|
* The label of an area of `width` by `height`: for a part (`share` given) its name in 14 px bold
|
|
29
29
|
* with amount and share under it, then the same in 12 px, then without the share, then the name
|
|
30
30
|
* alone; for a sub-part its name in 12 px and the amount in bold, then the name alone. Last, the
|
|
31
|
-
* name cut short with the amount if that fits. Empty where four letters do not fit.
|
|
31
|
+
* name cut short with the amount if that fits. Empty where four letters do not fit. `scale` is
|
|
32
|
+
* how much larger than designed the reader's text is drawn: the lines are as much taller.
|
|
32
33
|
*/
|
|
33
34
|
export declare function fitLabel(label: LabelText, box: {
|
|
34
35
|
width: number;
|
|
35
36
|
height: number;
|
|
36
|
-
}, measure: Measure): LabelLine[];
|
|
37
|
+
}, measure: Measure, scale?: number): LabelLine[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The date input's arithmetic. Typed `3-10-26` / `03.10.2026` (day, month, year),
|
|
3
|
-
* `03-10-2026`, sent as ISO `2026-10-03`. `Date` objects are made at noon UTC so no time
|
|
4
|
-
* or daylight-saving shift can move a day.
|
|
2
|
+
* The date input's arithmetic. Typed `3-10-26` / `03.10.2026` / `03102026` (day, month, year),
|
|
3
|
+
* shown `03-10-2026`, sent as ISO `2026-10-03`. `Date` objects are made at noon UTC so no time
|
|
4
|
+
* zone or daylight-saving shift can move a day.
|
|
5
5
|
*/
|
|
6
6
|
export type ParsedDate = {
|
|
7
7
|
kind: 'empty';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The field of an own answer ("Anders, namelijk"): a `lintje-text-input` under the option that
|
|
3
3
|
* opens it, labelled by the option's word. The choice groups and the chat questions' "Iets
|
|
4
|
-
* anders…" draw it. It checks nothing: whoever draws it sets the host's message as `error
|
|
4
|
+
* anders…" draw it. It checks nothing: whoever draws it sets the host's message as `error`, so it
|
|
5
|
+
* says it must be filled with `aria-required` alone.
|
|
5
6
|
*/
|
|
6
7
|
import { type TemplateResult } from 'lit';
|
|
7
8
|
import '../inputs/text-input/text-input.js';
|
|
@@ -206,15 +206,19 @@ export declare class LintjeDataTable extends LintjeContentTileElement {
|
|
|
206
206
|
*/
|
|
207
207
|
private totalContent;
|
|
208
208
|
/** Enter or Space on the row itself; a key meant for a control inside it stays that control's. */
|
|
209
|
-
private rowKeydown;
|
|
210
209
|
/**
|
|
211
210
|
* The host may take the row over by cancelling the event; else the page goes to its `href`. A
|
|
212
|
-
* modifier or middle click opens the `href` in a new tab, as on a link, without the event.
|
|
211
|
+
* modifier or middle click opens the `href` in a new tab, as on a link, without the event. On
|
|
212
|
+
* the name's own link the browser follows it, unless the host cancels.
|
|
213
213
|
*/
|
|
214
214
|
private activate;
|
|
215
215
|
/** The page is view state, not a number: it stays out of the URL. The table counts from 0. */
|
|
216
216
|
private pager;
|
|
217
|
-
/**
|
|
217
|
+
/**
|
|
218
|
+
* The name of an `openable` row: a button in the shape of a link, since it opens, not goes. In
|
|
219
|
+
* a clickable table the name is the row's one Tab stop: a link to its `href`, else a button,
|
|
220
|
+
* and the row's click hears it (WCAG 4.1.2).
|
|
221
|
+
*/
|
|
218
222
|
private opener;
|
|
219
223
|
private cell;
|
|
220
224
|
/**
|
|
@@ -29,7 +29,8 @@ export declare function columnsChange(first: string, order: readonly string[], c
|
|
|
29
29
|
/** How the focus left a column panel: Tab past its first or last stop, or anywhere else. */
|
|
30
30
|
export type PanelLeave = 'back' | 'forward' | 'away';
|
|
31
31
|
export declare function renderFunnel(column: TableColumnData, value: FilterValue | null | undefined, expanded: boolean, onOpen: (anchor: HTMLElement) => void): TemplateResult;
|
|
32
|
-
|
|
32
|
+
/** `nameId` is the column name above the field: the group of its options takes it as its name. */
|
|
33
|
+
export declare function renderFilterField(column: TableColumnData, value: FilterValue | undefined, onChange: (value: FilterValue) => void, nameId?: string): TemplateResult;
|
|
33
34
|
export declare function renderFilterPopover(options: {
|
|
34
35
|
column: TableColumnData;
|
|
35
36
|
anchor: Element | null;
|
|
@@ -26,6 +26,8 @@ import type { Person } from '../../../types.js';
|
|
|
26
26
|
export interface ListItem {
|
|
27
27
|
id: string;
|
|
28
28
|
title: string;
|
|
29
|
+
/** The language of the title when it is not the page's (`en`), as `lang` on it. */
|
|
30
|
+
lang?: string;
|
|
29
31
|
/** Makes the title a link. */
|
|
30
32
|
href?: string;
|
|
31
33
|
/** The muted line under the title: "47:12 · 3 sprekers". */
|
|
@@ -6,11 +6,23 @@ export declare function formatCompactNumber(n: number): string;
|
|
|
6
6
|
export declare function formatDataLabel(n: number, available: number): string;
|
|
7
7
|
/** Whether a data label fits in `available` px: ~6.5 px per character at 12 px. */
|
|
8
8
|
export declare function dataLabelFits(text: string, available: number): boolean;
|
|
9
|
+
/** The type a label is measured in: its family, and what the reader's own settings make of it. */
|
|
10
|
+
export interface TextFont {
|
|
11
|
+
family: string;
|
|
12
|
+
/** How large a 12 px label is drawn, over 12: more with a larger default font. */
|
|
13
|
+
scale?: number;
|
|
14
|
+
/** The reader's letter and word spacing, in em. */
|
|
15
|
+
letterSpacing?: number;
|
|
16
|
+
wordSpacing?: number;
|
|
17
|
+
}
|
|
9
18
|
/** `text` shortened with an ellipsis until it fits `maxWidth` px in the axis label font. */
|
|
10
|
-
export declare function truncateToWidth(text: string, maxWidth: number,
|
|
19
|
+
export declare function truncateToWidth(text: string, maxWidth: number, font?: TextFont | string): string;
|
|
20
|
+
/** `text` in lines of at most `maxWidth` px, word by word; a word longer than a line breaks. */
|
|
21
|
+
export declare function wrapToWidth(text: string, maxWidth: number, font?: TextFont | string, weight?: number, size?: number): string[];
|
|
11
22
|
/**
|
|
12
23
|
* Width in px of `text` in the 12 px chart font, at `weight` (400 for an axis label, 700 for a
|
|
13
|
-
* data label), or at another `size`; ~6.5 px per character at 12 px without a canvas.
|
|
24
|
+
* data label), or at another `size`; ~6.5 px per character at 12 px without a canvas. With the
|
|
25
|
+
* reader's settings in `font`, as wide as the browser draws it.
|
|
14
26
|
*/
|
|
15
|
-
export declare function textWidth(text: string,
|
|
27
|
+
export declare function textWidth(text: string, font?: TextFont | string, weight?: number, size?: number): number;
|
|
16
28
|
export declare function formatPercent(n: number, decimals?: number): string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type RoomSide = 'top' | 'bottom';
|
|
2
|
+
/** Keeps `room` px free at one edge of `scroller` for `owner`; 0 or no scroller drops the claim. */
|
|
3
|
+
export declare function keepRoom(owner: object, scroller: HTMLElement | null, side: RoomSide, room: number): void;
|
|
4
|
+
/** Drops every claim of `owner`; the scroller gets back what stood there without it. */
|
|
5
|
+
export declare function releaseRoom(owner: object): void;
|
|
6
|
+
/** The largest room the others claim at one edge: what an element standing on top of them clears. */
|
|
7
|
+
export declare function roomBeside(owner: object, scroller: HTMLElement | null, side: RoomSide): number;
|
|
8
|
+
/** Calls `listener` after the room at an edge of `scroller` changed; returns the undo. */
|
|
9
|
+
export declare function watchRoom(scroller: HTMLElement, listener: () => void): () => void;
|
|
10
|
+
/**
|
|
11
|
+
* Scrolls the focused element clear of `cover` where it still lies under it: the room falls
|
|
12
|
+
* short where WebKit scrolls a text field's text into view, not its border and padding, and for
|
|
13
|
+
* a cover that keeps none. Only what `owner` itself covers: a sheet or dialog over it is not
|
|
14
|
+
* under it.
|
|
15
|
+
*/
|
|
16
|
+
export declare function scrollFocusClear(owner: Element, cover: Element, side: RoomSide): void;
|
|
@@ -137,7 +137,10 @@ export interface ChartData extends FrameSettings, TileData, ContentState {
|
|
|
137
137
|
chart: ChartSpec;
|
|
138
138
|
/** The chart's `<desc>`: a readable summary, the accessible alternative. Required. */
|
|
139
139
|
description: string;
|
|
140
|
-
/**
|
|
140
|
+
/**
|
|
141
|
+
* The chosen mark, by the id its link carries: it is outlined, the rest step back. Given, also
|
|
142
|
+
* as `null`, a mark with a `href` chooses (a toggle); left out, it is a link to its `href`.
|
|
143
|
+
*/
|
|
141
144
|
selectedId?: string | null;
|
|
142
145
|
/** The URL that undoes the selection; clicking the chosen mark again and Escape follow it. */
|
|
143
146
|
clearHref?: string;
|
|
@@ -819,6 +822,8 @@ export type ChatBlock = {
|
|
|
819
822
|
* with its outcome: "3 bronnen doorzoeken" while busy, "3 bronnen doorzocht" when done,
|
|
820
823
|
* "Tabel ophalen mislukt" or "Tabel ophalen gestopt". */
|
|
821
824
|
export interface ChatStep {
|
|
825
|
+
/** What the step does or did. A screen reader hears its state after it ("bezig", "mislukt",
|
|
826
|
+
* "gestopt") unless the label already holds that word. */
|
|
822
827
|
label: string;
|
|
823
828
|
/** `done` without it. */
|
|
824
829
|
state?: Extract<WorkState, 'busy' | 'done' | 'error' | 'cancelled'>;
|
package/package.json
CHANGED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{bn as e,vn as t,wt as n}from"./base-CA5SqOS7.js";var r=`lintje-input-prefix`,i=`lintje-input-suffix`;function a(a,o,s){return o?e`<span
|
|
2
|
-
id=${a===`prefix`?r:i}
|
|
3
|
-
class=${n({"lintje-field__addon":!0,[`lintje-field__addon--${a}`]:!0,"is-readonly":s.readonly,"is-disabled":s.disabled})}
|
|
4
|
-
>${o}</span
|
|
5
|
-
>`:t}function o(e,n,r){return[e?`lintje-input-prefix`:``,n?`lintje-input-suffix`:``,r===t?``:r].filter(Boolean).join(` `)||t}export{a as n,o as t};
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import{Dt as e,Lt as t,bn as n,g as r,m as i,n as a,r as o,t as s,v as c,vn as l,xn as u,y as d}from"./base-CA5SqOS7.js";var f={width:900,height:264,left:52,right:8,top:16,bottom:28},p=.25,m=16,h=10,g=.3;function _(e,t,{fontFamily:n=``}={}){let r=Math.min(320,Math.round(t*g)),i=Math.ceil(Math.max(0,...e.map(e=>c(e,n)))),a=Math.min(r,i);return{labelEnd:a,barStart:a+h,fit:e=>d(e,a,n)}}function v(e,t,{minimum:n=m,fontFamily:a=``}={}){let o=Math.min(96,Math.round(t*p)),s=t=>Math.ceil(Math.max(0,...e.map(e=>c(t(e),a)))+8),l=r,u=s(l);return u>o&&(l=i,u=s(l)),{width:Math.min(o,Math.max(n,u)),format:l}}function y(e){return e.width-e.left-e.right}function b(e){return e.height-e.top-e.bottom}function x(e,t=4){if(e<=0)return{max:1,ticks:[0,1]};let n=e/t,r=10**Math.floor(Math.log10(n)),i=n/r,a=(i<=1?1:i<=2?2:i<=2.5?2.5:i<=5?5:10)*r,o=Math.ceil(e/a)*a,s=[];for(let e=0;e<=o+1e-9;e+=a)s.push(Number(e.toFixed(6)));return{max:o,ticks:s}}function S(e,t,n){return n.top+b(n)*(1-e/t)}function C(e,t,n){return t<=1?n.left+y(n)/2:n.left+y(n)*e/(t-1)}function w(e,t,n,r=.22){let i=y(n)/t,a=i*(1-r);return{x:n.left+i*e+(i-a)/2,width:a,center:n.left+i*e+i/2,bandWidth:i}}var T=s;function E(e){return typeof e==`string`&&T.includes(e)}var ee=[`circle`,`square`,`triangle`,`diamond`,`hexagon`,`triangle-down`,`pentagon`,`plus`,`cross`,`octagon`,`triangle-right`,`triangle-left`,`star`,`star-4`,`hourglass`,`rectangle`,`kite`];function D(e){return ee[T.indexOf(e)]}function te(e){return Math.sqrt(2*Math.PI/(e*Math.sin(2*Math.PI/e)))}function O(e,t,n){let r=te(e)*n;return Array.from({length:e},(n,i)=>{let a=t+i*2*Math.PI/e;return[r*Math.cos(a),r*Math.sin(a)]})}function k(e,t=0){let n=e*Math.sqrt(Math.PI/5)/2,r=Math.cos(t),i=Math.sin(t);return[[-n,-3*n],[n,-3*n],[n,-n],[3*n,-n],[3*n,n],[n,n],[n,3*n],[-n,3*n],[-n,n],[-3*n,n],[-3*n,-n],[-n,-n]].map(([e,t])=>[e*r-t*i,e*i+t*r])}function A(e,t){let n=.5,r=t*Math.sqrt(Math.PI/(e*n*Math.sin(Math.PI/e)));return Array.from({length:2*e},(t,i)=>{let a=i%2==0?r:n*r,o=-Math.PI/2+i*Math.PI/e;return[a*Math.cos(o),a*Math.sin(o)]})}function j(e){let t=e*Math.sqrt(Math.PI/2),n=t/2;return[[-t,-n],[t,-n],[t,n],[-t,n]]}function ne(e){let t=e*Math.sqrt(Math.PI/2.5),n=1.25*t;return[[-t,-n],[t,-n],[0,0],[t,n],[-t,n],[0,0]]}function re(e){let t=e*Math.sqrt(Math.PI);return[[0,-t],[t/2,0],[0,t],[-t/2,0]]}function ie(e,t=1){let n=-Math.PI/2;switch(e){case`circle`:return null;case`square`:return O(4,Math.PI/4,t);case`diamond`:return O(4,n,t);case`triangle`:return O(3,n,t);case`triangle-down`:return O(3,Math.PI/2,t);case`pentagon`:return O(5,n,t);case`hexagon`:return O(6,n,t);case`plus`:return k(t);case`cross`:return k(t,Math.PI/4);case`octagon`:return O(8,n,t);case`triangle-right`:return O(3,0,t);case`triangle-left`:return O(3,Math.PI,t);case`star`:return A(5,t);case`star-4`:return A(4,t);case`hourglass`:return ne(t);case`rectangle`:return j(t);case`kite`:return re(t)}}function M(e,t=1,n=0,r=0){let i=ie(e,t);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`;let a=e=>Number(e.toFixed(3));return`${i.map(([e,t],i)=>`${i===0?`M`:`L`} ${a(n+e)} ${a(r+t)}`).join(` `)} Z`}function N(e,t,n=0,r=0){return M(e?D(e):`circle`,t,n,r)}var ae=`var(--color-chart-default)`,P={...Object.fromEntries(s.map(e=>[e,a(e)])),other:`var(--color-chart-other)`,remainder:`var(--color-chart-remainder)`,emphasis:`var(--color-chart-emphasis)`},oe=/* @__PURE__ */ new Set([`sky-blue`,`red`,`green`,`violet`,`dark-green`,`purple`,`ruby-red`,`dark-brown`,`brown`,`dark-blue`,`moss-green`]);function se(e,t){return t===0&&(e==null||oe.has(e))}function ce(e){if(e!=null)return P[e]??e}var le=new Map([[P[`dark-yellow`],`var(--color-chart-dark-yellow-text)`],...[`mint-green`,`orange`,`pink`,`yellow`,`light-blue`].map(e=>[P[e],`var(--color-chart-${e}-edge)`])]);function F(e){return e==null?void 0:le.get(e)}var I=`white`,L=`ink`,R={"sky-blue":[I,L,L,L,L],"dark-yellow":[L,L,L,L,L],red:[I,L,L,L,L],green:[I,L,L,L,L],"mint-green":[L,L,L,L,L],violet:[I,I,L,L,L],orange:[L,L,L,L,L],pink:[L,L,L,L,L],"dark-green":[I,null,L,L,L],purple:[I,I,null,L,L],"ruby-red":[I,null,L,L,L],yellow:[L,L,L,L,L],"dark-brown":[I,I,L,L,L],brown:[I,L,L,L,L],"dark-blue":[I,L,L,L,L],"light-blue":[L,L,L,L,L],"moss-green":[I,L,L,L,L]};function z(e,t=1){if(e!=null&&!o(e))return L;let n=R[e??`sky-blue`][t-1];return n===void 0?L:n}function B(e){return e===`white`?`lintje-chart__data-label--inside`:`lintje-chart__data-label--inside-light`}function V(e){if(e!=null&&E(e))return P[e]}var H=`Raming`,U=`Marge`;function W(e,t,n,r){return e+6+c(n,r,700)<=t.width-t.right}function ue(e){return e?16:32}function de(e,t,n){return`Gemeten tot en met ${e[t-1]}, daarna ${n.toLowerCase()}.`}function fe(e,t){return e!=null&&Number.isInteger(e)&&e>0&&e<t?e:null}function G(e,t){return{low:e?.low?.[t]??null,high:e?.high?.[t]??null}}function pe(e,t,n){for(let r=t;r<n;r++){let{low:t,high:n}=G(e,r);if(t!=null&&n!=null)return!0}return!1}function me(e,t){let{low:n,high:i}=G(e,t);return n!=null&&i!=null?{label:`laag – hoog`,value:`${r(n)} – ${r(i)}`,note:!0}:n==null?i==null?{label:`laag – hoog`,value:`geen marge`,note:!0}:{label:`bovengrens`,value:r(i),note:!0}:{label:`ondergrens`,value:r(n),note:!0}}function K(e){return[...e?.low??[],...e?.high??[]].filter(e=>e!=null)}var he=`reference:threshold`,ge=`reference:median`;function q(e,t,n,r){let i=F(t),a=r?M(r,4.5,n,n):N(e,4.5,n,n);return u`<path d=${a} fill="currentColor"
|
|
2
|
-
stroke=${i??l} stroke-width=${i?1:l} />`}function J(e,t,n){if(e===`ring`)return u`<circle cx=${n} cy=${n} r="6" fill="var(--color-bg-surface)"
|
|
3
|
-
stroke="currentColor" stroke-width="2" />`;if(e===`off-axis`)return u`<path d=${`M${n-2.5} ${n-3}L${n+2.5} ${n}L${n-2.5} ${n+3}Z`}
|
|
4
|
-
fill="currentColor" />`;let r=F(t);return u`<circle cx=${n} cy=${n} r="4" fill="currentColor"
|
|
5
|
-
stroke=${r??l} stroke-width=${r?1:l} />`}var _e=/* @__PURE__ */ new Set([`ring`,`dot`,`off-axis`]);function Y(e){return e!=null&&_e.has(e)}function ve({items:r,onToggle:i,onEmphasis:a,position:o=`top`}){let s=e=>()=>a?.(e.key??e.label),c=()=>a?.(null),u=!!a&&!i,d=r=>n`
|
|
6
|
-
${r.icon?n`<span class="lintje-legend__marker lintje-legend__marker--icon"
|
|
7
|
-
${t({color:r.color})}>${e(r.icon,{size:16})}</span>`:Y(r.shape)?n`<svg class="lintje-legend__marker lintje-legend__marker--symbol" viewBox="0 0 14 14"
|
|
8
|
-
${t({color:r.color??`var(--color-chart-default)`})}
|
|
9
|
-
aria-hidden="true" focusable="false">
|
|
10
|
-
${J(r.shape,r.color,7)}
|
|
11
|
-
</svg>`:(r.symbol||r.symbolShape)&&r.shape===`point`?n`<svg class="lintje-legend__marker lintje-legend__marker--symbol" viewBox="0 0 14 14"
|
|
12
|
-
${t({color:r.color??`var(--color-chart-default)`})}
|
|
13
|
-
aria-hidden="true" focusable="false">
|
|
14
|
-
${q(r.symbol,r.color,7,r.symbolShape)}
|
|
15
|
-
</svg>`:r.symbol?n`<svg class="lintje-legend__marker lintje-legend__marker--symbol" viewBox="0 0 14 14"
|
|
16
|
-
${t({color:r.color??`var(--color-chart-default)`})}
|
|
17
|
-
aria-hidden="true" focusable="false">
|
|
18
|
-
<line x1="0" x2="14" y1="7" y2="7" stroke="currentColor" stroke-width="3" />
|
|
19
|
-
<path d=${N(r.symbol,4,7,7)} fill="currentColor" />
|
|
20
|
-
</svg>`:n`<span class="lintje-legend__marker lintje-legend__marker--${r.shape??`square`}"
|
|
21
|
-
${t({color:r.color??`var(--color-chart-default)`})}
|
|
22
|
-
aria-hidden="true"></span>`}
|
|
23
|
-
<span class="lintje-legend__label">${r.label}</span>
|
|
24
|
-
${r.count===void 0?l:n`<span class="lintje-legend__count">${r.count}</span>`}
|
|
25
|
-
`;return n`
|
|
26
|
-
<ul class="lintje-legend lintje-legend--${o}">
|
|
27
|
-
${r.map(e=>n`
|
|
28
|
-
<li class="lintje-legend__item ${e.hidden?`is-hidden`:``}"
|
|
29
|
-
@mouseenter=${u?s(e):l}
|
|
30
|
-
@mouseleave=${u?c:l}>
|
|
31
|
-
${i&&!e.fixed?n`<button type="button" class="lintje-legend__button"
|
|
32
|
-
@click=${()=>i(e.key??e.label)}
|
|
33
|
-
@mouseenter=${a?s(e):l}
|
|
34
|
-
@mouseleave=${a?c:l}
|
|
35
|
-
@focus=${a?s(e):l}
|
|
36
|
-
@blur=${a?c:l}
|
|
37
|
-
aria-pressed=${!e.hidden}>${d(e)}</button>`:d(e)}
|
|
38
|
-
</li>
|
|
39
|
-
`)}
|
|
40
|
-
</ul>
|
|
41
|
-
`}function X(e){return e?`group`:`img`}function Z(e){return u`
|
|
42
|
-
<filter id="focus-${e}" filterUnits="userSpaceOnUse" x="-10%" y="-10%" width="120%" height="120%"
|
|
43
|
-
color-interpolation-filters="sRGB">
|
|
44
|
-
<feComponentTransfer in="SourceAlpha" result="shape"><feFuncA type="linear" slope="100" /></feComponentTransfer>
|
|
45
|
-
<feMorphology in="shape" operator="dilate" radius="4" result="outer" />
|
|
46
|
-
<feFlood class="lintje-chart__focus-ring" />
|
|
47
|
-
<feComposite in2="outer" operator="in" result="ring" />
|
|
48
|
-
<feMorphology in="shape" operator="dilate" radius="1" result="inner" />
|
|
49
|
-
<feFlood class="lintje-chart__focus-gap" />
|
|
50
|
-
<feComposite in2="inner" operator="in" result="gap" />
|
|
51
|
-
<feMerge><feMergeNode in="ring" /><feMergeNode in="gap" /><feMergeNode in="SourceGraphic" /></feMerge>
|
|
52
|
-
</filter>
|
|
53
|
-
`}function Q(e){return{"--lintje-focus-ring":`url(#focus-${e})`}}var ye=8,be=20;function $(e,t=``){if(e.length<2)return e;let n=e.map(e=>{let n=c(e.label,t),r=e.anchor===`end`?e.x-n:e.anchor===`start`?e.x:e.x-n/2;return{left:r,right:r+n}}),r=t=>{for(let r=0;r+t<e.length;r+=t){let e=n[r],i=n[r+t];if(Math.max(i.left-e.right,e.left-i.right)<ye)return!1}return!0},i=1;for(;i<e.length&&!r(i);)i+=1;return i===1?e:e.filter((e,t)=>t%i===0)}function xe({area:e=f,ticks:i,max:a,axisTitle:o,xLabels:s,xTitle:c,description:d,defs:p,underlay:m,zeroLine:h=!0,formatTick:g=r,id:_,height:v,fontFamily:y,interactive:b,keys:x},C){return n`
|
|
54
|
-
<figure class="lintje-chart">
|
|
55
|
-
${o?n`<figcaption class="lintje-chart__axis-title">${o}</figcaption>`:l}
|
|
56
|
-
<!-- The viewBox is set 1:1 to the measured pixels, so 12 px axis text really is
|
|
57
|
-
12 px — however narrow the tile is. -->
|
|
58
|
-
<svg
|
|
59
|
-
viewBox="0 0 ${e.width} ${e.height}"
|
|
60
|
-
class="lintje-chart__svg"
|
|
61
|
-
width=${e.width}
|
|
62
|
-
height=${e.height}
|
|
63
|
-
${t({height:`${v??e.height}px`,...Q(_)})}
|
|
64
|
-
role=${X(b)}
|
|
65
|
-
aria-labelledby="${_}-desc"
|
|
66
|
-
tabindex=${x?0:l}
|
|
67
|
-
@keydown=${x?.keydown}
|
|
68
|
-
@focus=${x?.focus}
|
|
69
|
-
@blur=${x?.blur}
|
|
70
|
-
>
|
|
71
|
-
<desc id="${_}-desc">${d}</desc>
|
|
72
|
-
<defs>
|
|
73
|
-
<pattern id="hatch-${_}" width="6" height="6" patternUnits="userSpaceOnUse" patternTransform="rotate(45)">
|
|
74
|
-
<line x1="0" y1="0" x2="0" y2="6" stroke="var(--color-chart-hatch)" stroke-width="2" />
|
|
75
|
-
</pattern>
|
|
76
|
-
${Z(_)}
|
|
77
|
-
${p}
|
|
78
|
-
</defs>
|
|
79
|
-
${m}
|
|
80
|
-
|
|
81
|
-
<!-- Grid + axis labels -->
|
|
82
|
-
${i.map(t=>{let n=S(t,a,e),r=t===0;return u`
|
|
83
|
-
<g>
|
|
84
|
-
<line
|
|
85
|
-
x1=${e.left} x2=${e.width-e.right} y1=${n} y2=${n}
|
|
86
|
-
stroke=${r&&h?`var(--color-chart-zero)`:`var(--color-chart-grid)`}
|
|
87
|
-
stroke-width=${r&&h?1.5:1} />
|
|
88
|
-
<text x=${e.left-8} y=${n+4} text-anchor="end" class="lintje-chart__axis-label">
|
|
89
|
-
${g(t)}
|
|
90
|
-
</text>
|
|
91
|
-
</g>
|
|
92
|
-
`})}
|
|
93
|
-
|
|
94
|
-
${C}
|
|
95
|
-
|
|
96
|
-
<!-- x-axis labels -->
|
|
97
|
-
${$(s??[],y).map(t=>u`
|
|
98
|
-
<text x=${t.x} y=${e.height-e.bottom+be} text-anchor=${t.anchor??`middle`} class="lintje-chart__axis-label">
|
|
99
|
-
${t.label}
|
|
100
|
-
</text>
|
|
101
|
-
`)}
|
|
102
|
-
${c?u`<text x=${e.width-e.right} y=${e.height-e.bottom+40} text-anchor="end"
|
|
103
|
-
class="lintje-chart__x-title">${c}</text>`:l}
|
|
104
|
-
</svg>
|
|
105
|
-
</figure>
|
|
106
|
-
`}function Se(e){if(e.mode===`forecast`)return Ce(e);let{area:t=f,index:n,count:r,label:i,lastValue:a,pendingHours:o}=e,s=t.left+y(t)*n/(r-1),c=o>6,d=t.width-t.right-s,p=d>140;return c?u`
|
|
107
|
-
<g>
|
|
108
|
-
<line x1=${s} x2=${s} y1=${t.top} y2=${t.height-t.bottom}
|
|
109
|
-
stroke="var(--color-text-primary)" stroke-width="1.5" stroke-dasharray="4 3" />
|
|
110
|
-
<text x=${p?s+6:s-6} y=${t.top+12}
|
|
111
|
-
text-anchor=${p?`start`:`end`} class="lintje-chart__as-of-label">
|
|
112
|
-
${i}
|
|
113
|
-
</text>
|
|
114
|
-
${a?u`<text x=${p?s+6:s-6} y=${t.top+26}
|
|
115
|
-
text-anchor=${p?`start`:`end`} class="lintje-chart__axis-label">${a}</text>`:l}
|
|
116
|
-
<text x=${s+d/2} y=${t.top+(t.height-t.top-t.bottom)/2}
|
|
117
|
-
text-anchor="middle" class="lintje-chart__as-of-note">
|
|
118
|
-
nog geen gegevens · ${o} ${o===1?`uur`:`uren`} volgen
|
|
119
|
-
</text>
|
|
120
|
-
</g>
|
|
121
|
-
`:l}function Ce({area:e=f,x:t,label:n,fontFamily:r}){let i=e.top-8,a=e.width-e.right,o=W(t,e,n,r);return u`
|
|
122
|
-
<g class="lintje-chart__boundary">
|
|
123
|
-
<line x1=${t} x2=${t} y1=${e.top-16} y2=${e.height-e.bottom}
|
|
124
|
-
stroke="var(--color-text-primary)" stroke-width="1.5" stroke-dasharray="4 3" />
|
|
125
|
-
<text x=${t-6} y=${i} text-anchor="end" class="lintje-chart__axis-label">Gemeten</text>
|
|
126
|
-
<text x=${o?t+6:a} y=${o?i:i-16}
|
|
127
|
-
text-anchor=${o?`start`:`end`} class="lintje-chart__as-of-label">${n}</text>
|
|
128
|
-
</g>
|
|
129
|
-
`}export{T as A,_ as B,ae as C,F as D,z as E,f as F,S as H,v as I,x as L,N as M,D as N,V as O,M as P,w as R,K as S,B as T,C as V,ue as _,Y as a,pe as b,Z as c,q as d,$ as f,de as g,G as h,Q as i,E as j,se as k,J as l,U as m,he as n,Se as o,H as p,X as r,xe as s,ge as t,ve as u,fe as v,ce as w,me as x,W as y,y as z};
|