@webx-ui/core 0.23.0 → 0.26.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.
@@ -0,0 +1,19 @@
1
+ import { RootProps } from '@vuepic/vue-datepicker';
2
+ /** What `@vuepic/vue-datepicker` wants for its language: a date-fns locale object. */
3
+ export type DateFnsLocale = NonNullable<RootProps['locale']>;
4
+ /**
5
+ * Builds a date-fns locale out of `Intl`.
6
+ *
7
+ * The picker bundles exactly one language — `en-US` — and takes any other as a date-fns
8
+ * locale object, so a panel in Russian gets an English calendar unless one is handed in.
9
+ * Reaching for `date-fns/locale` would mean a runtime dependency on date-fns and a chunk
10
+ * per language; the browser already carries every one of them, so the names come from
11
+ * `Intl.DateTimeFormat` and are shaped here into what date-fns reads.
12
+ *
13
+ * Only what the picker asks for is filled in honestly: month, weekday and day-period
14
+ * names, the era, and enough of `match` to parse a typed-in date back. Quarter names and
15
+ * ordinal suffixes have no `Intl` source and fall back to digits — the picker reaches for
16
+ * them only in a quarter picker and in a day cell's `aria-label`, where a bare number
17
+ * reads correctly in most languages anyway.
18
+ */
19
+ export declare function dateFnsLocale(tag: string): DateFnsLocale;