lightning-base-components 1.18.1-alpha → 1.18.3-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 +9 -0
- package/package.json +57 -1
- package/src/lightning/accordion/__docs__/accordion.md +2 -2
- package/src/lightning/accordion/accordion.css +12 -0
- package/src/lightning/accordion/accordion.html +3 -1
- package/src/lightning/accordion/accordion.js +4 -2
- package/src/lightning/accordion/accordion.slds.css +671 -0
- package/src/lightning/accordionSection/accordion-section.slds.css +647 -0
- package/src/lightning/accordionSection/accordionSection.css +14 -0
- package/src/lightning/accordionSection/accordionSection.html +23 -19
- package/src/lightning/accordionSection/accordionSection.js +29 -2
- package/src/lightning/ariaObserver/__docs__/ariaObserver.md +21 -9
- package/src/lightning/ariaObserver/ariaObserver.js +185 -154
- package/src/lightning/ariaObserver/polyfill.js +639 -0
- package/src/lightning/avatar/__docs__/avatar.md +7 -7
- package/src/lightning/avatar/avatar.css +2 -0
- package/src/lightning/avatar/avatar.html +2 -0
- package/src/lightning/avatar/avatar.js +18 -15
- package/src/lightning/avatar/avatar.slds.css +272 -0
- package/src/lightning/badge/__docs__/badge.md +2 -2
- package/src/lightning/baseCombobox/base-combobox.slds.css +1585 -0
- package/src/lightning/baseCombobox/baseCombobox.css +11 -1
- package/src/lightning/baseCombobox/baseCombobox.html +154 -146
- package/src/lightning/baseCombobox/baseCombobox.js +122 -46
- package/src/lightning/baseCombobox/spinner.slds.css +438 -0
- package/src/lightning/baseComboboxItem/baseComboboxItem.js +4 -2
- package/src/lightning/baseComboboxItem/inline.css +2 -0
- package/src/lightning/breadcrumb/breadcrumb.css +2 -2
- package/src/lightning/breadcrumb/breadcrumb.js +4 -2
- package/src/lightning/breadcrumb/breadcrumb.slds.css +2 -7
- package/src/lightning/breadcrumbs/__docs__/breadcrumbs.md +3 -3
- package/src/lightning/breadcrumbs/breadcrumbs.css +2 -2
- package/src/lightning/breadcrumbs/breadcrumbs.js +3 -2
- package/src/lightning/breadcrumbs/breadcrumbs.slds.css +7 -1
- package/src/lightning/button/__docs__/button.md +15 -15
- package/src/lightning/button/__examples__/inverse/inverse.css +8 -0
- package/src/lightning/button/__examples__/inverse/inverse.html +3 -2
- package/src/lightning/button/button.css +2 -0
- package/src/lightning/button/button.html +4 -2
- package/src/lightning/button/button.js +21 -0
- package/src/lightning/button/button.slds.css +527 -0
- package/src/lightning/buttonGroup/buttonGroup.css +2 -2
- package/src/lightning/buttonGroup/buttonGroup.js +3 -2
- package/src/lightning/buttonIcon/__docs__/buttonIcon.md +9 -9
- package/src/lightning/buttonIcon/button-icon.slds.css +215 -453
- package/src/lightning/buttonIcon/buttonIcon.css +2 -2
- package/src/lightning/buttonIcon/buttonIcon.js +4 -0
- package/src/lightning/buttonIconStateful/__docs__/buttonIconStateful.md +9 -9
- package/src/lightning/buttonIconStateful/button-icon-stateful.slds.css +215 -453
- package/src/lightning/buttonIconStateful/buttonIconStateful.css +2 -2
- package/src/lightning/buttonMenu/__docs__/buttonMenu.md +8 -8
- package/src/lightning/buttonMenu/{dropdown.slds.css → button-menu.slds.css} +853 -217
- package/src/lightning/buttonMenu/buttonMenu.css +2 -2
- package/src/lightning/buttonMenu/buttonMenu.html +2 -2
- package/src/lightning/buttonMenu/buttonMenu.js +10 -14
- package/src/lightning/buttonStateful/__docs__/buttonStateful.md +12 -12
- package/src/lightning/buttonStateful/button-stateful.slds.css +225 -457
- package/src/lightning/buttonStateful/buttonStateful.css +2 -2
- package/src/lightning/buttonStateful/buttonStateful.js +3 -2
- package/src/lightning/calendar/__examples__/basic/basic.html +7 -0
- package/src/lightning/calendar/__examples__/basic/basic.js +3 -0
- package/src/lightning/calendar/calendar.css +3 -0
- package/src/lightning/calendar/calendar.html +12 -9
- package/src/lightning/calendar/calendar.js +18 -2
- package/src/lightning/calendar/calendar.slds.css +2048 -0
- package/src/lightning/card/__docs__/card.md +3 -3
- package/src/lightning/card/card.css +2 -2
- package/src/lightning/card/card.js +3 -2
- package/src/lightning/card/card.slds.css +141 -88
- package/src/lightning/checkboxGroup/__docs__/checkboxGroup.md +2 -2
- package/src/lightning/colorPickerCustom/colorPickerCustom.css +2 -2
- package/src/lightning/colorPickerCustom/colorPickerCustom.js +3 -2
- package/src/lightning/colorPickerPanel/color-picker-panel.slds.css +11 -38
- package/src/lightning/colorPickerPanel/colorPickerPanel.css +3 -2
- package/src/lightning/colorPickerPanel/colorPickerPanel.js +4 -2
- package/src/lightning/colorPickerPanel/popover.slds.css +121 -0
- package/src/lightning/combobox/combobox.css +4 -0
- package/src/lightning/combobox/combobox.html +31 -29
- package/src/lightning/combobox/combobox.js +21 -4
- package/src/lightning/combobox/combobox.slds.css +13 -0
- package/src/lightning/combobox/form-element.slds.css +281 -0
- package/src/lightning/configProvider/defaultConfig.js +2 -1
- package/src/lightning/datatable/__docs__/datatable.md +45 -35
- package/src/lightning/datatable/autoWidthStrategy.js +3 -0
- package/src/lightning/datatable/columnWidthManager.js +1 -1
- package/src/lightning/datatable/datatable.js +8 -7
- package/src/lightning/datatable/rowSelection.js +7 -4
- package/src/lightning/datatable/templates/table/table.html +1 -0
- package/src/lightning/datepicker/datepicker.css +3 -0
- package/src/lightning/datepicker/datepicker.html +7 -4
- package/src/lightning/datepicker/datepicker.js +76 -20
- package/src/lightning/datepicker/form-element.slds.css +281 -0
- package/src/lightning/datepicker/input-text.slds.css +398 -0
- package/src/lightning/datetimepicker/datetimepicker.css +3 -0
- package/src/lightning/datetimepicker/datetimepicker.html +9 -3
- package/src/lightning/datetimepicker/datetimepicker.js +42 -36
- package/src/lightning/datetimepicker/form-element.slds.css +281 -0
- package/src/lightning/datetimepicker/input-text.slds.css +398 -0
- package/src/lightning/dualListbox/dualListbox.css +2 -2
- package/src/lightning/dualListbox/dualListbox.html +3 -3
- package/src/lightning/dualListbox/dualListbox.js +47 -13
- package/src/lightning/dualListbox/form-element.slds.css +83 -34
- package/src/lightning/dualListbox/keyboard.js +20 -1
- package/src/lightning/dynamicIcon/dynamicIcon.js +3 -2
- 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/formattedRichText/formatted-rich-text.slds.css +230 -0
- package/src/lightning/formattedRichText/formattedRichText.css +2 -0
- package/src/lightning/formattedRichText/formattedRichText.js +4 -2
- package/src/lightning/formattedRichText/linkify.js +2 -2
- package/src/lightning/formattedText/formattedText.css +1 -0
- package/src/lightning/formattedText/formattedText.js +3 -2
- package/src/lightning/helptext/__docs__/helptext.md +2 -2
- package/src/lightning/helptext/form-element.slds.css +83 -34
- package/src/lightning/helptext/help-text.slds.css +215 -453
- package/src/lightning/helptext/helptext.css +2 -2
- package/src/lightning/helptext/helptext.js +3 -2
- package/src/lightning/i18nCldrOptions/README.md +5 -0
- package/src/lightning/i18nService/README.md +5 -0
- package/src/lightning/icon/__docs__/icon.md +5 -5
- package/src/lightning/icon/icon.css +2 -2
- package/src/lightning/icon/icon.js +21 -2
- package/src/lightning/icon/icon.slds.css +29 -17
- package/src/lightning/icon/iconColors.js +1 -0
- package/src/lightning/iconUtils/iconUtils.js +0 -12
- package/src/lightning/iconUtils/polyfill.js +5 -90
- package/src/lightning/input/__docs__/input.md +7 -7
- package/src/lightning/input/__examples__/checkboxbutton/checkboxbutton.css +6 -0
- package/src/lightning/input/__examples__/checkboxbutton/checkboxbutton.html +2 -1
- package/src/lightning/input/__examples__/checkboxbutton/checkboxbutton.js +1 -1
- package/src/lightning/input/__examples__/number/number.html +0 -5
- package/src/lightning/input/__examples__/text/text.html +0 -1
- package/src/lightning/input/form-element.slds.css +281 -0
- package/src/lightning/input/input.css +2 -3
- package/src/lightning/input/input.html +154 -244
- package/src/lightning/input/input.js +306 -595
- package/src/lightning/inputAddress/__docs__/inputAddress.md +3 -3
- package/src/lightning/inputUtils/inputUtils.js +15 -20
- package/src/lightning/inputUtils/normalize.js +7 -0
- package/src/lightning/{input/numberUtil.js → inputUtils/number.js} +1 -1
- package/src/lightning/inputUtils/utils.js +18 -0
- package/src/lightning/internationalizationLibrary/README.md +24 -0
- package/src/lightning/internationalizationLibrary/utils.js +4 -1
- package/src/lightning/layout/__docs__/layout.md +1 -1
- package/src/lightning/layout/__examples__/simple/simple.css +1 -1
- package/src/lightning/layout/layout.css +5 -1
- package/src/lightning/layout/layout.js +4 -2
- package/src/lightning/layoutItem/__examples__/alignmentBump/alignmentBump.css +1 -1
- package/src/lightning/layoutItem/__examples__/sizePerDevice/sizePerDevice.css +0 -1
- package/src/lightning/layoutItem/layoutItem.css +5 -0
- package/src/lightning/layoutItem/layoutItem.js +4 -2
- package/src/lightning/menuDivider/menu-divider.slds.css +15 -0
- package/src/lightning/menuDivider/menuDivider.css +3 -0
- package/src/lightning/menuDivider/menuDivider.html +1 -1
- package/src/lightning/menuDivider/menuDivider.js +4 -2
- package/src/lightning/menuItem/menu-item.slds.css +140 -0
- package/src/lightning/menuItem/menuItem.css +3 -0
- package/src/lightning/menuItem/menuItem.html +43 -41
- package/src/lightning/menuItem/menuItem.js +4 -4
- package/src/lightning/menuSubheader/menu-subheader.slds.css +22 -0
- package/src/lightning/menuSubheader/menuSubheader.css +3 -0
- package/src/lightning/menuSubheader/menuSubheader.html +3 -1
- package/src/lightning/menuSubheader/menuSubheader.js +4 -6
- package/src/lightning/modal/__docs__/modal.md +3 -1
- package/src/lightning/modal/__modalUtils__/modalContainerTestConstants.js +267 -0
- package/src/lightning/modal/__modalUtils__/modalContainerTestMethods.js +1165 -0
- package/src/lightning/modal/__modalUtils__/modalContainerTestMockData.js +131 -0
- package/src/lightning/modal/modal.js +1 -1
- package/src/lightning/modalBody/__docs__/modalBody.md +9 -9
- package/src/lightning/modalFooter/__docs__/modalFooter.md +9 -9
- package/src/lightning/modalHeader/__docs__/modalHeader.md +9 -9
- package/src/lightning/overlayContainer/overlayContainer.js +4 -2
- package/src/lightning/pill/__docs__/pill.md +3 -3
- package/src/lightning/pill/avatar.slds.css +272 -0
- package/src/lightning/pill/link.css +3 -0
- package/src/lightning/pill/link.html +1 -1
- package/src/lightning/pill/pill.js +29 -9
- package/src/lightning/pill/pill.slds.css +168 -0
- package/src/lightning/pill/plain.css +3 -0
- package/src/lightning/pill/plain.html +1 -1
- package/src/lightning/pill/plainLink.css +3 -0
- package/src/lightning/pill/plainLink.html +1 -1
- package/src/lightning/pillContainer/__docs__/pillContainer.md +14 -14
- package/src/lightning/pillContainer/barePillContainer.css +3 -0
- package/src/lightning/pillContainer/barePillContainer.html +1 -2
- package/src/lightning/pillContainer/listbox.slds.css +267 -0
- package/src/lightning/pillContainer/pill-container.slds.css +22 -0
- package/src/lightning/pillContainer/pill.slds.css +168 -0
- package/src/lightning/pillContainer/pillContainer.js +7 -3
- package/src/lightning/pillContainer/standardPillContainer.css +4 -0
- package/src/lightning/pillContainer/standardPillContainer.html +2 -2
- package/src/lightning/popup/popover.slds.css +119 -119
- package/src/lightning/popup/popup.css +1 -2
- package/src/lightning/popup/popup.js +3 -2
- package/src/lightning/positionLibrary/elementProxy.js +7 -2
- package/src/lightning/positionLibrary/util.js +8 -0
- package/src/lightning/primitiveBubble/primitiveBubble.css +2 -2
- package/src/lightning/primitiveBubble/primitiveBubble.js +4 -2
- package/src/lightning/primitiveButton/primitiveButton.js +5 -4
- package/src/lightning/primitiveCellFactory/cellWithStandardLayout.html +29 -21
- package/src/lightning/primitiveCellFactory/primitiveCellFactory.js +4 -0
- package/src/lightning/primitiveColorpickerButton/color-picker-button.slds.css +31 -19
- package/src/lightning/primitiveColorpickerButton/primitiveColorpickerButton.css +2 -2
- package/src/lightning/primitiveColorpickerButton/primitiveColorpickerButton.js +5 -3
- package/src/lightning/primitiveIcon/icon.slds.css +209 -0
- package/src/lightning/primitiveIcon/primitiveIcon.css +2 -1
- package/src/lightning/primitiveIcon/primitiveIcon.html +1 -1
- package/src/lightning/primitiveIcon/primitiveIcon.js +26 -16
- package/src/lightning/progressStep/progressStep.js +10 -13
- package/src/lightning/radioGroup/__docs__/radioGroup.md +4 -4
- package/src/lightning/radioGroup/radioGroup.css +2 -1
- package/src/lightning/radioGroup/radioGroup.js +4 -2
- package/src/lightning/select/__docs__/select.md +2 -2
- package/src/lightning/select/form-element.slds.css +83 -34
- package/src/lightning/select/select.css +2 -2
- package/src/lightning/select/select.js +4 -2
- package/src/lightning/select/select.slds.css +86 -34
- package/src/lightning/shadowBaseClassPrivate/shadowBaseClassPrivate.js +1 -1
- package/src/lightning/sldsCommon/sldsCommon.css +251 -89
- package/src/lightning/sldsUtilsAlignment/sldsUtilsAlignment.css +10 -0
- package/src/lightning/sldsUtilsAlignment/sldsUtilsAlignment.js-meta.xml +4 -0
- package/src/lightning/sldsUtilsBorders/sldsUtilsBorders.css +18 -0
- package/src/lightning/sldsUtilsBorders/sldsUtilsBorders.js-meta.xml +4 -0
- package/src/lightning/sldsUtilsBox/sldsUtilsBox.css +24 -0
- package/src/lightning/sldsUtilsBox/sldsUtilsBox.js-meta.xml +4 -0
- package/src/lightning/sldsUtilsFloats/sldsUtilsFloats.css +20 -0
- package/src/lightning/sldsUtilsFloats/sldsUtilsFloats.js-meta.xml +4 -0
- package/src/lightning/sldsUtilsGrid/sldsUtilsGrid.css +259 -0
- package/src/lightning/sldsUtilsGrid/sldsUtilsGrid.js-meta.xml +4 -0
- package/src/lightning/sldsUtilsHyphenation/sldsUtilsHyphenation.css +8 -0
- package/src/lightning/sldsUtilsHyphenation/sldsUtilsHyphenation.js-meta.xml +4 -0
- package/src/lightning/sldsUtilsLineClamp/sldsUtilsLineClamp.css +57 -0
- package/src/lightning/sldsUtilsLineClamp/sldsUtilsLineClamp.js-meta.xml +4 -0
- package/src/lightning/sldsUtilsMargin/sldsUtilsMargin.css +313 -0
- package/src/lightning/sldsUtilsMargin/sldsUtilsMargin.js-meta.xml +4 -0
- package/src/lightning/sldsUtilsPadding/sldsUtilsPadding.css +308 -0
- package/src/lightning/sldsUtilsPadding/sldsUtilsPadding.js-meta.xml +4 -0
- package/src/lightning/sldsUtilsPosition/sldsUtilsPosition.css +18 -0
- package/src/lightning/sldsUtilsPosition/sldsUtilsPosition.js-meta.xml +4 -0
- package/src/lightning/sldsUtilsSizing/sldsUtilsSizing.css +1408 -0
- package/src/lightning/sldsUtilsSizing/sldsUtilsSizing.js-meta.xml +4 -0
- package/src/lightning/sldsUtilsThemes/sldsUtilsThemes.css +295 -0
- package/src/lightning/sldsUtilsThemes/sldsUtilsThemes.js-meta.xml +4 -0
- package/src/lightning/sldsUtilsTruncation/sldsUtilsTruncation.css +14 -0
- package/src/lightning/sldsUtilsTruncation/sldsUtilsTruncation.js-meta.xml +4 -0
- package/src/lightning/slider/__docs__/slider.md +2 -2
- package/src/lightning/spinner/spinner.css +2 -2
- package/src/lightning/spinner/spinner.js +4 -2
- package/src/lightning/tabBar/tab-bar.slds.css +334 -0
- package/src/lightning/tabBar/tabBar.css +2 -0
- package/src/lightning/tabBar/tabBar.html +4 -3
- package/src/lightning/tabBar/tabBar.js +30 -3
- package/src/lightning/tabset/__docs__/tabset.md +2 -2
- package/src/lightning/tabset/tabset.html +5 -4
- package/src/lightning/tabset/tabset.js +29 -11
- package/src/lightning/textarea/__docs__/textarea.md +2 -2
- package/src/lightning/timepicker/form-element.slds.css +281 -0
- package/src/lightning/timepicker/timepicker.css +3 -0
- package/src/lightning/timepicker/timepicker.html +5 -1
- package/src/lightning/timepicker/timepicker.js +22 -17
- package/src/lightning/timepicker/timepicker.slds.css +18 -0
- package/src/lightning/toast/toast.js-meta.xml +2 -0
- package/src/lightning/toastContainer/__docs__/toastContainer.md +14 -34
- package/src/lightning/toastContainer/toastContainer.js +10 -15
- package/src/lightning/tooltipLibrary/tooltipLibrary.js +32 -23
- package/src/lightning/utilsPrivate/browser.js +5 -3
- package/src/lightning/utilsPrivate/os.js +6 -4
- package/src/lightning/utilsPrivate/ssr.js +4 -0
- package/src/lightning/utilsPrivate/utilsPrivate.js +2 -0
- package/src/lightning/verticalNavigation/verticalNavigation.css +2 -1
- package/src/lightning/verticalNavigation/verticalNavigation.js +3 -2
- package/src/lightning/verticalNavigationSection/verticalNavigationSection.css +2 -1
- package/src/lightning/verticalNavigationSection/verticalNavigationSection.js +3 -2
- package/src/lightning/accordion/__perf__DISABLED/accordion-perf-utils.js +0 -76
- package/src/lightning/accordion/__perf__DISABLED/accordion10Multiple25SectionEach.perf.js +0 -57
- package/src/lightning/accordion/__perf__DISABLED/accordion10Simple25SectionEach.perf.js +0 -37
- package/src/lightning/accordion/__perf__DISABLED/accordionMultiple50Section.perf.js +0 -45
- package/src/lightning/accordion/__perf__DISABLED/accordionSimple50Section.perf.js +0 -35
- package/src/lightning/accordion/__perf__DISABLED/container/container.html +0 -15
- package/src/lightning/accordion/__perf__DISABLED/container/container.js +0 -7
- package/src/lightning/iconUtils/isIframeInEdge.js +0 -7
- package/src/lightning/iconUtils/supportsSvg.js +0 -16
- package/src/lightning/input/input-checkbox.slds.css +0 -404
- package/src/lightning/input/input-text.slds.css +0 -287
- package/src/lightning/input/normalize.js +0 -6
- package/src/lightning/input/selection.js +0 -131
- package/src/lightning/positionLibrary/__component__/positionLibraryBounding.spec.js +0 -319
- package/src/lightning/positionLibrary/__component__/x/bounding/bounding.css +0 -16
- package/src/lightning/positionLibrary/__component__/x/bounding/bounding.html +0 -36
- package/src/lightning/positionLibrary/__component__/x/bounding/bounding.js +0 -122
- /package/src/lightning/{baseCombobox → baseComboboxItem}/listbox.slds.css +0 -0
- /package/src/lightning/formattedRichText/{__examples__disabled → __examples__}/basic/basic.html +0 -0
- /package/src/lightning/formattedRichText/{__examples__disabled → __examples__}/basic/basic.js +0 -0
- /package/src/lightning/{input/emailUtil.js → inputUtils/email.js} +0 -0
|
@@ -1,404 +0,0 @@
|
|
|
1
|
-
/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved
|
|
2
|
-
Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
3
|
-
|
|
4
|
-
:host([data-render-mode="shadow"]) {
|
|
5
|
-
/**
|
|
6
|
-
* Host mapping to composed sds-icon
|
|
7
|
-
*
|
|
8
|
-
* Static fallbacks in place for accessibility
|
|
9
|
-
*/
|
|
10
|
-
--sds-c-icon-color-background: var(
|
|
11
|
-
--sds-c-inputcheckbox-color-background,
|
|
12
|
-
var(--sds-s-input-color-background, var(--sds-g-color-neutral-base-1))
|
|
13
|
-
);
|
|
14
|
-
--sds-c-icon-color-foreground: var(--sds-c-inputcheckbox-mark-color-foreground, transparent);
|
|
15
|
-
--sds-c-icon-color-border: var(
|
|
16
|
-
--sds-c-inputcheckbox-color-border,
|
|
17
|
-
var(--sds-s-input-color-border, var(--sds-g-color-neutral-base-contrast-4))
|
|
18
|
-
);
|
|
19
|
-
--sds-c-icon-sizing: var(--sds-c-inputcheckbox-sizing, 1rem);
|
|
20
|
-
--sds-c-icon-spacing: var(--sds-c-inputcheckbox-spacing);
|
|
21
|
-
--sds-c-icon-radius-border: var(--sds-c-inputcheckbox-radius-border, var(--sds-s-input-radius-border));
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
:host([data-render-mode="shadow"]:hover) {
|
|
25
|
-
--sds-c-inputcheckbox-mark-color-foreground: var(--sds-c-inputcheckbox-mark-color-foreground-hover);
|
|
26
|
-
--sds-c-inputcheckbox-color-background: var(
|
|
27
|
-
--sds-c-inputcheckbox-color-background-hover,
|
|
28
|
-
var(--sds-s-input-color-background-hover)
|
|
29
|
-
);
|
|
30
|
-
--sds-c-inputcheckbox-color-border: var(
|
|
31
|
-
--sds-c-inputcheckbox-color-border-hover,
|
|
32
|
-
var(--sds-s-input-color-border-hover)
|
|
33
|
-
);
|
|
34
|
-
--sds-c-inputcheckbox-label-color: var(--sds-c-inputcheckbox-label-color-hover);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
:host([data-render-mode="shadow"][checked]) {
|
|
38
|
-
--sds-c-inputcheckbox-mark-color-foreground: var(
|
|
39
|
-
--sds-c-inputcheckbox-mark-color-foreground-checked,
|
|
40
|
-
var(--sds-g-color-neutral-base-1)
|
|
41
|
-
);
|
|
42
|
-
--sds-c-inputcheckbox-color-background: var(
|
|
43
|
-
--sds-c-inputcheckbox-color-background-checked,
|
|
44
|
-
var(--sds-g-color-neutral-base-contrast-4)
|
|
45
|
-
);
|
|
46
|
-
--sds-c-inputcheckbox-color-border: var(
|
|
47
|
-
--sds-c-inputcheckbox-color-border-checked,
|
|
48
|
-
var(--sds-g-color-neutral-base-contrast-4)
|
|
49
|
-
);
|
|
50
|
-
--sds-c-inputcheckbox-label-color: var(--sds-c-inputcheckbox-label-color-checked);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
:host([data-render-mode="shadow"][checked]:hover) {
|
|
54
|
-
--sds-c-inputcheckbox-mark-color-foreground-checked: var(
|
|
55
|
-
--sds-c-inputcheckbox-mark-color-foreground-checked-hover
|
|
56
|
-
);
|
|
57
|
-
--sds-c-inputcheckbox-color-background-checked: var(--sds-c-inputcheckbox-color-background-checked-hover);
|
|
58
|
-
--sds-c-inputcheckbox-color-border-checked: var(--sds-c-inputcheckbox-color-border-checked-hover);
|
|
59
|
-
--sds-c-inputcheckbox-label-color-checked: var(
|
|
60
|
-
--sds-c-inputcheckbox-label-color-checked-hover,
|
|
61
|
-
var(--sds-c-inputcheckbox-label-color-hover)
|
|
62
|
-
);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
:host([data-render-mode="shadow"][indeterminate]) {
|
|
66
|
-
--sds-c-inputcheckbox-mark-color-foreground: var(
|
|
67
|
-
--sds-c-inputcheckbox-mark-color-foreground-indeterminate,
|
|
68
|
-
#fff
|
|
69
|
-
);
|
|
70
|
-
--sds-c-inputcheckbox-color-background: var(
|
|
71
|
-
--sds-c-inputcheckbox-color-background-indeterminate,
|
|
72
|
-
var(--sds-s-input-color-background, #111)
|
|
73
|
-
);
|
|
74
|
-
--sds-c-inputcheckbox-color-border: var(
|
|
75
|
-
--sds-c-inputcheckbox-color-border-indeterminate,
|
|
76
|
-
var(--sds-s-input-color-border, #111)
|
|
77
|
-
);
|
|
78
|
-
--sds-c-inputcheckbox-label-color: var(--sds-c-inputcheckbox-label-color-indeterminate);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
:host([data-render-mode="shadow"][indeterminate]:hover) {
|
|
82
|
-
--sds-c-inputcheckbox-mark-color-foreground-indeterminate: var(
|
|
83
|
-
--sds-c-inputcheckbox-mark-color-foreground-indeterminate-hover
|
|
84
|
-
);
|
|
85
|
-
--sds-c-inputcheckbox-color-background-indeterminate: var(
|
|
86
|
-
--sds-c-inputcheckbox-color-background-indeterminate-hover
|
|
87
|
-
);
|
|
88
|
-
--sds-c-inputcheckbox-color-border-indeterminate: var(
|
|
89
|
-
--sds-c-inputcheckbox-color-border-indeterminate-hover
|
|
90
|
-
);
|
|
91
|
-
--sds-c-inputcheckbox-label-color-indeterminate: var(
|
|
92
|
-
--sds-c-inputcheckbox-label-color-indeterminate-hover,
|
|
93
|
-
var(--sds-c-inputcheckbox-label-color-hover)
|
|
94
|
-
);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
:host([data-render-mode="shadow"][focus-visible]) {
|
|
98
|
-
--sds-c-inputcheckbox-shadow: var(
|
|
99
|
-
--sds-c-inputcheckbox-shadow-focus,
|
|
100
|
-
var(--sds-s-input-shadow-focus, 0 0 4px 1px var(--sds-g-color-palette-blue-50, #0176d3))
|
|
101
|
-
);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
:host([data-render-mode="shadow"][disabled]) {
|
|
105
|
-
--sds-c-inputcheckbox-color-background: var(
|
|
106
|
-
--sds-c-inputcheckbox-color-background-disabled,
|
|
107
|
-
var(--sds-s-input-color-background-disabled, #efefef)
|
|
108
|
-
);
|
|
109
|
-
|
|
110
|
-
/* TODO: Add shared border hook when available: https://github.com/salesforce-ux/salesforce-design-system/issues/272 */
|
|
111
|
-
--sds-c-inputcheckbox-color-border: var(--sds-c-inputcheckbox-color-border-disabled, #666);
|
|
112
|
-
--sds-c-inputcheckbox-label-color: var(--sds-c-inputcheckbox-label-color-disabled);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
:host([data-render-mode="shadow"][error]) {
|
|
116
|
-
--sds-c-inputcheckbox-mark-color-foreground: var(--sds-c-inputcheckbox-mark-color-foreground-error);
|
|
117
|
-
--sds-c-inputcheckbox-color-background: var(--sds-c-inputcheckbox-color-background-error);
|
|
118
|
-
--sds-c-inputcheckbox-color-border: var(--sds-c-inputcheckbox-color-border-error);
|
|
119
|
-
--sds-c-inputcheckbox-label-color: var(--sds-c-inputcheckbox-label-color-error);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
:host([data-render-mode="shadow"][disabled][checked]) {
|
|
123
|
-
--sds-c-inputcheckbox-mark-color-foreground: var(
|
|
124
|
-
--sds-c-inputcheckbox-mark-color-foreground-disabled,
|
|
125
|
-
#666
|
|
126
|
-
);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
:host([data-render-mode="shadow"][error][focus-visible]) {
|
|
130
|
-
--sds-c-inputcheckbox-shadow: var(
|
|
131
|
-
--sds-c-inputcheckbox-shadow-error-focus,
|
|
132
|
-
0 0 4px 1px var(--sds-g-color-palette-blue-50, #0176d3)
|
|
133
|
-
);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
:host([data-render-mode="shadow"]) [part~='input-checkbox'] {
|
|
137
|
-
display: inline-flex;
|
|
138
|
-
align-items: center;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
:host([data-render-mode="shadow"]) [part~='indicator'] {
|
|
142
|
-
display: inline-flex;
|
|
143
|
-
align-items: center;
|
|
144
|
-
box-shadow: var(--sds-c-inputcheckbox-shadow, var(--sds-s-input-shadow));
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* Size and position the input on top of our icon for accessibility
|
|
149
|
-
*/
|
|
150
|
-
|
|
151
|
-
:host([data-render-mode="shadow"]) [part~='checkbox'] {
|
|
152
|
-
position: absolute;
|
|
153
|
-
height: calc(
|
|
154
|
-
var(--sds-c-inputcheckbox-sizing, 1rem) + (var(--sds-c-inputcheckbox-sizing-border, 1px) * 2) +
|
|
155
|
-
var(--sds-c-inputcheckbox-spacing, 0px)
|
|
156
|
-
);
|
|
157
|
-
width: calc(
|
|
158
|
-
var(--sds-c-inputcheckbox-sizing, 1rem) + (var(--sds-c-inputcheckbox-sizing-border, 1px) * 2) +
|
|
159
|
-
var(--sds-c-inputcheckbox-spacing, 0px)
|
|
160
|
-
);
|
|
161
|
-
opacity: 0.00001;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
:host([data-render-mode="shadow"]) [part~='label'] {
|
|
165
|
-
padding-inline-start: var(--sds-c-inputcheckbox-label-spacing-inline-start);
|
|
166
|
-
color: var(--sds-c-inputcheckbox-label-color);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved
|
|
170
|
-
Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
171
|
-
|
|
172
|
-
@supports (--styling-hooks: '') {
|
|
173
|
-
/**
|
|
174
|
-
* Base
|
|
175
|
-
*/
|
|
176
|
-
:host([data-render-mode="shadow"]) [part~='input-checkbox'] {
|
|
177
|
-
/* Label */
|
|
178
|
-
--sds-c-inputcheckbox-label-spacing-inline-start: var(
|
|
179
|
-
--slds-c-inputcheckbox-label-spacing-inline-start,
|
|
180
|
-
var(--sds-g-spacing-2, 0.5rem)
|
|
181
|
-
);
|
|
182
|
-
|
|
183
|
-
/* We need 'flex' instead of SDS's 'inline-flex' for the responsive label-inline variant */
|
|
184
|
-
display: flex;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* Label Container
|
|
189
|
-
*/
|
|
190
|
-
:host([data-render-mode="shadow"]) [part~='label-container'] {
|
|
191
|
-
display: inline-flex;
|
|
192
|
-
align-items: center;
|
|
193
|
-
font-size: var(--sds-g-font-scale-neg-3, 0.75rem);
|
|
194
|
-
|
|
195
|
-
/* Accounts for help-text in same row as label */
|
|
196
|
-
padding-inline-end: var(--sds-g-spacing-1, 0.25rem);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
/**
|
|
200
|
-
* Label
|
|
201
|
-
*
|
|
202
|
-
* Add [part~='input-checkbox'] to increase specificity and
|
|
203
|
-
* avoid collisions with other components using [part~='label'] (e.g. slds-input-text)
|
|
204
|
-
*/
|
|
205
|
-
:host([data-render-mode="shadow"]) [part~='input-checkbox'] [part~='label'] {
|
|
206
|
-
color: var(--slds-c-inputcheckbox-label-color, var(--sds-g-color-neutral-base-30, #444444));
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
/**
|
|
210
|
-
* Checkbox
|
|
211
|
-
*
|
|
212
|
-
* Hidden from view, see Indicator for visual faux checkbox.
|
|
213
|
-
*/
|
|
214
|
-
:host([data-render-mode="shadow"]) [part~='checkbox'] {
|
|
215
|
-
width: 1px;
|
|
216
|
-
height: 1px;
|
|
217
|
-
border: 0;
|
|
218
|
-
clip: rect(0 0 0 0);
|
|
219
|
-
margin: -1px;
|
|
220
|
-
overflow: hidden;
|
|
221
|
-
padding: 0;
|
|
222
|
-
position: absolute;
|
|
223
|
-
pointer-events: auto;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
/**
|
|
227
|
-
* Required Marker
|
|
228
|
-
*
|
|
229
|
-
* Extra specificity required due to SDS having too much specificity (@TODO: fix SDS specificity)
|
|
230
|
-
*/
|
|
231
|
-
:host([data-render-mode="shadow"]) abbr[title='required'] {
|
|
232
|
-
color: var(--sds-g-color-error-base-50, #ea001e);
|
|
233
|
-
padding-right: var(--sds-g-spacing-1, 0.25rem);
|
|
234
|
-
text-decoration: none;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
/**
|
|
238
|
-
* Checkbox Indicator
|
|
239
|
-
*
|
|
240
|
-
* ┌────────────────────┐ ┌─────────────────────┐
|
|
241
|
-
* │ sds-icon │ │ Faux via <span> │
|
|
242
|
-
* └────────────────────┘ └─────────────────────┘
|
|
243
|
-
* ▲ ▲
|
|
244
|
-
* ┌────────────────────┐ ┌─────────────────────┐
|
|
245
|
-
* │ sds-input-checkbox │ │ slds-input-checkbox │
|
|
246
|
-
* └────────────────────┘ └─────────────────────┘
|
|
247
|
-
*
|
|
248
|
-
* sds-input-checkbox uses sds-icon for its visual checkbox indicator. SLDS
|
|
249
|
-
* + LBC uses a styled <span>. Due to this divergence, we require custom CSS.
|
|
250
|
-
*/
|
|
251
|
-
:host([data-render-mode="shadow"]) [part~='indicator'] {
|
|
252
|
-
position: relative;
|
|
253
|
-
width: var(--slds-c-inputcheckbox-sizing, 1rem);
|
|
254
|
-
height: var(--slds-c-inputcheckbox-sizing, 1rem);
|
|
255
|
-
border-radius: var(--slds-c-inputcheckbox-radius-border, var(--sds-g-radius-border-1, 0.125rem));
|
|
256
|
-
border: var(--slds-c-inputcheckbox-sizing-border, var(--sds-g-sizing-border-1, 1px)) solid
|
|
257
|
-
var(--slds-c-inputcheckbox-color-border, var(--sds-g-color-neutral-base-80, #c9c9c9));
|
|
258
|
-
background-color: var(--slds-c-inputcheckbox-color-background, var(--sds-g-color-neutral-base-100, #ffffff));
|
|
259
|
-
box-shadow: var(--slds-c-inputcheckbox-shadow);
|
|
260
|
-
transition: border 0.1s linear, background-color 0.1s linear;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
/**
|
|
264
|
-
* Checked
|
|
265
|
-
*/
|
|
266
|
-
:host([data-render-mode="shadow"][checked]) [part~='indicator']::after {
|
|
267
|
-
content: '';
|
|
268
|
-
height: calc(var(--slds-c-inputcheckbox-sizing, 1rem) / 4);
|
|
269
|
-
width: calc(var(--slds-c-inputcheckbox-sizing, 1rem) / 2);
|
|
270
|
-
position: absolute;
|
|
271
|
-
top: 50%;
|
|
272
|
-
left: 50%;
|
|
273
|
-
transform: translate3d(-50%, -50%, 0) rotate(-45deg);
|
|
274
|
-
border-bottom: 2px solid
|
|
275
|
-
var(--slds-c-inputcheckbox-mark-color-foreground, var(--sds-g-color-brand-base-50, #0176d3));
|
|
276
|
-
border-left: 2px solid var(--slds-c-inputcheckbox-mark-color-foreground, var(--sds-g-color-brand-base-50, #0176d3));
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
:host([data-render-mode="shadow"][checked]) [part~='indicator'] {
|
|
280
|
-
--slds-c-inputcheckbox-color-background: var(--slds-c-inputcheckbox-color-background-checked);
|
|
281
|
-
--slds-c-inputcheckbox-color-border: var(--slds-c-inputcheckbox-color-border-checked);
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
/**
|
|
285
|
-
* Disabled
|
|
286
|
-
*/
|
|
287
|
-
:host([data-render-mode="shadow"][disabled]) [part~='indicator'] {
|
|
288
|
-
--slds-c-inputcheckbox-color-background: var(
|
|
289
|
-
--slds-c-inputcheckbox-color-background-disabled,
|
|
290
|
-
var(--sds-g-color-neutral-base-95, #f3f3f3)
|
|
291
|
-
);
|
|
292
|
-
--slds-c-inputcheckbox-color-border: var(--slds-c-inputcheckbox-color-border-disabled);
|
|
293
|
-
--slds-c-inputcheckbox-mark-color-foreground: var(
|
|
294
|
-
--slds-c-inputcheckbox-mark-color-foreground-disabled,
|
|
295
|
-
var(--sds-g-color-neutral-base-60, #939393)
|
|
296
|
-
);
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
/**
|
|
300
|
-
* Focused
|
|
301
|
-
*/
|
|
302
|
-
:host([data-render-mode="shadow"]:focus-within) [part~='indicator'] {
|
|
303
|
-
--slds-c-inputcheckbox-color-background: var(--slds-c-inputcheckbox-color-background-focus);
|
|
304
|
-
--slds-c-inputcheckbox-color-border: var(
|
|
305
|
-
--slds-c-inputcheckbox-color-border-focus,
|
|
306
|
-
var(--sds-g-color-brand-base-50, #0176d3)
|
|
307
|
-
);
|
|
308
|
-
--slds-c-inputcheckbox-shadow: var(
|
|
309
|
-
--slds-c-inputcheckbox-shadow-focus,
|
|
310
|
-
0 0 3px var(--sds-g-color-brand-base-50, #0176d3)
|
|
311
|
-
);
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
/**
|
|
315
|
-
* Invalid
|
|
316
|
-
*/
|
|
317
|
-
:host([data-render-mode="shadow"][invalid]) [part~='indicator'] {
|
|
318
|
-
--slds-c-inputcheckbox-color-background: var(--slds-c-inputcheckbox-color-background-invalid);
|
|
319
|
-
--slds-c-inputcheckbox-sizing-border: var(
|
|
320
|
-
--slds-c-inputcheckbox-sizing-border-invalid,
|
|
321
|
-
var(--sds-g-sizing-border-2, 2px)
|
|
322
|
-
);
|
|
323
|
-
--slds-c-inputcheckbox-color-border: var(
|
|
324
|
-
--slds-c-inputcheckbox-color-border-invalid,
|
|
325
|
-
var(--sds-g-color-error-base-50, #ea001e)
|
|
326
|
-
);
|
|
327
|
-
--slds-c-inputcheckbox-mark-color-foreground: var(
|
|
328
|
-
--slds-c-inputcheckbox-mark-color-foreground-invalid,
|
|
329
|
-
var(--sds-g-color-error-base-50, #ea001e)
|
|
330
|
-
);
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
:host([data-render-mode="shadow"][invalid]) [part~='help-text'] {
|
|
334
|
-
color: var(--slds-c-inputcheckbox-helptext-color-invalid, var(--sds-g-color-error-base-50, #ea001e));
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
/**
|
|
338
|
-
* Label Inline Variant
|
|
339
|
-
*
|
|
340
|
-
* @TODO: Remove magic number for MQ
|
|
341
|
-
*/
|
|
342
|
-
@media (min-width: 48em) {
|
|
343
|
-
:host([data-render-mode="shadow"][variant~='label-inline']) [part~='label-container'] {
|
|
344
|
-
float: left;
|
|
345
|
-
|
|
346
|
-
/* TODO: Get rid of these magic numbers */
|
|
347
|
-
max-width: calc(33% - 1.125rem);
|
|
348
|
-
padding-block-start: var(--sds-g-spacing-1, 0.25rem);
|
|
349
|
-
padding-inline-start: var(--sds-g-spacing-1, 0.25rem);
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
:host([data-render-mode="shadow"][variant~='label-inline']) [part~='input-checkbox'] {
|
|
353
|
-
display: block;
|
|
354
|
-
margin-inline-start: 33%;
|
|
355
|
-
padding-block: var(--sds-g-spacing-1, 0.25rem);
|
|
356
|
-
margin-block-end: var(--sds-g-spacing-2, 0.5rem);
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
:host([data-render-mode="shadow"][variant~='label-inline']) [part~='inline-help'] {
|
|
360
|
-
float: left;
|
|
361
|
-
padding-block-start: var(--sds-g-spacing-1, 0.25rem);
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
:host([data-render-mode="shadow"][variant~='label-inline']) [part~='indicator'] {
|
|
365
|
-
/* @TODO: add change to SDS, removes line-height from display inline */
|
|
366
|
-
display: block;
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
/**
|
|
371
|
-
* Standalone Checkbox
|
|
372
|
-
*
|
|
373
|
-
* label-inline & label-stacked uses the "standalone" checkbox that lives outside the label
|
|
374
|
-
*/
|
|
375
|
-
:host([data-render-mode="shadow"][variant~='label-inline']) [part~='checkbox'],:host([data-render-mode="shadow"][variant~='label-stacked']) [part~='checkbox'] {
|
|
376
|
-
width: 1rem;
|
|
377
|
-
height: 1rem;
|
|
378
|
-
margin: 0;
|
|
379
|
-
clip: auto;
|
|
380
|
-
opacity: 0;
|
|
381
|
-
z-index: 1;
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
/**
|
|
386
|
-
* A temporarily baked-in utility class until SLDS gets a proper utility package.
|
|
387
|
-
*
|
|
388
|
-
* This is a hybrid patch between synthetic and native shadow. The ideal final
|
|
389
|
-
* outcome is the removal of this class and replacing the class with the SLDS
|
|
390
|
-
* utility package solution.
|
|
391
|
-
*/
|
|
392
|
-
|
|
393
|
-
:host([data-render-mode="shadow"]) .slds-assistive-text {
|
|
394
|
-
position: absolute !important;
|
|
395
|
-
margin: -1px !important;
|
|
396
|
-
border: 0 !important;
|
|
397
|
-
padding: 0 !important;
|
|
398
|
-
width: 1px !important;
|
|
399
|
-
height: 1px !important;
|
|
400
|
-
overflow: hidden !important;
|
|
401
|
-
clip: rect(0 0 0 0) !important;
|
|
402
|
-
text-transform: none !important;
|
|
403
|
-
white-space: nowrap !important;
|
|
404
|
-
}
|
|
@@ -1,287 +0,0 @@
|
|
|
1
|
-
/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved
|
|
2
|
-
Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
3
|
-
|
|
4
|
-
/* The Input Control Container holds the `start` and `end` slot contents, as well as the input control itself */
|
|
5
|
-
|
|
6
|
-
:host([data-render-mode="shadow"]) [part~='input-container'] {
|
|
7
|
-
display: flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
position: relative;
|
|
10
|
-
min-height: var(--sds-c-inputtext-sizing-height);
|
|
11
|
-
padding-inline-end: var(--sds-c-inputtext-spacing-inline-end, var(--sds-c-inputtext-spacing-inline));
|
|
12
|
-
padding-inline-start: var(--sds-c-inputtext-spacing-inline-start, var(--sds-c-inputtext-spacing-inline));
|
|
13
|
-
background-color: var(--sds-c-inputtext-color-background, var(--sds-g-color-neutral-base-1));
|
|
14
|
-
border-width: var(--sds-c-inputtext-sizing-border, var(--sds-g-sizing-border-1, 1px));
|
|
15
|
-
border-style: solid;
|
|
16
|
-
border-color: var(--sds-c-inputtext-color-border, var(--sds-g-color-neutral-base-contrast-3));
|
|
17
|
-
border-radius: var(--sds-c-inputtext-radius-border);
|
|
18
|
-
box-shadow: var(--sds-c-inputtext-shadow);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/* The Input element (in markup) */
|
|
22
|
-
|
|
23
|
-
:host([data-render-mode="shadow"]) [part~='input'] {
|
|
24
|
-
width: 100%;
|
|
25
|
-
height: 100%;
|
|
26
|
-
padding: 0;
|
|
27
|
-
font-size: var(--sds-c-inputtext-font-size);
|
|
28
|
-
color: var(--sds-c-inputtext-text-color);
|
|
29
|
-
line-height: 1;
|
|
30
|
-
border: none;
|
|
31
|
-
background: transparent;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/* Placeholder Text */
|
|
35
|
-
|
|
36
|
-
:host([data-render-mode="shadow"]) [part~='input']::placeholder {
|
|
37
|
-
color: var(--sds-c-inputtext-text-color-placeholder);
|
|
38
|
-
font-style: var(--sds-c-inputtext-font-style-placeholder);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/* Focus State */
|
|
42
|
-
|
|
43
|
-
:host([data-render-mode="shadow"]) [part~='input-container']:focus-within {
|
|
44
|
-
--sds-c-inputtext-color-border: var(
|
|
45
|
-
--sds-c-inputtext-color-border-focus,
|
|
46
|
-
var(--sds-g-color-palette-blue-50, #0176d3)
|
|
47
|
-
);
|
|
48
|
-
--sds-c-inputtext-shadow: var(--sds-c-inputtext-shadow-focus, 0 0 3px var(--sds-g-color-palette-blue-50, #0176d3));
|
|
49
|
-
--sds-c-inputtext-color-background: var(--sds-c-inputtext-color-background-focus);
|
|
50
|
-
--sds-c-inputtext-text-color: var(--sds-c-inputtext-text-color-focus);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
:host([data-render-mode="shadow"]) [part~='input']:focus {
|
|
54
|
-
outline: none;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/* Invalid state */
|
|
58
|
-
|
|
59
|
-
:host([data-render-mode="shadow"][aria-invalid='true']) [part~='input-container'] {
|
|
60
|
-
--sds-c-inputtext-color-border: var(--sds-c-inputtext-color-border-invalid);
|
|
61
|
-
--sds-c-inputtext-color-background: var(--sds-c-inputtext-color-background-invalid);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
:host([data-render-mode="shadow"][aria-invalid='true']) [part~='input'] {
|
|
65
|
-
--sds-c-inputtext-text-color: var(--sds-c-inputtext-text-color-invalid);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/* Valid State */
|
|
69
|
-
|
|
70
|
-
:host([data-render-mode="shadow"][aria-invalid='false']) [part~='input-container'] {
|
|
71
|
-
--sds-c-inputtext-color-border: var(--sds-c-inputtext-color-border-valid);
|
|
72
|
-
--sds-c-inputtext-color-background: var(--sds-c-inputtext-color-background-valid);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
:host([data-render-mode="shadow"][aria-invalid='false']) [part~='input'] {
|
|
76
|
-
--sds-c-inputtext-text-color: var(--sds-c-inputtext-text-color-valid);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/* Readonly State */
|
|
80
|
-
|
|
81
|
-
:host([data-render-mode="shadow"][readonly]) [part~='input-container'] {
|
|
82
|
-
--sds-c-inputtext-sizing-border: var(--sds-c-inputtext-sizing-border-readonly);
|
|
83
|
-
--sds-c-inputtext-spacing-inline-start: var(
|
|
84
|
-
--sds-c-inputtext-spacing-inline-start-readonly,
|
|
85
|
-
var(--sds-c-inputtext-spacing-inline-readonly)
|
|
86
|
-
);
|
|
87
|
-
--sds-c-inputtext-spacing-inline-end: var(
|
|
88
|
-
--sds-c-inputtext-spacing-inline-end-readonly,
|
|
89
|
-
var(--sds-c-inputtext-spacing-inline-readonly)
|
|
90
|
-
);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/* Disabled State */
|
|
94
|
-
|
|
95
|
-
:host([data-render-mode="shadow"][disabled]) [part~='input-container'] {
|
|
96
|
-
--sds-c-inputtext-text-color: #3e3e3c; /* TODO: Replace with Global Styling Hook Fallback */
|
|
97
|
-
--sds-c-inputtext-color-background: #ecebea; /* TODO: Replace with Global Styling Hook Fallback */
|
|
98
|
-
--sds-c-inputtext-color-border: #c9c7c5; /* TODO: Replace with Global Styling Hook Fallback */
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
@supports (--styling-hooks: '') {
|
|
102
|
-
/**
|
|
103
|
-
* Input Text
|
|
104
|
-
*/
|
|
105
|
-
:host([data-render-mode="shadow"]) [part~='input-text'] {
|
|
106
|
-
/* Host reassignments to composed slds-icon */
|
|
107
|
-
--slds-c-icon-color-foreground: var(
|
|
108
|
-
--slds-c-inputtext-icon-color-foreground,
|
|
109
|
-
var(--sds-g-color-neutral-base-50, #747474)
|
|
110
|
-
);
|
|
111
|
-
--slds-c-icon-sizing: var(--slds-c-inputtext-icon-sizing, 14px);
|
|
112
|
-
|
|
113
|
-
--sds-c-inputtext-spacing-inline-start: var(
|
|
114
|
-
--slds-c-inputtext-spacing-inline-start,
|
|
115
|
-
var(--sds-g-spacing-3, 0.75rem)
|
|
116
|
-
);
|
|
117
|
-
--sds-c-inputtext-spacing-inline-end: var(--slds-c-inputtext-spacing-inline-end, var(--sds-g-spacing-4, 1rem));
|
|
118
|
-
--sds-c-inputtext-sizing-height: var(--slds-c-inputtext-sizing-height, 1.875rem);
|
|
119
|
-
--sds-c-inputtext-color-background: var(--slds-c-inputtext-color-background, var(--sds-g-color-neutral-base-100, #ffffff));
|
|
120
|
-
--sds-c-inputtext-text-color: var(--slds-c-inputtext-text-color);
|
|
121
|
-
--sds-c-inputtext-font-size: var(--slds-c-inputtext-font-size, var(--sds-g-font-scale-neg-2, 0.8125rem));
|
|
122
|
-
--sds-c-inputtext-text-color-placeholder: var(
|
|
123
|
-
--slds-c-inputtext-text-color-placeholder,
|
|
124
|
-
var(--sds-g-color-neutral-base-50, #747474)
|
|
125
|
-
);
|
|
126
|
-
--sds-c-inputtext-color-border: var(--slds-c-inputtext-color-border, var(--sds-g-color-neutral-base-80, #c9c9c9));
|
|
127
|
-
--sds-c-inputtext-sizing-border: var(--slds-c-inputtext-sizing-border);
|
|
128
|
-
--sds-c-inputtext-radius-border: var(--slds-c-inputtext-radius-border, var(--sds-g-radius-border-2, 0.25rem));
|
|
129
|
-
|
|
130
|
-
display: flex;
|
|
131
|
-
flex-wrap: wrap;
|
|
132
|
-
align-items: center;
|
|
133
|
-
|
|
134
|
-
/* TODO: Add global hook once SLDS creates a new spacing hook that equals the value needed here */
|
|
135
|
-
row-gap: 0.125rem;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* Read Only State
|
|
140
|
-
*/
|
|
141
|
-
:host([data-render-mode="shadow"][readonly]) [part~='input-text'] {
|
|
142
|
-
--sds-c-inputtext-spacing-inline-start-readonly: 0;
|
|
143
|
-
--slds-c-inputtext-color-border: transparent;
|
|
144
|
-
--slds-c-inputtext-color-background: transparent;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* Invalid State
|
|
149
|
-
*
|
|
150
|
-
* Does not use --sds-c-inputtext-color-border-invalid due to this hook being
|
|
151
|
-
* tied to :host([aria-invalid]) which this subsystem does not use. Instead, it
|
|
152
|
-
* uses :host([invalid]).
|
|
153
|
-
*/
|
|
154
|
-
:host([data-render-mode="shadow"][invalid]) [part~='input-text'] {
|
|
155
|
-
--slds-c-inputtext-color-border: var(--sds-g-color-error-base-50, #ea001e);
|
|
156
|
-
--slds-c-inputtext-sizing-border: var(--sds-g-sizing-border-2, 2px);
|
|
157
|
-
--slds-c-icon-color-foreground: var(--sds-g-color-error-base-50, #ea001e);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* Disabled State
|
|
162
|
-
*
|
|
163
|
-
* Both parts form the visible form control.
|
|
164
|
-
*/
|
|
165
|
-
:host([data-render-mode="shadow"][disabled]) [part~='input-container'],:host([data-render-mode="shadow"][disabled]) [part~='input'] {
|
|
166
|
-
cursor: not-allowed;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* Label
|
|
171
|
-
*
|
|
172
|
-
* Add [part~='input-text'] to increase specificity and
|
|
173
|
-
* avoid collisions with other components using [part~='label'] (e.g. slds-input-checkbox)
|
|
174
|
-
*/
|
|
175
|
-
:host([data-render-mode="shadow"]) [part~='input-text'] [part~='label'] {
|
|
176
|
-
padding-inline-end: var(--sds-g-spacing-2, 0.5rem);
|
|
177
|
-
color: var(--slds-c-inputtext-label-color, var(--sds-g-color-neutral-base-30, #444444));
|
|
178
|
-
font-size: var(--slds-c-inputtext-label-font-size, var(--sds-g-font-scale-neg-3, 0.75rem));
|
|
179
|
-
|
|
180
|
-
/* We inline flex to control the spacing between elements and not have to rely on whitespace characters */
|
|
181
|
-
display: inline-flex;
|
|
182
|
-
|
|
183
|
-
/* TODO: Add global hook once SLDS creates a new spacing hook that equals the value needed here */
|
|
184
|
-
column-gap: 0.125rem;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* Label's Required Symbol
|
|
189
|
-
*/
|
|
190
|
-
:host([data-render-mode="shadow"]) [part~='label'] [title='required'] {
|
|
191
|
-
color: var(--sds-g-color-error-base-50, #ea001e);
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* Input Container
|
|
196
|
-
*/
|
|
197
|
-
:host([data-render-mode="shadow"]) [part~='input-container'] {
|
|
198
|
-
flex: 1 0 100%;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
/**
|
|
202
|
-
* Help Text
|
|
203
|
-
*
|
|
204
|
-
* Note: not to be confused with lightning-helptext. This is for the text
|
|
205
|
-
* that goes below the input.
|
|
206
|
-
*/
|
|
207
|
-
:host([data-render-mode="shadow"]) [part~='help-text'] {
|
|
208
|
-
font-size: var(--slds-c-inputtext-helptext-font-size, var(--sds-g-font-scale-neg-3, 0.75rem));
|
|
209
|
-
|
|
210
|
-
/* TODO: Add global hook once SLDS creates a new spacing hook that equals the value needed here */
|
|
211
|
-
padding-block-start: 0.125rem;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
/**
|
|
215
|
-
* Help Text's Invalid State – Part container is unique to SLDS
|
|
216
|
-
*/
|
|
217
|
-
:host([data-render-mode="shadow"][invalid]) [part~='help-text'] {
|
|
218
|
-
color: var(--sds-g-color-error-base-50, #ea001e);
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
/**
|
|
222
|
-
* Start
|
|
223
|
-
*
|
|
224
|
-
* Only expects an SLDS icon. We assign the SLDS Icon Styling Hook here
|
|
225
|
-
* so we don't add spacing to other icons composed in the component, e.g.,
|
|
226
|
-
* the icon in the inline help text.
|
|
227
|
-
*/
|
|
228
|
-
:host([data-render-mode="shadow"]) [part~='start'] {
|
|
229
|
-
--slds-c-icon-spacing-inline-end: var(--sds-g-spacing-2, 0.5rem);
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
/**
|
|
233
|
-
* Label Inline Variant
|
|
234
|
-
*
|
|
235
|
-
* Note: all the 33% values you see are remnants of legacy SLDS. We need to
|
|
236
|
-
* keep this implementation intact so visual output is the same when used
|
|
237
|
-
* in a form that has non-shadow components. Attempting to refactor to a
|
|
238
|
-
* modern solution like flex is proving tricky due to the presence of the
|
|
239
|
-
* optional inline-help and the input needing to have exactly 33% of spacing
|
|
240
|
-
* from the inline-start.
|
|
241
|
-
*
|
|
242
|
-
* Ref: https://github.com/salesforce-ux/design-system-internal/blob/240-winter-23/ui/components/form-element/horizontal/_index.scss#L63
|
|
243
|
-
*/
|
|
244
|
-
@media (min-width: 48em) {
|
|
245
|
-
:host([data-render-mode="shadow"][variant~='label-inline']) [part~='input-text'] {
|
|
246
|
-
display: block;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
:host([data-render-mode="shadow"][variant~='label-inline']) [part~='label'] {
|
|
250
|
-
float: left;
|
|
251
|
-
|
|
252
|
-
/* TODO: Get rid of these magic numbers */
|
|
253
|
-
max-width: calc(33% - 1.125rem);
|
|
254
|
-
padding-block-start: var(--sds-g-spacing-1, 0.25rem);
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
:host([data-render-mode="shadow"][variant~='label-inline']) [part~='input-container'] {
|
|
258
|
-
margin-inline-start: 33%;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
:host([data-render-mode="shadow"][variant~='label-inline']) [part~='inline-help'] {
|
|
262
|
-
float: left;
|
|
263
|
-
padding-block-start: var(--sds-g-spacing-1, 0.25rem);
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
/**
|
|
269
|
-
* A temporarily baked-in utility class until SLDS gets a proper utility package.
|
|
270
|
-
*
|
|
271
|
-
* This is a hybrid patch between synthetic and native shadow. The ideal final
|
|
272
|
-
* outcome is the removal of this class and replacing the class with the SLDS
|
|
273
|
-
* utility package solution.
|
|
274
|
-
*/
|
|
275
|
-
|
|
276
|
-
:host([data-render-mode="shadow"]) .slds-assistive-text {
|
|
277
|
-
position: absolute !important;
|
|
278
|
-
margin: -1px !important;
|
|
279
|
-
border: 0 !important;
|
|
280
|
-
padding: 0 !important;
|
|
281
|
-
width: 1px !important;
|
|
282
|
-
height: 1px !important;
|
|
283
|
-
overflow: hidden !important;
|
|
284
|
-
clip: rect(0 0 0 0) !important;
|
|
285
|
-
text-transform: none !important;
|
|
286
|
-
white-space: nowrap !important;
|
|
287
|
-
}
|