@vaadin/react-components 25.3.0-alpha10 → 25.3.0-alpha11
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/index.d.ts +2 -2
- package/index.js +2 -2
- package/package.json +65 -65
- package/utils/createComponent.js +1 -1
- package/utils/createComponent.js.map +1 -1
package/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export * from "./AccordionHeading.js";
|
|
2
2
|
export * from "./AccordionPanel.js";
|
|
3
3
|
export * from "./Accordion.js";
|
|
4
|
-
export * from "./AppLayout.js";
|
|
5
4
|
export * from "./DrawerToggle.js";
|
|
5
|
+
export * from "./AppLayout.js";
|
|
6
6
|
export * from "./Avatar.js";
|
|
7
7
|
export * from "./AvatarGroup.js";
|
|
8
8
|
export * from "./Badge.js";
|
|
@@ -85,8 +85,8 @@ export * from "./VirtualList.js";
|
|
|
85
85
|
export { AccordionHeading } from "./AccordionHeading.js";
|
|
86
86
|
export { AccordionPanel } from "./AccordionPanel.js";
|
|
87
87
|
export { Accordion } from "./Accordion.js";
|
|
88
|
-
export { AppLayout } from "./AppLayout.js";
|
|
89
88
|
export { DrawerToggle } from "./DrawerToggle.js";
|
|
89
|
+
export { AppLayout } from "./AppLayout.js";
|
|
90
90
|
export { Avatar } from "./Avatar.js";
|
|
91
91
|
export { AvatarGroup } from "./AvatarGroup.js";
|
|
92
92
|
export { Badge } from "./Badge.js";
|
package/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export * from "./AccordionHeading.js";
|
|
2
2
|
export * from "./AccordionPanel.js";
|
|
3
3
|
export * from "./Accordion.js";
|
|
4
|
-
export * from "./AppLayout.js";
|
|
5
4
|
export * from "./DrawerToggle.js";
|
|
5
|
+
export * from "./AppLayout.js";
|
|
6
6
|
export * from "./Avatar.js";
|
|
7
7
|
export * from "./AvatarGroup.js";
|
|
8
8
|
export * from "./Badge.js";
|
|
@@ -85,8 +85,8 @@ export * from "./VirtualList.js";
|
|
|
85
85
|
export { AccordionHeading } from "./AccordionHeading.js";
|
|
86
86
|
export { AccordionPanel } from "./AccordionPanel.js";
|
|
87
87
|
export { Accordion } from "./Accordion.js";
|
|
88
|
-
export { AppLayout } from "./AppLayout.js";
|
|
89
88
|
export { DrawerToggle } from "./DrawerToggle.js";
|
|
89
|
+
export { AppLayout } from "./AppLayout.js";
|
|
90
90
|
export { Avatar } from "./Avatar.js";
|
|
91
91
|
export { AvatarGroup } from "./AvatarGroup.js";
|
|
92
92
|
export { Badge } from "./Badge.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/react-components",
|
|
3
|
-
"version": "25.3.0-
|
|
3
|
+
"version": "25.3.0-alpha11",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -27,70 +27,70 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@lit/react": "^1.0.7",
|
|
30
|
-
"@vaadin/a11y-base": "25.3.0-
|
|
31
|
-
"@vaadin/accordion": "25.3.0-
|
|
32
|
-
"@vaadin/app-layout": "25.3.0-
|
|
33
|
-
"@vaadin/avatar": "25.3.0-
|
|
34
|
-
"@vaadin/avatar-group": "25.3.0-
|
|
35
|
-
"@vaadin/badge": "25.3.0-
|
|
36
|
-
"@vaadin/breadcrumbs": "25.3.0-
|
|
37
|
-
"@vaadin/button": "25.3.0-
|
|
38
|
-
"@vaadin/card": "25.3.0-
|
|
39
|
-
"@vaadin/checkbox": "25.3.0-
|
|
40
|
-
"@vaadin/checkbox-group": "25.3.0-
|
|
41
|
-
"@vaadin/combo-box": "25.3.0-
|
|
42
|
-
"@vaadin/component-base": "25.3.0-
|
|
43
|
-
"@vaadin/confirm-dialog": "25.3.0-
|
|
44
|
-
"@vaadin/context-menu": "25.3.0-
|
|
45
|
-
"@vaadin/custom-field": "25.3.0-
|
|
46
|
-
"@vaadin/date-picker": "25.3.0-
|
|
47
|
-
"@vaadin/date-time-picker": "25.3.0-
|
|
48
|
-
"@vaadin/details": "25.3.0-
|
|
49
|
-
"@vaadin/dialog": "25.3.0-
|
|
50
|
-
"@vaadin/email-field": "25.3.0-
|
|
51
|
-
"@vaadin/field-base": "25.3.0-
|
|
52
|
-
"@vaadin/field-highlighter": "25.3.0-
|
|
53
|
-
"@vaadin/form-layout": "25.3.0-
|
|
54
|
-
"@vaadin/grid": "25.3.0-
|
|
55
|
-
"@vaadin/horizontal-layout": "25.3.0-
|
|
56
|
-
"@vaadin/icon": "25.3.0-
|
|
57
|
-
"@vaadin/icons": "25.3.0-
|
|
58
|
-
"@vaadin/input-container": "25.3.0-
|
|
59
|
-
"@vaadin/integer-field": "25.3.0-
|
|
60
|
-
"@vaadin/item": "25.3.0-
|
|
61
|
-
"@vaadin/list-box": "25.3.0-
|
|
62
|
-
"@vaadin/lit-renderer": "25.3.0-
|
|
63
|
-
"@vaadin/login": "25.3.0-
|
|
64
|
-
"@vaadin/markdown": "25.3.0-
|
|
65
|
-
"@vaadin/master-detail-layout": "25.3.0-
|
|
66
|
-
"@vaadin/menu-bar": "25.3.0-
|
|
67
|
-
"@vaadin/message-input": "25.3.0-
|
|
68
|
-
"@vaadin/message-list": "25.3.0-
|
|
69
|
-
"@vaadin/multi-select-combo-box": "25.3.0-
|
|
70
|
-
"@vaadin/notification": "25.3.0-
|
|
71
|
-
"@vaadin/number-field": "25.3.0-
|
|
72
|
-
"@vaadin/overlay": "25.3.0-
|
|
73
|
-
"@vaadin/password-field": "25.3.0-
|
|
74
|
-
"@vaadin/popover": "25.3.0-
|
|
75
|
-
"@vaadin/progress-bar": "25.3.0-
|
|
76
|
-
"@vaadin/radio-group": "25.3.0-
|
|
77
|
-
"@vaadin/scroller": "25.3.0-
|
|
78
|
-
"@vaadin/select": "25.3.0-
|
|
79
|
-
"@vaadin/side-nav": "25.3.0-
|
|
80
|
-
"@vaadin/slider": "25.3.0-
|
|
81
|
-
"@vaadin/split-layout": "25.3.0-
|
|
82
|
-
"@vaadin/switch": "25.3.0-
|
|
83
|
-
"@vaadin/tabs": "25.3.0-
|
|
84
|
-
"@vaadin/tabsheet": "25.3.0-
|
|
85
|
-
"@vaadin/text-area": "25.3.0-
|
|
86
|
-
"@vaadin/text-field": "25.3.0-
|
|
87
|
-
"@vaadin/time-picker": "25.3.0-
|
|
88
|
-
"@vaadin/tooltip": "25.3.0-
|
|
89
|
-
"@vaadin/upload": "25.3.0-
|
|
90
|
-
"@vaadin/vaadin-lumo-styles": "25.3.0-
|
|
91
|
-
"@vaadin/vaadin-themable-mixin": "25.3.0-
|
|
92
|
-
"@vaadin/vertical-layout": "25.3.0-
|
|
93
|
-
"@vaadin/virtual-list": "25.3.0-
|
|
30
|
+
"@vaadin/a11y-base": "25.3.0-alpha11",
|
|
31
|
+
"@vaadin/accordion": "25.3.0-alpha11",
|
|
32
|
+
"@vaadin/app-layout": "25.3.0-alpha11",
|
|
33
|
+
"@vaadin/avatar": "25.3.0-alpha11",
|
|
34
|
+
"@vaadin/avatar-group": "25.3.0-alpha11",
|
|
35
|
+
"@vaadin/badge": "25.3.0-alpha11",
|
|
36
|
+
"@vaadin/breadcrumbs": "25.3.0-alpha11",
|
|
37
|
+
"@vaadin/button": "25.3.0-alpha11",
|
|
38
|
+
"@vaadin/card": "25.3.0-alpha11",
|
|
39
|
+
"@vaadin/checkbox": "25.3.0-alpha11",
|
|
40
|
+
"@vaadin/checkbox-group": "25.3.0-alpha11",
|
|
41
|
+
"@vaadin/combo-box": "25.3.0-alpha11",
|
|
42
|
+
"@vaadin/component-base": "25.3.0-alpha11",
|
|
43
|
+
"@vaadin/confirm-dialog": "25.3.0-alpha11",
|
|
44
|
+
"@vaadin/context-menu": "25.3.0-alpha11",
|
|
45
|
+
"@vaadin/custom-field": "25.3.0-alpha11",
|
|
46
|
+
"@vaadin/date-picker": "25.3.0-alpha11",
|
|
47
|
+
"@vaadin/date-time-picker": "25.3.0-alpha11",
|
|
48
|
+
"@vaadin/details": "25.3.0-alpha11",
|
|
49
|
+
"@vaadin/dialog": "25.3.0-alpha11",
|
|
50
|
+
"@vaadin/email-field": "25.3.0-alpha11",
|
|
51
|
+
"@vaadin/field-base": "25.3.0-alpha11",
|
|
52
|
+
"@vaadin/field-highlighter": "25.3.0-alpha11",
|
|
53
|
+
"@vaadin/form-layout": "25.3.0-alpha11",
|
|
54
|
+
"@vaadin/grid": "25.3.0-alpha11",
|
|
55
|
+
"@vaadin/horizontal-layout": "25.3.0-alpha11",
|
|
56
|
+
"@vaadin/icon": "25.3.0-alpha11",
|
|
57
|
+
"@vaadin/icons": "25.3.0-alpha11",
|
|
58
|
+
"@vaadin/input-container": "25.3.0-alpha11",
|
|
59
|
+
"@vaadin/integer-field": "25.3.0-alpha11",
|
|
60
|
+
"@vaadin/item": "25.3.0-alpha11",
|
|
61
|
+
"@vaadin/list-box": "25.3.0-alpha11",
|
|
62
|
+
"@vaadin/lit-renderer": "25.3.0-alpha11",
|
|
63
|
+
"@vaadin/login": "25.3.0-alpha11",
|
|
64
|
+
"@vaadin/markdown": "25.3.0-alpha11",
|
|
65
|
+
"@vaadin/master-detail-layout": "25.3.0-alpha11",
|
|
66
|
+
"@vaadin/menu-bar": "25.3.0-alpha11",
|
|
67
|
+
"@vaadin/message-input": "25.3.0-alpha11",
|
|
68
|
+
"@vaadin/message-list": "25.3.0-alpha11",
|
|
69
|
+
"@vaadin/multi-select-combo-box": "25.3.0-alpha11",
|
|
70
|
+
"@vaadin/notification": "25.3.0-alpha11",
|
|
71
|
+
"@vaadin/number-field": "25.3.0-alpha11",
|
|
72
|
+
"@vaadin/overlay": "25.3.0-alpha11",
|
|
73
|
+
"@vaadin/password-field": "25.3.0-alpha11",
|
|
74
|
+
"@vaadin/popover": "25.3.0-alpha11",
|
|
75
|
+
"@vaadin/progress-bar": "25.3.0-alpha11",
|
|
76
|
+
"@vaadin/radio-group": "25.3.0-alpha11",
|
|
77
|
+
"@vaadin/scroller": "25.3.0-alpha11",
|
|
78
|
+
"@vaadin/select": "25.3.0-alpha11",
|
|
79
|
+
"@vaadin/side-nav": "25.3.0-alpha11",
|
|
80
|
+
"@vaadin/slider": "25.3.0-alpha11",
|
|
81
|
+
"@vaadin/split-layout": "25.3.0-alpha11",
|
|
82
|
+
"@vaadin/switch": "25.3.0-alpha11",
|
|
83
|
+
"@vaadin/tabs": "25.3.0-alpha11",
|
|
84
|
+
"@vaadin/tabsheet": "25.3.0-alpha11",
|
|
85
|
+
"@vaadin/text-area": "25.3.0-alpha11",
|
|
86
|
+
"@vaadin/text-field": "25.3.0-alpha11",
|
|
87
|
+
"@vaadin/time-picker": "25.3.0-alpha11",
|
|
88
|
+
"@vaadin/tooltip": "25.3.0-alpha11",
|
|
89
|
+
"@vaadin/upload": "25.3.0-alpha11",
|
|
90
|
+
"@vaadin/vaadin-lumo-styles": "25.3.0-alpha11",
|
|
91
|
+
"@vaadin/vaadin-themable-mixin": "25.3.0-alpha11",
|
|
92
|
+
"@vaadin/vertical-layout": "25.3.0-alpha11",
|
|
93
|
+
"@vaadin/virtual-list": "25.3.0-alpha11"
|
|
94
94
|
},
|
|
95
95
|
"author": "Vaadin Ltd.",
|
|
96
96
|
"license": "Apache-2.0",
|
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:"25.3.0-
|
|
1
|
+
import{createComponent as n}from"@lit/react";window.Vaadin??={},window.Vaadin.registrations??=[],window.Vaadin.registrations.push({is:"@vaadin/react-components",version:"25.3.0-alpha11"});function o(e){const{elementClass:t}=e;return n("_properties"in t?{...e,elementClass:{name:t.name,prototype:{...t._properties,hidden:Boolean}}}:e)}function r(e){return o(e)}export{o as createComponent,r as createThemedComponent};
|
|
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 */ '25.3.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 */ '25.3.0-alpha11',\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<I extends HTMLElement, E extends EventNames = {}> = 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/**\n * The type of a React component created from a Vaadin web component.\n */\nexport type ReactWebComponent<I extends HTMLElement, E extends EventNames = {}> = (\n props: WebComponentProps<I, E> & RefAttributes<I>,\n) => React.ReactElement | null;\n\n/**\n * The type of a React component that always accepts a `theme` property, even if\n * the underlying web component does not use `ThemableMixin` / does not expose\n * `ThemePropertyMixinClass` in its type. Used for components that support theme\n * variants through the `theme` attribute without the mixin.\n */\nexport type ThemedReactWebComponent<I extends HTMLElement, E extends EventNames = {}> = (\n props: Partial<ThemedWebComponentProps<I, E>> & RefAttributes<I>,\n) => React.ReactElement | null;\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): ReactWebComponent<I, E>;\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\n// A separate declaration is needed here for the same reason as `createComponent`.\nexport function createThemedComponent<I extends HTMLElement, E extends EventNames = {}>(\n options: Options<I, E>,\n): ThemedReactWebComponent<I, E>;\n\n// Creates a React component that always accepts a `theme` property, regardless of\n// whether the underlying web component uses `ThemableMixin`. This only widens the\n// type: the runtime is identical to `createComponent`. `@lit/react` already forwards\n// any prop that is not defined on the element prototype (such as `theme` on a\n// non-`ThemableMixin` element) to the DOM as an attribute, so no runtime change is\n// needed \u2014 this function exists purely to expose `theme` at the type level.\nexport function createThemedComponent<I extends HTMLElement, E extends EventNames = {}>(options: Options<I, E>): any {\n return createComponent(options);\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,EAyEM,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,CAaO,SAASE,EAAwEF,EAA6B,CACnH,OAAOD,EAAgBC,CAAO,CAChC",
|
|
6
6
|
"names": ["_createComponent", "createComponent", "options", "elementClass", "createThemedComponent"]
|
|
7
7
|
}
|