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/date-range-field.ts

47 lines
1.1 KiB

import type { Morfo } from '../types';
import { v } from '../types';
export const dateRangeFieldMorfo = {
name: 'DateRangeField',
kebab: 'date-range-field',
scope: ['soma'],
parts: [
{
name: 'Provider',
kebab: 'provider',
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: []
}
]
} as const satisfies Morfo;

Powered by TurnKey Linux.