ngwr 11.1.0 → 12.0.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 +7 -7
- package/burger/styles/_index.scss +1 -1
- package/button/styles/_index.scss +2 -2
- package/calendar/styles/_index.scss +32 -12
- package/calendar-heatmap/styles/_index.scss +20 -0
- package/carousel/styles/_index.scss +23 -1
- package/cascader/styles/_index.scss +15 -3
- package/checkbox/styles/_index.scss +2 -2
- package/circular-text/styles/_index.scss +11 -0
- package/collapse/styles/_index.scss +2 -2
- package/color-picker/styles/_index.scss +3 -3
- package/command-palette/styles/_index.scss +12 -0
- package/compare/styles/_index.scss +18 -2
- package/context-menu/styles/_index.scss +21 -2
- package/date-picker/styles/_index.scss +5 -5
- package/descriptions/styles/_index.scss +1 -1
- package/drag-drop/styles/_index.scss +28 -1
- package/drawer/styles/_index.scss +37 -0
- package/dropdown/styles/_index.scss +2 -2
- package/event-calendar/styles/_index.scss +67 -10
- package/fesm2022/ngwr-action-sheet-testing.mjs +313 -0
- package/fesm2022/ngwr-action-sheet-testing.mjs.map +1 -0
- package/fesm2022/ngwr-action-sheet.mjs +3 -3
- package/fesm2022/ngwr-affix.mjs +3 -3
- package/fesm2022/ngwr-alert.mjs +3 -3
- package/fesm2022/ngwr-anchor.mjs +3 -3
- package/fesm2022/ngwr-aurora.mjs +3 -3
- package/fesm2022/ngwr-avatar.mjs +3 -3
- package/fesm2022/ngwr-back-top.mjs +3 -3
- package/fesm2022/ngwr-badge.mjs +6 -6
- package/fesm2022/ngwr-bar-chart-testing.mjs +107 -0
- package/fesm2022/ngwr-bar-chart-testing.mjs.map +1 -0
- package/fesm2022/ngwr-bar-chart.mjs +3 -3
- package/fesm2022/ngwr-blur-text-testing.mjs +203 -0
- package/fesm2022/ngwr-blur-text-testing.mjs.map +1 -0
- package/fesm2022/ngwr-blur-text.mjs +18 -4
- package/fesm2022/ngwr-blur-text.mjs.map +1 -1
- package/fesm2022/ngwr-border-glow-testing.mjs +325 -0
- package/fesm2022/ngwr-border-glow-testing.mjs.map +1 -0
- package/fesm2022/ngwr-border-glow.mjs +4 -4
- package/fesm2022/ngwr-border-glow.mjs.map +1 -1
- package/fesm2022/ngwr-breadcrumbs.mjs +29 -17
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-burger.mjs +3 -3
- package/fesm2022/ngwr-button.mjs +6 -6
- package/fesm2022/ngwr-calendar-heatmap-testing.mjs +95 -0
- package/fesm2022/ngwr-calendar-heatmap-testing.mjs.map +1 -0
- package/fesm2022/ngwr-calendar-heatmap.mjs +17 -5
- package/fesm2022/ngwr-calendar-heatmap.mjs.map +1 -1
- package/fesm2022/ngwr-calendar-testing.mjs +368 -0
- package/fesm2022/ngwr-calendar-testing.mjs.map +1 -0
- package/fesm2022/ngwr-calendar.mjs +228 -10
- package/fesm2022/ngwr-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-card.mjs +10 -10
- package/fesm2022/ngwr-card.mjs.map +1 -1
- package/fesm2022/ngwr-carousel.mjs +124 -24
- package/fesm2022/ngwr-carousel.mjs.map +1 -1
- package/fesm2022/ngwr-cascader.mjs +60 -5
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-checkbox.mjs +14 -6
- package/fesm2022/ngwr-checkbox.mjs.map +1 -1
- package/fesm2022/ngwr-circular-text-testing.mjs +230 -0
- package/fesm2022/ngwr-circular-text-testing.mjs.map +1 -0
- package/fesm2022/ngwr-circular-text.mjs +4 -4
- package/fesm2022/ngwr-circular-text.mjs.map +1 -1
- package/fesm2022/ngwr-click-spark.mjs +27 -7
- package/fesm2022/ngwr-click-spark.mjs.map +1 -1
- package/fesm2022/ngwr-clipboard.mjs +3 -3
- package/fesm2022/ngwr-collapse.mjs +9 -9
- package/fesm2022/ngwr-color-picker-testing.mjs +452 -0
- package/fesm2022/ngwr-color-picker-testing.mjs.map +1 -0
- package/fesm2022/ngwr-color-picker.mjs +126 -10
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- package/fesm2022/ngwr-command-palette.mjs +14 -5
- package/fesm2022/ngwr-command-palette.mjs.map +1 -1
- package/fesm2022/ngwr-compare.mjs +3 -3
- package/fesm2022/ngwr-confetti.mjs +31 -6
- package/fesm2022/ngwr-confetti.mjs.map +1 -1
- package/fesm2022/ngwr-config.mjs +9 -0
- package/fesm2022/ngwr-config.mjs.map +1 -1
- package/fesm2022/ngwr-context-menu-testing.mjs +30 -11
- package/fesm2022/ngwr-context-menu-testing.mjs.map +1 -1
- package/fesm2022/ngwr-context-menu.mjs +358 -48
- package/fesm2022/ngwr-context-menu.mjs.map +1 -1
- package/fesm2022/ngwr-cookie.mjs +3 -3
- package/fesm2022/ngwr-counter.mjs +25 -9
- package/fesm2022/ngwr-counter.mjs.map +1 -1
- package/fesm2022/{ngwr-date-adapter-fns.mjs → ngwr-date-adapters-fns.mjs} +37 -10
- package/fesm2022/ngwr-date-adapters-fns.mjs.map +1 -0
- package/fesm2022/{ngwr-date-adapter-luxon.mjs → ngwr-date-adapters-luxon.mjs} +5 -5
- package/fesm2022/ngwr-date-adapters-luxon.mjs.map +1 -0
- package/fesm2022/ngwr-date-picker-testing.mjs +21 -85
- package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker.mjs +119 -37
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/{ngwr-date-adapter.mjs → ngwr-date.mjs} +36 -10
- package/fesm2022/ngwr-date.mjs.map +1 -0
- package/fesm2022/ngwr-decrypt-text-testing.mjs +261 -0
- package/fesm2022/ngwr-decrypt-text-testing.mjs.map +1 -0
- package/fesm2022/ngwr-decrypt-text.mjs +9 -4
- package/fesm2022/ngwr-decrypt-text.mjs.map +1 -1
- package/fesm2022/ngwr-density.mjs +6 -6
- package/fesm2022/ngwr-descriptions.mjs +6 -6
- package/fesm2022/ngwr-dialog.mjs +73 -18
- package/fesm2022/ngwr-dialog.mjs.map +1 -1
- package/fesm2022/ngwr-directives.mjs +12 -12
- package/fesm2022/ngwr-divider.mjs +52 -5
- package/fesm2022/ngwr-divider.mjs.map +1 -1
- package/fesm2022/ngwr-donut-chart-testing.mjs +97 -0
- package/fesm2022/ngwr-donut-chart-testing.mjs.map +1 -0
- package/fesm2022/ngwr-donut-chart.mjs +7 -7
- package/fesm2022/ngwr-donut-chart.mjs.map +1 -1
- package/fesm2022/ngwr-drag-drop.mjs +160 -11
- package/fesm2022/ngwr-drag-drop.mjs.map +1 -1
- package/fesm2022/ngwr-drawer.mjs +156 -64
- package/fesm2022/ngwr-drawer.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +58 -12
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-empty.mjs +3 -3
- package/fesm2022/ngwr-event-calendar-testing.mjs +446 -0
- package/fesm2022/ngwr-event-calendar-testing.mjs.map +1 -0
- package/fesm2022/ngwr-event-calendar.mjs +66 -28
- package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-falling-text-testing.mjs +220 -0
- package/fesm2022/ngwr-falling-text-testing.mjs.map +1 -0
- package/fesm2022/ngwr-falling-text.mjs +75 -46
- package/fesm2022/ngwr-falling-text.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload.mjs +3 -3
- package/fesm2022/ngwr-form.mjs +32 -15
- package/fesm2022/ngwr-form.mjs.map +1 -1
- package/fesm2022/ngwr-fuzzy-text-testing.mjs +134 -0
- package/fesm2022/ngwr-fuzzy-text-testing.mjs.map +1 -0
- package/fesm2022/ngwr-fuzzy-text.mjs +21 -11
- package/fesm2022/ngwr-fuzzy-text.mjs.map +1 -1
- package/fesm2022/ngwr-gauge-testing.mjs +86 -0
- package/fesm2022/ngwr-gauge-testing.mjs.map +1 -0
- package/fesm2022/ngwr-gauge.mjs +3 -3
- package/fesm2022/ngwr-glitch-text-testing.mjs +215 -0
- package/fesm2022/ngwr-glitch-text-testing.mjs.map +1 -0
- package/fesm2022/ngwr-glitch-text.mjs +7 -7
- package/fesm2022/ngwr-glitch-text.mjs.map +1 -1
- package/fesm2022/ngwr-gradient-text-testing.mjs +258 -0
- package/fesm2022/ngwr-gradient-text-testing.mjs.map +1 -0
- package/fesm2022/ngwr-gradient-text.mjs +4 -4
- package/fesm2022/ngwr-gradient-text.mjs.map +1 -1
- package/fesm2022/ngwr-hotkey.mjs +24 -9
- package/fesm2022/ngwr-hotkey.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +87 -1
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +69 -1
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n.mjs +26 -15
- package/fesm2022/ngwr-i18n.mjs.map +1 -1
- package/fesm2022/ngwr-icon.mjs +6 -6
- package/fesm2022/ngwr-image-cropper-testing.mjs +200 -0
- package/fesm2022/ngwr-image-cropper-testing.mjs.map +1 -0
- package/fesm2022/ngwr-image-cropper.mjs +156 -11
- package/fesm2022/ngwr-image-cropper.mjs.map +1 -1
- package/fesm2022/ngwr-input-number-testing.mjs +15 -10
- package/fesm2022/ngwr-input-number-testing.mjs.map +1 -1
- package/fesm2022/ngwr-input-number.mjs +89 -15
- package/fesm2022/ngwr-input-number.mjs.map +1 -1
- package/fesm2022/ngwr-input-otp-testing.mjs +12 -6
- package/fesm2022/ngwr-input-otp-testing.mjs.map +1 -1
- package/fesm2022/ngwr-input-otp.mjs +24 -5
- package/fesm2022/ngwr-input-otp.mjs.map +1 -1
- package/fesm2022/ngwr-input.mjs +15 -15
- package/fesm2022/ngwr-keyboard.mjs +3 -3
- package/fesm2022/ngwr-knob-testing.mjs +220 -0
- package/fesm2022/ngwr-knob-testing.mjs.map +1 -0
- package/fesm2022/ngwr-knob.mjs +3 -3
- package/fesm2022/ngwr-layout.mjs +15 -15
- package/fesm2022/ngwr-lightbox-testing.mjs +223 -0
- package/fesm2022/ngwr-lightbox-testing.mjs.map +1 -0
- package/fesm2022/ngwr-lightbox.mjs +11 -4
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-line-chart-testing.mjs +119 -0
- package/fesm2022/ngwr-line-chart-testing.mjs.map +1 -0
- package/fesm2022/ngwr-line-chart.mjs +73 -26
- package/fesm2022/ngwr-line-chart.mjs.map +1 -1
- package/fesm2022/ngwr-list.mjs +7 -7
- package/fesm2022/ngwr-list.mjs.map +1 -1
- package/fesm2022/ngwr-loading-bar.mjs +7 -7
- package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
- package/fesm2022/ngwr-markdown.mjs +66 -8
- package/fesm2022/ngwr-markdown.mjs.map +1 -1
- package/fesm2022/ngwr-marquee-testing.mjs +336 -0
- package/fesm2022/ngwr-marquee-testing.mjs.map +1 -0
- package/fesm2022/ngwr-marquee.mjs +4 -4
- package/fesm2022/ngwr-marquee.mjs.map +1 -1
- package/fesm2022/ngwr-media.mjs +3 -3
- package/fesm2022/ngwr-mention.mjs +108 -13
- package/fesm2022/ngwr-mention.mjs.map +1 -1
- package/fesm2022/ngwr-meta.mjs +6 -6
- package/fesm2022/ngwr-meter-group-testing.mjs +100 -0
- package/fesm2022/ngwr-meter-group-testing.mjs.map +1 -0
- package/fesm2022/ngwr-meter-group.mjs +3 -3
- package/fesm2022/ngwr-overlay.mjs +34 -7
- package/fesm2022/ngwr-overlay.mjs.map +1 -1
- package/fesm2022/ngwr-page-header.mjs +3 -3
- package/fesm2022/ngwr-pagination-testing.mjs +6 -6
- package/fesm2022/ngwr-pagination-testing.mjs.map +1 -1
- package/fesm2022/ngwr-pagination.mjs +17 -13
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-pipes.mjs +39 -26
- package/fesm2022/ngwr-pipes.mjs.map +1 -1
- package/fesm2022/ngwr-platform.mjs +9 -9
- package/fesm2022/ngwr-popconfirm.mjs +6 -6
- package/fesm2022/ngwr-popover-testing.mjs +7 -2
- package/fesm2022/ngwr-popover-testing.mjs.map +1 -1
- package/fesm2022/ngwr-popover.mjs +169 -33
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-progress.mjs +3 -3
- package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
- package/fesm2022/ngwr-qr.mjs +42 -5
- package/fesm2022/ngwr-qr.mjs.map +1 -1
- package/fesm2022/ngwr-radio.mjs +6 -6
- package/fesm2022/ngwr-rating.mjs +3 -3
- package/fesm2022/ngwr-result.mjs +21 -30
- package/fesm2022/ngwr-result.mjs.map +1 -1
- package/fesm2022/ngwr-rotating-text-testing.mjs +220 -0
- package/fesm2022/ngwr-rotating-text-testing.mjs.map +1 -0
- package/fesm2022/ngwr-rotating-text.mjs +4 -4
- package/fesm2022/ngwr-rotating-text.mjs.map +1 -1
- package/fesm2022/ngwr-scroll.mjs +3 -3
- package/fesm2022/ngwr-segmented-testing.mjs +14 -1
- package/fesm2022/ngwr-segmented-testing.mjs.map +1 -1
- package/fesm2022/ngwr-segmented.mjs +29 -6
- package/fesm2022/ngwr-segmented.mjs.map +1 -1
- package/fesm2022/ngwr-select.mjs +227 -43
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-shiny-text-testing.mjs +237 -0
- package/fesm2022/ngwr-shiny-text-testing.mjs.map +1 -0
- package/fesm2022/ngwr-shiny-text.mjs +11 -9
- package/fesm2022/ngwr-shiny-text.mjs.map +1 -1
- package/fesm2022/ngwr-sidebar.mjs +31 -16
- package/fesm2022/ngwr-sidebar.mjs.map +1 -1
- package/fesm2022/ngwr-skeleton.mjs +3 -3
- package/fesm2022/ngwr-slider.mjs +143 -14
- package/fesm2022/ngwr-slider.mjs.map +1 -1
- package/fesm2022/ngwr-sparkline-testing.mjs +76 -0
- package/fesm2022/ngwr-sparkline-testing.mjs.map +1 -0
- package/fesm2022/ngwr-sparkline.mjs +3 -3
- package/fesm2022/ngwr-speed-dial-testing.mjs +281 -0
- package/fesm2022/ngwr-speed-dial-testing.mjs.map +1 -0
- package/fesm2022/ngwr-speed-dial.mjs +27 -12
- package/fesm2022/ngwr-speed-dial.mjs.map +1 -1
- package/fesm2022/ngwr-spinner.mjs +3 -3
- package/fesm2022/ngwr-splash-cursor-testing.mjs +89 -0
- package/fesm2022/ngwr-splash-cursor-testing.mjs.map +1 -0
- package/fesm2022/ngwr-splash-cursor.mjs +3 -3
- package/fesm2022/ngwr-split-text-testing.mjs +224 -0
- package/fesm2022/ngwr-split-text-testing.mjs.map +1 -0
- package/fesm2022/ngwr-split-text.mjs +31 -5
- package/fesm2022/ngwr-split-text.mjs.map +1 -1
- package/fesm2022/ngwr-splitter-testing.mjs +245 -0
- package/fesm2022/ngwr-splitter-testing.mjs.map +1 -0
- package/fesm2022/ngwr-splitter.mjs +3 -3
- package/fesm2022/ngwr-spotlight-card-testing.mjs +368 -0
- package/fesm2022/ngwr-spotlight-card-testing.mjs.map +1 -0
- package/fesm2022/ngwr-spotlight-card.mjs +7 -7
- package/fesm2022/ngwr-spotlight-card.mjs.map +1 -1
- package/fesm2022/ngwr-squircle.mjs +6 -6
- package/fesm2022/ngwr-star-border-testing.mjs +172 -0
- package/fesm2022/ngwr-star-border-testing.mjs.map +1 -0
- package/fesm2022/ngwr-star-border.mjs +4 -4
- package/fesm2022/ngwr-star-border.mjs.map +1 -1
- package/fesm2022/ngwr-statistic.mjs +9 -9
- package/fesm2022/ngwr-stepper-testing.mjs +8 -8
- package/fesm2022/ngwr-stepper-testing.mjs.map +1 -1
- package/fesm2022/ngwr-stepper.mjs +33 -8
- package/fesm2022/ngwr-stepper.mjs.map +1 -1
- package/fesm2022/ngwr-storage.mjs +17 -5
- package/fesm2022/ngwr-storage.mjs.map +1 -1
- package/fesm2022/ngwr-switch.mjs +3 -3
- package/fesm2022/ngwr-table.mjs +110 -40
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-tabs-testing.mjs +11 -10
- package/fesm2022/ngwr-tabs-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tabs.mjs +51 -11
- package/fesm2022/ngwr-tabs.mjs.map +1 -1
- package/fesm2022/ngwr-textarea.mjs +3 -3
- package/fesm2022/ngwr-theme.mjs +181 -4
- package/fesm2022/ngwr-theme.mjs.map +1 -1
- package/fesm2022/ngwr-tilt-card-testing.mjs +190 -0
- package/fesm2022/ngwr-tilt-card-testing.mjs.map +1 -0
- package/fesm2022/ngwr-tilt-card.mjs +26 -8
- package/fesm2022/ngwr-tilt-card.mjs.map +1 -1
- package/fesm2022/ngwr-timeline.mjs +6 -6
- package/fesm2022/ngwr-toast.mjs +44 -15
- package/fesm2022/ngwr-toast.mjs.map +1 -1
- package/fesm2022/ngwr-toolbar.mjs +3 -3
- package/fesm2022/ngwr-tour-testing.mjs +173 -0
- package/fesm2022/ngwr-tour-testing.mjs.map +1 -0
- package/fesm2022/ngwr-tour.mjs +34 -10
- package/fesm2022/ngwr-tour.mjs.map +1 -1
- package/fesm2022/ngwr-transfer.mjs +3 -3
- package/fesm2022/ngwr-tree.mjs +36 -11
- package/fesm2022/ngwr-tree.mjs.map +1 -1
- package/fesm2022/ngwr-typewriter-testing.mjs +242 -0
- package/fesm2022/ngwr-typewriter-testing.mjs.map +1 -0
- package/fesm2022/ngwr-typewriter.mjs +13 -5
- package/fesm2022/ngwr-typewriter.mjs.map +1 -1
- package/fesm2022/ngwr-typography.mjs +3 -3
- package/fesm2022/ngwr-utils.mjs +5 -2
- package/fesm2022/ngwr-utils.mjs.map +1 -1
- package/fesm2022/ngwr-version.mjs +1 -1
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/fesm2022/ngwr-virtual-scroll.mjs +4 -4
- package/fesm2022/ngwr-virtual-scroll.mjs.map +1 -1
- package/fesm2022/ngwr-waves-testing.mjs +128 -0
- package/fesm2022/ngwr-waves-testing.mjs.map +1 -0
- package/fesm2022/ngwr-waves.mjs +4 -4
- package/fesm2022/ngwr-waves.mjs.map +1 -1
- package/fesm2022/ngwr-window-testing.mjs +361 -0
- package/fesm2022/ngwr-window-testing.mjs.map +1 -0
- package/fesm2022/ngwr-window.mjs +175 -31
- package/fesm2022/ngwr-window.mjs.map +1 -1
- package/file-upload/styles/_index.scss +2 -2
- package/glitch-text/styles/_index.scss +27 -12
- package/i18n/en.json +71 -7
- package/i18n/ru.json +71 -7
- package/image-cropper/styles/_index.scss +19 -0
- package/input/styles/_index.scss +2 -2
- package/input-number/styles/_index.scss +2 -2
- package/input-otp/styles/_index.scss +9 -2
- package/knob/styles/_index.scss +1 -1
- package/lightbox/styles/_index.scss +16 -2
- package/line-chart/styles/_index.scss +28 -14
- package/list/styles/_index.scss +1 -1
- package/llms-full.txt +161 -19
- package/llms.txt +45 -10
- package/markdown/styles/_index.scss +3 -3
- package/mcp/api.js +6 -4
- package/mcp/catalog.js +40 -3
- package/mcp/providers.js +42 -0
- package/mcp/tools.js +22 -30
- package/meter-group/styles/_index.scss +1 -1
- package/overlay/styles/_index.scss +33 -1
- package/package.json +161 -12
- package/pagination/styles/_index.scss +23 -1
- package/popover/styles/_index.scss +16 -7
- package/progress/styles/_index.scss +1 -1
- package/radio/styles/_index.scss +2 -2
- package/rating/styles/_index.scss +1 -1
- package/schematics/collection.json +1 -1
- package/schematics/migrations/v12/index.js +65 -0
- package/schematics/migrations/v7/index.js +12 -1
- package/schematics/migrations/v8/index.js +10 -1
- package/schematics/migrations.json +5 -0
- package/schematics/ng-add/index.js +8 -3
- package/schematics/provider/index.js +80 -13
- package/schematics/use/index.js +9 -129
- package/schematics/use/rule.js +206 -0
- package/schematics/use/symbol-map.json +4 -4
- package/segmented/styles/_index.scss +14 -3
- package/select/styles/_index.scss +14 -2
- package/sidebar/styles/_index.scss +12 -10
- package/skills/ngwr/SKILL.md +117 -0
- package/skills/ngwr/references/catalog.md +212 -0
- package/skills/ngwr/references/setup.md +78 -0
- package/slider/styles/_index.scss +1 -1
- package/speed-dial/styles/_index.scss +1 -1
- package/stepper/styles/_index.scss +12 -3
- package/switch/styles/_index.scss +2 -2
- package/table/styles/_index.scss +61 -12
- package/tabs/styles/_index.scss +1 -1
- package/textarea/styles/_index.scss +1 -1
- package/theme/styles/_colors.scss +142 -56
- package/theme/styles/_dark.scss +46 -3
- package/theme/styles/_focus.scss +28 -5
- package/theme/styles/_mixins.scss +1 -1
- package/theme/styles/_variables.scss +67 -0
- package/transfer/styles/_index.scss +26 -3
- package/tree/styles/_index.scss +29 -6
- package/types/ngwr-action-sheet-testing.d.ts +260 -0
- package/types/ngwr-bar-chart-testing.d.ts +85 -0
- package/types/ngwr-blur-text-testing.d.ts +180 -0
- package/types/ngwr-blur-text.d.ts +20 -4
- package/types/ngwr-border-glow-testing.d.ts +219 -0
- package/types/ngwr-breadcrumbs.d.ts +17 -10
- package/types/ngwr-calendar-heatmap-testing.d.ts +79 -0
- package/types/ngwr-calendar-testing.d.ts +277 -0
- package/types/ngwr-calendar.d.ts +76 -0
- package/types/ngwr-carousel.d.ts +85 -6
- package/types/ngwr-cascader.d.ts +17 -0
- package/types/ngwr-checkbox.d.ts +13 -0
- package/types/ngwr-circular-text-testing.d.ts +196 -0
- package/types/ngwr-click-spark.d.ts +4 -0
- package/types/ngwr-color-picker-testing.d.ts +299 -0
- package/types/ngwr-color-picker.d.ts +34 -2
- package/types/ngwr-confetti.d.ts +8 -0
- package/types/ngwr-config.d.ts +10 -1
- package/types/ngwr-context-menu-testing.d.ts +24 -11
- package/types/ngwr-context-menu.d.ts +71 -1
- package/types/ngwr-counter.d.ts +1 -0
- package/types/{ngwr-date-adapter-fns.d.ts → ngwr-date-adapters-fns.d.ts} +33 -6
- package/types/{ngwr-date-adapter-luxon.d.ts → ngwr-date-adapters-luxon.d.ts} +1 -1
- package/types/ngwr-date-picker-testing.d.ts +17 -72
- package/types/ngwr-date-picker.d.ts +8 -4
- package/types/{ngwr-date-adapter.d.ts → ngwr-date.d.ts} +24 -5
- package/types/ngwr-decrypt-text-testing.d.ts +222 -0
- package/types/ngwr-dialog.d.ts +38 -1
- package/types/ngwr-divider.d.ts +25 -0
- package/types/ngwr-donut-chart-testing.d.ts +83 -0
- package/types/ngwr-donut-chart.d.ts +3 -3
- package/types/ngwr-drag-drop.d.ts +56 -2
- package/types/ngwr-drawer.d.ts +68 -5
- package/types/ngwr-dropdown.d.ts +9 -0
- package/types/ngwr-event-calendar-testing.d.ts +301 -0
- package/types/ngwr-event-calendar.d.ts +17 -8
- package/types/ngwr-falling-text-testing.d.ts +188 -0
- package/types/ngwr-falling-text.d.ts +1 -1
- package/types/ngwr-form.d.ts +12 -2
- package/types/ngwr-fuzzy-text-testing.d.ts +130 -0
- package/types/ngwr-gauge-testing.d.ts +71 -0
- package/types/ngwr-glitch-text-testing.d.ts +201 -0
- package/types/ngwr-gradient-text-testing.d.ts +186 -0
- package/types/ngwr-i18n.d.ts +13 -4
- package/types/ngwr-image-cropper-testing.d.ts +173 -0
- package/types/ngwr-image-cropper.d.ts +71 -5
- package/types/ngwr-input-number-testing.d.ts +15 -10
- package/types/ngwr-input-number.d.ts +44 -5
- package/types/ngwr-input-otp-testing.d.ts +12 -6
- package/types/ngwr-input-otp.d.ts +15 -1
- package/types/ngwr-knob-testing.d.ts +150 -0
- package/types/ngwr-lightbox-testing.d.ts +154 -0
- package/types/ngwr-lightbox.d.ts +6 -0
- package/types/ngwr-line-chart-testing.d.ts +93 -0
- package/types/ngwr-line-chart.d.ts +20 -3
- package/types/ngwr-markdown.d.ts +11 -0
- package/types/ngwr-marquee-testing.d.ts +280 -0
- package/types/ngwr-mention.d.ts +32 -0
- package/types/ngwr-meter-group-testing.d.ts +77 -0
- package/types/ngwr-overlay.d.ts +20 -1
- package/types/ngwr-pagination-testing.d.ts +4 -4
- package/types/ngwr-pipes.d.ts +1 -1
- package/types/ngwr-popover-testing.d.ts +7 -2
- package/types/ngwr-popover.d.ts +1 -0
- package/types/ngwr-result.d.ts +6 -0
- package/types/ngwr-rotating-text-testing.d.ts +191 -0
- package/types/ngwr-segmented-testing.d.ts +9 -0
- package/types/ngwr-segmented.d.ts +21 -1
- package/types/ngwr-select.d.ts +100 -6
- package/types/ngwr-shiny-text-testing.d.ts +165 -0
- package/types/ngwr-shiny-text.d.ts +4 -2
- package/types/ngwr-sidebar.d.ts +14 -5
- package/types/ngwr-slider.d.ts +84 -1
- package/types/ngwr-sparkline-testing.d.ts +69 -0
- package/types/ngwr-speed-dial-testing.d.ts +199 -0
- package/types/ngwr-speed-dial.d.ts +22 -3
- package/types/ngwr-splash-cursor-testing.d.ts +95 -0
- package/types/ngwr-split-text-testing.d.ts +209 -0
- package/types/ngwr-split-text.d.ts +21 -0
- package/types/ngwr-splitter-testing.d.ts +174 -0
- package/types/ngwr-spotlight-card-testing.d.ts +303 -0
- package/types/ngwr-star-border-testing.d.ts +135 -0
- package/types/ngwr-stepper-testing.d.ts +5 -5
- package/types/ngwr-stepper.d.ts +8 -0
- package/types/ngwr-storage.d.ts +1 -0
- package/types/ngwr-table.d.ts +114 -12
- package/types/ngwr-tabs-testing.d.ts +11 -10
- package/types/ngwr-tabs.d.ts +2 -0
- package/types/ngwr-theme.d.ts +82 -1
- package/types/ngwr-tilt-card-testing.d.ts +158 -0
- package/types/ngwr-tilt-card.d.ts +2 -0
- package/types/ngwr-toast.d.ts +14 -5
- package/types/ngwr-tour-testing.d.ts +143 -0
- package/types/ngwr-tour.d.ts +22 -4
- package/types/ngwr-tree.d.ts +12 -4
- package/types/ngwr-typewriter-testing.d.ts +211 -0
- package/types/ngwr-utils.d.ts +5 -2
- package/types/ngwr-version.d.ts +1 -1
- package/types/ngwr-waves-testing.d.ts +121 -0
- package/types/ngwr-window-testing.d.ts +263 -0
- package/types/ngwr-window.d.ts +66 -21
- package/typography/styles/_index.scss +1 -1
- package/window/styles/_index.scss +116 -42
- package/fesm2022/ngwr-date-adapter-fns.mjs.map +0 -1
- package/fesm2022/ngwr-date-adapter-luxon.mjs.map +0 -1
- package/fesm2022/ngwr-date-adapter.mjs.map +0 -1
package/fesm2022/ngwr-drawer.mjs
CHANGED
|
@@ -1,15 +1,50 @@
|
|
|
1
1
|
import { ConfigurableFocusTrapFactory } from '@angular/cdk/a11y';
|
|
2
2
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
3
3
|
import { TemplatePortal, ComponentPortal } from '@angular/cdk/portal';
|
|
4
|
-
import { isPlatformBrowser } from '@angular/common';
|
|
4
|
+
import { isPlatformBrowser, Location } from '@angular/common';
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
|
-
import { model, input, viewChild, TemplateRef, inject, ViewContainerRef, DestroyRef, PLATFORM_ID, effect, ViewEncapsulation, Component, InjectionToken, EnvironmentInjector, Injector,
|
|
6
|
+
import { Directive, model, input, viewChild, TemplateRef, contentChild, inject, ViewContainerRef, DestroyRef, PLATFORM_ID, effect, afterEveryRender, ViewEncapsulation, Component, InjectionToken, EnvironmentInjector, Injector, Service, computed } from '@angular/core';
|
|
7
7
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
8
8
|
import { useI18nText, WrI18n } from 'ngwr/i18n';
|
|
9
9
|
import { WR_OVERLAY, wrAppendOverlayClose } from 'ngwr/overlay';
|
|
10
10
|
import { ScrollStrategyOptions } from '@angular/cdk/overlay';
|
|
11
11
|
import { ReplaySubject } from 'rxjs';
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* @license
|
|
15
|
+
*
|
|
16
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
17
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
18
|
+
*/
|
|
19
|
+
let uid = 0;
|
|
20
|
+
/**
|
|
21
|
+
* Marks an element as the drawer's title row. Applies the `wr-drawer__title`
|
|
22
|
+
* class so the drawer's stylesheet can lay it out alongside content and
|
|
23
|
+
* footer slots. Auto-assigns an `id` so the drawer panel references it via
|
|
24
|
+
* `aria-labelledby`.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```html
|
|
28
|
+
* <wr-drawer [(open)]="open">
|
|
29
|
+
* <h2 wrDrawerTitle>Settings</h2>
|
|
30
|
+
* <div wrDrawerContent>…</div>
|
|
31
|
+
* </wr-drawer>
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
class WrDrawerTitle {
|
|
35
|
+
/** Generated id used by the drawer panel for `aria-labelledby`. */
|
|
36
|
+
id = `wr-drawer-title-${++uid}`;
|
|
37
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrDrawerTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
38
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.2", type: WrDrawerTitle, isStandalone: true, selector: "[wrDrawerTitle]", host: { properties: { "attr.id": "id" }, classAttribute: "wr-drawer__title" }, ngImport: i0 });
|
|
39
|
+
}
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrDrawerTitle, decorators: [{
|
|
41
|
+
type: Directive,
|
|
42
|
+
args: [{
|
|
43
|
+
selector: '[wrDrawerTitle]',
|
|
44
|
+
host: { class: 'wr-drawer__title', '[attr.id]': 'id' },
|
|
45
|
+
}]
|
|
46
|
+
}] });
|
|
47
|
+
|
|
13
48
|
/**
|
|
14
49
|
* @license
|
|
15
50
|
*
|
|
@@ -89,6 +124,19 @@ class WrDrawer {
|
|
|
89
124
|
resolvedCloseLabel = useI18nText(this.closeLabel, 'drawer.close', 'Close drawer');
|
|
90
125
|
panelTpl = viewChild.required(TemplateRef, /* @ts-ignore */
|
|
91
126
|
...(ngDevMode ? [{ debugName: "panelTpl" }] : /* istanbul ignore next */ []));
|
|
127
|
+
/**
|
|
128
|
+
* A projected `[wrDrawerTitle]`, if the consumer gave one.
|
|
129
|
+
*
|
|
130
|
+
* The dismiss button is corner chrome positioned at a fixed
|
|
131
|
+
* `inset-block-start` chosen to centre it on the TITLE's first line. With no
|
|
132
|
+
* title the content starts at the top of the panel and runs underneath it: on
|
|
133
|
+
* a bare `<wr-drawer><nav /></wr-drawer>` the button covered the first menu
|
|
134
|
+
* row by 24×16 px, and `elementFromPoint` at the button's centre returned the
|
|
135
|
+
* button, so that corner of the first item was unclickable. The panel has to
|
|
136
|
+
* know, because only the panel can reserve the space.
|
|
137
|
+
*/
|
|
138
|
+
projectedTitle = contentChild(WrDrawerTitle, /* @ts-ignore */
|
|
139
|
+
...(ngDevMode ? [{ debugName: "projectedTitle" }] : /* istanbul ignore next */ []));
|
|
92
140
|
panelClass() {
|
|
93
141
|
const parts = ['wr-drawer__panel', `wr-drawer__panel--${this.position()}`];
|
|
94
142
|
if (this.rounded())
|
|
@@ -97,6 +145,10 @@ class WrDrawer {
|
|
|
97
145
|
parts.push('wr-drawer__panel--safe-area');
|
|
98
146
|
if (this.closable())
|
|
99
147
|
parts.push('wr-drawer__panel--closable');
|
|
148
|
+
// Only when there is something to collide with: a closable drawer with a
|
|
149
|
+
// title already clears the button, and an unclosable one has no button.
|
|
150
|
+
if (this.closable() && !this.projectedTitle())
|
|
151
|
+
parts.push('wr-drawer__panel--untitled');
|
|
100
152
|
return parts.join(' ');
|
|
101
153
|
}
|
|
102
154
|
// Swipe-to-dismiss — gated to the grab handle, so it never fights the
|
|
@@ -133,6 +185,21 @@ class WrDrawer {
|
|
|
133
185
|
panel.style.transition = 'none';
|
|
134
186
|
panel.style.transform = axis === 'y' ? `translateY(${delta}px)` : `translateX(${delta}px)`;
|
|
135
187
|
}
|
|
188
|
+
/**
|
|
189
|
+
* A cancelled pointer is an ABANDONED swipe, not a completed one — the system
|
|
190
|
+
* took the gesture away (a call, a system gesture, an orientation change) and
|
|
191
|
+
* no `pointerup` ever arrives. Routing it through `onSwipeEnd` dismissed the
|
|
192
|
+
* drawer on an interruption the user did not ask for and, because the overlay
|
|
193
|
+
* is disposed with the dragged offset applied, could not take back. Same rule
|
|
194
|
+
* `wr-pull-to-refresh` states for `touchcancel`.
|
|
195
|
+
*/
|
|
196
|
+
onSwipeCancel(panel) {
|
|
197
|
+
if (!this.swiping)
|
|
198
|
+
return;
|
|
199
|
+
this.swiping = false;
|
|
200
|
+
panel.style.transition = '';
|
|
201
|
+
panel.style.transform = '';
|
|
202
|
+
}
|
|
136
203
|
onSwipeEnd(event, panel) {
|
|
137
204
|
if (!this.swiping)
|
|
138
205
|
return;
|
|
@@ -179,8 +246,30 @@ class WrDrawer {
|
|
|
179
246
|
this.closeOverlay();
|
|
180
247
|
}
|
|
181
248
|
});
|
|
249
|
+
afterEveryRender(() => this.syncLabel());
|
|
182
250
|
this.destroyRef.onDestroy(() => this.closeOverlay());
|
|
183
251
|
}
|
|
252
|
+
/**
|
|
253
|
+
* Point the panel's `aria-labelledby` at the CURRENT `[wrDrawerTitle]`.
|
|
254
|
+
*
|
|
255
|
+
* Re-resolved after every render rather than once when the drawer opens,
|
|
256
|
+
* because the title element is projected content and can come and go while
|
|
257
|
+
* the drawer stays open — an `@if` around it, or a heading that only exists
|
|
258
|
+
* once the data arrives. A one-shot lookup leaves the attribute naming an
|
|
259
|
+
* element that has been removed or replaced, and a dangling reference is not
|
|
260
|
+
* a name: the dialog is announced as unnamed, with nothing on screen to say
|
|
261
|
+
* so. A missing title clears the attribute for the same reason.
|
|
262
|
+
*/
|
|
263
|
+
syncLabel() {
|
|
264
|
+
const host = this.overlayRef?.overlayElement;
|
|
265
|
+
if (!host)
|
|
266
|
+
return;
|
|
267
|
+
const titleEl = host.querySelector('[wrDrawerTitle], [wr-drawer-title]');
|
|
268
|
+
if (titleEl?.id)
|
|
269
|
+
host.setAttribute('aria-labelledby', titleEl.id);
|
|
270
|
+
else
|
|
271
|
+
host.removeAttribute('aria-labelledby');
|
|
272
|
+
}
|
|
184
273
|
openOverlay() {
|
|
185
274
|
if (this.overlayRef)
|
|
186
275
|
return;
|
|
@@ -214,11 +303,6 @@ class WrDrawer {
|
|
|
214
303
|
const host = this.overlayRef.overlayElement;
|
|
215
304
|
host.setAttribute('role', 'dialog');
|
|
216
305
|
host.setAttribute('aria-modal', 'true');
|
|
217
|
-
queueMicrotask(() => {
|
|
218
|
-
const titleEl = host.querySelector('[wrDrawerTitle], [wr-drawer-title]');
|
|
219
|
-
if (titleEl?.id)
|
|
220
|
-
host.setAttribute('aria-labelledby', titleEl.id);
|
|
221
|
-
});
|
|
222
306
|
this.focusTrap = this.focusTrapFactory.create(host);
|
|
223
307
|
void this.focusTrap.focusInitialElementWhenReady();
|
|
224
308
|
}
|
|
@@ -253,13 +337,13 @@ class WrDrawer {
|
|
|
253
337
|
restore.focus();
|
|
254
338
|
}
|
|
255
339
|
}
|
|
256
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
257
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.
|
|
340
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrDrawer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
341
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: WrDrawer, isStandalone: true, selector: "wr-drawer", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, showHandle: { classPropertyName: "showHandle", publicName: "showHandle", isSignal: true, isRequired: false, transformFunction: null }, safeArea: { classPropertyName: "safeArea", publicName: "safeArea", isSignal: true, isRequired: false, transformFunction: null }, hasBackdrop: { classPropertyName: "hasBackdrop", publicName: "hasBackdrop", isSignal: true, isRequired: false, transformFunction: null }, closeOnBackdropClick: { classPropertyName: "closeOnBackdropClick", publicName: "closeOnBackdropClick", isSignal: true, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "closeOnEscape", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, closeLabel: { classPropertyName: "closeLabel", publicName: "closeLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange" }, host: { styleAttribute: "display:none" }, queries: [{ propertyName: "projectedTitle", first: true, predicate: WrDrawerTitle, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "panelTpl", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template>\n <div #panel [class]=\"panelClass()\">\n @if (showHandle()) {\n <div\n class=\"wr-drawer__handle\"\n aria-hidden=\"true\"\n (pointerdown)=\"onSwipeStart($event)\"\n (pointermove)=\"onSwipeMove($event, panel)\"\n (pointerup)=\"onSwipeEnd($event, panel)\"\n (pointercancel)=\"onSwipeCancel(panel)\"\n >\n <span class=\"wr-drawer__grabber\"></span>\n </div>\n }\n @if (closable()) {\n <button type=\"button\" class=\"wr-drawer__close\" [attr.aria-label]=\"resolvedCloseLabel()\" (click)=\"open.set(false)\">\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </button>\n }\n <ng-content />\n </div>\n</ng-template>\n", encapsulation: i0.ViewEncapsulation.None });
|
|
258
342
|
}
|
|
259
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
343
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrDrawer, decorators: [{
|
|
260
344
|
type: Component,
|
|
261
|
-
args: [{ selector: 'wr-drawer', encapsulation: ViewEncapsulation.None, host: { style: 'display:none' }, template: "<ng-template>\n <div #panel [class]=\"panelClass()\">\n @if (showHandle()) {\n <div\n class=\"wr-drawer__handle\"\n aria-hidden=\"true\"\n (pointerdown)=\"onSwipeStart($event)\"\n (pointermove)=\"onSwipeMove($event, panel)\"\n (pointerup)=\"onSwipeEnd($event, panel)\"\n (pointercancel)=\"
|
|
262
|
-
}], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxHeight", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], showHandle: [{ type: i0.Input, args: [{ isSignal: true, alias: "showHandle", required: false }] }], safeArea: [{ type: i0.Input, args: [{ isSignal: true, alias: "safeArea", required: false }] }], hasBackdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasBackdrop", required: false }] }], closeOnBackdropClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnBackdropClick", required: false }] }], closeOnEscape: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnEscape", required: false }] }], closable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closable", required: false }] }], closeLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeLabel", required: false }] }], panelTpl: [{ type: i0.ViewChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }] } });
|
|
345
|
+
args: [{ selector: 'wr-drawer', encapsulation: ViewEncapsulation.None, host: { style: 'display:none' }, template: "<ng-template>\n <div #panel [class]=\"panelClass()\">\n @if (showHandle()) {\n <div\n class=\"wr-drawer__handle\"\n aria-hidden=\"true\"\n (pointerdown)=\"onSwipeStart($event)\"\n (pointermove)=\"onSwipeMove($event, panel)\"\n (pointerup)=\"onSwipeEnd($event, panel)\"\n (pointercancel)=\"onSwipeCancel(panel)\"\n >\n <span class=\"wr-drawer__grabber\"></span>\n </div>\n }\n @if (closable()) {\n <button type=\"button\" class=\"wr-drawer__close\" [attr.aria-label]=\"resolvedCloseLabel()\" (click)=\"open.set(false)\">\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </button>\n }\n <ng-content />\n </div>\n</ng-template>\n" }]
|
|
346
|
+
}], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxHeight", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], showHandle: [{ type: i0.Input, args: [{ isSignal: true, alias: "showHandle", required: false }] }], safeArea: [{ type: i0.Input, args: [{ isSignal: true, alias: "safeArea", required: false }] }], hasBackdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasBackdrop", required: false }] }], closeOnBackdropClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnBackdropClick", required: false }] }], closeOnEscape: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnEscape", required: false }] }], closable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closable", required: false }] }], closeLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeLabel", required: false }] }], panelTpl: [{ type: i0.ViewChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }], projectedTitle: [{ type: i0.ContentChild, args: [i0.forwardRef(() => WrDrawerTitle), { isSignal: true }] }] } });
|
|
263
347
|
|
|
264
348
|
/**
|
|
265
349
|
* @license
|
|
@@ -472,6 +556,7 @@ class WrDrawerManager {
|
|
|
472
556
|
focusTrapFactory = inject(ConfigurableFocusTrapFactory);
|
|
473
557
|
isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
474
558
|
i18n = inject(WrI18n);
|
|
559
|
+
location = inject(Location);
|
|
475
560
|
open(component, options = {}) {
|
|
476
561
|
const position = options.position ?? DEFAULT_POSITION;
|
|
477
562
|
const isHorizontal = position === 'left' || position === 'right';
|
|
@@ -546,11 +631,23 @@ class WrDrawerManager {
|
|
|
546
631
|
// Has to wait for a render, not a microtask: attaching the portal only
|
|
547
632
|
// schedules change detection, so under zoneless CD a microtask runs while
|
|
548
633
|
// the content is still an empty view and the title id doesn't exist yet.
|
|
549
|
-
|
|
634
|
+
//
|
|
635
|
+
// And after EVERY render, not just the next one: the title belongs to the
|
|
636
|
+
// caller's component, so an `@if` or a late-arriving heading can replace
|
|
637
|
+
// or remove the element the attribute names. A reference to a node that is
|
|
638
|
+
// no longer there is not a name — the dialog announces as unnamed — so a
|
|
639
|
+
// missing title clears the attribute rather than leaving it dangling.
|
|
640
|
+
const labelSync = afterEveryRender(() => {
|
|
550
641
|
const titleEl = host.querySelector('[wrDrawerTitle], [wr-drawer-title]');
|
|
551
642
|
if (titleEl?.id)
|
|
552
643
|
host.setAttribute('aria-labelledby', titleEl.id);
|
|
644
|
+
else
|
|
645
|
+
host.removeAttribute('aria-labelledby');
|
|
553
646
|
}, { injector: this.parentInjector });
|
|
647
|
+
// The hook is bound to the root injector, so it outlives the drawer unless
|
|
648
|
+
// it is torn down with it. `detachments()` fires on dispose, which is the
|
|
649
|
+
// one path every dismissal goes through.
|
|
650
|
+
overlayRef.detachments().subscribe(() => labelSync.destroy());
|
|
554
651
|
// Trap focus inside the drawer and move initial focus in.
|
|
555
652
|
const trap = this.focusTrapFactory.create(host);
|
|
556
653
|
drawerRef.focusTrap = trap;
|
|
@@ -569,15 +666,45 @@ class WrDrawerManager {
|
|
|
569
666
|
}
|
|
570
667
|
});
|
|
571
668
|
}
|
|
669
|
+
if (options.closeOnNavigation !== false) {
|
|
670
|
+
this.watchNavigation(overlayRef, drawerRef);
|
|
671
|
+
}
|
|
572
672
|
return drawerRef;
|
|
573
673
|
}
|
|
674
|
+
/**
|
|
675
|
+
* Tie the drawer's lifetime to the URL it was opened on — the same treatment
|
|
676
|
+
* `WrDialog` gets, and for the same reason.
|
|
677
|
+
*
|
|
678
|
+
* Nothing else does. The overlay belongs to a root service and is dismissed
|
|
679
|
+
* only by the backdrop, Escape, the appended × or an explicit `close()`, so
|
|
680
|
+
* navigating away left the panel, its backdrop, its focus trap and the
|
|
681
|
+
* page-wide scroll block sitting over a page the user never opened them on.
|
|
682
|
+
*
|
|
683
|
+
* `onUrlChange`, not `Location.subscribe()` — which is what CDK's own
|
|
684
|
+
* `disposeOnNavigation` uses: `subscribe` fires on popstate alone, so an in-app
|
|
685
|
+
* `router.navigate()` left the drawer standing. And `drawerRef.close()` rather
|
|
686
|
+
* than disposing the overlay behind the ref's back, which would never emit
|
|
687
|
+
* `closed`, never destroy the focus trap, and leave `awaitClose()` pending.
|
|
688
|
+
*/
|
|
689
|
+
watchNavigation(overlayRef, drawerRef) {
|
|
690
|
+
const stopWatching = this.location.onUrlChange(() => drawerRef.close());
|
|
691
|
+
// Unhooked a microtask late, because `Location` notifies its listeners with
|
|
692
|
+
// a `forEach` and unregistering splices the array it is iterating: removing
|
|
693
|
+
// ours synchronously from inside the notification would shift the next entry
|
|
694
|
+
// into the slot forEach has already passed, and a SECOND stacked drawer
|
|
695
|
+
// would be skipped and left behind.
|
|
696
|
+
overlayRef.detachments().subscribe(() => queueMicrotask(stopWatching));
|
|
697
|
+
}
|
|
574
698
|
/**
|
|
575
699
|
* The dismiss button's accessible name.
|
|
576
700
|
*
|
|
577
|
-
* Resolved per open, not
|
|
578
|
-
*
|
|
579
|
-
* before an async catalog had loaded and then
|
|
580
|
-
* of the app.
|
|
701
|
+
* Resolved per open, not stored as a plain string at injection: this is a root
|
|
702
|
+
* service, so a one-shot read — which is what `WrDialog` used to have, and moved
|
|
703
|
+
* off for this reason — would run before an async catalog had loaded and then
|
|
704
|
+
* freeze that answer for the life of the app. (`readI18nText` hands back a signal
|
|
705
|
+
* now, so it would no longer freeze; the name still has to be pushed onto the
|
|
706
|
+
* button per open either way.) `WrDialog.closeLabel()` is the matching precedent,
|
|
707
|
+
* not the counter-example.
|
|
581
708
|
*
|
|
582
709
|
* The miss check is the point. `t()` hands back the KEY when the catalog has
|
|
583
710
|
* no entry, and `WrI18n` is root-provided with an empty catalog by default —
|
|
@@ -589,48 +716,13 @@ class WrDrawerManager {
|
|
|
589
716
|
const resolved = this.i18n.t('drawer.close');
|
|
590
717
|
return resolved === 'drawer.close' ? 'Close drawer' : resolved;
|
|
591
718
|
}
|
|
592
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
593
|
-
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.
|
|
719
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrDrawerManager, deps: [], target: i0.ɵɵFactoryTarget.Service });
|
|
720
|
+
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.2", ngImport: i0, type: WrDrawerManager });
|
|
594
721
|
}
|
|
595
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
722
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrDrawerManager, decorators: [{
|
|
596
723
|
type: Service
|
|
597
724
|
}] });
|
|
598
725
|
|
|
599
|
-
/**
|
|
600
|
-
* @license
|
|
601
|
-
*
|
|
602
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
603
|
-
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
604
|
-
*/
|
|
605
|
-
let uid = 0;
|
|
606
|
-
/**
|
|
607
|
-
* Marks an element as the drawer's title row. Applies the `wr-drawer__title`
|
|
608
|
-
* class so the drawer's stylesheet can lay it out alongside content and
|
|
609
|
-
* footer slots. Auto-assigns an `id` so the drawer panel references it via
|
|
610
|
-
* `aria-labelledby`.
|
|
611
|
-
*
|
|
612
|
-
* @example
|
|
613
|
-
* ```html
|
|
614
|
-
* <wr-drawer [(open)]="open">
|
|
615
|
-
* <h2 wrDrawerTitle>Settings</h2>
|
|
616
|
-
* <div wrDrawerContent>…</div>
|
|
617
|
-
* </wr-drawer>
|
|
618
|
-
* ```
|
|
619
|
-
*/
|
|
620
|
-
class WrDrawerTitle {
|
|
621
|
-
/** Generated id used by the drawer panel for `aria-labelledby`. */
|
|
622
|
-
id = `wr-drawer-title-${++uid}`;
|
|
623
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: WrDrawerTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
624
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.1", type: WrDrawerTitle, isStandalone: true, selector: "[wrDrawerTitle]", host: { properties: { "attr.id": "id" }, classAttribute: "wr-drawer__title" }, ngImport: i0 });
|
|
625
|
-
}
|
|
626
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: WrDrawerTitle, decorators: [{
|
|
627
|
-
type: Directive,
|
|
628
|
-
args: [{
|
|
629
|
-
selector: '[wrDrawerTitle]',
|
|
630
|
-
host: { class: 'wr-drawer__title', '[attr.id]': 'id' },
|
|
631
|
-
}]
|
|
632
|
-
}] });
|
|
633
|
-
|
|
634
726
|
/**
|
|
635
727
|
* @license
|
|
636
728
|
*
|
|
@@ -643,10 +735,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
|
|
|
643
735
|
* footer.
|
|
644
736
|
*/
|
|
645
737
|
class WrDrawerContent {
|
|
646
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
647
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.
|
|
738
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrDrawerContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
739
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.2", type: WrDrawerContent, isStandalone: true, selector: "[wrDrawerContent]", host: { classAttribute: "wr-drawer__content" }, ngImport: i0 });
|
|
648
740
|
}
|
|
649
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
741
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrDrawerContent, decorators: [{
|
|
650
742
|
type: Directive,
|
|
651
743
|
args: [{
|
|
652
744
|
selector: '[wrDrawerContent]',
|
|
@@ -679,10 +771,10 @@ class WrDrawerFooter {
|
|
|
679
771
|
...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
|
|
680
772
|
classes = computed(() => `wr-drawer__footer wr-drawer__footer--${this.align()}`, /* @ts-ignore */
|
|
681
773
|
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
682
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
683
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.
|
|
774
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrDrawerFooter, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
775
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.2", type: WrDrawerFooter, isStandalone: true, selector: "[wrDrawerFooter]", inputs: { align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0 });
|
|
684
776
|
}
|
|
685
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
777
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrDrawerFooter, decorators: [{
|
|
686
778
|
type: Directive,
|
|
687
779
|
args: [{
|
|
688
780
|
selector: '[wrDrawerFooter]',
|
|
@@ -731,10 +823,10 @@ class WrDrawerClose {
|
|
|
731
823
|
}
|
|
732
824
|
this.ref?.close(this.result());
|
|
733
825
|
}
|
|
734
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
735
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.
|
|
826
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrDrawerClose, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
827
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.2", type: WrDrawerClose, isStandalone: true, selector: "[wrDrawerClose]", inputs: { result: { classPropertyName: "result", publicName: "wrDrawerClose", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "close()" } }, ngImport: i0 });
|
|
736
828
|
}
|
|
737
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
829
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrDrawerClose, decorators: [{
|
|
738
830
|
type: Directive,
|
|
739
831
|
args: [{
|
|
740
832
|
selector: '[wrDrawerClose]',
|