@vaadin/react-components 24.4.0-beta3 → 24.4.0-rc2

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.
@@ -117,3 +117,6 @@
117
117
  background-color: var(--lumo-contrast-10pct);
118
118
  border-radius: var(--lumo-border-radius-m);
119
119
  }
120
+ pre code {
121
+ background: transparent;
122
+ }
@@ -278,7 +278,7 @@
278
278
  .sm\\:flex {
279
279
  display: flex;
280
280
  }
281
- .sm\\grid {
281
+ .sm\\:grid {
282
282
  display: grid;
283
283
  }
284
284
  .sm\\:hidden {
@@ -322,7 +322,7 @@
322
322
  .md\\:flex {
323
323
  display: flex;
324
324
  }
325
- .md\\grid {
325
+ .md\\:grid {
326
326
  display: grid;
327
327
  }
328
328
  .md\\:hidden {
@@ -366,7 +366,7 @@
366
366
  .lg\\:flex {
367
367
  display: flex;
368
368
  }
369
- .lg\\grid {
369
+ .lg\\:grid {
370
370
  display: grid;
371
371
  }
372
372
  .lg\\:hidden {
@@ -410,7 +410,7 @@
410
410
  .xl\\:flex {
411
411
  display: flex;
412
412
  }
413
- .xl\\grid {
413
+ .xl\\:grid {
414
414
  display: grid;
415
415
  }
416
416
  .xl\\:hidden {
@@ -454,7 +454,7 @@
454
454
  .\\32xl\\:flex {
455
455
  display: flex;
456
456
  }
457
- .\\32xl\\grid {
457
+ .\\32xl\\:grid {
458
458
  display: grid;
459
459
  }
460
460
  .\\32xl\\:hidden {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/react-components",
3
- "version": "24.4.0-beta3",
3
+ "version": "24.4.0-rc2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -27,63 +27,63 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@lit/react": "^1.0.0",
30
- "@vaadin/a11y-base": "24.4.0-beta3",
31
- "@vaadin/accordion": "24.4.0-beta3",
32
- "@vaadin/app-layout": "24.4.0-beta3",
33
- "@vaadin/avatar": "24.4.0-beta3",
34
- "@vaadin/avatar-group": "24.4.0-beta3",
35
- "@vaadin/button": "24.4.0-beta3",
36
- "@vaadin/checkbox": "24.4.0-beta3",
37
- "@vaadin/checkbox-group": "24.4.0-beta3",
38
- "@vaadin/combo-box": "24.4.0-beta3",
39
- "@vaadin/component-base": "24.4.0-beta3",
40
- "@vaadin/confirm-dialog": "24.4.0-beta3",
41
- "@vaadin/context-menu": "24.4.0-beta3",
42
- "@vaadin/custom-field": "24.4.0-beta3",
43
- "@vaadin/date-picker": "24.4.0-beta3",
44
- "@vaadin/date-time-picker": "24.4.0-beta3",
45
- "@vaadin/details": "24.4.0-beta3",
46
- "@vaadin/dialog": "24.4.0-beta3",
47
- "@vaadin/email-field": "24.4.0-beta3",
48
- "@vaadin/field-base": "24.4.0-beta3",
49
- "@vaadin/field-highlighter": "24.4.0-beta3",
50
- "@vaadin/form-layout": "24.4.0-beta3",
51
- "@vaadin/grid": "24.4.0-beta3",
52
- "@vaadin/horizontal-layout": "24.4.0-beta3",
53
- "@vaadin/icon": "24.4.0-beta3",
54
- "@vaadin/icons": "24.4.0-beta3",
55
- "@vaadin/input-container": "24.4.0-beta3",
56
- "@vaadin/integer-field": "24.4.0-beta3",
57
- "@vaadin/item": "24.4.0-beta3",
58
- "@vaadin/list-box": "24.4.0-beta3",
59
- "@vaadin/lit-renderer": "24.4.0-beta3",
60
- "@vaadin/login": "24.4.0-beta3",
61
- "@vaadin/menu-bar": "24.4.0-beta3",
62
- "@vaadin/message-input": "24.4.0-beta3",
63
- "@vaadin/message-list": "24.4.0-beta3",
64
- "@vaadin/multi-select-combo-box": "24.4.0-beta3",
65
- "@vaadin/notification": "24.4.0-beta3",
66
- "@vaadin/number-field": "24.4.0-beta3",
67
- "@vaadin/overlay": "24.4.0-beta3",
68
- "@vaadin/password-field": "24.4.0-beta3",
69
- "@vaadin/progress-bar": "24.4.0-beta3",
70
- "@vaadin/radio-group": "24.4.0-beta3",
71
- "@vaadin/scroller": "24.4.0-beta3",
72
- "@vaadin/select": "24.4.0-beta3",
73
- "@vaadin/side-nav": "24.4.0-beta3",
74
- "@vaadin/split-layout": "24.4.0-beta3",
75
- "@vaadin/tabs": "24.4.0-beta3",
76
- "@vaadin/tabsheet": "24.4.0-beta3",
77
- "@vaadin/text-area": "24.4.0-beta3",
78
- "@vaadin/text-field": "24.4.0-beta3",
79
- "@vaadin/time-picker": "24.4.0-beta3",
80
- "@vaadin/tooltip": "24.4.0-beta3",
81
- "@vaadin/upload": "24.4.0-beta3",
82
- "@vaadin/vaadin-lumo-styles": "24.4.0-beta3",
83
- "@vaadin/vaadin-material-styles": "24.4.0-beta3",
84
- "@vaadin/vaadin-themable-mixin": "24.4.0-beta3",
85
- "@vaadin/vertical-layout": "24.4.0-beta3",
86
- "@vaadin/virtual-list": "24.4.0-beta3"
30
+ "@vaadin/a11y-base": "24.4.0-rc2",
31
+ "@vaadin/accordion": "24.4.0-rc2",
32
+ "@vaadin/app-layout": "24.4.0-rc2",
33
+ "@vaadin/avatar": "24.4.0-rc2",
34
+ "@vaadin/avatar-group": "24.4.0-rc2",
35
+ "@vaadin/button": "24.4.0-rc2",
36
+ "@vaadin/checkbox": "24.4.0-rc2",
37
+ "@vaadin/checkbox-group": "24.4.0-rc2",
38
+ "@vaadin/combo-box": "24.4.0-rc2",
39
+ "@vaadin/component-base": "24.4.0-rc2",
40
+ "@vaadin/confirm-dialog": "24.4.0-rc2",
41
+ "@vaadin/context-menu": "24.4.0-rc2",
42
+ "@vaadin/custom-field": "24.4.0-rc2",
43
+ "@vaadin/date-picker": "24.4.0-rc2",
44
+ "@vaadin/date-time-picker": "24.4.0-rc2",
45
+ "@vaadin/details": "24.4.0-rc2",
46
+ "@vaadin/dialog": "24.4.0-rc2",
47
+ "@vaadin/email-field": "24.4.0-rc2",
48
+ "@vaadin/field-base": "24.4.0-rc2",
49
+ "@vaadin/field-highlighter": "24.4.0-rc2",
50
+ "@vaadin/form-layout": "24.4.0-rc2",
51
+ "@vaadin/grid": "24.4.0-rc2",
52
+ "@vaadin/horizontal-layout": "24.4.0-rc2",
53
+ "@vaadin/icon": "24.4.0-rc2",
54
+ "@vaadin/icons": "24.4.0-rc2",
55
+ "@vaadin/input-container": "24.4.0-rc2",
56
+ "@vaadin/integer-field": "24.4.0-rc2",
57
+ "@vaadin/item": "24.4.0-rc2",
58
+ "@vaadin/list-box": "24.4.0-rc2",
59
+ "@vaadin/lit-renderer": "24.4.0-rc2",
60
+ "@vaadin/login": "24.4.0-rc2",
61
+ "@vaadin/menu-bar": "24.4.0-rc2",
62
+ "@vaadin/message-input": "24.4.0-rc2",
63
+ "@vaadin/message-list": "24.4.0-rc2",
64
+ "@vaadin/multi-select-combo-box": "24.4.0-rc2",
65
+ "@vaadin/notification": "24.4.0-rc2",
66
+ "@vaadin/number-field": "24.4.0-rc2",
67
+ "@vaadin/overlay": "24.4.0-rc2",
68
+ "@vaadin/password-field": "24.4.0-rc2",
69
+ "@vaadin/progress-bar": "24.4.0-rc2",
70
+ "@vaadin/radio-group": "24.4.0-rc2",
71
+ "@vaadin/scroller": "24.4.0-rc2",
72
+ "@vaadin/select": "24.4.0-rc2",
73
+ "@vaadin/side-nav": "24.4.0-rc2",
74
+ "@vaadin/split-layout": "24.4.0-rc2",
75
+ "@vaadin/tabs": "24.4.0-rc2",
76
+ "@vaadin/tabsheet": "24.4.0-rc2",
77
+ "@vaadin/text-area": "24.4.0-rc2",
78
+ "@vaadin/text-field": "24.4.0-rc2",
79
+ "@vaadin/time-picker": "24.4.0-rc2",
80
+ "@vaadin/tooltip": "24.4.0-rc2",
81
+ "@vaadin/upload": "24.4.0-rc2",
82
+ "@vaadin/vaadin-lumo-styles": "24.4.0-rc2",
83
+ "@vaadin/vaadin-material-styles": "24.4.0-rc2",
84
+ "@vaadin/vaadin-themable-mixin": "24.4.0-rc2",
85
+ "@vaadin/vertical-layout": "24.4.0-rc2",
86
+ "@vaadin/virtual-list": "24.4.0-rc2"
87
87
  },
88
88
  "author": "Vaadin Ltd.",
89
89
  "license": "Apache-2.0",
@@ -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.4.0-beta3"});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};
1
+ import{createComponent as n}from"@lit/react";window.Vaadin??={},window.Vaadin.registrations??=[],window.Vaadin.registrations.push({is:"@vaadin/react-components",version:"24.4.0-rc2"});function r(e){const{elementClass:t}=e;return n("_properties"in t?{...e,elementClass:{name:t.name,prototype:{...t._properties,hidden:Boolean}}}:e)}export{r 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.4.0-beta3',\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
- "mappings": "AAAA,OAAS,mBAAmBA,MAAwC,aAuBpE,OAAO,SAAW,CAAC,EACnB,OAAO,OAAO,gBAAkB,CAAC,EACjC,OAAO,OAAO,cAAc,KAAK,CAC/B,GAAI,2BACJ,QAAiC,cACnC,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",
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.4.0-rc2',\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
+ "mappings": "AAAA,OAAS,mBAAmBA,MAAwC,aAuBpE,OAAO,SAAW,CAAC,EACnB,OAAO,OAAO,gBAAkB,CAAC,EACjC,OAAO,OAAO,cAAc,KAAK,CAC/B,GAAI,2BACJ,QAAiC,YACnC,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
  }