lightning-base-components 1.26.4-alpha → 1.27.2-alpha
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 +91 -91
- package/{scopedImports/@salesforce-gate-accordionCloseSingleSection.bc.ltng.js → external/flagStub.js} +1 -1
- package/{scopedImports/@salesforce-gate-bc.256.enableInputSearchCommitEvent.js → external/gateStub.js} +1 -1
- package/package.json +89 -77
- package/scopedImports/@salesforce-internal-core.appVersion.js +1 -1
- package/scopedImports/@salesforce-label-LightningMultiColumnSortingModal.modalTitle.js +1 -1
- package/scopedImports/{@salesforce-gate-assertContext.bc.ltng.js → @salesforce-label-LightningPrimitiveColumnSorter.deleteButtonAltText.js} +1 -1
- package/src/lightning/accordion/__docs__/accordion.md +2 -2
- package/src/lightning/accordion/accordion-section.slds.css +100 -107
- package/src/lightning/accordion/accordion.lbc.native.css +0 -1
- package/src/lightning/accordion/accordion.lbc.synthetic.css +0 -1
- package/src/lightning/accordion/accordion.slds.css +12 -12
- package/src/lightning/accordionSection/__docs__/accordionSection.md +1 -0
- package/src/lightning/accordionSection/accordion-section.slds.css +100 -107
- package/src/lightning/accordionSection/accordionSection.lbc.native.css +0 -2
- package/src/lightning/accordionSection/accordionSection.lbc.synthetic.css +1 -2
- package/src/lightning/accordionSection/button.slds.css +32 -17
- package/src/lightning/alert/__docs__/alert.md +13 -13
- package/src/lightning/alert/alert.css +1 -1
- package/src/lightning/ariaObserver/__docs__/ariaObserver.md +16 -10
- package/src/lightning/avatar/__docs__/avatar.md +2 -2
- package/src/lightning/avatar/avatar.css +1 -1
- package/src/lightning/avatar/avatar.slds.css +96 -97
- package/src/lightning/badge/__docs__/badge.md +3 -3
- package/src/lightning/badge/badge.css +1 -1
- package/src/lightning/badge/badge.slds.css +71 -56
- package/src/lightning/barcodeScanner/__docs__/barcodeScanner.md +9 -9
- package/src/lightning/baseCombobox/base-combobox.slds.css +171 -170
- package/src/lightning/baseCombobox/baseCombobox.lbc.synthetic.css +0 -1
- package/src/lightning/baseCombobox/dropdown.slds.css +405 -388
- package/src/lightning/baseCombobox/input-text.slds.css +172 -190
- package/src/lightning/baseCombobox/listbox.slds.css +181 -175
- package/src/lightning/baseCombobox/spinner.slds.css +327 -326
- package/src/lightning/baseComboboxItem/listbox.slds.css +181 -175
- package/src/lightning/breadcrumb/__docs__/breadcrumb.md +2 -2
- package/src/lightning/breadcrumb/breadcrumb.slds.css +13 -14
- package/src/lightning/breadcrumbs/__docs__/breadcrumbs.md +1 -1
- package/src/lightning/breadcrumbs/breadcrumbs.css +1 -1
- package/src/lightning/breadcrumbs/breadcrumbs.lbc.native.css +1 -1
- package/src/lightning/breadcrumbs/breadcrumbs.slds.css +27 -28
- package/src/lightning/button/__docs__/button.md +16 -16
- package/src/lightning/button/__examples__/accesskey/accesskey.css +5 -3
- package/src/lightning/button/__examples__/inverse/inverse.css +2 -2
- package/src/lightning/button/button.slds.css +32 -17
- package/src/lightning/buttonGroup/__docs__/buttonGroup.md +5 -5
- package/src/lightning/buttonGroup/button-group.slds.css +1 -2
- package/src/lightning/buttonGroup/buttonGroup.lbc.native.css +1 -1
- package/src/lightning/buttonIcon/__docs__/buttonIcon.md +20 -20
- package/src/lightning/buttonIcon/button-icon.slds.css +50 -31
- package/src/lightning/buttonIconStateful/__docs__/buttonIconStateful.md +12 -12
- package/src/lightning/buttonIconStateful/button-icon-stateful.slds.css +33 -40
- package/src/lightning/buttonIconStateful/button-icon.slds.css +50 -31
- package/src/lightning/buttonIconStateful/button.slds.css +32 -17
- package/src/lightning/buttonIconStateful/buttonIconStateful.lbc.synthetic.css +5 -1
- package/src/lightning/buttonMenu/__docs__/buttonMenu.md +22 -22
- package/src/lightning/buttonMenu/button-icon.slds.css +50 -31
- package/src/lightning/buttonMenu/button-menu.slds.css +113 -115
- package/src/lightning/buttonMenu/button.slds.css +32 -17
- package/src/lightning/buttonMenu/buttonMenu.css +4 -1
- package/src/lightning/buttonMenu/buttonMenu.lbc.synthetic.css +1 -3
- package/src/lightning/buttonMenu/dropdown.slds.css +405 -388
- package/src/lightning/buttonStateful/__docs__/buttonStateful.md +9 -9
- package/src/lightning/buttonStateful/button-stateful.slds.css +98 -102
- package/src/lightning/buttonStateful/button.slds.css +32 -17
- package/src/lightning/calendar/calendar.slds.css +188 -191
- package/src/lightning/calendar/dropdown.slds.css +405 -388
- package/src/lightning/card/__docs__/card.md +1 -1
- package/src/lightning/card/__examples__/custom/custom.css +2 -2
- package/src/lightning/card/card.slds.css +137 -175
- package/src/lightning/carousel/button-menu.slds.css +113 -115
- package/src/lightning/carousel/button.slds.css +32 -17
- package/src/lightning/carousel/carousel.js +11 -18
- package/src/lightning/carousel/carousel.slds.css +15 -6
- package/src/lightning/carouselImage/carouselImage.lbc.native.css +0 -1
- package/src/lightning/checkboxGroup/__docs__/checkboxGroup.md +7 -7
- package/src/lightning/checkboxGroup/checkbox-group.slds.css +94 -60
- package/src/lightning/checkboxGroup/form-element.slds.css +4 -4
- package/src/lightning/colorPickerCustom/color-picker-custom.slds.css +212 -211
- package/src/lightning/colorPickerCustom/input-text.slds.css +172 -190
- package/src/lightning/colorPickerPanel/color-picker-panel.slds.css +22 -23
- package/src/lightning/colorPickerPanel/colorPickerPanel.lbc.synthetic.css +4 -2
- package/src/lightning/colorPickerPanel/popover.slds.css +127 -128
- package/src/lightning/combobox/__docs__/combobox.md +4 -5
- package/src/lightning/combobox/combobox.css +1 -2
- package/src/lightning/combobox/combobox.lbc.synthetic.css +17 -4
- package/src/lightning/combobox/combobox.slds.css +9 -10
- package/src/lightning/combobox/form-element.slds.css +4 -4
- package/src/lightning/confirm/__docs__/confirm.md +14 -14
- package/src/lightning/context/README.md +13 -13
- package/src/lightning/datatable/README.md +2 -3
- package/src/lightning/datatable/__docs__/datatable.md +82 -77
- package/src/lightning/datatable/__docs__/multi-column-sorting.md +4 -4
- package/src/lightning/datatable/__requirements__/column_widths_requirements.md +68 -68
- package/src/lightning/datatable/__requirements__/requirements.md +1 -1
- package/src/lightning/datatable/button-icon.slds.css +50 -31
- package/src/lightning/datatable/columns.js +2 -2
- package/src/lightning/datatable/datagrid.slds.css +341 -267
- package/src/lightning/datatable/datatable.js +6 -1
- package/src/lightning/datatable/icon.slds.css +6 -2
- package/src/lightning/datatable/input-checkbox.slds.css +130 -124
- package/src/lightning/datatable/primitive-cell-factory.slds.css +0 -1
- package/src/lightning/datatable/rows.js +1 -3
- package/src/lightning/datatable/templates/div/div.css +33 -15
- package/src/lightning/datatable/templates/table/table.css +2 -1
- package/src/lightning/datepicker/form-element.slds.css +4 -4
- package/src/lightning/datepicker/input-text.slds.css +172 -190
- package/src/lightning/datetimepicker/form-element.slds.css +4 -4
- package/src/lightning/datetimepicker/input-text.slds.css +172 -190
- package/src/lightning/dialog/README.md +7 -6
- package/src/lightning/dialog/__requirements__/requirements.md +18 -18
- package/src/lightning/dualListbox/__docs__/dualListbox.md +24 -24
- package/src/lightning/dualListbox/dual-listbox.slds.css +192 -192
- package/src/lightning/dualListbox/dualListbox.lbc.native.css +1 -1
- package/src/lightning/dualListbox/form-element.slds.css +4 -4
- package/src/lightning/dualListbox/listbox.slds.css +181 -175
- package/src/lightning/dynamicIcon/__docs__/dynamicIcon.md +6 -6
- package/src/lightning/dynamicIcon/dynamic-icon-ellie.slds.css +0 -2
- package/src/lightning/dynamicIcon/dynamic-icon-eq.slds.css +0 -2
- package/src/lightning/dynamicIcon/dynamic-icon-score.slds.css +3 -5
- package/src/lightning/dynamicIcon/dynamic-icon-strength.slds.css +109 -108
- package/src/lightning/dynamicIcon/dynamic-icon-trend.slds.css +97 -99
- package/src/lightning/dynamicIcon/dynamic-icon-waffle.slds.css +0 -2
- package/src/lightning/features/gates/imports.js +6 -1
- package/src/lightning/focusTrap/__requirements__/requirements.md +26 -26
- package/src/lightning/formattedAddress/__docs__/formattedAddress.md +0 -1
- package/src/lightning/formattedAddress/formattedAddress.css +1 -1
- package/src/lightning/formattedAddress/formattedAddress.lbc.native.css +1 -1
- package/src/lightning/formattedDateTime/__docs__/formattedDateTime.md +11 -11
- package/src/lightning/formattedEmail/__docs__/formattedEmail.md +2 -2
- package/src/lightning/formattedEmail/formattedEmail.lbc.native.css +1 -2
- package/src/lightning/formattedPhone/__docs__/formattedPhone.md +2 -2
- package/src/lightning/formattedRichText/__docs__/formattedRichText.md +14 -14
- package/src/lightning/formattedRichText/formattedRichText.lbc.native.css +1 -1
- package/src/lightning/formattedRichTextRenderer/formattedRichTextRenderer.lbc.native.css +1 -1
- package/src/lightning/formattedText/formattedText.lbc.native.css +1 -1
- package/src/lightning/formattedTime/__docs__/formattedTime.md +3 -3
- package/src/lightning/formattedUrl/__docs__/formattedUrl.md +11 -11
- package/src/lightning/groupedCombobox/README.md +33 -34
- package/src/lightning/groupedCombobox/form-element.slds.css +4 -4
- package/src/lightning/groupedCombobox/grouped-combobox.slds.css +10 -10
- package/src/lightning/groupedCombobox/groupedCombobox.lbc.native.css +0 -1
- package/src/lightning/groupedCombobox/input-text.slds.css +172 -190
- package/src/lightning/helptext/__docs__/helptext.md +5 -5
- package/src/lightning/helptext/button-icon.slds.css +50 -31
- package/src/lightning/helptext/form-element.slds.css +4 -4
- package/src/lightning/helptext/help-text.slds.css +3 -4
- package/src/lightning/helptext/helptext.css +1 -1
- package/src/lightning/icon/__docs__/icon.md +10 -10
- package/src/lightning/icon/__examples__/variants/variants.css +3 -3
- package/src/lightning/icon/icon.slds.css +6 -2
- package/src/lightning/input/__docs__/input.md +47 -49
- package/src/lightning/input/__examples__/checkboxbutton/checkboxbutton.css +6 -6
- package/src/lightning/input/__requirements__/requirements.md +49 -49
- package/src/lightning/input/form-element.slds.css +4 -4
- package/src/lightning/input/input.lbc.synthetic.css +1 -1
- package/src/lightning/inputAddress/__docs__/inputAddress.md +26 -27
- package/src/lightning/inputAddress/form-element.slds.css +4 -4
- package/src/lightning/inputAddress/input-address.slds.css +6 -6
- package/src/lightning/inputAddress/input-text.slds.css +172 -190
- package/src/lightning/inputLocation/form-element.slds.css +4 -4
- package/src/lightning/inputLocation/input-location.slds.css +6 -6
- package/src/lightning/inputLocation/input-text.slds.css +172 -190
- package/src/lightning/inputName/__docs__/inputName.md +7 -7
- package/src/lightning/inputName/form-element.slds.css +4 -4
- package/src/lightning/inputName/input-text.slds.css +172 -190
- package/src/lightning/inputUtils/validity.js +37 -18
- package/src/lightning/interactiveDialogBase/button.slds.css +32 -17
- package/src/lightning/interactiveDialogBase/interactive-dialog-base.slds.css +9 -18
- package/src/lightning/interactiveDialogBase/interactiveDialogBase.lbc.native.css +1 -1
- package/src/lightning/interactiveDialogBase/modal-base.slds.css +198 -194
- package/src/lightning/interactiveDialogBase/modal-body.slds.css +33 -34
- package/src/lightning/interactiveDialogBase/modal-footer.slds.css +62 -64
- package/src/lightning/interactiveDialogBase/modal-header.slds.css +47 -48
- package/src/lightning/layout/__docs__/layout.md +13 -13
- package/src/lightning/layout/__examples__/pullToBoundary/pullToBoundary.css +1 -1
- package/src/lightning/layout/__examples__/simple/simple.css +2 -2
- package/src/lightning/layout/__examples__/verticalAlignCenter/verticalAlignCenter.css +3 -3
- package/src/lightning/layout/__examples__/verticalAlignStretch/verticalAlignStretch.css +3 -3
- package/src/lightning/layout/layout.css +1 -1
- package/src/lightning/layout/layout.lbc.native.css +1 -1
- package/src/lightning/layout/layout.lbc.synthetic.css +1 -2
- package/src/lightning/layoutItem/layoutItem.css +1 -1
- package/src/lightning/lookupAddress/form-element.slds.css +4 -4
- package/src/lightning/lookupAddress/listbox.slds.css +181 -175
- package/src/lightning/lookupAddress/lookup-address.slds.css +4 -4
- package/src/lightning/lookupAddress/lookupAddress.css +0 -1
- package/src/lightning/lookupAddress/lookupAddress.lbc.native.css +0 -1
- package/src/lightning/mediaUtils/__docs__/mediaUtils.md +20 -17
- package/src/lightning/menuDivider/menu-divider.slds.css +8 -8
- package/src/lightning/menuItem/menu-item.slds.css +94 -82
- package/src/lightning/menuItem/menuItem.lbc.synthetic.css +1 -1
- package/src/lightning/menuSubheader/menu-subheader.slds.css +13 -13
- package/src/lightning/modal/__docs__/migration.md +95 -91
- package/src/lightning/modal/__docs__/modal.md +28 -22
- package/src/lightning/modal/__modalUtils__/modalContainerTestMethods.js +14 -21
- package/src/lightning/modalBase/modal-base.slds.css +198 -194
- package/src/lightning/modalBase/modalBase.lbc.synthetic.css +2 -2
- package/src/lightning/modalBody/__docs__/modalBody.md +0 -1
- package/src/lightning/modalBody/modal-body.slds.css +33 -34
- package/src/lightning/modalFooter/__docs__/modalFooter.md +1 -2
- package/src/lightning/modalFooter/modal-footer.slds.css +62 -64
- package/src/lightning/modalHeader/__docs__/modalHeader.md +1 -0
- package/src/lightning/modalHeader/modal-header.slds.css +47 -48
- package/src/lightning/modalHeader/modalHeader.css +2 -1
- package/src/lightning/multiColumnSortingModal/multiColumnSortingModal.css +2 -3
- package/src/lightning/navigation/__docs__/navigation.md +2 -3
- package/src/lightning/overlay/__docs__/overlay.md +3 -3
- package/src/lightning/overlay/__examples__/basic/basic.css +2 -2
- package/src/lightning/picklist/README.md +9 -9
- package/src/lightning/pill/__docs__/pill.md +3 -3
- package/src/lightning/pill/avatar.slds.css +96 -97
- package/src/lightning/pill/link.css +1 -1
- package/src/lightning/pill/pill.slds.css +154 -153
- package/src/lightning/pill/plain.css +1 -1
- package/src/lightning/pill/plainLink.css +1 -1
- package/src/lightning/pillContainer/__docs__/pillContainer.md +16 -15
- package/src/lightning/pillContainer/barePillContainer.lbc.native.css +1 -1
- package/src/lightning/pillContainer/button.slds.css +32 -17
- package/src/lightning/pillContainer/listbox.slds.css +181 -175
- package/src/lightning/pillContainer/pill-container.slds.css +34 -34
- package/src/lightning/pillContainer/pill.slds.css +154 -153
- package/src/lightning/pillContainer/standardPillContainer.css +1 -1
- package/src/lightning/popup/README.md +3 -3
- package/src/lightning/popup/__requirements__/requirements.md +25 -25
- package/src/lightning/popup/popover.slds.css +127 -128
- package/src/lightning/primitiveBubble/tooltip.slds.css +105 -99
- package/src/lightning/primitiveButton/primitiveButton.js +0 -21
- package/src/lightning/primitiveCellButton/primitiveCellButton.js +6 -1
- package/src/lightning/primitiveCellCheckbox/checkbox.css +0 -1
- package/src/lightning/primitiveCellCheckbox/checkbox.lbc.native.css +1 -1
- package/src/lightning/primitiveCellCheckbox/input-checkbox.slds.css +130 -124
- package/src/lightning/primitiveCellCheckbox/input-radio-group.slds.css +6 -5
- package/src/lightning/primitiveCellCheckbox/primitiveCellCheckbox.js +13 -8
- package/src/lightning/primitiveCellCheckbox/radio.lbc.native.css +1 -1
- package/src/lightning/primitiveCellFactory/button-icon.slds.css +50 -31
- package/src/lightning/primitiveCellFactory/primitive-cell-factory.slds.css +0 -1
- package/src/lightning/primitiveCellFactory/primitiveCellFactory.js +7 -11
- package/src/lightning/primitiveColorpickerButton/color-picker-button.slds.css +69 -70
- package/src/lightning/primitiveColumnSorter/form-element.slds.css +4 -4
- package/src/lightning/primitiveColumnSorter/input-radio-group.slds.css +6 -5
- package/src/lightning/primitiveColumnSorter/primitive-column-sorter.slds.css +0 -1
- package/src/lightning/primitiveColumnSorter/primitiveColumnSorter.css +13 -7
- package/src/lightning/primitiveColumnSorter/primitiveColumnSorter.html +1 -1
- package/src/lightning/primitiveColumnSorter/primitiveColumnSorter.js +2 -0
- package/src/lightning/primitiveCoordinateItem/__examples__/basic/basic.js +1 -2
- package/src/lightning/primitiveCoordinateItem/button.slds.css +32 -17
- package/src/lightning/primitiveCoordinateItem/coordinate-item.slds.css +2 -1
- package/src/lightning/primitiveCoordinateItem/primitiveCoordinateItem.css +1 -1
- package/src/lightning/primitiveCustomCell/primitiveCustomCell.js +8 -7
- package/src/lightning/primitiveDatatableCell/primitiveDatatableCell.js +4 -2
- package/src/lightning/primitiveDatatableIeditPanel/popover.slds.css +127 -128
- package/src/lightning/primitiveDatatableStatusBar/button.slds.css +32 -17
- package/src/lightning/primitiveDatatableStatusBar/form-footer.slds.css +32 -32
- package/src/lightning/primitiveDatatableStatusBar/primitiveDatatableStatusBar.css +1 -1
- package/src/lightning/primitiveDatatableStatusBar/primitiveDatatableStatusBar.js +3 -1
- package/src/lightning/primitiveDatatableTooltip/button-icon.slds.css +50 -31
- package/src/lightning/primitiveDatatableTooltip/button.slds.css +32 -17
- package/src/lightning/primitiveDatatableTooltip/form-footer.slds.css +32 -32
- package/src/lightning/primitiveDatatableTooltip/primitiveDatatableTooltip.css +1 -1
- package/src/lightning/primitiveDatatableTooltip/primitiveDatatableTooltip.js +5 -6
- package/src/lightning/primitiveDatatableTooltip/primitiveDatatableTooltip.lbc.native.css +1 -1
- package/src/lightning/primitiveDatatableTooltipBubble/popover.slds.css +127 -128
- package/src/lightning/primitiveDatatableTooltipBubble/primitive-datatable-tooltip-bubble.slds.css +9 -7
- package/src/lightning/primitiveDatatableTooltipBubble/primitiveDatatableTooltipBubble.css +1 -1
- package/src/lightning/primitiveHeaderActions/primitiveHeaderActions.lbc.native.css +1 -1
- package/src/lightning/primitiveHeaderFactory/form-element.slds.css +4 -4
- package/src/lightning/primitiveHeaderFactory/input-checkbox.slds.css +130 -124
- package/src/lightning/primitiveHeaderFactory/primitive-header-factory.slds.css +9 -4
- package/src/lightning/primitiveHeaderFactory/selectableHeader.css +1 -1
- package/src/lightning/primitiveHeaderFactory/selectableHeader.lbc.native.css +1 -1
- package/src/lightning/primitiveHeaderFactory/sortableHeader.lbc.synthetic.css +9 -3
- package/src/lightning/primitiveHeaderFactory/sortingMenuHeader.lbc.native.css +0 -1
- package/src/lightning/primitiveIcon/icon.slds.css +6 -2
- package/src/lightning/primitiveIcon/primitiveIcon.js +10 -2
- package/src/lightning/primitiveInputCheckbox/form-element.slds.css +4 -4
- package/src/lightning/primitiveInputCheckbox/input-checkbox.slds.css +130 -124
- package/src/lightning/primitiveInputCheckboxButton/form-element.slds.css +4 -4
- package/src/lightning/primitiveInputCheckboxButton/input-checkbox-button.slds.css +90 -79
- package/src/lightning/primitiveInputColor/form-element.slds.css +4 -4
- package/src/lightning/primitiveInputColor/input-color.slds.css +27 -28
- package/src/lightning/primitiveInputColor/input-text.slds.css +172 -190
- package/src/lightning/primitiveInputColor/primitiveInputColor.css +1 -1
- package/src/lightning/primitiveInputFile/button.slds.css +32 -17
- package/src/lightning/primitiveInputFile/form-element.slds.css +4 -4
- package/src/lightning/primitiveInputFile/input-file.slds.css +58 -59
- package/src/lightning/primitiveInputSimple/form-element.slds.css +4 -4
- package/src/lightning/primitiveInputSimple/input-text.slds.css +172 -190
- package/src/lightning/primitiveInputSimple/primitiveInputSimple.lbc.synthetic.css +1 -1
- package/src/lightning/primitiveInputToggle/form-element.slds.css +4 -4
- package/src/lightning/primitiveInputToggle/input-toggle.slds.css +134 -118
- package/src/lightning/primitiveResizeHandler/primitive-resize-handler.slds.css +0 -1
- package/src/lightning/primitiveTreegridCellToggle/button-icon.slds.css +50 -31
- package/src/lightning/progressBar/progress-bar.slds.css +38 -39
- package/src/lightning/progressIndicator/__docs__/progressIndicator.md +2 -2
- package/src/lightning/progressIndicator/progress-indicator.slds.css +65 -65
- package/src/lightning/progressIndicator/progressIndicator.css +1 -1
- package/src/lightning/progressIndicator/progressIndicator.lbc.native.css +1 -1
- package/src/lightning/progressRing/progress-ring.slds.css +112 -112
- package/src/lightning/progressStep/progress-step.slds.css +223 -203
- package/src/lightning/prompt/__docs__/prompt.md +14 -14
- package/src/lightning/prompt/form-element.slds.css +4 -4
- package/src/lightning/prompt/input-text.slds.css +172 -190
- package/src/lightning/prompt/prompt.css +1 -1
- package/src/lightning/radioGroup/__docs__/radioGroup.md +6 -6
- package/src/lightning/radioGroup/form-element.slds.css +4 -4
- package/src/lightning/radioGroup/input-radio-group.slds.css +6 -5
- package/src/lightning/relativeDateTime/__docs__/relativeDateTime.md +10 -10
- package/src/lightning/select/__docs__/select.md +5 -5
- package/src/lightning/select/form-element.slds.css +4 -4
- package/src/lightning/select/select.css +1 -1
- package/src/lightning/select/select.html +6 -3
- package/src/lightning/select/select.lbc.native.css +2 -2
- package/src/lightning/select/select.slds.css +117 -115
- package/src/lightning/sldsCommon/sldsCommon.css +0 -1
- package/src/lightning/sldsFormElementUtils/sldsFormElementUtils.css +63 -29
- package/src/lightning/sldsMediaObject/sldsMediaObject.css +1 -3
- package/src/lightning/sldsUtilsAlignment/sldsUtilsAlignment.css +0 -1
- package/src/lightning/sldsUtilsBorders/sldsUtilsBorders.css +8 -5
- package/src/lightning/sldsUtilsBox/sldsUtilsBox.css +0 -1
- package/src/lightning/sldsUtilsFloats/sldsUtilsFloats.css +1 -2
- package/src/lightning/sldsUtilsGrid/sldsUtilsGrid.css +84 -85
- package/src/lightning/sldsUtilsHyphenation/sldsUtilsHyphenation.css +0 -1
- package/src/lightning/sldsUtilsLineClamp/sldsUtilsLineClamp.css +0 -1
- package/src/lightning/sldsUtilsMargin/sldsUtilsMargin.css +0 -1
- package/src/lightning/sldsUtilsPadding/sldsUtilsPadding.css +0 -1
- package/src/lightning/sldsUtilsPosition/sldsUtilsPosition.css +4 -5
- package/src/lightning/sldsUtilsSizing/sldsUtilsSizing.css +0 -1
- package/src/lightning/sldsUtilsThemes/sldsUtilsThemes.css +47 -23
- package/src/lightning/sldsUtilsTruncation/sldsUtilsTruncation.css +0 -1
- package/src/lightning/sldsUtilsVisibility/sldsUtilsVisibility.css +0 -1
- package/src/lightning/slider/README.md +4 -4
- package/src/lightning/slider/form-element.slds.css +4 -4
- package/src/lightning/slider/slider.slds.css +106 -92
- package/src/lightning/spinner/__examples__/if/if.css +1 -1
- package/src/lightning/spinner/__examples__/sizes/sizes.css +1 -1
- package/src/lightning/spinner/spinner.slds.css +327 -326
- package/src/lightning/stackedTab/stacked-tab.slds.css +8 -7
- package/src/lightning/stackedTab/stackedTab.css +1 -1
- package/src/lightning/stackedTab/stackedTab.lbc.native.css +1 -1
- package/src/lightning/stackedTabset/stacked-tabset.slds.css +8 -8
- package/src/lightning/stackedTabset/stackedTabset.css +1 -1
- package/src/lightning/stackedTabset/stackedTabset.lbc.native.css +1 -1
- package/src/lightning/tab/tab.css +1 -1
- package/src/lightning/tab/tab.slds.css +44 -51
- package/src/lightning/tabBar/tab-bar.slds.css +405 -284
- package/src/lightning/tabset/__docs__/tabset.md +4 -4
- package/src/lightning/tabset/tabset.slds.css +12 -12
- package/src/lightning/textarea/__docs__/textarea.md +7 -7
- package/src/lightning/textarea/form-element.slds.css +4 -4
- package/src/lightning/textarea/textarea.js +22 -0
- package/src/lightning/textarea/textarea.lbc.synthetic.css +0 -1
- package/src/lightning/textarea/textarea.slds.css +124 -99
- package/src/lightning/tile/tile.slds.css +0 -1
- package/src/lightning/timepicker/form-element.slds.css +4 -4
- package/src/lightning/timepicker/timepicker.slds.css +13 -14
- package/src/lightning/toast/__docs__/toast.md +19 -19
- package/src/lightning/toast/button-icon.slds.css +50 -31
- package/src/lightning/toast/icon.slds.css +6 -2
- package/src/lightning/toast/toast.lbc.synthetic.css +12 -6
- package/src/lightning/toast/toast.slds.css +90 -90
- package/src/lightning/toastContainer/__docs__/toastContainer.md +4 -1
- package/src/lightning/toastContainer/toast.slds.css +90 -90
- package/src/lightning/toastContainer/toastContainer.lbc.synthetic.css +6 -6
- package/src/lightning/tree/tree.slds.css +1 -1
- package/src/lightning/treeGrid/__docs__/treeGrid.md +128 -64
- package/src/lightning/treeGrid/treeGrid.js +3 -1
- package/src/lightning/treeItem/calendar.slds.css +188 -191
- package/src/lightning/verticalNavigation/__docs__/verticalNavigation.md +5 -5
- package/src/lightning/verticalNavigation/verticalNavigation.css +1 -1
- package/src/lightning/verticalNavigationItemBadge/badge.slds.css +71 -56
- package/src/lightning/verticalNavigationOverflow/button.slds.css +32 -17
- package/src/lightning/verticalNavigationOverflow/vertical-navigation-section.slds.css +8 -8
- package/src/lightning/verticalNavigationOverflow/verticalNavigationOverflow.css +1 -1
- package/src/lightning/verticalNavigationOverflow/verticalNavigationOverflow.lbc.synthetic.css +1 -1
- package/src/lightning/verticalNavigationSection/vertical-navigation-section.slds.css +8 -8
- package/src/lightning/verticalNavigationSection/verticalNavigationSection.css +1 -1
- package/src/lightning/verticalNavigationSection/verticalNavigationSection.lbc.synthetic.css +1 -1
- package/scopedImports/@salesforce-gate-bc.256.enableReactiveCarousel.js +0 -6
- package/scopedImports/@salesforce-gate-colorIconsMenuItem.bc.ltng.js +0 -6
- package/scopedImports/@salesforce-gate-datatableIconSrc.bc.ltng.js +0 -6
- package/scopedImports/@salesforce-gate-formattedDateTimeDateStyle.bc.ltng.js +0 -6
- package/scopedImports/@salesforce-gate-groupedComboboxVariants.bc.ltng.js +0 -6
- package/scopedImports/@salesforce-gate-inputErrorIcon.ce.ltng.js +0 -6
- package/scopedImports/@salesforce-gate-lookups.lookupMetadataLayoutServiceBased.js +0 -6
- package/scopedImports/@salesforce-gate-modalReduceMotionFix.bc.ltng.js +0 -6
- package/scopedImports/@salesforce-gate-overlaySldsScopeClass.bc.ltng.js +0 -6
- package/scopedImports/@salesforce-gate-primitiveThemeProviderDisabled.bc.ltng.js +0 -6
- package/scopedImports/@salesforce-gate-recordFormFieldCaching.bc.ltng.js +0 -6
- package/scopedImports/@salesforce-gate-regexCustomElementCheck.bc.ltng.js +0 -6
- package/scopedImports/@salesforce-gate-sanitizeURL.bc.ltng.js +0 -6
- package/scopedImports/@salesforce-gate-treeGridCustomTypes.bc.ltng.js +0 -6
- package/scopedImports/@salesforce-gate-treeGridStaticCustomTypes.bc.ltng.js +0 -6
- package/scopedImports/@salesforce-gate-treeItemEndIcon.bc.ltng.js +0 -6
|
@@ -17,51 +17,63 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
:host([data-render-mode="shadow"]) a {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
20
|
+
display: flex;
|
|
21
|
+
justify-content: space-between;
|
|
22
|
+
align-items: center;
|
|
23
|
+
gap: var(--slds-g-spacing-2);
|
|
24
|
+
position: relative;
|
|
25
|
+
padding: var(--slds-g-spacing-2) var(--slds-g-spacing-3);
|
|
26
|
+
background-color: var(--slds-c-dropdown-item-color-background);
|
|
27
|
+
color: var(--slds-c-dropdown-item-color, var(--slds-g-color-on-surface-3));
|
|
28
|
+
line-height: var(--slds-g-font-lineheight-4);
|
|
29
|
+
font-weight: var(--slds-g-font-weight-4);
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
}
|
|
32
32
|
|
|
33
33
|
:host([data-render-mode="shadow"]) a:hover,:host([data-render-mode="shadow"])
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
a:focus {
|
|
35
|
+
outline: 0;
|
|
36
|
+
text-decoration: none;
|
|
37
|
+
}
|
|
38
38
|
|
|
39
39
|
:host([data-render-mode="shadow"]) a:hover {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
background-color: var(
|
|
41
|
+
--slds-c-dropdown-item-color-background-hover,
|
|
42
|
+
var(--slds-g-color-surface-container-2)
|
|
43
|
+
);
|
|
44
|
+
color: var(--slds-c-dropdown-item-color-hover, var(--slds-g-color-on-surface-3));
|
|
45
|
+
}
|
|
43
46
|
|
|
44
47
|
:host([data-render-mode="shadow"]) a:focus {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
box-shadow: var(
|
|
49
|
+
--slds-g-shadow-inset-focus-1,
|
|
50
|
+
0 0 var(--slds-g-sizing-border-3) var(--slds-g-color-brand-base-50)
|
|
51
|
+
);
|
|
52
|
+
background-color: var(
|
|
53
|
+
--slds-c-dropdown-item-color-background-focus,
|
|
54
|
+
var(--slds-g-color-surface-container-2)
|
|
55
|
+
);
|
|
56
|
+
color: var(--slds-c-dropdown-item-color-focus);
|
|
57
|
+
}
|
|
49
58
|
|
|
50
59
|
:host([data-render-mode="shadow"]) a:active {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
text-decoration: none;
|
|
61
|
+
background-color: var(
|
|
62
|
+
--slds-c-dropdown-item-color-background-active,
|
|
63
|
+
var(--slds-g-color-surface-container-2)
|
|
64
|
+
);
|
|
65
|
+
color: var(--slds-c-dropdown-item-color-active, var(--slds-g-color-on-surface-3));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:host([data-render-mode="shadow"]) a[aria-disabled='true'] {
|
|
69
|
+
background-color: var(--slds-c-dropdown-item-color-background-disabled, transparent);
|
|
70
|
+
color: var(--slds-c-dropdown-item-color-disabled, var(--slds-g-color-disabled-2));
|
|
71
|
+
cursor: default;
|
|
72
|
+
|
|
73
|
+
/* Reassignment - lightning-icon */
|
|
74
|
+
--slds-c-icon-color-foreground-default: var(--slds-g-color-disabled-2);
|
|
75
|
+
--slds-c-icon-boundary-spacing-inlineend: 25px;
|
|
76
|
+
}
|
|
65
77
|
|
|
66
78
|
/* previously, the disabled && :hover|:active|:focus states were merged
|
|
67
79
|
the build system doesn't produce the correct CSS.
|
|
@@ -70,22 +82,22 @@
|
|
|
70
82
|
NOTE only :hover, :focus need the 'box-shadow: none' due to prior assignment
|
|
71
83
|
*/
|
|
72
84
|
|
|
73
|
-
:host([data-render-mode="shadow"]) a[aria-disabled=
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
85
|
+
:host([data-render-mode="shadow"]) a[aria-disabled='true']:hover {
|
|
86
|
+
box-shadow: none;
|
|
87
|
+
background-color: var(--slds-c-dropdown-item-color-background-disabled, transparent);
|
|
88
|
+
color: var(--slds-c-dropdown-item-color-disabled, var(--slds-g-color-disabled-2));
|
|
89
|
+
}
|
|
78
90
|
|
|
79
|
-
:host([data-render-mode="shadow"]) a[aria-disabled=
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
91
|
+
:host([data-render-mode="shadow"]) a[aria-disabled='true']:active {
|
|
92
|
+
background-color: var(--slds-c-dropdown-item-color-background-disabled, transparent);
|
|
93
|
+
color: var(--slds-c-dropdown-item-color-disabled, var(--slds-g-color-disabled-2));
|
|
94
|
+
}
|
|
83
95
|
|
|
84
|
-
:host([data-render-mode="shadow"]) a[aria-disabled=
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
96
|
+
:host([data-render-mode="shadow"]) a[aria-disabled='true']:focus {
|
|
97
|
+
box-shadow: none;
|
|
98
|
+
background-color: var(--slds-c-dropdown-item-color-background-disabled, transparent);
|
|
99
|
+
color: var(--slds-c-dropdown-item-color-disabled, var(--slds-g-color-disabled-2));
|
|
100
|
+
}
|
|
89
101
|
|
|
90
102
|
/**
|
|
91
103
|
* Note: these styles were originally on the "a" element above, but flex
|
|
@@ -96,11 +108,11 @@
|
|
|
96
108
|
*/
|
|
97
109
|
|
|
98
110
|
:host([data-render-mode="shadow"]) .slds-truncate {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
111
|
+
display: flex;
|
|
112
|
+
justify-content: space-between;
|
|
113
|
+
align-items: center;
|
|
114
|
+
gap: var(--slds-g-spacing-2);
|
|
115
|
+
}
|
|
104
116
|
|
|
105
117
|
/**
|
|
106
118
|
* State - Error
|
|
@@ -109,8 +121,8 @@
|
|
|
109
121
|
*/
|
|
110
122
|
|
|
111
123
|
:host([data-render-mode="shadow"].slds-has-error) a {
|
|
112
|
-
|
|
113
|
-
|
|
124
|
+
background: var(--slds-g-color-error-container-1);
|
|
125
|
+
}
|
|
114
126
|
|
|
115
127
|
/**
|
|
116
128
|
* State - Success
|
|
@@ -119,12 +131,12 @@
|
|
|
119
131
|
*/
|
|
120
132
|
|
|
121
133
|
:host([data-render-mode="shadow"].slds-has-success) a {
|
|
122
|
-
|
|
123
|
-
|
|
134
|
+
background: var(--slds-g-color-success-container-1);
|
|
135
|
+
}
|
|
124
136
|
|
|
125
137
|
:host([data-render-mode="shadow"].slds-has-error) a,:host([data-render-mode="shadow"].slds-has-success) a {
|
|
126
|
-
|
|
127
|
-
|
|
138
|
+
color: var(--slds-g-color-on-success-1);
|
|
139
|
+
}
|
|
128
140
|
|
|
129
141
|
/**
|
|
130
142
|
* State - Warning
|
|
@@ -133,20 +145,20 @@
|
|
|
133
145
|
*/
|
|
134
146
|
|
|
135
147
|
:host([data-render-mode="shadow"].slds-has-warning) a {
|
|
136
|
-
|
|
137
|
-
|
|
148
|
+
background: var(--slds-g-color-warning-container-1);
|
|
149
|
+
}
|
|
138
150
|
|
|
139
151
|
:host([data-render-mode="shadow"].slds-has-warning) .slds-indicator_unread {
|
|
140
|
-
|
|
141
|
-
|
|
152
|
+
background-color: currentcolor;
|
|
153
|
+
}
|
|
142
154
|
|
|
143
155
|
:host([data-render-mode="shadow"].slds-has-warning) .slds-indicator_unsaved {
|
|
144
|
-
|
|
145
|
-
|
|
156
|
+
color: currentcolor;
|
|
157
|
+
}
|
|
146
158
|
|
|
147
159
|
:host([data-render-mode="shadow"].slds-has-error) a:hover,:host([data-render-mode="shadow"].slds-has-error) a:focus,:host([data-render-mode="shadow"].slds-has-success) a:hover,:host([data-render-mode="shadow"].slds-has-success) a:focus,:host([data-render-mode="shadow"].slds-has-warning) a:hover,:host([data-render-mode="shadow"].slds-has-warning) a:focus {
|
|
148
|
-
|
|
149
|
-
|
|
160
|
+
text-decoration: underline;
|
|
161
|
+
}
|
|
150
162
|
|
|
151
163
|
/**
|
|
152
164
|
* State - Selected
|
|
@@ -156,12 +168,12 @@
|
|
|
156
168
|
*/
|
|
157
169
|
|
|
158
170
|
:host([data-render-mode="shadow"]) [aria-checked='false'] lightning-primitive-icon::part(icon) {
|
|
159
|
-
|
|
160
|
-
|
|
171
|
+
opacity: 0;
|
|
172
|
+
}
|
|
161
173
|
|
|
162
174
|
:host([data-render-mode="shadow"]) [aria-checked='true'] lightning-primitive-icon::part(icon) {
|
|
163
|
-
|
|
164
|
-
|
|
175
|
+
opacity: 1;
|
|
176
|
+
}
|
|
165
177
|
|
|
166
178
|
/**
|
|
167
179
|
* Status Indicator
|
|
@@ -170,11 +182,11 @@
|
|
|
170
182
|
*/
|
|
171
183
|
|
|
172
184
|
:host([data-render-mode="shadow"]) .slds-indicator_unsaved,:host([data-render-mode="shadow"])
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
185
|
+
.slds-indicator--unsaved {
|
|
186
|
+
color: var(--slds-g-color-accent-2);
|
|
187
|
+
align-self: center;
|
|
188
|
+
position: relative;
|
|
189
|
+
|
|
190
|
+
/* Unsaved indicator does not have gap spacing, everything else does */
|
|
191
|
+
margin-inline-end: calc(var(--slds-g-spacing-2) * -1);
|
|
192
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
:host([data-render-mode="shadow"]) .slds-dropdown__header {
|
|
3
|
+
font-size: var(--slds-g-font-size-base);
|
|
4
|
+
font-weight: var(--slds-g-font-weight-7);
|
|
5
|
+
padding-block: var(--slds-g-spacing-2);
|
|
6
|
+
padding-inline: var(--slds-g-spacing-3);
|
|
7
|
+
}
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
10
|
* @TODO: refactor when utility is available
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
:host([data-render-mode="shadow"]) .slds-truncate {
|
|
14
|
+
max-width: 100%;
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
text-overflow: ellipsis;
|
|
17
|
+
white-space: nowrap;
|
|
18
|
+
}
|
|
@@ -3,78 +3,80 @@
|
|
|
3
3
|
This document is about migrating existing modal implementations.
|
|
4
4
|
|
|
5
5
|
## **Creating a new LWC-based modal implementation?**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
|
|
7
|
+
- Starting in release 236, when utilizing LWC or Aura code, your team should use `LightningModal`
|
|
8
|
+
- Dive into the details here by [Creating a Modal Component](modal.md#creating-a-modal-component)
|
|
9
|
+
- Or, take a look at some of our [Modal Code Examples](modal.md#modal-code-examples).
|
|
9
10
|
|
|
10
11
|
## Why `LightningModal`?
|
|
11
12
|
|
|
12
|
-
`LightningModal` provides a full-featured, modern, accessible modal solution intended for on and off the Salesforce platform (see [intended timeline](#intended-timeline-for-modal-solutions)) _that will **replace all** previous Lightning modal solutions_. Whether you are starting a completely new modal implementation, or have an existing modal implementation using a prior Aura or LWC modal solution, `LightningModal` is your Salesforce modal migration path
|
|
13
|
+
`LightningModal` provides a full-featured, modern, accessible modal solution intended for on and off the Salesforce platform (see [intended timeline](#intended-timeline-for-modal-solutions)) _that will **replace all** previous Lightning modal solutions_. Whether you are starting a completely new modal implementation, or have an existing modal implementation using a prior Aura or LWC modal solution, `LightningModal` is your Salesforce modal migration path _forward_.
|
|
13
14
|
|
|
14
15
|
**Why migrate to `LightningModal`?** The `LightningModal` component has fewer limitations, is actively supported for use both on the Salesforce platform (starting in 236) and off Salesforce platform (likely, starting in 238), has SLDS blueprints and accessibility best practices built in, is performant, provides a scroll bar when your modal content is taller than the screen height, and is well-tested. Using `LightningModal` gives your team more time to implement your app's unique features instead of recreating modal functionality.
|
|
15
16
|
|
|
16
17
|
### Intended Timeline for Modal Solutions:
|
|
18
|
+
|
|
17
19
|
1. `LightningModal`:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
- Availability:
|
|
21
|
+
- for new Salesforce internal projects in release 236 via `lwc-components-lightning` package
|
|
22
|
+
- for new Salesforce internal _and_ planned for external projects in release 238 via `lightning-base-components` (npmjs.com) package
|
|
23
|
+
- Ongoing Support:
|
|
24
|
+
- starting in release 236 for Salesforce internal teams
|
|
23
25
|
1. `lightning-dialog`:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
- Availability:
|
|
27
|
+
- from 230, for all new modal projects, _within documented limited use cases_ (**not recommended in one.app**)
|
|
28
|
+
- **recommend** transitioning new Salesforce internal modal work to `LightningModal` starting in release 236
|
|
29
|
+
- Ongoing Support:
|
|
30
|
+
- for LWC modal projects, through end of 236, _within documented limited use cases_
|
|
31
|
+
- planned review for deprecation starting in 238
|
|
30
32
|
1. `ui:createPanel`:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
- Availability:
|
|
34
|
+
- for Aura modal projects through end of 236
|
|
35
|
+
- **recommend** transitioning new Salesforce internal modal work to `LightningModal` starting in release 236
|
|
36
|
+
- Ongoing Support:
|
|
37
|
+
- through the end of release 236
|
|
38
|
+
- planned review for deprecation starting in 238
|
|
37
39
|
|
|
38
40
|
## Migrating Existing Modal Implementations
|
|
39
41
|
|
|
40
42
|
In this section, we’ll discuss migrating your existing modal implementation to `LightningModal` by showing the implementation differences in markup and APIs.
|
|
41
43
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
- **Migrating from custom modal implementations** using [SLDS modal blueprints](https://www.lightningdesignsystem.com/components/modals/)
|
|
45
|
+
- **Migrating from Aura** **`ui:createPanel`**
|
|
46
|
+
- **Migrating from** [**`lightning-dialog`**](https://git.soma.salesforce.com/aura/lightning-global/tree/master/ui-lightning-components/src/main/modules/lightning/dialog) (Salesforce internal only)
|
|
45
47
|
|
|
46
48
|
## Key Points For Modal Code Migration
|
|
47
49
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
+
- **There isn't a `<lightning-modal>` tag!** Instead, you extend `LightningModal`, and call `.open()` and `.close()` on your modal implementation. You'll never use the `<lightning-modal>` tag within your code.
|
|
51
|
+
- **In most implementations, you’ll have, at minimum, two components**:
|
|
50
52
|
1. your `CustomModal` modal component which defines behavior and is wrapped in the modal window
|
|
51
53
|
1. your application component that imports your `CustomModal` component and calls `.open({})` to open your modal
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
- **You don’t need to set the base SLDS modal CSS classes, or manage the accessibility of the modal itself.** Each of the modal helper components have the SLDS styling classes and accessibility built in. However, you're responsible for making sure your modal’s content has accessibility covered!
|
|
55
|
+
- **Currently, auto-focus on the first interactive element is performed automatically** once at the beginning of modal creation.
|
|
56
|
+
- **You only work directly with helper components named `lightning-modal-*`**. `LightningModal` is actually a collection of supporting components that create the underlying LWC-based modal features and functionality. When you extend `LightningModal`, you can use the modal content helper components like `lightning-modal-header` (optional), `lightning-modal-body`, and `lightning-modal-footer` (optional) to set up the content of the modal, and call `.open()` in the `onclick` event handler of your app page's button or link.
|
|
57
|
+
- **We’ve provided a few `LightningModal` code examples for use in our LWR-based `playground.html` file, or our deprecated `demo/app` code playground to get you started.** Each of these examples is based on an SLDS blueprint pattern, and can be found in the '`modal/__examples__`' folder. Review the [Modal Code Examples](modal.md#modal-code-examples) section.
|
|
56
58
|
|
|
57
59
|
## Migrating From a Custom Built Modal
|
|
58
60
|
|
|
59
61
|
If you have an existing LWC custom modal that implements the HTML and CSS from the [SLDS modal blueprint](https://www.lightningdesignsystem.com/components/modals/) and custom JavaScript behavior, you likely have your own custom api attributes and methods. We recommend the following:
|
|
60
62
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
63
|
+
- Start by looking at our [Modal Code Examples](modal.md#modal-code-examples) for comparison to your own implementation
|
|
64
|
+
- Each of these code examples can be viewed within the `modal/__examples__` folder
|
|
65
|
+
- Each can be previewed within our repo by editing the `playground.html` file (by running `yarn start`) or the deprecated `demo/app` and (running `yarn app:start`) utilizing the corresponding tag:
|
|
66
|
+
- `<modal-all>`
|
|
67
|
+
- `<modal-headless>`
|
|
68
|
+
- `<modal-footless>`
|
|
69
|
+
- Wrap the desired example tag within a `<template></template>` tag
|
|
70
|
+
- For modal blueprints and variants, review the [Modal and supported variants](modal.md#modal-and-supported-variants) section.
|
|
71
|
+
- `LightningModal` provides three helper components for header, body content, and footer sections. The `lightning-modal-body` is the only required component.
|
|
72
|
+
- You don’t need to worry about setting any of the base SLDS modal CSS classes. These are set for you. If you’d like to further style your modal, review the modal [Style Hooks](modal.md#style-hooks) section
|
|
73
|
+
- Review our `LightningModal` documentation:
|
|
74
|
+
- [Creating a Modal Component](modal.md#creating-a-modal-component)
|
|
75
|
+
- [Opening a Modal Instance](modal.md#opening-a-modal-instance)
|
|
76
|
+
- [About Modal Instances](modal.md#about-modal-instances)
|
|
77
|
+
- [Using the open() method](modal.md#using-the-open-method)
|
|
78
|
+
- [Using the close() method](modal.md#using-the-close-method)
|
|
79
|
+
- [Modal Code Examples](modal.md#modal-code-examples)
|
|
78
80
|
|
|
79
81
|
## Migrating From Aura Modals
|
|
80
82
|
|
|
@@ -84,48 +86,50 @@ If you are ready to move an existing modal implementation from Aura-based `ui:cr
|
|
|
84
86
|
|
|
85
87
|
This section covers implementation differences between Aura modal solutions and `LightningModal`.
|
|
86
88
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
89
|
+
- When setting up the config before opening the modal, either pass your content via custom written `@api` (see [Using the open() method](modal.md#using-the-open-method)), or set it statically within your template (see the [Base Modal](modal.md#base-modal) HTML template example)
|
|
90
|
+
- If you don't want a header and title section, simply remove `lightning-modal-header`. You must then pass the required `label` value (for the accessible modal title) when opening the modal, for example `Modal.open({label: ‘Descriptive Modal Header’})`. See our [Headless Variant](modal.md#headless-variant) documentation, and [Modal Code Examples](modal.md#modal-code-examples). Same goes for the footer section, if you don’t want a footer, don't use `lightning-modal-footer`. Only `lightning-modal-body` is required.
|
|
91
|
+
- **For specific events and event listeners availability** within `createPanel` or `createModal`, for example, `onBeforeShow`, `onAfterShow`, `onCreate` or `onDestroy`, see our section on [About Modal Events](modal.md#about-modal-events).
|
|
92
|
+
- **Recommend:** create these as [custom events](https://developer.salesforce.com/docs/platform/lwc/guide/events-create-dispatch)
|
|
93
|
+
- **If you want to get element reference,** for example, `linkElement.querySelector(‘[data-my-link]’)` within the content you’ve set within your modal, utilize data attributes. For this example, `<a href=“#” data-my-link>`, rather than relying on ID references, since these dynamically change in LWC).
|
|
94
|
+
- **Recommend:** See the note within the [ARIA Attributes](https://developer.salesforce.com/docs/platform/lwc/guide/create-components-accessibility-attributes#aria-attributes) section.
|
|
95
|
+
- If you need to style aspects of your modal, you can apply CSS styles directly to your markup within the helper components.
|
|
96
|
+
- **Recommend:** See the example under [Directional Variant](modal.md#directional-variant) section.
|
|
97
|
+
- If you need to support a modal with a [directional variant](https://www.lightningdesignsystem.com/components/modals/#Directional), please review our [Directional Variant](modal.md#directional-variant) documentation.
|
|
96
98
|
|
|
97
99
|
### API differences
|
|
98
100
|
|
|
99
101
|
This section covers `@api` or attribute differences between Aura modal solutions and `LightningModal`.
|
|
100
102
|
|
|
101
103
|
#### Supported APIs
|
|
104
|
+
|
|
102
105
|
See [ui:modal](https://git.soma.salesforce.com/aura/aura/tree/master/aura-components/src/main/components/ui/modal)
|
|
103
106
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
107
|
+
- `title` attribute has been changed to the `label` attribute
|
|
108
|
+
- You set the `label` attribute on the `lightning-modal-header` helper component or in the case of a headless modal, when you open the modal, you would set the `label` attribute when opening the modal. For example: `Modal.open({ label: ‘Modal Descriptive Title’ })`
|
|
109
|
+
- `**LightningModal**` currently has only four official attributes A
|
|
110
|
+
- `size` - to set the width of the modal
|
|
111
|
+
- `label` - to set the modal heading
|
|
112
|
+
- `description` - to set the modal's `aria-description` or `aria-describedby` property
|
|
113
|
+
- `disableClose` - a boolean value to toggle usability of the Close button
|
|
114
|
+
- **Modal enables you to pass in your own `@api`** to interact and wire-up your own desired functionality within the modal (interactive elements like buttons, inputs, etc) by setting key value pairs on `.open({ options: [], buttons: [] })`, for example
|
|
115
|
+
- **Modal enables setting event listeners** that may be listened to by the base LWC component (that opens the modal) by passing custom events into your LightningModal implementation by setting keys startin with `on` `.open({ onselect: () => { /* do stuff */ } })`, setting the corresponding listener on the outer templates markup, and firing the custom event `select` from within the modal. See [modal.md](modal.md#about-modal-events) for examples
|
|
113
116
|
|
|
114
117
|
#### Unsupported API
|
|
118
|
+
|
|
115
119
|
See [ui:modal](https://git.soma.salesforce.com/aura/aura/tree/master/aura-components/src/main/components/ui/modal)
|
|
116
120
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
121
|
+
- **Animation related:** `animation`, `closeAnimation`, `useTransition`
|
|
122
|
+
- **recommend:** remove for now, future support may be available
|
|
123
|
+
- **Close button related:** `closeAction`**,** `showCloseButton`, `closeButton`, `closeDialogLabel`
|
|
124
|
+
- **notes:** no recommendations, these properties cannot be altered currently
|
|
125
|
+
- **Setting CSS Classes related:** `class,` `modalClass`, `headerClass`, `bodyClass`, `footerClass`
|
|
126
|
+
- **recommend:** apply your required styles within the modal component. See the [Directional Variant](modal.md#directional-variant) section for an example.
|
|
127
|
+
- **Accessibility related:** trapFocus, ariaLabelleBy, ariaDescribedBy
|
|
128
|
+
- **notes:** the first two properties are managed for you, ariaDescribedBy feature will be added later
|
|
129
|
+
- **autoFocus** - **note:** this is currently happens automatically at open time
|
|
130
|
+
- **icon** - **note:** no current ability set an icon
|
|
131
|
+
- **titleDisplay** - note: not supported
|
|
132
|
+
- **Recommend:** If you don’t want a header section or title in the modal, set a descriptive label attribute value for accessibility, and don’t add the `lightning-modal-header` component.
|
|
129
133
|
|
|
130
134
|
## Migrating From `lightning-dialog`
|
|
131
135
|
|
|
@@ -135,24 +139,24 @@ If you need to move an existing `lightning-dialog` implementation, you’ll need
|
|
|
135
139
|
|
|
136
140
|
This section covers implementation differences between `lightning-dialog` and `LightningModal`.
|
|
137
141
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
142
|
+
- `lightning-dialog` and `LightningModal` are fairly similar in terms of their template code implementation, with the exception that the different sections within the `LightningModal` have separate helper components.
|
|
143
|
+
- `lightning-dialog` is inline with your application limiting the z-index to the context where it is placed. `LightningModal` is created outside and above all elements with a managed z-index to not conflict with other overlays.
|
|
144
|
+
- You implement `lightning-dialog` via its tag in your markup. There is no equivalent `lightning-modal`, instead you extend `LightningModal`. For example:
|
|
145
|
+
- import **LightningModal** from 'lightning/modal';
|
|
146
|
+
- export default class **MyModal _extends_ LightningModal** { /_ your code _/ }
|
|
147
|
+
- `LightningModal` makes use of extending `LightningOverlay` which provides `.open()` and `.close()` methods, whereas `lightning-dialog` worked from LWC declarative implementation without extends. See our sample [Modal Code Examples](modal.md#modal-code-examples) documentation.
|
|
148
|
+
- Custom events - `LightningModal` only provides a `privateclose` event. `<lightning-dialog>` provided events `cancel` or `close` events.
|
|
145
149
|
|
|
146
150
|
### API and Method Differences
|
|
147
151
|
|
|
148
152
|
This section covers api or attribute and method differences between `lightning-dialog` and `LightningModal`.
|
|
149
153
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
154
|
+
- The API to indicate the modal's title or heading is renamed from `header` to `label`
|
|
155
|
+
- From: `<lightning-dialog header=“Descriptive Modal Heading”>`
|
|
156
|
+
- To:
|
|
153
157
|
1. `<lightning-modal-header label=“Descriptive Modal Heading”>` for modal with header section
|
|
154
158
|
1. Or, `MyModal.open({ label: ‘Descriptive Modal Heading’ })` for headless modal
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
+
- The method to show the modal is renamed
|
|
160
|
+
- From: `.showModal()`
|
|
161
|
+
- To: `.open()`
|
|
162
|
+
- `.open()` is inherited when you extend LightningModal.
|