@onereach/ui-components-common 19.3.0-beta.5089.0 → 19.8.0-beta.5092.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.
@@ -1,4 +1,4 @@
1
1
  import { ComputedRef, Ref } from 'vue';
2
2
  import { DateFormat, FormatFunction, Locale, ModelValue } from '../types';
3
3
  export type UseDateMaskReturn = ComputedRef<string>;
4
- export declare const useDateMask: (format: Ref<`${DateFormat}` | FormatFunction<ModelValue<Date>>>, locale: Ref<`${Locale}`>) => UseDateMaskReturn;
4
+ export declare const useDateMask: (format: Ref<`${DateFormat}` | FormatFunction<ModelValue<Date>>>, locale: Ref<Locale>) => UseDateMaskReturn;
@@ -1,4 +1,4 @@
1
1
  import { ComputedRef, Ref } from 'vue';
2
2
  import { Locale } from '../types';
3
- export type UseLocaleReturn = ComputedRef<`${Locale}`>;
4
- export declare const useLocale: (locale: Ref<`${Locale}` | undefined>) => UseLocaleReturn;
3
+ export type UseLocaleReturn = ComputedRef<Locale>;
4
+ export declare const useLocale: (locale: Ref<Locale | undefined>) => UseLocaleReturn;
@@ -1,4 +1,4 @@
1
1
  import { ComputedRef, Ref } from 'vue';
2
2
  import { FormatFunction, Locale, ModelValue, TimeFormat } from '../types';
3
3
  export type UseTimeMaskReturn = ComputedRef<string>;
4
- export declare const useTimeMask: (format: Ref<`${TimeFormat}` | FormatFunction<ModelValue<Date>>>, locale: Ref<`${Locale}`>) => UseTimeMaskReturn;
4
+ export declare const useTimeMask: (format: Ref<`${TimeFormat}` | FormatFunction<ModelValue<Date>>>, locale: Ref<Locale>) => UseTimeMaskReturn;
@@ -1,3 +1,3 @@
1
1
  import { InjectionKey } from 'vue';
2
2
  import { Locale } from '../types';
3
- export declare const LOCALE: InjectionKey<`${Locale}`>;
3
+ export declare const LOCALE: InjectionKey<Locale>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/ui-components-common",
3
- "version": "19.3.0-beta.5089.0",
3
+ "version": "19.8.0-beta.5092.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -5,7 +5,7 @@ export type UseDateMaskReturn = ComputedRef<string>;
5
5
 
6
6
  export const useDateMask = (
7
7
  format: Ref<`${DateFormat}` | FormatFunction<ModelValue<Date>>>,
8
- locale: Ref<`${Locale}`>
8
+ locale: Ref<Locale>
9
9
  ): UseDateMaskReturn => {
10
10
  return computed(() => {
11
11
  if (typeof format.value !== 'function') {
@@ -2,10 +2,10 @@ import { ComputedRef, Ref, computed, inject } from 'vue';
2
2
  import { LOCALE } from '../tokens';
3
3
  import { Locale } from '../types';
4
4
 
5
- export type UseLocaleReturn = ComputedRef<`${Locale}`>;
5
+ export type UseLocaleReturn = ComputedRef<Locale>;
6
6
 
7
7
  export const useLocale = (
8
- locale: Ref<`${Locale}` | undefined>
8
+ locale: Ref<Locale | undefined>
9
9
  ): UseLocaleReturn => {
10
10
  return computed(() => {
11
11
  return locale.value ?? inject(LOCALE, navigator.language);
@@ -5,7 +5,7 @@ export type UseTimeMaskReturn = ComputedRef<string>;
5
5
 
6
6
  export const useTimeMask = (
7
7
  format: Ref<`${TimeFormat}` | FormatFunction<ModelValue<Date>>>,
8
- locale: Ref<`${Locale}`>
8
+ locale: Ref<Locale>
9
9
  ): UseTimeMaskReturn => {
10
10
  return computed(() => {
11
11
  if (typeof format.value !== 'function') {
@@ -1,4 +1,4 @@
1
1
  import { InjectionKey } from 'vue';
2
2
  import { Locale } from '../types';
3
3
 
4
- export const LOCALE: InjectionKey<`${Locale}`> = Symbol();
4
+ export const LOCALE: InjectionKey<Locale> = Symbol();