UNPKG

@oiij/naive-ui

Version:

Some Composable Functions And Components for Vue 3

171 lines (170 loc) 4.32 kB
import { Colors } from "./_helper.js"; import { ComputedRef, Ref } from "vue"; import { GlobalThemeOverrides, NDateLocale } from "naive-ui"; import * as naive_ui_es_themes_interface0 from "naive-ui/es/themes/interface"; //#region src/composables/useNaiveTheme.d.ts interface NaiveThemeOptions { language?: string | Ref<string>; darkMode?: boolean | Ref<boolean>; colors?: Colors; globalThemeOverrides?: GlobalThemeOverrides; } declare function useNaiveTheme(options?: NaiveThemeOptions): { language: Ref<string | undefined, string | undefined>; darkMode: Ref<boolean | undefined, boolean | undefined>; theme: ComputedRef<naive_ui_es_themes_interface0.BuiltInGlobalTheme | undefined>; themeOverrides: ComputedRef<GlobalThemeOverrides>; locale: ComputedRef<{ name: string; global: { undo: string; redo: string; confirm: string; clear: string; }; Popconfirm: { positiveText: string; negativeText: string; }; Cascader: { placeholder: string; loading: string; loadingRequiredMessage: (label: string) => string; }; Time: { dateFormat: string; dateTimeFormat: string; }; DatePicker: { yearFormat: string; monthFormat: string; dayFormat: string; yearTypeFormat: string; monthTypeFormat: string; dateFormat: string; dateTimeFormat: string; quarterFormat: string; weekFormat: string; clear: string; now: string; confirm: string; selectTime: string; selectDate: string; datePlaceholder: string; datetimePlaceholder: string; monthPlaceholder: string; yearPlaceholder: string; quarterPlaceholder: string; weekPlaceholder: string; startDatePlaceholder: string; endDatePlaceholder: string; startDatetimePlaceholder: string; endDatetimePlaceholder: string; startMonthPlaceholder: string; endMonthPlaceholder: string; monthBeforeYear: boolean; firstDayOfWeek: 0 | 1 | 2 | 3 | 4 | 5 | 6; today: string; }; DataTable: { checkTableAll: string; uncheckTableAll: string; confirm: string; clear: string; }; LegacyTransfer: { sourceTitle: string; targetTitle: string; }; Transfer: { selectAll: string; unselectAll: string; clearAll: string; total: (num: number) => string; selected: (num: number) => string; }; Empty: { description: string; }; Select: { placeholder: string; }; TimePicker: { placeholder: string; positiveText: string; negativeText: string; now: string; clear: string; }; Pagination: { goto: string; selectionSuffix: string; }; DynamicTags: { add: string; }; Log: { loading: string; }; Input: { placeholder: string; }; InputNumber: { placeholder: string; }; DynamicInput: { create: string; }; ThemeEditor: { title: string; clearAllVars: string; clearSearch: string; filterCompName: string; filterVarName: string; import: string; export: string; restore: string; }; Image: { tipPrevious: string; tipNext: string; tipCounterclockwise: string; tipClockwise: string; tipZoomOut: string; tipZoomIn: string; tipDownload: string; tipClose: string; tipOriginalSize: string; }; Heatmap: { less: string; more: string; monthFormat: string; weekdayFormat: string; }; }>; dateLocale: ComputedRef<NDateLocale>; color: Ref<{ primary?: string | undefined; info?: string | undefined; success?: string | undefined; warning?: string | undefined; error?: string | undefined; }, { primary?: string; info?: string; success?: string; warning?: string; error?: string; } | { primary?: string | undefined; info?: string | undefined; success?: string | undefined; warning?: string | undefined; error?: string | undefined; }>; setColor: (v: Partial<Colors>) => void; }; type NaiveThemeReturns = ReturnType<typeof useNaiveTheme>; //#endregion export { NaiveThemeReturns, useNaiveTheme };