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,16 +1,8 @@
|
|
|
1
|
-
import { $ as e, Bt as t, G as n, Gt as r, Ht as i,
|
|
2
|
-
import { r as l, t as u } from "../chunks/input-
|
|
3
|
-
import { a as d, c as f, d as p, f as m,
|
|
1
|
+
import { $ as e, Bt as t, G as n, Gt as r, Ht as i, Z as a, et as o, f as s, qt as c } from "../chunks/base-Bg-IFOPG.js";
|
|
2
|
+
import { r as l, t as u } from "../chunks/input-BtuNFSWk.js";
|
|
3
|
+
import { a as d, c as f, d as p, f as m, g as h, i as g, l as _, m as v, n as y, o as b, r as x, s as S, t as C, u as w } from "../chunks/date-format-mHtZyBys.js";
|
|
4
4
|
//#region src/components/inputs/date-input/date-input.css?inline
|
|
5
|
-
var
|
|
6
|
-
"ma",
|
|
7
|
-
"di",
|
|
8
|
-
"wo",
|
|
9
|
-
"do",
|
|
10
|
-
"vr",
|
|
11
|
-
"za",
|
|
12
|
-
"zo"
|
|
13
|
-
], E = class extends l {
|
|
5
|
+
var T = "/* The date input: a text field with a calendar button, and the calendar in a `lintje-popover`. */\n:host {\n display: block;\n min-width: 0;\n}\n:host([hidden]) { display: none; }\n:host([stacked]) {\n width: 100%;\n --h-control: var(--h-touch);\n}\n/* Below 768 px: the touch height and the full width, as `stacked`. */\n@media (max-width: 767px) {\n :host {\n width: 100%;\n --h-control: var(--h-touch);\n }\n}\n\n/* --- */\n\n/* --- The field ----------------------------------------------------------- */\n.lintje-date-input { position: relative; display: flex; align-items: center; }\n.lintje-date-input__control {\n width: 100%; height: var(--h-control);\n padding: 0 calc(var(--h-control) - 2px + var(--space-2)) 0 14px;\n border: 1px solid var(--color-border-field);\n background: var(--color-bg-surface);\n color: var(--color-text-primary);\n font-size: 1rem;\n font-variant-numeric: tabular-nums;\n border-radius: var(--radius);\n}\n.lintje-date-input__control::placeholder { color: var(--color-text-placeholder); opacity: 1; }\n.lintje-date-input__control.is-error { border: 2px solid var(--color-error); }\n/* Disabled wins over error: after it, the whole border back to 1 px strong. */\n.lintje-date-input__control:disabled {\n border: 1px solid var(--color-border-strong);\n background: var(--color-bg-subtle);\n color: var(--color-text-disabled);\n cursor: not-allowed;\n}\n\n.lintje-date-input__toggle {\n position: absolute; top: 1px; right: 1px;\n width: calc(var(--h-control) - 2px); height: calc(var(--h-control) - 2px);\n display: flex; align-items: center; justify-content: center;\n border-left: 1px solid var(--color-border-default);\n background: transparent;\n color: var(--color-accent-text);\n transition: background var(--dur-hover) var(--ease-in-motion);\n}\n/* A transparent hit area reaches the target height, never to the left where the typing part is. */\n.lintje-date-input__toggle::after {\n content: '';\n position: absolute;\n inset: min(0px, calc((100% - var(--h-target)) / 2)) min(0px, calc(100% - var(--h-target)))\n min(0px, calc((100% - var(--h-target)) / 2)) 0;\n}\n/* The button steps in past the 2 px error border; a disabled field has 1 px again. */\n.lintje-date-input__control.is-error:not(:disabled) + .lintje-date-input__toggle {\n top: 2px; right: 2px;\n width: calc(var(--h-control) - 4px); height: calc(var(--h-control) - 4px);\n}\n.lintje-date-input__toggle:hover:not(:disabled) { background: var(--color-bg-selected); }\n.lintje-date-input__toggle:disabled { color: var(--color-text-disabled); cursor: not-allowed; }\n\n/* --- The calendar -------------------------------------------------------- */\n.lintje-date-input__calendar {\n width: calc(7 * var(--h-option) + 2 * var(--space-3)); max-width: 100%;\n padding: var(--space-3);\n color: var(--color-text-primary);\n}\n.lintje-date-input__month { display: flex; align-items: center; gap: var(--space-1); }\n.lintje-date-input__month-label { flex: 1; text-align: center; font-size: 1rem; font-weight: 700; }\n/* A transparent hit area, above and below only, reaches the target height. */\n.lintje-date-input__nav {\n position: relative;\n flex: none;\n width: var(--h-icon-button); height: var(--h-icon-button);\n display: inline-flex; align-items: center; justify-content: center;\n border: 1px solid transparent;\n background: transparent;\n color: var(--color-text-primary);\n transition: background var(--dur-hover) var(--ease-in-motion);\n}\n.lintje-date-input__nav:hover { background: var(--color-bg-subtle); }\n.lintje-date-input__nav::after {\n content: '';\n position: absolute;\n inset: min(0px, calc((100% - var(--h-target)) / 2)) 0;\n}\n\n.lintje-date-input__grid {\n display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));\n margin-top: var(--space-2);\n}\n/* A row is there for the grid's ARIA only. */\n.lintje-date-input__row { display: contents; }\n.lintje-date-input__weekday {\n padding: var(--space-1) 0;\n text-align: center;\n font-size: var(--label-size); font-weight: var(--label-weight);\n letter-spacing: var(--label-tracking); text-transform: uppercase;\n color: var(--color-text-muted);\n}\n.lintje-date-input__day {\n height: var(--h-option);\n display: flex; align-items: center; justify-content: center;\n background: transparent;\n color: var(--color-text-primary);\n font-size: 0.875rem;\n font-variant-numeric: tabular-nums;\n transition: background var(--dur-hover) var(--ease-in-motion);\n}\n.lintje-date-input__day:hover { background: var(--color-bg-subtle); }\n.lintje-date-input__day.is-today { box-shadow: inset 0 0 0 1px var(--color-accent-line); }\n/* The border is an inset ring, so the cell keeps its size. */\n.lintje-date-input__day.is-selected {\n background: var(--color-action-primary);\n color: var(--color-action-primary-text);\n box-shadow: inset 0 0 0 1px var(--color-action-primary-border);\n font-weight: 700;\n}\n.lintje-date-input__day.is-selected.is-today {\n box-shadow: inset 0 0 0 1px var(--color-action-primary-border),\n inset 0 0 0 2px var(--color-accent-line);\n}\n/* Outside `min`/`max`: arrow keys still pass over it. */\n.lintje-date-input__day.is-blocked {\n background: transparent;\n color: var(--color-text-disabled);\n cursor: not-allowed;\n}\n\n@media (max-width: 767px) {\n /* The popover's edge margin, less its 1 px border on either side. */\n .lintje-date-input__calendar { width: calc(100vw - var(--space-4) - 2px); }\n}\n\n/* Forced colours drop rings and fills: they become borders inside the cell. */\n@media (forced-colors: active) {\n .lintje-date-input__day.is-today { border: 1px solid CanvasText; }\n .lintje-date-input__day.is-selected { border: 1px solid Highlight; }\n .lintje-date-input__day.is-selected.is-today:not(:focus-visible) {\n outline: 1px solid CanvasText;\n outline-offset: -2px;\n }\n .lintje-date-input__day.is-blocked { color: GrayText; }\n}\n", E = class extends l {
|
|
14
6
|
constructor(...e) {
|
|
15
7
|
super(...e), this.value = null, this.placeholder = "", this.stacked = !1, this.open = !1, this.hint = "dd-mm-jjjj", this.text = "", this.problem = "", this.focusDay = "";
|
|
16
8
|
}
|
|
@@ -18,7 +10,7 @@ var w = "/* The date input: a text field with a calendar button, and the calenda
|
|
|
18
10
|
this.styles = [
|
|
19
11
|
e,
|
|
20
12
|
i(u),
|
|
21
|
-
i(
|
|
13
|
+
i(T)
|
|
22
14
|
];
|
|
23
15
|
}
|
|
24
16
|
static {
|
|
@@ -42,7 +34,7 @@ var w = "/* The date input: a text field with a calendar button, and the calenda
|
|
|
42
34
|
};
|
|
43
35
|
}
|
|
44
36
|
get todayDay() {
|
|
45
|
-
return
|
|
37
|
+
return f(this.today) ? this.today : h();
|
|
46
38
|
}
|
|
47
39
|
get message() {
|
|
48
40
|
return this.error || this.problem;
|
|
@@ -51,16 +43,16 @@ var w = "/* The date input: a text field with a calendar button, and the calenda
|
|
|
51
43
|
return this.message;
|
|
52
44
|
}
|
|
53
45
|
willUpdate(e) {
|
|
54
|
-
super.willUpdate(e), e.has("value") && (this.text =
|
|
46
|
+
super.willUpdate(e), e.has("value") && (this.text = S(this.value), this.problem = "");
|
|
55
47
|
}
|
|
56
48
|
outOfBounds(e) {
|
|
57
|
-
return
|
|
49
|
+
return f(this.min) && e < this.min ? `Kies een datum op of na ${S(this.min)}` : f(this.max) && e > this.max ? `Kies een datum op of voor ${S(this.max)}` : "";
|
|
58
50
|
}
|
|
59
51
|
choose(e) {
|
|
60
|
-
this.problem = "", this.text =
|
|
52
|
+
this.problem = "", this.text = S(e), e !== this.value && (this.value = e, this.commit(e));
|
|
61
53
|
}
|
|
62
54
|
read(e) {
|
|
63
|
-
let t =
|
|
55
|
+
let t = p(e, m(this.todayDay)[0]);
|
|
64
56
|
if (t.kind === "empty") return this.choose(null);
|
|
65
57
|
if (this.text = e, t.kind === "invalid") {
|
|
66
58
|
this.problem = t.reason === "day" ? "Deze datum bestaat niet" : "Vul een datum in als dd-mm-jjjj";
|
|
@@ -79,11 +71,11 @@ var w = "/* The date input: a text field with a calendar button, and the calenda
|
|
|
79
71
|
}
|
|
80
72
|
if (e.key !== "ArrowUp" && e.key !== "ArrowDown") return;
|
|
81
73
|
e.preventDefault();
|
|
82
|
-
let t =
|
|
83
|
-
this.choose(
|
|
74
|
+
let t = p(e.target.value), n = t.kind === "ok" ? t.iso : this.value, r = e.key === "ArrowUp" ? 1 : -1;
|
|
75
|
+
this.choose(d(n ? x(n, r) : this.todayDay, this.min, this.max));
|
|
84
76
|
}
|
|
85
77
|
openCalendar() {
|
|
86
|
-
this.disabled || (this.focusDay =
|
|
78
|
+
this.disabled || (this.focusDay = d(this.value ?? this.todayDay, this.min, this.max), this.open = !0, this.focusCell());
|
|
87
79
|
}
|
|
88
80
|
toggle() {
|
|
89
81
|
this.open ? this.open = !1 : this.openCalendar();
|
|
@@ -102,15 +94,15 @@ var w = "/* The date input: a text field with a calendar button, and the calenda
|
|
|
102
94
|
this.outOfBounds(e) || (this.choose(e), this.open = !1, this.renderRoot.querySelector(".lintje-date-input__control")?.focus());
|
|
103
95
|
}
|
|
104
96
|
onGridKeydown(e) {
|
|
105
|
-
let t =
|
|
97
|
+
let t = C[e.key];
|
|
106
98
|
t && (e.preventDefault(), this.focusDay = t(this.focusDay), this.focusCell());
|
|
107
99
|
}
|
|
108
100
|
shiftMonth(e) {
|
|
109
|
-
this.focusDay =
|
|
101
|
+
this.focusDay = g(this.focusDay, e);
|
|
110
102
|
}
|
|
111
103
|
renderCalendar() {
|
|
112
|
-
let e = this.focusDay || this.todayDay, t =
|
|
113
|
-
return
|
|
104
|
+
let e = this.focusDay || this.todayDay, t = v(e).slice(0, 7), n = this.todayDay;
|
|
105
|
+
return c`<div class="lintje-date-input__calendar">
|
|
114
106
|
<div class="lintje-date-input__month">
|
|
115
107
|
<button
|
|
116
108
|
type="button"
|
|
@@ -118,13 +110,13 @@ var w = "/* The date input: a text field with a calendar button, and the calenda
|
|
|
118
110
|
aria-label="Vorige maand"
|
|
119
111
|
@click=${() => this.shiftMonth(-1)}
|
|
120
112
|
>
|
|
121
|
-
${
|
|
113
|
+
${o("functioneel-delta-rechts", {
|
|
122
114
|
size: 16,
|
|
123
115
|
flip: "horizontal"
|
|
124
116
|
})}
|
|
125
117
|
</button>
|
|
126
118
|
<strong class="lintje-date-input__month-label" aria-live="polite"
|
|
127
|
-
>${
|
|
119
|
+
>${_(e)}</strong
|
|
128
120
|
>
|
|
129
121
|
<button
|
|
130
122
|
type="button"
|
|
@@ -132,36 +124,36 @@ var w = "/* The date input: a text field with a calendar button, and the calenda
|
|
|
132
124
|
aria-label="Volgende maand"
|
|
133
125
|
@click=${() => this.shiftMonth(1)}
|
|
134
126
|
>
|
|
135
|
-
${
|
|
127
|
+
${o("functioneel-delta-rechts", { size: 16 })}
|
|
136
128
|
</button>
|
|
137
129
|
</div>
|
|
138
130
|
<div
|
|
139
131
|
class="lintje-date-input__grid"
|
|
140
132
|
role="grid"
|
|
141
|
-
aria-label=${
|
|
133
|
+
aria-label=${_(e)}
|
|
142
134
|
@keydown=${this.onGridKeydown}
|
|
143
135
|
>
|
|
144
136
|
<div class="lintje-date-input__row" role="row">
|
|
145
|
-
${
|
|
137
|
+
${y.map((e) => c`<span class="lintje-date-input__weekday" role="columnheader">${e}</span>`)}
|
|
146
138
|
</div>
|
|
147
|
-
${
|
|
139
|
+
${w(e).map((i) => c`<div class="lintje-date-input__row" role="row">
|
|
148
140
|
${i.map((i) => {
|
|
149
|
-
if (!i.startsWith(t)) return
|
|
150
|
-
let
|
|
151
|
-
return
|
|
141
|
+
if (!i.startsWith(t)) return c`<span class="lintje-date-input__blank" role="gridcell"></span>`;
|
|
142
|
+
let o = !!this.outOfBounds(i);
|
|
143
|
+
return c`<button
|
|
152
144
|
type="button"
|
|
153
145
|
role="gridcell"
|
|
154
|
-
class=${
|
|
146
|
+
class=${a({
|
|
155
147
|
"lintje-date-input__day": !0,
|
|
156
|
-
"is-blocked":
|
|
148
|
+
"is-blocked": o,
|
|
157
149
|
"is-today": i === n,
|
|
158
150
|
"is-selected": i === this.value
|
|
159
151
|
})}
|
|
160
152
|
tabindex=${i === e ? "0" : "-1"}
|
|
161
|
-
aria-label=${
|
|
153
|
+
aria-label=${b(i)}
|
|
162
154
|
aria-selected=${i === this.value ? "true" : "false"}
|
|
163
155
|
aria-current=${i === n ? "date" : r}
|
|
164
|
-
aria-disabled=${
|
|
156
|
+
aria-disabled=${o ? "true" : r}
|
|
165
157
|
@click=${() => this.pick(i)}
|
|
166
158
|
>
|
|
167
159
|
${Number(i.slice(8))}
|
|
@@ -173,7 +165,7 @@ var w = "/* The date input: a text field with a calendar button, and the calenda
|
|
|
173
165
|
}
|
|
174
166
|
render() {
|
|
175
167
|
let e = this.message;
|
|
176
|
-
return
|
|
168
|
+
return c`<div class="lintje-field" @focusout=${this.onFocusOut}>
|
|
177
169
|
${this.renderLabel(this.controlId)}
|
|
178
170
|
<div class="lintje-date-input">
|
|
179
171
|
<input
|
|
@@ -181,11 +173,11 @@ var w = "/* The date input: a text field with a calendar button, and the calenda
|
|
|
181
173
|
id=${this.controlId}
|
|
182
174
|
inputmode="numeric"
|
|
183
175
|
autocomplete="off"
|
|
184
|
-
class=${
|
|
176
|
+
class=${a({
|
|
185
177
|
"lintje-date-input__control": !0,
|
|
186
178
|
"is-error": !!e
|
|
187
179
|
})}
|
|
188
|
-
.value=${
|
|
180
|
+
.value=${s(this.text)}
|
|
189
181
|
placeholder=${this.placeholder || r}
|
|
190
182
|
aria-labelledby=${this.labelId}
|
|
191
183
|
aria-describedby=${this.describedBy}
|
|
@@ -204,7 +196,7 @@ var w = "/* The date input: a text field with a calendar button, and the calenda
|
|
|
204
196
|
?disabled=${this.disabled}
|
|
205
197
|
@click=${this.toggle}
|
|
206
198
|
>
|
|
207
|
-
${
|
|
199
|
+
${o("functioneel-kalender", { size: 18 })}
|
|
208
200
|
</button>
|
|
209
201
|
</div>
|
|
210
202
|
<lintje-popover
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { $ as e, Bt as t, G as n, Gt as r, Ht as i,
|
|
2
|
-
import "../chunks/focus-trap-
|
|
3
|
-
import { r as u, t as d } from "../chunks/input-
|
|
4
|
-
import {
|
|
1
|
+
import { $ as e, Bt as t, G as n, Gt as r, Ht as i, U as a, W as o, Z as s, et as c, qt as l } from "../chunks/base-Bg-IFOPG.js";
|
|
2
|
+
import "../chunks/focus-trap-9BnE-xWv.js";
|
|
3
|
+
import { r as u, t as d } from "../chunks/input-BtuNFSWk.js";
|
|
4
|
+
import { g as f, h as p, i as m, l as h, m as g, o as _, r as v, t as y } from "../chunks/date-format-mHtZyBys.js";
|
|
5
5
|
//#region src/components/inputs/date-range/date-range.css?inline
|
|
6
6
|
var b = "/* The date range picker. The popover is positioned against the host (`position: relative`). */\n:host {\n display: block;\n position: relative;\n}\n\n/* --- */\n\n.lintje-date-range-picker { position: relative; display: flex; flex-direction: column; gap: 6px; }\n.lintje-date-range-picker__field {\n display: flex; align-items: center; justify-content: space-between; gap: 10px;\n min-width: 210px; height: var(--h-control);\n padding: 0 12px 0 14px;\n border: 1px solid var(--color-border-field);\n background: var(--color-bg-surface);\n color: var(--color-text-placeholder);\n font-size: 1rem;\n}\n.lintje-date-range-picker__field.is-filled { color: var(--color-text-primary); font-weight: 700; }\n.lintje-date-range-picker__field.is-error { border: 2px solid var(--color-error); }\n.lintje-date-range-picker__field:disabled {\n border: 1px solid var(--color-border-strong);\n background: var(--color-bg-subtle);\n color: var(--color-text-disabled);\n cursor: not-allowed;\n}\n.lintje-date-range-picker__icon { color: var(--color-text-primary); }\n\n.lintje-date-range-picker__popover {\n position: absolute; top: calc(100% + 4px); left: 0; z-index: 50;\n /* Seven cells, six 1 px gaps, the grid's padding and the border. */\n width: calc(7 * var(--h-option) + 6px + 2 * var(--space-2) + 2px);\n background: var(--color-bg-surface);\n border: 1px solid var(--color-border-popover);\n box-shadow: var(--shadow-popover);\n animation: lintje-popover-in var(--dur-popover) var(--ease-in-motion);\n}\n.lintje-date-range-picker__month {\n display: flex; align-items: center; justify-content: space-between;\n padding: var(--space-2) var(--space-3);\n border-bottom: 1px solid var(--color-border-default);\n font-size: 1rem; font-weight: 700;\n}\n/* A transparent hit area reaches the target height. */\n.lintje-date-range-picker__nav {\n position: relative;\n width: var(--h-icon-button); height: var(--h-icon-button);\n display: flex; align-items: center; justify-content: center;\n color: var(--color-text-primary);\n}\n.lintje-date-range-picker__nav:hover { background: var(--color-bg-subtle); }\n.lintje-date-range-picker__nav::after {\n content: '';\n position: absolute;\n inset: min(0px, calc((100% - var(--h-target)) / 2));\n}\n\n.lintje-date-range-picker__grid {\n display: grid; grid-template-columns: repeat(7, var(--h-option));\n gap: 1px; padding: var(--space-2);\n}\n/* A row is there for the grid's ARIA only. */\n.lintje-date-range-picker__row { display: contents; }\n.lintje-date-range-picker__weekday {\n text-align: center; font-size: 0.875rem; font-weight: 700;\n color: var(--color-text-muted); padding-bottom: 4px;\n}\n.lintje-date-range-picker__day {\n height: var(--h-option);\n display: flex; align-items: center; justify-content: center;\n font-size: 0.875rem; color: var(--color-text-primary);\n font-variant-numeric: tabular-nums;\n}\n.lintje-date-range-picker__day:hover:not(.is-blocked) { background: var(--color-bg-subtle); }\n.lintje-date-range-picker__day.is-outside { color: var(--color-text-disabled); }\n/* After `maxDate`: `aria-disabled`, so the arrow keys still pass over it. */\n.lintje-date-range-picker__day.is-blocked { color: var(--color-text-disabled); cursor: not-allowed; }\n.lintje-date-range-picker__day.is-today { box-shadow: inset 0 0 0 1px var(--color-info); font-weight: 700; }\n.lintje-date-range-picker__day.is-in-range { background: var(--color-bg-selected); }\n/* An inset ring like `.is-today`: the cell keeps its size and an edge on a dark surface. */\n.lintje-date-range-picker__day.is-endpoint {\n background: var(--color-action-primary); color: var(--color-action-primary-text); font-weight: 700;\n box-shadow: inset 0 0 0 1px var(--color-action-primary-border);\n}\n/* Today and an endpoint: both rings, so the \"today\" marker survives. */\n.lintje-date-range-picker__day.is-endpoint.is-today {\n box-shadow: inset 0 0 0 1px var(--color-action-primary-border), inset 0 0 0 2px var(--color-info);\n}\n\n.lintje-date-range-picker__presets {\n /* The row gap keeps the hit areas below from overlapping. */\n display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-2);\n padding: var(--space-2) var(--space-3);\n border-top: 1px solid var(--color-border-default);\n}\n.lintje-date-range-picker__preset {\n position: relative;\n height: var(--h-chip);\n padding: 0 8px;\n border: 1px solid var(--color-border-default);\n background: var(--color-bg-subtle);\n font-size: 0.875rem; color: var(--color-text-primary);\n}\n/* A transparent hit area, above and below only, reaches the target height. */\n.lintje-date-range-picker__preset::after {\n content: '';\n position: absolute;\n inset: min(0px, calc((100% - var(--h-target)) / 2)) 0;\n}\n/* The accent line, not the fill colour: in dark the primary on #333333 is 1.2:1. */\n.lintje-date-range-picker__preset:hover { border-color: var(--color-accent-line); }\n\n.lintje-date-range-picker__footer {\n display: flex; flex-direction: column; gap: var(--space-2);\n padding: var(--space-3);\n border-top: 1px solid var(--color-border-default);\n font: var(--text-small); color: var(--color-text-muted);\n}\n.lintje-date-range-picker__actions { display: flex; gap: var(--space-2); justify-content: flex-end; }\n\n/* --- Stacked in the filter sheet ----------------------------------------- */\n:host([stacked]) {\n width: 100%;\n}\n\n/* Below 768 px the 48 px cells would run off a narrow phone: the popover keeps the page's gutter\n on either side and the cells share what is left. */\n@media (max-width: 767px) {\n .lintje-date-range-picker__popover { max-width: calc(100vw - 2 * var(--space-4)); }\n .lintje-date-range-picker__grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }\n}\n\n/* Forced colours drop rings and fills: they become borders inside the cell. */\n@media (forced-colors: active) {\n .lintje-date-range-picker__day.is-in-range { border-block: 1px solid CanvasText; }\n .lintje-date-range-picker__day.is-today { border: 1px solid CanvasText; }\n .lintje-date-range-picker__day.is-endpoint { border: 1px solid Highlight; }\n .lintje-date-range-picker__day.is-endpoint.is-today:not(:focus-visible) {\n outline: 1px solid CanvasText;\n outline-offset: -2px;\n }\n}\n", x = [
|
|
7
7
|
"ma",
|
|
@@ -65,7 +65,7 @@ var j = class extends u {
|
|
|
65
65
|
}, this.focusDay = "", this.onOutsideClick = (e) => {
|
|
66
66
|
this.open && (e.composedPath().includes(this) || (this.open = !1));
|
|
67
67
|
}, this.onEscape = (e) => {
|
|
68
|
-
this.open && e.key === "Escape" &&
|
|
68
|
+
this.open && e.key === "Escape" && o(this) && (e.stopPropagation(), this.close());
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
71
|
static {
|
|
@@ -104,7 +104,7 @@ var j = class extends u {
|
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
106
|
async close() {
|
|
107
|
-
let e = this.renderRoot.querySelector(".lintje-date-range-picker__popover"), t = e !== null &&
|
|
107
|
+
let e = this.renderRoot.querySelector(".lintje-date-range-picker__popover"), t = e !== null && a(e);
|
|
108
108
|
this.open = !1, await this.updateComplete, t && this.renderRoot.querySelector(".lintje-date-range-picker__field")?.focus();
|
|
109
109
|
}
|
|
110
110
|
onFocusOut(e) {
|
|
@@ -148,10 +148,10 @@ var j = class extends u {
|
|
|
148
148
|
if (!r) return;
|
|
149
149
|
e.preventDefault();
|
|
150
150
|
let i = r(t);
|
|
151
|
-
this.focusDay = i, (e.key.startsWith("Page") || !n.includes(i)) && (this.month = k(
|
|
151
|
+
this.focusDay = i, (e.key.startsWith("Page") || !n.includes(i)) && (this.month = k(g(i))), this.focusCell();
|
|
152
152
|
}
|
|
153
153
|
shiftMonth(e, t, n) {
|
|
154
|
-
this.month = new Date(e.getFullYear(), e.getMonth() + t, 1), this.focusDay =
|
|
154
|
+
this.month = new Date(e.getFullYear(), e.getMonth() + t, 1), this.focusDay = m(n, t);
|
|
155
155
|
}
|
|
156
156
|
async focusCell() {
|
|
157
157
|
await this.updateComplete, this.renderRoot.querySelector(".lintje-date-range-picker__day[tabindex=\"0\"]")?.focus();
|
|
@@ -163,17 +163,17 @@ var j = class extends u {
|
|
|
163
163
|
}), this.close();
|
|
164
164
|
}
|
|
165
165
|
render() {
|
|
166
|
-
let e =
|
|
166
|
+
let e = f(this.day), t = this.month ?? O(this.range.from) ?? this.day, n = f(t).slice(0, 7), i = D(this.draft.from), a = D(this.draft.to), o = this.maxDate ? f(this.maxDate) : null, u = p(`${n}-01`), d = Array.from({ length: 42 }, (e, t) => v(u, t)), m = Array.from({ length: 6 }, (e, t) => d.slice(t * 7, t * 7 + 7)), g = [
|
|
167
167
|
this.focusDay,
|
|
168
168
|
i,
|
|
169
169
|
e
|
|
170
170
|
].find((e) => e && d.includes(e)) ?? `${n}-01`, y = this.accessibleName || this.labelText, b = !!(this.range.from && this.range.to), S = b ? `${this.range.from} – ${this.range.to}` : "dd-mm-jjjj – dd-mm-jjjj", C = O(this.draft.from), T = O(this.draft.to), E = C && T ? Math.round((T.getTime() - C.getTime()) / 864e5) + 1 : 0, k = E > 0 || b && !this.draft.from && !this.draft.to;
|
|
171
|
-
return
|
|
171
|
+
return l`<div class="lintje-date-range-picker" @focusout=${this.onFocusOut}>
|
|
172
172
|
${this.label ? this.renderLabel() : r}
|
|
173
173
|
<button
|
|
174
174
|
type="button"
|
|
175
175
|
aria-label=${y ? `${y}, ${b ? S : "geen periode gekozen"}` : r}
|
|
176
|
-
class=${
|
|
176
|
+
class=${s({
|
|
177
177
|
"lintje-date-range-picker__field": !0,
|
|
178
178
|
"is-filled": !!this.range.from,
|
|
179
179
|
"is-error": !!this.error
|
|
@@ -186,13 +186,13 @@ var j = class extends u {
|
|
|
186
186
|
@click=${this.toggle}
|
|
187
187
|
>
|
|
188
188
|
<span>${S}</span>
|
|
189
|
-
${
|
|
189
|
+
${c("functioneel-kalender", {
|
|
190
190
|
size: 16,
|
|
191
191
|
className: "lintje-date-range-picker__icon"
|
|
192
192
|
})}
|
|
193
193
|
</button>
|
|
194
194
|
|
|
195
|
-
${this.open ?
|
|
195
|
+
${this.open ? l`<div
|
|
196
196
|
class="lintje-date-range-picker__popover"
|
|
197
197
|
role="dialog"
|
|
198
198
|
aria-label=${y || "Periode"}
|
|
@@ -202,55 +202,55 @@ var j = class extends u {
|
|
|
202
202
|
type="button"
|
|
203
203
|
class="lintje-date-range-picker__nav"
|
|
204
204
|
aria-label="Vorige maand"
|
|
205
|
-
@click=${() => this.shiftMonth(t, -1,
|
|
205
|
+
@click=${() => this.shiftMonth(t, -1, g)}
|
|
206
206
|
>
|
|
207
|
-
${
|
|
207
|
+
${c("functioneel-delta-rechts", {
|
|
208
208
|
size: 16,
|
|
209
209
|
flip: "horizontal"
|
|
210
210
|
})}
|
|
211
211
|
</button>
|
|
212
|
-
<span aria-live="polite">${
|
|
212
|
+
<span aria-live="polite">${h(`${n}-01`)}</span>
|
|
213
213
|
<button
|
|
214
214
|
type="button"
|
|
215
215
|
class="lintje-date-range-picker__nav"
|
|
216
216
|
aria-label="Volgende maand"
|
|
217
|
-
@click=${() => this.shiftMonth(t, 1,
|
|
217
|
+
@click=${() => this.shiftMonth(t, 1, g)}
|
|
218
218
|
>
|
|
219
|
-
${
|
|
219
|
+
${c("functioneel-delta-rechts", { size: 16 })}
|
|
220
220
|
</button>
|
|
221
221
|
</div>
|
|
222
222
|
|
|
223
223
|
<div
|
|
224
224
|
class="lintje-date-range-picker__grid"
|
|
225
225
|
role="grid"
|
|
226
|
-
aria-label=${
|
|
227
|
-
@keydown=${(e) => this.onGridKeydown(e,
|
|
226
|
+
aria-label=${h(`${n}-01`)}
|
|
227
|
+
@keydown=${(e) => this.onGridKeydown(e, g, d)}
|
|
228
228
|
>
|
|
229
229
|
<div class="lintje-date-range-picker__row" role="row">
|
|
230
|
-
${x.map((e) =>
|
|
230
|
+
${x.map((e) => l`<span class="lintje-date-range-picker__weekday" role="columnheader"
|
|
231
231
|
>${e}</span
|
|
232
232
|
>`)}
|
|
233
233
|
</div>
|
|
234
|
-
${m.map((t) =>
|
|
234
|
+
${m.map((t) => l`<div class="lintje-date-range-picker__row" role="row">
|
|
235
235
|
${t.map((t) => {
|
|
236
|
-
let
|
|
237
|
-
return
|
|
236
|
+
let c = o !== null && t > o, u = t === i, d = t === a, f = i !== null && a !== null && t > i && t < a;
|
|
237
|
+
return l`<button
|
|
238
238
|
type="button"
|
|
239
239
|
role="gridcell"
|
|
240
|
-
tabindex=${t ===
|
|
241
|
-
aria-label=${
|
|
242
|
-
aria-selected=${u || d ||
|
|
240
|
+
tabindex=${t === g ? "0" : "-1"}
|
|
241
|
+
aria-label=${_(t) + A(u, d, f)}
|
|
242
|
+
aria-selected=${u || d || f ? "true" : "false"}
|
|
243
243
|
aria-current=${t === e ? "date" : r}
|
|
244
|
-
aria-disabled=${
|
|
245
|
-
class=${
|
|
244
|
+
aria-disabled=${c ? "true" : r}
|
|
245
|
+
class=${s({
|
|
246
246
|
"lintje-date-range-picker__day": !0,
|
|
247
247
|
"is-outside": !t.startsWith(n),
|
|
248
|
-
"is-blocked":
|
|
248
|
+
"is-blocked": c,
|
|
249
249
|
"is-today": t === e,
|
|
250
250
|
"is-endpoint": u || d,
|
|
251
|
-
"is-in-range":
|
|
251
|
+
"is-in-range": f
|
|
252
252
|
})}
|
|
253
|
-
@click=${() => this.pick(t,
|
|
253
|
+
@click=${() => this.pick(t, c)}
|
|
254
254
|
>
|
|
255
255
|
${Number(t.slice(8))}
|
|
256
256
|
</button>`;
|
|
@@ -259,7 +259,7 @@ var j = class extends u {
|
|
|
259
259
|
</div>
|
|
260
260
|
|
|
261
261
|
<div class="lintje-date-range-picker__presets">
|
|
262
|
-
${w.map(([e]) =>
|
|
262
|
+
${w.map(([e]) => l`<button
|
|
263
263
|
type="button"
|
|
264
264
|
class="lintje-date-range-picker__preset"
|
|
265
265
|
@click=${() => this.applyPreset(e)}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { $ as e, Bt as t, Gt as n, Ht as r, I as i,
|
|
1
|
+
import { $ as e, Bt as t, Gt as n, Ht as r, I as i, O as a, X as o, Y as s, Z as c, et as l, k as u, qt as d, ut as f } from "../chunks/base-Bg-IFOPG.js";
|
|
2
2
|
//#region src/components/tables/description-list/description-list.css?inline
|
|
3
3
|
var p = ":host { display: block; min-width: 0; }\n:host([layout='grid']) { container-type: inline-size; }\n:host([hidden]) { display: none; }\n\n/* ------------------------------------------------------------------------ */\n\n.lintje-description-list {\n margin: 0;\n font: var(--text-ui);\n font-variant-numeric: tabular-nums;\n}\n\n/* Every row has the same fractions, so the columns line up without an outer grid. */\n.lintje-description-list__row {\n display: grid;\n grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);\n border-bottom: 1px solid var(--color-border-default);\n}\n.lintje-description-list__row:last-child { border-bottom: 0; }\n\n.lintje-description-list__label {\n padding: 10px var(--space-3) 10px 0;\n color: var(--color-text-muted);\n}\n.lintje-description-list__value {\n display: flex; justify-content: space-between; align-items: baseline;\n gap: var(--space-3);\n min-width: 0;\n margin: 0;\n padding: 10px 0;\n color: var(--color-text-primary);\n overflow-wrap: anywhere;\n}\n\n.lintje-description-list__missing { color: var(--color-text-muted); }\n\n.lintje-description-list__link { color: var(--color-link); }\n.lintje-description-list__action {\n flex: none;\n font-weight: 700;\n color: var(--color-link);\n transition: color var(--dur-hover) var(--ease-in-motion);\n}\n.lintje-description-list__link:hover,\n.lintje-description-list__action:hover { color: var(--color-link-hover); }\n\n/* `layout=\"column\"` and every list below 768 px: label above value, no lines. */\n.lintje-description-list--column .lintje-description-list__row { display: block; border-bottom: 0; }\n.lintje-description-list--column .lintje-description-list__row + .lintje-description-list__row { margin-top: 10px; }\n.lintje-description-list--column .lintje-description-list__label { padding: 0; font: var(--text-small); }\n.lintje-description-list--column .lintje-description-list__value { padding: 0; }\n@media (max-width: 767px) {\n .lintje-description-list:not(.lintje-description-list--grid) .lintje-description-list__row { display: block; border-bottom: 0; }\n .lintje-description-list:not(.lintje-description-list--grid) .lintje-description-list__row + .lintje-description-list__row { margin-top: 10px; }\n .lintje-description-list:not(.lintje-description-list--grid) .lintje-description-list__label { padding: 0; font: var(--text-small); }\n .lintje-description-list:not(.lintje-description-list--grid) .lintje-description-list__value { padding: 0; }\n}\n\n.lintje-description-list__main { display: inline-flex; align-items: baseline; gap: var(--space-2); min-width: 0; }\n.lintje-description-list__main .lintje-icon { align-self: center; flex: none; }\n.lintje-description-list__tags { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }\n.lintje-description-list__tag {\n display: inline-flex; align-items: center;\n min-height: var(--h-chip);\n padding: 0 var(--space-3);\n border: 1px solid var(--color-border-strong);\n background: var(--color-bg-surface);\n font-weight: 700;\n}\n\n/* --- Grid: cells side by side, divided by a line, each with its own tone ----------------- */\n.lintje-description-list--grid {\n display: grid;\n grid-template-columns: repeat(var(--lintje-columns, 4), minmax(0, 1fr));\n gap: 1px;\n background: var(--color-border-default);\n}\n.lintje-description-list--grid .lintje-description-list__row {\n display: flex; flex-direction: column; gap: var(--space-1);\n min-width: 0;\n padding: var(--space-3) var(--space-4);\n border: 0;\n background: var(--color-bg-subtle);\n}\n.lintje-description-list--grid .lintje-description-list__row.is-wide { grid-column: span 2; }\n/* On a surface that is not the page's own (a hero's wash) the cells are panels: the surface, framed. */\n:host([surface]) .lintje-description-list--grid { border: 1px solid var(--color-border-default); }\n:host([surface]) .lintje-description-list--grid .lintje-description-list__row:not(.is-changed):not(.is-warning):not(.is-error) {\n background: var(--color-bg-surface);\n}\n.lintje-description-list--grid .lintje-description-list__label {\n display: flex; align-items: center; gap: var(--space-2);\n padding: 0;\n font: var(--text-meta);\n}\n.lintje-description-list--grid .lintje-description-list__value {\n /* The values of one row stand on one line, however tall each is. */\n flex: 1 1 auto;\n flex-direction: column; align-items: flex-start; justify-content: center;\n gap: var(--space-2);\n padding: 0;\n font-weight: 700;\n}\n/* What differs from the default: the chosen option's quiet surface with an edge on top. */\n.lintje-description-list--grid .is-changed {\n background: var(--color-choice-active-bg);\n box-shadow: inset 0 3px 0 var(--color-accent-line);\n}\n.lintje-description-list--grid .is-warning {\n background: var(--color-warning-bg);\n box-shadow: inset 0 3px 0 var(--color-warning);\n}\n.lintje-description-list--grid .is-error {\n background: var(--color-error-bg);\n box-shadow: inset 0 3px 0 var(--color-error-line);\n}\n.lintje-description-list--grid .lintje-description-list__action { font: var(--text-meta); font-weight: 700; }\n.lintje-description-list--grid .is-large .lintje-description-list__value {\n font: var(--text-kpi);\n letter-spacing: var(--kpi-tracking);\n font-variant-numeric: tabular-nums;\n}\n@container (max-width: 30rem) {\n .lintje-description-list--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }\n /* A wide cell, and a last one alone on its row, take the whole row: no empty cell beside it. */\n .lintje-description-list--grid .lintje-description-list__row.is-wide,\n .lintje-description-list--grid .lintje-description-list__row:last-child:nth-child(odd) {\n grid-column: 1 / -1;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .lintje-description-list__action { transition: none; }\n}\n\n@media (forced-colors: active) {\n .lintje-description-list--grid .lintje-description-list__row { border: 1px solid CanvasText; }\n}\n", m = {
|
|
4
4
|
warning: "functioneel-waarschuwing",
|
|
5
5
|
error: "functioneel-foutmelding"
|
|
6
|
-
}, h = class extends
|
|
6
|
+
}, h = class extends a {
|
|
7
7
|
constructor(...e) {
|
|
8
8
|
super(...e), this.items = [], this.columns = 4, this.surface = !1, this.layout = "row";
|
|
9
9
|
}
|
|
10
10
|
static {
|
|
11
11
|
this.styles = [
|
|
12
12
|
e,
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
s,
|
|
14
|
+
u,
|
|
15
15
|
r(p)
|
|
16
16
|
];
|
|
17
17
|
}
|
|
@@ -33,29 +33,29 @@ var p = ":host { display: block; min-width: 0; }\n:host([layout='grid']) { conta
|
|
|
33
33
|
i(e) && this.followLink(t, e);
|
|
34
34
|
}
|
|
35
35
|
value(e) {
|
|
36
|
-
if (e.tags) return e.tags.length ?
|
|
37
|
-
${e.tags.map((e) =>
|
|
38
|
-
</ul>` :
|
|
36
|
+
if (e.tags) return e.tags.length ? d`<ul class="lintje-description-list__tags">
|
|
37
|
+
${e.tags.map((e) => d`<li class="lintje-description-list__tag">${e}</li>`)}
|
|
38
|
+
</ul>` : d`<span class="lintje-description-list__missing">Geen</span>`;
|
|
39
39
|
let t = e.value === null || e.value === void 0 || e.value === "";
|
|
40
|
-
if (t && e.slot) return
|
|
41
|
-
if (t) return
|
|
40
|
+
if (t && e.slot) return d``;
|
|
41
|
+
if (t) return d`<span class="lintje-description-list__missing"
|
|
42
42
|
><span aria-hidden="true">—</span><span class="visually-hidden">geen waarde</span></span
|
|
43
43
|
>`;
|
|
44
44
|
if (e.href) {
|
|
45
45
|
let t = e.href;
|
|
46
|
-
return
|
|
46
|
+
return d`<a
|
|
47
47
|
class="lintje-description-list__link"
|
|
48
48
|
href=${t}
|
|
49
49
|
@click=${(e) => this.follow(e, t)}
|
|
50
50
|
>${e.value}</a
|
|
51
51
|
>`;
|
|
52
52
|
}
|
|
53
|
-
return
|
|
53
|
+
return d`<span>${e.value}</span>`;
|
|
54
54
|
}
|
|
55
55
|
action(e) {
|
|
56
56
|
if (!e.action) return n;
|
|
57
57
|
let { href: t } = e.action, r = e.action.label ?? "Wijzigen";
|
|
58
|
-
return
|
|
58
|
+
return d`<a
|
|
59
59
|
class="lintje-description-list__action"
|
|
60
60
|
href=${t}
|
|
61
61
|
aria-label=${`${e.label} ${r.toLowerCase()}`}
|
|
@@ -65,8 +65,8 @@ var p = ":host { display: block; min-width: 0; }\n:host([layout='grid']) { conta
|
|
|
65
65
|
}
|
|
66
66
|
renderItem(e) {
|
|
67
67
|
let t = this.layout === "grid", r = e.tone;
|
|
68
|
-
return
|
|
69
|
-
class=${
|
|
68
|
+
return d`<div
|
|
69
|
+
class=${c({
|
|
70
70
|
"lintje-description-list__row": !0,
|
|
71
71
|
"is-wide": t && e.span === 2,
|
|
72
72
|
"is-large": t && !!e.large,
|
|
@@ -74,15 +74,15 @@ var p = ":host { display: block; min-width: 0; }\n:host([layout='grid']) { conta
|
|
|
74
74
|
})}
|
|
75
75
|
>
|
|
76
76
|
<dt class="lintje-description-list__label"
|
|
77
|
-
>${t && e.icon ?
|
|
77
|
+
>${t && e.icon ? l(e.icon, { size: 16 }) : n}${e.label}</dt
|
|
78
78
|
>
|
|
79
79
|
<dd class="lintje-description-list__value">
|
|
80
80
|
<span class="lintje-description-list__main">
|
|
81
|
-
${r && r !== "changed" ?
|
|
81
|
+
${r && r !== "changed" ? l(m[r], { size: 16 }) : n}
|
|
82
82
|
${this.value(e)}
|
|
83
83
|
</span>
|
|
84
|
-
${e.slot ?
|
|
85
|
-
${r === "changed" ?
|
|
84
|
+
${e.slot ? d`<slot name=${e.slot}></slot>` : n}
|
|
85
|
+
${r === "changed" ? o({
|
|
86
86
|
value: "Aangepast",
|
|
87
87
|
tone: "neutral",
|
|
88
88
|
className: "lintje-description-list__changed"
|
|
@@ -92,12 +92,12 @@ var p = ":host { display: block; min-width: 0; }\n:host([layout='grid']) { conta
|
|
|
92
92
|
</div>`;
|
|
93
93
|
}
|
|
94
94
|
render() {
|
|
95
|
-
let e =
|
|
95
|
+
let e = c({
|
|
96
96
|
"lintje-description-list": !0,
|
|
97
97
|
"lintje-description-list--column": this.layout === "column",
|
|
98
98
|
"lintje-description-list--grid": this.layout === "grid"
|
|
99
99
|
});
|
|
100
|
-
return
|
|
100
|
+
return d`<dl class=${e} ${f({ "--lintje-columns": String(this.columns) })}>
|
|
101
101
|
${this.items.map((e) => this.renderItem(e))}
|
|
102
102
|
</dl>`;
|
|
103
103
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as e, Bt as t, Gt as n, Ht as r,
|
|
1
|
+
import { $ as e, Bt as t, Gt as n, Ht as r, Z as i, et as a, j as o, qt as s, ut as c, zt as l } from "../chunks/base-Bg-IFOPG.js";
|
|
2
2
|
import "./empty-state.js";
|
|
3
3
|
//#region src/components/content/document-viewer/document-viewer.css?inline
|
|
4
4
|
var u = ":host { display: block; min-width: 0; }\n:host([hidden]) { display: none; }\n\n/* ------------------------------------------------------------------------ */\n\n.lintje-document-viewer {\n display: flex;\n flex-direction: column;\n height: 100%;\n border: 1px solid var(--color-border-default);\n background: var(--color-bg-surface);\n color: var(--color-text-primary);\n}\n\n.lintje-document-viewer__toolbar {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: space-between;\n gap: var(--space-2) var(--space-4);\n padding: var(--space-1) var(--space-3);\n border-bottom: 1px solid var(--color-border-default);\n font: var(--text-ui);\n}\n.lintje-document-viewer__name {\n flex: 1 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-weight: 700;\n}\n.lintje-document-viewer__group { display: flex; align-items: center; gap: var(--space-1); }\n.lintje-document-viewer__button { height: var(--h-button); min-width: var(--h-button); }\n.lintje-document-viewer__figure { font-variant-numeric: tabular-nums; white-space: nowrap; }\n.lintje-document-viewer__zoom { min-width: 7ch; text-align: center; }\n\n.lintje-document-viewer__view {\n position: relative;\n flex: 1 1 auto;\n min-height: 0;\n overflow: auto;\n padding: var(--space-6);\n background: var(--color-bg-subtle);\n touch-action: pan-x pan-y pinch-zoom;\n}\n\n/* Auto margins centre the page; a wider page scrolls to its left edge instead of being cut. */\n.lintje-document-viewer__page {\n margin: 0 auto;\n background: var(--color-bg-surface);\n border: 1px solid var(--color-border-default);\n}\n.lintje-document-viewer__page.is-fit { width: 100%; }\n.lintje-document-viewer__page.is-loading {\n position: absolute;\n width: 1px;\n height: 1px;\n overflow: hidden;\n clip-path: inset(50%);\n}\n.lintje-document-viewer__image { display: block; width: 100%; height: auto; }\n\n.lintje-document-viewer__skeleton {\n display: block;\n width: 100%;\n max-width: 420px;\n margin: 0 auto;\n aspect-ratio: 210 / 297;\n}\n\n@media (max-width: 767px) {\n .lintje-document-viewer__name { flex-basis: 100%; }\n .lintje-document-viewer__view { padding: var(--space-2) 0; }\n}\n", d = 50, f = 400, p = 25;
|
|
@@ -27,7 +27,7 @@ var y = class extends l {
|
|
|
27
27
|
static {
|
|
28
28
|
this.styles = [
|
|
29
29
|
e,
|
|
30
|
-
r(
|
|
30
|
+
r(o),
|
|
31
31
|
r(u)
|
|
32
32
|
];
|
|
33
33
|
}
|
|
@@ -141,11 +141,11 @@ var y = class extends l {
|
|
|
141
141
|
let n = this.url;
|
|
142
142
|
n !== this.shown && (this.shown = n, this.loaded = !1, this.failed = !1);
|
|
143
143
|
}
|
|
144
|
-
renderButton(e, t, r,
|
|
145
|
-
let c =
|
|
146
|
-
return
|
|
144
|
+
renderButton(e, t, r, o = {}) {
|
|
145
|
+
let c = o.disabled ?? !1;
|
|
146
|
+
return s`<button
|
|
147
147
|
type="button"
|
|
148
|
-
class=${
|
|
148
|
+
class=${i({
|
|
149
149
|
"lintje-icon-button": !0,
|
|
150
150
|
"lintje-icon-button--flat": !0,
|
|
151
151
|
"lintje-document-viewer__button": !0,
|
|
@@ -158,15 +158,15 @@ var y = class extends l {
|
|
|
158
158
|
c || r();
|
|
159
159
|
}}
|
|
160
160
|
>
|
|
161
|
-
${
|
|
161
|
+
${a(e, {
|
|
162
162
|
size: 18,
|
|
163
|
-
flip:
|
|
163
|
+
flip: o.flip ? "horizontal" : void 0
|
|
164
164
|
})}
|
|
165
165
|
</button>`;
|
|
166
166
|
}
|
|
167
167
|
renderToolbar() {
|
|
168
168
|
let e = this.count, t = _(this.page, e), n = this.zoom, r = n === "fit" ? this.fitPercent : n;
|
|
169
|
-
return
|
|
169
|
+
return s`<div class="lintje-document-viewer__toolbar" role="toolbar" aria-label="Document">
|
|
170
170
|
<div class="lintje-document-viewer__name">${this.name}</div>
|
|
171
171
|
<div class="lintje-document-viewer__group">
|
|
172
172
|
${this.renderButton("functioneel-delta-rechts", "Vorige pagina", () => this.goTo(t - 1), {
|
|
@@ -195,12 +195,12 @@ var y = class extends l {
|
|
|
195
195
|
</div>`;
|
|
196
196
|
}
|
|
197
197
|
renderPage() {
|
|
198
|
-
if (this.count === 0) return
|
|
198
|
+
if (this.count === 0) return s`<lintje-empty-state
|
|
199
199
|
class="lintje-document-viewer__empty"
|
|
200
200
|
icon="op-kantoor-document-blanco"
|
|
201
201
|
heading="Er is geen document om te tonen"
|
|
202
202
|
></lintje-empty-state>`;
|
|
203
|
-
if (this.failed) return
|
|
203
|
+
if (this.failed) return s`<lintje-empty-state
|
|
204
204
|
class="lintje-document-viewer__failed"
|
|
205
205
|
icon="op-kantoor-document-blanco"
|
|
206
206
|
heading="Het document kan niet worden getoond"
|
|
@@ -213,19 +213,19 @@ var y = class extends l {
|
|
|
213
213
|
>Downloaden</lintje-button
|
|
214
214
|
>
|
|
215
215
|
</lintje-empty-state>`;
|
|
216
|
-
let e = this.count, t = _(this.page, e), r = this.url,
|
|
217
|
-
return
|
|
216
|
+
let e = this.count, t = _(this.page, e), r = this.url, a = this.zoom, o = a === "fit" || !this.naturalWidth ? null : `${this.naturalWidth * a / 100}px`;
|
|
217
|
+
return s`${this.loaded ? n : s`<lintje-skeleton class="lintje-document-viewer__skeleton" height="auto"></lintje-skeleton>`}
|
|
218
218
|
<div
|
|
219
|
-
class=${
|
|
219
|
+
class=${i({
|
|
220
220
|
"lintje-document-viewer__page": !0,
|
|
221
|
-
"is-fit":
|
|
221
|
+
"is-fit": a === "fit",
|
|
222
222
|
"is-loading": !this.loaded
|
|
223
223
|
})}
|
|
224
224
|
role="img"
|
|
225
225
|
aria-label=${`${v(t, e)}${this.name ? ` van ${this.name}` : ""}`}
|
|
226
|
-
${c({ width:
|
|
226
|
+
${c({ width: o })}
|
|
227
227
|
>
|
|
228
|
-
${r ?
|
|
228
|
+
${r ? s`<img
|
|
229
229
|
class="lintje-document-viewer__image"
|
|
230
230
|
src=${r}
|
|
231
231
|
alt=""
|
|
@@ -233,12 +233,12 @@ var y = class extends l {
|
|
|
233
233
|
@error=${this.onError}
|
|
234
234
|
/>` : n}
|
|
235
235
|
</div>
|
|
236
|
-
${this.texts?.[t - 1] ?
|
|
236
|
+
${this.texts?.[t - 1] ? s`<div class="visually-hidden lintje-document-viewer__text">
|
|
237
237
|
${this.texts[t - 1]}
|
|
238
238
|
</div>` : n}`;
|
|
239
239
|
}
|
|
240
240
|
render() {
|
|
241
|
-
return
|
|
241
|
+
return s`<div class="lintje-document-viewer" @keydown=${this.onKeydown}>
|
|
242
242
|
${this.renderToolbar()}
|
|
243
243
|
<span class="visually-hidden" role="status">${this.said}</span>
|
|
244
244
|
<div
|