дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-04 09:11:10 +02:00
Plugin API 1.21 adds optional settings schema fields: presentation (select, radio, segmented, slider, color, checkbox-list), enumOptions (label, description, icon per enum value), minimum / maximum / step, and when conditions on another setting of the page. New src/ui primitives RadioGroup, SegmentedControl, CheckboxGroup, Slider and ColorInput. Schemas that use none of them render as before; manifests admitting an older API keep ignoring JSON Schema bounds. Review changes: the fields are gated on API 1.21 (1.20 shipped in 0.1.57), and the colour swatch fill is stretched inside its button. Part of #7688. Co-authored-by: Bruno0416 <[email protected]>
88 рядки
1.8 KiB
CSS
88 рядки
1.8 KiB
CSS
.group {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-1-5);
|
|
min-width: 0;
|
|
}
|
|
.inline {
|
|
flex-direction: row;
|
|
flex-wrap: wrap;
|
|
gap: var(--space-1) var(--space-4);
|
|
}
|
|
.choice {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-0-5);
|
|
min-width: 0;
|
|
}
|
|
.label {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: var(--space-1-5);
|
|
min-width: 0;
|
|
}
|
|
.text {
|
|
min-width: 0;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
/* Under the option's text: past the 16px box and the 8px gap of the Checkbox row. */
|
|
.detail {
|
|
padding-inline-start: 24px;
|
|
color: var(--fg-muted);
|
|
font-size: var(--fs-small);
|
|
}
|
|
|
|
/* SegmentedButton: the Button frame around adjoining segments; the selected one takes the
|
|
selected-tab fill and frame (SegmentedButton.selectedButtonColor / selectedStartBorderColor). */
|
|
.segmented {
|
|
display: inline-flex;
|
|
flex-wrap: wrap;
|
|
max-width: 100%;
|
|
border-radius: var(--radius-control);
|
|
box-shadow: inset 0 0 0 1px var(--border-button);
|
|
}
|
|
.segment {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
min-width: 0;
|
|
max-width: 100%;
|
|
min-height: var(--h-field);
|
|
padding: 0 var(--space-3);
|
|
border-radius: inherit;
|
|
color: var(--fg);
|
|
transition:
|
|
background var(--dur-fast) var(--ease),
|
|
box-shadow var(--dur-fast) var(--ease);
|
|
}
|
|
.segment:hover:not(:disabled, .selected) {
|
|
background: var(--bg-toolbar-hover);
|
|
}
|
|
.selected {
|
|
background: var(--bg-tab-selected);
|
|
box-shadow: inset 0 0 0 1px var(--border-tab-selected);
|
|
color: var(--fg-strong);
|
|
}
|
|
.segment:disabled {
|
|
color: var(--fg-faint);
|
|
}
|
|
.segment:focus-visible {
|
|
outline: 2px solid var(--focus-ring);
|
|
outline-offset: -2px;
|
|
}
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.segment {
|
|
transition: none;
|
|
}
|
|
}
|
|
|
|
@media (forced-colors: active) {
|
|
.segmented {
|
|
border: 1px solid ButtonText;
|
|
}
|
|
.selected {
|
|
outline: 2px solid Highlight;
|
|
outline-offset: -2px;
|
|
}
|
|
}
|