@databricks/design-system 2.0.2 → 2.0.3
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/CHANGELOG.md +19 -0
- package/dist/{WizardStepContentWrapper-DnwQIMN1.js → WizardStepContentWrapper-DsAS2ZAT.js} +600 -511
- package/dist/WizardStepContentWrapper-DsAS2ZAT.js.map +1 -0
- package/dist/fonts/dm-mono/DMMono-Regular.woff2 +0 -0
- package/dist/fonts/dm-mono/dm-mono.css +11 -0
- package/dist/index-dark.css +298 -200
- package/dist/index-dark.mitigated.css +298 -200
- package/dist/index.css +383 -271
- package/dist/index.js +230 -157
- package/dist/index.js.map +1 -1
- package/dist/index.mitigated.css +392 -280
- package/dist/patterns.js +3 -2
- package/dist/patterns.js.map +1 -1
- package/dist-types/design-system/ContextMenu/ContextMenu.d.ts +2 -2
- package/dist-types/design-system/DesignSystemProvider/DesignSystemProvider.d.ts +44 -0
- package/dist-types/design-system/Grid/Col.d.ts +1 -3
- package/dist-types/design-system/Grid/NativeCol.d.ts +10 -0
- package/dist-types/design-system/Grid/NativeGridContext.d.ts +11 -0
- package/dist-types/design-system/Grid/NativeRow.d.ts +13 -0
- package/dist-types/design-system/Grid/Row.d.ts +3 -4
- package/dist-types/design-system/Grid/grid-styling.d.ts +22 -0
- package/dist-types/design-system/Grid/gridConstants.d.ts +2 -0
- package/dist-types/design-system/Grid/index.d.ts +1 -0
- package/dist-types/design-system/Grid/rowConstants.d.ts +7 -0
- package/dist-types/design-system/Grid/types.d.ts +49 -0
- package/dist-types/design-system/Hooks/index.d.ts +1 -1
- package/dist-types/design-system/Hooks/useDesignSystemTheme.d.ts +7 -7
- package/dist-types/design-system/Icon/LegacyAntDIcon.d.ts +21 -0
- package/dist-types/design-system/Icon/index.d.ts +0 -1
- package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxAddButton.d.ts +4 -0
- package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxCheckboxItem.d.ts +8 -0
- package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxFooter.d.ts +12 -0
- package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxInput.d.ts +8 -0
- package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxMenu.d.ts +8 -0
- package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxMenuItem.d.ts +8 -0
- package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxMultiSelectInput.d.ts +8 -0
- package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxRoot.d.ts +8 -0
- package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxSectionHeader.d.ts +4 -0
- package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxSelectedItem.d.ts +8 -0
- package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxSeparator.d.ts +4 -0
- package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxToggleButton.d.ts +8 -0
- package/dist-types/design-system/TypeaheadCombobox/hooks/downshiftHookWrappers.d.ts +8 -0
- package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/hooks/useComboboxState.d.ts +6 -0
- package/dist-types/design-system/TypeaheadComboboxV2/hooks/useRestoreHighlightedOption.d.ts +18 -0
- package/dist-types/design-system/TypeaheadComboboxV2/hooks/useTypeaheadComboboxContext.d.ts +2 -0
- package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/providers/TypeaheadComboboxContext.d.ts +6 -4
- package/dist-types/design-system/_shared_/Menu/index.d.ts +1 -1
- package/dist-types/design-system/fonts.d.ts +1 -0
- package/dist-types/design-system/index.d.ts +1 -1
- package/package.json +3 -2
- package/dist/WizardStepContentWrapper-DnwQIMN1.js.map +0 -1
- package/dist-types/design-system/Icon/AntdIcon.d.ts +0 -114
- package/dist-types/design-system/TypeaheadComboboxReactAria/hooks/useTypeaheadComboboxContext.d.ts +0 -2
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/CountBadge.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxAddButton.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxCheckboxItem.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxControls.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxFooter.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxInput.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxMenu.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxMenuItem.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxMultiSelectInput.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxRoot.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxSectionHeader.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxSelectedItem.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxSeparator.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxToggleButton.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/hooks/footerFocus.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/hooks/index.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/hooks/useComboboxItems.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/hooks/useComboboxStateProps.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/hooks/useMultipleSelectionState.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/hooks/useScrollOptionIntoView.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/hooks/useVirtualizedComboboxScroll.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/index.d.ts +0 -0
package/dist/index.mitigated.css
CHANGED
|
@@ -15662,7 +15662,7 @@ span.du-bois-light-typography-ellipsis-single-line {
|
|
|
15662
15662
|
* Source: design-system/src/theme/tokens/*.json
|
|
15663
15663
|
* Regenerate via: yarn theme-regenerate */
|
|
15664
15664
|
|
|
15665
|
-
:where(:root, .du-bois-light) {
|
|
15665
|
+
:where(:root), :where(.du-bois-light) {
|
|
15666
15666
|
--db-radius-0: 0px;
|
|
15667
15667
|
--db-radius-full: 999px;
|
|
15668
15668
|
--db-radius-lg: 12px;
|
|
@@ -15801,44 +15801,57 @@ span.du-bois-light-typography-ellipsis-single-line {
|
|
|
15801
15801
|
* Source: design-system/src/theme/tokens/*.json
|
|
15802
15802
|
* Regenerate via: yarn theme-regenerate */
|
|
15803
15803
|
|
|
15804
|
-
/*
|
|
15805
|
-
|
|
15806
|
-
|
|
15807
|
-
|
|
15808
|
-
|
|
15809
|
-
|
|
15810
|
-
|
|
15811
|
-
|
|
15812
|
-
|
|
15813
|
-
|
|
15814
|
-
|
|
15815
|
-
|
|
15816
|
-
|
|
15817
|
-
*
|
|
15818
|
-
* stack: --ds-stack-gap (spacing), --ds-stack-align (align-items)
|
|
15819
|
-
* cluster: --ds-cluster-gap (spacing), --ds-cluster-align (align-items),
|
|
15820
|
-
* --ds-cluster-justify (justify-content)
|
|
15821
|
-
*
|
|
15822
|
-
* Gap defaults point at the system spacing scale (`--db-space-*`). Padding is
|
|
15823
|
-
* intentionally NOT a knob — a layout primitive owns the space between children,
|
|
15824
|
-
* not its own box padding. */
|
|
15804
|
+
/*
|
|
15805
|
+
Vertical "stack" of elements.
|
|
15806
|
+
Use this for any layout where items are laid out vertically.
|
|
15807
|
+
|
|
15808
|
+
\3c !-- Basic: default gap between each child -->
|
|
15809
|
+
<div class="ds-stack">
|
|
15810
|
+
<h2>Title</h2>
|
|
15811
|
+
<p>Body</p>
|
|
15812
|
+
<button>Action</button>
|
|
15813
|
+
</div>
|
|
15814
|
+
|
|
15815
|
+
\3c !-- Wider gap for this instance -->
|
|
15816
|
+
<div class="ds-stack" style="--ds-stack-gap: var(--db-spacing-lg)">…</div>
|
|
15825
15817
|
|
|
15818
|
+
\3c !-- Don't stretch children to full width (e.g. left-aligned buttons) -->
|
|
15819
|
+
<div class="ds-stack" style="--ds-stack-align: flex-start">…</div>
|
|
15820
|
+
*/
|
|
15826
15821
|
.ds-stack {
|
|
15827
|
-
|
|
15822
|
+
/* These variables act as the *parameters* for the stack instance. */
|
|
15823
|
+
--ds-stack-gap: var(--db-spacing-xs);
|
|
15828
15824
|
--ds-stack-align: stretch;
|
|
15825
|
+
|
|
15829
15826
|
display: flex;
|
|
15830
15827
|
flex-direction: column;
|
|
15831
15828
|
align-items: var(--ds-stack-align);
|
|
15832
15829
|
gap: var(--ds-stack-gap);
|
|
15833
15830
|
}
|
|
15834
15831
|
|
|
15835
|
-
|
|
15836
|
-
|
|
15837
|
-
|
|
15832
|
+
/**
|
|
15833
|
+
Responsive, horizontal "cluster" of elements.
|
|
15834
|
+
Use this for any layout where items are laid out horizontally and should wrap on smaller viewport sizes.
|
|
15835
|
+
|
|
15836
|
+
\3c !-- Basic: items wrap as needed -->
|
|
15837
|
+
<div class="ds-cluster">
|
|
15838
|
+
<span>one</span>
|
|
15839
|
+
<span>two</span>
|
|
15840
|
+
<span>three</span>
|
|
15841
|
+
</div>
|
|
15842
|
+
|
|
15843
|
+
\3c !-- Push children apart (e.g. title left, actions right) -->
|
|
15844
|
+
<div class="ds-cluster" style="--ds-cluster-justify: space-between">…</div>
|
|
15845
|
+
|
|
15846
|
+
\3c !-- Looser gap for this instance -->
|
|
15847
|
+
<div class="ds-cluster" style="--ds-cluster-gap: var(--db-spacing-sm)">…</div>
|
|
15848
|
+
*/
|
|
15838
15849
|
.ds-cluster {
|
|
15839
|
-
|
|
15850
|
+
/* These variables act as the *parameters* for the cluster instance. */
|
|
15851
|
+
--ds-cluster-gap: var(--db-spacing-2xs);
|
|
15840
15852
|
--ds-cluster-align: center;
|
|
15841
15853
|
--ds-cluster-justify: flex-start;
|
|
15854
|
+
|
|
15842
15855
|
display: flex;
|
|
15843
15856
|
flex-wrap: wrap;
|
|
15844
15857
|
align-items: var(--ds-cluster-align);
|
|
@@ -15846,97 +15859,215 @@ span.du-bois-light-typography-ellipsis-single-line {
|
|
|
15846
15859
|
gap: var(--ds-cluster-gap);
|
|
15847
15860
|
}
|
|
15848
15861
|
|
|
15849
|
-
|
|
15850
|
-
|
|
15851
|
-
|
|
15852
|
-
|
|
15853
|
-
|
|
15854
|
-
|
|
15855
|
-
|
|
15856
|
-
|
|
15857
|
-
|
|
15858
|
-
|
|
15859
|
-
|
|
15860
|
-
|
|
15861
|
-
|
|
15862
|
-
|
|
15863
|
-
|
|
15864
|
-
:
|
|
15865
|
-
--db-
|
|
15866
|
-
--db-
|
|
15867
|
-
--db-
|
|
15868
|
-
|
|
15869
|
-
|
|
15870
|
-
--db-
|
|
15871
|
-
--db-
|
|
15872
|
-
|
|
15873
|
-
|
|
15874
|
-
--db-
|
|
15875
|
-
--db-
|
|
15876
|
-
--db-
|
|
15877
|
-
--db-
|
|
15878
|
-
|
|
15879
|
-
|
|
15880
|
-
|
|
15881
|
-
|
|
15882
|
-
|
|
15883
|
-
--db-
|
|
15884
|
-
--db-
|
|
15885
|
-
--db-
|
|
15886
|
-
--db-
|
|
15887
|
-
|
|
15888
|
-
|
|
15889
|
-
|
|
15890
|
-
--db-
|
|
15891
|
-
|
|
15892
|
-
|
|
15893
|
-
|
|
15862
|
+
:where(:root), :where(.du-bois-light) {
|
|
15863
|
+
/* Neutral */
|
|
15864
|
+
--db-neutral-surface: var(--db-color-background-primary);
|
|
15865
|
+
--db-subtle-neutral-surface: var(--db-color-background-secondary);
|
|
15866
|
+
--db-strong-neutral-surface: initial; /* TODO */
|
|
15867
|
+
|
|
15868
|
+
--db-text-on-neutral-surface: var(--db-color-text-primary);
|
|
15869
|
+
--db-subtle-text-on-neutral-surface: var(--db-color-text-secondary);
|
|
15870
|
+
--db-strong-text-on-neutral-surface: initial; /* TODO */
|
|
15871
|
+
|
|
15872
|
+
--db-neutral-border: var(--db-color-border);
|
|
15873
|
+
--db-subtle-neutral-border: initial; /* TODO */
|
|
15874
|
+
--db-strong-neutral-border: var(--db-color-border-accessible);
|
|
15875
|
+
|
|
15876
|
+
--db-neutral-surface-active: var(--db-color-table-background-selected-default);
|
|
15877
|
+
--db-neutral-surface-hover: var(--db-color-table-background-unselected-hover);
|
|
15878
|
+
--db-neutral-surface-pressed: var(--db-color-table-background-selected-hover);
|
|
15879
|
+
--db-neutral-surface-disabled: var(--db-color-action-disabled-background);
|
|
15880
|
+
--db-text-on-neutral-surface-disabled: var(--db-color-action-disabled-text);
|
|
15881
|
+
|
|
15882
|
+
/* Primary */
|
|
15883
|
+
--db-primary-surface: var(--db-color-action-primary-background-default);
|
|
15884
|
+
--db-subtle-primary-surface: var(--db-color-action-default-background-hover);
|
|
15885
|
+
--db-strong-primary-surface: var(--db-color-action-primary-background-hover);
|
|
15886
|
+
|
|
15887
|
+
--db-text-on-primary-surface: var(--db-color-action-primary-text-default);
|
|
15888
|
+
--db-primary-text-on-neutral-surface: var(--db-color-action-link-default);
|
|
15889
|
+
--db-subtle-text-on-primary-surface: initial; /* TODO */
|
|
15890
|
+
--db-strong-text-on-primary-surface: var(--db-color-action-primary-text-default);
|
|
15891
|
+
|
|
15892
|
+
--db-primary-border: var(--db-color-action-primary-background-default);
|
|
15893
|
+
--db-subtle-primary-border: initial; /* TODO */
|
|
15894
|
+
--db-strong-primary-border: var(--db-color-action-primary-background-press);
|
|
15895
|
+
|
|
15896
|
+
--db-primary-surface-active: initial; /* TODO */
|
|
15897
|
+
--db-primary-surface-hover: var(--db-color-action-primary-background-hover);
|
|
15898
|
+
--db-primary-surface-pressed: var(--db-color-action-primary-background-press);
|
|
15899
|
+
--db-primary-surface-disabled: var(--db-color-action-disabled-background);
|
|
15900
|
+
--db-text-on-primary-surface-disabled: var(--db-color-action-disabled-text);
|
|
15901
|
+
|
|
15902
|
+
/* Error */
|
|
15903
|
+
--db-error-surface: var(--db-color-action-danger-primary-background-default);
|
|
15904
|
+
--db-subtle-error-surface: var(--db-color-background-danger);
|
|
15905
|
+
--db-strong-error-surface: var(--db-color-action-danger-primary-background-hover);
|
|
15906
|
+
|
|
15907
|
+
--db-text-on-error-surface: var(--db-color-action-danger-primary-text);
|
|
15908
|
+
--db-error-text-on-neutral-surface: var(--db-color-text-validation-danger);
|
|
15909
|
+
--db-subtle-text-on-error-surface: initial; /* TODO */
|
|
15910
|
+
--db-strong-text-on-error-surface: var(--db-color-action-danger-primary-text);
|
|
15911
|
+
|
|
15912
|
+
--db-error-border: var(--db-color-action-danger-default-border-default);
|
|
15913
|
+
--db-subtle-error-border: var(--db-color-border-danger);
|
|
15914
|
+
--db-strong-error-border: var(--db-color-action-danger-primary-background-press);
|
|
15915
|
+
|
|
15916
|
+
--db-error-surface-active: initial; /* TODO */
|
|
15917
|
+
--db-error-surface-hover: var(--db-color-action-danger-primary-background-hover);
|
|
15918
|
+
--db-error-surface-pressed: var(--db-color-action-danger-primary-background-press);
|
|
15919
|
+
--db-error-surface-disabled: var(--db-color-action-disabled-background);
|
|
15920
|
+
--db-text-on-error-surface-disabled: var(--db-color-action-disabled-text);
|
|
15921
|
+
|
|
15922
|
+
/* Warning */
|
|
15923
|
+
--db-warning-surface: initial; /* TODO */
|
|
15924
|
+
--db-subtle-warning-surface: var(--db-color-background-warning);
|
|
15925
|
+
|
|
15926
|
+
--db-text-on-warning-surface: initial; /* TODO */
|
|
15927
|
+
--db-warning-text-on-neutral-surface: var(--db-color-text-validation-warning);
|
|
15928
|
+
|
|
15929
|
+
--db-warning-border: var(--db-color-border-warning);
|
|
15930
|
+
|
|
15931
|
+
/* Success */
|
|
15932
|
+
--db-success-surface: initial; /* TODO */
|
|
15933
|
+
--db-subtle-success-surface: var(--db-color-background-success);
|
|
15934
|
+
|
|
15935
|
+
--db-text-on-success-surface: initial; /* TODO */
|
|
15936
|
+
--db-success-text-on-neutral-surface: var(--db-color-text-validation-success);
|
|
15937
|
+
|
|
15938
|
+
--db-success-border: initial; /* TODO */
|
|
15939
|
+
}
|
|
15940
|
+
|
|
15941
|
+
|
|
15942
|
+
|
|
15943
|
+
:where(:root), :where(.du-bois-light) {
|
|
15944
|
+
--db-layout-unit: 0.25rem; /* 4px */
|
|
15945
|
+
--db-density-scalar: 1;
|
|
15946
|
+
--db-size-scalar: 1;
|
|
15947
|
+
--db-spacing-scalar: 1;
|
|
15948
|
+
|
|
15949
|
+
/* Size and spacing are the same steps, but with their own scalars included in the calc. */
|
|
15950
|
+
|
|
15951
|
+
--db-size-3xs: calc(var(--db-layout-unit) * 1 * var(--db-density-scalar) * var(--db-size-scalar)); /* 4px */
|
|
15952
|
+
--db-size-2xs: calc(var(--db-layout-unit) * 2 * var(--db-density-scalar) * var(--db-size-scalar)); /* 8px */
|
|
15953
|
+
--db-size-xs: calc(var(--db-layout-unit) * 4 * var(--db-density-scalar) * var(--db-size-scalar)); /* 16px */
|
|
15954
|
+
--db-size-sm: calc(var(--db-layout-unit) * 6 * var(--db-density-scalar) * var(--db-size-scalar)); /* 24px */
|
|
15955
|
+
--db-size-md: calc(var(--db-layout-unit) * 8 * var(--db-density-scalar) * var(--db-size-scalar)); /* 32px */
|
|
15956
|
+
--db-size-lg: calc(var(--db-layout-unit) * 10 * var(--db-density-scalar) * var(--db-size-scalar)); /* 40px */
|
|
15957
|
+
|
|
15958
|
+
--db-spacing-3xs: calc(var(--db-layout-unit) * 1 * var(--db-density-scalar) * var(--db-spacing-scalar)); /* 4px */
|
|
15959
|
+
--db-spacing-2xs: calc(var(--db-layout-unit) * 2 * var(--db-density-scalar) * var(--db-spacing-scalar)); /* 8px */
|
|
15960
|
+
--db-spacing-xs: calc(var(--db-layout-unit) * 4 * var(--db-density-scalar) * var(--db-spacing-scalar)); /* 16px */
|
|
15961
|
+
--db-spacing-sm: calc(var(--db-layout-unit) * 6 * var(--db-density-scalar) * var(--db-spacing-scalar)); /* 24px */
|
|
15962
|
+
--db-spacing-md: calc(var(--db-layout-unit) * 8 * var(--db-density-scalar) * var(--db-spacing-scalar)); /* 32px */
|
|
15963
|
+
--db-spacing-lg: calc(var(--db-layout-unit) * 10 * var(--db-density-scalar) * var(--db-spacing-scalar)); /* 40px */
|
|
15964
|
+
}
|
|
15965
|
+
|
|
15966
|
+
:where(:root), :where(.du-bois-light) {
|
|
15967
|
+
--db-font-family:
|
|
15968
|
+
"DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
15969
|
+
--db-mono-font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
15970
|
+
|
|
15971
|
+
--db-font-size-2xs: 0.6875rem; /* 11px */
|
|
15972
|
+
--db-font-size-xs: 0.75rem; /* 12px */
|
|
15973
|
+
--db-font-size-base: 0.8125rem; /* 13px */
|
|
15974
|
+
--db-font-size-md: 0.875rem; /* 14px */
|
|
15975
|
+
--db-font-size-lg: 0.9375rem; /* 15px */
|
|
15976
|
+
--db-font-size-xl: 1rem; /* 16px */
|
|
15977
|
+
--db-font-size-2xl: 1.25rem; /* 20px */
|
|
15978
|
+
--db-font-size-3xl: 1.5rem; /* 24px */
|
|
15979
|
+
--db-font-size-4xl: 2rem; /* 32px */
|
|
15980
|
+
|
|
15981
|
+
/* Du Bois v1 ships 400 and 600 only */
|
|
15982
|
+
--db-font-weight-normal: 400;
|
|
15983
|
+
--db-font-weight-medium: initial; /* TODO */
|
|
15984
|
+
--db-font-weight-semibold: 600;
|
|
15985
|
+
--db-font-weight-bold: initial; /* TODO */
|
|
15986
|
+
}
|
|
15987
|
+
|
|
15988
|
+
:where(:root), :where(.du-bois-light) {
|
|
15989
|
+
--db-elevation-inset: initial; /* TODO */
|
|
15990
|
+
--db-elevation-low: 0px 2px 3px -1px rgba(0, 0, 0, 0.05), 0px 1px 0px 0px rgba(0, 0, 0, 0.02);
|
|
15991
|
+
--db-elevation-med: 0px 2px 16px 0px rgba(0, 0, 0, 0.08);
|
|
15992
|
+
--db-elevation-high: 0px 8px 40px 0px rgba(0, 0, 0, 0.13);
|
|
15993
|
+
}
|
|
15994
|
+
|
|
15995
|
+
:where(:root), :where(.du-bois-light) {
|
|
15996
|
+
--db-focus-ring-color: var(--db-color-action-default-border-focus);
|
|
15997
|
+
--db-focus-ring-width: 2px;
|
|
15998
|
+
}
|
|
15999
|
+
|
|
16000
|
+
:where(:root), :where(.du-bois-light) {
|
|
16001
|
+
/* Shape */
|
|
16002
|
+
--db-selection-toggle-border-radius: 4px;
|
|
16003
|
+
|
|
16004
|
+
/* Color */
|
|
16005
|
+
--db-selection-toggle-surface: var(--db-neutral-surface);
|
|
16006
|
+
--db-selection-toggle-mark: var(--db-text-on-primary-surface);
|
|
16007
|
+
--db-selection-toggle-text: var(--db-text-on-neutral-surface);
|
|
16008
|
+
--db-selection-toggle-border: var(--db-strong-neutral-border);
|
|
16009
|
+
|
|
16010
|
+
--db-selection-toggle-surface-hover: var(--db-neutral-surface-hover);
|
|
16011
|
+
--db-selection-toggle-surface-press: var(--db-neutral-surface-pressed);
|
|
16012
|
+
--db-selection-toggle-surface-checked: var(--db-primary-surface);
|
|
16013
|
+
--db-selection-toggle-surface-checked-hover: var(--db-primary-surface-hover);
|
|
16014
|
+
--db-selection-toggle-surface-checked-press: var(--db-primary-surface-pressed);
|
|
16015
|
+
--db-selection-toggle-surface-disabled: var(--db-neutral-surface-disabled);
|
|
16016
|
+
--db-selection-toggle-surface-checked-disabled: var(--db-neutral-surface-disabled);
|
|
16017
|
+
|
|
16018
|
+
--db-selection-toggle-border-hover: var(--db-primary-surface-hover);
|
|
16019
|
+
--db-selection-toggle-border-press: var(--db-primary-surface-pressed);
|
|
16020
|
+
--db-selection-toggle-border-disabled: var(--db-neutral-border);
|
|
16021
|
+
|
|
16022
|
+
--db-selection-toggle-mark-disabled: var(--db-text-on-neutral-surface-disabled);
|
|
16023
|
+
--db-selection-toggle-text-disabled: var(--db-text-on-neutral-surface-disabled);
|
|
16024
|
+
|
|
15894
16025
|
--db-selection-toggle-shadow-checked: 0 0 0 1px var(--db-color-action-primary-background-default);
|
|
15895
|
-
|
|
15896
|
-
|
|
16026
|
+
|
|
16027
|
+
/* Density */
|
|
16028
|
+
--db-selection-toggle-size: var(--db-size-xs);
|
|
16029
|
+
--db-selection-toggle-label-spacing: var(--db-spacing-2xs);
|
|
16030
|
+
|
|
16031
|
+
/* Motion */
|
|
15897
16032
|
--db-selection-toggle-transition-duration: 120ms;
|
|
15898
16033
|
}
|
|
15899
16034
|
|
|
15900
|
-
|
|
15901
|
-
|
|
15902
|
-
* checkboxes without affecting switch / radio. */
|
|
15903
|
-
|
|
15904
|
-
/* Re-declared under both theme classes (not just :root) so the var() chain onto
|
|
15905
|
-
* category/system tokens re-resolves inside a `.du-bois-dark` subtree instead of
|
|
15906
|
-
* freezing at the root (light) values. See DUBOIS-448 dark-mode scoping. */
|
|
15907
|
-
:where(:root, .du-bois-light, .du-bois-dark) {
|
|
15908
|
-
--db-checkbox-size: var(--db-selection-toggle-size);
|
|
16035
|
+
:where(:root), :where(.du-bois-light) {
|
|
16036
|
+
/* Shape */
|
|
15909
16037
|
--db-checkbox-border-radius: var(--db-selection-toggle-border-radius);
|
|
15910
16038
|
--db-checkbox-border-width: 1px;
|
|
15911
|
-
--db-checkbox-spacing: var(--db-selection-toggle-spacing);
|
|
15912
16039
|
|
|
15913
|
-
|
|
15914
|
-
--db-checkbox-
|
|
15915
|
-
--db-checkbox-
|
|
15916
|
-
--db-checkbox-
|
|
15917
|
-
--db-checkbox-
|
|
15918
|
-
--db-checkbox-
|
|
15919
|
-
--db-checkbox-
|
|
16040
|
+
/* Color */
|
|
16041
|
+
--db-checkbox-surface: var(--db-selection-toggle-surface);
|
|
16042
|
+
--db-checkbox-surface-hover: var(--db-color-action-default-background-hover);
|
|
16043
|
+
--db-checkbox-surface-press: var(--db-color-action-default-background-press);
|
|
16044
|
+
--db-checkbox-surface-checked: var(--db-selection-toggle-surface-checked);
|
|
16045
|
+
--db-checkbox-surface-checked-hover: var(--db-selection-toggle-surface-checked-hover);
|
|
16046
|
+
--db-checkbox-surface-checked-press: var(--db-selection-toggle-surface-checked-press);
|
|
16047
|
+
--db-checkbox-surface-disabled: var(--db-selection-toggle-surface-disabled);
|
|
15920
16048
|
|
|
15921
|
-
--db-checkbox-border
|
|
16049
|
+
--db-checkbox-border: var(--db-color-action-default-border-default);
|
|
15922
16050
|
--db-checkbox-border-hover: var(--db-selection-toggle-border-hover);
|
|
15923
16051
|
--db-checkbox-border-press: var(--db-selection-toggle-border-press);
|
|
15924
|
-
--db-checkbox-
|
|
15925
|
-
--db-checkbox-border-disabled: var(--db-
|
|
16052
|
+
--db-checkbox-focus-ring: var(--db-focus-ring-color);
|
|
16053
|
+
--db-checkbox-border-disabled: var(--db-color-action-disabled-border);
|
|
15926
16054
|
|
|
15927
|
-
--db-checkbox-
|
|
15928
|
-
--db-checkbox-
|
|
16055
|
+
--db-checkbox-mark: #ffffff;
|
|
16056
|
+
--db-checkbox-mark-disabled: var(--db-selection-toggle-mark-disabled);
|
|
15929
16057
|
--db-checkbox-text: var(--db-selection-toggle-text);
|
|
15930
16058
|
--db-checkbox-text-disabled: var(--db-selection-toggle-text-disabled);
|
|
15931
16059
|
|
|
15932
16060
|
--db-checkbox-shadow-checked: var(--db-selection-toggle-shadow-checked);
|
|
15933
|
-
--db-checkbox-focus-ring-width: var(--db-selection-toggle-focus-ring-width);
|
|
15934
|
-
--db-checkbox-focus-ring-offset: var(--db-selection-toggle-focus-ring-offset);
|
|
15935
|
-
--db-checkbox-transition-duration: var(--db-selection-toggle-transition-duration);
|
|
15936
16061
|
|
|
15937
|
-
/*
|
|
15938
|
-
--db-checkbox-
|
|
15939
|
-
--db-checkbox-
|
|
16062
|
+
/* Density */
|
|
16063
|
+
--db-checkbox-size: var(--db-selection-toggle-size);
|
|
16064
|
+
--db-checkbox-label-spacing: var(--db-selection-toggle-label-spacing);
|
|
16065
|
+
--db-checkbox-focus-ring-width: var(--db-focus-ring-width);
|
|
16066
|
+
--db-checkbox-indeterminate-mark-width: var(--db-size-2xs); /* 8px */
|
|
16067
|
+
--db-checkbox-indeterminate-mark-height: calc(var(--db-size-3xs) * 0.75); /* 3px */
|
|
16068
|
+
|
|
16069
|
+
/* Motion */
|
|
16070
|
+
--db-checkbox-transition-duration: var(--db-selection-toggle-transition-duration);
|
|
15940
16071
|
}
|
|
15941
16072
|
|
|
15942
16073
|
/* Native-input <Checkbox> styles. Classic CSS only — no native nesting (the
|
|
@@ -15983,35 +16114,34 @@ span.du-bois-light-typography-ellipsis-single-line {
|
|
|
15983
16114
|
width: fit-content;
|
|
15984
16115
|
}
|
|
15985
16116
|
|
|
15986
|
-
/* Hover/press live on the root (label), not on the input: the input
|
|
15987
|
-
*
|
|
15988
|
-
*
|
|
15989
|
-
* never match. Putting `:hover` on the root also makes the entire label area
|
|
16117
|
+
/* Hover/press live on the root (label), not on the input: the input is
|
|
16118
|
+
* visually hidden (opacity:0), so an `input:hover` rule wouldn't be visible
|
|
16119
|
+
* anyway. Putting `:hover` on the root also makes the entire label area
|
|
15990
16120
|
* — not just the indicator square — drive the visual feedback. */
|
|
15991
16121
|
.ds-checkbox:hover:has(.ds-checkbox-input:not(:disabled, :checked, :indeterminate)) .ds-checkbox-indicator {
|
|
15992
|
-
background-color: var(--db-checkbox-
|
|
16122
|
+
background-color: var(--db-checkbox-surface-hover);
|
|
15993
16123
|
border-color: var(--db-checkbox-border-hover);
|
|
15994
16124
|
}
|
|
15995
16125
|
|
|
15996
16126
|
.ds-checkbox:active:has(.ds-checkbox-input:not(:disabled, :checked, :indeterminate)) .ds-checkbox-indicator {
|
|
15997
|
-
background-color: var(--db-checkbox-
|
|
16127
|
+
background-color: var(--db-checkbox-surface-press);
|
|
15998
16128
|
border-color: var(--db-checkbox-border-press);
|
|
15999
16129
|
}
|
|
16000
16130
|
|
|
16001
16131
|
/* Selected fill — checked and indeterminate share the same surface. */
|
|
16002
16132
|
.ds-checkbox:has(.ds-checkbox-input:is(:checked, :indeterminate)) .ds-checkbox-indicator {
|
|
16003
|
-
background-color: var(--db-checkbox-
|
|
16004
|
-
border-color: var(--db-checkbox-
|
|
16133
|
+
background-color: var(--db-checkbox-surface-checked);
|
|
16134
|
+
border-color: var(--db-checkbox-surface-checked);
|
|
16005
16135
|
}
|
|
16006
16136
|
|
|
16007
16137
|
.ds-checkbox:hover:has(.ds-checkbox-input:is(:checked, :indeterminate):not(:disabled)) .ds-checkbox-indicator {
|
|
16008
|
-
background-color: var(--db-checkbox-
|
|
16009
|
-
border-color: var(--db-checkbox-
|
|
16138
|
+
background-color: var(--db-checkbox-surface-checked-hover);
|
|
16139
|
+
border-color: var(--db-checkbox-surface-checked-hover);
|
|
16010
16140
|
}
|
|
16011
16141
|
|
|
16012
16142
|
.ds-checkbox:active:has(.ds-checkbox-input:is(:checked, :indeterminate):not(:disabled)) .ds-checkbox-indicator {
|
|
16013
|
-
background-color: var(--db-checkbox-
|
|
16014
|
-
border-color: var(--db-checkbox-
|
|
16143
|
+
background-color: var(--db-checkbox-surface-checked-press);
|
|
16144
|
+
border-color: var(--db-checkbox-surface-checked-press);
|
|
16015
16145
|
}
|
|
16016
16146
|
|
|
16017
16147
|
/* Mark visibility. */
|
|
@@ -16025,8 +16155,8 @@ span.du-bois-light-typography-ellipsis-single-line {
|
|
|
16025
16155
|
|
|
16026
16156
|
/* Focus-visible (keyboard only). */
|
|
16027
16157
|
.ds-checkbox:has(.ds-checkbox-input:focus-visible) .ds-checkbox-indicator {
|
|
16028
|
-
outline: var(--db-checkbox-focus-ring-width) solid var(--db-checkbox-
|
|
16029
|
-
outline-offset:
|
|
16158
|
+
outline: var(--db-checkbox-focus-ring-width) solid var(--db-checkbox-focus-ring);
|
|
16159
|
+
outline-offset: 4px;
|
|
16030
16160
|
}
|
|
16031
16161
|
|
|
16032
16162
|
/* Disabled (covers unchecked, checked, indeterminate). Sourced from
|
|
@@ -16041,22 +16171,28 @@ span.du-bois-light-typography-ellipsis-single-line {
|
|
|
16041
16171
|
}
|
|
16042
16172
|
|
|
16043
16173
|
.ds-checkbox:has(.ds-checkbox-input:disabled) .ds-checkbox-indicator {
|
|
16044
|
-
background-color: var(--db-checkbox-
|
|
16174
|
+
background-color: var(--db-checkbox-surface-disabled);
|
|
16045
16175
|
border-color: var(--db-checkbox-border-disabled);
|
|
16046
16176
|
box-shadow: none;
|
|
16047
16177
|
}
|
|
16048
16178
|
|
|
16049
16179
|
.ds-checkbox:has(.ds-checkbox-input:disabled) .ds-checkbox-checkmark {
|
|
16050
|
-
color: var(--db-checkbox-
|
|
16180
|
+
color: var(--db-checkbox-mark-disabled);
|
|
16051
16181
|
}
|
|
16052
16182
|
|
|
16053
16183
|
.ds-checkbox:has(.ds-checkbox-input:disabled) .ds-checkbox-dash {
|
|
16054
|
-
background-color: var(--db-checkbox-
|
|
16184
|
+
background-color: var(--db-checkbox-mark-disabled);
|
|
16055
16185
|
}
|
|
16056
16186
|
|
|
16057
|
-
/* Visually-hidden native input
|
|
16058
|
-
* `:has()` lookups above can read its
|
|
16059
|
-
*
|
|
16187
|
+
/* Visually-hidden native input (opacity:0) overlaying the indicator square,
|
|
16188
|
+
* kept interactive and in the tab order so `:has()` lookups above can read its
|
|
16189
|
+
* state. It stays pointer-clickable — matching AntD's `.ant-checkbox-input` —
|
|
16190
|
+
* so it is the top-most hit-test target over the box: `getByRole('checkbox').click()`
|
|
16191
|
+
* (Playwright, and any coordinate click that lands on the box) resolves to the
|
|
16192
|
+
* real control instead of the decorative indicator overlay. Making the input
|
|
16193
|
+
* `pointer-events: none` (the prior native-only behavior) is what regressed
|
|
16194
|
+
* interaction tests vs. the AntD variant. `cursor: inherit` tracks the label's
|
|
16195
|
+
* pointer / disabled `not-allowed` cursor so the box keeps AntD's cursor too. */
|
|
16060
16196
|
.ds-checkbox .ds-checkbox-input {
|
|
16061
16197
|
position: absolute;
|
|
16062
16198
|
inset: 0;
|
|
@@ -16064,7 +16200,7 @@ span.du-bois-light-typography-ellipsis-single-line {
|
|
|
16064
16200
|
block-size: var(--db-checkbox-size);
|
|
16065
16201
|
margin: 0;
|
|
16066
16202
|
opacity: 0;
|
|
16067
|
-
|
|
16203
|
+
cursor: inherit;
|
|
16068
16204
|
}
|
|
16069
16205
|
|
|
16070
16206
|
/* Indicator — square with the border/fill that responds to state above.
|
|
@@ -16075,12 +16211,18 @@ span.du-bois-light-typography-ellipsis-single-line {
|
|
|
16075
16211
|
display: grid;
|
|
16076
16212
|
place-items: center;
|
|
16077
16213
|
flex-shrink: 0;
|
|
16214
|
+
/* Decorative only — the overlaid input owns hit-testing. Without this, the
|
|
16215
|
+
* indicator (and its inherited checkmark/dash children) intercept
|
|
16216
|
+
* `getByRole('checkbox').click()`; clicks on any edge sliver the input does
|
|
16217
|
+
* not cover fall through to the label, which toggles via label/input
|
|
16218
|
+
* association. */
|
|
16219
|
+
pointer-events: none;
|
|
16078
16220
|
inline-size: var(--db-checkbox-size);
|
|
16079
16221
|
block-size: var(--db-checkbox-size);
|
|
16080
16222
|
margin-top: calc((var(--db-line-height-base, 20px) - var(--db-checkbox-size)) / 2);
|
|
16081
|
-
border: var(--db-checkbox-border-width) solid var(--db-checkbox-border
|
|
16223
|
+
border: var(--db-checkbox-border-width) solid var(--db-checkbox-border);
|
|
16082
16224
|
border-radius: var(--db-checkbox-border-radius);
|
|
16083
|
-
background-color: var(--db-checkbox-
|
|
16225
|
+
background-color: var(--db-checkbox-surface);
|
|
16084
16226
|
box-sizing: border-box;
|
|
16085
16227
|
transition:
|
|
16086
16228
|
background-color var(--db-checkbox-transition-duration) ease,
|
|
@@ -16092,7 +16234,7 @@ span.du-bois-light-typography-ellipsis-single-line {
|
|
|
16092
16234
|
grid-area: 1 / 1;
|
|
16093
16235
|
inline-size: 100%;
|
|
16094
16236
|
block-size: 100%;
|
|
16095
|
-
color: var(--db-checkbox-
|
|
16237
|
+
color: var(--db-checkbox-mark);
|
|
16096
16238
|
opacity: 0;
|
|
16097
16239
|
transition: opacity var(--db-checkbox-transition-duration) ease;
|
|
16098
16240
|
}
|
|
@@ -16112,7 +16254,7 @@ span.du-bois-light-typography-ellipsis-single-line {
|
|
|
16112
16254
|
/* CSS clamps this to half the 3px height, giving fully rounded end caps so the
|
|
16113
16255
|
* dash reads as a pill rather than a flat bar. */
|
|
16114
16256
|
border-radius: 4px;
|
|
16115
|
-
background-color: var(--db-checkbox-
|
|
16257
|
+
background-color: var(--db-checkbox-mark);
|
|
16116
16258
|
opacity: 0;
|
|
16117
16259
|
transition: opacity var(--db-checkbox-transition-duration) ease;
|
|
16118
16260
|
}
|
|
@@ -16124,7 +16266,7 @@ span.du-bois-light-typography-ellipsis-single-line {
|
|
|
16124
16266
|
* as the AntD variant. */
|
|
16125
16267
|
.ds-checkbox .ds-checkbox-label {
|
|
16126
16268
|
color: var(--db-checkbox-text);
|
|
16127
|
-
padding-inline: var(--db-checkbox-spacing);
|
|
16269
|
+
padding-inline: var(--db-checkbox-label-spacing);
|
|
16128
16270
|
word-break: break-word;
|
|
16129
16271
|
}
|
|
16130
16272
|
|
|
@@ -16149,7 +16291,7 @@ span.du-bois-light-typography-ellipsis-single-line {
|
|
|
16149
16291
|
.ds-checkbox.ds-checkbox + .du-bois-dark-form-message,
|
|
16150
16292
|
.ds-checkbox.ds-checkbox + .du-bois-light-hint + .du-bois-light-form-message,
|
|
16151
16293
|
.ds-checkbox.ds-checkbox + .du-bois-dark-hint + .du-bois-dark-form-message {
|
|
16152
|
-
padding-left: var(--db-
|
|
16294
|
+
padding-left: var(--db-spacing-sm);
|
|
16153
16295
|
margin-top: 0;
|
|
16154
16296
|
}
|
|
16155
16297
|
|
|
@@ -16160,7 +16302,7 @@ span.du-bois-light-typography-ellipsis-single-line {
|
|
|
16160
16302
|
.du-bois-dark-hint + .ds-checkbox-group.ds-checkbox-group,
|
|
16161
16303
|
.ds-checkbox-group.ds-checkbox-group + .du-bois-light-form-message,
|
|
16162
16304
|
.ds-checkbox-group.ds-checkbox-group + .du-bois-dark-form-message {
|
|
16163
|
-
margin-top: var(--db-
|
|
16305
|
+
margin-top: var(--db-spacing-2xs);
|
|
16164
16306
|
}
|
|
16165
16307
|
|
|
16166
16308
|
/* CheckboxGroup layout. Vertical delegates to the `.ds-stack` primitive; the
|
|
@@ -16176,82 +16318,51 @@ span.du-bois-light-typography-ellipsis-single-line {
|
|
|
16176
16318
|
* off the vertical element so it never fights the stack primitive's gap. */
|
|
16177
16319
|
.ds-checkbox-group:not(.ds-stack) {
|
|
16178
16320
|
flex-wrap: nowrap;
|
|
16179
|
-
column-gap: var(--db-checkbox-spacing);
|
|
16321
|
+
column-gap: var(--db-checkbox-label-spacing);
|
|
16180
16322
|
row-gap: 0;
|
|
16181
16323
|
}
|
|
16182
16324
|
|
|
16183
16325
|
/* Vertical: .ds-stack supplies flex-direction + gap; we only retarget the knob. */
|
|
16184
16326
|
.ds-checkbox-group.ds-stack {
|
|
16185
|
-
--ds-stack-gap: var(--db-checkbox-spacing);
|
|
16327
|
+
--ds-stack-gap: var(--db-checkbox-label-spacing);
|
|
16186
16328
|
}
|
|
16187
16329
|
|
|
16188
|
-
|
|
16189
|
-
|
|
16190
|
-
* radios without affecting checkbox / switch.
|
|
16191
|
-
*
|
|
16192
|
-
* Radio differs from Checkbox in two ways: the indicator is a full circle
|
|
16193
|
-
* (border-radius) and the "mark" is a filled dot rather than a checkmark/dash. */
|
|
16194
|
-
|
|
16195
|
-
/* Re-declared under both theme classes (not just :root) so the var() chain onto
|
|
16196
|
-
* category/system tokens re-resolves inside a `.du-bois-dark` subtree instead of
|
|
16197
|
-
* freezing at the root (light) values. See DUBOIS-448 dark-mode scoping. */
|
|
16198
|
-
:where(:root, .du-bois-light, .du-bois-dark) {
|
|
16199
|
-
--db-radio-size: var(--db-selection-toggle-size);
|
|
16200
|
-
/* Circle, not a rounded square — the one shape token that does NOT inherit
|
|
16201
|
-
* the category (square) radius. */
|
|
16330
|
+
:where(:root), :where(.du-bois-light) {
|
|
16331
|
+
/* Shape */
|
|
16202
16332
|
--db-radio-border-radius: var(--db-radius-full);
|
|
16203
16333
|
--db-radio-border-width: 1px;
|
|
16204
|
-
|
|
16205
|
-
|
|
16206
|
-
--db-radio-
|
|
16207
|
-
--db-radio-
|
|
16208
|
-
--db-radio-
|
|
16209
|
-
--db-radio-
|
|
16210
|
-
--db-radio-
|
|
16211
|
-
|
|
16212
|
-
|
|
16213
|
-
|
|
16214
|
-
--db-radio-
|
|
16215
|
-
--db-radio-bg-disabled: var(--db-selection-toggle-bg-disabled);
|
|
16216
|
-
|
|
16217
|
-
--db-radio-border-default: var(--db-selection-toggle-border-default);
|
|
16334
|
+
|
|
16335
|
+
/* Color */
|
|
16336
|
+
--db-radio-surface: var(--db-selection-toggle-surface);
|
|
16337
|
+
--db-radio-surface-hover: var(--db-color-action-default-background-hover);
|
|
16338
|
+
--db-radio-surface-press: var(--db-color-action-default-background-press);
|
|
16339
|
+
--db-radio-surface-checked: var(--db-selection-toggle-surface-checked);
|
|
16340
|
+
--db-radio-surface-checked-hover: var(--db-selection-toggle-surface-checked-hover);
|
|
16341
|
+
--db-radio-surface-checked-press: var(--db-color-action-default-background-press);
|
|
16342
|
+
--db-radio-surface-disabled: var(--db-selection-toggle-surface-disabled);
|
|
16343
|
+
|
|
16344
|
+
--db-radio-border: var(--db-color-action-default-border-default);
|
|
16218
16345
|
--db-radio-border-hover: var(--db-selection-toggle-border-hover);
|
|
16219
16346
|
--db-radio-border-press: var(--db-selection-toggle-border-press);
|
|
16220
|
-
--db-radio-border-focus: var(--db-
|
|
16221
|
-
--db-radio-border-disabled: var(--db-
|
|
16222
|
-
|
|
16223
|
-
/* Two-tone checked hover/press border ring (AntD getRadioInputStyles checked
|
|
16224
|
-
* states): the border is a DARKER shade than the fill, not equal to it.
|
|
16225
|
-
* - checked hover border = actionPrimaryBackgroundPress (== the press category
|
|
16226
|
-
* token, which is action-primary-background-press).
|
|
16227
|
-
* - checked press border = actionDefaultBorderPress; no selection-toggle
|
|
16228
|
-
* category token equals this color, so reference the system token directly. */
|
|
16347
|
+
--db-radio-border-focus: var(--db-focus-ring-color);
|
|
16348
|
+
--db-radio-border-disabled: var(--db-color-action-disabled-border);
|
|
16229
16349
|
--db-radio-border-checked-hover: var(--db-selection-toggle-border-press);
|
|
16230
16350
|
--db-radio-border-checked-press: var(--db-color-action-default-border-press);
|
|
16351
|
+
--db-radio-border-unchecked-focus: var(--db-color-action-primary-background-default);
|
|
16352
|
+
--db-radio-outline-checked-focus: var(--db-color-action-primary-background-default);
|
|
16231
16353
|
|
|
16232
|
-
|
|
16233
|
-
|
|
16234
|
-
* selection-toggle category token equals this color (the closest is a bg
|
|
16235
|
-
* token), so reference the system token directly. */
|
|
16236
|
-
--db-radio-border-focus-unchecked: var(--db-color-action-primary-background-default);
|
|
16237
|
-
/* Checked focus-visible outline color (AntD: outline 1px solid
|
|
16238
|
-
* actionPrimaryBackgroundDefault, outlineOffset 1). */
|
|
16239
|
-
--db-radio-focus-outline-checked-color: var(--db-color-action-primary-background-default);
|
|
16240
|
-
|
|
16241
|
-
/* The dot. Shares the category icon-color token (white over the filled
|
|
16242
|
-
* primary surface) so a retheme moves checkbox checkmark + radio dot together. */
|
|
16243
|
-
--db-radio-dot-color: var(--db-selection-toggle-icon-color);
|
|
16244
|
-
--db-radio-dot-color-disabled: var(--db-selection-toggle-icon-color-disabled);
|
|
16354
|
+
--db-radio-mark: #ffffff;
|
|
16355
|
+
--db-radio-mark-disabled: var(--db-selection-toggle-mark-disabled);
|
|
16245
16356
|
--db-radio-text: var(--db-selection-toggle-text);
|
|
16246
16357
|
--db-radio-text-disabled: var(--db-selection-toggle-text-disabled);
|
|
16247
16358
|
|
|
16248
|
-
|
|
16249
|
-
--db-radio-
|
|
16250
|
-
--db-radio-
|
|
16359
|
+
/* Density */
|
|
16360
|
+
--db-radio-size: var(--db-selection-toggle-size);
|
|
16361
|
+
--db-radio-label-spacing: var(--db-selection-toggle-label-spacing);
|
|
16362
|
+
--db-radio-mark-size: var(--db-size-3xs);
|
|
16251
16363
|
|
|
16252
|
-
/*
|
|
16253
|
-
|
|
16254
|
-
--db-radio-dot-size: var(--db-space-xs);
|
|
16364
|
+
/* Motion */
|
|
16365
|
+
--db-radio-transition-duration: var(--db-selection-toggle-transition-duration);
|
|
16255
16366
|
}
|
|
16256
16367
|
|
|
16257
16368
|
/* Native-input <Radio> styles. Classic CSS only — no native nesting (the
|
|
@@ -16290,36 +16401,36 @@ span.du-bois-light-typography-ellipsis-single-line {
|
|
|
16290
16401
|
width: fit-content;
|
|
16291
16402
|
}
|
|
16292
16403
|
|
|
16293
|
-
/* Hover/press live on the root (label), not on the input: the input
|
|
16294
|
-
*
|
|
16295
|
-
* label area should drive the feedback. */
|
|
16404
|
+
/* Hover/press live on the root (label), not on the input: the input is
|
|
16405
|
+
* visually hidden (opacity:0), so an `input:hover` rule wouldn't be visible
|
|
16406
|
+
* anyway, and the whole label area should drive the feedback. */
|
|
16296
16407
|
.ds-radio:hover:has(input:not(:disabled, :checked)) .ds-radio-indicator {
|
|
16297
|
-
background-color: var(--db-radio-
|
|
16408
|
+
background-color: var(--db-radio-surface-hover);
|
|
16298
16409
|
border-color: var(--db-radio-border-hover);
|
|
16299
16410
|
}
|
|
16300
16411
|
|
|
16301
16412
|
.ds-radio:active:has(input:not(:disabled, :checked)) .ds-radio-indicator {
|
|
16302
|
-
background-color: var(--db-radio-
|
|
16413
|
+
background-color: var(--db-radio-surface-press);
|
|
16303
16414
|
border-color: var(--db-radio-border-press);
|
|
16304
16415
|
}
|
|
16305
16416
|
|
|
16306
16417
|
/* Selected fill. */
|
|
16307
16418
|
.ds-radio:has(input:checked) .ds-radio-indicator {
|
|
16308
|
-
background-color: var(--db-radio-
|
|
16309
|
-
border-color: var(--db-radio-
|
|
16419
|
+
background-color: var(--db-radio-surface-checked);
|
|
16420
|
+
border-color: var(--db-radio-surface-checked);
|
|
16310
16421
|
}
|
|
16311
16422
|
|
|
16312
16423
|
/* AntD getRadioInputStyles checked hover: background = actionPrimaryBackgroundHover,
|
|
16313
16424
|
* borderColor = actionPrimaryBackgroundPress (a darker ring than the fill). */
|
|
16314
16425
|
.ds-radio:hover:has(input:checked:not(:disabled)) .ds-radio-indicator {
|
|
16315
|
-
background-color: var(--db-radio-
|
|
16426
|
+
background-color: var(--db-radio-surface-checked-hover);
|
|
16316
16427
|
border-color: var(--db-radio-border-checked-hover);
|
|
16317
16428
|
}
|
|
16318
16429
|
|
|
16319
16430
|
/* AntD getRadioInputStyles checked active: background = actionDefaultBackgroundPress,
|
|
16320
16431
|
* borderColor = actionDefaultBorderPress (two-tone, not flat). */
|
|
16321
16432
|
.ds-radio:active:has(input:checked:not(:disabled)) .ds-radio-indicator {
|
|
16322
|
-
background-color: var(--db-radio-
|
|
16433
|
+
background-color: var(--db-radio-surface-checked-press);
|
|
16323
16434
|
border-color: var(--db-radio-border-checked-press);
|
|
16324
16435
|
}
|
|
16325
16436
|
|
|
@@ -16334,16 +16445,16 @@ span.du-bois-light-typography-ellipsis-single-line {
|
|
|
16334
16445
|
* UNCHECKED focus (AntD `&:not(disabled) > input:focus + inner`): only the border
|
|
16335
16446
|
* color changes to actionPrimaryBackgroundDefault — NO outline ring. */
|
|
16336
16447
|
.ds-radio:has(input:focus-visible:not(:checked)) .ds-radio-indicator {
|
|
16337
|
-
border-color: var(--db-radio-border-focus
|
|
16448
|
+
border-color: var(--db-radio-border-unchecked-focus);
|
|
16338
16449
|
}
|
|
16339
16450
|
|
|
16340
16451
|
/* CHECKED focus-visible (AntD `&.checked &:not(disabled) > input:focus-visible + inner`):
|
|
16341
16452
|
* background = actionPrimaryBackgroundDefault, borderColor = actionDefaultBorderFocus,
|
|
16342
16453
|
* outline = 1px solid actionPrimaryBackgroundDefault, outlineOffset = 1. */
|
|
16343
16454
|
.ds-radio:has(input:focus-visible:checked) .ds-radio-indicator {
|
|
16344
|
-
background-color: var(--db-radio-
|
|
16455
|
+
background-color: var(--db-radio-surface-checked);
|
|
16345
16456
|
border-color: var(--db-radio-border-focus);
|
|
16346
|
-
outline: 1px solid var(--db-radio-
|
|
16457
|
+
outline: 1px solid var(--db-radio-outline-checked-focus);
|
|
16347
16458
|
outline-offset: 1px;
|
|
16348
16459
|
}
|
|
16349
16460
|
|
|
@@ -16358,18 +16469,24 @@ span.du-bois-light-typography-ellipsis-single-line {
|
|
|
16358
16469
|
}
|
|
16359
16470
|
|
|
16360
16471
|
.ds-radio:has(input:disabled) .ds-radio-indicator {
|
|
16361
|
-
background-color: var(--db-radio-
|
|
16472
|
+
background-color: var(--db-radio-surface-disabled);
|
|
16362
16473
|
border-color: var(--db-radio-border-disabled);
|
|
16363
16474
|
box-shadow: none;
|
|
16364
16475
|
}
|
|
16365
16476
|
|
|
16366
16477
|
.ds-radio:has(input:disabled) .ds-radio-dot {
|
|
16367
|
-
background-color: var(--db-radio-
|
|
16478
|
+
background-color: var(--db-radio-mark-disabled);
|
|
16368
16479
|
}
|
|
16369
16480
|
|
|
16370
|
-
/* Visually-hidden native input
|
|
16371
|
-
* `:has()` lookups above can read
|
|
16372
|
-
*
|
|
16481
|
+
/* Visually-hidden native input (opacity:0) overlaying the indicator circle,
|
|
16482
|
+
* kept interactive and in the tab order so the `:has()` lookups above can read
|
|
16483
|
+
* its state. It stays pointer-clickable — matching AntD's `.ant-radio-input` —
|
|
16484
|
+
* so it is the top-most hit-test target over the circle: `getByRole('radio').click()`
|
|
16485
|
+
* (Playwright, and any coordinate click that lands on the circle) resolves to the
|
|
16486
|
+
* real control instead of the decorative indicator overlay. Making the input
|
|
16487
|
+
* `pointer-events: none` (the prior native-only behavior) is what regressed
|
|
16488
|
+
* interaction tests vs. the AntD variant. `cursor: inherit` tracks the label's
|
|
16489
|
+
* pointer / disabled `not-allowed` cursor so the circle keeps AntD's cursor too. */
|
|
16373
16490
|
.ds-radio input {
|
|
16374
16491
|
position: absolute;
|
|
16375
16492
|
inset: 0;
|
|
@@ -16377,7 +16494,7 @@ span.du-bois-light-typography-ellipsis-single-line {
|
|
|
16377
16494
|
block-size: var(--db-radio-size);
|
|
16378
16495
|
margin: 0;
|
|
16379
16496
|
opacity: 0;
|
|
16380
|
-
|
|
16497
|
+
cursor: inherit;
|
|
16381
16498
|
}
|
|
16382
16499
|
|
|
16383
16500
|
/* Indicator — circle with the border/fill that responds to state above.
|
|
@@ -16387,12 +16504,17 @@ span.du-bois-light-typography-ellipsis-single-line {
|
|
|
16387
16504
|
display: grid;
|
|
16388
16505
|
place-items: center;
|
|
16389
16506
|
flex-shrink: 0;
|
|
16507
|
+
/* Decorative only — the overlaid input owns hit-testing. Without this, the
|
|
16508
|
+
* indicator (and its inherited dot child) intercept `getByRole('radio').click()`;
|
|
16509
|
+
* clicks on any edge sliver the input does not cover fall through to the label,
|
|
16510
|
+
* which toggles via label/input association. */
|
|
16511
|
+
pointer-events: none;
|
|
16390
16512
|
inline-size: var(--db-radio-size);
|
|
16391
16513
|
block-size: var(--db-radio-size);
|
|
16392
16514
|
margin-top: calc((var(--db-line-height-base, 20px) - var(--db-radio-size)) / 2);
|
|
16393
|
-
border: var(--db-radio-border-width) solid var(--db-radio-border
|
|
16515
|
+
border: var(--db-radio-border-width) solid var(--db-radio-border);
|
|
16394
16516
|
border-radius: var(--db-radio-border-radius);
|
|
16395
|
-
background-color: var(--db-radio-
|
|
16517
|
+
background-color: var(--db-radio-surface);
|
|
16396
16518
|
box-sizing: border-box;
|
|
16397
16519
|
transition:
|
|
16398
16520
|
background-color var(--db-radio-transition-duration) ease,
|
|
@@ -16402,10 +16524,10 @@ span.du-bois-light-typography-ellipsis-single-line {
|
|
|
16402
16524
|
|
|
16403
16525
|
.ds-radio .ds-radio-indicator > .ds-radio-dot {
|
|
16404
16526
|
grid-area: 1 / 1;
|
|
16405
|
-
inline-size: var(--db-radio-
|
|
16406
|
-
block-size: var(--db-radio-
|
|
16527
|
+
inline-size: var(--db-radio-mark-size);
|
|
16528
|
+
block-size: var(--db-radio-mark-size);
|
|
16407
16529
|
border-radius: var(--db-radius-full);
|
|
16408
|
-
background-color: var(--db-radio-
|
|
16530
|
+
background-color: var(--db-radio-mark);
|
|
16409
16531
|
opacity: 0;
|
|
16410
16532
|
transition: opacity var(--db-radio-transition-duration) ease;
|
|
16411
16533
|
}
|
|
@@ -16423,7 +16545,7 @@ span.du-bois-light-typography-ellipsis-single-line {
|
|
|
16423
16545
|
* trailing whitespace that separates adjacent radios in a row. */
|
|
16424
16546
|
.ds-radio .ds-radio-label {
|
|
16425
16547
|
color: var(--db-radio-text);
|
|
16426
|
-
padding-inline: var(--db-radio-spacing);
|
|
16548
|
+
padding-inline: var(--db-radio-label-spacing);
|
|
16427
16549
|
word-break: break-word;
|
|
16428
16550
|
}
|
|
16429
16551
|
|
|
@@ -16437,7 +16559,7 @@ span.du-bois-light-typography-ellipsis-single-line {
|
|
|
16437
16559
|
.ds-radio.ds-radio + .du-bois-dark-form-message,
|
|
16438
16560
|
.ds-radio.ds-radio + .du-bois-light-hint + .du-bois-light-form-message,
|
|
16439
16561
|
.ds-radio.ds-radio + .du-bois-dark-hint + .du-bois-dark-form-message {
|
|
16440
|
-
padding-inline-start: var(--db-
|
|
16562
|
+
padding-inline-start: var(--db-spacing-sm);
|
|
16441
16563
|
margin-top: 0;
|
|
16442
16564
|
}
|
|
16443
16565
|
|
|
@@ -16453,8 +16575,8 @@ span.du-bois-light-typography-ellipsis-single-line {
|
|
|
16453
16575
|
.ds-radio-group.ds-stack > .ds-radio.ds-radio + .du-bois-dark-form-message,
|
|
16454
16576
|
.ds-radio-group.ds-stack > .ds-radio.ds-radio + .du-bois-light-hint + .du-bois-light-form-message,
|
|
16455
16577
|
.ds-radio-group.ds-stack > .ds-radio.ds-radio + .du-bois-dark-hint + .du-bois-dark-form-message {
|
|
16456
|
-
margin-top: calc(-1 * var(--db-
|
|
16457
|
-
margin-bottom: var(--db-
|
|
16578
|
+
margin-top: calc(-1 * var(--db-spacing-2xs));
|
|
16579
|
+
margin-bottom: var(--db-spacing-2xs);
|
|
16458
16580
|
}
|
|
16459
16581
|
|
|
16460
16582
|
/* AntD `& > label:last-of-type + hint { marginTop: 0 }`: the last radio has no
|
|
@@ -16472,7 +16594,7 @@ span.du-bois-light-typography-ellipsis-single-line {
|
|
|
16472
16594
|
.du-bois-dark-hint + .ds-radio-group.ds-radio-group,
|
|
16473
16595
|
.ds-radio-group.ds-radio-group + .du-bois-light-form-message,
|
|
16474
16596
|
.ds-radio-group.ds-radio-group + .du-bois-dark-form-message {
|
|
16475
|
-
margin-top: var(--db-
|
|
16597
|
+
margin-top: var(--db-spacing-2xs);
|
|
16476
16598
|
}
|
|
16477
16599
|
|
|
16478
16600
|
/* RadioGroup layout. Vertical (the default) delegates flex-direction to the
|
|
@@ -16488,12 +16610,12 @@ span.du-bois-light-typography-ellipsis-single-line {
|
|
|
16488
16610
|
* no gap of its own, so we zero out the gap and reproduce the rhythm via
|
|
16489
16611
|
* padding-bottom on each radio. */
|
|
16490
16612
|
.ds-radio-group.ds-stack {
|
|
16491
|
-
--ds-stack-gap:
|
|
16613
|
+
--ds-stack-gap: 0;
|
|
16492
16614
|
}
|
|
16493
16615
|
|
|
16494
16616
|
/* AntD `& > label { paddingBottom: sm }`. */
|
|
16495
16617
|
.ds-radio-group.ds-stack > .ds-radio {
|
|
16496
|
-
padding-bottom: var(--db-
|
|
16618
|
+
padding-bottom: var(--db-spacing-2xs);
|
|
16497
16619
|
}
|
|
16498
16620
|
|
|
16499
16621
|
/* AntD `& > label:last-of-type { paddingBottom: 0 }`. */
|
|
@@ -16509,7 +16631,7 @@ span.du-bois-light-typography-ellipsis-single-line {
|
|
|
16509
16631
|
.ds-radio-group.ds-stack > .du-bois-light-radio-tile + .du-bois-dark-radio-tile,
|
|
16510
16632
|
.ds-radio-group.ds-stack > .du-bois-dark-radio-tile + .du-bois-light-radio-tile,
|
|
16511
16633
|
.ds-radio-group.ds-stack > .du-bois-dark-radio-tile + .du-bois-dark-radio-tile {
|
|
16512
|
-
margin-top: var(--db-
|
|
16634
|
+
margin-top: var(--db-spacing-xs);
|
|
16513
16635
|
}
|
|
16514
16636
|
|
|
16515
16637
|
/* Horizontal: AntD `getHorizontalRadioGroupStyles` is a TWO-ROW grid (NOT a flex
|
|
@@ -16522,7 +16644,7 @@ span.du-bois-light-typography-ellipsis-single-line {
|
|
|
16522
16644
|
display: grid;
|
|
16523
16645
|
grid-template-rows: [label] auto [hint] auto;
|
|
16524
16646
|
grid-auto-columns: max-content;
|
|
16525
|
-
column-gap: var(--db-
|
|
16647
|
+
column-gap: var(--db-spacing-xs);
|
|
16526
16648
|
}
|
|
16527
16649
|
|
|
16528
16650
|
/* Equal column widths: AntD `gridAutoColumns: minmax(0, 1fr)`. */
|
|
@@ -16555,64 +16677,52 @@ span.du-bois-light-typography-ellipsis-single-line {
|
|
|
16555
16677
|
* the group itself gets a top margin (room above the two-row grid). */
|
|
16556
16678
|
.ds-radio-group--horizontal:has(> .du-bois-light-hint),
|
|
16557
16679
|
.ds-radio-group--horizontal:has(> .du-bois-dark-hint) {
|
|
16558
|
-
margin-top: var(--db-
|
|
16680
|
+
margin-top: var(--db-spacing-2xs);
|
|
16559
16681
|
}
|
|
16560
16682
|
|
|
16561
16683
|
/* AntD `&& + form-message { marginTop: sm }` (horizontal): a form-message following
|
|
16562
16684
|
* the whole group is separated by sm. */
|
|
16563
16685
|
.ds-radio-group--horizontal + .du-bois-light-form-message,
|
|
16564
16686
|
.ds-radio-group--horizontal + .du-bois-dark-form-message {
|
|
16565
|
-
margin-top: var(--db-
|
|
16687
|
+
margin-top: var(--db-spacing-2xs);
|
|
16566
16688
|
}
|
|
16567
16689
|
|
|
16568
|
-
|
|
16569
|
-
|
|
16570
|
-
|
|
16571
|
-
/* Re-declared under both theme classes (not just :root) so the var() chain onto
|
|
16572
|
-
* category/system tokens re-resolves inside a `.du-bois-dark` subtree instead of
|
|
16573
|
-
* freezing at the root (light) values. See DUBOIS-448 dark-mode scoping. */
|
|
16574
|
-
:where(:root, .du-bois-light, .du-bois-dark) {
|
|
16575
|
-
--db-switch-track-width: 28px;
|
|
16576
|
-
--db-switch-track-height: 16px;
|
|
16577
|
-
/* Thumb fills the track height by design; expressed via track-height so the two can't drift. */
|
|
16578
|
-
--db-switch-thumb-size: var(--db-switch-track-height);
|
|
16579
|
-
/* Pill radius overrides the category (square) radius, mirroring Radio's circular override. */
|
|
16690
|
+
:where(:root), :where(.du-bois-light) {
|
|
16691
|
+
/* Shape */
|
|
16580
16692
|
--db-switch-border-radius: var(--db-radius-full);
|
|
16581
16693
|
--db-switch-border-width: 1px;
|
|
16582
|
-
--db-switch-spacing: var(--db-selection-toggle-spacing);
|
|
16583
16694
|
|
|
16584
|
-
|
|
16585
|
-
--db-switch-
|
|
16586
|
-
--db-switch-
|
|
16587
|
-
--db-switch-
|
|
16588
|
-
--db-switch-
|
|
16589
|
-
--db-switch-
|
|
16590
|
-
--db-switch-
|
|
16695
|
+
/* Color */
|
|
16696
|
+
--db-switch-surface: var(--db-selection-toggle-surface);
|
|
16697
|
+
--db-switch-surface-hover: var(--db-color-action-default-background-hover);
|
|
16698
|
+
--db-switch-surface-press: var(--db-color-action-default-background-press);
|
|
16699
|
+
--db-switch-surface-checked: var(--db-selection-toggle-surface-checked);
|
|
16700
|
+
--db-switch-surface-checked-hover: var(--db-selection-toggle-surface-checked-hover);
|
|
16701
|
+
--db-switch-surface-checked-press: var(--db-selection-toggle-surface-checked-press);
|
|
16702
|
+
--db-switch-surface-disabled: var(--db-selection-toggle-surface-disabled);
|
|
16703
|
+
--db-switch-surface-checked-disabled: var(--db-color-action-disabled-text);
|
|
16591
16704
|
|
|
16592
|
-
--db-switch-border
|
|
16705
|
+
--db-switch-border: var(--db-color-action-default-border-default);
|
|
16593
16706
|
--db-switch-border-hover: var(--db-selection-toggle-border-hover);
|
|
16594
16707
|
--db-switch-border-press: var(--db-selection-toggle-border-press);
|
|
16595
|
-
--db-switch-border-disabled: var(--db-
|
|
16596
|
-
|
|
16597
|
-
--db-switch-border-checked: var(--db-selection-toggle-
|
|
16598
|
-
--db-switch-border-checked-
|
|
16599
|
-
--db-switch-border-
|
|
16600
|
-
|
|
16601
|
-
|
|
16602
|
-
|
|
16603
|
-
--db-switch-
|
|
16604
|
-
|
|
16605
|
-
/* AntD paints the handle the off-track surface color in every state. */
|
|
16606
|
-
--db-switch-thumb-color: var(--db-selection-toggle-bg-default);
|
|
16607
|
-
|
|
16608
|
-
/* A token (not inherit) so the label text flips in dark mode. */
|
|
16609
|
-
--db-switch-text: var(--db-color-text-primary);
|
|
16708
|
+
--db-switch-border-disabled: var(--db-color-action-disabled-border);
|
|
16709
|
+
--db-switch-border-checked: var(--db-selection-toggle-surface-checked);
|
|
16710
|
+
--db-switch-border-checked-hover: var(--db-selection-toggle-surface-checked-hover);
|
|
16711
|
+
--db-switch-border-checked-press: var(--db-selection-toggle-surface-checked-press);
|
|
16712
|
+
--db-switch-border-focus: var(--db-selection-toggle-surface-checked);
|
|
16713
|
+
|
|
16714
|
+
--db-switch-thumb: var(--db-selection-toggle-surface);
|
|
16715
|
+
|
|
16716
|
+
--db-switch-text: var(--db-selection-toggle-text);
|
|
16610
16717
|
--db-switch-text-disabled: var(--db-selection-toggle-text-disabled);
|
|
16611
16718
|
|
|
16612
|
-
/*
|
|
16613
|
-
--db-switch-
|
|
16614
|
-
--db-switch-
|
|
16615
|
-
--db-switch-
|
|
16719
|
+
/* Density */
|
|
16720
|
+
--db-switch-track-width: calc(var(--db-size-xs) * 1.75); /* 28px */
|
|
16721
|
+
--db-switch-track-height: var(--db-size-xs); /* 16px */
|
|
16722
|
+
--db-switch-thumb-size: var(--db-switch-track-height);
|
|
16723
|
+
--db-switch-label-spacing: var(--db-selection-toggle-label-spacing);
|
|
16724
|
+
|
|
16725
|
+
/* Motion */
|
|
16616
16726
|
--db-switch-transition-duration: var(--db-selection-toggle-transition-duration);
|
|
16617
16727
|
}
|
|
16618
16728
|
|
|
@@ -16624,7 +16734,7 @@ span.du-bois-light-typography-ellipsis-single-line {
|
|
|
16624
16734
|
cursor: pointer;
|
|
16625
16735
|
user-select: none;
|
|
16626
16736
|
width: fit-content;
|
|
16627
|
-
margin-inline-end: var(--db-switch-spacing);
|
|
16737
|
+
margin-inline-end: var(--db-switch-label-spacing);
|
|
16628
16738
|
}
|
|
16629
16739
|
|
|
16630
16740
|
.ds-switch:has(input:disabled) {
|
|
@@ -16640,9 +16750,9 @@ span.du-bois-light-typography-ellipsis-single-line {
|
|
|
16640
16750
|
cursor: pointer;
|
|
16641
16751
|
inline-size: var(--db-switch-track-width);
|
|
16642
16752
|
block-size: var(--db-switch-track-height);
|
|
16643
|
-
border: var(--db-switch-border-width) solid var(--db-switch-border
|
|
16753
|
+
border: var(--db-switch-border-width) solid var(--db-switch-border);
|
|
16644
16754
|
border-radius: var(--db-switch-border-radius);
|
|
16645
|
-
background-color: var(--db-switch-
|
|
16755
|
+
background-color: var(--db-switch-surface);
|
|
16646
16756
|
box-sizing: border-box;
|
|
16647
16757
|
transition:
|
|
16648
16758
|
background-color var(--db-switch-transition-duration) ease,
|
|
@@ -16661,7 +16771,7 @@ span.du-bois-light-typography-ellipsis-single-line {
|
|
|
16661
16771
|
border: var(--db-switch-border-width) solid;
|
|
16662
16772
|
border-color: inherit;
|
|
16663
16773
|
border-radius: var(--db-switch-border-radius);
|
|
16664
|
-
background-color: var(--db-switch-thumb
|
|
16774
|
+
background-color: var(--db-switch-thumb);
|
|
16665
16775
|
box-sizing: border-box;
|
|
16666
16776
|
transform: translateY(-50%);
|
|
16667
16777
|
transition: transform var(--db-switch-transition-duration) ease;
|
|
@@ -16669,27 +16779,27 @@ span.du-bois-light-typography-ellipsis-single-line {
|
|
|
16669
16779
|
|
|
16670
16780
|
/* `<label for>` propagates `:hover` to the input, so scope hover/press to the control, not `input:hover`. */
|
|
16671
16781
|
.ds-switch:hover input:not(:disabled):not(:checked) {
|
|
16672
|
-
background-color: var(--db-switch-
|
|
16782
|
+
background-color: var(--db-switch-surface-hover);
|
|
16673
16783
|
border-color: var(--db-switch-border-hover);
|
|
16674
16784
|
}
|
|
16675
16785
|
|
|
16676
16786
|
.ds-switch:active input:not(:disabled):not(:checked) {
|
|
16677
|
-
background-color: var(--db-switch-
|
|
16787
|
+
background-color: var(--db-switch-surface-press);
|
|
16678
16788
|
border-color: var(--db-switch-border-press);
|
|
16679
16789
|
}
|
|
16680
16790
|
|
|
16681
16791
|
.ds-switch input:checked {
|
|
16682
|
-
background-color: var(--db-switch-
|
|
16792
|
+
background-color: var(--db-switch-surface-checked);
|
|
16683
16793
|
border-color: var(--db-switch-border-checked);
|
|
16684
16794
|
}
|
|
16685
16795
|
|
|
16686
16796
|
.ds-switch:hover input:checked:not(:disabled) {
|
|
16687
|
-
background-color: var(--db-switch-
|
|
16797
|
+
background-color: var(--db-switch-surface-checked-hover);
|
|
16688
16798
|
border-color: var(--db-switch-border-checked-hover);
|
|
16689
16799
|
}
|
|
16690
16800
|
|
|
16691
16801
|
.ds-switch:active input:checked:not(:disabled) {
|
|
16692
|
-
background-color: var(--db-switch-
|
|
16802
|
+
background-color: var(--db-switch-surface-checked-press);
|
|
16693
16803
|
border-color: var(--db-switch-border-checked-press);
|
|
16694
16804
|
}
|
|
16695
16805
|
|
|
@@ -16698,27 +16808,29 @@ span.du-bois-light-typography-ellipsis-single-line {
|
|
|
16698
16808
|
}
|
|
16699
16809
|
|
|
16700
16810
|
/* On focus, recolor the border to the checked-fill color on top of the outline ring. Matching AntD,
|
|
16701
|
-
* the ring sits flush when off and gains a 1px offset when checked.
|
|
16811
|
+
* the ring sits flush when off and gains a 1px offset when checked.
|
|
16812
|
+
* TODO: width/offset are hardcoded 1px to preserve the AntD look; adopt the system 2px focus ring
|
|
16813
|
+
* (var(--db-focus-ring-width)) in a separate change. */
|
|
16702
16814
|
.ds-switch input:focus-visible {
|
|
16703
16815
|
border-color: var(--db-switch-border-focus);
|
|
16704
|
-
outline:
|
|
16816
|
+
outline: 1px solid var(--db-focus-ring-color);
|
|
16705
16817
|
outline-offset: 0;
|
|
16706
16818
|
}
|
|
16707
16819
|
|
|
16708
16820
|
.ds-switch input:checked:focus-visible {
|
|
16709
|
-
outline-offset:
|
|
16821
|
+
outline-offset: 1px;
|
|
16710
16822
|
}
|
|
16711
16823
|
|
|
16712
16824
|
.ds-switch input:disabled {
|
|
16713
16825
|
cursor: not-allowed;
|
|
16714
|
-
background-color: var(--db-switch-
|
|
16826
|
+
background-color: var(--db-switch-surface-disabled);
|
|
16715
16827
|
border-color: var(--db-switch-border-disabled);
|
|
16716
16828
|
}
|
|
16717
16829
|
|
|
16718
16830
|
/* Disabled + on: more specific than the plain disabled rule, so it wins regardless of source order. */
|
|
16719
16831
|
.ds-switch input:checked:disabled {
|
|
16720
|
-
background-color: var(--db-switch-
|
|
16721
|
-
border-color: var(--db-switch-
|
|
16832
|
+
background-color: var(--db-switch-surface-checked-disabled);
|
|
16833
|
+
border-color: var(--db-switch-surface-checked-disabled);
|
|
16722
16834
|
}
|
|
16723
16835
|
|
|
16724
16836
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -16735,13 +16847,13 @@ span.du-bois-light-typography-ellipsis-single-line {
|
|
|
16735
16847
|
|
|
16736
16848
|
.ds-switch-wrapper .ds-switch-state-message {
|
|
16737
16849
|
margin-inline-start: auto;
|
|
16738
|
-
margin-inline-end: var(--db-switch-spacing);
|
|
16850
|
+
margin-inline-end: var(--db-switch-label-spacing);
|
|
16739
16851
|
}
|
|
16740
16852
|
|
|
16741
16853
|
/* `:first-child` scopes this to the label-first layout; the plain layout renders the label last. */
|
|
16742
16854
|
.ds-switch-wrapper > .du-bois-light-label:first-child,
|
|
16743
16855
|
.ds-switch-wrapper > .du-bois-dark-label:first-child {
|
|
16744
|
-
margin-inline-end: var(--db-switch-spacing);
|
|
16856
|
+
margin-inline-end: var(--db-switch-label-spacing);
|
|
16745
16857
|
}
|
|
16746
16858
|
|
|
16747
16859
|
.ds-switch-state-message {
|
|
@@ -16760,7 +16872,7 @@ span.du-bois-light-typography-ellipsis-single-line {
|
|
|
16760
16872
|
+ :is(.du-bois-light-hint, .du-bois-dark-hint, .du-bois-light-form-message, .du-bois-dark-form-message), :is(.ds-switch.ds-switch, .ds-switch-wrapper.ds-switch-wrapper)
|
|
16761
16873
|
+ :is(.du-bois-light-hint, .du-bois-dark-hint)
|
|
16762
16874
|
+ :is(.du-bois-light-form-message, .du-bois-dark-form-message) {
|
|
16763
|
-
padding-inline-start: calc(var(--db-
|
|
16875
|
+
padding-inline-start: calc(var(--db-spacing-2xs) + var(--db-switch-track-width));
|
|
16764
16876
|
}
|
|
16765
16877
|
|
|
16766
16878
|
:is(.ds-switch.ds-switch, .ds-switch-wrapper.ds-switch-wrapper)
|