@vaadin/react-components 25.4.0-alpha3 → 25.4.0-alpha5

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/Dialog.d.ts CHANGED
@@ -7,14 +7,30 @@ import { type ComponentType, type HTMLAttributes, type ReactNode } from 'react';
7
7
  import { type DialogElement, type DialogProps as _DialogProps } from './generated/Dialog.js';
8
8
  import type { ReactSimpleRendererProps } from './renderers/useSimpleRenderer.js';
9
9
  export * from './generated/Dialog.js';
10
+ /**
11
+ * @deprecated Renderer props are deprecated and will be removed in Vaadin 26.
12
+ */
10
13
  export type DialogReactRendererProps = ReactSimpleRendererProps<DialogElement>;
11
14
  type OmittedDialogHTMLAttributes = Omit<HTMLAttributes<DialogElement>, 'id' | 'className' | 'dangerouslySetInnerHTML' | 'slot' | 'role' | 'aria-label' | 'aria-labelledby' | 'draggable'>;
12
15
  export type DialogProps = Partial<Omit<_DialogProps, 'children' | 'footerRenderer' | 'headerRenderer' | 'renderer' | keyof OmittedDialogHTMLAttributes>> & Readonly<{
16
+ /**
17
+ * The dialog content. Render-function children are deprecated and will be
18
+ * removed in Vaadin 26. Pass React nodes instead.
19
+ */
13
20
  children?: ReactNode | ComponentType<DialogReactRendererProps>;
14
21
  footer?: ReactNode;
22
+ /**
23
+ * @deprecated Use `footer` instead.
24
+ */
15
25
  footerRenderer?: ComponentType<DialogReactRendererProps> | null;
16
26
  header?: ReactNode;
27
+ /**
28
+ * @deprecated Use `header` instead.
29
+ */
17
30
  headerRenderer?: ComponentType<DialogReactRendererProps> | null;
31
+ /**
32
+ * @deprecated Use `children` instead.
33
+ */
18
34
  renderer?: ComponentType<DialogReactRendererProps> | null;
19
35
  }>;
20
36
  declare const ForwardedDialog: import("react").ForwardRefExoticComponent<Partial<Omit<Partial<import("./utils/createComponent.js").ThemedWebComponentProps<DialogElement, Readonly<{
@@ -25,11 +41,24 @@ declare const ForwardedDialog: import("react").ForwardRefExoticComponent<Partial
25
41
  onResize: import("@lit/react").EventName<import("@vaadin/dialog").DialogEventMap["resize"]>;
26
42
  onResizeStart: import("@lit/react").EventName<import("@vaadin/dialog").DialogEventMap["resize-start"]>;
27
43
  }>>>, "accessKey" | "dir" | "hidden" | "inert" | "lang" | "popover" | "title" | "translate" | "part" | "prefix" | "children" | "style" | "contentEditable" | "enterKeyHint" | "inputMode" | "nonce" | "tabIndex" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "autoCapitalize" | "autoFocus" | "contextMenu" | "spellCheck" | "radioGroup" | "about" | "content" | "datatype" | "inlist" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popoverTargetAction" | "popoverTarget" | "is" | "exportparts" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | "renderer" | "headerRenderer" | "footerRenderer">> & Readonly<{
44
+ /**
45
+ * The dialog content. Render-function children are deprecated and will be
46
+ * removed in Vaadin 26. Pass React nodes instead.
47
+ */
28
48
  children?: ReactNode | ComponentType<DialogReactRendererProps>;
29
49
  footer?: ReactNode;
50
+ /**
51
+ * @deprecated Use `footer` instead.
52
+ */
30
53
  footerRenderer?: ComponentType<DialogReactRendererProps> | null;
31
54
  header?: ReactNode;
55
+ /**
56
+ * @deprecated Use `header` instead.
57
+ */
32
58
  headerRenderer?: ComponentType<DialogReactRendererProps> | null;
59
+ /**
60
+ * @deprecated Use `children` instead.
61
+ */
33
62
  renderer?: ComponentType<DialogReactRendererProps> | null;
34
63
  }> & import("react").RefAttributes<DialogElement>>;
35
64
  export { ForwardedDialog as Dialog };
