ngwr 10.2.1 → 11.1.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 +39 -19
- package/action-sheet/styles/_index.scss +4 -1
- package/anchor/styles/_index.scss +6 -5
- package/back-top/styles/_index.scss +6 -1
- package/blur-text/styles/_index.scss +13 -0
- package/button/styles/_index.scss +11 -6
- package/calendar/styles/_index.scss +11 -2
- package/carousel/styles/_index.scss +13 -2
- package/cascader/styles/_index.scss +5 -3
- package/circular-text/styles/_index.scss +2 -0
- package/collapse/styles/_index.scss +1 -1
- package/color-picker/styles/_index.scss +6 -1
- package/command-palette/styles/_index.scss +2 -1
- package/compare/styles/_index.scss +1 -2
- package/context-menu/styles/_index.scss +8 -2
- package/descriptions/styles/_index.scss +2 -2
- package/dialog/styles/_index.scss +7 -0
- package/drawer/styles/_index.scss +20 -1
- package/dropdown/styles/_index.scss +19 -5
- package/empty/styles/_index.scss +10 -0
- package/falling-text/styles/_index.scss +2 -1
- package/fesm2022/ngwr-action-sheet.mjs +13 -3
- package/fesm2022/ngwr-action-sheet.mjs.map +1 -1
- package/fesm2022/ngwr-affix.mjs +40 -13
- package/fesm2022/ngwr-affix.mjs.map +1 -1
- package/fesm2022/ngwr-anchor.mjs +18 -6
- package/fesm2022/ngwr-anchor.mjs.map +1 -1
- package/fesm2022/ngwr-aurora.mjs +2 -2
- package/fesm2022/ngwr-aurora.mjs.map +1 -1
- package/fesm2022/ngwr-avatar.mjs +31 -7
- package/fesm2022/ngwr-avatar.mjs.map +1 -1
- package/fesm2022/ngwr-back-top.mjs +6 -2
- package/fesm2022/ngwr-back-top.mjs.map +1 -1
- package/fesm2022/ngwr-badge.mjs +1 -1
- package/fesm2022/ngwr-badge.mjs.map +1 -1
- package/fesm2022/ngwr-bar-chart.mjs +30 -9
- package/fesm2022/ngwr-bar-chart.mjs.map +1 -1
- package/fesm2022/ngwr-blur-text.mjs +2 -2
- package/fesm2022/ngwr-blur-text.mjs.map +1 -1
- package/fesm2022/ngwr-border-glow.mjs +2 -2
- package/fesm2022/ngwr-border-glow.mjs.map +1 -1
- package/fesm2022/ngwr-breadcrumbs.mjs +2 -2
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-burger.mjs +9 -4
- package/fesm2022/ngwr-burger.mjs.map +1 -1
- package/fesm2022/ngwr-button-testing.mjs +96 -0
- package/fesm2022/ngwr-button-testing.mjs.map +1 -0
- package/fesm2022/ngwr-button.mjs +31 -14
- package/fesm2022/ngwr-button.mjs.map +1 -1
- package/fesm2022/ngwr-calendar-heatmap.mjs +40 -8
- package/fesm2022/ngwr-calendar-heatmap.mjs.map +1 -1
- package/fesm2022/ngwr-calendar.mjs +20 -1
- package/fesm2022/ngwr-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-card.mjs +2 -2
- package/fesm2022/ngwr-card.mjs.map +1 -1
- package/fesm2022/ngwr-carousel-testing.mjs +377 -0
- package/fesm2022/ngwr-carousel-testing.mjs.map +1 -0
- package/fesm2022/ngwr-carousel.mjs +67 -13
- package/fesm2022/ngwr-carousel.mjs.map +1 -1
- package/fesm2022/ngwr-cascader-testing.mjs +534 -0
- package/fesm2022/ngwr-cascader-testing.mjs.map +1 -0
- package/fesm2022/ngwr-cascader.mjs +2 -2
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-checkbox-testing.mjs +90 -0
- package/fesm2022/ngwr-checkbox-testing.mjs.map +1 -0
- package/fesm2022/ngwr-checkbox.mjs +9 -3
- package/fesm2022/ngwr-checkbox.mjs.map +1 -1
- package/fesm2022/ngwr-circular-text.mjs +2 -2
- package/fesm2022/ngwr-circular-text.mjs.map +1 -1
- package/fesm2022/ngwr-click-spark.mjs +2 -2
- package/fesm2022/ngwr-click-spark.mjs.map +1 -1
- package/fesm2022/ngwr-collapse-testing.mjs +368 -0
- package/fesm2022/ngwr-collapse-testing.mjs.map +1 -0
- package/fesm2022/ngwr-color-picker.mjs +134 -14
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- package/fesm2022/ngwr-command-palette-testing.mjs +589 -0
- package/fesm2022/ngwr-command-palette-testing.mjs.map +1 -0
- package/fesm2022/ngwr-command-palette.mjs +58 -8
- package/fesm2022/ngwr-command-palette.mjs.map +1 -1
- package/fesm2022/ngwr-compare.mjs +103 -13
- package/fesm2022/ngwr-compare.mjs.map +1 -1
- package/fesm2022/ngwr-config.mjs +106 -0
- package/fesm2022/ngwr-config.mjs.map +1 -0
- package/fesm2022/ngwr-context-menu-testing.mjs +631 -0
- package/fesm2022/ngwr-context-menu-testing.mjs.map +1 -0
- package/fesm2022/ngwr-context-menu.mjs +94 -8
- package/fesm2022/ngwr-context-menu.mjs.map +1 -1
- package/fesm2022/ngwr-cookie.mjs +5 -1
- package/fesm2022/ngwr-cookie.mjs.map +1 -1
- package/fesm2022/ngwr-counter.mjs +11 -3
- package/fesm2022/ngwr-counter.mjs.map +1 -1
- package/fesm2022/ngwr-date-adapter-luxon.mjs +52 -4
- package/fesm2022/ngwr-date-adapter-luxon.mjs.map +1 -1
- package/fesm2022/ngwr-date-adapter.mjs +54 -8
- package/fesm2022/ngwr-date-adapter.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker-testing.mjs +766 -0
- package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -0
- package/fesm2022/ngwr-date-picker.mjs +73 -3
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-decrypt-text.mjs +27 -9
- package/fesm2022/ngwr-decrypt-text.mjs.map +1 -1
- package/fesm2022/ngwr-dialog-testing.mjs +89 -0
- package/fesm2022/ngwr-dialog-testing.mjs.map +1 -0
- package/fesm2022/ngwr-directives.mjs +36 -12
- package/fesm2022/ngwr-directives.mjs.map +1 -1
- package/fesm2022/ngwr-donut-chart.mjs +22 -5
- package/fesm2022/ngwr-donut-chart.mjs.map +1 -1
- package/fesm2022/ngwr-drag-drop.mjs +2 -2
- package/fesm2022/ngwr-drag-drop.mjs.map +1 -1
- package/fesm2022/ngwr-drawer-testing.mjs +250 -0
- package/fesm2022/ngwr-drawer-testing.mjs.map +1 -0
- package/fesm2022/ngwr-dropdown-testing.mjs +291 -0
- package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -0
- package/fesm2022/ngwr-dropdown.mjs +10 -2
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-empty.mjs +24 -7
- package/fesm2022/ngwr-empty.mjs.map +1 -1
- package/fesm2022/ngwr-event-calendar.mjs +57 -10
- package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-falling-text.mjs +2 -2
- package/fesm2022/ngwr-falling-text.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload-testing.mjs +332 -0
- package/fesm2022/ngwr-file-upload-testing.mjs.map +1 -0
- package/fesm2022/ngwr-form-testing.mjs +451 -0
- package/fesm2022/ngwr-form-testing.mjs.map +1 -0
- package/fesm2022/ngwr-form.mjs +19 -3
- package/fesm2022/ngwr-form.mjs.map +1 -1
- package/fesm2022/ngwr-fuzzy-text.mjs +9 -2
- package/fesm2022/ngwr-fuzzy-text.mjs.map +1 -1
- package/fesm2022/ngwr-gauge.mjs +19 -5
- package/fesm2022/ngwr-gauge.mjs.map +1 -1
- package/fesm2022/ngwr-glitch-text.mjs +2 -2
- package/fesm2022/ngwr-glitch-text.mjs.map +1 -1
- package/fesm2022/ngwr-gradient-text.mjs +2 -2
- package/fesm2022/ngwr-gradient-text.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +50 -0
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +48 -0
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-image-cropper.mjs +23 -0
- package/fesm2022/ngwr-image-cropper.mjs.map +1 -1
- package/fesm2022/ngwr-input-number-testing.mjs +306 -0
- package/fesm2022/ngwr-input-number-testing.mjs.map +1 -0
- package/fesm2022/ngwr-input-number.mjs +35 -3
- package/fesm2022/ngwr-input-number.mjs.map +1 -1
- package/fesm2022/ngwr-input-otp-testing.mjs +419 -0
- package/fesm2022/ngwr-input-otp-testing.mjs.map +1 -0
- package/fesm2022/ngwr-input-otp.mjs +36 -5
- package/fesm2022/ngwr-input-otp.mjs.map +1 -1
- package/fesm2022/ngwr-input-testing.mjs +102 -0
- package/fesm2022/ngwr-input-testing.mjs.map +1 -0
- package/fesm2022/ngwr-input.mjs +47 -10
- package/fesm2022/ngwr-input.mjs.map +1 -1
- package/fesm2022/ngwr-knob.mjs +44 -8
- package/fesm2022/ngwr-knob.mjs.map +1 -1
- package/fesm2022/ngwr-layout.mjs +21 -5
- package/fesm2022/ngwr-layout.mjs.map +1 -1
- package/fesm2022/ngwr-lightbox.mjs +33 -6
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-line-chart.mjs +17 -4
- package/fesm2022/ngwr-line-chart.mjs.map +1 -1
- package/fesm2022/ngwr-list.mjs +2 -2
- package/fesm2022/ngwr-list.mjs.map +1 -1
- package/fesm2022/ngwr-loading-bar.mjs +2 -2
- package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
- package/fesm2022/ngwr-markdown-testing.mjs +516 -0
- package/fesm2022/ngwr-markdown-testing.mjs.map +1 -0
- package/fesm2022/ngwr-markdown.mjs +1492 -0
- package/fesm2022/ngwr-markdown.mjs.map +1 -0
- package/fesm2022/ngwr-marquee.mjs +17 -6
- package/fesm2022/ngwr-marquee.mjs.map +1 -1
- package/fesm2022/ngwr-mention-testing.mjs +513 -0
- package/fesm2022/ngwr-mention-testing.mjs.map +1 -0
- package/fesm2022/ngwr-mention.mjs +10 -1
- package/fesm2022/ngwr-mention.mjs.map +1 -1
- package/fesm2022/ngwr-meta.mjs +22 -7
- package/fesm2022/ngwr-meta.mjs.map +1 -1
- package/fesm2022/ngwr-meter-group.mjs +19 -5
- package/fesm2022/ngwr-meter-group.mjs.map +1 -1
- package/fesm2022/ngwr-overlay.mjs +41 -1
- package/fesm2022/ngwr-overlay.mjs.map +1 -1
- package/fesm2022/ngwr-pagination-testing.mjs +389 -0
- package/fesm2022/ngwr-pagination-testing.mjs.map +1 -0
- package/fesm2022/ngwr-pagination.mjs +14 -2
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-popconfirm-testing.mjs +309 -0
- package/fesm2022/ngwr-popconfirm-testing.mjs.map +1 -0
- package/fesm2022/ngwr-popconfirm.mjs +95 -17
- package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
- package/fesm2022/ngwr-popover-testing.mjs +316 -0
- package/fesm2022/ngwr-popover-testing.mjs.map +1 -0
- package/fesm2022/ngwr-popover.mjs +21 -3
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-pull-to-refresh.mjs +17 -2
- package/fesm2022/ngwr-pull-to-refresh.mjs.map +1 -1
- package/fesm2022/ngwr-qr.mjs +13 -3
- package/fesm2022/ngwr-qr.mjs.map +1 -1
- package/fesm2022/ngwr-radio-testing.mjs +392 -0
- package/fesm2022/ngwr-radio-testing.mjs.map +1 -0
- package/fesm2022/ngwr-radio.mjs +10 -3
- package/fesm2022/ngwr-radio.mjs.map +1 -1
- package/fesm2022/ngwr-rating-testing.mjs +384 -0
- package/fesm2022/ngwr-rating-testing.mjs.map +1 -0
- package/fesm2022/ngwr-rating.mjs +37 -2
- package/fesm2022/ngwr-rating.mjs.map +1 -1
- package/fesm2022/ngwr-segmented-testing.mjs +512 -0
- package/fesm2022/ngwr-segmented-testing.mjs.map +1 -0
- package/fesm2022/ngwr-select-testing.mjs +268 -0
- package/fesm2022/ngwr-select-testing.mjs.map +1 -0
- package/fesm2022/ngwr-select.mjs +87 -16
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-shiny-text.mjs +2 -2
- package/fesm2022/ngwr-shiny-text.mjs.map +1 -1
- package/fesm2022/ngwr-sidebar.mjs +65 -12
- package/fesm2022/ngwr-sidebar.mjs.map +1 -1
- package/fesm2022/ngwr-slider-testing.mjs +478 -0
- package/fesm2022/ngwr-slider-testing.mjs.map +1 -0
- package/fesm2022/ngwr-slider.mjs +57 -13
- package/fesm2022/ngwr-slider.mjs.map +1 -1
- package/fesm2022/ngwr-sparkline.mjs +26 -6
- package/fesm2022/ngwr-sparkline.mjs.map +1 -1
- package/fesm2022/ngwr-speed-dial.mjs +37 -4
- package/fesm2022/ngwr-speed-dial.mjs.map +1 -1
- package/fesm2022/ngwr-spinner.mjs +12 -3
- package/fesm2022/ngwr-spinner.mjs.map +1 -1
- package/fesm2022/ngwr-splash-cursor.mjs +2 -2
- package/fesm2022/ngwr-splash-cursor.mjs.map +1 -1
- package/fesm2022/ngwr-split-text.mjs +2 -2
- package/fesm2022/ngwr-split-text.mjs.map +1 -1
- package/fesm2022/ngwr-splitter.mjs +70 -9
- package/fesm2022/ngwr-splitter.mjs.map +1 -1
- package/fesm2022/ngwr-spotlight-card.mjs +2 -2
- package/fesm2022/ngwr-spotlight-card.mjs.map +1 -1
- package/fesm2022/ngwr-star-border.mjs +2 -2
- package/fesm2022/ngwr-star-border.mjs.map +1 -1
- package/fesm2022/ngwr-statistic.mjs +24 -7
- package/fesm2022/ngwr-statistic.mjs.map +1 -1
- package/fesm2022/ngwr-stepper-testing.mjs +477 -0
- package/fesm2022/ngwr-stepper-testing.mjs.map +1 -0
- package/fesm2022/ngwr-switch-testing.mjs +77 -0
- package/fesm2022/ngwr-switch-testing.mjs.map +1 -0
- package/fesm2022/ngwr-switch.mjs +9 -3
- package/fesm2022/ngwr-switch.mjs.map +1 -1
- package/fesm2022/ngwr-table-testing.mjs +580 -0
- package/fesm2022/ngwr-table-testing.mjs.map +1 -0
- package/fesm2022/ngwr-table.mjs +87 -14
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-tabs-testing.mjs +617 -0
- package/fesm2022/ngwr-tabs-testing.mjs.map +1 -0
- package/fesm2022/ngwr-tabs.mjs +38 -6
- package/fesm2022/ngwr-tabs.mjs.map +1 -1
- package/fesm2022/ngwr-textarea-testing.mjs +238 -0
- package/fesm2022/ngwr-textarea-testing.mjs.map +1 -0
- package/fesm2022/ngwr-textarea.mjs +32 -4
- package/fesm2022/ngwr-textarea.mjs.map +1 -1
- package/fesm2022/ngwr-tilt-card.mjs +2 -2
- package/fesm2022/ngwr-tilt-card.mjs.map +1 -1
- package/fesm2022/ngwr-toast-testing.mjs +101 -0
- package/fesm2022/ngwr-toast-testing.mjs.map +1 -0
- package/fesm2022/ngwr-toast.mjs +2 -2
- package/fesm2022/ngwr-toast.mjs.map +1 -1
- package/fesm2022/ngwr-tour.mjs +61 -9
- package/fesm2022/ngwr-tour.mjs.map +1 -1
- package/fesm2022/ngwr-transfer-testing.mjs +538 -0
- package/fesm2022/ngwr-transfer-testing.mjs.map +1 -0
- package/fesm2022/ngwr-transfer.mjs +45 -14
- package/fesm2022/ngwr-transfer.mjs.map +1 -1
- package/fesm2022/ngwr-tree-testing.mjs +734 -0
- package/fesm2022/ngwr-tree-testing.mjs.map +1 -0
- package/fesm2022/ngwr-tree.mjs +73 -7
- package/fesm2022/ngwr-tree.mjs.map +1 -1
- package/fesm2022/ngwr-typewriter.mjs +5 -3
- package/fesm2022/ngwr-typewriter.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 +31 -5
- package/fesm2022/ngwr-virtual-scroll.mjs.map +1 -1
- package/fesm2022/ngwr-waves.mjs +3 -3
- package/fesm2022/ngwr-waves.mjs.map +1 -1
- package/fesm2022/ngwr-window.mjs +8 -0
- package/fesm2022/ngwr-window.mjs.map +1 -1
- package/file-upload/styles/_index.scss +7 -2
- package/gauge/styles/_index.scss +1 -1
- package/glitch-text/styles/_index.scss +4 -0
- package/i18n/en.json +48 -0
- package/i18n/ru.json +48 -0
- package/image-cropper/styles/_index.scss +13 -1
- package/input/styles/_index.scss +2 -2
- package/input-number/styles/_index.scss +7 -2
- package/knob/styles/_index.scss +8 -1
- package/layout/styles/_index.scss +3 -3
- package/lightbox/styles/_index.scss +10 -2
- package/line-chart/styles/_index.scss +6 -0
- package/llms-full.txt +151 -4
- package/llms.txt +57 -8
- package/loading-bar/styles/_index.scss +1 -2
- package/markdown/styles/_index.scss +296 -0
- package/marquee/styles/_index.scss +12 -0
- package/mcp/api.js +512 -0
- package/mcp/catalog.js +157 -0
- package/mcp/server.js +273 -0
- package/mcp/tools.js +366 -0
- package/meter-group/styles/_index.scss +1 -1
- package/package.json +186 -35
- package/pagination/styles/_index.scss +6 -6
- package/popover/styles/_index.scss +37 -5
- package/rating/styles/_index.scss +10 -0
- package/result/styles/_index.scss +3 -1
- package/schematics/use/symbol-map.json +2 -0
- package/segmented/styles/_index.scss +12 -1
- package/select/styles/_index.scss +32 -10
- package/sidebar/styles/_index.scss +30 -5
- package/slider/styles/_index.scss +15 -0
- package/speed-dial/styles/_index.scss +20 -0
- package/split-text/styles/_index.scss +13 -0
- package/star-border/styles/_index.scss +2 -0
- package/stepper/styles/_index.scss +19 -3
- package/styles/_grid.scss +4 -4
- package/styles.scss +1 -0
- package/switch/styles/_index.scss +5 -3
- package/table/styles/_index.scss +25 -12
- package/tabs/styles/_index.scss +11 -1
- package/textarea/styles/_index.scss +5 -0
- package/theme/styles/_colors.scss +44 -15
- package/theme/styles/_dark.scss +35 -15
- package/theme/styles/_mixins.scss +3 -0
- package/timeline/styles/_index.scss +2 -2
- package/toast/styles/_index.scss +17 -8
- package/toolbar/styles/_index.scss +3 -3
- package/tour/styles/_index.scss +7 -1
- package/tree/styles/_index.scss +9 -5
- package/types/ngwr-action-sheet.d.ts +9 -1
- package/types/ngwr-affix.d.ts +7 -1
- package/types/ngwr-anchor.d.ts +8 -1
- package/types/ngwr-avatar.d.ts +13 -3
- package/types/ngwr-bar-chart.d.ts +16 -0
- package/types/ngwr-burger.d.ts +6 -2
- package/types/ngwr-button-testing.d.ts +85 -0
- package/types/ngwr-button.d.ts +26 -10
- package/types/ngwr-calendar-heatmap.d.ts +16 -2
- package/types/ngwr-calendar.d.ts +10 -0
- package/types/ngwr-carousel-testing.d.ts +257 -0
- package/types/ngwr-carousel.d.ts +20 -4
- package/types/ngwr-cascader-testing.d.ts +392 -0
- package/types/ngwr-checkbox-testing.d.ts +77 -0
- package/types/ngwr-checkbox.d.ts +7 -2
- package/types/ngwr-collapse-testing.d.ts +290 -0
- package/types/ngwr-color-picker.d.ts +20 -11
- package/types/ngwr-command-palette-testing.d.ts +437 -0
- package/types/ngwr-command-palette.d.ts +25 -2
- package/types/ngwr-compare.d.ts +50 -2
- package/types/ngwr-config.d.ts +176 -0
- package/types/ngwr-context-menu-testing.d.ts +401 -0
- package/types/ngwr-context-menu.d.ts +65 -17
- package/types/ngwr-counter.d.ts +6 -1
- package/types/ngwr-date-adapter-luxon.d.ts +26 -0
- package/types/ngwr-date-picker-testing.d.ts +518 -0
- package/types/ngwr-date-picker.d.ts +4 -0
- package/types/ngwr-dialog-testing.d.ts +79 -0
- package/types/ngwr-directives.d.ts +10 -1
- package/types/ngwr-donut-chart.d.ts +8 -1
- package/types/ngwr-drawer-testing.d.ts +196 -0
- package/types/ngwr-dropdown-testing.d.ts +202 -0
- package/types/ngwr-dropdown.d.ts +7 -1
- package/types/ngwr-empty.d.ts +19 -4
- package/types/ngwr-event-calendar.d.ts +26 -1
- package/types/ngwr-file-upload-testing.d.ts +194 -0
- package/types/ngwr-form-testing.d.ts +379 -0
- package/types/ngwr-form.d.ts +17 -0
- package/types/ngwr-gauge.d.ts +13 -1
- package/types/ngwr-image-cropper.d.ts +10 -0
- package/types/ngwr-input-number-testing.d.ts +226 -0
- package/types/ngwr-input-number.d.ts +29 -1
- package/types/ngwr-input-otp-testing.d.ts +299 -0
- package/types/ngwr-input-otp.d.ts +23 -2
- package/types/ngwr-input-testing.d.ts +84 -0
- package/types/ngwr-input.d.ts +20 -6
- package/types/ngwr-knob.d.ts +18 -0
- package/types/ngwr-layout.d.ts +1 -0
- package/types/ngwr-lightbox.d.ts +17 -3
- package/types/ngwr-line-chart.d.ts +9 -2
- package/types/ngwr-markdown-testing.d.ts +462 -0
- package/types/ngwr-markdown.d.ts +534 -0
- package/types/ngwr-marquee.d.ts +12 -2
- package/types/ngwr-mention-testing.d.ts +359 -0
- package/types/ngwr-meta.d.ts +4 -2
- package/types/ngwr-meter-group.d.ts +11 -1
- package/types/ngwr-overlay.d.ts +33 -2
- package/types/ngwr-pagination-testing.d.ts +291 -0
- package/types/ngwr-pagination.d.ts +1 -0
- package/types/ngwr-popconfirm-testing.d.ts +235 -0
- package/types/ngwr-popconfirm.d.ts +31 -21
- package/types/ngwr-popover-testing.d.ts +221 -0
- package/types/ngwr-popover.d.ts +9 -0
- package/types/ngwr-pull-to-refresh.d.ts +7 -0
- package/types/ngwr-qr.d.ts +9 -1
- package/types/ngwr-radio-testing.d.ts +296 -0
- package/types/ngwr-radio.d.ts +8 -2
- package/types/ngwr-rating-testing.d.ts +291 -0
- package/types/ngwr-rating.d.ts +23 -0
- package/types/ngwr-segmented-testing.d.ts +401 -0
- package/types/ngwr-select-testing.d.ts +175 -0
- package/types/ngwr-select.d.ts +45 -4
- package/types/ngwr-sidebar.d.ts +17 -2
- package/types/ngwr-slider-testing.d.ts +329 -0
- package/types/ngwr-slider.d.ts +35 -1
- package/types/ngwr-sparkline.d.ts +12 -2
- package/types/ngwr-speed-dial.d.ts +17 -18
- package/types/ngwr-spinner.d.ts +8 -1
- package/types/ngwr-splitter.d.ts +24 -1
- package/types/ngwr-statistic.d.ts +12 -2
- package/types/ngwr-stepper-testing.d.ts +346 -0
- package/types/ngwr-switch-testing.d.ts +66 -0
- package/types/ngwr-switch.d.ts +7 -2
- package/types/ngwr-table-testing.d.ts +423 -0
- package/types/ngwr-table.d.ts +42 -0
- package/types/ngwr-tabs-testing.d.ts +470 -0
- package/types/ngwr-tabs.d.ts +9 -0
- package/types/ngwr-textarea-testing.d.ts +184 -0
- package/types/ngwr-textarea.d.ts +7 -2
- package/types/ngwr-toast-testing.d.ts +80 -0
- package/types/ngwr-tour.d.ts +27 -0
- package/types/ngwr-transfer-testing.d.ts +444 -0
- package/types/ngwr-transfer.d.ts +16 -1
- package/types/ngwr-tree-testing.d.ts +501 -0
- package/types/ngwr-tree.d.ts +33 -0
- package/types/ngwr-version.d.ts +1 -1
- package/types/ngwr-virtual-scroll.d.ts +13 -1
- package/typewriter/styles/_index.scss +1 -1
- package/typography/styles/_index.scss +1 -1
- package/window/styles/_index.scss +32 -9
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { BaseHarnessFilters, ContentContainerComponentHarness, HarnessPredicate, HarnessLoader } from '@angular/cdk/testing';
|
|
2
|
+
import { WrPopoverPosition } from 'ngwr/popover';
|
|
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 `[wrPopover]` trigger a harness query matches. */
|
|
12
|
+
interface WrPopoverHarnessFilters extends BaseHarnessFilters {
|
|
13
|
+
/**
|
|
14
|
+
* Match the trigger's own visible text — the label of the button (or link, or
|
|
15
|
+
* whatever the directive sits on), not the panel's content. A string is an
|
|
16
|
+
* exact match, a RegExp is tested.
|
|
17
|
+
*/
|
|
18
|
+
readonly triggerText?: string | RegExp;
|
|
19
|
+
/** Match only popovers (`'popover'`) or only tooltips (`'tooltip'`). */
|
|
20
|
+
readonly mode?: 'popover' | 'tooltip';
|
|
21
|
+
/** Match only showing (`true`) or only hidden (`false`) panels. */
|
|
22
|
+
readonly open?: boolean;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @license
|
|
27
|
+
*
|
|
28
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
29
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Test harness for `[wrPopover]` — both shapes the one directive ships:
|
|
34
|
+
*
|
|
35
|
+
* - **popover** — template content, opens on click (or hover), announces
|
|
36
|
+
* `role="dialog"` and is what the trigger's `aria-expanded` describes;
|
|
37
|
+
* - **tooltip** — string content, opens on hover AND focus after a delay,
|
|
38
|
+
* announces `role="tooltip"` and DESCRIBES its trigger instead of being
|
|
39
|
+
* owned by it.
|
|
40
|
+
*
|
|
41
|
+
* The panel is never inside the trigger: it is a portal in the overlay
|
|
42
|
+
* container, a sibling of the whole app. It is reached through the document
|
|
43
|
+
* root, scoped by the id the trigger publishes while the panel is showing —
|
|
44
|
+
* `aria-controls` in popover mode, `aria-describedby` in tooltip mode. That id
|
|
45
|
+
* is what lets two popovers be open at once without reading each other's
|
|
46
|
+
* content, and it is why every panel reader throws while the panel is shut:
|
|
47
|
+
* there is no element to answer about.
|
|
48
|
+
*
|
|
49
|
+
* Being a CONTENT CONTAINER is the point in popover mode — the panel holds the
|
|
50
|
+
* consumer's own components, so `popover.getHarness(WrButtonHarness…)` reaches
|
|
51
|
+
* them without the spec ever touching the overlay.
|
|
52
|
+
*
|
|
53
|
+
* **Timing.** A tooltip opens on `showDelay` and hides on `hideDelay`; a hover
|
|
54
|
+
* popover hides 120ms after the pointer leaves. `open()`, `close()` and the two
|
|
55
|
+
* waiters sit out that REAL time, so a spec that installs fake timers should
|
|
56
|
+
* drive the clock itself and read `isOpen()` rather than call them.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```ts
|
|
60
|
+
* const loader = TestbedHarnessEnvironment.loader(fixture);
|
|
61
|
+
* const details = await loader.getHarness(WrPopoverHarness.with({ triggerText: 'Details' }));
|
|
62
|
+
*
|
|
63
|
+
* await details.open();
|
|
64
|
+
* expect(await details.getRole()).toBe('dialog');
|
|
65
|
+
* await (await details.getHarness(WrButtonHarness.with({ text: 'Confirm' }))).click();
|
|
66
|
+
* ```
|
|
67
|
+
*
|
|
68
|
+
* @see https://ngwr.dev/guides/testing
|
|
69
|
+
*/
|
|
70
|
+
declare class WrPopoverHarness extends ContentContainerComponentHarness {
|
|
71
|
+
/**
|
|
72
|
+
* The directive's host — whatever element the consumer put `[wrPopover]` on.
|
|
73
|
+
*
|
|
74
|
+
* Matched by the marker class, not by `[wrPopover]`: popover-mode content is a
|
|
75
|
+
* `TemplateRef` and so is always BOUND (`[wrPopover]="tpl"`), which leaves no
|
|
76
|
+
* attribute in the DOM at all, and a CLOSED tooltip publishes no ARIA either.
|
|
77
|
+
* (A tooltip written with the static string form, `wrPopover="Save changes"`,
|
|
78
|
+
* does keep the attribute — but only that one shape would be findable by it.)
|
|
79
|
+
* Same shape as `.wr-dropdown-trigger`.
|
|
80
|
+
*/
|
|
81
|
+
static hostSelector: string;
|
|
82
|
+
/** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */
|
|
83
|
+
static with(options?: WrPopoverHarnessFilters): HarnessPredicate<WrPopoverHarness>;
|
|
84
|
+
/**
|
|
85
|
+
* Which shape this trigger carries.
|
|
86
|
+
*
|
|
87
|
+
* Read from the ARIA contract, not from the `mode` input: a bound `[mode]`
|
|
88
|
+
* never reaches the DOM, while `aria-haspopup="dialog"` is on every popover
|
|
89
|
+
* trigger and on no tooltip trigger — a tooltip is a description of the
|
|
90
|
+
* control, not a popup it owns.
|
|
91
|
+
*/
|
|
92
|
+
getMode(): Promise<'popover' | 'tooltip'>;
|
|
93
|
+
/** The trigger's own visible text. The panel's content is `getContentText()`. */
|
|
94
|
+
getTriggerText(): Promise<string>;
|
|
95
|
+
/**
|
|
96
|
+
* Whether the panel is showing.
|
|
97
|
+
*
|
|
98
|
+
* Two different signals because the two modes advertise different things: a
|
|
99
|
+
* popover flips `aria-expanded` on its trigger, a tooltip has none at all and
|
|
100
|
+
* links its description instead. So a tooltip's answer is only as good as the
|
|
101
|
+
* directive's claim on `aria-describedby` — put the tooltip on a control that
|
|
102
|
+
* is ALSO described by something else (a `<wr-form-field>` hint, say) and the
|
|
103
|
+
* two bindings fight over one attribute.
|
|
104
|
+
*/
|
|
105
|
+
isOpen(): Promise<boolean>;
|
|
106
|
+
/**
|
|
107
|
+
* Open the panel with the gesture this trigger actually answers to, and wait
|
|
108
|
+
* until it is showing.
|
|
109
|
+
*
|
|
110
|
+
* `trigger` is an input, so the DOM does not say which gesture this popover
|
|
111
|
+
* wants — the harness moves the pointer on first and falls back to a click.
|
|
112
|
+
* Hover leads because a click is an outside pointer event for every OTHER open
|
|
113
|
+
* panel, so leading with it would dismiss someone else's popover on the way to
|
|
114
|
+
* opening this one; a click-driven popover ignores the hover outright. A
|
|
115
|
+
* tooltip is never clicked at all — hover and focus are its only gestures.
|
|
116
|
+
*
|
|
117
|
+
* Throws when nothing appears: a tooltip with an empty string never opens, and
|
|
118
|
+
* a spec on fake timers has to advance the clock itself.
|
|
119
|
+
*/
|
|
120
|
+
open(timeout?: number): Promise<void>;
|
|
121
|
+
/**
|
|
122
|
+
* Dismiss the panel and wait until it is gone.
|
|
123
|
+
*
|
|
124
|
+
* Escape, because it is the one gesture both modes honour immediately: a
|
|
125
|
+
* popover is closed by the overlay's keyboard dispatcher, a tooltip by the
|
|
126
|
+
* directive's own binding — no delay in either. To exercise the delayed
|
|
127
|
+
* pointer path instead, call `mouseAway()` and then `waitUntilClosed()`.
|
|
128
|
+
*/
|
|
129
|
+
close(timeout?: number): Promise<void>;
|
|
130
|
+
/** Click the trigger. Opens a click-driven popover, toggles it shut again, and does nothing else. */
|
|
131
|
+
click(): Promise<void>;
|
|
132
|
+
/** Move the pointer onto the trigger — opens a hover popover at once, a tooltip after `showDelay`. */
|
|
133
|
+
hover(): Promise<void>;
|
|
134
|
+
/** Move the pointer off the trigger. The panel goes after the grace period, not instantly. */
|
|
135
|
+
mouseAway(): Promise<void>;
|
|
136
|
+
/** Focus the trigger — a tooltip's other opening gesture, so keyboard users get the hint too. */
|
|
137
|
+
focus(): Promise<void>;
|
|
138
|
+
/** Blur the trigger, which hides a tooltip after `hideDelay`. */
|
|
139
|
+
blur(): Promise<void>;
|
|
140
|
+
/** Press Escape on the trigger. Both modes dismiss on it, and neither moves focus. */
|
|
141
|
+
sendEscape(): Promise<void>;
|
|
142
|
+
/** Wait out a pending show. Resolves at once when the panel is already up. */
|
|
143
|
+
waitUntilOpen(timeout?: number): Promise<void>;
|
|
144
|
+
/** Wait out a pending hide. Resolves at once when the panel is already gone. */
|
|
145
|
+
waitUntilClosed(timeout?: number): Promise<void>;
|
|
146
|
+
/**
|
|
147
|
+
* The panel's text.
|
|
148
|
+
*
|
|
149
|
+
* In tooltip mode that is the string itself, rendered into the small text
|
|
150
|
+
* panel; in popover mode it is everything the projected template renders.
|
|
151
|
+
*/
|
|
152
|
+
getContentText(): Promise<string>;
|
|
153
|
+
/**
|
|
154
|
+
* The role the open panel announces: `'dialog'` for a popover, `'tooltip'` for
|
|
155
|
+
* a tooltip.
|
|
156
|
+
*
|
|
157
|
+
* Worth asserting rather than assuming, twice over: the directive sets it on
|
|
158
|
+
* the OVERLAY PANE, not on the content a consumer wrote, and in tooltip mode
|
|
159
|
+
* the pane is deliberately the only element carrying it — the text panel
|
|
160
|
+
* inside has none, or the description would nest a tooltip in a tooltip.
|
|
161
|
+
*/
|
|
162
|
+
getRole(): Promise<string | null>;
|
|
163
|
+
/**
|
|
164
|
+
* The panel's accessible name — `null` in tooltip mode.
|
|
165
|
+
*
|
|
166
|
+
* A popover is a named `role="dialog"`: the `ariaLabel` input, or the i18n
|
|
167
|
+
* catalog's `popover.label` when the consumer says nothing, because an unnamed
|
|
168
|
+
* dialog announces as "dialog" and nothing else. A tooltip has no name of its
|
|
169
|
+
* own; it IS the trigger's description, which is `getDescriptionText()`.
|
|
170
|
+
*/
|
|
171
|
+
getLabel(): Promise<string | null>;
|
|
172
|
+
/**
|
|
173
|
+
* Whether the panel claims modality.
|
|
174
|
+
*
|
|
175
|
+
* `false`, deliberately, and worth pinning: the popover sets
|
|
176
|
+
* `aria-modal="false"` because focus is NOT trapped and the panel dismisses on
|
|
177
|
+
* outside click / Escape rather than blocking the page.
|
|
178
|
+
*/
|
|
179
|
+
isModal(): Promise<boolean>;
|
|
180
|
+
/**
|
|
181
|
+
* Where the panel sits relative to the trigger, or `null` when it is presented
|
|
182
|
+
* as a sheet and has no anchor.
|
|
183
|
+
*
|
|
184
|
+
* The resolved position — the directive defaults it per mode (`bottom` for a
|
|
185
|
+
* popover, `top` for a tooltip) — read off the pane's public modifier class.
|
|
186
|
+
* The arrow itself is a `::after` pseudo-element, so it exists for no DOM query
|
|
187
|
+
* at all; this class is the placement, and it is what the arrow's own CSS keys
|
|
188
|
+
* off.
|
|
189
|
+
*/
|
|
190
|
+
getPosition(): Promise<WrPopoverPosition | null>;
|
|
191
|
+
/** Whether the popover is presented as a full-width bottom sheet instead of an anchored panel. */
|
|
192
|
+
isSheet(): Promise<boolean>;
|
|
193
|
+
/**
|
|
194
|
+
* The text a screen reader reads as the TRIGGER'S DESCRIPTION, or `null` when
|
|
195
|
+
* it describes nothing.
|
|
196
|
+
*
|
|
197
|
+
* This resolves `aria-describedby` the way an assistive technology would, so
|
|
198
|
+
* it answers the whole of tooltip mode's naming contract in one call. Always
|
|
199
|
+
* `null` for a popover, open or shut — a popover is a thing the trigger owns
|
|
200
|
+
* (`aria-haspopup` / `aria-expanded`), never a description of it.
|
|
201
|
+
*/
|
|
202
|
+
getDescriptionText(): Promise<string | null>;
|
|
203
|
+
/**
|
|
204
|
+
* Harnesses for the consumer's own components are resolved inside THIS
|
|
205
|
+
* instance's panel.
|
|
206
|
+
*
|
|
207
|
+
* Scoped by the published id rather than by `.wr-popover-overlay`: the overlay
|
|
208
|
+
* container is shared, so a class query would answer with whichever popover
|
|
209
|
+
* opened first.
|
|
210
|
+
*/
|
|
211
|
+
protected getRootHarnessLoader(): Promise<HarnessLoader>;
|
|
212
|
+
/** Poll until `isOpen()` reports `open`, and say whether it did. */
|
|
213
|
+
private settled;
|
|
214
|
+
/** This instance's overlay pane. */
|
|
215
|
+
private panel;
|
|
216
|
+
/** The id the trigger publishes for its panel, which only exists while the panel does. */
|
|
217
|
+
private panelId;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export { WrPopoverHarness };
|
|
221
|
+
export type { WrPopoverHarnessFilters };
|
package/types/ngwr-popover.d.ts
CHANGED
|
@@ -58,6 +58,7 @@ declare class WrPopover {
|
|
|
58
58
|
readonly closed: _angular_core.OutputEmitterRef<void>;
|
|
59
59
|
private readonly host;
|
|
60
60
|
private readonly overlay;
|
|
61
|
+
private readonly dir;
|
|
61
62
|
private readonly outsideClick;
|
|
62
63
|
private readonly responsiveConfig;
|
|
63
64
|
private readonly vcr;
|
|
@@ -100,6 +101,14 @@ declare class WrPopover {
|
|
|
100
101
|
private readonly onOverlayEnter;
|
|
101
102
|
private scheduleHoverClose;
|
|
102
103
|
private clearHoverClose;
|
|
104
|
+
/**
|
|
105
|
+
* Whether the app reads right-to-left.
|
|
106
|
+
*
|
|
107
|
+
* Optional inject: `Directionality` is root-provided, so this is never null in
|
|
108
|
+
* an app — but a bare `TestBed` that provides nothing should still get a
|
|
109
|
+
* component that works, and defaulting to LTR is the honest fallback.
|
|
110
|
+
*/
|
|
111
|
+
private isRtl;
|
|
103
112
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrPopover, never>;
|
|
104
113
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<WrPopover, "[wrPopover]", never, { "content": { "alias": "wrPopover"; "required": true; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "trigger": { "alias": "trigger"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "showDelay": { "alias": "showDelay"; "required": false; "isSignal": true; }; "hideDelay": { "alias": "hideDelay"; "required": false; "isSignal": true; }; "responsive": { "alias": "responsive"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "opened": "opened"; "closed": "closed"; }, never, never, true, never>;
|
|
105
114
|
}
|
|
@@ -61,6 +61,13 @@ declare class WrPullToRefresh {
|
|
|
61
61
|
constructor();
|
|
62
62
|
protected onTouchStart(event: TouchEvent): void;
|
|
63
63
|
protected onTouchMove(event: TouchEvent): void;
|
|
64
|
+
/**
|
|
65
|
+
* A cancelled touch is an ABANDONED pull, not a completed one — the system took
|
|
66
|
+
* the gesture away (a call, a notification, a palm on the bezel). Routing it
|
|
67
|
+
* through `onTouchEnd` refreshed the list on an interruption the user did not
|
|
68
|
+
* ask for and could not take back.
|
|
69
|
+
*/
|
|
70
|
+
protected onTouchCancel(): void;
|
|
64
71
|
protected onTouchEnd(): void;
|
|
65
72
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrPullToRefresh, never>;
|
|
66
73
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrPullToRefresh, "wr-pull-to-refresh", never, { "refreshing": { "alias": "refreshing"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "threshold": { "alias": "threshold"; "required": false; "isSignal": true; }; }, { "refresh": "refresh"; }, never, ["*"], true, never>;
|
package/types/ngwr-qr.d.ts
CHANGED
|
@@ -45,11 +45,19 @@ declare class WrQr {
|
|
|
45
45
|
readonly iconUrl: _angular_core.InputSignal<string | null>;
|
|
46
46
|
/** Center icon size in logical pixels. @default 42 */
|
|
47
47
|
readonly iconSize: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
48
|
+
/**
|
|
49
|
+
* Accessible name. A QR code is content — it usually encodes a URL — and a
|
|
50
|
+
* `<canvas>` carries no implicit role and no text alternative, so without a name it
|
|
51
|
+
* is nothing at all to a screen reader. Say what the code is FOR when you can.
|
|
52
|
+
* Falls back to `qr.label`.
|
|
53
|
+
*/
|
|
54
|
+
readonly ariaLabel: _angular_core.InputSignal<string | null>;
|
|
55
|
+
protected readonly resolvedAriaLabel: _angular_core.Signal<string>;
|
|
48
56
|
protected readonly canvas: _angular_core.Signal<ElementRef<HTMLCanvasElement> | undefined>;
|
|
49
57
|
protected readonly isBrowser: boolean;
|
|
50
58
|
constructor();
|
|
51
59
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrQr, never>;
|
|
52
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrQr, "wr-qr", never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; "level": { "alias": "level"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "padding": { "alias": "padding"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "bgColor": { "alias": "bgColor"; "required": false; "isSignal": true; }; "iconUrl": { "alias": "iconUrl"; "required": false; "isSignal": true; }; "iconSize": { "alias": "iconSize"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
60
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrQr, "wr-qr", never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; "level": { "alias": "level"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "padding": { "alias": "padding"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "bgColor": { "alias": "bgColor"; "required": false; "isSignal": true; }; "iconUrl": { "alias": "iconUrl"; "required": false; "isSignal": true; }; "iconSize": { "alias": "iconSize"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
53
61
|
}
|
|
54
62
|
|
|
55
63
|
export { WrQr };
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
import { BaseHarnessFilters, ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
|
|
2
|
+
import { WrRadioSize } from 'ngwr/radio';
|
|
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 `<wr-radio-group>` a harness query matches. */
|
|
12
|
+
interface WrRadioGroupHarnessFilters extends BaseHarnessFilters {
|
|
13
|
+
/**
|
|
14
|
+
* Match the `name` the group shares with its radios — a string is an exact
|
|
15
|
+
* match, a RegExp is tested. Left unset, the group generates a random name, so
|
|
16
|
+
* this only identifies a group whose `name` the consumer wrote.
|
|
17
|
+
*/
|
|
18
|
+
readonly name?: string | RegExp;
|
|
19
|
+
/** Match only groups that refuse every option (`true`) or offer at least one (`false`). */
|
|
20
|
+
readonly disabled?: boolean;
|
|
21
|
+
}
|
|
22
|
+
/** Narrows which `<wr-radio>` a harness query matches. */
|
|
23
|
+
interface WrRadioHarnessFilters extends BaseHarnessFilters {
|
|
24
|
+
/** Match the projected label — a string is an exact match, a RegExp is tested. */
|
|
25
|
+
readonly label?: string | RegExp;
|
|
26
|
+
/**
|
|
27
|
+
* Match the option's `value`, which only works for a value the template wrote
|
|
28
|
+
* literally (`value="sm"`). A bound `[value]` never reaches the DOM, so no
|
|
29
|
+
* pattern matches it — see `WrRadioHarness.getValue`.
|
|
30
|
+
*/
|
|
31
|
+
readonly value?: string | RegExp;
|
|
32
|
+
/** Match only the selected option (`true`) or only the others (`false`). */
|
|
33
|
+
readonly checked?: boolean;
|
|
34
|
+
/** Match only enabled (`false`) or only disabled (`true`) options. */
|
|
35
|
+
readonly disabled?: boolean;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @license
|
|
40
|
+
*
|
|
41
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
42
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Test harness for one `<wr-radio>` — an option, not a control.
|
|
47
|
+
*
|
|
48
|
+
* The visible dot is a `<span>` the stylesheet paints; the state lives on a real
|
|
49
|
+
* `<input type="radio">` inside the label, and that is what this reads and clicks.
|
|
50
|
+
* A radio cannot exist alone — the component throws when it is constructed outside
|
|
51
|
+
* a `<wr-radio-group>` — so `WrRadioGroupHarness` is where the SELECTION lives and
|
|
52
|
+
* this answers questions about one option.
|
|
53
|
+
*
|
|
54
|
+
* There is no `aria-checked` here to prefer over the DOM, and that is right: a
|
|
55
|
+
* native radio carries its state in the `checked` IDL property, so the ARIA
|
|
56
|
+
* attribute would only be a second source of truth for a screen reader to
|
|
57
|
+
* disagree with. {@link isChecked} reads the property, which is the state.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```ts
|
|
61
|
+
* const medium = await loader.getHarness(WrRadioHarness.with({ label: 'Medium' }));
|
|
62
|
+
* await medium.check();
|
|
63
|
+
* expect(await medium.isChecked()).toBe(true);
|
|
64
|
+
* ```
|
|
65
|
+
*
|
|
66
|
+
* @see https://ngwr.dev/guides/testing
|
|
67
|
+
*/
|
|
68
|
+
declare class WrRadioHarness extends ComponentHarness {
|
|
69
|
+
static hostSelector: string;
|
|
70
|
+
/** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */
|
|
71
|
+
static with(options?: WrRadioHarnessFilters): HarnessPredicate<WrRadioHarness>;
|
|
72
|
+
private readonly input;
|
|
73
|
+
private readonly label;
|
|
74
|
+
/** The projected label text, trimmed. An icon lives in the dot, so it is not part of it. */
|
|
75
|
+
getLabel(): Promise<string>;
|
|
76
|
+
/**
|
|
77
|
+
* The option's value as the template WROTE it, or `null` when it was bound.
|
|
78
|
+
*
|
|
79
|
+
* The gap worth knowing about before a spec leans on this: `value` is `unknown`,
|
|
80
|
+
* and the component never puts it on the native input — the group holds the
|
|
81
|
+
* selection and a radio only says which one it is. So the only `value` in the
|
|
82
|
+
* DOM is the static attribute Angular leaves behind for a literal `value="sm"`;
|
|
83
|
+
* `[value]="size"` reaches the component without ever touching the page and
|
|
84
|
+
* reads `null` here whatever it holds, which for an object value it always will.
|
|
85
|
+
*
|
|
86
|
+
* Address options by their LABEL when it matters, and assert the picked value on
|
|
87
|
+
* the host's own model, which is the only place it exists.
|
|
88
|
+
*/
|
|
89
|
+
getValue(): Promise<string | null>;
|
|
90
|
+
/**
|
|
91
|
+
* The `name` the group stamps on this radio's native input.
|
|
92
|
+
*
|
|
93
|
+
* It is the whole of the group's keyboard behaviour: one shared name is what
|
|
94
|
+
* makes a browser treat the radios as a single tab stop, walk the arrow keys
|
|
95
|
+
* between them and announce "1 of 3". None of that is implemented in the
|
|
96
|
+
* component, so a name that stops being shared takes all of it away silently.
|
|
97
|
+
*/
|
|
98
|
+
getName(): Promise<string>;
|
|
99
|
+
/**
|
|
100
|
+
* Whether this option is the group's answer.
|
|
101
|
+
*
|
|
102
|
+
* Read from the input's `checked` PROPERTY: `[checked]` is a property binding,
|
|
103
|
+
* so the attribute is never written and reading it would report `null` for a
|
|
104
|
+
* radio with a visible dot.
|
|
105
|
+
*/
|
|
106
|
+
isChecked(): Promise<boolean>;
|
|
107
|
+
/**
|
|
108
|
+
* Whether the option refuses selection — for either reason.
|
|
109
|
+
*
|
|
110
|
+
* The native input is disabled by this radio's own `disabled` OR by the group's,
|
|
111
|
+
* and from outside they are the same thing: the option cannot be picked.
|
|
112
|
+
*/
|
|
113
|
+
isDisabled(): Promise<boolean>;
|
|
114
|
+
/**
|
|
115
|
+
* The control size, from the host modifier.
|
|
116
|
+
*
|
|
117
|
+
* `md` is the default and carries NO modifier class, so its absence is the
|
|
118
|
+
* answer rather than a missing one.
|
|
119
|
+
*/
|
|
120
|
+
getSize(): Promise<WrRadioSize>;
|
|
121
|
+
/** Whether the dot is filled by an icon instead of the default solid circle. */
|
|
122
|
+
hasIcon(): Promise<boolean>;
|
|
123
|
+
/**
|
|
124
|
+
* Whether the `<label for>` really points at this radio's input.
|
|
125
|
+
*
|
|
126
|
+
* Not the option's only naming route, and worth being precise about: the input
|
|
127
|
+
* sits INSIDE the `<label>`, so the implicit association already names it and a
|
|
128
|
+
* `for` that misses does not leave the radio unnamed. What a stray `for` does
|
|
129
|
+
* take away is the pairing every consumer assumes — it hands label clicks, and
|
|
130
|
+
* anything that references the label, to whatever else on the page owns that id.
|
|
131
|
+
*/
|
|
132
|
+
isLabelBound(): Promise<boolean>;
|
|
133
|
+
/**
|
|
134
|
+
* Pick this option, the way a user does — a click on the native input.
|
|
135
|
+
*
|
|
136
|
+
* Nothing happens when it is already checked (a radio has no untick), and
|
|
137
|
+
* nothing happens when it is disabled, so assert the result rather than assume
|
|
138
|
+
* it — or reach for `WrRadioGroupHarness.select()`, which says which of the two
|
|
139
|
+
* it was.
|
|
140
|
+
*
|
|
141
|
+
* A click rather than a keypress, despite jsdom having no layout: the events are
|
|
142
|
+
* dispatched onto the input itself, so nothing is hit-tested and the zero-sized
|
|
143
|
+
* rect jsdom reports for every element cannot miss its target, and the
|
|
144
|
+
* `change` event it produces is exactly the one the component listens for. The
|
|
145
|
+
* arrow keys that would move a real user between options are the BROWSER's
|
|
146
|
+
* behaviour over a shared `name`, not the component's, and jsdom implements none
|
|
147
|
+
* of it — there is nothing here for a keyboard to drive.
|
|
148
|
+
*/
|
|
149
|
+
check(): Promise<void>;
|
|
150
|
+
/** Move keyboard focus onto the real control. */
|
|
151
|
+
focus(): Promise<void>;
|
|
152
|
+
/**
|
|
153
|
+
* Take focus off the radio — which is what makes the GROUP emit `touch`, since a
|
|
154
|
+
* blur from any child is what marks a bound field touched.
|
|
155
|
+
*/
|
|
156
|
+
blur(): Promise<void>;
|
|
157
|
+
isFocused(): Promise<boolean>;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* @license
|
|
162
|
+
*
|
|
163
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
164
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
165
|
+
*/
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Test harness for `<wr-radio-group>` — the control a `<wr-radio>` only means
|
|
169
|
+
* anything inside of, and the root of a two-part family with {@link WrRadioHarness}.
|
|
170
|
+
*
|
|
171
|
+
* Options are addressed by their LABEL rather than by their value, and there is
|
|
172
|
+
* deliberately no `getValue()` here. The group's value is a signal of `unknown`
|
|
173
|
+
* that the component never writes to the DOM: not to the group element, not to a
|
|
174
|
+
* radio's native input. The one thing on the page is whatever static attribute the
|
|
175
|
+
* template happened to leave behind, so a selection made through `[(value)]`, a
|
|
176
|
+
* `[formField]` or an object is not there at all, and a harness reporting it would
|
|
177
|
+
* be guessing. {@link getSelectedLabel} says what the page says, and a spec that
|
|
178
|
+
* needs the value itself asserts the host's own model — which is the assertion that
|
|
179
|
+
* would have caught the bug anyway.
|
|
180
|
+
*
|
|
181
|
+
* Arrow-key navigation is not this component's either: the radios share one `name`
|
|
182
|
+
* attribute and the browser does the rest, so jsdom — which implements none of it
|
|
183
|
+
* — leaves nothing for a keyboard to drive. {@link getName} is what a spec should
|
|
184
|
+
* pin instead, because losing the shared name is what actually takes arrow
|
|
185
|
+
* navigation away, and {@link getTabStopLabel} answers the other half.
|
|
186
|
+
*
|
|
187
|
+
* @example
|
|
188
|
+
* ```ts
|
|
189
|
+
* const size = await loader.getHarness(WrRadioGroupHarness.with({ name: 'size' }));
|
|
190
|
+
*
|
|
191
|
+
* expect(await size.getRadioLabels()).toEqual(['Small', 'Medium', 'Large']);
|
|
192
|
+
* await size.select({ label: 'Large' });
|
|
193
|
+
* expect(await size.getSelectedLabel()).toBe('Large');
|
|
194
|
+
* ```
|
|
195
|
+
*
|
|
196
|
+
* @see https://ngwr.dev/guides/testing
|
|
197
|
+
*/
|
|
198
|
+
declare class WrRadioGroupHarness extends ComponentHarness {
|
|
199
|
+
static hostSelector: string;
|
|
200
|
+
/** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */
|
|
201
|
+
static with(options?: WrRadioGroupHarnessFilters): HarnessPredicate<WrRadioGroupHarness>;
|
|
202
|
+
/**
|
|
203
|
+
* The role the group announces — `radiogroup`, which is what tells a screen
|
|
204
|
+
* reader that the options belong to one question and how many of them there are.
|
|
205
|
+
*/
|
|
206
|
+
getRole(): Promise<string | null>;
|
|
207
|
+
/**
|
|
208
|
+
* The group's accessible name, resolved in the order a screen reader resolves it:
|
|
209
|
+
* the text of every element `aria-labelledby` points at, and `aria-label` only
|
|
210
|
+
* when that named nothing. `null` when the consumer wired neither.
|
|
211
|
+
*
|
|
212
|
+
* The order is not interchangeable — `aria-labelledby` WINS over `aria-label` in
|
|
213
|
+
* the accessible-name computation, so a group carrying both is announced by the
|
|
214
|
+
* heading it points at and reporting the `aria-label` would describe a name
|
|
215
|
+
* nobody hears.
|
|
216
|
+
*
|
|
217
|
+
* That `null` is a finding rather than a detail — a `radiogroup` with no name
|
|
218
|
+
* announces three answers and never the question. The component ships no label
|
|
219
|
+
* input on purpose (the question is the consumer's own heading), so this is the
|
|
220
|
+
* only way to check the wiring held.
|
|
221
|
+
*/
|
|
222
|
+
getAccessibleName(): Promise<string | null>;
|
|
223
|
+
/**
|
|
224
|
+
* The `name` every radio in the group shares.
|
|
225
|
+
*
|
|
226
|
+
* Read off the radios because they are the only place it is RELIABLY written: the
|
|
227
|
+
* group's `name` input reaches the page as an attribute on each native input, and
|
|
228
|
+
* a bound `[name]="…"` never lands on the group element at all. A literal
|
|
229
|
+
* `name="size"` does survive on the group element — Angular leaves a static
|
|
230
|
+
* attribute alone — which is exactly the trap: reading it there works for the
|
|
231
|
+
* literal form and quietly returns nothing for the bound one.
|
|
232
|
+
*/
|
|
233
|
+
getName(): Promise<string>;
|
|
234
|
+
/**
|
|
235
|
+
* Whether the group refuses every option.
|
|
236
|
+
*
|
|
237
|
+
* Answered from the radios, and it could not be otherwise: a bound `[disabled]`
|
|
238
|
+
* on the group reaches the page only by disabling each native input, so a group
|
|
239
|
+
* disabled as a whole and a group whose every option is individually disabled
|
|
240
|
+
* are the same page. They are also the same thing to the person using it, which
|
|
241
|
+
* is the question a harness should be answering.
|
|
242
|
+
*/
|
|
243
|
+
isDisabled(): Promise<boolean>;
|
|
244
|
+
/** The group's own options, in DOM order. A sibling group's radios are not here. */
|
|
245
|
+
getRadios(filters?: WrRadioHarnessFilters): Promise<WrRadioHarness[]>;
|
|
246
|
+
/** The label of every option, in DOM order. */
|
|
247
|
+
getRadioLabels(): Promise<string[]>;
|
|
248
|
+
/** The checked option, or `null` while the group is unanswered. */
|
|
249
|
+
getSelectedRadio(): Promise<WrRadioHarness | null>;
|
|
250
|
+
/**
|
|
251
|
+
* The label of the checked option, or `null` while the group is unanswered.
|
|
252
|
+
*
|
|
253
|
+
* Also `null` for a value that matches no radio — the group holds it, nothing is
|
|
254
|
+
* checked, and the page shows an unanswered question.
|
|
255
|
+
*/
|
|
256
|
+
getSelectedLabel(): Promise<string | null>;
|
|
257
|
+
/**
|
|
258
|
+
* Pick the first option matching the filters — this is how the group's value
|
|
259
|
+
* changes.
|
|
260
|
+
*
|
|
261
|
+
* Throws when nothing matches, naming the options that do exist, and throws
|
|
262
|
+
* again when the option is still unchecked afterwards. That second failure has
|
|
263
|
+
* exactly two causes and reports both, because a click that quietly did nothing
|
|
264
|
+
* surfaces as an unrelated assertion three lines later.
|
|
265
|
+
*/
|
|
266
|
+
select(filters: WrRadioHarnessFilters): Promise<void>;
|
|
267
|
+
/**
|
|
268
|
+
* The label of the option a Tab press would land on, or `null` when every option
|
|
269
|
+
* is disabled and the group is skipped over entirely.
|
|
270
|
+
*
|
|
271
|
+
* A radio group is ONE tab stop, and which radio it is is written down nowhere:
|
|
272
|
+
* the component authors no roving `tabindex`, because the browser already
|
|
273
|
+
* applies the native rule to a shared `name` — the checked radio, or the first
|
|
274
|
+
* enabled one while nothing is checked. So this is DERIVED from the rendered
|
|
275
|
+
* state rather than read off an attribute, there being no attribute to read.
|
|
276
|
+
*
|
|
277
|
+
* Worth asking precisely because those two answers are different radios exactly
|
|
278
|
+
* when a form opens unanswered, which is the state most specs start in.
|
|
279
|
+
*/
|
|
280
|
+
getTabStopLabel(): Promise<string | null>;
|
|
281
|
+
/** Put focus where a Tab press would put it. Throws when the group has no tab stop. */
|
|
282
|
+
focusTabStop(): Promise<void>;
|
|
283
|
+
/**
|
|
284
|
+
* The label of the option that currently holds focus, or `null` when focus is
|
|
285
|
+
* elsewhere. The counterpart to {@link focusTabStop}: in a real browser the
|
|
286
|
+
* arrow keys move this, and moving it is also what picks a new answer.
|
|
287
|
+
*/
|
|
288
|
+
getFocusedLabel(): Promise<string | null>;
|
|
289
|
+
/** The radio Tab would enter on, applying the browser's rule to the rendered state. */
|
|
290
|
+
private tabStop;
|
|
291
|
+
/** The options, or a failure saying why an empty group has nothing to report. */
|
|
292
|
+
private radiosOrThrow;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
export { WrRadioGroupHarness, WrRadioHarness };
|
|
296
|
+
export type { WrRadioGroupHarnessFilters, WrRadioHarnessFilters };
|
package/types/ngwr-radio.d.ts
CHANGED
|
@@ -27,8 +27,14 @@ declare class WrRadio {
|
|
|
27
27
|
* default solid circle. Use any registered NGWR icon.
|
|
28
28
|
*/
|
|
29
29
|
readonly icon: _angular_core.InputSignal<string | null>;
|
|
30
|
-
/**
|
|
31
|
-
|
|
30
|
+
/**
|
|
31
|
+
* Control size — shares the `--wr-control-*` contract. Set per option (the
|
|
32
|
+
* group has no `size`); unset falls back to the `radio.size` app default from
|
|
33
|
+
* `provideWrConfig()`. @default 'md'
|
|
34
|
+
*/
|
|
35
|
+
readonly size: _angular_core.InputSignal<WrRadioSize | null>;
|
|
36
|
+
/** `size`, then the app config, then `md`. @internal */
|
|
37
|
+
protected readonly resolvedSize: _angular_core.Signal<"sm" | "md" | "lg">;
|
|
32
38
|
/**
|
|
33
39
|
* Disable just this option. The group can also be disabled as a whole via
|
|
34
40
|
* `<wr-radio-group disabled>`; either source disables this radio.
|