@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.
Files changed (75) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/{WizardStepContentWrapper-DnwQIMN1.js → WizardStepContentWrapper-DsAS2ZAT.js} +600 -511
  3. package/dist/WizardStepContentWrapper-DsAS2ZAT.js.map +1 -0
  4. package/dist/fonts/dm-mono/DMMono-Regular.woff2 +0 -0
  5. package/dist/fonts/dm-mono/dm-mono.css +11 -0
  6. package/dist/index-dark.css +298 -200
  7. package/dist/index-dark.mitigated.css +298 -200
  8. package/dist/index.css +383 -271
  9. package/dist/index.js +230 -157
  10. package/dist/index.js.map +1 -1
  11. package/dist/index.mitigated.css +392 -280
  12. package/dist/patterns.js +3 -2
  13. package/dist/patterns.js.map +1 -1
  14. package/dist-types/design-system/ContextMenu/ContextMenu.d.ts +2 -2
  15. package/dist-types/design-system/DesignSystemProvider/DesignSystemProvider.d.ts +44 -0
  16. package/dist-types/design-system/Grid/Col.d.ts +1 -3
  17. package/dist-types/design-system/Grid/NativeCol.d.ts +10 -0
  18. package/dist-types/design-system/Grid/NativeGridContext.d.ts +11 -0
  19. package/dist-types/design-system/Grid/NativeRow.d.ts +13 -0
  20. package/dist-types/design-system/Grid/Row.d.ts +3 -4
  21. package/dist-types/design-system/Grid/grid-styling.d.ts +22 -0
  22. package/dist-types/design-system/Grid/gridConstants.d.ts +2 -0
  23. package/dist-types/design-system/Grid/index.d.ts +1 -0
  24. package/dist-types/design-system/Grid/rowConstants.d.ts +7 -0
  25. package/dist-types/design-system/Grid/types.d.ts +49 -0
  26. package/dist-types/design-system/Hooks/index.d.ts +1 -1
  27. package/dist-types/design-system/Hooks/useDesignSystemTheme.d.ts +7 -7
  28. package/dist-types/design-system/Icon/LegacyAntDIcon.d.ts +21 -0
  29. package/dist-types/design-system/Icon/index.d.ts +0 -1
  30. package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxAddButton.d.ts +4 -0
  31. package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxCheckboxItem.d.ts +8 -0
  32. package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxFooter.d.ts +12 -0
  33. package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxInput.d.ts +8 -0
  34. package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxMenu.d.ts +8 -0
  35. package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxMenuItem.d.ts +8 -0
  36. package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxMultiSelectInput.d.ts +8 -0
  37. package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxRoot.d.ts +8 -0
  38. package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxSectionHeader.d.ts +4 -0
  39. package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxSelectedItem.d.ts +8 -0
  40. package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxSeparator.d.ts +4 -0
  41. package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxToggleButton.d.ts +8 -0
  42. package/dist-types/design-system/TypeaheadCombobox/hooks/downshiftHookWrappers.d.ts +8 -0
  43. package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/hooks/useComboboxState.d.ts +6 -0
  44. package/dist-types/design-system/TypeaheadComboboxV2/hooks/useRestoreHighlightedOption.d.ts +18 -0
  45. package/dist-types/design-system/TypeaheadComboboxV2/hooks/useTypeaheadComboboxContext.d.ts +2 -0
  46. package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/providers/TypeaheadComboboxContext.d.ts +6 -4
  47. package/dist-types/design-system/_shared_/Menu/index.d.ts +1 -1
  48. package/dist-types/design-system/fonts.d.ts +1 -0
  49. package/dist-types/design-system/index.d.ts +1 -1
  50. package/package.json +3 -2
  51. package/dist/WizardStepContentWrapper-DnwQIMN1.js.map +0 -1
  52. package/dist-types/design-system/Icon/AntdIcon.d.ts +0 -114
  53. package/dist-types/design-system/TypeaheadComboboxReactAria/hooks/useTypeaheadComboboxContext.d.ts +0 -2
  54. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/CountBadge.d.ts +0 -0
  55. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxAddButton.d.ts +0 -0
  56. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxCheckboxItem.d.ts +0 -0
  57. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxControls.d.ts +0 -0
  58. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxFooter.d.ts +0 -0
  59. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxInput.d.ts +0 -0
  60. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxMenu.d.ts +0 -0
  61. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxMenuItem.d.ts +0 -0
  62. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxMultiSelectInput.d.ts +0 -0
  63. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxRoot.d.ts +0 -0
  64. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxSectionHeader.d.ts +0 -0
  65. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxSelectedItem.d.ts +0 -0
  66. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxSeparator.d.ts +0 -0
  67. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxToggleButton.d.ts +0 -0
  68. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/hooks/footerFocus.d.ts +0 -0
  69. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/hooks/index.d.ts +0 -0
  70. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/hooks/useComboboxItems.d.ts +0 -0
  71. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/hooks/useComboboxStateProps.d.ts +0 -0
  72. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/hooks/useMultipleSelectionState.d.ts +0 -0
  73. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/hooks/useScrollOptionIntoView.d.ts +0 -0
  74. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/hooks/useVirtualizedComboboxScroll.d.ts +0 -0
  75. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/index.d.ts +0 -0
