@slotted/angular 0.1.0-beta.3 → 0.1.0-beta.30
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/docs/AGENTS.snippet.md +3 -1
- package/docs/accordion.json +5 -5
- package/docs/accordion.md +12 -12
- package/docs/action-bar.json +23 -22
- package/docs/action-bar.md +30 -30
- package/docs/action-sheet.json +391 -64
- package/docs/action-sheet.md +259 -0
- package/docs/alert.json +30 -13
- package/docs/alert.md +29 -18
- package/docs/app-shell.examples.md +8 -8
- package/docs/app-shell.json +37 -20
- package/docs/app-shell.md +9 -7
- package/docs/avatar-group.json +1 -1
- package/docs/avatar-group.md +1 -1
- package/docs/avatar.json +32 -11
- package/docs/avatar.md +13 -11
- package/docs/badge.json +10 -4
- package/docs/badge.md +5 -5
- package/docs/breadcrumb.json +2 -2
- package/docs/breadcrumb.md +2 -2
- package/docs/button-group.json +2 -1
- package/docs/button-group.md +2 -2
- package/docs/button.examples.md +15 -0
- package/docs/button.json +134 -14
- package/docs/button.md +32 -8
- package/docs/calendar.json +31 -6
- package/docs/calendar.md +9 -6
- package/docs/card.json +2 -2
- package/docs/card.md +2 -2
- package/docs/carousel.json +10 -10
- package/docs/carousel.md +11 -11
- package/docs/cascader.json +1 -0
- package/docs/cascader.md +1 -1
- package/docs/chart.examples.md +45 -31
- package/docs/chart.json +40 -35
- package/docs/chart.md +7 -7
- package/docs/checkbox-group.examples.md +13 -13
- package/docs/checkbox-group.json +7 -7
- package/docs/checkbox-group.md +2 -2
- package/docs/checkbox.examples.md +7 -7
- package/docs/checkbox.json +6 -6
- package/docs/checkbox.md +3 -3
- package/docs/code-block.json +93 -93
- package/docs/code-block.md +70 -70
- package/docs/collapsible.json +11 -11
- package/docs/collapsible.md +19 -19
- package/docs/color-picker.json +26 -26
- package/docs/color-picker.md +16 -16
- package/docs/combobox.json +5 -2
- package/docs/combobox.md +3 -3
- package/docs/command-palette.json +2 -0
- package/docs/command-palette.md +1 -1
- package/docs/context-menu.json +1 -1
- package/docs/context-menu.md +1 -1
- package/docs/currency-field.examples.md +3 -3
- package/docs/currency-field.json +14 -6
- package/docs/currency-field.md +6 -5
- package/docs/dashboard-grid.json +32 -10
- package/docs/dashboard-grid.md +15 -6
- package/docs/data-grid.examples.md +3 -3
- package/docs/data-grid.json +37 -11
- package/docs/data-grid.md +2 -1
- package/docs/data-grid.props.md +7 -5
- package/docs/data-list.json +2 -1
- package/docs/data-list.md +1 -1
- package/docs/date-field.json +12 -4
- package/docs/date-field.md +8 -7
- package/docs/date-picker.examples.md +36 -0
- package/docs/date-picker.json +32 -5
- package/docs/date-picker.md +7 -5
- package/docs/date-range-picker.json +11 -0
- package/docs/date-range-picker.md +2 -1
- package/docs/datetime-field.json +5 -4
- package/docs/datetime-field.md +10 -10
- package/docs/datetime-picker.json +11 -1
- package/docs/datetime-picker.md +2 -1
- package/docs/datetime-range-picker.examples.md +3 -3
- package/docs/datetime-range-picker.json +14 -3
- package/docs/datetime-range-picker.md +4 -3
- package/docs/description-list.json +16 -7
- package/docs/description-list.md +8 -7
- package/docs/detail-panel.json +14 -12
- package/docs/detail-panel.md +20 -15
- package/docs/dialog.examples.md +143 -141
- package/docs/dialog.json +56 -24
- package/docs/dialog.md +6 -4
- package/docs/dialog.props.md +9 -7
- package/docs/drawer.examples.md +14 -14
- package/docs/drawer.json +43 -17
- package/docs/drawer.md +10 -8
- package/docs/entity-picker.json +21 -4
- package/docs/entity-picker.md +8 -6
- package/docs/event-calendar.examples.md +3 -3
- package/docs/event-calendar.json +5 -5
- package/docs/event-calendar.md +4 -4
- package/docs/field-group.json +21 -6
- package/docs/field-group.md +14 -12
- package/docs/field.examples.md +3 -3
- package/docs/field.json +20 -5
- package/docs/field.md +4 -2
- package/docs/filter-bar.json +118 -118
- package/docs/filter-bar.md +79 -79
- package/docs/form.json +23 -11
- package/docs/form.md +15 -13
- package/docs/fullscreen.json +4 -4
- package/docs/fullscreen.md +7 -7
- package/docs/guidelines/README.md +2 -2
- package/docs/guidelines/async-feedback.md +25 -4
- package/docs/guidelines/builders.md +1 -1
- package/docs/guidelines/composition.md +37 -11
- package/docs/guidelines/conversations.md +1 -1
- package/docs/guidelines/errors-and-conflicts.md +7 -6
- package/docs/guidelines/forms.md +111 -1
- package/docs/guidelines/index.md +27 -7
- package/docs/guidelines/layout-alignment.md +24 -14
- package/docs/guidelines/list-pages.md +44 -3
- package/docs/guidelines/overviews.md +39 -9
- package/docs/guidelines/own-elements.md +8 -8
- package/docs/guidelines/reading-permissions.md +2 -2
- package/docs/guidelines/record-pages.md +1 -1
- package/docs/guidelines/reports.md +1 -1
- package/docs/highlight.json +9 -9
- package/docs/highlight.md +14 -14
- package/docs/icon.json +5 -3
- package/docs/icon.md +4 -4
- package/docs/image.json +3 -3
- package/docs/image.md +3 -3
- package/docs/import-export-center.json +23 -23
- package/docs/import-export-center.md +17 -17
- package/docs/index.md +3 -2
- package/docs/inline-message.json +34 -21
- package/docs/inline-message.md +32 -30
- package/docs/inline.json +1 -1
- package/docs/inline.md +1 -1
- package/docs/kbd.json +5 -2
- package/docs/kbd.md +3 -3
- package/docs/link.json +22 -6
- package/docs/link.md +9 -7
- package/docs/list-item.json +20 -4
- package/docs/list-item.md +20 -17
- package/docs/list.json +1 -1
- package/docs/listbox.json +1 -2
- package/docs/listbox.md +2 -2
- package/docs/loading-overlay.json +3 -3
- package/docs/loading-overlay.md +3 -3
- package/docs/markdown.json +86 -79
- package/docs/markdown.md +66 -65
- package/docs/media-viewer.json +521 -0
- package/docs/media-viewer.md +188 -0
- package/docs/menu.json +14 -1
- package/docs/menu.md +3 -1
- package/docs/message-scroller.json +2 -2
- package/docs/message-scroller.md +1 -1
- package/docs/message.json +18 -12
- package/docs/message.md +20 -20
- package/docs/multi-select.json +3 -1
- package/docs/multi-select.md +1 -1
- package/docs/notification-center.json +20 -16
- package/docs/notification-center.md +20 -24
- package/docs/number-field.examples.md +3 -3
- package/docs/number-field.json +4 -3
- package/docs/number-field.md +1 -1
- package/docs/otp-input.json +11 -10
- package/docs/otp-input.md +14 -14
- package/docs/page-header.json +30 -13
- package/docs/page-header.md +25 -25
- package/docs/page.json +4 -2
- package/docs/page.md +3 -2
- package/docs/pagination.json +2 -2
- package/docs/pagination.md +1 -1
- package/docs/popover.examples.md +1 -1
- package/docs/popover.json +4 -3
- package/docs/popover.md +2 -2
- package/docs/progress-indicator.json +7 -5
- package/docs/progress-indicator.md +7 -7
- package/docs/prompt-composer.json +53 -6
- package/docs/prompt-composer.md +12 -6
- package/docs/prose.json +1 -1
- package/docs/prose.md +1 -1
- package/docs/radio-group.examples.md +19 -19
- package/docs/radio-group.json +12 -12
- package/docs/radio-group.md +3 -3
- package/docs/rating.json +28 -26
- package/docs/rating.md +28 -37
- package/docs/result-state.json +12 -12
- package/docs/result-state.md +17 -17
- package/docs/saved-views.json +1 -1
- package/docs/scroll-area.json +266 -64
- package/docs/scroll-area.md +188 -0
- package/docs/section.json +43 -21
- package/docs/section.md +34 -31
- package/docs/segmented-control.json +21 -25
- package/docs/segmented-control.md +33 -33
- package/docs/select.json +3 -0
- package/docs/select.md +1 -1
- package/docs/side-navigation.json +1 -0
- package/docs/side-navigation.md +1 -1
- package/docs/skeleton.json +1 -1
- package/docs/skeleton.md +1 -1
- package/docs/skills/build-own-element/SKILL.md +9 -9
- package/docs/skills/compose-screen/SKILL.md +54 -18
- package/docs/skills/index.md +2 -2
- package/docs/skills/review-screen/SKILL.md +28 -17
- package/docs/skills/theme-app/SKILL.md +66 -20
- package/docs/skills/waiting-states/SKILL.md +15 -11
- package/docs/slider.json +8 -8
- package/docs/slider.md +12 -12
- package/docs/sparkline.json +12 -9
- package/docs/sparkline.md +9 -9
- package/docs/split-button.json +14 -12
- package/docs/split-button.md +28 -30
- package/docs/splitter.json +279 -64
- package/docs/splitter.md +215 -0
- package/docs/stack.json +1 -1
- package/docs/stack.md +1 -1
- package/docs/stat-card.json +36 -9
- package/docs/stat-card.md +11 -8
- package/docs/status-indicator.json +22 -11
- package/docs/status-indicator.md +8 -6
- package/docs/stepper.json +4 -4
- package/docs/stepper.md +4 -4
- package/docs/switch.json +5 -5
- package/docs/switch.md +7 -7
- package/docs/table-of-contents.json +13 -12
- package/docs/table-of-contents.md +14 -14
- package/docs/table.examples.md +3 -3
- package/docs/table.json +17 -3
- package/docs/table.md +3 -1
- package/docs/tabs.json +16 -3
- package/docs/tabs.md +3 -2
- package/docs/tag.json +38 -26
- package/docs/tag.md +17 -17
- package/docs/tags-input.json +30 -3
- package/docs/tags-input.md +5 -2
- package/docs/text-field.examples.md +6 -6
- package/docs/text-field.json +6 -5
- package/docs/text-field.md +2 -2
- package/docs/textarea.examples.md +7 -7
- package/docs/textarea.json +4 -3
- package/docs/textarea.md +1 -1
- package/docs/time-field.json +4 -3
- package/docs/time-field.md +7 -7
- package/docs/time-picker.json +15 -5
- package/docs/time-picker.md +8 -7
- package/docs/time-range-picker.examples.md +5 -5
- package/docs/time-range-picker.json +15 -4
- package/docs/time-range-picker.md +3 -2
- package/docs/timeline.json +138 -132
- package/docs/timeline.md +125 -125
- package/docs/toast.json +14 -7
- package/docs/toast.md +8 -8
- package/docs/toggle-group.json +12 -12
- package/docs/toggle-group.md +28 -28
- package/docs/toggle.json +8 -8
- package/docs/toggle.md +7 -7
- package/docs/tokens.md +45 -26
- package/docs/toolbar.json +11 -11
- package/docs/toolbar.md +23 -23
- package/docs/tooltip.json +4 -3
- package/docs/tooltip.md +4 -4
- package/docs/top-navigation.examples.md +11 -15
- package/docs/top-navigation.json +9 -9
- package/docs/top-navigation.md +7 -7
- package/docs/tour.json +9 -9
- package/docs/tour.md +6 -6
- package/docs/typography.json +6 -4
- package/docs/typography.md +5 -5
- package/docs/upload.examples.md +3 -3
- package/docs/upload.json +9 -9
- package/docs/upload.md +4 -4
- package/fesm2022/slotted-angular-accordion.mjs +4 -2
- package/fesm2022/slotted-angular-accordion.mjs.map +1 -1
- package/fesm2022/slotted-angular-action-bar.mjs +27 -12
- package/fesm2022/slotted-angular-action-bar.mjs.map +1 -1
- package/fesm2022/slotted-angular-action-sheet.mjs +48 -29
- package/fesm2022/slotted-angular-action-sheet.mjs.map +1 -1
- package/fesm2022/slotted-angular-alert.mjs +56 -18
- package/fesm2022/slotted-angular-alert.mjs.map +1 -1
- package/fesm2022/slotted-angular-app-shell.mjs +85 -56
- package/fesm2022/slotted-angular-app-shell.mjs.map +1 -1
- package/fesm2022/slotted-angular-aspect-ratio.mjs +4 -2
- package/fesm2022/slotted-angular-aspect-ratio.mjs.map +1 -1
- package/fesm2022/slotted-angular-attachment.mjs +33 -22
- package/fesm2022/slotted-angular-attachment.mjs.map +1 -1
- package/fesm2022/slotted-angular-avatar-group.mjs +13 -10
- package/fesm2022/slotted-angular-avatar-group.mjs.map +1 -1
- package/fesm2022/slotted-angular-avatar.mjs +17 -10
- package/fesm2022/slotted-angular-avatar.mjs.map +1 -1
- package/fesm2022/slotted-angular-badge.mjs +15 -11
- package/fesm2022/slotted-angular-badge.mjs.map +1 -1
- package/fesm2022/slotted-angular-breadcrumb.mjs +27 -19
- package/fesm2022/slotted-angular-breadcrumb.mjs.map +1 -1
- package/fesm2022/slotted-angular-button-group.mjs +8 -5
- package/fesm2022/slotted-angular-button-group.mjs.map +1 -1
- package/fesm2022/slotted-angular-button.mjs +163 -28
- package/fesm2022/slotted-angular-button.mjs.map +1 -1
- package/fesm2022/slotted-angular-calendar.mjs +263 -65
- package/fesm2022/slotted-angular-calendar.mjs.map +1 -1
- package/fesm2022/slotted-angular-card.mjs +19 -17
- package/fesm2022/slotted-angular-card.mjs.map +1 -1
- package/fesm2022/slotted-angular-carousel.mjs +22 -11
- package/fesm2022/slotted-angular-carousel.mjs.map +1 -1
- package/fesm2022/slotted-angular-cascader.mjs +179 -65
- package/fesm2022/slotted-angular-cascader.mjs.map +1 -1
- package/fesm2022/slotted-angular-chart.mjs +26 -5
- package/fesm2022/slotted-angular-chart.mjs.map +1 -1
- package/fesm2022/slotted-angular-checkbox-group.mjs +5 -3
- package/fesm2022/slotted-angular-checkbox-group.mjs.map +1 -1
- package/fesm2022/slotted-angular-checkbox.mjs +14 -9
- package/fesm2022/slotted-angular-checkbox.mjs.map +1 -1
- package/fesm2022/slotted-angular-code-block.mjs +30 -16
- package/fesm2022/slotted-angular-code-block.mjs.map +1 -1
- package/fesm2022/slotted-angular-collapsible.mjs +21 -16
- package/fesm2022/slotted-angular-collapsible.mjs.map +1 -1
- package/fesm2022/slotted-angular-color-picker.mjs +83 -28
- package/fesm2022/slotted-angular-color-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-column-manager.mjs +71 -32
- package/fesm2022/slotted-angular-column-manager.mjs.map +1 -1
- package/fesm2022/slotted-angular-combobox.mjs +108 -35
- package/fesm2022/slotted-angular-combobox.mjs.map +1 -1
- package/fesm2022/slotted-angular-command-palette.mjs +162 -54
- package/fesm2022/slotted-angular-command-palette.mjs.map +1 -1
- package/fesm2022/slotted-angular-container.mjs +6 -4
- package/fesm2022/slotted-angular-container.mjs.map +1 -1
- package/fesm2022/slotted-angular-context-menu.mjs +5 -4
- package/fesm2022/slotted-angular-context-menu.mjs.map +1 -1
- package/fesm2022/slotted-angular-currency-field.mjs +100 -34
- package/fesm2022/slotted-angular-currency-field.mjs.map +1 -1
- package/fesm2022/slotted-angular-dashboard-grid.mjs +295 -68
- package/fesm2022/slotted-angular-dashboard-grid.mjs.map +1 -1
- package/fesm2022/slotted-angular-data-grid.mjs +461 -129
- package/fesm2022/slotted-angular-data-grid.mjs.map +1 -1
- package/fesm2022/slotted-angular-data-list.mjs +83 -50
- package/fesm2022/slotted-angular-data-list.mjs.map +1 -1
- package/fesm2022/slotted-angular-date-field.mjs +74 -25
- package/fesm2022/slotted-angular-date-field.mjs.map +1 -1
- package/fesm2022/slotted-angular-date-picker.mjs +135 -40
- package/fesm2022/slotted-angular-date-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-date-range-picker.mjs +68 -22
- package/fesm2022/slotted-angular-date-range-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-datetime-field.mjs +49 -17
- package/fesm2022/slotted-angular-datetime-field.mjs.map +1 -1
- package/fesm2022/slotted-angular-datetime-picker.mjs +64 -29
- package/fesm2022/slotted-angular-datetime-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-datetime-range-picker.mjs +144 -54
- package/fesm2022/slotted-angular-datetime-range-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-description-list.mjs +47 -24
- package/fesm2022/slotted-angular-description-list.mjs.map +1 -1
- package/fesm2022/slotted-angular-detail-panel.mjs +48 -30
- package/fesm2022/slotted-angular-detail-panel.mjs.map +1 -1
- package/fesm2022/slotted-angular-dialog.mjs +81 -39
- package/fesm2022/slotted-angular-dialog.mjs.map +1 -1
- package/fesm2022/slotted-angular-divider.mjs +7 -5
- package/fesm2022/slotted-angular-divider.mjs.map +1 -1
- package/fesm2022/slotted-angular-drawer.mjs +236 -105
- package/fesm2022/slotted-angular-drawer.mjs.map +1 -1
- package/fesm2022/slotted-angular-entity-picker.mjs +474 -75
- package/fesm2022/slotted-angular-entity-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-event-calendar.mjs +262 -105
- package/fesm2022/slotted-angular-event-calendar.mjs.map +1 -1
- package/fesm2022/slotted-angular-field-group.mjs +30 -9
- package/fesm2022/slotted-angular-field-group.mjs.map +1 -1
- package/fesm2022/slotted-angular-field.mjs +49 -18
- package/fesm2022/slotted-angular-field.mjs.map +1 -1
- package/fesm2022/slotted-angular-filter-bar.mjs +111 -44
- package/fesm2022/slotted-angular-filter-bar.mjs.map +1 -1
- package/fesm2022/slotted-angular-form.mjs +48 -17
- package/fesm2022/slotted-angular-form.mjs.map +1 -1
- package/fesm2022/slotted-angular-fullscreen.mjs +14 -8
- package/fesm2022/slotted-angular-fullscreen.mjs.map +1 -1
- package/fesm2022/slotted-angular-grid.mjs +6 -4
- package/fesm2022/slotted-angular-grid.mjs.map +1 -1
- package/fesm2022/slotted-angular-highlight.mjs +6 -4
- package/fesm2022/slotted-angular-highlight.mjs.map +1 -1
- package/fesm2022/slotted-angular-hover-card.mjs +5 -4
- package/fesm2022/slotted-angular-hover-card.mjs.map +1 -1
- package/fesm2022/slotted-angular-icon.mjs +191 -90
- package/fesm2022/slotted-angular-icon.mjs.map +1 -1
- package/fesm2022/slotted-angular-image.mjs +13 -10
- package/fesm2022/slotted-angular-image.mjs.map +1 -1
- package/fesm2022/slotted-angular-import-export-center.mjs +185 -109
- package/fesm2022/slotted-angular-import-export-center.mjs.map +1 -1
- package/fesm2022/slotted-angular-inline-message.mjs +98 -23
- package/fesm2022/slotted-angular-inline-message.mjs.map +1 -1
- package/fesm2022/slotted-angular-inline.mjs +7 -5
- package/fesm2022/slotted-angular-inline.mjs.map +1 -1
- package/fesm2022/slotted-angular-kbd.mjs +11 -7
- package/fesm2022/slotted-angular-kbd.mjs.map +1 -1
- package/fesm2022/slotted-angular-link.mjs +13 -4
- package/fesm2022/slotted-angular-link.mjs.map +1 -1
- package/fesm2022/slotted-angular-list-item.mjs +63 -23
- package/fesm2022/slotted-angular-list-item.mjs.map +1 -1
- package/fesm2022/slotted-angular-list.mjs +15 -11
- package/fesm2022/slotted-angular-list.mjs.map +1 -1
- package/fesm2022/slotted-angular-listbox.mjs +41 -23
- package/fesm2022/slotted-angular-listbox.mjs.map +1 -1
- package/fesm2022/slotted-angular-loading-overlay.mjs +62 -25
- package/fesm2022/slotted-angular-loading-overlay.mjs.map +1 -1
- package/fesm2022/slotted-angular-markdown.mjs +57 -31
- package/fesm2022/slotted-angular-markdown.mjs.map +1 -1
- package/fesm2022/slotted-angular-media-viewer.mjs +962 -0
- package/fesm2022/slotted-angular-media-viewer.mjs.map +1 -0
- package/fesm2022/slotted-angular-menu.mjs +62 -39
- package/fesm2022/slotted-angular-menu.mjs.map +1 -1
- package/fesm2022/slotted-angular-menubar.mjs +6 -3
- package/fesm2022/slotted-angular-menubar.mjs.map +1 -1
- package/fesm2022/slotted-angular-message-scroller.mjs +35 -16
- package/fesm2022/slotted-angular-message-scroller.mjs.map +1 -1
- package/fesm2022/slotted-angular-message.mjs +119 -51
- package/fesm2022/slotted-angular-message.mjs.map +1 -1
- package/fesm2022/slotted-angular-multi-select.mjs +163 -60
- package/fesm2022/slotted-angular-multi-select.mjs.map +1 -1
- package/fesm2022/slotted-angular-navigation-menu.mjs +34 -26
- package/fesm2022/slotted-angular-navigation-menu.mjs.map +1 -1
- package/fesm2022/slotted-angular-notification-center.mjs +111 -68
- package/fesm2022/slotted-angular-notification-center.mjs.map +1 -1
- package/fesm2022/slotted-angular-number-field.mjs +24 -12
- package/fesm2022/slotted-angular-number-field.mjs.map +1 -1
- package/fesm2022/slotted-angular-otp-input.mjs +14 -9
- package/fesm2022/slotted-angular-otp-input.mjs.map +1 -1
- package/fesm2022/slotted-angular-page-header.mjs +90 -48
- package/fesm2022/slotted-angular-page-header.mjs.map +1 -1
- package/fesm2022/slotted-angular-page.mjs +60 -12
- package/fesm2022/slotted-angular-page.mjs.map +1 -1
- package/fesm2022/slotted-angular-pagination.mjs +35 -22
- package/fesm2022/slotted-angular-pagination.mjs.map +1 -1
- package/fesm2022/slotted-angular-popover.mjs +34 -21
- package/fesm2022/slotted-angular-popover.mjs.map +1 -1
- package/fesm2022/slotted-angular-progress-indicator.mjs +238 -54
- package/fesm2022/slotted-angular-progress-indicator.mjs.map +1 -1
- package/fesm2022/slotted-angular-prompt-composer.mjs +132 -22
- package/fesm2022/slotted-angular-prompt-composer.mjs.map +1 -1
- package/fesm2022/slotted-angular-prose.mjs +14 -11
- package/fesm2022/slotted-angular-prose.mjs.map +1 -1
- package/fesm2022/slotted-angular-radio-group.mjs +17 -11
- package/fesm2022/slotted-angular-radio-group.mjs.map +1 -1
- package/fesm2022/slotted-angular-rating.mjs +143 -87
- package/fesm2022/slotted-angular-rating.mjs.map +1 -1
- package/fesm2022/slotted-angular-result-state.mjs +16 -12
- package/fesm2022/slotted-angular-result-state.mjs.map +1 -1
- package/fesm2022/slotted-angular-saved-views.mjs +43 -16
- package/fesm2022/slotted-angular-saved-views.mjs.map +1 -1
- package/fesm2022/slotted-angular-scroll-area.mjs +13 -5
- package/fesm2022/slotted-angular-scroll-area.mjs.map +1 -1
- package/fesm2022/slotted-angular-section.mjs +81 -19
- package/fesm2022/slotted-angular-section.mjs.map +1 -1
- package/fesm2022/slotted-angular-segmented-control.mjs +16 -10
- package/fesm2022/slotted-angular-segmented-control.mjs.map +1 -1
- package/fesm2022/slotted-angular-select.mjs +189 -69
- package/fesm2022/slotted-angular-select.mjs.map +1 -1
- package/fesm2022/slotted-angular-side-navigation.mjs +46 -35
- package/fesm2022/slotted-angular-side-navigation.mjs.map +1 -1
- package/fesm2022/slotted-angular-skeleton.mjs +32 -16
- package/fesm2022/slotted-angular-skeleton.mjs.map +1 -1
- package/fesm2022/slotted-angular-slider.mjs +34 -14
- package/fesm2022/slotted-angular-slider.mjs.map +1 -1
- package/fesm2022/slotted-angular-sparkline.mjs +41 -14
- package/fesm2022/slotted-angular-sparkline.mjs.map +1 -1
- package/fesm2022/slotted-angular-split-button.mjs +37 -11
- package/fesm2022/slotted-angular-split-button.mjs.map +1 -1
- package/fesm2022/slotted-angular-splitter.mjs +11 -9
- package/fesm2022/slotted-angular-splitter.mjs.map +1 -1
- package/fesm2022/slotted-angular-stack.mjs +6 -4
- package/fesm2022/slotted-angular-stack.mjs.map +1 -1
- package/fesm2022/slotted-angular-stat-card.mjs +120 -41
- package/fesm2022/slotted-angular-stat-card.mjs.map +1 -1
- package/fesm2022/slotted-angular-status-indicator.mjs +51 -20
- package/fesm2022/slotted-angular-status-indicator.mjs.map +1 -1
- package/fesm2022/slotted-angular-stepper.mjs +40 -15
- package/fesm2022/slotted-angular-stepper.mjs.map +1 -1
- package/fesm2022/slotted-angular-switch.mjs +15 -10
- package/fesm2022/slotted-angular-switch.mjs.map +1 -1
- package/fesm2022/slotted-angular-table-of-contents.mjs +29 -21
- package/fesm2022/slotted-angular-table-of-contents.mjs.map +1 -1
- package/fesm2022/slotted-angular-table.mjs +162 -79
- package/fesm2022/slotted-angular-table.mjs.map +1 -1
- package/fesm2022/slotted-angular-tabs.mjs +42 -18
- package/fesm2022/slotted-angular-tabs.mjs.map +1 -1
- package/fesm2022/slotted-angular-tag.mjs +20 -13
- package/fesm2022/slotted-angular-tag.mjs.map +1 -1
- package/fesm2022/slotted-angular-tags-input.mjs +254 -29
- package/fesm2022/slotted-angular-tags-input.mjs.map +1 -1
- package/fesm2022/slotted-angular-text-field.mjs +55 -15
- package/fesm2022/slotted-angular-text-field.mjs.map +1 -1
- package/fesm2022/slotted-angular-textarea.mjs +5 -3
- package/fesm2022/slotted-angular-textarea.mjs.map +1 -1
- package/fesm2022/slotted-angular-theme.mjs +6 -3
- package/fesm2022/slotted-angular-theme.mjs.map +1 -1
- package/fesm2022/slotted-angular-time-field.mjs +48 -14
- package/fesm2022/slotted-angular-time-field.mjs.map +1 -1
- package/fesm2022/slotted-angular-time-picker.mjs +55 -20
- package/fesm2022/slotted-angular-time-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-time-range-picker.mjs +142 -52
- package/fesm2022/slotted-angular-time-range-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-timeline.mjs +147 -64
- package/fesm2022/slotted-angular-timeline.mjs.map +1 -1
- package/fesm2022/slotted-angular-toast.mjs +50 -38
- package/fesm2022/slotted-angular-toast.mjs.map +1 -1
- package/fesm2022/slotted-angular-toggle-group.mjs +10 -6
- package/fesm2022/slotted-angular-toggle-group.mjs.map +1 -1
- package/fesm2022/slotted-angular-toggle.mjs +9 -4
- package/fesm2022/slotted-angular-toggle.mjs.map +1 -1
- package/fesm2022/slotted-angular-toolbar.mjs +27 -12
- package/fesm2022/slotted-angular-toolbar.mjs.map +1 -1
- package/fesm2022/slotted-angular-tooltip.mjs +15 -6
- package/fesm2022/slotted-angular-tooltip.mjs.map +1 -1
- package/fesm2022/slotted-angular-top-navigation.mjs +64 -44
- package/fesm2022/slotted-angular-top-navigation.mjs.map +1 -1
- package/fesm2022/slotted-angular-tour.mjs +49 -24
- package/fesm2022/slotted-angular-tour.mjs.map +1 -1
- package/fesm2022/slotted-angular-transfer.mjs +69 -30
- package/fesm2022/slotted-angular-transfer.mjs.map +1 -1
- package/fesm2022/slotted-angular-tree.mjs +80 -26
- package/fesm2022/slotted-angular-tree.mjs.map +1 -1
- package/fesm2022/slotted-angular-typography.mjs +9 -5
- package/fesm2022/slotted-angular-typography.mjs.map +1 -1
- package/fesm2022/slotted-angular-upload.mjs +127 -59
- package/fesm2022/slotted-angular-upload.mjs.map +1 -1
- package/fesm2022/slotted-angular-visually-hidden.mjs +4 -2
- package/fesm2022/slotted-angular-visually-hidden.mjs.map +1 -1
- package/fesm2022/slotted-angular-wizard.mjs +169 -71
- package/fesm2022/slotted-angular-wizard.mjs.map +1 -1
- package/package.json +19 -3
- package/types/slotted-angular-accordion.d.ts.map +1 -1
- package/types/slotted-angular-action-bar.d.ts +2 -0
- package/types/slotted-angular-action-bar.d.ts.map +1 -1
- package/types/slotted-angular-action-sheet.d.ts.map +1 -1
- package/types/slotted-angular-alert.d.ts +17 -8
- package/types/slotted-angular-alert.d.ts.map +1 -1
- package/types/slotted-angular-app-shell.d.ts +10 -8
- package/types/slotted-angular-app-shell.d.ts.map +1 -1
- package/types/slotted-angular-aspect-ratio.d.ts.map +1 -1
- package/types/slotted-angular-attachment.d.ts +2 -1
- package/types/slotted-angular-attachment.d.ts.map +1 -1
- package/types/slotted-angular-avatar-group.d.ts +3 -3
- package/types/slotted-angular-avatar-group.d.ts.map +1 -1
- package/types/slotted-angular-avatar.d.ts +17 -9
- package/types/slotted-angular-avatar.d.ts.map +1 -1
- package/types/slotted-angular-badge.d.ts +4 -4
- package/types/slotted-angular-badge.d.ts.map +1 -1
- package/types/slotted-angular-breadcrumb.d.ts +1 -1
- package/types/slotted-angular-breadcrumb.d.ts.map +1 -1
- package/types/slotted-angular-button-group.d.ts +2 -2
- package/types/slotted-angular-button-group.d.ts.map +1 -1
- package/types/slotted-angular-button.d.ts +45 -12
- package/types/slotted-angular-button.d.ts.map +1 -1
- package/types/slotted-angular-calendar.d.ts +43 -2
- package/types/slotted-angular-calendar.d.ts.map +1 -1
- package/types/slotted-angular-card.d.ts +1 -1
- package/types/slotted-angular-card.d.ts.map +1 -1
- package/types/slotted-angular-carousel.d.ts.map +1 -1
- package/types/slotted-angular-cascader.d.ts.map +1 -1
- package/types/slotted-angular-chart.d.ts +14 -11
- package/types/slotted-angular-chart.d.ts.map +1 -1
- package/types/slotted-angular-checkbox-group.d.ts.map +1 -1
- package/types/slotted-angular-checkbox.d.ts +1 -1
- package/types/slotted-angular-checkbox.d.ts.map +1 -1
- package/types/slotted-angular-code-block.d.ts +3 -2
- package/types/slotted-angular-code-block.d.ts.map +1 -1
- package/types/slotted-angular-collapsible.d.ts +3 -2
- package/types/slotted-angular-collapsible.d.ts.map +1 -1
- package/types/slotted-angular-color-picker.d.ts +6 -6
- package/types/slotted-angular-color-picker.d.ts.map +1 -1
- package/types/slotted-angular-column-manager.d.ts +1 -1
- package/types/slotted-angular-column-manager.d.ts.map +1 -1
- package/types/slotted-angular-combobox.d.ts +6 -1
- package/types/slotted-angular-combobox.d.ts.map +1 -1
- package/types/slotted-angular-command-palette.d.ts +10 -1
- package/types/slotted-angular-command-palette.d.ts.map +1 -1
- package/types/slotted-angular-container.d.ts.map +1 -1
- package/types/slotted-angular-context-menu.d.ts.map +1 -1
- package/types/slotted-angular-currency-field.d.ts +40 -14
- package/types/slotted-angular-currency-field.d.ts.map +1 -1
- package/types/slotted-angular-dashboard-grid.d.ts +63 -7
- package/types/slotted-angular-dashboard-grid.d.ts.map +1 -1
- package/types/slotted-angular-data-grid.d.ts +63 -5
- package/types/slotted-angular-data-grid.d.ts.map +1 -1
- package/types/slotted-angular-data-list.d.ts.map +1 -1
- package/types/slotted-angular-date-field.d.ts +11 -1
- package/types/slotted-angular-date-field.d.ts.map +1 -1
- package/types/slotted-angular-date-picker.d.ts +39 -12
- package/types/slotted-angular-date-picker.d.ts.map +1 -1
- package/types/slotted-angular-date-range-picker.d.ts +1 -1
- package/types/slotted-angular-date-range-picker.d.ts.map +1 -1
- package/types/slotted-angular-datetime-field.d.ts.map +1 -1
- package/types/slotted-angular-datetime-picker.d.ts +1 -1
- package/types/slotted-angular-datetime-picker.d.ts.map +1 -1
- package/types/slotted-angular-datetime-range-picker.d.ts +2 -2
- package/types/slotted-angular-datetime-range-picker.d.ts.map +1 -1
- package/types/slotted-angular-description-list.d.ts +12 -4
- package/types/slotted-angular-description-list.d.ts.map +1 -1
- package/types/slotted-angular-detail-panel.d.ts.map +1 -1
- package/types/slotted-angular-dialog.d.ts +11 -3
- package/types/slotted-angular-dialog.d.ts.map +1 -1
- package/types/slotted-angular-divider.d.ts.map +1 -1
- package/types/slotted-angular-drawer.d.ts +29 -3
- package/types/slotted-angular-drawer.d.ts.map +1 -1
- package/types/slotted-angular-entity-picker.d.ts +63 -15
- package/types/slotted-angular-entity-picker.d.ts.map +1 -1
- package/types/slotted-angular-event-calendar.d.ts.map +1 -1
- package/types/slotted-angular-field-group.d.ts +10 -2
- package/types/slotted-angular-field-group.d.ts.map +1 -1
- package/types/slotted-angular-field.d.ts +12 -4
- package/types/slotted-angular-field.d.ts.map +1 -1
- package/types/slotted-angular-filter-bar.d.ts.map +1 -1
- package/types/slotted-angular-form.d.ts +11 -2
- package/types/slotted-angular-form.d.ts.map +1 -1
- package/types/slotted-angular-fullscreen.d.ts.map +1 -1
- package/types/slotted-angular-grid.d.ts.map +1 -1
- package/types/slotted-angular-highlight.d.ts +1 -1
- package/types/slotted-angular-highlight.d.ts.map +1 -1
- package/types/slotted-angular-hover-card.d.ts.map +1 -1
- package/types/slotted-angular-icon.d.ts +15 -5
- package/types/slotted-angular-icon.d.ts.map +1 -1
- package/types/slotted-angular-image.d.ts.map +1 -1
- package/types/slotted-angular-import-export-center.d.ts +9 -9
- package/types/slotted-angular-import-export-center.d.ts.map +1 -1
- package/types/slotted-angular-inline-message.d.ts +32 -31
- package/types/slotted-angular-inline-message.d.ts.map +1 -1
- package/types/slotted-angular-inline.d.ts +1 -1
- package/types/slotted-angular-inline.d.ts.map +1 -1
- package/types/slotted-angular-kbd.d.ts +1 -1
- package/types/slotted-angular-kbd.d.ts.map +1 -1
- package/types/slotted-angular-link.d.ts +8 -2
- package/types/slotted-angular-link.d.ts.map +1 -1
- package/types/slotted-angular-list-item.d.ts +5 -1
- package/types/slotted-angular-list-item.d.ts.map +1 -1
- package/types/slotted-angular-list.d.ts +1 -1
- package/types/slotted-angular-list.d.ts.map +1 -1
- package/types/slotted-angular-listbox.d.ts +2 -2
- package/types/slotted-angular-listbox.d.ts.map +1 -1
- package/types/slotted-angular-loading-overlay.d.ts +3 -3
- package/types/slotted-angular-loading-overlay.d.ts.map +1 -1
- package/types/slotted-angular-markdown.d.ts +6 -1
- package/types/slotted-angular-markdown.d.ts.map +1 -1
- package/types/slotted-angular-media-viewer.d.ts +140 -0
- package/types/slotted-angular-media-viewer.d.ts.map +1 -0
- package/types/slotted-angular-menu.d.ts +17 -3
- package/types/slotted-angular-menu.d.ts.map +1 -1
- package/types/slotted-angular-menubar.d.ts +5 -4
- package/types/slotted-angular-menubar.d.ts.map +1 -1
- package/types/slotted-angular-message-scroller.d.ts +1 -1
- package/types/slotted-angular-message-scroller.d.ts.map +1 -1
- package/types/slotted-angular-message.d.ts +1 -1
- package/types/slotted-angular-message.d.ts.map +1 -1
- package/types/slotted-angular-multi-select.d.ts +6 -1
- package/types/slotted-angular-multi-select.d.ts.map +1 -1
- package/types/slotted-angular-navigation-menu.d.ts.map +1 -1
- package/types/slotted-angular-notification-center.d.ts +5 -5
- package/types/slotted-angular-notification-center.d.ts.map +1 -1
- package/types/slotted-angular-number-field.d.ts.map +1 -1
- package/types/slotted-angular-otp-input.d.ts +1 -1
- package/types/slotted-angular-otp-input.d.ts.map +1 -1
- package/types/slotted-angular-page-header.d.ts +15 -6
- package/types/slotted-angular-page-header.d.ts.map +1 -1
- package/types/slotted-angular-page.d.ts +7 -1
- package/types/slotted-angular-page.d.ts.map +1 -1
- package/types/slotted-angular-pagination.d.ts.map +1 -1
- package/types/slotted-angular-popover.d.ts.map +1 -1
- package/types/slotted-angular-progress-indicator.d.ts +10 -3
- package/types/slotted-angular-progress-indicator.d.ts.map +1 -1
- package/types/slotted-angular-prompt-composer.d.ts +35 -3
- package/types/slotted-angular-prompt-composer.d.ts.map +1 -1
- package/types/slotted-angular-prose.d.ts.map +1 -1
- package/types/slotted-angular-radio-group.d.ts +2 -2
- package/types/slotted-angular-radio-group.d.ts.map +1 -1
- package/types/slotted-angular-rating.d.ts +3 -3
- package/types/slotted-angular-rating.d.ts.map +1 -1
- package/types/slotted-angular-result-state.d.ts +1 -1
- package/types/slotted-angular-result-state.d.ts.map +1 -1
- package/types/slotted-angular-saved-views.d.ts.map +1 -1
- package/types/slotted-angular-scroll-area.d.ts.map +1 -1
- package/types/slotted-angular-section.d.ts +14 -4
- package/types/slotted-angular-section.d.ts.map +1 -1
- package/types/slotted-angular-segmented-control.d.ts +2 -2
- package/types/slotted-angular-segmented-control.d.ts.map +1 -1
- package/types/slotted-angular-select.d.ts +13 -2
- package/types/slotted-angular-select.d.ts.map +1 -1
- package/types/slotted-angular-side-navigation.d.ts.map +1 -1
- package/types/slotted-angular-skeleton.d.ts.map +1 -1
- package/types/slotted-angular-slider.d.ts.map +1 -1
- package/types/slotted-angular-sparkline.d.ts +7 -1
- package/types/slotted-angular-sparkline.d.ts.map +1 -1
- package/types/slotted-angular-split-button.d.ts +2 -2
- package/types/slotted-angular-split-button.d.ts.map +1 -1
- package/types/slotted-angular-splitter.d.ts.map +1 -1
- package/types/slotted-angular-stack.d.ts.map +1 -1
- package/types/slotted-angular-stat-card.d.ts +31 -7
- package/types/slotted-angular-stat-card.d.ts.map +1 -1
- package/types/slotted-angular-status-indicator.d.ts +15 -5
- package/types/slotted-angular-status-indicator.d.ts.map +1 -1
- package/types/slotted-angular-stepper.d.ts +2 -1
- package/types/slotted-angular-stepper.d.ts.map +1 -1
- package/types/slotted-angular-switch.d.ts +1 -1
- package/types/slotted-angular-switch.d.ts.map +1 -1
- package/types/slotted-angular-table-of-contents.d.ts.map +1 -1
- package/types/slotted-angular-table.d.ts +21 -4
- package/types/slotted-angular-table.d.ts.map +1 -1
- package/types/slotted-angular-tabs.d.ts +4 -5
- package/types/slotted-angular-tabs.d.ts.map +1 -1
- package/types/slotted-angular-tag.d.ts +5 -5
- package/types/slotted-angular-tag.d.ts.map +1 -1
- package/types/slotted-angular-tags-input.d.ts +34 -2
- package/types/slotted-angular-tags-input.d.ts.map +1 -1
- package/types/slotted-angular-text-field.d.ts.map +1 -1
- package/types/slotted-angular-textarea.d.ts.map +1 -1
- package/types/slotted-angular-theme.d.ts +8 -6
- package/types/slotted-angular-theme.d.ts.map +1 -1
- package/types/slotted-angular-time-field.d.ts.map +1 -1
- package/types/slotted-angular-time-picker.d.ts +1 -1
- package/types/slotted-angular-time-picker.d.ts.map +1 -1
- package/types/slotted-angular-time-range-picker.d.ts +2 -2
- package/types/slotted-angular-time-range-picker.d.ts.map +1 -1
- package/types/slotted-angular-timeline.d.ts +1 -1
- package/types/slotted-angular-timeline.d.ts.map +1 -1
- package/types/slotted-angular-toast.d.ts +9 -7
- package/types/slotted-angular-toast.d.ts.map +1 -1
- package/types/slotted-angular-toggle-group.d.ts +1 -1
- package/types/slotted-angular-toggle-group.d.ts.map +1 -1
- package/types/slotted-angular-toggle.d.ts +1 -1
- package/types/slotted-angular-toggle.d.ts.map +1 -1
- package/types/slotted-angular-toolbar.d.ts +2 -0
- package/types/slotted-angular-toolbar.d.ts.map +1 -1
- package/types/slotted-angular-tooltip.d.ts.map +1 -1
- package/types/slotted-angular-top-navigation.d.ts.map +1 -1
- package/types/slotted-angular-tour.d.ts +2 -2
- package/types/slotted-angular-tour.d.ts.map +1 -1
- package/types/slotted-angular-transfer.d.ts.map +1 -1
- package/types/slotted-angular-tree.d.ts.map +1 -1
- package/types/slotted-angular-typography.d.ts +1 -1
- package/types/slotted-angular-typography.d.ts.map +1 -1
- package/types/slotted-angular-upload.d.ts +4 -2
- package/types/slotted-angular-upload.d.ts.map +1 -1
- package/types/slotted-angular-visually-hidden.d.ts.map +1 -1
- package/types/slotted-angular-wizard.d.ts +1 -1
- package/types/slotted-angular-wizard.d.ts.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slotted-angular-hover-card.mjs","sources":["../../hover-card/src/hover-card-defaults.ts","../../hover-card/src/hover-card.ts","../../hover-card/src/hover-card-trigger.ts","../../hover-card/src/slotted-angular-hover-card.ts"],"sourcesContent":["import { inject, InjectionToken } from '@angular/core';\n\nexport interface HoverCardDefaults {\n /** Milliseconds the pointer rests on the trigger before the card opens. */\n openDelay: number;\n /** Milliseconds after the pointer has left trigger and card before it closes. */\n closeDelay: number;\n /**\n * Whether the card holds controls a keyboard reader can reach. On, `Tab`\n * from the open trigger enters it, the panel is a `dialog` and the trigger\n * says so; off, the card is a `presentation` the link never announces.\n */\n navigable: boolean;\n}\n\n/**\n * 600 to open is the number `tooltip` holds and the one Base UI reached; 300\n * to close is Radix's and Base UI's. The card is not navigable until a\n * consumer says it holds controls. The panel's own defaults are the popover's,\n * and `providePopoverDefaults()` is where an application sets those.\n */\nconst FALLBACK: HoverCardDefaults = {\n closeDelay: 300,\n navigable: false,\n openDelay: 600,\n};\n\nexport const HOVER_CARD_DEFAULTS = new InjectionToken<HoverCardDefaults>(\n 'slotted hover-card defaults',\n { providedIn: 'root', factory: () => FALLBACK },\n);\n\n/** The decisions an application takes once, in its bootstrap. */\nexport function provideHoverCardDefaults(defaults: Partial<HoverCardDefaults>) {\n return {\n provide: HOVER_CARD_DEFAULTS,\n useFactory: (): HoverCardDefaults => ({ ...FALLBACK, ...defaults }),\n };\n}\n\nexport function injectHoverCardDefaults(): HoverCardDefaults {\n return inject(HOVER_CARD_DEFAULTS);\n}\n","import { createPointerIntent } from '@slotted/core/pointer-intent';\nimport type { PointerIntentHandle } from '@slotted/core/pointer-intent';\nimport {\n booleanAttribute,\n computed,\n DestroyRef,\n Directive,\n effect,\n forwardRef,\n inject,\n input,\n numberAttribute,\n untracked,\n} from '@angular/core';\nimport { SlPopover } from '@slotted/angular/popover';\nimport type { PopoverOpenReason } from '@slotted/angular/popover';\n\nimport { injectHoverCardDefaults } from './hover-card-defaults';\n\n/**\n * The popover's reasons, plus `blur`: focus leaving the trigger is the one\n * way this family closes that the popover never does.\n */\nexport type HoverCardOpenReason = PopoverOpenReason | 'blur';\n\n/**\n * The halo the open mark draws past the link's box, plus the same again of\n * air: the popover puts its arrow's tip a pixel off the anchor, which is right\n * for a button and touched the halo on a word.\n */\nconst SIDE_OFFSET = 4;\n\n/**\n * A preview of a link or a person, opened by hover and by focus.\n *\n * The card is `slPopover` behind a trigger the popover does not have. The\n * directive *is* a popover — it extends `SlPopover` and provides itself as\n * one, so every `slPopover*` part written inside it reaches the card — and it\n * decides three things the popover leaves open: focus is never taken on open,\n * the panel's role follows `navigable`, and the layer stands off the link by\n * the halo the open mark draws. `slPopoverLayer`, `slPopoverBody` and the rest\n * are the popover's own, imported as they are.\n */\n@Directive({\n selector: '[slHoverCard]',\n standalone: true,\n exportAs: 'slHoverCard',\n providers: [{ provide: SlPopover, useExisting: forwardRef(() => SlHoverCard) }],\n})\nexport class SlHoverCard extends SlPopover {\n readonly openDelay = input<number | undefined, number | string | undefined>(undefined, {\n transform: (given) => (given === undefined ? undefined : numberAttribute(given)),\n });\n readonly closeDelay = input<number | undefined, number | string | undefined>(undefined, {\n transform: (given) => (given === undefined ? undefined : numberAttribute(given)),\n });\n readonly navigable = input<boolean | undefined, boolean | string | undefined>(undefined, {\n transform: (given) => (given === undefined ? undefined : booleanAttribute(given)),\n });\n\n private readonly cardDefaults = injectHoverCardDefaults();\n\n readonly resolvedOpenDelay = computed(() => this.openDelay() ?? this.cardDefaults.openDelay);\n readonly resolvedCloseDelay = computed(() => this.closeDelay() ?? this.cardDefaults.closeDelay);\n readonly resolvedNavigable = computed(\n () => (this.navigable() ?? this.cardDefaults.navigable) === true,\n );\n\n /** The card never takes focus: the reader's focus stays on the link. */\n override readonly resolvedAutoFocus = computed(() => false);\n /** A card the keyboard cannot enter is not a dialog nobody is told about. */\n override readonly contentRole = computed<string>(() =>\n this.resolvedNavigable() ? 'dialog' : 'presentation',\n );\n override readonly resolvedSideOffset = computed(() => this.sideOffset() ?? SIDE_OFFSET);\n\n /** Focus the family put back on the trigger must not reopen the card. */\n suppressFocusOpen = false;\n\n private timer: ReturnType<typeof setTimeout> | undefined;\n private intent: PointerIntentHandle | null = null;\n\n constructor() {\n super();\n const destroyRef = inject(DestroyRef);\n\n /**\n * The pointer on the card keeps it open, and leaving the card starts the\n * close. The listeners go on the layer — the padded box around the panel —\n * as soon as the popover has built it.\n */\n effect((onCleanup) => {\n const panel = this.contentNode();\n if (panel === null) return;\n const layer = panel.parentElement ?? panel;\n const enter = (event: Event) => {\n if ((event as PointerEvent).pointerType === 'touch') return;\n untracked(() => this.cancelPending());\n };\n const leave = (event: Event) => {\n if ((event as PointerEvent).pointerType === 'touch') return;\n untracked(() => this.closeAfterDelay(event));\n };\n layer.addEventListener('pointerenter', enter);\n layer.addEventListener('pointerleave', leave);\n onCleanup(() => {\n layer.removeEventListener('pointerenter', enter);\n layer.removeEventListener('pointerleave', leave);\n });\n });\n\n destroyRef.onDestroy(() => this.cancelPending());\n }\n\n /** Asks to open or close. A close the keyboard caused holds the reopening back. */\n override toggle(next: boolean, reason: HoverCardOpenReason, source?: Event) {\n this.cancelPending();\n super.toggle(next, reason as PopoverOpenReason, source);\n if (!next && !this.isOpen() && (reason === 'escape' || reason === 'keyboard')) {\n this.suppressFocusOpen = true;\n }\n }\n\n /** Cancels a pending open or close, and the grace area. */\n cancelPending() {\n if (this.timer !== undefined) clearTimeout(this.timer);\n this.timer = undefined;\n this.intent?.destroy();\n this.intent = null;\n }\n\n /** Opens after `openDelay`, unless something cancels it first. */\n openAfterDelay(source?: Event) {\n this.cancelPending();\n this.timer = setTimeout(() => this.toggle(true, 'pointer', source), this.resolvedOpenDelay());\n }\n\n /** Closes after `closeDelay`, unless the pointer comes back first. */\n closeAfterDelay(source?: Event) {\n this.cancelPending();\n this.timer = setTimeout(() => this.toggle(false, 'pointer', source), this.resolvedCloseDelay());\n }\n\n /**\n * The grace area: the card stays while the pointer's path from `origin`\n * still points into the card, and closes once it does not — unless the\n * pointer turns out to be on the trigger or the card after all.\n */\n graceToward(origin: () => DOMRect | null, stillOver: () => boolean, source?: Event) {\n this.cancelPending();\n this.intent = createPointerIntent({\n origin,\n target: () => {\n const panel = this.contentNode();\n return (panel?.parentElement ?? panel)?.getBoundingClientRect() ?? null;\n },\n timeout: this.resolvedCloseDelay(),\n onSettled: () => {\n this.intent = null;\n if (stillOver()) return;\n this.toggle(false, 'pointer', source);\n },\n });\n }\n}\n","import { tabbables } from '@slotted/core/focus';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n HostAttributeToken,\n inject,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { SlHoverCard } from './hover-card';\n\n/**\n * The link the card is about. It is the family's one part: the element painted\n * while the card shows, and the anchor the card is measured against — many\n * triggers may share one `slHoverCard`, and the one that starts an opening\n * registers itself.\n *\n * A component rather than a directive, as `slLink` and `slMenuItem` are,\n * because a component is what can carry `styleUrl`: this is where the family's\n * authored stylesheet enters an Angular application, and the trigger has to be\n * painted before any card has opened.\n *\n * The wiring — `aria-haspopup=\"dialog\"`, `aria-expanded`, `aria-controls` — is\n * written only when the card is navigable. A card the keyboard cannot enter is\n * not a popup the link has, and saying so would be a lie a screen reader\n * repeats.\n */\n@Component({\n selector: '[slHoverCardTrigger]',\n standalone: true,\n exportAs: 'slHoverCardTrigger',\n template: '<ng-content />',\n styleUrl: '../../../styles/src/hover-card/hover-card.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[attr.data-ui]': 'ui',\n '[attr.data-part]': 'part',\n '[attr.data-open]': 'open() ? \"\" : null',\n '[attr.aria-haspopup]': 'card.resolvedNavigable() ? \"dialog\" : null',\n '[attr.aria-expanded]': 'card.resolvedNavigable() ? open() : null',\n '[attr.aria-controls]': 'card.resolvedNavigable() && open() ? card.contentId : null',\n '(pointerenter)': 'onPointerEnter($event)',\n '(pointerleave)': 'onPointerLeave($event)',\n '(pointerdown)': 'onPointerDown($event)',\n '(click)': 'onClick($event)',\n '(focus)': 'onFocus($event)',\n '(blur)': 'onBlur($event)',\n '(keydown)': 'onKeyDown($event)',\n },\n})\nexport class SlHoverCardTrigger {\n protected readonly card = inject(SlHoverCard);\n private readonly element: HTMLElement = inject(ElementRef).nativeElement;\n\n /* A host that already carries an identity — `a[slLink]` cannot, since two\n components do not share an element, but a consumer's own part can — keeps\n it, as `menu-trigger.ts` records for two directives on one element. */\n private readonly writtenUi = inject(new HostAttributeToken('data-ui'), { optional: true });\n private readonly writtenPart = inject(new HostAttributeToken('data-part'), { optional: true });\n protected readonly ui = this.writtenUi ?? 'hover-card';\n protected readonly part = this.writtenPart ?? 'root';\n\n /** Whether this trigger is the one the open card hangs from. */\n protected readonly anchors = computed(() => this.card.triggerNode() === this.element);\n protected readonly open = computed(() => this.card.isOpen() && this.anchors());\n\n private tapped = false;\n\n constructor() {\n /* The first trigger to mount is the anchor until another takes it. */\n afterNextRender(() => {\n if (this.card.triggerNode() === null) this.card.triggerNode.set(this.element);\n });\n }\n\n private claim() {\n if (this.card.triggerNode() !== this.element) this.card.triggerNode.set(this.element);\n }\n\n private layer(): HTMLElement | null {\n const panel = this.card.contentNode();\n return panel?.parentElement ?? panel;\n }\n\n protected onPointerEnter(source: Event) {\n const event = source as PointerEvent;\n if (this.card.disabled() || event.pointerType === 'touch') return;\n this.claim();\n if (this.card.isOpen() && this.anchors()) {\n this.card.cancelPending();\n return;\n }\n this.card.openAfterDelay(event);\n }\n\n /**\n * Leaving the trigger with the card open starts the grace: the card stays\n * while the pointer's own path still points into it, and closes after\n * `closeDelay` once the pointer has parked somewhere else. Leaving with an\n * open still pending cancels the open.\n */\n protected onPointerLeave(source: Event) {\n const event = source as PointerEvent;\n if (event.pointerType === 'touch') return;\n if (!this.card.isOpen() || !this.anchors()) {\n this.card.cancelPending();\n return;\n }\n this.card.graceToward(\n () => this.element.getBoundingClientRect(),\n () => this.element.matches(':hover') || (this.layer()?.matches(':hover') ?? false),\n event,\n );\n }\n\n /**\n * `:focus-visible` rather than every focus: a press that focuses a link is a\n * navigation, not a request for its preview — and focus the family itself\n * put back after Escape or a focus guard must not reopen the card.\n */\n protected onFocus(event: Event) {\n if (this.card.disabled()) return;\n if (this.card.suppressFocusOpen) return;\n if (!this.element.matches(':focus-visible')) return;\n this.claim();\n this.card.toggle(true, 'keyboard', event);\n }\n\n protected onBlur(source: Event) {\n const event = source as FocusEvent;\n this.card.suppressFocusOpen = false;\n if (!this.card.isOpen() || !this.anchors()) return;\n const next = event.relatedTarget;\n if (next instanceof Node && this.layer()?.contains(next)) return;\n this.card.toggle(false, 'blur', event);\n }\n\n /**\n * `Tab` on the open trigger enters a navigable card, which lives at the end\n * of the document and would otherwise never be reached. The popover's focus\n * guards bring focus back out past either end.\n */\n protected onKeyDown(source: Event) {\n const event = source as KeyboardEvent;\n if (!this.card.resolvedNavigable() || !this.card.isOpen() || !this.anchors()) return;\n if (event.key !== 'Tab' || event.shiftKey) return;\n const panel = this.card.contentNode();\n if (panel === null) return;\n const [first] = tabbables(panel);\n if (first === undefined) return;\n event.preventDefault();\n first.focus();\n }\n\n /**\n * There is no hover on a coarse pointer. A tap on a closed trigger opens the\n * card and does not follow the link; a tap on an open one follows it.\n */\n protected onPointerDown(source: Event) {\n this.tapped = (source as PointerEvent).pointerType === 'touch';\n }\n\n protected onClick(event: Event) {\n if (!this.tapped) return;\n this.tapped = false;\n if (this.card.disabled() || (this.card.isOpen() && this.anchors())) return;\n event.preventDefault();\n this.claim();\n this.card.toggle(true, 'pointer', event);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport *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A,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,kBAAkB,+rBApBnB,gBAAgB,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,o8CAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAoBf,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAxB9B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,sBAAsB,EAAA,UAAA,EACpB,IAAI,EAAA,QAAA,EACN,oBAAoB,YACpB,gBAAgB,EAAA,eAAA,EAET,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,IAAI,EAAA,IAAA,EAC/B;AACJ,wBAAA,gBAAgB,EAAE,IAAI;AACtB,wBAAA,kBAAkB,EAAE,MAAM;AAC1B,wBAAA,kBAAkB,EAAE,oBAAoB;AACxC,wBAAA,sBAAsB,EAAE,4CAA4C;AACpE,wBAAA,sBAAsB,EAAE,0CAA0C;AAClE,wBAAA,sBAAsB,EAAE,4DAA4D;AACpF,wBAAA,gBAAgB,EAAE,wBAAwB;AAC1C,wBAAA,gBAAgB,EAAE,wBAAwB;AAC1C,wBAAA,eAAe,EAAE,uBAAuB;AACxC,wBAAA,SAAS,EAAE,iBAAiB;AAC5B,wBAAA,SAAS,EAAE,iBAAiB;AAC5B,wBAAA,QAAQ,EAAE,gBAAgB;AAC1B,wBAAA,WAAW,EAAE,mBAAmB;AACjC,qBAAA,EAAA,MAAA,EAAA,CAAA,o8CAAA,CAAA,EAAA;;;ACpDH;;AAEG;;"}
|
|
1
|
+
{"version":3,"file":"slotted-angular-hover-card.mjs","sources":["../../hover-card/src/hover-card-defaults.ts","../../hover-card/src/hover-card.ts","../../hover-card/src/hover-card-trigger.ts","../../hover-card/src/slotted-angular-hover-card.ts"],"sourcesContent":["import { inject, InjectionToken } from '@angular/core';\n\nexport interface HoverCardDefaults {\n /** Milliseconds the pointer rests on the trigger before the card opens. */\n openDelay: number;\n /** Milliseconds after the pointer has left trigger and card before it closes. */\n closeDelay: number;\n /**\n * Whether the card holds controls a keyboard reader can reach. On, `Tab`\n * from the open trigger enters it, the panel is a `dialog` and the trigger\n * says so; off, the card is a `presentation` the link never announces.\n */\n navigable: boolean;\n}\n\n/**\n * 600 to open is the number `tooltip` holds and the one Base UI reached; 300\n * to close is Radix's and Base UI's. The card is not navigable until a\n * consumer says it holds controls. The panel's own defaults are the popover's,\n * and `providePopoverDefaults()` is where an application sets those.\n */\nconst FALLBACK: HoverCardDefaults = {\n closeDelay: 300,\n navigable: false,\n openDelay: 600,\n};\n\nexport const HOVER_CARD_DEFAULTS = new InjectionToken<HoverCardDefaults>(\n 'slotted hover-card defaults',\n { providedIn: 'root', factory: () => FALLBACK },\n);\n\n/** The decisions an application takes once, in its bootstrap. */\nexport function provideHoverCardDefaults(defaults: Partial<HoverCardDefaults>) {\n return {\n provide: HOVER_CARD_DEFAULTS,\n useFactory: (): HoverCardDefaults => ({ ...FALLBACK, ...defaults }),\n };\n}\n\nexport function injectHoverCardDefaults(): HoverCardDefaults {\n return inject(HOVER_CARD_DEFAULTS);\n}\n","import { createPointerIntent } from '@slotted/core/pointer-intent';\nimport type { PointerIntentHandle } from '@slotted/core/pointer-intent';\nimport {\n booleanAttribute,\n computed,\n DestroyRef,\n Directive,\n effect,\n forwardRef,\n inject,\n input,\n numberAttribute,\n untracked,\n} from '@angular/core';\nimport { SlPopover } from '@slotted/angular/popover';\nimport type { PopoverOpenReason } from '@slotted/angular/popover';\n\nimport { injectHoverCardDefaults } from './hover-card-defaults';\n\n/**\n * The popover's reasons, plus `blur`: focus leaving the trigger is the one\n * way this family closes that the popover never does.\n */\nexport type HoverCardOpenReason = PopoverOpenReason | 'blur';\n\n/**\n * The halo the open mark draws past the link's box, plus the same again of\n * air: the popover puts its arrow's tip a pixel off the anchor, which is right\n * for a button and touched the halo on a word.\n */\nconst SIDE_OFFSET = 4;\n\n/**\n * A preview of a link or a person, opened by hover and by focus.\n *\n * The card is `slPopover` behind a trigger the popover does not have. The\n * directive *is* a popover — it extends `SlPopover` and provides itself as\n * one, so every `slPopover*` part written inside it reaches the card — and it\n * decides three things the popover leaves open: focus is never taken on open,\n * the panel's role follows `navigable`, and the layer stands off the link by\n * the halo the open mark draws. `slPopoverLayer`, `slPopoverBody` and the rest\n * are the popover's own, imported as they are.\n */\n@Directive({\n selector: '[slHoverCard]',\n standalone: true,\n exportAs: 'slHoverCard',\n providers: [{ provide: SlPopover, useExisting: forwardRef(() => SlHoverCard) }],\n})\nexport class SlHoverCard extends SlPopover {\n readonly openDelay = input<number | undefined, number | string | undefined>(undefined, {\n transform: (given) => (given === undefined ? undefined : numberAttribute(given)),\n });\n readonly closeDelay = input<number | undefined, number | string | undefined>(undefined, {\n transform: (given) => (given === undefined ? undefined : numberAttribute(given)),\n });\n readonly navigable = input<boolean | undefined, boolean | string | undefined>(undefined, {\n transform: (given) => (given === undefined ? undefined : booleanAttribute(given)),\n });\n\n private readonly cardDefaults = injectHoverCardDefaults();\n\n readonly resolvedOpenDelay = computed(() => this.openDelay() ?? this.cardDefaults.openDelay);\n readonly resolvedCloseDelay = computed(() => this.closeDelay() ?? this.cardDefaults.closeDelay);\n readonly resolvedNavigable = computed(\n () => (this.navigable() ?? this.cardDefaults.navigable) === true,\n );\n\n /** The card never takes focus: the reader's focus stays on the link. */\n override readonly resolvedAutoFocus = computed(() => false);\n /** A card the keyboard cannot enter is not a dialog nobody is told about. */\n override readonly contentRole = computed<string>(() =>\n this.resolvedNavigable() ? 'dialog' : 'presentation',\n );\n override readonly resolvedSideOffset = computed(() => this.sideOffset() ?? SIDE_OFFSET);\n\n /** Focus the family put back on the trigger must not reopen the card. */\n suppressFocusOpen = false;\n\n private timer: ReturnType<typeof setTimeout> | undefined;\n private intent: PointerIntentHandle | null = null;\n\n constructor() {\n super();\n const destroyRef = inject(DestroyRef);\n\n /**\n * The pointer on the card keeps it open, and leaving the card starts the\n * close. The listeners go on the layer — the padded box around the panel —\n * as soon as the popover has built it.\n */\n effect((onCleanup) => {\n const panel = this.contentNode();\n if (panel === null) return;\n const layer = panel.parentElement ?? panel;\n const enter = (event: Event) => {\n if ((event as PointerEvent).pointerType === 'touch') return;\n untracked(() => this.cancelPending());\n };\n const leave = (event: Event) => {\n if ((event as PointerEvent).pointerType === 'touch') return;\n untracked(() => this.closeAfterDelay(event));\n };\n layer.addEventListener('pointerenter', enter);\n layer.addEventListener('pointerleave', leave);\n onCleanup(() => {\n layer.removeEventListener('pointerenter', enter);\n layer.removeEventListener('pointerleave', leave);\n });\n });\n\n destroyRef.onDestroy(() => this.cancelPending());\n }\n\n /** Asks to open or close. A close the keyboard caused holds the reopening back. */\n override toggle(next: boolean, reason: HoverCardOpenReason, source?: Event) {\n this.cancelPending();\n super.toggle(next, reason as PopoverOpenReason, source);\n if (!next && !this.isOpen() && (reason === 'escape' || reason === 'keyboard')) {\n this.suppressFocusOpen = true;\n }\n }\n\n /** Cancels a pending open or close, and the grace area. */\n cancelPending() {\n if (this.timer !== undefined) clearTimeout(this.timer);\n this.timer = undefined;\n this.intent?.destroy();\n this.intent = null;\n }\n\n /** Opens after `openDelay`, unless something cancels it first. */\n openAfterDelay(source?: Event) {\n this.cancelPending();\n this.timer = setTimeout(() => this.toggle(true, 'pointer', source), this.resolvedOpenDelay());\n }\n\n /** Closes after `closeDelay`, unless the pointer comes back first. */\n closeAfterDelay(source?: Event) {\n this.cancelPending();\n this.timer = setTimeout(() => this.toggle(false, 'pointer', source), this.resolvedCloseDelay());\n }\n\n /**\n * The grace area: the card stays while the pointer's path from `origin`\n * still points into the card, and closes once it does not — unless the\n * pointer turns out to be on the trigger or the card after all.\n */\n graceToward(origin: () => DOMRect | null, stillOver: () => boolean, source?: Event) {\n this.cancelPending();\n this.intent = createPointerIntent({\n origin,\n target: () => {\n const panel = this.contentNode();\n return (panel?.parentElement ?? panel)?.getBoundingClientRect() ?? null;\n },\n timeout: this.resolvedCloseDelay(),\n onSettled: () => {\n this.intent = null;\n if (stillOver()) return;\n this.toggle(false, 'pointer', source);\n },\n });\n }\n}\n","import { hostSelectorKey } from '@slotted/core/selector-key';\nimport { tabbables } from '@slotted/core/focus';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n HostAttributeToken,\n inject,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { SlHoverCard } from './hover-card';\n\n/**\n * The link the card is about. It is the family's one part: the element painted\n * while the card shows, and the anchor the card is measured against — many\n * triggers may share one `slHoverCard`, and the one that starts an opening\n * registers itself.\n *\n * A component rather than a directive, as `slLink` and `slMenuItem` are,\n * because a component is what can carry `styleUrl`: this is where the family's\n * authored stylesheet enters an Angular application, and the trigger has to be\n * painted before any card has opened.\n *\n * The wiring — `aria-haspopup=\"dialog\"`, `aria-expanded`, `aria-controls` — is\n * written only when the card is navigable. A card the keyboard cannot enter is\n * not a popup the link has, and saying so would be a lie a screen reader\n * repeats.\n */\n@Component({\n selector: '[slHoverCardTrigger]',\n standalone: true,\n exportAs: 'slHoverCardTrigger',\n template: '<ng-content />',\n styleUrl: '../../../styles/src/hover-card/hover-card.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[attr.data-ui]': 'ui',\n '[attr.data-part]': 'part',\n '[attr.data-open]': 'open() ? \"\" : null',\n '[attr.aria-haspopup]': 'card.resolvedNavigable() ? \"dialog\" : null',\n '[attr.aria-expanded]': 'card.resolvedNavigable() ? open() : null',\n '[attr.aria-controls]': 'card.resolvedNavigable() && open() ? card.contentId : null',\n '(pointerenter)': 'onPointerEnter($event)',\n '(pointerleave)': 'onPointerLeave($event)',\n '(pointerdown)': 'onPointerDown($event)',\n '(click)': 'onClick($event)',\n '(focus)': 'onFocus($event)',\n '(blur)': 'onBlur($event)',\n '(keydown)': 'onKeyDown($event)',\n },\n})\nexport class SlHoverCardTrigger {\n protected readonly card = inject(SlHoverCard);\n private readonly element: HTMLElement = inject(ElementRef).nativeElement;\n\n /* A host that already carries an identity — `a[slLink]` cannot, since two\n components do not share an element, but a consumer's own part can — keeps\n it, as `menu-trigger.ts` records for two directives on one element. */\n private readonly writtenUi = inject(new HostAttributeToken('data-ui'), { optional: true });\n private readonly writtenPart = inject(new HostAttributeToken('data-part'), { optional: true });\n protected readonly ui = hostSelectorKey(this.element, 'ui', this.writtenUi ?? 'hover-card');\n protected readonly part = hostSelectorKey(this.element, 'part', this.writtenPart ?? 'root');\n\n /** Whether this trigger is the one the open card hangs from. */\n protected readonly anchors = computed(() => this.card.triggerNode() === this.element);\n protected readonly open = computed(() => this.card.isOpen() && this.anchors());\n\n private tapped = false;\n\n constructor() {\n /* The first trigger to mount is the anchor until another takes it. */\n afterNextRender(() => {\n if (this.card.triggerNode() === null) this.card.triggerNode.set(this.element);\n });\n }\n\n private claim() {\n if (this.card.triggerNode() !== this.element) this.card.triggerNode.set(this.element);\n }\n\n private layer(): HTMLElement | null {\n const panel = this.card.contentNode();\n return panel?.parentElement ?? panel;\n }\n\n protected onPointerEnter(source: Event) {\n const event = source as PointerEvent;\n if (this.card.disabled() || event.pointerType === 'touch') return;\n this.claim();\n if (this.card.isOpen() && this.anchors()) {\n this.card.cancelPending();\n return;\n }\n this.card.openAfterDelay(event);\n }\n\n /**\n * Leaving the trigger with the card open starts the grace: the card stays\n * while the pointer's own path still points into it, and closes after\n * `closeDelay` once the pointer has parked somewhere else. Leaving with an\n * open still pending cancels the open.\n */\n protected onPointerLeave(source: Event) {\n const event = source as PointerEvent;\n if (event.pointerType === 'touch') return;\n if (!this.card.isOpen() || !this.anchors()) {\n this.card.cancelPending();\n return;\n }\n this.card.graceToward(\n () => this.element.getBoundingClientRect(),\n () => this.element.matches(':hover') || (this.layer()?.matches(':hover') ?? false),\n event,\n );\n }\n\n /**\n * `:focus-visible` rather than every focus: a press that focuses a link is a\n * navigation, not a request for its preview — and focus the family itself\n * put back after Escape or a focus guard must not reopen the card.\n */\n protected onFocus(event: Event) {\n if (this.card.disabled()) return;\n if (this.card.suppressFocusOpen) return;\n if (!this.element.matches(':focus-visible')) return;\n this.claim();\n this.card.toggle(true, 'keyboard', event);\n }\n\n protected onBlur(source: Event) {\n const event = source as FocusEvent;\n this.card.suppressFocusOpen = false;\n if (!this.card.isOpen() || !this.anchors()) return;\n const next = event.relatedTarget;\n if (next instanceof Node && this.layer()?.contains(next)) return;\n this.card.toggle(false, 'blur', event);\n }\n\n /**\n * `Tab` on the open trigger enters a navigable card, which lives at the end\n * of the document and would otherwise never be reached. The popover's focus\n * guards bring focus back out past either end.\n */\n protected onKeyDown(source: Event) {\n const event = source as KeyboardEvent;\n if (!this.card.resolvedNavigable() || !this.card.isOpen() || !this.anchors()) return;\n if (event.key !== 'Tab' || event.shiftKey) return;\n const panel = this.card.contentNode();\n if (panel === null) return;\n const [first] = tabbables(panel);\n if (first === undefined) return;\n event.preventDefault();\n first.focus();\n }\n\n /**\n * There is no hover on a coarse pointer. A tap on a closed trigger opens the\n * card and does not follow the link; a tap on an open one follows it.\n */\n protected onPointerDown(source: Event) {\n this.tapped = (source as PointerEvent).pointerType === 'touch';\n }\n\n protected onClick(event: Event) {\n if (!this.tapped) return;\n this.tapped = false;\n if (this.card.disabled() || (this.card.isOpen() && this.anchors())) return;\n event.preventDefault();\n this.claim();\n this.card.toggle(true, 'pointer', event);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAeA;;;;;AAKG;AACH,MAAM,QAAQ,GAAsB;AAClC,IAAA,UAAU,EAAE,GAAG;AACf,IAAA,SAAS,EAAE,KAAK;AAChB,IAAA,SAAS,EAAE,GAAG;CACf;MAEY,mBAAmB,GAAG,IAAI,cAAc,CACnD,6BAA6B,EAC7B,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,QAAQ,EAAE;AAGjD;AACM,SAA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aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAoBf,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAxB9B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,sBAAsB,EAAA,UAAA,EACpB,IAAI,EAAA,QAAA,EACN,oBAAoB,YACpB,gBAAgB,EAAA,eAAA,EAET,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,IAAI,EAAA,IAAA,EAC/B;AACJ,wBAAA,gBAAgB,EAAE,IAAI;AACtB,wBAAA,kBAAkB,EAAE,MAAM;AAC1B,wBAAA,kBAAkB,EAAE,oBAAoB;AACxC,wBAAA,sBAAsB,EAAE,4CAA4C;AACpE,wBAAA,sBAAsB,EAAE,0CAA0C;AAClE,wBAAA,sBAAsB,EAAE,4DAA4D;AACpF,wBAAA,gBAAgB,EAAE,wBAAwB;AAC1C,wBAAA,gBAAgB,EAAE,wBAAwB;AAC1C,wBAAA,eAAe,EAAE,uBAAuB;AACxC,wBAAA,SAAS,EAAE,iBAAiB;AAC5B,wBAAA,SAAS,EAAE,iBAAiB;AAC5B,wBAAA,QAAQ,EAAE,gBAAgB;AAC1B,wBAAA,WAAW,EAAE,mBAAmB;AACjC,qBAAA,EAAA,MAAA,EAAA,CAAA,o8CAAA,CAAA,EAAA;;;ACrDH;;AAEG;;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { input, booleanAttribute, computed, ChangeDetectionStrategy, Component, inject, HostAttributeToken, ViewEncapsulation } from '@angular/core';
|
|
3
|
-
import { GLYPH_VIEW_BOX, GLYPHS } from '@slotted/core/glyph';
|
|
3
|
+
import { GLYPH_VIEW_BOX, isStatusGlyph, STATUS_GLYPH_GRIDS, STATUS_GLYPHS, GLYPHS } from '@slotted/core/glyph';
|
|
4
4
|
|
|
5
5
|
let sequence = 0;
|
|
6
6
|
/**
|
|
7
7
|
* Glyph is the library's own artwork, drawn as a real `<svg>`: the Lucide
|
|
8
8
|
* geometry `@slotted/core/glyph` holds, stroked or filled with `currentColor`.
|
|
9
|
-
* It goes inside a `slIcon` box, which owns the size, the
|
|
9
|
+
* It goes inside a `slIcon` box, which owns the size, the color, the
|
|
10
10
|
* alignment and the name; the glyph owns only the drawing. Every family draws
|
|
11
11
|
* its own icons — a close button's cross, a pager's chevrons — with this
|
|
12
12
|
* element, and never with a pseudo-element or a mask of its own.
|
|
@@ -15,6 +15,9 @@ let sequence = 0;
|
|
|
15
15
|
* shape filled, and the symbol inside it cut out of the fill by an SVG
|
|
16
16
|
* `<mask>`, so whatever lies behind shows through the symbol on any ground.
|
|
17
17
|
*
|
|
18
|
+
* A status mark (`status-*`) is always solid, and is drawn once per grid it
|
|
19
|
+
* was drawn on; `icon.css` shows the grid the icon box is sized for.
|
|
20
|
+
*
|
|
18
21
|
* The children carry the `svg:` namespace because the template is parsed apart
|
|
19
22
|
* from its host: an unprefixed `<path>` would be created as an HTML element.
|
|
20
23
|
*/
|
|
@@ -30,7 +33,22 @@ class SlGlyph {
|
|
|
30
33
|
solid = input(false, { ...(ngDevMode ? { debugName: "solid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
31
34
|
maskId = `sl-glyph-${String((sequence += 1))}`;
|
|
32
35
|
viewBox = GLYPH_VIEW_BOX;
|
|
33
|
-
drawing
|
|
36
|
+
/** A status mark's drawing on each of its grids; `null` for a Lucide glyph. */
|
|
37
|
+
grids = computed(() => {
|
|
38
|
+
const name = this.name();
|
|
39
|
+
return isStatusGlyph(name)
|
|
40
|
+
? STATUS_GLYPH_GRIDS.map((size) => ({ size, drawing: STATUS_GLYPHS[name][size] }))
|
|
41
|
+
: null;
|
|
42
|
+
}, /* @ts-ignore */
|
|
43
|
+
...(ngDevMode ? [{ debugName: "grids" }] : /* istanbul ignore next */ []));
|
|
44
|
+
/** Painted by the root's own fill or stroke rather than by a solid shape. */
|
|
45
|
+
painted = computed(() => !this.solid() && this.grids() === null, /* @ts-ignore */
|
|
46
|
+
...(ngDevMode ? [{ debugName: "painted" }] : /* istanbul ignore next */ []));
|
|
47
|
+
/* A status mark has no Lucide drawing, and reads none: `dot` only keeps the signal typed. */
|
|
48
|
+
drawing = computed(() => {
|
|
49
|
+
const name = this.name();
|
|
50
|
+
return isStatusGlyph(name) ? GLYPHS.dot : GLYPHS[name];
|
|
51
|
+
}, /* @ts-ignore */
|
|
34
52
|
...(ngDevMode ? [{ debugName: "drawing" }] : /* istanbul ignore next */ []));
|
|
35
53
|
symbol = computed(() => this.drawing().paths.slice(1), /* @ts-ignore */
|
|
36
54
|
...(ngDevMode ? [{ debugName: "symbol" }] : /* istanbul ignore next */ []));
|
|
@@ -42,115 +60,196 @@ class SlGlyph {
|
|
|
42
60
|
}, /* @ts-ignore */
|
|
43
61
|
...(ngDevMode ? [{ debugName: "transform" }] : /* istanbul ignore next */ []));
|
|
44
62
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlGlyph, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
45
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: SlGlyph, isStandalone: true, selector: "svg[slGlyph]", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, solid: { classPropertyName: "solid", publicName: "solid", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "aria-hidden": "true", "focusable": "false", "data-part": "glyph" }, properties: { "attr.data-glyph": "name()", "attr.viewBox": "viewBox", "attr.data-solid": "
|
|
46
|
-
|
|
47
|
-
<svg:
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
63
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: SlGlyph, isStandalone: true, selector: "svg[slGlyph]", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, solid: { classPropertyName: "solid", publicName: "solid", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "aria-hidden": "true", "focusable": "false", "data-part": "glyph", "data-part-glyph": "" }, properties: { "attr.data-glyph": "name()", "attr.viewBox": "grids() ? '0 0 16 16' : viewBox", "attr.data-solid": "painted() ? null : ''", "attr.fill": "painted() ? (stroked() ? 'none' : 'currentColor') : null", "attr.stroke": "painted() && stroked() ? 'currentColor' : null", "attr.stroke-width": "painted() && stroked() ? drawing().strokeWidth : null", "attr.stroke-linecap": "painted() && stroked() ? 'round' : null", "attr.stroke-linejoin": "painted() && stroked() ? 'round' : null" } }, ngImport: i0, template: `@if (grids(); as grids) {
|
|
64
|
+
@for (grid of grids; track grid.size) {
|
|
65
|
+
<svg:svg [attr.data-grid]="grid.size" [attr.viewBox]="'0 0 ' + grid.size + ' ' + grid.size">
|
|
66
|
+
<svg:defs>
|
|
67
|
+
<svg:mask
|
|
68
|
+
[attr.id]="maskId + '-' + grid.size"
|
|
69
|
+
maskUnits="userSpaceOnUse"
|
|
70
|
+
x="0"
|
|
71
|
+
y="0"
|
|
72
|
+
[attr.width]="grid.size"
|
|
73
|
+
[attr.height]="grid.size"
|
|
74
|
+
>
|
|
75
|
+
<svg:rect fill="#fff" [attr.width]="grid.size" [attr.height]="grid.size" />
|
|
76
|
+
@for (d of grid.drawing.holes; track $index) {
|
|
77
|
+
<svg:path [attr.d]="d" fill="#000" />
|
|
78
|
+
}
|
|
79
|
+
@for (d of grid.drawing.strokes; track $index) {
|
|
80
|
+
<svg:path
|
|
81
|
+
[attr.d]="d"
|
|
82
|
+
fill="none"
|
|
83
|
+
stroke="#000"
|
|
84
|
+
stroke-linecap="round"
|
|
85
|
+
stroke-linejoin="round"
|
|
86
|
+
stroke-width="2"
|
|
87
|
+
/>
|
|
88
|
+
}
|
|
89
|
+
</svg:mask>
|
|
90
|
+
</svg:defs>
|
|
91
|
+
<svg:path
|
|
92
|
+
[attr.d]="grid.drawing.shape"
|
|
93
|
+
fill="currentColor"
|
|
94
|
+
[attr.mask]="'url(#' + maskId + '-' + grid.size + ')'"
|
|
95
|
+
[attr.stroke]="grid.drawing.shapeStroke === 0 ? null : 'currentColor'"
|
|
96
|
+
[attr.stroke-linejoin]="grid.drawing.shapeStroke === 0 ? null : 'round'"
|
|
97
|
+
[attr.stroke-width]="grid.drawing.shapeStroke === 0 ? null : grid.drawing.shapeStroke"
|
|
98
|
+
/>
|
|
99
|
+
</svg:svg>
|
|
100
|
+
}
|
|
101
|
+
} @else {
|
|
102
|
+
@if (solid()) {
|
|
103
|
+
<svg:defs>
|
|
104
|
+
<svg:mask
|
|
105
|
+
[attr.id]="maskId"
|
|
106
|
+
maskUnits="userSpaceOnUse"
|
|
107
|
+
x="-2"
|
|
108
|
+
y="-2"
|
|
109
|
+
width="28"
|
|
110
|
+
height="28"
|
|
111
|
+
>
|
|
112
|
+
<svg:rect x="-2" y="-2" width="28" height="28" fill="#fff" />
|
|
113
|
+
<svg:g
|
|
114
|
+
fill="none"
|
|
115
|
+
stroke="#000"
|
|
116
|
+
stroke-linecap="round"
|
|
117
|
+
stroke-linejoin="round"
|
|
118
|
+
[attr.stroke-width]="drawing().strokeWidth"
|
|
119
|
+
>
|
|
120
|
+
@for (d of symbol(); track $index) {
|
|
121
|
+
<svg:path [attr.d]="d" />
|
|
122
|
+
}
|
|
123
|
+
</svg:g>
|
|
124
|
+
</svg:mask>
|
|
125
|
+
</svg:defs>
|
|
126
|
+
}
|
|
127
|
+
<svg:g [attr.transform]="transform()">
|
|
128
|
+
@if (solid()) {
|
|
129
|
+
<svg:path
|
|
130
|
+
[attr.d]="drawing().paths[0]"
|
|
131
|
+
fill="currentColor"
|
|
132
|
+
stroke="currentColor"
|
|
59
133
|
stroke-linecap="round"
|
|
60
134
|
stroke-linejoin="round"
|
|
61
135
|
[attr.stroke-width]="drawing().strokeWidth"
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
</svg:defs>
|
|
69
|
-
}
|
|
70
|
-
<svg:g [attr.transform]="transform()">
|
|
71
|
-
@if (solid()) {
|
|
72
|
-
<svg:path
|
|
73
|
-
[attr.d]="drawing().paths[0]"
|
|
74
|
-
fill="currentColor"
|
|
75
|
-
stroke="currentColor"
|
|
76
|
-
stroke-linecap="round"
|
|
77
|
-
stroke-linejoin="round"
|
|
78
|
-
[attr.stroke-width]="drawing().strokeWidth"
|
|
79
|
-
[attr.mask]="'url(#' + maskId + ')'"
|
|
80
|
-
/>
|
|
81
|
-
} @else {
|
|
82
|
-
@for (d of drawing().paths; track $index) {
|
|
83
|
-
<svg:path [attr.d]="d" />
|
|
136
|
+
[attr.mask]="'url(#' + maskId + ')'"
|
|
137
|
+
/>
|
|
138
|
+
} @else {
|
|
139
|
+
@for (d of drawing().paths; track $index) {
|
|
140
|
+
<svg:path [attr.d]="d" />
|
|
141
|
+
}
|
|
84
142
|
}
|
|
85
|
-
|
|
86
|
-
|
|
143
|
+
</svg:g>
|
|
144
|
+
}`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
87
145
|
}
|
|
88
146
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlGlyph, decorators: [{
|
|
89
147
|
type: Component,
|
|
90
148
|
args: [{
|
|
91
149
|
selector: 'svg[slGlyph]',
|
|
92
150
|
standalone: true,
|
|
93
|
-
template: `@if (
|
|
94
|
-
|
|
95
|
-
<svg:
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
151
|
+
template: `@if (grids(); as grids) {
|
|
152
|
+
@for (grid of grids; track grid.size) {
|
|
153
|
+
<svg:svg [attr.data-grid]="grid.size" [attr.viewBox]="'0 0 ' + grid.size + ' ' + grid.size">
|
|
154
|
+
<svg:defs>
|
|
155
|
+
<svg:mask
|
|
156
|
+
[attr.id]="maskId + '-' + grid.size"
|
|
157
|
+
maskUnits="userSpaceOnUse"
|
|
158
|
+
x="0"
|
|
159
|
+
y="0"
|
|
160
|
+
[attr.width]="grid.size"
|
|
161
|
+
[attr.height]="grid.size"
|
|
162
|
+
>
|
|
163
|
+
<svg:rect fill="#fff" [attr.width]="grid.size" [attr.height]="grid.size" />
|
|
164
|
+
@for (d of grid.drawing.holes; track $index) {
|
|
165
|
+
<svg:path [attr.d]="d" fill="#000" />
|
|
166
|
+
}
|
|
167
|
+
@for (d of grid.drawing.strokes; track $index) {
|
|
168
|
+
<svg:path
|
|
169
|
+
[attr.d]="d"
|
|
170
|
+
fill="none"
|
|
171
|
+
stroke="#000"
|
|
172
|
+
stroke-linecap="round"
|
|
173
|
+
stroke-linejoin="round"
|
|
174
|
+
stroke-width="2"
|
|
175
|
+
/>
|
|
176
|
+
}
|
|
177
|
+
</svg:mask>
|
|
178
|
+
</svg:defs>
|
|
179
|
+
<svg:path
|
|
180
|
+
[attr.d]="grid.drawing.shape"
|
|
181
|
+
fill="currentColor"
|
|
182
|
+
[attr.mask]="'url(#' + maskId + '-' + grid.size + ')'"
|
|
183
|
+
[attr.stroke]="grid.drawing.shapeStroke === 0 ? null : 'currentColor'"
|
|
184
|
+
[attr.stroke-linejoin]="grid.drawing.shapeStroke === 0 ? null : 'round'"
|
|
185
|
+
[attr.stroke-width]="grid.drawing.shapeStroke === 0 ? null : grid.drawing.shapeStroke"
|
|
186
|
+
/>
|
|
187
|
+
</svg:svg>
|
|
188
|
+
}
|
|
189
|
+
} @else {
|
|
190
|
+
@if (solid()) {
|
|
191
|
+
<svg:defs>
|
|
192
|
+
<svg:mask
|
|
193
|
+
[attr.id]="maskId"
|
|
194
|
+
maskUnits="userSpaceOnUse"
|
|
195
|
+
x="-2"
|
|
196
|
+
y="-2"
|
|
197
|
+
width="28"
|
|
198
|
+
height="28"
|
|
199
|
+
>
|
|
200
|
+
<svg:rect x="-2" y="-2" width="28" height="28" fill="#fff" />
|
|
201
|
+
<svg:g
|
|
202
|
+
fill="none"
|
|
203
|
+
stroke="#000"
|
|
204
|
+
stroke-linecap="round"
|
|
205
|
+
stroke-linejoin="round"
|
|
206
|
+
[attr.stroke-width]="drawing().strokeWidth"
|
|
207
|
+
>
|
|
208
|
+
@for (d of symbol(); track $index) {
|
|
209
|
+
<svg:path [attr.d]="d" />
|
|
210
|
+
}
|
|
211
|
+
</svg:g>
|
|
212
|
+
</svg:mask>
|
|
213
|
+
</svg:defs>
|
|
214
|
+
}
|
|
215
|
+
<svg:g [attr.transform]="transform()">
|
|
216
|
+
@if (solid()) {
|
|
217
|
+
<svg:path
|
|
218
|
+
[attr.d]="drawing().paths[0]"
|
|
219
|
+
fill="currentColor"
|
|
220
|
+
stroke="currentColor"
|
|
107
221
|
stroke-linecap="round"
|
|
108
222
|
stroke-linejoin="round"
|
|
109
223
|
[attr.stroke-width]="drawing().strokeWidth"
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
</svg:defs>
|
|
117
|
-
}
|
|
118
|
-
<svg:g [attr.transform]="transform()">
|
|
119
|
-
@if (solid()) {
|
|
120
|
-
<svg:path
|
|
121
|
-
[attr.d]="drawing().paths[0]"
|
|
122
|
-
fill="currentColor"
|
|
123
|
-
stroke="currentColor"
|
|
124
|
-
stroke-linecap="round"
|
|
125
|
-
stroke-linejoin="round"
|
|
126
|
-
[attr.stroke-width]="drawing().strokeWidth"
|
|
127
|
-
[attr.mask]="'url(#' + maskId + ')'"
|
|
128
|
-
/>
|
|
129
|
-
} @else {
|
|
130
|
-
@for (d of drawing().paths; track $index) {
|
|
131
|
-
<svg:path [attr.d]="d" />
|
|
224
|
+
[attr.mask]="'url(#' + maskId + ')'"
|
|
225
|
+
/>
|
|
226
|
+
} @else {
|
|
227
|
+
@for (d of drawing().paths; track $index) {
|
|
228
|
+
<svg:path [attr.d]="d" />
|
|
229
|
+
}
|
|
132
230
|
}
|
|
133
|
-
|
|
134
|
-
|
|
231
|
+
</svg:g>
|
|
232
|
+
}`,
|
|
135
233
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
136
234
|
host: {
|
|
137
235
|
'aria-hidden': 'true',
|
|
138
236
|
focusable: 'false',
|
|
139
237
|
'data-part': 'glyph',
|
|
238
|
+
'data-part-glyph': '',
|
|
140
239
|
'[attr.data-glyph]': 'name()',
|
|
141
|
-
'[attr.viewBox]': 'viewBox
|
|
142
|
-
'[attr.data-solid]': "
|
|
143
|
-
'[attr.fill]': "
|
|
144
|
-
'[attr.stroke]': "
|
|
145
|
-
'[attr.stroke-width]': '
|
|
146
|
-
'[attr.stroke-linecap]': "
|
|
147
|
-
'[attr.stroke-linejoin]': "
|
|
240
|
+
'[attr.viewBox]': "grids() ? '0 0 16 16' : viewBox",
|
|
241
|
+
'[attr.data-solid]': "painted() ? null : ''",
|
|
242
|
+
'[attr.fill]': "painted() ? (stroked() ? 'none' : 'currentColor') : null",
|
|
243
|
+
'[attr.stroke]': "painted() && stroked() ? 'currentColor' : null",
|
|
244
|
+
'[attr.stroke-width]': 'painted() && stroked() ? drawing().strokeWidth : null',
|
|
245
|
+
'[attr.stroke-linecap]': "painted() && stroked() ? 'round' : null",
|
|
246
|
+
'[attr.stroke-linejoin]': "painted() && stroked() ? 'round' : null",
|
|
148
247
|
},
|
|
149
248
|
}]
|
|
150
249
|
}], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: true }] }], solid: [{ type: i0.Input, args: [{ isSignal: true, alias: "solid", required: false }] }] } });
|
|
151
250
|
|
|
152
251
|
/**
|
|
153
|
-
* `inherit` is the absence of a
|
|
252
|
+
* `inherit` is the absence of a color rather than a color of its own, so it
|
|
154
253
|
* removes the attribute and lets the surface decide.
|
|
155
254
|
*/
|
|
156
255
|
function toneAttribute(tone) {
|
|
@@ -161,7 +260,7 @@ function toneAttribute(tone) {
|
|
|
161
260
|
* Icon is the box a glyph is drawn in, not the glyph. The library ships no
|
|
162
261
|
* catalogue: the artwork is the consumer's — an `ng-icon`, an inline `svg`,
|
|
163
262
|
* anything that renders one — and this family owns the size it is drawn at,
|
|
164
|
-
* the
|
|
263
|
+
* the color it inherits, where it sits against a line of text, and whether it
|
|
165
264
|
* mirrors where reading runs the other way.
|
|
166
265
|
*
|
|
167
266
|
* The selector is the bare attribute, so the consumer writes the element. It
|
|
@@ -208,20 +307,22 @@ class SlIcon {
|
|
|
208
307
|
toneAttribute = computed(() => toneAttribute(this.tone()), /* @ts-ignore */
|
|
209
308
|
...(ngDevMode ? [{ debugName: "toneAttribute" }] : /* istanbul ignore next */ []));
|
|
210
309
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlIcon, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
211
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.7", type: SlIcon, isStandalone: true, selector: "[slIcon]", inputs: { directional: { classPropertyName: "directional", publicName: "directional", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, tone: { classPropertyName: "tone", publicName: "tone", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-ui": "icon", "data-part": "root" }, properties: { "attr.data-size": "size() ?? null", "attr.data-tone": "toneAttribute()", "attr.data-directional": "directional() ? \"\" : null", "attr.role": "role()", "attr.aria-label": "ariaLabel()", "attr.aria-hidden": "named() ? null : \"true\"" } }, exportAs: ["slIcon"], ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: ["@layer slotted.components{[data-ui
|
|
310
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.7", type: SlIcon, isStandalone: true, selector: "[slIcon]", inputs: { directional: { classPropertyName: "directional", publicName: "directional", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, tone: { classPropertyName: "tone", publicName: "tone", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-ui": "icon", "data-ui-icon": "", "data-part": "root", "data-part-root": "" }, properties: { "attr.data-size": "size() ?? null", "attr.data-tone": "toneAttribute()", "attr.data-directional": "directional() ? \"\" : null", "attr.role": "role()", "attr.aria-label": "ariaLabel()", "attr.aria-hidden": "named() ? null : \"true\"" } }, exportAs: ["slIcon"], ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: ["@layer slotted.components{[data-ui-icon]{--_size: var(--slotted-icon-size, var(--slotted-control-icon-size-md, 16px));align-items:center;block-size:var(--_size);display:inline-flex;flex:none;inline-size:var(--_size);justify-content:center;line-height:1;vertical-align:var(--slotted-icon-baseline-shift, calc(.5cap - .5 * var(--_size)))}[data-ui-icon]>*,[data-ui-icon] svg{block-size:100%;display:block;font-size:var(--_size);inline-size:100%}[data-ui-icon]:has(>svg>svg[data-grid]){container-type:size}[data-ui-icon] svg[data-grid]{display:none}@container (width < 13px){[data-ui-icon] svg[data-grid=\"12\"]{display:block}}@container (13px <= width < 15px){[data-ui-icon] svg[data-grid=\"14\"]{display:block}}@container (width >= 15px){[data-ui-icon] svg[data-grid=\"16\"]{display:block}}@media(max-resolution:.99dppx){[data-ui-icon] svg[data-grid]{display:none}[data-ui-icon] svg[data-grid=\"12\"]{display:block}}[data-ui-icon][data-size=text]{--slotted-icon-size: 1em}[data-ui-icon][data-size=sm]{--slotted-icon-size: var(--slotted-control-icon-size-sm, 14px)}[data-ui-icon][data-size=md]{--slotted-icon-size: var(--slotted-control-icon-size-md, 16px)}[data-ui-icon][data-size=lg]{--slotted-icon-size: var(--slotted-control-icon-size-lg, 18px)}[data-ui-icon][data-tone=default]{color:var(--slotted-text, CanvasText)}[data-ui-icon][data-tone=muted]{color:var(--slotted-text-muted, GrayText)}[data-ui-icon][data-tone=accent]{color:var(--slotted-tone-accent-text, LinkText)}[data-ui-icon][data-tone=success]{color:var(--slotted-tone-success-text, CanvasText)}[data-ui-icon][data-tone=info]{color:var(--slotted-tone-info-text, CanvasText)}[data-ui-icon][data-tone=warning]{color:var(--slotted-tone-warning-text, CanvasText)}[data-ui-icon][data-tone=danger]{color:var(--slotted-tone-danger-text, CanvasText)}[data-ui-icon][data-tone=inverse]{color:var(--slotted-text-inverse, Canvas)}[data-ui-icon][data-directional]:dir(rtl){scale:-1 1}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
212
311
|
}
|
|
213
312
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlIcon, decorators: [{
|
|
214
313
|
type: Component,
|
|
215
314
|
args: [{ selector: '[slIcon]', standalone: true, exportAs: 'slIcon', template: '<ng-content></ng-content>', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
216
315
|
'data-ui': 'icon',
|
|
316
|
+
'data-ui-icon': '',
|
|
217
317
|
'data-part': 'root',
|
|
318
|
+
'data-part-root': '',
|
|
218
319
|
'[attr.data-size]': 'size() ?? null',
|
|
219
320
|
'[attr.data-tone]': 'toneAttribute()',
|
|
220
321
|
'[attr.data-directional]': 'directional() ? "" : null',
|
|
221
322
|
'[attr.role]': 'role()',
|
|
222
323
|
'[attr.aria-label]': 'ariaLabel()',
|
|
223
324
|
'[attr.aria-hidden]': 'named() ? null : "true"',
|
|
224
|
-
}, styles: ["@layer slotted.components{[data-ui
|
|
325
|
+
}, styles: ["@layer slotted.components{[data-ui-icon]{--_size: var(--slotted-icon-size, var(--slotted-control-icon-size-md, 16px));align-items:center;block-size:var(--_size);display:inline-flex;flex:none;inline-size:var(--_size);justify-content:center;line-height:1;vertical-align:var(--slotted-icon-baseline-shift, calc(.5cap - .5 * var(--_size)))}[data-ui-icon]>*,[data-ui-icon] svg{block-size:100%;display:block;font-size:var(--_size);inline-size:100%}[data-ui-icon]:has(>svg>svg[data-grid]){container-type:size}[data-ui-icon] svg[data-grid]{display:none}@container (width < 13px){[data-ui-icon] svg[data-grid=\"12\"]{display:block}}@container (13px <= width < 15px){[data-ui-icon] svg[data-grid=\"14\"]{display:block}}@container (width >= 15px){[data-ui-icon] svg[data-grid=\"16\"]{display:block}}@media(max-resolution:.99dppx){[data-ui-icon] svg[data-grid]{display:none}[data-ui-icon] svg[data-grid=\"12\"]{display:block}}[data-ui-icon][data-size=text]{--slotted-icon-size: 1em}[data-ui-icon][data-size=sm]{--slotted-icon-size: var(--slotted-control-icon-size-sm, 14px)}[data-ui-icon][data-size=md]{--slotted-icon-size: var(--slotted-control-icon-size-md, 16px)}[data-ui-icon][data-size=lg]{--slotted-icon-size: var(--slotted-control-icon-size-lg, 18px)}[data-ui-icon][data-tone=default]{color:var(--slotted-text, CanvasText)}[data-ui-icon][data-tone=muted]{color:var(--slotted-text-muted, GrayText)}[data-ui-icon][data-tone=accent]{color:var(--slotted-tone-accent-text, LinkText)}[data-ui-icon][data-tone=success]{color:var(--slotted-tone-success-text, CanvasText)}[data-ui-icon][data-tone=info]{color:var(--slotted-tone-info-text, CanvasText)}[data-ui-icon][data-tone=warning]{color:var(--slotted-tone-warning-text, CanvasText)}[data-ui-icon][data-tone=danger]{color:var(--slotted-tone-danger-text, CanvasText)}[data-ui-icon][data-tone=inverse]{color:var(--slotted-text-inverse, Canvas)}[data-ui-icon][data-directional]:dir(rtl){scale:-1 1}}\n"] }]
|
|
225
326
|
}], propDecorators: { directional: [{ type: i0.Input, args: [{ isSignal: true, alias: "directional", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], tone: [{ type: i0.Input, args: [{ isSignal: true, alias: "tone", required: false }] }] } });
|
|
226
327
|
|
|
227
328
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slotted-angular-icon.mjs","sources":["../../icon/src/glyph.ts","../../icon/src/icon.types.ts","../../icon/src/icon.ts","../../icon/src/slotted-angular-icon.ts"],"sourcesContent":["import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n} from '@angular/core';\nimport { GLYPH_VIEW_BOX, GLYPHS } from '@slotted/core/glyph';\nimport type { GlyphDrawing, GlyphName } from '@slotted/core/glyph';\n\nlet sequence = 0;\n\n/**\n * Glyph is the library's own artwork, drawn as a real `<svg>`: the Lucide\n * geometry `@slotted/core/glyph` holds, stroked or filled with `currentColor`.\n * It goes inside a `slIcon` box, which owns the size, the colour, the\n * alignment and the name; the glyph owns only the drawing. Every family draws\n * its own icons — a close button's cross, a pager's chevrons — with this\n * element, and never with a pseudo-element or a mask of its own.\n *\n * `solid` draws a status mark the way a tone's badge reads: the glyph's first\n * shape filled, and the symbol inside it cut out of the fill by an SVG\n * `<mask>`, so whatever lies behind shows through the symbol on any ground.\n *\n * The children carry the `svg:` namespace because the template is parsed apart\n * from its host: an unprefixed `<path>` would be created as an HTML element.\n */\n@Component({\n selector: 'svg[slGlyph]',\n standalone: true,\n template: `@if (solid()) {\n <svg:defs>\n <svg:mask\n [attr.id]=\"maskId\"\n maskUnits=\"userSpaceOnUse\"\n x=\"-2\"\n y=\"-2\"\n width=\"28\"\n height=\"28\"\n >\n <svg:rect x=\"-2\" y=\"-2\" width=\"28\" height=\"28\" fill=\"#fff\" />\n <svg:g\n fill=\"none\"\n stroke=\"#000\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n [attr.stroke-width]=\"drawing().strokeWidth\"\n >\n @for (d of symbol(); track $index) {\n <svg:path [attr.d]=\"d\" />\n }\n </svg:g>\n </svg:mask>\n </svg:defs>\n }\n <svg:g [attr.transform]=\"transform()\">\n @if (solid()) {\n <svg:path\n [attr.d]=\"drawing().paths[0]\"\n fill=\"currentColor\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n [attr.stroke-width]=\"drawing().strokeWidth\"\n [attr.mask]=\"'url(#' + maskId + ')'\"\n />\n } @else {\n @for (d of drawing().paths; track $index) {\n <svg:path [attr.d]=\"d\" />\n }\n }\n </svg:g>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'aria-hidden': 'true',\n focusable: 'false',\n 'data-part': 'glyph',\n '[attr.data-glyph]': 'name()',\n '[attr.viewBox]': 'viewBox',\n '[attr.data-solid]': \"solid() ? '' : null\",\n '[attr.fill]': \"solid() ? null : stroked() ? 'none' : 'currentColor'\",\n '[attr.stroke]': \"!solid() && stroked() ? 'currentColor' : null\",\n '[attr.stroke-width]': '!solid() && stroked() ? drawing().strokeWidth : null',\n '[attr.stroke-linecap]': \"!solid() && stroked() ? 'round' : null\",\n '[attr.stroke-linejoin]': \"!solid() && stroked() ? 'round' : null\",\n },\n})\nexport class SlGlyph {\n /** One of the library's own icons: its glyph token without `--slotted-icon-`. */\n readonly name = input.required<GlyphName>();\n /**\n * The first shape filled and the symbol cut out of it — a tone's status\n * mark. For glyphs whose first shape encloses the rest (`circle-*`,\n * `triangle-alert`).\n */\n readonly solid = input(false, { transform: booleanAttribute });\n\n protected readonly maskId = `sl-glyph-${String((sequence += 1))}`;\n\n protected readonly viewBox = GLYPH_VIEW_BOX;\n protected readonly drawing = computed<GlyphDrawing>(() => GLYPHS[this.name()]);\n protected readonly symbol = computed(() => this.drawing().paths.slice(1));\n protected readonly stroked = computed(() => this.drawing().paint === 'stroke');\n protected readonly transform = computed(() => {\n const [dx, dy] = this.drawing().offset;\n return dx === 0 && dy === 0 ? null : `translate(${dx} ${dy})`;\n });\n}\n","/**\n * Three steps read the control icon scale, which the theme restates per\n * density. `text` follows the type the icon sits in, because a control-sized\n * glyph inside a display heading is not an icon.\n */\nexport type IconSize = 'text' | 'sm' | 'md' | 'lg';\n\nexport type IconTone =\n 'inherit' | 'default' | 'muted' | 'accent' | 'success' | 'warning' | 'danger' | 'inverse';\n\n/**\n * `inherit` is the absence of a colour rather than a colour of its own, so it\n * removes the attribute and lets the surface decide.\n */\nexport function toneAttribute(tone: IconTone | undefined): string | null {\n return tone === undefined || tone === 'inherit' ? null : tone;\n}\n","import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n HostAttributeToken,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { toneAttribute } from './icon.types';\nimport type { IconSize, IconTone } from './icon.types';\n\n/**\n * Icon is the box a glyph is drawn in, not the glyph. The library ships no\n * catalogue: the artwork is the consumer's — an `ng-icon`, an inline `svg`,\n * anything that renders one — and this family owns the size it is drawn at,\n * the colour it inherits, where it sits against a line of text, and whether it\n * mirrors where reading runs the other way.\n *\n * The selector is the bare attribute, so the consumer writes the element. It\n * is a component rather than a directive only because a directive carries no\n * `styleUrl`, and that also means it cannot sit on `<ng-icon>` itself: Angular\n * refuses two components on one element, so the box is always written.\n */\n@Component({\n selector: '[slIcon]',\n standalone: true,\n exportAs: 'slIcon',\n template: '<ng-content></ng-content>',\n styleUrl: '../../../styles/src/icon/icon.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n 'data-ui': 'icon',\n 'data-part': 'root',\n '[attr.data-size]': 'size() ?? null',\n '[attr.data-tone]': 'toneAttribute()',\n '[attr.data-directional]': 'directional() ? \"\" : null',\n '[attr.role]': 'role()',\n '[attr.aria-label]': 'ariaLabel()',\n '[attr.aria-hidden]': 'named() ? null : \"true\"',\n },\n})\nexport class SlIcon {\n readonly directional = input(false, { transform: booleanAttribute });\n readonly label = input<string>();\n readonly size = input<IconSize>();\n readonly tone = input<IconTone>();\n\n /**\n * A name the consumer wrote on the element counts as much as the input, and\n * has to be read rather than assumed absent: a host binding that wrote\n * `null` would delete the consumer's own `aria-label` and hide the icon it\n * named, which is a silent defect in the likeliest mistake. `aria-labelledby`\n * is read and never written, so the attribute the consumer put there stays\n * exactly as written.\n */\n private readonly writtenLabel = inject(new HostAttributeToken('aria-label'), { optional: true });\n private readonly writtenLabelledBy = inject(new HostAttributeToken('aria-labelledby'), {\n optional: true,\n });\n private readonly writtenRole = inject(new HostAttributeToken('role'), { optional: true });\n\n protected readonly ariaLabel = computed(() => this.label() ?? this.writtenLabel);\n\n /**\n * The icon is decorative when it has no name and meaningful when it has one,\n * which is why there is no `decorative` input: named and hidden cannot both\n * be true.\n */\n protected readonly named = computed(\n () => this.ariaLabel() !== null || this.writtenLabelledBy !== null,\n );\n\n /**\n * `role=\"img\"` requires a name, so it appears only once there is one, and a\n * role the consumer chose is left alone.\n */\n protected readonly role = computed(() =>\n this.writtenRole === null ? (this.named() ? 'img' : null) : this.writtenRole,\n );\n\n protected readonly toneAttribute = computed(() => toneAttribute(this.tone()));\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAUA,IAAI,QAAQ,GAAG,CAAC;AAEhB;;;;;;;;;;;;;;AAcG;MA6DU,OAAO,CAAA;;IAET,IAAI,GAAG,KAAK,CAAC,QAAQ;6EAAa;AAC3C;;;;AAIG;IACM,KAAK,GAAG,KAAK,CAAC,KAAK,6EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IAE3C,MAAM,GAAG,CAAA,SAAA,EAAY,MAAM,EAAE,QAAQ,IAAI,CAAC,EAAE,CAAA,CAAE;IAE9C,OAAO,GAAG,cAAc;AACxB,IAAA,OAAO,GAAG,QAAQ,CAAe,MAAM,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;gFAAC;AAC3D,IAAA,MAAM,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC,KAAK,CA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UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAM,+4BAfP,2BAA2B,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,42CAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAe1B,MAAM,EAAA,UAAA,EAAA,CAAA;kBAnBlB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,UAAU,EAAA,UAAA,EACR,IAAI,EAAA,QAAA,EACN,QAAQ,YACR,2BAA2B,EAAA,eAAA,EAEpB,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,IAAI,EAAA,IAAA,EAC/B;AACJ,wBAAA,SAAS,EAAE,MAAM;AACjB,wBAAA,WAAW,EAAE,MAAM;AACnB,wBAAA,kBAAkB,EAAE,gBAAgB;AACpC,wBAAA,kBAAkB,EAAE,iBAAiB;AACrC,wBAAA,yBAAyB,EAAE,2BAA2B;AACtD,wBAAA,aAAa,EAAE,QAAQ;AACvB,wBAAA,mBAAmB,EAAE,aAAa;AAClC,wBAAA,oBAAoB,EAAE,yBAAyB;AAChD,qBAAA,EAAA,MAAA,EAAA,CAAA,42CAAA,CAAA,EAAA;;;AC3CH;;AAEG;;"}
|
|
1
|
+
{"version":3,"file":"slotted-angular-icon.mjs","sources":["../../icon/src/glyph.ts","../../icon/src/icon.types.ts","../../icon/src/icon.ts","../../icon/src/slotted-angular-icon.ts"],"sourcesContent":["import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n} from '@angular/core';\nimport {\n GLYPH_VIEW_BOX,\n GLYPHS,\n isStatusGlyph,\n STATUS_GLYPH_GRIDS,\n STATUS_GLYPHS,\n} from '@slotted/core/glyph';\nimport type { GlyphDrawing, GlyphName, StatusGlyphGrid } from '@slotted/core/glyph';\n\nlet sequence = 0;\n\n/**\n * Glyph is the library's own artwork, drawn as a real `<svg>`: the Lucide\n * geometry `@slotted/core/glyph` holds, stroked or filled with `currentColor`.\n * It goes inside a `slIcon` box, which owns the size, the color, the\n * alignment and the name; the glyph owns only the drawing. Every family draws\n * its own icons — a close button's cross, a pager's chevrons — with this\n * element, and never with a pseudo-element or a mask of its own.\n *\n * `solid` draws a status mark the way a tone's badge reads: the glyph's first\n * shape filled, and the symbol inside it cut out of the fill by an SVG\n * `<mask>`, so whatever lies behind shows through the symbol on any ground.\n *\n * A status mark (`status-*`) is always solid, and is drawn once per grid it\n * was drawn on; `icon.css` shows the grid the icon box is sized for.\n *\n * The children carry the `svg:` namespace because the template is parsed apart\n * from its host: an unprefixed `<path>` would be created as an HTML element.\n */\n@Component({\n selector: 'svg[slGlyph]',\n standalone: true,\n template: `@if (grids(); as grids) {\n @for (grid of grids; track grid.size) {\n <svg:svg [attr.data-grid]=\"grid.size\" [attr.viewBox]=\"'0 0 ' + grid.size + ' ' + grid.size\">\n <svg:defs>\n <svg:mask\n [attr.id]=\"maskId + '-' + grid.size\"\n maskUnits=\"userSpaceOnUse\"\n x=\"0\"\n y=\"0\"\n [attr.width]=\"grid.size\"\n [attr.height]=\"grid.size\"\n >\n <svg:rect fill=\"#fff\" [attr.width]=\"grid.size\" [attr.height]=\"grid.size\" />\n @for (d of grid.drawing.holes; track $index) {\n <svg:path [attr.d]=\"d\" fill=\"#000\" />\n }\n @for (d of grid.drawing.strokes; track $index) {\n <svg:path\n [attr.d]=\"d\"\n fill=\"none\"\n stroke=\"#000\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n />\n }\n </svg:mask>\n </svg:defs>\n <svg:path\n [attr.d]=\"grid.drawing.shape\"\n fill=\"currentColor\"\n [attr.mask]=\"'url(#' + maskId + '-' + grid.size + ')'\"\n [attr.stroke]=\"grid.drawing.shapeStroke === 0 ? null : 'currentColor'\"\n [attr.stroke-linejoin]=\"grid.drawing.shapeStroke === 0 ? null : 'round'\"\n [attr.stroke-width]=\"grid.drawing.shapeStroke === 0 ? null : grid.drawing.shapeStroke\"\n />\n </svg:svg>\n }\n } @else {\n @if (solid()) {\n <svg:defs>\n <svg:mask\n [attr.id]=\"maskId\"\n maskUnits=\"userSpaceOnUse\"\n x=\"-2\"\n y=\"-2\"\n width=\"28\"\n height=\"28\"\n >\n <svg:rect x=\"-2\" y=\"-2\" width=\"28\" height=\"28\" fill=\"#fff\" />\n <svg:g\n fill=\"none\"\n stroke=\"#000\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n [attr.stroke-width]=\"drawing().strokeWidth\"\n >\n @for (d of symbol(); track $index) {\n <svg:path [attr.d]=\"d\" />\n }\n </svg:g>\n </svg:mask>\n </svg:defs>\n }\n <svg:g [attr.transform]=\"transform()\">\n @if (solid()) {\n <svg:path\n [attr.d]=\"drawing().paths[0]\"\n fill=\"currentColor\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n [attr.stroke-width]=\"drawing().strokeWidth\"\n [attr.mask]=\"'url(#' + maskId + ')'\"\n />\n } @else {\n @for (d of drawing().paths; track $index) {\n <svg:path [attr.d]=\"d\" />\n }\n }\n </svg:g>\n }`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'aria-hidden': 'true',\n focusable: 'false',\n 'data-part': 'glyph',\n 'data-part-glyph': '',\n '[attr.data-glyph]': 'name()',\n '[attr.viewBox]': \"grids() ? '0 0 16 16' : viewBox\",\n '[attr.data-solid]': \"painted() ? null : ''\",\n '[attr.fill]': \"painted() ? (stroked() ? 'none' : 'currentColor') : null\",\n '[attr.stroke]': \"painted() && stroked() ? 'currentColor' : null\",\n '[attr.stroke-width]': 'painted() && stroked() ? drawing().strokeWidth : null',\n '[attr.stroke-linecap]': \"painted() && stroked() ? 'round' : null\",\n '[attr.stroke-linejoin]': \"painted() && stroked() ? 'round' : null\",\n },\n})\nexport class SlGlyph {\n /** One of the library's own icons: its glyph token without `--slotted-icon-`. */\n readonly name = input.required<GlyphName>();\n /**\n * The first shape filled and the symbol cut out of it — a tone's status\n * mark. For glyphs whose first shape encloses the rest (`circle-*`,\n * `triangle-alert`).\n */\n readonly solid = input(false, { transform: booleanAttribute });\n\n protected readonly maskId = `sl-glyph-${String((sequence += 1))}`;\n\n protected readonly viewBox = GLYPH_VIEW_BOX;\n /** A status mark's drawing on each of its grids; `null` for a Lucide glyph. */\n protected readonly grids = computed<readonly { size: number; drawing: StatusGlyphGrid }[] | null>(\n () => {\n const name = this.name();\n return isStatusGlyph(name)\n ? STATUS_GLYPH_GRIDS.map((size) => ({ size, drawing: STATUS_GLYPHS[name][size] }))\n : null;\n },\n );\n /** Painted by the root's own fill or stroke rather than by a solid shape. */\n protected readonly painted = computed(() => !this.solid() && this.grids() === null);\n /* A status mark has no Lucide drawing, and reads none: `dot` only keeps the signal typed. */\n protected readonly drawing = computed<GlyphDrawing>(() => {\n const name = this.name();\n return isStatusGlyph(name) ? GLYPHS.dot : GLYPHS[name];\n });\n protected readonly symbol = computed(() => this.drawing().paths.slice(1));\n protected readonly stroked = computed(() => this.drawing().paint === 'stroke');\n protected readonly transform = computed(() => {\n const [dx, dy] = this.drawing().offset;\n return dx === 0 && dy === 0 ? null : `translate(${dx} ${dy})`;\n });\n}\n","/**\n * Three steps read the control icon scale, which the theme restates per\n * density. `text` follows the type the icon sits in, because a control-sized\n * glyph inside a display heading is not an icon.\n */\nexport type IconSize = 'text' | 'sm' | 'md' | 'lg';\n\nexport type IconTone =\n | 'inherit'\n | 'default'\n | 'muted'\n | 'accent'\n | 'info'\n | 'success'\n | 'warning'\n | 'danger'\n | 'inverse';\n\n/**\n * `inherit` is the absence of a color rather than a color of its own, so it\n * removes the attribute and lets the surface decide.\n */\nexport function toneAttribute(tone: IconTone | undefined): string | null {\n return tone === undefined || tone === 'inherit' ? null : tone;\n}\n","import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n HostAttributeToken,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { toneAttribute } from './icon.types';\nimport type { IconSize, IconTone } from './icon.types';\n\n/**\n * Icon is the box a glyph is drawn in, not the glyph. The library ships no\n * catalogue: the artwork is the consumer's — an `ng-icon`, an inline `svg`,\n * anything that renders one — and this family owns the size it is drawn at,\n * the color it inherits, where it sits against a line of text, and whether it\n * mirrors where reading runs the other way.\n *\n * The selector is the bare attribute, so the consumer writes the element. It\n * is a component rather than a directive only because a directive carries no\n * `styleUrl`, and that also means it cannot sit on `<ng-icon>` itself: Angular\n * refuses two components on one element, so the box is always written.\n */\n@Component({\n selector: '[slIcon]',\n standalone: true,\n exportAs: 'slIcon',\n template: '<ng-content></ng-content>',\n styleUrl: '../../../styles/src/icon/icon.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n 'data-ui': 'icon',\n 'data-ui-icon': '',\n 'data-part': 'root',\n 'data-part-root': '',\n '[attr.data-size]': 'size() ?? null',\n '[attr.data-tone]': 'toneAttribute()',\n '[attr.data-directional]': 'directional() ? \"\" : null',\n '[attr.role]': 'role()',\n '[attr.aria-label]': 'ariaLabel()',\n '[attr.aria-hidden]': 'named() ? null : \"true\"',\n },\n})\nexport class SlIcon {\n readonly directional = input(false, { transform: booleanAttribute });\n readonly label = input<string>();\n readonly size = input<IconSize>();\n readonly tone = input<IconTone>();\n\n /**\n * A name the consumer wrote on the element counts as much as the input, and\n * has to be read rather than assumed absent: a host binding that wrote\n * `null` would delete the consumer's own `aria-label` and hide the icon it\n * named, which is a silent defect in the likeliest mistake. `aria-labelledby`\n * is read and never written, so the attribute the consumer put there stays\n * exactly as written.\n */\n private readonly writtenLabel = inject(new HostAttributeToken('aria-label'), { optional: true });\n private readonly writtenLabelledBy = inject(new HostAttributeToken('aria-labelledby'), {\n optional: true,\n });\n private readonly writtenRole = inject(new HostAttributeToken('role'), { optional: true });\n\n protected readonly ariaLabel = computed(() => this.label() ?? this.writtenLabel);\n\n /**\n * The icon is decorative when it has no name and meaningful when it has one,\n * which is why there is no `decorative` input: named and hidden cannot both\n * be true.\n */\n protected readonly named = computed(\n () => this.ariaLabel() !== null || this.writtenLabelledBy !== null,\n );\n\n /**\n * `role=\"img\"` requires a name, so it appears only once there is one, and a\n * role the consumer chose is left alone.\n */\n protected readonly role = computed(() =>\n this.writtenRole === null ? (this.named() ? 'img' : null) : this.writtenRole,\n );\n\n protected readonly toneAttribute = computed(() => toneAttribute(this.tone()));\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAgBA,IAAI,QAAQ,GAAG,CAAC;AAEhB;;;;;;;;;;;;;;;;;AAiBG;MAsGU,OAAO,CAAA;;IAET,IAAI,GAAG,KAAK,CAAC,QAAQ;6EAAa;AAC3C;;;;AAIG;IACM,KAAK,GAAG,KAAK,CAAC,KAAK,6EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IAE3C,MAAM,GAAG,CAAA,SAAA,EAAY,MAAM,EAAE,QAAQ,IAAI,CAAC,EAAE,CAAA,CAAE;IAE9C,OAAO,GAAG,cAAc;;AAExB,IAAA,KAAK,GAAG,QAAQ,CACjC,MAAK;AACH,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE;QACxB,OAAO,aAAa,CAAC,IAAI;cACrB,kBAAkB,CAAC,GAAG,CAAC,CAAC,IAAI,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;cAC/E,IAAI;IACV,CAAC;8EACF;;AAEkB,IAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,IAAI,CAAC,KAAK,EAAE,KAAK,IAAI;gFAAC;;AAEhE,IAAA,OAAO,GAAG,QAAQ,CAAe,MAAK;AACvD,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC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