lintje 0.2.0 → 0.4.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/README.md +2 -2
- package/dist-elements/actions.js +1 -1
- package/dist-elements/chunks/{base-Bg-IFOPG.js → base-DRGvkF-r.js} +484 -309
- package/dist-elements/chunks/{controls-B1455oPG.js → controls-_4ac1Lpz.js} +7 -1
- package/dist-elements/chunks/{date-format-mHtZyBys.js → date-format-DxP9yfDp.js} +1 -1
- package/dist-elements/chunks/dialog-B7aRBtjy.js +28 -0
- package/dist-elements/chunks/{disclosure-BXTX04gM.js → disclosure-D39vAR5q.js} +1 -1
- package/dist-elements/chunks/{disclosure-CMXhX-Vb.js → disclosure-DirPLy2E.js} +6 -6
- package/dist-elements/chunks/download-C68kcwPj.js +206 -0
- package/dist-elements/chunks/{focus-trap-9BnE-xWv.js → focus-trap-Dv8zu64A.js} +1 -1
- package/dist-elements/chunks/input-BGMLam-O.js +195 -0
- package/dist-elements/chunks/input-lQTmOMOz.js +4 -0
- package/dist-elements/chunks/{player-DXOZEyEy.js → player-BApadXr8.js} +27 -27
- package/dist-elements/chunks/{sentence-BI3lwEuT.js → sentence-0wO85ZdJ.js} +3 -3
- package/dist-elements/chunks/{stagger-qGD3wmhg.js → stagger-BB_gcxBI.js} +88 -74
- package/dist-elements/content.js +1 -0
- package/dist-elements/core.js +1 -1
- package/dist-elements/custom-elements.json +8858 -7715
- package/dist-elements/data-types.json +6900 -0
- package/dist-elements/feedback.js +2 -1
- package/dist-elements/frame.js +0 -2
- package/dist-elements/guides/dashboard.md +8 -0
- package/dist-elements/guides/events.md +4 -5
- package/dist-elements/guides/loading.md +10 -9
- package/dist-elements/guides/page-contents.md +110 -0
- package/dist-elements/guides/start.md +12 -0
- package/dist-elements/inputs.js +3 -1
- package/dist-elements/layout.js +1 -1
- package/dist-elements/lintje.js +8562 -7138
- package/dist-elements/overlays.js +2 -2
- package/dist-elements/skills/lintje/SKILL.md +1 -1
- package/dist-elements/tables.js +1 -1
- package/dist-elements/tag/activity-log.js +15 -15
- package/dist-elements/tag/ai-label.js +10 -10
- package/dist-elements/tag/announcement.js +36 -76
- package/dist-elements/tag/app-search.js +49 -49
- package/dist-elements/tag/audio-player.js +57 -57
- package/dist-elements/tag/badge.d.ts +1 -1
- package/dist-elements/tag/badge.js +1 -1
- package/dist-elements/tag/breadcrumbs.js +15 -15
- package/dist-elements/tag/button.d.ts +1 -1
- package/dist-elements/tag/button.js +1 -1
- package/dist-elements/tag/card-list.js +12 -12
- package/dist-elements/tag/card.js +39 -44
- package/dist-elements/tag/chart.js +1357 -787
- package/dist-elements/tag/chat-answer.js +49 -49
- package/dist-elements/tag/chat-composer.js +75 -71
- package/dist-elements/tag/chat-message.js +8 -8
- package/dist-elements/tag/chat-strip.js +22 -22
- package/dist-elements/tag/chat-suggestions.js +12 -12
- package/dist-elements/tag/chat.js +56 -56
- package/dist-elements/tag/checkbox-group.d.ts +1 -0
- package/dist-elements/tag/checkbox-group.js +60 -0
- package/dist-elements/tag/checkbox.js +9 -8
- package/dist-elements/tag/code.js +9 -9
- package/dist-elements/tag/combobox.js +19 -18
- package/dist-elements/tag/conflict-alert.js +12 -12
- package/dist-elements/tag/copy-button.js +14 -14
- package/dist-elements/tag/data-table.js +880 -532
- package/dist-elements/tag/date-input.js +30 -29
- package/dist-elements/tag/date-range.js +39 -38
- package/dist-elements/tag/description-list.js +29 -32
- package/dist-elements/tag/dialog.d.ts +1 -0
- package/dist-elements/tag/dialog.js +144 -0
- package/dist-elements/tag/document-viewer.js +23 -23
- package/dist-elements/tag/drawer.js +28 -32
- package/dist-elements/tag/empty-state.js +19 -30
- package/dist-elements/tag/error-page.d.ts +1 -0
- package/dist-elements/tag/error-page.js +109 -0
- package/dist-elements/tag/error-summary.js +10 -10
- package/dist-elements/tag/expander.js +8 -8
- package/dist-elements/tag/explainer.js +11 -11
- package/dist-elements/tag/field.js +5 -5
- package/dist-elements/tag/file-upload.js +35 -34
- package/dist-elements/tag/filter-bar.js +56 -56
- package/dist-elements/tag/filter-sheet.js +11 -11
- package/dist-elements/tag/filter-zone.js +31 -31
- package/dist-elements/tag/find.d.ts +1 -0
- package/dist-elements/tag/find.js +128 -0
- package/dist-elements/tag/footer.js +21 -21
- package/dist-elements/tag/form-actions.js +29 -25
- package/dist-elements/tag/form-section.js +6 -6
- package/dist-elements/tag/form.js +12 -12
- package/dist-elements/tag/gallery.js +14 -14
- package/dist-elements/tag/grid-item.d.ts +1 -1
- package/dist-elements/tag/grid-item.js +1 -1
- package/dist-elements/tag/grid.d.ts +1 -1
- package/dist-elements/tag/grid.js +1 -1
- package/dist-elements/tag/hero.js +12 -12
- package/dist-elements/tag/highlight.js +5 -5
- package/dist-elements/tag/icon-button.d.ts +1 -1
- package/dist-elements/tag/icon-button.js +1 -1
- package/dist-elements/tag/icon.d.ts +1 -1
- package/dist-elements/tag/icon.js +1 -1
- package/dist-elements/tag/job-list.js +22 -44
- package/dist-elements/tag/kpi-row.js +12 -10
- package/dist-elements/tag/kpi.js +149 -140
- package/dist-elements/tag/level-meter.js +11 -11
- package/dist-elements/tag/list.js +55 -55
- package/dist-elements/tag/logo.js +30 -30
- package/dist-elements/tag/map.js +702 -671
- package/dist-elements/tag/menu-button.js +70 -69
- package/dist-elements/tag/modal.js +28 -37
- package/dist-elements/tag/multiselect.js +35 -34
- package/dist-elements/tag/note.js +5 -5
- package/dist-elements/tag/notifications.js +36 -36
- package/dist-elements/tag/number-input.js +13 -12
- package/dist-elements/tag/page-header.js +140 -37
- package/dist-elements/tag/pagination.js +54 -49
- package/dist-elements/tag/popover.d.ts +1 -1
- package/dist-elements/tag/popover.js +1 -1
- package/dist-elements/tag/progress-bar.d.ts +1 -1
- package/dist-elements/tag/progress-bar.js +1 -1
- package/dist-elements/tag/prose.js +6 -6
- package/dist-elements/tag/qr-code.js +7 -7
- package/dist-elements/tag/radio-group.js +13 -12
- package/dist-elements/tag/range.js +23 -22
- package/dist-elements/tag/recording-status.js +14 -14
- package/dist-elements/tag/repeater.js +10 -10
- package/dist-elements/tag/segmented.js +14 -13
- package/dist-elements/tag/select.js +11 -10
- package/dist-elements/tag/shell.js +356 -339
- package/dist-elements/tag/skeleton.d.ts +1 -1
- package/dist-elements/tag/skeleton.js +1 -1
- package/dist-elements/tag/slot-picker.js +16 -15
- package/dist-elements/tag/sortable-list.js +14 -14
- package/dist-elements/tag/spinner.d.ts +1 -1
- package/dist-elements/tag/spinner.js +1 -1
- package/dist-elements/tag/split-pane.js +12 -12
- package/dist-elements/tag/status-dot.d.ts +1 -1
- package/dist-elements/tag/status-dot.js +1 -1
- package/dist-elements/tag/stepper.js +21 -21
- package/dist-elements/tag/streaming-text.js +13 -13
- package/dist-elements/tag/sub-nav.js +39 -38
- package/dist-elements/tag/tabs.js +38 -38
- package/dist-elements/tag/tag-input.js +20 -19
- package/dist-elements/tag/text-editor.js +25 -24
- package/dist-elements/tag/text-input.js +15 -14
- package/dist-elements/tag/textarea.js +15 -14
- package/dist-elements/tag/tile.d.ts +1 -1
- package/dist-elements/tag/tile.js +1 -1
- package/dist-elements/tag/time-input.js +20 -19
- package/dist-elements/tag/toast.js +32 -23
- package/dist-elements/tag/toggle.js +9 -8
- package/dist-elements/tag/toggletip.js +27 -27
- package/dist-elements/tag/token-value.d.ts +1 -0
- package/dist-elements/tag/token-value.js +75 -0
- package/dist-elements/tag/tooltip.d.ts +1 -1
- package/dist-elements/tag/tooltip.js +1 -1
- package/dist-elements/tag/transcript.js +48 -48
- package/dist-elements/tag/translator.js +13 -13
- package/dist-elements/tag/tree-view.js +13 -13
- package/dist-elements/tag/user-menu.js +37 -37
- package/dist-elements/tag/video-player.js +21 -21
- package/dist-elements/tokens.css +120 -96
- package/dist-elements/tokens.json +1244 -0
- package/dist-elements/types/bundle/actions.d.ts +3 -3
- package/dist-elements/types/bundle/content.d.ts +1 -0
- package/dist-elements/types/bundle/feedback.d.ts +6 -5
- package/dist-elements/types/bundle/frame.d.ts +0 -2
- package/dist-elements/types/bundle/index.d.ts +0 -10
- package/dist-elements/types/bundle/inputs.d.ts +2 -0
- package/dist-elements/types/bundle/layout.d.ts +3 -3
- package/dist-elements/types/bundle/overlays.d.ts +3 -3
- package/dist-elements/types/categories.d.ts +4 -0
- package/dist-elements/types/{primitives → components/actions}/button/button.d.ts +13 -10
- package/dist-elements/types/components/actions/copy-button/copy-button.d.ts +8 -9
- package/dist-elements/types/{icons → components/actions}/icon/icon.d.ts +4 -5
- package/dist-elements/types/{primitives → components/actions}/icon-button/icon-button.d.ts +8 -6
- package/dist-elements/types/components/actions/menu-button/menu-button.d.ts +16 -18
- package/dist-elements/types/components/actions/qr-code/qr-code.d.ts +10 -10
- package/dist-elements/types/components/charts/chart/chart.d.ts +6 -5
- package/dist-elements/types/components/charts/explainer/explainer.d.ts +1 -1
- package/dist-elements/types/components/charts/kpi/kpi.d.ts +19 -11
- package/dist-elements/types/components/charts/kpi-row/kpi-row.d.ts +2 -8
- package/dist-elements/types/components/charts/note/note.d.ts +2 -2
- package/dist-elements/types/components/chat/chat/chat.d.ts +9 -11
- package/dist-elements/types/components/chat/chat-answer/chat-answer.d.ts +10 -11
- package/dist-elements/types/components/chat/chat-composer/chat-composer.d.ts +10 -12
- package/dist-elements/types/components/chat/chat-message/chat-message.d.ts +7 -8
- package/dist-elements/types/components/chat/chat-strip/chat-strip.d.ts +5 -5
- package/dist-elements/types/components/chat/chat-suggestions/chat-suggestions.d.ts +9 -10
- package/dist-elements/types/components/content/audio-player/audio-player.d.ts +15 -17
- package/dist-elements/types/components/content/code/code.d.ts +3 -4
- package/dist-elements/types/components/content/document-viewer/document-viewer.d.ts +10 -11
- package/dist-elements/types/components/content/gallery/gallery.d.ts +5 -4
- package/dist-elements/types/components/content/highlight/highlight.d.ts +5 -4
- package/dist-elements/types/components/content/prose/prose.d.ts +3 -4
- package/dist-elements/types/components/content/token-value/token-value.d.ts +42 -0
- package/dist-elements/types/components/content/transcript/transcript.d.ts +15 -28
- package/dist-elements/types/components/content/translator/translator.d.ts +12 -16
- package/dist-elements/types/components/content/video-player/video-player.d.ts +12 -14
- package/dist-elements/types/components/feedback/ai-label/ai-label.d.ts +3 -4
- package/dist-elements/types/components/feedback/announcement/announcement.d.ts +5 -9
- package/dist-elements/types/{primitives → components/feedback}/badge/badge.d.ts +10 -6
- package/dist-elements/types/components/feedback/conflict-alert/conflict-alert.d.ts +4 -5
- package/dist-elements/types/components/feedback/empty-state/empty-state.d.ts +5 -8
- package/dist-elements/types/components/feedback/error-page/error-page.d.ts +52 -0
- package/dist-elements/types/components/feedback/job-list/job-list.d.ts +9 -12
- package/dist-elements/types/components/feedback/level-meter/level-meter.d.ts +4 -6
- package/dist-elements/types/{primitives → components/feedback}/progress-bar/progress-bar.d.ts +9 -7
- package/dist-elements/types/components/feedback/recording-status/recording-status.d.ts +5 -6
- package/dist-elements/types/{primitives → components/feedback}/skeleton/skeleton.d.ts +2 -2
- package/dist-elements/types/{primitives → components/feedback}/spinner/spinner.d.ts +2 -3
- package/dist-elements/types/{primitives → components/feedback}/status-dot/status-dot.d.ts +5 -6
- package/dist-elements/types/components/feedback/streaming-text/streaming-text.d.ts +12 -9
- package/dist-elements/types/components/feedback/toast/toast.d.ts +8 -9
- package/dist-elements/types/components/filters/filter-bar/filter-bar.d.ts +9 -4
- package/dist-elements/types/components/filters/filter-sheet/filter-sheet.d.ts +7 -7
- package/dist-elements/types/components/filters/filter-zone/filter-zone.d.ts +4 -4
- package/dist-elements/types/components/forms/error-summary/error-summary.d.ts +6 -7
- package/dist-elements/types/components/forms/form/form.d.ts +5 -5
- package/dist-elements/types/components/forms/form-actions/form-actions.d.ts +10 -8
- package/dist-elements/types/components/forms/form-section/form-section.d.ts +6 -5
- package/dist-elements/types/components/forms/repeater/repeater.d.ts +15 -9
- package/dist-elements/types/components/forms/stepper/stepper.d.ts +6 -5
- package/dist-elements/types/components/frame/app-search/app-search.d.ts +7 -8
- package/dist-elements/types/components/frame/breadcrumbs/breadcrumbs.d.ts +2 -2
- package/dist-elements/types/components/frame/footer/footer.d.ts +3 -2
- package/dist-elements/types/components/frame/hero/hero.d.ts +7 -9
- package/dist-elements/types/components/frame/notifications/notifications.d.ts +7 -11
- package/dist-elements/types/components/frame/page-header/page-header.d.ts +13 -16
- package/dist-elements/types/components/frame/shell/shell.d.ts +15 -14
- package/dist-elements/types/components/frame/sub-nav/sub-nav.d.ts +10 -6
- package/dist-elements/types/components/frame/user-menu/user-menu.d.ts +13 -12
- package/dist-elements/types/components/index.d.ts +51 -12
- package/dist-elements/types/components/inputs/checkbox/checkbox.d.ts +4 -4
- package/dist-elements/types/components/inputs/checkbox-group/checkbox-group.d.ts +33 -0
- package/dist-elements/types/components/inputs/combobox/combobox.d.ts +14 -8
- package/dist-elements/types/components/inputs/date-input/date-input.d.ts +6 -6
- package/dist-elements/types/components/inputs/date-range/date-range.d.ts +13 -8
- package/dist-elements/types/components/inputs/field/field.d.ts +5 -3
- package/dist-elements/types/components/inputs/file-upload/file-upload.d.ts +8 -10
- package/dist-elements/types/components/inputs/find/find.d.ts +51 -0
- package/dist-elements/types/components/inputs/multiselect/multiselect.d.ts +4 -6
- package/dist-elements/types/components/inputs/number-input/number-input.d.ts +8 -7
- package/dist-elements/types/components/inputs/radio-group/radio-group.d.ts +2 -4
- package/dist-elements/types/components/inputs/range/range.d.ts +5 -6
- package/dist-elements/types/components/inputs/segmented/segmented.d.ts +7 -4
- package/dist-elements/types/components/inputs/select/select.d.ts +6 -3
- package/dist-elements/types/components/inputs/shared/input.d.ts +1 -1
- package/dist-elements/types/components/inputs/slot-picker/slot-picker.d.ts +6 -5
- package/dist-elements/types/components/inputs/tag-input/tag-input.d.ts +8 -6
- package/dist-elements/types/components/inputs/text-editor/text-editor.d.ts +8 -8
- package/dist-elements/types/components/inputs/text-input/text-input.d.ts +12 -7
- package/dist-elements/types/components/inputs/textarea/textarea.d.ts +12 -11
- package/dist-elements/types/components/inputs/time-input/time-input.d.ts +8 -9
- package/dist-elements/types/components/inputs/toggle/toggle.d.ts +3 -1
- package/dist-elements/types/components/layout/expander/expander.d.ts +10 -11
- package/dist-elements/types/{primitives → components/layout}/grid/grid.d.ts +4 -4
- package/dist-elements/types/{primitives → components/layout}/grid-item/grid-item.d.ts +2 -2
- package/dist-elements/types/components/layout/split-pane/split-pane.d.ts +6 -6
- package/dist-elements/types/components/layout/tabs/tabs.d.ts +12 -10
- package/dist-elements/types/{primitives → components/layout}/tile/tile.d.ts +22 -10
- package/dist-elements/types/components/map/map/map.d.ts +12 -11
- package/dist-elements/types/components/overlays/dialog/dialog.d.ts +49 -0
- package/dist-elements/types/components/overlays/drawer/drawer.d.ts +6 -5
- package/dist-elements/types/components/overlays/modal/modal.d.ts +9 -14
- package/dist-elements/types/{primitives → components/overlays}/popover/popover.d.ts +7 -6
- package/dist-elements/types/components/overlays/toggletip/toggletip.d.ts +4 -8
- package/dist-elements/types/{primitives → components/overlays}/tooltip/tooltip.d.ts +8 -8
- package/dist-elements/types/components/shared/announcement-block.d.ts +38 -0
- package/dist-elements/types/components/shared/charts/index.d.ts +5 -1
- package/dist-elements/types/components/shared/charts/kinds.d.ts +92 -0
- package/dist-elements/types/components/shared/charts/line-chart/line-chart.d.ts +2 -2
- package/dist-elements/types/components/shared/charts/map-chart/leaflet.d.ts +5 -0
- package/dist-elements/types/components/shared/charts/map-chart/map-chart.d.ts +1 -1
- package/dist-elements/types/components/shared/charts/radar-chart/radar-chart.d.ts +31 -0
- package/dist-elements/types/components/shared/charts/shared/axes.d.ts +3 -1
- package/dist-elements/types/components/shared/charts/shared/chart-states.d.ts +8 -19
- package/dist-elements/types/components/shared/charts/shared/controller.d.ts +12 -0
- package/dist-elements/types/components/shared/charts/shared/types.d.ts +62 -0
- package/dist-elements/types/components/shared/charts/stacked-area-chart/stacked-area-chart.d.ts +13 -0
- package/dist-elements/types/components/shared/content-tile.d.ts +1 -1
- package/dist-elements/types/components/{forms/form → shared}/controls.d.ts +3 -2
- package/dist-elements/types/components/shared/dialog.d.ts +9 -0
- package/dist-elements/types/components/shared/empty-state-block.d.ts +26 -0
- package/dist-elements/types/components/shared/overflow.d.ts +58 -0
- package/dist-elements/types/components/shared/tone.d.ts +18 -0
- package/dist-elements/types/components/tables/activity-log/activity-log.d.ts +3 -4
- package/dist-elements/types/components/tables/card/card.d.ts +17 -23
- package/dist-elements/types/components/tables/card-list/card-list.d.ts +9 -11
- package/dist-elements/types/components/tables/data-table/actions.d.ts +1 -1
- package/dist-elements/types/components/tables/data-table/data-table.d.ts +88 -19
- package/dist-elements/types/components/tables/data-table/editing.d.ts +1 -1
- package/dist-elements/types/components/tables/data-table/filters.d.ts +15 -6
- package/dist-elements/types/components/tables/description-list/description-list.d.ts +13 -12
- package/dist-elements/types/components/tables/list/list.d.ts +13 -24
- package/dist-elements/types/components/tables/pagination/pagination.d.ts +12 -11
- package/dist-elements/types/components/tables/sortable-list/sortable-list.d.ts +5 -6
- package/dist-elements/types/components/tables/tree-view/tree-view.d.ts +5 -5
- package/dist-elements/types/core/focus.d.ts +1 -1
- package/dist-elements/types/core/media.d.ts +2 -2
- package/dist-elements/types/core/motion.d.ts +5 -0
- package/dist-elements/types/core/print.d.ts +15 -0
- package/dist-elements/types/core/shortcuts.d.ts +2 -2
- package/dist-elements/types/icons/register.d.ts +1 -1
- package/dist-elements/types/types.d.ts +70 -10
- package/dist-icons/functioneel-kolommen.svg +1 -0
- package/dist-icons/functioneel-trechter.svg +1 -0
- package/package.json +1 -1
- package/dist-elements/chunks/confirm-dialog-D5EVGuil.js +0 -4
- package/dist-elements/chunks/download-y528pIHP.js +0 -230
- package/dist-elements/chunks/input-BtuNFSWk.js +0 -195
- package/dist-elements/tag/confirm-dialog.d.ts +0 -1
- package/dist-elements/tag/confirm-dialog.js +0 -118
- package/dist-elements/tag/session-expiry.d.ts +0 -1
- package/dist-elements/tag/session-expiry.js +0 -184
- package/dist-elements/tag/shortcuts.d.ts +0 -1
- package/dist-elements/tag/shortcuts.js +0 -104
- package/dist-elements/types/components/frame/session-expiry/session-expiry.d.ts +0 -55
- package/dist-elements/types/components/frame/shortcuts/shortcuts.d.ts +0 -41
- package/dist-elements/types/components/overlays/confirm-dialog/confirm-dialog.d.ts +0 -41
- package/dist-elements/types/primitives/index.d.ts +0 -33
- /package/dist-elements/types/components/content/{audio-player → shared}/playback.d.ts +0 -0
- /package/dist-elements/types/components/content/{audio-player → shared}/player.d.ts +0 -0
- /package/dist-elements/types/components/{inputs/date-input → shared}/date-format.d.ts +0 -0
- /package/dist-elements/types/{primitives → components}/shared/grid-item-element.d.ts +0 -0
- /package/dist-elements/types/{primitives → components}/shared/length.d.ts +0 -0
- /package/dist-elements/types/{primitives → components}/shared/place.d.ts +0 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `<lintje-dialog>` — the small window: a question that needs an answer, or a short form. The
|
|
3
|
+
* large window for content is `<lintje-modal>`.
|
|
4
|
+
*
|
|
5
|
+
* The host holds `open` and puts its own buttons in `actions`: Escape, the close button and the
|
|
6
|
+
* scrim only ask. Focus goes to the slotted element with `autofocus`, else the first field; an
|
|
7
|
+
* alert without one takes it itself, so Enter never confirms. Below 768 px the buttons stack
|
|
8
|
+
* with the last on top: put the safe one first.
|
|
9
|
+
*
|
|
10
|
+
* Events: `lintje-close` `{ reason: 'escape' | 'scrim' | 'button' }`.
|
|
11
|
+
*/
|
|
12
|
+
import { nothing, type PropertyDeclarations, type PropertyValues, type TemplateResult } from 'lit';
|
|
13
|
+
import { LintjeElement } from '../../../core/element.js';
|
|
14
|
+
export type DialogCloseReason = 'escape' | 'scrim' | 'button';
|
|
15
|
+
export declare class LintjeDialog extends LintjeElement {
|
|
16
|
+
#private;
|
|
17
|
+
static styles: import("lit").CSSResult[];
|
|
18
|
+
static properties: PropertyDeclarations;
|
|
19
|
+
/** The owner's: the dialog asks to be closed and never closes itself. */
|
|
20
|
+
open: boolean;
|
|
21
|
+
/** The question or the task, and the dialog's accessible name. */
|
|
22
|
+
heading: string;
|
|
23
|
+
/** A question that needs an answer: an `alertdialog`, without a close button. */
|
|
24
|
+
alert: boolean;
|
|
25
|
+
/** Escape and the scrim ask nothing, for a question that must be answered. */
|
|
26
|
+
persistent: boolean;
|
|
27
|
+
/** As wide as a short form reads, instead of a question. */
|
|
28
|
+
wide: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* The answer is under way: nothing asks to close, the last primary or danger button in
|
|
31
|
+
* `actions` turns busy and the others disabled.
|
|
32
|
+
*/
|
|
33
|
+
busy: boolean;
|
|
34
|
+
protected footerSlotted: boolean;
|
|
35
|
+
private ask;
|
|
36
|
+
private get frame();
|
|
37
|
+
private get buttons();
|
|
38
|
+
/** Read once on opening, before the slots exist to report; `slotchange` keeps it current. */
|
|
39
|
+
protected willUpdate(changed: PropertyValues<this>): void;
|
|
40
|
+
disconnectedCallback(): void;
|
|
41
|
+
protected updated(changed: PropertyValues<this>): void;
|
|
42
|
+
private onSlotChange;
|
|
43
|
+
protected render(): TemplateResult | typeof nothing;
|
|
44
|
+
}
|
|
45
|
+
declare global {
|
|
46
|
+
interface HTMLElementTagNameMap {
|
|
47
|
+
'lintje-dialog': LintjeDialog;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `<lintje-drawer>` — a side panel over the page, for a detail or a short form.
|
|
3
3
|
*
|
|
4
|
-
* The host holds `open`: Escape, the close button and the scrim only ask.
|
|
5
|
-
*
|
|
6
|
-
* hidden when empty. A dialog on the shared focus-trap stack; focus goes to the first field,
|
|
7
|
-
* else the close button.
|
|
4
|
+
* The host holds `open`: Escape, the close button and the scrim only ask. While `busy` none
|
|
5
|
+
* of them asks. Focus goes to the first field, else the close button.
|
|
8
6
|
*
|
|
9
7
|
* Events: `lintje-close` `{ reason: 'escape' | 'button' | 'scrim' }`.
|
|
10
8
|
*/
|
|
@@ -15,7 +13,10 @@ export declare class LintjeDrawer extends LintjeElement {
|
|
|
15
13
|
#private;
|
|
16
14
|
static styles: import("lit").CSSResult[];
|
|
17
15
|
static properties: PropertyDeclarations;
|
|
18
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* The host's: the drawer only asks to be closed. Whether unsaved input needs confirming first
|
|
18
|
+
* is the host's call.
|
|
19
|
+
*/
|
|
19
20
|
open: boolean;
|
|
20
21
|
/** The title and the dialog's accessible name; without it the dialog is "Zijpaneel". */
|
|
21
22
|
heading: string;
|
|
@@ -1,33 +1,28 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `<lintje-modal>` — the
|
|
2
|
+
* `<lintje-modal>` — the large window for content: a title, the content and a footer. A question
|
|
3
|
+
* or a short form goes in the small `<lintje-dialog>`.
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* reports its content again.
|
|
5
|
+
* The host holds `open`: Escape, the close button and the scrim only ask. It is `position: fixed`
|
|
6
|
+
* above the app frame, so no ancestor may carry a `transform`, `filter` or `contain`.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
* with a sentence in `footer` on the left and its buttons in `actions` on the right.
|
|
10
|
-
*
|
|
11
|
-
* Events: `lintje-close` (the host owns `open`), `lintje-download-csv`, `lintje-download-png`.
|
|
8
|
+
* Events: `lintje-close`, `lintje-download-csv`, `lintje-download-png`.
|
|
12
9
|
*/
|
|
13
10
|
import { nothing, type PropertyDeclarations, type TemplateResult } from 'lit';
|
|
14
11
|
import { LintjeElement } from '../../../core/element.js';
|
|
15
|
-
import '
|
|
16
|
-
import '
|
|
12
|
+
import '../../actions/button/button.js';
|
|
13
|
+
import '../../actions/icon-button/icon-button.js';
|
|
17
14
|
export declare class LintjeModal extends LintjeElement {
|
|
18
15
|
#private;
|
|
19
16
|
static styles: import("lit").CSSResult[];
|
|
20
17
|
static properties: PropertyDeclarations;
|
|
21
18
|
/** The host owns it; `lintje-close` asks for `false`. */
|
|
22
19
|
open: boolean;
|
|
23
|
-
/** The dialog's accessible name and its title line. */
|
|
20
|
+
/** The dialog's accessible name and its title line; without it the dialog is "Venster". */
|
|
24
21
|
heading: string;
|
|
25
22
|
subtitle?: string;
|
|
26
|
-
/** The footer's CSV and PNG buttons
|
|
23
|
+
/** The footer's CSV and PNG buttons, for content that can be downloaded. */
|
|
27
24
|
csv: boolean;
|
|
28
25
|
png: boolean;
|
|
29
|
-
/** A dialog with a form: its content's height, a form's width. */
|
|
30
|
-
narrow: boolean;
|
|
31
26
|
footerSlotted: boolean;
|
|
32
27
|
actionsSlotted: boolean;
|
|
33
28
|
private onActionsSlotChange;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `<lintje-popover>` — the floating panel: a surface fixed to the viewport under its anchor
|
|
3
|
-
* (`.anchor`, or the previous sibling). Content and padding come through the slot.
|
|
2
|
+
* `<lintje-popover>` — the floating panel: a surface fixed to the viewport under its anchor.
|
|
4
3
|
*
|
|
5
|
-
* The
|
|
6
|
-
*
|
|
4
|
+
* Content and padding come through the slot. The host holds `open`: the popover only asks to be
|
|
5
|
+
* closed. A component that draws a popover in its own root stops its `lintje-close`.
|
|
6
|
+
*
|
|
7
|
+
* Events: `lintje-close` `{ reason: 'escape' | 'outside' }`.
|
|
7
8
|
*/
|
|
8
9
|
import { nothing, type PropertyDeclarations, type PropertyValues, type TemplateResult } from 'lit';
|
|
9
|
-
import { LintjeElement } from '
|
|
10
|
-
import { type Place, type Placement } from '
|
|
10
|
+
import { LintjeElement } from '../../../core/element.js';
|
|
11
|
+
import { type Place, type Placement } from '../../shared/place.js';
|
|
11
12
|
export declare class LintjePopover extends LintjeElement {
|
|
12
13
|
static styles: import("lit").CSSResult;
|
|
13
14
|
static properties: PropertyDeclarations;
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `<lintje-toggletip>` — a small "i" button that shows a short explanation on a click.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* region that is always rendered, empty and `.visually-hidden` while closed: filling a region
|
|
7
|
-
* that already exists is what a screen reader announces. Escape is taken in the capture phase
|
|
8
|
-
* and stopped, so a modal or sheet around it stays open. The popover is fixed to the viewport
|
|
9
|
-
* and placed by `place()`, so a scrolling tile cannot cut it off.
|
|
4
|
+
* Escape closes it and stops there, so a modal or sheet around it stays open. The explanation is
|
|
5
|
+
* fixed to the viewport, so a scrolling tile cannot cut it off.
|
|
10
6
|
*
|
|
11
|
-
* Events: `lintje-toggle`
|
|
7
|
+
* Events: `lintje-toggle` `{ open }`.
|
|
12
8
|
*/
|
|
13
9
|
import { type PropertyDeclarations, type PropertyValues, type TemplateResult } from 'lit';
|
|
14
10
|
import { LintjeElement } from '../../../core/element.js';
|
|
15
|
-
import { type Place } from '
|
|
11
|
+
import { type Place } from '../../shared/place.js';
|
|
16
12
|
export type ToggletipPlacement = 'bottom-start' | 'bottom-end';
|
|
17
13
|
export declare class LintjeToggletip extends LintjeElement {
|
|
18
14
|
static styles: import("lit").CSSResult[];
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `<lintje-tooltip>` — one short sentence about the element it wraps.
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* the reader must know. The text
|
|
6
|
-
*
|
|
2
|
+
* `<lintje-tooltip>` — one short sentence about the element it wraps.
|
|
3
|
+
*
|
|
4
|
+
* It shows 300 ms after the pointer rests and at once on keyboard focus; Escape anywhere hides it.
|
|
5
|
+
* Never the only place for something the reader must know. The text becomes the wrapped element's
|
|
6
|
+
* description.
|
|
7
7
|
*/
|
|
8
8
|
import { type PropertyDeclarations, type PropertyValues, type TemplateResult } from 'lit';
|
|
9
|
-
import { LintjeElement } from '
|
|
10
|
-
import { type Place } from '
|
|
9
|
+
import { LintjeElement } from '../../../core/element.js';
|
|
10
|
+
import { type Place } from '../../shared/place.js';
|
|
11
11
|
export declare const TOOLTIP_DELAY = 300;
|
|
12
12
|
/** How long the bubble waits after the pointer leaves: time to cross the gap onto it. */
|
|
13
13
|
export declare const TOOLTIP_LINGER = 150;
|
|
@@ -16,7 +16,7 @@ export declare class LintjeTooltip extends LintjeElement {
|
|
|
16
16
|
static styles: import("lit").CSSResult;
|
|
17
17
|
static properties: PropertyDeclarations;
|
|
18
18
|
text: string;
|
|
19
|
-
/** The text is already the element's accessible name. */
|
|
19
|
+
/** The text is already the element's accessible name: it is not given as its description too. */
|
|
20
20
|
noDescribe: boolean;
|
|
21
21
|
/** Above the element, or `left` of it, level with it: for a column of buttons along an edge. */
|
|
22
22
|
placement: 'top' | 'left';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The announcement as a render function, so a tile draws its error with the same block as
|
|
3
|
+
* `<lintje-announcement>` draws itself. The element adds dismissal and focus; a tile adds
|
|
4
|
+
* nothing. A live block is drawn empty until `filled`: a region that arrives with its words is
|
|
5
|
+
* not announced.
|
|
6
|
+
*/
|
|
7
|
+
import { nothing, type CSSResult, type TemplateResult } from 'lit';
|
|
8
|
+
import { type Tone } from './tone.js';
|
|
9
|
+
/** `outage` interrupts and cannot be closed; `error` is a failure the reader may put away. */
|
|
10
|
+
export type AnnouncementKind = 'warning' | 'outage' | 'error' | 'info' | 'ok';
|
|
11
|
+
/** A message's kind in the one tone set: a warning is drawn in the attention tone. */
|
|
12
|
+
export declare const ANNOUNCEMENT_TONE: Record<AnnouncementKind, Tone>;
|
|
13
|
+
/** Only an outage interrupts the reader; the others wait their turn. */
|
|
14
|
+
export declare const ANNOUNCEMENT_ROLE: Record<AnnouncementKind, 'alert' | 'status'>;
|
|
15
|
+
/** The word a screen reader hears before the text, since the tint says nothing to it. */
|
|
16
|
+
export declare const ANNOUNCEMENT_PREFIX: Record<AnnouncementKind, string>;
|
|
17
|
+
export declare const announcementBlockStyles: CSSResult;
|
|
18
|
+
export interface AnnouncementBlockOptions {
|
|
19
|
+
kind?: AnnouncementKind;
|
|
20
|
+
title?: string;
|
|
21
|
+
text?: string;
|
|
22
|
+
meta?: string;
|
|
23
|
+
link?: {
|
|
24
|
+
label: string;
|
|
25
|
+
href: string;
|
|
26
|
+
};
|
|
27
|
+
/** A live region: `role` from the kind, drawn empty until `filled`. */
|
|
28
|
+
live?: boolean;
|
|
29
|
+
/** Whether a live block shows its words yet; ignored when not live. */
|
|
30
|
+
filled?: boolean;
|
|
31
|
+
/** What stands under or beside the text: the element's `action` slot. */
|
|
32
|
+
action?: TemplateResult | typeof nothing;
|
|
33
|
+
/** What stands beside the body: the element's `media` slot. */
|
|
34
|
+
media?: TemplateResult | typeof nothing;
|
|
35
|
+
/** With a handler the block draws its close button. */
|
|
36
|
+
onClose?: () => void;
|
|
37
|
+
}
|
|
38
|
+
export declare function renderAnnouncementBlock(options: AnnouncementBlockOptions): TemplateResult;
|
|
@@ -3,15 +3,19 @@
|
|
|
3
3
|
* `renderMap` a map. See README.md for the contract.
|
|
4
4
|
*/
|
|
5
5
|
export { renderChart } from './shared/render-chart.js';
|
|
6
|
+
export { CHART_KINDS, CHART_QUESTIONS } from './kinds.js';
|
|
7
|
+
export type { ChartKindGuide, ChartQuestion } from './kinds.js';
|
|
6
8
|
export { renderLineChart } from './line-chart/line-chart.js';
|
|
7
9
|
export { renderBarChart, TINTS } from './bar-chart/bar-chart.js';
|
|
8
10
|
export { renderHorizontalBarChart, rowsHeight } from './horizontal-bar-chart/horizontal-bar-chart.js';
|
|
9
11
|
export { renderTargetProgressChart } from './target-progress-chart/target-progress-chart.js';
|
|
10
12
|
export { renderGroupedBarChart } from './grouped-bar-chart/grouped-bar-chart.js';
|
|
11
13
|
export { renderStackedBarChart } from './stacked-bar-chart/stacked-bar-chart.js';
|
|
14
|
+
export { renderStackedAreaChart } from './stacked-area-chart/stacked-area-chart.js';
|
|
12
15
|
export { renderPieChart } from './pie-chart/pie-chart.js';
|
|
13
16
|
export { renderDualAxisChart } from './dual-axis-chart/dual-axis-chart.js';
|
|
14
17
|
export { renderScatterChart } from './scatter-chart/scatter-chart.js';
|
|
18
|
+
export { renderRadarChart } from './radar-chart/radar-chart.js';
|
|
15
19
|
export { renderHeatmap, heatmapBounds, heatmapClasses } from './heatmap-chart/heatmap-chart.js';
|
|
16
20
|
export type { HeatmapClass } from './heatmap-chart/heatmap-chart.js';
|
|
17
21
|
export { renderHistogramChart } from './histogram-chart/histogram-chart.js';
|
|
@@ -20,7 +24,7 @@ export type { MapOptions } from './map-chart/map-chart.js';
|
|
|
20
24
|
export { renderChartFrame, renderLegend, renderAsOfMarker } from './shared/axes.js';
|
|
21
25
|
export type { ChartFrameOptions, LegendItem, SvgSlot } from './shared/axes.js';
|
|
22
26
|
export { renderTooltip } from './shared/tooltip.js';
|
|
23
|
-
export { renderChartSkeleton
|
|
27
|
+
export { renderChartSkeleton } from './shared/chart-states.js';
|
|
24
28
|
export type { ChartSkeletonKind } from './shared/chart-states.js';
|
|
25
29
|
export { ChartController, chartArea } from './shared/controller.js';
|
|
26
30
|
export type { ChartOptions, MeasureSpec, TooltipContent, TooltipRow, TooltipState, } from './shared/controller.js';
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
export type ChartQuestion = 'time' | 'compare' | 'parts' | 'spread' | 'relation' | 'target';
|
|
2
|
+
/** The questions in the order a page asks them, as a reader would put them. */
|
|
3
|
+
export declare const CHART_QUESTIONS: Readonly<Record<ChartQuestion, string>>;
|
|
4
|
+
export interface ChartKindGuide {
|
|
5
|
+
/** The kind's Dutch name. */
|
|
6
|
+
label: string;
|
|
7
|
+
question: ChartQuestion;
|
|
8
|
+
/** What the kind is for. */
|
|
9
|
+
use: string;
|
|
10
|
+
/** When another kind fits better, and which. */
|
|
11
|
+
avoid: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const CHART_KINDS: {
|
|
14
|
+
readonly line: {
|
|
15
|
+
readonly label: 'Lijn';
|
|
16
|
+
readonly question: 'time';
|
|
17
|
+
readonly use: 'Het verloop van een of meer reeksen over de tijd, met een vergelijking in grijs, een peilmoment of wat er gebeurde.';
|
|
18
|
+
readonly avoid: 'Een paar losse groepen zonder volgorde: neem staven.';
|
|
19
|
+
};
|
|
20
|
+
readonly 'stacked-area': {
|
|
21
|
+
readonly label: 'Gestapeld vlak';
|
|
22
|
+
readonly question: 'time';
|
|
23
|
+
readonly use: 'Hoe de delen van één variabele samen het totaal vormen, door de tijd.';
|
|
24
|
+
readonly avoid: 'Delen die je los wilt volgen: alleen de onderste laag staat op de nullijn. Neem lijnen.';
|
|
25
|
+
};
|
|
26
|
+
readonly 'dual-axis': {
|
|
27
|
+
readonly label: 'Twee assen';
|
|
28
|
+
readonly question: 'time';
|
|
29
|
+
readonly use: 'Twee maten met een andere eenheid over dezelfde periode, zoals aantallen en een wachttijd met norm.';
|
|
30
|
+
readonly avoid: 'Twee maten in dezelfde eenheid: neem een lijn met twee reeksen. Waar de lijnen elkaar kruisen, kiest de schaal, niet de data.';
|
|
31
|
+
};
|
|
32
|
+
readonly bar: {
|
|
33
|
+
readonly label: 'Staven';
|
|
34
|
+
readonly question: 'compare';
|
|
35
|
+
readonly use: 'Eén waarde per groep of per periode, als de losse waarden tellen, met datalabels of een trendlijn.';
|
|
36
|
+
readonly avoid: 'Lange namen of veel groepen: neem horizontale staven.';
|
|
37
|
+
};
|
|
38
|
+
readonly 'horizontal-bar': {
|
|
39
|
+
readonly label: 'Horizontale staven';
|
|
40
|
+
readonly question: 'compare';
|
|
41
|
+
readonly use: 'Groepen met lange namen, op grootte, met een norm die laat zien wie erboven zit.';
|
|
42
|
+
readonly avoid: 'Een verloop in de tijd: tijd loopt van links naar rechts. Neem staven of een lijn.';
|
|
43
|
+
};
|
|
44
|
+
readonly 'grouped-bar': {
|
|
45
|
+
readonly label: 'Gegroepeerde staven';
|
|
46
|
+
readonly question: 'compare';
|
|
47
|
+
readonly use: 'Twee of drie reeksen naast elkaar per groep, om ze binnen de groep te vergelijken.';
|
|
48
|
+
readonly avoid: 'Meer dan drie reeksen: de groepen worden onleesbaar. Neem een lijn of een tabel.';
|
|
49
|
+
};
|
|
50
|
+
readonly radar: {
|
|
51
|
+
readonly label: 'Spinnendiagram';
|
|
52
|
+
readonly question: 'compare';
|
|
53
|
+
readonly use: 'Het profiel van één tot drie eenheden over vijf tot acht maten op één schaal, tegen een vergelijking in grijs of een norm.';
|
|
54
|
+
readonly avoid: 'Maten met elk een eigen eenheid, of meer dan drie eenheden: neem horizontale staven of een tabel. Precies aflezen: een tabel.';
|
|
55
|
+
};
|
|
56
|
+
readonly 'stacked-bar': {
|
|
57
|
+
readonly label: 'Gestapelde staven';
|
|
58
|
+
readonly question: 'parts';
|
|
59
|
+
readonly use: 'De samenstelling per groep of per periode, in aantallen of op 100 %.';
|
|
60
|
+
readonly avoid: 'Eén geheel op één moment: neem een taart. Een deel boven de onderste laag precies vergelijken: neem gegroepeerde staven.';
|
|
61
|
+
};
|
|
62
|
+
readonly pie: {
|
|
63
|
+
readonly label: 'Taart of donut';
|
|
64
|
+
readonly question: 'parts';
|
|
65
|
+
readonly use: 'De delen van één geheel op één moment, tot vijf; meer vouwt tot "Overig". Een donut toont ook het deel van een geheel, met het cijfer in het midden.';
|
|
66
|
+
readonly avoid: 'Een verloop in de tijd, of delen die bijna even groot zijn: neem gestapelde staven.';
|
|
67
|
+
};
|
|
68
|
+
readonly histogram: {
|
|
69
|
+
readonly label: 'Histogram';
|
|
70
|
+
readonly question: 'spread';
|
|
71
|
+
readonly use: 'Hoe waarden over klassen vallen, zoals doorlooptijden, met een mediaan of een termijn.';
|
|
72
|
+
readonly avoid: 'Groepen zonder volgorde of zonder doorlopende as: neem staven.';
|
|
73
|
+
};
|
|
74
|
+
readonly heatmap: {
|
|
75
|
+
readonly label: 'Heatmap';
|
|
76
|
+
readonly question: 'spread';
|
|
77
|
+
readonly use: 'Een waarde over twee indelingen tegelijk, zoals uur en dag, in vijf klassen.';
|
|
78
|
+
readonly avoid: 'Precieze waarden aflezen: klassen ronden af. Neem een tabel.';
|
|
79
|
+
};
|
|
80
|
+
readonly scatter: {
|
|
81
|
+
readonly label: 'Spreiding';
|
|
82
|
+
readonly question: 'relation';
|
|
83
|
+
readonly use: 'Of twee maten samenhangen: een punt per eenheid, met een norm op de verticale as.';
|
|
84
|
+
readonly avoid: 'Een verloop in de tijd: neem een lijn.';
|
|
85
|
+
};
|
|
86
|
+
readonly 'target-progress': {
|
|
87
|
+
readonly label: 'Voortgang tegen een doel';
|
|
88
|
+
readonly question: 'target';
|
|
89
|
+
readonly use: 'Hoe ver een paar onderdelen zijn tegen één doel.';
|
|
90
|
+
readonly avoid: 'Eén kerncijfer tegen een doel: dat is een KPI op een schaal, in lintje-kpi.';
|
|
91
|
+
};
|
|
92
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Line and area chart with comparison, hatching
|
|
3
|
-
* as 0 (rule 15): `null` points are skipped and the missing part is hatched or cut off.
|
|
2
|
+
* Line and area chart with comparison, hatching, as-of time and events. Missing data is never
|
|
3
|
+
* drawn as 0 (rule 15): `null` points are skipped and the missing part is hatched or cut off.
|
|
4
4
|
*/
|
|
5
5
|
import { type TemplateResult } from 'lit';
|
|
6
6
|
import { type ChartOptions } from '../shared/controller.js';
|
|
@@ -59,6 +59,11 @@ export declare class LeafletSurface {
|
|
|
59
59
|
width: number;
|
|
60
60
|
metres: number;
|
|
61
61
|
} | null;
|
|
62
|
+
/**
|
|
63
|
+
* On paper the box has another size, and Leaflet would keep the screen's pixels and cut the
|
|
64
|
+
* rest off: the area the reader saw fills the paper's box instead, and returns afterwards.
|
|
65
|
+
*/
|
|
66
|
+
print(printing: boolean): void;
|
|
62
67
|
home(): void;
|
|
63
68
|
destroy(): void;
|
|
64
69
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { type TemplateResult } from 'lit';
|
|
7
7
|
import type { ChartOptions } from '../shared/controller.js';
|
|
8
8
|
import type { MapArea, MapSpec, MapValue } from '../shared/types.js';
|
|
9
|
-
import '
|
|
9
|
+
import '../../../overlays/popover/popover.js';
|
|
10
10
|
/** The map's own height in a tile: on a phone taller, so all its buttons fit on the touch size. */
|
|
11
11
|
export declare const MAP_HEIGHT: {
|
|
12
12
|
readonly desktop: 400;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Radar chart: the profile of one to three variables over five to eight axes that share one
|
|
3
|
+
* scale, from 0 in the centre to `max` on the outer ring, with a grey comparison and a norm.
|
|
4
|
+
* Dashed is the norm only: a dashed comparison over it would read as a second norm.
|
|
5
|
+
* Overlapping areas mix into a colour no variable has, so of more layers only the one the
|
|
6
|
+
* reader points at in the legend fills. Below 768 px each axis becomes a row of bars (rule 9).
|
|
7
|
+
*/
|
|
8
|
+
import { type TemplateResult } from 'lit';
|
|
9
|
+
import type { ChartOptions } from '../shared/controller.js';
|
|
10
|
+
import type { ChartSpec } from '../shared/types.js';
|
|
11
|
+
type RadarSpec = Extract<ChartSpec, {
|
|
12
|
+
kind: 'radar';
|
|
13
|
+
}>;
|
|
14
|
+
/**
|
|
15
|
+
* The runs of known values around the circle, as axis indices. Without a gap the one run closes
|
|
16
|
+
* on itself; a gap breaks the line there, as nothing is known to bridge it (rule 15).
|
|
17
|
+
*/
|
|
18
|
+
export declare function radarRuns(values: (number | null)[]): {
|
|
19
|
+
closed: boolean;
|
|
20
|
+
runs: number[][];
|
|
21
|
+
};
|
|
22
|
+
/** The rings: every `step` up to `max`, and `max` itself as the outer one. */
|
|
23
|
+
export declare function radarTicks(max: number, step?: number): number[];
|
|
24
|
+
/** Which layers fill: one alone does; of more, the emphasised one (`emphasis`), all or none. */
|
|
25
|
+
export declare function radarFills(spec: Pick<RadarSpec, 'area'>, shown: {
|
|
26
|
+
label: string;
|
|
27
|
+
comparison: boolean;
|
|
28
|
+
complete: boolean;
|
|
29
|
+
}[], emphasis: string | null): Set<string>;
|
|
30
|
+
export declare function renderRadarChart(spec: RadarSpec, options: ChartOptions): TemplateResult;
|
|
31
|
+
export {};
|
|
@@ -23,9 +23,11 @@ export interface LegendItem {
|
|
|
23
23
|
* dark-yellow one with the edge of its text colour (`lineCasing`).
|
|
24
24
|
*/
|
|
25
25
|
export declare function renderSymbol(symbol: SeriesKey, color: string | undefined, centre: number): SVGTemplateResult;
|
|
26
|
-
export declare function renderLegend({ items, onToggle, position, }: {
|
|
26
|
+
export declare function renderLegend({ items, onToggle, onEmphasis, position, }: {
|
|
27
27
|
items: LegendItem[];
|
|
28
28
|
onToggle?: (label: string) => void;
|
|
29
|
+
/** A series pointed at or focused, and `null` once it is left. */
|
|
30
|
+
onEmphasis?: (label: string | null) => void;
|
|
29
31
|
position?: 'top' | 'bottom' | 'right';
|
|
30
32
|
}): TemplateResult;
|
|
31
33
|
type XAnchor = 'start' | 'middle' | 'end';
|
|
@@ -1,27 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* their CSS. A host with its own announcement element passes it in `announcement`.
|
|
2
|
+
* The loading skeleton in the shape of the chart. Empty and error are the tile's: it draws them
|
|
3
|
+
* with the shared blocks. The skeleton writes the markup of `lintje-skeleton`, not its CSS.
|
|
5
4
|
*/
|
|
6
5
|
import { type TemplateResult } from 'lit';
|
|
7
6
|
export type ChartSkeletonKind = 'line' | 'bar' | 'pie' | 'donut' | 'heatmap' | 'map' | 'table';
|
|
8
|
-
/** Loading skeleton in the shape of the chart, exactly `height` tall so the tile keeps its size. */
|
|
9
|
-
export declare function renderChartSkeleton({ kind, height, }?: {
|
|
10
|
-
kind?: ChartSkeletonKind;
|
|
11
|
-
height?: string;
|
|
12
|
-
}): TemplateResult;
|
|
13
|
-
/** Axes, grid and zero line stay; the message names the way out itself. */
|
|
14
|
-
export declare function renderChartEmpty(message: unknown, height?: string): TemplateResult;
|
|
15
|
-
/** The error announcement for a component: `live: true`, so a screen reader speaks it. */
|
|
16
|
-
export declare function liveAnnouncement(message: unknown): TemplateResult;
|
|
17
7
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
8
|
+
* Loading skeleton in the shape of the chart, exactly `height` tall so the tile keeps its size.
|
|
9
|
+
* Inside a tile's `loading` slot the tile's region speaks (`status: false`); on its own it is
|
|
10
|
+
* the region, in words.
|
|
20
11
|
*/
|
|
21
|
-
export declare function
|
|
22
|
-
|
|
23
|
-
lastKnown?: unknown;
|
|
12
|
+
export declare function renderChartSkeleton({ kind, height, status, }?: {
|
|
13
|
+
kind?: ChartSkeletonKind;
|
|
24
14
|
height?: string;
|
|
25
|
-
|
|
26
|
-
announcement?: (message: unknown) => TemplateResult;
|
|
15
|
+
status?: boolean;
|
|
27
16
|
}): TemplateResult;
|
|
@@ -31,12 +31,21 @@ export interface TooltipRow {
|
|
|
31
31
|
value: string;
|
|
32
32
|
/** The swatch; a row without one is a plain figure. */
|
|
33
33
|
color?: string;
|
|
34
|
+
/** A line above the row, which sums up the rows before it: a total. */
|
|
35
|
+
divider?: boolean;
|
|
34
36
|
/** The series' shape instead of a square swatch, as its legend draws it. */
|
|
35
37
|
symbol?: SeriesKey;
|
|
38
|
+
/** A line instead of a square swatch, plain or dashed (a norm), as its legend draws it. */
|
|
39
|
+
marker?: 'line' | 'dashed';
|
|
36
40
|
}
|
|
37
41
|
export interface TooltipContent {
|
|
38
42
|
title: string;
|
|
39
43
|
rows: TooltipRow[];
|
|
44
|
+
/** The events at this category, under the values: their number and text. */
|
|
45
|
+
events?: {
|
|
46
|
+
number: number;
|
|
47
|
+
label: string;
|
|
48
|
+
}[];
|
|
40
49
|
}
|
|
41
50
|
export interface TooltipState {
|
|
42
51
|
x: number;
|
|
@@ -64,6 +73,8 @@ export declare class ChartController {
|
|
|
64
73
|
/** What the keyboard's tooltip says, for the chart's status region; empty otherwise. */
|
|
65
74
|
status: string;
|
|
66
75
|
hiddenSeries: string[];
|
|
76
|
+
/** The series the reader points at or focuses in the legend; `null` for none. */
|
|
77
|
+
emphasis: string | null;
|
|
67
78
|
/** The layers of a stacked map switched off in its legend, by their place in the stack. */
|
|
68
79
|
hiddenLayers: number[];
|
|
69
80
|
hoverSegment: number | null;
|
|
@@ -140,6 +151,7 @@ export declare class ChartController {
|
|
|
140
151
|
private watchEscape;
|
|
141
152
|
private unwatchEscape;
|
|
142
153
|
toggleLayer(index: number): void;
|
|
154
|
+
emphasise(label: string | null): void;
|
|
143
155
|
toggleSeries(label: string): void;
|
|
144
156
|
private read;
|
|
145
157
|
/**
|
|
@@ -21,6 +21,17 @@ export interface LineSeriesData {
|
|
|
21
21
|
comparison?: boolean;
|
|
22
22
|
area?: boolean;
|
|
23
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* Something that happened at a category. The chart numbers its events 1, 2, … from left to
|
|
26
|
+
* right, in the host's order within one category; one whose `index` is not in `labels` is left
|
|
27
|
+
* out and takes no number.
|
|
28
|
+
*/
|
|
29
|
+
export interface ChartEvent {
|
|
30
|
+
/** Index into `labels`: the category it happened at. */
|
|
31
|
+
index: number;
|
|
32
|
+
/** What happened, in a few words; listed under the chart and shown in the tooltip. */
|
|
33
|
+
label: string;
|
|
34
|
+
}
|
|
24
35
|
export interface BarSeriesData {
|
|
25
36
|
label: string;
|
|
26
37
|
values: number[];
|
|
@@ -59,6 +70,8 @@ export type ChartSpec = {
|
|
|
59
70
|
pendingHours?: number;
|
|
60
71
|
fixedMax?: number;
|
|
61
72
|
small?: boolean;
|
|
73
|
+
/** Events: a numbered square above their category, listed with their text under the chart. */
|
|
74
|
+
events?: ChartEvent[];
|
|
62
75
|
} | {
|
|
63
76
|
kind: 'bar';
|
|
64
77
|
labels: string[];
|
|
@@ -105,6 +118,22 @@ export type ChartSpec = {
|
|
|
105
118
|
normalized?: boolean;
|
|
106
119
|
totalOnTop?: boolean;
|
|
107
120
|
small?: boolean;
|
|
121
|
+
} | {
|
|
122
|
+
kind: 'stacked-area';
|
|
123
|
+
labels: string[];
|
|
124
|
+
/**
|
|
125
|
+
* The parts of one variable, the first at the bottom. A `null` in any part breaks the whole
|
|
126
|
+
* stack at that point: no area bridges it and the period is hatched (rule 15).
|
|
127
|
+
*/
|
|
128
|
+
series: {
|
|
129
|
+
label: string;
|
|
130
|
+
values: (number | null)[];
|
|
131
|
+
}[];
|
|
132
|
+
/** The variable the stack divides: its parts take this colour's tints. Default sky blue. */
|
|
133
|
+
color?: ChartColor;
|
|
134
|
+
axisTitle?: string;
|
|
135
|
+
unit?: string;
|
|
136
|
+
small?: boolean;
|
|
108
137
|
} | {
|
|
109
138
|
kind: 'pie';
|
|
110
139
|
segments: {
|
|
@@ -209,7 +238,40 @@ export type ChartSpec = {
|
|
|
209
238
|
/** The text beside the threshold line; default "norm" with its value and unit. */
|
|
210
239
|
thresholdLabel?: string;
|
|
211
240
|
small?: boolean;
|
|
241
|
+
} | {
|
|
242
|
+
kind: 'radar';
|
|
243
|
+
/** The axes' names, five to eight, clockwise from the top. All share one scale. */
|
|
244
|
+
axes: string[];
|
|
245
|
+
/** The layers: at most three variables and one comparison. */
|
|
246
|
+
series: RadarSeriesData[];
|
|
247
|
+
/** The outer ring. The scale starts at 0 in the centre: the area carries the value. */
|
|
248
|
+
max: number;
|
|
249
|
+
/** The distance between the rings; without it five rings. */
|
|
250
|
+
step?: number;
|
|
251
|
+
unit?: string;
|
|
252
|
+
/** A norm on every axis: a dashed polygon in the emphasis colour. */
|
|
253
|
+
threshold?: number;
|
|
254
|
+
thresholdLabel?: string;
|
|
255
|
+
/**
|
|
256
|
+
* Which layer fills. `emphasis` (the default): one layer always does, of more only the
|
|
257
|
+
* one the reader points at in the legend, as overlapping areas mix into a colour no
|
|
258
|
+
* variable has. `always` fills every layer, `never` none.
|
|
259
|
+
*/
|
|
260
|
+
area?: 'emphasis' | 'always' | 'never';
|
|
261
|
+
/** The value under each axis name; with one layer only (all or nothing). Default true. */
|
|
262
|
+
dataLabels?: boolean;
|
|
263
|
+
small?: boolean;
|
|
212
264
|
};
|
|
265
|
+
/**
|
|
266
|
+
* A layer of a radar chart: one value per axis, `null` for no data (rule 15). Without a colour
|
|
267
|
+
* the layers take the data colours in their order; a comparison is grey and dashed.
|
|
268
|
+
*/
|
|
269
|
+
export interface RadarSeriesData {
|
|
270
|
+
label: string;
|
|
271
|
+
values: (number | null)[];
|
|
272
|
+
color?: ChartColor;
|
|
273
|
+
comparison?: boolean;
|
|
274
|
+
}
|
|
213
275
|
export type ChartKind = ChartSpec['kind'];
|
|
214
276
|
/**
|
|
215
277
|
* What a map draws. `polygons` are areas that carry their own outline (`MapValue.polygon`);
|
package/dist-elements/types/components/shared/charts/stacked-area-chart/stacked-area-chart.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stacked areas: the parts of one variable in its tints, the first at the bottom and darkest. A
|
|
3
|
+
* missing value breaks its part and every part above it; the parts below stay, and the rest of
|
|
4
|
+
* the column is hatched (rule 15). A part switched off shrinks out and the parts above settle.
|
|
5
|
+
*/
|
|
6
|
+
import { type TemplateResult } from 'lit';
|
|
7
|
+
import { type ChartOptions } from '../shared/controller.js';
|
|
8
|
+
import type { ChartSpec } from '../shared/types.js';
|
|
9
|
+
type StackedAreaSpec = Extract<ChartSpec, {
|
|
10
|
+
kind: 'stacked-area';
|
|
11
|
+
}>;
|
|
12
|
+
export declare function renderStackedAreaChart(spec: StackedAreaSpec, options: ChartOptions): TemplateResult;
|
|
13
|
+
export {};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* data. The modal's events stop here, like the tile's own, so one action is one line in a log.
|
|
5
5
|
*/
|
|
6
6
|
import { type PropertyDeclarations, type TemplateResult } from 'lit';
|
|
7
|
-
import { LintjeGridItemElement } from '
|
|
7
|
+
import { LintjeGridItemElement } from './grid-item-element.js';
|
|
8
8
|
import '../overlays/modal/modal.js';
|
|
9
9
|
export interface ExpandModalOptions {
|
|
10
10
|
heading?: string;
|