@vaadin/grid-pro 25.0.0-alpha8 → 25.0.0-alpha9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/grid-pro",
3
- "version": "25.0.0-alpha8",
3
+ "version": "25.0.0-alpha9",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -23,6 +23,8 @@
23
23
  "lit.d.ts",
24
24
  "lit.js",
25
25
  "src",
26
+ "!src/styles/*-base-styles.d.ts",
27
+ "!src/styles/*-base-styles.js",
26
28
  "theme",
27
29
  "vaadin-*.d.ts",
28
30
  "vaadin-*.js",
@@ -37,19 +39,19 @@
37
39
  ],
38
40
  "dependencies": {
39
41
  "@open-wc/dedupe-mixin": "^1.3.0",
40
- "@vaadin/checkbox": "25.0.0-alpha8",
41
- "@vaadin/component-base": "25.0.0-alpha8",
42
- "@vaadin/grid": "25.0.0-alpha8",
43
- "@vaadin/lit-renderer": "25.0.0-alpha8",
44
- "@vaadin/select": "25.0.0-alpha8",
45
- "@vaadin/text-field": "25.0.0-alpha8",
46
- "@vaadin/vaadin-lumo-styles": "25.0.0-alpha8",
47
- "@vaadin/vaadin-themable-mixin": "25.0.0-alpha8",
42
+ "@vaadin/checkbox": "25.0.0-alpha9",
43
+ "@vaadin/component-base": "25.0.0-alpha9",
44
+ "@vaadin/grid": "25.0.0-alpha9",
45
+ "@vaadin/lit-renderer": "25.0.0-alpha9",
46
+ "@vaadin/select": "25.0.0-alpha9",
47
+ "@vaadin/text-field": "25.0.0-alpha9",
48
+ "@vaadin/vaadin-lumo-styles": "25.0.0-alpha9",
49
+ "@vaadin/vaadin-themable-mixin": "25.0.0-alpha9",
48
50
  "lit": "^3.0.0"
49
51
  },
50
52
  "devDependencies": {
51
- "@vaadin/chai-plugins": "25.0.0-alpha8",
52
- "@vaadin/test-runner-commands": "25.0.0-alpha8",
53
+ "@vaadin/chai-plugins": "25.0.0-alpha9",
54
+ "@vaadin/test-runner-commands": "25.0.0-alpha9",
53
55
  "@vaadin/testing-helpers": "^2.0.0",
54
56
  "sinon": "^18.0.0"
55
57
  },
@@ -58,5 +60,5 @@
58
60
  "web-types.json",
59
61
  "web-types.lit.json"
60
62
  ],
61
- "gitHead": "ebf53673d5f639d2b1b6f2b31f640f530643ee2f"
63
+ "gitHead": "bbe4720721e0955ffc87a79b412bee38b1f0eb1e"
62
64
  }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2000 - 2025 Vaadin Ltd.
