@odx/ui 1.0.4 → 2.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.
- package/ag-grid-theme.css +1 -1
- package/core-theme.css +1 -1
- package/package.json +2 -1
- package/scss/3rdparty/ag-grid/theme.scss +1 -1
- package/scss/components/autocomplete.component.scss +14 -0
- package/scss/components/chip-list.component.scss +23 -0
- package/scss/components/dropdown.component.scss +7 -0
- package/scss/components/expandable-list-item.component.scss +13 -1
- package/scss/components/form-field.component.scss +31 -8
- package/scss/components/header.component.scss +1 -1
- package/scss/components/option.component.scss +38 -0
- package/scss/components/rail-navigation-item.component.scss +50 -9
- package/scss/components/rail-navigation.component.scss +29 -8
- package/scss/components/select.component.scss +0 -41
- package/scss/components/table.component.scss +94 -0
- package/scss/components/wizard-step.component.scss +256 -0
- package/scss/components/wizard.component.scss +18 -0
- package/scss/core.scss +8 -1
- package/scss/layout/_application.scss +75 -0
- package/scss/layout/_helpers.scss +2 -2
- package/scss/layout/_layout.scss +2 -2
- package/scss/variables/_colors.scss +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odx/ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"author": "Drägerwerk AG & Co.KGaA",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"peerDependencies": {
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"*.css",
|
|
11
11
|
"*.woff2",
|
|
12
12
|
"*.svg",
|
|
13
|
+
"CHANGELOG.md",
|
|
13
14
|
"scss"
|
|
14
15
|
],
|
|
15
16
|
"publishConfig": {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
@use '../../abstract/typography';
|
|
4
4
|
|
|
5
5
|
.ag-theme-odx {
|
|
6
|
-
--ag-border-color: var(--odx-c-
|
|
6
|
+
--ag-border-color: var(--odx-c-separator);
|
|
7
7
|
--ag-foreground-color: var(--odx-c-text);
|
|
8
8
|
--ag-secondary-foreground-color: var(--odx-c-text);
|
|
9
9
|
--ag-disabled-foreground-color: vara(--odx-c-text-disabled);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
2
|
+
@use '../abstract/dimensions';
|
|
3
|
+
|
|
4
|
+
$form-field-inner-padding: math.div(8, 24);
|
|
5
|
+
|
|
6
|
+
.odx-chip-list {
|
|
7
|
+
$root: &;
|
|
8
|
+
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
width: 100%;
|
|
12
|
+
|
|
13
|
+
&-row {
|
|
14
|
+
&:has(.odx-chip) {
|
|
15
|
+
@include dimensions.padding($form-field-inner-padding, ('top', 'left', 'right'));
|
|
16
|
+
@include dimensions.padding(math.div(4, 24), ('bottom'));
|
|
17
|
+
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-wrap: wrap;
|
|
20
|
+
gap: dimensions.get-size($form-field-inner-padding);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -19,6 +19,13 @@ $dropdown-open-selector: '.odx-dropdown-host[aria-expanded="true"]';
|
|
|
19
19
|
min-height: inherit;
|
|
20
20
|
overflow: auto;
|
|
21
21
|
}
|
|
22
|
+
|
|
23
|
+
&__option-list {
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
max-height: var(--odx-select-max-height);
|
|
27
|
+
min-height: dimensions.get-size(1.5);
|
|
28
|
+
}
|
|
22
29
|
}
|
|
23
30
|
|
|
24
31
|
.odx-dropdown-overlay {
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
.odx-expandable-list-item {
|
|
6
6
|
$root: &;
|
|
7
7
|
|
|
8
|
+
display: block;
|
|
8
9
|
position: relative;
|
|
9
10
|
|
|
10
11
|
&::before {
|
|
@@ -13,6 +14,7 @@
|
|
|
13
14
|
border-bottom: 1px solid var(--gray-200);
|
|
14
15
|
content: '';
|
|
15
16
|
display: block;
|
|
17
|
+
left: dimensions.get-size(math.div(1, 3));
|
|
16
18
|
position: absolute;
|
|
17
19
|
top: 0;
|
|
18
20
|
width: calc(100% - #{dimensions.get-size(math.div(14, 24))});
|
|
@@ -27,7 +29,6 @@
|
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
&--danger + &::before,
|
|
30
|
-
&--expanded + &::before,
|
|
31
32
|
&:hover + &::before {
|
|
32
33
|
border-color: transparent;
|
|
33
34
|
}
|
|
@@ -59,6 +60,17 @@
|
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
&__slot {
|
|
63
|
+
#{$root}:last-child & {
|
|
64
|
+
.odx-list-item:last-child::after {
|
|
65
|
+
border-bottom: 1px solid var(--gray-200);
|
|
66
|
+
bottom: 0;
|
|
67
|
+
content: '';
|
|
68
|
+
display: block;
|
|
69
|
+
position: absolute;
|
|
70
|
+
width: calc(100% - #{dimensions.get-size(math.div(14, 24))});
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
62
74
|
.odx-list-item__content {
|
|
63
75
|
@include dimensions.padding(math.div(36, 24), left);
|
|
64
76
|
}
|
|
@@ -15,6 +15,7 @@ body {
|
|
|
15
15
|
.odx-form,
|
|
16
16
|
.odx-form-group {
|
|
17
17
|
--odx-grid-gutter: #{dimensions.get-size(0.5)};
|
|
18
|
+
--odx-form-field-horizontal-label-width: #{dimensions.get-size(math.div(150, 24))};
|
|
18
19
|
|
|
19
20
|
row-gap: 0;
|
|
20
21
|
}
|
|
@@ -60,10 +61,9 @@ body {
|
|
|
60
61
|
}
|
|
61
62
|
|
|
62
63
|
&-label {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
max-width: 100%;
|
|
64
|
+
#{$root}:not(#{$root}--horizontal) & {
|
|
65
|
+
@include typography.prevent-text-overflow();
|
|
66
|
+
}
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
&__label {
|
|
@@ -71,16 +71,21 @@ body {
|
|
|
71
71
|
@include dimensions.margin(-$form-field-label-height, 'top');
|
|
72
72
|
@include typography.font-size(-1);
|
|
73
73
|
|
|
74
|
-
display: flex;
|
|
75
74
|
user-select: none;
|
|
76
75
|
|
|
77
|
-
#{$root}
|
|
76
|
+
#{$root}:not(#{$root}--horizontal, #{$root}--simple) & {
|
|
77
|
+
display: flex;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&-is-required {
|
|
78
81
|
@include typography.font-size(0);
|
|
79
82
|
|
|
80
|
-
color: var(--odx-c-error-text);
|
|
81
|
-
content: '*';
|
|
82
83
|
margin-left: 2px;
|
|
83
84
|
vertical-align: top;
|
|
85
|
+
|
|
86
|
+
#{$root}--required:not(.is-readonly, .is-disabled) & {
|
|
87
|
+
color: var(--odx-c-error-text);
|
|
88
|
+
}
|
|
84
89
|
}
|
|
85
90
|
}
|
|
86
91
|
|
|
@@ -216,6 +221,24 @@ body {
|
|
|
216
221
|
display: none;
|
|
217
222
|
}
|
|
218
223
|
}
|
|
224
|
+
|
|
225
|
+
&--horizontal {
|
|
226
|
+
@include dimensions.padding(math.div(8, 24), top);
|
|
227
|
+
|
|
228
|
+
flex-direction: row;
|
|
229
|
+
|
|
230
|
+
#{$root}__label {
|
|
231
|
+
@include dimensions.margin(0.25, top);
|
|
232
|
+
|
|
233
|
+
flex: 0 0 var(--odx-form-field-horizontal-label-width);
|
|
234
|
+
max-width: var(--odx-form-field-horizontal-label-width);
|
|
235
|
+
padding-left: 0;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
#{$root}__inner {
|
|
239
|
+
flex: 1;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
219
242
|
}
|
|
220
243
|
|
|
221
244
|
.odx-form-field.is-readonly,
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
2
|
+
@use '../abstract/dimensions';
|
|
3
|
+
@use '../abstract/motion';
|
|
4
|
+
@use '../abstract/typography';
|
|
5
|
+
|
|
6
|
+
.odx-option {
|
|
7
|
+
@include dimensions.line-height(1.5, 1);
|
|
8
|
+
@include dimensions.margin(math.div(4, 24), bottom);
|
|
9
|
+
@include dimensions.padding-x(0.5);
|
|
10
|
+
@include motion.transition(background-color color outline-color);
|
|
11
|
+
@include typography.font-weight(normal);
|
|
12
|
+
|
|
13
|
+
border-radius: var(--odx-v-border-radius-controls);
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
user-select: none;
|
|
16
|
+
|
|
17
|
+
&:last-child {
|
|
18
|
+
margin-bottom: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&.is-active,
|
|
22
|
+
&:hover {
|
|
23
|
+
background-color: var(--gray-50);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&.is-selected {
|
|
27
|
+
background-color: var(--cyan-500-15);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&.is-disabled {
|
|
31
|
+
color: var(--odx-control-color-disabled);
|
|
32
|
+
pointer-events: none;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
> .odx-checkbox {
|
|
36
|
+
@include dimensions.margin(math.div(8, 24), right);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
@use 'sass:math';
|
|
2
|
+
@use '../abstract/breakpoints';
|
|
2
3
|
@use '../abstract/dimensions';
|
|
3
4
|
@use '../abstract/motion';
|
|
4
5
|
@use '../abstract/typography';
|
|
5
|
-
@use '../abstract/
|
|
6
|
-
@use '
|
|
6
|
+
@use '../abstract/utils';
|
|
7
|
+
@use './icon.component';
|
|
7
8
|
|
|
8
9
|
.odx-rail-navigation-item {
|
|
10
|
+
$root: &;
|
|
11
|
+
|
|
9
12
|
@include motion.transition(outline-color background-color color);
|
|
10
13
|
@include dimensions.padding(math.div(8, 24));
|
|
11
14
|
@include utils.interactive(false);
|
|
@@ -15,6 +18,7 @@
|
|
|
15
18
|
border-radius: dimensions.get-size(math.div(3, 24));
|
|
16
19
|
box-sizing: border-box;
|
|
17
20
|
display: flex;
|
|
21
|
+
justify-content: center;
|
|
18
22
|
text-align: left;
|
|
19
23
|
|
|
20
24
|
&:hover {
|
|
@@ -40,21 +44,58 @@
|
|
|
40
44
|
@include motion.transition(width padding-left opacity);
|
|
41
45
|
|
|
42
46
|
opacity: 0;
|
|
43
|
-
overflow: hidden;
|
|
44
|
-
padding-left: 0;
|
|
45
47
|
width: 0;
|
|
46
48
|
|
|
47
|
-
.odx-rail-navigation
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
.odx-rail-navigation--bar & {
|
|
50
|
+
-webkit-box-orient: vertical;
|
|
51
|
+
display: -webkit-box;
|
|
52
|
+
-webkit-line-clamp: 2;
|
|
53
|
+
margin: auto 0;
|
|
54
|
+
opacity: unset;
|
|
55
|
+
padding: 0 !important;
|
|
56
|
+
white-space: unset;
|
|
57
|
+
width: unset !important;
|
|
50
58
|
|
|
51
|
-
|
|
52
|
-
|
|
59
|
+
@include typography.font-size(-2);
|
|
60
|
+
@include dimensions.line-height(math.div(2, 3));
|
|
61
|
+
|
|
62
|
+
@include breakpoints.up(phone) {
|
|
63
|
+
@include typography.font-size(-1);
|
|
64
|
+
@include dimensions.line-height(1);
|
|
53
65
|
}
|
|
54
66
|
}
|
|
67
|
+
|
|
68
|
+
.odx-rail-navigation.is-open &:not(:empty) {
|
|
69
|
+
@include dimensions.padding(math.div(8, 24), left);
|
|
70
|
+
|
|
71
|
+
opacity: 1;
|
|
72
|
+
width: calc(var(--odx-rail-navigation-max-width) - dimensions.get-size(math.div(64, 24)));
|
|
73
|
+
}
|
|
55
74
|
}
|
|
56
75
|
|
|
57
76
|
> .odx-icon {
|
|
58
77
|
margin: 0;
|
|
59
78
|
}
|
|
79
|
+
|
|
80
|
+
.odx-rail-navigation--bar & {
|
|
81
|
+
flex: 1;
|
|
82
|
+
flex-direction: column;
|
|
83
|
+
text-align: center;
|
|
84
|
+
|
|
85
|
+
@include dimensions.padding-x(math.div(4, 24));
|
|
86
|
+
|
|
87
|
+
> .odx-icon {
|
|
88
|
+
@extend .odx-icon;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@include breakpoints.up(phone) {
|
|
92
|
+
@include dimensions.padding-x(math.div(8, 24));
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
&:has(#{$root}__container:empty) {
|
|
96
|
+
#{$root}__container {
|
|
97
|
+
display: none;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
60
101
|
}
|
|
@@ -4,29 +4,50 @@
|
|
|
4
4
|
@use '../abstract/breakpoints';
|
|
5
5
|
|
|
6
6
|
.odx-rail-navigation {
|
|
7
|
-
|
|
7
|
+
$root: &;
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
--odx-rail-navigation-max-width: 230px;
|
|
10
10
|
|
|
11
11
|
align-items: flex-start;
|
|
12
12
|
display: inline-flex;
|
|
13
13
|
flex-direction: column;
|
|
14
14
|
height: 100%;
|
|
15
15
|
justify-content: space-between;
|
|
16
|
-
padding: dimensions.get-size(1) dimensions.get-size(math.div(8, 24));
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
17
|
+
@include dimensions.padding-x(math.div(8, 24));
|
|
18
|
+
@include dimensions.padding-y(1);
|
|
21
19
|
|
|
22
20
|
&__content {
|
|
23
21
|
display: flex;
|
|
24
22
|
flex-direction: column;
|
|
25
23
|
gap: dimensions.get-size(math.div(12, 24));
|
|
26
24
|
overflow: auto;
|
|
25
|
+
|
|
26
|
+
#{$root}--bar & {
|
|
27
|
+
flex-direction: row;
|
|
28
|
+
gap: 0;
|
|
29
|
+
width: 100%;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&__expand {
|
|
34
|
+
> .odx-icon {
|
|
35
|
+
@include motion.transition(transform);
|
|
36
|
+
|
|
37
|
+
#{$root}.is-open & {
|
|
38
|
+
transform: rotateY(180deg);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
#{$root}--bar & {
|
|
43
|
+
display: none;
|
|
44
|
+
}
|
|
27
45
|
}
|
|
28
46
|
|
|
29
|
-
|
|
30
|
-
|
|
47
|
+
&--bar {
|
|
48
|
+
background-color: var(--odx-c-background-content);
|
|
49
|
+
display: flex;
|
|
50
|
+
|
|
51
|
+
@include dimensions.padding(math.div(4, 24), top bottom);
|
|
31
52
|
}
|
|
32
53
|
}
|
|
@@ -66,44 +66,3 @@ body {
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
|
|
70
|
-
.odx-select-dropdown {
|
|
71
|
-
display: flex;
|
|
72
|
-
flex-direction: column;
|
|
73
|
-
max-height: var(--odx-select-max-height);
|
|
74
|
-
min-height: dimensions.get-size(1.5);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.odx-option {
|
|
78
|
-
@include dimensions.line-height(1.5, 1);
|
|
79
|
-
@include dimensions.margin(math.div(4, 24), bottom);
|
|
80
|
-
@include dimensions.padding-x(0.5);
|
|
81
|
-
@include motion.transition(background-color color outline-color);
|
|
82
|
-
@include typography.font-weight(normal);
|
|
83
|
-
|
|
84
|
-
border-radius: var(--odx-v-border-radius-controls);
|
|
85
|
-
cursor: pointer;
|
|
86
|
-
user-select: none;
|
|
87
|
-
|
|
88
|
-
&:last-child {
|
|
89
|
-
margin-bottom: 0;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
&.is-active,
|
|
93
|
-
&:hover {
|
|
94
|
-
background-color: var(--gray-50);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
&.is-selected {
|
|
98
|
-
background-color: var(--cyan-500-15);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
&.is-disabled {
|
|
102
|
-
color: var(--odx-control-color-disabled);
|
|
103
|
-
pointer-events: none;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
> .odx-checkbox {
|
|
107
|
-
@include dimensions.margin(math.div(8, 24), right);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
2
|
+
@use '../layout/helpers';
|
|
3
|
+
@use '../abstract/dimensions';
|
|
4
|
+
@use '../abstract/typography';
|
|
5
|
+
@use '../abstract/utils';
|
|
6
|
+
@use '../abstract/motion';
|
|
7
|
+
|
|
8
|
+
.odx-table {
|
|
9
|
+
--odx-table-background-color: var(--white);
|
|
10
|
+
--odx-table-head-border-color: var(--gray-900);
|
|
11
|
+
--odx-table-cell-border-color: var(--gray-200);
|
|
12
|
+
--odx-table-cell-background-color-hover: var(--blue-700-5);
|
|
13
|
+
--odx-table-cell-background-color-striped: var(--gray-50);
|
|
14
|
+
--odx-table-cell-background-color-active: var(--cyan-500-15);
|
|
15
|
+
|
|
16
|
+
$root: &;
|
|
17
|
+
|
|
18
|
+
background: var(--odx-table-background-color);
|
|
19
|
+
border: 0;
|
|
20
|
+
border-spacing: 0;
|
|
21
|
+
min-width: 100%;
|
|
22
|
+
table-layout: auto;
|
|
23
|
+
white-space: normal;
|
|
24
|
+
|
|
25
|
+
&__header-cell,
|
|
26
|
+
&__cell {
|
|
27
|
+
@include dimensions.padding-x(0.5);
|
|
28
|
+
|
|
29
|
+
border-bottom-style: solid;
|
|
30
|
+
border-bottom-width: 1px;
|
|
31
|
+
text-align: left;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&__cell {
|
|
35
|
+
border-bottom-color: var(--odx-table-cell-border-color);
|
|
36
|
+
height: dimensions.get-size(2);
|
|
37
|
+
vertical-align: middle;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&__header-cell-title {
|
|
41
|
+
align-items: center;
|
|
42
|
+
display: flex;
|
|
43
|
+
gap: dimensions.get-size(math.div(8, 24));
|
|
44
|
+
height: dimensions.get-size(2);
|
|
45
|
+
user-select: none;
|
|
46
|
+
|
|
47
|
+
&.sortable {
|
|
48
|
+
cursor: pointer;
|
|
49
|
+
|
|
50
|
+
> svg {
|
|
51
|
+
display: inline-block;
|
|
52
|
+
height: auto;
|
|
53
|
+
width: dimensions.get-size(math.div(16, 24));
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&__header-cell {
|
|
59
|
+
@include typography.font-weight(medium);
|
|
60
|
+
|
|
61
|
+
border-bottom-color: var(--odx-table-head-border-color);
|
|
62
|
+
|
|
63
|
+
.odx-form-field {
|
|
64
|
+
height: dimensions.get-size(2);
|
|
65
|
+
justify-content: center;
|
|
66
|
+
padding: 0;
|
|
67
|
+
|
|
68
|
+
&__info {
|
|
69
|
+
display: none;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&--striped {
|
|
75
|
+
.odx-table__row:nth-child(odd) {
|
|
76
|
+
background-color: var(--odx-table-cell-background-color-striped);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&__body {
|
|
81
|
+
/* stylelint-disable-next-line no-descending-specificity */
|
|
82
|
+
.odx-table__row {
|
|
83
|
+
@include motion.transition(background-color);
|
|
84
|
+
|
|
85
|
+
&:hover {
|
|
86
|
+
background-color: var(--odx-table-cell-background-color-hover);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&:focus-visible {
|
|
90
|
+
background-color: var(--odx-table-cell-background-color-active);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|