ngwr 14.9.1 → 14.11.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/editor/styles/_index.scss +16 -1
- package/fesm2022/ngwr-action-sheet-testing.mjs +111 -310
- package/fesm2022/ngwr-action-sheet-testing.mjs.map +1 -1
- package/fesm2022/ngwr-action-sheet.mjs +209 -89
- package/fesm2022/ngwr-action-sheet.mjs.map +1 -1
- package/fesm2022/ngwr-affix.mjs +122 -140
- package/fesm2022/ngwr-affix.mjs.map +1 -1
- package/fesm2022/ngwr-alert.mjs +204 -107
- package/fesm2022/ngwr-alert.mjs.map +1 -1
- package/fesm2022/ngwr-anchor.mjs +171 -113
- package/fesm2022/ngwr-anchor.mjs.map +1 -1
- package/fesm2022/ngwr-aurora.mjs +278 -198
- package/fesm2022/ngwr-aurora.mjs.map +1 -1
- package/fesm2022/ngwr-avatar.mjs +191 -190
- package/fesm2022/ngwr-avatar.mjs.map +1 -1
- package/fesm2022/ngwr-back-top.mjs +140 -95
- package/fesm2022/ngwr-back-top.mjs.map +1 -1
- package/fesm2022/ngwr-badge.mjs +339 -204
- package/fesm2022/ngwr-badge.mjs.map +1 -1
- package/fesm2022/ngwr-bar-chart-testing.mjs +56 -120
- package/fesm2022/ngwr-bar-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-bar-chart.mjs +204 -113
- package/fesm2022/ngwr-bar-chart.mjs.map +1 -1
- package/fesm2022/ngwr-blur-text-testing.mjs +44 -198
- package/fesm2022/ngwr-blur-text-testing.mjs.map +1 -1
- package/fesm2022/ngwr-blur-text.mjs +322 -202
- package/fesm2022/ngwr-blur-text.mjs.map +1 -1
- package/fesm2022/ngwr-border-glow-testing.mjs +134 -318
- package/fesm2022/ngwr-border-glow-testing.mjs.map +1 -1
- package/fesm2022/ngwr-border-glow.mjs +440 -277
- package/fesm2022/ngwr-border-glow.mjs.map +1 -1
- package/fesm2022/ngwr-breadcrumbs.mjs +256 -120
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-burger.mjs +115 -63
- package/fesm2022/ngwr-burger.mjs.map +1 -1
- package/fesm2022/ngwr-button-testing.mjs +39 -94
- package/fesm2022/ngwr-button-testing.mjs.map +1 -1
- package/fesm2022/ngwr-button.mjs +404 -354
- package/fesm2022/ngwr-button.mjs.map +1 -1
- package/fesm2022/ngwr-calendar-heatmap-testing.mjs +50 -96
- package/fesm2022/ngwr-calendar-heatmap-testing.mjs.map +1 -1
- package/fesm2022/ngwr-calendar-heatmap.mjs +360 -264
- package/fesm2022/ngwr-calendar-heatmap.mjs.map +1 -1
- package/fesm2022/ngwr-calendar-testing.mjs +181 -378
- package/fesm2022/ngwr-calendar-testing.mjs.map +1 -1
- package/fesm2022/ngwr-calendar.mjs +612 -790
- package/fesm2022/ngwr-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-card.mjs +216 -98
- package/fesm2022/ngwr-card.mjs.map +1 -1
- package/fesm2022/ngwr-carousel-testing.mjs +131 -374
- package/fesm2022/ngwr-carousel-testing.mjs.map +1 -1
- package/fesm2022/ngwr-carousel.mjs +459 -332
- package/fesm2022/ngwr-carousel.mjs.map +1 -1
- package/fesm2022/ngwr-cascader-testing.mjs +227 -600
- package/fesm2022/ngwr-cascader-testing.mjs.map +1 -1
- package/fesm2022/ngwr-cascader.mjs +479 -418
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-checkbox-testing.mjs +45 -99
- package/fesm2022/ngwr-checkbox-testing.mjs.map +1 -1
- package/fesm2022/ngwr-checkbox.mjs +442 -354
- package/fesm2022/ngwr-checkbox.mjs.map +1 -1
- package/fesm2022/ngwr-circular-text-testing.mjs +56 -223
- package/fesm2022/ngwr-circular-text-testing.mjs.map +1 -1
- package/fesm2022/ngwr-circular-text.mjs +226 -186
- package/fesm2022/ngwr-circular-text.mjs.map +1 -1
- package/fesm2022/ngwr-click-spark.mjs +303 -199
- package/fesm2022/ngwr-click-spark.mjs.map +1 -1
- package/fesm2022/ngwr-clipboard.mjs +95 -163
- package/fesm2022/ngwr-clipboard.mjs.map +1 -1
- package/fesm2022/ngwr-collapse-testing.mjs +118 -365
- package/fesm2022/ngwr-collapse-testing.mjs.map +1 -1
- package/fesm2022/ngwr-collapse.mjs +287 -227
- package/fesm2022/ngwr-collapse.mjs.map +1 -1
- package/fesm2022/ngwr-color-picker-testing.mjs +223 -461
- package/fesm2022/ngwr-color-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-color-picker.mjs +937 -976
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- package/fesm2022/ngwr-command-palette-testing.mjs +236 -585
- package/fesm2022/ngwr-command-palette-testing.mjs.map +1 -1
- package/fesm2022/ngwr-command-palette.mjs +512 -443
- package/fesm2022/ngwr-command-palette.mjs.map +1 -1
- package/fesm2022/ngwr-compare.mjs +252 -225
- package/fesm2022/ngwr-compare.mjs.map +1 -1
- package/fesm2022/ngwr-confetti.mjs +163 -181
- package/fesm2022/ngwr-confetti.mjs.map +1 -1
- package/fesm2022/ngwr-config.mjs +31 -106
- package/fesm2022/ngwr-config.mjs.map +1 -1
- package/fesm2022/ngwr-context-menu-testing.mjs +233 -642
- package/fesm2022/ngwr-context-menu-testing.mjs.map +1 -1
- package/fesm2022/ngwr-context-menu.mjs +837 -1167
- package/fesm2022/ngwr-context-menu.mjs.map +1 -1
- package/fesm2022/ngwr-cookie.mjs +103 -140
- package/fesm2022/ngwr-cookie.mjs.map +1 -1
- package/fesm2022/ngwr-counter.mjs +646 -460
- package/fesm2022/ngwr-counter.mjs.map +1 -1
- package/fesm2022/ngwr-date-adapters-fns.mjs +173 -266
- package/fesm2022/ngwr-date-adapters-fns.mjs.map +1 -1
- package/fesm2022/ngwr-date-adapters-luxon.mjs +164 -236
- package/fesm2022/ngwr-date-adapters-luxon.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker-testing.mjs +340 -700
- package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker.mjs +2575 -2416
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-date.mjs +606 -861
- package/fesm2022/ngwr-date.mjs.map +1 -1
- package/fesm2022/ngwr-decrypt-text-testing.mjs +57 -256
- package/fesm2022/ngwr-decrypt-text-testing.mjs.map +1 -1
- package/fesm2022/ngwr-decrypt-text.mjs +489 -409
- package/fesm2022/ngwr-decrypt-text.mjs.map +1 -1
- package/fesm2022/ngwr-density.mjs +157 -154
- package/fesm2022/ngwr-density.mjs.map +1 -1
- package/fesm2022/ngwr-descriptions.mjs +188 -90
- package/fesm2022/ngwr-descriptions.mjs.map +1 -1
- package/fesm2022/ngwr-dialog-testing.mjs +44 -87
- package/fesm2022/ngwr-dialog-testing.mjs.map +1 -1
- package/fesm2022/ngwr-dialog.mjs +391 -522
- package/fesm2022/ngwr-dialog.mjs.map +1 -1
- package/fesm2022/ngwr-directives.mjs +354 -271
- package/fesm2022/ngwr-directives.mjs.map +1 -1
- package/fesm2022/ngwr-divider.mjs +151 -133
- package/fesm2022/ngwr-divider.mjs.map +1 -1
- package/fesm2022/ngwr-donut-chart-testing.mjs +48 -111
- package/fesm2022/ngwr-donut-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-donut-chart.mjs +295 -190
- package/fesm2022/ngwr-donut-chart.mjs.map +1 -1
- package/fesm2022/ngwr-drag-drop.mjs +411 -301
- package/fesm2022/ngwr-drag-drop.mjs.map +1 -1
- package/fesm2022/ngwr-drawer-testing.mjs +97 -248
- package/fesm2022/ngwr-drawer-testing.mjs.map +1 -1
- package/fesm2022/ngwr-drawer.mjs +862 -889
- package/fesm2022/ngwr-drawer.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown-testing.mjs +125 -288
- package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +613 -641
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-editor-testing.mjs +196 -563
- package/fesm2022/ngwr-editor-testing.mjs.map +1 -1
- package/fesm2022/ngwr-editor.mjs +2062 -2442
- package/fesm2022/ngwr-editor.mjs.map +1 -1
- package/fesm2022/ngwr-empty.mjs +117 -72
- package/fesm2022/ngwr-empty.mjs.map +1 -1
- package/fesm2022/ngwr-event-calendar-testing.mjs +215 -439
- package/fesm2022/ngwr-event-calendar-testing.mjs.map +1 -1
- package/fesm2022/ngwr-event-calendar.mjs +906 -822
- package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-falling-text-testing.mjs +52 -216
- package/fesm2022/ngwr-falling-text-testing.mjs.map +1 -1
- package/fesm2022/ngwr-falling-text.mjs +375 -342
- package/fesm2022/ngwr-falling-text.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload-testing.mjs +133 -320
- package/fesm2022/ngwr-file-upload-testing.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload.mjs +457 -328
- package/fesm2022/ngwr-file-upload.mjs.map +1 -1
- package/fesm2022/ngwr-form-testing.mjs +145 -452
- package/fesm2022/ngwr-form-testing.mjs.map +1 -1
- package/fesm2022/ngwr-form.mjs +512 -590
- package/fesm2022/ngwr-form.mjs.map +1 -1
- package/fesm2022/ngwr-fuzzy-text-testing.mjs +36 -132
- package/fesm2022/ngwr-fuzzy-text-testing.mjs.map +1 -1
- package/fesm2022/ngwr-fuzzy-text.mjs +635 -421
- package/fesm2022/ngwr-fuzzy-text.mjs.map +1 -1
- package/fesm2022/ngwr-gauge-testing.mjs +49 -98
- package/fesm2022/ngwr-gauge-testing.mjs.map +1 -1
- package/fesm2022/ngwr-gauge.mjs +297 -129
- package/fesm2022/ngwr-gauge.mjs.map +1 -1
- package/fesm2022/ngwr-glitch-text-testing.mjs +61 -213
- package/fesm2022/ngwr-glitch-text-testing.mjs.map +1 -1
- package/fesm2022/ngwr-glitch-text.mjs +170 -73
- package/fesm2022/ngwr-glitch-text.mjs.map +1 -1
- package/fesm2022/ngwr-gradient-text-testing.mjs +82 -251
- package/fesm2022/ngwr-gradient-text-testing.mjs.map +1 -1
- package/fesm2022/ngwr-gradient-text.mjs +215 -114
- package/fesm2022/ngwr-gradient-text.mjs.map +1 -1
- package/fesm2022/ngwr-graph-testing.mjs +65 -233
- package/fesm2022/ngwr-graph-testing.mjs.map +1 -1
- package/fesm2022/ngwr-graph.mjs +882 -1046
- package/fesm2022/ngwr-graph.mjs.map +1 -1
- package/fesm2022/ngwr-hotkey.mjs +307 -285
- package/fesm2022/ngwr-hotkey.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ar.mjs +375 -464
- package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-cs.mjs +375 -434
- package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-de.mjs +375 -453
- package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +375 -561
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-es.mjs +375 -434
- package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-fr.mjs +375 -458
- package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-he.mjs +375 -457
- package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-hi.mjs +375 -434
- package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-id.mjs +375 -434
- package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-it.mjs +375 -453
- package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ja.mjs +375 -438
- package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ko.mjs +375 -446
- package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-nl.mjs +375 -450
- package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pl.mjs +375 -460
- package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pt.mjs +375 -443
- package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +375 -447
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-sv.mjs +375 -434
- package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-tr.mjs +375 -458
- package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-uk.mjs +375 -455
- package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-vi.mjs +375 -451
- package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh-TW.mjs +375 -442
- package/fesm2022/ngwr-i18n-zh-TW.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh.mjs +375 -433
- package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
- package/fesm2022/ngwr-i18n.mjs +415 -683
- package/fesm2022/ngwr-i18n.mjs.map +1 -1
- package/fesm2022/ngwr-icon-adapters-feather.mjs +28 -77
- package/fesm2022/ngwr-icon-adapters-feather.mjs.map +1 -1
- package/fesm2022/ngwr-icon-adapters-lucide.mjs +32 -94
- package/fesm2022/ngwr-icon-adapters-lucide.mjs.map +1 -1
- package/fesm2022/ngwr-icon.mjs +371 -690
- package/fesm2022/ngwr-icon.mjs.map +1 -1
- package/fesm2022/ngwr-image-cropper-testing.mjs +84 -227
- package/fesm2022/ngwr-image-cropper-testing.mjs.map +1 -1
- package/fesm2022/ngwr-image-cropper.mjs +577 -639
- package/fesm2022/ngwr-image-cropper.mjs.map +1 -1
- package/fesm2022/ngwr-input-number-testing.mjs +108 -305
- package/fesm2022/ngwr-input-number-testing.mjs.map +1 -1
- package/fesm2022/ngwr-input-number.mjs +496 -361
- package/fesm2022/ngwr-input-number.mjs.map +1 -1
- package/fesm2022/ngwr-input-otp-testing.mjs +172 -420
- package/fesm2022/ngwr-input-otp-testing.mjs.map +1 -1
- package/fesm2022/ngwr-input-otp.mjs +396 -352
- package/fesm2022/ngwr-input-otp.mjs.map +1 -1
- package/fesm2022/ngwr-input-testing.mjs +52 -100
- package/fesm2022/ngwr-input-testing.mjs.map +1 -1
- package/fesm2022/ngwr-input.mjs +356 -303
- package/fesm2022/ngwr-input.mjs.map +1 -1
- package/fesm2022/ngwr-keyboard.mjs +63 -45
- package/fesm2022/ngwr-keyboard.mjs.map +1 -1
- package/fesm2022/ngwr-knob-testing.mjs +101 -223
- package/fesm2022/ngwr-knob-testing.mjs.map +1 -1
- package/fesm2022/ngwr-knob.mjs +421 -303
- package/fesm2022/ngwr-knob.mjs.map +1 -1
- package/fesm2022/ngwr-layout.mjs +362 -207
- package/fesm2022/ngwr-layout.mjs.map +1 -1
- package/fesm2022/ngwr-lightbox-testing.mjs +100 -221
- package/fesm2022/ngwr-lightbox-testing.mjs.map +1 -1
- package/fesm2022/ngwr-lightbox.mjs +335 -268
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-line-chart-testing.mjs +65 -133
- package/fesm2022/ngwr-line-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-line-chart.mjs +356 -281
- package/fesm2022/ngwr-line-chart.mjs.map +1 -1
- package/fesm2022/ngwr-list.mjs +251 -134
- package/fesm2022/ngwr-list.mjs.map +1 -1
- package/fesm2022/ngwr-loading-bar-router.mjs +26 -68
- package/fesm2022/ngwr-loading-bar-router.mjs.map +1 -1
- package/fesm2022/ngwr-loading-bar.mjs +173 -186
- package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
- package/fesm2022/ngwr-markdown-testing.mjs +174 -505
- package/fesm2022/ngwr-markdown-testing.mjs.map +1 -1
- package/fesm2022/ngwr-markdown.mjs +1578 -2219
- package/fesm2022/ngwr-markdown.mjs.map +1 -1
- package/fesm2022/ngwr-marquee-testing.mjs +118 -331
- package/fesm2022/ngwr-marquee-testing.mjs.map +1 -1
- package/fesm2022/ngwr-marquee.mjs +411 -230
- package/fesm2022/ngwr-marquee.mjs.map +1 -1
- package/fesm2022/ngwr-media.mjs +100 -127
- package/fesm2022/ngwr-media.mjs.map +1 -1
- package/fesm2022/ngwr-mention-testing.mjs +179 -506
- package/fesm2022/ngwr-mention-testing.mjs.map +1 -1
- package/fesm2022/ngwr-mention.mjs +668 -732
- package/fesm2022/ngwr-mention.mjs.map +1 -1
- package/fesm2022/ngwr-meta.mjs +257 -329
- package/fesm2022/ngwr-meta.mjs.map +1 -1
- package/fesm2022/ngwr-meter-group-testing.mjs +56 -101
- package/fesm2022/ngwr-meter-group-testing.mjs.map +1 -1
- package/fesm2022/ngwr-meter-group.mjs +206 -114
- package/fesm2022/ngwr-meter-group.mjs.map +1 -1
- package/fesm2022/ngwr-overlay.mjs +264 -576
- package/fesm2022/ngwr-overlay.mjs.map +1 -1
- package/fesm2022/ngwr-page-header.mjs +107 -67
- package/fesm2022/ngwr-page-header.mjs.map +1 -1
- package/fesm2022/ngwr-pagination-testing.mjs +125 -388
- package/fesm2022/ngwr-pagination-testing.mjs.map +1 -1
- package/fesm2022/ngwr-pagination.mjs +505 -335
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-pipes.mjs +343 -382
- package/fesm2022/ngwr-pipes.mjs.map +1 -1
- package/fesm2022/ngwr-platform.mjs +182 -221
- package/fesm2022/ngwr-platform.mjs.map +1 -1
- package/fesm2022/ngwr-popconfirm-testing.mjs +112 -307
- package/fesm2022/ngwr-popconfirm-testing.mjs.map +1 -1
- package/fesm2022/ngwr-popconfirm.mjs +474 -277
- package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
- package/fesm2022/ngwr-popover-testing.mjs +114 -332
- package/fesm2022/ngwr-popover-testing.mjs.map +1 -1
- package/fesm2022/ngwr-popover.mjs +1106 -1311
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-progress.mjs +124 -68
- package/fesm2022/ngwr-progress.mjs.map +1 -1
- package/fesm2022/ngwr-pull-to-refresh.mjs +198 -185
- package/fesm2022/ngwr-pull-to-refresh.mjs.map +1 -1
- package/fesm2022/ngwr-qr.mjs +1179 -1100
- package/fesm2022/ngwr-qr.mjs.map +1 -1
- package/fesm2022/ngwr-radio-testing.mjs +138 -389
- package/fesm2022/ngwr-radio-testing.mjs.map +1 -1
- package/fesm2022/ngwr-radio.mjs +346 -239
- package/fesm2022/ngwr-radio.mjs.map +1 -1
- package/fesm2022/ngwr-rating-testing.mjs +153 -390
- package/fesm2022/ngwr-rating-testing.mjs.map +1 -1
- package/fesm2022/ngwr-rating.mjs +281 -247
- package/fesm2022/ngwr-rating.mjs.map +1 -1
- package/fesm2022/ngwr-result.mjs +353 -114
- package/fesm2022/ngwr-result.mjs.map +1 -1
- package/fesm2022/ngwr-rotating-text-testing.mjs +45 -215
- package/fesm2022/ngwr-rotating-text-testing.mjs.map +1 -1
- package/fesm2022/ngwr-rotating-text.mjs +402 -272
- package/fesm2022/ngwr-rotating-text.mjs.map +1 -1
- package/fesm2022/ngwr-schema-form.mjs +384 -213
- package/fesm2022/ngwr-schema-form.mjs.map +1 -1
- package/fesm2022/ngwr-scroll.mjs +95 -105
- package/fesm2022/ngwr-scroll.mjs.map +1 -1
- package/fesm2022/ngwr-segmented-testing.mjs +184 -593
- package/fesm2022/ngwr-segmented-testing.mjs.map +1 -1
- package/fesm2022/ngwr-segmented.mjs +235 -251
- package/fesm2022/ngwr-segmented.mjs.map +1 -1
- package/fesm2022/ngwr-select-testing.mjs +139 -284
- package/fesm2022/ngwr-select-testing.mjs.map +1 -1
- package/fesm2022/ngwr-select.mjs +1784 -2098
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-shiny-text-testing.mjs +83 -228
- package/fesm2022/ngwr-shiny-text-testing.mjs.map +1 -1
- package/fesm2022/ngwr-shiny-text.mjs +304 -131
- package/fesm2022/ngwr-shiny-text.mjs.map +1 -1
- package/fesm2022/ngwr-sidebar.mjs +256 -205
- package/fesm2022/ngwr-sidebar.mjs.map +1 -1
- package/fesm2022/ngwr-skeleton.mjs +101 -72
- package/fesm2022/ngwr-skeleton.mjs.map +1 -1
- package/fesm2022/ngwr-slider-testing.mjs +191 -473
- package/fesm2022/ngwr-slider-testing.mjs.map +1 -1
- package/fesm2022/ngwr-slider.mjs +430 -443
- package/fesm2022/ngwr-slider.mjs.map +1 -1
- package/fesm2022/ngwr-sparkline-testing.mjs +37 -74
- package/fesm2022/ngwr-sparkline-testing.mjs.map +1 -1
- package/fesm2022/ngwr-sparkline.mjs +311 -196
- package/fesm2022/ngwr-sparkline.mjs.map +1 -1
- package/fesm2022/ngwr-speed-dial-testing.mjs +135 -278
- package/fesm2022/ngwr-speed-dial-testing.mjs.map +1 -1
- package/fesm2022/ngwr-speed-dial.mjs +242 -140
- package/fesm2022/ngwr-speed-dial.mjs.map +1 -1
- package/fesm2022/ngwr-spinner.mjs +97 -60
- package/fesm2022/ngwr-spinner.mjs.map +1 -1
- package/fesm2022/ngwr-splash-cursor-testing.mjs +23 -87
- package/fesm2022/ngwr-splash-cursor-testing.mjs.map +1 -1
- package/fesm2022/ngwr-splash-cursor.mjs +980 -725
- package/fesm2022/ngwr-splash-cursor.mjs.map +1 -1
- package/fesm2022/ngwr-split-text-testing.mjs +48 -218
- package/fesm2022/ngwr-split-text-testing.mjs.map +1 -1
- package/fesm2022/ngwr-split-text.mjs +365 -220
- package/fesm2022/ngwr-split-text.mjs.map +1 -1
- package/fesm2022/ngwr-splitter-testing.mjs +107 -241
- package/fesm2022/ngwr-splitter-testing.mjs.map +1 -1
- package/fesm2022/ngwr-splitter.mjs +222 -184
- package/fesm2022/ngwr-splitter.mjs.map +1 -1
- package/fesm2022/ngwr-spotlight-card-testing.mjs +105 -360
- package/fesm2022/ngwr-spotlight-card-testing.mjs.map +1 -1
- package/fesm2022/ngwr-spotlight-card.mjs +217 -135
- package/fesm2022/ngwr-spotlight-card.mjs.map +1 -1
- package/fesm2022/ngwr-squircle.mjs +410 -326
- package/fesm2022/ngwr-squircle.mjs.map +1 -1
- package/fesm2022/ngwr-star-border-testing.mjs +53 -168
- package/fesm2022/ngwr-star-border-testing.mjs.map +1 -1
- package/fesm2022/ngwr-star-border.mjs +160 -70
- package/fesm2022/ngwr-star-border.mjs.map +1 -1
- package/fesm2022/ngwr-statistic.mjs +570 -389
- package/fesm2022/ngwr-statistic.mjs.map +1 -1
- package/fesm2022/ngwr-stepper-testing.mjs +158 -471
- package/fesm2022/ngwr-stepper-testing.mjs.map +1 -1
- package/fesm2022/ngwr-stepper.mjs +336 -215
- package/fesm2022/ngwr-stepper.mjs.map +1 -1
- package/fesm2022/ngwr-storage.mjs +217 -330
- package/fesm2022/ngwr-storage.mjs.map +1 -1
- package/fesm2022/ngwr-switch-testing.mjs +42 -75
- package/fesm2022/ngwr-switch-testing.mjs.map +1 -1
- package/fesm2022/ngwr-switch.mjs +197 -114
- package/fesm2022/ngwr-switch.mjs.map +1 -1
- package/fesm2022/ngwr-table-testing.mjs +238 -572
- package/fesm2022/ngwr-table-testing.mjs.map +1 -1
- package/fesm2022/ngwr-table.mjs +1875 -1446
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-tabs-router.mjs +84 -153
- package/fesm2022/ngwr-tabs-router.mjs.map +1 -1
- package/fesm2022/ngwr-tabs-testing.mjs +217 -617
- package/fesm2022/ngwr-tabs-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tabs.mjs +402 -425
- package/fesm2022/ngwr-tabs.mjs.map +1 -1
- package/fesm2022/ngwr-textarea-testing.mjs +84 -236
- package/fesm2022/ngwr-textarea-testing.mjs.map +1 -1
- package/fesm2022/ngwr-textarea.mjs +385 -264
- package/fesm2022/ngwr-textarea.mjs.map +1 -1
- package/fesm2022/ngwr-theme.mjs +247 -443
- package/fesm2022/ngwr-theme.mjs.map +1 -1
- package/fesm2022/ngwr-tilt-card-testing.mjs +79 -186
- package/fesm2022/ngwr-tilt-card-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tilt-card.mjs +257 -168
- package/fesm2022/ngwr-tilt-card.mjs.map +1 -1
- package/fesm2022/ngwr-timeline.mjs +157 -70
- package/fesm2022/ngwr-timeline.mjs.map +1 -1
- package/fesm2022/ngwr-toast-testing.mjs +59 -99
- package/fesm2022/ngwr-toast-testing.mjs.map +1 -1
- package/fesm2022/ngwr-toast.mjs +769 -691
- package/fesm2022/ngwr-toast.mjs.map +1 -1
- package/fesm2022/ngwr-toolbar.mjs +73 -58
- package/fesm2022/ngwr-toolbar.mjs.map +1 -1
- package/fesm2022/ngwr-tour-testing.mjs +75 -171
- package/fesm2022/ngwr-tour-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tour.mjs +333 -347
- package/fesm2022/ngwr-tour.mjs.map +1 -1
- package/fesm2022/ngwr-transfer-testing.mjs +195 -534
- package/fesm2022/ngwr-transfer-testing.mjs.map +1 -1
- package/fesm2022/ngwr-transfer.mjs +441 -322
- package/fesm2022/ngwr-transfer.mjs.map +1 -1
- package/fesm2022/ngwr-tree-testing.mjs +277 -754
- package/fesm2022/ngwr-tree-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tree.mjs +876 -906
- package/fesm2022/ngwr-tree.mjs.map +1 -1
- package/fesm2022/ngwr-typewriter-testing.mjs +50 -237
- package/fesm2022/ngwr-typewriter-testing.mjs.map +1 -1
- package/fesm2022/ngwr-typewriter.mjs +461 -242
- package/fesm2022/ngwr-typewriter.mjs.map +1 -1
- package/fesm2022/ngwr-typography.mjs +142 -81
- package/fesm2022/ngwr-typography.mjs.map +1 -1
- package/fesm2022/ngwr-utils.mjs +304 -613
- package/fesm2022/ngwr-utils.mjs.map +1 -1
- package/fesm2022/ngwr-validators.mjs +179 -361
- package/fesm2022/ngwr-validators.mjs.map +1 -1
- package/fesm2022/ngwr-version.mjs +17 -47
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/fesm2022/ngwr-virtual-scroll.mjs +259 -125
- package/fesm2022/ngwr-virtual-scroll.mjs.map +1 -1
- package/fesm2022/ngwr-waves-testing.mjs +34 -125
- package/fesm2022/ngwr-waves-testing.mjs.map +1 -1
- package/fesm2022/ngwr-waves.mjs +816 -373
- package/fesm2022/ngwr-waves.mjs.map +1 -1
- package/fesm2022/ngwr-window-testing.mjs +171 -366
- package/fesm2022/ngwr-window-testing.mjs.map +1 -1
- package/fesm2022/ngwr-window.mjs +1437 -1351
- package/fesm2022/ngwr-window.mjs.map +1 -1
- package/fesm2022/ngwr.mjs +0 -4
- package/input-number/styles/_index.scss +33 -35
- package/llms-full.txt +2 -2
- package/package.json +1 -1
- package/segmented/styles/_index.scss +10 -3
- package/types/ngwr-action-sheet-testing.d.ts +174 -200
- package/types/ngwr-action-sheet.d.ts +83 -45
- package/types/ngwr-affix.d.ts +27 -22
- package/types/ngwr-alert.d.ts +93 -59
- package/types/ngwr-anchor.d.ts +52 -35
- package/types/ngwr-aurora.d.ts +53 -35
- package/types/ngwr-avatar.d.ts +97 -81
- package/types/ngwr-back-top.d.ts +36 -23
- package/types/ngwr-badge.d.ts +160 -105
- package/types/ngwr-bar-chart-testing.d.ts +40 -58
- package/types/ngwr-bar-chart.d.ts +86 -60
- package/types/ngwr-blur-text-testing.d.ts +103 -121
- package/types/ngwr-blur-text.d.ts +99 -60
- package/types/ngwr-border-glow-testing.d.ts +155 -173
- package/types/ngwr-border-glow.d.ts +93 -45
- package/types/ngwr-breadcrumbs.d.ts +60 -32
- package/types/ngwr-burger.d.ts +38 -23
- package/types/ngwr-button-testing.d.ts +41 -59
- package/types/ngwr-button.d.ts +213 -163
- package/types/ngwr-calendar-heatmap-testing.d.ts +38 -56
- package/types/ngwr-calendar-heatmap.d.ts +151 -105
- package/types/ngwr-calendar-testing.d.ts +198 -224
- package/types/ngwr-calendar.d.ts +285 -246
- package/types/ngwr-card.d.ts +41 -23
- package/types/ngwr-carousel-testing.d.ts +196 -214
- package/types/ngwr-carousel.d.ts +173 -122
- package/types/ngwr-cascader-testing.d.ts +338 -372
- package/types/ngwr-cascader.d.ts +230 -161
- package/types/ngwr-checkbox-testing.d.ts +45 -63
- package/types/ngwr-checkbox.d.ts +238 -183
- package/types/ngwr-circular-text-testing.d.ts +108 -126
- package/types/ngwr-circular-text.d.ts +53 -41
- package/types/ngwr-click-spark.d.ts +82 -50
- package/types/ngwr-clipboard.d.ts +40 -44
- package/types/ngwr-collapse-testing.d.ts +193 -219
- package/types/ngwr-collapse.d.ts +82 -71
- package/types/ngwr-color-picker-testing.d.ts +211 -237
- package/types/ngwr-color-picker.d.ts +343 -300
- package/types/ngwr-command-palette-testing.d.ts +311 -345
- package/types/ngwr-command-palette.d.ts +257 -197
- package/types/ngwr-compare.d.ts +102 -67
- package/types/ngwr-confetti.d.ts +51 -55
- package/types/ngwr-config.d.ts +44 -71
- package/types/ngwr-context-menu-testing.d.ts +301 -327
- package/types/ngwr-context-menu.d.ts +350 -310
- package/types/ngwr-cookie.d.ts +37 -41
- package/types/ngwr-counter.d.ts +223 -128
- package/types/ngwr-date-adapters-fns.d.ts +40 -59
- package/types/ngwr-date-adapters-luxon.d.ts +61 -72
- package/types/ngwr-date-picker-testing.d.ts +295 -339
- package/types/ngwr-date-picker.d.ts +759 -583
- package/types/ngwr-date.d.ts +229 -258
- package/types/ngwr-decrypt-text-testing.d.ts +140 -158
- package/types/ngwr-decrypt-text.d.ts +104 -62
- package/types/ngwr-density.d.ts +42 -57
- package/types/ngwr-descriptions.d.ts +50 -27
- package/types/ngwr-dialog-testing.d.ts +36 -54
- package/types/ngwr-dialog.d.ts +166 -190
- package/types/ngwr-directives.d.ts +82 -60
- package/types/ngwr-divider.d.ts +78 -62
- package/types/ngwr-donut-chart-testing.d.ts +36 -54
- package/types/ngwr-donut-chart.d.ts +102 -66
- package/types/ngwr-drag-drop.d.ts +139 -106
- package/types/ngwr-drawer-testing.d.ts +141 -159
- package/types/ngwr-drawer.d.ts +374 -316
- package/types/ngwr-dropdown-testing.d.ts +128 -154
- package/types/ngwr-dropdown.d.ts +260 -166
- package/types/ngwr-editor-testing.d.ts +329 -301
- package/types/ngwr-editor.d.ts +445 -300
- package/types/ngwr-empty.d.ts +41 -28
- package/types/ngwr-event-calendar-testing.d.ts +217 -243
- package/types/ngwr-event-calendar.d.ts +340 -298
- package/types/ngwr-falling-text-testing.d.ts +108 -126
- package/types/ngwr-falling-text.d.ts +57 -35
- package/types/ngwr-file-upload-testing.d.ts +133 -151
- package/types/ngwr-file-upload.d.ts +193 -128
- package/types/ngwr-form-testing.d.ts +255 -282
- package/types/ngwr-form.d.ts +324 -306
- package/types/ngwr-fuzzy-text-testing.d.ts +63 -81
- package/types/ngwr-fuzzy-text.d.ts +152 -65
- package/types/ngwr-gauge-testing.d.ts +43 -61
- package/types/ngwr-gauge.d.ts +113 -61
- package/types/ngwr-glitch-text-testing.d.ts +125 -143
- package/types/ngwr-glitch-text.d.ts +47 -24
- package/types/ngwr-gradient-text-testing.d.ts +114 -132
- package/types/ngwr-gradient-text.d.ts +51 -24
- package/types/ngwr-graph-testing.d.ts +89 -115
- package/types/ngwr-graph.d.ts +137 -124
- package/types/ngwr-hotkey.d.ts +85 -75
- package/types/ngwr-i18n-ar.d.ts +2 -5
- package/types/ngwr-i18n-cs.d.ts +2 -5
- package/types/ngwr-i18n-de.d.ts +2 -5
- package/types/ngwr-i18n-en.d.ts +2 -5
- package/types/ngwr-i18n-es.d.ts +2 -5
- package/types/ngwr-i18n-fr.d.ts +2 -5
- package/types/ngwr-i18n-he.d.ts +2 -5
- package/types/ngwr-i18n-hi.d.ts +2 -5
- package/types/ngwr-i18n-id.d.ts +2 -5
- package/types/ngwr-i18n-it.d.ts +2 -5
- package/types/ngwr-i18n-ja.d.ts +2 -5
- package/types/ngwr-i18n-ko.d.ts +2 -5
- package/types/ngwr-i18n-nl.d.ts +2 -5
- package/types/ngwr-i18n-pl.d.ts +2 -5
- package/types/ngwr-i18n-pt.d.ts +2 -5
- package/types/ngwr-i18n-ru.d.ts +2 -5
- package/types/ngwr-i18n-sv.d.ts +2 -5
- package/types/ngwr-i18n-tr.d.ts +2 -5
- package/types/ngwr-i18n-uk.d.ts +2 -5
- package/types/ngwr-i18n-vi.d.ts +2 -5
- package/types/ngwr-i18n-zh-TW.d.ts +2 -5
- package/types/ngwr-i18n-zh.d.ts +2 -5
- package/types/ngwr-i18n.d.ts +202 -246
- package/types/ngwr-icon-adapters-feather.d.ts +2 -11
- package/types/ngwr-icon-adapters-lucide.d.ts +2 -12
- package/types/ngwr-icon.d.ts +62 -84
- package/types/ngwr-image-cropper-testing.d.ts +116 -134
- package/types/ngwr-image-cropper.d.ts +287 -252
- package/types/ngwr-input-number-testing.d.ts +164 -182
- package/types/ngwr-input-number.d.ts +231 -150
- package/types/ngwr-input-otp-testing.d.ts +210 -244
- package/types/ngwr-input-otp.d.ts +167 -123
- package/types/ngwr-input-testing.d.ts +42 -60
- package/types/ngwr-input.d.ts +118 -94
- package/types/ngwr-keyboard.d.ts +14 -12
- package/types/ngwr-knob-testing.d.ts +106 -124
- package/types/ngwr-knob.d.ts +194 -129
- package/types/ngwr-layout.d.ts +57 -40
- package/types/ngwr-lightbox-testing.d.ts +101 -119
- package/types/ngwr-lightbox.d.ts +140 -87
- package/types/ngwr-line-chart-testing.d.ts +51 -69
- package/types/ngwr-line-chart.d.ts +171 -134
- package/types/ngwr-list.d.ts +55 -27
- package/types/ngwr-loading-bar-router.d.ts +2 -12
- package/types/ngwr-loading-bar.d.ts +45 -39
- package/types/ngwr-markdown-testing.d.ts +323 -350
- package/types/ngwr-markdown.d.ts +432 -318
- package/types/ngwr-marquee-testing.d.ts +190 -216
- package/types/ngwr-marquee.d.ts +127 -75
- package/types/ngwr-media.d.ts +25 -39
- package/types/ngwr-mention-testing.d.ts +274 -300
- package/types/ngwr-mention.d.ts +249 -164
- package/types/ngwr-meta.d.ts +93 -108
- package/types/ngwr-meter-group-testing.d.ts +33 -51
- package/types/ngwr-meter-group.d.ts +86 -60
- package/types/ngwr-overlay.d.ts +57 -132
- package/types/ngwr-page-header.d.ts +32 -19
- package/types/ngwr-pagination-testing.d.ts +215 -233
- package/types/ngwr-pagination.d.ts +213 -141
- package/types/ngwr-pipes.d.ts +67 -84
- package/types/ngwr-platform.d.ts +52 -57
- package/types/ngwr-popconfirm-testing.d.ts +181 -199
- package/types/ngwr-popconfirm.d.ts +151 -82
- package/types/ngwr-popover-testing.d.ts +183 -201
- package/types/ngwr-popover.d.ts +291 -207
- package/types/ngwr-progress.d.ts +38 -25
- package/types/ngwr-pull-to-refresh.d.ts +55 -40
- package/types/ngwr-qr.d.ts +79 -37
- package/types/ngwr-radio-testing.d.ts +208 -234
- package/types/ngwr-radio.d.ts +162 -125
- package/types/ngwr-rating-testing.d.ts +218 -244
- package/types/ngwr-rating.d.ts +146 -111
- package/types/ngwr-result.d.ts +85 -41
- package/types/ngwr-rotating-text-testing.d.ts +107 -125
- package/types/ngwr-rotating-text.d.ts +96 -52
- package/types/ngwr-schema-form.d.ts +57 -49
- package/types/ngwr-scroll.d.ts +27 -31
- package/types/ngwr-segmented-testing.d.ts +333 -359
- package/types/ngwr-segmented.d.ts +183 -165
- package/types/ngwr-select-testing.d.ts +128 -154
- package/types/ngwr-select.d.ts +1083 -906
- package/types/ngwr-shiny-text-testing.d.ts +82 -100
- package/types/ngwr-shiny-text.d.ts +83 -36
- package/types/ngwr-sidebar.d.ts +108 -93
- package/types/ngwr-skeleton.d.ts +34 -26
- package/types/ngwr-slider-testing.d.ts +228 -254
- package/types/ngwr-slider.d.ts +236 -186
- package/types/ngwr-sparkline-testing.d.ts +29 -47
- package/types/ngwr-sparkline.d.ts +130 -88
- package/types/ngwr-speed-dial-testing.d.ts +129 -155
- package/types/ngwr-speed-dial.d.ts +92 -57
- package/types/ngwr-spinner.d.ts +30 -23
- package/types/ngwr-splash-cursor-testing.d.ts +42 -60
- package/types/ngwr-splash-cursor.d.ts +129 -61
- package/types/ngwr-split-text-testing.d.ts +119 -137
- package/types/ngwr-split-text.d.ts +120 -71
- package/types/ngwr-splitter-testing.d.ts +114 -132
- package/types/ngwr-splitter.d.ts +85 -55
- package/types/ngwr-spotlight-card-testing.d.ts +177 -203
- package/types/ngwr-spotlight-card.d.ts +50 -32
- package/types/ngwr-squircle.d.ts +112 -70
- package/types/ngwr-star-border-testing.d.ts +74 -92
- package/types/ngwr-star-border.d.ts +42 -20
- package/types/ngwr-statistic.d.ts +210 -130
- package/types/ngwr-stepper-testing.d.ts +258 -284
- package/types/ngwr-stepper.d.ts +112 -75
- package/types/ngwr-storage.d.ts +96 -118
- package/types/ngwr-switch-testing.d.ts +26 -44
- package/types/ngwr-switch.d.ts +92 -62
- package/types/ngwr-table-testing.d.ts +291 -333
- package/types/ngwr-table.d.ts +922 -707
- package/types/ngwr-tabs-router.d.ts +21 -24
- package/types/ngwr-tabs-testing.d.ts +354 -380
- package/types/ngwr-tabs.d.ts +169 -155
- package/types/ngwr-textarea-testing.d.ts +123 -141
- package/types/ngwr-textarea.d.ts +160 -105
- package/types/ngwr-theme.d.ts +81 -163
- package/types/ngwr-tilt-card-testing.d.ts +94 -112
- package/types/ngwr-tilt-card.d.ts +64 -35
- package/types/ngwr-timeline.d.ts +36 -19
- package/types/ngwr-toast-testing.d.ts +37 -55
- package/types/ngwr-toast.d.ts +165 -209
- package/types/ngwr-toolbar.d.ts +17 -14
- package/types/ngwr-tour-testing.d.ts +84 -102
- package/types/ngwr-tour.d.ts +142 -144
- package/types/ngwr-transfer-testing.d.ts +293 -328
- package/types/ngwr-transfer.d.ts +217 -159
- package/types/ngwr-tree-testing.d.ts +428 -454
- package/types/ngwr-tree.d.ts +400 -296
- package/types/ngwr-typewriter-testing.d.ts +125 -143
- package/types/ngwr-typewriter.d.ts +137 -63
- package/types/ngwr-typography.d.ts +49 -27
- package/types/ngwr-utils.d.ts +100 -107
- package/types/ngwr-validators.d.ts +94 -104
- package/types/ngwr-version.d.ts +3 -14
- package/types/ngwr-virtual-scroll.d.ts +86 -58
- package/types/ngwr-waves-testing.d.ts +61 -79
- package/types/ngwr-waves.d.ts +116 -63
- package/types/ngwr-window-testing.d.ts +178 -204
- package/types/ngwr-window.d.ts +299 -325
- package/types/ngwr.d.ts +1 -2
- package/fesm2022/ngwr.mjs.map +0 -1
package/fesm2022/ngwr-tabs.mjs
CHANGED
|
@@ -1,433 +1,410 @@
|
|
|
1
|
-
import { Directionality } from
|
|
2
|
-
import { NgTemplateOutlet } from
|
|
3
|
-
import * as i0 from
|
|
4
|
-
import {
|
|
5
|
-
import { coerceBooleanProperty } from
|
|
6
|
-
import { randomId } from
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @license
|
|
10
|
-
*
|
|
11
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
12
|
-
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
13
|
-
*/
|
|
14
|
-
/**
|
|
15
|
-
* Token a `<wr-tab>` injects to register itself with — and read the active
|
|
16
|
-
* key from — its parent `<wr-tabs>` host.
|
|
17
|
-
*
|
|
18
|
-
* @internal
|
|
19
|
-
*/
|
|
20
|
-
const WR_TABS = new InjectionToken('WR_TABS');
|
|
21
|
-
|
|
1
|
+
import { Directionality } from "@angular/cdk/bidi";
|
|
2
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import { Component, DestroyRef, InjectionToken, TemplateRef, ViewEncapsulation, afterNextRender, computed, contentChildren, effect, forwardRef, inject, input, model, signal, viewChild } from "@angular/core";
|
|
5
|
+
import { coerceBooleanProperty } from "@angular/cdk/coercion";
|
|
6
|
+
import { randomId } from "ngwr/utils";
|
|
22
7
|
/**
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
8
|
+
* @license
|
|
9
|
+
*
|
|
10
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
11
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
12
|
+
*/
|
|
13
|
+
const WR_TABS = new InjectionToken("WR_TABS");
|
|
28
14
|
/**
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* @license
|
|
37
|
-
*
|
|
38
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
39
|
-
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
40
|
-
*/
|
|
41
|
-
/**
|
|
42
|
-
* Single tab. Two modes, decided by inputs:
|
|
43
|
-
*
|
|
44
|
-
* - **Content tab** — projected children render in the parent's content
|
|
45
|
-
* panel when this tab is active.
|
|
46
|
-
* - **Router tab** — set `routerLink` and the tab becomes a link; the
|
|
47
|
-
* parent skips its content panel and the consumer drops a
|
|
48
|
-
* `<router-outlet>` below the tab strip. Router mode needs the
|
|
49
|
-
* `WrTabsRouting` directive from `ngwr/tabs/router` in the same
|
|
50
|
-
* `imports: []`; without it a strip carrying a `routerLink` throws.
|
|
51
|
-
*/
|
|
52
|
-
class WrTab {
|
|
53
|
-
/** Visible label on the tab strip. */
|
|
54
|
-
title = input.required(/* @ts-ignore */
|
|
55
|
-
...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
56
|
-
/**
|
|
57
|
-
* Stable identifier used by the parent to track the active tab.
|
|
58
|
-
* Auto-generated if omitted.
|
|
59
|
-
*/
|
|
60
|
-
key = input(randomId('wr-tab'), /* @ts-ignore */
|
|
61
|
-
...(ngDevMode ? [{ debugName: "key" }] : /* istanbul ignore next */ []));
|
|
62
|
-
/** Router target — when set, the tab becomes a `[routerLink]` link. */
|
|
63
|
-
routerLink = input(null, /* @ts-ignore */
|
|
64
|
-
...(ngDevMode ? [{ debugName: "routerLink" }] : /* istanbul ignore next */ []));
|
|
65
|
-
/** Disable the tab. */
|
|
66
|
-
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: coerceBooleanProperty });
|
|
67
|
-
/** Tab content template; portaled into the parent's panel area. @internal */
|
|
68
|
-
contentTpl = viewChild.required(TemplateRef, /* @ts-ignore */
|
|
69
|
-
...(ngDevMode ? [{ debugName: "contentTpl" }] : /* istanbul ignore next */ []));
|
|
70
|
-
parent = inject(WR_TABS, { optional: true });
|
|
71
|
-
destroyRef = inject(DestroyRef);
|
|
72
|
-
/**
|
|
73
|
-
* The routing adapter published by `WrTabsRouting` on the parent `<wr-tabs>`
|
|
74
|
-
* element. A `<wr-tab>` is DECLARED inside `<wr-tabs>` in the consumer's
|
|
75
|
-
* template — content projection moves where it renders, not where it injects
|
|
76
|
-
* — so the parent's element injector is this one's, the same walk that
|
|
77
|
-
* resolves `WR_TABS` above.
|
|
78
|
-
*/
|
|
79
|
-
routing = inject(WR_TABS_ROUTING, { optional: true });
|
|
80
|
-
isRouter = computed(() => this.routerLink() !== null, /* @ts-ignore */
|
|
81
|
-
...(ngDevMode ? [{ debugName: "isRouter" }] : /* istanbul ignore next */ []));
|
|
82
|
-
/**
|
|
83
|
-
* Resolved href for a router tab — `null` for a content tab, and for a
|
|
84
|
-
* disabled one, which is how the anchor stops navigating at all.
|
|
85
|
-
* @internal
|
|
86
|
-
*/
|
|
87
|
-
routerHref = computed(() => {
|
|
88
|
-
const link = this.routerLink();
|
|
89
|
-
if (link === null || this.disabled())
|
|
90
|
-
return null;
|
|
91
|
-
return this.routing?.href(link) ?? null;
|
|
92
|
-
}, /* @ts-ignore */
|
|
93
|
-
...(ngDevMode ? [{ debugName: "routerHref" }] : /* istanbul ignore next */ []));
|
|
94
|
-
/**
|
|
95
|
-
* Whether the current route selects this tab. The strip publishes it as BOTH
|
|
96
|
-
* `aria-selected` and the `--active` class, off this one read, so the
|
|
97
|
-
* announced selection and the painted one cannot drift apart.
|
|
98
|
-
* @internal
|
|
99
|
-
*/
|
|
100
|
-
routerActive = computed(() => {
|
|
101
|
-
const link = this.routerLink();
|
|
102
|
-
if (link === null || this.disabled())
|
|
103
|
-
return false;
|
|
104
|
-
return this.routing?.isActive(link) ?? false;
|
|
105
|
-
}, /* @ts-ignore */
|
|
106
|
-
...(ngDevMode ? [{ debugName: "routerActive" }] : /* istanbul ignore next */ []));
|
|
107
|
-
/** Hand a click on this tab's anchor to the routing adapter. @internal */
|
|
108
|
-
navigate(event) {
|
|
109
|
-
const link = this.routerLink();
|
|
110
|
-
if (link === null || this.disabled())
|
|
111
|
-
return;
|
|
112
|
-
this.routing?.navigate(link, event);
|
|
113
|
-
}
|
|
114
|
-
constructor() {
|
|
115
|
-
if (this.parent) {
|
|
116
|
-
// Both calls run with the input signals still on their defaults — a
|
|
117
|
-
// constructor is too early for `key()` to be the consumer's value. The
|
|
118
|
-
// parent tracks tabs through `contentChildren` and seeds `active` from
|
|
119
|
-
// there; these stay as the declared lifecycle contract.
|
|
120
|
-
this.parent.register({ key: this.key(), routerLink: this.routerLink() });
|
|
121
|
-
this.destroyRef.onDestroy(() => this.parent?.unregister(this.key()));
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: WrTab, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
125
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.7", type: WrTab, isStandalone: true, selector: "wr-tab", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, key: { classPropertyName: "key", publicName: "key", isSignal: true, isRequired: false, transformFunction: null }, routerLink: { classPropertyName: "routerLink", publicName: "routerLink", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.display": "'none'" } }, viewQueries: [{ propertyName: "contentTpl", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], ngImport: i0, template: `<ng-template><ng-content /></ng-template>`, isInline: true, encapsulation: i0.ViewEncapsulation.None });
|
|
126
|
-
}
|
|
127
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: WrTab, decorators: [{
|
|
128
|
-
type: Component,
|
|
129
|
-
args: [{
|
|
130
|
-
selector: 'wr-tab',
|
|
131
|
-
template: `<ng-template><ng-content /></ng-template>`,
|
|
132
|
-
encapsulation: ViewEncapsulation.None,
|
|
133
|
-
// A BOUND display rather than a static `style` attribute: Angular writes a
|
|
134
|
-
// binding through `style.setProperty`, which no CSP governs, while a real
|
|
135
|
-
// `style="…"` attribute is refused under `style-src 'self'` — and this host
|
|
136
|
-
// would then lay out an empty box in the middle of the content.
|
|
137
|
-
host: { '[style.display]': "'none'" },
|
|
138
|
-
}]
|
|
139
|
-
}], ctorParameters: () => [], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], key: [{ type: i0.Input, args: [{ isSignal: true, alias: "key", required: false }] }], routerLink: [{ type: i0.Input, args: [{ isSignal: true, alias: "routerLink", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], contentTpl: [{ type: i0.ViewChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }] } });
|
|
140
|
-
|
|
15
|
+
* @license
|
|
16
|
+
*
|
|
17
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
18
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
19
|
+
*/
|
|
20
|
+
const WR_TABS_ROUTING = new InjectionToken("WR_TABS_ROUTING");
|
|
141
21
|
/**
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
22
|
+
* @license
|
|
23
|
+
*
|
|
24
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
25
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
26
|
+
*/
|
|
27
|
+
var WrTab = class WrTab {
|
|
28
|
+
title = input.required(...ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []);
|
|
29
|
+
key = input(randomId("wr-tab"), ...ngDevMode ? [{ debugName: "key" }] : /* istanbul ignore next */ []);
|
|
30
|
+
routerLink = input(null, ...ngDevMode ? [{ debugName: "routerLink" }] : /* istanbul ignore next */ []);
|
|
31
|
+
disabled = input(false, {
|
|
32
|
+
...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
|
|
33
|
+
transform: coerceBooleanProperty
|
|
34
|
+
});
|
|
35
|
+
contentTpl = viewChild.required(TemplateRef, ...ngDevMode ? [{ debugName: "contentTpl" }] : /* istanbul ignore next */ []);
|
|
36
|
+
parent = inject(WR_TABS, { optional: true });
|
|
37
|
+
destroyRef = inject(DestroyRef);
|
|
38
|
+
routing = inject(WR_TABS_ROUTING, { optional: true });
|
|
39
|
+
isRouter = computed(() => this.routerLink() !== null, ...ngDevMode ? [{ debugName: "isRouter" }] : /* istanbul ignore next */ []);
|
|
40
|
+
routerHref = computed(() => {
|
|
41
|
+
const link = this.routerLink();
|
|
42
|
+
if (link === null || this.disabled()) return null;
|
|
43
|
+
return this.routing?.href(link) ?? null;
|
|
44
|
+
}, ...ngDevMode ? [{ debugName: "routerHref" }] : /* istanbul ignore next */ []);
|
|
45
|
+
routerActive = computed(() => {
|
|
46
|
+
const link = this.routerLink();
|
|
47
|
+
if (link === null || this.disabled()) return false;
|
|
48
|
+
return this.routing?.isActive(link) ?? false;
|
|
49
|
+
}, ...ngDevMode ? [{ debugName: "routerActive" }] : /* istanbul ignore next */ []);
|
|
50
|
+
navigate(event) {
|
|
51
|
+
const link = this.routerLink();
|
|
52
|
+
if (link === null || this.disabled()) return;
|
|
53
|
+
this.routing?.navigate(link, event);
|
|
54
|
+
}
|
|
55
|
+
constructor() {
|
|
56
|
+
if (this.parent) {
|
|
57
|
+
this.parent.register({
|
|
58
|
+
key: this.key(),
|
|
59
|
+
routerLink: this.routerLink()
|
|
60
|
+
});
|
|
61
|
+
this.destroyRef.onDestroy(() => this.parent?.unregister(this.key()));
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
65
|
+
minVersion: "12.0.0",
|
|
66
|
+
version: "22.2.0",
|
|
67
|
+
ngImport: i0,
|
|
68
|
+
type: WrTab,
|
|
69
|
+
deps: [],
|
|
70
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
71
|
+
});
|
|
72
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
73
|
+
minVersion: "17.2.0",
|
|
74
|
+
version: "22.2.0",
|
|
75
|
+
type: WrTab,
|
|
76
|
+
isStandalone: true,
|
|
77
|
+
selector: "wr-tab",
|
|
78
|
+
inputs: {
|
|
79
|
+
title: {
|
|
80
|
+
classPropertyName: "title",
|
|
81
|
+
publicName: "title",
|
|
82
|
+
isSignal: true,
|
|
83
|
+
isRequired: true,
|
|
84
|
+
transformFunction: null
|
|
85
|
+
},
|
|
86
|
+
key: {
|
|
87
|
+
classPropertyName: "key",
|
|
88
|
+
publicName: "key",
|
|
89
|
+
isSignal: true,
|
|
90
|
+
isRequired: false,
|
|
91
|
+
transformFunction: null
|
|
92
|
+
},
|
|
93
|
+
routerLink: {
|
|
94
|
+
classPropertyName: "routerLink",
|
|
95
|
+
publicName: "routerLink",
|
|
96
|
+
isSignal: true,
|
|
97
|
+
isRequired: false,
|
|
98
|
+
transformFunction: null
|
|
99
|
+
},
|
|
100
|
+
disabled: {
|
|
101
|
+
classPropertyName: "disabled",
|
|
102
|
+
publicName: "disabled",
|
|
103
|
+
isSignal: true,
|
|
104
|
+
isRequired: false,
|
|
105
|
+
transformFunction: null
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
host: { properties: { "style.display": "'none'" } },
|
|
109
|
+
viewQueries: [{
|
|
110
|
+
propertyName: "contentTpl",
|
|
111
|
+
first: true,
|
|
112
|
+
predicate: TemplateRef,
|
|
113
|
+
descendants: true,
|
|
114
|
+
isSignal: true
|
|
115
|
+
}],
|
|
116
|
+
ngImport: i0,
|
|
117
|
+
template: `<ng-template><ng-content /></ng-template>`,
|
|
118
|
+
isInline: true,
|
|
119
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
120
|
+
});
|
|
121
|
+
};
|
|
122
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
123
|
+
minVersion: "12.0.0",
|
|
124
|
+
version: "22.2.0",
|
|
125
|
+
ngImport: i0,
|
|
126
|
+
type: WrTab,
|
|
127
|
+
decorators: [{
|
|
128
|
+
type: Component,
|
|
129
|
+
args: [{
|
|
130
|
+
selector: "wr-tab",
|
|
131
|
+
template: `<ng-template><ng-content /></ng-template>`,
|
|
132
|
+
encapsulation: ViewEncapsulation.None,
|
|
133
|
+
host: { "[style.display]": "'none'" }
|
|
134
|
+
}]
|
|
135
|
+
}],
|
|
136
|
+
ctorParameters: () => [],
|
|
137
|
+
propDecorators: {
|
|
138
|
+
title: [{
|
|
139
|
+
type: i0.Input,
|
|
140
|
+
args: [{
|
|
141
|
+
isSignal: true,
|
|
142
|
+
alias: "title",
|
|
143
|
+
required: true
|
|
144
|
+
}]
|
|
145
|
+
}],
|
|
146
|
+
key: [{
|
|
147
|
+
type: i0.Input,
|
|
148
|
+
args: [{
|
|
149
|
+
isSignal: true,
|
|
150
|
+
alias: "key",
|
|
151
|
+
required: false
|
|
152
|
+
}]
|
|
153
|
+
}],
|
|
154
|
+
routerLink: [{
|
|
155
|
+
type: i0.Input,
|
|
156
|
+
args: [{
|
|
157
|
+
isSignal: true,
|
|
158
|
+
alias: "routerLink",
|
|
159
|
+
required: false
|
|
160
|
+
}]
|
|
161
|
+
}],
|
|
162
|
+
disabled: [{
|
|
163
|
+
type: i0.Input,
|
|
164
|
+
args: [{
|
|
165
|
+
isSignal: true,
|
|
166
|
+
alias: "disabled",
|
|
167
|
+
required: false
|
|
168
|
+
}]
|
|
169
|
+
}],
|
|
170
|
+
contentTpl: [{
|
|
171
|
+
type: i0.ViewChild,
|
|
172
|
+
args: [i0.forwardRef(() => TemplateRef), { isSignal: true }]
|
|
173
|
+
}]
|
|
174
|
+
}
|
|
175
|
+
});
|
|
147
176
|
/**
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
* `wr-tab-overview-header` twice, and the second group's `aria-labelledby`
|
|
154
|
-
* resolved to the FIRST group's tab. A key is documented as parent-scoped, so
|
|
155
|
-
* it is the parent that has to make it unique document-wide.
|
|
156
|
-
*/
|
|
177
|
+
* @license
|
|
178
|
+
*
|
|
179
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
180
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
181
|
+
*/
|
|
157
182
|
let tabsUid = 0;
|
|
158
|
-
/**
|
|
159
|
-
* A tab key as an id fragment: anything outside `[A-Za-z0-9_-]` becomes `-`.
|
|
160
|
-
* These ids land in `aria-controls` / `aria-labelledby`, which are
|
|
161
|
-
* space-separated IDREF lists — `key="my tab"` emitted
|
|
162
|
-
* `aria-controls="wr-tab-my tab-panel"`, two tokens, neither of which resolves.
|
|
163
|
-
*
|
|
164
|
-
* Two keys differing only outside that set collapse to one fragment; the
|
|
165
|
-
* instance counter keeps that inside a single group, where the keys are the
|
|
166
|
-
* consumer's own to keep apart.
|
|
167
|
-
*/
|
|
168
183
|
function idFragment(key) {
|
|
169
|
-
|
|
170
|
-
}
|
|
171
|
-
/**
|
|
172
|
-
* Tabbed container. Two modes depending on the child `<wr-tab>`
|
|
173
|
-
* definitions:
|
|
174
|
-
*
|
|
175
|
-
* - **Content** — children project body content; the parent renders an
|
|
176
|
-
* active-tab panel automatically.
|
|
177
|
-
* - **Router** — any child with `routerLink` switches the whole strip
|
|
178
|
-
* into router mode; the parent skips its panel so the consumer can
|
|
179
|
-
* drop a `<router-outlet>` after it. That mode needs the `WrTabsRouting`
|
|
180
|
-
* directive from `ngwr/tabs/router` alongside `WrTabs` in `imports: []`
|
|
181
|
-
* — the strip itself names no `@angular/router` symbol, which is what
|
|
182
|
-
* keeps a content-only strip free of the router.
|
|
183
|
-
*
|
|
184
|
-
* @example
|
|
185
|
-
* ```html
|
|
186
|
-
* <!-- content tabs -->
|
|
187
|
-
* <wr-tabs [(active)]="key">
|
|
188
|
-
* <wr-tab key="one" title="One">First panel</wr-tab>
|
|
189
|
-
* <wr-tab key="two" title="Two">Second panel</wr-tab>
|
|
190
|
-
* </wr-tabs>
|
|
191
|
-
*
|
|
192
|
-
* <!-- router tabs: imports: [WrTabs, WrTab, WrTabsRouting] -->
|
|
193
|
-
* <wr-tabs>
|
|
194
|
-
* <wr-tab title="Overview" routerLink="overview" />
|
|
195
|
-
* <wr-tab title="Details" routerLink="details" />
|
|
196
|
-
* </wr-tabs>
|
|
197
|
-
* <router-outlet />
|
|
198
|
-
* ```
|
|
199
|
-
*
|
|
200
|
-
* @see https://ngwr.dev/reference/components/tabs
|
|
201
|
-
*/
|
|
202
|
-
class WrTabs {
|
|
203
|
-
/** Two-way bindable active tab key (content mode). */
|
|
204
|
-
active = model(null, /* @ts-ignore */
|
|
205
|
-
...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
|
|
206
|
-
/** Visual size variant. */
|
|
207
|
-
size = input('md', /* @ts-ignore */
|
|
208
|
-
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
209
|
-
tabs = contentChildren(WrTab, /* @ts-ignore */
|
|
210
|
-
...(ngDevMode ? [{ debugName: "tabs" }] : /* istanbul ignore next */ []));
|
|
211
|
-
dir = inject(Directionality, { optional: true });
|
|
212
|
-
/**
|
|
213
|
-
* Reading direction of the strip. `Directionality` is root-provided, so this
|
|
214
|
-
* always resolves — `optional` only guards a consumer who has deliberately
|
|
215
|
-
* torn the provider out. It reads the document once at construction; a
|
|
216
|
-
* subtree that overrides the direction does it with the CDK's `Dir`
|
|
217
|
-
* directive, which writes `valueSignal`, so the read stays reactive.
|
|
218
|
-
*/
|
|
219
|
-
isRtl = computed(() => this.dir?.valueSignal() === 'rtl', /* @ts-ignore */
|
|
220
|
-
...(ngDevMode ? [{ debugName: "isRtl" }] : /* istanbul ignore next */ []));
|
|
221
|
-
/**
|
|
222
|
-
* The routing adapter, when `WrTabsRouting` from `ngwr/tabs/router` is in the
|
|
223
|
-
* consumer's `imports`. `null` is the default and the whole point: the strip
|
|
224
|
-
* has no `@angular/router` import of its own, so a content-only tab strip
|
|
225
|
-
* costs no router bytes.
|
|
226
|
-
*/
|
|
227
|
-
routing = inject(WR_TABS_ROUTING, { optional: true });
|
|
228
|
-
/**
|
|
229
|
-
* When any child has a routerLink, the whole strip switches to router mode.
|
|
230
|
-
*
|
|
231
|
-
* Throws rather than degrading when the adapter is missing. Falling back to
|
|
232
|
-
* content mode would render the tabs as `<button>`s that navigate nowhere and
|
|
233
|
-
* open an empty panel — a strip that looks right and does nothing, with the
|
|
234
|
-
* one missing import unnamed. The route is what selects a tab here, so there
|
|
235
|
-
* is no half of this that still works.
|
|
236
|
-
*/
|
|
237
|
-
isRouter = computed(() => {
|
|
238
|
-
const isRouter = this.tabs().some(t => t.routerLink() !== null);
|
|
239
|
-
if (isRouter && !this.routing) {
|
|
240
|
-
throw new Error('<wr-tabs>: a <wr-tab> sets `routerLink`, but no routing adapter is provided. ' +
|
|
241
|
-
"Add `WrTabsRouting` from 'ngwr/tabs/router' to the `imports` of the component that " +
|
|
242
|
-
'declares this strip.');
|
|
243
|
-
}
|
|
244
|
-
return isRouter;
|
|
245
|
-
}, /* @ts-ignore */
|
|
246
|
-
...(ngDevMode ? [{ debugName: "isRouter" }] : /* istanbul ignore next */ []));
|
|
247
|
-
/** Content-mode: the tab whose key matches `active()` (or the first tab if none yet). */
|
|
248
|
-
activeTab = computed(() => {
|
|
249
|
-
const key = this.active();
|
|
250
|
-
const tabs = this.tabs();
|
|
251
|
-
if (tabs.length === 0)
|
|
252
|
-
return null;
|
|
253
|
-
return tabs.find(t => t.key() === key) ?? tabs[0];
|
|
254
|
-
}, /* @ts-ignore */
|
|
255
|
-
...(ngDevMode ? [{ debugName: "activeTab" }] : /* istanbul ignore next */ []));
|
|
256
|
-
// WrTabsContext
|
|
257
|
-
activate(key) {
|
|
258
|
-
this.active.set(key);
|
|
259
|
-
}
|
|
260
|
-
register() {
|
|
261
|
-
// Deliberately a no-op. A `WrTab` calls this from its own constructor,
|
|
262
|
-
// where its `key` signal input is not bound yet — so it would report the
|
|
263
|
-
// generated default and this parent would write THAT into `active`. The
|
|
264
|
-
// effect below seeds from `tabs()`, by which point the inputs are real.
|
|
265
|
-
}
|
|
266
|
-
unregister() {
|
|
267
|
-
// No-op: contentChildren handles removal.
|
|
268
|
-
}
|
|
269
|
-
// Template handlers
|
|
270
|
-
stripRef = viewChild('strip', /* @ts-ignore */
|
|
271
|
-
...(ngDevMode ? [{ debugName: "stripRef" }] : /* istanbul ignore next */ []));
|
|
272
|
-
/** Whether the strip is scrolled away from its start / end — drives the edge fades. */
|
|
273
|
-
canScrollStart = signal(false, /* @ts-ignore */
|
|
274
|
-
...(ngDevMode ? [{ debugName: "canScrollStart" }] : /* istanbul ignore next */ []));
|
|
275
|
-
canScrollEnd = signal(false, /* @ts-ignore */
|
|
276
|
-
...(ngDevMode ? [{ debugName: "canScrollEnd" }] : /* istanbul ignore next */ []));
|
|
277
|
-
constructor() {
|
|
278
|
-
// Seed `active` with the first tab's key, once the content children exist
|
|
279
|
-
// and their inputs are bound. Without this the model writes back a
|
|
280
|
-
// generated id like `wr-tab-b1crta5aix0v`: the strip still highlighted the
|
|
281
|
-
// right tab, because `activeTab()` falls back to `tabs[0]`, so the only
|
|
282
|
-
// visible symptom was a two-way binding holding a key the consumer had
|
|
283
|
-
// never heard of.
|
|
284
|
-
effect(() => {
|
|
285
|
-
const tabs = this.tabs();
|
|
286
|
-
if (tabs.length > 0 && this.active() === null)
|
|
287
|
-
this.active.set(tabs[0].key());
|
|
288
|
-
});
|
|
289
|
-
const destroyRef = inject(DestroyRef);
|
|
290
|
-
afterNextRender(() => {
|
|
291
|
-
this.updateFades();
|
|
292
|
-
const el = this.stripRef()?.nativeElement;
|
|
293
|
-
if (!el || typeof ResizeObserver === 'undefined')
|
|
294
|
-
return;
|
|
295
|
-
// Re-evaluate when the strip's width changes (e.g. the container narrows
|
|
296
|
-
// and the tabs start overflowing).
|
|
297
|
-
const ro = new ResizeObserver(() => this.updateFades());
|
|
298
|
-
ro.observe(el);
|
|
299
|
-
destroyRef.onDestroy(() => ro.disconnect());
|
|
300
|
-
});
|
|
301
|
-
}
|
|
302
|
-
/** Recompute which edges can scroll, from the strip's scroll metrics. @internal */
|
|
303
|
-
updateFades() {
|
|
304
|
-
const el = this.stripRef()?.nativeElement;
|
|
305
|
-
if (!el)
|
|
306
|
-
return;
|
|
307
|
-
const max = el.scrollWidth - el.clientWidth;
|
|
308
|
-
// Distance from the INLINE start, which is what the two fades mean.
|
|
309
|
-
// `scrollLeft` is 0 at the inline start in BOTH directions and counts away
|
|
310
|
-
// from it — up in LTR, DOWN into negatives under `dir="rtl"` (the CSSOM
|
|
311
|
-
// model every engine Angular 22 supports now implements; the legacy
|
|
312
|
-
// "reversed"/"normal" RTL conventions are gone). Read raw, the RTL value
|
|
313
|
-
// said "never scrolled from the start, always more to come" at every
|
|
314
|
-
// position: the end fade was pinned on and the start fade never appeared.
|
|
315
|
-
//
|
|
316
|
-
// Clamped rather than `Math.abs`, because an elastic overscroll reports a
|
|
317
|
-
// value of the WRONG sign at the start edge — a rubber-band past the start
|
|
318
|
-
// is still the start, and `abs` would light the start fade there in LTR too.
|
|
319
|
-
const scrolled = this.isRtl() ? Math.max(-el.scrollLeft, 0) : Math.max(el.scrollLeft, 0);
|
|
320
|
-
this.canScrollStart.set(scrolled > 1);
|
|
321
|
-
this.canScrollEnd.set(max > 1 && scrolled < max - 1);
|
|
322
|
-
}
|
|
323
|
-
onTabClick(tab) {
|
|
324
|
-
if (tab.disabled())
|
|
325
|
-
return;
|
|
326
|
-
if (!this.isRouter())
|
|
327
|
-
this.activate(tab.key());
|
|
328
|
-
}
|
|
329
|
-
/**
|
|
330
|
-
* Click on a router tab's anchor. The anchor carries a real `href`, so a
|
|
331
|
-
* modified or middle click is left alone and the browser opens it the way it
|
|
332
|
-
* opens any link; only a plain left click is turned into a navigation.
|
|
333
|
-
*/
|
|
334
|
-
onRouterTabClick(tab, event) {
|
|
335
|
-
tab.navigate(event);
|
|
336
|
-
}
|
|
337
|
-
/** Per-instance prefix, so keys only have to be unique within one group. */
|
|
338
|
-
uid = ++tabsUid;
|
|
339
|
-
/** Header id for `aria-labelledby` on the panel. @internal */
|
|
340
|
-
headerId(key) {
|
|
341
|
-
return `wr-tabs-${this.uid}-tab-${idFragment(key)}-header`;
|
|
342
|
-
}
|
|
343
|
-
/** Panel id for `aria-controls` on the tab header. @internal */
|
|
344
|
-
panelId(key) {
|
|
345
|
-
return `wr-tabs-${this.uid}-tab-${idFragment(key)}-panel`;
|
|
346
|
-
}
|
|
347
|
-
/** ArrowLeft/Right/Home/End keyboard navigation on the tab strip. */
|
|
348
|
-
onStripKeydown(event) {
|
|
349
|
-
const tabs = this.tabs().filter(t => !t.disabled());
|
|
350
|
-
if (tabs.length === 0)
|
|
351
|
-
return;
|
|
352
|
-
// Step from where FOCUS is, not from what is active.
|
|
353
|
-
//
|
|
354
|
-
// In router mode nothing ever moves `active` — `onTabClick` and this
|
|
355
|
-
// handler both gate `activate()` on `!isRouter()`, because the route is
|
|
356
|
-
// what selects a tab there. Reading the neighbour off `activeTab()`
|
|
357
|
-
// therefore recomputed the same `idx` on every press, and ArrowRight
|
|
358
|
-
// walked from the first tab to the second and stayed there for the rest of
|
|
359
|
-
// the session. In manual mode focus and activation move together, so the
|
|
360
|
-
// two readings agree and nothing changes.
|
|
361
|
-
const strip = this.stripRef()?.nativeElement;
|
|
362
|
-
const focused = strip?.ownerDocument.activeElement;
|
|
363
|
-
const focusedIdx = focused instanceof HTMLElement && strip?.contains(focused)
|
|
364
|
-
? tabs.findIndex(t => this.headerId(t.key()) === focused.id)
|
|
365
|
-
: -1;
|
|
366
|
-
const active = this.activeTab();
|
|
367
|
-
const idx = focusedIdx >= 0 ? focusedIdx : active ? tabs.indexOf(active) : -1;
|
|
368
|
-
// The two neighbours in DOM order, wrapping at the ends.
|
|
369
|
-
const forward = idx < tabs.length - 1 ? idx + 1 : 0;
|
|
370
|
-
const backward = idx > 0 ? idx - 1 : tabs.length - 1;
|
|
371
|
-
const rtl = this.isRtl();
|
|
372
|
-
let nextIdx;
|
|
373
|
-
switch (event.key) {
|
|
374
|
-
// Arrow keys follow VISUAL order (WAI-ARIA APG). The strip is mirrored
|
|
375
|
-
// under `dir="rtl"`, so ArrowRight moves toward the visual right, which is
|
|
376
|
-
// the PREVIOUS tab there.
|
|
377
|
-
case 'ArrowRight':
|
|
378
|
-
nextIdx = rtl ? backward : forward;
|
|
379
|
-
break;
|
|
380
|
-
case 'ArrowLeft':
|
|
381
|
-
nextIdx = rtl ? forward : backward;
|
|
382
|
-
break;
|
|
383
|
-
// Home / End name a position in the tab list — first and last — not a
|
|
384
|
-
// physical edge, so they read the same in both directions.
|
|
385
|
-
case 'Home':
|
|
386
|
-
nextIdx = 0;
|
|
387
|
-
break;
|
|
388
|
-
case 'End':
|
|
389
|
-
nextIdx = tabs.length - 1;
|
|
390
|
-
break;
|
|
391
|
-
default:
|
|
392
|
-
return;
|
|
393
|
-
}
|
|
394
|
-
event.preventDefault();
|
|
395
|
-
const next = tabs[nextIdx];
|
|
396
|
-
if (!this.isRouter())
|
|
397
|
-
this.activate(next.key());
|
|
398
|
-
// Move focus to the corresponding header element.
|
|
399
|
-
const headerEl = this.stripRef()?.nativeElement.querySelector(`#${CSS.escape(this.headerId(next.key()))}`);
|
|
400
|
-
headerEl?.focus();
|
|
401
|
-
}
|
|
402
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: WrTabs, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
403
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: WrTabs, isStandalone: true, selector: "wr-tabs", inputs: { active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { active: "activeChange" }, host: { properties: { "class.wr-tabs--fade-start": "canScrollStart()", "class.wr-tabs--fade-end": "canScrollEnd()", "class.wr-tabs--sm": "size() === 'sm'", "class.wr-tabs--lg": "size() === 'lg'" }, classAttribute: "wr-tabs" }, providers: [
|
|
404
|
-
{
|
|
405
|
-
provide: WR_TABS,
|
|
406
|
-
// eslint-disable-next-line @angular-eslint/no-forward-ref
|
|
407
|
-
useExisting: forwardRef(() => WrTabs),
|
|
408
|
-
},
|
|
409
|
-
], queries: [{ propertyName: "tabs", predicate: WrTab, isSignal: true }], viewQueries: [{ propertyName: "stripRef", first: true, predicate: ["strip"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n<div\n #strip\n class=\"wr-tabs__strip\"\n role=\"tablist\"\n aria-orientation=\"horizontal\"\n (keydown)=\"onStripKeydown($event)\"\n (scroll)=\"updateFades()\"\n>\n @for (tab of tabs(); track tab.key()) {\n @if (tab.routerLink() !== null) {\n <!--\n `aria-selected` and `--active` come off the SAME `tab.routerActive()`, so the\n announced state and the painted one can never disagree. Without it a\n `role=\"tablist\"` shipped with no tab selected in any of them: the route decides\n here, and the class it paints is invisible to assistive tech.\n\n A real `href` rather than a `[routerLink]`: the directive would drag\n `@angular/router` into every content-only strip as well (see `WR_TABS_ROUTING`).\n The href, the active match and the click all come from the adapter the\n `ngwr/tabs/router` directive publishes, which is `RouterLink` doing the work.\n -->\n <a\n class=\"wr-tabs__tab\"\n role=\"tab\"\n [attr.id]=\"headerId(tab.key())\"\n [attr.href]=\"tab.routerHref()\"\n [class.wr-tabs__tab--active]=\"tab.routerActive()\"\n [class.wr-tabs__tab--disabled]=\"tab.disabled()\"\n [attr.aria-disabled]=\"tab.disabled() ? true : null\"\n [attr.aria-selected]=\"tab.routerActive()\"\n [attr.tabindex]=\"tab.disabled() ? -1 : 0\"\n (click)=\"onRouterTabClick(tab, $event)\"\n >\n {{ tab.title() }}\n </a>\n } @else {\n <button\n type=\"button\"\n class=\"wr-tabs__tab\"\n role=\"tab\"\n [attr.id]=\"headerId(tab.key())\"\n [attr.aria-controls]=\"panelId(tab.key())\"\n [attr.tabindex]=\"tab === activeTab() && !tab.disabled() ? 0 : -1\"\n [class.wr-tabs__tab--active]=\"tab === activeTab()\"\n [class.wr-tabs__tab--disabled]=\"tab.disabled()\"\n [attr.aria-selected]=\"tab === activeTab()\"\n [disabled]=\"tab.disabled()\"\n (click)=\"onTabClick(tab)\"\n >\n {{ tab.title() }}\n </button>\n }\n }\n</div>\n\n@if (!isRouter() && activeTab(); as tab) {\n <div\n class=\"wr-tabs__panel\"\n role=\"tabpanel\"\n tabindex=\"0\"\n [attr.id]=\"panelId(tab.key())\"\n [attr.aria-labelledby]=\"headerId(tab.key())\"\n >\n <ng-container [ngTemplateOutlet]=\"tab.contentTpl()\" />\n </div>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
184
|
+
return key.replace(/[^A-Za-z0-9_-]/g, "-");
|
|
410
185
|
}
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
186
|
+
var WrTabs = class WrTabs {
|
|
187
|
+
active = model(null, ...ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []);
|
|
188
|
+
size = input("md", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
|
|
189
|
+
tabs = contentChildren(WrTab, ...ngDevMode ? [{ debugName: "tabs" }] : /* istanbul ignore next */ []);
|
|
190
|
+
dir = inject(Directionality, { optional: true });
|
|
191
|
+
isRtl = computed(() => this.dir?.valueSignal() === "rtl", ...ngDevMode ? [{ debugName: "isRtl" }] : /* istanbul ignore next */ []);
|
|
192
|
+
routing = inject(WR_TABS_ROUTING, { optional: true });
|
|
193
|
+
isRouter = computed(() => {
|
|
194
|
+
const isRouter = this.tabs().some((t) => t.routerLink() !== null);
|
|
195
|
+
if (isRouter && !this.routing) throw new Error("<wr-tabs>: a <wr-tab> sets `routerLink`, but no routing adapter is provided. Add `WrTabsRouting` from 'ngwr/tabs/router' to the `imports` of the component that declares this strip.");
|
|
196
|
+
return isRouter;
|
|
197
|
+
}, ...ngDevMode ? [{ debugName: "isRouter" }] : /* istanbul ignore next */ []);
|
|
198
|
+
activeTab = computed(() => {
|
|
199
|
+
const key = this.active();
|
|
200
|
+
const tabs = this.tabs();
|
|
201
|
+
if (tabs.length === 0) return null;
|
|
202
|
+
return tabs.find((t) => t.key() === key) ?? tabs[0];
|
|
203
|
+
}, ...ngDevMode ? [{ debugName: "activeTab" }] : /* istanbul ignore next */ []);
|
|
204
|
+
activate(key) {
|
|
205
|
+
this.active.set(key);
|
|
206
|
+
}
|
|
207
|
+
register() {}
|
|
208
|
+
unregister() {}
|
|
209
|
+
stripRef = viewChild("strip", ...ngDevMode ? [{ debugName: "stripRef" }] : /* istanbul ignore next */ []);
|
|
210
|
+
canScrollStart = signal(false, ...ngDevMode ? [{ debugName: "canScrollStart" }] : /* istanbul ignore next */ []);
|
|
211
|
+
canScrollEnd = signal(false, ...ngDevMode ? [{ debugName: "canScrollEnd" }] : /* istanbul ignore next */ []);
|
|
212
|
+
constructor() {
|
|
213
|
+
effect(() => {
|
|
214
|
+
const tabs = this.tabs();
|
|
215
|
+
if (tabs.length > 0 && this.active() === null) this.active.set(tabs[0].key());
|
|
216
|
+
});
|
|
217
|
+
const destroyRef = inject(DestroyRef);
|
|
218
|
+
afterNextRender(() => {
|
|
219
|
+
this.updateFades();
|
|
220
|
+
const el = this.stripRef()?.nativeElement;
|
|
221
|
+
if (!el || typeof ResizeObserver === "undefined") return;
|
|
222
|
+
const ro = new ResizeObserver(() => this.updateFades());
|
|
223
|
+
ro.observe(el);
|
|
224
|
+
destroyRef.onDestroy(() => ro.disconnect());
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
updateFades() {
|
|
228
|
+
const el = this.stripRef()?.nativeElement;
|
|
229
|
+
if (!el) return;
|
|
230
|
+
const max = el.scrollWidth - el.clientWidth;
|
|
231
|
+
const scrolled = this.isRtl() ? Math.max(-el.scrollLeft, 0) : Math.max(el.scrollLeft, 0);
|
|
232
|
+
this.canScrollStart.set(scrolled > 1);
|
|
233
|
+
this.canScrollEnd.set(max > 1 && scrolled < max - 1);
|
|
234
|
+
}
|
|
235
|
+
onTabClick(tab) {
|
|
236
|
+
if (tab.disabled()) return;
|
|
237
|
+
if (!this.isRouter()) this.activate(tab.key());
|
|
238
|
+
}
|
|
239
|
+
onRouterTabClick(tab, event) {
|
|
240
|
+
tab.navigate(event);
|
|
241
|
+
}
|
|
242
|
+
uid = ++tabsUid;
|
|
243
|
+
headerId(key) {
|
|
244
|
+
return `wr-tabs-${this.uid}-tab-${idFragment(key)}-header`;
|
|
245
|
+
}
|
|
246
|
+
panelId(key) {
|
|
247
|
+
return `wr-tabs-${this.uid}-tab-${idFragment(key)}-panel`;
|
|
248
|
+
}
|
|
249
|
+
onStripKeydown(event) {
|
|
250
|
+
const tabs = this.tabs().filter((t) => !t.disabled());
|
|
251
|
+
if (tabs.length === 0) return;
|
|
252
|
+
const strip = this.stripRef()?.nativeElement;
|
|
253
|
+
const focused = strip?.ownerDocument.activeElement;
|
|
254
|
+
const focusedIdx = focused instanceof HTMLElement && strip?.contains(focused) ? tabs.findIndex((t) => this.headerId(t.key()) === focused.id) : -1;
|
|
255
|
+
const active = this.activeTab();
|
|
256
|
+
const idx = focusedIdx >= 0 ? focusedIdx : active ? tabs.indexOf(active) : -1;
|
|
257
|
+
const forward = idx < tabs.length - 1 ? idx + 1 : 0;
|
|
258
|
+
const backward = idx > 0 ? idx - 1 : tabs.length - 1;
|
|
259
|
+
const rtl = this.isRtl();
|
|
260
|
+
let nextIdx;
|
|
261
|
+
switch (event.key) {
|
|
262
|
+
case "ArrowRight":
|
|
263
|
+
nextIdx = rtl ? backward : forward;
|
|
264
|
+
break;
|
|
265
|
+
case "ArrowLeft":
|
|
266
|
+
nextIdx = rtl ? forward : backward;
|
|
267
|
+
break;
|
|
268
|
+
case "Home":
|
|
269
|
+
nextIdx = 0;
|
|
270
|
+
break;
|
|
271
|
+
case "End":
|
|
272
|
+
nextIdx = tabs.length - 1;
|
|
273
|
+
break;
|
|
274
|
+
default: return;
|
|
275
|
+
}
|
|
276
|
+
event.preventDefault();
|
|
277
|
+
const next = tabs[nextIdx];
|
|
278
|
+
if (!this.isRouter()) this.activate(next.key());
|
|
279
|
+
(this.stripRef()?.nativeElement.querySelector(`#${CSS.escape(this.headerId(next.key()))}`))?.focus();
|
|
280
|
+
}
|
|
281
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
282
|
+
minVersion: "12.0.0",
|
|
283
|
+
version: "22.2.0",
|
|
284
|
+
ngImport: i0,
|
|
285
|
+
type: WrTabs,
|
|
286
|
+
deps: [],
|
|
287
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
288
|
+
});
|
|
289
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
290
|
+
minVersion: "17.0.0",
|
|
291
|
+
version: "22.2.0",
|
|
292
|
+
type: WrTabs,
|
|
293
|
+
isStandalone: true,
|
|
294
|
+
selector: "wr-tabs",
|
|
295
|
+
inputs: {
|
|
296
|
+
active: {
|
|
297
|
+
classPropertyName: "active",
|
|
298
|
+
publicName: "active",
|
|
299
|
+
isSignal: true,
|
|
300
|
+
isRequired: false,
|
|
301
|
+
transformFunction: null
|
|
302
|
+
},
|
|
303
|
+
size: {
|
|
304
|
+
classPropertyName: "size",
|
|
305
|
+
publicName: "size",
|
|
306
|
+
isSignal: true,
|
|
307
|
+
isRequired: false,
|
|
308
|
+
transformFunction: null
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
outputs: { active: "activeChange" },
|
|
312
|
+
host: {
|
|
313
|
+
properties: {
|
|
314
|
+
"class.wr-tabs--fade-start": "canScrollStart()",
|
|
315
|
+
"class.wr-tabs--fade-end": "canScrollEnd()",
|
|
316
|
+
"class.wr-tabs--sm": "size() === 'sm'",
|
|
317
|
+
"class.wr-tabs--lg": "size() === 'lg'"
|
|
318
|
+
},
|
|
319
|
+
classAttribute: "wr-tabs"
|
|
320
|
+
},
|
|
321
|
+
providers: [{
|
|
322
|
+
provide: WR_TABS,
|
|
323
|
+
useExisting: forwardRef(() => WrTabs)
|
|
324
|
+
}],
|
|
325
|
+
queries: [{
|
|
326
|
+
propertyName: "tabs",
|
|
327
|
+
predicate: WrTab,
|
|
328
|
+
isSignal: true
|
|
329
|
+
}],
|
|
330
|
+
viewQueries: [{
|
|
331
|
+
propertyName: "stripRef",
|
|
332
|
+
first: true,
|
|
333
|
+
predicate: ["strip"],
|
|
334
|
+
descendants: true,
|
|
335
|
+
isSignal: true
|
|
336
|
+
}],
|
|
337
|
+
ngImport: i0,
|
|
338
|
+
template: "<!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n<div\n #strip\n class=\"wr-tabs__strip\"\n role=\"tablist\"\n aria-orientation=\"horizontal\"\n (keydown)=\"onStripKeydown($event)\"\n (scroll)=\"updateFades()\"\n>\n @for (tab of tabs(); track tab.key()) {\n @if (tab.routerLink() !== null) {\n <!--\n `aria-selected` and `--active` come off the SAME `tab.routerActive()`, so the\n announced state and the painted one can never disagree. Without it a\n `role=\"tablist\"` shipped with no tab selected in any of them: the route decides\n here, and the class it paints is invisible to assistive tech.\n\n A real `href` rather than a `[routerLink]`: the directive would drag\n `@angular/router` into every content-only strip as well (see `WR_TABS_ROUTING`).\n The href, the active match and the click all come from the adapter the\n `ngwr/tabs/router` directive publishes, which is `RouterLink` doing the work.\n -->\n <a\n class=\"wr-tabs__tab\"\n role=\"tab\"\n [attr.id]=\"headerId(tab.key())\"\n [attr.href]=\"tab.routerHref()\"\n [class.wr-tabs__tab--active]=\"tab.routerActive()\"\n [class.wr-tabs__tab--disabled]=\"tab.disabled()\"\n [attr.aria-disabled]=\"tab.disabled() ? true : null\"\n [attr.aria-selected]=\"tab.routerActive()\"\n [attr.tabindex]=\"tab.disabled() ? -1 : 0\"\n (click)=\"onRouterTabClick(tab, $event)\"\n >\n {{ tab.title() }}\n </a>\n } @else {\n <button\n type=\"button\"\n class=\"wr-tabs__tab\"\n role=\"tab\"\n [attr.id]=\"headerId(tab.key())\"\n [attr.aria-controls]=\"panelId(tab.key())\"\n [attr.tabindex]=\"tab === activeTab() && !tab.disabled() ? 0 : -1\"\n [class.wr-tabs__tab--active]=\"tab === activeTab()\"\n [class.wr-tabs__tab--disabled]=\"tab.disabled()\"\n [attr.aria-selected]=\"tab === activeTab()\"\n [disabled]=\"tab.disabled()\"\n (click)=\"onTabClick(tab)\"\n >\n {{ tab.title() }}\n </button>\n }\n }\n</div>\n\n@if (!isRouter() && activeTab(); as tab) {\n <div\n class=\"wr-tabs__panel\"\n role=\"tabpanel\"\n tabindex=\"0\"\n [attr.id]=\"panelId(tab.key())\"\n [attr.aria-labelledby]=\"headerId(tab.key())\"\n >\n <ng-container [ngTemplateOutlet]=\"tab.contentTpl()\" />\n </div>\n}\n",
|
|
339
|
+
dependencies: [{
|
|
340
|
+
kind: "directive",
|
|
341
|
+
type: NgTemplateOutlet,
|
|
342
|
+
selector: "[ngTemplateOutlet]",
|
|
343
|
+
inputs: [
|
|
344
|
+
"ngTemplateOutletContext",
|
|
345
|
+
"ngTemplateOutlet",
|
|
346
|
+
"ngTemplateOutletInjector"
|
|
347
|
+
]
|
|
348
|
+
}],
|
|
349
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
350
|
+
});
|
|
351
|
+
};
|
|
352
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
353
|
+
minVersion: "12.0.0",
|
|
354
|
+
version: "22.2.0",
|
|
355
|
+
ngImport: i0,
|
|
356
|
+
type: WrTabs,
|
|
357
|
+
decorators: [{
|
|
358
|
+
type: Component,
|
|
359
|
+
args: [{
|
|
360
|
+
selector: "wr-tabs",
|
|
361
|
+
encapsulation: ViewEncapsulation.None,
|
|
362
|
+
host: {
|
|
363
|
+
class: "wr-tabs",
|
|
364
|
+
"[class.wr-tabs--fade-start]": "canScrollStart()",
|
|
365
|
+
"[class.wr-tabs--fade-end]": "canScrollEnd()",
|
|
366
|
+
"[class.wr-tabs--sm]": "size() === 'sm'",
|
|
367
|
+
"[class.wr-tabs--lg]": "size() === 'lg'"
|
|
368
|
+
},
|
|
369
|
+
imports: [NgTemplateOutlet],
|
|
370
|
+
providers: [{
|
|
371
|
+
provide: WR_TABS,
|
|
372
|
+
useExisting: forwardRef(() => WrTabs)
|
|
373
|
+
}],
|
|
374
|
+
template: "<!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n<div\n #strip\n class=\"wr-tabs__strip\"\n role=\"tablist\"\n aria-orientation=\"horizontal\"\n (keydown)=\"onStripKeydown($event)\"\n (scroll)=\"updateFades()\"\n>\n @for (tab of tabs(); track tab.key()) {\n @if (tab.routerLink() !== null) {\n <!--\n `aria-selected` and `--active` come off the SAME `tab.routerActive()`, so the\n announced state and the painted one can never disagree. Without it a\n `role=\"tablist\"` shipped with no tab selected in any of them: the route decides\n here, and the class it paints is invisible to assistive tech.\n\n A real `href` rather than a `[routerLink]`: the directive would drag\n `@angular/router` into every content-only strip as well (see `WR_TABS_ROUTING`).\n The href, the active match and the click all come from the adapter the\n `ngwr/tabs/router` directive publishes, which is `RouterLink` doing the work.\n -->\n <a\n class=\"wr-tabs__tab\"\n role=\"tab\"\n [attr.id]=\"headerId(tab.key())\"\n [attr.href]=\"tab.routerHref()\"\n [class.wr-tabs__tab--active]=\"tab.routerActive()\"\n [class.wr-tabs__tab--disabled]=\"tab.disabled()\"\n [attr.aria-disabled]=\"tab.disabled() ? true : null\"\n [attr.aria-selected]=\"tab.routerActive()\"\n [attr.tabindex]=\"tab.disabled() ? -1 : 0\"\n (click)=\"onRouterTabClick(tab, $event)\"\n >\n {{ tab.title() }}\n </a>\n } @else {\n <button\n type=\"button\"\n class=\"wr-tabs__tab\"\n role=\"tab\"\n [attr.id]=\"headerId(tab.key())\"\n [attr.aria-controls]=\"panelId(tab.key())\"\n [attr.tabindex]=\"tab === activeTab() && !tab.disabled() ? 0 : -1\"\n [class.wr-tabs__tab--active]=\"tab === activeTab()\"\n [class.wr-tabs__tab--disabled]=\"tab.disabled()\"\n [attr.aria-selected]=\"tab === activeTab()\"\n [disabled]=\"tab.disabled()\"\n (click)=\"onTabClick(tab)\"\n >\n {{ tab.title() }}\n </button>\n }\n }\n</div>\n\n@if (!isRouter() && activeTab(); as tab) {\n <div\n class=\"wr-tabs__panel\"\n role=\"tabpanel\"\n tabindex=\"0\"\n [attr.id]=\"panelId(tab.key())\"\n [attr.aria-labelledby]=\"headerId(tab.key())\"\n >\n <ng-container [ngTemplateOutlet]=\"tab.contentTpl()\" />\n </div>\n}\n"
|
|
375
|
+
}]
|
|
376
|
+
}],
|
|
377
|
+
ctorParameters: () => [],
|
|
378
|
+
propDecorators: {
|
|
379
|
+
active: [{
|
|
380
|
+
type: i0.Input,
|
|
381
|
+
args: [{
|
|
382
|
+
isSignal: true,
|
|
383
|
+
alias: "active",
|
|
384
|
+
required: false
|
|
385
|
+
}]
|
|
386
|
+
}, {
|
|
387
|
+
type: i0.Output,
|
|
388
|
+
args: ["activeChange"]
|
|
389
|
+
}],
|
|
390
|
+
size: [{
|
|
391
|
+
type: i0.Input,
|
|
392
|
+
args: [{
|
|
393
|
+
isSignal: true,
|
|
394
|
+
alias: "size",
|
|
395
|
+
required: false
|
|
396
|
+
}]
|
|
397
|
+
}],
|
|
398
|
+
tabs: [{
|
|
399
|
+
type: i0.ContentChildren,
|
|
400
|
+
args: [i0.forwardRef(() => WrTab), { isSignal: true }]
|
|
401
|
+
}],
|
|
402
|
+
stripRef: [{
|
|
403
|
+
type: i0.ViewChild,
|
|
404
|
+
args: ["strip", { isSignal: true }]
|
|
405
|
+
}]
|
|
406
|
+
}
|
|
407
|
+
});
|
|
432
408
|
export { WR_TABS, WR_TABS_ROUTING, WrTab, WrTabs };
|
|
433
|
-
|
|
409
|
+
|
|
410
|
+
//# sourceMappingURL=ngwr-tabs.mjs.map
|