@vaadin/react-components 24.8.0-alpha16 → 24.8.0-alpha17
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/Markdown.d.ts +9 -0
- package/Markdown.d.ts.map +1 -0
- package/Markdown.js +2 -0
- package/Markdown.js.map +7 -0
- package/generated/Markdown.d.ts +9 -0
- package/generated/Markdown.d.ts.map +1 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/package.json +67 -61
- package/utils/createComponent.js +1 -1
- package/utils/createComponent.js.map +1 -1
package/Markdown.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ReactElement, type RefAttributes } from 'react';
|
|
2
|
+
import { type MarkdownProps as _MarkdownProps, type MarkdownElement } from './generated/Markdown.js';
|
|
3
|
+
export * from './generated/Markdown.js';
|
|
4
|
+
export type MarkdownProps = Partial<Omit<_MarkdownProps, 'children' | 'content'>> & Readonly<{
|
|
5
|
+
children?: string | null;
|
|
6
|
+
}>;
|
|
7
|
+
declare const ForwardedMarkdown: (props: MarkdownProps & RefAttributes<MarkdownElement>) => ReactElement | null;
|
|
8
|
+
export { ForwardedMarkdown as Markdown };
|
|
9
|
+
//# sourceMappingURL=Markdown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Markdown.d.ts","sourceRoot":"","sources":["src/Markdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiC,KAAK,YAAY,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAC7F,OAAO,EAEL,KAAK,aAAa,IAAI,cAAc,EACpC,KAAK,eAAe,EACrB,MAAM,yBAAyB,CAAC;AAEjC,cAAc,yBAAyB,CAAC;AAExC,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,UAAU,GAAG,SAAS,CAAC,CAAC,GAC/E,QAAQ,CAAC;IACP,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,CAAC,CAAC;AAML,QAAA,MAAM,iBAAiB,EAA2B,CAChD,KAAK,EAAE,aAAa,GAAG,aAAa,CAAC,eAAe,CAAC,KAClD,YAAY,GAAG,IAAI,CAAC;AAEzB,OAAO,EAAE,iBAAiB,IAAI,QAAQ,EAAE,CAAC"}
|
package/Markdown.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export*from"@vaadin/markdown/vaadin-markdown.js";import{forwardRef as m}from"react";import{Markdown as n}from"@vaadin/markdown/vaadin-markdown.js";import*as a from"react";import{createComponent as p}from"./utils/createComponent.js";var d={},o=p({elementClass:n,events:d,react:a,tagName:"vaadin-markdown"});import{jsx as M}from"react/jsx-runtime";function w({children:r,...e},t){return M(o,{...e,ref:t,content:r??""})}var c=m(w);export{c as Markdown,n as MarkdownElement};
|
|
2
|
+
//# sourceMappingURL=Markdown.js.map
|
package/Markdown.js.map
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["src/Markdown.tsx", "src/generated/Markdown.ts"],
|
|
4
|
+
"sourcesContent": ["export * from \"@vaadin/markdown/vaadin-markdown.js\";\nimport { forwardRef, type ForwardedRef, type ReactElement, type RefAttributes } from 'react';\nimport {\n Markdown as _Markdown,\n type MarkdownProps as _MarkdownProps,\n type MarkdownElement,\n} from './generated/Markdown.js';\n\nexport * from './generated/Markdown.js';\n\nexport type MarkdownProps = Partial<Omit<_MarkdownProps, 'children' | 'content'>> &\n Readonly<{\n children?: string | null;\n }>;\n\nfunction Markdown({ children, ...props }: MarkdownProps, ref: ForwardedRef<MarkdownElement>): ReactElement | null {\n return <_Markdown {...props} ref={ref} content={children ?? ''}></_Markdown>;\n}\n\nconst ForwardedMarkdown = forwardRef(Markdown) as (\n props: MarkdownProps & RefAttributes<MarkdownElement>,\n) => ReactElement | null;\n\nexport { ForwardedMarkdown as Markdown };\n", "import type {} from \"@lit/react\";\nimport { Markdown as MarkdownElement, } from \"@vaadin/markdown/vaadin-markdown.js\";\nimport * as React from \"react\";\nimport { createComponent, type WebComponentProps } from \"../utils/createComponent.js\";\nexport { MarkdownElement, };\nexport type MarkdownEventMap = Readonly<{}>;\nconst events = {} as MarkdownEventMap;\nexport type MarkdownProps = WebComponentProps<MarkdownElement, MarkdownEventMap>;\nexport const Markdown = createComponent({\n elementClass: MarkdownElement, events, react: React, tagName: \"vaadin-markdown\"\n});\n"],
|
|
5
|
+
"mappings": "AAAA,WAAc,sCACd,OAAS,cAAAA,MAA4E,QCArF,OAAS,YAAYC,MAAwB,sCAC7C,UAAYC,MAAW,QACvB,OAAS,mBAAAC,MAA+C,6BAGxD,IAAMC,EAAS,CAAC,EAEHC,EAAWC,EAAgB,CACpC,aAAcC,EAAiB,OAAAH,EAAQ,MAAOI,EAAO,QAAS,iBAClE,CAAC,EDMQ,cAAAC,MAAA,oBADT,SAASC,EAAS,CAAE,SAAAC,EAAU,GAAGC,CAAM,EAAkBC,EAAyD,CAChH,OAAOJ,EAACC,EAAA,CAAW,GAAGE,EAAO,IAAKC,EAAK,QAASF,GAAY,GAAI,CAClE,CAEA,IAAMG,EAAoBC,EAAWL,CAAQ",
|
|
6
|
+
"names": ["forwardRef", "MarkdownElement", "React", "createComponent", "events", "Markdown", "createComponent", "MarkdownElement", "React", "jsx", "Markdown", "children", "props", "ref", "ForwardedMarkdown", "forwardRef"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Markdown as MarkdownElement } from "@vaadin/markdown/vaadin-markdown.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { type WebComponentProps } from "../utils/createComponent.js";
|
|
4
|
+
export * from "@vaadin/markdown/vaadin-markdown.js";
|
|
5
|
+
export { MarkdownElement, };
|
|
6
|
+
export type MarkdownEventMap = Readonly<{}>;
|
|
7
|
+
export type MarkdownProps = WebComponentProps<MarkdownElement, MarkdownEventMap>;
|
|
8
|
+
export declare const Markdown: (props: Partial<import("../utils/createComponent.js").ThemedWebComponentProps<MarkdownElement, Readonly<{}>>> & React.RefAttributes<MarkdownElement>) => React.ReactElement | null;
|
|
9
|
+
//# sourceMappingURL=Markdown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Markdown.d.ts","sourceRoot":"","sources":["../src/generated/Markdown.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,IAAI,eAAe,EAAG,MAAM,qCAAqC,CAAC;AACnF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAmB,KAAK,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACtF,cAAc,qCAAqC,CAAC;AACpD,OAAO,EAAE,eAAe,GAAG,CAAC;AAC5B,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;AAE5C,MAAM,MAAM,aAAa,GAAG,iBAAiB,CAAC,eAAe,EAAE,gBAAgB,CAAC,CAAC;AACjF,eAAO,MAAM,QAAQ,oLAEnB,CAAC"}
|
package/index.d.ts
CHANGED
|
@@ -42,6 +42,7 @@ export * from "./Item.js";
|
|
|
42
42
|
export * from "./ListBox.js";
|
|
43
43
|
export * from "./LoginForm.js";
|
|
44
44
|
export * from "./LoginOverlay.js";
|
|
45
|
+
export * from "./Markdown.js";
|
|
45
46
|
export * from "./MasterDetailLayout.js";
|
|
46
47
|
export * from "./MenuBar.js";
|
|
47
48
|
export * from "./MessageInput.js";
|
package/index.js
CHANGED
|
@@ -42,6 +42,7 @@ export * from "./Item.js";
|
|
|
42
42
|
export * from "./ListBox.js";
|
|
43
43
|
export * from "./LoginForm.js";
|
|
44
44
|
export * from "./LoginOverlay.js";
|
|
45
|
+
export * from "./Markdown.js";
|
|
45
46
|
export * from "./MasterDetailLayout.js";
|
|
46
47
|
export * from "./MenuBar.js";
|
|
47
48
|
export * from "./MessageInput.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/react-components",
|
|
3
|
-
"version": "24.8.0-
|
|
3
|
+
"version": "24.8.0-alpha17",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -27,66 +27,67 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@lit/react": "^1.0.7",
|
|
30
|
-
"@vaadin/a11y-base": "24.8.0-
|
|
31
|
-
"@vaadin/accordion": "24.8.0-
|
|
32
|
-
"@vaadin/app-layout": "24.8.0-
|
|
33
|
-
"@vaadin/avatar": "24.8.0-
|
|
34
|
-
"@vaadin/avatar-group": "24.8.0-
|
|
35
|
-
"@vaadin/button": "24.8.0-
|
|
36
|
-
"@vaadin/card": "24.8.0-
|
|
37
|
-
"@vaadin/checkbox": "24.8.0-
|
|
38
|
-
"@vaadin/checkbox-group": "24.8.0-
|
|
39
|
-
"@vaadin/combo-box": "24.8.0-
|
|
40
|
-
"@vaadin/component-base": "24.8.0-
|
|
41
|
-
"@vaadin/confirm-dialog": "24.8.0-
|
|
42
|
-
"@vaadin/context-menu": "24.8.0-
|
|
43
|
-
"@vaadin/custom-field": "24.8.0-
|
|
44
|
-
"@vaadin/date-picker": "24.8.0-
|
|
45
|
-
"@vaadin/date-time-picker": "24.8.0-
|
|
46
|
-
"@vaadin/details": "24.8.0-
|
|
47
|
-
"@vaadin/dialog": "24.8.0-
|
|
48
|
-
"@vaadin/email-field": "24.8.0-
|
|
49
|
-
"@vaadin/field-base": "24.8.0-
|
|
50
|
-
"@vaadin/field-highlighter": "24.8.0-
|
|
51
|
-
"@vaadin/form-layout": "24.8.0-
|
|
52
|
-
"@vaadin/grid": "24.8.0-
|
|
53
|
-
"@vaadin/horizontal-layout": "24.8.0-
|
|
54
|
-
"@vaadin/icon": "24.8.0-
|
|
55
|
-
"@vaadin/icons": "24.8.0-
|
|
56
|
-
"@vaadin/input-container": "24.8.0-
|
|
57
|
-
"@vaadin/integer-field": "24.8.0-
|
|
58
|
-
"@vaadin/item": "24.8.0-
|
|
59
|
-
"@vaadin/list-box": "24.8.0-
|
|
60
|
-
"@vaadin/lit-renderer": "24.8.0-
|
|
61
|
-
"@vaadin/login": "24.8.0-
|
|
62
|
-
"@vaadin/
|
|
63
|
-
"@vaadin/
|
|
64
|
-
"@vaadin/
|
|
65
|
-
"@vaadin/message-
|
|
66
|
-
"@vaadin/
|
|
67
|
-
"@vaadin/
|
|
68
|
-
"@vaadin/
|
|
69
|
-
"@vaadin/
|
|
70
|
-
"@vaadin/
|
|
71
|
-
"@vaadin/
|
|
72
|
-
"@vaadin/
|
|
73
|
-
"@vaadin/
|
|
74
|
-
"@vaadin/
|
|
75
|
-
"@vaadin/
|
|
76
|
-
"@vaadin/
|
|
77
|
-
"@vaadin/
|
|
78
|
-
"@vaadin/
|
|
79
|
-
"@vaadin/
|
|
80
|
-
"@vaadin/
|
|
81
|
-
"@vaadin/text-
|
|
82
|
-
"@vaadin/
|
|
83
|
-
"@vaadin/
|
|
84
|
-
"@vaadin/
|
|
85
|
-
"@vaadin/
|
|
86
|
-
"@vaadin/vaadin-
|
|
87
|
-
"@vaadin/vaadin-
|
|
88
|
-
"@vaadin/
|
|
89
|
-
"@vaadin/
|
|
30
|
+
"@vaadin/a11y-base": "24.8.0-alpha17",
|
|
31
|
+
"@vaadin/accordion": "24.8.0-alpha17",
|
|
32
|
+
"@vaadin/app-layout": "24.8.0-alpha17",
|
|
33
|
+
"@vaadin/avatar": "24.8.0-alpha17",
|
|
34
|
+
"@vaadin/avatar-group": "24.8.0-alpha17",
|
|
35
|
+
"@vaadin/button": "24.8.0-alpha17",
|
|
36
|
+
"@vaadin/card": "24.8.0-alpha17",
|
|
37
|
+
"@vaadin/checkbox": "24.8.0-alpha17",
|
|
38
|
+
"@vaadin/checkbox-group": "24.8.0-alpha17",
|
|
39
|
+
"@vaadin/combo-box": "24.8.0-alpha17",
|
|
40
|
+
"@vaadin/component-base": "24.8.0-alpha17",
|
|
41
|
+
"@vaadin/confirm-dialog": "24.8.0-alpha17",
|
|
42
|
+
"@vaadin/context-menu": "24.8.0-alpha17",
|
|
43
|
+
"@vaadin/custom-field": "24.8.0-alpha17",
|
|
44
|
+
"@vaadin/date-picker": "24.8.0-alpha17",
|
|
45
|
+
"@vaadin/date-time-picker": "24.8.0-alpha17",
|
|
46
|
+
"@vaadin/details": "24.8.0-alpha17",
|
|
47
|
+
"@vaadin/dialog": "24.8.0-alpha17",
|
|
48
|
+
"@vaadin/email-field": "24.8.0-alpha17",
|
|
49
|
+
"@vaadin/field-base": "24.8.0-alpha17",
|
|
50
|
+
"@vaadin/field-highlighter": "24.8.0-alpha17",
|
|
51
|
+
"@vaadin/form-layout": "24.8.0-alpha17",
|
|
52
|
+
"@vaadin/grid": "24.8.0-alpha17",
|
|
53
|
+
"@vaadin/horizontal-layout": "24.8.0-alpha17",
|
|
54
|
+
"@vaadin/icon": "24.8.0-alpha17",
|
|
55
|
+
"@vaadin/icons": "24.8.0-alpha17",
|
|
56
|
+
"@vaadin/input-container": "24.8.0-alpha17",
|
|
57
|
+
"@vaadin/integer-field": "24.8.0-alpha17",
|
|
58
|
+
"@vaadin/item": "24.8.0-alpha17",
|
|
59
|
+
"@vaadin/list-box": "24.8.0-alpha17",
|
|
60
|
+
"@vaadin/lit-renderer": "24.8.0-alpha17",
|
|
61
|
+
"@vaadin/login": "24.8.0-alpha17",
|
|
62
|
+
"@vaadin/markdown": "24.8.0-alpha17",
|
|
63
|
+
"@vaadin/master-detail-layout": "24.8.0-alpha17",
|
|
64
|
+
"@vaadin/menu-bar": "24.8.0-alpha17",
|
|
65
|
+
"@vaadin/message-input": "24.8.0-alpha17",
|
|
66
|
+
"@vaadin/message-list": "24.8.0-alpha17",
|
|
67
|
+
"@vaadin/multi-select-combo-box": "24.8.0-alpha17",
|
|
68
|
+
"@vaadin/notification": "24.8.0-alpha17",
|
|
69
|
+
"@vaadin/number-field": "24.8.0-alpha17",
|
|
70
|
+
"@vaadin/overlay": "24.8.0-alpha17",
|
|
71
|
+
"@vaadin/password-field": "24.8.0-alpha17",
|
|
72
|
+
"@vaadin/popover": "24.8.0-alpha17",
|
|
73
|
+
"@vaadin/progress-bar": "24.8.0-alpha17",
|
|
74
|
+
"@vaadin/radio-group": "24.8.0-alpha17",
|
|
75
|
+
"@vaadin/scroller": "24.8.0-alpha17",
|
|
76
|
+
"@vaadin/select": "24.8.0-alpha17",
|
|
77
|
+
"@vaadin/side-nav": "24.8.0-alpha17",
|
|
78
|
+
"@vaadin/split-layout": "24.8.0-alpha17",
|
|
79
|
+
"@vaadin/tabs": "24.8.0-alpha17",
|
|
80
|
+
"@vaadin/tabsheet": "24.8.0-alpha17",
|
|
81
|
+
"@vaadin/text-area": "24.8.0-alpha17",
|
|
82
|
+
"@vaadin/text-field": "24.8.0-alpha17",
|
|
83
|
+
"@vaadin/time-picker": "24.8.0-alpha17",
|
|
84
|
+
"@vaadin/tooltip": "24.8.0-alpha17",
|
|
85
|
+
"@vaadin/upload": "24.8.0-alpha17",
|
|
86
|
+
"@vaadin/vaadin-lumo-styles": "24.8.0-alpha17",
|
|
87
|
+
"@vaadin/vaadin-material-styles": "24.8.0-alpha17",
|
|
88
|
+
"@vaadin/vaadin-themable-mixin": "24.8.0-alpha17",
|
|
89
|
+
"@vaadin/vertical-layout": "24.8.0-alpha17",
|
|
90
|
+
"@vaadin/virtual-list": "24.8.0-alpha17"
|
|
90
91
|
},
|
|
91
92
|
"author": "Vaadin Ltd.",
|
|
92
93
|
"license": "Apache-2.0",
|
|
@@ -297,6 +298,10 @@
|
|
|
297
298
|
"types": "./LoginOverlay.d.ts",
|
|
298
299
|
"default": "./LoginOverlay.js"
|
|
299
300
|
},
|
|
301
|
+
"./Markdown.js": {
|
|
302
|
+
"types": "./Markdown.d.ts",
|
|
303
|
+
"default": "./Markdown.js"
|
|
304
|
+
},
|
|
300
305
|
"./MasterDetailLayout.js": {
|
|
301
306
|
"types": "./MasterDetailLayout.d.ts",
|
|
302
307
|
"default": "./MasterDetailLayout.js"
|
|
@@ -453,6 +458,7 @@
|
|
|
453
458
|
"./ListBox": "./ListBox.js",
|
|
454
459
|
"./LoginForm": "./LoginForm.js",
|
|
455
460
|
"./LoginOverlay": "./LoginOverlay.js",
|
|
461
|
+
"./Markdown": "./Markdown.js",
|
|
456
462
|
"./MasterDetailLayout": "./MasterDetailLayout.js",
|
|
457
463
|
"./MenuBar": "./MenuBar.js",
|
|
458
464
|
"./Message": "./Message.js",
|
package/utils/createComponent.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createComponent as n}from"@lit/react";window.Vaadin??={},window.Vaadin.registrations??=[],window.Vaadin.registrations.push({is:"@vaadin/react-components",version:"24.8.0-
|
|
1
|
+
import{createComponent as n}from"@lit/react";window.Vaadin??={},window.Vaadin.registrations??=[],window.Vaadin.registrations.push({is:"@vaadin/react-components",version:"24.8.0-alpha17"});function s(e){const{elementClass:t}=e;return n("_properties"in t?{...e,elementClass:{name:t.name,prototype:{...t._properties,hidden:Boolean}}}:e)}export{s as createComponent};
|
|
2
2
|
//# sourceMappingURL=createComponent.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/utils/createComponent.ts"],
|
|
4
|
-
"sourcesContent": ["import { createComponent as _createComponent, type EventName } from '@lit/react';\nimport type { ThemePropertyMixinClass } from '@vaadin/vaadin-themable-mixin/vaadin-theme-property-mixin.js';\nimport type React from 'react';\nimport type { RefAttributes } from 'react';\n\ndeclare const __VERSION__: string;\n\ndeclare global {\n interface VaadinRegistration {\n is: string;\n version: string;\n }\n\n interface Vaadin {\n registrations?: VaadinRegistration[];\n }\n\n interface Window {\n // @ts-expect-error: Different declaration from one of the dependencies.\n Vaadin?: Vaadin;\n }\n}\n\nwindow.Vaadin ??= {};\nwindow.Vaadin.registrations ??= [];\nwindow.Vaadin.registrations.push({\n is: '@vaadin/react-components',\n version: /* updated-by-script */ '24.8.0-
|
|
4
|
+
"sourcesContent": ["import { createComponent as _createComponent, type EventName } from '@lit/react';\nimport type { ThemePropertyMixinClass } from '@vaadin/vaadin-themable-mixin/vaadin-theme-property-mixin.js';\nimport type React from 'react';\nimport type { RefAttributes } from 'react';\n\ndeclare const __VERSION__: string;\n\ndeclare global {\n interface VaadinRegistration {\n is: string;\n version: string;\n }\n\n interface Vaadin {\n registrations?: VaadinRegistration[];\n }\n\n interface Window {\n // @ts-expect-error: Different declaration from one of the dependencies.\n Vaadin?: Vaadin;\n }\n}\n\nwindow.Vaadin ??= {};\nwindow.Vaadin.registrations ??= [];\nwindow.Vaadin.registrations.push({\n is: '@vaadin/react-components',\n version: /* updated-by-script */ '24.8.0-alpha17',\n});\n\n// TODO: Remove when types from @lit-labs/react are exported\nexport type EventNames = Record<string, EventName | string>;\ntype Constructor<T> = { new (): T; name: string };\ntype PolymerConstructor<T> = Constructor<T> & { _properties: Record<string, unknown> };\ntype Options<I extends HTMLElement, E extends EventNames = {}> = Readonly<{\n displayName?: string;\n elementClass: Constructor<I> | PolymerConstructor<I>;\n events?: E;\n react: typeof window.React;\n tagName: string;\n}>;\n\n// A map of expected event listener types based on EventNames.\ntype EventListeners<R extends EventNames> = {\n [K in keyof R]?: R[K] extends EventName ? (e: R[K]['__eventType']) => void : (e: Event) => void;\n};\n\n// Props derived from custom element class. Currently has limitations of making\n// all properties optional and also surfaces life cycle methods in autocomplete.\n// TODO: LoginOverlay has \"autofocus\" property, so we add it back manually.\ntype ElementProps<I> = Partial<Omit<I, keyof HTMLElement>> & { autofocus?: boolean };\n\n// Acceptable props to the React component.\ntype ComponentProps<I, E extends EventNames = {}> = Omit<\n React.HTMLAttributes<I>,\n // Prefer type of provided event handler props or those on element over\n // built-in HTMLAttributes\n keyof E | keyof ElementProps<I>\n> &\n EventListeners<E> &\n ElementProps<I>;\n\nexport type ThemedWebComponentProps<\n I extends ThemePropertyMixinClass & HTMLElement,\n E extends EventNames = {},\n> = ComponentProps<I, E> & {\n /**\n * Attribute that can be used by the component to apply built-in style variants,\n * or to propagate its value to the sub-components in Shadow DOM.\n *\n * @see ThemePropertyMixinClass#_theme\n */\n theme?: string;\n};\n\ntype AllWebComponentProps<I extends HTMLElement, E extends EventNames = {}> = I extends ThemePropertyMixinClass\n ? ThemedWebComponentProps<I, E>\n : ComponentProps<I, E>;\n\nexport type WebComponentProps<I extends HTMLElement, E extends EventNames = {}> = Partial<AllWebComponentProps<I, E>>;\n\n// We need a separate declaration here; otherwise, the TypeScript fails into the\n// endless loop trying to resolve the typings.\nexport function createComponent<I extends HTMLElement, E extends EventNames = {}>(\n options: Options<I, E>,\n): (props: WebComponentProps<I, E> & RefAttributes<I>) => React.ReactElement | null;\n\nexport function createComponent<I extends HTMLElement, E extends EventNames = {}>(options: Options<I, E>): any {\n const { elementClass } = options;\n\n return _createComponent(\n '_properties' in elementClass\n ? {\n ...options,\n // TODO: improve or remove the Polymer workaround\n // 'createComponent' relies on key presence on the custom element class,\n // but Polymer defines properties on the prototype when the first element\n // is created. Workaround: pass a mock object with properties in\n // the prototype.\n elementClass: {\n // @ts-expect-error: it is a specific workaround for Polymer classes.\n name: elementClass.name,\n prototype: { ...elementClass._properties, hidden: Boolean },\n },\n }\n : options,\n );\n}\n"],
|
|
5
5
|
"mappings": "AAAA,OAAS,mBAAmBA,MAAwC,aAuBpE,OAAO,SAAW,CAAC,EACnB,OAAO,OAAO,gBAAkB,CAAC,EACjC,OAAO,OAAO,cAAc,KAAK,CAC/B,GAAI,2BACJ,QAAiC,gBACnC,CAAC,EA2DM,SAASC,EAAkEC,EAA6B,CAC7G,KAAM,CAAE,aAAAC,CAAa,EAAID,EAEzB,OAAOF,EACL,gBAAiBG,EACb,CACE,GAAGD,EAMH,aAAc,CAEZ,KAAMC,EAAa,KACnB,UAAW,CAAE,GAAGA,EAAa,YAAa,OAAQ,OAAQ,CAC5D,CACF,EACAD,CACN,CACF",
|
|
6
6
|
"names": ["_createComponent", "createComponent", "options", "elementClass"]
|
|
7
7
|
}
|