@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.
- package/CHANGELOG.md +37 -0
- package/dist/{WizardStepContentWrapper-DnwQIMN1.js → WizardStepContentWrapper-8bs2FwRi.js} +706 -533
- package/dist/WizardStepContentWrapper-8bs2FwRi.js.map +1 -0
- package/dist/fonts/dm-mono/DMMono-Regular.woff2 +0 -0
- package/dist/fonts/dm-mono/dm-mono.css +11 -0
- package/dist/index-dark.css +323 -225
- package/dist/index-dark.mitigated.css +323 -225
- package/dist/index.css +539 -427
- package/dist/index.js +259 -159
- package/dist/index.js.map +1 -1
- package/dist/index.mitigated.css +548 -436
- package/dist/patterns.js +3 -2
- package/dist/patterns.js.map +1 -1
- package/dist/test-utils/rtl.js +1 -1
- package/dist/test-utils/rtl.js.map +1 -1
- package/dist-types/design-system/Alert/Alert.d.ts +1 -1
- package/dist-types/design-system/ContextMenu/ContextMenu.d.ts +2 -2
- package/dist-types/design-system/DesignSystemProvider/DesignSystemProvider.d.ts +66 -0
- package/dist-types/design-system/DesignSystemProvider/DesignTokenScopeWithEmotionTheme.d.ts +23 -0
- package/dist-types/design-system/DesignSystemProvider/index.d.ts +1 -0
- package/dist-types/design-system/Grid/Col.d.ts +1 -3
- package/dist-types/design-system/Grid/NativeCol.d.ts +10 -0
- package/dist-types/design-system/Grid/NativeGridContext.d.ts +11 -0
- package/dist-types/design-system/Grid/NativeRow.d.ts +13 -0
- package/dist-types/design-system/Grid/Row.d.ts +3 -4
- package/dist-types/design-system/Grid/grid-styling.d.ts +22 -0
- package/dist-types/design-system/Grid/gridConstants.d.ts +2 -0
- package/dist-types/design-system/Grid/index.d.ts +1 -0
- package/dist-types/design-system/Grid/rowConstants.d.ts +7 -0
- package/dist-types/design-system/Grid/types.d.ts +49 -0
- package/dist-types/design-system/Hooks/index.d.ts +1 -1
- package/dist-types/design-system/Hooks/useDesignSystemTheme.d.ts +7 -7
- package/dist-types/design-system/Icon/LegacyAntDIcon.d.ts +21 -0
- package/dist-types/design-system/Icon/index.d.ts +0 -1
- package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxAddButton.d.ts +4 -0
- package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxCheckboxItem.d.ts +8 -0
- package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxFooter.d.ts +12 -0
- package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxInput.d.ts +8 -0
- package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxMenu.d.ts +8 -0
- package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxMenuItem.d.ts +8 -0
- package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxMultiSelectInput.d.ts +8 -0
- package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxRoot.d.ts +8 -0
- package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxSectionHeader.d.ts +4 -0
- package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxSelectedItem.d.ts +8 -0
- package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxSeparator.d.ts +4 -0
- package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxToggleButton.d.ts +8 -0
- package/dist-types/design-system/TypeaheadCombobox/hooks/downshiftHookWrappers.d.ts +8 -0
- package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/hooks/useComboboxState.d.ts +6 -0
- package/dist-types/design-system/TypeaheadComboboxV2/hooks/useRestoreHighlightedOption.d.ts +18 -0
- package/dist-types/design-system/TypeaheadComboboxV2/hooks/useTypeaheadComboboxContext.d.ts +2 -0
- package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/providers/TypeaheadComboboxContext.d.ts +6 -4
- package/dist-types/design-system/_shared_/Menu/index.d.ts +1 -1
- package/dist-types/design-system/fonts.d.ts +1 -0
- package/dist-types/design-system/index.d.ts +1 -1
- package/dist-types/test-utils/rtl/buttonVariants.d.ts +11 -0
- package/package.json +9 -2
- package/dist/WizardStepContentWrapper-DnwQIMN1.js.map +0 -1
- package/dist-types/design-system/Icon/AntdIcon.d.ts +0 -114
- package/dist-types/design-system/TypeaheadComboboxReactAria/hooks/useTypeaheadComboboxContext.d.ts +0 -2
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/CountBadge.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxAddButton.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxCheckboxItem.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxControls.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxFooter.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxInput.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxMenu.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxMenuItem.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxMultiSelectInput.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxRoot.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxSectionHeader.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxSelectedItem.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxSeparator.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/TypeaheadComboboxToggleButton.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/hooks/footerFocus.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/hooks/index.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/hooks/useComboboxItems.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/hooks/useComboboxStateProps.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/hooks/useMultipleSelectionState.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/hooks/useScrollOptionIntoView.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/hooks/useVirtualizedComboboxScroll.d.ts +0 -0
- /package/dist-types/design-system/{TypeaheadComboboxReactAria → TypeaheadComboboxV2}/index.d.ts +0 -0
|
@@ -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
|
-
/*
|
|
16079
|
-
|
|
16080
|
-
|
|
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
|
-
|
|
16101
|
-
|
|
16102
|
-
|
|
16082
|
+
\3c !-- Basic: default gap between each child -->
|
|
16083
|
+
<div class="db-stack">
|
|
16084
|
+
<h2>Title</h2>
|
|
16085
|
+
<p>Body</p>
|
|
16086
|
+
<button>Action</button>
|
|
16087
|
+
</div>
|
|
16103
16088
|
|
|
16104
|
-
|
|
16105
|
-
|
|
16106
|
-
|
|
16107
|
-
|
|
16108
|
-
|
|
16109
|
-
|
|
16110
|
-
|
|
16111
|
-
|
|
16089
|
+
\3c !-- Wider gap for this instance -->
|
|
16090
|
+
<div class="db-stack" style="--db-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="db-stack" style="--db-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="db-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="db-cluster" style="--db-cluster-justify: space-between">…</div>
|
|
16109
|
+
|
|
16110
|
+
\3c !-- Looser gap for this instance -->
|
|
16111
|
+
<div class="db-cluster" style="--db-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
|
-
/*
|
|
16114
|
-
|
|
16115
|
-
|
|
16116
|
-
|
|
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-
|
|
16129
|
-
--db-
|
|
16130
|
-
--db-
|
|
16131
|
-
--db-
|
|
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
|
-
|
|
16135
|
-
|
|
16136
|
-
|
|
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-
|
|
16144
|
-
--db-
|
|
16145
|
-
--db-
|
|
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
|
-
|
|
16151
|
-
|
|
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
|
-
|
|
16156
|
-
|
|
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
|
-
|
|
16169
|
-
--db-checkbox-
|
|
16170
|
-
--db-checkbox-
|
|
16171
|
-
--db-checkbox-
|
|
16172
|
-
--db-checkbox-
|
|
16173
|
-
--db-checkbox-
|
|
16174
|
-
--db-checkbox-
|
|
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
|
|
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-
|
|
16180
|
-
--db-checkbox-border-disabled: var(--db-
|
|
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-
|
|
16183
|
-
--db-checkbox-
|
|
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
|
-
/*
|
|
16193
|
-
--db-checkbox-
|
|
16194
|
-
--db-checkbox-
|
|
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
|
|
@@ -16202,24 +16330,23 @@ span.du-bois-dark-typography-ellipsis-single-line {
|
|
|
16202
16330
|
*
|
|
16203
16331
|
* Structure (assumed by the React component):
|
|
16204
16332
|
*
|
|
16205
|
-
* <label class="
|
|
16206
|
-
* <input type="checkbox" class="
|
|
16207
|
-
* <span class="
|
|
16208
|
-
* <svg class="
|
|
16209
|
-
* <span class="
|
|
16333
|
+
* <label class="db-checkbox">
|
|
16334
|
+
* <input type="checkbox" class="db-checkbox-input" />
|
|
16335
|
+
* <span class="db-checkbox-indicator"> ← border + fill react to state
|
|
16336
|
+
* <svg class="db-checkbox-checkmark" .../> ← visible when :checked
|
|
16337
|
+
* <span class="db-checkbox-dash" /> ← visible when :indeterminate
|
|
16210
16338
|
* </span>
|
|
16211
|
-
* <span class="
|
|
16339
|
+
* <span class="db-checkbox-label">{children}</span>
|
|
16212
16340
|
* </label>
|
|
16213
16341
|
*
|
|
16214
|
-
* State and hiding rules target `.
|
|
16342
|
+
* State and hiding rules target `.db-checkbox-input` — the checkbox's OWN input —
|
|
16215
16343
|
* never a bare `input`: consumers may render an inline <input> (e.g. a number
|
|
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
|
|
16220
|
-
*
|
|
16221
|
-
*
|
|
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
|
|
16236
|
-
* `:has()` lookups above can read its
|
|
16237
|
-
*
|
|
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
|
|
@@ -16254,7 +16387,7 @@ span.du-bois-dark-typography-ellipsis-single-line {
|
|
|
16254
16387
|
*
|
|
16255
16388
|
* Each helper-text class is listed once per theme (`du-bois-light-*` /
|
|
16256
16389
|
* `du-bois-dark-*`). The selectors deliberately repeat the root/group class
|
|
16257
|
-
* (`.
|
|
16390
|
+
* (`.db-checkbox.db-checkbox`) to push specificity to (0,3,0). That
|
|
16258
16391
|
* overrides `FormMessage`'s own `&&`-doubled `margin-top: 8px` declared with
|
|
16259
16392
|
* Emotion at runtime — without doubling we'd lose on the specificity tie and
|
|
16260
16393
|
* the validation message would keep an 8px gap below the checkbox. */
|
|
@@ -16267,84 +16400,53 @@ span.du-bois-dark-typography-ellipsis-single-line {
|
|
|
16267
16400
|
* follows a Hint, 8px gap above a FormMessage when it follows the group.
|
|
16268
16401
|
* Doubled class on the group side beats FormMessage's `&&` for the same reason. */
|
|
16269
16402
|
|
|
16270
|
-
/* CheckboxGroup layout. Vertical delegates to the `.
|
|
16403
|
+
/* CheckboxGroup layout. Vertical delegates to the `.db-stack` primitive; the
|
|
16271
16404
|
* horizontal default stays bespoke because it must NOT wrap (a long row of
|
|
16272
16405
|
* checkboxes overflows horizontally rather than reflowing onto multiple lines),
|
|
16273
|
-
* which is the one thing `.
|
|
16406
|
+
* which is the one thing `.db-cluster` won't do. Both wire their gap to the
|
|
16274
16407
|
* checkbox spacing token so a retheme moves with the rest of the component. */
|
|
16275
16408
|
|
|
16276
|
-
/* Horizontal (default): single non-wrapping row. `:not(.
|
|
16409
|
+
/* Horizontal (default): single non-wrapping row. `:not(.db-stack)` keeps this
|
|
16277
16410
|
* off the vertical element so it never fights the stack primitive's gap. */
|
|
16278
16411
|
|
|
16279
|
-
/* Vertical: .
|
|
16412
|
+
/* Vertical: .db-stack supplies flex-direction + gap; we only retarget the knob. */
|
|
16280
16413
|
|
|
16281
|
-
|
|
16282
|
-
|
|
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
|
-
|
|
16300
|
-
--db-radio-
|
|
16301
|
-
--db-radio-
|
|
16302
|
-
--db-radio-
|
|
16303
|
-
--db-radio-
|
|
16304
|
-
|
|
16305
|
-
|
|
16306
|
-
|
|
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
|
|
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-
|
|
16314
|
-
--db-radio-border-disabled: var(--db-
|
|
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
|
-
|
|
16326
|
-
|
|
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
|
-
|
|
16342
|
-
--db-radio-
|
|
16343
|
-
--db-radio-
|
|
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
|
-
/*
|
|
16346
|
-
|
|
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
|
|
@@ -16355,12 +16457,12 @@ span.du-bois-dark-typography-ellipsis-single-line {
|
|
|
16355
16457
|
*
|
|
16356
16458
|
* Structure (assumed by the React component):
|
|
16357
16459
|
*
|
|
16358
|
-
* <label class="
|
|
16460
|
+
* <label class="db-radio">
|
|
16359
16461
|
* <input type="radio" />
|
|
16360
|
-
* <span class="
|
|
16361
|
-
* <span class="
|
|
16462
|
+
* <span class="db-radio-indicator"> ← circle border + fill react to state
|
|
16463
|
+
* <span class="db-radio-dot" /> ← visible when :checked
|
|
16362
16464
|
* </span>
|
|
16363
|
-
* <span class="
|
|
16465
|
+
* <span class="db-radio-label">{children}</span>
|
|
16364
16466
|
* </label>
|
|
16365
16467
|
*
|
|
16366
16468
|
* The root only ever has one <input> descendant, so a bare `input` selector is
|
|
@@ -16369,11 +16471,11 @@ span.du-bois-dark-typography-ellipsis-single-line {
|
|
|
16369
16471
|
* checkmark/dash, and there is no indeterminate state.
|
|
16370
16472
|
*
|
|
16371
16473
|
* TODO(DUBOIS-452): the indicator/dot state styles below are identical to
|
|
16372
|
-
* NativeCheckbox.css — consolidate them into a shared `.
|
|
16474
|
+
* NativeCheckbox.css — consolidate them into a shared `.db-selection-toggle` class. */
|
|
16373
16475
|
|
|
16374
|
-
/* Hover/press live on the root (label), not on the input: the input
|
|
16375
|
-
*
|
|
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
|
|
16402
|
-
* `:has()` lookups above can read
|
|
16403
|
-
*
|
|
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
|
|
@@ -16421,16 +16529,16 @@ span.du-bois-dark-typography-ellipsis-single-line {
|
|
|
16421
16529
|
* after a radio gets `marginTop: -sm` (cancels the preceding radio's
|
|
16422
16530
|
* `paddingBottom: sm` so the hint tucks directly under its label) and
|
|
16423
16531
|
* `marginBottom: sm` (gap before the next radio). The negative top margin relies on
|
|
16424
|
-
* the .
|
|
16532
|
+
* the .db-stack gap being 0 (set below). Scoped to .db-stack so it never perturbs
|
|
16425
16533
|
* the horizontal grid, where hints are positioned by grid-row instead. */
|
|
16426
16534
|
|
|
16427
16535
|
/* AntD `& > label:last-of-type + hint { marginTop: 0 }`: the last radio has no
|
|
16428
16536
|
* `paddingBottom` to cancel, so its trailing hint keeps its natural top position. */
|
|
16429
16537
|
|
|
16430
16538
|
/* RadioGroup layout. Vertical (the default) delegates flex-direction to the
|
|
16431
|
-
* .
|
|
16539
|
+
* .db-stack primitive; horizontal is a two-row grid (mirroring AntD). */
|
|
16432
16540
|
|
|
16433
|
-
/* Vertical: .
|
|
16541
|
+
/* Vertical: .db-stack supplies flex-direction: column. AntD's vertical helper
|
|
16434
16542
|
* (getVerticalRadioGroupStyles) produces its item rhythm purely from
|
|
16435
16543
|
* `& > label { paddingBottom: sm }` plus the negative-margin hint trick above — it
|
|
16436
16544
|
* uses NO flex gap. The negative `marginTop` on hints only works if the stack adds
|
|
@@ -16442,9 +16550,9 @@ span.du-bois-dark-typography-ellipsis-single-line {
|
|
|
16442
16550
|
/* AntD `& > label:last-of-type { paddingBottom: 0 }`. */
|
|
16443
16551
|
|
|
16444
16552
|
/* AntD getVerticalRadioGroupStyles `.${prefix}-radio-tile + .${prefix}-radio-tile {
|
|
16445
|
-
* marginTop: md }`: RadioTiles are not matched by the `.
|
|
16553
|
+
* marginTop: md }`: RadioTiles are not matched by the `.db-radio` padding-bottom
|
|
16446
16554
|
* rhythm above (the tile's own class is du-bois-{light,dark}-radio-tile), so space
|
|
16447
|
-
* consecutive tiles explicitly. The .
|
|
16555
|
+
* consecutive tiles explicitly. The .db-stack gap is 0, so this margin is the spacing. */
|
|
16448
16556
|
|
|
16449
16557
|
/* Horizontal: AntD `getHorizontalRadioGroupStyles` is a TWO-ROW grid (NOT a flex
|
|
16450
16558
|
* row) so each radio sits in the [label] row and its following hint drops into the
|
|
@@ -16457,13 +16565,13 @@ span.du-bois-dark-typography-ellipsis-single-line {
|
|
|
16457
16565
|
|
|
16458
16566
|
/* AntD `& > label, & > .${prefix}-radio-tile { gridRow: label / label; marginRight: 0 }`:
|
|
16459
16567
|
* every radio (and every RadioTile button, whose own class is
|
|
16460
|
-
* du-bois-{light,dark}-radio-tile and is NOT matched by `> .
|
|
16568
|
+
* du-bois-{light,dark}-radio-tile and is NOT matched by `> .db-radio`) lives in the
|
|
16461
16569
|
* label row. grid-auto-flow defaults to row, so successive items advance the implicit
|
|
16462
16570
|
* column. */
|
|
16463
16571
|
|
|
16464
16572
|
/* AntD `& > label + hint { display: inline-block; gridRow: hint / hint }`: a hint
|
|
16465
16573
|
* following a radio drops into the hint row of the column its radio occupies. The
|
|
16466
|
-
* vertical negative-margin rules are scoped to .
|
|
16574
|
+
* vertical negative-margin rules are scoped to .db-stack, so nothing to reset here. */
|
|
16467
16575
|
|
|
16468
16576
|
/* AntD `:has(> hint) { marginTop: sm }`: when the horizontal group contains a hint,
|
|
16469
16577
|
* the group itself gets a top margin (room above the two-row grid). */
|
|
@@ -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
|
-
|
|
16475
|
-
|
|
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
|
-
|
|
16491
|
-
--db-switch-
|
|
16492
|
-
--db-switch-
|
|
16493
|
-
--db-switch-
|
|
16494
|
-
--db-switch-
|
|
16495
|
-
--db-switch-
|
|
16496
|
-
--db-switch-
|
|
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
|
|
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-
|
|
16502
|
-
|
|
16503
|
-
--db-switch-border-checked: var(--db-selection-toggle-
|
|
16504
|
-
--db-switch-border-checked-
|
|
16505
|
-
--db-switch-border-
|
|
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
|
-
|
|
16512
|
-
--db-switch-thumb-color: var(--db-selection-toggle-bg-default);
|
|
16606
|
+
--db-switch-thumb: var(--db-selection-toggle-surface);
|
|
16513
16607
|
|
|
16514
|
-
|
|
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
|
-
/*
|
|
16519
|
-
--db-switch-
|
|
16520
|
-
--db-switch-
|
|
16521
|
-
--db-switch-
|
|
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,13 +16626,15 @@ 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
|
|
|
16537
16635
|
/* `:first-child` scopes this to the label-first layout; the plain layout renders the label last. */
|
|
16538
16636
|
|
|
16539
|
-
/* Target the <Label>'s class, not a bare `label` — that would also match the .
|
|
16637
|
+
/* Target the <Label>'s class, not a bare `label` — that would also match the .db-switch root <label>. */
|
|
16540
16638
|
|
|
16541
16639
|
/* Indent a following hint/message past the track. The class is doubled to out-specify FormMessage's
|
|
16542
16640
|
* own margin rule. */
|