@odx/ui 2.10.1 → 2.11.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odx/ui",
3
- "version": "2.10.1",
3
+ "version": "2.11.1",
4
4
  "author": "Drägerwerk AG & Co.KGaA",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "peerDependencies": {
@@ -18,7 +18,7 @@
18
18
  --ag-checkbox-indeterminate-color: var(--odx-control-color-selected);
19
19
  --ag-checkbox-checked-color: var(--odx-control-color-selected);
20
20
 
21
- --ag-font-family: 'Pangea';
21
+ --ag-font-family: var(--odx-typography-font-family);
22
22
  --ag-font-size: var(--odx-typography-base-size);
23
23
 
24
24
  --ag-icon-size: #{typography.get-font-size(1)};
@@ -1,12 +1,14 @@
1
1
  @use 'sass:list';
2
2
 
3
- @mixin transition($properties, $duration: var(--odx-v-transition-duration), $delay: 0ms) {
3
+ @mixin transition($properties, $duration: var(--odx-v-transition-duration), $delay: 0ms, $timing-function: var(--odx-v-transition-easing-fn)) {
4
4
  $props: ();
5
5
 
6
6
  @each $prop in $properties {
7
7
  $props: list.append($props, $prop, comma);
8
8
  }
9
9
 
10
- transition: all $duration $delay var(--odx-v-transition-easing-fn);
10
+ transition-delay: $delay;
11
+ transition-duration: $duration;
11
12
  transition-property: $props;
13
+ transition-timing-function: $timing-function;
12
14
  }
@@ -46,6 +46,6 @@ body {
46
46
  --charts-text-color: var(--odx-c-text);
47
47
  --charts-background-color: var(--odx-c-background-content);
48
48
 
49
- --charts-font-family: 'Pangea';
49
+ --charts-font-family: var(--odx-typography-font-family);
50
50
  --charts-font-size: var(--odx-typography-base-size);
51
51
  }
@@ -7,6 +7,10 @@ body {
7
7
  --odx-badge-contrast-color: var(--odx-c-background-content);
8
8
  }
9
9
 
10
+ .odx-badge-overlay {
11
+ z-index: var(--odx-v-layer-1);
12
+ }
13
+
10
14
  .odx-badge {
11
15
  $badge-size: dimensions.get-size(math.div(2, 3));
12
16
 
@@ -21,7 +25,6 @@ body {
21
25
  min-width: $badge-size;
22
26
  outline: 1px solid transparent;
23
27
  vertical-align: middle;
24
- z-index: var(--odx-v-layer-1);
25
28
 
26
29
  &,
27
30
  &--highlight {
@@ -79,6 +79,7 @@
79
79
  }
80
80
 
81
81
  &#{dropdown.$dropdown-open-selector},
82
+ &.is-active,
82
83
  &:active {
83
84
  background-color: var(--odx-c-#{$variant}-active);
84
85
  }
@@ -107,6 +108,7 @@
107
108
  }
108
109
 
109
110
  &#{dropdown.$dropdown-open-selector},
111
+ &.is-active,
110
112
  &:focus-visible,
111
113
  &:active {
112
114
  background-color: var(--odx-c-focus);
@@ -1,78 +1,55 @@
1
1
  @use 'sass:math';
2
+ @use '../abstract/utils';
2
3
  @use '../abstract/motion';
3
4
  @use '../abstract/dimensions';
4
5
 
5
6
  .odx-expandable-list-item {
6
7
  $root: &;
8
+ $list-item-selector: '> #{$root}__header .odx-list-item';
7
9
 
8
- display: block;
9
- position: relative;
10
-
11
- &::before {
12
- @include motion.transition(border-color);
13
-
14
- border-bottom: 1px solid var(--gray-200);
15
- content: '';
10
+ &__header {
16
11
  display: block;
17
- left: dimensions.get-size(math.div(1, 3));
18
- position: absolute;
19
- top: 0;
20
- width: calc(100% - #{dimensions.get-size(math.div(14, 24))});
21
- }
12
+ position: relative;
22
13
 
23
- &:hover,
24
- &:focus-visible,
25
- &:first-child {
26
- &::before {
27
- border-bottom-color: transparent;
14
+ > .odx-list-item {
15
+ @include dimensions.padding(math.div(52, 24), right);
28
16
  }
29
17
  }
30
18
 
31
- &--danger + &::before,
32
- &:hover + &::before {
33
- border-color: transparent;
34
- }
19
+ &__action {
20
+ margin: 0;
21
+ position: absolute;
22
+ right: dimensions.get-size(math.div(8, 24));
23
+ top: 50%;
24
+ transform: translateY(-50%);
35
25
 
36
- &--danger {
37
- &::before {
38
- border-bottom-color: transparent;
26
+ .odx-icon {
27
+ @include motion.transition(transform);
39
28
  }
40
29
  }
41
30
 
42
- &--expanded {
43
- &::before {
44
- border-bottom-color: transparent;
31
+ &__slot {
32
+ .odx-list #{$root}:first-child #{$list-item-selector},
33
+ .odx-list .odx-list-item:first-child {
34
+ --separator-color: var(--odx-c-separator);
45
35
  }
46
36
  }
47
37
 
48
- &__content {
49
- flex: 1;
50
- }
51
-
52
- &__expand-icon {
53
- @include motion.transition(transform);
54
-
55
- position: relative;
56
-
57
- #{$root}--expanded & {
58
- transform: scaleY(-1);
38
+ &:has(#{$list-item-selector}--danger) {
39
+ #{$root}__action {
40
+ .odx-button {
41
+ color: var(--odx-c-danger-text);
42
+ }
59
43
  }
60
44
  }
61
45
 
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
- }
46
+ &:first-child #{$list-item-selector} {
47
+ --separator-color: transparent;
48
+ }
73
49
 
74
- .odx-list-item__content {
75
- @include dimensions.padding(math.div(36, 24), left);
50
+ &--expanded {
51
+ > #{$root}__header #{$root}__action .odx-button .odx-icon {
52
+ transform: scaleY(-1);
76
53
  }
77
54
  }
78
55
  }
@@ -95,6 +95,7 @@ body {
95
95
  @include utils.with-outline();
96
96
  @include utils.focus-state(true, true, 'input');
97
97
  @include utils.focus-state(true, true, 'textarea');
98
+ @include utils.focus-state(true, true, '.odx-select');
98
99
 
99
100
  background-color: var(--odx-input-control-background-color);
100
101
  border-radius: var(--odx-v-border-radius-controls);
@@ -10,7 +10,8 @@
10
10
 
11
11
  $variants: default, warning, danger, success;
12
12
 
13
- @include dimensions.padding(math.div(10, 24));
13
+ @include dimensions.padding-x(math.div(10, 24));
14
+ @include dimensions.padding-y(math.div(12, 24));
14
15
 
15
16
  display: flex;
16
17
  gap: dimensions.get-size(math.div(10, 24));
@@ -7,18 +7,22 @@
7
7
  .odx-list-item {
8
8
  $root: &;
9
9
 
10
- @include dimensions.padding-x(math.div(1, 3));
10
+ --separator-color: var(--odx-c-separator);
11
+
12
+ @include dimensions.padding-x(math.div(8, 24));
11
13
  @include dimensions.line-height(2, 1);
12
14
  @include motion.transition(border-bottom-color background-color outline-color color);
13
15
  @include utils.interactive(false);
16
+ @include utils.with-outline-bold();
14
17
  @include utils.vertical-center-content();
15
18
 
16
19
  background-color: transparent;
17
20
  border-radius: var(--odx-v-border-radius-controls);
18
- gap: dimensions.get-size(math.div(1, 3));
21
+ gap: dimensions.get-size(math.div(8, 24));
19
22
  position: relative;
20
23
 
21
- > [odxListSuffix] {
24
+ > [odxListSuffix],
25
+ > [odxListItemSuffix] {
22
26
  margin-left: auto;
23
27
  }
24
28
 
@@ -29,30 +33,28 @@
29
33
  &::before {
30
34
  @include motion.transition(border-color);
31
35
 
32
- border-bottom: 1px solid var(--odx-c-separator);
36
+ border-bottom: 1px solid var(--separator-color);
33
37
  content: '';
34
38
  display: block;
35
39
  position: absolute;
40
+ right: dimensions.get-size(math.div(8, 24));
36
41
  top: 0;
37
- width: calc(100% - #{dimensions.get-size(math.div(14, 24))});
42
+ width: calc(100% - #{dimensions.get-size(math.div(16, 24))});
38
43
  }
39
44
 
40
45
  &:hover,
41
- &:focus-visible,
42
- &:first-child {
43
- &::before {
44
- border-bottom-color: transparent;
45
- }
46
+ &:focus-visible {
47
+ --separator-color: transparent !important;
46
48
  }
47
49
 
48
50
  &:hover {
49
51
  background-color: var(--odx-c-ghost-hover);
50
52
  }
51
53
 
52
- &--danger + &::before,
53
- &--selected + &::before,
54
- &:hover + &::before {
55
- border-color: transparent;
54
+ &--danger + &,
55
+ &.is-selected + &,
56
+ &:hover + & {
57
+ --separator-color: transparent !important;
56
58
  }
57
59
 
58
60
  &.is-disabled {
@@ -62,16 +64,11 @@
62
64
 
63
65
  &--danger {
64
66
  --odx-c-focus: var(--odx-c-danger);
65
-
66
- @include utils.with-outline-bold();
67
+ --separator-color: transparent !important;
67
68
 
68
69
  background-color: var(--odx-c-danger);
69
70
  color: var(--odx-c-danger-text);
70
71
 
71
- &::before {
72
- border-bottom-color: transparent;
73
- }
74
-
75
72
  &:hover {
76
73
  background-color: var(--odx-c-danger-hover);
77
74
  }
@@ -81,12 +78,10 @@
81
78
  }
82
79
  }
83
80
 
84
- &--selected {
85
- background-color: var(--odx-c-selected);
81
+ &.is-selected {
82
+ --separator-color: transparent !important;
86
83
 
87
- &::before {
88
- border-bottom-color: transparent;
89
- }
84
+ background-color: var(--odx-c-selected);
90
85
 
91
86
  &:hover {
92
87
  background-color: var(--odx-c-selected-hover);
@@ -1,3 +1,27 @@
1
+ @use 'sass:math';
2
+ @use 'sass:selector';
3
+ @use '../abstract/dimensions';
4
+
1
5
  .odx-list {
2
6
  display: block;
7
+
8
+ $self: &;
9
+
10
+ @for $i from 1 through 10 {
11
+ #{$self} .odx-list-item {
12
+ @include dimensions.padding(math.div(8, 24) + ($i * math.div(32, 24)), left);
13
+
14
+ &:first-child {
15
+ --separator-color: var(--odx-c-separator);
16
+ }
17
+ }
18
+
19
+ $self: #{$self + ' ' + &};
20
+ }
21
+
22
+ > .odx-list-item {
23
+ &:first-child {
24
+ --separator-color: transparent;
25
+ }
26
+ }
3
27
  }
@@ -28,6 +28,8 @@ body {
28
28
  --odx-area-header-title-color: var(--odx-main-menu-highlight-color);
29
29
  --odx-area-header-subtitle-color: var(--odx-c-text-inverse);
30
30
 
31
+ z-index: var(--odx-v-layer-5);
32
+
31
33
  &__inner {
32
34
  background-color: var(--odx-main-menu-background-color);
33
35
  color: var(--odx-main-menu-text-color);
@@ -4,21 +4,21 @@
4
4
  @use '../abstract/typography';
5
5
 
6
6
  @font-face {
7
- font-family: Pangea;
7
+ font-family: PangeaText;
8
8
  font-style: normal;
9
9
  font-weight: normal;
10
10
  src: url('../assets/fonts/PangeaText-RegularWeb.woff2') format('woff2');
11
11
  }
12
12
 
13
13
  @font-face {
14
- font-family: Pangea;
14
+ font-family: PangeaText;
15
15
  font-style: normal;
16
16
  font-weight: 500;
17
17
  src: url('../assets/fonts/PangeaText-MediumWeb.woff2') format('woff2');
18
18
  }
19
19
 
20
20
  @font-face {
21
- font-family: Pangea;
21
+ font-family: PangeaText;
22
22
  font-style: normal;
23
23
  font-weight: bold;
24
24
  src: url('../assets/fonts/PangeaText-SemiBoldWeb.woff2') format('woff2');
@@ -34,7 +34,7 @@ html body {
34
34
  @include typography.font-weight(normal);
35
35
 
36
36
  color: var(--odx-c-text);
37
- font-family: Pangea, sans-serif;
37
+ font-family: var(--odx-typography-font-family);
38
38
  }
39
39
 
40
40
  .odx-title,
@@ -1,6 +1,7 @@
1
1
  @use '../abstract/breakpoints';
2
2
 
3
3
  :root {
4
+ --odx-typography-font-family: 'PangeaText', 'Arial', sans-serif;
4
5
  --odx-typography-base-size: 1.6rem; // clamp(1.4rem, 0.667vw + 1rem, 1.6rem);
5
6
  --odx-typography-base-line-height: 1.5;
6
7
  --odx-typography-font-weight-normal: normal;