@slotted/angular 0.1.0-beta.1 → 0.1.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/docs/AGENTS.snippet.md +12 -0
- package/docs/action-bar.json +4 -4
- package/docs/action-bar.md +3 -3
- package/docs/alert.json +7 -1
- package/docs/alert.md +3 -3
- package/docs/app-shell.examples.md +1 -1
- package/docs/app-shell.json +5 -5
- package/docs/app-shell.md +2 -2
- 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.json +51 -11
- package/docs/button.md +10 -6
- package/docs/calendar.json +8 -1
- package/docs/calendar.md +3 -2
- package/docs/cascader.json +1 -0
- package/docs/cascader.md +1 -1
- package/docs/chart.examples.md +1 -1
- package/docs/chart.json +10 -1
- package/docs/chart.md +3 -2
- package/docs/checkbox.json +7 -0
- package/docs/checkbox.md +1 -0
- package/docs/code-block.json +92 -92
- package/docs/code-block.md +69 -69
- package/docs/combobox.json +1 -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/data-grid.examples.md +2 -2
- package/docs/data-grid.json +45 -7
- package/docs/data-grid.md +3 -1
- package/docs/data-grid.props.md +7 -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 +20 -5
- package/docs/date-picker.md +5 -4
- package/docs/datetime-field.json +1 -0
- package/docs/datetime-field.md +1 -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.json +11 -4
- package/docs/drawer.md +4 -3
- package/docs/entity-picker.json +19 -4
- package/docs/entity-picker.md +8 -6
- package/docs/event-calendar.json +7 -0
- package/docs/event-calendar.md +3 -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 +27 -0
- package/docs/guidelines/async-feedback.md +129 -0
- package/docs/guidelines/browsing.md +74 -0
- package/docs/guidelines/builders.md +97 -0
- package/docs/guidelines/composition.md +143 -0
- package/docs/guidelines/conversations.md +59 -0
- package/docs/guidelines/errors-and-conflicts.md +71 -0
- package/docs/guidelines/forms.md +202 -0
- package/docs/guidelines/index.md +130 -0
- package/docs/guidelines/layout-alignment.md +105 -0
- package/docs/guidelines/ledgers.md +45 -0
- package/docs/guidelines/list-pages.md +206 -0
- package/docs/guidelines/overviews.md +76 -0
- package/docs/guidelines/own-elements.md +115 -0
- package/docs/guidelines/reading-permissions.md +55 -0
- package/docs/guidelines/record-pages.md +178 -0
- package/docs/guidelines/reports.md +123 -0
- package/docs/guidelines/shell-composition.md +94 -0
- package/docs/guidelines/workspaces.md +46 -0
- package/docs/icon.json +3 -1
- package/docs/icon.md +3 -3
- package/docs/index.md +12 -0
- package/docs/inline-message.json +14 -2
- package/docs/inline-message.md +4 -3
- package/docs/list-item.json +9 -1
- package/docs/list-item.md +3 -3
- package/docs/list.json +19 -1
- package/docs/list.md +3 -1
- package/docs/markdown.json +79 -79
- package/docs/markdown.md +65 -65
- package/docs/menu.json +12 -0
- package/docs/menu.md +2 -0
- 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 +2 -0
- package/docs/page.md +2 -1
- package/docs/popover.json +1 -1
- package/docs/progress-indicator.json +4 -3
- package/docs/progress-indicator.md +4 -4
- package/docs/prompt-composer.json +41 -1
- package/docs/prompt-composer.md +5 -1
- package/docs/rating.json +5 -3
- package/docs/rating.md +6 -6
- package/docs/section.json +28 -16
- package/docs/section.md +12 -10
- package/docs/segmented-control.json +36 -12
- package/docs/segmented-control.md +17 -1
- package/docs/select.json +1 -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 +90 -0
- package/docs/skills/compose-screen/SKILL.md +103 -0
- package/docs/skills/index.md +9 -0
- package/docs/skills/review-screen/SKILL.md +79 -0
- package/docs/skills/theme-app/SKILL.md +98 -0
- package/docs/skills/waiting-states/SKILL.md +143 -0
- 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/stat-card.json +5 -1
- package/docs/stat-card.md +3 -3
- package/docs/table.examples.md +3 -3
- package/docs/table.json +85 -3
- package/docs/table.md +12 -1
- package/docs/tabs.json +17 -7
- package/docs/tabs.md +3 -2
- package/docs/tag.json +14 -4
- package/docs/tag.md +6 -6
- 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 +467 -0
- package/docs/toolbar.json +1 -1
- package/docs/toolbar.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 +18 -11
- package/fesm2022/slotted-angular-alert.mjs.map +1 -1
- package/fesm2022/slotted-angular-app-shell.mjs +111 -61
- 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 +31 -20
- 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 +120 -29
- package/fesm2022/slotted-angular-button.mjs.map +1 -1
- package/fesm2022/slotted-angular-calendar.mjs +235 -58
- 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 +53 -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 +23 -9
- 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 +118 -39
- 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 +142 -63
- package/fesm2022/slotted-angular-dashboard-grid.mjs.map +1 -1
- package/fesm2022/slotted-angular-data-grid.mjs +480 -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 +33 -19
- 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 +72 -30
- 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 +91 -37
- 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 +275 -108
- 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 +6 -3
- 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 +88 -13
- 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 +5 -3
- package/fesm2022/slotted-angular-link.mjs.map +1 -1
- package/fesm2022/slotted-angular-list-item.mjs +21 -18
- 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 +31 -19
- 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 +4 -2
- 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 +195 -87
- 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 +38 -10
- 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 +57 -20
- 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 +53 -18
- 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 +190 -94
- 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 +35 -28
- package/fesm2022/slotted-angular-stat-card.mjs.map +1 -1
- package/fesm2022/slotted-angular-status-indicator.mjs +22 -8
- 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 +243 -73
- 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-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 +43 -31
- 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 +2 -2
- package/types/slotted-angular-alert.d.ts.map +1 -1
- package/types/slotted-angular-app-shell.d.ts +11 -3
- 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 +1 -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 +33 -13
- package/types/slotted-angular-button.d.ts.map +1 -1
- package/types/slotted-angular-calendar.d.ts +30 -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 +10 -0
- 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 +7 -1
- package/types/slotted-angular-checkbox.d.ts.map +1 -1
- package/types/slotted-angular-code-block.d.ts +1 -1
- package/types/slotted-angular-code-block.d.ts.map +1 -1
- package/types/slotted-angular-collapsible.d.ts +1 -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 +5 -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.map +1 -1
- package/types/slotted-angular-data-grid.d.ts +72 -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.map +1 -1
- package/types/slotted-angular-detail-panel.d.ts.map +1 -1
- package/types/slotted-angular-dialog.d.ts +10 -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 +12 -1
- 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 +9 -2
- 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 +2 -2
- 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 +25 -25
- 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.map +1 -1
- package/types/slotted-angular-list-item.d.ts +1 -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.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.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 +15 -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.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 +11 -2
- 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 +11 -3
- 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 +12 -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 +1 -1
- package/types/slotted-angular-stat-card.d.ts.map +1 -1
- package/types/slotted-angular-status-indicator.d.ts +1 -1
- package/types/slotted-angular-status-indicator.d.ts.map +1 -1
- package/types/slotted-angular-stepper.d.ts +1 -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 +1 -1
- 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 +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 +3 -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 +2 -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/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",
|
package/docs/dialog.md
CHANGED
|
@@ -160,6 +160,7 @@ See [dialog.props.md](./dialog.props.md).
|
|
|
160
160
|
| Name | Payload | When |
|
|
161
161
|
| --- | --- | --- |
|
|
162
162
|
| `(openChangeRequest)` | `DialogChangeRequest` | 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. |
|
|
163
|
+
| `(openChangeComplete)` | `boolean` | 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. |
|
|
163
164
|
| `(openChange)` | `boolean` | After the open state changed, so a template can bind [(open)]. It carries the new state only; the reason is on (openChangeRequest). |
|
|
164
165
|
| `(fullscreenChangeRequest)` | `DialogFullscreenRequest` | Before the panel expands to the whole layer or is restored. The request carries the new value, the previous value, the reason (pointer, keyboard or programmatic), the originating event, and cancel(), which keeps the panel as it is. |
|
|
165
166
|
| `(fullscreenChange)` | `boolean` | After the expanded state changed, so a template can bind [(fullscreen)]. |
|
|
@@ -170,6 +171,7 @@ See [dialog.props.md](./dialog.props.md).
|
|
|
170
171
|
| Name | Payload | When |
|
|
171
172
|
| --- | --- | --- |
|
|
172
173
|
| `(openChangeRequest)` | `DialogChangeRequest` | 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. |
|
|
174
|
+
| `(openChangeComplete)` | `boolean` | 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. |
|
|
173
175
|
| `(openChange)` | `boolean` | After the open state changed, so a template can bind [(open)]. It carries the new state only; the reason is on (openChangeRequest). |
|
|
174
176
|
| `(fullscreenChangeRequest)` | `DialogFullscreenRequest` | Before the panel expands to the whole layer or is restored. The request carries the new value, the previous value, the reason (pointer, keyboard or programmatic), the originating event, and cancel(), which keeps the panel as it is. |
|
|
175
177
|
| `(fullscreenChange)` | `boolean` | After the expanded state changed, so a template can bind [(fullscreen)]. |
|
|
@@ -189,7 +191,7 @@ See [dialog.props.md](./dialog.props.md).
|
|
|
189
191
|
| `escape` | `close`, `none` | `close` |
|
|
190
192
|
| `outsidePress` | `close`, `none` | `close`, `none` |
|
|
191
193
|
| `back` | `close`, `none` | `close` |
|
|
192
|
-
| `tone` | `accent`, `secondary`, `success`, `warning`, `danger` | `danger` |
|
|
194
|
+
| `tone` | `accent`, `secondary`, `info`, `success`, `warning`, `danger` | `danger` |
|
|
193
195
|
| `initialFocus` | `first`, `container`, `cancel` | `first`, `cancel` |
|
|
194
196
|
|
|
195
197
|
## Rules
|
|
@@ -210,7 +212,7 @@ See [dialog.props.md](./dialog.props.md).
|
|
|
210
212
|
|
|
211
213
|
## Tokens
|
|
212
214
|
|
|
213
|
-
`--slotted-border-subtle`, `--slotted-border-width-thick`, `--slotted-border-width-thin`, `--slotted-control-font-family`, `--slotted-control-icon-size-lg`, `--slotted-control-inner-size-lg`, `--slotted-control-radius`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-dialog-body-color`, `--slotted-dialog-border-color`, `--slotted-dialog-close-active-background`, `--slotted-dialog-close-color`, `--slotted-dialog-close-hover-background`, `--slotted-dialog-color`, `--slotted-dialog-description-color`, `--slotted-dialog-footer-surface`, `--slotted-dialog-measure`, `--slotted-dialog-radius`, `--slotted-dialog-rule-color`, `--slotted-dialog-scrim`, `--slotted-dialog-surface`, `--slotted-dialog-title-color`, `--slotted-dialog-title-font-family`, `--slotted-duration-long`, `--slotted-duration-medium`, `--slotted-duration-short`, `--slotted-easing-exit`, `--slotted-easing-standard`, `--slotted-focus-ring-color`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-font-family-heading`, `--slotted-font-family-sans`, `--slotted-font-size-lg`, `--slotted-font-size-md`, `--slotted-font-size-xl`, `--slotted-font-weight-semibold`, `--slotted-line-height-md`, `--slotted-radius-lg`, `--slotted-radius-sm`, `--slotted-scrim`, `--slotted-shadow-lg`, `--slotted-space-12`, `--slotted-space-2`, `--slotted-space-4`, `--slotted-space-5`, `--slotted-space-6`, `--slotted-space-7`, `--slotted-space-8`, `--slotted-surface-raised`, `--slotted-surface-sunken`, `--slotted-target-comfortable`, `--slotted-target-min`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-accent-text`, `--slotted-tone-danger-text`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`, `--slotted-tone-secondary-text`, `--slotted-tone-success-text`, `--slotted-tone-warning-text`, `--slotted-z-index-overlay`
|
|
215
|
+
`--slotted-border-subtle`, `--slotted-border-width-thick`, `--slotted-border-width-thin`, `--slotted-control-font-family`, `--slotted-control-icon-size-lg`, `--slotted-control-inner-size-lg`, `--slotted-control-radius`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-dialog-backdrop-filter`, `--slotted-dialog-body-color`, `--slotted-dialog-border-color`, `--slotted-dialog-close-active-background`, `--slotted-dialog-close-color`, `--slotted-dialog-close-hover-background`, `--slotted-dialog-color`, `--slotted-dialog-description-color`, `--slotted-dialog-footer-surface`, `--slotted-dialog-measure`, `--slotted-dialog-padding-block`, `--slotted-dialog-padding-block-sm`, `--slotted-dialog-padding-inline`, `--slotted-dialog-padding-inline-sm`, `--slotted-dialog-radius`, `--slotted-dialog-rule-color`, `--slotted-dialog-scrim`, `--slotted-dialog-surface`, `--slotted-dialog-title-color`, `--slotted-dialog-title-font-family`, `--slotted-duration-long`, `--slotted-duration-medium`, `--slotted-duration-short`, `--slotted-easing-exit`, `--slotted-easing-standard`, `--slotted-focus-ring-color`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-font-family-heading`, `--slotted-font-family-sans`, `--slotted-font-size-lg`, `--slotted-font-size-md`, `--slotted-font-size-xl`, `--slotted-font-weight-semibold`, `--slotted-line-height-md`, `--slotted-radius-lg`, `--slotted-radius-sm`, `--slotted-scrim`, `--slotted-shadow-lg`, `--slotted-space-12`, `--slotted-space-2`, `--slotted-space-4`, `--slotted-space-5`, `--slotted-space-6`, `--slotted-space-7`, `--slotted-space-8`, `--slotted-surface-raised`, `--slotted-surface-sunken`, `--slotted-target-comfortable`, `--slotted-target-min`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-accent-text`, `--slotted-tone-danger-text`, `--slotted-tone-info-text`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`, `--slotted-tone-secondary-text`, `--slotted-tone-success-text`, `--slotted-tone-warning-text`, `--slotted-z-index-overlay`
|
|
214
216
|
|
|
215
217
|
## Examples
|
|
216
218
|
|
package/docs/dialog.props.md
CHANGED
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
| `initialFocus` | `'first' \| 'container' \| 'cancel' \| HTMLElement \| false` | cancel | sl-alert-dialog | Where focus goes when the dialog opens. The default, cancel, is the least destructive answer. |
|
|
50
50
|
| `finalFocus` | `HTMLElement \| false` | — | sl-dialog, sl-alert-dialog | Where focus goes when the dialog closes. Unset, focus returns to the element that had it when the dialog opened, usually the trigger. false leaves focus where it is. |
|
|
51
51
|
| `value` | `string` | — | slDialogClose, slAlertDialogCancel, slAlertDialogAction | The result this button closes the dialog with, read from request.result in (openChangeRequest) and from (closed). slAlertDialogCancel defaults to "cancel" and slAlertDialogAction to "confirm". |
|
|
52
|
-
| `tone` | `'accent' \| 'secondary' \| 'success' \| 'warning' \| 'danger'` | danger | sl-alert-dialog | The kind of decision. It sets the mark slAlertDialogIcon draws and its colour. |
|
|
52
|
+
| `tone` | `'accent' \| 'secondary' \| 'info' \| 'success' \| 'warning' \| 'danger'` | danger | sl-alert-dialog | The kind of decision. It sets the mark slAlertDialogIcon draws and its colour. |
|
|
53
53
|
| `modal` | `boolean` | true | sl-alert-dialog | Fixed: an alert dialog is always modal. |
|
|
54
54
|
| `outsidePress` | `'close' \| 'none'` | none | sl-alert-dialog | Fixed: a press outside never closes an alert dialog. |
|
|
55
55
|
| `back` | `'close' \| 'none'` | close | sl-alert-dialog | Whether the browser’s way back cancels the confirmation, as Escape does. The close request carries the reason back. |
|
package/docs/drawer.json
CHANGED
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"defaults": {
|
|
59
59
|
"mode": "overlay",
|
|
60
60
|
"side": "end",
|
|
61
|
-
"size": "md",
|
|
61
|
+
"size": "content on top and bottom, md on start and end",
|
|
62
62
|
"mount": "active",
|
|
63
63
|
"modal": true,
|
|
64
64
|
"escape": "close",
|
|
@@ -89,7 +89,8 @@
|
|
|
89
89
|
"focus-visible",
|
|
90
90
|
"open",
|
|
91
91
|
"loading",
|
|
92
|
-
"dragging"
|
|
92
|
+
"dragging",
|
|
93
|
+
"expanded"
|
|
93
94
|
],
|
|
94
95
|
"parts": [
|
|
95
96
|
"root",
|
|
@@ -247,9 +248,9 @@
|
|
|
247
248
|
{
|
|
248
249
|
"name": "size",
|
|
249
250
|
"type": "'sm' | 'md' | 'lg' | 'xl' | 'full' | 'content'",
|
|
250
|
-
"defaultValue": "md",
|
|
251
|
+
"defaultValue": "content on top and bottom, md on start and end",
|
|
251
252
|
"appliesTo": "<sl-drawer>, provideDrawerDefaults",
|
|
252
|
-
"description": "The panel’s measure at rest: one of the steps sm (18rem), md (24rem), lg (30rem), xl (40rem) and full, or content, which fits what the panel holds, up to 4rem short of the screen.
|
|
253
|
+
"description": "The panel’s measure at rest: one of the steps sm (18rem), md (24rem), lg (30rem), xl (40rem) and full, or content, which fits what the panel holds, up to 4rem short of the screen. A step wider than the screen is held to it."
|
|
253
254
|
},
|
|
254
255
|
{
|
|
255
256
|
"name": "mount",
|
|
@@ -405,6 +406,11 @@
|
|
|
405
406
|
"payload": "DrawerChangeRequest",
|
|
406
407
|
"when": "Before the drawer opens or closes, for every way it can: the trigger, the ✕, Escape, a press outside, the back gesture and a call from code. The request carries value, previous, reason (pointer, keyboard, dismiss, escape, outsidePress, back or programmatic), result, the source event and cancel(), which keeps the drawer as it is."
|
|
407
408
|
},
|
|
409
|
+
{
|
|
410
|
+
"name": "openChangeComplete",
|
|
411
|
+
"payload": "boolean",
|
|
412
|
+
"when": "After the entrance or the exit has ended: true once the drawer is settled open, false once it has left — the moment an application that renders the drawer conditionally removes it, so the exit runs. A drawer mounted open enters from its closed style, as one opened later does."
|
|
413
|
+
},
|
|
408
414
|
{
|
|
409
415
|
"name": "extentChange",
|
|
410
416
|
"payload": "number | undefined",
|
|
@@ -458,6 +464,7 @@
|
|
|
458
464
|
"--slotted-drawer-extent-xl",
|
|
459
465
|
"--slotted-drawer-footer-surface",
|
|
460
466
|
"--slotted-drawer-radius",
|
|
467
|
+
"--slotted-drawer-radius-expanded",
|
|
461
468
|
"--slotted-drawer-resizer-line-active-color",
|
|
462
469
|
"--slotted-drawer-resizer-line-color",
|
|
463
470
|
"--slotted-drawer-rule-color",
|
package/docs/drawer.md
CHANGED
|
@@ -133,7 +133,7 @@ export class DrawerBasic {
|
|
|
133
133
|
| `snapPoints` | `readonly number[]` | — | <sl-drawer> | The stops the measure moves between, as fractions. With them an arrow key moves to the next stop, Home and End go to the first and the last, and a drag is released onto the nearest. |
|
|
134
134
|
| `mode` | `'overlay' \| 'inline'` | overlay | <sl-drawer>, provideDrawerDefaults | overlay puts the drawer over the page, in a portal; inline puts it in your own layout. The value can change while the drawer is open, and the panel’s content and the state of its fields are kept across the change. |
|
|
135
135
|
| `side` | `'start' \| 'end' \| 'top' \| 'bottom'` | end | <sl-drawer>, provideDrawerDefaults | The edge the panel comes from. start and end follow the writing direction, so the drawer changes sides in a right-to-left document. |
|
|
136
|
-
| `size` | `'sm' \| 'md' \| 'lg' \| 'xl' \| 'full' \| 'content'` | md | <sl-drawer>, provideDrawerDefaults | The panel’s measure at rest: one of the steps sm (18rem), md (24rem), lg (30rem), xl (40rem) and full, or content, which fits what the panel holds, up to 4rem short of the screen.
|
|
136
|
+
| `size` | `'sm' \| 'md' \| 'lg' \| 'xl' \| 'full' \| 'content'` | content on top and bottom, md on start and end | <sl-drawer>, provideDrawerDefaults | The panel’s measure at rest: one of the steps sm (18rem), md (24rem), lg (30rem), xl (40rem) and full, or content, which fits what the panel holds, up to 4rem short of the screen. A step wider than the screen is held to it. |
|
|
137
137
|
| `mount` | `'active' \| 'lazy' \| 'eager'` | active | <sl-drawer>, provideDrawerDefaults | When an overlay layer is in the document: active only while it is open or closing, lazy from the first open on, and eager from the start, inert while closed. An inline drawer is always in the document. |
|
|
138
138
|
| `modal` | `boolean` | true | <sl-drawer>, provideDrawerDefaults | Whether the page behind is inert, its scroll is locked and focus is contained in the panel, and whether the panel carries aria-modal. The scrim is painted either way. Always false under mode="inline". |
|
|
139
139
|
| `escape` | `'close' \| 'none'` | close | <sl-drawer>, provideDrawerDefaults | Whether Escape asks to close the drawer. Escape reaches only the topmost layer, and a layer that refuses it does not pass it to the one below. |
|
|
@@ -161,6 +161,7 @@ export class DrawerBasic {
|
|
|
161
161
|
| --- | --- | --- |
|
|
162
162
|
| `openChange` | `boolean` | The two-way half of open, which [(open)] binds. It fires once the drawer has opened or closed. |
|
|
163
163
|
| `openChangeRequest` | `DrawerChangeRequest` | Before the drawer opens or closes, for every way it can: the trigger, the ✕, Escape, a press outside, the back gesture and a call from code. The request carries value, previous, reason (pointer, keyboard, dismiss, escape, outsidePress, back or programmatic), result, the source event and cancel(), which keeps the drawer as it is. |
|
|
164
|
+
| `openChangeComplete` | `boolean` | After the entrance or the exit has ended: true once the drawer is settled open, false once it has left — the moment an application that renders the drawer conditionally removes it, so the exit runs. A drawer mounted open enters from its closed style, as one opened later does. |
|
|
164
165
|
| `extentChange` | `number \| undefined` | The two-way half of extent, which [(extent)] binds. It fires once the measure has changed. |
|
|
165
166
|
| `extentChangeRequest` | `DrawerExtentRequest` | Before the panel’s measure changes, with the reason pointer for a drag or a tap on the grip, keyboard for an arrow key, Home, End or Enter, and programmatic for a change from code. A drag of the separator fires on every pointer move and can report a value below minExtent; a drag of a sheet’s body fires once, on release, with the stop it landed on. undefined means the panel is back on its size step, or on the height of its content under size="content". |
|
|
166
167
|
| `closed` | `string \| undefined` | Once the drawer has closed, with the result of the close, or undefined for a close that carried none. |
|
|
@@ -171,7 +172,7 @@ export class DrawerBasic {
|
|
|
171
172
|
| --- | --- | --- |
|
|
172
173
|
| `mode` | `overlay`, `inline` | `overlay` |
|
|
173
174
|
| `side` | `start`, `end`, `top`, `bottom` | `end` |
|
|
174
|
-
| `size` | `sm`, `md`, `lg`, `xl`, `full`, `content` |
|
|
175
|
+
| `size` | `sm`, `md`, `lg`, `xl`, `full`, `content` | content on top and bottom, md on start and end |
|
|
175
176
|
| `mount` | `active`, `lazy`, `eager` | `active` |
|
|
176
177
|
| `modal` | `true`, `false` | `true` |
|
|
177
178
|
| `escape` | `close`, `none` | `close` |
|
|
@@ -192,7 +193,7 @@ export class DrawerBasic {
|
|
|
192
193
|
|
|
193
194
|
## Tokens
|
|
194
195
|
|
|
195
|
-
`--slotted-border-strong`, `--slotted-border-subtle`, `--slotted-border-width-thick`, `--slotted-border-width-thin`, `--slotted-control-font-family`, `--slotted-control-icon-size-md`, `--slotted-control-inner-size-md`, `--slotted-control-radius`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-drawer-body-color`, `--slotted-drawer-border-color`, `--slotted-drawer-close-active-background`, `--slotted-drawer-close-color`, `--slotted-drawer-close-hover-background`, `--slotted-drawer-color`, `--slotted-drawer-description-color`, `--slotted-drawer-extent`, `--slotted-drawer-extent-lg`, `--slotted-drawer-extent-md`, `--slotted-drawer-extent-sm`, `--slotted-drawer-extent-xl`, `--slotted-drawer-footer-surface`, `--slotted-drawer-radius`, `--slotted-drawer-resizer-line-active-color`, `--slotted-drawer-resizer-line-color`, `--slotted-drawer-rule-color`, `--slotted-drawer-scrim`, `--slotted-drawer-sheet-inline-size`, `--slotted-drawer-surface`, `--slotted-drawer-title-color`, `--slotted-drawer-title-font-family`, `--slotted-duration-instant`, `--slotted-duration-long`, `--slotted-duration-medium`, `--slotted-duration-short`, `--slotted-easing-enter`, `--slotted-easing-exit`, `--slotted-easing-standard`, `--slotted-focus-ring-color`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-font-family-heading`, `--slotted-font-family-sans`, `--slotted-font-size-lg`, `--slotted-font-size-md`, `--slotted-font-size-xl`, `--slotted-font-weight-semibold`, `--slotted-line-height-lg`, `--slotted-line-height-md`, `--slotted-radius-full`, `--slotted-radius-lg`, `--slotted-radius-sm`, `--slotted-scrim`, `--slotted-shadow-lg`, `--slotted-space-11`, `--slotted-space-12`, `--slotted-space-2`, `--slotted-space-4`, `--slotted-space-5`, `--slotted-space-6`, `--slotted-space-7`, `--slotted-space-8`, `--slotted-space-9`, `--slotted-surface-raised`, `--slotted-surface-sunken`, `--slotted-target-comfortable`, `--slotted-target-min`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`, `--slotted-z-index-overlay`
|
|
196
|
+
`--slotted-border-strong`, `--slotted-border-subtle`, `--slotted-border-width-thick`, `--slotted-border-width-thin`, `--slotted-control-font-family`, `--slotted-control-icon-size-md`, `--slotted-control-inner-size-md`, `--slotted-control-radius`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-drawer-body-color`, `--slotted-drawer-border-color`, `--slotted-drawer-close-active-background`, `--slotted-drawer-close-color`, `--slotted-drawer-close-hover-background`, `--slotted-drawer-color`, `--slotted-drawer-description-color`, `--slotted-drawer-extent`, `--slotted-drawer-extent-lg`, `--slotted-drawer-extent-md`, `--slotted-drawer-extent-sm`, `--slotted-drawer-extent-xl`, `--slotted-drawer-footer-surface`, `--slotted-drawer-radius`, `--slotted-drawer-radius-expanded`, `--slotted-drawer-resizer-line-active-color`, `--slotted-drawer-resizer-line-color`, `--slotted-drawer-rule-color`, `--slotted-drawer-scrim`, `--slotted-drawer-sheet-inline-size`, `--slotted-drawer-surface`, `--slotted-drawer-title-color`, `--slotted-drawer-title-font-family`, `--slotted-duration-instant`, `--slotted-duration-long`, `--slotted-duration-medium`, `--slotted-duration-short`, `--slotted-easing-enter`, `--slotted-easing-exit`, `--slotted-easing-standard`, `--slotted-focus-ring-color`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-font-family-heading`, `--slotted-font-family-sans`, `--slotted-font-size-lg`, `--slotted-font-size-md`, `--slotted-font-size-xl`, `--slotted-font-weight-semibold`, `--slotted-line-height-lg`, `--slotted-line-height-md`, `--slotted-radius-full`, `--slotted-radius-lg`, `--slotted-radius-sm`, `--slotted-scrim`, `--slotted-shadow-lg`, `--slotted-space-11`, `--slotted-space-12`, `--slotted-space-2`, `--slotted-space-4`, `--slotted-space-5`, `--slotted-space-6`, `--slotted-space-7`, `--slotted-space-8`, `--slotted-space-9`, `--slotted-surface-raised`, `--slotted-surface-sunken`, `--slotted-target-comfortable`, `--slotted-target-min`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`, `--slotted-z-index-overlay`
|
|
196
197
|
|
|
197
198
|
## Examples
|
|
198
199
|
|