package/Dialog.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version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AAE,aAAa,CAAC,wBAAwB,CAAC,GAAG,IAAI,CAAC;IAChE;;OAEG;IACH,QAAQ,CAAC,EAAE,aAAa,CAAC,wBAAwB,CAAC,GAAG,IAAI,CAAC;CAC3D,CAAC,CAAC;AAmBL,QAAA,MAAM,eAAe;;;;;;;;IAtCjB;;;OAGG;eACQ,SAAS,GAAG,aAAa,CAAC,wBAAwB,CAAC;aACrD,SAAS;IAClB;;OAEG;qBACc,aAAa,CAAC,wBAAwB,CAAC,GAAG,IAAI;aACtD,SAAS;IAClB;;OAEG;qBACc,aAAa,CAAC,wBAAwB,CAAC,GAAG,IAAI;IAC/D;;OAEG;eACQ,aAAa,CAAC,wBAAwB,CAAC,GAAG,IAAI;kDAoBnB,CAAC;AAE3C,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,CAAC"}
package/Dialog.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["src/Dialog.tsx", "src/generated/Dialog.ts"],
4
- "sourcesContent": ["export * from \"@vaadin/dialog/vaadin-dialog.js\";\n/**\n * @license\n * Copyright (c) 2022 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport {\n type ComponentType,\n type ForwardedRef,\n forwardRef,\n type HTMLAttributes,\n type ReactElement,\n type ReactNode,\n} from 'react';\nimport { Dialog as _Dialog, type DialogElement, type DialogProps as _DialogProps } from './generated/Dialog.js';\nimport { useSimpleOrChildrenRenderer } from './renderers/useSimpleOrChildrenRenderer.js';\nimport type { ReactSimpleRendererProps } from './renderers/useSimpleRenderer.js';\n\nexport * from './generated/Dialog.js';\n\nexport type DialogReactRendererProps = ReactSimpleRendererProps<DialogElement>;\n\ntype OmittedDialogHTMLAttributes = Omit<\n HTMLAttributes<DialogElement>,\n 'id' | 'className' | 'dangerouslySetInnerHTML' | 'slot' | 'role' | 'aria-label' | 'aria-labelledby' | 'draggable'\n>;\n\nexport type DialogProps = Partial<\n Omit<_DialogProps, 'children' | 'footerRenderer' | 'headerRenderer' | 'renderer' | keyof OmittedDialogHTMLAttributes>\n> &\n Readonly<{\n children?: ReactNode | ComponentType<DialogReactRendererProps>;\n footer?: ReactNode;\n footerRenderer?: ComponentType<DialogReactRendererProps> | null;\n header?: ReactNode;\n headerRenderer?: ComponentType<DialogReactRendererProps> | null;\n renderer?: ComponentType<DialogReactRendererProps> | null;\n }>;\n\nfunction Dialog(\n { children, footer, header, ...props }: DialogProps,\n ref: ForwardedRef<DialogElement>,\n): ReactElement | null {\n const [footerPortals, footerRenderer] = useSimpleOrChildrenRenderer(props.footerRenderer, footer);\n const [headerPortals, headerRenderer] = useSimpleOrChildrenRenderer(props.headerRenderer, header);\n const [portals, renderer] = useSimpleOrChildrenRenderer(props.renderer, children);\n\n return (\n <_Dialog {...props} ref={ref} footerRenderer={footerRenderer} headerRenderer={headerRenderer} renderer={renderer}>\n {headerPortals}\n {footerPortals}\n {portals}\n </_Dialog>\n );\n}\n\nconst ForwardedDialog = forwardRef(Dialog);\n\nexport { ForwardedDialog as Dialog };\n", "import type { EventName } from \"@lit/react\";\nimport { Dialog as DialogElement, type DialogEventMap as _DialogEventMap, } from \"@vaadin/dialog/vaadin-dialog.js\";\nimport * as React from \"react\";\nimport { createComponent, type WebComponentProps } from \"../utils/createComponent.js\";\nexport { DialogElement };\nexport type DialogEventMap = Readonly<{\n onClosed: EventName<_DialogEventMap[\"closed\"]>;\n onDragStart: EventName<_DialogEventMap[\"drag-start\"]>;\n onDragged: EventName<_DialogEventMap[\"dragged\"]>;\n onOpenedChanged: EventName<_DialogEventMap[\"opened-changed\"]>;\n onResize: EventName<_DialogEventMap[\"resize\"]>;\n onResizeStart: EventName<_DialogEventMap[\"resize-start\"]>;\n}>;\nconst events = { onClosed: \"closed\", onDragStart: \"drag-start\", onDragged: \"dragged\", onOpenedChanged: \"opened-changed\", onResize: \"resize\", onResizeStart: \"resize-start\" } as DialogEventMap;\nexport type DialogProps = WebComponentProps<DialogElement, DialogEventMap>;\nexport const Dialog = createComponent({\n elementClass: DialogElement,\n events,\n react: React,\n tagName: \"vaadin-dialog\",\n});\n"],
5
- "mappings": "AAAA,WAAc,kCAMd,OAGE,cAAAA,MAIK,QCZP,OAAS,UAAUC,MAA8D,kCACjF,UAAYC,MAAW,QACvB,OAAS,mBAAAC,MAA+C,6BAUxD,IAAMC,EAAS,CAAE,SAAU,SAAU,YAAa,aAAc,UAAW,UAAW,gBAAiB,iBAAkB,SAAU,SAAU,cAAe,cAAe,EAE9JC,EAASC,EAAgB,CAClC,aAAcC,EACd,OAAAH,EACA,MAAOI,EACP,QAAS,eACb,CAAC,EDLD,OAAS,+BAAAC,MAAmC,6CAiCxC,eAAAC,MAAA,oBATJ,SAASC,EACP,CAAE,SAAAC,EAAU,OAAAC,EAAQ,OAAAC,EAAQ,GAAGC,CAAM,EACrCC,EACqB,CACrB,GAAM,CAACC,EAAeC,CAAc,EAAIT,EAA4BM,EAAM,eAAgBF,CAAM,EAC1F,CAACM,EAAeC,CAAc,EAAIX,EAA4BM,EAAM,eAAgBD,CAAM,EAC1F,CAACO,EAASC,CAAQ,EAAIb,EAA4BM,EAAM,SAAUH,CAAQ,EAEhF,OACEF,EAACC,EAAA,CAAS,GAAGI,EAAO,IAAKC,EAAK,eAAgBE,EAAgB,eAAgBE,EAAgB,SAAUE,EACrG,UAAAH,EACAF,EACAI,GACH,CAEJ,CAEA,IAAME,EAAkBC,EAAWb,CAAM",
4
+ "sourcesContent": ["export * from \"@vaadin/dialog/vaadin-dialog.js\";\n/**\n * @license\n * Copyright (c) 2022 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport {\n type ComponentType,\n type ForwardedRef,\n forwardRef,\n type HTMLAttributes,\n type ReactElement,\n type ReactNode,\n} from 'react';\nimport { Dialog as _Dialog, type DialogElement, type DialogProps as _DialogProps } from './generated/Dialog.js';\nimport { useSimpleOrChildrenRenderer } from './renderers/useSimpleOrChildrenRenderer.js';\nimport type { ReactSimpleRendererProps } from './renderers/useSimpleRenderer.js';\n\nexport * from './generated/Dialog.js';\n\n/**\n * @deprecated Renderer props are deprecated and will be removed in Vaadin 26.\n */\nexport type DialogReactRendererProps = ReactSimpleRendererProps<DialogElement>;\n\ntype OmittedDialogHTMLAttributes = Omit<\n HTMLAttributes<DialogElement>,\n 'id' | 'className' | 'dangerouslySetInnerHTML' | 'slot' | 'role' | 'aria-label' | 'aria-labelledby' | 'draggable'\n>;\n\nexport type DialogProps = Partial<\n Omit<_DialogProps, 'children' | 'footerRenderer' | 'headerRenderer' | 'renderer' | keyof OmittedDialogHTMLAttributes>\n> &\n Readonly<{\n /**\n * The dialog content. Render-function children are deprecated and will be\n * removed in Vaadin 26. Pass React nodes instead.\n */\n children?: ReactNode | ComponentType<DialogReactRendererProps>;\n footer?: ReactNode;\n /**\n * @deprecated Use `footer` instead.\n */\n footerRenderer?: ComponentType<DialogReactRendererProps> | null;\n header?: ReactNode;\n /**\n * @deprecated Use `header` instead.\n */\n headerRenderer?: ComponentType<DialogReactRendererProps> | null;\n /**\n * @deprecated Use `children` instead.\n */\n renderer?: ComponentType<DialogReactRendererProps> | null;\n }>;\n\nfunction Dialog(\n { children, footer, header, ...props }: DialogProps,\n ref: ForwardedRef<DialogElement>,\n): ReactElement | null {\n const [footerPortals, footerRenderer] = useSimpleOrChildrenRenderer(props.footerRenderer, footer);\n const [headerPortals, headerRenderer] = useSimpleOrChildrenRenderer(props.headerRenderer, header);\n const [portals, renderer] = useSimpleOrChildrenRenderer(props.renderer, children);\n\n return (\n <_Dialog {...props} ref={ref} footerRenderer={footerRenderer} headerRenderer={headerRenderer} renderer={renderer}>\n {headerPortals}\n {footerPortals}\n {portals}\n </_Dialog>\n );\n}\n\nconst ForwardedDialog = forwardRef(Dialog);\n\nexport { ForwardedDialog as Dialog };\n", "import type { EventName } from \"@lit/react\";\nimport { Dialog as DialogElement, type DialogEventMap as _DialogEventMap, } from \"@vaadin/dialog/vaadin-dialog.js\";\nimport * as React from \"react\";\nimport { createComponent, type WebComponentProps } from \"../utils/createComponent.js\";\nexport { DialogElement };\nexport type DialogEventMap = Readonly<{\n onClosed: EventName<_DialogEventMap[\"closed\"]>;\n onDragStart: EventName<_DialogEventMap[\"drag-start\"]>;\n onDragged: EventName<_DialogEventMap[\"dragged\"]>;\n onOpenedChanged: EventName<_DialogEventMap[\"opened-changed\"]>;\n onResize: EventName<_DialogEventMap[\"resize\"]>;\n onResizeStart: EventName<_DialogEventMap[\"resize-start\"]>;\n}>;\nconst events = { onClosed: \"closed\", onDragStart: \"drag-start\", onDragged: \"dragged\", onOpenedChanged: \"opened-changed\", onResize: \"resize\", onResizeStart: \"resize-start\" } as DialogEventMap;\nexport type DialogProps = WebComponentProps<DialogElement, DialogEventMap>;\nexport const Dialog = createComponent({\n elementClass: DialogElement,\n events,\n react: React,\n tagName: \"vaadin-dialog\",\n});\n"],
5
+ "mappings": "AAAA,WAAc,kCAMd,OAGE,cAAAA,MAIK,QCZP,OAAS,UAAUC,MAA8D,kCACjF,UAAYC,MAAW,QACvB,OAAS,mBAAAC,MAA+C,6BAUxD,IAAMC,EAAS,CAAE,SAAU,SAAU,YAAa,aAAc,UAAW,UAAW,gBAAiB,iBAAkB,SAAU,SAAU,cAAe,cAAe,EAE9JC,EAASC,EAAgB,CAClC,aAAcC,EACd,OAAAH,EACA,MAAOI,EACP,QAAS,eACb,CAAC,EDLD,OAAS,+BAAAC,MAAmC,6CAiDxC,eAAAC,MAAA,oBATJ,SAASC,EACP,CAAE,SAAAC,EAAU,OAAAC,EAAQ,OAAAC,EAAQ,GAAGC,CAAM,EACrCC,EACqB,CACrB,GAAM,CAACC,EAAeC,CAAc,EAAIT,EAA4BM,EAAM,eAAgBF,CAAM,EAC1F,CAACM,EAAeC,CAAc,EAAIX,EAA4BM,EAAM,eAAgBD,CAAM,EAC1F,CAACO,EAASC,CAAQ,EAAIb,EAA4BM,EAAM,SAAUH,CAAQ,EAEhF,OACEF,EAACC,EAAA,CAAS,GAAGI,EAAO,IAAKC,EAAK,eAAgBE,EAAgB,eAAgBE,EAAgB,SAAUE,EACrG,UAAAH,EACAF,EACAI,GACH,CAEJ,CAEA,IAAME,EAAkBC,EAAWb,CAAM",
6
6
  "names": ["forwardRef", "DialogElement", "React", "createComponent", "events", "Dialog", "createComponent", "DialogElement", "React", "useSimpleOrChildrenRenderer", "jsxs", "Dialog", "children", "footer", "header", "props", "ref", "footerPortals", "footerRenderer", "headerPortals", "headerRenderer", "portals", "renderer", "ForwardedDialog", "forwardRef"]
