@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
@@ -16075,123 +16075,251 @@ span.du-bois-dark-typography-ellipsis-single-line {
16075
16075
  --db-color-tooltip-text-tooltip: #11171c;
16076
16076
  }
16077
16077
 
16078
- /* Layout primitive classes — internal Du Bois use for now (not a published
16079
- * consumer API yet; see the Stefan/Sheng weekly decision to "give it a try
16080
- * just within the Du Bois components"). Two primitives, both plain CSS so they
16081
- * ride the mortar cascade like the other component styles:
16082
- *
16083
- * .ds-stack — vertical flow, even gap between direct children.
16084
- * .ds-cluster — horizontal group that wraps, even gap between children.
16085
- *
16086
- * Each primitive exposes a small set of `--ds-*` knobs, defaulted on the class
16087
- * itself (not via a `var()` fallback, which would freeze the default at every
16088
- * call site). Override any of them on the element — inline
16089
- * `style={{ '--ds-stack-gap': ... }}` or a more specific selector — without a
16090
- * new modifier class:
16091
- *
16092
- * stack: --ds-stack-gap (spacing), --ds-stack-align (align-items)
16093
- * cluster: --ds-cluster-gap (spacing), --ds-cluster-align (align-items),
16094
- * --ds-cluster-justify (justify-content)
16095
- *
16096
- * Gap defaults point at the system spacing scale (`--db-space-*`). Padding is
16097
- * intentionally NOT a knob — a layout primitive owns the space between children,
16098
- * not its own box padding. */
16078
+ /*
16079
+ Vertical "stack" of elements.
16080
+ Use this for any layout where items are laid out vertically.
16099
16081
 
16100
- /* Cluster wraps by design: a long row reflows onto multiple lines rather than
16101
- * overflowing. A row that must NOT wrap (e.g. a single-line control strip) is
16102
- * not a cluster — keep it bespoke. */
16082
+ \3c !-- Basic: default gap between each child -->
16083
+ <div class="ds-stack">
16084
+ <h2>Title</h2>
16085
+ <p>Body</p>
16086
+ <button>Action</button>
16087
+ </div>
16103
16088
 