package/dist/index.css CHANGED
@@ -15836,7 +15836,7 @@ span.du-bois-light-typography-ellipsis-single-line {
15836
15836
  * Source: design-system/src/theme/tokens/*.json
15837
15837
  * Regenerate via: yarn theme-regenerate */
15838
15838
 
15839
- :where(:root, .du-bois-light) {
15839
+ :where(:root), :where(.du-bois-light) {
15840
15840
  --db-radius-0: 0px;
15841
15841
  --db-radius-full: 999px;
15842
15842
  --db-radius-lg: 12px;
@@ -15975,44 +15975,57 @@ span.du-bois-light-typography-ellipsis-single-line {
15975
15975
  * Source: design-system/src/theme/tokens/*.json
15976
15976
  * Regenerate via: yarn theme-regenerate */
15977
15977
 
15978
- /* Layout primitive classes — internal Du Bois use for now (not a published
15979
- * consumer API yet; see the Stefan/Sheng weekly decision to "give it a try
15980
- * just within the Du Bois components"). Two primitives, both plain CSS so they
15981
- * ride the mortar cascade like the other component styles:
15982
- *
15983
- * .ds-stack — vertical flow, even gap between direct children.
15984
- * .ds-cluster — horizontal group that wraps, even gap between children.
15985
- *
15986
- * Each primitive exposes a small set of `--ds-*` knobs, defaulted on the class
15987
- * itself (not via a `var()` fallback, which would freeze the default at every
15988
- * call site). Override any of them on the element — inline
15989
- * `style={{ '--ds-stack-gap': ... }}` or a more specific selector — without a
15990
- * new modifier class:
15991
- *
15992
- * stack: --ds-stack-gap (spacing), --ds-stack-align (align-items)
15993
- * cluster: --ds-cluster-gap (spacing), --ds-cluster-align (align-items),
15994
- * --ds-cluster-justify (justify-content)
15995
- *
15996
- * Gap defaults point at the system spacing scale (`--db-space-*`). Padding is
15997
- * intentionally NOT a knob — a layout primitive owns the space between children,
15998
- * not its own box padding. */
15978
+ /*
15979
+ Vertical "stack" of elements.
15980
+ Use this for any layout where items are laid out vertically.
15981
+
15982
+ \3c !-- Basic: default gap between each child -->
15983
+ <div class="ds-stack">
15984
+ <h2>Title</h2>
15985
+ <p>Body</p>
15986
+ <button>Action</button>
15987
+ </div>
15999
15988
 
15989
+ \3c !-- Wider gap for this instance -->
15990
+ <div class="ds-stack" style="--ds-stack-gap: var(--db-spacing-lg)">…</div>
15991
+
15992
+ \3c !-- Don't stretch children to full width (e.g. left-aligned buttons) -->
15993
+ <div class="ds-stack" style="--ds-stack-align: flex-start">…</div>
15994
+ */
16000
15995
  .ds-stack {
16001
- --ds-stack-gap: var(--db-space-md);
15996
+ /* These variables act as the *parameters* for the stack instance. */
15997
+ --ds-stack-gap: var(--db-spacing-xs);
16002
15998
  --ds-stack-align: stretch;
15999
+
16003
16000
  display: flex;
16004
16001
  flex-direction: column;
16005
16002
  align-items: var(--ds-stack-align);
16006
16003
  gap: var(--ds-stack-gap);
16007
16004
  }
16008
16005
 
16009
- /* Cluster wraps by design: a long row reflows onto multiple lines rather than
16010
- * overflowing. A row that must NOT wrap (e.g. a single-line control strip) is
16011
- * not a cluster keep it bespoke. */
16006
+ /**
16007
+ Responsive, horizontal "cluster" of elements.
16008
+ Use this for any layout where items are laid out horizontally and should wrap on smaller viewport sizes.
16009
+
16010
+ \3c !-- Basic: items wrap as needed -->
16011
+ <div class="ds-cluster">
16012
+ <span>one</span>
16013
+ <span>two</span>
16014
+ <span>three</span>
16015
+ </div>
16016
+
16017
+ \3c !-- Push children apart (e.g. title left, actions right) -->
16018
+ <div class="ds-cluster" style="--ds-cluster-justify: space-between">…</div>
16019
+
16020
+ \3c !-- Looser gap for this instance -->
16021
+ <div class="ds-cluster" style="--ds-cluster-gap: var(--db-spacing-sm)">…</div>
16022
+ */
16012
16023
  .ds-cluster {
16013
- --ds-cluster-gap: var(--db-space-sm);
16024
+ /* These variables act as the *parameters* for the cluster instance. */
16025
+ --ds-cluster-gap: var(--db-spacing-2xs);
16014
16026
  --ds-cluster-align: center;
16015
16027
  --ds-cluster-justify: flex-start;
16028
+
16016
16029
  display: flex;
16017
16030
  flex-wrap: wrap;
16018
16031
  align-items: var(--ds-cluster-align);
@@ -16020,97 +16033,215 @@ span.du-bois-light-typography-ellipsis-single-line {
16020
16033
  gap: var(--ds-cluster-gap);
16021
16034
  }
16022
16035
 
16023
- /* Category-tier tokens shared by selection-control components:
16024
- * <Checkbox>, <Switch>, <Radio>. Each value here references a SYSTEM token
16025
- * from system-tokens.css — never a raw hex/px literal — so the only place a
16026
- * brand-level theme change has to land is the system tier.
16027
- *
16028
- * Component-tier files (e.g. design-system/Checkbox/tokens.css) inherit from
16029
- * these via `var()` so consumers can override a single selection control by
16030
- * targeting only its component tokens. */
16036
+ :where(:root), :where(.du-bois-light) {
16037
+ /* Neutral */
16038
+ --db-neutral-surface: var(--db-color-background-primary);
16039
+ --db-subtle-neutral-surface: var(--db-color-background-secondary);
16040
+ --db-strong-neutral-surface: initial; /* TODO */
16041
+
16042
+ --db-text-on-neutral-surface: var(--db-color-text-primary);
16043
+ --db-subtle-text-on-neutral-surface: var(--db-color-text-secondary);
16044
+ --db-strong-text-on-neutral-surface: initial; /* TODO */
16045
+
16046
+ --db-neutral-border: var(--db-color-border);
16047
+ --db-subtle-neutral-border: initial; /* TODO */
16048
+ --db-strong-neutral-border: var(--db-color-border-accessible);
16049
+
16050
+ --db-neutral-surface-active: var(--db-color-table-background-selected-default);
16051
+ --db-neutral-surface-hover: var(--db-color-table-background-unselected-hover);
16052
+ --db-neutral-surface-pressed: var(--db-color-table-background-selected-hover);
16053
+ --db-neutral-surface-disabled: var(--db-color-action-disabled-background);
16054
+ --db-text-on-neutral-surface-disabled: var(--db-color-action-disabled-text);
16055
+
16056
+ /* Primary */
16057
+ --db-primary-surface: var(--db-color-action-primary-background-default);
16058
+ --db-subtle-primary-surface: var(--db-color-action-default-background-hover);
16059
+ --db-strong-primary-surface: var(--db-color-action-primary-background-hover);
16060
+
16061
+ --db-text-on-primary-surface: var(--db-color-action-primary-text-default);
16062
+ --db-primary-text-on-neutral-surface: var(--db-color-action-link-default);
16063
+ --db-subtle-text-on-primary-surface: initial; /* TODO */
16064
+ --db-strong-text-on-primary-surface: var(--db-color-action-primary-text-default);
16065
+
16066
+ --db-primary-border: var(--db-color-action-primary-background-default);
16067
+ --db-subtle-primary-border: initial; /* TODO */
16068
+ --db-strong-primary-border: var(--db-color-action-primary-background-press);
16069
+
16070
+ --db-primary-surface-active: initial; /* TODO */
16071
+ --db-primary-surface-hover: var(--db-color-action-primary-background-hover);
16072
+ --db-primary-surface-pressed: var(--db-color-action-primary-background-press);
16073
+ --db-primary-surface-disabled: var(--db-color-action-disabled-background);
16074
+ --db-text-on-primary-surface-disabled: var(--db-color-action-disabled-text);
16075
+
16076
+ /* Error */
16077
+ --db-error-surface: var(--db-color-action-danger-primary-background-default);
16078
+ --db-subtle-error-surface: var(--db-color-background-danger);
16079
+ --db-strong-error-surface: var(--db-color-action-danger-primary-background-hover);
16080
+
16081
+ --db-text-on-error-surface: var(--db-color-action-danger-primary-text);
16082
+ --db-error-text-on-neutral-surface: var(--db-color-text-validation-danger);
16083
+ --db-subtle-text-on-error-surface: initial; /* TODO */
16084
+ --db-strong-text-on-error-surface: var(--db-color-action-danger-primary-text);
16085
+
16086
+ --db-error-border: var(--db-color-action-danger-default-border-default);
16087
+ --db-subtle-error-border: var(--db-color-border-danger);
16088
+ --db-strong-error-border: var(--db-color-action-danger-primary-background-press);
16089
+
16090
+ --db-error-surface-active: initial; /* TODO */
16091
+ --db-error-surface-hover: var(--db-color-action-danger-primary-background-hover);
16092
+ --db-error-surface-pressed: var(--db-color-action-danger-primary-background-press);
16093
+ --db-error-surface-disabled: var(--db-color-action-disabled-background);
16094
+ --db-text-on-error-surface-disabled: var(--db-color-action-disabled-text);
16095
+
16096
+ /* Warning */
16097
+ --db-warning-surface: initial; /* TODO */
16098
+ --db-subtle-warning-surface: var(--db-color-background-warning);
16099
+
16100
+ --db-text-on-warning-surface: initial; /* TODO */
16101
+ --db-warning-text-on-neutral-surface: var(--db-color-text-validation-warning);
16102
+
16103
+ --db-warning-border: var(--db-color-border-warning);
16104
+
16105
+ /* Success */
16106
+ --db-success-surface: initial; /* TODO */
16107
+ --db-subtle-success-surface: var(--db-color-background-success);
16108
+
16109
+ --db-text-on-success-surface: initial; /* TODO */
16110
+ --db-success-text-on-neutral-surface: var(--db-color-text-validation-success);
16111
+
16112
+ --db-success-border: initial; /* TODO */
16113
+ }
16114
+
16115
+
16116
+
16117
+ :where(:root), :where(.du-bois-light) {
16118
+ --db-layout-unit: 0.25rem; /* 4px */
16119
+ --db-density-scalar: 1;
16120
+ --db-size-scalar: 1;
16121
+ --db-spacing-scalar: 1;
16122
+
16123
+ /* Size and spacing are the same steps, but with their own scalars included in the calc. */
16031
16124
 
16032
- /* Re-declared under both theme classes as well as :root: these values are
16033
- * `var()` indirections onto SYSTEM tokens, and a custom property resolves its
16034
- * var() at its DECLARATION site. Declared only at :root, they would freeze at
16035
- * the root (light) system values and never re-read the dark system tokens
16036
- * inside a `.du-bois-dark` subtree. Re-declaring at every theme boundary makes
16037
- * the indirection re-resolve per theme. See DUBOIS-448 dark-mode scoping. */
16038
- :where(:root, .du-bois-light, .du-bois-dark) {
16039
- --db-selection-toggle-bg-default: var(--db-color-background-primary);
16040
- --db-selection-toggle-bg-hover: var(--db-color-action-default-background-hover);
16041
- --db-selection-toggle-bg-press: var(--db-color-action-default-background-press);
16042
- --db-selection-toggle-bg-checked: var(--db-color-action-primary-background-default);
16043
- --db-selection-toggle-bg-checked-hover: var(--db-color-action-primary-background-hover);
16044
- --db-selection-toggle-bg-checked-press: var(--db-color-action-primary-background-press);
16045
- --db-selection-toggle-bg-disabled: var(--db-color-action-disabled-background);
16125
+ --db-size-3xs: calc(var(--db-layout-unit) * 1 * var(--db-density-scalar) * var(--db-size-scalar)); /* 4px */
16126
+ --db-size-2xs: calc(var(--db-layout-unit) * 2 * var(--db-density-scalar) * var(--db-size-scalar)); /* 8px */
16127
+ --db-size-xs: calc(var(--db-layout-unit) * 4 * var(--db-density-scalar) * var(--db-size-scalar)); /* 16px */
16128
+ --db-size-sm: calc(var(--db-layout-unit) * 6 * var(--db-density-scalar) * var(--db-size-scalar)); /* 24px */
16129
+ --db-size-md: calc(var(--db-layout-unit) * 8 * var(--db-density-scalar) * var(--db-size-scalar)); /* 32px */
16130
+ --db-size-lg: calc(var(--db-layout-unit) * 10 * var(--db-density-scalar) * var(--db-size-scalar)); /* 40px */
16046
16131
 
16047
- --db-selection-toggle-border-default: var(--db-color-action-default-border-default);
16048
- --db-selection-toggle-border-hover: var(--db-color-action-primary-background-hover);
16049
- --db-selection-toggle-border-press: var(--db-color-action-primary-background-press);
16050
- --db-selection-toggle-border-focus: var(--db-color-action-default-border-focus);
16051
- --db-selection-toggle-border-disabled: var(--db-color-action-disabled-border);
16132
+ --db-spacing-3xs: calc(var(--db-layout-unit) * 1 * var(--db-density-scalar) * var(--db-spacing-scalar)); /* 4px */
16133
+ --db-spacing-2xs: calc(var(--db-layout-unit) * 2 * var(--db-density-scalar) * var(--db-spacing-scalar)); /* 8px */
16134
+ --db-spacing-xs: calc(var(--db-layout-unit) * 4 * var(--db-density-scalar) * var(--db-spacing-scalar)); /* 16px */
16135
+ --db-spacing-sm: calc(var(--db-layout-unit) * 6 * var(--db-density-scalar) * var(--db-spacing-scalar)); /* 24px */
16136
+ --db-spacing-md: calc(var(--db-layout-unit) * 8 * var(--db-density-scalar) * var(--db-spacing-scalar)); /* 32px */
16137
+ --db-spacing-lg: calc(var(--db-layout-unit) * 10 * var(--db-density-scalar) * var(--db-spacing-scalar)); /* 40px */
16138
+ }
16139
+
16140
+ :where(:root), :where(.du-bois-light) {
16141
+ --db-font-family:
16142
+ "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
16143
+ --db-mono-font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
16144
+
16145
+ --db-font-size-2xs: 0.6875rem; /* 11px */
16146
+ --db-font-size-xs: 0.75rem; /* 12px */
16147
+ --db-font-size-base: 0.8125rem; /* 13px */
16148
+ --db-font-size-md: 0.875rem; /* 14px */
16149
+ --db-font-size-lg: 0.9375rem; /* 15px */
16150
+ --db-font-size-xl: 1rem; /* 16px */
16151
+ --db-font-size-2xl: 1.25rem; /* 20px */
16152
+ --db-font-size-3xl: 1.5rem; /* 24px */
16153
+ --db-font-size-4xl: 2rem; /* 32px */
16154
+
16155
+ /* Du Bois v1 ships 400 and 600 only */
16156
+ --db-font-weight-normal: 400;
16157
+ --db-font-weight-medium: initial; /* TODO */
16158
+ --db-font-weight-semibold: 600;
16159
+ --db-font-weight-bold: initial; /* TODO */
16160
+ }
16161
+
16162
+ :where(:root), :where(.du-bois-light) {
16163
+ --db-elevation-inset: initial; /* TODO */
16164
+ --db-elevation-low: 0px 2px 3px -1px rgba(0, 0, 0, 0.05), 0px 1px 0px 0px rgba(0, 0, 0, 0.02);
16165
+ --db-elevation-med: 0px 2px 16px 0px rgba(0, 0, 0, 0.08);
16166
+ --db-elevation-high: 0px 8px 40px 0px rgba(0, 0, 0, 0.13);
16167
+ }
16168
+
16169
+ :where(:root), :where(.du-bois-light) {
16170
+ --db-focus-ring-color: var(--db-color-action-default-border-focus);
16171
+ --db-focus-ring-width: 2px;
16172
+ }
16173
+
16174
+ :where(:root), :where(.du-bois-light) {
16175
+ /* Shape */
16176
+ --db-selection-toggle-border-radius: 4px;
16052
16177
 
16053
- /* Raw literal, not a system token (exception to the file rule above): the mark
16054
- * sits on the theme-invariant blue checked fill, so it must stay white in BOTH
16055
- * themes. No non-flipping white system token exists — action-primary-icon flips
16056
- * to near-black under .du-bois-dark, which made the mark nearly invisible. */
16057
- --db-selection-toggle-icon-color: #ffffff;
16058
- --db-selection-toggle-icon-color-disabled: var(--db-color-action-disabled-text);
16059
- --db-selection-toggle-text: var(--db-color-text-primary);
16060
- --db-selection-toggle-text-disabled: var(--db-color-action-disabled-text);
16178
+ /* Color */
16179
+ --db-selection-toggle-surface: var(--db-neutral-surface);
16180
+ --db-selection-toggle-mark: var(--db-text-on-primary-surface);
16181
+ --db-selection-toggle-text: var(--db-text-on-neutral-surface);
16182
+ --db-selection-toggle-border: var(--db-strong-neutral-border);
16061
16183
 
16062
- --db-selection-toggle-size: 16px;
16063
- --db-selection-toggle-border-radius: var(--db-radius-sm);
16064
- --db-selection-toggle-spacing: var(--db-space-sm);
16184
+ --db-selection-toggle-surface-hover: var(--db-neutral-surface-hover);
16185
+ --db-selection-toggle-surface-press: var(--db-neutral-surface-pressed);
16186
+ --db-selection-toggle-surface-checked: var(--db-primary-surface);
16187
+ --db-selection-toggle-surface-checked-hover: var(--db-primary-surface-hover);
16188
+ --db-selection-toggle-surface-checked-press: var(--db-primary-surface-pressed);
16189
+ --db-selection-toggle-surface-disabled: var(--db-neutral-surface-disabled);
16190
+ --db-selection-toggle-surface-checked-disabled: var(--db-neutral-surface-disabled);
16191
+
16192
+ --db-selection-toggle-border-hover: var(--db-primary-surface-hover);
16193
+ --db-selection-toggle-border-press: var(--db-primary-surface-pressed);
16194
+ --db-selection-toggle-border-disabled: var(--db-neutral-border);
16195
+
16196
+ --db-selection-toggle-mark-disabled: var(--db-text-on-neutral-surface-disabled);
16197
+ --db-selection-toggle-text-disabled: var(--db-text-on-neutral-surface-disabled);
16065
16198
 
16066
- /* Focus ring matches AntD legacy variant; offset keeps it outside the toggle.
16067
- * Hard-coded for now — Figma export doesn't include shadow tokens. */
16068
16199
  --db-selection-toggle-shadow-checked: 0 0 0 1px var(--db-color-action-primary-background-default);
16069
- --db-selection-toggle-focus-ring-width: 2px;
16070
- --db-selection-toggle-focus-ring-offset: 2px;
16200
+
16201
+ /* Density */
16202
+ --db-selection-toggle-size: var(--db-size-xs);
16203
+ --db-selection-toggle-label-spacing: var(--db-spacing-2xs);
16204
+
16205
+ /* Motion */
16071
16206
  --db-selection-toggle-transition-duration: 120ms;
16072
16207
  }
16073
16208
 
16074
- /* Component-tier tokens for <Checkbox>. Each value defaults to a CATEGORY
16075
- * (selection-toggle) token via var(); consumers can override here to retheme
16076
- * checkboxes without affecting switch / radio. */
16077
-
16078
- /* Re-declared under both theme classes (not just :root) so the var() chain onto
16079
- * category/system tokens re-resolves inside a `.du-bois-dark` subtree instead of
16080
- * freezing at the root (light) values. See DUBOIS-448 dark-mode scoping. */
16081
- :where(:root, .du-bois-light, .du-bois-dark) {
16082
- --db-checkbox-size: var(--db-selection-toggle-size);
16209
+ :where(:root), :where(.du-bois-light) {
16210
+ /* Shape */
16083
16211
  --db-checkbox-border-radius: var(--db-selection-toggle-border-radius);
16084
16212
  --db-checkbox-border-width: 1px;
16085
- --db-checkbox-spacing: var(--db-selection-toggle-spacing);
16086
16213
 
16087
- --db-checkbox-bg-default: var(--db-selection-toggle-bg-default);
16088
- --db-checkbox-bg-hover: var(--db-selection-toggle-bg-hover);
16089
- --db-checkbox-bg-press: var(--db-selection-toggle-bg-press);
16090
- --db-checkbox-bg-checked: var(--db-selection-toggle-bg-checked);
16091
- --db-checkbox-bg-checked-hover: var(--db-selection-toggle-bg-checked-hover);
16092
- --db-checkbox-bg-checked-press: var(--db-selection-toggle-bg-checked-press);
16093
- --db-checkbox-bg-disabled: var(--db-selection-toggle-bg-disabled);
16214
+ /* Color */
16215
+ --db-checkbox-surface: var(--db-selection-toggle-surface);
16216
+ --db-checkbox-surface-hover: var(--db-color-action-default-background-hover);
16217
+ --db-checkbox-surface-press: var(--db-color-action-default-background-press);
16218
+ --db-checkbox-surface-checked: var(--db-selection-toggle-surface-checked);
16219
+ --db-checkbox-surface-checked-hover: var(--db-selection-toggle-surface-checked-hover);
16220
+ --db-checkbox-surface-checked-press: var(--db-selection-toggle-surface-checked-press);
16221
+ --db-checkbox-surface-disabled: var(--db-selection-toggle-surface-disabled);
16094
16222
 
16095
- --db-checkbox-border-default: var(--db-selection-toggle-border-default);
16223
+ --db-checkbox-border: var(--db-color-action-default-border-default);
16096
16224
  --db-checkbox-border-hover: var(--db-selection-toggle-border-hover);
16097
16225
  --db-checkbox-border-press: var(--db-selection-toggle-border-press);
16098
- --db-checkbox-border-focus: var(--db-selection-toggle-border-focus);
16099
- --db-checkbox-border-disabled: var(--db-selection-toggle-border-disabled);
16226
+ --db-checkbox-focus-ring: var(--db-focus-ring-color);
16227
+ --db-checkbox-border-disabled: var(--db-color-action-disabled-border);
16100
16228
 
16101
- --db-checkbox-icon-color: var(--db-selection-toggle-icon-color);
16102
- --db-checkbox-icon-color-disabled: var(--db-selection-toggle-icon-color-disabled);
16229
+ --db-checkbox-mark: #ffffff;
16230
+ --db-checkbox-mark-disabled: var(--db-selection-toggle-mark-disabled);
16103
16231
  --db-checkbox-text: var(--db-selection-toggle-text);
16104
16232
  --db-checkbox-text-disabled: var(--db-selection-toggle-text-disabled);
16105
16233
 
16106
16234
  --db-checkbox-shadow-checked: var(--db-selection-toggle-shadow-checked);
16107
- --db-checkbox-focus-ring-width: var(--db-selection-toggle-focus-ring-width);
16108
- --db-checkbox-focus-ring-offset: var(--db-selection-toggle-focus-ring-offset);
16109
- --db-checkbox-transition-duration: var(--db-selection-toggle-transition-duration);
16110
16235
 
16111
- /* Indeterminate mark — the horizontal dash shown in the mixed state. */
16112
- --db-checkbox-indeterminate-mark-width: 8px;
16113
- --db-checkbox-indeterminate-mark-height: 3px;
16236
+ /* Density */
16237
+ --db-checkbox-size: var(--db-selection-toggle-size);
16238
+ --db-checkbox-label-spacing: var(--db-selection-toggle-label-spacing);
16239
+ --db-checkbox-focus-ring-width: var(--db-focus-ring-width);
16240
+ --db-checkbox-indeterminate-mark-width: var(--db-size-2xs); /* 8px */
16241
+ --db-checkbox-indeterminate-mark-height: calc(var(--db-size-3xs) * 0.75); /* 3px */
16242
+
16243
+ /* Motion */
16244
+ --db-checkbox-transition-duration: var(--db-selection-toggle-transition-duration);
16114
16245
  }
16115
16246
 
16116
16247
  /* Native-input <Checkbox> styles. Classic CSS only — no native nesting (the
@@ -16157,35 +16288,34 @@ span.du-bois-light-typography-ellipsis-single-line {
16157
16288
  width: fit-content;
16158
16289
  }
16159
16290
 
16160
- /* Hover/press live on the root (label), not on the input: the input has
16161
- * `pointer-events: none` (so a single click target stays on the label and
16162
- * label/input association toggles the box), which means `input:hover` would
16163
- * never match. Putting `:hover` on the root also makes the entire label area
16291
+ /* Hover/press live on the root (label), not on the input: the input is
16292
+ * visually hidden (opacity:0), so an `input:hover` rule wouldn't be visible
16293
+ * anyway. Putting `:hover` on the root also makes the entire label area
16164
16294
  * — not just the indicator square — drive the visual feedback. */
16165
16295
  .ds-checkbox:hover:has(.ds-checkbox-input:not(:disabled, :checked, :indeterminate)) .ds-checkbox-indicator {
16166
- background-color: var(--db-checkbox-bg-hover);
16296
+ background-color: var(--db-checkbox-surface-hover);
16167
16297
  border-color: var(--db-checkbox-border-hover);
16168
16298
  }
16169
16299
 
16170
16300
  .ds-checkbox:active:has(.ds-checkbox-input:not(:disabled, :checked, :indeterminate)) .ds-checkbox-indicator {
16171
- background-color: var(--db-checkbox-bg-press);
16301
+ background-color: var(--db-checkbox-surface-press);
16172
16302
  border-color: var(--db-checkbox-border-press);
16173
16303
  }
16174
16304
 
16175
16305
  /* Selected fill — checked and indeterminate share the same surface. */
16176
16306
  .ds-checkbox:has(.ds-checkbox-input:is(:checked, :indeterminate)) .ds-checkbox-indicator {
16177
- background-color: var(--db-checkbox-bg-checked);
16178
- border-color: var(--db-checkbox-bg-checked);
16307
+ background-color: var(--db-checkbox-surface-checked);
16308
+ border-color: var(--db-checkbox-surface-checked);
16179
16309
  }
16180
16310
 
16181
16311
  .ds-checkbox:hover:has(.ds-checkbox-input:is(:checked, :indeterminate):not(:disabled)) .ds-checkbox-indicator {
16182
- background-color: var(--db-checkbox-bg-checked-hover);
16183
- border-color: var(--db-checkbox-bg-checked-hover);
16312
+ background-color: var(--db-checkbox-surface-checked-hover);
16313
+ border-color: var(--db-checkbox-surface-checked-hover);
16184
16314
  }
16185
16315
 
16186
16316
  .ds-checkbox:active:has(.ds-checkbox-input:is(:checked, :indeterminate):not(:disabled)) .ds-checkbox-indicator {
16187
- background-color: var(--db-checkbox-bg-checked-press);
16188
- border-color: var(--db-checkbox-bg-checked-press);
16317
+ background-color: var(--db-checkbox-surface-checked-press);
16318
+ border-color: var(--db-checkbox-surface-checked-press);
16189
16319
  }
16190
16320
 
16191
16321
  /* Mark visibility. */
@@ -16199,8 +16329,8 @@ span.du-bois-light-typography-ellipsis-single-line {
16199
16329
 
16200
16330
  /* Focus-visible (keyboard only). */
16201
16331
  .ds-checkbox:has(.ds-checkbox-input:focus-visible) .ds-checkbox-indicator {
16202
- outline: var(--db-checkbox-focus-ring-width) solid var(--db-checkbox-border-focus);
16203
- outline-offset: var(--db-checkbox-focus-ring-offset);
16332
+ outline: var(--db-checkbox-focus-ring-width) solid var(--db-checkbox-focus-ring);
16333
+ outline-offset: 4px;
16204
16334
  }
16205
16335
 
16206
16336
  /* Disabled (covers unchecked, checked, indeterminate). Sourced from
@@ -16215,22 +16345,28 @@ span.du-bois-light-typography-ellipsis-single-line {
16215
16345
  }
16216
16346
 
16217
16347
  .ds-checkbox:has(.ds-checkbox-input:disabled) .ds-checkbox-indicator {
16218
- background-color: var(--db-checkbox-bg-disabled);
16348
+ background-color: var(--db-checkbox-surface-disabled);
16219
16349
  border-color: var(--db-checkbox-border-disabled);
16220
16350
  box-shadow: none;
16221
16351
  }
16222
16352
 
16223
16353
  .ds-checkbox:has(.ds-checkbox-input:disabled) .ds-checkbox-checkmark {
16224
- color: var(--db-checkbox-icon-color-disabled);
16354
+ color: var(--db-checkbox-mark-disabled);
16225
16355
  }
16226
16356
 
16227
16357
  .ds-checkbox:has(.ds-checkbox-input:disabled) .ds-checkbox-dash {
16228
- background-color: var(--db-checkbox-icon-color-disabled);
16358
+ background-color: var(--db-checkbox-mark-disabled);
16229
16359
  }
16230
16360
 
16231
- /* Visually-hidden native input, kept interactive and in the tab order so
16232
- * `:has()` lookups above can read its state. Pointer events fall through to
16233
- * the label, so clicking anywhere toggles the box. */
16361
+ /* Visually-hidden native input (opacity:0) overlaying the indicator square,
16362
+ * kept interactive and in the tab order so `:has()` lookups above can read its
16363
+ * state. It stays pointer-clickable matching AntD's `.ant-checkbox-input`
16364
+ * so it is the top-most hit-test target over the box: `getByRole('checkbox').click()`
16365
+ * (Playwright, and any coordinate click that lands on the box) resolves to the
16366
+ * real control instead of the decorative indicator overlay. Making the input
16367
+ * `pointer-events: none` (the prior native-only behavior) is what regressed
16368
+ * interaction tests vs. the AntD variant. `cursor: inherit` tracks the label's
16369
+ * pointer / disabled `not-allowed` cursor so the box keeps AntD's cursor too. */
16234
16370
  .ds-checkbox .ds-checkbox-input {
16235
16371
  position: absolute;
16236
16372
  inset: 0;
@@ -16238,7 +16374,7 @@ span.du-bois-light-typography-ellipsis-single-line {
16238
16374
  block-size: var(--db-checkbox-size);
16239
16375
  margin: 0;
16240
16376
  opacity: 0;
16241
- pointer-events: none;
16377
+ cursor: inherit;
16242
16378
  }
16243
16379
 
16244
16380
  /* Indicator — square with the border/fill that responds to state above.
@@ -16249,12 +16385,18 @@ span.du-bois-light-typography-ellipsis-single-line {
16249
16385
  display: grid;
16250
16386
  place-items: center;
16251
16387
  flex-shrink: 0;
16388
+ /* Decorative only — the overlaid input owns hit-testing. Without this, the
16389
+ * indicator (and its inherited checkmark/dash children) intercept
16390
+ * `getByRole('checkbox').click()`; clicks on any edge sliver the input does
16391
+ * not cover fall through to the label, which toggles via label/input
16392
+ * association. */
16393
+ pointer-events: none;
16252
16394
  inline-size: var(--db-checkbox-size);
16253
16395
  block-size: var(--db-checkbox-size);
16254
16396
  margin-top: calc((var(--db-line-height-base, 20px) - var(--db-checkbox-size)) / 2);
16255
- border: var(--db-checkbox-border-width) solid var(--db-checkbox-border-default);
16397
+ border: var(--db-checkbox-border-width) solid var(--db-checkbox-border);
16256
16398
  border-radius: var(--db-checkbox-border-radius);
16257
- background-color: var(--db-checkbox-bg-default);
16399
+ background-color: var(--db-checkbox-surface);
16258
16400
  box-sizing: border-box;
16259
16401
  transition:
16260
16402
  background-color var(--db-checkbox-transition-duration) ease,
@@ -16266,7 +16408,7 @@ span.du-bois-light-typography-ellipsis-single-line {
16266
16408
  grid-area: 1 / 1;
16267
16409
  inline-size: 100%;
16268
16410
  block-size: 100%;
16269
- color: var(--db-checkbox-icon-color);
16411
+ color: var(--db-checkbox-mark);
16270
16412
  opacity: 0;
16271
16413
  transition: opacity var(--db-checkbox-transition-duration) ease;
16272
16414
  }
@@ -16286,7 +16428,7 @@ span.du-bois-light-typography-ellipsis-single-line {
16286
16428
  /* CSS clamps this to half the 3px height, giving fully rounded end caps so the
16287
16429
  * dash reads as a pill rather than a flat bar. */
16288
16430
  border-radius: 4px;
16289
- background-color: var(--db-checkbox-icon-color);
16431
+ background-color: var(--db-checkbox-mark);
16290
16432
  opacity: 0;
16291
16433
  transition: opacity var(--db-checkbox-transition-duration) ease;
16292
16434
  }
@@ -16298,7 +16440,7 @@ span.du-bois-light-typography-ellipsis-single-line {
16298
16440
  * as the AntD variant. */
16299
16441
  .ds-checkbox .ds-checkbox-label {
16300
16442
  color: var(--db-checkbox-text);
16301
- padding-inline: var(--db-checkbox-spacing);
16443
+ padding-inline: var(--db-checkbox-label-spacing);
16302
16444
  word-break: break-word;
16303
16445
  }
16304
16446
 
@@ -16323,7 +16465,7 @@ span.du-bois-light-typography-ellipsis-single-line {
16323
16465
  .ds-checkbox.ds-checkbox + .du-bois-dark-form-message,
16324
16466
  .ds-checkbox.ds-checkbox + .du-bois-light-hint + .du-bois-light-form-message,
16325
16467
  .ds-checkbox.ds-checkbox + .du-bois-dark-hint + .du-bois-dark-form-message {
16326
- padding-left: var(--db-space-lg);
16468
+ padding-left: var(--db-spacing-sm);
16327
16469
  margin-top: 0;
16328
16470
  }
16329
16471
 
@@ -16334,7 +16476,7 @@ span.du-bois-light-typography-ellipsis-single-line {
16334
16476
  .du-bois-dark-hint + .ds-checkbox-group.ds-checkbox-group,
16335
16477
  .ds-checkbox-group.ds-checkbox-group + .du-bois-light-form-message,
16336
16478
  .ds-checkbox-group.ds-checkbox-group + .du-bois-dark-form-message {
16337
- margin-top: var(--db-space-sm);
16479
+ margin-top: var(--db-spacing-2xs);
16338
16480
  }
16339
16481
 
16340
16482
  /* CheckboxGroup layout. Vertical delegates to the `.ds-stack` primitive; the
@@ -16350,82 +16492,51 @@ span.du-bois-light-typography-ellipsis-single-line {
16350
16492
  * off the vertical element so it never fights the stack primitive's gap. */
16351
16493
  .ds-checkbox-group:not(.ds-stack) {
16352
16494
  flex-wrap: nowrap;
16353
- column-gap: var(--db-checkbox-spacing);
16495
+ column-gap: var(--db-checkbox-label-spacing);
16354
16496
  row-gap: 0;
16355
16497
  }
16356
16498
 
16357
16499
  /* Vertical: .ds-stack supplies flex-direction + gap; we only retarget the knob. */
16358
16500
  .ds-checkbox-group.ds-stack {
16359
- --ds-stack-gap: var(--db-checkbox-spacing);
16501
+ --ds-stack-gap: var(--db-checkbox-label-spacing);
16360
16502
  }
16361
16503
 
16362
- /* Component-tier tokens for <Radio>. Each value defaults to a CATEGORY
16363
- * (selection-toggle) token via var(); consumers can override here to retheme
16364
- * radios without affecting checkbox / switch.
16365
- *
16366
- * Radio differs from Checkbox in two ways: the indicator is a full circle
16367
- * (border-radius) and the "mark" is a filled dot rather than a checkmark/dash. */
16368
-
16369
- /* Re-declared under both theme classes (not just :root) so the var() chain onto
16370
- * category/system tokens re-resolves inside a `.du-bois-dark` subtree instead of
16371
- * freezing at the root (light) values. See DUBOIS-448 dark-mode scoping. */
16372
- :where(:root, .du-bois-light, .du-bois-dark) {
16373
- --db-radio-size: var(--db-selection-toggle-size);
16374
- /* Circle, not a rounded square — the one shape token that does NOT inherit
16375
- * the category (square) radius. */
16504
+ :where(:root), :where(.du-bois-light) {
16505
+ /* Shape */
16376
16506
  --db-radio-border-radius: var(--db-radius-full);
16377
16507
  --db-radio-border-width: 1px;
16378
- --db-radio-spacing: var(--db-selection-toggle-spacing);
16379
16508
 
16380
- --db-radio-bg-default: var(--db-selection-toggle-bg-default);
16381
- --db-radio-bg-hover: var(--db-selection-toggle-bg-hover);
16382
- --db-radio-bg-press: var(--db-selection-toggle-bg-press);
16383
- --db-radio-bg-checked: var(--db-selection-toggle-bg-checked);
16384
- --db-radio-bg-checked-hover: var(--db-selection-toggle-bg-checked-hover);
16385
- /* AntD checked active/press background is actionDefaultBackgroundPress (NOT the
16386
- * primary press), so this maps to the default press bg category token — see
16387
- * getRadioInputStyles checked active in AntDRadioInternal.tsx. */
16388
- --db-radio-bg-checked-press: var(--db-selection-toggle-bg-press);
16389
- --db-radio-bg-disabled: var(--db-selection-toggle-bg-disabled);
16509
+ /* Color */
16510
+ --db-radio-surface: var(--db-selection-toggle-surface);
16511
+ --db-radio-surface-hover: var(--db-color-action-default-background-hover);
16512
+ --db-radio-surface-press: var(--db-color-action-default-background-press);
16513
+ --db-radio-surface-checked: var(--db-selection-toggle-surface-checked);
16514
+ --db-radio-surface-checked-hover: var(--db-selection-toggle-surface-checked-hover);
16515
+ --db-radio-surface-checked-press: var(--db-color-action-default-background-press);
16516
+ --db-radio-surface-disabled: var(--db-selection-toggle-surface-disabled);
16390
16517
 
16391
- --db-radio-border-default: var(--db-selection-toggle-border-default);
16518
+ --db-radio-border: var(--db-color-action-default-border-default);
16392
16519
  --db-radio-border-hover: var(--db-selection-toggle-border-hover);
16393
16520
  --db-radio-border-press: var(--db-selection-toggle-border-press);
16394
- --db-radio-border-focus: var(--db-selection-toggle-border-focus);
16395
- --db-radio-border-disabled: var(--db-selection-toggle-border-disabled);
16396
-
16397
- /* Two-tone checked hover/press border ring (AntD getRadioInputStyles checked
16398
- * states): the border is a DARKER shade than the fill, not equal to it.
16399
- * - checked hover border = actionPrimaryBackgroundPress (== the press category
16400
- * token, which is action-primary-background-press).
16401
- * - checked press border = actionDefaultBorderPress; no selection-toggle
16402
- * category token equals this color, so reference the system token directly. */
16521
+ --db-radio-border-focus: var(--db-focus-ring-color);
16522
+ --db-radio-border-disabled: var(--db-color-action-disabled-border);
16403
16523
  --db-radio-border-checked-hover: var(--db-selection-toggle-border-press);
16404
16524
  --db-radio-border-checked-press: var(--db-color-action-default-border-press);
16525
+ --db-radio-border-unchecked-focus: var(--db-color-action-primary-background-default);
16526
+ --db-radio-outline-checked-focus: var(--db-color-action-primary-background-default);
16405
16527
 
16406
- /* Unchecked keyboard-focus border (AntD getRadioInputStyles unchecked focus):
16407
- * borderColor = actionPrimaryBackgroundDefault, with NO outline ring. No
16408
- * selection-toggle category token equals this color (the closest is a bg
16409
- * token), so reference the system token directly. */
16410
- --db-radio-border-focus-unchecked: var(--db-color-action-primary-background-default);
16411
- /* Checked focus-visible outline color (AntD: outline 1px solid
16412
- * actionPrimaryBackgroundDefault, outlineOffset 1). */
16413
- --db-radio-focus-outline-checked-color: var(--db-color-action-primary-background-default);
16414
-
16415
- /* The dot. Shares the category icon-color token (white over the filled
16416
- * primary surface) so a retheme moves checkbox checkmark + radio dot together. */
16417
- --db-radio-dot-color: var(--db-selection-toggle-icon-color);
16418
- --db-radio-dot-color-disabled: var(--db-selection-toggle-icon-color-disabled);
16528
+ --db-radio-mark: #ffffff;
16529
+ --db-radio-mark-disabled: var(--db-selection-toggle-mark-disabled);
16419
16530
  --db-radio-text: var(--db-selection-toggle-text);
16420
16531
  --db-radio-text-disabled: var(--db-selection-toggle-text-disabled);
16421
16532
 
16422
- --db-radio-focus-ring-width: var(--db-selection-toggle-focus-ring-width);
16423
- --db-radio-focus-ring-offset: var(--db-selection-toggle-focus-ring-offset);
16424
- --db-radio-transition-duration: var(--db-selection-toggle-transition-duration);
16533
+ /* Density */
16534
+ --db-radio-size: var(--db-selection-toggle-size);
16535
+ --db-radio-label-spacing: var(--db-selection-toggle-label-spacing);
16536
+ --db-radio-mark-size: var(--db-size-3xs);
16425
16537
 
16426
- /* Diameter of the inner dot. Mirrors the AntD checked `::after` size, which uses
16427
- * `theme.spacing.xs` (4px) — see getRadioInputStyles in AntDRadioInternal.tsx. */
16428
- --db-radio-dot-size: var(--db-space-xs);
16538
+ /* Motion */
16539
+ --db-radio-transition-duration: var(--db-selection-toggle-transition-duration);
16429
16540
  }
16430
16541
 
16431
16542
  /* Native-input <Radio> styles. Classic CSS only — no native nesting (the
@@ -16464,36 +16575,36 @@ span.du-bois-light-typography-ellipsis-single-line {
16464
16575
  width: fit-content;
16465
16576
  }
16466
16577
 
16467
- /* Hover/press live on the root (label), not on the input: the input has
16468
- * `pointer-events: none`, so `input:hover` would never match, and the whole
16469
- * label area should drive the feedback. */
16578
+ /* Hover/press live on the root (label), not on the input: the input is
16579
+ * visually hidden (opacity:0), so an `input:hover` rule wouldn't be visible
16580
+ * anyway, and the whole label area should drive the feedback. */
16470
16581
  .ds-radio:hover:has(input:not(:disabled, :checked)) .ds-radio-indicator {
16471
- background-color: var(--db-radio-bg-hover);
16582
+ background-color: var(--db-radio-surface-hover);
16472
16583
  border-color: var(--db-radio-border-hover);
16473
16584
  }
16474
16585
 
16475
16586
  .ds-radio:active:has(input:not(:disabled, :checked)) .ds-radio-indicator {
16476
- background-color: var(--db-radio-bg-press);
16587
+ background-color: var(--db-radio-surface-press);
16477
16588
  border-color: var(--db-radio-border-press);
16478
16589
  }
16479
16590
 
16480
16591
  /* Selected fill. */
16481
16592
  .ds-radio:has(input:checked) .ds-radio-indicator {
16482
- background-color: var(--db-radio-bg-checked);
16483
- border-color: var(--db-radio-bg-checked);
16593
+ background-color: var(--db-radio-surface-checked);
16594
+ border-color: var(--db-radio-surface-checked);
16484
16595
  }
16485
16596
 
16486
16597
  /* AntD getRadioInputStyles checked hover: background = actionPrimaryBackgroundHover,
16487
16598
  * borderColor = actionPrimaryBackgroundPress (a darker ring than the fill). */
16488
16599
  .ds-radio:hover:has(input:checked:not(:disabled)) .ds-radio-indicator {
16489
- background-color: var(--db-radio-bg-checked-hover);
16600
+ background-color: var(--db-radio-surface-checked-hover);
16490
16601
  border-color: var(--db-radio-border-checked-hover);
16491
16602
  }
16492
16603
 
16493
16604
  /* AntD getRadioInputStyles checked active: background = actionDefaultBackgroundPress,
16494
16605
  * borderColor = actionDefaultBorderPress (two-tone, not flat). */
16495
16606
  .ds-radio:active:has(input:checked:not(:disabled)) .ds-radio-indicator {
16496
- background-color: var(--db-radio-bg-checked-press);
16607
+ background-color: var(--db-radio-surface-checked-press);
16497
16608
  border-color: var(--db-radio-border-checked-press);
16498
16609
  }
16499
16610
 
@@ -16508,16 +16619,16 @@ span.du-bois-light-typography-ellipsis-single-line {
16508
16619
  * UNCHECKED focus (AntD `&:not(disabled) > input:focus + inner`): only the border
16509
16620
  * color changes to actionPrimaryBackgroundDefault — NO outline ring. */
16510
16621
  .ds-radio:has(input:focus-visible:not(:checked)) .ds-radio-indicator {
16511
- border-color: var(--db-radio-border-focus-unchecked);
16622
+ border-color: var(--db-radio-border-unchecked-focus);
16512
16623
  }
16513
16624
 
16514
16625
  /* CHECKED focus-visible (AntD `&.checked &:not(disabled) > input:focus-visible + inner`):
16515
16626
  * background = actionPrimaryBackgroundDefault, borderColor = actionDefaultBorderFocus,
16516
16627
  * outline = 1px solid actionPrimaryBackgroundDefault, outlineOffset = 1. */
16517
16628
  .ds-radio:has(input:focus-visible:checked) .ds-radio-indicator {
16518
- background-color: var(--db-radio-bg-checked);
16629
+ background-color: var(--db-radio-surface-checked);
16519
16630
  border-color: var(--db-radio-border-focus);
16520
- outline: 1px solid var(--db-radio-focus-outline-checked-color);
16631
+ outline: 1px solid var(--db-radio-outline-checked-focus);
16521
16632
  outline-offset: 1px;
16522
16633
  }
16523
16634
 
@@ -16532,18 +16643,24 @@ span.du-bois-light-typography-ellipsis-single-line {
16532
16643
  }
16533
16644
 
16534
16645
  .ds-radio:has(input:disabled) .ds-radio-indicator {
16535
- background-color: var(--db-radio-bg-disabled);
16646
+ background-color: var(--db-radio-surface-disabled);
16536
16647
  border-color: var(--db-radio-border-disabled);
16537
16648
  box-shadow: none;
16538
16649
  }
16539
16650
 
16540
16651
  .ds-radio:has(input:disabled) .ds-radio-dot {
16541
- background-color: var(--db-radio-dot-color-disabled);
16652
+ background-color: var(--db-radio-mark-disabled);
16542
16653
  }
16543
16654
 
16544
- /* Visually-hidden native input, kept interactive and in the tab order so the
16545
- * `:has()` lookups above can read its state. Pointer events fall through to the
16546
- * label, so clicking anywhere toggles the radio. */
16655
+ /* Visually-hidden native input (opacity:0) overlaying the indicator circle,
16656
+ * kept interactive and in the tab order so the `:has()` lookups above can read
16657
+ * its state. It stays pointer-clickable matching AntD's `.ant-radio-input`
16658
+ * so it is the top-most hit-test target over the circle: `getByRole('radio').click()`
16659
+ * (Playwright, and any coordinate click that lands on the circle) resolves to the
16660
+ * real control instead of the decorative indicator overlay. Making the input
16661
+ * `pointer-events: none` (the prior native-only behavior) is what regressed
16662
+ * interaction tests vs. the AntD variant. `cursor: inherit` tracks the label's
16663
+ * pointer / disabled `not-allowed` cursor so the circle keeps AntD's cursor too. */
16547
16664
  .ds-radio input {
16548
16665
  position: absolute;
16549
16666
  inset: 0;
@@ -16551,7 +16668,7 @@ span.du-bois-light-typography-ellipsis-single-line {
16551
16668
  block-size: var(--db-radio-size);
16552
16669
  margin: 0;
16553
16670
  opacity: 0;
16554
- pointer-events: none;
16671
+ cursor: inherit;
16555
16672
  }
16556
16673
 
16557
16674
  /* Indicator — circle with the border/fill that responds to state above.
@@ -16561,12 +16678,17 @@ span.du-bois-light-typography-ellipsis-single-line {
16561
16678
  display: grid;
16562
16679
  place-items: center;
16563
16680
  flex-shrink: 0;
16681
+ /* Decorative only — the overlaid input owns hit-testing. Without this, the
16682
+ * indicator (and its inherited dot child) intercept `getByRole('radio').click()`;
16683
+ * clicks on any edge sliver the input does not cover fall through to the label,
16684
+ * which toggles via label/input association. */
16685
+ pointer-events: none;
16564
16686
  inline-size: var(--db-radio-size);
16565
16687
  block-size: var(--db-radio-size);
16566
16688
  margin-top: calc((var(--db-line-height-base, 20px) - var(--db-radio-size)) / 2);
16567
- border: var(--db-radio-border-width) solid var(--db-radio-border-default);
16689
+ border: var(--db-radio-border-width) solid var(--db-radio-border);
16568
16690
  border-radius: var(--db-radio-border-radius);
16569
- background-color: var(--db-radio-bg-default);
16691
+ background-color: var(--db-radio-surface);
16570
16692
  box-sizing: border-box;
16571
16693
  transition:
16572
16694
  background-color var(--db-radio-transition-duration) ease,
@@ -16576,10 +16698,10 @@ span.du-bois-light-typography-ellipsis-single-line {
16576
16698
 
16577
16699
  .ds-radio .ds-radio-indicator > .ds-radio-dot {
16578
16700
  grid-area: 1 / 1;
16579
- inline-size: var(--db-radio-dot-size);
16580
- block-size: var(--db-radio-dot-size);
16701
+ inline-size: var(--db-radio-mark-size);
16702
+ block-size: var(--db-radio-mark-size);
16581
16703
  border-radius: var(--db-radius-full);
16582
- background-color: var(--db-radio-dot-color);
16704
+ background-color: var(--db-radio-mark);
16583
16705
  opacity: 0;
16584
16706
  transition: opacity var(--db-radio-transition-duration) ease;
16585
16707
  }
@@ -16597,7 +16719,7 @@ span.du-bois-light-typography-ellipsis-single-line {
16597
16719
  * trailing whitespace that separates adjacent radios in a row. */
16598
16720
  .ds-radio .ds-radio-label {
16599
16721
  color: var(--db-radio-text);
16600
- padding-inline: var(--db-radio-spacing);
16722
+ padding-inline: var(--db-radio-label-spacing);
16601
16723
  word-break: break-word;
16602
16724
  }
16603
16725
 
@@ -16611,7 +16733,7 @@ span.du-bois-light-typography-ellipsis-single-line {
16611
16733
  .ds-radio.ds-radio + .du-bois-dark-form-message,
16612
16734
  .ds-radio.ds-radio + .du-bois-light-hint + .du-bois-light-form-message,
16613
16735
  .ds-radio.ds-radio + .du-bois-dark-hint + .du-bois-dark-form-message {
16614
- padding-inline-start: var(--db-space-lg);
16736
+ padding-inline-start: var(--db-spacing-sm);
16615
16737
  margin-top: 0;
16616
16738
  }
16617
16739
 
@@ -16627,8 +16749,8 @@ span.du-bois-light-typography-ellipsis-single-line {
16627
16749
  .ds-radio-group.ds-stack > .ds-radio.ds-radio + .du-bois-dark-form-message,
16628
16750
  .ds-radio-group.ds-stack > .ds-radio.ds-radio + .du-bois-light-hint + .du-bois-light-form-message,
16629
16751
  .ds-radio-group.ds-stack > .ds-radio.ds-radio + .du-bois-dark-hint + .du-bois-dark-form-message {
16630
- margin-top: calc(-1 * var(--db-space-sm));
16631
- margin-bottom: var(--db-space-sm);
16752
+ margin-top: calc(-1 * var(--db-spacing-2xs));
16753
+ margin-bottom: var(--db-spacing-2xs);
16632
16754
  }
16633
16755
 
16634
16756
  /* AntD `& > label:last-of-type + hint { marginTop: 0 }`: the last radio has no
@@ -16646,7 +16768,7 @@ span.du-bois-light-typography-ellipsis-single-line {
16646
16768
  .du-bois-dark-hint + .ds-radio-group.ds-radio-group,
16647
16769
  .ds-radio-group.ds-radio-group + .du-bois-light-form-message,
16648
16770
  .ds-radio-group.ds-radio-group + .du-bois-dark-form-message {
16649
- margin-top: var(--db-space-sm);
16771
+ margin-top: var(--db-spacing-2xs);
16650
16772
  }
16651
16773
 
16652
16774
  /* RadioGroup layout. Vertical (the default) delegates flex-direction to the
@@ -16662,12 +16784,12 @@ span.du-bois-light-typography-ellipsis-single-line {
16662
16784
  * no gap of its own, so we zero out the gap and reproduce the rhythm via
16663
16785
  * padding-bottom on each radio. */
16664
16786
  .ds-radio-group.ds-stack {
16665
- --ds-stack-gap: var(--db-space-0);
16787
+ --ds-stack-gap: 0;
16666
16788
  }
16667
16789
 
16668
16790
  /* AntD `& > label { paddingBottom: sm }`. */
16669
16791
  .ds-radio-group.ds-stack > .ds-radio {
16670
- padding-bottom: var(--db-space-sm);
16792
+ padding-bottom: var(--db-spacing-2xs);
16671
16793
  }
16672
16794
 
16673
16795
  /* AntD `& > label:last-of-type { paddingBottom: 0 }`. */
@@ -16683,7 +16805,7 @@ span.du-bois-light-typography-ellipsis-single-line {
16683
16805
  .ds-radio-group.ds-stack > .du-bois-light-radio-tile + .du-bois-dark-radio-tile,
16684
16806
  .ds-radio-group.ds-stack > .du-bois-dark-radio-tile + .du-bois-light-radio-tile,
16685
16807
  .ds-radio-group.ds-stack > .du-bois-dark-radio-tile + .du-bois-dark-radio-tile {
16686
- margin-top: var(--db-space-md);
16808
+ margin-top: var(--db-spacing-xs);
16687
16809
  }
16688
16810
 
16689
16811
  /* Horizontal: AntD `getHorizontalRadioGroupStyles` is a TWO-ROW grid (NOT a flex
@@ -16696,7 +16818,7 @@ span.du-bois-light-typography-ellipsis-single-line {
16696
16818
  display: grid;
16697
16819
  grid-template-rows: [label] auto [hint] auto;
16698
16820
  grid-auto-columns: max-content;
16699
- column-gap: var(--db-space-md);
16821
+ column-gap: var(--db-spacing-xs);
16700
16822
  }
16701
16823
 
16702
16824
  /* Equal column widths: AntD `gridAutoColumns: minmax(0, 1fr)`. */
@@ -16729,64 +16851,52 @@ span.du-bois-light-typography-ellipsis-single-line {
16729
16851
  * the group itself gets a top margin (room above the two-row grid). */
16730
16852
  .ds-radio-group--horizontal:has(> .du-bois-light-hint),
16731
16853
  .ds-radio-group--horizontal:has(> .du-bois-dark-hint) {
16732
- margin-top: var(--db-space-sm);
16854
+ margin-top: var(--db-spacing-2xs);
16733
16855
  }
16734
16856
 
16735
16857
  /* AntD `&& + form-message { marginTop: sm }` (horizontal): a form-message following
16736
16858
  * the whole group is separated by sm. */
16737
16859
  .ds-radio-group--horizontal + .du-bois-light-form-message,
16738
16860
  .ds-radio-group--horizontal + .du-bois-dark-form-message {
16739
- margin-top: var(--db-space-sm);
16861
+ margin-top: var(--db-spacing-2xs);
16740
16862
  }
16741
16863
 
16742
- /* Component-tier tokens for <Switch>. Colors default to the selection-toggle category tokens;
16743
- * geometry is hand-authored (the pill track + sliding thumb are unique to Switch). */
16744
-
16745
- /* Re-declared under both theme classes (not just :root) so the var() chain onto
16746
- * category/system tokens re-resolves inside a `.du-bois-dark` subtree instead of
16747
- * freezing at the root (light) values. See DUBOIS-448 dark-mode scoping. */
16748
- :where(:root, .du-bois-light, .du-bois-dark) {
16749
- --db-switch-track-width: 28px;
16750
- --db-switch-track-height: 16px;
16751
- /* Thumb fills the track height by design; expressed via track-height so the two can't drift. */
16752
- --db-switch-thumb-size: var(--db-switch-track-height);
16753
- /* Pill radius overrides the category (square) radius, mirroring Radio's circular override. */
16864
+ :where(:root), :where(.du-bois-light) {
16865
+ /* Shape */
16754
16866
  --db-switch-border-radius: var(--db-radius-full);
16755
16867
  --db-switch-border-width: 1px;
16756
- --db-switch-spacing: var(--db-selection-toggle-spacing);
16757
16868
 
16758
- --db-switch-bg-default: var(--db-selection-toggle-bg-default);
16759
- --db-switch-bg-hover: var(--db-selection-toggle-bg-hover);
16760
- --db-switch-bg-press: var(--db-selection-toggle-bg-press);
16761
- --db-switch-bg-checked: var(--db-selection-toggle-bg-checked);
16762
- --db-switch-bg-checked-hover: var(--db-selection-toggle-bg-checked-hover);
16763
- --db-switch-bg-checked-press: var(--db-selection-toggle-bg-checked-press);
16764
- --db-switch-bg-disabled: var(--db-selection-toggle-bg-disabled);
16869
+ /* Color */
16870
+ --db-switch-surface: var(--db-selection-toggle-surface);
16871
+ --db-switch-surface-hover: var(--db-color-action-default-background-hover);
16872
+ --db-switch-surface-press: var(--db-color-action-default-background-press);
16873
+ --db-switch-surface-checked: var(--db-selection-toggle-surface-checked);
16874
+ --db-switch-surface-checked-hover: var(--db-selection-toggle-surface-checked-hover);
16875
+ --db-switch-surface-checked-press: var(--db-selection-toggle-surface-checked-press);
16876
+ --db-switch-surface-disabled: var(--db-selection-toggle-surface-disabled);
16877
+ --db-switch-surface-checked-disabled: var(--db-color-action-disabled-text);
16765
16878
 
16766
- --db-switch-border-default: var(--db-selection-toggle-border-default);
16879
+ --db-switch-border: var(--db-color-action-default-border-default);
16767
16880
  --db-switch-border-hover: var(--db-selection-toggle-border-hover);
16768
16881
  --db-switch-border-press: var(--db-selection-toggle-border-press);
16769
- --db-switch-border-disabled: var(--db-selection-toggle-border-disabled);
16770
- /* AntD paints the checked track border equal to the checked fill, so these alias the checked bg. */
16771
- --db-switch-border-checked: var(--db-selection-toggle-bg-checked);
16772
- --db-switch-border-checked-hover: var(--db-selection-toggle-bg-checked-hover);
16773
- --db-switch-border-checked-press: var(--db-selection-toggle-bg-checked-press);
16774
- --db-switch-border-focus: var(--db-selection-toggle-bg-checked);
16775
- /* AntD fills the disabled+checked track with actionDisabledText; no category token matches, so
16776
- * reference the system token directly (same escape hatch Radio uses for its checked-press border). */
16777
- --db-switch-bg-checked-disabled: var(--db-color-action-disabled-text);
16882
+ --db-switch-border-disabled: var(--db-color-action-disabled-border);
16883
+ --db-switch-border-checked: var(--db-selection-toggle-surface-checked);
16884
+ --db-switch-border-checked-hover: var(--db-selection-toggle-surface-checked-hover);
16885
+ --db-switch-border-checked-press: var(--db-selection-toggle-surface-checked-press);
16886
+ --db-switch-border-focus: var(--db-selection-toggle-surface-checked);
16778
16887
 
16779
- /* AntD paints the handle the off-track surface color in every state. */
16780
- --db-switch-thumb-color: var(--db-selection-toggle-bg-default);
16888
+ --db-switch-thumb: var(--db-selection-toggle-surface);
16781
16889
 
16782
- /* A token (not inherit) so the label text flips in dark mode. */
16783
- --db-switch-text: var(--db-color-text-primary);
16890
+ --db-switch-text: var(--db-selection-toggle-text);
16784
16891
  --db-switch-text-disabled: var(--db-selection-toggle-text-disabled);
16785
16892
 
16786
- /* AntD's focus ring is a 1px outline (the category default is 2px). */
16787
- --db-switch-focus-ring-width: 1px;
16788
- --db-switch-focus-ring-offset: 1px;
16789
- --db-switch-focus-ring-color: var(--db-selection-toggle-border-focus);
16893
+ /* Density */
16894
+ --db-switch-track-width: calc(var(--db-size-xs) * 1.75); /* 28px */
16895
+ --db-switch-track-height: var(--db-size-xs); /* 16px */
16896
+ --db-switch-thumb-size: var(--db-switch-track-height);
16897
+ --db-switch-label-spacing: var(--db-selection-toggle-label-spacing);
16898
+
16899
+ /* Motion */
16790
16900
  --db-switch-transition-duration: var(--db-selection-toggle-transition-duration);
16791
16901
  }
16792
16902
 
@@ -16798,7 +16908,7 @@ span.du-bois-light-typography-ellipsis-single-line {
16798
16908
  cursor: pointer;
16799
16909
  user-select: none;
16800
16910
  width: fit-content;
16801
- margin-inline-end: var(--db-switch-spacing);
16911
+ margin-inline-end: var(--db-switch-label-spacing);
16802
16912
  }
16803
16913
 
16804
16914
  .ds-switch:has(input:disabled) {
@@ -16814,9 +16924,9 @@ span.du-bois-light-typography-ellipsis-single-line {
16814
16924
  cursor: pointer;
16815
16925
  inline-size: var(--db-switch-track-width);
16816
16926
  block-size: var(--db-switch-track-height);
16817
- border: var(--db-switch-border-width) solid var(--db-switch-border-default);
16927
+ border: var(--db-switch-border-width) solid var(--db-switch-border);
16818
16928
  border-radius: var(--db-switch-border-radius);
16819
- background-color: var(--db-switch-bg-default);
16929
+ background-color: var(--db-switch-surface);
16820
16930
  box-sizing: border-box;
16821
16931
  transition:
16822
16932
  background-color var(--db-switch-transition-duration) ease,
@@ -16835,7 +16945,7 @@ span.du-bois-light-typography-ellipsis-single-line {
16835
16945
  border: var(--db-switch-border-width) solid;
16836
16946
  border-color: inherit;
16837
16947
  border-radius: var(--db-switch-border-radius);
16838
- background-color: var(--db-switch-thumb-color);
16948
+ background-color: var(--db-switch-thumb);
16839
16949
  box-sizing: border-box;
16840
16950
  transform: translateY(-50%);
16841
16951
  transition: transform var(--db-switch-transition-duration) ease;
@@ -16843,27 +16953,27 @@ span.du-bois-light-typography-ellipsis-single-line {
16843
16953
 
16844
16954
  /* `<label for>` propagates `:hover` to the input, so scope hover/press to the control, not `input:hover`. */
16845
16955
  .ds-switch:hover input:not(:disabled):not(:checked) {
16846
- background-color: var(--db-switch-bg-hover);
16956
+ background-color: var(--db-switch-surface-hover);
16847
16957
  border-color: var(--db-switch-border-hover);
16848
16958
  }
16849
16959
 
16850
16960
  .ds-switch:active input:not(:disabled):not(:checked) {
16851
- background-color: var(--db-switch-bg-press);
16961
+ background-color: var(--db-switch-surface-press);
16852
16962
  border-color: var(--db-switch-border-press);
16853
16963
  }
16854
16964
 
16855
16965
  .ds-switch input:checked {
16856
- background-color: var(--db-switch-bg-checked);
16966
+ background-color: var(--db-switch-surface-checked);
16857
16967
  border-color: var(--db-switch-border-checked);
16858
16968
  }
16859
16969
 
16860
16970
  .ds-switch:hover input:checked:not(:disabled) {
16861
- background-color: var(--db-switch-bg-checked-hover);
16971
+ background-color: var(--db-switch-surface-checked-hover);
16862
16972
  border-color: var(--db-switch-border-checked-hover);
16863
16973
  }
16864
16974
 
16865
16975
  .ds-switch:active input:checked:not(:disabled) {
16866
- background-color: var(--db-switch-bg-checked-press);
16976
+ background-color: var(--db-switch-surface-checked-press);
16867
16977
  border-color: var(--db-switch-border-checked-press);
16868
16978
  }
16869
16979
 
@@ -16872,27 +16982,29 @@ span.du-bois-light-typography-ellipsis-single-line {
16872
16982
  }
16873
16983
 
16874
16984
  /* 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. */
16985
+ * the ring sits flush when off and gains a 1px offset when checked.
16986
+ * TODO: width/offset are hardcoded 1px to preserve the AntD look; adopt the system 2px focus ring
16987
+ * (var(--db-focus-ring-width)) in a separate change. */
16876
16988
  .ds-switch input:focus-visible {
16877
16989
  border-color: var(--db-switch-border-focus);
16878
- outline: var(--db-switch-focus-ring-width) solid var(--db-switch-focus-ring-color);
16990
+ outline: 1px solid var(--db-focus-ring-color);
16879
16991
  outline-offset: 0;
16880
16992
  }
16881
16993
 
16882
16994
  .ds-switch input:checked:focus-visible {
16883
- outline-offset: var(--db-switch-focus-ring-offset);
16995
+ outline-offset: 1px;
16884
16996
  }
16885
16997
 
16886
16998
  .ds-switch input:disabled {
16887
16999
  cursor: not-allowed;
16888
- background-color: var(--db-switch-bg-disabled);
17000
+ background-color: var(--db-switch-surface-disabled);
16889
17001
  border-color: var(--db-switch-border-disabled);
16890
17002
  }
16891
17003
 
16892
17004
  /* Disabled + on: more specific than the plain disabled rule, so it wins regardless of source order. */
16893
17005
  .ds-switch input:checked:disabled {
16894
- background-color: var(--db-switch-bg-checked-disabled);
16895
- border-color: var(--db-switch-bg-checked-disabled);
17006
+ background-color: var(--db-switch-surface-checked-disabled);
17007
+ border-color: var(--db-switch-surface-checked-disabled);
16896
17008
  }
16897
17009
 
16898
17010
  @media (prefers-reduced-motion: reduce) {
@@ -16909,13 +17021,13 @@ span.du-bois-light-typography-ellipsis-single-line {
16909
17021
 
16910
17022
  .ds-switch-wrapper .ds-switch-state-message {
16911
17023
  margin-inline-start: auto;
16912
- margin-inline-end: var(--db-switch-spacing);
17024
+ margin-inline-end: var(--db-switch-label-spacing);
16913
17025
  }
16914
17026
 
16915
17027
  /* `:first-child` scopes this to the label-first layout; the plain layout renders the label last. */
16916
17028
  .ds-switch-wrapper > .du-bois-light-label:first-child,
16917
17029
  .ds-switch-wrapper > .du-bois-dark-label:first-child {
16918
- margin-inline-end: var(--db-switch-spacing);
17030
+ margin-inline-end: var(--db-switch-label-spacing);
16919
17031
  }
16920
17032
 
16921
17033
  .ds-switch-state-message {
@@ -16934,7 +17046,7 @@ span.du-bois-light-typography-ellipsis-single-line {
16934
17046
  + :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)
16935
17047
  + :is(.du-bois-light-hint, .du-bois-dark-hint)
16936
17048
  + :is(.du-bois-light-form-message, .du-bois-dark-form-message) {
16937
- padding-inline-start: calc(var(--db-space-sm) + var(--db-switch-track-width));
17049
+ padding-inline-start: calc(var(--db-spacing-2xs) + var(--db-switch-track-width));
16938
17050
  }
16939
17051
 
16940
17052
  :is(.ds-switch.ds-switch, .ds-switch-wrapper.ds-switch-wrapper)