@slotted/angular 0.0.0-stage → 0.1.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +51 -2
- package/docs/AGENTS.snippet.md +10 -0
- package/docs/accordion.json +345 -0
- package/docs/accordion.md +207 -0
- package/docs/action-bar.json +421 -0
- package/docs/action-bar.md +364 -0
- package/docs/action-sheet.json +210 -0
- package/docs/action-sheet.md +19 -0
- package/docs/alert.json +407 -0
- package/docs/alert.md +239 -0
- package/docs/app-shell.examples.md +349 -0
- package/docs/app-shell.json +835 -0
- package/docs/app-shell.md +214 -0
- package/docs/aspect-ratio.json +159 -0
- package/docs/aspect-ratio.md +134 -0
- package/docs/attachment.json +486 -0
- package/docs/attachment.md +253 -0
- package/docs/avatar-group.json +208 -0
- package/docs/avatar-group.md +130 -0
- package/docs/avatar.json +342 -0
- package/docs/avatar.md +142 -0
- package/docs/badge.json +334 -0
- package/docs/badge.md +138 -0
- package/docs/breadcrumb.json +368 -0
- package/docs/breadcrumb.md +237 -0
- package/docs/button-group.json +158 -0
- package/docs/button-group.md +72 -0
- package/docs/button.examples.md +621 -0
- package/docs/button.json +977 -0
- package/docs/button.md +200 -0
- package/docs/calendar.json +592 -0
- package/docs/calendar.md +242 -0
- package/docs/card.json +283 -0
- package/docs/card.md +130 -0
- package/docs/carousel.json +560 -0
- package/docs/carousel.md +357 -0
- package/docs/cascader.json +933 -0
- package/docs/cascader.md +379 -0
- package/docs/chart.examples.md +582 -0
- package/docs/chart.json +1359 -0
- package/docs/chart.md +187 -0
- package/docs/checkbox-group.examples.md +612 -0
- package/docs/checkbox-group.json +395 -0
- package/docs/checkbox-group.md +106 -0
- package/docs/checkbox.examples.md +546 -0
- package/docs/checkbox.json +506 -0
- package/docs/checkbox.md +104 -0
- package/docs/code-block.json +616 -0
- package/docs/code-block.md +303 -0
- package/docs/collapsible.json +456 -0
- package/docs/collapsible.md +261 -0
- package/docs/color-picker.json +523 -0
- package/docs/color-picker.md +201 -0
- package/docs/column-manager.json +486 -0
- package/docs/column-manager.md +277 -0
- package/docs/combobox.examples.md +1732 -0
- package/docs/combobox.json +1250 -0
- package/docs/combobox.md +209 -0
- package/docs/command-palette.json +800 -0
- package/docs/command-palette.md +419 -0
- package/docs/container.json +156 -0
- package/docs/container.md +92 -0
- package/docs/context-menu.json +231 -0
- package/docs/context-menu.md +176 -0
- package/docs/currency-field.examples.md +321 -0
- package/docs/currency-field.json +649 -0
- package/docs/currency-field.md +128 -0
- package/docs/dashboard-grid.json +680 -0
- package/docs/dashboard-grid.md +265 -0
- package/docs/data-grid.examples.md +3064 -0
- package/docs/data-grid.json +1577 -0
- package/docs/data-grid.md +237 -0
- package/docs/data-grid.props.md +81 -0
- package/docs/data-list.json +685 -0
- package/docs/data-list.md +327 -0
- package/docs/date-field.json +490 -0
- package/docs/date-field.md +235 -0
- package/docs/date-picker.examples.md +1226 -0
- package/docs/date-picker.json +696 -0
- package/docs/date-picker.md +121 -0
- package/docs/date-range-picker.examples.md +1300 -0
- package/docs/date-range-picker.json +903 -0
- package/docs/date-range-picker.md +142 -0
- package/docs/datetime-field.json +665 -0
- package/docs/datetime-field.md +337 -0
- package/docs/datetime-picker.examples.md +1269 -0
- package/docs/datetime-picker.json +928 -0
- package/docs/datetime-picker.md +150 -0
- package/docs/datetime-range-picker.examples.md +225 -0
- package/docs/datetime-range-picker.json +1015 -0
- package/docs/datetime-range-picker.md +162 -0
- package/docs/description-list.json +471 -0
- package/docs/description-list.md +268 -0
- package/docs/detail-panel.json +530 -0
- package/docs/detail-panel.md +361 -0
- package/docs/dialog.examples.md +2467 -0
- package/docs/dialog.json +1141 -0
- package/docs/dialog.md +217 -0
- package/docs/dialog.props.md +63 -0
- package/docs/divider.json +148 -0
- package/docs/divider.md +83 -0
- package/docs/drawer.examples.md +1929 -0
- package/docs/drawer.json +753 -0
- package/docs/drawer.md +199 -0
- package/docs/entity-picker.json +946 -0
- package/docs/entity-picker.md +365 -0
- package/docs/event-calendar.examples.md +308 -0
- package/docs/event-calendar.json +1202 -0
- package/docs/event-calendar.md +201 -0
- package/docs/field-group.json +333 -0
- package/docs/field-group.md +181 -0
- package/docs/field.examples.md +676 -0
- package/docs/field.json +528 -0
- package/docs/field.md +127 -0
- package/docs/filter-bar.json +817 -0
- package/docs/filter-bar.md +380 -0
- package/docs/form.json +378 -0
- package/docs/form.md +235 -0
- package/docs/fullscreen.json +395 -0
- package/docs/fullscreen.md +225 -0
- package/docs/grid.json +176 -0
- package/docs/grid.md +74 -0
- package/docs/highlight.json +279 -0
- package/docs/highlight.md +210 -0
- package/docs/hover-card.json +254 -0
- package/docs/hover-card.md +213 -0
- package/docs/icon.json +173 -0
- package/docs/icon.md +101 -0
- package/docs/image.json +476 -0
- package/docs/image.md +254 -0
- package/docs/import-export-center.json +836 -0
- package/docs/import-export-center.md +345 -0
- package/docs/index.md +141 -0
- package/docs/inline-message.json +312 -0
- package/docs/inline-message.md +191 -0
- package/docs/inline.json +149 -0
- package/docs/inline.md +72 -0
- package/docs/kbd.json +350 -0
- package/docs/kbd.md +210 -0
- package/docs/link.json +264 -0
- package/docs/link.md +167 -0
- package/docs/list-item.json +463 -0
- package/docs/list-item.md +236 -0
- package/docs/list.json +321 -0
- package/docs/list.md +185 -0
- package/docs/listbox.json +807 -0
- package/docs/listbox.md +413 -0
- package/docs/loading-overlay.json +440 -0
- package/docs/loading-overlay.md +248 -0
- package/docs/markdown.json +461 -0
- package/docs/markdown.md +266 -0
- package/docs/menu.examples.md +1651 -0
- package/docs/menu.json +922 -0
- package/docs/menu.md +155 -0
- package/docs/menubar.json +292 -0
- package/docs/menubar.md +173 -0
- package/docs/message-scroller.json +401 -0
- package/docs/message-scroller.md +212 -0
- package/docs/message.json +862 -0
- package/docs/message.md +473 -0
- package/docs/multi-select.examples.md +1922 -0
- package/docs/multi-select.json +1314 -0
- package/docs/multi-select.md +213 -0
- package/docs/navigation-menu.json +529 -0
- package/docs/navigation-menu.md +329 -0
- package/docs/notification-center.json +664 -0
- package/docs/notification-center.md +372 -0
- package/docs/number-field.examples.md +1078 -0
- package/docs/number-field.json +668 -0
- package/docs/number-field.md +137 -0
- package/docs/otp-input.json +479 -0
- package/docs/otp-input.md +291 -0
- package/docs/page-header.json +574 -0
- package/docs/page-header.md +338 -0
- package/docs/page.json +332 -0
- package/docs/page.md +184 -0
- package/docs/pagination.json +434 -0
- package/docs/pagination.md +238 -0
- package/docs/popover.examples.md +1235 -0
- package/docs/popover.json +656 -0
- package/docs/popover.md +199 -0
- package/docs/progress-indicator.json +501 -0
- package/docs/progress-indicator.md +329 -0
- package/docs/prompt-composer.json +498 -0
- package/docs/prompt-composer.md +278 -0
- package/docs/prose.json +357 -0
- package/docs/prose.md +226 -0
- package/docs/radio-group.examples.md +626 -0
- package/docs/radio-group.json +541 -0
- package/docs/radio-group.md +112 -0
- package/docs/rating.json +1053 -0
- package/docs/rating.md +435 -0
- package/docs/result-state.json +376 -0
- package/docs/result-state.md +286 -0
- package/docs/saved-views.json +384 -0
- package/docs/saved-views.md +242 -0
- package/docs/scroll-area.json +120 -0
- package/docs/scroll-area.md +8 -0
- package/docs/section.json +344 -0
- package/docs/section.md +208 -0
- package/docs/segmented-control.json +429 -0
- package/docs/segmented-control.md +240 -0
- package/docs/select.examples.md +1214 -0
- package/docs/select.json +1147 -0
- package/docs/select.md +199 -0
- package/docs/side-navigation.json +632 -0
- package/docs/side-navigation.md +430 -0
- package/docs/skeleton.json +358 -0
- package/docs/skeleton.md +223 -0
- package/docs/slider.json +522 -0
- package/docs/slider.md +261 -0
- package/docs/sparkline.json +426 -0
- package/docs/sparkline.md +206 -0
- package/docs/split-button.json +361 -0
- package/docs/split-button.md +275 -0
- package/docs/splitter.json +142 -0
- package/docs/splitter.md +14 -0
- package/docs/stack.json +135 -0
- package/docs/stack.md +74 -0
- package/docs/stat-card.json +529 -0
- package/docs/stat-card.md +270 -0
- package/docs/status-indicator.json +314 -0
- package/docs/status-indicator.md +197 -0
- package/docs/stepper.json +451 -0
- package/docs/stepper.md +250 -0
- package/docs/switch.json +451 -0
- package/docs/switch.md +508 -0
- package/docs/table-of-contents.json +553 -0
- package/docs/table-of-contents.md +289 -0
- package/docs/table.examples.md +1981 -0
- package/docs/table.json +1059 -0
- package/docs/table.md +290 -0
- package/docs/tabs.examples.md +1370 -0
- package/docs/tabs.json +661 -0
- package/docs/tabs.md +211 -0
- package/docs/tag.json +813 -0
- package/docs/tag.md +241 -0
- package/docs/tags-input.json +771 -0
- package/docs/tags-input.md +361 -0
- package/docs/text-field.examples.md +821 -0
- package/docs/text-field.json +604 -0
- package/docs/text-field.md +125 -0
- package/docs/textarea.examples.md +612 -0
- package/docs/textarea.json +440 -0
- package/docs/textarea.md +98 -0
- package/docs/time-field.json +584 -0
- package/docs/time-field.md +291 -0
- package/docs/time-picker.json +679 -0
- package/docs/time-picker.md +315 -0
- package/docs/time-range-picker.examples.md +191 -0
- package/docs/time-range-picker.json +924 -0
- package/docs/time-range-picker.md +152 -0
- package/docs/timeline.json +839 -0
- package/docs/timeline.md +401 -0
- package/docs/toast.json +642 -0
- package/docs/toast.md +311 -0
- package/docs/toggle-group.json +417 -0
- package/docs/toggle-group.md +255 -0
- package/docs/toggle.json +326 -0
- package/docs/toggle.md +222 -0
- package/docs/toolbar.json +380 -0
- package/docs/toolbar.md +240 -0
- package/docs/tooltip.examples.md +664 -0
- package/docs/tooltip.json +604 -0
- package/docs/tooltip.md +146 -0
- package/docs/top-navigation.examples.md +287 -0
- package/docs/top-navigation.json +648 -0
- package/docs/top-navigation.md +138 -0
- package/docs/tour.json +759 -0
- package/docs/tour.md +337 -0
- package/docs/transfer.json +746 -0
- package/docs/transfer.md +273 -0
- package/docs/tree.json +918 -0
- package/docs/tree.md +397 -0
- package/docs/typography.json +317 -0
- package/docs/typography.md +107 -0
- package/docs/upload.examples.md +358 -0
- package/docs/upload.json +1103 -0
- package/docs/upload.md +166 -0
- package/docs/visually-hidden.json +71 -0
- package/docs/visually-hidden.md +42 -0
- package/docs/wizard.json +724 -0
- package/docs/wizard.md +295 -0
- package/fesm2022/slotted-angular-accordion.mjs +247 -0
- package/fesm2022/slotted-angular-accordion.mjs.map +1 -0
- package/fesm2022/slotted-angular-action-bar.mjs +639 -0
- package/fesm2022/slotted-angular-action-bar.mjs.map +1 -0
- package/fesm2022/slotted-angular-action-sheet.mjs +749 -0
- package/fesm2022/slotted-angular-action-sheet.mjs.map +1 -0
- package/fesm2022/slotted-angular-alert.mjs +427 -0
- package/fesm2022/slotted-angular-alert.mjs.map +1 -0
- package/fesm2022/slotted-angular-app-shell.mjs +1334 -0
- package/fesm2022/slotted-angular-app-shell.mjs.map +1 -0
- package/fesm2022/slotted-angular-aspect-ratio.mjs +63 -0
- package/fesm2022/slotted-angular-aspect-ratio.mjs.map +1 -0
- package/fesm2022/slotted-angular-attachment.mjs +595 -0
- package/fesm2022/slotted-angular-attachment.mjs.map +1 -0
- package/fesm2022/slotted-angular-avatar-group.mjs +230 -0
- package/fesm2022/slotted-angular-avatar-group.mjs.map +1 -0
- package/fesm2022/slotted-angular-avatar.mjs +330 -0
- package/fesm2022/slotted-angular-avatar.mjs.map +1 -0
- package/fesm2022/slotted-angular-badge.mjs +255 -0
- package/fesm2022/slotted-angular-badge.mjs.map +1 -0
- package/fesm2022/slotted-angular-breadcrumb.mjs +544 -0
- package/fesm2022/slotted-angular-breadcrumb.mjs.map +1 -0
- package/fesm2022/slotted-angular-button-group.mjs +146 -0
- package/fesm2022/slotted-angular-button-group.mjs.map +1 -0
- package/fesm2022/slotted-angular-button.mjs +692 -0
- package/fesm2022/slotted-angular-button.mjs.map +1 -0
- package/fesm2022/slotted-angular-calendar.mjs +916 -0
- package/fesm2022/slotted-angular-calendar.mjs.map +1 -0
- package/fesm2022/slotted-angular-card.mjs +225 -0
- package/fesm2022/slotted-angular-card.mjs.map +1 -0
- package/fesm2022/slotted-angular-carousel.mjs +840 -0
- package/fesm2022/slotted-angular-carousel.mjs.map +1 -0
- package/fesm2022/slotted-angular-cascader.mjs +1839 -0
- package/fesm2022/slotted-angular-cascader.mjs.map +1 -0
- package/fesm2022/slotted-angular-chart.mjs +974 -0
- package/fesm2022/slotted-angular-chart.mjs.map +1 -0
- package/fesm2022/slotted-angular-checkbox-group.mjs +283 -0
- package/fesm2022/slotted-angular-checkbox-group.mjs.map +1 -0
- package/fesm2022/slotted-angular-checkbox.mjs +468 -0
- package/fesm2022/slotted-angular-checkbox.mjs.map +1 -0
- package/fesm2022/slotted-angular-code-block.mjs +476 -0
- package/fesm2022/slotted-angular-code-block.mjs.map +1 -0
- package/fesm2022/slotted-angular-collapsible.mjs +479 -0
- package/fesm2022/slotted-angular-collapsible.mjs.map +1 -0
- package/fesm2022/slotted-angular-color-picker.mjs +910 -0
- package/fesm2022/slotted-angular-color-picker.mjs.map +1 -0
- package/fesm2022/slotted-angular-column-manager.mjs +1037 -0
- package/fesm2022/slotted-angular-column-manager.mjs.map +1 -0
- package/fesm2022/slotted-angular-combobox.mjs +1480 -0
- package/fesm2022/slotted-angular-combobox.mjs.map +1 -0
- package/fesm2022/slotted-angular-command-palette.mjs +1283 -0
- package/fesm2022/slotted-angular-command-palette.mjs.map +1 -0
- package/fesm2022/slotted-angular-container.mjs +105 -0
- package/fesm2022/slotted-angular-container.mjs.map +1 -0
- package/fesm2022/slotted-angular-context-menu.mjs +221 -0
- package/fesm2022/slotted-angular-context-menu.mjs.map +1 -0
- package/fesm2022/slotted-angular-currency-field.mjs +1131 -0
- package/fesm2022/slotted-angular-currency-field.mjs.map +1 -0
- package/fesm2022/slotted-angular-dashboard-grid.mjs +1928 -0
- package/fesm2022/slotted-angular-dashboard-grid.mjs.map +1 -0
- package/fesm2022/slotted-angular-data-grid.mjs +6697 -0
- package/fesm2022/slotted-angular-data-grid.mjs.map +1 -0
- package/fesm2022/slotted-angular-data-list.mjs +1418 -0
- package/fesm2022/slotted-angular-data-list.mjs.map +1 -0
- package/fesm2022/slotted-angular-date-field.mjs +772 -0
- package/fesm2022/slotted-angular-date-field.mjs.map +1 -0
- package/fesm2022/slotted-angular-date-picker.mjs +690 -0
- package/fesm2022/slotted-angular-date-picker.mjs.map +1 -0
- package/fesm2022/slotted-angular-date-range-picker.mjs +1150 -0
- package/fesm2022/slotted-angular-date-range-picker.mjs.map +1 -0
- package/fesm2022/slotted-angular-datetime-field.mjs +1058 -0
- package/fesm2022/slotted-angular-datetime-field.mjs.map +1 -0
- package/fesm2022/slotted-angular-datetime-picker.mjs +1362 -0
- package/fesm2022/slotted-angular-datetime-picker.mjs.map +1 -0
- package/fesm2022/slotted-angular-datetime-range-picker.mjs +1872 -0
- package/fesm2022/slotted-angular-datetime-range-picker.mjs.map +1 -0
- package/fesm2022/slotted-angular-description-list.mjs +545 -0
- package/fesm2022/slotted-angular-description-list.mjs.map +1 -0
- package/fesm2022/slotted-angular-detail-panel.mjs +754 -0
- package/fesm2022/slotted-angular-detail-panel.mjs.map +1 -0
- package/fesm2022/slotted-angular-dialog.mjs +980 -0
- package/fesm2022/slotted-angular-dialog.mjs.map +1 -0
- package/fesm2022/slotted-angular-divider.mjs +76 -0
- package/fesm2022/slotted-angular-divider.mjs.map +1 -0
- package/fesm2022/slotted-angular-drawer.mjs +1397 -0
- package/fesm2022/slotted-angular-drawer.mjs.map +1 -0
- package/fesm2022/slotted-angular-entity-picker.mjs +1987 -0
- package/fesm2022/slotted-angular-entity-picker.mjs.map +1 -0
- package/fesm2022/slotted-angular-event-calendar.mjs +2934 -0
- package/fesm2022/slotted-angular-event-calendar.mjs.map +1 -0
- package/fesm2022/slotted-angular-field-group.mjs +301 -0
- package/fesm2022/slotted-angular-field-group.mjs.map +1 -0
- package/fesm2022/slotted-angular-field.mjs +928 -0
- package/fesm2022/slotted-angular-field.mjs.map +1 -0
- package/fesm2022/slotted-angular-filter-bar.mjs +3107 -0
- package/fesm2022/slotted-angular-filter-bar.mjs.map +1 -0
- package/fesm2022/slotted-angular-form.mjs +592 -0
- package/fesm2022/slotted-angular-form.mjs.map +1 -0
- package/fesm2022/slotted-angular-fullscreen.mjs +314 -0
- package/fesm2022/slotted-angular-fullscreen.mjs.map +1 -0
- package/fesm2022/slotted-angular-grid.mjs +58 -0
- package/fesm2022/slotted-angular-grid.mjs.map +1 -0
- package/fesm2022/slotted-angular-highlight.mjs +123 -0
- package/fesm2022/slotted-angular-highlight.mjs.map +1 -0
- package/fesm2022/slotted-angular-hover-card.mjs +326 -0
- package/fesm2022/slotted-angular-hover-card.mjs.map +1 -0
- package/fesm2022/slotted-angular-i18n.mjs +75 -0
- package/fesm2022/slotted-angular-i18n.mjs.map +1 -0
- package/fesm2022/slotted-angular-icon.mjs +232 -0
- package/fesm2022/slotted-angular-icon.mjs.map +1 -0
- package/fesm2022/slotted-angular-image.mjs +442 -0
- package/fesm2022/slotted-angular-image.mjs.map +1 -0
- package/fesm2022/slotted-angular-import-export-center.mjs +1792 -0
- package/fesm2022/slotted-angular-import-export-center.mjs.map +1 -0
- package/fesm2022/slotted-angular-inline-message.mjs +280 -0
- package/fesm2022/slotted-angular-inline-message.mjs.map +1 -0
- package/fesm2022/slotted-angular-inline.mjs +52 -0
- package/fesm2022/slotted-angular-inline.mjs.map +1 -0
- package/fesm2022/slotted-angular-kbd.mjs +284 -0
- package/fesm2022/slotted-angular-kbd.mjs.map +1 -0
- package/fesm2022/slotted-angular-link.mjs +182 -0
- package/fesm2022/slotted-angular-link.mjs.map +1 -0
- package/fesm2022/slotted-angular-list-item.mjs +367 -0
- package/fesm2022/slotted-angular-list-item.mjs.map +1 -0
- package/fesm2022/slotted-angular-list.mjs +256 -0
- package/fesm2022/slotted-angular-list.mjs.map +1 -0
- package/fesm2022/slotted-angular-listbox.mjs +1274 -0
- package/fesm2022/slotted-angular-listbox.mjs.map +1 -0
- package/fesm2022/slotted-angular-loading-overlay.mjs +451 -0
- package/fesm2022/slotted-angular-loading-overlay.mjs.map +1 -0
- package/fesm2022/slotted-angular-markdown.mjs +914 -0
- package/fesm2022/slotted-angular-markdown.mjs.map +1 -0
- package/fesm2022/slotted-angular-menu.mjs +1211 -0
- package/fesm2022/slotted-angular-menu.mjs.map +1 -0
- package/fesm2022/slotted-angular-menubar.mjs +230 -0
- package/fesm2022/slotted-angular-menubar.mjs.map +1 -0
- package/fesm2022/slotted-angular-message-scroller.mjs +378 -0
- package/fesm2022/slotted-angular-message-scroller.mjs.map +1 -0
- package/fesm2022/slotted-angular-message.mjs +866 -0
- package/fesm2022/slotted-angular-message.mjs.map +1 -0
- package/fesm2022/slotted-angular-multi-select.mjs +1939 -0
- package/fesm2022/slotted-angular-multi-select.mjs.map +1 -0
- package/fesm2022/slotted-angular-navigation-menu.mjs +770 -0
- package/fesm2022/slotted-angular-navigation-menu.mjs.map +1 -0
- package/fesm2022/slotted-angular-notification-center.mjs +1172 -0
- package/fesm2022/slotted-angular-notification-center.mjs.map +1 -0
- package/fesm2022/slotted-angular-number-field.mjs +966 -0
- package/fesm2022/slotted-angular-number-field.mjs.map +1 -0
- package/fesm2022/slotted-angular-otp-input.mjs +629 -0
- package/fesm2022/slotted-angular-otp-input.mjs.map +1 -0
- package/fesm2022/slotted-angular-page-header.mjs +788 -0
- package/fesm2022/slotted-angular-page-header.mjs.map +1 -0
- package/fesm2022/slotted-angular-page.mjs +255 -0
- package/fesm2022/slotted-angular-page.mjs.map +1 -0
- package/fesm2022/slotted-angular-pagination.mjs +562 -0
- package/fesm2022/slotted-angular-pagination.mjs.map +1 -0
- package/fesm2022/slotted-angular-popover.mjs +799 -0
- package/fesm2022/slotted-angular-popover.mjs.map +1 -0
- package/fesm2022/slotted-angular-progress-indicator.mjs +572 -0
- package/fesm2022/slotted-angular-progress-indicator.mjs.map +1 -0
- package/fesm2022/slotted-angular-prompt-composer.mjs +596 -0
- package/fesm2022/slotted-angular-prompt-composer.mjs.map +1 -0
- package/fesm2022/slotted-angular-prose.mjs +314 -0
- package/fesm2022/slotted-angular-prose.mjs.map +1 -0
- package/fesm2022/slotted-angular-radio-group.mjs +469 -0
- package/fesm2022/slotted-angular-radio-group.mjs.map +1 -0
- package/fesm2022/slotted-angular-rating.mjs +1174 -0
- package/fesm2022/slotted-angular-rating.mjs.map +1 -0
- package/fesm2022/slotted-angular-result-state.mjs +330 -0
- package/fesm2022/slotted-angular-result-state.mjs.map +1 -0
- package/fesm2022/slotted-angular-saved-views.mjs +877 -0
- package/fesm2022/slotted-angular-saved-views.mjs.map +1 -0
- package/fesm2022/slotted-angular-scroll-area.mjs +294 -0
- package/fesm2022/slotted-angular-scroll-area.mjs.map +1 -0
- package/fesm2022/slotted-angular-section.mjs +266 -0
- package/fesm2022/slotted-angular-section.mjs.map +1 -0
- package/fesm2022/slotted-angular-segmented-control.mjs +454 -0
- package/fesm2022/slotted-angular-segmented-control.mjs.map +1 -0
- package/fesm2022/slotted-angular-select.mjs +1899 -0
- package/fesm2022/slotted-angular-select.mjs.map +1 -0
- package/fesm2022/slotted-angular-side-navigation.mjs +1042 -0
- package/fesm2022/slotted-angular-side-navigation.mjs.map +1 -0
- package/fesm2022/slotted-angular-skeleton.mjs +316 -0
- package/fesm2022/slotted-angular-skeleton.mjs.map +1 -0
- package/fesm2022/slotted-angular-slider.mjs +586 -0
- package/fesm2022/slotted-angular-slider.mjs.map +1 -0
- package/fesm2022/slotted-angular-sparkline.mjs +235 -0
- package/fesm2022/slotted-angular-sparkline.mjs.map +1 -0
- package/fesm2022/slotted-angular-split-button.mjs +331 -0
- package/fesm2022/slotted-angular-split-button.mjs.map +1 -0
- package/fesm2022/slotted-angular-splitter.mjs +516 -0
- package/fesm2022/slotted-angular-splitter.mjs.map +1 -0
- package/fesm2022/slotted-angular-stack.mjs +48 -0
- package/fesm2022/slotted-angular-stack.mjs.map +1 -0
- package/fesm2022/slotted-angular-stat-card.mjs +478 -0
- package/fesm2022/slotted-angular-stat-card.mjs.map +1 -0
- package/fesm2022/slotted-angular-status-indicator.mjs +155 -0
- package/fesm2022/slotted-angular-status-indicator.mjs.map +1 -0
- package/fesm2022/slotted-angular-stepper.mjs +536 -0
- package/fesm2022/slotted-angular-stepper.mjs.map +1 -0
- package/fesm2022/slotted-angular-switch.mjs +447 -0
- package/fesm2022/slotted-angular-switch.mjs.map +1 -0
- package/fesm2022/slotted-angular-table-of-contents.mjs +750 -0
- package/fesm2022/slotted-angular-table-of-contents.mjs.map +1 -0
- package/fesm2022/slotted-angular-table.mjs +2518 -0
- package/fesm2022/slotted-angular-table.mjs.map +1 -0
- package/fesm2022/slotted-angular-tabs.mjs +829 -0
- package/fesm2022/slotted-angular-tabs.mjs.map +1 -0
- package/fesm2022/slotted-angular-tag.mjs +595 -0
- package/fesm2022/slotted-angular-tag.mjs.map +1 -0
- package/fesm2022/slotted-angular-tags-input.mjs +1211 -0
- package/fesm2022/slotted-angular-tags-input.mjs.map +1 -0
- package/fesm2022/slotted-angular-text-field.mjs +674 -0
- package/fesm2022/slotted-angular-text-field.mjs.map +1 -0
- package/fesm2022/slotted-angular-textarea.mjs +275 -0
- package/fesm2022/slotted-angular-textarea.mjs.map +1 -0
- package/fesm2022/slotted-angular-theme.mjs +45 -0
- package/fesm2022/slotted-angular-theme.mjs.map +1 -0
- package/fesm2022/slotted-angular-time-field.mjs +895 -0
- package/fesm2022/slotted-angular-time-field.mjs.map +1 -0
- package/fesm2022/slotted-angular-time-picker.mjs +856 -0
- package/fesm2022/slotted-angular-time-picker.mjs.map +1 -0
- package/fesm2022/slotted-angular-time-range-picker.mjs +1534 -0
- package/fesm2022/slotted-angular-time-range-picker.mjs.map +1 -0
- package/fesm2022/slotted-angular-timeline.mjs +928 -0
- package/fesm2022/slotted-angular-timeline.mjs.map +1 -0
- package/fesm2022/slotted-angular-toast.mjs +917 -0
- package/fesm2022/slotted-angular-toast.mjs.map +1 -0
- package/fesm2022/slotted-angular-toggle-group.mjs +311 -0
- package/fesm2022/slotted-angular-toggle-group.mjs.map +1 -0
- package/fesm2022/slotted-angular-toggle.mjs +162 -0
- package/fesm2022/slotted-angular-toggle.mjs.map +1 -0
- package/fesm2022/slotted-angular-toolbar.mjs +536 -0
- package/fesm2022/slotted-angular-toolbar.mjs.map +1 -0
- package/fesm2022/slotted-angular-tooltip.mjs +798 -0
- package/fesm2022/slotted-angular-tooltip.mjs.map +1 -0
- package/fesm2022/slotted-angular-top-navigation.mjs +1308 -0
- package/fesm2022/slotted-angular-top-navigation.mjs.map +1 -0
- package/fesm2022/slotted-angular-tour.mjs +1330 -0
- package/fesm2022/slotted-angular-tour.mjs.map +1 -0
- package/fesm2022/slotted-angular-transfer.mjs +1406 -0
- package/fesm2022/slotted-angular-transfer.mjs.map +1 -0
- package/fesm2022/slotted-angular-tree.mjs +1448 -0
- package/fesm2022/slotted-angular-tree.mjs.map +1 -0
- package/fesm2022/slotted-angular-typography.mjs +184 -0
- package/fesm2022/slotted-angular-typography.mjs.map +1 -0
- package/fesm2022/slotted-angular-upload.mjs +1523 -0
- package/fesm2022/slotted-angular-upload.mjs.map +1 -0
- package/fesm2022/slotted-angular-visually-hidden.mjs +32 -0
- package/fesm2022/slotted-angular-visually-hidden.mjs.map +1 -0
- package/fesm2022/slotted-angular-wizard.mjs +1715 -0
- package/fesm2022/slotted-angular-wizard.mjs.map +1 -0
- package/fesm2022/slotted-angular.mjs +4 -0
- package/fesm2022/slotted-angular.mjs.map +1 -0
- package/package.json +537 -3
- package/types/slotted-angular-accordion.d.ts +156 -0
- package/types/slotted-angular-accordion.d.ts.map +1 -0
- package/types/slotted-angular-action-bar.d.ts +291 -0
- package/types/slotted-angular-action-bar.d.ts.map +1 -0
- package/types/slotted-angular-action-sheet.d.ts +294 -0
- package/types/slotted-angular-action-sheet.d.ts.map +1 -0
- package/types/slotted-angular-alert.d.ts +214 -0
- package/types/slotted-angular-alert.d.ts.map +1 -0
- package/types/slotted-angular-app-shell.d.ts +549 -0
- package/types/slotted-angular-app-shell.d.ts.map +1 -0
- package/types/slotted-angular-aspect-ratio.d.ts +57 -0
- package/types/slotted-angular-aspect-ratio.d.ts.map +1 -0
- package/types/slotted-angular-attachment.d.ts +294 -0
- package/types/slotted-angular-attachment.d.ts.map +1 -0
- package/types/slotted-angular-avatar-group.d.ts +119 -0
- package/types/slotted-angular-avatar-group.d.ts.map +1 -0
- package/types/slotted-angular-avatar.d.ts +202 -0
- package/types/slotted-angular-avatar.d.ts.map +1 -0
- package/types/slotted-angular-badge.d.ts +166 -0
- package/types/slotted-angular-badge.d.ts.map +1 -0
- package/types/slotted-angular-breadcrumb.d.ts +251 -0
- package/types/slotted-angular-breadcrumb.d.ts.map +1 -0
- package/types/slotted-angular-button-group.d.ts +89 -0
- package/types/slotted-angular-button-group.d.ts.map +1 -0
- package/types/slotted-angular-button.d.ts +390 -0
- package/types/slotted-angular-button.d.ts.map +1 -0
- package/types/slotted-angular-calendar.d.ts +280 -0
- package/types/slotted-angular-calendar.d.ts.map +1 -0
- package/types/slotted-angular-card.d.ts +140 -0
- package/types/slotted-angular-card.d.ts.map +1 -0
- package/types/slotted-angular-carousel.d.ts +288 -0
- package/types/slotted-angular-carousel.d.ts.map +1 -0
- package/types/slotted-angular-cascader.d.ts +351 -0
- package/types/slotted-angular-cascader.d.ts.map +1 -0
- package/types/slotted-angular-chart.d.ts +319 -0
- package/types/slotted-angular-chart.d.ts.map +1 -0
- package/types/slotted-angular-checkbox-group.d.ts +156 -0
- package/types/slotted-angular-checkbox-group.d.ts.map +1 -0
- package/types/slotted-angular-checkbox.d.ts +197 -0
- package/types/slotted-angular-checkbox.d.ts.map +1 -0
- package/types/slotted-angular-code-block.d.ts +158 -0
- package/types/slotted-angular-code-block.d.ts.map +1 -0
- package/types/slotted-angular-collapsible.d.ts +272 -0
- package/types/slotted-angular-collapsible.d.ts.map +1 -0
- package/types/slotted-angular-color-picker.d.ts +181 -0
- package/types/slotted-angular-color-picker.d.ts.map +1 -0
- package/types/slotted-angular-column-manager.d.ts +200 -0
- package/types/slotted-angular-column-manager.d.ts.map +1 -0
- package/types/slotted-angular-combobox.d.ts +449 -0
- package/types/slotted-angular-combobox.d.ts.map +1 -0
- package/types/slotted-angular-command-palette.d.ts +256 -0
- package/types/slotted-angular-command-palette.d.ts.map +1 -0
- package/types/slotted-angular-container.d.ts +84 -0
- package/types/slotted-angular-container.d.ts.map +1 -0
- package/types/slotted-angular-context-menu.d.ts +84 -0
- package/types/slotted-angular-context-menu.d.ts.map +1 -0
- package/types/slotted-angular-currency-field.d.ts +480 -0
- package/types/slotted-angular-currency-field.d.ts.map +1 -0
- package/types/slotted-angular-dashboard-grid.d.ts +341 -0
- package/types/slotted-angular-dashboard-grid.d.ts.map +1 -0
- package/types/slotted-angular-data-grid.d.ts +1077 -0
- package/types/slotted-angular-data-grid.d.ts.map +1 -0
- package/types/slotted-angular-data-list.d.ts +272 -0
- package/types/slotted-angular-data-list.d.ts.map +1 -0
- package/types/slotted-angular-date-field.d.ts +320 -0
- package/types/slotted-angular-date-field.d.ts.map +1 -0
- package/types/slotted-angular-date-picker.d.ts +224 -0
- package/types/slotted-angular-date-picker.d.ts.map +1 -0
- package/types/slotted-angular-date-range-picker.d.ts +310 -0
- package/types/slotted-angular-date-range-picker.d.ts.map +1 -0
- package/types/slotted-angular-datetime-field.d.ts +362 -0
- package/types/slotted-angular-datetime-field.d.ts.map +1 -0
- package/types/slotted-angular-datetime-picker.d.ts +370 -0
- package/types/slotted-angular-datetime-picker.d.ts.map +1 -0
- package/types/slotted-angular-datetime-range-picker.d.ts +459 -0
- package/types/slotted-angular-datetime-range-picker.d.ts.map +1 -0
- package/types/slotted-angular-description-list.d.ts +281 -0
- package/types/slotted-angular-description-list.d.ts.map +1 -0
- package/types/slotted-angular-detail-panel.d.ts +240 -0
- package/types/slotted-angular-detail-panel.d.ts.map +1 -0
- package/types/slotted-angular-dialog.d.ts +497 -0
- package/types/slotted-angular-dialog.d.ts.map +1 -0
- package/types/slotted-angular-divider.d.ts +40 -0
- package/types/slotted-angular-divider.d.ts.map +1 -0
- package/types/slotted-angular-drawer.d.ts +532 -0
- package/types/slotted-angular-drawer.d.ts.map +1 -0
- package/types/slotted-angular-entity-picker.d.ts +338 -0
- package/types/slotted-angular-entity-picker.d.ts.map +1 -0
- package/types/slotted-angular-event-calendar.d.ts +574 -0
- package/types/slotted-angular-event-calendar.d.ts.map +1 -0
- package/types/slotted-angular-field-group.d.ts +152 -0
- package/types/slotted-angular-field-group.d.ts.map +1 -0
- package/types/slotted-angular-field.d.ts +535 -0
- package/types/slotted-angular-field.d.ts.map +1 -0
- package/types/slotted-angular-filter-bar.d.ts +573 -0
- package/types/slotted-angular-filter-bar.d.ts.map +1 -0
- package/types/slotted-angular-form.d.ts +298 -0
- package/types/slotted-angular-form.d.ts.map +1 -0
- package/types/slotted-angular-fullscreen.d.ts +145 -0
- package/types/slotted-angular-fullscreen.d.ts.map +1 -0
- package/types/slotted-angular-grid.d.ts +50 -0
- package/types/slotted-angular-grid.d.ts.map +1 -0
- package/types/slotted-angular-highlight.d.ts +93 -0
- package/types/slotted-angular-highlight.d.ts.map +1 -0
- package/types/slotted-angular-hover-card.d.ts +140 -0
- package/types/slotted-angular-hover-card.d.ts.map +1 -0
- package/types/slotted-angular-i18n.d.ts +46 -0
- package/types/slotted-angular-i18n.d.ts.map +1 -0
- package/types/slotted-angular-icon.d.ts +94 -0
- package/types/slotted-angular-icon.d.ts.map +1 -0
- package/types/slotted-angular-image.d.ts +251 -0
- package/types/slotted-angular-image.d.ts.map +1 -0
- package/types/slotted-angular-import-export-center.d.ts +351 -0
- package/types/slotted-angular-import-export-center.d.ts.map +1 -0
- package/types/slotted-angular-inline-message.d.ts +195 -0
- package/types/slotted-angular-inline-message.d.ts.map +1 -0
- package/types/slotted-angular-inline.d.ts +41 -0
- package/types/slotted-angular-inline.d.ts.map +1 -0
- package/types/slotted-angular-kbd.d.ts +174 -0
- package/types/slotted-angular-kbd.d.ts.map +1 -0
- package/types/slotted-angular-link.d.ts +94 -0
- package/types/slotted-angular-link.d.ts.map +1 -0
- package/types/slotted-angular-list-item.d.ts +210 -0
- package/types/slotted-angular-list-item.d.ts.map +1 -0
- package/types/slotted-angular-list.d.ts +176 -0
- package/types/slotted-angular-list.d.ts.map +1 -0
- package/types/slotted-angular-listbox.d.ts +470 -0
- package/types/slotted-angular-listbox.d.ts.map +1 -0
- package/types/slotted-angular-loading-overlay.d.ts +219 -0
- package/types/slotted-angular-loading-overlay.d.ts.map +1 -0
- package/types/slotted-angular-markdown.d.ts +172 -0
- package/types/slotted-angular-markdown.d.ts.map +1 -0
- package/types/slotted-angular-menu.d.ts +448 -0
- package/types/slotted-angular-menu.d.ts.map +1 -0
- package/types/slotted-angular-menubar.d.ts +90 -0
- package/types/slotted-angular-menubar.d.ts.map +1 -0
- package/types/slotted-angular-message-scroller.d.ts +151 -0
- package/types/slotted-angular-message-scroller.d.ts.map +1 -0
- package/types/slotted-angular-message.d.ts +348 -0
- package/types/slotted-angular-message.d.ts.map +1 -0
- package/types/slotted-angular-multi-select.d.ts +462 -0
- package/types/slotted-angular-multi-select.d.ts.map +1 -0
- package/types/slotted-angular-navigation-menu.d.ts +309 -0
- package/types/slotted-angular-navigation-menu.d.ts.map +1 -0
- package/types/slotted-angular-notification-center.d.ts +318 -0
- package/types/slotted-angular-notification-center.d.ts.map +1 -0
- package/types/slotted-angular-number-field.d.ts +402 -0
- package/types/slotted-angular-number-field.d.ts.map +1 -0
- package/types/slotted-angular-otp-input.d.ts +286 -0
- package/types/slotted-angular-otp-input.d.ts.map +1 -0
- package/types/slotted-angular-page-header.d.ts +334 -0
- package/types/slotted-angular-page-header.d.ts.map +1 -0
- package/types/slotted-angular-page.d.ts +141 -0
- package/types/slotted-angular-page.d.ts.map +1 -0
- package/types/slotted-angular-pagination.d.ts +213 -0
- package/types/slotted-angular-pagination.d.ts.map +1 -0
- package/types/slotted-angular-popover.d.ts +366 -0
- package/types/slotted-angular-popover.d.ts.map +1 -0
- package/types/slotted-angular-progress-indicator.d.ts +312 -0
- package/types/slotted-angular-progress-indicator.d.ts.map +1 -0
- package/types/slotted-angular-prompt-composer.d.ts +242 -0
- package/types/slotted-angular-prompt-composer.d.ts.map +1 -0
- package/types/slotted-angular-prose.d.ts +171 -0
- package/types/slotted-angular-prose.d.ts.map +1 -0
- package/types/slotted-angular-radio-group.d.ts +268 -0
- package/types/slotted-angular-radio-group.d.ts.map +1 -0
- package/types/slotted-angular-rating.d.ts +374 -0
- package/types/slotted-angular-rating.d.ts.map +1 -0
- package/types/slotted-angular-result-state.d.ts +217 -0
- package/types/slotted-angular-result-state.d.ts.map +1 -0
- package/types/slotted-angular-saved-views.d.ts +198 -0
- package/types/slotted-angular-saved-views.d.ts.map +1 -0
- package/types/slotted-angular-scroll-area.d.ts +186 -0
- package/types/slotted-angular-scroll-area.d.ts.map +1 -0
- package/types/slotted-angular-section.d.ts +143 -0
- package/types/slotted-angular-section.d.ts.map +1 -0
- package/types/slotted-angular-segmented-control.d.ts +251 -0
- package/types/slotted-angular-segmented-control.d.ts.map +1 -0
- package/types/slotted-angular-select.d.ts +507 -0
- package/types/slotted-angular-select.d.ts.map +1 -0
- package/types/slotted-angular-side-navigation.d.ts +373 -0
- package/types/slotted-angular-side-navigation.d.ts.map +1 -0
- package/types/slotted-angular-skeleton.d.ts +198 -0
- package/types/slotted-angular-skeleton.d.ts.map +1 -0
- package/types/slotted-angular-slider.d.ts +216 -0
- package/types/slotted-angular-slider.d.ts.map +1 -0
- package/types/slotted-angular-sparkline.d.ts +106 -0
- package/types/slotted-angular-sparkline.d.ts.map +1 -0
- package/types/slotted-angular-split-button.d.ts +180 -0
- package/types/slotted-angular-split-button.d.ts.map +1 -0
- package/types/slotted-angular-splitter.d.ts +206 -0
- package/types/slotted-angular-splitter.d.ts.map +1 -0
- package/types/slotted-angular-stack.d.ts +38 -0
- package/types/slotted-angular-stack.d.ts.map +1 -0
- package/types/slotted-angular-stat-card.d.ts +232 -0
- package/types/slotted-angular-stat-card.d.ts.map +1 -0
- package/types/slotted-angular-status-indicator.d.ts +106 -0
- package/types/slotted-angular-status-indicator.d.ts.map +1 -0
- package/types/slotted-angular-stepper.d.ts +198 -0
- package/types/slotted-angular-stepper.d.ts.map +1 -0
- package/types/slotted-angular-switch.d.ts +243 -0
- package/types/slotted-angular-switch.d.ts.map +1 -0
- package/types/slotted-angular-table-of-contents.d.ts +210 -0
- package/types/slotted-angular-table-of-contents.d.ts.map +1 -0
- package/types/slotted-angular-table.d.ts +888 -0
- package/types/slotted-angular-table.d.ts.map +1 -0
- package/types/slotted-angular-tabs.d.ts +340 -0
- package/types/slotted-angular-tabs.d.ts.map +1 -0
- package/types/slotted-angular-tag.d.ts +279 -0
- package/types/slotted-angular-tag.d.ts.map +1 -0
- package/types/slotted-angular-tags-input.d.ts +302 -0
- package/types/slotted-angular-tags-input.d.ts.map +1 -0
- package/types/slotted-angular-text-field.d.ts +334 -0
- package/types/slotted-angular-text-field.d.ts.map +1 -0
- package/types/slotted-angular-textarea.d.ts +150 -0
- package/types/slotted-angular-textarea.d.ts.map +1 -0
- package/types/slotted-angular-theme.d.ts +26 -0
- package/types/slotted-angular-theme.d.ts.map +1 -0
- package/types/slotted-angular-time-field.d.ts +300 -0
- package/types/slotted-angular-time-field.d.ts.map +1 -0
- package/types/slotted-angular-time-picker.d.ts +260 -0
- package/types/slotted-angular-time-picker.d.ts.map +1 -0
- package/types/slotted-angular-time-range-picker.d.ts +401 -0
- package/types/slotted-angular-time-range-picker.d.ts.map +1 -0
- package/types/slotted-angular-timeline.d.ts +329 -0
- package/types/slotted-angular-timeline.d.ts.map +1 -0
- package/types/slotted-angular-toast.d.ts +340 -0
- package/types/slotted-angular-toast.d.ts.map +1 -0
- package/types/slotted-angular-toggle-group.d.ts +167 -0
- package/types/slotted-angular-toggle-group.d.ts.map +1 -0
- package/types/slotted-angular-toggle.d.ts +106 -0
- package/types/slotted-angular-toggle.d.ts.map +1 -0
- package/types/slotted-angular-toolbar.d.ts +252 -0
- package/types/slotted-angular-toolbar.d.ts.map +1 -0
- package/types/slotted-angular-tooltip.d.ts +388 -0
- package/types/slotted-angular-tooltip.d.ts.map +1 -0
- package/types/slotted-angular-top-navigation.d.ts +442 -0
- package/types/slotted-angular-top-navigation.d.ts.map +1 -0
- package/types/slotted-angular-tour.d.ts +440 -0
- package/types/slotted-angular-tour.d.ts.map +1 -0
- package/types/slotted-angular-transfer.d.ts +296 -0
- package/types/slotted-angular-transfer.d.ts.map +1 -0
- package/types/slotted-angular-tree.d.ts +499 -0
- package/types/slotted-angular-tree.d.ts.map +1 -0
- package/types/slotted-angular-typography.d.ts +89 -0
- package/types/slotted-angular-typography.d.ts.map +1 -0
- package/types/slotted-angular-upload.d.ts +365 -0
- package/types/slotted-angular-upload.d.ts.map +1 -0
- package/types/slotted-angular-visually-hidden.d.ts +19 -0
- package/types/slotted-angular-visually-hidden.d.ts.map +1 -0
- package/types/slotted-angular-wizard.d.ts +441 -0
- package/types/slotted-angular-wizard.d.ts.map +1 -0
- package/types/slotted-angular.d.ts +3 -0
- package/types/slotted-angular.d.ts.map +1 -0
|
@@ -0,0 +1,1397 @@
|
|
|
1
|
+
import { isPlatformBrowser } from '@angular/common';
|
|
2
|
+
import { injectMessages } from '@slotted/angular/i18n';
|
|
3
|
+
import { createDismissableLayer } from '@slotted/core/dismissable-layer';
|
|
4
|
+
import { extentBounds, isInlineSide, attachSheetDrag, settleExtent, dampenExtent, sameStop, measureSheetStops, stopAsExtent, EXTENT_STEP_PX, EXTENT_LARGE_STEP_PX, extentAtPoint, holdResizeGesture, extentVelocity, SHEET_FLING_PX_PER_S, anchorsAtStart, stepAmountFromPixels, stepExtent } from '@slotted/core/extent';
|
|
5
|
+
import { createFocusScope } from '@slotted/core/focus';
|
|
6
|
+
import { drawerMessages } from '@slotted/core/i18n';
|
|
7
|
+
import { observeKeyboardInset, clamp } from '@slotted/core/measure';
|
|
8
|
+
import { createPortalRoot } from '@slotted/core/portal';
|
|
9
|
+
import { createPresence } from '@slotted/core/presence';
|
|
10
|
+
import { createControllable } from '@slotted/core/state';
|
|
11
|
+
import * as i0 from '@angular/core';
|
|
12
|
+
import { InjectionToken, inject, Injectable, model, input, booleanAttribute, output, ElementRef, PLATFORM_ID, DestroyRef, HostAttributeToken, viewChild, signal, computed, effect, untracked, ViewEncapsulation, ChangeDetectionStrategy, Component, Directive } from '@angular/core';
|
|
13
|
+
import { SlGlyph, SlIcon } from '@slotted/angular/icon';
|
|
14
|
+
|
|
15
|
+
const FALLBACK = {
|
|
16
|
+
back: 'close',
|
|
17
|
+
escape: 'close',
|
|
18
|
+
modal: true,
|
|
19
|
+
mode: 'overlay',
|
|
20
|
+
mount: 'active',
|
|
21
|
+
outsidePress: 'close',
|
|
22
|
+
side: 'end',
|
|
23
|
+
size: undefined,
|
|
24
|
+
drag: 'panel',
|
|
25
|
+
};
|
|
26
|
+
const DRAWER_DEFAULTS = new InjectionToken('slotted drawer defaults', {
|
|
27
|
+
providedIn: 'root',
|
|
28
|
+
factory: () => FALLBACK,
|
|
29
|
+
});
|
|
30
|
+
/**
|
|
31
|
+
* An application decides once how its drawers behave and look, rather than
|
|
32
|
+
* repeating the same seven inputs on every one in a product. Ant reaches the
|
|
33
|
+
* same place through `ConfigProvider`; no React drawer in the surveyed set has
|
|
34
|
+
* an equivalent, and React gets one here too rather than being levelled down.
|
|
35
|
+
*/
|
|
36
|
+
function provideDrawerDefaults(defaults) {
|
|
37
|
+
return {
|
|
38
|
+
provide: DRAWER_DEFAULTS,
|
|
39
|
+
useFactory: () => ({ ...FALLBACK, ...defaults }),
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
/** What a drawer renders as here, before it states anything of its own. */
|
|
43
|
+
function injectDrawerDefaults() {
|
|
44
|
+
return inject(DRAWER_DEFAULTS);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Application-scoped rather than module-scoped, for the reason `field` records:
|
|
48
|
+
* a module-level counter produces colliding sequences when two applications
|
|
49
|
+
* render in one server process, and the server and the client sequences must
|
|
50
|
+
* match for hydration.
|
|
51
|
+
*/
|
|
52
|
+
class SlDrawerIdFactory {
|
|
53
|
+
count = 0;
|
|
54
|
+
next() {
|
|
55
|
+
this.count += 1;
|
|
56
|
+
return `slotted-drawer-${this.count}`;
|
|
57
|
+
}
|
|
58
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlDrawerIdFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
59
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlDrawerIdFactory, providedIn: 'root' });
|
|
60
|
+
}
|
|
61
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlDrawerIdFactory, decorators: [{
|
|
62
|
+
type: Injectable,
|
|
63
|
+
args: [{ providedIn: 'root' }]
|
|
64
|
+
}] });
|
|
65
|
+
|
|
66
|
+
const NO_SNAP_POINTS = [];
|
|
67
|
+
/** What the stylesheet leaves above a content sheet, for the press outside. */
|
|
68
|
+
const CONTENT_RESERVE = 'var(--slotted-space-12, 4rem)';
|
|
69
|
+
/**
|
|
70
|
+
* A panel that comes in from an edge, and either covers the page or stands
|
|
71
|
+
* beside it.
|
|
72
|
+
*
|
|
73
|
+
* The layer is composed from `packages/core` and rewritten nowhere: `portal`
|
|
74
|
+
* decides where it lives and keeps the theme of the region that opened it,
|
|
75
|
+
* `dismissable-layer` owns Escape, outside press, `inert`, the scroll lock and
|
|
76
|
+
* the single z-index stack, `presence` keeps it mounted long enough to leave,
|
|
77
|
+
* `focus` contains the keyboard and gives it back to the trigger, and `extent`
|
|
78
|
+
* holds the arithmetic the separator's pointer and keyboard share.
|
|
79
|
+
*
|
|
80
|
+
* **The host is not the layer.** `<sl-drawer>` renders `display: contents` and
|
|
81
|
+
* stays exactly where the consumer wrote it; the layer is the `div` in the
|
|
82
|
+
* template. Under `mode="overlay"` that `div` is moved into the portal and
|
|
83
|
+
* given back before it is destroyed; under `mode="inline"` it never moves,
|
|
84
|
+
* which is what makes the host's own parent the drawer's place in the layout.
|
|
85
|
+
* Either way the host is the portal's *origin*, so the layer keeps the scheme,
|
|
86
|
+
* density, theme and direction of the region it was written in whether or not
|
|
87
|
+
* a trigger exists — React has to use the trigger for that, and
|
|
88
|
+
* `docs/history/designs/2026-09-04-drawer-design.md` §11 records the
|
|
89
|
+
* asymmetry rather than levelling both down.
|
|
90
|
+
*/
|
|
91
|
+
class SlDrawer {
|
|
92
|
+
/** Whether the drawer is open. Two-way, so a template may bind it directly. */
|
|
93
|
+
open = model(false, /* @ts-ignore */
|
|
94
|
+
...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
95
|
+
/**
|
|
96
|
+
* How much of the box the panel is measured in it takes, in `[0, 1]`. Unset
|
|
97
|
+
* means the `size` step decides. It is a fraction rather than a length so
|
|
98
|
+
* that the separator's three ARIA values, the limits and the snap points are
|
|
99
|
+
* all the same kind of number.
|
|
100
|
+
*/
|
|
101
|
+
extent = model(undefined, /* @ts-ignore */
|
|
102
|
+
...(ngDevMode ? [{ debugName: "extent" }] : /* istanbul ignore next */ []));
|
|
103
|
+
mode = input(undefined, /* @ts-ignore */
|
|
104
|
+
...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
|
|
105
|
+
side = input(undefined, /* @ts-ignore */
|
|
106
|
+
...(ngDevMode ? [{ debugName: "side" }] : /* istanbul ignore next */ []));
|
|
107
|
+
size = input(undefined, /* @ts-ignore */
|
|
108
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
109
|
+
mount = input(undefined, /* @ts-ignore */
|
|
110
|
+
...(ngDevMode ? [{ debugName: "mount" }] : /* istanbul ignore next */ []));
|
|
111
|
+
escape = input(undefined, /* @ts-ignore */
|
|
112
|
+
...(ngDevMode ? [{ debugName: "escape" }] : /* istanbul ignore next */ []));
|
|
113
|
+
outsidePress = input(undefined, /* @ts-ignore */
|
|
114
|
+
...(ngDevMode ? [{ debugName: "outsidePress" }] : /* istanbul ignore next */ []));
|
|
115
|
+
/**
|
|
116
|
+
* The platform's way back — a phone's gesture, a browser's button — closes
|
|
117
|
+
* the layer instead of leaving the page, while the layer is modal.
|
|
118
|
+
*/
|
|
119
|
+
back = input(undefined, /* @ts-ignore */
|
|
120
|
+
...(ngDevMode ? [{ debugName: "back" }] : /* istanbul ignore next */ []));
|
|
121
|
+
/**
|
|
122
|
+
* Whether the background is inert, the scroll is locked and focus is
|
|
123
|
+
* contained. Fixed at `false` under `mode="inline"`: a panel in the flow that
|
|
124
|
+
* claimed `aria-modal` while the page around it stayed reachable is the
|
|
125
|
+
* failure the APG calls severe.
|
|
126
|
+
*/
|
|
127
|
+
modal = input(true, { ...(ngDevMode ? { debugName: "modal" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
128
|
+
/** Whether the panel's content is still on its way. */
|
|
129
|
+
loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
130
|
+
/** Words laid over the catalog of the language in force, key by key: the close control's name (`close`). */
|
|
131
|
+
messages = input(undefined, /* @ts-ignore */
|
|
132
|
+
...(ngDevMode ? [{ debugName: "messages" }] : /* istanbul ignore next */ []));
|
|
133
|
+
/** What a hand moves an overlay sheet from the bottom by. */
|
|
134
|
+
drag = input(undefined, /* @ts-ignore */
|
|
135
|
+
...(ngDevMode ? [{ debugName: "drag" }] : /* istanbul ignore next */ []));
|
|
136
|
+
/**
|
|
137
|
+
* Below this fraction the scrim is not painted and a press reaches the page:
|
|
138
|
+
* the sheet over a map. It pairs with `[modal]="false"` and
|
|
139
|
+
* `outsidePress="none"`, because a page left undimmed and inert would promise
|
|
140
|
+
* something it does not do.
|
|
141
|
+
*/
|
|
142
|
+
scrimFrom = input(0, /* @ts-ignore */
|
|
143
|
+
...(ngDevMode ? [{ debugName: "scrimFrom" }] : /* istanbul ignore next */ []));
|
|
144
|
+
/** The smallest the reader may make it. A drag released below it asks to close. */
|
|
145
|
+
minExtent = input(0.2, /* @ts-ignore */
|
|
146
|
+
...(ngDevMode ? [{ debugName: "minExtent" }] : /* istanbul ignore next */ []));
|
|
147
|
+
maxExtent = input(1, /* @ts-ignore */
|
|
148
|
+
...(ngDevMode ? [{ debugName: "maxExtent" }] : /* istanbul ignore next */ []));
|
|
149
|
+
/** The stops the separator lands on. Empty means the range is continuous. */
|
|
150
|
+
snapPoints = input(NO_SNAP_POINTS, /* @ts-ignore */
|
|
151
|
+
...(ngDevMode ? [{ debugName: "snapPoints" }] : /* istanbul ignore next */ []));
|
|
152
|
+
/** A parent for this layer alone, instead of the shared portal root. */
|
|
153
|
+
container = input(undefined, /* @ts-ignore */
|
|
154
|
+
...(ngDevMode ? [{ debugName: "container" }] : /* istanbul ignore next */ []));
|
|
155
|
+
initialFocus = input(undefined, /* @ts-ignore */
|
|
156
|
+
...(ngDevMode ? [{ debugName: "initialFocus" }] : /* istanbul ignore next */ []));
|
|
157
|
+
finalFocus = input(undefined, /* @ts-ignore */
|
|
158
|
+
...(ngDevMode ? [{ debugName: "finalFocus" }] : /* istanbul ignore next */ []));
|
|
159
|
+
/** One output per transition, each carrying its reason and its event. */
|
|
160
|
+
openChangeRequest = output();
|
|
161
|
+
extentChangeRequest = output();
|
|
162
|
+
/**
|
|
163
|
+
* What `afterClosed()` is in Angular Material, as an output. It fires once
|
|
164
|
+
* the drawer has actually closed, with the result the close carried.
|
|
165
|
+
*/
|
|
166
|
+
closed = output();
|
|
167
|
+
defaults = injectDrawerDefaults();
|
|
168
|
+
/** The family's words in the language in force, with this drawer's `messages` laid over them. */
|
|
169
|
+
t = injectMessages(drawerMessages, this.messages);
|
|
170
|
+
host = inject(ElementRef).nativeElement;
|
|
171
|
+
/** The server lays nothing out, and its DOM cannot be measured. */
|
|
172
|
+
browser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
173
|
+
destroyRef = inject(DestroyRef);
|
|
174
|
+
baseId = inject(SlDrawerIdFactory).next();
|
|
175
|
+
/** The element the consumer wrote us beside, recorded before anything moves. */
|
|
176
|
+
origin = this.host.parentElement;
|
|
177
|
+
/**
|
|
178
|
+
* A consumer's own `aria-label` on `<sl-drawer>`, read before the host
|
|
179
|
+
* bindings are written and moved to the panel, which is the element the role
|
|
180
|
+
* is on. Without this a label written on the host would name a box with
|
|
181
|
+
* `display: contents` and no role at all.
|
|
182
|
+
*/
|
|
183
|
+
writtenLabel = inject(new HostAttributeToken('aria-label'), {
|
|
184
|
+
optional: true,
|
|
185
|
+
});
|
|
186
|
+
layerRef = viewChild('layer', /* @ts-ignore */
|
|
187
|
+
...(ngDevMode ? [{ debugName: "layerRef" }] : /* istanbul ignore next */ []));
|
|
188
|
+
panelRef = viewChild('panel', /* @ts-ignore */
|
|
189
|
+
...(ngDevMode ? [{ debugName: "panelRef" }] : /* istanbul ignore next */ []));
|
|
190
|
+
/** The parts that have said they exist, so only what was rendered is wired. */
|
|
191
|
+
hasTitle = signal(false, /* @ts-ignore */
|
|
192
|
+
...(ngDevMode ? [{ debugName: "hasTitle" }] : /* istanbul ignore next */ []));
|
|
193
|
+
hasDescription = signal(false, /* @ts-ignore */
|
|
194
|
+
...(ngDevMode ? [{ debugName: "hasDescription" }] : /* istanbul ignore next */ []));
|
|
195
|
+
triggerNode = signal(null, /* @ts-ignore */
|
|
196
|
+
...(ngDevMode ? [{ debugName: "triggerNode" }] : /* istanbul ignore next */ []));
|
|
197
|
+
/** Whether the reader has the separator under the pointer. */
|
|
198
|
+
dragging = signal(false, /* @ts-ignore */
|
|
199
|
+
...(ngDevMode ? [{ debugName: "dragging" }] : /* istanbul ignore next */ []));
|
|
200
|
+
/**
|
|
201
|
+
* Where the hand is holding the panel while the body is dragged, which may be
|
|
202
|
+
* past the highest stop. `null` outside a gesture: the request is made once,
|
|
203
|
+
* on release, rather than once per move.
|
|
204
|
+
*/
|
|
205
|
+
live = signal(null, /* @ts-ignore */
|
|
206
|
+
...(ngDevMode ? [{ debugName: "live" }] : /* istanbul ignore next */ []));
|
|
207
|
+
/**
|
|
208
|
+
* What the panel measures at rest — the height of its content under
|
|
209
|
+
* `size="content"` — as a fraction, measured while `extent` is unset.
|
|
210
|
+
*/
|
|
211
|
+
rest = signal(undefined, /* @ts-ignore */
|
|
212
|
+
...(ngDevMode ? [{ debugName: "rest" }] : /* istanbul ignore next */ []));
|
|
213
|
+
titleId = `${this.baseId}-title`;
|
|
214
|
+
descriptionId = `${this.baseId}-description`;
|
|
215
|
+
panelId = `${this.baseId}-panel`;
|
|
216
|
+
triggerId = `${this.baseId}-trigger`;
|
|
217
|
+
/**
|
|
218
|
+
* The status rather than a boolean. `entering` is one frame long and it is
|
|
219
|
+
* the whole reason it exists: a panel that appears already open gives its CSS
|
|
220
|
+
* transition no closed style to start from.
|
|
221
|
+
*/
|
|
222
|
+
status = signal('unmounted', /* @ts-ignore */
|
|
223
|
+
...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
|
|
224
|
+
presence = createPresence({
|
|
225
|
+
present: false,
|
|
226
|
+
onStatusChange: (next) => this.status.set(next),
|
|
227
|
+
});
|
|
228
|
+
/** Whether this drawer has ever been open, which is what `lazy` reads. */
|
|
229
|
+
seen = signal(false, /* @ts-ignore */
|
|
230
|
+
...(ngDevMode ? [{ debugName: "seen" }] : /* istanbul ignore next */ []));
|
|
231
|
+
result = signal(undefined, /* @ts-ignore */
|
|
232
|
+
...(ngDevMode ? [{ debugName: "result" }] : /* istanbul ignore next */ []));
|
|
233
|
+
/** The measured length the stylesheet reads, kept in step by an observer. */
|
|
234
|
+
measured = signal(null, /* @ts-ignore */
|
|
235
|
+
...(ngDevMode ? [{ debugName: "measured" }] : /* istanbul ignore next */ []));
|
|
236
|
+
resolvedMode = computed(() => this.mode() ?? this.defaults.mode, /* @ts-ignore */
|
|
237
|
+
...(ngDevMode ? [{ debugName: "resolvedMode" }] : /* istanbul ignore next */ []));
|
|
238
|
+
resolvedSide = computed(() => this.side() ?? this.defaults.side, /* @ts-ignore */
|
|
239
|
+
...(ngDevMode ? [{ debugName: "resolvedSide" }] : /* istanbul ignore next */ []));
|
|
240
|
+
/**
|
|
241
|
+
* A sheet measures what it holds and a side panel takes a named step: every
|
|
242
|
+
* native sheet sizes to its content, and Ant, Fluent and MUI all give a side
|
|
243
|
+
* panel a width. The side decides only when nothing else has.
|
|
244
|
+
*/
|
|
245
|
+
resolvedSize = computed(() => {
|
|
246
|
+
const side = this.resolvedSide();
|
|
247
|
+
return (this.size() ?? this.defaults.size ?? (side === 'top' || side === 'bottom' ? 'content' : 'md'));
|
|
248
|
+
}, /* @ts-ignore */
|
|
249
|
+
...(ngDevMode ? [{ debugName: "resolvedSize" }] : /* istanbul ignore next */ []));
|
|
250
|
+
resolvedDrag = computed(() => this.drag() ?? this.defaults.drag, /* @ts-ignore */
|
|
251
|
+
...(ngDevMode ? [{ debugName: "resolvedDrag" }] : /* istanbul ignore next */ []));
|
|
252
|
+
/** An overlay sheet from the bottom, which is the only panel a body drag moves. */
|
|
253
|
+
sheet = computed(() => this.resolvedMode() === 'overlay' && this.resolvedSide() === 'bottom', /* @ts-ignore */
|
|
254
|
+
...(ngDevMode ? [{ debugName: "sheet" }] : /* istanbul ignore next */ []));
|
|
255
|
+
/** The measure right now: the hand's while a body drag holds it, the state otherwise. */
|
|
256
|
+
currentExtent = computed(() => this.live() ?? this.extent(), /* @ts-ignore */
|
|
257
|
+
...(ngDevMode ? [{ debugName: "currentExtent" }] : /* istanbul ignore next */ []));
|
|
258
|
+
undimmed = computed(() => this.resolvedMode() === 'overlay' &&
|
|
259
|
+
(this.currentExtent() ?? this.rest() ?? 1) < this.scrimFrom(), /* @ts-ignore */
|
|
260
|
+
...(ngDevMode ? [{ debugName: "undimmed" }] : /* istanbul ignore next */ []));
|
|
261
|
+
resolvedMount = computed(() => this.mount() ?? this.defaults.mount, /* @ts-ignore */
|
|
262
|
+
...(ngDevMode ? [{ debugName: "resolvedMount" }] : /* istanbul ignore next */ []));
|
|
263
|
+
resolvedModal = computed(() => this.resolvedMode() === 'inline' ? false : this.modal(), /* @ts-ignore */
|
|
264
|
+
...(ngDevMode ? [{ debugName: "resolvedModal" }] : /* istanbul ignore next */ []));
|
|
265
|
+
resolvedEscape = computed(() => this.resolvedMode() === 'inline' ? 'none' : (this.escape() ?? this.defaults.escape), /* @ts-ignore */
|
|
266
|
+
...(ngDevMode ? [{ debugName: "resolvedEscape" }] : /* istanbul ignore next */ []));
|
|
267
|
+
resolvedBack = computed(() => this.resolvedMode() === 'inline' ? 'none' : (this.back() ?? this.defaults.back), /* @ts-ignore */
|
|
268
|
+
...(ngDevMode ? [{ debugName: "resolvedBack" }] : /* istanbul ignore next */ []));
|
|
269
|
+
resolvedOutsidePress = computed(() => this.resolvedMode() === 'inline' ? 'none' : (this.outsidePress() ?? this.defaults.outsidePress), /* @ts-ignore */
|
|
270
|
+
...(ngDevMode ? [{ debugName: "resolvedOutsidePress" }] : /* istanbul ignore next */ []));
|
|
271
|
+
/**
|
|
272
|
+
* The limits are the first and last stop when there are stops, because a
|
|
273
|
+
* range whose ends no stop can reach has two values nothing produces.
|
|
274
|
+
*/
|
|
275
|
+
bounds = computed(() => {
|
|
276
|
+
const stops = extentBounds(this.snapPoints(), this.minExtent(), this.maxExtent());
|
|
277
|
+
/* Under `content` the height of the content is a stop above the snap
|
|
278
|
+
points, so the range reaches past the last of them. */
|
|
279
|
+
return this.resolvedSize() === 'content'
|
|
280
|
+
? { ...stops, max: Math.max(stops.max, this.maxExtent()) }
|
|
281
|
+
: stops;
|
|
282
|
+
}, /* @ts-ignore */
|
|
283
|
+
...(ngDevMode ? [{ debugName: "bounds" }] : /* istanbul ignore next */ []));
|
|
284
|
+
/**
|
|
285
|
+
* An inline drawer is always in the document: its own measure is what opens
|
|
286
|
+
* and closes, and a box that left the layout would take the page's columns
|
|
287
|
+
* with it every time the reader closed the panel.
|
|
288
|
+
*/
|
|
289
|
+
mounted = computed(() => {
|
|
290
|
+
if (this.resolvedMode() === 'inline')
|
|
291
|
+
return true;
|
|
292
|
+
const mount = this.resolvedMount();
|
|
293
|
+
if (mount === 'eager')
|
|
294
|
+
return true;
|
|
295
|
+
if (mount === 'lazy')
|
|
296
|
+
return this.seen();
|
|
297
|
+
return this.status() !== 'unmounted';
|
|
298
|
+
}, /* @ts-ignore */
|
|
299
|
+
...(ngDevMode ? [{ debugName: "mounted" }] : /* istanbul ignore next */ []));
|
|
300
|
+
/** What the stylesheet keys on, which is a frame behind what was asked. */
|
|
301
|
+
visible = computed(() => this.resolvedMode() === 'inline' ? this.open() : this.status() === 'open', /* @ts-ignore */
|
|
302
|
+
...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
|
|
303
|
+
/**
|
|
304
|
+
* Whether the layer takes focus and the pointer. `entering` counts: the
|
|
305
|
+
* focus scope enters in that frame, and a layer still `inert` then refuses
|
|
306
|
+
* the initial focus and leaves it on `body`.
|
|
307
|
+
*/
|
|
308
|
+
interactive = computed(() => {
|
|
309
|
+
if (this.resolvedMode() === 'inline')
|
|
310
|
+
return this.open();
|
|
311
|
+
const status = this.status();
|
|
312
|
+
return status === 'entering' || status === 'open';
|
|
313
|
+
}, /* @ts-ignore */
|
|
314
|
+
...(ngDevMode ? [{ debugName: "interactive" }] : /* istanbul ignore next */ []));
|
|
315
|
+
/**
|
|
316
|
+
* The scrim belongs to the layer, not to the dismissal policy: `modal`
|
|
317
|
+
* decides what happens to the page behind it and never what is painted.
|
|
318
|
+
* `dialog` draws it the same way, and a consumer who wants none sets
|
|
319
|
+
* `--slotted-drawer-scrim: transparent`.
|
|
320
|
+
*/
|
|
321
|
+
showBackdrop = computed(() => this.resolvedMode() === 'overlay', /* @ts-ignore */
|
|
322
|
+
...(ngDevMode ? [{ debugName: "showBackdrop" }] : /* istanbul ignore next */ []));
|
|
323
|
+
extentLength = computed(() => this.measured(), /* @ts-ignore */
|
|
324
|
+
...(ngDevMode ? [{ debugName: "extentLength" }] : /* istanbul ignore next */ []));
|
|
325
|
+
labelledBy = computed(() => this.hasTitle() && this.writtenLabel === null ? this.titleId : null, /* @ts-ignore */
|
|
326
|
+
...(ngDevMode ? [{ debugName: "labelledBy" }] : /* istanbul ignore next */ []));
|
|
327
|
+
describedBy = computed(() => this.hasDescription() ? this.descriptionId : null, /* @ts-ignore */
|
|
328
|
+
...(ngDevMode ? [{ debugName: "describedBy" }] : /* istanbul ignore next */ []));
|
|
329
|
+
label = computed(() => this.writtenLabel, /* @ts-ignore */
|
|
330
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
331
|
+
/**
|
|
332
|
+
* Under `inline` the panel is a region of the page rather than a window over
|
|
333
|
+
* it, so it writes no role: a navigation drawer is a navigation landmark and
|
|
334
|
+
* a filter panel is complementary, and a family that cannot know which one
|
|
335
|
+
* guesses wrong half the time. A consumer names it on their own element.
|
|
336
|
+
*/
|
|
337
|
+
role = computed(() => (this.resolvedMode() === 'overlay' ? 'dialog' : null), /* @ts-ignore */
|
|
338
|
+
...(ngDevMode ? [{ debugName: "role" }] : /* istanbul ignore next */ []));
|
|
339
|
+
portal = null;
|
|
340
|
+
layer = null;
|
|
341
|
+
scope = null;
|
|
342
|
+
/**
|
|
343
|
+
* What the consumer's own binding said before the reader moved anything.
|
|
344
|
+
*
|
|
345
|
+
* Read in `ngOnInit` and not in the field initializer: Angular creates every
|
|
346
|
+
* directive in a template before it binds any input, so a measure read at
|
|
347
|
+
* construction is always the model's own default and never the consumer's.
|
|
348
|
+
*/
|
|
349
|
+
initialExtent = undefined;
|
|
350
|
+
ngOnInit() {
|
|
351
|
+
this.initialExtent = this.extent();
|
|
352
|
+
}
|
|
353
|
+
constructor() {
|
|
354
|
+
effect(() => {
|
|
355
|
+
if (this.open())
|
|
356
|
+
this.seen.set(true);
|
|
357
|
+
this.presence.sync(this.open());
|
|
358
|
+
});
|
|
359
|
+
/* A sheet closed by a drag keeps the hand's position through its exit, so
|
|
360
|
+
it slides from there; opening again starts from rest. */
|
|
361
|
+
effect(() => {
|
|
362
|
+
if (this.open())
|
|
363
|
+
untracked(() => this.live.set(null));
|
|
364
|
+
});
|
|
365
|
+
/** Where an overlay layer lives, for as long as it is in the document. */
|
|
366
|
+
effect(() => {
|
|
367
|
+
const node = this.layerRef()?.nativeElement ?? null;
|
|
368
|
+
this.presence.setNode(node);
|
|
369
|
+
if (node === null || this.resolvedMode() === 'inline') {
|
|
370
|
+
this.releasePortal();
|
|
371
|
+
return;
|
|
372
|
+
}
|
|
373
|
+
if (this.portal !== null)
|
|
374
|
+
return;
|
|
375
|
+
const named = this.container();
|
|
376
|
+
this.portal = createPortalRoot({
|
|
377
|
+
origin: this.origin,
|
|
378
|
+
...(named === undefined ? {} : { container: named }),
|
|
379
|
+
});
|
|
380
|
+
this.portal.container?.append(node);
|
|
381
|
+
});
|
|
382
|
+
/**
|
|
383
|
+
* The measure as a length the stylesheet can use. The public value is a
|
|
384
|
+
* fraction; a percentage would not do, because under `inline` the drawer is
|
|
385
|
+
* the box being sized and a percentage of its own containing block resolves
|
|
386
|
+
* against a track whose size depends on it. The observer is what keeps the
|
|
387
|
+
* pixels and the fraction in step when the window changes.
|
|
388
|
+
*/
|
|
389
|
+
effect((onCleanup) => {
|
|
390
|
+
const box = this.measuringBox();
|
|
391
|
+
const fraction = this.currentExtent();
|
|
392
|
+
const inline = isInlineSide(this.resolvedSide());
|
|
393
|
+
if (box === null || fraction === undefined || !this.browser) {
|
|
394
|
+
this.measured.set(null);
|
|
395
|
+
return;
|
|
396
|
+
}
|
|
397
|
+
const measure = () => {
|
|
398
|
+
const rect = box.getBoundingClientRect();
|
|
399
|
+
const span = inline ? rect.width : rect.height;
|
|
400
|
+
if (span > 0)
|
|
401
|
+
this.measured.set(`${Math.round(fraction * span)}px`);
|
|
402
|
+
};
|
|
403
|
+
measure();
|
|
404
|
+
if (typeof ResizeObserver === 'undefined')
|
|
405
|
+
return;
|
|
406
|
+
const observer = new ResizeObserver(measure);
|
|
407
|
+
observer.observe(box);
|
|
408
|
+
onCleanup(() => observer.disconnect());
|
|
409
|
+
});
|
|
410
|
+
/**
|
|
411
|
+
* Everything the drawer does while it is open, taken down when it closes
|
|
412
|
+
* rather than when the node leaves — `presence` keeps the node mounted
|
|
413
|
+
* through the exit, and a layer still holding the scroll lock and the
|
|
414
|
+
* background's `inert` for those milliseconds is a page nobody can touch.
|
|
415
|
+
*
|
|
416
|
+
* An inline drawer composes neither the layer nor containment: it is a box
|
|
417
|
+
* in the page, nothing is inert and nothing is contained. It still enters a
|
|
418
|
+
* focus scope, because the scope is what returns focus to the trigger when
|
|
419
|
+
* a panel the reader is standing in closes underneath them.
|
|
420
|
+
*/
|
|
421
|
+
effect((onCleanup) => {
|
|
422
|
+
const node = this.layerRef()?.nativeElement;
|
|
423
|
+
const panel = this.panelRef()?.nativeElement;
|
|
424
|
+
if (!this.open() || node === undefined || panel === undefined)
|
|
425
|
+
return;
|
|
426
|
+
const overlay = this.resolvedMode() === 'overlay';
|
|
427
|
+
const escape = this.resolvedEscape() === 'close';
|
|
428
|
+
const outsidePress = this.resolvedOutsidePress() === 'close';
|
|
429
|
+
const modal = this.resolvedModal();
|
|
430
|
+
/* A history entry is a modal layer's: a layer the page stays reachable
|
|
431
|
+
under has no claim on the way back. */
|
|
432
|
+
const back = modal && this.resolvedBack() === 'close';
|
|
433
|
+
const trigger = this.triggerNode();
|
|
434
|
+
if (overlay) {
|
|
435
|
+
/* The panel is what a press is inside of; the scrim is the way out, on
|
|
436
|
+
the click rather than the pointerdown so a selection dragged out of
|
|
437
|
+
the panel is not a press on the scrim. */
|
|
438
|
+
this.layer = createDismissableLayer(node, {
|
|
439
|
+
back,
|
|
440
|
+
branches: trigger === null ? [] : [trigger],
|
|
441
|
+
content: panel,
|
|
442
|
+
escape,
|
|
443
|
+
modal,
|
|
444
|
+
onDismiss: (request) => {
|
|
445
|
+
if (request.reason === 'outsidePress' && !outsidePress)
|
|
446
|
+
return request.cancel();
|
|
447
|
+
this.request(false, request.reason, undefined, request.source);
|
|
448
|
+
},
|
|
449
|
+
outsidePress,
|
|
450
|
+
outsidePressEvent: 'click',
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
const wanted = this.initialFocus() ?? 'first';
|
|
454
|
+
const returnTo = this.finalFocus();
|
|
455
|
+
/**
|
|
456
|
+
* Where focus goes back to with no `finalFocus`: what held it when the
|
|
457
|
+
* drawer opened, or the trigger when that was nothing. A click does not
|
|
458
|
+
* focus a button in Safari, so a drawer opened from its trigger there
|
|
459
|
+
* had `body` as its origin and gave focus back to nowhere.
|
|
460
|
+
*/
|
|
461
|
+
const origin = panel.ownerDocument.activeElement;
|
|
462
|
+
const originParent = origin?.parentElement ?? null;
|
|
463
|
+
const fallback = () => {
|
|
464
|
+
if (origin === null || origin === origin.ownerDocument.body)
|
|
465
|
+
return this.triggerNode();
|
|
466
|
+
if (origin.isConnected)
|
|
467
|
+
return origin;
|
|
468
|
+
/* The row the drawer was opened from has gone: its nearest ancestor
|
|
469
|
+
that is still in the document, as the contract's restore rule says. */
|
|
470
|
+
let node = originParent;
|
|
471
|
+
while (node !== null && !node.isConnected)
|
|
472
|
+
node = node.parentElement;
|
|
473
|
+
return node;
|
|
474
|
+
};
|
|
475
|
+
this.scope = createFocusScope(panel, {
|
|
476
|
+
contain: overlay && modal,
|
|
477
|
+
initial: !overlay ? false : wanted instanceof HTMLElement ? () => wanted : wanted,
|
|
478
|
+
restore: returnTo === undefined ? fallback : returnTo === false ? false : () => returnTo,
|
|
479
|
+
});
|
|
480
|
+
this.scope.enter();
|
|
481
|
+
onCleanup(() => {
|
|
482
|
+
/* The layer first: while it stands, a modal layer keeps every sibling
|
|
483
|
+
up to the root `inert`, and focus given back to a trigger there is
|
|
484
|
+
refused — the reader lands on `body`. */
|
|
485
|
+
this.layer?.destroy();
|
|
486
|
+
this.layer = null;
|
|
487
|
+
this.scope?.destroy();
|
|
488
|
+
this.scope = null;
|
|
489
|
+
this.closed.emit(this.result());
|
|
490
|
+
this.result.set(undefined);
|
|
491
|
+
});
|
|
492
|
+
});
|
|
493
|
+
/**
|
|
494
|
+
* What the panel measures at rest, as a fraction, while nothing has moved
|
|
495
|
+
* it. It is what the separator reports and what `scrimFrom` compares
|
|
496
|
+
* against, and content that arrives while the sheet is open moves it, so it
|
|
497
|
+
* is observed rather than read once.
|
|
498
|
+
*/
|
|
499
|
+
effect((onCleanup) => {
|
|
500
|
+
const box = this.measuringBox();
|
|
501
|
+
const panel = this.panelRef()?.nativeElement;
|
|
502
|
+
if (!this.browser ||
|
|
503
|
+
box === null ||
|
|
504
|
+
panel === undefined ||
|
|
505
|
+
!this.open() ||
|
|
506
|
+
this.extent() !== undefined ||
|
|
507
|
+
this.live() !== null) {
|
|
508
|
+
return;
|
|
509
|
+
}
|
|
510
|
+
const inline = isInlineSide(this.resolvedSide());
|
|
511
|
+
const read = () => {
|
|
512
|
+
const rect = box.getBoundingClientRect();
|
|
513
|
+
const span = inline ? rect.width : rect.height;
|
|
514
|
+
if (span <= 0)
|
|
515
|
+
return;
|
|
516
|
+
const own = inline ? panel.offsetWidth : panel.offsetHeight;
|
|
517
|
+
this.rest.set(Math.round((own / span) * 1000) / 1000);
|
|
518
|
+
};
|
|
519
|
+
read();
|
|
520
|
+
if (typeof ResizeObserver === 'undefined')
|
|
521
|
+
return;
|
|
522
|
+
const observer = new ResizeObserver(read);
|
|
523
|
+
observer.observe(panel);
|
|
524
|
+
observer.observe(box);
|
|
525
|
+
onCleanup(() => observer.disconnect());
|
|
526
|
+
});
|
|
527
|
+
/**
|
|
528
|
+
* The virtual keyboard. The layer recedes by what it covers, so the panel
|
|
529
|
+
* lands above the keys; `@slotted/core/measure` reads it from the visual
|
|
530
|
+
* viewport.
|
|
531
|
+
*/
|
|
532
|
+
effect((onCleanup) => {
|
|
533
|
+
const node = this.layerRef()?.nativeElement;
|
|
534
|
+
if (node === undefined || !this.open() || this.resolvedMode() !== 'overlay')
|
|
535
|
+
return;
|
|
536
|
+
const stop = observeKeyboardInset(node.ownerDocument.defaultView, (pixels) => {
|
|
537
|
+
if (pixels === 0)
|
|
538
|
+
node.style.removeProperty('--slotted-keyboard-inset');
|
|
539
|
+
else
|
|
540
|
+
node.style.setProperty('--slotted-keyboard-inset', `${pixels}px`);
|
|
541
|
+
});
|
|
542
|
+
onCleanup(() => {
|
|
543
|
+
stop();
|
|
544
|
+
node.style.removeProperty('--slotted-keyboard-inset');
|
|
545
|
+
});
|
|
546
|
+
});
|
|
547
|
+
/**
|
|
548
|
+
* The body of a sheet from the bottom moves it under a touch, and hands the
|
|
549
|
+
* gesture to the scroll of what it holds when that is what it is —
|
|
550
|
+
* `attachSheetDrag` decides which. The request is made once, on release,
|
|
551
|
+
* and the hand's position lives in `live` until then.
|
|
552
|
+
*/
|
|
553
|
+
effect((onCleanup) => {
|
|
554
|
+
const node = this.layerRef()?.nativeElement;
|
|
555
|
+
const panel = this.panelRef()?.nativeElement;
|
|
556
|
+
if (node === undefined ||
|
|
557
|
+
panel === undefined ||
|
|
558
|
+
!this.open() ||
|
|
559
|
+
!this.sheet() ||
|
|
560
|
+
this.resolvedDrag() !== 'panel') {
|
|
561
|
+
return;
|
|
562
|
+
}
|
|
563
|
+
let span = 0;
|
|
564
|
+
let start = 0;
|
|
565
|
+
let last = 0;
|
|
566
|
+
let measured = {
|
|
567
|
+
rest: undefined,
|
|
568
|
+
stops: [],
|
|
569
|
+
};
|
|
570
|
+
const now = () => {
|
|
571
|
+
span = node.getBoundingClientRect().height;
|
|
572
|
+
return span > 0 ? panel.offsetHeight / span : 0;
|
|
573
|
+
};
|
|
574
|
+
onCleanup(attachSheetDrag(panel, {
|
|
575
|
+
enabled: () => this.open(),
|
|
576
|
+
canGrow: () => {
|
|
577
|
+
const at = now();
|
|
578
|
+
const top = this.measureStops(panel, span).stops.at(-1);
|
|
579
|
+
return top !== undefined && at < top && !sameStop(at, top);
|
|
580
|
+
},
|
|
581
|
+
onStart: () => {
|
|
582
|
+
start = now();
|
|
583
|
+
last = start;
|
|
584
|
+
measured = this.measureStops(panel, span);
|
|
585
|
+
this.dragging.set(true);
|
|
586
|
+
this.live.set(start);
|
|
587
|
+
},
|
|
588
|
+
onMove: (distance) => {
|
|
589
|
+
if (span <= 0)
|
|
590
|
+
return;
|
|
591
|
+
last = Math.max(0, start + distance / span);
|
|
592
|
+
this.live.set(dampenExtent(last, measured.stops.at(-1) ?? start));
|
|
593
|
+
},
|
|
594
|
+
onEnd: (velocity) => {
|
|
595
|
+
this.dragging.set(false);
|
|
596
|
+
const landed = settleExtent({
|
|
597
|
+
fraction: Math.min(last, measured.stops.at(-1) ?? last),
|
|
598
|
+
span,
|
|
599
|
+
stops: measured.stops,
|
|
600
|
+
velocity: span > 0 ? velocity / span : 0,
|
|
601
|
+
});
|
|
602
|
+
if (landed === 'close') {
|
|
603
|
+
/* The panel stays where the hand left it, so the exit slides from
|
|
604
|
+
there; a close the consumer refused puts it back. */
|
|
605
|
+
this.request(false, 'pointer', undefined, null);
|
|
606
|
+
if (this.open())
|
|
607
|
+
this.live.set(null);
|
|
608
|
+
return;
|
|
609
|
+
}
|
|
610
|
+
this.live.set(null);
|
|
611
|
+
this.requestExtent(this.asRequest(landed, measured.rest), 'pointer', null);
|
|
612
|
+
},
|
|
613
|
+
}));
|
|
614
|
+
});
|
|
615
|
+
this.destroyRef.onDestroy(() => {
|
|
616
|
+
this.scope?.destroy();
|
|
617
|
+
this.layer?.destroy();
|
|
618
|
+
this.presence.destroy();
|
|
619
|
+
this.releasePortal();
|
|
620
|
+
});
|
|
621
|
+
}
|
|
622
|
+
/** The stops a sheet rests on and the rest among them, measured now. */
|
|
623
|
+
measureStops(panel, span) {
|
|
624
|
+
return measureSheetStops({
|
|
625
|
+
atRest: this.extent() === undefined && this.live() === null,
|
|
626
|
+
content: this.resolvedSize() === 'content',
|
|
627
|
+
panel,
|
|
628
|
+
reserve: CONTENT_RESERVE,
|
|
629
|
+
rest: this.rest(),
|
|
630
|
+
snapPoints: this.snapPoints(),
|
|
631
|
+
span,
|
|
632
|
+
});
|
|
633
|
+
}
|
|
634
|
+
/**
|
|
635
|
+
* What a settled fraction is asked as: the content stop is `undefined`, so
|
|
636
|
+
* the sheet follows its content again when the content grows.
|
|
637
|
+
*/
|
|
638
|
+
asRequest(fraction, rest) {
|
|
639
|
+
return stopAsExtent(fraction, rest, this.resolvedSize() === 'content');
|
|
640
|
+
}
|
|
641
|
+
/**
|
|
642
|
+
* The box the panel's measure is a fraction of: the layer under `overlay`,
|
|
643
|
+
* which is fixed to the viewport, and the drawer's own parent under `inline`,
|
|
644
|
+
* where the drawer is what is being sized and cannot measure itself.
|
|
645
|
+
*/
|
|
646
|
+
measuringBox() {
|
|
647
|
+
const node = this.layerRef()?.nativeElement ?? null;
|
|
648
|
+
if (node === null)
|
|
649
|
+
return null;
|
|
650
|
+
/* Under `inline` the layer's parent is the host, which renders
|
|
651
|
+
`display: contents` and lays nothing out: the box is the host's own
|
|
652
|
+
parent, the consumer's layout. */
|
|
653
|
+
return this.resolvedMode() === 'inline' ? this.host.parentElement : node;
|
|
654
|
+
}
|
|
655
|
+
/**
|
|
656
|
+
* The layer element is given back to the host before the portal goes, so
|
|
657
|
+
* Angular removes a node that is where its own view expects it to be.
|
|
658
|
+
*/
|
|
659
|
+
releasePortal() {
|
|
660
|
+
if (this.portal === null)
|
|
661
|
+
return;
|
|
662
|
+
const node = this.layerRef()?.nativeElement;
|
|
663
|
+
if (node !== undefined)
|
|
664
|
+
this.host.append(node);
|
|
665
|
+
this.portal.release();
|
|
666
|
+
this.portal = null;
|
|
667
|
+
}
|
|
668
|
+
/** Asks to open or close, carrying the reason, the result and the event. */
|
|
669
|
+
request(next, reason, result, source) {
|
|
670
|
+
if (next === this.open())
|
|
671
|
+
return;
|
|
672
|
+
let cancelled = false;
|
|
673
|
+
const state = createControllable({
|
|
674
|
+
initial: this.open(),
|
|
675
|
+
onRequest: (raw) => {
|
|
676
|
+
cancelled = raw.cancelled;
|
|
677
|
+
this.openChangeRequest.emit({
|
|
678
|
+
cancel: () => raw.cancel(),
|
|
679
|
+
get cancelled() {
|
|
680
|
+
return raw.cancelled;
|
|
681
|
+
},
|
|
682
|
+
previous: raw.previous,
|
|
683
|
+
reason,
|
|
684
|
+
result,
|
|
685
|
+
source: raw.source,
|
|
686
|
+
value: raw.value,
|
|
687
|
+
});
|
|
688
|
+
},
|
|
689
|
+
});
|
|
690
|
+
if (!state.request(next, reason, source) || cancelled)
|
|
691
|
+
return;
|
|
692
|
+
if (!next)
|
|
693
|
+
this.result.set(result);
|
|
694
|
+
this.open.set(next);
|
|
695
|
+
}
|
|
696
|
+
/**
|
|
697
|
+
* Asks to move the measure. While the pointer is down the floor is not
|
|
698
|
+
* enforced — a sheet the reader is pulling down has to follow the hand — and
|
|
699
|
+
* the separator decides on release whether that means a smaller panel or a
|
|
700
|
+
* closed one.
|
|
701
|
+
*/
|
|
702
|
+
requestExtent(next, reason, source) {
|
|
703
|
+
/* `undefined` travels whole: it is the panel back on its size step, and a
|
|
704
|
+
clamp of it would be a clamp of a value that is not a fraction. */
|
|
705
|
+
const wanted = next === undefined ? undefined : clamp(next, 0, this.bounds().max);
|
|
706
|
+
if (wanted === this.extent())
|
|
707
|
+
return;
|
|
708
|
+
let cancelled = false;
|
|
709
|
+
const state = createControllable({
|
|
710
|
+
/* `undefined` is a value of this state — the panel on its size step —
|
|
711
|
+
and not a gap to fill: a floor standing in for it made a request for
|
|
712
|
+
the floor from the content stop look like no change at all. */
|
|
713
|
+
initial: this.extent(),
|
|
714
|
+
onRequest: (raw) => {
|
|
715
|
+
cancelled = raw.cancelled;
|
|
716
|
+
this.extentChangeRequest.emit({
|
|
717
|
+
cancel: () => raw.cancel(),
|
|
718
|
+
get cancelled() {
|
|
719
|
+
return raw.cancelled;
|
|
720
|
+
},
|
|
721
|
+
previous: raw.previous,
|
|
722
|
+
reason,
|
|
723
|
+
source: raw.source,
|
|
724
|
+
value: raw.value,
|
|
725
|
+
});
|
|
726
|
+
},
|
|
727
|
+
});
|
|
728
|
+
if (!state.request(wanted, reason, source) || cancelled)
|
|
729
|
+
return;
|
|
730
|
+
this.extent.set(wanted);
|
|
731
|
+
}
|
|
732
|
+
/**
|
|
733
|
+
* Back to the measure the size step gives it, which is where the panel
|
|
734
|
+
* started. Angular has one model rather than a controlled and an
|
|
735
|
+
* uncontrolled input, so the measure to restore is the one the model held
|
|
736
|
+
* before anything moved it, read once.
|
|
737
|
+
*/
|
|
738
|
+
restoreExtent(reason, source) {
|
|
739
|
+
this.requestExtent(this.initialExtent, reason, source);
|
|
740
|
+
}
|
|
741
|
+
/** Opens the drawer from code, carrying `programmatic`. */
|
|
742
|
+
openDrawer() {
|
|
743
|
+
this.request(true, 'programmatic', undefined, undefined);
|
|
744
|
+
}
|
|
745
|
+
/** Closes it from code, carrying `programmatic` and the result given. */
|
|
746
|
+
close(result) {
|
|
747
|
+
this.request(false, 'programmatic', result, undefined);
|
|
748
|
+
}
|
|
749
|
+
/**
|
|
750
|
+
* The panel, once it is in the document — what React's handle calls
|
|
751
|
+
* `panel`. A family that composes the drawer reads it to hand the panel a
|
|
752
|
+
* value only it knows, as `action-sheet` hands it its measure.
|
|
753
|
+
*/
|
|
754
|
+
get panel() {
|
|
755
|
+
return this.panelRef()?.nativeElement ?? null;
|
|
756
|
+
}
|
|
757
|
+
/** Moves focus into the panel, as opening an overlay drawer does. */
|
|
758
|
+
focus() {
|
|
759
|
+
this.panelRef()?.nativeElement.focus();
|
|
760
|
+
}
|
|
761
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlDrawer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
762
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: SlDrawer, isStandalone: true, selector: "sl-drawer", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, extent: { classPropertyName: "extent", publicName: "extent", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, mount: { classPropertyName: "mount", publicName: "mount", isSignal: true, isRequired: false, transformFunction: null }, escape: { classPropertyName: "escape", publicName: "escape", isSignal: true, isRequired: false, transformFunction: null }, outsidePress: { classPropertyName: "outsidePress", publicName: "outsidePress", isSignal: true, isRequired: false, transformFunction: null }, back: { classPropertyName: "back", publicName: "back", isSignal: true, isRequired: false, transformFunction: null }, modal: { classPropertyName: "modal", publicName: "modal", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, messages: { classPropertyName: "messages", publicName: "messages", isSignal: true, isRequired: false, transformFunction: null }, drag: { classPropertyName: "drag", publicName: "drag", isSignal: true, isRequired: false, transformFunction: null }, scrimFrom: { classPropertyName: "scrimFrom", publicName: "scrimFrom", isSignal: true, isRequired: false, transformFunction: null }, minExtent: { classPropertyName: "minExtent", publicName: "minExtent", isSignal: true, isRequired: false, transformFunction: null }, maxExtent: { classPropertyName: "maxExtent", publicName: "maxExtent", isSignal: true, isRequired: false, transformFunction: null }, snapPoints: { classPropertyName: "snapPoints", publicName: "snapPoints", isSignal: true, isRequired: false, transformFunction: null }, container: { classPropertyName: "container", publicName: "container", isSignal: true, isRequired: false, transformFunction: null }, initialFocus: { classPropertyName: "initialFocus", publicName: "initialFocus", isSignal: true, isRequired: false, transformFunction: null }, finalFocus: { classPropertyName: "finalFocus", publicName: "finalFocus", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", extent: "extentChange", openChangeRequest: "openChangeRequest", extentChangeRequest: "extentChangeRequest", closed: "closed" }, host: { properties: { "style.display": "'contents'" } }, viewQueries: [{ propertyName: "layerRef", first: true, predicate: ["layer"], descendants: true, isSignal: true }, { propertyName: "panelRef", first: true, predicate: ["panel"], descendants: true, isSignal: true }], exportAs: ["slDrawer"], ngImport: i0, template: `
|
|
763
|
+
@if (mounted()) {
|
|
764
|
+
<div
|
|
765
|
+
#layer
|
|
766
|
+
data-ui="drawer"
|
|
767
|
+
data-part="root"
|
|
768
|
+
[attr.data-mode]="resolvedMode()"
|
|
769
|
+
[attr.data-side]="resolvedSide()"
|
|
770
|
+
[attr.data-size]="resolvedSize()"
|
|
771
|
+
[attr.data-mount]="resolvedMount()"
|
|
772
|
+
[attr.data-modal]="resolvedModal() ? '' : null"
|
|
773
|
+
[attr.data-open]="visible() ? '' : null"
|
|
774
|
+
[attr.data-loading]="loading() ? '' : null"
|
|
775
|
+
[attr.data-dragging]="dragging() ? '' : null"
|
|
776
|
+
[attr.data-drag]="sheet() ? resolvedDrag() : null"
|
|
777
|
+
[attr.data-undimmed]="undimmed() ? '' : null"
|
|
778
|
+
[attr.inert]="interactive() ? null : ''"
|
|
779
|
+
[style.--slotted-drawer-extent]="extentLength()"
|
|
780
|
+
>
|
|
781
|
+
@if (showBackdrop()) {
|
|
782
|
+
<div data-part="backdrop"></div>
|
|
783
|
+
}
|
|
784
|
+
<div
|
|
785
|
+
#panel
|
|
786
|
+
data-part="panel"
|
|
787
|
+
[id]="panelId"
|
|
788
|
+
[attr.role]="role()"
|
|
789
|
+
[attr.aria-modal]="resolvedModal() ? 'true' : null"
|
|
790
|
+
[attr.aria-label]="label()"
|
|
791
|
+
[attr.aria-labelledby]="labelledBy()"
|
|
792
|
+
[attr.aria-describedby]="describedBy()"
|
|
793
|
+
>
|
|
794
|
+
<ng-content />
|
|
795
|
+
</div>
|
|
796
|
+
</div>
|
|
797
|
+
}
|
|
798
|
+
`, isInline: true, styles: ["@layer slotted.components{[data-ui=drawer]{--_step: var(--slotted-drawer-extent-md, 24rem);--_extent: var(--slotted-drawer-extent, var(--_step));--_padding-inline: var(--slotted-space-7, 1.25rem);--_padding-block: var(--slotted-space-6, 1rem);--_gap: var(--slotted-space-5, .75rem);--_rule-size: var(--slotted-border-width-thin, 1px);--_title-font-size: var(--slotted-font-size-lg, 1rem);--_description-font-size: var(--slotted-font-size-md, .875rem);--_body-font-size: var(--slotted-font-size-md, .875rem);--_icon-size: var(--slotted-control-icon-size-md, 16px);--_inner-size: var(--slotted-control-inner-size-md, 24px);--_close-size: max( var(--slotted-target-min, 24px), min(calc(var(--_icon-size) + 2 * var(--slotted-space-2, .25rem)), var(--_inner-size)) );--_resizer-thickness: var(--slotted-space-6, 1rem);--_resizer-reach: var(--slotted-target-min, 24px);--_resizer-line: var(--slotted-border-width-thick, 2px);--_radius: var(--slotted-radius-lg, 8px);--_slide: var(--slotted-duration-long) var(--slotted-easing-enter);--_move: var(--slotted-duration-medium) var(--slotted-easing-enter);--_reveal: content-visibility var(--slotted-duration-medium) allow-discrete;box-sizing:border-box;display:grid;grid-template:minmax(0,1fr) / minmax(0,1fr);color:var(--slotted-drawer-color, var(--slotted-text, CanvasText));font-family:var(--slotted-control-font-family, var(--slotted-font-family-sans));content-visibility:visible;transition:var(--_reveal)}[data-ui=drawer]:not([data-open]){--_slide: var(--slotted-duration-medium) var(--slotted-easing-exit);--_move: var(--slotted-duration-medium) var(--slotted-easing-exit)}[data-ui=drawer][data-dragging]{--_move: var(--slotted-duration-instant) var(--slotted-easing-standard)}[data-ui=drawer][data-size=sm]{--_step: var(--slotted-drawer-extent-sm, 18rem);--_padding-inline: var(--slotted-space-6, 1rem)}[data-ui=drawer][data-size=lg]{--_step: var(--slotted-drawer-extent-lg, 30rem)}[data-ui=drawer][data-size=xl]{--_step: var(--slotted-drawer-extent-xl, 40rem);--_padding-inline: var(--slotted-space-8, 1.5rem);--_title-font-size: var(--slotted-font-size-xl, 1.125rem)}[data-ui=drawer][data-size=full]{--_step: 100%}[data-ui=drawer][data-mode=overlay]{position:fixed;inset:0;z-index:calc(var(--slotted-z-index-overlay, 1000) + var(--slotted-layer-depth, 0))}[data-ui=drawer][data-mode=inline]{overflow:clip}[data-ui=drawer][data-mode=inline][data-side=start],[data-ui=drawer][data-mode=inline][data-side=end]{inline-size:0;transition:inline-size var(--_move),var(--_reveal)}[data-ui=drawer][data-mode=inline][data-side=top],[data-ui=drawer][data-mode=inline][data-side=bottom]{block-size:0;transition:block-size var(--_move),var(--_reveal)}[data-ui=drawer][data-mode=inline][data-open][data-side=start],[data-ui=drawer][data-mode=inline][data-open][data-side=end]{inline-size:var(--_extent);max-inline-size:100%}[data-ui=drawer][data-mode=inline][data-open][data-side=top],[data-ui=drawer][data-mode=inline][data-open][data-side=bottom]{block-size:var(--_extent);max-block-size:100%}[data-ui=drawer][inert]{content-visibility:hidden;pointer-events:none}[data-ui=drawer]>[data-part=backdrop]{grid-area:1 / 1;background:var(--slotted-drawer-scrim, var(--slotted-scrim, Canvas));opacity:0;transition:opacity var(--slotted-duration-short) var(--slotted-easing-exit)}[data-ui=drawer][data-open]>[data-part=backdrop]{opacity:1;transition:opacity var(--slotted-duration-long) var(--slotted-easing-standard)}[data-ui=drawer]>[data-part=panel]{grid-area:1 / 1;box-sizing:border-box;transition:inline-size var(--_move),block-size var(--_move);position:relative;display:grid;grid-template-columns:minmax(0,1fr);min-inline-size:0;min-block-size:0;--_row-padding-inline-start: var(--_padding-inline);--_row-padding-inline-end: var(--_padding-inline);background:var(--slotted-drawer-surface, var(--slotted-surface-raised, Canvas));border-color:var(--slotted-drawer-border-color, var(--slotted-border-subtle, ButtonBorder));border-style:solid;border-width:0;overflow:hidden}[data-ui=drawer][data-mode=overlay]>[data-part=panel]{box-shadow:var(--slotted-shadow-lg);translate:0 0;transition:translate var(--_slide),inline-size var(--_move),block-size var(--_move)}[data-ui=drawer][data-mode=overlay]:not([data-open])>[data-part=panel]{translate:var(--_shift-x, 0) var(--_shift-y, 0)}[data-ui=drawer][data-dragging]>[data-part=panel]{transition:none}[data-ui=drawer][data-dragging][data-mode=overlay]>[data-part=panel]{transition:translate var(--_slide)}[data-ui=drawer][data-dragging][data-mode=inline][data-side=start],[data-ui=drawer][data-dragging][data-mode=inline][data-side=end],[data-ui=drawer][data-dragging][data-mode=inline][data-side=top],[data-ui=drawer][data-dragging][data-mode=inline][data-side=bottom]{transition:var(--_reveal)}@media(prefers-reduced-motion:reduce){[data-ui=drawer][data-mode=overlay]>[data-part=panel]{translate:0 0;transition:inline-size var(--_move),block-size var(--_move)}}[data-ui=drawer][data-side=start]>[data-part=panel],[data-ui=drawer][data-side=end]>[data-part=panel]{align-self:stretch;inline-size:min(var(--_extent),100%);grid-template-rows:auto minmax(0,1fr) auto}[data-ui=drawer][data-side=top]>[data-part=panel],[data-ui=drawer][data-side=bottom]>[data-part=panel]{justify-self:stretch;block-size:min(var(--_extent),100%)}[data-ui=drawer][data-side=start]>[data-part=panel]{justify-self:start;--_shift-x: -100%;--_row-padding-inline-end: max(var(--_padding-inline), var(--_resizer-thickness));border-inline-end-width:var(--_rule-size)}[data-ui=drawer][data-side=end]>[data-part=panel]{justify-self:end;--_shift-x: 100%;--_row-padding-inline-start: max(var(--_padding-inline), var(--_resizer-thickness));border-inline-start-width:var(--_rule-size)}[data-ui=drawer][data-side=top]>[data-part=panel]{align-self:start;grid-template-rows:auto minmax(0,1fr) auto auto;--_shift-y: -100%;border-block-end-width:var(--_rule-size);border-end-start-radius:var(--slotted-drawer-radius, var(--_radius));border-end-end-radius:var(--slotted-drawer-radius, var(--_radius))}[data-ui=drawer][data-side=bottom]>[data-part=panel]{align-self:end;grid-template-rows:auto auto minmax(0,1fr) auto;--_shift-y: 100%;border-block-start-width:var(--_rule-size);border-start-start-radius:var(--slotted-drawer-radius, var(--_radius));border-start-end-radius:var(--slotted-drawer-radius, var(--_radius))}[data-ui=drawer][data-side=bottom]>[data-part=panel]>[data-part=header]{grid-row:2}[data-ui=drawer][data-side=bottom]>[data-part=panel]>[data-part=body]{grid-row:3}[data-ui=drawer][data-side=bottom]>[data-part=panel]>[data-part=footer]{grid-row:4}[data-ui=drawer][data-mode=overlay][data-side=top]>[data-part=panel],[data-ui=drawer][data-mode=overlay][data-side=bottom]>[data-part=panel]{justify-self:center;inline-size:min(100%,var(--slotted-drawer-sheet-inline-size, var(--slotted-drawer-extent-xl, 40rem)));border-inline-width:var(--_rule-size)}[data-ui=drawer][data-size=content]{--_step: auto;--_content-cap: min( var(--slotted-drawer-extent, calc(100% - var(--slotted-space-12, 4rem))), 100% );interpolate-size:allow-keywords}[data-ui=drawer][data-size=content][data-side=start],[data-ui=drawer][data-size=content][data-side=end]{--_step: max-content}[data-ui=drawer][data-size=content][data-side=start]>[data-part=panel],[data-ui=drawer][data-size=content][data-side=end]>[data-part=panel]{inline-size:var(--_extent);max-inline-size:var(--_content-cap)}[data-ui=drawer][data-size=content][data-side=top]>[data-part=panel],[data-ui=drawer][data-size=content][data-side=bottom]>[data-part=panel]{block-size:var(--_extent);max-block-size:var(--_content-cap)}[data-ui=drawer][data-mode=overlay]{padding-block-end:var(--slotted-keyboard-inset, 0px)}[data-ui=drawer][data-undimmed]>[data-part=backdrop]{opacity:0;pointer-events:none}[data-ui=drawer][data-undimmed]{pointer-events:none}[data-ui=drawer][data-undimmed]>[data-part=panel]{pointer-events:auto}[data-ui=drawer][data-side=bottom]>[data-part=panel]>[data-part=body]:last-child{padding-block-end:calc(var(--_padding-block) + env(safe-area-inset-bottom,0px))}[data-ui=drawer][data-side=start]:dir(rtl)>[data-part=panel]{--_shift-x: 100%}[data-ui=drawer][data-side=end]:dir(rtl)>[data-part=panel]{--_shift-x: -100%}[data-ui=drawer][data-size=full]>[data-part=panel]{border-width:0;border-radius:0}[data-ui=drawer][data-mode=inline][data-side=start]>[data-part=panel],[data-ui=drawer][data-mode=inline][data-side=end]>[data-part=panel]{inline-size:var(--_extent)}[data-ui=drawer][data-mode=inline][data-side=top]>[data-part=panel],[data-ui=drawer][data-mode=inline][data-side=bottom]>[data-part=panel]{block-size:var(--_extent)}[data-ui=drawer][data-mode=inline][data-open][data-side=start]>[data-part=panel],[data-ui=drawer][data-mode=inline][data-open][data-side=end]>[data-part=panel]{max-inline-size:100%}[data-ui=drawer][data-mode=inline][data-open][data-side=top]>[data-part=panel],[data-ui=drawer][data-mode=inline][data-open][data-side=bottom]>[data-part=panel]{max-block-size:100%}[data-ui=drawer]>[data-part=panel]>[data-part=resizer]{display:flex;align-items:center;justify-content:center;gap:min(var(--slotted-space-9, 2rem),12%);background:transparent;touch-action:none;--_rest: var(--slotted-drawer-resizer-line-color, var(--slotted-border-strong, ButtonBorder));--_active: var( --slotted-drawer-resizer-line-active-color, var(--slotted-text-muted, ButtonText) )}[data-ui=drawer]>[data-part=panel]>[data-part=resizer]:not([data-disabled]):hover,[data-ui=drawer]>[data-part=panel]>[data-part=resizer]:not([data-disabled]):focus-visible,[data-ui=drawer][data-dragging]>[data-part=panel]>[data-part=resizer]{gap:var(--slotted-space-4, .5rem)}[data-ui=drawer][data-side=start]>[data-part=panel]>[data-part=resizer],[data-ui=drawer][data-side=end]>[data-part=panel]>[data-part=resizer]{flex-direction:column}[data-ui=drawer]>[data-part=panel]>[data-part=resizer]:before{content:\"\";position:absolute;--_reach-overhang: calc((var(--_resizer-reach) - var(--_resizer-thickness)) / -2)}[data-ui=drawer][data-side=start]>[data-part=panel]>[data-part=resizer]:before,[data-ui=drawer][data-side=end]>[data-part=panel]>[data-part=resizer]:before{inset-block:0;inset-inline:var(--_reach-overhang)}[data-ui=drawer][data-side=top]>[data-part=panel]>[data-part=resizer]:before,[data-ui=drawer][data-side=bottom]>[data-part=panel]>[data-part=resizer]:before{inset-inline:0;inset-block:var(--_reach-overhang)}[data-ui=drawer][data-side=start]>[data-part=panel]>[data-part=resizer],[data-ui=drawer][data-side=end]>[data-part=panel]>[data-part=resizer]{position:absolute;inset-block:0;inline-size:var(--_resizer-thickness);cursor:col-resize}[data-ui=drawer][data-side=start]>[data-part=panel]>[data-part=resizer]{inset-inline-end:0}[data-ui=drawer][data-side=end]>[data-part=panel]>[data-part=resizer]{inset-inline-start:0}[data-ui=drawer][data-side=top]>[data-part=panel]>[data-part=resizer],[data-ui=drawer][data-side=bottom]>[data-part=panel]>[data-part=resizer]{position:relative;block-size:var(--_resizer-thickness);cursor:row-resize}[data-ui=drawer][data-side=bottom]>[data-part=panel]>[data-part=resizer]{grid-row:1}[data-ui=drawer][data-side=top]>[data-part=panel]>[data-part=resizer]{grid-row:4}[data-ui=drawer]>[data-part=panel]>[data-part=resizer]>[data-part=line]{flex:0 1 min(var(--slotted-space-12, 4rem),20%);min-block-size:0;min-inline-size:0;inline-size:var(--slotted-border-width-thin, 1px);border-radius:var(--slotted-radius-sm, 2px);transition:flex-basis var(--slotted-control-transition-duration, var(--slotted-duration-short)) var(--slotted-control-transition-easing, var(--slotted-easing-standard)),background-color var(--slotted-control-transition-duration, var(--slotted-duration-short)) var(--slotted-control-transition-easing, var(--slotted-easing-standard))}[data-ui=drawer][data-side=start]>[data-part=panel]>[data-part=resizer]>[data-part=line]:first-child,[data-ui=drawer][data-side=end]>[data-part=panel]>[data-part=resizer]>[data-part=line]:first-child{background:linear-gradient(to bottom,transparent,var(--_rest))}[data-ui=drawer][data-side=start]>[data-part=panel]>[data-part=resizer]>[data-part=line]:last-child,[data-ui=drawer][data-side=end]>[data-part=panel]>[data-part=resizer]>[data-part=line]:last-child{background:linear-gradient(to top,transparent,var(--_rest))}[data-ui=drawer]>[data-part=panel]>[data-part=resizer]:not([data-disabled]):hover>[data-part=line],[data-ui=drawer]>[data-part=panel]>[data-part=resizer]:not([data-disabled]):focus-visible>[data-part=line],[data-ui=drawer][data-dragging]>[data-part=panel]>[data-part=resizer]>[data-part=line]{flex-basis:100%;background:var(--_active)}[data-ui=drawer]>[data-part=panel]>[data-part=resizer]>[data-part=grip]{flex:none;transition:background-color var(--slotted-control-transition-duration, var(--slotted-duration-short)) var(--slotted-control-transition-easing, var(--slotted-easing-standard)),color var(--slotted-control-transition-duration, var(--slotted-duration-short)) var(--slotted-control-transition-easing, var(--slotted-easing-standard))}[data-ui=drawer][data-side=start]>[data-part=panel]>[data-part=resizer]>[data-part=grip],[data-ui=drawer][data-side=end]>[data-part=panel]>[data-part=resizer]>[data-part=grip]{color:var(--_rest);background-image:radial-gradient(circle at center,currentColor 40%,transparent 42%);background-size:var(--slotted-space-2, .25rem) var(--slotted-space-2, .25rem);inline-size:calc(2 * var(--slotted-space-2, .25rem));block-size:calc(3 * var(--slotted-space-2, .25rem))}[data-ui=drawer][data-side=top]>[data-part=panel]>[data-part=resizer]>[data-part=grip],[data-ui=drawer][data-side=bottom]>[data-part=panel]>[data-part=resizer]>[data-part=grip]{background-color:var(--_rest);border-radius:var(--slotted-radius-full, 9999px);block-size:var(--slotted-space-2, .25rem);inline-size:var(--slotted-space-11, 3rem)}[data-ui=drawer][data-side=top]>[data-part=panel]>[data-part=resizer]>[data-part=line],[data-ui=drawer][data-side=bottom]>[data-part=panel]>[data-part=resizer]>[data-part=line]{display:none}[data-ui=drawer]>[data-part=panel]>[data-part=resizer]:not([data-disabled]):hover>[data-part=grip],[data-ui=drawer]>[data-part=panel]>[data-part=resizer]:not([data-disabled]):focus-visible>[data-part=grip],[data-ui=drawer][data-dragging]>[data-part=panel]>[data-part=resizer]>[data-part=grip]{color:var(--_active)}[data-ui=drawer][data-side=top]>[data-part=panel]>[data-part=resizer]:not([data-disabled]):hover>[data-part=grip],[data-ui=drawer][data-side=bottom]>[data-part=panel]>[data-part=resizer]:not([data-disabled]):hover>[data-part=grip],[data-ui=drawer][data-side=top]>[data-part=panel]>[data-part=resizer]:not([data-disabled]):focus-visible>[data-part=grip],[data-ui=drawer][data-side=bottom]>[data-part=panel]>[data-part=resizer]:not([data-disabled]):focus-visible>[data-part=grip],[data-ui=drawer][data-dragging][data-side=top]>[data-part=panel]>[data-part=resizer]>[data-part=grip],[data-ui=drawer][data-dragging][data-side=bottom]>[data-part=panel]>[data-part=resizer]>[data-part=grip]{background-color:var(--_active)}[data-ui=drawer]>[data-part=panel]>[data-part=resizer]:focus-visible{outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:calc(-1 * var(--slotted-focus-ring-offset, 2px))}[data-ui=drawer][data-dragging][data-side=start]>[data-part=panel],[data-ui=drawer][data-dragging][data-side=end]>[data-part=panel]{will-change:inline-size}[data-ui=drawer][data-dragging][data-side=top]>[data-part=panel],[data-ui=drawer][data-dragging][data-side=bottom]>[data-part=panel]{will-change:block-size}[data-ui=drawer]>[data-part=panel]>[data-part=header]{grid-row:1;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;column-gap:var(--_gap);row-gap:var(--slotted-space-2, .25rem);padding-block:var(--_padding-block);padding-inline:var(--_row-padding-inline-start) var(--_row-padding-inline-end)}[data-ui=drawer]>[data-part=panel]>[data-part=header]>[data-part=title]{grid-column:1;grid-row:1;margin:0;min-inline-size:0;overflow-wrap:anywhere;font-family:var( --slotted-drawer-title-font-family, var( --slotted-font-family-heading, var(--slotted-font-family-sans, ui-sans-serif, system-ui, sans-serif) ) );font-size:var(--_title-font-size);font-weight:var(--slotted-font-weight-semibold, 600);line-height:var(--slotted-line-height-lg, 1.5);color:var(--slotted-drawer-title-color, var(--slotted-text, CanvasText))}[data-ui=drawer]>[data-part=panel]>[data-part=header]>[data-part=description]{grid-column:1;grid-row:2;margin:0;min-inline-size:0;overflow-wrap:anywhere;font-size:var(--_description-font-size);line-height:var(--slotted-line-height-md, 1.5);color:var(--slotted-drawer-description-color, var(--slotted-text-muted, GrayText))}[data-ui=drawer]>[data-part=panel]>[data-part=header]>[data-part=close]{--slotted-icon-size: var(--_icon-size);grid-column:2;grid-row:1 / span 2;align-self:start;display:inline-grid;place-items:center;block-size:var(--_close-size);inline-size:var(--_close-size);margin-inline-end:calc(-1 * (var(--_close-size) - var(--_icon-size)) / 2);padding:0;appearance:none;background-color:transparent;border:0;border-radius:var(--slotted-control-radius, var(--slotted-radius-sm, 4px));color:var(--slotted-drawer-close-color, var(--slotted-text-muted, GrayText));cursor:pointer;transition:background-color var(--slotted-control-transition-duration, var(--slotted-duration-short)) var(--slotted-control-transition-easing, var(--slotted-easing-standard)),color var(--slotted-control-transition-duration, var(--slotted-duration-short)) var(--slotted-control-transition-easing, var(--slotted-easing-standard))}@media(pointer:coarse){[data-ui=drawer]>[data-part=panel]>[data-part=header]>[data-part=close]{position:relative}[data-ui=drawer]>[data-part=panel]>[data-part=header]>[data-part=close]:before{content:\"\";inset:min(0px,calc((100% - var(--slotted-target-comfortable, 44px)) / 2));position:absolute}}[data-ui=drawer]>[data-part=panel]>[data-part=header]>[data-part=close]:not(:disabled):hover{background-color:var( --slotted-drawer-close-hover-background, var(--slotted-tone-secondary-subtle-hover) )}[data-ui=drawer]>[data-part=panel]>[data-part=header]>[data-part=close]:not(:disabled):active{background-color:var( --slotted-drawer-close-active-background, var(--slotted-tone-secondary-subtle-active) )}[data-ui=drawer]>[data-part=panel]>[data-part=header]>[data-part=close]:focus-visible{outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:calc(-1 * var(--slotted-focus-ring-offset, 2px))}[data-ui=drawer]>[data-part=panel]>[data-part=body]{grid-row:2;min-block-size:0;min-inline-size:0;overflow-x:hidden;overflow-y:auto;overflow-inline:hidden;overflow-block:auto;overscroll-behavior:contain;padding-block:var(--_padding-block);padding-inline:var(--_row-padding-inline-start) var(--_row-padding-inline-end);font-size:var(--_body-font-size);line-height:var(--slotted-line-height-md, 1.5);color:var(--slotted-drawer-body-color, var(--slotted-text, CanvasText))}[data-ui=drawer]>[data-part=panel]>[data-part=body][data-inset=none]{padding:0}[data-ui=drawer]>[data-part=panel]>[data-part=body]:not(:first-child){border-block-start:var(--_rule-size) solid var(--slotted-drawer-rule-color, var(--slotted-border-subtle, ButtonBorder))}[data-ui=drawer][data-loading]>[data-part=panel]>[data-part=body]{min-block-size:var(--slotted-space-12, 4rem)}[data-ui=drawer]>[data-part=panel]>[data-part=footer]{grid-row:3;display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--_gap);padding-block:var(--_padding-block);padding-inline:var(--_row-padding-inline-start) var(--_row-padding-inline-end);background:var(--slotted-drawer-footer-surface, var(--slotted-surface-sunken, Canvas))}[data-ui=drawer][data-side=bottom]>[data-part=panel]>[data-part=footer]{padding-block-end:calc(var(--_footer-padding-block, var(--_padding-block)) + env(safe-area-inset-bottom,0px))}[data-ui=drawer]>[data-part=panel]>[data-part=footer]:not(:first-child){border-block-start:var(--_rule-size) solid var(--slotted-drawer-rule-color, var(--slotted-border-subtle, ButtonBorder))}@media(forced-colors:active){[data-ui=drawer]>[data-part=panel]{border-width:var(--slotted-border-width-thick, 2px);border-color:CanvasText}}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
799
|
+
}
|
|
800
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlDrawer, decorators: [{
|
|
801
|
+
type: Component,
|
|
802
|
+
args: [{ selector: 'sl-drawer', standalone: true, exportAs: 'slDrawer', template: `
|
|
803
|
+
@if (mounted()) {
|
|
804
|
+
<div
|
|
805
|
+
#layer
|
|
806
|
+
data-ui="drawer"
|
|
807
|
+
data-part="root"
|
|
808
|
+
[attr.data-mode]="resolvedMode()"
|
|
809
|
+
[attr.data-side]="resolvedSide()"
|
|
810
|
+
[attr.data-size]="resolvedSize()"
|
|
811
|
+
[attr.data-mount]="resolvedMount()"
|
|
812
|
+
[attr.data-modal]="resolvedModal() ? '' : null"
|
|
813
|
+
[attr.data-open]="visible() ? '' : null"
|
|
814
|
+
[attr.data-loading]="loading() ? '' : null"
|
|
815
|
+
[attr.data-dragging]="dragging() ? '' : null"
|
|
816
|
+
[attr.data-drag]="sheet() ? resolvedDrag() : null"
|
|
817
|
+
[attr.data-undimmed]="undimmed() ? '' : null"
|
|
818
|
+
[attr.inert]="interactive() ? null : ''"
|
|
819
|
+
[style.--slotted-drawer-extent]="extentLength()"
|
|
820
|
+
>
|
|
821
|
+
@if (showBackdrop()) {
|
|
822
|
+
<div data-part="backdrop"></div>
|
|
823
|
+
}
|
|
824
|
+
<div
|
|
825
|
+
#panel
|
|
826
|
+
data-part="panel"
|
|
827
|
+
[id]="panelId"
|
|
828
|
+
[attr.role]="role()"
|
|
829
|
+
[attr.aria-modal]="resolvedModal() ? 'true' : null"
|
|
830
|
+
[attr.aria-label]="label()"
|
|
831
|
+
[attr.aria-labelledby]="labelledBy()"
|
|
832
|
+
[attr.aria-describedby]="describedBy()"
|
|
833
|
+
>
|
|
834
|
+
<ng-content />
|
|
835
|
+
</div>
|
|
836
|
+
</div>
|
|
837
|
+
}
|
|
838
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { '[style.display]': "'contents'" }, styles: ["@layer slotted.components{[data-ui=drawer]{--_step: var(--slotted-drawer-extent-md, 24rem);--_extent: var(--slotted-drawer-extent, var(--_step));--_padding-inline: var(--slotted-space-7, 1.25rem);--_padding-block: var(--slotted-space-6, 1rem);--_gap: var(--slotted-space-5, .75rem);--_rule-size: var(--slotted-border-width-thin, 1px);--_title-font-size: var(--slotted-font-size-lg, 1rem);--_description-font-size: var(--slotted-font-size-md, .875rem);--_body-font-size: var(--slotted-font-size-md, .875rem);--_icon-size: var(--slotted-control-icon-size-md, 16px);--_inner-size: var(--slotted-control-inner-size-md, 24px);--_close-size: max( var(--slotted-target-min, 24px), min(calc(var(--_icon-size) + 2 * var(--slotted-space-2, .25rem)), var(--_inner-size)) );--_resizer-thickness: var(--slotted-space-6, 1rem);--_resizer-reach: var(--slotted-target-min, 24px);--_resizer-line: var(--slotted-border-width-thick, 2px);--_radius: var(--slotted-radius-lg, 8px);--_slide: var(--slotted-duration-long) var(--slotted-easing-enter);--_move: var(--slotted-duration-medium) var(--slotted-easing-enter);--_reveal: content-visibility var(--slotted-duration-medium) allow-discrete;box-sizing:border-box;display:grid;grid-template:minmax(0,1fr) / minmax(0,1fr);color:var(--slotted-drawer-color, var(--slotted-text, CanvasText));font-family:var(--slotted-control-font-family, var(--slotted-font-family-sans));content-visibility:visible;transition:var(--_reveal)}[data-ui=drawer]:not([data-open]){--_slide: var(--slotted-duration-medium) var(--slotted-easing-exit);--_move: var(--slotted-duration-medium) var(--slotted-easing-exit)}[data-ui=drawer][data-dragging]{--_move: var(--slotted-duration-instant) var(--slotted-easing-standard)}[data-ui=drawer][data-size=sm]{--_step: var(--slotted-drawer-extent-sm, 18rem);--_padding-inline: var(--slotted-space-6, 1rem)}[data-ui=drawer][data-size=lg]{--_step: var(--slotted-drawer-extent-lg, 30rem)}[data-ui=drawer][data-size=xl]{--_step: var(--slotted-drawer-extent-xl, 40rem);--_padding-inline: var(--slotted-space-8, 1.5rem);--_title-font-size: var(--slotted-font-size-xl, 1.125rem)}[data-ui=drawer][data-size=full]{--_step: 100%}[data-ui=drawer][data-mode=overlay]{position:fixed;inset:0;z-index:calc(var(--slotted-z-index-overlay, 1000) + var(--slotted-layer-depth, 0))}[data-ui=drawer][data-mode=inline]{overflow:clip}[data-ui=drawer][data-mode=inline][data-side=start],[data-ui=drawer][data-mode=inline][data-side=end]{inline-size:0;transition:inline-size var(--_move),var(--_reveal)}[data-ui=drawer][data-mode=inline][data-side=top],[data-ui=drawer][data-mode=inline][data-side=bottom]{block-size:0;transition:block-size var(--_move),var(--_reveal)}[data-ui=drawer][data-mode=inline][data-open][data-side=start],[data-ui=drawer][data-mode=inline][data-open][data-side=end]{inline-size:var(--_extent);max-inline-size:100%}[data-ui=drawer][data-mode=inline][data-open][data-side=top],[data-ui=drawer][data-mode=inline][data-open][data-side=bottom]{block-size:var(--_extent);max-block-size:100%}[data-ui=drawer][inert]{content-visibility:hidden;pointer-events:none}[data-ui=drawer]>[data-part=backdrop]{grid-area:1 / 1;background:var(--slotted-drawer-scrim, var(--slotted-scrim, Canvas));opacity:0;transition:opacity var(--slotted-duration-short) var(--slotted-easing-exit)}[data-ui=drawer][data-open]>[data-part=backdrop]{opacity:1;transition:opacity var(--slotted-duration-long) var(--slotted-easing-standard)}[data-ui=drawer]>[data-part=panel]{grid-area:1 / 1;box-sizing:border-box;transition:inline-size var(--_move),block-size var(--_move);position:relative;display:grid;grid-template-columns:minmax(0,1fr);min-inline-size:0;min-block-size:0;--_row-padding-inline-start: var(--_padding-inline);--_row-padding-inline-end: var(--_padding-inline);background:var(--slotted-drawer-surface, var(--slotted-surface-raised, Canvas));border-color:var(--slotted-drawer-border-color, var(--slotted-border-subtle, ButtonBorder));border-style:solid;border-width:0;overflow:hidden}[data-ui=drawer][data-mode=overlay]>[data-part=panel]{box-shadow:var(--slotted-shadow-lg);translate:0 0;transition:translate var(--_slide),inline-size var(--_move),block-size var(--_move)}[data-ui=drawer][data-mode=overlay]:not([data-open])>[data-part=panel]{translate:var(--_shift-x, 0) var(--_shift-y, 0)}[data-ui=drawer][data-dragging]>[data-part=panel]{transition:none}[data-ui=drawer][data-dragging][data-mode=overlay]>[data-part=panel]{transition:translate var(--_slide)}[data-ui=drawer][data-dragging][data-mode=inline][data-side=start],[data-ui=drawer][data-dragging][data-mode=inline][data-side=end],[data-ui=drawer][data-dragging][data-mode=inline][data-side=top],[data-ui=drawer][data-dragging][data-mode=inline][data-side=bottom]{transition:var(--_reveal)}@media(prefers-reduced-motion:reduce){[data-ui=drawer][data-mode=overlay]>[data-part=panel]{translate:0 0;transition:inline-size var(--_move),block-size var(--_move)}}[data-ui=drawer][data-side=start]>[data-part=panel],[data-ui=drawer][data-side=end]>[data-part=panel]{align-self:stretch;inline-size:min(var(--_extent),100%);grid-template-rows:auto minmax(0,1fr) auto}[data-ui=drawer][data-side=top]>[data-part=panel],[data-ui=drawer][data-side=bottom]>[data-part=panel]{justify-self:stretch;block-size:min(var(--_extent),100%)}[data-ui=drawer][data-side=start]>[data-part=panel]{justify-self:start;--_shift-x: -100%;--_row-padding-inline-end: max(var(--_padding-inline), var(--_resizer-thickness));border-inline-end-width:var(--_rule-size)}[data-ui=drawer][data-side=end]>[data-part=panel]{justify-self:end;--_shift-x: 100%;--_row-padding-inline-start: max(var(--_padding-inline), var(--_resizer-thickness));border-inline-start-width:var(--_rule-size)}[data-ui=drawer][data-side=top]>[data-part=panel]{align-self:start;grid-template-rows:auto minmax(0,1fr) auto auto;--_shift-y: -100%;border-block-end-width:var(--_rule-size);border-end-start-radius:var(--slotted-drawer-radius, var(--_radius));border-end-end-radius:var(--slotted-drawer-radius, var(--_radius))}[data-ui=drawer][data-side=bottom]>[data-part=panel]{align-self:end;grid-template-rows:auto auto minmax(0,1fr) auto;--_shift-y: 100%;border-block-start-width:var(--_rule-size);border-start-start-radius:var(--slotted-drawer-radius, var(--_radius));border-start-end-radius:var(--slotted-drawer-radius, var(--_radius))}[data-ui=drawer][data-side=bottom]>[data-part=panel]>[data-part=header]{grid-row:2}[data-ui=drawer][data-side=bottom]>[data-part=panel]>[data-part=body]{grid-row:3}[data-ui=drawer][data-side=bottom]>[data-part=panel]>[data-part=footer]{grid-row:4}[data-ui=drawer][data-mode=overlay][data-side=top]>[data-part=panel],[data-ui=drawer][data-mode=overlay][data-side=bottom]>[data-part=panel]{justify-self:center;inline-size:min(100%,var(--slotted-drawer-sheet-inline-size, var(--slotted-drawer-extent-xl, 40rem)));border-inline-width:var(--_rule-size)}[data-ui=drawer][data-size=content]{--_step: auto;--_content-cap: min( var(--slotted-drawer-extent, calc(100% - var(--slotted-space-12, 4rem))), 100% );interpolate-size:allow-keywords}[data-ui=drawer][data-size=content][data-side=start],[data-ui=drawer][data-size=content][data-side=end]{--_step: max-content}[data-ui=drawer][data-size=content][data-side=start]>[data-part=panel],[data-ui=drawer][data-size=content][data-side=end]>[data-part=panel]{inline-size:var(--_extent);max-inline-size:var(--_content-cap)}[data-ui=drawer][data-size=content][data-side=top]>[data-part=panel],[data-ui=drawer][data-size=content][data-side=bottom]>[data-part=panel]{block-size:var(--_extent);max-block-size:var(--_content-cap)}[data-ui=drawer][data-mode=overlay]{padding-block-end:var(--slotted-keyboard-inset, 0px)}[data-ui=drawer][data-undimmed]>[data-part=backdrop]{opacity:0;pointer-events:none}[data-ui=drawer][data-undimmed]{pointer-events:none}[data-ui=drawer][data-undimmed]>[data-part=panel]{pointer-events:auto}[data-ui=drawer][data-side=bottom]>[data-part=panel]>[data-part=body]:last-child{padding-block-end:calc(var(--_padding-block) + env(safe-area-inset-bottom,0px))}[data-ui=drawer][data-side=start]:dir(rtl)>[data-part=panel]{--_shift-x: 100%}[data-ui=drawer][data-side=end]:dir(rtl)>[data-part=panel]{--_shift-x: -100%}[data-ui=drawer][data-size=full]>[data-part=panel]{border-width:0;border-radius:0}[data-ui=drawer][data-mode=inline][data-side=start]>[data-part=panel],[data-ui=drawer][data-mode=inline][data-side=end]>[data-part=panel]{inline-size:var(--_extent)}[data-ui=drawer][data-mode=inline][data-side=top]>[data-part=panel],[data-ui=drawer][data-mode=inline][data-side=bottom]>[data-part=panel]{block-size:var(--_extent)}[data-ui=drawer][data-mode=inline][data-open][data-side=start]>[data-part=panel],[data-ui=drawer][data-mode=inline][data-open][data-side=end]>[data-part=panel]{max-inline-size:100%}[data-ui=drawer][data-mode=inline][data-open][data-side=top]>[data-part=panel],[data-ui=drawer][data-mode=inline][data-open][data-side=bottom]>[data-part=panel]{max-block-size:100%}[data-ui=drawer]>[data-part=panel]>[data-part=resizer]{display:flex;align-items:center;justify-content:center;gap:min(var(--slotted-space-9, 2rem),12%);background:transparent;touch-action:none;--_rest: var(--slotted-drawer-resizer-line-color, var(--slotted-border-strong, ButtonBorder));--_active: var( --slotted-drawer-resizer-line-active-color, var(--slotted-text-muted, ButtonText) )}[data-ui=drawer]>[data-part=panel]>[data-part=resizer]:not([data-disabled]):hover,[data-ui=drawer]>[data-part=panel]>[data-part=resizer]:not([data-disabled]):focus-visible,[data-ui=drawer][data-dragging]>[data-part=panel]>[data-part=resizer]{gap:var(--slotted-space-4, .5rem)}[data-ui=drawer][data-side=start]>[data-part=panel]>[data-part=resizer],[data-ui=drawer][data-side=end]>[data-part=panel]>[data-part=resizer]{flex-direction:column}[data-ui=drawer]>[data-part=panel]>[data-part=resizer]:before{content:\"\";position:absolute;--_reach-overhang: calc((var(--_resizer-reach) - var(--_resizer-thickness)) / -2)}[data-ui=drawer][data-side=start]>[data-part=panel]>[data-part=resizer]:before,[data-ui=drawer][data-side=end]>[data-part=panel]>[data-part=resizer]:before{inset-block:0;inset-inline:var(--_reach-overhang)}[data-ui=drawer][data-side=top]>[data-part=panel]>[data-part=resizer]:before,[data-ui=drawer][data-side=bottom]>[data-part=panel]>[data-part=resizer]:before{inset-inline:0;inset-block:var(--_reach-overhang)}[data-ui=drawer][data-side=start]>[data-part=panel]>[data-part=resizer],[data-ui=drawer][data-side=end]>[data-part=panel]>[data-part=resizer]{position:absolute;inset-block:0;inline-size:var(--_resizer-thickness);cursor:col-resize}[data-ui=drawer][data-side=start]>[data-part=panel]>[data-part=resizer]{inset-inline-end:0}[data-ui=drawer][data-side=end]>[data-part=panel]>[data-part=resizer]{inset-inline-start:0}[data-ui=drawer][data-side=top]>[data-part=panel]>[data-part=resizer],[data-ui=drawer][data-side=bottom]>[data-part=panel]>[data-part=resizer]{position:relative;block-size:var(--_resizer-thickness);cursor:row-resize}[data-ui=drawer][data-side=bottom]>[data-part=panel]>[data-part=resizer]{grid-row:1}[data-ui=drawer][data-side=top]>[data-part=panel]>[data-part=resizer]{grid-row:4}[data-ui=drawer]>[data-part=panel]>[data-part=resizer]>[data-part=line]{flex:0 1 min(var(--slotted-space-12, 4rem),20%);min-block-size:0;min-inline-size:0;inline-size:var(--slotted-border-width-thin, 1px);border-radius:var(--slotted-radius-sm, 2px);transition:flex-basis var(--slotted-control-transition-duration, var(--slotted-duration-short)) var(--slotted-control-transition-easing, var(--slotted-easing-standard)),background-color var(--slotted-control-transition-duration, var(--slotted-duration-short)) var(--slotted-control-transition-easing, var(--slotted-easing-standard))}[data-ui=drawer][data-side=start]>[data-part=panel]>[data-part=resizer]>[data-part=line]:first-child,[data-ui=drawer][data-side=end]>[data-part=panel]>[data-part=resizer]>[data-part=line]:first-child{background:linear-gradient(to bottom,transparent,var(--_rest))}[data-ui=drawer][data-side=start]>[data-part=panel]>[data-part=resizer]>[data-part=line]:last-child,[data-ui=drawer][data-side=end]>[data-part=panel]>[data-part=resizer]>[data-part=line]:last-child{background:linear-gradient(to top,transparent,var(--_rest))}[data-ui=drawer]>[data-part=panel]>[data-part=resizer]:not([data-disabled]):hover>[data-part=line],[data-ui=drawer]>[data-part=panel]>[data-part=resizer]:not([data-disabled]):focus-visible>[data-part=line],[data-ui=drawer][data-dragging]>[data-part=panel]>[data-part=resizer]>[data-part=line]{flex-basis:100%;background:var(--_active)}[data-ui=drawer]>[data-part=panel]>[data-part=resizer]>[data-part=grip]{flex:none;transition:background-color var(--slotted-control-transition-duration, var(--slotted-duration-short)) var(--slotted-control-transition-easing, var(--slotted-easing-standard)),color var(--slotted-control-transition-duration, var(--slotted-duration-short)) var(--slotted-control-transition-easing, var(--slotted-easing-standard))}[data-ui=drawer][data-side=start]>[data-part=panel]>[data-part=resizer]>[data-part=grip],[data-ui=drawer][data-side=end]>[data-part=panel]>[data-part=resizer]>[data-part=grip]{color:var(--_rest);background-image:radial-gradient(circle at center,currentColor 40%,transparent 42%);background-size:var(--slotted-space-2, .25rem) var(--slotted-space-2, .25rem);inline-size:calc(2 * var(--slotted-space-2, .25rem));block-size:calc(3 * var(--slotted-space-2, .25rem))}[data-ui=drawer][data-side=top]>[data-part=panel]>[data-part=resizer]>[data-part=grip],[data-ui=drawer][data-side=bottom]>[data-part=panel]>[data-part=resizer]>[data-part=grip]{background-color:var(--_rest);border-radius:var(--slotted-radius-full, 9999px);block-size:var(--slotted-space-2, .25rem);inline-size:var(--slotted-space-11, 3rem)}[data-ui=drawer][data-side=top]>[data-part=panel]>[data-part=resizer]>[data-part=line],[data-ui=drawer][data-side=bottom]>[data-part=panel]>[data-part=resizer]>[data-part=line]{display:none}[data-ui=drawer]>[data-part=panel]>[data-part=resizer]:not([data-disabled]):hover>[data-part=grip],[data-ui=drawer]>[data-part=panel]>[data-part=resizer]:not([data-disabled]):focus-visible>[data-part=grip],[data-ui=drawer][data-dragging]>[data-part=panel]>[data-part=resizer]>[data-part=grip]{color:var(--_active)}[data-ui=drawer][data-side=top]>[data-part=panel]>[data-part=resizer]:not([data-disabled]):hover>[data-part=grip],[data-ui=drawer][data-side=bottom]>[data-part=panel]>[data-part=resizer]:not([data-disabled]):hover>[data-part=grip],[data-ui=drawer][data-side=top]>[data-part=panel]>[data-part=resizer]:not([data-disabled]):focus-visible>[data-part=grip],[data-ui=drawer][data-side=bottom]>[data-part=panel]>[data-part=resizer]:not([data-disabled]):focus-visible>[data-part=grip],[data-ui=drawer][data-dragging][data-side=top]>[data-part=panel]>[data-part=resizer]>[data-part=grip],[data-ui=drawer][data-dragging][data-side=bottom]>[data-part=panel]>[data-part=resizer]>[data-part=grip]{background-color:var(--_active)}[data-ui=drawer]>[data-part=panel]>[data-part=resizer]:focus-visible{outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:calc(-1 * var(--slotted-focus-ring-offset, 2px))}[data-ui=drawer][data-dragging][data-side=start]>[data-part=panel],[data-ui=drawer][data-dragging][data-side=end]>[data-part=panel]{will-change:inline-size}[data-ui=drawer][data-dragging][data-side=top]>[data-part=panel],[data-ui=drawer][data-dragging][data-side=bottom]>[data-part=panel]{will-change:block-size}[data-ui=drawer]>[data-part=panel]>[data-part=header]{grid-row:1;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;column-gap:var(--_gap);row-gap:var(--slotted-space-2, .25rem);padding-block:var(--_padding-block);padding-inline:var(--_row-padding-inline-start) var(--_row-padding-inline-end)}[data-ui=drawer]>[data-part=panel]>[data-part=header]>[data-part=title]{grid-column:1;grid-row:1;margin:0;min-inline-size:0;overflow-wrap:anywhere;font-family:var( --slotted-drawer-title-font-family, var( --slotted-font-family-heading, var(--slotted-font-family-sans, ui-sans-serif, system-ui, sans-serif) ) );font-size:var(--_title-font-size);font-weight:var(--slotted-font-weight-semibold, 600);line-height:var(--slotted-line-height-lg, 1.5);color:var(--slotted-drawer-title-color, var(--slotted-text, CanvasText))}[data-ui=drawer]>[data-part=panel]>[data-part=header]>[data-part=description]{grid-column:1;grid-row:2;margin:0;min-inline-size:0;overflow-wrap:anywhere;font-size:var(--_description-font-size);line-height:var(--slotted-line-height-md, 1.5);color:var(--slotted-drawer-description-color, var(--slotted-text-muted, GrayText))}[data-ui=drawer]>[data-part=panel]>[data-part=header]>[data-part=close]{--slotted-icon-size: var(--_icon-size);grid-column:2;grid-row:1 / span 2;align-self:start;display:inline-grid;place-items:center;block-size:var(--_close-size);inline-size:var(--_close-size);margin-inline-end:calc(-1 * (var(--_close-size) - var(--_icon-size)) / 2);padding:0;appearance:none;background-color:transparent;border:0;border-radius:var(--slotted-control-radius, var(--slotted-radius-sm, 4px));color:var(--slotted-drawer-close-color, var(--slotted-text-muted, GrayText));cursor:pointer;transition:background-color var(--slotted-control-transition-duration, var(--slotted-duration-short)) var(--slotted-control-transition-easing, var(--slotted-easing-standard)),color var(--slotted-control-transition-duration, var(--slotted-duration-short)) var(--slotted-control-transition-easing, var(--slotted-easing-standard))}@media(pointer:coarse){[data-ui=drawer]>[data-part=panel]>[data-part=header]>[data-part=close]{position:relative}[data-ui=drawer]>[data-part=panel]>[data-part=header]>[data-part=close]:before{content:\"\";inset:min(0px,calc((100% - var(--slotted-target-comfortable, 44px)) / 2));position:absolute}}[data-ui=drawer]>[data-part=panel]>[data-part=header]>[data-part=close]:not(:disabled):hover{background-color:var( --slotted-drawer-close-hover-background, var(--slotted-tone-secondary-subtle-hover) )}[data-ui=drawer]>[data-part=panel]>[data-part=header]>[data-part=close]:not(:disabled):active{background-color:var( --slotted-drawer-close-active-background, var(--slotted-tone-secondary-subtle-active) )}[data-ui=drawer]>[data-part=panel]>[data-part=header]>[data-part=close]:focus-visible{outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:calc(-1 * var(--slotted-focus-ring-offset, 2px))}[data-ui=drawer]>[data-part=panel]>[data-part=body]{grid-row:2;min-block-size:0;min-inline-size:0;overflow-x:hidden;overflow-y:auto;overflow-inline:hidden;overflow-block:auto;overscroll-behavior:contain;padding-block:var(--_padding-block);padding-inline:var(--_row-padding-inline-start) var(--_row-padding-inline-end);font-size:var(--_body-font-size);line-height:var(--slotted-line-height-md, 1.5);color:var(--slotted-drawer-body-color, var(--slotted-text, CanvasText))}[data-ui=drawer]>[data-part=panel]>[data-part=body][data-inset=none]{padding:0}[data-ui=drawer]>[data-part=panel]>[data-part=body]:not(:first-child){border-block-start:var(--_rule-size) solid var(--slotted-drawer-rule-color, var(--slotted-border-subtle, ButtonBorder))}[data-ui=drawer][data-loading]>[data-part=panel]>[data-part=body]{min-block-size:var(--slotted-space-12, 4rem)}[data-ui=drawer]>[data-part=panel]>[data-part=footer]{grid-row:3;display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--_gap);padding-block:var(--_padding-block);padding-inline:var(--_row-padding-inline-start) var(--_row-padding-inline-end);background:var(--slotted-drawer-footer-surface, var(--slotted-surface-sunken, Canvas))}[data-ui=drawer][data-side=bottom]>[data-part=panel]>[data-part=footer]{padding-block-end:calc(var(--_footer-padding-block, var(--_padding-block)) + env(safe-area-inset-bottom,0px))}[data-ui=drawer]>[data-part=panel]>[data-part=footer]:not(:first-child){border-block-start:var(--_rule-size) solid var(--slotted-drawer-rule-color, var(--slotted-border-subtle, ButtonBorder))}@media(forced-colors:active){[data-ui=drawer]>[data-part=panel]{border-width:var(--slotted-border-width-thick, 2px);border-color:CanvasText}}}\n"] }]
|
|
839
|
+
}], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], extent: [{ type: i0.Input, args: [{ isSignal: true, alias: "extent", required: false }] }, { type: i0.Output, args: ["extentChange"] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], side: [{ type: i0.Input, args: [{ isSignal: true, alias: "side", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], mount: [{ type: i0.Input, args: [{ isSignal: true, alias: "mount", required: false }] }], escape: [{ type: i0.Input, args: [{ isSignal: true, alias: "escape", required: false }] }], outsidePress: [{ type: i0.Input, args: [{ isSignal: true, alias: "outsidePress", required: false }] }], back: [{ type: i0.Input, args: [{ isSignal: true, alias: "back", required: false }] }], modal: [{ type: i0.Input, args: [{ isSignal: true, alias: "modal", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], messages: [{ type: i0.Input, args: [{ isSignal: true, alias: "messages", required: false }] }], drag: [{ type: i0.Input, args: [{ isSignal: true, alias: "drag", required: false }] }], scrimFrom: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrimFrom", required: false }] }], minExtent: [{ type: i0.Input, args: [{ isSignal: true, alias: "minExtent", required: false }] }], maxExtent: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxExtent", required: false }] }], snapPoints: [{ type: i0.Input, args: [{ isSignal: true, alias: "snapPoints", required: false }] }], container: [{ type: i0.Input, args: [{ isSignal: true, alias: "container", required: false }] }], initialFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialFocus", required: false }] }], finalFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "finalFocus", required: false }] }], openChangeRequest: [{ type: i0.Output, args: ["openChangeRequest"] }], extentChangeRequest: [{ type: i0.Output, args: ["extentChangeRequest"] }], closed: [{ type: i0.Output, args: ["closed"] }], layerRef: [{ type: i0.ViewChild, args: ['layer', { isSignal: true }] }], panelRef: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }] } });
|
|
840
|
+
|
|
841
|
+
/**
|
|
842
|
+
* A click synthesised by the keyboard reports no detail; a real one reports the
|
|
843
|
+
* click count. It is how `Enter`, `Space` and a pointer are told apart without
|
|
844
|
+
* a key listener existing for something the platform already handles.
|
|
845
|
+
*/
|
|
846
|
+
function activationReason(event) {
|
|
847
|
+
return event.detail === 0 ? 'keyboard' : 'pointer';
|
|
848
|
+
}
|
|
849
|
+
/**
|
|
850
|
+
* The control that opens a drawer.
|
|
851
|
+
*
|
|
852
|
+
* It is the consumer's own element, which is what this ecosystem composes with:
|
|
853
|
+
* `<button slButton [slDrawerTrigger]="d">` is the library's own button and
|
|
854
|
+
* this adds the wiring to it. React reaches the same place with `render`,
|
|
855
|
+
* because there the component owns the tag.
|
|
856
|
+
*
|
|
857
|
+
* The trigger is also an overlay layer's *branch*: a press on it is inside the
|
|
858
|
+
* layer as far as `dismissable-layer` is concerned, or opening would
|
|
859
|
+
* immediately be read as an outside press and close what it just opened.
|
|
860
|
+
*
|
|
861
|
+
* `aria-haspopup` is written only under `mode="overlay"`. An inline drawer is a
|
|
862
|
+
* disclosure, not a popup, and the property would promise a layer that never
|
|
863
|
+
* arrives.
|
|
864
|
+
*/
|
|
865
|
+
class SlDrawerTrigger {
|
|
866
|
+
/** The drawer this control opens, reached with a template reference variable. */
|
|
867
|
+
drawer = input.required({ ...(ngDevMode ? { debugName: "drawer" } : /* istanbul ignore next */ {}), alias: 'slDrawerTrigger' });
|
|
868
|
+
native = inject(ElementRef).nativeElement;
|
|
869
|
+
/**
|
|
870
|
+
* `trigger` names the control when it belongs to no family of its own. On
|
|
871
|
+
* `slButton` the element is that family's root, and the part stays `root`:
|
|
872
|
+
* two directives write one attribute, and the family the element is drawn by
|
|
873
|
+
* keeps it, as React's `render` does by spreading the button's props last.
|
|
874
|
+
*/
|
|
875
|
+
part = this.native.hasAttribute('data-ui')
|
|
876
|
+
? this.native.getAttribute('data-part')
|
|
877
|
+
: 'trigger';
|
|
878
|
+
controls = computed(() => this.drawer().mounted() ? this.drawer().panelId : null, /* @ts-ignore */
|
|
879
|
+
...(ngDevMode ? [{ debugName: "controls" }] : /* istanbul ignore next */ []));
|
|
880
|
+
haspopup = computed(() => this.drawer().resolvedMode() === 'overlay' ? 'dialog' : null, /* @ts-ignore */
|
|
881
|
+
...(ngDevMode ? [{ debugName: "haspopup" }] : /* istanbul ignore next */ []));
|
|
882
|
+
ngOnInit() {
|
|
883
|
+
this.drawer().triggerNode.set(this.native);
|
|
884
|
+
}
|
|
885
|
+
ngOnDestroy() {
|
|
886
|
+
if (this.drawer().triggerNode() === this.native)
|
|
887
|
+
this.drawer().triggerNode.set(null);
|
|
888
|
+
}
|
|
889
|
+
press(event) {
|
|
890
|
+
/* The consumer's own handler ran first, and `preventDefault()` refuses the
|
|
891
|
+
open — composed with, never replaced. */
|
|
892
|
+
if (event.defaultPrevented)
|
|
893
|
+
return;
|
|
894
|
+
const drawer = this.drawer();
|
|
895
|
+
drawer.request(!drawer.open(), activationReason(event), undefined, event);
|
|
896
|
+
}
|
|
897
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlDrawerTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
898
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.7", type: SlDrawerTrigger, isStandalone: true, selector: "[slDrawerTrigger]", inputs: { drawer: { classPropertyName: "drawer", publicName: "slDrawerTrigger", isSignal: true, isRequired: true, transformFunction: null } }, host: { attributes: { "type": "button" }, listeners: { "click": "press($event)" }, properties: { "attr.data-part": "part", "attr.aria-haspopup": "haspopup()", "attr.aria-expanded": "drawer().open()", "attr.aria-controls": "controls()", "attr.data-open": "drawer().open() ? '' : null", "id": "drawer().triggerId" } }, exportAs: ["slDrawerTrigger"], ngImport: i0 });
|
|
899
|
+
}
|
|
900
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlDrawerTrigger, decorators: [{
|
|
901
|
+
type: Directive,
|
|
902
|
+
args: [{
|
|
903
|
+
selector: '[slDrawerTrigger]',
|
|
904
|
+
standalone: true,
|
|
905
|
+
exportAs: 'slDrawerTrigger',
|
|
906
|
+
host: {
|
|
907
|
+
'[attr.data-part]': 'part',
|
|
908
|
+
type: 'button',
|
|
909
|
+
'[attr.aria-haspopup]': 'haspopup()',
|
|
910
|
+
'[attr.aria-expanded]': 'drawer().open()',
|
|
911
|
+
'[attr.aria-controls]': 'controls()',
|
|
912
|
+
'[attr.data-open]': "drawer().open() ? '' : null",
|
|
913
|
+
'[id]': 'drawer().triggerId',
|
|
914
|
+
'(click)': 'press($event)',
|
|
915
|
+
},
|
|
916
|
+
}]
|
|
917
|
+
}], propDecorators: { drawer: [{ type: i0.Input, args: [{ isSignal: true, alias: "slDrawerTrigger", required: true }] }] } });
|
|
918
|
+
class SlDrawerHeader {
|
|
919
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlDrawerHeader, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
920
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.7", type: SlDrawerHeader, isStandalone: true, selector: "[slDrawerHeader]", host: { attributes: { "data-part": "header" } }, exportAs: ["slDrawerHeader"], ngImport: i0 });
|
|
921
|
+
}
|
|
922
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlDrawerHeader, decorators: [{
|
|
923
|
+
type: Directive,
|
|
924
|
+
args: [{
|
|
925
|
+
selector: '[slDrawerHeader]',
|
|
926
|
+
standalone: true,
|
|
927
|
+
exportAs: 'slDrawerHeader',
|
|
928
|
+
host: { 'data-part': 'header' },
|
|
929
|
+
}]
|
|
930
|
+
}] });
|
|
931
|
+
/**
|
|
932
|
+
* The visible name, which `aria-labelledby` points at — on the panel and, as
|
|
933
|
+
* the Window Splitter pattern requires, on the separator that sizes it.
|
|
934
|
+
*/
|
|
935
|
+
class SlDrawerTitle {
|
|
936
|
+
drawer = inject(SlDrawer);
|
|
937
|
+
ngOnInit() {
|
|
938
|
+
this.drawer.hasTitle.set(true);
|
|
939
|
+
}
|
|
940
|
+
ngOnDestroy() {
|
|
941
|
+
this.drawer.hasTitle.set(false);
|
|
942
|
+
}
|
|
943
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlDrawerTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
944
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.7", type: SlDrawerTitle, isStandalone: true, selector: "[slDrawerTitle]", host: { attributes: { "data-part": "title" }, properties: { "id": "drawer.titleId" } }, exportAs: ["slDrawerTitle"], ngImport: i0 });
|
|
945
|
+
}
|
|
946
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlDrawerTitle, decorators: [{
|
|
947
|
+
type: Directive,
|
|
948
|
+
args: [{
|
|
949
|
+
selector: '[slDrawerTitle]',
|
|
950
|
+
standalone: true,
|
|
951
|
+
exportAs: 'slDrawerTitle',
|
|
952
|
+
host: { 'data-part': 'title', '[id]': 'drawer.titleId' },
|
|
953
|
+
}]
|
|
954
|
+
}] });
|
|
955
|
+
/** The sentence that says what the drawer is about. */
|
|
956
|
+
class SlDrawerDescription {
|
|
957
|
+
drawer = inject(SlDrawer);
|
|
958
|
+
ngOnInit() {
|
|
959
|
+
this.drawer.hasDescription.set(true);
|
|
960
|
+
}
|
|
961
|
+
ngOnDestroy() {
|
|
962
|
+
this.drawer.hasDescription.set(false);
|
|
963
|
+
}
|
|
964
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlDrawerDescription, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
965
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.7", type: SlDrawerDescription, isStandalone: true, selector: "[slDrawerDescription]", host: { attributes: { "data-part": "description" }, properties: { "id": "drawer.descriptionId" } }, exportAs: ["slDrawerDescription"], ngImport: i0 });
|
|
966
|
+
}
|
|
967
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlDrawerDescription, decorators: [{
|
|
968
|
+
type: Directive,
|
|
969
|
+
args: [{
|
|
970
|
+
selector: '[slDrawerDescription]',
|
|
971
|
+
standalone: true,
|
|
972
|
+
exportAs: 'slDrawerDescription',
|
|
973
|
+
host: { 'data-part': 'description', '[id]': 'drawer.descriptionId' },
|
|
974
|
+
}]
|
|
975
|
+
}] });
|
|
976
|
+
/**
|
|
977
|
+
* The one row that scrolls, and the row `aria-busy` belongs to while the
|
|
978
|
+
* content is still on its way — the header, the close button, Escape and the
|
|
979
|
+
* separator all stay operable, because a drawer a reader cannot leave is the
|
|
980
|
+
* worse failure of the two.
|
|
981
|
+
*/
|
|
982
|
+
class SlDrawerBody {
|
|
983
|
+
drawer = inject(SlDrawer);
|
|
984
|
+
/** `none` drops the body's own padding, for content that brings its own inset — a page, a list on the panel's edges. */
|
|
985
|
+
inset = input(undefined, /* @ts-ignore */
|
|
986
|
+
...(ngDevMode ? [{ debugName: "inset" }] : /* istanbul ignore next */ []));
|
|
987
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlDrawerBody, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
988
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.7", type: SlDrawerBody, isStandalone: true, selector: "[slDrawerBody]", inputs: { inset: { classPropertyName: "inset", publicName: "inset", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-part": "body" }, properties: { "attr.aria-busy": "drawer.loading() ? 'true' : null", "attr.data-inset": "inset() ?? null" } }, exportAs: ["slDrawerBody"], ngImport: i0 });
|
|
989
|
+
}
|
|
990
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlDrawerBody, decorators: [{
|
|
991
|
+
type: Directive,
|
|
992
|
+
args: [{
|
|
993
|
+
selector: '[slDrawerBody]',
|
|
994
|
+
standalone: true,
|
|
995
|
+
exportAs: 'slDrawerBody',
|
|
996
|
+
host: {
|
|
997
|
+
'data-part': 'body',
|
|
998
|
+
'[attr.aria-busy]': "drawer.loading() ? 'true' : null",
|
|
999
|
+
'[attr.data-inset]': 'inset() ?? null',
|
|
1000
|
+
},
|
|
1001
|
+
}]
|
|
1002
|
+
}], propDecorators: { inset: [{ type: i0.Input, args: [{ isSignal: true, alias: "inset", required: false }] }] } });
|
|
1003
|
+
class SlDrawerFooter {
|
|
1004
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlDrawerFooter, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1005
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.7", type: SlDrawerFooter, isStandalone: true, selector: "[slDrawerFooter]", host: { attributes: { "data-part": "footer" } }, exportAs: ["slDrawerFooter"], ngImport: i0 });
|
|
1006
|
+
}
|
|
1007
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlDrawerFooter, decorators: [{
|
|
1008
|
+
type: Directive,
|
|
1009
|
+
args: [{
|
|
1010
|
+
selector: '[slDrawerFooter]',
|
|
1011
|
+
standalone: true,
|
|
1012
|
+
exportAs: 'slDrawerFooter',
|
|
1013
|
+
host: { 'data-part': 'footer' },
|
|
1014
|
+
}]
|
|
1015
|
+
}] });
|
|
1016
|
+
/**
|
|
1017
|
+
* The ✕ in the corner. It carries `dismiss`, which is the word the closed
|
|
1018
|
+
* vocabulary in `docs/state-and-events.md` already has for what a close button
|
|
1019
|
+
* means, and its `value` rides out on the request as the result.
|
|
1020
|
+
*/
|
|
1021
|
+
class SlDrawerClose {
|
|
1022
|
+
/** The result the close carries out, which is the platform's `returnValue`. */
|
|
1023
|
+
value = input(undefined, /* @ts-ignore */
|
|
1024
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
1025
|
+
drawer = inject(SlDrawer);
|
|
1026
|
+
/** A consumer's own `aria-label`, which wins over the catalog. */
|
|
1027
|
+
ownLabel = inject(new HostAttributeToken('aria-label'), { optional: true });
|
|
1028
|
+
label = computed(() => this.ownLabel ?? this.drawer.t('close'), /* @ts-ignore */
|
|
1029
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
1030
|
+
press(event) {
|
|
1031
|
+
if (event.defaultPrevented)
|
|
1032
|
+
return;
|
|
1033
|
+
this.drawer.request(false, 'dismiss', this.value(), event);
|
|
1034
|
+
}
|
|
1035
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlDrawerClose, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1036
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.7", type: SlDrawerClose, isStandalone: true, selector: "[slDrawerClose]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-part": "close", "type": "button" }, listeners: { "click": "press($event)" }, properties: { "attr.aria-label": "label()" } }, exportAs: ["slDrawerClose"], ngImport: i0, template: `<ng-content
|
|
1037
|
+
><span slIcon><svg slGlyph name="x"></svg></span
|
|
1038
|
+
></ng-content>`, isInline: true, dependencies: [{ kind: "component", type: SlGlyph, selector: "svg[slGlyph]", inputs: ["name", "solid"] }, { kind: "component", type: SlIcon, selector: "[slIcon]", inputs: ["directional", "label", "size", "tone"], exportAs: ["slIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1039
|
+
}
|
|
1040
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlDrawerClose, decorators: [{
|
|
1041
|
+
type: Component,
|
|
1042
|
+
args: [{
|
|
1043
|
+
selector: '[slDrawerClose]',
|
|
1044
|
+
standalone: true,
|
|
1045
|
+
exportAs: 'slDrawerClose',
|
|
1046
|
+
imports: [SlGlyph, SlIcon],
|
|
1047
|
+
/* The cross is drawn unless the consumer wrote content of their own. */
|
|
1048
|
+
template: `<ng-content
|
|
1049
|
+
><span slIcon><svg slGlyph name="x"></svg></span
|
|
1050
|
+
></ng-content>`,
|
|
1051
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1052
|
+
host: {
|
|
1053
|
+
'data-part': 'close',
|
|
1054
|
+
type: 'button',
|
|
1055
|
+
'[attr.aria-label]': 'label()',
|
|
1056
|
+
'(click)': 'press($event)',
|
|
1057
|
+
},
|
|
1058
|
+
}]
|
|
1059
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }] } });
|
|
1060
|
+
/**
|
|
1061
|
+
* The separator the reader moves, from the WAI-ARIA Window Splitter pattern.
|
|
1062
|
+
*
|
|
1063
|
+
* **Rendering it is the capability.** There is no `resizable` input, so an
|
|
1064
|
+
* input with no separator, and a separator an input had switched off, are both
|
|
1065
|
+
* states this family cannot be in.
|
|
1066
|
+
*
|
|
1067
|
+
* The arrows are physical rather than logical, which is the pattern's own
|
|
1068
|
+
* reading: the key names a direction on the screen. `ArrowLeft` grows an
|
|
1069
|
+
* `end`-side panel in a left-to-right document and shrinks it in a mirrored
|
|
1070
|
+
* one, because there the panel is on the left and the reader is pushing its
|
|
1071
|
+
* edge toward the wall.
|
|
1072
|
+
*/
|
|
1073
|
+
/** How far a press on the separator may wander and still be a tap. */
|
|
1074
|
+
const TAP_SLOP_PX = 3;
|
|
1075
|
+
class SlDrawerResizer {
|
|
1076
|
+
/**
|
|
1077
|
+
* How far one arrow press moves the separator, **in pixels**, when there are
|
|
1078
|
+
* no snap points. A distance and not a proportion: a reader adjusting a pane
|
|
1079
|
+
* is placing an edge against the content beside it, and a proportion of a
|
|
1080
|
+
* wide layer is a jump.
|
|
1081
|
+
*/
|
|
1082
|
+
step = input(EXTENT_STEP_PX, /* @ts-ignore */
|
|
1083
|
+
...(ngDevMode ? [{ debugName: "step" }] : /* istanbul ignore next */ []));
|
|
1084
|
+
/** How far `Shift` and an arrow move it, in pixels. */
|
|
1085
|
+
largeStep = input(EXTENT_LARGE_STEP_PX, /* @ts-ignore */
|
|
1086
|
+
...(ngDevMode ? [{ debugName: "largeStep" }] : /* istanbul ignore next */ []));
|
|
1087
|
+
drawer = inject(SlDrawer);
|
|
1088
|
+
native = inject(ElementRef).nativeElement;
|
|
1089
|
+
/** Where the pointer last was, which is what decides a dismissal on release. */
|
|
1090
|
+
dragged = null;
|
|
1091
|
+
/** Where the pointer has been, for the velocity the release reads. */
|
|
1092
|
+
samples = [];
|
|
1093
|
+
/**
|
|
1094
|
+
* Where the press began and how far the panel's edge was from the pointer
|
|
1095
|
+
* then. The panel follows the pointer from that offset rather than jumping
|
|
1096
|
+
* its edge under it, so a press that does not move is a tap and moves nothing.
|
|
1097
|
+
*/
|
|
1098
|
+
press = null;
|
|
1099
|
+
/** What `Enter` restores to once it has collapsed the panel. */
|
|
1100
|
+
collapsed = null;
|
|
1101
|
+
/** What the document looked like before the drag, and how to put it back. */
|
|
1102
|
+
gesture = null;
|
|
1103
|
+
orientation = computed(() => isInlineSide(this.drawer.resolvedSide()) ? 'vertical' : 'horizontal', /* @ts-ignore */
|
|
1104
|
+
...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
1105
|
+
labelledBy = computed(() => this.drawer.hasTitle() ? this.drawer.titleId : null, /* @ts-ignore */
|
|
1106
|
+
...(ngDevMode ? [{ debugName: "labelledBy" }] : /* istanbul ignore next */ []));
|
|
1107
|
+
/* A content sheet may rest below `minExtent`, and its rest is still a value
|
|
1108
|
+
the range holds. */
|
|
1109
|
+
floor = computed(() => {
|
|
1110
|
+
const min = this.drawer.bounds().min;
|
|
1111
|
+
const rest = this.drawer.rest();
|
|
1112
|
+
return this.drawer.resolvedSize() === 'content' && rest !== undefined
|
|
1113
|
+
? Math.min(min, rest)
|
|
1114
|
+
: min;
|
|
1115
|
+
}, /* @ts-ignore */
|
|
1116
|
+
...(ngDevMode ? [{ debugName: "floor" }] : /* istanbul ignore next */ []));
|
|
1117
|
+
valueNow = computed(() => this.percent(clamp(this.current(), this.floor(), this.drawer.bounds().max)), /* @ts-ignore */
|
|
1118
|
+
...(ngDevMode ? [{ debugName: "valueNow" }] : /* istanbul ignore next */ []));
|
|
1119
|
+
percent(value) {
|
|
1120
|
+
return Math.round(clamp(value, 0, 1) * 100);
|
|
1121
|
+
}
|
|
1122
|
+
current() {
|
|
1123
|
+
return this.drawer.currentExtent() ?? this.drawer.rest() ?? this.drawer.bounds().min;
|
|
1124
|
+
}
|
|
1125
|
+
isRtl() {
|
|
1126
|
+
return getComputedStyle(this.native).direction === 'rtl';
|
|
1127
|
+
}
|
|
1128
|
+
span() {
|
|
1129
|
+
const box = this.drawer.measuringBox();
|
|
1130
|
+
if (box === null)
|
|
1131
|
+
return 0;
|
|
1132
|
+
const rect = box.getBoundingClientRect();
|
|
1133
|
+
return isInlineSide(this.drawer.resolvedSide()) ? rect.width : rect.height;
|
|
1134
|
+
}
|
|
1135
|
+
/**
|
|
1136
|
+
* The stops the keyboard, the release and a tap share. Without snap points
|
|
1137
|
+
* the range is continuous and there are none — the content stop joins only a
|
|
1138
|
+
* list the consumer started, or a separator with no stops would stop moving.
|
|
1139
|
+
*/
|
|
1140
|
+
stopsNow() {
|
|
1141
|
+
const panel = this.native.parentElement;
|
|
1142
|
+
if (panel === null || this.drawer.snapPoints().length === 0) {
|
|
1143
|
+
return { rest: this.drawer.rest(), stops: [] };
|
|
1144
|
+
}
|
|
1145
|
+
return this.drawer.measureStops(panel, this.span());
|
|
1146
|
+
}
|
|
1147
|
+
fractionAt(event) {
|
|
1148
|
+
const box = this.drawer.measuringBox();
|
|
1149
|
+
if (box === null)
|
|
1150
|
+
return null;
|
|
1151
|
+
return extentAtPoint({
|
|
1152
|
+
point: { x: event.clientX, y: event.clientY },
|
|
1153
|
+
rect: box.getBoundingClientRect(),
|
|
1154
|
+
rtl: this.isRtl(),
|
|
1155
|
+
side: this.drawer.resolvedSide(),
|
|
1156
|
+
});
|
|
1157
|
+
}
|
|
1158
|
+
pointerDown(event) {
|
|
1159
|
+
if (event.defaultPrevented || event.button !== 0)
|
|
1160
|
+
return;
|
|
1161
|
+
const fraction = this.fractionAt(event);
|
|
1162
|
+
if (fraction === null)
|
|
1163
|
+
return;
|
|
1164
|
+
event.preventDefault();
|
|
1165
|
+
this.native.setPointerCapture(event.pointerId);
|
|
1166
|
+
this.native.focus();
|
|
1167
|
+
this.press = {
|
|
1168
|
+
moved: false,
|
|
1169
|
+
offset: this.current() - fraction,
|
|
1170
|
+
x: event.clientX,
|
|
1171
|
+
y: event.clientY,
|
|
1172
|
+
};
|
|
1173
|
+
this.samples = [];
|
|
1174
|
+
}
|
|
1175
|
+
pointerMove(event) {
|
|
1176
|
+
const held = this.press;
|
|
1177
|
+
if (held === null)
|
|
1178
|
+
return;
|
|
1179
|
+
const at = this.fractionAt(event);
|
|
1180
|
+
if (at === null)
|
|
1181
|
+
return;
|
|
1182
|
+
if (!held.moved) {
|
|
1183
|
+
if (Math.hypot(event.clientX - held.x, event.clientY - held.y) < TAP_SLOP_PX)
|
|
1184
|
+
return;
|
|
1185
|
+
held.moved = true;
|
|
1186
|
+
/* The cursor has to survive the pointer leaving the separator, and a drag
|
|
1187
|
+
across the page must not select the text under it. Both are the
|
|
1188
|
+
document's and neither is reachable from the family's own stylesheet. */
|
|
1189
|
+
this.gesture?.();
|
|
1190
|
+
this.gesture = holdResizeGesture(this.native.ownerDocument, isInlineSide(this.drawer.resolvedSide()) ? 'col-resize' : 'row-resize');
|
|
1191
|
+
this.drawer.dragging.set(true);
|
|
1192
|
+
}
|
|
1193
|
+
const fraction = clamp(at + held.offset, 0, 1);
|
|
1194
|
+
this.dragged = fraction;
|
|
1195
|
+
/* Three samples is what `extentVelocity` reads; keeping more would only let
|
|
1196
|
+
an older, slower stretch of the same drag dilute the flick. */
|
|
1197
|
+
this.samples = [...this.samples, { at: event.timeStamp, fraction }].slice(-3);
|
|
1198
|
+
this.drawer.requestExtent(fraction, 'pointer', event);
|
|
1199
|
+
}
|
|
1200
|
+
/**
|
|
1201
|
+
* A tap walks the stops upward and wraps from the highest to the lowest,
|
|
1202
|
+
* which is what the grabber of a native sheet does and what Ionic calls
|
|
1203
|
+
* `handleBehavior="cycle"`. A separator with no stops has nowhere to walk.
|
|
1204
|
+
*/
|
|
1205
|
+
cycle(event) {
|
|
1206
|
+
const { rest, stops } = this.stopsNow();
|
|
1207
|
+
if (stops.length < 2)
|
|
1208
|
+
return;
|
|
1209
|
+
/* Where the panel is, read with the stops rather than from state a frame old. */
|
|
1210
|
+
const at = this.drawer.currentExtent() ?? rest ?? this.current();
|
|
1211
|
+
const next = stops.find((stop) => stop > at && !sameStop(stop, at)) ?? stops[0];
|
|
1212
|
+
this.drawer.requestExtent(this.drawer.asRequest(next, rest), 'pointer', event);
|
|
1213
|
+
}
|
|
1214
|
+
/**
|
|
1215
|
+
* Where the release lands. With stops it is `settleExtent`, the same rule
|
|
1216
|
+
* the sheet's body answers: the closed position is the stop `0`, a fling goes
|
|
1217
|
+
* to the next stop, anything slower to the nearest to where it was heading.
|
|
1218
|
+
* Without stops the range is continuous — resizing is what a separator does
|
|
1219
|
+
* on a desktop screen — and only the floor, or a fling toward the edge, asks
|
|
1220
|
+
* to close. A close the consumer cancels leaves the panel at the floor.
|
|
1221
|
+
*/
|
|
1222
|
+
endDrag(event) {
|
|
1223
|
+
const held = this.press;
|
|
1224
|
+
if (held === null)
|
|
1225
|
+
return;
|
|
1226
|
+
this.press = null;
|
|
1227
|
+
if (this.native.hasPointerCapture(event.pointerId)) {
|
|
1228
|
+
this.native.releasePointerCapture(event.pointerId);
|
|
1229
|
+
}
|
|
1230
|
+
if (!held.moved) {
|
|
1231
|
+
if (event.type === 'pointerup')
|
|
1232
|
+
this.cycle(event);
|
|
1233
|
+
return;
|
|
1234
|
+
}
|
|
1235
|
+
this.gesture?.();
|
|
1236
|
+
this.gesture = null;
|
|
1237
|
+
this.drawer.dragging.set(false);
|
|
1238
|
+
const bounds = this.drawer.bounds();
|
|
1239
|
+
const span = this.span();
|
|
1240
|
+
const last = this.dragged ?? this.current();
|
|
1241
|
+
const velocity = extentVelocity(this.samples);
|
|
1242
|
+
this.dragged = null;
|
|
1243
|
+
this.samples = [];
|
|
1244
|
+
const { rest, stops } = this.stopsNow();
|
|
1245
|
+
if (stops.length > 0) {
|
|
1246
|
+
const landed = settleExtent({ fraction: last, span, stops, velocity });
|
|
1247
|
+
if (landed === 'close') {
|
|
1248
|
+
this.drawer.request(false, 'pointer', undefined, event);
|
|
1249
|
+
this.drawer.requestExtent(stops[0], 'pointer', event);
|
|
1250
|
+
return;
|
|
1251
|
+
}
|
|
1252
|
+
this.drawer.requestExtent(this.drawer.asRequest(landed, rest), 'pointer', event);
|
|
1253
|
+
return;
|
|
1254
|
+
}
|
|
1255
|
+
if (last < bounds.min || velocity * span <= -SHEET_FLING_PX_PER_S) {
|
|
1256
|
+
this.drawer.request(false, 'pointer', undefined, event);
|
|
1257
|
+
this.drawer.requestExtent(bounds.min, 'pointer', event);
|
|
1258
|
+
return;
|
|
1259
|
+
}
|
|
1260
|
+
this.drawer.requestExtent(clamp(last, bounds.min, bounds.max), 'pointer', event);
|
|
1261
|
+
}
|
|
1262
|
+
/**
|
|
1263
|
+
* Back to the measure the size step gives it, which is what `undefined`
|
|
1264
|
+
* means for this state. It is the one gesture in the family that restores
|
|
1265
|
+
* rather than moves, and every desktop pane divider answers a double click
|
|
1266
|
+
* with it.
|
|
1267
|
+
*/
|
|
1268
|
+
restore(event) {
|
|
1269
|
+
if (event.defaultPrevented)
|
|
1270
|
+
return;
|
|
1271
|
+
event.preventDefault();
|
|
1272
|
+
this.drawer.restoreExtent('pointer', event);
|
|
1273
|
+
}
|
|
1274
|
+
keyDown(event) {
|
|
1275
|
+
if (event.defaultPrevented)
|
|
1276
|
+
return;
|
|
1277
|
+
const side = this.drawer.resolvedSide();
|
|
1278
|
+
const bounds = this.drawer.bounds();
|
|
1279
|
+
const inline = isInlineSide(side);
|
|
1280
|
+
const atStart = anchorsAtStart(side, this.isRtl());
|
|
1281
|
+
const towardFirstEdge = inline ? 'ArrowLeft' : 'ArrowUp';
|
|
1282
|
+
const towardLastEdge = inline ? 'ArrowRight' : 'ArrowDown';
|
|
1283
|
+
/**
|
|
1284
|
+
* A distance and not a proportion. Five per cent of a twelve-hundred-pixel
|
|
1285
|
+
* layer is sixty pixels, which is a jump rather than an adjustment; the
|
|
1286
|
+
* fraction is still what the family stores, and the pixels are converted
|
|
1287
|
+
* against the layer measured at the moment of the press.
|
|
1288
|
+
*/
|
|
1289
|
+
const box = this.drawer.measuringBox();
|
|
1290
|
+
const amount = box === null
|
|
1291
|
+
? 0
|
|
1292
|
+
: stepAmountFromPixels({
|
|
1293
|
+
pixels: event.shiftKey ? this.largeStep() : this.step(),
|
|
1294
|
+
rect: box.getBoundingClientRect(),
|
|
1295
|
+
side,
|
|
1296
|
+
});
|
|
1297
|
+
const { rest, stops } = this.stopsNow();
|
|
1298
|
+
const by = (direction) => {
|
|
1299
|
+
event.preventDefault();
|
|
1300
|
+
const next = stepExtent({
|
|
1301
|
+
amount,
|
|
1302
|
+
direction,
|
|
1303
|
+
fraction: this.current(),
|
|
1304
|
+
max: stops.at(-1) ?? bounds.max,
|
|
1305
|
+
min: stops[0] ?? bounds.min,
|
|
1306
|
+
snapPoints: stops,
|
|
1307
|
+
});
|
|
1308
|
+
this.drawer.requestExtent(this.drawer.asRequest(next, rest), 'keyboard', event);
|
|
1309
|
+
};
|
|
1310
|
+
/** The two ends of the range: the first and last stop when there are stops. */
|
|
1311
|
+
const to = (target) => {
|
|
1312
|
+
event.preventDefault();
|
|
1313
|
+
this.drawer.requestExtent(this.drawer.asRequest(target, rest), 'keyboard', event);
|
|
1314
|
+
};
|
|
1315
|
+
switch (event.key) {
|
|
1316
|
+
case towardFirstEdge:
|
|
1317
|
+
return by(atStart ? -1 : 1);
|
|
1318
|
+
case towardLastEdge:
|
|
1319
|
+
return by(atStart ? 1 : -1);
|
|
1320
|
+
case 'Home':
|
|
1321
|
+
return to(stops[0] ?? bounds.min);
|
|
1322
|
+
case 'End':
|
|
1323
|
+
return to(stops.at(-1) ?? bounds.max);
|
|
1324
|
+
/**
|
|
1325
|
+
* The pattern's own key, and the one departure from it: "collapses the
|
|
1326
|
+
* pane" would mean closing the drawer, and Escape already means that. A
|
|
1327
|
+
* reader who presses Enter on a separator expects the separator to still
|
|
1328
|
+
* be there afterwards.
|
|
1329
|
+
*/
|
|
1330
|
+
case 'Enter': {
|
|
1331
|
+
event.preventDefault();
|
|
1332
|
+
if (this.current() > bounds.min) {
|
|
1333
|
+
this.collapsed = this.current();
|
|
1334
|
+
return this.drawer.requestExtent(bounds.min, 'keyboard', event);
|
|
1335
|
+
}
|
|
1336
|
+
return this.drawer.requestExtent(this.collapsed ?? bounds.max, 'keyboard', event);
|
|
1337
|
+
}
|
|
1338
|
+
default:
|
|
1339
|
+
return;
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1342
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlDrawerResizer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1343
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.7", type: SlDrawerResizer, isStandalone: true, selector: "[slDrawerResizer]", inputs: { step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, largeStep: { classPropertyName: "largeStep", publicName: "largeStep", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-part": "resizer", "role": "separator", "tabindex": "0" }, listeners: { "pointerdown": "pointerDown($event)", "pointermove": "pointerMove($event)", "pointerup": "endDrag($event)", "lostpointercapture": "endDrag($event)", "keydown": "keyDown($event)", "dblclick": "restore($event)" }, properties: { "attr.aria-controls": "drawer.panelId", "attr.aria-labelledby": "labelledBy()", "attr.aria-orientation": "orientation()", "attr.aria-valuemin": "percent(floor())", "attr.aria-valuemax": "percent(drawer.bounds().max)", "attr.aria-valuenow": "valueNow()" } }, exportAs: ["slDrawerResizer"], ngImport: i0, template: `
|
|
1344
|
+
<span data-part="line" aria-hidden="true"></span>
|
|
1345
|
+
<span data-part="grip" aria-hidden="true"></span>
|
|
1346
|
+
<span data-part="line" aria-hidden="true"></span>
|
|
1347
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1348
|
+
}
|
|
1349
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlDrawerResizer, decorators: [{
|
|
1350
|
+
type: Component,
|
|
1351
|
+
args: [{
|
|
1352
|
+
selector: '[slDrawerResizer]',
|
|
1353
|
+
standalone: true,
|
|
1354
|
+
exportAs: 'slDrawerResizer',
|
|
1355
|
+
/**
|
|
1356
|
+
* A component rather than a directive, and the template is the whole reason:
|
|
1357
|
+
* the separator draws its own picture now — two hairlines and a grip, or a
|
|
1358
|
+
* pill on a block side — and a directive has nothing to draw them with.
|
|
1359
|
+
*
|
|
1360
|
+
* Three elements rather than pseudo-elements because
|
|
1361
|
+
* `packages/styles/src/fallbacks.test.mjs` forbids a system colour inside
|
|
1362
|
+
* `::before` or `::after`, and both steps these take have one as their last
|
|
1363
|
+
* resort. The selector is unchanged, so no consumer's template moves.
|
|
1364
|
+
*/
|
|
1365
|
+
template: `
|
|
1366
|
+
<span data-part="line" aria-hidden="true"></span>
|
|
1367
|
+
<span data-part="grip" aria-hidden="true"></span>
|
|
1368
|
+
<span data-part="line" aria-hidden="true"></span>
|
|
1369
|
+
`,
|
|
1370
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1371
|
+
encapsulation: ViewEncapsulation.None,
|
|
1372
|
+
host: {
|
|
1373
|
+
'data-part': 'resizer',
|
|
1374
|
+
role: 'separator',
|
|
1375
|
+
tabindex: '0',
|
|
1376
|
+
'[attr.aria-controls]': 'drawer.panelId',
|
|
1377
|
+
'[attr.aria-labelledby]': 'labelledBy()',
|
|
1378
|
+
'[attr.aria-orientation]': 'orientation()',
|
|
1379
|
+
'[attr.aria-valuemin]': 'percent(floor())',
|
|
1380
|
+
'[attr.aria-valuemax]': 'percent(drawer.bounds().max)',
|
|
1381
|
+
'[attr.aria-valuenow]': 'valueNow()',
|
|
1382
|
+
'(pointerdown)': 'pointerDown($event)',
|
|
1383
|
+
'(pointermove)': 'pointerMove($event)',
|
|
1384
|
+
'(pointerup)': 'endDrag($event)',
|
|
1385
|
+
'(lostpointercapture)': 'endDrag($event)',
|
|
1386
|
+
'(keydown)': 'keyDown($event)',
|
|
1387
|
+
'(dblclick)': 'restore($event)',
|
|
1388
|
+
},
|
|
1389
|
+
}]
|
|
1390
|
+
}], propDecorators: { step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], largeStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "largeStep", required: false }] }] } });
|
|
1391
|
+
|
|
1392
|
+
/**
|
|
1393
|
+
* Generated bundle index. Do not edit.
|
|
1394
|
+
*/
|
|
1395
|
+
|
|
1396
|
+
export { DRAWER_DEFAULTS, SlDrawer, SlDrawerBody, SlDrawerClose, SlDrawerDescription, SlDrawerFooter, SlDrawerHeader, SlDrawerIdFactory, SlDrawerResizer, SlDrawerTitle, SlDrawerTrigger, injectDrawerDefaults, provideDrawerDefaults };
|
|
1397
|
+
//# sourceMappingURL=slotted-angular-drawer.mjs.map
|