7
7
  }
package/Select.d.ts CHANGED
@@ -7,10 +7,20 @@ import { type ComponentType, type ReactNode } from 'react';
7
7
  import { type SelectElement, type SelectProps as _SelectProps } from './generated/Select.js';
8
8
  import type { ReactSimpleRendererProps } from './renderers/useSimpleRenderer.js';
9
9
  export * from './generated/Select.js';
10
+ /**
11
+ * @deprecated The `renderer` prop is deprecated and will be removed in Vaadin 26.
12
+ */
10
13
  export type SelectReactRendererProps = ReactSimpleRendererProps<SelectElement>;
11
14
  type SelectRenderer = ComponentType<SelectReactRendererProps>;
12
15
  export type SelectProps = Partial<Omit<_SelectProps, 'children' | 'renderer'>> & Readonly<{
16
+ /**
17
+ * The select content. Render-function children are deprecated and will be
18
+ * removed in Vaadin 26. Use `items` or a `SelectListBox` child instead.
19
+ */
13
20
  children?: ReactNode | SelectRenderer | Array<ReactNode | SelectRenderer>;
21
+ /**
22
+ * @deprecated Use `items` or a `SelectListBox` child instead.
23
+ */
14
24
  renderer?: SelectRenderer | null;
15
25
  }>;
16
26
  declare const ForwardedSelect: import("react").ForwardRefExoticComponent<Partial<Omit<Partial<import("./utils/createComponent.js").ThemedWebComponentProps<SelectElement, Readonly<{
@@ -20,7 +30,14 @@ declare const ForwardedSelect: import("react").ForwardRefExoticComponent<Partial
20
30
  onValidated: import("@lit/react").EventName<import("@vaadin/select").SelectEventMap["validated"]>;
21
31
  onValueChanged: import("@lit/react").EventName<import("@vaadin/select").SelectEventMap["value-changed"]>;
22
32
  }>>>, "children" | "renderer">> & Readonly<{
33
+ /**
34
+ * The select content. Render-function children are deprecated and will be
35
+ * removed in Vaadin 26. Use `items` or a `SelectListBox` child instead.
36
+ */
23
37
  children?: ReactNode | SelectRenderer | Array<ReactNode | SelectRenderer>;
38
+ /**
39
+ * @deprecated Use `items` or a `SelectListBox` child instead.
40
+ */
24
41
  renderer?: SelectRenderer | null;
25
42
  }> & import("react").RefAttributes<SelectElement>>;
