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
|
@@ -3,6 +3,20 @@
|
|
|
3
3
|
// These are the canonical knobs every component reads from. Consumers
|
|
4
4
|
// override them on `:root` (or any subtree) without touching SCSS.
|
|
5
5
|
|
|
6
|
+
/// The tokens here that are composed out of one the THEME re-tunes, kept in a
|
|
7
|
+
/// mixin so `_dark.scss` can re-declare them on the themed element. See the long
|
|
8
|
+
/// note above `colors.derived()`: a `var()` inside a custom property is
|
|
9
|
+
/// substituted where it is DECLARED, so a `:root` composition inherits into a
|
|
10
|
+
/// scoped `[data-theme="dark"]` subtree as the light literal.
|
|
11
|
+
///
|
|
12
|
+
/// Only the ring. The other compositions in this file — `--wr-control-font-size-*`,
|
|
13
|
+
/// `--wr-transition-*`, `--wr-overlay-*` — read sizes and durations, which no
|
|
14
|
+
/// theme flips, so freezing them is the same value either way.
|
|
15
|
+
@mixin derived-focus-ring() {
|
|
16
|
+
--wr-focus-ring-color: var(--wr-color-primary);
|
|
17
|
+
--wr-focus-ring-halo: rgba(var(--wr-color-primary-rgb), 0.25);
|
|
18
|
+
}
|
|
19
|
+
|
|
6
20
|
:root {
|
|
7
21
|
// Border radius
|
|
8
22
|
--wr-border-radius-sm: 0.375rem;
|
|
@@ -45,11 +59,16 @@
|
|
|
45
59
|
--wr-duration-fast: 0.1s;
|
|
46
60
|
--wr-duration-base: 0.15s;
|
|
47
61
|
--wr-duration-slow: 0.3s;
|
|
62
|
+
// unused-ok: the slow end of a public scale. The catalog's own animations top
|
|
63
|
+
// out at `-slow`; a consumer's need not.
|
|
48
64
|
--wr-duration-slower: 0.5s;
|
|
49
65
|
|
|
50
66
|
// Transition shorthands
|
|
51
67
|
--wr-transition-short: var(--wr-duration-fast) var(--wr-ease-out);
|
|
52
68
|
--wr-transition-base: var(--wr-duration-base) var(--wr-ease-linear);
|
|
69
|
+
// unused-ok: the third shorthand. Components compose `-slow` with an easing
|
|
70
|
+
// themselves where they need it, but dropping one rung out of three would make
|
|
71
|
+
// the set look arbitrary.
|
|
53
72
|
--wr-transition-long: var(--wr-duration-slow) var(--wr-ease-out);
|
|
54
73
|
|
|
55
74
|
// Elevation
|
|
@@ -65,6 +84,52 @@
|
|
|
65
84
|
--wr-shadow-float: 0 8px 24px rgb(0 0 0 / 18%);
|
|
66
85
|
--wr-shadow-modal: 0 20px 48px rgb(0 0 0 / 25%);
|
|
67
86
|
|
|
87
|
+
// Disabled
|
|
88
|
+
//
|
|
89
|
+
// How far a control fades when it will not respond. One number, because the
|
|
90
|
+
// catalog had **seven** — 0.6 in eighteen places, then 0.5, 0.7, 0.55, 0.4,
|
|
91
|
+
// 0.35 and 0.65 — spread over 29 entry points, and two components disagreed
|
|
92
|
+
// with THEMSELVES three ways inside one file (`date-picker` at 0.5 / 0.4 / 0.7,
|
|
93
|
+
// `calendar` at 0.5 / 0.35 / 0.6). Sibling text fields fading differently is
|
|
94
|
+
// not a design decision anyone made; it is what happens when the value has no
|
|
95
|
+
// name.
|
|
96
|
+
//
|
|
97
|
+
// 0.6 is the value eighteen of them already used. A component that genuinely
|
|
98
|
+
// needs another strength overrides this token in its own block, with the reason
|
|
99
|
+
// — the point is that the exception has to be argued rather than typed.
|
|
100
|
+
--wr-disabled-opacity: 0.6;
|
|
101
|
+
|
|
102
|
+
// Focus ring
|
|
103
|
+
//
|
|
104
|
+
// The keyboard indicator, as tokens rather than a recipe baked into SCSS —
|
|
105
|
+
// the ring was the one surface a consumer could not retheme, because
|
|
106
|
+
// `theme.focus-ring` hard-coded it.
|
|
107
|
+
//
|
|
108
|
+
// It is an OUTLINE now, and the halo is a second channel rather than the only
|
|
109
|
+
// one. The halo alone is a 25% tint of the primary over the page: **1.41:1 in
|
|
110
|
+
// light, 1.31:1 in dark**, where WCAG 1.4.11 asks 3:1 of a focus indicator —
|
|
111
|
+
// and the mixin also set `outline: none`, so for the forty-one selectors whose
|
|
112
|
+
// entire focus style is that mixin, nothing on screen met the bar. The solid
|
|
113
|
+
// token measures 4.89:1 and 4.07:1. Two components had already worked this out
|
|
114
|
+
// on their own, in three places, and hand-rolled
|
|
115
|
+
// `outline: 2px solid var(--wr-color-primary)` (`event-calendar` twice,
|
|
116
|
+
// `lightbox` once), and four more wrote an `outline-offset` next to the include
|
|
117
|
+
// that could never apply.
|
|
118
|
+
//
|
|
119
|
+
// An outline is also the only form the indicator survives in under
|
|
120
|
+
// `forced-colors`, which drops every `box-shadow` outright, and it is exempt
|
|
121
|
+
// from layout, so focus never reflows the box.
|
|
122
|
+
//
|
|
123
|
+
// Halo spread equals the offset on purpose: the halo fills exactly the gap the
|
|
124
|
+
// outline leaves, so the two read as one ring instead of two. A component that
|
|
125
|
+
// insets its outline (`outline-offset: -2px`, the idiom for a row inside an
|
|
126
|
+
// `overflow: hidden` container) keeps the halo outside, where its own clipping
|
|
127
|
+
// hides it.
|
|
128
|
+
// `-color` and `-halo` are composed off `--wr-color-primary`, so they live in
|
|
129
|
+
// `derived-focus-ring()` at the top of this file, included at the end of `:root`.
|
|
130
|
+
--wr-focus-ring-width: 2px;
|
|
131
|
+
--wr-focus-ring-offset: 2px;
|
|
132
|
+
|
|
68
133
|
// Z-index scale
|
|
69
134
|
//
|
|
70
135
|
// Overlay panels inside the CDK container inherit its stacking; these
|
|
@@ -124,6 +189,8 @@
|
|
|
124
189
|
--wr-tracking-wide: 0.025em;
|
|
125
190
|
--wr-tracking-wider: 0.05em;
|
|
126
191
|
--wr-tracking-widest: 0.1em;
|
|
192
|
+
|
|
193
|
+
@include derived-focus-ring;
|
|
127
194
|
}
|
|
128
195
|
|
|
129
196
|
// Shared open animation for overlay panels. Every overlay component
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
color: var(--wr-color-on-surface);
|
|
12
12
|
|
|
13
13
|
&--disabled {
|
|
14
|
-
opacity:
|
|
14
|
+
opacity: var(--wr-disabled-opacity);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
&__pane {
|
|
@@ -31,11 +31,24 @@
|
|
|
31
31
|
gap: 0.5rem;
|
|
32
32
|
padding: 0.5rem 0.625rem;
|
|
33
33
|
border-bottom: 1px solid var(--wr-color-outline);
|
|
34
|
-
background:
|
|
34
|
+
background: var(--wr-color-fill);
|
|
35
|
+
// The checkbox and the count are intrinsically sized, so on a narrow pane
|
|
36
|
+
// the title absorbed the entire shortfall: at 375px it was 26px of a 91px
|
|
37
|
+
// track and the headers read "A…" and "S…". Let the count drop to its own
|
|
38
|
+
// line before that happens — it is the one part of the row that reads fine
|
|
39
|
+
// anywhere. Nothing moves while the row fits (measured: identical at 190px
|
|
40
|
+
// and 430px panes).
|
|
41
|
+
flex-wrap: wrap;
|
|
35
42
|
}
|
|
36
43
|
|
|
37
44
|
&__title {
|
|
38
|
-
|
|
45
|
+
// A small basis rather than `auto`: the title has to be the item that
|
|
46
|
+
// yields, and with a content-sized basis a long title pushes ITSELF onto
|
|
47
|
+
// the next line, leaving the select-all checkbox alone on a row and the
|
|
48
|
+
// two panes of one transfer with headers of different heights. 3.5rem is
|
|
49
|
+
// the widest basis that still shares a row with the checkbox in the
|
|
50
|
+
// narrowest pane the component reaches (113px).
|
|
51
|
+
flex: 1 1 3.5rem;
|
|
39
52
|
min-width: 0;
|
|
40
53
|
overflow: hidden;
|
|
41
54
|
text-overflow: ellipsis;
|
|
@@ -98,6 +111,16 @@
|
|
|
98
111
|
height: 1rem;
|
|
99
112
|
}
|
|
100
113
|
|
|
114
|
+
// The panes are a plain flex row, so they already swap: under `dir="rtl"` the
|
|
115
|
+
// source pane lays out at the right. The move chevrons are drawn to physical
|
|
116
|
+
// directions, though, so "move to target" ends up pointing at the pane it
|
|
117
|
+
// moves away from. Turn them around with the panes, the same way the
|
|
118
|
+
// pagination and carousel arrows do. Both move buttons are icon-only, so
|
|
119
|
+
// nothing textual is caught.
|
|
120
|
+
[dir='rtl'] &__move .wr-icon__svg {
|
|
121
|
+
transform: scaleX(-1);
|
|
122
|
+
}
|
|
123
|
+
|
|
101
124
|
// No container query here on purpose: `@container` only styles DESCENDANTS, so
|
|
102
125
|
// a rule that reflows `.wr-transfer` itself could never match its own query.
|
|
103
126
|
// Doing it properly means the house `responsive` opt-in modifier (a wrapper
|
package/tree/styles/_index.scss
CHANGED
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
|
|
47
47
|
&--disabled {
|
|
48
48
|
cursor: not-allowed;
|
|
49
|
-
opacity:
|
|
49
|
+
opacity: var(--wr-disabled-opacity);
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
// Active-descendant cursor when virtualized — focus lives on the list
|
|
@@ -101,6 +101,20 @@
|
|
|
101
101
|
transform: rotate(90deg);
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
+
// The indent is logical and mirrors on its own, but the triangle is drawn
|
|
105
|
+
// pointing physically right — so under `dir="rtl"` a collapsed node aims back
|
|
106
|
+
// at its parent instead of at the children it would reveal. `tree.ts` already
|
|
107
|
+
// swaps ArrowLeft / ArrowRight for the same reason; this is the picture of that
|
|
108
|
+
// axis. Turn it around the way the cascader's branch arrow does.
|
|
109
|
+
//
|
|
110
|
+
// Scoped to the COLLAPSED state deliberately, and both halves matter: an
|
|
111
|
+
// unscoped rule sets the same property as the `aria-expanded='true'` rule
|
|
112
|
+
// above, and mirroring the inner `<svg>` instead would compose `rotate(90deg)`
|
|
113
|
+
// over `scaleX(-1)` and point an expanded node UP rather than down.
|
|
114
|
+
[dir='rtl'] &__row[aria-expanded='false'] &__toggle {
|
|
115
|
+
transform: scaleX(-1);
|
|
116
|
+
}
|
|
117
|
+
|
|
104
118
|
&__label {
|
|
105
119
|
flex: 1 1 auto;
|
|
106
120
|
overflow: hidden;
|
|
@@ -109,7 +123,7 @@
|
|
|
109
123
|
}
|
|
110
124
|
|
|
111
125
|
&--disabled {
|
|
112
|
-
opacity:
|
|
126
|
+
opacity: var(--wr-disabled-opacity);
|
|
113
127
|
pointer-events: none;
|
|
114
128
|
}
|
|
115
129
|
|
|
@@ -137,7 +151,7 @@
|
|
|
137
151
|
|
|
138
152
|
&.wr-tree--disabled {
|
|
139
153
|
--wr-tree-trigger-color: var(--wr-color-on-surface-muted);
|
|
140
|
-
--wr-tree-trigger-bg:
|
|
154
|
+
--wr-tree-trigger-bg: var(--wr-color-fill);
|
|
141
155
|
}
|
|
142
156
|
}
|
|
143
157
|
|
|
@@ -152,7 +166,12 @@
|
|
|
152
166
|
color: var(--wr-tree-trigger-color);
|
|
153
167
|
border: 1px solid var(--wr-tree-trigger-border);
|
|
154
168
|
border-radius: var(--wr-tree-trigger-radius);
|
|
155
|
-
|
|
169
|
+
// Density-multiplied like select / input / textarea / button. The comment
|
|
170
|
+
// above promises this trigger "lines up with select / input / button", and
|
|
171
|
+
// that only holds at `md` without the multiplier: at `touch` the others
|
|
172
|
+
// measured 35.59px and this one stayed at 30.
|
|
173
|
+
padding: calc(var(--wr-tree-trigger-padding-y) * var(--wr-density-y, 1))
|
|
174
|
+
calc(var(--wr-tree-trigger-padding-x) * var(--wr-density-x, 1));
|
|
156
175
|
font-family: var(--wr-font-family-base);
|
|
157
176
|
font-size: var(--wr-tree-trigger-font-size);
|
|
158
177
|
line-height: var(--wr-tree-trigger-line-height);
|
|
@@ -226,8 +245,12 @@
|
|
|
226
245
|
flex-wrap: wrap;
|
|
227
246
|
align-items: center;
|
|
228
247
|
padding: 0.25rem 0.5rem;
|
|
229
|
-
// Empty / one-row floor = single-mode height (+2px for the border)
|
|
230
|
-
|
|
248
|
+
// Empty / one-row floor = single-mode height (+2px for the border), so it
|
|
249
|
+
// has to carry the same density multiplier the single-mode padding does —
|
|
250
|
+
// otherwise the two modes stop agreeing the moment density leaves `md`.
|
|
251
|
+
min-height: calc(
|
|
252
|
+
var(--wr-tree-trigger-line-height) + var(--wr-tree-trigger-padding-y) * var(--wr-density-y, 1) * 2 + 2px
|
|
253
|
+
);
|
|
231
254
|
}
|
|
232
255
|
|
|
233
256
|
&__chips {
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import { BaseHarnessFilters, ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
|
|
2
|
+
import { WrActionSheetAction } from 'ngwr/action-sheet';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @license
|
|
6
|
+
*
|
|
7
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
8
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/** Narrows which open `<wr-action-sheet>` a harness query matches. */
|
|
12
|
+
interface WrActionSheetHarnessFilters extends BaseHarnessFilters {
|
|
13
|
+
/**
|
|
14
|
+
* Match the sheet's VISIBLE heading — a string is an exact match, a RegExp is
|
|
15
|
+
* tested. A sheet with no `title` has none and matches nothing here; filter on
|
|
16
|
+
* `accessibleName` to reach one by the name it announces instead.
|
|
17
|
+
*/
|
|
18
|
+
readonly title?: string | RegExp;
|
|
19
|
+
/** Match the muted sub-heading under the title. */
|
|
20
|
+
readonly message?: string | RegExp;
|
|
21
|
+
/**
|
|
22
|
+
* Match the name the dialog announces — the visible title when there is one, and
|
|
23
|
+
* otherwise the screen-reader-only fallback, which is the only name an untitled
|
|
24
|
+
* sheet has.
|
|
25
|
+
*/
|
|
26
|
+
readonly accessibleName?: string | RegExp;
|
|
27
|
+
}
|
|
28
|
+
/** Narrows which row inside an action sheet a harness query matches. */
|
|
29
|
+
interface WrActionSheetActionHarnessFilters extends BaseHarnessFilters {
|
|
30
|
+
/** Match the row's label — a string is an exact match, a RegExp is tested. */
|
|
31
|
+
readonly label?: string | RegExp;
|
|
32
|
+
/**
|
|
33
|
+
* Match the row's visual role. `default` covers every row the caller left
|
|
34
|
+
* unroled, which is what the component itself does with the value.
|
|
35
|
+
*/
|
|
36
|
+
readonly role?: NonNullable<WrActionSheetAction['role']>;
|
|
37
|
+
/** Match only enabled (`false`) or only disabled (`true`) rows. */
|
|
38
|
+
readonly disabled?: boolean;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @license
|
|
43
|
+
*
|
|
44
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
45
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Test harness for one row inside a {@link WrActionSheetHarness}.
|
|
50
|
+
*
|
|
51
|
+
* A row is a real `<button>`, not an ARIA-decorated div, so `disabled` is the
|
|
52
|
+
* property rather than an attribute and the CDK refuses to click it — which is the
|
|
53
|
+
* behaviour a spec wants asserted, since the component ALSO checks `disabled`
|
|
54
|
+
* inside its own handler. Either guard alone would keep a disabled row inert; both
|
|
55
|
+
* being there means removing one is invisible until the other is removed too, and
|
|
56
|
+
* {@link click} is where that shows up.
|
|
57
|
+
*
|
|
58
|
+
* **Clicking a row closes the sheet.** The component emits `action` and clears
|
|
59
|
+
* `open` in the same call, so a harness held across a {@link click} is pointed at a
|
|
60
|
+
* detached element the moment it returns — read what you need first, and get a
|
|
61
|
+
* fresh harness afterwards if the sheet was reopened.
|
|
62
|
+
*
|
|
63
|
+
* @see https://ngwr.dev/guides/testing
|
|
64
|
+
*/
|
|
65
|
+
declare class WrActionSheetActionHarness extends ComponentHarness {
|
|
66
|
+
/** The class every row carries, cancel rows included. */
|
|
67
|
+
static hostSelector: string;
|
|
68
|
+
/** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */
|
|
69
|
+
static with(options?: WrActionSheetActionHarnessFilters): HarnessPredicate<WrActionSheetActionHarness>;
|
|
70
|
+
/**
|
|
71
|
+
* The row's label, trimmed.
|
|
72
|
+
*
|
|
73
|
+
* Read from `.wr-action-sheet__label` rather than from the button, so a leading
|
|
74
|
+
* icon can never join it. The icon contributes no text today — it is an `<svg>` —
|
|
75
|
+
* but an icon set that ships a `<title>` for its own accessibility would, and the
|
|
76
|
+
* label element is the thing that actually holds the string.
|
|
77
|
+
*/
|
|
78
|
+
getLabel(): Promise<string>;
|
|
79
|
+
/**
|
|
80
|
+
* The row's visual role, as the component painted it.
|
|
81
|
+
*
|
|
82
|
+
* `default` is returned for a row the caller left unroled, which is what the
|
|
83
|
+
* component does with the value: only `destructive` and `cancel` change anything,
|
|
84
|
+
* and everything else falls through to the plain row. The two modifiers are
|
|
85
|
+
* mutually exclusive by construction — `cancel` rows are filtered into their own
|
|
86
|
+
* group before the destructive class is ever considered — so reading them in
|
|
87
|
+
* either order gives the same answer.
|
|
88
|
+
*/
|
|
89
|
+
getRole(): Promise<NonNullable<WrActionSheetAction['role']>>;
|
|
90
|
+
/**
|
|
91
|
+
* Whether the row refuses interaction, from the button's own `disabled` property
|
|
92
|
+
* — the thing the CDK consults before dispatching a click, and the DOM before
|
|
93
|
+
* delivering one.
|
|
94
|
+
*
|
|
95
|
+
* There is no `aria-disabled` to fall back to here, and none is wanted: the row is
|
|
96
|
+
* a native button, where the property already carries the state to assistive tech.
|
|
97
|
+
*/
|
|
98
|
+
isDisabled(): Promise<boolean>;
|
|
99
|
+
/** Whether the row draws a leading icon. */
|
|
100
|
+
hasIcon(): Promise<boolean>;
|
|
101
|
+
/**
|
|
102
|
+
* The icon's registered name, or `null` on a row without one.
|
|
103
|
+
*
|
|
104
|
+
* From `wr-icon`'s reflected `data-icon`, which is the only place the name reaches
|
|
105
|
+
* the DOM — the rendered `<svg>` carries no trace of which entry of the set it
|
|
106
|
+
* came from.
|
|
107
|
+
*/
|
|
108
|
+
getIconName(): Promise<string | null>;
|
|
109
|
+
/**
|
|
110
|
+
* Pick this row — emitting `action` and closing the sheet.
|
|
111
|
+
*
|
|
112
|
+
* Throws on a disabled row instead of quietly doing nothing. The click would not
|
|
113
|
+
* land anyway (the DOM swallows it), so the alternative is a spec that reads as
|
|
114
|
+
* "picked the row" and asserts a sheet that never moved.
|
|
115
|
+
*/
|
|
116
|
+
click(): Promise<void>;
|
|
117
|
+
/** Move keyboard focus to the row. */
|
|
118
|
+
focus(): Promise<void>;
|
|
119
|
+
/** Whether the row currently holds focus. */
|
|
120
|
+
isFocused(): Promise<boolean>;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* @license
|
|
125
|
+
*
|
|
126
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
127
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
128
|
+
*/
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Test harness for an open `<wr-action-sheet>` — the iOS-style bottom sheet of
|
|
132
|
+
* choices.
|
|
133
|
+
*
|
|
134
|
+
* The sheet renders through `<wr-drawer>`, so its rows are in the NGWR overlay
|
|
135
|
+
* container rather than in the fixture: load this from
|
|
136
|
+
* `TestbedHarnessEnvironment.documentRootLoader()`. A fixture-scoped loader finds
|
|
137
|
+
* nothing at all — the `<wr-action-sheet>` host element itself holds no content and
|
|
138
|
+
* the drawer it wraps is `display: none`.
|
|
139
|
+
*
|
|
140
|
+
* The anchor is `.wr-action-sheet`, the sheet's own root inside the drawer panel,
|
|
141
|
+
* which makes each instance self-scoping: two sheets open at once are two hosts, and
|
|
142
|
+
* every query here descends from one of them. That is worth stating because it is
|
|
143
|
+
* NOT how the drawer harness underneath has to work — a drawer publishes no link to
|
|
144
|
+
* the overlay it opened, so `WrDrawerHarness` anchors on the shared pane and scopes
|
|
145
|
+
* by id.
|
|
146
|
+
*
|
|
147
|
+
* **What belongs to the drawer, not here.** Dismissal by backdrop click or by the ✕
|
|
148
|
+
* button, the modal role, the focus trap and the panel's position are all the
|
|
149
|
+
* drawer's surface, and `WrDrawerHarness` from the same root loader answers them.
|
|
150
|
+
* {@link sendEscape} is the one exception, kept because dismissing without choosing
|
|
151
|
+
* is a documented behaviour of the sheet itself: it closes and emits NOTHING, which
|
|
152
|
+
* is the assertion most specs are actually after.
|
|
153
|
+
*
|
|
154
|
+
* @example
|
|
155
|
+
* ```ts
|
|
156
|
+
* const rootLoader = TestbedHarnessEnvironment.documentRootLoader(fixture);
|
|
157
|
+
* const sheet = await rootLoader.getHarness(WrActionSheetHarness);
|
|
158
|
+
*
|
|
159
|
+
* expect(await sheet.getActionLabels()).toEqual(['Take Photo', 'Delete', 'Cancel']);
|
|
160
|
+
* await sheet.select({ label: 'Delete' });
|
|
161
|
+
* ```
|
|
162
|
+
*
|
|
163
|
+
* @see https://ngwr.dev/guides/testing
|
|
164
|
+
*/
|
|
165
|
+
declare class WrActionSheetHarness extends ComponentHarness {
|
|
166
|
+
/** The sheet's root inside the drawer panel. A closed sheet renders none. */
|
|
167
|
+
static hostSelector: string;
|
|
168
|
+
/** Build a predicate that narrows the query — sheets can be stacked. */
|
|
169
|
+
static with(options?: WrActionSheetHarnessFilters): HarnessPredicate<WrActionSheetHarness>;
|
|
170
|
+
/**
|
|
171
|
+
* Whether this sheet is still open.
|
|
172
|
+
*
|
|
173
|
+
* A harness can only be obtained while the sheet is open — closing disposes the
|
|
174
|
+
* overlay and everything in it — so this is the answer for a harness you are
|
|
175
|
+
* already HOLDING: it flips to `false` after a pick or a dismissal, where a fresh
|
|
176
|
+
* `getHarnessOrNull()` comes back `null`.
|
|
177
|
+
*
|
|
178
|
+
* Attachment is the test rather than a class, because disposal removes the element
|
|
179
|
+
* without changing anything on it.
|
|
180
|
+
*/
|
|
181
|
+
isOpen(): Promise<boolean>;
|
|
182
|
+
/** The visible heading, or `null` when the sheet was opened without a `title`. */
|
|
183
|
+
getTitle(): Promise<string | null>;
|
|
184
|
+
/** The muted sub-heading, or `null` when the sheet has no `message`. */
|
|
185
|
+
getMessage(): Promise<string | null>;
|
|
186
|
+
/**
|
|
187
|
+
* The name the dialog announces.
|
|
188
|
+
*
|
|
189
|
+
* The sheet always publishes one, and for an untitled sheet it is INVISIBLE: the
|
|
190
|
+
* component renders a screen-reader-only `[wrDrawerTitle]` carrying
|
|
191
|
+
* `actionSheet.label` (English default `Actions`), because a bottom sheet is an
|
|
192
|
+
* `aria-modal` dialog and an unnamed one is announced as nothing at all. Nothing
|
|
193
|
+
* on screen changes when that string is wrong or missing, which is exactly why it
|
|
194
|
+
* is worth an assertion.
|
|
195
|
+
*
|
|
196
|
+
* Read from `.wr-drawer__title` — the class the title directive applies — so the
|
|
197
|
+
* one query answers for both shapes: the visible heading carries it too.
|
|
198
|
+
*/
|
|
199
|
+
getAccessibleName(): Promise<string>;
|
|
200
|
+
/** Whether the announced name comes from a visible heading rather than the fallback. */
|
|
201
|
+
isTitleVisible(): Promise<boolean>;
|
|
202
|
+
/**
|
|
203
|
+
* Whether the dialog is actually WIRED to that name — the drawer panel's
|
|
204
|
+
* `aria-labelledby` resolving to this sheet's own title element, and to nothing
|
|
205
|
+
* else on the page.
|
|
206
|
+
*
|
|
207
|
+
* {@link getAccessibleName} only proves a string exists in the markup; a screen
|
|
208
|
+
* reader reads it only if the reference points at it. The two are separate
|
|
209
|
+
* failures and the second is silent: the title renders, the sheet looks right, and
|
|
210
|
+
* the dialog is announced as unnamed. Worth its own assertion because the drawer
|
|
211
|
+
* resolves the reference AFTER attaching the panel rather than while rendering it,
|
|
212
|
+
* so a title that arrives late is named late or not at all.
|
|
213
|
+
*
|
|
214
|
+
* Counted across the document as well, because two panels answering to one id hand
|
|
215
|
+
* every reference to whichever comes first — which is how a second sheet ends up
|
|
216
|
+
* announcing the first one's title.
|
|
217
|
+
*/
|
|
218
|
+
isNamed(): Promise<boolean>;
|
|
219
|
+
/** The rows this sheet offers, in DOM order — cancel rows last, in their own group. */
|
|
220
|
+
getActions(filters?: WrActionSheetActionHarnessFilters): Promise<WrActionSheetActionHarness[]>;
|
|
221
|
+
/** The labels of every row, in DOM order. */
|
|
222
|
+
getActionLabels(): Promise<string[]>;
|
|
223
|
+
/**
|
|
224
|
+
* The labels grouped the way the sheet lays them out: the main group first, then
|
|
225
|
+
* the cancel group when there is one.
|
|
226
|
+
*
|
|
227
|
+
* The grouping is the component's whole visual contract — a `cancel` row is pulled
|
|
228
|
+
* out of the list and pinned to the bottom with a gap above it — and it is
|
|
229
|
+
* invisible to {@link getActionLabels}, which flattens the two. A cancel row that
|
|
230
|
+
* stopped being separated would still come last in DOM order, so the flat list
|
|
231
|
+
* cannot catch it.
|
|
232
|
+
*/
|
|
233
|
+
getActionGroups(): Promise<string[][]>;
|
|
234
|
+
/**
|
|
235
|
+
* Whether the sheet drew a separate bottom group — true exactly when at least one
|
|
236
|
+
* row was given `role: 'cancel'`, since the component omits the group entirely
|
|
237
|
+
* rather than rendering an empty one.
|
|
238
|
+
*/
|
|
239
|
+
hasCancelGroup(): Promise<boolean>;
|
|
240
|
+
/**
|
|
241
|
+
* Pick the first row matching the filters.
|
|
242
|
+
*
|
|
243
|
+
* Throws when nothing matches, naming what the sheet does offer — the alternative
|
|
244
|
+
* is a silent no-op followed by an assertion about a sheet that never moved. A
|
|
245
|
+
* disabled match throws too, from the row harness.
|
|
246
|
+
*/
|
|
247
|
+
select(filters: WrActionSheetActionHarnessFilters): Promise<void>;
|
|
248
|
+
/**
|
|
249
|
+
* Press Escape — dismissing the sheet WITHOUT emitting `action`.
|
|
250
|
+
*
|
|
251
|
+
* The key never needs to reach the sheet itself: the drawer underneath listens
|
|
252
|
+
* through the CDK's keyboard dispatcher, which keeps one document listener and
|
|
253
|
+
* hands the event to the top-most overlay. So with sheets stacked this dismisses
|
|
254
|
+
* the top one whichever harness it is called on.
|
|
255
|
+
*/
|
|
256
|
+
sendEscape(): Promise<void>;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
export { WrActionSheetActionHarness, WrActionSheetHarness };
|
|
260
|
+
export type { WrActionSheetActionHarnessFilters, WrActionSheetHarnessFilters };
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { BaseHarnessFilters, ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @license
|
|
5
|
+
*
|
|
6
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/** Narrows which `<wr-bar-chart>` a harness query matches. */
|
|
11
|
+
interface WrBarChartHarnessFilters extends BaseHarnessFilters {
|
|
12
|
+
/** Match a chart holding a bar with this label. */
|
|
13
|
+
readonly barLabel?: string | RegExp;
|
|
14
|
+
}
|
|
15
|
+
/** One column, as the chart draws and announces it. */
|
|
16
|
+
interface WrBarChartBar {
|
|
17
|
+
/** The label printed under the column — decoration, and `aria-hidden`. */
|
|
18
|
+
readonly label: string;
|
|
19
|
+
/** The value printed above it, or `null` when `showValues` is off. */
|
|
20
|
+
readonly value: string | null;
|
|
21
|
+
/** What the column announces: the label and the value in one string. */
|
|
22
|
+
readonly name: string | null;
|
|
23
|
+
/** The bar's height as a percentage of the chart's maximum. */
|
|
24
|
+
readonly heightPercent: number;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* @license
|
|
29
|
+
*
|
|
30
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
31
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Test harness for `<wr-bar-chart>`.
|
|
36
|
+
*
|
|
37
|
+
* **The bars are read as PERCENTAGES, not as pixels.** Each column's height is
|
|
38
|
+
* written inline as a share of the chart's maximum, which is the one number that
|
|
39
|
+
* survives a test with no layout — and it is also the component's whole job, since
|
|
40
|
+
* the maximum is either given or derived from the data. That share is read off the
|
|
41
|
+
* `style` ATTRIBUTE rather than through `getCssValue()`, and the difference is not
|
|
42
|
+
* cosmetic: `getCssValue()` is `getComputedStyle()`, which hands the declared `60%`
|
|
43
|
+
* straight back in jsdom and resolves it to used pixels in a real browser — so the
|
|
44
|
+
* same harness answered `100` here and `200` under Selenium or a browser runner,
|
|
45
|
+
* with no error to say which one you got. The stylesheet's own `min-height: 1px`
|
|
46
|
+
* is a second way that read lies, turning an empty bar into `1`.
|
|
47
|
+
*
|
|
48
|
+
* **The visible label row is decoration.** Every column carries `role="img"` with
|
|
49
|
+
* the label AND the value in its name, and the printed labels underneath are
|
|
50
|
+
* `aria-hidden` — so {@link WrBarChartBar.name} is what a screen reader gets and
|
|
51
|
+
* {@link WrBarChartBar.label} is what is drawn. Asserting only the second would pass
|
|
52
|
+
* on a chart that announces nothing.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* const chart = await loader.getHarness(WrBarChartHarness);
|
|
57
|
+
*
|
|
58
|
+
* expect(await chart.getLabels()).toEqual(['Mon', 'Tue', 'Wed']);
|
|
59
|
+
* expect((await chart.getBars())[1].heightPercent).toBe(100);
|
|
60
|
+
* ```
|
|
61
|
+
*
|
|
62
|
+
* @see https://ngwr.dev/guides/testing
|
|
63
|
+
*/
|
|
64
|
+
declare class WrBarChartHarness extends ComponentHarness {
|
|
65
|
+
static hostSelector: string;
|
|
66
|
+
/** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */
|
|
67
|
+
static with(options?: WrBarChartHarnessFilters): HarnessPredicate<WrBarChartHarness>;
|
|
68
|
+
/** Every column, in data order. */
|
|
69
|
+
getBars(): Promise<WrBarChartBar[]>;
|
|
70
|
+
/** Parse one bar's declared share. See the class note on why this is not `getCssValue()`. */
|
|
71
|
+
private static heightPercentOf;
|
|
72
|
+
/** The labels printed under the columns, in order. */
|
|
73
|
+
getLabels(): Promise<string[]>;
|
|
74
|
+
/** What each column announces — the label and the value together. */
|
|
75
|
+
getAccessibleNames(): Promise<(string | null)[]>;
|
|
76
|
+
/** How many columns the chart drew. */
|
|
77
|
+
getBarCount(): Promise<number>;
|
|
78
|
+
/** Whether the values are printed above the bars (`showValues`). */
|
|
79
|
+
hasValues(): Promise<boolean>;
|
|
80
|
+
/** The plot's height in pixels, as the component writes it inline. */
|
|
81
|
+
getPlotHeight(): Promise<number>;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export { WrBarChartHarness };
|
|
85
|
+
export type { WrBarChartBar, WrBarChartHarnessFilters };
|