addon-ui 0.4.1 → 0.4.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.
- package/dist-types/components/Avatar/Avatar.d.ts +14 -0
- package/dist-types/components/Avatar/index.d.ts +3 -0
- package/dist-types/components/Avatar/types.d.ts +11 -0
- package/dist-types/components/BaseButton/BaseButton.d.ts +11 -0
- package/dist-types/components/BaseButton/index.d.ts +2 -0
- package/dist-types/components/Button/Button.d.ts +12 -0
- package/dist-types/components/Button/index.d.ts +3 -0
- package/dist-types/components/Button/types.d.ts +22 -0
- package/dist-types/components/Checkbox/Checkbox.d.ts +15 -0
- package/dist-types/components/Checkbox/index.d.ts +3 -0
- package/dist-types/components/Checkbox/types.d.ts +14 -0
- package/dist-types/components/Dialog/Dialog.d.ts +14 -0
- package/dist-types/components/Dialog/index.d.ts +2 -0
- package/dist-types/components/Drawer/Drawer.d.ts +10 -0
- package/dist-types/components/Drawer/index.d.ts +3 -0
- package/dist-types/components/Drawer/types.d.ts +7 -0
- package/dist-types/components/Footer/Footer.d.ts +13 -0
- package/dist-types/components/Footer/index.d.ts +2 -0
- package/dist-types/components/Header/Header.d.ts +17 -0
- package/dist-types/components/Header/index.d.ts +2 -0
- package/dist-types/components/Highlight/Highlight.d.ts +9 -0
- package/dist-types/components/Highlight/index.d.ts +3 -0
- package/dist-types/components/Highlight/types.d.ts +6 -0
- package/dist-types/components/Icon/Icon.d.ts +8 -0
- package/dist-types/components/Icon/index.d.ts +2 -0
- package/dist-types/components/IconButton/IconButton.d.ts +13 -0
- package/dist-types/components/IconButton/index.d.ts +3 -0
- package/dist-types/components/IconButton/types.d.ts +16 -0
- package/dist-types/components/List/List.d.ts +8 -0
- package/dist-types/components/List/index.d.ts +2 -0
- package/dist-types/components/ListItem/ListItem.d.ts +21 -0
- package/dist-types/components/ListItem/index.d.ts +2 -0
- package/dist-types/components/Modal/Modal.d.ts +14 -0
- package/dist-types/components/Modal/index.d.ts +3 -0
- package/dist-types/components/Modal/types.d.ts +11 -0
- package/dist-types/components/Odometer/Odometer.d.ts +9 -0
- package/dist-types/components/Odometer/hooks/useOdometer.d.ts +10 -0
- package/dist-types/components/Odometer/index.d.ts +3 -0
- package/dist-types/components/ScrollArea/ScrollArea.d.ts +14 -0
- package/dist-types/components/ScrollArea/index.d.ts +2 -0
- package/dist-types/components/SvgSprite/SvgSprite.d.ts +7 -0
- package/dist-types/components/SvgSprite/index.d.ts +2 -0
- package/dist-types/components/Switch/Switch.d.ts +8 -0
- package/dist-types/components/Switch/index.d.ts +2 -0
- package/dist-types/components/Tag/Tag.d.ts +12 -0
- package/dist-types/components/Tag/index.d.ts +3 -0
- package/dist-types/components/Tag/types.d.ts +21 -0
- package/dist-types/components/TextArea/TextArea.d.ts +18 -0
- package/dist-types/components/TextArea/index.d.ts +3 -0
- package/dist-types/components/TextArea/types.d.ts +17 -0
- package/dist-types/components/TextField/TextField.d.ts +26 -0
- package/dist-types/components/TextField/index.d.ts +3 -0
- package/dist-types/components/TextField/types.d.ts +22 -0
- package/dist-types/components/Toast/Toast.d.ts +24 -0
- package/dist-types/components/Toast/index.d.ts +3 -0
- package/dist-types/components/Toast/types.d.ts +19 -0
- package/dist-types/components/Tooltip/Tooltip.d.ts +13 -0
- package/dist-types/components/Tooltip/index.d.ts +2 -0
- package/dist-types/components/View/View.d.ts +12 -0
- package/dist-types/components/View/index.d.ts +2 -0
- package/dist-types/components/ViewDrawer/ViewDrawer.d.ts +7 -0
- package/dist-types/components/ViewDrawer/index.d.ts +2 -0
- package/dist-types/components/ViewModal/ViewModal.d.ts +7 -0
- package/dist-types/components/ViewModal/index.d.ts +2 -0
- package/dist-types/components/Viewport/Provider.d.ts +8 -0
- package/dist-types/components/Viewport/context.d.ts +19 -0
- package/dist-types/components/Viewport/index.d.ts +3 -0
- package/dist-types/components/index.d.ts +28 -0
- package/dist-types/components/types.d.ts +28 -0
- package/dist-types/config/default.d.ts +4 -0
- package/dist-types/config/index.d.ts +4 -0
- package/dist-types/index.d.ts +4 -0
- package/dist-types/plugin/builder/ConfigBuilder.d.ts +9 -0
- package/dist-types/plugin/builder/StyleBuilder.d.ts +8 -0
- package/dist-types/plugin/builder/virtual.config.d.ts +3 -0
- package/dist-types/plugin/finder/ConfigFinder.d.ts +9 -0
- package/dist-types/plugin/finder/Finder.d.ts +22 -0
- package/dist-types/plugin/finder/StyleFinder.d.ts +9 -0
- package/dist-types/plugin/index.d.ts +10 -0
- package/dist-types/plugin/types.d.ts +8 -0
- package/dist-types/providers/extra/ExtraProvider.d.ts +5 -0
- package/dist-types/providers/extra/context.d.ts +7 -0
- package/dist-types/providers/extra/index.d.ts +3 -0
- package/dist-types/providers/icons/IconsProvider.d.ts +5 -0
- package/dist-types/providers/icons/context.d.ts +9 -0
- package/dist-types/providers/icons/index.d.ts +3 -0
- package/dist-types/providers/index.d.ts +5 -0
- package/dist-types/providers/theme/ThemeProvider.d.ts +9 -0
- package/dist-types/providers/theme/ThemeStorage.d.ts +13 -0
- package/dist-types/providers/theme/context.d.ts +12 -0
- package/dist-types/providers/theme/index.d.ts +4 -0
- package/dist-types/providers/ui/UIProvider.d.ts +12 -0
- package/dist-types/providers/ui/index.d.ts +2 -0
- package/dist-types/types/config.d.ts +12 -0
- package/dist-types/types/theme.d.ts +11 -0
- package/dist-types/utils/index.d.ts +3 -0
- package/dist-types/utils/react.d.ts +5 -0
- package/dist-types/utils/utils.d.ts +8 -0
- package/package.json +34 -22
- package/src/types/shims/addon-ui-config.d.ts +5 -0
- package/src/types/vendors/odometer.d.ts +17 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
import { TooltipContentProps, TooltipProps as TooltipRootProps } from "@radix-ui/react-tooltip";
|
|
3
|
+
export interface TooltipProps extends TooltipRootProps, Omit<TooltipContentProps, "content"> {
|
|
4
|
+
content: ReactNode;
|
|
5
|
+
arrowWidth?: number;
|
|
6
|
+
arrowHeight?: number;
|
|
7
|
+
matchTriggerWidth?: boolean;
|
|
8
|
+
arrowClassName?: string;
|
|
9
|
+
contentClassName?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const _default: React.NamedExoticComponent<TooltipProps & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
export default _default;
|
|
13
|
+
//# sourceMappingURL=Tooltip.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { HeaderProps } from "../Header";
|
|
3
|
+
export interface ViewProps extends HeaderProps {
|
|
4
|
+
center?: boolean;
|
|
5
|
+
showSeparate?: boolean;
|
|
6
|
+
bodyClassName?: string;
|
|
7
|
+
headerClassName?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const viewPropsKeys: Set<keyof ViewProps>;
|
|
10
|
+
declare const _default: React.NamedExoticComponent<ViewProps>;
|
|
11
|
+
export default _default;
|
|
12
|
+
//# sourceMappingURL=View.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { DrawerProps } from "../Drawer";
|
|
3
|
+
import { ViewProps } from "../View";
|
|
4
|
+
export type ViewDrawerProps = Omit<DrawerProps, "title"> & ViewProps;
|
|
5
|
+
declare const _default: React.NamedExoticComponent<ViewDrawerProps>;
|
|
6
|
+
export default _default;
|
|
7
|
+
//# sourceMappingURL=ViewDrawer.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ModalProps } from "../Modal";
|
|
3
|
+
import { ViewProps } from "../View";
|
|
4
|
+
export type ViewModalProps = Omit<ModalProps, "title"> & ViewProps;
|
|
5
|
+
declare const _default: React.NamedExoticComponent<ViewModalProps>;
|
|
6
|
+
export default _default;
|
|
7
|
+
//# sourceMappingURL=ViewModal.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React, { ComponentProps } from "react";
|
|
2
|
+
import { ViewportMode } from "./context";
|
|
3
|
+
export type ViewportProps = ComponentProps<"div"> & {
|
|
4
|
+
mode?: ViewportMode;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<React.PropsWithChildren<ViewportProps>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export default _default;
|
|
8
|
+
//# sourceMappingURL=Provider.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare enum ViewportMode {
|
|
2
|
+
Fixed = "fixed",
|
|
3
|
+
Adaptive = "adaptive",
|
|
4
|
+
Expanded = "expanded"
|
|
5
|
+
}
|
|
6
|
+
export type ViewportSize = number | string;
|
|
7
|
+
export type ViewportSizes = {
|
|
8
|
+
height?: ViewportSize;
|
|
9
|
+
width?: ViewportSize;
|
|
10
|
+
};
|
|
11
|
+
export interface ViewportContract {
|
|
12
|
+
mode: ViewportMode;
|
|
13
|
+
setMode(mode: ViewportMode): void;
|
|
14
|
+
setSizes(sizes: ViewportSizes): void;
|
|
15
|
+
resetSizes(): void;
|
|
16
|
+
}
|
|
17
|
+
export declare const ViewportContext: import("react").Context<ViewportContract>;
|
|
18
|
+
export declare const useViewport: () => ViewportContract;
|
|
19
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export * from "./Avatar";
|
|
2
|
+
export * from "./BaseButton";
|
|
3
|
+
export * from "./Button";
|
|
4
|
+
export * from "./Checkbox";
|
|
5
|
+
export * from "./Dialog";
|
|
6
|
+
export * from "./Drawer";
|
|
7
|
+
export * from "./Footer";
|
|
8
|
+
export * from "./Header";
|
|
9
|
+
export * from "./Highlight";
|
|
10
|
+
export * from "./Icon";
|
|
11
|
+
export * from "./IconButton";
|
|
12
|
+
export * from "./List";
|
|
13
|
+
export * from "./ListItem";
|
|
14
|
+
export * from "./Modal";
|
|
15
|
+
export * from "./Odometer";
|
|
16
|
+
export * from "./ScrollArea";
|
|
17
|
+
export * from "./SvgSprite";
|
|
18
|
+
export * from "./Switch";
|
|
19
|
+
export * from "./Tag";
|
|
20
|
+
export * from "./TextArea";
|
|
21
|
+
export * from "./TextField";
|
|
22
|
+
export * from "./Toast";
|
|
23
|
+
export * from "./Tooltip";
|
|
24
|
+
export * from "./View";
|
|
25
|
+
export * from "./ViewDrawer";
|
|
26
|
+
export * from "./ViewModal";
|
|
27
|
+
export * from "./Viewport";
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { AvatarProps, ButtonProps, CheckboxProps, DialogProps, DrawerProps, FooterProps, HeaderProps, HighlightProps, IconProps, IconButtonProps, ListProps, ListItemProps, ModalProps, OdometerProps, ScrollAreaProps, SwitchProps, TagProps, TextAreaProps, TextFieldProps, ToastProps, TooltipProps, ViewProps, ViewDrawerProps, ViewModalProps } from "../components";
|
|
2
|
+
export interface ComponentsProps {
|
|
3
|
+
avatar?: Pick<AvatarProps, "size" | "radius" | "cursorPointer" | "delayMs">;
|
|
4
|
+
button?: Pick<ButtonProps, "variant" | "color" | "size" | "radius">;
|
|
5
|
+
checkbox?: Pick<CheckboxProps, "variant" | "size" | "radius" | "checkedIcon" | "indeterminateIcon">;
|
|
6
|
+
dialog?: DialogProps;
|
|
7
|
+
drawer?: DrawerProps;
|
|
8
|
+
footer?: FooterProps;
|
|
9
|
+
header?: Pick<HeaderProps, "alignCenter" | "before" | "after">;
|
|
10
|
+
highlight?: HighlightProps;
|
|
11
|
+
icon?: Omit<IconProps, "name">;
|
|
12
|
+
iconButton?: Pick<IconButtonProps, "variant" | "size" | "radius">;
|
|
13
|
+
list?: ListProps;
|
|
14
|
+
listItem?: ListItemProps;
|
|
15
|
+
modal?: ModalProps;
|
|
16
|
+
odometer?: Pick<OdometerProps, "auto" | "format" | "duration">;
|
|
17
|
+
scrollArea?: ScrollAreaProps;
|
|
18
|
+
switch?: SwitchProps;
|
|
19
|
+
tag?: Pick<TagProps, "variant" | "size" | "color" | "radius" | "clickable">;
|
|
20
|
+
textArea?: TextAreaProps;
|
|
21
|
+
textField?: TextFieldProps;
|
|
22
|
+
toast?: Pick<ToastProps, "side" | "duration" | "swipeDirection" | "swipeThreshold" | "closeProps" | "closeIcon" | "fullWidth" | "sticky" | "radius" | "color">;
|
|
23
|
+
tooltip?: TooltipProps;
|
|
24
|
+
view?: ViewProps;
|
|
25
|
+
viewDrawer?: ViewDrawerProps;
|
|
26
|
+
viewModal?: ViewModalProps;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Finder from "../finder/Finder";
|
|
2
|
+
import type { BuilderContract } from "../types";
|
|
3
|
+
export default class ConfigBuilder implements BuilderContract {
|
|
4
|
+
protected finder: Finder;
|
|
5
|
+
protected template: string;
|
|
6
|
+
constructor(finder: Finder);
|
|
7
|
+
build(): string;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=ConfigBuilder.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import Finder from "../finder/Finder";
|
|
2
|
+
import type { BuilderContract } from "../types";
|
|
3
|
+
export default class StyleBuilder implements BuilderContract {
|
|
4
|
+
protected finder: Finder;
|
|
5
|
+
constructor(finder: Finder);
|
|
6
|
+
build(): string;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=StyleBuilder.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Finder from "./Finder";
|
|
2
|
+
import type { ReadonlyConfig } from "adnbn";
|
|
3
|
+
import type { FileImportInfo } from "../types";
|
|
4
|
+
export default class ConfigFinder extends Finder {
|
|
5
|
+
protected getAllowedExtensions(): string[];
|
|
6
|
+
constructor(fileName: string, config: ReadonlyConfig);
|
|
7
|
+
protected getFile(dirPath: string): FileImportInfo | undefined;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=ConfigFinder.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ReadonlyConfig } from "adnbn";
|
|
2
|
+
import type { FileImportInfo } from "../types";
|
|
3
|
+
export interface FinderOptions {
|
|
4
|
+
searchDirs: string[];
|
|
5
|
+
fileName: string;
|
|
6
|
+
canMerge: boolean;
|
|
7
|
+
}
|
|
8
|
+
export default abstract class Finder {
|
|
9
|
+
protected readonly fileName: string;
|
|
10
|
+
protected readonly config: ReadonlyConfig;
|
|
11
|
+
protected abstract getAllowedExtensions(): string[];
|
|
12
|
+
protected abstract getFile(dirPath: string): FileImportInfo | undefined;
|
|
13
|
+
protected searchDirs: string[];
|
|
14
|
+
protected canMerge: boolean;
|
|
15
|
+
protected constructor(fileName: string, config: ReadonlyConfig);
|
|
16
|
+
setCanMerge(canMerge: boolean): this;
|
|
17
|
+
setSearchDirs(searchDirs: string[]): this;
|
|
18
|
+
getFiles(): FileImportInfo[];
|
|
19
|
+
protected resolveFileWithExtensions(basePath: string, fileName: string): string | undefined;
|
|
20
|
+
protected toImportPath(fullPath: string, withExt?: boolean): string;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=Finder.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ReadonlyConfig } from "adnbn";
|
|
2
|
+
import Finder from "./Finder";
|
|
3
|
+
import type { FileImportInfo } from "../types";
|
|
4
|
+
export default class StyleFinder extends Finder {
|
|
5
|
+
protected getAllowedExtensions(): string[];
|
|
6
|
+
constructor(fileName: string, config: ReadonlyConfig);
|
|
7
|
+
protected getFile(dirPath: string): FileImportInfo | undefined;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=StyleFinder.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface PluginOptions {
|
|
2
|
+
themeDir?: string;
|
|
3
|
+
configFileName?: string;
|
|
4
|
+
styleFileName?: string;
|
|
5
|
+
mergeConfig?: boolean;
|
|
6
|
+
mergeStyles?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const _default: import("adnbn").PluginDefinition<[options?: PluginOptions | undefined]>;
|
|
9
|
+
export default _default;
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ExtraProps } from "../../types/config";
|
|
2
|
+
export interface ExtraContract {
|
|
3
|
+
extra: ExtraProps;
|
|
4
|
+
}
|
|
5
|
+
export declare const ExtraContext: import("react").Context<ExtraContract>;
|
|
6
|
+
export declare const useExtra: () => ExtraProps;
|
|
7
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Icons } from "../../types/config";
|
|
2
|
+
export interface IconsContract {
|
|
3
|
+
icons: Icons;
|
|
4
|
+
registeredIconNames: string[];
|
|
5
|
+
registerIcon: (name: string) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const IconsContext: import("react").Context<IconsContract>;
|
|
8
|
+
export declare const useIcons: () => IconsContract;
|
|
9
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FC, PropsWithChildren } from "react";
|
|
2
|
+
import { ThemeStorageContract } from "../../types/theme";
|
|
3
|
+
import { Config } from "../../types/config";
|
|
4
|
+
export interface ThemeProviderProps extends Pick<Config, "components"> {
|
|
5
|
+
storage?: ThemeStorageContract | true;
|
|
6
|
+
}
|
|
7
|
+
declare const ThemeProvider: FC<PropsWithChildren<ThemeProviderProps>>;
|
|
8
|
+
export default ThemeProvider;
|
|
9
|
+
//# sourceMappingURL=ThemeProvider.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { StorageProvider } from "@addon-core/storage";
|
|
2
|
+
import { Theme, ThemeStorageContract } from "../../types/theme";
|
|
3
|
+
export type ThemeStorageState = Record<string, Theme>;
|
|
4
|
+
export default class implements ThemeStorageContract {
|
|
5
|
+
protected storage: StorageProvider<ThemeStorageState>;
|
|
6
|
+
protected key: string;
|
|
7
|
+
constructor(storage?: StorageProvider<ThemeStorageState>, key?: string);
|
|
8
|
+
get(): Promise<Theme | undefined>;
|
|
9
|
+
change(theme: Theme): Promise<void>;
|
|
10
|
+
toggle(): Promise<void>;
|
|
11
|
+
watch(callback: (theme: Theme) => void): () => void;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=ThemeStorage.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Theme } from "../../types/theme";
|
|
2
|
+
import { ComponentsProps } from "../../types/config";
|
|
3
|
+
export interface ThemeContract {
|
|
4
|
+
theme: Theme;
|
|
5
|
+
components: ComponentsProps;
|
|
6
|
+
changeTheme(theme: Theme): void;
|
|
7
|
+
toggleTheme(): void;
|
|
8
|
+
}
|
|
9
|
+
export declare const ThemeContext: import("react").Context<ThemeContract>;
|
|
10
|
+
export declare const useTheme: () => ThemeContract;
|
|
11
|
+
export declare const useComponentProps: <K extends keyof ComponentsProps>(key: K) => ComponentsProps[K];
|
|
12
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FC, PropsWithChildren } from "react";
|
|
2
|
+
import { ThemeProviderProps } from "../theme";
|
|
3
|
+
import { Config } from "../../types/config";
|
|
4
|
+
import "./styles/default.scss";
|
|
5
|
+
import "./styles/reset.scss";
|
|
6
|
+
import "addon-ui-style.scss";
|
|
7
|
+
export interface UIProviderProps extends Partial<Config>, Pick<ThemeProviderProps, "storage"> {
|
|
8
|
+
view?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const UIProvider: FC<PropsWithChildren<UIProviderProps>>;
|
|
11
|
+
export default UIProvider;
|
|
12
|
+
//# sourceMappingURL=UIProvider.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SvgSpriteProps } from "../components";
|
|
2
|
+
import { ComponentsProps } from "../components/types";
|
|
3
|
+
export type { ComponentsProps };
|
|
4
|
+
export type Icons = SvgSpriteProps["icons"];
|
|
5
|
+
export interface ExtraProps {
|
|
6
|
+
}
|
|
7
|
+
export interface Config {
|
|
8
|
+
components: ComponentsProps;
|
|
9
|
+
extra: ExtraProps;
|
|
10
|
+
icons: Icons;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare enum Theme {
|
|
2
|
+
Light = "light",
|
|
3
|
+
Dark = "dark"
|
|
4
|
+
}
|
|
5
|
+
export interface ThemeStorageContract {
|
|
6
|
+
get: () => Promise<Theme | undefined>;
|
|
7
|
+
change: (theme: Theme) => Promise<void>;
|
|
8
|
+
toggle: () => Promise<void>;
|
|
9
|
+
watch: (callback: (theme: Theme) => void) => () => void;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { JSX, ReactNode } from "react";
|
|
2
|
+
export declare const cloneOrCreateElement: <T extends keyof JSX.IntrinsicElements>(element: ReactNode, props?: JSX.IntrinsicElements[T], wrapperTag?: T) => import("react").ReactElement<{
|
|
3
|
+
className?: string;
|
|
4
|
+
}, string | import("react").JSXElementConstructor<any>> | null;
|
|
5
|
+
//# sourceMappingURL=react.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const hideInTable: {
|
|
2
|
+
table: {
|
|
3
|
+
disable: boolean;
|
|
4
|
+
};
|
|
5
|
+
};
|
|
6
|
+
export declare const capitalizeFirstLetter: (text: string) => string;
|
|
7
|
+
export declare const splitProps: <T extends object>(props: Record<string, any>, keys: Set<keyof T>) => T;
|
|
8
|
+
//# sourceMappingURL=utils.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "addon-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.2",
|
|
5
5
|
"description": "A comprehensive React UI component library designed exclusively for the AddonBone browser extension framework with customizable theming and consistent design patterns",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"react",
|
|
@@ -27,43 +27,57 @@
|
|
|
27
27
|
"bugs": {
|
|
28
28
|
"url": "https://github.com/addon-stack/addon-ui/issues"
|
|
29
29
|
},
|
|
30
|
-
"types": "./
|
|
31
|
-
"typesVersions": {
|
|
32
|
-
"*": {
|
|
33
|
-
".": [
|
|
34
|
-
"./src/index.ts"
|
|
35
|
-
],
|
|
36
|
-
"config": [
|
|
37
|
-
"./src/config/index.ts"
|
|
38
|
-
],
|
|
39
|
-
"plugin": [
|
|
40
|
-
"./src/plugin/index.ts"
|
|
41
|
-
]
|
|
42
|
-
}
|
|
43
|
-
},
|
|
30
|
+
"types": "./dist-types/index.d.ts",
|
|
44
31
|
"exports": {
|
|
45
|
-
".":
|
|
46
|
-
|
|
47
|
-
|
|
32
|
+
".": {
|
|
33
|
+
"types": "./dist-types/index.d.ts",
|
|
34
|
+
"default": "./src/index.ts"
|
|
35
|
+
},
|
|
36
|
+
"./config": {
|
|
37
|
+
"types": "./dist-types/config/index.d.ts",
|
|
38
|
+
"default": "./src/config/index.ts"
|
|
39
|
+
},
|
|
40
|
+
"./plugin": {
|
|
41
|
+
"types": "./dist-types/plugin/index.d.ts",
|
|
42
|
+
"default": "./src/plugin/index.ts"
|
|
43
|
+
},
|
|
48
44
|
"./theme": "./src/styles/mixins.scss"
|
|
49
45
|
},
|
|
50
46
|
"sideEffects": [
|
|
51
47
|
"*.css",
|
|
52
48
|
"*.scss"
|
|
53
49
|
],
|
|
50
|
+
"files": [
|
|
51
|
+
"src",
|
|
52
|
+
"!src/**/*.stories.*",
|
|
53
|
+
"!src/**/*.story.*",
|
|
54
|
+
"!src/**/*.mdx",
|
|
55
|
+
"!src/**/__stories__/**",
|
|
56
|
+
"!src/**/*.test.*",
|
|
57
|
+
"!src/**/*.spec.*",
|
|
58
|
+
"!src/**/__tests__/**",
|
|
59
|
+
"!src/**/__mocks__/**",
|
|
60
|
+
"dist-types/**/*.d.ts",
|
|
61
|
+
"README.md",
|
|
62
|
+
"LICENSE.md"
|
|
63
|
+
],
|
|
54
64
|
"scripts": {
|
|
55
65
|
"lint": "eslint .",
|
|
56
66
|
"format": "prettier --write .",
|
|
57
67
|
"storybook": "storybook dev -p 6006",
|
|
58
|
-
"build
|
|
68
|
+
"build:storybook": "storybook build",
|
|
59
69
|
"test": "jest",
|
|
60
70
|
"test:ci": "jest --ci --passWithNoTests --coverage",
|
|
61
71
|
"test:related": "jest --bail --passWithNoTests",
|
|
62
72
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
73
|
+
"build:types": "tsc -p tsconfig.build.json",
|
|
63
74
|
"release": "release-it",
|
|
64
|
-
"release:preview": "release-it --no-github.release --no-npm.publish --no-git.tag --ci"
|
|
75
|
+
"release:preview": "release-it --no-github.release --no-npm.publish --no-git.tag --ci",
|
|
76
|
+
"prepublishOnly": "npm run build:types"
|
|
65
77
|
},
|
|
66
78
|
"dependencies": {
|
|
79
|
+
"@types/autosize": "^4.0.3",
|
|
80
|
+
"@types/react-highlight-words": "^0.20.0",
|
|
67
81
|
"autosize": "^6.0.1",
|
|
68
82
|
"classnames": "^2.5.1",
|
|
69
83
|
"odometer": "^0.4.8",
|
|
@@ -81,11 +95,9 @@
|
|
|
81
95
|
"@eslint/js": "^9.21.0",
|
|
82
96
|
"@rsbuild/plugin-sass": "^1.4.0",
|
|
83
97
|
"@storybook/react": "^9.1.3",
|
|
84
|
-
"@types/autosize": "^4.0.3",
|
|
85
98
|
"@types/node": "^22.13.10",
|
|
86
99
|
"@types/react": "^19.0.10",
|
|
87
100
|
"@types/react-dom": "^19.0.4",
|
|
88
|
-
"@types/react-highlight-words": "^0.20.0",
|
|
89
101
|
"adnbn": "^0.4.2",
|
|
90
102
|
"depcheck": "^1.4.7",
|
|
91
103
|
"eslint": "^9.21.0",
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare module "odometer" {
|
|
2
|
+
interface OdometerOptions {
|
|
3
|
+
el: Element;
|
|
4
|
+
value?: number;
|
|
5
|
+
format?: string;
|
|
6
|
+
theme?: string;
|
|
7
|
+
duration?: number;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export default class Odometer {
|
|
11
|
+
constructor(options: OdometerOptions);
|
|
12
|
+
|
|
13
|
+
value: number;
|
|
14
|
+
|
|
15
|
+
update(newValue: number): void;
|
|
16
|
+
}
|
|
17
|
+
}
|