govuk_publishing_components 12.13.0 → 12.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/components/accessible-autocomplete.js +37 -0
  3. data/app/assets/javascripts/govuk_publishing_components/components/checkboxes.js +6 -5
  4. data/app/assets/javascripts/govuk_publishing_components/components/copy-to-clipboard.js +15 -15
  5. data/app/assets/javascripts/govuk_publishing_components/components/feedback.js +2 -4
  6. data/app/assets/javascripts/govuk_publishing_components/components/initial-focus.js +8 -8
  7. data/app/assets/javascripts/govuk_publishing_components/components/step-by-step-nav.js +3 -3
  8. data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +1 -0
  9. data/app/assets/stylesheets/govuk_publishing_components/components/_accessible-autocomplete.scss +16 -0
  10. data/app/views/govuk_publishing_components/components/_accessible_autocomplete.html.erb +24 -0
  11. data/app/views/govuk_publishing_components/components/docs/accessible_autocomplete.yml +42 -0
  12. data/config/initializers/assets.rb +1 -0
  13. data/lib/govuk_publishing_components/version.rb +1 -1
  14. data/node_modules/accessible-autocomplete/CHANGELOG.md +269 -0
  15. data/node_modules/accessible-autocomplete/CONTRIBUTING.md +150 -0
  16. data/node_modules/accessible-autocomplete/LICENSE.txt +20 -0
  17. data/node_modules/accessible-autocomplete/Procfile +1 -0
  18. data/node_modules/accessible-autocomplete/README.md +416 -0
  19. data/node_modules/accessible-autocomplete/accessibility-criteria.md +42 -0
  20. data/node_modules/accessible-autocomplete/app.json +15 -0
  21. data/node_modules/accessible-autocomplete/dist/accessible-autocomplete.min.css +1 -0
  22. data/node_modules/accessible-autocomplete/dist/accessible-autocomplete.min.js +2 -0
  23. data/node_modules/accessible-autocomplete/dist/accessible-autocomplete.min.js.map +1 -0
  24. data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.preact.min.js +2 -0
  25. data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.preact.min.js.map +1 -0
  26. data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.react.min.js +2 -0
  27. data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.react.min.js.map +1 -0
  28. data/node_modules/accessible-autocomplete/examples/form.html +671 -0
  29. data/node_modules/accessible-autocomplete/examples/index.html +616 -0
  30. data/node_modules/accessible-autocomplete/examples/preact/index.html +346 -0
  31. data/node_modules/accessible-autocomplete/examples/react/index.html +347 -0
  32. data/node_modules/accessible-autocomplete/package.json +192 -0
  33. data/node_modules/accessible-autocomplete/preact.js +1 -0
  34. data/node_modules/accessible-autocomplete/react.js +1 -0
  35. data/node_modules/accessible-autocomplete/scripts/check-staged.js +14 -0
  36. data/node_modules/accessible-autocomplete/src/autocomplete.css +141 -0
  37. data/node_modules/accessible-autocomplete/src/autocomplete.js +524 -0
  38. data/node_modules/accessible-autocomplete/src/dropdown-arrow-down.js +11 -0
  39. data/node_modules/accessible-autocomplete/src/status.js +80 -0
  40. data/node_modules/accessible-autocomplete/src/wrapper.js +60 -0
  41. data/node_modules/accessible-autocomplete/test/functional/dropdown-arrow-down.js +44 -0
  42. data/node_modules/accessible-autocomplete/test/functional/index.js +485 -0
  43. data/node_modules/accessible-autocomplete/test/functional/wrapper.js +267 -0
  44. data/node_modules/accessible-autocomplete/test/integration/index.js +188 -0
  45. data/node_modules/accessible-autocomplete/test/karma.config.js +42 -0
  46. data/node_modules/accessible-autocomplete/test/wdio.config.js +80 -0
  47. data/node_modules/accessible-autocomplete/webpack.config.babel.js +193 -0
  48. data/node_modules/preact/LICENSE +21 -0
  49. data/node_modules/preact/README.md +580 -0
  50. data/node_modules/preact/debug.js +112 -0
  51. data/node_modules/preact/debug.js.map +1 -0
  52. data/node_modules/preact/debug/index.js +121 -0
  53. data/node_modules/preact/devtools.js +403 -0
  54. data/node_modules/preact/devtools.js.map +1 -0
  55. data/node_modules/preact/devtools/devtools.js +395 -0
  56. data/node_modules/preact/devtools/index.js +4 -0
  57. data/node_modules/preact/dist/preact.d.ts +891 -0
  58. data/node_modules/preact/dist/preact.dev.js +718 -0
  59. data/node_modules/preact/dist/preact.dev.js.map +1 -0
  60. data/node_modules/preact/dist/preact.js +408 -0
  61. data/node_modules/preact/dist/preact.js.flow +13 -0
  62. data/node_modules/preact/dist/preact.js.map +1 -0
  63. data/node_modules/preact/dist/preact.min.js +2 -0
  64. data/node_modules/preact/dist/preact.min.js.map +1 -0
  65. data/node_modules/preact/dist/preact.mjs +715 -0
  66. data/node_modules/preact/dist/preact.mjs.map +1 -0
  67. data/node_modules/preact/package.json +218 -0
  68. data/node_modules/preact/src/clone-element.js +18 -0
  69. data/node_modules/preact/src/component.js +90 -0
  70. data/node_modules/preact/src/constants.js +17 -0
  71. data/node_modules/preact/src/dom/index.js +138 -0
  72. data/node_modules/preact/src/h.js +86 -0
  73. data/node_modules/preact/src/options.js +22 -0
  74. data/node_modules/preact/src/preact.d.ts +891 -0
  75. data/node_modules/preact/src/preact.js +26 -0
  76. data/node_modules/preact/src/preact.js.flow +13 -0
  77. data/node_modules/preact/src/render-queue.js +28 -0
  78. data/node_modules/preact/src/render.js +22 -0
  79. data/node_modules/preact/src/util.js +19 -0
  80. data/node_modules/preact/src/vdom/component-recycler.js +48 -0
  81. data/node_modules/preact/src/vdom/component.js +296 -0
  82. data/node_modules/preact/src/vdom/diff.js +336 -0
  83. data/node_modules/preact/src/vdom/index.js +54 -0
  84. data/node_modules/preact/src/vnode.js +9 -0
  85. data/node_modules/preact/typings.json +5 -0
  86. metadata +78 -2
