@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
package/types/html.d.ts
ADDED
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
ElementFactory,
|
|
3
|
+
ElementNode,
|
|
4
|
+
ElementOptions,
|
|
5
|
+
SetupCallback,
|
|
6
|
+
SetupInput
|
|
7
|
+
} from './core.js';
|
|
8
|
+
import type { ActionsParentShortcuts } from './actions.js';
|
|
9
|
+
import type { AsyncParentShortcuts } from './async.js';
|
|
10
|
+
import type { ChartParentShortcuts } from './chart.js';
|
|
11
|
+
import type { DataDisplayParentShortcuts } from './data-display.js';
|
|
12
|
+
import type { EffectsParentShortcuts } from './effects.js';
|
|
13
|
+
import type { FeedbackParentShortcuts } from './feedback.js';
|
|
14
|
+
import type { FormParentShortcuts } from './form.js';
|
|
15
|
+
import type { I18nParentShortcuts } from './i18n.js';
|
|
16
|
+
import type { LayoutParentShortcuts } from './layout.js';
|
|
17
|
+
import type { NavigationParentShortcuts } from './navigation.js';
|
|
18
|
+
import type { RouterParentShortcuts } from './router.js';
|
|
19
|
+
import type { SvgParentShortcuts } from './svg.js';
|
|
20
|
+
import type { ThemeParentShortcuts } from './theme.js';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* HtmlElementNode is the HTML DSL element node. HTML child shortcuts are only
|
|
24
|
+
* registered on this class so SVG nodes stay isolated.
|
|
25
|
+
*/
|
|
26
|
+
export class HtmlElementNode extends ElementNode {}
|
|
27
|
+
|
|
28
|
+
export interface HtmlElementNode {
|
|
29
|
+
renderDom(): HTMLElement | null;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Parent-shortcut DSL surface merged onto HtmlElementNode: every HTML factory
|
|
34
|
+
* plus layout/SVG/component shortcuts registered through registerChildFactories.
|
|
35
|
+
*/
|
|
36
|
+
export interface HtmlElementNode
|
|
37
|
+
extends
|
|
38
|
+
ElementNode,
|
|
39
|
+
HtmlElementShortcuts,
|
|
40
|
+
SvgParentShortcuts,
|
|
41
|
+
LayoutParentShortcuts,
|
|
42
|
+
ActionsParentShortcuts,
|
|
43
|
+
NavigationParentShortcuts,
|
|
44
|
+
FeedbackParentShortcuts,
|
|
45
|
+
FormParentShortcuts,
|
|
46
|
+
DataDisplayParentShortcuts,
|
|
47
|
+
AsyncParentShortcuts,
|
|
48
|
+
EffectsParentShortcuts,
|
|
49
|
+
I18nParentShortcuts,
|
|
50
|
+
ThemeParentShortcuts,
|
|
51
|
+
RouterParentShortcuts,
|
|
52
|
+
ChartParentShortcuts {}
|
|
53
|
+
|
|
54
|
+
/** HTML element factories, one per WHATWG conforming tag. */
|
|
55
|
+
export interface HtmlElementShortcuts {
|
|
56
|
+
a(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
57
|
+
abbr(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
58
|
+
address(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
59
|
+
area(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
60
|
+
article(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
61
|
+
aside(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
62
|
+
audio(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
63
|
+
b(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
64
|
+
base(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
65
|
+
bdi(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
66
|
+
bdo(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
67
|
+
blockquote(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
68
|
+
body(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
69
|
+
br(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
70
|
+
button(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
71
|
+
canvas(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
72
|
+
caption(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
73
|
+
cite(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
74
|
+
code(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
75
|
+
col(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
76
|
+
colgroup(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
77
|
+
data(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
78
|
+
datalist(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
79
|
+
dd(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
80
|
+
del(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
81
|
+
details(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
82
|
+
dfn(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
83
|
+
dialog(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
84
|
+
div(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
85
|
+
dl(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
86
|
+
dt(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
87
|
+
em(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
88
|
+
embed(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
89
|
+
fieldset(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
90
|
+
figcaption(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
91
|
+
figure(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
92
|
+
footer(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
93
|
+
form(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
94
|
+
h1(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
95
|
+
h2(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
96
|
+
h3(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
97
|
+
h4(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
98
|
+
h5(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
99
|
+
h6(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
100
|
+
head(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
101
|
+
header(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
102
|
+
hgroup(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
103
|
+
hr(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
104
|
+
html(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
105
|
+
i(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
106
|
+
iframe(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
107
|
+
img(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
108
|
+
input(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
109
|
+
ins(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
110
|
+
kbd(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
111
|
+
label(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
112
|
+
legend(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
113
|
+
li(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
114
|
+
link(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
115
|
+
main(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
116
|
+
map(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
117
|
+
mark(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
118
|
+
menu(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
119
|
+
meta(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
120
|
+
meter(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
121
|
+
nav(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
122
|
+
noscript(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
123
|
+
object(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
124
|
+
ol(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
125
|
+
optgroup(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
126
|
+
option(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
127
|
+
output(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
128
|
+
p(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
129
|
+
picture(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
130
|
+
pre(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
131
|
+
progress(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
132
|
+
q(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
133
|
+
rp(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
134
|
+
rt(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
135
|
+
ruby(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
136
|
+
s(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
137
|
+
samp(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
138
|
+
script(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
139
|
+
search(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
140
|
+
section(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
141
|
+
select(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
142
|
+
selectedcontent(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
143
|
+
slot(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
144
|
+
small(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
145
|
+
source(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
146
|
+
span(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
147
|
+
strong(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
148
|
+
/** style() conflicts with the CSS style API, so the <style> shortcut is styleTag(). */
|
|
149
|
+
styleTag(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
150
|
+
sub(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
151
|
+
summary(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
152
|
+
sup(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
153
|
+
table(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
154
|
+
tbody(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
155
|
+
td(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
156
|
+
template(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
157
|
+
textarea(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
158
|
+
tfoot(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
159
|
+
th(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
160
|
+
thead(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
161
|
+
time(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
162
|
+
title(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
163
|
+
tr(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
164
|
+
track(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
165
|
+
u(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
166
|
+
ul(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
167
|
+
/** var is a JS keyword, so the factory and shortcut are named varTag(). */
|
|
168
|
+
varTag(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
169
|
+
video(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
170
|
+
wbr(first?: SetupInput<HtmlElementNode> | null): HtmlElementNode;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export const a: ElementFactory<HtmlElementNode>;
|
|
174
|
+
export const abbr: ElementFactory<HtmlElementNode>;
|
|
175
|
+
export const address: ElementFactory<HtmlElementNode>;
|
|
176
|
+
export const area: ElementFactory<HtmlElementNode>;
|
|
177
|
+
export const article: ElementFactory<HtmlElementNode>;
|
|
178
|
+
export const aside: ElementFactory<HtmlElementNode>;
|
|
179
|
+
export const audio: ElementFactory<HtmlElementNode>;
|
|
180
|
+
export const b: ElementFactory<HtmlElementNode>;
|
|
181
|
+
export const base: ElementFactory<HtmlElementNode>;
|
|
182
|
+
export const bdi: ElementFactory<HtmlElementNode>;
|
|
183
|
+
export const bdo: ElementFactory<HtmlElementNode>;
|
|
184
|
+
export const blockquote: ElementFactory<HtmlElementNode>;
|
|
185
|
+
export const body: ElementFactory<HtmlElementNode>;
|
|
186
|
+
export const br: ElementFactory<HtmlElementNode>;
|
|
187
|
+
export const button: ElementFactory<HtmlElementNode>;
|
|
188
|
+
export const canvas: ElementFactory<HtmlElementNode>;
|
|
189
|
+
export const caption: ElementFactory<HtmlElementNode>;
|
|
190
|
+
export const cite: ElementFactory<HtmlElementNode>;
|
|
191
|
+
export const code: ElementFactory<HtmlElementNode>;
|
|
192
|
+
export const col: ElementFactory<HtmlElementNode>;
|
|
193
|
+
export const colgroup: ElementFactory<HtmlElementNode>;
|
|
194
|
+
export const data: ElementFactory<HtmlElementNode>;
|
|
195
|
+
export const datalist: ElementFactory<HtmlElementNode>;
|
|
196
|
+
export const dd: ElementFactory<HtmlElementNode>;
|
|
197
|
+
export const del: ElementFactory<HtmlElementNode>;
|
|
198
|
+
export const details: ElementFactory<HtmlElementNode>;
|
|
199
|
+
export const dfn: ElementFactory<HtmlElementNode>;
|
|
200
|
+
export const dialog: ElementFactory<HtmlElementNode>;
|
|
201
|
+
export const div: ElementFactory<HtmlElementNode>;
|
|
202
|
+
export const dl: ElementFactory<HtmlElementNode>;
|
|
203
|
+
export const dt: ElementFactory<HtmlElementNode>;
|
|
204
|
+
export const em: ElementFactory<HtmlElementNode>;
|
|
205
|
+
export const embed: ElementFactory<HtmlElementNode>;
|
|
206
|
+
export const fieldset: ElementFactory<HtmlElementNode>;
|
|
207
|
+
export const figcaption: ElementFactory<HtmlElementNode>;
|
|
208
|
+
export const figure: ElementFactory<HtmlElementNode>;
|
|
209
|
+
export const footer: ElementFactory<HtmlElementNode>;
|
|
210
|
+
export const form: ElementFactory<HtmlElementNode>;
|
|
211
|
+
export const h1: ElementFactory<HtmlElementNode>;
|
|
212
|
+
export const h2: ElementFactory<HtmlElementNode>;
|
|
213
|
+
export const h3: ElementFactory<HtmlElementNode>;
|
|
214
|
+
export const h4: ElementFactory<HtmlElementNode>;
|
|
215
|
+
export const h5: ElementFactory<HtmlElementNode>;
|
|
216
|
+
export const h6: ElementFactory<HtmlElementNode>;
|
|
217
|
+
export const head: ElementFactory<HtmlElementNode>;
|
|
218
|
+
export const header: ElementFactory<HtmlElementNode>;
|
|
219
|
+
export const hgroup: ElementFactory<HtmlElementNode>;
|
|
220
|
+
export const hr: ElementFactory<HtmlElementNode>;
|
|
221
|
+
export const html: ElementFactory<HtmlElementNode>;
|
|
222
|
+
export const i: ElementFactory<HtmlElementNode>;
|
|
223
|
+
export const iframe: ElementFactory<HtmlElementNode>;
|
|
224
|
+
export const img: ElementFactory<HtmlElementNode>;
|
|
225
|
+
export const input: ElementFactory<HtmlElementNode>;
|
|
226
|
+
export const ins: ElementFactory<HtmlElementNode>;
|
|
227
|
+
export const kbd: ElementFactory<HtmlElementNode>;
|
|
228
|
+
export const label: ElementFactory<HtmlElementNode>;
|
|
229
|
+
export const legend: ElementFactory<HtmlElementNode>;
|
|
230
|
+
export const li: ElementFactory<HtmlElementNode>;
|
|
231
|
+
export const link: ElementFactory<HtmlElementNode>;
|
|
232
|
+
export const main: ElementFactory<HtmlElementNode>;
|
|
233
|
+
export const map: ElementFactory<HtmlElementNode>;
|
|
234
|
+
export const mark: ElementFactory<HtmlElementNode>;
|
|
235
|
+
export const menu: ElementFactory<HtmlElementNode>;
|
|
236
|
+
export const meta: ElementFactory<HtmlElementNode>;
|
|
237
|
+
export const meter: ElementFactory<HtmlElementNode>;
|
|
238
|
+
export const nav: ElementFactory<HtmlElementNode>;
|
|
239
|
+
export const noscript: ElementFactory<HtmlElementNode>;
|
|
240
|
+
export const object: ElementFactory<HtmlElementNode>;
|
|
241
|
+
export const ol: ElementFactory<HtmlElementNode>;
|
|
242
|
+
export const optgroup: ElementFactory<HtmlElementNode>;
|
|
243
|
+
export const option: ElementFactory<HtmlElementNode>;
|
|
244
|
+
export const output: ElementFactory<HtmlElementNode>;
|
|
245
|
+
export const p: ElementFactory<HtmlElementNode>;
|
|
246
|
+
export const picture: ElementFactory<HtmlElementNode>;
|
|
247
|
+
export const pre: ElementFactory<HtmlElementNode>;
|
|
248
|
+
export const progress: ElementFactory<HtmlElementNode>;
|
|
249
|
+
export const q: ElementFactory<HtmlElementNode>;
|
|
250
|
+
export const rp: ElementFactory<HtmlElementNode>;
|
|
251
|
+
export const rt: ElementFactory<HtmlElementNode>;
|
|
252
|
+
export const ruby: ElementFactory<HtmlElementNode>;
|
|
253
|
+
export const s: ElementFactory<HtmlElementNode>;
|
|
254
|
+
export const samp: ElementFactory<HtmlElementNode>;
|
|
255
|
+
export const script: ElementFactory<HtmlElementNode>;
|
|
256
|
+
export const search: ElementFactory<HtmlElementNode>;
|
|
257
|
+
export const section: ElementFactory<HtmlElementNode>;
|
|
258
|
+
export const select: ElementFactory<HtmlElementNode>;
|
|
259
|
+
export const selectedcontent: ElementFactory<HtmlElementNode>;
|
|
260
|
+
export const slot: ElementFactory<HtmlElementNode>;
|
|
261
|
+
export const small: ElementFactory<HtmlElementNode>;
|
|
262
|
+
export const source: ElementFactory<HtmlElementNode>;
|
|
263
|
+
export const span: ElementFactory<HtmlElementNode>;
|
|
264
|
+
export const strong: ElementFactory<HtmlElementNode>;
|
|
265
|
+
export const style: ElementFactory<HtmlElementNode>;
|
|
266
|
+
export const styleTag: ElementFactory<HtmlElementNode>;
|
|
267
|
+
export const sub: ElementFactory<HtmlElementNode>;
|
|
268
|
+
export const summary: ElementFactory<HtmlElementNode>;
|
|
269
|
+
export const sup: ElementFactory<HtmlElementNode>;
|
|
270
|
+
export const table: ElementFactory<HtmlElementNode>;
|
|
271
|
+
export const tbody: ElementFactory<HtmlElementNode>;
|
|
272
|
+
export const td: ElementFactory<HtmlElementNode>;
|
|
273
|
+
export const template: ElementFactory<HtmlElementNode>;
|
|
274
|
+
export const textarea: ElementFactory<HtmlElementNode>;
|
|
275
|
+
export const tfoot: ElementFactory<HtmlElementNode>;
|
|
276
|
+
export const th: ElementFactory<HtmlElementNode>;
|
|
277
|
+
export const thead: ElementFactory<HtmlElementNode>;
|
|
278
|
+
export const time: ElementFactory<HtmlElementNode>;
|
|
279
|
+
export const title: ElementFactory<HtmlElementNode>;
|
|
280
|
+
export const tr: ElementFactory<HtmlElementNode>;
|
|
281
|
+
export const track: ElementFactory<HtmlElementNode>;
|
|
282
|
+
export const u: ElementFactory<HtmlElementNode>;
|
|
283
|
+
export const ul: ElementFactory<HtmlElementNode>;
|
|
284
|
+
export const varTag: ElementFactory<HtmlElementNode>;
|
|
285
|
+
export const video: ElementFactory<HtmlElementNode>;
|
|
286
|
+
export const wbr: ElementFactory<HtmlElementNode>;
|
|
287
|
+
|
|
288
|
+
export type { ElementOptions, SetupCallback, SetupInput };
|
package/types/i18n.d.ts
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
ChildInput,
|
|
3
|
+
ElementFactory,
|
|
4
|
+
ElementOptions,
|
|
5
|
+
I18n,
|
|
6
|
+
SetupCallback,
|
|
7
|
+
SetupInput
|
|
8
|
+
} from './core.js';
|
|
9
|
+
import type { VDropdownMenu } from './actions.js';
|
|
10
|
+
|
|
11
|
+
export interface LanguageOption {
|
|
12
|
+
label?: ChildInput;
|
|
13
|
+
value: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type LanguageSwitchSize = 'small' | 'medium' | 'large';
|
|
19
|
+
export type LanguageSwitchVariant = 'primary' | 'secondary';
|
|
20
|
+
|
|
21
|
+
/** Object component returned by vLanguageSwitch(). */
|
|
22
|
+
export interface LanguageSwitchComponent {
|
|
23
|
+
activeLanguage(): string;
|
|
24
|
+
ariaLabel(): string;
|
|
25
|
+
ariaLabel(value: ChildInput): LanguageSwitchComponent;
|
|
26
|
+
change(handler: (option: LanguageOption, locale: I18n) => void): LanguageSwitchComponent;
|
|
27
|
+
onChange(handler: (option: LanguageOption, locale: I18n) => void): LanguageSwitchComponent;
|
|
28
|
+
destroy(): LanguageSwitchComponent;
|
|
29
|
+
languages(): LanguageOption[];
|
|
30
|
+
languages(value: Array<string | [string, string] | LanguageOption>): LanguageSwitchComponent;
|
|
31
|
+
locale(): I18n;
|
|
32
|
+
locale(value: I18n): LanguageSwitchComponent;
|
|
33
|
+
render(): VDropdownMenu;
|
|
34
|
+
size(): LanguageSwitchSize;
|
|
35
|
+
size(value: LanguageSwitchSize): LanguageSwitchComponent;
|
|
36
|
+
variant(): LanguageSwitchVariant;
|
|
37
|
+
variant(value: LanguageSwitchVariant): LanguageSwitchComponent;
|
|
38
|
+
[key: string]: any;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** Creates a language switch bound to an I18n instance. */
|
|
42
|
+
export function vLanguageSwitch(
|
|
43
|
+
first?: SetupInput<LanguageSwitchComponent> | null,
|
|
44
|
+
options?: ElementOptions,
|
|
45
|
+
callback?: SetupCallback<LanguageSwitchComponent>
|
|
46
|
+
): LanguageSwitchComponent;
|
|
47
|
+
|
|
48
|
+
/** Parent-shortcut surface merged onto HtmlElementNode. */
|
|
49
|
+
export interface I18nParentShortcuts {
|
|
50
|
+
vLanguageSwitch(
|
|
51
|
+
first?: SetupInput<LanguageSwitchComponent> | null,
|
|
52
|
+
callback?: SetupCallback<LanguageSwitchComponent>
|
|
53
|
+
): LanguageSwitchComponent;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export type { ElementFactory };
|
package/types/index.d.ts
ADDED