ngwr 10.2.0 → 11.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -19
- package/anchor/styles/_index.scss +4 -4
- package/back-top/styles/_index.scss +6 -1
- package/blur-text/styles/_index.scss +13 -0
- package/button/styles/_index.scss +11 -6
- package/carousel/styles/_index.scss +13 -2
- package/cascader/styles/_index.scss +2 -2
- package/circular-text/styles/_index.scss +2 -0
- package/collapse/styles/_index.scss +1 -1
- package/color-picker/styles/_index.scss +6 -1
- package/compare/styles/_index.scss +1 -2
- package/context-menu/styles/_index.scss +6 -1
- package/descriptions/styles/_index.scss +2 -2
- package/dialog/styles/_index.scss +38 -0
- package/drawer/styles/_index.scss +20 -1
- package/dropdown/styles/_index.scss +19 -5
- package/empty/styles/_index.scss +10 -0
- package/fesm2022/ngwr-action-sheet.mjs +15 -5
- package/fesm2022/ngwr-action-sheet.mjs.map +1 -1
- package/fesm2022/ngwr-affix.mjs +43 -16
- package/fesm2022/ngwr-affix.mjs.map +1 -1
- package/fesm2022/ngwr-alert.mjs +3 -3
- package/fesm2022/ngwr-anchor.mjs +20 -8
- package/fesm2022/ngwr-anchor.mjs.map +1 -1
- package/fesm2022/ngwr-aurora.mjs +4 -4
- package/fesm2022/ngwr-aurora.mjs.map +1 -1
- package/fesm2022/ngwr-avatar.mjs +33 -9
- package/fesm2022/ngwr-avatar.mjs.map +1 -1
- package/fesm2022/ngwr-back-top.mjs +8 -4
- package/fesm2022/ngwr-back-top.mjs.map +1 -1
- package/fesm2022/ngwr-badge.mjs +6 -6
- package/fesm2022/ngwr-badge.mjs.map +1 -1
- package/fesm2022/ngwr-bar-chart.mjs +32 -11
- package/fesm2022/ngwr-bar-chart.mjs.map +1 -1
- package/fesm2022/ngwr-blur-text.mjs +4 -4
- package/fesm2022/ngwr-blur-text.mjs.map +1 -1
- package/fesm2022/ngwr-border-glow.mjs +4 -4
- package/fesm2022/ngwr-border-glow.mjs.map +1 -1
- package/fesm2022/ngwr-breadcrumbs.mjs +9 -8
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-burger.mjs +11 -6
- 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 +89 -24
- package/fesm2022/ngwr-button.mjs.map +1 -1
- package/fesm2022/ngwr-calendar-heatmap.mjs +42 -10
- package/fesm2022/ngwr-calendar-heatmap.mjs.map +1 -1
- package/fesm2022/ngwr-calendar.mjs +108 -9
- package/fesm2022/ngwr-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-card.mjs +10 -10
- package/fesm2022/ngwr-card.mjs.map +1 -1
- package/fesm2022/ngwr-carousel-testing.mjs +377 -0
- package/fesm2022/ngwr-carousel-testing.mjs.map +1 -0
- package/fesm2022/ngwr-carousel.mjs +72 -18
- 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 +4 -4
- 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 +15 -9
- package/fesm2022/ngwr-checkbox.mjs.map +1 -1
- package/fesm2022/ngwr-circular-text.mjs +4 -4
- package/fesm2022/ngwr-circular-text.mjs.map +1 -1
- package/fesm2022/ngwr-click-spark.mjs +4 -4
- package/fesm2022/ngwr-click-spark.mjs.map +1 -1
- package/fesm2022/ngwr-clipboard.mjs +18 -4
- package/fesm2022/ngwr-clipboard.mjs.map +1 -1
- package/fesm2022/ngwr-collapse-testing.mjs +368 -0
- package/fesm2022/ngwr-collapse-testing.mjs.map +1 -0
- package/fesm2022/ngwr-collapse.mjs +9 -9
- package/fesm2022/ngwr-color-picker.mjs +139 -19
- 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 +60 -10
- package/fesm2022/ngwr-command-palette.mjs.map +1 -1
- package/fesm2022/ngwr-compare.mjs +105 -15
- package/fesm2022/ngwr-compare.mjs.map +1 -1
- package/fesm2022/ngwr-confetti.mjs +3 -3
- 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 +104 -18
- package/fesm2022/ngwr-context-menu.mjs.map +1 -1
- package/fesm2022/ngwr-cookie.mjs +8 -4
- package/fesm2022/ngwr-cookie.mjs.map +1 -1
- package/fesm2022/ngwr-counter.mjs +17 -9
- package/fesm2022/ngwr-counter.mjs.map +1 -1
- package/fesm2022/ngwr-date-adapter-fns.mjs +3 -3
- package/fesm2022/ngwr-date-adapter-luxon.mjs +55 -7
- package/fesm2022/ngwr-date-adapter-luxon.mjs.map +1 -1
- package/fesm2022/ngwr-date-adapter.mjs +57 -11
- 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 +409 -57
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-decrypt-text.mjs +30 -12
- package/fesm2022/ngwr-decrypt-text.mjs.map +1 -1
- package/fesm2022/ngwr-density.mjs +6 -6
- package/fesm2022/ngwr-descriptions.mjs +6 -6
- package/fesm2022/ngwr-dialog-testing.mjs +89 -0
- package/fesm2022/ngwr-dialog-testing.mjs.map +1 -0
- package/fesm2022/ngwr-dialog.mjs +33 -17
- package/fesm2022/ngwr-dialog.mjs.map +1 -1
- package/fesm2022/ngwr-directives.mjs +48 -24
- package/fesm2022/ngwr-directives.mjs.map +1 -1
- package/fesm2022/ngwr-divider.mjs +3 -3
- package/fesm2022/ngwr-donut-chart.mjs +24 -7
- package/fesm2022/ngwr-donut-chart.mjs.map +1 -1
- package/fesm2022/ngwr-drag-drop.mjs +7 -7
- 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-drawer.mjs +37 -19
- package/fesm2022/ngwr-drawer.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown-testing.mjs +291 -0
- package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -0
- package/fesm2022/ngwr-dropdown.mjs +19 -11
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-empty.mjs +26 -9
- package/fesm2022/ngwr-empty.mjs.map +1 -1
- package/fesm2022/ngwr-event-calendar.mjs +62 -15
- package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-falling-text.mjs +4 -4
- 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-file-upload.mjs +3 -3
- package/fesm2022/ngwr-form-testing.mjs +451 -0
- package/fesm2022/ngwr-form-testing.mjs.map +1 -0
- package/fesm2022/ngwr-form.mjs +28 -12
- package/fesm2022/ngwr-form.mjs.map +1 -1
- package/fesm2022/ngwr-fuzzy-text.mjs +11 -4
- package/fesm2022/ngwr-fuzzy-text.mjs.map +1 -1
- package/fesm2022/ngwr-gauge.mjs +21 -7
- package/fesm2022/ngwr-gauge.mjs.map +1 -1
- package/fesm2022/ngwr-glitch-text.mjs +4 -4
- package/fesm2022/ngwr-glitch-text.mjs.map +1 -1
- package/fesm2022/ngwr-gradient-text.mjs +4 -4
- package/fesm2022/ngwr-gradient-text.mjs.map +1 -1
- package/fesm2022/ngwr-hotkey.mjs +31 -10
- package/fesm2022/ngwr-hotkey.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +61 -0
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +59 -0
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n.mjs +9 -9
- package/fesm2022/ngwr-icon.mjs +6 -6
- package/fesm2022/ngwr-image-cropper.mjs +26 -3
- 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 +37 -5
- 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 +39 -8
- 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 +62 -25
- package/fesm2022/ngwr-input.mjs.map +1 -1
- package/fesm2022/ngwr-keyboard.mjs +3 -3
- package/fesm2022/ngwr-knob.mjs +46 -10
- package/fesm2022/ngwr-knob.mjs.map +1 -1
- package/fesm2022/ngwr-layout.mjs +36 -20
- package/fesm2022/ngwr-layout.mjs.map +1 -1
- package/fesm2022/ngwr-lightbox.mjs +35 -8
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-line-chart.mjs +19 -6
- package/fesm2022/ngwr-line-chart.mjs.map +1 -1
- package/fesm2022/ngwr-list.mjs +14 -9
- package/fesm2022/ngwr-list.mjs.map +1 -1
- package/fesm2022/ngwr-loading-bar.mjs +71 -31
- 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 +19 -8
- package/fesm2022/ngwr-marquee.mjs.map +1 -1
- package/fesm2022/ngwr-media.mjs +3 -3
- package/fesm2022/ngwr-mention-testing.mjs +513 -0
- package/fesm2022/ngwr-mention-testing.mjs.map +1 -0
- package/fesm2022/ngwr-mention.mjs +16 -7
- package/fesm2022/ngwr-mention.mjs.map +1 -1
- package/fesm2022/ngwr-meta.mjs +28 -13
- package/fesm2022/ngwr-meta.mjs.map +1 -1
- package/fesm2022/ngwr-meter-group.mjs +22 -8
- package/fesm2022/ngwr-meter-group.mjs.map +1 -1
- package/fesm2022/ngwr-overlay.mjs +57 -8
- package/fesm2022/ngwr-overlay.mjs.map +1 -1
- package/fesm2022/ngwr-page-header.mjs +3 -3
- package/fesm2022/ngwr-pagination-testing.mjs +389 -0
- package/fesm2022/ngwr-pagination-testing.mjs.map +1 -0
- package/fesm2022/ngwr-pagination.mjs +27 -11
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-pipes.mjs +21 -21
- package/fesm2022/ngwr-platform.mjs +9 -9
- package/fesm2022/ngwr-popconfirm-testing.mjs +309 -0
- package/fesm2022/ngwr-popconfirm-testing.mjs.map +1 -0
- package/fesm2022/ngwr-popconfirm.mjs +99 -21
- 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 +48 -10
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-progress.mjs +3 -3
- package/fesm2022/ngwr-pull-to-refresh.mjs +19 -4
- package/fesm2022/ngwr-pull-to-refresh.mjs.map +1 -1
- package/fesm2022/ngwr-qr.mjs +15 -5
- 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 +16 -9
- 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 +40 -5
- package/fesm2022/ngwr-rating.mjs.map +1 -1
- package/fesm2022/ngwr-result.mjs +12 -12
- package/fesm2022/ngwr-rotating-text.mjs +3 -3
- package/fesm2022/ngwr-scroll.mjs +3 -3
- package/fesm2022/ngwr-segmented-testing.mjs +512 -0
- package/fesm2022/ngwr-segmented-testing.mjs.map +1 -0
- package/fesm2022/ngwr-segmented.mjs +3 -3
- package/fesm2022/ngwr-select-testing.mjs +268 -0
- package/fesm2022/ngwr-select-testing.mjs.map +1 -0
- package/fesm2022/ngwr-select.mjs +96 -25
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-shiny-text.mjs +7 -7
- package/fesm2022/ngwr-shiny-text.mjs.map +1 -1
- package/fesm2022/ngwr-sidebar.mjs +67 -14
- package/fesm2022/ngwr-sidebar.mjs.map +1 -1
- package/fesm2022/ngwr-skeleton.mjs +3 -3
- package/fesm2022/ngwr-slider-testing.mjs +478 -0
- package/fesm2022/ngwr-slider-testing.mjs.map +1 -0
- package/fesm2022/ngwr-slider.mjs +59 -15
- package/fesm2022/ngwr-slider.mjs.map +1 -1
- package/fesm2022/ngwr-sparkline.mjs +28 -8
- package/fesm2022/ngwr-sparkline.mjs.map +1 -1
- package/fesm2022/ngwr-speed-dial.mjs +39 -6
- package/fesm2022/ngwr-speed-dial.mjs.map +1 -1
- package/fesm2022/ngwr-spinner.mjs +14 -5
- package/fesm2022/ngwr-spinner.mjs.map +1 -1
- package/fesm2022/ngwr-splash-cursor.mjs +4 -4
- package/fesm2022/ngwr-splash-cursor.mjs.map +1 -1
- package/fesm2022/ngwr-split-text.mjs +4 -4
- package/fesm2022/ngwr-split-text.mjs.map +1 -1
- package/fesm2022/ngwr-splitter.mjs +72 -11
- package/fesm2022/ngwr-splitter.mjs.map +1 -1
- package/fesm2022/ngwr-spotlight-card.mjs +7 -7
- package/fesm2022/ngwr-spotlight-card.mjs.map +1 -1
- package/fesm2022/ngwr-squircle.mjs +6 -6
- package/fesm2022/ngwr-star-border.mjs +4 -4
- package/fesm2022/ngwr-star-border.mjs.map +1 -1
- package/fesm2022/ngwr-statistic.mjs +33 -16
- 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-stepper.mjs +6 -6
- package/fesm2022/ngwr-storage.mjs +27 -17
- package/fesm2022/ngwr-storage.mjs.map +1 -1
- package/fesm2022/ngwr-switch-testing.mjs +77 -0
- package/fesm2022/ngwr-switch-testing.mjs.map +1 -0
- package/fesm2022/ngwr-switch.mjs +12 -6
- 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 +105 -44
- 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 +44 -12
- 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 +35 -7
- package/fesm2022/ngwr-textarea.mjs.map +1 -1
- package/fesm2022/ngwr-theme.mjs +3 -3
- package/fesm2022/ngwr-tilt-card.mjs +7 -7
- package/fesm2022/ngwr-tilt-card.mjs.map +1 -1
- package/fesm2022/ngwr-timeline.mjs +6 -6
- package/fesm2022/ngwr-toast-testing.mjs +101 -0
- package/fesm2022/ngwr-toast-testing.mjs.map +1 -0
- package/fesm2022/ngwr-toast.mjs +55 -21
- package/fesm2022/ngwr-toast.mjs.map +1 -1
- package/fesm2022/ngwr-toolbar.mjs +3 -3
- package/fesm2022/ngwr-tour.mjs +67 -15
- 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 +47 -16
- 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 +75 -9
- package/fesm2022/ngwr-tree.mjs.map +1 -1
- package/fesm2022/ngwr-typewriter.mjs +7 -5
- package/fesm2022/ngwr-typewriter.mjs.map +1 -1
- package/fesm2022/ngwr-typography.mjs +3 -3
- package/fesm2022/ngwr-version.mjs +1 -1
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/fesm2022/ngwr-virtual-scroll.mjs +33 -7
- package/fesm2022/ngwr-virtual-scroll.mjs.map +1 -1
- package/fesm2022/ngwr-waves.mjs +5 -5
- package/fesm2022/ngwr-waves.mjs.map +1 -1
- package/fesm2022/ngwr-window.mjs +88 -18
- package/fesm2022/ngwr-window.mjs.map +1 -1
- package/gauge/styles/_index.scss +1 -1
- package/glitch-text/styles/_index.scss +4 -0
- package/i18n/en.json +56 -0
- package/i18n/ru.json +56 -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/schematics/use/symbol-map.json +2 -0
- package/segmented/styles/_index.scss +7 -0
- package/select/styles/_index.scss +29 -9
- 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 +1 -1
- package/styles/_grid.scss +4 -4
- package/styles.scss +1 -0
- package/switch/styles/_index.scss +5 -3
- package/table/styles/_index.scss +22 -11
- package/tabs/styles/_index.scss +11 -1
- package/textarea/styles/_index.scss +5 -0
- package/theme/styles/_colors.scss +29 -13
- package/theme/styles/_dark.scss +11 -3
- 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 +5 -3
- 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 +58 -10
- package/types/ngwr-calendar-heatmap.d.ts +16 -2
- package/types/ngwr-calendar.d.ts +37 -1
- 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-clipboard.d.ts +8 -1
- 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 +128 -8
- package/types/ngwr-dialog-testing.d.ts +79 -0
- package/types/ngwr-dialog.d.ts +13 -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-drawer.d.ts +15 -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-hotkey.d.ts +2 -0
- 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-list.d.ts +7 -2
- package/types/ngwr-loading-bar.d.ts +4 -7
- 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 +7 -1
- 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 +19 -2
- 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-storage.d.ts +10 -1
- 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-toast.d.ts +19 -4
- 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/types/ngwr-window.d.ts +23 -2
- package/typewriter/styles/_index.scss +1 -1
- package/typography/styles/_index.scss +1 -1
- package/window/styles/_index.scss +32 -9
|
@@ -0,0 +1,226 @@
|
|
|
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-input-number>` a harness query matches. */
|
|
11
|
+
interface WrInputNumberHarnessFilters extends BaseHarnessFilters {
|
|
12
|
+
/** Match the text in the field — a string is an exact match, a RegExp is tested. */
|
|
13
|
+
readonly text?: string | RegExp;
|
|
14
|
+
/**
|
|
15
|
+
* Match the number the field is showing.
|
|
16
|
+
*
|
|
17
|
+
* Parsed with the test runtime's locale, since a harness predicate has no place
|
|
18
|
+
* to pass one; an app on a different `LOCALE_ID` should narrow by `text`
|
|
19
|
+
* instead. A field showing text that is not a number — empty, or mid-typed —
|
|
20
|
+
* matches no number at all.
|
|
21
|
+
*/
|
|
22
|
+
readonly value?: number;
|
|
23
|
+
/** Match the placeholder — a string is an exact match, a RegExp is tested. */
|
|
24
|
+
readonly placeholder?: string | RegExp;
|
|
25
|
+
/** Match only enabled (`false`) or only disabled (`true`) fields. */
|
|
26
|
+
readonly disabled?: boolean;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @license
|
|
31
|
+
*
|
|
32
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
33
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Test harness for `<wr-input-number>`.
|
|
38
|
+
*
|
|
39
|
+
* The control is a `type="text"` field plus a ▲▼ stepper column — deliberately
|
|
40
|
+
* NOT an `<input type="number">` and NOT a `role="spinbutton"`, because it renders
|
|
41
|
+
* grouped, locale-formatted text that a numeric input cannot hold. Two things
|
|
42
|
+
* follow, and they shape this whole harness:
|
|
43
|
+
*
|
|
44
|
+
* - There is no `aria-valuenow` / `aria-valuemin` / `aria-valuemax` trio, and no
|
|
45
|
+
* `min` / `max` / `step` attribute, anywhere in the DOM. So the value is read
|
|
46
|
+
* out of the field's TEXT, and the bounds are read off the stepper buttons'
|
|
47
|
+
* disabled state — which is precisely what a user is given, and the reason
|
|
48
|
+
* {@link isIncrementDisabled} is named after the button rather than after "at
|
|
49
|
+
* the maximum".
|
|
50
|
+
* - The text and the value are different things, and the gap between them is this
|
|
51
|
+
* control's trap. {@link getValueText} answers the raw characters;
|
|
52
|
+
* {@link getValue} answers the number they spell. Mid-type the two disagree
|
|
53
|
+
* with the MODEL as well: the component clamps and rounds on every keystroke
|
|
54
|
+
* but leaves the typed text alone until blur, so a field showing `999` under
|
|
55
|
+
* `[max]="10"` has already committed `10`. Call {@link blur} — which is also
|
|
56
|
+
* what emits `touch` — to make the field re-render from the committed value,
|
|
57
|
+
* and assert the host's own signal when what you mean is "the model".
|
|
58
|
+
*
|
|
59
|
+
* Stepping has two paths and both are here: {@link increment} / {@link decrement}
|
|
60
|
+
* click the buttons, {@link stepUp} / {@link stepDown} press ArrowUp / ArrowDown
|
|
61
|
+
* on the field. The keyboard is the accessible path, and in a unit test it is
|
|
62
|
+
* also the honest one — jsdom has no layout, so nothing that needs a hit test can
|
|
63
|
+
* be driven by coordinates. `{ shift: true }` is this control's page-up: it steps
|
|
64
|
+
* by ten. There is deliberately no `pageUp()` / `home()` / `end()`, because the
|
|
65
|
+
* component handles the two arrow keys and nothing else.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```ts
|
|
69
|
+
* const qty = await loader.getHarness(WrInputNumberHarness.with({ placeholder: 'Quantity' }));
|
|
70
|
+
*
|
|
71
|
+
* await qty.setValue(4);
|
|
72
|
+
* await qty.increment();
|
|
73
|
+
* expect(await qty.getValue()).toBe(5);
|
|
74
|
+
*
|
|
75
|
+
* await qty.stepUp({ shift: true });
|
|
76
|
+
* expect(await qty.isIncrementDisabled()).toBe(true); // [max]="15"
|
|
77
|
+
* ```
|
|
78
|
+
*
|
|
79
|
+
* @see https://ngwr.dev/guides/testing
|
|
80
|
+
*/
|
|
81
|
+
declare class WrInputNumberHarness extends ComponentHarness {
|
|
82
|
+
static hostSelector: string;
|
|
83
|
+
/** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */
|
|
84
|
+
static with(options?: WrInputNumberHarnessFilters): HarnessPredicate<WrInputNumberHarness>;
|
|
85
|
+
private readonly field;
|
|
86
|
+
/** The raw characters in the field — mid-typed, ungrouped or nonsense included. */
|
|
87
|
+
getValueText(): Promise<string>;
|
|
88
|
+
/**
|
|
89
|
+
* The number the field is SHOWING, or `null` when it is empty.
|
|
90
|
+
*
|
|
91
|
+
* Empty is `null` rather than `0` because the control draws that distinction
|
|
92
|
+
* too — a required-field check has to be able to tell "nothing entered" from "a
|
|
93
|
+
* deliberate zero". Text that is not a number throws instead: answering `null`
|
|
94
|
+
* there would report a half-typed `-` as an empty field.
|
|
95
|
+
*
|
|
96
|
+
* `locale` defaults to the test runtime's, which for a stock Node run is the
|
|
97
|
+
* same `en-US` Angular's `LOCALE_ID` defaults to. The component formats with
|
|
98
|
+
* `LOCALE_ID` and a harness cannot reach that injector, so an app that provides
|
|
99
|
+
* its own must pass it: `getValue('de-DE')`. Reading `'1.234,5'` as en-US
|
|
100
|
+
* silently answers `1.2345`.
|
|
101
|
+
*/
|
|
102
|
+
getValue(locale?: string): Promise<number | null>;
|
|
103
|
+
/**
|
|
104
|
+
* Type a number into the field, replacing whatever is there.
|
|
105
|
+
*
|
|
106
|
+
* Written with the LOCALE's decimal separator rather than with `String(value)`:
|
|
107
|
+
* in a comma-decimal locale `'1.5'` is read as `15`, because `.` is that
|
|
108
|
+
* locale's THOUSANDS separator. Grouping is deliberately not added — nothing
|
|
109
|
+
* requires it, and the field regroups itself on blur anyway.
|
|
110
|
+
*
|
|
111
|
+
* The field is cleared first, so the value passes through `null` on the way, as
|
|
112
|
+
* it does for a user who selects all and types over it. The control parses every
|
|
113
|
+
* keystroke, so `min` / `max` / `decimals` are applied AS YOU TYPE while the
|
|
114
|
+
* text is left exactly as typed — see {@link getValue}.
|
|
115
|
+
*/
|
|
116
|
+
setValue(value: number, locale?: string): Promise<void>;
|
|
117
|
+
/**
|
|
118
|
+
* Type raw characters into the field, replacing whatever is there.
|
|
119
|
+
*
|
|
120
|
+
* For everything a number cannot express: a partial entry (`'-'`, `'1.'`), an
|
|
121
|
+
* already-grouped string, or plain nonsense. Nothing is normalised on the way
|
|
122
|
+
* in, and — as with {@link setValue} — the field is cleared first.
|
|
123
|
+
*/
|
|
124
|
+
setValueText(text: string): Promise<void>;
|
|
125
|
+
/** Empty the field, which sets the value to `null` — not to `0`. */
|
|
126
|
+
clear(): Promise<void>;
|
|
127
|
+
/** Whether the ▲▼ column is rendered at all — `[showSteppers]="false"` drops it. */
|
|
128
|
+
hasSteppers(): Promise<boolean>;
|
|
129
|
+
/**
|
|
130
|
+
* Click ▲ once: up by `step`, clamped to `max`.
|
|
131
|
+
*
|
|
132
|
+
* A button at its bound — or on a disabled / readonly control — is `disabled`,
|
|
133
|
+
* and the CDK does not deliver a click to a disabled element, so this is a
|
|
134
|
+
* quiet no-op there rather than a throw. Ask {@link isIncrementDisabled} rather
|
|
135
|
+
* than inferring the bound from a value that did not move. It throws only when
|
|
136
|
+
* there is no stepper column to click.
|
|
137
|
+
*/
|
|
138
|
+
increment(): Promise<void>;
|
|
139
|
+
/** Click ▼ once: down by `step`, clamped to `min`. See {@link increment}. */
|
|
140
|
+
decrement(): Promise<void>;
|
|
141
|
+
/**
|
|
142
|
+
* Whether ▲ refuses to step.
|
|
143
|
+
*
|
|
144
|
+
* Deliberately not named `isAtMax()`: the button is disabled at the maximum AND
|
|
145
|
+
* on a disabled or readonly control, and it cannot tell you which. That
|
|
146
|
+
* conflation is the control's own — it is what the user is offered — and the
|
|
147
|
+
* name says so rather than promising a bound the DOM never publishes.
|
|
148
|
+
*/
|
|
149
|
+
isIncrementDisabled(): Promise<boolean>;
|
|
150
|
+
/** Whether ▼ refuses to step — at the minimum, or on a locked control. */
|
|
151
|
+
isDecrementDisabled(): Promise<boolean>;
|
|
152
|
+
/**
|
|
153
|
+
* Press ArrowUp on the field: up by `step`, or by TEN steps with
|
|
154
|
+
* `{ shift: true }` — the control's page-up, since it handles no other keys.
|
|
155
|
+
*/
|
|
156
|
+
stepUp(options?: {
|
|
157
|
+
shift?: boolean;
|
|
158
|
+
}): Promise<void>;
|
|
159
|
+
/** Press ArrowDown on the field. See {@link stepUp} for the `shift` multiplier. */
|
|
160
|
+
stepDown(options?: {
|
|
161
|
+
shift?: boolean;
|
|
162
|
+
}): Promise<void>;
|
|
163
|
+
/** The `[prefix]` label (`'$'`), or `null` when the field has none. */
|
|
164
|
+
getPrefix(): Promise<string | null>;
|
|
165
|
+
/**
|
|
166
|
+
* The `[suffix]` label (`'kg'`), or `null` when the field has none.
|
|
167
|
+
*
|
|
168
|
+
* The stepper column rides in the same suffix slot and carries the same affix
|
|
169
|
+
* class, so it is excluded here by name: a bare `--suffix` query answers with
|
|
170
|
+
* the buttons' (empty) text for every field that has steppers and no suffix.
|
|
171
|
+
*/
|
|
172
|
+
getSuffix(): Promise<string | null>;
|
|
173
|
+
/** The field's placeholder. */
|
|
174
|
+
getPlaceholder(): Promise<string>;
|
|
175
|
+
/**
|
|
176
|
+
* The field's accessible name, or `null` when it has none of its own.
|
|
177
|
+
*
|
|
178
|
+
* Read from the native input, not from the host: an `aria-label` on a component
|
|
179
|
+
* element does not reach the control inside it, which is why the component
|
|
180
|
+
* takes an `ariaLabel` input and forwards it here (falling back to the
|
|
181
|
+
* placeholder). Inside a `<wr-form-field>` the name comes from the label's
|
|
182
|
+
* `for`, and `null` here is then correct rather than a missing name.
|
|
183
|
+
*/
|
|
184
|
+
getAriaLabel(): Promise<string | null>;
|
|
185
|
+
/**
|
|
186
|
+
* Whether the field refuses interaction.
|
|
187
|
+
*
|
|
188
|
+
* The native control's `disabled` property, not the host's
|
|
189
|
+
* `wr-input-number--disabled` modifier: the modifier is the styling hook, the
|
|
190
|
+
* property is what actually blocks typing, drops the field out of the tab order
|
|
191
|
+
* and is reported to assistive technology.
|
|
192
|
+
*/
|
|
193
|
+
isDisabled(): Promise<boolean>;
|
|
194
|
+
/** Whether the field refuses new values while staying focusable and readable. */
|
|
195
|
+
isReadonly(): Promise<boolean>;
|
|
196
|
+
/** Move focus to the field. While it is focused the control stops reformatting the text. */
|
|
197
|
+
focus(): Promise<void>;
|
|
198
|
+
/**
|
|
199
|
+
* Blur the field, which is what commits the display: the control re-renders the
|
|
200
|
+
* text from its value — grouping it and applying `decimals` — and emits `touch`
|
|
201
|
+
* so a bound `[formField]` can mark itself touched.
|
|
202
|
+
*/
|
|
203
|
+
blur(): Promise<void>;
|
|
204
|
+
/** Whether the field currently has focus. */
|
|
205
|
+
isFocused(): Promise<boolean>;
|
|
206
|
+
/**
|
|
207
|
+
* The shown value for predicates: `null` for an empty field AND for text that is
|
|
208
|
+
* not a number, so a mid-typed field matches no `value` filter instead of
|
|
209
|
+
* throwing the whole query.
|
|
210
|
+
*/
|
|
211
|
+
private parsedValue;
|
|
212
|
+
/**
|
|
213
|
+
* One of the two stepper buttons, BY POSITION — ▲ first, ▼ second.
|
|
214
|
+
*
|
|
215
|
+
* Not by `aria-label`: those strings ("Increment" / "Decrement") are still
|
|
216
|
+
* hard-coded English, so keying on them would make this harness the thing that
|
|
217
|
+
* breaks when they move into the i18n catalog — the same call
|
|
218
|
+
* `WrTimePanelHarness` makes about its own columns. Order is the layout
|
|
219
|
+
* contract, and the spec pins it by asserting which way each button moves the
|
|
220
|
+
* value.
|
|
221
|
+
*/
|
|
222
|
+
private stepButton;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export { WrInputNumberHarness };
|
|
226
|
+
export type { WrInputNumberHarnessFilters };
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { BooleanInput } from '@angular/cdk/coercion';
|
|
2
3
|
import { FormValueControl } from '@angular/forms/signals';
|
|
4
|
+
import { WrInputSize } from 'ngwr/input';
|
|
3
5
|
|
|
4
6
|
/**
|
|
5
7
|
* Numeric input with locale-aware formatting + ▲▼ stepper buttons.
|
|
@@ -38,6 +40,32 @@ declare class WrInputNumber implements FormValueControl<number | null> {
|
|
|
38
40
|
readonly decimals: _angular_core.InputSignal<number | null>;
|
|
39
41
|
/** Render the ▲▼ stepper column. @default true */
|
|
40
42
|
readonly showSteppers: _angular_core.InputSignalWithTransform<boolean, any>;
|
|
43
|
+
/**
|
|
44
|
+
* Control size — forwarded to the field, and shares the `--wr-control-*`
|
|
45
|
+
* contract. Unset falls back to the `inputNumber.size` app default from
|
|
46
|
+
* `provideWrConfig()`, then to the `input.size` one, then to `md`. @default 'md'
|
|
47
|
+
*/
|
|
48
|
+
readonly size: _angular_core.InputSignal<WrInputSize | null>;
|
|
49
|
+
/**
|
|
50
|
+
* Pill-shaped corners. Unset falls back to the `inputNumber.rounded` app default
|
|
51
|
+
* from `provideWrConfig()`, then to the `input.rounded` one;
|
|
52
|
+
* `[rounded]="false"` turns a configured `true` back off. @default false
|
|
53
|
+
*/
|
|
54
|
+
readonly rounded: _angular_core.InputSignalWithTransform<boolean | null, BooleanInput>;
|
|
55
|
+
/**
|
|
56
|
+
* `size`, then the app config, then `md` — bound to the field's `[wrSize]`.
|
|
57
|
+
*
|
|
58
|
+
* The chrome this control is built from resolves the same pair for itself, so
|
|
59
|
+
* the config lookup falls through to `input.*` rather than stopping at
|
|
60
|
+
* `inputNumber.*`: binding a value down always wins there, and an unchained
|
|
61
|
+
* lookup would therefore SUPPRESS an `input.size` an app had set — the field
|
|
62
|
+
* inside a number input would be the one `[wrInput]` in the app that ignored it.
|
|
63
|
+
* Chained, the specific key wins where it is set and the general one still
|
|
64
|
+
* applies where it is not.
|
|
65
|
+
*/
|
|
66
|
+
protected readonly resolvedSize: _angular_core.Signal<"sm" | "md" | "lg">;
|
|
67
|
+
/** `rounded`, then the app config, then `false` — bound to the group AND the field. */
|
|
68
|
+
protected readonly resolvedRounded: _angular_core.Signal<boolean>;
|
|
41
69
|
/** Optional prefix label (e.g. `"$"`). */
|
|
42
70
|
readonly prefix: _angular_core.InputSignal<string>;
|
|
43
71
|
/** Optional suffix label (e.g. `"kg"`). */
|
|
@@ -84,7 +112,7 @@ declare class WrInputNumber implements FormValueControl<number | null> {
|
|
|
84
112
|
/** Format a value using `Intl.NumberFormat` for the active locale. */
|
|
85
113
|
private format;
|
|
86
114
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrInputNumber, never>;
|
|
87
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrInputNumber, "wr-input-number", never, { "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "decimals": { "alias": "decimals"; "required": false; "isSignal": true; }; "showSteppers": { "alias": "showSteppers"; "required": false; "isSignal": true; }; "prefix": { "alias": "prefix"; "required": false; "isSignal": true; }; "suffix": { "alias": "suffix"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "touch": "touch"; }, never, never, true, never>;
|
|
115
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrInputNumber, "wr-input-number", never, { "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "decimals": { "alias": "decimals"; "required": false; "isSignal": true; }; "showSteppers": { "alias": "showSteppers"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "prefix": { "alias": "prefix"; "required": false; "isSignal": true; }; "suffix": { "alias": "suffix"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "touch": "touch"; }, never, never, true, never>;
|
|
88
116
|
}
|
|
89
117
|
|
|
90
118
|
export { WrInputNumber };
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
import { BaseHarnessFilters, ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
|
|
2
|
+
import { WrInputOtpSize } from 'ngwr/input-otp';
|
|
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 box of a `<wr-input-otp>` a harness query matches. */
|
|
12
|
+
interface WrInputOtpBoxHarnessFilters extends BaseHarnessFilters {
|
|
13
|
+
/** Match the character in the box — a string is an exact match, a RegExp is tested. */
|
|
14
|
+
readonly value?: string | RegExp;
|
|
15
|
+
/** Match only empty (`true`) or only filled (`false`) boxes. */
|
|
16
|
+
readonly empty?: boolean;
|
|
17
|
+
/** Match the box's accessible name (`aria-label`, e.g. `'Digit 3'`). */
|
|
18
|
+
readonly label?: string | RegExp;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @license
|
|
23
|
+
*
|
|
24
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
25
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
/** Narrows which `<wr-input-otp>` a harness query matches. */
|
|
29
|
+
interface WrInputOtpHarnessFilters extends BaseHarnessFilters {
|
|
30
|
+
/**
|
|
31
|
+
* Match the assembled code — a string is an exact match, a RegExp is tested.
|
|
32
|
+
*
|
|
33
|
+
* The code is the boxes joined, so an emptied middle box is not a gap here: a
|
|
34
|
+
* control showing `1 2 _ 4 5 6` matches `'12456'`.
|
|
35
|
+
*/
|
|
36
|
+
readonly value?: string | RegExp;
|
|
37
|
+
/** Match by how many boxes are rendered. */
|
|
38
|
+
readonly length?: number;
|
|
39
|
+
/** Match only enabled (`false`) or only disabled (`true`) controls. */
|
|
40
|
+
readonly disabled?: boolean;
|
|
41
|
+
/** Match only controls with every box filled (`true`), or with one still empty (`false`). */
|
|
42
|
+
readonly complete?: boolean;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @license
|
|
47
|
+
*
|
|
48
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
49
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Test harness for ONE box of a `<wr-input-otp>` — the `<input>` that holds a
|
|
54
|
+
* single character.
|
|
55
|
+
*
|
|
56
|
+
* A box is more than the string it shows: it carries its own accessible name
|
|
57
|
+
* (`Digit 3`), its own emptiness, its own masking, and it is the thing that
|
|
58
|
+
* either has focus or does not. The root harness answers the control's
|
|
59
|
+
* questions (the assembled code, which index is focused); this one answers the
|
|
60
|
+
* box's, so a spec can hold on to "the box that has focus" instead of zipping
|
|
61
|
+
* four parallel arrays by index.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```ts
|
|
65
|
+
* await otp.setValue('12');
|
|
66
|
+
* // Two digits in, the first box still waiting is the third.
|
|
67
|
+
* const [box] = await otp.getBoxes({ empty: true });
|
|
68
|
+
* expect(await box.getLabel()).toBe('Digit 3');
|
|
69
|
+
* await box.type('7');
|
|
70
|
+
* ```
|
|
71
|
+
*
|
|
72
|
+
* @see https://ngwr.dev/guides/testing
|
|
73
|
+
*/
|
|
74
|
+
declare class WrInputOtpBoxHarness extends ComponentHarness {
|
|
75
|
+
/**
|
|
76
|
+
* The cell class, not `wr-input-otp input`: the class is public API, so it is
|
|
77
|
+
* the stable handle on a cell, and matching on it keeps the harness usable on
|
|
78
|
+
* its own — `getAllHarnesses(WrInputOtpBoxHarness)` finds cells without
|
|
79
|
+
* collecting every other `<input>` on the page.
|
|
80
|
+
*/
|
|
81
|
+
static hostSelector: string;
|
|
82
|
+
/** Build a predicate that narrows the query. */
|
|
83
|
+
static with(options?: WrInputOtpBoxHarnessFilters): HarnessPredicate<WrInputOtpBoxHarness>;
|
|
84
|
+
/**
|
|
85
|
+
* The character the box shows, or `''`.
|
|
86
|
+
*
|
|
87
|
+
* Read from the `value` PROPERTY. The `value` attribute is never written at all
|
|
88
|
+
* — Angular binds the property, and the component rewrites that property again
|
|
89
|
+
* in its own `input` handler to keep one character per box — so
|
|
90
|
+
* `getAttribute('value')` answers `null` for every box, full or empty.
|
|
91
|
+
*/
|
|
92
|
+
getValue(): Promise<string>;
|
|
93
|
+
/** Whether the box is still waiting for a character. */
|
|
94
|
+
isEmpty(): Promise<boolean>;
|
|
95
|
+
/**
|
|
96
|
+
* The box's accessible name — `Digit 1`, `Digit 2`, …
|
|
97
|
+
*
|
|
98
|
+
* This is the whole of a box's identity for a screen-reader user: the boxes
|
|
99
|
+
* carry no visible label and no position in an `aria-*` set, so the name is
|
|
100
|
+
* how someone knows which one they are in.
|
|
101
|
+
*/
|
|
102
|
+
getLabel(): Promise<string | null>;
|
|
103
|
+
/** Whether the box hides what was typed, like a password field. */
|
|
104
|
+
isMasked(): Promise<boolean>;
|
|
105
|
+
isDisabled(): Promise<boolean>;
|
|
106
|
+
isFocused(): Promise<boolean>;
|
|
107
|
+
/** Put the caret in this box. Throws when the control is disabled. */
|
|
108
|
+
focus(): Promise<void>;
|
|
109
|
+
/**
|
|
110
|
+
* Type one character into this box.
|
|
111
|
+
*
|
|
112
|
+
* Focus advances to the next box when the character is accepted — the control
|
|
113
|
+
* moves it in the `input` handler, so it has already happened when this
|
|
114
|
+
* resolves. A character the box's `mode` rejects leaves the box EMPTY and
|
|
115
|
+
* focus where it was, which is what a browser shows too.
|
|
116
|
+
*/
|
|
117
|
+
type(char: string): Promise<void>;
|
|
118
|
+
private assertEnabled;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* @license
|
|
123
|
+
*
|
|
124
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
125
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
126
|
+
*/
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Test harness for `<wr-input-otp>` — one code spread over N single-character
|
|
130
|
+
* boxes, with {@link WrInputOtpBoxHarness} for a box.
|
|
131
|
+
*
|
|
132
|
+
* Everything here is driven from the KEYBOARD and from `input` / `paste` events,
|
|
133
|
+
* never by clicking a box. The control binds no `(click)` handler at all — what a
|
|
134
|
+
* click gives you in a browser is FOCUS, and a unit-test DOM moves no focus on
|
|
135
|
+
* click, so a click-driven method would look like it worked and change nothing.
|
|
136
|
+
* The keyboard is the path this control is designed around anyway.
|
|
137
|
+
*
|
|
138
|
+
* Two things about this control regularly surprise people, and the harness
|
|
139
|
+
* reports them rather than smoothing them over:
|
|
140
|
+
* - {@link getValue} is the boxes JOINED, which is what the component publishes
|
|
141
|
+
* for every edit made inside it. Emptying a middle box therefore SHORTENS the
|
|
142
|
+
* code instead of leaving a gap in it — `1 2 _ 4 5 6` publishes `'12456'`.
|
|
143
|
+
* {@link getBoxValues} is the only place that hole is visible, and
|
|
144
|
+
* {@link isComplete} is the only safe answer to "can this be submitted".
|
|
145
|
+
* - {@link paste} always fills from the FIRST box, whichever box the paste
|
|
146
|
+
* landed on.
|
|
147
|
+
*
|
|
148
|
+
* @example
|
|
149
|
+
* ```ts
|
|
150
|
+
* const otp = await loader.getHarness(WrInputOtpHarness);
|
|
151
|
+
*
|
|
152
|
+
* await otp.setValue('482913');
|
|
153
|
+
* expect(await otp.isComplete()).toBe(true);
|
|
154
|
+
* expect(await otp.getValue()).toBe('482913');
|
|
155
|
+
* ```
|
|
156
|
+
*
|
|
157
|
+
* @see https://ngwr.dev/guides/testing
|
|
158
|
+
*/
|
|
159
|
+
declare class WrInputOtpHarness extends ComponentHarness {
|
|
160
|
+
static hostSelector: string;
|
|
161
|
+
/** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */
|
|
162
|
+
static with(options?: WrInputOtpHarnessFilters): HarnessPredicate<WrInputOtpHarness>;
|
|
163
|
+
/** The boxes, in order. A box is a whole harness — see {@link WrInputOtpBoxHarness}. */
|
|
164
|
+
getBoxes(filters?: WrInputOtpBoxHarnessFilters): Promise<WrInputOtpBoxHarness[]>;
|
|
165
|
+
/** One box by index. Throws rather than returning `undefined` for an index that is not there. */
|
|
166
|
+
getBox(index: number): Promise<WrInputOtpBoxHarness>;
|
|
167
|
+
/** How many boxes are rendered. `length` is clamped to `[1, 20]`, so this is the real count. */
|
|
168
|
+
getLength(): Promise<number>;
|
|
169
|
+
/** The character in each box, in order, `''` for an empty one. */
|
|
170
|
+
getBoxValues(): Promise<string[]>;
|
|
171
|
+
/**
|
|
172
|
+
* The assembled code — the boxes joined. For anything typed, pasted or deleted
|
|
173
|
+
* inside the control this is exactly the string it publishes through its
|
|
174
|
+
* `value` model.
|
|
175
|
+
*
|
|
176
|
+
* An emptied middle box closes up here; {@link getBoxValues} keeps the hole.
|
|
177
|
+
*
|
|
178
|
+
* A write from OUTSIDE can leave the two disagreeing, and the model is the one
|
|
179
|
+
* that keeps the surplus: the control splits the incoming value into boxes,
|
|
180
|
+
* dropping what its `mode` rejects and anything past `length`, without writing
|
|
181
|
+
* the shortened code back. Writing `'12a456'` in `numeric` mode shows `12_456`
|
|
182
|
+
* and reads `'12456'` here while the bound model still holds `'12a456'`.
|
|
183
|
+
*/
|
|
184
|
+
getValue(): Promise<string>;
|
|
185
|
+
/** Whether every box holds a character — the condition the `completed` output fires on. */
|
|
186
|
+
isComplete(): Promise<boolean>;
|
|
187
|
+
/**
|
|
188
|
+
* Whether the control refuses interaction.
|
|
189
|
+
*
|
|
190
|
+
* Read from the boxes' `disabled` property rather than the host's
|
|
191
|
+
* `wr-input-otp--disabled` class: the property is what actually stops the
|
|
192
|
+
* events and the focus, the class only paints.
|
|
193
|
+
*/
|
|
194
|
+
isDisabled(): Promise<boolean>;
|
|
195
|
+
/** Whether the typed characters are hidden, like a password field. */
|
|
196
|
+
isMasked(): Promise<boolean>;
|
|
197
|
+
/**
|
|
198
|
+
* The keyboard a mobile browser is asked for.
|
|
199
|
+
*
|
|
200
|
+
* `numeric` mode publishes `inputmode="numeric"`; `alphanumeric` and `text`
|
|
201
|
+
* BOTH publish `text`, so the two cannot be told apart from the DOM. What
|
|
202
|
+
* separates them is only observable by typing: `alphanumeric` drops anything
|
|
203
|
+
* that is not a letter or a digit.
|
|
204
|
+
*/
|
|
205
|
+
getInputMode(): Promise<'numeric' | 'text'>;
|
|
206
|
+
/** The control size, from the host modifier. `md` is the default and emits no modifier. */
|
|
207
|
+
getSize(): Promise<WrInputOtpSize>;
|
|
208
|
+
/** The character shown in an empty box. */
|
|
209
|
+
getPlaceholder(): Promise<string>;
|
|
210
|
+
/**
|
|
211
|
+
* The name the group announces.
|
|
212
|
+
*
|
|
213
|
+
* The boxes are separate inputs; the host's `role="group"` plus this label are
|
|
214
|
+
* what make them one control to a screen reader.
|
|
215
|
+
*/
|
|
216
|
+
getLabel(): Promise<string | null>;
|
|
217
|
+
/** The index of the box with focus, or `null` when focus is outside the control. */
|
|
218
|
+
getFocusedIndex(): Promise<number | null>;
|
|
219
|
+
/** Put the caret in a box — the first one unless asked otherwise. */
|
|
220
|
+
focus(index?: number): Promise<void>;
|
|
221
|
+
/**
|
|
222
|
+
* Take focus off the control, which is what makes it emit `touch` so a bound
|
|
223
|
+
* field can mark itself touched. The box that HAS focus is the one blurred:
|
|
224
|
+
* blurring any other one still emits `touch` (a unit-test DOM dispatches a blur
|
|
225
|
+
* event even on an element that never had focus), which would report a field as
|
|
226
|
+
* touched while the caret sits in it. Throws when no box has focus at all, for
|
|
227
|
+
* the same reason.
|
|
228
|
+
*/
|
|
229
|
+
blur(): Promise<void>;
|
|
230
|
+
/**
|
|
231
|
+
* Enter a whole code, the way a person does: one character per box, into
|
|
232
|
+
* whichever box the control has moved focus to.
|
|
233
|
+
*
|
|
234
|
+
* Every box is emptied first, so a shorter code cannot leave the tail of a
|
|
235
|
+
* previous one behind.
|
|
236
|
+
*
|
|
237
|
+
* The control is left to decide what it accepts: a character its `mode`
|
|
238
|
+
* rejects lands nowhere and focus stays put, so the next character overwrites
|
|
239
|
+
* the same box — which is exactly what a browser produces. Read {@link getValue}
|
|
240
|
+
* back rather than assuming the argument arrived.
|
|
241
|
+
*/
|
|
242
|
+
setValue(code: string): Promise<void>;
|
|
243
|
+
/**
|
|
244
|
+
* Type into the control from where it already is — the focused box, or the
|
|
245
|
+
* first box when focus is elsewhere. Unlike {@link setValue} nothing is cleared,
|
|
246
|
+
* so this appends the way a half-finished code is finished.
|
|
247
|
+
*/
|
|
248
|
+
type(chars: string): Promise<void>;
|
|
249
|
+
/**
|
|
250
|
+
* Paste a code in.
|
|
251
|
+
*
|
|
252
|
+
* The event goes to the focused box (the first one when focus is elsewhere),
|
|
253
|
+
* because that is where a browser delivers it — but the control fills from the
|
|
254
|
+
* FIRST box regardless, replacing everything, dropping characters its `mode`
|
|
255
|
+
* rejects and trimming what is left to `length`. A paste with nothing usable in
|
|
256
|
+
* it is ignored outright.
|
|
257
|
+
*
|
|
258
|
+
* jsdom implements neither `ClipboardEvent` nor `DataTransfer`, so the payload
|
|
259
|
+
* is attached to a plain event; `getData('text')` is what the control asks for,
|
|
260
|
+
* aliased to `text/plain` the way a browser does.
|
|
261
|
+
*/
|
|
262
|
+
paste(text: string): Promise<void>;
|
|
263
|
+
/**
|
|
264
|
+
* Press Backspace in the focused box.
|
|
265
|
+
*
|
|
266
|
+
* The control only handles the key itself when the box is ALREADY empty — then
|
|
267
|
+
* it clears the box behind and steps focus back, which is what makes fixing a
|
|
268
|
+
* typo one keystroke. On a filled box it defers to the browser's own editing,
|
|
269
|
+
* and jsdom performs none, so the harness supplies that half: the character is
|
|
270
|
+
* removed and an `input` event is dispatched, exactly as a real delete would.
|
|
271
|
+
* Focus stays where it is, and the emptied box becomes a hole in
|
|
272
|
+
* {@link getBoxValues} while {@link getValue} closes up.
|
|
273
|
+
*/
|
|
274
|
+
backspace(): Promise<void>;
|
|
275
|
+
/**
|
|
276
|
+
* Move focus with the arrow keys, `Home` or `End` — the control's own
|
|
277
|
+
* navigation, and the only one available in a unit test, where nothing has a
|
|
278
|
+
* position to click.
|
|
279
|
+
*
|
|
280
|
+
* Throws when no box has focus: the keys are handled by the box that receives
|
|
281
|
+
* them, so there is no move to make.
|
|
282
|
+
*/
|
|
283
|
+
moveFocus(to: 'previous' | 'next' | 'first' | 'last'): Promise<void>;
|
|
284
|
+
/**
|
|
285
|
+
* Empty every box and leave focus on the first, ready to be typed into.
|
|
286
|
+
*
|
|
287
|
+
* Each box is cleared through an `input` event rather than by writing the
|
|
288
|
+
* model, so the control publishes the change the same way it would for a user.
|
|
289
|
+
*/
|
|
290
|
+
clear(): Promise<void>;
|
|
291
|
+
/** Type `chars` starting at `index`, following the control's focus as it advances. */
|
|
292
|
+
private typeFrom;
|
|
293
|
+
private boxElement;
|
|
294
|
+
private focusedIndexOrThrow;
|
|
295
|
+
private assertEnabled;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
export { WrInputOtpBoxHarness, WrInputOtpHarness };
|
|
299
|
+
export type { WrInputOtpBoxHarnessFilters, WrInputOtpHarnessFilters };
|
|
@@ -41,12 +41,25 @@ type WrInputOtpSize = 'sm' | 'md' | 'lg';
|
|
|
41
41
|
* @see https://ngwr.dev/reference/components/input-otp
|
|
42
42
|
*/
|
|
43
43
|
declare class WrInputOtp implements FormValueControl<string> {
|
|
44
|
+
private readonly dir;
|
|
44
45
|
/** Number of cells to render. Clamped to `[1, 20]`. @default 6 */
|
|
45
46
|
readonly length: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
46
47
|
/** Character set per cell. @default 'numeric' */
|
|
47
48
|
readonly mode: _angular_core.InputSignal<WrInputOtpMode>;
|
|
48
|
-
/**
|
|
49
|
-
|
|
49
|
+
/**
|
|
50
|
+
* Control size — shares the `--wr-control-*` contract. Unset falls back to the
|
|
51
|
+
* `inputOtp.size` app default from `provideWrConfig()`. @default 'md'
|
|
52
|
+
*/
|
|
53
|
+
readonly size: _angular_core.InputSignal<WrInputOtpSize | null>;
|
|
54
|
+
/**
|
|
55
|
+
* `size`, then the app config, then `md`.
|
|
56
|
+
*
|
|
57
|
+
* Read ONCE, here: a box carries no size of its own — the host modifier sets
|
|
58
|
+
* `--wr-input-otp-size` / `-font` / `-radius` / `-gap` and every box reads them
|
|
59
|
+
* from the cascade — so one resolution sizes the whole strip however many boxes
|
|
60
|
+
* `length` renders.
|
|
61
|
+
*/
|
|
62
|
+
protected readonly resolvedSize: _angular_core.Signal<"sm" | "md" | "lg">;
|
|
50
63
|
/** Mask the typed characters like a password. @default false */
|
|
51
64
|
readonly mask: _angular_core.InputSignalWithTransform<boolean, any>;
|
|
52
65
|
/**
|
|
@@ -80,6 +93,14 @@ declare class WrInputOtp implements FormValueControl<string> {
|
|
|
80
93
|
private focusCell;
|
|
81
94
|
/** Drop a character that doesn't match the configured mode. */
|
|
82
95
|
private sanitiseChar;
|
|
96
|
+
/**
|
|
97
|
+
* The key as the strip SEES it.
|
|
98
|
+
*
|
|
99
|
+
* The boxes run along the inline axis, so under `dir="rtl"` the box to the
|
|
100
|
+
* visual right of the caret is the PREVIOUS one. Home/End stay semantic (first
|
|
101
|
+
* and last box), and Backspace is not a direction at all.
|
|
102
|
+
*/
|
|
103
|
+
private inlineKey;
|
|
83
104
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrInputOtp, never>;
|
|
84
105
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrInputOtp, "wr-input-otp", never, { "length": { "alias": "length"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "mask": { "alias": "mask"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "completed": "completed"; "touch": "touch"; }, never, never, true, never>;
|
|
85
106
|
}
|