4
+ *
5
+ * This program is available under Vaadin Commercial License and Service Terms.
6
+ *
7
+ *
8
+ * See https://vaadin.com/commercial-license-and-service-terms for the full
9
+ * license.
10
+ */
11
+ import type { CSSResult } from 'lit';
12
+
13
+ export const gridProStyles: CSSResult;
@@ -0,0 +1,101 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2000 - 2025 Vaadin Ltd.
4
+ *
5
+ * This program is available under Vaadin Commercial License and Service Terms.
6
+ *
7
+ *
8
+ * See https://vaadin.com/commercial-license-and-service-terms for the full
9
+ * license.
10
+ */
11
+ import '@vaadin/component-base/src/style-props.js';
12
+ import { css } from 'lit';
13
+ import { gridStyles } from '@vaadin/grid/src/styles/vaadin-grid-base-styles.js';
14
+
15
+ const gridPro = css`
16
+ [part~='body-cell'] {
17
+ --_highlight-color: color-mix(in srgb, currentColor 5%, transparent);
18
+ --_highlight-color2: color-mix(in srgb, currentColor 10%, transparent);
19
+ --_highlight-bg: linear-gradient(var(--_highlight-color), var(--_highlight-color));
20
+ }
21
+
22
+ [part~='editable-cell'] {
23
+ display: flex;
24
+ align-items: inherit;
25
+ align-self: stretch;
26
+ flex: 1;
27
+ min-width: 0;
28
+ cursor: var(--vaadin-clickable-cursor);
29
+ outline: 0;
30
+ }
31
+
32
+ [part~='editable-cell']:hover,
33
+ :host([navigating]) [part~='editable-cell']:focus {
34
+ background: var(--vaadin-grid-pro-editable-cell-background-hover, var(--_highlight-bg));
35
+ }
36
+
37
+ /* Indicate editable cells */
38
+
39
+ :host([theme~='highlight-editable-cells']) [part~='editable-cell'] {
40
+ background: var(--vaadin-grid-pro-editable-cell-background, var(--_highlight-bg));
41
+ }
42
+
43
+ :host([theme~='highlight-editable-cells']) [part~='editable-cell']:is(:hover, :focus-visible) {
44
+ background:
45
+ var(--vaadin-grid-pro-editable-cell-background-hover, var(--_highlight-bg)),
46
+ var(--vaadin-grid-pro-editable-cell-background, var(--_highlight-bg));
47
+ }
48
+
49
+ /* Indicate read-only cells */
50
+
51
+ /* prettier-ignore */
52
+ :host([theme~='highlight-read-only-cells']) [part~='body-cell']:not(:has([part~='editable-cell'])) {
53
+ --vaadin-grid-cell-background-hover: repeating-linear-gradient(
54
+ -45deg,
55
+ transparent,
56
+ transparent 30%,
57
+ var(--_highlight-color2) 30%,
58
+ var(--_highlight-color2) 50%
59
+ );
60
+ background-size: 6px 6px;
61
+ }
62
+
63
+ /* Loading editor cell styles are used by Flow GridPro */
64
+ :host([loading-editor]) [part~='focused-cell']::before {
65
+ content: '';
66
+ position: absolute;
67
+ inset: 0;
68
+ pointer-events: none;
69
+ box-shadow: inset 0 0 0 var(--vaadin-focus-ring-width) var(--vaadin-focus-ring-color);
70
+ animation: loading-editor 1.4s infinite;
71
+ opacity: 0;
72
+ }
73
+
74
+ @keyframes loading-editor {
75
+ 50% {
76
+ opacity: 1;
77
+ }
78
+ }
79
+
80
+ [part~='updating-cell']::after {
81
+ content: '';
82
+ position: absolute;
83
+ inset: var(--_cell-padding);
84
+ margin: var(--vaadin-focus-ring-width);
85
+ border-radius: 4px;
86
+ background-size: max(4em, 50%);
87
+ background-repeat: no-repeat;
88
+ background-position: min(-200%, -4em) 0;
89
+ background-image: linear-gradient(90deg, transparent, currentColor, transparent);
90
+ animation: updating-cell 1.3s ease-out infinite;
91
+ opacity: 0.1;
92
+ }
93
+
94
+ @keyframes updating-cell {
95
+ 100% {
96
+ background-position: max(300%, 8em) 0;
97
+ }
98
+ }
99
+ `;
100
+
101
+ export const gridProStyles = [gridPro, gridStyles];
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2000 - 2025 Vaadin Ltd.
4
+ *
5
+ * This program is available under Vaadin Commercial License and Service Terms.
6
+ *
7
+ *
8
+ * See https://vaadin.com/commercial-license-and-service-terms for the full
9
+ * license.
10
+ */
11
+ import type { CSSResult } from 'lit';
12
+
13
+ export const gridProStyles: CSSResult;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2000 - 2025 Vaadin Ltd.
4
+ *
5
+ * This program is available under Vaadin Commercial License and Service Terms.
6
+ *
7
+ *
8
+ * See https://vaadin.com/commercial-license-and-service-terms for the full
9
+ * license.
10
+ */
11
+ import { gridStyles } from '@vaadin/grid/src/styles/vaadin-grid-core-styles.js';
12
+
13
+ export const gridProStyles = gridStyles;
@@ -9,7 +9,9 @@
9
9
  * license.
10
10
  */
11
11
  import { defineCustomElement } from '@vaadin/component-base/src/define.js';
12
+ import { SlotStylesMixin } from '@vaadin/component-base/src/slot-styles-mixin.js';
12
13
  import { Grid } from '@vaadin/grid/src/vaadin-grid.js';
14
+ import { gridProStyles } from './styles/vaadin-grid-pro-core-styles.js';
13
15
  import { InlineEditingMixin } from './vaadin-grid-pro-inline-editing-mixin.js';
14
16
 
15
17
  /**
@@ -49,7 +51,7 @@ import { InlineEditingMixin } from './vaadin-grid-pro-inline-editing-mixin.js';
49
51
  * @extends Grid
50
52
  * @mixes InlineEditingMixin
51
53
  */