26
43
  export { ForwardedSelect as Select };
package/Select.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["src/Select.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EACL,KAAK,aAAa,EAKlB,KAAK,SAAS,EAGf,MAAM,OAAO,CAAC;AACf,OAAO,EAAqB,KAAK,aAAa,EAAE,KAAK,WAAW,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAEhH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAGjF,cAAc,uBAAuB,CAAC;AAEtC,MAAM,MAAM,wBAAwB,GAAG,wBAAwB,CAAC,aAAa,CAAC,CAAC;AAE/E,KAAK,cAAc,GAAG,aAAa,CAAC,wBAAwB,CAAC,CAAC;AAE9D,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,UAAU,GAAG,UAAU,CAAC,CAAC,GAC5E,QAAQ,CAAC;IACP,QAAQ,CAAC,EAAE,SAAS,GAAG,cAAc,GAAG,KAAK,CAAC,SAAS,GAAG,cAAc,CAAC,CAAC;IAC1E,QAAQ,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;CAClC,CAAC,CAAC;AAwCL,QAAA,MAAM,eAAe;;;;;;;eA1CN,SAAS,GAAG,cAAc,GAAG,KAAK,CAAC,SAAS,GAAG,cAAc,CAAC;eAC9D,cAAc,GAAG,IAAI;kDAyCM,CAAC;AAE3C,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,CAAC"}
1
+ {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["src/Select.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EACL,KAAK,aAAa,EAKlB,KAAK,SAAS,EAGf,MAAM,OAAO,CAAC;AACf,OAAO,EAAqB,KAAK,aAAa,EAAE,KAAK,WAAW,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAEhH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAGjF,cAAc,uBAAuB,CAAC;AAEtC;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,wBAAwB,CAAC,aAAa,CAAC,CAAC;AAE/E,KAAK,cAAc,GAAG,aAAa,CAAC,wBAAwB,CAAC,CAAC;AAE9D,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,UAAU,GAAG,UAAU,CAAC,CAAC,GAC5E,QAAQ,CAAC;IACP;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,GAAG,cAAc,GAAG,KAAK,CAAC,SAAS,GAAG,cAAc,CAAC,CAAC;IAC1E;;OAEG;IACH,QAAQ,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;CAClC,CAAC,CAAC;AAwCL,QAAA,MAAM,eAAe;;;;;;;IAjDjB;;;OAGG;eACQ,SAAS,GAAG,cAAc,GAAG,KAAK,CAAC,SAAS,GAAG,cAAc,CAAC;IACzE;;OAEG;eACQ,cAAc,GAAG,IAAI;kDAyCM,CAAC;AAE3C,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,CAAC"}
package/Select.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["src/Select.tsx", "src/generated/Select.ts"],
4
- "sourcesContent": ["export * from \"@vaadin/select/vaadin-select.js\";\n/**\n * @license\n * Copyright (c) 2022 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport {\n type ComponentType,\n type ForwardedRef,\n forwardRef,\n isValidElement,\n type ReactElement,\n type ReactNode,\n useEffect,\n useRef,\n} from 'react';\nimport { Select as _Select, type SelectElement, type SelectProps as _SelectProps } from './generated/Select.js';\nimport { useSimpleOrChildrenRenderer } from './renderers/useSimpleOrChildrenRenderer.js';\nimport type { ReactSimpleRendererProps } from './renderers/useSimpleRenderer.js';\nimport useMergedRefs from './utils/useMergedRefs.js';\n\nexport * from './generated/Select.js';\n\nexport type SelectReactRendererProps = ReactSimpleRendererProps<SelectElement>;\n\ntype SelectRenderer = ComponentType<SelectReactRendererProps>;\n\nexport type SelectProps = Partial<Omit<_SelectProps, 'children' | 'renderer'>> &\n Readonly<{\n children?: ReactNode | SelectRenderer | Array<ReactNode | SelectRenderer>;\n renderer?: SelectRenderer | null;\n }>;\n\nfunction Select(props: SelectProps, ref: ForwardedRef<SelectElement>): ReactElement | null {\n // React.Children.toArray() doesn't allow functions, so we convert manually.\n const children = Array.isArray(props.children) ? props.children : [props.children];\n\n // Components with slot attribute should stay in light DOM.\n const slottedChildren = children.filter((child): child is ReactNode => {\n return isValidElement(child) && (child.props as any).slot;\n });\n\n // Component without slot attribute should go to the overlay.\n const overlayChildren = children.filter((child): child is ReactNode => {\n return isValidElement(child) && !slottedChildren.includes(child);\n });\n\n const renderFn = children.find((child) => typeof child === 'function');\n\n const innerRef = useRef<SelectElement>(null);\n const [portals, renderer] = useSimpleOrChildrenRenderer(\n props.renderer,\n renderFn || (overlayChildren.length ? overlayChildren : undefined),\n );\n const finalRef = useMergedRefs(innerRef, ref);\n\n useEffect(() => {\n if (props.renderer || props.children) {\n innerRef.current?.requestContentUpdate();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps -- re-run when the element mounts, kept from the source\n }, [innerRef.current, props.renderer, props.children]);\n\n return (\n <_Select {...props} ref={finalRef} renderer={renderer}>\n {slottedChildren}\n {portals}\n </_Select>\n );\n}\n\nconst ForwardedSelect = forwardRef(Select);\n\nexport { ForwardedSelect as Select };\n", "import type { EventName } from \"@lit/react\";\nimport { Select as SelectElement, type SelectEventMap as _SelectEventMap, } from \"@vaadin/select/vaadin-select.js\";\nimport * as React from \"react\";\nimport { createComponent, type WebComponentProps } from \"../utils/createComponent.js\";\nexport { SelectElement };\nexport type SelectEventMap = Readonly<{\n onChange: EventName<_SelectEventMap[\"change\"]>;\n onInvalidChanged: EventName<_SelectEventMap[\"invalid-changed\"]>;\n onOpenedChanged: EventName<_SelectEventMap[\"opened-changed\"]>;\n onValidated: EventName<_SelectEventMap[\"validated\"]>;\n onValueChanged: EventName<_SelectEventMap[\"value-changed\"]>;\n}>;\nconst events = { onChange: \"change\", onInvalidChanged: \"invalid-changed\", onOpenedChanged: \"opened-changed\", onValidated: \"validated\", onValueChanged: \"value-changed\" } as SelectEventMap;\nexport type SelectProps = WebComponentProps<SelectElement, SelectEventMap>;\nexport const Select = createComponent({\n elementClass: SelectElement,\n events,\n react: React,\n tagName: \"vaadin-select\",\n});\n"],
5
- "mappings": "AAAA,WAAc,kCAMd,OAGE,cAAAA,EACA,kBAAAC,EAGA,aAAAC,EACA,UAAAC,MACK,QCdP,OAAS,UAAUC,MAA8D,kCACjF,UAAYC,MAAW,QACvB,OAAS,mBAAAC,MAA+C,6BASxD,IAAMC,EAAS,CAAE,SAAU,SAAU,iBAAkB,kBAAmB,gBAAiB,iBAAkB,YAAa,YAAa,eAAgB,eAAgB,EAE1JC,EAASC,EAAgB,CAClC,aAAcC,EACd,OAAAH,EACA,MAAOI,EACP,QAAS,eACb,CAAC,EDFD,OAAS,+BAAAC,MAAmC,6CAE5C,OAAOC,MAAmB,2BA6CtB,eAAAC,MAAA,oBA/BJ,SAASC,EAAOC,EAAoBC,EAAuD,CAEzF,IAAMC,EAAW,MAAM,QAAQF,EAAM,QAAQ,EAAIA,EAAM,SAAW,CAACA,EAAM,QAAQ,EAG3EG,EAAkBD,EAAS,OAAQE,GAChCC,EAAeD,CAAK,GAAMA,EAAM,MAAc,IACtD,EAGKE,EAAkBJ,EAAS,OAAQE,GAChCC,EAAeD,CAAK,GAAK,CAACD,EAAgB,SAASC,CAAK,CAChE,EAEKG,EAAWL,EAAS,KAAME,GAAU,OAAOA,GAAU,UAAU,EAE/DI,EAAWC,EAAsB,IAAI,EACrC,CAACC,EAASC,CAAQ,EAAIf,EAC1BI,EAAM,SACNO,IAAaD,EAAgB,OAASA,EAAkB,OAC1D,EACMM,EAAWf,EAAcW,EAAUP,CAAG,EAE5C,OAAAY,EAAU,IAAM,EACVb,EAAM,UAAYA,EAAM,WAC1BQ,EAAS,SAAS,qBAAqB,CAG3C,EAAG,CAACA,EAAS,QAASR,EAAM,SAAUA,EAAM,QAAQ,CAAC,EAGnDF,EAACC,EAAA,CAAS,GAAGC,EAAO,IAAKY,EAAU,SAAUD,EAC1C,UAAAR,EACAO,GACH,CAEJ,CAEA,IAAMI,EAAkBC,EAAWhB,CAAM",
4
+ "sourcesContent": ["export * from \"@vaadin/select/vaadin-select.js\";\n/**\n * @license\n * Copyright (c) 2022 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport {\n type ComponentType,\n type ForwardedRef,\n forwardRef,\n isValidElement,\n type ReactElement,\n type ReactNode,\n useEffect,\n useRef,\n} from 'react';\nimport { Select as _Select, type SelectElement, type SelectProps as _SelectProps } from './generated/Select.js';\nimport { useSimpleOrChildrenRenderer } from './renderers/useSimpleOrChildrenRenderer.js';\nimport type { ReactSimpleRendererProps } from './renderers/useSimpleRenderer.js';\nimport useMergedRefs from './utils/useMergedRefs.js';\n\nexport * from './generated/Select.js';\n\n/**\n * @deprecated The `renderer` prop is deprecated and will be removed in Vaadin 26.\n */\nexport type SelectReactRendererProps = ReactSimpleRendererProps<SelectElement>;\n\ntype SelectRenderer = ComponentType<SelectReactRendererProps>;\n\nexport type SelectProps = Partial<Omit<_SelectProps, 'children' | 'renderer'>> &\n Readonly<{\n /**\n * The select content. Render-function children are deprecated and will be\n * removed in Vaadin 26. Use `items` or a `SelectListBox` child instead.\n */\n children?: ReactNode | SelectRenderer | Array<ReactNode | SelectRenderer>;\n /**\n * @deprecated Use `items` or a `SelectListBox` child instead.\n */\n renderer?: SelectRenderer | null;\n }>;\n\nfunction Select(props: SelectProps, ref: ForwardedRef<SelectElement>): ReactElement | null {\n // React.Children.toArray() doesn't allow functions, so we convert manually.\n const children = Array.isArray(props.children) ? props.children : [props.children];\n\n // Components with slot attribute should stay in light DOM.\n const slottedChildren = children.filter((child): child is ReactNode => {\n return isValidElement(child) && (child.props as any).slot;\n });\n\n // Component without slot attribute should go to the overlay.\n const overlayChildren = children.filter((child): child is ReactNode => {\n return isValidElement(child) && !slottedChildren.includes(child);\n });\n\n const renderFn = children.find((child) => typeof child === 'function');\n\n const innerRef = useRef<SelectElement>(null);\n const [portals, renderer] = useSimpleOrChildrenRenderer(\n props.renderer,\n renderFn || (overlayChildren.length ? overlayChildren : undefined),\n );\n const finalRef = useMergedRefs(innerRef, ref);\n\n useEffect(() => {\n if (props.renderer || props.children) {\n innerRef.current?.requestContentUpdate();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps -- re-run when the element mounts, kept from the source\n }, [innerRef.current, props.renderer, props.children]);\n\n return (\n <_Select {...props} ref={finalRef} renderer={renderer}>\n {slottedChildren}\n {portals}\n </_Select>\n );\n}\n\nconst ForwardedSelect = forwardRef(Select);\n\nexport { ForwardedSelect as Select };\n", "import type { EventName } from \"@lit/react\";\nimport { Select as SelectElement, type SelectEventMap as _SelectEventMap, } from \"@vaadin/select/vaadin-select.js\";\nimport * as React from \"react\";\nimport { createComponent, type WebComponentProps } from \"../utils/createComponent.js\";\nexport { SelectElement };\nexport type SelectEventMap = Readonly<{\n onChange: EventName<_SelectEventMap[\"change\"]>;\n onInvalidChanged: EventName<_SelectEventMap[\"invalid-changed\"]>;\n onOpenedChanged: EventName<_SelectEventMap[\"opened-changed\"]>;\n onValidated: EventName<_SelectEventMap[\"validated\"]>;\n onValueChanged: EventName<_SelectEventMap[\"value-changed\"]>;\n}>;\nconst events = { onChange: \"change\", onInvalidChanged: \"invalid-changed\", onOpenedChanged: \"opened-changed\", onValidated: \"validated\", onValueChanged: \"value-changed\" } as SelectEventMap;\nexport type SelectProps = WebComponentProps<SelectElement, SelectEventMap>;\nexport const Select = createComponent({\n elementClass: SelectElement,\n events,\n react: React,\n tagName: \"vaadin-select\",\n});\n"],
5
+ "mappings": "AAAA,WAAc,kCAMd,OAGE,cAAAA,EACA,kBAAAC,EAGA,aAAAC,EACA,UAAAC,MACK,QCdP,OAAS,UAAUC,MAA8D,kCACjF,UAAYC,MAAW,QACvB,OAAS,mBAAAC,MAA+C,6BASxD,IAAMC,EAAS,CAAE,SAAU,SAAU,iBAAkB,kBAAmB,gBAAiB,iBAAkB,YAAa,YAAa,eAAgB,eAAgB,EAE1JC,EAASC,EAAgB,CAClC,aAAcC,EACd,OAAAH,EACA,MAAOI,EACP,QAAS,eACb,CAAC,EDFD,OAAS,+BAAAC,MAAmC,6CAE5C,OAAOC,MAAmB,2BAuDtB,eAAAC,MAAA,oBA/BJ,SAASC,EAAOC,EAAoBC,EAAuD,CAEzF,IAAMC,EAAW,MAAM,QAAQF,EAAM,QAAQ,EAAIA,EAAM,SAAW,CAACA,EAAM,QAAQ,EAG3EG,EAAkBD,EAAS,OAAQE,GAChCC,EAAeD,CAAK,GAAMA,EAAM,MAAc,IACtD,EAGKE,EAAkBJ,EAAS,OAAQE,GAChCC,EAAeD,CAAK,GAAK,CAACD,EAAgB,SAASC,CAAK,CAChE,EAEKG,EAAWL,EAAS,KAAME,GAAU,OAAOA,GAAU,UAAU,EAE/DI,EAAWC,EAAsB,IAAI,EACrC,CAACC,EAASC,CAAQ,EAAIf,EAC1BI,EAAM,SACNO,IAAaD,EAAgB,OAASA,EAAkB,OAC1D,EACMM,EAAWf,EAAcW,EAAUP,CAAG,EAE5C,OAAAY,EAAU,IAAM,EACVb,EAAM,UAAYA,EAAM,WAC1BQ,EAAS,SAAS,qBAAqB,CAG3C,EAAG,CAACA,EAAS,QAASR,EAAM,SAAUA,EAAM,QAAQ,CAAC,EAGnDF,EAACC,EAAA,CAAS,GAAGC,EAAO,IAAKY,EAAU,SAAUD,EAC1C,UAAAR,EACAO,GACH,CAEJ,CAEA,IAAMI,EAAkBC,EAAWhB,CAAM",
6
6
  "names": ["forwardRef", "isValidElement", "useEffect", "useRef", "SelectElement", "React", "createComponent", "events", "Select", "createComponent", "SelectElement", "React", "useSimpleOrChildrenRenderer", "useMergedRefs", "jsxs", "Select", "props", "ref", "children", "slottedChildren", "child", "isValidElement", "overlayChildren", "renderFn", "innerRef", "useRef", "portals", "renderer", "finalRef", "useEffect", "ForwardedSelect", "forwardRef"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/react-components",
3
- "version": "25.4.0-alpha3",
3
+ "version": "25.4.0-alpha5",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -21,70 +21,70 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@lit/react": "^1.0.7",
24
- "@vaadin/a11y-base": "25.4.0-alpha3",
25
- "@vaadin/accordion": "25.4.0-alpha3",
26
- "@vaadin/app-layout": "25.4.0-alpha3",
27
- "@vaadin/avatar": "25.4.0-alpha3",
28
- "@vaadin/avatar-group": "25.4.0-alpha3",
29
- "@vaadin/badge": "25.4.0-alpha3",
30
- "@vaadin/breadcrumbs": "25.4.0-alpha3",
31
- "@vaadin/button": "25.4.0-alpha3",
32
- "@vaadin/card": "25.4.0-alpha3",
33
- "@vaadin/checkbox": "25.4.0-alpha3",
34
- "@vaadin/checkbox-group": "25.4.0-alpha3",
35
- "@vaadin/combo-box": "25.4.0-alpha3",
36
- "@vaadin/component-base": "25.4.0-alpha3",
37
- "@vaadin/confirm-dialog": "25.4.0-alpha3",
38
- "@vaadin/context-menu": "25.4.0-alpha3",
39
- "@vaadin/custom-field": "25.4.0-alpha3",
40
- "@vaadin/date-picker": "25.4.0-alpha3",
41
- "@vaadin/date-time-picker": "25.4.0-alpha3",
42
- "@vaadin/details": "25.4.0-alpha3",
43
- "@vaadin/dialog": "25.4.0-alpha3",
44
- "@vaadin/email-field": "25.4.0-alpha3",
45
- "@vaadin/field-base": "25.4.0-alpha3",
46
- "@vaadin/field-highlighter": "25.4.0-alpha3",
47
- "@vaadin/form-layout": "25.4.0-alpha3",
48
- "@vaadin/grid": "25.4.0-alpha3",
49
- "@vaadin/horizontal-layout": "25.4.0-alpha3",
50
- "@vaadin/icon": "25.4.0-alpha3",
51
- "@vaadin/icons": "25.4.0-alpha3",
52
- "@vaadin/input-container": "25.4.0-alpha3",
53
- "@vaadin/integer-field": "25.4.0-alpha3",
54
- "@vaadin/item": "25.4.0-alpha3",
55
- "@vaadin/list-box": "25.4.0-alpha3",
56
- "@vaadin/lit-renderer": "25.4.0-alpha3",
57
- "@vaadin/login": "25.4.0-alpha3",
58
- "@vaadin/markdown": "25.4.0-alpha3",
59
- "@vaadin/master-detail-layout": "25.4.0-alpha3",
60
- "@vaadin/menu-bar": "25.4.0-alpha3",
61
- "@vaadin/message-input": "25.4.0-alpha3",
62
- "@vaadin/message-list": "25.4.0-alpha3",
63
- "@vaadin/multi-select-combo-box": "25.4.0-alpha3",
64
- "@vaadin/notification": "25.4.0-alpha3",
65
- "@vaadin/number-field": "25.4.0-alpha3",
66
- "@vaadin/overlay": "25.4.0-alpha3",
67
- "@vaadin/password-field": "25.4.0-alpha3",
68
- "@vaadin/popover": "25.4.0-alpha3",
69
- "@vaadin/progress-bar": "25.4.0-alpha3",
70
- "@vaadin/radio-group": "25.4.0-alpha3",
71
- "@vaadin/scroller": "25.4.0-alpha3",
72
- "@vaadin/select": "25.4.0-alpha3",
73
- "@vaadin/side-nav": "25.4.0-alpha3",
74
- "@vaadin/slider": "25.4.0-alpha3",
75
- "@vaadin/split-layout": "25.4.0-alpha3",
76
- "@vaadin/switch": "25.4.0-alpha3",
77
- "@vaadin/tabs": "25.4.0-alpha3",
78
- "@vaadin/tabsheet": "25.4.0-alpha3",
79
- "@vaadin/text-area": "25.4.0-alpha3",
80
- "@vaadin/text-field": "25.4.0-alpha3",
81
- "@vaadin/time-picker": "25.4.0-alpha3",
82
- "@vaadin/tooltip": "25.4.0-alpha3",
83
- "@vaadin/upload": "25.4.0-alpha3",
84
- "@vaadin/vaadin-lumo-styles": "25.4.0-alpha3",
85
- "@vaadin/vaadin-themable-mixin": "25.4.0-alpha3",
86
- "@vaadin/vertical-layout": "25.4.0-alpha3",
87
- "@vaadin/virtual-list": "25.4.0-alpha3"
24
+ "@vaadin/a11y-base": "25.4.0-alpha5",
25
+ "@vaadin/accordion": "25.4.0-alpha5",
26
+ "@vaadin/app-layout": "25.4.0-alpha5",
27
+ "@vaadin/avatar": "25.4.0-alpha5",
28
+ "@vaadin/avatar-group": "25.4.0-alpha5",
29
+ "@vaadin/badge": "25.4.0-alpha5",
30
+ "@vaadin/breadcrumbs": "25.4.0-alpha5",
31
+ "@vaadin/button": "25.4.0-alpha5",
32
+ "@vaadin/card": "25.4.0-alpha5",
33
+ "@vaadin/checkbox": "25.4.0-alpha5",
34
+ "@vaadin/checkbox-group": "25.4.0-alpha5",
35
+ "@vaadin/combo-box": "25.4.0-alpha5",
36
+ "@vaadin/component-base": "25.4.0-alpha5",
37
+ "@vaadin/confirm-dialog": "25.4.0-alpha5",
38
+ "@vaadin/context-menu": "25.4.0-alpha5",
39
+ "@vaadin/custom-field": "25.4.0-alpha5",
40
+ "@vaadin/date-picker": "25.4.0-alpha5",
41
+ "@vaadin/date-time-picker": "25.4.0-alpha5",
42
+ "@vaadin/details": "25.4.0-alpha5",
43
+ "@vaadin/dialog": "25.4.0-alpha5",
44
+ "@vaadin/email-field": "25.4.0-alpha5",
45
+ "@vaadin/field-base": "25.4.0-alpha5",
46
+ "@vaadin/field-highlighter": "25.4.0-alpha5",
47
+ "@vaadin/form-layout": "25.4.0-alpha5",
48
+ "@vaadin/grid": "25.4.0-alpha5",
49
+ "@vaadin/horizontal-layout": "25.4.0-alpha5",
50
+ "@vaadin/icon": "25.4.0-alpha5",
51
+ "@vaadin/icons": "25.4.0-alpha5",
52
+ "@vaadin/input-container": "25.4.0-alpha5",
53
+ "@vaadin/integer-field": "25.4.0-alpha5",
54
+ "@vaadin/item": "25.4.0-alpha5",
55
+ "@vaadin/list-box": "25.4.0-alpha5",
56
+ "@vaadin/lit-renderer": "25.4.0-alpha5",
57
+ "@vaadin/login": "25.4.0-alpha5",
58
+ "@vaadin/markdown": "25.4.0-alpha5",
59
+ "@vaadin/master-detail-layout": "25.4.0-alpha5",
60
+ "@vaadin/menu-bar": "25.4.0-alpha5",
61
+ "@vaadin/message-input": "25.4.0-alpha5",
62
+ "@vaadin/message-list": "25.4.0-alpha5",
63
+ "@vaadin/multi-select-combo-box": "25.4.0-alpha5",
64
+ "@vaadin/notification": "25.4.0-alpha5",
65
+ "@vaadin/number-field": "25.4.0-alpha5",
66
+ "@vaadin/overlay": "25.4.0-alpha5",
67
+ "@vaadin/password-field": "25.4.0-alpha5",
68
+ "@vaadin/popover": "25.4.0-alpha5",
69
+ "@vaadin/progress-bar": "25.4.0-alpha5",
70
+ "@vaadin/radio-group": "25.4.0-alpha5",
71
+ "@vaadin/scroller": "25.4.0-alpha5",
72
+ "@vaadin/select": "25.4.0-alpha5",
73
+ "@vaadin/side-nav": "25.4.0-alpha5",
74
+ "@vaadin/slider": "25.4.0-alpha5",
75
+ "@vaadin/split-layout": "25.4.0-alpha5",
76
+ "@vaadin/switch": "25.4.0-alpha5",
77
+ "@vaadin/tabs": "25.4.0-alpha5",
78
+ "@vaadin/tabsheet": "25.4.0-alpha5",
79
+ "@vaadin/text-area": "25.4.0-alpha5",
80
+ "@vaadin/text-field": "25.4.0-alpha5",
81
+ "@vaadin/time-picker": "25.4.0-alpha5",
82
+ "@vaadin/tooltip": "25.4.0-alpha5",
83
+ "@vaadin/upload": "25.4.0-alpha5",
84
+ "@vaadin/vaadin-lumo-styles": "25.4.0-alpha5",
85
+ "@vaadin/vaadin-themable-mixin": "25.4.0-alpha5",
86
+ "@vaadin/vertical-layout": "25.4.0-alpha5",
87
+ "@vaadin/virtual-list": "25.4.0-alpha5"
88
88
  },
89
89
  "devDependencies": {
90
90
  "@types/react": "^19.1.13",
@@ -601,5 +601,5 @@
601
601
  "./renderers/useSimpleRenderer.js": "./renderers/useSimpleRenderer.js",
602
602
  "./renderers/useSimpleRenderer.js.map": "./renderers/useSimpleRenderer.js.map"
603
603
  },
604
- "gitHead": "db7e679c1a8af00840cc05ddcbefff68dfed1e45"
604
+ "gitHead": "65e9c9e49c0a723b08ee91b9aae8b901e91a3597"
605
605
  }
