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/meter.ts

47 lines
1.2 KiB

import type { Morfo } from '../types';
import { v } from '../types';
export const meterMorfo = {
name: 'Meter',
kebab: 'meter',
scope: ['soma'],
parts: [
{
name: 'Provider',
kebab: 'provider',
kind: 'public',
defaultElement: 'div',
role: 'meter',
optional: false,
states: ['below', 'optimum', 'above'],
data: [
{ attr: 'data-state', values: ['below', 'optimum', 'above'] },
{ attr: 'data-value' },
{ attr: 'data-min' },
{ attr: 'data-max' }
],
aria: [
{ attr: 'aria-valuemin', value: v.propRef('min') },
{ attr: 'aria-valuemax', value: v.propRef('max') },
{ attr: 'aria-valuenow', value: v.propRef('value') },
{ attr: 'aria-valuetext', value: v.propRef('valueText'), severity: 'recommended' },
{
attr: 'aria-label',
value: v.translationRef('#?components.meter.label|Meter'),
severity: 'recommended'
}
]
},
{
name: 'Indicator',
kebab: 'indicator',
kind: 'public',
defaultElement: 'div',
optional: true,
states: ['below', 'optimum', 'above'],
data: [{ attr: 'data-state', values: ['below', 'optimum', 'above'] }],
aria: []
}
]
} as const satisfies Morfo;

Powered by TurnKey Linux.