@kouji-ui/core 0.1.4 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23319,9 +23319,20 @@ class KjDatePickerTrigger {
23319
23319
  el = inject(ElementRef);
23320
23320
  /** Cached typed text — avoids overwriting mid-edit. */
23321
23321
  editing = false;
23322
+ /**
23323
+ * Optional custom display formatter, e.g. for datetime pickers that show
23324
+ * the time next to the date. Free-text parsing (`commitTyped`) still uses
23325
+ * the locale date parser — text that doesn't parse as a plain date is
23326
+ * reverted to the formatted value on the next value change.
23327
+ */
23328
+ kjDisplayFormat = input(null, /* @ts-ignore */
23329
+ ...(ngDevMode ? [{ debugName: "kjDisplayFormat" }] : /* istanbul ignore next */ []));
23322
23330
  displayValue = computed(() => {
23323
23331
  const v = this.ctx.value();
23324
- return v ? formatDateShort(v, this.ctx.locale()) : '';
23332
+ if (!v)
23333
+ return '';
23334
+ const fmt = this.kjDisplayFormat();
23335
+ return fmt ? fmt(v, this.ctx.locale()) : formatDateShort(v, this.ctx.locale());
23325
23336
  }, /* @ts-ignore */
23326
23337
  ...(ngDevMode ? [{ debugName: "displayValue" }] : /* istanbul ignore next */ []));
23327
23338
  constructor() {
@@ -23425,7 +23436,7 @@ class KjDatePickerTrigger {
23425
23436
  return false;
23426
23437
  }
23427
23438
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: KjDatePickerTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
23428
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.5", type: KjDatePickerTrigger, isStandalone: true, selector: "input[kjDatePickerTrigger]", host: { attributes: { "role": "combobox", "autocomplete": "off", "spellcheck": "false" }, listeners: { "input": "onInput($event)", "blur": "onBlur()", "keydown": "onKeydown($event)" }, properties: { "attr.aria-disabled": "ctx.disabled() ? \"true\" : null", "attr.aria-readonly": "ctx.readonly() ? \"true\" : null", "attr.disabled": "ctx.disabled() ? \"\" : null", "attr.readonly": "ctx.readonly() ? \"\" : null" } }, providers: [
23439
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: KjDatePickerTrigger, isStandalone: true, selector: "input[kjDatePickerTrigger]", inputs: { kjDisplayFormat: { classPropertyName: "kjDisplayFormat", publicName: "kjDisplayFormat", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "combobox", "autocomplete": "off", "spellcheck": "false" }, listeners: { "input": "onInput($event)", "blur": "onBlur()", "keydown": "onKeydown($event)" }, properties: { "attr.aria-disabled": "ctx.disabled() ? \"true\" : null", "attr.aria-readonly": "ctx.readonly() ? \"true\" : null", "attr.disabled": "ctx.disabled() ? \"\" : null", "attr.readonly": "ctx.readonly() ? \"\" : null" } }, providers: [
23429
23440
  KjOverlayController,
23430
23441
  { provide: KJ_OVERLAY_TRIGGER_EVENT_STRATEGY, useFactory: () => clickOrFocus() },
23431
23442
  { provide: KJ_OVERLAY_PANEL_ROLE, useValue: 'dialog' },
@@ -23460,7 +23471,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
23460
23471
  '(keydown)': 'onKeydown($event)',
23461
23472
  },
23462
23473
  }]
23463
- }], ctorParameters: () => [] });
23474
+ }], ctorParameters: () => [], propDecorators: { kjDisplayFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "kjDisplayFormat", required: false }] }] } });
23464
23475
 
23465
23476
  /**
23466
23477
  * Marker directive for the calendar slot of a Date Picker. Composes the