ngwr 6.1.1 → 7.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/LICENSE +1 -3
- package/README.md +179 -32
- package/affix/styles/_index.scss +12 -0
- package/alert/styles/_index.scss +75 -32
- package/anchor/styles/_index.scss +59 -0
- package/aurora/aurora.scss +1 -0
- package/aurora/styles/_index.scss +30 -0
- package/avatar/styles/_index.scss +30 -14
- package/back-top/styles/_index.scss +42 -0
- package/badge/styles/_index.scss +80 -0
- package/badge/styles/_tag.scss +81 -0
- package/bar-chart/styles/_index.scss +56 -0
- package/blur-text/blur-text.scss +1 -0
- package/blur-text/styles/_index.scss +14 -0
- package/border-glow/border-glow.scss +4 -0
- package/border-glow/styles/_index.scss +228 -0
- package/breadcrumbs/breadcrumbs.scss +1 -0
- package/breadcrumbs/styles/_index.scss +76 -0
- package/burger/styles/_index.scss +101 -0
- package/button/styles/_index.scss +148 -125
- package/calendar/styles/_index.scss +252 -0
- package/calendar-heatmap/styles/_index.scss +69 -0
- package/card/card.scss +1 -0
- package/card/styles/_index.scss +96 -0
- package/carousel/styles/_index.scss +102 -0
- package/cascader/cascader.scss +1 -0
- package/cascader/styles/_index.scss +174 -0
- package/checkbox/styles/_index.scss +76 -60
- package/circular-text/circular-text.scss +1 -0
- package/circular-text/styles/_index.scss +45 -0
- package/click-spark/click-spark.scss +1 -0
- package/click-spark/styles/_index.scss +16 -0
- package/collapse/styles/_index.scss +92 -0
- package/color-picker/styles/_index.scss +247 -0
- package/command-palette/styles/_index.scss +188 -0
- package/compare/styles/_index.scss +100 -0
- package/context-menu/styles/_index.scss +112 -0
- package/counter/styles/_index.scss +44 -0
- package/date-picker/styles/_index.scss +204 -0
- package/decrypt-text/decrypt-text.scss +1 -0
- package/decrypt-text/styles/_index.scss +26 -0
- package/density/styles/_index.scss +37 -0
- package/descriptions/styles/_index.scss +104 -0
- package/dialog/styles/_index.scss +101 -27
- package/divider/styles/_index.scss +43 -24
- package/donut-chart/styles/_index.scss +76 -0
- package/drag-drop/sortable-list.scss +1 -0
- package/drag-drop/styles/_index.scss +99 -0
- package/drawer/styles/_index.scss +164 -0
- package/dropdown/styles/_index.scss +76 -56
- package/empty/styles/_index.scss +49 -0
- package/falling-text/falling-text.scss +1 -0
- package/falling-text/styles/_index.scss +30 -0
- package/fesm2022/ngwr-affix.mjs +102 -0
- package/fesm2022/ngwr-affix.mjs.map +1 -0
- package/fesm2022/ngwr-alert.mjs +70 -52
- package/fesm2022/ngwr-alert.mjs.map +1 -1
- package/fesm2022/ngwr-anchor.mjs +103 -0
- package/fesm2022/ngwr-anchor.mjs.map +1 -0
- package/fesm2022/ngwr-aurora.mjs +309 -0
- package/fesm2022/ngwr-aurora.mjs.map +1 -0
- package/fesm2022/ngwr-avatar.mjs +81 -71
- package/fesm2022/ngwr-avatar.mjs.map +1 -1
- package/fesm2022/ngwr-back-top.mjs +81 -0
- package/fesm2022/ngwr-back-top.mjs.map +1 -0
- package/fesm2022/ngwr-badge.mjs +192 -0
- package/fesm2022/ngwr-badge.mjs.map +1 -0
- package/fesm2022/ngwr-bar-chart.mjs +69 -0
- package/fesm2022/ngwr-bar-chart.mjs.map +1 -0
- package/fesm2022/ngwr-blur-text.mjs +181 -0
- package/fesm2022/ngwr-blur-text.mjs.map +1 -0
- package/fesm2022/ngwr-border-glow.mjs +278 -0
- package/fesm2022/ngwr-border-glow.mjs.map +1 -0
- package/fesm2022/ngwr-breadcrumbs.mjs +101 -0
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -0
- package/fesm2022/ngwr-burger.mjs +60 -0
- package/fesm2022/ngwr-burger.mjs.map +1 -0
- package/fesm2022/ngwr-button.mjs +179 -104
- package/fesm2022/ngwr-button.mjs.map +1 -1
- package/fesm2022/ngwr-calendar-heatmap.mjs +145 -0
- package/fesm2022/ngwr-calendar-heatmap.mjs.map +1 -0
- package/fesm2022/ngwr-calendar.mjs +402 -0
- package/fesm2022/ngwr-calendar.mjs.map +1 -0
- package/fesm2022/ngwr-card.mjs +100 -0
- package/fesm2022/ngwr-card.mjs.map +1 -0
- package/fesm2022/ngwr-carousel.mjs +128 -0
- package/fesm2022/ngwr-carousel.mjs.map +1 -0
- package/fesm2022/ngwr-cascader.mjs +280 -0
- package/fesm2022/ngwr-cascader.mjs.map +1 -0
- package/fesm2022/ngwr-checkbox.mjs +214 -54
- package/fesm2022/ngwr-checkbox.mjs.map +1 -1
- package/fesm2022/ngwr-circular-text.mjs +168 -0
- package/fesm2022/ngwr-circular-text.mjs.map +1 -0
- package/fesm2022/ngwr-click-spark.mjs +163 -0
- package/fesm2022/ngwr-click-spark.mjs.map +1 -0
- package/fesm2022/ngwr-clipboard.mjs +130 -0
- package/fesm2022/ngwr-clipboard.mjs.map +1 -0
- package/fesm2022/ngwr-collapse.mjs +232 -0
- package/fesm2022/ngwr-collapse.mjs.map +1 -0
- package/fesm2022/ngwr-color-picker.mjs +646 -0
- package/fesm2022/ngwr-color-picker.mjs.map +1 -0
- package/fesm2022/ngwr-command-palette.mjs +259 -0
- package/fesm2022/ngwr-command-palette.mjs.map +1 -0
- package/fesm2022/ngwr-compare.mjs +137 -0
- package/fesm2022/ngwr-compare.mjs.map +1 -0
- package/fesm2022/ngwr-confetti.mjs +160 -0
- package/fesm2022/ngwr-confetti.mjs.map +1 -0
- package/fesm2022/ngwr-context-menu.mjs +653 -0
- package/fesm2022/ngwr-context-menu.mjs.map +1 -0
- package/fesm2022/ngwr-cookie.mjs +127 -0
- package/fesm2022/ngwr-cookie.mjs.map +1 -0
- package/fesm2022/ngwr-counter.mjs +415 -0
- package/fesm2022/ngwr-counter.mjs.map +1 -0
- package/fesm2022/ngwr-date-adapter-fns.mjs +180 -0
- package/fesm2022/ngwr-date-adapter-fns.mjs.map +1 -0
- package/fesm2022/ngwr-date-adapter-luxon.mjs +201 -0
- package/fesm2022/ngwr-date-adapter-luxon.mjs.map +1 -0
- package/fesm2022/ngwr-date-adapter.mjs +419 -0
- package/fesm2022/ngwr-date-adapter.mjs.map +1 -0
- package/fesm2022/ngwr-date-picker.mjs +624 -0
- package/fesm2022/ngwr-date-picker.mjs.map +1 -0
- package/fesm2022/ngwr-decrypt-text.mjs +396 -0
- package/fesm2022/ngwr-decrypt-text.mjs.map +1 -0
- package/fesm2022/ngwr-density.mjs +157 -0
- package/fesm2022/ngwr-density.mjs.map +1 -0
- package/fesm2022/ngwr-descriptions.mjs +83 -0
- package/fesm2022/ngwr-descriptions.mjs.map +1 -0
- package/fesm2022/ngwr-dialog.mjs +249 -377
- package/fesm2022/ngwr-dialog.mjs.map +1 -1
- package/fesm2022/ngwr-directives.mjs +315 -0
- package/fesm2022/ngwr-directives.mjs.map +1 -0
- package/fesm2022/ngwr-divider.mjs +74 -59
- package/fesm2022/ngwr-divider.mjs.map +1 -1
- package/fesm2022/ngwr-donut-chart.mjs +131 -0
- package/fesm2022/ngwr-donut-chart.mjs.map +1 -0
- package/fesm2022/ngwr-drag-drop.mjs +117 -0
- package/fesm2022/ngwr-drag-drop.mjs.map +1 -0
- package/fesm2022/ngwr-drawer.mjs +315 -0
- package/fesm2022/ngwr-drawer.mjs.map +1 -0
- package/fesm2022/ngwr-dropdown.mjs +276 -229
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-empty.mjs +57 -0
- package/fesm2022/ngwr-empty.mjs.map +1 -0
- package/fesm2022/ngwr-falling-text.mjs +316 -0
- package/fesm2022/ngwr-falling-text.mjs.map +1 -0
- package/fesm2022/ngwr-file-upload.mjs +260 -0
- package/fesm2022/ngwr-file-upload.mjs.map +1 -0
- package/fesm2022/ngwr-form.mjs +133 -48
- package/fesm2022/ngwr-form.mjs.map +1 -1
- package/fesm2022/ngwr-fuzzy-text.mjs +373 -0
- package/fesm2022/ngwr-fuzzy-text.mjs.map +1 -0
- package/fesm2022/ngwr-gauge.mjs +83 -0
- package/fesm2022/ngwr-gauge.mjs.map +1 -0
- package/fesm2022/ngwr-glitch-text.mjs +67 -0
- package/fesm2022/ngwr-glitch-text.mjs.map +1 -0
- package/fesm2022/ngwr-gradient-text.mjs +109 -0
- package/fesm2022/ngwr-gradient-text.mjs.map +1 -0
- package/fesm2022/ngwr-hotkey.mjs +263 -0
- package/fesm2022/ngwr-hotkey.mjs.map +1 -0
- package/fesm2022/ngwr-i18n-en.mjs +168 -0
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -0
- package/fesm2022/ngwr-i18n-ru.mjs +156 -0
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -0
- package/fesm2022/ngwr-i18n.mjs +478 -0
- package/fesm2022/ngwr-i18n.mjs.map +1 -0
- package/fesm2022/ngwr-icon-adapters-feather.mjs +74 -0
- package/fesm2022/ngwr-icon-adapters-feather.mjs.map +1 -0
- package/fesm2022/ngwr-icon-adapters-lucide.mjs +88 -0
- package/fesm2022/ngwr-icon-adapters-lucide.mjs.map +1 -0
- package/fesm2022/ngwr-icon.mjs +189 -649
- package/fesm2022/ngwr-icon.mjs.map +1 -1
- package/fesm2022/ngwr-image-cropper.mjs +299 -0
- package/fesm2022/ngwr-image-cropper.mjs.map +1 -0
- package/fesm2022/ngwr-input-number.mjs +239 -0
- package/fesm2022/ngwr-input-number.mjs.map +1 -0
- package/fesm2022/ngwr-input-otp.mjs +216 -0
- package/fesm2022/ngwr-input-otp.mjs.map +1 -0
- package/fesm2022/ngwr-input.mjs +183 -104
- package/fesm2022/ngwr-input.mjs.map +1 -1
- package/fesm2022/ngwr-keyboard.mjs +47 -0
- package/fesm2022/ngwr-keyboard.mjs.map +1 -0
- package/fesm2022/ngwr-knob.mjs +227 -0
- package/fesm2022/ngwr-knob.mjs.map +1 -0
- package/fesm2022/ngwr-layout.mjs +197 -0
- package/fesm2022/ngwr-layout.mjs.map +1 -0
- package/fesm2022/ngwr-lightbox.mjs +131 -0
- package/fesm2022/ngwr-lightbox.mjs.map +1 -0
- package/fesm2022/ngwr-line-chart.mjs +176 -0
- package/fesm2022/ngwr-line-chart.mjs.map +1 -0
- package/fesm2022/ngwr-list.mjs +132 -0
- package/fesm2022/ngwr-list.mjs.map +1 -0
- package/fesm2022/ngwr-loading-bar.mjs +160 -0
- package/fesm2022/ngwr-loading-bar.mjs.map +1 -0
- package/fesm2022/ngwr-marquee.mjs +224 -0
- package/fesm2022/ngwr-marquee.mjs.map +1 -0
- package/fesm2022/ngwr-media.mjs +132 -0
- package/fesm2022/ngwr-media.mjs.map +1 -0
- package/fesm2022/ngwr-mention.mjs +374 -0
- package/fesm2022/ngwr-mention.mjs.map +1 -0
- package/fesm2022/ngwr-meta.mjs +323 -0
- package/fesm2022/ngwr-meta.mjs.map +1 -0
- package/fesm2022/ngwr-meter-group.mjs +73 -0
- package/fesm2022/ngwr-meter-group.mjs.map +1 -0
- package/fesm2022/ngwr-overlay.mjs +145 -0
- package/fesm2022/ngwr-overlay.mjs.map +1 -0
- package/fesm2022/ngwr-page-header.mjs +53 -0
- package/fesm2022/ngwr-page-header.mjs.map +1 -0
- package/fesm2022/ngwr-pagination.mjs +152 -96
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-pipes.mjs +290 -11
- package/fesm2022/ngwr-pipes.mjs.map +1 -1
- package/fesm2022/ngwr-platform.mjs +63 -0
- package/fesm2022/ngwr-platform.mjs.map +1 -0
- package/fesm2022/ngwr-popconfirm.mjs +188 -0
- package/fesm2022/ngwr-popconfirm.mjs.map +1 -0
- package/fesm2022/ngwr-popover.mjs +365 -0
- package/fesm2022/ngwr-popover.mjs.map +1 -0
- package/fesm2022/ngwr-progress.mjs +47 -39
- package/fesm2022/ngwr-progress.mjs.map +1 -1
- package/fesm2022/ngwr-qr.mjs +160 -179
- package/fesm2022/ngwr-qr.mjs.map +1 -1
- package/fesm2022/ngwr-radio.mjs +204 -0
- package/fesm2022/ngwr-radio.mjs.map +1 -0
- package/fesm2022/ngwr-rating.mjs +180 -0
- package/fesm2022/ngwr-rating.mjs.map +1 -0
- package/fesm2022/ngwr-result.mjs +119 -0
- package/fesm2022/ngwr-result.mjs.map +1 -0
- package/fesm2022/ngwr-rotating-text.mjs +256 -0
- package/fesm2022/ngwr-rotating-text.mjs.map +1 -0
- package/fesm2022/ngwr-scramble-text.mjs +165 -0
- package/fesm2022/ngwr-scramble-text.mjs.map +1 -0
- package/fesm2022/ngwr-scroll.mjs +107 -0
- package/fesm2022/ngwr-scroll.mjs.map +1 -0
- package/fesm2022/ngwr-segmented.mjs +96 -0
- package/fesm2022/ngwr-segmented.mjs.map +1 -0
- package/fesm2022/ngwr-select.mjs +844 -309
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-shiny-text.mjs +127 -0
- package/fesm2022/ngwr-shiny-text.mjs.map +1 -0
- package/fesm2022/ngwr-sidebar.mjs +134 -0
- package/fesm2022/ngwr-sidebar.mjs.map +1 -0
- package/fesm2022/ngwr-skeleton.mjs +59 -34
- package/fesm2022/ngwr-skeleton.mjs.map +1 -1
- package/fesm2022/ngwr-slider.mjs +234 -0
- package/fesm2022/ngwr-slider.mjs.map +1 -0
- package/fesm2022/ngwr-sparkline.mjs +104 -0
- package/fesm2022/ngwr-sparkline.mjs.map +1 -0
- package/fesm2022/ngwr-speed-dial.mjs +79 -0
- package/fesm2022/ngwr-speed-dial.mjs.map +1 -0
- package/fesm2022/ngwr-spinner.mjs +34 -28
- package/fesm2022/ngwr-spinner.mjs.map +1 -1
- package/fesm2022/ngwr-splash-cursor.mjs +970 -0
- package/fesm2022/ngwr-splash-cursor.mjs.map +1 -0
- package/fesm2022/ngwr-split-text.mjs +200 -0
- package/fesm2022/ngwr-split-text.mjs.map +1 -0
- package/fesm2022/ngwr-splitter.mjs +125 -0
- package/fesm2022/ngwr-splitter.mjs.map +1 -0
- package/fesm2022/ngwr-spotlight-card.mjs +138 -0
- package/fesm2022/ngwr-spotlight-card.mjs.map +1 -0
- package/fesm2022/ngwr-squircle.mjs +320 -0
- package/fesm2022/ngwr-squircle.mjs.map +1 -0
- package/fesm2022/ngwr-star-border.mjs +72 -0
- package/fesm2022/ngwr-star-border.mjs.map +1 -0
- package/fesm2022/ngwr-statistic.mjs +220 -0
- package/fesm2022/ngwr-statistic.mjs.map +1 -0
- package/fesm2022/ngwr-stepper.mjs +186 -0
- package/fesm2022/ngwr-stepper.mjs.map +1 -0
- package/fesm2022/ngwr-storage.mjs +317 -0
- package/fesm2022/ngwr-storage.mjs.map +1 -0
- package/fesm2022/ngwr-switch.mjs +99 -0
- package/fesm2022/ngwr-switch.mjs.map +1 -0
- package/fesm2022/ngwr-table.mjs +217 -206
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-tabs.mjs +217 -0
- package/fesm2022/ngwr-tabs.mjs.map +1 -0
- package/fesm2022/ngwr-textarea.mjs +106 -120
- package/fesm2022/ngwr-textarea.mjs.map +1 -1
- package/fesm2022/ngwr-theme.mjs +152 -0
- package/fesm2022/ngwr-theme.mjs.map +1 -0
- package/fesm2022/ngwr-tilt-card.mjs +137 -0
- package/fesm2022/ngwr-tilt-card.mjs.map +1 -0
- package/fesm2022/ngwr-timeline.mjs +73 -0
- package/fesm2022/ngwr-timeline.mjs.map +1 -0
- package/fesm2022/ngwr-toast.mjs +446 -0
- package/fesm2022/ngwr-toast.mjs.map +1 -0
- package/fesm2022/ngwr-toolbar.mjs +46 -0
- package/fesm2022/ngwr-toolbar.mjs.map +1 -0
- package/fesm2022/ngwr-tree.mjs +483 -0
- package/fesm2022/ngwr-tree.mjs.map +1 -0
- package/fesm2022/ngwr-typewriter.mjs +229 -0
- package/fesm2022/ngwr-typewriter.mjs.map +1 -0
- package/fesm2022/ngwr-typography.mjs +79 -0
- package/fesm2022/ngwr-typography.mjs.map +1 -0
- package/fesm2022/ngwr-utils.mjs +535 -0
- package/fesm2022/ngwr-utils.mjs.map +1 -0
- package/fesm2022/ngwr-validators.mjs +214 -0
- package/fesm2022/ngwr-validators.mjs.map +1 -0
- package/fesm2022/ngwr-version.mjs +51 -0
- package/fesm2022/ngwr-version.mjs.map +1 -0
- package/fesm2022/ngwr-virtual-scroll.mjs +99 -0
- package/fesm2022/ngwr-virtual-scroll.mjs.map +1 -0
- package/fesm2022/ngwr-waves.mjs +356 -0
- package/fesm2022/ngwr-waves.mjs.map +1 -0
- package/fesm2022/ngwr-window.mjs +1141 -0
- package/fesm2022/ngwr-window.mjs.map +1 -0
- package/fesm2022/ngwr.mjs +0 -3
- package/fesm2022/ngwr.mjs.map +1 -1
- package/file-upload/styles/_index.scss +152 -0
- package/form/styles/_index.scss +85 -42
- package/gauge/styles/_index.scss +37 -0
- package/glitch-text/glitch-text.scss +1 -0
- package/glitch-text/styles/_index.scss +144 -0
- package/gradient-text/gradient-text.scss +1 -0
- package/gradient-text/styles/_index.scss +113 -0
- package/icon/styles/_index.scss +21 -15
- package/image-cropper/styles/_index.scss +114 -0
- package/input/styles/_index.scss +133 -93
- package/input-number/styles/_index.scss +75 -0
- package/input-otp/styles/_index.scss +53 -0
- package/keyboard/styles/_index.scss +55 -0
- package/knob/styles/_index.scss +54 -0
- package/layout/styles/_index.scss +65 -0
- package/lightbox/lightbox.scss +1 -0
- package/lightbox/styles/_index.scss +144 -0
- package/line-chart/styles/_index.scss +93 -0
- package/list/list.scss +1 -0
- package/list/styles/_index.scss +101 -0
- package/loading-bar/loading-bar.scss +1 -0
- package/loading-bar/styles/_index.scss +29 -0
- package/marquee/marquee.scss +1 -0
- package/marquee/styles/_index.scss +138 -0
- package/mention/styles/_index.scss +47 -0
- package/meter-group/styles/_index.scss +61 -0
- package/package.json +586 -104
- package/page-header/styles/_index.scss +78 -0
- package/pagination/styles/_index.scss +89 -34
- package/popconfirm/styles/_index.scss +32 -0
- package/popover/styles/_index.scss +99 -0
- package/progress/styles/_index.scss +29 -14
- package/qr/styles/_index.scss +6 -3
- package/radio/styles/_index.scss +111 -0
- package/rating/styles/_index.scss +63 -0
- package/result/styles/_index.scss +69 -0
- package/rotating-text/rotating-text.scss +1 -0
- package/rotating-text/styles/_index.scss +39 -0
- package/schematics/collection.json +37 -0
- package/schematics/component-style/index.js +49 -0
- package/{cdk/utils/index.d.ts → schematics/component-style/schema.js} +2 -8
- package/schematics/component-style/schema.json +20 -0
- package/schematics/icon-set/index.js +96 -0
- package/schematics/icon-set/schema.js +8 -0
- package/schematics/icon-set/schema.json +39 -0
- package/schematics/migrations/v7/index.js +187 -0
- package/schematics/migrations.json +10 -0
- package/schematics/ng-add/index.js +180 -0
- package/schematics/ng-add/schema.js +8 -0
- package/schematics/ng-add/schema.json +80 -0
- package/schematics/page/index.js +63 -0
- package/schematics/page/schema.js +8 -0
- package/schematics/page/schema.json +39 -0
- package/schematics/page/templates.js +198 -0
- package/schematics/provider/index.js +126 -0
- package/schematics/provider/schema.js +8 -0
- package/schematics/provider/schema.json +52 -0
- package/schematics/use/index.js +143 -0
- package/schematics/use/schema.js +8 -0
- package/schematics/use/schema.json +25 -0
- package/schematics/use/symbol-map.json +357 -0
- package/scramble-text/scramble-text.scss +1 -0
- package/scramble-text/styles/_index.scss +8 -0
- package/segmented/styles/_index.scss +92 -0
- package/select/styles/_index.scss +245 -159
- package/shiny-text/shiny-text.scss +1 -0
- package/shiny-text/styles/_index.scss +101 -0
- package/sidebar/styles/_index.scss +208 -0
- package/skeleton/styles/_index.scss +33 -33
- package/slider/styles/_index.scss +77 -0
- package/sparkline/styles/_index.scss +9 -0
- package/speed-dial/styles/_index.scss +158 -0
- package/spinner/styles/_index.scss +38 -22
- package/splash-cursor/splash-cursor.scss +1 -0
- package/splash-cursor/styles/_index.scss +27 -0
- package/split-text/split-text.scss +1 -0
- package/split-text/styles/_index.scss +22 -0
- package/splitter/styles/_index.scss +85 -0
- package/spotlight-card/spotlight-card.scss +1 -0
- package/spotlight-card/styles/_index.scss +43 -0
- package/squircle/styles/_index.scss +34 -0
- package/star-border/star-border.scss +1 -0
- package/star-border/styles/_index.scss +118 -0
- package/statistic/styles/_index.scss +54 -0
- package/stepper/styles/_index.scss +162 -0
- package/styles/_animations.scss +198 -0
- package/styles/_breakpoints.scss +75 -0
- package/styles/_grid.scss +71 -0
- package/styles/_reset.scss +123 -0
- package/styles/_typography.scss +122 -0
- package/styles.scss +103 -13
- package/switch/styles/_index.scss +82 -0
- package/table/styles/_index.scss +255 -4
- package/tabs/styles/_index.scss +71 -0
- package/textarea/styles/_index.scss +47 -56
- package/theme/styles/_colors.scss +83 -0
- package/theme/styles/_dark.scss +85 -0
- package/theme/styles/_focus.scss +93 -0
- package/theme/styles/_index.scss +5 -0
- package/theme/styles/_mixins.scss +57 -0
- package/theme/styles/_variables.scss +118 -0
- package/tilt-card/styles/_index.scss +40 -0
- package/tilt-card/tilt-card.scss +1 -0
- package/timeline/styles/_index.scss +127 -0
- package/toast/styles/_index.scss +263 -0
- package/toolbar/styles/_index.scss +65 -0
- package/tree/styles/_index.scss +271 -0
- package/types/ngwr-affix.d.ts +43 -0
- package/types/ngwr-alert.d.ts +68 -0
- package/types/ngwr-anchor.d.ts +53 -0
- package/types/ngwr-aurora.d.ts +52 -0
- package/types/ngwr-avatar.d.ts +90 -0
- package/types/ngwr-back-top.d.ts +37 -0
- package/types/ngwr-badge.d.ts +158 -0
- package/types/ngwr-bar-chart.d.ts +47 -0
- package/types/ngwr-blur-text.d.ts +62 -0
- package/types/ngwr-border-glow.d.ts +66 -0
- package/types/ngwr-breadcrumbs.d.ts +61 -0
- package/types/ngwr-burger.d.ts +36 -0
- package/types/ngwr-button.d.ts +176 -0
- package/types/ngwr-calendar-heatmap.d.ts +58 -0
- package/types/ngwr-calendar.d.ts +116 -0
- package/types/ngwr-card.d.ts +50 -0
- package/types/ngwr-carousel.d.ts +57 -0
- package/types/ngwr-cascader.d.ts +107 -0
- package/types/ngwr-checkbox.d.ts +139 -0
- package/types/ngwr-circular-text.d.ts +49 -0
- package/types/ngwr-click-spark.d.ts +52 -0
- package/types/ngwr-clipboard.d.ts +53 -0
- package/types/ngwr-collapse.d.ts +139 -0
- package/types/ngwr-color-picker.d.ts +302 -0
- package/types/ngwr-command-palette.d.ts +113 -0
- package/types/ngwr-compare.d.ts +55 -0
- package/types/ngwr-confetti.d.ts +70 -0
- package/types/ngwr-context-menu.d.ts +207 -0
- package/types/ngwr-cookie.d.ts +60 -0
- package/types/ngwr-counter.d.ts +182 -0
- package/types/ngwr-date-adapter-fns.d.ts +73 -0
- package/types/ngwr-date-adapter-luxon.d.ts +73 -0
- package/types/ngwr-date-adapter.d.ts +198 -0
- package/types/ngwr-date-picker.d.ts +117 -0
- package/types/ngwr-decrypt-text.d.ts +85 -0
- package/types/ngwr-density.d.ts +97 -0
- package/types/ngwr-descriptions.d.ts +41 -0
- package/types/ngwr-dialog.d.ts +210 -0
- package/types/ngwr-directives.d.ts +125 -0
- package/types/ngwr-divider.d.ts +73 -0
- package/types/ngwr-donut-chart.d.ts +53 -0
- package/types/ngwr-drag-drop.d.ts +83 -0
- package/types/ngwr-drawer.d.ts +155 -0
- package/types/ngwr-dropdown.d.ts +124 -0
- package/types/ngwr-empty.d.ts +38 -0
- package/types/ngwr-falling-text.d.ts +63 -0
- package/types/ngwr-file-upload.d.ts +94 -0
- package/types/ngwr-form.d.ts +95 -0
- package/types/ngwr-fuzzy-text.d.ts +74 -0
- package/types/ngwr-gauge.d.ts +39 -0
- package/types/ngwr-glitch-text.d.ts +31 -0
- package/types/ngwr-gradient-text.d.ts +46 -0
- package/types/ngwr-hotkey.d.ts +142 -0
- package/types/ngwr-i18n-en.d.ts +18 -0
- package/types/ngwr-i18n-ru.d.ts +6 -0
- package/types/ngwr-i18n.d.ts +336 -0
- package/types/ngwr-icon-adapters-feather.d.ts +44 -0
- package/types/ngwr-icon-adapters-lucide.d.ts +54 -0
- package/types/ngwr-icon.d.ts +180 -0
- package/types/ngwr-image-cropper.d.ts +110 -0
- package/types/ngwr-input-number.d.ts +77 -0
- package/types/ngwr-input-otp.d.ts +78 -0
- package/types/ngwr-input.d.ts +131 -0
- package/types/ngwr-keyboard.d.ts +34 -0
- package/types/ngwr-knob.d.ts +77 -0
- package/types/ngwr-layout.d.ts +89 -0
- package/types/ngwr-lightbox.d.ts +50 -0
- package/types/ngwr-line-chart.d.ts +90 -0
- package/types/ngwr-list.d.ts +71 -0
- package/types/ngwr-loading-bar.d.ts +79 -0
- package/types/ngwr-marquee.d.ts +95 -0
- package/types/ngwr-media.d.ts +74 -0
- package/types/ngwr-mention.d.ts +110 -0
- package/types/ngwr-meta.d.ts +188 -0
- package/types/ngwr-meter-group.d.ts +57 -0
- package/types/ngwr-overlay.d.ts +110 -0
- package/types/ngwr-page-header.d.ts +35 -0
- package/types/ngwr-pagination.d.ts +119 -0
- package/types/ngwr-pipes.d.ts +177 -0
- package/types/ngwr-platform.d.ts +38 -0
- package/types/ngwr-popconfirm.d.ts +79 -0
- package/types/ngwr-popover.d.ts +90 -0
- package/types/ngwr-progress.d.ts +33 -0
- package/types/ngwr-qr.d.ts +56 -0
- package/types/ngwr-radio.d.ts +120 -0
- package/types/ngwr-rating.d.ts +62 -0
- package/types/ngwr-result.d.ts +64 -0
- package/types/ngwr-rotating-text.d.ts +72 -0
- package/types/ngwr-scramble-text.d.ts +49 -0
- package/types/ngwr-scroll.d.ts +65 -0
- package/types/ngwr-segmented.d.ts +65 -0
- package/types/ngwr-select.d.ts +413 -0
- package/types/ngwr-shiny-text.d.ts +70 -0
- package/types/ngwr-sidebar.d.ts +83 -0
- package/types/ngwr-skeleton.d.ts +41 -0
- package/types/ngwr-slider.d.ts +86 -0
- package/types/ngwr-sparkline.d.ts +48 -0
- package/types/ngwr-speed-dial.d.ts +51 -0
- package/types/ngwr-spinner.d.ts +41 -0
- package/types/ngwr-splash-cursor.d.ts +94 -0
- package/types/ngwr-split-text.d.ts +83 -0
- package/types/ngwr-splitter.d.ts +52 -0
- package/types/ngwr-spotlight-card.d.ts +71 -0
- package/types/ngwr-squircle.d.ts +132 -0
- package/types/ngwr-star-border.d.ts +40 -0
- package/types/ngwr-statistic.d.ts +88 -0
- package/types/ngwr-stepper.d.ts +99 -0
- package/types/ngwr-storage.d.ts +178 -0
- package/types/ngwr-switch.d.ts +39 -0
- package/types/ngwr-table.d.ts +237 -0
- package/types/ngwr-tabs.d.ts +125 -0
- package/types/ngwr-textarea.d.ts +60 -0
- package/types/ngwr-theme.d.ts +124 -0
- package/types/ngwr-tilt-card.d.ts +63 -0
- package/types/ngwr-timeline.d.ts +40 -0
- package/types/ngwr-toast.d.ts +230 -0
- package/types/ngwr-toolbar.d.ts +30 -0
- package/types/ngwr-tree.d.ts +150 -0
- package/types/ngwr-typewriter.d.ts +84 -0
- package/types/ngwr-typography.d.ts +56 -0
- package/types/ngwr-utils.d.ts +447 -0
- package/types/ngwr-validators.d.ts +70 -0
- package/types/ngwr-version.d.ts +44 -0
- package/types/ngwr-virtual-scroll.d.ts +64 -0
- package/types/ngwr-waves.d.ts +71 -0
- package/types/ngwr-window.d.ts +437 -0
- package/typewriter/styles/_index.scss +33 -0
- package/typewriter/typewriter.scss +1 -0
- package/typography/styles/_index.scss +211 -0
- package/virtual-scroll/styles/_index.scss +27 -0
- package/virtual-scroll/virtual-scroll.scss +1 -0
- package/waves/styles/_index.scss +24 -0
- package/waves/waves.scss +1 -0
- package/window/styles/_index.scss +430 -0
- package/alert/index.d.ts +0 -32
- package/alert/styles/theming.scss +0 -26
- package/alert/styles/vars.scss +0 -11
- package/avatar/index.d.ts +0 -30
- package/button/index.d.ts +0 -45
- package/button/styles/vars.scss +0 -13
- package/cdk/index.d.ts +0 -24
- package/cdk/rxjs/index.d.ts +0 -40
- package/cdk/types/index.d.ts +0 -27
- package/checkbox/index.d.ts +0 -31
- package/checkbox/styles/vars.scss +0 -16
- package/dialog/index.d.ts +0 -193
- package/dialog/styles/vars.scss +0 -7
- package/divider/index.d.ts +0 -16
- package/dropdown/index.d.ts +0 -68
- package/dropdown/styles/vars.scss +0 -18
- package/fesm2022/ngwr-cdk-rxjs.mjs +0 -53
- package/fesm2022/ngwr-cdk-rxjs.mjs.map +0 -1
- package/fesm2022/ngwr-cdk-types.mjs +0 -44
- package/fesm2022/ngwr-cdk-types.mjs.map +0 -1
- package/fesm2022/ngwr-cdk-utils.mjs +0 -30
- package/fesm2022/ngwr-cdk-utils.mjs.map +0 -1
- package/fesm2022/ngwr-cdk.mjs +0 -46
- package/fesm2022/ngwr-cdk.mjs.map +0 -1
- package/fesm2022/ngwr-tag.mjs +0 -87
- package/fesm2022/ngwr-tag.mjs.map +0 -1
- package/form/index.d.ts +0 -28
- package/icon/index.d.ts +0 -830
- package/icon/styles/vars.scss +0 -3
- package/input/index.d.ts +0 -43
- package/input/styles/vars.scss +0 -17
- package/pagination/index.d.ts +0 -34
- package/pagination/styles/vars.scss +0 -14
- package/pipes/index.d.ts +0 -17
- package/progress/index.d.ts +0 -13
- package/progress/styles/theming.scss +0 -8
- package/progress/styles/vars.scss +0 -6
- package/qr/index.d.ts +0 -127
- package/select/index.d.ts +0 -121
- package/select/styles/vars.scss +0 -32
- package/skeleton/index.d.ts +0 -13
- package/spinner/index.d.ts +0 -23
- package/styles/animations.scss +0 -92
- package/styles/cdk.scss +0 -5
- package/styles/colors.scss +0 -72
- package/styles/grid.scss +0 -99
- package/styles/maps.scss +0 -31
- package/styles/reset.scss +0 -112
- package/styles/variables.scss +0 -72
- package/table/index.d.ts +0 -101
- package/table/styles/table-filter.scss +0 -202
- package/table/styles/table-sort.scss +0 -47
- package/table/styles/table.scss +0 -232
- package/table/styles/vars.scss +0 -21
- package/tag/index.d.ts +0 -24
- package/tag/styles/_index.scss +0 -32
- package/tag/styles/theming.scss +0 -21
- package/tag/styles/vars.scss +0 -12
- package/textarea/index.d.ts +0 -47
- package/textarea/styles/vars.scss +0 -17
- /package/{index.d.ts → types/ngwr.d.ts} +0 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Semicircle progress gauge. Display-only — for interactive use see the
|
|
5
|
+
* {@link WrKnob} from `ngwr/knob`.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```html
|
|
9
|
+
* <wr-gauge [value]="72" />
|
|
10
|
+
* <wr-gauge [value]="9.5" [min]="0" [max]="10" suffix="/10" valueColor="var(--wr-color-warning)" />
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* @see https://ngwr.dev/components/gauge
|
|
14
|
+
*/
|
|
15
|
+
declare class WrGauge {
|
|
16
|
+
readonly value: _angular_core.InputSignal<number>;
|
|
17
|
+
readonly min: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
18
|
+
readonly max: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
19
|
+
/** Diameter in CSS pixels. @default 160 */
|
|
20
|
+
readonly size: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
21
|
+
/** Arc stroke thickness in viewBox units (out of 100). @default 10 */
|
|
22
|
+
readonly strokeWidth: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
23
|
+
readonly trackColor: _angular_core.InputSignal<string>;
|
|
24
|
+
readonly valueColor: _angular_core.InputSignal<string>;
|
|
25
|
+
/** Show the value text in the center. @default true */
|
|
26
|
+
readonly showValue: _angular_core.InputSignalWithTransform<boolean, any>;
|
|
27
|
+
readonly suffix: _angular_core.InputSignal<string>;
|
|
28
|
+
protected readonly cx = 50;
|
|
29
|
+
protected readonly cy = 50;
|
|
30
|
+
protected readonly radius: _angular_core.Signal<number>;
|
|
31
|
+
protected readonly ratio: _angular_core.Signal<number>;
|
|
32
|
+
protected readonly trackPath: _angular_core.Signal<string>;
|
|
33
|
+
protected readonly valuePath: _angular_core.Signal<string>;
|
|
34
|
+
protected readonly viewBox = "0 0 100 56";
|
|
35
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrGauge, never>;
|
|
36
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrGauge, "wr-gauge", never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "strokeWidth": { "alias": "strokeWidth"; "required": false; "isSignal": true; }; "trackColor": { "alias": "trackColor"; "required": false; "isSignal": true; }; "valueColor": { "alias": "valueColor"; "required": false; "isSignal": true; }; "showValue": { "alias": "showValue"; "required": false; "isSignal": true; }; "suffix": { "alias": "suffix"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export { WrGauge };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Glitchy text effect — colour-split horizontal-tear glitch on the
|
|
5
|
+
* provided text. Defaults to playing constantly; toggle `[enableOnHover]`
|
|
6
|
+
* to make it idle until the user hovers.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```html
|
|
10
|
+
* <wr-glitch-text text="404" />
|
|
11
|
+
* <wr-glitch-text text="ERROR" [speed]="0.5" [enableOnHover]="true" />
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* @see https://www.reactbits.dev/text-animations/glitch-text
|
|
15
|
+
*/
|
|
16
|
+
declare class WrGlitchText {
|
|
17
|
+
/** Text to glitch. Required — the value populates `data-text` for the pseudo clones. */
|
|
18
|
+
readonly text: _angular_core.InputSignal<string>;
|
|
19
|
+
/** Time multiplier — higher = slower glitching. @default 1 */
|
|
20
|
+
readonly speed: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
21
|
+
/** Show the red / cyan colour-split shadows. @default true */
|
|
22
|
+
readonly enableShadows: _angular_core.InputSignalWithTransform<boolean, any>;
|
|
23
|
+
/** Only glitch on hover (idle until then). @default true */
|
|
24
|
+
readonly enableOnHover: _angular_core.InputSignalWithTransform<boolean, any>;
|
|
25
|
+
protected readonly beforeShadow: _angular_core.Signal<"5px 0 cyan" | "none">;
|
|
26
|
+
protected readonly afterShadow: _angular_core.Signal<"none" | "-5px 0 red">;
|
|
27
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrGlitchText, never>;
|
|
28
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrGlitchText, "wr-glitch-text", never, { "text": { "alias": "text"; "required": true; "isSignal": true; }; "speed": { "alias": "speed"; "required": false; "isSignal": true; }; "enableShadows": { "alias": "enableShadows"; "required": false; "isSignal": true; }; "enableOnHover": { "alias": "enableOnHover"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export { WrGlitchText };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
|
|
3
|
+
type WrGradientTextDirection = 'horizontal' | 'vertical' | 'diagonal';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Animated multi-stop gradient text. The gradient slides across the text
|
|
7
|
+
* via `background-clip: text`. Optional `[showBorder]` wraps the text in
|
|
8
|
+
* a dark pill with the same animated gradient as a border ring.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```html
|
|
12
|
+
* <wr-gradient-text>Hello, ngwr!</wr-gradient-text>
|
|
13
|
+
* <wr-gradient-text
|
|
14
|
+
* [colors]="['#5227FF', '#FF9FFC', '#B497CF']"
|
|
15
|
+
* direction="diagonal"
|
|
16
|
+
* [animationSpeed]="6"
|
|
17
|
+
* [showBorder]="true"
|
|
18
|
+
* >
|
|
19
|
+
* Premium feature
|
|
20
|
+
* </wr-gradient-text>
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* @see https://www.reactbits.dev/text-animations/gradient-text
|
|
24
|
+
*/
|
|
25
|
+
declare class WrGradientText {
|
|
26
|
+
/** Gradient stops. @default ['#5227FF', '#FF9FFC', '#B497CF'] */
|
|
27
|
+
readonly colors: _angular_core.InputSignal<readonly string[]>;
|
|
28
|
+
/** Seconds per full sweep (or per half if `[yoyo]` is on). @default 8 */
|
|
29
|
+
readonly animationSpeed: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
30
|
+
/** Wrap the text in a dark pill with the gradient as a border. @default false */
|
|
31
|
+
readonly showBorder: _angular_core.InputSignalWithTransform<boolean, any>;
|
|
32
|
+
/** Gradient slide direction. @default 'horizontal' */
|
|
33
|
+
readonly direction: _angular_core.InputSignal<WrGradientTextDirection>;
|
|
34
|
+
/** Pause the animation while hovered. @default false */
|
|
35
|
+
readonly pauseOnHover: _angular_core.InputSignalWithTransform<boolean, any>;
|
|
36
|
+
/** Bounce back-and-forth instead of restarting. @default true */
|
|
37
|
+
readonly yoyo: _angular_core.InputSignalWithTransform<boolean, any>;
|
|
38
|
+
protected readonly gradient: _angular_core.Signal<string>;
|
|
39
|
+
protected readonly size: _angular_core.Signal<"100% 300%" | "300% 300%" | "300% 100%">;
|
|
40
|
+
private directionAngle;
|
|
41
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrGradientText, never>;
|
|
42
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrGradientText, "wr-gradient-text", never, { "colors": { "alias": "colors"; "required": false; "isSignal": true; }; "animationSpeed": { "alias": "animationSpeed"; "required": false; "isSignal": true; }; "showBorder": { "alias": "showBorder"; "required": false; "isSignal": true; }; "direction": { "alias": "direction"; "required": false; "isSignal": true; }; "pauseOnHover": { "alias": "pauseOnHover"; "required": false; "isSignal": true; }; "yoyo": { "alias": "yoyo"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { WrGradientText };
|
|
46
|
+
export type { WrGradientTextDirection };
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
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
|
+
* A keybinding specification — `'+'` separated tokens, case-insensitive.
|
|
11
|
+
* Modifiers: `ctrl`, `alt`, `shift`, `meta`, `cmd` (alias for `meta`),
|
|
12
|
+
* `mod` (auto: `cmd` on macOS, `ctrl` elsewhere). Last token is the key.
|
|
13
|
+
*
|
|
14
|
+
* Examples: `'ctrl+k'`, `'cmd+shift+p'`, `'escape'`, `'mod+/'`, `'ArrowDown'`.
|
|
15
|
+
*/
|
|
16
|
+
type WrHotkeySpec = string;
|
|
17
|
+
/** Returned by {@link WrHotkey.bind} — call `.unbind()` to remove. */
|
|
18
|
+
interface WrHotkeyHandle {
|
|
19
|
+
readonly unbind: () => void;
|
|
20
|
+
}
|
|
21
|
+
/** Options accepted by {@link WrHotkey.bind}. */
|
|
22
|
+
interface WrHotkeyOptions {
|
|
23
|
+
/**
|
|
24
|
+
* Scope the listener to a specific element instead of `document`. The
|
|
25
|
+
* element must be focusable (or contain the focus) for the binding to
|
|
26
|
+
* fire — usually combined with `tabindex="0"` on the host.
|
|
27
|
+
*/
|
|
28
|
+
readonly element?: HTMLElement;
|
|
29
|
+
/** Call `event.preventDefault()` when the binding matches. @default true */
|
|
30
|
+
readonly preventDefault?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Fire even when an input / textarea / contenteditable element has
|
|
33
|
+
* focus. By default these are skipped so the user can type normally.
|
|
34
|
+
* @default false
|
|
35
|
+
*/
|
|
36
|
+
readonly allowInInput?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Higher priority bindings fire first. Bindings sharing a key dispatch
|
|
39
|
+
* in priority order; the lower-priority ones are skipped when the
|
|
40
|
+
* handler calls `event.preventDefault()`. @default 0
|
|
41
|
+
*/
|
|
42
|
+
readonly priority?: number;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Global keybinding registry.
|
|
47
|
+
*
|
|
48
|
+
* Bindings are keyed off `KeyboardEvent.key` + modifier state. Multiple
|
|
49
|
+
* handlers per chord fire in priority order; a handler that calls
|
|
50
|
+
* `event.preventDefault()` stops lower-priority bindings on that key.
|
|
51
|
+
*
|
|
52
|
+
* The listener runs outside Angular — only matched bindings re-enter
|
|
53
|
+
* the zone, so an idle page doesn't trigger CD on every keystroke.
|
|
54
|
+
*
|
|
55
|
+
* Use `[wrHotkey]` for declarative element-scoped bindings.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```ts
|
|
59
|
+
* const hotkeys = inject(WrHotkey);
|
|
60
|
+
* const handle = hotkeys.bind('mod+k', () => openCommandPalette());
|
|
61
|
+
* // ...later
|
|
62
|
+
* handle.unbind();
|
|
63
|
+
* ```
|
|
64
|
+
*
|
|
65
|
+
* @see https://ngwr.dev/services/hotkey
|
|
66
|
+
*/
|
|
67
|
+
declare class WrHotkey {
|
|
68
|
+
private readonly doc;
|
|
69
|
+
private readonly zone;
|
|
70
|
+
private readonly platform;
|
|
71
|
+
private readonly isMac;
|
|
72
|
+
/** Bindings grouped by listener target. */
|
|
73
|
+
private readonly registries;
|
|
74
|
+
/** Register a binding. */
|
|
75
|
+
bind(spec: WrHotkeySpec, handler: (event: KeyboardEvent) => void, options?: WrHotkeyOptions): WrHotkeyHandle;
|
|
76
|
+
private readonly listeners;
|
|
77
|
+
private attach;
|
|
78
|
+
private detach;
|
|
79
|
+
private dispatch;
|
|
80
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrHotkey, never>;
|
|
81
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<WrHotkey>;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Declarative wrapper around {@link WrHotkey}.
|
|
86
|
+
*
|
|
87
|
+
* Binds on init (and re-binds when the spec changes), unbinds on destroy.
|
|
88
|
+
* Defaults to global scope so the binding works regardless of focus —
|
|
89
|
+
* pass `[scoped]="true"` to limit it to the host element.
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* ```html
|
|
93
|
+
* <button (wrHotkeyMatch)="open()" [wrHotkey]="'mod+k'">Open palette</button>
|
|
94
|
+
* <div tabindex="0" [wrHotkey]="'escape'" [scoped]="true" (wrHotkeyMatch)="close()">…</div>
|
|
95
|
+
* ```
|
|
96
|
+
*/
|
|
97
|
+
declare class WrHotkeyBinding {
|
|
98
|
+
readonly wrHotkey: _angular_core.InputSignal<string>;
|
|
99
|
+
/** Scope the binding to the host element instead of `document`. @default false */
|
|
100
|
+
readonly scoped: _angular_core.InputSignalWithTransform<boolean, any>;
|
|
101
|
+
/** Fire even when an input / textarea has focus. @default false */
|
|
102
|
+
readonly allowInInput: _angular_core.InputSignalWithTransform<boolean, any>;
|
|
103
|
+
/** Suppress the default action when the binding fires. @default true */
|
|
104
|
+
readonly preventDefault: _angular_core.InputSignalWithTransform<boolean, any>;
|
|
105
|
+
/** Emits the original KeyboardEvent on match. */
|
|
106
|
+
readonly wrHotkeyMatch: _angular_core.OutputEmitterRef<KeyboardEvent>;
|
|
107
|
+
private readonly hotkeys;
|
|
108
|
+
private readonly host;
|
|
109
|
+
private handle;
|
|
110
|
+
constructor();
|
|
111
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrHotkeyBinding, never>;
|
|
112
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<WrHotkeyBinding, "[wrHotkey]", never, { "wrHotkey": { "alias": "wrHotkey"; "required": true; "isSignal": true; }; "scoped": { "alias": "scoped"; "required": false; "isSignal": true; }; "allowInInput": { "alias": "allowInInput"; "required": false; "isSignal": true; }; "preventDefault": { "alias": "preventDefault"; "required": false; "isSignal": true; }; }, { "wrHotkeyMatch": "wrHotkeyMatch"; }, never, never, true, never>;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* @license
|
|
117
|
+
*
|
|
118
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
119
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
120
|
+
*/
|
|
121
|
+
|
|
122
|
+
/** Normalised representation of a hotkey spec — easy to match against an event. */
|
|
123
|
+
interface WrParsedHotkey {
|
|
124
|
+
readonly ctrl: boolean;
|
|
125
|
+
readonly alt: boolean;
|
|
126
|
+
readonly shift: boolean;
|
|
127
|
+
readonly meta: boolean;
|
|
128
|
+
/** Lowercased `KeyboardEvent.key` value the spec matches. */
|
|
129
|
+
readonly key: string;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Parse a hotkey spec like `'mod+shift+k'` into a normalised structure.
|
|
133
|
+
*
|
|
134
|
+
* @param spec - the spec to parse
|
|
135
|
+
* @param isMac - when true, `mod` resolves to `meta` (Cmd); otherwise `ctrl`
|
|
136
|
+
*/
|
|
137
|
+
declare function parseHotkeySpec(spec: WrHotkeySpec, isMac?: boolean): WrParsedHotkey;
|
|
138
|
+
/** Does `event` satisfy the parsed hotkey? */
|
|
139
|
+
declare function matchesHotkey(event: KeyboardEvent, parsed: WrParsedHotkey): boolean;
|
|
140
|
+
|
|
141
|
+
export { WrHotkey, WrHotkeyBinding, matchesHotkey, parseHotkeySpec };
|
|
142
|
+
export type { WrHotkeyHandle, WrHotkeyOptions, WrHotkeySpec, WrParsedHotkey };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { WrI18nCatalog } from 'ngwr/i18n';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Base English catalog for ngwr built-in component strings. Spread this
|
|
5
|
+
* into your root catalog or pass it to `provideWrI18nStaticLoader`.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* import { wrEn } from 'ngwr/i18n/en';
|
|
10
|
+
*
|
|
11
|
+
* provideWrI18nStaticLoader({
|
|
12
|
+
* en: { ...wrEn, app: { title: 'My app' } },
|
|
13
|
+
* });
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
declare const wrEn: WrI18nCatalog;
|
|
17
|
+
|
|
18
|
+
export { wrEn };
|
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, Signal, PipeTransform, EnvironmentProviders, Provider } from '@angular/core';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @license
|
|
7
|
+
*
|
|
8
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
9
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/** Translation catalog — flat or nested record of strings. */
|
|
13
|
+
interface WrI18nCatalog {
|
|
14
|
+
readonly [key: string]: string | WrI18nCatalog;
|
|
15
|
+
}
|
|
16
|
+
/** Parameters passed to interpolation — coerced to strings via `String(v)`. */
|
|
17
|
+
type WrI18nParams = Readonly<Record<string, unknown>>;
|
|
18
|
+
/** Hook called once on every key that resolves to nothing. */
|
|
19
|
+
type WrI18nMissingHandler = (key: string, locale: string) => string;
|
|
20
|
+
/** User-facing config for {@link provideWrI18n}. */
|
|
21
|
+
interface WrI18nConfig {
|
|
22
|
+
/** BCP-47 tag used until the user calls `setLocale`. @default 'en' */
|
|
23
|
+
readonly defaultLocale?: string;
|
|
24
|
+
/** Whitelisted locales — `setLocale` ignores anything outside this list. */
|
|
25
|
+
readonly availableLocales?: readonly string[];
|
|
26
|
+
/**
|
|
27
|
+
* Storage key for persisting the active locale (via `WrStorage`).
|
|
28
|
+
* Set to `null` to disable persistence. @default 'wr:i18n:locale'
|
|
29
|
+
*/
|
|
30
|
+
readonly storageKey?: string | null;
|
|
31
|
+
/** Called when a key is missing. Default returns the key itself. */
|
|
32
|
+
readonly missingHandler?: WrI18nMissingHandler;
|
|
33
|
+
}
|
|
34
|
+
/** Resolved config — every field non-optional. @internal */
|
|
35
|
+
interface WrI18nConfigResolved {
|
|
36
|
+
readonly defaultLocale: string;
|
|
37
|
+
readonly availableLocales: readonly string[];
|
|
38
|
+
readonly storageKey: string | null;
|
|
39
|
+
readonly missingHandler: WrI18nMissingHandler;
|
|
40
|
+
}
|
|
41
|
+
declare const DEFAULT_WR_I18N_CONFIG: WrI18nConfigResolved;
|
|
42
|
+
declare const WR_I18N_CONFIG: InjectionToken<WrI18nConfigResolved>;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @license
|
|
46
|
+
*
|
|
47
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
48
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
49
|
+
*/
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Reactive i18n service. Holds:
|
|
53
|
+
*
|
|
54
|
+
* - the active locale as a `Signal<string>`
|
|
55
|
+
* - per-`(locale, scope)` catalogs in a `Map` (loaded once, then cached)
|
|
56
|
+
* - a per-locale signal counter so every `translate()` reading the signal
|
|
57
|
+
* re-evaluates the moment a new catalog finishes loading
|
|
58
|
+
*
|
|
59
|
+
* Translations are looked up scope-first, then root. `t('forms.save', { ... })`
|
|
60
|
+
* with `scope: 'forms'` will try the scoped catalog before falling back to
|
|
61
|
+
* `forms.save` in the root catalog — useful for per-feature overrides.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```ts
|
|
65
|
+
* const i18n = inject(WrI18n);
|
|
66
|
+
* i18n.use('ru'); // switch locale
|
|
67
|
+
* i18n.t('cart.checkout'); // → 'Оформить заказ'
|
|
68
|
+
* i18n.t('greeting', { name: 'Ada' }); // → 'Hello, Ada!'
|
|
69
|
+
*
|
|
70
|
+
* effect(() => console.log(i18n.translate('hi')())); // re-runs on locale change
|
|
71
|
+
* ```
|
|
72
|
+
*
|
|
73
|
+
* @see https://ngwr.dev/services/i18n
|
|
74
|
+
*/
|
|
75
|
+
declare class WrI18n {
|
|
76
|
+
private readonly config;
|
|
77
|
+
private readonly loader;
|
|
78
|
+
private readonly storage;
|
|
79
|
+
/** Per-(locale,scope) catalogs, populated by `loadCatalog`. @internal */
|
|
80
|
+
private readonly catalogs;
|
|
81
|
+
/** Bumped after each catalog write so reactive translates recompute. @internal */
|
|
82
|
+
private readonly revision;
|
|
83
|
+
/** In-flight load promises — dedupes parallel `t()` callers. @internal */
|
|
84
|
+
private readonly inflight;
|
|
85
|
+
/** Registered scopes — auto-loaded whenever the locale changes. @internal */
|
|
86
|
+
private readonly scopes;
|
|
87
|
+
/** Active locale. Writes go through `use()` so storage stays in sync. */
|
|
88
|
+
private readonly _locale;
|
|
89
|
+
readonly locale: Signal<string>;
|
|
90
|
+
constructor();
|
|
91
|
+
/** Switch active locale. Ignored when not whitelisted. */
|
|
92
|
+
use(locale: string): void;
|
|
93
|
+
/** Available locales — pass-through from config. */
|
|
94
|
+
available(): readonly string[];
|
|
95
|
+
/**
|
|
96
|
+
* Register a scope so its catalog loads alongside the root one. Idempotent.
|
|
97
|
+
* Returns a promise resolving once the current locale's scope catalog is in
|
|
98
|
+
* the cache — handy for feature `canActivate` guards.
|
|
99
|
+
*/
|
|
100
|
+
registerScope(scope: string): Promise<WrI18nCatalog>;
|
|
101
|
+
/**
|
|
102
|
+
* Eager translate — returns the current value or the missing-handler
|
|
103
|
+
* fallback. Does NOT auto-load missing catalogs; combine with the
|
|
104
|
+
* reactive `translate(...)` if you want load-on-demand.
|
|
105
|
+
*/
|
|
106
|
+
t(key: string, params?: WrI18nParams, scope?: string): string;
|
|
107
|
+
/** Reactive translate — re-evaluates on locale or catalog updates. */
|
|
108
|
+
translate(key: string, params?: WrI18nParams, scope?: string): Signal<string>;
|
|
109
|
+
private initialLocale;
|
|
110
|
+
private loadCatalog;
|
|
111
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrI18n, never>;
|
|
112
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<WrI18n>;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* @license
|
|
117
|
+
*
|
|
118
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
119
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
120
|
+
*/
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Translate a key. Impure — re-evaluates on every CD so locale switches
|
|
124
|
+
* and catalog loads propagate without a manual refresh.
|
|
125
|
+
*
|
|
126
|
+
* @example
|
|
127
|
+
* ```html
|
|
128
|
+
* <h1>{{ 'home.title' | wrT }}</h1>
|
|
129
|
+
* <p>{{ 'greeting' | wrT: { name: user().name } }}</p>
|
|
130
|
+
* <button>{{ 'forms.save' | wrT: null : 'checkout' }}</button>
|
|
131
|
+
* ```
|
|
132
|
+
*/
|
|
133
|
+
declare class WrTPipe implements PipeTransform {
|
|
134
|
+
private readonly i18n;
|
|
135
|
+
transform(key: string, params?: WrI18nParams | null, scope?: string): string;
|
|
136
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrTPipe, never>;
|
|
137
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<WrTPipe, "wrT", true>;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Attribute directive that sets `textContent` of its host to the translation
|
|
142
|
+
* of the bound key. Reactive — re-renders on locale + catalog changes.
|
|
143
|
+
*
|
|
144
|
+
* @example
|
|
145
|
+
* ```html
|
|
146
|
+
* <span [wrT]="'home.title'"></span>
|
|
147
|
+
* <span [wrT]="'greeting'" [wrTParams]="{ name: user().name }"></span>
|
|
148
|
+
* <span [wrT]="'forms.save'" wrTScope="checkout"></span>
|
|
149
|
+
* ```
|
|
150
|
+
*/
|
|
151
|
+
declare class WrTDirective {
|
|
152
|
+
/** Translation key. Required. */
|
|
153
|
+
readonly wrT: i0.InputSignal<string>;
|
|
154
|
+
/** Interpolation params for `{{name}}` tokens. */
|
|
155
|
+
readonly wrTParams: i0.InputSignal<Readonly<Record<string, unknown>> | null>;
|
|
156
|
+
/** Optional scope — scoped lookup first, then root fallback. */
|
|
157
|
+
readonly wrTScope: i0.InputSignal<string | null>;
|
|
158
|
+
private readonly host;
|
|
159
|
+
private readonly i18n;
|
|
160
|
+
private readonly text;
|
|
161
|
+
constructor();
|
|
162
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrTDirective, never>;
|
|
163
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<WrTDirective, "[wrT]", never, { "wrT": { "alias": "wrT"; "required": true; "isSignal": true; }; "wrTParams": { "alias": "wrTParams"; "required": false; "isSignal": true; }; "wrTScope": { "alias": "wrTScope"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* @license
|
|
168
|
+
*
|
|
169
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
170
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
171
|
+
*/
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Loads a catalog for a `(locale, scope)` pair. `scope` is `null` for the
|
|
175
|
+
* root catalog. Implementations may return the catalog synchronously
|
|
176
|
+
* (via `of(...)`) for static catalogs or asynchronously (via HTTP) for
|
|
177
|
+
* lazy fetches.
|
|
178
|
+
*/
|
|
179
|
+
interface WrI18nLoader {
|
|
180
|
+
load(locale: string, scope: string | null): Observable<WrI18nCatalog>;
|
|
181
|
+
}
|
|
182
|
+
declare const WR_I18N_LOADER: InjectionToken<WrI18nLoader>;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* @license
|
|
186
|
+
*
|
|
187
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
188
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
189
|
+
*/
|
|
190
|
+
|
|
191
|
+
/** Root catalogs keyed by locale: `{ en: catalog, ru: catalog, … }`. */
|
|
192
|
+
type WrI18nStaticCatalogs = Readonly<Record<string, WrI18nCatalog>>;
|
|
193
|
+
/** Per-scope catalogs: `{ checkout: { en: catalog, ru: catalog }, … }`. */
|
|
194
|
+
type WrI18nStaticScopedCatalogs = Readonly<Record<string, WrI18nStaticCatalogs>>;
|
|
195
|
+
/**
|
|
196
|
+
* Loader for catalogs already in memory (imported from JSON or generated).
|
|
197
|
+
*
|
|
198
|
+
* - Pass `catalogs` for the root catalog of every locale.
|
|
199
|
+
* - Pass `scopes` if you ship per-feature catalogs the loader should serve
|
|
200
|
+
* to `WrI18n.registerScope(name)` calls.
|
|
201
|
+
*
|
|
202
|
+
* Missing locale or scope resolves to `{}` — the missing-key handler then
|
|
203
|
+
* decides what to render.
|
|
204
|
+
*/
|
|
205
|
+
declare class WrI18nStaticLoader implements WrI18nLoader {
|
|
206
|
+
private readonly catalogs;
|
|
207
|
+
private readonly scopes;
|
|
208
|
+
constructor(catalogs: WrI18nStaticCatalogs, scopes?: WrI18nStaticScopedCatalogs);
|
|
209
|
+
load(locale: string, scope: string | null): Observable<WrI18nCatalog>;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* @license
|
|
214
|
+
*
|
|
215
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
216
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
217
|
+
*/
|
|
218
|
+
|
|
219
|
+
/** Configuration for {@link WrI18nHttpLoader}. */
|
|
220
|
+
interface WrI18nHttpLoaderConfig {
|
|
221
|
+
/**
|
|
222
|
+
* URL template. Tokens:
|
|
223
|
+
* - `{locale}` — required, BCP-47 tag (e.g. `en`).
|
|
224
|
+
* - `{scope}` — optional, scope name. Use the `rootPath` if you need a
|
|
225
|
+
* different path entirely for the root catalog.
|
|
226
|
+
*
|
|
227
|
+
* @example
|
|
228
|
+
* ```ts
|
|
229
|
+
* { path: '/assets/i18n/{locale}.json' } // root only
|
|
230
|
+
* { path: '/assets/i18n/{scope}/{locale}.json',
|
|
231
|
+
* rootPath: '/assets/i18n/{locale}.json' } // root + scopes
|
|
232
|
+
* ```
|
|
233
|
+
*/
|
|
234
|
+
readonly path: string;
|
|
235
|
+
/** Path template for the root catalog. Defaults to `path`. */
|
|
236
|
+
readonly rootPath?: string;
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Loader that fetches catalogs via `HttpClient`. Failures resolve to `{}`
|
|
240
|
+
* (logged once at the service layer) so a missing file never throws into
|
|
241
|
+
* user code.
|
|
242
|
+
*/
|
|
243
|
+
declare class WrI18nHttpLoader implements WrI18nLoader {
|
|
244
|
+
private readonly config;
|
|
245
|
+
private readonly http;
|
|
246
|
+
constructor(config: WrI18nHttpLoaderConfig);
|
|
247
|
+
load(locale: string, scope: string | null): Observable<WrI18nCatalog>;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* @license
|
|
252
|
+
*
|
|
253
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
254
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
255
|
+
*/
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Configure {@link WrI18n}. Either pass a `loader` directly, or use the
|
|
259
|
+
* `provideWrI18nHttpLoader` / `provideWrI18nStaticLoader` helpers in the
|
|
260
|
+
* same providers array.
|
|
261
|
+
*/
|
|
262
|
+
interface ProvideWrI18nOptions extends WrI18nConfig {
|
|
263
|
+
readonly loader?: WrI18nLoader;
|
|
264
|
+
}
|
|
265
|
+
declare function provideWrI18n(options?: ProvideWrI18nOptions): EnvironmentProviders;
|
|
266
|
+
/**
|
|
267
|
+
* Provide a static loader — catalogs already in memory.
|
|
268
|
+
*
|
|
269
|
+
* @param catalogs Root catalogs keyed by locale.
|
|
270
|
+
* @param scopes Optional per-scope catalogs served to `registerScope(name)`.
|
|
271
|
+
*/
|
|
272
|
+
declare function provideWrI18nStaticLoader(catalogs: WrI18nStaticCatalogs, scopes?: WrI18nStaticScopedCatalogs): Provider;
|
|
273
|
+
/** Provide an HTTP loader — catalogs fetched from URLs. Requires `provideHttpClient`. */
|
|
274
|
+
declare function provideWrI18nHttpLoader(config: WrI18nHttpLoaderConfig): Provider;
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* @license
|
|
278
|
+
*
|
|
279
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
280
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
281
|
+
*/
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Helper for component default text. Returns a reactive string that:
|
|
285
|
+
*
|
|
286
|
+
* 1. Prefers the consumer's override (an `input<string | null>()` value).
|
|
287
|
+
* 2. Falls back to the i18n catalog under `key` — re-renders on locale
|
|
288
|
+
* change so a switcher updates the DOM live.
|
|
289
|
+
* 3. Falls back to `fallback` when no `WrI18n` is provided OR the catalog
|
|
290
|
+
* is missing the key.
|
|
291
|
+
*
|
|
292
|
+
* Components don't need a hard dependency on `provideWrI18n` — without it,
|
|
293
|
+
* the fallback is returned and everything still works.
|
|
294
|
+
*
|
|
295
|
+
* @example
|
|
296
|
+
* ```ts
|
|
297
|
+
* readonly emptyText = input<string | null>(null);
|
|
298
|
+
* protected readonly empty = useI18nText(this.emptyText, 'table.empty', 'No data');
|
|
299
|
+
*
|
|
300
|
+
* // In template: <div>{{ empty() }}</div>
|
|
301
|
+
* ```
|
|
302
|
+
*/
|
|
303
|
+
declare function useI18nText(binding: Signal<string | null | undefined>, key: string, fallback: string): Signal<string>;
|
|
304
|
+
/**
|
|
305
|
+
* Like {@link useI18nText} but takes a literal value (not a Signal) — for
|
|
306
|
+
* computed `aria-label`s that already mix a static piece with a dynamic
|
|
307
|
+
* value. Returns the resolved string once, at injection time.
|
|
308
|
+
*/
|
|
309
|
+
declare function readI18nText(key: string, fallback: string): string;
|
|
310
|
+
/**
|
|
311
|
+
* Build a per-call formatter for parametrized labels (e.g. ARIA labels
|
|
312
|
+
* that interpolate a per-row value: `"Remove {{label}}"`). Returns a
|
|
313
|
+
* function the template calls with the params for the current item.
|
|
314
|
+
*
|
|
315
|
+
* The returned function:
|
|
316
|
+
* - Re-resolves the i18n catalog on every call (live locale switches just
|
|
317
|
+
* work — re-rendered templates pick up new strings).
|
|
318
|
+
* - Falls back to the literal `fallback` template with the same
|
|
319
|
+
* `{{name}}` syntax when no `WrI18n` provider is present, or when the
|
|
320
|
+
* key is missing.
|
|
321
|
+
*
|
|
322
|
+
* Use this for labels that vary per row. For static labels, prefer
|
|
323
|
+
* {@link useI18nText} or {@link readI18nText}.
|
|
324
|
+
*
|
|
325
|
+
* @example
|
|
326
|
+
* ```ts
|
|
327
|
+
* protected readonly removeChipLabel = useI18nFormatter('select.removeItem', 'Remove {{label}}');
|
|
328
|
+
*
|
|
329
|
+
* // In template:
|
|
330
|
+
* // [attr.aria-label]="removeChipLabel({ label: chip.label })"
|
|
331
|
+
* ```
|
|
332
|
+
*/
|
|
333
|
+
declare function useI18nFormatter(key: string, fallback: string): (params?: WrI18nParams) => string;
|
|
334
|
+
|
|
335
|
+
export { DEFAULT_WR_I18N_CONFIG, WR_I18N_CONFIG, WR_I18N_LOADER, WrI18n, WrI18nHttpLoader, WrI18nStaticLoader, WrTDirective, WrTPipe, provideWrI18n, provideWrI18nHttpLoader, provideWrI18nStaticLoader, readI18nText, useI18nFormatter, useI18nText };
|
|
336
|
+
export type { ProvideWrI18nOptions, WrI18nCatalog, WrI18nConfig, WrI18nConfigResolved, WrI18nHttpLoaderConfig, WrI18nLoader, WrI18nMissingHandler, WrI18nParams, WrI18nStaticCatalogs, WrI18nStaticScopedCatalogs };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { WrIconDef } from 'ngwr/icon';
|
|
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
|
+
/**
|
|
11
|
+
* Wrap a single Feather icon (inner SVG markup) in a {@link WrIconDef}
|
|
12
|
+
* envelope. Pair with the upstream `icons.json` map.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* import { feather } from 'ngwr/icon/adapters/feather';
|
|
17
|
+
* // feather-icons ships an inner-SVG-only map under dist/icons.json:
|
|
18
|
+
* // { "plus": "<line .../><line .../>", "trash": "...", ... }
|
|
19
|
+
* import featherIcons from 'feather-icons/dist/icons.json';
|
|
20
|
+
*
|
|
21
|
+
* provideWrIcons([feather('plus', featherIcons.plus)]);
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
declare function feather(name: string, innerSvg: string): WrIconDef;
|
|
25
|
+
/**
|
|
26
|
+
* Bulk variant — pass a `{ alias: innerSvg }` object. Aliases (the
|
|
27
|
+
* keys) become the registry names so you can use shorter or
|
|
28
|
+
* project-specific names.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* import { featherIcons } from 'ngwr/icon/adapters/feather';
|
|
33
|
+
* import featherSource from 'feather-icons/dist/icons.json';
|
|
34
|
+
*
|
|
35
|
+
* provideWrIcons(featherIcons({
|
|
36
|
+
* plus: featherSource.plus,
|
|
37
|
+
* trash: featherSource.trash,
|
|
38
|
+
* x: featherSource.x,
|
|
39
|
+
* }));
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
declare function featherIcons(icons: Record<string, string>): WrIconDef[];
|
|
43
|
+
|
|
44
|
+
export { feather, featherIcons };
|