@yoyaflow/yoya-ui 0.1.0
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/LICENSE +21 -0
- package/README.md +198 -0
- package/README.zh-CN.md +199 -0
- package/dist/echarts.min.js +45 -0
- package/dist/yoya-ui.umd.js +35 -0
- package/dist/yoya.core.js +1674 -0
- package/dist/yoya.echart.js +636 -0
- package/dist/yoya.ssr.js +491 -0
- package/dist/yoya.ui.css +2010 -0
- package/dist/yoya.ui.js +11899 -0
- package/package.json +94 -0
- package/types/actions.d.ts +166 -0
- package/types/async.d.ts +58 -0
- package/types/chart.d.ts +40 -0
- package/types/core.d.ts +495 -0
- package/types/css.d.ts +5 -0
- package/types/data-display.d.ts +518 -0
- package/types/effects.d.ts +40 -0
- package/types/feedback.d.ts +119 -0
- package/types/form.d.ts +486 -0
- package/types/html.d.ts +288 -0
- package/types/i18n.d.ts +56 -0
- package/types/index.d.ts +4 -0
- package/types/layout.d.ts +429 -0
- package/types/navigation.d.ts +275 -0
- package/types/router.d.ts +123 -0
- package/types/ssr.d.ts +81 -0
- package/types/svg.d.ts +158 -0
- package/types/theme.d.ts +40 -0
- package/types/yoya.core.d.ts +7 -0
- package/types/yoya.echart.d.ts +4 -0
- package/types/yoya.ssr.d.ts +4 -0
- package/types/yoya.ui.d.ts +19 -0
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
ChildInput,
|
|
3
|
+
ElementFactory,
|
|
4
|
+
ElementNode,
|
|
5
|
+
ElementOptions,
|
|
6
|
+
SetupCallback,
|
|
7
|
+
SetupInput
|
|
8
|
+
} from './core.js';
|
|
9
|
+
import type { HtmlElementNode } from './html.js';
|
|
10
|
+
|
|
11
|
+
export type RouterMode = 'hash' | 'history';
|
|
12
|
+
|
|
13
|
+
export interface RouteContext {
|
|
14
|
+
path: string;
|
|
15
|
+
params: Record<string, string>;
|
|
16
|
+
query: Record<string, string>;
|
|
17
|
+
route: RouteDeclaration | null;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type RouteView = ChildInput | ((context: RouteContext) => ChildInput | Promise<ChildInput>);
|
|
21
|
+
|
|
22
|
+
export interface RouteConfig {
|
|
23
|
+
view?: RouteView;
|
|
24
|
+
component?: RouteView;
|
|
25
|
+
beforeEnter?: (context: RouteContext) => boolean | void | Promise<boolean | void>;
|
|
26
|
+
[key: string]: any;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface RouteDeclaration {
|
|
30
|
+
pattern: string;
|
|
31
|
+
config: RouteConfig | RouteView;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export type RouterGuard = (context: RouteContext) => boolean | void | Promise<boolean | void>;
|
|
35
|
+
|
|
36
|
+
export interface NavigateOptions {
|
|
37
|
+
replace?: boolean;
|
|
38
|
+
state?: unknown;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** Hash/history router as a view node. */
|
|
42
|
+
export class Router extends ElementNode {
|
|
43
|
+
default(path: string): Router;
|
|
44
|
+
mode(): RouterMode;
|
|
45
|
+
mode(value: RouterMode): Router;
|
|
46
|
+
route(pattern: string, config: RouteConfig | RouteView): Router;
|
|
47
|
+
/** Declarative route registration (available on vRouter instances). */
|
|
48
|
+
vRoute(pattern: string, config: RouteConfig | RouteView): Router;
|
|
49
|
+
notFound(view: RouteView): Router;
|
|
50
|
+
loading(view: RouteView): Router;
|
|
51
|
+
error(view: RouteView): Router;
|
|
52
|
+
beforeEach(guard: RouterGuard): Router;
|
|
53
|
+
start(): Router;
|
|
54
|
+
stop(): Router;
|
|
55
|
+
navigate(path: string, options?: NavigateOptions): Router;
|
|
56
|
+
refresh(): Router;
|
|
57
|
+
renderPath(path: string): Router;
|
|
58
|
+
currentPath(): string;
|
|
59
|
+
currentParams(): Record<string, string>;
|
|
60
|
+
currentQuery(): Record<string, string>;
|
|
61
|
+
currentRoute(): RouteDeclaration | null;
|
|
62
|
+
currentView(): ViewNodeLike | null;
|
|
63
|
+
outlet(): ElementNode;
|
|
64
|
+
outlet(value: ElementNode): Router;
|
|
65
|
+
subscribe(listener: (router: Router) => void): () => void;
|
|
66
|
+
go(delta: number): Router;
|
|
67
|
+
back(): Router;
|
|
68
|
+
forward(): Router;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/** Minimal node shape returned by currentView(). */
|
|
72
|
+
export interface ViewNodeLike {
|
|
73
|
+
toHTML(): string;
|
|
74
|
+
renderDom(): Node | null;
|
|
75
|
+
destroy(): unknown;
|
|
76
|
+
[key: string]: any;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/** Creates a router; alias of createRouter. */
|
|
80
|
+
export const router: typeof createRouter;
|
|
81
|
+
|
|
82
|
+
/** Creates a router with optional setup. */
|
|
83
|
+
export const createRouter: ElementFactory<Router> & {
|
|
84
|
+
(first?: SetupInput<Router> | null, callback?: SetupCallback<Router>): Router;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
/** Declares a route (used inside route lists). */
|
|
88
|
+
export function vRoute(pattern: string, config: RouteConfig | RouteView): RouteDeclaration;
|
|
89
|
+
|
|
90
|
+
/** Declarative router container. */
|
|
91
|
+
export const vRouter: ElementFactory<Router> & {
|
|
92
|
+
(first?: SetupInput<Router> | null, callback?: SetupCallback<Router>): Router;
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
/** Router link with to/params/query/replace/exact helpers. */
|
|
96
|
+
export function vLink(
|
|
97
|
+
routerInstance: Router,
|
|
98
|
+
setup?: SetupInput<HtmlElementNode> | null,
|
|
99
|
+
callback?: SetupCallback<HtmlElementNode>
|
|
100
|
+
): HtmlElementNode;
|
|
101
|
+
|
|
102
|
+
/** Current-route outlet bound to a router. */
|
|
103
|
+
export function vRouterView(
|
|
104
|
+
routerInstance: Router,
|
|
105
|
+
setup?: SetupInput<HtmlElementNode> | null,
|
|
106
|
+
callback?: SetupCallback<HtmlElementNode>
|
|
107
|
+
): HtmlElementNode;
|
|
108
|
+
|
|
109
|
+
/** Multi-outlet router view. */
|
|
110
|
+
export function vRouterViews(
|
|
111
|
+
routerInstance: Router,
|
|
112
|
+
setup?: SetupInput<HtmlElementNode> | null,
|
|
113
|
+
callback?: SetupCallback<HtmlElementNode>
|
|
114
|
+
): HtmlElementNode;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Parent-shortcut surface merged onto HtmlElementNode. Router shortcuts
|
|
118
|
+
* (vRouter/vLink/vRouterView/vRouterViews) live on ElementNode and are
|
|
119
|
+
* inherited; this interface is kept for the shared DSL merge point.
|
|
120
|
+
*/
|
|
121
|
+
export interface RouterParentShortcuts {}
|
|
122
|
+
|
|
123
|
+
export type { ElementOptions };
|
package/types/ssr.d.ts
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { ComponentLike, I18n, ViewNode } from './core.js';
|
|
2
|
+
|
|
3
|
+
export type PageFactory<S = unknown> = (state: S) => ViewNode | ComponentLike | PageFactory<S>;
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Optional i18n binding for render/mount/hydrate: an I18n instance, or a
|
|
7
|
+
* factory receiving the request state. When provided, the ".s()" string
|
|
8
|
+
* shortcut is automatically scoped to that instance during the build.
|
|
9
|
+
*/
|
|
10
|
+
export interface SsrI18nOption<S = unknown> {
|
|
11
|
+
i18n?: I18n | ((state: S | null) => I18n);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface RenderOptions<S = unknown> extends SsrI18nOption<S> {
|
|
15
|
+
maxNodes?: number;
|
|
16
|
+
state?: S | null;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface RenderResult {
|
|
20
|
+
exceeded: boolean;
|
|
21
|
+
html: string;
|
|
22
|
+
state: string | null;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** Raw request fields accepted by resolveLocale; extraction is done by the caller. */
|
|
26
|
+
export interface LocaleInput {
|
|
27
|
+
/** Raw Cookie request header string. */
|
|
28
|
+
cookie?: string;
|
|
29
|
+
/** Request URL (path + query, or full URL). */
|
|
30
|
+
url?: string;
|
|
31
|
+
/** Raw Accept-Language request header string. */
|
|
32
|
+
acceptLanguage?: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface ResolveLocaleOptions {
|
|
36
|
+
/** Cookie key holding the locale identifier. Defaults to "yoya-lang". */
|
|
37
|
+
cookieKey?: string;
|
|
38
|
+
/** Query key used as fallback. Defaults to "locale". */
|
|
39
|
+
queryKey?: string;
|
|
40
|
+
/** Locale returned when nothing matches. Defaults to "zh-CN". */
|
|
41
|
+
defaultLanguage?: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Resolves the locale identifier from a request with priority
|
|
46
|
+
* cookie > query > Accept-Language > defaultLanguage. Only receives raw
|
|
47
|
+
* strings, so it works with any framework; extract the fields yourself
|
|
48
|
+
* (e.g. req.headers.cookie or request.headers.get('cookie')).
|
|
49
|
+
*/
|
|
50
|
+
export function resolveLocale(input?: LocaleInput | null, options?: ResolveLocaleOptions): string;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Server-side render: serializes a page factory/component to HTML plus initial
|
|
54
|
+
* state. Exceeds maxNodes, falls back to client rendering.
|
|
55
|
+
*/
|
|
56
|
+
export function renderToString<S = unknown>(
|
|
57
|
+
component: ViewNode | ComponentLike | PageFactory<S>,
|
|
58
|
+
options?: RenderOptions<S>
|
|
59
|
+
): RenderResult;
|
|
60
|
+
|
|
61
|
+
/** Serializes state to a JSON string safe to inline into <script>. */
|
|
62
|
+
export function serializeState(state: unknown): string | null;
|
|
63
|
+
|
|
64
|
+
/** Parses serialized state; null/empty input returns null. */
|
|
65
|
+
export function parseState(serialized: string | null | undefined): unknown;
|
|
66
|
+
|
|
67
|
+
/** Client-side full mount: rebuilds the tree and replaces the target content. */
|
|
68
|
+
export function mount<S = unknown>(
|
|
69
|
+
component: ViewNode | ComponentLike | PageFactory<S>,
|
|
70
|
+
target: string | ParentNode,
|
|
71
|
+
state?: S | null,
|
|
72
|
+
options?: SsrI18nOption<S>
|
|
73
|
+
): ViewNode;
|
|
74
|
+
|
|
75
|
+
/** Hydrates server-rendered DOM: adopts elements and binds pending events. */
|
|
76
|
+
export function hydrate<S = unknown>(
|
|
77
|
+
component: ViewNode | ComponentLike | PageFactory<S>,
|
|
78
|
+
target: string | ParentNode,
|
|
79
|
+
state?: S | null,
|
|
80
|
+
options?: SsrI18nOption<S>
|
|
81
|
+
): ViewNode;
|
package/types/svg.d.ts
ADDED
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
ElementNode,
|
|
3
|
+
ElementOptions,
|
|
4
|
+
SetupCallback,
|
|
5
|
+
SetupInput,
|
|
6
|
+
StyleInput,
|
|
7
|
+
StyleValue
|
|
8
|
+
} from './core.js';
|
|
9
|
+
|
|
10
|
+
export const SVG_NAMESPACE: string;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* SvgElementNode is an SVG-namespace element node. SVG child shortcuts are
|
|
14
|
+
* only registered here, keeping the HTML and SVG DSLs separate.
|
|
15
|
+
*/
|
|
16
|
+
export class SvgElementNode extends ElementNode {
|
|
17
|
+
/** SVG text hosts accept raw text; other elements create <text> children. */
|
|
18
|
+
text(
|
|
19
|
+
...args: Array<
|
|
20
|
+
string | number | SetupCallback<SvgElementNode> | ElementOptions | null | undefined
|
|
21
|
+
>
|
|
22
|
+
): this;
|
|
23
|
+
|
|
24
|
+
renderDom(): SVGElement | null;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** Signature shared by SVG factories: accepts any number of setup inputs. */
|
|
28
|
+
export interface SvgElementFactory {
|
|
29
|
+
(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** SVG child shortcuts registered on SvgElementNode. */
|
|
33
|
+
export interface SvgChildShortcuts {
|
|
34
|
+
svg(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
35
|
+
animate(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
36
|
+
animateMotion(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
37
|
+
animateTransform(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
38
|
+
circle(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
39
|
+
clipPath(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
40
|
+
defs(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
41
|
+
desc(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
42
|
+
ellipse(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
43
|
+
feBlend(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
44
|
+
feColorMatrix(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
45
|
+
feComponentTransfer(
|
|
46
|
+
...setups: Array<SetupInput<SvgElementNode> | null | undefined>
|
|
47
|
+
): SvgElementNode;
|
|
48
|
+
feComposite(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
49
|
+
feConvolveMatrix(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
50
|
+
feDiffuseLighting(
|
|
51
|
+
...setups: Array<SetupInput<SvgElementNode> | null | undefined>
|
|
52
|
+
): SvgElementNode;
|
|
53
|
+
feDisplacementMap(
|
|
54
|
+
...setups: Array<SetupInput<SvgElementNode> | null | undefined>
|
|
55
|
+
): SvgElementNode;
|
|
56
|
+
feDistantLight(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
57
|
+
feDropShadow(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
58
|
+
feFlood(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
59
|
+
feFuncA(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
60
|
+
feFuncB(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
61
|
+
feFuncG(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
62
|
+
feFuncR(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
63
|
+
feGaussianBlur(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
64
|
+
feImage(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
65
|
+
feMerge(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
66
|
+
feMergeNode(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
67
|
+
feMorphology(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
68
|
+
feOffset(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
69
|
+
fePointLight(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
70
|
+
feSpecularLighting(
|
|
71
|
+
...setups: Array<SetupInput<SvgElementNode> | null | undefined>
|
|
72
|
+
): SvgElementNode;
|
|
73
|
+
feSpotLight(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
74
|
+
feTile(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
75
|
+
feTurbulence(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
76
|
+
filter(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
77
|
+
foreignObject(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
78
|
+
g(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
79
|
+
image(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
80
|
+
line(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
81
|
+
linearGradient(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
82
|
+
marker(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
83
|
+
mask(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
84
|
+
metadata(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
85
|
+
mpath(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
86
|
+
path(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
87
|
+
pattern(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
88
|
+
polygon(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
89
|
+
polyline(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
90
|
+
radialGradient(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
91
|
+
rect(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
92
|
+
set(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
93
|
+
stop(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
94
|
+
a(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
95
|
+
script(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
96
|
+
switch(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
97
|
+
title(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
98
|
+
symbol(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
99
|
+
textPath(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
100
|
+
tspan(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
101
|
+
use(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
102
|
+
view(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/** Merged SVG child shortcut surface on SvgElementNode. */
|
|
106
|
+
export interface SvgElementNode extends SvgChildShortcuts {}
|
|
107
|
+
|
|
108
|
+
/** The svg shortcut registered on HtmlElementNode. */
|
|
109
|
+
export interface SvgParentShortcuts {
|
|
110
|
+
svg(...setups: Array<SetupInput<SvgElementNode> | null | undefined>): SvgElementNode;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/** Creates an <svg> element; the only SVG entry visible from HTML DSL. */
|
|
114
|
+
export const svg: SvgElementFactory;
|
|
115
|
+
|
|
116
|
+
// Built-in icon factories (each returns an SVG node).
|
|
117
|
+
export function ArrowDownOutlined(): SvgElementNode;
|
|
118
|
+
export function ArrowLeftOutlined(): SvgElementNode;
|
|
119
|
+
export function ArrowRightOutlined(): SvgElementNode;
|
|
120
|
+
export function ArrowUpOutlined(): SvgElementNode;
|
|
121
|
+
export function BellOutlined(): SvgElementNode;
|
|
122
|
+
export function CalendarOutlined(): SvgElementNode;
|
|
123
|
+
export function CheckOutlined(): SvgElementNode;
|
|
124
|
+
export function ChevronDownOutlined(): SvgElementNode;
|
|
125
|
+
export function ChevronLeftOutlined(): SvgElementNode;
|
|
126
|
+
export function ChevronRightOutlined(): SvgElementNode;
|
|
127
|
+
export function ChevronUpOutlined(): SvgElementNode;
|
|
128
|
+
export function CloseOutlined(): SvgElementNode;
|
|
129
|
+
export function CodeOutlined(): SvgElementNode;
|
|
130
|
+
export function CopyOutlined(): SvgElementNode;
|
|
131
|
+
export function DownloadOutlined(): SvgElementNode;
|
|
132
|
+
export function EditOutlined(): SvgElementNode;
|
|
133
|
+
export function ExternalOutlined(): SvgElementNode;
|
|
134
|
+
export function EyeOutlined(): SvgElementNode;
|
|
135
|
+
export function FileOutlined(): SvgElementNode;
|
|
136
|
+
export function FolderOutlined(): SvgElementNode;
|
|
137
|
+
export function FolderOpenOutlined(): SvgElementNode;
|
|
138
|
+
export function HeartOutlined(): SvgElementNode;
|
|
139
|
+
export function HomeOutlined(): SvgElementNode;
|
|
140
|
+
export function InfoOutlined(): SvgElementNode;
|
|
141
|
+
export function LockOutlined(): SvgElementNode;
|
|
142
|
+
export function LogoutOutlined(): SvgElementNode;
|
|
143
|
+
export function MailOutlined(): SvgElementNode;
|
|
144
|
+
export function MenuOutlined(): SvgElementNode;
|
|
145
|
+
export function MinusOutlined(): SvgElementNode;
|
|
146
|
+
export function MoreHorizontalOutlined(): SvgElementNode;
|
|
147
|
+
export function PlusOutlined(): SvgElementNode;
|
|
148
|
+
export function RefreshOutlined(): SvgElementNode;
|
|
149
|
+
export function SearchOutlined(): SvgElementNode;
|
|
150
|
+
export function SettingsOutlined(): SvgElementNode;
|
|
151
|
+
export function StarOutlined(): SvgElementNode;
|
|
152
|
+
export function TrashOutlined(): SvgElementNode;
|
|
153
|
+
export function UploadOutlined(): SvgElementNode;
|
|
154
|
+
export function UserOutlined(): SvgElementNode;
|
|
155
|
+
export function WarningOutlined(): SvgElementNode;
|
|
156
|
+
export function SunOutlined(): SvgElementNode;
|
|
157
|
+
export function MoonOutlined(): SvgElementNode;
|
|
158
|
+
export function MonitorOutlined(): SvgElementNode;
|
package/types/theme.d.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
ChildInput,
|
|
3
|
+
ElementFactory,
|
|
4
|
+
ElementOptions,
|
|
5
|
+
SetupCallback,
|
|
6
|
+
SetupInput,
|
|
7
|
+
YoyaMode
|
|
8
|
+
} from './core.js';
|
|
9
|
+
import type { HtmlElementNode } from './html.js';
|
|
10
|
+
|
|
11
|
+
export interface ThemeModeEntry {
|
|
12
|
+
mode: YoyaMode;
|
|
13
|
+
label?: ChildInput;
|
|
14
|
+
icon?: unknown;
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/** Theme light/dark/system mode switcher. */
|
|
19
|
+
export class VThemeModeSwitch extends HtmlElementNode {
|
|
20
|
+
modes(): ThemeModeEntry[];
|
|
21
|
+
modes(value: Array<YoyaMode | ThemeModeEntry>): VThemeModeSwitch;
|
|
22
|
+
persist(): boolean;
|
|
23
|
+
persist(value: boolean): VThemeModeSwitch;
|
|
24
|
+
sync(): VThemeModeSwitch;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const vThemeModeSwitch: ElementFactory<VThemeModeSwitch> & {
|
|
28
|
+
(
|
|
29
|
+
first?: SetupInput<VThemeModeSwitch> | null,
|
|
30
|
+
callback?: SetupCallback<VThemeModeSwitch>
|
|
31
|
+
): VThemeModeSwitch;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Parent-shortcut surface merged onto HtmlElementNode. vThemeModeSwitch is
|
|
36
|
+
* registered on ElementNode and inherited, so it is declared there.
|
|
37
|
+
*/
|
|
38
|
+
export interface ThemeParentShortcuts {}
|
|
39
|
+
|
|
40
|
+
export type { ElementOptions, YoyaMode };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Entry types for the `yoya-ui` root export (and `yoya-ui/ui`).
|
|
3
|
+
*/
|
|
4
|
+
export * from './core.js';
|
|
5
|
+
export * from './html.js';
|
|
6
|
+
export * from './svg.js';
|
|
7
|
+
export * from './layout.js';
|
|
8
|
+
export * from './actions.js';
|
|
9
|
+
export * from './navigation.js';
|
|
10
|
+
export * from './feedback.js';
|
|
11
|
+
export * from './form.js';
|
|
12
|
+
export * from './data-display.js';
|
|
13
|
+
export * from './async.js';
|
|
14
|
+
export * from './i18n.js';
|
|
15
|
+
export * from './theme.js';
|
|
16
|
+
export * from './router.js';
|
|
17
|
+
export * from './effects.js';
|
|
18
|
+
export { VEchart, vEchart } from './chart.js';
|
|
19
|
+
export * from './ssr.js';
|