16104
- /* Category-tier tokens shared by selection-control components:
16105
- * <Checkbox>, <Switch>, <Radio>. Each value here references a SYSTEM token
16106
- * from system-tokens.css — never a raw hex/px literal — so the only place a
16107
- * brand-level theme change has to land is the system tier.
16108
- *
16109
- * Component-tier files (e.g. design-system/Checkbox/tokens.css) inherit from
16110
- * these via `var()` so consumers can override a single selection control by
16111
- * targeting only its component tokens. */
16089
+ \3c !-- Wider gap for this instance -->
16090
+ <div class="ds-stack" style="--ds-stack-gap: var(--db-spacing-lg)">…</div>
16091
+
16092
+ \3c !-- Don't stretch children to full width (e.g. left-aligned buttons) -->
16093
+ <div class="ds-stack" style="--ds-stack-align: flex-start">…</div>
16094
+ */
16095
+
16096
+ /**
16097
+ Responsive, horizontal "cluster" of elements.
16098
+ Use this for any layout where items are laid out horizontally and should wrap on smaller viewport sizes.
16099
+
16100
+ \3c !-- Basic: items wrap as needed -->
16101
+ <div class="ds-cluster">
16102
+ <span>one</span>
16103
+ <span>two</span>
16104
+ <span>three</span>
16105
+ </div>
16106
+
16107
+ \3c !-- Push children apart (e.g. title left, actions right) -->
16108
+ <div class="ds-cluster" style="--ds-cluster-justify: space-between">…</div>
16109
+
16110
+ \3c !-- Looser gap for this instance -->
16111
+ <div class="ds-cluster" style="--ds-cluster-gap: var(--db-spacing-sm)">…</div>
16112
+ */
16113
+
16114
+
16115
+
16116
+ :where(.du-bois-dark) {
16117
+ /* Neutral */
16118
+ --db-neutral-surface: var(--db-color-background-primary);
16119
+ --db-subtle-neutral-surface: var(--db-color-background-secondary);
16120
+ --db-strong-neutral-surface: initial; /* TODO */
16121
+
16122
+ --db-text-on-neutral-surface: var(--db-color-text-primary);
16123
+ --db-subtle-text-on-neutral-surface: var(--db-color-text-secondary);
16124
+ --db-strong-text-on-neutral-surface: initial; /* TODO */
16125
+
16126
+ --db-neutral-border: var(--db-color-border);
16127
+ --db-subtle-neutral-border: initial; /* TODO */
16128
+ --db-strong-neutral-border: var(--db-color-border-accessible);
16129
+
16130
+ --db-neutral-surface-active: var(--db-color-table-background-selected-default);
16131
+ --db-neutral-surface-hover: var(--db-color-table-background-unselected-hover);
16132
+ --db-neutral-surface-pressed: var(--db-color-table-background-selected-hover);
16133
+ --db-neutral-surface-disabled: var(--db-color-action-disabled-background);
16134
+ --db-text-on-neutral-surface-disabled: var(--db-color-action-disabled-text);
16112
16135
 
16113
- /* Re-declared under both theme classes as well as :root: these values are
16114
- * `var()` indirections onto SYSTEM tokens, and a custom property resolves its
16115
- * var() at its DECLARATION site. Declared only at :root, they would freeze at
16116
- * the root (light) system values and never re-read the dark system tokens
16117
- * inside a `.du-bois-dark` subtree. Re-declaring at every theme boundary makes
16118
- * the indirection re-resolve per theme. See DUBOIS-448 dark-mode scoping. */
16119
- :where(:root, .du-bois-light, .du-bois-dark) {
16120
- --db-selection-toggle-bg-default: var(--db-color-background-primary);
16121
- --db-selection-toggle-bg-hover: var(--db-color-action-default-background-hover);
16122
- --db-selection-toggle-bg-press: var(--db-color-action-default-background-press);
16123
- --db-selection-toggle-bg-checked: var(--db-color-action-primary-background-default);
16124
- --db-selection-toggle-bg-checked-hover: var(--db-color-action-primary-background-hover);
16125
- --db-selection-toggle-bg-checked-press: var(--db-color-action-primary-background-press);
16126
- --db-selection-toggle-bg-disabled: var(--db-color-action-disabled-background);
16136
+ /* Primary */
16137
+ --db-primary-surface: var(--db-color-action-primary-background-default);
16138
+ --db-subtle-primary-surface: var(--db-color-action-default-background-hover);
16139
+ --db-strong-primary-surface: var(--db-color-action-primary-background-hover);
16127
16140
 
16128
- --db-selection-toggle-border-default: var(--db-color-action-default-border-default);
16129
- --db-selection-toggle-border-hover: var(--db-color-action-primary-background-hover);
16130
- --db-selection-toggle-border-press: var(--db-color-action-primary-background-press);
16131
- --db-selection-toggle-border-focus: var(--db-color-action-default-border-focus);
16132
- --db-selection-toggle-border-disabled: var(--db-color-action-disabled-border);
16141
+ --db-text-on-primary-surface: var(--db-color-action-primary-text-default);
16142
+ --db-primary-text-on-neutral-surface: var(--db-color-action-link-default);
16143
+ --db-subtle-text-on-primary-surface: initial; /* TODO */
16144
+ --db-strong-text-on-primary-surface: var(--db-color-action-primary-text-default);
16133
16145
 
16134
- /* Raw literal, not a system token (exception to the file rule above): the mark
16135
- * sits on the theme-invariant blue checked fill, so it must stay white in BOTH
16136
- * themes. No non-flipping white system token exists — action-primary-icon flips
16137
- * to near-black under .du-bois-dark, which made the mark nearly invisible. */
16138
- --db-selection-toggle-icon-color: #ffffff;
16139
- --db-selection-toggle-icon-color-disabled: var(--db-color-action-disabled-text);
16140
- --db-selection-toggle-text: var(--db-color-text-primary);
16141
- --db-selection-toggle-text-disabled: var(--db-color-action-disabled-text);
16146
+ --db-primary-border: var(--db-color-action-primary-background-default);
16147
+ --db-subtle-primary-border: initial; /* TODO */
16148
+ --db-strong-primary-border: var(--db-color-action-primary-background-press);
16142
16149
 
16143
- --db-selection-toggle-size: 16px;
16144
- --db-selection-toggle-border-radius: var(--db-radius-sm);
16145
- --db-selection-toggle-spacing: var(--db-space-sm);
16150
+ --db-primary-surface-active: initial; /* TODO */
16151
+ --db-primary-surface-hover: var(--db-color-action-primary-background-hover);
16152
+ --db-primary-surface-pressed: var(--db-color-action-primary-background-press);
16153
+ --db-primary-surface-disabled: var(--db-color-action-disabled-background);
16154
+ --db-text-on-primary-surface-disabled: var(--db-color-action-disabled-text);
16155
+
16156
+ /* Error */
16157
+ --db-error-surface: var(--db-color-action-danger-primary-background-default);
16158
+ --db-subtle-error-surface: var(--db-color-background-danger);
16159
+ --db-strong-error-surface: var(--db-color-action-danger-primary-background-hover);
16160
+
16161
+ --db-text-on-error-surface: var(--db-color-action-danger-primary-text);
16162
+ --db-error-text-on-neutral-surface: var(--db-color-text-validation-danger);
16163
+ --db-subtle-text-on-error-surface: initial; /* TODO */
16164
+ --db-strong-text-on-error-surface: var(--db-color-action-danger-primary-text);
16165
+
16166
+ --db-error-border: var(--db-color-action-danger-default-border-default);
16167
+ --db-subtle-error-border: var(--db-color-border-danger);
16168
+ --db-strong-error-border: var(--db-color-action-danger-primary-background-press);
16169
+
16170
+ --db-error-surface-active: initial; /* TODO */
16171
+ --db-error-surface-hover: var(--db-color-action-danger-primary-background-hover);
16172
+ --db-error-surface-pressed: var(--db-color-action-danger-primary-background-press);
16173
+ --db-error-surface-disabled: var(--db-color-action-disabled-background);
16174
+ --db-text-on-error-surface-disabled: var(--db-color-action-disabled-text);
16175
+
16176
+ /* Warning */
16177
+ --db-warning-surface: initial; /* TODO */
16178
+ --db-subtle-warning-surface: var(--db-color-background-warning);
16179
+
16180
+ --db-text-on-warning-surface: initial; /* TODO */
16181
+ --db-warning-text-on-neutral-surface: var(--db-color-text-validation-warning);
16182
+
16183
+ --db-warning-border: var(--db-color-border-warning);
16184
+
16185
+ /* Success */
16186
+ --db-success-surface: initial; /* TODO */
16187
+ --db-subtle-success-surface: var(--db-color-background-success);
16188
+
16189
+ --db-text-on-success-surface: initial; /* TODO */
16190
+ --db-success-text-on-neutral-surface: var(--db-color-text-validation-success);
16191
+
16192
+ --db-success-border: initial; /* TODO */
16193
+ }
16194
+
16195
+ :where(.du-bois-dark) {
16196
+ --db-layout-unit: 0.25rem; /* 4px */
16197
+ --db-density-scalar: 1;
16198
+ --db-size-scalar: 1;
16199
+ --db-spacing-scalar: 1;
16200
+
16201
+ /* Size and spacing are the same steps, but with their own scalars included in the calc. */
16202
+
16203
+ --db-size-3xs: calc(var(--db-layout-unit) * 1 * var(--db-density-scalar) * var(--db-size-scalar)); /* 4px */
16204
+ --db-size-2xs: calc(var(--db-layout-unit) * 2 * var(--db-density-scalar) * var(--db-size-scalar)); /* 8px */
16205
+ --db-size-xs: calc(var(--db-layout-unit) * 4 * var(--db-density-scalar) * var(--db-size-scalar)); /* 16px */
16206
+ --db-size-sm: calc(var(--db-layout-unit) * 6 * var(--db-density-scalar) * var(--db-size-scalar)); /* 24px */
16207
+ --db-size-md: calc(var(--db-layout-unit) * 8 * var(--db-density-scalar) * var(--db-size-scalar)); /* 32px */
16208
+ --db-size-lg: calc(var(--db-layout-unit) * 10 * var(--db-density-scalar) * var(--db-size-scalar)); /* 40px */
16209
+
16210
+ --db-spacing-3xs: calc(var(--db-layout-unit) * 1 * var(--db-density-scalar) * var(--db-spacing-scalar)); /* 4px */
16211
+ --db-spacing-2xs: calc(var(--db-layout-unit) * 2 * var(--db-density-scalar) * var(--db-spacing-scalar)); /* 8px */
16212
+ --db-spacing-xs: calc(var(--db-layout-unit) * 4 * var(--db-density-scalar) * var(--db-spacing-scalar)); /* 16px */
16213
+ --db-spacing-sm: calc(var(--db-layout-unit) * 6 * var(--db-density-scalar) * var(--db-spacing-scalar)); /* 24px */
16214
+ --db-spacing-md: calc(var(--db-layout-unit) * 8 * var(--db-density-scalar) * var(--db-spacing-scalar)); /* 32px */
16215
+ --db-spacing-lg: calc(var(--db-layout-unit) * 10 * var(--db-density-scalar) * var(--db-spacing-scalar)); /* 40px */
16216
+ }
16217
+
16218
+ :where(.du-bois-dark) {
16219
+ --db-font-family:
16220
+ "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
16221
+ --db-mono-font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
16222
+
16223
+ --db-font-size-2xs: 0.6875rem; /* 11px */
16224
+ --db-font-size-xs: 0.75rem; /* 12px */
16225
+ --db-font-size-base: 0.8125rem; /* 13px */
16226
+ --db-font-size-md: 0.875rem; /* 14px */
16227
+ --db-font-size-lg: 0.9375rem; /* 15px */
16228
+ --db-font-size-xl: 1rem; /* 16px */
16229
+ --db-font-size-2xl: 1.25rem; /* 20px */
16230
+ --db-font-size-3xl: 1.5rem; /* 24px */
16231
+ --db-font-size-4xl: 2rem; /* 32px */
16232
+
16233
+ /* Du Bois v1 ships 400 and 600 only */
16234
+ --db-font-weight-normal: 400;
16235
+ --db-font-weight-medium: initial; /* TODO */
16236
+ --db-font-weight-semibold: 600;
16237
+ --db-font-weight-bold: initial; /* TODO */
16238
+ }
16239
+
16240
+ :where(.du-bois-dark) {
16241
+ --db-elevation-inset: initial; /* TODO */
16242
+ --db-elevation-low: 0px 2px 3px -1px rgba(0, 0, 0, 0.05), 0px 1px 0px 0px rgba(0, 0, 0, 0.02);
16243
+ --db-elevation-med: 0px 2px 16px 0px rgba(0, 0, 0, 0.08);
16244
+ --db-elevation-high: 0px 8px 40px 0px rgba(0, 0, 0, 0.13);
16245
+ }
16246
+
16247
+ :where(.du-bois-dark) {
16248
+ --db-focus-ring-color: var(--db-color-action-default-border-focus);
16249
+ --db-focus-ring-width: 2px;
16250
+ }
16251
+
16252
+ :where(.du-bois-dark) {
16253
+ /* Shape */
16254
+ --db-selection-toggle-border-radius: 4px;
16255
+
16256
+ /* Color */
16257
+ --db-selection-toggle-surface: var(--db-neutral-surface);
16258
+ --db-selection-toggle-mark: var(--db-text-on-primary-surface);
16259
+ --db-selection-toggle-text: var(--db-text-on-neutral-surface);
16260
+ --db-selection-toggle-border: var(--db-strong-neutral-border);
16261
+
16262
+ --db-selection-toggle-surface-hover: var(--db-neutral-surface-hover);
16263
+ --db-selection-toggle-surface-press: var(--db-neutral-surface-pressed);
16264
+ --db-selection-toggle-surface-checked: var(--db-primary-surface);
16265
+ --db-selection-toggle-surface-checked-hover: var(--db-primary-surface-hover);
16266
+ --db-selection-toggle-surface-checked-press: var(--db-primary-surface-pressed);
16267
+ --db-selection-toggle-surface-disabled: var(--db-neutral-surface-disabled);
16268
+ --db-selection-toggle-surface-checked-disabled: var(--db-neutral-surface-disabled);
16269
+
16270
+ --db-selection-toggle-border-hover: var(--db-primary-surface-hover);
16271
+ --db-selection-toggle-border-press: var(--db-primary-surface-pressed);
16272
+ --db-selection-toggle-border-disabled: var(--db-neutral-border);
16273
+
16274
+ --db-selection-toggle-mark-disabled: var(--db-text-on-neutral-surface-disabled);
16275
+ --db-selection-toggle-text-disabled: var(--db-text-on-neutral-surface-disabled);
16146
16276
 
16147
- /* Focus ring matches AntD legacy variant; offset keeps it outside the toggle.
16148
- * Hard-coded for now — Figma export doesn't include shadow tokens. */
16149
16277
  --db-selection-toggle-shadow-checked: 0 0 0 1px var(--db-color-action-primary-background-default);
16150
- --db-selection-toggle-focus-ring-width: 2px;
16151
- --db-selection-toggle-focus-ring-offset: 2px;
16278
+
16279
+ /* Density */
16280
+ --db-selection-toggle-size: var(--db-size-xs);
16281
+ --db-selection-toggle-label-spacing: var(--db-spacing-2xs);
16282
+
16283
+ /* Motion */
16152
16284
  --db-selection-toggle-transition-duration: 120ms;
16153
16285
  }
16154
16286
 
16155
- /* Component-tier tokens for <Checkbox>. Each value defaults to a CATEGORY
16156
- * (selection-toggle) token via var(); consumers can override here to retheme
16157
- * checkboxes without affecting switch / radio. */
16158
-
16159
- /* Re-declared under both theme classes (not just :root) so the var() chain onto
16160
- * category/system tokens re-resolves inside a `.du-bois-dark` subtree instead of
16161
- * freezing at the root (light) values. See DUBOIS-448 dark-mode scoping. */
16162
- :where(:root, .du-bois-light, .du-bois-dark) {
16163
- --db-checkbox-size: var(--db-selection-toggle-size);
16287
+ :where(.du-bois-dark) {
16288
+ /* Shape */
16164
16289
  --db-checkbox-border-radius: var(--db-selection-toggle-border-radius);
16165
16290
  --db-checkbox-border-width: 1px;
16166
- --db-checkbox-spacing: var(--db-selection-toggle-spacing);
16167
16291
 
16168
- --db-checkbox-bg-default: var(--db-selection-toggle-bg-default);
16169
- --db-checkbox-bg-hover: var(--db-selection-toggle-bg-hover);
16170
- --db-checkbox-bg-press: var(--db-selection-toggle-bg-press);
16171
- --db-checkbox-bg-checked: var(--db-selection-toggle-bg-checked);
16172
- --db-checkbox-bg-checked-hover: var(--db-selection-toggle-bg-checked-hover);
16173
- --db-checkbox-bg-checked-press: var(--db-selection-toggle-bg-checked-press);
16174
- --db-checkbox-bg-disabled: var(--db-selection-toggle-bg-disabled);
16292
+ /* Color */
16293
+ --db-checkbox-surface: var(--db-selection-toggle-surface);
16294
+ --db-checkbox-surface-hover: var(--db-color-action-default-background-hover);
16295
+ --db-checkbox-surface-press: var(--db-color-action-default-background-press);
16296
+ --db-checkbox-surface-checked: var(--db-selection-toggle-surface-checked);
16297
+ --db-checkbox-surface-checked-hover: var(--db-selection-toggle-surface-checked-hover);
16298
+ --db-checkbox-surface-checked-press: var(--db-selection-toggle-surface-checked-press);
16299
+ --db-checkbox-surface-disabled: var(--db-selection-toggle-surface-disabled);
16175
16300
 
16176
- --db-checkbox-border-default: var(--db-selection-toggle-border-default);
16301
+ --db-checkbox-border: var(--db-color-action-default-border-default);
16177
16302
  --db-checkbox-border-hover: var(--db-selection-toggle-border-hover);
16178
16303
  --db-checkbox-border-press: var(--db-selection-toggle-border-press);
16179
- --db-checkbox-border-focus: var(--db-selection-toggle-border-focus);
16180
- --db-checkbox-border-disabled: var(--db-selection-toggle-border-disabled);
16304
+ --db-checkbox-focus-ring: var(--db-focus-ring-color);
16305
+ --db-checkbox-border-disabled: var(--db-color-action-disabled-border);
16181
16306
 
16182
- --db-checkbox-icon-color: var(--db-selection-toggle-icon-color);
16183
- --db-checkbox-icon-color-disabled: var(--db-selection-toggle-icon-color-disabled);
16307
+ --db-checkbox-mark: #ffffff;
16308
+ --db-checkbox-mark-disabled: var(--db-selection-toggle-mark-disabled);
16184
16309
  --db-checkbox-text: var(--db-selection-toggle-text);
16185
16310
  --db-checkbox-text-disabled: var(--db-selection-toggle-text-disabled);
16186
16311
 
16187
16312
  --db-checkbox-shadow-checked: var(--db-selection-toggle-shadow-checked);
16188
- --db-checkbox-focus-ring-width: var(--db-selection-toggle-focus-ring-width);
16189
- --db-checkbox-focus-ring-offset: var(--db-selection-toggle-focus-ring-offset);
16190
- --db-checkbox-transition-duration: var(--db-selection-toggle-transition-duration);
16191
16313
 
16192
- /* Indeterminate mark — the horizontal dash shown in the mixed state. */
16193
- --db-checkbox-indeterminate-mark-width: 8px;
16194
- --db-checkbox-indeterminate-mark-height: 3px;
16314
+ /* Density */
16315
+ --db-checkbox-size: var(--db-selection-toggle-size);
16316
+ --db-checkbox-label-spacing: var(--db-selection-toggle-label-spacing);
16317
+ --db-checkbox-focus-ring-width: var(--db-focus-ring-width);
16318
+ --db-checkbox-indeterminate-mark-width: var(--db-size-2xs); /* 8px */
16319
+ --db-checkbox-indeterminate-mark-height: calc(var(--db-size-3xs) * 0.75); /* 3px */
16320
+
16321
+ /* Motion */
16322
+ --db-checkbox-transition-duration: var(--db-selection-toggle-transition-duration);
16195
16323
  }
16196
16324
 
16197
16325
  /* Native-input <Checkbox> styles. Classic CSS only — no native nesting (the
@@ -16216,10 +16344,9 @@ span.du-bois-dark-typography-ellipsis-single-line {
16216
16344
  * field) inside the label children, and a descendant `input` selector would hide
16217
16345
  * / absolutely-position that field and mis-drive the `:has(…)` state rules. */
16218
16346
 
16219
- /* Hover/press live on the root (label), not on the input: the input has
16220
- * `pointer-events: none` (so a single click target stays on the label and
16221
- * label/input association toggles the box), which means `input:hover` would
16222
- * never match. Putting `:hover` on the root also makes the entire label area
16347
+ /* Hover/press live on the root (label), not on the input: the input is
16348
+ * visually hidden (opacity:0), so an `input:hover` rule wouldn't be visible
16349
+ * anyway. Putting `:hover` on the root also makes the entire label area
16223
16350
  * — not just the indicator square — drive the visual feedback. */
16224
16351
 
16225
16352
  /* Selected fill — checked and indeterminate share the same surface. */
@@ -16232,9 +16359,15 @@ span.du-bois-dark-typography-ellipsis-single-line {
16232
16359
  * `input:disabled` so the standalone-disabled and group-disabled paths both
16233
16360
  * land here without needing a separate root modifier class. */
16234
16361
 
16235
- /* Visually-hidden native input, kept interactive and in the tab order so
16236
- * `:has()` lookups above can read its state. Pointer events fall through to
16237
- * the label, so clicking anywhere toggles the box. */
16362
+ /* Visually-hidden native input (opacity:0) overlaying the indicator square,
16363
+ * kept interactive and in the tab order so `:has()` lookups above can read its
16364
+ * state. It stays pointer-clickable matching AntD's `.ant-checkbox-input`
16365
+ * so it is the top-most hit-test target over the box: `getByRole('checkbox').click()`
16366
+ * (Playwright, and any coordinate click that lands on the box) resolves to the
16367
+ * real control instead of the decorative indicator overlay. Making the input
16368
+ * `pointer-events: none` (the prior native-only behavior) is what regressed
16369
+ * interaction tests vs. the AntD variant. `cursor: inherit` tracks the label's
16370
+ * pointer / disabled `not-allowed` cursor so the box keeps AntD's cursor too. */
16238
16371
 
16239
16372
  /* Indicator — square with the border/fill that responds to state above.
16240
16373
  * Vertical math: aligns the indicator to the cap-height of the first text
@@ -16278,73 +16411,42 @@ span.du-bois-dark-typography-ellipsis-single-line {
16278
16411
 
16279
16412
  /* Vertical: .ds-stack supplies flex-direction + gap; we only retarget the knob. */
16280
16413
 
16281
- /* Component-tier tokens for <Radio>. Each value defaults to a CATEGORY
16282
- * (selection-toggle) token via var(); consumers can override here to retheme
16283
- * radios without affecting checkbox / switch.
16284
- *
16285
- * Radio differs from Checkbox in two ways: the indicator is a full circle
16286
- * (border-radius) and the "mark" is a filled dot rather than a checkmark/dash. */
16287
-
16288
- /* Re-declared under both theme classes (not just :root) so the var() chain onto
16289
- * category/system tokens re-resolves inside a `.du-bois-dark` subtree instead of
16290
- * freezing at the root (light) values. See DUBOIS-448 dark-mode scoping. */
16291
- :where(:root, .du-bois-light, .du-bois-dark) {
16292
- --db-radio-size: var(--db-selection-toggle-size);
16293
- /* Circle, not a rounded square — the one shape token that does NOT inherit
16294
- * the category (square) radius. */
16414
+ :where(.du-bois-dark) {
16415
+ /* Shape */
16295
16416
  --db-radio-border-radius: var(--db-radius-full);
16296
16417
  --db-radio-border-width: 1px;
16297
- --db-radio-spacing: var(--db-selection-toggle-spacing);
16298
16418
 
16299
- --db-radio-bg-default: var(--db-selection-toggle-bg-default);
16300
- --db-radio-bg-hover: var(--db-selection-toggle-bg-hover);
16301
- --db-radio-bg-press: var(--db-selection-toggle-bg-press);
16302
- --db-radio-bg-checked: var(--db-selection-toggle-bg-checked);
16303
- --db-radio-bg-checked-hover: var(--db-selection-toggle-bg-checked-hover);
16304
- /* AntD checked active/press background is actionDefaultBackgroundPress (NOT the
16305
- * primary press), so this maps to the default press bg category token — see
16306
- * getRadioInputStyles checked active in AntDRadioInternal.tsx. */
16307
- --db-radio-bg-checked-press: var(--db-selection-toggle-bg-press);
16308
- --db-radio-bg-disabled: var(--db-selection-toggle-bg-disabled);
16419
+ /* Color */
16420
+ --db-radio-surface: var(--db-selection-toggle-surface);
16421
+ --db-radio-surface-hover: var(--db-color-action-default-background-hover);
16422
+ --db-radio-surface-press: var(--db-color-action-default-background-press);
16423
+ --db-radio-surface-checked: var(--db-selection-toggle-surface-checked);
16424
+ --db-radio-surface-checked-hover: var(--db-selection-toggle-surface-checked-hover);
16425
+ --db-radio-surface-checked-press: var(--db-color-action-default-background-press);
16426
+ --db-radio-surface-disabled: var(--db-selection-toggle-surface-disabled);
16309
16427
 
16310
- --db-radio-border-default: var(--db-selection-toggle-border-default);
16428
+ --db-radio-border: var(--db-color-action-default-border-default);
16311
16429
  --db-radio-border-hover: var(--db-selection-toggle-border-hover);
16312
16430
  --db-radio-border-press: var(--db-selection-toggle-border-press);
16313
- --db-radio-border-focus: var(--db-selection-toggle-border-focus);
16314
- --db-radio-border-disabled: var(--db-selection-toggle-border-disabled);
16315
-
16316
- /* Two-tone checked hover/press border ring (AntD getRadioInputStyles checked
16317
- * states): the border is a DARKER shade than the fill, not equal to it.
16318
- * - checked hover border = actionPrimaryBackgroundPress (== the press category
16319
- * token, which is action-primary-background-press).
16320
- * - checked press border = actionDefaultBorderPress; no selection-toggle
16321
- * category token equals this color, so reference the system token directly. */
16431
+ --db-radio-border-focus: var(--db-focus-ring-color);
16432
+ --db-radio-border-disabled: var(--db-color-action-disabled-border);
16322
16433
  --db-radio-border-checked-hover: var(--db-selection-toggle-border-press);
16323
16434
  --db-radio-border-checked-press: var(--db-color-action-default-border-press);
16435
+ --db-radio-border-unchecked-focus: var(--db-color-action-primary-background-default);
16436
+ --db-radio-outline-checked-focus: var(--db-color-action-primary-background-default);
16324
16437
 
16325
- /* Unchecked keyboard-focus border (AntD getRadioInputStyles unchecked focus):
16326
- * borderColor = actionPrimaryBackgroundDefault, with NO outline ring. No
16327
- * selection-toggle category token equals this color (the closest is a bg
16328
- * token), so reference the system token directly. */
16329
- --db-radio-border-focus-unchecked: var(--db-color-action-primary-background-default);
16330
- /* Checked focus-visible outline color (AntD: outline 1px solid
16331
- * actionPrimaryBackgroundDefault, outlineOffset 1). */
16332
- --db-radio-focus-outline-checked-color: var(--db-color-action-primary-background-default);
16333
-
16334
- /* The dot. Shares the category icon-color token (white over the filled
16335
- * primary surface) so a retheme moves checkbox checkmark + radio dot together. */
16336
- --db-radio-dot-color: var(--db-selection-toggle-icon-color);
16337
- --db-radio-dot-color-disabled: var(--db-selection-toggle-icon-color-disabled);
16438
+ --db-radio-mark: #ffffff;
16439
+ --db-radio-mark-disabled: var(--db-selection-toggle-mark-disabled);
16338
16440
  --db-radio-text: var(--db-selection-toggle-text);
16339
16441
  --db-radio-text-disabled: var(--db-selection-toggle-text-disabled);
16340
16442
 
16341
- --db-radio-focus-ring-width: var(--db-selection-toggle-focus-ring-width);
16342
- --db-radio-focus-ring-offset: var(--db-selection-toggle-focus-ring-offset);
16343
- --db-radio-transition-duration: var(--db-selection-toggle-transition-duration);
16443
+ /* Density */
16444
+ --db-radio-size: var(--db-selection-toggle-size);
16445
+ --db-radio-label-spacing: var(--db-selection-toggle-label-spacing);
16446
+ --db-radio-mark-size: var(--db-size-3xs);
16344
16447
 
16345
- /* Diameter of the inner dot. Mirrors the AntD checked `::after` size, which uses
16346
- * `theme.spacing.xs` (4px) — see getRadioInputStyles in AntDRadioInternal.tsx. */
16347
- --db-radio-dot-size: var(--db-space-xs);
16448
+ /* Motion */
16449
+ --db-radio-transition-duration: var(--db-selection-toggle-transition-duration);
16348
16450
  }
16349
16451
 
16350
16452
  /* Native-input <Radio> styles. Classic CSS only — no native nesting (the
@@ -16371,9 +16473,9 @@ span.du-bois-dark-typography-ellipsis-single-line {
16371
16473
  * TODO(DUBOIS-452): the indicator/dot state styles below are identical to
16372
16474
  * NativeCheckbox.css — consolidate them into a shared `.ds-selection-toggle` class. */
16373
16475
 
16374
- /* Hover/press live on the root (label), not on the input: the input has
16375
- * `pointer-events: none`, so `input:hover` would never match, and the whole
16376
- * label area should drive the feedback. */
16476
+ /* Hover/press live on the root (label), not on the input: the input is
16477
+ * visually hidden (opacity:0), so an `input:hover` rule wouldn't be visible
16478
+ * anyway, and the whole label area should drive the feedback. */
16377
16479
 
16378
16480
  /* Selected fill. */
16379
16481
 
@@ -16398,9 +16500,15 @@ span.du-bois-dark-typography-ellipsis-single-line {
16398
16500
  /* Disabled (covers checked and unchecked). Sourced from `input:disabled` so the
16399
16501
  * standalone-disabled and group-disabled paths both land here. */
16400
16502
 
16401
- /* Visually-hidden native input, kept interactive and in the tab order so the
16402
- * `:has()` lookups above can read its state. Pointer events fall through to the
16403
- * label, so clicking anywhere toggles the radio. */
16503
+ /* Visually-hidden native input (opacity:0) overlaying the indicator circle,
16504
+ * kept interactive and in the tab order so the `:has()` lookups above can read
16505
+ * its state. It stays pointer-clickable matching AntD's `.ant-radio-input`
16506
+ * so it is the top-most hit-test target over the circle: `getByRole('radio').click()`
16507
+ * (Playwright, and any coordinate click that lands on the circle) resolves to the
16508
+ * real control instead of the decorative indicator overlay. Making the input
16509
+ * `pointer-events: none` (the prior native-only behavior) is what regressed
16510
+ * interaction tests vs. the AntD variant. `cursor: inherit` tracks the label's
16511
+ * pointer / disabled `not-allowed` cursor so the circle keeps AntD's cursor too. */
16404
16512
 
16405
16513
  /* Indicator — circle with the border/fill that responds to state above.
16406
16514
  * Vertical math aligns the indicator to the cap-height of the first text line
@@ -16471,54 +16579,42 @@ span.du-bois-dark-typography-ellipsis-single-line {
16471
16579
  /* AntD `&& + form-message { marginTop: sm }` (horizontal): a form-message following
16472
16580
  * the whole group is separated by sm. */
16473
16581
 
16474
- /* Component-tier tokens for <Switch>. Colors default to the selection-toggle category tokens;
16475
- * geometry is hand-authored (the pill track + sliding thumb are unique to Switch). */
16476
-
16477
- /* Re-declared under both theme classes (not just :root) so the var() chain onto
16478
- * category/system tokens re-resolves inside a `.du-bois-dark` subtree instead of
16479
- * freezing at the root (light) values. See DUBOIS-448 dark-mode scoping. */
16480
- :where(:root, .du-bois-light, .du-bois-dark) {
16481
- --db-switch-track-width: 28px;
16482
- --db-switch-track-height: 16px;
16483
- /* Thumb fills the track height by design; expressed via track-height so the two can't drift. */
16484
- --db-switch-thumb-size: var(--db-switch-track-height);
16485
- /* Pill radius overrides the category (square) radius, mirroring Radio's circular override. */
16582
+ :where(.du-bois-dark) {
16583
+ /* Shape */
16486
16584
  --db-switch-border-radius: var(--db-radius-full);
16487
16585
  --db-switch-border-width: 1px;
16488
- --db-switch-spacing: var(--db-selection-toggle-spacing);
16489
16586
 
16490
- --db-switch-bg-default: var(--db-selection-toggle-bg-default);
16491
- --db-switch-bg-hover: var(--db-selection-toggle-bg-hover);
16492
- --db-switch-bg-press: var(--db-selection-toggle-bg-press);
16493
- --db-switch-bg-checked: var(--db-selection-toggle-bg-checked);
16494
- --db-switch-bg-checked-hover: var(--db-selection-toggle-bg-checked-hover);
16495
- --db-switch-bg-checked-press: var(--db-selection-toggle-bg-checked-press);
16496
- --db-switch-bg-disabled: var(--db-selection-toggle-bg-disabled);
16587
+ /* Color */
16588
+ --db-switch-surface: var(--db-selection-toggle-surface);
16589
+ --db-switch-surface-hover: var(--db-color-action-default-background-hover);
16590
+ --db-switch-surface-press: var(--db-color-action-default-background-press);
16591
+ --db-switch-surface-checked: var(--db-selection-toggle-surface-checked);
16592
+ --db-switch-surface-checked-hover: var(--db-selection-toggle-surface-checked-hover);
16593
+ --db-switch-surface-checked-press: var(--db-selection-toggle-surface-checked-press);
16594
+ --db-switch-surface-disabled: var(--db-selection-toggle-surface-disabled);
16595
+ --db-switch-surface-checked-disabled: var(--db-color-action-disabled-text);
16497
16596
 
16498
- --db-switch-border-default: var(--db-selection-toggle-border-default);
16597
+ --db-switch-border: var(--db-color-action-default-border-default);
16499
16598
  --db-switch-border-hover: var(--db-selection-toggle-border-hover);
16500
16599
  --db-switch-border-press: var(--db-selection-toggle-border-press);
16501
- --db-switch-border-disabled: var(--db-selection-toggle-border-disabled);
16502
- /* AntD paints the checked track border equal to the checked fill, so these alias the checked bg. */
16503
- --db-switch-border-checked: var(--db-selection-toggle-bg-checked);
16504
- --db-switch-border-checked-hover: var(--db-selection-toggle-bg-checked-hover);
16505
- --db-switch-border-checked-press: var(--db-selection-toggle-bg-checked-press);
16506
- --db-switch-border-focus: var(--db-selection-toggle-bg-checked);
16507
- /* AntD fills the disabled+checked track with actionDisabledText; no category token matches, so
16508
- * reference the system token directly (same escape hatch Radio uses for its checked-press border). */
16509
- --db-switch-bg-checked-disabled: var(--db-color-action-disabled-text);
16600
+ --db-switch-border-disabled: var(--db-color-action-disabled-border);
16601
+ --db-switch-border-checked: var(--db-selection-toggle-surface-checked);
16602
+ --db-switch-border-checked-hover: var(--db-selection-toggle-surface-checked-hover);
16603
+ --db-switch-border-checked-press: var(--db-selection-toggle-surface-checked-press);
16604
+ --db-switch-border-focus: var(--db-selection-toggle-surface-checked);
16510
16605
 
16511
- /* AntD paints the handle the off-track surface color in every state. */
16512
- --db-switch-thumb-color: var(--db-selection-toggle-bg-default);
16606
+ --db-switch-thumb: var(--db-selection-toggle-surface);
16513
16607
 
16514
- /* A token (not inherit) so the label text flips in dark mode. */
16515
- --db-switch-text: var(--db-color-text-primary);
16608
+ --db-switch-text: var(--db-selection-toggle-text);
16516
16609
  --db-switch-text-disabled: var(--db-selection-toggle-text-disabled);
16517
16610
 
16518
- /* AntD's focus ring is a 1px outline (the category default is 2px). */
16519
- --db-switch-focus-ring-width: 1px;
16520
- --db-switch-focus-ring-offset: 1px;
16521
- --db-switch-focus-ring-color: var(--db-selection-toggle-border-focus);
16611
+ /* Density */
16612
+ --db-switch-track-width: calc(var(--db-size-xs) * 1.75); /* 28px */
16613
+ --db-switch-track-height: var(--db-size-xs); /* 16px */
16614
+ --db-switch-thumb-size: var(--db-switch-track-height);
16615
+ --db-switch-label-spacing: var(--db-selection-toggle-label-spacing);
16616
+
16617
+ /* Motion */
16522
16618
  --db-switch-transition-duration: var(--db-selection-toggle-transition-duration);
16523
16619
  }
16524
16620
 
@@ -16530,7 +16626,9 @@ span.du-bois-dark-typography-ellipsis-single-line {
16530
16626
  /* `<label for>` propagates `:hover` to the input, so scope hover/press to the control, not `input:hover`. */
16531
16627
 
16532
16628
  /* On focus, recolor the border to the checked-fill color on top of the outline ring. Matching AntD,
16533
- * the ring sits flush when off and gains a 1px offset when checked. */
16629
+ * the ring sits flush when off and gains a 1px offset when checked.
16630
+ * TODO: width/offset are hardcoded 1px to preserve the AntD look; adopt the system 2px focus ring
16631
+ * (var(--db-focus-ring-width)) in a separate change. */
16534
16632
 
16535
16633
  /* Disabled + on: more specific than the plain disabled rule, so it wins regardless of source order. */
16536
16634