|
|
|
|
@ -1,5 +1,4 @@
|
|
|
|
|
import type { Updater } from 'svelte/store';
|
|
|
|
|
import { createAttrs } from '$uix/morfo';
|
|
|
|
|
import { untrack, onMount } from 'svelte';
|
|
|
|
|
import { watch } from 'runed';
|
|
|
|
|
import { context, type ProviderOpts, type WithRefOpts } from '../../provider';
|
|
|
|
|
@ -72,8 +71,6 @@ import { DATE_FIELD_LANGS } from './langs';
|
|
|
|
|
import { dateFieldMorfo } from '../../../morfo/components/date-field';
|
|
|
|
|
import type { SomaRuntime, SomaRuntimePart } from '../../runtime.svelte';
|
|
|
|
|
|
|
|
|
|
const attrs = createAttrs(dateFieldMorfo);
|
|
|
|
|
|
|
|
|
|
// ── Segment configuration ────────────────────────────────────────────────────
|
|
|
|
|
|
|
|
|
|
interface SegmentConfig {
|
|
|
|
|
@ -676,8 +673,7 @@ export class DateFieldProvider {
|
|
|
|
|
'data-invalid': boolToEmptyStrOrUndef(this.isInvalid),
|
|
|
|
|
'data-disabled': boolToEmptyStrOrUndef(this.opts.disabled.current),
|
|
|
|
|
'data-readonly': boolToEmptyStrOrUndef(this.opts.readonly.current || inReadonly),
|
|
|
|
|
'data-segment': `${part}`,
|
|
|
|
|
[attrs.segment]: ''
|
|
|
|
|
'data-segment': `${part}`
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
if (part === 'literal') return defaultAttrs;
|
|
|
|
|
@ -1547,4 +1543,3 @@ export function createSegmentProvider(
|
|
|
|
|
// ── Shared exports for wrappers ─────────────────────────────────────────────
|
|
|
|
|
|
|
|
|
|
export type { OnChangeFn };
|
|
|
|
|
export { attrs as dateFieldAttrs };
|
|
|
|
|
|