forked from styled-components/vue-styled-components
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathindex.d.ts
240 lines (224 loc) · 6.72 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
import * as CSS from 'csstype'
import * as Vue from 'vue'
type CSSProperties = CSS.Properties<string | number>
type CSSPseudos = { [K in CSS.Pseudos]?: CSSObject }
interface CSSObject extends CSSProperties, CSSPseudos {
[key: string]: CSSObject | string | number | undefined
}
type CSS = CSSProperties
type Component = Vue.Component | Vue.DefineComponent
type ThemeObject = { theme: { type: any; required: true } }
type StyledHTMLElement = {
[K in keyof IntrinsicElementAttributes]: (
str: TemplateStringsArray,
...placeholders: ((
props: Vue.ExtractPropTypes<ThemeObject>
) => string | { toString: () => string })[]
) => Vue.DefineComponent<IntrinsicElementAttributes[K]>
}
type StyledFunctionHTMLElement = {
<
Props = { [key: string]: Vue.Prop<unknown> },
K extends keyof IntrinsicElementAttributes = any
>(
component: K,
props?: Props
): (
str: TemplateStringsArray,
...placeholders: ((
props: Vue.ExtractPropTypes<Props & ThemeObject>
) => string | { toString: () => string })[]
) => Vue.DefineComponent<
Vue.ExtractPropTypes<Props> & IntrinsicElementAttributes[K]
>
}
type StyledVueComponent = {
<Props, T extends Component>(component: T): (
str: TemplateStringsArray,
...placeholders: ((
props: Vue.ExtractPropTypes<ThemeObject>
) => string | { toString: () => string })[]
) => Vue.DefineComponent<Props> & T
}
export type Styled = StyledHTMLElement &
StyledFunctionHTMLElement &
StyledVueComponent
interface IntrinsicElementAttributes {
a: Vue.AnchorHTMLAttributes
abbr: Vue.HTMLAttributes
address: Vue.HTMLAttributes
area: Vue.AreaHTMLAttributes
article: Vue.HTMLAttributes
aside: Vue.HTMLAttributes
audio: Vue.AudioHTMLAttributes
b: Vue.HTMLAttributes
base: Vue.BaseHTMLAttributes
bdi: Vue.HTMLAttributes
bdo: Vue.HTMLAttributes
blockquote: Vue.BlockquoteHTMLAttributes
body: Vue.HTMLAttributes
br: Vue.HTMLAttributes
button: Vue.ButtonHTMLAttributes
canvas: Vue.CanvasHTMLAttributes
caption: Vue.HTMLAttributes
cite: Vue.HTMLAttributes
code: Vue.HTMLAttributes
col: Vue.ColHTMLAttributes
colgroup: Vue.ColgroupHTMLAttributes
data: Vue.DataHTMLAttributes
datalist: Vue.HTMLAttributes
dd: Vue.HTMLAttributes
del: Vue.DelHTMLAttributes
details: Vue.DetailsHTMLAttributes
dfn: Vue.HTMLAttributes
dialog: Vue.DialogHTMLAttributes
div: Vue.HTMLAttributes
dl: Vue.HTMLAttributes
dt: Vue.HTMLAttributes
em: Vue.HTMLAttributes
embed: Vue.EmbedHTMLAttributes
fieldset: Vue.FieldsetHTMLAttributes
figcaption: Vue.HTMLAttributes
figure: Vue.HTMLAttributes
footer: Vue.HTMLAttributes
form: Vue.FormHTMLAttributes
h1: Vue.HTMLAttributes
h2: Vue.HTMLAttributes
h3: Vue.HTMLAttributes
h4: Vue.HTMLAttributes
h5: Vue.HTMLAttributes
h6: Vue.HTMLAttributes
head: Vue.HTMLAttributes
header: Vue.HTMLAttributes
hgroup: Vue.HTMLAttributes
hr: Vue.HTMLAttributes
html: Vue.HtmlHTMLAttributes
i: Vue.HTMLAttributes
iframe: Vue.IframeHTMLAttributes
img: Vue.ImgHTMLAttributes
input: Vue.InputHTMLAttributes
ins: Vue.InsHTMLAttributes
kbd: Vue.HTMLAttributes
keygen: Vue.KeygenHTMLAttributes
label: Vue.LabelHTMLAttributes
legend: Vue.HTMLAttributes
li: Vue.LiHTMLAttributes
link: Vue.LinkHTMLAttributes
main: Vue.HTMLAttributes
map: Vue.MapHTMLAttributes
mark: Vue.HTMLAttributes
menu: Vue.MenuHTMLAttributes
meta: Vue.MetaHTMLAttributes
meter: Vue.MeterHTMLAttributes
nav: Vue.HTMLAttributes
noindex: Vue.HTMLAttributes
noscript: Vue.HTMLAttributes
object: Vue.ObjectHTMLAttributes
ol: Vue.OlHTMLAttributes
optgroup: Vue.OptgroupHTMLAttributes
option: Vue.OptionHTMLAttributes
output: Vue.OutputHTMLAttributes
p: Vue.HTMLAttributes
param: Vue.ParamHTMLAttributes
picture: Vue.HTMLAttributes
pre: Vue.HTMLAttributes
progress: Vue.ProgressHTMLAttributes
q: Vue.QuoteHTMLAttributes
rp: Vue.HTMLAttributes
rt: Vue.HTMLAttributes
ruby: Vue.HTMLAttributes
s: Vue.HTMLAttributes
samp: Vue.HTMLAttributes
script: Vue.ScriptHTMLAttributes
section: Vue.HTMLAttributes
select: Vue.SelectHTMLAttributes
small: Vue.HTMLAttributes
source: Vue.SourceHTMLAttributes
span: Vue.HTMLAttributes
strong: Vue.HTMLAttributes
style: Vue.StyleHTMLAttributes
sub: Vue.HTMLAttributes
summary: Vue.HTMLAttributes
sup: Vue.HTMLAttributes
table: Vue.TableHTMLAttributes
template: Vue.HTMLAttributes
tbody: Vue.HTMLAttributes
td: Vue.TdHTMLAttributes
textarea: Vue.TextareaHTMLAttributes
tfoot: Vue.HTMLAttributes
th: Vue.ThHTMLAttributes
thead: Vue.HTMLAttributes
time: Vue.TimeHTMLAttributes
title: Vue.HTMLAttributes
tr: Vue.HTMLAttributes
track: Vue.TrackHTMLAttributes
u: Vue.HTMLAttributes
ul: Vue.HTMLAttributes
var: Vue.HTMLAttributes
video: Vue.VideoHTMLAttributes
wbr: Vue.HTMLAttributes
webview: Vue.WebViewHTMLAttributes
// SVG
svg: Vue.SVGAttributes
animate: Vue.SVGAttributes
animateMotion: Vue.SVGAttributes
animateTransform: Vue.SVGAttributes
circle: Vue.SVGAttributes
clipPath: Vue.SVGAttributes
defs: Vue.SVGAttributes
desc: Vue.SVGAttributes
ellipse: Vue.SVGAttributes
feBlend: Vue.SVGAttributes
feColorMatrix: Vue.SVGAttributes
feComponentTransfer: Vue.SVGAttributes
feComposite: Vue.SVGAttributes
feConvolveMatrix: Vue.SVGAttributes
feDiffuseLighting: Vue.SVGAttributes
feDisplacementMap: Vue.SVGAttributes
feDistantLight: Vue.SVGAttributes
feDropShadow: Vue.SVGAttributes
feFlood: Vue.SVGAttributes
feFuncA: Vue.SVGAttributes
feFuncB: Vue.SVGAttributes
feFuncG: Vue.SVGAttributes
feFuncR: Vue.SVGAttributes
feGaussianBlur: Vue.SVGAttributes
feImage: Vue.SVGAttributes
feMerge: Vue.SVGAttributes
feMergeNode: Vue.SVGAttributes
feMorphology: Vue.SVGAttributes
feOffset: Vue.SVGAttributes
fePointLight: Vue.SVGAttributes
feSpecularLighting: Vue.SVGAttributes
feSpotLight: Vue.SVGAttributes
feTile: Vue.SVGAttributes
feTurbulence: Vue.SVGAttributes
filter: Vue.SVGAttributes
foreignObject: Vue.SVGAttributes
g: Vue.SVGAttributes
image: Vue.SVGAttributes
line: Vue.SVGAttributes
linearGradient: Vue.SVGAttributes
marker: Vue.SVGAttributes
mask: Vue.SVGAttributes
metadata: Vue.SVGAttributes
mpath: Vue.SVGAttributes
path: Vue.SVGAttributes
pattern: Vue.SVGAttributes
polygon: Vue.SVGAttributes
polyline: Vue.SVGAttributes
radialGradient: Vue.SVGAttributes
rect: Vue.SVGAttributes
stop: Vue.SVGAttributes
switch: Vue.SVGAttributes
symbol: Vue.SVGAttributes
text: Vue.SVGAttributes
textPath: Vue.SVGAttributes
tspan: Vue.SVGAttributes
use: Vue.SVGAttributes
view: Vue.SVGAttributes
}
export const ThemeProvider: Vue.DefineComponent<ThemeObject>
export const css: (input: TemplateStringsArray) => string
export const styled: Styled
export default styled