@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,916 @@
|
|
|
1
|
+
import { isSameDate, compareDate, plainDate, createDateFormat, yearPage, visibleMonths, stepMonth, todayIn, monthGrid, isDateInRange, stepYear, endOfWeek, startOfWeek, addDays, clampDate } from '@slotted/core/date';
|
|
2
|
+
import { createControllable } from '@slotted/core/state';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { InjectionToken, inject, input, numberAttribute, booleanAttribute, output, ElementRef, Injector, signal, computed, effect, afterNextRender, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
5
|
+
import { injectLocale, injectMessages } from '@slotted/angular/i18n';
|
|
6
|
+
import { SlGlyph, SlIcon } from '@slotted/angular/icon';
|
|
7
|
+
import { calendarMessages } from '@slotted/core/i18n';
|
|
8
|
+
|
|
9
|
+
const FALLBACK = {
|
|
10
|
+
calendar: 'gregory',
|
|
11
|
+
firstDayOfWeek: undefined,
|
|
12
|
+
fixedWeeks: false,
|
|
13
|
+
months: 1,
|
|
14
|
+
outsideDays: undefined,
|
|
15
|
+
timeZone: undefined,
|
|
16
|
+
weekNumbers: false,
|
|
17
|
+
};
|
|
18
|
+
const CALENDAR_DEFAULTS = new InjectionToken('slotted calendar defaults', {
|
|
19
|
+
providedIn: 'root',
|
|
20
|
+
factory: () => FALLBACK,
|
|
21
|
+
});
|
|
22
|
+
/**
|
|
23
|
+
* An application decides once which day its weeks start on, which zone answers
|
|
24
|
+
* "today" and whether its calendars keep a fixed six-row grid — rather than
|
|
25
|
+
* repeating the same inputs on every instance. Its words and the locale that
|
|
26
|
+
* writes its months come from the language in force (`provideSlotted`).
|
|
27
|
+
*
|
|
28
|
+
* `fixedWeeks` is the one worth setting where calendars live in popovers: a
|
|
29
|
+
* surface that grows a row between one press of "next" and the next moves the
|
|
30
|
+
* target the reader was aiming at.
|
|
31
|
+
*/
|
|
32
|
+
function provideCalendarDefaults(defaults) {
|
|
33
|
+
return {
|
|
34
|
+
provide: CALENDAR_DEFAULTS,
|
|
35
|
+
useFactory: () => ({ ...FALLBACK, ...defaults }),
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
/** What a calendar renders as here, before it states anything of its own. */
|
|
39
|
+
function injectCalendarDefaults() {
|
|
40
|
+
return inject(CALENDAR_DEFAULTS);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* What choosing a date does to a value, in the three modes the family ships.
|
|
45
|
+
*
|
|
46
|
+
* It is separate from the component because none of it touches the DOM: a
|
|
47
|
+
* range that is completed, a range that is restarted, and a set that a second
|
|
48
|
+
* press takes a date back out of are all arithmetic over `PlainDate`, and the
|
|
49
|
+
* two bindings must not each decide them.
|
|
50
|
+
*/
|
|
51
|
+
function isRange(value) {
|
|
52
|
+
return value !== null && !Array.isArray(value) && 'start' in value;
|
|
53
|
+
}
|
|
54
|
+
function asDates(value) {
|
|
55
|
+
if (value === null)
|
|
56
|
+
return [];
|
|
57
|
+
if (Array.isArray(value))
|
|
58
|
+
return value;
|
|
59
|
+
if (isRange(value))
|
|
60
|
+
return [value.start, value.end].filter((date) => date !== null);
|
|
61
|
+
return [value];
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Whether a date is one of the two ends of a run, inside it, or none of the
|
|
65
|
+
* three. A range with one end open has a start and no run, which is what the
|
|
66
|
+
* calendar draws while the reader is choosing the second date.
|
|
67
|
+
*/
|
|
68
|
+
function rangeStateOf(date, value) {
|
|
69
|
+
if (!isRange(value))
|
|
70
|
+
return null;
|
|
71
|
+
const { start, end } = value;
|
|
72
|
+
if (start !== null && isSameDate(date, start))
|
|
73
|
+
return 'start';
|
|
74
|
+
if (end !== null && isSameDate(date, end))
|
|
75
|
+
return 'end';
|
|
76
|
+
if (start === null || end === null)
|
|
77
|
+
return null;
|
|
78
|
+
return compareDate(date, start) > 0 && compareDate(date, end) < 0 ? 'inside' : null;
|
|
79
|
+
}
|
|
80
|
+
function isSelected(date, value) {
|
|
81
|
+
if (isRange(value)) {
|
|
82
|
+
const state = rangeStateOf(date, value);
|
|
83
|
+
return state === 'start' || state === 'end';
|
|
84
|
+
}
|
|
85
|
+
return asDates(value).some((candidate) => isSameDate(candidate, date));
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* The value a press produces.
|
|
89
|
+
*
|
|
90
|
+
* A range takes two presses and the second one may come first: a reader who
|
|
91
|
+
* chooses the 11th and then the 7th means the 7th to the 11th, not a range
|
|
92
|
+
* that runs backwards. A third press starts again, because a range that grew
|
|
93
|
+
* on every press could never be narrowed.
|
|
94
|
+
*
|
|
95
|
+
* A set removes a date a second press lands on, which is the only way to take
|
|
96
|
+
* one back out without a second control.
|
|
97
|
+
*/
|
|
98
|
+
function nextValue(date, value, mode) {
|
|
99
|
+
if (mode === 'single') {
|
|
100
|
+
return isSelected(date, value) ? null : date;
|
|
101
|
+
}
|
|
102
|
+
if (mode === 'multiple') {
|
|
103
|
+
const held = asDates(value);
|
|
104
|
+
const without = held.filter((candidate) => !isSameDate(candidate, date));
|
|
105
|
+
if (without.length !== held.length)
|
|
106
|
+
return without;
|
|
107
|
+
return [...held, date].sort(compareDate);
|
|
108
|
+
}
|
|
109
|
+
const run = isRange(value) ? value : { start: null, end: null };
|
|
110
|
+
if (run.start === null || run.end !== null)
|
|
111
|
+
return { start: date, end: null };
|
|
112
|
+
return compareDate(date, run.start) < 0
|
|
113
|
+
? { start: date, end: run.start }
|
|
114
|
+
: { start: run.start, end: date };
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* The run the grid draws while the reader is choosing the second end: from
|
|
118
|
+
* the chosen start to the pending end — the day under the pointer, or the
|
|
119
|
+
* focused day — ordered the way the second press will order it. `null` while
|
|
120
|
+
* there is no open run, so a whole range and a single date preview nothing.
|
|
121
|
+
*/
|
|
122
|
+
function previewRun(value, pending) {
|
|
123
|
+
if (pending === null || !isRange(value) || value.start === null || value.end !== null)
|
|
124
|
+
return null;
|
|
125
|
+
return compareDate(pending, value.start) < 0
|
|
126
|
+
? { start: pending, end: value.start }
|
|
127
|
+
: { start: value.start, end: pending };
|
|
128
|
+
}
|
|
129
|
+
/** Value equality, which `Object.is` cannot give for a run or a set. */
|
|
130
|
+
function isSameValue(a, b) {
|
|
131
|
+
if (isRange(a) || isRange(b)) {
|
|
132
|
+
if (!isRange(a) || !isRange(b))
|
|
133
|
+
return false;
|
|
134
|
+
return isSameDate(a.start, b.start) && isSameDate(a.end, b.end);
|
|
135
|
+
}
|
|
136
|
+
const left = asDates(a);
|
|
137
|
+
const right = asDates(b);
|
|
138
|
+
if (left.length !== right.length)
|
|
139
|
+
return false;
|
|
140
|
+
return left.every((date, index) => isSameDate(date, right[index] ?? null));
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/** How many years one page of the year view holds. */
|
|
144
|
+
const YEAR_PAGE = 12;
|
|
145
|
+
/** The heading needs an identifier every grid can point `aria-labelledby` at. */
|
|
146
|
+
let sequence = 0;
|
|
147
|
+
/**
|
|
148
|
+
* A month grid, and the two pages above it.
|
|
149
|
+
*
|
|
150
|
+
* **It is a real `table` with the `grid` role on it.** The APG's own note is
|
|
151
|
+
* why nothing here writes `row`, `columnheader` or `gridcell`: those are
|
|
152
|
+
* implied by `tr`, `th` and `td`, and writing them again would duplicate
|
|
153
|
+
* semantics the platform already gives.
|
|
154
|
+
*
|
|
155
|
+
* **The date the reader is on and the date the reader has chosen are two
|
|
156
|
+
* values**, and each has a model of its own — a product that pages a calendar
|
|
157
|
+
* from outside it has nowhere else to say so.
|
|
158
|
+
*
|
|
159
|
+
* **A date the predicate refuses stays reachable.** It carries `aria-disabled`
|
|
160
|
+
* rather than being taken out of the grid, so a reader can arrow onto it, hear
|
|
161
|
+
* why it is out, and arrow past it.
|
|
162
|
+
*/
|
|
163
|
+
class SlCalendar {
|
|
164
|
+
/** Present means the consumer owns the value. */
|
|
165
|
+
value = input(undefined, /* @ts-ignore */
|
|
166
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
167
|
+
defaultValue = input(undefined, /* @ts-ignore */
|
|
168
|
+
...(ngDevMode ? [{ debugName: "defaultValue" }] : /* istanbul ignore next */ []));
|
|
169
|
+
/** The date the reader is on. Present means the consumer owns it. */
|
|
170
|
+
focusedDate = input(undefined, /* @ts-ignore */
|
|
171
|
+
...(ngDevMode ? [{ debugName: "focusedDate" }] : /* istanbul ignore next */ []));
|
|
172
|
+
defaultFocusedDate = input(undefined, /* @ts-ignore */
|
|
173
|
+
...(ngDevMode ? [{ debugName: "defaultFocusedDate" }] : /* istanbul ignore next */ []));
|
|
174
|
+
min = input(undefined, /* @ts-ignore */
|
|
175
|
+
...(ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []));
|
|
176
|
+
max = input(undefined, /* @ts-ignore */
|
|
177
|
+
...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
|
|
178
|
+
isDateUnavailable = input(undefined, /* @ts-ignore */
|
|
179
|
+
...(ngDevMode ? [{ debugName: "isDateUnavailable" }] : /* istanbul ignore next */ []));
|
|
180
|
+
selectionMode = input('single', /* @ts-ignore */
|
|
181
|
+
...(ngDevMode ? [{ debugName: "selectionMode" }] : /* istanbul ignore next */ []));
|
|
182
|
+
months = input(undefined, { ...(ngDevMode ? { debugName: "months" } : /* istanbul ignore next */ {}), transform: (value) => value === undefined || value === null ? undefined : numberAttribute(value) });
|
|
183
|
+
/** Present means the consumer owns which grid is showing. */
|
|
184
|
+
view = input(undefined, /* @ts-ignore */
|
|
185
|
+
...(ngDevMode ? [{ debugName: "view" }] : /* istanbul ignore next */ []));
|
|
186
|
+
defaultView = input(undefined, /* @ts-ignore */
|
|
187
|
+
...(ngDevMode ? [{ debugName: "defaultView" }] : /* istanbul ignore next */ []));
|
|
188
|
+
weekNumbers = input(undefined, { ...(ngDevMode ? { debugName: "weekNumbers" } : /* istanbul ignore next */ {}), transform: (value) => (value === undefined ? undefined : booleanAttribute(value)) });
|
|
189
|
+
fixedWeeks = input(undefined, { ...(ngDevMode ? { debugName: "fixedWeeks" } : /* istanbul ignore next */ {}), transform: (value) => (value === undefined ? undefined : booleanAttribute(value)) });
|
|
190
|
+
outsideDays = input(undefined, /* @ts-ignore */
|
|
191
|
+
...(ngDevMode ? [{ debugName: "outsideDays" }] : /* istanbul ignore next */ []));
|
|
192
|
+
/** The locale that writes months and days. Unset, the language in force decides. */
|
|
193
|
+
locale = input(undefined, /* @ts-ignore */
|
|
194
|
+
...(ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []));
|
|
195
|
+
timeZone = input(undefined, /* @ts-ignore */
|
|
196
|
+
...(ngDevMode ? [{ debugName: "timeZone" }] : /* istanbul ignore next */ []));
|
|
197
|
+
firstDayOfWeek = input(undefined, { ...(ngDevMode ? { debugName: "firstDayOfWeek" } : /* istanbul ignore next */ {}), transform: (value) => value === undefined || value === null ? undefined : numberAttribute(value) });
|
|
198
|
+
calendar = input(undefined, /* @ts-ignore */
|
|
199
|
+
...(ngDevMode ? [{ debugName: "calendar" }] : /* istanbul ignore next */ []));
|
|
200
|
+
disabled = input(undefined, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: (value) => (value === undefined ? undefined : booleanAttribute(value)) });
|
|
201
|
+
readOnly = input(undefined, { ...(ngDevMode ? { debugName: "readOnly" } : /* istanbul ignore next */ {}), transform: (value) => (value === undefined ? undefined : booleanAttribute(value)) });
|
|
202
|
+
invalid = input(undefined, { ...(ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {}), transform: (value) => (value === undefined ? undefined : booleanAttribute(value)) });
|
|
203
|
+
/**
|
|
204
|
+
* Words laid over the catalog of the language in force, key by key: the
|
|
205
|
+
* names of the previous and next triggers.
|
|
206
|
+
*/
|
|
207
|
+
messages = input(undefined, /* @ts-ignore */
|
|
208
|
+
...(ngDevMode ? [{ debugName: "messages" }] : /* istanbul ignore next */ []));
|
|
209
|
+
valueChange = output();
|
|
210
|
+
focusedDateChange = output();
|
|
211
|
+
viewChange = output();
|
|
212
|
+
/**
|
|
213
|
+
* The pending end of an open run: the day under the pointer, or the focused
|
|
214
|
+
* day when no pointer is over the grid, and `null` while no run is open. A
|
|
215
|
+
* fact the grid states rather than a value the consumer owns, which is why
|
|
216
|
+
* it is an output and not a model — `date-range-picker` reads it to say how
|
|
217
|
+
* long the run would be.
|
|
218
|
+
*/
|
|
219
|
+
previewChange = output();
|
|
220
|
+
element = inject(ElementRef).nativeElement;
|
|
221
|
+
injector = inject(Injector);
|
|
222
|
+
defaults = injectCalendarDefaults();
|
|
223
|
+
appLocale = injectLocale();
|
|
224
|
+
/** The family's words in the language in force, with this calendar's `messages` laid over them. */
|
|
225
|
+
t = injectMessages(calendarMessages, this.messages);
|
|
226
|
+
headingId = `sl-calendar-${String((sequence += 1))}`;
|
|
227
|
+
ownValue = signal(null, /* @ts-ignore */
|
|
228
|
+
...(ngDevMode ? [{ debugName: "ownValue" }] : /* istanbul ignore next */ []));
|
|
229
|
+
ownFocused = signal(plainDate(2026, 1, 1), /* @ts-ignore */
|
|
230
|
+
...(ngDevMode ? [{ debugName: "ownFocused" }] : /* istanbul ignore next */ []));
|
|
231
|
+
ownView = signal('day', /* @ts-ignore */
|
|
232
|
+
...(ngDevMode ? [{ debugName: "ownView" }] : /* istanbul ignore next */ []));
|
|
233
|
+
/**
|
|
234
|
+
* The first month on screen, which is **not** the month the reader is on.
|
|
235
|
+
*
|
|
236
|
+
* Drawing two months from the focused date meant that choosing a day in the
|
|
237
|
+
* second one scrolled the pair: a reader looking at June and July who chose
|
|
238
|
+
* 9 June was shown July and August, with half of what they had just chosen
|
|
239
|
+
* off screen. The page moves only when the reader leaves it.
|
|
240
|
+
*/
|
|
241
|
+
page = signal({ year: 2026, month: 1 }, /* @ts-ignore */
|
|
242
|
+
...(ngDevMode ? [{ debugName: "page" }] : /* istanbul ignore next */ []));
|
|
243
|
+
today = signal(null, /* @ts-ignore */
|
|
244
|
+
...(ngDevMode ? [{ debugName: "today" }] : /* istanbul ignore next */ []));
|
|
245
|
+
/** Focus is only moved into the DOM after a key, never on a render. */
|
|
246
|
+
restoreFocus = false;
|
|
247
|
+
held = computed(() => this.value() ?? this.ownValue(), /* @ts-ignore */
|
|
248
|
+
...(ngDevMode ? [{ debugName: "held" }] : /* istanbul ignore next */ []));
|
|
249
|
+
focused = computed(() => this.focusedDate() ?? this.ownFocused(), /* @ts-ignore */
|
|
250
|
+
...(ngDevMode ? [{ debugName: "focused" }] : /* istanbul ignore next */ []));
|
|
251
|
+
/** Which grid is showing. Public, so a template reaches it through `exportAs`. */
|
|
252
|
+
currentView = computed(() => this.view() ?? this.ownView(), /* @ts-ignore */
|
|
253
|
+
...(ngDevMode ? [{ debugName: "currentView" }] : /* istanbul ignore next */ []));
|
|
254
|
+
resolvedMonths = computed(() => Math.max(1, this.months() ?? this.defaults.months), /* @ts-ignore */
|
|
255
|
+
...(ngDevMode ? [{ debugName: "resolvedMonths" }] : /* istanbul ignore next */ []));
|
|
256
|
+
resolvedWeekNumbers = computed(() => this.weekNumbers() ?? this.defaults.weekNumbers, /* @ts-ignore */
|
|
257
|
+
...(ngDevMode ? [{ debugName: "resolvedWeekNumbers" }] : /* istanbul ignore next */ []));
|
|
258
|
+
resolvedFixedWeeks = computed(() => this.fixedWeeks() ?? this.defaults.fixedWeeks, /* @ts-ignore */
|
|
259
|
+
...(ngDevMode ? [{ debugName: "resolvedFixedWeeks" }] : /* istanbul ignore next */ []));
|
|
260
|
+
/**
|
|
261
|
+
* One month draws the days either side of it, because a week that starts on
|
|
262
|
+
* the 30th of the month before has to say what that cell is. Two months
|
|
263
|
+
* cannot: September's grid ends with the first three days of October and
|
|
264
|
+
* October's begins with the last four of September, so a range across the
|
|
265
|
+
* boundary is painted twice and a reader sees an interval twice as long as
|
|
266
|
+
* the one chosen. Every surveyed multi-month calendar hides them, and so
|
|
267
|
+
* does this one — until the consumer says otherwise, on the instance or on
|
|
268
|
+
* the provider.
|
|
269
|
+
*/
|
|
270
|
+
resolvedOutsideDays = computed(() => this.outsideDays() ??
|
|
271
|
+
this.defaults.outsideDays ??
|
|
272
|
+
(this.resolvedMonths() > 1 ? 'hidden' : 'shown'), /* @ts-ignore */
|
|
273
|
+
...(ngDevMode ? [{ debugName: "resolvedOutsideDays" }] : /* istanbul ignore next */ []));
|
|
274
|
+
resolvedCalendar = computed(() => this.calendar() ?? this.defaults.calendar, /* @ts-ignore */
|
|
275
|
+
...(ngDevMode ? [{ debugName: "resolvedCalendar" }] : /* istanbul ignore next */ []));
|
|
276
|
+
editable = computed(() => this.disabled() !== true && this.readOnly() !== true, /* @ts-ignore */
|
|
277
|
+
...(ngDevMode ? [{ debugName: "editable" }] : /* istanbul ignore next */ []));
|
|
278
|
+
format = computed(() => createDateFormat({
|
|
279
|
+
locale: this.locale() ?? this.appLocale(),
|
|
280
|
+
firstDayOfWeek: this.firstDayOfWeek() ?? this.defaults.firstDayOfWeek,
|
|
281
|
+
}), /* @ts-ignore */
|
|
282
|
+
...(ngDevMode ? [{ debugName: "format" }] : /* istanbul ignore next */ []));
|
|
283
|
+
weekdayLong = computed(() => this.format().weekdayNames('long'), /* @ts-ignore */
|
|
284
|
+
...(ngDevMode ? [{ debugName: "weekdayLong" }] : /* istanbul ignore next */ []));
|
|
285
|
+
weekdayNarrow = computed(() => this.format().weekdayNames('narrow'), /* @ts-ignore */
|
|
286
|
+
...(ngDevMode ? [{ debugName: "weekdayNarrow" }] : /* istanbul ignore next */ []));
|
|
287
|
+
monthNames = computed(() => this.format().monthNames('short'), /* @ts-ignore */
|
|
288
|
+
...(ngDevMode ? [{ debugName: "monthNames" }] : /* istanbul ignore next */ []));
|
|
289
|
+
years = computed(() => yearPage(this.focused().year, YEAR_PAGE), /* @ts-ignore */
|
|
290
|
+
...(ngDevMode ? [{ debugName: "years" }] : /* istanbul ignore next */ []));
|
|
291
|
+
shownMonths = computed(() => visibleMonths(this.page(), this.resolvedMonths()), /* @ts-ignore */
|
|
292
|
+
...(ngDevMode ? [{ debugName: "shownMonths" }] : /* istanbul ignore next */ []));
|
|
293
|
+
heading = computed(() => {
|
|
294
|
+
const focused = this.focused();
|
|
295
|
+
const format = this.format();
|
|
296
|
+
if (this.currentView() === 'year') {
|
|
297
|
+
const years = this.years();
|
|
298
|
+
return `${String(years[0] ?? focused.year)} – ${String(years.at(-1) ?? focused.year)}`;
|
|
299
|
+
}
|
|
300
|
+
if (this.currentView() === 'month')
|
|
301
|
+
return String(focused.year);
|
|
302
|
+
const page = this.page();
|
|
303
|
+
const start = plainDate(page.year, page.month, 1);
|
|
304
|
+
if (this.resolvedMonths() === 1)
|
|
305
|
+
return format.monthYear(start);
|
|
306
|
+
const last = stepMonth(start, this.resolvedMonths() - 1).date;
|
|
307
|
+
return `${format.monthYear(start, 'short')} – ${format.monthYear(last, 'short')}`;
|
|
308
|
+
}, /* @ts-ignore */
|
|
309
|
+
...(ngDevMode ? [{ debugName: "heading" }] : /* istanbul ignore next */ []));
|
|
310
|
+
constructor() {
|
|
311
|
+
/**
|
|
312
|
+
* The page follows the reader, and only when the reader has left it.
|
|
313
|
+
* Written as an effect rather than inside the request, so a consumer who
|
|
314
|
+
* owns `focusedDate` and moves it from outside is followed too.
|
|
315
|
+
*/
|
|
316
|
+
/* The pending end, reported once per change and never while it is the
|
|
317
|
+
same day: a pointer crossing a cell twice is one fact, not two. */
|
|
318
|
+
let reported = null;
|
|
319
|
+
effect(() => {
|
|
320
|
+
const end = this.previewEnd();
|
|
321
|
+
if (isSameDate(reported, end))
|
|
322
|
+
return;
|
|
323
|
+
reported = end;
|
|
324
|
+
this.previewChange.emit(end);
|
|
325
|
+
});
|
|
326
|
+
effect(() => {
|
|
327
|
+
const focused = this.focused();
|
|
328
|
+
const held = this.page();
|
|
329
|
+
const span = this.resolvedMonths();
|
|
330
|
+
const start = held.year * 12 + (held.month - 1);
|
|
331
|
+
const wanted = focused.year * 12 + (focused.month - 1);
|
|
332
|
+
if (wanted >= start && wanted < start + span)
|
|
333
|
+
return;
|
|
334
|
+
/* Outside the span: the page moves by whole pages, so a reader stepping
|
|
335
|
+
past the edge lands where the arrows would have taken them. */
|
|
336
|
+
const moved = start + Math.floor((wanted - start) / span) * span;
|
|
337
|
+
this.page.set({ year: Math.floor(moved / 12), month: (moved % 12) + 1 });
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
ngOnInit() {
|
|
341
|
+
this.ownValue.set(this.defaultValue() ?? null);
|
|
342
|
+
this.ownView.set(this.defaultView() ?? 'day');
|
|
343
|
+
this.today.set(todayIn(this.timeZone() ?? this.defaults.timeZone));
|
|
344
|
+
const start = this.startingDate();
|
|
345
|
+
this.ownFocused.set(start);
|
|
346
|
+
this.page.set({ year: start.year, month: start.month });
|
|
347
|
+
}
|
|
348
|
+
/** Puts focus on the cell holding the roving tab stop. */
|
|
349
|
+
focus() {
|
|
350
|
+
this.element.querySelector('[data-part="day"][tabindex="0"]')?.focus();
|
|
351
|
+
}
|
|
352
|
+
/** Moves the reader to a date, paging the grid to reach it. */
|
|
353
|
+
focusDate(date) {
|
|
354
|
+
this.requestFocused(date, 'programmatic', undefined);
|
|
355
|
+
}
|
|
356
|
+
/** The date, the run or the set the calendar holds. */
|
|
357
|
+
selection = computed(() => this.held(), /* @ts-ignore */
|
|
358
|
+
...(ngDevMode ? [{ debugName: "selection" }] : /* istanbul ignore next */ []));
|
|
359
|
+
captionOf(month) {
|
|
360
|
+
return this.format().monthYear(plainDate(month.year, month.month, 1));
|
|
361
|
+
}
|
|
362
|
+
weeksOf(month) {
|
|
363
|
+
return monthGrid({
|
|
364
|
+
...month,
|
|
365
|
+
firstDayOfWeek: this.format().firstDayOfWeek,
|
|
366
|
+
fixedWeeks: this.resolvedFixedWeeks(),
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
unavailable(date) {
|
|
370
|
+
if (!isDateInRange(date, this.min(), this.max()))
|
|
371
|
+
return true;
|
|
372
|
+
return this.isDateUnavailable()?.(date) === true;
|
|
373
|
+
}
|
|
374
|
+
/** Unavailable, or an outside day the axis says may not be chosen. */
|
|
375
|
+
/** Whether the cell carries a day at all, or stands empty to fill the row. */
|
|
376
|
+
drawn(day) {
|
|
377
|
+
return !(day.outsideMonth && this.resolvedOutsideDays() === 'hidden');
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* The grid already knows which month a day belongs to, and asking the first
|
|
381
|
+
* shown month instead refused every day of the second one in a pair.
|
|
382
|
+
*/
|
|
383
|
+
refused(day) {
|
|
384
|
+
if (this.unavailable(day.date))
|
|
385
|
+
return true;
|
|
386
|
+
return day.outsideMonth && this.resolvedOutsideDays() === 'shown';
|
|
387
|
+
}
|
|
388
|
+
chosen(date) {
|
|
389
|
+
return isSelected(date, this.held());
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* The day under the pointer, held only to name the pending end of an open
|
|
393
|
+
* run. It never moves the roving focus: a pointer crossing the grid is not
|
|
394
|
+
* the reader choosing where they are.
|
|
395
|
+
*/
|
|
396
|
+
hovered = signal(null, /* @ts-ignore */
|
|
397
|
+
...(ngDevMode ? [{ debugName: "hovered" }] : /* istanbul ignore next */ []));
|
|
398
|
+
/** The run as it would close on the pending end; `null` while no run is open. */
|
|
399
|
+
pending = computed(() => this.selectionMode() === 'range' && this.editable()
|
|
400
|
+
? previewRun(this.held(), this.hovered() ?? this.focused())
|
|
401
|
+
: null, /* @ts-ignore */
|
|
402
|
+
...(ngDevMode ? [{ debugName: "pending" }] : /* istanbul ignore next */ []));
|
|
403
|
+
previewEnd = computed(() => {
|
|
404
|
+
const pending = this.pending();
|
|
405
|
+
const held = this.held();
|
|
406
|
+
if (pending === null)
|
|
407
|
+
return null;
|
|
408
|
+
return isRange(held) && held.start !== null && isSameDate(pending.start, held.start)
|
|
409
|
+
? pending.end
|
|
410
|
+
: pending.start;
|
|
411
|
+
}, /* @ts-ignore */
|
|
412
|
+
...(ngDevMode ? [{ debugName: "previewEnd" }] : /* istanbul ignore next */ []));
|
|
413
|
+
rangeState(date) {
|
|
414
|
+
return rangeStateOf(date, this.pending() ?? this.held());
|
|
415
|
+
}
|
|
416
|
+
/** Every cell of the pending band is a proposal except the start the reader chose. */
|
|
417
|
+
proposed(date) {
|
|
418
|
+
return this.pending() !== null && this.rangeState(date) !== null && !this.chosen(date);
|
|
419
|
+
}
|
|
420
|
+
isToday(date) {
|
|
421
|
+
const today = this.today();
|
|
422
|
+
return today !== null && isSameDate(date, today);
|
|
423
|
+
}
|
|
424
|
+
tabIndexOf(date) {
|
|
425
|
+
return isSameDate(date, this.focused()) && this.editable() ? 0 : -1;
|
|
426
|
+
}
|
|
427
|
+
select(date, reason, source) {
|
|
428
|
+
if (!this.editable() || this.unavailable(date))
|
|
429
|
+
return;
|
|
430
|
+
this.requestValue(nextValue(date, this.held(), this.selectionMode()), reason, source);
|
|
431
|
+
this.requestFocused(date, reason, source);
|
|
432
|
+
}
|
|
433
|
+
/** The reader moves with the page rather than staying behind it. */
|
|
434
|
+
turnPage(direction, source) {
|
|
435
|
+
const focused = this.focused();
|
|
436
|
+
if (this.currentView() === 'day') {
|
|
437
|
+
this.requestFocused(stepMonth(focused, direction * this.resolvedMonths()).date, 'pointer', source);
|
|
438
|
+
return;
|
|
439
|
+
}
|
|
440
|
+
const step = this.currentView() === 'month' ? direction : direction * YEAR_PAGE;
|
|
441
|
+
this.requestFocused(stepYear(focused, step).date, 'pointer', source);
|
|
442
|
+
}
|
|
443
|
+
walkUp() {
|
|
444
|
+
this.setView(this.currentView() === 'day' ? 'month' : 'year');
|
|
445
|
+
}
|
|
446
|
+
pickMonth(month, source) {
|
|
447
|
+
this.requestFocused({ ...this.focused(), month, day: 1 }, 'pointer', source);
|
|
448
|
+
this.setView('day');
|
|
449
|
+
}
|
|
450
|
+
pickYear(year, source) {
|
|
451
|
+
this.requestFocused({ ...this.focused(), year, day: 1 }, 'pointer', source);
|
|
452
|
+
this.setView('month');
|
|
453
|
+
}
|
|
454
|
+
onKeyDown(event) {
|
|
455
|
+
const rtl = getComputedStyle(this.element).direction === 'rtl';
|
|
456
|
+
const forward = rtl ? 'ArrowLeft' : 'ArrowRight';
|
|
457
|
+
const backward = rtl ? 'ArrowRight' : 'ArrowLeft';
|
|
458
|
+
const focused = this.focused();
|
|
459
|
+
const first = this.format().firstDayOfWeek;
|
|
460
|
+
/**
|
|
461
|
+
* A key the grid acted on is the grid's, and nothing above it sees it.
|
|
462
|
+
* An application that binds a bare key guards it with "is the target an
|
|
463
|
+
* editable element", and a `td` is not one — so the arrows a reader walks
|
|
464
|
+
* a month with would fire every shortcut on the page.
|
|
465
|
+
*/
|
|
466
|
+
const consume = () => {
|
|
467
|
+
event.preventDefault();
|
|
468
|
+
event.stopPropagation();
|
|
469
|
+
};
|
|
470
|
+
const move = (next) => {
|
|
471
|
+
consume();
|
|
472
|
+
this.requestFocused(next, 'keyboard', event);
|
|
473
|
+
};
|
|
474
|
+
switch (event.key) {
|
|
475
|
+
case forward:
|
|
476
|
+
return move(addDays(focused, 1));
|
|
477
|
+
case backward:
|
|
478
|
+
return move(addDays(focused, -1));
|
|
479
|
+
case 'ArrowUp':
|
|
480
|
+
return move(addDays(focused, -7));
|
|
481
|
+
case 'ArrowDown':
|
|
482
|
+
return move(addDays(focused, 7));
|
|
483
|
+
case 'Home':
|
|
484
|
+
return move(startOfWeek(focused, first));
|
|
485
|
+
case 'End':
|
|
486
|
+
return move(endOfWeek(focused, first));
|
|
487
|
+
case 'PageUp':
|
|
488
|
+
return move(event.shiftKey ? stepYear(focused, -1).date : stepMonth(focused, -1).date);
|
|
489
|
+
case 'PageDown':
|
|
490
|
+
return move(event.shiftKey ? stepYear(focused, 1).date : stepMonth(focused, 1).date);
|
|
491
|
+
case 'Enter':
|
|
492
|
+
case ' ':
|
|
493
|
+
consume();
|
|
494
|
+
this.select(focused, 'keyboard', event);
|
|
495
|
+
return;
|
|
496
|
+
case 'Escape':
|
|
497
|
+
/* The view closes before the surface does, which is the staging
|
|
498
|
+
`dismissable-layer` asks a family to do: the key is simply not
|
|
499
|
+
passed on, and no layer is asked to close. */
|
|
500
|
+
/* In the day view the key is left alone, so a surface above the
|
|
501
|
+
calendar may still close on it. */
|
|
502
|
+
if (this.currentView() === 'day')
|
|
503
|
+
return;
|
|
504
|
+
consume();
|
|
505
|
+
this.setView(this.currentView() === 'year' ? 'month' : 'day');
|
|
506
|
+
return;
|
|
507
|
+
default:
|
|
508
|
+
return;
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
/**
|
|
512
|
+
* The first date the reader is put on: what a consumer said, then the value
|
|
513
|
+
* it holds, then today. A calendar that opened on an arbitrary month would
|
|
514
|
+
* make the reader page to now before doing anything at all.
|
|
515
|
+
*/
|
|
516
|
+
startingDate() {
|
|
517
|
+
const stated = this.defaultFocusedDate() ?? this.focusedDate();
|
|
518
|
+
if (stated !== undefined)
|
|
519
|
+
return stated;
|
|
520
|
+
const held = this.defaultValue() ?? this.value() ?? null;
|
|
521
|
+
if (held !== null) {
|
|
522
|
+
if (Array.isArray(held)) {
|
|
523
|
+
const first = held[0];
|
|
524
|
+
if (first !== undefined)
|
|
525
|
+
return first;
|
|
526
|
+
}
|
|
527
|
+
else if ('start' in held) {
|
|
528
|
+
if (held.start !== null)
|
|
529
|
+
return held.start;
|
|
530
|
+
}
|
|
531
|
+
else {
|
|
532
|
+
return held;
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
return clampDate(this.today() ?? plainDate(2026, 1, 1), this.min(), this.max());
|
|
536
|
+
}
|
|
537
|
+
setView(next) {
|
|
538
|
+
if (this.view() === undefined)
|
|
539
|
+
this.ownView.set(next);
|
|
540
|
+
this.viewChange.emit(next);
|
|
541
|
+
}
|
|
542
|
+
requestValue(next, reason, source) {
|
|
543
|
+
const state = createControllable({
|
|
544
|
+
controlled: this.value(),
|
|
545
|
+
initial: this.held(),
|
|
546
|
+
equals: isSameValue,
|
|
547
|
+
onRequest: (request) => this.valueChange.emit(request),
|
|
548
|
+
});
|
|
549
|
+
if (state.request(next, reason, source))
|
|
550
|
+
this.ownValue.set(next);
|
|
551
|
+
}
|
|
552
|
+
requestFocused(next, reason, source) {
|
|
553
|
+
const bounded = clampDate(next, this.min(), this.max());
|
|
554
|
+
const state = createControllable({
|
|
555
|
+
controlled: this.focusedDate(),
|
|
556
|
+
initial: this.focused(),
|
|
557
|
+
equals: (a, b) => isSameDate(a, b),
|
|
558
|
+
onRequest: (request) => this.focusedDateChange.emit(request),
|
|
559
|
+
});
|
|
560
|
+
this.restoreFocus = reason === 'keyboard';
|
|
561
|
+
if (state.request(bounded, reason, source))
|
|
562
|
+
this.ownFocused.set(bounded);
|
|
563
|
+
if (this.restoreFocus)
|
|
564
|
+
this.followFocus();
|
|
565
|
+
}
|
|
566
|
+
/**
|
|
567
|
+
* Focus follows a key onto the cell that holds the roving tab stop, once the
|
|
568
|
+
* page holding it is rendered.
|
|
569
|
+
*
|
|
570
|
+
* A key that crosses the month edge lands on the old page's trailing day
|
|
571
|
+
* first, and the page follows one render later. Focused before that, the
|
|
572
|
+
* cell was replaced under the reader and focus fell to the document — which
|
|
573
|
+
* a consumer owning `focusedDate` met on every crossing. Focus is moved only
|
|
574
|
+
* while it is still in the calendar or was lost to the document, so a
|
|
575
|
+
* consumer that refused the move never has focus taken from elsewhere.
|
|
576
|
+
*/
|
|
577
|
+
followFocus() {
|
|
578
|
+
afterNextRender(() => {
|
|
579
|
+
if (!this.restoreFocus)
|
|
580
|
+
return;
|
|
581
|
+
const active = this.element.ownerDocument.activeElement;
|
|
582
|
+
const lost = active === null || active === this.element.ownerDocument.body;
|
|
583
|
+
if (!lost && !this.element.contains(active)) {
|
|
584
|
+
this.restoreFocus = false;
|
|
585
|
+
return;
|
|
586
|
+
}
|
|
587
|
+
const stop = this.element.querySelector('[data-part="cell"]:not([data-outside-month]) [data-part="day"][tabindex="0"]');
|
|
588
|
+
if (stop !== null) {
|
|
589
|
+
this.restoreFocus = false;
|
|
590
|
+
stop.focus();
|
|
591
|
+
return;
|
|
592
|
+
}
|
|
593
|
+
if (this.element.querySelector('[data-part="day"][tabindex="0"]') === null) {
|
|
594
|
+
this.restoreFocus = false;
|
|
595
|
+
return;
|
|
596
|
+
}
|
|
597
|
+
this.followFocus();
|
|
598
|
+
}, { injector: this.injector });
|
|
599
|
+
}
|
|
600
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlCalendar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
601
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: SlCalendar, isStandalone: true, selector: "[slCalendar]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null }, focusedDate: { classPropertyName: "focusedDate", publicName: "focusedDate", isSignal: true, isRequired: false, transformFunction: null }, defaultFocusedDate: { classPropertyName: "defaultFocusedDate", publicName: "defaultFocusedDate", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, isDateUnavailable: { classPropertyName: "isDateUnavailable", publicName: "isDateUnavailable", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, months: { classPropertyName: "months", publicName: "months", isSignal: true, isRequired: false, transformFunction: null }, view: { classPropertyName: "view", publicName: "view", isSignal: true, isRequired: false, transformFunction: null }, defaultView: { classPropertyName: "defaultView", publicName: "defaultView", isSignal: true, isRequired: false, transformFunction: null }, weekNumbers: { classPropertyName: "weekNumbers", publicName: "weekNumbers", isSignal: true, isRequired: false, transformFunction: null }, fixedWeeks: { classPropertyName: "fixedWeeks", publicName: "fixedWeeks", isSignal: true, isRequired: false, transformFunction: null }, outsideDays: { classPropertyName: "outsideDays", publicName: "outsideDays", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, timeZone: { classPropertyName: "timeZone", publicName: "timeZone", isSignal: true, isRequired: false, transformFunction: null }, firstDayOfWeek: { classPropertyName: "firstDayOfWeek", publicName: "firstDayOfWeek", isSignal: true, isRequired: false, transformFunction: null }, calendar: { classPropertyName: "calendar", publicName: "calendar", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, messages: { classPropertyName: "messages", publicName: "messages", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", focusedDateChange: "focusedDateChange", viewChange: "viewChange", previewChange: "previewChange" }, host: { attributes: { "data-ui": "calendar", "data-part": "root" }, listeners: { "keydown": "onKeyDown($event)" }, properties: { "attr.data-view": "currentView()", "attr.data-calendar": "resolvedCalendar()", "attr.data-months": "resolvedMonths() > 1 ? resolvedMonths() : null", "attr.data-week-numbers": "resolvedWeekNumbers() ? '' : null", "attr.data-disabled": "disabled() === true ? '' : null", "attr.data-readonly": "readOnly() === true ? '' : null", "attr.data-invalid": "invalid() === true ? '' : null" } }, exportAs: ["slCalendar"], ngImport: i0, template: `<div data-part="header">
|
|
602
|
+
<button
|
|
603
|
+
data-part="previous"
|
|
604
|
+
type="button"
|
|
605
|
+
[attr.aria-label]="t('previous')"
|
|
606
|
+
[disabled]="!editable()"
|
|
607
|
+
(click)="turnPage(-1, $event)"
|
|
608
|
+
>
|
|
609
|
+
<span slIcon directional><svg slGlyph name="chevron-right"></svg></span>
|
|
610
|
+
</button>
|
|
611
|
+
<!--
|
|
612
|
+
The heading is a live region: paging with a key changes nothing that
|
|
613
|
+
focus lands on, so without this nothing announces the new month.
|
|
614
|
+
-->
|
|
615
|
+
<button
|
|
616
|
+
data-part="heading"
|
|
617
|
+
type="button"
|
|
618
|
+
aria-live="polite"
|
|
619
|
+
[attr.id]="headingId"
|
|
620
|
+
[disabled]="!editable() || currentView() === 'year'"
|
|
621
|
+
(click)="walkUp()"
|
|
622
|
+
>
|
|
623
|
+
{{ heading() }}
|
|
624
|
+
@if (currentView() !== 'year') {
|
|
625
|
+
<span slIcon><svg slGlyph name="chevron-down"></svg></span>
|
|
626
|
+
}
|
|
627
|
+
</button>
|
|
628
|
+
<button
|
|
629
|
+
data-part="next"
|
|
630
|
+
type="button"
|
|
631
|
+
[attr.aria-label]="t('next')"
|
|
632
|
+
[disabled]="!editable()"
|
|
633
|
+
(click)="turnPage(1, $event)"
|
|
634
|
+
>
|
|
635
|
+
<span slIcon directional><svg slGlyph name="chevron-right"></svg></span>
|
|
636
|
+
</button>
|
|
637
|
+
</div>
|
|
638
|
+
|
|
639
|
+
@switch (currentView()) {
|
|
640
|
+
@case ('day') {
|
|
641
|
+
<div data-part="grids">
|
|
642
|
+
@for (month of shownMonths(); track month.year * 12 + month.month) {
|
|
643
|
+
<table data-part="grid" role="grid" [attr.aria-labelledby]="headingId">
|
|
644
|
+
<caption data-part="grid-caption">
|
|
645
|
+
{{
|
|
646
|
+
captionOf(month)
|
|
647
|
+
}}
|
|
648
|
+
</caption>
|
|
649
|
+
<thead>
|
|
650
|
+
<tr data-part="week-headers">
|
|
651
|
+
@if (resolvedWeekNumbers()) {
|
|
652
|
+
<th data-part="week-number" aria-hidden="true"></th>
|
|
653
|
+
}
|
|
654
|
+
@for (name of weekdayNarrow(); track $index) {
|
|
655
|
+
<th data-part="week-header" scope="col" [attr.abbr]="weekdayLong()[$index]">
|
|
656
|
+
{{ name }}
|
|
657
|
+
</th>
|
|
658
|
+
}
|
|
659
|
+
</tr>
|
|
660
|
+
</thead>
|
|
661
|
+
<tbody>
|
|
662
|
+
@for (week of weeksOf(month); track week.weekNumber) {
|
|
663
|
+
<tr data-part="week">
|
|
664
|
+
@if (resolvedWeekNumbers()) {
|
|
665
|
+
<th data-part="week-number" scope="row">{{ week.weekNumber }}</th>
|
|
666
|
+
}
|
|
667
|
+
@for (
|
|
668
|
+
day of week.days;
|
|
669
|
+
track day.date.year * 400 + day.date.month * 32 + day.date.day
|
|
670
|
+
) {
|
|
671
|
+
<!-- A hidden day is an empty cell and nothing else. It
|
|
672
|
+
carried the marks of the date it stood for, so a
|
|
673
|
+
range across a month boundary painted a band with no
|
|
674
|
+
digits under it. -->
|
|
675
|
+
<td
|
|
676
|
+
data-part="cell"
|
|
677
|
+
[attr.data-outside-month]="day.outsideMonth ? '' : null"
|
|
678
|
+
[attr.data-unavailable]="
|
|
679
|
+
!drawn(day) ? null : unavailable(day.date) ? '' : null
|
|
680
|
+
"
|
|
681
|
+
[attr.data-selected]="!drawn(day) ? null : chosen(day.date) ? '' : null"
|
|
682
|
+
[attr.data-range-start]="
|
|
683
|
+
drawn(day) && rangeState(day.date) === 'start' ? '' : null
|
|
684
|
+
"
|
|
685
|
+
[attr.data-range-end]="
|
|
686
|
+
drawn(day) && rangeState(day.date) === 'end' ? '' : null
|
|
687
|
+
"
|
|
688
|
+
[attr.data-in-range]="
|
|
689
|
+
drawn(day) && rangeState(day.date) === 'inside' ? '' : null
|
|
690
|
+
"
|
|
691
|
+
[attr.data-preview]="drawn(day) && proposed(day.date) ? '' : null"
|
|
692
|
+
>
|
|
693
|
+
@if (drawn(day)) {
|
|
694
|
+
<span
|
|
695
|
+
data-part="day"
|
|
696
|
+
role="button"
|
|
697
|
+
[attr.data-today]="isToday(day.date) ? '' : null"
|
|
698
|
+
[attr.aria-selected]="chosen(day.date) ? 'true' : null"
|
|
699
|
+
[attr.aria-disabled]="refused(day) ? 'true' : null"
|
|
700
|
+
[tabindex]="tabIndexOf(day.date)"
|
|
701
|
+
(click)="!refused(day) && select(day.date, 'pointer', $event)"
|
|
702
|
+
(pointerenter)="hovered.set(day.date)"
|
|
703
|
+
(pointerleave)="hovered.set(null)"
|
|
704
|
+
>
|
|
705
|
+
{{ day.date.day }}
|
|
706
|
+
</span>
|
|
707
|
+
}
|
|
708
|
+
</td>
|
|
709
|
+
}
|
|
710
|
+
</tr>
|
|
711
|
+
}
|
|
712
|
+
</tbody>
|
|
713
|
+
</table>
|
|
714
|
+
}
|
|
715
|
+
</div>
|
|
716
|
+
}
|
|
717
|
+
@case ('month') {
|
|
718
|
+
<div data-part="months">
|
|
719
|
+
@for (name of monthNames(); track $index) {
|
|
720
|
+
<button
|
|
721
|
+
data-part="period"
|
|
722
|
+
type="button"
|
|
723
|
+
[attr.data-selected]="focused().month === $index + 1 ? '' : null"
|
|
724
|
+
[attr.aria-selected]="focused().month === $index + 1 ? 'true' : null"
|
|
725
|
+
(click)="pickMonth($index + 1, $event)"
|
|
726
|
+
>
|
|
727
|
+
{{ name }}
|
|
728
|
+
</button>
|
|
729
|
+
}
|
|
730
|
+
</div>
|
|
731
|
+
}
|
|
732
|
+
@default {
|
|
733
|
+
<div data-part="years">
|
|
734
|
+
@for (year of years(); track year) {
|
|
735
|
+
<button
|
|
736
|
+
data-part="period"
|
|
737
|
+
type="button"
|
|
738
|
+
[attr.data-selected]="focused().year === year ? '' : null"
|
|
739
|
+
[attr.aria-selected]="focused().year === year ? 'true' : null"
|
|
740
|
+
(click)="pickYear(year, $event)"
|
|
741
|
+
>
|
|
742
|
+
{{ year }}
|
|
743
|
+
</button>
|
|
744
|
+
}
|
|
745
|
+
</div>
|
|
746
|
+
}
|
|
747
|
+
}`, isInline: true, styles: ["@layer slotted.components{[data-ui=calendar][data-part=root]{container-type:inline-size;container-name:slotted-calendar;--_font-size: var(--slotted-control-font-size-md, 13px);--_gap: var(--slotted-control-gap-md, 8px);--_icon-size: var(--slotted-control-icon-size-md, 16px);--_cell-size: var(--slotted-calendar-cell-size, var(--slotted-control-height-md, 34px));--_columns: 7;--_months: 1;--_month-gap: var(--slotted-space-6, 1rem);--_week-number-columns: 0;--_grid-size: calc(var(--_cell-size) * (var(--_columns) + var(--_week-number-columns)));background-color:var(--slotted-calendar-background, transparent);box-sizing:border-box;color:var(--slotted-calendar-color, var(--slotted-text, CanvasText));display:flex;flex-direction:column;font-family:var(--slotted-control-font-family, system-ui, sans-serif);font-size:var(--_font-size);gap:var(--_gap);--_heading-floor: calc(20ch + 3 * var(--_icon-size) + 4 * var(--_gap));inline-size:max(calc(var(--_grid-size) * var(--_months) + var(--_month-gap) * (var(--_months) - 1)),var(--_heading-floor));max-inline-size:100%}[data-ui=calendar][data-part=root][data-week-numbers]{--_week-number-columns: .75}[data-ui=calendar][data-part=root][data-months=\"2\"]{--_months: 2}[data-ui=calendar][data-part=root][data-months=\"3\"]{--_months: 3}[data-ui=calendar] [data-part=header],[data-ui=calendar] [data-part=grids],[data-ui=calendar] [data-part=months],[data-ui=calendar] [data-part=years]{--_cell-size: clamp( var(--slotted-target-min, 24px), calc(100cqi / (var(--_columns) + var(--_week-number-columns)) / var(--_months)), var(--slotted-calendar-cell-size, var(--slotted-control-height-md, 34px)) )}[data-ui=calendar] [data-part=header]{align-items:center;display:flex;gap:var(--slotted-space-2, .25rem);inline-size:100%;justify-content:space-between}[data-ui=calendar] [data-part=heading]{--slotted-icon-size: var(--_icon-size);appearance:none;background-color:transparent;border:0;border-radius:var(--slotted-calendar-radius, var(--slotted-control-radius, 4px));color:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:var(--slotted-space-2, .25rem);font:inherit;font-weight:var(--slotted-font-weight-semibold, 600);flex:1 1 auto;justify-content:safe center;min-inline-size:0;padding-block:var(--slotted-space-2, .25rem);padding-inline:var(--slotted-space-2, .25rem);overflow:hidden;white-space:nowrap;transition:background-color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);-webkit-tap-highlight-color:transparent}[data-ui=calendar] [data-part=previous],[data-ui=calendar] [data-part=next]{--slotted-icon-size: var(--_icon-size);align-items:center;appearance:none;background-color:transparent;block-size:var(--_cell-size);border:0;border-radius:var(--slotted-calendar-radius, var(--slotted-control-radius, 4px));color:var(--slotted-calendar-trigger-color, var(--slotted-text-muted, GrayText));cursor:pointer;display:inline-flex;flex:0 0 auto;inline-size:var(--_cell-size);justify-content:center;padding:0;touch-action:manipulation;transition:background-color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing),color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);-webkit-tap-highlight-color:transparent}[data-ui=calendar] [data-part=previous]>[data-ui=icon]{rotate:180deg}[data-ui=calendar] [data-part=grids]{display:flex;flex-wrap:wrap;gap:var(--_month-gap);justify-content:center}[data-ui=calendar] [data-part=grid]{border-collapse:collapse;table-layout:fixed}[data-ui=calendar] [data-part=grid-caption]{block-size:1px;clip-path:inset(50%);inline-size:1px;overflow:hidden;position:absolute;white-space:nowrap}[data-ui=calendar][data-part=root]:is([data-months=\"2\"],[data-months=\"3\"]) [data-part=grid-caption]{block-size:auto;clip-path:none;color:var(--slotted-calendar-weekday-color, var(--slotted-text-muted, GrayText));font-size:var(--slotted-font-size-xs, .75rem);font-weight:var(--slotted-font-weight-semibold, 600);inline-size:auto;overflow:visible;padding-block-end:var(--slotted-space-2, .25rem);position:static}[data-ui=calendar] [data-part=week-header]{block-size:var(--_cell-size);color:var(--slotted-calendar-weekday-color, var(--slotted-text-muted, GrayText));font-size:var(--slotted-font-size-xs, .75rem);font-weight:var(--slotted-font-weight-medium, 500);inline-size:var(--_cell-size);padding:0;text-overflow:clip}[data-ui=calendar] [data-part=week-number]{color:var(--slotted-calendar-week-number-color, var(--slotted-text-muted, GrayText));font-size:var(--slotted-font-size-xs, .75rem);font-variant-numeric:tabular-nums;font-weight:var(--slotted-font-weight-regular, 400);inline-size:calc(var(--_cell-size) * .75);padding:0;border-inline-end:var(--slotted-border-width-thin, 1px) solid var(--slotted-calendar-week-number-border-color, var(--slotted-border-subtle, ButtonBorder))}[data-ui=calendar] [data-part=cell]{padding:0;position:relative}[data-ui=calendar] [data-part=day]{--_inset: var(--slotted-border-width-thin, 1px);align-items:center;block-size:calc(var(--_cell-size) - var(--_inset) * 2);inline-size:calc(var(--_cell-size) - var(--_inset) * 2);margin:var(--_inset);border-radius:var(--slotted-calendar-day-radius, var(--slotted-radius-sm, 4px));box-sizing:border-box;color:inherit;cursor:pointer;display:flex;font-variant-numeric:tabular-nums;flex-direction:column;gap:var(--slotted-space-1, .125rem);justify-content:center;line-height:1;position:relative;transition:background-color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing),color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}[data-ui=calendar] [data-part=day]:after{content:\"\";inset:min(0px,calc((100% - var(--slotted-target-min, 24px)) / 2));position:absolute}[data-ui=calendar] [data-part=months],[data-ui=calendar] [data-part=years]{display:grid;gap:var(--slotted-space-2, .25rem);grid-template-columns:repeat(4,1fr);inline-size:calc(var(--_cell-size) * var(--_columns))}[data-ui=calendar] [data-part=period]{align-items:center;appearance:none;background-color:transparent;block-size:var(--_cell-size);border:0;border-radius:var(--slotted-calendar-day-radius, var(--slotted-radius-sm, 4px));color:inherit;cursor:pointer;display:flex;font:inherit;justify-content:center;padding-inline:var(--slotted-space-2, .25rem);transition:background-color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing),color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);-webkit-tap-highlight-color:transparent}[data-ui=calendar] [data-part=day][data-today]{color:var(--slotted-calendar-today-color, var(--slotted-tone-accent-text));font-weight:var(--slotted-font-weight-semibold, 600)}[data-ui=calendar] [data-part=day]:before{background-color:transparent;block-size:var(--slotted-space-2, .25rem);border-radius:var(--slotted-radius-full, 9999px);content:\"\";flex:0 0 auto;inline-size:var(--slotted-space-2, .25rem);order:1}[data-ui=calendar] [data-part=day][data-today]:before{background-color:currentcolor}[data-ui=calendar] [data-part=cell][data-outside-month] [data-part=day]{color:var(--slotted-calendar-outside-color, var(--slotted-text-muted, GrayText))}[data-ui=calendar] [data-part=cell][data-unavailable] [data-part=day]{color:var(--slotted-calendar-unavailable-color, var(--slotted-disabled-foreground));cursor:not-allowed;text-decoration:line-through;text-decoration-thickness:var(--slotted-border-width-thin, 1px)}[data-ui=calendar] [data-part=cell][data-in-range]:before,[data-ui=calendar] [data-part=cell][data-range-start]:before,[data-ui=calendar] [data-part=cell][data-range-end]:before{background-color:var( --slotted-calendar-range-background, color-mix( in oklab, var(--slotted-tone-accent-text) calc(var(--slotted-highlight-tint-opacity, .075) * 100%), transparent ) );content:\"\";inset:0;position:absolute}[data-ui=calendar] [data-part=cell][data-range-start]:before{border-end-start-radius:var(--slotted-calendar-day-radius, var(--slotted-radius-sm, 4px));border-start-start-radius:var(--slotted-calendar-day-radius, var(--slotted-radius-sm, 4px))}[data-ui=calendar] [data-part=cell][data-range-end]:before{border-end-end-radius:var(--slotted-calendar-day-radius, var(--slotted-radius-sm, 4px));border-start-end-radius:var(--slotted-calendar-day-radius, var(--slotted-radius-sm, 4px))}[data-ui=calendar] [data-part=cell][data-range-start]:not([data-range-end]) [data-part=day]{border-end-end-radius:0;border-start-end-radius:0}[data-ui=calendar] [data-part=cell][data-range-end]:not([data-range-start]) [data-part=day]{border-end-start-radius:0;border-start-start-radius:0}[data-ui=calendar] [data-part=cell]:is([data-in-range],[data-range-start],[data-range-end]) [data-part=day]{--_inset: 0px}[data-ui=calendar] [data-part=cell][data-in-range] [data-part=day]{border-radius:0;color:var(--slotted-calendar-in-range-color, var(--slotted-tone-accent-text))}[data-ui=calendar] [data-part=cell][data-preview]:before{background-color:var( --slotted-calendar-preview-background, color-mix( in oklab, var(--slotted-tone-accent-text) calc(var(--slotted-highlight-tint-opacity, .075) * 50%), transparent ) )}[data-ui=calendar] [data-part=cell][data-preview]:is([data-range-start],[data-range-end]):not([data-selected]) [data-part=day]{box-shadow:inset 0 0 0 var(--slotted-border-width-thin, 1px) var(--slotted-calendar-preview-border-color, var(--slotted-tone-accent-border));color:var(--slotted-calendar-in-range-color, var(--slotted-tone-accent-text))}[data-ui=calendar] [data-part=day]:hover:not([data-disabled]),[data-ui=calendar] [data-part=period]:hover:not(:disabled):not([data-disabled]),[data-ui=calendar] [data-part=heading]:hover:not(:disabled):not([data-disabled]),[data-ui=calendar] [data-part=previous]:hover:not(:disabled):not([data-disabled]),[data-ui=calendar] [data-part=next]:hover:not(:disabled):not([data-disabled]){background-color:var( --slotted-calendar-hover-background, var(--slotted-tone-secondary-subtle-hover) )}[data-ui=calendar] [data-part=day]:active:not([data-disabled]),[data-ui=calendar] [data-part=period]:active:not(:disabled):not([data-disabled]),[data-ui=calendar] [data-part=previous]:active:not(:disabled):not([data-disabled]),[data-ui=calendar] [data-part=next]:active:not(:disabled):not([data-disabled]){background-color:var( --slotted-calendar-active-background, var(--slotted-tone-secondary-subtle-active) )}[data-ui=calendar] [data-part=cell][data-in-range] [data-part=day]:hover:not([data-disabled]){background-color:var( --slotted-calendar-range-hover-background, var(--slotted-tone-accent-subtle-hover) )}[data-ui=calendar] [data-part=cell][data-in-range] [data-part=day]:active:not([data-disabled]){background-color:var( --slotted-calendar-range-active-background, var(--slotted-tone-accent-subtle-active) )}[data-ui=calendar] [data-part=cell][data-unavailable] [data-part=day]:hover:not([data-disabled]),[data-ui=calendar] [data-part=cell][data-unavailable] [data-part=day]:active:not([data-disabled]){background-color:transparent}[data-ui=calendar] [data-part=cell][data-selected] [data-part=day],[data-ui=calendar] [data-part=period][data-selected]{background-color:var(--slotted-calendar-selected-background, var(--slotted-tone-accent-solid));color:var(--slotted-calendar-selected-color, var(--slotted-tone-accent-on-solid));font-weight:var(--slotted-font-weight-semibold, 600)}[data-ui=calendar] [data-part=day]:focus-visible,[data-ui=calendar] [data-part=period]:focus-visible,[data-ui=calendar] [data-part=heading]:focus-visible,[data-ui=calendar] [data-part=previous]:focus-visible,[data-ui=calendar] [data-part=next]:focus-visible{outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:calc(var(--slotted-focus-ring-offset, 2px) * -1)}[data-ui=calendar][data-part=root][data-invalid]{--slotted-focus-ring-color: var( --slotted-calendar-invalid-focus-ring-color, var(--slotted-focus-ring-color-invalid, Highlight) )}[data-ui=calendar][data-part=root][data-invalid] [data-part=day]:focus-visible,[data-ui=calendar][data-part=root][data-invalid] [data-part=period]:focus-visible,[data-ui=calendar][data-part=root][data-invalid] [data-part=heading]:focus-visible,[data-ui=calendar][data-part=root][data-invalid] [data-part=previous]:focus-visible,[data-ui=calendar][data-part=root][data-invalid] [data-part=next]:focus-visible{--_invalid-ring: calc( var(--slotted-focus-ring-width, 2px) + var(--slotted-calendar-invalid-edge-width, var(--slotted-control-invalid-edge-width, 1px)) );outline-offset:calc(var(--_invalid-ring) * -1);outline-width:var(--_invalid-ring)}[data-ui=calendar][data-part=root][data-readonly] [data-part=day],[data-ui=calendar][data-part=root][data-readonly] [data-part=period]{cursor:default}[data-ui=calendar][data-part=root][data-disabled]{color:var(--slotted-calendar-disabled-color, var(--slotted-disabled-foreground))}[data-ui=calendar][data-part=root][data-disabled] [data-part=day][data-today]{color:var(--slotted-disabled-foreground)}[data-ui=calendar][data-part=root][data-disabled] [data-part=cell][data-selected] [data-part=day]{background-color:var(--slotted-disabled-background);color:var(--slotted-disabled-foreground)}[data-ui=calendar][data-part=root][data-disabled] [data-part=day],[data-ui=calendar][data-part=root][data-disabled] [data-part=period],[data-ui=calendar][data-part=root][data-disabled] [data-part=previous],[data-ui=calendar][data-part=root][data-disabled] [data-part=next],[data-ui=calendar][data-part=root][data-disabled] [data-part=heading]{cursor:not-allowed}[data-ui=calendar] [data-part=previous]:disabled,[data-ui=calendar] [data-part=next]:disabled{color:var(--slotted-disabled-foreground);cursor:not-allowed}@container slotted-calendar (max-width: 320px){[data-ui=calendar] [data-part=grids]{--_month-gap: var(--slotted-space-4, .5rem)}}@media(forced-colors:active){[data-ui=calendar] [data-part=cell][data-in-range]:before,[data-ui=calendar] [data-part=cell][data-range-start]:before,[data-ui=calendar] [data-part=cell][data-range-end]:before{border-block:var(--slotted-border-width-thin, 1px) solid var(--slotted-calendar-range-border-color, var(--slotted-tone-accent-border))}[data-ui=calendar] [data-part=cell][data-preview]:before{border-block-style:dashed}}}\n"], 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, encapsulation: i0.ViewEncapsulation.None });
|
|
748
|
+
}
|
|
749
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlCalendar, decorators: [{
|
|
750
|
+
type: Component,
|
|
751
|
+
args: [{ selector: '[slCalendar]', standalone: true, exportAs: 'slCalendar', imports: [SlGlyph, SlIcon], template: `<div data-part="header">
|
|
752
|
+
<button
|
|
753
|
+
data-part="previous"
|
|
754
|
+
type="button"
|
|
755
|
+
[attr.aria-label]="t('previous')"
|
|
756
|
+
[disabled]="!editable()"
|
|
757
|
+
(click)="turnPage(-1, $event)"
|
|
758
|
+
>
|
|
759
|
+
<span slIcon directional><svg slGlyph name="chevron-right"></svg></span>
|
|
760
|
+
</button>
|
|
761
|
+
<!--
|
|
762
|
+
The heading is a live region: paging with a key changes nothing that
|
|
763
|
+
focus lands on, so without this nothing announces the new month.
|
|
764
|
+
-->
|
|
765
|
+
<button
|
|
766
|
+
data-part="heading"
|
|
767
|
+
type="button"
|
|
768
|
+
aria-live="polite"
|
|
769
|
+
[attr.id]="headingId"
|
|
770
|
+
[disabled]="!editable() || currentView() === 'year'"
|
|
771
|
+
(click)="walkUp()"
|
|
772
|
+
>
|
|
773
|
+
{{ heading() }}
|
|
774
|
+
@if (currentView() !== 'year') {
|
|
775
|
+
<span slIcon><svg slGlyph name="chevron-down"></svg></span>
|
|
776
|
+
}
|
|
777
|
+
</button>
|
|
778
|
+
<button
|
|
779
|
+
data-part="next"
|
|
780
|
+
type="button"
|
|
781
|
+
[attr.aria-label]="t('next')"
|
|
782
|
+
[disabled]="!editable()"
|
|
783
|
+
(click)="turnPage(1, $event)"
|
|
784
|
+
>
|
|
785
|
+
<span slIcon directional><svg slGlyph name="chevron-right"></svg></span>
|
|
786
|
+
</button>
|
|
787
|
+
</div>
|
|
788
|
+
|
|
789
|
+
@switch (currentView()) {
|
|
790
|
+
@case ('day') {
|
|
791
|
+
<div data-part="grids">
|
|
792
|
+
@for (month of shownMonths(); track month.year * 12 + month.month) {
|
|
793
|
+
<table data-part="grid" role="grid" [attr.aria-labelledby]="headingId">
|
|
794
|
+
<caption data-part="grid-caption">
|
|
795
|
+
{{
|
|
796
|
+
captionOf(month)
|
|
797
|
+
}}
|
|
798
|
+
</caption>
|
|
799
|
+
<thead>
|
|
800
|
+
<tr data-part="week-headers">
|
|
801
|
+
@if (resolvedWeekNumbers()) {
|
|
802
|
+
<th data-part="week-number" aria-hidden="true"></th>
|
|
803
|
+
}
|
|
804
|
+
@for (name of weekdayNarrow(); track $index) {
|
|
805
|
+
<th data-part="week-header" scope="col" [attr.abbr]="weekdayLong()[$index]">
|
|
806
|
+
{{ name }}
|
|
807
|
+
</th>
|
|
808
|
+
}
|
|
809
|
+
</tr>
|
|
810
|
+
</thead>
|
|
811
|
+
<tbody>
|
|
812
|
+
@for (week of weeksOf(month); track week.weekNumber) {
|
|
813
|
+
<tr data-part="week">
|
|
814
|
+
@if (resolvedWeekNumbers()) {
|
|
815
|
+
<th data-part="week-number" scope="row">{{ week.weekNumber }}</th>
|
|
816
|
+
}
|
|
817
|
+
@for (
|
|
818
|
+
day of week.days;
|
|
819
|
+
track day.date.year * 400 + day.date.month * 32 + day.date.day
|
|
820
|
+
) {
|
|
821
|
+
<!-- A hidden day is an empty cell and nothing else. It
|
|
822
|
+
carried the marks of the date it stood for, so a
|
|
823
|
+
range across a month boundary painted a band with no
|
|
824
|
+
digits under it. -->
|
|
825
|
+
<td
|
|
826
|
+
data-part="cell"
|
|
827
|
+
[attr.data-outside-month]="day.outsideMonth ? '' : null"
|
|
828
|
+
[attr.data-unavailable]="
|
|
829
|
+
!drawn(day) ? null : unavailable(day.date) ? '' : null
|
|
830
|
+
"
|
|
831
|
+
[attr.data-selected]="!drawn(day) ? null : chosen(day.date) ? '' : null"
|
|
832
|
+
[attr.data-range-start]="
|
|
833
|
+
drawn(day) && rangeState(day.date) === 'start' ? '' : null
|
|
834
|
+
"
|
|
835
|
+
[attr.data-range-end]="
|
|
836
|
+
drawn(day) && rangeState(day.date) === 'end' ? '' : null
|
|
837
|
+
"
|
|
838
|
+
[attr.data-in-range]="
|
|
839
|
+
drawn(day) && rangeState(day.date) === 'inside' ? '' : null
|
|
840
|
+
"
|
|
841
|
+
[attr.data-preview]="drawn(day) && proposed(day.date) ? '' : null"
|
|
842
|
+
>
|
|
843
|
+
@if (drawn(day)) {
|
|
844
|
+
<span
|
|
845
|
+
data-part="day"
|
|
846
|
+
role="button"
|
|
847
|
+
[attr.data-today]="isToday(day.date) ? '' : null"
|
|
848
|
+
[attr.aria-selected]="chosen(day.date) ? 'true' : null"
|
|
849
|
+
[attr.aria-disabled]="refused(day) ? 'true' : null"
|
|
850
|
+
[tabindex]="tabIndexOf(day.date)"
|
|
851
|
+
(click)="!refused(day) && select(day.date, 'pointer', $event)"
|
|
852
|
+
(pointerenter)="hovered.set(day.date)"
|
|
853
|
+
(pointerleave)="hovered.set(null)"
|
|
854
|
+
>
|
|
855
|
+
{{ day.date.day }}
|
|
856
|
+
</span>
|
|
857
|
+
}
|
|
858
|
+
</td>
|
|
859
|
+
}
|
|
860
|
+
</tr>
|
|
861
|
+
}
|
|
862
|
+
</tbody>
|
|
863
|
+
</table>
|
|
864
|
+
}
|
|
865
|
+
</div>
|
|
866
|
+
}
|
|
867
|
+
@case ('month') {
|
|
868
|
+
<div data-part="months">
|
|
869
|
+
@for (name of monthNames(); track $index) {
|
|
870
|
+
<button
|
|
871
|
+
data-part="period"
|
|
872
|
+
type="button"
|
|
873
|
+
[attr.data-selected]="focused().month === $index + 1 ? '' : null"
|
|
874
|
+
[attr.aria-selected]="focused().month === $index + 1 ? 'true' : null"
|
|
875
|
+
(click)="pickMonth($index + 1, $event)"
|
|
876
|
+
>
|
|
877
|
+
{{ name }}
|
|
878
|
+
</button>
|
|
879
|
+
}
|
|
880
|
+
</div>
|
|
881
|
+
}
|
|
882
|
+
@default {
|
|
883
|
+
<div data-part="years">
|
|
884
|
+
@for (year of years(); track year) {
|
|
885
|
+
<button
|
|
886
|
+
data-part="period"
|
|
887
|
+
type="button"
|
|
888
|
+
[attr.data-selected]="focused().year === year ? '' : null"
|
|
889
|
+
[attr.aria-selected]="focused().year === year ? 'true' : null"
|
|
890
|
+
(click)="pickYear(year, $event)"
|
|
891
|
+
>
|
|
892
|
+
{{ year }}
|
|
893
|
+
</button>
|
|
894
|
+
}
|
|
895
|
+
</div>
|
|
896
|
+
}
|
|
897
|
+
}`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
898
|
+
'data-ui': 'calendar',
|
|
899
|
+
'data-part': 'root',
|
|
900
|
+
'[attr.data-view]': 'currentView()',
|
|
901
|
+
'[attr.data-calendar]': 'resolvedCalendar()',
|
|
902
|
+
'[attr.data-months]': 'resolvedMonths() > 1 ? resolvedMonths() : null',
|
|
903
|
+
'[attr.data-week-numbers]': "resolvedWeekNumbers() ? '' : null",
|
|
904
|
+
'[attr.data-disabled]': "disabled() === true ? '' : null",
|
|
905
|
+
'[attr.data-readonly]': "readOnly() === true ? '' : null",
|
|
906
|
+
'[attr.data-invalid]': "invalid() === true ? '' : null",
|
|
907
|
+
'(keydown)': 'onKeyDown($event)',
|
|
908
|
+
}, styles: ["@layer slotted.components{[data-ui=calendar][data-part=root]{container-type:inline-size;container-name:slotted-calendar;--_font-size: var(--slotted-control-font-size-md, 13px);--_gap: var(--slotted-control-gap-md, 8px);--_icon-size: var(--slotted-control-icon-size-md, 16px);--_cell-size: var(--slotted-calendar-cell-size, var(--slotted-control-height-md, 34px));--_columns: 7;--_months: 1;--_month-gap: var(--slotted-space-6, 1rem);--_week-number-columns: 0;--_grid-size: calc(var(--_cell-size) * (var(--_columns) + var(--_week-number-columns)));background-color:var(--slotted-calendar-background, transparent);box-sizing:border-box;color:var(--slotted-calendar-color, var(--slotted-text, CanvasText));display:flex;flex-direction:column;font-family:var(--slotted-control-font-family, system-ui, sans-serif);font-size:var(--_font-size);gap:var(--_gap);--_heading-floor: calc(20ch + 3 * var(--_icon-size) + 4 * var(--_gap));inline-size:max(calc(var(--_grid-size) * var(--_months) + var(--_month-gap) * (var(--_months) - 1)),var(--_heading-floor));max-inline-size:100%}[data-ui=calendar][data-part=root][data-week-numbers]{--_week-number-columns: .75}[data-ui=calendar][data-part=root][data-months=\"2\"]{--_months: 2}[data-ui=calendar][data-part=root][data-months=\"3\"]{--_months: 3}[data-ui=calendar] [data-part=header],[data-ui=calendar] [data-part=grids],[data-ui=calendar] [data-part=months],[data-ui=calendar] [data-part=years]{--_cell-size: clamp( var(--slotted-target-min, 24px), calc(100cqi / (var(--_columns) + var(--_week-number-columns)) / var(--_months)), var(--slotted-calendar-cell-size, var(--slotted-control-height-md, 34px)) )}[data-ui=calendar] [data-part=header]{align-items:center;display:flex;gap:var(--slotted-space-2, .25rem);inline-size:100%;justify-content:space-between}[data-ui=calendar] [data-part=heading]{--slotted-icon-size: var(--_icon-size);appearance:none;background-color:transparent;border:0;border-radius:var(--slotted-calendar-radius, var(--slotted-control-radius, 4px));color:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:var(--slotted-space-2, .25rem);font:inherit;font-weight:var(--slotted-font-weight-semibold, 600);flex:1 1 auto;justify-content:safe center;min-inline-size:0;padding-block:var(--slotted-space-2, .25rem);padding-inline:var(--slotted-space-2, .25rem);overflow:hidden;white-space:nowrap;transition:background-color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);-webkit-tap-highlight-color:transparent}[data-ui=calendar] [data-part=previous],[data-ui=calendar] [data-part=next]{--slotted-icon-size: var(--_icon-size);align-items:center;appearance:none;background-color:transparent;block-size:var(--_cell-size);border:0;border-radius:var(--slotted-calendar-radius, var(--slotted-control-radius, 4px));color:var(--slotted-calendar-trigger-color, var(--slotted-text-muted, GrayText));cursor:pointer;display:inline-flex;flex:0 0 auto;inline-size:var(--_cell-size);justify-content:center;padding:0;touch-action:manipulation;transition:background-color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing),color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);-webkit-tap-highlight-color:transparent}[data-ui=calendar] [data-part=previous]>[data-ui=icon]{rotate:180deg}[data-ui=calendar] [data-part=grids]{display:flex;flex-wrap:wrap;gap:var(--_month-gap);justify-content:center}[data-ui=calendar] [data-part=grid]{border-collapse:collapse;table-layout:fixed}[data-ui=calendar] [data-part=grid-caption]{block-size:1px;clip-path:inset(50%);inline-size:1px;overflow:hidden;position:absolute;white-space:nowrap}[data-ui=calendar][data-part=root]:is([data-months=\"2\"],[data-months=\"3\"]) [data-part=grid-caption]{block-size:auto;clip-path:none;color:var(--slotted-calendar-weekday-color, var(--slotted-text-muted, GrayText));font-size:var(--slotted-font-size-xs, .75rem);font-weight:var(--slotted-font-weight-semibold, 600);inline-size:auto;overflow:visible;padding-block-end:var(--slotted-space-2, .25rem);position:static}[data-ui=calendar] [data-part=week-header]{block-size:var(--_cell-size);color:var(--slotted-calendar-weekday-color, var(--slotted-text-muted, GrayText));font-size:var(--slotted-font-size-xs, .75rem);font-weight:var(--slotted-font-weight-medium, 500);inline-size:var(--_cell-size);padding:0;text-overflow:clip}[data-ui=calendar] [data-part=week-number]{color:var(--slotted-calendar-week-number-color, var(--slotted-text-muted, GrayText));font-size:var(--slotted-font-size-xs, .75rem);font-variant-numeric:tabular-nums;font-weight:var(--slotted-font-weight-regular, 400);inline-size:calc(var(--_cell-size) * .75);padding:0;border-inline-end:var(--slotted-border-width-thin, 1px) solid var(--slotted-calendar-week-number-border-color, var(--slotted-border-subtle, ButtonBorder))}[data-ui=calendar] [data-part=cell]{padding:0;position:relative}[data-ui=calendar] [data-part=day]{--_inset: var(--slotted-border-width-thin, 1px);align-items:center;block-size:calc(var(--_cell-size) - var(--_inset) * 2);inline-size:calc(var(--_cell-size) - var(--_inset) * 2);margin:var(--_inset);border-radius:var(--slotted-calendar-day-radius, var(--slotted-radius-sm, 4px));box-sizing:border-box;color:inherit;cursor:pointer;display:flex;font-variant-numeric:tabular-nums;flex-direction:column;gap:var(--slotted-space-1, .125rem);justify-content:center;line-height:1;position:relative;transition:background-color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing),color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}[data-ui=calendar] [data-part=day]:after{content:\"\";inset:min(0px,calc((100% - var(--slotted-target-min, 24px)) / 2));position:absolute}[data-ui=calendar] [data-part=months],[data-ui=calendar] [data-part=years]{display:grid;gap:var(--slotted-space-2, .25rem);grid-template-columns:repeat(4,1fr);inline-size:calc(var(--_cell-size) * var(--_columns))}[data-ui=calendar] [data-part=period]{align-items:center;appearance:none;background-color:transparent;block-size:var(--_cell-size);border:0;border-radius:var(--slotted-calendar-day-radius, var(--slotted-radius-sm, 4px));color:inherit;cursor:pointer;display:flex;font:inherit;justify-content:center;padding-inline:var(--slotted-space-2, .25rem);transition:background-color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing),color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);-webkit-tap-highlight-color:transparent}[data-ui=calendar] [data-part=day][data-today]{color:var(--slotted-calendar-today-color, var(--slotted-tone-accent-text));font-weight:var(--slotted-font-weight-semibold, 600)}[data-ui=calendar] [data-part=day]:before{background-color:transparent;block-size:var(--slotted-space-2, .25rem);border-radius:var(--slotted-radius-full, 9999px);content:\"\";flex:0 0 auto;inline-size:var(--slotted-space-2, .25rem);order:1}[data-ui=calendar] [data-part=day][data-today]:before{background-color:currentcolor}[data-ui=calendar] [data-part=cell][data-outside-month] [data-part=day]{color:var(--slotted-calendar-outside-color, var(--slotted-text-muted, GrayText))}[data-ui=calendar] [data-part=cell][data-unavailable] [data-part=day]{color:var(--slotted-calendar-unavailable-color, var(--slotted-disabled-foreground));cursor:not-allowed;text-decoration:line-through;text-decoration-thickness:var(--slotted-border-width-thin, 1px)}[data-ui=calendar] [data-part=cell][data-in-range]:before,[data-ui=calendar] [data-part=cell][data-range-start]:before,[data-ui=calendar] [data-part=cell][data-range-end]:before{background-color:var( --slotted-calendar-range-background, color-mix( in oklab, var(--slotted-tone-accent-text) calc(var(--slotted-highlight-tint-opacity, .075) * 100%), transparent ) );content:\"\";inset:0;position:absolute}[data-ui=calendar] [data-part=cell][data-range-start]:before{border-end-start-radius:var(--slotted-calendar-day-radius, var(--slotted-radius-sm, 4px));border-start-start-radius:var(--slotted-calendar-day-radius, var(--slotted-radius-sm, 4px))}[data-ui=calendar] [data-part=cell][data-range-end]:before{border-end-end-radius:var(--slotted-calendar-day-radius, var(--slotted-radius-sm, 4px));border-start-end-radius:var(--slotted-calendar-day-radius, var(--slotted-radius-sm, 4px))}[data-ui=calendar] [data-part=cell][data-range-start]:not([data-range-end]) [data-part=day]{border-end-end-radius:0;border-start-end-radius:0}[data-ui=calendar] [data-part=cell][data-range-end]:not([data-range-start]) [data-part=day]{border-end-start-radius:0;border-start-start-radius:0}[data-ui=calendar] [data-part=cell]:is([data-in-range],[data-range-start],[data-range-end]) [data-part=day]{--_inset: 0px}[data-ui=calendar] [data-part=cell][data-in-range] [data-part=day]{border-radius:0;color:var(--slotted-calendar-in-range-color, var(--slotted-tone-accent-text))}[data-ui=calendar] [data-part=cell][data-preview]:before{background-color:var( --slotted-calendar-preview-background, color-mix( in oklab, var(--slotted-tone-accent-text) calc(var(--slotted-highlight-tint-opacity, .075) * 50%), transparent ) )}[data-ui=calendar] [data-part=cell][data-preview]:is([data-range-start],[data-range-end]):not([data-selected]) [data-part=day]{box-shadow:inset 0 0 0 var(--slotted-border-width-thin, 1px) var(--slotted-calendar-preview-border-color, var(--slotted-tone-accent-border));color:var(--slotted-calendar-in-range-color, var(--slotted-tone-accent-text))}[data-ui=calendar] [data-part=day]:hover:not([data-disabled]),[data-ui=calendar] [data-part=period]:hover:not(:disabled):not([data-disabled]),[data-ui=calendar] [data-part=heading]:hover:not(:disabled):not([data-disabled]),[data-ui=calendar] [data-part=previous]:hover:not(:disabled):not([data-disabled]),[data-ui=calendar] [data-part=next]:hover:not(:disabled):not([data-disabled]){background-color:var( --slotted-calendar-hover-background, var(--slotted-tone-secondary-subtle-hover) )}[data-ui=calendar] [data-part=day]:active:not([data-disabled]),[data-ui=calendar] [data-part=period]:active:not(:disabled):not([data-disabled]),[data-ui=calendar] [data-part=previous]:active:not(:disabled):not([data-disabled]),[data-ui=calendar] [data-part=next]:active:not(:disabled):not([data-disabled]){background-color:var( --slotted-calendar-active-background, var(--slotted-tone-secondary-subtle-active) )}[data-ui=calendar] [data-part=cell][data-in-range] [data-part=day]:hover:not([data-disabled]){background-color:var( --slotted-calendar-range-hover-background, var(--slotted-tone-accent-subtle-hover) )}[data-ui=calendar] [data-part=cell][data-in-range] [data-part=day]:active:not([data-disabled]){background-color:var( --slotted-calendar-range-active-background, var(--slotted-tone-accent-subtle-active) )}[data-ui=calendar] [data-part=cell][data-unavailable] [data-part=day]:hover:not([data-disabled]),[data-ui=calendar] [data-part=cell][data-unavailable] [data-part=day]:active:not([data-disabled]){background-color:transparent}[data-ui=calendar] [data-part=cell][data-selected] [data-part=day],[data-ui=calendar] [data-part=period][data-selected]{background-color:var(--slotted-calendar-selected-background, var(--slotted-tone-accent-solid));color:var(--slotted-calendar-selected-color, var(--slotted-tone-accent-on-solid));font-weight:var(--slotted-font-weight-semibold, 600)}[data-ui=calendar] [data-part=day]:focus-visible,[data-ui=calendar] [data-part=period]:focus-visible,[data-ui=calendar] [data-part=heading]:focus-visible,[data-ui=calendar] [data-part=previous]:focus-visible,[data-ui=calendar] [data-part=next]:focus-visible{outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:calc(var(--slotted-focus-ring-offset, 2px) * -1)}[data-ui=calendar][data-part=root][data-invalid]{--slotted-focus-ring-color: var( --slotted-calendar-invalid-focus-ring-color, var(--slotted-focus-ring-color-invalid, Highlight) )}[data-ui=calendar][data-part=root][data-invalid] [data-part=day]:focus-visible,[data-ui=calendar][data-part=root][data-invalid] [data-part=period]:focus-visible,[data-ui=calendar][data-part=root][data-invalid] [data-part=heading]:focus-visible,[data-ui=calendar][data-part=root][data-invalid] [data-part=previous]:focus-visible,[data-ui=calendar][data-part=root][data-invalid] [data-part=next]:focus-visible{--_invalid-ring: calc( var(--slotted-focus-ring-width, 2px) + var(--slotted-calendar-invalid-edge-width, var(--slotted-control-invalid-edge-width, 1px)) );outline-offset:calc(var(--_invalid-ring) * -1);outline-width:var(--_invalid-ring)}[data-ui=calendar][data-part=root][data-readonly] [data-part=day],[data-ui=calendar][data-part=root][data-readonly] [data-part=period]{cursor:default}[data-ui=calendar][data-part=root][data-disabled]{color:var(--slotted-calendar-disabled-color, var(--slotted-disabled-foreground))}[data-ui=calendar][data-part=root][data-disabled] [data-part=day][data-today]{color:var(--slotted-disabled-foreground)}[data-ui=calendar][data-part=root][data-disabled] [data-part=cell][data-selected] [data-part=day]{background-color:var(--slotted-disabled-background);color:var(--slotted-disabled-foreground)}[data-ui=calendar][data-part=root][data-disabled] [data-part=day],[data-ui=calendar][data-part=root][data-disabled] [data-part=period],[data-ui=calendar][data-part=root][data-disabled] [data-part=previous],[data-ui=calendar][data-part=root][data-disabled] [data-part=next],[data-ui=calendar][data-part=root][data-disabled] [data-part=heading]{cursor:not-allowed}[data-ui=calendar] [data-part=previous]:disabled,[data-ui=calendar] [data-part=next]:disabled{color:var(--slotted-disabled-foreground);cursor:not-allowed}@container slotted-calendar (max-width: 320px){[data-ui=calendar] [data-part=grids]{--_month-gap: var(--slotted-space-4, .5rem)}}@media(forced-colors:active){[data-ui=calendar] [data-part=cell][data-in-range]:before,[data-ui=calendar] [data-part=cell][data-range-start]:before,[data-ui=calendar] [data-part=cell][data-range-end]:before{border-block:var(--slotted-border-width-thin, 1px) solid var(--slotted-calendar-range-border-color, var(--slotted-tone-accent-border))}[data-ui=calendar] [data-part=cell][data-preview]:before{border-block-style:dashed}}}\n"] }]
|
|
909
|
+
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], defaultValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultValue", required: false }] }], focusedDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusedDate", required: false }] }], defaultFocusedDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultFocusedDate", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], isDateUnavailable: [{ type: i0.Input, args: [{ isSignal: true, alias: "isDateUnavailable", required: false }] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], months: [{ type: i0.Input, args: [{ isSignal: true, alias: "months", required: false }] }], view: [{ type: i0.Input, args: [{ isSignal: true, alias: "view", required: false }] }], defaultView: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultView", required: false }] }], weekNumbers: [{ type: i0.Input, args: [{ isSignal: true, alias: "weekNumbers", required: false }] }], fixedWeeks: [{ type: i0.Input, args: [{ isSignal: true, alias: "fixedWeeks", required: false }] }], outsideDays: [{ type: i0.Input, args: [{ isSignal: true, alias: "outsideDays", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], timeZone: [{ type: i0.Input, args: [{ isSignal: true, alias: "timeZone", required: false }] }], firstDayOfWeek: [{ type: i0.Input, args: [{ isSignal: true, alias: "firstDayOfWeek", required: false }] }], calendar: [{ type: i0.Input, args: [{ isSignal: true, alias: "calendar", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readOnly", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], messages: [{ type: i0.Input, args: [{ isSignal: true, alias: "messages", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], focusedDateChange: [{ type: i0.Output, args: ["focusedDateChange"] }], viewChange: [{ type: i0.Output, args: ["viewChange"] }], previewChange: [{ type: i0.Output, args: ["previewChange"] }] } });
|
|
910
|
+
|
|
911
|
+
/**
|
|
912
|
+
* Generated bundle index. Do not edit.
|
|
913
|
+
*/
|
|
914
|
+
|
|
915
|
+
export { CALENDAR_DEFAULTS, SlCalendar, asDates, injectCalendarDefaults, isRange, isSameValue, isSelected, nextValue, provideCalendarDefaults, rangeStateOf };
|
|
916
|
+
//# sourceMappingURL=slotted-angular-calendar.mjs.map
|