@@ -24,12 +24,9 @@ type Constructor<T> = {
24
24
  new (): T;
25
25
  name: string;
26
26
  };
27
- type PolymerConstructor<T> = Constructor<T> & {
28
- _properties: Record<string, unknown>;
29
- };
30
27
  type Options<I extends HTMLElement, E extends EventNames = {}> = Readonly<{
31
28
  displayName?: string;
32
- elementClass: Constructor<I> | PolymerConstructor<I>;
29
+ elementClass: Constructor<I>;
33
30
  events?: E;
34
31
  react: typeof window.React;
35
32
  tagName: string;
@@ -1 +1 @@
1
- {"version":3,"file":"createComponent.d.ts","sourceRoot":"","sources":["../src/utils/createComponent.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAuC,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AACjF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8DAA8D,CAAC;AAI5G,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,kBAAkB;QAC1B,EAAE,EAAE,MAAM,CAAC;QACX,OAAO,EAAE,MAAM,CAAC;KACjB;IAED,UAAU,MAAM;QACd,aAAa,CAAC,EAAE,kBAAkB,EAAE,CAAC;KACtC;IAED,UAAU,MAAM;QAEd,MAAM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EzB,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,WAAW,EAAE,CAAC,SAAS,UAAU,GAAG,EAAE,IAAI,OAAO,CAAC,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAEtH;;GAEG;AACH,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,WAAW,EAAE,CAAC,SAAS,UAAU,GAAG,EAAE,IAAI,CAChF,KAAK,EAAE,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,KAC9C,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;AAE/B;;;;;GAKG;AACH,MAAM,MAAM,uBAAuB,CAAC,CAAC,SAAS,WAAW,EAAE,CAAC,SAAS,UAAU,GAAG,EAAE,IAAI,CACtF,KAAK,EAAE,OAAO,CAAC,uBAAuB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,KAC7D,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;AAI/B,wBAAgB,eAAe,CAAC,CAAC,SAAS,WAAW,EAAE,CAAC,SAAS,UAAU,GAAG,EAAE,EAC9E,OAAO,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,GACrB,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAO3B,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,WAAW,EAAE,CAAC,SAAS,UAAU,GAAG,EAAE,EACpF,OAAO,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,GACrB,uBAAuB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC"}
@@ -2,5 +2,5 @@
2
2
  * @license
3
3
  * Copyright (c) 2022 - 2026 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
- */import{createComponent as n}from"@lit/react";window.Vaadin??={},window.Vaadin.registrations??=[],window.Vaadin.registrations.push({is:"@vaadin/react-components",version:"25.4.0-alpha3"});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};
5
+ */import{createComponent as t}from"@lit/react";window.Vaadin??={},window.Vaadin.registrations??=[],window.Vaadin.registrations.push({is:"@vaadin/react-components",version:"25.4.0-alpha5"});function n(e){return t(e)}function s(e){return n(e)}export{n as createComponent,s as createThemedComponent};
6
6
  //# sourceMappingURL=createComponent.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/utils/createComponent.ts"],
4
- "sourcesContent": ["/**\n * @license\n * Copyright (c) 2022 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { createComponent as _createComponent, type EventName } from '@lit/react';\nimport type React from 'react';\nimport type { RefAttributes } from 'react';\nimport type { ThemePropertyMixinClass } from '@vaadin/vaadin-themable-mixin/vaadin-theme-property-mixin.js';\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: __VERSION__,\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
- "mappings": "AAAA;AAAA;AAAA;AAAA;AAAA,GAKA,OAAS,mBAAmBA,MAAwC,aAuBpE,OAAO,SAAW,CAAC,EACnB,OAAO,OAAO,gBAAkB,CAAC,EACjC,OAAO,OAAO,cAAc,KAAK,CAC/B,GAAI,2BACJ,QAAS,eACX,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
- "names": ["_createComponent", "createComponent", "options", "elementClass", "createThemedComponent"]
4
+ "sourcesContent": ["/**\n * @license\n * Copyright (c) 2022 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { createComponent as _createComponent, type EventName } from '@lit/react';\nimport type React from 'react';\nimport type { RefAttributes } from 'react';\nimport type { ThemePropertyMixinClass } from '@vaadin/vaadin-themable-mixin/vaadin-theme-property-mixin.js';\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: __VERSION__,\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 Options<I extends HTMLElement, E extends EventNames = {}> = Readonly<{\n displayName?: string;\n elementClass: Constructor<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 return _createComponent(options);\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
+ "mappings": "AAAA;AAAA;AAAA;AAAA;AAAA,GAKA,OAAS,mBAAmBA,MAAwC,aAuBpE,OAAO,SAAW,CAAC,EACnB,OAAO,OAAO,gBAAkB,CAAC,EACjC,OAAO,OAAO,cAAc,KAAK,CAC/B,GAAI,2BACJ,QAAS,eACX,CAAC,EAwEM,SAASC,EAAkEC,EAA6B,CAC7G,OAAOF,EAAiBE,CAAO,CACjC,CAaO,SAASC,EAAwED,EAA6B,CACnH,OAAOD,EAAgBC,CAAO,CAChC",
6
+ "names": ["_createComponent", "createComponent", "options", "createThemedComponent"]
7
7
  }