You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte-kit-vice/src/uix/morfo/components/announce.ts

53 lines
1.1 KiB

import type { Morfo } from '../types';
import { v } from '../types';
export const announceMorfo = {
name: 'Announce',
kebab: 'announce',
scope: ['soma'],
translations: {
label: { es: 'Anuncios', en: 'Announcements' }
},
parts: [
{
name: 'Provider',
kebab: 'provider',
archetype: 'provider',
kind: 'public',
defaultElement: 'div',
optional: false,
data: [],
aria: []
},
{
name: 'Region',
kebab: 'region',
archetype: 'content',
kind: 'public',
defaultElement: 'div',
optional: true,
data: [
{
attr: 'data-role',
values: ['status', 'alert', 'log', 'timer'],
value: v.propRef('role')
},
{
attr: 'data-live',
values: ['polite', 'assertive'],
value: v.propRef('ariaLive')
}
],
aria: [
{ attr: 'role', value: v.propRef('role') },
{ attr: 'aria-live', value: v.propRef('ariaLive') },
{
attr: 'aria-atomic',
value: v.mapRef(v.propRef('ariaAtomic'), { true: 'true', false: 'false' })
},
{ attr: 'aria-relevant', value: v.propRef('ariaRelevant') }
]
}
]
} as const satisfies Morfo;

Powered by TurnKey Linux.