lightning-base-components 1.21.2-alpha → 1.21.4-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/metadata/raptor.json +77 -1
- package/package.json +108 -15
- package/scopedImports/@salesforce-label-LightningDatatable.showActions.js +1 -1
- package/scopedImports/@salesforce-label-LightningForm.controllerFieldsMessage.js +1 -0
- package/scopedImports/@salesforce-label-LightningForm.dependentFieldsHeader.js +1 -0
- package/scopedImports/@salesforce-label-LightningForm.dependentFieldsListHeading.js +1 -0
- package/scopedImports/@salesforce-label-LightningForm.generalDependentFieldsMessage.js +1 -0
- package/scopedImports/@salesforce-label-LightningForm.learnMore.js +1 -0
- package/scopedImports/@salesforce-label-LightningForm.okButton.js +1 -0
- package/scopedImports/@salesforce-label-LightningLookup.modalCancel.js +1 -0
- package/scopedImports/@salesforce-label-LightningLookup.modalSelect.js +1 -0
- package/scopedImports/@salesforce-label-LightningProgressIndicator.currentStage.js +1 -1
- package/scopedImports/@salesforce-label-LightningProgressIndicator.errorStage.js +1 -0
- package/scopedImports/@salesforce-label-LightningProgressIndicator.stageComplete.js +1 -1
- package/scopedImports/@salesforce-label-LightningProgressIndicator.stageNotStarted.js +1 -1
- package/scopedImports/@salesforce-label-LightningRichTextEditor.colorPicker.js +1 -0
- package/src/lightning/accordion/accordion-section.slds.css +3 -3
- package/src/lightning/accordion/accordion.slds.css +1 -2
- package/src/lightning/accordionSection/accordion-section.slds.css +3 -3
- package/src/lightning/accordionSection/accordionSection.js +3 -1
- package/src/lightning/accordionSection/button.slds.css +1 -1
- package/src/lightning/avatar/avatar.html +1 -0
- package/src/lightning/badge/badge.html +3 -3
- package/src/lightning/badge/badge.js +1 -0
- package/src/lightning/badge/badge.js-meta.xml +3 -0
- package/src/lightning/baseCombobox/base-combobox.slds.css +11 -6
- package/src/lightning/baseCombobox/baseCombobox.html +5 -2
- package/src/lightning/baseCombobox/baseCombobox.js +5 -18
- package/src/lightning/baseCombobox/baseCombobox.js-meta.xml +6 -0
- package/src/lightning/baseCombobox/input-text.slds.css +41 -68
- package/src/lightning/baseCombobox/keyboard.js +12 -4
- package/src/lightning/baseCombobox/listbox.slds.css +51 -99
- package/src/lightning/baseCombobox/spinner.slds.css +62 -62
- package/src/lightning/baseComboboxFormattedText/baseComboboxFormattedText.js-meta.xml +6 -0
- package/src/lightning/baseComboboxItem/baseComboboxItem.js +10 -6
- package/src/lightning/baseComboboxItem/baseComboboxItem.js-meta.xml +6 -0
- package/src/lightning/baseComboboxItem/listbox.slds.css +51 -99
- package/src/lightning/baseFormattedText/baseFormattedText.js +2 -2
- package/src/lightning/button/__docs__/button.md +2 -1
- package/src/lightning/button/button.js +5 -5
- package/src/lightning/button/button.slds.css +1 -1
- package/src/lightning/buttonIcon/__docs__/buttonIcon.md +1 -0
- package/src/lightning/buttonIcon/button-icon.slds.css +1 -1
- package/src/lightning/buttonIcon/buttonIcon.html +1 -1
- package/src/lightning/buttonIcon/buttonIcon.js +18 -17
- package/src/lightning/buttonIconStateful/button-icon-stateful.slds.css +4 -2
- package/src/lightning/buttonIconStateful/button-icon.slds.css +1 -1
- package/src/lightning/buttonIconStateful/button.slds.css +1 -1
- package/src/lightning/buttonMenu/button-icon.slds.css +1 -1
- package/src/lightning/buttonMenu/button-menu.slds.css +8 -2
- package/src/lightning/buttonMenu/button.slds.css +1 -1
- package/src/lightning/buttonMenu/buttonMenu.css +5 -0
- package/src/lightning/buttonMenu/buttonMenu.js +2 -0
- package/src/lightning/buttonStateful/button-stateful.slds.css +6 -2
- package/src/lightning/buttonStateful/button.slds.css +1 -1
- package/src/lightning/buttonStateful/buttonStateful.js +4 -1
- package/src/lightning/calendar/calendar.js-meta.xml +6 -0
- package/src/lightning/calendar/calendar.slds.css +9 -2
- package/src/lightning/colorPickerCustom/color-picker-custom.slds.css +22 -23
- package/src/lightning/colorPickerCustom/colorPickerCustom.js +12 -0
- package/src/lightning/colorPickerCustom/input-text.slds.css +41 -68
- package/src/lightning/colorPickerPanel/color-picker-panel.slds.css +9 -10
- package/src/lightning/colorPickerPanel/colorPickerPanel.js +11 -1
- package/src/lightning/colorPickerPanel/popover.slds.css +0 -2
- package/src/lightning/combobox/combobox.html +1 -0
- package/src/lightning/combobox/combobox.slds.css +1 -2
- package/src/lightning/combobox/form-element.slds.css +54 -54
- package/src/lightning/datatable/__examples__disabled/customComponentWrapper/customComponentWrapper.html +11 -0
- package/src/lightning/datatable/__examples__disabled/customComponentWrapper/customComponentWrapper.js +25 -0
- package/src/lightning/datatable/__examples__disabled/customComponentWrapper/generateData.js +15 -0
- package/src/lightning/datatable/__examples__disabled/customDatatableWrapper/customDatatableWrapper.js +89 -0
- package/src/lightning/datatable/__examples__disabled/customDatatypeDeleteRowBtn/customDatatypeDeleteRowBtn.html +6 -0
- package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeDeleteRowBtn/customDatatypeDeleteRowBtn.js +1 -16
- package/src/lightning/datatable/__examples__disabled/customDatatypeLink/customDatatypeLink.html +9 -0
- package/src/lightning/datatable/__examples__disabled/customDatatypeRowOrderingBtn/customDatatypeRowOrderingBtn.html +3 -0
- package/src/lightning/datatable/__examples__disabled/customDatatypeRowOrderingBtn/customDatatypeRowOrderingBtn.js +3 -0
- package/src/lightning/datatable/__examples__disabled/customDatatypeTable/customNumber.html +3 -0
- package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeTable/customNumberEdit.html +2 -0
- package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeTable/deleteRow.html +3 -2
- package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeTable/iconPill.html +1 -1
- package/src/lightning/datatable/{__examples__/customDatatypeRowOrderingBtn/customDatatypeRowOrderingBtn.html → __examples__disabled/customNestedComponent/customNestedComponent.html} +2 -2
- package/src/lightning/datatable/__examples__disabled/customNestedComponent/customNestedComponent.js +12 -0
- package/src/lightning/datatable/__examples__disabled/myCustomTypeDatatable/customInput.html +4 -0
- package/src/lightning/datatable/__examples__disabled/myCustomTypeDatatable/myCustomTypeDatatable.js +17 -0
- package/src/lightning/datatable/__examples__disabled/myCustomTypeDatatable/nestedSimpleComponentParent.html +7 -0
- package/src/lightning/datatable/__examples__disabled/simpleComponentNested/simpleComponentNested.html +9 -0
- package/src/lightning/datatable/__examples__disabled/simpleComponentNested/simpleComponentNested.js +6 -0
- package/src/lightning/datatable/autoWidthStrategy.js +145 -217
- package/src/lightning/datatable/columnResizer.js +80 -190
- package/src/lightning/datatable/columnWidthManager.js +128 -243
- package/src/lightning/datatable/columns.js +192 -283
- package/src/lightning/datatable/datagrid.slds.css +187 -0
- package/src/lightning/datatable/datatable.js +647 -614
- package/src/lightning/datatable/errors.js +19 -28
- package/src/lightning/datatable/fixedWidthStrategy.js +27 -49
- package/src/lightning/datatable/headerActions.js +10 -42
- package/src/lightning/datatable/indexes.js +42 -0
- package/src/lightning/datatable/infiniteLoading.js +27 -46
- package/src/lightning/datatable/inlineEdit.js +311 -322
- package/src/lightning/datatable/keyboard.js +490 -510
- package/src/lightning/datatable/renderManager.js +10 -11
- package/src/lightning/datatable/resizeObserver.js +10 -67
- package/src/lightning/datatable/rowLevelActions.js +7 -6
- package/src/lightning/datatable/rowNumber.js +41 -79
- package/src/lightning/datatable/rowSelection.js +236 -291
- package/src/lightning/datatable/rowSelectionShared.js +26 -33
- package/src/lightning/datatable/rows.js +264 -476
- package/src/lightning/datatable/sort.js +27 -82
- package/src/lightning/datatable/templates/div/div.css +2 -57
- package/src/lightning/datatable/templates/div/div.html +25 -10
- package/src/lightning/datatable/templates/div/div.lbc.native.css +3 -0
- package/src/lightning/datatable/templates/div/div.lbc.synthetic.css +80 -0
- package/src/lightning/datatable/templates/table/table.html +16 -5
- package/src/lightning/datatable/tree.js +17 -35
- package/src/lightning/datatable/types.js +10 -31
- package/src/lightning/datatable/utils.js +54 -29
- package/src/lightning/datatable/virtualization.js +2 -5
- package/src/lightning/datatable/widthManagerShared.js +24 -41
- package/src/lightning/datatable/wrapText.js +45 -77
- package/src/lightning/datepicker/datepicker.js +32 -9
- package/src/lightning/datepicker/datepicker.js-meta.xml +6 -0
- package/src/lightning/datepicker/form-element.slds.css +54 -54
- package/src/lightning/datepicker/input-text.slds.css +41 -68
- package/src/lightning/datetimepicker/datetimepicker.js-meta.xml +6 -0
- package/src/lightning/datetimepicker/form-element.slds.css +54 -54
- package/src/lightning/datetimepicker/input-text.slds.css +41 -68
- package/src/lightning/dualListbox/dual-listbox.slds.css +7 -2
- package/src/lightning/dualListbox/dualListbox.js +7 -8
- package/src/lightning/dualListbox/form-element.slds.css +54 -54
- package/src/lightning/dualListbox/listbox.slds.css +51 -99
- package/src/lightning/dynamicIcon/dynamic-icon-strength.slds.css +1 -2
- package/src/lightning/dynamicIcon/dynamic-icon-trend.slds.css +1 -2
- package/src/lightning/formattedDateTime/formattedDateTime.js +7 -62
- package/src/lightning/formattedDateTime/formattedDateTime.js-meta.xml +3 -0
- package/src/lightning/formattedLocation/formattedLocation.html +1 -3
- package/src/lightning/formattedLocation/formattedLocation.js +3 -25
- package/src/lightning/formattedLookup/events.js +2 -4
- package/src/lightning/formattedName/formattedName.js +3 -2
- package/src/lightning/formattedName/formattedName.js-meta.xml +3 -0
- package/src/lightning/formattedNumber/formattedNumber.js +5 -51
- package/src/lightning/formattedNumber/formattedNumber.js-meta.xml +3 -0
- package/src/lightning/formattedRichText/formattedRichText.js +5 -5
- package/src/lightning/formattedRichText/linkTextNodes.js +58 -0
- package/src/lightning/formattedRichText/richTextConfig.js +1 -0
- package/src/lightning/groupedCombobox/form-element.slds.css +54 -54
- package/src/lightning/groupedCombobox/grouped-combobox.slds.css +0 -2
- package/src/lightning/groupedCombobox/groupedCombobox.js-meta.xml +1 -1
- package/src/lightning/groupedCombobox/input-text.slds.css +41 -68
- package/src/lightning/helptext/button-icon.slds.css +1 -1
- package/src/lightning/helptext/form-element.slds.css +54 -54
- package/src/lightning/helptext/helptext.css +7 -0
- package/src/lightning/helptext/helptext.js +3 -4
- package/src/lightning/icon/icon.html +1 -1
- package/src/lightning/icon/icon.slds.css +12 -25
- package/src/lightning/input/form-element.slds.css +54 -54
- package/src/lightning/input/input.html +5 -0
- package/src/lightning/inputAddress/addressFormat.js +31 -4
- package/src/lightning/inputAddress/fieldsLayout.js +6 -0
- package/src/lightning/inputAddress/form-element.slds.css +54 -54
- package/src/lightning/inputAddress/input-address.slds.css +1 -2
- package/src/lightning/inputAddress/input-text.slds.css +41 -68
- package/src/lightning/inputAddress/inputAddress.html +19 -1
- package/src/lightning/inputAddress/inputAddress.js +75 -3
- package/src/lightning/inputAddress/inputAddress.js-meta.xml +3 -0
- package/src/lightning/inputLocation/form-element.slds.css +54 -54
- package/src/lightning/inputLocation/input-location.slds.css +1 -2
- package/src/lightning/inputLocation/input-text.slds.css +41 -68
- package/src/lightning/inputName/form-element.slds.css +54 -54
- package/src/lightning/inputName/input-text.slds.css +41 -68
- package/src/lightning/interactiveDialogBase/interactive-dialog-base.slds.css +0 -3
- package/src/lightning/interactiveDialogBase/interactiveDialogBase.js-meta.xml +6 -0
- package/src/lightning/internationalizationLibrary/address/AddressFormat.js +553 -610
- package/src/lightning/lookupAddress/form-element.slds.css +54 -54
- package/src/lightning/lookupAddress/listbox.slds.css +51 -99
- package/src/lightning/lookupAddress/location.js +2 -0
- package/src/lightning/lookupAddress/lookup-address.slds.css +0 -2
- package/src/lightning/lookupAddress/lookupAddress.html +6 -1
- package/src/lightning/lookupAddress/lookupAddress.js +40 -10
- package/src/lightning/menuDivider/menu-divider.slds.css +0 -2
- package/src/lightning/menuItem/menu-item.slds.css +8 -2
- package/src/lightning/menuSubheader/menu-subheader.slds.css +1 -2
- package/src/lightning/modal/__docs__/modal.md +10 -1
- package/src/lightning/modal/__modalUtils__/modalContainerTestConstants.js +3 -7
- package/src/lightning/modal/__modalUtils__/modalContainerTestMethods.js +39 -133
- package/src/lightning/modal/__modalUtils__/modalContainerTestMockData.js +1 -1
- package/src/lightning/modal/modal.js +1 -1
- package/src/lightning/modalBase/modal-base.slds.css +3 -3
- package/src/lightning/modalBase/modalBase.html +15 -10
- package/src/lightning/modalBase/modalBase.js +131 -154
- package/src/lightning/modalBase/modalBase.js-meta.xml +6 -0
- package/src/lightning/modalBody/modal-body.slds.css +1 -2
- package/src/lightning/modalBody/modalBody.css +6 -0
- package/src/lightning/modalFooter/modal-footer.slds.css +2 -2
- package/src/lightning/modalFooter/modalFooter.js +0 -21
- package/src/lightning/modalHeader/modal-header.slds.css +1 -2
- package/src/lightning/modalHeader/modalHeader.html +16 -4
- package/src/lightning/modalHeader/modalHeader.js +61 -36
- package/src/lightning/overlay/overlay.js-meta.xml +6 -0
- package/src/lightning/pill/link.html +1 -0
- package/src/lightning/pill/pill.slds.css +32 -58
- package/src/lightning/pill/plain.html +1 -0
- package/src/lightning/pill/plainLink.html +1 -0
- package/src/lightning/pillContainer/button.slds.css +1 -1
- package/src/lightning/pillContainer/listbox.slds.css +51 -99
- package/src/lightning/pillContainer/pill-container.slds.css +6 -10
- package/src/lightning/pillContainer/pill.slds.css +32 -58
- package/src/lightning/popup/popover.slds.css +0 -2
- package/src/lightning/primitiveBubble/primitiveBubble.js +42 -0
- package/src/lightning/primitiveBubble/primitiveBubble.js-meta.xml +6 -0
- package/src/lightning/primitiveButton/primitiveButoon.js-meta.xml +6 -0
- package/src/lightning/primitiveCellCheckbox/checkbox.css +2 -0
- package/src/lightning/primitiveColorpickerButton/color-picker-button.slds.css +16 -38
- package/src/lightning/primitiveCustomCell/primitiveCustomCell.js +26 -1
- package/src/lightning/primitiveDatatableCell/primitiveDatatableCell.js +1 -1
- package/src/lightning/primitiveHeaderActions/primitiveHeaderActions.html +1 -1
- package/src/lightning/primitiveHeaderActions/primitiveHeaderActions.js +13 -0
- package/src/lightning/primitiveHeaderFactory/nonsortableHeader.css +1 -0
- package/src/lightning/primitiveHeaderFactory/nonsortableHeader.html +19 -6
- package/src/lightning/primitiveHeaderFactory/selectableHeader.css +2 -0
- package/src/lightning/primitiveHeaderFactory/sortableHeader.html +3 -1
- package/src/lightning/primitiveIcon/icon.slds.css +12 -25
- package/src/lightning/primitiveIcon/primitiveIcon.js-meta.xml +6 -0
- package/src/lightning/primitiveIframe/primitiveIframe.js +3 -1
- package/src/lightning/primitiveInputCheckbox/form-element.slds.css +54 -54
- package/src/lightning/primitiveInputCheckbox/primitiveInputCheckbox.js +5 -2
- package/src/lightning/primitiveInputCheckbox/primitiveInputCheckbox.js-meta.xml +6 -0
- package/src/lightning/primitiveInputCheckboxButton/form-element.slds.css +54 -54
- package/src/lightning/primitiveInputCheckboxButton/input-checkbox-button.slds.css +6 -4
- package/src/lightning/primitiveInputCheckboxButton/primitiveInputCheckboxButton.js +5 -2
- package/src/lightning/primitiveInputCheckboxButton/primitiveInputCheckboxButton.js-meta.xml +6 -0
- package/src/lightning/primitiveInputColor/form-element.slds.css +54 -54
- package/src/lightning/primitiveInputColor/input-color.slds.css +2 -3
- package/src/lightning/primitiveInputColor/input-text.slds.css +41 -68
- package/src/lightning/primitiveInputColor/primitiveInputColor.js +5 -2
- package/src/lightning/primitiveInputColor/primitiveInputColor.js-meta.xml +6 -0
- package/src/lightning/primitiveInputFile/button.slds.css +1 -1
- package/src/lightning/primitiveInputFile/form-element.slds.css +54 -54
- package/src/lightning/primitiveInputFile/input-file.slds.css +1 -4
- package/src/lightning/primitiveInputFile/primitiveInputFile.js +4 -2
- package/src/lightning/primitiveInputFile/primitiveInputFile.js-meta.xml +6 -0
- package/src/lightning/primitiveInputRadio/primitiveInputRadio.js +4 -2
- package/src/lightning/primitiveInputSimple/form-element.slds.css +54 -54
- package/src/lightning/primitiveInputSimple/input-text.slds.css +41 -68
- package/src/lightning/primitiveInputSimple/primitiveInputSimple.js-meta.xml +6 -0
- package/src/lightning/primitiveInputToggle/form-element.slds.css +54 -54
- package/src/lightning/primitiveInputToggle/input-toggle.slds.css +50 -27
- package/src/lightning/primitiveInputToggle/primitiveInputToggle.js +5 -2
- package/src/lightning/primitiveInputToggle/primitiveInputToggle.js-meta.xml +6 -0
- package/src/lightning/primitiveResizeHandler/primitiveResizeHandler.css +11 -0
- package/src/lightning/primitiveResizeHandler/primitiveResizeHandler.html +2 -1
- package/src/lightning/primitiveResizeHandler/primitiveResizeHandler.js +1 -0
- package/src/lightning/progressBar/progress-bar.slds.css +8 -10
- package/src/lightning/progressRing/progress-ring.slds.css +0 -23
- package/src/lightning/progressStep/base.html +5 -6
- package/src/lightning/progressStep/progressStep.js +15 -23
- package/src/lightning/prompt/__docs__/prompt.md +1 -1
- package/src/lightning/radioGroup/form-element.slds.css +54 -54
- package/src/lightning/radioGroup/radioGroup.html +1 -2
- package/src/lightning/radioGroup/radioGroup.js +1 -0
- package/src/lightning/routingService/routingService.js +31 -5
- package/src/lightning/select/form-element.slds.css +54 -54
- package/src/lightning/select/select.slds.css +4 -2
- package/src/lightning/shadowBaseClassPrivate/shadowBaseClassPrivate.js +0 -2
- package/src/lightning/sldsCommon/sldsCommon.css +134 -98
- package/src/lightning/sldsUtilsAlignment/sldsUtilsAlignment.css +1 -1
- package/src/lightning/sldsUtilsBox/sldsUtilsBox.css +14 -13
- package/src/lightning/sldsUtilsGrid/sldsUtilsGrid.css +95 -92
- package/src/lightning/sldsUtilsHyphenation/sldsUtilsHyphenation.css +1 -1
- package/src/lightning/sldsUtilsMargin/sldsUtilsMargin.css +77 -75
- package/src/lightning/sldsUtilsPadding/sldsUtilsPadding.css +73 -73
- package/src/lightning/sldsUtilsSizing/sldsUtilsSizing.css +552 -558
- package/src/lightning/sldsUtilsVisibility/sldsUtilsVisibility.css +5 -1
- package/src/lightning/spinner/spinner.slds.css +62 -62
- package/src/lightning/staticMap/staticMap.js +3 -2
- package/src/lightning/tab/tab.js +10 -5
- package/src/lightning/tab/tab.js-meta.xml +3 -0
- package/src/lightning/tab/tab.slds.css +14 -7
- package/src/lightning/tabBar/tab-bar.slds.css +16 -6
- package/src/lightning/tabBar/tabBar.js +10 -5
- package/src/lightning/tabset/__docs__/tabset.md +24 -1
- package/src/lightning/tabset/tabset.html +2 -0
- package/src/lightning/tabset/tabset.js +25 -38
- package/src/lightning/tabset/tabset.js-meta.xml +3 -0
- package/src/lightning/tabset/tabset.slds.css +0 -2
- package/src/lightning/textarea/form-element.slds.css +54 -54
- package/src/lightning/textarea/textarea.js +11 -2
- package/src/lightning/textarea/textarea.slds.css +22 -9
- package/src/lightning/timepicker/form-element.slds.css +54 -54
- package/src/lightning/timepicker/timepicker.js-meta.xml +6 -0
- package/src/lightning/timepicker/timepicker.slds.css +2 -2
- package/src/lightning/toast/__docs__/toast.md +20 -22
- package/src/lightning/toast/button-icon.slds.css +1 -1
- package/src/lightning/toast/icon.slds.css +12 -25
- package/src/lightning/toast/toast.js +15 -12
- package/src/lightning/toast/toast.slds.css +6 -18
- package/src/lightning/toastContainer/__docs__/toastContainer.md +3 -2
- package/src/lightning/toastContainer/toast.slds.css +6 -18
- package/src/lightning/toastContainer/toastContainer.js +25 -17
- package/src/lightning/tooltipLibrary/tooltipLibrary.js +36 -24
- package/src/lightning/tree/tree.js +2 -0
- package/src/lightning/utils/classSet.js +9 -3
- package/src/lightning/utilsPrivate/formatUtils.js +158 -0
- package/src/lightning/utilsPrivate/textUtils.js +16 -0
- package/src/lightning/utilsPrivate/utilsPrivate.js +56 -15
- package/src/lightning/utilsPrivate/validationUtils.js +59 -0
- package/src/lightning/verticalNavigation/vertical-navigation.slds.css +14 -0
- package/src/lightning/verticalNavigation/verticalNavigation.css +1 -1
- package/src/lightning/verticalNavigation/verticalNavigation.html +1 -1
- package/src/lightning/verticalNavigation/verticalNavigation.js +66 -28
- package/src/lightning/verticalNavigation/verticalNavigation.js-meta.xml +3 -0
- package/src/lightning/verticalNavigationItem/vertical-navigation-item.slds.css +63 -0
- package/src/lightning/verticalNavigationItem/verticalNavigationItem.css +2 -3
- package/src/lightning/verticalNavigationItem/verticalNavigationItem.js +29 -15
- package/src/lightning/verticalNavigationItem/verticalNavigationItem.js-meta.xml +3 -0
- package/src/lightning/verticalNavigationItem/verticalNavigationItem.lbc.native.css +2 -0
- package/src/lightning/verticalNavigationItem/verticalNavigationItem.lbc.synthetic.css +3 -0
- package/src/lightning/verticalNavigationItemBadge/badge.slds.css +76 -0
- package/src/lightning/verticalNavigationItemBadge/vertical-navigation-item.slds.css +63 -0
- package/src/lightning/verticalNavigationItemBadge/verticalNavigationItemBadge.css +2 -3
- package/src/lightning/verticalNavigationItemBadge/verticalNavigationItemBadge.html +1 -1
- package/src/lightning/verticalNavigationItemBadge/verticalNavigationItemBadge.js +28 -15
- package/src/lightning/verticalNavigationItemBadge/verticalNavigationItemBadge.js-meta.xml +3 -0
- package/src/lightning/verticalNavigationItemBadge/verticalNavigationItemBadge.lbc.native.css +5 -0
- package/src/lightning/verticalNavigationItemBadge/verticalNavigationItemBadge.lbc.synthetic.css +3 -0
- package/src/lightning/verticalNavigationItemIcon/vertical-navigation-item.slds.css +63 -0
- package/src/lightning/verticalNavigationItemIcon/verticalNavigationItemIcon.css +2 -3
- package/src/lightning/verticalNavigationItemIcon/verticalNavigationItemIcon.js +29 -15
- package/src/lightning/verticalNavigationItemIcon/verticalNavigationItemIcon.js-meta.xml +3 -0
- package/src/lightning/verticalNavigationItemIcon/verticalNavigationItemIcon.lbc.native.css +3 -0
- package/src/lightning/verticalNavigationItemIcon/verticalNavigationItemIcon.lbc.synthetic.css +3 -0
- package/src/lightning/verticalNavigationOverflow/button.slds.css +503 -0
- package/src/lightning/verticalNavigationOverflow/vertical-navigation-item.slds.css +63 -0
- package/src/lightning/verticalNavigationOverflow/vertical-navigation-section.slds.css +17 -0
- package/src/lightning/verticalNavigationOverflow/verticalNavigationOverflow.css +2 -1
- package/src/lightning/verticalNavigationOverflow/verticalNavigationOverflow.html +2 -0
- package/src/lightning/verticalNavigationOverflow/verticalNavigationOverflow.js +18 -13
- package/src/lightning/verticalNavigationOverflow/verticalNavigationOverflow.js-meta.xml +3 -0
- package/src/lightning/verticalNavigationOverflow/verticalNavigationOverflow.lbc.native.css +5 -0
- package/src/lightning/verticalNavigationSection/vertical-navigation-section.slds.css +13 -15
- package/src/lightning/verticalNavigationSection/verticalNavigationSection.js-meta.xml +3 -0
- package/src/lightning/datatable/__examples__/customDatatableWrapper/customDatatableWrapper.js +0 -158
- package/src/lightning/datatable/__examples__/customDatatypeDeleteRowBtn/customDatatypeDeleteRowBtn.html +0 -6
- package/src/lightning/datatable/__examples__/customDatatypeLink/customDatatypeLink.html +0 -9
- package/src/lightning/datatable/__examples__/customDatatypeRowOrderingBtn/customDatatypeRowOrderingBtn.js +0 -40
- package/src/lightning/datatable/__examples__/customDatatypeTable/customNumber.html +0 -3
- package/src/lightning/datatable/inlineEditShared.js +0 -26
- package/src/lightning/datatable/resizeSensor.js +0 -244
- package/src/lightning/formattedRichText/linkify.js +0 -43
- package/src/lightning/utilsPrivate/smartSetAttribute.js +0 -19
- /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatableWrapper/customDatatableWrapper.html +0 -0
- /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeLink/customDatatypeLink.js +0 -0
- /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeNumber/customDatatypeNumber.html +0 -0
- /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeNumber/customDatatypeNumber.js +0 -0
- /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeTable/customDatatypeTable.js +0 -0
- /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeTable/customLink.html +0 -0
- /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeTable/customName.html +0 -0
- /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeTable/orderingButtons.html +0 -0
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { LightningElement, api, track } from 'lwc';
|
|
2
2
|
import { dateTimeFormat } from 'lightning/internationalizationLibrary';
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import {
|
|
4
|
+
normalizeBoolean,
|
|
5
|
+
toDateTimeFormatOptions,
|
|
6
|
+
toFormattedDate,
|
|
7
|
+
} from 'lightning/utilsPrivate';
|
|
5
8
|
|
|
6
9
|
/**
|
|
7
10
|
* Displays formatted date and time.
|
|
@@ -113,68 +116,10 @@ export default class LightningFormattedDateTime extends LightningElement {
|
|
|
113
116
|
}
|
|
114
117
|
|
|
115
118
|
get formattedValue() {
|
|
116
|
-
return this
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
computeFormattedValue() {
|
|
120
|
-
const { value } = this;
|
|
121
|
-
if (!this.isEmpty(value) && this.isValid(value)) {
|
|
122
|
-
const formatted = dateTimeFormat(this.getOptions()).format(value);
|
|
123
|
-
if (formatted) {
|
|
124
|
-
return formatted;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
this.printError(value);
|
|
128
|
-
return '';
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
isEmpty(value) {
|
|
132
|
-
return value === undefined || value === null || value === '';
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
isValid(value) {
|
|
136
|
-
return isFinite(value) || isValidISODateTimeString(value);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
printError(value) {
|
|
140
|
-
const errorMsg =
|
|
141
|
-
`<lightning-formatted-date-time> The value attribute accepts either a Date object, a timestamp, or a valid ISO8601 formatted string ` +
|
|
142
|
-
`with timezone offset. but we are getting the ${typeof value} value "${value}" instead.`;
|
|
143
|
-
console.warn(errorMsg); // eslint-disable-line no-console
|
|
119
|
+
return toFormattedDate(this, dateTimeFormat);
|
|
144
120
|
}
|
|
145
121
|
|
|
146
122
|
getOptions() {
|
|
147
|
-
|
|
148
|
-
weekday: this.weekday,
|
|
149
|
-
era: this.era,
|
|
150
|
-
year: this.year,
|
|
151
|
-
month: this.month,
|
|
152
|
-
day: this.day,
|
|
153
|
-
hour: this.hour,
|
|
154
|
-
minute: this.minute,
|
|
155
|
-
second: this.second,
|
|
156
|
-
timeZoneName: this.timeZoneName,
|
|
157
|
-
timeZone: this.timeZone,
|
|
158
|
-
};
|
|
159
|
-
// If hour12 is set, then we use it, otherwise locale defaults will be used
|
|
160
|
-
if (this._hour12Set) {
|
|
161
|
-
options.hour12 = this.hour12;
|
|
162
|
-
}
|
|
163
|
-
// TODO: W-7787708: Remove hourCycle workaround below when possible.
|
|
164
|
-
// W-7583911: Temporarily works around an hourCycle spec bug that only Chrome has
|
|
165
|
-
// implemented causing the default hourCycle to be 'h24' rather than 'h23' when hour12 is
|
|
166
|
-
// false in 12-hour locales. Chrome ends up displaying times like '24:45'. Spec bug fix PR:
|
|
167
|
-
// https://github.com/tc39/ecma402/pull/436/files
|
|
168
|
-
//
|
|
169
|
-
// IE11 is excluded due to missing support for hourCycle:
|
|
170
|
-
// https://caniuse.com/#feat=mdn-javascript_builtins_intl_datetimeformat_datetimeformat_hourcycle
|
|
171
|
-
//
|
|
172
|
-
// Detecting IE11 is more stable than detecting Chrome at this point due to possible false
|
|
173
|
-
// positives as browser vendors such as Opera and Microsoft adopt Chrome.
|
|
174
|
-
if (options.hour12 === false && !isIE11) {
|
|
175
|
-
options.hourCycle = 'h23';
|
|
176
|
-
delete options.hour12;
|
|
177
|
-
}
|
|
178
|
-
return options;
|
|
123
|
+
return toDateTimeFormatOptions(this);
|
|
179
124
|
}
|
|
180
125
|
}
|
|
@@ -1,19 +1,5 @@
|
|
|
1
1
|
import { LightningElement, api } from 'lwc';
|
|
2
|
-
|
|
3
|
-
const MAX_LONGITUDE = 180.0;
|
|
4
|
-
const MAX_LATITUDE = 90.0;
|
|
5
|
-
|
|
6
|
-
function isNumber(value) {
|
|
7
|
-
return value !== '' && value !== null && isFinite(value);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
function isLongitude(longitude) {
|
|
11
|
-
return isNumber(longitude) && Math.abs(longitude) <= MAX_LONGITUDE;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
function isLatitude(latitude) {
|
|
15
|
-
return isNumber(latitude) && Math.abs(latitude) <= MAX_LATITUDE;
|
|
16
|
-
}
|
|
2
|
+
import { toFormattedLocation } from 'lightning/utilsPrivate';
|
|
17
3
|
|
|
18
4
|
/**
|
|
19
5
|
* Displays a geolocation in decimal degrees using the format [latitude, longitude].
|
|
@@ -33,15 +19,7 @@ export default class LightningFormattedLocation extends LightningElement {
|
|
|
33
19
|
*/
|
|
34
20
|
@api longitude;
|
|
35
21
|
|
|
36
|
-
get
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
if (!valid) {
|
|
40
|
-
// eslint-disable-next-line no-console
|
|
41
|
-
console.warn(
|
|
42
|
-
`<lightning-formatted-location> expects latitude in range [-90.0, 90.0], longitude in range [-180.0, 180.0].`
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
return valid;
|
|
22
|
+
get formattedLocation() {
|
|
23
|
+
return toFormattedLocation(this);
|
|
46
24
|
}
|
|
47
25
|
}
|
|
@@ -6,14 +6,12 @@
|
|
|
6
6
|
export class PrivateLookupItemPickedEvent extends CustomEvent {
|
|
7
7
|
static NAME = 'privatelookupitempicked';
|
|
8
8
|
|
|
9
|
-
constructor(
|
|
9
|
+
constructor(detail) {
|
|
10
10
|
super(PrivateLookupItemPickedEvent.NAME, {
|
|
11
11
|
composed: true,
|
|
12
12
|
cancelable: true,
|
|
13
13
|
bubbles: true,
|
|
14
|
-
detail: {
|
|
15
|
-
recordId,
|
|
16
|
-
},
|
|
14
|
+
detail: Object.assign({}, detail),
|
|
17
15
|
});
|
|
18
16
|
}
|
|
19
17
|
}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import locale from '@salesforce/i18n/locale';
|
|
2
|
-
import {
|
|
2
|
+
import { api, track } from 'lwc';
|
|
3
3
|
import { normalizeString as normalize } from 'lightning/utilsPrivate';
|
|
4
4
|
import { nameFormat } from 'lightning/internationalizationLibrary';
|
|
5
|
+
import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
|
|
5
6
|
|
|
6
7
|
const DEFAULT_FORMAT = 'long';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Displays a formatted name that can include a salutation and suffix.
|
|
10
11
|
*/
|
|
11
|
-
export default class LightningFormattedName extends
|
|
12
|
+
export default class LightningFormattedName extends LightningShadowBaseClass {
|
|
12
13
|
/**
|
|
13
14
|
* The format to use to display the name. Valid values include short, medium, and long. This value defaults to long.
|
|
14
15
|
* @type {string}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { api } from 'lwc';
|
|
2
|
+
import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
|
|
2
3
|
import { numberFormat } from 'lightning/internationalizationLibrary';
|
|
4
|
+
import { toFormattedNumber } from 'lightning/utilsPrivate';
|
|
3
5
|
|
|
4
6
|
/**
|
|
5
7
|
* Displays formatted numbers for decimals, currency, and percentages.
|
|
6
8
|
*/
|
|
7
|
-
export default class LightningFormattedNumber extends
|
|
9
|
+
export default class LightningFormattedNumber extends LightningShadowBaseClass {
|
|
8
10
|
/**
|
|
9
11
|
* The value to be formatted.
|
|
10
12
|
* @type {number}
|
|
@@ -71,55 +73,7 @@ export default class LightningFormattedNumber extends LightningElement {
|
|
|
71
73
|
@api maximumSignificantDigits;
|
|
72
74
|
|
|
73
75
|
get formattedNumber() {
|
|
74
|
-
|
|
75
|
-
const options = {
|
|
76
|
-
style: this.formatStyle,
|
|
77
|
-
currency: this.currencyCode,
|
|
78
|
-
currencyDisplay: this.currencyDisplayAs,
|
|
79
|
-
minimumIntegerDigits: this.minimumIntegerDigits,
|
|
80
|
-
minimumFractionDigits: this.minimumFractionDigits,
|
|
81
|
-
maximumFractionDigits: this.maximumFractionDigits,
|
|
82
|
-
minimumSignificantDigits: this.minimumSignificantDigits,
|
|
83
|
-
maximumSignificantDigits: this.maximumSignificantDigits,
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
const canReturnValue =
|
|
87
|
-
value !== undefined &&
|
|
88
|
-
value !== null &&
|
|
89
|
-
value !== '' &&
|
|
90
|
-
isFinite(value);
|
|
91
|
-
|
|
92
|
-
if (canReturnValue) {
|
|
93
|
-
const valueAsString = value.toString();
|
|
94
|
-
|
|
95
|
-
let valueToFormat = valueAsString;
|
|
96
|
-
|
|
97
|
-
// percent-fixed just divides the value by 100
|
|
98
|
-
// before passing to the library, this is to deal with the
|
|
99
|
-
// fact that percentages in salesforce are 0-100, not 0-1
|
|
100
|
-
if (this.formatStyle === 'percent-fixed') {
|
|
101
|
-
options.style = 'percent';
|
|
102
|
-
|
|
103
|
-
valueToFormat = parseFloat(value) / 100;
|
|
104
|
-
|
|
105
|
-
// If the number contains fraction digits and is not in an exponent format
|
|
106
|
-
if (
|
|
107
|
-
valueAsString.indexOf('.') > 0 &&
|
|
108
|
-
valueAsString.indexOf('e') < 0
|
|
109
|
-
) {
|
|
110
|
-
// Depending on the input number, division by 100 may lead to rounding errors
|
|
111
|
-
// (e.g 0.785 / 100 is 0.007850000000000001), so we need to round back
|
|
112
|
-
// to the correct precision, that is - existing number of fractional digits
|
|
113
|
-
// plus extra 2 for division by 100.
|
|
114
|
-
valueToFormat = valueToFormat.toFixed(
|
|
115
|
-
valueAsString.split('.')[1].length + 2
|
|
116
|
-
);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
return numberFormat(options).format(valueToFormat);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
return '';
|
|
76
|
+
return toFormattedNumber(this, numberFormat);
|
|
123
77
|
}
|
|
124
78
|
}
|
|
125
79
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { api } from 'lwc';
|
|
2
2
|
import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
|
|
3
3
|
import sanitizeHTML from 'lightning/purifyLib';
|
|
4
|
-
import { linkify } from './linkify';
|
|
5
4
|
import { richTextConfig } from './richTextConfig';
|
|
6
5
|
import { updateRawLinkInfo } from 'lightning/routingService';
|
|
7
6
|
import {
|
|
8
7
|
normalizeBoolean,
|
|
9
8
|
hasOnlyAllowedVideoIframes,
|
|
10
9
|
} from 'lightning/utilsPrivate';
|
|
10
|
+
import { linkTextNodes } from './linkTextNodes';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Displays rich text that's formatted with allowed tags and attributes.
|
|
@@ -122,10 +122,7 @@ export default class LightningFormattedRichText extends LightningShadowBaseClass
|
|
|
122
122
|
|
|
123
123
|
renderRichText() {
|
|
124
124
|
if (this.connected) {
|
|
125
|
-
const
|
|
126
|
-
const richText = this.disableLinkify
|
|
127
|
-
? sanitizeText
|
|
128
|
-
: linkify(sanitizeText);
|
|
125
|
+
const richText = this.sanitize(this.value);
|
|
129
126
|
const container = this.container;
|
|
130
127
|
|
|
131
128
|
if (this.clean) {
|
|
@@ -138,6 +135,9 @@ export default class LightningFormattedRichText extends LightningShadowBaseClass
|
|
|
138
135
|
}
|
|
139
136
|
container.appendChild(textNode);
|
|
140
137
|
}
|
|
138
|
+
if (!this.disableLinkify) {
|
|
139
|
+
linkTextNodes(container);
|
|
140
|
+
}
|
|
141
141
|
this.addLinkClickListeners();
|
|
142
142
|
}
|
|
143
143
|
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import {
|
|
2
|
+
urlRegexString,
|
|
3
|
+
emailRegexString,
|
|
4
|
+
createHttpHref,
|
|
5
|
+
createEmailHref,
|
|
6
|
+
} from 'lightning/utilsPrivate';
|
|
7
|
+
|
|
8
|
+
export function linkTextNodes(container) {
|
|
9
|
+
const urlRegex = new RegExp(`^${urlRegexString}/?$`, 'i');
|
|
10
|
+
const emailRegex = new RegExp(`^${emailRegexString}$`, 'i');
|
|
11
|
+
const toReplace = [];
|
|
12
|
+
const walker = document.createTreeWalker(container, NodeFilter.SHOW_TEXT);
|
|
13
|
+
while (walker.nextNode()) {
|
|
14
|
+
const currentNode = walker.currentNode;
|
|
15
|
+
const parent = walker.currentNode.parentNode;
|
|
16
|
+
if (parent.nodeName === 'A') {
|
|
17
|
+
// Do not add double a tags
|
|
18
|
+
continue;
|
|
19
|
+
}
|
|
20
|
+
// " = legacy supported edge case for docs
|
|
21
|
+
// ; = urls cannot have semicolons
|
|
22
|
+
// ["'] = common to quote links in docs
|
|
23
|
+
const items = walker.currentNode.nodeValue.split(
|
|
24
|
+
/("|;|["']?\s+["']?|["'])/g
|
|
25
|
+
);
|
|
26
|
+
const fragment = document.createDocumentFragment();
|
|
27
|
+
let hasLink = false;
|
|
28
|
+
items.forEach((text, i) => {
|
|
29
|
+
if (i % 2 === 0) {
|
|
30
|
+
if (text.match(urlRegex)) {
|
|
31
|
+
const a = document.createElement('a');
|
|
32
|
+
a.href = createHttpHref(text);
|
|
33
|
+
a.target = '_blank';
|
|
34
|
+
a.rel = 'noopener';
|
|
35
|
+
a.appendChild(document.createTextNode(text));
|
|
36
|
+
fragment.appendChild(a);
|
|
37
|
+
hasLink = true;
|
|
38
|
+
} else if (text.match(emailRegex)) {
|
|
39
|
+
const a = document.createElement('a');
|
|
40
|
+
a.href = createEmailHref(text);
|
|
41
|
+
a.appendChild(document.createTextNode(text));
|
|
42
|
+
fragment.appendChild(a);
|
|
43
|
+
hasLink = true;
|
|
44
|
+
} else if (text) {
|
|
45
|
+
fragment.appendChild(document.createTextNode(text));
|
|
46
|
+
}
|
|
47
|
+
} else if (text) {
|
|
48
|
+
fragment.appendChild(document.createTextNode(text));
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
if (hasLink) {
|
|
52
|
+
toReplace.push({ parent, fragment, currentNode });
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
toReplace.forEach(({ parent, fragment, currentNode }) => {
|
|
56
|
+
parent.replaceChild(fragment, currentNode);
|
|
57
|
+
});
|
|
58
|
+
}
|
|
@@ -25,21 +25,22 @@
|
|
|
25
25
|
* for any needed updates to keep these files in sync
|
|
26
26
|
*/
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
/* TODO: Swap with utility classes */
|
|
29
|
+
|
|
30
|
+
:host([data-render-mode="shadow"]) fieldset {
|
|
31
31
|
border: 0;
|
|
32
32
|
margin: 0;
|
|
33
33
|
padding: 0;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
/* FORM ELEMENT: BASE */
|
|
37
|
+
|
|
38
|
+
:host([data-render-mode="shadow"]) .slds-form-element {
|
|
38
39
|
position: relative;
|
|
39
40
|
min-width: 0;
|
|
40
41
|
}
|
|
41
42
|
|
|
42
|
-
|
|
43
|
+
:host([data-render-mode="shadow"]) .slds-form-element__label {
|
|
43
44
|
overflow-wrap: break-word;
|
|
44
45
|
word-wrap: break-word;
|
|
45
46
|
hyphens: auto;
|
|
@@ -51,20 +52,20 @@
|
|
|
51
52
|
margin-block-end: calc(var(--slds-g-spacing-1) / 2);
|
|
52
53
|
}
|
|
53
54
|
|
|
54
|
-
|
|
55
|
+
:host([data-render-mode="shadow"]) .slds-form-element__label:empty {
|
|
55
56
|
margin: 0;
|
|
56
57
|
}
|
|
57
58
|
|
|
58
|
-
|
|
59
|
+
:host([data-render-mode="shadow"]) .slds-form-element__control {
|
|
59
60
|
clear: left; /* NOTE: Ideally we want left to be inline-start but browser support is not ready for that value. We need to figure out better RTL support */
|
|
60
61
|
position: relative;
|
|
61
62
|
}
|
|
62
63
|
|
|
63
|
-
|
|
64
|
+
:host([data-render-mode="shadow"]) .slds-form-element__control .slds-radio {
|
|
64
65
|
display: block;
|
|
65
66
|
}
|
|
66
67
|
|
|
67
|
-
|
|
68
|
+
:host([data-render-mode="shadow"]) .slds-form-element__icon {
|
|
68
69
|
display: inline-block;
|
|
69
70
|
position: relative;
|
|
70
71
|
padding-block-start: var(--slds-g-spacing-1);
|
|
@@ -73,42 +74,42 @@
|
|
|
73
74
|
z-index: 1;
|
|
74
75
|
}
|
|
75
76
|
|
|
76
|
-
|
|
77
|
+
:host([data-render-mode="shadow"]) .slds-form-element__icon .slds-button_icon {
|
|
77
78
|
position: relative;
|
|
78
79
|
}
|
|
79
80
|
|
|
80
|
-
|
|
81
|
+
:host([data-render-mode="shadow"]) .slds-form-element__help,:host([data-render-mode="shadow"])
|
|
81
82
|
.slds-form-element__helper {
|
|
82
83
|
font-size: var(--slds-g-font-scale-neg-3);
|
|
83
84
|
margin-block-start: calc(var(--slds-g-spacing-1) / 2);
|
|
84
85
|
display: block;
|
|
85
86
|
}
|
|
86
87
|
|
|
87
|
-
|
|
88
|
+
:host([data-render-mode="shadow"]) .slds-form-element_edit .slds-form-element__static {
|
|
88
89
|
width: calc(100% - var(--slds-g-sizing-7));
|
|
89
90
|
}
|
|
90
91
|
|
|
91
|
-
|
|
92
|
+
:host([data-render-mode="shadow"]) .slds-form-element_readonly {
|
|
92
93
|
flex-basis: 0%;
|
|
93
94
|
border-bottom: var(--slds-g-sizing-border-1) solid var(--slds-g-color-border-1);
|
|
94
95
|
margin-block-end: 0;
|
|
95
96
|
}
|
|
96
97
|
|
|
97
|
-
|
|
98
|
+
:host([data-render-mode="shadow"]) .slds-form-element_readonly .slds-form-element__control {
|
|
98
99
|
padding-block-start: calc(var(--slds-g-spacing-1) / 2);
|
|
99
100
|
padding-block-end: calc(var(--slds-g-spacing-1) / 2);
|
|
100
101
|
}
|
|
101
102
|
|
|
102
|
-
|
|
103
|
+
:host([data-render-mode="shadow"]) .slds-form-element_readonly .slds-form-element__label {
|
|
103
104
|
margin-block-end: 0;
|
|
104
105
|
}
|
|
105
106
|
|
|
106
|
-
|
|
107
|
+
:host([data-render-mode="shadow"]) .slds-form-element__legend {
|
|
107
108
|
font-weight: var(--slds-g-font-weight-7);
|
|
108
109
|
float: left;
|
|
109
110
|
}
|
|
110
111
|
|
|
111
|
-
|
|
112
|
+
:host([data-render-mode="shadow"]) .slds-form-element__addon {
|
|
112
113
|
display: inline-block;
|
|
113
114
|
margin-block-start: 0;
|
|
114
115
|
margin-block-end: 0;
|
|
@@ -117,7 +118,7 @@
|
|
|
117
118
|
align-self: center;
|
|
118
119
|
}
|
|
119
120
|
|
|
120
|
-
|
|
121
|
+
:host([data-render-mode="shadow"]) .slds-form-element__static {
|
|
121
122
|
overflow-wrap: break-word;
|
|
122
123
|
word-wrap: break-word;
|
|
123
124
|
word-break: break-word;
|
|
@@ -128,20 +129,20 @@
|
|
|
128
129
|
width: 100%;
|
|
129
130
|
}
|
|
130
131
|
|
|
131
|
-
|
|
132
|
+
:host([data-render-mode="shadow"]) .slds-form-element__static.slds-text-longform *:last-child {
|
|
132
133
|
margin-block-end: 0;
|
|
133
134
|
}
|
|
134
135
|
|
|
135
|
-
|
|
136
|
+
:host([data-render-mode="shadow"]) .slds-form-element__static:empty {
|
|
136
137
|
min-height: calc(var(--slds-g-sizing-6) + 1px);
|
|
137
138
|
vertical-align: bottom;
|
|
138
139
|
}
|
|
139
140
|
|
|
140
|
-
|
|
141
|
+
:host([data-render-mode="shadow"]) .slds-form-element__static--edit {
|
|
141
142
|
width: calc(100% - var(--slds-g-sizing-7));
|
|
142
143
|
}
|
|
143
144
|
|
|
144
|
-
|
|
145
|
+
:host([data-render-mode="shadow"]) .slds-required {
|
|
145
146
|
color: var(--slds-g-color-error-base-50);
|
|
146
147
|
margin-block-start: 0;
|
|
147
148
|
margin-block-end: 0;
|
|
@@ -149,25 +150,25 @@
|
|
|
149
150
|
margin-inline-end: calc(var(--slds-g-spacing-1) / 2);
|
|
150
151
|
}
|
|
151
152
|
|
|
152
|
-
|
|
153
|
+
:host([data-render-mode="shadow"]) .slds-has-error .slds-form-element__help {
|
|
153
154
|
color: var(--slds-g-color-error-1);
|
|
154
155
|
}
|
|
155
156
|
|
|
156
|
-
|
|
157
|
+
:host([data-render-mode="shadow"][invalid]) .slds-form-element__help {
|
|
157
158
|
color: var(--slds-g-color-error-1);
|
|
158
159
|
}
|
|
159
160
|
|
|
160
|
-
|
|
161
|
+
/* --------------------------------------- */
|
|
161
162
|
|
|
162
|
-
|
|
163
|
+
/* FORM ELEMENT: STACKED */
|
|
163
164
|
|
|
164
|
-
|
|
165
|
+
:host([data-render-mode="shadow"][variant='label-stacked']) {
|
|
165
166
|
display: block;
|
|
166
167
|
}
|
|
167
168
|
|
|
168
|
-
|
|
169
|
+
/* TODO: Using `:not` is currently not working, and it could break the build because of issues with the dist script */
|
|
169
170
|
|
|
170
|
-
|
|
171
|
+
/* :host([variant='label-stacked']):not(.slds-form-element_readonly) {
|
|
171
172
|
margin-block-end: var(--slds-g-spacing-2);
|
|
172
173
|
}
|
|
173
174
|
|
|
@@ -175,54 +176,54 @@
|
|
|
175
176
|
padding: 0 var(--slds-g-spacing-1);
|
|
176
177
|
} */
|
|
177
178
|
|
|
178
|
-
|
|
179
|
+
/* :host([variant='label-stacked']):not([class*="slds-size"]) {
|
|
179
180
|
width: 100%;
|
|
180
181
|
flex-basis: 100%;
|
|
181
182
|
} */
|
|
182
183
|
|
|
183
|
-
|
|
184
|
+
:host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element {
|
|
184
185
|
padding: 0;
|
|
185
186
|
margin-block-end: 0;
|
|
186
187
|
}
|
|
187
188
|
|
|
188
|
-
|
|
189
|
+
:host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__label,:host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__control {
|
|
189
190
|
border-bottom: 0; /* Remove border when using legacy version of slds-form-element */
|
|
190
191
|
padding-inline-start: 0;
|
|
191
192
|
}
|
|
192
193
|
|
|
193
|
-
|
|
194
|
+
:host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__control {
|
|
194
195
|
width: 100%;
|
|
195
196
|
flex-basis: 100%;
|
|
196
197
|
clear: left;
|
|
197
198
|
}
|
|
198
199
|
|
|
199
|
-
|
|
200
|
+
:host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__icon {
|
|
200
201
|
float: none;
|
|
201
202
|
padding-block-start: var(--slds-g-spacing-1);
|
|
202
203
|
}
|
|
203
204
|
|
|
204
|
-
|
|
205
|
+
/* --------------------------------------- */
|
|
205
206
|
|
|
206
|
-
|
|
207
|
+
/* FORM ELEMENT: INLINE */
|
|
207
208
|
|
|
208
|
-
|
|
209
|
+
:host([data-render-mode="shadow"][variant='label-inline']) {
|
|
209
210
|
display: block;
|
|
210
211
|
}
|
|
211
212
|
|
|
212
|
-
|
|
213
|
+
/*
|
|
213
214
|
we have to combine with slds class here to avoid duplication
|
|
214
215
|
of this rule in child elements who import this stylesheet
|
|
215
216
|
in lighting-input this slds class is synonymous with the variant
|
|
216
217
|
*/
|
|
217
218
|
|
|
218
|
-
|
|
219
|
+
:host([data-render-mode="shadow"][variant='label-inline'].slds-form-element_horizontal) {
|
|
219
220
|
padding: var(--slds-g-spacing-1);
|
|
220
221
|
margin-block-end: var(--slds-g-spacing-2);
|
|
221
222
|
}
|
|
222
223
|
|
|
223
|
-
|
|
224
|
+
/* TODO: Using `:not` is currently not working, and it could break the build because of issues with the dist script */
|
|
224
225
|
|
|
225
|
-
|
|
226
|
+
/* :host([variant='label-inline']):not(.slds-form-element_readonly) {
|
|
226
227
|
margin-block-end: var(--slds-g-spacing-2);
|
|
227
228
|
}
|
|
228
229
|
|
|
@@ -235,11 +236,11 @@
|
|
|
235
236
|
padding: var(--slds-g-spacing-1);
|
|
236
237
|
} */
|
|
237
238
|
|
|
238
|
-
|
|
239
|
+
:host([data-render-mode="shadow"][variant='label-inline']).slds-is-edited {
|
|
239
240
|
padding-block-start: var(--slds-g-sizing-6)
|
|
240
241
|
}
|
|
241
242
|
|
|
242
|
-
|
|
243
|
+
@media (width >= 48em) {
|
|
243
244
|
:host([data-render-mode="shadow"][variant='label-inline']) .slds-form-element__label {
|
|
244
245
|
max-width: calc(33% - var(--slds-g-sizing-6)); /* Removing icon width for when the help-text icon is present */
|
|
245
246
|
flex-basis: calc(33% - var(--slds-g-sizing-6)); /* Some form element controls are set to display:flex */
|
|
@@ -281,35 +282,34 @@
|
|
|
281
282
|
}
|
|
282
283
|
}
|
|
283
284
|
|
|
284
|
-
|
|
285
|
+
/* --------------------------------------- */
|
|
285
286
|
|
|
286
|
-
|
|
287
|
+
/* FORM ELEMENT: COMPOUND */
|
|
287
288
|
|
|
288
|
-
|
|
289
|
+
:host([data-render-mode="shadow"]) .slds-form-element_compound .slds-form-element__row {
|
|
289
290
|
display: flex;
|
|
290
291
|
margin-bottom: var(--slds-g-spacing-1);
|
|
291
292
|
margin-left: calc(var(--slds-g-spacing-1) * -1);
|
|
292
293
|
margin-right: calc(var(--slds-g-spacing-1) * -1);
|
|
293
294
|
}
|
|
294
295
|
|
|
295
|
-
|
|
296
|
+
:host([data-render-mode="shadow"]) .slds-form-element_compound .slds-form-element__row .slds-form-element__label {
|
|
296
297
|
padding-top: 0;
|
|
297
298
|
}
|
|
298
299
|
|
|
299
|
-
|
|
300
|
+
:host([data-render-mode="shadow"]) .slds-form-element_compound .slds-form-element {
|
|
300
301
|
padding-left: var(--slds-g-spacing-1);
|
|
301
302
|
padding-right: var(--slds-g-spacing-1);
|
|
302
303
|
}
|
|
303
304
|
|
|
304
|
-
|
|
305
|
+
:host([data-render-mode="shadow"]) .slds-form-element_address .slds-form-element__row {
|
|
305
306
|
align-items: flex-end;
|
|
306
307
|
}
|
|
307
308
|
|
|
308
|
-
|
|
309
|
+
/* --------------------------------------- */
|
|
309
310
|
|
|
310
|
-
|
|
311
|
+
/* FORM ELEMENT: HIDDEN */
|
|
311
312
|
|
|
312
|
-
|
|
313
|
+
:host([data-render-mode="shadow"][variant='label-hidden']) .slds-form-element__label {
|
|
313
314
|
display: none
|
|
314
315
|
}
|
|
315
|
-
}
|