sit-onyx 1.0.0-beta.96 → 1.0.0-beta.98

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,46 @@
1
+ import type { OnyxModalDialogProps } from "./types";
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: Readonly<{
5
+ /**
6
+ * Dialog content.
7
+ */
8
+ default(): unknown;
9
+ /**
10
+ * Optional slot to override the headline with custom content.
11
+ */
12
+ headline?(bindings: Pick<OnyxModalDialogProps, "label">): unknown;
13
+ /**
14
+ * Optional slot to add custom content to the dialog header (below the headline).
15
+ */
16
+ subtitle?(): unknown;
17
+ }> & {
18
+ /**
19
+ * Dialog content.
20
+ */
21
+ default(): unknown;
22
+ /**
23
+ * Optional slot to override the headline with custom content.
24
+ */
25
+ headline?(bindings: Pick<OnyxModalDialogProps, "label">): unknown;
26
+ /**
27
+ * Optional slot to add custom content to the dialog header (below the headline).
28
+ */
29
+ subtitle?(): unknown;
30
+ };
31
+ refs: {};
32
+ rootEl: any;
33
+ };
34
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
35
+ declare const __VLS_component: import("vue").DefineComponent<OnyxModalDialogProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
36
+ close: () => any;
37
+ }, string, import("vue").PublicProps, Readonly<OnyxModalDialogProps> & Readonly<{
38
+ onClose?: (() => any) | undefined;
39
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
40
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
41
+ export default _default;
42
+ type __VLS_WithTemplateSlots<T, S> = T & {
43
+ new (): {
44
+ $slots: S;
45
+ };
46
+ };
@@ -0,0 +1,2 @@
1
+ import type { OnyxDialogProps } from "../OnyxDialog/types";
2
+ export type OnyxModalDialogProps = Omit<OnyxDialogProps, "modal">;
@@ -1,4 +1,4 @@
1
- import { type App, type ComputedRef, type InjectionKey, type MaybeRef } from "vue";
1
+ import { type App, type InjectionKey, type MaybeRef } from "vue";
2
2
  import type { FlattenedKeysOf } from "../types/i18n";
3
3
  import type { DeepPartial } from "../types/utils";
4
4
  import enUS from "./locales/en-US.json";
@@ -56,7 +56,7 @@ export type ProvideI18nOptions = {
56
56
  *
57
57
  * Note: If a custom `t` function is used, passed messages will not be used.
58
58
  */
59
- t?: ComputedRef<TranslationFunction>;
59
+ t?: MaybeRef<TranslationFunction>;
60
60
  };
61
61
  export type TranslationFunction = (key: OnyxTranslationKey,
62
62
  /** Named values to interpolate into the translation. The property `n` is special as it represents the number of elements for pluralization. */
@@ -68,23 +68,23 @@ export declare const I18N_INJECTION_KEY: InjectionKey<ReturnType<typeof createI1
68
68
  * Creates a new i18n instance.
69
69
  */
70
70
  declare const createI18n: (options?: ProvideI18nOptions) => {
71
- t: ComputedRef<TranslationFunction>;
72
- locale: ComputedRef<string>;
71
+ t: Readonly<import("vue").Ref<TranslationFunction, TranslationFunction>>;
72
+ locale: Readonly<import("vue").Ref<string, string>>;
73
73
  };
74
74
  /**
75
75
  * Provides a global i18n instance that is used by onyx.
76
76
  * Must only be called once in the `App.vue` file of a project that consumes onyx.
77
77
  */
78
78
  export declare const provideI18n: (app: App, options?: ProvideI18nOptions) => {
79
- t: ComputedRef<TranslationFunction>;
80
- locale: ComputedRef<string>;
79
+ t: Readonly<import("vue").Ref<TranslationFunction, TranslationFunction>>;
80
+ locale: Readonly<import("vue").Ref<string, string>>;
81
81
  };
82
82
  /**
83
83
  * Injects the onyx i18n instance.
84
84
  * Creates a fallback if provide was never called.
85
85
  */
86
86
  export declare const injectI18n: () => {
87
- t: ComputedRef<TranslationFunction>;
88
- locale: ComputedRef<string>;
87
+ t: Readonly<import("vue").Ref<TranslationFunction, TranslationFunction>>;
88
+ locale: Readonly<import("vue").Ref<string, string>>;
89
89
  };
90
90
  export {};