@featherk/composables 0.9.8 → 0.10.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.
@@ -145,8 +145,9 @@ Creates a controller for a masked date range input.
145
145
  - **`debugEnabled: Ref<boolean>`** and **`debugLines: Computed<Array<{label:string; value:string}>>`**: Debug info for UI display.
146
146
  - **`digitsOnly: Computed<string>`**: The raw string with non-digits removed.
147
147
  - **`valid: Ref<boolean | undefined>`**: Managed validity state (mirrored into `externalValid` when enabled).
148
- - **`validComputed: Readonly<ComputedRef<boolean | undefined>>`**: Derived validity considering mask completeness, min/max clamping, ordering, and span constraints.
149
- - **`reason: Readonly<ComputedRef<string | undefined>>`**: Explanation for invalid states; returns `'valid'` when the range passes validation.
148
+ - **`validComputed: Readonly<ComputedRef<boolean | undefined>>`**: Derived validity considering mask completeness, min/max clamping, ordering, and span constraints. Not flagged until the first blur/clear; live thereafter.
149
+ - **`reason: Readonly<ComputedRef<string | undefined>>`**: Explanation for invalid states; returns `'valid'` when the range passes validation and `undefined` before the first blur/clear.
150
+ - **`validationMessage: Readonly<ComputedRef<string>>`**: User-facing message derived from `reason`; always in sync with `validComputed`.
150
151
  - **`spanDays: Readonly<ComputedRef<number | undefined>>`**: Span in days between clamped start/end; `undefined` when incomplete or invalid.
151
152
  - Readonly computed parts: **`month1`**, **`day1`**, **`year1`**, **`month2`**, **`day2`**, **`year2`** (strings). Useful for diagnostics.
152
153
  - **`initStyling(): void`**: Re-applies the `fk-daterangepicker` class to the input's parent container. Exposed so consumers can re-run theming after Kendo manipulates the DOM; the function is idempotent. Use this to apply the fk-daterangepicker style hook when the date range picker isn't available on initial load
@@ -165,7 +166,9 @@ Creates a controller for a masked date range input.
165
166
 
166
167
  - **Mask and parsing**: Expects `00/00/0000 - 00/00/0000`. Parsing requires both dates to be complete (10 chars each) and valid per calendar rules.
167
168
  - **Validation**:
168
- - Validation is performed only when the input loses focus (on blur).
169
+ - No validation is reported until the input first loses focus (or is cleared), matching `useMaskedDateInput`'s required-field behavior.
170
+ - After that first blur, `validComputed`, `reason`, and `validationMessage` all update live from the same source, so the invalid styling and the error text always appear and clear together.
171
+ - `valid` (the managed ref mirrored into `externalValid`) is still committed on blur/clear. Bind `:valid="validComputed"` for the live-after-blur styling.
169
172
  - Each side must be a valid date (including month/day bounds like Feb 29).
170
173
  - Clamped to `min`/`max` if provided; outside results in `value=null`.
171
174
  - Ordered range required unless `allowReverse=true`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@featherk/composables",
3
- "version": "0.9.8",
3
+ "version": "0.10.0",
4
4
  "main": "dist/featherk-composables.umd.js",
5
5
  "module": "dist/featherk-composables.es.js",
6
6
  "types": "dist/index.d.ts",