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
|
@@ -36,19 +36,19 @@ This component uses the Salesforce Lightning Design System (SLDS) [`prompt` blue
|
|
|
36
36
|
|
|
37
37
|
`LightningAlert` supports the following attributes:
|
|
38
38
|
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
50
|
-
-
|
|
51
|
-
-
|
|
39
|
+
- `message`: Message text that displays in the alert.
|
|
40
|
+
- `label`: Header text, also used as the `aria-label`. Default string is `Alert`.
|
|
41
|
+
- `variant`: Two values, `header` and `headerless`. Default value is `header`.
|
|
42
|
+
- `theme`: Color theme for the header. The `theme` attribute supports the following [options](https://www.lightningdesignsystem.com/utilities/themes/#site-main-content) from SLDS:
|
|
43
|
+
- `default`: white
|
|
44
|
+
- `shade`: gray
|
|
45
|
+
- `inverse`: dark blue
|
|
46
|
+
- `alt-inverse`: darker blue
|
|
47
|
+
- `success`: green
|
|
48
|
+
- `info`: gray-ish blue
|
|
49
|
+
- `warning`: yellow
|
|
50
|
+
- `error`: red
|
|
51
|
+
- `offline`: black
|
|
52
52
|
|
|
53
53
|
If an invalid value is provided, `LightningAlert` uses the `default` theme. `LightningAlert` ignores the `style` attribute.
|
|
54
54
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@import './alert.lbc.native.css'
|
|
1
|
+
@import './alert.lbc.native.css';
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
The `lightning/ariaObserver` module provides an easy way for users to write accessible component that works in both synthetic and native shadow.
|
|
2
2
|
|
|
3
3
|
## Aria ID referencing in native shadow
|
|
4
|
+
|
|
4
5
|
Use the `AriaObserver` library to write accessible component that works where `ariaLabelledBy` would break native shadow.
|
|
5
6
|
|
|
6
7
|
Here's an example that won't work with native shadow. In the following code, we support attribute `ariaLabelledBy` in our component `c-foo`, so the `input` element is labelled by external elements.
|
|
7
8
|
|
|
8
|
-
```
|
|
9
|
+
```html
|
|
9
10
|
<template>
|
|
10
11
|
<input aria-labelledby={ariaLabelledBy}>
|
|
11
12
|
</template>
|
|
@@ -19,7 +20,7 @@ class Foo extends LightningElement {
|
|
|
19
20
|
|
|
20
21
|
This example uses the `aria-labelledby` attribute to use the internal input as an external label in `c-foo`.
|
|
21
22
|
|
|
22
|
-
```
|
|
23
|
+
```html
|
|
23
24
|
<span id="my-label">Input field</span>
|
|
24
25
|
<c-foo aria-labelledby="my-label"></c-foo>
|
|
25
26
|
```
|
|
@@ -31,9 +32,10 @@ The above example works fine in synthetic shadow, but in native shadow mode, the
|
|
|
31
32
|
To use `AriaObserver` in your component, first import it from `lightning/ariaObserver`. Then, instantiate the `AriaObserver` within your component.
|
|
32
33
|
|
|
33
34
|
The `AriaObserver` constructor takes one parameter:
|
|
35
|
+
|
|
34
36
|
- `cmpReference` The reference of the current component (`this`).
|
|
35
37
|
|
|
36
|
-
```
|
|
38
|
+
```js
|
|
37
39
|
import AriaObserver from 'lightning/ariaObserver';
|
|
38
40
|
|
|
39
41
|
export default class Foo extends LightningElement {
|
|
@@ -49,6 +51,7 @@ export default class Foo extends LightningElement {
|
|
|
49
51
|
> Initializing the observer in the constructor, rather than `connectedCallback`, can lead to subtle bugs.
|
|
50
52
|
|
|
51
53
|
Next, use the `connect(options)` method to connect between the internal element and the external reference. It takes an options object with the following keys:
|
|
54
|
+
|
|
52
55
|
- `attribute` The name of the aria attribute. Two supported options: `aria-labelledby`, `aria-describedby`, `aria-activedescendant` and `aria-controls`.
|
|
53
56
|
- `targetSelector` The selector to the internal element where the aria attribute should be attached.
|
|
54
57
|
- `targetNode` The element where the aria attribute should be attached. If not provided, the `targetSelector` is used.
|
|
@@ -56,7 +59,8 @@ Next, use the `connect(options)` method to connect between the internal element
|
|
|
56
59
|
- `relatedNodes` An Array of HTMLElement element(s) to which the `targetNode` will be related. Combined with `relatedNodeIds` if both are present.
|
|
57
60
|
|
|
58
61
|
This example uses `connect(options)` to display an aria label for the internal `input` element.
|
|
59
|
-
|
|
62
|
+
|
|
63
|
+
```js
|
|
60
64
|
@api
|
|
61
65
|
get ariaLabelledBy() {
|
|
62
66
|
return this._ariaLabelledBy;
|
|
@@ -73,13 +77,14 @@ set ariaLabelledBy(refs) {
|
|
|
73
77
|
```
|
|
74
78
|
|
|
75
79
|
Then use the `sync(isNativeShadow)` method to synchronize the ID references when the template is re-rendered.
|
|
80
|
+
|
|
76
81
|
- `isNativeShadow` An optional parameter that indicates whether the relationships involve components rendered in native shadow.
|
|
77
|
-
Used when the `targetSelector` or `targetNode` is within a shadow boundary, but the parent component where AriaObserver has been
|
|
78
|
-
instantiated is not. Example: `lightning-primitive-input-simple` may be rendered in native shadow, but `lightning-input` may not be.
|
|
82
|
+
Used when the `targetSelector` or `targetNode` is within a shadow boundary, but the parent component where AriaObserver has been
|
|
83
|
+
instantiated is not. Example: `lightning-primitive-input-simple` may be rendered in native shadow, but `lightning-input` may not be.
|
|
79
84
|
|
|
80
85
|
It is important to protect the call to `sync` by checking if the component `isConnected`. This is because there are some cases where a component may be rendered but not connected and calling `sync` when a component is not connected will fail.
|
|
81
86
|
|
|
82
|
-
```
|
|
87
|
+
```js
|
|
83
88
|
renderedCallback() {
|
|
84
89
|
if (this.isConnected) {
|
|
85
90
|
this.ariaObserver.sync();
|
|
@@ -99,7 +104,7 @@ but one of its ancestor nodes does. For example, `lightning-base-combobox` is co
|
|
|
99
104
|
|
|
100
105
|
Finally, disconnect the aria observer and free the resources at the end of the component lifecycle.
|
|
101
106
|
|
|
102
|
-
```
|
|
107
|
+
```js
|
|
103
108
|
disconnectedCallback() {
|
|
104
109
|
if (this.ariaObserver) {
|
|
105
110
|
this.ariaObserver.disconnect();
|
|
@@ -110,14 +115,14 @@ disconnectedCallback() {
|
|
|
110
115
|
|
|
111
116
|
Here is all these steps combined into a complete example of a component using `AriaObserver`.
|
|
112
117
|
|
|
113
|
-
```
|
|
118
|
+
```html
|
|
114
119
|
<template>
|
|
115
120
|
<!-- element where the aria attribute is attached -->
|
|
116
121
|
<input>
|
|
117
122
|
</template>
|
|
118
123
|
```
|
|
119
124
|
|
|
120
|
-
```
|
|
125
|
+
```js
|
|
121
126
|
import {api, LightningElement} from 'lwc';
|
|
122
127
|
import AriaObserver from 'lightning/ariaObserver';
|
|
123
128
|
|
|
@@ -162,6 +167,7 @@ export default class Foo extends LightningElement {
|
|
|
162
167
|
```
|
|
163
168
|
|
|
164
169
|
Supported attributes:
|
|
170
|
+
|
|
165
171
|
- `aria-labelledby`
|
|
166
172
|
- `aria-describedby`
|
|
167
173
|
- `aria-activedescendant`
|
|
@@ -78,8 +78,8 @@ is available in your org.
|
|
|
78
78
|
|
|
79
79
|
Use the `variant` attribute with one of these values to apply styling.
|
|
80
80
|
|
|
81
|
-
-
|
|
82
|
-
-
|
|
81
|
+
- `square` is the default variant, displaying a rectangle avatar with rounded corners
|
|
82
|
+
- `circle` displays a round avatar
|
|
83
83
|
|
|
84
84
|
This example creates a round avatar.
|
|
85
85
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@import './avatar.lbc.native.css';
|
|
1
|
+
@import './avatar.lbc.native.css';
|
|
@@ -1,98 +1,97 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
3
|
-
:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
:
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
:
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
:
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
:
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
:
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
:
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
:
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
:
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}
|
|
2
|
+
:host([data-render-mode="shadow"]) .slds-assistive-text {
|
|
3
|
+
position: absolute !important;
|
|
4
|
+
margin: -1px !important;
|
|
5
|
+
border: 0 !important;
|
|
6
|
+
padding: 0 !important;
|
|
7
|
+
width: 1px !important;
|
|
8
|
+
height: 1px !important;
|
|
9
|
+
overflow: hidden !important;
|
|
10
|
+
clip: rect(0 0 0 0) !important;
|
|
11
|
+
text-transform: none !important;
|
|
12
|
+
white-space: nowrap !important;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:host([data-render-mode="shadow"]) [part='avatar'] {
|
|
16
|
+
width: var(--slds-c-avatar-sizing, var(--slds-g-sizing-9));
|
|
17
|
+
height: var(--slds-c-avatar-sizing, var(--slds-g-sizing-9));
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
display: inline-block;
|
|
20
|
+
vertical-align: middle;
|
|
21
|
+
border-radius: var(--slds-c-avatar-radius-border, var(--slds-g-radius-border-2));
|
|
22
|
+
line-height: var(--slds-g-font-lineheight-1);
|
|
23
|
+
font-size: var(--slds-g-font-scale-neg-1);
|
|
24
|
+
color: var(--slds-c-avatar-text-color, var(--slds-g-color-on-accent-1));
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:host([data-render-mode="shadow"][size='x-small']) [part='avatar'] {
|
|
28
|
+
width: var(--slds-g-sizing-6);
|
|
29
|
+
height: var(--slds-g-sizing-6);
|
|
30
|
+
font-size: var(--slds-g-font-scale-neg-4);
|
|
31
|
+
--slds-c-icon-sizing: var(--slds-g-sizing-6);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:host([data-render-mode="shadow"][size='small']) [part='avatar'] {
|
|
35
|
+
width: var(--slds-g-sizing-7);
|
|
36
|
+
height: var(--slds-g-sizing-7);
|
|
37
|
+
font-size: var(--slds-g-font-scale-neg-4);
|
|
38
|
+
--slds-c-icon-sizing: var(--slds-g-sizing-7);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
:host([data-render-mode="shadow"][size='medium']) [part='avatar'] {
|
|
42
|
+
width: var(--slds-g-sizing-9);
|
|
43
|
+
height: var(--slds-g-sizing-9);
|
|
44
|
+
font-size: var(--slds-g-font-scale-neg-1);
|
|
45
|
+
--slds-c-icon-sizing: var(--slds-g-sizing-9);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
:host([data-render-mode="shadow"][size='large']) [part='avatar'] {
|
|
49
|
+
width: var(--slds-g-sizing-10);
|
|
50
|
+
height: var(--slds-g-sizing-10);
|
|
51
|
+
font-size: var(--slds-g-font-scale-1);
|
|
52
|
+
line-height: var(--slds-g-font-lineheight-2);
|
|
53
|
+
--slds-c-icon-sizing: var(--slds-g-sizing-10);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
:host([data-render-mode="shadow"][variant='circle']) [part='avatar'] {
|
|
57
|
+
border-radius: calc(var(--slds-g-radius-border-circle) / 2);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
:host([data-render-mode="shadow"].slds-avatar_empty) [part='avatar'] {
|
|
61
|
+
border: var(--slds-g-sizing-border-1) dashed var(--slds-g-color-neutral-base-90);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
:host([data-render-mode="shadow"]) lightning-icon {
|
|
65
|
+
display: flex;
|
|
66
|
+
justify-content: center;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
:host([data-render-mode="shadow"]) .slds-avatar__initials {
|
|
70
|
+
display: flex;
|
|
71
|
+
justify-content: center;
|
|
72
|
+
align-content: center;
|
|
73
|
+
align-items: center;
|
|
74
|
+
margin: auto;
|
|
75
|
+
color: var(--slds-c-avatar-initials-text-color);
|
|
76
|
+
height: 100%;
|
|
77
|
+
text-shadow: 0 0 1px rgba(0, 0, 0, 80%);
|
|
78
|
+
background-color: var(--slds-g-color-accent-container-2);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
:host([data-render-mode="shadow"]) .slds-avatar__initials:hover {
|
|
82
|
+
color: var(--slds-c-avatar-initials-text-color-hover, var(--slds-g-color-neutral-base-100));
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
:host([data-render-mode="shadow"]) .slds-avatar__initials[title] {
|
|
86
|
+
cursor: default;
|
|
87
|
+
text-decoration: none;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* inverse is not currently supported by LBC */
|
|
91
|
+
|
|
92
|
+
:host([data-render-mode="shadow"]) .slds-avatar__initials_inverse {
|
|
93
|
+
--slds-c-avatar-text-color: var(--slds-c-avatar-inverse-text-color, var(--slds-g-color-neutral-base-30));
|
|
94
|
+
|
|
95
|
+
background-color: var(--slds-g-color-neutral-base-95);
|
|
96
|
+
text-shadow: none;
|
|
97
|
+
}
|
|
@@ -14,8 +14,8 @@ text. Badges don't work for navigation because they can't include a hyperlink.
|
|
|
14
14
|
|
|
15
15
|
You can create two types of badges.
|
|
16
16
|
|
|
17
|
-
-
|
|
18
|
-
-
|
|
17
|
+
- A text-only badge
|
|
18
|
+
- A badge with an icon that's displayed before or after the text
|
|
19
19
|
|
|
20
20
|
Here is an example of a text-only badge.
|
|
21
21
|
|
|
@@ -74,7 +74,7 @@ This example creates a green badge using the `slds-theme_success` SLDS class.
|
|
|
74
74
|
<lightning-badge label="Approved" class="slds-theme_success"> </lightning-badge>
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
-
Component styling hooks use the `--slds-c-*` prefix and change styling for specific elements or properties of a component. Component-specific styling isn’t recommended, because it’s unsupported for SLDS 2, but existing customizations still work with the original SLDS. If you use component styling hooks, limit the components to SLDS themes until SLDS 2 and the Salesforce Cosmos theme become generally available. See [Badges: Styling Hooks Overview](https://www.lightningdesignsystem.com/components/badges/#Styling-Hooks-Overview) for documentation on component-specific hooks for this component.
|
|
77
|
+
Component styling hooks use the `--slds-c-*` prefix and change styling for specific elements or properties of a component. Component-specific styling isn’t recommended, because it’s unsupported for SLDS 2, but existing customizations still work with the original SLDS. If you use component styling hooks, limit the components to SLDS themes until SLDS 2 and the Salesforce Cosmos theme become generally available. See [Badges: Styling Hooks Overview](https://www.lightningdesignsystem.com/components/badges/#Styling-Hooks-Overview) for documentation on component-specific hooks for this component.
|
|
78
78
|
|
|
79
79
|
For more information, see [Style Components Using Lightning Design System Styling Hooks](https://developer.salesforce.com/docs/platform/lwc/guide/create-components-css-custom-properties) in the Lightning Web Components Developer Guide.
|
|
80
80
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@import './badge.lbc.native.css';
|
|
1
|
+
@import './badge.lbc.native.css';
|
|
@@ -1,76 +1,91 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
:host([data-render-mode="shadow"]) [part='badge'] {
|
|
3
|
+
/**
|
|
4
4
|
* Remap to SLDS blueprint hooks for parity
|
|
5
5
|
* https://www.lightningdesignsystem.com/components/modals/#Styling-Hooks-Overview
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
8
|
+
/* stylelint-disable */
|
|
9
|
+
--slds-c-badge-font-lineheight: var(--slds-c-badge-line-height);
|
|
10
|
+
/* stylelint-enable */
|
|
11
|
+
display: inline-flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
padding: var(--slds-g-spacing-1) var(--slds-g-spacing-2);
|
|
14
|
+
color: var(--slds-c-badge-text-color, var(--slds-g-color-on-surface-3));
|
|
15
|
+
font-size: var(--slds-c-badge-font-size, var(--slds-g-font-scale-neg-1));
|
|
16
|
+
font-weight: var(--slds-g-font-weight-7);
|
|
17
|
+
/* stylelint-disable */
|
|
18
|
+
line-height: var(--slds-c-badge-font-lineheight, initial);
|
|
19
|
+
/* stylelint-enable */
|
|
20
|
+
white-space: nowrap;
|
|
21
|
+
border-width: var(--slds-c-badge-sizing-border, var(--slds-g-sizing-border-1));
|
|
22
|
+
border-style: solid;
|
|
23
|
+
border-color: var(--slds-c-badge-color-border, transparent);
|
|
24
|
+
border-radius: var(--slds-c-badge-radius-border, 15rem);
|
|
25
|
+
background-color: var(--slds-c-badge-color-background, var(--slds-g-color-neutral-base-95));
|
|
26
|
+
}
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
:host([data-render-mode="shadow"]) [part='badge']:empty {
|
|
29
|
+
padding: 0;
|
|
30
|
+
}
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
32
|
+
:host([data-render-mode="shadow"]) [part='badge'] .slds-badge__icon {
|
|
33
|
+
display: inline-flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
color: var(
|
|
36
|
+
--slds-c-badge-icon-color-foreground,
|
|
37
|
+
var(--slds-g-color-neutral-base-50, var(--slds-g-color-neutral-base-50))
|
|
38
|
+
);
|
|
39
|
+
line-height: 1;
|
|
40
|
+
vertical-align: middle;
|
|
41
|
+
}
|
|
39
42
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
+
:host([data-render-mode="shadow"]) [part='badge'] .slds-badge__icon.slds-badge__icon_inverse {
|
|
44
|
+
--slds-c-badge-icon-color-foreground: var(--slds-c-badge-icon-inverse-color-foreground, currentColor);
|
|
45
|
+
}
|
|
43
46
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
+
:host([data-render-mode="shadow"]) [part='badge'] .slds-badge__icon.slds-badge__icon_left {
|
|
48
|
+
margin-inline-end: var(--slds-g-spacing-1);
|
|
49
|
+
}
|
|
47
50
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
+
:host([data-render-mode="shadow"]) [part='badge'] .slds-badge__icon.slds-badge__icon_right {
|
|
52
|
+
margin-inline-start: var(--slds-g-spacing-1);
|
|
53
|
+
}
|
|
51
54
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
+
:host([data-render-mode="shadow"]) [part='badge'] lightning-primitive-icon {
|
|
56
|
+
vertical-align: middle;
|
|
57
|
+
}
|
|
55
58
|
|
|
56
|
-
|
|
59
|
+
/* As a best practice for native shadow, we should use an attribute on the host rather than the SLDS class.
|
|
57
60
|
However, the public API for this component does not expose an attribute for this class. Establishing a programmatic
|
|
58
61
|
mapping between the class and an attribute is an antipattern, requiring MutationObserver and reducing performance */
|
|
59
62
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
--slds-c-badge-
|
|
63
|
-
|
|
63
|
+
:host([data-render-mode="shadow"].slds-badge_inverse) {
|
|
64
|
+
--slds-c-badge-color-background: var(
|
|
65
|
+
--slds-c-badge-inverse-color-background,
|
|
66
|
+
var(--slds-g-color-neutral-base-50, var(--slds-g-color-neutral-base-50))
|
|
67
|
+
);
|
|
68
|
+
--slds-c-badge-text-color: var(
|
|
69
|
+
--slds-c-badge-inverse-text-color,
|
|
70
|
+
var(--slds-g-color-neutral-base-100, var(--slds-g-color-neutral-base-100))
|
|
71
|
+
);
|
|
72
|
+
}
|
|
64
73
|
|
|
65
|
-
|
|
74
|
+
/* As a best practice for native shadow, we should use an attribute on the host rather than the SLDS class.
|
|
66
75
|
However, the public API for badge does not expose an attribute for this class. Establishing a programmatic mapping between
|
|
67
76
|
the class and an attribute is an antipattern, requiring MutationObserver and reducing performance */
|
|
68
77
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
--slds-c-badge-
|
|
72
|
-
|
|
78
|
+
:host([data-render-mode="shadow"].slds-badge_lightest) {
|
|
79
|
+
--slds-c-badge-color-background: var(
|
|
80
|
+
--slds-c-badge-lightest-color-background,
|
|
81
|
+
var(--slds-g-color-neutral-base-100, var(--slds-g-color-neutral-base-100))
|
|
82
|
+
);
|
|
83
|
+
--slds-c-badge-color-border: var(
|
|
84
|
+
--slds-c-badge-lightest-color-border,
|
|
85
|
+
var(--slds-g-color-border-base-1, var(--slds-g-color-neutral-base-90))
|
|
86
|
+
);
|
|
87
|
+
}
|
|
73
88
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
89
|
+
:host([data-render-mode="shadow"].slds-badge:not(:first-of-type)) {
|
|
90
|
+
margin-inline-start: var(--slds-g-spacing-2);
|
|
91
|
+
}
|
|
@@ -89,7 +89,7 @@ To use a custom image for the barcode scanner icon, set the `enabled-icon-src` a
|
|
|
89
89
|
|
|
90
90
|
The `lightning-barcode-scanner` component supports two events, `scan` and `error`.
|
|
91
91
|
|
|
92
|
-
The `scan` event is triggered by a successful scan on a single scan component or by successfully closing the scanner window on a
|
|
92
|
+
The `scan` event is triggered by a successful scan on a single scan component or by successfully closing the scanner window on a multiple scan component. It returns this parameter.
|
|
93
93
|
|
|
94
94
|
| Parameter | Type | Description |
|
|
95
95
|
| --------------- | ---- | ------------------------------------- |
|
|
@@ -97,11 +97,11 @@ The `scan` event is triggered by a successful scan on a single scan component or
|
|
|
97
97
|
|
|
98
98
|
The `scan` event has these properties.
|
|
99
99
|
|
|
100
|
-
| Property | Value | Description
|
|
101
|
-
| ---------- | ----- |
|
|
102
|
-
| bubbles | false | This event does not bubble.
|
|
100
|
+
| Property | Value | Description |
|
|
101
|
+
| ---------- | ----- | ------------------------------------------------------------------------------------------------------------ |
|
|
102
|
+
| bubbles | false | This event does not bubble. |
|
|
103
103
|
| cancelable | true | This event can be canceled. You can call `preventDefault()` on this event to prevent firing the click event. |
|
|
104
|
-
| composed | false | This event does not propagate outside the template in which it was dispatched.
|
|
104
|
+
| composed | false | This event does not propagate outside the template in which it was dispatched. |
|
|
105
105
|
|
|
106
106
|
The `errors` event is triggered if there is an error during the scan. The event contains the error details. It returns this parameter.
|
|
107
107
|
|
|
@@ -111,8 +111,8 @@ The `errors` event is triggered if there is an error during the scan. The event
|
|
|
111
111
|
|
|
112
112
|
The `errors` event has these properties.
|
|
113
113
|
|
|
114
|
-
| Property | Value | Description
|
|
115
|
-
| ---------- | ----- |
|
|
116
|
-
| bubbles | false | This event does not bubble.
|
|
114
|
+
| Property | Value | Description |
|
|
115
|
+
| ---------- | ----- | ------------------------------------------------------------------------------------------------------------ |
|
|
116
|
+
| bubbles | false | This event does not bubble. |
|
|
117
117
|
| cancelable | true | This event can be canceled. You can call `preventDefault()` on this event to prevent firing the click event. |
|
|
118
|
-
| composed | false | This event does not propagate outside the template in which it was dispatched.
|
|
118
|
+
| composed | false | This event does not propagate outside the template in which it was dispatched. |
|