@databricks/design-system 2.0.2 → 2.0.4

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 (81) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/dist/{WizardStepContentWrapper-DnwQIMN1.js → WizardStepContentWrapper-8bs2FwRi.js} +706 -533
  3. package/dist/WizardStepContentWrapper-8bs2FwRi.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 +323 -225
  7. package/dist/index-dark.mitigated.css +323 -225
  8. package/dist/index.css +539 -427
  9. package/dist/index.js +259 -159
  10. package/dist/index.js.map +1 -1
  11. package/dist/index.mitigated.css +548 -436
  12. package/dist/patterns.js +3 -2
  13. package/dist/patterns.js.map +1 -1
  14. package/dist/test-utils/rtl.js +1 -1
  15. package/dist/test-utils/rtl.js.map +1 -1
  16. package/dist-types/design-system/Alert/Alert.d.ts +1 -1
  17. package/dist-types/design-system/ContextMenu/ContextMenu.d.ts +2 -2
  18. package/dist-types/design-system/DesignSystemProvider/DesignSystemProvider.d.ts +66 -0
  19. package/dist-types/design-system/DesignSystemProvider/DesignTokenScopeWithEmotionTheme.d.ts +23 -0
  20. package/dist-types/design-system/DesignSystemProvider/index.d.ts +1 -0
  21. package/dist-types/design-system/Grid/Col.d.ts +1 -3
  22. package/dist-types/design-system/Grid/NativeCol.d.ts +10 -0
  23. package/dist-types/design-system/Grid/NativeGridContext.d.ts +11 -0
  24. package/dist-types/design-system/Grid/NativeRow.d.ts +13 -0
  25. package/dist-types/design-system/Grid/Row.d.ts +3 -4
  26. package/dist-types/design-system/Grid/grid-styling.d.ts +22 -0
  27. package/dist-types/design-system/Grid/gridConstants.d.ts +2 -0
  28. package/dist-types/design-system/Grid/index.d.ts +1 -0
  29. package/dist-types/design-system/Grid/rowConstants.d.ts +7 -0
  30. package/dist-types/design-system/Grid/types.d.ts +49 -0
  31. package/dist-types/design-system/Hooks/index.d.ts +1 -1
  32. package/dist-types/design-system/Hooks/useDesignSystemTheme.d.ts +7 -7
  33. package/dist-types/design-system/Icon/LegacyAntDIcon.d.ts +21 -0
  34. package/dist-types/design-system/Icon/index.d.ts +0 -1
  35. package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxAddButton.d.ts +4 -0
  36. package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxCheckboxItem.d.ts +8 -0
  37. package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxFooter.d.ts +12 -0
  38. package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxInput.d.ts +8 -0
  39. package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxMenu.d.ts +8 -0
  40. package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxMenuItem.d.ts +8 -0
  41. package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxMultiSelectInput.d.ts +8 -0
  42. package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxRoot.d.ts +8 -0
  43. package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxSectionHeader.d.ts +4 -0
  44. package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxSelectedItem.d.ts +8 -0
  45. package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxSeparator.d.ts +4 -0
  46. package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxToggleButton.d.ts +8 -0
  47. package/dist-types/design-system/TypeaheadCombobox/hooks/downshiftHookWrappers.d.ts +8 -0
  48. package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/hooks/useComboboxState.d.ts +6 -0
  49. package/dist-types/design-system/TypeaheadComboboxV2/hooks/useRestoreHighlightedOption.d.ts +18 -0
  50. package/dist-types/design-system/TypeaheadComboboxV2/hooks/useTypeaheadComboboxContext.d.ts +2 -0
  51. package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/providers/TypeaheadComboboxContext.d.ts +6 -4
  52. package/dist-types/design-system/_shared_/Menu/index.d.ts +1 -1
  53. package/dist-types/design-system/fonts.d.ts +1 -0
  54. package/dist-types/design-system/index.d.ts +1 -1
  55. package/dist-types/test-utils/rtl/buttonVariants.d.ts +11 -0
  56. package/package.json +9 -2
  57. package/dist/WizardStepContentWrapper-DnwQIMN1.js.map +0 -1
  58. package/dist-types/design-system/Icon/AntdIcon.d.ts +0 -114
  59. package/dist-types/design-system/TypeaheadComboboxReactAria/hooks/useTypeaheadComboboxContext.d.ts +0 -2
  60. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/CountBadge.d.ts +0 -0
  61. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxAddButton.d.ts +0 -0
  62. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxCheckboxItem.d.ts +0 -0
  63. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxControls.d.ts +0 -0
  64. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxFooter.d.ts +0 -0
  65. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxInput.d.ts +0 -0
  66. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxMenu.d.ts +0 -0
  67. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxMenuItem.d.ts +0 -0
  68. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxMultiSelectInput.d.ts +0 -0
  69. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxRoot.d.ts +0 -0
  70. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxSectionHeader.d.ts +0 -0
  71. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxSelectedItem.d.ts +0 -0
  72. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxSeparator.d.ts +0 -0
  73. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxToggleButton.d.ts +0 -0
  74. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/hooks/footerFocus.d.ts +0 -0
  75. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/hooks/index.d.ts +0 -0
  76. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/hooks/useComboboxItems.d.ts +0 -0
  77. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/hooks/useComboboxStateProps.d.ts +0 -0
  78. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/hooks/useMultipleSelectionState.d.ts +0 -0
  79. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/hooks/useScrollOptionIntoView.d.ts +0 -0
  80. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/hooks/useVirtualizedComboboxScroll.d.ts +0 -0
  81. /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/index.d.ts +0 -0
@@ -16249,123 +16249,251 @@ span.du-bois-dark-typography-ellipsis-single-line {
16249
16249
  --db-color-tooltip-text-tooltip: #11171c;
16250
16250
  }
16251
16251
 
16252
- /* Layout primitive classes — internal Du Bois use for now (not a published
16253
- * consumer API yet; see the Stefan/Sheng weekly decision to "give it a try
16254
- * just within the Du Bois components"). Two primitives, both plain CSS so they
16255
- * ride the mortar cascade like the other component styles:
16256
- *
16257
- * .ds-stack — vertical flow, even gap between direct children.
16258
- * .ds-cluster — horizontal group that wraps, even gap between children.
16259
- *
16260
- * Each primitive exposes a small set of `--ds-*` knobs, defaulted on the class
16261
- * itself (not via a `var()` fallback, which would freeze the default at every
16262
- * call site). Override any of them on the element — inline
16263
- * `style={{ '--ds-stack-gap': ... }}` or a more specific selector — without a
16264
- * new modifier class:
16265
- *
16266
- * stack: --ds-stack-gap (spacing), --ds-stack-align (align-items)
16267
- * cluster: --ds-cluster-gap (spacing), --ds-cluster-align (align-items),
16268
- * --ds-cluster-justify (justify-content)
16269
- *
16270
- * Gap defaults point at the system spacing scale (`--db-space-*`). Padding is
16271
- * intentionally NOT a knob — a layout primitive owns the space between children,
16272
- * not its own box padding. */
16252
+ /*
16253
+ Vertical "stack" of elements.
16254
+ Use this for any layout where items are laid out vertically.
16273
16255
 
16274
- /* Cluster wraps by design: a long row reflows onto multiple lines rather than
16275
- * overflowing. A row that must NOT wrap (e.g. a single-line control strip) is
16276
- * not a cluster — keep it bespoke. */
16256
+ \3c !-- Basic: default gap between each child -->
16257
+ <div class="db-stack">
16258
+ <h2>Title</h2>
16259
+ <p>Body</p>
16260
+ <button>Action</button>
16261
+ </div>
16277
16262
 
