@databricks/design-system 2.0.0 → 2.0.2
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/AGENTS.md +473 -0
- package/CHANGELOG.md +5 -0
- package/README.md +5 -3
- package/dist/{WizardStepContentWrapper-Dvdj_FRA.js → WizardStepContentWrapper-DnwQIMN1.js} +787 -193
- package/dist/WizardStepContentWrapper-DnwQIMN1.js.map +1 -0
- package/dist/dubois-colors.less +2 -0
- package/dist/index-dark.css +10 -319
- package/dist/index-dark.mitigated.css +10 -319
- package/dist/index.css +61 -279
- package/dist/index.js +1809 -155
- package/dist/index.js.map +1 -1
- package/dist/index.mitigated.css +61 -279
- package/dist/patterns.js +10 -1
- package/dist/patterns.js.map +1 -1
- package/dist-types/design-system/Button/Button.d.ts +2 -2
- package/dist-types/design-system/Drawer/DrawerContext.d.ts +9 -0
- package/dist-types/design-system/FormV2/RHFAdapters.d.ts +8 -8
- package/dist-types/design-system/Grid/Col.d.ts +2 -2
- package/dist-types/design-system/Grid/Row.d.ts +2 -2
- package/dist-types/design-system/Icon/__generated/icons/FlowsIcon.d.ts +4 -0
- package/dist-types/design-system/Icon/__generated/icons/LakewatchAlertIcon.d.ts +4 -0
- package/dist-types/design-system/Icon/__generated/icons/LakewatchDatasourceIcon.d.ts +4 -0
- package/dist-types/design-system/Icon/__generated/icons/LakewatchDetectionRuleIcon.d.ts +4 -0
- package/dist-types/design-system/Icon/__generated/icons/LakewatchParserIcon.d.ts +4 -0
- package/dist-types/design-system/Icon/__generated/icons/index.d.ts +5 -0
- package/dist-types/design-system/LegacyTooltip/index.d.ts +0 -1
- package/dist-types/design-system/Skeleton/TitleSkeleton.d.ts +9 -3
- package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxControls.d.ts +2 -0
- package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxMultiSelectInput.d.ts +9 -0
- package/dist-types/design-system/TypeaheadComboboxReactAria/CountBadge.d.ts +6 -0
- package/dist-types/design-system/TypeaheadComboboxReactAria/TypeaheadComboboxAddButton.d.ts +3 -0
- package/dist-types/design-system/TypeaheadComboboxReactAria/TypeaheadComboboxCheckboxItem.d.ts +10 -0
- package/dist-types/design-system/TypeaheadComboboxReactAria/TypeaheadComboboxControls.d.ts +11 -0
- package/dist-types/design-system/TypeaheadComboboxReactAria/TypeaheadComboboxFooter.d.ts +2 -0
- package/dist-types/design-system/TypeaheadComboboxReactAria/TypeaheadComboboxInput.d.ts +9 -0
- package/dist-types/design-system/TypeaheadComboboxReactAria/TypeaheadComboboxMenu.d.ts +17 -0
- package/dist-types/design-system/TypeaheadComboboxReactAria/TypeaheadComboboxMenuItem.d.ts +16 -0
- package/dist-types/design-system/TypeaheadComboboxReactAria/TypeaheadComboboxMultiSelectInput.d.ts +18 -0
- package/dist-types/design-system/TypeaheadComboboxReactAria/TypeaheadComboboxRoot.d.ts +17 -0
- package/dist-types/design-system/TypeaheadComboboxReactAria/TypeaheadComboboxSectionHeader.d.ts +1 -0
- package/dist-types/design-system/TypeaheadComboboxReactAria/TypeaheadComboboxSelectedItem.d.ts +11 -0
- package/dist-types/design-system/TypeaheadComboboxReactAria/TypeaheadComboboxSeparator.d.ts +1 -0
- package/dist-types/design-system/TypeaheadComboboxReactAria/TypeaheadComboboxToggleButton.d.ts +4 -0
- package/dist-types/design-system/TypeaheadComboboxReactAria/hooks/footerFocus.d.ts +13 -0
- package/dist-types/design-system/TypeaheadComboboxReactAria/hooks/index.d.ts +4 -0
- package/dist-types/design-system/TypeaheadComboboxReactAria/hooks/useComboboxItems.d.ts +32 -0
- package/dist-types/design-system/TypeaheadComboboxReactAria/hooks/useComboboxState.d.ts +75 -0
- package/dist-types/design-system/TypeaheadComboboxReactAria/hooks/useComboboxStateProps.d.ts +36 -0
- package/dist-types/design-system/TypeaheadComboboxReactAria/hooks/useMultipleSelectionState.d.ts +25 -0
- package/dist-types/design-system/TypeaheadComboboxReactAria/hooks/useScrollOptionIntoView.d.ts +11 -0
- package/dist-types/design-system/TypeaheadComboboxReactAria/hooks/useTypeaheadComboboxContext.d.ts +2 -0
- package/dist-types/design-system/TypeaheadComboboxReactAria/hooks/useVirtualizedComboboxScroll.d.ts +36 -0
- package/dist-types/design-system/TypeaheadComboboxReactAria/index.d.ts +13 -0
- package/dist-types/design-system/TypeaheadComboboxReactAria/providers/TypeaheadComboboxContext.d.ts +45 -0
- package/dist-types/design-system/Typography/titleLevel.d.ts +11 -0
- package/dist-types/design-system/index.d.ts +1 -0
- package/dist-types/design-system/utils/useMediaQuery.d.ts +4 -1
- package/dist-types/theme/_generated/ValidSemanticColors.d.ts +2 -1
- package/package.json +14 -3
- package/dist/WizardStepContentWrapper-Dvdj_FRA.js.map +0 -1
- package/dist-types/design-system/LegacyTooltip/LegacyInfoTooltip.d.ts +0 -16
package/dist/index.css
CHANGED
|
@@ -10858,220 +10858,6 @@ textarea.du-bois-light-input {
|
|
|
10858
10858
|
background: rgba(255, 255, 255, 0.35) !important;
|
|
10859
10859
|
}
|
|
10860
10860
|
|
|
10861
|
-
/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */
|
|
10862
|
-
/* stylelint-disable no-duplicate-selectors */
|
|
10863
|
-
/* stylelint-disable */
|
|
10864
|
-
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
|
|
10865
|
-
.du-bois-light-modal {
|
|
10866
|
-
box-sizing: border-box;
|
|
10867
|
-
margin: 0;
|
|
10868
|
-
padding: 0;
|
|
10869
|
-
color: #161616;
|
|
10870
|
-
font-size: 13px;
|
|
10871
|
-
font-variant: tabular-nums;
|
|
10872
|
-
line-height: 20px;
|
|
10873
|
-
list-style: none;
|
|
10874
|
-
font-feature-settings: 'tnum';
|
|
10875
|
-
pointer-events: none;
|
|
10876
|
-
position: relative;
|
|
10877
|
-
top: 100px;
|
|
10878
|
-
width: auto;
|
|
10879
|
-
max-width: calc(100vw - 32px);
|
|
10880
|
-
margin: 0 auto;
|
|
10881
|
-
padding-bottom: 24px;
|
|
10882
|
-
}
|
|
10883
|
-
.du-bois-light-modal.du-bois-light-zoom-enter,
|
|
10884
|
-
.du-bois-light-modal.du-bois-lightzoom-appear {
|
|
10885
|
-
transform: none;
|
|
10886
|
-
opacity: 0;
|
|
10887
|
-
animation-duration: 0.3s;
|
|
10888
|
-
user-select: none;
|
|
10889
|
-
}
|
|
10890
|
-
.du-bois-light-modal-mask {
|
|
10891
|
-
position: fixed;
|
|
10892
|
-
top: 0;
|
|
10893
|
-
right: 0;
|
|
10894
|
-
bottom: 0;
|
|
10895
|
-
left: 0;
|
|
10896
|
-
z-index: 1000;
|
|
10897
|
-
height: 100%;
|
|
10898
|
-
background-color: rgba(0, 0, 0, 0.45);
|
|
10899
|
-
}
|
|
10900
|
-
.du-bois-light-modal-mask-hidden {
|
|
10901
|
-
display: none;
|
|
10902
|
-
}
|
|
10903
|
-
.du-bois-light-modal-wrap {
|
|
10904
|
-
position: fixed;
|
|
10905
|
-
top: 0;
|
|
10906
|
-
right: 0;
|
|
10907
|
-
bottom: 0;
|
|
10908
|
-
left: 0;
|
|
10909
|
-
overflow: auto;
|
|
10910
|
-
outline: 0;
|
|
10911
|
-
-webkit-overflow-scrolling: touch;
|
|
10912
|
-
}
|
|
10913
|
-
.du-bois-light-modal-wrap {
|
|
10914
|
-
z-index: 1000;
|
|
10915
|
-
}
|
|
10916
|
-
.du-bois-light-modal-title {
|
|
10917
|
-
margin: 0;
|
|
10918
|
-
color: rgba(0, 0, 0, 0.85);
|
|
10919
|
-
font-weight: 500;
|
|
10920
|
-
font-size: 18px;
|
|
10921
|
-
line-height: 22px;
|
|
10922
|
-
word-wrap: break-word;
|
|
10923
|
-
}
|
|
10924
|
-
.du-bois-light-modal-content {
|
|
10925
|
-
position: relative;
|
|
10926
|
-
background-color: #fff;
|
|
10927
|
-
background-clip: padding-box;
|
|
10928
|
-
border: 0;
|
|
10929
|
-
border-radius: 4px;
|
|
10930
|
-
box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
|
|
10931
|
-
pointer-events: auto;
|
|
10932
|
-
}
|
|
10933
|
-
.du-bois-light-modal-close {
|
|
10934
|
-
position: absolute;
|
|
10935
|
-
top: 0;
|
|
10936
|
-
right: 0;
|
|
10937
|
-
z-index: 10;
|
|
10938
|
-
padding: 0;
|
|
10939
|
-
color: #6F6F6F;
|
|
10940
|
-
font-weight: 700;
|
|
10941
|
-
line-height: 1;
|
|
10942
|
-
text-decoration: none;
|
|
10943
|
-
background: transparent;
|
|
10944
|
-
border: 0;
|
|
10945
|
-
outline: 0;
|
|
10946
|
-
cursor: pointer;
|
|
10947
|
-
transition: color 0.3s;
|
|
10948
|
-
}
|
|
10949
|
-
.du-bois-light-modal-close-x {
|
|
10950
|
-
display: block;
|
|
10951
|
-
width: 102px;
|
|
10952
|
-
height: 102px;
|
|
10953
|
-
font-size: 18px;
|
|
10954
|
-
font-style: normal;
|
|
10955
|
-
line-height: 102px;
|
|
10956
|
-
text-align: center;
|
|
10957
|
-
text-transform: none;
|
|
10958
|
-
text-rendering: auto;
|
|
10959
|
-
}
|
|
10960
|
-
.du-bois-light-modal-close:focus,
|
|
10961
|
-
.du-bois-light-modal-close:hover {
|
|
10962
|
-
color: rgba(0, 0, 0, 0.75);
|
|
10963
|
-
text-decoration: none;
|
|
10964
|
-
}
|
|
10965
|
-
.du-bois-light-modal-header {
|
|
10966
|
-
padding: 40px 40px 20px;
|
|
10967
|
-
color: #161616;
|
|
10968
|
-
background: #fff;
|
|
10969
|
-
border-bottom: 0px solid #f0f0f0;
|
|
10970
|
-
border-radius: 4px 4px 0 0;
|
|
10971
|
-
}
|
|
10972
|
-
.du-bois-light-modal-body {
|
|
10973
|
-
padding: 0 40px;
|
|
10974
|
-
font-size: 13px;
|
|
10975
|
-
line-height: 20px;
|
|
10976
|
-
word-wrap: break-word;
|
|
10977
|
-
}
|
|
10978
|
-
.du-bois-light-modal-footer {
|
|
10979
|
-
padding: 0px 0px;
|
|
10980
|
-
text-align: right;
|
|
10981
|
-
background: transparent;
|
|
10982
|
-
border-top: 0px solid #f0f0f0;
|
|
10983
|
-
border-radius: 0 0 4px 4px;
|
|
10984
|
-
}
|
|
10985
|
-
.du-bois-light-modal-footer .du-bois-light-btn + .du-bois-light-btn:not(.du-bois-light-dropdown-trigger) {
|
|
10986
|
-
margin-bottom: 0;
|
|
10987
|
-
margin-left: 8px;
|
|
10988
|
-
}
|
|
10989
|
-
.du-bois-light-modal-open {
|
|
10990
|
-
overflow: hidden;
|
|
10991
|
-
}
|
|
10992
|
-
.du-bois-light-modal-centered {
|
|
10993
|
-
text-align: center;
|
|
10994
|
-
}
|
|
10995
|
-
.du-bois-light-modal-centered::before {
|
|
10996
|
-
display: inline-block;
|
|
10997
|
-
width: 0;
|
|
10998
|
-
height: 100%;
|
|
10999
|
-
vertical-align: middle;
|
|
11000
|
-
content: '';
|
|
11001
|
-
}
|
|
11002
|
-
.du-bois-light-modal-centered .du-bois-light-modal {
|
|
11003
|
-
top: 0;
|
|
11004
|
-
display: inline-block;
|
|
11005
|
-
text-align: left;
|
|
11006
|
-
vertical-align: middle;
|
|
11007
|
-
}
|
|
11008
|
-
@media (max-width: 767px) {
|
|
11009
|
-
.du-bois-light-modal {
|
|
11010
|
-
max-width: calc(100vw - 16px);
|
|
11011
|
-
margin: 8px auto;
|
|
11012
|
-
}
|
|
11013
|
-
.du-bois-light-modal-centered .du-bois-light-modal {
|
|
11014
|
-
flex: 1;
|
|
11015
|
-
}
|
|
11016
|
-
}
|
|
11017
|
-
.du-bois-light-modal-confirm .du-bois-light-modal-header {
|
|
11018
|
-
display: none;
|
|
11019
|
-
}
|
|
11020
|
-
.du-bois-light-modal-confirm .du-bois-light-modal-body {
|
|
11021
|
-
padding: 32px 32px 24px;
|
|
11022
|
-
}
|
|
11023
|
-
.du-bois-light-modal-confirm-body-wrapper::before {
|
|
11024
|
-
display: table;
|
|
11025
|
-
content: '';
|
|
11026
|
-
}
|
|
11027
|
-
.du-bois-light-modal-confirm-body-wrapper::after {
|
|
11028
|
-
display: table;
|
|
11029
|
-
clear: both;
|
|
11030
|
-
content: '';
|
|
11031
|
-
}
|
|
11032
|
-
.du-bois-light-modal-confirm-body .du-bois-light-modal-confirm-title {
|
|
11033
|
-
display: block;
|
|
11034
|
-
overflow: hidden;
|
|
11035
|
-
color: rgba(0, 0, 0, 0.85);
|
|
11036
|
-
font-weight: 500;
|
|
11037
|
-
font-size: 18px;
|
|
11038
|
-
line-height: 1.4;
|
|
11039
|
-
}
|
|
11040
|
-
.du-bois-light-modal-confirm-body .du-bois-light-modal-confirm-content {
|
|
11041
|
-
margin-top: 8px;
|
|
11042
|
-
color: #161616;
|
|
11043
|
-
font-size: 13px;
|
|
11044
|
-
}
|
|
11045
|
-
.du-bois-light-modal-confirm-body > .anticon {
|
|
11046
|
-
float: left;
|
|
11047
|
-
margin-right: 16px;
|
|
11048
|
-
font-size: 22px;
|
|
11049
|
-
}
|
|
11050
|
-
.du-bois-light-modal-confirm-body > .anticon + .du-bois-light-modal-confirm-title + .du-bois-light-modal-confirm-content {
|
|
11051
|
-
margin-left: 38px;
|
|
11052
|
-
}
|
|
11053
|
-
.du-bois-light-modal-confirm .du-bois-light-modal-confirm-btns {
|
|
11054
|
-
float: right;
|
|
11055
|
-
margin-top: 24px;
|
|
11056
|
-
}
|
|
11057
|
-
.du-bois-light-modal-confirm .du-bois-light-modal-confirm-btns .du-bois-light-btn + .du-bois-light-btn {
|
|
11058
|
-
margin-bottom: 0;
|
|
11059
|
-
margin-left: 8px;
|
|
11060
|
-
}
|
|
11061
|
-
.du-bois-light-modal-confirm-error .du-bois-light-modal-confirm-body > .anticon {
|
|
11062
|
-
color: #C82D4C;
|
|
11063
|
-
}
|
|
11064
|
-
.du-bois-light-modal-confirm-warning .du-bois-light-modal-confirm-body > .anticon,
|
|
11065
|
-
.du-bois-light-modal-confirm-confirm .du-bois-light-modal-confirm-body > .anticon {
|
|
11066
|
-
color: #AF5B23;
|
|
11067
|
-
}
|
|
11068
|
-
.du-bois-light-modal-confirm-info .du-bois-light-modal-confirm-body > .anticon {
|
|
11069
|
-
color: #64727D;
|
|
11070
|
-
}
|
|
11071
|
-
.du-bois-light-modal-confirm-success .du-bois-light-modal-confirm-body > .anticon {
|
|
11072
|
-
color: #34824F;
|
|
11073
|
-
}
|
|
11074
|
-
|
|
11075
10861
|
/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */
|
|
11076
10862
|
/* stylelint-disable no-duplicate-selectors */
|
|
11077
10863
|
/* stylelint-disable */
|
|
@@ -16182,6 +15968,7 @@ span.du-bois-light-typography-ellipsis-single-line {
|
|
|
16182
15968
|
--db-color-text-validation-success: #277c43;
|
|
16183
15969
|
--db-color-text-validation-warning: #be501e;
|
|
16184
15970
|
--db-color-tooltip-background-tooltip: #161616;
|
|
15971
|
+
--db-color-tooltip-text-tooltip: #ffffff;
|
|
16185
15972
|
}
|
|
16186
15973
|
|
|
16187
15974
|
/* THIS FILE IS AUTOMATICALLY GENERATED FROM Figma tokens. DO NOT EDIT.
|
|
@@ -16321,9 +16108,9 @@ span.du-bois-light-typography-ellipsis-single-line {
|
|
|
16321
16108
|
--db-checkbox-focus-ring-offset: var(--db-selection-toggle-focus-ring-offset);
|
|
16322
16109
|
--db-checkbox-transition-duration: var(--db-selection-toggle-transition-duration);
|
|
16323
16110
|
|
|
16324
|
-
/* Indeterminate mark —
|
|
16111
|
+
/* Indeterminate mark — the horizontal dash shown in the mixed state. */
|
|
16325
16112
|
--db-checkbox-indeterminate-mark-width: 8px;
|
|
16326
|
-
--db-checkbox-indeterminate-mark-height:
|
|
16113
|
+
--db-checkbox-indeterminate-mark-height: 3px;
|
|
16327
16114
|
}
|
|
16328
16115
|
|
|
16329
16116
|
/* Native-input <Checkbox> styles. Classic CSS only — no native nesting (the
|
|
@@ -16496,7 +16283,9 @@ span.du-bois-light-typography-ellipsis-single-line {
|
|
|
16496
16283
|
grid-area: 1 / 1;
|
|
16497
16284
|
inline-size: var(--db-checkbox-indeterminate-mark-width);
|
|
16498
16285
|
block-size: var(--db-checkbox-indeterminate-mark-height);
|
|
16499
|
-
|
|
16286
|
+
/* CSS clamps this to half the 3px height, giving fully rounded end caps so the
|
|
16287
|
+
* dash reads as a pill rather than a flat bar. */
|
|
16288
|
+
border-radius: 4px;
|
|
16500
16289
|
background-color: var(--db-checkbox-icon-color);
|
|
16501
16290
|
opacity: 0;
|
|
16502
16291
|
transition: opacity var(--db-checkbox-transition-duration) ease;
|
|
@@ -17006,116 +16795,109 @@ span.du-bois-light-typography-ellipsis-single-line {
|
|
|
17006
16795
|
* (e.g. a following FormMessage) down a few px, breaking the form-flow spacing. */
|
|
17007
16796
|
display: flex;
|
|
17008
16797
|
align-items: center;
|
|
17009
|
-
position: relative;
|
|
17010
16798
|
cursor: pointer;
|
|
17011
16799
|
user-select: none;
|
|
17012
16800
|
width: fit-content;
|
|
17013
16801
|
margin-inline-end: var(--db-switch-spacing);
|
|
17014
16802
|
}
|
|
17015
16803
|
|
|
17016
|
-
|
|
17017
|
-
|
|
16804
|
+
.ds-switch:has(input:disabled) {
|
|
16805
|
+
cursor: not-allowed;
|
|
16806
|
+
}
|
|
16807
|
+
|
|
16808
|
+
/* The track. `appearance: none` strips the native checkbox rendering so the input itself can be styled. */
|
|
16809
|
+
.ds-switch input {
|
|
16810
|
+
appearance: none;
|
|
16811
|
+
position: relative;
|
|
16812
|
+
flex-shrink: 0;
|
|
16813
|
+
margin: 0;
|
|
16814
|
+
cursor: pointer;
|
|
16815
|
+
inline-size: var(--db-switch-track-width);
|
|
16816
|
+
block-size: var(--db-switch-track-height);
|
|
16817
|
+
border: var(--db-switch-border-width) solid var(--db-switch-border-default);
|
|
16818
|
+
border-radius: var(--db-switch-border-radius);
|
|
16819
|
+
background-color: var(--db-switch-bg-default);
|
|
16820
|
+
box-sizing: border-box;
|
|
16821
|
+
transition:
|
|
16822
|
+
background-color var(--db-switch-transition-duration) ease,
|
|
16823
|
+
border-color var(--db-switch-transition-duration) ease;
|
|
16824
|
+
}
|
|
16825
|
+
|
|
16826
|
+
/* The thumb. A pseudo-element keeps the input the switch's only element, so nothing can overlay it
|
|
16827
|
+
* and intercept clicks. Offset left by the border width to sit flush with the track's outer edge. */
|
|
16828
|
+
.ds-switch input::before {
|
|
16829
|
+
content: '';
|
|
16830
|
+
position: absolute;
|
|
16831
|
+
top: 50%;
|
|
16832
|
+
left: calc(-1 * var(--db-switch-border-width));
|
|
16833
|
+
inline-size: var(--db-switch-thumb-size);
|
|
16834
|
+
block-size: var(--db-switch-thumb-size);
|
|
16835
|
+
border: var(--db-switch-border-width) solid;
|
|
16836
|
+
border-color: inherit;
|
|
16837
|
+
border-radius: var(--db-switch-border-radius);
|
|
16838
|
+
background-color: var(--db-switch-thumb-color);
|
|
16839
|
+
box-sizing: border-box;
|
|
16840
|
+
transform: translateY(-50%);
|
|
16841
|
+
transition: transform var(--db-switch-transition-duration) ease;
|
|
16842
|
+
}
|
|
16843
|
+
|
|
16844
|
+
/* `<label for>` propagates `:hover` to the input, so scope hover/press to the control, not `input:hover`. */
|
|
16845
|
+
.ds-switch:hover input:not(:disabled):not(:checked) {
|
|
17018
16846
|
background-color: var(--db-switch-bg-hover);
|
|
17019
16847
|
border-color: var(--db-switch-border-hover);
|
|
17020
16848
|
}
|
|
17021
16849
|
|
|
17022
|
-
.ds-switch:active
|
|
16850
|
+
.ds-switch:active input:not(:disabled):not(:checked) {
|
|
17023
16851
|
background-color: var(--db-switch-bg-press);
|
|
17024
16852
|
border-color: var(--db-switch-border-press);
|
|
17025
16853
|
}
|
|
17026
16854
|
|
|
17027
|
-
.ds-switch
|
|
16855
|
+
.ds-switch input:checked {
|
|
17028
16856
|
background-color: var(--db-switch-bg-checked);
|
|
17029
16857
|
border-color: var(--db-switch-border-checked);
|
|
17030
16858
|
}
|
|
17031
16859
|
|
|
17032
|
-
.ds-switch:hover
|
|
16860
|
+
.ds-switch:hover input:checked:not(:disabled) {
|
|
17033
16861
|
background-color: var(--db-switch-bg-checked-hover);
|
|
17034
16862
|
border-color: var(--db-switch-border-checked-hover);
|
|
17035
16863
|
}
|
|
17036
16864
|
|
|
17037
|
-
.ds-switch:active
|
|
16865
|
+
.ds-switch:active input:checked:not(:disabled) {
|
|
17038
16866
|
background-color: var(--db-switch-bg-checked-press);
|
|
17039
16867
|
border-color: var(--db-switch-border-checked-press);
|
|
17040
16868
|
}
|
|
17041
16869
|
|
|
17042
|
-
.ds-switch
|
|
16870
|
+
.ds-switch input:checked::before {
|
|
17043
16871
|
transform: translateY(-50%) translateX(calc(var(--db-switch-track-width) - var(--db-switch-thumb-size)));
|
|
17044
16872
|
}
|
|
17045
16873
|
|
|
17046
|
-
/* On focus, recolor the
|
|
17047
|
-
*
|
|
17048
|
-
.ds-switch
|
|
16874
|
+
/* On focus, recolor the border to the checked-fill color on top of the outline ring. Matching AntD,
|
|
16875
|
+
* the ring sits flush when off and gains a 1px offset when checked. */
|
|
16876
|
+
.ds-switch input:focus-visible {
|
|
17049
16877
|
border-color: var(--db-switch-border-focus);
|
|
17050
16878
|
outline: var(--db-switch-focus-ring-width) solid var(--db-switch-focus-ring-color);
|
|
17051
16879
|
outline-offset: 0;
|
|
17052
16880
|
}
|
|
17053
16881
|
|
|
17054
|
-
.ds-switch
|
|
16882
|
+
.ds-switch input:checked:focus-visible {
|
|
17055
16883
|
outline-offset: var(--db-switch-focus-ring-offset);
|
|
17056
16884
|
}
|
|
17057
16885
|
|
|
17058
|
-
.ds-switch
|
|
16886
|
+
.ds-switch input:disabled {
|
|
17059
16887
|
cursor: not-allowed;
|
|
17060
|
-
}
|
|
17061
|
-
|
|
17062
|
-
.ds-switch:has(input:disabled) .ds-switch-track {
|
|
17063
16888
|
background-color: var(--db-switch-bg-disabled);
|
|
17064
16889
|
border-color: var(--db-switch-border-disabled);
|
|
17065
16890
|
}
|
|
17066
16891
|
|
|
17067
16892
|
/* Disabled + on: more specific than the plain disabled rule, so it wins regardless of source order. */
|
|
17068
|
-
.ds-switch
|
|
16893
|
+
.ds-switch input:checked:disabled {
|
|
17069
16894
|
background-color: var(--db-switch-bg-checked-disabled);
|
|
17070
16895
|
border-color: var(--db-switch-bg-checked-disabled);
|
|
17071
16896
|
}
|
|
17072
16897
|
|
|
17073
|
-
/* Hidden but still focusable/in tab order so `:has()` can read its state; pointer events fall through
|
|
17074
|
-
* to the label. */
|
|
17075
|
-
.ds-switch input {
|
|
17076
|
-
position: absolute;
|
|
17077
|
-
inset: 0;
|
|
17078
|
-
inline-size: var(--db-switch-track-width);
|
|
17079
|
-
block-size: var(--db-switch-track-height);
|
|
17080
|
-
margin: 0;
|
|
17081
|
-
opacity: 0;
|
|
17082
|
-
pointer-events: none;
|
|
17083
|
-
}
|
|
17084
|
-
|
|
17085
|
-
.ds-switch-track {
|
|
17086
|
-
position: relative;
|
|
17087
|
-
flex-shrink: 0;
|
|
17088
|
-
inline-size: var(--db-switch-track-width);
|
|
17089
|
-
block-size: var(--db-switch-track-height);
|
|
17090
|
-
border: var(--db-switch-border-width) solid var(--db-switch-border-default);
|
|
17091
|
-
border-radius: var(--db-switch-border-radius);
|
|
17092
|
-
background-color: var(--db-switch-bg-default);
|
|
17093
|
-
box-sizing: border-box;
|
|
17094
|
-
transition:
|
|
17095
|
-
background-color var(--db-switch-transition-duration) ease,
|
|
17096
|
-
border-color var(--db-switch-transition-duration) ease;
|
|
17097
|
-
}
|
|
17098
|
-
|
|
17099
|
-
/* `border-color: inherit` picks up the track's per-state color, so it's only set on the track. */
|
|
17100
|
-
.ds-switch-thumb {
|
|
17101
|
-
position: absolute;
|
|
17102
|
-
top: 50%;
|
|
17103
|
-
/* Pull left by the border width so the thumb sits flush with the track's outer edge, not inside it. */
|
|
17104
|
-
left: calc(-1 * var(--db-switch-border-width));
|
|
17105
|
-
inline-size: var(--db-switch-thumb-size);
|
|
17106
|
-
block-size: var(--db-switch-thumb-size);
|
|
17107
|
-
border: var(--db-switch-border-width) solid;
|
|
17108
|
-
border-color: inherit;
|
|
17109
|
-
border-radius: var(--db-switch-border-radius);
|
|
17110
|
-
background-color: var(--db-switch-thumb-color);
|
|
17111
|
-
box-sizing: border-box;
|
|
17112
|
-
transform: translateY(-50%);
|
|
17113
|
-
transition: transform var(--db-switch-transition-duration) ease;
|
|
17114
|
-
}
|
|
17115
|
-
|
|
17116
16898
|
@media (prefers-reduced-motion: reduce) {
|
|
17117
|
-
.ds-switch
|
|
17118
|
-
.ds-switch
|
|
16899
|
+
.ds-switch input,
|
|
16900
|
+
.ds-switch input::before {
|
|
17119
16901
|
transition: none;
|
|
17120
16902
|
}
|
|
17121
16903
|
}
|