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.
47 lines
1.1 KiB
47 lines
1.1 KiB
import type { Morfo } from '../types';
|
|
import { v } from '../types';
|
|
|
|
export const timeRangeFieldMorfo: Morfo = {
|
|
name: 'TimeRangeField',
|
|
kebab: 'time-range-field',
|
|
scope: ['soma'],
|
|
parts: [
|
|
{
|
|
name: 'Provider',
|
|
kebab: 'root',
|
|
kind: 'public',
|
|
defaultElement: 'div',
|
|
role: 'group',
|
|
optional: false,
|
|
data: [
|
|
{ attr: 'data-invalid', severity: 'optional' },
|
|
{ attr: 'data-disabled', severity: 'optional' },
|
|
{ attr: 'data-readonly', severity: 'optional' },
|
|
{ attr: 'data-required', severity: 'optional' }
|
|
],
|
|
aria: [
|
|
{ attr: 'aria-label', value: v.propRef('ariaLabel'), severity: 'optional' },
|
|
{
|
|
attr: 'aria-labelledby',
|
|
value: v.partRef('label'),
|
|
condition: { when: 'part-present', part: 'label' },
|
|
severity: 'recommended'
|
|
},
|
|
{ attr: 'aria-disabled', value: v.propRef('disabled'), severity: 'optional' }
|
|
]
|
|
},
|
|
{
|
|
name: 'Label',
|
|
kebab: 'label',
|
|
kind: 'public',
|
|
defaultElement: 'label',
|
|
optional: true,
|
|
data: [
|
|
{ attr: 'data-invalid', severity: 'optional' },
|
|
{ attr: 'data-disabled', severity: 'optional' }
|
|
],
|
|
aria: []
|
|
}
|
|
]
|
|
};
|