16278
- /* Category-tier tokens shared by selection-control components:
16279
- * <Checkbox>, <Switch>, <Radio>. Each value here references a SYSTEM token
16280
- * from system-tokens.css — never a raw hex/px literal — so the only place a
16281
- * brand-level theme change has to land is the system tier.
16282
- *
16283
- * Component-tier files (e.g. design-system/Checkbox/tokens.css) inherit from
16284
- * these via `var()` so consumers can override a single selection control by
16285
- * targeting only its component tokens. */
16263
+ \3c !-- Wider gap for this instance -->
16264
+ <div class="db-stack" style="--db-stack-gap: var(--db-spacing-lg)">…</div>
16265
+
16266
+ \3c !-- Don't stretch children to full width (e.g. left-aligned buttons) -->
16267
+ <div class="db-stack" style="--db-stack-align: flex-start">…</div>
16268
+ */
16269
+
16270
+ /**
16271
+ Responsive, horizontal "cluster" of elements.
16272
+ Use this for any layout where items are laid out horizontally and should wrap on smaller viewport sizes.
16273
+
16274
+ \3c !-- Basic: items wrap as needed -->
16275
+ <div class="db-cluster">
16276
+ <span>one</span>
16277
+ <span>two</span>
16278
+ <span>three</span>
16279
+ </div>
16280
+
16281
+ \3c !-- Push children apart (e.g. title left, actions right) -->
16282
+ <div class="db-cluster" style="--db-cluster-justify: space-between">…</div>
16283
+
16284
+ \3c !-- Looser gap for this instance -->
16285
+ <div class="db-cluster" style="--db-cluster-gap: var(--db-spacing-sm)">…</div>
16286
+ */
16287
+
16288
+
16289
+
16290
+ :where(.du-bois-dark) {
16291
+ /* Neutral */
16292
+ --db-neutral-surface: var(--db-color-background-primary);
16293
+ --db-subtle-neutral-surface: var(--db-color-background-secondary);
16294
+ --db-strong-neutral-surface: initial; /* TODO */
16295
+
16296
+ --db-text-on-neutral-surface: var(--db-color-text-primary);
16297
+ --db-subtle-text-on-neutral-surface: var(--db-color-text-secondary);
16298
+ --db-strong-text-on-neutral-surface: initial; /* TODO */
16299
+
16300
+ --db-neutral-border: var(--db-color-border);
16301
+ --db-subtle-neutral-border: initial; /* TODO */
16302
+ --db-strong-neutral-border: var(--db-color-border-accessible);
16303
+
16304
+ --db-neutral-surface-active: var(--db-color-table-background-selected-default);
16305
+ --db-neutral-surface-hover: var(--db-color-table-background-unselected-hover);
16306
+ --db-neutral-surface-pressed: var(--db-color-table-background-selected-hover);
16307
+ --db-neutral-surface-disabled: var(--db-color-action-disabled-background);
16308
+ --db-text-on-neutral-surface-disabled: var(--db-color-action-disabled-text);
16286
16309
 
16287
- /* Re-declared under both theme classes as well as :root: these values are
16288
- * `var()` indirections onto SYSTEM tokens, and a custom property resolves its
16289
- * var() at its DECLARATION site. Declared only at :root, they would freeze at
16290
- * the root (light) system values and never re-read the dark system tokens
16291
- * inside a `.du-bois-dark` subtree. Re-declaring at every theme boundary makes
16292
- * the indirection re-resolve per theme. See DUBOIS-448 dark-mode scoping. */
16293
- :where(:root, .du-bois-light, .du-bois-dark) {
16294
- --db-selection-toggle-bg-default: var(--db-color-background-primary);
16295
- --db-selection-toggle-bg-hover: var(--db-color-action-default-background-hover);
16296
- --db-selection-toggle-bg-press: var(--db-color-action-default-background-press);
16297
- --db-selection-toggle-bg-checked: var(--db-color-action-primary-background-default);
16298
- --db-selection-toggle-bg-checked-hover: var(--db-color-action-primary-background-hover);
16299
- --db-selection-toggle-bg-checked-press: var(--db-color-action-primary-background-press);
16300
- --db-selection-toggle-bg-disabled: var(--db-color-action-disabled-background);
16310
+ /* Primary */
16311
+ --db-primary-surface: var(--db-color-action-primary-background-default);
16312
+ --db-subtle-primary-surface: var(--db-color-action-default-background-hover);
16313
+ --db-strong-primary-surface: var(--db-color-action-primary-background-hover);
16301
16314
 
16302
- --db-selection-toggle-border-default: var(--db-color-action-default-border-default);
16303
- --db-selection-toggle-border-hover: var(--db-color-action-primary-background-hover);
16304
- --db-selection-toggle-border-press: var(--db-color-action-primary-background-press);
16305
- --db-selection-toggle-border-focus: var(--db-color-action-default-border-focus);
16306
- --db-selection-toggle-border-disabled: var(--db-color-action-disabled-border);
16315
+ --db-text-on-primary-surface: var(--db-color-action-primary-text-default);
16316
+ --db-primary-text-on-neutral-surface: var(--db-color-action-link-default);
16317
+ --db-subtle-text-on-primary-surface: initial; /* TODO */
16318
+ --db-strong-text-on-primary-surface: var(--db-color-action-primary-text-default);
16307
16319
 
16308
- /* Raw literal, not a system token (exception to the file rule above): the mark
16309
- * sits on the theme-invariant blue checked fill, so it must stay white in BOTH
16310
- * themes. No non-flipping white system token exists — action-primary-icon flips
16311
- * to near-black under .du-bois-dark, which made the mark nearly invisible. */
16312
- --db-selection-toggle-icon-color: #ffffff;
16313
- --db-selection-toggle-icon-color-disabled: var(--db-color-action-disabled-text);
16314
- --db-selection-toggle-text: var(--db-color-text-primary);
16315
- --db-selection-toggle-text-disabled: var(--db-color-action-disabled-text);
16320
+ --db-primary-border: var(--db-color-action-primary-background-default);
16321
+ --db-subtle-primary-border: initial; /* TODO */
16322
+ --db-strong-primary-border: var(--db-color-action-primary-background-press);
16316
16323
 
16317
- --db-selection-toggle-size: 16px;
16318
- --db-selection-toggle-border-radius: var(--db-radius-sm);
16319
- --db-selection-toggle-spacing: var(--db-space-sm);
16324
+ --db-primary-surface-active: initial; /* TODO */
16325
+ --db-primary-surface-hover: var(--db-color-action-primary-background-hover);
16326
+ --db-primary-surface-pressed: var(--db-color-action-primary-background-press);
16327
+ --db-primary-surface-disabled: var(--db-color-action-disabled-background);
16328
+ --db-text-on-primary-surface-disabled: var(--db-color-action-disabled-text);
16329
+
16330
+ /* Error */
16331
+ --db-error-surface: var(--db-color-action-danger-primary-background-default);
16332
+ --db-subtle-error-surface: var(--db-color-background-danger);
16333
+ --db-strong-error-surface: var(--db-color-action-danger-primary-background-hover);
16334
+
16335
+ --db-text-on-error-surface: var(--db-color-action-danger-primary-text);
16336
+ --db-error-text-on-neutral-surface: var(--db-color-text-validation-danger);
16337
+ --db-subtle-text-on-error-surface: initial; /* TODO */
16338
+ --db-strong-text-on-error-surface: var(--db-color-action-danger-primary-text);
16339
+
16340
+ --db-error-border: var(--db-color-action-danger-default-border-default);
16341
+ --db-subtle-error-border: var(--db-color-border-danger);
16342
+ --db-strong-error-border: var(--db-color-action-danger-primary-background-press);
16343
+
16344
+ --db-error-surface-active: initial; /* TODO */
16345
+ --db-error-surface-hover: var(--db-color-action-danger-primary-background-hover);
16346
+ --db-error-surface-pressed: var(--db-color-action-danger-primary-background-press);
16347
+ --db-error-surface-disabled: var(--db-color-action-disabled-background);
16348
+ --db-text-on-error-surface-disabled: var(--db-color-action-disabled-text);
16349
+
16350
+ /* Warning */
16351
+ --db-warning-surface: initial; /* TODO */
16352
+ --db-subtle-warning-surface: var(--db-color-background-warning);
16353
+
16354
+ --db-text-on-warning-surface: initial; /* TODO */
16355
+ --db-warning-text-on-neutral-surface: var(--db-color-text-validation-warning);
16356
+
16357
+ --db-warning-border: var(--db-color-border-warning);
16358
+
16359
+ /* Success */
16360
+ --db-success-surface: initial; /* TODO */
16361
+ --db-subtle-success-surface: var(--db-color-background-success);
16362
+
16363
+ --db-text-on-success-surface: initial; /* TODO */
16364
+ --db-success-text-on-neutral-surface: var(--db-color-text-validation-success);
16365
+
16366
+ --db-success-border: initial; /* TODO */
16367
+ }
16368
+
16369
+ :where(.du-bois-dark) {
16370
+ --db-layout-unit: 0.25rem; /* 4px */
16371
+ --db-density-scalar: 1;
16372
+ --db-size-scalar: 1;
16373
+ --db-spacing-scalar: 1;
16374
+
16375
+ /* Size and spacing are the same steps, but with their own scalars included in the calc. */
16376
+
16377
+ --db-size-3xs: calc(var(--db-layout-unit) * 1 * var(--db-density-scalar) * var(--db-size-scalar)); /* 4px */
16378
+ --db-size-2xs: calc(var(--db-layout-unit) * 2 * var(--db-density-scalar) * var(--db-size-scalar)); /* 8px */
16379
+ --db-size-xs: calc(var(--db-layout-unit) * 4 * var(--db-density-scalar) * var(--db-size-scalar)); /* 16px */
16380
+ --db-size-sm: calc(var(--db-layout-unit) * 6 * var(--db-density-scalar) * var(--db-size-scalar)); /* 24px */
16381
+ --db-size-md: calc(var(--db-layout-unit) * 8 * var(--db-density-scalar) * var(--db-size-scalar)); /* 32px */
16382
+ --db-size-lg: calc(var(--db-layout-unit) * 10 * var(--db-density-scalar) * var(--db-size-scalar)); /* 40px */
16383
+
16384
+ --db-spacing-3xs: calc(var(--db-layout-unit) * 1 * var(--db-density-scalar) * var(--db-spacing-scalar)); /* 4px */
16385
+ --db-spacing-2xs: calc(var(--db-layout-unit) * 2 * var(--db-density-scalar) * var(--db-spacing-scalar)); /* 8px */
16386
+ --db-spacing-xs: calc(var(--db-layout-unit) * 4 * var(--db-density-scalar) * var(--db-spacing-scalar)); /* 16px */
16387
+ --db-spacing-sm: calc(var(--db-layout-unit) * 6 * var(--db-density-scalar) * var(--db-spacing-scalar)); /* 24px */
16388
+ --db-spacing-md: calc(var(--db-layout-unit) * 8 * var(--db-density-scalar) * var(--db-spacing-scalar)); /* 32px */
16389
+ --db-spacing-lg: calc(var(--db-layout-unit) * 10 * var(--db-density-scalar) * var(--db-spacing-scalar)); /* 40px */
16390
+ }
16391
+
16392
+ :where(.du-bois-dark) {
16393
+ --db-font-family:
16394
+ "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
16395
+ --db-mono-font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
16396
+
16397
+ --db-font-size-2xs: 0.6875rem; /* 11px */
16398
+ --db-font-size-xs: 0.75rem; /* 12px */
16399
+ --db-font-size-base: 0.8125rem; /* 13px */
16400
+ --db-font-size-md: 0.875rem; /* 14px */
16401
+ --db-font-size-lg: 0.9375rem; /* 15px */
16402
+ --db-font-size-xl: 1rem; /* 16px */
16403
+ --db-font-size-2xl: 1.25rem; /* 20px */
16404
+ --db-font-size-3xl: 1.5rem; /* 24px */
16405
+ --db-font-size-4xl: 2rem; /* 32px */
16406
+
16407
+ /* Du Bois v1 ships 400 and 600 only */
16408
+ --db-font-weight-normal: 400;
16409
+ --db-font-weight-medium: initial; /* TODO */
16410
+ --db-font-weight-semibold: 600;
16411
+ --db-font-weight-bold: initial; /* TODO */
16412
+ }
16413
+
16414
+ :where(.du-bois-dark) {
16415
+ --db-elevation-inset: initial; /* TODO */
16416
+ --db-elevation-low: 0px 2px 3px -1px rgba(0, 0, 0, 0.05), 0px 1px 0px 0px rgba(0, 0, 0, 0.02);
16417
+ --db-elevation-med: 0px 2px 16px 0px rgba(0, 0, 0, 0.08);
16418
+ --db-elevation-high: 0px 8px 40px 0px rgba(0, 0, 0, 0.13);
16419
+ }
16420
+
16421
+ :where(.du-bois-dark) {
16422
+ --db-focus-ring-color: var(--db-color-action-default-border-focus);
16423
+ --db-focus-ring-width: 2px;
16424
+ }
16425
+
16426
+ :where(.du-bois-dark) {
16427
+ /* Shape */
16428
+ --db-selection-toggle-border-radius: 4px;
16429
+
16430
+ /* Color */
16431
+ --db-selection-toggle-surface: var(--db-neutral-surface);
16432
+ --db-selection-toggle-mark: var(--db-text-on-primary-surface);
16433
+ --db-selection-toggle-text: var(--db-text-on-neutral-surface);
16434
+ --db-selection-toggle-border: var(--db-strong-neutral-border);
16435
+
16436
+ --db-selection-toggle-surface-hover: var(--db-neutral-surface-hover);
16437
+ --db-selection-toggle-surface-press: var(--db-neutral-surface-pressed);
16438
+ --db-selection-toggle-surface-checked: var(--db-primary-surface);
16439
+ --db-selection-toggle-surface-checked-hover: var(--db-primary-surface-hover);
16440
+ --db-selection-toggle-surface-checked-press: var(--db-primary-surface-pressed);
16441
+ --db-selection-toggle-surface-disabled: var(--db-neutral-surface-disabled);
16442
+ --db-selection-toggle-surface-checked-disabled: var(--db-neutral-surface-disabled);
16443
+
16444
+ --db-selection-toggle-border-hover: var(--db-primary-surface-hover);
16445
+ --db-selection-toggle-border-press: var(--db-primary-surface-pressed);
16446
+ --db-selection-toggle-border-disabled: var(--db-neutral-border);
16447
+
16448
+ --db-selection-toggle-mark-disabled: var(--db-text-on-neutral-surface-disabled);
16449
+ --db-selection-toggle-text-disabled: var(--db-text-on-neutral-surface-disabled);
16320
16450
 
16321
- /* Focus ring matches AntD legacy variant; offset keeps it outside the toggle.
16322
- * Hard-coded for now — Figma export doesn't include shadow tokens. */
16323
16451
  --db-selection-toggle-shadow-checked: 0 0 0 1px var(--db-color-action-primary-background-default);
16324
- --db-selection-toggle-focus-ring-width: 2px;
16325
- --db-selection-toggle-focus-ring-offset: 2px;
16452
+
16453
+ /* Density */
16454
+ --db-selection-toggle-size: var(--db-size-xs);
16455
+ --db-selection-toggle-label-spacing: var(--db-spacing-2xs);
16456
+
16457
+ /* Motion */
16326
16458
  --db-selection-toggle-transition-duration: 120ms;
16327
16459
  }
16328
16460
 
16329
- /* Component-tier tokens for <Checkbox>. Each value defaults to a CATEGORY
16330
- * (selection-toggle) token via var(); consumers can override here to retheme
16331
- * checkboxes without affecting switch / radio. */
16332
-
16333
- /* Re-declared under both theme classes (not just :root) so the var() chain onto
16334
- * category/system tokens re-resolves inside a `.du-bois-dark` subtree instead of
16335
- * freezing at the root (light) values. See DUBOIS-448 dark-mode scoping. */
16336
- :where(:root, .du-bois-light, .du-bois-dark) {
16337
- --db-checkbox-size: var(--db-selection-toggle-size);
16461
+ :where(.du-bois-dark) {
16462
+ /* Shape */
16338
16463
  --db-checkbox-border-radius: var(--db-selection-toggle-border-radius);
16339
16464
  --db-checkbox-border-width: 1px;
16340
- --db-checkbox-spacing: var(--db-selection-toggle-spacing);
16341
16465
 
16342
- --db-checkbox-bg-default: var(--db-selection-toggle-bg-default);
16343
- --db-checkbox-bg-hover: var(--db-selection-toggle-bg-hover);
16344
- --db-checkbox-bg-press: var(--db-selection-toggle-bg-press);
16345
- --db-checkbox-bg-checked: var(--db-selection-toggle-bg-checked);
16346
- --db-checkbox-bg-checked-hover: var(--db-selection-toggle-bg-checked-hover);
16347
- --db-checkbox-bg-checked-press: var(--db-selection-toggle-bg-checked-press);
16348
- --db-checkbox-bg-disabled: var(--db-selection-toggle-bg-disabled);
16466
+ /* Color */
16467
+ --db-checkbox-surface: var(--db-selection-toggle-surface);
16468
+ --db-checkbox-surface-hover: var(--db-color-action-default-background-hover);
16469
+ --db-checkbox-surface-press: var(--db-color-action-default-background-press);
16470
+ --db-checkbox-surface-checked: var(--db-selection-toggle-surface-checked);
16471
+ --db-checkbox-surface-checked-hover: var(--db-selection-toggle-surface-checked-hover);
16472
+ --db-checkbox-surface-checked-press: var(--db-selection-toggle-surface-checked-press);
16473
+ --db-checkbox-surface-disabled: var(--db-selection-toggle-surface-disabled);
16349
16474
 
16350
- --db-checkbox-border-default: var(--db-selection-toggle-border-default);
16475
+ --db-checkbox-border: var(--db-color-action-default-border-default);
16351
16476
  --db-checkbox-border-hover: var(--db-selection-toggle-border-hover);
16352
16477
  --db-checkbox-border-press: var(--db-selection-toggle-border-press);
16353
- --db-checkbox-border-focus: var(--db-selection-toggle-border-focus);
16354
- --db-checkbox-border-disabled: var(--db-selection-toggle-border-disabled);
16478
+ --db-checkbox-focus-ring: var(--db-focus-ring-color);
16479
+ --db-checkbox-border-disabled: var(--db-color-action-disabled-border);
16355
16480
 
16356
- --db-checkbox-icon-color: var(--db-selection-toggle-icon-color);
16357
- --db-checkbox-icon-color-disabled: var(--db-selection-toggle-icon-color-disabled);
16481
+ --db-checkbox-mark: #ffffff;
16482
+ --db-checkbox-mark-disabled: var(--db-selection-toggle-mark-disabled);
16358
16483
  --db-checkbox-text: var(--db-selection-toggle-text);
16359
16484
  --db-checkbox-text-disabled: var(--db-selection-toggle-text-disabled);
16360
16485
 
16361
16486
  --db-checkbox-shadow-checked: var(--db-selection-toggle-shadow-checked);
16362
- --db-checkbox-focus-ring-width: var(--db-selection-toggle-focus-ring-width);
16363
- --db-checkbox-focus-ring-offset: var(--db-selection-toggle-focus-ring-offset);
16364
- --db-checkbox-transition-duration: var(--db-selection-toggle-transition-duration);
16365
16487
 
16366
- /* Indeterminate mark — the horizontal dash shown in the mixed state. */
16367
- --db-checkbox-indeterminate-mark-width: 8px;
16368
- --db-checkbox-indeterminate-mark-height: 3px;
16488
+ /* Density */
16489
+ --db-checkbox-size: var(--db-selection-toggle-size);
16490
+ --db-checkbox-label-spacing: var(--db-selection-toggle-label-spacing);
16491
+ --db-checkbox-focus-ring-width: var(--db-focus-ring-width);
16492
+ --db-checkbox-indeterminate-mark-width: var(--db-size-2xs); /* 8px */
16493
+ --db-checkbox-indeterminate-mark-height: calc(var(--db-size-3xs) * 0.75); /* 3px */
16494
+
16495
+ /* Motion */
16496
+ --db-checkbox-transition-duration: var(--db-selection-toggle-transition-duration);
16369
16497
  }
16370
16498
 
16371
16499
  /* Native-input <Checkbox> styles. Classic CSS only — no native nesting (the
@@ -16376,24 +16504,23 @@ span.du-bois-dark-typography-ellipsis-single-line {
16376
16504
  *
16377
16505
  * Structure (assumed by the React component):
16378
16506
  *
16379
- * <label class="ds-checkbox">
16380
- * <input type="checkbox" class="ds-checkbox-input" />
16381
- * <span class="ds-checkbox-indicator"> ← border + fill react to state
16382
- * <svg class="ds-checkbox-checkmark" .../> ← visible when :checked
16383
- * <span class="ds-checkbox-dash" /> ← visible when :indeterminate
16507
+ * <label class="db-checkbox">
16508
+ * <input type="checkbox" class="db-checkbox-input" />
16509
+ * <span class="db-checkbox-indicator"> ← border + fill react to state
16510
+ * <svg class="db-checkbox-checkmark" .../> ← visible when :checked
16511
+ * <span class="db-checkbox-dash" /> ← visible when :indeterminate
16384
16512
  * </span>
16385
- * <span class="ds-checkbox-label">{children}</span>
16513
+ * <span class="db-checkbox-label">{children}</span>
16386
16514
  * </label>
16387
16515
  *
16388
- * State and hiding rules target `.ds-checkbox-input` — the checkbox's OWN input —
16516
+ * State and hiding rules target `.db-checkbox-input` — the checkbox's OWN input —
16389
16517
  * never a bare `input`: consumers may render an inline <input> (e.g. a number
16390
16518
  * field) inside the label children, and a descendant `input` selector would hide
16391
16519
  * / absolutely-position that field and mis-drive the `:has(…)` state rules. */
16392
16520
 
16393
- /* Hover/press live on the root (label), not on the input: the input has
16394
- * `pointer-events: none` (so a single click target stays on the label and
16395
- * label/input association toggles the box), which means `input:hover` would
16396
- * never match. Putting `:hover` on the root also makes the entire label area
16521
+ /* Hover/press live on the root (label), not on the input: the input is
16522
+ * visually hidden (opacity:0), so an `input:hover` rule wouldn't be visible
16523
+ * anyway. Putting `:hover` on the root also makes the entire label area
16397
16524
  * — not just the indicator square — drive the visual feedback. */
16398
16525
 
16399
16526
  /* Selected fill — checked and indeterminate share the same surface. */
@@ -16406,9 +16533,15 @@ span.du-bois-dark-typography-ellipsis-single-line {
16406
16533
  * `input:disabled` so the standalone-disabled and group-disabled paths both
16407
16534
  * land here without needing a separate root modifier class. */
16408
16535
 
16409
- /* Visually-hidden native input, kept interactive and in the tab order so
16410
- * `:has()` lookups above can read its state. Pointer events fall through to
16411
- * the label, so clicking anywhere toggles the box. */
16536
+ /* Visually-hidden native input (opacity:0) overlaying the indicator square,
16537
+ * kept interactive and in the tab order so `:has()` lookups above can read its
16538
+ * state. It stays pointer-clickable matching AntD's `.ant-checkbox-input`
16539
+ * so it is the top-most hit-test target over the box: `getByRole('checkbox').click()`
16540
+ * (Playwright, and any coordinate click that lands on the box) resolves to the
16541
+ * real control instead of the decorative indicator overlay. Making the input
16542
+ * `pointer-events: none` (the prior native-only behavior) is what regressed
16543
+ * interaction tests vs. the AntD variant. `cursor: inherit` tracks the label's
16544
+ * pointer / disabled `not-allowed` cursor so the box keeps AntD's cursor too. */
16412
16545
 
16413
16546
  /* Indicator — square with the border/fill that responds to state above.
16414
16547
  * Vertical math: aligns the indicator to the cap-height of the first text
@@ -16428,7 +16561,7 @@ span.du-bois-dark-typography-ellipsis-single-line {
16428
16561
  *
16429
16562
  * Each helper-text class is listed once per theme (`du-bois-light-*` /
16430
16563
  * `du-bois-dark-*`). The selectors deliberately repeat the root/group class
16431
- * (`.ds-checkbox.ds-checkbox`) to push specificity to (0,3,0). That
16564
+ * (`.db-checkbox.db-checkbox`) to push specificity to (0,3,0). That
16432
16565
  * overrides `FormMessage`'s own `&&`-doubled `margin-top: 8px` declared with
16433
16566
  * Emotion at runtime — without doubling we'd lose on the specificity tie and
16434
16567
  * the validation message would keep an 8px gap below the checkbox. */
@@ -16441,84 +16574,53 @@ span.du-bois-dark-typography-ellipsis-single-line {
16441
16574
  * follows a Hint, 8px gap above a FormMessage when it follows the group.
16442
16575
  * Doubled class on the group side beats FormMessage's `&&` for the same reason. */
16443
16576
 
16444
- /* CheckboxGroup layout. Vertical delegates to the `.ds-stack` primitive; the
16577
+ /* CheckboxGroup layout. Vertical delegates to the `.db-stack` primitive; the
16445
16578
  * horizontal default stays bespoke because it must NOT wrap (a long row of
16446
16579
  * checkboxes overflows horizontally rather than reflowing onto multiple lines),
16447
- * which is the one thing `.ds-cluster` won't do. Both wire their gap to the
16580
+ * which is the one thing `.db-cluster` won't do. Both wire their gap to the
16448
16581
  * checkbox spacing token so a retheme moves with the rest of the component. */
16449
16582
 
16450
- /* Horizontal (default): single non-wrapping row. `:not(.ds-stack)` keeps this
16583
+ /* Horizontal (default): single non-wrapping row. `:not(.db-stack)` keeps this
16451
16584
  * off the vertical element so it never fights the stack primitive's gap. */
16452
16585
 
16453
- /* Vertical: .ds-stack supplies flex-direction + gap; we only retarget the knob. */
16586
+ /* Vertical: .db-stack supplies flex-direction + gap; we only retarget the knob. */
16454
16587
 
16455
- /* Component-tier tokens for <Radio>. Each value defaults to a CATEGORY
16456
- * (selection-toggle) token via var(); consumers can override here to retheme
16457
- * radios without affecting checkbox / switch.
16458
- *
16459
- * Radio differs from Checkbox in two ways: the indicator is a full circle
16460
- * (border-radius) and the "mark" is a filled dot rather than a checkmark/dash. */
16461
-
16462
- /* Re-declared under both theme classes (not just :root) so the var() chain onto
16463
- * category/system tokens re-resolves inside a `.du-bois-dark` subtree instead of
16464
- * freezing at the root (light) values. See DUBOIS-448 dark-mode scoping. */
16465
- :where(:root, .du-bois-light, .du-bois-dark) {
16466
- --db-radio-size: var(--db-selection-toggle-size);
16467
- /* Circle, not a rounded square — the one shape token that does NOT inherit
16468
- * the category (square) radius. */
16588
+ :where(.du-bois-dark) {
16589
+ /* Shape */
16469
16590
  --db-radio-border-radius: var(--db-radius-full);
16470
16591
  --db-radio-border-width: 1px;
16471
- --db-radio-spacing: var(--db-selection-toggle-spacing);
16472
16592
 
16473
- --db-radio-bg-default: var(--db-selection-toggle-bg-default);
16474
- --db-radio-bg-hover: var(--db-selection-toggle-bg-hover);
16475
- --db-radio-bg-press: var(--db-selection-toggle-bg-press);
16476
- --db-radio-bg-checked: var(--db-selection-toggle-bg-checked);
16477
- --db-radio-bg-checked-hover: var(--db-selection-toggle-bg-checked-hover);
16478
- /* AntD checked active/press background is actionDefaultBackgroundPress (NOT the
16479
- * primary press), so this maps to the default press bg category token — see
16480
- * getRadioInputStyles checked active in AntDRadioInternal.tsx. */
16481
- --db-radio-bg-checked-press: var(--db-selection-toggle-bg-press);
16482
- --db-radio-bg-disabled: var(--db-selection-toggle-bg-disabled);
16593
+ /* Color */
16594
+ --db-radio-surface: var(--db-selection-toggle-surface);
16595
+ --db-radio-surface-hover: var(--db-color-action-default-background-hover);
16596
+ --db-radio-surface-press: var(--db-color-action-default-background-press);
16597
+ --db-radio-surface-checked: var(--db-selection-toggle-surface-checked);
16598
+ --db-radio-surface-checked-hover: var(--db-selection-toggle-surface-checked-hover);
16599
+ --db-radio-surface-checked-press: var(--db-color-action-default-background-press);
16600
+ --db-radio-surface-disabled: var(--db-selection-toggle-surface-disabled);
16483
16601
 
16484
- --db-radio-border-default: var(--db-selection-toggle-border-default);
16602
+ --db-radio-border: var(--db-color-action-default-border-default);
16485
16603
  --db-radio-border-hover: var(--db-selection-toggle-border-hover);
16486
16604
  --db-radio-border-press: var(--db-selection-toggle-border-press);
16487
- --db-radio-border-focus: var(--db-selection-toggle-border-focus);
16488
- --db-radio-border-disabled: var(--db-selection-toggle-border-disabled);
16489
-
16490
- /* Two-tone checked hover/press border ring (AntD getRadioInputStyles checked
16491
- * states): the border is a DARKER shade than the fill, not equal to it.
16492
- * - checked hover border = actionPrimaryBackgroundPress (== the press category
16493
- * token, which is action-primary-background-press).
16494
- * - checked press border = actionDefaultBorderPress; no selection-toggle
16495
- * category token equals this color, so reference the system token directly. */
16605
+ --db-radio-border-focus: var(--db-focus-ring-color);
16606
+ --db-radio-border-disabled: var(--db-color-action-disabled-border);
16496
16607
  --db-radio-border-checked-hover: var(--db-selection-toggle-border-press);
16497
16608
  --db-radio-border-checked-press: var(--db-color-action-default-border-press);
16609
+ --db-radio-border-unchecked-focus: var(--db-color-action-primary-background-default);
16610
+ --db-radio-outline-checked-focus: var(--db-color-action-primary-background-default);
16498
16611
 
16499
- /* Unchecked keyboard-focus border (AntD getRadioInputStyles unchecked focus):
16500
- * borderColor = actionPrimaryBackgroundDefault, with NO outline ring. No
16501
- * selection-toggle category token equals this color (the closest is a bg
16502
- * token), so reference the system token directly. */
16503
- --db-radio-border-focus-unchecked: var(--db-color-action-primary-background-default);
16504
- /* Checked focus-visible outline color (AntD: outline 1px solid
16505
- * actionPrimaryBackgroundDefault, outlineOffset 1). */
16506
- --db-radio-focus-outline-checked-color: var(--db-color-action-primary-background-default);
16507
-
16508
- /* The dot. Shares the category icon-color token (white over the filled
16509
- * primary surface) so a retheme moves checkbox checkmark + radio dot together. */
16510
- --db-radio-dot-color: var(--db-selection-toggle-icon-color);
16511
- --db-radio-dot-color-disabled: var(--db-selection-toggle-icon-color-disabled);
16612
+ --db-radio-mark: #ffffff;
16613
+ --db-radio-mark-disabled: var(--db-selection-toggle-mark-disabled);
16512
16614
  --db-radio-text: var(--db-selection-toggle-text);
16513
16615
  --db-radio-text-disabled: var(--db-selection-toggle-text-disabled);
16514
16616
 
16515
- --db-radio-focus-ring-width: var(--db-selection-toggle-focus-ring-width);
16516
- --db-radio-focus-ring-offset: var(--db-selection-toggle-focus-ring-offset);
16517
- --db-radio-transition-duration: var(--db-selection-toggle-transition-duration);
16617
+ /* Density */
16618
+ --db-radio-size: var(--db-selection-toggle-size);
16619
+ --db-radio-label-spacing: var(--db-selection-toggle-label-spacing);
16620
+ --db-radio-mark-size: var(--db-size-3xs);
16518
16621
 
16519
- /* Diameter of the inner dot. Mirrors the AntD checked `::after` size, which uses
16520
- * `theme.spacing.xs` (4px) — see getRadioInputStyles in AntDRadioInternal.tsx. */
16521
- --db-radio-dot-size: var(--db-space-xs);
16622
+ /* Motion */
16623
+ --db-radio-transition-duration: var(--db-selection-toggle-transition-duration);
16522
16624
  }
16523
16625
 
16524
16626
  /* Native-input <Radio> styles. Classic CSS only — no native nesting (the
@@ -16529,12 +16631,12 @@ span.du-bois-dark-typography-ellipsis-single-line {
16529
16631
  *
16530
16632
  * Structure (assumed by the React component):
16531
16633
  *
16532
- * <label class="ds-radio">
16634
+ * <label class="db-radio">
16533
16635
  * <input type="radio" />
16534
- * <span class="ds-radio-indicator"> ← circle border + fill react to state
16535
- * <span class="ds-radio-dot" /> ← visible when :checked
16636
+ * <span class="db-radio-indicator"> ← circle border + fill react to state
16637
+ * <span class="db-radio-dot" /> ← visible when :checked
16536
16638
  * </span>
16537
- * <span class="ds-radio-label">{children}</span>
16639
+ * <span class="db-radio-label">{children}</span>
16538
16640
  * </label>
16539
16641
  *
16540
16642
  * The root only ever has one <input> descendant, so a bare `input` selector is
@@ -16543,11 +16645,11 @@ span.du-bois-dark-typography-ellipsis-single-line {
16543
16645
  * checkmark/dash, and there is no indeterminate state.
16544
16646
  *
16545
16647
  * TODO(DUBOIS-452): the indicator/dot state styles below are identical to
16546
- * NativeCheckbox.css — consolidate them into a shared `.ds-selection-toggle` class. */
16648
+ * NativeCheckbox.css — consolidate them into a shared `.db-selection-toggle` class. */
16547
16649
 
16548
- /* Hover/press live on the root (label), not on the input: the input has
16549
- * `pointer-events: none`, so `input:hover` would never match, and the whole
16550
- * label area should drive the feedback. */
16650
+ /* Hover/press live on the root (label), not on the input: the input is
16651
+ * visually hidden (opacity:0), so an `input:hover` rule wouldn't be visible
16652
+ * anyway, and the whole label area should drive the feedback. */
16551
16653
 
16552
16654
  /* Selected fill. */
16553
16655
 
@@ -16572,9 +16674,15 @@ span.du-bois-dark-typography-ellipsis-single-line {
16572
16674
  /* Disabled (covers checked and unchecked). Sourced from `input:disabled` so the
16573
16675
  * standalone-disabled and group-disabled paths both land here. */
16574
16676
 
16575
- /* Visually-hidden native input, kept interactive and in the tab order so the
16576
- * `:has()` lookups above can read its state. Pointer events fall through to the
16577
- * label, so clicking anywhere toggles the radio. */
16677
+ /* Visually-hidden native input (opacity:0) overlaying the indicator circle,
16678
+ * kept interactive and in the tab order so the `:has()` lookups above can read
16679
+ * its state. It stays pointer-clickable matching AntD's `.ant-radio-input`
16680
+ * so it is the top-most hit-test target over the circle: `getByRole('radio').click()`
16681
+ * (Playwright, and any coordinate click that lands on the circle) resolves to the
16682
+ * real control instead of the decorative indicator overlay. Making the input
16683
+ * `pointer-events: none` (the prior native-only behavior) is what regressed
16684
+ * interaction tests vs. the AntD variant. `cursor: inherit` tracks the label's
16685
+ * pointer / disabled `not-allowed` cursor so the circle keeps AntD's cursor too. */
16578
16686
 
16579
16687
  /* Indicator — circle with the border/fill that responds to state above.
16580
16688
  * Vertical math aligns the indicator to the cap-height of the first text line
@@ -16595,16 +16703,16 @@ span.du-bois-dark-typography-ellipsis-single-line {
16595
16703
  * after a radio gets `marginTop: -sm` (cancels the preceding radio's
16596
16704
  * `paddingBottom: sm` so the hint tucks directly under its label) and
16597
16705
  * `marginBottom: sm` (gap before the next radio). The negative top margin relies on
16598
- * the .ds-stack gap being 0 (set below). Scoped to .ds-stack so it never perturbs
16706
+ * the .db-stack gap being 0 (set below). Scoped to .db-stack so it never perturbs
16599
16707
  * the horizontal grid, where hints are positioned by grid-row instead. */
16600
16708
 
16601
16709
  /* AntD `& > label:last-of-type + hint { marginTop: 0 }`: the last radio has no
16602
16710
  * `paddingBottom` to cancel, so its trailing hint keeps its natural top position. */
16603
16711
 
16604
16712
  /* RadioGroup layout. Vertical (the default) delegates flex-direction to the
16605
- * .ds-stack primitive; horizontal is a two-row grid (mirroring AntD). */
16713
+ * .db-stack primitive; horizontal is a two-row grid (mirroring AntD). */
16606
16714
 
16607
- /* Vertical: .ds-stack supplies flex-direction: column. AntD's vertical helper
16715
+ /* Vertical: .db-stack supplies flex-direction: column. AntD's vertical helper
16608
16716
  * (getVerticalRadioGroupStyles) produces its item rhythm purely from
16609
16717
  * `& > label { paddingBottom: sm }` plus the negative-margin hint trick above — it
16610
16718
  * uses NO flex gap. The negative `marginTop` on hints only works if the stack adds
@@ -16616,9 +16724,9 @@ span.du-bois-dark-typography-ellipsis-single-line {
16616
16724
  /* AntD `& > label:last-of-type { paddingBottom: 0 }`. */
16617
16725
 
16618
16726
  /* AntD getVerticalRadioGroupStyles `.${prefix}-radio-tile + .${prefix}-radio-tile {
16619
- * marginTop: md }`: RadioTiles are not matched by the `.ds-radio` padding-bottom
16727
+ * marginTop: md }`: RadioTiles are not matched by the `.db-radio` padding-bottom
16620
16728
  * rhythm above (the tile's own class is du-bois-{light,dark}-radio-tile), so space
16621
- * consecutive tiles explicitly. The .ds-stack gap is 0, so this margin is the spacing. */
16729
+ * consecutive tiles explicitly. The .db-stack gap is 0, so this margin is the spacing. */
16622
16730
 
16623
16731
  /* Horizontal: AntD `getHorizontalRadioGroupStyles` is a TWO-ROW grid (NOT a flex
16624
16732
  * row) so each radio sits in the [label] row and its following hint drops into the
@@ -16631,13 +16739,13 @@ span.du-bois-dark-typography-ellipsis-single-line {
16631
16739
 
16632
16740
  /* AntD `& > label, & > .${prefix}-radio-tile { gridRow: label / label; marginRight: 0 }`:
16633
16741
  * every radio (and every RadioTile button, whose own class is
16634
- * du-bois-{light,dark}-radio-tile and is NOT matched by `> .ds-radio`) lives in the
16742
+ * du-bois-{light,dark}-radio-tile and is NOT matched by `> .db-radio`) lives in the
16635
16743
  * label row. grid-auto-flow defaults to row, so successive items advance the implicit
16636
16744
  * column. */
16637
16745
 
16638
16746
  /* AntD `& > label + hint { display: inline-block; gridRow: hint / hint }`: a hint
16639
16747
  * following a radio drops into the hint row of the column its radio occupies. The
16640
- * vertical negative-margin rules are scoped to .ds-stack, so nothing to reset here. */
16748
+ * vertical negative-margin rules are scoped to .db-stack, so nothing to reset here. */
16641
16749
 
16642
16750
  /* AntD `:has(> hint) { marginTop: sm }`: when the horizontal group contains a hint,
16643
16751
  * the group itself gets a top margin (room above the two-row grid). */
@@ -16645,54 +16753,42 @@ span.du-bois-dark-typography-ellipsis-single-line {
16645
16753
  /* AntD `&& + form-message { marginTop: sm }` (horizontal): a form-message following
16646
16754
  * the whole group is separated by sm. */
16647
16755
 
16648
- /* Component-tier tokens for <Switch>. Colors default to the selection-toggle category tokens;
16649
- * geometry is hand-authored (the pill track + sliding thumb are unique to Switch). */
16650
-
16651
- /* Re-declared under both theme classes (not just :root) so the var() chain onto
16652
- * category/system tokens re-resolves inside a `.du-bois-dark` subtree instead of
16653
- * freezing at the root (light) values. See DUBOIS-448 dark-mode scoping. */
16654
- :where(:root, .du-bois-light, .du-bois-dark) {
16655
- --db-switch-track-width: 28px;
16656
- --db-switch-track-height: 16px;
16657
- /* Thumb fills the track height by design; expressed via track-height so the two can't drift. */
16658
- --db-switch-thumb-size: var(--db-switch-track-height);
16659
- /* Pill radius overrides the category (square) radius, mirroring Radio's circular override. */
16756
+ :where(.du-bois-dark) {
16757
+ /* Shape */
16660
16758
  --db-switch-border-radius: var(--db-radius-full);
16661
16759
  --db-switch-border-width: 1px;
16662
- --db-switch-spacing: var(--db-selection-toggle-spacing);
16663
16760
 
16664
- --db-switch-bg-default: var(--db-selection-toggle-bg-default);
16665
- --db-switch-bg-hover: var(--db-selection-toggle-bg-hover);
16666
- --db-switch-bg-press: var(--db-selection-toggle-bg-press);
16667
- --db-switch-bg-checked: var(--db-selection-toggle-bg-checked);
16668
- --db-switch-bg-checked-hover: var(--db-selection-toggle-bg-checked-hover);
16669
- --db-switch-bg-checked-press: var(--db-selection-toggle-bg-checked-press);
16670
- --db-switch-bg-disabled: var(--db-selection-toggle-bg-disabled);
16761
+ /* Color */
16762
+ --db-switch-surface: var(--db-selection-toggle-surface);
16763
+ --db-switch-surface-hover: var(--db-color-action-default-background-hover);
16764
+ --db-switch-surface-press: var(--db-color-action-default-background-press);
16765
+ --db-switch-surface-checked: var(--db-selection-toggle-surface-checked);
16766
+ --db-switch-surface-checked-hover: var(--db-selection-toggle-surface-checked-hover);
16767
+ --db-switch-surface-checked-press: var(--db-selection-toggle-surface-checked-press);
16768
+ --db-switch-surface-disabled: var(--db-selection-toggle-surface-disabled);
16769
+ --db-switch-surface-checked-disabled: var(--db-color-action-disabled-text);
16671
16770
 
16672
- --db-switch-border-default: var(--db-selection-toggle-border-default);
16771
+ --db-switch-border: var(--db-color-action-default-border-default);
16673
16772
  --db-switch-border-hover: var(--db-selection-toggle-border-hover);
16674
16773
  --db-switch-border-press: var(--db-selection-toggle-border-press);
16675
- --db-switch-border-disabled: var(--db-selection-toggle-border-disabled);
16676
- /* AntD paints the checked track border equal to the checked fill, so these alias the checked bg. */
16677
- --db-switch-border-checked: var(--db-selection-toggle-bg-checked);
16678
- --db-switch-border-checked-hover: var(--db-selection-toggle-bg-checked-hover);
16679
- --db-switch-border-checked-press: var(--db-selection-toggle-bg-checked-press);
16680
- --db-switch-border-focus: var(--db-selection-toggle-bg-checked);
16681
- /* AntD fills the disabled+checked track with actionDisabledText; no category token matches, so
16682
- * reference the system token directly (same escape hatch Radio uses for its checked-press border). */
16683
- --db-switch-bg-checked-disabled: var(--db-color-action-disabled-text);
16774
+ --db-switch-border-disabled: var(--db-color-action-disabled-border);
16775
+ --db-switch-border-checked: var(--db-selection-toggle-surface-checked);
16776
+ --db-switch-border-checked-hover: var(--db-selection-toggle-surface-checked-hover);
16777
+ --db-switch-border-checked-press: var(--db-selection-toggle-surface-checked-press);
16778
+ --db-switch-border-focus: var(--db-selection-toggle-surface-checked);
16684
16779
 
16685
- /* AntD paints the handle the off-track surface color in every state. */
16686
- --db-switch-thumb-color: var(--db-selection-toggle-bg-default);
16780
+ --db-switch-thumb: var(--db-selection-toggle-surface);
16687
16781
 
16688
- /* A token (not inherit) so the label text flips in dark mode. */
16689
- --db-switch-text: var(--db-color-text-primary);
16782
+ --db-switch-text: var(--db-selection-toggle-text);
16690
16783
  --db-switch-text-disabled: var(--db-selection-toggle-text-disabled);
16691
16784
 
16692
- /* AntD's focus ring is a 1px outline (the category default is 2px). */
16693
- --db-switch-focus-ring-width: 1px;
16694
- --db-switch-focus-ring-offset: 1px;
16695
- --db-switch-focus-ring-color: var(--db-selection-toggle-border-focus);
16785
+ /* Density */
16786
+ --db-switch-track-width: calc(var(--db-size-xs) * 1.75); /* 28px */
16787
+ --db-switch-track-height: var(--db-size-xs); /* 16px */
16788
+ --db-switch-thumb-size: var(--db-switch-track-height);
16789
+ --db-switch-label-spacing: var(--db-selection-toggle-label-spacing);
16790
+
16791
+ /* Motion */
16696
16792
  --db-switch-transition-duration: var(--db-selection-toggle-transition-duration);
16697
16793
  }
16698
16794
 
@@ -16704,13 +16800,15 @@ span.du-bois-dark-typography-ellipsis-single-line {
16704
16800
  /* `<label for>` propagates `:hover` to the input, so scope hover/press to the control, not `input:hover`. */
16705
16801
 
16706
16802
  /* On focus, recolor the border to the checked-fill color on top of the outline ring. Matching AntD,
16707
- * the ring sits flush when off and gains a 1px offset when checked. */
16803
+ * the ring sits flush when off and gains a 1px offset when checked.
16804
+ * TODO: width/offset are hardcoded 1px to preserve the AntD look; adopt the system 2px focus ring
16805
+ * (var(--db-focus-ring-width)) in a separate change. */
16708
16806
 
16709
16807
  /* Disabled + on: more specific than the plain disabled rule, so it wins regardless of source order. */
16710
16808
 
16711
16809
  /* `:first-child` scopes this to the label-first layout; the plain layout renders the label last. */
16712
16810
 
16713
- /* Target the <Label>'s class, not a bare `label` — that would also match the .ds-switch root <label>. */
16811
+ /* Target the <Label>'s class, not a bare `label` — that would also match the .db-switch root <label>. */
16714
16812
 
16715
16813
  /* Indent a following hint/message past the track. The class is doubled to out-specify FormMessage's
16716
16814
  * own margin rule. */