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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Gt as e, H as t, Jt as n, Kt as r, Q as i, Yt as a, Zt as o, at as s, en as c, lt as l, nn as u, ot as d, st as f, ut as p } from "../chunks/base-DRGvkF-r.js";
|
|
2
2
|
//#region src/components/frame/sub-nav/sub-nav.css?inline
|
|
3
3
|
var m = ":host { display: block; min-width: 0; }\n:host([hidden]) { display: none; }\n\n/* ------------------------------------------------------------------------ */\n\n/* Typographic, as the Rijkshuisstijl's side-nav: links in the link colour, the reader's page in\n the text colour and bold, groups apart by space alone. No fill and no edge. */\n.lintje-sub-nav { font: var(--text-ui); }\n\n.lintje-sub-nav__group + .lintje-sub-nav__group { margin-top: var(--space-6); }\n\n.lintje-sub-nav__heading {\n margin: 0;\n padding: var(--space-3) 0 var(--space-1);\n font-size: var(--label-size);\n font-weight: var(--label-weight);\n letter-spacing: var(--label-tracking);\n line-height: 1.3;\n text-transform: uppercase;\n color: var(--color-text-muted);\n}\n\n.lintje-sub-nav__list { list-style: none; margin: 0; padding: 0; }\n\n/* The second level hangs from a line, the width of the separators the house style draws. */\n.lintje-sub-nav__list--nested {\n margin-bottom: var(--space-1);\n padding-left: calc(var(--space-6) - 2px);\n border-left: 2px solid var(--color-border-default);\n}\n\n/* The row reaches past the text column on both sides, so the inset focus ring clears the word. */\n.lintje-sub-nav__link {\n display: flex; align-items: flex-start; gap: var(--space-2);\n box-sizing: border-box;\n min-height: var(--h-nav-row);\n margin: 0 calc(var(--space-2) * -1);\n padding: var(--space-3) var(--space-2);\n border: 0;\n background: none;\n font: inherit;\n line-height: 1.5;\n color: var(--color-link);\n text-align: left;\n text-decoration: none;\n cursor: pointer;\n transition: color var(--dur-hover) var(--ease-in-motion);\n}\n.lintje-sub-nav__link--action { width: calc(100% + var(--space-2) * 2); }\n\n/* Only the word is underlined: an icon or a count under a line reads as part of the link text. */\n.lintje-sub-nav__label { min-width: 0; text-underline-offset: 0.2em; }\n.lintje-sub-nav__link:hover { color: var(--color-link-hover); }\n.lintje-sub-nav__link:hover .lintje-sub-nav__label { text-decoration: underline; }\n\n/* Bold carries the reader's page beside the colour (rule 13); on a fill, the side menu does not. */\n.lintje-sub-nav__link.is-current { color: var(--color-text-primary); font-weight: 700; cursor: default; }\n.lintje-sub-nav__link.is-current .lintje-sub-nav__label { text-decoration: none; }\n.lintje-sub-nav__link.is-ancestor { color: var(--color-text-primary); }\n\n.lintje-sub-nav__link.is-no-page,\n.lintje-sub-nav__link.is-no-access { color: var(--color-text-disabled); cursor: default; }\n.lintje-sub-nav__link.is-no-access { cursor: not-allowed; }\n.lintje-sub-nav__link.is-no-access .lintje-sub-nav__label { text-decoration: line-through; }\n\n/* Icon, lock and count stand on the first line of a label that wraps. */\n.lintje-sub-nav__icon { flex: none; margin-top: 2px; }\n.lintje-sub-nav__lock { flex: none; margin-top: var(--space-1); }\n.lintje-sub-nav__count { flex: none; }\n\n/* Below 768 px: one button with the reader's page, which opens the list in place. */\n.lintje-sub-nav__toggle {\n display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);\n width: 100%;\n min-height: var(--h-control);\n padding: var(--space-2) var(--space-3) var(--space-2) var(--space-4);\n border: 1px solid var(--color-border-field);\n background: var(--color-bg-surface);\n color: var(--color-text-primary);\n font: inherit;\n text-align: left;\n cursor: pointer;\n transition: background var(--dur-hover) var(--ease-in-motion);\n}\n.lintje-sub-nav__toggle:hover { background: var(--color-bg-subtle); }\n.lintje-sub-nav__toggle-text { display: flex; flex-direction: column; min-width: 0; }\n.lintje-sub-nav__toggle-group { font: var(--text-small); color: var(--color-text-muted); }\n.lintje-sub-nav__toggle-current { font-weight: 700; }\n.lintje-sub-nav__toggle-icon { flex: none; transition: transform var(--dur-hover) var(--ease-in-motion); }\n.lintje-sub-nav__toggle.is-open .lintje-sub-nav__toggle-icon { transform: rotate(180deg); }\n\n.lintje-sub-nav__panel {\n padding: var(--space-1) var(--space-6) var(--space-2);\n border: 1px solid var(--color-border-field);\n border-top: 0;\n background: var(--color-bg-surface);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .lintje-sub-nav__link,\n .lintje-sub-nav__toggle,\n .lintje-sub-nav__toggle-icon { transition: none; }\n}\n\n@media (forced-colors: active) {\n .lintje-sub-nav__link.is-current { text-decoration: underline; }\n .lintje-sub-nav__link.is-no-page,\n .lintje-sub-nav__link.is-no-access { color: GrayText; }\n}\n", h = (e) => !!e.active || !!e.items?.some(h);
|
|
4
4
|
function g(e) {
|
|
@@ -19,15 +19,15 @@ function g(e) {
|
|
|
19
19
|
}
|
|
20
20
|
return null;
|
|
21
21
|
}
|
|
22
|
-
var _ = 0, v = class extends
|
|
23
|
-
constructor(...
|
|
24
|
-
super(...
|
|
22
|
+
var _ = 0, v = class extends n {
|
|
23
|
+
constructor(...t) {
|
|
24
|
+
super(...t), this.groups = [], this.label = "Submenu", this.expanded = !1, this.open = !1, this.#e = new r(this, e), this.#t = `lintje-sub-nav-${++_}`;
|
|
25
25
|
}
|
|
26
26
|
static {
|
|
27
27
|
this.styles = [
|
|
28
|
-
e,
|
|
29
28
|
l,
|
|
30
|
-
|
|
29
|
+
s,
|
|
30
|
+
o(m)
|
|
31
31
|
];
|
|
32
32
|
}
|
|
33
33
|
static {
|
|
@@ -35,6 +35,7 @@ var _ = 0, v = class extends p {
|
|
|
35
35
|
groups: { attribute: !1 },
|
|
36
36
|
action: { attribute: !1 },
|
|
37
37
|
label: { type: String },
|
|
38
|
+
expanded: { type: Boolean },
|
|
38
39
|
open: { state: !0 }
|
|
39
40
|
};
|
|
40
41
|
}
|
|
@@ -42,10 +43,10 @@ var _ = 0, v = class extends p {
|
|
|
42
43
|
#t;
|
|
43
44
|
#n() {
|
|
44
45
|
let e = this.renderRoot.querySelector(".lintje-sub-nav__panel");
|
|
45
|
-
e &&
|
|
46
|
+
e && i(e) && this.renderRoot.querySelector(".lintje-sub-nav__toggle")?.focus(), this.open = !1;
|
|
46
47
|
}
|
|
47
|
-
follow(e,
|
|
48
|
-
|
|
48
|
+
follow(e, n) {
|
|
49
|
+
t(e) && (this.#n(), this.followLink(n, e));
|
|
49
50
|
}
|
|
50
51
|
act(e) {
|
|
51
52
|
this.#n(), this.emit("lintje-action", { value: e });
|
|
@@ -54,80 +55,80 @@ var _ = 0, v = class extends p {
|
|
|
54
55
|
e.key === "Escape" && this.open && (e.stopPropagation(), this.open = !1, this.renderRoot.querySelector(".lintje-sub-nav__toggle")?.focus());
|
|
55
56
|
}
|
|
56
57
|
renderItem(e) {
|
|
57
|
-
let t = e.items?.length && h(e) ? e.items : null,
|
|
58
|
+
let t = e.items?.length && (this.expanded || h(e)) ? e.items : null, n = !e.active && h(e), r = e.icon ? p(e.icon, {
|
|
58
59
|
size: 20,
|
|
59
60
|
className: "lintje-sub-nav__icon"
|
|
60
|
-
}) :
|
|
61
|
+
}) : c, i = e.badge ? d({
|
|
61
62
|
value: e.badge.value,
|
|
62
63
|
variant: "count",
|
|
63
64
|
label: e.badge.label,
|
|
64
65
|
className: "lintje-sub-nav__count"
|
|
65
|
-
}) :
|
|
66
|
+
}) : c, a = u`<span class="lintje-sub-nav__label">${e.label}</span>`, o;
|
|
66
67
|
if (e.noAccess || !e.href) {
|
|
67
|
-
let t =
|
|
68
|
+
let t = p("gebruiksvoorwerpen-hangslot-dicht", {
|
|
68
69
|
size: 16,
|
|
69
70
|
label: "Geen toegang",
|
|
70
71
|
className: "lintje-sub-nav__lock"
|
|
71
72
|
});
|
|
72
|
-
|
|
73
|
-
class=${
|
|
73
|
+
o = u`<span
|
|
74
|
+
class=${f({
|
|
74
75
|
"lintje-sub-nav__link": !0,
|
|
75
76
|
"is-no-access": !!e.noAccess,
|
|
76
77
|
"is-no-page": !e.noAccess
|
|
77
78
|
})}
|
|
78
79
|
aria-disabled="true"
|
|
79
|
-
>${
|
|
80
|
+
>${r}${a}${e.noAccess ? t === c ? u`<span>geen toegang</span>` : t : u`<span class="visually-hidden"> (niet beschikbaar)</span>`}</span
|
|
80
81
|
>`;
|
|
81
82
|
} else {
|
|
82
83
|
let t = e.href;
|
|
83
|
-
|
|
84
|
-
class=${
|
|
84
|
+
o = u`<a
|
|
85
|
+
class=${f({
|
|
85
86
|
"lintje-sub-nav__link": !0,
|
|
86
87
|
"focus-inset": !0,
|
|
87
88
|
"is-current": !!e.active,
|
|
88
|
-
"is-ancestor":
|
|
89
|
+
"is-ancestor": n
|
|
89
90
|
})}
|
|
90
91
|
href=${t}
|
|
91
|
-
aria-current=${e.active ? "page" :
|
|
92
|
+
aria-current=${e.active ? "page" : c}
|
|
92
93
|
@click=${(e) => this.follow(e, t)}
|
|
93
|
-
>${
|
|
94
|
+
>${r}${a}${i}</a
|
|
94
95
|
>`;
|
|
95
96
|
}
|
|
96
|
-
return
|
|
97
|
-
${
|
|
97
|
+
return u`<li>
|
|
98
|
+
${o}${t ? u`<ul class="lintje-sub-nav__list lintje-sub-nav__list--nested">
|
|
98
99
|
${t.map((e) => this.renderItem(e))}
|
|
99
|
-
</ul>` :
|
|
100
|
+
</ul>` : c}
|
|
100
101
|
</li>`;
|
|
101
102
|
}
|
|
102
103
|
renderGroups() {
|
|
103
104
|
let e = this.action;
|
|
104
|
-
return
|
|
105
|
-
let
|
|
106
|
-
return
|
|
107
|
-
${e.label ?
|
|
108
|
-
<ul class="lintje-sub-nav__list" aria-labelledby=${e.label ?
|
|
105
|
+
return u`${this.groups.map((e, t) => {
|
|
106
|
+
let n = `${this.#t}-g${t}`;
|
|
107
|
+
return u`<div class="lintje-sub-nav__group">
|
|
108
|
+
${e.label ? u`<p id=${n} class="lintje-sub-nav__heading">${e.label}</p>` : c}
|
|
109
|
+
<ul class="lintje-sub-nav__list" aria-labelledby=${e.label ? n : c}>
|
|
109
110
|
${e.items.map((e) => this.renderItem(e))}
|
|
110
111
|
</ul>
|
|
111
112
|
</div>`;
|
|
112
|
-
})}${e ?
|
|
113
|
+
})}${e ? u`<div class="lintje-sub-nav__group">
|
|
113
114
|
<button
|
|
114
115
|
type="button"
|
|
115
116
|
class="lintje-sub-nav__link lintje-sub-nav__link--action focus-inset"
|
|
116
117
|
@click=${() => this.act(e.value)}
|
|
117
118
|
>
|
|
118
|
-
${
|
|
119
|
+
${p(e.icon ?? "functioneel-plus", {
|
|
119
120
|
size: 20,
|
|
120
121
|
className: "lintje-sub-nav__icon"
|
|
121
122
|
})}<span class="lintje-sub-nav__label">${e.label}</span>
|
|
122
123
|
</button>
|
|
123
|
-
</div>` :
|
|
124
|
+
</div>` : c}`;
|
|
124
125
|
}
|
|
125
126
|
renderPhone() {
|
|
126
127
|
let e = g(this.groups), t = `${this.#t}-panel`;
|
|
127
|
-
return
|
|
128
|
+
return u`<nav class="lintje-sub-nav" aria-label=${this.label} @keydown=${this.onKeydown}>
|
|
128
129
|
<button
|
|
129
130
|
type="button"
|
|
130
|
-
class=${
|
|
131
|
+
class=${f({
|
|
131
132
|
"lintje-sub-nav__toggle": !0,
|
|
132
133
|
"is-open": this.open
|
|
133
134
|
})}
|
|
@@ -136,10 +137,10 @@ var _ = 0, v = class extends p {
|
|
|
136
137
|
@click=${() => this.open = !this.open}
|
|
137
138
|
>
|
|
138
139
|
<span class="lintje-sub-nav__toggle-text">
|
|
139
|
-
${e?.group ?
|
|
140
|
+
${e?.group ? u`<span class="lintje-sub-nav__toggle-group">${e.group}</span>` : c}
|
|
140
141
|
<span class="lintje-sub-nav__toggle-current">${e?.item.label ?? this.label}</span>
|
|
141
142
|
</span>
|
|
142
|
-
${
|
|
143
|
+
${p("functioneel-delta-omlaag", {
|
|
143
144
|
size: 24,
|
|
144
145
|
className: "lintje-sub-nav__toggle-icon"
|
|
145
146
|
})}
|
|
@@ -148,9 +149,9 @@ var _ = 0, v = class extends p {
|
|
|
148
149
|
</nav>`;
|
|
149
150
|
}
|
|
150
151
|
render() {
|
|
151
|
-
return !this.groups.length && !this.action ?
|
|
152
|
+
return !this.groups.length && !this.action ? c : this.#e.matches ? this.renderPhone() : u`<nav class="lintje-sub-nav" aria-label=${this.label}>${this.renderGroups()}</nav>`;
|
|
152
153
|
}
|
|
153
154
|
};
|
|
154
|
-
|
|
155
|
+
a("lintje-sub-nav", v);
|
|
155
156
|
//#endregion
|
|
156
157
|
export { v as LintjeSubNav, g as activeEntry };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { H as e, Jt as t, Yt as n, Zt as r, en as i, lt as a, nn as o, st as s, ut as c } from "../chunks/base-DRGvkF-r.js";
|
|
2
2
|
//#region src/components/layout/tabs/tabs.css?inline
|
|
3
|
-
var l = ":host { display: block; min-width: 0; }\n:host([hidden]) { display: none; }\n\n/* ------------------------------------------------------------------------ */\n\n/* `position: relative` makes the row the tabs' offset parent, for scrolling the chosen tab into sight. */\n.lintje-tabs__list {\n position: relative;\n display: flex; flex-wrap: wrap;\n border-bottom: 1px solid var(--color-border-heavy);\n}\n\n/* A transparent bottom edge in reserve, so the chosen tab's line takes no space of its own. */\n.lintje-tabs__tab {\n display: inline-flex; align-items: center; gap: var(--space-2);\n height: var(--h-touch);\n padding: 0 var(--space-4);\n background: transparent;\n color: var(--color-text-primary);\n border-bottom: 3px solid transparent;\n font: var(--text-ui);\n text-decoration: none;\n white-space: nowrap;\n transition: background var(--dur-hover) var(--ease-in-motion),\n border-color var(--dur-hover) var(--ease-in-motion);\n}\n.lintje-tabs__tab:hover:not(.is-active):not(.is-disabled) {\n background: var(--color-bg-subtle);\n border-bottom-color: var(--color-border-heavy);\n}\n\n/* The chosen tab: the line is a line (3:1) and the word is text (4.5:1), hence two tokens. */\n.lintje-tabs__tab.is-active {\n border-bottom-color: var(--color-accent-line);\n color: var(--color-accent-text);\n font-weight: 700;\n}\n\n.lintje-tabs__tab.is-disabled { color: var(--color-text-disabled); cursor: not-allowed; }\n\n.lintje-tabs__panel { padding-top: var(--space-4); }\n.lintje-tabs__panel.is-pressed:focus-visible { outline: none; }\n\n@media (max-width: 767px) {\n .lintje-tabs__list {\n flex-wrap: nowrap;\n overflow-x: auto;\n scrollbar-width: none;\n }\n .lintje-tabs__list::-webkit-scrollbar { display: none; }\n .lintje-tabs__tab { flex: 0 0 auto; }\n .lintje-tabs__list.is-scroll-start { box-shadow: var(--shadow-scroll-start); }\n .lintje-tabs__list.is-scroll-end { box-shadow: var(--shadow-scroll-end); }\n .lintje-tabs__list.is-scroll-start.is-scroll-end {\n box-shadow: var(--shadow-scroll-start), var(--shadow-scroll-end);\n }\n}\n\n/* Forced colours: the chosen tab's line turns Highlight, a disabled tab GrayText. */\n@media (forced-colors: active) {\n .lintje-tabs__tab.is-active { border-bottom-color: Highlight; }\n .lintje-tabs__tab.is-disabled { color: GrayText; }\n}\n\n/* --- The panel variant --------------------------------------------------------\n Large tabs that head a bordered panel. The chosen tab is the panel's own surface and runs into\n it; the others stand on the subtle fill. No line: surface, accent word and weight say it. */\n.lintje-tabs--panel {\n background: var(--color-bg-surface);\n border: 1px solid var(--color-border-default);\n}\n.lintje-tabs--panel .lintje-tabs__list {\n flex-wrap: nowrap;\n background: var(--color-bg-subtle);\n border-bottom-color: var(--color-border-default);\n}\n.lintje-tabs--panel .lintje-tabs__tab {\n flex: 1 1 0;\n min-width: 0;\n height: auto;\n min-height: var(--h-touch);\n margin-bottom: -1px;\n align-items: flex-start;\n gap: var(--space-3);\n padding: var(--space-4) var(--space-5);\n border-right: 1px solid var(--color-border-default);\n border-bottom: 1px solid var(--color-border-default);\n white-space: normal;\n text-align: left;\n}\n.lintje-tabs--panel .lintje-tabs__tab:last-child { border-right: 0; }\n.lintje-tabs--panel .lintje-tabs__tab:hover:not(.is-active):not(.is-disabled) {\n background: var(--color-bg-subtle);\n border-bottom-color: var(--color-border-default);\n}\n.lintje-tabs--panel .lintje-tabs__tab:hover:not(.is-active):not(.is-disabled) .lintje-tabs__label {\n text-decoration: underline;\n}\n/* The bottom edge takes the surface, so the tab and the panel are one shape. */\n.lintje-tabs--panel .lintje-tabs__tab.is-active {\n background: var(--color-bg-surface);\n border-bottom-color: var(--color-bg-surface);\n color: var(--color-accent-text);\n}\n.lintje-tabs__icon { flex: none; }\n.lintje-tabs__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }\n.lintje-tabs__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); }\n.lintje-tabs__hint { font: var(--text-meta); color: var(--color-text-muted); }\n.lintje-tabs--panel .lintje-tabs__panel { padding: var(--space-6); }\n\n@media (max-width: 767px) {\n .lintje-tabs--panel .lintje-tabs__tab {\n flex-direction: column;\n align-items: center;\n gap: var(--space-2);\n padding: var(--space-3) var(--space-2);\n text-align: center;\n }\n .lintje-tabs--panel .lintje-tabs__text { align-items: center; }\n .lintje-tabs--panel .lintje-tabs__head { justify-content: center; }\n .lintje-tabs--panel .lintje-tabs__hint { display: none; }\n .lintje-tabs--panel .lintje-tabs__panel { padding: var(--space-4); }\n}\n\n/* Forced colours drop the surface: the chosen tab's label is underlined instead. */\n@media (forced-colors: active) {\n .lintje-tabs--panel .lintje-tabs__tab.is-active .lintje-tabs__label { text-decoration: underline; }\n}\n";
|
|
3
|
+
var l = ":host { display: block; min-width: 0; }\n:host([hidden]) { display: none; }\n\n/* ------------------------------------------------------------------------ */\n\n/* `position: relative` makes the row the tabs' offset parent, for scrolling the chosen tab into sight. */\n.lintje-tabs__list {\n position: relative;\n display: flex; flex-wrap: wrap;\n border-bottom: 1px solid var(--color-border-heavy);\n}\n\n/* A transparent bottom edge in reserve, so the chosen tab's line takes no space of its own. */\n.lintje-tabs__tab {\n display: inline-flex; align-items: center; gap: var(--space-2);\n height: var(--h-touch);\n padding: 0 var(--space-4);\n background: transparent;\n color: var(--color-text-primary);\n border-bottom: 3px solid transparent;\n font: var(--text-ui);\n text-decoration: none;\n white-space: nowrap;\n transition: background var(--dur-hover) var(--ease-in-motion),\n border-color var(--dur-hover) var(--ease-in-motion);\n}\n.lintje-tabs__tab:hover:not(.is-active):not(.is-disabled) {\n background: var(--color-bg-subtle);\n border-bottom-color: var(--color-border-heavy);\n}\n\n/* The chosen tab: the line is a line (3:1) and the word is text (4.5:1), hence two tokens. */\n.lintje-tabs__tab.is-active {\n border-bottom-color: var(--color-accent-line);\n color: var(--color-accent-text);\n font-weight: 700;\n}\n\n.lintje-tabs__tab.is-disabled { color: var(--color-text-disabled); cursor: not-allowed; }\n\n.lintje-tabs__panel { padding-top: var(--space-4); }\n.lintje-tabs__panel.is-pressed:focus-visible { outline: none; }\n\n@media screen and (max-width: 767px) {\n .lintje-tabs__list {\n flex-wrap: nowrap;\n overflow-x: auto;\n scrollbar-width: none;\n }\n .lintje-tabs__list::-webkit-scrollbar { display: none; }\n .lintje-tabs__tab { flex: 0 0 auto; }\n .lintje-tabs__list.is-scroll-start { box-shadow: var(--shadow-scroll-start); }\n .lintje-tabs__list.is-scroll-end { box-shadow: var(--shadow-scroll-end); }\n .lintje-tabs__list.is-scroll-start.is-scroll-end {\n box-shadow: var(--shadow-scroll-start), var(--shadow-scroll-end);\n }\n}\n\n/* Forced colours: the chosen tab's line turns Highlight, a disabled tab GrayText. */\n@media (forced-colors: active) {\n .lintje-tabs__tab.is-active { border-bottom-color: Highlight; }\n .lintje-tabs__tab.is-disabled { color: GrayText; }\n}\n\n/* --- The panel variant --------------------------------------------------------\n Large tabs that head a bordered panel. The chosen tab is the panel's own surface and runs into\n it; the others stand on the subtle fill. No line: surface, accent word and weight say it. */\n.lintje-tabs--panel {\n background: var(--color-bg-surface);\n border: 1px solid var(--color-border-default);\n}\n.lintje-tabs--panel .lintje-tabs__list {\n flex-wrap: nowrap;\n background: var(--color-bg-subtle);\n border-bottom-color: var(--color-border-default);\n}\n.lintje-tabs--panel .lintje-tabs__tab {\n flex: 1 1 0;\n min-width: 0;\n height: auto;\n min-height: var(--h-touch);\n margin-bottom: -1px;\n align-items: flex-start;\n gap: var(--space-3);\n padding: var(--space-4) var(--space-5);\n border-right: 1px solid var(--color-border-default);\n border-bottom: 1px solid var(--color-border-default);\n white-space: normal;\n text-align: left;\n}\n.lintje-tabs--panel .lintje-tabs__tab:last-child { border-right: 0; }\n.lintje-tabs--panel .lintje-tabs__tab:hover:not(.is-active):not(.is-disabled) {\n background: var(--color-bg-subtle);\n border-bottom-color: var(--color-border-default);\n}\n.lintje-tabs--panel .lintje-tabs__tab:hover:not(.is-active):not(.is-disabled) .lintje-tabs__label {\n text-decoration: underline;\n}\n/* The bottom edge takes the surface, so the tab and the panel are one shape. */\n.lintje-tabs--panel .lintje-tabs__tab.is-active {\n background: var(--color-bg-surface);\n border-bottom-color: var(--color-bg-surface);\n color: var(--color-accent-text);\n}\n.lintje-tabs__icon { flex: none; }\n.lintje-tabs__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }\n.lintje-tabs__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); }\n.lintje-tabs__hint { font: var(--text-meta); color: var(--color-text-muted); }\n.lintje-tabs--panel .lintje-tabs__panel { padding: var(--space-6); }\n\n@media screen and (max-width: 767px) {\n .lintje-tabs--panel .lintje-tabs__tab {\n flex-direction: column;\n align-items: center;\n gap: var(--space-2);\n padding: var(--space-3) var(--space-2);\n text-align: center;\n }\n .lintje-tabs--panel .lintje-tabs__text { align-items: center; }\n .lintje-tabs--panel .lintje-tabs__head { justify-content: center; }\n .lintje-tabs--panel .lintje-tabs__hint { display: none; }\n .lintje-tabs--panel .lintje-tabs__panel { padding: var(--space-4); }\n}\n\n/* Forced colours drop the surface: the chosen tab's label is underlined instead. */\n@media (forced-colors: active) {\n .lintje-tabs--panel .lintje-tabs__tab.is-active .lintje-tabs__label { text-decoration: underline; }\n}\n";
|
|
4
4
|
//#endregion
|
|
5
5
|
//#region src/components/layout/tabs/tabs.ts
|
|
6
6
|
function u(e, t, n) {
|
|
@@ -12,7 +12,7 @@ function u(e, t, n) {
|
|
|
12
12
|
function d(e, t, n, r) {
|
|
13
13
|
return e < n ? e : e + t > n + r ? e + t - r : n;
|
|
14
14
|
}
|
|
15
|
-
var f = class extends
|
|
15
|
+
var f = class extends t {
|
|
16
16
|
constructor(...e) {
|
|
17
17
|
super(...e), this.tabs = [], this.label = "", this.variant = "line", this.edges = {
|
|
18
18
|
start: !1,
|
|
@@ -20,7 +20,7 @@ var f = class extends c {
|
|
|
20
20
|
}, this.#e = null, this.#t = !1;
|
|
21
21
|
}
|
|
22
22
|
static {
|
|
23
|
-
this.styles = [
|
|
23
|
+
this.styles = [a, r(l)];
|
|
24
24
|
}
|
|
25
25
|
static {
|
|
26
26
|
this.properties = {
|
|
@@ -59,9 +59,9 @@ var f = class extends c {
|
|
|
59
59
|
let n = this.tabs[e];
|
|
60
60
|
n && !n.disabled && (this.emit("lintje-tab-change", n.value), n.href && this.followLink(n.href, t));
|
|
61
61
|
}
|
|
62
|
-
onClick(
|
|
63
|
-
let
|
|
64
|
-
|
|
62
|
+
onClick(t, n) {
|
|
63
|
+
let r = this.tabs[n];
|
|
64
|
+
r && (!r.href || r.disabled || e(t)) && this.choose(n, t);
|
|
65
65
|
}
|
|
66
66
|
onKeydown(e) {
|
|
67
67
|
let t = this.tabs.length;
|
|
@@ -84,73 +84,73 @@ var f = class extends c {
|
|
|
84
84
|
let t = this.list, n = this.tabElement(this.selectedIndex);
|
|
85
85
|
t && n && t.scrollWidth > t.clientWidth && (t.scrollLeft = d(n.offsetLeft, n.offsetWidth, t.scrollLeft, t.clientWidth)), this.measureEdges();
|
|
86
86
|
}
|
|
87
|
-
renderTab(e, t,
|
|
88
|
-
let
|
|
87
|
+
renderTab(e, t, n) {
|
|
88
|
+
let r = s({
|
|
89
89
|
"lintje-tabs__tab": !0,
|
|
90
90
|
"focus-inset": !0,
|
|
91
|
-
"is-active":
|
|
91
|
+
"is-active": n,
|
|
92
92
|
"is-disabled": !!e.disabled
|
|
93
|
-
}),
|
|
93
|
+
}), a = o`<span class="lintje-tabs__label">${e.label}</span>${typeof e.count == "number" ? o`<lintje-badge variant="count">${e.count}</lintje-badge>` : i}${e.badge ? o`<lintje-badge tone="info">${e.badge}</lintje-badge>` : i}`, l = this.variant === "panel" ? o`${e.icon ? c(e.icon, {
|
|
94
94
|
size: 24,
|
|
95
95
|
className: "lintje-tabs__icon"
|
|
96
|
-
}) :
|
|
96
|
+
}) : i}<span
|
|
97
97
|
class="lintje-tabs__text"
|
|
98
|
-
><span class="lintje-tabs__head">${
|
|
99
|
-
>` :
|
|
100
|
-
return this.isNav ? e.disabled ?
|
|
98
|
+
><span class="lintje-tabs__head">${a}</span>${e.hint ? o`<span class="lintje-tabs__hint">${e.hint}</span>` : i}</span
|
|
99
|
+
>` : a;
|
|
100
|
+
return this.isNav ? e.disabled ? o`<a id="tab-${t}" class=${r} role="link" aria-disabled="true">${l}</a>` : o`<a
|
|
101
101
|
id="tab-${t}"
|
|
102
|
-
class=${
|
|
102
|
+
class=${r}
|
|
103
103
|
href=${e.href}
|
|
104
|
-
aria-current=${
|
|
104
|
+
aria-current=${n ? "page" : i}
|
|
105
105
|
@click=${(e) => this.onClick(e, t)}
|
|
106
106
|
>${l}</a
|
|
107
|
-
>` : e.href && !e.disabled ?
|
|
107
|
+
>` : e.href && !e.disabled ? o`<a
|
|
108
108
|
id="tab-${t}"
|
|
109
|
-
class=${
|
|
109
|
+
class=${r}
|
|
110
110
|
role="tab"
|
|
111
111
|
href=${e.href}
|
|
112
|
-
aria-selected=${String(
|
|
112
|
+
aria-selected=${String(n)}
|
|
113
113
|
aria-controls="panel-${t}"
|
|
114
|
-
tabindex=${
|
|
114
|
+
tabindex=${n ? 0 : -1}
|
|
115
115
|
@click=${(e) => this.onClick(e, t)}
|
|
116
116
|
>${l}</a
|
|
117
|
-
>` :
|
|
117
|
+
>` : o`<button
|
|
118
118
|
id="tab-${t}"
|
|
119
119
|
type="button"
|
|
120
|
-
class=${
|
|
120
|
+
class=${r}
|
|
121
121
|
role="tab"
|
|
122
|
-
aria-selected=${String(
|
|
122
|
+
aria-selected=${String(n)}
|
|
123
123
|
aria-controls="panel-${t}"
|
|
124
|
-
aria-disabled=${e.disabled ? "true" :
|
|
125
|
-
tabindex=${
|
|
124
|
+
aria-disabled=${e.disabled ? "true" : i}
|
|
125
|
+
tabindex=${n ? 0 : -1}
|
|
126
126
|
@click=${(e) => this.onClick(e, t)}
|
|
127
127
|
>
|
|
128
128
|
${l}
|
|
129
129
|
</button>`;
|
|
130
130
|
}
|
|
131
131
|
render() {
|
|
132
|
-
let e = this.selectedIndex, t = this.isNav,
|
|
133
|
-
class=${
|
|
132
|
+
let e = this.selectedIndex, t = this.isNav, n = o`<div
|
|
133
|
+
class=${s({
|
|
134
134
|
"lintje-tabs__list": !0,
|
|
135
135
|
"is-scroll-start": this.edges.start,
|
|
136
136
|
"is-scroll-end": this.edges.end
|
|
137
137
|
})}
|
|
138
|
-
role=${t ?
|
|
139
|
-
aria-label=${t ?
|
|
140
|
-
@keydown=${t ?
|
|
138
|
+
role=${t ? i : "tablist"}
|
|
139
|
+
aria-label=${t ? i : this.label || i}
|
|
140
|
+
@keydown=${t ? i : this.onKeydown}
|
|
141
141
|
@scroll=${this.measureEdges}
|
|
142
142
|
>
|
|
143
143
|
${this.tabs.map((t, n) => this.renderTab(t, n, n === e))}
|
|
144
|
-
</div>`,
|
|
144
|
+
</div>`, r = s({
|
|
145
145
|
"lintje-tabs": !0,
|
|
146
146
|
"lintje-tabs--panel": this.variant === "panel"
|
|
147
147
|
});
|
|
148
|
-
return t ?
|
|
149
|
-
<nav aria-label=${this.label ||
|
|
148
|
+
return t ? o`<div class=${r}>
|
|
149
|
+
<nav aria-label=${this.label || i}>${n}</nav>
|
|
150
150
|
<div class="lintje-tabs__panel"><slot name=${this.tabs[e].value}></slot></div>
|
|
151
|
-
</div>` :
|
|
152
|
-
${
|
|
153
|
-
${this.tabs.map((t, n) =>
|
|
151
|
+
</div>` : o`<div class=${r}>
|
|
152
|
+
${n}
|
|
153
|
+
${this.tabs.map((t, n) => o`<div
|
|
154
154
|
id="panel-${n}"
|
|
155
155
|
class="lintje-tabs__panel"
|
|
156
156
|
role="tabpanel"
|
|
@@ -167,6 +167,6 @@ var f = class extends c {
|
|
|
167
167
|
</div>`;
|
|
168
168
|
}
|
|
169
169
|
};
|
|
170
|
-
|
|
170
|
+
n("lintje-tabs", f);
|
|
171
171
|
//#endregion
|
|
172
172
|
export { f as LintjeTabs, u as scrollEdges, d as scrollToShow };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Yt as e, Zt as t, en as n, lt as r, nn as i, s as a, st as o, ut as s } from "../chunks/base-DRGvkF-r.js";
|
|
2
|
+
import { n as c } from "../chunks/input-BGMLam-O.js";
|
|
3
|
+
import { t as l } from "../chunks/input-lQTmOMOz.js";
|
|
3
4
|
import { filterOptions as u, splitMatch as d } from "./combobox.js";
|
|
4
5
|
//#region src/components/inputs/tag-input/tag-input.css?inline
|
|
5
|
-
var f = "/* The keyword field: chips and the typing part in one box that grows in height. */\n:host { display: block; min-width: 0; }\n:host([hidden]) { display: none; }\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 padding centres a chip in the control height; wrapped chips grow the box. */\n.lintje-tag-input {\n display: flex; flex-wrap: wrap; align-items: center;\n gap: 6px;\n min-height: var(--h-control);\n padding: calc((var(--h-control) - var(--h-chip-field)) / 2 - 1px) var(--space-2);\n border: 1px solid var(--color-border-field);\n border-radius: var(--radius);\n background: var(--color-bg-surface);\n color: var(--color-text-primary);\n}\n/* The ring is around the whole field; a chip draws it around itself when its cross has the focus. */\n.lintje-tag-input:has(.lintje-tag-input__input:focus-visible),\n.lintje-tag-input__chip:has(.lintje-tag-input__remove:focus-visible) {\n outline: var(--focus-width) solid var(--color-focus);\n outline-offset: var(--focus-offset);\n}\n.lintje-tag-input__input:focus-visible,\n.lintje-tag-input__remove:focus-visible { outline: none; }\n/* The padding gives back the pixel the 2 px error border takes. */\n.lintje-tag-input.is-error {\n border: 2px solid var(--color-error);\n padding: calc((var(--h-control) - var(--h-chip-field)) / 2 - 2px) calc(var(--space-2) - 1px);\n}\n/* Disabled wins over error: placed after it. */\n.lintje-tag-input.is-disabled {\n border: 1px solid var(--color-border-strong);\n padding: calc((var(--h-control) - var(--h-chip-field)) / 2 - 1px) var(--space-2);\n background: var(--color-bg-subtle);\n cursor: not-allowed;\n}\n\n.lintje-tag-input__chips { display: contents; }\n.lintje-tag-input__item { display: flex; min-width: 0; }\n.lintje-tag-input__chip {\n display: inline-flex; align-items: center;\n min-width: 0;\n height: var(--h-chip-field);\n padding: 0 0 0 var(--space-2);\n background: var(--color-bg-subtle);\n border: 1px solid var(--color-border-default);\n font-size: 0.875rem; white-space: nowrap;\n}\n.lintje-tag-input.is-disabled .lintje-tag-input__chip { padding-right: var(--space-2); }\n/* A word typed twice flashes its chip. */\n.lintje-tag-input__chip.is-flash { border-color: var(--color-accent-line); }\n.lintje-tag-input.is-disabled .lintje-tag-input__chip { color: var(--color-text-disabled); }\n/* A transparent hit area, above and below only, reaches the target height. */\n.lintje-tag-input__remove {\n position: relative;\n flex: none;\n width: var(--space-6); align-self: stretch;\n display: inline-flex; align-items: center; justify-content: center;\n color: var(--color-text-muted);\n}\n.lintje-tag-input__remove:hover { color: var(--color-text-primary); }\n.lintje-tag-input__remove::after {\n content: '';\n position: absolute;\n inset: min(0px, calc((var(--h-chip-field) - var(--h-target)) / 2)) 0;\n}\n\n.lintje-tag-input__input {\n flex: 1 1 60px; min-width: 0;\n height: var(--h-chip-field);\n padding: 0 var(--space-1);\n border: 0;\n background: none;\n color: inherit;\n font-size: 1rem;\n}\n.lintje-tag-input__input::placeholder { color: var(--color-text-placeholder); opacity: 1; }\n.lintje-tag-input__input:disabled { cursor: not-allowed; }\n\n.lintje-tag-input__list {\n max-height: calc(7 * var(--h-option) + var(--space-2));\n overflow-y: auto;\n padding: var(--space-1) 0;\n font: var(--text-ui);\n}\n.lintje-tag-input__option {\n display: flex; align-items: center;\n min-height: var(--h-option);\n padding: 0 14px;\n cursor: pointer;\n}\n.lintje-tag-input__option:hover,\n.lintje-tag-input__option.is-active { background: var(--color-bg-subtle); }\n/* The option the keys stand on: the fill alone is about 1.1:1, so the focus ring inside the row. */\n.lintje-tag-input__option.is-active {\n outline: var(--focus-width) solid var(--color-focus);\n outline-offset: calc(var(--focus-width) * -1);\n}\n\n/* Forced colours drop the fill: the row takes an edge inside, keeping its size. */\n@media (forced-colors: active) {\n .lintje-tag-input__option.is-active { outline: 1px solid CanvasText; outline-offset: -1px; }\n}\n";
|
|
6
|
+
var f = "/* The keyword field: chips and the typing part in one box that grows in height. */\n:host { display: block; min-width: 0; }\n:host([hidden]) { display: none; }\n/* Below 768 px: the touch height and the full width, as `stacked`. */\n@media screen and (max-width: 767px) {\n :host {\n width: 100%;\n --h-control: var(--h-touch);\n }\n}\n\n/* --- */\n\n/* The padding centres a chip in the control height; wrapped chips grow the box. */\n.lintje-tag-input {\n display: flex; flex-wrap: wrap; align-items: center;\n gap: 6px;\n min-height: var(--h-control);\n padding: calc((var(--h-control) - var(--h-chip-field)) / 2 - 1px) var(--space-2);\n border: 1px solid var(--color-border-field);\n border-radius: var(--radius);\n background: var(--color-bg-surface);\n color: var(--color-text-primary);\n}\n/* The ring is around the whole field; a chip draws it around itself when its cross has the focus. */\n.lintje-tag-input:has(.lintje-tag-input__input:focus-visible),\n.lintje-tag-input__chip:has(.lintje-tag-input__remove:focus-visible) {\n outline: var(--focus-width) solid var(--color-focus);\n outline-offset: var(--focus-offset);\n}\n.lintje-tag-input__input:focus-visible,\n.lintje-tag-input__remove:focus-visible { outline: none; }\n/* The padding gives back the pixel the 2 px error border takes. */\n.lintje-tag-input.is-error {\n border: 2px solid var(--color-error);\n padding: calc((var(--h-control) - var(--h-chip-field)) / 2 - 2px) calc(var(--space-2) - 1px);\n}\n/* Disabled wins over error: placed after it. */\n.lintje-tag-input.is-disabled {\n border: 1px solid var(--color-border-strong);\n padding: calc((var(--h-control) - var(--h-chip-field)) / 2 - 1px) var(--space-2);\n background: var(--color-bg-subtle);\n cursor: not-allowed;\n}\n\n.lintje-tag-input__chips { display: contents; }\n.lintje-tag-input__item { display: flex; min-width: 0; }\n.lintje-tag-input__chip {\n display: inline-flex; align-items: center;\n min-width: 0;\n height: var(--h-chip-field);\n padding: 0 0 0 var(--space-2);\n background: var(--color-bg-subtle);\n border: 1px solid var(--color-border-default);\n font-size: 0.875rem; white-space: nowrap;\n}\n.lintje-tag-input.is-disabled .lintje-tag-input__chip { padding-right: var(--space-2); }\n/* A word typed twice flashes its chip. */\n.lintje-tag-input__chip.is-flash { border-color: var(--color-accent-line); }\n.lintje-tag-input.is-disabled .lintje-tag-input__chip { color: var(--color-text-disabled); }\n/* A transparent hit area, above and below only, reaches the target height. */\n.lintje-tag-input__remove {\n position: relative;\n flex: none;\n width: var(--space-6); align-self: stretch;\n display: inline-flex; align-items: center; justify-content: center;\n color: var(--color-text-muted);\n}\n.lintje-tag-input__remove:hover { color: var(--color-text-primary); }\n.lintje-tag-input__remove::after {\n content: '';\n position: absolute;\n inset: min(0px, calc((var(--h-chip-field) - var(--h-target)) / 2)) 0;\n}\n\n.lintje-tag-input__input {\n flex: 1 1 60px; min-width: 0;\n height: var(--h-chip-field);\n padding: 0 var(--space-1);\n border: 0;\n background: none;\n color: inherit;\n font-size: 1rem;\n}\n.lintje-tag-input__input::placeholder { color: var(--color-text-placeholder); opacity: 1; }\n.lintje-tag-input__input:disabled { cursor: not-allowed; }\n\n.lintje-tag-input__list {\n max-height: calc(7 * var(--h-option) + var(--space-2));\n overflow-y: auto;\n padding: var(--space-1) 0;\n font: var(--text-ui);\n}\n.lintje-tag-input__option {\n display: flex; align-items: center;\n min-height: var(--h-option);\n padding: 0 14px;\n cursor: pointer;\n}\n.lintje-tag-input__option:hover,\n.lintje-tag-input__option.is-active { background: var(--color-bg-subtle); }\n/* The option the keys stand on: the fill alone is about 1.1:1, so the focus ring inside the row. */\n.lintje-tag-input__option.is-active {\n outline: var(--focus-width) solid var(--color-focus);\n outline-offset: calc(var(--focus-width) * -1);\n}\n\n/* Forced colours drop the fill: the row takes an edge inside, keeping its size. */\n@media (forced-colors: active) {\n .lintje-tag-input__option.is-active { outline: 1px solid CanvasText; outline-offset: -1px; }\n}\n";
|
|
6
7
|
//#endregion
|
|
7
8
|
//#region src/components/inputs/tag-input/tag-input.ts
|
|
8
9
|
function p(e) {
|
|
@@ -26,9 +27,9 @@ var h = 1e3, g = "lintje-tag-input-list", _ = "lintje-tag-input-keys", v = (e) =
|
|
|
26
27
|
}
|
|
27
28
|
static {
|
|
28
29
|
this.styles = [
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
r,
|
|
31
|
+
t(l),
|
|
32
|
+
t(f)
|
|
32
33
|
];
|
|
33
34
|
}
|
|
34
35
|
static {
|
|
@@ -155,12 +156,12 @@ var h = 1e3, g = "lintje-tag-input-list", _ = "lintje-tag-input-keys", v = (e) =
|
|
|
155
156
|
}
|
|
156
157
|
renderChip(e, t) {
|
|
157
158
|
let r = this.labelOf(e);
|
|
158
|
-
return
|
|
159
|
-
<span class=${
|
|
159
|
+
return i`<li class="lintje-tag-input__item">
|
|
160
|
+
<span class=${o({
|
|
160
161
|
"lintje-tag-input__chip": !0,
|
|
161
162
|
"is-flash": this.flash === e
|
|
162
163
|
})}
|
|
163
|
-
>${r}${this.disabled ? n :
|
|
164
|
+
>${r}${this.disabled ? n : i`<button
|
|
164
165
|
type="button"
|
|
165
166
|
class="lintje-tag-input__remove"
|
|
166
167
|
tabindex="-1"
|
|
@@ -169,13 +170,13 @@ var h = 1e3, g = "lintje-tag-input-list", _ = "lintje-tag-input-keys", v = (e) =
|
|
|
169
170
|
@keydown=${(e) => this.onChipKeydown(e, t)}
|
|
170
171
|
@click=${() => this.removeChip(t, "input")}
|
|
171
172
|
>
|
|
172
|
-
${
|
|
173
|
+
${s("functioneel-kruis", { size: 12 })}
|
|
173
174
|
</button>`}</span
|
|
174
175
|
>
|
|
175
176
|
</li>`;
|
|
176
177
|
}
|
|
177
178
|
renderSuggestions() {
|
|
178
|
-
return this.listOpen ?
|
|
179
|
+
return this.listOpen ? i`<ul
|
|
179
180
|
id=${g}
|
|
180
181
|
class="lintje-tag-input__list"
|
|
181
182
|
role="listbox"
|
|
@@ -183,10 +184,10 @@ var h = 1e3, g = "lintje-tag-input-list", _ = "lintje-tag-input-keys", v = (e) =
|
|
|
183
184
|
aria-labelledby=${this.labelId}
|
|
184
185
|
>
|
|
185
186
|
${this.suggestions.map((e, t) => {
|
|
186
|
-
let [r, a,
|
|
187
|
-
return
|
|
187
|
+
let [r, a, s] = d(e.label, this.text);
|
|
188
|
+
return i`<li
|
|
188
189
|
id=${v(t)}
|
|
189
|
-
class=${
|
|
190
|
+
class=${o({
|
|
190
191
|
"lintje-tag-input__option": !0,
|
|
191
192
|
"is-active": t === this.active
|
|
192
193
|
})}
|
|
@@ -194,17 +195,17 @@ var h = 1e3, g = "lintje-tag-input-list", _ = "lintje-tag-input-keys", v = (e) =
|
|
|
194
195
|
aria-selected="false"
|
|
195
196
|
@click=${() => this.add([e.label])}
|
|
196
197
|
>
|
|
197
|
-
${r}${a ?
|
|
198
|
+
${r}${a ? i`<strong>${a}</strong>` : n}${s}
|
|
198
199
|
</li>`;
|
|
199
200
|
})}
|
|
200
201
|
</ul>` : n;
|
|
201
202
|
}
|
|
202
203
|
render() {
|
|
203
204
|
let e = this.listOpen, t = !!this.options;
|
|
204
|
-
return
|
|
205
|
+
return i`<div class="lintje-field">
|
|
205
206
|
${this.renderLabel(this.controlId)}
|
|
206
207
|
<div
|
|
207
|
-
class=${
|
|
208
|
+
class=${o({
|
|
208
209
|
"lintje-tag-input": !0,
|
|
209
210
|
"is-error": !!this.error,
|
|
210
211
|
"is-disabled": this.disabled
|
|
@@ -219,7 +220,7 @@ var h = 1e3, g = "lintje-tag-input-list", _ = "lintje-tag-input-keys", v = (e) =
|
|
|
219
220
|
type="text"
|
|
220
221
|
id=${this.controlId}
|
|
221
222
|
class="lintje-tag-input__input"
|
|
222
|
-
.value=${
|
|
223
|
+
.value=${a(this.text)}
|
|
223
224
|
placeholder=${this.value.length ? n : this.placeholder || n}
|
|
224
225
|
autocomplete="off"
|
|
225
226
|
enterkeyhint="enter"
|
|
@@ -257,6 +258,6 @@ var h = 1e3, g = "lintje-tag-input-list", _ = "lintje-tag-input-keys", v = (e) =
|
|
|
257
258
|
</div>`;
|
|
258
259
|
}
|
|
259
260
|
};
|
|
260
|
-
|
|
261
|
+
e("lintje-tag-input", y);
|
|
261
262
|
//#endregion
|
|
262
263
|
export { y as LintjeTagInput, m as addWords, p as splitWords };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Yt as e, Zt as t, en as n, et as r, lt as i, nn as a, st as o } from "../chunks/base-DRGvkF-r.js";
|
|
2
|
+
import { n as s } from "../chunks/input-BGMLam-O.js";
|
|
3
|
+
import { t as c } from "../chunks/input-lQTmOMOz.js";
|
|
3
4
|
import { t as l } from "../chunks/prose-CmKVp5kL.js";
|
|
4
5
|
import "./text-input.js";
|
|
5
6
|
//#region src/components/inputs/text-editor/text-editor.css?inline
|
|
6
|
-
var u = "/* The text editor: a frame with the toolbar on top and the editing surface under it. */\n:host {\n display: block;\n min-width: 0;\n}\n:host([hidden]) { display: none; }\n\n/* --- */\n\n/* 1 px field border; with the focus in the surface the ring goes round the whole frame. */\n.lintje-text-editor {\n display: flex; flex-direction: column;\n min-width: 0;\n border: 1px solid var(--color-border-field);\n background: var(--color-bg-surface);\n}\n.lintje-text-editor:has(.lintje-text-editor__surface:focus-visible) {\n outline: var(--focus-width) solid var(--color-focus);\n outline-offset: var(--focus-offset);\n}\n.lintje-text-editor.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-text-editor.is-disabled { border: 1px solid var(--color-border-strong); }\n\n/* --- The toolbar --------------------------------------------------------- */\n/* The row gap keeps the buttons' hit areas from overlapping. */\n.lintje-text-editor__toolbar {\n display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-1);\n padding: var(--space-1);\n background: var(--color-bg-page);\n border-bottom: 1px solid var(--color-border-default);\n}\n/* A transparent hit area, above and below only, reaches the target height. */\n.lintje-text-editor__tool {\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 font-size: 1rem;\n transition: background var(--dur-hover) var(--ease-in-motion);\n}\n.lintje-text-editor__tool::after {\n content: '';\n position: absolute;\n inset: min(0px, calc((100% - var(--h-target)) / 2)) 0;\n}\n.lintje-text-editor__tool--bold,\n.lintje-text-editor__tool--heading { font-weight: 700; }\n.lintje-text-editor__tool--italic { font-style: italic; }\n/* The text fallback while an icon has no file. */\n.lintje-text-editor__tool--word {\n width: auto; min-width: var(--h-icon-button);\n padding: 0 var(--space-2);\n font-size: 0.875rem; font-weight: 700;\n}\n.lintje-text-editor__tool:hover:not(:disabled):not(.is-idle) { background: var(--color-bg-subtle); }\n/* The border keeps an edge in dark. */\n.lintje-text-editor__tool.is-pressed {\n background: var(--color-action-primary);\n color: var(--color-action-primary-text);\n border-color: var(--color-action-primary-border);\n}\n.lintje-text-editor__tool.is-pressed:hover:not(:disabled) { background: var(--color-action-primary); }\n.lintje-text-editor__tool.is-idle,\n.lintje-text-editor__tool:disabled { color: var(--color-text-disabled); cursor: not-allowed; }\n\n/* --- The surface --------------------------------------------------------- */\n.lintje-text-editor__surface {\n min-height: 132px;\n padding: var(--space-3);\n overflow-wrap: anywhere;\n}\n/* The ring is the frame's, not the surface's. */\n.lintje-text-editor__surface:focus-visible { outline: none; }\n.lintje-text-editor.is-disabled .lintje-text-editor__surface {\n background: var(--color-bg-subtle);\n color: var(--color-text-disabled);\n cursor: not-allowed;\n}\n/* The prose sheet colours its headings itself. */\n.lintje-text-editor.is-disabled .lintje-text-editor__surface * { color: inherit; }\n\n/* --- The link field ------------------------------------------------------ */\n.lintje-text-editor__link { width: 280px; max-width: 100%; padding: var(--space-4); }\n\n/* Below 768 px the toolbar scrolls sideways; at 48 px high the hit areas stay whole. */\n@media (max-width: 767px) {\n .lintje-text-editor__toolbar { flex-wrap: nowrap; overflow-x: auto; }\n}\n\n/* Forced colours drop the fill: the border turns Highlight, 2 px inside the fixed box. */\n@media (forced-colors: active) {\n .lintje-text-editor__tool.is-pressed { border: 2px solid Highlight; }\n}\n", d = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
7
|
+
var u = "/* The text editor: a frame with the toolbar on top and the editing surface under it. */\n:host {\n display: block;\n min-width: 0;\n}\n:host([hidden]) { display: none; }\n\n/* --- */\n\n/* 1 px field border; with the focus in the surface the ring goes round the whole frame. */\n.lintje-text-editor {\n display: flex; flex-direction: column;\n min-width: 0;\n border: 1px solid var(--color-border-field);\n background: var(--color-bg-surface);\n}\n.lintje-text-editor:has(.lintje-text-editor__surface:focus-visible) {\n outline: var(--focus-width) solid var(--color-focus);\n outline-offset: var(--focus-offset);\n}\n.lintje-text-editor.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-text-editor.is-disabled { border: 1px solid var(--color-border-strong); }\n\n/* --- The toolbar --------------------------------------------------------- */\n/* The row gap keeps the buttons' hit areas from overlapping. */\n.lintje-text-editor__toolbar {\n display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-1);\n padding: var(--space-1);\n background: var(--color-bg-page);\n border-bottom: 1px solid var(--color-border-default);\n}\n/* A transparent hit area, above and below only, reaches the target height. */\n.lintje-text-editor__tool {\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 font-size: 1rem;\n transition: background var(--dur-hover) var(--ease-in-motion);\n}\n.lintje-text-editor__tool::after {\n content: '';\n position: absolute;\n inset: min(0px, calc((100% - var(--h-target)) / 2)) 0;\n}\n.lintje-text-editor__tool--bold,\n.lintje-text-editor__tool--heading { font-weight: 700; }\n.lintje-text-editor__tool--italic { font-style: italic; }\n/* The text fallback while an icon has no file. */\n.lintje-text-editor__tool--word {\n width: auto; min-width: var(--h-icon-button);\n padding: 0 var(--space-2);\n font-size: 0.875rem; font-weight: 700;\n}\n.lintje-text-editor__tool:hover:not(:disabled):not(.is-idle) { background: var(--color-bg-subtle); }\n/* The border keeps an edge in dark. */\n.lintje-text-editor__tool.is-pressed {\n background: var(--color-action-primary);\n color: var(--color-action-primary-text);\n border-color: var(--color-action-primary-border);\n}\n.lintje-text-editor__tool.is-pressed:hover:not(:disabled) { background: var(--color-action-primary); }\n.lintje-text-editor__tool.is-idle,\n.lintje-text-editor__tool:disabled { color: var(--color-text-disabled); cursor: not-allowed; }\n\n/* --- The surface --------------------------------------------------------- */\n.lintje-text-editor__surface {\n min-height: 132px;\n padding: var(--space-3);\n overflow-wrap: anywhere;\n}\n/* The ring is the frame's, not the surface's. */\n.lintje-text-editor__surface:focus-visible { outline: none; }\n.lintje-text-editor.is-disabled .lintje-text-editor__surface {\n background: var(--color-bg-subtle);\n color: var(--color-text-disabled);\n cursor: not-allowed;\n}\n/* The prose sheet colours its headings itself. */\n.lintje-text-editor.is-disabled .lintje-text-editor__surface * { color: inherit; }\n\n/* --- The link field ------------------------------------------------------ */\n.lintje-text-editor__link { width: 280px; max-width: 100%; padding: var(--space-4); }\n\n/* Below 768 px the toolbar scrolls sideways; at 48 px high the hit areas stay whole. */\n@media screen and (max-width: 767px) {\n .lintje-text-editor__toolbar { flex-wrap: nowrap; overflow-x: auto; }\n}\n\n/* Forced colours drop the fill: the border turns Highlight, 2 px inside the fixed box. */\n@media (forced-colors: active) {\n .lintje-text-editor__tool.is-pressed { border: 2px solid Highlight; }\n}\n", d = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
7
8
|
function f(e) {
|
|
8
9
|
let t = (e ?? "").replace(/\p{Cc}/gu, "").trim();
|
|
9
10
|
if (!t) return null;
|
|
@@ -225,10 +226,10 @@ var z = class extends s {
|
|
|
225
226
|
}
|
|
226
227
|
static {
|
|
227
228
|
this.styles = [
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
229
|
+
i,
|
|
230
|
+
t(c),
|
|
231
|
+
t(l),
|
|
232
|
+
t(u)
|
|
232
233
|
];
|
|
233
234
|
}
|
|
234
235
|
static {
|
|
@@ -320,8 +321,8 @@ var z = class extends s {
|
|
|
320
321
|
e.key === "Enter" && !e.isComposing && e.preventDefault();
|
|
321
322
|
}
|
|
322
323
|
onLinkFocusOut(e) {
|
|
323
|
-
let t = e.relatedTarget,
|
|
324
|
-
this.linkOpen && t && !
|
|
324
|
+
let t = e.relatedTarget, n = e.currentTarget;
|
|
325
|
+
this.linkOpen && t && !r(t, n) && !r(this, t) && (this.linkOpen = !1);
|
|
325
326
|
}
|
|
326
327
|
onLinkClose(e) {
|
|
327
328
|
e.stopPropagation(), this.linkOpen = !1, this.restore();
|
|
@@ -354,20 +355,20 @@ var z = class extends s {
|
|
|
354
355
|
}));
|
|
355
356
|
}
|
|
356
357
|
renderTool(e, t) {
|
|
357
|
-
let
|
|
358
|
-
return
|
|
358
|
+
let r = this.active.has(e.format), i = e.format === "link" && this.collapsed && !r;
|
|
359
|
+
return a`<button
|
|
359
360
|
type="button"
|
|
360
|
-
class=${
|
|
361
|
+
class=${o({
|
|
361
362
|
"lintje-text-editor__tool": !0,
|
|
362
363
|
[`lintje-text-editor__tool--${e.format}`]: !0,
|
|
363
364
|
"lintje-text-editor__tool--word": e.text.length > 1,
|
|
364
|
-
"is-pressed":
|
|
365
|
+
"is-pressed": r,
|
|
365
366
|
"is-idle": i
|
|
366
367
|
})}
|
|
367
368
|
tabindex=${t === this.toolIndex ? "0" : "-1"}
|
|
368
369
|
aria-label=${e.label}
|
|
369
|
-
aria-pressed=${
|
|
370
|
-
aria-disabled=${i ? "true" :
|
|
370
|
+
aria-pressed=${r ? "true" : "false"}
|
|
371
|
+
aria-disabled=${i ? "true" : n}
|
|
371
372
|
?disabled=${this.disabled}
|
|
372
373
|
@mousedown=${(e) => e.preventDefault()}
|
|
373
374
|
@click=${() => {
|
|
@@ -378,10 +379,10 @@ var z = class extends s {
|
|
|
378
379
|
</button>`;
|
|
379
380
|
}
|
|
380
381
|
render() {
|
|
381
|
-
return
|
|
382
|
+
return a`<div class="lintje-field" @focusout=${this.onFocusOut}>
|
|
382
383
|
${this.renderLabel()}
|
|
383
384
|
<div
|
|
384
|
-
class=${
|
|
385
|
+
class=${o({
|
|
385
386
|
"lintje-text-editor": !0,
|
|
386
387
|
"is-error": !!this.error,
|
|
387
388
|
"is-disabled": this.disabled
|
|
@@ -403,16 +404,16 @@ var z = class extends s {
|
|
|
403
404
|
@lintje-close=${this.onLinkClose}
|
|
404
405
|
@focusout=${this.onLinkFocusOut}
|
|
405
406
|
>
|
|
406
|
-
${this.linkOpen ?
|
|
407
|
+
${this.linkOpen ? a`<div class="lintje-text-editor__link" @keydown=${this.onLinkKeydown}>
|
|
407
408
|
<lintje-text-input
|
|
408
409
|
class="lintje-text-editor__link-field"
|
|
409
410
|
label="Adres van de link"
|
|
410
411
|
placeholder="https://"
|
|
411
412
|
hint="Enter plaatst de link"
|
|
412
|
-
error=${this.linkError ||
|
|
413
|
+
error=${this.linkError || n}
|
|
413
414
|
@lintje-change=${this.onLinkChange}
|
|
414
415
|
></lintje-text-input>
|
|
415
|
-
</div>` :
|
|
416
|
+
</div>` : n}
|
|
416
417
|
</lintje-popover>
|
|
417
418
|
<div
|
|
418
419
|
id=${this.controlId}
|
|
@@ -421,9 +422,9 @@ var z = class extends s {
|
|
|
421
422
|
aria-multiline="true"
|
|
422
423
|
aria-labelledby=${this.labelId}
|
|
423
424
|
aria-describedby=${this.describedBy}
|
|
424
|
-
aria-invalid=${this.error ? "true" :
|
|
425
|
-
aria-required=${this.required ? "true" :
|
|
426
|
-
aria-disabled=${this.disabled ? "true" :
|
|
425
|
+
aria-invalid=${this.error ? "true" : n}
|
|
426
|
+
aria-required=${this.required ? "true" : n}
|
|
427
|
+
aria-disabled=${this.disabled ? "true" : n}
|
|
427
428
|
contenteditable=${this.disabled ? "false" : "true"}
|
|
428
429
|
tabindex=${this.disabled ? "-1" : "0"}
|
|
429
430
|
@keydown=${this.onSurfaceKeydown}
|
|
@@ -434,6 +435,6 @@ var z = class extends s {
|
|
|
434
435
|
</div>`;
|
|
435
436
|
}
|
|
436
437
|
};
|
|
437
|
-
|
|
438
|
+
e("lintje-text-editor", z);
|
|
438
439
|
//#endregion
|
|
439
440
|
export { z as LintjeTextEditor };
|