@mrcaktuz/sds-styles 0.1.0 → 0.1.1

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.
@@ -3,10 +3,9 @@
3
3
  *
4
4
  * @description - Grid styles, SDS tokens only.
5
5
  * Theme for the Vaadin Grid web component: maps the Vaadin 25 style properties (--vaadin-*) and shadow
6
- * parts to the SDS tokens. Scoped with .sds-grid; :is(vaadin-grid, sds-grid) also covers the forked
7
- * element of approach 2 (POC). Not part of the full sds-styles.css bundle.
6
+ * parts to the SDS tokens. Scoped with .sds-grid. Not part of the full sds-styles.css bundle.
8
7
  */
9
- :is(vaadin-grid, sds-grid).sds-grid {
8
+ vaadin-grid.sds-grid {
10
9
  --vaadin-background-color: var(--sds-c-bg-content);
11
10
  --vaadin-background-container: var(--sds-c-bg-gray-soft);
12
11
  --vaadin-text-color: var(--sds-c-ct-default);
@@ -33,11 +32,11 @@
33
32
  font-size: var(--sds-fs-md);
34
33
  }
35
34
 
36
- :is(vaadin-grid, sds-grid).sds-grid::part(header-cell) {
35
+ vaadin-grid.sds-grid::part(header-cell) {
37
36
  background: var(--sds-c-bg-brand-soft);
38
37
  }
39
38
 
40
- :is(vaadin-grid, sds-grid).sds-grid::part(body-cell)::before {
39
+ vaadin-grid.sds-grid::part(body-cell)::before {
41
40
  content: "";
42
41
  position: absolute;
43
42
  top: 50%;
@@ -48,15 +47,15 @@
48
47
  translate: 0 -50%;
49
48
  }
50
49
 
51
- :is(vaadin-grid, sds-grid).sds-grid::part(last-column-cell)::before {
50
+ vaadin-grid.sds-grid::part(last-column-cell)::before {
52
51
  content: none;
53
52
  }
54
53
 
55
- :is(vaadin-grid, sds-grid).sds-grid::part(selected-row-cell) {
54
+ vaadin-grid.sds-grid::part(selected-row-cell) {
56
55
  color: var(--sds-c-ct-brand);
57
56
  }
58
57
 
59
- .sds-grid :is(vaadin-grid-sorter, sds-grid-sorter)::part(indicators)::before {
58
+ .sds-grid vaadin-grid-sorter::part(indicators)::before {
60
59
  width: 0.75rem;
61
60
  height: 1rem;
62
61
  padding: 0;
@@ -66,19 +65,19 @@
66
65
  mask-repeat: no-repeat;
67
66
  }
68
67
 
69
- .sds-grid :is(vaadin-grid-sorter, sds-grid-sorter)[direction=asc]::part(indicators)::before {
68
+ .sds-grid vaadin-grid-sorter[direction=asc]::part(indicators)::before {
70
69
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 9 3-3 3 3'/%3E%3C/svg%3E");
71
70
  }
72
71
 
73
- .sds-grid :is(vaadin-grid-sorter, sds-grid-sorter)[direction=desc]::part(indicators)::before {
72
+ .sds-grid vaadin-grid-sorter[direction=desc]::part(indicators)::before {
74
73
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 7 3 3 3-3'/%3E%3C/svg%3E");
75
74
  }
76
75
 
77
- .sds-grid :is(vaadin-grid-sorter, sds-grid-sorter)::part(indicators) {
76
+ .sds-grid vaadin-grid-sorter::part(indicators) {
78
77
  color: var(--sds-c-ct-gray);
79
78
  }
80
79
 
81
- .sds-grid :is(vaadin-grid-sorter, sds-grid-sorter)[direction]::part(indicators) {
80
+ .sds-grid vaadin-grid-sorter[direction]::part(indicators) {
82
81
  color: var(--sds-c-ct-brand);
83
82
  }
84
83
 
@@ -90,17 +89,23 @@
90
89
  width: 100%;
91
90
  }
92
91
 
93
- .sds-grid :is(vaadin-checkbox, sds-checkbox) {
92
+ .sds-grid .sds-grid__editor {
93
+ display: flex;
94
+ align-items: center;
95
+ width: 100%;
96
+ }
97
+
98
+ .sds-grid vaadin-checkbox {
94
99
  --vaadin-checkbox-border-color: var(--sds-c-br-gray-strong);
95
100
  --vaadin-checkbox-border-radius: var(--sds-rd-input);
96
101
  }
97
102
 
98
- .sds-grid :is(vaadin-checkbox, sds-checkbox):is([checked], [indeterminate]) {
103
+ .sds-grid vaadin-checkbox:is([checked], [indeterminate]) {
99
104
  --vaadin-checkbox-background: var(--sds-c-bg-brand);
100
105
  --vaadin-checkbox-marker-color: var(--sds-c-ct-inverse);
101
106
  }
102
107
 
103
- .sds-grid :is(vaadin-text-field, sds-text-field) {
108
+ .sds-grid :is(vaadin-text-field, vaadin-number-field, vaadin-select) {
104
109
  --vaadin-input-field-background: var(--sds-c-bg-content);
105
110
  --vaadin-input-field-border-color: var(--sds-c-br-gray);
106
111
  --vaadin-input-field-border-radius: var(--sds-rd-input);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mrcaktuz/sds-styles",
3
3
  "description": "Synerglass Design System — stylesheets (CDN bundle, per-component CSS) and Sass API",
4
- "version": "0.1.0",
4
+ "version": "0.1.1",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "sass": "./src/_index.scss",
@@ -3,11 +3,10 @@
3
3
  *
4
4
  * @description - Grid styles, SDS tokens only.
5
5
  * Theme for the Vaadin Grid web component: maps the Vaadin 25 style properties (--vaadin-*) and shadow
6
- * parts to the SDS tokens. Scoped with .sds-grid; :is(vaadin-grid, sds-grid) also covers the forked
7
- * element of approach 2 (POC). Not part of the full sds-styles.css bundle.
6
+ * parts to the SDS tokens. Scoped with .sds-grid. Not part of the full sds-styles.css bundle.
8
7
  */
9
8
 
10
- :is(vaadin-grid, sds-grid).sds-grid {
9
+ vaadin-grid.sds-grid {
11
10
  --vaadin-background-color: var(--sds-c-bg-content);
12
11
  --vaadin-background-container: var(--sds-c-bg-gray-soft);
13
12
  --vaadin-text-color: var(--sds-c-ct-default);
@@ -21,7 +20,6 @@
21
20
  --vaadin-radius-m: var(--sds-rd-card);
22
21
  --vaadin-padding-block-container: var(--sds-sp-12);
23
22
  --vaadin-padding-inline-container: var(--sds-sp-12);
24
-
25
23
  --vaadin-grid-border-color: var(--sds-c-br-gray-soft);
26
24
  --vaadin-grid-header-font-size: var(--sds-fs-md);
27
25
  --vaadin-grid-header-font-weight: var(--sds-fw-bold);
@@ -36,11 +34,11 @@
36
34
  font-size: var(--sds-fs-md);
37
35
  }
38
36
 
39
- :is(vaadin-grid, sds-grid).sds-grid::part(header-cell) {
37
+ vaadin-grid.sds-grid::part(header-cell) {
40
38
  background: var(--sds-c-bg-brand-soft);
41
39
  }
42
40
 
43
- :is(vaadin-grid, sds-grid).sds-grid::part(body-cell)::before {
41
+ vaadin-grid.sds-grid::part(body-cell)::before {
44
42
  content: '';
45
43
  position: absolute;
46
44
  top: 50%;
@@ -51,15 +49,15 @@
51
49
  translate: 0 -50%;
52
50
  }
53
51
 
54
- :is(vaadin-grid, sds-grid).sds-grid::part(last-column-cell)::before {
52
+ vaadin-grid.sds-grid::part(last-column-cell)::before {
55
53
  content: none;
56
54
  }
57
55
 
58
- :is(vaadin-grid, sds-grid).sds-grid::part(selected-row-cell) {
56
+ vaadin-grid.sds-grid::part(selected-row-cell) {
59
57
  color: var(--sds-c-ct-brand);
60
58
  }
61
59
 
62
- .sds-grid :is(vaadin-grid-sorter, sds-grid-sorter)::part(indicators)::before {
60
+ .sds-grid vaadin-grid-sorter::part(indicators)::before {
63
61
  width: 0.75rem;
64
62
  height: 1rem;
65
63
  padding: 0;
@@ -69,19 +67,19 @@
69
67
  mask-repeat: no-repeat;
70
68
  }
71
69
 
72
- .sds-grid :is(vaadin-grid-sorter, sds-grid-sorter)[direction='asc']::part(indicators)::before {
70
+ .sds-grid vaadin-grid-sorter[direction='asc']::part(indicators)::before {
73
71
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 9 3-3 3 3'/%3E%3C/svg%3E");
74
72
  }
75
73
 
76
- .sds-grid :is(vaadin-grid-sorter, sds-grid-sorter)[direction='desc']::part(indicators)::before {
74
+ .sds-grid vaadin-grid-sorter[direction='desc']::part(indicators)::before {
77
75
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 7 3 3 3-3'/%3E%3C/svg%3E");
78
76
  }
79
77
 
80
- .sds-grid :is(vaadin-grid-sorter, sds-grid-sorter)::part(indicators) {
78
+ .sds-grid vaadin-grid-sorter::part(indicators) {
81
79
  color: var(--sds-c-ct-gray);
82
80
  }
83
81
 
84
- .sds-grid :is(vaadin-grid-sorter, sds-grid-sorter)[direction]::part(indicators) {
82
+ .sds-grid vaadin-grid-sorter[direction]::part(indicators) {
85
83
  color: var(--sds-c-ct-brand);
86
84
  }
87
85
 
@@ -93,17 +91,24 @@
93
91
  width: 100%;
94
92
  }
95
93
 
96
- .sds-grid :is(vaadin-checkbox, sds-checkbox) {
94
+ // Cell being edited (inline editing of SDSGrid)
95
+ .sds-grid .sds-grid__editor {
96
+ display: flex;
97
+ align-items: center;
98
+ width: 100%;
99
+ }
100
+
101
+ .sds-grid vaadin-checkbox {
97
102
  --vaadin-checkbox-border-color: var(--sds-c-br-gray-strong);
98
103
  --vaadin-checkbox-border-radius: var(--sds-rd-input);
99
104
  }
100
105
 
101
- .sds-grid :is(vaadin-checkbox, sds-checkbox):is([checked], [indeterminate]) {
106
+ .sds-grid vaadin-checkbox:is([checked], [indeterminate]) {
102
107
  --vaadin-checkbox-background: var(--sds-c-bg-brand);
103
108
  --vaadin-checkbox-marker-color: var(--sds-c-ct-inverse);
104
109
  }
105
110
 
106
- .sds-grid :is(vaadin-text-field, sds-text-field) {
111
+ .sds-grid :is(vaadin-text-field, vaadin-number-field, vaadin-select) {
107
112
  --vaadin-input-field-background: var(--sds-c-bg-content);
108
113
  --vaadin-input-field-border-color: var(--sds-c-br-gray);
109
114
  --vaadin-input-field-border-radius: var(--sds-rd-input);