@slotted/angular 0.1.0-beta.2 → 0.1.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/AGENTS.snippet.md +2 -0
- package/docs/action-bar.json +5 -4
- package/docs/action-bar.md +4 -4
- package/docs/action-sheet.json +391 -64
- package/docs/action-sheet.md +259 -0
- package/docs/alert.json +22 -5
- package/docs/alert.md +16 -5
- package/docs/app-shell.examples.md +1 -1
- package/docs/app-shell.json +24 -7
- package/docs/app-shell.md +5 -3
- package/docs/avatar.json +22 -1
- package/docs/avatar.md +5 -3
- package/docs/badge.json +7 -1
- package/docs/badge.md +3 -3
- package/docs/button-group.json +2 -0
- package/docs/button-group.md +1 -1
- package/docs/button.examples.md +15 -0
- package/docs/button.json +165 -11
- package/docs/button.md +34 -6
- package/docs/calendar.json +27 -2
- package/docs/calendar.md +6 -3
- package/docs/cascader.json +1 -0
- package/docs/cascader.md +1 -1
- package/docs/chart.examples.md +16 -2
- package/docs/chart.json +13 -4
- package/docs/chart.md +4 -3
- package/docs/code-block.json +92 -92
- package/docs/code-block.md +69 -69
- package/docs/combobox.json +2 -0
- package/docs/combobox.md +1 -1
- package/docs/command-palette.json +1 -0
- package/docs/command-palette.md +1 -1
- package/docs/currency-field.json +40 -1
- package/docs/currency-field.md +5 -1
- package/docs/dashboard-grid.json +31 -9
- package/docs/dashboard-grid.md +15 -6
- package/docs/data-grid.examples.md +2 -2
- package/docs/data-grid.json +34 -8
- package/docs/data-grid.md +2 -1
- package/docs/data-grid.props.md +6 -4
- package/docs/data-list.json +2 -1
- package/docs/data-list.md +1 -1
- package/docs/date-field.json +9 -1
- package/docs/date-field.md +3 -2
- package/docs/date-picker.examples.md +36 -0
- package/docs/date-picker.json +21 -5
- package/docs/date-picker.md +6 -5
- package/docs/datetime-field.json +1 -0
- package/docs/datetime-field.md +1 -1
- package/docs/description-list.json +9 -1
- package/docs/description-list.md +2 -1
- package/docs/detail-panel.json +4 -2
- package/docs/detail-panel.md +8 -3
- package/docs/dialog.examples.md +158 -136
- package/docs/dialog.json +36 -11
- package/docs/dialog.md +4 -2
- package/docs/dialog.props.md +1 -1
- package/docs/drawer.examples.md +1 -1
- package/docs/drawer.json +29 -10
- package/docs/drawer.md +9 -7
- package/docs/entity-picker.json +20 -4
- package/docs/entity-picker.md +8 -6
- package/docs/event-calendar.md +2 -2
- package/docs/filter-bar.json +118 -118
- package/docs/filter-bar.md +79 -79
- package/docs/form.json +2 -1
- package/docs/form.md +1 -1
- package/docs/guidelines/README.md +2 -2
- package/docs/guidelines/async-feedback.md +25 -4
- package/docs/guidelines/composition.md +33 -7
- package/docs/guidelines/errors-and-conflicts.md +7 -6
- package/docs/guidelines/forms.md +10 -0
- package/docs/guidelines/index.md +16 -4
- package/docs/guidelines/layout-alignment.md +19 -9
- package/docs/guidelines/list-pages.md +44 -3
- package/docs/guidelines/overviews.md +31 -1
- package/docs/guidelines/own-elements.md +1 -1
- package/docs/guidelines/reading-permissions.md +2 -2
- package/docs/guidelines/reports.md +1 -1
- package/docs/icon.json +3 -1
- package/docs/icon.md +3 -3
- package/docs/index.md +2 -2
- package/docs/inline-message.json +20 -7
- package/docs/inline-message.md +11 -9
- package/docs/kbd.json +3 -0
- package/docs/kbd.md +1 -1
- package/docs/link.json +16 -0
- package/docs/link.md +3 -1
- package/docs/list-item.json +19 -3
- package/docs/list-item.md +19 -16
- package/docs/list.json +19 -1
- package/docs/list.md +3 -1
- package/docs/markdown.json +86 -79
- package/docs/markdown.md +66 -65
- package/docs/menu.json +13 -0
- package/docs/menu.md +3 -1
- package/docs/message-scroller.json +1 -1
- package/docs/message.json +7 -1
- package/docs/message.md +3 -3
- package/docs/multi-select.json +1 -0
- package/docs/multi-select.md +1 -1
- package/docs/notification-center.json +4 -0
- package/docs/notification-center.md +2 -2
- package/docs/number-field.json +1 -0
- package/docs/number-field.md +1 -1
- package/docs/otp-input.json +1 -0
- package/docs/otp-input.md +1 -1
- package/docs/page-header.json +22 -5
- package/docs/page-header.md +6 -4
- package/docs/page.json +4 -2
- package/docs/page.md +3 -2
- package/docs/popover.json +2 -1
- package/docs/popover.md +1 -1
- package/docs/progress-indicator.json +3 -1
- package/docs/progress-indicator.md +3 -3
- package/docs/prompt-composer.json +50 -3
- package/docs/prompt-composer.md +8 -2
- package/docs/rating.json +5 -3
- package/docs/rating.md +6 -6
- package/docs/scroll-area.json +266 -64
- package/docs/scroll-area.md +188 -0
- package/docs/section.json +38 -16
- package/docs/section.md +23 -20
- package/docs/segmented-control.json +36 -12
- package/docs/segmented-control.md +17 -1
- package/docs/select.json +2 -0
- package/docs/select.md +1 -1
- package/docs/side-navigation.json +1 -0
- package/docs/side-navigation.md +1 -1
- package/docs/skills/build-own-element/SKILL.md +6 -6
- package/docs/skills/compose-screen/SKILL.md +53 -17
- package/docs/skills/review-screen/SKILL.md +28 -17
- package/docs/skills/theme-app/SKILL.md +53 -15
- package/docs/skills/waiting-states/SKILL.md +14 -10
- package/docs/sparkline.json +5 -2
- package/docs/sparkline.md +4 -4
- package/docs/split-button.json +4 -1
- package/docs/split-button.md +3 -3
- package/docs/splitter.json +279 -64
- package/docs/splitter.md +215 -0
- package/docs/stat-card.json +11 -5
- package/docs/stat-card.md +6 -6
- package/docs/status-indicator.json +16 -5
- package/docs/status-indicator.md +3 -1
- package/docs/table-of-contents.json +2 -1
- package/docs/table-of-contents.md +2 -2
- package/docs/table.examples.md +3 -3
- package/docs/table.json +85 -3
- package/docs/table.md +12 -1
- package/docs/tabs.json +16 -3
- package/docs/tabs.md +3 -2
- package/docs/tag.json +24 -13
- package/docs/tag.md +11 -11
- package/docs/tags-input.json +29 -2
- package/docs/tags-input.md +4 -1
- package/docs/text-field.json +2 -1
- package/docs/text-field.md +2 -2
- package/docs/textarea.json +1 -0
- package/docs/textarea.md +1 -1
- package/docs/time-field.json +1 -0
- package/docs/time-field.md +1 -1
- package/docs/timeline.json +138 -132
- package/docs/timeline.md +125 -125
- package/docs/toast.json +8 -1
- package/docs/toast.md +3 -3
- package/docs/toggle-group.json +14 -3
- package/docs/toggle-group.md +3 -3
- package/docs/toggle.json +12 -3
- package/docs/toggle.md +3 -3
- package/docs/tokens.md +54 -11
- package/docs/toolbar.json +1 -1
- package/docs/toolbar.md +1 -1
- package/docs/tooltip.json +1 -0
- package/docs/tooltip.md +1 -1
- package/docs/tour.json +1 -1
- package/docs/typography.json +4 -2
- package/docs/typography.md +5 -5
- package/fesm2022/slotted-angular-accordion.mjs +4 -2
- package/fesm2022/slotted-angular-accordion.mjs.map +1 -1
- package/fesm2022/slotted-angular-action-bar.mjs +27 -12
- package/fesm2022/slotted-angular-action-bar.mjs.map +1 -1
- package/fesm2022/slotted-angular-action-sheet.mjs +48 -29
- package/fesm2022/slotted-angular-action-sheet.mjs.map +1 -1
- package/fesm2022/slotted-angular-alert.mjs +29 -16
- package/fesm2022/slotted-angular-alert.mjs.map +1 -1
- package/fesm2022/slotted-angular-app-shell.mjs +124 -63
- package/fesm2022/slotted-angular-app-shell.mjs.map +1 -1
- package/fesm2022/slotted-angular-aspect-ratio.mjs +4 -2
- package/fesm2022/slotted-angular-aspect-ratio.mjs.map +1 -1
- package/fesm2022/slotted-angular-attachment.mjs +33 -22
- package/fesm2022/slotted-angular-attachment.mjs.map +1 -1
- package/fesm2022/slotted-angular-avatar-group.mjs +9 -6
- package/fesm2022/slotted-angular-avatar-group.mjs.map +1 -1
- package/fesm2022/slotted-angular-avatar.mjs +14 -7
- package/fesm2022/slotted-angular-avatar.mjs.map +1 -1
- package/fesm2022/slotted-angular-badge.mjs +14 -10
- package/fesm2022/slotted-angular-badge.mjs.map +1 -1
- package/fesm2022/slotted-angular-breadcrumb.mjs +26 -18
- package/fesm2022/slotted-angular-breadcrumb.mjs.map +1 -1
- package/fesm2022/slotted-angular-button-group.mjs +7 -4
- package/fesm2022/slotted-angular-button-group.mjs.map +1 -1
- package/fesm2022/slotted-angular-button.mjs +197 -30
- package/fesm2022/slotted-angular-button.mjs.map +1 -1
- package/fesm2022/slotted-angular-calendar.mjs +263 -65
- package/fesm2022/slotted-angular-calendar.mjs.map +1 -1
- package/fesm2022/slotted-angular-card.mjs +18 -16
- package/fesm2022/slotted-angular-card.mjs.map +1 -1
- package/fesm2022/slotted-angular-carousel.mjs +22 -11
- package/fesm2022/slotted-angular-carousel.mjs.map +1 -1
- package/fesm2022/slotted-angular-cascader.mjs +180 -66
- package/fesm2022/slotted-angular-cascader.mjs.map +1 -1
- package/fesm2022/slotted-angular-chart.mjs +62 -20
- package/fesm2022/slotted-angular-chart.mjs.map +1 -1
- package/fesm2022/slotted-angular-checkbox-group.mjs +5 -3
- package/fesm2022/slotted-angular-checkbox-group.mjs.map +1 -1
- package/fesm2022/slotted-angular-checkbox.mjs +13 -8
- package/fesm2022/slotted-angular-checkbox.mjs.map +1 -1
- package/fesm2022/slotted-angular-code-block.mjs +29 -15
- package/fesm2022/slotted-angular-code-block.mjs.map +1 -1
- package/fesm2022/slotted-angular-collapsible.mjs +20 -15
- package/fesm2022/slotted-angular-collapsible.mjs.map +1 -1
- package/fesm2022/slotted-angular-color-picker.mjs +77 -22
- package/fesm2022/slotted-angular-color-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-column-manager.mjs +68 -31
- package/fesm2022/slotted-angular-column-manager.mjs.map +1 -1
- package/fesm2022/slotted-angular-combobox.mjs +108 -35
- package/fesm2022/slotted-angular-combobox.mjs.map +1 -1
- package/fesm2022/slotted-angular-command-palette.mjs +162 -54
- package/fesm2022/slotted-angular-command-palette.mjs.map +1 -1
- package/fesm2022/slotted-angular-container.mjs +6 -4
- package/fesm2022/slotted-angular-container.mjs.map +1 -1
- package/fesm2022/slotted-angular-context-menu.mjs +5 -4
- package/fesm2022/slotted-angular-context-menu.mjs.map +1 -1
- package/fesm2022/slotted-angular-currency-field.mjs +149 -32
- package/fesm2022/slotted-angular-currency-field.mjs.map +1 -1
- package/fesm2022/slotted-angular-dashboard-grid.mjs +295 -68
- package/fesm2022/slotted-angular-dashboard-grid.mjs.map +1 -1
- package/fesm2022/slotted-angular-data-grid.mjs +461 -129
- package/fesm2022/slotted-angular-data-grid.mjs.map +1 -1
- package/fesm2022/slotted-angular-data-list.mjs +83 -50
- package/fesm2022/slotted-angular-data-list.mjs.map +1 -1
- package/fesm2022/slotted-angular-date-field.mjs +74 -25
- package/fesm2022/slotted-angular-date-field.mjs.map +1 -1
- package/fesm2022/slotted-angular-date-picker.mjs +112 -40
- package/fesm2022/slotted-angular-date-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-date-range-picker.mjs +45 -22
- package/fesm2022/slotted-angular-date-range-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-datetime-field.mjs +48 -16
- package/fesm2022/slotted-angular-datetime-field.mjs.map +1 -1
- package/fesm2022/slotted-angular-datetime-picker.mjs +41 -29
- package/fesm2022/slotted-angular-datetime-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-datetime-range-picker.mjs +115 -48
- package/fesm2022/slotted-angular-datetime-range-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-description-list.mjs +44 -21
- package/fesm2022/slotted-angular-description-list.mjs.map +1 -1
- package/fesm2022/slotted-angular-detail-panel.mjs +48 -30
- package/fesm2022/slotted-angular-detail-panel.mjs.map +1 -1
- package/fesm2022/slotted-angular-dialog.mjs +79 -37
- package/fesm2022/slotted-angular-dialog.mjs.map +1 -1
- package/fesm2022/slotted-angular-divider.mjs +7 -5
- package/fesm2022/slotted-angular-divider.mjs.map +1 -1
- package/fesm2022/slotted-angular-drawer.mjs +235 -104
- package/fesm2022/slotted-angular-drawer.mjs.map +1 -1
- package/fesm2022/slotted-angular-entity-picker.mjs +474 -75
- package/fesm2022/slotted-angular-entity-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-event-calendar.mjs +259 -102
- package/fesm2022/slotted-angular-event-calendar.mjs.map +1 -1
- package/fesm2022/slotted-angular-field-group.mjs +14 -7
- package/fesm2022/slotted-angular-field-group.mjs.map +1 -1
- package/fesm2022/slotted-angular-field.mjs +35 -15
- package/fesm2022/slotted-angular-field.mjs.map +1 -1
- package/fesm2022/slotted-angular-filter-bar.mjs +118 -51
- package/fesm2022/slotted-angular-filter-bar.mjs.map +1 -1
- package/fesm2022/slotted-angular-form.mjs +18 -10
- package/fesm2022/slotted-angular-form.mjs.map +1 -1
- package/fesm2022/slotted-angular-fullscreen.mjs +14 -8
- package/fesm2022/slotted-angular-fullscreen.mjs.map +1 -1
- package/fesm2022/slotted-angular-grid.mjs +4 -2
- package/fesm2022/slotted-angular-grid.mjs.map +1 -1
- package/fesm2022/slotted-angular-highlight.mjs +5 -3
- package/fesm2022/slotted-angular-highlight.mjs.map +1 -1
- package/fesm2022/slotted-angular-hover-card.mjs +5 -4
- package/fesm2022/slotted-angular-hover-card.mjs.map +1 -1
- package/fesm2022/slotted-angular-icon.mjs +188 -87
- package/fesm2022/slotted-angular-icon.mjs.map +1 -1
- package/fesm2022/slotted-angular-image.mjs +13 -10
- package/fesm2022/slotted-angular-image.mjs.map +1 -1
- package/fesm2022/slotted-angular-import-export-center.mjs +175 -99
- package/fesm2022/slotted-angular-import-export-center.mjs.map +1 -1
- package/fesm2022/slotted-angular-inline-message.mjs +94 -19
- package/fesm2022/slotted-angular-inline-message.mjs.map +1 -1
- package/fesm2022/slotted-angular-inline.mjs +4 -2
- package/fesm2022/slotted-angular-inline.mjs.map +1 -1
- package/fesm2022/slotted-angular-kbd.mjs +11 -7
- package/fesm2022/slotted-angular-kbd.mjs.map +1 -1
- package/fesm2022/slotted-angular-link.mjs +13 -4
- package/fesm2022/slotted-angular-link.mjs.map +1 -1
- package/fesm2022/slotted-angular-list-item.mjs +63 -23
- package/fesm2022/slotted-angular-list-item.mjs.map +1 -1
- package/fesm2022/slotted-angular-list.mjs +37 -22
- package/fesm2022/slotted-angular-list.mjs.map +1 -1
- package/fesm2022/slotted-angular-listbox.mjs +39 -21
- package/fesm2022/slotted-angular-listbox.mjs.map +1 -1
- package/fesm2022/slotted-angular-loading-overlay.mjs +59 -22
- package/fesm2022/slotted-angular-loading-overlay.mjs.map +1 -1
- package/fesm2022/slotted-angular-markdown.mjs +57 -31
- package/fesm2022/slotted-angular-markdown.mjs.map +1 -1
- package/fesm2022/slotted-angular-menu.mjs +51 -29
- package/fesm2022/slotted-angular-menu.mjs.map +1 -1
- package/fesm2022/slotted-angular-menubar.mjs +6 -3
- package/fesm2022/slotted-angular-menubar.mjs.map +1 -1
- package/fesm2022/slotted-angular-message-scroller.mjs +34 -15
- package/fesm2022/slotted-angular-message-scroller.mjs.map +1 -1
- package/fesm2022/slotted-angular-message.mjs +119 -51
- package/fesm2022/slotted-angular-message.mjs.map +1 -1
- package/fesm2022/slotted-angular-multi-select.mjs +163 -60
- package/fesm2022/slotted-angular-multi-select.mjs.map +1 -1
- package/fesm2022/slotted-angular-navigation-menu.mjs +34 -26
- package/fesm2022/slotted-angular-navigation-menu.mjs.map +1 -1
- package/fesm2022/slotted-angular-notification-center.mjs +108 -65
- package/fesm2022/slotted-angular-notification-center.mjs.map +1 -1
- package/fesm2022/slotted-angular-number-field.mjs +23 -11
- package/fesm2022/slotted-angular-number-field.mjs.map +1 -1
- package/fesm2022/slotted-angular-otp-input.mjs +13 -8
- package/fesm2022/slotted-angular-otp-input.mjs.map +1 -1
- package/fesm2022/slotted-angular-page-header.mjs +90 -48
- package/fesm2022/slotted-angular-page-header.mjs.map +1 -1
- package/fesm2022/slotted-angular-page.mjs +60 -12
- package/fesm2022/slotted-angular-page.mjs.map +1 -1
- package/fesm2022/slotted-angular-pagination.mjs +35 -22
- package/fesm2022/slotted-angular-pagination.mjs.map +1 -1
- package/fesm2022/slotted-angular-popover.mjs +32 -19
- package/fesm2022/slotted-angular-popover.mjs.map +1 -1
- package/fesm2022/slotted-angular-progress-indicator.mjs +236 -52
- package/fesm2022/slotted-angular-progress-indicator.mjs.map +1 -1
- package/fesm2022/slotted-angular-prompt-composer.mjs +132 -22
- package/fesm2022/slotted-angular-prompt-composer.mjs.map +1 -1
- package/fesm2022/slotted-angular-prose.mjs +14 -11
- package/fesm2022/slotted-angular-prose.mjs.map +1 -1
- package/fesm2022/slotted-angular-radio-group.mjs +15 -9
- package/fesm2022/slotted-angular-radio-group.mjs.map +1 -1
- package/fesm2022/slotted-angular-rating.mjs +138 -82
- package/fesm2022/slotted-angular-rating.mjs.map +1 -1
- package/fesm2022/slotted-angular-result-state.mjs +16 -12
- package/fesm2022/slotted-angular-result-state.mjs.map +1 -1
- package/fesm2022/slotted-angular-saved-views.mjs +43 -16
- package/fesm2022/slotted-angular-saved-views.mjs.map +1 -1
- package/fesm2022/slotted-angular-scroll-area.mjs +13 -5
- package/fesm2022/slotted-angular-scroll-area.mjs.map +1 -1
- package/fesm2022/slotted-angular-section.mjs +81 -19
- package/fesm2022/slotted-angular-section.mjs.map +1 -1
- package/fesm2022/slotted-angular-segmented-control.mjs +37 -11
- package/fesm2022/slotted-angular-segmented-control.mjs.map +1 -1
- package/fesm2022/slotted-angular-select.mjs +189 -69
- package/fesm2022/slotted-angular-select.mjs.map +1 -1
- package/fesm2022/slotted-angular-side-navigation.mjs +46 -35
- package/fesm2022/slotted-angular-side-navigation.mjs.map +1 -1
- package/fesm2022/slotted-angular-skeleton.mjs +32 -16
- package/fesm2022/slotted-angular-skeleton.mjs.map +1 -1
- package/fesm2022/slotted-angular-slider.mjs +31 -11
- package/fesm2022/slotted-angular-slider.mjs.map +1 -1
- package/fesm2022/slotted-angular-sparkline.mjs +41 -14
- package/fesm2022/slotted-angular-sparkline.mjs.map +1 -1
- package/fesm2022/slotted-angular-split-button.mjs +37 -11
- package/fesm2022/slotted-angular-split-button.mjs.map +1 -1
- package/fesm2022/slotted-angular-splitter.mjs +11 -9
- package/fesm2022/slotted-angular-splitter.mjs.map +1 -1
- package/fesm2022/slotted-angular-stack.mjs +4 -2
- package/fesm2022/slotted-angular-stack.mjs.map +1 -1
- package/fesm2022/slotted-angular-stat-card.mjs +69 -31
- package/fesm2022/slotted-angular-stat-card.mjs.map +1 -1
- package/fesm2022/slotted-angular-status-indicator.mjs +50 -19
- package/fesm2022/slotted-angular-status-indicator.mjs.map +1 -1
- package/fesm2022/slotted-angular-stepper.mjs +40 -15
- package/fesm2022/slotted-angular-stepper.mjs.map +1 -1
- package/fesm2022/slotted-angular-switch.mjs +15 -10
- package/fesm2022/slotted-angular-switch.mjs.map +1 -1
- package/fesm2022/slotted-angular-table-of-contents.mjs +29 -21
- package/fesm2022/slotted-angular-table-of-contents.mjs.map +1 -1
- package/fesm2022/slotted-angular-table.mjs +241 -71
- package/fesm2022/slotted-angular-table.mjs.map +1 -1
- package/fesm2022/slotted-angular-tabs.mjs +42 -18
- package/fesm2022/slotted-angular-tabs.mjs.map +1 -1
- package/fesm2022/slotted-angular-tag.mjs +19 -12
- package/fesm2022/slotted-angular-tag.mjs.map +1 -1
- package/fesm2022/slotted-angular-tags-input.mjs +253 -28
- package/fesm2022/slotted-angular-tags-input.mjs.map +1 -1
- package/fesm2022/slotted-angular-text-field.mjs +55 -15
- package/fesm2022/slotted-angular-text-field.mjs.map +1 -1
- package/fesm2022/slotted-angular-textarea.mjs +5 -3
- package/fesm2022/slotted-angular-textarea.mjs.map +1 -1
- package/fesm2022/slotted-angular-theme.mjs +6 -3
- package/fesm2022/slotted-angular-theme.mjs.map +1 -1
- package/fesm2022/slotted-angular-time-field.mjs +48 -14
- package/fesm2022/slotted-angular-time-field.mjs.map +1 -1
- package/fesm2022/slotted-angular-time-picker.mjs +32 -20
- package/fesm2022/slotted-angular-time-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-time-range-picker.mjs +113 -46
- package/fesm2022/slotted-angular-time-range-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-timeline.mjs +147 -64
- package/fesm2022/slotted-angular-timeline.mjs.map +1 -1
- package/fesm2022/slotted-angular-toast.mjs +48 -36
- package/fesm2022/slotted-angular-toast.mjs.map +1 -1
- package/fesm2022/slotted-angular-toggle-group.mjs +25 -8
- package/fesm2022/slotted-angular-toggle-group.mjs.map +1 -1
- package/fesm2022/slotted-angular-toggle.mjs +9 -4
- package/fesm2022/slotted-angular-toggle.mjs.map +1 -1
- package/fesm2022/slotted-angular-toolbar.mjs +27 -12
- package/fesm2022/slotted-angular-toolbar.mjs.map +1 -1
- package/fesm2022/slotted-angular-tooltip.mjs +15 -6
- package/fesm2022/slotted-angular-tooltip.mjs.map +1 -1
- package/fesm2022/slotted-angular-top-navigation.mjs +64 -44
- package/fesm2022/slotted-angular-top-navigation.mjs.map +1 -1
- package/fesm2022/slotted-angular-tour.mjs +47 -22
- package/fesm2022/slotted-angular-tour.mjs.map +1 -1
- package/fesm2022/slotted-angular-transfer.mjs +69 -30
- package/fesm2022/slotted-angular-transfer.mjs.map +1 -1
- package/fesm2022/slotted-angular-tree.mjs +80 -26
- package/fesm2022/slotted-angular-tree.mjs.map +1 -1
- package/fesm2022/slotted-angular-typography.mjs +8 -4
- package/fesm2022/slotted-angular-typography.mjs.map +1 -1
- package/fesm2022/slotted-angular-upload.mjs +125 -57
- package/fesm2022/slotted-angular-upload.mjs.map +1 -1
- package/fesm2022/slotted-angular-visually-hidden.mjs +4 -2
- package/fesm2022/slotted-angular-visually-hidden.mjs.map +1 -1
- package/fesm2022/slotted-angular-wizard.mjs +163 -65
- package/fesm2022/slotted-angular-wizard.mjs.map +1 -1
- package/package.json +3 -3
- package/types/slotted-angular-accordion.d.ts.map +1 -1
- package/types/slotted-angular-action-bar.d.ts +2 -0
- package/types/slotted-angular-action-bar.d.ts.map +1 -1
- package/types/slotted-angular-action-sheet.d.ts.map +1 -1
- package/types/slotted-angular-alert.d.ts +13 -4
- package/types/slotted-angular-alert.d.ts.map +1 -1
- package/types/slotted-angular-app-shell.d.ts +12 -4
- package/types/slotted-angular-app-shell.d.ts.map +1 -1
- package/types/slotted-angular-aspect-ratio.d.ts.map +1 -1
- package/types/slotted-angular-attachment.d.ts +2 -1
- package/types/slotted-angular-attachment.d.ts.map +1 -1
- package/types/slotted-angular-avatar-group.d.ts.map +1 -1
- package/types/slotted-angular-avatar.d.ts +11 -3
- package/types/slotted-angular-avatar.d.ts.map +1 -1
- package/types/slotted-angular-badge.d.ts +1 -1
- package/types/slotted-angular-badge.d.ts.map +1 -1
- package/types/slotted-angular-breadcrumb.d.ts.map +1 -1
- package/types/slotted-angular-button-group.d.ts +1 -1
- package/types/slotted-angular-button-group.d.ts.map +1 -1
- package/types/slotted-angular-button.d.ts +67 -14
- package/types/slotted-angular-button.d.ts.map +1 -1
- package/types/slotted-angular-calendar.d.ts +43 -2
- package/types/slotted-angular-calendar.d.ts.map +1 -1
- package/types/slotted-angular-card.d.ts.map +1 -1
- package/types/slotted-angular-carousel.d.ts.map +1 -1
- package/types/slotted-angular-cascader.d.ts.map +1 -1
- package/types/slotted-angular-chart.d.ts +21 -9
- package/types/slotted-angular-chart.d.ts.map +1 -1
- package/types/slotted-angular-checkbox-group.d.ts.map +1 -1
- package/types/slotted-angular-checkbox.d.ts.map +1 -1
- package/types/slotted-angular-code-block.d.ts +2 -1
- package/types/slotted-angular-code-block.d.ts.map +1 -1
- package/types/slotted-angular-collapsible.d.ts +2 -1
- package/types/slotted-angular-collapsible.d.ts.map +1 -1
- package/types/slotted-angular-color-picker.d.ts.map +1 -1
- package/types/slotted-angular-column-manager.d.ts.map +1 -1
- package/types/slotted-angular-combobox.d.ts +6 -1
- package/types/slotted-angular-combobox.d.ts.map +1 -1
- package/types/slotted-angular-command-palette.d.ts +10 -1
- package/types/slotted-angular-command-palette.d.ts.map +1 -1
- package/types/slotted-angular-container.d.ts.map +1 -1
- package/types/slotted-angular-context-menu.d.ts.map +1 -1
- package/types/slotted-angular-currency-field.d.ts +63 -15
- package/types/slotted-angular-currency-field.d.ts.map +1 -1
- package/types/slotted-angular-dashboard-grid.d.ts +63 -7
- package/types/slotted-angular-dashboard-grid.d.ts.map +1 -1
- package/types/slotted-angular-data-grid.d.ts +62 -4
- package/types/slotted-angular-data-grid.d.ts.map +1 -1
- package/types/slotted-angular-data-list.d.ts.map +1 -1
- package/types/slotted-angular-date-field.d.ts +11 -1
- package/types/slotted-angular-date-field.d.ts.map +1 -1
- package/types/slotted-angular-date-picker.d.ts +38 -12
- package/types/slotted-angular-date-picker.d.ts.map +1 -1
- package/types/slotted-angular-date-range-picker.d.ts +0 -1
- package/types/slotted-angular-date-range-picker.d.ts.map +1 -1
- package/types/slotted-angular-datetime-field.d.ts.map +1 -1
- package/types/slotted-angular-datetime-picker.d.ts +0 -1
- package/types/slotted-angular-datetime-picker.d.ts.map +1 -1
- package/types/slotted-angular-datetime-range-picker.d.ts +0 -1
- package/types/slotted-angular-datetime-range-picker.d.ts.map +1 -1
- package/types/slotted-angular-description-list.d.ts +11 -3
- package/types/slotted-angular-description-list.d.ts.map +1 -1
- package/types/slotted-angular-detail-panel.d.ts.map +1 -1
- package/types/slotted-angular-dialog.d.ts +11 -3
- package/types/slotted-angular-dialog.d.ts.map +1 -1
- package/types/slotted-angular-divider.d.ts.map +1 -1
- package/types/slotted-angular-drawer.d.ts +29 -3
- package/types/slotted-angular-drawer.d.ts.map +1 -1
- package/types/slotted-angular-entity-picker.d.ts +63 -15
- package/types/slotted-angular-entity-picker.d.ts.map +1 -1
- package/types/slotted-angular-event-calendar.d.ts.map +1 -1
- package/types/slotted-angular-field-group.d.ts.map +1 -1
- package/types/slotted-angular-field.d.ts.map +1 -1
- package/types/slotted-angular-filter-bar.d.ts.map +1 -1
- package/types/slotted-angular-form.d.ts.map +1 -1
- package/types/slotted-angular-fullscreen.d.ts.map +1 -1
- package/types/slotted-angular-grid.d.ts.map +1 -1
- package/types/slotted-angular-highlight.d.ts.map +1 -1
- package/types/slotted-angular-hover-card.d.ts.map +1 -1
- package/types/slotted-angular-icon.d.ts +13 -3
- package/types/slotted-angular-icon.d.ts.map +1 -1
- package/types/slotted-angular-image.d.ts.map +1 -1
- package/types/slotted-angular-import-export-center.d.ts.map +1 -1
- package/types/slotted-angular-inline-message.d.ts +29 -28
- package/types/slotted-angular-inline-message.d.ts.map +1 -1
- package/types/slotted-angular-inline.d.ts.map +1 -1
- package/types/slotted-angular-kbd.d.ts.map +1 -1
- package/types/slotted-angular-link.d.ts +8 -2
- package/types/slotted-angular-link.d.ts.map +1 -1
- package/types/slotted-angular-list-item.d.ts +5 -1
- package/types/slotted-angular-list-item.d.ts.map +1 -1
- package/types/slotted-angular-list.d.ts +42 -27
- package/types/slotted-angular-list.d.ts.map +1 -1
- package/types/slotted-angular-listbox.d.ts.map +1 -1
- package/types/slotted-angular-loading-overlay.d.ts.map +1 -1
- package/types/slotted-angular-markdown.d.ts +6 -1
- package/types/slotted-angular-markdown.d.ts.map +1 -1
- package/types/slotted-angular-menu.d.ts +11 -2
- package/types/slotted-angular-menu.d.ts.map +1 -1
- package/types/slotted-angular-menubar.d.ts +5 -4
- package/types/slotted-angular-menubar.d.ts.map +1 -1
- package/types/slotted-angular-message-scroller.d.ts.map +1 -1
- package/types/slotted-angular-message.d.ts +1 -1
- package/types/slotted-angular-message.d.ts.map +1 -1
- package/types/slotted-angular-multi-select.d.ts +6 -1
- package/types/slotted-angular-multi-select.d.ts.map +1 -1
- package/types/slotted-angular-navigation-menu.d.ts.map +1 -1
- package/types/slotted-angular-notification-center.d.ts +1 -1
- package/types/slotted-angular-notification-center.d.ts.map +1 -1
- package/types/slotted-angular-number-field.d.ts.map +1 -1
- package/types/slotted-angular-otp-input.d.ts.map +1 -1
- package/types/slotted-angular-page-header.d.ts +15 -6
- package/types/slotted-angular-page-header.d.ts.map +1 -1
- package/types/slotted-angular-page.d.ts +7 -1
- package/types/slotted-angular-page.d.ts.map +1 -1
- package/types/slotted-angular-pagination.d.ts.map +1 -1
- package/types/slotted-angular-popover.d.ts.map +1 -1
- package/types/slotted-angular-progress-indicator.d.ts +8 -1
- package/types/slotted-angular-progress-indicator.d.ts.map +1 -1
- package/types/slotted-angular-prompt-composer.d.ts +35 -3
- package/types/slotted-angular-prompt-composer.d.ts.map +1 -1
- package/types/slotted-angular-prose.d.ts.map +1 -1
- package/types/slotted-angular-radio-group.d.ts.map +1 -1
- package/types/slotted-angular-rating.d.ts +1 -1
- package/types/slotted-angular-rating.d.ts.map +1 -1
- package/types/slotted-angular-result-state.d.ts.map +1 -1
- package/types/slotted-angular-saved-views.d.ts.map +1 -1
- package/types/slotted-angular-scroll-area.d.ts.map +1 -1
- package/types/slotted-angular-section.d.ts +14 -4
- package/types/slotted-angular-section.d.ts.map +1 -1
- package/types/slotted-angular-segmented-control.d.ts +15 -2
- package/types/slotted-angular-segmented-control.d.ts.map +1 -1
- package/types/slotted-angular-select.d.ts +13 -2
- package/types/slotted-angular-select.d.ts.map +1 -1
- package/types/slotted-angular-side-navigation.d.ts.map +1 -1
- package/types/slotted-angular-skeleton.d.ts.map +1 -1
- package/types/slotted-angular-slider.d.ts.map +1 -1
- package/types/slotted-angular-sparkline.d.ts +7 -1
- package/types/slotted-angular-sparkline.d.ts.map +1 -1
- package/types/slotted-angular-split-button.d.ts +2 -2
- package/types/slotted-angular-split-button.d.ts.map +1 -1
- package/types/slotted-angular-splitter.d.ts.map +1 -1
- package/types/slotted-angular-stack.d.ts.map +1 -1
- package/types/slotted-angular-stat-card.d.ts +9 -4
- package/types/slotted-angular-stat-card.d.ts.map +1 -1
- package/types/slotted-angular-status-indicator.d.ts +13 -3
- package/types/slotted-angular-status-indicator.d.ts.map +1 -1
- package/types/slotted-angular-stepper.d.ts +2 -1
- package/types/slotted-angular-stepper.d.ts.map +1 -1
- package/types/slotted-angular-switch.d.ts.map +1 -1
- package/types/slotted-angular-table-of-contents.d.ts.map +1 -1
- package/types/slotted-angular-table.d.ts +63 -6
- package/types/slotted-angular-table.d.ts.map +1 -1
- package/types/slotted-angular-tabs.d.ts +3 -4
- package/types/slotted-angular-tabs.d.ts.map +1 -1
- package/types/slotted-angular-tag.d.ts +2 -2
- package/types/slotted-angular-tag.d.ts.map +1 -1
- package/types/slotted-angular-tags-input.d.ts +33 -1
- package/types/slotted-angular-tags-input.d.ts.map +1 -1
- package/types/slotted-angular-text-field.d.ts.map +1 -1
- package/types/slotted-angular-textarea.d.ts.map +1 -1
- package/types/slotted-angular-theme.d.ts +7 -5
- package/types/slotted-angular-theme.d.ts.map +1 -1
- package/types/slotted-angular-time-field.d.ts.map +1 -1
- package/types/slotted-angular-time-picker.d.ts +0 -1
- package/types/slotted-angular-time-picker.d.ts.map +1 -1
- package/types/slotted-angular-time-range-picker.d.ts +0 -1
- package/types/slotted-angular-time-range-picker.d.ts.map +1 -1
- package/types/slotted-angular-timeline.d.ts +1 -1
- package/types/slotted-angular-timeline.d.ts.map +1 -1
- package/types/slotted-angular-toast.d.ts +5 -3
- package/types/slotted-angular-toast.d.ts.map +1 -1
- package/types/slotted-angular-toggle-group.d.ts +8 -2
- package/types/slotted-angular-toggle-group.d.ts.map +1 -1
- package/types/slotted-angular-toggle.d.ts +1 -1
- package/types/slotted-angular-toggle.d.ts.map +1 -1
- package/types/slotted-angular-toolbar.d.ts +2 -0
- package/types/slotted-angular-toolbar.d.ts.map +1 -1
- package/types/slotted-angular-tooltip.d.ts.map +1 -1
- package/types/slotted-angular-top-navigation.d.ts.map +1 -1
- package/types/slotted-angular-tour.d.ts.map +1 -1
- package/types/slotted-angular-transfer.d.ts.map +1 -1
- package/types/slotted-angular-tree.d.ts.map +1 -1
- package/types/slotted-angular-typography.d.ts +1 -1
- package/types/slotted-angular-typography.d.ts.map +1 -1
- package/types/slotted-angular-upload.d.ts +4 -2
- package/types/slotted-angular-upload.d.ts.map +1 -1
- package/types/slotted-angular-visually-hidden.d.ts.map +1 -1
- package/types/slotted-angular-wizard.d.ts.map +1 -1
package/docs/date-picker.md
CHANGED
|
@@ -50,13 +50,14 @@ export class DatePickerBasic {}
|
|
|
50
50
|
|
|
51
51
|
| Name | Type | Default | Applies to | Description |
|
|
52
52
|
| --- | --- | --- | --- | --- |
|
|
53
|
-
| `value` | `PlainDate \| DateRange \| PlainDate[] \| null` | — | SlDatePicker | The selected value, whose shape follows selectionMode. Binding it makes the value controlled. |
|
|
54
|
-
| `defaultValue` | `PlainDate \| DateRange \| PlainDate[] \| null` | — | SlDatePicker | The starting value of an uncontrolled date picker. Read once, when the date picker initializes. |
|
|
53
|
+
| `value` | `PlainDate \| DateRange \| PlainDate[] \| PlainYearMonth \| null` | — | SlDatePicker | The selected value, whose shape follows selectionMode. Binding it makes the value controlled. PlainDate is exported by @slotted/core/date. parseISODate(text) returns a PlainDate or null, toISODate(date) returns 'YYYY-MM-DD', and isPlainDate(value) narrows the CalendarValue (valueChange) reports. |
|
|
54
|
+
| `defaultValue` | `PlainDate \| DateRange \| PlainDate[] \| PlainYearMonth \| null` | — | SlDatePicker | The starting value of an uncontrolled date picker. Read once, when the date picker initializes. |
|
|
55
55
|
| `open` | `boolean` | — | SlDatePicker | Whether the calendar is showing. Binding it makes the open state controlled. |
|
|
56
56
|
| `defaultOpen` | `boolean` | false | SlDatePicker | Whether the calendar shows when the date picker initializes. Focus does not move into it. |
|
|
57
|
-
| `min` | `PlainDate` | — | SlDatePicker | The earliest date the field and the calendar accept. Earlier days are disabled in the calendar, an earlier typed date marks the date picker invalid, and a form reports slottedDateRange. |
|
|
58
|
-
| `max` | `PlainDate` | — | SlDatePicker | The latest date the field and the calendar accept. Later days are disabled in the calendar, a later typed date marks the date picker invalid, and a form reports slottedDateRange. |
|
|
57
|
+
| `min` | `PlainDate \| PlainYearMonth` | — | SlDatePicker | The earliest date the field and the calendar accept. Earlier days are disabled in the calendar, an earlier typed date marks the date picker invalid, and a form reports slottedDateRange. |
|
|
58
|
+
| `max` | `PlainDate \| PlainYearMonth` | — | SlDatePicker | The latest date the field and the calendar accept. Later days are disabled in the calendar, a later typed date marks the date picker invalid, and a form reports slottedDateRange. |
|
|
59
59
|
| `isDateUnavailable` | `(date: PlainDate) => boolean` | — | SlDatePicker | Returns true for a date the reader cannot choose. The calendar disables it, a typed unavailable date marks the date picker invalid, and a form reports slottedDateUnavailable. |
|
|
60
|
+
| `granularity` | `'day' \| 'month'` | day | SlDatePicker | What a choice is. month opens the calendar on the months of a year and chooses a month cell; the field shows the month and the year segments; value, defaultValue, min and max are PlainYearMonth from @slotted/core/date ({ year, month }), (valueChange) reports one, and name submits YYYY-MM. parseISOYearMonth and toISOYearMonth convert to and from that text. selectionMode, months, isDateUnavailable and the week inputs do not apply. |
|
|
60
61
|
| `selectionMode` | `'single' \| 'range' \| 'multiple'` | single | SlDatePicker | How many dates the calendar selects, and so the shape of the value. The field shows a single date only; for a start and an end, use slDateRangePicker. |
|
|
61
62
|
| `months` | `number` | 1 | SlDatePicker | How many months the calendar draws side by side. |
|
|
62
63
|
| `defaultView` | `'day' \| 'month' \| 'year'` | day | SlDatePicker | The grid the calendar opens on. |
|
|
@@ -114,7 +115,7 @@ export class DatePickerBasic {}
|
|
|
114
115
|
|
|
115
116
|
## Tokens
|
|
116
117
|
|
|
117
|
-
`--slotted-border-subtle`, `--slotted-border-width-thin`, `--slotted-control-border-width`, `--slotted-control-height-lg`, `--slotted-control-height-md`, `--slotted-control-height-sm`, `--slotted-control-icon-size-lg`, `--slotted-control-icon-size-md`, `--slotted-control-icon-size-sm`, `--slotted-control-radius`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-date-picker-content-border-color`, `--slotted-date-picker-content-color`, `--slotted-date-picker-content-padding`, `--slotted-date-picker-content-radius`, `--slotted-date-picker-content-shadow`, `--slotted-date-picker-invalid-focus-ring-color`, `--slotted-date-picker-radius`, `--slotted-date-picker-surface`, `--slotted-date-picker-trigger-active-background`, `--slotted-date-picker-trigger-color`, `--slotted-date-picker-trigger-hover-background`, `--slotted-date-picker-trigger-size`, `--slotted-disabled-foreground`, `--slotted-duration-medium`, `--slotted-duration-short`, `--slotted-easing-enter`, `--slotted-easing-exit`, `--slotted-focus-ring-color`, `--slotted-focus-ring-color-invalid`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-radius-lg`, `--slotted-shadow-md`, `--slotted-space-2`, `--slotted-space-4`, `--slotted-space-5`, `--slotted-space-9`, `--slotted-surface-raised`, `--slotted-target-comfortable`, `--slotted-target-min`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`, `--slotted-z-index-popover`
|
|
118
|
+
`--slotted-border-subtle`, `--slotted-border-width-thin`, `--slotted-control-border-width`, `--slotted-control-height-lg`, `--slotted-control-height-md`, `--slotted-control-height-sm`, `--slotted-control-icon-size-lg`, `--slotted-control-icon-size-md`, `--slotted-control-icon-size-sm`, `--slotted-control-radius`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-date-picker-content-backdrop-filter`, `--slotted-date-picker-content-border-color`, `--slotted-date-picker-content-color`, `--slotted-date-picker-content-padding`, `--slotted-date-picker-content-radius`, `--slotted-date-picker-content-shadow`, `--slotted-date-picker-invalid-focus-ring-color`, `--slotted-date-picker-radius`, `--slotted-date-picker-surface`, `--slotted-date-picker-trigger-active-background`, `--slotted-date-picker-trigger-color`, `--slotted-date-picker-trigger-hover-background`, `--slotted-date-picker-trigger-size`, `--slotted-disabled-foreground`, `--slotted-duration-medium`, `--slotted-duration-short`, `--slotted-easing-enter`, `--slotted-easing-exit`, `--slotted-focus-ring-color`, `--slotted-focus-ring-color-invalid`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-radius-lg`, `--slotted-shadow-md`, `--slotted-space-2`, `--slotted-space-4`, `--slotted-space-5`, `--slotted-space-9`, `--slotted-surface-raised`, `--slotted-target-comfortable`, `--slotted-target-min`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`, `--slotted-z-index-popover`
|
|
118
119
|
|
|
119
120
|
## Examples
|
|
120
121
|
|
package/docs/datetime-field.json
CHANGED
|
@@ -421,6 +421,7 @@
|
|
|
421
421
|
"--slotted-border-subtle",
|
|
422
422
|
"--slotted-control-border-color",
|
|
423
423
|
"--slotted-control-border-width",
|
|
424
|
+
"--slotted-control-focus-ring-offset",
|
|
424
425
|
"--slotted-control-font-family",
|
|
425
426
|
"--slotted-control-font-size-lg",
|
|
426
427
|
"--slotted-control-font-size-md",
|
package/docs/datetime-field.md
CHANGED
|
@@ -105,7 +105,7 @@ Excerpt — not a complete module
|
|
|
105
105
|
|
|
106
106
|
## Tokens
|
|
107
107
|
|
|
108
|
-
`--slotted-border-subtle`, `--slotted-control-border-color`, `--slotted-control-border-width`, `--slotted-control-font-family`, `--slotted-control-font-size-lg`, `--slotted-control-font-size-md`, `--slotted-control-font-size-sm`, `--slotted-control-gap-lg`, `--slotted-control-gap-md`, `--slotted-control-gap-sm`, `--slotted-control-height-lg`, `--slotted-control-height-md`, `--slotted-control-height-sm`, `--slotted-control-icon-size-lg`, `--slotted-control-icon-size-md`, `--slotted-control-icon-size-sm`, `--slotted-control-invalid-edge-width`, `--slotted-control-padding-inline-lg`, `--slotted-control-padding-inline-md`, `--slotted-control-padding-inline-sm`, `--slotted-control-radius`, `--slotted-control-shadow`, `--slotted-control-shadow-focus-geometry`, `--slotted-control-surface`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-datetime-field-action-active-background`, `--slotted-datetime-field-action-color`, `--slotted-datetime-field-action-hover-background`, `--slotted-datetime-field-action-size`, `--slotted-datetime-field-adornment-color`, `--slotted-datetime-field-background`, `--slotted-datetime-field-border-color`, `--slotted-datetime-field-color`, `--slotted-datetime-field-disabled-background`, `--slotted-datetime-field-disabled-border-color`, `--slotted-datetime-field-disabled-color`, `--slotted-datetime-field-half-gap`, `--slotted-datetime-field-hover-border-color`, `--slotted-datetime-field-icon-size-min`, `--slotted-datetime-field-incomplete-border-color`, `--slotted-datetime-field-invalid-border-color`, `--slotted-datetime-field-invalid-edge-width`, `--slotted-datetime-field-invalid-focus-ring-color`, `--slotted-datetime-field-literal-color`, `--slotted-datetime-field-padding-block`, `--slotted-datetime-field-period-min-inline-size`, `--slotted-datetime-field-placeholder-color`, `--slotted-datetime-field-plain-hover-background`, `--slotted-datetime-field-preview-color`, `--slotted-datetime-field-preview-day-color`, `--slotted-datetime-field-radius`, `--slotted-datetime-field-readonly-background`, `--slotted-datetime-field-relative-border-color`, `--slotted-datetime-field-segment-focus-background`, `--slotted-datetime-field-segment-focus-color`, `--slotted-datetime-field-segment-min-inline-size`, `--slotted-datetime-field-segment-padding-inline`, `--slotted-datetime-field-segment-radius`, `--slotted-datetime-field-shadow`, `--slotted-datetime-field-subtle-background`, `--slotted-datetime-field-subtle-border-color`, `--slotted-datetime-field-subtle-hover-background`, `--slotted-disabled-background`, `--slotted-disabled-border`, `--slotted-disabled-foreground`, `--slotted-focus-ring-color`, `--slotted-focus-ring-color-invalid`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-font-weight-semibold`, `--slotted-radius-none`, `--slotted-radius-xs`, `--slotted-space-1`, `--slotted-space-2`, `--slotted-space-3`, `--slotted-surface-sunken`, `--slotted-target-comfortable`, `--slotted-target-min`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-accent-border`, `--slotted-tone-accent-on-solid`, `--slotted-tone-accent-solid`, `--slotted-tone-accent-text`, `--slotted-tone-danger-border`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`, `--slotted-tone-warning-border`
|
|
108
|
+
`--slotted-border-subtle`, `--slotted-control-border-color`, `--slotted-control-border-width`, `--slotted-control-focus-ring-offset`, `--slotted-control-font-family`, `--slotted-control-font-size-lg`, `--slotted-control-font-size-md`, `--slotted-control-font-size-sm`, `--slotted-control-gap-lg`, `--slotted-control-gap-md`, `--slotted-control-gap-sm`, `--slotted-control-height-lg`, `--slotted-control-height-md`, `--slotted-control-height-sm`, `--slotted-control-icon-size-lg`, `--slotted-control-icon-size-md`, `--slotted-control-icon-size-sm`, `--slotted-control-invalid-edge-width`, `--slotted-control-padding-inline-lg`, `--slotted-control-padding-inline-md`, `--slotted-control-padding-inline-sm`, `--slotted-control-radius`, `--slotted-control-shadow`, `--slotted-control-shadow-focus-geometry`, `--slotted-control-surface`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-datetime-field-action-active-background`, `--slotted-datetime-field-action-color`, `--slotted-datetime-field-action-hover-background`, `--slotted-datetime-field-action-size`, `--slotted-datetime-field-adornment-color`, `--slotted-datetime-field-background`, `--slotted-datetime-field-border-color`, `--slotted-datetime-field-color`, `--slotted-datetime-field-disabled-background`, `--slotted-datetime-field-disabled-border-color`, `--slotted-datetime-field-disabled-color`, `--slotted-datetime-field-half-gap`, `--slotted-datetime-field-hover-border-color`, `--slotted-datetime-field-icon-size-min`, `--slotted-datetime-field-incomplete-border-color`, `--slotted-datetime-field-invalid-border-color`, `--slotted-datetime-field-invalid-edge-width`, `--slotted-datetime-field-invalid-focus-ring-color`, `--slotted-datetime-field-literal-color`, `--slotted-datetime-field-padding-block`, `--slotted-datetime-field-period-min-inline-size`, `--slotted-datetime-field-placeholder-color`, `--slotted-datetime-field-plain-hover-background`, `--slotted-datetime-field-preview-color`, `--slotted-datetime-field-preview-day-color`, `--slotted-datetime-field-radius`, `--slotted-datetime-field-readonly-background`, `--slotted-datetime-field-relative-border-color`, `--slotted-datetime-field-segment-focus-background`, `--slotted-datetime-field-segment-focus-color`, `--slotted-datetime-field-segment-min-inline-size`, `--slotted-datetime-field-segment-padding-inline`, `--slotted-datetime-field-segment-radius`, `--slotted-datetime-field-shadow`, `--slotted-datetime-field-subtle-background`, `--slotted-datetime-field-subtle-border-color`, `--slotted-datetime-field-subtle-hover-background`, `--slotted-disabled-background`, `--slotted-disabled-border`, `--slotted-disabled-foreground`, `--slotted-focus-ring-color`, `--slotted-focus-ring-color-invalid`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-font-weight-semibold`, `--slotted-radius-none`, `--slotted-radius-xs`, `--slotted-space-1`, `--slotted-space-2`, `--slotted-space-3`, `--slotted-surface-sunken`, `--slotted-target-comfortable`, `--slotted-target-min`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-accent-border`, `--slotted-tone-accent-on-solid`, `--slotted-tone-accent-solid`, `--slotted-tone-accent-text`, `--slotted-tone-danger-border`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`, `--slotted-tone-warning-border`
|
|
109
109
|
|
|
110
110
|
## Examples
|
|
111
111
|
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"columns": "1",
|
|
31
31
|
"variant": "plain",
|
|
32
32
|
"termWidth": "14rem",
|
|
33
|
+
"minColumnWidth": "md",
|
|
33
34
|
"span": 1,
|
|
34
35
|
"clamp": 0,
|
|
35
36
|
"copy": false,
|
|
@@ -163,6 +164,13 @@
|
|
|
163
164
|
"appliesTo": "slDescriptionList",
|
|
164
165
|
"description": "Nothing between pairs, a rule between them, or a framed table"
|
|
165
166
|
},
|
|
167
|
+
{
|
|
168
|
+
"name": "minColumnWidth",
|
|
169
|
+
"type": "'sm' | 'md'",
|
|
170
|
+
"defaultValue": "md",
|
|
171
|
+
"appliesTo": "slDescriptionList",
|
|
172
|
+
"description": "The narrowest column before the count folds: md holds two columns to 34rem of the list and three to 48rem; sm holds two to 25rem and three to 37.5rem"
|
|
173
|
+
},
|
|
166
174
|
{
|
|
167
175
|
"name": "termWidth",
|
|
168
176
|
"type": "string",
|
|
@@ -254,7 +262,7 @@
|
|
|
254
262
|
"type": "DescriptionListDefaults",
|
|
255
263
|
"defaultValue": "—",
|
|
256
264
|
"appliesTo": "Application",
|
|
257
|
-
"description": "Sets layout, columns, variant and
|
|
265
|
+
"description": "Sets layout, columns, variant, termWidth and minColumnWidth once for everything below it; an input on the list still wins"
|
|
258
266
|
},
|
|
259
267
|
{
|
|
260
268
|
"name": "id / aria-describedby",
|
package/docs/description-list.md
CHANGED
|
@@ -55,6 +55,7 @@ Excerpt — not a complete module
|
|
|
55
55
|
| `layout` | `'row' \| 'stack'` | row | slDescriptionList | The term beside its value, or above it |
|
|
56
56
|
| `columns` | `1 \| 2 \| 3` | 1 | slDescriptionList | How many pairs stand side by side |
|
|
57
57
|
| `variant` | `'plain' \| 'ruled' \| 'framed'` | plain | slDescriptionList | Nothing between pairs, a rule between them, or a framed table |
|
|
58
|
+
| `minColumnWidth` | `'sm' \| 'md'` | md | slDescriptionList | The narrowest column before the count folds: md holds two columns to 34rem of the list and three to 48rem; sm holds two to 25rem and three to 37.5rem |
|
|
58
59
|
| `termWidth` | `string` | 14rem | slDescriptionList | The maximum width of the term column; the terms share one track sized to the widest of them, up to this |
|
|
59
60
|
| `messages` | `PartialMessages<DescriptionListMessages>` | — | slDescriptionList | Words laid over the language in force, key by key: copy, copied, copyBlocked, reveal, collapse, placeholder |
|
|
60
61
|
| `span` | `1 \| 2 \| 3` | 1 | slDescriptionListItem | How many columns the pair takes, clamped to the count the list has |
|
|
@@ -67,7 +68,7 @@ Excerpt — not a complete module
|
|
|
67
68
|
| `defaultRevealed` | `boolean` | false | slDescriptionListDescription | What an uncontrolled description starts from, read once |
|
|
68
69
|
| `ng-content` | `projection` | — | slDescriptionList, slDescriptionListDescription | Pairs are projected into the dl the component draws, and a value into the span that holds it |
|
|
69
70
|
| `exportAs` | `string` | — | every directive | Reaches the instance from the template: slDescriptionList, slDescriptionListItem, slDescriptionListTerm, slDescriptionListHint, slDescriptionListDescription, slDescriptionListAction |
|
|
70
|
-
| `provideDescriptionListDefaults()` | `DescriptionListDefaults` | — | Application | Sets layout, columns, variant and
|
|
71
|
+
| `provideDescriptionListDefaults()` | `DescriptionListDefaults` | — | Application | Sets layout, columns, variant, termWidth and minColumnWidth once for everything below it; an input on the list still wins |
|
|
71
72
|
| `id / aria-describedby` | `string` | — | slDescriptionListTerm, slDescriptionListAction | A static attribute you wrote survives the host binding: the term keeps your id, and the action composes your description with the term’s |
|
|
72
73
|
| `content` | `projection` | — | slDescriptionListDescription | A tag, a status indicator, a link or a skeleton — the value slot takes what the row needs |
|
|
73
74
|
|
package/docs/detail-panel.json
CHANGED
|
@@ -364,6 +364,8 @@
|
|
|
364
364
|
"--slotted-detail-panel-aside-size-md",
|
|
365
365
|
"--slotted-detail-panel-aside-size-sm",
|
|
366
366
|
"--slotted-detail-panel-border",
|
|
367
|
+
"--slotted-detail-panel-footer-backdrop-filter",
|
|
368
|
+
"--slotted-detail-panel-footer-background",
|
|
367
369
|
"--slotted-detail-panel-gap-lg",
|
|
368
370
|
"--slotted-detail-panel-gap-md",
|
|
369
371
|
"--slotted-detail-panel-gap-sm",
|
|
@@ -425,9 +427,9 @@
|
|
|
425
427
|
{
|
|
426
428
|
"id": "hosts",
|
|
427
429
|
"title": "Three hosts, one anatomy",
|
|
428
|
-
"note": "The same panel as a page’s content at level 1, as a drawer’s body with the drawer’s own close in the header actions, and as a split’s pane scrolling itself. Nothing in the panel names its host: scroll=\"self\" is the one difference a pane makes.",
|
|
430
|
+
"note": "The same panel as a page’s content at level 1, as a drawer’s body with the drawer’s own close in the header actions, and as a split’s pane scrolling itself. Nothing in the panel names its host: scroll=\"self\" is the one difference a pane makes. A pane that paints a ground of its own declares --slotted-page-ground with that ground, so a sticky section header inside the panel matches the pane and not the page.",
|
|
429
431
|
"language": "html",
|
|
430
|
-
"source": "<div slDrawer [(open)]=\"open\">\n <div slDrawerPanel>\n <div slDrawerBody>\n <article slDetailPanel [recordKey]=\"order.id\">…</article>\n </div>\n </div>\n</div>\n\n<article slDetailPanel scroll=\"self\" [recordKey]=\"order.id\">…</article>\n",
|
|
432
|
+
"source": "<div slDrawer [(open)]=\"open\">\n <div slDrawerPanel>\n <div slDrawerBody>\n <article slDetailPanel [recordKey]=\"order.id\">…</article>\n </div>\n </div>\n</div>\n\n<div\n class=\"pane\"\n style=\"background: var(--slotted-surface); --slotted-page-ground: var(--slotted-surface)\"\n>\n <article slDetailPanel scroll=\"self\" [recordKey]=\"order.id\">…</article>\n</div>\n",
|
|
431
433
|
"verdict": "excerpt"
|
|
432
434
|
},
|
|
433
435
|
{
|
package/docs/detail-panel.md
CHANGED
|
@@ -105,7 +105,7 @@ Excerpt — not a complete module
|
|
|
105
105
|
|
|
106
106
|
## Tokens
|
|
107
107
|
|
|
108
|
-
`--slotted-border-subtle`, `--slotted-border-width-thin`, `--slotted-control-gap-md`, `--slotted-detail-panel-aside-size-lg`, `--slotted-detail-panel-aside-size-md`, `--slotted-detail-panel-aside-size-sm`, `--slotted-detail-panel-border`, `--slotted-detail-panel-gap-lg`, `--slotted-detail-panel-gap-md`, `--slotted-detail-panel-gap-sm`, `--slotted-detail-panel-inset-block-lg`, `--slotted-detail-panel-inset-block-md`, `--slotted-detail-panel-inset-block-sm`, `--slotted-detail-panel-rhythm`, `--slotted-duration-short`, `--slotted-easing-enter`, `--slotted-focus-ring-color`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-font-family-sans`, `--slotted-page-ground`, `--slotted-space-12`, `--slotted-space-4`, `--slotted-space-5`, `--slotted-space-7`, `--slotted-space-8`, `--slotted-space-9`, `--slotted-surface`, `--slotted-text`, `--slotted-text-muted`, `--slotted-z-index-sticky`
|
|
108
|
+
`--slotted-border-subtle`, `--slotted-border-width-thin`, `--slotted-control-gap-md`, `--slotted-detail-panel-aside-size-lg`, `--slotted-detail-panel-aside-size-md`, `--slotted-detail-panel-aside-size-sm`, `--slotted-detail-panel-border`, `--slotted-detail-panel-footer-backdrop-filter`, `--slotted-detail-panel-footer-background`, `--slotted-detail-panel-gap-lg`, `--slotted-detail-panel-gap-md`, `--slotted-detail-panel-gap-sm`, `--slotted-detail-panel-inset-block-lg`, `--slotted-detail-panel-inset-block-md`, `--slotted-detail-panel-inset-block-sm`, `--slotted-detail-panel-rhythm`, `--slotted-duration-short`, `--slotted-easing-enter`, `--slotted-focus-ring-color`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-font-family-sans`, `--slotted-page-ground`, `--slotted-space-12`, `--slotted-space-4`, `--slotted-space-5`, `--slotted-space-7`, `--slotted-space-8`, `--slotted-space-9`, `--slotted-surface`, `--slotted-text`, `--slotted-text-muted`, `--slotted-z-index-sticky`
|
|
109
109
|
|
|
110
110
|
## Examples
|
|
111
111
|
|
|
@@ -155,7 +155,7 @@ Excerpt — not a complete module
|
|
|
155
155
|
|
|
156
156
|
### Three hosts, one anatomy
|
|
157
157
|
|
|
158
|
-
The same panel as a page’s content at level 1, as a drawer’s body with the drawer’s own close in the header actions, and as a split’s pane scrolling itself. Nothing in the panel names its host: scroll="self" is the one difference a pane makes.
|
|
158
|
+
The same panel as a page’s content at level 1, as a drawer’s body with the drawer’s own close in the header actions, and as a split’s pane scrolling itself. Nothing in the panel names its host: scroll="self" is the one difference a pane makes. A pane that paints a ground of its own declares --slotted-page-ground with that ground, so a sticky section header inside the panel matches the pane and not the page.
|
|
159
159
|
|
|
160
160
|
Excerpt — not a complete module
|
|
161
161
|
|
|
@@ -168,7 +168,12 @@ Excerpt — not a complete module
|
|
|
168
168
|
</div>
|
|
169
169
|
</div>
|
|
170
170
|
|
|
171
|
-
<
|
|
171
|
+
<div
|
|
172
|
+
class="pane"
|
|
173
|
+
style="background: var(--slotted-surface); --slotted-page-ground: var(--slotted-surface)"
|
|
174
|
+
>
|
|
175
|
+
<article slDetailPanel scroll="self" [recordKey]="order.id">…</article>
|
|
176
|
+
</div>
|
|
172
177
|
```
|
|
173
178
|
|
|
174
179
|
### Previous and next: focus follows the record
|
package/docs/dialog.examples.md
CHANGED
|
@@ -622,6 +622,164 @@ Excerpt — not a complete module
|
|
|
622
622
|
<button slButton variant="outline" [slDialogTrigger]="d">Edit project</button>
|
|
623
623
|
```
|
|
624
624
|
|
|
625
|
+
### A layout of its own
|
|
626
|
+
|
|
627
|
+
The panel draws no padding: the header, the body and the footer carry the inset. A layout of its own — one field, a preview, a footer — reads --slotted-dialog-inset-inline and --slotted-dialog-inset-block, so it stands in the column the parts stand in.
|
|
628
|
+
|
|
629
|
+
Excerpt — not a complete module
|
|
630
|
+
|
|
631
|
+
```html
|
|
632
|
+
<sl-dialog #d="slDialog">
|
|
633
|
+
<div class="rename">
|
|
634
|
+
<h2 slDialogTitle>Rename file</h2>
|
|
635
|
+
<input slTextField aria-label="Name" value="report-q3.pdf" />
|
|
636
|
+
<img alt="First page of report-q3.pdf" [src]="preview" />
|
|
637
|
+
</div>
|
|
638
|
+
<footer slDialogFooter><button slButton size="sm">Rename</button></footer>
|
|
639
|
+
</sl-dialog>
|
|
640
|
+
<!-- .rename { display: grid; gap: var(--slotted-space-5);
|
|
641
|
+
padding-block: var(--slotted-dialog-inset-block);
|
|
642
|
+
padding-inline: var(--slotted-dialog-inset-inline); } -->
|
|
643
|
+
```
|
|
644
|
+
|
|
645
|
+
### A dialog that is a form
|
|
646
|
+
|
|
647
|
+
A dialog that edits a record submits with Enter from any field and with the footer’s submit. A form written around the header, the body and the footer draws no box of its own, so the parts stay the panel’s rows and keep its inset.
|
|
648
|
+
|
|
649
|
+
Example
|
|
650
|
+
|
|
651
|
+
```ts
|
|
652
|
+
import { Component, computed, signal } from '@angular/core';
|
|
653
|
+
import { SlButton } from '@slotted/angular/button';
|
|
654
|
+
import {
|
|
655
|
+
SlDialog,
|
|
656
|
+
SlDialogBody,
|
|
657
|
+
SlDialogClose,
|
|
658
|
+
SlDialogDescription,
|
|
659
|
+
SlDialogFooter,
|
|
660
|
+
SlDialogHeader,
|
|
661
|
+
SlDialogTitle,
|
|
662
|
+
SlDialogTrigger,
|
|
663
|
+
} from '@slotted/angular/dialog';
|
|
664
|
+
import { SlField, SlFieldError, SlFieldLabel } from '@slotted/angular/field';
|
|
665
|
+
import { SlInline } from '@slotted/angular/inline';
|
|
666
|
+
import { SlStack } from '@slotted/angular/stack';
|
|
667
|
+
import { SlTextField, SlTextFieldInput } from '@slotted/angular/text-field';
|
|
668
|
+
import { SlText } from '@slotted/angular/typography';
|
|
669
|
+
|
|
670
|
+
function nameError(value: string): string {
|
|
671
|
+
return value.trim() === '' ? 'Enter the contact’s full name.' : '';
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
function emailError(value: string): string {
|
|
675
|
+
if (value.trim() === '') return 'Enter the address the contact reads.';
|
|
676
|
+
if (!/^\S+@\S+\.\S+$/.test(value)) return 'Enter an address like ana@contoso.com.';
|
|
677
|
+
return '';
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
@Component({
|
|
681
|
+
selector: 'app-dialog-form',
|
|
682
|
+
imports: [
|
|
683
|
+
SlButton,
|
|
684
|
+
SlDialog,
|
|
685
|
+
SlDialogBody,
|
|
686
|
+
SlDialogClose,
|
|
687
|
+
SlDialogDescription,
|
|
688
|
+
SlDialogFooter,
|
|
689
|
+
SlDialogHeader,
|
|
690
|
+
SlDialogTitle,
|
|
691
|
+
SlDialogTrigger,
|
|
692
|
+
SlField,
|
|
693
|
+
SlFieldError,
|
|
694
|
+
SlFieldLabel,
|
|
695
|
+
SlInline,
|
|
696
|
+
SlStack,
|
|
697
|
+
SlText,
|
|
698
|
+
SlTextField,
|
|
699
|
+
SlTextFieldInput,
|
|
700
|
+
],
|
|
701
|
+
template: `
|
|
702
|
+
<div slInline align="center" [gap]="3">
|
|
703
|
+
<button slButton [slDialogTrigger]="dialog">Add contact</button>
|
|
704
|
+
<sl-dialog #dialog="slDialog" [open]="open()" (openChange)="toggle($event)">
|
|
705
|
+
<header slDialogHeader>
|
|
706
|
+
<h2 slDialogTitle>New contact</h2>
|
|
707
|
+
<p slDialogDescription>Contoso Foods, Seattle.</p>
|
|
708
|
+
<button slDialogClose></button>
|
|
709
|
+
</header>
|
|
710
|
+
<div slDialogBody>
|
|
711
|
+
<form id="new-contact" novalidate (submit)="submit($event)">
|
|
712
|
+
<div slStack [gap]="4">
|
|
713
|
+
<div slField required [invalid]="errors()?.name ? true : undefined">
|
|
714
|
+
<label slFieldLabel>Full name</label>
|
|
715
|
+
<div slTextField>
|
|
716
|
+
<input
|
|
717
|
+
slTextFieldInput
|
|
718
|
+
autocomplete="name"
|
|
719
|
+
[value]="name()"
|
|
720
|
+
(valueChange)="name.set($event.value)"
|
|
721
|
+
/>
|
|
722
|
+
</div>
|
|
723
|
+
<span slFieldError live="polite" reserve>{{ errors()?.name }}</span>
|
|
724
|
+
</div>
|
|
725
|
+
<div slField required [invalid]="errors()?.email ? true : undefined">
|
|
726
|
+
<label slFieldLabel>Email</label>
|
|
727
|
+
<div slTextField>
|
|
728
|
+
<input
|
|
729
|
+
slTextFieldInput
|
|
730
|
+
autocomplete="email"
|
|
731
|
+
type="email"
|
|
732
|
+
[value]="email()"
|
|
733
|
+
(valueChange)="email.set($event.value)"
|
|
734
|
+
/>
|
|
735
|
+
</div>
|
|
736
|
+
<span slFieldError live="polite" reserve>{{ errors()?.email }}</span>
|
|
737
|
+
</div>
|
|
738
|
+
</div>
|
|
739
|
+
</form>
|
|
740
|
+
</div>
|
|
741
|
+
<footer slDialogFooter>
|
|
742
|
+
<button slButton variant="ghost" tone="secondary" (click)="open.set(false)">
|
|
743
|
+
Cancel
|
|
744
|
+
</button>
|
|
745
|
+
<button slButton type="submit" form="new-contact">Add contact</button>
|
|
746
|
+
</footer>
|
|
747
|
+
</sl-dialog>
|
|
748
|
+
@if (added(); as message) {
|
|
749
|
+
<span slText role="status" size="sm" tone="muted">{{ message }}</span>
|
|
750
|
+
}
|
|
751
|
+
</div>
|
|
752
|
+
`,
|
|
753
|
+
})
|
|
754
|
+
export class DialogForm {
|
|
755
|
+
readonly open = signal(false);
|
|
756
|
+
readonly name = signal('');
|
|
757
|
+
readonly email = signal('');
|
|
758
|
+
readonly submitted = signal(false);
|
|
759
|
+
readonly added = signal<string | null>(null);
|
|
760
|
+
readonly errors = computed(() =>
|
|
761
|
+
this.submitted() ? { name: nameError(this.name()), email: emailError(this.email()) } : null,
|
|
762
|
+
);
|
|
763
|
+
|
|
764
|
+
toggle(next: boolean): void {
|
|
765
|
+
if (next) {
|
|
766
|
+
this.name.set('');
|
|
767
|
+
this.email.set('');
|
|
768
|
+
this.submitted.set(false);
|
|
769
|
+
}
|
|
770
|
+
this.open.set(next);
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
submit(event: Event): void {
|
|
774
|
+
event.preventDefault();
|
|
775
|
+
this.submitted.set(true);
|
|
776
|
+
if (nameError(this.name()) !== '' || emailError(this.email()) !== '') return;
|
|
777
|
+
this.added.set(`${this.name().trim()} was added to Contoso Foods.`);
|
|
778
|
+
this.open.set(false);
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
```
|
|
782
|
+
|
|
625
783
|
### Deciding once for the application
|
|
626
784
|
|
|
627
785
|
Eight decisions an application takes once instead of eight props on every dialog in a product. Angular Material is the only surveyed library with an equivalent, and a dialog that states one itself still wins.
|
|
@@ -1619,142 +1777,6 @@ export class DialogDismiss {
|
|
|
1619
1777
|
}
|
|
1620
1778
|
```
|
|
1621
1779
|
|
|
1622
|
-
### form.ts
|
|
1623
|
-
|
|
1624
|
-
Example
|
|
1625
|
-
|
|
1626
|
-
```ts
|
|
1627
|
-
import { Component, computed, signal } from '@angular/core';
|
|
1628
|
-
import { SlButton } from '@slotted/angular/button';
|
|
1629
|
-
import {
|
|
1630
|
-
SlDialog,
|
|
1631
|
-
SlDialogBody,
|
|
1632
|
-
SlDialogClose,
|
|
1633
|
-
SlDialogDescription,
|
|
1634
|
-
SlDialogFooter,
|
|
1635
|
-
SlDialogHeader,
|
|
1636
|
-
SlDialogTitle,
|
|
1637
|
-
SlDialogTrigger,
|
|
1638
|
-
} from '@slotted/angular/dialog';
|
|
1639
|
-
import { SlField, SlFieldError, SlFieldLabel } from '@slotted/angular/field';
|
|
1640
|
-
import { SlInline } from '@slotted/angular/inline';
|
|
1641
|
-
import { SlStack } from '@slotted/angular/stack';
|
|
1642
|
-
import { SlTextField, SlTextFieldInput } from '@slotted/angular/text-field';
|
|
1643
|
-
import { SlText } from '@slotted/angular/typography';
|
|
1644
|
-
|
|
1645
|
-
function nameError(value: string): string {
|
|
1646
|
-
return value.trim() === '' ? 'Enter the contact’s full name.' : '';
|
|
1647
|
-
}
|
|
1648
|
-
|
|
1649
|
-
function emailError(value: string): string {
|
|
1650
|
-
if (value.trim() === '') return 'Enter the address the contact reads.';
|
|
1651
|
-
if (!/^\S+@\S+\.\S+$/.test(value)) return 'Enter an address like ana@contoso.com.';
|
|
1652
|
-
return '';
|
|
1653
|
-
}
|
|
1654
|
-
|
|
1655
|
-
@Component({
|
|
1656
|
-
selector: 'app-dialog-form',
|
|
1657
|
-
imports: [
|
|
1658
|
-
SlButton,
|
|
1659
|
-
SlDialog,
|
|
1660
|
-
SlDialogBody,
|
|
1661
|
-
SlDialogClose,
|
|
1662
|
-
SlDialogDescription,
|
|
1663
|
-
SlDialogFooter,
|
|
1664
|
-
SlDialogHeader,
|
|
1665
|
-
SlDialogTitle,
|
|
1666
|
-
SlDialogTrigger,
|
|
1667
|
-
SlField,
|
|
1668
|
-
SlFieldError,
|
|
1669
|
-
SlFieldLabel,
|
|
1670
|
-
SlInline,
|
|
1671
|
-
SlStack,
|
|
1672
|
-
SlText,
|
|
1673
|
-
SlTextField,
|
|
1674
|
-
SlTextFieldInput,
|
|
1675
|
-
],
|
|
1676
|
-
template: `
|
|
1677
|
-
<div slInline align="center" [gap]="3">
|
|
1678
|
-
<button slButton [slDialogTrigger]="dialog">Add contact</button>
|
|
1679
|
-
<sl-dialog #dialog="slDialog" [open]="open()" (openChange)="toggle($event)">
|
|
1680
|
-
<header slDialogHeader>
|
|
1681
|
-
<h2 slDialogTitle>New contact</h2>
|
|
1682
|
-
<p slDialogDescription>Contoso Foods, Seattle.</p>
|
|
1683
|
-
<button slDialogClose></button>
|
|
1684
|
-
</header>
|
|
1685
|
-
<div slDialogBody>
|
|
1686
|
-
<form id="new-contact" novalidate (submit)="submit($event)">
|
|
1687
|
-
<div slStack [gap]="4">
|
|
1688
|
-
<div slField required [invalid]="errors()?.name ? true : undefined">
|
|
1689
|
-
<label slFieldLabel>Full name</label>
|
|
1690
|
-
<div slTextField>
|
|
1691
|
-
<input
|
|
1692
|
-
slTextFieldInput
|
|
1693
|
-
autocomplete="name"
|
|
1694
|
-
[value]="name()"
|
|
1695
|
-
(valueChange)="name.set($event.value)"
|
|
1696
|
-
/>
|
|
1697
|
-
</div>
|
|
1698
|
-
<span slFieldError live="polite" reserve>{{ errors()?.name }}</span>
|
|
1699
|
-
</div>
|
|
1700
|
-
<div slField required [invalid]="errors()?.email ? true : undefined">
|
|
1701
|
-
<label slFieldLabel>Email</label>
|
|
1702
|
-
<div slTextField>
|
|
1703
|
-
<input
|
|
1704
|
-
slTextFieldInput
|
|
1705
|
-
autocomplete="email"
|
|
1706
|
-
type="email"
|
|
1707
|
-
[value]="email()"
|
|
1708
|
-
(valueChange)="email.set($event.value)"
|
|
1709
|
-
/>
|
|
1710
|
-
</div>
|
|
1711
|
-
<span slFieldError live="polite" reserve>{{ errors()?.email }}</span>
|
|
1712
|
-
</div>
|
|
1713
|
-
</div>
|
|
1714
|
-
</form>
|
|
1715
|
-
</div>
|
|
1716
|
-
<footer slDialogFooter>
|
|
1717
|
-
<button slButton variant="ghost" tone="secondary" (click)="open.set(false)">
|
|
1718
|
-
Cancel
|
|
1719
|
-
</button>
|
|
1720
|
-
<button slButton type="submit" form="new-contact">Add contact</button>
|
|
1721
|
-
</footer>
|
|
1722
|
-
</sl-dialog>
|
|
1723
|
-
@if (added(); as message) {
|
|
1724
|
-
<span slText role="status" size="sm" tone="muted">{{ message }}</span>
|
|
1725
|
-
}
|
|
1726
|
-
</div>
|
|
1727
|
-
`,
|
|
1728
|
-
})
|
|
1729
|
-
export class DialogForm {
|
|
1730
|
-
readonly open = signal(false);
|
|
1731
|
-
readonly name = signal('');
|
|
1732
|
-
readonly email = signal('');
|
|
1733
|
-
readonly submitted = signal(false);
|
|
1734
|
-
readonly added = signal<string | null>(null);
|
|
1735
|
-
readonly errors = computed(() =>
|
|
1736
|
-
this.submitted() ? { name: nameError(this.name()), email: emailError(this.email()) } : null,
|
|
1737
|
-
);
|
|
1738
|
-
|
|
1739
|
-
toggle(next: boolean): void {
|
|
1740
|
-
if (next) {
|
|
1741
|
-
this.name.set('');
|
|
1742
|
-
this.email.set('');
|
|
1743
|
-
this.submitted.set(false);
|
|
1744
|
-
}
|
|
1745
|
-
this.open.set(next);
|
|
1746
|
-
}
|
|
1747
|
-
|
|
1748
|
-
submit(event: Event): void {
|
|
1749
|
-
event.preventDefault();
|
|
1750
|
-
this.submitted.set(true);
|
|
1751
|
-
if (nameError(this.name()) !== '' || emailError(this.email()) !== '') return;
|
|
1752
|
-
this.added.set(`${this.name().trim()} was added to Contoso Foods.`);
|
|
1753
|
-
this.open.set(false);
|
|
1754
|
-
}
|
|
1755
|
-
}
|
|
1756
|
-
```
|
|
1757
|
-
|
|
1758
1780
|
### full-screen.ts
|
|
1759
1781
|
|
|
1760
1782
|
Example
|
package/docs/dialog.json
CHANGED
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
"tone": [
|
|
56
56
|
"accent",
|
|
57
57
|
"secondary",
|
|
58
|
+
"info",
|
|
58
59
|
"success",
|
|
59
60
|
"warning",
|
|
60
61
|
"danger"
|
|
@@ -208,7 +209,7 @@
|
|
|
208
209
|
"part": "content",
|
|
209
210
|
"element": "div",
|
|
210
211
|
"required": true,
|
|
211
|
-
"purpose": "The panel. It carries role=\"dialog\" and, while modal, aria-modal=\"true\". It is a grid of three rows, header, body and footer, and only the body row shrinks, so the actions stay on screen when the body is long."
|
|
212
|
+
"purpose": "The panel. It carries role=\"dialog\" and, while modal, aria-modal=\"true\". It is a grid of three rows, header, body and footer, and only the body row shrinks, so the actions stay on screen when the body is long. It draws no padding: slDialogHeader, slDialogBody and slDialogFooter carry the panel inset. A layout that skips them reads --slotted-dialog-inset-inline and --slotted-dialog-inset-block, which the panel states, and a theme sets the inset with --slotted-dialog-padding-inline and --slotted-dialog-padding-block."
|
|
212
213
|
},
|
|
213
214
|
{
|
|
214
215
|
"part": "header",
|
|
@@ -431,6 +432,11 @@
|
|
|
431
432
|
"payload": "DialogChangeRequest",
|
|
432
433
|
"when": "Before the dialog opens or closes, whatever caused it. The request carries the new value, the previous value, the reason (pointer, keyboard, dismiss, escape, outsidePress, back, submit or programmatic), the result of the close, the originating event, and cancel(), which keeps the dialog as it is. One handler therefore guards the ✕, Escape, a press outside, the way back and close() together."
|
|
433
434
|
},
|
|
435
|
+
{
|
|
436
|
+
"name": "(openChangeComplete)",
|
|
437
|
+
"payload": "boolean",
|
|
438
|
+
"when": "After the entrance or the exit has ended: true once the layer is settled open, false once it has left — the moment an application that renders the layer conditionally removes it, so the exit runs."
|
|
439
|
+
},
|
|
434
440
|
{
|
|
435
441
|
"name": "(openChange)",
|
|
436
442
|
"payload": "boolean",
|
|
@@ -497,7 +503,7 @@
|
|
|
497
503
|
"part": "content",
|
|
498
504
|
"element": "div",
|
|
499
505
|
"required": true,
|
|
500
|
-
"purpose": "The panel. It carries role=\"alertdialog\" and, while modal, aria-modal=\"true\". It is a grid of three rows, header, body and footer, and only the body row shrinks, so the actions stay on screen when the body is long."
|
|
506
|
+
"purpose": "The panel. It carries role=\"alertdialog\" and, while modal, aria-modal=\"true\". It is a grid of three rows, header, body and footer, and only the body row shrinks, so the actions stay on screen when the body is long. It draws no padding: slDialogHeader, slDialogBody and slDialogFooter carry the panel inset. A layout that skips them reads --slotted-dialog-inset-inline and --slotted-dialog-inset-block, which the panel states, and a theme sets the inset with --slotted-dialog-padding-inline and --slotted-dialog-padding-block."
|
|
501
507
|
},
|
|
502
508
|
{
|
|
503
509
|
"part": "header",
|
|
@@ -628,7 +634,7 @@
|
|
|
628
634
|
},
|
|
629
635
|
{
|
|
630
636
|
"name": "tone",
|
|
631
|
-
"type": "'accent' | 'secondary' | 'success' | 'warning' | 'danger'",
|
|
637
|
+
"type": "'accent' | 'secondary' | 'info' | 'success' | 'warning' | 'danger'",
|
|
632
638
|
"defaultValue": "danger",
|
|
633
639
|
"appliesTo": "sl-alert-dialog",
|
|
634
640
|
"description": "The kind of decision. It sets the mark slAlertDialogIcon draws and its colour."
|
|
@@ -719,6 +725,11 @@
|
|
|
719
725
|
"payload": "DialogChangeRequest",
|
|
720
726
|
"when": "Before the dialog opens or closes, whatever caused it. The request carries the new value, the previous value, the reason (pointer, keyboard, dismiss, escape, outsidePress, back, submit or programmatic), the result of the close, the originating event, and cancel(), which keeps the dialog as it is. One handler therefore guards the ✕, Escape, a press outside, the way back and close() together."
|
|
721
727
|
},
|
|
728
|
+
{
|
|
729
|
+
"name": "(openChangeComplete)",
|
|
730
|
+
"payload": "boolean",
|
|
731
|
+
"when": "After the entrance or the exit has ended: true once the layer is settled open, false once it has left — the moment an application that renders the layer conditionally removes it, so the exit runs."
|
|
732
|
+
},
|
|
722
733
|
{
|
|
723
734
|
"name": "(openChange)",
|
|
724
735
|
"payload": "boolean",
|
|
@@ -760,6 +771,7 @@
|
|
|
760
771
|
"--slotted-control-radius",
|
|
761
772
|
"--slotted-control-transition-duration",
|
|
762
773
|
"--slotted-control-transition-easing",
|
|
774
|
+
"--slotted-dialog-backdrop-filter",
|
|
763
775
|
"--slotted-dialog-body-color",
|
|
764
776
|
"--slotted-dialog-border-color",
|
|
765
777
|
"--slotted-dialog-close-active-background",
|
|
@@ -769,6 +781,10 @@
|
|
|
769
781
|
"--slotted-dialog-description-color",
|
|
770
782
|
"--slotted-dialog-footer-surface",
|
|
771
783
|
"--slotted-dialog-measure",
|
|
784
|
+
"--slotted-dialog-padding-block",
|
|
785
|
+
"--slotted-dialog-padding-block-sm",
|
|
786
|
+
"--slotted-dialog-padding-inline",
|
|
787
|
+
"--slotted-dialog-padding-inline-sm",
|
|
772
788
|
"--slotted-dialog-radius",
|
|
773
789
|
"--slotted-dialog-rule-color",
|
|
774
790
|
"--slotted-dialog-scrim",
|
|
@@ -809,6 +825,7 @@
|
|
|
809
825
|
"--slotted-text-muted",
|
|
810
826
|
"--slotted-tone-accent-text",
|
|
811
827
|
"--slotted-tone-danger-text",
|
|
828
|
+
"--slotted-tone-info-text",
|
|
812
829
|
"--slotted-tone-secondary-subtle-active",
|
|
813
830
|
"--slotted-tone-secondary-subtle-hover",
|
|
814
831
|
"--slotted-tone-secondary-text",
|
|
@@ -921,6 +938,22 @@
|
|
|
921
938
|
"source": "<button slButton variant=\"outline\" [slDialogTrigger]=\"d\">Edit project</button>\n",
|
|
922
939
|
"verdict": "excerpt"
|
|
923
940
|
},
|
|
941
|
+
{
|
|
942
|
+
"id": "layout",
|
|
943
|
+
"title": "A layout of its own",
|
|
944
|
+
"note": "The panel draws no padding: the header, the body and the footer carry the inset. A layout of its own — one field, a preview, a footer — reads --slotted-dialog-inset-inline and --slotted-dialog-inset-block, so it stands in the column the parts stand in.",
|
|
945
|
+
"language": "html",
|
|
946
|
+
"source": "<sl-dialog #d=\"slDialog\">\n <div class=\"rename\">\n <h2 slDialogTitle>Rename file</h2>\n <input slTextField aria-label=\"Name\" value=\"report-q3.pdf\" />\n <img alt=\"First page of report-q3.pdf\" [src]=\"preview\" />\n </div>\n <footer slDialogFooter><button slButton size=\"sm\">Rename</button></footer>\n</sl-dialog>\n<!-- .rename { display: grid; gap: var(--slotted-space-5);\n padding-block: var(--slotted-dialog-inset-block);\n padding-inline: var(--slotted-dialog-inset-inline); } -->\n",
|
|
947
|
+
"verdict": "excerpt"
|
|
948
|
+
},
|
|
949
|
+
{
|
|
950
|
+
"id": "form",
|
|
951
|
+
"title": "A dialog that is a form",
|
|
952
|
+
"note": "A dialog that edits a record submits with Enter from any field and with the footer’s submit. A form written around the header, the body and the footer draws no box of its own, so the parts stay the panel’s rows and keep its inset.",
|
|
953
|
+
"language": "ts",
|
|
954
|
+
"source": "import { Component, computed, signal } from '@angular/core';\nimport { SlButton } from '@slotted/angular/button';\nimport {\n SlDialog,\n SlDialogBody,\n SlDialogClose,\n SlDialogDescription,\n SlDialogFooter,\n SlDialogHeader,\n SlDialogTitle,\n SlDialogTrigger,\n} from '@slotted/angular/dialog';\nimport { SlField, SlFieldError, SlFieldLabel } from '@slotted/angular/field';\nimport { SlInline } from '@slotted/angular/inline';\nimport { SlStack } from '@slotted/angular/stack';\nimport { SlTextField, SlTextFieldInput } from '@slotted/angular/text-field';\nimport { SlText } from '@slotted/angular/typography';\n\nfunction nameError(value: string): string {\n return value.trim() === '' ? 'Enter the contact’s full name.' : '';\n}\n\nfunction emailError(value: string): string {\n if (value.trim() === '') return 'Enter the address the contact reads.';\n if (!/^\\S+@\\S+\\.\\S+$/.test(value)) return 'Enter an address like ana@contoso.com.';\n return '';\n}\n\n@Component({\n selector: 'app-dialog-form',\n imports: [\n SlButton,\n SlDialog,\n SlDialogBody,\n SlDialogClose,\n SlDialogDescription,\n SlDialogFooter,\n SlDialogHeader,\n SlDialogTitle,\n SlDialogTrigger,\n SlField,\n SlFieldError,\n SlFieldLabel,\n SlInline,\n SlStack,\n SlText,\n SlTextField,\n SlTextFieldInput,\n ],\n template: `\n <div slInline align=\"center\" [gap]=\"3\">\n <button slButton [slDialogTrigger]=\"dialog\">Add contact</button>\n <sl-dialog #dialog=\"slDialog\" [open]=\"open()\" (openChange)=\"toggle($event)\">\n <header slDialogHeader>\n <h2 slDialogTitle>New contact</h2>\n <p slDialogDescription>Contoso Foods, Seattle.</p>\n <button slDialogClose></button>\n </header>\n <div slDialogBody>\n <form id=\"new-contact\" novalidate (submit)=\"submit($event)\">\n <div slStack [gap]=\"4\">\n <div slField required [invalid]=\"errors()?.name ? true : undefined\">\n <label slFieldLabel>Full name</label>\n <div slTextField>\n <input\n slTextFieldInput\n autocomplete=\"name\"\n [value]=\"name()\"\n (valueChange)=\"name.set($event.value)\"\n />\n </div>\n <span slFieldError live=\"polite\" reserve>{{ errors()?.name }}</span>\n </div>\n <div slField required [invalid]=\"errors()?.email ? true : undefined\">\n <label slFieldLabel>Email</label>\n <div slTextField>\n <input\n slTextFieldInput\n autocomplete=\"email\"\n type=\"email\"\n [value]=\"email()\"\n (valueChange)=\"email.set($event.value)\"\n />\n </div>\n <span slFieldError live=\"polite\" reserve>{{ errors()?.email }}</span>\n </div>\n </div>\n </form>\n </div>\n <footer slDialogFooter>\n <button slButton variant=\"ghost\" tone=\"secondary\" (click)=\"open.set(false)\">\n Cancel\n </button>\n <button slButton type=\"submit\" form=\"new-contact\">Add contact</button>\n </footer>\n </sl-dialog>\n @if (added(); as message) {\n <span slText role=\"status\" size=\"sm\" tone=\"muted\">{{ message }}</span>\n }\n </div>\n `,\n})\nexport class DialogForm {\n readonly open = signal(false);\n readonly name = signal('');\n readonly email = signal('');\n readonly submitted = signal(false);\n readonly added = signal<string | null>(null);\n readonly errors = computed(() =>\n this.submitted() ? { name: nameError(this.name()), email: emailError(this.email()) } : null,\n );\n\n toggle(next: boolean): void {\n if (next) {\n this.name.set('');\n this.email.set('');\n this.submitted.set(false);\n }\n this.open.set(next);\n }\n\n submit(event: Event): void {\n event.preventDefault();\n this.submitted.set(true);\n if (nameError(this.name()) !== '' || emailError(this.email()) !== '') return;\n this.added.set(`${this.name().trim()} was added to Contoso Foods.`);\n this.open.set(false);\n }\n}\n",
|
|
955
|
+
"verdict": "example"
|
|
956
|
+
},
|
|
924
957
|
{
|
|
925
958
|
"id": "defaults",
|
|
926
959
|
"title": "Deciding once for the application",
|
|
@@ -1065,14 +1098,6 @@
|
|
|
1065
1098
|
"source": "import { Component, signal } from '@angular/core';\nimport { SlButton } from '@slotted/angular/button';\nimport {\n SlDialog,\n SlDialogBody,\n SlDialogDescription,\n SlDialogFooter,\n SlDialogHeader,\n SlDialogTitle,\n SlDialogTrigger,\n} from '@slotted/angular/dialog';\nimport { SlText } from '@slotted/angular/typography';\n\n@Component({\n selector: 'app-dialog-dismiss',\n imports: [\n SlButton,\n SlDialog,\n SlDialogBody,\n SlDialogDescription,\n SlDialogFooter,\n SlDialogHeader,\n SlDialogTitle,\n SlDialogTrigger,\n SlText,\n ],\n template: `\n <button slButton [slDialogTrigger]=\"dialog\">Import products</button>\n <sl-dialog #dialog=\"slDialog\" escape=\"none\" outsidePress=\"none\" [(open)]=\"open\">\n <header slDialogHeader>\n <h2 slDialogTitle>Import 1,240 products</h2>\n <p slDialogDescription>From spring-catalogue.csv into the Northwind price list.</p>\n </header>\n <div slDialogBody>\n <span slText size=\"sm\">\n 38 rows update existing products and 1,202 add new ones. Escape and a press outside the\n panel leave this dialog open; choose one of the actions.\n </span>\n </div>\n <footer slDialogFooter>\n <button slButton variant=\"ghost\" tone=\"secondary\" (click)=\"open.set(false)\">\n Cancel import\n </button>\n <button slButton (click)=\"open.set(false)\">Start import</button>\n </footer>\n </sl-dialog>\n `,\n})\nexport class DialogDismiss {\n readonly open = signal(false);\n}\n",
|
|
1066
1099
|
"verdict": "example"
|
|
1067
1100
|
},
|
|
1068
|
-
{
|
|
1069
|
-
"id": "form",
|
|
1070
|
-
"title": "form.ts",
|
|
1071
|
-
"note": null,
|
|
1072
|
-
"language": "ts",
|
|
1073
|
-
"source": "import { Component, computed, signal } from '@angular/core';\nimport { SlButton } from '@slotted/angular/button';\nimport {\n SlDialog,\n SlDialogBody,\n SlDialogClose,\n SlDialogDescription,\n SlDialogFooter,\n SlDialogHeader,\n SlDialogTitle,\n SlDialogTrigger,\n} from '@slotted/angular/dialog';\nimport { SlField, SlFieldError, SlFieldLabel } from '@slotted/angular/field';\nimport { SlInline } from '@slotted/angular/inline';\nimport { SlStack } from '@slotted/angular/stack';\nimport { SlTextField, SlTextFieldInput } from '@slotted/angular/text-field';\nimport { SlText } from '@slotted/angular/typography';\n\nfunction nameError(value: string): string {\n return value.trim() === '' ? 'Enter the contact’s full name.' : '';\n}\n\nfunction emailError(value: string): string {\n if (value.trim() === '') return 'Enter the address the contact reads.';\n if (!/^\\S+@\\S+\\.\\S+$/.test(value)) return 'Enter an address like ana@contoso.com.';\n return '';\n}\n\n@Component({\n selector: 'app-dialog-form',\n imports: [\n SlButton,\n SlDialog,\n SlDialogBody,\n SlDialogClose,\n SlDialogDescription,\n SlDialogFooter,\n SlDialogHeader,\n SlDialogTitle,\n SlDialogTrigger,\n SlField,\n SlFieldError,\n SlFieldLabel,\n SlInline,\n SlStack,\n SlText,\n SlTextField,\n SlTextFieldInput,\n ],\n template: `\n <div slInline align=\"center\" [gap]=\"3\">\n <button slButton [slDialogTrigger]=\"dialog\">Add contact</button>\n <sl-dialog #dialog=\"slDialog\" [open]=\"open()\" (openChange)=\"toggle($event)\">\n <header slDialogHeader>\n <h2 slDialogTitle>New contact</h2>\n <p slDialogDescription>Contoso Foods, Seattle.</p>\n <button slDialogClose></button>\n </header>\n <div slDialogBody>\n <form id=\"new-contact\" novalidate (submit)=\"submit($event)\">\n <div slStack [gap]=\"4\">\n <div slField required [invalid]=\"errors()?.name ? true : undefined\">\n <label slFieldLabel>Full name</label>\n <div slTextField>\n <input\n slTextFieldInput\n autocomplete=\"name\"\n [value]=\"name()\"\n (valueChange)=\"name.set($event.value)\"\n />\n </div>\n <span slFieldError live=\"polite\" reserve>{{ errors()?.name }}</span>\n </div>\n <div slField required [invalid]=\"errors()?.email ? true : undefined\">\n <label slFieldLabel>Email</label>\n <div slTextField>\n <input\n slTextFieldInput\n autocomplete=\"email\"\n type=\"email\"\n [value]=\"email()\"\n (valueChange)=\"email.set($event.value)\"\n />\n </div>\n <span slFieldError live=\"polite\" reserve>{{ errors()?.email }}</span>\n </div>\n </div>\n </form>\n </div>\n <footer slDialogFooter>\n <button slButton variant=\"ghost\" tone=\"secondary\" (click)=\"open.set(false)\">\n Cancel\n </button>\n <button slButton type=\"submit\" form=\"new-contact\">Add contact</button>\n </footer>\n </sl-dialog>\n @if (added(); as message) {\n <span slText role=\"status\" size=\"sm\" tone=\"muted\">{{ message }}</span>\n }\n </div>\n `,\n})\nexport class DialogForm {\n readonly open = signal(false);\n readonly name = signal('');\n readonly email = signal('');\n readonly submitted = signal(false);\n readonly added = signal<string | null>(null);\n readonly errors = computed(() =>\n this.submitted() ? { name: nameError(this.name()), email: emailError(this.email()) } : null,\n );\n\n toggle(next: boolean): void {\n if (next) {\n this.name.set('');\n this.email.set('');\n this.submitted.set(false);\n }\n this.open.set(next);\n }\n\n submit(event: Event): void {\n event.preventDefault();\n this.submitted.set(true);\n if (nameError(this.name()) !== '' || emailError(this.email()) !== '') return;\n this.added.set(`${this.name().trim()} was added to Contoso Foods.`);\n this.open.set(false);\n }\n}\n",
|
|
1074
|
-
"verdict": "example"
|
|
1075
|
-
},
|
|
1076
1101
|
{
|
|
1077
1102
|
"id": "full-screen",
|
|
1078
1103
|
"title": "full-screen.ts",
|