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,6 +1,7 @@
|
|
|
1
1
|
/* eslint-disable @lwc/lwc/no-api-reassignments */
|
|
2
2
|
|
|
3
3
|
import lang from '@salesforce/i18n/lang';
|
|
4
|
+
import labelRequired from '@salesforce/label/LightningControl.required';
|
|
4
5
|
import { api, track } from 'lwc';
|
|
5
6
|
import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
|
|
6
7
|
import { toHighlightParts } from './highlight';
|
|
@@ -14,6 +15,7 @@ import {
|
|
|
14
15
|
} from 'lightning/messageDispatcher';
|
|
15
16
|
import { normalizeBoolean, synchronizeAttrs } from 'lightning/utilsPrivate';
|
|
16
17
|
import { buildMapSourceUrl } from 'lightning/mapUtils';
|
|
18
|
+
import { isCSR } from 'lightning/utilsPrivate';
|
|
17
19
|
import { INTERNAL_GOOGLE_LOGO, POWERED_BY_GOOGLE } from './googleLogo';
|
|
18
20
|
import { getLocation } from './location';
|
|
19
21
|
|
|
@@ -29,10 +31,17 @@ const EVENT_NAME = {
|
|
|
29
31
|
PLACE_API_READY: 'place-api-ready',
|
|
30
32
|
};
|
|
31
33
|
|
|
34
|
+
const i18n = {
|
|
35
|
+
required: labelRequired,
|
|
36
|
+
};
|
|
37
|
+
|
|
32
38
|
export default class LightningLookupAddress extends LightningShadowBaseClass {
|
|
33
39
|
@api label;
|
|
34
40
|
@api inputText = '';
|
|
35
41
|
@api placeholder;
|
|
42
|
+
@api name;
|
|
43
|
+
@api autocomplete;
|
|
44
|
+
@api required;
|
|
36
45
|
|
|
37
46
|
@track _inputIconName = 'utility:search';
|
|
38
47
|
@track _items;
|
|
@@ -55,9 +64,11 @@ export default class LightningLookupAddress extends LightningShadowBaseClass {
|
|
|
55
64
|
connectedCallback() {
|
|
56
65
|
super.connectedCallback();
|
|
57
66
|
this._items = [];
|
|
58
|
-
this._dispatchId =
|
|
59
|
-
|
|
60
|
-
|
|
67
|
+
this._dispatchId = isCSR
|
|
68
|
+
? registerMessageHandler((event) => {
|
|
69
|
+
this.handleMessage(event);
|
|
70
|
+
})
|
|
71
|
+
: null;
|
|
61
72
|
this._debouncedTextInput = debounce((text) => {
|
|
62
73
|
this._requestSuggestions(text);
|
|
63
74
|
}, DEBOUNCE_PERIOD);
|
|
@@ -69,6 +80,19 @@ export default class LightningLookupAddress extends LightningShadowBaseClass {
|
|
|
69
80
|
}
|
|
70
81
|
}
|
|
71
82
|
|
|
83
|
+
get isLoaded() {
|
|
84
|
+
return this.alwaysRender || this._isLoaded;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
@api
|
|
88
|
+
get alwaysRender() {
|
|
89
|
+
return this._alwaysRender || false;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
set alwaysRender(value) {
|
|
93
|
+
this._alwaysRender = normalizeBoolean(value);
|
|
94
|
+
}
|
|
95
|
+
|
|
72
96
|
@api
|
|
73
97
|
get variant() {
|
|
74
98
|
return this._variant || VARIANT.STANDARD;
|
|
@@ -91,6 +115,10 @@ export default class LightningLookupAddress extends LightningShadowBaseClass {
|
|
|
91
115
|
}
|
|
92
116
|
}
|
|
93
117
|
|
|
118
|
+
get i18n() {
|
|
119
|
+
return i18n;
|
|
120
|
+
}
|
|
121
|
+
|
|
94
122
|
get isLabelHidden() {
|
|
95
123
|
return this.variant === VARIANT.LABEL_HIDDEN;
|
|
96
124
|
}
|
|
@@ -204,12 +232,14 @@ export default class LightningLookupAddress extends LightningShadowBaseClass {
|
|
|
204
232
|
}
|
|
205
233
|
|
|
206
234
|
dispatchChangeEvent(address) {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
235
|
+
if (isCSR) {
|
|
236
|
+
this.dispatchEvent(
|
|
237
|
+
new CustomEvent('change', {
|
|
238
|
+
detail: {
|
|
239
|
+
address,
|
|
240
|
+
},
|
|
241
|
+
})
|
|
242
|
+
);
|
|
243
|
+
}
|
|
214
244
|
}
|
|
215
245
|
}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
/* Copyright (c) 2015-present, Salesforce, Inc. All rights reserved
|
|
3
3
|
Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
4
4
|
|
|
5
|
-
@supports (--styling-hooks: '') {
|
|
6
5
|
:host([data-render-mode="shadow"]) .slds-has-divider_top {
|
|
7
6
|
border-top: var(--slds-g-sizing-border-1) solid var(--slds-g-color-border-1);
|
|
8
7
|
}
|
|
@@ -12,4 +11,3 @@
|
|
|
12
11
|
margin-top: var(--slds-g-spacing-2);
|
|
13
12
|
padding-top: var(--slds-g-spacing-2);
|
|
14
13
|
}
|
|
15
|
-
}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
/* Copyright (c) 2015-present, Salesforce, Inc. All rights reserved
|
|
3
3
|
Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
4
4
|
|
|
5
|
-
@supports (--styling-hooks: '') {
|
|
6
5
|
/**
|
|
7
6
|
* Note: .slds-dropdown__item class used to be on the host element. Moved to
|
|
8
7
|
* new containing element to prevent duplicate styles in mixed-mode.
|
|
@@ -11,6 +10,7 @@
|
|
|
11
10
|
/**
|
|
12
11
|
* Menu Item
|
|
13
12
|
*/
|
|
13
|
+
|
|
14
14
|
:host([data-render-mode="shadow"]) a {
|
|
15
15
|
display: flex;
|
|
16
16
|
justify-content: space-between;
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
/* TODO: bring in PostCSS fix and see if it fixes output CSS */
|
|
50
|
+
|
|
50
51
|
:host([data-render-mode="shadow"]) a[aria-disabled='true']:hover,:host([data-render-mode="shadow"])
|
|
51
52
|
a:host([data-render-mode="shadow"]) [aria-disabled='true']:focus {
|
|
52
53
|
background-color: transparent;
|
|
@@ -59,6 +60,7 @@
|
|
|
59
60
|
* "a" and "span" is intended, add prefix and suffix icons to see the
|
|
60
61
|
* generated markup and it'll make sense.
|
|
61
62
|
*/
|
|
63
|
+
|
|
62
64
|
:host([data-render-mode="shadow"]) .slds-truncate {
|
|
63
65
|
display: flex;
|
|
64
66
|
justify-content: space-between;
|
|
@@ -71,6 +73,7 @@
|
|
|
71
73
|
*
|
|
72
74
|
* @TODO: currently not supported by LBC
|
|
73
75
|
*/
|
|
76
|
+
|
|
74
77
|
:host([data-render-mode="shadow"].slds-has-error) a {
|
|
75
78
|
background: var(--slds-g-color-error-container-1);
|
|
76
79
|
}
|
|
@@ -80,6 +83,7 @@
|
|
|
80
83
|
*
|
|
81
84
|
* @TODO: currently not supported by LBC
|
|
82
85
|
*/
|
|
86
|
+
|
|
83
87
|
:host([data-render-mode="shadow"].slds-has-success) a {
|
|
84
88
|
background: var(--slds-g-color-success-container-1);
|
|
85
89
|
}
|
|
@@ -93,6 +97,7 @@
|
|
|
93
97
|
*
|
|
94
98
|
* @TODO: currently not supported by LBC
|
|
95
99
|
*/
|
|
100
|
+
|
|
96
101
|
:host([data-render-mode="shadow"].slds-has-warning) a {
|
|
97
102
|
background: var(--slds-g-color-warning-container-1);
|
|
98
103
|
}
|
|
@@ -115,6 +120,7 @@
|
|
|
115
120
|
* We scope to aria-checked so we don't accidentally toggle prefix icons
|
|
116
121
|
* which are a separate API.
|
|
117
122
|
*/
|
|
123
|
+
|
|
118
124
|
:host([data-render-mode="shadow"]) [aria-checked='false'] lightning-primitive-icon::part(icon) {
|
|
119
125
|
opacity: 0;
|
|
120
126
|
}
|
|
@@ -128,6 +134,7 @@
|
|
|
128
134
|
*
|
|
129
135
|
* @TODO: Look into viability of refactoring into utility
|
|
130
136
|
*/
|
|
137
|
+
|
|
131
138
|
:host([data-render-mode="shadow"]) .slds-indicator_unsaved,:host([data-render-mode="shadow"])
|
|
132
139
|
.slds-indicator--unsaved {
|
|
133
140
|
color: var(--slds-g-color-accent-2);
|
|
@@ -137,4 +144,3 @@
|
|
|
137
144
|
/* Unsaved indicator does not have gap spacing, everything else does */
|
|
138
145
|
margin-inline-end: calc(var(--slds-g-spacing-2) * -1);
|
|
139
146
|
}
|
|
140
|
-
}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
/* Copyright (c) 2015-present, Salesforce, Inc. All rights reserved
|
|
3
3
|
Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
4
4
|
|
|
5
|
-
@supports (--styling-hooks: '') {
|
|
6
5
|
:host([data-render-mode="shadow"]) .slds-dropdown__header {
|
|
7
6
|
font-size: var(--slds-g-font-scale-neg-1);
|
|
8
7
|
font-weight: var(--slds-g-font-weight-7);
|
|
@@ -13,10 +12,10 @@
|
|
|
13
12
|
/**
|
|
14
13
|
* @TODO: refactor when utility is available
|
|
15
14
|
*/
|
|
15
|
+
|
|
16
16
|
:host([data-render-mode="shadow"]) .slds-truncate {
|
|
17
17
|
max-width: 100%;
|
|
18
18
|
overflow: hidden;
|
|
19
19
|
text-overflow: ellipsis;
|
|
20
20
|
white-space: nowrap;
|
|
21
21
|
}
|
|
22
|
-
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
The `lightning/modal` module provides the `LightningModal` component to create a modal window on top of the current app window. A modal interrupts a user’s workflow.
|
|
2
2
|
|
|
3
3
|
`LightningModal` implements the SLDS [modals](https://www.lightningdesignsystem.com/components/modals/) blueprint.
|
|
4
4
|
|
|
@@ -628,6 +628,15 @@ Customizing the styling on the white modal frame and background, close button, o
|
|
|
628
628
|
|
|
629
629
|
#### Accessibility
|
|
630
630
|
|
|
631
|
+
Upon opening, the modal determines where to place focus as follows.
|
|
632
|
+
|
|
633
|
+
* When the modal header is present, the modal component places the focus on the title text in the header.
|
|
634
|
+
* When a modal header isn’t present, the modal component places the focus on the first interactive element in the modal body, such as a link, button, or input field.
|
|
635
|
+
* When the modal body doesn’t have interactive elements, or the only interactive element is a tooltip, the modal component places focus on the close button.
|
|
636
|
+
|
|
637
|
+
The focus is determined according to
|
|
638
|
+
the [Global Focus Guidelines](https://www.lightningdesignsystem.com/accessibility/guidelines/global-focus/#dialogs) for Lightning Design System.
|
|
639
|
+
|
|
631
640
|
The `lightning-modal-header` component renders the `label` value in an `<h1>` element. If your modal uses the header, begin any additional heading levels in the modal with `<h2>` for accessibility. Provide accessible structure by using heading levels up to `<h6>` appropriately. For more information, see [Semantic Structure, Headings on WebAim.org](https://webaim.org/techniques/semanticstructure/#headings).
|
|
632
641
|
|
|
633
642
|
To include tagline text or link content for the header section, add it between the `<lightning-modal-header>` tags.
|
|
@@ -54,10 +54,8 @@ const MODAL_FOOTER = 'lightning-modal-footer';
|
|
|
54
54
|
// inner modal specific details ===========================
|
|
55
55
|
|
|
56
56
|
// close button variants
|
|
57
|
-
const
|
|
58
|
-
const MODAL_CLOSE_BUTTON_NORMAL_VARIANT = 'bare-inverse';
|
|
57
|
+
const MODAL_CLOSE_BUTTON_VARIANT = 'bare';
|
|
59
58
|
const MODAL_CLOSE_BTN_CLASS = 'slds-modal__close';
|
|
60
|
-
const MODAL_CLOSE_BTN_SELECTOR = `.${MODAL_CLOSE_BTN_CLASS}`;
|
|
61
59
|
const MODAL_CLOSE_BTN_FULL_CLASS = 'slds-modal_full-close-button';
|
|
62
60
|
// modal screen size testing
|
|
63
61
|
// utilized by full screen modal tests
|
|
@@ -160,7 +158,7 @@ const NAME_TO_SIZE = {
|
|
|
160
158
|
// suites for modal utilize this map
|
|
161
159
|
const SPEC_TO_TABS_TO_CLOSE_BTN = {
|
|
162
160
|
accessibility: {
|
|
163
|
-
footless:
|
|
161
|
+
footless: 1,
|
|
164
162
|
headless: -3,
|
|
165
163
|
},
|
|
166
164
|
};
|
|
@@ -249,11 +247,9 @@ module.exports = {
|
|
|
249
247
|
FOCUS_TRAP,
|
|
250
248
|
MODAL_CLOSE_BTN,
|
|
251
249
|
MODAL_CLOSE_BTN_CLASS,
|
|
252
|
-
MODAL_CLOSE_BTN_SELECTOR,
|
|
253
250
|
MODAL_CLOSE_BTN_FULL_CLASS,
|
|
254
251
|
MODAL_DATA_SELECTOR,
|
|
255
|
-
|
|
256
|
-
MODAL_CLOSE_BUTTON_NORMAL_VARIANT,
|
|
252
|
+
MODAL_CLOSE_BUTTON_VARIANT,
|
|
257
253
|
SCREEN_SIZE_SMALL,
|
|
258
254
|
SCREEN_SIZE_SMALL_MID,
|
|
259
255
|
SCREEN_SIZE_MEDIUM,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* is in scope: $, $$, browser, element
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
const {
|
|
7
7
|
OVERLAY_CONTAINER,
|
|
8
8
|
MODAL_BASE,
|
|
9
9
|
MODAL,
|
|
@@ -19,8 +19,7 @@ import {
|
|
|
19
19
|
MODAL_CLOSE_BTN,
|
|
20
20
|
MODAL_CLOSE_BTN_CLASS,
|
|
21
21
|
MODAL_CLOSE_BTN_FULL_CLASS,
|
|
22
|
-
|
|
23
|
-
MODAL_CLOSE_BUTTON_NORMAL_VARIANT,
|
|
22
|
+
MODAL_CLOSE_BUTTON_VARIANT,
|
|
24
23
|
SCREEN_SIZE_LARGE,
|
|
25
24
|
MODAL_SIZE_FULL,
|
|
26
25
|
MODAL_FULL_SCREEN_SMALL_BREAKPOINT,
|
|
@@ -41,7 +40,7 @@ import {
|
|
|
41
40
|
KEY,
|
|
42
41
|
MODAL_DESCRIPTION_SELECTOR,
|
|
43
42
|
MODAL_ARIALIVE_SELECTOR,
|
|
44
|
-
}
|
|
43
|
+
} = require('./modalContainerTestConstants.js');
|
|
45
44
|
|
|
46
45
|
let wrapper = null;
|
|
47
46
|
|
|
@@ -143,7 +142,6 @@ async function getModalInternals(config, modalIndex = 0) {
|
|
|
143
142
|
// get focus trap element
|
|
144
143
|
focusTrapElem = await modalBaseElem.shadow$(FOCUS_TRAP);
|
|
145
144
|
focusTrapSlotElem = await focusTrapElem.shadow$('slot');
|
|
146
|
-
|
|
147
145
|
// get modal's <section> element just inside focus trap
|
|
148
146
|
// eslint-disable-next-line
|
|
149
147
|
modalSectionElem = await browser.custom$(
|
|
@@ -160,9 +158,6 @@ async function getModalInternals(config, modalIndex = 0) {
|
|
|
160
158
|
MODAL_ARIALIVE_SELECTOR
|
|
161
159
|
);
|
|
162
160
|
|
|
163
|
-
// get modal close button
|
|
164
|
-
modalCloseButton = await modalSectionElem.$(MODAL_CLOSE_BTN);
|
|
165
|
-
|
|
166
161
|
// get modal div slot (not an actual slot)
|
|
167
162
|
modalDataSlot = await modalSectionElem.$(MODAL_DIV_SLOT);
|
|
168
163
|
// get div[data-container].slds-modal__container
|
|
@@ -170,22 +165,28 @@ async function getModalInternals(config, modalIndex = 0) {
|
|
|
170
165
|
// get lightning-modal element
|
|
171
166
|
modalElem = await modalSectionElem.$(MODAL);
|
|
172
167
|
|
|
173
|
-
// skip looking for modalHeader when type of modal is 'headless'
|
|
174
|
-
if (!isModalOfVariantType(modalVariantType, 'headless')) {
|
|
175
|
-
// get lightning-modal-header, it doesn't always exist
|
|
176
|
-
modalHeaderElem = await modalElem.shadow$(MODAL_HEADER);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
168
|
// get lightning-modal-body, it doesn't always exist
|
|
180
169
|
// but in our examples it's always present
|
|
181
170
|
modalBodyElem = await modalElem.shadow$(MODAL_BODY);
|
|
171
|
+
|
|
172
|
+
// Headless modal variant has the close button inside modalBase
|
|
173
|
+
if (isModalOfVariantType(modalVariantType, 'headless')) {
|
|
174
|
+
// get modal close button
|
|
175
|
+
modalCloseButton = await modalSectionElem.$(MODAL_CLOSE_BTN);
|
|
176
|
+
} else {
|
|
177
|
+
// get lightning-modal-header and modal close lightning-button
|
|
178
|
+
modalHeaderElem = await modalElem.shadow$(MODAL_HEADER);
|
|
179
|
+
modalCloseButton = await modalHeaderElem.shadow$(MODAL_CLOSE_BTN);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
182
|
// skip looking for modalHeader when type of modal is 'footless'
|
|
183
183
|
if (!isModalOfVariantType(modalVariantType, 'footless')) {
|
|
184
184
|
// get lightning-modal-footer, it doesn't always exist
|
|
185
185
|
modalFooterElem = await modalElem.shadow$(MODAL_FOOTER);
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
|
-
|
|
188
|
+
return {
|
|
189
|
+
modalBaseExists,
|
|
189
190
|
modalBaseElem,
|
|
190
191
|
modalBaseBackdropElem,
|
|
191
192
|
modalSectionElem,
|
|
@@ -201,8 +202,6 @@ async function getModalInternals(config, modalIndex = 0) {
|
|
|
201
202
|
focusTrapElem,
|
|
202
203
|
focusTrapSlotElem,
|
|
203
204
|
};
|
|
204
|
-
console.log('100 getModalInternals :: modalDetails: ', modalDetails);
|
|
205
|
-
return modalDetails;
|
|
206
205
|
}
|
|
207
206
|
|
|
208
207
|
/*
|
|
@@ -219,8 +218,8 @@ async function getModalHeaderInternals(headerElem) {
|
|
|
219
218
|
|
|
220
219
|
if (headerElem) {
|
|
221
220
|
headerOuterDiv = await headerElem.shadow$('.slds-modal__header');
|
|
222
|
-
headerHeading = await
|
|
223
|
-
headerSlot = await
|
|
221
|
+
headerHeading = await headerElem.shadow$('[data-label]');
|
|
222
|
+
headerSlot = await headerElem.shadow$('[data-default-slot]');
|
|
224
223
|
}
|
|
225
224
|
return {
|
|
226
225
|
headerOuterDiv,
|
|
@@ -241,7 +240,7 @@ async function getModalBodyInternals(bodyElem) {
|
|
|
241
240
|
let bodySlotContents = null;
|
|
242
241
|
if (bodyElem) {
|
|
243
242
|
bodyOuterDiv = await bodyElem.shadow$(MODAL_BODY_DIV);
|
|
244
|
-
const bodySlot = await
|
|
243
|
+
const bodySlot = await bodyElem.shadow$(MODAL_BODY_SLOT);
|
|
245
244
|
// eslint-disable-next-line no-undef
|
|
246
245
|
bodySlotContents = await browser.custom$('getSlotElements', bodySlot);
|
|
247
246
|
}
|
|
@@ -263,7 +262,7 @@ async function getModalFooterInternals(footerElem) {
|
|
|
263
262
|
let footerSlotContents = null;
|
|
264
263
|
if (footerElem) {
|
|
265
264
|
footerOuterDiv = await footerElem.shadow$('.slds-modal__footer');
|
|
266
|
-
const footerSlot = await
|
|
265
|
+
const footerSlot = await footerElem.shadow$('[data-footer-slot]');
|
|
267
266
|
// eslint-disable-next-line no-undef
|
|
268
267
|
footerSlotContents = await browser.custom$(
|
|
269
268
|
'getSlotElements',
|
|
@@ -332,6 +331,7 @@ async function validateModalCloseButtonAttributes(config) {
|
|
|
332
331
|
// screen behavior occur below
|
|
333
332
|
expect(modalCloseButtonVariant).not.toBeNull();
|
|
334
333
|
expect(modalCloseButtonCssClass).toContain(MODAL_CLOSE_BTN_CLASS);
|
|
334
|
+
expect(modalCloseButtonVariant).toEqual(MODAL_CLOSE_BUTTON_VARIANT);
|
|
335
335
|
|
|
336
336
|
// the only time size='full' actual renders full page width and height
|
|
337
337
|
// is when windowWidth is set <= 480px (30em)
|
|
@@ -339,21 +339,14 @@ async function validateModalCloseButtonAttributes(config) {
|
|
|
339
339
|
modalSize === MODAL_SIZE_FULL &&
|
|
340
340
|
windowWidth <= MODAL_FULL_SCREEN_SMALL_BREAKPOINT
|
|
341
341
|
) {
|
|
342
|
-
expect(modalCloseButtonVariant).toEqual(
|
|
343
|
-
MODAL_CLOSE_BUTTON_FULL_VARIANT
|
|
344
|
-
);
|
|
345
|
-
|
|
346
342
|
expect(modalCloseButtonCssClass).toContain(MODAL_CLOSE_BTN_FULL_CLASS);
|
|
347
343
|
} else {
|
|
348
|
-
// 'small', 'medium', 'large', and ('full' when windowWidth is set > 480px (30em)) are normal modal behavior
|
|
349
|
-
expect(modalCloseButtonVariant).toEqual(
|
|
350
|
-
MODAL_CLOSE_BUTTON_NORMAL_VARIANT
|
|
351
|
-
);
|
|
352
344
|
expect(modalCloseButtonCssClass).not.toContain(
|
|
353
345
|
MODAL_CLOSE_BTN_FULL_CLASS
|
|
354
346
|
);
|
|
355
347
|
}
|
|
356
348
|
}
|
|
349
|
+
|
|
357
350
|
/*
|
|
358
351
|
* get some of the modal internals element details
|
|
359
352
|
* including offset values and classes
|
|
@@ -427,19 +420,6 @@ async function validateModalHeightBehavior(config) {
|
|
|
427
420
|
const { height: windowHeight, width: windowWidth } =
|
|
428
421
|
// eslint-disable-next-line no-undef
|
|
429
422
|
await browser.getWindowSize();
|
|
430
|
-
console.log('00 validateModalHeightBehavior :: config: ', config);
|
|
431
|
-
console.log(
|
|
432
|
-
'01 validateModalHeightBehavior :: modalSize: ',
|
|
433
|
-
modalSize,
|
|
434
|
-
'; modalVariantType: ',
|
|
435
|
-
modalVariantType
|
|
436
|
-
);
|
|
437
|
-
console.log(
|
|
438
|
-
'02 validateModalHeightBehavior :: windowWidth: ',
|
|
439
|
-
windowWidth,
|
|
440
|
-
'; windowHeight: ',
|
|
441
|
-
windowHeight
|
|
442
|
-
);
|
|
443
423
|
|
|
444
424
|
// get child elements element for min and max height values
|
|
445
425
|
const { modalHeaderElem, modalBodyElem, modalFooterElem } =
|
|
@@ -447,14 +427,6 @@ async function validateModalHeightBehavior(config) {
|
|
|
447
427
|
const { bodyOuterDiv } = await getModalBodyInternals(modalBodyElem);
|
|
448
428
|
const modalBodyOuterDivStyle = await bodyOuterDiv.getAttribute('style');
|
|
449
429
|
const modalBodyStyleProps = parseStyleAttributes(modalBodyOuterDivStyle);
|
|
450
|
-
console.log(
|
|
451
|
-
'03 validateModalHeightBehavior :: modalBodyOuterDivStyle: ',
|
|
452
|
-
modalBodyOuterDivStyle
|
|
453
|
-
);
|
|
454
|
-
console.log(
|
|
455
|
-
'04 validateModalHeightBehavior :: modalBodyStyleProps: ',
|
|
456
|
-
modalBodyStyleProps
|
|
457
|
-
);
|
|
458
430
|
|
|
459
431
|
// based on variant, determine which types of tests will run
|
|
460
432
|
const isVariantHeadless = isModalOfVariantType(
|
|
@@ -466,19 +438,11 @@ async function validateModalHeightBehavior(config) {
|
|
|
466
438
|
'footless'
|
|
467
439
|
);
|
|
468
440
|
|
|
469
|
-
console.log(
|
|
470
|
-
'05 validateModalHeightBehavior :: isVariantHeadless: ',
|
|
471
|
-
isVariantHeadless,
|
|
472
|
-
'; isVariantFootless: ',
|
|
473
|
-
isVariantFootless
|
|
474
|
-
);
|
|
475
|
-
|
|
476
441
|
// modalBody is always present in the examples
|
|
477
442
|
const heightBody = (await bodyOuterDiv.getSize('height')) || 0;
|
|
478
443
|
|
|
479
444
|
// calculate the total height of the child elements present
|
|
480
445
|
let totalModalElemHeight = heightBody;
|
|
481
|
-
console.log('10 validateModalHeightBehavior :: heightBody: ', heightBody);
|
|
482
446
|
|
|
483
447
|
// modalHeader is not always present in the examples
|
|
484
448
|
if (!isVariantHeadless) {
|
|
@@ -488,10 +452,6 @@ async function validateModalHeightBehavior(config) {
|
|
|
488
452
|
const heightHdr = await headerOuterDiv.getSize('height');
|
|
489
453
|
if (heightHdr > 0) {
|
|
490
454
|
totalModalElemHeight += heightHdr;
|
|
491
|
-
console.log(
|
|
492
|
-
'10 validateModalHeightBehavior :: heightHdr: ',
|
|
493
|
-
heightHdr
|
|
494
|
-
);
|
|
495
455
|
}
|
|
496
456
|
}
|
|
497
457
|
|
|
@@ -503,23 +463,11 @@ async function validateModalHeightBehavior(config) {
|
|
|
503
463
|
const heightFtr = await footerOuterDiv.getSize('height');
|
|
504
464
|
if (heightFtr > 0) {
|
|
505
465
|
totalModalElemHeight += heightFtr;
|
|
506
|
-
console.log(
|
|
507
|
-
'10 validateModalHeightBehavior :: heightFtr: ',
|
|
508
|
-
heightFtr
|
|
509
|
-
);
|
|
510
466
|
}
|
|
511
467
|
}
|
|
512
468
|
|
|
513
469
|
// calculate the percentage of the browser
|
|
514
470
|
const percentPageHeightUtilized = totalModalElemHeight / windowHeight;
|
|
515
|
-
console.log(
|
|
516
|
-
'10 validateModalHeightBehavior :: totalModalElemHeight: ',
|
|
517
|
-
totalModalElemHeight
|
|
518
|
-
);
|
|
519
|
-
console.log(
|
|
520
|
-
'10 validateModalHeightBehavior :: windowHeight: ',
|
|
521
|
-
windowHeight
|
|
522
|
-
);
|
|
523
471
|
|
|
524
472
|
// modalFooter is not always present in the examples
|
|
525
473
|
if (!isVariantFootless) {
|
|
@@ -542,18 +490,6 @@ async function validateModalHeightBehavior(config) {
|
|
|
542
490
|
modalSize === MODAL_SIZE_FULL &&
|
|
543
491
|
windowWidth <= MODAL_FULL_SCREEN_SMALL_BREAKPOINT
|
|
544
492
|
) {
|
|
545
|
-
console.log(
|
|
546
|
-
'10 validateModalHeightBehavior :: FULL SCREEN :: percentPageHeightUtilized: ',
|
|
547
|
-
percentPageHeightUtilized
|
|
548
|
-
);
|
|
549
|
-
console.log(
|
|
550
|
-
'11 validateModalHeightBehavior :: FULL SCREEN :: MODAL_FULL_SCREEN_USE_PERCENT: ',
|
|
551
|
-
MODAL_FULL_SCREEN_USE_PERCENT
|
|
552
|
-
);
|
|
553
|
-
console.log(
|
|
554
|
-
'12 validateModalHeightBehavior :: FULL SCREEN :: percentPageHeightUtilized > MODAL_FULL_SCREEN_USE_PERCENT: ',
|
|
555
|
-
percentPageHeightUtilized > MODAL_FULL_SCREEN_USE_PERCENT
|
|
556
|
-
);
|
|
557
493
|
// in full screen mode, the modal utilzes more than 92%
|
|
558
494
|
// of the screen height
|
|
559
495
|
expect(percentPageHeightUtilized).toBeGreaterThan(
|
|
@@ -564,31 +500,11 @@ async function validateModalHeightBehavior(config) {
|
|
|
564
500
|
// to make the modal go full height
|
|
565
501
|
// these values are not set after the SLDS based
|
|
566
502
|
// CSS grid implementation was implemented
|
|
567
|
-
console.log(
|
|
568
|
-
'15 validateModalHeightBehavior :: FULL SCREEN :: modalBodyStyleProps[MAX_HEIGHT]: ',
|
|
569
|
-
modalBodyStyleProps[MAX_HEIGHT]
|
|
570
|
-
);
|
|
571
|
-
console.log(
|
|
572
|
-
'16 validateModalHeightBehavior :: FULL SCREEN :: modalBodyStyleProps[MIN_HEIGHT]: ',
|
|
573
|
-
modalBodyStyleProps[MIN_HEIGHT]
|
|
574
|
-
);
|
|
575
503
|
expect(modalBodyStyleProps[MAX_HEIGHT]).toBeUndefined();
|
|
576
504
|
expect(modalBodyStyleProps[MIN_HEIGHT]).toBeUndefined();
|
|
577
505
|
|
|
578
506
|
// default modal behavior scenario
|
|
579
507
|
} else {
|
|
580
|
-
console.log(
|
|
581
|
-
'20 validateModalHeightBehavior :: NOT FULL SCREEN :: percentPageHeightUtilized: ',
|
|
582
|
-
percentPageHeightUtilized
|
|
583
|
-
);
|
|
584
|
-
console.log(
|
|
585
|
-
'21 validateModalHeightBehavior :: NOT FULL SCREEN :: MODAL_DEFAULT_SCREEN_USE_PERCENT: ',
|
|
586
|
-
MODAL_DEFAULT_SCREEN_USE_PERCENT
|
|
587
|
-
);
|
|
588
|
-
console.log(
|
|
589
|
-
'22 validateModalHeightBehavior :: NOT FULL SCREEN :: percentPageHeightUtilized < MODAL_DEFAULT_SCREEN_USE_PERCENT: ',
|
|
590
|
-
percentPageHeightUtilized < MODAL_DEFAULT_SCREEN_USE_PERCENT
|
|
591
|
-
);
|
|
592
508
|
// in default modal behavior, the modal utilzes less than 88%
|
|
593
509
|
// of the screen height
|
|
594
510
|
expect(percentPageHeightUtilized).toBeLessThan(
|
|
@@ -597,23 +513,6 @@ async function validateModalHeightBehavior(config) {
|
|
|
597
513
|
// these next two sets of tests are proxy behavior indicating
|
|
598
514
|
// that the event listeners, and rendering has updated
|
|
599
515
|
// to make the modal exhibit normal height behavior (not full screen)
|
|
600
|
-
console.log(
|
|
601
|
-
'23 validateModalHeightBehavior :: NOT FULL SCREEN :: modalBodyStyleProps[MAX_HEIGHT]: ',
|
|
602
|
-
modalBodyStyleProps[MAX_HEIGHT]
|
|
603
|
-
);
|
|
604
|
-
console.log(
|
|
605
|
-
'24 validateModalHeightBehavior :: NOT FULL SCREEN :: modalBodyStyleProps[MIN_HEIGHT] (to be defined, min height not equal max height): ',
|
|
606
|
-
modalBodyStyleProps[MIN_HEIGHT]
|
|
607
|
-
);
|
|
608
|
-
console.log(
|
|
609
|
-
'25 validateModalHeightBehavior :: NOT FULL SCREEN :: MODAL_BODY_MIN_HEIGHT_PX: ',
|
|
610
|
-
MODAL_BODY_MIN_HEIGHT_PX
|
|
611
|
-
);
|
|
612
|
-
console.log(
|
|
613
|
-
'26 validateModalHeightBehavior :: NOT FULL SCREEN :: modalBodyStyleProps[MIN_HEIGHT] === MODAL_BODY_MIN_HEIGHT_PX: ',
|
|
614
|
-
modalBodyStyleProps[MIN_HEIGHT] === MODAL_BODY_MIN_HEIGHT_PX
|
|
615
|
-
);
|
|
616
|
-
|
|
617
516
|
expect(modalBodyStyleProps[MAX_HEIGHT]).toBeDefined();
|
|
618
517
|
expect(modalBodyStyleProps[MIN_HEIGHT]).toBeDefined();
|
|
619
518
|
expect(modalBodyStyleProps[MAX_HEIGHT]).not.toEqual(
|
|
@@ -647,6 +546,7 @@ async function validateModalWidthBehavior(config) {
|
|
|
647
546
|
// get child elements element for min and max height values
|
|
648
547
|
const { modalHeaderElem, modalBodyElem, modalFooterElem } =
|
|
649
548
|
await getModalInternals(config);
|
|
549
|
+
|
|
650
550
|
const { bodyOuterDiv } = await getModalBodyInternals(modalBodyElem);
|
|
651
551
|
|
|
652
552
|
// based on variant, determine which types of tests will run
|
|
@@ -702,7 +602,6 @@ async function validateModalWidthBehavior(config) {
|
|
|
702
602
|
// locHeader: { x: 0, y: 48 }
|
|
703
603
|
// locBody: { x: 0, y: 167.625 }
|
|
704
604
|
// locFooter: { x: 0, y: 792 }
|
|
705
|
-
|
|
706
605
|
// only evaluate modalFooter, when present
|
|
707
606
|
if (!isVariantFootless) {
|
|
708
607
|
expect(locFooterX).toEqual(MODAL_ELEM_FULL_PX_OFFSET_X);
|
|
@@ -885,13 +784,16 @@ async function checkBackgroundElemForInertness(elems, expectedValue = true) {
|
|
|
885
784
|
const initAriaHiddenValue = await elem.getAttribute('aria-hidden');
|
|
886
785
|
const ariaHiddenValue =
|
|
887
786
|
initAriaHiddenValue === 'true' ? true : null;
|
|
888
|
-
//
|
|
787
|
+
// these shouldn't have aria-hidden applied
|
|
889
788
|
if (
|
|
890
|
-
elemType
|
|
891
|
-
elemType
|
|
789
|
+
elemType === 'lightning-overlay-container' ||
|
|
790
|
+
elemType === 'lightning-primitive-bubble'
|
|
892
791
|
) {
|
|
893
|
-
|
|
792
|
+
return;
|
|
894
793
|
}
|
|
794
|
+
// if the element isn't in the approved group, make sure it aria-hidden value is set correctly
|
|
795
|
+
const messageIfFails = `${elemType} should have aria-hidden set ${expectedValue}, but was ${ariaHiddenValue}`;
|
|
796
|
+
expect(ariaHiddenValue).toEqual(expectedValue, messageIfFails);
|
|
895
797
|
})
|
|
896
798
|
);
|
|
897
799
|
}
|
|
@@ -907,7 +809,11 @@ async function validateInertness(bgInert = true) {
|
|
|
907
809
|
// get elements
|
|
908
810
|
// eslint-disable-next-line no-undef
|
|
909
811
|
const htmlElem = await $('html');
|
|
910
|
-
const
|
|
812
|
+
const rootElemsToCheck = await htmlElem.$$('body > *');
|
|
813
|
+
// clear undefined elements
|
|
814
|
+
const rootElemsCleaned = await rootElemsToCheck.filter((elem) =>
|
|
815
|
+
Boolean(elem)
|
|
816
|
+
);
|
|
911
817
|
|
|
912
818
|
// get HEAD aria-hidden value
|
|
913
819
|
// eslint-disable-next-line no-undef
|
|
@@ -916,7 +822,7 @@ async function validateInertness(bgInert = true) {
|
|
|
916
822
|
// HEAD element should NEVER have inert applied
|
|
917
823
|
expect(headAriaHiddenValueCheck).toBeNull();
|
|
918
824
|
// check body elements to verify they have been set inert
|
|
919
|
-
await checkBackgroundElemForInertness(
|
|
825
|
+
await checkBackgroundElemForInertness(rootElemsCleaned, ariaHiddenValue);
|
|
920
826
|
}
|
|
921
827
|
|
|
922
828
|
// function to enable forward and reverse tab navigation
|
|
@@ -1393,13 +1299,13 @@ async function validateModalOpenTabNavFocusBehavior(
|
|
|
1393
1299
|
config,
|
|
1394
1300
|
expectedAfterOpen,
|
|
1395
1301
|
expectedAfterTab,
|
|
1396
|
-
|
|
1302
|
+
numOfTabsToNext
|
|
1397
1303
|
) {
|
|
1398
1304
|
// make sure values are passed in
|
|
1399
1305
|
expect(config).not.toBeFalsy();
|
|
1400
1306
|
expect(expectedAfterOpen).not.toBeFalsy();
|
|
1401
1307
|
expect(expectedAfterTab).not.toBeFalsy();
|
|
1402
|
-
expect(
|
|
1308
|
+
expect(numOfTabsToNext).not.toBeFalsy();
|
|
1403
1309
|
|
|
1404
1310
|
// open modal with config
|
|
1405
1311
|
await openModal(config);
|
|
@@ -1409,7 +1315,7 @@ async function validateModalOpenTabNavFocusBehavior(
|
|
|
1409
1315
|
|
|
1410
1316
|
// tab navigate backwards
|
|
1411
1317
|
// should end up on 'Option 1' button
|
|
1412
|
-
await repeatTab(
|
|
1318
|
+
await repeatTab(numOfTabsToNext);
|
|
1413
1319
|
|
|
1414
1320
|
// AFTER tab navigation complete, retest what has focus
|
|
1415
1321
|
await validateModalFocus(expectedAfterTab);
|
|
@@ -5,7 +5,7 @@ import LightningModalBase from 'lightning/modalBase';
|
|
|
5
5
|
import { normalizeBoolean } from 'lightning/utilsPrivate';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* Extend this component to create a
|
|
8
|
+
* Extend this component to create a modal window overlayed on the current app window.
|
|
9
9
|
*/
|
|
10
10
|
export default class LightningModal extends LightningOverlay {
|
|
11
11
|
static [parent] = LightningModalBase;
|