lightning-base-components 1.18.8-ssr → 1.19.2-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/metadata/raptor.json +541 -1
- package/package.json +26 -68
- package/scopedImports/@salesforce-internal-core.appVersion.js +1 -1
- package/scopedImports/@salesforce-label-LightningProgressRing.complete.js +1 -0
- package/scopedImports/@salesforce-label-LightningProgressRing.expired.js +1 -0
- package/scopedImports/@salesforce-label-LightningProgressRing.warning.js +1 -0
- package/scopedImports/@salesforce-label-LightningRecordPicker.defaultSelectedRecordErrorMessage.js +1 -0
- package/scopedImports/@salesforce-label-LightningRecordPicker.invalidConfigurationErrorMessage.js +1 -1
- package/scopedImports/@salesforce-label-LightningRecordPicker.loadingPlaceholder.js +1 -0
- package/scopedImports/@salesforce-label-LightningRecordPicker.messageWhenBadInputDefault.js +1 -0
- package/scopedImports/@salesforce-label-LightningServiceCloudVoiceToolkitApi.missingNbaParams.js +1 -1
- package/src/lightning/accordion/__docs__/accordion.md +2 -2
- package/src/lightning/accordion/accordion.css +4 -4
- package/src/lightning/accordion/accordion.js +2 -4
- package/src/lightning/accordion/accordion.slds.css +30 -29
- package/src/lightning/accordionSection/__docs__/accordionSection.md +1 -1
- package/src/lightning/accordionSection/accordion-section.slds.css +26 -24
- package/src/lightning/accordionSection/accordionSection.css +4 -4
- package/src/lightning/accordionSection/accordionSection.js +2 -4
- package/src/lightning/alert/__docs__/alert.md +1 -1
- package/src/lightning/avatar/__docs__/avatar.md +1 -1
- package/src/lightning/avatar/avatar.css +2 -2
- package/src/lightning/avatar/avatar.js +2 -3
- package/src/lightning/avatar/avatar.slds.css +21 -22
- package/src/lightning/badge/__docs__/badge.md +1 -1
- package/src/lightning/badge/__examples__/basic/basic.html +1 -3
- package/src/lightning/badge/badge.html +14 -16
- package/src/lightning/badge/badge.js +2 -4
- package/src/lightning/barcodeScanner/__docs__/barcodeScanner.md +2 -2
- package/src/lightning/baseCombobox/base-combobox.slds.css +48 -71
- package/src/lightning/baseCombobox/baseCombobox.css +2 -3
- package/src/lightning/baseCombobox/baseCombobox.js +30 -12
- package/src/lightning/baseComboboxItem/baseComboboxItem.js +2 -4
- package/src/lightning/baseComboboxItem/inline.css +2 -2
- package/src/lightning/baseComboboxItem/listbox.slds.css +10 -25
- package/src/lightning/breadcrumb/breadcrumb.css +2 -2
- package/src/lightning/breadcrumb/breadcrumb.js +2 -4
- package/src/lightning/breadcrumb/breadcrumb.slds.css +2 -2
- package/src/lightning/breadcrumbs/__docs__/breadcrumbs.md +3 -3
- package/src/lightning/breadcrumbs/breadcrumbs.css +2 -2
- package/src/lightning/breadcrumbs/breadcrumbs.js +2 -3
- package/src/lightning/breadcrumbs/breadcrumbs.slds.css +4 -3
- package/src/lightning/button/__docs__/button.md +8 -8
- package/src/lightning/button/button.css +2 -2
- package/src/lightning/button/button.js +1 -0
- package/src/lightning/button/button.slds.css +3 -3
- package/src/lightning/buttonGroup/__docs__/buttonGroup.md +1 -1
- package/src/lightning/buttonGroup/buttonGroup.css +2 -2
- package/src/lightning/buttonGroup/buttonGroup.js +2 -3
- package/src/lightning/buttonIcon/__docs__/buttonIcon.md +1 -1
- package/src/lightning/buttonIcon/button-icon.slds.css +6 -6
- package/src/lightning/buttonIcon/buttonIcon.css +2 -2
- package/src/lightning/buttonIconStateful/__docs__/buttonIconStateful.md +1 -1
- package/src/lightning/buttonIconStateful/button-icon-stateful.slds.css +6 -6
- package/src/lightning/buttonIconStateful/buttonIconStateful.css +6 -2
- package/src/lightning/buttonMenu/__docs__/buttonMenu.md +3 -1
- package/src/lightning/buttonMenu/button-menu.slds.css +42 -51
- package/src/lightning/buttonMenu/buttonMenu.css +2 -2
- package/src/lightning/buttonMenu/buttonMenu.js +6 -5
- package/src/lightning/buttonStateful/__docs__/buttonStateful.md +2 -2
- package/src/lightning/buttonStateful/button-stateful.slds.css +19 -22
- package/src/lightning/buttonStateful/buttonStateful.css +2 -2
- package/src/lightning/buttonStateful/buttonStateful.js +2 -3
- package/src/lightning/calendar/calendar.css +2 -2
- package/src/lightning/calendar/calendar.js +2 -4
- package/src/lightning/calendar/calendar.slds.css +39 -48
- package/src/lightning/card/__docs__/card.md +5 -5
- package/src/lightning/card/card.css +2 -2
- package/src/lightning/card/card.js +2 -3
- package/src/lightning/card/card.slds.css +37 -18
- package/src/lightning/colorPickerCustom/color-picker-custom.slds.css +3 -3
- package/src/lightning/colorPickerCustom/colorPickerCustom.css +2 -2
- package/src/lightning/colorPickerCustom/colorPickerCustom.js +2 -3
- package/src/lightning/colorPickerPanel/colorPickerPanel.css +2 -2
- package/src/lightning/colorPickerPanel/colorPickerPanel.js +2 -4
- package/src/lightning/colorPickerPanel/popover.slds.css +1 -1
- package/src/lightning/combobox/__docs__/combobox.md +2 -0
- package/src/lightning/combobox/combobox.css +4 -2
- package/src/lightning/combobox/combobox.html +2 -1
- package/src/lightning/combobox/combobox.js +2 -4
- package/src/lightning/combobox/form-element.slds.css +23 -24
- package/src/lightning/confirm/__docs__/confirm.md +1 -1
- package/src/lightning/datatable/__docs__/datatable.md +63 -8
- package/src/lightning/datatable/datatable.js +1 -0
- package/src/lightning/datepicker/datepicker.css +2 -2
- package/src/lightning/datepicker/datepicker.html +1 -1
- package/src/lightning/datepicker/datepicker.js +34 -24
- package/src/lightning/datepicker/form-element.slds.css +23 -24
- package/src/lightning/datepicker/input-text.slds.css +16 -16
- package/src/lightning/datetimepicker/datetimepicker.css +2 -2
- package/src/lightning/datetimepicker/datetimepicker.html +1 -1
- package/src/lightning/datetimepicker/datetimepicker.js +2 -4
- package/src/lightning/datetimepicker/form-element.slds.css +23 -24
- package/src/lightning/datetimepicker/input-text.slds.css +16 -16
- package/src/lightning/dialog/README.md +1 -1
- package/src/lightning/dualListbox/__docs__/dualListbox.md +1 -1
- package/src/lightning/dualListbox/dual-listbox.slds.css +4 -13
- package/src/lightning/dualListbox/dualListbox.css +2 -2
- package/src/lightning/dualListbox/dualListbox.js +2 -4
- package/src/lightning/dualListbox/form-element.slds.css +23 -24
- package/src/lightning/dualListbox/listbox.slds.css +10 -25
- package/src/lightning/dynamicIcon/dynamic-icon-ellie.slds.css +2 -2
- package/src/lightning/dynamicIcon/dynamic-icon-eq.slds.css +1 -1
- package/src/lightning/dynamicIcon/dynamic-icon-trend.slds.css +1 -1
- package/src/lightning/dynamicIcon/dynamicIcon.js +2 -3
- package/src/lightning/dynamicIcon/ellie.css +1 -1
- package/src/lightning/dynamicIcon/eq.css +1 -1
- package/src/lightning/dynamicIcon/score.css +1 -1
- package/src/lightning/dynamicIcon/strength.css +1 -1
- package/src/lightning/dynamicIcon/trend.css +1 -1
- package/src/lightning/dynamicIcon/waffle.css +1 -1
- package/src/lightning/f6Controller/f6Controller.js +9 -9
- package/src/lightning/formattedAddress/formattedAddress.js +0 -4
- package/src/lightning/formattedDateTime/__docs__/formattedDateTime.md +1 -1
- package/src/lightning/formattedDateTime/formattedDateTime.js +1 -1
- package/src/lightning/formattedNumber/__docs__/formattedNumber.md +1 -1
- package/src/lightning/formattedRichText/formatted-rich-text.slds.css +0 -2
- package/src/lightning/formattedRichText/formattedRichText.css +2 -2
- package/src/lightning/formattedRichText/formattedRichText.js +2 -4
- package/src/lightning/formattedText/formattedText.css +1 -1
- package/src/lightning/formattedText/formattedText.js +2 -3
- package/src/lightning/helptext/form-element.slds.css +23 -24
- package/src/lightning/helptext/help-text.slds.css +6 -6
- package/src/lightning/helptext/helptext.css +2 -2
- package/src/lightning/helptext/helptext.js +2 -3
- package/src/lightning/icon/__docs__/icon.md +2 -2
- package/src/lightning/icon/icon.css +2 -2
- package/src/lightning/icon/icon.html +9 -3
- package/src/lightning/icon/icon.js +18 -17
- package/src/lightning/icon/icon.slds.css +14 -14
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/attribute_based_pricing.html +10 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/bundles_pricing.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/data_cloud.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/data_graph.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/dynamic_highlights_panel.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/header_discounts.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/impact_outcome.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/impact_strategy.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/impact_strategy_assignment.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/indicator_assignment.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/indicator_definition.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/indicator_performance_period.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/indicator_result.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/manual_discounts.html +9 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/no_code_model.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/outcome_activity.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/panel_detail.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/price_adjustment_matrix.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/registered_model.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/repeaters.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/scheduling_workspace.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/story.html +4 -2
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/time_period.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/travel_mode.html +2 -2
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/uploaded_model.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/volume_discounts.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/walkthroughs.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/templates.js +38 -1
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/apex_alt.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/data_cloud.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/data_graph.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/data_transforms.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/edit_gpt.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/einstein.html +4 -2
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/guidance.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/indicator_performance_period.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/mixed_sources_mapping.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/page_structure.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/sparkles.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/visibility_rule_assigned.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/walkthroughs.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/attribute_based_pricing.html +10 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/bundles_pricing.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/data_cloud.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/data_graph.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/dynamic_highlights_panel.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/header_discounts.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/impact_outcome.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/impact_strategy.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/impact_strategy_assignment.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/indicator_assignment.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/indicator_definition.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/indicator_performance_period.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/indicator_result.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/manual_discounts.html +9 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/no_code_model.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/outcome_activity.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/panel_detail.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/price_adjustment_matrix.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/registered_model.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/repeaters.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/scheduling_workspace.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/story.html +4 -2
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/time_period.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/travel_mode.html +2 -2
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/uploaded_model.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/volume_discounts.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/walkthroughs.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/templates.js +38 -1
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/apex_alt.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/data_cloud.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/data_graph.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/data_transforms.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/edit_gpt.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/einstein.html +4 -2
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/guidance.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/indicator_performance_period.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/mixed_sources_mapping.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/page_structure.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/sparkles.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/visibility_rule_assigned.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/walkthroughs.html +8 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/attribute_based_pricing.html +10 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/bundles_pricing.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/data_cloud.html +8 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/data_graph.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/dynamic_highlights_panel.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/header_discounts.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/impact_outcome.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/impact_strategy.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/impact_strategy_assignment.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/indicator_assignment.html +8 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/indicator_definition.html +8 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/indicator_performance_period.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/indicator_result.html +8 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/manual_discounts.html +9 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/no_code_model.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/outcome_activity.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/panel_detail.html +8 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/price_adjustment_matrix.html +8 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/registered_model.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/repeaters.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/scheduling_workspace.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/story.html +4 -2
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/time_period.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/travel_mode.html +2 -2
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/uploaded_model.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/volume_discounts.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/walkthroughs.html +8 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/templates.js +26 -1
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/attribute_based_pricing.html +10 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/bundles_pricing.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/data_cloud.html +8 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/data_graph.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/dynamic_highlights_panel.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/header_discounts.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/impact_outcome.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/impact_strategy.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/impact_strategy_assignment.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/indicator_assignment.html +8 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/indicator_definition.html +8 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/indicator_performance_period.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/indicator_result.html +8 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/manual_discounts.html +9 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/no_code_model.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/outcome_activity.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/panel_detail.html +8 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/price_adjustment_matrix.html +8 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/registered_model.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/repeaters.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/scheduling_workspace.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/story.html +4 -2
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/time_period.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/travel_mode.html +2 -2
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/uploaded_model.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/volume_discounts.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/walkthroughs.html +8 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/templates.js +26 -1
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/templates.js +13 -1
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/apex_alt.html +8 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/data_cloud.html +8 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/data_graph.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/data_transforms.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/edit_gpt.html +8 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/einstein.html +4 -2
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/guidance.html +8 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/indicator_performance_period.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/mixed_sources_mapping.html +8 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/page_structure.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/sparkles.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/visibility_rule_assigned.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/walkthroughs.html +8 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/templates.js +13 -1
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/apex_alt.html +8 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/data_cloud.html +8 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/data_graph.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/data_transforms.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/edit_gpt.html +8 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/einstein.html +4 -2
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/guidance.html +8 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/indicator_performance_period.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/mixed_sources_mapping.html +8 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/page_structure.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/sparkles.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/visibility_rule_assigned.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/walkthroughs.html +8 -0
- package/src/lightning/iconUtils/iconColors.js +1 -0
- package/src/lightning/iconUtils/iconUtils.js +10 -0
- package/src/lightning/input/__docs__/input.md +22 -6
- package/src/lightning/input/__examples__/file/file.html +1 -1
- package/src/lightning/input/form-element.slds.css +23 -24
- package/src/lightning/input/input.css +4 -2
- package/src/lightning/input/input.html +3 -3
- package/src/lightning/input/input.js +52 -11
- package/src/lightning/inputAddress/__docs__/inputAddress.md +5 -5
- package/src/lightning/inputName/__docs__/inputName.md +4 -4
- package/src/lightning/layout/layout.css +2 -2
- package/src/lightning/layout/layout.js +2 -5
- package/src/lightning/layoutItem/__docs__/layoutItem.md +1 -1
- package/src/lightning/layoutItem/layoutItem.css +2 -2
- package/src/lightning/layoutItem/layoutItem.js +2 -5
- package/src/lightning/menuDivider/menuDivider.css +2 -2
- package/src/lightning/menuDivider/menuDivider.js +2 -4
- package/src/lightning/menuItem/menu-item.slds.css +3 -3
- package/src/lightning/menuItem/menuItem.css +2 -2
- package/src/lightning/menuItem/menuItem.js +2 -4
- package/src/lightning/menuSubheader/menuSubheader.css +2 -2
- package/src/lightning/menuSubheader/menuSubheader.js +3 -5
- package/src/lightning/modal/__docs__/migration.md +9 -9
- package/src/lightning/modal/__docs__/modal.md +15 -5
- package/src/lightning/modal/__examples__disabled/basic/basic.css +1 -1
- package/src/lightning/modal/__examples__disabled/demoallform/demoallform.css +2 -4
- package/src/lightning/modal/__examples__disabled/demoallformfull/demoallformfull.css +2 -4
- package/src/lightning/modal/__modalUtils__/modalContainerTestConstants.js +2 -19
- package/src/lightning/modal/__modalUtils__/modalContainerTestMethods.js +96 -58
- package/src/lightning/modalBase/modalBase.css +2 -7
- package/src/lightning/modalBase/modalBase.html +0 -2
- package/src/lightning/modalBase/modalBase.js +31 -120
- package/src/lightning/modalBody/__docs__/modalBody.md +3 -3
- package/src/lightning/modalBody/modalBody.html +0 -1
- package/src/lightning/modalBody/modalBody.js +35 -51
- package/src/lightning/modalFooter/__docs__/modalFooter.md +3 -3
- package/src/lightning/modalFooter/modalFooter.html +1 -1
- package/src/lightning/modalFooter/modalFooter.js +3 -93
- package/src/lightning/modalHeader/__docs__/modalHeader.md +3 -3
- package/src/lightning/modalHeader/modalHeader.html +1 -1
- package/src/lightning/modalHeader/modalHeader.js +2 -86
- package/src/lightning/navigation/__docs__/navigation.md +3 -3
- package/src/lightning/overlay/overlay.js +2 -3
- package/src/lightning/overlayContainer/overlayContainer.js +5 -6
- package/src/lightning/overlayUtils/overlayUtils.js +59 -0
- package/src/lightning/pill/__docs__/pill.md +2 -2
- package/src/lightning/pill/avatar.slds.css +21 -22
- package/src/lightning/pill/link.css +2 -2
- package/src/lightning/pill/pill.js +2 -4
- package/src/lightning/pill/pill.slds.css +17 -9
- package/src/lightning/pill/plain.css +2 -2
- package/src/lightning/pill/plainLink.css +2 -2
- package/src/lightning/pillContainer/__docs__/pillContainer.md +1 -1
- package/src/lightning/pillContainer/barePillContainer.css +2 -2
- package/src/lightning/pillContainer/listbox.slds.css +10 -25
- package/src/lightning/pillContainer/pill-container.slds.css +19 -8
- package/src/lightning/pillContainer/pill.slds.css +17 -9
- package/src/lightning/pillContainer/pillContainer.js +2 -4
- package/src/lightning/pillContainer/standardPillContainer.css +2 -2
- package/src/lightning/popup/popover.slds.css +1 -1
- package/src/lightning/popup/popup.css +2 -2
- package/src/lightning/popup/popup.js +2 -3
- package/src/lightning/primitiveBubble/primitiveBubble.css +2 -2
- package/src/lightning/primitiveBubble/primitiveBubble.js +2 -4
- package/src/lightning/primitiveBubble/tooltip.slds.css +14 -23
- package/src/lightning/primitiveButton/primitiveButton.js +7 -4
- package/src/lightning/primitiveColorpickerButton/color-picker-button.slds.css +14 -14
- package/src/lightning/primitiveColorpickerButton/primitiveColorpickerButton.css +2 -2
- package/src/lightning/primitiveColorpickerButton/primitiveColorpickerButton.js +2 -3
- package/src/lightning/primitiveIcon/icon.slds.css +14 -14
- package/src/lightning/primitiveIcon/primitiveIcon.css +2 -2
- package/src/lightning/primitiveIcon/primitiveIcon.js +2 -3
- package/src/lightning/primitiveInputCheckbox/form-element.slds.css +23 -24
- package/src/lightning/primitiveInputCheckbox/input-checkbox.slds.css +7 -7
- package/src/lightning/primitiveInputCheckbox/primitiveInputCheckbox.css +2 -2
- package/src/lightning/primitiveInputCheckbox/primitiveInputCheckbox.html +1 -1
- package/src/lightning/primitiveInputCheckbox/primitiveInputCheckbox.js +2 -4
- package/src/lightning/primitiveInputCheckboxButton/form-element.slds.css +23 -24
- package/src/lightning/primitiveInputCheckboxButton/input-checkbox-button.slds.css +1 -6
- package/src/lightning/primitiveInputCheckboxButton/primitiveInputCheckboxButton.css +2 -2
- package/src/lightning/primitiveInputCheckboxButton/primitiveInputCheckboxButton.html +1 -1
- package/src/lightning/primitiveInputCheckboxButton/primitiveInputCheckboxButton.js +2 -4
- package/src/lightning/primitiveInputColor/form-element.slds.css +23 -24
- package/src/lightning/primitiveInputColor/input-color.slds.css +3 -3
- package/src/lightning/primitiveInputColor/input-text.slds.css +16 -16
- package/src/lightning/primitiveInputColor/primitiveInputColor.css +2 -2
- package/src/lightning/primitiveInputColor/primitiveInputColor.html +2 -2
- package/src/lightning/primitiveInputColor/primitiveInputColor.js +2 -4
- package/src/lightning/primitiveInputFile/button.slds.css +3 -3
- package/src/lightning/primitiveInputFile/form-element.slds.css +23 -24
- package/src/lightning/primitiveInputFile/input-file.slds.css +2 -2
- package/src/lightning/primitiveInputFile/primitiveInputFile.css +2 -2
- package/src/lightning/primitiveInputFile/primitiveInputFile.html +1 -1
- package/src/lightning/primitiveInputFile/primitiveInputFile.js +2 -4
- package/src/lightning/primitiveInputRadio/primitiveInputRadio.html +1 -1
- package/src/lightning/primitiveInputSimple/form-element.slds.css +23 -24
- package/src/lightning/primitiveInputSimple/input-text.slds.css +16 -16
- package/src/lightning/primitiveInputSimple/mobileInputUtils.js +24 -0
- package/src/lightning/primitiveInputSimple/primitiveInputSimple.css +2 -2
- package/src/lightning/primitiveInputSimple/primitiveInputSimple.html +1 -1
- package/src/lightning/primitiveInputSimple/primitiveInputSimple.js +80 -16
- package/src/lightning/primitiveInputToggle/form-element.slds.css +23 -24
- package/src/lightning/primitiveInputToggle/primitiveInputToggle.css +2 -2
- package/src/lightning/primitiveInputToggle/primitiveInputToggle.html +1 -1
- package/src/lightning/primitiveInputToggle/primitiveInputToggle.js +2 -4
- package/src/lightning/progressBar/progressBar.html +4 -4
- package/src/lightning/progressBar/progressBar.js +2 -3
- package/src/lightning/progressRing/progressRing.html +3 -8
- package/src/lightning/progressRing/progressRing.js +18 -6
- package/src/lightning/prompt/__docs__/prompt.md +1 -1
- package/src/lightning/radioGroup/input-radio-group.slds.css +12 -13
- package/src/lightning/radioGroup/radioGroup.css +3 -2
- package/src/lightning/radioGroup/radioGroup.js +2 -4
- package/src/lightning/relativeDateTime/__docs__/relativeDateTime.md +1 -1
- package/src/lightning/select/__docs__/select.md +1 -1
- package/src/lightning/select/form-element.slds.css +23 -24
- package/src/lightning/select/select.css +2 -2
- package/src/lightning/select/select.js +2 -4
- package/src/lightning/select/select.slds.css +26 -27
- package/src/lightning/sldsGenAiUtils/sldsGenAiUtils.css +4 -0
- package/src/lightning/spinner/spinner.css +2 -2
- package/src/lightning/spinner/spinner.js +2 -4
- package/src/lightning/spinner/spinner.slds.css +5 -8
- package/src/lightning/tab/__docs__/tab.md +1 -1
- package/src/lightning/tab/tab.css +2 -2
- package/src/lightning/tab/tab.js +2 -4
- package/src/lightning/tab/tab.slds.css +8 -8
- package/src/lightning/tabBar/tab-bar.slds.css +31 -35
- package/src/lightning/tabBar/tabBar.css +2 -2
- package/src/lightning/tabBar/tabBar.js +2 -4
- package/src/lightning/tabset/__docs__/tabset.md +2 -2
- package/src/lightning/tabset/tabset.css +10 -2
- package/src/lightning/tabset/tabset.js +2 -4
- package/src/lightning/textarea/textarea.css +4 -1
- package/src/lightning/tile/__docs__/tile.md +1 -1
- package/src/lightning/timepicker/form-element.slds.css +23 -24
- package/src/lightning/timepicker/timepicker.css +2 -2
- package/src/lightning/timepicker/timepicker.html +1 -1
- package/src/lightning/timepicker/timepicker.js +2 -4
- package/src/lightning/toast/__docs__/toast.md +18 -20
- package/src/lightning/toast/button-icon.slds.css +6 -6
- package/src/lightning/toast/formatted-rich-text.slds.css +0 -2
- package/src/lightning/toast/icon.slds.css +14 -14
- package/src/lightning/toast/toast.css +2 -2
- package/src/lightning/toast/toast.js +2 -4
- package/src/lightning/toast/toast.js-meta.xml +1 -1
- package/src/lightning/toast/toast.slds.css +101 -95
- package/src/lightning/toastContainer/toast.slds.css +101 -95
- package/src/lightning/toastContainer/toastContainer.css +2 -2
- package/src/lightning/toastContainer/toastContainer.js-meta.xml +1 -1
- package/src/lightning/utilsPrivate/utilsPrivate.js +9 -0
- package/src/lightning/utilsPrivate/videoUtils.js +12 -1
- package/src/lightning/verticalNavigation/verticalNavigation.css +3 -2
- package/src/lightning/verticalNavigation/verticalNavigation.js +2 -3
- package/src/lightning/verticalNavigationSection/verticalNavigationSection.css +3 -2
- package/src/lightning/verticalNavigationSection/verticalNavigationSection.js +2 -3
- package/src/lightning/badge/badge.css +0 -2
- package/src/lightning/badge/badge.slds.css +0 -73
- package/src/lightning/baseCombobox/listbox.slds.css +0 -267
- package/src/lightning/baseCombobox/spinner.slds.css +0 -438
- package/src/lightning/buttonMenu/dropdown.slds.css +0 -1360
- package/src/lightning/icon/iconColors.js +0 -1
- package/src/lightning/input/input-checkbox.slds.css +0 -395
- package/src/lightning/input/input-text.slds.css +0 -398
- package/src/lightning/modal/__examples__disabled/demo/demo.css +0 -1
- package/src/lightning/modal/__examples__disabled/demoall/demoall.css +0 -5
- package/src/lightning/modal/__examples__disabled/demofootless/demofootless.css +0 -1
- package/src/lightning/modal/__examples__disabled/demoheadless/demoheadless.css +0 -5
- package/src/lightning/modalBase/modal-base.slds.css +0 -240
- package/src/lightning/modalBody/modal-body.slds.css +0 -61
- package/src/lightning/modalBody/modalBody.css +0 -3
- package/src/lightning/modalFooter/modal-footer.slds.css +0 -68
- package/src/lightning/modalFooter/modalFooter.css +0 -2
- package/src/lightning/modalHeader/modal-header.slds.css +0 -70
- package/src/lightning/modalHeader/modalHeader.css +0 -3
- package/src/lightning/progressBar/progress-bar.slds.css +0 -66
- package/src/lightning/progressBar/progressBar.css +0 -2
- package/src/lightning/progressRing/progress-ring.slds.css +0 -140
- package/src/lightning/progressRing/progressRing.css +0 -2
- package/src/lightning/tabset/tabset.slds.css +0 -9
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { api, track } from 'lwc';
|
|
2
|
-
import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
|
|
1
|
+
import { LightningElement, api, track } from 'lwc';
|
|
3
2
|
import { classSet } from 'lightning/utils';
|
|
4
3
|
import {
|
|
5
4
|
normalizeBoolean,
|
|
@@ -11,7 +10,7 @@ import { sanitizeURL, FALLBACK_URL } from 'lightning/utilsPrivate';
|
|
|
11
10
|
/**
|
|
12
11
|
* Represents a list item in a menu.
|
|
13
12
|
*/
|
|
14
|
-
export default class LightningMenuItem extends
|
|
13
|
+
export default class LightningMenuItem extends LightningElement {
|
|
15
14
|
/**
|
|
16
15
|
* A value associated with the menu item.
|
|
17
16
|
* @type {string}
|
|
@@ -63,7 +62,6 @@ export default class LightningMenuItem extends LightningShadowBaseClass {
|
|
|
63
62
|
@api draftAlternativeText;
|
|
64
63
|
|
|
65
64
|
connectedCallback() {
|
|
66
|
-
super.connectedCallback();
|
|
67
65
|
this.setAttribute('role', 'presentation');
|
|
68
66
|
}
|
|
69
67
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { api } from 'lwc';
|
|
2
|
-
import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
|
|
1
|
+
import { LightningElement, api } from 'lwc';
|
|
3
2
|
|
|
4
3
|
/**
|
|
5
4
|
* Creates a subheader in the list of items in lightning-button-menu.
|
|
6
5
|
*/
|
|
7
|
-
export default class LightningMenuSubheader extends
|
|
6
|
+
export default class LightningMenuSubheader extends LightningElement {
|
|
8
7
|
/**
|
|
9
8
|
* The text displayed in the subheader.
|
|
10
9
|
* @type {string}
|
|
@@ -12,7 +11,6 @@ export default class LightningMenuSubheader extends LightningShadowBaseClass {
|
|
|
12
11
|
@api label;
|
|
13
12
|
|
|
14
13
|
connectedCallback() {
|
|
15
|
-
|
|
16
|
-
this.setAttribute('role', 'separator');
|
|
14
|
+
this.setAttribute('role', 'presentation');
|
|
17
15
|
}
|
|
18
16
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
This document is about migrating existing modal implementations.
|
|
4
4
|
|
|
5
5
|
## **Creating a new LWC-based modal implementation?**
|
|
6
|
-
* Starting in release 236, when utilizing LWC or Aura code, your team should use `LightningModal`
|
|
6
|
+
* Starting in release 236, when utilizing LWC or Aura code, your team should use `LightningModal`
|
|
7
7
|
* Dive into the details here by [Creating a Modal Component](modal.md#creating-a-modal-component)
|
|
8
8
|
* Or, take a look at some of our [Modal Code Examples](modal.md#modal-code-examples).
|
|
9
9
|
|
|
@@ -67,7 +67,7 @@ If you have an existing LWC custom modal that implements the HTML and CSS from t
|
|
|
67
67
|
* Wrap the desired example tag within a `<template></template>` tag
|
|
68
68
|
* For modal blueprints and variants, review the [Modal and supported variants](modal.md#modal-and-supported-variants) section.
|
|
69
69
|
* `LightningModal` provides three helper components for header, body content, and footer sections. The `lightning-modal-body` is the only required component.
|
|
70
|
-
* You don’t need to worry about setting any of the base SLDS modal CSS classes. These are set for you. If you’d like to further style your modal, review the modal [Style Hooks](modal.md#style-hooks) section
|
|
70
|
+
* You don’t need to worry about setting any of the base SLDS modal CSS classes. These are set for you. If you’d like to further style your modal, review the modal [Style Hooks](modal.md#style-hooks) section
|
|
71
71
|
* Review our `LightningModal` documentation:
|
|
72
72
|
* [Creating a Modal Component](modal.md#creating-a-modal-component)
|
|
73
73
|
* [Opening a Modal Instance](modal.md#opening-a-modal-instance)
|
|
@@ -86,11 +86,11 @@ This section covers implementation differences between Aura modal solutions and
|
|
|
86
86
|
|
|
87
87
|
* When setting up the config before opening the modal, either pass your content via custom written `@api` (see [Using the open() method](modal.md#using-the-open-method)), or set it statically within your template (see the [Base Modal](modal.md#base-modal) HTML template example)
|
|
88
88
|
* If you don't want a header and title section, simply remove `lightning-modal-header`. You must then pass the required `label` value (for the accessible modal title) when opening the modal, for example `Modal.open({label: ‘Descriptive Modal Header’})`. See our [Headless Variant](modal.md#headless-variant) documentation, and [Modal Code Examples](modal.md#modal-code-examples). Same goes for the footer section, if you don’t want a footer, don't use `lightning-modal-footer`. Only `lightning-modal-body` is required.
|
|
89
|
-
* **For specific events and event listeners availability** within `createPanel` or `createModal`, for example, `onBeforeShow`, `onAfterShow`, `onCreate` or `onDestroy`, see our section on [About Modal Events](modal.md#about-modal-events).
|
|
90
|
-
* **Recommend:** create these as [custom events](https://developer.salesforce.com/docs/
|
|
91
|
-
* **If you want to get element reference,** for example, `linkElement.querySelector(‘[data-my-link]’)` within the content you’ve set within your modal, utilize data attributes. For this example, `<a href=“#” data-my-link>`, rather than relying on ID references, since these dynamically change in LWC).
|
|
92
|
-
* **Recommend:** See the note within the [ARIA
|
|
93
|
-
* If you need to style aspects of your modal, you can apply CSS styles directly to your markup within the helper components.
|
|
89
|
+
* **For specific events and event listeners availability** within `createPanel` or `createModal`, for example, `onBeforeShow`, `onAfterShow`, `onCreate` or `onDestroy`, see our section on [About Modal Events](modal.md#about-modal-events).
|
|
90
|
+
* **Recommend:** create these as [custom events](https://developer.salesforce.com/docs/platform/lwc/guide/events-create-dispatch)
|
|
91
|
+
* **If you want to get element reference,** for example, `linkElement.querySelector(‘[data-my-link]’)` within the content you’ve set within your modal, utilize data attributes. For this example, `<a href=“#” data-my-link>`, rather than relying on ID references, since these dynamically change in LWC).
|
|
92
|
+
* **Recommend:** See the note within the [ARIA Attributes](https://developer.salesforce.com/docs/platform/lwc/guide/create-components-accessibility-attributes#aria-attributes) section.
|
|
93
|
+
* If you need to style aspects of your modal, you can apply CSS styles directly to your markup within the helper components.
|
|
94
94
|
* **Recommend:** See the example under [Directional Variant](modal.md#directional-variant) section.
|
|
95
95
|
* If you need to support a modal with a [directional variant](https://www.lightningdesignsystem.com/components/modals/#Directional), please review our [Directional Variant](modal.md#directional-variant) documentation.
|
|
96
96
|
|
|
@@ -101,7 +101,7 @@ This section covers `@api` or attribute differences between Aura modal solutions
|
|
|
101
101
|
#### Supported APIs
|
|
102
102
|
See [ui:modal](https://git.soma.salesforce.com/aura/aura/tree/master/aura-components/src/main/components/ui/modal)
|
|
103
103
|
|
|
104
|
-
* `title` attribute has been changed to the `label` attribute
|
|
104
|
+
* `title` attribute has been changed to the `label` attribute
|
|
105
105
|
* You set the `label` attribute on the `lightning-modal-header` helper component or in the case of a headless modal, when you open the modal, you would set the `label` attribute when opening the modal. For example: `Modal.open({ label: ‘Modal Descriptive Title’ })`
|
|
106
106
|
* `**LightningModal**` currently has only four official attributes A
|
|
107
107
|
* `size` - to set the width of the modal
|
|
@@ -129,7 +129,7 @@ See [ui:modal](https://git.soma.salesforce.com/aura/aura/tree/master/aura-compon
|
|
|
129
129
|
|
|
130
130
|
## Migrating From `lightning-dialog`
|
|
131
131
|
|
|
132
|
-
If you need to move an existing `lightning-dialog` implementation, you’ll need to consider these changes:
|
|
132
|
+
If you need to move an existing `lightning-dialog` implementation, you’ll need to consider these changes:
|
|
133
133
|
|
|
134
134
|
### Implementation Differences
|
|
135
135
|
|
|
@@ -322,7 +322,7 @@ A modal can only fire events captured by the component that opened it, not the m
|
|
|
322
322
|
|
|
323
323
|
To capture modal events, attach them in the `.open()` method invoked by the component that opens the modal.
|
|
324
324
|
|
|
325
|
-
Capturing modal events requires [Lightning Web Security (LWS)](https://developer.salesforce.com/docs/
|
|
325
|
+
Capturing modal events requires [Lightning Web Security (LWS)](https://developer.salesforce.com/docs/platform/lwc/guide/security-lwsec-enable) to be enabled in the Salesforce org. See the **Modal Events with LWS and Lightning Locker** section for more information.
|
|
326
326
|
|
|
327
327
|
For example, here's a custom `select` event dispatched from `MyModal`.
|
|
328
328
|
|
|
@@ -374,13 +374,13 @@ handleOpenModal() {
|
|
|
374
374
|
}
|
|
375
375
|
```
|
|
376
376
|
|
|
377
|
-
See [Create and Dispatch Events](https://developer.salesforce.com/docs/
|
|
377
|
+
See [Create and Dispatch Events](https://developer.salesforce.com/docs/platform/lwc/guide/events-create-dispatch) in the LWC Dev Guide for more information about events.
|
|
378
378
|
|
|
379
379
|
#### Modal Events with LWS and Lightning Locker
|
|
380
380
|
|
|
381
381
|
Modal events work as expected when Lightning Web Security (LWS) is enabled within a Salesforce org, as described in the **Modal Events** section. If LWS isn't enabled in an org, Lightning Locker is in effect.
|
|
382
382
|
|
|
383
|
-
LWS is replacing Lightning Locker over time and is already enabled in many customer orgs. New orgs have LWS enabled by default. To enable LWS, see [Enable Lightning Web Security in an Org](https://developer.salesforce.com/docs/
|
|
383
|
+
LWS is replacing Lightning Locker over time and is already enabled in many customer orgs. New orgs have LWS enabled by default. To enable LWS, see [Enable Lightning Web Security in an Org](https://developer.salesforce.com/docs/platform/lwc/guide/security-lwsec-enable) in the Lightning Web Components Developer Guide.
|
|
384
384
|
|
|
385
385
|
Under Lightning Locker, when you fire events within `LightningModal`, the browser throws a `TypeError` related to `dispatchEvent`. If your modal component runs in an org that can’t enable LWS yet, the workaround is to wrap the code that calls `dispatchEvent` in a child component that extends `LightningElement`. Use the wrapper component as a child of one of the modal components in the modal template.
|
|
386
386
|
|
|
@@ -405,7 +405,7 @@ These extracting methods fit into the larger LWC Modal-to-Aura event workflow.
|
|
|
405
405
|
4. Fire a separate event containing the LWC-processed event details and send it to the Aura parent component.
|
|
406
406
|
5. Use an Aura-based event handler to handle and process the event.
|
|
407
407
|
|
|
408
|
-
For more information, see [Send Events to an Enclosing Aura Component](https://developer.salesforce.com/docs/
|
|
408
|
+
For more information, see [Send Events to an Enclosing Aura Component](https://developer.salesforce.com/docs/platform/lwc/guide/events-sending-to-aura-components) and [Events Best Practices](https://developer.salesforce.com/docs/platform/lwc/guide/events-best-practices).
|
|
409
409
|
|
|
410
410
|
Let's see this workflow in action. In this example, we'll create a button (`lightning-button`) that launches a modal (`LightningModal`) containing a tree grid component (`lightning-tree-grid`) with a button in each record row that automatically navigates our user to that record's page (`lightning-navigation`). This use case requires data passing between our LWC components and a parent Aura component.
|
|
411
411
|
|
|
@@ -560,7 +560,7 @@ The headerless variant of `LightningModal` has these additional requirements.
|
|
|
560
560
|
- The `label` property is required for all variants of `LightningModal`. Assistive devices read the `label` value, even though the headerless modal variant doesn't display the label.
|
|
561
561
|
- Because this variant doesn't use `lightning-modal-header`, you have to manually create an `<h1>` heading in `lightning-modal-body`. Provide accessible structure by starting with heading level `<h1>` and using levels up to `<h6>` appropriately. For more information, see [Semantic Structure, Headings on WebAim.org](https://webaim.org/techniques/semanticstructure/#headings).
|
|
562
562
|
|
|
563
|
-
You can also create a full-screen modal component by setting the `size` attribute to `full`. This variant resizes the modal to the full width and height of the viewport on screens
|
|
563
|
+
You can also create a full-screen modal component by setting the `size` attribute to `full`. This variant resizes the modal to the full width and height of the viewport on screens up to 48em (~768 pixels or less), like mobile phone devices. On screens larger than 48em (~769 pixels or larger), like desktop monitors or tablets, a `size=full` modal has the same behavior as a modal with `size=large` set.
|
|
564
564
|
|
|
565
565
|
The `LightningModal` component also supports the SLDS [Directional variant](https://www.lightningdesignsystem.com/components/modals/#Directional) modal blueprint pattern.
|
|
566
566
|
|
|
@@ -584,6 +584,16 @@ To achieve the directional button layout, place the buttons in a `div` with the
|
|
|
584
584
|
|
|
585
585
|
The `lightning-modal-*` helper components support [style hooks](https://www.lightningdesignsystem.com/components/modals/#Styling-Hooks-Overview). The styling hooks for the template that invokes the helper components doesn't carry over to them, so you must style each helper component individually.
|
|
586
586
|
|
|
587
|
+
Use styling hooks to add styles to modal components. Any other values for the `style` attribute are ignored.
|
|
588
|
+
|
|
589
|
+
```javascript
|
|
590
|
+
MyModal.open({
|
|
591
|
+
style: {
|
|
592
|
+
'--slds-c-modal-color-border': 'red'
|
|
593
|
+
}
|
|
594
|
+
})`
|
|
595
|
+
```
|
|
596
|
+
|
|
587
597
|
Customizing the styling on the white modal frame and background, close button, or gray backdrop isn't supported.
|
|
588
598
|
|
|
589
599
|
#### Accessibility
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
:host([data-render-mode="shadow"]) [id='all-footer'] lightning-button:not(:first-child) {
|
|
4
|
-
margin-left: var(--sds-g-spacing-2, 0.5rem);
|
|
1
|
+
lightning-input .slds-checkbox_toggle .slds-checkbox_faux_container {
|
|
2
|
+
display: block !important;
|
|
5
3
|
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
:host([data-render-mode="shadow"]) [id='all-footer'] lightning-button:not(:first-child) {
|
|
4
|
-
margin-left: var(--sds-g-spacing-2, 0.5rem);
|
|
1
|
+
lightning-input .slds-checkbox_toggle .slds-checkbox_faux_container {
|
|
2
|
+
display: block !important;
|
|
5
3
|
}
|
|
@@ -7,10 +7,6 @@
|
|
|
7
7
|
|
|
8
8
|
// buttons that open modals
|
|
9
9
|
const BUTTON_MODAL_ALL = '[data-modal-button-all]';
|
|
10
|
-
const BUTTON_MODAL_ALL_SMALL = '[data-modal-button-all-small]';
|
|
11
|
-
const BUTTON_MODAL_ALL_MEDIUM = '[data-modal-button-all-medium]';
|
|
12
|
-
const BUTTON_MODAL_ALL_LARGE = '[data-modal-button-all-large]';
|
|
13
|
-
|
|
14
10
|
const BUTTON_MODAL_ALL_TWO = '[data-modal-button-all-two]';
|
|
15
11
|
const BUTTON_MODAL_HEADLESS = '[data-modal-button-headless]';
|
|
16
12
|
const BUTTON_MODAL_HEADLESS_NO_LABEL = '[data-modal-button-headless-no-label]';
|
|
@@ -59,7 +55,6 @@ const MODAL_CLOSE_BUTTON_NORMAL_VARIANT = 'bare-inverse';
|
|
|
59
55
|
const MODAL_CLOSE_BTN_CLASS = 'slds-modal__close';
|
|
60
56
|
const MODAL_CLOSE_BTN_SELECTOR = `.${MODAL_CLOSE_BTN_CLASS}`;
|
|
61
57
|
const MODAL_CLOSE_BTN_FULL_CLASS = 'slds-modal_full-close-button';
|
|
62
|
-
const MODAL_CLOSE_BTN_ICON_BORDER_CLASS = 'slds-button_icon-border-filled';
|
|
63
58
|
// modal screen size testing
|
|
64
59
|
// utilized by full screen modal tests
|
|
65
60
|
const SCREEN_SIZE_SMALL = 'SMALL';
|
|
@@ -83,13 +78,13 @@ const BODY_HEADLESS_SELECTOR = 'slds-modal__content_headless';
|
|
|
83
78
|
const BODY_FOOTLESS_SELECTOR = 'slds-modal__content_footless';
|
|
84
79
|
|
|
85
80
|
// modal size measurements and values
|
|
86
|
-
const MODAL_FULL_SCREEN_SMALL_BREAKPOINT =
|
|
81
|
+
const MODAL_FULL_SCREEN_SMALL_BREAKPOINT = 768;
|
|
87
82
|
// <lightning-modal> element location, medium+ screen
|
|
88
83
|
const MODAL_DEFAULT_PX_OFFSET_X = 25;
|
|
89
84
|
const MODAL_DEFAULT_PX_OFFSET_Y = 50;
|
|
90
85
|
// <lightning-modal> element location, full screen
|
|
91
86
|
const MODAL_ELEM_FULL_PX_OFFSET_X = 0;
|
|
92
|
-
const MODAL_ELEM_FULL_PX_OFFSET_Y =
|
|
87
|
+
const MODAL_ELEM_FULL_PX_OFFSET_Y = 0;
|
|
93
88
|
const MAX_HEIGHT = 'max-height';
|
|
94
89
|
const MIN_HEIGHT = 'min-height';
|
|
95
90
|
const MODAL_BODY_MIN_HEIGHT_PX = 80;
|
|
@@ -108,9 +103,6 @@ const MODAL_RENDER_PAUSE = 1250;
|
|
|
108
103
|
const SELECTORS = {
|
|
109
104
|
// main testing options
|
|
110
105
|
all: BUTTON_MODAL_ALL,
|
|
111
|
-
'all-small': BUTTON_MODAL_ALL_SMALL,
|
|
112
|
-
'all-medium': BUTTON_MODAL_ALL_MEDIUM,
|
|
113
|
-
'all-large': BUTTON_MODAL_ALL_LARGE,
|
|
114
106
|
'all-form': BUTTON_MODAL_FORM,
|
|
115
107
|
headless: BUTTON_MODAL_HEADLESS,
|
|
116
108
|
footless: BUTTON_MODAL_FOOTLESS,
|
|
@@ -124,11 +116,6 @@ const SELECTORS = {
|
|
|
124
116
|
'multi-modals': BUTTON_MODAL_MULTI,
|
|
125
117
|
};
|
|
126
118
|
|
|
127
|
-
// private attributes on modal components
|
|
128
|
-
const DATA_VARIANT_HEADLESS_ATTRIBUTE = 'data-variant-headless';
|
|
129
|
-
const DATA_VARIANT_FOOTLESS_ATTRIBUTE = 'data-variant-footless';
|
|
130
|
-
const DATA_SIZE_ATTRIBUTE = 'data-size';
|
|
131
|
-
|
|
132
119
|
// modal type to size api value mapping
|
|
133
120
|
const NAME_TO_SIZE = {
|
|
134
121
|
all: MODAL_SIZE_FULL,
|
|
@@ -234,7 +221,6 @@ module.exports = {
|
|
|
234
221
|
MODAL_CLOSE_BTN_CLASS,
|
|
235
222
|
MODAL_CLOSE_BTN_SELECTOR,
|
|
236
223
|
MODAL_CLOSE_BTN_FULL_CLASS,
|
|
237
|
-
MODAL_CLOSE_BTN_ICON_BORDER_CLASS,
|
|
238
224
|
MODAL_DATA_SELECTOR,
|
|
239
225
|
MODAL_CLOSE_BUTTON_FULL_VARIANT,
|
|
240
226
|
MODAL_CLOSE_BUTTON_NORMAL_VARIANT,
|
|
@@ -276,7 +262,4 @@ module.exports = {
|
|
|
276
262
|
ARIA_LABELLEDBY,
|
|
277
263
|
ARIA_LABEL,
|
|
278
264
|
KEY,
|
|
279
|
-
DATA_VARIANT_FOOTLESS_ATTRIBUTE,
|
|
280
|
-
DATA_VARIANT_HEADLESS_ATTRIBUTE,
|
|
281
|
-
DATA_SIZE_ATTRIBUTE,
|
|
282
265
|
};
|
|
@@ -19,7 +19,6 @@ import {
|
|
|
19
19
|
MODAL_CLOSE_BTN,
|
|
20
20
|
MODAL_CLOSE_BTN_CLASS,
|
|
21
21
|
MODAL_CLOSE_BTN_FULL_CLASS,
|
|
22
|
-
MODAL_CLOSE_BTN_ICON_BORDER_CLASS,
|
|
23
22
|
MODAL_CLOSE_BUTTON_FULL_VARIANT,
|
|
24
23
|
MODAL_CLOSE_BUTTON_NORMAL_VARIANT,
|
|
25
24
|
SCREEN_SIZE_LARGE,
|
|
@@ -60,8 +59,6 @@ async function getOverlayContainer() {
|
|
|
60
59
|
// overlay container isn't present in the DOM
|
|
61
60
|
// until first overlay or modal is created
|
|
62
61
|
// eslint-disable-next-line
|
|
63
|
-
// wrapper = await kontajner.getWrapper();
|
|
64
|
-
// await wrapper.waitForDisplayed();
|
|
65
62
|
// eslint-disable-next-line no-undef
|
|
66
63
|
const htmlElem = await $('html');
|
|
67
64
|
// eslint-disable-next-line no-undef
|
|
@@ -139,9 +136,9 @@ async function getModalInternals(config, modalIndex = 0) {
|
|
|
139
136
|
modalBaseBackdropElem = await modalBaseElem.shadow$(
|
|
140
137
|
MODAL_BODY_BACKDROP
|
|
141
138
|
);
|
|
139
|
+
|
|
142
140
|
// get focus trap element
|
|
143
141
|
focusTrapElem = await modalBaseElem.shadow$(FOCUS_TRAP);
|
|
144
|
-
await focusTrapElem.waitForDisplayed();
|
|
145
142
|
focusTrapSlotElem = await focusTrapElem.shadow$('slot');
|
|
146
143
|
|
|
147
144
|
// get modal's <section> element just inside focus trap
|
|
@@ -150,20 +147,15 @@ async function getModalInternals(config, modalIndex = 0) {
|
|
|
150
147
|
'getFirstSlotElement',
|
|
151
148
|
focusTrapSlotElem
|
|
152
149
|
);
|
|
153
|
-
await modalSectionElem.waitForDisplayed();
|
|
154
150
|
// get modal close button
|
|
155
151
|
modalCloseButton = await modalSectionElem.$(MODAL_CLOSE_BTN);
|
|
156
|
-
await modalCloseButton.waitForDisplayed();
|
|
157
152
|
|
|
158
153
|
// get modal div slot (not an actual slot)
|
|
159
154
|
modalDataSlot = await modalSectionElem.$(MODAL_DIV_SLOT);
|
|
160
|
-
await modalDataSlot.waitForDisplayed();
|
|
161
155
|
// get div[data-container].slds-modal__container
|
|
162
156
|
modalContainerElem = await modalSectionElem.$(MODAL_CONTAINER_DIV);
|
|
163
|
-
await modalContainerElem.waitForDisplayed();
|
|
164
157
|
// get lightning-modal element
|
|
165
158
|
modalElem = await modalSectionElem.$(MODAL);
|
|
166
|
-
await modalElem.waitForDisplayed();
|
|
167
159
|
|
|
168
160
|
// skip looking for modalHeader when type of modal is 'headless'
|
|
169
161
|
if (!isModalOfVariantType(modalVariantType, 'headless')) {
|
|
@@ -325,7 +317,7 @@ async function validateModalCloseButtonAttributes(config) {
|
|
|
325
317
|
expect(modalCloseButtonCssClass).toContain(MODAL_CLOSE_BTN_CLASS);
|
|
326
318
|
|
|
327
319
|
// the only time size='full' actual renders full page width and height
|
|
328
|
-
// is when windowWidth is set <=
|
|
320
|
+
// is when windowWidth is set <= 768
|
|
329
321
|
if (
|
|
330
322
|
modalSize === MODAL_SIZE_FULL &&
|
|
331
323
|
windowWidth <= MODAL_FULL_SCREEN_SMALL_BREAKPOINT
|
|
@@ -335,22 +327,72 @@ async function validateModalCloseButtonAttributes(config) {
|
|
|
335
327
|
);
|
|
336
328
|
|
|
337
329
|
expect(modalCloseButtonCssClass).toContain(MODAL_CLOSE_BTN_FULL_CLASS);
|
|
338
|
-
expect(modalCloseButtonCssClass).toContain(
|
|
339
|
-
MODAL_CLOSE_BTN_ICON_BORDER_CLASS
|
|
340
|
-
);
|
|
341
330
|
} else {
|
|
342
|
-
// 'small', 'medium', 'large', and ('full' when windowWidth is set >
|
|
331
|
+
// 'small', 'medium', 'large', and ('full' when windowWidth is set > 768) are normal modal behavior
|
|
343
332
|
expect(modalCloseButtonVariant).toEqual(
|
|
344
333
|
MODAL_CLOSE_BUTTON_NORMAL_VARIANT
|
|
345
334
|
);
|
|
346
335
|
expect(modalCloseButtonCssClass).not.toContain(
|
|
347
336
|
MODAL_CLOSE_BTN_FULL_CLASS
|
|
348
337
|
);
|
|
349
|
-
expect(modalCloseButtonCssClass).not.toContain(
|
|
350
|
-
MODAL_CLOSE_BTN_ICON_BORDER_CLASS
|
|
351
|
-
);
|
|
352
338
|
}
|
|
353
339
|
}
|
|
340
|
+
/*
|
|
341
|
+
* get some of the modal internals element details
|
|
342
|
+
* including offset values and classes
|
|
343
|
+
* utilizes DOM based approach via browser.execute
|
|
344
|
+
*/
|
|
345
|
+
// eslint-disable-next-line @lwc/lwc/no-async-await
|
|
346
|
+
async function getModalInternalsDomBased() {
|
|
347
|
+
// eslint-disable-next-line no-undef
|
|
348
|
+
const result = await browser.execute(() => {
|
|
349
|
+
// down the modal dom tree
|
|
350
|
+
// eslint-disable-next-line @lwc/lwc/no-document-query
|
|
351
|
+
const loc = document.querySelector('lightning-overlay-container');
|
|
352
|
+
const modalBase = loc.shadowRoot.querySelector('lightning-modal-base');
|
|
353
|
+
const modalBackdrop =
|
|
354
|
+
modalBase.shadowRoot.querySelector('.slds-backdrop');
|
|
355
|
+
const focusTrap = modalBase.shadowRoot.querySelector(
|
|
356
|
+
'lightning-focus-trap'
|
|
357
|
+
);
|
|
358
|
+
const focusTrapSlot = focusTrap.shadowRoot.querySelector('slot');
|
|
359
|
+
const modalSectionElem = focusTrapSlot.assignedNodes()[0];
|
|
360
|
+
const modalContainerElem = modalSectionElem.querySelector(
|
|
361
|
+
'.slds-modal__container'
|
|
362
|
+
);
|
|
363
|
+
const modalCloseButton = modalSectionElem.querySelector(
|
|
364
|
+
'lightning-button-icon'
|
|
365
|
+
);
|
|
366
|
+
const modalElem = modalSectionElem.querySelector('lightning-modal');
|
|
367
|
+
return {
|
|
368
|
+
window: {
|
|
369
|
+
width: window.innerWidth,
|
|
370
|
+
height: window.innerHeight,
|
|
371
|
+
},
|
|
372
|
+
modalBase: {
|
|
373
|
+
offset: modalBase.getBoundingClientRect(),
|
|
374
|
+
},
|
|
375
|
+
modalBackdrop: {
|
|
376
|
+
offset: modalBackdrop.getBoundingClientRect(),
|
|
377
|
+
},
|
|
378
|
+
modalSectionElem: {
|
|
379
|
+
class: modalSectionElem.getAttribute('class'),
|
|
380
|
+
offset: modalSectionElem.getBoundingClientRect(),
|
|
381
|
+
},
|
|
382
|
+
modalContainerElem: {
|
|
383
|
+
class: modalContainerElem.getAttribute('class'),
|
|
384
|
+
offset: modalContainerElem.getBoundingClientRect(),
|
|
385
|
+
},
|
|
386
|
+
modalCloseButton: {
|
|
387
|
+
class: modalCloseButton.getAttribute('class'),
|
|
388
|
+
},
|
|
389
|
+
modalElem: {
|
|
390
|
+
offset: modalElem.getBoundingClientRect(),
|
|
391
|
+
},
|
|
392
|
+
};
|
|
393
|
+
});
|
|
394
|
+
return result;
|
|
395
|
+
}
|
|
354
396
|
|
|
355
397
|
/* Function includes expect tests to validate the expected
|
|
356
398
|
* modal HEIGHT behavior based on screen size, size attribute,
|
|
@@ -359,23 +401,20 @@ async function validateModalCloseButtonAttributes(config) {
|
|
|
359
401
|
// eslint-disable-next-line @lwc/lwc/no-async-await
|
|
360
402
|
async function validateModalHeightBehavior(config) {
|
|
361
403
|
const { modalSize } = config;
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
const {
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
const {
|
|
370
|
-
await modalElem.getLocation();
|
|
371
|
-
|
|
372
|
-
// get <lightning-modal-body> element
|
|
404
|
+
// first, get sizes of elements
|
|
405
|
+
const { modalSectionElem, window, modalElem } =
|
|
406
|
+
await getModalInternalsDomBased();
|
|
407
|
+
const { height: modalSectionElemHeight } = modalSectionElem.offset;
|
|
408
|
+
const { height: windowHeight, width: windowWidth } = window;
|
|
409
|
+
|
|
410
|
+
// get <lightning-modal-body> element for min and max height values
|
|
411
|
+
const { modalBodyElem } = await getModalInternals(config);
|
|
373
412
|
const { bodyOuterDiv } = await getModalBodyInternals(modalBodyElem);
|
|
374
413
|
const modalBodyOuterDivStyle = await bodyOuterDiv.getAttribute('style');
|
|
375
414
|
const modalBodyStyleProps = parseStyleAttributes(modalBodyOuterDivStyle);
|
|
376
|
-
|
|
415
|
+
const { x: modalElemX, y: modalElemY } = modalElem.offset;
|
|
377
416
|
// the only time size='full' actual renders full page width and height
|
|
378
|
-
// is when windowWidth is set <=
|
|
417
|
+
// is when windowWidth is set <= 768
|
|
379
418
|
// note: reliably testing outer div element was not possible as
|
|
380
419
|
// webdriver getSize didn't provide correct values for comparison
|
|
381
420
|
// the tests below verify that the code path for setting full height are invoked
|
|
@@ -383,33 +422,29 @@ async function validateModalHeightBehavior(config) {
|
|
|
383
422
|
modalSize === MODAL_SIZE_FULL &&
|
|
384
423
|
windowWidth <= MODAL_FULL_SCREEN_SMALL_BREAKPOINT
|
|
385
424
|
) {
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
// y=48 comes from margin/padding and is expected
|
|
390
|
-
expect(modalElemLocX).toEqual(MODAL_ELEM_FULL_PX_OFFSET_X);
|
|
391
|
-
expect(modalElemLocY).toBeLessThan(MODAL_ELEM_FULL_PX_OFFSET_Y);
|
|
425
|
+
expect(modalSectionElemHeight).toEqual(windowHeight);
|
|
426
|
+
expect(modalElemX).toEqual(MODAL_ELEM_FULL_PX_OFFSET_X);
|
|
427
|
+
expect(modalElemY).toEqual(MODAL_ELEM_FULL_PX_OFFSET_Y);
|
|
392
428
|
// these next two tests are proxy behavior indicating
|
|
393
429
|
// that the event listeners, and rendering has updated
|
|
394
430
|
// to make the modal go full height
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
);
|
|
398
|
-
expect(modalBodyStyleProps[MIN_HEIGHT]).
|
|
399
|
-
MODAL_BODY_MIN_HEIGHT_PX
|
|
400
|
-
);
|
|
431
|
+
// these values are not set after the SLDS based
|
|
432
|
+
// CSS grid implementation was implemented
|
|
433
|
+
expect(modalBodyStyleProps[MAX_HEIGHT]).toBeUndefined();
|
|
434
|
+
expect(modalBodyStyleProps[MIN_HEIGHT]).toBeUndefined();
|
|
401
435
|
} else {
|
|
402
|
-
// 'small', 'medium', 'large', and ('full' when windowWidth is set >
|
|
403
|
-
// the
|
|
436
|
+
// 'small', 'medium', 'large', and ('full' when windowWidth is set > 768) are normal modal behavior
|
|
437
|
+
// the div.slds-modal__container element is consistently accurate for
|
|
404
438
|
// location measurment in the CI
|
|
405
439
|
// location values vary based on screen and size value
|
|
406
|
-
// typical value are: { x: > 25
|
|
407
|
-
|
|
408
|
-
expect(
|
|
409
|
-
|
|
410
|
-
// these next two tests are proxy behavior indicating
|
|
440
|
+
// typical value are: { x: > 25 },
|
|
441
|
+
expect(modalElemX).toBeGreaterThan(MODAL_DEFAULT_PX_OFFSET_X);
|
|
442
|
+
expect(modalElemY).toBeGreaterThan(MODAL_DEFAULT_PX_OFFSET_Y);
|
|
443
|
+
// these next two sets of tests are proxy behavior indicating
|
|
411
444
|
// that the event listeners, and rendering has updated
|
|
412
|
-
// to make the modal
|
|
445
|
+
// to make the modal exhibit normal height behavior (not full screen)
|
|
446
|
+
expect(modalBodyStyleProps[MAX_HEIGHT]).toBeDefined();
|
|
447
|
+
expect(modalBodyStyleProps[MIN_HEIGHT]).toBeDefined();
|
|
413
448
|
expect(modalBodyStyleProps[MAX_HEIGHT]).not.toEqual(
|
|
414
449
|
modalBodyStyleProps[MIN_HEIGHT]
|
|
415
450
|
);
|
|
@@ -428,22 +463,25 @@ async function validateModalWidthBehavior(config, modalIndex = 0) {
|
|
|
428
463
|
const { modalSize } = config;
|
|
429
464
|
// first, get outer window size
|
|
430
465
|
// eslint-disable-next-line no-undef
|
|
431
|
-
const { width: windowWidth } =
|
|
466
|
+
const { width: windowWidth } =
|
|
467
|
+
// eslint-disable-next-line no-undef
|
|
468
|
+
await browser.getWindowSize();
|
|
432
469
|
|
|
433
470
|
// second, find modal elem, then get width
|
|
434
|
-
const {
|
|
435
|
-
const { width:
|
|
471
|
+
const { modalContainerElem } = await getModalInternals(config, modalIndex);
|
|
472
|
+
const { width: modalContainerElemWidth } =
|
|
473
|
+
await modalContainerElem.getSize();
|
|
436
474
|
|
|
437
475
|
// the only time size='full' actual renders full page width and height
|
|
438
|
-
// is when windowWidth is set <=
|
|
476
|
+
// is when windowWidth is set <= 768
|
|
439
477
|
if (
|
|
440
478
|
modalSize === MODAL_SIZE_FULL &&
|
|
441
479
|
windowWidth <= MODAL_FULL_SCREEN_SMALL_BREAKPOINT
|
|
442
480
|
) {
|
|
443
|
-
expect(
|
|
481
|
+
expect(modalContainerElemWidth).toEqual(windowWidth);
|
|
444
482
|
} else {
|
|
445
|
-
// 'small', 'medium', 'large', and ('full' when windowWidth is set >
|
|
446
|
-
expect(
|
|
483
|
+
// 'small', 'medium', 'large', and ('full' when windowWidth is set > 768) are normal modal behavior
|
|
484
|
+
expect(modalContainerElemWidth).toBeLessThan(windowWidth);
|
|
447
485
|
}
|
|
448
486
|
}
|
|
449
487
|
|
|
@@ -495,7 +533,6 @@ async function openModal({
|
|
|
495
533
|
if (runMockMatchMedia) {
|
|
496
534
|
await mockMatchMedia();
|
|
497
535
|
}
|
|
498
|
-
|
|
499
536
|
// set a specific window size based on sizing descriptor (SMALL, MEDIUM)
|
|
500
537
|
await setWindowSize(screenSizeToSet);
|
|
501
538
|
|
|
@@ -1122,6 +1159,7 @@ async function validateModalOpenTabNavFocusBehavior(
|
|
|
1122
1159
|
}
|
|
1123
1160
|
|
|
1124
1161
|
module.exports = {
|
|
1162
|
+
getModalInternalsDomBased,
|
|
1125
1163
|
setupStrategy,
|
|
1126
1164
|
isModalOfVariantType,
|
|
1127
1165
|
parseStyleAttributes,
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
@import 'lightning/sldsCommon';
|
|
2
|
-
@import './modal-base.slds.css';
|
|
3
|
-
|
|
4
1
|
/* Modal close button */
|
|
5
2
|
|
|
6
3
|
/* Required for autofocus to work correctly:
|
|
@@ -8,14 +5,12 @@
|
|
|
8
5
|
the moment that they are being reviewed for eligibility
|
|
9
6
|
for focus in focus.js at isElementVisible()
|
|
10
7
|
*/
|
|
11
|
-
.fix-slds-modal
|
|
12
|
-
:host([data-render-mode="shadow"]) .fix-slds-modal {
|
|
8
|
+
.fix-slds-modal {
|
|
13
9
|
visibility: visible;
|
|
14
10
|
z-index: unset;
|
|
15
11
|
}
|
|
16
12
|
|
|
17
13
|
/* Required for z-index */
|
|
18
|
-
.fix-slds-backdrop
|
|
19
|
-
:host([data-render-mode="shadow"]) .fix-slds-backdrop {
|
|
14
|
+
.fix-slds-backdrop {
|
|
20
15
|
z-index: unset;
|
|
21
16
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
class={modalBackdropCssClasses}
|
|
4
|
-
part="modal-backdrop"
|
|
5
4
|
role="presentation"
|
|
6
5
|
data-backdrop
|
|
7
6
|
></div>
|
|
@@ -11,7 +10,6 @@
|
|
|
11
10
|
tabindex="-1"
|
|
12
11
|
aria-modal="true"
|
|
13
12
|
class={modalCssClasses}
|
|
14
|
-
part="modal"
|
|
15
13
|
onkeydown={handleModalKeyDown}
|
|
16
14
|
onprivatemodalheaderregister={handleHeaderRegister}
|
|
17
15
|
onprivatemodalbodyregister={handleBodyRegister}
|