@huponx/x-core-ui 0.1.0 → 0.1.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.
@@ -0,0 +1,9 @@
1
+ export type ChartPoint = Record<string, string | number>;
2
+ export type ChartProps = {
3
+ type?: "line" | "bar" | "area";
4
+ data: ChartPoint[];
5
+ xKey: string;
6
+ yKey: string;
7
+ height?: number;
8
+ };
9
+ export declare function Chart({ type, data, xKey, yKey, height, }: ChartProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export declare function useMediaQuery(query: string): boolean;
2
+ export declare function useIsMdUp(): boolean;
@@ -0,0 +1,17 @@
1
+ import { type ReactNode } from "react";
2
+ import type { Locale as DateFnsLocale } from "date-fns";
3
+ import { type Locale, type MessageKey, type Messages } from "./messages";
4
+ type I18nContextValue = {
5
+ locale: Locale;
6
+ setLocale: (locale: Locale) => void;
7
+ t: (key: MessageKey) => string;
8
+ dateLocale: DateFnsLocale;
9
+ };
10
+ export declare function I18nProvider({ children, locale: localeProp, messages: overrides, storageKey, }: {
11
+ children: ReactNode;
12
+ locale?: Locale;
13
+ messages?: Partial<Record<Locale, Partial<Messages>>>;
14
+ storageKey?: string;
15
+ }): import("react").JSX.Element;
16
+ export declare function useI18n(): I18nContextValue;
17
+ export {};
@@ -0,0 +1,6 @@
1
+ export type Locale = "vi" | "en";
2
+ export type MessageKey = "close" | "openMenu" | "search" | "empty" | "loading" | "pickDate" | "pickTime" | "hours" | "minutes" | "today" | "clear" | "confirm" | "progress" | "themeDark" | "themeLight" | "language";
3
+ export type Messages = Record<MessageKey, string>;
4
+ export declare const vi: Messages;
5
+ export declare const en: Messages;
6
+ export declare const catalogs: Record<Locale, Messages>;
@@ -0,0 +1,28 @@
1
+ export { cn } from "./utils/cn";
2
+ export type { FieldProps, SelectItem, Size } from "./types";
3
+ export { I18nProvider, useI18n } from "./i18n/I18nProvider";
4
+ export type { Locale, MessageKey, Messages } from "./i18n/messages";
5
+ export { ThemeProvider, useTheme } from "./theme/ThemeProvider";
6
+ export type { Theme } from "./theme/ThemeProvider";
7
+ export { Button } from "./primitives/Button";
8
+ export type { ButtonProps, ButtonVariant } from "./primitives/Button";
9
+ export { Input } from "./primitives/Input";
10
+ export type { InputProps } from "./primitives/Input";
11
+ export { Textarea } from "./primitives/Textarea";
12
+ export type { TextareaProps } from "./primitives/Textarea";
13
+ export { Panel } from "./primitives/Panel";
14
+ export { ProgressBar } from "./primitives/ProgressBar";
15
+ export { Tabs } from "./primitives/Tabs";
16
+ export type { TabItem } from "./primitives/Tabs";
17
+ export { Dropdown } from "./overlays/Dropdown";
18
+ export type { DropdownProps } from "./overlays/Dropdown";
19
+ export { Autocomplete } from "./overlays/Autocomplete";
20
+ export type { AutocompleteProps } from "./overlays/Autocomplete";
21
+ export { DatePicker } from "./overlays/DatePicker";
22
+ export type { DatePickerProps } from "./overlays/DatePicker";
23
+ export { TimePicker } from "./overlays/TimePicker";
24
+ export type { TimePickerProps } from "./overlays/TimePicker";
25
+ export { DateTimePicker } from "./overlays/DateTimePicker";
26
+ export type { DateTimePickerProps } from "./overlays/DateTimePicker";
27
+ export { Chart } from "./chart/Chart";
28
+ export type { ChartPoint, ChartProps } from "./chart/Chart";