@@ -0,0 +1,86 @@
1
+ import { VNode } from './vnode';
2
+ import options from './options';
3
+
4
+
5
+ const stack = [];
6
+
7
+ const EMPTY_CHILDREN = [];
8
+
9
+ /**
10
+ * JSX/hyperscript reviver.
11
+ * @see http://jasonformat.com/wtf-is-jsx
12
+ * Benchmarks: https://esbench.com/bench/57ee8f8e330ab09900a1a1a0
13
+ *
14
+ * Note: this is exported as both `h()` and `createElement()` for compatibility
15
+ * reasons.
16
+ *
17
+ * Creates a VNode (virtual DOM element). A tree of VNodes can be used as a
18
+ * lightweight representation of the structure of a DOM tree. This structure can
19
+ * be realized by recursively comparing it against the current _actual_ DOM
20
+ * structure, and applying only the differences.
21
+ *
22
+ * `h()`/`createElement()` accepts an element name, a list of attributes/props,
23
+ * and optionally children to append to the element.
24
+ *
25
+ * @example The following DOM tree
26
+ *
27
+ * `<div id="foo" name="bar">Hello!</div>`
28
+ *
29
+ * can be constructed using this function as:
30
+ *
31
+ * `h('div', { id: 'foo', name : 'bar' }, 'Hello!');`
32
+ *
33
+ * @param {string | function} nodeName An element name. Ex: `div`, `a`, `span`, etc.
34
+ * @param {object | null} attributes Any attributes/props to set on the created element.
35
+ * @param {VNode[]} [rest] Additional arguments are taken to be children to
36
+ * append. Can be infinitely nested Arrays.
37
+ *
38
+ * @public
39
+ */
40
+ export function h(nodeName, attributes) {
41
+ let children=EMPTY_CHILDREN, lastSimple, child, simple, i;
42
+ for (i=arguments.length; i-- > 2; ) {
43
+ stack.push(arguments[i]);
44
+ }
45
+ if (attributes && attributes.children!=null) {
46
+ if (!stack.length) stack.push(attributes.children);
47
+ delete attributes.children;
48
+ }
49
+ while (stack.length) {
50
+ if ((child = stack.pop()) && child.pop!==undefined) {
51
+ for (i=child.length; i--; ) stack.push(child[i]);
52
+ }
53
+ else {
54
+ if (typeof child==='boolean') child = null;
55
+
56
+ if ((simple = typeof nodeName!=='function')) {
57
+ if (child==null) child = '';
58
+ else if (typeof child==='number') child = String(child);
59
+ else if (typeof child!=='string') simple = false;
60
+ }
61
+
62
+ if (simple && lastSimple) {
63
+ children[children.length-1] += child;
64
+ }
65
+ else if (children===EMPTY_CHILDREN) {
66
+ children = [child];
67
+ }
68
+ else {
69
+ children.push(child);
70
+ }
71
+
72
+ lastSimple = simple;
73
+ }
74
+ }
75
+
76
+ let p = new VNode();
77
+ p.nodeName = nodeName;
78
+ p.children = children;
79
+ p.attributes = attributes==null ? undefined : attributes;
80
+ p.key = attributes==null ? undefined : attributes.key;
81
+
82
+ // if a "vnode hook" is defined, pass every created VNode to it
83
+ if (options.vnode!==undefined) options.vnode(p);
84
+
85
+ return p;
86
+ }
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @typedef {import('./component').Component} Component
3
+ * @typedef {import('./vnode').VNode} VNode
4
+ */
5
+
6
+ /**
7
+ * Global options
8
+ * @public
9
+ * @typedef Options
10
+ * @property {boolean} [syncComponentUpdates] If `true`, `prop` changes trigger synchronous component updates. Defaults to true.
11
+ * @property {(vnode: VNode) => void} [vnode] Processes all created VNodes.
12
+ * @property {(component: Component) => void} [afterMount] Hook invoked after a component is mounted.
13
+ * @property {(component: Component) => void} [afterUpdate] Hook invoked after the DOM is updated with a component's latest render.
14
+ * @property {(component: Component) => void} [beforeUnmount] Hook invoked immediately before a component is unmounted.
15
+ * @property {(rerender: function) => void} [debounceRendering] Hook invoked whenever a rerender is requested. Can be used to debounce rerenders.
16
+ * @property {(event: Event) => Event | void} [event] Hook invoked before any Preact event listeners. The return value (if any) replaces the native browser event given to event listeners
17
+ */
18
+
19
+ /** @type {Options} */
20
+ const options = {};
21
+
22
+ export default options;
@@ -0,0 +1,891 @@
1
+ export = preact;
2
+ export as namespace preact;
3
+
4
+ declare namespace preact {
5
+ type Key = string | number;
6
+ type Ref<T> = (instance: T) => void;
7
+ type ComponentChild = VNode<any> | string | number | null;
8
+ type ComponentChildren = ComponentChild[] | ComponentChild | object | string | number | null;
9
+
10
+ /**
11
+ * @deprecated
12
+ *
13
+ * Use Attributes instead
14
+ */
15
+ type ComponentProps = Attributes;
16
+
17
+ /**
18
+ * @deprecated
19
+ *
20
+ * Use ClassAttributes instead
21
+ */
22
+ type PreactHTMLAttributes = ClassAttributes<any>;
23
+
24
+ interface Attributes {
25
+ key?: string | number | any;
26
+ jsx?: boolean;
27
+ }
28
+
29
+ interface ClassAttributes<T> extends Attributes {
30
+ ref?: Ref<T>;
31
+ }
32
+
33
+ interface PreactDOMAttributes {
34
+ children?: ComponentChildren;
35
+ dangerouslySetInnerHTML?: {
36
+ __html: string;
37
+ };
38
+ }
39
+
40
+ type ComponentFactory<P> = ComponentConstructor<P> | FunctionalComponent<P>;
41
+ /**
42
+ * Define the contract for a virtual node in preact.
43
+ *
44
+ * A virtual node has a name, a map of attributes, an array
45
+ * of child {VNode}s and a key. The key is used by preact for
46
+ * internal purposes.
47
+ */
48
+ interface VNode<P = any> {
49
+ nodeName: ComponentFactory<P> | string;
50
+ attributes: P;
51
+ children: Array<VNode<any> | string>;
52
+ key?: Key | null;
53
+ }
54
+
55
+ type RenderableProps<P, RefType = any> = Readonly<
56
+ P & Attributes & { children?: ComponentChildren; ref?: Ref<RefType> }
57
+ >;
58
+
59
+ interface FunctionalComponent<P = {}> {
60
+ (props: RenderableProps<P>, context?: any): VNode<any> | null;
61
+ displayName?: string;
62
+ defaultProps?: Partial<P>;
63
+ }
64
+
65
+ interface ComponentConstructor<P = {}, S = {}> {
66
+ new (props: P, context?: any): Component<P, S>;
67
+ displayName?: string;
68
+ defaultProps?: Partial<P>;
69
+ }
70
+
71
+ // Type alias for a component considered generally, whether stateless or stateful.
72
+ type AnyComponent<P = {}, S = {}> = FunctionalComponent<P> | Component<P, S>;
73
+
74
+ interface Component<P = {}, S = {}> {
75
+ componentWillMount?(): void;
76
+ componentDidMount?(): void;
77
+ componentWillUnmount?(): void;
78
+ getChildContext?(): object;
79
+ componentWillReceiveProps?(nextProps: Readonly<P>, nextContext: any): void;
80
+ shouldComponentUpdate?(nextProps: Readonly<P>, nextState: Readonly<S>, nextContext: any): boolean;
81
+ componentWillUpdate?(nextProps: Readonly<P>, nextState: Readonly<S>, nextContext: any): void;
82
+ componentDidUpdate?(previousProps: Readonly<P>, previousState: Readonly<S>, previousContext: any): void;
83
+ }
84
+
85
+ abstract class Component<P, S> {
86
+ constructor(props?: P, context?: any);
87
+
88
+ static displayName?: string;
89
+ static defaultProps?: any;
90
+
91
+ state: Readonly<S>;
92
+ props: RenderableProps<P>;
93
+ context: any;
94
+ base?: HTMLElement;
95
+
96
+ setState<K extends keyof S>(state: Pick<S, K>, callback?: () => void): void;
97
+ setState<K extends keyof S>(fn: (prevState: S, props: P) => Pick<S, K>, callback?: () => void): void;
98
+
99
+ forceUpdate(callback?: () => void): void;
100
+
101
+ abstract render(props?: RenderableProps<P>, state?: Readonly<S>, context?: any): ComponentChild;
102
+ }
103
+
104
+ function h<P>(
105
+ node: ComponentFactory<P>,
106
+ params: Attributes & P | null,
107
+ ...children: ComponentChildren[]
108
+ ): VNode<any>;
109
+ function h(
110
+ node: string,
111
+ params: JSX.HTMLAttributes & JSX.SVGAttributes & Record<string, any> | null,
112
+ ...children: ComponentChildren[]
113
+ ): VNode<any>;
114
+
115
+ function render(node: ComponentChild, parent: Element | Document | ShadowRoot | DocumentFragment, mergeWith?: Element): Element;
116
+ function rerender(): void;
117
+ function cloneElement(element: JSX.Element, props: any): JSX.Element;
118
+
119
+ var options: {
120
+ syncComponentUpdates?: boolean;
121
+ debounceRendering?: (render: () => void) => void;
122
+ vnode?: (vnode: VNode<any>) => void;
123
+ event?: (event: Event) => Event;
124
+ };
125
+ }
126
+
127
+ declare global {
128
+ namespace JSX {
129
+ interface Element extends preact.VNode<any> {
130
+ }
131
+
132
+ interface ElementClass extends preact.Component<any, any> {
133
+ }
134
+
135
+ interface ElementAttributesProperty {
136
+ props: any;
137
+ }
138
+
139
+ interface ElementChildrenAttribute {
140
+ children: any;
141
+ }
142
+
143
+ interface SVGAttributes extends HTMLAttributes {
144
+ accentHeight?: number | string;
145
+ accumulate?: "none" | "sum";
146
+ additive?: "replace" | "sum";
147
+ alignmentBaseline?: "auto" | "baseline" | "before-edge" | "text-before-edge" | "middle" | "central" | "after-edge" | "text-after-edge" | "ideographic" | "alphabetic" | "hanging" | "mathematical" | "inherit";
148
+ allowReorder?: "no" | "yes";
149
+ alphabetic?: number | string;
150
+ amplitude?: number | string;
151
+ arabicForm?: "initial" | "medial" | "terminal" | "isolated";
152
+ ascent?: number | string;
153
+ attributeName?: string;
154
+ attributeType?: string;
155
+ autoReverse?: number | string;
156
+ azimuth?: number | string;
157
+ baseFrequency?: number | string;
158
+ baselineShift?: number | string;
159
+ baseProfile?: number | string;
160
+ bbox?: number | string;
161
+ begin?: number | string;
162
+ bias?: number | string;
163
+ by?: number | string;
164
+ calcMode?: number | string;
165
+ capHeight?: number | string;
166
+ clip?: number | string;
167
+ clipPath?: string;
168
+ clipPathUnits?: number | string;
169
+ clipRule?: number | string;
170
+ colorInterpolation?: number | string;
171
+ colorInterpolationFilters?: "auto" | "sRGB" | "linearRGB" | "inherit";
172
+ colorProfile?: number | string;
173
+ colorRendering?: number | string;
174
+ contentScriptType?: number | string;
175
+ contentStyleType?: number | string;
176
+ cursor?: number | string;
177
+ cx?: number | string;
178
+ cy?: number | string;
179
+ d?: string;
180
+ decelerate?: number | string;
181
+ descent?: number | string;
182
+ diffuseConstant?: number | string;
183
+ direction?: number | string;
184
+ display?: number | string;
185
+ divisor?: number | string;
186
+ dominantBaseline?: number | string;
187
+ dur?: number | string;
188
+ dx?: number | string;
189
+ dy?: number | string;
190
+ edgeMode?: number | string;
191
+ elevation?: number | string;
192
+ enableBackground?: number | string;
193
+ end?: number | string;
194
+ exponent?: number | string;
195
+ externalResourcesRequired?: number | string;
196
+ fill?: string;
197
+ fillOpacity?: number | string;
198
+ fillRule?: "nonzero" | "evenodd" | "inherit";
199
+ filter?: string;
200
+ filterRes?: number | string;
201
+ filterUnits?: number | string;
202
+ floodColor?: number | string;
203
+ floodOpacity?: number | string;
204
+ focusable?: number | string;
205
+ fontFamily?: string;
206
+ fontSize?: number | string;
207
+ fontSizeAdjust?: number | string;
208
+ fontStretch?: number | string;
209
+ fontStyle?: number | string;
210
+ fontVariant?: number | string;
211
+ fontWeight?: number | string;
212
+ format?: number | string;
213
+ from?: number | string;
214
+ fx?: number | string;
215
+ fy?: number | string;
216
+ g1?: number | string;
217
+ g2?: number | string;
218
+ glyphName?: number | string;
219
+ glyphOrientationHorizontal?: number | string;
220
+ glyphOrientationVertical?: number | string;
221
+ glyphRef?: number | string;
222
+ gradientTransform?: string;
223
+ gradientUnits?: string;
224
+ hanging?: number | string;
225
+ horizAdvX?: number | string;
226
+ horizOriginX?: number | string;
227
+ ideographic?: number | string;
228
+ imageRendering?: number | string;
229
+ in2?: number | string;
230
+ in?: string;
231
+ intercept?: number | string;
232
+ k1?: number | string;
233
+ k2?: number | string;
234
+ k3?: number | string;
235
+ k4?: number | string;
236
+ k?: number | string;
237
+ kernelMatrix?: number | string;
238
+ kernelUnitLength?: number | string;
239
+ kerning?: number | string;
240
+ keyPoints?: number | string;
241
+ keySplines?: number | string;
242
+ keyTimes?: number | string;
243
+ lengthAdjust?: number | string;
244
+ letterSpacing?: number | string;
245
+ lightingColor?: number | string;
246
+ limitingConeAngle?: number | string;
247
+ local?: number | string;
248
+ markerEnd?: string;
249
+ markerHeight?: number | string;
250
+ markerMid?: string;
251
+ markerStart?: string;
252
+ markerUnits?: number | string;
253
+ markerWidth?: number | string;
254
+ mask?: string;
255
+ maskContentUnits?: number | string;
256
+ maskUnits?: number | string;
257
+ mathematical?: number | string;
258
+ mode?: number | string;
259
+ numOctaves?: number | string;
260
+ offset?: number | string;
261
+ opacity?: number | string;
262
+ operator?: number | string;
263
+ order?: number | string;
264
+ orient?: number | string;
265
+ orientation?: number | string;
266
+ origin?: number | string;
267
+ overflow?: number | string;
268
+ overlinePosition?: number | string;
269
+ overlineThickness?: number | string;
270
+ paintOrder?: number | string;
271
+ panose1?: number | string;
272
+ pathLength?: number | string;
273
+ patternContentUnits?: string;
274
+ patternTransform?: number | string;
275
+ patternUnits?: string;
276
+ pointerEvents?: number | string;
277
+ points?: string;
278
+ pointsAtX?: number | string;
279
+ pointsAtY?: number | string;
280
+ pointsAtZ?: number | string;
281
+ preserveAlpha?: number | string;
282
+ preserveAspectRatio?: string;
283
+ primitiveUnits?: number | string;
284
+ r?: number | string;
285
+ radius?: number | string;
286
+ refX?: number | string;
287
+ refY?: number | string;
288
+ renderingIntent?: number | string;
289
+ repeatCount?: number | string;
290
+ repeatDur?: number | string;
291
+ requiredExtensions?: number | string;
292
+ requiredFeatures?: number | string;
293
+ restart?: number | string;
294
+ result?: string;
295
+ rotate?: number | string;
296
+ rx?: number | string;
297
+ ry?: number | string;
298
+ scale?: number | string;
299
+ seed?: number | string;
300
+ shapeRendering?: number | string;
301
+ slope?: number | string;
302
+ spacing?: number | string;
303
+ specularConstant?: number | string;
304
+ specularExponent?: number | string;
305
+ speed?: number | string;
306
+ spreadMethod?: string;
307
+ startOffset?: number | string;
308
+ stdDeviation?: number | string;
309
+ stemh?: number | string;
310
+ stemv?: number | string;
311
+ stitchTiles?: number | string;
312
+ stopColor?: string;
313
+ stopOpacity?: number | string;
314
+ strikethroughPosition?: number | string;
315
+ strikethroughThickness?: number | string;
316
+ string?: number | string;
317
+ stroke?: string;
318
+ strokeDasharray?: string | number;
319
+ strokeDashoffset?: string | number;
320
+ strokeLinecap?: "butt" | "round" | "square" | "inherit";
321
+ strokeLinejoin?: "miter" | "round" | "bevel" | "inherit";
322
+ strokeMiterlimit?: string;
323
+ strokeOpacity?: number | string;
324
+ strokeWidth?: number | string;
325
+ surfaceScale?: number | string;
326
+ systemLanguage?: number | string;
327
+ tableValues?: number | string;
328
+ targetX?: number | string;
329
+ targetY?: number | string;
330
+ textAnchor?: string;
331
+ textDecoration?: number | string;
332
+ textLength?: number | string;
333
+ textRendering?: number | string;
334
+ to?: number | string;
335
+ transform?: string;
336
+ u1?: number | string;
337
+ u2?: number | string;
338
+ underlinePosition?: number | string;
339
+ underlineThickness?: number | string;
340
+ unicode?: number | string;
341
+ unicodeBidi?: number | string;
342
+ unicodeRange?: number | string;
343
+ unitsPerEm?: number | string;
344
+ vAlphabetic?: number | string;
345
+ values?: string;
346
+ vectorEffect?: number | string;
347
+ version?: string;
348
+ vertAdvY?: number | string;
349
+ vertOriginX?: number | string;
350
+ vertOriginY?: number | string;
351
+ vHanging?: number | string;
352
+ vIdeographic?: number | string;
353
+ viewBox?: string;
354
+ viewTarget?: number | string;
355
+ visibility?: number | string;
356
+ vMathematical?: number | string;
357
+ widths?: number | string;
358
+ wordSpacing?: number | string;
359
+ writingMode?: number | string;
360
+ x1?: number | string;
361
+ x2?: number | string;
362
+ x?: number | string;
363
+ xChannelSelector?: string;
364
+ xHeight?: number | string;
365
+ xlinkActuate?: string;
366
+ xlinkArcrole?: string;
367
+ xlinkHref?: string;
368
+ xlinkRole?: string;
369
+ xlinkShow?: string;
370
+ xlinkTitle?: string;
371
+ xlinkType?: string;
372
+ xmlBase?: string;
373
+ xmlLang?: string;
374
+ xmlns?: string;
375
+ xmlnsXlink?: string;
376
+ xmlSpace?: string;
377
+ y1?: number | string;
378
+ y2?: number | string;
379
+ y?: number | string;
380
+ yChannelSelector?: string;
381
+ z?: number | string;
382
+ zoomAndPan?: string;
383
+ }
384
+
385
+ interface PathAttributes {
386
+ d: string;
387
+ }
388
+
389
+ interface EventHandler<E extends Event> {
390
+ (event: E): void;
391
+ }
392
+
393
+ type ClipboardEventHandler = EventHandler<ClipboardEvent>;
394
+ type CompositionEventHandler = EventHandler<CompositionEvent>;
395
+ type DragEventHandler = EventHandler<DragEvent>;
396
+ type FocusEventHandler = EventHandler<FocusEvent>;
397
+ type KeyboardEventHandler = EventHandler<KeyboardEvent>;
398
+ type MouseEventHandler = EventHandler<MouseEvent>;
399
+ type TouchEventHandler = EventHandler<TouchEvent>;
400
+ type UIEventHandler = EventHandler<UIEvent>;
401
+ type WheelEventHandler = EventHandler<WheelEvent>;
402
+ type AnimationEventHandler = EventHandler<AnimationEvent>;
403
+ type TransitionEventHandler = EventHandler<TransitionEvent>;
404
+ type GenericEventHandler = EventHandler<Event>;
405
+ type PointerEventHandler = EventHandler<PointerEvent>;
406
+
407
+ interface DOMAttributes extends preact.PreactDOMAttributes {
408
+ // Image Events
409
+ onLoad?: GenericEventHandler;
410
+ onLoadCapture?: GenericEventHandler;
411
+
412
+ // Clipboard Events
413
+ onCopy?: ClipboardEventHandler;
414
+ onCopyCapture?: ClipboardEventHandler;
415
+ onCut?: ClipboardEventHandler;
416
+ onCutCapture?: ClipboardEventHandler;
417
+ onPaste?: ClipboardEventHandler;
418
+ onPasteCapture?: ClipboardEventHandler;
419
+
420
+ // Composition Events
421
+ onCompositionEnd?: CompositionEventHandler;
422
+ onCompositionEndCapture?: CompositionEventHandler;
423
+ onCompositionStart?: CompositionEventHandler;
424
+ onCompositionStartCapture?: CompositionEventHandler;
425
+ onCompositionUpdate?: CompositionEventHandler;
426
+ onCompositionUpdateCapture?: CompositionEventHandler;
427
+
428
+ // Focus Events
429
+ onFocus?: FocusEventHandler;
430
+ onFocusCapture?: FocusEventHandler;
431
+ onBlur?: FocusEventHandler;
432
+ onBlurCapture?: FocusEventHandler;
433
+
434
+ // Form Events
435
+ onChange?: GenericEventHandler;
436
+ onChangeCapture?: GenericEventHandler;
437
+ onInput?: GenericEventHandler;
438
+ onInputCapture?: GenericEventHandler;
439
+ onSearch?: GenericEventHandler;
440
+ onSearchCapture?: GenericEventHandler;
441
+ onSubmit?: GenericEventHandler;
442
+ onSubmitCapture?: GenericEventHandler;
443
+
444
+ // Keyboard Events
445
+ onKeyDown?: KeyboardEventHandler;
446
+ onKeyDownCapture?: KeyboardEventHandler;
447
+ onKeyPress?: KeyboardEventHandler;
448
+ onKeyPressCapture?: KeyboardEventHandler;
449
+ onKeyUp?: KeyboardEventHandler;
450
+ onKeyUpCapture?: KeyboardEventHandler;
451
+
452
+ // Media Events
453
+ onAbort?: GenericEventHandler;
454
+ onAbortCapture?: GenericEventHandler;
455
+ onCanPlay?: GenericEventHandler;
456
+ onCanPlayCapture?: GenericEventHandler;
457
+ onCanPlayThrough?: GenericEventHandler;
458
+ onCanPlayThroughCapture?: GenericEventHandler;
459
+ onDurationChange?: GenericEventHandler;
460
+ onDurationChangeCapture?: GenericEventHandler;
461
+ onEmptied?: GenericEventHandler;
462
+ onEmptiedCapture?: GenericEventHandler;
463
+ onEncrypted?: GenericEventHandler;
464
+ onEncryptedCapture?: GenericEventHandler;
465
+ onEnded?: GenericEventHandler;
466
+ onEndedCapture?: GenericEventHandler;
467
+ onLoadedData?: GenericEventHandler;
468
+ onLoadedDataCapture?: GenericEventHandler;
469
+ onLoadedMetadata?: GenericEventHandler;
470
+ onLoadedMetadataCapture?: GenericEventHandler;
471
+ onLoadStart?: GenericEventHandler;
472
+ onLoadStartCapture?: GenericEventHandler;
473
+ onPause?: GenericEventHandler;
474
+ onPauseCapture?: GenericEventHandler;
475
+ onPlay?: GenericEventHandler;
476
+ onPlayCapture?: GenericEventHandler;
477
+ onPlaying?: GenericEventHandler;
478
+ onPlayingCapture?: GenericEventHandler;
479
+ onProgress?: GenericEventHandler;
480
+ onProgressCapture?: GenericEventHandler;
481
+ onRateChange?: GenericEventHandler;
482
+ onRateChangeCapture?: GenericEventHandler;
483
+ onSeeked?: GenericEventHandler;
484
+ onSeekedCapture?: GenericEventHandler;
485
+ onSeeking?: GenericEventHandler;
486
+ onSeekingCapture?: GenericEventHandler;
487
+ onStalled?: GenericEventHandler;
488
+ onStalledCapture?: GenericEventHandler;
489
+ onSuspend?: GenericEventHandler;
490
+ onSuspendCapture?: GenericEventHandler;
491
+ onTimeUpdate?: GenericEventHandler;
492
+ onTimeUpdateCapture?: GenericEventHandler;
493
+ onVolumeChange?: GenericEventHandler;
494
+ onVolumeChangeCapture?: GenericEventHandler;
495
+ onWaiting?: GenericEventHandler;
496
+ onWaitingCapture?: GenericEventHandler;
497
+
498
+ // MouseEvents
499
+ onClick?: MouseEventHandler;
500
+ onClickCapture?: MouseEventHandler;
501
+ onContextMenu?: MouseEventHandler;
502
+ onContextMenuCapture?: MouseEventHandler;
503
+ onDblClick?: MouseEventHandler;
504
+ onDblClickCapture?: MouseEventHandler;
505
+ onDrag?: DragEventHandler;
506
+ onDragCapture?: DragEventHandler;
507
+ onDragEnd?: DragEventHandler;
508
+ onDragEndCapture?: DragEventHandler;
509
+ onDragEnter?: DragEventHandler;
510
+ onDragEnterCapture?: DragEventHandler;
511
+ onDragExit?: DragEventHandler;
512
+ onDragExitCapture?: DragEventHandler;
513
+ onDragLeave?: DragEventHandler;
514
+ onDragLeaveCapture?: DragEventHandler;
515
+ onDragOver?: DragEventHandler;
516
+ onDragOverCapture?: DragEventHandler;
517
+ onDragStart?: DragEventHandler;
518
+ onDragStartCapture?: DragEventHandler;
519
+ onDrop?: DragEventHandler;
520
+ onDropCapture?: DragEventHandler;
521
+ onMouseDown?: MouseEventHandler;
522
+ onMouseDownCapture?: MouseEventHandler;
523
+ onMouseEnter?: MouseEventHandler;
524
+ onMouseEnterCapture?: MouseEventHandler;
525
+ onMouseLeave?: MouseEventHandler;
526
+ onMouseLeaveCapture?: MouseEventHandler;
527
+ onMouseMove?: MouseEventHandler;
528
+ onMouseMoveCapture?: MouseEventHandler;
529
+ onMouseOut?: MouseEventHandler;
530
+ onMouseOutCapture?: MouseEventHandler;
531
+ onMouseOver?: MouseEventHandler;
532
+ onMouseOverCapture?: MouseEventHandler;
533
+ onMouseUp?: MouseEventHandler;
534
+ onMouseUpCapture?: MouseEventHandler;
535
+
536
+ // Selection Events
537
+ onSelect?: GenericEventHandler;
538
+ onSelectCapture?: GenericEventHandler;
539
+
540
+ // Touch Events
541
+ onTouchCancel?: TouchEventHandler;
542
+ onTouchCancelCapture?: TouchEventHandler;
543
+ onTouchEnd?: TouchEventHandler;
544
+ onTouchEndCapture?: TouchEventHandler;
545
+ onTouchMove?: TouchEventHandler;
546
+ onTouchMoveCapture?: TouchEventHandler;
547
+ onTouchStart?: TouchEventHandler;
548
+ onTouchStartCapture?: TouchEventHandler;
549
+
550
+ // Pointer Events
551
+ onPointerOver?: PointerEventHandler;
552
+ onPointerOverCapture?: PointerEventHandler;
553
+ onPointerEnter?: PointerEventHandler;
554
+ onPointerEnterCapture?: PointerEventHandler;
555
+ onPointerDown?: PointerEventHandler;
556
+ onPointerDownCapture?: PointerEventHandler;
557
+ onPointerMove?: PointerEventHandler;
558
+ onPointerMoveCapture?: PointerEventHandler;
559
+ onPointerUp?: PointerEventHandler;
560
+ onPointerUpCapture?: PointerEventHandler;
561
+ onPointerCancel?: PointerEventHandler;
562
+ onPointerCancelCapture?: PointerEventHandler;
563
+ onPointerOut?: PointerEventHandler;
564
+ onPointerOutCapture?: PointerEventHandler;
565
+ onPointerLeave?: PointerEventHandler;
566
+ onPointerLeaveCapture?: PointerEventHandler;
567
+ onGotPointerCapture?: PointerEventHandler;
568
+ onGotPointerCaptureCapture?: PointerEventHandler;
569
+ onLostPointerCapture?: PointerEventHandler;
570
+ onLostPointerCaptureCapture?: PointerEventHandler;
571
+
572
+ // UI Events
573
+ onScroll?: UIEventHandler;
574
+ onScrollCapture?: UIEventHandler;
575
+
576
+ // Wheel Events
577
+ onWheel?: WheelEventHandler;
578
+ onWheelCapture?: WheelEventHandler;
579
+
580
+ // Animation Events
581
+ onAnimationStart?: AnimationEventHandler;
582
+ onAnimationStartCapture?: AnimationEventHandler;
583
+ onAnimationEnd?: AnimationEventHandler;
584
+ onAnimationEndCapture?: AnimationEventHandler;
585
+ onAnimationIteration?: AnimationEventHandler;
586
+ onAnimationIterationCapture?: AnimationEventHandler;
587
+
588
+ // Transition Events
589
+ onTransitionEnd?: TransitionEventHandler;
590
+ onTransitionEndCapture?: TransitionEventHandler;
591
+ }
592
+
593
+ interface HTMLAttributes extends preact.PreactHTMLAttributes, DOMAttributes {
594
+ // Standard HTML Attributes
595
+ accept?: string;
596
+ acceptCharset?: string;
597
+ accessKey?: string;
598
+ action?: string;
599
+ allowFullScreen?: boolean;
600
+ allowTransparency?: boolean;
601
+ alt?: string;
602
+ async?: boolean;
603
+ autocomplete?: string;
604
+ autofocus?: boolean;
605
+ autoPlay?: boolean;
606
+ capture?: boolean;
607
+ cellPadding?: number | string;
608
+ cellSpacing?: number | string;
609
+ charSet?: string;
610
+ challenge?: string;
611
+ checked?: boolean;
612
+ class?: string;
613
+ className?: string;
614
+ cols?: number;
615
+ colSpan?: number;
616
+ content?: string;
617
+ contentEditable?: boolean;
618
+ contextMenu?: string;
619
+ controls?: boolean;
620
+ controlsList?: string;
621
+ coords?: string;
622
+ crossOrigin?: string;
623
+ data?: string;
624
+ dateTime?: string;
625
+ default?: boolean;
626
+ defer?: boolean;
627
+ dir?: string;
628
+ disabled?: boolean;
629
+ download?: any;
630
+ draggable?: boolean;
631
+ encType?: string;
632
+ form?: string;
633
+ formAction?: string;
634
+ formEncType?: string;
635
+ formMethod?: string;
636
+ formNoValidate?: boolean;
637
+ formTarget?: string;
638
+ frameBorder?: number | string;
639
+ headers?: string;
640
+ height?: number | string;
641
+ hidden?: boolean;
642
+ high?: number;
643
+ href?: string;
644
+ hrefLang?: string;
645
+ for?: string;
646
+ httpEquiv?: string;
647
+ icon?: string;
648
+ id?: string;
649
+ inputMode?: string;
650
+ integrity?: string;
651
+ is?: string;
652
+ keyParams?: string;
653
+ keyType?: string;
654
+ kind?: string;
655
+ label?: string;
656
+ lang?: string;
657
+ list?: string;
658
+ loop?: boolean;
659
+ low?: number;
660
+ manifest?: string;
661
+ marginHeight?: number;
662
+ marginWidth?: number;
663
+ max?: number | string;
664
+ maxLength?: number;
665
+ media?: string;
666
+ mediaGroup?: string;
667
+ method?: string;
668
+ min?: number | string;
669
+ minLength?: number;
670
+ multiple?: boolean;
671
+ muted?: boolean;
672
+ name?: string;
673
+ noValidate?: boolean;
674
+ open?: boolean;
675
+ optimum?: number;
676
+ pattern?: string;
677
+ placeholder?: string;
678
+ playsInline?: boolean;
679
+ poster?: string;
680
+ preload?: string;
681
+ radioGroup?: string;
682
+ readOnly?: boolean;
683
+ rel?: string;
684
+ required?: boolean;
685
+ role?: string;
686
+ rows?: number;
687
+ rowSpan?: number;
688
+ sandbox?: string;
689
+ scope?: string;
690
+ scoped?: boolean;
691
+ scrolling?: string;
692
+ seamless?: boolean;
693
+ selected?: boolean;
694
+ shape?: string;
695
+ size?: number;
696
+ sizes?: string;
697
+ slot?: string;
698
+ span?: number;
699
+ spellcheck?: boolean;
700
+ src?: string;
701
+ srcset?: string;
702
+ srcDoc?: string;
703
+ srcLang?: string;
704
+ srcSet?: string;
705
+ start?: number;
706
+ step?: number | string;
707
+ style?: any;
708
+ summary?: string;
709
+ tabIndex?: number;
710
+ target?: string;
711
+ title?: string;
712
+ type?: string;
713
+ useMap?: string;
714
+ value?: string | string[] | number;
715
+ width?: number | string;
716
+ wmode?: string;
717
+ wrap?: string;
718
+
719
+ // RDFa Attributes
720
+ about?: string;
721
+ datatype?: string;
722
+ inlist?: any;
723
+ prefix?: string;
724
+ property?: string;
725
+ resource?: string;
726
+ typeof?: string;
727
+ vocab?: string;
728
+ }
729
+
730
+ interface IntrinsicElements {
731
+ // HTML
732
+ a: HTMLAttributes;
733
+ abbr: HTMLAttributes;
734
+ address: HTMLAttributes;
735
+ area: HTMLAttributes;
736
+ article: HTMLAttributes;
737
+ aside: HTMLAttributes;
738
+ audio: HTMLAttributes;
739
+ b: HTMLAttributes;
740
+ base: HTMLAttributes;
741
+ bdi: HTMLAttributes;
742
+ bdo: HTMLAttributes;
743
+ big: HTMLAttributes;
744
+ blockquote: HTMLAttributes;
745
+ body: HTMLAttributes;
746
+ br: HTMLAttributes;
747
+ button: HTMLAttributes;
748
+ canvas: HTMLAttributes;
749
+ caption: HTMLAttributes;
750
+ cite: HTMLAttributes;
751
+ code: HTMLAttributes;
752
+ col: HTMLAttributes;
753
+ colgroup: HTMLAttributes;
754
+ data: HTMLAttributes;
755
+ datalist: HTMLAttributes;
756
+ dd: HTMLAttributes;
757
+ del: HTMLAttributes;
758
+ details: HTMLAttributes;
759
+ dfn: HTMLAttributes;
760
+ dialog: HTMLAttributes;
761
+ div: HTMLAttributes;
762
+ dl: HTMLAttributes;
763
+ dt: HTMLAttributes;
764
+ em: HTMLAttributes;
765
+ embed: HTMLAttributes;
766
+ fieldset: HTMLAttributes;
767
+ figcaption: HTMLAttributes;
768
+ figure: HTMLAttributes;
769
+ footer: HTMLAttributes;
770
+ form: HTMLAttributes;
771
+ h1: HTMLAttributes;
772
+ h2: HTMLAttributes;
773
+ h3: HTMLAttributes;
774
+ h4: HTMLAttributes;
775
+ h5: HTMLAttributes;
776
+ h6: HTMLAttributes;
777
+ head: HTMLAttributes;
778
+ header: HTMLAttributes;
779
+ hr: HTMLAttributes;
780
+ html: HTMLAttributes;
781
+ i: HTMLAttributes;
782
+ iframe: HTMLAttributes;
783
+ img: HTMLAttributes;
784
+ input: HTMLAttributes;
785
+ ins: HTMLAttributes;
786
+ kbd: HTMLAttributes;
787
+ keygen: HTMLAttributes;
788
+ label: HTMLAttributes;
789
+ legend: HTMLAttributes;
790
+ li: HTMLAttributes;
791
+ link: HTMLAttributes;
792
+ main: HTMLAttributes;
793
+ map: HTMLAttributes;
794
+ mark: HTMLAttributes;
795
+ menu: HTMLAttributes;
796
+ menuitem: HTMLAttributes;
797
+ meta: HTMLAttributes;
798
+ meter: HTMLAttributes;
799
+ nav: HTMLAttributes;
800
+ noscript: HTMLAttributes;
801
+ object: HTMLAttributes;
802
+ ol: HTMLAttributes;
803
+ optgroup: HTMLAttributes;
804
+ option: HTMLAttributes;
805
+ output: HTMLAttributes;
806
+ p: HTMLAttributes;
807
+ param: HTMLAttributes;
808
+ picture: HTMLAttributes;
809
+ pre: HTMLAttributes;
810
+ progress: HTMLAttributes;
811
+ q: HTMLAttributes;
812
+ rp: HTMLAttributes;
813
+ rt: HTMLAttributes;
814
+ ruby: HTMLAttributes;
815
+ s: HTMLAttributes;
816
+ samp: HTMLAttributes;
817
+ script: HTMLAttributes;
818
+ section: HTMLAttributes;
819
+ select: HTMLAttributes;
820
+ slot: HTMLAttributes;
821
+ small: HTMLAttributes;
822
+ source: HTMLAttributes;
823
+ span: HTMLAttributes;
824
+ strong: HTMLAttributes;
825
+ style: HTMLAttributes;
826
+ sub: HTMLAttributes;
827
+ summary: HTMLAttributes;
828
+ sup: HTMLAttributes;
829
+ table: HTMLAttributes;
830
+ tbody: HTMLAttributes;
831
+ td: HTMLAttributes;
832
+ textarea: HTMLAttributes;
833
+ tfoot: HTMLAttributes;
834
+ th: HTMLAttributes;
835
+ thead: HTMLAttributes;
836
+ time: HTMLAttributes;
837
+ title: HTMLAttributes;
838
+ tr: HTMLAttributes;
839
+ track: HTMLAttributes;
840
+ u: HTMLAttributes;
841
+ ul: HTMLAttributes;
842
+ "var": HTMLAttributes;
843
+ video: HTMLAttributes;
844
+ wbr: HTMLAttributes;
845
+
846
+ //SVG
847
+ svg: SVGAttributes;
848
+ animate: SVGAttributes;
849
+ circle: SVGAttributes;
850
+ clipPath: SVGAttributes;
851
+ defs: SVGAttributes;
852
+ ellipse: SVGAttributes;
853
+ feBlend: SVGAttributes;
854
+ feColorMatrix: SVGAttributes;
855
+ feComponentTransfer: SVGAttributes;
856
+ feComposite: SVGAttributes;
857
+ feConvolveMatrix: SVGAttributes;
858
+ feDiffuseLighting: SVGAttributes;
859
+ feDisplacementMap: SVGAttributes;
860
+ feFlood: SVGAttributes;
861
+ feGaussianBlur: SVGAttributes;
862
+ feImage: SVGAttributes;
863
+ feMerge: SVGAttributes;
864
+ feMergeNode: SVGAttributes;
865
+ feMorphology: SVGAttributes;
866
+ feOffset: SVGAttributes;
867
+ feSpecularLighting: SVGAttributes;
868
+ feTile: SVGAttributes;
869
+ feTurbulence: SVGAttributes;
870
+ filter: SVGAttributes;
871
+ foreignObject: SVGAttributes;
872
+ g: SVGAttributes;
873
+ image: SVGAttributes;
874
+ line: SVGAttributes;
875
+ linearGradient: SVGAttributes;
876
+ marker: SVGAttributes;
877
+ mask: SVGAttributes;
878
+ path: SVGAttributes;
879
+ pattern: SVGAttributes;
880
+ polygon: SVGAttributes;
881
+ polyline: SVGAttributes;
882
+ radialGradient: SVGAttributes;
883
+ rect: SVGAttributes;
884
+ stop: SVGAttributes;
885
+ symbol: SVGAttributes;
886
+ text: SVGAttributes;
887
+ tspan: SVGAttributes;
888
+ use: SVGAttributes;
889
+ }
890
+ }
891
+ }