maz-ui 4.7.0-beta.1 → 4.7.0-beta.2

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.
@@ -5,7 +5,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
5
5
  __name: "MazUiProvider",
6
6
  props: {
7
7
  theme: {},
8
- translations: { default: () => ({}) }
8
+ translations: {}
9
9
  },
10
10
  setup(__props) {
11
11
  const i18n = createMazUiTranslations(__props.translations);
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/MazUiProvider.vue_vue_type_script_setup_true_lang.D7bdXnig.js";
1
+ import { _ as _sfc_main } from "../chunks/MazUiProvider.vue_vue_type_script_setup_true_lang.DtnM1DOn.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,25 +1,31 @@
1
1
  import { MazUiThemeOptions, ThemePreset } from '@maz-ui/themes';
2
- import { MazUiTranslationsOptions } from '@maz-ui/translations';
3
- export interface MazUiProviderProps {
2
+ import { MazUiTranslationsMessages, MazUiTranslationsOptions } from '@maz-ui/translations';
3
+ export type MazUiProviderTranslations<T extends string = string> = Omit<MazUiTranslationsOptions, 'messages' | 'locale'> & {
4
+ locale: T;
5
+ messages: MazUiTranslationsMessages & Record<T, MazUiTranslationsMessages[string]>;
6
+ };
7
+ export interface MazUiProviderProps<T extends string = string> {
4
8
  theme: MazUiThemeOptions & {
5
9
  preset: ThemePreset;
6
10
  };
7
- translations?: MazUiTranslationsOptions;
11
+ /**
12
+ * Must include `locale` and at least the messages for that locale in `messages`
13
+ * @example { locale: 'fr', messages: { fr: { ... } } }
14
+ */
15
+ translations: MazUiProviderTranslations<T>;
8
16
  }
9
- declare function __VLS_template(): {
10
- attrs: Partial<{}>;
17
+ declare const _default: <TLocale extends string>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
18
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, never> & MazUiProviderProps<TLocale> & Partial<{}>> & import('vue').PublicProps;
19
+ expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
20
+ attrs: any;
11
21
  slots: {
12
22
  default?(_: {}): any;
13
23
  };
14
- refs: {};
15
- rootEl: any;
24
+ emit: {};
25
+ }>) => import('vue').VNode & {
26
+ __ctx?: Awaited<typeof __VLS_setup>;
16
27
  };
17
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
18
- declare const __VLS_component: import('vue').DefineComponent<MazUiProviderProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<MazUiProviderProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
19
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
20
28
  export default _default;
21
- type __VLS_WithTemplateSlots<T, S> = T & {
22
- new (): {
23
- $slots: S;
24
- };
25
- };
29
+ type __VLS_PrettifyLocal<T> = {
30
+ [K in keyof T]: T[K];
31
+ } & {};
@@ -117,5 +117,5 @@ export { default as MazTabsContentItem } from './MazTabsContentItem.vue';
117
117
  export { default as MazTextarea } from './MazTextarea.vue';
118
118
  export type { MazTextareaProps } from './MazTextarea.vue';
119
119
  export { default as MazUiProvider } from './MazUiProvider.vue';
120
- export type { MazUiProviderProps } from './MazUiProvider.vue';
120
+ export type { MazUiProviderProps, MazUiProviderTranslations } from './MazUiProvider.vue';
121
121
  export type { MazColor, MazSize } from './types';
@@ -59,7 +59,7 @@ import { default as default54 } from "./MazTabsBar.js";
59
59
  import { _ as _6 } from "../chunks/MazTabsContent.vue_vue_type_script_setup_true_lang.LRxpitR5.js";
60
60
  import { default as default55 } from "./MazTabsContentItem.js";
61
61
  import { default as default56 } from "./MazTextarea.js";
62
- import { _ as _7 } from "../chunks/MazUiProvider.vue_vue_type_script_setup_true_lang.D7bdXnig.js";
62
+ import { _ as _7 } from "../chunks/MazUiProvider.vue_vue_type_script_setup_true_lang.DtnM1DOn.js";
63
63
  export {
64
64
  default2 as MazAccordion,
65
65
  default3 as MazAlert,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "maz-ui",
3
3
  "type": "module",
4
- "version": "4.7.0-beta.1",
4
+ "version": "4.7.0-beta.2",
5
5
  "description": "A standalone components library for Vue.Js 3 & Nuxt.Js 3",
6
6
  "author": "Louis Mazel <me@loicmazuel.com>",
7
7
  "license": "MIT",
@@ -161,10 +161,10 @@
161
161
  "valibot": "^1.2.0",
162
162
  "vue-chartjs": "^5.3.3",
163
163
  "@maz-ui/cli": "4.7.0-beta.0",
164
- "@maz-ui/icons": "4.7.0-beta.0",
165
164
  "@maz-ui/themes": "4.7.0-beta.1",
166
- "@maz-ui/translations": "4.7.0-beta.1",
167
- "@maz-ui/utils": "4.7.0-beta.1"
165
+ "@maz-ui/icons": "4.7.0-beta.0",
166
+ "@maz-ui/utils": "4.7.0-beta.1",
167
+ "@maz-ui/translations": "4.7.0-beta.1"
168
168
  },
169
169
  "devDependencies": {
170
170
  "@vitejs/plugin-vue": "^6.0.4",