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,346 @@
|
|
|
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-stepper>` a harness query matches. */
|
|
11
|
+
interface WrStepperHarnessFilters extends BaseHarnessFilters {
|
|
12
|
+
/**
|
|
13
|
+
* Match a stepper that renders a step with this label — the readable way to tell
|
|
14
|
+
* two wizards on one page apart. A string is an exact match, a RegExp is tested.
|
|
15
|
+
*/
|
|
16
|
+
readonly stepLabel?: string | RegExp;
|
|
17
|
+
/**
|
|
18
|
+
* Match the layout direction the stepper was ASKED for. A `responsive` horizontal
|
|
19
|
+
* stepper still matches `'horizontal'` while it lays itself out vertically — see
|
|
20
|
+
* `WrStepperHarness.getOrientation()`.
|
|
21
|
+
*/
|
|
22
|
+
readonly orientation?: 'horizontal' | 'vertical';
|
|
23
|
+
/** Match only linear (`true`) or only freely navigable (`false`) steppers. */
|
|
24
|
+
readonly linear?: boolean;
|
|
25
|
+
}
|
|
26
|
+
/** Narrows which step of a `<wr-stepper>` a harness query matches. */
|
|
27
|
+
interface WrStepHarnessFilters extends BaseHarnessFilters {
|
|
28
|
+
/** Match the step's label — a string is an exact match, a RegExp is tested. */
|
|
29
|
+
readonly label?: string | RegExp;
|
|
30
|
+
/** Match the step the wizard is showing — the one header announcing `aria-current="step"`. */
|
|
31
|
+
readonly active?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Match steps shown as done. Completion is normally derived (everything before the
|
|
34
|
+
* active step), but a step's own `completed` input overrides it, so a step AFTER
|
|
35
|
+
* the active one can match too.
|
|
36
|
+
*/
|
|
37
|
+
readonly completed?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Match steps switched off by their own `disabled` input. A step merely locked by
|
|
40
|
+
* `linear` is not disabled — it is unreachable, which is `reachable: false`.
|
|
41
|
+
*/
|
|
42
|
+
readonly disabled?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Match steps whose header accepts a click right now, which is also exactly the
|
|
45
|
+
* set of headers a Tab press can reach.
|
|
46
|
+
*/
|
|
47
|
+
readonly reachable?: boolean;
|
|
48
|
+
/** Match steps flagged `optional` in the header. */
|
|
49
|
+
readonly optional?: boolean;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @license
|
|
54
|
+
*
|
|
55
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
56
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
57
|
+
*/
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Test harness for one step of a `<wr-stepper>` — the step as the HEADER STRIP
|
|
61
|
+
* publishes it: its label, its state, and the one control that navigates to it.
|
|
62
|
+
*
|
|
63
|
+
* A step is two pieces of DOM in two different places. The `<wr-step>` the consumer
|
|
64
|
+
* wrote is projected into the stepper's body region; the header this harness hosts on
|
|
65
|
+
* is generated next to it, in the `<ol>` above. Nothing links the two — no
|
|
66
|
+
* `aria-controls`, no id on the body — so `WrStepperHarness.getActiveStepText()` is
|
|
67
|
+
* where the body is read, and this answers what the wizard says about the step.
|
|
68
|
+
*
|
|
69
|
+
* Two states that look alike here are deliberately separate, because the component
|
|
70
|
+
* treats them separately: {@link isDisabled} is the step's own `disabled` input
|
|
71
|
+
* (switched off, whatever else happens), and {@link isReachable} is whether a click
|
|
72
|
+
* would land right now — which a `linear` stepper takes away from every step ahead of
|
|
73
|
+
* the gate without disabling any of them.
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```ts
|
|
77
|
+
* const [review] = await stepper.getSteps({ label: 'Review' });
|
|
78
|
+
*
|
|
79
|
+
* expect(await review.isOptional()).toBe(true);
|
|
80
|
+
* expect(await review.isReachable()).toBe(false);
|
|
81
|
+
* ```
|
|
82
|
+
*
|
|
83
|
+
* @see https://ngwr.dev/guides/testing
|
|
84
|
+
*/
|
|
85
|
+
declare class WrStepHarness extends ComponentHarness {
|
|
86
|
+
/**
|
|
87
|
+
* The header `<li>`, which is the whole step as far as the strip is concerned.
|
|
88
|
+
*
|
|
89
|
+
* Not `.wr-stepper__header-button`: the state modifiers (`--active`, `--completed`,
|
|
90
|
+
* `--disabled`) land on the `<li>`, and the button is a child of it.
|
|
91
|
+
*/
|
|
92
|
+
static hostSelector: string;
|
|
93
|
+
/** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */
|
|
94
|
+
static with(options?: WrStepHarnessFilters): HarnessPredicate<WrStepHarness>;
|
|
95
|
+
private readonly button;
|
|
96
|
+
/**
|
|
97
|
+
* The step's label, and only the label.
|
|
98
|
+
*
|
|
99
|
+
* The "optional" badge and the description are siblings of the label text inside
|
|
100
|
+
* the same span, so both are excluded — a step addressed by label should be
|
|
101
|
+
* addressable whether or not it also carries a description.
|
|
102
|
+
*/
|
|
103
|
+
getLabel(): Promise<string>;
|
|
104
|
+
/** The secondary line under the label, or `null` when the step defines none. */
|
|
105
|
+
getDescription(): Promise<string | null>;
|
|
106
|
+
/** Whether the header flags the step as optional. */
|
|
107
|
+
isOptional(): Promise<boolean>;
|
|
108
|
+
/**
|
|
109
|
+
* What a screen reader announces for the header button.
|
|
110
|
+
*
|
|
111
|
+
* The indicator is excluded because it is `aria-hidden`: the step number and the
|
|
112
|
+
* completed tick are decoration, deliberately, since the label and
|
|
113
|
+
* `aria-current="step"` already carry what they would repeat. What IS announced is
|
|
114
|
+
* the label plus the "optional" badge and the description — so this is the method
|
|
115
|
+
* that notices when one of those stops being part of the name.
|
|
116
|
+
*/
|
|
117
|
+
getAccessibleName(): Promise<string>;
|
|
118
|
+
/**
|
|
119
|
+
* Whether this is the step the wizard is showing.
|
|
120
|
+
*
|
|
121
|
+
* From `aria-current="step"` rather than the `--active` class, because that is the
|
|
122
|
+
* only place the wizard's position is published to a screen reader, and the two can
|
|
123
|
+
* only ever disagree by way of a bug.
|
|
124
|
+
*/
|
|
125
|
+
isActive(): Promise<boolean>;
|
|
126
|
+
/**
|
|
127
|
+
* Whether the step is shown as done.
|
|
128
|
+
*
|
|
129
|
+
* Read from the `--completed` class, and there is no ARIA alternative to prefer:
|
|
130
|
+
* completion reaches the page as that class plus a tick glyph that is
|
|
131
|
+
* `aria-hidden`, so a screen-reader user hears the label and nothing else. The
|
|
132
|
+
* class is the whole of what exists.
|
|
133
|
+
*
|
|
134
|
+
* Completion is derived from the active index — every step before it — unless a
|
|
135
|
+
* step's own `completed` input overrides it, which is how a `linear` wizard opens
|
|
136
|
+
* its gate. So a step after the active one can be completed too.
|
|
137
|
+
*/
|
|
138
|
+
isCompleted(): Promise<boolean>;
|
|
139
|
+
/**
|
|
140
|
+
* Whether the step is switched off by its own `disabled` input.
|
|
141
|
+
*
|
|
142
|
+
* The `--disabled` class is exactly that input, which is why it is read here rather
|
|
143
|
+
* than the button's `disabled`: the button is also disabled for a step that is
|
|
144
|
+
* merely behind a `linear` gate, and those are different facts about the wizard.
|
|
145
|
+
* See {@link isReachable} for the one about right now.
|
|
146
|
+
*/
|
|
147
|
+
isDisabled(): Promise<boolean>;
|
|
148
|
+
/**
|
|
149
|
+
* Whether a click on this header would move the wizard here.
|
|
150
|
+
*
|
|
151
|
+
* Read from the button's `disabled` PROPERTY, because that is the enforcement and
|
|
152
|
+
* not the paint: the component disables the header for a step its own input
|
|
153
|
+
* switched off AND for one a `linear` gate has not opened yet. It is also what puts
|
|
154
|
+
* the header in or out of the tab order — a `disabled` button cannot be focused at
|
|
155
|
+
* all, so an unreachable step is off the keyboard entirely rather than focusable and
|
|
156
|
+
* inert the way `aria-disabled` would leave it.
|
|
157
|
+
*/
|
|
158
|
+
isReachable(): Promise<boolean>;
|
|
159
|
+
/**
|
|
160
|
+
* Navigate to this step by clicking its header, the way a user does.
|
|
161
|
+
*
|
|
162
|
+
* A click, not a keypress: the header is a real `<button>`, so Enter and Space
|
|
163
|
+
* activate it through the browser's native activation — behaviour jsdom does not
|
|
164
|
+
* implement, leaving nothing for a key to drive. A no-arg CDK click needs no
|
|
165
|
+
* coordinate and no hit test, so the absent layout costs nothing here.
|
|
166
|
+
*
|
|
167
|
+
* Throws when the header refuses, rather than clicking and resolving quietly: the
|
|
168
|
+
* component's guard would drop the click and the wizard would still be showing the
|
|
169
|
+
* old step three assertions later. Reach for `WrStepperHarness.goTo()` when you
|
|
170
|
+
* want the failure to name WHICH earlier step is holding the gate shut.
|
|
171
|
+
*/
|
|
172
|
+
select(): Promise<void>;
|
|
173
|
+
/** Move keyboard focus to the header. A header that is not reachable cannot take it. */
|
|
174
|
+
focus(): Promise<void>;
|
|
175
|
+
/** Whether the header currently has focus. */
|
|
176
|
+
isFocused(): Promise<boolean>;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* @license
|
|
181
|
+
*
|
|
182
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
183
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
184
|
+
*/
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Test harness for `<wr-stepper>` — the root of a two-part family with
|
|
188
|
+
* {@link WrStepHarness}, which is one step of it.
|
|
189
|
+
*
|
|
190
|
+
* Steps are addressed by their index or their LABEL, the two things a consumer can
|
|
191
|
+
* see; there is no key or id on a `<wr-step>` to address it by.
|
|
192
|
+
*
|
|
193
|
+
* Navigation here always goes through the HEADER STRIP, because that is the only
|
|
194
|
+
* control the component renders — a wizard's Next and Back buttons are the
|
|
195
|
+
* consumer's own, and they call `WrStepper.next()` / `prev()`. That distinction is
|
|
196
|
+
* not cosmetic: the imperative API does NOT consult `linear`, so it walks straight
|
|
197
|
+
* past a gate that refuses the equivalent header click. {@link next} and
|
|
198
|
+
* {@link goTo} therefore refuse exactly where a user would be refused, and a spec
|
|
199
|
+
* covering the wizard's own buttons should drive those buttons (through their own
|
|
200
|
+
* harness) instead of these.
|
|
201
|
+
*
|
|
202
|
+
* @example
|
|
203
|
+
* ```ts
|
|
204
|
+
* const wizard = await loader.getHarness(WrStepperHarness);
|
|
205
|
+
*
|
|
206
|
+
* expect(await wizard.getStepLabels()).toEqual(['Account', 'Address', 'Review']);
|
|
207
|
+
* expect(await wizard.canGoTo(2)).toBe(false);
|
|
208
|
+
* await wizard.goToLabel('Address');
|
|
209
|
+
* expect(await wizard.getActiveStepText()).toBe('Address body');
|
|
210
|
+
* ```
|
|
211
|
+
*
|
|
212
|
+
* @see https://ngwr.dev/guides/testing
|
|
213
|
+
*/
|
|
214
|
+
declare class WrStepperHarness extends ComponentHarness {
|
|
215
|
+
static hostSelector: string;
|
|
216
|
+
/** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */
|
|
217
|
+
static with(options?: WrStepperHarnessFilters): HarnessPredicate<WrStepperHarness>;
|
|
218
|
+
private readonly headerList;
|
|
219
|
+
/**
|
|
220
|
+
* The layout direction the stepper was ASKED for.
|
|
221
|
+
*
|
|
222
|
+
* Unusually for this library both values carry a class, so neither is read as the
|
|
223
|
+
* absence of the other. What the class cannot tell you is how the strip actually
|
|
224
|
+
* laid itself out: a `responsive` horizontal stepper drops to the vertical layout
|
|
225
|
+
* when its own box is too narrow, and that reflow is a container query — the class
|
|
226
|
+
* never changes. No unit test can see the difference in any case, jsdom having no
|
|
227
|
+
* layout at all; assert the opt-in with {@link isResponsive} instead.
|
|
228
|
+
*/
|
|
229
|
+
getOrientation(): Promise<'horizontal' | 'vertical'>;
|
|
230
|
+
/** Whether the stepper locks the steps after the last completed one. */
|
|
231
|
+
isLinear(): Promise<boolean>;
|
|
232
|
+
/** Whether the stepper may reflow to the vertical layout in a narrow container. */
|
|
233
|
+
isResponsive(): Promise<boolean>;
|
|
234
|
+
/**
|
|
235
|
+
* The role the header strip announces — `list`.
|
|
236
|
+
*
|
|
237
|
+
* An `<ol>` is a list already, so the explicit role looks redundant and is not: the
|
|
238
|
+
* stylesheet removes the markers, and Safari drops list semantics from a list with
|
|
239
|
+
* `list-style: none`. Losing it costs the "list, 3 items" a VoiceOver user hears,
|
|
240
|
+
* which is how they learn how long the wizard is before starting it.
|
|
241
|
+
*/
|
|
242
|
+
getListRole(): Promise<string | null>;
|
|
243
|
+
/** The wizard's steps, in order. */
|
|
244
|
+
getSteps(filters?: WrStepHarnessFilters): Promise<WrStepHarness[]>;
|
|
245
|
+
/** The label of every step, in order. */
|
|
246
|
+
getStepLabels(): Promise<string[]>;
|
|
247
|
+
/**
|
|
248
|
+
* The index of the step the wizard is showing, from the header announcing
|
|
249
|
+
* `aria-current="step"`.
|
|
250
|
+
*
|
|
251
|
+
* Throws when no header does, which is a state a stepper can genuinely be in: the
|
|
252
|
+
* `active` model is two-way, `WrStepper.goTo()` clamps an out-of-range index but a
|
|
253
|
+
* host writing `active` directly does not, and an index past the last step leaves
|
|
254
|
+
* every header un-current and every step body hidden. A `-1` here would be read as
|
|
255
|
+
* "the first step" by the next line of a spec.
|
|
256
|
+
*/
|
|
257
|
+
getActiveIndex(): Promise<number>;
|
|
258
|
+
/** The label of the step the wizard is showing. Throws when there is no current step. */
|
|
259
|
+
getActiveLabel(): Promise<string>;
|
|
260
|
+
/** The labels of the steps shown as done, in order. Derived completion and overrides both. */
|
|
261
|
+
getCompletedLabels(): Promise<string[]>;
|
|
262
|
+
/**
|
|
263
|
+
* The labels of the headers a Tab press can reach, in order.
|
|
264
|
+
*
|
|
265
|
+
* A stepper does NOT rove focus: unlike a tab strip, the header list is not one tab
|
|
266
|
+
* stop with arrow keys inside it — every reachable header is its own stop, and the
|
|
267
|
+
* component authors no `tabindex` at all. So the question "which step is active" has
|
|
268
|
+
* two different answers, and this is the other one: the current step is not
|
|
269
|
+
* necessarily in this list. A step disabled by its own input keeps
|
|
270
|
+
* `aria-current="step"` while its button drops out of the tab order entirely, and a
|
|
271
|
+
* `linear` stepper takes every locked header off the keyboard the same way.
|
|
272
|
+
*/
|
|
273
|
+
getTabStopLabels(): Promise<string[]>;
|
|
274
|
+
/** The label of the header that currently has focus, or `null` when focus is elsewhere. */
|
|
275
|
+
getFocusedLabel(): Promise<string | null>;
|
|
276
|
+
/**
|
|
277
|
+
* Whether the wizard would let a user navigate to this step right now — the question
|
|
278
|
+
* a `linear` stepper exists to answer `false` to.
|
|
279
|
+
*
|
|
280
|
+
* Throws for an index that is not a step, rather than answering `false`: "you cannot
|
|
281
|
+
* go there" and "there is no there" are different findings.
|
|
282
|
+
*/
|
|
283
|
+
canGoTo(index: number): Promise<boolean>;
|
|
284
|
+
/**
|
|
285
|
+
* Navigate to the step at `index` by clicking its header.
|
|
286
|
+
*
|
|
287
|
+
* Throws when the wizard refuses, naming the cause — the step's own `disabled`, or
|
|
288
|
+
* the `linear` gate and which earlier step is holding it shut. Silence would be
|
|
289
|
+
* worse than a failure here: the component drops a click on a locked header without
|
|
290
|
+
* a sound, so a spec would go on to assert against the step it was already showing.
|
|
291
|
+
*/
|
|
292
|
+
goTo(index: number): Promise<void>;
|
|
293
|
+
/**
|
|
294
|
+
* Navigate to the step with this label — a string matches exactly, a RegExp is
|
|
295
|
+
* tested. Throws naming the labels that do exist when nothing matches.
|
|
296
|
+
*/
|
|
297
|
+
goToLabel(label: string | RegExp): Promise<void>;
|
|
298
|
+
/**
|
|
299
|
+
* Move to the next step through its header — subject to the same gate a user is.
|
|
300
|
+
*
|
|
301
|
+
* In a `linear` wizard that gate is shut until the CURRENT step reports itself
|
|
302
|
+
* complete (its own `completed` input; derived completion only ever covers steps
|
|
303
|
+
* before the active one), so this throws there. That is not the harness being
|
|
304
|
+
* strict: it is the header a user has, and the reason a linear wizard needs its own
|
|
305
|
+
* Next button, which calls `WrStepper.next()` and is not gated at all.
|
|
306
|
+
*
|
|
307
|
+
* Throws on the last step, where the component's own `next()` clamps in silence.
|
|
308
|
+
*/
|
|
309
|
+
next(): Promise<void>;
|
|
310
|
+
/**
|
|
311
|
+
* Move to the previous step through its header. Throws on the first step, where
|
|
312
|
+
* `WrStepper.prev()` clamps in silence.
|
|
313
|
+
*
|
|
314
|
+
* Going back is normally allowed even in a `linear` wizard — every step at or before
|
|
315
|
+
* the active one is reachable — but a step its own input disabled stays out of
|
|
316
|
+
* reach in both directions.
|
|
317
|
+
*/
|
|
318
|
+
previous(): Promise<void>;
|
|
319
|
+
/**
|
|
320
|
+
* The text of the step body the wizard is showing.
|
|
321
|
+
*
|
|
322
|
+
* Which body shows is CSS-only: every `<wr-step>` renders, and the stepper hides all
|
|
323
|
+
* but one with `display: none` through the `--active` class. So this reads the class,
|
|
324
|
+
* and in a unit test it has to — jsdom loads no stylesheet, which makes
|
|
325
|
+
* `fixture.nativeElement.textContent` the text of ALL the steps at once and any
|
|
326
|
+
* "is the body showing" assertion built on it meaningless.
|
|
327
|
+
*/
|
|
328
|
+
getActiveStepText(): Promise<string>;
|
|
329
|
+
/**
|
|
330
|
+
* The text of EVERY step body, in order, showing or not.
|
|
331
|
+
*
|
|
332
|
+
* The list being complete is the point: a step is hidden by a class rather than
|
|
333
|
+
* dropped by an `@if`, so it mounts once and keeps its state — a half-filled form on
|
|
334
|
+
* step 1 is still filled after a trip to step 3. Anything that turned the body into
|
|
335
|
+
* a conditional block would keep every other assertion in a spec passing and quietly
|
|
336
|
+
* reset the wizard.
|
|
337
|
+
*/
|
|
338
|
+
getStepTexts(): Promise<string[]>;
|
|
339
|
+
/** The step at `index`, or a failure that says how long the wizard is. */
|
|
340
|
+
private stepAt;
|
|
341
|
+
/** Why the header at `index` is refusing a click, in the component's own order of causes. */
|
|
342
|
+
private refusal;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
export { WrStepHarness, WrStepperHarness };
|
|
346
|
+
export type { WrStepHarnessFilters, WrStepperHarnessFilters };
|
|
@@ -0,0 +1,66 @@
|
|
|
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-switch>` a harness query matches. */
|
|
11
|
+
interface WrSwitchHarnessFilters extends BaseHarnessFilters {
|
|
12
|
+
/** Match the projected label — a string is an exact match, a RegExp is tested. */
|
|
13
|
+
readonly label?: string | RegExp;
|
|
14
|
+
/** Match only switches that are on (`true`) or off (`false`). */
|
|
15
|
+
readonly on?: boolean;
|
|
16
|
+
/** Match only enabled (`false`) or only disabled (`true`) switches. */
|
|
17
|
+
readonly disabled?: boolean;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @license
|
|
22
|
+
*
|
|
23
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
24
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Test harness for `<wr-switch>`.
|
|
29
|
+
*
|
|
30
|
+
* The track and thumb are painted `<span>`s; the state lives on a real
|
|
31
|
+
* `<input type="checkbox" role="switch">` inside the label, and that is what this
|
|
32
|
+
* reads and clicks. The role is why a switch is not a checkbox to a screen reader,
|
|
33
|
+
* and {@link isOn} is named after it rather than after `checked` for the same
|
|
34
|
+
* reason — a spec that reads "the switch is on" says what the user sees.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* const dark = await loader.getHarness(WrSwitchHarness.with({ label: 'Dark mode' }));
|
|
39
|
+
* await dark.turnOn();
|
|
40
|
+
* expect(await dark.isOn()).toBe(true);
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* @see https://ngwr.dev/guides/testing
|
|
44
|
+
*/
|
|
45
|
+
declare class WrSwitchHarness extends ComponentHarness {
|
|
46
|
+
static hostSelector: string;
|
|
47
|
+
/** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */
|
|
48
|
+
static with(options?: WrSwitchHarnessFilters): HarnessPredicate<WrSwitchHarness>;
|
|
49
|
+
private readonly input;
|
|
50
|
+
/** The projected label text, trimmed. */
|
|
51
|
+
getLabel(): Promise<string>;
|
|
52
|
+
/** Whether the switch is on. */
|
|
53
|
+
isOn(): Promise<boolean>;
|
|
54
|
+
isDisabled(): Promise<boolean>;
|
|
55
|
+
/** What a screen reader is told this control is — `switch`, not `checkbox`. */
|
|
56
|
+
getRole(): Promise<string | null>;
|
|
57
|
+
/** Flip the switch. A disabled switch does not move; assert rather than assume. */
|
|
58
|
+
toggle(): Promise<void>;
|
|
59
|
+
turnOn(): Promise<void>;
|
|
60
|
+
turnOff(): Promise<void>;
|
|
61
|
+
focus(): Promise<void>;
|
|
62
|
+
isFocused(): Promise<boolean>;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export { WrSwitchHarness };
|
|
66
|
+
export type { WrSwitchHarnessFilters };
|
package/types/ngwr-switch.d.ts
CHANGED
|
@@ -36,8 +36,13 @@ declare class WrSwitch implements FormCheckboxControl {
|
|
|
36
36
|
* @default false
|
|
37
37
|
*/
|
|
38
38
|
readonly disabled: _angular_core.InputSignalWithTransform<boolean, any>;
|
|
39
|
-
/**
|
|
40
|
-
|
|
39
|
+
/**
|
|
40
|
+
* Control size — shares the `--wr-control-*` contract. Unset falls back to the
|
|
41
|
+
* `switch.size` app default from `provideWrConfig()`. @default 'md'
|
|
42
|
+
*/
|
|
43
|
+
readonly size: _angular_core.InputSignal<WrSwitchSize | null>;
|
|
44
|
+
/** `size`, then the app config, then `md`. @internal */
|
|
45
|
+
protected readonly resolvedSize: _angular_core.Signal<"sm" | "md" | "lg">;
|
|
41
46
|
/** On / off state. Bound by `[formField]`, or two-way via `[(checked)]`. */
|
|
42
47
|
readonly checked: _angular_core.ModelSignal<boolean>;
|
|
43
48
|
/** Emitted on blur so a bound field can mark itself touched. */
|