52
- class GridPro extends InlineEditingMixin(Grid) {
54
+ class GridPro extends SlotStylesMixin(InlineEditingMixin(Grid)) {
53
55
  static get is() {
54
56
  return 'vaadin-grid-pro';
55
57
  }
@@ -57,6 +59,34 @@ class GridPro extends InlineEditingMixin(Grid) {
57
59
  static get cvdlName() {
58
60
  return 'vaadin-grid-pro';
59
61
  }
62
+
63
+ static get styles() {
64
+ return gridProStyles;
65
+ }
66
+
67
+ get slotStyles() {
68
+ const tag = this.localName;
69
+
70
+ return [
71
+ `
72
+ ${tag} [theme="grid-pro-editor"] {
73
+ --vaadin-input-field-border-radius: 0px;
74
+ --vaadin-input-field-border-width: 0px;
75
+ width: 100%;
76
+ }
77
+
78
+ ${tag} [theme="grid-pro-editor"]::part(input-field) {
79
+ height: 100%;
80
+ outline-offset: calc(var(--vaadin-focus-ring-width) * -1);
81
+ }
82
+
83
+ vaadin-grid-cell-content:has([theme="grid-pro-editor"]) {
84
+ padding: 0;
85
+ overflow: visible;
86
+ }
87
+ `,
88
+ ];
89
+ }
60
90
  }
61
91
 
62
92
  defineCustomElement(GridPro);
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/grid-pro",
4
- "version": "25.0.0-alpha8",
4
+ "version": "25.0.0-alpha9",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -401,7 +401,7 @@
401
401
  },
402
402
  {
403
403
  "name": "vaadin-grid-pro",
404
- "description": "`<vaadin-grid-pro>` is a high quality data grid / data table Web Component with extended functionality.\nIt extends `<vaadin-grid>` and adds extra features on top of the basic ones.\n\nSee [`<vaadin-grid>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha8/#/elements/vaadin-grid) documentation for details.\n\n```html\n<vaadin-grid-pro></vaadin-grid-pro>\n```\n\n### Internal components\n\nIn addition to `<vaadin-grid-pro>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-grid-pro-edit-checkbox>` - has the same API as [`<vaadin-checkbox>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha8/#/elements/vaadin-checkbox).\n- `<vaadin-grid-pro-edit-text-field>` - has the same API as [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha8/#/elements/vaadin-text-field).\n- `<vaadin-grid-pro-edit-select>` - has the same API as [`<vaadin-select>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha8/#/elements/vaadin-select).",
404
+ "description": "`<vaadin-grid-pro>` is a high quality data grid / data table Web Component with extended functionality.\nIt extends `<vaadin-grid>` and adds extra features on top of the basic ones.\n\nSee [`<vaadin-grid>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha9/#/elements/vaadin-grid) documentation for details.\n\n```html\n<vaadin-grid-pro></vaadin-grid-pro>\n```\n\n### Internal components\n\nIn addition to `<vaadin-grid-pro>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-grid-pro-edit-checkbox>` - has the same API as [`<vaadin-checkbox>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha9/#/elements/vaadin-checkbox).\n- `<vaadin-grid-pro-edit-text-field>` - has the same API as [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha9/#/elements/vaadin-text-field).\n- `<vaadin-grid-pro-edit-select>` - has the same API as [`<vaadin-select>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha9/#/elements/vaadin-select).",
405
405
  "attributes": [
406
406
  {
407
407
  "name": "accessible-name",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/grid-pro",
4
- "version": "25.0.0-alpha8",
4
+ "version": "25.0.0-alpha9",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -177,7 +177,7 @@
177
177
  },
178
178
  {
179
179
  "name": "vaadin-grid-pro",
180
- "description": "`<vaadin-grid-pro>` is a high quality data grid / data table Web Component with extended functionality.\nIt extends `<vaadin-grid>` and adds extra features on top of the basic ones.\n\nSee [`<vaadin-grid>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha8/#/elements/vaadin-grid) documentation for details.\n\n```html\n<vaadin-grid-pro></vaadin-grid-pro>\n```\n\n### Internal components\n\nIn addition to `<vaadin-grid-pro>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-grid-pro-edit-checkbox>` - has the same API as [`<vaadin-checkbox>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha8/#/elements/vaadin-checkbox).\n- `<vaadin-grid-pro-edit-text-field>` - has the same API as [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha8/#/elements/vaadin-text-field).\n- `<vaadin-grid-pro-edit-select>` - has the same API as [`<vaadin-select>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha8/#/elements/vaadin-select).",
180
+ "description": "`<vaadin-grid-pro>` is a high quality data grid / data table Web Component with extended functionality.\nIt extends `<vaadin-grid>` and adds extra features on top of the basic ones.\n\nSee [`<vaadin-grid>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha9/#/elements/vaadin-grid) documentation for details.\n\n```html\n<vaadin-grid-pro></vaadin-grid-pro>\n```\n\n### Internal components\n\nIn addition to `<vaadin-grid-pro>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-grid-pro-edit-checkbox>` - has the same API as [`<vaadin-checkbox>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha9/#/elements/vaadin-checkbox).\n- `<vaadin-grid-pro-edit-text-field>` - has the same API as [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha9/#/elements/vaadin-text-field).\n- `<vaadin-grid-pro-edit-select>` - has the same API as [`<vaadin-select>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha9/#/elements/vaadin-select).",
181
181
  "extension": true,
182
182
  "attributes": [
183
183
  {