Merge remote-tracking branch 'origin/main' into claude/hal-676-gev-fire-intensity-742bd1

# Conflicts:
#	scripts/format-scope.json
#	src/i18n/locales/ar.json
#	src/i18n/locales/de.json
#	src/i18n/locales/fr.json
#	src/i18n/locales/it.json
#	src/i18n/locales/ja.json
#	src/i18n/locales/pt.json
#	src/i18n/locales/zh-Hant.json
#	src/ui/layerPanel.js
This commit is contained in:
German Khokhlov committed 2026-11-03 15:36:13 +04:00
commit 4e950d04e9
493 files changed
+28324 -1362

No files matched your search

+15
View File
@@ -117,3 +117,18 @@ test('a radio group moves from the focused option, an arrows group from the sele
assert.deepEqual(arrows.emitted('update:modelValue'), [['a']]);
arrows.unmount();
});
test("an option's own tip wins; an icon option without one is titled by its label", () => {
const wrapper = mountGroup({
options: [
{ value: 'a', label: 'Alpha', attrs: { title: 'Alpha tip' } },
{ value: 'b', label: 'Beta', icon: 'star' },
{ value: 'c', label: 'Gamma' },
],
});
const titles = wrapper
.findAll('button')
.map((b) => b.attributes('title') ?? null);
assert.deepEqual(titles, ['Alpha tip', 'Beta', null]);
wrapper.unmount();
});
+11 -2
View File
@@ -7,7 +7,9 @@ import { computed } from 'vue';
// stop that arrows move) or `radio` (arrows plus Home and
// End). Each option may carry `attrs` (an id, data attributes, a tip), and
// Core's classes sit beside the kit's: `gev-segmented`, `gev-segment` and the
// selected option's `activeClass`. Not mirrored yet: an option's icon.
// selected option's `activeClass`. An option with an `icon` shows the glyph,
// and its label becomes the button's accessible name and tooltip, unless its
// `attrs` carry a tip of their own.
const props = defineProps({
modelValue: { type: String, default: undefined },
/** `{value, label, icon?, disabled?, attrs?}`, labels already translated. */
@@ -117,10 +119,17 @@ function onKey(event) {
},
]"
:aria-checked="String(option.value === props.modelValue)"
:aria-label="option.icon ? option.label : undefined"
:title="option.attrs?.title ?? (option.icon ? option.label : undefined)"
:disabled="optionOff(option)"
:tabindex="tabindex(index)"
@click="choose(index)"
>{{ option.label }}</button
><span
v-if="option.icon"
class="ui-segmented__icon material-symbols-outlined"
aria-hidden="true"
>{{ option.icon }}</span
><template v-else>{{ option.label }}</template></button
>
</div>
</template>