Files
astrolabe/src/app/components/SegmentedControl.module.css
T
oleh af9ee1e4c0 Add aggregation, binning, granularity, sort, and stacking to the Chart Builder
- Per-channel transforms: aggregate (sum/mean/median/min/max), quantitative
  bin, and temporal timeUnit granularity; bin and aggregate are mutually
  exclusive. A field-less "Count of records" measure (Voyager's count(*)).
- Chart-level sort (rank a categorical axis by its measure) and stacking
  (zero / 100% normalize), each shown only when it applies.
- Field type is a fixed N|O|Q|T segmented control with the column's invalid
  types disabled; SegmentedControl gains APG-correct disabled options.
- A crowded-category-axis warning (a raw measure drawing one mark per row over
  a large dataset) and a disabled-Create hint (says why it's disabled).
- Drop the Create success toast — the new snippet is immediately visible.
- Docs: spec §06, research-doc §8 backlog (incl. the cardinality/extent
  profiling TODO), architecture 01 (stable-selector rule) and 05 (builder-local
  preview), and a profiling breadcrumb.
2026-06-06 18:04:24 +03:00

51 lines
1.3 KiB
CSS

/*
* Shared look for every SegmentedControl. The control's appearance is owned here
* — once — so the Draft/Published and fit-mode instances can't drift apart again.
* Selected option uses --layer-02 (a neutral high-contrast fill, per Carbon's
* content switcher); --accent stays reserved for primary actions (e.g. Publish),
* so "current selection" never reads as "the action to take". Call sites may still
* pass className/optionClassName/activeClassName for layout-specific additions.
*/
.group {
display: inline-flex;
border: var(--border-width) solid var(--border-strong);
}
.option {
appearance: none;
border: none;
background: var(--bg);
color: var(--text-secondary);
font: inherit;
font-size: 12px;
line-height: 1;
padding: var(--space-2) var(--space-3);
cursor: pointer;
transition:
background var(--dur-fast) var(--ease),
color var(--dur-fast) var(--ease);
}
.option + .option {
border-left: var(--border-width) solid var(--border-strong);
}
.option:hover {
background: var(--layer-01);
color: var(--text);
}
.active,
.active:hover {
background: var(--layer-02);
color: var(--text);
}
/* Disabled option: perceivable but inert (dimmed, no hover affordance). */
.option[aria-disabled='true'],
.option[aria-disabled='true']:hover {
color: var(--text-placeholder);
background: var(--bg);
cursor: not-allowed;
}