ngwr 14.3.1 → 14.5.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 +4 -4
- package/avatar/styles/_index.scss +4 -2
- package/badge/styles/_index.scss +4 -1
- package/badge/styles/_tag.scss +3 -0
- package/cascader/styles/_rules.scss +3 -0
- package/command-palette/styles/_index.scss +23 -0
- package/context-menu/styles/_index.scss +13 -1
- package/fesm2022/ngwr-action-sheet.mjs +3 -3
- package/fesm2022/ngwr-affix.mjs +17 -4
- package/fesm2022/ngwr-affix.mjs.map +1 -1
- package/fesm2022/ngwr-alert.mjs +4 -4
- package/fesm2022/ngwr-alert.mjs.map +1 -1
- package/fesm2022/ngwr-anchor.mjs +3 -3
- package/fesm2022/ngwr-aurora.mjs +3 -3
- package/fesm2022/ngwr-avatar.mjs +3 -3
- package/fesm2022/ngwr-back-top.mjs +3 -3
- package/fesm2022/ngwr-badge.mjs +6 -6
- package/fesm2022/ngwr-bar-chart-testing.mjs +18 -2
- package/fesm2022/ngwr-bar-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-bar-chart.mjs +3 -3
- package/fesm2022/ngwr-blur-text.mjs +3 -3
- package/fesm2022/ngwr-border-glow.mjs +3 -3
- package/fesm2022/ngwr-breadcrumbs.mjs +7 -7
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-burger.mjs +3 -3
- package/fesm2022/ngwr-button.mjs +6 -6
- package/fesm2022/ngwr-calendar-heatmap-testing.mjs +12 -9
- package/fesm2022/ngwr-calendar-heatmap-testing.mjs.map +1 -1
- package/fesm2022/ngwr-calendar-heatmap.mjs +35 -7
- package/fesm2022/ngwr-calendar-heatmap.mjs.map +1 -1
- package/fesm2022/ngwr-calendar.mjs +32 -4
- package/fesm2022/ngwr-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-card.mjs +9 -9
- package/fesm2022/ngwr-carousel.mjs +6 -6
- package/fesm2022/ngwr-cascader-testing.mjs +87 -17
- package/fesm2022/ngwr-cascader-testing.mjs.map +1 -1
- package/fesm2022/ngwr-cascader.mjs +76 -5
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-checkbox-testing.mjs +13 -2
- package/fesm2022/ngwr-checkbox-testing.mjs.map +1 -1
- package/fesm2022/ngwr-checkbox.mjs +42 -7
- package/fesm2022/ngwr-checkbox.mjs.map +1 -1
- package/fesm2022/ngwr-circular-text.mjs +3 -3
- package/fesm2022/ngwr-click-spark.mjs +3 -3
- package/fesm2022/ngwr-clipboard.mjs +3 -3
- package/fesm2022/ngwr-collapse.mjs +9 -9
- package/fesm2022/ngwr-color-picker.mjs +24 -8
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- package/fesm2022/ngwr-command-palette.mjs +16 -3
- package/fesm2022/ngwr-command-palette.mjs.map +1 -1
- package/fesm2022/ngwr-compare.mjs +3 -3
- package/fesm2022/ngwr-confetti.mjs +3 -3
- package/fesm2022/ngwr-context-menu.mjs +47 -15
- package/fesm2022/ngwr-context-menu.mjs.map +1 -1
- package/fesm2022/ngwr-cookie.mjs +3 -3
- package/fesm2022/ngwr-counter.mjs +6 -6
- package/fesm2022/ngwr-date-adapters-fns.mjs +3 -3
- package/fesm2022/ngwr-date-adapters-luxon.mjs +3 -3
- package/fesm2022/ngwr-date-picker.mjs +111 -28
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-date.mjs +3 -3
- package/fesm2022/ngwr-decrypt-text.mjs +3 -3
- package/fesm2022/ngwr-density.mjs +6 -6
- package/fesm2022/ngwr-descriptions.mjs +6 -6
- package/fesm2022/ngwr-dialog.mjs +27 -16
- package/fesm2022/ngwr-dialog.mjs.map +1 -1
- package/fesm2022/ngwr-directives.mjs +12 -12
- package/fesm2022/ngwr-divider.mjs +3 -3
- package/fesm2022/ngwr-donut-chart-testing.mjs +18 -2
- package/fesm2022/ngwr-donut-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-donut-chart.mjs +4 -4
- 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.mjs +66 -20
- package/fesm2022/ngwr-drawer.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +54 -16
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-empty.mjs +3 -3
- package/fesm2022/ngwr-event-calendar.mjs +6 -6
- package/fesm2022/ngwr-falling-text.mjs +3 -3
- package/fesm2022/ngwr-file-upload.mjs +18 -5
- package/fesm2022/ngwr-file-upload.mjs.map +1 -1
- package/fesm2022/ngwr-form.mjs +66 -14
- package/fesm2022/ngwr-form.mjs.map +1 -1
- package/fesm2022/ngwr-fuzzy-text.mjs +3 -3
- package/fesm2022/ngwr-gauge-testing.mjs +16 -2
- package/fesm2022/ngwr-gauge-testing.mjs.map +1 -1
- package/fesm2022/ngwr-gauge.mjs +3 -3
- package/fesm2022/ngwr-glitch-text.mjs +3 -3
- package/fesm2022/ngwr-gradient-text.mjs +3 -3
- package/fesm2022/ngwr-graph-testing.mjs +243 -0
- package/fesm2022/ngwr-graph-testing.mjs.map +1 -0
- package/fesm2022/ngwr-graph.mjs +1112 -0
- package/fesm2022/ngwr-graph.mjs.map +1 -0
- package/fesm2022/ngwr-hotkey.mjs +6 -6
- package/fesm2022/ngwr-i18n-ar.mjs +7 -0
- package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-cs.mjs +7 -0
- package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-de.mjs +7 -0
- package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +23 -2
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-es.mjs +7 -0
- package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-fr.mjs +7 -0
- package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-he.mjs +7 -0
- package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-hi.mjs +7 -0
- package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-id.mjs +7 -0
- package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-it.mjs +7 -0
- package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ja.mjs +7 -0
- package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ko.mjs +7 -0
- package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-nl.mjs +7 -0
- package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pl.mjs +7 -0
- package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pt.mjs +7 -0
- package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +7 -0
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-sv.mjs +7 -0
- package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-tr.mjs +7 -0
- package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-uk.mjs +7 -0
- package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-vi.mjs +7 -0
- package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh-TW.mjs +7 -0
- package/fesm2022/ngwr-i18n-zh-TW.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh.mjs +7 -0
- package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
- package/fesm2022/ngwr-i18n.mjs +9 -9
- package/fesm2022/ngwr-icon.mjs +6 -6
- package/fesm2022/ngwr-image-cropper.mjs +3 -3
- package/fesm2022/ngwr-input-number.mjs +15 -6
- package/fesm2022/ngwr-input-number.mjs.map +1 -1
- package/fesm2022/ngwr-input-otp.mjs +38 -6
- package/fesm2022/ngwr-input-otp.mjs.map +1 -1
- package/fesm2022/ngwr-input.mjs +15 -15
- package/fesm2022/ngwr-keyboard.mjs +3 -3
- package/fesm2022/ngwr-knob-testing.mjs +11 -3
- package/fesm2022/ngwr-knob-testing.mjs.map +1 -1
- package/fesm2022/ngwr-knob.mjs +19 -4
- package/fesm2022/ngwr-knob.mjs.map +1 -1
- package/fesm2022/ngwr-layout.mjs +15 -15
- package/fesm2022/ngwr-lightbox.mjs +27 -6
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-line-chart-testing.mjs +18 -2
- package/fesm2022/ngwr-line-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-line-chart.mjs +22 -4
- package/fesm2022/ngwr-line-chart.mjs.map +1 -1
- package/fesm2022/ngwr-list.mjs +7 -7
- package/fesm2022/ngwr-list.mjs.map +1 -1
- package/fesm2022/ngwr-loading-bar.mjs +6 -6
- package/fesm2022/ngwr-markdown.mjs +6 -6
- package/fesm2022/ngwr-marquee.mjs +3 -3
- package/fesm2022/ngwr-media.mjs +3 -3
- package/fesm2022/ngwr-mention.mjs +24 -8
- package/fesm2022/ngwr-mention.mjs.map +1 -1
- package/fesm2022/ngwr-meta.mjs +6 -6
- package/fesm2022/ngwr-meter-group.mjs +3 -3
- package/fesm2022/ngwr-overlay.mjs +125 -10
- package/fesm2022/ngwr-overlay.mjs.map +1 -1
- package/fesm2022/ngwr-page-header.mjs +3 -3
- package/fesm2022/ngwr-pagination.mjs +33 -6
- 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.mjs +25 -9
- package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
- package/fesm2022/ngwr-popover-testing.mjs +22 -5
- package/fesm2022/ngwr-popover-testing.mjs.map +1 -1
- package/fesm2022/ngwr-popover.mjs +243 -37
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-progress.mjs +3 -3
- package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
- package/fesm2022/ngwr-qr.mjs +3 -3
- package/fesm2022/ngwr-radio.mjs +6 -6
- package/fesm2022/ngwr-rating-testing.mjs +12 -3
- package/fesm2022/ngwr-rating-testing.mjs.map +1 -1
- package/fesm2022/ngwr-rating.mjs +19 -4
- package/fesm2022/ngwr-rating.mjs.map +1 -1
- package/fesm2022/ngwr-result.mjs +13 -13
- package/fesm2022/ngwr-result.mjs.map +1 -1
- package/fesm2022/ngwr-rotating-text.mjs +3 -3
- package/fesm2022/ngwr-schema-form.mjs +3 -3
- package/fesm2022/ngwr-scroll.mjs +3 -3
- package/fesm2022/ngwr-segmented.mjs +37 -4
- package/fesm2022/ngwr-segmented.mjs.map +1 -1
- package/fesm2022/ngwr-select.mjs +24 -10
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-shiny-text.mjs +6 -6
- package/fesm2022/ngwr-sidebar.mjs +3 -3
- package/fesm2022/ngwr-skeleton.mjs +3 -3
- package/fesm2022/ngwr-slider.mjs +18 -5
- package/fesm2022/ngwr-slider.mjs.map +1 -1
- package/fesm2022/ngwr-sparkline.mjs +3 -3
- package/fesm2022/ngwr-speed-dial.mjs +3 -3
- package/fesm2022/ngwr-spinner.mjs +3 -3
- package/fesm2022/ngwr-splash-cursor.mjs +3 -3
- package/fesm2022/ngwr-split-text.mjs +3 -3
- package/fesm2022/ngwr-splitter.mjs +3 -3
- package/fesm2022/ngwr-spotlight-card.mjs +6 -6
- package/fesm2022/ngwr-squircle.mjs +28 -9
- package/fesm2022/ngwr-squircle.mjs.map +1 -1
- package/fesm2022/ngwr-star-border.mjs +3 -3
- package/fesm2022/ngwr-statistic.mjs +20 -13
- package/fesm2022/ngwr-statistic.mjs.map +1 -1
- package/fesm2022/ngwr-stepper.mjs +6 -6
- package/fesm2022/ngwr-storage.mjs +3 -3
- package/fesm2022/ngwr-switch.mjs +3 -3
- package/fesm2022/ngwr-table.mjs +18 -18
- package/fesm2022/ngwr-tabs-router.mjs +3 -3
- package/fesm2022/ngwr-tabs.mjs +6 -6
- package/fesm2022/ngwr-textarea.mjs +3 -3
- package/fesm2022/ngwr-theme.mjs +3 -3
- package/fesm2022/ngwr-tilt-card.mjs +6 -6
- package/fesm2022/ngwr-timeline.mjs +6 -6
- package/fesm2022/ngwr-toast.mjs +29 -12
- package/fesm2022/ngwr-toast.mjs.map +1 -1
- package/fesm2022/ngwr-toolbar.mjs +3 -3
- package/fesm2022/ngwr-tour.mjs +26 -12
- package/fesm2022/ngwr-tour.mjs.map +1 -1
- package/fesm2022/ngwr-transfer.mjs +88 -11
- package/fesm2022/ngwr-transfer.mjs.map +1 -1
- package/fesm2022/ngwr-tree-testing.mjs +24 -0
- package/fesm2022/ngwr-tree-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tree.mjs +81 -9
- package/fesm2022/ngwr-tree.mjs.map +1 -1
- package/fesm2022/ngwr-typewriter.mjs +3 -3
- 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 +3 -3
- package/fesm2022/ngwr-waves.mjs +3 -3
- package/fesm2022/ngwr-window.mjs +30 -13
- package/fesm2022/ngwr-window.mjs.map +1 -1
- package/form/styles/_index.scss +63 -0
- package/graph/styles/_index.scss +113 -0
- package/i18n/ar.json +9 -2
- package/i18n/cs.json +9 -2
- package/i18n/de.json +9 -2
- package/i18n/en.json +11 -4
- package/i18n/es.json +9 -2
- package/i18n/fr.json +9 -2
- package/i18n/he.json +9 -2
- package/i18n/hi.json +9 -2
- package/i18n/id.json +9 -2
- package/i18n/it.json +9 -2
- package/i18n/ja.json +9 -2
- package/i18n/ko.json +9 -2
- package/i18n/nl.json +9 -2
- package/i18n/pl.json +9 -2
- package/i18n/pt.json +9 -2
- package/i18n/ru.json +9 -2
- package/i18n/sv.json +9 -2
- package/i18n/tr.json +9 -2
- package/i18n/uk.json +9 -2
- package/i18n/vi.json +9 -2
- package/i18n/zh-TW.json +9 -2
- package/i18n/zh.json +9 -2
- package/input-otp/styles/_index.scss +5 -1
- package/line-chart/styles/_index.scss +5 -3
- package/llms-full.txt +13 -3
- package/llms.txt +8 -6
- package/markdown/styles/_index.scss +4 -1
- package/mention/styles/_index.scss +22 -1
- package/package.json +10 -1
- package/radio/styles/_index.scss +3 -0
- package/result/styles/_index.scss +12 -0
- package/schematics/migrations/v14/index.js +6 -3
- package/schematics/migrations.json +1 -1
- package/schematics/ng-add/index.js +34 -5
- package/schematics/use/symbol-map.json +2 -0
- package/segmented/styles/_index.scss +12 -1
- package/select/styles/_index.scss +20 -1
- package/skills/ngwr/SKILL.md +1 -1
- package/skills/ngwr/references/catalog.md +2 -0
- package/statistic/styles/_index.scss +4 -0
- package/stepper/styles/_index.scss +36 -0
- package/styles.scss +1 -0
- package/switch/styles/_index.scss +3 -0
- package/table/styles/_index.scss +12 -0
- package/tabs/styles/_index.scss +4 -1
- package/textarea/styles/_index.scss +6 -1
- package/theme/styles/_colors.scss +11 -0
- package/theme/styles/_contrast.scss +136 -0
- package/theme/styles/_focus.scss +7 -0
- package/theme/styles/_index.scss +1 -0
- package/theme/styles/_mixins.scss +15 -8
- package/timeline/styles/_index.scss +28 -1
- package/toast/styles/_index.scss +11 -0
- package/tree/styles/_index.scss +27 -1
- package/types/ngwr-badge.d.ts +1 -1
- package/types/ngwr-bar-chart-testing.d.ts +11 -1
- package/types/ngwr-button.d.ts +1 -1
- package/types/ngwr-calendar-heatmap-testing.d.ts +10 -5
- package/types/ngwr-calendar-heatmap.d.ts +22 -0
- package/types/ngwr-calendar.d.ts +21 -0
- package/types/ngwr-cascader-testing.d.ts +74 -17
- package/types/ngwr-cascader.d.ts +35 -0
- package/types/ngwr-checkbox-testing.d.ts +12 -1
- package/types/ngwr-checkbox.d.ts +10 -0
- package/types/ngwr-clipboard.d.ts +1 -1
- package/types/ngwr-color-picker.d.ts +8 -0
- package/types/ngwr-confetti.d.ts +1 -1
- package/types/ngwr-context-menu.d.ts +10 -0
- package/types/ngwr-cookie.d.ts +1 -1
- package/types/ngwr-date-adapters-fns.d.ts +1 -1
- package/types/ngwr-date-adapters-luxon.d.ts +1 -1
- package/types/ngwr-date-picker.d.ts +16 -0
- package/types/ngwr-date.d.ts +9 -3
- package/types/ngwr-density.d.ts +1 -1
- package/types/ngwr-dialog.d.ts +2 -1
- package/types/ngwr-donut-chart-testing.d.ts +11 -1
- package/types/ngwr-drawer.d.ts +29 -1
- package/types/ngwr-dropdown.d.ts +25 -0
- package/types/ngwr-file-upload.d.ts +11 -0
- package/types/ngwr-form.d.ts +25 -0
- package/types/ngwr-gauge-testing.d.ts +9 -1
- package/types/ngwr-graph-testing.d.ts +190 -0
- package/types/ngwr-graph.d.ts +203 -0
- package/types/ngwr-hotkey.d.ts +1 -1
- package/types/ngwr-i18n.d.ts +1 -1
- package/types/ngwr-input-number.d.ts +12 -2
- package/types/ngwr-input-otp.d.ts +12 -0
- package/types/ngwr-knob-testing.d.ts +11 -3
- package/types/ngwr-knob.d.ts +13 -0
- package/types/ngwr-lightbox.d.ts +15 -0
- package/types/ngwr-line-chart-testing.d.ts +11 -1
- package/types/ngwr-line-chart.d.ts +18 -0
- package/types/ngwr-loading-bar.d.ts +1 -1
- package/types/ngwr-markdown.d.ts +1 -1
- package/types/ngwr-media.d.ts +1 -1
- package/types/ngwr-mention.d.ts +7 -0
- package/types/ngwr-meta.d.ts +1 -1
- package/types/ngwr-overlay.d.ts +64 -6
- package/types/ngwr-pagination.d.ts +16 -0
- package/types/ngwr-platform.d.ts +3 -3
- package/types/ngwr-popconfirm.d.ts +1 -0
- package/types/ngwr-popover-testing.d.ts +22 -5
- package/types/ngwr-popover.d.ts +44 -8
- package/types/ngwr-rating-testing.d.ts +12 -3
- package/types/ngwr-rating.d.ts +13 -0
- package/types/ngwr-scroll.d.ts +1 -1
- package/types/ngwr-segmented.d.ts +16 -0
- package/types/ngwr-select.d.ts +7 -0
- package/types/ngwr-squircle.d.ts +22 -3
- package/types/ngwr-statistic.d.ts +0 -1
- package/types/ngwr-storage.d.ts +1 -1
- package/types/ngwr-theme.d.ts +1 -1
- package/types/ngwr-toast.d.ts +3 -1
- package/types/ngwr-tour.d.ts +7 -1
- package/types/ngwr-transfer.d.ts +52 -0
- package/types/ngwr-tree-testing.d.ts +20 -0
- package/types/ngwr-tree.d.ts +43 -1
- package/types/ngwr-version.d.ts +1 -1
- package/types/ngwr-window.d.ts +2 -1
- package/typography/styles/_index.scss +26 -4
|
@@ -124,6 +124,20 @@ function maskToRadii(mask, r) {
|
|
|
124
124
|
* Apply a Figma-style smooth-corner ("squircle") `clip-path` to the host
|
|
125
125
|
* element. Re-computes the path whenever the element resizes.
|
|
126
126
|
*
|
|
127
|
+
* @deprecated Use the native route instead — `@use 'ngwr/theme'` and the
|
|
128
|
+
* `smooth-br` mixin, which 31 entry points already ride by default. This
|
|
129
|
+
* directive exists because `corner-shape` was Chromium-only, and that reason
|
|
130
|
+
* has an expiry date: WebKit has it in Technology Preview. It will be removed
|
|
131
|
+
* in the major after Safari stable ships the property.
|
|
132
|
+
*
|
|
133
|
+
* It is deprecated rather than removed today because it is still the only
|
|
134
|
+
* DETERMINISTIC squircle — the native property reaches roughly two thirds of
|
|
135
|
+
* users and the rest see a rounded corner. If that difference matters to a
|
|
136
|
+
* design, this is still the way to get it, with the costs stated: a hand-ported
|
|
137
|
+
* superellipse, a `ResizeObserver` and a `getBoundingClientRect` per host on
|
|
138
|
+
* every resize, square corners until hydration under SSR, no test harness, and
|
|
139
|
+
* a clip that `box-shadow`, `border-image` and the focus ring do not follow.
|
|
140
|
+
*
|
|
127
141
|
* Borders: pass `[borderWidth]` (px) + `[borderColor]` and the directive
|
|
128
142
|
* paints a `::before` pseudo with an *inset* squircle path on top of the
|
|
129
143
|
* host. The visible border is the host's own background colour, so set
|
|
@@ -178,9 +192,11 @@ class WrSquircle {
|
|
|
178
192
|
* only the two corners on the named side and leave the other two at
|
|
179
193
|
* 90°. `'none'` is equivalent to disabling the directive.
|
|
180
194
|
*
|
|
181
|
-
*
|
|
182
|
-
*
|
|
183
|
-
*
|
|
195
|
+
* A `model()` rather than an `input()` so a parent composing the directive
|
|
196
|
+
* can flip it imperatively. Nothing in the library does today: this line
|
|
197
|
+
* used to name `WrButtonGroup` as the consumer, and that component has
|
|
198
|
+
* carried no squircle reference for several releases — `wr-btn--squircle`
|
|
199
|
+
* is plain CSS now.
|
|
184
200
|
*
|
|
185
201
|
* @default 'all'
|
|
186
202
|
*/
|
|
@@ -267,10 +283,10 @@ class WrSquircle {
|
|
|
267
283
|
host.style.removeProperty('--wr-squircle-border-width');
|
|
268
284
|
host.style.removeProperty('--wr-squircle-border-color');
|
|
269
285
|
}
|
|
270
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
271
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.
|
|
286
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrSquircle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
287
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.6", type: WrSquircle, isStandalone: true, selector: "[wrSquircle]", inputs: { radius: { classPropertyName: "radius", publicName: "radius", isSignal: true, isRequired: false, transformFunction: null }, smoothing: { classPropertyName: "smoothing", publicName: "smoothing", isSignal: true, isRequired: false, transformFunction: null }, enabled: { classPropertyName: "enabled", publicName: "enabled", isSignal: true, isRequired: false, transformFunction: null }, borderWidth: { classPropertyName: "borderWidth", publicName: "borderWidth", isSignal: true, isRequired: false, transformFunction: null }, borderColor: { classPropertyName: "borderColor", publicName: "borderColor", isSignal: true, isRequired: false, transformFunction: null }, corners: { classPropertyName: "corners", publicName: "corners", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { enabled: "enabledChange", borderWidth: "borderWidthChange", borderColor: "borderColorChange", corners: "cornersChange" }, host: { properties: { "class.wr-squircle--bordered": "borderWidth() > 0 && enabled()" } }, exportAs: ["wrSquircle"], ngImport: i0 });
|
|
272
288
|
}
|
|
273
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
289
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrSquircle, decorators: [{
|
|
274
290
|
type: Directive,
|
|
275
291
|
args: [{
|
|
276
292
|
selector: '[wrSquircle]',
|
|
@@ -297,12 +313,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
|
|
|
297
313
|
* ```
|
|
298
314
|
*
|
|
299
315
|
* @see https://ngwr.dev/reference/components/squircle
|
|
316
|
+
*
|
|
317
|
+
* @deprecated Follows `[wrSquircle]`, which it wraps — see that directive
|
|
318
|
+
* for why, and for the native route to use instead.
|
|
300
319
|
*/
|
|
301
320
|
class WrSquircleHost {
|
|
302
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
303
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.
|
|
321
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrSquircleHost, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
322
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.6", type: WrSquircleHost, isStandalone: true, selector: "wr-squircle", host: { classAttribute: "wr-squircle" }, hostDirectives: [{ directive: WrSquircle, inputs: ["radius", "radius", "smoothing", "smoothing", "borderWidth", "borderWidth", "borderColor", "borderColor"] }], ngImport: i0, template: '<ng-content />', isInline: true, encapsulation: i0.ViewEncapsulation.None });
|
|
304
323
|
}
|
|
305
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
324
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrSquircleHost, decorators: [{
|
|
306
325
|
type: Component,
|
|
307
326
|
args: [{
|
|
308
327
|
selector: 'wr-squircle',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-squircle.mjs","sources":["../../../projects/lib/squircle/compute-squircle-path.ts","../../../projects/lib/squircle/wr-squircle.ts","../../../projects/lib/squircle/wr-squircle-host.ts","../../../projects/lib/squircle/ngwr-squircle.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n *\n * Squircle path computation — port of the algorithm from `figma-squircle`\n * (https://github.com/phamfoo/figma-squircle, MIT). Generates an SVG `d`\n * string for a smooth-corner rectangle.\n */\n\n/** Per-corner radii for the squircle. */\ninterface WrSquircleCorners {\n readonly topLeft: number;\n readonly topRight: number;\n readonly bottomRight: number;\n readonly bottomLeft: number;\n}\n\ninterface CornerParams {\n readonly a: number;\n readonly b: number;\n readonly c: number;\n readonly d: number;\n readonly p: number;\n readonly arcSectionLength: number;\n readonly cornerRadius: number;\n}\n\nfunction toRadians(deg: number): number {\n return (deg * Math.PI) / 180;\n}\n\nfunction cornerParams(cornerRadius: number, cornerSmoothing: number, budget: number): CornerParams {\n if (cornerRadius <= 0) {\n return { a: 0, b: 0, c: 0, d: 0, p: 0, arcSectionLength: 0, cornerRadius: 0 };\n }\n let p = (1 + cornerSmoothing) * cornerRadius;\n // Cap smoothing so the corner fits within the available budget.\n let s = cornerSmoothing;\n const maxSmoothing = budget / cornerRadius - 1;\n if (maxSmoothing < s) {\n s = Math.max(0, maxSmoothing);\n p = (1 + s) * cornerRadius;\n }\n const arcMeasure = 90 * (1 - s);\n const arcSectionLength = Math.sin(toRadians(arcMeasure / 2)) * cornerRadius * Math.SQRT2;\n const angleAlpha = (90 - arcMeasure) / 2;\n const p3p4 = cornerRadius * Math.tan(toRadians(angleAlpha / 2));\n const angleBeta = 45 * s;\n const c = p3p4 * Math.cos(toRadians(angleBeta));\n const d = c * Math.tan(toRadians(angleBeta));\n const b = (p - arcSectionLength - c - d) / 3;\n const a = 2 * b;\n return { a, b, c, d, p, arcSectionLength, cornerRadius };\n}\n\n/** Cubic-bezier + arc commands for one corner — anchored at its `p` distance. */\nfunction drawCorner(c: CornerParams, rotation: 'tl' | 'tr' | 'br' | 'bl'): string {\n if (c.cornerRadius === 0) return '';\n const { a, b, c: cc, d, arcSectionLength, cornerRadius } = c;\n switch (rotation) {\n case 'tr':\n return `c ${a} 0 ${a + b} 0 ${a + b + cc} ${d} a ${cornerRadius} ${cornerRadius} 0 0 1 ${arcSectionLength} ${arcSectionLength} c ${d} ${cc} ${d} ${b + cc} ${d} ${a + b + cc}`;\n case 'br':\n return `c 0 ${a} 0 ${a + b} ${-d} ${a + b + cc} a ${cornerRadius} ${cornerRadius} 0 0 1 ${-arcSectionLength} ${arcSectionLength} c ${-cc} ${d} ${-(b + cc)} ${d} ${-(a + b + cc)} ${d}`;\n case 'bl':\n return `c ${-a} 0 ${-(a + b)} 0 ${-(a + b + cc)} ${-d} a ${cornerRadius} ${cornerRadius} 0 0 1 ${-arcSectionLength} ${-arcSectionLength} c ${-d} ${-cc} ${-d} ${-(b + cc)} ${-d} ${-(a + b + cc)}`;\n case 'tl':\n return `c 0 ${-a} 0 ${-(a + b)} ${d} ${-(a + b + cc)} a ${cornerRadius} ${cornerRadius} 0 0 1 ${arcSectionLength} ${-arcSectionLength} c ${cc} ${-d} ${b + cc} ${-d} ${a + b + cc} ${-d}`;\n }\n}\n\n/**\n * Generate an SVG `d` string for a squircle (smooth-corner rectangle).\n *\n * @param width Box width in user units.\n * @param height Box height in user units.\n * @param radius Either a single number applied to all four corners or a\n * `WrSquircleCorners` object with per-corner radii.\n * @param smoothing 0–1. `0` = standard rounded rectangle; `1` = full\n * iOS-style smooth corner. @default 1\n */\nfunction squirclePath(width: number, height: number, radius: number | WrSquircleCorners, smoothing = 1): string {\n const corners: WrSquircleCorners =\n typeof radius === 'number'\n ? { topLeft: radius, topRight: radius, bottomRight: radius, bottomLeft: radius }\n : radius;\n\n // Budget per corner = half of the shorter dimension.\n const budget = Math.min(width / 2, height / 2);\n\n const tl = cornerParams(Math.min(corners.topLeft, budget), smoothing, budget);\n const tr = cornerParams(Math.min(corners.topRight, budget), smoothing, budget);\n const br = cornerParams(Math.min(corners.bottomRight, budget), smoothing, budget);\n const bl = cornerParams(Math.min(corners.bottomLeft, budget), smoothing, budget);\n\n return [\n `M ${tl.p} 0`,\n `L ${width - tr.p} 0`,\n drawCorner(tr, 'tr'),\n `L ${width} ${height - br.p}`,\n drawCorner(br, 'br'),\n `L ${bl.p} ${height}`,\n drawCorner(bl, 'bl'),\n `L 0 ${tl.p}`,\n drawCorner(tl, 'tl'),\n 'Z',\n ]\n .filter(Boolean)\n .join(' ');\n}\n\nexport { squirclePath };\nexport type { WrSquircleCorners };\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { coerceNumberProperty } from '@angular/cdk/coercion';\nimport { isPlatformBrowser } from '@angular/common';\nimport { DestroyRef, Directive, ElementRef, PLATFORM_ID, effect, inject, input, model } from '@angular/core';\n\nimport { squirclePath, type WrSquircleCorners } from './compute-squircle-path';\nimport type { WrSquircleCornerMask } from './interfaces';\n\n/**\n * Which corners to squircle. `'all'` = standard four-corner squircle;\n * the side-named values squircle the two corners on that side and leave\n * the other two at 90°. Useful for tab-/segment-style controls where\n * only outer corners need smoothing.\n */\nfunction maskToRadii(mask: WrSquircleCornerMask, r: number): WrSquircleCorners {\n switch (mask) {\n case 'left':\n return { topLeft: r, topRight: 0, bottomRight: 0, bottomLeft: r };\n case 'right':\n return { topLeft: 0, topRight: r, bottomRight: r, bottomLeft: 0 };\n case 'top':\n return { topLeft: r, topRight: r, bottomRight: 0, bottomLeft: 0 };\n case 'bottom':\n return { topLeft: 0, topRight: 0, bottomRight: r, bottomLeft: r };\n case 'none':\n return { topLeft: 0, topRight: 0, bottomRight: 0, bottomLeft: 0 };\n case 'all':\n default:\n return { topLeft: r, topRight: r, bottomRight: r, bottomLeft: r };\n }\n}\n\n/**\n * Apply a Figma-style smooth-corner (\"squircle\") `clip-path` to the host\n * element. Re-computes the path whenever the element resizes.\n *\n * Borders: pass `[borderWidth]` (px) + `[borderColor]` and the directive\n * paints a `::before` pseudo with an *inset* squircle path on top of the\n * host. The visible border is the host's own background colour, so set\n * `background: <border-color>` on the host (or use the convenience\n * `[borderColor]` input which writes the host background for you).\n *\n * @example\n * ```html\n * <button wr-btn wrSquircle [radius]=\"16\">Save</button>\n * <wr-tag wrSquircle>v2.0</wr-tag>\n * <div wrSquircle [radius]=\"32\" [smoothing]=\"0.8\">…</div>\n * <div wrSquircle [borderWidth]=\"2\" borderColor=\"var(--wr-color-primary)\">…</div>\n * ```\n */\n@Directive({\n selector: '[wrSquircle]',\n exportAs: 'wrSquircle',\n host: { '[class.wr-squircle--bordered]': 'borderWidth() > 0 && enabled()' },\n})\nexport class WrSquircle {\n /** Corner radius in CSS pixels. Falls back to `--wr-border-radius-base` × 16. @default 12 */\n readonly radius = input(12, { transform: (v: unknown): number => Math.max(0, coerceNumberProperty(v, 12)) });\n\n /** Smoothing factor — `0` = plain rounded rect; `1` = full smooth iOS corner. @default 1 */\n readonly smoothing = input(1, {\n transform: (v: unknown): number => Math.min(1, Math.max(0, coerceNumberProperty(v, 1))),\n });\n\n /**\n * Whether the squircle clip-path is applied. When `false`, the directive\n * stays inert (clip-path cleared).\n *\n * Modelled as `model()` so a parent component composing this directive\n * (`inject(WrSquircle, { self: true }).enabled.set(...)`) can flip the\n * state from outside without exposing an `enabled` input on its own API.\n *\n * @default true\n */\n readonly enabled = model(true);\n\n /**\n * Border thickness in CSS pixels. `0` disables the border ring entirely.\n * Modelled (not `input()`) so parent components composing this directive\n * can flip it imperatively — e.g. `WrButton` turning on a 1px ring when\n * `shape=\"squircle\" outlined` is active.\n * @default 0\n */\n readonly borderWidth = model(0);\n\n /**\n * Border colour — any CSS colour. Applied to the host's background so the\n * outer squircle reveals it. Defaults to `currentColor` so the consuming\n * element's text colour drives the ring.\n * @default 'currentColor'\n */\n readonly borderColor = model<string>('currentColor');\n\n /**\n * Which corners to squircle. `'all'` (default) is the standard four-\n * corner shape; `'left'` / `'right'` / `'top'` / `'bottom'` squircle\n * only the two corners on the named side and leave the other two at\n * 90°. `'none'` is equivalent to disabling the directive.\n *\n * Modelled so parent components composing the directive can flip the\n * value imperatively — used by `WrButtonGroup` to squircle only the\n * outer corners of the first / last child.\n *\n * @default 'all'\n */\n readonly corners = model<WrSquircleCornerMask>('all');\n\n private readonly el = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private readonly destroyRef = inject(DestroyRef);\n private observer: ResizeObserver | null = null;\n\n constructor() {\n if (!this.isBrowser) return;\n const host = this.el.nativeElement;\n // Reactively re-apply when inputs change.\n effect(() => {\n this.radius();\n this.smoothing();\n this.enabled();\n this.borderWidth();\n this.borderColor();\n this.corners();\n this.apply();\n });\n // Re-apply on resize.\n this.observer = new ResizeObserver(() => this.apply());\n this.observer.observe(host);\n this.destroyRef.onDestroy(() => {\n this.observer?.disconnect();\n this.clear();\n });\n }\n\n private apply(): void {\n const host = this.el.nativeElement;\n if (!this.enabled()) {\n this.clear();\n return;\n }\n const rect = host.getBoundingClientRect();\n if (rect.width === 0 || rect.height === 0) return;\n\n const r = this.radius();\n const s = this.smoothing();\n const radii = maskToRadii(this.corners(), r);\n const outer = squirclePath(rect.width, rect.height, radii, s);\n const value = `path(\"${outer}\")`;\n host.style.clipPath = value;\n host.style.setProperty('-webkit-clip-path', value);\n\n // Border mode: paint an INNER squircle in a `::before` pseudo on top of\n // the host so the host's own bg only shows at the border-width perimeter.\n const bw = this.borderWidth();\n if (bw > 0) {\n const innerW = Math.max(0, rect.width - bw * 2);\n const innerH = Math.max(0, rect.height - bw * 2);\n const innerR = Math.max(0, r - bw);\n if (innerW > 0 && innerH > 0) {\n const innerRadii = maskToRadii(this.corners(), innerR);\n const inner = squirclePath(innerW, innerH, innerRadii, s);\n host.style.setProperty('--wr-squircle-inner-path', `path(\"${inner}\")`);\n }\n host.style.setProperty('--wr-squircle-border-width', `${bw}px`);\n // Only set the colour var inline when the consumer asked for a\n // specific colour. Leaving the default `'currentColor'` un-inlined\n // lets host CSS (e.g. WrButton's outlined-squircle rule) override\n // the var via SCSS without losing to inline-style specificity.\n const bc = this.borderColor();\n if (bc && bc !== 'currentColor') {\n host.style.setProperty('--wr-squircle-border-color', bc);\n } else {\n host.style.removeProperty('--wr-squircle-border-color');\n }\n } else {\n host.style.removeProperty('--wr-squircle-inner-path');\n host.style.removeProperty('--wr-squircle-border-width');\n host.style.removeProperty('--wr-squircle-border-color');\n }\n }\n\n private clear(): void {\n const host = this.el.nativeElement;\n host.style.removeProperty('clip-path');\n host.style.removeProperty('-webkit-clip-path');\n host.style.removeProperty('--wr-squircle-inner-path');\n host.style.removeProperty('--wr-squircle-border-width');\n host.style.removeProperty('--wr-squircle-border-color');\n }\n}\n\nexport type { WrSquircleCornerMask } from './interfaces';\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Component, ViewEncapsulation } from '@angular/core';\n\nimport { WrSquircle } from './wr-squircle';\n\n/**\n * Standalone squircle container. Equivalent to `<div wrSquircle>` but\n * named for ergonomics in templates.\n *\n * @example\n * ```html\n * <wr-squircle [radius]=\"24\" style=\"width: 160px; height: 160px; background: var(--wr-color-primary)\">\n * …\n * </wr-squircle>\n * ```\n *\n * @see https://ngwr.dev/reference/components/squircle\n */\n@Component({\n selector: 'wr-squircle',\n template: '<ng-content />',\n encapsulation: ViewEncapsulation.None,\n host: { class: 'wr-squircle' },\n hostDirectives: [{ directive: WrSquircle, inputs: ['radius', 'smoothing', 'borderWidth', 'borderColor'] }],\n})\nexport class WrSquircleHost {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAAA;;;;;;;;;AASG;AAoBH,SAAS,SAAS,CAAC,GAAW,EAAA;IAC5B,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC,EAAE,IAAI,GAAG;AAC9B;AAEA,SAAS,YAAY,CAAC,YAAoB,EAAE,eAAuB,EAAE,MAAc,EAAA;AACjF,IAAA,IAAI,YAAY,IAAI,CAAC,EAAE;AACrB,QAAA,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,gBAAgB,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE;IAC/E;IACA,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,eAAe,IAAI,YAAY;;IAE5C,IAAI,CAAC,GAAG,eAAe;AACvB,IAAA,MAAM,YAAY,GAAG,MAAM,GAAG,YAAY,GAAG,CAAC;AAC9C,IAAA,IAAI,YAAY,GAAG,CAAC,EAAE;QACpB,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY,CAAC;QAC7B,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,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lib/squircle/wr-squircle-host.ts","../../../projects/lib/squircle/ngwr-squircle.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n *\n * Squircle path computation — port of the algorithm from `figma-squircle`\n * (https://github.com/phamfoo/figma-squircle, MIT). Generates an SVG `d`\n * string for a smooth-corner rectangle.\n */\n\n/** Per-corner radii for the squircle. */\ninterface WrSquircleCorners {\n readonly topLeft: number;\n readonly topRight: number;\n readonly bottomRight: number;\n readonly bottomLeft: number;\n}\n\ninterface CornerParams {\n readonly a: number;\n readonly b: number;\n readonly c: number;\n readonly d: number;\n readonly p: number;\n readonly arcSectionLength: number;\n readonly cornerRadius: number;\n}\n\nfunction toRadians(deg: number): number {\n return (deg * Math.PI) / 180;\n}\n\nfunction cornerParams(cornerRadius: number, cornerSmoothing: number, budget: number): CornerParams {\n if (cornerRadius <= 0) {\n return { a: 0, b: 0, c: 0, d: 0, p: 0, arcSectionLength: 0, cornerRadius: 0 };\n }\n let p = (1 + cornerSmoothing) * cornerRadius;\n // Cap smoothing so the corner fits within the available budget.\n let s = cornerSmoothing;\n const maxSmoothing = budget / cornerRadius - 1;\n if (maxSmoothing < s) {\n s = Math.max(0, maxSmoothing);\n p = (1 + s) * cornerRadius;\n }\n const arcMeasure = 90 * (1 - s);\n const arcSectionLength = Math.sin(toRadians(arcMeasure / 2)) * cornerRadius * Math.SQRT2;\n const angleAlpha = (90 - arcMeasure) / 2;\n const p3p4 = cornerRadius * Math.tan(toRadians(angleAlpha / 2));\n const angleBeta = 45 * s;\n const c = p3p4 * Math.cos(toRadians(angleBeta));\n const d = c * Math.tan(toRadians(angleBeta));\n const b = (p - arcSectionLength - c - d) / 3;\n const a = 2 * b;\n return { a, b, c, d, p, arcSectionLength, cornerRadius };\n}\n\n/** Cubic-bezier + arc commands for one corner — anchored at its `p` distance. */\nfunction drawCorner(c: CornerParams, rotation: 'tl' | 'tr' | 'br' | 'bl'): string {\n if (c.cornerRadius === 0) return '';\n const { a, b, c: cc, d, arcSectionLength, cornerRadius } = c;\n switch (rotation) {\n case 'tr':\n return `c ${a} 0 ${a + b} 0 ${a + b + cc} ${d} a ${cornerRadius} ${cornerRadius} 0 0 1 ${arcSectionLength} ${arcSectionLength} c ${d} ${cc} ${d} ${b + cc} ${d} ${a + b + cc}`;\n case 'br':\n return `c 0 ${a} 0 ${a + b} ${-d} ${a + b + cc} a ${cornerRadius} ${cornerRadius} 0 0 1 ${-arcSectionLength} ${arcSectionLength} c ${-cc} ${d} ${-(b + cc)} ${d} ${-(a + b + cc)} ${d}`;\n case 'bl':\n return `c ${-a} 0 ${-(a + b)} 0 ${-(a + b + cc)} ${-d} a ${cornerRadius} ${cornerRadius} 0 0 1 ${-arcSectionLength} ${-arcSectionLength} c ${-d} ${-cc} ${-d} ${-(b + cc)} ${-d} ${-(a + b + cc)}`;\n case 'tl':\n return `c 0 ${-a} 0 ${-(a + b)} ${d} ${-(a + b + cc)} a ${cornerRadius} ${cornerRadius} 0 0 1 ${arcSectionLength} ${-arcSectionLength} c ${cc} ${-d} ${b + cc} ${-d} ${a + b + cc} ${-d}`;\n }\n}\n\n/**\n * Generate an SVG `d` string for a squircle (smooth-corner rectangle).\n *\n * @param width Box width in user units.\n * @param height Box height in user units.\n * @param radius Either a single number applied to all four corners or a\n * `WrSquircleCorners` object with per-corner radii.\n * @param smoothing 0–1. `0` = standard rounded rectangle; `1` = full\n * iOS-style smooth corner. @default 1\n */\nfunction squirclePath(width: number, height: number, radius: number | WrSquircleCorners, smoothing = 1): string {\n const corners: WrSquircleCorners =\n typeof radius === 'number'\n ? { topLeft: radius, topRight: radius, bottomRight: radius, bottomLeft: radius }\n : radius;\n\n // Budget per corner = half of the shorter dimension.\n const budget = Math.min(width / 2, height / 2);\n\n const tl = cornerParams(Math.min(corners.topLeft, budget), smoothing, budget);\n const tr = cornerParams(Math.min(corners.topRight, budget), smoothing, budget);\n const br = cornerParams(Math.min(corners.bottomRight, budget), smoothing, budget);\n const bl = cornerParams(Math.min(corners.bottomLeft, budget), smoothing, budget);\n\n return [\n `M ${tl.p} 0`,\n `L ${width - tr.p} 0`,\n drawCorner(tr, 'tr'),\n `L ${width} ${height - br.p}`,\n drawCorner(br, 'br'),\n `L ${bl.p} ${height}`,\n drawCorner(bl, 'bl'),\n `L 0 ${tl.p}`,\n drawCorner(tl, 'tl'),\n 'Z',\n ]\n .filter(Boolean)\n .join(' ');\n}\n\nexport { squirclePath };\nexport type { WrSquircleCorners };\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { coerceNumberProperty } from '@angular/cdk/coercion';\nimport { isPlatformBrowser } from '@angular/common';\nimport { DestroyRef, Directive, ElementRef, PLATFORM_ID, effect, inject, input, model } from '@angular/core';\n\nimport { squirclePath, type WrSquircleCorners } from './compute-squircle-path';\nimport type { WrSquircleCornerMask } from './interfaces';\n\n/**\n * Which corners to squircle. `'all'` = standard four-corner squircle;\n * the side-named values squircle the two corners on that side and leave\n * the other two at 90°. Useful for tab-/segment-style controls where\n * only outer corners need smoothing.\n */\nfunction maskToRadii(mask: WrSquircleCornerMask, r: number): WrSquircleCorners {\n switch (mask) {\n case 'left':\n return { topLeft: r, topRight: 0, bottomRight: 0, bottomLeft: r };\n case 'right':\n return { topLeft: 0, topRight: r, bottomRight: r, bottomLeft: 0 };\n case 'top':\n return { topLeft: r, topRight: r, bottomRight: 0, bottomLeft: 0 };\n case 'bottom':\n return { topLeft: 0, topRight: 0, bottomRight: r, bottomLeft: r };\n case 'none':\n return { topLeft: 0, topRight: 0, bottomRight: 0, bottomLeft: 0 };\n case 'all':\n default:\n return { topLeft: r, topRight: r, bottomRight: r, bottomLeft: r };\n }\n}\n\n/**\n * Apply a Figma-style smooth-corner (\"squircle\") `clip-path` to the host\n * element. Re-computes the path whenever the element resizes.\n *\n * @deprecated Use the native route instead — `@use 'ngwr/theme'` and the\n * `smooth-br` mixin, which 31 entry points already ride by default. This\n * directive exists because `corner-shape` was Chromium-only, and that reason\n * has an expiry date: WebKit has it in Technology Preview. It will be removed\n * in the major after Safari stable ships the property.\n *\n * It is deprecated rather than removed today because it is still the only\n * DETERMINISTIC squircle — the native property reaches roughly two thirds of\n * users and the rest see a rounded corner. If that difference matters to a\n * design, this is still the way to get it, with the costs stated: a hand-ported\n * superellipse, a `ResizeObserver` and a `getBoundingClientRect` per host on\n * every resize, square corners until hydration under SSR, no test harness, and\n * a clip that `box-shadow`, `border-image` and the focus ring do not follow.\n *\n * Borders: pass `[borderWidth]` (px) + `[borderColor]` and the directive\n * paints a `::before` pseudo with an *inset* squircle path on top of the\n * host. The visible border is the host's own background colour, so set\n * `background: <border-color>` on the host (or use the convenience\n * `[borderColor]` input which writes the host background for you).\n *\n * @example\n * ```html\n * <button wr-btn wrSquircle [radius]=\"16\">Save</button>\n * <wr-tag wrSquircle>v2.0</wr-tag>\n * <div wrSquircle [radius]=\"32\" [smoothing]=\"0.8\">…</div>\n * <div wrSquircle [borderWidth]=\"2\" borderColor=\"var(--wr-color-primary)\">…</div>\n * ```\n */\n@Directive({\n selector: '[wrSquircle]',\n exportAs: 'wrSquircle',\n host: { '[class.wr-squircle--bordered]': 'borderWidth() > 0 && enabled()' },\n})\nexport class WrSquircle {\n /** Corner radius in CSS pixels. Falls back to `--wr-border-radius-base` × 16. @default 12 */\n readonly radius = input(12, { transform: (v: unknown): number => Math.max(0, coerceNumberProperty(v, 12)) });\n\n /** Smoothing factor — `0` = plain rounded rect; `1` = full smooth iOS corner. @default 1 */\n readonly smoothing = input(1, {\n transform: (v: unknown): number => Math.min(1, Math.max(0, coerceNumberProperty(v, 1))),\n });\n\n /**\n * Whether the squircle clip-path is applied. When `false`, the directive\n * stays inert (clip-path cleared).\n *\n * Modelled as `model()` so a parent component composing this directive\n * (`inject(WrSquircle, { self: true }).enabled.set(...)`) can flip the\n * state from outside without exposing an `enabled` input on its own API.\n *\n * @default true\n */\n readonly enabled = model(true);\n\n /**\n * Border thickness in CSS pixels. `0` disables the border ring entirely.\n * Modelled (not `input()`) so parent components composing this directive\n * can flip it imperatively — e.g. `WrButton` turning on a 1px ring when\n * `shape=\"squircle\" outlined` is active.\n * @default 0\n */\n readonly borderWidth = model(0);\n\n /**\n * Border colour — any CSS colour. Applied to the host's background so the\n * outer squircle reveals it. Defaults to `currentColor` so the consuming\n * element's text colour drives the ring.\n * @default 'currentColor'\n */\n readonly borderColor = model<string>('currentColor');\n\n /**\n * Which corners to squircle. `'all'` (default) is the standard four-\n * corner shape; `'left'` / `'right'` / `'top'` / `'bottom'` squircle\n * only the two corners on the named side and leave the other two at\n * 90°. `'none'` is equivalent to disabling the directive.\n *\n * A `model()` rather than an `input()` so a parent composing the directive\n * can flip it imperatively. Nothing in the library does today: this line\n * used to name `WrButtonGroup` as the consumer, and that component has\n * carried no squircle reference for several releases — `wr-btn--squircle`\n * is plain CSS now.\n *\n * @default 'all'\n */\n readonly corners = model<WrSquircleCornerMask>('all');\n\n private readonly el = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private readonly destroyRef = inject(DestroyRef);\n private observer: ResizeObserver | null = null;\n\n constructor() {\n if (!this.isBrowser) return;\n const host = this.el.nativeElement;\n // Reactively re-apply when inputs change.\n effect(() => {\n this.radius();\n this.smoothing();\n this.enabled();\n this.borderWidth();\n this.borderColor();\n this.corners();\n this.apply();\n });\n // Re-apply on resize.\n this.observer = new ResizeObserver(() => this.apply());\n this.observer.observe(host);\n this.destroyRef.onDestroy(() => {\n this.observer?.disconnect();\n this.clear();\n });\n }\n\n private apply(): void {\n const host = this.el.nativeElement;\n if (!this.enabled()) {\n this.clear();\n return;\n }\n const rect = host.getBoundingClientRect();\n if (rect.width === 0 || rect.height === 0) return;\n\n const r = this.radius();\n const s = this.smoothing();\n const radii = maskToRadii(this.corners(), r);\n const outer = squirclePath(rect.width, rect.height, radii, s);\n const value = `path(\"${outer}\")`;\n host.style.clipPath = value;\n host.style.setProperty('-webkit-clip-path', value);\n\n // Border mode: paint an INNER squircle in a `::before` pseudo on top of\n // the host so the host's own bg only shows at the border-width perimeter.\n const bw = this.borderWidth();\n if (bw > 0) {\n const innerW = Math.max(0, rect.width - bw * 2);\n const innerH = Math.max(0, rect.height - bw * 2);\n const innerR = Math.max(0, r - bw);\n if (innerW > 0 && innerH > 0) {\n const innerRadii = maskToRadii(this.corners(), innerR);\n const inner = squirclePath(innerW, innerH, innerRadii, s);\n host.style.setProperty('--wr-squircle-inner-path', `path(\"${inner}\")`);\n }\n host.style.setProperty('--wr-squircle-border-width', `${bw}px`);\n // Only set the colour var inline when the consumer asked for a\n // specific colour. Leaving the default `'currentColor'` un-inlined\n // lets host CSS (e.g. WrButton's outlined-squircle rule) override\n // the var via SCSS without losing to inline-style specificity.\n const bc = this.borderColor();\n if (bc && bc !== 'currentColor') {\n host.style.setProperty('--wr-squircle-border-color', bc);\n } else {\n host.style.removeProperty('--wr-squircle-border-color');\n }\n } else {\n host.style.removeProperty('--wr-squircle-inner-path');\n host.style.removeProperty('--wr-squircle-border-width');\n host.style.removeProperty('--wr-squircle-border-color');\n }\n }\n\n private clear(): void {\n const host = this.el.nativeElement;\n host.style.removeProperty('clip-path');\n host.style.removeProperty('-webkit-clip-path');\n host.style.removeProperty('--wr-squircle-inner-path');\n host.style.removeProperty('--wr-squircle-border-width');\n host.style.removeProperty('--wr-squircle-border-color');\n }\n}\n\nexport type { WrSquircleCornerMask } from './interfaces';\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Component, ViewEncapsulation } from '@angular/core';\n\nimport { WrSquircle } from './wr-squircle';\n\n/**\n * Standalone squircle container. Equivalent to `<div wrSquircle>` but\n * named for ergonomics in templates.\n *\n * @example\n * ```html\n * <wr-squircle [radius]=\"24\" style=\"width: 160px; height: 160px; background: var(--wr-color-primary)\">\n * …\n * </wr-squircle>\n * ```\n *\n * @see https://ngwr.dev/reference/components/squircle\n *\n * @deprecated Follows `[wrSquircle]`, which it wraps — see that directive\n * for why, and for the native route to use instead.\n */\n@Component({\n selector: 'wr-squircle',\n template: '<ng-content />',\n encapsulation: ViewEncapsulation.None,\n host: { class: 'wr-squircle' },\n hostDirectives: [{ directive: WrSquircle, inputs: ['radius', 'smoothing', 'borderWidth', 'borderColor'] }],\n})\nexport class WrSquircleHost {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAAA;;;;;;;;;AASG;AAoBH,SAAS,SAAS,CAAC,GAAW,EAAA;IAC5B,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC,EAAE,IAAI,GAAG;AAC9B;AAEA,SAAS,YAAY,CAAC,YAAoB,EAAE,eAAuB,EAAE,MAAc,EAAA;AACjF,IAAA,IAAI,YAAY,IAAI,CAAC,EAAE;AACrB,QAAA,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,gBAAgB,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE;IAC/E;IACA,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,eAAe,IAAI,YAAY;;IAE5C,IAAI,CAAC,GAAG,eAAe;AACvB,IAAA,MAAM,YAAY,GAAG,MAAM,GAAG,YAAY,GAAG,CAAC;AAC9C,IAAA,IAAI,YAAY,GAAG,CAAC,EAAE;QACpB,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY,CAAC;QAC7B,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,YAAY;IAC5B;IACA,MAAM,UAAU,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;AAC/B,IAAA,MAAM,g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
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.
|
|
54
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrStarBorder, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
55
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.6", type: WrStarBorder, isStandalone: true, selector: "wr-star-border, [wr-star-border]", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, speed: { classPropertyName: "speed", publicName: "speed", isSignal: true, isRequired: false, transformFunction: null }, thickness: { classPropertyName: "thickness", publicName: "thickness", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, rays: { classPropertyName: "rays", publicName: "rays", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "style.--wr-star-border-color": "color()", "style.--wr-star-border-speed": "speed() + \"s\"", "style.padding": "thickness() + \"px 0\"" } }, ngImport: i0, template: "<span class=\"wr-star-border__ray wr-star-border__ray--bottom\" aria-hidden=\"true\"></span>\n<span class=\"wr-star-border__ray wr-star-border__ray--top\" aria-hidden=\"true\"></span>\n<span class=\"wr-star-border__inner\"><ng-content /></span>\n", styles: [".wr-star-border{--wr-star-border-color: var(--wr-color-primary);--wr-star-border-speed: 6s;--wr-star-border-radius: 20px;--wr-star-border-stop: 16%;--wr-star-border-opacity: 1;display:inline-block;position:relative;border:0;background:transparent;border-radius:var(--wr-star-border-radius);overflow:hidden;cursor:inherit}.wr-star-border__ray{position:absolute;display:block;width:300%;height:50%;opacity:var(--wr-star-border-opacity);border-radius:50%;background:radial-gradient(circle,var(--wr-star-border-color),transparent var(--wr-star-border-stop));animation:wr-star-border-bottom var(--wr-star-border-speed) linear infinite alternate;z-index:0}.wr-star-border__ray--bottom{bottom:-12px;right:-250%}.wr-star-border__ray--top{top:-12px;left:-250%;animation-name:wr-star-border-top}.wr-star-border--single .wr-star-border__ray--top{display:none}.wr-star-border--hover .wr-star-border__ray{opacity:0;animation:none}.wr-star-border--hover:hover .wr-star-border__ray{animation:wr-star-border-bottom var(--wr-star-border-speed) linear infinite alternate}.wr-star-border--hover:hover .wr-star-border__ray--top{animation-name:wr-star-border-top}.wr-star-border__inner{position:relative;display:block;border:1px solid var(--wr-color-outline);background:var(--wr-color-surface);color:var(--wr-color-on-surface);font-size:1rem;text-align:center;padding:1rem 1.625rem;border-radius:var(--wr-star-border-radius);z-index:1}@keyframes wr-star-border-bottom{0%{transform:translate(0);opacity:1}to{transform:translate(-100%);opacity:0}}@keyframes wr-star-border-top{0%{transform:translate(0);opacity:1}to{transform:translate(100%);opacity:0}}@media(prefers-reduced-motion:reduce){.wr-star-border__ray{animation:none!important;opacity:0!important}}\n"], encapsulation: i0.ViewEncapsulation.None });
|
|
56
56
|
}
|
|
57
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
57
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrStarBorder, decorators: [{
|
|
58
58
|
type: Component,
|
|
59
59
|
args: [{ selector: 'wr-star-border, [wr-star-border]', encapsulation: ViewEncapsulation.None, host: {
|
|
60
60
|
'[class]': 'classes()',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { coerceNumberProperty, coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject, LOCALE_ID, input, computed, signal, effect, untracked, ViewEncapsulation, Component, output,
|
|
3
|
+
import { inject, LOCALE_ID, input, computed, signal, effect, untracked, ViewEncapsulation, Component, output, PLATFORM_ID } from '@angular/core';
|
|
4
4
|
import { WrCountUp } from 'ngwr/counter';
|
|
5
5
|
import { useI18nText, useI18nFormatter } from 'ngwr/i18n';
|
|
6
6
|
import { WrPlatform } from 'ngwr/platform';
|
|
@@ -166,10 +166,10 @@ class WrStatistic {
|
|
|
166
166
|
return this.deltaFormat({ value, suffix: this.resolvedDeltaSuffix() });
|
|
167
167
|
}, /* @ts-ignore */
|
|
168
168
|
...(ngDevMode ? [{ debugName: "deltaText" }] : /* istanbul ignore next */ []));
|
|
169
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
170
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.
|
|
169
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrStatistic, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
170
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: WrStatistic, isStandalone: true, selector: "wr-statistic", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null }, suffix: { classPropertyName: "suffix", publicName: "suffix", isSignal: true, isRequired: false, transformFunction: null }, precision: { classPropertyName: "precision", publicName: "precision", isSignal: true, isRequired: false, transformFunction: null }, animate: { classPropertyName: "animate", publicName: "animate", isSignal: true, isRequired: false, transformFunction: null }, duration: { classPropertyName: "duration", publicName: "duration", isSignal: true, isRequired: false, transformFunction: null }, delta: { classPropertyName: "delta", publicName: "delta", isSignal: true, isRequired: false, transformFunction: null }, deltaSuffix: { classPropertyName: "deltaSuffix", publicName: "deltaSuffix", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "wr-statistic" }, ngImport: i0, template: "@if (label()) {\n <div class=\"wr-statistic__label\">{{ label() }}</div>\n}\n<div class=\"wr-statistic__value\">\n @if (prefix()) {\n <span class=\"wr-statistic__prefix\">{{ prefix() }}</span>\n }\n @if (animated()) {\n <wr-count-up\n class=\"wr-statistic__number\"\n [from]=\"animateFrom()\"\n [to]=\"numericValue() ?? 0\"\n [decimals]=\"precision()\"\n [duration]=\"duration()\"\n />\n } @else {\n <span class=\"wr-statistic__number\">{{ displayValue() }}</span>\n }\n @if (suffix()) {\n <span class=\"wr-statistic__suffix\">{{ suffix() }}</span>\n }\n</div>\n@if (hasDelta()) {\n <div [class]=\"`wr-statistic__delta wr-statistic__delta--${deltaDirection()}`\">\n @if (deltaDirection() === 'up') {\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <path d=\"M5 1 L9 8 L1 8 Z\" fill=\"currentColor\" />\n </svg>\n } @else if (deltaDirection() === 'down') {\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <path d=\"M5 9 L9 2 L1 2 Z\" fill=\"currentColor\" />\n </svg>\n }\n <span>{{ deltaText() }}</span>\n </div>\n}\n", dependencies: [{ kind: "component", type: WrCountUp, selector: "wr-count-up", inputs: ["from", "to", "duration", "delay", "easing", "trigger", "direction", "decimals", "prefix", "suffix", "grouping"], outputs: ["started", "completed"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
171
171
|
}
|
|
172
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
172
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrStatistic, decorators: [{
|
|
173
173
|
type: Component,
|
|
174
174
|
args: [{ selector: 'wr-statistic', encapsulation: ViewEncapsulation.None, host: { class: 'wr-statistic' }, imports: [WrCountUp], template: "@if (label()) {\n <div class=\"wr-statistic__label\">{{ label() }}</div>\n}\n<div class=\"wr-statistic__value\">\n @if (prefix()) {\n <span class=\"wr-statistic__prefix\">{{ prefix() }}</span>\n }\n @if (animated()) {\n <wr-count-up\n class=\"wr-statistic__number\"\n [from]=\"animateFrom()\"\n [to]=\"numericValue() ?? 0\"\n [decimals]=\"precision()\"\n [duration]=\"duration()\"\n />\n } @else {\n <span class=\"wr-statistic__number\">{{ displayValue() }}</span>\n }\n @if (suffix()) {\n <span class=\"wr-statistic__suffix\">{{ suffix() }}</span>\n }\n</div>\n@if (hasDelta()) {\n <div [class]=\"`wr-statistic__delta wr-statistic__delta--${deltaDirection()}`\">\n @if (deltaDirection() === 'up') {\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <path d=\"M5 1 L9 8 L1 8 Z\" fill=\"currentColor\" />\n </svg>\n } @else if (deltaDirection() === 'down') {\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <path d=\"M5 9 L9 2 L1 2 Z\" fill=\"currentColor\" />\n </svg>\n }\n <span>{{ deltaText() }}</span>\n </div>\n}\n" }]
|
|
175
175
|
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], prefix: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefix", required: false }] }], suffix: [{ type: i0.Input, args: [{ isSignal: true, alias: "suffix", required: false }] }], precision: [{ type: i0.Input, args: [{ isSignal: true, alias: "precision", required: false }] }], animate: [{ type: i0.Input, args: [{ isSignal: true, alias: "animate", required: false }] }], duration: [{ type: i0.Input, args: [{ isSignal: true, alias: "duration", required: false }] }], delta: [{ type: i0.Input, args: [{ isSignal: true, alias: "delta", required: false }] }], deltaSuffix: [{ type: i0.Input, args: [{ isSignal: true, alias: "deltaSuffix", required: false }] }] } });
|
|
@@ -271,7 +271,6 @@ class WrStatisticCountdown {
|
|
|
271
271
|
tickMs = input(1000, { ...(ngDevMode ? { debugName: "tickMs" } : /* istanbul ignore next */ {}), transform: (v) => Math.max(16, numAttr(1000)(v)) });
|
|
272
272
|
/** Fires once when the countdown crosses zero. */
|
|
273
273
|
countdownEnd = output();
|
|
274
|
-
destroyRef = inject(DestroyRef);
|
|
275
274
|
isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
276
275
|
targetMs = computed(() => toMs(this.target()), /* @ts-ignore */
|
|
277
276
|
...(ngDevMode ? [{ debugName: "targetMs" }] : /* istanbul ignore next */ []));
|
|
@@ -306,9 +305,17 @@ class WrStatisticCountdown {
|
|
|
306
305
|
});
|
|
307
306
|
if (!this.isBrowser)
|
|
308
307
|
return;
|
|
309
|
-
|
|
308
|
+
// The interval is REBUILT when `tickMs` changes, which is what makes the
|
|
309
|
+
// input bindable rather than an authoring-time constant. Read once from
|
|
310
|
+
// inside `afterNextRender` it was a plain, untracked read, so
|
|
311
|
+
// `[tickMs]="precise() ? 16 : 1000"` kept whatever period the first frame
|
|
312
|
+
// saw and nothing looked wrong — the countdown still counted. Same shape
|
|
313
|
+
// `wr-rotating-text` uses for its own rotation period; the `onCleanup` is
|
|
314
|
+
// what keeps a period change from leaving the old interval running beside
|
|
315
|
+
// the new one.
|
|
316
|
+
effect(onCleanup => {
|
|
310
317
|
const handle = setInterval(() => this.tick(), this.tickMs());
|
|
311
|
-
|
|
318
|
+
onCleanup(() => clearInterval(handle));
|
|
312
319
|
});
|
|
313
320
|
}
|
|
314
321
|
tick() {
|
|
@@ -321,10 +328,10 @@ class WrStatisticCountdown {
|
|
|
321
328
|
this.countdownEnd.emit();
|
|
322
329
|
}
|
|
323
330
|
}
|
|
324
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
325
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.
|
|
331
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrStatisticCountdown, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
332
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: WrStatisticCountdown, isStandalone: true, selector: "wr-statistic-countdown", inputs: { target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, format: { classPropertyName: "format", publicName: "format", isSignal: true, isRequired: false, transformFunction: null }, endText: { classPropertyName: "endText", publicName: "endText", isSignal: true, isRequired: false, transformFunction: null }, tickMs: { classPropertyName: "tickMs", publicName: "tickMs", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { countdownEnd: "countdownEnd" }, host: { classAttribute: "wr-statistic" }, ngImport: i0, template: "@if (label()) {\n <div class=\"wr-statistic__label\">{{ label() }}</div>\n}\n<div class=\"wr-statistic__value\">\n <span class=\"wr-statistic__number\">{{ display() }}</span>\n</div>\n", encapsulation: i0.ViewEncapsulation.None });
|
|
326
333
|
}
|
|
327
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
334
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrStatisticCountdown, decorators: [{
|
|
328
335
|
type: Component,
|
|
329
336
|
args: [{ selector: 'wr-statistic-countdown', encapsulation: ViewEncapsulation.None, host: { class: 'wr-statistic' }, template: "@if (label()) {\n <div class=\"wr-statistic__label\">{{ label() }}</div>\n}\n<div class=\"wr-statistic__value\">\n <span class=\"wr-statistic__number\">{{ display() }}</span>\n</div>\n" }]
|
|
330
337
|
}], ctorParameters: () => [], propDecorators: { target: [{ type: i0.Input, args: [{ isSignal: true, alias: "target", required: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], format: [{ type: i0.Input, args: [{ isSignal: true, alias: "format", required: false }] }], endText: [{ type: i0.Input, args: [{ isSignal: true, alias: "endText", required: false }] }], tickMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "tickMs", required: false }] }], countdownEnd: [{ type: i0.Output, args: ["countdownEnd"] }] } });
|
|
@@ -367,10 +374,10 @@ class WrStatisticGroup {
|
|
|
367
374
|
* width allows. @default 0
|
|
368
375
|
*/
|
|
369
376
|
columns = input(0, { ...(ngDevMode ? { debugName: "columns" } : /* istanbul ignore next */ {}), transform: (v) => Math.max(0, coerceNumberProperty(v, 0)) });
|
|
370
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
371
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.
|
|
377
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrStatisticGroup, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
378
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.6", type: WrStatisticGroup, isStandalone: true, selector: "wr-statistic-group", inputs: { min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.--wr-statistic-group-min": "min()", "style.--wr-statistic-group-columns": "columns() || null" }, classAttribute: "wr-statistic-group" }, ngImport: i0, template: '<div class="wr-statistic-group__grid"><ng-content /></div>', isInline: true, encapsulation: i0.ViewEncapsulation.None });
|
|
372
379
|
}
|
|
373
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
380
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrStatisticGroup, decorators: [{
|
|
374
381
|
type: Component,
|
|
375
382
|
args: [{
|
|
376
383
|
selector: 'wr-statistic-group',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-statistic.mjs","sources":["../../../projects/lib/statistic/statistic.ts","../../../projects/lib/statistic/statistic.html","../../../projects/lib/statistic/statistic-countdown.ts","../../../projects/lib/statistic/statistic-countdown.html","../../../projects/lib/statistic/statistic-group.ts","../../../projects/lib/statistic/ngwr-statistic.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';\nimport {\n Component,\n LOCALE_ID,\n ViewEncapsulation,\n computed,\n effect,\n inject,\n input,\n signal,\n untracked,\n} from '@angular/core';\n\nimport { WrCountUp } from 'ngwr/counter';\nimport { useI18nFormatter, useI18nText } from 'ngwr/i18n';\nimport { WrPlatform } from 'ngwr/platform';\nimport { numAttr } from 'ngwr/utils';\n\n/**\n * KPI card — label + big number + optional prefix/suffix + delta. Pair\n * with `<wr-statistic-group>` for a responsive dashboard grid.\n *\n * When `value` is numeric the number counts up (eased) from its previous\n * value to the new one on every change — see `animate`. String values and\n * `prefers-reduced-motion` render instantly.\n *\n * @example\n * ```html\n * <wr-statistic label=\"Active users\" [value]=\"12345\" suffix=\"users\" />\n * <wr-statistic label=\"Revenue\" [value]=\"9512\" prefix=\"$\" [delta]=\"12.4\" />\n * <wr-statistic label=\"Churn\" [value]=\"1.8\" suffix=\"%\" [precision]=\"1\" />\n * ```\n *\n * @see https://ngwr.dev/reference/components/statistic\n */\n@Component({\n selector: 'wr-statistic',\n templateUrl: './statistic.html',\n encapsulation: ViewEncapsulation.None,\n host: { class: 'wr-statistic' },\n imports: [WrCountUp],\n})\nexport class WrStatistic {\n private readonly platform = inject(WrPlatform);\n private readonly locale = inject(LOCALE_ID);\n\n readonly label = input<string>('');\n\n /** The number (or string) to display in the main slot. */\n readonly value = input<number | string | null>(null);\n\n /** Prefix glyph / symbol (e.g. `'$'`). */\n readonly prefix = input<string>('');\n\n /** Suffix glyph / unit (e.g. `'%'`, `'kg'`). */\n readonly suffix = input<string>('');\n\n /** Fixed number of decimals applied to numeric values. @default 0 */\n readonly precision = input(0, { transform: (v: unknown): number => Math.max(0, coerceNumberProperty(v, 0)) });\n\n /**\n * Count up to a new numeric `value` instead of swapping instantly. Always\n * off for string values or under `prefers-reduced-motion`. @default true\n */\n readonly animate = input(true, { transform: coerceBooleanProperty });\n\n /** Count-up duration (ms). @default 700 */\n readonly duration = input(700, { transform: numAttr(700) });\n\n /**\n * The current value coerced to a finite number, or `null` when `value` is\n * a non-numeric string / empty / nullish (rendered as-is).\n */\n protected readonly numericValue = computed<number | null>(() => {\n const raw = this.value();\n if (raw === null || raw === '') return null;\n const n = typeof raw === 'number' ? raw : coerceNumberProperty(raw, Number.NaN);\n return Number.isFinite(n) ? n : null;\n });\n\n /** Whether the value should count up (browser, numeric, opted-in, motion allowed). */\n protected readonly animated = computed<boolean>(\n () =>\n this.platform.isBrowser && this.animate() && !this.platform.prefersReducedMotion() && this.numericValue() !== null\n );\n\n /** Animation start — the previously-rendered numeric value (0 on first paint). */\n protected readonly animateFrom = signal(0);\n\n /** Bookkeeping: the last numeric value seen, fed back as the next `from`. */\n private readonly lastNumeric = signal(0);\n\n constructor() {\n // Whenever the numeric value changes, snapshot the prior value as the\n // count-up start, then remember the new one for the next transition.\n effect(() => {\n const next = this.numericValue();\n if (next === null) return;\n untracked(() => {\n this.animateFrom.set(this.lastNumeric());\n this.lastNumeric.set(next);\n });\n });\n }\n\n /**\n * Static (non-animated) display string. Numeric values honour `precision`\n * and locale grouping so they match the count-up output; everything else\n * renders verbatim with an em-dash fallback.\n */\n protected readonly displayValue = computed<string>(() => {\n const n = this.numericValue();\n if (n !== null) {\n return new Intl.NumberFormat(this.locale, {\n minimumFractionDigits: this.precision(),\n maximumFractionDigits: this.precision(),\n }).format(n);\n }\n // `numericValue` above already reads `''` as \"no value\"; rendering it\n // verbatim put an empty card on screen instead of the placeholder.\n const raw = this.value();\n return raw === null || raw === undefined || raw === '' ? '—' : String(raw);\n });\n\n /**\n * Optional delta vs previous period — shown as `+x.x%` (or `-x.x%`).\n * Use `deltaSuffix` to change the trailing unit.\n */\n readonly delta = input<number | null>(null, {\n transform: (v: unknown): number | null => {\n if (v === null || v === undefined || v === '') return null;\n const n = coerceNumberProperty(v, Number.NaN);\n return Number.isFinite(n) ? n : null;\n },\n });\n\n // The default moved from the literal `'%'` to `null` so the catalog gets a\n // say. `%` is a string the LIBRARY owns and no locale could reach: a locale\n // that writes it differently — or writes it as a word — had nowhere to put\n // that but a per-instance binding on every `<wr-statistic>` on the page. A\n // bound value still wins, exactly as before, which is what makes this safe.\n /** Unit appended to the delta value. Falls back to `statistic.deltaSuffix`, then `'%'`. */\n readonly deltaSuffix = input<string | null>(null);\n\n protected readonly hasDelta = computed(() => this.delta() !== null);\n\n protected readonly deltaDirection = computed<'up' | 'down' | 'flat'>(() => {\n const d = this.delta();\n if (d === null || d === 0) return 'flat';\n return d > 0 ? 'up' : 'down';\n });\n\n protected readonly resolvedDeltaSuffix = useI18nText(this.deltaSuffix, 'statistic.deltaSuffix', '%');\n\n /** `{{value}}{{suffix}}` — the join, so a locale owns the space before the unit. */\n private readonly deltaFormat = useI18nFormatter('statistic.delta', '{{value}}{{suffix}}');\n\n /**\n * The delta chip, e.g. `+12.4%`.\n *\n * It was `` `${sign}${d}${suffix}` ``, printed one line under a value that\n * goes through `Intl.NumberFormat` — so the two disagreed inside one\n * component: ar-SA showed `١٬٢٣٤٬٥٦٧٫٨٩` above a Latin `12.4%`, and de-DE\n * `1.234.567,89` above `+12.4%`. The sign comes from `signDisplay`, which also\n * fixes the RTL half of it: `+` written by hand is a neutral character that\n * the BiDi algorithm moves to the other end of the number.\n *\n * The digit count is taken from the number rather than from `precision()`,\n * which describes the VALUE and not the delta — so what renders is the same\n * digits as before, in the locale's own numerals. One exception, and it is an\n * improvement rather than a regression: a magnitude JavaScript prints in\n * exponent notation (`1e-7`, `1e+21`) used to reach the DOM that way and is\n * now formatted as a number.\n */\n protected readonly deltaText = computed(() => {\n const d = this.delta();\n if (d === null) return '';\n const decimals = Math.min(20, (String(Math.abs(d)).split('.')[1] ?? '').length);\n const value = new Intl.NumberFormat(this.locale, {\n signDisplay: 'exceptZero',\n minimumFractionDigits: decimals,\n maximumFractionDigits: decimals,\n }).format(d);\n return this.deltaFormat({ value, suffix: this.resolvedDeltaSuffix() });\n });\n}\n","@if (label()) {\n <div class=\"wr-statistic__label\">{{ label() }}</div>\n}\n<div class=\"wr-statistic__value\">\n @if (prefix()) {\n <span class=\"wr-statistic__prefix\">{{ prefix() }}</span>\n }\n @if (animated()) {\n <wr-count-up\n class=\"wr-statistic__number\"\n [from]=\"animateFrom()\"\n [to]=\"numericValue() ?? 0\"\n [decimals]=\"precision()\"\n [duration]=\"duration()\"\n />\n } @else {\n <span class=\"wr-statistic__number\">{{ displayValue() }}</span>\n }\n @if (suffix()) {\n <span class=\"wr-statistic__suffix\">{{ suffix() }}</span>\n }\n</div>\n@if (hasDelta()) {\n <div [class]=\"`wr-statistic__delta wr-statistic__delta--${deltaDirection()}`\">\n @if (deltaDirection() === 'up') {\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <path d=\"M5 1 L9 8 L1 8 Z\" fill=\"currentColor\" />\n </svg>\n } @else if (deltaDirection() === 'down') {\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <path d=\"M5 9 L9 2 L1 2 Z\" fill=\"currentColor\" />\n </svg>\n }\n <span>{{ deltaText() }}</span>\n </div>\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n Component,\n DestroyRef,\n PLATFORM_ID,\n ViewEncapsulation,\n afterNextRender,\n computed,\n effect,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\n\nimport { numAttr } from 'ngwr/utils';\n\n// Helpers\n\nfunction toMs(value: Date | string | number): number {\n if (value instanceof Date) return value.getTime();\n if (typeof value === 'number') return value;\n return new Date(value).getTime();\n}\n\nfunction pad(n: number, width: number): string {\n return String(n).padStart(width, '0');\n}\n\nfunction formatRemaining(ms: number, fmt: string): string {\n const days = Math.floor(ms / 86_400_000);\n const hours = Math.floor((ms % 86_400_000) / 3_600_000);\n const minutes = Math.floor((ms % 3_600_000) / 60_000);\n const seconds = Math.floor((ms % 60_000) / 1000);\n const millis = ms % 1000;\n // Single-pass tokenizer so we never re-scan output for tokens. The\n // previous sequential `.replace()` chain leaked: e.g. `D days HH:mm:ss`\n // → `1 day42 11:59:42` because the `/s/g` step at the end re-matched\n // the literal `s` inside `days`. Longest-token-first ordering inside\n // the alternation handles `DD`>`D`, `HH`>`H`, `mm`>`m`, `SSS`>`ss`>`s`.\n return fmt.replace(/(?<![A-Za-z])(?:SSS|DD|HH|mm|ss|D|H|m|s)(?![A-Za-z])/g, token => {\n switch (token) {\n case 'DD':\n return pad(days, 2);\n case 'D':\n return String(days);\n case 'HH':\n return pad(hours, 2);\n case 'H':\n return String(hours);\n case 'mm':\n return pad(minutes, 2);\n case 'm':\n return String(minutes);\n case 'ss':\n return pad(seconds, 2);\n case 's':\n return String(seconds);\n case 'SSS':\n return pad(millis, 3);\n default:\n return token;\n }\n });\n}\n\n/**\n * Live-counting variant of `<wr-statistic>` that targets a future date\n * and ticks down to zero. The format string uses Day/Hour/Minute/Second\n * tokens (`D`, `H`, `m`, `s`, double for zero-padded, plus `SSS` for\n * milliseconds).\n *\n * @example\n * ```html\n * <wr-statistic-countdown\n * label=\"Launch in\"\n * [target]=\"launchDate\"\n * format=\"D days HH:mm:ss\"\n * (countdownEnd)=\"onLive()\"\n * />\n * ```\n *\n * @see https://ngwr.dev/reference/components/statistic\n */\n@Component({\n selector: 'wr-statistic-countdown',\n templateUrl: './statistic-countdown.html',\n encapsulation: ViewEncapsulation.None,\n host: { class: 'wr-statistic' },\n})\nexport class WrStatisticCountdown {\n /** Target date / timestamp the countdown is running down to. */\n readonly target = input.required<Date | string | number>();\n\n /** Label rendered above the value. */\n readonly label = input<string>('');\n\n /**\n * Format string. Tokens: `D`/`DD` (days), `H`/`HH` (hours),\n * `m`/`mm` (minutes), `s`/`ss` (seconds), `SSS` (milliseconds).\n * Double-letter forms zero-pad to width 2. @default 'HH:mm:ss'\n */\n readonly format = input<string>('HH:mm:ss');\n\n /** Optional text shown once the countdown reaches zero. */\n readonly endText = input<string | null>(null);\n\n /**\n * Tick interval in ms. Drop to ~16 for `SSS` (millisecond display). Floored\n * at one frame — `0` (or an unparseable value) asked `setInterval` to run as\n * fast as the browser would allow, which is a busy loop, not a countdown.\n * @default 1000\n */\n readonly tickMs = input(1000, { transform: (v: unknown): number => Math.max(16, numAttr(1000)(v)) });\n\n /** Fires once when the countdown crosses zero. */\n readonly countdownEnd = output<void>();\n\n private readonly destroyRef = inject(DestroyRef);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n private readonly targetMs = computed(() => toMs(this.target()));\n\n /**\n * Milliseconds left, or `null` when `target` does not parse to a date at all.\n * `new Date('nope').getTime()` is `NaN`, and `NaN` propagated all the way to\n * the screen as `NaN:NaN:NaN` — and, worse, `tick` compared it to `0` and so\n * never fired `countdownEnd`, while a guard that only clamped the text would\n * have fired it immediately for a target that was never reached.\n */\n private remainingMs(): number | null {\n const target = this.targetMs();\n return Number.isFinite(target) ? Math.max(0, target - Date.now()) : null;\n }\n\n /** Remaining milliseconds (live signal). */\n protected readonly remaining = signal(0);\n protected readonly finished = signal(false);\n\n protected readonly display = computed(() => {\n if (this.finished() && this.endText() != null) return this.endText()!;\n return formatRemaining(this.remaining(), this.format());\n });\n\n constructor() {\n // Seed once synchronously so SSR / first paint shows a sane value.\n effect(() => {\n const ms = this.remainingMs();\n this.remaining.set(ms ?? 0);\n this.finished.set(ms === 0);\n });\n\n if (!this.isBrowser) return;\n\n afterNextRender(() => {\n const handle = setInterval(() => this.tick(), this.tickMs());\n this.destroyRef.onDestroy(() => clearInterval(handle));\n });\n }\n\n private tick(): void {\n const ms = this.remainingMs();\n if (ms === null) return;\n this.remaining.set(ms);\n if (ms === 0 && !this.finished()) {\n this.finished.set(true);\n this.countdownEnd.emit();\n }\n }\n}\n","@if (label()) {\n <div class=\"wr-statistic__label\">{{ label() }}</div>\n}\n<div class=\"wr-statistic__value\">\n <span class=\"wr-statistic__number\">{{ display() }}</span>\n</div>\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { coerceNumberProperty } from '@angular/cdk/coercion';\nimport { Component, ViewEncapsulation, input } from '@angular/core';\n\n/**\n * Dashboard grid for `<wr-statistic>` cards. The column count follows the\n * group's OWN width — an intrinsic container-query grid sized by its box, not\n * a viewport media query — so it reflows correctly inside any column, card, or\n * split pane. Columns are never narrower than `min`; `columns` optionally caps\n * how many ever sit side by side on a wide container.\n *\n * @example\n * ```html\n * <wr-statistic-group [columns]=\"4\" min=\"11rem\">\n * <wr-statistic label=\"Active users\" [value]=\"12345\" />\n * <wr-statistic label=\"Revenue\" [value]=\"9512\" prefix=\"$\" [delta]=\"12.4\" />\n * <wr-statistic label=\"Churn\" [value]=\"1.8\" suffix=\"%\" [delta]=\"-0.4\" />\n * <wr-statistic label=\"Sessions\" [value]=\"48210\" />\n * </wr-statistic-group>\n * ```\n *\n * @see https://ngwr.dev/reference/components/statistic\n */\n@Component({\n selector: 'wr-statistic-group',\n template: '<div class=\"wr-statistic-group__grid\"><ng-content /></div>',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-statistic-group',\n '[style.--wr-statistic-group-min]': 'min()',\n '[style.--wr-statistic-group-columns]': 'columns() || null',\n },\n})\nexport class WrStatisticGroup {\n /**\n * Minimum width of each column before the grid reflows to fewer columns.\n * Any CSS length — smaller packs more cards per row. @default '12rem'\n */\n readonly min = input<string>('12rem');\n\n /**\n * Cap on how many columns ever sit side by side on a wide container. `0`\n * (default) leaves it uncapped — fit as many `min`-wide columns as the\n * width allows. @default 0\n */\n readonly columns = input(0, { transform: (v: unknown): number => Math.max(0, coerceNumberProperty(v, 0)) });\n}\n","/**\n * Gener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AGG;IACM,GAAG,GAAG,KAAK,CAAS,OAAO;4EAAC;AAErC;;;;AAIG;IACM,OAAO,GAAG,KAAK,CAAC,CAAC,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,SAAA,EAAA,8BAAA,EAAA,CAAA,EAAI,SAAS,EAAE,CAAC,CAAU,KAAa,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAA,CAAG;uGAZhG,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAhB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,gBAAgB,gfARjB,4DAA4D,EAAA,QAAA,EAAA,IAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAQ3D,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAV5B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,oBAAoB;AAC9B,oBAAA,QAAQ,EAAE,4DAA4D;oBACtE,aAAa,EAAE,iBAAiB,CAAC,IAAI;AACrC,oBAAA,IAAI,EAAE;AACJ,wBAAA,KAAK,EAAE,oBAAoB;AAC3B,wBAAA,kCAAkC,EAAE,OAAO;AAC3C,wBAAA,sCAAsC,EAAE,mBAAmB;AAC5D,qBAAA;AACF,iBAAA;;;ACtCD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngwr-statistic.mjs","sources":["../../../projects/lib/statistic/statistic.ts","../../../projects/lib/statistic/statistic.html","../../../projects/lib/statistic/statistic-countdown.ts","../../../projects/lib/statistic/statistic-countdown.html","../../../projects/lib/statistic/statistic-group.ts","../../../projects/lib/statistic/ngwr-statistic.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';\nimport {\n Component,\n LOCALE_ID,\n ViewEncapsulation,\n computed,\n effect,\n inject,\n input,\n signal,\n untracked,\n} from '@angular/core';\n\nimport { WrCountUp } from 'ngwr/counter';\nimport { useI18nFormatter, useI18nText } from 'ngwr/i18n';\nimport { WrPlatform } from 'ngwr/platform';\nimport { numAttr } from 'ngwr/utils';\n\n/**\n * KPI card — label + big number + optional prefix/suffix + delta. Pair\n * with `<wr-statistic-group>` for a responsive dashboard grid.\n *\n * When `value` is numeric the number counts up (eased) from its previous\n * value to the new one on every change — see `animate`. String values and\n * `prefers-reduced-motion` render instantly.\n *\n * @example\n * ```html\n * <wr-statistic label=\"Active users\" [value]=\"12345\" suffix=\"users\" />\n * <wr-statistic label=\"Revenue\" [value]=\"9512\" prefix=\"$\" [delta]=\"12.4\" />\n * <wr-statistic label=\"Churn\" [value]=\"1.8\" suffix=\"%\" [precision]=\"1\" />\n * ```\n *\n * @see https://ngwr.dev/reference/components/statistic\n */\n@Component({\n selector: 'wr-statistic',\n templateUrl: './statistic.html',\n encapsulation: ViewEncapsulation.None,\n host: { class: 'wr-statistic' },\n imports: [WrCountUp],\n})\nexport class WrStatistic {\n private readonly platform = inject(WrPlatform);\n private readonly locale = inject(LOCALE_ID);\n\n readonly label = input<string>('');\n\n /** The number (or string) to display in the main slot. */\n readonly value = input<number | string | null>(null);\n\n /** Prefix glyph / symbol (e.g. `'$'`). */\n readonly prefix = input<string>('');\n\n /** Suffix glyph / unit (e.g. `'%'`, `'kg'`). */\n readonly suffix = input<string>('');\n\n /** Fixed number of decimals applied to numeric values. @default 0 */\n readonly precision = input(0, { transform: (v: unknown): number => Math.max(0, coerceNumberProperty(v, 0)) });\n\n /**\n * Count up to a new numeric `value` instead of swapping instantly. Always\n * off for string values or under `prefers-reduced-motion`. @default true\n */\n readonly animate = input(true, { transform: coerceBooleanProperty });\n\n /** Count-up duration (ms). @default 700 */\n readonly duration = input(700, { transform: numAttr(700) });\n\n /**\n * The current value coerced to a finite number, or `null` when `value` is\n * a non-numeric string / empty / nullish (rendered as-is).\n */\n protected readonly numericValue = computed<number | null>(() => {\n const raw = this.value();\n if (raw === null || raw === '') return null;\n const n = typeof raw === 'number' ? raw : coerceNumberProperty(raw, Number.NaN);\n return Number.isFinite(n) ? n : null;\n });\n\n /** Whether the value should count up (browser, numeric, opted-in, motion allowed). */\n protected readonly animated = computed<boolean>(\n () =>\n this.platform.isBrowser && this.animate() && !this.platform.prefersReducedMotion() && this.numericValue() !== null\n );\n\n /** Animation start — the previously-rendered numeric value (0 on first paint). */\n protected readonly animateFrom = signal(0);\n\n /** Bookkeeping: the last numeric value seen, fed back as the next `from`. */\n private readonly lastNumeric = signal(0);\n\n constructor() {\n // Whenever the numeric value changes, snapshot the prior value as the\n // count-up start, then remember the new one for the next transition.\n effect(() => {\n const next = this.numericValue();\n if (next === null) return;\n untracked(() => {\n this.animateFrom.set(this.lastNumeric());\n this.lastNumeric.set(next);\n });\n });\n }\n\n /**\n * Static (non-animated) display string. Numeric values honour `precision`\n * and locale grouping so they match the count-up output; everything else\n * renders verbatim with an em-dash fallback.\n */\n protected readonly displayValue = computed<string>(() => {\n const n = this.numericValue();\n if (n !== null) {\n return new Intl.NumberFormat(this.locale, {\n minimumFractionDigits: this.precision(),\n maximumFractionDigits: this.precision(),\n }).format(n);\n }\n // `numericValue` above already reads `''` as \"no value\"; rendering it\n // verbatim put an empty card on screen instead of the placeholder.\n const raw = this.value();\n return raw === null || raw === undefined || raw === '' ? '—' : String(raw);\n });\n\n /**\n * Optional delta vs previous period — shown as `+x.x%` (or `-x.x%`).\n * Use `deltaSuffix` to change the trailing unit.\n */\n readonly delta = input<number | null>(null, {\n transform: (v: unknown): number | null => {\n if (v === null || v === undefined || v === '') return null;\n const n = coerceNumberProperty(v, Number.NaN);\n return Number.isFinite(n) ? n : null;\n },\n });\n\n // The default moved from the literal `'%'` to `null` so the catalog gets a\n // say. `%` is a string the LIBRARY owns and no locale could reach: a locale\n // that writes it differently — or writes it as a word — had nowhere to put\n // that but a per-instance binding on every `<wr-statistic>` on the page. A\n // bound value still wins, exactly as before, which is what makes this safe.\n /** Unit appended to the delta value. Falls back to `statistic.deltaSuffix`, then `'%'`. */\n readonly deltaSuffix = input<string | null>(null);\n\n protected readonly hasDelta = computed(() => this.delta() !== null);\n\n protected readonly deltaDirection = computed<'up' | 'down' | 'flat'>(() => {\n const d = this.delta();\n if (d === null || d === 0) return 'flat';\n return d > 0 ? 'up' : 'down';\n });\n\n protected readonly resolvedDeltaSuffix = useI18nText(this.deltaSuffix, 'statistic.deltaSuffix', '%');\n\n /** `{{value}}{{suffix}}` — the join, so a locale owns the space before the unit. */\n private readonly deltaFormat = useI18nFormatter('statistic.delta', '{{value}}{{suffix}}');\n\n /**\n * The delta chip, e.g. `+12.4%`.\n *\n * It was `` `${sign}${d}${suffix}` ``, printed one line under a value that\n * goes through `Intl.NumberFormat` — so the two disagreed inside one\n * component: ar-SA showed `١٬٢٣٤٬٥٦٧٫٨٩` above a Latin `12.4%`, and de-DE\n * `1.234.567,89` above `+12.4%`. The sign comes from `signDisplay`, which also\n * fixes the RTL half of it: `+` written by hand is a neutral character that\n * the BiDi algorithm moves to the other end of the number.\n *\n * The digit count is taken from the number rather than from `precision()`,\n * which describes the VALUE and not the delta — so what renders is the same\n * digits as before, in the locale's own numerals. One exception, and it is an\n * improvement rather than a regression: a magnitude JavaScript prints in\n * exponent notation (`1e-7`, `1e+21`) used to reach the DOM that way and is\n * now formatted as a number.\n */\n protected readonly deltaText = computed(() => {\n const d = this.delta();\n if (d === null) return '';\n const decimals = Math.min(20, (String(Math.abs(d)).split('.')[1] ?? '').length);\n const value = new Intl.NumberFormat(this.locale, {\n signDisplay: 'exceptZero',\n minimumFractionDigits: decimals,\n maximumFractionDigits: decimals,\n }).format(d);\n return this.deltaFormat({ value, suffix: this.resolvedDeltaSuffix() });\n });\n}\n","@if (label()) {\n <div class=\"wr-statistic__label\">{{ label() }}</div>\n}\n<div class=\"wr-statistic__value\">\n @if (prefix()) {\n <span class=\"wr-statistic__prefix\">{{ prefix() }}</span>\n }\n @if (animated()) {\n <wr-count-up\n class=\"wr-statistic__number\"\n [from]=\"animateFrom()\"\n [to]=\"numericValue() ?? 0\"\n [decimals]=\"precision()\"\n [duration]=\"duration()\"\n />\n } @else {\n <span class=\"wr-statistic__number\">{{ displayValue() }}</span>\n }\n @if (suffix()) {\n <span class=\"wr-statistic__suffix\">{{ suffix() }}</span>\n }\n</div>\n@if (hasDelta()) {\n <div [class]=\"`wr-statistic__delta wr-statistic__delta--${deltaDirection()}`\">\n @if (deltaDirection() === 'up') {\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <path d=\"M5 1 L9 8 L1 8 Z\" fill=\"currentColor\" />\n </svg>\n } @else if (deltaDirection() === 'down') {\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <path d=\"M5 9 L9 2 L1 2 Z\" fill=\"currentColor\" />\n </svg>\n }\n <span>{{ deltaText() }}</span>\n </div>\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n Component,\n PLATFORM_ID,\n ViewEncapsulation,\n computed,\n effect,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\n\nimport { numAttr } from 'ngwr/utils';\n\n// Helpers\n\nfunction toMs(value: Date | string | number): number {\n if (value instanceof Date) return value.getTime();\n if (typeof value === 'number') return value;\n return new Date(value).getTime();\n}\n\nfunction pad(n: number, width: number): string {\n return String(n).padStart(width, '0');\n}\n\nfunction formatRemaining(ms: number, fmt: string): string {\n const days = Math.floor(ms / 86_400_000);\n const hours = Math.floor((ms % 86_400_000) / 3_600_000);\n const minutes = Math.floor((ms % 3_600_000) / 60_000);\n const seconds = Math.floor((ms % 60_000) / 1000);\n const millis = ms % 1000;\n // Single-pass tokenizer so we never re-scan output for tokens. The\n // previous sequential `.replace()` chain leaked: e.g. `D days HH:mm:ss`\n // → `1 day42 11:59:42` because the `/s/g` step at the end re-matched\n // the literal `s` inside `days`. Longest-token-first ordering inside\n // the alternation handles `DD`>`D`, `HH`>`H`, `mm`>`m`, `SSS`>`ss`>`s`.\n return fmt.replace(/(?<![A-Za-z])(?:SSS|DD|HH|mm|ss|D|H|m|s)(?![A-Za-z])/g, token => {\n switch (token) {\n case 'DD':\n return pad(days, 2);\n case 'D':\n return String(days);\n case 'HH':\n return pad(hours, 2);\n case 'H':\n return String(hours);\n case 'mm':\n return pad(minutes, 2);\n case 'm':\n return String(minutes);\n case 'ss':\n return pad(seconds, 2);\n case 's':\n return String(seconds);\n case 'SSS':\n return pad(millis, 3);\n default:\n return token;\n }\n });\n}\n\n/**\n * Live-counting variant of `<wr-statistic>` that targets a future date\n * and ticks down to zero. The format string uses Day/Hour/Minute/Second\n * tokens (`D`, `H`, `m`, `s`, double for zero-padded, plus `SSS` for\n * milliseconds).\n *\n * @example\n * ```html\n * <wr-statistic-countdown\n * label=\"Launch in\"\n * [target]=\"launchDate\"\n * format=\"D days HH:mm:ss\"\n * (countdownEnd)=\"onLive()\"\n * />\n * ```\n *\n * @see https://ngwr.dev/reference/components/statistic\n */\n@Component({\n selector: 'wr-statistic-countdown',\n templateUrl: './statistic-countdown.html',\n encapsulation: ViewEncapsulation.None,\n host: { class: 'wr-statistic' },\n})\nexport class WrStatisticCountdown {\n /** Target date / timestamp the countdown is running down to. */\n readonly target = input.required<Date | string | number>();\n\n /** Label rendered above the value. */\n readonly label = input<string>('');\n\n /**\n * Format string. Tokens: `D`/`DD` (days), `H`/`HH` (hours),\n * `m`/`mm` (minutes), `s`/`ss` (seconds), `SSS` (milliseconds).\n * Double-letter forms zero-pad to width 2. @default 'HH:mm:ss'\n */\n readonly format = input<string>('HH:mm:ss');\n\n /** Optional text shown once the countdown reaches zero. */\n readonly endText = input<string | null>(null);\n\n /**\n * Tick interval in ms. Drop to ~16 for `SSS` (millisecond display). Floored\n * at one frame — `0` (or an unparseable value) asked `setInterval` to run as\n * fast as the browser would allow, which is a busy loop, not a countdown.\n * @default 1000\n */\n readonly tickMs = input(1000, { transform: (v: unknown): number => Math.max(16, numAttr(1000)(v)) });\n\n /** Fires once when the countdown crosses zero. */\n readonly countdownEnd = output<void>();\n\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n private readonly targetMs = computed(() => toMs(this.target()));\n\n /**\n * Milliseconds left, or `null` when `target` does not parse to a date at all.\n * `new Date('nope').getTime()` is `NaN`, and `NaN` propagated all the way to\n * the screen as `NaN:NaN:NaN` — and, worse, `tick` compared it to `0` and so\n * never fired `countdownEnd`, while a guard that only clamped the text would\n * have fired it immediately for a target that was never reached.\n */\n private remainingMs(): number | null {\n const target = this.targetMs();\n return Number.isFinite(target) ? Math.max(0, target - Date.now()) : null;\n }\n\n /** Remaining milliseconds (live signal). */\n protected readonly remaining = signal(0);\n protected readonly finished = signal(false);\n\n protected readonly display = computed(() => {\n if (this.finished() && this.endText() != null) return this.endText()!;\n return formatRemaining(this.remaining(), this.format());\n });\n\n constructor() {\n // Seed once synchronously so SSR / first paint shows a sane value.\n effect(() => {\n const ms = this.remainingMs();\n this.remaining.set(ms ?? 0);\n this.finished.set(ms === 0);\n });\n\n if (!this.isBrowser) return;\n\n // The interval is REBUILT when `tickMs` changes, which is what makes the\n // input bindable rather than an authoring-time constant. Read once from\n // inside `afterNextRender` it was a plain, untracked read, so\n // `[tickMs]=\"precise() ? 16 : 1000\"` kept whatever period the first frame\n // saw and nothing looked wrong — the countdown still counted. Same shape\n // `wr-rotating-text` uses for its own rotation period; the `onCleanup` is\n // what keeps a period change from leaving the old interval running beside\n // the new one.\n effect(onCleanup => {\n const handle = setInterval(() => this.tick(), this.tickMs());\n onCleanup(() => clearInterval(handle));\n });\n }\n\n private tick(): void {\n const ms = this.remainingMs();\n if (ms === null) return;\n this.remaining.set(ms);\n if (ms === 0 && !this.finished()) {\n this.finished.set(true);\n this.countdownEnd.emit();\n }\n }\n}\n","@if (label()) {\n <div class=\"wr-statistic__label\">{{ label() }}</div>\n}\n<div class=\"wr-statistic__value\">\n <span class=\"wr-statistic__number\">{{ display() }}</span>\n</div>\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { coerceNumberProperty } from '@angular/cdk/coercion';\nimport { Component, ViewEncapsulation, input } from '@angular/core';\n\n/**\n * Dashboard grid for `<wr-statistic>` cards. The column count follows the\n * group's OWN width — an intrinsic container-query grid sized by its box, not\n * a viewport media query — so it reflows correctly inside any column, card, or\n * split pane. Columns are never narrower than `min`; `columns` optionally caps\n * how many ever sit side by side on a wide container.\n *\n * @example\n * ```html\n * <wr-statistic-group [columns]=\"4\" min=\"11rem\">\n * <wr-statistic label=\"Active users\" [value]=\"12345\" />\n * <wr-statistic label=\"Revenue\" [value]=\"9512\" prefix=\"$\" [delta]=\"12.4\" />\n * <wr-statistic label=\"Churn\" [value]=\"1.8\" suffix=\"%\" [delta]=\"-0.4\" />\n * <wr-statistic label=\"Sessions\" [value]=\"48210\" />\n * </wr-statistic-group>\n * ```\n *\n * @see https://ngwr.dev/reference/components/statistic\n */\n@Component({\n selector: 'wr-statistic-group',\n template: '<div class=\"wr-statistic-group__grid\"><ng-content /></div>',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-statistic-group',\n '[style.--wr-statistic-group-min]': 'min()',\n '[style.--wr-statistic-group-columns]': 'columns() || null',\n },\n})\nexport class WrStatisticGroup {\n /**\n * Minimum width of each column before the grid reflows to fewer columns.\n * Any CSS length — smaller packs more cards per row. @default '12rem'\n */\n readonly min = input<string>('12rem');\n\n /**\n * Cap on how many columns ever sit side by side on a wide container. `0`\n * (default) leaves it uncapped — fit as many `min`-wide columns as the\n * width allows. @default 0\n */\n readonly columns = input(0, { transform: (v: unknown): number => Math.max(0, coerceNumberProperty(v, 0)) });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;AAKG;AAoBH;;;;;;;;;;;;;;;;AAgBG;MAQU,WAAW,CAAA;AACL,IAAA,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC;AAC7B,IAAA,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC;IAElC,KAAK,GAAG,KAAK,CAAS,EAAE;8EAAC;;IAGzB,KAAK,GAAG,KAAK,CAAyB,IAAI;8EAAC;;IAG3C,MAAM,GAAG,KAAK,CAAS,EAAE;+EAAC;;IAG1B,MAAM,GAAG,KAAK,CAAS,EAAE;+EAAC;;IAG1B,SAAS,GAAG,KAAK,CAAC,CAAC,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,WAAA,EAAA,8BAAA,EAAA,CAAA,EAAI,SAAS,EAAE,CAAC,CAAU,KAAa,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAA,CAAG;AAE7G;;;AAGG;IACM,OAAO,GAAG,KAAK,CAAC,IAAI,+EAAI,SAAS,EAAE,qBAAqB,EAAA,CAAG;;AAG3D,IAAA,QAAQ,GAAG,KAAK,CAAC,GAAG,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,UAAA,EAAA,8BAAA,EAAA,CAAA,EAAI,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,EAAA,CAAG;AAE3D;;;AAGG;AACgB,IAAA,YAAY,GAAG,QAAQ,CAAgB,MAAK;AAC7D,QAAA,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,EAAE;AACxB,QAAA,IAAI,GAAG,KAAK,IA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
|
|
57
57
|
...(ngDevMode ? [{ debugName: "isActive" }] : /* istanbul ignore next */ []));
|
|
58
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
59
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.
|
|
58
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrStep, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
59
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.6", type: WrStep, isStandalone: true, selector: "wr-step", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, optional: { classPropertyName: "optional", publicName: "optional", isSignal: true, isRequired: false, transformFunction: null }, completed: { classPropertyName: "completed", publicName: "completed", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.wr-step--active": "isActive()" }, classAttribute: "wr-step" }, ngImport: i0, template: '<ng-content />', isInline: true, encapsulation: i0.ViewEncapsulation.None });
|
|
60
60
|
}
|
|
61
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
61
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrStep, decorators: [{
|
|
62
62
|
type: Component,
|
|
63
63
|
args: [{
|
|
64
64
|
selector: 'wr-step',
|
|
@@ -192,8 +192,8 @@ class WrStepper {
|
|
|
192
192
|
prev() {
|
|
193
193
|
this.goTo(this.active() - 1);
|
|
194
194
|
}
|
|
195
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
196
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.
|
|
195
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrStepper, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
196
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: WrStepper, isStandalone: true, selector: "wr-stepper", inputs: { active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, linear: { classPropertyName: "linear", publicName: "linear", isSignal: true, isRequired: false, transformFunction: null }, responsive: { classPropertyName: "responsive", publicName: "responsive", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { active: "activeChange" }, host: { properties: { "class": "classes()" } }, providers: [
|
|
197
197
|
{
|
|
198
198
|
provide: WR_STEPPER,
|
|
199
199
|
// eslint-disable-next-line @angular-eslint/no-forward-ref
|
|
@@ -201,7 +201,7 @@ class WrStepper {
|
|
|
201
201
|
},
|
|
202
202
|
], queries: [{ propertyName: "steps", predicate: WrStep, isSignal: true }], ngImport: i0, template: "<ol class=\"wr-stepper__headers\" role=\"list\">\n @for (step of steps(); track $index) {\n <li\n class=\"wr-stepper__header\"\n [class.wr-stepper__header--active]=\"$index === active()\"\n [class.wr-stepper__header--completed]=\"isCompleted($index)\"\n [class.wr-stepper__header--reachable]=\"isReachable($index)\"\n [class.wr-stepper__header--disabled]=\"step.disabled()\"\n >\n <button\n type=\"button\"\n class=\"wr-stepper__header-button\"\n [disabled]=\"!isReachable($index) || step.disabled()\"\n [attr.aria-current]=\"$index === active() ? 'step' : null\"\n (click)=\"onHeaderClick($index)\"\n >\n <span class=\"wr-stepper__indicator\" aria-hidden=\"true\">\n @if (isCompleted($index)) {\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\">\n <path\n d=\"M3 7.5 L6 10.5 L11 4.5\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.75\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n } @else {\n {{ $index + 1 }}\n }\n </span>\n <span class=\"wr-stepper__label\">\n {{ step.label() }}\n @if (step.optional()) {\n <small class=\"wr-stepper__optional\">{{ optionalLabel() }}</small>\n }\n @if (step.description()) {\n <small class=\"wr-stepper__description\">{{ step.description() }}</small>\n }\n </span>\n </button>\n @if (!$last) {\n <span class=\"wr-stepper__connector\" aria-hidden=\"true\"></span>\n }\n </li>\n }\n</ol>\n\n<div class=\"wr-stepper__body\">\n <ng-content />\n</div>\n", encapsulation: i0.ViewEncapsulation.None });
|
|
203
203
|
}
|
|
204
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
204
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrStepper, decorators: [{
|
|
205
205
|
type: Component,
|
|
206
206
|
args: [{ selector: 'wr-stepper', encapsulation: ViewEncapsulation.None, host: { '[class]': 'classes()' }, providers: [
|
|
207
207
|
{
|
|
@@ -314,10 +314,10 @@ class WrStorage {
|
|
|
314
314
|
this.listenerInstalled = false;
|
|
315
315
|
});
|
|
316
316
|
}
|
|
317
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
318
|
-
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.
|
|
317
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrStorage, deps: [], target: i0.ɵɵFactoryTarget.Service });
|
|
318
|
+
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.6", ngImport: i0, type: WrStorage });
|
|
319
319
|
}
|
|
320
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
320
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrStorage, decorators: [{
|
|
321
321
|
type: Service
|
|
322
322
|
}] });
|
|
323
323
|
|
package/fesm2022/ngwr-switch.mjs
CHANGED
|
@@ -94,10 +94,10 @@ class WrSwitch {
|
|
|
94
94
|
onInputBlur() {
|
|
95
95
|
this.touch.emit();
|
|
96
96
|
}
|
|
97
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
98
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.
|
|
97
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrSwitch, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
98
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.6", type: WrSwitch, isStandalone: true, selector: "wr-switch", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", touch: "touch" }, host: { properties: { "class": "classes()", "attr.id": "null" } }, ngImport: i0, template: "<label class=\"wr-switch__label\" [for]=\"id()\">\n <input\n class=\"wr-switch__input\"\n type=\"checkbox\"\n role=\"switch\"\n [id]=\"id()\"\n [attr.aria-label]=\"ariaLabel()\"\n [checked]=\"checked()\"\n [disabled]=\"disabled()\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-invalid]=\"fieldAria.ariaInvalid()\"\n [attr.aria-describedby]=\"fieldAria.describedBy()\"\n (click)=\"onInputClick($event)\"\n (change)=\"onInputChange($event)\"\n (blur)=\"onInputBlur()\"\n />\n\n <span class=\"wr-switch__track\" aria-hidden=\"true\">\n <span class=\"wr-switch__thumb\"></span>\n </span>\n\n <span class=\"wr-switch__text\">\n <ng-content />\n </span>\n</label>\n", encapsulation: i0.ViewEncapsulation.None });
|
|
99
99
|
}
|
|
100
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
100
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrSwitch, decorators: [{
|
|
101
101
|
type: Component,
|
|
102
102
|
args: [{ selector: 'wr-switch', encapsulation: ViewEncapsulation.None, host: {
|
|
103
103
|
'[class]': 'classes()',
|