@vaadin/crud 25.0.0-alpha1 → 25.0.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.
@@ -1,125 +0,0 @@
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 { css } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
12
-
13
- export const crudStyles = css`
14
- :host {
15
- width: 100%;
16
- height: 400px;
17
- --vaadin-crud-editor-max-height: 40%;
18
- --vaadin-crud-editor-max-width: 40%;
19
- }
20
-
21
- :host,
22
- #main {
23
- display: flex;
24
- flex-direction: column;
25
- align-self: stretch;
26
- position: relative;
27
- overflow: hidden;
28
- }
29
-
30
- #main {
31
- flex: 1 1 100%;
32
- height: 100%;
33
- }
34
-
35
- :host([hidden]),
36
- [hidden] {
37
- display: none !important;
38
- }
39
-
40
- [part='toolbar'] {
41
- display: flex;
42
- flex-shrink: 0;
43
- align-items: baseline;
44
- justify-content: flex-end;
45
- }
46
-
47
- :host([no-toolbar]) [part='toolbar'] {
48
- display: none;
49
- }
50
-
51
- #container {
52
- display: flex;
53
- height: 100%;
54
- }
55
-
56
- :host([editor-position='bottom']) #container {
57
- flex-direction: column;
58
- }
59
-
60
- [part='editor'] {
61
- z-index: 1;
62
- display: flex;
63
- flex-direction: column;
64
- height: 100%;
65
- outline: none;
66
- }
67
-
68
- :host(:not([editor-position=''])[editor-opened]:not([fullscreen])) [part='editor'] {
69
- flex: 1 0 100%;
70
- }
71
-
72
- :host([editor-position='bottom'][editor-opened]:not([fullscreen])) [part='editor'] {
73
- max-height: var(--vaadin-crud-editor-max-height);
74
- }
75
-
76
- :host([editor-position='aside'][editor-opened]:not([fullscreen])) [part='editor'] {
77
- min-width: 300px;
78
- max-width: var(--vaadin-crud-editor-max-width);
79
- }
80
-
81
- [part='scroller'] {
82
- display: flex;
83
- flex-direction: column;
84
- overflow: auto;
85
- flex: auto;
86
- }
87
-
88
- [part='footer'] {
89
- display: flex;
90
- flex: none;
91
- flex-direction: row-reverse;
92
- }
93
- `;
94
-
95
- export const crudDialogOverlayStyles = css`
96
- [part='overlay'] {
97
- max-width: 54em;
98
- min-width: 20em;
99
- }
100
-
101
- [part='footer'] {
102
- justify-content: flex-start;
103
- flex-direction: row-reverse;
104
- }
105
-
106
- /* Make buttons clickable */
107
- [part='footer'] ::slotted(:not([disabled])) {
108
- pointer-events: all;
109
- }
110
-
111
- :host([fullscreen]) {
112
- inset: 0;
113
- padding: 0;
114
- }
115
-
116
- :host([fullscreen]) [part='overlay'] {
117
- height: 100vh;
118
- width: 100vw;
119
- border-radius: 0 !important;
120
- }
121
-
122
- :host([fullscreen]) [part='content'] {
123
- flex: 1;
124
- }
125
- `;
@@ -1,4 +0,0 @@
1
- import '@vaadin/vaadin-lumo-styles/typography.js';
2
- import '@vaadin/vaadin-lumo-styles/color.js';
3
- import '@vaadin/vaadin-lumo-styles/font-icons.js';
4
- import '@vaadin/vaadin-lumo-styles/style.js';
@@ -1,155 +0,0 @@
1
- import '@vaadin/vaadin-lumo-styles/typography.js';
2
- import '@vaadin/vaadin-lumo-styles/color.js';
3
- import '@vaadin/vaadin-lumo-styles/font-icons.js';
4
- import '@vaadin/vaadin-lumo-styles/style.js';
5
- import { dialogOverlay } from '@vaadin/dialog/theme/lumo/vaadin-dialog-styles.js';
6
- import { overlay } from '@vaadin/vaadin-lumo-styles/mixins/overlay.js';
7
- import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
8
-
9
- registerStyles(
10
- 'vaadin-crud-edit',
11
- css`
12
- :host {
13
- min-width: auto;
14
- margin: 0;
15
- font-family: 'lumo-icons', var(--lumo-font-family);
16
- font-size: var(--lumo-icon-size-m);
17
- line-height: 1;
18
- position: relative;
19
- width: var(--lumo-size-s);
20
- height: var(--lumo-size-s);
21
- outline: none;
22
- }
23
-
24
- [part='icon']::before {
25
- content: var(--lumo-icons-edit);
26
- width: var(--lumo-size-m);
27
- height: var(--lumo-size-m);
28
- line-height: var(--lumo-size-m);
29
- text-align: center;
30
- position: absolute;
31
- top: calc((var(--lumo-size-m) - var(--lumo-size-s)) / -2);
32
- left: calc((var(--lumo-size-m) - var(--lumo-size-s)) / -2);
33
- }
34
- `,
35
- { moduleId: 'lumo-crud-grid-edit' },
36
- );
37
-
38
- /**
39
- * Shared styles used for the CRUD editor content and buttons regardless of `editorPosition`.
40
- * They are applied to both `vaadin-crud` and `vaadin-crud-dialog-overlay` components.
41
- */
42
- const editorStyles = css`
43
- [part='header'] ::slotted(h3) {
44
- margin-top: 0 !important;
45
- }
46
-
47
- :host(:not([dir='rtl'])) ::slotted([slot='delete-button']) {
48
- margin-right: auto;
49
- }
50
-
51
- :host([dir='rtl']) ::slotted([slot='delete-button']) {
52
- margin-left: auto;
53
- }
54
- `;
55
-
56
- registerStyles(
57
- 'vaadin-crud',
58
- [
59
- editorStyles,
60
- css`
61
- :host {
62
- font-family: var(--lumo-font-family);
63
- --_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));
64
- --_focus-ring-width: var(--vaadin-focus-ring-width, 2px);
65
- }
66
-
67
- [part='scroller'] {
68
- padding: var(--lumo-space-l);
69
- }
70
-
71
- [part='toolbar'] {
72
- padding: var(--lumo-space-s) var(--lumo-space-m);
73
- background-color: var(--lumo-contrast-5pct);
74
- border: 1px solid var(--lumo-contrast-10pct);
75
- border-top: none;
76
- }
77
-
78
- :host(:not([dir='rtl'])) [part='toolbar'] ::slotted(*:not(:first-child)) {
79
- margin-left: var(--lumo-space-s);
80
- }
81
-
82
- :host([dir='rtl']) [part='toolbar'] ::slotted(*:not(:first-child)) {
83
- margin-right: var(--lumo-space-s);
84
- }
85
-
86
- :host([theme~='no-border']) [part='toolbar'] {
87
- border: 0;
88
- }
89
-
90
- [part='footer'] {
91
- background-color: var(--lumo-contrast-5pct);
92
- padding: var(--lumo-space-s);
93
- }
94
-
95
- [part='footer'] ::slotted(*) {
96
- margin-left: var(--lumo-space-s);
97
- margin-right: var(--lumo-space-s);
98
- }
99
-
100
- [part='editor'] {
101
- background: var(--lumo-base-color);
102
- box-sizing: border-box;
103
- position: relative;
104
- }
105
-
106
- [part='editor']:focus::before {
107
- position: absolute;
108
- inset: 0;
109
- content: '';
110
- box-shadow: inset 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);
111
- pointer-events: none;
112
- }
113
-
114
- :host(:not([editor-position=''])) [part='editor']:not([hidden]) {
115
- box-shadow: var(--lumo-box-shadow-m);
116
- }
117
-
118
- :host(:not([theme~='no-border']):not([editor-position=''])) [part='editor']:not([hidden]) {
119
- border: 1px solid var(--lumo-contrast-20pct);
120
- }
121
-
122
- :host(:not([theme~='no-border'])[editor-position='bottom']) [part='editor']:not([hidden]) {
123
- border-top: 0;
124
- }
125
-
126
- :host(:not([dir='rtl'])[editor-position='aside']) [part='editor']:not([hidden]) {
127
- border-left: 0;
128
- }
129
-
130
- :host([dir='rtl']:not([theme~='no-border'])[editor-position='aside']) [part='editor']:not([hidden]) {
131
- border-right: 0;
132
- }
133
- `,
134
- ],
135
- { moduleId: 'lumo-crud' },
136
- );
137
-
138
- registerStyles(
139
- 'vaadin-crud-dialog-overlay',
140
- [
141
- overlay,
142
- dialogOverlay,
143
- editorStyles,
144
- css`
145
- [part='header'] ::slotted(h3) {
146
- margin-top: 0 !important;
147
- margin-bottom: 0 !important;
148
- margin-inline-start: var(--lumo-space-s);
149
- }
150
- `,
151
- ],
152
- {
153
- moduleId: 'lumo-crud-dialog-overlay',
154
- },
155
- );
@@ -1,8 +0,0 @@
1
- import '@vaadin/button/theme/lumo/vaadin-button.js';
2
- import '@vaadin/confirm-dialog/theme/lumo/vaadin-confirm-dialog.js';
3
- import '@vaadin/form-layout/theme/lumo/vaadin-form-layout.js';
4
- import '@vaadin/grid/theme/lumo/vaadin-grid.js';
5
- import '@vaadin/grid/theme/lumo/vaadin-grid-sorter.js';
6
- import '@vaadin/text-field/theme/lumo/vaadin-text-field.js';
7
- import './vaadin-crud-styles.js';
8
- import '../../src/vaadin-crud.js';
@@ -1,8 +0,0 @@
1
- import '@vaadin/button/theme/lumo/vaadin-button.js';
2
- import '@vaadin/confirm-dialog/theme/lumo/vaadin-confirm-dialog.js';
3
- import '@vaadin/form-layout/theme/lumo/vaadin-form-layout.js';
4
- import '@vaadin/grid/theme/lumo/vaadin-grid.js';
5
- import '@vaadin/grid/theme/lumo/vaadin-grid-sorter.js';
6
- import '@vaadin/text-field/theme/lumo/vaadin-text-field.js';
7
- import './vaadin-crud-styles.js';
8
- import '../../src/vaadin-crud.js';